Liking cljdoc? Tell your friends :D

im.ttalk.agent.server.agui.resume

/run 起跑前的那一段:新 run 还是续跑(interrupt 协议的 resume[]、前端工具的结果、审批答复)。 逻辑最初出自 clj-agent 的 examples/copilotkit/http_kit_routes.clj(handle-run* / resume-plan / resume-decision …);2026-11-10 起 那份示例改为调用本模块,这里是唯一的一份。 文案走本模块的 i18n。C# 那边这一段在 ChatAguiAgent 里(Keelson.Agui),协议层只管路由。

start! 返回 runtime 的结果(rt/start-run! / rt/resume-run!:{:status :started :run-id :since}、:busy、 :awaiting-resume、:not-paused),或 {:status :resume-error :error [status code extra]}(在起 run 之前判掉的坏答复)。

`/run` 起跑前的那一段:新 run 还是续跑(interrupt 协议的 `resume[]`、前端工具的结果、审批答复)。
逻辑最初出自 clj-agent 的 examples/copilotkit/http_kit_routes.clj(handle-run* / resume-plan / resume-decision …);2026-11-10 起
那份示例改为调用本模块,这里是唯一的一份。
文案走本模块的 i18n。C# 那边这一段在 ChatAguiAgent 里(Keelson.Agui),协议层只管路由。

`start!` 返回 runtime 的结果(`rt/start-run!` / `rt/resume-run!`:`{:status :started :run-id :since}`、`:busy`、
`:awaiting-resume`、`:not-paused`),或 `{:status :resume-error :error [status code extra]}`(在起 run 之前判掉的坏答复)。
raw docstring

decision-ofclj

(decision-of content)

前端 respond(...) 回来的载荷 → resume 决策(审批场景下载荷是决策,不是工具结果)。

前端 `respond(...)` 回来的载荷 → resume 决策(审批场景下载荷是**决策**,不是工具结果)。
sourceraw docstring

frontend-replyclj

(frontend-reply resume-entry tool-result)

前端工具那支的 resume 载荷 → 交给模型的工具结果文本。取消先看 status(⛔ 不能把缺席的载荷 str 成空结果)。

前端工具那支的 resume 载荷 → 交给模型的**工具结果文本**。取消先看 status(⛔ 不能把缺席的载荷 str 成空结果)。
sourceraw docstring

resume-decisionclj

(resume-decision {:keys [status payload]})

AG-UI resume[] 条目 → [decision payload]。status=cancelled ⇒ 拒;approved:false 先于一切判; 批准 + editedArgs 对象 ⇒ {:args editedArgs}(整体替换)。⛔ 不把客户端载荷原样透传。

AG-UI `resume[]` 条目 → `[decision payload]`。`status=cancelled` ⇒ 拒;`approved:false` 先于一切判;
批准 + `editedArgs` 对象 ⇒ `{:args editedArgs}`(整体替换)。⛔ 不把客户端载荷原样透传。
sourceraw docstring

resume-planclj

(resume-plan thread-id resume pending server-tool-names)

resume[] 对着当前暂停算出怎么续:nil(没带)/ {:error [status code extra]} / {:single entry} / {:decisions {id 决策}}。 | 情形 | status | code | | resume 不是数组 / 条目形状不对 | 400 | interrupt_bad_resume | | 没有暂停 | 409 | no_pending_interrupt | | 一条都对不上(过期重放) | 409 | interrupt_mismatch | | 对上了、但还夹着不认识的 id | 409 | interrupt_unknown | | 多条审批只答了一部分 | 409 | interrupt_incomplete |

`resume[]` 对着当前暂停算出怎么续:nil(没带)/ `{:error [status code extra]}` / `{:single entry}` / `{:decisions {id 决策}}`。
| 情形 | status | code |
| resume 不是数组 / 条目形状不对 | 400 | interrupt_bad_resume |
| 没有暂停 | 409 | no_pending_interrupt |
| 一条都对不上(过期重放) | 409 | interrupt_mismatch |
| 对上了、但还夹着不认识的 id | 409 | interrupt_unknown |
| 多条审批只答了一部分 | 409 | interrupt_incomplete |
sourceraw docstring

start!clj

(start! {:keys [runtime] :as entry} body)

照 RunAgentInput 起 run 或续跑(见 ns 文档)。entry 是注册表里那台 agent 的条目::runtime、可选 :server-tool-names (服务端工具名 —— 前端同名声明 = useHumanInTheLoop 的渲染 / 审批意图,⛔ 不当新工具)、可选 :input-transform。

照 RunAgentInput 起 run 或续跑(见 ns 文档)。`entry` 是注册表里那台 agent 的条目:`:runtime`、可选 `:server-tool-names`
(服务端工具名 —— 前端同名声明 = `useHumanInTheLoop` 的渲染 / 审批意图,⛔ 不当新工具)、可选 `:input-transform`。
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close