{"_id":"@accidental-revenue/orbsona","_rev":"3-3ce4e01e821513589503c9ed3fe20c0e","name":"@accidental-revenue/orbsona","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@accidental-revenue/orbsona","version":"0.1.0","keywords":["ai","agent","avatar","orbsona","voice-agent","agent-ui","voice","animation","canvas"],"author":{"name":"Accidental Revenue AI Labs"},"license":"MIT","_id":"@accidental-revenue/orbsona@0.1.0","maintainers":[{"name":"mazonayo","email":"mazonayo@accidentalrevenue.com"}],"homepage":"https://orbsona.com","bugs":{"url":"https://github.com/Accidental-Revenue/orbsona/issues"},"dist":{"shasum":"2ec809448f4e39079c77674539b7192e265433b3","tarball":"https://registry.npmjs.org/@accidental-revenue/orbsona/-/orbsona-0.1.0.tgz","fileCount":19,"integrity":"sha512-kAokKJhxEMtc5c6v2cjjdHAqajIyi1dyfNo5KV6nCOw45ugFCQNvs1kOaJW1QG2JgNuaRyuQ2XndxVdj9nO4CA==","signatures":[{"sig":"MEUCIQChPJB/f3GKSLHWDOjhSmxrAP+uvo/g2CJo6Zdp47inwQIgYw1V4rl3TuQQEgLYsvu3Wx/nX5iExc1RbXxJaRO8qpg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":97430},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.js"},"./package.json":"./package.json"},"gitHead":"4745da53deb731837d23f2f0eb11c5f73f826ae3","scripts":{"test":"npm run build && node scripts/contract-smoke.mjs","build":"tsc -p tsconfig.json","prepack":"npm run test","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"mazonayo","email":"mazonayo@accidentalrevenue.com"},"repository":{"url":"git+https://github.com/Accidental-Revenue/orbsona.git","type":"git","directory":"packages/orbsona"},"_npmVersion":"11.17.0","description":"Living, state-aware visual identities for AI agents","directories":{},"sideEffects":false,"_nodeVersion":"26.5.0","dependencies":{"thinking-orbs":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5","@types/react":"^19"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/orbsona_0.1.0_1784884222057_0.10420906227767857","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@accidental-revenue/orbsona","version":"0.1.1","keywords":["ai","agent","avatar","orbsona","voice-agent","agent-ui","voice","animation","canvas"],"author":{"name":"Accidental Revenue AI Labs"},"license":"MIT","_id":"@accidental-revenue/orbsona@0.1.1","maintainers":[{"name":"mazonayo","email":"mazonayo@accidentalrevenue.com"}],"homepage":"https://orbsona.com","bugs":{"url":"https://github.com/Accidental-Revenue/orbsona/issues"},"dist":{"shasum":"6b743eaaedbbf1a2206f17f5c6c9c403e91bd36d","tarball":"https://registry.npmjs.org/@accidental-revenue/orbsona/-/orbsona-0.1.1.tgz","fileCount":23,"integrity":"sha512-FtxIeoBX+C0GIjqb0UVB/LjrmBMYxJFhLomA1tvUd/8jnvxcICUsjYY6788iUGnyadVqKe2UvQ9gEUB4WM4OZQ==","signatures":[{"sig":"MEQCIDzpGvlMJDfHdeiVhKon2WCNw4s1s36s2lJK0D3YhrywAiBUObbBbegeaHDd/ey59El7EvaKt3lsLuGPvbYZTZ7u9Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":101412},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.js"},"./package.json":"./package.json"},"gitHead":"0113a15bf60dbe06b36a2ce5ce180450f1423a4e","scripts":{"test":"npm run build && node scripts/contract-smoke.mjs && node scripts/launch-regression.mjs","build":"tsc -p tsconfig.json","prepack":"npm run test","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"mazonayo","email":"mazonayo@accidentalrevenue.com"},"repository":{"url":"git+https://github.com/Accidental-Revenue/orbsona.git","type":"git","directory":"packages/orbsona"},"_npmVersion":"11.17.0","description":"Living, state-aware visual identities for AI agents","directories":{},"sideEffects":false,"_nodeVersion":"26.5.0","dependencies":{"thinking-orbs":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5","@types/react":"^19"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/orbsona_0.1.1_1784928163920_0.9378820010664786","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@accidental-revenue/orbsona","version":"0.2.0","description":"Living, state-aware visual identities for AI agents","type":"module","sideEffects":false,"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./react":{"types":"./dist/react.d.ts","import":"./dist/react.js"},"./package.json":"./package.json"},"scripts":{"clean":"node --eval \"require('node:fs').rmSync('dist', { recursive: true, force: true })\"","build":"npm run clean && tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test":"npm run build && node scripts/contract-smoke.mjs && node scripts/v2-contract.mjs && node scripts/bounded-cache.mjs && node scripts/nature-presets.mjs && node scripts/launch-regression.mjs","prepack":"npm run test"},"keywords":["ai","agent","avatar","orbsona","voice-agent","agent-ui","voice","animation","canvas"],"homepage":"https://orbsona.com","repository":{"type":"git","url":"git+https://github.com/Accidental-Revenue/orbsona.git","directory":"packages/orbsona"},"bugs":{"url":"https://github.com/Accidental-Revenue/orbsona/issues"},"author":{"name":"Accidental Revenue AI Labs"},"license":"MIT","publishConfig":{"access":"public"},"peerDependencies":{"react":">=18.0.0","react-dom":">=18.0.0"},"devDependencies":{"@types/react":"^19","typescript":"^5"},"dependencies":{"thinking-orbs":"0.1.1"},"gitHead":"df88779a68fb15dc784714becd64ba9febb82dee","_id":"@accidental-revenue/orbsona@0.2.0","_nodeVersion":"24.18.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-QOPZjj7aPKljejAgKmv1Bea0FVRFmTadiVL1afEhrVYjtXC3JmsBbJpHyLvOdxta2uoo6RwqfIWOIPaH5SKuXg==","shasum":"0e2c98c960dbbb8b8a59804cbde257cee18d6574","tarball":"https://registry.npmjs.org/@accidental-revenue/orbsona/-/orbsona-0.2.0.tgz","fileCount":32,"unpackedSize":136830,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@accidental-revenue%2forbsona@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFR9Xh/1ki+HtFjMfLgSi/UF9fYp+b9PpN6owhp03AS5AiEA5C5TLFVrHDgz1mpV1kvDlyaRttF9hHJOd009J9xht3Y="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3ab4544a-f33e-4f4a-8c07-b4ebe7ec82ac"}},"directories":{},"maintainers":[{"name":"mazonayo","email":"mazonayo@accidentalrevenue.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/orbsona_0.2.0_1785688832400_0.42201955654265344"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-24T09:10:21.886Z","modified":"2026-08-02T16:40:32.830Z","0.1.0":"2026-07-24T09:10:22.184Z","0.1.1":"2026-07-24T21:22:44.061Z","0.2.0":"2026-08-02T16:40:32.529Z"},"bugs":{"url":"https://github.com/Accidental-Revenue/orbsona/issues"},"author":{"name":"Accidental Revenue AI Labs"},"license":"MIT","homepage":"https://orbsona.com","keywords":["ai","agent","avatar","orbsona","voice-agent","agent-ui","voice","animation","canvas"],"repository":{"type":"git","url":"git+https://github.com/Accidental-Revenue/orbsona.git","directory":"packages/orbsona"},"description":"Living, state-aware visual identities for AI agents","maintainers":[{"name":"mazonayo","email":"mazonayo@accidentalrevenue.com"}],"readme":"# @accidental-revenue/orbsona\n\nStateful, canvas-rendered visual identities for AI and voice agents.\n\n## Install\n\n```bash\nnpm install @accidental-revenue/orbsona\n# or: pnpm add @accidental-revenue/orbsona\n# or: yarn add @accidental-revenue/orbsona\n# or: bun add @accidental-revenue/orbsona\n```\n\nThe package is ESM-only and expects React 18 or newer.\n\n## Render an identity\n\n```tsx\nimport { AgentAvatar } from \"@accidental-revenue/orbsona/react\";\nimport aster from \"./aster.orbsona.json\";\n\nexport function AgentPresence({ state, voiceLevel }) {\n  return (\n    <AgentAvatar\n      identity={aster.identity}\n      state={state}\n      energy={voiceLevel}\n      size={64}\n    />\n  );\n}\n```\n\nThe stable identity controls recognition. Semantic state and signal levels control live behavior.\n\n### React props\n\n| Prop | Type | Purpose |\n| --- | --- | --- |\n| `identity` | `AvatarIdentity` | Required visual identity configuration |\n| `state` | `AgentState` | Required semantic runtime state |\n| `size` | `number \\| string` | Width and height of the rendered avatar |\n| `energy` | `number` | General signal level, normally from 0 to 1 |\n| `inputLevel` | `number` | Optional listening or microphone level |\n| `outputLevel` | `number` | Optional speaking or audio-output level |\n| `className` | `string` | Class name applied to the canvas wrapper |\n| `style` | `CSSProperties` | Inline styles applied to the canvas wrapper |\n\nWhen `inputLevel` and `outputLevel` are omitted, `energy` drives both. Signal values are normalized to the `0…1` range; non-finite values are treated as zero so an invalid provider sample cannot poison the animation state.\n\n## Runtime states\n\n| State | Use it when the agent is |\n| --- | --- |\n| `idle` | Available and waiting |\n| `connecting` | Establishing a live session |\n| `listening` | Receiving user input |\n| `thinking` | Reasoning before responding |\n| `speaking` | Returning voice output |\n| `working` | Calling a tool or completing a task |\n| `success` | Briefly acknowledging completion |\n| `error` | Waiting for attention or recovery |\n\nMap provider events into these states at the application boundary. The renderer does not claim first-party adapters or partnerships with voice and agent providers.\n\n## Identity contract\n\n```ts\nimport {\n  createIdentityDocument,\n  parseIdentityJson,\n  serializeIdentity,\n  type OrbsonaIdentityDocument,\n} from \"@accidental-revenue/orbsona\";\n```\n\nAn Orbsona identity is a portable, versioned JSON document:\n\n```json\n{\n  \"format\": \"orbsona.identity\",\n  \"version\": 2,\n  \"identity\": {\n    \"name\": \"Aster\",\n    \"background\": \"relief\",\n    \"rotateBackground\": false,\n    \"grain\": false,\n    \"animation\": \"phyllotaxis\",\n    \"palette\": {\n      \"id\": \"ion\",\n      \"name\": \"Ion\",\n      \"colors\": [\"#77c8ff\", \"#214bb4\", \"#e0f7ff\"]\n    },\n    \"seed\": 2718\n  }\n}\n```\n\n`background`, its optional finish controls, and `palette` define the body of the orb. `animation` defines its foreground motion system. `seed` makes the individual reproducible. Version 1 identities remain importable and preserve their layered appearance.\n\nThe published `identityFromSeed` helper preserves the original v1 mapping. Use `identityFromSeedV2` when generating from the expanded catalog that includes Phyllotaxis and Radiolaria. This explicit split prevents a package update from silently remapping an existing numeric seed.\n\nUse `parseIdentityJson` at import boundaries. It returns a discriminated result instead of throwing for invalid files. PNG and WebM are fallback assets; the identity document is the source of truth for live runtimes.\n\n## Motion systems\n\nOrbsona-authored presets include Phyllotaxis, a golden-angle growth field inspired by seed heads, and Radiolaria, a rotating spherical lattice inspired by microscopic silica skeletons. The package also restores the motion collection from [`thinking-orbs`](https://github.com/Jakubantalik/thinking-orbs), used under its MIT license.\n\nThe two sources are identified in the exported animation catalog. Full attribution is shipped in `THIRD_PARTY_NOTICES.md` and retained in source distributions.\n\n## Rendering behavior\n\n- Respects `prefers-reduced-motion`.\n- Caps canvas pixel density at 2x.\n- Uses compact density at 20–32 pixels and the full preset at larger sizes.\n- Updates motion on the browser display cadence instead of imposing a lower frame-rate cap.\n- Pauses work when the avatar or browser tab is not visible.\n- Masks background, foreground motion, glow, and state effects to one circular boundary.\n- Keeps relief and foreground motion independently configurable.\n- Exposes a semantic `role=\"img\"` label containing identity and state.\n\n## Local development\n\nFrom the repository root:\n\n```bash\nnpm run test:package\nnpm run build\n```\n\nMaintainer release instructions live in `docs/npm-publishing.md` in the Orbsona repository.\n","readmeFilename":"README.md"}