{
  "openapi": "3.1.0",
  "info": {
    "title": "Tokenization Atlas and Wever Labs TokenOps API",
    "version": "1.1.0",
    "description": "API for tokenized-asset passports, evidence-gated theses, governed simulations, Commerce Proof, and verified public agent activity."
  },
  "servers": [{ "url": "https://atlas.weverlabs.com" }],
  "paths": {
    "/api/assets": {
      "get": {
        "summary": "List assets or retrieve one Asset Passport",
        "parameters": [{ "name": "id", "in": "query", "required": false, "schema": { "type": "string" } }],
        "responses": { "200": { "description": "Asset Passport response" } }
      }
    },
    "/api/token-thesis": {
      "post": {
        "summary": "Generate an evidence-gated Token Thesis",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["asset_id"], "properties": { "asset_id": { "type": "string" }, "jurisdiction": { "type": "string" }, "investor_type": { "type": "string" } } } } } },
        "responses": { "200": { "description": "Token Thesis that passed the evidence quality gate" } }
      }
    },
    "/api/agent-run": {
      "post": {
        "summary": "Run a governed TokenOps simulation",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["asset_id", "budget"], "properties": { "asset_id": { "type": "string" }, "budget": { "type": "number" }, "jurisdiction": { "type": "string" }, "investor_type": { "type": "string" }, "approval_threshold": { "type": "number" }, "allow_execution": { "type": "boolean" } } } } } },
        "responses": { "200": { "description": "Work order, decision packet, policy result, simulated execution, and signed receipt" } }
      }
    },
    "/api/agent-commerce-proof": {
      "post": {
        "servers": [{ "url": "https://weverlabs.com" }],
        "summary": "Evaluate an agent return package and issue an Agent Commerce Passport",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["agent_id", "mission_type", "asset_id", "mandate", "return_package"], "properties": { "agent_id": { "type": "string" }, "mission_type": { "type": "string" }, "asset_id": { "type": "string" }, "mandate": { "type": "object" }, "return_package": { "type": "object" } } } } } },
        "responses": { "201": { "description": "Commerce Proof decision, Agent Commerce Passport, signed receipt, verification packet, and persistence state" } }
      }
    },
    "/api/commerce-activity-feed": {
      "get": {
        "servers": [{ "url": "https://weverlabs.com" }],
        "summary": "Read verified public agent commerce activity and reliability history",
        "description": "Returns only credential-bound missions with explicit publication consent, a verified signed receipt, and a persisted proof record.",
        "responses": { "200": { "description": "Verified activity, reliability profiles, publication policy, and an explicit empty state" } }
      }
    },
    "/api/delegated-authority": {
      "post": {
        "servers": [{ "url": "https://weverlabs.com" }],
        "summary": "Validate a Wever Authority Mandate draft",
        "description": "Checks a proposed principal, agent, tool, rail, budget, time, and publication boundary. Draft validation creates no authority. Issuance and action grants require the Wever Labs control plane.",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["mode", "principal_reference", "agent_id", "permission_mode", "consent_reference"], "properties": { "mode": { "const": "draft_mandate" }, "principal_reference": { "type": "string" }, "agent_id": { "type": "string" }, "permission_mode": { "enum": ["read_only", "bounded_write"] }, "allowed_tools": { "type": "array", "items": { "type": "string" } }, "allowed_rails": { "type": "array", "items": { "type": "string" } }, "max_amount_units": { "type": "number", "minimum": 0 }, "max_runs": { "type": "integer", "minimum": 1 }, "ttl_minutes": { "type": "number", "minimum": 5 }, "consent_reference": { "type": "string" } } } } } },
        "responses": { "200": { "description": "Validated draft with authority_created=false" } }
      }
    }
  }
}
