Files
deepseek-harness/packages/ptc-runtime
imccyu 73dbbb751c docs: give architecture review rules a per-artifact home
Move `docs/defensive-patterns.md` into `docs/defensive-patterns/`, one page per
artifact plus a README router, and state each rule as its requirement, the
condition a reviewer judges it by, its boundary and approver, and a correct and
a wrong example.

- `general.md` (the moved page): the existing bug-class rules plus timing,
  value representation, shared-state ownership, decentralization, performance
  evidence, and migrations.
- `package-surface.md`, `remote-and-api.md`, `client-components.md`,
  `conversation-and-session.md`: the review requirements for those artifacts,
  linking type definitions and semantics to `docs/subsystems/` instead of
  restating them.
- `README.md`: the habits behind the rules and the route from artifact to page.
- `dsh-code-review` reads the owning pages before judging a diff; the
  `dsh-architecture-discipline` routing skill is retired in favour of the
  directory, and every inbound reference is repaired.
- Chinese counterparts, pairing records, and the documentation tier table are
  updated together.
2026-10-09 23:03:56 +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 lets a model write one program that calls host-provided functions as ordinary async calls, then returns only the program's printed output and return value. Choose the TypeScript backend for execution in a fresh Node process under the configured sandbox policy, or the experimental Python backend when a CPython process is required. Each run starts without state from earlier programs. Failures are returned as results so callers can diagnose them or provide them 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 managed Node processes under the resolved sandbox 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.