Merge remote-tracking branch 'origin/master' into feat/publish-source-and-docs

# Conflicts:
#	packages/attachment/attachment-local/package.json
#	packages/ptc-runtime/ptc-runtime-node/package.json
#	packages/session/session-title-first-prompt-llm/package.json
#	scripts/build-exe-for-python-sdk.ts
This commit is contained in:
turtle1999 committed 2026-10-14 12:03:36 +08:00
commit d3e8828ab9
3662 files changed
+116440 -24452

No files matched your search

@@ -48,8 +48,8 @@
en: ab4a08f301de599d
zh: e698b35ccf3ce665
/deepseek-ai-dsh-experimental-ptc-runtime-python/model-experience:
en: 42064c81cda8f059
zh: fa68d1acac16e263
en: 79863a171221fa59
zh: 961125d015b1e800
/deepseek-ai-dsh-experimental-ptc-runtime-python/model-experience/kv-cache-effect:
en: 40294c1c31b74824
zh: d805c6bd7270505e
@@ -36,7 +36,7 @@ The runtime advertises file confinement so `run_code` exposes `sandbox_permissio
The runtime supplies these execution instructions:
```text
Each call runs in a fresh Python process. Relative paths use the supplied working directory; only TMPDIR is set in the environment. Direct filesystem access follows this execution's sandbox policy.
The program is the body of an async Python function. Top-level await and return are supported. Emit output with print(...) or return a lossless JSON value. Only printed values and the returned value become program output. Each call runs in a fresh Python process; variables and imported modules do not persist across calls. Relative paths use the supplied working directory; only TMPDIR is set in the environment. Direct filesystem access follows this execution's sandbox policy.
```
### What you get
@@ -112,7 +112,7 @@ Read these when the runtime contract is not enough. They move from the seam defi
<a id="model-experience"></a>
## Model Experience
Indirectly, through PTC mode in `dsh-tools` when an explicit composition mounts this provider; it renders the program's completion value or failure into a retained `run_code` result, and no shipped profile mounts this experimental package.
Indirectly, through PTC mode in `dsh-tools` when explicitly composed: the consumer appends this provider's async-function, output and fresh-process instructions to `run_code` and renders its completion value or failure as the tool result.
#### KV Cache effect
@@ -36,7 +36,7 @@ kind: "package-reference"
运行时提供以下执行指引:
```text
Each call runs in a fresh Python process. Relative paths use the supplied working directory; only TMPDIR is set in the environment. Direct filesystem access follows this execution's sandbox policy.
The program is the body of an async Python function. Top-level await and return are supported. Emit output with print(...) or return a lossless JSON value. Only printed values and the returned value become program output. Each call runs in a fresh Python process; variables and imported modules do not persist across calls. Relative paths use the supplied working directory; only TMPDIR is set in the environment. Direct filesystem access follows this execution's sandbox policy.
```
### 你得到什么
@@ -112,7 +112,7 @@ Each call runs in a fresh Python process. Relative paths use the supplied workin
<a id="model-experience"></a>
## 模型体验
间接地,通过 `dsh-tools` 中的 PTC mode;当显式组合挂载本提供方时,它会把程序的完成值或失败渲染成保留的 `run_code` 结果,且已发布 profile 均不挂载这个实验包。
间接地,通过显式组合中的 `dsh-tools` PTC mode:消费者将本提供方的异步函数、输出和新进程执行指引附加到 `run_code`,并将程序的完成值或失败渲染为工具结果。
#### KV Cache 效应
@@ -1,7 +1,7 @@
{
"name": "@deepseek-ai/dsh-experimental-ptc-runtime-python",
"description": "CPython subprocess implementation of the DeepSeek Harness PTC execution seam",
"version": "0.2.1-alpha.1",
"version": "0.2.1-alpha.2",
"repository": {
"type": "git",
"url": "git+https://github.com/deepseek-ai/deepseek-harness.git",
@@ -759,7 +759,7 @@ export class PythonPtcRuntime extends PtcRuntime {
override get sandboxMode(): SandboxMode { return this.ctx.sandboxPolicy.defaultMode }
override get executionInstructions(): string {
return 'Each call runs in a fresh Python process. Relative paths use the supplied working directory; only TMPDIR is set in the environment. Direct filesystem access follows this execution\'s sandbox policy.'
return 'The program is the body of an async Python function. Top-level await and return are supported. Emit output with print(...) or return a lossless JSON value. Only printed values and the returned value become program output. Each call runs in a fresh Python process; variables and imported modules do not persist across calls. Relative paths use the supplied working directory; only TMPDIR is set in the environment. Direct filesystem access follows this execution\'s sandbox policy.'
}
private readonly config: ResolvedConfig
@@ -1124,7 +1124,7 @@ export class PythonPtcRuntime extends PtcRuntime {
// child can dispatch. `namespace.functions` is caller-supplied, so it may
// expose members through getters or a Proxy; reading one of them inside
// the fd-3 `data` callback would throw OUTSIDE the dispatcher's try and
// terminate the host (defensive-patterns contain-callback-exceptions).
// terminate the host (docs/defensive-patterns/general.md contain-callback-exceptions).
// Reading every member here, in run()'s synchronous validation segment,
// turns that throw into the seam-misuse rejection run() reserves for
// malformed bindings. The snapshot is also the single key set the boot
@@ -73,7 +73,7 @@ describe('PythonPtcRuntime — seam descriptors and misuse', () => {
const { runtime } = await setup()
expect(runtime.language).toBe('python')
expect(runtime.isolation).toBe('process')
expect(runtime.executionInstructions).toBe('Each call runs in a fresh Python process. Relative paths use the supplied working directory; only TMPDIR is set in the environment. Direct filesystem access follows this execution\'s sandbox policy.')
expect(runtime.executionInstructions).toBe('The program is the body of an async Python function. Top-level await and return are supported. Emit output with print(...) or return a lossless JSON value. Only printed values and the returned value become program output. Each call runs in a fresh Python process; variables and imported modules do not persist across calls. Relative paths use the supplied working directory; only TMPDIR is set in the environment. Direct filesystem access follows this execution\'s sandbox policy.')
})
it('resolves its configured deadline and cwd while refusing unsupported execution choices', async () => {