{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "demo-support-ok-d7db2b",
    "generated_at": "2026-09-22T11:06:13.454Z",
    "event_count": 4,
    "algorithm": "sha256-chain",
    "content_digest": "67d23e14a9180895060ecbbf2fb2e630fa4b5e3bb9adac7ccdc35a1bc1c9d5b5",
    "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": "acc3ec77f38989568680340ec6011e5dc5a7bf8491ecfc64cfc84a716e3312bbf8845538e9f5f69c1fc95b0651f3efbe65389cedd98e0915d8a37d959570d900",
      "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-d7db2b",
    "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": 478,
    "started_at": "2026-09-13T21:10:11.276+00:00",
    "ended_at": "2026-09-13T21:10:12.776+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-d7db2b",
      "status": "running",
      "ts_end": "2026-09-13T21:10:12.776Z",
      "span_id": "r",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-13T21:10:11.276Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "6325c270df0cc7dc149b5a76e86d1127ae0ddd2625bfaff6c543c8453dcc0547"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 335,
        "total_tokens": 478,
        "output_tokens": 143
      },
      "run_id": "demo-support-ok-d7db2b",
      "ts_end": "2026-09-13T21:10:11.896Z",
      "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-13T21:10:11.306Z",
      "latency_ms": 590,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "5a89b79417006e3b18cdb37a9442f91d3428408580c726ec5323aa09a7fe768a"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "amount": 40,
        "customer_id": 5120
      },
      "output": {
        "refunded": true
      },
      "run_id": "demo-support-ok-d7db2b",
      "ts_end": "2026-09-13T21:10:12.176Z",
      "span_id": "t1",
      "ts_start": "2026-09-13T21:10:11.906Z",
      "tool_name": "issue_refund",
      "latency_ms": 270,
      "tool_call_id": "t1",
      "parent_span_id": "r",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "e9fc575ad4cf59e2ede3a41e216e4c9e4a2e7fd2f3e6c351c48917f539869415"
    },
    {
      "seq": 3,
      "name": "support-refund-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "amount": 40,
        "resolved": true
      },
      "run_id": "demo-support-ok-d7db2b",
      "status": "success",
      "ts_end": "2026-09-13T21:10:12.776Z",
      "span_id": "re",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-13T21:10:12.726Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "67d23e14a9180895060ecbbf2fb2e630fa4b5e3bb9adac7ccdc35a1bc1c9d5b5"
    }
  ]
}