diff --git a/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.i18n.yaml b/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.i18n.yaml index 6117fd79c3..16b2e50e9b 100644 --- a/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.i18n.yaml +++ b/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.md -2026-07-31-code-runtime-python-fd3-protocol.md: 6f687683666d32bffb423c697fac4d8f576b0a6a -2026-07-31-code-runtime-python-fd3-protocol.zh.md: 8b7fd110ae99b7f2d15aba87968dc0acc911d17f +2026-07-31-code-runtime-python-fd3-protocol.md: 6a5c6598bd7d861f08661af1fef611391d21f005 +2026-07-31-code-runtime-python-fd3-protocol.zh.md: 865489beef3da15eb5ef61622ec530f20d4e787b diff --git a/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.md b/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.md index 6f68768366..6a5c6598bd 100644 --- a/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.md +++ b/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.md @@ -1,5 +1,7 @@ # Agent Note: the code-runtime-python fd-3 frame protocol +The CPython code runtime now lives at `packages/experimental/code-runtime-python` (private, npm name `@deepseek-ai/dsh-experimental-code-runtime-python`); promotion to a released package follows the experimental-packages decision. + Status: implemented English | [中文](2026-07-31-code-runtime-python-fd3-protocol.zh.md) diff --git a/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.zh.md b/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.zh.md index 8b7fd110ae..865489beef 100644 --- a/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.zh.md +++ b/.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.zh.md @@ -1,5 +1,7 @@ # Agent Note: the code-runtime-python fd-3 frame protocol +CPython 代码运行时现在位于 `packages/experimental/code-runtime-python`(私有,npm 名 `@deepseek-ai/dsh-experimental-code-runtime-python`);提升为发布包遵循 experimental-packages 决策。 + Status: implemented [English](2026-07-31-code-runtime-python-fd3-protocol.md) | 中文 diff --git a/packages/code-runtime/README.i18n.yaml b/packages/code-runtime/README.i18n.yaml index 996968bad1..deccb09071 100644 --- a/packages/code-runtime/README.i18n.yaml +++ b/packages/code-runtime/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/code-runtime/README.md -README.md: 7319f9d2d44554312b71a6eabf4e3822bae3ec42 -README.zh.md: 9bfc7cfe5f660faaa475dc62588ad1a1dc6cd9da +README.md: 0bf2021a7a7d88b5001a6a68e5d21ecc2fadc8cb +README.zh.md: 168cfa9ec7bd695d8a64f6b4198ed6da623f31a2 diff --git a/packages/code-runtime/README.md b/packages/code-runtime/README.md index 7319f9d2d4..0bf2021a7a 100644 --- a/packages/code-runtime/README.md +++ b/packages/code-runtime/README.md @@ -28,7 +28,7 @@ These three packages together provide program execution; each README describes w |---|---|---| | [`code-runtime/`](code-runtime/README.md) | Defines what a code runtime does: run one program against host-provided bindings and report what it printed and returned | `ctx.codeRuntime` | | [`code-runtime-worker-thread/`](code-runtime-worker-thread/README.md) | Executes TypeScript programs, each in a fresh Node worker thread | registers `ctx.codeRuntime` | -| [`code-runtime-python/`](../experimental/code-runtime-python/README.md) | Owns the fd-3 wire protocol between a Node host and a CPython subprocess, the Python backend's protocol layer | — | +| [`experimental/code-runtime-python/`](../experimental/code-runtime-python/README.md) | The experimental Python backend: owns the fd-3 wire protocol between a Node host and a CPython subprocess and the CPython runtime implementation | — | ----- diff --git a/packages/code-runtime/README.zh.md b/packages/code-runtime/README.zh.md index 9bfc7cfe5f..168cfa9ec7 100644 --- a/packages/code-runtime/README.zh.md +++ b/packages/code-runtime/README.zh.md @@ -28,7 +28,7 @@ kind: "package-group" |---|---|---| | [`code-runtime/`](code-runtime/README.zh.md) | 定义代码运行时做什么:针对宿主提供的绑定运行一个程序,并报告其打印和返回的内容 | `ctx.codeRuntime` | | [`code-runtime-worker-thread/`](code-runtime-worker-thread/README.zh.md) | 在全新的 Node Worker 线程中执行 TypeScript 程序 | 注册 `ctx.codeRuntime` | -| [`code-runtime-python/`](../experimental/code-runtime-python/README.zh.md) | 持有 Node host 与 CPython 子进程之间的 fd-3 协议格式,即 Python 后端的协议层 | — | +| [`experimental/code-runtime-python/`](../experimental/code-runtime-python/README.zh.md) | 实验性 Python 后端:持有 Node host 与 CPython 子进程之间的 fd-3 协议格式与 CPython 运行时实现 | — | ----- diff --git a/packages/experimental/code-runtime-python/README.i18n.yaml b/packages/experimental/code-runtime-python/README.i18n.yaml index 7619df00c2..c8a45e7ca1 100644 --- a/packages/experimental/code-runtime-python/README.i18n.yaml +++ b/packages/experimental/code-runtime-python/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/experimental/code-runtime-python/README.md -README.md: 2fc78c0a8066886114600e4f3bab6a56521563e5 +README.md: 26f45b34325c003b6693dfb4107fa7b8b179bc66 README.zh.md: c2ec5ca81e5b8a7ee50658663484981699aa9687 diff --git a/packages/experimental/code-runtime-python/README.md b/packages/experimental/code-runtime-python/README.md index 2fc78c0a80..26f45b3432 100644 --- a/packages/experimental/code-runtime-python/README.md +++ b/packages/experimental/code-runtime-python/README.md @@ -89,7 +89,7 @@ Read these when the runtime contract is not enough. They move from the seam defi - [Code runtime seam](../../code-runtime/code-runtime/README.md) — the abstract contract this backend implements. - [fd-3 protocol Agent Note](../../../.agents/notes/implemented/architecture/2026-07-31-code-runtime-python-fd3-protocol.md) — design rationale and wire contract. - [Settlement-fixes Agent Note](../../../.agents/notes/implemented/bug-fix/2026-07-31-code-runtime-python-settlement-fixes.md) — settlement, metering, and containment fixes and their regression cases. -- [Worker-thread backend](../../code-runtime/code-runtime-worker-thread/README.md) — the shipped TypeScript sibling. +- [Worker-thread backend](../../code-runtime/code-runtime-worker-thread/README.md) — the released TypeScript sibling. - [Code runtime subsystem reference](../../../docs/subsystems/code-runtime.md) — request/result vocabulary, bindings, and failure taxonomy. ----- diff --git a/packages/experimental/code-runtime-python/src/index.ts b/packages/experimental/code-runtime-python/src/index.ts index d8471a2fd9..afcf9f0bd9 100644 --- a/packages/experimental/code-runtime-python/src/index.ts +++ b/packages/experimental/code-runtime-python/src/index.ts @@ -9,7 +9,7 @@ * the CPython subprocess. The protocol's host-side codec and hostile-frame * validators are re-exported so every consumer of the wire shares one * vocabulary. - * @module @deepseek-ai/dsh-code-runtime-python + * @module @deepseek-ai/dsh-experimental-code-runtime-python */ import { spawn, type ChildProcessWithoutNullStreams } from 'node:child_process' @@ -680,7 +680,7 @@ interface LiveRun { } /** - * The shipped {@link CodeRuntime} backend registering as `codeRuntime`. Every + * The experimental {@link CodeRuntime} backend (private, not released) registering as `codeRuntime`. Every * cap is validated config; every long-running operation honors the request's * `AbortSignal`; every disposer awaits child-process exit. */ diff --git a/packages/experimental/code-runtime-python/src/protocol.ts b/packages/experimental/code-runtime-python/src/protocol.ts index 2a61622415..dcf0b1a0c4 100644 --- a/packages/experimental/code-runtime-python/src/protocol.ts +++ b/packages/experimental/code-runtime-python/src/protocol.ts @@ -3,7 +3,7 @@ * travel on the child's fd 3 (one JSON object per line), leaving stdout/stderr free for the * program's own output. Host treats every inbound frame as hostile because model code can post * anything through the same fd; the Python bootstrap trusts host replies. - * @module @deepseek-ai/dsh-code-runtime-python/src/protocol + * @module @deepseek-ai/dsh-experimental-code-runtime-python/src/protocol */ /** diff --git a/vitest.config.ts b/vitest.config.ts index 7a05447605..877d2ab14e 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -31,7 +31,7 @@ const windowsUnsupportedPackages = process.platform === 'win32' 'packages/shell/tool-bash', 'packages/hooks/*', 'packages/terminal/terminal-bash', - 'packages/code-runtime/code-runtime-python', + 'packages/experimental/code-runtime-python', 'packages/sandbox/sandbox-local', ] : []