{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "demo-support-5c7e02",
    "generated_at": "2026-09-22T11:05:05.769Z",
    "event_count": 4,
    "algorithm": "sha256-chain",
    "content_digest": "4a9dc7a9af258280fa684b9fef3dd4ef35a197f063d3db35228607f97913edfe",
    "replay": {
      "cassette_digest": "b0299cd88129220656948aa5a7dd23a88141ea5454cb0090c25e5cdfe724c4d5",
      "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": "5826390f8fd63243c5a686e93702dbe0c6ffa4f502ba2b185123c16ff404be963a4940663fc69146e9a5cd9e47d3860619adaffbe158c3c2d010120cde02a306",
      "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-5c7e02",
    "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": 480,
    "started_at": "2026-09-21T23:10:21.169+00:00",
    "ended_at": "2026-09-21T23:10:22.669+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-5c7e02",
      "status": "running",
      "ts_end": "2026-09-21T23:10:22.669Z",
      "span_id": "r",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-21T23:10:21.169Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "dffbd4f0baecaa660ae93e45a380ca811cbfa1e83d6900b01d595b12d4aa9389"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 336,
        "total_tokens": 480,
        "output_tokens": 144
      },
      "run_id": "demo-support-5c7e02",
      "ts_end": "2026-09-21T23:10:21.789Z",
      "request": {
        "tools": [],
        "params": {
          "temperature": 0
        },
        "system": "You are a careful enterprise agent. Follow policy.",
        "messages": [
          {
            "role": "user",
            "content": "Under the threshold and not disputed — refund is within policy."
          }
        ]
      },
      "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-21T23:10:21.199Z",
      "latency_ms": 590,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "4cbe19dea7bcacaf65d3d5fa52acab39a15339ee1854d6f99c42a4ad7290889e"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "amount": 40,
        "customer_id": 5120
      },
      "output": {
        "refunded": true
      },
      "run_id": "demo-support-5c7e02",
      "ts_end": "2026-09-21T23:10:22.069Z",
      "span_id": "t1",
      "ts_start": "2026-09-21T23:10:21.799Z",
      "tool_name": "issue_refund",
      "latency_ms": 270,
      "tool_call_id": "t1",
      "parent_span_id": "r",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "fe6e5e5a15db67f785af94b49a45dd7afbb0a13683ea36860aa1d8f7e225cfb6"
    },
    {
      "seq": 3,
      "name": "support-refund-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "amount": 40,
        "resolved": true
      },
      "run_id": "demo-support-5c7e02",
      "status": "success",
      "ts_end": "2026-09-21T23:10:22.669Z",
      "span_id": "re",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-21T23:10:22.619Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "4a9dc7a9af258280fa684b9fef3dd4ef35a197f063d3db35228607f97913edfe"
    }
  ]
}