pi-ptc-subagents 7.3.0 → 7.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -81,6 +81,35 @@ URL tracks the latest GitHub Release (pinned URLs get no update checks); run `/r
81
81
  activate. A bundled `ptc` skill teaches the model when to write a program instead of
82
82
  fanning out tool calls one by one.
83
83
 
84
+ ## The engine on its own (no model, no pi)
85
+
86
+ The PTC runtime is a zero-dependency engine inside this package. Install it and run programs
87
+ with no model in the loop — a batch job, a CI step, or a script you wrote yourself.
88
+
89
+ ```bash
90
+ npm i pi-ptc-subagents
91
+ ```
92
+
93
+ ```ts
94
+ import { createFsBindings, runPtcProgram } from "pi-ptc-subagents/ptc";
95
+
96
+ const outcome = await runPtcProgram({
97
+ code: `const files = await tools.glob({ pattern: "*.md" });
98
+ return { files, hits: await tools.grep({ pattern: "TODO", path: "." }) };`,
99
+ bindings: createFsBindings(process.cwd()),
100
+ cwd: process.cwd(),
101
+ });
102
+ ```
103
+
104
+ Or from the shell:
105
+
106
+ ```bash
107
+ ptc prog.ts --workdir .
108
+ ```
109
+
110
+ The program sees the same vm cell as on pi: `tools.*` is the only door out, and the file tool
111
+ set is confined to `workdir`. The engine pulls in nothing — no pi, no dependencies at all.
112
+
84
113
  ## Install (pi)
85
114
 
86
115
  ```bash
@@ -128,9 +157,14 @@ full pi process running as you. `bash` is not in the program binding table on ei
128
157
 
129
158
  pi `>= 0.86.0`, tracked against latest (currently 1.4.0). Two version facts matter:
130
159
 
131
- - **In-program `tools.*` needs pi ≥ 0.99.** On 0.86/0.87 a program still evaluates and can
132
- still dispatch a task, but session-tool calls fail with a clear version error. The
133
- codemode surface itself also only exists from 0.99.
160
+ - **In-program session tools need pi ≥ 0.99 for the nested call channel.** On 0.86/0.87 a
161
+ program still evaluates, still dispatches tasks, and still calls `read` / `write` / `edit` /
162
+ `grep` / `ls` / `find` — pi has no nested tool-call channel there, so the extension builds
163
+ pi's own tool definitions (its public `create*ToolDefinition` factories) and calls them
164
+ directly. Same tools, same parameter shapes as 0.99; only the call path differs. The
165
+ codemode surface itself still only exists from 0.99. That fallback is gated on the pi
166
+ version: on 0.99+ a missing call channel is an error, not a silent bypass of pi's tool
167
+ pipeline.
134
168
  - Everything else in the 0.86–1.4 range is covered by real-machine smoke tests, including
135
169
  a program that dispatches a real child process. Per-version details:
136
170
  [docs/pi-version-matrix.md](./docs/pi-version-matrix.md).