Repository navigation
fix: 插话一律立即 steer 并显示,不再缓存 - #7
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
agent.steer就是这两个语义:消息进 next-step inbox,dsh 显示成 steering 消息;插件不需要自己回显,也不该把消息先存起来。0.1.5在没有暂停点时把插话塞进插件队列,等下一个暂停点或 turn 结束后才补发,两条都落空。原因
release在没有暂停点时把消息塞进pendingMessages,靠下一个暂停点或agent/status转 idle 时的followup补发。改动
release不再缓存:挂着暂停点就放行并把消息并入该步;没有暂停点就立即agent.steer,由 dsh 在最近一步认领,空闲时 steer 自己开新 turn。pendingMessages队列、预放行与 idle 补发;release只返回released与delivered。next()抛错时,已并入的插话立即重新 steer,交回 dsh 的 inbox;没有活 agent 可投时写错误日志,不静默丢弃。inject增加agents,经ctx.get('agents')再退回ctx.agents取活 agent;agent/status与agent/pre-step载荷里的 agent 也记下来,热加载错过状态事件后仍能立即 steer。enabled、pausePoint两个字段,删除busy、pendingMessages与队列相关监听;agent/status只保留用来记住活 agent。busy与pendingMessageCount,删除「N 条已排入下一步」提示。测试
pnpm typecheck、pnpm test49 项 4 个文件全过、pnpm build通过。兼容性
ctx.get('agents')、ctx.agents与Agent.steer()、Agent.inbox,升级 dsh 时需复查。检查清单