ReceiptGate is the canonical receipt ledger for the LegiVellum stack. It is a MemoryGate profile that stores immutable, append-only receipts and derives obligation truth (inbox, chain, history) from those receipts.
- Immutable receipt ledger
- Idempotent append-only MCP interface
- Derived inbox/chain tools
- Durable task store (AsyncGate owns task lifecycle)
- Artifact store (DepotGate owns artifact storage)
- Workflow runtime
# Install dependencies
pip install -e .
# One-command local run
./run_local.sh
# Windows PowerShell: .\run_local.ps1Health check:
curl -s http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"receiptgate.health","arguments":{}}}'Schema files live in schema/ and can be auto-applied on startup when
RECEIPTGATE_AUTO_MIGRATE_ON_STARTUP=true (default).
python scripts/golden_path.pyReceiptGate is MCP-only (JSON-RPC over HTTP). The MCP endpoint is:
POST /mcp
Tool names:
receiptgate.submit_receipt- Append a receipt (idempotent)receiptgate.list_inbox- Open obligations for recipientreceiptgate.get_receipt_chain- Causality chainreceiptgate.search_receipts- Search receipt headersreceiptgate.list_task_receipts- All receipts for a taskreceiptgate.get_receipt- Fetch full receipt payloadreceiptgate.health- MCP health check
Terminal phases for obligation closure:
completeescalate
LegiVellum v1 receipts use terminal phases complete and escalate.
Defined in src/receiptgate/principals.py:
SYSTEM_PRINCIPAL_ID = "sys:legivellum"SERVICE_PRINCIPAL_ID = "svc:receiptgate"
See .env.example for the full list. Key variables:
RECEIPTGATE_DATABASE_URL(default:sqlite:///./receiptgate.db)RECEIPTGATE_API_KEY(unlessRECEIPTGATE_ALLOW_INSECURE_DEV=true)RECEIPTGATE_ALLOW_INSECURE_DEV(dev only)RECEIPTGATE_RECEIPT_BODY_MAX_BYTES(default 262144)RECEIPTGATE_ENABLE_GRAPH_LAYER/RECEIPTGATE_ENABLE_SEMANTIC_LAYER
pytest tests/ -v