Skip to content

Releases: davccavalcante/mnemosyne

[PUBLISHED ON NPMJS] @takk/mnemosyne@1.0.0

Choose a tag to compare

@github-actions github-actions released this 30 Jun 21:24

STATUS: PUBLISHED ON NPMJS. This version was published to the npm registry on 2026-06-30T21:29:09Z with provenance attestation. View on npm: https://www.npmjs.com/package/@takk/mnemosyne/v/1.0.0

STATUS: REVIEW REQUIRED, NOT YET ON NPMJS. This GitHub Release was created by the release.yml workflow. The Creator must review the contents (tag, changelog, attached commit, pack-smoke result in the workflow logs) and then explicitly run npm-publish.yml to publish this version to the npm registry.

[1.0.0] - 2026-06-30T21:17:25Z

Initial stable release. Mnemosyne is a universal, zero-runtime-dependency NPM library and CLI that gives a pool of Massive Intelligence (IM) agents a single persistent, portable, shared memory, the open, local-first, provider-agnostic state layer for non-human entities. Any agent reads from and writes to a namespaced, versioned, content-addressed store; a non-human entity's identity projects to a deterministic 256-dimensional seed that is byte-for-byte stable across model swaps, a fingerprint of the persona definition that is independent of the model; sensitive fields are masked and tagged with a residency before they cross a boundary; and every access can be sealed into a tamper-evident SHA-256 audit chain and exported as an Ed25519-signed snapshot. The core never speaks a provider API and never reaches the network; it is memory logic over a pluggable store, which keeps it provider-agnostic, node-free, and testable offline.

Added

Mnemosyne facade

  • Mnemosyne (@takk/mnemosyne/mnemosyne): the facade most callers use. It exposes remember and set to write, recall, get, and has to read, query to list, forget to delete, context for the shared view, withNamespace to bind a sibling namespace over the same store and audit chain, snapshot and restore for portability, sealedSnapshot to export an Ed25519-signed snapshot, and auditTrail to read the tamper-evident log. A clock is injectable so writes and audit entries are fully deterministic in tests. Writes are versioned: re-writing a key increments its version while preserving the original createdAt, and the read-modify-write is serialized per key so a pool of agents sharing one store in a single process never loses a concurrent write to the same key.

Memory record and store

  • MemoryRecord, MemoryInput, MemoryQuery, MemoryStore, plus createRecord, normalizeKey, normalizeTags, contentHashOf, deriveMemoryId, and isExpired (@takk/mnemosyne/record): the content-addressed record model. Each record carries a namespace, an author agent, a kind (fact, episodic, semantic, skill, persona, scratch), a logical key, a JSON value, sorted tags, metadata, timestamps, a monotonic version, an optional ttl resolved to an absolute expiry, an optional residency tag, and a SHA-256 content hash.
  • InMemoryStore, inMemoryStore, matchesQuery, and orderRecords (@takk/mnemosyne/store): the pure in-memory reference store and the shared query and ordering engine every backend reuses, so an edge key-value backend and a Node file store stay byte-for-byte consistent with the reference.

Deterministic identity (HIM)

  • projectPersona, deriveIdentity, fingerprintOf, identityDistance, identitySimilarity, identityMatches, and definePersona (@takk/mnemosyne/identity): the deterministic projection of a persona definition to a fixed 256-dimensional vector, seeded by an SHA-256 counter-mode expansion of the canonical persona. The projection never depends on a model, so the same persona yields the same vector and the same fingerprint across runtimes and across model swaps; the cosine distance measures drift in the persona definition, a fingerprint comparison rather than a behavioral claim about the model.

Shared context

  • SharedContext and sharedContext (@takk/mnemosyne/context): the namespace-scoped, agent-shared view, the hippocampus of the swarm. It exposes recent, ofKind, a budgeted window that fits shared memory into a model's context, contributors, and a typed handoff bundle that passes the baton between agents without losing state.

Masking and residency

  • maskValue, maskRecord, and maskRecords (@takk/mnemosyne/masking): deterministic, field-level masking under a policy. Rules match a field key or a scalar value and apply redact, hash, or partial, with hash using SHA-256 so the same sensitive value always maps to the same digest and masked records stay joinable without revealing plaintext. A policy can stamp a residency tag.

Tamper-evident audit

  • AuditChain, verifyChain, hashEntry, and GENESIS_HASH (@takk/mnemosyne/audit): an append-only log where every remember, recall, forget, snapshot, and restore hashes its event together with the previous entry's hash, so any later edit, reorder, or deletion breaks the linkage and verification reports exactly where. Appends are serialized internally, so concurrent appends keep the chain valid rather than racing on the head.

Ed25519 signing

  • generateSigningKeyPair, signSnapshot, and verifySnapshotSignature (@takk/mnemosyne/signing): node-free Ed25519 signing of memory snapshots over Web Crypto, so an exported memory can be proven to come from the holder of the private key and to be unaltered in transit between stores or infrastructures.

MCP, adapters, and runtimes

  • createRememberTool, createRecallTool, createQueryTool, createMemoryTools, and createMemoryResource (@takk/mnemosyne/mcp): memory as a Model Context Protocol resource, the mnemosyne_remember, mnemosyne_recall, and mnemosyne_query tools plus a readable resource, as plain objects that register on any MCP server without an SDK dependency.
  • kvMemoryStore, KvBackend, personaGuard, and rememberConversation (@takk/mnemosyne/adapter): adapt any minimal async key-value backend into a full store, guard a non-human entity's identity across a model swap, and record a chat transcript as ordered episodic memory.
  • edgeKvStore and EdgeKvNamespace (@takk/mnemosyne/edge): adapt a Cloudflare Workers KV namespace, and its many lookalikes, into a store, with the node-free core re-exported, so the whole surface runs on Cloudflare Workers, Vercel Edge, Deno, Bun, and the browser.
  • fileMemoryStore (@takk/mnemosyne/node): a file-backed store, the only surface that touches node:fs, so memory survives a restart on the developer's own disk with no database. Each operation reads the file fresh, writes are serialized per path and committed atomically through a temp file and rename, so agents sharing one file in a single process do not lose writes; a concurrent multi-process pool should back kvMemoryStore with a real database that provides transactions or locking.

Command-line interface

  • mnemosyne CLI with remember, recall, forget, query, identity, snapshot, restore, keygen, and audit-verify. Stable exit codes: 0 success, 2 usage error, 10 not found, 20 invalid input, 21 verification failed. The CLI persists to a Node file store by default, so memory written in one invocation is recalled by the next.

Engineering

  • 141 tests across 16 suites, green on Node 20, 22, and 24. Coverage 93.92% statements / 85.63% branches / 96.93% functions / 93.79% lines.
  • Zero required runtime dependencies. The core is node-free: Ed25519 and SHA-256 run over Web Crypto (globalThis.crypto.subtle), never node:crypto.
  • Dual ESM and CJS builds with type definitions for both, validated by publint and attw --profile node16, with a per-export size budget enforced by size-limit.
  • SLSA provenance attestation on every npm release, published through a two-step, review-required CI/CD flow.
  • Optional, conceptual peers @takk/keymesh and @takk/modelchain, both optional, so Mnemosyne installs and runs standalone.

Not in 1.0 (non-goals)

  • No bundled vector database, embedding model, or semantic-search index. Mnemosyne is the portable memory substrate; semantic memory and cross-agent semantic recall are on the roadmap for a later version.
  • No hosted service, no multi-region sync, and no network transport. The library never reaches the network; durability and replication are the backend's responsibility.
  • No automatic summarization or compaction of long histories. The budgeted context window is deterministic and lossless within its budget.