dsh-retrace 0.4.8 → 0.4.9

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.
@@ -204,7 +204,10 @@ return {
204
204
  if (!agent || typeof agent.status !== 'string' || agent.status !== 'running') return
205
205
  if (typeof agent.cancel === 'function' && typeof agent.whenIdle === 'function') {
206
206
  try {
207
- agent.cancel({ kind: 'plugin-retrace-edit' })
207
+ // 官方 AgentCancelCause 类型只有 user/parent/hook/disposed 四种
208
+ // (dsh-commands typert.host.js:166)——用 { kind: 'user' } 与 UI 停止按钮同义,
209
+ // 中断的 turn/end 会按官方语义记录 reason。
210
+ agent.cancel({ kind: 'user' })
208
211
  await agent.whenIdle()
209
212
  return
210
213
  } catch (error) {
package/lib/host-core.js CHANGED
@@ -195,7 +195,10 @@ export function createEditorApi(ctx, sessions, agents, log = () => {}, hooks = {
195
195
  if (!agent || typeof agent.status !== 'string' || agent.status !== 'running') return
196
196
  if (typeof agent.cancel === 'function' && typeof agent.whenIdle === 'function') {
197
197
  try {
198
- agent.cancel({ kind: 'plugin-retrace-edit' })
198
+ // 官方 AgentCancelCause 类型只有 user/parent/hook/disposed 四种
199
+ // (dsh-commands typert.host.js:166)——用 { kind: 'user' } 与 UI 停止按钮同义,
200
+ // 中断的 turn/end 会按官方语义记录 reason。
201
+ agent.cancel({ kind: 'user' })
199
202
  await agent.whenIdle()
200
203
  return
201
204
  } catch (error) {
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.8",
4
+ "version": "0.4.9",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/types/index.d.ts",