dsh-primer 0.4.5 → 0.4.7
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.en.md +6 -6
- package/README.es.md +6 -6
- package/README.hi.md +6 -6
- package/README.md +7 -7
- package/README.pt.md +6 -6
- package/SKILL.md +11 -9
- package/data/facts.json +35 -15
- package/data/seams/index.json +1526 -98
- package/data/standards.json +17 -11
- package/dist/dsh-plugin-dev.js +7 -7
- package/guide/links.md +2 -2
- package/guide/migration-0.2.md +105 -14
- package/guide/plugin-dev-guide.md +6 -6
- package/guide/quick-reference.es.md +4 -4
- package/guide/quick-reference.hi.md +4 -4
- package/guide/quick-reference.md +4 -4
- package/guide/quick-reference.pt.md +4 -4
- package/guide/quick-reference.zh-CN.md +4 -4
- package/guide/standards.md +1 -1
- package/guide/standards.zh-CN.md +1 -1
- package/guide/unfixed-issues.md +2 -2
- package/guide/version-matrix.md +65 -42
- package/package.json +13 -7
- package/references/official-docs/CLAUDE.md +1 -1
- package/references/official-docs/README.md +9 -4
- package/references/official-docs/SNAPSHOT.md +7 -5
- package/references/official-docs/docs/capability-seams.i18n.yaml +2 -2
- package/references/official-docs/docs/capability-seams.md +4 -0
- package/references/official-docs/docs/capability-seams.zh.md +4 -0
- package/references/official-docs/docs/config-catalog.md +26 -28
- package/references/official-docs/docs/config-catalog.zh.md +26 -28
- package/references/official-docs/docs/defensive-patterns/package-surface.i18n.yaml +2 -2
- package/references/official-docs/docs/defensive-patterns/package-surface.md +0 -1
- package/references/official-docs/docs/defensive-patterns/package-surface.zh.md +0 -1
- package/references/official-docs/docs/event-producer-consumer.md +1 -1
- package/references/official-docs/docs/event-producer-consumer.zh.md +1 -1
- package/references/official-docs/docs/module-graph.md +12 -17
- package/references/official-docs/docs/module-graph.zh.md +12 -17
- package/references/official-docs/docs/subsystems/computer-use.i18n.yaml +2 -2
- package/references/official-docs/docs/subsystems/computer-use.md +1 -1
- package/references/official-docs/docs/subsystems/computer-use.zh.md +1 -1
- package/references/official-docs/docs/subsystems/persistence.md +19 -0
- package/references/official-docs/docs/subsystems/persistence.zh.md +19 -0
- package/references/official-docs/docs/subsystems/ptc-runtime.i18n.yaml +4 -4
- package/references/official-docs/docs/subsystems/ptc-runtime.md +8 -48
- package/references/official-docs/docs/subsystems/ptc-runtime.zh.md +8 -48
- package/references/official-docs/docs/tool-catalog.i18n.yaml +2 -2
- package/references/official-docs/docs/tool-catalog.md +1 -1
- package/references/official-docs/docs/tool-catalog.zh.md +1 -1
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/cua-native-platform/guide.i18n.yaml +4 -4
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/cua-native-platform/guide.md +7 -7
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/cua-native-platform/guide.zh.md +7 -7
- package/references/official-plugin-dev-skill.md +16 -12
- package/references/sources.md +2 -2
- package/scripts/check-docs-drift.mjs +121 -0
- package/scripts/check-docs-drift.ps1 +4 -1
- package/scripts/check-facts.mjs +81 -3
- package/scripts/sync-official-docs.ps1 +16 -5
- package/templates/js/README-es.md +1 -1
- package/templates/js/README-hi.md +1 -1
- package/templates/js/README-pt.md +1 -1
- package/templates/js/README-zh.md +1 -1
- package/templates/js/README.md +1 -1
- package/templates/ts/README-es.md +1 -1
- package/templates/ts/README-hi.md +1 -1
- package/templates/ts/README-pt.md +1 -1
- package/templates/ts/README-zh.md +1 -1
- package/templates/ts/README.md +1 -1
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/package-export-cleanup/guide.i18n.yaml +0 -16
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/package-export-cleanup/guide.md +0 -26
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/package-export-cleanup/guide.zh.md +0 -26
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-bootstrap-protocol/guide.i18n.yaml +0 -16
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-bootstrap-protocol/guide.md +0 -25
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-bootstrap-protocol/guide.zh.md +0 -25
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-inspect-output/guide.i18n.yaml +0 -16
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-inspect-output/guide.md +0 -48
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-inspect-output/guide.zh.md +0 -48
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-scoped-repl-default/guide.i18n.yaml +0 -16
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-scoped-repl-default/guide.md +0 -45
- package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-scoped-repl-default/guide.zh.md +0 -45
|
@@ -6,7 +6,7 @@ Un plugin de DeepSeek Harness (DSH) generado con [`dsh-plugin-dev new`](https://
|
|
|
6
6
|
|
|
7
7
|
| Superficie | Estado |
|
|
8
8
|
|---|---|
|
|
9
|
-
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `
|
|
9
|
+
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `next`); `latest` = `0.2.2-rc.1`, `next` = `0.2.2-rc.3` |
|
|
10
10
|
| Node | `^22.19.0 || >=24.0.0` |
|
|
11
11
|
| Plataformas | Todas (ESM puro; sin código nativo, sin red) |
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
| सतह | स्थिति |
|
|
8
8
|
|---|---|
|
|
9
|
-
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `
|
|
9
|
+
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `next`); `latest` = `0.2.2-rc.1`, `next` = `0.2.2-rc.3` |
|
|
10
10
|
| Node | `^22.19.0 || >=24.0.0` |
|
|
11
11
|
| प्लेटफ़ॉर्म | सभी (शुद्ध ESM; कोई नेटिव कोड नहीं, कोई नेटवर्क नहीं) |
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ Um plugin do DeepSeek Harness (DSH) gerado com [`dsh-plugin-dev new`](https://gi
|
|
|
6
6
|
|
|
7
7
|
| Superfície | Estado |
|
|
8
8
|
|---|---|
|
|
9
|
-
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `
|
|
9
|
+
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `next`); `latest` = `0.2.2-rc.1`, `next` = `0.2.2-rc.3` |
|
|
10
10
|
| Node | `^22.19.0 || >=24.0.0` |
|
|
11
11
|
| Plataformas | Todas (ESM puro; sem código nativo, sem rede) |
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
| 项目 | 状态 |
|
|
8
8
|
|---|---|
|
|
9
|
-
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `
|
|
9
|
+
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `next`); `latest` = `0.2.2-rc.1`, `next` = `0.2.2-rc.3` |
|
|
10
10
|
| Node | `^22.19.0 || >=24.0.0` |
|
|
11
11
|
| 平台 | 全部(纯 ESM;无原生代码、无网络) |
|
|
12
12
|
|
package/templates/js/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A DeepSeek Harness (DSH) plugin scaffolded by [`dsh-plugin-dev new`](https://git
|
|
|
6
6
|
|
|
7
7
|
| Surface | Status |
|
|
8
8
|
|---|---|
|
|
9
|
-
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `
|
|
9
|
+
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `next`); `latest` = `0.2.2-rc.1`, `next` = `0.2.2-rc.3` |
|
|
10
10
|
| Node | `^22.19.0 || >=24.0.0` |
|
|
11
11
|
| Platforms | All (plain ESM; no native code, no network) |
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ Un plugin de DeepSeek Harness (DSH) generado con [`dsh-plugin-dev new`](https://
|
|
|
6
6
|
|
|
7
7
|
| Superficie | Estado |
|
|
8
8
|
|---|---|
|
|
9
|
-
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `
|
|
9
|
+
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `next`); `latest` = `0.2.2-rc.1`, `next` = `0.2.2-rc.3` |
|
|
10
10
|
| Node | `^22.19.0 || >=24.0.0` |
|
|
11
11
|
| Plataformas | Todas (ESM puro; sin código nativo, sin red) |
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
| सतह | स्थिति |
|
|
8
8
|
|---|---|
|
|
9
|
-
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `
|
|
9
|
+
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `next`); `latest` = `0.2.2-rc.1`, `next` = `0.2.2-rc.3` |
|
|
10
10
|
| Node | `^22.19.0 || >=24.0.0` |
|
|
11
11
|
| प्लेटफ़ॉर्म | सभी (शुद्ध ESM; कोई नेटिव कोड नहीं, कोई नेटवर्क नहीं) |
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ Um plugin do DeepSeek Harness (DSH) gerado com [`dsh-plugin-dev new`](https://gi
|
|
|
6
6
|
|
|
7
7
|
| Superfície | Estado |
|
|
8
8
|
|---|---|
|
|
9
|
-
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `
|
|
9
|
+
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `next`); `latest` = `0.2.2-rc.1`, `next` = `0.2.2-rc.3` |
|
|
10
10
|
| Node | `^22.19.0 || >=24.0.0` |
|
|
11
11
|
| Plataformas | Todas (ESM puro; sem código nativo, sem rede) |
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
| 项目 | 状态 |
|
|
8
8
|
|---|---|
|
|
9
|
-
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `
|
|
9
|
+
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `next`); `latest` = `0.2.2-rc.1`, `next` = `0.2.2-rc.3` |
|
|
10
10
|
| Node | `^22.19.0 || >=24.0.0` |
|
|
11
11
|
| 平台 | 全部(纯 ESM;无原生代码、无网络) |
|
|
12
12
|
|
package/templates/ts/README.md
CHANGED
|
@@ -6,7 +6,7 @@ A DeepSeek Harness (DSH) plugin scaffolded by [`dsh-plugin-dev new`](https://git
|
|
|
6
6
|
|
|
7
7
|
| Surface | Status |
|
|
8
8
|
|---|---|
|
|
9
|
-
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `
|
|
9
|
+
| Harness | DeepSeek Harness `{{dshBaseline}}` (npm `next`); `latest` = `0.2.2-rc.1`, `next` = `0.2.2-rc.3` |
|
|
10
10
|
| Node | `^22.19.0 || >=24.0.0` |
|
|
11
11
|
| Platforms | All (plain ESM; no native code, no network) |
|
|
12
12
|
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
|
|
2
|
-
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
-
# After editing either side, bring the other along and re-record with:
|
|
4
|
-
# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.1/package-export-cleanup/guide.md
|
|
5
|
-
/:
|
|
6
|
-
en: 5048dc7fc046e7ab
|
|
7
|
-
zh: 7845cb3ba5a543d4
|
|
8
|
-
/replace-internal-plugin-root-imports:
|
|
9
|
-
en: 65af277d1f4ed1a0
|
|
10
|
-
zh: 9d2b980fb6fabe89
|
|
11
|
-
/replace-internal-plugin-root-imports/change:
|
|
12
|
-
en: fcb1af4db4d0edd5
|
|
13
|
-
zh: 6cc6ed79d0100eac
|
|
14
|
-
/replace-internal-plugin-root-imports/migration:
|
|
15
|
-
en: 01c24ef3fa9273f6
|
|
16
|
-
zh: cd5ae3b6f0218aba
|
package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/package-export-cleanup/guide.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
kind: upgrade-guide
|
|
3
|
-
description: Internal helper values are removed from three published plugin-root entries.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Replace internal plugin-root imports
|
|
7
|
-
|
|
8
|
-
English | [中文](guide.zh.md)
|
|
9
|
-
|
|
10
|
-
## Change
|
|
11
|
-
|
|
12
|
-
After upgrading from v0.2.2-rc.1, the following plugin-root values are no longer exported. Their implementations remain inside the packages. Consumers importing these values from a package root must change their imports or use the owning service.
|
|
13
|
-
|
|
14
|
-
| Package suffix (`@deepseek-ai/dsh-`) | Removed root helpers |
|
|
15
|
-
|---|---|
|
|
16
|
-
| `file-reference-local` | `DEFAULT_FILE_SEARCH_EXCLUDED_DIRECTORIES`, `DEFAULT_FILE_SEARCH_MAX_ENTRIES`, `DEFAULT_FILE_SEARCH_MAX_RESULTS`, `WorkspaceFileSearch`, `FILE_REFERENCE_PROMPT`, `activeAtToken`, `formatFileMention` |
|
|
17
|
-
| `llm-pi-ai` | `recordKeyFor` |
|
|
18
|
-
| `lsp-stdio` | `LspConnection`, `LspInstance`, `MessageDecoder`, `canonicalizeWorkspace`, `encodeMessage`, `negotiatePositionEncoding`, `normalizeHover`, `normalizeLocations`, `readHostSource`, `requestMethod`, `supportsOperation`, `supportsTransientOpen` |
|
|
19
|
-
|
|
20
|
-
Brand constructors, package subpaths, persisted values and Session formats are unchanged.
|
|
21
|
-
|
|
22
|
-
## Migration
|
|
23
|
-
|
|
24
|
-
1. Stop importing the listed helper values from plugin roots. Package-owned tests can use relative imports from the corresponding internal modules.
|
|
25
|
-
2. Application code should use the injected `fileReferences` or `lsp` service instead of provider implementation classes or protocol helpers. File-reference grammar remains at `@deepseek-ai/dsh-file-reference/grammar`; `FILE_REFERENCE_PROMPT` remains at `@deepseek-ai/dsh-file-reference`. `recordKeyFor` has no replacement public entry.
|
|
26
|
-
3. Compile the application and run its tests. Load any plain-JavaScript consumers under Node as well: TypeScript checking alone does not cover missing ESM named exports in `.mjs` files.
|
package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/package-export-cleanup/guide.zh.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
kind: upgrade-guide
|
|
3
|
-
description: 三个已发布插件的根入口移除内部辅助实体的值导出。
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 替换内部插件根导入
|
|
7
|
-
|
|
8
|
-
[English](guide.md) | 中文
|
|
9
|
-
|
|
10
|
-
## 变更
|
|
11
|
-
|
|
12
|
-
从 v0.2.2-rc.1 升级后,以下插件根入口不再导出这些值。对应实现在包内保留。从包根入口导入这些值的消费方需要更改导入或改用所属服务。
|
|
13
|
-
|
|
14
|
-
| 包名后缀(`@deepseek-ai/dsh-`) | 移除的根辅助实体 |
|
|
15
|
-
|---|---|
|
|
16
|
-
| `file-reference-local` | `DEFAULT_FILE_SEARCH_EXCLUDED_DIRECTORIES`、`DEFAULT_FILE_SEARCH_MAX_ENTRIES`、`DEFAULT_FILE_SEARCH_MAX_RESULTS`、`WorkspaceFileSearch`、`FILE_REFERENCE_PROMPT`、`activeAtToken`、`formatFileMention` |
|
|
17
|
-
| `llm-pi-ai` | `recordKeyFor` |
|
|
18
|
-
| `lsp-stdio` | `LspConnection`、`LspInstance`、`MessageDecoder`、`canonicalizeWorkspace`、`encodeMessage`、`negotiatePositionEncoding`、`normalizeHover`、`normalizeLocations`、`readHostSource`、`requestMethod`、`supportsOperation`、`supportsTransientOpen` |
|
|
19
|
-
|
|
20
|
-
品牌构造器、包子路径、持久化值和 Session 格式不变。
|
|
21
|
-
|
|
22
|
-
## 迁移
|
|
23
|
-
|
|
24
|
-
1. 停止从插件根入口导入上表的辅助实体值。包内测试可以相对导入对应内部模块。
|
|
25
|
-
2. 应用代码应使用注入的 `fileReferences` 或 `lsp` 服务,而不是提供方的实现类或协议辅助函数。文件引用语法仍在 `@deepseek-ai/dsh-file-reference/grammar`;`FILE_REFERENCE_PROMPT` 仍在 `@deepseek-ai/dsh-file-reference`。`recordKeyFor` 没有替代的公开入口。
|
|
26
|
-
3. 编译应用并运行其测试,同时用 Node 加载纯 JavaScript 消费方:仅检查 TypeScript 无法覆盖 `.mjs` 文件中缺少 ESM 命名导出的错误。
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
|
|
2
|
-
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
-
# After editing either side, bring the other along and re-record with:
|
|
4
|
-
# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.1/ptc-bootstrap-protocol/guide.md
|
|
5
|
-
/:
|
|
6
|
-
en: cee454924a9ab1f8
|
|
7
|
-
zh: 2d7cbdcc398fa914
|
|
8
|
-
/node-ptc-bootstrap-protocol-version-3-and-the-scoped-repl-format:
|
|
9
|
-
en: 541c4f16c0107c90
|
|
10
|
-
zh: edda22e2ebf01992
|
|
11
|
-
/node-ptc-bootstrap-protocol-version-3-and-the-scoped-repl-format/change:
|
|
12
|
-
en: f9b071385a270a1e
|
|
13
|
-
zh: e664c70b769579e9
|
|
14
|
-
/node-ptc-bootstrap-protocol-version-3-and-the-scoped-repl-format/migration:
|
|
15
|
-
en: 350de9ad88b43420
|
|
16
|
-
zh: 8b8bfe380cbf6fe8
|
package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-bootstrap-protocol/guide.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
kind: upgrade-guide
|
|
3
|
-
description: "Update custom Node PTC bootstraps to protocol version 3 before running them with the upgraded Host, and handle the new scoped-repl program format."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Node PTC bootstrap protocol version 3 and the scoped-repl format
|
|
7
|
-
|
|
8
|
-
English | [中文](guide.zh.md)
|
|
9
|
-
|
|
10
|
-
## Change
|
|
11
|
-
|
|
12
|
-
The Node PTC Host requires bootstrap protocol version 3 instead of version 2. It rejects an older bootstrap before dispatching a program, with `bootstrap protocol mismatch; upgrade launch.bootstrapPath with the host`. This affects custom `launch.bootstrapPath` deployments in every execution mode, including `@deepseek-ai/dsh-ssh` hosts with a `node-script` launch that set `launch.bootstrapPath` and `launch.bootstrapHash`. The bootstrap bundled with DSH updates with the Host and needs no configuration change.
|
|
13
|
-
|
|
14
|
-
Version 3 carries optional `ProgramBootData.initialization` source for each new environment. The bootstrap evaluates it separately after installing current bindings, then awaits the Host's `initialized()` RPC acceptance and rechecks cancellation before running the model program. Initialization failure discards the environment and prevents model execution. The Node provider supports initializer registration only in `persistent-in-memory` mode.
|
|
15
|
-
|
|
16
|
-
Version 3 also carries `ProgramBootData.discardCompletion` to discard completion values before JSON validation and serialization. The bootstrap provides `inspect` and sends selected images through `HostMethods.image(id)` in output order. Custom bootstraps must support these fields and methods alongside environment initialization.
|
|
17
|
-
|
|
18
|
-
Version 3 also adds the `scoped-repl` program format. `PtcProgramFormat` in `@deepseek-ai/dsh-ptc-runtime` now includes `'scoped-repl'`, which `@deepseek-ai/dsh-ptc-runtime-node` reports as `PtcRuntime.programFormat` when `replScoped: true` is set with `executionMode: persistent-in-memory`. Code that matches the union exhaustively stops compiling until it handles the new value.
|
|
19
|
-
|
|
20
|
-
## Migration
|
|
21
|
-
|
|
22
|
-
1. If your Node PTC configuration sets `launch.bootstrapPath`, deploy the matching version of `@deepseek-ai/dsh-ptc-runtime-node` in its execution environment. Use the package's built `lib/process.js` or REPL-default `lib/persistent-process.js` with its dependencies. Keep the Host and bootstrap versions aligned; changing only the advertised version is insufficient.
|
|
23
|
-
2. Update `launch.bootstrapPath` to the matching entry and restart the provider. For `@deepseek-ai/dsh-ssh` with a `node-script` launch, copy the new bootstrap to the remote `launch.bootstrapPath` and set `launch.bootstrapHash` to its lowercase SHA-256, for example from `sha256sum`. For local deployments that need no custom bootstrap, remove that override to use the installed default. The [Node runtime documentation](../../../../packages/ptc-runtime/ptc-runtime-node/README.md#persistent-repl) describes retained execution and remote launch.
|
|
24
|
-
3. Handle `'scoped-repl'` wherever code switches over `PtcProgramFormat` or keys a record by it. A `scoped-repl` program is REPL statements whose final expression is the result; top-level `return` is not supported, and a final Promise is not awaited.
|
|
25
|
-
4. Run a program in each configured execution mode and confirm that it completes without the protocol error. Consumers using `registerEnvironmentInitializer(program)` must also verify that initialization runs once per new environment and that an initialization error prevents the model program's effects. Typecheck the code that uses `PtcProgramFormat`.
|
package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-bootstrap-protocol/guide.zh.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
kind: upgrade-guide
|
|
3
|
-
description: "自定义 Node PTC bootstrap 必须升级到协议版本 3,才能与新版 Host 一起运行;还要处理新增的 scoped-repl 程序格式。"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Node PTC bootstrap 协议版本 3 与 scoped-repl 格式
|
|
7
|
-
|
|
8
|
-
[English](guide.md) | 中文
|
|
9
|
-
|
|
10
|
-
## 变更
|
|
11
|
-
|
|
12
|
-
Node PTC Host 要求 bootstrap 协议版本从 2 升至 3。它会在派发程序前拒绝旧 bootstrap,并报告 `bootstrap protocol mismatch; upgrade launch.bootstrapPath with the host`。这影响所有执行模式下自定义 `launch.bootstrapPath` 的部署,包括使用 `node-script` 启动、设置了 `launch.bootstrapPath` 和 `launch.bootstrapHash` 的 `@deepseek-ai/dsh-ssh` 宿主。DSH 内置 bootstrap 随 Host 更新,无需修改配置。
|
|
13
|
-
|
|
14
|
-
版本 3 为每个新环境携带可选的 `ProgramBootData.initialization` 源码。bootstrap 安装本次绑定后独立执行初始化,随后等待 Host 对 `initialized()` RPC 的确认,再次检查取消状态后才执行模型程序。初始化失败会丢弃环境并阻止模型代码执行。Node 提供方仅在 `persistent-in-memory` 模式下支持注册初始化程序。
|
|
15
|
-
|
|
16
|
-
版本 3 还携带 `ProgramBootData.discardCompletion`,用于在 JSON 校验和序列化前丢弃完成值。bootstrap 提供 `inspect`,并通过 `HostMethods.image(id)` 按输出顺序发送选中的图片。自定义 bootstrap 必须同时支持这些字段、方法和环境初始化。
|
|
17
|
-
|
|
18
|
-
版本 3 还新增了 `scoped-repl` 程序格式。`@deepseek-ai/dsh-ptc-runtime` 的 `PtcProgramFormat` 新增 `'scoped-repl'`;`@deepseek-ai/dsh-ptc-runtime-node` 在 `executionMode: persistent-in-memory` 下设置 `replScoped: true` 时,`PtcRuntime.programFormat` 报告这个值。对这个联合类型做穷尽匹配的代码,处理新值之前无法通过编译。
|
|
19
|
-
|
|
20
|
-
## 迁移
|
|
21
|
-
|
|
22
|
-
1. 如果 Node PTC 配置设置了 `launch.bootstrapPath`,请在其执行环境中部署匹配版本的 `@deepseek-ai/dsh-ptc-runtime-node`。使用包内构建产物 `lib/process.js`,或默认采用 REPL 的 `lib/persistent-process.js`,并保留其依赖。Host 与 bootstrap 版本必须匹配;只修改声明的版本号并不够。
|
|
23
|
-
2. 将 `launch.bootstrapPath` 指向匹配的入口并重启提供方。使用 `node-script` 启动的 `@deepseek-ai/dsh-ssh`:把新的 bootstrap 复制到远端的 `launch.bootstrapPath`,并把 `launch.bootstrapHash` 设为它的小写 SHA-256,例如用 `sha256sum` 计算。本地部署若不需要自定义 bootstrap,可以移除此覆盖项以使用安装默认值。[Node 运行时文档](../../../../packages/ptc-runtime/ptc-runtime-node/README.zh.md#persistent-repl)说明状态保留和远程启动方式。
|
|
24
|
-
3. 在按 `PtcProgramFormat` 分支或以它为键的地方处理 `'scoped-repl'`。`scoped-repl` 程序是 REPL 语句,最后一条表达式就是结果;不支持顶层 `return`,末尾的 Promise 不会被等待。
|
|
25
|
-
4. 在每种已配置的执行模式中运行一个程序,确认正常完成且没有协议错误。使用 `registerEnvironmentInitializer(program)` 的消费方还须验证:初始化在每个新环境中只执行一次,且初始化出错时模型程序不会产生效果。再对使用 `PtcProgramFormat` 的代码做类型检查。
|
package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-inspect-output/guide.i18n.yaml
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
|
|
2
|
-
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
-
# After editing either side, bring the other along and re-record with:
|
|
4
|
-
# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.1/ptc-inspect-output/guide.md
|
|
5
|
-
/:
|
|
6
|
-
en: aa6195ec0952307e
|
|
7
|
-
zh: 1d80177284309ac6
|
|
8
|
-
/explicit-output-in-typescript-ptc-programs:
|
|
9
|
-
en: 064ec0081b5c2946
|
|
10
|
-
zh: 4b67a513ea949220
|
|
11
|
-
/explicit-output-in-typescript-ptc-programs/change:
|
|
12
|
-
en: a4b3d449a4eedd9f
|
|
13
|
-
zh: ae9b0ba7f9f4acbd
|
|
14
|
-
/explicit-output-in-typescript-ptc-programs/migration:
|
|
15
|
-
en: 0953d3ac2f2f01e3
|
|
16
|
-
zh: b3614bf85d3d2fcf
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
kind: upgrade-guide
|
|
3
|
-
description: "TypeScript PTC programs display selected values through inspect and return ordered text and image output."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Explicit output in TypeScript PTC programs
|
|
7
|
-
|
|
8
|
-
English | [中文](guide.zh.md)
|
|
9
|
-
|
|
10
|
-
## Change
|
|
11
|
-
|
|
12
|
-
TypeScript `run_code` programs display selected values through `inspect(...values)`. Function return values and final expressions previously appeared in the result; they are now omitted. Each inspected argument is rendered independently: strings appear directly, and other values use Node's object formatting without depth, array-length or string-length preview limits. Undefined properties, Error objects and circular references remain visible.
|
|
13
|
-
|
|
14
|
-
CUA observations previously produced output automatically. `getCapabilities()`, `listApps()`, `findApps(query)`, `getState()`, `app.getWindows()` and app or window `getAccessibilityTree()` now return their results to the program. Use `inspect` to display the values you need.
|
|
15
|
-
|
|
16
|
-
Only CUA screenshots and `read_image` return ordinary `Image` values in TypeScript programs. Their `path` points to an attachment file readable in the execution environment; `width` and `height` describe its stored pixels. Pass selected images to `inspect` alongside explanatory text, including images in arrays, Map entries, Set values and enumerable object properties. Nested image selection follows Node's custom formatting. Read CUA window IDs from the window object’s `windowId`.
|
|
17
|
-
|
|
18
|
-
Other image-producing tools retain their declared program values and automatically attach their pictures to the model context. Image adaptation requires a readable attachment path in the program filesystem. `fs-ssh` does not provide this mapping, so `read_image` and CUA screenshot bindings fail in that composition. Use a local filesystem composition for program Images.
|
|
19
|
-
|
|
20
|
-
Formatting selected values can require more memory than the retained output; see the [Node formatting memory limit](../../../../packages/ptc-runtime/ptc-runtime-node/README.md#known-limitations-and-deferred-work).
|
|
21
|
-
|
|
22
|
-
## Migration
|
|
23
|
-
|
|
24
|
-
1. Update programs that rely on completion values to explicitly inspect the values they need:
|
|
25
|
-
|
|
26
|
-
```js
|
|
27
|
-
const result = await tools.bash({ command: 'pwd', description: 'Show current directory' })
|
|
28
|
-
inspect(result)
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
2. Remove output callbacks from `connectCua` and `createCuaApi`, the `emit` observation option and the unused `disableDiffing` AX option. Pass observations you want to display to `inspect`, for example `inspect(await app.getWindows())`. A custom dispatcher must return a program Image for screenshot operations.
|
|
32
|
-
|
|
33
|
-
```js
|
|
34
|
-
const { connectCua } = await import("<host-provided bridge file URL>")
|
|
35
|
-
const cua = connectCua(() => tools.cua)
|
|
36
|
-
const app = await cua.getApp("TextEdit")
|
|
37
|
-
const windows = await app.getWindows()
|
|
38
|
-
const win = await app.getWindow(windows[0].windowId)
|
|
39
|
-
const before = await win.getScreenshot()
|
|
40
|
-
await app.pressKey("Tab")
|
|
41
|
-
const after = await win.getScreenshot()
|
|
42
|
-
inspect("before", { windowId: win.windowId }, before, "after", after)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
3. Direct runtime consumers can set `discardCompletion: true` to select the same explicit-output behavior.
|
|
46
|
-
4. Third-party `PtcRuntime` providers replace returned `logs` arrays with `output: PtcOutput[]`; direct runtime consumers read `result.output`. Text entries are `{ type: 'text', text }`, image entries are `{ type: 'image', attachment }`, and array order is display order. Preserve emitted line breaks and concatenate adjacent text entries without separators.
|
|
47
|
-
5. For custom `launch.bootstrapPath` deployments, follow the [Node PTC bootstrap upgrade guide](../ptc-bootstrap-protocol/guide.md).
|
|
48
|
-
6. Run an updated program and verify that inspected values appear once and its final expression adds no output.
|
package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-inspect-output/guide.zh.md
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
kind: upgrade-guide
|
|
3
|
-
description: "TypeScript PTC 程序通过 inspect 展示选定的值,并返回有序的文本与图片输出。"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# TypeScript PTC 程序的显式输出
|
|
7
|
-
|
|
8
|
-
[English](guide.md) | 中文
|
|
9
|
-
|
|
10
|
-
## 变更
|
|
11
|
-
|
|
12
|
-
TypeScript `run_code` 程序通过 `inspect(...values)` 展示选定的值。此前函数返回值和末尾表达式的值会进入结果,现在会被省略。各个 inspect 参数独立渲染:字符串直接展示,其他值使用 Node 的对象格式,不限制预览深度、数组项数或字符串长度。undefined 属性、Error 对象和循环引用均会展示。
|
|
13
|
-
|
|
14
|
-
此前,CUA 观察方法默认会输出结果。现在,`getCapabilities()`、`listApps()`、`findApps(query)`、`getState()`、`app.getWindows()` 以及应用或窗口的 `getAccessibilityTree()` 都将结果返回给程序。需要展示哪些值,就把它们传给 `inspect`。
|
|
15
|
-
|
|
16
|
-
只有 CUA 截图与 `read_image` 在 TypeScript 程序中返回普通 `Image`,其 `path` 指向执行环境可读取的附件文件,`width` 与 `height` 为该文件的像素尺寸。使用 `inspect` 将选中的图片与说明一起展示;图片可嵌入数组、Map 条目、Set 的值以及可枚举的对象属性。嵌套图片的选择遵循 Node 的自定义格式化。CUA 窗口 ID 从窗口对象的 `windowId` 读取。
|
|
17
|
-
|
|
18
|
-
其他图片工具保留其声明的程序返回值,并将图片自动附加到模型上下文。图片适配要求附件在程序文件系统中有可读路径。`fs-ssh` 未提供这项映射,因此该组合中的 `read_image` 与 CUA 截图绑定会失败。需要程序 Image 时,使用本地文件系统组合。
|
|
19
|
-
|
|
20
|
-
格式化选定的值所需内存可能大于保留的输出;参见 [Node 格式化的内存限制](../../../../packages/ptc-runtime/ptc-runtime-node/README.zh.md#known-limitations-and-deferred-work)。
|
|
21
|
-
|
|
22
|
-
## 迁移
|
|
23
|
-
|
|
24
|
-
1. 将依赖完成值的程序,改为显式 inspect 所需的值:
|
|
25
|
-
|
|
26
|
-
```js
|
|
27
|
-
const result = await tools.bash({ command: 'pwd', description: 'Show current directory' })
|
|
28
|
-
inspect(result)
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
2. 删除 `connectCua` 和 `createCuaApi` 的输出回调、观察选项 `emit` 和已无作用的 AX 选项 `disableDiffing`。将要展示的观察结果传给 `inspect`,例如 `inspect(await app.getWindows())`。自定义分派器须为截图操作直接返回程序可用的 `Image`。
|
|
32
|
-
|
|
33
|
-
```js
|
|
34
|
-
const { connectCua } = await import("<host-provided bridge file URL>")
|
|
35
|
-
const cua = connectCua(() => tools.cua)
|
|
36
|
-
const app = await cua.getApp("TextEdit")
|
|
37
|
-
const windows = await app.getWindows()
|
|
38
|
-
const win = await app.getWindow(windows[0].windowId)
|
|
39
|
-
const before = await win.getScreenshot()
|
|
40
|
-
await app.pressKey("Tab")
|
|
41
|
-
const after = await win.getScreenshot()
|
|
42
|
-
inspect("before", { windowId: win.windowId }, before, "after", after)
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
3. 直接调用运行时的消费方可设置 `discardCompletion: true`,选择相同的显式输出行为。
|
|
46
|
-
4. 第三方 `PtcRuntime` 提供方将返回的 `logs` 数组替换为 `output: PtcOutput[]`;直接消费运行时结果的调用方改为读取 `result.output`。文本条目为 `{ type: 'text', text }`,图片条目为 `{ type: 'image', attachment }`,数组顺序就是展示顺序。保留实际输出的换行,相邻文本条目直接拼接,不额外插入分隔符。
|
|
47
|
-
5. 使用自定义 `launch.bootstrapPath` 的部署,请按 [Node PTC bootstrap 升级指南](../ptc-bootstrap-protocol/guide.zh.md)更新。
|
|
48
|
-
6. 运行更新后的程序,确认 inspect 的值只出现一次,且末尾表达式不额外输出。
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
|
|
2
|
-
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
3
|
-
# After editing either side, bring the other along and re-record with:
|
|
4
|
-
# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.2-rc.1/ptc-scoped-repl-default/guide.md
|
|
5
|
-
/:
|
|
6
|
-
en: cff145a993d30f0a
|
|
7
|
-
zh: 784a2ce78146a563
|
|
8
|
-
/retained-node-ptc-runs-the-scoped-repl-by-default:
|
|
9
|
-
en: 60119ea304ce7bad
|
|
10
|
-
zh: c0724f1da0e4590c
|
|
11
|
-
/retained-node-ptc-runs-the-scoped-repl-by-default/change:
|
|
12
|
-
en: 1ca349eed9a54b9b
|
|
13
|
-
zh: 5dc5ba17ec953f0e
|
|
14
|
-
/retained-node-ptc-runs-the-scoped-repl-by-default/migration:
|
|
15
|
-
en: 5d1e1f1bf7ce7821
|
|
16
|
-
zh: aafa439b6080acb4
|
package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-scoped-repl-default/guide.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
kind: upgrade-guide
|
|
3
|
-
description: "Node PTC persistent-in-memory execution runs the scoped REPL unless replScoped is false."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Retained Node PTC runs the scoped REPL by default
|
|
7
|
-
|
|
8
|
-
English | [中文](guide.zh.md)
|
|
9
|
-
|
|
10
|
-
## Change
|
|
11
|
-
|
|
12
|
-
`@deepseek-ai/dsh-ptc-runtime-node` previously ran `executionMode: persistent-in-memory` programs in Node's REPL evaluator when `replScoped` was omitted. It now runs them as scoped REPL statements and reports program format `scoped-repl`. Each call is a separate strict-mode script that starts with copies of the top-level bindings left by earlier calls, so a later call may declare a `let`, `const`, or `class` name again. `require`, `_`, `_error`, and globals created by assigning an undeclared name are unavailable. The model guidance describes this behavior; the package README lists its [known limitations](../../../../packages/ptc-runtime/ptc-runtime-node/README.md#known-limitations-and-deferred-work).
|
|
13
|
-
|
|
14
|
-
This affects:
|
|
15
|
-
|
|
16
|
-
- profiles whose `ptc-runtime` entry sets `executionMode: persistent-in-memory` without `replScoped`, including workflow-ptc scripts that run on that runtime;
|
|
17
|
-
- persistent PTC enabled from the Computer Use detail page, which now writes `replScoped: true`;
|
|
18
|
-
- the Computer Use `cua_run_code` tool, whose dedicated runtime omits `replScoped` unless `standaloneRunCode.runtime.replScoped` is set;
|
|
19
|
-
- profile editors that merge `resolvePersistentExecution` from `@deepseek-ai/dsh-ptc-runtime-node/configuration`, which now returns `replScoped: true` for function bodies and REPL statements.
|
|
20
|
-
|
|
21
|
-
`per-call` and `vm-script` execution, including the default profile, are unchanged, and entries that set `replScoped: false` keep Node's REPL evaluator.
|
|
22
|
-
|
|
23
|
-
## Migration
|
|
24
|
-
|
|
25
|
-
1. To keep the scoped REPL, replace REPL-only code: use `await import(...)` instead of `require`, assign `globalThis.name` for an intentional global, and use a new name instead of reading a name's earlier value in its own `let` or `const` initializer.
|
|
26
|
-
2. To restore Node's REPL evaluator, set `replScoped: false` in `$DSH_HOME/profiles/<profile>/cordis.patch.yml`; to move an entry that sets `false` to the scoped REPL, delete the key or set `true`. Each patch below replaces that entry's whole `config`, so copy the entry's existing fields into it, for the `cua` entry including `agentPreset`, `allowedApps`, and the other `standaloneRunCode` fields:
|
|
27
|
-
|
|
28
|
-
```yaml
|
|
29
|
-
- id: ptc-runtime
|
|
30
|
-
config:
|
|
31
|
-
executionMode: persistent-in-memory
|
|
32
|
-
replScoped: false
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
For `cua_run_code`, set it on the Computer Use provider entry:
|
|
36
|
-
|
|
37
|
-
```yaml
|
|
38
|
-
- id: cua
|
|
39
|
-
config:
|
|
40
|
-
standaloneRunCode:
|
|
41
|
-
runtime:
|
|
42
|
-
replScoped: false
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
3. Restart the profile and run `const probe = 1` in two consecutive calls. The scoped REPL accepts both calls; Node's REPL evaluator reports that `probe` has already been declared in the second.
|
package/references/official-docs/docs/upgrade-guide/v0.2.2-rc.1/ptc-scoped-repl-default/guide.zh.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
kind: upgrade-guide
|
|
3
|
-
description: "Node PTC 的 persistent-in-memory 执行默认使用 scoped REPL,replScoped 为 false 时除外。"
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 保留状态的 Node PTC 默认使用 scoped REPL
|
|
7
|
-
|
|
8
|
-
[English](guide.md) | 中文
|
|
9
|
-
|
|
10
|
-
## 变更
|
|
11
|
-
|
|
12
|
-
`@deepseek-ai/dsh-ptc-runtime-node` 在 `executionMode: persistent-in-memory` 下省略 `replScoped` 时,原先用 Node 的 REPL 求值器运行程序;现在按 scoped REPL 语句运行,并报告程序格式 `scoped-repl`。每次调用是独立的严格模式脚本,开始时拿到之前调用留下的顶层绑定的拷贝,因此之后的调用可以再次声明同名的 `let`、`const` 或 `class`。`require`、`_`、`_error`,以及给未声明的名字赋值而产生的全局变量都不可用。模型说明描述了这些行为;包 README 列出了它的[已知限制](../../../../packages/ptc-runtime/ptc-runtime-node/README.zh.md#known-limitations-and-deferred-work)。
|
|
13
|
-
|
|
14
|
-
受影响的有:
|
|
15
|
-
|
|
16
|
-
- `ptc-runtime` 条目设置了 `executionMode: persistent-in-memory` 但没写 `replScoped` 的 profile,包括在该运行时上运行的 workflow-ptc 脚本;
|
|
17
|
-
- 在 Computer Use 详情页打开的持久化 PTC,现在会写入 `replScoped: true`;
|
|
18
|
-
- Computer Use 的 `cua_run_code` 工具,其专用运行时在没有设置 `standaloneRunCode.runtime.replScoped` 时省略 `replScoped`;
|
|
19
|
-
- 合并 `@deepseek-ai/dsh-ptc-runtime-node/configuration` 中 `resolvePersistentExecution` 结果的 profile 编辑器,该函数现在对函数体和 REPL 语句返回 `replScoped: true`。
|
|
20
|
-
|
|
21
|
-
`per-call` 和 `vm-script` 执行(包括默认 profile)不变,设置了 `replScoped: false` 的条目继续使用 Node 的 REPL 求值器。
|
|
22
|
-
|
|
23
|
-
## 迁移
|
|
24
|
-
|
|
25
|
-
1. 如果保留 scoped REPL,替换只在 REPL 下可用的代码:用 `await import(...)` 代替 `require`,有意的全局变量赋给 `globalThis.name`,不要在 `let` 或 `const` 的初始化表达式里读取同名的旧值,改用新名字。
|
|
26
|
-
2. 如果要恢复 Node 的 REPL 求值器,在 `$DSH_HOME/profiles/<profile>/cordis.patch.yml` 里设置 `replScoped: false`;要让设为 `false` 的条目改用 scoped REPL,删除这个键或改为 `true`。下面每个 patch 都会替换该条目的整个 `config`,所以要把条目已有的字段一并写进去,`cua` 条目还包括 `agentPreset`、`allowedApps` 和 `standaloneRunCode` 的其他字段:
|
|
27
|
-
|
|
28
|
-
```yaml
|
|
29
|
-
- id: ptc-runtime
|
|
30
|
-
config:
|
|
31
|
-
executionMode: persistent-in-memory
|
|
32
|
-
replScoped: false
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
对 `cua_run_code`,在 Computer Use 提供方条目上设置:
|
|
36
|
-
|
|
37
|
-
```yaml
|
|
38
|
-
- id: cua
|
|
39
|
-
config:
|
|
40
|
-
standaloneRunCode:
|
|
41
|
-
runtime:
|
|
42
|
-
replScoped: false
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
3. 重启 profile,在连续两次调用里运行 `const probe = 1`。scoped REPL 两次都接受;Node 的 REPL 求值器在第二次报告 `probe` 已经声明过。
|