{
  "schema": "living-stack-tool-reference.v1",
  "captured_at": "2026-10-29T01:55:02.235Z",
  "server": {
    "name": "living-stack-mcp",
    "version": "0.3.5-beta.1",
    "protocol": "2025-06-18"
  },
  "node": "v22.22.0",
  "how": "node capture-tool-reference.mjs <server.mjs> (MCP stdio, throwaway state directory, no network)",
  "tools": [
    {
      "name": "livingstack.status",
      "title": "Living Stack Capability Status",
      "description": "Read-only server capability and policy discovery. Use this first to inspect Living Stack boundaries and risk classes; use livingstack.session_status instead for the state of one existing session.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {},
        "required": []
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.session_start",
      "title": "Start a Scoped Runtime Session",
      "description": "Create a new isolated session and persist its immutable scope, goal, retention, and hard budget ceiling. Call this once before any other session tool; repeat calls create separate sessions rather than resuming one.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "scope": {
            "type": "string",
            "description": "Bounded description of the work this session may cover.",
            "minLength": 1,
            "maxLength": 500
          },
          "goal": {
            "type": "string",
            "description": "Concrete outcome the agent is pursuing.",
            "minLength": 1,
            "maxLength": 4000
          },
          "budget_limit_usd": {
            "type": "number",
            "description": "Maximum cumulative metered cost for this session.",
            "minimum": 0,
            "maximum": 1000000,
            "default": 0
          },
          "retention_hours": {
            "type": "number",
            "description": "Session retention period.",
            "minimum": 1,
            "maximum": 8760,
            "default": 24
          }
        },
        "required": [
          "scope",
          "goal"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.session_status",
      "title": "Inspect a Runtime Session",
      "description": "Read-only inspection of one session's scope hash, lifecycle, budget, pending authorizations, and ledger integrity. Use this to resume or monitor a known session; use livingstack.status for server-wide capabilities and policy.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          }
        },
        "required": [
          "session_id"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.context_put",
      "title": "Store Scoped Context",
      "description": "Persist redacted, provenance-labeled historical context inside an open session and append an audit receipt. Use this for facts or source material; use livingstack.checkpoint_save for exact recoverable workflow state and livingstack.record_outcome for action results.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          },
          "text": {
            "type": "string",
            "description": "Context text. Credential-shaped values are redacted.",
            "minLength": 1,
            "maxLength": 32768
          },
          "source": {
            "type": "string",
            "description": "Human-readable provenance label or URI.",
            "minLength": 1,
            "maxLength": 500
          },
          "tags": {
            "type": "array",
            "description": "Optional retrieval tags.",
            "items": {
              "type": "string",
              "description": "Tag",
              "maxLength": 64
            },
            "maxItems": 20,
            "default": []
          }
        },
        "required": [
          "session_id",
          "text",
          "source"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.retrieve_context",
      "title": "Retrieve Scoped Context",
      "description": "Read-only deterministic lexical search over context previously stored in one session, returning provenance and receipt hashes. Use this for fact lookup; use livingstack.checkpoint_load when exact saved workflow state must be recovered.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          },
          "query": {
            "type": "string",
            "description": "Search terms.",
            "minLength": 1,
            "maxLength": 1000
          },
          "limit": {
            "type": "number",
            "description": "Maximum results.",
            "minimum": 1,
            "maximum": 20,
            "default": 5
          }
        },
        "required": [
          "session_id",
          "query"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.authorize_action",
      "title": "Authorize a Bounded Agent Action",
      "description": "Evaluate one intended host action, append an authorization receipt, and reserve its estimated cost against the session budget. Call immediately before the host acts; Living Stack never executes the action, and the default policy denies external or destructive risk.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          },
          "action_id": {
            "type": "string",
            "description": "Caller-generated stable action identifier.",
            "pattern": "^[A-Za-z0-9._-]{3,96}$"
          },
          "action_type": {
            "type": "string",
            "description": "Action category such as filesystem.read or model.call.",
            "maxLength": 120
          },
          "risk": {
            "type": "string",
            "description": "Risk class.",
            "enum": [
              "read",
              "local_write",
              "external",
              "destructive"
            ],
            "default": "read"
          },
          "estimated_cost_usd": {
            "type": "number",
            "description": "Maximum amount reserved for this action.",
            "minimum": 0,
            "default": 0
          },
          "target": {
            "type": "string",
            "description": "Optional target description. Only its SHA-256 is persisted.",
            "maxLength": 2000,
            "default": ""
          }
        },
        "required": [
          "session_id",
          "action_id",
          "action_type"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.record_outcome",
      "title": "Record an Authorized Outcome",
      "description": "Call after the host action to consume one unused livingstack.authorize_action receipt, inherit its target as the outcome subject, reconcile reserved cost, and append the observed result. Only typed evidence objects that bind one category to one safe reference can support later claims.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          },
          "authorization_id": {
            "type": "string",
            "description": "Authorization returned by livingstack.authorize_action."
          },
          "classification": {
            "type": "string",
            "description": "Observed result.",
            "enum": [
              "success",
              "failure",
              "mixed",
              "unresolved"
            ]
          },
          "actual_cost_usd": {
            "type": "number",
            "description": "Observed cost, which cannot exceed the reservation.",
            "minimum": 0,
            "default": 0
          },
          "evidence": {
            "type": "array",
            "description": "Typed evidence links. Each item binds one evidence category to one receipt ID, hash, or other safe reference; only these pairs can support a claim.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Evidence category such as verification or integrity.",
                  "minLength": 1,
                  "maxLength": 64
                },
                "ref": {
                  "type": "string",
                  "description": "Safe receipt ID, digest, or reference for this exact evidence category.",
                  "minLength": 1,
                  "maxLength": 500
                }
              },
              "required": [
                "type",
                "ref"
              ]
            },
            "maxItems": 50,
            "default": []
          },
          "evidence_types": {
            "type": "array",
            "description": "Deprecated unbound evidence labels retained only as trace metadata; they never satisfy claim gates.",
            "items": {
              "type": "string",
              "description": "Legacy evidence type",
              "maxLength": 64
            },
            "maxItems": 20,
            "default": []
          },
          "evidence_refs": {
            "type": "array",
            "description": "Deprecated unbound references retained only as trace metadata; they never satisfy claim gates.",
            "items": {
              "type": "string",
              "description": "Legacy evidence reference",
              "maxLength": 500
            },
            "maxItems": 50,
            "default": []
          },
          "summary": {
            "type": "string",
            "description": "Short redacted outcome summary.",
            "maxLength": 4000,
            "default": ""
          }
        },
        "required": [
          "session_id",
          "authorization_id",
          "classification"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.check_claim",
      "title": "Check a Claim Against Current Evidence",
      "description": "Call before outcome language to append a claim_checked audit event and check only explicitly selected fresh successful outcomes whose authorization target hashes to the same subject. Unrelated, stale, failed, unknown, or unreferenced outcomes are rejected rather than pooled across the session.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          },
          "claim_type": {
            "type": "string",
            "description": "Claim class.",
            "enum": [
              "completion",
              "integrity",
              "working",
              "deployment"
            ],
            "default": "completion"
          },
          "claim_text": {
            "type": "string",
            "description": "The exact proposed claim.",
            "minLength": 1,
            "maxLength": 8000
          },
          "subject": {
            "type": "string",
            "description": "Exact artifact, deployment, workflow, or result identifier used as the target in the supporting action authorization.",
            "minLength": 1,
            "maxLength": 2000
          },
          "outcome_ids": {
            "type": "array",
            "description": "Explicit outcome IDs returned by livingstack.record_outcome that are offered as support for this claim.",
            "items": {
              "type": "string",
              "description": "Outcome ID",
              "pattern": "^out_[A-Za-z0-9-]{8,96}$"
            },
            "minItems": 1,
            "maxItems": 20
          },
          "required_evidence_types": {
            "type": "array",
            "description": "Additional evidence categories required by the caller.",
            "items": {
              "type": "string",
              "description": "Evidence type",
              "maxLength": 64
            },
            "maxItems": 20,
            "default": []
          },
          "max_age_seconds": {
            "type": "number",
            "description": "Maximum evidence age.",
            "minimum": 1,
            "maximum": 31536000,
            "default": 7200
          }
        },
        "required": [
          "session_id",
          "claim_text",
          "subject",
          "outcome_ids"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.checkpoint_save",
      "title": "Save a Durable Checkpoint",
      "description": "Redact and persist an exact bounded workflow-state snapshot tied to the open session scope and current ledger lineage. Use before interruption or risky transitions; use livingstack.context_put for searchable historical context rather than recoverable state.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          },
          "label": {
            "type": "string",
            "description": "Human-readable checkpoint label.",
            "minLength": 1,
            "maxLength": 200
          },
          "state": {
            "type": "object",
            "description": "Bounded serializable state. Credential-shaped keys and values are redacted."
          },
          "retention_hours": {
            "type": "number",
            "description": "Checkpoint retention.",
            "minimum": 1,
            "maximum": 8760,
            "default": 24
          }
        },
        "required": [
          "session_id",
          "label",
          "state"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.checkpoint_load",
      "title": "Load a Verified Checkpoint",
      "description": "Verify and return the exact saved state, then append a checkpoint_loaded audit event; it does not overwrite active session state. Use after restart or interruption with an ID from livingstack.checkpoint_save; use livingstack.retrieve_context for lexical fact lookup.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          },
          "checkpoint_id": {
            "type": "string",
            "description": "Checkpoint returned by livingstack.checkpoint_save."
          }
        },
        "required": [
          "session_id",
          "checkpoint_id"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.trace_report",
      "title": "Generate a Redacted Trace Report",
      "description": "Read-only verification and summary of one session's event chain, outcomes, budget, and lifecycle without raw private payloads. Use for a compact local audit; use livingstack.trace_export when portable signed OTLP/JSON is required.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          }
        },
        "required": [
          "session_id"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.trace_export",
      "title": "Export Redacted OTLP JSON Traces",
      "description": "Verify one session ledger, return metadata-only OTLP/JSON, and sign the exact export with the installation's Ed25519 identity. The first call may create that local identity; raw context, goals, targets, summaries, and checkpoint state are excluded. Use livingstack.trace_report for an unsigned compact audit.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          }
        },
        "required": [
          "session_id"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.verify_release",
      "title": "Verify Release Bytes Against a Manifest",
      "description": "Read-only hashing of every file declared by a JSON release manifest under a host-configured allowed root. Use this for artifact-byte integrity, not action outcomes or deployment claims; out-of-root paths return UNRESOLVED.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "manifest_path": {
            "type": "string",
            "description": "Absolute path to a manifest inside LIVING_STACK_ALLOWED_ROOTS.",
            "minLength": 1,
            "maxLength": 4000
          }
        },
        "required": [
          "manifest_path"
        ]
      },
      "annotations": {
        "readOnlyHint": true,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false
      }
    },
    {
      "name": "livingstack.submit_adoption_receipt",
      "title": "Submit an Opt-In First-Run Receipt",
      "description": "Use this only after explicit user consent to transmit one minimal signed adoption milestone to the fixed Living Stack publisher endpoint. It sends version, milestone, coarse host, installation public-key hash, timestamp, and signature; it never sends workspace, task, personal, IP, user-agent, or arbitrary metadata fields.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "consent": {
            "type": "boolean",
            "description": "Must be exactly true after the user approves the disclosed fields."
          },
          "host": {
            "type": "string",
            "description": "Coarse MCP host category.",
            "enum": [
              "codex",
              "claude",
              "cursor",
              "vscode",
              "gemini",
              "cline",
              "other",
              "unknown"
            ],
            "default": "unknown"
          },
          "milestone": {
            "type": "string",
            "description": "Adoption milestone.",
            "enum": [
              "first_run",
              "first_session_closed",
              "release_verified"
            ],
            "default": "first_run"
          }
        },
        "required": [
          "consent"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": true
      }
    },
    {
      "name": "livingstack.session_close",
      "title": "Close a Runtime Session",
      "description": "Persist a terminal closed state and preserve the session's tamper-evident history; later mutation calls are rejected while reads and trace export remain available. Use after final outcomes are recorded, not as a substitute for a checkpoint.",
      "inputSchema": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "session_id": {
            "type": "string",
            "description": "Opaque Living Stack session identifier."
          },
          "reason": {
            "type": "string",
            "description": "Closure reason.",
            "minLength": 1,
            "maxLength": 500,
            "default": "completed"
          }
        },
        "required": [
          "session_id"
        ]
      },
      "annotations": {
        "readOnlyHint": false,
        "destructiveHint": false,
        "idempotentHint": false,
        "openWorldHint": false
      }
    }
  ],
  "calls": [
    {
      "tool": "livingstack.status",
      "note": "Capabilities and default policy.",
      "arguments": {},
      "is_error": false,
      "response": {
        "schema": "living-stack-status.v1",
        "product": "Living Stack MCP",
        "edition": "full-single-agent",
        "tool_count": 15,
        "version": "0.3.5-beta.1",
        "mode": "standalone-local",
        "capabilities": [
          "scoped-context",
          "budget-authorization",
          "tamper-evident-outcomes",
          "evidence-bound-claims",
          "durable-checkpoints",
          "trace-reports",
          "workspace-signed-trace-exports",
          "manifest-byte-verification",
          "explicit-consent-signed-adoption-receipts"
        ],
        "policy": {
          "allowed_risks": [
            "read",
            "local_write"
          ],
          "maximum_session_budget_usd": 100,
          "maximum_retention_hours": 720
        },
        "allowed_release_roots": 1,
        "entitlements": {
          "mode": "off",
          "tier": "community",
          "verified": false,
          "subject_bound": false,
          "features": [],
          "expires_at": null,
          "token_error": null
        },
        "boundaries": [
          "no arbitrary shell",
          "no unrestricted filesystem",
          "no arbitrary network action tools",
          "the only publisher network tool requires explicit consent and sends a fixed minimal signed adoption schema",
          "no personal Codex or Claude runtime dependency",
          "local host permissions remain authoritative",
          "workspace signatures prove origin from one local installation, not publisher identity"
        ]
      }
    },
    {
      "tool": "livingstack.session_start",
      "note": "Open a scoped session with a $2 ceiling.",
      "arguments": {
        "scope": "Fix the rounding bug in src/invoice.mjs and run its tests",
        "goal": "Invoice totals round to cents; npm test passes",
        "budget_limit_usd": 2,
        "retention_hours": 24
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "scope_sha256": "6999d98c92b5ed44cd762b7e83353aa3592df2d842cdf8376becaffcec63a180",
        "expires_at": "2026-10-30T01:55:02.146Z",
        "budget": {
          "limit_usd": 2,
          "reserved_usd": 0,
          "used_usd": 0
        },
        "receipt_sha256": "e507c0e5c1499c3ff52e1f27402640e725eac93e5856a6cecff23b98cc0d0d4c"
      }
    },
    {
      "tool": "livingstack.context_put",
      "note": "Store a fact with its source.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "text": "Customer report: invoice INV-2207 showed 10.005 instead of 10.01. Reproduced with node test/invoice.test.mjs.",
        "source": "support ticket 2207",
        "tags": [
          "bug",
          "rounding"
        ]
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "context_id": "ctx_d3760fa8-d73e-4c59-8054-aa95f5aa495f",
        "text_sha256": "85a8b7d65ad5a5ea254b489915b5f78cf8f9edc6ec7759c665f221f61996d740",
        "receipt_sha256": "360b956ab20a1e30ea9fa9a2a54f81fed640091a7f5ac33d21e798edb77333e9"
      }
    },
    {
      "tool": "livingstack.retrieve_context",
      "note": "Find it again by keyword.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "query": "rounding invoice",
        "limit": 5
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "query_sha256": "6f5d1977009a65714c1fa08c2830b0eeb4249cfcd1617fb054496b1617c4bc11",
        "results": [
          {
            "context_id": "ctx_d3760fa8-d73e-4c59-8054-aa95f5aa495f",
            "text": "Customer report: invoice INV-2207 showed 10.005 instead of 10.01. Reproduced with node test/invoice.test.mjs.",
            "source": "support ticket 2207",
            "tags": [
              "bug",
              "rounding"
            ],
            "score": 2,
            "recorded_at": "2026-10-29T01:55:02.153Z",
            "historical_until_reverified": true,
            "receipt_sha256": "360b956ab20a1e30ea9fa9a2a54f81fed640091a7f5ac33d21e798edb77333e9"
          }
        ],
        "ledger_head_sha256": "360b956ab20a1e30ea9fa9a2a54f81fed640091a7f5ac33d21e798edb77333e9"
      }
    },
    {
      "tool": "livingstack.authorize_action",
      "note": "Ask before the host runs the tests.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "action_id": "run-tests-1",
        "action_type": "process.exec",
        "risk": "local_write",
        "estimated_cost_usd": 0,
        "target": "npm test in repo invoice-service"
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "allowed": true,
        "authorization_id": "auth_c236824c-1f2b-4251-aab0-3d926378fcd1",
        "remaining_budget_usd": 2,
        "receipt_sha256": "9b25b584ab4a785926c48012af052fa937217f562829fea97ab1376568027fe1"
      }
    },
    {
      "tool": "livingstack.authorize_action",
      "note": "Refusal: the default policy denies external actions.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "action_id": "push-prod-1",
        "action_type": "deploy.publish",
        "risk": "external",
        "target": "production"
      },
      "is_error": false,
      "response": {
        "decision": "FAIL",
        "allowed": false,
        "reason": "risk_not_allowed:external",
        "receipt_sha256": "a73186d085467928aed7ed308b982d6fe5a252d4b58c66010e97454a76b32aec",
        "remaining_budget_usd": 2
      }
    },
    {
      "tool": "livingstack.authorize_action",
      "note": "Refusal: $5 does not fit the $2 ceiling.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "action_id": "big-spend-1",
        "action_type": "model.call",
        "risk": "read",
        "estimated_cost_usd": 5,
        "target": "summarize logs"
      },
      "is_error": false,
      "response": {
        "decision": "FAIL",
        "allowed": false,
        "reason": "budget_ceiling_exceeded",
        "receipt_sha256": "d2349f8662bb6d6d32ce42c8ed97bf30adba9e3ce83ef23506ce1c9f40f02d77",
        "remaining_budget_usd": 2
      }
    },
    {
      "tool": "livingstack.record_outcome",
      "note": "Record what the host observed, with typed evidence.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "authorization_id": "auth_c236824c-1f2b-4251-aab0-3d926378fcd1",
        "classification": "success",
        "actual_cost_usd": 0,
        "evidence": [
          {
            "type": "verification",
            "ref": "npm-test-exit-0-run-41"
          }
        ],
        "summary": "12 tests passed, 0 failed"
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "outcome_id": "out_103cef7d-486d-40e9-b214-8f97d290ecaf",
        "subject_sha256": "73e6a74cee4d986dd9f659dc2be5bd89e124491160a4666e1d9555819b7e53c3",
        "classification": "success",
        "evidence_count": 1,
        "budget": {
          "limit_usd": 2,
          "reserved_usd": 0,
          "used_usd": 0
        },
        "receipt_sha256": "b63fa1d0f283a35180713f6942ad57d8fb148f4d35f65e1bd07f9ff58f0381d1"
      }
    },
    {
      "tool": "livingstack.check_claim",
      "note": "A claim about the same target the outcome covers.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "claim_type": "completion",
        "claim_text": "The tests pass in invoice-service.",
        "subject": "npm test in repo invoice-service",
        "outcome_ids": [
          "out_103cef7d-486d-40e9-b214-8f97d290ecaf"
        ],
        "required_evidence_types": [
          "verification"
        ]
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "allowed": true,
        "reason": "claim_supported",
        "claim_sha256": "03e3221fb79d348187fa92a7943dd60d13832b1af8f497b1d1fabab2f0890e9d",
        "subject_sha256": "73e6a74cee4d986dd9f659dc2be5bd89e124491160a4666e1d9555819b7e53c3",
        "selected_outcome_ids": [
          "out_103cef7d-486d-40e9-b214-8f97d290ecaf"
        ],
        "accepted_outcome_ids": [
          "out_103cef7d-486d-40e9-b214-8f97d290ecaf"
        ],
        "rejected_outcomes": [],
        "binding_missing": [],
        "required": [
          "verification"
        ],
        "provided": [
          "verification"
        ],
        "missing": [],
        "evidence_receipts": [
          "b63fa1d0f283a35180713f6942ad57d8fb148f4d35f65e1bd07f9ff58f0381d1"
        ],
        "receipt_sha256": "e5ee06a0fc9e670d3b79dc6efec8c0ce65d39774637bc5b48d8bb7c05cc372a3"
      }
    },
    {
      "tool": "livingstack.check_claim",
      "note": "Refusal: the same outcome cannot support a claim about a different target.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "claim_type": "deployment",
        "claim_text": "The fix is deployed to production.",
        "subject": "production",
        "outcome_ids": [
          "out_103cef7d-486d-40e9-b214-8f97d290ecaf"
        ]
      },
      "is_error": false,
      "response": {
        "decision": "UNRESOLVED",
        "allowed": false,
        "reason": "selected_outcome_rejected",
        "claim_sha256": "97fcb2a35d293d679315e62fd0ab48a9a5514ee03c4a7f4833cf8c3fa15a6751",
        "subject_sha256": "ab8e18ef4ebebeddc0b3152ce9c9006e14fc05242e3fc9ce32246ea6a9543074",
        "selected_outcome_ids": [
          "out_103cef7d-486d-40e9-b214-8f97d290ecaf"
        ],
        "accepted_outcome_ids": [],
        "rejected_outcomes": [
          {
            "outcome_id": "out_103cef7d-486d-40e9-b214-8f97d290ecaf",
            "reason": "subject_mismatch"
          }
        ],
        "binding_missing": [],
        "required": [
          "deployment",
          "external_readback"
        ],
        "provided": [],
        "missing": [
          "deployment",
          "external_readback"
        ],
        "evidence_receipts": [],
        "receipt_sha256": "a32020c59a59409e8d0ae893f041a88d76fe659dde2a52757ae9858e6fac4505"
      }
    },
    {
      "tool": "livingstack.checkpoint_save",
      "note": "Save the exact next step before stopping.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "label": "after tests, before release notes",
        "state": {
          "next_step": "Write the CHANGELOG line for the rounding fix",
          "done": [
            "reproduced",
            "fixed",
            "tests pass"
          ],
          "open_files": [
            "src/invoice.mjs"
          ]
        }
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "checkpoint_id": "cp_0c43ad37-3928-49b2-b7d5-850f175c7483",
        "state_sha256": "6459e702010363d0bf4b678bce3fa9c917af2d69250e3fd14bad8992c19961c2",
        "expires_at": "2026-10-30T01:55:02.185Z",
        "receipt_sha256": "ce3acacb5a94322b4564ba0e466313d436a14981691a833c45d6620670fd6bf5"
      }
    },
    {
      "tool": "livingstack.checkpoint_load",
      "note": "Load it after a restart.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "checkpoint_id": "cp_0c43ad37-3928-49b2-b7d5-850f175c7483"
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "checkpoint_id": "cp_0c43ad37-3928-49b2-b7d5-850f175c7483",
        "read_only": false,
        "label": "after tests, before release notes",
        "state": {
          "next_step": "Write the CHANGELOG line for the rounding fix",
          "done": [
            "reproduced",
            "fixed",
            "tests pass"
          ],
          "open_files": [
            "src/invoice.mjs"
          ]
        },
        "state_sha256": "6459e702010363d0bf4b678bce3fa9c917af2d69250e3fd14bad8992c19961c2",
        "receipt_sha256": "adc1ec560b9030fc3babbecfaaf8ce667ba44de3fd99d7438a4f3e1fa2ce67c5"
      }
    },
    {
      "tool": "livingstack.checkpoint_save",
      "note": "A second checkpoint, which the next step edits on disk.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "label": "copy to tamper with",
        "state": {
          "next_step": "Write the CHANGELOG line for the rounding fix"
        }
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "checkpoint_id": "cp_30080d52-16ea-4bee-941c-fc692501f84f",
        "state_sha256": "21162ca24d0b9bb1a2d65781d00e72ae5ffbe82d008b524076584b7405fa0716",
        "expires_at": "2026-10-30T01:55:02.192Z",
        "receipt_sha256": "1dbdc6d5cd1972c8894bb015a8c99c68a6c62c90acedd2f709153dc1555e1b79"
      }
    },
    {
      "tool": "livingstack.checkpoint_load",
      "note": "Refusal: the saved next step was edited on disk after saving.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "checkpoint_id": "cp_30080d52-16ea-4bee-941c-fc692501f84f"
      },
      "is_error": false,
      "response": {
        "decision": "FAIL",
        "errors": [
          "state_hash_mismatch"
        ],
        "checkpoint_id": "cp_30080d52-16ea-4bee-941c-fc692501f84f"
      }
    },
    {
      "tool": "livingstack.session_status",
      "note": "Inspect the session.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f"
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "status": "active",
        "scope_sha256": "6999d98c92b5ed44cd762b7e83353aa3592df2d842cdf8376becaffcec63a180",
        "created_at": "2026-10-29T01:55:02.146Z",
        "expires_at": "2026-10-30T01:55:02.146Z",
        "budget": {
          "limit_usd": 2,
          "reserved_usd": 0,
          "used_usd": 0
        },
        "pending_authorizations": 0,
        "ledger": {
          "ok": true,
          "errors": [],
          "rows": 11,
          "head_sha256": "1dbdc6d5cd1972c8894bb015a8c99c68a6c62c90acedd2f709153dc1555e1b79"
        }
      }
    },
    {
      "tool": "livingstack.trace_report",
      "note": "Unsigned audit summary of the event chain.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f"
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "scope_sha256": "6999d98c92b5ed44cd762b7e83353aa3592df2d842cdf8376becaffcec63a180",
        "status": "active",
        "integrity": {
          "ok": true,
          "errors": [],
          "rows": 11,
          "head_sha256": "1dbdc6d5cd1972c8894bb015a8c99c68a6c62c90acedd2f709153dc1555e1b79"
        },
        "event_kinds": {
          "session_started": 1,
          "context_added": 1,
          "action_authorized": 1,
          "authorization_denied": "[REDACTED]",
          "outcome_recorded": 1,
          "claim_checked": 2,
          "checkpoint_saved": 2,
          "checkpoint_loaded": 1
        },
        "outcome_classifications": {
          "success": 1
        },
        "budget": {
          "limit_usd": 2,
          "reserved_usd": 0,
          "used_usd": 0
        },
        "created_at": "2026-10-29T01:55:02.146Z",
        "expires_at": "2026-10-30T01:55:02.146Z"
      }
    },
    {
      "tool": "livingstack.trace_export",
      "note": "Signed OTLP/JSON export (spans shortened below).",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f"
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "format": "otlp-json-traces.v1",
        "redaction": "metadata-only",
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "integrity": {
          "ok": true,
          "errors": [],
          "rows": 11,
          "head_sha256": "1dbdc6d5cd1972c8894bb015a8c99c68a6c62c90acedd2f709153dc1555e1b79"
        },
        "resourceSpans": [
          {
            "resource": {
              "attributes": [
                {
                  "key": "service.name",
                  "value": {
                    "stringValue": "living-stack-mcp"
                  }
                },
                {
                  "key": "service.version",
                  "value": {
                    "stringValue": "0.3.5-beta.1"
                  }
                },
                {
                  "key": "deployment.environment.name",
                  "value": {
                    "stringValue": "local"
                  }
                }
              ]
            },
            "scopeSpans": [
              {
                "scope": {
                  "name": "living-stack-mcp",
                  "version": "0.3.5-beta.1"
                },
                "spans": [
                  {
                    "traceId": "183e1dcf691246429655c51099fce869",
                    "spanId": "e507c0e5c1499c3f",
                    "name": "livingstack.session_started",
                    "kind": 1,
                    "startTimeUnixNano": "1793238902149000000",
                    "endTimeUnixNano": "1793238902149000000",
                    "attributes": [
                      {
                        "key": "livingstack.sequence",
                        "value": {
                          "intValue": "1"
                        }
                      },
                      {
                        "key": "livingstack.receipt.sha256",
                        "value": {
                          "stringValue": "e507c0e5c1499c3ff52e1f27402640e725eac93e5856a6cecff23b98cc0d0d4c"
                        }
                      },
                      {
                        "key": "livingstack.scope.sha256",
                        "value": {
                          "stringValue": "6999d98c92b5ed44cd762b7e83353aa3592df2d842cdf8376becaffcec63a180"
                        }
                      }
                    ],
                    "status": {
                      "code": 1
                    }
                  },
                  "… 10 more spans"
                ]
              }
            ]
          }
        ],
        "receipt_sha256": "adf191b1aa126f43c2e08030fec7eca73d192849c8e9194ab6b321616dcbe5aa",
        "signature": {
          "algorithm": "Ed25519",
          "key_id": "lswk_70bdba376895540a0fe4a1548985cc42",
          "origin_scope": "local-workspace-installation",
          "public_key_sha256": "70bdba376895540a0fe4a1548985cc426f258e16a122207a239309408bb84e67",
          "public_key_spki_base64": "MCowBQYDK2VwAyEA/nf1hXdJHBMdbAwf66imM9P4meQnJ9Nf0hKEpU/FV10=",
          "payload_sha256": "a6b3940669ebe2f5da01f2798a9931072bbe1602f5789a9b723b7194cb4802ae",
          "value_base64url": "NOJvPwHqgj4dxn2OkYKUTWlswRIhz_lq0Hoh1L3TdhJ14ix5kj66prZW9cJ8O4Erfr1RQxpbTKg7F_zbBSSbAg"
        }
      }
    },
    {
      "tool": "livingstack.verify_release",
      "note": "Hash every file a manifest lists.",
      "arguments": {
        "manifest_path": "<tmp>/release/manifest.json"
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "manifest_sha256": "75179d40221a60d7ca3c26bcfb4badf625518d65df2f594726edd47c18ecccb8",
        "scope": "",
        "files": [
          {
            "path": "app.txt",
            "status": "PASS",
            "expected_sha256": "d6a35d87c61d60ee0d564d684ac31384f5bcd843f77e3378be781fc0d03fd861",
            "actual_sha256": "d6a35d87c61d60ee0d564d684ac31384f5bcd843f77e3378be781fc0d03fd861"
          }
        ]
      }
    },
    {
      "tool": "livingstack.verify_release",
      "note": "Refusal: one byte changed after the manifest was written.",
      "arguments": {
        "manifest_path": "<tmp>/release/manifest.json"
      },
      "is_error": false,
      "response": {
        "decision": "FAIL",
        "manifest_sha256": "75179d40221a60d7ca3c26bcfb4badf625518d65df2f594726edd47c18ecccb8",
        "scope": "",
        "files": [
          {
            "path": "app.txt",
            "status": "FAIL",
            "expected_sha256": "d6a35d87c61d60ee0d564d684ac31384f5bcd843f77e3378be781fc0d03fd861",
            "actual_sha256": "5371ecb903282937059ab49e29789850aa3a629f2f259c16df5c6ef864a72728"
          }
        ]
      }
    },
    {
      "tool": "livingstack.verify_release",
      "note": "Refusal: manifest outside the allowed root.",
      "arguments": {
        "manifest_path": "<tmp>/elsewhere.json"
      },
      "is_error": false,
      "response": {
        "decision": "UNRESOLVED",
        "reason": "manifest_path_not_in_configured_allowed_root"
      }
    },
    {
      "tool": "livingstack.submit_adoption_receipt",
      "note": "Without consent nothing is sent. (We did not run the consent=true call.)",
      "arguments": {
        "consent": false
      },
      "is_error": false,
      "response": {
        "decision": "UNRESOLVED",
        "reason": "explicit_consent_required",
        "transmitted": false,
        "disclosure": "No receipt was sent. Set consent=true only after the user approves the listed fields."
      }
    },
    {
      "tool": "livingstack.session_close",
      "note": "Close the session.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "reason": "completed"
      },
      "is_error": false,
      "response": {
        "decision": "PASS",
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "status": "closed",
        "receipt_sha256": "683962857864f81b63f83083c5690aaf308368684c4855b4741d37ed7a46438c"
      }
    },
    {
      "tool": "livingstack.context_put",
      "note": "Refusal: a closed session takes no new writes.",
      "arguments": {
        "session_id": "ls_532095aa-0286-4c25-89de-97feb9a4873f",
        "text": "late note",
        "source": "agent"
      },
      "is_error": true,
      "response": {
        "decision": "FAIL",
        "reason": "invalid_or_rejected_request",
        "message": "session is closed"
      }
    }
  ]
}
