{
  "openapi": "3.1.0",
  "info": {
    "title": "AMOF Public Metadata API",
    "version": "2026-05-31",
    "summary": "Read-only public metadata contract for amof.dev.",
    "description": "This draft exposes public AMOF metadata only. It does not expose agent execution, repo intake, auth, pricing, or internal control-plane routes.",
    "license": {
      "name": "Apache-2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    }
  },
  "servers": [
    {
      "url": "https://amof.dev",
      "description": "Canonical public AMOF homepage"
    }
  ],
  "tags": [
    {
      "name": "public-metadata",
      "description": "Static, mock-safe public metadata for the AMOF homepage and docs."
    }
  ],
  "security": [],
  "paths": {
    "/healthz": {
      "get": {
        "tags": ["public-metadata"],
        "summary": "Public metadata surface health",
        "operationId": "getHealthz",
        "responses": {
          "200": {
            "description": "The public metadata surface is available.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthzResponse"
                },
                "example": {
                  "status": "ok",
                  "surface": "public-metadata",
                  "execution_api": "not_in_this_slice"
                }
              }
            }
          },
          "404": {
            "description": "The requested public metadata endpoint was not found."
          }
        }
      }
    },
    "/version": {
      "get": {
        "tags": ["public-metadata"],
        "summary": "Public AMOF version metadata",
        "operationId": "getVersion",
        "responses": {
          "200": {
            "description": "Current public AMOF version metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VersionResponse"
                },
                "example": {
                  "product": "AMOF",
                  "public_cli_version": "v3.0.0",
                  "api_contract_version": "2026-05-31",
                  "homepage": "https://amof.dev",
                  "git_repo": "https://github.com/marekhotshot/amof",
                  "install": {
                    "method": "pipx",
                    "command": "pipx install \"git+https://github.com/marekhotshot/amof.git@v3.0.0\""
                  }
                }
              }
            }
          },
          "404": {
            "description": "The requested public metadata endpoint was not found."
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "tags": ["public-metadata"],
        "summary": "OpenAPI document for the public metadata surface",
        "operationId": "getOpenApiDocument",
        "responses": {
          "200": {
            "description": "The OpenAPI document for this public metadata API."
          },
          "404": {
            "description": "The requested public metadata endpoint was not found."
          }
        }
      }
    },
    "/v1/releases/latest": {
      "get": {
        "tags": ["public-metadata"],
        "summary": "Latest public release metadata",
        "operationId": "getLatestRelease",
        "responses": {
          "200": {
            "description": "Latest public CLI release and install metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LatestReleaseResponse"
                },
                "example": {
                  "version": "v3.0.0",
                  "published_at": "2026-05-30",
                  "install_command": "pipx install \"git+https://github.com/marekhotshot/amof.git@v3.0.0\"",
                  "release_notes_url": "https://github.com/marekhotshot/amof/blob/main/CHANGELOG.md",
                  "docs_url": "https://github.com/marekhotshot/amof/tree/main/docs"
                }
              }
            }
          },
          "404": {
            "description": "The requested public metadata endpoint was not found."
          }
        }
      }
    },
    "/v1/providers/templates": {
      "get": {
        "tags": ["public-metadata"],
        "summary": "Public provider setup templates",
        "operationId": "getProviderTemplates",
        "responses": {
          "200": {
            "description": "Read-only provider template metadata aligned with the public CLI setup flow.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProviderTemplatesResponse"
                },
                "example": {
                  "templates": [
                    {
                      "id": "openrouter",
                      "provider": "openrouter",
                      "lane": "planner",
                      "model_family": "openai-compatible",
                      "status": "setup_profile_only"
                    },
                    {
                      "id": "local-qwen",
                      "provider": "local",
                      "lane": "worker",
                      "model_family": "openai-compatible",
                      "status": "template_only_until_runner_profile_is_configured"
                    },
                    {
                      "id": "openai",
                      "provider": "openai",
                      "lane": "planner",
                      "model_family": "openai-compatible",
                      "status": "setup_profile_only"
                    },
                    {
                      "id": "anthropic",
                      "provider": "anthropic",
                      "lane": "planner",
                      "model_family": "anthropic",
                      "status": "setup_profile_only"
                    },
                    {
                      "id": "bedrock",
                      "provider": "bedrock",
                      "lane": "planner",
                      "model_family": "anthropic-bedrock",
                      "status": "setup_profile_only"
                    },
                    {
                      "id": "xai",
                      "provider": "xai",
                      "lane": "planner",
                      "model_family": "openai-compatible",
                      "status": "template_only_until_provider_resolver_support"
                    },
                    {
                      "id": "runpod",
                      "provider": "runpod",
                      "lane": "heavy-lane",
                      "model_family": "openai-compatible",
                      "status": "profile_resolver_supported"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The requested public metadata endpoint was not found."
          }
        }
      }
    },
    "/v1/public-capabilities": {
      "get": {
        "tags": ["public-metadata"],
        "summary": "Public AMOF capability summary",
        "operationId": "getPublicCapabilities",
        "responses": {
          "200": {
            "description": "Bounded public capability summary for AMOF.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCapabilitiesResponse"
                },
                "example": {
                  "capabilities": [
                    "installable_cli",
                    "runtime_context_selection",
                    "governed_intake",
                    "runner_registry",
                    "execution_scan_report",
                    "bounded_loops",
                    "run_inspection",
                    "runtime_logs_contract",
                    "receipts_and_evidence"
                  ],
                  "non_goals": [
                    "autonomous_mutation_dispatch",
                    "silent_local_fallback",
                    "raw_secret_or_prompt_exposure"
                  ],
                  "notes": [
                    "AMOF 3.0 Runtime Authority is released as v3.0.0.",
                    "Execution scan/report and bounded loops remain public bounded behavior without remote dispatch.",
                    "Missing provider cost remains unknown/null and is never rewritten as 0.0.",
                    "Public surfaces exclude secrets, raw prompts, raw provider generation IDs, and private topology."
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The requested public metadata endpoint was not found."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HealthzResponse": {
        "type": "object",
        "required": ["status", "surface", "execution_api"],
        "properties": {
          "status": {
            "type": "string",
            "const": "ok"
          },
          "surface": {
            "type": "string",
            "const": "public-metadata"
          },
          "execution_api": {
            "type": "string",
            "const": "not_in_this_slice"
          }
        },
        "additionalProperties": false
      },
      "InstallReference": {
        "type": "object",
        "required": ["method", "command"],
        "properties": {
          "method": {
            "type": "string"
          },
          "command": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "VersionResponse": {
        "type": "object",
        "required": [
          "product",
          "public_cli_version",
          "api_contract_version",
          "homepage",
          "git_repo",
          "install"
        ],
        "properties": {
          "product": {
            "type": "string",
            "const": "AMOF"
          },
          "public_cli_version": {
            "type": "string"
          },
          "api_contract_version": {
            "type": "string"
          },
          "homepage": {
            "type": "string",
            "format": "uri"
          },
          "git_repo": {
            "type": "string",
            "format": "uri"
          },
          "install": {
            "$ref": "#/components/schemas/InstallReference"
          }
        },
        "additionalProperties": false
      },
      "LatestReleaseResponse": {
        "type": "object",
        "required": [
          "version",
          "published_at",
          "install_command",
          "release_notes_url",
          "docs_url"
        ],
        "properties": {
          "version": {
            "type": "string"
          },
          "published_at": {
            "type": "string",
            "format": "date"
          },
          "install_command": {
            "type": "string"
          },
          "release_notes_url": {
            "type": "string",
            "format": "uri"
          },
          "docs_url": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": false
      },
      "ProviderTemplate": {
        "type": "object",
        "required": ["id", "provider", "lane", "model_family", "status"],
        "properties": {
          "id": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "lane": {
            "type": "string"
          },
          "model_family": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "ProviderTemplatesResponse": {
        "type": "object",
        "required": ["templates"],
        "properties": {
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProviderTemplate"
            }
          }
        },
        "additionalProperties": false
      },
      "PublicCapabilitiesResponse": {
        "type": "object",
        "required": ["capabilities", "non_goals", "notes"],
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "non_goals": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      }
    }
  }
}
