{"_id":"@ai-presence/core","_rev":"7-7750180f173c8d9f078eda10b67613e1","name":"@ai-presence/core","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.0":{"name":"@ai-presence/core","version":"0.1.0","license":"MIT","_id":"@ai-presence/core@0.1.0","maintainers":[{"name":"_branavan_","email":"branavan.selva@gmail.com"}],"dist":{"shasum":"d182207e88988451b4a40aa1bc07a2d2de8d18da","tarball":"https://registry.npmjs.org/@ai-presence/core/-/core-0.1.0.tgz","fileCount":5,"integrity":"sha512-nrb3IkZE/5wU7VKsDIkttm2pSqGHz4KAdHNc+okGLBW4iaLMZVW5xmxZoffJ8waJIp4DYmSqwc4N18OgR7LW1Q==","signatures":[{"sig":"MEUCIA81kDriwsVa6P/X1DRngQJXapXzIU2TMucKhzU1KwyhAiEAvYRLoJlWRlzNG2FsAOV/RpVxSpbPw8CFfZNLQeT+pMY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32103},"main":"./src/presence-core.js","type":"commonjs","types":"./src/presence-core.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./src/presence-core.d.ts","import":"./dist/index.mjs","default":"./src/presence-core.js","require":"./src/presence-core.js"}},"gitHead":"a9dbe4abd880634e4323fbf7bcbebd374d7f13f9","_npmUser":{"name":"_branavan_","email":"branavan.selva@gmail.com"},"_npmVersion":"10.2.4","description":"Renderer-agnostic presence state runtime for AI interfaces.","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.0_1781445963013_0.12868809922314584","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@ai-presence/core","version":"0.1.1","license":"MIT","_id":"@ai-presence/core@0.1.1","maintainers":[{"name":"_branavan_","email":"branavan.selva@gmail.com"}],"dist":{"shasum":"2adede17f31781ff100d1277d4d8c1526e3c411c","tarball":"https://registry.npmjs.org/@ai-presence/core/-/core-0.1.1.tgz","fileCount":5,"integrity":"sha512-X3qiIiZkSbbvgTGOdhD8GMunrKaN7FMUmUyiqpkCxfOksrJ4+3RvZFs6zrHIu/UwSaiXcZAyvRtRH/aJKHsYvg==","signatures":[{"sig":"MEUCIQC8FjTdG+hqwlIfQwyX/t4eBuJUNyNGrQdhvaOHQlAmRAIgNyd4KGYZRi8Nc9Gb53XtWfpJ3xna/qdd1Unaz8GwSX8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32103},"main":"./src/presence-core.js","type":"commonjs","types":"./src/presence-core.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./src/presence-core.d.ts","import":"./dist/index.mjs","default":"./src/presence-core.js","require":"./src/presence-core.js"}},"gitHead":"f9eb05107edba0379a016ea5a4a3a00ab09010d0","_npmUser":{"name":"_branavan_","email":"branavan.selva@gmail.com"},"_npmVersion":"10.2.4","description":"Renderer-agnostic presence state runtime for AI interfaces.","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.1_1781454342096_0.693286081064088","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@ai-presence/core","version":"0.1.2","license":"MIT","_id":"@ai-presence/core@0.1.2","maintainers":[{"name":"_branavan_","email":"branavan.selva@gmail.com"}],"dist":{"shasum":"0399685080dac5b28cab02510b4524e3c5a389b4","tarball":"https://registry.npmjs.org/@ai-presence/core/-/core-0.1.2.tgz","fileCount":5,"integrity":"sha512-Qie0hmxHKQuyv6sY+yLRehTCTt9ZVIzcitUBYBPkAlrrK0TqT0dAyPkMKvIkBbEjTSgKLzLxGZy0UfHMZSLqbw==","signatures":[{"sig":"MEUCIDEKmqMaIsDGyhUdb46keBS2bwX3N9xzGqwVxND4vX0lAiEArngDAkts/ozaRV8pE3CnVEtnuoTF5N4vsukScDVS5rk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32103},"main":"./src/presence-core.js","type":"commonjs","types":"./src/presence-core.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./src/presence-core.d.ts","import":"./dist/index.mjs","default":"./src/presence-core.js","require":"./src/presence-core.js"}},"gitHead":"efc06ceb83fb4599b7db9de849272a1b58adeb37","_npmUser":{"name":"_branavan_","email":"branavan.selva@gmail.com"},"_npmVersion":"10.2.4","description":"Renderer-agnostic presence state runtime for AI interfaces.","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.2_1781499245841_0.07168402488726167","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@ai-presence/core","version":"0.1.3","license":"MIT","_id":"@ai-presence/core@0.1.3","maintainers":[{"name":"_branavan_","email":"branavan.selva@gmail.com"}],"dist":{"shasum":"406f3d2dc94e781f1c6ce31bb5e92caf08ce0b88","tarball":"https://registry.npmjs.org/@ai-presence/core/-/core-0.1.3.tgz","fileCount":5,"integrity":"sha512-V3nHXr5mDyG7hwrcw3BVf0s2SjHMV4ZWPzYAS2A1EyYkFXFTRKeooXy4bATRe37j2KAaMzy0lBzcHEW0hvPVoQ==","signatures":[{"sig":"MEQCIBpBRxBNErc37/GWwWRft1MdLjmO6cBvc4nBcy82ZezFAiBaWu0Z1REvaMDYRZ2YFPZwJnMP23h5eZZFV4RNsJbYHQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32103},"main":"./src/presence-core.js","type":"commonjs","types":"./src/presence-core.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./src/presence-core.d.ts","import":"./dist/index.mjs","default":"./src/presence-core.js","require":"./src/presence-core.js"}},"gitHead":"ba4c3bffd6cbc80de77651a712744974e3bdd287","_npmUser":{"name":"_branavan_","email":"branavan.selva@gmail.com"},"_npmVersion":"10.2.4","description":"Renderer-agnostic presence state runtime for AI interfaces.","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.3_1781503701854_0.564455920126294","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@ai-presence/core","version":"0.1.4","license":"MIT","_id":"@ai-presence/core@0.1.4","maintainers":[{"name":"_branavan_","email":"branavan.selva@gmail.com"}],"dist":{"shasum":"c74edbb3c60fcc5379ab6de7aa5f0510025e6132","tarball":"https://registry.npmjs.org/@ai-presence/core/-/core-0.1.4.tgz","fileCount":5,"integrity":"sha512-2fTdVXY3SztAVQe5vr1uG5h2BpDmj4VU0ys5QpH2s4sEK8fQoYO0df9Q/4+TwDztpfMH6R6RTQ9dIUMS8jYUyg==","signatures":[{"sig":"MEQCIBjjEqjwLOkKDlTFmXGvqB91lwBtoTRKlbwuBjX+2+H4AiB/4x2zyMyUym46+TOi9ywORqaSmdpeLzBEqO+6R4i+Cg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32103},"main":"./src/presence-core.js","type":"commonjs","types":"./src/presence-core.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./src/presence-core.d.ts","import":"./dist/index.mjs","default":"./src/presence-core.js","require":"./src/presence-core.js"}},"gitHead":"433bd413af48a4c502ed451959425384e8b4c747","_npmUser":{"name":"_branavan_","email":"branavan.selva@gmail.com"},"_npmVersion":"10.2.4","description":"Renderer-agnostic presence state runtime for AI interfaces.","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.4_1781505739471_0.8221031797729599","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@ai-presence/core","version":"0.1.5","license":"MIT","_id":"@ai-presence/core@0.1.5","maintainers":[{"name":"_branavan_","email":"branavan.selva@gmail.com"}],"dist":{"shasum":"43a2eefdbc5d907af671ee4290f16b8bec55bb68","tarball":"https://registry.npmjs.org/@ai-presence/core/-/core-0.1.5.tgz","fileCount":5,"integrity":"sha512-tEZdsn8m0uAgACfp4EpLpiDWIP3ObrTqzTMBABApO0zRtf02EoqioT/Zbc4OhEn072tHAS3mgbQSRxR6jtJ+Lg==","signatures":[{"sig":"MEYCIQC7Brle8Hhg5Gh9R1Ueyg9loyhXfkDF74kQ+nC97rJKdgIhAMnoeFjE9/V88Sz7Z2zhIBOVtggV2+s/wqpZXwds9naT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32103},"main":"./src/presence-core.js","type":"commonjs","types":"./src/presence-core.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./src/presence-core.d.ts","import":"./dist/index.mjs","default":"./src/presence-core.js","require":"./src/presence-core.js"}},"gitHead":"76bb308641f37aedd73be1cb63ae84b1e49d3fbc","_npmUser":{"name":"_branavan_","email":"branavan.selva@gmail.com"},"_npmVersion":"10.2.4","description":"Renderer-agnostic presence state runtime for AI interfaces.","directories":{},"sideEffects":false,"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core_0.1.5_1781738727480_0.8532659184010538","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@ai-presence/core","version":"0.1.6","description":"Renderer-agnostic presence state runtime for AI interfaces.","type":"commonjs","main":"./src/presence-core.js","module":"./dist/index.mjs","types":"./src/presence-core.d.ts","exports":{".":{"types":"./src/presence-core.d.ts","import":"./dist/index.mjs","require":"./src/presence-core.js","default":"./src/presence-core.js"}},"sideEffects":false,"license":"MIT","_id":"@ai-presence/core@0.1.6","gitHead":"f116b9f6144aaeb1cb04b592f63d45445e4801e0","_nodeVersion":"20.11.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-gkQU/PEZ1w2w7FjYH05oWHtp+YpQDdqS+tyJj61mxtB0KuW2KegpBrlJ3cFoY8Bjf4ifgvR//CQK0LsBEmFfUg==","shasum":"404ec198eb9d7c55ec7332b9057d78e0bd71a228","tarball":"https://registry.npmjs.org/@ai-presence/core/-/core-0.1.6.tgz","fileCount":5,"unpackedSize":32103,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFovVcrentRHmnLWftfarMPhDJjRMgcTQHabEzCJZQLZAiAVbW3zh/xZLKxf6jLOC91+63fOCAofgIN5ucriMZSavg=="}]},"_npmUser":{"name":"_branavan_","email":"branavan.selva@gmail.com"},"directories":{},"maintainers":[{"name":"_branavan_","email":"branavan.selva@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/core_0.1.6_1781741590021_0.07287932800358043"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-14T14:06:02.832Z","modified":"2026-06-18T00:13:10.294Z","0.1.0":"2026-06-14T14:06:03.161Z","0.1.1":"2026-06-14T16:25:42.209Z","0.1.2":"2026-06-15T04:54:05.971Z","0.1.3":"2026-06-15T06:08:22.180Z","0.1.4":"2026-06-15T06:42:19.611Z","0.1.5":"2026-06-17T23:25:27.602Z","0.1.6":"2026-06-18T00:13:10.151Z"},"license":"MIT","description":"Renderer-agnostic presence state runtime for AI interfaces.","maintainers":[{"name":"_branavan_","email":"branavan.selva@gmail.com"}],"readme":"# @ai-presence/core\n\nCore presence state runtime for AI interfaces.\n\nThis package is intentionally tiny in the prototype: it defines the canonical interaction states, transition events, a small runtime that renderers can subscribe to or poll, and shared controller inputs that stay renderer-agnostic.\n\nThe face demo consumes this layer as a browser global so the current static prototype still works without a build step. Package consumers can use either the CommonJS entry or the ESM export:\n\n```js\nimport { PresenceEvent, createPresenceRuntime } from \"@ai-presence/core\";\n\nconst presence = createPresenceRuntime();\npresence.send(PresenceEvent.SUBMIT);\n```\n\nFor debugging and demos, `createPresenceTrace` records a bounded transition timeline and `summarizePresenceTrace` turns it into compact integration evidence:\n\n```js\nimport {\n  PresenceEvent,\n  createPresenceRuntime,\n  createPresenceTrace,\n  summarizePresenceTrace,\n} from \"@ai-presence/core\";\n\nconst trace = createPresenceTrace({ limit: 32 });\nconst presence = createPresenceRuntime();\nconst detach = trace.attach(presence);\n\npresence.send(PresenceEvent.SUBMIT);\npresence.send(PresenceEvent.STREAM_OPEN);\npresence.send(PresenceEvent.TOKEN);\n\nconst summary = summarizePresenceTrace(trace);\nconsole.log(trace.getEntries().map((entry) => entry.state));\nconsole.log(summary.presenceBeforeOutputMs);\nconsole.log(summary.interrupted);\ndetach();\n```\n\nTrace entries include `elapsedMs` and `sincePreviousMs`, and the summary exposes facts such as `firstTokenMs`, `firstOutputMs`, `presenceBeforeOutputMs`, `interruptMs`, `interrupted`, `finalState`, `hasOutput`, and `complete` without coupling core to any renderer.\n\nRenderers can derive shared interaction-posture inputs from the same snapshot before mapping them into renderer-specific controllers:\n\n```js\nimport { PresenceEvent, createPresenceRuntime, presenceControlInputsForSnapshot } from \"@ai-presence/core\";\n\nconst presence = createPresenceRuntime();\nconst snapshot = presence.send(PresenceEvent.STREAM_OPEN);\nconst inputs = presenceControlInputsForSnapshot(snapshot);\n\nconsole.log(inputs.latencyPhase); // \"before-output\"\nconsole.log(inputs.attentionTarget); // \"response\"\nconsole.log(inputs.transitionEvent); // \"stream-open\"\n```\n\nThese values describe observable interaction posture such as attention target, tension, speech activity, interruption, latency phase, recovery, and compact transition context. They are not emotion detection or private emotion inference.\n","readmeFilename":"README.md"}