ralphflow-dsh 2.3.1 → 2.4.1

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.
Files changed (87) hide show
  1. package/README.md +48 -22
  2. package/graphs/codewiki/format.md +362 -0
  3. package/graphs/codewiki/graph.yaml +39 -0
  4. package/graphs/codewiki/nodes/assemble.md +24 -0
  5. package/graphs/codewiki/nodes/core-pages.md +17 -0
  6. package/graphs/codewiki/nodes/module-pages.md +18 -0
  7. package/graphs/codewiki/nodes/operations-pages.md +18 -0
  8. package/graphs/codewiki/nodes/survey.md +22 -0
  9. package/lib/asset-path.d.ts +59 -0
  10. package/lib/asset-path.js +181 -0
  11. package/lib/assets.d.ts +42 -0
  12. package/lib/assets.js +86 -0
  13. package/lib/client/phase.d.ts +29 -0
  14. package/lib/client/phase.js +86 -0
  15. package/lib/client/selection.d.ts +28 -0
  16. package/lib/client/selection.js +9 -0
  17. package/lib/client/status-source.d.ts +3 -1
  18. package/lib/client/status-source.js +3 -2
  19. package/lib/client/status.js +49 -13
  20. package/lib/client/viewer.d.ts +18 -0
  21. package/lib/client/viewer.js +540 -0
  22. package/lib/client.js +1159 -64
  23. package/lib/engine.d.ts +111 -47
  24. package/lib/engine.js +473 -320
  25. package/lib/facade.d.ts +175 -0
  26. package/lib/facade.js +553 -0
  27. package/lib/graph/agent-registry.d.ts +4 -0
  28. package/lib/graph/agent-registry.js +20 -0
  29. package/lib/graph/asset.d.ts +47 -0
  30. package/lib/graph/asset.js +276 -0
  31. package/lib/graph/assets.d.ts +47 -0
  32. package/lib/graph/assets.js +224 -0
  33. package/lib/graph/branches.d.ts +9 -0
  34. package/lib/graph/branches.js +13 -0
  35. package/lib/graph/check.d.ts +23 -0
  36. package/lib/graph/check.js +46 -0
  37. package/lib/graph/engine.d.ts +55 -0
  38. package/lib/graph/engine.js +2002 -0
  39. package/lib/graph/report.d.ts +9 -0
  40. package/lib/graph/report.js +117 -0
  41. package/lib/graph/state.d.ts +244 -0
  42. package/lib/graph/state.js +358 -0
  43. package/lib/graph/workspace.d.ts +68 -0
  44. package/lib/graph/workspace.js +262 -0
  45. package/lib/index.d.ts +11 -1
  46. package/lib/index.js +156 -49
  47. package/lib/owner.d.ts +34 -0
  48. package/lib/owner.js +49 -0
  49. package/lib/paths.d.ts +12 -0
  50. package/lib/paths.js +44 -0
  51. package/lib/pause.d.ts +12 -0
  52. package/lib/pause.js +19 -0
  53. package/lib/skills.d.ts +17 -30
  54. package/lib/skills.js +85 -21
  55. package/lib/status-contract.d.ts +114 -1
  56. package/lib/status-contract.js +106 -4
  57. package/lib/status-service.d.ts +5 -1
  58. package/lib/status-service.js +8 -1
  59. package/lib/tools.d.ts +14 -6
  60. package/lib/tools.js +88 -60
  61. package/lib/unfinished.d.ts +11 -0
  62. package/lib/unfinished.js +18 -0
  63. package/lib/verifier-preset.d.ts +40 -0
  64. package/lib/verifier-preset.js +126 -0
  65. package/lib/verify.d.ts +82 -13
  66. package/lib/verify.js +382 -95
  67. package/package.json +50 -38
  68. package/skills/ralphflow-create/SKILL.md +32 -0
  69. package/skills/ralphflow-create/graph-authoring.md +85 -0
  70. package/skills/ralphflow-create/matt/LICENSE +21 -0
  71. package/skills/ralphflow-create/matt/SHA256SUMS +6 -0
  72. package/skills/ralphflow-create/matt/SKILL-MECHANICS.md +22 -0
  73. package/skills/ralphflow-create/matt/SOURCE.md +12 -0
  74. package/skills/ralphflow-create/matt/grilling.md +30 -0
  75. package/skills/ralphflow-create/matt/to-spec.md +75 -0
  76. package/skills/ralphflow-create/matt/to-tickets.md +105 -0
  77. package/skills/ralphflow-create/matt/writing-for-agents.md +81 -0
  78. package/skills/ralphflow-create/ralphflow-authoring.md +31 -0
  79. package/skills/ralphflow-create/testing-workflow.md +60 -0
  80. package/{references → skills/ralphflow-create}/workflow-authoring.md +25 -5
  81. package/workflows/create-graph/steps/graph.md +17 -0
  82. package/workflows/create-graph/workflow.yaml +77 -0
  83. package/workflows/loop/workflow.yaml +23 -0
  84. package/lib/create.d.ts +0 -2
  85. package/lib/create.js +0 -17
  86. package/workflows/loop.yaml +0 -45
  87. /package/workflows/{spec.yaml → spec/workflow.yaml} +0 -0
package/lib/engine.d.ts CHANGED
@@ -1,18 +1,17 @@
1
+ import { type PauseReason } from "./pause.js";
1
2
  import type { WorkflowStatus } from "./status-contract.js";
2
3
  import type { WorkflowUiRef } from "./message-source.js";
3
4
  import { MAX_VOTERS, formatVotingFailureReason, formatVotingInfraReason, formatVotingPassReason, voterProgressLine, voterStatusLabel } from "./voting.js";
4
5
  export { MAX_VOTERS };
5
6
  export { formatVotingFailureReason, formatVotingPassReason, formatVotingInfraReason, voterProgressLine, voterStatusLabel };
6
7
  /**
7
- * 工作区内的运行时根目录。**工作区 dot-dir**(§1.8):与 opencode `.opencode/ralph-flow/`、
8
- * claude `.claude/ralph-flow/` 形状一致;全局命名空间 `~/.dsh/ralph-flow/` 由
9
- * {@link RALPH_FLOW_NAME} 拼出,两个作用域里的插件命名空间都叫 `ralph-flow`。
8
+ * 项目内的运行时根目录。**项目根 dot-dir**(§1.8):项目根 = 最近的含 `.git` 的祖先目录,
9
+ * 与原生 Skill 的 `<projectRoot>/.dsh/skills` 用同一条规则;用户级命名空间
10
+ * `<DSH_HOME>/ralph-flow/` 由 `paths.ts` 解析。
10
11
  *
11
- * 注意:这里是**工作区相对路径**(含 `/`),`path.join(workspace, RALPH_FLOW_DIR)` 仍成立。
12
+ * 注意:这里是**项目根相对路径**(含 `/`),`path.join(projectRoot, RALPH_FLOW_DIR)` 仍成立。
12
13
  */
13
14
  export declare const RALPH_FLOW_DIR = ".dsh/ralph-flow";
14
- /** 插件命名空间名(全局 `~/.dsh/<name>/...`)——与工作区内 `.dsh/<name>/` 对称 */
15
- export declare const RALPH_FLOW_NAME = "ralph-flow";
16
15
  /**
17
16
  * 执行日志(JSONL)轮转参数 —— 照 opencode:单文件上限 **10 MB**、保留 **3** 份
18
17
  * (`execution.log.1` / `.2` / `.3`,最旧的删除)。见 docs/v2/execution-log-brief.md §3.3。
@@ -159,6 +158,15 @@ export interface StepDef {
159
158
  * 纯措辞用途:对行为零影响(`stepWantsReset` 仍为真,替换照做)。
160
159
  */
161
160
  reset_from_call?: string;
161
+ /**
162
+ * **内部字段**(作者不可写;加载解析不从 YAML 读它,`KNOWN_STEP_KEYS` 不含它):
163
+ * 本步引用资源的入口文件。**子工作流静态展开时**由 `prefixSubWorkflowSteps` 填成子工作流
164
+ * 自己的 `workflow.yaml`;普通步骤留空,按所在工作流的 `assetPath` 解析。
165
+ *
166
+ * 展开后「子工作流」对象已不存在,只有步骤;不把子资产路径带下来,DO/CHECK 会错用父级
167
+ * 参考根,子工作流目录里的 `notes.md` / `format.md` 这类资源不可达。
168
+ */
169
+ assetPath?: string;
162
170
  }
163
171
  /** 投票条目(`check_voting[i]`):一条检查依据 +(可选)该票专用模型 */
164
172
  export interface CheckVotingEntry {
@@ -201,8 +209,8 @@ export declare function stepHasCheck(step: Pick<StepDef, "check">): boolean;
201
209
  /**
202
210
  * 本步是否配置了**任何**对抗性检查:单 `check` 或多验证者投票(`check_voting`)。
203
211
  *
204
- * 这是「本步是否需要独立验证」的**唯一判据**(取代原先只看 `check` 的写法):
205
- * 两者都不写 → 跳过对抗性验证(manual 步骤 = 纯人工审查)。
212
+ * 这是「本步是否需要独立验证」的**唯一判据**:单 `check` 与 `check_voting` 任一存在
213
+ * 就委派验证者;两者都不写 → 跳过对抗性验证(manual 步骤 = 纯人工审查)。
206
214
  */
207
215
  export declare function stepHasVerification(step: Pick<StepDef, "check" | "check_voting">): boolean;
208
216
  /** 校验通过的投票票数(0 = 不是投票步);上限 {@link MAX_VOTERS} 照抄 opencode */
@@ -315,6 +323,14 @@ export interface SubWorkflowLoadCtx {
315
323
  }
316
324
  export interface WorkflowDef {
317
325
  name: string;
326
+ /**
327
+ * 资产的入口文件路径(目录形态是 `<name>/workflow.yaml`,单文件形态是 `<name>.yaml`)。
328
+ *
329
+ * 参考根由它推导({@link assetRootOf} → 所在目录);**只解析资产资源的相对引用**,要写出
330
+ * 的交付物仍按 `output` / 产出目录的落点。步骤若有自己的 `assetPath`(子工作流展开),以步骤为准
331
+ * (见 {@link assetPathOfStep})。路径缺失(历史定义、测试桩)时提示词不带「资产目录」一节。
332
+ */
333
+ assetPath?: string;
318
334
  description?: string;
319
335
  /**
320
336
  * 审查门步骤(方言形态:**顶层** id 列表,与 `steps` 同级)。
@@ -349,6 +365,15 @@ export interface Verdict {
349
365
  agent_id?: string;
350
366
  step_id: string;
351
367
  ts: string;
368
+ /** Graph CHECK:逐条判据的取证(Flow 不用)。 */
369
+ evidence?: Array<{
370
+ criterion: string;
371
+ passed: boolean;
372
+ evidence: string;
373
+ }>;
374
+ /** Graph CHECK:判定属于哪个节点 / attempt(一套判定账本,靠 scope 区分)。 */
375
+ node_id?: string;
376
+ attempt_id?: string;
352
377
  }
353
378
  export interface Delegation {
354
379
  run_id: string;
@@ -363,37 +388,16 @@ export interface Delegation {
363
388
  */
364
389
  attempt?: number;
365
390
  ts: string;
366
- /**
367
- * 属主运行时 id(`<pid>-<装载时刻>-<rand>`):**只作诊断**,不参与判活。
368
- *
369
- * 为什么不用 pid 判活(第一版就是这么写的,被实测打回):本部署里各 agent 进程跑在
370
- * 各自的 sandbox 里,有**独立的 PID namespace 与 /proc 视图** —— 实测宿主进程
371
- * `pid 919449` 明明活着,另一个进程(验证者的沙箱)`kill(919449, 0)` 拿到 `ESRCH`、
372
- * `/proc/uptime` 也对不上,于是把活着的属主判成死的,照样把在飞验证清掉。
373
- * 跨沙箱唯一可靠共享的是**文件系统**,所以判活改用心跳(见下)。
374
- */
375
- owner_runtime?: string;
376
- /**
377
- * 属主心跳时刻(epoch ms)—— **判孤儿的唯一依据**:属主在等判定期间每
378
- * {@link DELEGATION_HEARTBEAT_REFRESH_MS} 刷一次;超过 {@link DELEGATION_HEARTBEAT_TTL_MS}
379
- * 没刷 = 属主已经不在了(进程崩溃/被重启),判定永远回不来。
380
- *
381
- * 缺这个字段 = 来源不可考的老 `state.json`(或旧版插件落的账)→ 按孤儿兜底。
382
- */
383
- heartbeat_at?: number;
384
391
  }
385
- /** 在飞委派的心跳周期:属主每隔这么久把 `heartbeat_at` 刷新一次 */
386
- export declare const DELEGATION_HEARTBEAT_REFRESH_MS = 5000;
387
392
  /**
388
- * 心跳多久没刷就算属主失联(= 真孤儿)。
393
+ * 回合收尾检查的阈值。只在「这一轮没干活」时才算数 —— 模型每轮都在动手就是在推进,
394
+ * 不该被次数掐断(opencode 版同形:`MAX_DO_REINJECT` 只在 `!hasToolUse` 时生效)。
389
395
  *
390
- * 取 12 倍刷新周期:既容忍属主事件循环偶发卡顿(一次两次没刷上不算死),又让崩溃留下的
391
- * 孤儿在一个 TTL 之内被兜住 —— 崩溃恢复没有缩水,只是判据从「pid 还在吗」换成「心跳还在吗」。
396
+ * `STALL` 只累计**连续空回合**:一次提醒之后模型一个工具都没调用,又停了一次。连续这么多次,
397
+ * 多半是在等人或卡住了,先暂停让用户处理。有动作的回合把连续计数清零;没有累计总预算 —
398
+ * 干活的循环不设天花板,单次停顿也不会因为「历史提醒多」而被立刻暂停。
392
399
  */
393
- export declare const DELEGATION_HEARTBEAT_TTL_MS = 60000;
394
- export declare function runtimeId(): string;
395
- /** 一笔委派是否仍有存活属主 —— `restore()` 的唯一判据(导出供测试直接取证)。 */
396
- export declare function delegationOwnerAlive(d: Delegation): boolean;
400
+ export declare const SUBMIT_REMINDER_STALL_LIMIT = 2;
397
401
  export interface HistoryEntry {
398
402
  ts: string;
399
403
  step?: string;
@@ -407,10 +411,8 @@ export interface HistoryEntry {
407
411
  * 耗时区间 = 属于某步的**第一条**历史事件 → 下一条属于其它步骤的事件(或 `endTs`);
408
412
  * 同一被反复进入的步骤(返工/回退)累计总时长。
409
413
  *
410
- * ⚠️ 这里曾经有一个只在「步骤切换」时才结算的实现:最后一步的耗时被算成
411
- * `endTs - 该步最后一条事件`,而最后一条事件(`complete`)与 `endTs` 只差几毫秒
412
- * —— 于是**每一步都显示 `耗时 0s`**(实测:6m22s 的一轮报告成 0s,历史上每一份
413
- * 归档报告都是 0s)。区间起点必须是该步的**首条**事件,不是末条。
414
+ * 区间起点必须是该步的**首条**事件:取末条事件时,最后一步只剩 `complete` 与
415
+ * `endTs` 之间几毫秒,报告会显示 `耗时 0s`。
414
416
  *
415
417
  * 重试次数 = `max(fail_counts[step], 该步 verdict_failed 条数)`:
416
418
  * 通过时 `clearFailCount` 会把该步计数清零、恢复暂停时也会清零,所以单看
@@ -440,10 +442,17 @@ export interface InstanceState {
440
442
  */
441
443
  fail_count: number;
442
444
  paused: boolean;
443
- pause_reason?: "max_failures" | "check_infra" | "user_cancelled" | "no_submit";
445
+ pause_reason?: PauseReason;
444
446
  /** 本轮 DO 是否已交卷(引擎观测到的事实) */
445
447
  do_submitted: boolean;
446
448
  owner_session?: string;
449
+ /**
450
+ * 属主运行时与心跳(原始事实,落盘)。心跳只在「有运行时在推进」时刷新:
451
+ * DO 中或验证中;暂停/审查门不刷新(它们本来就该被任何 host 接管)。
452
+ * 判活规则见 `owner.ts`;缺字段 = 旧状态,按已死处理。
453
+ */
454
+ owner_runtime?: string;
455
+ owner_heartbeat_at?: number;
447
456
  /** 交卷时的助手回复摘要(验证者 prompt 用) */
448
457
  last_submit_summary?: string;
449
458
  /**
@@ -492,6 +501,8 @@ export interface WorkflowEntry {
492
501
  invalid: boolean;
493
502
  problems: string[];
494
503
  warnings: string[];
504
+ /** 步骤数(加载成功时的 steps.length;失败为 0)。统一资产清单用。 */
505
+ steps?: number;
495
506
  }
496
507
  export interface ToolResult {
497
508
  ok: boolean;
@@ -570,6 +581,23 @@ export interface EnginePorts {
570
581
  }) => boolean;
571
582
  /** Observe committed facts only; failures of this observer never affect the engine. */
572
583
  statusChanged?: () => void;
584
+ /**
585
+ * 本会话**最近一次工具调用**的时间(epoch ms)。回合收尾检查用它区分「在干活」和「空回合」:
586
+ * 上次提醒之后有工具调用 = 有动作,不累计空回合,也就不会被 `SUBMIT_REMINDER_STALL_LIMIT` 暂停。
587
+ *
588
+ * 这是**进程内**的观察值,不落盘:宿主重启后第一条提醒会按空回合计(最多多催一次)。
589
+ * 缺省(未装配)时一律按空回合处理 —— 与只按次数计数的老行为一致。
590
+ */
591
+ lastActionAt?: (sessionId: string) => number | undefined;
592
+ /**
593
+ * 引擎自己报一次「有动作」(进度记录 = 一次实质交卷),写回同一个观察值。
594
+ *
595
+ * 为什么模型侧要能写这条:宿主只在 `tool/call` 上报动作,而 `ralphflow_submit` 被**排除**在外
596
+ * (否则连续空交卷会把空回合计数清零)。但「带未完成项的进度记录」不是空交卷 —— 模型确实
597
+ * 交了一次本轮结论,回执也让它接着做。不记这一笔,紧接着的提醒就会说「上次提醒之后没有任何
598
+ * 工具调用」,那是**假话**,而且会把这一轮算成空回合。
599
+ */
600
+ noteAction?: (sessionId: string, time: number) => void;
573
601
  /**
574
602
  * 把该会话**挂起的播报**在安全边界补齐(可见面尾部工具配对平衡时才落)。
575
603
  *
@@ -596,6 +624,30 @@ export interface EnginePorts {
596
624
  */
597
625
  logMaxBytes?: number;
598
626
  }
627
+ /**
628
+ * Graph CHECK 的事实输入。**执行者自述仍然不进来**(T1):这里只有任务、判据、冻结产物、
629
+ * 声明输入与工作区变更快照。判定由 `verify.ts` 的同一条验证者运行时产生。
630
+ */
631
+ export interface GraphVerifyScope {
632
+ nodeId: string;
633
+ attemptId: string;
634
+ doInstruction: string;
635
+ artifact: {
636
+ path: string;
637
+ sha256: string;
638
+ size: number;
639
+ } | null;
640
+ inputs: Array<{
641
+ label: string;
642
+ path: string;
643
+ }>;
644
+ workspacePath?: string;
645
+ workspaceChangesPath?: string;
646
+ criteriaText: string;
647
+ criteria: string[];
648
+ checkMode: "custom";
649
+ checkVersion: string;
650
+ }
599
651
  export interface VerifyRequest {
600
652
  instId: string;
601
653
  step: StepDef;
@@ -631,6 +683,17 @@ export interface VerifyRequest {
631
683
  providerID: string;
632
684
  modelID: string;
633
685
  };
686
+ /**
687
+ * Graph CHECK 的事实范围。有它时验证者提示词走 Graph 变体(判据逐条取证),
688
+ * 判定仍由 `ports.verify` 返回;Flow 请求不写它,行为逐字不变。
689
+ */
690
+ graph?: GraphVerifyScope;
691
+ /**
692
+ * 资产入口文件路径(子工作流展开后的步骤用它自己的入口)。参考根 = 它所在目录;CHECK
693
+ * 提示词据此注入与 DO **同一段**「资产目录」,判据才允许写成「按 `format.md` 的 schema」
694
+ * 这种短指针 —— 验证者自己读得到。该根**只解析资产资源**;要写出的交付物仍按产出目录。
695
+ */
696
+ assetPath?: string;
634
697
  /**
635
698
  * 取消句柄(dsh 委派契约要求的 "caller's cancellation";不是超时预算)
636
699
  *
@@ -657,7 +720,7 @@ export interface VerifyRequest {
657
720
  *
658
721
  * 这些是「引擎只在运行时才暴露、甚至永远不暴露」的问题:
659
722
  * · 不可达步骤静默不执行;
660
- * · 没有可达步骤能到 `done` → 工作流永远不完成(旧版 doctor 还报 ✅,运行时无限循环);
723
+ * · 没有可达步骤能到 `done` → 工作流永远不完成;
661
724
  * · 未解析的 `{{...}}` 原样进入提示词;
662
725
  * · 非 manual 步没写 check → 该步**跳过对抗性验证**、直接推进(必须让作者知道)。
663
726
  */
@@ -679,7 +742,7 @@ export declare function formatDuration(ms: number): string;
679
742
  */
680
743
  export declare function makeArtifactsDirName(task: string, instId: string): string;
681
744
  /**
682
- * 内置工作流文件(不落盘,只存在于插件目录;lib/engine.js → ../workflows/<name>.yaml)。
745
+ * 内置工作流资产(不落盘,只存在于插件目录;lib/engine.js → ../workflows/<name>/workflow.yaml)。
683
746
  *
684
747
  * 取模块目录**必须**用 `fileURLToPath`:`new URL(import.meta.url).pathname` 不做百分号解码,
685
748
  * Windows 上还给出 `/C:/…`(盘符前多一个 `/`,`path.resolve` 之后盘符变成一个**字面目录名**)。
@@ -690,17 +753,17 @@ export declare function makeArtifactsDirName(task: string, instId: string): stri
690
753
  * ASCII 字符时才会暴露 —— 回归见 `scripts/builtin-workflow-path-test.mjs`。
691
754
  */
692
755
  export declare function builtinWorkflowPath(name: string): string | undefined;
693
- /** 全局工作流目录:`<DSH_HOME|~/.dsh>/ralph-flow/workflows` */
756
+ /** 用户级工作流目录:`<DSH_HOME|~/.dsh>/ralph-flow/workflows` */
694
757
  export declare function globalWorkflowsDirOf(): string;
695
758
  /**
696
- * 只读某个工作区(+ 全局目录 + 内置)里**全部工作流的名字与描述** —— 不建引擎、不建任何目录。
759
+ * 只读某个项目根(+ 用户级目录 + 内置)里**全部工作流的名字与描述** —— 不建引擎、不建任何目录。
697
760
  *
698
761
  * 动态快捷命令 `/ralphflow-<名字>` 在插件加载时登记,而引擎是按工作区**惰性**创建的
699
- * (首个工具调用才建)。只靠引擎的话,用户在新工作区里第一次打开会话时,自己建的工作流
762
+ * (首个工具调用才建)。只靠引擎的话,用户在新项目里第一次打开会话时,自己建的工作流
700
763
  * 还没有快捷命令。这个函数让登记可以在 `session/created` 时廉价完成(纯读目录)。
701
764
  *
702
765
  * **必须包含内置工作流**(`loop`/`spec`)——它们不落盘,只存在于插件目录,漏掉就会让
703
- * `/ralphflow-loop`、`/ralphflow-spec` 消失。工作区里的同名文件遮蔽内置(有意行为)。
766
+ * `/ralphflow-loop`、`/ralphflow-spec` 消失。项目根里的同名文件遮蔽内置(有意行为)。
704
767
  */
705
768
  export declare function listWorkflowsIn(workspace: string): Array<{
706
769
  name: string;
@@ -732,13 +795,14 @@ export declare function createEngine(projectDir: string, ports: EnginePorts): {
732
795
  instanceDir: string;
733
796
  } | null;
734
797
  start: (workflowName: string, task: string, sessionId: string) => ToolResult;
735
- onSubmit: (sessionId: string, summary?: string) => ToolResult;
798
+ onSubmit: (sessionId: string, summary?: string, unfinished?: string[]) => ToolResult;
736
799
  noteAssistantText: (sessionId: string, text: string) => void;
737
800
  remindToSubmit: (sessionId: string) => {
738
801
  remind: boolean;
739
802
  message?: string;
740
803
  summary?: string;
741
804
  };
805
+ pauseForUserStop: (sessionId: string) => ToolResult;
742
806
  continueInstance: (sessionId: string, instanceRef?: string) => ToolResult;
743
807
  resetCurrent: (sessionId: string) => ToolResult;
744
808
  rewindTo: (sessionId: string, targetRef: string, reason?: string) => ToolResult;