openapi: 3.2.0 info: title: DELTA Witness — Trust Layer for Autonomous Actions… version: 0.7.0 description: Browser verification and page-state proof for public sources, plus deterministic preflight checks before an autonomous action. DELTA proves observation and change, not truth. contact: name: DELTA Witness email: ruphussten@163.com url: https://delta-witness-api.ruphussten.workers.dev/docs x-guidance: Call GET /v1/quote before budgeting. Capture preserves a public observation; Guard compares one with deterministic expectations; Guarded-Action Pilot bundles 1-3 public URL proofs for exactly $10. Runtime HTTP 402 payment requirements are authoritative. servers: - url: https://delta-witness-api.ruphussten.workers.dev tags: - name: preflight autonomous action paths: /v1/preflight: post: operationId: preflightAutonomousAction summary: Preflight a public source before an autonomous action description: 'Verify page state before an agent executes a consequential autonomous action. Returns safe/changed/reason/diff plus a proof reference. Current calculated price: $5.' tags: - preflight autonomous action security: [] x-payment-info: price: mode: fixed currency: USD amount: '5' protocols: - x402: {} network: eip155:8453 requestBody: required: true content: application/json: schema: type: object additionalProperties: false properties: url: type: string pattern: ^https?:// description: Public HTTP(S) source to observe before an action. prior_proof_id: type: string pattern: ^[0-9a-fA-F-]{36}$ description: Optional DELTA proof to use as the hash baseline. expected: type: object additionalProperties: false properties: html_sha256: type: string pattern: ^sha256:[0-9a-f]{64}$ markdown_sha256: type: string pattern: ^sha256:[0-9a-f]{64}$ contains: type: array maxItems: 10 items: type: string maxLength: 200 excludes: type: array maxItems: 10 items: type: string maxLength: 200 freshness_seconds: type: integer minimum: 0 maximum: 2592000 required: - url responses: '200': description: Paid observation delivered content: application/json: schema: type: object required: - ok - product - proof_id - manifest_url - public_proof_url - bundle_root - observed_at properties: ok: const: true product: enum: - capture - preflight proof_id: type: string pattern: ^[0-9a-fA-F-]{36}$ manifest_url: type: string pattern: ^https?:// public_proof_url: type: string pattern: ^https?:// bundle_root: type: string observed_at: type: string safe: type: - boolean - 'null' changed: type: - boolean - 'null' reason: type: string diff: type: object idempotent_replay: type: boolean '202': description: An identical settled fulfillment is already in progress '400': description: Request rejected content: application/json: schema: type: object properties: error: type: string '402': description: x402 v2 payment required or settlement failed '409': description: Payment replay attempted with a different request '413': description: Request rejected content: application/json: schema: type: object properties: error: type: string '502': description: Settled observation failed; identical retry remains idempotent