{"openapi":"3.1.0","info":{"title":"3cors-service","version":"1.0.0"},"paths":{"/api/v1/specifications/follow-up-proposals":{"get":{"tags":["specifications"],"summary":"List My Followup Proposals","description":"List the caller's own specs' CorC follow-up proposals, newest-first.\n\nOwner-scoped human-read surface backing the interviewer CorC \"new findings\"\nbadge. The underlying service-key client bypasses RLS, so the repository\nscopes the read to the caller's own spec ids in app code (see\n``FollowupProposalRepository.list_for_owner``) — a foreign user gets an\nempty list, never another tenant's proposals (AC-5).\n\nHuman-only surface: a service-principal JWT resolves to the shared\n``SERVICE_PRINCIPAL_ID`` sentinel, so listing \"its\" proposals would be a\ncross-tenant footgun if any spec were ever owned by that sentinel. Reject\nservice principals outright (red-team #4, defense-in-depth) — this badge\nfeature has no legitimate service caller.","operationId":"list_my_followup_proposals_api_v1_specifications_follow_up_proposals_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/follow-up-proposals/{proposal_id}":{"patch":{"tags":["specifications"],"summary":"Set Followup Status","description":"Setze eine Follow-up-Frage auf offen / beantwortet / verworfen.\n\nOwner-scoped wie der Lese-Pfad daneben: der Service-Key-Client umgeht RLS,\ndie Ownership wird deshalb in App-Code erzwungen (siehe\n``FollowupProposalRepository.set_status``). Eine fremde Frage trifft keine\nZeile und liefert **404** — nicht 403, damit die Existenz fremder Fragen\nkein Orakel wird (gleiche Linie wie ``_readable_spec``).\n\nMenschliche Flaeche: ein Service-Principal hat hier nichts zu entscheiden,\nund ein geteilter ``SERVICE_PRINCIPAL_ID``-Sentinel waere ein\nCross-Tenant-Fussangel. Deshalb abgewiesen, wie beim Listen-Endpunkt.\n\nDer Pfad steht **hinter** ``/follow-up-proposals`` im selben Router, damit\ndie statische Route weiterhin vor ``/{spec_id}`` der Specifications\ngewinnt (Rule 88 — FastAPI matcht in Registrierungsreihenfolge).","operationId":"set_followup_status_api_v1_specifications_follow_up_proposals__proposal_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"proposal_id","in":"path","required":true,"schema":{"type":"string","title":"Proposal Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowupStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/events":{"get":{"tags":["prd-events"],"summary":"List Prd Events","description":"The history: every recorded change, chronologically (git log).","operationId":"list_prd_events_api_v1_specifications__spec_id__events_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Prd Events Api V1 Specifications  Spec Id  Events Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/project":{"get":{"tags":["prd-events"],"summary":"Project Prd","description":"The state at a point in the log (git checkout).\n\n``at_version`` omitted = current head. A spec with no events at all\nprojects from the column, which keeps pre-Slice-C specs readable.","operationId":"project_prd_api_v1_specifications__spec_id__project_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}},{"name":"at_version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"At Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Project Prd Api V1 Specifications  Spec Id  Project Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/tags":{"post":{"tags":["prd-events"],"summary":"Create Prd Tag","description":"A named snapshot at the current log position (git tag).","operationId":"create_prd_tag_api_v1_specifications__spec_id__tags_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTagRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Prd Tag Api V1 Specifications  Spec Id  Tags Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/fork":{"post":{"tags":["prd-events"],"summary":"Fork Prd","description":"Branch a variant off a point in the log (git branch).","operationId":"fork_prd_api_v1_specifications__spec_id__fork_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Fork Prd Api V1 Specifications  Spec Id  Fork Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/revert":{"post":{"tags":["prd-events"],"summary":"Revert Prd","description":"Take a step back (git revert) — appended, never deleted.\n\nThe undo is itself an event; the column is rewritten from the projection\nthat results, so log and column stay one source.","operationId":"revert_prd_api_v1_specifications__spec_id__revert_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevertRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revert Prd Api V1 Specifications  Spec Id  Revert Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/suggestions/{suggestion_id}/estimate":{"post":{"tags":["prd-suggestions"],"summary":"Estimate Suggestion","description":"Was wuerde der Vorschlag kosten? Keine Reservierung, kein LLM-Aufruf.","operationId":"estimate_suggestion_api_v1_specifications__spec_id__suggestions__suggestion_id__estimate_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}},{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","title":"Suggestion Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Estimate Suggestion Api V1 Specifications  Spec Id  Suggestions  Suggestion Id  Estimate Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/suggestions/{suggestion_id}/draft":{"post":{"tags":["prd-suggestions"],"summary":"Draft Suggestion","description":"Der Agent entwirft den Abschnitt. Fuehrt den LLM-Aufruf aus, schreibt NICHT.","operationId":"draft_suggestion_api_v1_specifications__spec_id__suggestions__suggestion_id__draft_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}},{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","title":"Suggestion Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Draft Suggestion Api V1 Specifications  Spec Id  Suggestions  Suggestion Id  Draft Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/suggestions/{suggestion_id}/apply":{"post":{"tags":["prd-suggestions"],"summary":"Apply Suggestion","description":"Der Nutzer uebernimmt den Entwurf — der EINZIGE Schreibpfad des Slices.","operationId":"apply_suggestion_api_v1_specifications__spec_id__suggestions__suggestion_id__apply_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}},{"name":"suggestion_id","in":"path","required":true,"schema":{"type":"string","title":"Suggestion Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplySuggestionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Apply Suggestion Api V1 Specifications  Spec Id  Suggestions  Suggestion Id  Apply Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications":{"post":{"tags":["specifications"],"summary":"Create Specification","operationId":"create_specification_api_v1_specifications_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecificationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["specifications"],"summary":"List Specifications","operationId":"list_specifications_api_v1_specifications_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["specifications"],"summary":"Delete All Specifications","operationId":"delete_all_specifications_api_v1_specifications_delete","security":[{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/specifications/corim-versions":{"get":{"tags":["specifications"],"summary":"List Corim Target Versions","description":"List supported CorIM target schema versions + the default.\n\nPowers the version-picker dropdown in the Export-to-CorIM modal.\nSourced from CorIM's ``GET /v1/corim/spec-versions`` via the dynamic\nregistry (``app/services/corim_version_discovery.py``), forwarding the\ncaller's own bearer; falls back to the builder's static\n``SUPPORTED_VERSIONS`` / ``DEFAULT_TARGET_VERSION`` constants (see the\nfallback header in ``app/services/corim_bundle_builder.py``) when CorIM\nis unreachable.","operationId":"list_corim_target_versions_api_v1_specifications_corim_versions_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/specifications/{spec_id}":{"get":{"tags":["specifications"],"summary":"Get Specification","operationId":"get_specification_api_v1_specifications__spec_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["specifications"],"summary":"Update Specification","operationId":"update_specification_api_v1_specifications__spec_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecificationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["specifications"],"summary":"Delete Specification","operationId":"delete_specification_api_v1_specifications__spec_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/testing-readiness":{"get":{"tags":["specifications"],"summary":"Testing Readiness","description":"The checklist BEFORE the click (E6).\n\nSame function as the enforcement path on purpose — a preview that says\n\"ready\" followed by a 409 would be worse than showing nothing.","operationId":"testing_readiness_api_v1_specifications__spec_id__testing_readiness_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/export-corim-bundle-preview":{"get":{"tags":["specifications"],"summary":"Export Corim Bundle Preview","description":"Pre-export preview: element counts + scope note without building the\nfull bundle.\n\nAllows the frontend to show \"this export will contain N Goals, M\nActors, …\" before the user commits to the download. Addresses the QA\ngap raised 2026-05-21 (\"wie soll ein User wissen was importiert wird\").","operationId":"export_corim_bundle_preview_api_v1_specifications__spec_id__export_corim_bundle_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}},{"name":"version","in":"query","required":false,"schema":{"type":"string","description":"Target CorIM schema version (latest registered)","default":"v0.74.0","title":"Version"},"description":"Target CorIM schema version (latest registered)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/export-corim-bundle":{"post":{"tags":["specifications"],"summary":"Export Corim Bundle","description":"Export a specification as a CorIM Import-Pipeline-ready bundle.\n\nReturns ``{model_json, log_json, manifest}`` matching the shape that\n3cors-corim's ``POST /v1/corim/instances/import`` endpoint accepts.\n\nMVP scope: produces a minimal valid bundle with the spec's title +\ndescription seeded as a single Goal. Full deterministic projection\nof the spec's stored context (Actors / UseCases / Requirements /\nTestCases) is a follow-up slice.\n\nErrors:\n    - 400 if ``version`` is not in the supported set\n    - 404 if the spec does not exist or the caller is not the owner","operationId":"export_corim_bundle_api_v1_specifications__spec_id__export_corim_bundle_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}},{"name":"version","in":"query","required":false,"schema":{"type":"string","description":"Target CorIM schema version (latest registered)","default":"v0.74.0","title":"Version"},"description":"Target CorIM schema version (latest registered)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/completeness":{"get":{"tags":["specifications"],"summary":"Get Spec Completeness","description":"Return the spec's completeness score + section breakdown + orphans\n+ recommendations.\n\nDeterministic: parses ``problem_description`` markdown and counts\nsection presence + cross-section orphans (per the\nVision→Goal→UseCase→Requirement→TestCase traceability chain).\n\nErrors:\n    - 404 if the spec does not exist or the caller is not the owner","operationId":"get_spec_completeness_api_v1_specifications__spec_id__completeness_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/evaluation-bundle":{"get":{"tags":["specifications"],"summary":"Get Evaluation Bundle","description":"Evaluation bundle for a tested spec (Contract 1, CorC 2.A).\n\nBoth auth paths are workspace-scoped fail-closed against cross-workspace\nIDOR: service principal uses a workspace-scoped by-id lookup, human owner\nuses ``_readable_spec`` (creator OR workspace member); the row's\n``workspace_id`` must then equal the requested one (a NULL-workspace spec\nnever matches) → 404 before the tested check (no 403, no existence oracle).\n409 when ``status != tested``.","operationId":"get_evaluation_bundle_api_v1_specifications__spec_id__evaluation_bundle_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/{spec_id}/follow-up-proposals":{"post":{"tags":["specifications"],"summary":"Create Follow Up Proposals","description":"Persist CorC follow-up proposals for a spec (Contract 2, CorC 2.A).\n\nService-only (``require_service_principal`` 403s human callers). Existence\nis checked via a workspace-scoped lookup (the caller is a service role, not\nthe owner) → 404 for an unknown ``spec_id`` OR a spec in another workspace\n(fail-closed against the cross-workspace IDOR — no cross-tenant write).\nWrites are idempotent per ``(specification_id, run_id, question_id)``; a\nrepeated triple returns in ``already_existed``.","operationId":"create_follow_up_proposals_api_v1_specifications__spec_id__follow_up_proposals_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","minLength":1,"title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FollowUpProposalsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/generate-from-pack":{"post":{"tags":["specifications"],"summary":"Generate From Pack","description":"Generate domain-relevant spec markdown from a pack via the Budget Proxy (Rule 18).\n\nReturns ``{problem_description}`` — the generated markdown. Does NOT persist a\nspec; the caller creates it via ``POST /specifications``. All LLM access goes\nthrough :class:`ProtectedAIClient` (reserve → call → confirm).","operationId":"generate_from_pack_api_v1_specifications_generate_from_pack_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateFromPackRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/specifications/{spec_id}/send-to-corim":{"post":{"tags":["specifications"],"summary":"Send To Corim","description":"Direct handoff: import this spec into CorIM and return the deep-link.\n\nReuses the existing ``build_corim_bundle`` + CorIM's existing import endpoint\n(``/v1/corim/instances/import``) with the user's own bearer forwarded. On any\nfailure no instance is created and the export-download stays available.\n\nThe target version is the dynamic registry's current/default (so this\none-click path auto-advances when CorIM ships a new schema-backed version\n— no code change per release), falling back to the static\n``DEFAULT_TARGET_VERSION`` when CorIM is unreachable.","operationId":"send_to_corim_api_v1_specifications__spec_id__send_to_corim_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"spec_id","in":"path","required":true,"schema":{"type":"string","title":"Spec Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/specifications/import-document":{"post":{"tags":["specifications"],"summary":"Import Document","description":"Create a specification from a filed document's text.\n\nAuth is TWO checks, and the second is the load-bearing one.\n``get_current_user`` proves the bearer is a valid GoTrue token — CorDoc\nforwards the END USER's own, so there is no service-token path to invent.\nBut identity is not authorisation: ``require_workspace_member`` is what\nstops a caller writing into someone else's workspace, and nothing behind it\nwould (this module's Supabase client holds the SERVICE key, so RLS never\nfires). Do not remove it on the grounds that the JWT was checked.\n\nWithout it any holder of a valid GoTrue JWT could POST straight here,\nbypassing CorDoc, and seed a foreign workspace: ``list_visible`` shows the\nrow to every member there, it feeds the Interviewer's BILLED LLM paths\n(prompt-injection carrier) and ``domain_events`` gains entries under a\nforeign actor. Red-team, 2026-09-04 (HIGH). The check is shared with\n``POST \"\"`` and ``/from-canvas`` since the hardening of 2026-10;\n``allow_service=False`` keeps this route human-only, as it always was.\n\nWrites through ``create_via_log`` exactly like ``POST \"\"``:\n``problem_description`` is the event log's projection, never taken from the\nbody directly.","operationId":"import_document_api_v1_specifications_import_document_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportDocumentRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Import Document Api V1 Specifications Import Document Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/specifications/from-canvas":{"post":{"tags":["specifications"],"summary":"Import Canvas","description":"Aus einer gespeicherten Zeichnung eine Spezifikation machen.\n\nDie Reihenfolge ist die Aussage: erst die Mitgliedschaft (403), dann die\nSzene (422, wenn sie keinen lesbaren Text traegt), dann — nur auf Wunsch —\ndas Modell. Geschrieben wird ausschliesslich ueber `create_via_log`\n(Rule 87); `problem_description` ist die Projektion des Ereignislogs, nie\nein Wert aus dem Body.\n\nDie Mitgliedschaft ist die EINZIGE Autorisierung: `get_current_user` prueft\nnur die JWT-Signatur, und `supabase` haelt den SERVICE-Key (kein RLS). Ohne\nsie saete jeder Token-Inhaber Spezifikationen in fremde Workspaces —\nsichtbar fuer alle Mitglieder dort und Prompt-Injection-Traeger in FREMD\nBEZAHLTE Verarbeitung (rotes Team, 2026-09-04, HIGH). Seit der Haertung\n2026-10 teilt sie sich die Pruefung mit `POST \"\"` und `/import-document`;\n`allow_service=False` haelt den Weg wie bisher nur fuer Menschen offen.","operationId":"import_canvas_api_v1_specifications_from_canvas_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportCanvasRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Import Canvas Api V1 Specifications From Canvas Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/auth/login":{"post":{"summary":"Login","description":"Authenticate a user and return access credentials.\n\nThis endpoint handles user login authentication with email and password.\n\nArgs:\n    credentials: Login credentials (email and password)\n\nReturns:\n    LoginResponse containing access token and user information\n\nRaises:\n    HTTPException: 401 if credentials are invalid","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/register":{"post":{"summary":"Register","description":"Register a new user account.\n\nThis endpoint handles new user registration. Currently returns\na placeholder response - full implementation pending.\n\nReturns:\n    Dictionary containing registration status message.\n\nNote:\n    This endpoint is a placeholder for future implementation with\n    Supabase Auth integration.","operationId":"register_api_v1_auth_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Register Api V1 Auth Register Post"}}}}}}},"/api/v1/auth/me":{"get":{"summary":"Get Current User","description":"Get current authenticated user information.\n\nThis endpoint returns the current user's information based on the\nprovided authentication token.\n\nArgs:\n    current_user: Current user from JWT token (injected by dependency)\n\nReturns:\n    UserInfo containing current user details\n\nRaises:\n    HTTPException: 401 if token is invalid or user not found","operationId":"get_current_user_api_v1_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfo"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/quality/analyze":{"post":{"tags":["quality"],"summary":"Analyze Specification Quality","description":"Analyze the quality of a specification.\n\nPerforms comprehensive quality analysis including completeness scoring,\nconsistency validation, complexity prediction, and generates\nimprovement suggestions.\n\nArgs:\n    request: Quality analysis request with specification ID.\n    background_tasks: FastAPI background tasks handler.\n\nReturns:\n    Dictionary containing success status, message, and analysis data.\n\nRaises:\n    HTTPException: If specification not found (404) or analysis fails (500).","operationId":"analyze_specification_quality_api_v1_quality_analyze_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualityAnalysisRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Analyze Specification Quality Api V1 Quality Analyze Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/quality/report/{specification_id}":{"get":{"tags":["quality"],"summary":"Get Quality Report","description":"Retrieve existing quality report for a specification.\n\nReturns the most recent quality analysis results if available.\n\nArgs:\n    specification_id: The ID of the specification.\n\nReturns:\n    Dictionary containing success status, message, and report data.\n\nRaises:\n    HTTPException: If quality report not found (404) or retrieval fails (500).","operationId":"get_quality_report_api_v1_quality_report__specification_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"specification_id","in":"path","required":true,"schema":{"type":"string","title":"Specification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Quality Report Api V1 Quality Report  Specification Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/quality/analyze-content":{"post":{"tags":["quality"],"summary":"Analyze Specification Content","description":"Analyze raw text content for quality metrics.\n\nAnalyzes free-form text input and returns quality scores based on\ncontent length, structure, clarity, and completeness indicators.\n\nArgs:\n    request: Raw content request with text and optional title.\n\nReturns:\n    Dictionary containing success status, message, and analysis data.","operationId":"analyze_specification_content_api_v1_quality_analyze_content_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RawContentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Analyze Specification Content Api V1 Quality Analyze Content Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/quality/health":{"get":{"tags":["quality"],"summary":"Quality Analysis Health Check","description":"Health check endpoint for quality analysis service.\n\nTests that all quality analysis components can be initialized\nand perform basic analysis.\n\nReturns:\n    Dictionary containing health status and test results.\n\nRaises:\n    HTTPException: If service is unhealthy (503).","operationId":"quality_analysis_health_check_api_v1_quality_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Quality Analysis Health Check Api V1 Quality Health Get"}}}}}}},"/api/v1/quality/metrics/{specification_id}":{"get":{"tags":["quality"],"summary":"Get Quality Metrics","description":"Get simplified quality metrics for dashboard display.\n\nReturns key quality indicators in a format suitable for charts\nand dashboards.\n\nArgs:\n    specification_id: The ID of the specification.\n\nReturns:\n    Dictionary containing success status, message, and metrics data.\n\nRaises:\n    HTTPException: If specification not found (404) or retrieval fails (500).","operationId":"get_quality_metrics_api_v1_quality_metrics__specification_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"specification_id","in":"path","required":true,"schema":{"type":"string","title":"Specification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Quality Metrics Api V1 Quality Metrics  Specification Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/quality/analyze-batch":{"post":{"tags":["quality"],"summary":"Analyze Specifications Batch","description":"Analyze multiple specifications in batch.\n\nPerforms quality analysis on multiple specifications and returns\naggregated results with batch processing metrics.\n\nArgs:\n    request: Batch analysis request with list of specification IDs.\n\nReturns:\n    Dictionary containing success status, message, and batch results.\n\nRaises:\n    HTTPException: If validation fails (400) or batch analysis fails (500).","operationId":"analyze_specifications_batch_api_v1_quality_analyze_batch_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchAnalysisRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Analyze Specifications Batch Api V1 Quality Analyze Batch Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agent":{"post":{"tags":["agent"],"summary":"Chat With Agent","description":"Chat with the AI agent (cost-protected).\n\nAll LLM calls go through Budget Proxy Pattern:\nreserve → LLM → confirm/cancel. Conversation turns are also persisted\nto Foundation's ``/v1/sessions`` store (best-effort, orthogonal to\nbilling) so the frontend can resume after a reload.\n\nArgs:\n    request: Agent request with message and options\n    user: Authenticated user from JWT\n    credentials: Raw bearer credentials, forwarded to Foundation for\n        session persistence (JWT-authenticated, same token as ``user``).\n\nReturns:\n    StreamingResponse for SSE or AgentResponse for non-streaming\n\nRaises:\n    HTTPException 402: Insufficient balance or billing error","operationId":"chat_with_agent_api_agent_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/agent/health":{"get":{"tags":["agent"],"summary":"Agent Health","description":"Check agent health status.\n\nReturns:\n    Health status dict","operationId":"agent_health_api_agent_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/cora/chat":{"post":{"tags":["cora"],"summary":"Cora Chat Endpoint","description":"Send a message to the Interviewer CorA copilot and get a text reply.\n\nRead-only: no mutation surface. Rejects service principals (403) since this\nis an owner-scoped, human-only copilot. The raw bearer JWT is forwarded for\nbest-effort session persistence + the CorC run fetch.","operationId":"cora_chat_endpoint_api_cora_chat_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoraChatRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoraChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patented-agent/":{"post":{"tags":["patent-agent"],"summary":"Interact With Patent Agent","description":"Main patent agent interaction endpoint (cost-protected).\n\nAll LLM calls go through the Budget Proxy Pattern via\nProtectedAIClient (reserve -> LLM -> confirm/cancel). Conversation\nturns are also persisted to Foundation's ``/v1/sessions`` store\n(best-effort, orthogonal to billing) so the frontend can resume after\na reload.\n\nArgs:\n    request: Patent agent request with message and context\n    user: Authenticated user from JWT\n    credentials: Raw bearer credentials, forwarded to Foundation for\n        session persistence (JWT-authenticated, same token as ``user``).\n\nReturns:\n    Patent agent response with context and memory updates\n\nRaises:\n    HTTPException 402: Insufficient balance or billing error\n    HTTPException 500: If agent interaction fails","operationId":"interact_with_patent_agent_api_patented_agent__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatentAgentRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatentAgentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patented-agent/context/{user_id}":{"get":{"tags":["patent-agent"],"summary":"Get User Context","description":"Get user context from the adaptive context manager.\n\nArgs:\n    user_id: User identifier\n    max_items: Maximum context items to return\n    min_relevance: Minimum relevance threshold\n\nReturns:\n    User context information and metrics\n    \nRaises:\n    HTTPException: If context retrieval fails","operationId":"get_user_context_api_patented_agent_context__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}},{"name":"max_items","in":"query","required":false,"schema":{"type":"integer","description":"Maximum context items to return","default":10,"title":"Max Items"},"description":"Maximum context items to return"},{"name":"min_relevance","in":"query","required":false,"schema":{"type":"number","description":"Minimum relevance threshold","default":0.5,"title":"Min Relevance"},"description":"Minimum relevance threshold"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get User Context Api Patented Agent Context  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["patent-agent"],"summary":"Update User Context","description":"Update user context with new items.\n\nArgs:\n    user_id: User identifier\n    request: Context update request\n\nReturns:\n    Updated context information\n    \nRaises:\n    HTTPException: If context update fails","operationId":"update_user_context_api_patented_agent_context__user_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update User Context Api Patented Agent Context  User Id  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patented-agent/memory/stats":{"get":{"tags":["patent-agent"],"summary":"Get Memory Statistics","description":"Get living memory statistics.\n\nReturns:\n    Living memory statistics and metrics\n\nRaises:\n    HTTPException: If statistics retrieval fails","operationId":"get_memory_statistics_api_patented_agent_memory_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Memory Statistics Api Patented Agent Memory Stats Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/patented-agent/specification":{"post":{"tags":["patent-agent"],"summary":"Specification Aware Query","description":"Specification-aware query using adaptive RAG.\n\nArgs:\n    request: Specification query request\n    user_id: Optional user identifier\n\nReturns:\n    Specification-aware response with context\n    \nRaises:\n    HTTPException: If specification query fails","operationId":"specification_aware_query_api_patented_agent_specification_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Ignoriert — die Identitaet kommt aus dem Token","title":"User Id"},"description":"Ignoriert — die Identitaet kommt aus dem Token"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecificationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Specification Aware Query Api Patented Agent Specification Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/patented-agent/health":{"get":{"tags":["patent-agent"],"summary":"Health Check","description":"Health check endpoint for patent agent.\n\nReturns:\n    Health status information","operationId":"health_check_api_patented_agent_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Check Api Patented Agent Health Get"}}}}}}},"/api/patented-agent/metrics":{"get":{"tags":["patent-agent"],"summary":"Get System Metrics","description":"Get comprehensive system metrics.\n\nReturns:\n    System performance and usage metrics\n\nRaises:\n    HTTPException: If metrics retrieval fails","operationId":"get_system_metrics_api_patented_agent_metrics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get System Metrics Api Patented Agent Metrics Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/model-router/route":{"post":{"tags":["model-router"],"summary":"Route Model Request","description":"Get model routing decision for a given prompt.\n\nArgs:\n    request: Routing request with prompt and preferences\n    \nReturns:\n    RoutingResponse with selected model and rationale\n    \nRaises:\n    HTTPException: If routing fails","operationId":"route_model_request_api_model_router_route_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RoutingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/model-router/analyze-complexity":{"post":{"tags":["model-router"],"summary":"Analyze Prompt Complexity","description":"Analyze the complexity of a prompt without routing.\n\nArgs:\n    request: Complexity analysis request\n    \nReturns:\n    ComplexityAnalysisResponse with detailed metrics\n    \nRaises:\n    HTTPException: If analysis fails","operationId":"analyze_prompt_complexity_api_model_router_analyze_complexity_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplexityAnalysisRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComplexityAnalysisResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/model-router/stats":{"get":{"tags":["model-router"],"summary":"Get Model Usage Stats","description":"Get model usage statistics and performance metrics.\n\nReturns:\n    ModelStatsResponse with usage statistics\n    \nRaises:\n    HTTPException: If stats retrieval fails","operationId":"get_model_usage_stats_api_model_router_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelStatsResponse"}}}}}}},"/api/model-router/models":{"get":{"tags":["model-router"],"summary":"Get Available Models","description":"Get list of available models by tier.\n\nReturns:\n    Dictionary of available models organized by tier","operationId":"get_available_models_api_model_router_models_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Available Models Api Model Router Models Get"}}}}}}},"/api/model-router/health":{"get":{"tags":["model-router"],"summary":"Model Router Health","description":"Health check endpoint for model router service.\n\nReturns:\n    Health status information","operationId":"model_router_health_api_model_router_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Model Router Health Api Model Router Health Get"}}}}}}},"/api/model-router/insights":{"get":{"tags":["model-router"],"summary":"Get Routing Insights","description":"Get insights and recommendations for model routing optimization.\n\nReturns:\n    Routing insights and optimization recommendations","operationId":"get_routing_insights_api_model_router_insights_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Routing Insights Api Model Router Insights Get"}}}}}}},"/api/drift-detection/scan":{"post":{"tags":["drift-detection"],"summary":"Trigger Drift Scan","description":"Trigger a drift detection scan for a specification.\n\nArgs:\n    request: Drift scan request parameters\n    background_tasks: FastAPI background tasks\n    db: Database session\n    \nReturns:\n    DriftScanResponse with scan details\n    \nRaises:\n    HTTPException: If specification not found or scan fails to start","operationId":"trigger_drift_scan_api_drift_detection_scan_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftScanRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftScanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/drift-detection/report/{specification_id}":{"get":{"tags":["drift-detection"],"summary":"Get Drift Report","description":"Get the latest drift report for a specification.\n\nArgs:\n    specification_id: ID of the specification\n    db: Database session\n    \nReturns:\n    Drift report data\n    \nRaises:\n    HTTPException: If specification not found or no report available","operationId":"get_drift_report_api_drift_detection_report__specification_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"specification_id","in":"path","required":true,"schema":{"type":"string","title":"Specification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Drift Report Api Drift Detection Report  Specification Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/drift-detection/status":{"get":{"tags":["drift-detection"],"summary":"Get Drift Status","description":"Get overall drift detection system status.\n\nArgs:\n    db: Database session\n    \nReturns:\n    DriftStatusResponse with system health metrics and list of specifications with drift","operationId":"get_drift_status_api_drift_detection_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DriftStatusResponse"}}}}}}},"/api/drift-detection/health":{"get":{"tags":["drift-detection"],"summary":"Drift Detection Health","description":"Health check endpoint for drift detection service.\n\nReturns:\n    Health status information","operationId":"drift_detection_health_api_drift_detection_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Drift Detection Health Api Drift Detection Health Get"}}}}}}},"/api/auth/register":{"post":{"tags":["auth"],"summary":"Register","description":"Register new user with email/password.","operationId":"register_api_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/auth/resend-verification":{"post":{"tags":["auth"],"summary":"Resend Verification","description":"Resend email verification.","operationId":"resend_verification_api_auth_resend_verification_post","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","title":"Email"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/users/profile":{"get":{"tags":["users"],"summary":"Get Profile","description":"Get current user's profile.","operationId":"get_profile_api_users_profile_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["users"],"summary":"Update Profile","description":"Update current user's profile.","operationId":"update_profile_api_users_profile_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]},"patch":{"tags":["users"],"summary":"Update Profile","description":"Update current user's profile.","operationId":"update_profile_api_users_profile_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/users/avatar":{"post":{"tags":["users"],"summary":"Upload Avatar","description":"Upload user avatar.","operationId":"upload_avatar_api_users_avatar_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_avatar_api_users_avatar_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/users/settings":{"get":{"tags":["users"],"summary":"Get Settings","description":"Get current user's settings.","operationId":"get_settings_api_users_settings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["users"],"summary":"Update Settings","description":"Update current user's settings.","operationId":"update_settings_api_users_settings_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workspaces":{"get":{"tags":["workspaces"],"summary":"List Workspaces","description":"List workspaces the user belongs to.","operationId":"list_workspaces_api_v1_workspaces_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["workspaces"],"summary":"Create Workspace","description":"Create workspace and add creator as owner.","operationId":"create_workspace_api_v1_workspaces_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workspaces/{workspace_id}":{"get":{"tags":["workspaces"],"summary":"Get Workspace","description":"Get workspace by ID (must be member or admin).","operationId":"get_workspace_api_v1_workspaces__workspace_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["workspaces"],"summary":"Update Workspace","description":"Update workspace (admin+ role required).","operationId":"update_workspace_api_v1_workspaces__workspace_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkspaceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspaces"],"summary":"Delete Workspace","description":"Delete workspace (owner only).","operationId":"delete_workspace_api_v1_workspaces__workspace_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/members":{"get":{"tags":["workspace-members"],"summary":"List Members","description":"List all members of a workspace.","operationId":"list_members_api_v1_workspaces__workspace_id__members_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/members/{member_user_id}":{"patch":{"tags":["workspace-members"],"summary":"Update Member Role","description":"Change a member's role (admin+ only).","operationId":"update_member_role_api_v1_workspaces__workspace_id__members__member_user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["workspace-members"],"summary":"Remove Member","description":"Remove member (admin+), or leave workspace (self).","operationId":"remove_member_api_v1_workspaces__workspace_id__members__member_user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/invitations":{"post":{"tags":["workspace-members"],"summary":"Create Invitation","description":"Invite by email (admin+; ``admin`` only from the owner — E-2, MySpace 6b D-2).","operationId":"create_invitation_api_v1_workspaces__workspace_id__invitations_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["workspace-members"],"summary":"List Invitations","description":"List pending invitations for a workspace.","operationId":"list_invitations_api_v1_workspaces__workspace_id__invitations_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/invitations/{invitation_id}":{"delete":{"tags":["workspace-members"],"summary":"Revoke Invitation","description":"Revoke a pending invitation (admin+ only).","operationId":"revoke_invitation_api_v1_workspaces__workspace_id__invitations__invitation_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","title":"Invitation Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/invitations/accept":{"post":{"tags":["workspace-members"],"summary":"Accept Invitation","description":"Accept an invitation by token.","operationId":"accept_invitation_api_v1_workspaces_invitations_accept_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/workspaces/{workspace_id}/invite-links":{"post":{"tags":["workspace-members"],"summary":"Create Invite Link","description":"Create a shareable invite link (admin+ only).","operationId":"create_invite_link_api_v1_workspaces__workspace_id__invite_links_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLinkRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["workspace-members"],"summary":"List Invite Links","description":"List invite links for a workspace (admin+).","operationId":"list_invite_links_api_v1_workspaces__workspace_id__invite_links_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/{workspace_id}/invite-links/{link_id}":{"delete":{"tags":["workspace-members"],"summary":"Revoke Invite Link","description":"Revoke an invite link (admin+ only).","operationId":"revoke_invite_link_api_v1_workspaces__workspace_id__invite_links__link_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["workspace-members"],"summary":"Update Invite Link","description":"Rename an invite link (admin+ only).","operationId":"update_invite_link_api_v1_workspaces__workspace_id__invite_links__link_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"link_id","in":"path","required":true,"schema":{"type":"string","title":"Link Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLinkRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workspaces/join/{token}":{"post":{"tags":["workspace-members"],"summary":"Join Via Link","description":"Join a workspace via shareable link.","operationId":"join_via_link_api_v1_workspaces_join__token__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workspaces":{"get":{"tags":["admin-workspaces"],"summary":"Admin List Workspaces","description":"List ALL workspaces (admin only).","operationId":"admin_list_workspaces_api_v1_admin_workspaces_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workspaces/{workspace_id}":{"get":{"tags":["admin-workspaces"],"summary":"Admin Get Workspace","description":"View any workspace details + members (admin).","operationId":"admin_get_workspace_api_v1_admin_workspaces__workspace_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/workspaces/{workspace_id}/members/{member_user_id}":{"patch":{"tags":["admin-workspaces"],"summary":"Admin Update Role","description":"Change role in any workspace (admin only).","operationId":"admin_update_role_api_v1_admin_workspaces__workspace_id__members__member_user_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminUpdateRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["admin-workspaces"],"summary":"Admin Remove Member","description":"Remove member from any workspace (admin only).","operationId":"admin_remove_member_api_v1_admin_workspaces__workspace_id__members__member_user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"member_user_id","in":"path","required":true,"schema":{"type":"string","title":"Member User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/bug-report":{"post":{"tags":["feedback"],"summary":"Bug Report","description":"Proxy POST /api/v1/bug-report -> Foundation /v1/bug-report.","operationId":"bug_report_api_v1_bug_report_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/feedback":{"post":{"tags":["feedback"],"summary":"Feedback","description":"Proxy POST /api/v1/feedback -> Foundation /v1/feedback.","operationId":"feedback_api_v1_feedback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Check Health Get"}}}}}}}},"components":{"schemas":{"AcceptInviteRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"AcceptInviteRequest","description":"Accept an invitation by token."},"AdminUpdateRoleRequest":{"properties":{"role":{"type":"string","pattern":"^(viewer|editor|admin)$","title":"Role"}},"type":"object","required":["role"],"title":"AdminUpdateRoleRequest","description":"Change a member's role (admin override)."},"AgentRequest":{"properties":{"message":{"type":"string","maxLength":10000,"minLength":1,"title":"Message"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"stream":{"type":"boolean","title":"Stream","default":true},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Foundation session id to append this turn to. When absent, a session is created on the first turn (best-effort — persistence never blocks the chat response) and the resolved id is returned so the caller can thread it on subsequent turns."},"pack_context":{"anyOf":[{"$ref":"#/components/schemas/PackContext"},{"type":"null"}]}},"type":"object","required":["message"],"title":"AgentRequest","description":"Request model for agent interactions.\n\nAttributes:\n    message: User message to send to the agent\n    conversation_id: Optional conversation session ID\n    stream: Whether to stream the response (default True)\n    workspace_id: Optional workspace scope for ISA-managed agent\n        configuration. When absent the backend falls back to\n        ``resolve_user_workspace`` (the caller's oldest workspace\n        membership). Passing this explicitly is preferred so ISA\n        overrides always resolve to the workspace the user is\n        actively working in."},"ApplySuggestionRequest":{"properties":{"draft_text":{"type":"string","minLength":1,"title":"Draft Text"},"target_section":{"type":"string","minLength":1,"title":"Target Section"}},"type":"object","required":["draft_text","target_section"],"title":"ApplySuggestionRequest","description":"Was der Nutzer in der Vorschau gesehen und bestaetigt hat."},"BatchAnalysisRequest":{"properties":{"specification_ids":{"items":{"type":"string"},"type":"array","maxItems":100,"minItems":1,"title":"Specification Ids"}},"type":"object","required":["specification_ids"],"title":"BatchAnalysisRequest","description":"Request model for batch quality analysis.\n\nAttributes:\n    specification_ids: List of specification IDs to analyze."},"Body_upload_avatar_api_users_avatar_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_avatar_api_users_avatar_post"},"ComplexityAnalysisRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"}},"type":"object","required":["prompt"],"title":"ComplexityAnalysisRequest","description":"Request model for prompt complexity analysis."},"ComplexityAnalysisResponse":{"properties":{"token_count":{"type":"integer","title":"Token Count"},"sentence_count":{"type":"integer","title":"Sentence Count"},"question_count":{"type":"integer","title":"Question Count"},"code_blocks":{"type":"integer","title":"Code Blocks"},"technical_terms":{"type":"integer","title":"Technical Terms"},"reasoning_indicators":{"type":"integer","title":"Reasoning Indicators"},"complexity_score":{"type":"number","title":"Complexity Score"},"analysis_timestamp":{"type":"string","format":"date-time","title":"Analysis Timestamp"}},"type":"object","required":["token_count","sentence_count","question_count","code_blocks","technical_terms","reasoning_indicators","complexity_score","analysis_timestamp"],"title":"ComplexityAnalysisResponse","description":"Response model for complexity analysis."},"ContextRequest":{"properties":{"context_items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Context Items","description":"Context items to add"},"current_query":{"type":"string","title":"Current Query","description":"Current query for relevance scoring","default":""},"user_patterns":{"additionalProperties":true,"type":"object","title":"User Patterns","description":"User behavior patterns"}},"type":"object","required":["context_items"],"title":"ContextRequest","description":"Request model for context updates."},"CoraChatRequest":{"properties":{"message":{"type":"string","maxLength":10000,"minLength":1,"title":"Message"},"specification_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Specification Id"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","required":["message"],"title":"CoraChatRequest","description":"Request to send a message to the Interviewer CorA copilot.\n\nAttributes:\n    message: The user's message.\n    specification_id: Owner-scoped specification the chat is about.\n    workspace_id: Optional workspace scope for ISA lookup + CorC run\n        fetch. When absent the backend falls back to the caller's\n        oldest workspace membership.\n    session_id: Optional Foundation session id to append this turn to."},"CoraChatResponse":{"properties":{"response":{"type":"string","title":"Response"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"is_fallback":{"type":"boolean","title":"Is Fallback"},"correlation_id":{"type":"string","title":"Correlation Id"},"follow_up_questions":{"items":{"type":"string"},"type":"array","title":"Follow Up Questions"}},"type":"object","required":["response","session_id","is_fallback","correlation_id"],"title":"CoraChatResponse","description":"Response from the Interviewer CorA copilot (read-only, plain text).\n\nAttributes:\n    response: The assistant's conversational reply text.\n    session_id: Resolved Foundation session id (None if persistence\n        was skipped/failed — best-effort, never blocks the turn).\n    is_fallback: True when no active ISA row governed this turn (the\n        default prompt/model was used), surfaced as a non-blocking\n        frontend badge.\n    correlation_id: Request correlation id for tracing.\n    follow_up_questions: Optional suggested follow-up questions."},"CreateLinkRequest":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name","default":""},"role":{"type":"string","pattern":"^(viewer|editor)$","title":"Role","default":"viewer"},"max_uses":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"title":"Max Uses"}},"type":"object","title":"CreateLinkRequest","description":"Create a shareable invite link."},"CreateTagRequest":{"properties":{"tag_name":{"type":"string","maxLength":120,"minLength":1,"title":"Tag Name"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason","default":"Schnappschuss angelegt"}},"type":"object","required":["tag_name"],"title":"CreateTagRequest","description":"Named snapshot of the current log position."},"CreateWorkspaceRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"CreateWorkspaceRequest"},"DriftScanRequest":{"properties":{"specification_id":{"type":"string","title":"Specification Id"},"code_base_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Base Path"},"include_tests":{"type":"boolean","title":"Include Tests","default":true},"priority":{"type":"string","title":"Priority","default":"normal"}},"type":"object","required":["specification_id"],"title":"DriftScanRequest","description":"Request model for drift detection scan."},"DriftScanResponse":{"properties":{"scan_id":{"type":"string","title":"Scan Id"},"status":{"type":"string","title":"Status"},"message":{"type":"string","title":"Message"},"estimated_completion":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Estimated Completion"}},"type":"object","required":["scan_id","status","message"],"title":"DriftScanResponse","description":"Response model for drift detection scan."},"DriftStatusResponse":{"properties":{"last_scan":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Scan"},"total_specifications":{"type":"integer","title":"Total Specifications"},"specifications_with_drift":{"type":"integer","title":"Specifications With Drift"},"average_drift_score":{"type":"number","title":"Average Drift Score"},"critical_issues":{"type":"integer","title":"Critical Issues"},"recommendations_count":{"type":"integer","title":"Recommendations Count"},"system_health":{"type":"string","title":"System Health"},"specifications":{"items":{"$ref":"#/components/schemas/SpecificationDriftInfo"},"type":"array","title":"Specifications","default":[]}},"type":"object","required":["last_scan","total_specifications","specifications_with_drift","average_drift_score","critical_issues","recommendations_count","system_health"],"title":"DriftStatusResponse","description":"Response model for drift detection status."},"FollowUpProposalItem":{"properties":{"question_id":{"type":"string","maxLength":200,"minLength":1,"title":"Question Id"},"question":{"type":"string","maxLength":2000,"minLength":1,"title":"Question"},"rationale":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Rationale"},"target_section":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Target Section"},"status":{"anyOf":[{"type":"string","enum":["open","answered","dismissed"]},{"type":"null"}],"title":"Status"}},"type":"object","required":["question_id","question"],"title":"FollowUpProposalItem"},"FollowUpProposalsRequest":{"properties":{"run_id":{"type":"string","format":"uuid","title":"Run Id"},"proposals":{"items":{"$ref":"#/components/schemas/FollowUpProposalItem"},"type":"array","maxItems":100,"title":"Proposals"}},"type":"object","required":["run_id"],"title":"FollowUpProposalsRequest"},"FollowupStatusRequest":{"properties":{"status":{"type":"string","enum":["open","answered","dismissed"],"title":"Status"},"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"}},"type":"object","required":["status"],"title":"FollowupStatusRequest","description":"Statuswechsel EINER Follow-up-Frage (Migration 0160)."},"ForkRequest":{"properties":{"at_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"At Version"},"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason","default":"Variante abgezweigt"}},"type":"object","title":"ForkRequest","description":"Branch a variant off a point in the log."},"GenerateFromPackRequest":{"properties":{"answers":{"additionalProperties":{"type":"string"},"type":"object","title":"Answers"},"questions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Questions"},"glossary":{"items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array","title":"Glossary"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"}},"type":"object","required":["answers"],"title":"GenerateFromPackRequest","description":"Generate spec markdown from an industry pack's question-set + answers.\n\nThe Interviewer stays pack-agnostic: the caller (Repository) sends the pack's\nquestions + glossary, so this endpoint adds a pack-driven generation capability\nwithout the Interviewer depending on the packs/ layout."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImportCanvasRequest":{"properties":{"drawing_id":{"type":"string","minLength":1,"title":"Drawing Id"},"drawing_name":{"type":"string","maxLength":255,"minLength":1,"title":"Drawing Name"},"workspace_id":{"type":"string","minLength":1,"title":"Workspace Id"},"elements":{"items":{"additionalProperties":true,"type":"object"},"type":"array","maxItems":5000,"title":"Elements"},"title":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Title"},"condense":{"type":"boolean","title":"Condense","default":false},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","required":["drawing_id","drawing_name","workspace_id","elements"],"title":"ImportCanvasRequest","description":"Eine bereits gespeicherte Zeichnung samt ihrer Herkunft."},"ImportDocumentRequest":{"properties":{"text":{"type":"string","maxLength":200000,"minLength":1,"title":"Text"},"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"workspace_id":{"type":"string","minLength":1,"title":"Workspace Id"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","required":["text","filename","workspace_id"],"title":"ImportDocumentRequest","description":"Text of a document CorDoc has ALREADY filed, plus its provenance."},"InviteRequest":{"properties":{"email":{"type":"string","maxLength":320,"minLength":3,"title":"Email"},"role":{"type":"string","pattern":"^(viewer|editor|admin)$","title":"Role","default":"editor"}},"type":"object","required":["email"],"title":"InviteRequest","description":"Invite a user by email."},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest","description":"Request model for user login."},"LoginResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user":{"$ref":"#/components/schemas/UserInfo"}},"type":"object","required":["access_token","user"],"title":"LoginResponse","description":"Response model for successful login."},"ModelStatsResponse":{"properties":{"total_requests":{"type":"integer","title":"Total Requests"},"local_model_usage":{"type":"integer","title":"Local Model Usage"},"cloud_basic_usage":{"type":"integer","title":"Cloud Basic Usage"},"cloud_advanced_usage":{"type":"integer","title":"Cloud Advanced Usage"},"cost_savings":{"type":"number","title":"Cost Savings"},"average_response_time":{"type":"number","title":"Average Response Time"},"top_models":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Top Models"},"usage_by_task_type":{"additionalProperties":{"type":"integer"},"type":"object","title":"Usage By Task Type"},"cost_breakdown":{"additionalProperties":{"type":"number"},"type":"object","title":"Cost Breakdown"}},"type":"object","required":["total_requests","local_model_usage","cloud_basic_usage","cloud_advanced_usage","cost_savings","average_response_time","top_models","usage_by_task_type","cost_breakdown"],"title":"ModelStatsResponse","description":"Response model for model usage statistics."},"PackContext":{"properties":{"questions":{"items":{"$ref":"#/components/schemas/PackQuestion"},"type":"array","maxItems":200,"title":"Questions"},"current_answers":{"additionalProperties":{"type":"string"},"type":"object","maxProperties":200,"title":"Current Answers"}},"type":"object","required":["questions"],"title":"PackContext","description":"The pack form state handed to the agent for a single turn.\n\nAttributes:\n    questions: The full question set for the active pack.\n    current_answers: Answers already present in the form (id -> text),\n        used only to compute what remains open in the receipt."},"PackQuestion":{"properties":{"id":{"type":"string","maxLength":200,"minLength":1,"title":"Id"},"question":{"type":"string","maxLength":2000,"minLength":1,"title":"Question"},"required":{"type":"boolean","title":"Required","default":false}},"type":"object","required":["id","question"],"title":"PackQuestion","description":"A single industry-pack form question.\n\nAttributes:\n    id: Stable question id (maps to the form field / spec section).\n    question: Human-readable question text shown in the form.\n    required: Whether the field is mandatory for a complete pack."},"PatentAgentRequest":{"properties":{"message":{"type":"string","title":"Message","description":"User message or query"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id","description":"User identifier for context"},"context_type":{"type":"string","title":"Context Type","description":"Type of context needed","default":"general"},"stream":{"type":"boolean","title":"Stream","description":"Enable streaming response","default":false},"conversation_history":{"items":{"type":"string"},"type":"array","title":"Conversation History","description":"Recent conversation history"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Additional metadata"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id","description":"Optional workspace scope for ISA instruction lookup; falls back to user's oldest workspace when absent."},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Foundation session id to append this turn to. When absent, a session is created on the first turn (best-effort — persistence never blocks the chat response) and the resolved id is returned so the caller can thread it on subsequent turns."}},"type":"object","required":["message"],"title":"PatentAgentRequest","description":"Request model for patent agent interaction."},"PatentAgentResponse":{"properties":{"response":{"type":"string","title":"Response","description":"Agent response"},"context_used":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Context Used","description":"Context items used"},"memory_updates":{"items":{"type":"string"},"type":"array","title":"Memory Updates","description":"Memory updates made"},"performance_metrics":{"additionalProperties":{"type":"number"},"type":"object","title":"Performance Metrics","description":"Performance metrics"},"timestamp":{"type":"string","title":"Timestamp","description":"Response timestamp"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"Foundation session id for this chat"}},"type":"object","required":["response","timestamp"],"title":"PatentAgentResponse","description":"Response model for patent agent interaction."},"QualityAnalysisRequest":{"properties":{"specification_id":{"type":"string","minLength":1,"title":"Specification Id"}},"type":"object","required":["specification_id"],"title":"QualityAnalysisRequest","description":"Request model for quality analysis.\n\nAttributes:\n    specification_id: The ID of the specification to analyze."},"RawContentRequest":{"properties":{"content":{"type":"string","title":"Content","default":""},"title":{"type":"string","title":"Title","default":""}},"type":"object","title":"RawContentRequest","description":"Request model for raw text content analysis."},"RegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","maxLength":128,"minLength":12,"title":"Password"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["email","password"],"title":"RegisterRequest"},"RevertRequest":{"properties":{"to_version":{"type":"integer","minimum":1.0,"title":"To Version"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"type":"object","required":["to_version","reason"],"title":"RevertRequest","description":"Undo back to a point in the log (append-only, via a new event)."},"RoutingRequest":{"properties":{"prompt":{"type":"string","title":"Prompt"},"privacy_required":{"type":"boolean","title":"Privacy Required","default":false},"user_preferences":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"User Preferences"}},"type":"object","required":["prompt"],"title":"RoutingRequest","description":"Request model for model routing."},"RoutingResponse":{"properties":{"selected_model":{"type":"string","title":"Selected Model"},"model_tier":{"type":"string","title":"Model Tier"},"task_type":{"type":"string","title":"Task Type"},"complexity_score":{"type":"number","title":"Complexity Score"},"rationale":{"type":"string","title":"Rationale"},"estimated_cost":{"type":"number","title":"Estimated Cost"},"privacy_level":{"type":"string","title":"Privacy Level"},"routing_timestamp":{"type":"string","format":"date-time","title":"Routing Timestamp"}},"type":"object","required":["selected_model","model_tier","task_type","complexity_score","rationale","estimated_cost","privacy_level","routing_timestamp"],"title":"RoutingResponse","description":"Response model for model routing decision."},"SpecificationCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"problem_description":{"type":"string","minLength":1,"title":"Problem Description"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","default":"draft"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"source_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Session Id"},"process_profile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Process Profile"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},"type":"object","required":["title","problem_description"],"title":"SpecificationCreate"},"SpecificationDriftInfo":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"drift_score":{"type":"number","title":"Drift Score"},"critical_issues":{"type":"integer","title":"Critical Issues"},"last_analyzed":{"type":"string","format":"date-time","title":"Last Analyzed"}},"type":"object","required":["id","title","drift_score","critical_issues","last_analyzed"],"title":"SpecificationDriftInfo","description":"Information about a specification with drift."},"SpecificationRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Specification query"},"specification_type":{"type":"string","title":"Specification Type","description":"Type of specification","default":"requirements"},"context_type":{"type":"string","title":"Context Type","description":"Context type for retrieval","default":"general"},"max_results":{"type":"integer","title":"Max Results","description":"Maximum results to return","default":10}},"type":"object","required":["query"],"title":"SpecificationRequest","description":"Request model for specification-aware queries."},"SpecificationUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"problem_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Problem Description"},"description":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"process_profile":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Process Profile"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"testing_override_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Testing Override Reason"}},"type":"object","title":"SpecificationUpdate"},"UpdateLinkRequest":{"properties":{"name":{"type":"string","maxLength":100,"title":"Name"}},"type":"object","required":["name"],"title":"UpdateLinkRequest","description":"Rename an invite link."},"UpdateRoleRequest":{"properties":{"role":{"type":"string","pattern":"^(viewer|editor|admin)$","title":"Role"}},"type":"object","required":["role"],"title":"UpdateRoleRequest","description":"Change a member's role."},"UpdateWorkspaceRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"UpdateWorkspaceRequest"},"UserInfo":{"properties":{"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"role":{"type":"string","title":"Role"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"}},"type":"object","required":["email","name","role"],"title":"UserInfo","description":"User information returned after authentication."},"UserProfileUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"theme":{"type":"string","pattern":"^(dark|light|high-contrast|auto)$","title":"Theme","default":"dark"},"language":{"type":"string","maxLength":5,"title":"Language","default":"en"},"timezone":{"type":"string","maxLength":50,"title":"Timezone","default":"UTC"}},"type":"object","title":"UserProfileUpdate"},"UserSettingsUpdate":{"properties":{"auto_save_interval":{"type":"integer","maximum":300.0,"minimum":10.0,"title":"Auto Save Interval","default":30},"ai_assistance_level":{"type":"string","pattern":"^(minimal|balanced|aggressive)$","title":"Ai Assistance Level","default":"balanced"},"default_project_visibility":{"type":"string","pattern":"^(private|public)$","title":"Default Project Visibility","default":"private"},"email_notifications":{"additionalProperties":true,"type":"object","title":"Email Notifications"}},"type":"object","title":"UserSettingsUpdate"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}