{"_id":"@ariaflowagents/voice-protocol","name":"@ariaflowagents/voice-protocol","dist-tags":{"latest":"0.2.0"},"versions":{"0.2.0":{"name":"@ariaflowagents/voice-protocol","version":"0.2.0","description":"Canonical client-server wire protocol for AriaFlow voice transports. Pure TypeScript types + optional Zod schemas, zero runtime.","keywords":["voice","wire-protocol","ariaflow","cloudflare-voice"],"license":"MIT","publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","sideEffects":false,"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./zod":{"types":"./dist/zod.d.ts","import":"./dist/zod.js"}},"peerDependencies":{"zod":"^3.23.0"},"peerDependenciesMeta":{"zod":{"optional":true}},"devDependencies":{"@types/node":"^20.11.0","typescript":"^5.3.0","zod":"^3.23.0"},"scripts":{"build":"tsc -p tsconfig.json","clean":"rm -rf dist","typecheck":"tsc -p tsconfig.json --noEmit","test":"npm run build && node --test src/__tests__/*.test.js"},"_id":"@ariaflowagents/voice-protocol@0.2.0","_integrity":"sha512-9auGOC8WypAXVZkboDH0TLJJQdjGReR667GgDyzDBX66EPMb1uJFFa3WrBzZQuSWos4XQdKd3Mn1l7hChZxq1g==","_resolved":"/private/var/folders/j5/7dkmn95d0_9b5fdnfsmpjs580000gn/T/cc4282c534ae1d3a0977df5aa243149d/ariaflowagents-voice-protocol-0.2.0.tgz","_from":"file:ariaflowagents-voice-protocol-0.2.0.tgz","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-9auGOC8WypAXVZkboDH0TLJJQdjGReR667GgDyzDBX66EPMb1uJFFa3WrBzZQuSWos4XQdKd3Mn1l7hChZxq1g==","shasum":"8bf706a44ff96186b1e7fa531d53fd65fe961061","tarball":"https://registry.npmjs.org/@ariaflowagents/voice-protocol/-/voice-protocol-0.2.0.tgz","fileCount":7,"unpackedSize":14499,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAgDPit00V2sqy4npMDLvPquDPMI7eEQGnRZha5zA6RwAiBOkuAdQem+avojcNs7GBYwxfDAvKABXmwPqEdGD6LpBw=="}]},"_npmUser":{"name":"octalpixel","email":"mithushancj@gmail.com"},"directories":{},"maintainers":[{"name":"octalpixel","email":"mithushancj@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/voice-protocol_0.2.0_1776978126933_0.893640997563413"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-23T21:02:06.818Z","0.2.0":"2026-04-23T21:02:07.181Z","modified":"2026-04-23T21:02:07.361Z"},"maintainers":[{"name":"octalpixel","email":"mithushancj@gmail.com"}],"description":"Canonical client-server wire protocol for AriaFlow voice transports. Pure TypeScript types + optional Zod schemas, zero runtime.","keywords":["voice","wire-protocol","ariaflow","cloudflare-voice"],"license":"MIT","readme":"# @ariaflowagents/voice-protocol\n\nCanonical client-server wire protocol for AriaFlow voice transports.\n\nPure TypeScript types plus an optional Zod schema subpath. Zero runtime.\n\nThis package is a verbatim lift of the protocol types from\n[`@cloudflare/voice`](https://github.com/cloudflare/agents/tree/main/packages/voice)\n(see [`NOTICE`](./NOTICE) for Apache-2.0 attribution). Publishing them here\nmakes the wire protocol a formal AriaFlow contract: every transport\n(Cloudflare DO, Node WS, LiveKit, SIP, Twilio, SMARTPBX) can emit identical\nframes, and a single client library — `useVoiceAgent` from\n`@cloudflare/voice/react` — consumes all of them unmodified.\n\n## Install\n\n```bash\npnpm add @ariaflowagents/voice-protocol\n# optional, only if you import the /zod subpath\npnpm add zod\n```\n\n## Main export\n\n```ts\nimport {\n  VOICE_PROTOCOL_VERSION,\n  type VoiceClientMessage,\n  type VoiceServerMessage,\n  type VoiceStatus,\n  type VoiceRole,\n  type VoiceAudioFormat,\n  type VoicePipelineMetrics,\n  type TranscriptMessage,\n  type VoiceAudioInput,\n  type VoiceTransport,\n} from \"@ariaflowagents/voice-protocol\";\n\n// Current wire protocol version. Sent by the server in the initial\n// `welcome` frame so clients can detect version mismatches.\nVOICE_PROTOCOL_VERSION; // 1\n```\n\n## Zod subpath\n\n```ts\nimport {\n  VoiceClientMessageSchema,\n  VoiceServerMessageSchema,\n} from \"@ariaflowagents/voice-protocol/zod\";\n\nconst parsed = VoiceClientMessageSchema.safeParse(frameFromWire);\nif (!parsed.success) {\n  // reject malformed frame\n}\n```\n\n`zod` is declared as an optional peer dependency; install it only if you\nuse this subpath.\n\n## Versioning\n\n`VOICE_PROTOCOL_VERSION` is the wire-format version. The package's own\nsemver tracks the TypeScript surface. A major package bump does not\nimply a wire-protocol break; a wire-protocol break bumps the constant.\n\n## License\n\nMIT. Portions of the types were lifted from `@cloudflare/voice`; see\n[`NOTICE`](./NOTICE) for full Apache-2.0 attribution.\n","readmeFilename":"README.md","_rev":"1-d361abdb87bdb14827108dbb6d60919e"}