diff --git a/README.md b/README.md index 3dbe4c8..52e2030 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Pi Monorepo -[Pi](https://github.com/badlogic/pi-mono) is a minimal terminal coding agent. It ships four tools, four execution modes, and a philosophy: adapt Pi to your workflows, not the other way around. Users extend it with TypeScript extensions, skills, prompt templates, and shareable packages. +[Pi](https://github.com/earendil-works/pi) is a minimal terminal coding agent. It ships four tools, four execution modes, and a philosophy: adapt Pi to your workflows, not the other way around. Users extend it with TypeScript extensions, skills, prompt templates, and shareable packages. This repo builds the pieces that extend Pi and teach other coding agents about it. @@ -10,6 +10,8 @@ This repo builds the pieces that extend Pi and teach other coding agents about i **[`packages/pi-web-search`](packages/pi-web-search/)** -- An extension that adds `web_search` and `web_fetch` tools. Three search backends (Brave, Tavily, Exa) behind a single interface with automatic provider ranking and fallback. Page fetching via Jina Reader. +**[`packages/pi-memory`](packages/pi-memory/)** -- An extension that adds explicit, Markdown-backed durable memory with global and project scopes. + **[`packages/skill-pi`](packages/skill-pi/)** -- The `pi` skill packaged for `npm`, so `pi install` can fetch it from the registry. ## Install @@ -21,6 +23,9 @@ pi install npm:@counterposition/skill-pi # the web search extension pi install npm:@counterposition/pi-web-search + +# the memory extension +pi install npm:@counterposition/pi-memory ``` --- @@ -58,6 +63,7 @@ pnpm --filter @counterposition/pi-web-search exec vitest run tests/providers.tes skills/pi/ canonical skill source (loaded by Pi and Agent Skills) packages/skill-pi/ npm package wrapping the pi skill packages/pi-web-search/ web search extension (TypeScript, vitest tests) +packages/pi-memory/ durable Markdown memory extension scripts/ validators and sync utilities docs/ architecture, ADRs, contributor guides .pi/settings.json project-local Pi config diff --git a/docs/architecture.md b/docs/architecture.md index a762ea0..e5984ef 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -42,3 +42,4 @@ This repository separates canonical skill authoring from publishable Pi packages - `skills/pi` - canonical Pi skill. - `packages/skill-pi` - single-skill npm distribution for `pi install` and local package smoke tests. - `packages/pi-web-search` - web search extension package and local package smoke-test target. +- `packages/pi-memory` - durable memory extension package and local package smoke-test target. diff --git a/docs/publishing.md b/docs/publishing.md index f6dc72d..b0ff0d1 100644 --- a/docs/publishing.md +++ b/docs/publishing.md @@ -6,6 +6,7 @@ npm is the primary registry for Pi-installable packages in this repo. - `@counterposition/skill-pi` ships the `pi` skill for `pi install npm:@counterposition/skill-pi`. - `@counterposition/pi-web-search` ships the web search extension for `pi install npm:@counterposition/pi-web-search`. +- `@counterposition/pi-memory` ships the durable memory extension for `pi install npm:@counterposition/pi-memory`. All publishable packages must include: diff --git a/packages/pi-memory/CHANGELOG.md b/packages/pi-memory/CHANGELOG.md new file mode 100644 index 0000000..4f75aaa --- /dev/null +++ b/packages/pi-memory/CHANGELOG.md @@ -0,0 +1,15 @@ +# Changelog + +## 0.2.0 + +### Minor Changes + +- Update Pi peer dependencies and extension imports to the official + `@earendil-works/*` package scope for Pi 0.74. +- Treat `typebox` as a Pi-provided peer dependency for extension schemas. + +## 0.1.0 + +### Minor Changes + +- Initial durable Markdown-backed memory package for Pi. diff --git a/packages/pi-memory/README.md b/packages/pi-memory/README.md index c6b0cab..fc34f73 100644 --- a/packages/pi-memory/README.md +++ b/packages/pi-memory/README.md @@ -1,7 +1,7 @@ # Pi Memory `@counterposition/pi-memory` is a -[Pi](https://github.com/badlogic/pi-coding-agent) extension that gives the +[Pi](https://github.com/earendil-works/pi) extension that gives the agent a durable, human-readable memory store on disk. V1 ships a private Markdown-backed store under Pi's resolved agent directory, diff --git a/packages/pi-memory/docs/pi-073-integration-plan.md b/packages/pi-memory/docs/pi-073-integration-plan.md index 275b31a..8c6c8b6 100644 --- a/packages/pi-memory/docs/pi-073-integration-plan.md +++ b/packages/pi-memory/docs/pi-073-integration-plan.md @@ -46,12 +46,12 @@ the prompt-injection bug pass typecheck. Next steps: -- Prefer typechecking against the real `@mariozechner/pi-coding-agent@0.73.x` +- Prefer typechecking against the real `@earendil-works/pi-coding-agent@0.74.x` declarations in dev/test. - If an ambient shim remains necessary, narrow it to the exact current event/result shapes used by this package. - Update imports toward the documented `typebox` package for schemas while - keeping `StringEnum` from `@mariozechner/pi-ai`. + keeping `StringEnum` from `@earendil-works/pi-ai`. - Add type-level coverage for `BeforeAgentStartEventResult` so return-vs-mutate mistakes are harder to reintroduce. @@ -109,7 +109,7 @@ Next steps: The v1 design doc says `/dream` is blocked because extensions lack a supported LLM-call path. That is no longer strictly accurate: current Pi examples show -extension-launched model calls through `@mariozechner/pi-ai` and +extension-launched model calls through `@earendil-works/pi-ai` and `ctx.modelRegistry`. Next steps: diff --git a/packages/pi-memory/docs/v1-design.md b/packages/pi-memory/docs/v1-design.md index 27534de..33194fc 100644 --- a/packages/pi-memory/docs/v1-design.md +++ b/packages/pi-memory/docs/v1-design.md @@ -953,7 +953,7 @@ normal conversation and performs bounded memory hygiene. It is **deferred past v1** for product-risk reasons: it can create or rewrite durable memory without the user watching each change, and mistakes would be harder to notice than ordinary tool output. Current Pi examples show extension-launched model work is -technically possible through `@mariozechner/pi-ai` plus +technically possible through `@earendil-works/pi-ai` plus `ctx.modelRegistry.getApiKeyAndHeaders()`, so the blocker is not impossibility. V1 still rejects `/dream` because maintenance needs a stricter contract than @@ -1157,7 +1157,7 @@ model-backed maintenance or new durable writes to either lifecycle event. managed write path's validation, symlink checks, secret filtering, and atomic temp-file-and-rename behavior. - Schema definitions should import `Type` from the TypeBox 1.x `typebox` - package while continuing to use `StringEnum` from `@mariozechner/pi-ai`. + package while continuing to use `StringEnum` from `@earendil-works/pi-ai`. ## Prompt Behavior diff --git a/packages/pi-memory/extensions/memory.ts b/packages/pi-memory/extensions/memory.ts index 1fccac6..ab1ae5f 100644 --- a/packages/pi-memory/extensions/memory.ts +++ b/packages/pi-memory/extensions/memory.ts @@ -1,4 +1,5 @@ -import { CustomMessageComponent } from "@mariozechner/pi-coding-agent"; +import { StringEnum } from "@earendil-works/pi-ai"; +import { CustomMessageComponent } from "@earendil-works/pi-coding-agent"; import type { BeforeAgentStartEvent, BeforeAgentStartEventResult, @@ -7,8 +8,7 @@ import type { MessageRenderer, ToolCallEvent, ToolCallEventResult, -} from "@mariozechner/pi-coding-agent"; -import { StringEnum } from "@mariozechner/pi-ai"; +} from "@earendil-works/pi-coding-agent"; import { Type } from "typebox"; import { diff --git a/packages/pi-memory/package.json b/packages/pi-memory/package.json index a2f20f5..b885b3a 100644 --- a/packages/pi-memory/package.json +++ b/packages/pi-memory/package.json @@ -1,6 +1,6 @@ { "name": "@counterposition/pi-memory", - "version": "0.1.0", + "version": "0.2.0", "description": "Durable Markdown-backed memory for Pi", "keywords": [ "memory", @@ -43,22 +43,21 @@ "check": "pnpm run lint && pnpm run format:check && pnpm run typecheck && pnpm run test", "pack:check": "pnpm pack --pack-destination ../../.pack" }, - "dependencies": { - "typebox": "^1.1.24" - }, "devDependencies": { - "@mariozechner/pi-ai": "^0.73.0", - "@mariozechner/pi-coding-agent": "^0.73.0", + "@earendil-works/pi-ai": "^0.74.0", + "@earendil-works/pi-coding-agent": "^0.74.0", "@types/node": "^25.5.0", "markdownlint-cli2": "^0.18.1", "oxfmt": "^0.42.0", "oxlint": "^1.57.0", + "typebox": "^1.1.38", "typescript": "^6.0.2", "vitest": "^4.1.2" }, "peerDependencies": { - "@mariozechner/pi-ai": "^0.73.0", - "@mariozechner/pi-coding-agent": "^0.73.0" + "@earendil-works/pi-ai": "*", + "@earendil-works/pi-coding-agent": "*", + "typebox": "*" }, "engines": { "node": ">=24" diff --git a/packages/pi-memory/src/write-path.ts b/packages/pi-memory/src/write-path.ts index b7431bb..28d70db 100644 --- a/packages/pi-memory/src/write-path.ts +++ b/packages/pi-memory/src/write-path.ts @@ -2,7 +2,7 @@ import { randomBytes } from "node:crypto"; import fs from "node:fs/promises"; import path from "node:path"; -import { withFileMutationQueue } from "@mariozechner/pi-coding-agent"; +import { withFileMutationQueue } from "@earendil-works/pi-coding-agent"; import { ensureMemoryRoots, pathIsInside } from "./storage.js"; import { formatIsoDate, parseMemoryFileSource } from "./parser.js"; diff --git a/packages/pi-memory/tests/pi-types.test.ts b/packages/pi-memory/tests/pi-types.test.ts index c31ebfe..35e7740 100644 --- a/packages/pi-memory/tests/pi-types.test.ts +++ b/packages/pi-memory/tests/pi-types.test.ts @@ -2,7 +2,7 @@ import type { BeforeAgentStartEvent, BeforeAgentStartEventResult, ExtensionHandler, -} from "@mariozechner/pi-coding-agent"; +} from "@earendil-works/pi-coding-agent"; import { describe, expect, it } from "vitest"; describe("Pi API type coverage", () => { diff --git a/packages/pi-memory/tests/write-path.test.ts b/packages/pi-memory/tests/write-path.test.ts index cf1e656..04887c9 100644 --- a/packages/pi-memory/tests/write-path.test.ts +++ b/packages/pi-memory/tests/write-path.test.ts @@ -38,7 +38,7 @@ const mutationQueue = vi.hoisted(() => { }; }); -vi.mock("@mariozechner/pi-coding-agent", () => ({ +vi.mock("@earendil-works/pi-coding-agent", () => ({ withFileMutationQueue: mutationQueue.withFileMutationQueue, })); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41bc320..19f509a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,20 +28,16 @@ importers: version: 6.0.2 vitest: specifier: ^4.1.2 - version: 4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3)) + version: 4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(jiti@2.7.0)(yaml@2.8.3)) packages/pi-memory: - dependencies: - typebox: - specifier: ^1.1.24 - version: 1.1.37 devDependencies: - '@mariozechner/pi-ai': - specifier: ^0.73.0 - version: 0.73.0(ws@8.20.0)(zod@4.3.6) - '@mariozechner/pi-coding-agent': - specifier: ^0.73.0 - version: 0.73.0(ws@8.20.0)(zod@4.3.6) + '@earendil-works/pi-ai': + specifier: ^0.74.0 + version: 0.74.0(ws@8.20.0)(zod@4.3.6) + '@earendil-works/pi-coding-agent': + specifier: ^0.74.0 + version: 0.74.0(ws@8.20.0)(zod@4.3.6) '@types/node': specifier: ^25.5.0 version: 25.5.0 @@ -54,12 +50,15 @@ importers: oxlint: specifier: ^1.57.0 version: 1.57.0 + typebox: + specifier: ^1.1.38 + version: 1.1.38 typescript: specifier: ^6.0.2 version: 6.0.2 vitest: specifier: ^4.1.2 - version: 4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3)) + version: 4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(jiti@2.7.0)(yaml@2.8.3)) packages/pi-web-search: dependencies: @@ -84,7 +83,7 @@ importers: version: 6.0.2 vitest: specifier: ^4.1.2 - version: 4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3)) + version: 4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(jiti@2.7.0)(yaml@2.8.3)) packages/skill-pi: {} @@ -427,6 +426,24 @@ packages: '@changesets/write@0.4.0': resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} + '@earendil-works/pi-agent-core@0.74.0': + resolution: {integrity: sha512-6GMR7/wwjEJ1EsXLWEz03QOWin4AMrJ/AZoMpgm5DJ6GHsF6q6GOhQbj5Zip4dow3vo/TmBAVqM+vmGfrjGAFQ==} + engines: {node: '>=20.0.0'} + + '@earendil-works/pi-ai@0.74.0': + resolution: {integrity: sha512-7M7qcrZY/KEkH4wFkX3eqzvmKru4O88wezNKoN0KD2m4aAOmp9tdW2xCmUgSTSWlKB7b2Xw9QtAgrzHtg6t6iw==} + engines: {node: '>=20.0.0'} + hasBin: true + + '@earendil-works/pi-coding-agent@0.74.0': + resolution: {integrity: sha512-Q5GikbB5vRBrsrrf/uvet53rPSQ1sn5I5mO+l7sIobdXYpS04/X2oOc2UHFm90fNdkl3yU+ANTZL0zOtHbnqRw==} + engines: {node: '>=20.6.0'} + hasBin: true + + '@earendil-works/pi-tui@0.74.0': + resolution: {integrity: sha512-1aIfXZp7D/z+1VlZX8BZcs6pgO8rjmil7kwyhctNDsWvce3Yfl8GVgu4eq+I0Mjhr8Cj+ipBiv9CLIzdoyCOIQ==} + engines: {node: '>=20.0.0'} + '@emnapi/core@1.9.1': resolution: {integrity: sha512-mukuNALVsoix/w1BJwFzwXBN/dHeejQtuVzcDsfOEsdpCumXb/E9j8w11h5S54tT1xhifGfbbSm/ICrObRb3KA==} @@ -543,38 +560,20 @@ packages: resolution: {integrity: sha512-h0B20xfs/iEVR2EC4gwiE8hKI1TPeB8REdRJMgV+uXKH7gpeIZ9+s8Dp9nX35ZR0QUjkNey2+ULk2DxQtdg14Q==} engines: {node: '>=20.0.0'} - '@mariozechner/pi-agent-core@0.73.0': - resolution: {integrity: sha512-ugcpvq0X9fr9fTSK29/3S4+KU/eeVMrBb7ZU3HqiF3xD7I1GlgumLj4FYmDrYSEA6+rzgNWlJUKwjKh9o0Z6AA==} - engines: {node: '>=20.0.0'} - '@mariozechner/pi-ai@0.63.1': resolution: {integrity: sha512-wjgwY+yfrFO6a9QdAfjWpH7iSrDean6GsKDDMohNcLCy6PreMxHOZvNM0NwJARL1tZoZovr7ikAQfLGFZbnjsw==} engines: {node: '>=20.0.0'} hasBin: true - '@mariozechner/pi-ai@0.73.0': - resolution: {integrity: sha512-phKOpcde/ssz6UYszkmaGJ9LF9mgt/AP8LrtSwsfap+kMSeFfSQ2/mCSBT1mLJ2BqVuff9uXs1/+op1aQeaafQ==} - engines: {node: '>=20.0.0'} - hasBin: true - '@mariozechner/pi-coding-agent@0.63.1': resolution: {integrity: sha512-XSoMyLtuMA7ePK1UBWqSJ/BBdtBdJUHY9nbtnNyG6GeW7Gbgd+iqljIuwmAUf8wlYL981UIfYM/WIPQ6t/dIxw==} engines: {node: '>=20.6.0'} hasBin: true - '@mariozechner/pi-coding-agent@0.73.0': - resolution: {integrity: sha512-Fs2dRIgtjDT8X5VDGNGzxj251B0FvkRsgX03YJv1FK4wg5Maj+jkf8/5A6tbPnPcXsCgs41xxJRf3tF5vJRccA==} - engines: {node: '>=20.6.0'} - hasBin: true - '@mariozechner/pi-tui@0.63.1': resolution: {integrity: sha512-G5p+eh1EPkFCNaaggX6vRrqttnDscK6npgmEOknoCQXZtch8XNgh9Lf3VJ0A2lZXSgR7IntG5dfXHPH/Ki64wA==} engines: {node: '>=20.0.0'} - '@mariozechner/pi-tui@0.73.0': - resolution: {integrity: sha512-St1W+tMPKHatfK+lblsKfL+SsFyFVMK2tW6xHpBfCiMuevbOCRo/CMatso7mu1642UO04ncmfCrrpUK5L9aoog==} - engines: {node: '>=20.0.0'} - '@mistralai/mistralai@1.14.1': resolution: {integrity: sha512-IiLmmZFCCTReQgPAT33r7KQ1nYo5JPdvGkrkZqA8qQ2qB1GHgs5LoP5K2ICyrjnpw2n8oSxMM/VP+liiKcGNlQ==} @@ -1841,6 +1840,10 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + js-yaml@3.14.2: resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} hasBin: true @@ -2490,8 +2493,8 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} - typebox@1.1.37: - resolution: {integrity: sha512-jb7jp6KvOvvy5sd+11AfJ0/e0F0AS9RcOXd55oGi2ZnRHIGmFvrTaNF+ZidRmGBmmNTkM5KKl0Z37KzxJ+owEQ==} + typebox@1.1.38: + resolution: {integrity: sha512-pZ0aQPmMmXoUvSbeuWf/Hzsc+avNw/Zd6VeE8CFgkVGWyuHPJvqeJJDeJqLve+K70LvjYIoleGcoJHPT17cWoA==} typescript@6.0.2: resolution: {integrity: sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==} @@ -3587,6 +3590,85 @@ snapshots: human-id: 4.1.3 prettier: 2.8.8 + '@earendil-works/pi-agent-core@0.74.0(ws@8.20.0)(zod@4.3.6)': + dependencies: + '@earendil-works/pi-ai': 0.74.0(ws@8.20.0)(zod@4.3.6) + typebox: 1.1.38 + transitivePeerDependencies: + - '@modelcontextprotocol/sdk' + - aws-crt + - bufferutil + - supports-color + - utf-8-validate + - ws + - zod + + '@earendil-works/pi-ai@0.74.0(ws@8.20.0)(zod@4.3.6)': + dependencies: + '@anthropic-ai/sdk': 0.91.1(zod@4.3.6) + '@aws-sdk/client-bedrock-runtime': 3.1043.0 + '@google/genai': 1.46.0 + '@mistralai/mistralai': 2.2.1 + chalk: 5.6.2 + openai: 6.26.0(ws@8.20.0)(zod@4.3.6) + partial-json: 0.1.7 + proxy-agent: 6.5.0 + typebox: 1.1.38 + undici: 7.24.6 + zod-to-json-schema: 3.25.2(zod@4.3.6) + transitivePeerDependencies: + - '@modelcontextprotocol/sdk' + - aws-crt + - bufferutil + - supports-color + - utf-8-validate + - ws + - zod + + '@earendil-works/pi-coding-agent@0.74.0(ws@8.20.0)(zod@4.3.6)': + dependencies: + '@earendil-works/pi-agent-core': 0.74.0(ws@8.20.0)(zod@4.3.6) + '@earendil-works/pi-ai': 0.74.0(ws@8.20.0)(zod@4.3.6) + '@earendil-works/pi-tui': 0.74.0 + '@silvia-odwyer/photon-node': 0.3.4 + chalk: 5.6.2 + cli-highlight: 2.1.11 + diff: 8.0.4 + extract-zip: 2.0.1 + file-type: 21.3.4 + glob: 13.0.6 + hosted-git-info: 9.0.2 + ignore: 7.0.5 + jiti: 2.7.0 + marked: 15.0.12 + minimatch: 10.2.4 + proper-lockfile: 4.1.2 + strip-ansi: 7.2.0 + typebox: 1.1.38 + undici: 7.24.6 + uuid: 14.0.0 + yaml: 2.8.3 + optionalDependencies: + '@mariozechner/clipboard': 0.3.5 + transitivePeerDependencies: + - '@modelcontextprotocol/sdk' + - aws-crt + - bufferutil + - supports-color + - utf-8-validate + - ws + - zod + + '@earendil-works/pi-tui@0.74.0': + dependencies: + '@types/mime-types': 2.1.4 + chalk: 5.6.2 + get-east-asian-width: 1.5.0 + marked: 15.0.12 + mime-types: 3.0.2 + optionalDependencies: + koffi: 2.15.2 + '@emnapi/core@1.9.1': dependencies: '@emnapi/wasi-threads': 1.2.0 @@ -3714,19 +3796,6 @@ snapshots: - ws - zod - '@mariozechner/pi-agent-core@0.73.0(ws@8.20.0)(zod@4.3.6)': - dependencies: - '@mariozechner/pi-ai': 0.73.0(ws@8.20.0)(zod@4.3.6) - typebox: 1.1.37 - transitivePeerDependencies: - - '@modelcontextprotocol/sdk' - - aws-crt - - bufferutil - - supports-color - - utf-8-validate - - ws - - zod - '@mariozechner/pi-ai@0.63.1(ws@8.20.0)(zod@4.3.6)': dependencies: '@anthropic-ai/sdk': 0.73.0(zod@4.3.6) @@ -3751,28 +3820,6 @@ snapshots: - ws - zod - '@mariozechner/pi-ai@0.73.0(ws@8.20.0)(zod@4.3.6)': - dependencies: - '@anthropic-ai/sdk': 0.91.1(zod@4.3.6) - '@aws-sdk/client-bedrock-runtime': 3.1043.0 - '@google/genai': 1.46.0 - '@mistralai/mistralai': 2.2.1 - chalk: 5.6.2 - openai: 6.26.0(ws@8.20.0)(zod@4.3.6) - partial-json: 0.1.7 - proxy-agent: 6.5.0 - typebox: 1.1.37 - undici: 7.24.6 - zod-to-json-schema: 3.25.2(zod@4.3.6) - transitivePeerDependencies: - - '@modelcontextprotocol/sdk' - - aws-crt - - bufferutil - - supports-color - - utf-8-validate - - ws - - zod - '@mariozechner/pi-coding-agent@0.63.1(ws@8.20.0)(zod@4.3.6)': dependencies: '@mariozechner/jiti': 2.6.5 @@ -3806,40 +3853,6 @@ snapshots: - ws - zod - '@mariozechner/pi-coding-agent@0.73.0(ws@8.20.0)(zod@4.3.6)': - dependencies: - '@mariozechner/jiti': 2.6.5 - '@mariozechner/pi-agent-core': 0.73.0(ws@8.20.0)(zod@4.3.6) - '@mariozechner/pi-ai': 0.73.0(ws@8.20.0)(zod@4.3.6) - '@mariozechner/pi-tui': 0.73.0 - '@silvia-odwyer/photon-node': 0.3.4 - chalk: 5.6.2 - cli-highlight: 2.1.11 - diff: 8.0.4 - extract-zip: 2.0.1 - file-type: 21.3.4 - glob: 13.0.6 - hosted-git-info: 9.0.2 - ignore: 7.0.5 - marked: 15.0.12 - minimatch: 10.2.4 - proper-lockfile: 4.1.2 - strip-ansi: 7.2.0 - typebox: 1.1.37 - undici: 7.24.6 - uuid: 14.0.0 - yaml: 2.8.3 - optionalDependencies: - '@mariozechner/clipboard': 0.3.5 - transitivePeerDependencies: - - '@modelcontextprotocol/sdk' - - aws-crt - - bufferutil - - supports-color - - utf-8-validate - - ws - - zod - '@mariozechner/pi-tui@0.63.1': dependencies: '@types/mime-types': 2.1.4 @@ -3850,16 +3863,6 @@ snapshots: optionalDependencies: koffi: 2.15.2 - '@mariozechner/pi-tui@0.73.0': - dependencies: - '@types/mime-types': 2.1.4 - chalk: 5.6.2 - get-east-asian-width: 1.5.0 - marked: 15.0.12 - mime-types: 3.0.2 - optionalDependencies: - koffi: 2.15.2 - '@mistralai/mistralai@1.14.1': dependencies: ws: 8.20.0 @@ -4701,13 +4704,13 @@ snapshots: chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.2(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3))': + '@vitest/mocker@4.1.2(vite@8.0.3(@types/node@25.5.0)(jiti@2.7.0)(yaml@2.8.3))': dependencies: '@vitest/spy': 4.1.2 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.0.3(@types/node@25.5.0)(yaml@2.8.3) + vite: 8.0.3(@types/node@25.5.0)(jiti@2.7.0)(yaml@2.8.3) '@vitest/pretty-format@4.1.2': dependencies: @@ -5162,6 +5165,8 @@ snapshots: isexe@2.0.0: {} + jiti@2.7.0: {} + js-yaml@3.14.2: dependencies: argparse: 1.0.10 @@ -5906,7 +5911,7 @@ snapshots: tslib@2.8.1: {} - typebox@1.1.37: {} + typebox@1.1.38: {} typescript@6.0.2: {} @@ -5924,7 +5929,7 @@ snapshots: uuid@14.0.0: {} - vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3): + vite@8.0.3(@types/node@25.5.0)(jiti@2.7.0)(yaml@2.8.3): dependencies: lightningcss: 1.32.0 picomatch: 4.0.4 @@ -5934,12 +5939,13 @@ snapshots: optionalDependencies: '@types/node': 25.5.0 fsevents: 2.3.3 + jiti: 2.7.0 yaml: 2.8.3 - vitest@4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3)): + vitest@4.1.2(@types/node@25.5.0)(vite@8.0.3(@types/node@25.5.0)(jiti@2.7.0)(yaml@2.8.3)): dependencies: '@vitest/expect': 4.1.2 - '@vitest/mocker': 4.1.2(vite@8.0.3(@types/node@25.5.0)(yaml@2.8.3)) + '@vitest/mocker': 4.1.2(vite@8.0.3(@types/node@25.5.0)(jiti@2.7.0)(yaml@2.8.3)) '@vitest/pretty-format': 4.1.2 '@vitest/runner': 4.1.2 '@vitest/snapshot': 4.1.2 @@ -5956,7 +5962,7 @@ snapshots: tinyexec: 1.0.4 tinyglobby: 0.2.15 tinyrainbow: 3.1.0 - vite: 8.0.3(@types/node@25.5.0)(yaml@2.8.3) + vite: 8.0.3(@types/node@25.5.0)(jiti@2.7.0)(yaml@2.8.3) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 25.5.0 diff --git a/scripts/validate-packages.mjs b/scripts/validate-packages.mjs index 3b83213..7ef9937 100644 --- a/scripts/validate-packages.mjs +++ b/scripts/validate-packages.mjs @@ -77,10 +77,19 @@ for (const dirName of packageDirs) { errors.push(`${dirName}: package uses src/ and must include it in files`); } - for (const peerName of ["@mariozechner/pi-ai", "@mariozechner/pi-coding-agent"]) { - if (!pkg.peerDependencies?.[peerName]) { - errors.push(`${dirName}: missing peer dependency '${peerName}'`); - } + const canonicalPiPeers = ["@earendil-works/pi-ai", "@earendil-works/pi-coding-agent"]; + const legacyPiPeers = ["@mariozechner/pi-ai", "@mariozechner/pi-coding-agent"]; + const hasCanonicalPeers = canonicalPiPeers.every((peerName) => pkg.peerDependencies?.[peerName]); + const hasLegacyPeers = legacyPiPeers.every((peerName) => pkg.peerDependencies?.[peerName]); + + if (!hasCanonicalPeers && !hasLegacyPeers) { + errors.push( + `${dirName}: missing Pi peer dependencies '${canonicalPiPeers.join("', '")}'`, + ); + } + + if (hasCanonicalPeers && !pkg.peerDependencies?.typebox) { + errors.push(`${dirName}: missing peer dependency 'typebox'`); } }