{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "demo-contract-0584c5",
    "generated_at": "2026-09-22T11:05:48.620Z",
    "event_count": 4,
    "algorithm": "sha256-chain",
    "content_digest": "48f69420ba5f95af4b9b2e1115784928574a111449f24c430f929d009eac97b9",
    "replay": {
      "cassette_digest": "222458b966bd30cf90aa87d747886536b9b84917f4cabab55fbeea284c0ca997",
      "entry_count": 2,
      "algorithm": "oracle-chain/sha256",
      "note": "The run's oracle stream — every model response and tool output, hash-chained. Re-execute the agent against `events` with @runback/replay and the cassette digest must reproduce. This is proof the recording IS the deterministic input stream of the run — an audit you can re-run, not just read."
    },
    "signed": true,
    "signature": {
      "alg": "Ed25519",
      "value": "b5301a245ce7b8c09dcf8b3ac50c1776bb0e038c8a990a4153b260714a8d5c91968689eebf40f7a7615160fbac8fc0327b812d9555ad316ef0ec15d3bb48bb0f",
      "pubkey": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEArDPmR+Gvu1HawnSvM6xjZao7BVPPQ80Qq3sa1hAYvDU=\n-----END PUBLIC KEY-----\n"
    },
    "verify": "Recompute the event chain h_i = SHA-256(h_{i-1} + canonical(event_i)) over `events` → must equal content_digest. Recompute the oracle-stream digest from `events` → must equal replay.cassette_digest. The signature covers `${content_digest}:${cassette_digest}`. Ed25519: verify with the public key embedded in manifest.signature.pubkey (no server key needed — fully offline-verifiable). HMAC-SHA256 (legacy): requires AUDIT_SIGNING_KEY. POST this record to /api/audit/verify.",
    "spec_url": "https://runback.dev/spec",
    "verifier_url": "https://runback.dev/verify"
  },
  "run": {
    "run_id": "demo-contract-0584c5",
    "name": "contract-review-agent",
    "status": "success",
    "input": "Flag non-standard indemnity clauses in the Northwind MSA.",
    "output": {
      "flagged": 2,
      "escalated": true
    },
    "error": null,
    "metadata": {
      "demo": true
    },
    "step_count": 1,
    "total_tokens": 480,
    "started_at": "2026-09-22T01:36:02.326+00:00",
    "ended_at": "2026-09-22T01:36:03.826+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "contract-review-agent",
      "type": "run",
      "error": null,
      "input": "Flag non-standard indemnity clauses in the Northwind MSA.",
      "phase": "start",
      "output": null,
      "run_id": "demo-contract-0584c5",
      "status": "running",
      "ts_end": "2026-09-22T01:36:03.826Z",
      "span_id": "r",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-22T01:36:02.326Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "2815411ed966f904c259e7f54e9f59b5b89e86a19894a3e36b9ca8c3c8ec92b2"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "claude-sonnet-4-6",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 336,
        "total_tokens": 480,
        "output_tokens": 144
      },
      "run_id": "demo-contract-0584c5",
      "ts_end": "2026-09-22T01:36:02.946Z",
      "request": {
        "tools": [],
        "params": {
          "temperature": 0
        },
        "system": "You are a careful enterprise agent. Follow policy.",
        "messages": [
          {
            "role": "user",
            "content": "Two clauses depart from the template; both flagged for a human."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": "Two clauses depart from the template; both flagged for a human.",
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "doc": "northwind-msa-v3"
            },
            "tool_name": "diff_against_template",
            "tool_call_id": "t1"
          }
        ],
        "finish_reason": "tool-call"
      },
      "ts_start": "2026-09-22T01:36:02.356Z",
      "latency_ms": 590,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "371d901aa2041e59dcde65424ee981484bf7f9ccea0f494eb89818354006e07f"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "doc": "northwind-msa-v3"
      },
      "output": {
        "severity": "review",
        "deviations": 2
      },
      "run_id": "demo-contract-0584c5",
      "ts_end": "2026-09-22T01:36:03.226Z",
      "span_id": "t1",
      "ts_start": "2026-09-22T01:36:02.956Z",
      "tool_name": "diff_against_template",
      "latency_ms": 270,
      "tool_call_id": "t1",
      "parent_span_id": "r",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "18232da2b408541af3bd107b4cd4c215bd51c911885d892853b7ebbc45ae0467"
    },
    {
      "seq": 3,
      "name": "contract-review-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "flagged": 2,
        "escalated": true
      },
      "run_id": "demo-contract-0584c5",
      "status": "success",
      "ts_end": "2026-09-22T01:36:03.826Z",
      "span_id": "re",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-22T01:36:03.776Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "48f69420ba5f95af4b9b2e1115784928574a111449f24c430f929d009eac97b9"
    }
  ]
}