/**
 * Curated HTTP / OpenAPI surface for the root landing page (`GET /`) in every
 * deployment mode.
 *
 * Full contract lives in `openapi.yaml` on the same host; this list is a
 * compact orientation for humans and agents. Sandbox-only routes are included
 * only when `mode === "sandbox"`.
 *
 * CLI orientation lives in `cli_overview.ts` — this module covers only the
 * HTTP/REST surface of this host.
 */
const SHARED_LINKS = [
    { label: "MCP server reference", href: "https://neotoma.io/mcp" },
    { label: "Developer documentation", href: "https://neotoma.io/docs" },
];
const BASE_ROUTES = [
    { method: "GET", path: "/health", description: "Liveness probe (JSON)." },
    {
        method: "GET",
        path: "/server-info",
        description: "Resolved HTTP port, base URL, and MCP URL for this deployment.",
    },
    {
        method: "GET",
        path: "/",
        description: "This landing page. Send `Accept: application/json` (default for generic clients), `Accept: text/html`, or `Accept: text/markdown`.",
    },
    {
        method: "GET",
        path: "/openapi.yaml",
        description: "Full OpenAPI 3 description of HTTP routes.",
    },
    {
        method: "GET",
        path: "/openapi_actions.yaml",
        description: "OpenAPI subset aligned with MCP tool names.",
    },
    {
        method: "GET",
        path: "/.well-known/mcp/server-card.json",
        description: "Static MCP server card (tools/resources list, no DB access).",
    },
    {
        method: "GET",
        path: "/.well-known/oauth-authorization-server",
        description: "OAuth 2.0 authorization server metadata (RFC 8414).",
    },
    {
        method: "GET",
        path: "/.well-known/oauth-protected-resource",
        description: "Protected-resource metadata for MCP authorization (RFC 9728).",
    },
    {
        method: "GET",
        path: "/.well-known/aauth-resource.json",
        description: "AAuth resource metadata for resource-token key discovery.",
    },
    {
        method: "GET",
        path: "/.well-known/jwks.json",
        description: "JWKS referenced by AAuth resource metadata when configured.",
    },
    {
        method: "POST",
        path: "/mcp",
        description: "MCP JSON-RPC over Streamable HTTP (requires MCP client semantics).",
    },
    { method: "GET", path: "/me", description: "Authenticated user profile (Bearer or session)." },
    {
        method: "GET",
        path: "/session",
        description: "Session / attribution introspection for the current caller.",
    },
];
const SANDBOX_ONLY_ROUTES = [
    {
        method: "GET",
        path: "/sandbox/terms",
        description: "Sandbox acceptable-use and data-handling terms (JSON).",
    },
    {
        method: "POST",
        path: "/sandbox/report",
        description: "Submit sandbox abuse or sensitive-data reports (JSON body; rate-limited).",
    },
];
const INTRO_BY_MODE = {
    sandbox: "Beyond MCP, this host exposes the same Neotoma product over HTTPS: discovery documents, OpenAPI specs, health checks, and sandbox-only policy surfaces. Prefer MCP for agent workflows; use HTTP when you are driving curl, a browser, or a service that speaks REST.",
    personal: "Beyond MCP, this host exposes the same Neotoma product over HTTPS: discovery documents, OpenAPI specs, and health checks. Prefer MCP for agent workflows; use HTTP when you are driving curl, a browser, or a service that speaks REST.",
    prod: "Beyond MCP, this host exposes the same Neotoma product over HTTPS: discovery documents, OpenAPI specs, and health checks. Prefer MCP for agent workflows; use HTTP when you are driving curl, a browser, or a service that speaks REST.",
    local: "Beyond MCP, this host exposes the same Neotoma product over HTTP on this machine: discovery documents, OpenAPI specs, and health checks. Prefer MCP for agent workflows; use HTTP when you are driving curl, a browser, or a local script.",
};
const OPENAPI_NOTE = "Machine-readable API contracts are served from the same origin as this page:";
/**
 * HTTP / OpenAPI orientation for the root landing, tailored to deployment mode.
 */
export function buildHttpApiOverviewForMode(mode) {
    const routes = mode === "sandbox"
        ? [...BASE_ROUTES.slice(0, 8), ...SANDBOX_ONLY_ROUTES, ...BASE_ROUTES.slice(8)]
        : [...BASE_ROUTES];
    return {
        intro: INTRO_BY_MODE[mode],
        openapiNote: OPENAPI_NOTE,
        routes,
        links: SHARED_LINKS,
    };
}
/** @deprecated Prefer {@link buildHttpApiOverviewForMode} with `"sandbox"`. */
export const ROOT_LANDING_HTTP_API_OVERVIEW_SANDBOX = buildHttpApiOverviewForMode("sandbox");
//# sourceMappingURL=http_api_overview.js.map