dsh-ptc-plus 0.5.3 → 0.5.6

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.
Files changed (49) hide show
  1. package/README.en.md +3 -3
  2. package/README.md +3 -3
  3. package/client.cjs +3326 -2881
  4. package/compiler-core.cjs +127 -127
  5. package/compiler-core.cjs.map +2 -2
  6. package/docs/README.md +1 -0
  7. package/docs/adr/0005-temporary-rejected-cell-edit-transport.md +2 -2
  8. package/docs/adr/0017-track-the-latest-dsh-public-surface.md +4 -4
  9. package/docs/architecture.md +1 -1
  10. package/docs/capability-planning-components.md +6 -6
  11. package/docs/capability-projection.md +1 -1
  12. package/docs/capability-surface.md +133 -0
  13. package/docs/client-ui.md +17 -15
  14. package/docs/client-visual-contract.md +7 -7
  15. package/docs/installation.md +14 -7
  16. package/docs/panel-concept.md +171 -0
  17. package/docs/publishing.md +1 -1
  18. package/docs/release-notes.md +1 -1
  19. package/docs/releases/v0.5.4.md +79 -0
  20. package/docs/releases/v0.5.5.md +41 -0
  21. package/docs/releases/v0.5.6.md +41 -0
  22. package/docs/runtime-reference.md +14 -0
  23. package/docs/verification.md +1 -1
  24. package/index.js +117 -30
  25. package/internal/binding-adoption.js +103 -11
  26. package/internal/capability-command-receipt.js +99 -15
  27. package/internal/capability-environment.js +1108 -348
  28. package/internal/capability-plan.js +18 -2
  29. package/internal/capability-policy.js +13 -0
  30. package/internal/capability-selection.js +330 -0
  31. package/internal/direct-surface-owner.js +17 -4
  32. package/internal/edit-transport-owner.js +3 -2
  33. package/internal/host-tool-sdk.js +17 -29
  34. package/internal/message-sources.js +21 -0
  35. package/internal/program-bindings.js +13 -4
  36. package/internal/runtime-bridge-owner.js +9 -9
  37. package/internal/runtime-config.js +10 -0
  38. package/internal/session-log-view.js +47 -5
  39. package/internal/settings-compat.js +6 -0
  40. package/internal/user-bindings-owner.js +20 -3
  41. package/package.json +45 -31
  42. package/src/client-authoring-view.js +7 -8
  43. package/src/client-capabilities-view.js +871 -948
  44. package/src/client-capability-sort.js +22 -9
  45. package/src/client-copy.js +116 -294
  46. package/src/client-settings-view.js +90 -33
  47. package/src/client-styles.js +67 -19
  48. package/src/client.js +46 -21
  49. package/internal/capability-delivery-proof.js +0 -70
package/README.en.md CHANGED
@@ -29,7 +29,7 @@ PTC Plus provides a stateful TypeScript computation environment for DSH's **PTC
29
29
 
30
30
  ## Quick start
31
31
 
32
- Requires Node.js `^22.19.0 || >=24.0.0` and the latest available official DSH release:
32
+ Requires the latest available official DSH release and a Node.js runtime satisfying both the plugin's `^22.19.0 || >=24.0.0` range and the selected DSH release's requirements:
33
33
 
34
34
  ```sh
35
35
  dsh plugin --profile <profile> add dsh-ptc-plus
@@ -37,7 +37,7 @@ dsh plugin --profile <profile> add dsh-ptc-plus
37
37
 
38
38
  Replace `<profile>` with your profile name, restart DSH, and select **PTC mode** in the session. Continuous computation, call tolerance, and global bindings are on by default. To upgrade, run `dsh plugin --profile <profile> add dsh-ptc-plus@latest` and restart that Host; see the [installation guide](docs/installation.md) for other installation methods, Desktop, the local development launcher, and troubleshooting.
39
39
 
40
- The plugin declares `engines.dsh: "*"` for the Host's compatibility preflight; public capability checks and packed tests against the latest official release verify compatibility.
40
+ The plugin declares the DSH compatibility range `>=0.2.1-0 <0.2.3` for the Host's version preflight; public capability checks and packed tests verify integration within that range.
41
41
 
42
42
  The session shows a **REPL** tab, and wide screens show a **PTC Plus** header indicator. The sparkle button beside the composer opens the global binding menu, the session capability workbench, and **PTC Plus settings**; **Plugins → Installed → dsh-ptc-plus → Configure** in the sidebar is the same configuration.
43
43
 
@@ -164,7 +164,7 @@ The settings window and the sidebar plugin configuration page are the same confi
164
164
 
165
165
  Everyday computation features are on by default, and **Cordis development tools are off by default** so they can be enabled when inspecting or developing DSH plugins; see the [integration notes](docs/adr/0020-optional-cordis-tools-in-ptc-mode.md).
166
166
 
167
- Capabilities and context is an experimental group, off by default. It selects availability and disclosure for Skills, tools, and MCP capabilities by category, source, or item, and it also covers Initial prompt, Prompt recovery, Output excerpts, and Usage statistics; the switch beside its title pauses the whole group while keeping every choice, and changes apply to new sessions or to a session after an explicit refresh. The sparkle menu also opens the session capability workbench, which views and adjusts the current session's capabilities by category, source, and state: edits live in one draft that you can apply to this session only or save as the global default. See the [configuration reference](docs/runtime-reference.md#configuration) for fields, defaults, and full limits.
167
+ Capabilities and context is an experimental group, off by default. It selects availability and disclosure for Skills, tools, and MCP capabilities by category, source, or item, and it also covers Initial prompt, Prompt recovery, Output excerpts, and Usage statistics; the switch beside its title pauses the whole group while keeping every choice, and changes apply to new sessions or to a session after an explicit refresh. The sparkle menu also opens the session capability workbench: one row per capability, stating its object, type, source, the saved availability and disclosure, the decision this session recorded, and that row's receipt, with each column header sorting by its own column. The session entrance writes only this session's record, the same table in settings edits the saved rules, and each entrance writes its own address; picking several rows records one decision for all of them while each row still writes its own record. The workbench's binding group does not wait for a batch — clicking a row's "Used in this session" or "Not used in this session" submits the same `/binding use|skip <id>` command a human types and changes whether this session uses that global entry. See the [configuration reference](docs/runtime-reference.md#configuration) for fields, defaults, and full limits.
168
168
 
169
169
  The **Prompt text** tab lists the fixed text the plugin writes for the model: each row names its channel, presence condition, byte count, and read-only reason, and the totals line reports measured bytes, unmeasured slots, and dynamic slots separately. Editable rows are counted per slot and saving writes the configuration; a channel that is not connected yet says so instead of reporting zero bytes as if measured; protocol text, sentences generated from configuration or runtime facts, and the binding notes you wrote yourself stay read-only.
170
170
 
package/README.md CHANGED
@@ -29,7 +29,7 @@ PTC Plus 为 DSH 的 **PTC 模式**提供有状态的 TypeScript 计算环境。
29
29
 
30
30
  ## 快速开始
31
31
 
32
- 需要 Node.js `^22.19.0 || >=24.0.0` 和最新可用的官方 DSH:
32
+ 需要最新可用的官方 DSH;Node.js 需同时满足插件的 `^22.19.0 || >=24.0.0` 与所选 DSH 的运行要求:
33
33
 
34
34
  ```sh
35
35
  dsh plugin --profile <profile> add dsh-ptc-plus
@@ -37,7 +37,7 @@ dsh plugin --profile <profile> add dsh-ptc-plus
37
37
 
38
38
  把 `<profile>` 换成实际 profile 名称,重启 DSH,在会话中选择 **PTC 模式**。连续计算、调用容错和全局绑定默认开启;升级用 `dsh plugin --profile <profile> add dsh-ptc-plus@latest` 再重启宿主,其他安装方式、Desktop、本地开发启动器和故障排查见[安装指南](docs/installation.md)。
39
39
 
40
- 插件通过 `engines.dsh: "*"` 接入宿主兼容性预检,按最新官方发行版的公共能力检查与打包测试验证兼容性。
40
+ 插件声明 DSH 兼容范围 `>=0.2.1-0 <0.2.3`,由宿主执行版本预检;范围内的接口适配仍通过公共能力检查与打包测试验证。
41
41
 
42
42
  界面默认显示会话里的 **REPL** 页签,宽屏顶部还有 **PTC Plus** 标志。输入框旁的星光按钮打开全局绑定菜单、会话能力工作台和 **PTC Plus 设置**,侧边栏的 **插件 → 已安装 → dsh-ptc-plus → 配置** 是同一套设置。
43
43
 
@@ -166,7 +166,7 @@ return capabilities.search({ query: 'read file content', budgetBytes: 8192 })
166
166
 
167
167
  面向日常计算的功能默认开启,**Cordis 开发工具默认关闭**,要检查或开发 DSH 插件时再打开,详见[集成说明](docs/adr/0020-optional-cordis-tools-in-ptc-mode.md)。
168
168
 
169
- “能力与上下文”是实验性设置,默认关闭。打开后可以按类别、来源和单项选择 Skills、Tools 和 MCP 能力的启停与说明方式,初始提示、提示恢复、输出节选和使用统计也在这里;标题旁的总开关一次暂停整组并保留原有选择,改动对新会话或明确刷新后的会话生效。星光菜单里还有一个会话能力工作台,用来按类别、来源和状态查看、调整当前会话的能力,改动先放进草稿,可以只写进本会话,也可以保存成全局默认。字段、默认值和完整限制见[配置参考](docs/runtime-reference.md#configuration)。
169
+ “能力与上下文”是实验性设置,默认关闭。打开后可以按类别、来源和单项选择 Skills、Tools 和 MCP 能力的启停与说明方式,初始提示、提示恢复、输出节选和使用统计也在这里;标题旁的总开关一次暂停整组并保留原有选择,改动对新会话或明确刷新后的会话生效。星光菜单里还有一个会话能力工作台,每个能力一行,分列陈述对象、类型、来源、已保存的启用与披露、本会话记录的决定以及这一行的回执,点击列头可按该列排序:会话入口只写本会话的记录,设置页里的同一张表改的是保存的规则,两个入口各写自己的地址;勾选多行可以一次写下同一个决定,每行仍然各写一条记录。工作台的绑定组不经过批量选择,点击某一行的“本会话使用/本会话不使用”立即提交人类输入的同一条 `/binding use|skip <id>` 命令,改的是本会话对该全局条目的取用。字段、默认值和完整限制见[配置参考](docs/runtime-reference.md#configuration)。
170
170
 
171
171
  **提示文本**页签把插件写给模型的固定文本列成清单:每行标注所属通道、存在条件、字节数与只读原因,合计行分别给出已测字节、未测槽和动态槽。可编辑项按槽位计字节,改完保存即写入配置;通道尚未接通时如实显示“通道未接通”,不以 0 字节冒充已测量;协议文本、由配置或运行事实生成的句子,以及你自己写给模型的绑定说明只读展示。
172
172