Documentation
¶
Index ¶
- func NewArchitectStopGuard(st *store.Store, onBlock BlockHook) agentcore.StopGuard
- func NewEditorStopGuard(st *store.Store, task string, onBlock BlockHook) agentcore.StopGuard
- func NewStopGuard(st *store.Store, onBlock BlockHook) agentcore.StopGuard
- func NewWriterStopGuard(st *store.Store, onBlock BlockHook) agentcore.StopGuard
- type BlockHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewArchitectStopGuard ¶
NewArchitectStopGuard 要求 architect 本轮至少落盘一次 save_foundation。
func NewEditorStopGuard ¶
NewEditorStopGuard 要求 editor 本轮落盘与"任务"匹配的产物后才能结束。
任务感知:被派去生成摘要时,仅 save_review(复核)不算完成——必须产出对应摘要。 否则"被派生成弧摘要却先复核"的 editor 会满足旧的宽松判据提前结束,弧摘要永不落盘 (配合 dispatcher 去重哑火曾导致卷中骨架弧死循环,详见 outline-exhaustion-livelock)。 StopAfterTool 退出会绕过 StopGuard(loop.go),故 build.go 同步把 save_review 移出硬停, 让复核后能继续走到摘要工具,再由本 guard 把关收尾。
func NewStopGuard ¶
NewStopGuard 构造 Coordinator 专用 StopGuard。 onBlock 可选,非 nil 时每次阻拦调一次(agent 恒为 "coordinator"),用于审计与 TUI 浮出。
Types ¶
type BlockHook ¶ added in v0.6.2
BlockHook 是 StopGuard 的审计回调:每次拦截/升级时同步调用。Host 用它把拦截 事实浮出到 TUI 事件流与离屏通知——否则拦截只进日志,用户在界面上只看到 "卡顿+token 变快",无从判断系统是在自愈还是在空转(issue #75)。 回调不参与 guard 决策。reason 取值:
- "blocked" 已注入催促消息,模型将继续推进
- "escalated" 连续空转超限,本轮 run 终止交回上层
- "hard_stop" provider 拒答(safety/content_filter),立即终止
Click to show internal directories.
Click to hide internal directories.