Merge branch 'codex/tool-json-schema-dsl' into codex/canonical-tool-output

# Conflicts:
#	.agents/notes/implemented/feature/2026-06-30-interception-seams.md
#	docs/config-catalog.md
#	docs/cookbook/adding-a-tool.i18n.yaml
#	docs/cookbook/adding-a-tool.md
#	docs/cookbook/adding-a-tool.zh.md
#	docs/cordis-catalog/events.md
#	docs/cordis-catalog/services.md
#	docs/core-data-structures/tools.md
#	docs/event-producer-consumer.md
#	docs/persistence-catalog.md
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/session.jsonl
#	examples/acp-agent/tests/snapshots/cordis-inspect-jsdoc/stdout.expected.jsonl
#	packages/bash/tool-bash/src/index.ts
#	packages/core/agent-loop/src/tool-calls.ts
#	packages/core/agent-loop/tests/cancel.spec.ts
#	packages/core/agent-loop/tests/contract-regressions.spec.ts
#	packages/core/agent-loop/tests/tool-calls.spec.ts
#	packages/core/tools/README.md
#	packages/core/tools/src/index.ts
#	packages/core/tools/tests/code-mode.spec.ts
#	packages/core/tools/tests/tools.spec.ts
#	packages/fs/tool-fs-search/tests/integration.spec.ts
#	packages/fs/tool-fs-search/tests/tools.spec.ts
#	packages/fs/tool-fs/tests/integration.spec.ts
#	packages/mcp/mcp-client/src/tools.ts
#	packages/timeout/timeout-policy/tests/timeout-policy.spec.ts
#	packages/web/tool-web/tests/integration.spec.ts
#	packages/web/tool-web/tests/tool-web.spec.ts
This commit is contained in:
Tianyi Cui
2026-07-21 23:39:03 +08:00
194 changed files with 3387 additions and 1222 deletions

View File

@@ -87,7 +87,7 @@ export function apply(ctx: Context): void {
...question.multi_select !== undefined ? { multiSelect: question.multi_select } : {},
})),
...exec.agent !== undefined ? { agent: exec.agent } : {},
...exec.signal !== undefined ? { signal: exec.signal } : {},
signal: exec.signal,
})
return {
answers: result.answers.map(answer => ({

View File

@@ -7,6 +7,8 @@ import ToolRegistry from '@deepseek-ai/dsh-tools'
import UserInteractionService, { type AskUserQuestionRequest } from '@deepseek-ai/dsh-user-interaction'
import * as toolAskUser from '@deepseek-ai/dsh-tool-ask-user'
const testToolSignal = new AbortController().signal
interface OptionSchemaShape {
properties: {
questions: {
@@ -75,6 +77,7 @@ describe('ask_user_question tool', () => {
})
const result = await ctx.tools.execute({
signal: testToolSignal,
callId: CallId('ask-1'),
name: 'ask_user_question',
arguments: {
@@ -110,6 +113,7 @@ describe('ask_user_question tool', () => {
})
await ctx.tools.execute({
signal: testToolSignal,
callId: CallId('ask-recommended'),
name: 'ask_user_question',
arguments: {
@@ -144,6 +148,7 @@ describe('ask_user_question tool', () => {
})
const result = await ctx.tools.execute({
signal: testToolSignal,
callId: CallId('ask-multi'),
name: 'ask_user_question',
arguments: {
@@ -206,6 +211,7 @@ describe('ask_user_question tool', () => {
const agent = { id: 'main' } as unknown as Agent
const result = await ctx.tools.execute({
signal: testToolSignal,
callId: CallId('ask-3'),
name: 'ask_user_question',
arguments: { questions: [{ id: 'continue', header: 'Confirm', question: 'Continue?' }] },
@@ -220,6 +226,7 @@ describe('ask_user_question tool', () => {
const ctx = await setup()
const result = await ctx.tools.execute({
signal: testToolSignal,
callId: CallId('ask-no-provider'),
name: 'ask_user_question',
arguments: { questions: [{ id: 'continue', question: 'Continue?' }] },
@@ -235,6 +242,7 @@ describe('ask_user_question tool', () => {
const ctx = await setup()
const result = await ctx.tools.execute({
signal: testToolSignal,
callId: CallId('ask-empty'),
name: 'ask_user_question',
arguments: { questions: [] },