pi-ptc-subagents 0.1.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/CHANGELOG.md ADDED
@@ -0,0 +1,58 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [0.1.0] - 2026-09-22
9
+
10
+ First npm release. Ports DSH PTC mode — Programmable Tool Calling, formerly
11
+ DSH "Code Mode" — to `pi`. Behaviour tracks
12
+ [`deepseek-ai/deepseek-harness`](https://github.com/deepseek-ai/deepseek-harness).
13
+ Not a new design. Re-alignment.
14
+
15
+ Install with `pi install npm:pi-ptc-subagents`. PTC tools register on next
16
+ `pi` startup. No postinstall hook. No setup.
17
+
18
+ ### Added
19
+
20
+ - **`ptc_run_code`**. Model submits a JS/TS program. Multiple tools execute
21
+ in one shot. Return value and collected logs return to context. Worker
22
+ protocol, dispatcher, and surfaces back it.
23
+ - **`ptc_workflow`**. Narration over `ptc_run_code`. Uses the in-program
24
+ `log()` helper.
25
+ - **`pi.dispatch` binding**. PTC programs fan out to a fresh per-call `pi`
26
+ subprocess. DSH parity.
27
+ - **Builtin bindings**. `read`, `bash`, `edit`, `write`, `grep`, `find`,
28
+ `ls`. Callable from a PTC program as `tools.<name>(args)`. DSH parity.
29
+ - **Hoisted images**. Successful bindings lift image blocks onto the PTC
30
+ tool result. The model sees the picture. The program never carries it
31
+ through the return value. Parity with `dsh-tools`'s `exec.deferContext`.
32
+ - **Value-tree rendering**. Container completion values render as a tree.
33
+ One row per property or array index. Bounded by depth and width caps.
34
+ Withheld amount is shown in-band. Scalar values render as one-line hints.
35
+ - **Truncation contract**. Model-facing text honors `pi`'s truncation cap.
36
+ Container values render as compact PTC rows.
37
+ - **Skills restored**. The skills section `pi` withholds is restored. PTC
38
+ programs call them as bindings. DSH parity.
39
+ - **Build verification scripts**. `verify:dist`, `json-to-tui`,
40
+ `preview-ptc-render`. Run before publishing.
41
+
42
+ ### Changed
43
+
44
+ - Build pipeline switched to `vite-plus` (`vp pack`). Type declarations
45
+ bundle via `rolldown-plugin-dts`.
46
+ - Tooling moved to pnpm 12.5.1. `vitest` coverage pinned. Lockfile
47
+ determinism set via `minimumReleaseAge: 0`.
48
+ - Lint and format moved to `oxlint` (type-aware) and `oxfmt`.
49
+
50
+ ### Fixed
51
+
52
+ - `pi.dispatch` now spawns `pi` directly. The host script used to swallow
53
+ the child's exit.
54
+ - `maxPendingCalls` stays in the worker. The caller no longer trips on
55
+ arrivals.
56
+ - Bindings mirror the session's active tools. A session that disables a
57
+ tool also disables it inside PTC programs.
58
+ - pnpm overrides dropped. No-op under pnpm 12.5.1.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,191 @@
1
+ # pi-ptc-subagents
2
+
3
+ DSH-style **PTC mode** (Programmable Tool Calling) for [pi](https://pi.dev):
4
+ the model writes a JS/TS program that calls pi's tools from inside a worker,
5
+ and only the program's return value plus its logs come back to the model.
6
+
7
+ ## Status
8
+
9
+ Pre-1.0, but functional: `ptc_run_code` and `ptc_workflow` are registered and run
10
+ programs through the same tested worker machinery (dispatcher, wire protocol,
11
+ budgets, built-in bindings). The implementation is written clean-room from
12
+ [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) PTC
13
+ behaviour (tracked as a wayfinder map in this repo's issues).
14
+
15
+ ## Install
16
+
17
+ ```bash
18
+ pi install npm:pi-ptc-subagents
19
+ ```
20
+
21
+ From a local checkout: `pnpm install && pnpm run build && pi install /abs/path/to/this/repo` (or `npm install && npm run build && …` — the lockfile is `pnpm-lock.yaml`; with npm you'll need `npm i` to regenerate `package-lock.json`).
22
+
23
+ pi reads the `pi.extensions` manifest field, so no extra setup steps are
24
+ required — install it and the extension is on for the next pi startup.
25
+
26
+ ## Tools
27
+
28
+ - `ptc_run_code` — run a JS/TS program that composes tool calls; the program
29
+ reaches tools as `tools.read(...)`, `tools.write(...)`, etc. (all seven
30
+ built-ins, `bash` included); its return value and `console.log` output are
31
+ reported back.
32
+ - `ptc_workflow` — structured variant with `meta` + plain-JSON `args`, plus the
33
+ workflow helpers (`log`, `phase`, `parallel`, `pipeline`). There is no
34
+ `agent()` helper on either surface.
35
+
36
+ Long output follows pi's own truncation contract ([ADR-0015](./docs/adr/0015-pi-truncation-contract.md)):
37
+
38
+ the text block keeps the tail (50 KB / 2000 lines) and the untruncated text is written to a temp file
39
+
40
+ the next program can `tools.read`; the collapsed row then shows `truncated` in its meta.
41
+
42
+ ## Dispatch (fan-out to per-call pi subprocesses)
43
+
44
+ PTC programs can spawn a fresh `pi` subprocess per call via the **`pi.dispatch(...)`** binding ([ADR-0016](./docs/adr/0016-ptc-dispatch-binding.md)). Use it to fan out to a specialist agent — the child subprocess loads the named agent's markdown from `~/.pi/agent/agents/<name>.md` (or `.pi/agents/<name>.md` for project-scope agents), runs that agent's tool set and system prompt in isolation, and returns a structured result.
45
+
46
+ ```ts
47
+ // inside a ptc_run_code program
48
+ const result = await pi.dispatch({
49
+ agent: "scout",
50
+ task: "find all auth code in src/",
51
+ cwd: process.cwd(),
52
+ });
53
+
54
+ // result.status: "fulfilled" | "rejected" (the binding never throws)
55
+ // result.text: final assistant text
56
+ // result.usage: { input, output, cacheRead, cacheWrite, cost, turns }
57
+ // result.exitCode, result.durationMs, result.stderr?, result.errorMessage?
58
+ ```
59
+
60
+ **Fan out in parallel** with the rest of PTC's tools — dispatch is a binding, not a model-visible lifecycle tool, so the dispatcher handles concurrency the same way it does for any other tool call:
61
+
62
+ ```ts
63
+ const [read, scoutA, scoutB] = await Promise.all([
64
+ tools.read({ path: "package.json" }),
65
+ pi.dispatch({ agent: "scout", task: "review auth" }),
66
+ pi.dispatch({ agent: "scout", task: "review db" }),
67
+ ]);
68
+ ```
69
+
70
+ **Bounded.** Three knobs keep fan-out from running away:
71
+
72
+ - `PtcConfig.dispatchConcurrency` (default **8**) — hard cap on concurrently in-flight `pi.dispatch` calls per run. The N+1th concurrent call resolves immediately with `{ status: "rejected", errorMessage: "dispatch concurrency limit reached" }` instead of queuing or spawning.
73
+ - `PtcConfig.maxDispatchDepth` (default **3**) — recursion bound. The child subprocess loads pi-ptc too, so it can write its own PTC programs and call `pi.dispatch` itself; the `childDepth = parentDepth + 1` is rejected when it would exceed `maxDispatchDepth`. The child sees a `<pi-ptc-context depth="N" max-depth="M">…</pi-ptc-context>` hint appended to its system prompt so it can budget its recursion.
74
+ - `signal` — when the parent run is cancelled (deadline, abort, user Esc), every in-flight child receives `SIGTERM` followed by `SIGKILL` after a 5-second grace window, the same shape as pi's `examples/extensions/subagent/index.ts` reference.
75
+
76
+ **Opt out.** Pass an explicit binding subset to `createBuiltinBindings` to opt out — the parallel binding is mixed in only when the caller accepts the default set:
77
+
78
+ ```ts
79
+ // in a hypothetical runner that wants to keep reads-only:
80
+ createBuiltinBindings({ cwd: "/abs/path", names: ["read", "grep"] });
81
+ // `pi.dispatch` is NOT in the resulting table.
82
+ ```
83
+
84
+ **Not a subagent.** The term _subagent_ is overloaded in this field (DSH's `subagent` is a different thing; pi's `examples/extensions/subagent/` extension is also a different thing). pi-ptc uses _parallel binding_ and _concurrent tool call_ throughout; see `CONTEXT.md` for the canonical terms.
85
+
86
+ ## TUI rendering
87
+
88
+ Both tools register custom `renderCall` / `renderResult` hooks, so a PTC run reads as a program
89
+ rather than as yet another file operation ([ADR-0013](./docs/adr/0013-ptc-row-compact-summary.md)):
90
+
91
+ ```
92
+ PTC Find AssistantMessageComponent instantiations
93
+ ├─ file: "chat-viewport.ts" • 1 output line · 1.42s
94
+ ├─ instantiations: Array(3)
95
+ │ ├─ [0] {file: "chat-viewport.ts", line: 23}
96
+ │ ├─ [1] {file: "chat-viewport.ts", line: 47}
97
+ │ └─ [2] {file: "chat-viewport.ts", line: 91}
98
+ └─ totalLines: 47
99
+ ```
100
+
101
+ The call row is the tool label plus the model's `description`. Under it, the completion value is
102
+ shown as a **tree**: an object or array with content gives one row per property (or index), nested
103
+ containers recurse behind `├─` / `└─` / `│` connectors, and a small all-scalar container collapses
104
+ onto one row (`{file: "a", line: 12}`). Depth caps at 4 levels, 6 children per container and 120
105
+ characters per row; whatever is withheld is reported (`…+N more keys`, a trailing `…`). A scalar
106
+ value is one line instead — `→ 47`, `→ {}`, `done` when the program returned nothing, or
107
+ `failed: <reason>` in red. The run's countable facts — output lines, workflow phases, attached
108
+ images, warnings, duration — stay pinned to the right edge of the area's first row. Nothing is ever
109
+ printed as escaped JSON. Expanding a row (ctrl+e) adds the code head, phase roll-up, `console.log`
110
+ output and plan-drift warnings, each block labelled and capped. `renderShell` stays at pi's default,
111
+ so these rows keep the same box and colors as the built-in tools.
112
+
113
+ ## Images
114
+
115
+ An image read _inside_ a program — `await tools.read({ path: "shot.png" })` — is attached to the PTC
116
+ tool result as a real image block, so the model sees the picture instead of a marker string or a wall
117
+ of base64. This is what DSH does by deferring a context message after the run
118
+ ([ADR-0014](./docs/adr/0014-image-hoisting.md)). Nothing is capped or deduped: every image the program's
119
+ tool calls produced is attached, in call order, because how much context a run spends is the program's
120
+ call. The collapsed row's meta shows the count (`· 1 image`), so the volume is visible without being
121
+ policed. The program receives the image either way.
122
+
123
+ ## PTC default mode
124
+
125
+ On a TUI start — install, restart, done — the session narrows its tool loadout so the built-in
126
+ tools are reachable only _from inside a program_:
127
+
128
+ ```
129
+ PTC Verify the inserted image file
130
+ → {file, clipNow} • 6 output lines · 1 image · 536ms
131
+ ```
132
+
133
+ The model calls `ptc_run_code` / `ptc_workflow`, and reaches `read` / `bash` / `edit` / `write` /
134
+ `grep` / `find` / `ls` through `tools.<name>(args)` inside the program. Tools contributed by _other_
135
+ extensions (`web_search`, `todo`, …) stay directly callable — they cannot become bindings
136
+ (`pi.getAllTools()` returns metadata, not `execute`), so hiding one would make it unreachable for
137
+ the session. The mode's rationale and rejected alternatives are in [ADR-0010](./docs/adr/0010-ptc-default-mode.md).
138
+
139
+ **Turning it off.** For one session: `/ptc off` (and `/ptc on`, `/ptc` for status). Permanently:
140
+
141
+ ```jsonc
142
+ // ~/.pi/agent/ptc.json
143
+ { "defaultMode": false }
144
+ ```
145
+
146
+ **Where it does not run.** Print / JSON / RPC sessions are left exactly as launched, and so is a
147
+ session started with an explicit tool restriction (`--tools`, `--exclude-tools`,
148
+ `--no-builtin-tools`) — the extension does not override what you asked for. If another extension
149
+ changes the tool set while the mode is on, the mode yields and tells you.
150
+
151
+ **The important consequence:** in a TUI session, bindings come from the loadout recorded _before_
152
+ the mode narrowed it. That is what keeps `tools.read(…)` working — and it is why a `--tools`
153
+ restriction still holds: the snapshot is read from `pi.getActiveTools()`, so it can never contain
154
+ tools your session was not launched with.
155
+
156
+ ## Trust posture (read me)
157
+
158
+ - Installing this package grants it the same machine access as any pi
159
+ extension: PTC programs run as **you**, with no OS-level sandbox (ADR-0007).
160
+ - Bindings mirror the session's **enabled** built-in tools (`pi.getActiveTools()`):
161
+ a session started with `--tools …` / `--no-builtin-tools` can only reach those
162
+ tools from inside a PTC program (a default session has `read`, `bash`, `edit`,
163
+ `write` — enable more to bind more).
164
+ - Tool calls made from inside a PTC program execute directly and **bypass**
165
+ pi's `tool_call` hooks (permission gates, path guards) — see ADR-0005. Do not
166
+ rely on those guards to constrain tool use while this extension is enabled.
167
+
168
+ ## Development
169
+
170
+ ```bash
171
+ pnpm install
172
+ pnpm run typecheck # tsc --noEmit
173
+ pnpm run lint # oxlint (`pnpm run lint:fix` applies fixes)
174
+ pnpm run fmt # oxfmt (writes); `pnpm run fmt:check` verifies
175
+ pnpm test # vp test --run --coverage (Vitest 4; coverage via @vitest/coverage-v8)
176
+ pnpm run test:watch # vp test (interactive)
177
+ pnpm run test:ui # vp test --ui (local browser UI; not for CI)
178
+ pnpm exec vp test --run tests/render-ptc.test.ts # renderer unit tests only
179
+ pnpm run build # vp pack + declaration emit
180
+ pnpm run verify:dist # exercise renderCall/renderResult through the built dist (no LLM needed)
181
+ node scripts/preview-ptc-render.mjs # print the rendered rows with real theme colors
182
+ ```
183
+
184
+ Tooling: [oxc](https://oxc.rs) — `oxlint` + `oxfmt` (official defaults) — alongside
185
+ `rolldown` (also oxc-powered), `vite-plus` (bundles Vitest 4), and TypeScript 7.
186
+
187
+ See ADR-0009 for the Vitest adoption decision (reopens ADR-0008's earlier deferment).
188
+
189
+ ## License
190
+
191
+ Apache-2.0