refactor(agent): complete inbox lifecycle migration
This commit is contained in:
@@ -2,5 +2,5 @@
|
||||
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
||||
# after editing either side, bring the other along and re-record with:
|
||||
# pnpm run verify-translation-pairing --write packages/goal/goal/README.md
|
||||
README.md: caf01b3d2a088281749a73b78b839d60ac041316
|
||||
README.zh.md: de92b8b9d7757f80511fe128644738ebe2458af1
|
||||
README.md: fc2a672c11c68ad72437251b087a274e1c4388d3
|
||||
README.zh.md: e84e8ea78039637a4b0bff7e97cef69ae607cda0
|
||||
|
||||
@@ -39,7 +39,7 @@ Policy plugins call the service verbs and react to the scoped `goal/changed` eve
|
||||
|
||||
#### What the model sees
|
||||
|
||||
Goal mutations do not inject model context. Goal tools return the current state, and a continuation consumer may render the objective and round state when it schedules model work. A future always-visible goal context belongs in a separate context plugin rather than the persistence path.
|
||||
Goal mutations do not inject model context. Tools such as `get_goal` return the current state, and a continuation consumer may render the objective and round state when it schedules model work. A future always-visible goal context belongs in a separate context plugin rather than the persistence path.
|
||||
|
||||
#### Token effect
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#### 模型看到的内容
|
||||
|
||||
Goal 变更不会注入模型上下文。Goal 工具返回当前状态;继续执行消费方可以在调度模型工作时渲染目标描述与 Round 状态。未来如果需要始终可见的 goal 上下文,应由独立上下文插件实现,而不是放在持久化路径中。
|
||||
Goal 变更不会注入模型上下文。`get_goal` 等工具返回当前状态;继续执行消费方可以在调度模型工作时渲染目标描述与 Round 状态。未来如果需要始终可见的 goal 上下文,应由独立上下文插件实现,而不是放在持久化路径中。
|
||||
|
||||
#### Token 影响
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ function stubAgentForSession(session: Session): StubAgent {
|
||||
steer: () => {},
|
||||
inject(input) { inbox.append('next-step', input) },
|
||||
cancel() {},
|
||||
runMaintenance: task => task(new AbortController().signal),
|
||||
whenIdle() { return Promise.resolve() },
|
||||
}
|
||||
return {
|
||||
|
||||
@@ -46,6 +46,7 @@ function liveAgent(ctx: Context, session: Session): Agent {
|
||||
inbox.append('next-step', input)
|
||||
},
|
||||
cancel() {},
|
||||
runMaintenance: task => task(new AbortController().signal),
|
||||
whenIdle() { return Promise.resolve() },
|
||||
}
|
||||
ctx.agents.register(agent)
|
||||
|
||||
Reference in New Issue
Block a user