feat(contracts,db): agent.plan / agent.propose_options, interaction events, proposeFirst replaces run mode

- agent_run_event gains plan_updated, options_proposed/resolved, approval_requested/resolved (migration 0040)
- AgentRunStartInput.proposeFirst; mode deprecated (plan_only maps to proposeFirst); mode dropped from AgentRun API
- POST /agent/runs/{id}/choice; agent.optionsTimeoutSec/optionsTimeoutAction/approvalTimeoutSec settings

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
rootandClaude Opus 5.5 committed 2026-09-28 21:07:01 +08:00
1 parent d931e75310
commit 74c2ed45aa
12 files changed
+379 -12

No files matched your search

+11 -1
View File
@@ -1206,7 +1206,7 @@ export const Api = {
method: "post",
path: "/agent/runs",
scope: "organize.execute",
summary: "委托目标:建 agent_run 并入队 runAgent(execute | plan_only)",
summary: "委托目标:建 agent_run 并入队 runAgent(proposeFirst = 先看方案再执行;mode 已弃用)",
body: agent.AgentRunStartInput,
response: agent.AgentRun,
}),
@@ -1219,6 +1219,16 @@ export const Api = {
body: agent.AgentRunMessageInput,
response: agent.AgentRun,
}),
// 回答 agent.propose_options(会话挂起等待中):选一个方案或都不要,会话随即继续
choose: ep({
method: "post",
path: "/agent/runs/{id}/choice",
scope: "organize.execute",
summary: "回答方案选择:选一个方案或都不要(说明原因),挂起的会话随即继续",
params: IdParam,
body: agent.AgentRunChoiceInput,
response: agent.AgentRun,
}),
abort: ep({
method: "post",
path: "/agent/runs/{id}/abort",