{
  "openapi": "3.1.0",
  "info": {
    "title": "Autonomy service discovery",
    "version": "0.2.0",
    "description": "Implemented read-only recovery/discovery operations only. Legacy upstream operations are not schema-verified; commercial execution is disabled."
  },
  "servers": [
    {
      "url": "https://theautonomy.ai"
    }
  ],
  "paths": {
    "/v1/services": {
      "get": {
        "operationId": "listServices",
        "summary": "Read the recovered service registry",
        "responses": {
          "200": {
            "description": "Legacy inventory; not a payable offer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "registry_version",
                    "commercial_status",
                    "services"
                  ],
                  "properties": {
                    "registry_version": {
                      "type": "string"
                    },
                    "commercial_status": {
                      "const": "BLOCKED"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "sellable": {
                      "const": 0
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "service_id",
                          "status",
                          "http_endpoint",
                          "availability",
                          "price"
                        ],
                        "properties": {
                          "service_id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "LEGACY",
                              "BLOCKED"
                            ]
                          },
                          "http_endpoint": {
                            "type": "object",
                            "required": [
                              "origin",
                              "method",
                              "path"
                            ],
                            "properties": {
                              "origin": {
                                "type": "string",
                                "format": "uri"
                              },
                              "method": {
                                "type": "string"
                              },
                              "path": {
                                "type": "string"
                              }
                            }
                          },
                          "availability": {
                            "type": "object",
                            "required": [
                              "sellable",
                              "callable_verified"
                            ],
                            "properties": {
                              "sellable": {
                                "const": false
                              },
                              "callable_verified": {
                                "const": false
                              }
                            }
                          },
                          "price": {
                            "type": "object",
                            "required": [
                              "status",
                              "binding",
                              "amount"
                            ],
                            "properties": {
                              "status": {
                                "const": "NOT VERIFIED"
                              },
                              "binding": {
                                "const": false
                              },
                              "amount": {
                                "type": "null"
                              },
                              "legacy_advertised_amount": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/services/{service_id}": {
      "get": {
        "operationId": "readService",
        "summary": "Read a recovered capability, not a payable offer",
        "parameters": [
          {
            "name": "service_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^autonomy\\.[a-f0-9]{20}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Conservative service record.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "service_id",
                    "status",
                    "http_endpoint",
                    "availability",
                    "price"
                  ],
                  "properties": {
                    "service_id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "LEGACY",
                        "BLOCKED"
                      ]
                    },
                    "http_endpoint": {
                      "type": "object",
                      "required": [
                        "origin",
                        "method",
                        "path"
                      ],
                      "properties": {
                        "origin": {
                          "type": "string",
                          "format": "uri"
                        },
                        "method": {
                          "type": "string"
                        },
                        "path": {
                          "type": "string"
                        }
                      }
                    },
                    "availability": {
                      "type": "object",
                      "required": [
                        "sellable",
                        "callable_verified"
                      ],
                      "properties": {
                        "sellable": {
                          "const": false
                        },
                        "callable_verified": {
                          "const": false
                        }
                      }
                    },
                    "price": {
                      "type": "object",
                      "required": [
                        "status",
                        "binding",
                        "amount"
                      ],
                      "properties": {
                        "status": {
                          "const": "NOT VERIFIED"
                        },
                        "binding": {
                          "const": false
                        },
                        "amount": {
                          "type": "null"
                        },
                        "legacy_advertised_amount": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Unknown service.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/v1/discover": {
      "get": {
        "operationId": "discoverServices",
        "summary": "Search recovered capabilities",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "capability",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching legacy capability records.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "services",
                    "total",
                    "commercial_status"
                  ],
                  "properties": {
                    "total": {
                      "type": "integer"
                    },
                    "commercial_status": {
                      "const": "BLOCKED"
                    },
                    "services": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "required": [
                          "service_id",
                          "status",
                          "http_endpoint",
                          "availability",
                          "price"
                        ],
                        "properties": {
                          "service_id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "LEGACY",
                              "BLOCKED"
                            ]
                          },
                          "http_endpoint": {
                            "type": "object",
                            "required": [
                              "origin",
                              "method",
                              "path"
                            ],
                            "properties": {
                              "origin": {
                                "type": "string",
                                "format": "uri"
                              },
                              "method": {
                                "type": "string"
                              },
                              "path": {
                                "type": "string"
                              }
                            }
                          },
                          "availability": {
                            "type": "object",
                            "required": [
                              "sellable",
                              "callable_verified"
                            ],
                            "properties": {
                              "sellable": {
                                "const": false
                              },
                              "callable_verified": {
                                "const": false
                              }
                            }
                          },
                          "price": {
                            "type": "object",
                            "required": [
                              "status",
                              "binding",
                              "amount"
                            ],
                            "properties": {
                              "status": {
                                "const": "NOT VERIFIED"
                              },
                              "binding": {
                                "const": false
                              },
                              "amount": {
                                "type": "null"
                              },
                              "legacy_advertised_amount": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid search parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/discovery/health": {
      "get": {
        "operationId": "discoveryHealth",
        "responses": {
          "200": {
            "description": "Discovery health, not upstream service health.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "status",
                    "commerce"
                  ],
                  "properties": {
                    "status": {
                      "const": "degraded"
                    },
                    "commerce": {
                      "const": "BLOCKED"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/x404.json": {
      "get": {
        "operationId": "x404Manifest",
        "responses": {
          "200": {
            "description": "X404 discovery manifest; commerce disabled.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name",
                    "commerce_enabled"
                  ],
                  "properties": {
                    "name": {
                      "const": "X404"
                    },
                    "commerce_enabled": {
                      "const": false
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "openapiDocument",
        "responses": {
          "200": {
            "description": "This OpenAPI document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "openapi",
                    "paths"
                  ],
                  "properties": {
                    "openapi": {
                      "const": "3.1.0"
                    },
                    "paths": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcpDiscovery",
        "summary": "Stateless read-only MCP discovery",
        "description": "Initialize an official MCP Streamable HTTP client, then list and call the four read-only tools in registry.discovery_transports.mcp.tools. JSON responses only, no SSE session. Request schema below describes the transport envelope; tools/list returns each tool input schema. No paid tools or execution.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "method"
                ],
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {
                    "type": [
                      "string",
                      "integer"
                    ]
                  },
                  "method": {
                    "type": "string"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Read-only discovery JSON-RPC result or protocol error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "202": {
            "description": "Accepted MCP notification."
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Untrusted origin.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Transport rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "Transport unavailable; no payment or execution.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/a2a": {
      "post": {
        "operationId": "a2aDiscovery",
        "summary": "A2A 1.0 read-only service-discovery agent",
        "description": "Read the canonical Agent Card, then use official A2A 1.0 SendMessage with one text/plain intent or application/json discovery filter. Direct message only; no jobs, streaming, quotes, payment or execution. Request schema below describes the transport envelope; the Agent Card and protocol define message parts.",
        "parameters": [
          {
            "name": "A2A-Version",
            "in": "header",
            "required": true,
            "schema": {
              "const": "1.0"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "jsonrpc",
                  "id",
                  "method",
                  "params"
                ],
                "properties": {
                  "jsonrpc": {
                    "const": "2.0"
                  },
                  "id": {
                    "type": [
                      "string",
                      "integer"
                    ]
                  },
                  "method": {
                    "const": "SendMessage"
                  },
                  "params": {
                    "type": "object"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Read-only discovery JSON-RPC result or protocol error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "description": "Untrusted origin.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "413": {
            "description": "Request exceeds 64 KiB.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "415": {
            "description": "JSON content type required.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "description": "Transport rate limit.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "description": "Transport unavailable; no payment or execution.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/agent-card.json": {
      "get": {
        "operationId": "a2aAgentCard",
        "summary": "A2A discovery-only Agent Card",
        "responses": {
          "200": {
            "description": "Canonical A2A 1.0 supported interface and discovery skill.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "name",
                    "supportedInterfaces",
                    "skills"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "machineGuide",
        "responses": {
          "200": {
            "description": "Machine-first instructions.",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
