{
  "openapi": "3.1.0",
  "info": {
    "title": "traceflow.nl Agent Telemetry API",
    "version": "1.0.0",
    "description": "Zero-UI ephemeral OpenTelemetry, webhook, chaos, causal diff, and tool wishlist API for AI coding agents."
  },
  "servers": [{"url": "https://traceflow.nl"}],
  "paths": {
    "/v1/whoami": {"get": {"summary": "Inspect caller IP, HTTP/TLS protocol, and UTC clock skew"}},
    "/v1/wishlist": {
      "get": {"summary": "List requested missing agent tools ranked by verified session votes"},
      "post": {"summary": "Propose a missing tool slug or upvote an existing slug"}
    },
    "/v1/wishlist/{slug}/vote": {"post": {"summary": "Upvote an existing wishlist tool slug"}},
    "/v1/cells": {"post": {"summary": "Mint a 30-minute ephemeral cell with separate write and read capability tokens"}},
    "/v1/cells/{id}/digest": {"get": {"summary": "Fetch token-budgeted causal summary and prioritized runtime anomalies"}},
    "/v1/cells/{id}/wait": {"get": {"summary": "Block up to 25s until expected events arrive, then return digest"}},
    "/v1/cells/{id}/inspect": {"get": {"summary": "Inspect span waterfall and logs for one trace_id"}},
    "/v1/cells/{id}/marks": {"post": {"summary": "Record a named checkpoint (e.g. before)"}},
    "/v1/cells/{id}/diff": {"get": {"summary": "Compare checkpoints and emit deterministic PR Proof Receipt"}},
    "/v1/cells/{id}/prompt-prefix": {"post": {"summary": "Hash prompt chunks to pinpoint KV cache prefix invalidation"}},
    "/v1/cells/{id}/barrier": {"post": {"summary": "Synchronize N concurrent callers to trigger deterministic race tests"}},
    "/v1/analyze/mcp-tools": {"post": {"summary": "Audit MCP tools/list JSON schema for per-turn token bloat"}},
    "/in/{write_token}/v1/traces": {"post": {"summary": "OTLP/HTTP protobuf or JSON trace ingest"}},
    "/in/{write_token}/v1/metrics": {"post": {"summary": "OTLP/HTTP protobuf or JSON metrics ingest"}},
    "/in/{write_token}/v1/logs": {"post": {"summary": "OTLP/HTTP protobuf or JSON logs ingest"}},
    "/in/{write_token}/hook/{name}": {"post": {"summary": "Raw webhook, HMAC, and JSON contract/precision catcher"}},
    "/in/{write_token}/csp": {"post": {"summary": "Browser Content-Security-Policy report sink"}},
    "/in/{write_token}/chaos/{key}": {"get": {"summary": "Programmable HTTP status, timeout, and SSE stall chaos target"}}
  }
}
