@deepseek-ai/dsh-ptc-runtime-node 0.1.6-alpha.1 → 0.1.6-alpha.2

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/ptc-runtime/ptc-runtime-node/README.md
5
- README.md: f8f7b5535ba8ed1594b898d410df04e24f5dc8ef
6
- README.zh.md: dd4e33e70f05ae3917f128e33bf26af5d1a915c4
5
+ README.md: 5196d6982c3bf8edda3b8b825e41db83f6994141
6
+ README.zh.md: 16c9f8fc426b1f2d28eaa039ba259f08088664a8
package/README.md CHANGED
@@ -85,7 +85,7 @@ The host owns policy, deadlines, binding lookup and process cleanup. The child o
85
85
 
86
86
  ### Launch and control
87
87
 
88
- The host strips erasable types, resolves the executable and bootstrap in the configured execution world, awaits argv confinement through `ctx.sandbox`, then spawns through `ctx.subprocess`. Cancellation is checked again after confinement, so a provider returning after cancellation cannot start the program. After adopting the inherited control channel, the child retains only executable-search, Windows system, and temporary paths in its OS environment and replaces the program-visible `process.env` with an empty dictionary. Windows ACL setup receives the parent's distinct `TEMP` and `TMP` values for shared grant locks, then replaces both with its private directory before starting the program. These native paths keep nested process creation and native temporary-file APIs functional. The heap limit uses Node argv or a provider-created `NODE_OPTIONS` value for packaged executables; ambient loader and inspector flags are discarded.
88
+ The host strips erasable types, resolves the executable and bootstrap in the configured execution world, awaits argv confinement through `ctx.sandbox`, then spawns through `ctx.subprocess`. Cancellation is checked again after confinement, so a provider returning after cancellation cannot start the program. After adopting the inherited control channel, the child retains only executable-search, Windows system, and temporary paths in its OS environment and replaces the program-visible `process.env` with an empty dictionary. Windows ACL setup receives the parent's distinct `TEMP` and `TMP` values for shared grant locks, then replaces both with its private directory before starting the program. These native paths keep nested process creation and native temporary-file APIs functional. The host preserves `ELECTRON_RUN_AS_NODE` only for child startup so the Desktop executable runs the Node bootstrap; the bootstrap removes the selector before evaluating model code. The heap limit uses Node argv or a provider-created `NODE_OPTIONS` value for packaged executables; ambient loader and inspector flags are discarded.
89
89
 
90
90
  Length-framed JSON travels separately from stdout/stderr. The host bounds frames and queued writes, validates call identity and declared binding names before dispatch, and refuses invalid traffic. The child flushes its terminal frame and keeps the control channel open until the host closes it. After submitting that frame, it ignores later binding replies and sends no further program control messages. Output capture meters serialized logs plus the completion or diagnostic; fixed result-envelope fields and sandbox metadata are outside that ledger.
91
91
 
package/README.zh.md CHANGED
@@ -85,7 +85,7 @@ Host 负责策略、截止时间、绑定查找和进程清理。子进程负责
85
85
 
86
86
  ### 启动与控制
87
87
 
88
- Host 擦除可擦除类型,在配置的执行世界中解析可执行文件与 bootstrap,通过 `ctx.sandbox` 等待 argv 限制准备完成,再通过 `ctx.subprocess` 启动。限制准备完成后会再次检查取消状态,因此提供方在取消后返回也无法启动程序。接管继承的控制通道后,子进程在 OS 环境中只保留可执行文件搜索路径、Windows 系统路径和临时路径,并将程序可见的 `process.env` 替换为空字典。Windows ACL 初始化接收父进程各自的 `TEMP` 和 `TMP` 值以使用共享授权锁,然后在启动程序前将二者替换为私有目录。这些原生路径使嵌套进程创建和原生临时文件 API 仍可正常工作。堆上限通过 Node argv 或为打包可执行文件由提供方构造的 `NODE_OPTIONS` 值传递;环境中的加载器和调试器标志会被丢弃。
88
+ Host 擦除可擦除类型,在配置的执行世界中解析可执行文件与 bootstrap,通过 `ctx.sandbox` 等待 argv 限制准备完成,再通过 `ctx.subprocess` 启动。限制准备完成后会再次检查取消状态,因此提供方在取消后返回也无法启动程序。接管继承的控制通道后,子进程在 OS 环境中只保留可执行文件搜索路径、Windows 系统路径和临时路径,并将程序可见的 `process.env` 替换为空字典。Windows ACL 初始化接收父进程各自的 `TEMP` 和 `TMP` 值以使用共享授权锁,然后在启动程序前将二者替换为私有目录。这些原生路径使嵌套进程创建和原生临时文件 API 仍可正常工作。Host 仅在子进程启动时保留 `ELECTRON_RUN_AS_NODE`,使桌面端可执行文件运行 Node bootstrap;bootstrap 在求值模型代码前删除该选择变量。堆上限通过 Node argv 或为打包可执行文件由提供方构造的 `NODE_OPTIONS` 值传递;环境中的加载器和调试器标志会被丢弃。
89
89
 
90
90
  带长度分帧的 JSON 与 stdout/stderr 分开传输。Host 限制帧与排队写入,在分派前验证调用身份和已声明的绑定名,并拒绝无效通信。子进程刷新终态帧后仍保持控制通道打开,直到 Host 关闭通道。提交终态帧后,子进程忽略后续绑定回复,不再发送程序控制消息。输出捕获计量序列化日志加完成值或诊断;固定结果信封字段与沙箱元数据不计入该账本。
91
91
 
package/lib/index.js CHANGED
@@ -953,7 +953,7 @@ var NodePtcRuntime = class extends PtcRuntime {
953
953
  }, signal);
954
954
  if (settled) return await result.promise;
955
955
  if (confined !== void 0) sandbox.enforcement = confined.enforcement;
956
- const env = Object.fromEntries(Object.keys(process.env).filter((key) => !STARTUP_ENVIRONMENT_NAMES.has(key.toUpperCase())).map((key) => [key, void 0]));
956
+ const env = Object.fromEntries(Object.keys(process.env).filter((key) => !STARTUP_ENVIRONMENT_NAMES.has(key.toUpperCase()) && key.toUpperCase() !== "ELECTRON_RUN_AS_NODE").map((key) => [key, void 0]));
957
957
  if (packaged) {
958
958
  env.DSH_PTC_RUNTIME_NODE = "1";
959
959
  env.NODE_OPTIONS = heapFlag;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-ptc-runtime-node",
3
3
  "description": "Sandboxed Node process implementation of the DeepSeek Harness PTC execution capability",
4
- "version": "0.1.6-alpha.1",
4
+ "version": "0.1.6-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,30 +32,30 @@
32
32
  "license": "MIT",
33
33
  "peerDependencies": {
34
34
  "@deepseek-ai/cordis": "^4.0.2",
35
- "@deepseek-ai/dsh-ptc-runtime": "^0.1.6-alpha.1",
36
- "@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
37
- "@deepseek-ai/dsh-timeout": "^0.1.6-alpha.1",
38
- "@deepseek-ai/dsh-fs": "^0.1.6-alpha.1",
39
- "@deepseek-ai/dsh-subprocess": "^0.1.6-alpha.1",
40
- "@deepseek-ai/dsh-sandbox-policy": "^0.1.6-alpha.1",
41
- "@deepseek-ai/dsh-sandbox": "^0.1.6-alpha.1"
35
+ "@deepseek-ai/dsh-timeout": "^0.1.6-alpha.2",
36
+ "@deepseek-ai/dsh-fs": "^0.1.6-alpha.2",
37
+ "@deepseek-ai/dsh-subprocess": "^0.1.6-alpha.2",
38
+ "@deepseek-ai/dsh-sandbox-policy": "^0.1.6-alpha.2",
39
+ "@deepseek-ai/dsh-sandbox": "^0.1.6-alpha.2",
40
+ "@deepseek-ai/dsh-ptc-runtime": "^0.1.6-alpha.2",
41
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2"
42
42
  },
43
43
  "dependencies": {
44
- "@deepseek-ai/dsh-util-values": "^0.1.6-alpha.1",
44
+ "@deepseek-ai/dsh-util-values": "^0.1.6-alpha.2",
45
45
  "@deepseek-ai/schemastery": "^3.18.2"
46
46
  },
47
47
  "devDependencies": {
48
- "@deepseek-ai/dsh-ptc-runtime": "^0.1.6-alpha.1",
49
- "@deepseek-ai/dsh-session": "^0.1.6-alpha.1",
50
- "@deepseek-ai/dsh-timeout": "^0.1.6-alpha.1",
51
48
  "@deepseek-ai/cordis": "^4.0.2",
52
- "@deepseek-ai/dsh-fs": "^0.1.6-alpha.1",
53
- "@deepseek-ai/dsh-subprocess": "^0.1.6-alpha.1",
54
- "@deepseek-ai/dsh-sandbox": "^0.1.6-alpha.1",
55
- "@deepseek-ai/dsh-sandbox-policy": "^0.1.6-alpha.1",
56
- "@deepseek-ai/dsh-fs-local": "^0.1.6-alpha.1",
57
- "@deepseek-ai/dsh-subprocess-local": "^0.1.6-alpha.1",
58
- "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.1",
59
- "@deepseek-ai/dsh-sandbox-local": "^0.1.6-alpha.1"
49
+ "@deepseek-ai/dsh-ptc-runtime": "^0.1.6-alpha.2",
50
+ "@deepseek-ai/dsh-session": "^0.1.6-alpha.2",
51
+ "@deepseek-ai/dsh-timeout": "^0.1.6-alpha.2",
52
+ "@deepseek-ai/dsh-fs": "^0.1.6-alpha.2",
53
+ "@deepseek-ai/dsh-subprocess": "^0.1.6-alpha.2",
54
+ "@deepseek-ai/dsh-sandbox": "^0.1.6-alpha.2",
55
+ "@deepseek-ai/dsh-sandbox-policy": "^0.1.6-alpha.2",
56
+ "@deepseek-ai/dsh-fs-local": "^0.1.6-alpha.2",
57
+ "@deepseek-ai/dsh-subprocess-local": "^0.1.6-alpha.2",
58
+ "@deepseek-ai/dsh-session-projection": "^0.1.6-alpha.2",
59
+ "@deepseek-ai/dsh-sandbox-local": "^0.1.6-alpha.2"
60
60
  }
61
61
  }