@deepseek-ai/dsh-workflow-ptc 0.2.1-alpha.2 → 0.2.1-alpha.4

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
@@ -24,8 +24,8 @@
24
24
  en: 0626f232df315a7d
25
25
  zh: 573e9a12bc69ac6d
26
26
  /deepseek-ai-dsh-workflow-ptc/use-this-package/file-policy-and-cancellation:
27
- en: 3d3dfd0da6975208
28
- zh: 41a3f05ee9d5616f
27
+ en: 5a13be99e2c2ca39
28
+ zh: ff16dbe6bc83a75d
29
29
  /deepseek-ai-dsh-workflow-ptc/understand-the-implementation:
30
30
  en: ff9de0f5f3423c12
31
31
  zh: 4c5ae9845d452cc1
package/README.md CHANGED
@@ -56,7 +56,7 @@ Invalid metadata, an unparseable body, an unavailable provider route or a per-ru
56
56
 
57
57
  ### File policy and cancellation
58
58
 
59
- The engine captures the calling Session's effective working directory and standing file policy separately. The PTC process and every child started by that workflow retain the captured directory when the parent later moves. The VM retains the documented helper API, but it is not a security boundary: code that reaches Node remains subject to the selected OS file policy. The program-visible environment is empty. Network access is not restricted by the file policy.
59
+ The engine captures the calling Session's effective working directory and standing file policy separately. The PTC process and every child started by that workflow retain the captured directory when the parent later moves. A runtime without confinement is accepted only for `danger-full-access`; `read-only` and `workspace-write` fail before execution. Node in-memory mode executes an async wrapper in a temporary environment, so workflow-local variables never join the Agent's retained REPL. The VM retains the documented helper API, but it is not a security boundary: code that reaches Node follows the selected runtime's file policy. The program-visible environment is empty. Network access is not restricted by the file policy.
60
60
 
61
61
  The workflow requests `timeoutMs: null` from PTC. Its initial VM slice still has `syncTimeoutMs`, and a caller's abort signal still applies, including an enclosing tool deadline. Cancellation immediately aborts the PTC process and pending or active subagents. The caller must dispose every run and await child cleanup; there is no separate workflow cleanup timer.
62
62
 
package/README.zh.md CHANGED
@@ -56,7 +56,7 @@ Node PTC 提供方的 `maxPendingCalls` 也限制工作流并发:子 agent 启
56
56
 
57
57
  ### 文件策略与取消
58
58
 
59
- 引擎分别捕获调用 Session 的有效工作目录与常设文件策略。父级之后切换目录时,PTC 进程及该工作流随后启动的每个子级都保留捕获的目录。VM 保留文档说明的辅助 API,但它不是安全边界:触达 Node 的代码仍受所选 OS 文件策略约束。程序可见的环境为空。文件策略不限制网络访问。
59
+ 引擎分别捕获调用 Session 的有效工作目录与常设文件策略。父级之后切换目录时,PTC 进程及该工作流随后启动的每个子级都保留捕获的目录。不支持文件约束的运行时只允许用于 `danger-full-access`;`read-only` 和 `workspace-write` 在执行前失败。Node 内存保留模式在临时环境中执行异步包装函数,因此工作流局部变量不会进入 Agent 保留的 REPL。VM 保留文档说明的辅助 API,但它不是安全边界:触达 Node 的代码遵循所选运行时的文件策略。程序可见的环境为空。文件策略不限制网络访问。
60
60
 
61
61
  工作流向 PTC 请求 `timeoutMs: null`。最初的 VM 片段仍受 `syncTimeoutMs` 限制,调用方的中止信号仍然生效,包括外层工具的截止。取消立即中止 PTC 进程及待启动或活跃的 subagent。调用方必须释放每次运行并等待子 agent 清理;不另设工作流清理定时器。
62
62
 
package/lib/index.js CHANGED
@@ -424,14 +424,15 @@ var PtcWorkflowRun = class {
424
424
  try {
425
425
  const cwd = await this.cwd;
426
426
  this.requireActive();
427
+ if (this.runtime.sandboxMode === void 0 && this.policy.mode !== "danger-full-access") throw new Error(`workflow runtime cannot enforce the ${this.policy.mode} file policy`);
427
428
  const outcome = await this.runtime.run(this.runtime.resolve({
428
- program: PROGRAM,
429
+ program: this.runtime.programFormat === "repl" ? `await (async () => {\n${PROGRAM}\n})()` : PROGRAM,
429
430
  bindings: [{
430
431
  global: "workflowHost",
431
432
  functions: this.bindings()
432
433
  }],
433
434
  cwd,
434
- sandboxPolicy: this.policy,
435
+ ...this.runtime.sandboxMode === void 0 ? {} : { sandboxPolicy: this.policy },
435
436
  timeoutMs: null,
436
437
  signal: this.controller.signal
437
438
  }));
package/locale/en.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "workflow-ptc"
4
+ }
5
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "工作流执行引擎",
4
+ "description": "使用共享的 PTC 运行时执行工作流编排代码。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-workflow-ptc",
3
3
  "description": "Workflow orchestration in the shared sandboxed Node PTC runtime",
4
- "version": "0.2.1-alpha.2",
4
+ "version": "0.2.1-alpha.4",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -19,56 +19,58 @@
19
19
  "default": "./lib/index.js"
20
20
  },
21
21
  "./src/*": "./src/*",
22
- "./package.json": "./package.json"
22
+ "./package.json": "./package.json",
23
+ "./locale/*.json": "./locale/*.json"
23
24
  },
24
25
  "files": [
26
+ "locale/*.json",
25
27
  "lib/index.js",
26
28
  "lib/types/**/*.d.ts"
27
29
  ],
28
30
  "license": "MIT",
29
31
  "peerDependencies": {
30
- "@deepseek-ai/cordis": "~4.0.5-alpha.1",
31
- "@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
32
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
33
- "@deepseek-ai/dsh-session": "0.2.1-alpha.2",
34
- "@deepseek-ai/dsh-subagent": "0.2.1-alpha.2",
35
- "@deepseek-ai/dsh-tools": "0.2.1-alpha.2",
36
- "@deepseek-ai/dsh-workflow": "0.2.1-alpha.2",
37
- "@deepseek-ai/dsh-ptc-runtime": "0.2.1-alpha.2",
38
- "@deepseek-ai/dsh-sandbox": "0.2.1-alpha.2",
39
- "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.2",
40
- "@deepseek-ai/dsh-working-directory": "0.2.1-alpha.2"
32
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2",
33
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.4",
34
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.4",
35
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.4",
36
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.4",
37
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.4",
38
+ "@deepseek-ai/dsh-workflow": "0.2.1-alpha.4",
39
+ "@deepseek-ai/dsh-ptc-runtime": "0.2.1-alpha.4",
40
+ "@deepseek-ai/dsh-sandbox": "0.2.1-alpha.4",
41
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.4",
42
+ "@deepseek-ai/dsh-working-directory": "0.2.1-alpha.4"
41
43
  },
42
44
  "dependencies": {
43
- "@deepseek-ai/dsh-brand": "0.2.1-alpha.2",
44
- "@deepseek-ai/dsh-util-values": "0.2.1-alpha.2",
45
- "@deepseek-ai/schemastery": "~3.18.5-alpha.1"
45
+ "@deepseek-ai/dsh-brand": "0.2.1-alpha.4",
46
+ "@deepseek-ai/dsh-util-values": "0.2.1-alpha.4",
47
+ "@deepseek-ai/schemastery": "~3.18.5-alpha.2"
46
48
  },
47
49
  "devDependencies": {
48
- "@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.1-alpha.2",
49
- "@deepseek-ai/cordis": "~4.0.5-alpha.1",
50
- "@deepseek-ai/dsh-agent": "0.2.1-alpha.2",
51
- "@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.2",
52
- "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.2",
53
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.2",
54
- "@deepseek-ai/dsh-session": "0.2.1-alpha.2",
55
- "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.2",
56
- "@deepseek-ai/dsh-subagent": "0.2.1-alpha.2",
57
- "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.1-alpha.2",
58
- "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.2",
59
- "@deepseek-ai/dsh-tools": "0.2.1-alpha.2",
60
- "@deepseek-ai/dsh-workflow": "0.2.1-alpha.2",
61
- "@deepseek-ai/dsh-http-proxy": "0.2.1-alpha.2",
62
- "@deepseek-ai/dsh-ptc-runtime": "0.2.1-alpha.2",
63
- "@deepseek-ai/dsh-sandbox": "0.2.1-alpha.2",
64
- "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.2",
65
- "@deepseek-ai/dsh-ptc-runtime-node": "0.2.1-alpha.2",
66
- "@deepseek-ai/dsh-fs": "0.2.1-alpha.2",
67
- "@deepseek-ai/dsh-fs-local": "0.2.1-alpha.2",
68
- "@deepseek-ai/dsh-subprocess": "0.2.1-alpha.2",
69
- "@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.2",
70
- "@deepseek-ai/dsh-sandbox-local": "0.2.1-alpha.2",
71
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.2",
72
- "@deepseek-ai/dsh-working-directory": "0.2.1-alpha.2"
50
+ "@deepseek-ai/dsh-llm-deepseek-api-key": "0.2.1-alpha.4",
51
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2",
52
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.4",
53
+ "@deepseek-ai/dsh-agent-loop": "0.2.1-alpha.4",
54
+ "@deepseek-ai/dsh-agent-loop-testkit": "0.2.1-alpha.4",
55
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.4",
56
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.4",
57
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.4",
58
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.4",
59
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.1-alpha.4",
60
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.4",
61
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.4",
62
+ "@deepseek-ai/dsh-workflow": "0.2.1-alpha.4",
63
+ "@deepseek-ai/dsh-http-proxy": "0.2.1-alpha.4",
64
+ "@deepseek-ai/dsh-ptc-runtime": "0.2.1-alpha.4",
65
+ "@deepseek-ai/dsh-sandbox": "0.2.1-alpha.4",
66
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.1-alpha.4",
67
+ "@deepseek-ai/dsh-ptc-runtime-node": "0.2.1-alpha.4",
68
+ "@deepseek-ai/dsh-fs": "0.2.1-alpha.4",
69
+ "@deepseek-ai/dsh-fs-local": "0.2.1-alpha.4",
70
+ "@deepseek-ai/dsh-subprocess": "0.2.1-alpha.4",
71
+ "@deepseek-ai/dsh-subprocess-local": "0.2.1-alpha.4",
72
+ "@deepseek-ai/dsh-sandbox-local": "0.2.1-alpha.4",
73
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.4",
74
+ "@deepseek-ai/dsh-working-directory": "0.2.1-alpha.4"
73
75
  }
74
76
  }