{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "demo-support-ok-ebe511",
    "generated_at": "2026-09-22T11:04:34.967Z",
    "event_count": 4,
    "algorithm": "sha256-chain",
    "content_digest": "bc8056e6e7e78ab9aff5a024e9591eaa7e5125fd9040cfb6e24a3d8d09927a37",
    "replay": {
      "cassette_digest": "5ab04f2ed98649607716d6532d8ac351601882271b48a2c7754ea488de459810",
      "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": "491d1ad8d58274016540b3692e901c22110ac5e233a986e7d6e487d3534b21fdfad9870561dbb228471b74e94579468f2d0514b49e4706a4fd8a843963a01e0f",
      "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-support-ok-ebe511",
    "name": "support-refund-agent",
    "status": "success",
    "input": "Customer #5120 wants a $40 refund on an undisputed charge.",
    "output": {
      "amount": 40,
      "resolved": true
    },
    "error": null,
    "metadata": {
      "demo": true
    },
    "step_count": 1,
    "total_tokens": 680,
    "started_at": "2026-09-13T16:40:45.562+00:00",
    "ended_at": "2026-09-13T16:40:47.062+00:00",
    "actor_type": null,
    "actor_id": null
  },
  "events": [
    {
      "seq": 0,
      "name": "support-refund-agent",
      "type": "run",
      "error": null,
      "input": "Customer #5120 wants a $40 refund on an undisputed charge.",
      "phase": "start",
      "output": null,
      "run_id": "demo-support-ok-ebe511",
      "status": "running",
      "ts_end": "2026-09-13T16:40:47.062Z",
      "span_id": "r",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-13T16:40:45.562Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "b1ebcf9c1f98c99ad8b2a300e230e5540252518e70507004398ad8f2f29a77a9"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 476,
        "total_tokens": 680,
        "output_tokens": 204
      },
      "run_id": "demo-support-ok-ebe511",
      "ts_end": "2026-09-13T16:40:46.182Z",
      "request": {
        "tools": [],
        "params": {
          "temperature": 0
        },
        "system": "You are a careful enterprise agent. Follow policy.",
        "messages": [
          {
            "role": "user",
            "content": "Customer #5120 wants a $40 refund on an undisputed charge."
          }
        ]
      },
      "span_id": "l1",
      "response": {
        "text": "Under the threshold and not disputed — refund is within policy.",
        "reasoning": null,
        "tool_calls": [
          {
            "input": {
              "amount": 40,
              "customer_id": 5120
            },
            "tool_name": "issue_refund",
            "tool_call_id": "t1"
          }
        ],
        "finish_reason": "tool-call"
      },
      "ts_start": "2026-09-13T16:40:45.592Z",
      "latency_ms": 590,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "647c31160006d1438225badbac024d4c64ed4301fb389b24848743de6b6a376f"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "amount": 40,
        "customer_id": 5120
      },
      "output": {
        "refunded": true
      },
      "run_id": "demo-support-ok-ebe511",
      "ts_end": "2026-09-13T16:40:46.462Z",
      "span_id": "t1",
      "ts_start": "2026-09-13T16:40:46.192Z",
      "tool_name": "issue_refund",
      "latency_ms": 270,
      "tool_call_id": "t1",
      "parent_span_id": "r",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "24984e8bf221edb79df0724e56b1875bb2e3f2dd6508433a219ed98a45fcd0a4"
    },
    {
      "seq": 3,
      "name": "support-refund-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "amount": 40,
        "resolved": true
      },
      "run_id": "demo-support-ok-ebe511",
      "status": "success",
      "ts_end": "2026-09-13T16:40:47.062Z",
      "span_id": "re",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-13T16:40:47.012Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "bc8056e6e7e78ab9aff5a024e9591eaa7e5125fd9040cfb6e24a3d8d09927a37"
    }
  ]
}