Add two sentences to the Node run_code output instructions shared by every execution mode: use the raw form of a template literal only for short text whose backslashes must stay as written, write other text as ordinary strings, and write file contents as an array of quoted line strings joined with newlines.
description, kind
| description | kind |
|---|---|
| Package map for the PTC execution capability family: what program execution does for you, and which package owns each part. | package-group |
ptc-runtime/ — PTC execution capability family
English | 中文
Summary
The ptc-runtime/ group executes model programs against host-provided async functions. Node evaluates async function bodies, REPL statements or VM Scripts under the configured file policy. Async function bodies use fresh processes; REPL mode retains one process per explicit state owner; Script retention is optional through scriptPersistence. Memory ends with the process or owner. Failures return as results for callers to diagnose or present to the model.
Table of Contents
Packages
These two packages together provide program execution; each README describes what its part does.
| Package | Role | ctx key |
|---|---|---|
ptc-runtime/ |
Defines what a PTC runtime does: run one program against host-provided bindings and report what it printed and returned | ctx.ptcRuntime |
ptc-runtime-node/ |
Evaluates TypeScript as async function bodies, REPL statements or VM Scripts, with file policy and optional retained state | registers ctx.ptcRuntime |
Related documentation
Start with the subsystem reference for the service contract, then the PTC mode design that consumes this capability and the capability-seam model it follows.
- PTC runtime subsystem reference — request/result vocabulary, bindings, and the
ctx.ptcRuntimeCordis surface. - PTC mode Agent Note — how the tool registry presents
run_codeto the model. - Capability seams — the Service Definition / Service Provider / Consumer split this family follows.
Dev Note
Working context for maintainers — click to expand
None.