@deepseek-ai/dsh-goal-round-driver 0.1.2-alpha.5 → 0.1.3-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/goal/goal-round-driver/README.md
5
- README.md: 18b086b9b2cef84861a54cbebda413cb1444d24f
6
- README.zh.md: ca38b5f6cc9e6a5292c91008321ea254a698f2b5
5
+ README.md: 8e6a31fe3e5e131611067ed95034a8b8cebb493a
6
+ README.zh.md: 5a70b585da727cb4f599495deeef4d860ff200b8
package/README.md CHANGED
@@ -50,7 +50,7 @@ With an exact live agent idle, an active armed goal, and remaining capacity, the
50
50
 
51
51
  ### When continuation stops
52
52
 
53
- A round starts only at whole-agent idle, and completion, pause, and blocking suppress continuation; an edit only invalidates an in-flight round through the revision fence, and the driver continues the new revision. The driver also stops on its own when a turn ends on max tokens, a durability write fails, the agent is cancelled, the plugin unloads, or the round cap is exhausted — at the cap it records a blocker with the stable code `round-limit`. Cancellation never auto-restarts a round: a goal whose round was under way or already queued is paused at the next idle point, and a cancellation unrelated to a goal attempt only disarms continuation.
53
+ A round starts only at whole-agent idle, and completion, pause, and blocking suppress continuation; a host-initiated pause also aborts the turn already running, while a model-initiated pause inside its own turn finishes normally. An edit only invalidates an in-flight round through the revision fence, and the driver continues the new revision. The driver also stops on its own when a turn ends on max tokens, a durability write fails, the agent is cancelled, the plugin unloads, or the round cap is exhausted — at the cap it records a blocker with the stable code `round-limit`. Cancellation never auto-restarts a round: a goal whose round was under way or already queued is paused at the next idle point, and a cancellation unrelated to a goal attempt only disarms continuation.
54
54
 
55
55
  ### After resume, fork, or unload
56
56
 
@@ -96,7 +96,6 @@ The driver consumes the goal state and defers policy to the goal tools; read the
96
96
 
97
97
  - [Goal service](../goal/README.md) — the goal state and lifecycle this driver continues.
98
98
  - [Goal tools](../tool-goal/README.md) — the model-facing tools and their execution-time authority checks.
99
- - [Same-session driver Agent Note](../../../.agents/notes/implemented/feature/2026-07-19-same-session-goal-round-driver.md) — the race and lifecycle rationale.
100
99
 
101
100
  -----
102
101
 
package/README.zh.md CHANGED
@@ -50,7 +50,7 @@ kind: "package-reference"
50
50
 
51
51
  ### 何时停止续行
52
52
 
53
- Round 只在整个 agent 进入 idle 时启动;完成、暂停和阻塞会阻止续行;编辑只会通过修订栅栏使进行中的 Round 失效,驱动器会继续新修订。驱动器也会在以下情况自行停止:轮次因 max tokens 结束、持久性写入失败、agent 被取消、插件卸载,或 Round 上限耗尽——上限耗尽时它会以稳定代码 `round-limit` 记录一个 blocker。取消绝不会自动重启 Round:Round 已在进行或已排入队列的 goal 会在下一次 idle 时被暂停;与 goal 尝试无关的取消只会停用续行。
53
+ Round 只在整个 agent 进入 idle 时启动;完成、暂停和阻塞会阻止续行;宿主发起的暂停还会中止正在运行的轮次,而模型在自己轮次内发起的暂停会正常结束。编辑只会通过修订栅栏使进行中的 Round 失效,驱动器会继续新修订。驱动器也会在以下情况自行停止:轮次因 max tokens 结束、持久性写入失败、agent 被取消、插件卸载,或 Round 上限耗尽——上限耗尽时它会以稳定代码 `round-limit` 记录一个 blocker。取消绝不会自动重启 Round:Round 已在进行或已排入队列的 goal 会在下一次 idle 时被暂停;与 goal 尝试无关的取消只会停用续行。
54
54
 
55
55
  ### resume、fork 或卸载之后
56
56
 
@@ -96,7 +96,6 @@ Round 只在整个 agent 进入 idle 时启动;完成、暂停和阻塞会阻
96
96
 
97
97
  - [goal 服务](../goal/README.zh.md)——本驱动器继续推进的 goal 状态与生命周期。
98
98
  - [goal 工具](../tool-goal/README.zh.md)——面向模型的工具及其执行时权限检查。
99
- - [同会话驱动器 Agent Note](../../../.agents/notes/implemented/feature/2026-07-19-same-session-goal-round-driver.zh.md)——竞态与生命周期理由。
100
99
 
101
100
  -----
102
101
 
package/lib/index.js CHANGED
@@ -219,7 +219,7 @@ function apply(ctx) {
219
219
  state.competingQueued = false;
220
220
  const attempt = state.attempt;
221
221
  const goal = currentGoal(state);
222
- if ((attempt?.phase === "queued" || attempt?.phase === "claimed" || attempt?.cancelled) && goal?.phase === "active" && goal.activation === "armed") {
222
+ if (attempt !== void 0 && (attempt.phase === "queued" || attempt.phase === "claimed" || attempt.cancelled) && goal !== void 0 && goal.phase === "active" && goal.activation === "armed" && attempt.goalId === goal.id && attempt.revision === goal.revision) {
223
223
  state.attempt = void 0;
224
224
  try {
225
225
  ctx.goals.pause(agent, goalRef(goal));
@@ -231,9 +231,10 @@ function apply(ctx) {
231
231
  requestDrive(state);
232
232
  }
233
233
  });
234
- ctx.on("goal/changed", ({ agent }) => {
234
+ ctx.on("goal/changed", ({ agent, change }) => {
235
235
  const state = stateFor(agent);
236
236
  state.needsCheckpoint = true;
237
+ if (change.operation === "pause" && agent.status === "running" && ctx.agents.currentInitiator() !== agent) agent.cancel({ kind: "user" }, { keepInbox: true });
237
238
  requestDrive(state);
238
239
  });
239
240
  ctx.on("agent/inbox/inserted", ({ agent, message }) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-goal-round-driver",
3
3
  "description": "Race-fenced same-session goal-round driver",
4
- "version": "0.1.2-alpha.5",
4
+ "version": "0.1.3-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,24 +32,24 @@
32
32
  ],
33
33
  "license": "MIT",
34
34
  "peerDependencies": {
35
- "@deepseek-ai/dsh-goal": "^0.1.2-alpha.5",
36
- "@deepseek-ai/dsh-agent": "^0.1.2-alpha.5",
37
- "@deepseek-ai/dsh-session": "^0.1.2-alpha.5",
38
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.5",
39
- "@deepseek-ai/cordis": "^4.0.2",
40
- "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.5"
35
+ "@deepseek-ai/dsh-invariants": "^0.1.3-alpha.2",
36
+ "@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
37
+ "@deepseek-ai/dsh-goal": "^0.1.3-alpha.2",
38
+ "@deepseek-ai/dsh-agent": "^0.1.3-alpha.2",
39
+ "@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
40
+ "@deepseek-ai/cordis": "^4.0.2"
41
41
  },
42
42
  "devDependencies": {
43
- "@deepseek-ai/dsh-agent": "^0.1.2-alpha.5",
44
- "@deepseek-ai/dsh-agent-loop": "^0.1.2-alpha.5",
45
- "@deepseek-ai/dsh-agent-loop-testkit": "^0.1.2-alpha.5",
46
- "@deepseek-ai/dsh-goal": "^0.1.2-alpha.5",
47
- "@deepseek-ai/dsh-invariants": "^0.1.2-alpha.5",
48
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.5",
49
- "@deepseek-ai/dsh-session": "^0.1.2-alpha.5",
50
- "@deepseek-ai/dsh-tools": "^0.1.2-alpha.5",
43
+ "@deepseek-ai/dsh-agent-loop": "^0.1.3-alpha.2",
44
+ "@deepseek-ai/dsh-agent": "^0.1.3-alpha.2",
45
+ "@deepseek-ai/dsh-goal": "^0.1.3-alpha.2",
46
+ "@deepseek-ai/dsh-agent-loop-testkit": "^0.1.3-alpha.2",
47
+ "@deepseek-ai/dsh-llm": "^0.1.3-alpha.2",
48
+ "@deepseek-ai/dsh-invariants": "^0.1.3-alpha.2",
49
+ "@deepseek-ai/dsh-session": "^0.1.3-alpha.2",
50
+ "@deepseek-ai/dsh-system-prompt": "^0.1.3-alpha.2",
51
+ "@deepseek-ai/dsh-tools": "^0.1.3-alpha.2",
51
52
  "@deepseek-ai/cordis": "^4.0.2",
52
- "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.5",
53
- "@deepseek-ai/dsh-session-projection": "^0.1.2-alpha.5"
53
+ "@deepseek-ai/dsh-session-projection": "^0.1.3-alpha.2"
54
54
  }
55
55
  }