fix(sdk): mount task controls for subagents
This commit is contained in:
@@ -212,6 +212,8 @@ config:
|
||||
// The control pair rides every resumable in-process option: background
|
||||
// delegation on spawn/fork is continuable and advertises send_message.
|
||||
baseResources: [
|
||||
{ kind: 'npm-cordis-config-entry', id: 'tasks', package: '@deepseek-ai/dsh-tasks' },
|
||||
{ kind: 'npm-cordis-config-entry', id: 'tool-tasks', package: '@deepseek-ai/dsh-tool-tasks' },
|
||||
{ kind: 'npm-cordis-config-entry', id: 'subagent', package: '@deepseek-ai/dsh-subagent' },
|
||||
{ kind: 'npm-cordis-config-entry', id: 'subagent-control', package: '@deepseek-ai/dsh-subagent-control' },
|
||||
{ kind: 'npm-cordis-config-entry', id: 'tool-subagent-control', package: '@deepseek-ai/dsh-tool-subagent-control' },
|
||||
|
||||
@@ -204,6 +204,16 @@ describe('SdkProject and ProjectEditSession', () => {
|
||||
expect(project.cordis.entry('llm-deepseek')?.config).not.toHaveProperty('models')
|
||||
})
|
||||
|
||||
it.each(['spawn', 'fork'] as const)('mounts Task controls for %s subagents', async (option) => {
|
||||
const project = await createCommitted([selection('subagent', [option])])
|
||||
expect(project.cordis.entry('tasks')?.name).toBe('@deepseek-ai/dsh-tasks')
|
||||
expect(project.cordis.entry('tool-tasks')?.name).toBe('@deepseek-ai/dsh-tool-tasks')
|
||||
expect(project.packageManifest().dependencies).toMatchObject({
|
||||
'@deepseek-ai/dsh-tasks': '^0.0.1',
|
||||
'@deepseek-ai/dsh-tool-tasks': '^0.0.1',
|
||||
})
|
||||
})
|
||||
|
||||
it('round-trips embed app projects without a front-door Cordis config entry', async () => {
|
||||
const root = await mkdtemp(join(tmpdir(), 'dsh-embed-app-'))
|
||||
temporary.push(root)
|
||||
|
||||
Reference in New Issue
Block a user