Skip to content

What lives where

packages/code @mnema/code: the package you install. The command line and the MCP server. It holds no domain logic: it resolves where you are, calls one function below, and prints what came back, which is what makes the two surfaces behave identically.
packages/chain The proof engine: the typed event catalog, canonicalization, the per-tail hash chain, Ed25519 checkpoints, and the verifier. Zero runtime dependencies: the code you have to trust for tamper-evidence is auditable on its own, and it is released on its own so that it can be. Its tarball carries FORMAT.md, the published vectors and the independent verifier.
packages/core The work domain: the gate over the shape of a change, the projections read back out of the chain, identity, and the queries. Released because @mnema/code depends on it.
packages/context Read-only derivations that turn the proven record into the context an agent is handed. Released because @mnema/code depends on it.
packages/stacks The stack contract: the stack.json schema, the validator and the digest a stack is identified by, which digest.sh reproduces without it. It reads a stack and runs nothing in it. Released because @mnema/code depends on it: mnema stack add validates a stack with it before writing anything.
packages/action A GitHub Action, not published: on a pull request it comments what the pull request does to the record and which changed files a rule in force addresses, and fails the check when mnema verify --require=signed --since <base> does. It reads and verifies; it writes signed rule results to the working tree only if the workflow hands it a checker-key.
packages/sdk A library door to the record, not published: record a decision, accept or reject one, take a note, read the brief, the notes and the rules for a path, verify the record, and register hooks for a program built on the Claude Agent SDK. It calls the same functions as the command line, and a test holds the three doors to the same events and refusals.
packages/vscode A VS Code extension, published to the Visual Studio Marketplace and Open VSX as mnema.mnema (the release publishes the file it packs; it needs the mnema command from @mnema/code): it shows the rules in force over the open file, lists the decisions waiting for a judgment (in a container of its own in the activity bar, with a badge; from one mnema status --json per reading), opens one whole as a document of what the command line answered for it, offers a pick of what awaits and a document of mnema why for a file, marks the .mnema folder in the Explorer, and records accept or reject (with the note, one decision at a time) through the command line’s own decision verb, lists the stacks adopted for the project and runs the stack verbs on them (the plan shown whole before anything is written, and no button that turns a hook on), and shows the level mnema verify reports and how many decisions await (no notification per proposal), or says the mnema command is missing. It reads and writes only through the command line.
plugin/ The plugin for the agent hosts. For Claude Code, fifteen hooks (three as a session opens (one of them only after a compaction), four at each edit: the one Claude Code runs, the one VS Code runs, the one Cursor runs and the one Qwen Code runs, each skipped by the others; three after a tool ran (one when a question to the person is answered, one after a write, which Claude Code runs, one after a dispatch to another agent), two at the end of a response, one when a subagent starts, one when a subagent stops, one when a session ends) and the MCP server declaration, in one installation; beside them, the manifests and hooks files of Codex and Copilot CLI, OpenCode’s module and Gemini CLI’s extension, all generated from one table of the hosts.
plugin-server-only/ The same marketplace’s second plugin, for Claude Code, Codex and Copilot CLI: the MCP server declaration and nothing else (no hook, no skill), for whoever wants the server and the command line only.

All five are released, and only one of them is meant to be installed. This paragraph used to say the other three were internal packages that were never published, and what falsified it is that @mnema/code declares them as dependencies: a package on the registry whose dependencies are not on it is a package that does not install. What each of the three then carries was a decision rather than a default: @mnema/chain travels with the document, the vectors and the verifier, because the promise in its row is worth only what a stranger can check; the other three travel with their compiled code and their page (@mnema/stacks with its schema and digest.sh too), and say on it that their surface is this product’s and not an API. Each of the five has a README of its own, each with its own What it proves, and what it does not.

mnema 0.1.4 · commit cebc4e8da68c