dsh-retrace 0.4.17 → 0.4.18

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.
@@ -96,7 +96,12 @@ export function createDshMarkerWriter({ agents, validateMarker, readMaxStep, log
96
96
  ]
97
97
  wrappedAfter = [
98
98
  { type: 'step/end', data: { turn: markerTurn, step: 1 } },
99
- { type: 'turn/end', data: { turn: markerTurn } },
99
+ // 官方契约(逐字镜像 dsh-agent-loop/lib/index.js:620):turn/end 必须带
100
+ // reason.kind(completed|max-tokens|blocked|aborted|error|interrupted)——
101
+ // 缺失 = malformed → 官方 validation 拒绝 → 会话加载失败(1f4d986e 事故,
102
+ // 修复线 check-turn-end-reason.mjs 固化)。我们的信封 turn 立即完整关闭 →
103
+ // kind: 'completed'(与 agent-loop 正常完成一致)。
104
+ { type: 'turn/end', data: { turn: markerTurn, reason: { kind: 'completed' } } },
100
105
  ]
101
106
  }
102
107
  const data = {
@@ -544,7 +544,12 @@ return {
544
544
  ]
545
545
  wrappedAfter = [
546
546
  { type: 'step/end', data: { turn: markerTurn, step: 1 } },
547
- { type: 'turn/end', data: { turn: markerTurn } },
547
+ // 官方契约(逐字镜像 dsh-agent-loop/lib/index.js:620):turn/end 必须带
548
+ // reason.kind(completed|max-tokens|blocked|aborted|error|interrupted)——
549
+ // 缺失 = malformed → 官方 validation 拒绝 → 会话加载失败(1f4d986e 事故,
550
+ // 修复线 check-turn-end-reason.mjs 固化)。我们的信封 turn 立即完整关闭 →
551
+ // kind: 'completed'(与 agent-loop 正常完成一致)。
552
+ { type: 'turn/end', data: { turn: markerTurn, reason: { kind: 'completed' } } },
548
553
  ]
549
554
  }
550
555
  const data = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-retrace",
3
3
  "description": "Retrace · 回溯 — Recall, edit-and-resend, regenerate, and conversation/artifact versioning (timeline, rollback, fork map) for DeepSeek Harness — Web and Desktop",
4
- "version": "0.4.17",
4
+ "version": "0.4.18",
5
5
  "packageManager": "pnpm@11.7.0",
6
6
  "type": "module",
7
7
  "main": "lib/index.js",