{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "demo-support-8fd895",
    "generated_at": "2026-09-22T11:05:02.305Z",
    "event_count": 4,
    "algorithm": "sha256-chain",
    "content_digest": "de7917a861dd3985ac6b9f0a585a26bf390b5a2954832ae88c45180628f610b6",
    "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": "39c0258596c91841aca16cc6fcd12ec0ad44c013d2ea409090a1a7972637e934fbc1e73828e0f5776d80773f671acd5b4281af0fe1edd2a6b24c2e8765b89209",
      "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-8fd895",
    "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-21T21:47:47.408+00:00",
    "ended_at": "2026-09-21T21:47:48.908+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-8fd895",
      "status": "running",
      "ts_end": "2026-09-21T21:47:48.908Z",
      "span_id": "r",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-21T21:47:47.408Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "a5eea0faf5ddfd28b02f109644e0a32b57bb71d6c83210bc46e8641c7d518a8e"
    },
    {
      "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-8fd895",
      "ts_end": "2026-09-21T21:47:48.028Z",
      "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-21T21:47:47.438Z",
      "latency_ms": 590,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "4e65de10e642c49a5183a140089262e59160dee5aabd3e2fe27f8b8a2faf079d"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "amount": 40,
        "customer_id": 5120
      },
      "output": {
        "refunded": true
      },
      "run_id": "demo-support-8fd895",
      "ts_end": "2026-09-21T21:47:48.308Z",
      "span_id": "t1",
      "ts_start": "2026-09-21T21:47:48.038Z",
      "tool_name": "issue_refund",
      "latency_ms": 270,
      "tool_call_id": "t1",
      "parent_span_id": "r",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "b18fa00d53b047cce65ca823ecb38c416503da08c014e3343b79d4d823d25f7a"
    },
    {
      "seq": 3,
      "name": "support-refund-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "amount": 40,
        "resolved": true
      },
      "run_id": "demo-support-8fd895",
      "status": "success",
      "ts_end": "2026-09-21T21:47:48.908Z",
      "span_id": "re",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-21T21:47:48.858Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "de7917a861dd3985ac6b9f0a585a26bf390b5a2954832ae88c45180628f610b6"
    }
  ]
}