{"_id":"@danypops/pi-rpc-protocol","_rev":"2-2054762152e915c6270917440b23e1de","name":"@danypops/pi-rpc-protocol","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1":{"name":"@danypops/pi-rpc-protocol","version":"0.0.1","keywords":["pi","pi-extension","rpc","jsonl","protocol"],"license":"MIT","_id":"@danypops/pi-rpc-protocol@0.0.1","maintainers":[{"name":"danypops","email":"danypops@protonmail.com"}],"homepage":"https://github.com/DanyPops/pi-integral/tree/main/packages/pi-rpc-protocol#readme","bugs":{"url":"https://github.com/DanyPops/pi-integral/issues"},"dist":{"shasum":"e9638dbfa15459cb48ac58fb06f4f0b9a71dfcba","tarball":"https://registry.npmjs.org/@danypops/pi-rpc-protocol/-/pi-rpc-protocol-0.0.1.tgz","fileCount":9,"integrity":"sha512-jjf1oqw5Ua8EU9tUFg1e+QB++xt1h0hWDotE5uKBUJJk6o/+wNwLXGfH10sbq1BI+zWiqM2JP9Nw9t+ztwD4QA==","signatures":[{"sig":"MEQCIFYrIKdLVE7Rs6l2ey69j0FfUVlnR3fvUy/y3c+mrb4mAiACaqcZXE0M7p5vi8LIun1hMyN4OqOtP6nNc1W5BP4PEw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16608},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"gitHead":"dda6f59430dccc4492c0a9ad24660990399a93e0","scripts":{"test":"bun run build && bun test test","build":"rm -rf dist && tsc -p tsconfig.build.json","format":"biome format --write .","typecheck":"tsc --noEmit"},"_npmUser":{"name":"danypops","email":"danypops@protonmail.com"},"repository":{"url":"git+https://github.com/DanyPops/pi-integral.git","type":"git","directory":"packages/pi-rpc-protocol"},"_npmVersion":"11.14.1","description":"A small, dependency-free parser/encoder for the subset of Pi's documented RPC protocol needed by clients speaking to a pi --mode rpc process.","directories":{},"_nodeVersion":"22.22.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"bun-types":"latest","typescript":"^5.9.2","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/pi-rpc-protocol_0.0.1_1785748912808_0.49757760534537354","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@danypops/pi-rpc-protocol","version":"0.0.2","description":"A small, dependency-free parser/encoder for the subset of Pi's documented RPC protocol needed by clients speaking to a pi --mode rpc process.","license":"MIT","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","test":"bun run build && bun test test","typecheck":"tsc --noEmit","format":"biome format --write ."},"devDependencies":{"@types/node":"^22.0.0","bun-types":"latest","typescript":"^5.9.2"},"repository":{"type":"git","url":"git+https://github.com/DanyPops/pi-integral.git","directory":"packages/pi-rpc-protocol"},"homepage":"https://github.com/DanyPops/pi-integral/tree/main/packages/pi-rpc-protocol#readme","bugs":{"url":"https://github.com/DanyPops/pi-integral/issues"},"publishConfig":{"access":"public"},"keywords":["pi","pi-extension","rpc","jsonl","protocol"],"gitHead":"9d281703c20552fec9d524394da1198346eebd84","_id":"@danypops/pi-rpc-protocol@0.0.2","_nodeVersion":"24.18.0","_npmVersion":"12.0.2","dist":{"integrity":"sha512-kopbg17k22rrWDoAKfZqXiBDjkZwaVxMejpvM4eEiOAe7nXOninzyq+mSWNGzjIw2AYZh/xoRa7z98fJ3QZZRg==","shasum":"90e2417a1e0b01482f4073f8ff81b3a09bb5f48a","tarball":"https://registry.npmjs.org/@danypops/pi-rpc-protocol/-/pi-rpc-protocol-0.0.2.tgz","fileCount":9,"unpackedSize":16608,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@danypops%2fpi-rpc-protocol@0.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEXJCFMNLx6L7NvRpQEJhsQTAth4YZpYt0wO/9vlTE3hAiEAlZKxY8ZYCHKK348A4H1tHIM73nyc7T7c3twS4eAqOB0="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:10c6725d-2fc4-4f50-bb7a-701f1fda343e"}},"directories":{},"maintainers":[{"name":"danypops","email":"danypops@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-rpc-protocol_0.0.2_1786105522240_0.30766513652235794"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-03T09:21:52.645Z","modified":"2026-08-07T12:25:22.735Z","0.0.1":"2026-08-03T09:21:53.022Z","0.0.2":"2026-08-07T12:25:22.409Z"},"bugs":{"url":"https://github.com/DanyPops/pi-integral/issues"},"license":"MIT","homepage":"https://github.com/DanyPops/pi-integral/tree/main/packages/pi-rpc-protocol#readme","keywords":["pi","pi-extension","rpc","jsonl","protocol"],"repository":{"type":"git","url":"git+https://github.com/DanyPops/pi-integral.git","directory":"packages/pi-rpc-protocol"},"description":"A small, dependency-free parser/encoder for the subset of Pi's documented RPC protocol needed by clients speaking to a pi --mode rpc process.","maintainers":[{"name":"danypops","email":"danypops@protonmail.com"}],"readme":"# @danypops/pi-rpc-protocol\n\nDependency-free parsing and encoding for the subset of Pi's documented RPC protocol needed by clients speaking to a `pi --mode rpc` process.\n\n## Usage\n\n```ts\nimport { encodeRpcCommand, parseRpcLine } from \"@danypops/pi-rpc-protocol\";\n\nchildProcess.stdin.write(encodeRpcCommand({ type: \"prompt\", message: \"hello\" }));\n\nfor (const line of stdoutLines) {\n\tconst event = parseRpcLine(line);\n\tif (event?.type === \"tool_execution_end\") {\n\t\tconsole.log(event.toolName, event.result, event.isError);\n\t}\n}\n```\n\n## Scope\n\n- Encodes `prompt`, `abort`, and `extension_ui_response` commands.\n- Parses lifecycle, response, message, tool-execution, and extension UI events.\n- Preserves unrecognized valid events as `unknown-event` values.\n- Extracts plain text from Pi message content.\n\nProcess spawning and session management belong in `@danypops/pi-process-harness` and Epi.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}