chore(vendor): import pi 1.3.0

Imported as a linear vendor commit so forge rebases do not replay the upstream root tree.

git-subtree-dir: third_party/pi

git-subtree-split: 71023aec1546d6d677a65669c5665c0927ce0dd0
This commit is contained in:
2026-10-15 17:58:48 -04:00
parent 719370c8f7
commit 6081e3e325
1743 changed files with 205460 additions and 131705 deletions

View File

@@ -21,24 +21,55 @@ const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..");
const WORKSPACE = {
"@earendil-works/chord": "packages/chord/src",
"@earendil-works/pi-ai": "packages/ai/src",
"@earendil-works/pi-durable": "packages/durable/src",
"@earendil-works/pi-agent-core": "packages/agent/src",
"@earendil-works/pi-codemode": "packages/codemode/src",
"@earendil-works/pi-telemetry": "packages/telemetry/src",
"@earendil-works/pi-mcp": "packages/mcp/src",
"@earendil-works/pi-tui": "packages/tui/src",
};
/**
* Budgets are deliberate. `.` and `./node` are batteries-included entries and stay unbounded; every
* narrow entry states the graph it is allowed to reach.
* Budgets are deliberate. Entries with no budget remain unbounded; each listed entry states the
* graph it is allowed to reach.
*/
const BUDGETS = {
"packages/ai": {
"./models": {
maxFiles: 15,
forbid: ["providers/", "models.generated.ts", "index.ts", "utils/validation.ts", "utils/typebox-helpers.ts"],
},
"./utils/*": { maxFiles: 3, forbid: ["providers/", "api/", "index.ts"] },
},
"packages/agent": {
"./harness/runtime/reducer": { maxFiles: 1 },
"./harness/context": { maxFiles: 6, forbid: ["harness/runtime/", "harness/execution/", "packages/ai/"] },
"./harness/env/nodejs": { maxFiles: 5, forbid: ["packages/ai/", "harness/runtime/"] },
"./harness/session": { maxFiles: 25, forbid: ["harness/runtime/", "harness/execution/", "packages/ai/src/index.ts"] },
"packages/codemode": {
// Node and Bun users never load the Cloudflare entry, which imports the `cloudflare:workers` built-in.
".": { maxFiles: 12, forbid: ["codemode/src/cloudflare.ts"] },
// Runtimes without Node built-ins (Workers, browsers) import these; neither may reach the worker-thread host
// or the file-based wasm loader.
"./portable": {
maxFiles: 8,
forbid: ["codemode/src/index.ts", "runtime/host.ts", "runtime/worker.ts", "codemode/src/wasm.ts"],
},
"./cloudflare": {
maxFiles: 9,
forbid: ["codemode/src/index.ts", "runtime/host.ts", "runtime/worker.ts", "codemode/src/wasm.ts"],
},
},
"packages/durable": {
".": {
// Tool argument validation reaches TypeBox; provider-session creation reaches pi-ai's lean UUID utility; the
// memory and SQLite storages share scan order and cursor handling. Values from Chord's root (copyJson,
// replicatedState) reach its host runtime through the root barrel.
maxFiles: 66,
forbid: [
"packages/ai/src/index.ts",
"packages/ai/src/utils/typebox-helpers.ts",
// Photon (WebAssembly) loads only through `./images`.
"packages/durable/src/images/",
],
},
// The file tools reach their environment helpers and the Harness definitions they need, not the Harness itself.
"./tools": { maxFiles: 17, forbid: ["packages/durable/src/images/"] },
},
};