{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "CockpitOS API capabilities snapshot (KI / MCP / AgencyOS)",
  "version": "1.0.0",
  "generatedNote": "Ergänzend zur menschlichen Doku. Bei API-Änderungen diese Datei und ki-website-builder-cockpit-sync-konzept.md abstimmen.",
  "documentation": {
    "baseUrl": "https://docs.cockpit-os.de",
    "conceptPage": "/developer-guide/ki-website-builder-cockpit-sync-konzept",
    "agencyosGuide": "/developer-guide/api-agencyos-integration",
    "publicApiContract": "/developer-guide/public-center-website-api-vertrag",
    "openApiAgencyos": "/openapi/agencyos-integration.yaml",
    "openApiPublicWayfinding": "/openapi/public-wayfinding-read.yaml"
  },
  "dashboard": {
    "productionBaseUrl": "https://dashboard.cockpit-os.de",
    "localDefault": "http://localhost:3000"
  },
  "identity": {
    "centerId": "UUID of ShoppingCenter.id in Cockpit database (not Google Place ID)",
    "resolveSlug": "GET {dashboard}/api/centers/by-slug/{slug} (public read, CORS *)"
  },
  "capabilities": [
    {
      "id": "agencyos.magic_link.create",
      "method": "POST",
      "path": "/api/agencyos/magic-link",
      "auth": "none_body_only",
      "summary": "Magic Link anfordern (Integration-Name, optional returnUrl)"
    },
    {
      "id": "agencyos.magic_link.poll",
      "method": "GET",
      "path": "/api/agencyos/magic-link",
      "auth": "none_query_token",
      "summary": "Status poll bis API-Key verfügbar"
    },
    {
      "id": "agencyos.v1.centers.list_create",
      "method": "GET|POST",
      "path": "/api/agencyos/v1/centers",
      "auth": "bearer_agencyos",
      "summary": "Center auflisten / anlegen (Scope gemäß Key)"
    },
    {
      "id": "agencyos.v1.center.read_patch",
      "method": "GET|PATCH",
      "path": "/api/agencyos/v1/centers/{centerId}",
      "auth": "bearer_agencyos",
      "summary": "Einzelnes Center lesen oder Metadaten patchen"
    },
    {
      "id": "agencyos.v1.context",
      "method": "GET",
      "path": "/api/agencyos/v1/centers/{centerId}/context",
      "auth": "bearer_agencyos",
      "summary": "KI-Kontext: center, shops, services, editorial, categories, chains; optional floors_summary (kompakte Centerplan‑Metrik ohne mapSvg‑Body — Query include, limits)"
    },
    {
      "id": "agencyos.v1.content.push",
      "method": "POST",
      "path": "/api/agencyos/v1/content/push",
      "auth": "bearer_agencyos",
      "summary": "Upsert shops, events, news, offers, services; body.centerId Pflicht; idempotent via metadata"
    },
    {
      "id": "agencyos.v1.content.push_preview",
      "method": "POST",
      "path": "/api/agencyos/v1/content/push/preview",
      "auth": "bearer_agencyos",
      "summary": "Dry-run: gleicher Body wie push, keine DB-Writes; previewPlan"
    },
    {
      "id": "public.center_by_slug",
      "method": "GET",
      "path": "/api/centers/by-slug/{slug}",
      "auth": "public_read",
      "summary": "Slug → center id + URLs für Website"
    },
    {
      "id": "public.center_by_domain",
      "method": "GET",
      "path": "/api/centers/by-domain",
      "auth": "public_read",
      "summary": "Custom Domain → Center-Auflösung"
    },
    {
      "id": "public.visitor_surface",
      "method": "GET",
      "path": "/api/centers/{centerId}/public-visitor-surface",
      "auth": "public_read",
      "summary": "Whitelist Surface für Companion/Website (siehe Public API Vertrag)"
    }
  ],
  "mcpServer": {
    "packagePath": "packages/mcp-cockpit-os",
    "version": "0.3.0",
    "note": "Stdio-MCP: öffentliche Website-Reads inkl. page-content, category-themes-for-website, offices + AgencyOS Context/Preview/Push; Push nur mit COCKPIT_ALLOW_CONTENT_PUSH=1. Wayfinding-Tool liefert Hybrid- und klassische SVG-Pläne (mapSvg, optional mapImage, shopViewBoxes) über GET /api/wayfinding/floors.",
    "env": [
      "COCKPIT_DASHBOARD_BASE_URL",
      "COCKPIT_AGENCYOS_API_KEY",
      "COCKPIT_ALLOW_CONTENT_PUSH"
    ],
    "publicToolPrefixes": ["cockpit_public_"],
    "agencyosToolPrefixes": ["cockpit_agencyos_"]
  },
  "notInThisManifest": {
    "note": "Vollständige öffentliche Routen (shops, news, hotpicks, GET wayfinding/floors, …) siehe public-center-website-api-vertrag.md — OpenAPI-Snapshot ohne Key: documentation.openApiPublicWayfinding",
    "wordpressPush": "/api/wordpress/push-content (separate Doku api-wordpress-push-content)",
    "dashboardUiOnly": "Viele /api/dashboard/* und Session-Routen sind nicht für anonyme KI-Clients gedacht"
  }
}
