DSH / Atlas
2026-11-12implementedsimplification

TypeScript-only PTC tool execution

PTC 工具执行仅支持 TypeScript

The Python tool SDK originally let a provider change the program language while retaining typed tool calls. Removing the experimental Python runtime left that presentation available to external providers, together with Python completion rendering and binding-name restrictions imposed on the Node provider. Shipped PTC compositions use TypeScript, so those paths maintain a second language without a repository-owned exe

English

Problem

The Python tool SDK originally let a provider change the program language while retaining typed tool calls. Removing the experimental Python runtime left that presentation available to external providers, together with Python completion rendering and binding-name restrictions imposed on the Node provider. Shipped PTC compositions use TypeScript, so those paths maintain a second language without a repository-owned execution provider or profile replay.

Decision

dsh-tool-registry-ptc supports TypeScript only. It removes Python schema rendering and exports, language dispatch, completion presentation, and Python-specific binding exclusions. Unsupported providers fail during prompt assembly or execution through a PTC registry, or when a PtcToolRegistry is constructed with its own runtime. The PTC root selection remains active so an invalid provider cannot expose inherited native tools. TypeScript programs retain their SDK, parameters, explicit output selection, canonical nested results and cancellation behavior.

The runtime service remains independent of tools. Its source-language descriptor lets each consumer check its own requirements; direct runtime and workflow consumers retain completion values. The Harness Python SDK, runtime wheels and other tools' Python environments have separate consumers and remain supported.

The PTC foundation and typed returns remain active for their independent dispatch, durability and value semantics. Their language-specific facts follow this decision. The archived language-dispatch decision remains frozen history.

Alternatives considered

Keep external Python providers working. This preserves a capability after deleting its implementation, but still requires a renderer, alternate output semantics and cross-language naming restrictions. Full removal gives one supported tool-program language and a clear migration.

Remove Python SDK and runtime packaging too. Those packages launch the Harness and consume its public protocol; they do not execute Python PTC programs. Removing them would discard an independent supported client.

Consequences

External Python PTC compositions must migrate to a TypeScript provider and rewrite their programs; the upgrade guide owns the steps. There is no Python compatibility branch. Reintroduction requires an owned provider, a concrete consumer need, language-specific rejection and output tests, and a shipped-profile replay.

Rejection tests mount the PTC root plugin and compatibility selector through Cordis, then cover prompt assembly, schema projection, direct execution and an included registry with a fixed runtime. Built-export checks pin removal of Python renderers. Existing keyless TypeScript profile replays compare unchanged model prompts and execution output. Binding validation and real-process execution cover names that no longer need Python exclusions. Existing Session logs and committed historical generations retain their bytes.

中文

Problem

Python 工具 SDK 最初让提供方能在保留类型化工具调用的同时更换程序语言。移除实验性 Python 运行时后,该呈现仍供外部提供方使用,并保留了 Python 完成值渲染以及施加于 Node 提供方的绑定命名限制。已发布 PTC 组合使用 TypeScript,因此这些路径维护着第二种语言,却没有仓库拥有的执行提供方或 profile 回放。

Decision

dsh-tool-registry-ptc 仅支持 TypeScript。它移除 Python schema 渲染及导出、语言分发、完成值呈现与 Python 专属绑定排除规则。不支持的提供方在通过 PTC 注册表组装提示词或执行程序时失败,也会在以自有 runtime 构造 PtcToolRegistry 时失败。PTC 根注册表的选择保持生效,避免无效提供方暴露继承的 native 工具。TypeScript 程序保留其 SDK、参数、显式输出选择、规范嵌套结果及取消行为。

运行时服务仍独立于工具。其源码语言描述符让每个消费方检查自身要求;直接运行时消费方与工作流消费方保留完成值。Harness Python SDK、运行时 wheel 与其他工具的 Python 环境有各自的消费方,继续受到支持。

PTC 基础与类型化返回值仍因独立的分发、持久化及值语义而保持活跃。其中与语言有关的事实遵循本决定。归档的语言分发决定保持为冻结历史。

Alternatives considered

保留外部 Python 提供方支持。 这在删除实现后保留了能力,但仍需要渲染器、另一套输出语义和跨语言命名限制。彻底移除使工具程序只有一种受支持语言,并提供明确迁移路径。

同时移除 Python SDK 与运行时打包。 这些包启动 Harness 并消费其公共协议,并不执行 Python PTC 程序。移除它们会丢弃独立的受支持客户端。

Consequences

外部 Python PTC 组合必须迁移到 TypeScript 提供方并改写程序;升级指南拥有具体步骤。不提供 Python 兼容分支。重新引入需要有明确负责方的提供方、具体消费需求、语言专属的拒绝与输出测试,以及已发布 profile 回放。

拒绝测试通过 Cordis 挂载 PTC 根注册表插件与兼容选择器,再覆盖提示词组装、schema 投影、直接执行,以及使用固定运行时的被引入注册表。构建导出检查固定 Python 渲染器的移除。现有免密钥 TypeScript profile 回放比较保持不变的模型提示和执行输出。绑定验证与真实进程执行覆盖不再需要 Python 排除规则的名称。已有 Session 日志和已提交历史代际逐字节保留。