test(experimental): cover the mods bridge's process cwd fallback on Windows and list the package in the release family
Also narrow the mod tool's rendered value to the string its schema admits and bind the registration's catch before calling it untyped.
This commit is contained in:
1 parent
ca83aecbc8
commit
6e948732d1
4 files changed
+7
-3
No files matched your search
@@ -293,9 +293,9 @@ export function createHostOps(options: HostOpsOptions): OpTable<AgentBinding> {
|
||||
description,
|
||||
parameters: inputSchema,
|
||||
output: {
|
||||
// The answering hook's result text.
|
||||
// The answering hook's result text; the schema admits only a string.
|
||||
schema: { type: 'string' },
|
||||
render: (_args, value) => [{ type: 'text', text: String(value) }],
|
||||
render: (_args, value) => [{ type: 'text', text: value as string }],
|
||||
},
|
||||
execute() {
|
||||
return Promise.reject(new Error(`${mod.name} registered ${fullName} but no tool.call hook answered it; add on('tool.call', { tool: '${fullName}' }, hook)`))
|
||||
|
||||
@@ -178,6 +178,8 @@ describe('processes through the subprocess seam', () => {
|
||||
expect(run.stdout.endsWith('|set')).toBe(true)
|
||||
const viaAgent = await call('process.run', { argv: ['node', '-e', 'process.stdout.write(process.cwd())'] }, fakeAgent(ctx, { cwd })) as { stdout: string }
|
||||
expect(viaAgent.stdout.length).toBeGreaterThan(0)
|
||||
const bare = await call('process.run', { argv: ['node', '-e', 'process.stdout.write(process.cwd())'] }) as { exitCode: number; stdout: string }
|
||||
expect(bare).toEqual({ exitCode: 0, stdout: process.cwd(), stderr: '' })
|
||||
// A Windows child that kills itself still reports an exit code, so the signal branch is POSIX evidence.
|
||||
if (process.platform !== 'win32') {
|
||||
await expect(call('process.run', { argv: ['node', '-e', 'process.kill(process.pid, "SIGKILL")'] })).rejects.toThrow(/was terminated by signal SIGKILL/)
|
||||
|
||||
@@ -35,7 +35,8 @@ describe('createOn', () => {
|
||||
expect(() => on('session.start', { cwd: '/x' }, noop)).not.toThrow()
|
||||
expect(() => loose('turn.start', 'nope')).toThrow(/needs a hook function/)
|
||||
expect(() => loose('turn.start', 'nope', noop)).toThrow(/matcher must be an object/)
|
||||
const attach = on('turn.complete', noop).catch as (handler: unknown) => void
|
||||
const registration = on('turn.complete', noop)
|
||||
const attach = registration.catch.bind(registration) as (handler: unknown) => void
|
||||
expect(() => { attach('nope') }).toThrow(/needs a handler function/)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -56,6 +56,7 @@ describe('release families', () => {
|
||||
'@deepseek-ai/dsh-experimental-browser-use-playwright-mcp',
|
||||
'@deepseek-ai/dsh-experimental-browser-use-runtime',
|
||||
'@deepseek-ai/dsh-experimental-browser-use-stagehand-native',
|
||||
'@deepseek-ai/dsh-experimental-claude-code-mods',
|
||||
'@deepseek-ai/dsh-experimental-client-ui-agent-team',
|
||||
'@deepseek-ai/dsh-experimental-client-ui-voice-input',
|
||||
'@deepseek-ai/dsh-experimental-computer-use-cua-driver-mcp',
|
||||
|
||||
Reference in new issue
Block a user