pi-mono/scripts
Mario Zechner 5507d76ee8 feat(agent,ai): add narrow subpath exports so clients skip the barrel
A barrel forces Node to evaluate its whole graph: importing reduceLaneSnapshot
(1 file, 6 KB) through pi-agent-core's index evaluated 106 files, and mini's
server loaded 112 files to enumerate JSONL headers. Types are free, so this only
ever affected value imports.

pi-ai gains ./utils/* alongside the existing ./providers/* and ./api/*
wildcards. pi-agent-core gains ./harness/context, ./harness/env/nodejs,
./harness/runtime/reducer and ./harness/session, and ./session/testing becomes
./harness/session/testing so every export mirrors its source path. The barrel
and ./node keep their batteries-included semantics.

The session layer takes uuidv7 from @earendil-works/pi-ai/utils/uuid rather than
the pi-ai barrel, which is what let ./harness/session drop from 42 files to 19.
Two imports there were written `import { type Usage } from` - not a type-only
statement, so it emitted a runtime import of the barrel.

scripts/check-entry-graphs.mjs walks each declared entry's value-import graph and
enforces per-entry budgets and forbidden paths, so a stray `export *` cannot
silently undo this. It caught the two `import { type ... }` regressions above.

Measured with mini: server 112 files and 98 MB to 28 files and 69 MB, presentation
204 files and 125 MB to 99 files and 110 MB. The worker still loads the provider
graph, correctly.
2026-08-26 22:02:31 +02:00
..
agent-treeshake-smoke-entry.ts fix(agent): restore streamFn extension compatibility 2026-07-21 18:37:07 +02:00
auto-pi.sh fix(coding-agent): support bundled experimental processes 2026-08-24 14:17:17 +02:00
browser-smoke-entry.ts feat(agent): remove pi prefixes from client and server APIs 2026-08-20 10:51:04 +02:00
build-binaries.sh fix(coding-agent): avoid duplicate clipboard binaries 2026-08-23 09:28:36 +02:00
build-coding-agent-bundle.mjs fix(coding-agent): support bundled experimental processes 2026-08-24 14:17:17 +02:00
check-browser-smoke.mjs feat(ai): derive generated model types from JSON 2026-07-22 13:13:36 +02:00
check-entry-graphs.mjs feat(agent,ai): add narrow subpath exports so clients skip the barrel 2026-08-26 22:02:31 +02:00
check-lockfile-commit.mjs Release v0.75.5 2026-05-23 11:58:31 +02:00
check-pinned-deps.mjs chore: add local release and dependency guards 2026-05-20 13:06:28 +02:00
check-ts-relative-imports.mjs chore: add local release and dependency guards 2026-05-20 13:06:28 +02:00
cost.ts chore: pin dependencies and use native TypeScript 2026-05-20 12:46:17 +02:00
create-source-archive.sh fix(coding-agent): bundle model data in release source 2026-07-24 07:33:09 +02:00
diff-model-catalog.mjs generate-models: use reasoning options from models.dev (#6928) 2026-07-22 08:33:34 +02:00
edit-tool-stats.mjs fix(coding-agent): built-in tools work like extension tools 2026-03-22 04:20:38 +01:00
generate-coding-agent-install-lock.mjs fix(coding-agent): require protobufjs 7.6.5, closes #7005 2026-07-23 23:16:07 +02:00
generate-coding-agent-shrinkwrap.mjs fix(coding-agent): require protobufjs 7.6.5, closes #7005 2026-07-23 23:16:07 +02:00
generate-thinking-capabilities.mjs generate-models: use reasoning options from models.dev (#6928) 2026-07-22 08:33:34 +02:00
local-release.mjs fix: handle npm 12 pack --json object output in local release script 2026-08-08 12:06:59 +02:00
package-workspaces.mjs feat(agent): prepare SQLite storage package for publishing 2026-07-21 14:13:14 +02:00
profile-coding-agent-node.mjs feat(coding-agent): bundle Node runtime (#8474) 2026-08-22 21:19:38 +02:00
publish-model-catalog.mjs fix(ai): replace generic record checks 2026-07-19 22:21:31 +02:00
publish-release-announcement.mjs feat(coding-agent): update managed installations in place 2026-08-24 09:34:34 +02:00
publish-release-announcement.test.mjs fix(coding-agent): announce only verified npm releases 2026-08-06 22:39:09 +02:00
publish.mjs fix(coding-agent): announce only verified npm releases 2026-08-06 22:39:09 +02:00
read-tool-stats.mjs feat(scripts): add session context stats 2026-05-07 22:18:19 +02:00
release-notes.mjs fix(coding-agent): fix changelog links 2026-06-08 20:31:20 +02:00
release-packages.mjs fix(coding-agent): announce only verified npm releases 2026-08-06 22:39:09 +02:00
release.mjs fix(coding-agent): announce only verified npm releases 2026-08-06 22:39:09 +02:00
repro-5893-wsl-bash.mjs fix(coding-agent): run legacy WSL bash commands via stdin 2026-06-19 15:08:25 +02:00
session-context-stats.mjs feat(scripts): add session context stats 2026-05-07 22:18:19 +02:00
session-transcripts.ts chore: pin dependencies and use native TypeScript 2026-05-20 12:46:17 +02:00
stats.ts chore: pin dependencies and use native TypeScript 2026-05-20 12:46:17 +02:00
sync-versions.js fix: drop harness-pi-ai and its legacy registry aliases from evals 2026-07-25 14:36:32 +02:00
sync-versions.test.mjs fix: drop harness-pi-ai and its legacy registry aliases from evals 2026-07-25 14:36:32 +02:00
tool-stats.ts fix(oauth): harden browser launch handling 2026-06-02 23:15:46 +02:00
update-source-imports-to-ts.sh chore(ts): use source import extensions 2026-05-20 00:04:03 +02:00