{
  "$schema": "runback.audit/v2",
  "manifest": {
    "run_id": "demo-support-ok-7de8b1",
    "generated_at": "2026-09-22T11:06:34.155Z",
    "event_count": 4,
    "algorithm": "sha256-chain",
    "content_digest": "55d6adc4c07fbe51d3c38ba309dcbb326fd01254c2a9992b1cd5a6df8985176d",
    "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": "eae07c3c4df7799fae461b01db86ec526237d1c30313fae46136002a4ad127a198ff13e35ac55a6c3a69fe6ded47bfd29973e23e5a61297bebe35672aa78100d",
      "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-7de8b1",
    "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": 571,
    "started_at": "2026-09-14T04:12:54.133+00:00",
    "ended_at": "2026-09-14T04:12:55.633+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-7de8b1",
      "status": "running",
      "ts_end": "2026-09-14T04:12:55.633Z",
      "span_id": "r",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-14T04:12:54.133Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "595cf5234cb44248315426a41b6c1ba3bc6495e3df96751b9efca4ad407a9757"
    },
    {
      "seq": 1,
      "type": "llm",
      "error": null,
      "model": {
        "model_id": "gpt-4o",
        "provider": "openai"
      },
      "usage": {
        "input_tokens": 400,
        "total_tokens": 571,
        "output_tokens": 171
      },
      "run_id": "demo-support-ok-7de8b1",
      "ts_end": "2026-09-14T04:12:54.753Z",
      "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-14T04:12:54.163Z",
      "latency_ms": 590,
      "parent_span_id": "r",
      "schema_version": 1,
      "_hash": "c77180a49c2753988f58131b2756cc02bfe5bf4129ef6dd90844cf79a5ecb4a5"
    },
    {
      "seq": 2,
      "type": "tool",
      "error": null,
      "input": {
        "amount": 40,
        "customer_id": 5120
      },
      "output": {
        "refunded": true
      },
      "run_id": "demo-support-ok-7de8b1",
      "ts_end": "2026-09-14T04:12:55.033Z",
      "span_id": "t1",
      "ts_start": "2026-09-14T04:12:54.763Z",
      "tool_name": "issue_refund",
      "latency_ms": 270,
      "tool_call_id": "t1",
      "parent_span_id": "r",
      "schema_version": 1,
      "policy_evaluated": {
        "passed": true
      },
      "_hash": "ebe2c4d5c03b6c3073571e136f03661d57b33d08daa22ca88cad1d2cb46b0c08"
    },
    {
      "seq": 3,
      "name": "support-refund-agent",
      "type": "run",
      "error": null,
      "input": null,
      "phase": "end",
      "output": {
        "amount": 40,
        "resolved": true
      },
      "run_id": "demo-support-ok-7de8b1",
      "status": "success",
      "ts_end": "2026-09-14T04:12:55.633Z",
      "span_id": "re",
      "metadata": {
        "demo": true
      },
      "ts_start": "2026-09-14T04:12:55.583Z",
      "parent_span_id": null,
      "schema_version": 1,
      "_hash": "55d6adc4c07fbe51d3c38ba309dcbb326fd01254c2a9992b1cd5a6df8985176d"
    }
  ]
}