Files
deepseek-harness/packages/ptc-runtime
Tianyi Cui dd15a5d066 test(ptc): cover provider unload during policy cleanup
Hold cleanup of an older retained process while a newer call is waiting, then unload the provider. Require the pending call to reject after disposal without starting another process.

Validation: 305 focused tests passed, one skipped; persistent.ts, index.ts, and policy-processes.ts have 100% statements, branches, functions, and lines. Removing the shutdown guard makes the new regression fail.
2026-10-10 22:39:34 +08:00
..

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. The default Node backend starts a fresh process under the configured sandbox policy. Its opt-in executionMode: persistent-in-memory keeps a separate confined REPL for each explicit state owner; memory ends with the process or owner. The experimental Python backend uses a fresh CPython process. Failures return as results for callers to diagnose or present to the model.

Table of Contents


Packages

These three 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/ Executes TypeScript in fresh processes under file policy or an opt-in retained REPL under the same file policy registers ctx.ptcRuntime
experimental/ptc-runtime-python/ The experimental Python backend: owns the fd-3 wire protocol between a Node host and a CPython subprocess and the CPython runtime implementation —

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.

Dev Note

Working context for maintainers — click to expand

None.