@deepseek-ai/dsh-tool-ralph 0.0.1-rc.2 → 0.0.1-rc.5

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/workflow/tool-ralph/README.md
5
- README.md: d5389a08cf4aa63d6f00939f5dafab421816bf4a
6
- README.zh.md: 92c3256188d9b4c38a292ba7697f702dc46db737
5
+ README.md: ae9d7c80763f751860bc2073950dde331fdd5a8e
6
+ README.zh.md: 692ebb693b54ade2c2fbde18f818ced10e9d5863
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [中文](README.zh.md)
4
4
 
5
- The model-facing `ralph` tool runs a fixed foreground workflow that gives one immutable objective to a sequence of fresh child agents. It demonstrates a specialized orchestration policy as an ordinary plugin over [`ctx.workflows`](../workflow/README.md) and [`ctx.subagents`](../../subagent/subagent/README.md): no Ralph mode or fresh-agent loop is added to `agent-loop`, and the same-session [goal domain](../../goal/goal/README.md) remains independent. The [Ralph Agent Note](../../../.agents/notes/implemented/feature/2026-07-19-fresh-agent-ralph-workflow-tool.md) owns the policy and deferred work.
5
+ The model-facing `ralph` tool runs a fixed foreground workflow that gives one immutable objective to a sequence of fresh child agents. It demonstrates a specialized orchestration policy as an ordinary plugin over [`ctx.workflowEngine`](../workflow/README.md) and [`ctx.subagents`](../../subagent/subagent/README.md): no Ralph mode or fresh-agent loop is added to `agent-loop`, and the same-session [goal domain](../../goal/goal/README.md) remains independent. The [Ralph Agent Note](../../../.agents/notes/implemented/feature/2026-07-19-fresh-agent-ralph-workflow-tool.md) owns the policy and deferred work.
6
6
 
7
7
  ## Contract
8
8
 
@@ -44,7 +44,7 @@ Every parent request in this plugin's registration scope receives the fixed rout
44
44
  ##### Ralph guidance
45
45
 
46
46
  ```markdown
47
- Use the ralph tool ONLY when the direct human explicitly asks for a Ralph loop or fresh-agent iterative execution. Each Ralph round starts a fresh child with no conversation seed and uses the shared workspace as durable memory. Completion and blockers are worker reports, not independent evaluation. Use same-session goal tools for ordinary long-running objectives, and plain subagents or workflows for bounded delegation and fan-out.
47
+ Use the ralph tool ONLY when the direct human explicitly asks for a Ralph loop or fresh-agent iterative execution. Each Ralph round starts a fresh child with no conversation seed and uses the shared workspace as durable memory. Completion and blockers are worker reports, not independent evaluation. Use same-session goal tools for ordinary long-running objectives, and plain subagents or workflowEngine for bounded delegation and fan-out.
48
48
  ```
49
49
 
50
50
  #### Token effect
@@ -86,7 +86,7 @@ Each fresh child has an independent request cache. The parent result appends aft
86
86
  ## Known Limitations and Deferred Work
87
87
 
88
88
  - **Completion is worker self-declaration** — there is no independent evaluator or verifier deciding whether the objective is actually complete; evaluator policy and evaluator-driven continuation are deferred.
89
- - **Foreground only** — there is no task id, background collection, process-resume checkpoint, scheduler, or wall-clock start policy.
89
+ - **Foreground only** — there is no job id, background collection, process-resume checkpoint, scheduler, or wall-clock start policy.
90
90
  - **The workspace is the only cross-round long-term memory** — one bounded report is the explicit handoff, and uncommitted conversational reasoning disappears with each child.
91
91
  - **One round is one fresh child** — there is no within-round fan-out, model/provider switching, fork context, or model-call-selected provider.
92
92
  - **Ordinary child failure is terminal for the run** — the fixed script reports the failed round and last successful handoff but does not retry; fatal workflow infrastructure failures can end before that state is returned.
package/README.zh.md CHANGED
@@ -2,9 +2,9 @@
2
2
 
3
3
  [English](README.md) | 中文
4
4
 
5
- 面向模型的 `ralph` 工具运行固定的前台工作流,把一个不可变目标依次交给多个全新子 agent(智能体)。它展示如何把专用编排策略实现为基于 [`ctx.workflows`](../workflow/README.md) 和 [`ctx.subagents`](../../subagent/subagent/README.md) 的普通插件:不会向 `agent-loop` 添加 Ralph 模式或全新 agent loop(智能体循环),同会话的[目标领域](../../goal/goal/README.md)也保持独立。策略和暂缓事项由 [Ralph Agent Note](../../../.agents/notes/implemented/feature/2026-07-19-fresh-agent-ralph-workflow-tool.md)负责。
5
+ 面向模型的 `ralph` 工具运行固定的前台工作流,把一个不可变目标依次交给多个全新子 agent(智能体)。它展示如何把专用编排策略实现为基于 [`ctx.workflowEngine`](../workflow/README.md) 和 [`ctx.subagents`](../../subagent/subagent/README.md) 的普通插件:不会向 `agent-loop` 添加 Ralph 模式或全新 agent loop(智能体循环),同会话的[目标领域](../../goal/goal/README.md)也保持独立。策略和暂缓事项由 [Ralph Agent Note(agent 决策记录)](../../../.agents/notes/implemented/feature/2026-07-19-fresh-agent-ralph-workflow-tool.md)负责。
6
6
 
7
- ## 约定
7
+ ## 契约
8
8
 
9
9
  `ralph({ objective, maxRounds? })` 会等待整个运行完成。部署配置中的 `maxRounds` 既是默认值,也是调用覆盖值的上限。每个 Ralph Round 通过 `subagentProvider` 启动一个子 agent;该提供方必须存在、支持结构化输出,并报告 `inheritsParentContext: false`。已配置的提供方以 `WorkflowStartRequest.subagentProvider` 传递,使固定脚本无法检查或更改路由,普通的模型编写 `workflow` 工具也不会因此获得提供方选择器。解析后的 Round 上限还会作为 `WorkflowStartRequest.maxTotalAgents` 传递,使固定循环与引擎的子 agent 总数后备上限协同;Ralph 上限超过引擎部署上限时,引擎会在发布运行前拒绝。
10
10
 
@@ -44,7 +44,7 @@
44
44
  ##### Ralph 指导
45
45
 
46
46
  ```markdown
47
- Use the ralph tool ONLY when the direct human explicitly asks for a Ralph loop or fresh-agent iterative execution. Each Ralph round starts a fresh child with no conversation seed and uses the shared workspace as durable memory. Completion and blockers are worker reports, not independent evaluation. Use same-session goal tools for ordinary long-running objectives, and plain subagents or workflows for bounded delegation and fan-out.
47
+ Use the ralph tool ONLY when the direct human explicitly asks for a Ralph loop or fresh-agent iterative execution. Each Ralph round starts a fresh child with no conversation seed and uses the shared workspace as durable memory. Completion and blockers are worker reports, not independent evaluation. Use same-session goal tools for ordinary long-running objectives, and plain subagents or workflowEngine for bounded delegation and fan-out.
48
48
  ```
49
49
 
50
50
  #### Token 影响
@@ -59,7 +59,7 @@ Use the ralph tool ONLY when the direct human explicitly asks for a Ralph loop o
59
59
 
60
60
  #### 模型看到的内容
61
61
 
62
- 已生成的 [`ralph` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-ralph)公开一个必填 `objective` 字符串和一个可选 `maxRounds` 数字。提供方选择、交接大小、报告 schema、工作流脚本和编排行为均由部署侧控制,不在调用接口中。
62
+ 已生成的 [`ralph` schema](../../../docs/tool-catalog.md#deepseek-aidsh-tool-ralph)公开一个必填 `objective` 字符串和一个可选 `maxRounds` 数字。提供方选择、交接大小、报告 schema、工作流脚本和编排行为均由部署侧控制,不在调用 schema 中。
63
63
 
64
64
  #### Token 影响
65
65
 
@@ -73,7 +73,7 @@ Use the ralph tool ONLY when the direct human explicitly asks for a Ralph loop o
73
73
 
74
74
  #### 模型看到的内容
75
75
 
76
- 每个子 agent 都会看到独立的固定 Round 提示词和结构化输出捕获约定。父级只看到原始调用和一个终态结果,其中包含 worker 报告的状态、Round 数量及经过美化打印的最终报告;中间子 agent 消息和报告不会进入父级对话。普通子 agent 失败时会改为产生错误,其中包含对应 Round 编号;从第二个 Round 起,还会包含上一次成功交接。
76
+ 每个子 agent 都会看到独立的固定 Round 提示词和结构化输出捕获契约。父级只看到原始调用和一个终态结果,其中包含 worker 报告的状态、Round 数量及经过美化打印的最终报告;中间子 agent 消息和报告不会进入父级对话。普通子 agent 失败时会改为产生错误,其中包含对应 Round 编号;从第二个 Round 起,还会包含上一次成功交接。
77
77
 
78
78
  #### Token 影响
79
79
 
@@ -86,7 +86,7 @@ Use the ralph tool ONLY when the direct human explicitly asks for a Ralph loop o
86
86
  ## 已知限制与暂缓事项
87
87
 
88
88
  - **完成由 worker 自行声明**:没有独立的评估器或验证器判断目标是否实际完成;评估器策略及评估器驱动的延续均暂缓处理。
89
- - **仅支持前台**:没有 task id、后台收集、进程恢复检查点、调度器或基于挂钟时间的启动策略。
89
+ - **仅支持前台**:没有 job id、后台收集、进程恢复检查点、调度器或基于挂钟时间的启动策略。
90
90
  - **工作区是唯一的跨 Round 长期记忆**:一份有界报告作为显式交接内容,每个子 agent 结束后,未提交的对话推理都会消失。
91
91
  - **一个 Round 对应一个全新子 agent**:Round 内没有扇出、模型/提供方切换、fork 上下文或由模型调用选择的提供方。
92
92
  - **普通子 agent 失败会终止运行**:固定脚本报告失败的 Round 和上一次成功交接,但不会重试;致命的工作流基础设施失败可能在该状态返回前结束。
package/lib/index.js CHANGED
@@ -10,7 +10,7 @@ import { defineTool } from "@deepseek-ai/dsh-tools";
10
10
  const name = "tool-ralph";
11
11
  const inject = [
12
12
  "tools",
13
- "workflows",
13
+ "workflowEngine",
14
14
  "subagents",
15
15
  "systemPrompt"
16
16
  ];
@@ -329,7 +329,7 @@ function apply(ctx, config) {
329
329
  if (objective.length === 0) throw new Error("Ralph objective must be a non-empty string");
330
330
  const maxRounds = resolveMaxRounds(args.maxRounds, resolved.maxRounds);
331
331
  requireFreshProvider(ctx, resolved.subagentProvider);
332
- const run = ctx.workflows.start({
332
+ const run = ctx.workflowEngine.start({
333
333
  script: RALPH_SCRIPT,
334
334
  meta: RALPH_META,
335
335
  args: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-ralph",
3
3
  "description": "Model-facing fresh-agent Ralph loop over the workflow and subagent seams",
4
- "version": "0.0.1-rc.2",
4
+ "version": "0.0.1-rc.5",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -32,33 +32,33 @@
32
32
  ],
33
33
  "license": "BSD-3-Clause",
34
34
  "peerDependencies": {
35
- "@deepseek-ai/dsh-agent": "^0.0.1-rc.2",
36
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.2",
37
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
38
- "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.2",
39
- "@deepseek-ai/dsh-tools": "^0.0.1-rc.2",
40
- "@deepseek-ai/dsh-workflow": "^0.0.1-rc.2",
41
- "@deepseek-ai/dsh-subagent": "^0.0.1-rc.2",
42
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
35
+ "@deepseek-ai/dsh-agent": "^0.0.1-rc.5",
36
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
37
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
38
+ "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.5",
39
+ "@deepseek-ai/dsh-subagent": "^0.0.1-rc.5",
40
+ "@deepseek-ai/dsh-workflow": "^0.0.1-rc.5",
41
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.5",
42
+ "@deepseek-ai/cordis": "^4.0.1-rc.4"
43
43
  },
44
44
  "dependencies": {
45
- "@deepseek-ai/schemastery": "^3.18.1-rc.1"
45
+ "@deepseek-ai/schemastery": "^3.18.1-rc.4"
46
46
  },
47
47
  "devDependencies": {
48
- "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
49
- "@deepseek-ai/dsh-agent-loop-testkit": "^0.0.1-rc.2",
50
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
51
- "@deepseek-ai/dsh-agent-loop": "^0.0.1-rc.2",
52
- "@deepseek-ai/dsh-agent": "^0.0.1-rc.2",
53
- "@deepseek-ai/dsh-llm": "^0.0.1-rc.2",
54
- "@deepseek-ai/dsh-subagent": "^0.0.1-rc.2",
55
- "@deepseek-ai/dsh-subagent-inprocess": "^0.0.1-rc.2",
56
- "@deepseek-ai/dsh-subagent-spawn": "^0.0.1-rc.2",
57
- "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.2",
58
- "@deepseek-ai/dsh-tools": "^0.0.1-rc.2",
59
- "@deepseek-ai/dsh-workflow": "^0.0.1-rc.2",
60
- "@deepseek-ai/cordis": "^4.0.1-rc.1",
61
- "@deepseek-ai/dsh-session": "^0.0.1-rc.2",
62
- "@deepseek-ai/dsh-workflow-workerthread": "^0.0.1-rc.2"
48
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.2-rc.4",
49
+ "@deepseek-ai/dsh-agent": "^0.0.1-rc.5",
50
+ "@deepseek-ai/dsh-agent-loop": "^0.0.1-rc.5",
51
+ "@deepseek-ai/dsh-agent-loop-testkit": "^0.0.1-rc.5",
52
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.5",
53
+ "@deepseek-ai/dsh-llm": "^0.0.1-rc.5",
54
+ "@deepseek-ai/dsh-session": "^0.0.1-rc.5",
55
+ "@deepseek-ai/dsh-subagent": "^0.0.1-rc.5",
56
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "^0.0.1-rc.5",
57
+ "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.5",
58
+ "@deepseek-ai/dsh-workflow": "^0.0.1-rc.5",
59
+ "@deepseek-ai/dsh-workflow-worker-thread": "^0.0.1-rc.5",
60
+ "@deepseek-ai/dsh-tools": "^0.0.1-rc.5",
61
+ "@deepseek-ai/cordis": "^4.0.1-rc.4",
62
+ "@deepseek-ai/dsh-subagent-in-process-driver": "^0.0.1-rc.5"
63
63
  }
64
64
  }