Skip to main content

Module modes

Module modes 

Source
Expand description

What each command does: ask the resident first, then run in process (A3, C4).

The resident is membrane serve, started and owned by the host app. A command tries its endpoint with a 100 ms connect budget; when nothing answers (ClientError::NotRunning) it runs the same request in this process against the stores, which never loads the embedding model. A query also falls back when the resident was reached but could not answer it. A write does not: once a resident was reached the write may have run, so replaying it here could do it twice.

Enums§

DispatchOutcome

Functions§

adapt_adjudicate_taste
membrane adapt adjudicate-taste --manifest <file> --decisions <file> --validated-at <t> [--json]: bind semantic decisions to a pending Taste manifest and print the adjudicated manifest. It reads the two files and writes nothing; adapt apply admits the result.
adapt_apply
membrane adapt apply (--manifest <file> | --insights <file> --installation-id <id>) [--dry-run] [--json]: admit a reviewed manifest, or sealed Insight issues. A write.
adapt_mine_session
membrane adapt mine-session --session <id>... [--scope s] [--min-recurrence n] [--json]: mine the committed events of the named sessions (transcript append rows) for Taste and Insight evidence. Report only: nothing is admitted. A read.
adapt_observe
membrane adapt observe --stdin|--input <file> [--json]: one observation document. The transcript and observation routes answer it; it is a write.
adapt_recall
membrane adapt recall <query> [-k n] [--scope s] [--dimension K=V]… [--json]: the Taste records that apply. A read.
adapt_status
membrane adapt status [--scope s] [--json]: live Adapt progress for a scope. A read.
adapt_taste_review
membrane adapt taste-review --input <file> --installation-id <id> --created-at <t> [--json]: build a pending Taste manifest from native mine output. It opens the store for reading in full, so it runs under the owner lock when no resident answers.
blueprint
membrane blueprint <query…> [--repo <path>]: read verbs answer from the resident, else in process. build and refresh write: resident answers, or with no resident the CLI builds under the owner lock, or a typed unavailable error. --repo names the repository without a chdir; without it, the current directory.
context_pull
membrane context pull: print the context for a task, or nothing when there is none. With --wire and --request-id the context is also recorded as a receipt the caller can later mark delivered.
history
membrane history search|status|erase: the ChatGPT and Codex history lane (Ledger transcripts). Runs in process against the stores; nothing is searched while the manifest is absent or off.
hook_event
membrane hook: always exits 0. Context events try the resident first; every event runs in process otherwise. Only the reply the host’s schema accepts goes to stdout.
init
membrane init <root> --repository <id> --scope <id>: operator-owned registry enrollment.
memory_delete
membrane memory delete <id> [--json]. The resident deletes when one runs, so the store is never written under it. A missing id is exit 3, with the document saying deleted: false.
memory_durable
membrane memory <command>: the durable-memory maintenance commands, in process. memory list --json is answered here as one membrane.memory.list.v1 document.
memory_push
membrane memory push: store text as a durable memory.
memory_search
membrane memory search <query> [--tier T…] [--limit N] [--cwd|--repo] [--json]. The resident answers when one runs, else the store is read in process with the lexical arm, so the model is never loaded.
receipts_confirm
membrane receipts confirm: flip this session’s emitted receipts to delivered where the host’s transcript shows their marker. Prints nothing and always exits 0, because the host app’s Stop hook runs it; a transcript it cannot read leaves the receipts emitted.
receipts_list
membrane receipts list [--session <id>] [--json]: the durable context receipts.
receipts_mark
membrane receipts mark <id> --delivered [--json]: an emitted receipt with this id becomes delivered. Any other state stays. Exit 3 when no receipt has the id.
serve
membrane serve: the resident. The host app starts it with a stdin pipe it holds for the resident’s life; serve reports itself and returns the exit code (“already serving” is 0).
status
membrane status [--json].
transcript_append
membrane transcript append --session <id> --cursor <n> (--stdin | --text <json>) [--scope s] [--json]. The events are a JSON array of SessionTranscriptEventV1 rows that extend the stream at --cursor.
transcript_tip
membrane transcript tip --session <id> [--json]: the committed end of the session’s stream. A read. A forgotten session is exit 2.
where_binary
membrane where [--json]: the absolute path of the running binary, with its version, so a caller holding a candidate path can confirm it is Membrane and which build it is. Read-only; it never contacts the resident.