{"_id":"@aletheia-labs/episodic","_rev":"4-cf7dd54906135ea6db953176dc9b14e4","name":"@aletheia-labs/episodic","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@aletheia-labs/episodic","version":"0.1.0","keywords":["aletheia","llm","memory","episodic","agents"],"license":"Apache-2.0","_id":"@aletheia-labs/episodic@0.1.0","maintainers":[{"name":"penagabriel22","email":"penagabriel22@gmail.com"}],"dist":{"shasum":"0263c512cf5457741685481ee2f2723ef60402e1","tarball":"https://registry.npmjs.org/@aletheia-labs/episodic/-/episodic-0.1.0.tgz","fileCount":11,"integrity":"sha512-OE1lSEwhvXIzGK4pCBbp3O8MnV1OLOtOMMMC7qrb2nEVCvATQtr+JNNBO95u9mwTvU3sHLRkc14HYNReNpZuoA==","signatures":[{"sig":"MEUCIQDgb5KuFNjasjwLZ91miPkjlaDVmLSHiLZHMms1x8caywIgCFgYQs+Z+1pekp2jNOxRsMZuQ3uvUjPxjGYAyP6C5xE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67383},"main":"./dist/index.js","type":"module","_from":"file:aletheia-labs-episodic-0.1.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"penagabriel22","email":"penagabriel22@gmail.com"},"_resolved":"/private/var/folders/9c/lly_9vqs1gv40hnyxgytthg00000gn/T/c21ccd08f53fe35a1025e959cc9eae06/aletheia-labs-episodic-0.1.0.tgz","_integrity":"sha512-OE1lSEwhvXIzGK4pCBbp3O8MnV1OLOtOMMMC7qrb2nEVCvATQtr+JNNBO95u9mwTvU3sHLRkc14HYNReNpZuoA==","_npmVersion":"11.7.0","description":"Subjective time and episodic continuity projections for Aletheia memory stores.","directories":{},"_nodeVersion":"25.4.0","dependencies":{"@aletheia-labs/core":"0.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","typescript":"^5.6.3","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/episodic_0.1.0_1779044016263_0.6342276961837319","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@aletheia-labs/episodic","version":"0.1.1","keywords":["aletheia","llm","memory","episodic","agents"],"license":"Apache-2.0","_id":"@aletheia-labs/episodic@0.1.1","maintainers":[{"name":"penagabriel22","email":"penagabriel22@gmail.com"}],"dist":{"shasum":"037f8cc41a7fe6e187fb40bdc08c75fac4f087b3","tarball":"https://registry.npmjs.org/@aletheia-labs/episodic/-/episodic-0.1.1.tgz","fileCount":11,"integrity":"sha512-ddmejpRfo10T/3SnnFiQLWjlcu13CNM2G5CMF0vlZUlOsHA4ojxvR+kTVB3Y/1HAunr5/RZBVrnXjPp+rY2O5w==","signatures":[{"sig":"MEUCIQDYTKybPuDMNg6fP6vl5z9adotbfVLLIUOFKD6Q7SxurQIgGNLu2NkqZN6AGOjzuVlXP5WK0hMjj/vFdnYwIRltIXU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67582},"main":"./dist/index.js","type":"module","_from":"file:aletheia-labs-episodic-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"penagabriel22","email":"penagabriel22@gmail.com"},"_resolved":"/private/var/folders/9c/lly_9vqs1gv40hnyxgytthg00000gn/T/9138abd78e8ad38fc8b90832bc9e8a53/aletheia-labs-episodic-0.1.1.tgz","_integrity":"sha512-ddmejpRfo10T/3SnnFiQLWjlcu13CNM2G5CMF0vlZUlOsHA4ojxvR+kTVB3Y/1HAunr5/RZBVrnXjPp+rY2O5w==","_npmVersion":"11.7.0","description":"Subjective time and episodic continuity projections for Aletheia memory stores.","directories":{},"_nodeVersion":"25.4.0","dependencies":{"@aletheia-labs/core":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","typescript":"^5.6.3","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/episodic_0.1.1_1779046320060_0.12325790514572321","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@aletheia-labs/episodic","version":"0.1.2","keywords":["aletheia","llm","memory","episodic","agents"],"license":"Apache-2.0","_id":"@aletheia-labs/episodic@0.1.2","maintainers":[{"name":"penagabriel22","email":"penagabriel22@gmail.com"}],"dist":{"shasum":"a7b2a085586afdf75ac75a56329ca7dbcc21eb08","tarball":"https://registry.npmjs.org/@aletheia-labs/episodic/-/episodic-0.1.2.tgz","fileCount":11,"integrity":"sha512-nlNQ97CiytJ7xjaXGF8xFomRuWgS41YHiE/10Wqr+BpChiFmeANCNZhb7xhzZSp9pbpwRtIDtaMHVCcNfPkdMg==","signatures":[{"sig":"MEUCIQD5a2KqPzuNqW+9793cQaGqUaah+W01orwGkFUkcoMamwIgBsjqwy34xSvG9CkLLUwYqUNM3zkzCDLWloiqFn/Qeu0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89124},"main":"./dist/index.js","type":"module","_from":"file:aletheia-labs-episodic-0.1.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"penagabriel22","email":"penagabriel22@gmail.com"},"_resolved":"/private/var/folders/9c/lly_9vqs1gv40hnyxgytthg00000gn/T/6234cb7fe849d3327059f8be035c4057/aletheia-labs-episodic-0.1.2.tgz","_integrity":"sha512-nlNQ97CiytJ7xjaXGF8xFomRuWgS41YHiE/10Wqr+BpChiFmeANCNZhb7xhzZSp9pbpwRtIDtaMHVCcNfPkdMg==","_npmVersion":"11.7.0","description":"Subjective time and episodic continuity projections for Aletheia memory stores.","directories":{},"_nodeVersion":"25.4.0","dependencies":{"@aletheia-labs/core":"0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^2.1.8","typescript":"^5.6.3","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/episodic_0.1.2_1779048068721_0.3378606278777152","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@aletheia-labs/episodic","version":"0.1.3","description":"Subjective time and episodic continuity projections for Aletheia memory stores.","license":"Apache-2.0","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"dependencies":{"@aletheia-labs/core":"0.2.1"},"devDependencies":{"@types/node":"^22.10.0","typescript":"^5.6.3","vitest":"^2.1.8"},"publishConfig":{"access":"public"},"keywords":["aletheia","llm","memory","episodic","agents"],"repository":{"type":"git","url":"git+https://github.com/lechuit/synaptic-mesh.git","directory":"packages/episodic"},"homepage":"https://github.com/lechuit/synaptic-mesh/tree/main/packages/episodic#readme","bugs":{"url":"https://github.com/lechuit/synaptic-mesh/issues"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test":"vitest run","test:watch":"vitest"},"_id":"@aletheia-labs/episodic@0.1.3","_integrity":"sha512-X2RbcETwInx2h2eOHyYxnfNl8U2R1W0LEWnx0ONOJsiKlqsdI/7+MdmQOETfPGtp/qo7qVuxo+PoYAk6T52SSw==","_resolved":"/private/var/folders/9c/lly_9vqs1gv40hnyxgytthg00000gn/T/a81a0d66e932b610a52d22f81953ab46/aletheia-labs-episodic-0.1.3.tgz","_from":"file:aletheia-labs-episodic-0.1.3.tgz","_nodeVersion":"25.4.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-X2RbcETwInx2h2eOHyYxnfNl8U2R1W0LEWnx0ONOJsiKlqsdI/7+MdmQOETfPGtp/qo7qVuxo+PoYAk6T52SSw==","shasum":"171ac0471085b72fbe5b749ed570208ac9d28e56","tarball":"https://registry.npmjs.org/@aletheia-labs/episodic/-/episodic-0.1.3.tgz","fileCount":11,"unpackedSize":89437,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCVQ+xKI/7XyfyR5x4ykpV4ntANXwj6aPzO7TvkvBzoigIhANCrzr0z2sTqYVkZBS+rzwo2Uz8Iw0EmnmKYU9O/jGQO"}]},"_npmUser":{"name":"penagabriel22","email":"penagabriel22@gmail.com"},"directories":{},"maintainers":[{"name":"penagabriel22","email":"penagabriel22@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/episodic_0.1.3_1779475332778_0.18563261337900383"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-17T18:53:36.201Z","modified":"2026-05-22T18:42:13.031Z","0.1.0":"2026-05-17T18:53:36.400Z","0.1.1":"2026-05-17T19:32:00.265Z","0.1.2":"2026-05-17T20:01:08.870Z","0.1.3":"2026-05-22T18:42:12.911Z"},"license":"Apache-2.0","keywords":["aletheia","llm","memory","episodic","agents"],"description":"Subjective time and episodic continuity projections for Aletheia memory stores.","maintainers":[{"name":"penagabriel22","email":"penagabriel22@gmail.com"}],"readme":"# @aletheia-labs/episodic\n\nSubjective time and episodic continuity projections for Aletheia.\n\n> **Status**: `0.1.x` experimental public baseline. Episodic timeline projections are live; they read from existing event and memory stores and do not add authority by themselves.\n\n## Requirements\n\n- Node 20+.\n- ESM-only. Add `\"type\": \"module\"` to your `package.json`, use `.mjs`, or use\n  a build tool/runtime that handles ESM. CommonJS `require()` is not shipped in\n  `0.1.x`.\n\n## Quickstart\n\n```bash\npnpm add @aletheia-labs/core @aletheia-labs/store-sqlite @aletheia-labs/episodic\n```\n\n```ts\nimport { AgentIdSchema, staticVisibilityPolicy } from '@aletheia-labs/core';\nimport { EpisodicTimeline } from '@aletheia-labs/episodic';\nimport { openSqliteStores } from '@aletheia-labs/store-sqlite';\n\nconst stores = openSqliteStores('./aletheia.sqlite');\nconst timeline = new EpisodicTimeline({\n  eventLedger: stores.eventLedger,\n  memoryStore: stores.memoryStore,\n  visibilityPolicy: staticVisibilityPolicy([{ kind: 'private:user' }]),\n});\n\nconst catalog = await timeline.listEpisodes({\n  agentId: AgentIdSchema.parse('agent-1'),\n  scope: { kind: 'project', projectId: 'demo' },\n  kind: 'conversation',\n  limit: 10,\n});\n\nconsole.log(catalog.decision.outcome, catalog.episodes.length);\nstores.close();\n```\n\nThe timeline only projects what the caller can already see through visibility and scope filtering.\n\n## What this package does\n\n- Extracts explicit episodic anchors from event payloads.\n- Lists visible episodes by conversation, task, decision context, or session.\n- Indexes visible atoms by the conversation, task, session, or decision context\n  events that produced them.\n- Finds memories formed during a visible conversation, task, session, or decision context.\n- Reconstructs belief snapshots at a historical instant from visible atoms plus audited status history.\n- Compares visible belief snapshots at two episode boundaries to show added, removed, persisted, and status-changed beliefs.\n- Exposes a permission-guarded timeline for one visible memory's audited status history.\n- Builds a self-state snapshot so a restarted agent can recover what it currently believes, doubts, distrusts, or must route to a human.\n- Builds a compact restart continuity brief from current self-state, recent visible episodes, and optional status changes since a prior instant.\n\n`continuityBrief().changedSince` compares endpoint snapshots. Use\n`memoryTimeline()` when you need the full audited transition path for one\nmemory.\n\n## Non-goals\n\n- No semantic search, vector ranking, or fuzzy topic inference.\n- No new permission model. Host-provided visibility is still the boundary.\n- No action authorization. Episodic projections are audit context, not permission tokens.\n\n## Event payload convention\n\nEvents can opt into subjective time by carrying an `episodic` object:\n\n```json\n{\n  \"episodic\": {\n    \"episodeId\": \"conversation-2026-05-17-a\",\n    \"kind\": \"conversation\",\n    \"sessionId\": \"session-a\",\n    \"conversationId\": \"conversation-a\"\n  }\n}\n```\n\nSupported `kind` values are `conversation`, `task`, `decision_context`, and `session`.\n\nUse `experienceIndex()` to map visible episodes to visible atoms:\n\n```ts\nconst index = await timeline.experienceIndex({\n  agentId,\n  scope: { kind: 'project', projectId: 'demo' },\n  kind: 'conversation',\n  asOf: '2026-05-17T00:00:00Z',\n});\n```\n\nThe join is receipt-based: event visibility/scope first, memory visibility,\nscope, status, and freshness second, then source-event matching. By default,\n`experienceIndex()` includes every memory status because it is an audit\nprojection; pass `statusesAt: ['verified', 'trusted']` when you only want\nbelief-state entries. `contentIncludes` is case-sensitive literal matching and\nonly runs as a post-filter inside the already-authorized set.\n\n## Stability\n\nPublic surface for the initial library cycle:\n\n- `EpisodicTimeline`\n- episode catalog/projection/comparison types\n- experience index types\n- belief snapshot and self-state snapshot types\n- continuity brief and continuity change-set types\n- memory timeline types\n- explicit `EpisodeAnchor` payload convention\n\nEverything else is projection plumbing and may change during the `0.x` line. Episodic outputs are audit context, not permission tokens; callers must still route actions through `tryAct()`.\n\n## Development\n\nFrom the repo root:\n\n```bash\npnpm install\npnpm -F @aletheia-labs/episodic typecheck\npnpm -F @aletheia-labs/episodic test\npnpm -F @aletheia-labs/episodic build\n```\n","readmeFilename":"README.md","homepage":"https://github.com/lechuit/synaptic-mesh/tree/main/packages/episodic#readme","repository":{"type":"git","url":"git+https://github.com/lechuit/synaptic-mesh.git","directory":"packages/episodic"},"bugs":{"url":"https://github.com/lechuit/synaptic-mesh/issues"}}