{
  "openapi": "3.1.0",
  "info": {
    "title": "Trust402",
    "version": "0.1.0",
    "description": "Buyer-side trust and procurement agent for x402 resources.",
    "guidance": "Trust402 is a dry-run-first trust router for x402 resources. Use it to check endpoints, score resources, compare candidates, plan spend, and produce diligence reports before any live procurement."
  },
  "servers": [
    {
      "url": "https://trust402.aztecbeacon.uk"
    }
  ],
  "tags": [
    {
      "name": "Trust402"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Runtime status and spend mode",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "OpenAPI contract",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/x402": {
      "get": {
        "summary": "x402 discovery document",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/x402.json": {
      "get": {
        "summary": "x402 discovery document JSON alias",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/agent.json": {
      "get": {
        "summary": "Agent manifest for directories and autonomous buyers",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/agent-services.json": {
      "get": {
        "summary": "Agent services manifest for crawler ingestion",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/ai-plugin.json": {
      "get": {
        "summary": "OpenAPI plugin-style discovery manifest",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp.json": {
      "get": {
        "summary": "MCP discovery placeholder and OpenAPI/x402 pointers",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/directory": {
      "get": {
        "summary": "Crawler-friendly public directory profile",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "Text response",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/directory.json": {
      "get": {
        "summary": "Public-safe directory profile JSON",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "summary": "LLM-readable Trust402 discovery and safety summary",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "Text response",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/robots.txt": {
      "get": {
        "summary": "Crawler policy and sitemap pointer",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "Text response",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "summary": "Sitemap for public discovery surfaces",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "Text response",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/capabilities": {
      "get": {
        "summary": "Machine-readable capability summary",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "summary": "Launch readiness, safety, and backlog status",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/launch/checklist": {
      "get": {
        "summary": "Dry-run launch and public marketplace readiness checklist",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/marketplace/bundle": {
      "get": {
        "summary": "Marketplace submission metadata and Bazaar extension drafts",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/settlement/status": {
      "get": {
        "summary": "Real x402 settlement readiness and unpaid challenge status",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/settlement/preflight": {
      "get": {
        "summary": "Operator preflight for one paid settlement smoke",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/policies/spend": {
      "get": {
        "summary": "Spend policy gates for live procurement, Proof402 delegation, and AgentCash auto-refill",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/payments/buyer-preflight": {
      "post": {
        "operationId": "payments_buyer_preflight",
        "summary": "Read-only CDP x402 buyer account readiness and optional operator-gated account probe",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "cdp-x402"
                    ],
                    "default": "cdp-x402"
                  },
                  "probeCdp": {
                    "type": "boolean",
                    "default": false
                  },
                  "cdpEvmAccountAddress": {
                    "type": "string",
                    "pattern": "^0x[a-fA-F0-9]{40}$"
                  },
                  "cdpEvmAccountName": {
                    "type": "string"
                  }
                }
              },
              "example": {
                "provider": "cdp-x402",
                "probeCdp": false,
                "cdpEvmAccountName": "trust402-buyer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/payments/bridge-check": {
      "post": {
        "operationId": "payments_bridge_check",
        "summary": "Operator-gated dry-run check for the configured live payment bridge",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "provider": {
                    "type": "string",
                    "enum": [
                      "agentcash-mcp",
                      "external-adapter"
                    ],
                    "default": "agentcash-mcp"
                  },
                  "candidateEndpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST",
                      "PUT",
                      "PATCH",
                      "DELETE",
                      "HEAD"
                    ],
                    "default": "POST"
                  },
                  "maxAmountUsd": {
                    "type": "number",
                    "default": 0.01
                  },
                  "body": {}
                }
              },
              "example": {
                "provider": "agentcash-mcp",
                "candidateEndpoint": "https://proof402.vercel.app/api/proof/notarize",
                "method": "POST",
                "maxAmountUsd": 0.01
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/proof402/preflight": {
      "post": {
        "operationId": "proof402_preflight",
        "summary": "Read-only paid Proof402 delegation preflight for approved hashes, quote caps, and live policy",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "payload": {},
                  "result": {},
                  "resultHash": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  },
                  "approvedHash": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  },
                  "approvedHashes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^sha256:[a-f0-9]{64}$"
                    }
                  },
                  "quotedPriceUsd": {
                    "type": "number"
                  },
                  "paymentQuote": {
                    "type": "object",
                    "properties": {
                      "amount": {
                        "type": "string"
                      },
                      "maxAmountRequired": {
                        "type": "string"
                      },
                      "assetDecimals": {
                        "type": "integer",
                        "default": 6
                      },
                      "network": {
                        "type": "string",
                        "default": "eip155:8453"
                      },
                      "asset": {
                        "type": "string"
                      },
                      "payTo": {
                        "type": "string",
                        "pattern": "^0x[a-fA-F0-9]{40}$"
                      }
                    }
                  },
                  "metadata": {
                    "type": "object"
                  },
                  "idempotencyKey": {
                    "type": "string"
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "payload"
                    ]
                  },
                  {
                    "required": [
                      "result"
                    ]
                  },
                  {
                    "required": [
                      "resultHash"
                    ]
                  }
                ]
              },
              "example": {
                "subject": "example diligence result",
                "resultHash": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "approvedHash": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "paymentQuote": {
                  "amount": "5000",
                  "assetDecimals": 6,
                  "network": "eip155:8453",
                  "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                  "payTo": "0x0E525428d66C111672cE58B1bf649A6d167f36b1"
                },
                "metadata": {
                  "agent": "trust402",
                  "taskId": "task_123"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/completion/plan": {
      "get": {
        "summary": "Pinned autonomous buyer-agent completion plan and success criteria",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/completion/audit": {
      "get": {
        "summary": "Requirement-by-requirement audit of Trust402 autonomous buyer-agent completion",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/deployments/preflight": {
      "get": {
        "operationId": "deployments_preflight_get",
        "summary": "Read Git/Vercel/custom-domain deployment blocker profile",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "deployments_preflight",
        "summary": "Generate a public-safe deployment preflight profile from supplied evidence",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "customDomain": {
                    "type": "string"
                  },
                  "gitRemote": {
                    "type": "string"
                  },
                  "gitHead": {
                    "type": "string"
                  },
                  "vercelProject": {
                    "type": "object"
                  },
                  "productionDeployWorkflowText": {
                    "type": "string"
                  },
                  "launchMonitorWorkflowText": {
                    "type": "string"
                  },
                  "vercelGitConnected": {
                    "type": "boolean"
                  },
                  "githubActionsSecretsConfigured": {
                    "type": "boolean"
                  },
                  "gitAutoDeployVerified": {
                    "type": "boolean"
                  },
                  "gitAutoDeployEvidenceUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "gitAutoDeployCommitSha": {
                    "type": "string"
                  },
                  "githubCli": {
                    "type": "object"
                  },
                  "vercelDeployment": {
                    "type": "object"
                  }
                }
              },
              "example": {
                "baseUrl": "https://trust402.vercel.app",
                "customDomain": "trust402.dev",
                "gitRemote": "https://github.com/kfubtik/trust402.git",
                "gitHead": "43b96cf",
                "vercelProject": {
                  "projectName": "trust402",
                  "projectId": "prj_...",
                  "orgId": "team_..."
                },
                "gitAutoDeployVerified": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/deployments/github-actions-setup": {
      "get": {
        "operationId": "deployments_github_actions_setup_get",
        "summary": "Read public-safe GitHub Actions setup commands for Vercel production deploy",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "deployments_github_actions_setup",
        "summary": "Generate public-safe GitHub Actions setup commands from supplied project evidence",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "repo": {
                    "type": "string",
                    "default": "kfubtik/trust402"
                  },
                  "workflowPath": {
                    "type": "string",
                    "default": ".github/workflows/vercel-production-deploy.yml"
                  },
                  "workflowPresent": {
                    "type": "boolean",
                    "default": true
                  },
                  "gitHead": {
                    "type": "string"
                  },
                  "vercelProject": {
                    "type": "object",
                    "properties": {
                      "projectName": {
                        "type": "string",
                        "default": "trust402"
                      },
                      "projectId": {
                        "type": "string"
                      },
                      "orgId": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "example": {
                "baseUrl": "https://trust402.vercel.app",
                "repo": "kfubtik/trust402",
                "workflowPath": ".github/workflows/vercel-production-deploy.yml",
                "workflowPresent": true,
                "gitHead": "43b96cf",
                "vercelProject": {
                  "projectName": "trust402",
                  "projectId": "prj_...",
                  "orgId": "team_..."
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/domains/activation-pack": {
      "get": {
        "operationId": "domains_activation_pack_get",
        "summary": "Read custom-domain activation plan for external directory readiness",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "domains_activation_pack",
        "summary": "Generate a custom-domain activation plan for a selected Trust402 domain",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "selectedDomain": {
                    "type": "string"
                  },
                  "candidateDomains": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "selectedDomainAvailable": {
                    "type": "boolean"
                  },
                  "selectedDomainPriceUsd": {
                    "type": "number"
                  },
                  "selectedDomainPeriodYears": {
                    "type": "number"
                  },
                  "selectedDomainPurchaseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "selectedDomainAvailabilityMessage": {
                    "type": "string"
                  },
                  "availabilityCheckedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "availabilitySource": {
                    "type": "string"
                  },
                  "domainAvailability": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "available": {
                          "type": "boolean"
                        },
                        "price": {
                          "type": "number"
                        },
                        "period": {
                          "type": "number"
                        },
                        "purchaseUrl": {
                          "type": "string",
                          "format": "uri"
                        }
                      }
                    }
                  },
                  "vercelProjectName": {
                    "type": "string",
                    "default": "trust402"
                  }
                }
              },
              "example": {
                "baseUrl": "https://trust402.vercel.app",
                "selectedDomain": "trust402.org",
                "candidateDomains": [
                  "trust402.org",
                  "trust402.dev",
                  "trust402.xyz"
                ],
                "selectedDomainAvailable": true,
                "selectedDomainPriceUsd": 8.99,
                "selectedDomainPeriodYears": 1,
                "selectedDomainPurchaseUrl": "https://vercel.com/domains/search?q=trust402.org",
                "availabilitySource": "vercel-domain-check"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/domains/readiness-check": {
      "get": {
        "operationId": "domains_readiness_check_get",
        "summary": "Read custom-domain readiness check for the configured public base URL",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "domains_readiness_check",
        "summary": "Verify a custom domain through DNS, HTTPS health, x402 discovery, and unpaid x402 challenge checks",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "domain": {
                    "type": "string"
                  },
                  "customDomain": {
                    "type": "string"
                  },
                  "selectedDomain": {
                    "type": "string"
                  },
                  "baseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "expectedBaseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "timeoutMs": {
                    "type": "integer",
                    "default": 6000
                  },
                  "skipDns": {
                    "type": "boolean",
                    "default": false
                  }
                }
              },
              "example": {
                "domain": "trust402.dev",
                "expectedBaseUrl": "https://trust402.dev",
                "timeoutMs": 6000
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/directories/profile": {
      "get": {
        "summary": "Public-safe directory profile JSON for crawlers and external listings",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/directories/submission-pack": {
      "get": {
        "operationId": "directories_submission_pack_get",
        "summary": "Read public-safe external directory submission payload and blockers",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "directories_submission_pack",
        "summary": "Generate a public-safe external directory submission pack for a proposed base URL",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "userApprovedOutreach": {
                    "type": "boolean",
                    "default": false
                  }
                }
              },
              "example": {
                "baseUrl": "https://trust402.vercel.app",
                "userApprovedOutreach": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/operator/unblock-report": {
      "get": {
        "operationId": "operator_unblock_report_get",
        "summary": "Read current public-safe operator blockers for final Trust402 completion",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "operator_unblock_report",
        "summary": "Generate a public-safe operator unblock report for a proposed live evidence window",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "candidateEndpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "candidatePriceUsd": {
                    "type": "number"
                  },
                  "proofReserveUsd": {
                    "type": "number"
                  },
                  "maxTotalUsd": {
                    "type": "number"
                  },
                  "paymentProvider": {
                    "type": "string",
                    "enum": [
                      "agentcash-mcp",
                      "cdp-x402",
                      "x402-fetch",
                      "external-adapter"
                    ]
                  },
                  "includeProof": {
                    "type": "boolean",
                    "default": true
                  },
                  "includeAutonomous": {
                    "type": "boolean",
                    "default": false
                  },
                  "includeAutoRefill": {
                    "type": "boolean",
                    "default": false
                  },
                  "includeRefillLive": {
                    "type": "boolean",
                    "default": false
                  },
                  "liveSpentTodayUsd": {
                    "type": "number",
                    "default": 0
                  },
                  "selectedDomain": {
                    "type": "string"
                  },
                  "candidateDomains": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "selectedDomainAvailable": {
                    "type": "boolean"
                  },
                  "selectedDomainPriceUsd": {
                    "type": "number"
                  },
                  "selectedDomainPeriodYears": {
                    "type": "number"
                  },
                  "selectedDomainPurchaseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "availabilityCheckedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "availabilitySource": {
                    "type": "string"
                  },
                  "domainAvailability": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              },
              "example": {
                "baseUrl": "https://trust402.vercel.app",
                "candidatePriceUsd": 0.01,
                "proofReserveUsd": 0.01,
                "includeProof": true,
                "includeAutonomous": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/operator/readiness": {
      "get": {
        "operationId": "operator_readiness_get",
        "summary": "Read a public-safe production readiness profile for live evidence blockers",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "operator_readiness",
        "summary": "Generate a public-safe operator readiness profile for a proposed live evidence window",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "candidateEndpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "candidatePriceUsd": {
                    "type": "number"
                  },
                  "proofReserveUsd": {
                    "type": "number"
                  },
                  "maxTotalUsd": {
                    "type": "number"
                  },
                  "paymentProvider": {
                    "type": "string",
                    "enum": [
                      "agentcash-mcp",
                      "cdp-x402",
                      "x402-fetch",
                      "external-adapter"
                    ]
                  },
                  "includeProof": {
                    "type": "boolean",
                    "default": true
                  },
                  "includeAutonomous": {
                    "type": "boolean",
                    "default": false
                  },
                  "includeAutoRefill": {
                    "type": "boolean",
                    "default": false
                  },
                  "includeRefillLive": {
                    "type": "boolean",
                    "default": false
                  },
                  "liveSpentTodayUsd": {
                    "type": "number",
                    "default": 0
                  },
                  "selectedDomain": {
                    "type": "string"
                  },
                  "candidateDomains": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "selectedDomainAvailable": {
                    "type": "boolean"
                  },
                  "selectedDomainPriceUsd": {
                    "type": "number"
                  },
                  "selectedDomainPeriodYears": {
                    "type": "number"
                  },
                  "selectedDomainPurchaseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "availabilityCheckedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "availabilitySource": {
                    "type": "string"
                  },
                  "domainAvailability": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              },
              "example": {
                "baseUrl": "https://trust402.vercel.app",
                "candidateEndpoint": "https://proof402.vercel.app/api/proof/notarize",
                "candidatePriceUsd": 0.005,
                "proofReserveUsd": 0.005,
                "includeProof": true,
                "paymentProvider": "cdp-x402"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/resources": {
      "get": {
        "summary": "Public Trust402 resource catalog",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/live/window-plan": {
      "post": {
        "operationId": "live_window_plan",
        "summary": "Generate a read-only live evidence window plan without spending or mutating policy",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "candidateEndpoint",
                  "candidatePriceUsd",
                  "maxTotalUsd"
                ],
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "candidateEndpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "candidatePriceUsd": {
                    "type": "number"
                  },
                  "maxTotalUsd": {
                    "type": "number"
                  },
                  "manualSmokeBudgetUsd": {
                    "type": "number"
                  },
                  "paymentProvider": {
                    "type": "string",
                    "enum": [
                      "agentcash-mcp",
                      "cdp-x402",
                      "x402-fetch",
                      "external-adapter"
                    ]
                  },
                  "allowedRegistries": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "proofReserveUsd": {
                    "type": "number"
                  },
                  "includeProof": {
                    "type": "boolean",
                    "default": true
                  },
                  "includeAutonomous": {
                    "type": "boolean",
                    "default": false
                  },
                  "includeAutoRefill": {
                    "type": "boolean",
                    "default": false
                  },
                  "liveMaxPerCallUsd": {
                    "type": "number"
                  },
                  "liveMaxPerJobUsd": {
                    "type": "number"
                  },
                  "liveDailyLimitUsd": {
                    "type": "number"
                  },
                  "liveSpentTodayUsd": {
                    "type": "number",
                    "default": 0
                  },
                  "lastVerifiedBalanceUsd": {
                    "type": "number"
                  },
                  "minimumReserveUsd": {
                    "type": "number"
                  }
                }
              },
              "example": {
                "baseUrl": "https://trust402.vercel.app",
                "candidateEndpoint": "https://approved.example/paid",
                "candidatePriceUsd": 0.01,
                "maxTotalUsd": 0.03,
                "paymentProvider": "agentcash-mcp",
                "includeProof": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/operator/action-pack": {
      "post": {
        "operationId": "operator_action_pack",
        "summary": "Generate a public-safe action pack for closing remaining operator blockers",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "baseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "candidateEndpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "candidatePriceUsd": {
                    "type": "number"
                  },
                  "proofReserveUsd": {
                    "type": "number"
                  },
                  "maxTotalUsd": {
                    "type": "number"
                  },
                  "paymentProvider": {
                    "type": "string",
                    "enum": [
                      "agentcash-mcp",
                      "cdp-x402",
                      "x402-fetch",
                      "external-adapter"
                    ]
                  },
                  "includeProof": {
                    "type": "boolean",
                    "default": true
                  },
                  "includeAutonomous": {
                    "type": "boolean",
                    "default": false
                  },
                  "includeAutoRefill": {
                    "type": "boolean",
                    "default": false
                  },
                  "includeRefillLive": {
                    "type": "boolean",
                    "default": false
                  },
                  "liveSpentTodayUsd": {
                    "type": "number",
                    "default": 0
                  },
                  "selectedDomain": {
                    "type": "string"
                  },
                  "candidateDomains": {
                    "oneOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    ]
                  },
                  "selectedDomainAvailable": {
                    "type": "boolean"
                  },
                  "selectedDomainPriceUsd": {
                    "type": "number"
                  },
                  "selectedDomainPeriodYears": {
                    "type": "number"
                  },
                  "selectedDomainPurchaseUrl": {
                    "type": "string",
                    "format": "uri"
                  },
                  "availabilityCheckedAt": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "availabilitySource": {
                    "type": "string"
                  },
                  "domainAvailability": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              },
              "example": {
                "baseUrl": "https://trust402.vercel.app",
                "candidateEndpoint": "https://approved.example/paid",
                "candidatePriceUsd": 0.01,
                "maxTotalUsd": 0.03,
                "includeProof": true,
                "selectedDomain": "trust402.dev",
                "selectedDomainAvailable": true,
                "selectedDomainPriceUsd": 9.99,
                "selectedDomainPeriodYears": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/registries/candidates": {
      "get": {
        "operationId": "registries_candidates_get",
        "summary": "Read trusted seed x402 candidates for autonomous job planning",
        "tags": [
          "Trust402"
        ],
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "registries_candidates",
        "summary": "Resolve explicit, registry-provided, and trusted seed x402 candidates without spending",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "goal": {
                    "type": "string"
                  },
                  "budgetUsd": {
                    "type": "number",
                    "default": 0.25
                  },
                  "maxCandidates": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10,
                    "default": 10
                  },
                  "fetchRegistries": {
                    "type": "boolean",
                    "default": false
                  },
                  "useSeedRegistry": {
                    "type": "boolean",
                    "default": true
                  },
                  "registryUrls": {
                    "type": "array",
                    "maxItems": 5,
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "allowedRegistryOrigins": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "string"
                    }
                  },
                  "registryCandidates": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable candidate identifier used in rankings and receipts."
                        },
                        "name": {
                          "type": "string",
                          "description": "Human-readable resource name."
                        },
                        "endpoint": {
                          "type": "string",
                          "format": "uri",
                          "description": "HTTPS x402 resource endpoint."
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Alternate field for the x402 resource endpoint."
                        },
                        "priceUsd": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Advertised resource price in USD."
                        },
                        "price": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Alternate price field accepted by Trust402."
                        },
                        "has402": {
                          "type": "boolean",
                          "description": "Whether the endpoint is known to return an x402 challenge."
                        },
                        "hasInputSchema": {
                          "type": "boolean",
                          "description": "Whether structured input schema metadata is available."
                        },
                        "hasOpenApi": {
                          "type": "boolean",
                          "description": "Whether the origin publishes OpenAPI metadata."
                        },
                        "hasWellKnown": {
                          "type": "boolean",
                          "description": "Whether the origin publishes /.well-known/x402 discovery."
                        },
                        "inputSchema": {
                          "type": "object",
                          "description": "Optional embedded input schema for the candidate."
                        },
                        "openapiUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "wellKnownUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "payTo": {
                          "type": "string",
                          "pattern": "^0x[a-fA-F0-9]{40}$"
                        },
                        "network": {
                          "type": "string",
                          "description": "x402 payment network, for example eip155:8453."
                        },
                        "asset": {
                          "type": "string",
                          "description": "Payment asset address or symbol."
                        },
                        "description": {
                          "type": "string",
                          "description": "Buyer-facing explanation of the resource."
                        },
                        "receiptReady": {
                          "type": "boolean",
                          "description": "Whether the candidate can return receipt/proof-ready output."
                        },
                        "proofReady": {
                          "type": "boolean",
                          "description": "Alternate receipt/proof readiness signal."
                        },
                        "observed": {
                          "type": "object",
                          "description": "Optional probe observations such as status or latency."
                        },
                        "x402": {
                          "type": "object",
                          "description": "Optional parsed x402 challenge metadata."
                        },
                        "accept": {
                          "type": "object",
                          "description": "Optional single x402 accept object."
                        },
                        "metadata": {
                          "type": "object",
                          "description": "Additional public-safe metadata used during scoring."
                        }
                      },
                      "anyOf": [
                        {
                          "required": [
                            "endpoint"
                          ]
                        },
                        {
                          "required": [
                            "url"
                          ]
                        }
                      ]
                    }
                  },
                  "candidates": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable candidate identifier used in rankings and receipts."
                        },
                        "name": {
                          "type": "string",
                          "description": "Human-readable resource name."
                        },
                        "endpoint": {
                          "type": "string",
                          "format": "uri",
                          "description": "HTTPS x402 resource endpoint."
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Alternate field for the x402 resource endpoint."
                        },
                        "priceUsd": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Advertised resource price in USD."
                        },
                        "price": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Alternate price field accepted by Trust402."
                        },
                        "has402": {
                          "type": "boolean",
                          "description": "Whether the endpoint is known to return an x402 challenge."
                        },
                        "hasInputSchema": {
                          "type": "boolean",
                          "description": "Whether structured input schema metadata is available."
                        },
                        "hasOpenApi": {
                          "type": "boolean",
                          "description": "Whether the origin publishes OpenAPI metadata."
                        },
                        "hasWellKnown": {
                          "type": "boolean",
                          "description": "Whether the origin publishes /.well-known/x402 discovery."
                        },
                        "inputSchema": {
                          "type": "object",
                          "description": "Optional embedded input schema for the candidate."
                        },
                        "openapiUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "wellKnownUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "payTo": {
                          "type": "string",
                          "pattern": "^0x[a-fA-F0-9]{40}$"
                        },
                        "network": {
                          "type": "string",
                          "description": "x402 payment network, for example eip155:8453."
                        },
                        "asset": {
                          "type": "string",
                          "description": "Payment asset address or symbol."
                        },
                        "description": {
                          "type": "string",
                          "description": "Buyer-facing explanation of the resource."
                        },
                        "receiptReady": {
                          "type": "boolean",
                          "description": "Whether the candidate can return receipt/proof-ready output."
                        },
                        "proofReady": {
                          "type": "boolean",
                          "description": "Alternate receipt/proof readiness signal."
                        },
                        "observed": {
                          "type": "object",
                          "description": "Optional probe observations such as status or latency."
                        },
                        "x402": {
                          "type": "object",
                          "description": "Optional parsed x402 challenge metadata."
                        },
                        "accept": {
                          "type": "object",
                          "description": "Optional single x402 accept object."
                        },
                        "metadata": {
                          "type": "object",
                          "description": "Additional public-safe metadata used during scoring."
                        }
                      },
                      "anyOf": [
                        {
                          "required": [
                            "endpoint"
                          ]
                        },
                        {
                          "required": [
                            "url"
                          ]
                        }
                      ]
                    }
                  }
                }
              },
              "example": {
                "goal": "Create a proof-backed receipt for a safe x402 procurement result.",
                "budgetUsd": 0.02,
                "maxCandidates": 3,
                "useSeedRegistry": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agentcash/refill-check": {
      "post": {
        "operationId": "agentcash_refill_check",
        "summary": "Evaluate AgentCash auto-refill policy in dry-run mode or create an approved refill action",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "dry-run",
                      "live"
                    ],
                    "default": "dry-run"
                  },
                  "currentBalanceUsd": {
                    "type": "number"
                  },
                  "amountRefilledTodayUsd": {
                    "type": "number",
                    "default": 0
                  }
                }
              },
              "example": {
                "mode": "dry-run",
                "currentBalanceUsd": 0.42,
                "amountRefilledTodayUsd": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/agentcash/mcp-observation": {
      "post": {
        "operationId": "agentcash_mcp_observation",
        "summary": "Validate observed AgentCash MCP accounts/settings against the Trust402 local wallet policy",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "accounts": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "network": {
                          "type": "string"
                        },
                        "address": {
                          "type": "string"
                        },
                        "balance": {
                          "type": "number"
                        }
                      }
                    }
                  },
                  "settings": {
                    "type": "object",
                    "properties": {
                      "maxAmount": {
                        "type": "number"
                      }
                    }
                  }
                }
              },
              "example": {
                "accounts": [
                  {
                    "network": "base",
                    "address": "0x1111111111111111111111111111111111111111",
                    "balance": 1.283
                  }
                ],
                "settings": {
                  "maxAmount": 0.01
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/jobs/autonomous-run": {
      "post": {
        "operationId": "jobs_autonomous_run",
        "summary": "Run a dry-run-first autonomous Trust402 job from goal to candidate discovery, quote, execution audit, receipt, and optional proof preview",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "goal",
                  "budgetUsd"
                ],
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "dry-run",
                      "live"
                    ],
                    "default": "dry-run"
                  },
                  "goal": {
                    "type": "string"
                  },
                  "budgetUsd": {
                    "type": "number"
                  },
                  "maxPaidCalls": {
                    "type": "integer",
                    "default": 3
                  },
                  "riskTolerance": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ],
                    "default": "low"
                  },
                  "includeProofPreview": {
                    "type": "boolean",
                    "default": false
                  },
                  "proof402Mode": {
                    "type": "string",
                    "enum": [
                      "disabled",
                      "preview",
                      "probe",
                      "live"
                    ]
                  },
                  "approval": {
                    "type": "object"
                  },
                  "fetchRegistries": {
                    "type": "boolean",
                    "default": false
                  },
                  "useSeedRegistry": {
                    "type": "boolean",
                    "default": true
                  },
                  "registryUrls": {
                    "type": "array",
                    "maxItems": 5,
                    "items": {
                      "type": "string",
                      "format": "uri"
                    }
                  },
                  "allowedRegistryOrigins": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "string"
                    }
                  },
                  "registryCandidates": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable candidate identifier used in rankings and receipts."
                        },
                        "name": {
                          "type": "string",
                          "description": "Human-readable resource name."
                        },
                        "endpoint": {
                          "type": "string",
                          "format": "uri",
                          "description": "HTTPS x402 resource endpoint."
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Alternate field for the x402 resource endpoint."
                        },
                        "priceUsd": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Advertised resource price in USD."
                        },
                        "price": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Alternate price field accepted by Trust402."
                        },
                        "has402": {
                          "type": "boolean",
                          "description": "Whether the endpoint is known to return an x402 challenge."
                        },
                        "hasInputSchema": {
                          "type": "boolean",
                          "description": "Whether structured input schema metadata is available."
                        },
                        "hasOpenApi": {
                          "type": "boolean",
                          "description": "Whether the origin publishes OpenAPI metadata."
                        },
                        "hasWellKnown": {
                          "type": "boolean",
                          "description": "Whether the origin publishes /.well-known/x402 discovery."
                        },
                        "inputSchema": {
                          "type": "object",
                          "description": "Optional embedded input schema for the candidate."
                        },
                        "openapiUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "wellKnownUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "payTo": {
                          "type": "string",
                          "pattern": "^0x[a-fA-F0-9]{40}$"
                        },
                        "network": {
                          "type": "string",
                          "description": "x402 payment network, for example eip155:8453."
                        },
                        "asset": {
                          "type": "string",
                          "description": "Payment asset address or symbol."
                        },
                        "description": {
                          "type": "string",
                          "description": "Buyer-facing explanation of the resource."
                        },
                        "receiptReady": {
                          "type": "boolean",
                          "description": "Whether the candidate can return receipt/proof-ready output."
                        },
                        "proofReady": {
                          "type": "boolean",
                          "description": "Alternate receipt/proof readiness signal."
                        },
                        "observed": {
                          "type": "object",
                          "description": "Optional probe observations such as status or latency."
                        },
                        "x402": {
                          "type": "object",
                          "description": "Optional parsed x402 challenge metadata."
                        },
                        "accept": {
                          "type": "object",
                          "description": "Optional single x402 accept object."
                        },
                        "metadata": {
                          "type": "object",
                          "description": "Additional public-safe metadata used during scoring."
                        }
                      },
                      "anyOf": [
                        {
                          "required": [
                            "endpoint"
                          ]
                        },
                        {
                          "required": [
                            "url"
                          ]
                        }
                      ]
                    }
                  },
                  "candidates": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable candidate identifier used in rankings and receipts."
                        },
                        "name": {
                          "type": "string",
                          "description": "Human-readable resource name."
                        },
                        "endpoint": {
                          "type": "string",
                          "format": "uri",
                          "description": "HTTPS x402 resource endpoint."
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Alternate field for the x402 resource endpoint."
                        },
                        "priceUsd": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Advertised resource price in USD."
                        },
                        "price": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Alternate price field accepted by Trust402."
                        },
                        "has402": {
                          "type": "boolean",
                          "description": "Whether the endpoint is known to return an x402 challenge."
                        },
                        "hasInputSchema": {
                          "type": "boolean",
                          "description": "Whether structured input schema metadata is available."
                        },
                        "hasOpenApi": {
                          "type": "boolean",
                          "description": "Whether the origin publishes OpenAPI metadata."
                        },
                        "hasWellKnown": {
                          "type": "boolean",
                          "description": "Whether the origin publishes /.well-known/x402 discovery."
                        },
                        "inputSchema": {
                          "type": "object",
                          "description": "Optional embedded input schema for the candidate."
                        },
                        "openapiUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "wellKnownUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "payTo": {
                          "type": "string",
                          "pattern": "^0x[a-fA-F0-9]{40}$"
                        },
                        "network": {
                          "type": "string",
                          "description": "x402 payment network, for example eip155:8453."
                        },
                        "asset": {
                          "type": "string",
                          "description": "Payment asset address or symbol."
                        },
                        "description": {
                          "type": "string",
                          "description": "Buyer-facing explanation of the resource."
                        },
                        "receiptReady": {
                          "type": "boolean",
                          "description": "Whether the candidate can return receipt/proof-ready output."
                        },
                        "proofReady": {
                          "type": "boolean",
                          "description": "Alternate receipt/proof readiness signal."
                        },
                        "observed": {
                          "type": "object",
                          "description": "Optional probe observations such as status or latency."
                        },
                        "x402": {
                          "type": "object",
                          "description": "Optional parsed x402 challenge metadata."
                        },
                        "accept": {
                          "type": "object",
                          "description": "Optional single x402 accept object."
                        },
                        "metadata": {
                          "type": "object",
                          "description": "Additional public-safe metadata used during scoring."
                        }
                      },
                      "anyOf": [
                        {
                          "required": [
                            "endpoint"
                          ]
                        },
                        {
                          "required": [
                            "url"
                          ]
                        }
                      ]
                    }
                  }
                }
              },
              "example": {
                "mode": "dry-run",
                "goal": "Choose and audit the safest x402 resource for endpoint diligence.",
                "budgetUsd": 0.25,
                "maxPaidCalls": 2,
                "riskTolerance": "low",
                "includeProofPreview": true,
                "useSeedRegistry": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/receipts/hash-result": {
      "post": {
        "operationId": "receipts_hash_result",
        "summary": "Prepare a proof-ready SHA-256 receipt bundle without paid delegation",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "payload": {},
                  "result": {},
                  "resultHash": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  },
                  "purpose": {
                    "type": "string"
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "payload"
                    ]
                  },
                  {
                    "required": [
                      "result"
                    ]
                  },
                  {
                    "required": [
                      "resultHash"
                    ]
                  }
                ]
              },
              "example": {
                "subject": "example diligence result",
                "payload": {
                  "endpoint": "https://example.com/api/paid",
                  "recommendation": "test-first"
                },
                "purpose": "proof-ready result hash"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/receipts/notarize-result": {
      "post": {
        "operationId": "receipts_notarize_result",
        "summary": "Preview or probe Proof402 notarization for a result hash without paid delegation",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {
                    "type": "string"
                  },
                  "label": {
                    "type": "string"
                  },
                  "payload": {},
                  "result": {},
                  "resultHash": {
                    "type": "string",
                    "pattern": "^sha256:[a-f0-9]{64}$"
                  },
                  "metadata": {
                    "type": "object"
                  },
                  "idempotencyKey": {
                    "type": "string"
                  },
                  "proof402Mode": {
                    "type": "string",
                    "enum": [
                      "disabled",
                      "preview",
                      "probe",
                      "live"
                    ]
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "payload"
                    ]
                  },
                  {
                    "required": [
                      "result"
                    ]
                  },
                  {
                    "required": [
                      "resultHash"
                    ]
                  }
                ]
              },
              "example": {
                "subject": "example diligence result",
                "resultHash": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
                "label": "Trust402 diligence result",
                "metadata": {
                  "agent": "trust402",
                  "taskId": "task_123"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "501": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/procurement/execute": {
      "post": {
        "operationId": "procurement_execute",
        "summary": "Simulate controlled procurement execution without live spend",
        "tags": [
          "Trust402"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "enum": [
                      "dry-run"
                    ],
                    "default": "dry-run"
                  },
                  "liveSpendEnabled": {
                    "type": "boolean",
                    "default": false
                  },
                  "quote": {
                    "type": "object"
                  },
                  "goal": {
                    "type": "string"
                  },
                  "budgetUsd": {
                    "type": "number"
                  },
                  "candidates": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable candidate identifier used in rankings and receipts."
                        },
                        "name": {
                          "type": "string",
                          "description": "Human-readable resource name."
                        },
                        "endpoint": {
                          "type": "string",
                          "format": "uri",
                          "description": "HTTPS x402 resource endpoint."
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Alternate field for the x402 resource endpoint."
                        },
                        "priceUsd": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Advertised resource price in USD."
                        },
                        "price": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Alternate price field accepted by Trust402."
                        },
                        "has402": {
                          "type": "boolean",
                          "description": "Whether the endpoint is known to return an x402 challenge."
                        },
                        "hasInputSchema": {
                          "type": "boolean",
                          "description": "Whether structured input schema metadata is available."
                        },
                        "hasOpenApi": {
                          "type": "boolean",
                          "description": "Whether the origin publishes OpenAPI metadata."
                        },
                        "hasWellKnown": {
                          "type": "boolean",
                          "description": "Whether the origin publishes /.well-known/x402 discovery."
                        },
                        "inputSchema": {
                          "type": "object",
                          "description": "Optional embedded input schema for the candidate."
                        },
                        "openapiUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "wellKnownUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "payTo": {
                          "type": "string",
                          "pattern": "^0x[a-fA-F0-9]{40}$"
                        },
                        "network": {
                          "type": "string",
                          "description": "x402 payment network, for example eip155:8453."
                        },
                        "asset": {
                          "type": "string",
                          "description": "Payment asset address or symbol."
                        },
                        "description": {
                          "type": "string",
                          "description": "Buyer-facing explanation of the resource."
                        },
                        "receiptReady": {
                          "type": "boolean",
                          "description": "Whether the candidate can return receipt/proof-ready output."
                        },
                        "proofReady": {
                          "type": "boolean",
                          "description": "Alternate receipt/proof readiness signal."
                        },
                        "observed": {
                          "type": "object",
                          "description": "Optional probe observations such as status or latency."
                        },
                        "x402": {
                          "type": "object",
                          "description": "Optional parsed x402 challenge metadata."
                        },
                        "accept": {
                          "type": "object",
                          "description": "Optional single x402 accept object."
                        },
                        "metadata": {
                          "type": "object",
                          "description": "Additional public-safe metadata used during scoring."
                        }
                      },
                      "anyOf": [
                        {
                          "required": [
                            "endpoint"
                          ]
                        },
                        {
                          "required": [
                            "url"
                          ]
                        }
                      ]
                    }
                  }
                }
              },
              "example": {
                "mode": "dry-run",
                "goal": "Simulate a controlled x402 procurement run.",
                "budgetUsd": 0.25,
                "candidates": [
                  {
                    "id": "a",
                    "endpoint": "https://example.com/a",
                    "priceUsd": 0.01,
                    "has402": true,
                    "hasInputSchema": true,
                    "hasOpenApi": true,
                    "hasWellKnown": true
                  },
                  {
                    "id": "b",
                    "endpoint": "https://example.com/b",
                    "priceUsd": 0.04,
                    "hasInputSchema": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/trust/check-x402": {
      "post": {
        "operationId": "trust_check_x402",
        "summary": "Run a fast live probe for one x402 endpoint and summarize challenge/payment-flow readiness.",
        "tags": [
          "Trust402"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3f4CEE4c6bad04FcCA3138dFFDEE579ddf17049B"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "endpoint"
                ],
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST",
                      "PUT",
                      "PATCH",
                      "DELETE",
                      "HEAD"
                    ],
                    "default": "GET"
                  },
                  "expectedPriceUsd": {
                    "type": "number"
                  }
                }
              },
              "example": {
                "endpoint": "https://example.com/api/paid",
                "method": "GET"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required when TRUST402_PAYWALL_MODE=mock"
          }
        }
      }
    },
    "/api/trust/score-resource": {
      "post": {
        "operationId": "trust_score_resource",
        "summary": "Score one x402 resource for trust, schema, price, discovery, and receipt readiness.",
        "tags": [
          "Trust402"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3f4CEE4c6bad04FcCA3138dFFDEE579ddf17049B"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "origin": {
                    "type": "string",
                    "format": "uri"
                  },
                  "priceUsd": {
                    "type": "number"
                  },
                  "hasInputSchema": {
                    "type": "boolean"
                  },
                  "hasOpenApi": {
                    "type": "boolean"
                  },
                  "hasWellKnown": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "endpoint": "https://example.com/api/paid",
                "priceUsd": 0.01,
                "hasInputSchema": true,
                "hasOpenApi": true,
                "hasWellKnown": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required when TRUST402_PAYWALL_MODE=mock"
          }
        }
      }
    },
    "/api/trust/evaluate-origin": {
      "post": {
        "operationId": "trust_evaluate_origin",
        "summary": "Evaluate a full origin/domain and its x402 discovery posture.",
        "tags": [
          "Trust402"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3f4CEE4c6bad04FcCA3138dFFDEE579ddf17049B"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "origin": {
                    "type": "string",
                    "format": "uri"
                  },
                  "priceUsd": {
                    "type": "number"
                  },
                  "hasInputSchema": {
                    "type": "boolean"
                  },
                  "hasOpenApi": {
                    "type": "boolean"
                  },
                  "hasWellKnown": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "endpoint": "https://example.com/api/paid",
                "priceUsd": 0.01,
                "hasInputSchema": true,
                "hasOpenApi": true,
                "hasWellKnown": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required when TRUST402_PAYWALL_MODE=mock"
          }
        }
      }
    },
    "/api/seller/readiness": {
      "post": {
        "operationId": "seller_readiness",
        "summary": "Check whether a seller endpoint is ready for marketplace discovery and autonomous buyers.",
        "tags": [
          "Trust402"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3f4CEE4c6bad04FcCA3138dFFDEE579ddf17049B"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "origin": {
                    "type": "string",
                    "format": "uri"
                  },
                  "priceUsd": {
                    "type": "number"
                  },
                  "hasInputSchema": {
                    "type": "boolean"
                  },
                  "hasOpenApi": {
                    "type": "boolean"
                  },
                  "hasWellKnown": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "endpoint": "https://example.com/api/paid",
                "priceUsd": 0.01,
                "hasInputSchema": true,
                "hasOpenApi": true,
                "hasWellKnown": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required when TRUST402_PAYWALL_MODE=mock"
          }
        }
      }
    },
    "/api/trust/compare-resources": {
      "post": {
        "operationId": "trust_compare_resources",
        "summary": "Rank 2-10 candidate paid resources for a goal, budget, and risk policy.",
        "tags": [
          "Trust402"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.03"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3f4CEE4c6bad04FcCA3138dFFDEE579ddf17049B"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "candidates"
                ],
                "properties": {
                  "goal": {
                    "type": "string"
                  },
                  "budgetUsd": {
                    "type": "number"
                  },
                  "candidates": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable candidate identifier used in rankings and receipts."
                        },
                        "name": {
                          "type": "string",
                          "description": "Human-readable resource name."
                        },
                        "endpoint": {
                          "type": "string",
                          "format": "uri",
                          "description": "HTTPS x402 resource endpoint."
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Alternate field for the x402 resource endpoint."
                        },
                        "priceUsd": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Advertised resource price in USD."
                        },
                        "price": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Alternate price field accepted by Trust402."
                        },
                        "has402": {
                          "type": "boolean",
                          "description": "Whether the endpoint is known to return an x402 challenge."
                        },
                        "hasInputSchema": {
                          "type": "boolean",
                          "description": "Whether structured input schema metadata is available."
                        },
                        "hasOpenApi": {
                          "type": "boolean",
                          "description": "Whether the origin publishes OpenAPI metadata."
                        },
                        "hasWellKnown": {
                          "type": "boolean",
                          "description": "Whether the origin publishes /.well-known/x402 discovery."
                        },
                        "inputSchema": {
                          "type": "object",
                          "description": "Optional embedded input schema for the candidate."
                        },
                        "openapiUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "wellKnownUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "payTo": {
                          "type": "string",
                          "pattern": "^0x[a-fA-F0-9]{40}$"
                        },
                        "network": {
                          "type": "string",
                          "description": "x402 payment network, for example eip155:8453."
                        },
                        "asset": {
                          "type": "string",
                          "description": "Payment asset address or symbol."
                        },
                        "description": {
                          "type": "string",
                          "description": "Buyer-facing explanation of the resource."
                        },
                        "receiptReady": {
                          "type": "boolean",
                          "description": "Whether the candidate can return receipt/proof-ready output."
                        },
                        "proofReady": {
                          "type": "boolean",
                          "description": "Alternate receipt/proof readiness signal."
                        },
                        "observed": {
                          "type": "object",
                          "description": "Optional probe observations such as status or latency."
                        },
                        "x402": {
                          "type": "object",
                          "description": "Optional parsed x402 challenge metadata."
                        },
                        "accept": {
                          "type": "object",
                          "description": "Optional single x402 accept object."
                        },
                        "metadata": {
                          "type": "object",
                          "description": "Additional public-safe metadata used during scoring."
                        }
                      },
                      "anyOf": [
                        {
                          "required": [
                            "endpoint"
                          ]
                        },
                        {
                          "required": [
                            "url"
                          ]
                        }
                      ]
                    }
                  }
                }
              },
              "example": {
                "goal": "Choose a low-risk domain intelligence resource.",
                "budgetUsd": 0.05,
                "candidates": [
                  {
                    "id": "a",
                    "endpoint": "https://example.com/a",
                    "priceUsd": 0.01,
                    "hasInputSchema": true,
                    "hasOpenApi": true,
                    "hasWellKnown": true
                  },
                  {
                    "id": "b",
                    "endpoint": "https://example.com/b",
                    "priceUsd": 0.03,
                    "hasInputSchema": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required when TRUST402_PAYWALL_MODE=mock"
          }
        }
      }
    },
    "/api/procurement/plan": {
      "post": {
        "operationId": "procurement_plan",
        "summary": "Create a bounded spend plan without spending money.",
        "tags": [
          "Trust402"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3f4CEE4c6bad04FcCA3138dFFDEE579ddf17049B"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "goal",
                  "budgetUsd"
                ],
                "properties": {
                  "goal": {
                    "type": "string"
                  },
                  "budgetUsd": {
                    "type": "number"
                  },
                  "maxPaidCalls": {
                    "type": "integer",
                    "default": 5
                  },
                  "riskTolerance": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ],
                    "default": "low"
                  },
                  "candidates": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable candidate identifier used in rankings and receipts."
                        },
                        "name": {
                          "type": "string",
                          "description": "Human-readable resource name."
                        },
                        "endpoint": {
                          "type": "string",
                          "format": "uri",
                          "description": "HTTPS x402 resource endpoint."
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Alternate field for the x402 resource endpoint."
                        },
                        "priceUsd": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Advertised resource price in USD."
                        },
                        "price": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Alternate price field accepted by Trust402."
                        },
                        "has402": {
                          "type": "boolean",
                          "description": "Whether the endpoint is known to return an x402 challenge."
                        },
                        "hasInputSchema": {
                          "type": "boolean",
                          "description": "Whether structured input schema metadata is available."
                        },
                        "hasOpenApi": {
                          "type": "boolean",
                          "description": "Whether the origin publishes OpenAPI metadata."
                        },
                        "hasWellKnown": {
                          "type": "boolean",
                          "description": "Whether the origin publishes /.well-known/x402 discovery."
                        },
                        "inputSchema": {
                          "type": "object",
                          "description": "Optional embedded input schema for the candidate."
                        },
                        "openapiUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "wellKnownUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "payTo": {
                          "type": "string",
                          "pattern": "^0x[a-fA-F0-9]{40}$"
                        },
                        "network": {
                          "type": "string",
                          "description": "x402 payment network, for example eip155:8453."
                        },
                        "asset": {
                          "type": "string",
                          "description": "Payment asset address or symbol."
                        },
                        "description": {
                          "type": "string",
                          "description": "Buyer-facing explanation of the resource."
                        },
                        "receiptReady": {
                          "type": "boolean",
                          "description": "Whether the candidate can return receipt/proof-ready output."
                        },
                        "proofReady": {
                          "type": "boolean",
                          "description": "Alternate receipt/proof readiness signal."
                        },
                        "observed": {
                          "type": "object",
                          "description": "Optional probe observations such as status or latency."
                        },
                        "x402": {
                          "type": "object",
                          "description": "Optional parsed x402 challenge metadata."
                        },
                        "accept": {
                          "type": "object",
                          "description": "Optional single x402 accept object."
                        },
                        "metadata": {
                          "type": "object",
                          "description": "Additional public-safe metadata used during scoring."
                        }
                      },
                      "anyOf": [
                        {
                          "required": [
                            "endpoint"
                          ]
                        },
                        {
                          "required": [
                            "url"
                          ]
                        }
                      ]
                    }
                  }
                }
              },
              "example": {
                "goal": "Find the safest x402 resource for endpoint diligence.",
                "budgetUsd": 0.25,
                "maxPaidCalls": 5,
                "riskTolerance": "low"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required when TRUST402_PAYWALL_MODE=mock"
          }
        }
      }
    },
    "/api/procurement/quote": {
      "post": {
        "operationId": "procurement_quote",
        "summary": "Produce a concrete quote and approval payload for a multi-resource purchase path without spending.",
        "tags": [
          "Trust402"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.04"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3f4CEE4c6bad04FcCA3138dFFDEE579ddf17049B"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "goal",
                  "budgetUsd"
                ],
                "properties": {
                  "goal": {
                    "type": "string"
                  },
                  "budgetUsd": {
                    "type": "number"
                  },
                  "maxPaidCalls": {
                    "type": "integer",
                    "default": 5
                  },
                  "riskTolerance": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ],
                    "default": "low"
                  },
                  "allowedRegistries": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "candidates": {
                    "type": "array",
                    "minItems": 1,
                    "maxItems": 10,
                    "items": {
                      "type": "object",
                      "additionalProperties": true,
                      "properties": {
                        "id": {
                          "type": "string",
                          "description": "Stable candidate identifier used in rankings and receipts."
                        },
                        "name": {
                          "type": "string",
                          "description": "Human-readable resource name."
                        },
                        "endpoint": {
                          "type": "string",
                          "format": "uri",
                          "description": "HTTPS x402 resource endpoint."
                        },
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Alternate field for the x402 resource endpoint."
                        },
                        "priceUsd": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Advertised resource price in USD."
                        },
                        "price": {
                          "oneOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "string"
                            }
                          ],
                          "description": "Alternate price field accepted by Trust402."
                        },
                        "has402": {
                          "type": "boolean",
                          "description": "Whether the endpoint is known to return an x402 challenge."
                        },
                        "hasInputSchema": {
                          "type": "boolean",
                          "description": "Whether structured input schema metadata is available."
                        },
                        "hasOpenApi": {
                          "type": "boolean",
                          "description": "Whether the origin publishes OpenAPI metadata."
                        },
                        "hasWellKnown": {
                          "type": "boolean",
                          "description": "Whether the origin publishes /.well-known/x402 discovery."
                        },
                        "inputSchema": {
                          "type": "object",
                          "description": "Optional embedded input schema for the candidate."
                        },
                        "openapiUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "wellKnownUrl": {
                          "type": "string",
                          "format": "uri"
                        },
                        "payTo": {
                          "type": "string",
                          "pattern": "^0x[a-fA-F0-9]{40}$"
                        },
                        "network": {
                          "type": "string",
                          "description": "x402 payment network, for example eip155:8453."
                        },
                        "asset": {
                          "type": "string",
                          "description": "Payment asset address or symbol."
                        },
                        "description": {
                          "type": "string",
                          "description": "Buyer-facing explanation of the resource."
                        },
                        "receiptReady": {
                          "type": "boolean",
                          "description": "Whether the candidate can return receipt/proof-ready output."
                        },
                        "proofReady": {
                          "type": "boolean",
                          "description": "Alternate receipt/proof readiness signal."
                        },
                        "observed": {
                          "type": "object",
                          "description": "Optional probe observations such as status or latency."
                        },
                        "x402": {
                          "type": "object",
                          "description": "Optional parsed x402 challenge metadata."
                        },
                        "accept": {
                          "type": "object",
                          "description": "Optional single x402 accept object."
                        },
                        "metadata": {
                          "type": "object",
                          "description": "Additional public-safe metadata used during scoring."
                        }
                      },
                      "anyOf": [
                        {
                          "required": [
                            "endpoint"
                          ]
                        },
                        {
                          "required": [
                            "url"
                          ]
                        }
                      ]
                    }
                  }
                }
              },
              "example": {
                "goal": "Buy one safe endpoint intelligence resource.",
                "budgetUsd": 0.25,
                "maxPaidCalls": 3,
                "riskTolerance": "low",
                "candidates": [
                  {
                    "id": "a",
                    "endpoint": "https://example.com/a",
                    "priceUsd": 0.01,
                    "has402": true,
                    "hasInputSchema": true,
                    "hasOpenApi": true,
                    "hasWellKnown": true
                  },
                  {
                    "id": "b",
                    "endpoint": "https://example.com/b",
                    "priceUsd": 0.04,
                    "hasInputSchema": false
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required when TRUST402_PAYWALL_MODE=mock"
          }
        }
      }
    },
    "/api/monitor/snapshot": {
      "post": {
        "operationId": "monitor_snapshot",
        "summary": "Run a one-shot x402 payment-flow and trust drift snapshot without storing history.",
        "tags": [
          "Trust402"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.015"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3f4CEE4c6bad04FcCA3138dFFDEE579ddf17049B"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "origin": {
                    "type": "string",
                    "format": "uri"
                  },
                  "method": {
                    "type": "string",
                    "enum": [
                      "GET",
                      "POST",
                      "PUT",
                      "PATCH",
                      "DELETE",
                      "HEAD"
                    ],
                    "default": "GET"
                  },
                  "expectedStatus": {
                    "type": "integer"
                  },
                  "expectedPriceUsd": {
                    "type": "number"
                  },
                  "timeoutMs": {
                    "type": "integer"
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "endpoint"
                    ]
                  },
                  {
                    "required": [
                      "origin"
                    ]
                  }
                ]
              },
              "example": {
                "endpoint": "https://example.com/api/paid",
                "method": "GET",
                "expectedStatus": 402,
                "expectedPriceUsd": 0.01
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required when TRUST402_PAYWALL_MODE=mock"
          }
        }
      }
    },
    "/api/monitor/badge": {
      "post": {
        "operationId": "monitor_badge",
        "summary": "Generate a one-shot Trust402 badge payload from a snapshot.",
        "tags": [
          "Trust402"
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.02"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3f4CEE4c6bad04FcCA3138dFFDEE579ddf17049B"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "origin": {
                    "type": "string",
                    "format": "uri"
                  },
                  "label": {
                    "type": "string"
                  },
                  "snapshot": {
                    "type": "object"
                  }
                },
                "anyOf": [
                  {
                    "required": [
                      "endpoint"
                    ]
                  },
                  {
                    "required": [
                      "origin"
                    ]
                  },
                  {
                    "required": [
                      "snapshot"
                    ]
                  }
                ]
              },
              "example": {
                "endpoint": "https://example.com/api/paid",
                "label": "Trust402"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required when TRUST402_PAYWALL_MODE=mock"
          }
        }
      }
    },
    "/api/reports/x402-diligence": {
      "post": {
        "operationId": "reports_x402_diligence",
        "summary": "Produce a full diligence report for an x402 endpoint or origin with hash-ready evidence.",
        "tags": [
          "Trust402"
        ],
        "x-payment-info": {
          "price": {
            "mode": "range",
            "currency": "USD",
            "min": "0.08",
            "max": "0.15"
          },
          "protocols": [
            {
              "x402": {
                "version": 2,
                "scheme": "exact",
                "network": "eip155:8453",
                "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
                "payTo": "0x3f4CEE4c6bad04FcCA3138dFFDEE579ddf17049B"
              }
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "format": "uri"
                  },
                  "origin": {
                    "type": "string",
                    "format": "uri"
                  },
                  "priceUsd": {
                    "type": "number"
                  },
                  "hasInputSchema": {
                    "type": "boolean"
                  },
                  "hasOpenApi": {
                    "type": "boolean"
                  },
                  "hasWellKnown": {
                    "type": "boolean"
                  }
                }
              },
              "example": {
                "endpoint": "https://example.com/api/paid",
                "priceUsd": 0.01,
                "hasInputSchema": true,
                "hasOpenApi": true,
                "hasWellKnown": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Error response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "error": {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "message": {
                          "type": "string"
                        },
                        "details": {
                          "type": "object"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment required when TRUST402_PAYWALL_MODE=mock"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "details": {
                "type": "object"
              }
            }
          }
        }
      }
    }
  }
}