Rename the tool-presentation transport from code-mode to ptc everywhere that is not written into session logs: the mode config value becomes 'ptc', the preset directory/id becomes ptc, the demo becomes demo:ptc, the dispatch waterfall becomes tools/ptc-dispatch-log (types PtcDispatch*), the prompt rule becomes tools:ptc-only, source/test files become ptc.ts etc., and prose says PTC mode / PTC 模式. The session-persistent vocabulary (durable events tool/code-dispatch*, logged plugin name tools-code-mode, sub-call id segment :code:) intentionally stays and moves in the stacked persistence PR, which is blocked until the SESSION_FORMAT_VERSION v0→v1 migration lands with it. run_code, its code parameter, CodeSdkLanguage, CodeRunFailedError, the dsh-code-runtime family, third-party codex names, and frozen archived notes keep their names.
2.1 KiB
Agent Note: One editor family in general-purpose presets
Status: implemented
English | 中文
Problem
The standard, code, and cordis presets exposed both the read/write/edit filesystem tools and str_replace_editor. The two interfaces overlap for ordinary file inspection and editing, so every request carried an additional tool schema without adding a distinct default capability. The minimal preset has a different composition contract: its exact two-tool roster intentionally includes str_replace_editor beside persistent bash.
Decision
The standard, code, and cordis preset configurations mount dsh-tool-fs and dsh-tool-fs-search, but do not mount dsh-tool-str-replace-editor. PTC mode therefore omits str_replace_editor from both its registry and generated SDK. The minimal preset continues to mount dsh-tool-str-replace-editor, and deployments or user-authored presets may still mount the plugin explicitly.
This decision narrows the preset roster rather than removing the tool package or its Python runtime support. The earlier shared-roster decision continues to own why surface-neutral tools live in preset composition; this note owns the editor exception.
Alternatives considered
Keep both editing interfaces in the general-purpose presets. Rejected because the overlapping model-visible schemas increase tool choice without supplying a separate default operation.
Remove str_replace_editor from every shipped composition. Rejected because the minimal preset intentionally exposes that schema as one of its two tools, and explicit deployments remain valid consumers of the standalone plugin.
Consequences
General-purpose agents use read, write, and edit for filesystem mutations, while the minimal agent retains str_replace_editor. Preset composition tests pin its absence from the standard roster, the Cordis roster, and the PTC mode SDK, while the minimal assertions continue to pin its presence.