Metadata-Version: 2.4
Name: memultra
Version: 1.0.0
Summary: The memory gate, model-free tier: RecallResult verification with a frozen output contract. Zero models, zero API keys, zero network.
License: Apache-2.0
Keywords: memory,gate,verification,mcp,offline
Classifier: Development Status :: 5 - Production/Stable
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: test
Requires-Dist: pytest>=7; extra == "test"
Dynamic: license-file

# memultra

The memory gate, model-free tier. A RecallResult verification gate with a
**frozen output contract** (v1.0.0): canonical bytes in, deterministic
routing verdict out. Zero models, zero API keys, zero network — the entire
package runs inside an empty network namespace.

## Quickstart (under 5 minutes, no cloud)

```sh
# 1. install (pipx from PyPI, or from a local wheel - both work offline-first)
pipx install memultra
#   offline/local:  pipx install ./memultra-1.0.0-py3-none-any.whl

# 2. write a RecallResult (canonical form; see `memultra route` docs)
cat > result.json <<'EOF'
{"schema_version": "1.0.0", "confidence_score": 0.72,
 "calibration_provenance": "k_of_c", "band": "HIGH",
 "gate_decision": "pass", "prescribed_action": "engineering_loop_with_sanity_check",
 "speculative_tainted": false, "speculative_node_count": 0,
 "provenance": [{"node_id": "node-1", "source_path": "src/gate.py",
   "content_hash": "sha256:9f2c4e71a0b3d58f", "verified": true,
   "verified_at": "2026-11-27T18:03:12Z", "speculative": false}],
 "provenance_total": 1, "provenance_truncated": false,
 "candidates": ["src/gate.py"], "degraded_modes": [],
 "loop_state": "unrouted"}
EOF

# 3. verify + route - fully offline
memultra verify            # conformance suite: 41 tests, PASS
memultra route result.json # deterministic verdict JSON

# 4. prove it cannot phone home
memultra offline --verify -- memultra verify   # PASS: 0 network syscalls
```

MCP stdio server (zero network, zero keys):

```json
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}
{"jsonrpc":"2.0","id":2,"method":"tools/list"}
{"jsonrpc":"2.0","id":3,"method":"tools/call",
 "params":{"name":"memultra_route","arguments":{"payload":{...}}}}
```

```sh
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | memultra serve
```

## What's inside

| piece | what it is |
|---|---|
| `memultra.contract` | the frozen contract engine: `schema.json` (v1.0.0), canonical byte encoder, reference consumer/route() |
| `memultra.conformance` | the conformance suite (41 tests) + golden fixtures + the mutation suite |
| `memultra.mcp` | MCP stdio server: `memultra_verify`, `memultra_route`, `memultra_schema` |
| `memultra.offline` | network-enforcement wrapper (`unshare -n` / `bwrap --unshare-net` + strace evidence) |

Runtime dependencies: **none**. Test dependency: pytest only.

## Contract

Output contract `hippocampus/epistemic-gate` v1.0.0, version-locked: the
package asserts on import that its schema matches the frozen contract
version. Any threshold, band or semantic change is a major bump.

## License

Apache-2.0 (see LICENSE). Verification tooling and evidence bundles also
Apache-2.0; nothing phones home anywhere — asserted in CI.
