{"_id":"@anakonn/pi-protocol","_rev":"2-f585f9123b38ce63abf8b413e6d8a7d3","name":"@anakonn/pi-protocol","dist-tags":{"latest":"1.2.0"},"versions":{"1.1.0":{"name":"@anakonn/pi-protocol","version":"1.1.0","keywords":["pi-protocol","protocol","sdk","typebox","sse","provider","contract-testing"],"license":"MIT","_id":"@anakonn/pi-protocol@1.1.0","maintainers":[{"name":"anakonn","email":"mrego@anakonn.com"}],"homepage":"https://github.com/id-ego/pi-protocol#readme","bugs":{"url":"https://github.com/id-ego/pi-protocol/issues"},"bin":{"pi-protocol":"dist/cli.js"},"dist":{"shasum":"285ae57ffba2d63696055a629f24fc8ed4295893","tarball":"https://registry.npmjs.org/@anakonn/pi-protocol/-/pi-protocol-1.1.0.tgz","fileCount":13,"integrity":"sha512-drN7u5rlSArtZ5pAsgnXx15KDTMPbD4UtXZxVh3u0a4nonzltNb/RabvGsnQLJnC818dvmpElv0bKVKRPrFZqg==","signatures":[{"sig":"MEYCIQDaVe4B1VQbwGHfBx75KY8dtlxDNSdNZQo5/1KYdwb48AIhALGXadtLH9V4CqjD/XVRXlC6ani5MTPiRRD+DpE4M4v5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":126970},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"9d8c55a7a2da703bed81d6f3477d01dba33317d3","private":false,"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json","pack:check":"bun pm pack --dry-run","smoke:boundary":"bun scripts/boundary-smoke.ts"},"_npmUser":{"name":"anakonn","email":"mrego@anakonn.com"},"repository":{"url":"git+https://github.com/id-ego/pi-protocol.git","type":"git"},"_npmVersion":"11.15.0","description":"Public pi-protocol schemas, types, SDK helpers, and CLI contract checks for pi-os providers and pi-works consumers.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"@sinclair/typebox":"^0.34.49"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/pi-protocol_1.1.0_1779733090010_0.32287507860599285","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@anakonn/pi-protocol","version":"1.2.0","type":"module","private":false,"description":"Public pi-protocol schemas, types, SDK helpers, and CLI contract checks for pi-os providers and pi-works consumers.","license":"MIT","keywords":["pi-protocol","protocol","sdk","typebox","sse","provider","contract-testing"],"repository":{"type":"git","url":"git+https://github.com/id-ego/pi-protocol.git"},"homepage":"https://github.com/id-ego/pi-protocol#readme","bugs":{"url":"https://github.com/id-ego/pi-protocol/issues"},"main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"pi-protocol":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc --noEmit -p tsconfig.json","pack:check":"bun pm pack --dry-run"},"dependencies":{"@sinclair/typebox":"^0.34.49"},"devDependencies":{"@types/bun":"latest","typescript":"^5.9.3"},"gitHead":"125714bd97b9457128866ed817f5d681b00401be","_id":"@anakonn/pi-protocol@1.2.0","_nodeVersion":"24.3.0","_npmVersion":"11.15.0","dist":{"integrity":"sha512-q0yn+o+IbIkeiv7hSS7I8NU23agT+TUIfTornbtfH7pyFLAlN+pV74AmPggWGdS9EGgaoz5AB8WTYFVjQp0cdg==","shasum":"7a847bceb422d18f70c740ef9d7318aefaf391fd","tarball":"https://registry.npmjs.org/@anakonn/pi-protocol/-/pi-protocol-1.2.0.tgz","fileCount":13,"unpackedSize":140960,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC79E8UaCXEFpnYJBSXVspR11S4zmOR554VBvL6GhCDCAIgKVubErGAWK3NQPphMhEpSaOE3mCtMOgQei4fZtWS3LU="}]},"_npmUser":{"name":"anakonn","email":"mrego@anakonn.com"},"directories":{},"maintainers":[{"name":"anakonn","email":"mrego@anakonn.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-protocol_1.2.0_1779776983185_0.84112399758498"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-25T18:18:09.806Z","modified":"2026-05-26T06:29:43.455Z","1.1.0":"2026-05-25T18:18:10.143Z","1.2.0":"2026-05-26T06:29:43.343Z"},"bugs":{"url":"https://github.com/id-ego/pi-protocol/issues"},"license":"MIT","homepage":"https://github.com/id-ego/pi-protocol#readme","keywords":["pi-protocol","protocol","sdk","typebox","sse","provider","contract-testing"],"repository":{"type":"git","url":"git+https://github.com/id-ego/pi-protocol.git"},"description":"Public pi-protocol schemas, types, SDK helpers, and CLI contract checks for pi-os providers and pi-works consumers.","maintainers":[{"name":"anakonn","email":"mrego@anakonn.com"}],"readme":"# @anakonn/pi-protocol\n\n`pi-protocol` is the required compatibility contract between **pi-os** and **pi-works**.\n\n- `pi-os` implements the provider side of the contract.\n- `pi-works` consumes the contract to discover providers, validate compatibility, and call Work Plane surfaces.\n- `pi-works` must communicate through this package's protocol contracts, not by importing pi-os app code or runtime internals.\n\nThe package is published publicly to npm as `@anakonn/pi-protocol`. Canonical development happens in Anakonn GitLab; GitHub is the public mirror and public feedback channel.\n\n## What belongs here\n\nThis repository should contain only shared interface material required for pi-os ↔ pi-works compatibility:\n\n- provider discovery constants\n- protocol metadata schemas/types\n- health/profile/error/run/repository/session/conversation/event schemas and types\n- creator helpers for pi-os provider responses/events/errors\n- consumer helpers for pi-works discovery, compatibility, and parsing\n- framework-neutral CLI contract tools\n- canonical protocol/spec documentation\n\n## What does not belong here\n\nThe package should not become a dumping ground for implementation-local types.\n\nDo **not** add:\n\n- pi-os runtime-only implementation details\n- pi-os owner-plane-only types\n- pi-works browser/UI-only view models\n- pi-works BFF implementation internals unless they are part of the pi-os ↔ pi-works contract\n- imports from app repositories\n\nTransitional exports from the old monorepo shared typing package are not part of the stable public surface. App-local pi-os runtime types and pi-works BFF/UI view models belong in their owning repos.\n\n## Install\n\n```bash\nbun add @anakonn/pi-protocol@1.2.0\n# or\nnpm install @anakonn/pi-protocol@1.2.0\n```\n\nConsumers should pin exact versions.\n\n## Core constants\n\n```ts\nimport {\n  PI_PROTOCOL_NAME,\n  PI_PROTOCOL_VERSION,\n  PI_PROVIDER_DISCOVERY_PATH,\n} from '@anakonn/pi-protocol';\n```\n\nCurrent values:\n\n```ts\nPI_PROTOCOL_NAME = 'pi-protocol';\nPI_PROTOCOL_VERSION = '1.1.0';\nPI_PROVIDER_DISCOVERY_PATH = '/.well-known/pi-provider';\n```\n\nProvider metadata uses `name + version` only. The old v0 `baseline` field and `/.well-known/pi-api/provider` discovery path are not part of v1.\n\n## SDK usage\n\n```ts\nimport {\n  createProviderHealth,\n  parseProviderProfile,\n  providerDiscoveryUrl,\n} from '@anakonn/pi-protocol';\n```\n\n- Creator helpers such as `createProviderHealth` help pi-os build schema-valid provider responses.\n- Consumer helpers such as `parseProviderProfile` help pi-works validate provider responses before use.\n- URL helpers such as `providerDiscoveryUrl` keep endpoint construction aligned with the spec.\n\n## CLI\n\n```bash\npi-protocol init-provider ./fixtures\npi-protocol validate ./fixtures\npi-protocol inspect-provider http://localhost:3000\npi-protocol inspect-provider http://localhost:3000 --create-run --token \"$PI_PROVIDER_TOKEN\" --json\npi-protocol inspect-provider http://localhost:3000 --create-run --git-url git@gitlab.anakonn.com:anakonn/pi-os.git --token \"$PI_PROVIDER_TOKEN\"\n```\n\n`inspect-provider` read-only mode checks discovery/profile/health. Full contract mode uses `--create-run` because it calls side-effect endpoints.\n\n## Development\n\n```bash\nbun install\nbun run typecheck\nbun run build\nbun run pack:check\n```\n\n## Release\n\nReleases are tag-based. A protected `vX.Y.Z` tag publishes `@anakonn/pi-protocol@X.Y.Z` to public npm from GitLab CI.\n\nRequired release setup:\n\n- npm `@anakonn` scope/package publish permission\n- `NPM_TOKEN` as a masked/protected GitLab CI variable\n- package `version` must match the release tag without the leading `v`\n\nConsumers should pin exact versions, for example:\n\n```json\n{\n  \"dependencies\": {\n    \"@anakonn/pi-protocol\": \"1.2.0\"\n  }\n}\n```\n\n## Spec\n\n- [pi-protocol v1 provider interface](./docs/specs/pi-provider-v1.md)\n\n## Rules\n\n- [pi-protocol SDK boundary and contract ownership](./docs/rules/pi-protocol-sdk-boundary.md)\n","readmeFilename":"README.md"}