Merge codex/goal-tools into codex/goal-session

# Conflicts:
#	.agents/notes/implemented/feature/2026-07-19-persisted-same-session-goal-domain.i18n.yaml
#	.agents/notes/implemented/feature/2026-07-19-persisted-same-session-goal-domain.md
#	.agents/notes/implemented/feature/2026-07-19-persisted-same-session-goal-domain.zh.md
#	docs/cordis-catalog/events.md
#	docs/event-producer-consumer.md
#	packages/goal/goal/tests/goal.spec.ts
#	website/zh-CN/api/harness/events.md
#	website/zh-CN/api/harness/goals.md
This commit is contained in:
Tianyi Cui
2026-07-20 08:58:37 +08:00
24 changed files with 319 additions and 125 deletions

View File

@@ -1,4 +1,4 @@
/** Deterministic adapter that creates, reads, then pauses one goal. */
/** Deterministic adapter that creates, reads, pauses, then acknowledges one goal. */
import type { Context } from 'cordis'
import { CallId, LlmAdapter } from '@deepseek-ai/dsh-llm'
@@ -75,7 +75,7 @@ class GoalScriptAdapter extends LlmAdapter {
if (goal === undefined) throw new Error('scripted goal state missing')
return toolCall('update_goal', { goal_id: goal.id, revision: goal.revision, action: 'pause' })
}
if (prompt.text === 'pause') return textReply('UNEXPECTED CONTINUATION AFTER PAUSE')
if (prompt.text === 'pause') return textReply('GOAL PAUSED')
return textReply('UNEXPECTED PROMPT')
}
}