{"openapi":"3.1.0","info":{"title":"One-Shot API","version":"1.0.0"},"paths":{"/access/check":{"get":{"tags":["access"],"summary":"Check Access","description":"Public (no auth) — called before login to gate browser app access.","operationId":"check_access_access_check_get","parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","description":"Email to check","title":"Email"},"description":"Email to check"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Check Access Access Check Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/oauth/exchange":{"post":{"tags":["auth"],"summary":"Exchange Oauth Token Endpoint","description":"Exchange a Stytch OAuth token for a session token and JWT.\n\nCalled by the browser app after Stytch redirects back with ?token=xxx.\nIntentionally unauthenticated — this endpoint IS the authentication mechanism.\nThe Stytch secret key never leaves the server.","operationId":"exchange_oauth_token","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthExchangeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces":{"get":{"tags":["agent-loop"],"summary":"List Workspaces","description":"List all workspaces the current user is a member of, ordered by most recent turn activity.","operationId":"list_workspaces","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWorkspacesResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["agent-loop"],"summary":"Create Workspace","description":"Create a new workspace OR (for Scott pushes) upsert one keyed on\n`(captured_by_user_id, source_kind, source_id)`.\n\nTwo flows:\n  - No `scott_push`: classic workspace creation. Single transaction.\n  - With `scott_push`: idempotent. Same (user, source_kind, source_id)\n    returns the same planspace. Push artifact metadata is replaced in\n    place; scott_push turns are APPENDED past the existing chain tip\n    (never deleted). Non-scott_push turns the user added in the Scott\n    UI are never touched — they stay parented where the user put them\n    and become branches at the prior tip after the next push.","operationId":"create_workspace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/agent-loop/workspaces/{workspace_id}":{"delete":{"tags":["agent-loop"],"summary":"Delete Workspace","description":"Delete workspace and all its turns (cascade).","operationId":"delete_workspace","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":{"type":"object","additionalProperties":true,"title":"Response Delete Workspace"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["agent-loop"],"summary":"Update Workspace","description":"Update workspace settings.","operationId":"update_workspace","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":{"type":"object","additionalProperties":true,"title":"Response Update Workspace"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/turns":{"post":{"tags":["agent-loop"],"summary":"Create Turn","description":"Write-ahead: create a pending turn before agent starts running.","operationId":"create_turn","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/CreateTurnRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTurnResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/turns/{turn_id}":{"patch":{"tags":["agent-loop"],"summary":"Update Turn","description":"Single completion call — updates turn with all results at once.\n\nDual-auth (see ``require_turn_access``): a per-turn agent-svc JWT bound to\nthis ``turn_id`` is the agent-service path; Stytch session is the user\npath. Both routes resolve to ``actor.user_id`` for cursor advances and\ndownstream attribution.","operationId":"update_turn","parameters":[{"name":"turn_id","in":"path","required":true,"schema":{"type":"string","title":"Turn Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTurnRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Turn"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/state":{"get":{"tags":["agent-loop"],"summary":"Get Workspace State","description":"Single call: all turns with DAG annotations + cursor position.\nAnonymous access allowed for public workspaces (cursor/member tracking skipped).\nPure read — no E2B calls. Frontend calls /wake separately to ensure the sandbox is running.","operationId":"get_workspace_state","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":{"$ref":"#/components/schemas/WorkspaceStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/events":{"get":{"tags":["agent-loop"],"summary":"Workspace Event Stream","description":"SSE stream of state-change events for workspace members.\n\nStrict-membership only: the agent-service shared-secret principal is\nrejected so the bypass in ``assert_workspace_access`` can't be reused\nto subscribe to arbitrary workspaces.","operationId":"workspace_event_stream","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/wake":{"post":{"tags":["agent-loop"],"summary":"Wake Workspace","description":"Ensure the sandbox is running. Returns its current URL.\n\nFor Electron workspaces returns 'electron' immediately (no E2B calls).\nFor E2B workspaces: health-checks the shared sandbox and recreates it if unhealthy.","operationId":"wake_workspace","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":{"$ref":"#/components/schemas/WakeWorkspaceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/context":{"get":{"tags":["agent-loop"],"summary":"Get Workspace Context","description":"Walk parent_id chain and optionally bind the response to one document node.","operationId":"get_workspace_context","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"from_turn_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Turn Id"}},{"name":"snapshot_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/review-chat/turns":{"post":{"tags":["agent-loop"],"summary":"Create Review Chat Turn","description":"Open or extend the caller's private review-chat thread on a snapshot.\n\nRenderer-facing (workspace membership gates the call; the thread is the\ncaller's own). Writes a pending review_chat_turns row, then mints a handoff\nJWT carrying caps=['review-chat-turn'] plus the snapshot_id claim that flips\nagent-service into the read-only review sandbox. The claim — never a body\nflag — is the source of truth for the turn kind. Returns the handoff code\nthe renderer forwards to agent-service.","operationId":"create_review_chat_turn","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/CreateReviewChatTurnRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateReviewChatTurnResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agent-loop"],"summary":"List Review Chat Turns","description":"List the caller's private review-chat thread on a snapshot (renderer-facing).\n\nWorkspace membership gates the call; the thread is scoped to the\nauthenticated reviewer, so one reviewer never sees another's thread and the\ncontributor sees none. Turns come back oldest-first so the Chat tab repaints\nthe conversation on reload and chains the next message onto the last. The\nagent-facing context GET is the wrong surface here: it needs the review-chat\nJWT the renderer never holds and rebuilds one focal turn's ancestry, not the\nwhole thread.","operationId":"list_review_chat_turns","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"query","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewChatThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/review-chat/context":{"get":{"tags":["agent-loop"],"summary":"Get Review Chat Context","description":"Snapshot-scoped context for an agent-service review-chat turn.\n\nAgent-service-facing (caps=['review-chat-turn']). The JWT's snapshot_id and\nuser_id (the reviewer) scope the entire response; request inputs cannot\nwiden it. Returns the one snapshot's content, workspace identity + connected\nsources, comments on that snapshot only, and this private thread's ancestry.\nDeliberately never touches the workspace /context walk.","operationId":"get_review_chat_context","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"from_turn_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Turn Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewChatContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/review-chat/turns/{turn_id}":{"patch":{"tags":["agent-loop"],"summary":"Update Review Chat Turn","description":"Persist agent output onto a review-chat turn (agent-service-facing).\n\nThe JWT is bound to this ``turn_id`` (caps=['review-chat-turn']); the\nservice cross-checks workspace + reviewer ownership before writing. Same\nbody shape as the contributor PATCH /turns/{id}. No cursor advance — review\nchat is off the DAG.","operationId":"update_review_chat_turn","parameters":[{"name":"turn_id","in":"path","required":true,"schema":{"type":"string","title":"Turn Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTurnRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Review Chat Turn"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/access-token":{"post":{"tags":["agent-loop"],"summary":"Mint Access Token","description":"Issue a short-lived JWT for direct frontend → agent-service communication.","operationId":"mint_access_token","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":{"$ref":"#/components/schemas/AccessTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/internal/workspaces/{workspace_id}/connected-sources/{connected_source_id}/retrieval-details":{"get":{"tags":["agent-loop","agent-loop-internal"],"summary":"Get Connected Source Retrieval Details","description":"Per-turn agent-svc JWT (``turn-write`` OR ``review-chat-turn`` cap, ``workspace_id`` claim matches path).","operationId":"get_connected_source_retrieval_details","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"connected_source_id","in":"path","required":true,"schema":{"type":"string","title":"Connected Source Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/internal/agent-token/redeem":{"post":{"tags":["agent-loop","agent-loop-internal"],"summary":"Redeem Handoff Code","operationId":"redeem_handoff_code","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemHandoffRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedeemHandoffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/internal/sandbox/heartbeat":{"post":{"tags":["agent-loop","agent-loop-internal"],"summary":"Sandbox Heartbeat","operationId":"sandbox_heartbeat","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sandbox Heartbeat"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/cursor":{"put":{"tags":["agent-loop"],"summary":"Upsert Cursor","description":"Upsert workspace cursor — tracks where this user is in the Turn DAG.","operationId":"upsert_cursor","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/UpsertCursorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["agent-loop"],"summary":"Get Cursor","description":"Get current cursor position for this user in the workspace.","operationId":"get_cursor","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":{"$ref":"#/components/schemas/CursorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/sync-chat/turns":{"get":{"tags":["sync-chat"],"summary":"List Sync Chat Turns","description":"List the caller's sync-chat thread (renderer-facing).\n\nScoped to the authenticated user; oldest first so the UI repaints the\nconversation on reload and chains the next message onto the last.","operationId":"list_sync_chat_turns","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncChatThreadResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["sync-chat"],"summary":"Create Sync Chat Turn","description":"Open or extend the caller's sync-chat thread.\n\nRenderer-facing (Stytch session gates the call; the thread is the\ncaller's own). Writes a pending sync_chat_turns row, mints a handoff JWT\ncarrying caps=['sync-chat-turn'] bound to this turn, stores it in Redis,\nand returns the handoff code the renderer forwards to agent-service.\nNo workspace or snapshot coupling.","operationId":"create_sync_chat_turn","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSyncChatTurnRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSyncChatTurnResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/agent-loop/sync-chat/start-review":{"post":{"tags":["sync-chat"],"summary":"Start Sync Chat Review","description":"Ensure a post-`scott sync` review turn is in flight, and dispatch it.\n\nCalled by both the CLI (after an upload) and the /sync page (on an empty or\nstale thread), so it is idempotent: if a review turn is already pending or\nstreaming at the thread tip, it re-nudges that turn instead of stacking a\nduplicate. A fresh review is only created once the previous one has settled,\nso a later sync reflects the newly uploaded sessions.\n\nDispatch is best-effort. The pending row is the durable work item; on a\nmissed dispatch reconcile_sync_chat_turns re-dispatches it, so this returns\n200 (the review is queued) rather than 503.","operationId":"start_sync_chat_review","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSyncChatTurnResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/agent-loop/sync-chat/context":{"get":{"tags":["sync-chat"],"summary":"Get Sync Chat Context","description":"Per-user corpus-digest context for a sync-chat turn (agent-service-facing).\n\nAuthed by the sync-chat-turn JWT. The JWT's user_id scopes the entire\nresponse; request inputs cannot widen it. Returns:\n  - corpus digest: the user's scott-push sessions from the last 14 days\n    with stats and key messages, recency-ordered (newest first, limit 30)\n  - GitHub install state: so the assistant knows whether to nudge\n  - thread ancestry: root to from_turn_id (same as review-chat context)","operationId":"get_sync_chat_context","parameters":[{"name":"from_turn_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Turn Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncChatContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/sync-chat/connected-sources/retrieval-details":{"post":{"tags":["sync-chat"],"summary":"Sync Chat Connected Source Retrieval Details","description":"Mint clone + token retrieval details for a sync-chat connected source.\n\nThe agent holds the in-memory ConnectedSource from /context and posts it\nback here to clone the repo mid-turn. Re-resolving from its config/metadata\nonly mints a token for a repo the user's own install already reaches, so no\npersistence or workspace coupling is required (sync-chat is per-user).","operationId":"sync_chat_connected_source_retrieval_details","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedSource"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetrievalResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/sync-chat/sessions/{workspace_id}/transcript":{"get":{"tags":["sync-chat"],"summary":"Get Sync Chat Session Transcript","description":"Full transcript of one of the caller's own push sessions (agent-facing).\n\nThe JWT's user_id scopes the query; a workspace_id not authored by this\nuser returns an empty transcript rather than another user's turns. This is\nthe data plane behind Sync Chat's read_session_transcript tool.","operationId":"get_sync_chat_session_transcript","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of imported session turns to return, ordered oldest first.","default":200,"title":"Limit"},"description":"Maximum number of imported session turns to return, ordered oldest first."},{"name":"include_message_deltas","in":"query","required":false,"schema":{"type":"boolean","description":"Include stored replay message_deltas alongside user/assistant text.","default":true,"title":"Include Message Deltas"},"description":"Include stored replay message_deltas alongside user/assistant text."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncChatTranscriptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/sync-chat/turns/{turn_id}":{"patch":{"tags":["sync-chat"],"summary":"Update Sync Chat Turn","description":"Persist agent output onto a sync-chat turn (agent-service-facing).\n\nThe JWT is bound to this turn_id (caps=['sync-chat-turn']); the service\ncross-checks user ownership before writing. Same body shape as the\ncontributor PATCH /turns/{id}. No cursor advance: sync-chat is off the DAG.","operationId":"update_sync_chat_turn","parameters":[{"name":"turn_id","in":"path","required":true,"schema":{"type":"string","title":"Turn Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTurnRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Sync Chat Turn"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/sync-chat/pin":{"post":{"tags":["sync-chat"],"summary":"Sync Chat Pin Workspace","description":"Pin or unpin one of the caller's own push planspaces (agent-service-facing).\n\nBoth endpoints are strictly user-scoped: a sync-chat turn can pin or write up\nONLY the caller's own push planspaces. A workspace_id that is not one of the\ncaller's own scott_push_artifacts (matched on captured_by_user_id == user_id)\nreturns 403.\n\nAuthed by the sync-chat-turn JWT; the JWT's user_id is the only identity that\nmatters. The request body cannot widen scope.","operationId":"sync_chat_pin_workspace","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncChatPinRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sync Chat Pin Workspace"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/sync-chat/write-up":{"post":{"tags":["sync-chat"],"summary":"Sync Chat Write Up Workspace","description":"Trigger a tailored write-up on one of the caller's own push planspaces.\n\nBoth endpoints are strictly user-scoped: a sync-chat turn can pin or write up\nONLY the caller's own push planspaces. A workspace_id that is not one of the\ncaller's own scott_push_artifacts (matched on captured_by_user_id == user_id)\nreturns 403.\n\nAppends a single pending synthesis turn off the planspace's scott-push chain\ntip (the planspace was bulk-uploaded with synthesize=false), then dispatches\nit to agent-service after commit, the same way push-ingest synthesis fans out.","operationId":"sync_chat_write_up_workspace","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncChatWriteUpRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Sync Chat Write Up Workspace"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/me":{"get":{"tags":["users","users"],"summary":"Get My Profile","description":"Get own UserProfile, auto-creating it on first call (upsert).\n\nAlso returns the viewer's own org (with `external_sharing_enabled` and\n`viewer_role`) so settings UI can render org-scoped controls without a\nsecond round-trip.","operationId":"get_my_profile","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["users","users"],"summary":"Update My Profile","description":"Update own display_name and/or avatar_url.","operationId":"update_my_profile","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/users/me/identity":{"get":{"tags":["users","users"],"summary":"Get My Identity","description":"Return the authenticated user's Stytch id + email with no side effects.\n\nIntended for the Scott CLI to attach identity to product-analytics events.\nDeliberately does not upsert the profile or resolve the org the way\n`GET /users/me` does — an analytics identity read should be cheap and\nidempotent.","operationId":"get_my_identity","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserIdentityResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/users/me/onboarding-options":{"get":{"tags":["users","users"],"summary":"Get Onboarding Options","description":"Return the data the frontend needs to choose an onboarding UX.\n\nComposes one fact from user_profile (`has_completed_onboarding`) with two from orgs\n(`current_org`, `matching_org`) — neither service crosses domain boundaries.","operationId":"get_onboarding_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingOptionsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/users/me/complete-onboarding":{"post":{"tags":["users","users"],"summary":"Complete Onboarding","description":"Mark onboarding complete and place the user in exactly one org.\n\n`kind: \"solo\"` creates a personal org; `kind: \"team\"` joins the user to the\norg that has claimed their email domain. Org write + flag flip share a single\nDB transaction so partial state is impossible.","operationId":"complete_onboarding","requestBody":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/_SoloOnboarding"},{"$ref":"#/components/schemas/_TeamOnboarding"}],"title":"Body","discriminator":{"propertyName":"kind","mapping":{"solo":"#/components/schemas/_SoloOnboarding","team":"#/components/schemas/_TeamOnboarding"}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteOnboardingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/users/search":{"get":{"tags":["users","users"],"summary":"Search Users","description":"Search users by email or display name, filtered to the caller's email domain.","operationId":"search_users","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100,"default":"","title":"Q"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/users/{user_id}":{"get":{"tags":["users","users"],"summary":"Get User Profile","description":"Get public profile of any user by their user_id.","operationId":"get_user_profile","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/members":{"get":{"tags":["users"],"summary":"List Workspace Members","description":"List all members of a workspace with their profiles.","operationId":"list_workspace_members","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":{"$ref":"#/components/schemas/ListWorkspaceMembersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["users"],"summary":"Add Workspace Member","description":"Directly add a same-org user to a workspace (owner only, no invite round trip).","operationId":"add_workspace_member","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/AddWorkspaceMemberRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/members/{target_user_id}":{"patch":{"tags":["users"],"summary":"Update Member Role","description":"Change a member's role (owner only).","operationId":"update_member_role","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"target_user_id","in":"path","required":true,"schema":{"type":"string","title":"Target User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMemberRoleRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Member Role"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["users"],"summary":"Remove Workspace Member","description":"Remove a member from a workspace. Owners and editors may remove members; only owners may remove an owner.","operationId":"remove_workspace_member","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"target_user_id","in":"path","required":true,"schema":{"type":"string","title":"Target User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Workspace Member"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invites/{token}":{"get":{"tags":["invites"],"summary":"Get Workspace Invite By Token","description":"Resolve an invite token to its workspace_id. Used by the router to detect already-accepted invites.","operationId":"get_workspace_invite_by_token","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitePreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/invites":{"post":{"tags":["invites"],"summary":"Create Workspace Invite","description":"Create a magic-link invite for a workspace. Returns the token.","operationId":"create_workspace_invite","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/CreateInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["invites"],"summary":"List Workspace Invites","description":"List pending (not accepted, not expired) invites for a workspace.","operationId":"list_workspace_invites","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":{"$ref":"#/components/schemas/ListWorkspaceInvitesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/invites/{invite_id}":{"delete":{"tags":["invites"],"summary":"Revoke Workspace Invite","description":"Revoke (delete) a pending invite. Owners and editors may revoke any invite.","operationId":"revoke_workspace_invite","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Workspace Invite"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["invites"],"summary":"Update Workspace Invite","description":"Update the role and/or message of a pending invite in place.","operationId":"update_workspace_invite","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"invite_id","in":"path","required":true,"schema":{"type":"string","title":"Invite Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInviteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/my-pending-invite":{"get":{"tags":["invites"],"summary":"Get My Pending Workspace Invite","description":"Return the authenticated user's pending invite for a workspace, identified by email match.","operationId":"get_my_pending_workspace_invite","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":{"$ref":"#/components/schemas/MyPendingInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/my-pending-invite/accept":{"post":{"tags":["invites"],"summary":"Accept My Pending Workspace Invite","description":"Accept the authenticated user's pending invite for a workspace, identified by email match.","operationId":"accept_my_pending_workspace_invite","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":{"$ref":"#/components/schemas/AcceptInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/invites/{token}/accept":{"post":{"tags":["invites"],"summary":"Accept Workspace Invite","description":"Accept a magic-link invite. Adds the authenticated user as a workspace member.","operationId":"accept_workspace_invite","security":[{"HTTPBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcceptInviteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/orgs/{org_id}":{"patch":{"tags":["orgs"],"summary":"Update Org External Sharing","description":"Owners-only toggle of org-wide external sharing.\n\n- Non-owners (or non-members) get 403.\n- Missing org → 404.\n- Idempotent: when the value already matches the existing row, no audit-log row is written\n  and the existing row is returned unchanged.","operationId":"update_org_external_sharing","security":[{"HTTPBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","title":"Org Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOrgExternalSharingRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/document-artifacts":{"post":{"tags":["artifacts"],"summary":"Create Document Artifact","description":"Land an agent `write_document` turn — as a suggestion or a committed node.\n\nDispatched per actor by ``_suggestions_enabled_for``:\n\n  * **enabled** (allowlisted user, or any non-prod env) -> suggestion\n    flow (``_land_suggestion``); no node minted.\n  * **disabled** (prod, non-allowlisted) -> pre-Phase-1 flow\n    (``_land_committed_node``); mint a committed node.\n\nBoth share the dual-auth contract from ``require_turn_access_from_body``.","operationId":"create_document_artifact_workspaces__workspace_id__document_artifacts_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentArtifactRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDocumentArtifactResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/snapshots":{"post":{"tags":["snapshots"],"summary":"Create Snapshot","operationId":"create_snapshot","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/CreateSnapshotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/snapshots/{snapshot_id}/commit":{"patch":{"tags":["snapshots"],"summary":"Commit Snapshot","operationId":"commit_snapshot","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitSnapshotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/snapshots/{snapshot_id}/discard":{"patch":{"tags":["snapshots"],"summary":"Discard Snapshot","operationId":"discard_snapshot","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/snapshots/{snapshot_id}/has-user-edits":{"patch":{"tags":["snapshots"],"summary":"Set Snapshot Has User Edits","description":"Set the has_user_edits flag (trunk-draft reset clears it to the empty visual state).","operationId":"set_snapshot_has_user_edits","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetHasUserEditsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/snapshots/{snapshot_id}/suggestion/accept":{"post":{"tags":["snapshots"],"summary":"Accept Snapshot Suggestion","operationId":"accept_snapshot_suggestion","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/snapshots/{snapshot_id}/suggestion/reject":{"post":{"tags":["snapshots"],"summary":"Reject Snapshot Suggestion","operationId":"reject_snapshot_suggestion","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/snapshots/{snapshot_id}/rename":{"patch":{"tags":["snapshots"],"summary":"Rename Snapshot","operationId":"rename_snapshot","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RenameSnapshotRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/review-requests":{"post":{"tags":["reviews"],"summary":"Create Review Requests","description":"Ask reviewers to review a node. One request per reviewer; idempotent per open (reviewer, snapshot).","operationId":"create_review_requests","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/CreateReviewRequestsBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReviewRequestsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["reviews"],"summary":"List Workspace Review Requests","description":"List review requests for a workspace.","operationId":"list_workspace_review_requests","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReviewRequestsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/review-requests/{request_id}":{"delete":{"tags":["reviews"],"summary":"Cancel Review Request","description":"Cancel an open review request, then tell the reviewer it was withdrawn. Only the requester can do this.","operationId":"cancel_review_request","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/review-requests/{request_id}/decisions":{"post":{"tags":["reviews"],"summary":"Submit Review Decision","description":"Submit or change the reviewer's decision; the request closes and stays closed.","operationId":"submit_review_decision","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitDecisionBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["reviews"],"summary":"Retract Review Decision","description":"Withdraw the reviewer's verdict; the request reopens and state reverts to in_progress/pending.","operationId":"retract_review_decision","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/review-requests/{request_id}/move":{"post":{"tags":["reviews"],"summary":"Move Review Request","description":"Move a never-engaged open request to another node; merges into an existing open ask there.","operationId":"move_review_request","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveReviewRequestBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/review-requests/{request_id}/nudge":{"post":{"tags":["reviews"],"summary":"Nudge Review Request","description":"Re-fire the ask for a pending request. Rate-limited; never changes review state.\n\nBound reviewers get the SCO-1348 in-app + email re-fire. A pending invitee has no bound user and\nno inbox, so the invite email is re-sent instead (the only meaningful re-ping for that state).","operationId":"nudge_review_request","security":[{"HTTPBearer":[]}],"parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NudgeReviewRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/review-requests":{"get":{"tags":["reviews"],"summary":"List My Review Requests","description":"Cross-workspace review request list — for inbox and queue pages.\n\nrole=reviewer  → requests where caller is the reviewer\nrole=requester → requests created by caller","operationId":"list_my_review_requests","security":[{"HTTPBearer":[]}],"parameters":[{"name":"role","in":"query","required":false,"schema":{"type":"string","description":"'reviewer' or 'requester'","default":"reviewer","title":"Role"},"description":"'reviewer' or 'requester'"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListReviewRequestsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/reviews/summary":{"get":{"tags":["reviews"],"summary":"Get Workspace Reviews Summary","description":"Per-node review-state counts for the tree chips. Only nodes with counting requests appear.","operationId":"get_workspace_reviews_summary","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":{"$ref":"#/components/schemas/ReviewSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/snapshots/{snapshot_id}/reviews":{"get":{"tags":["reviews"],"summary":"Get Snapshot Reviews","description":"Per-reviewer review state on one node. The Approvals tab and tree popover render this list.","operationId":"get_snapshot_reviews","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnapshotReviewsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/snapshots/{snapshot_id}/reviews/bring-forward":{"get":{"tags":["reviews"],"summary":"Get Bring Forward Candidates","description":"Reviewers with upstream activity who are absent from this node, with suggested actions.","operationId":"get_bring_forward_candidates","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"snapshot_id","in":"path","required":true,"schema":{"type":"string","title":"Snapshot Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BringForwardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/agent-counsel":{"post":{"tags":["agent-counsel"],"summary":"Request Agent Counsel","operationId":"request_agent_counsel","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/RequestCounselBody"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestCounselResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/internal/agent-counsel/finish":{"post":{"tags":["agent-counsel","agent-counsel-internal"],"summary":"Finish Agent Counsel Review","operationId":"finish_agent_counsel_review","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentFinishBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentDecisionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/internal/agent-counsel/comment":{"post":{"tags":["agent-counsel","agent-counsel-internal"],"summary":"Add Agent Counsel Comment","description":"Delegated quote-anchored comment write for an agent-counsel reviewer.\n\nAgent-service calls this with its agent JWT instead of writing to hocuspocus\ndirectly; fastapi signs the HMAC envelope and relays. The author is the\nreviewer named in the verified JWT — never request input — so the agent cannot\ncomment as anyone else. Authorized by the cap plus an open ReviewRequest for\n(reviewer_id, snapshot_id), matching the context route; refuses once the review\nis finished or cancelled.","operationId":"add_agent_counsel_comment","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCommentBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agent-loop/workspaces/{workspace_id}/agent-counsel/context":{"get":{"tags":["agent-counsel","agent-counsel-internal"],"summary":"Get Agent Counsel Context","description":"Snapshot-scoped context for an agent-service agent-counsel turn (the branch loader).\n\nAgent-service-facing (caps=['agent-counsel-turn']). The reviewer (=user_id) and\nsnapshot_id come from the verified JWT, never request input. Authorization is\nthe cap plus an open ReviewRequest for (reviewer_id, snapshot_id); never workspace\nmembership, since synthetic reviewers are not members. Returns the one snapshot's\ncontent, the workspace identity + connected sources, and the comments on that\nsnapshot. ``turns`` is empty: agent counsel is a single fire-and-forget pass with no\nprivate thread to walk.","operationId":"get_agent_counsel_context","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCounselContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notifications":{"get":{"tags":["notifications","notifications"],"summary":"List Notifications","description":"Paginated notification list for the current user, with actor display name.","operationId":"list_notifications","security":[{"HTTPBearer":[]}],"parameters":[{"name":"unread_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Unread Only"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListNotificationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notifications/unread-count":{"get":{"tags":["notifications","notifications"],"summary":"Get Unread Count","description":"Fast count of unread notifications for the current user.","operationId":"get_unread_count","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnreadCountResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/notifications/{notification_id}/read":{"post":{"tags":["notifications","notifications"],"summary":"Mark Notification Read","description":"Mark a single notification as read.\n\nNote: Notifications are user-scoped, not workspace-scoped. No workspace authz required.","operationId":"mark_notification_read","security":[{"HTTPBearer":[]}],"parameters":[{"name":"notification_id","in":"path","required":true,"schema":{"type":"string","title":"Notification Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Mark Notification Read"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/notifications/read-all":{"post":{"tags":["notifications","notifications"],"summary":"Mark All Read","description":"Mark all unread notifications as read for the current user.\n\nNote: Notifications are user-scoped, not workspace-scoped. No workspace authz required.","operationId":"mark_all_notifications_read","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Mark All Notifications Read"}}}}},"security":[{"HTTPBearer":[]}]}},"/notifications/stream":{"get":{"tags":["notifications","notifications"],"summary":"Notification Stream","description":"SSE stream: polls DB every 3s for new notifications. Heartbeat every 15s.","operationId":"notification_stream","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/walkthroughs/pending":{"get":{"tags":["walkthroughs","walkthroughs"],"summary":"Get Pending Walkthrough","description":"Return the next pending walkthrough name for the current user, or null.","operationId":"get_pending_walkthrough","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingWalkthroughResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/walkthroughs/{name}/complete":{"post":{"tags":["walkthroughs","walkthroughs"],"summary":"Complete Walkthrough","operationId":"complete_walkthrough","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalkthroughActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/walkthroughs/{name}/dismiss":{"post":{"tags":["walkthroughs","walkthroughs"],"summary":"Dismiss Walkthrough","operationId":"dismiss_walkthrough","security":[{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalkthroughActionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/":{"post":{"tags":["conversations"],"summary":"Create Conversation","description":"Create a new conversation","operationId":"create_conversation_conversations__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["conversations"],"summary":"List Conversations","description":"List all conversations for the authenticated user (metadata only)","operationId":"list_conversations_conversations__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ConversationListResponse"},"title":"Response List Conversations Conversations  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/resume":{"post":{"tags":["conversations"],"summary":"Resume Conversation","description":"Resume an existing conversation - returns API key without creating new conversation","operationId":"resume_conversation_conversations__conversation_id__resume_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/resume/prepare":{"post":{"tags":["conversations"],"summary":"Resume Prepare","description":"Unpause a sandbox for session validation. Sets it as pending — proxy will route to it.","operationId":"resume_prepare_conversations__conversation_id__resume_prepare_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumePreparationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/resume/confirm":{"post":{"tags":["conversations"],"summary":"Resume Confirm","description":"Graduate pending sandbox to active. Pause old active sandbox. Extend TTL.","operationId":"resume_confirm_conversations__conversation_id__resume_confirm_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeConfirmationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/resume/reject":{"post":{"tags":["conversations"],"summary":"Resume Reject","description":"Client determined sessions are dead — clear pending sandbox. TTL will clean up the sandbox.","operationId":"resume_reject_conversations__conversation_id__resume_reject_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResumeRejectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/active-session":{"get":{"tags":["conversations"],"summary":"Get Active Session","description":"Check if the user has a live E2B sandbox and return the session info to reconnect.","operationId":"get_active_session_conversations_active_session_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveSessionResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/conversations/{conversation_id}":{"get":{"tags":["conversations"],"summary":"Get Conversation","description":"Get a single conversation (metadata only, no messages)","operationId":"get_conversation_conversations__conversation_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["conversations"],"summary":"Update Conversation","description":"Update conversation metadata (e.g., coordinator_session_id)","operationId":"update_conversation_conversations__conversation_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConversationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/messages":{"get":{"tags":["conversations"],"summary":"Get Conversation Messages","description":"Get all messages for a conversation","operationId":"get_conversation_messages_conversations__conversation_id__messages_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response Get Conversation Messages Conversations  Conversation Id  Messages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["conversations"],"summary":"Append Messages","description":"Append messages to a conversation","operationId":"append_messages_conversations__conversation_id__messages_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageAppend"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Append Messages Conversations  Conversation Id  Messages Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/conversations/{conversation_id}/messages/{message_id}":{"patch":{"tags":["conversations"],"summary":"Update Message","description":"Update a specific message in a conversation (e.g., add document_id)","operationId":"update_message_conversations__conversation_id__messages__message_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Conversation Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Update Message Conversations  Conversation Id  Messages  Message Id  Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/":{"post":{"tags":["documents"],"summary":"Create Document","description":"Create a new document","operationId":"create_document_documents__post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["documents"],"summary":"List Documents","description":"List documents for the authenticated user","operationId":"list_documents_documents__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"include_shared","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Shared"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DocumentListResponse"},"title":"Response List Documents Documents  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{document_id}":{"get":{"tags":["documents"],"summary":"Get Document","description":"Get a specific document","operationId":"get_document_documents__document_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["documents"],"summary":"Update Document","description":"Update a document","operationId":"update_document_documents__document_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["documents"],"summary":"Delete Document","description":"Delete a document","operationId":"delete_document_documents__document_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{document_id}/versions":{"post":{"tags":["documents"],"summary":"Create Document Version","description":"Create a new version of a document with revised content","operationId":"create_document_version_documents__document_id__versions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentVersionCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{document_id}/coordinator-context":{"get":{"tags":["documents"],"summary":"Get Document Coordinator Context","description":"Get coordinator context (API key + session ID) for document revision","operationId":"get_document_coordinator_context_documents__document_id__coordinator_context_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CoordinatorContextResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{document_id}/comments":{"get":{"tags":["documents"],"summary":"Get Document Comments","description":"Get all comment threads for a document","operationId":"get_document_comments_documents__document_id__comments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CommentThreadResponse"},"title":"Response Get Document Comments Documents  Document Id  Comments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["documents"],"summary":"Create Comment","description":"Create a new comment or reply","operationId":"create_comment_documents__document_id__comments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/{document_id}/comments/{comment_id}":{"patch":{"tags":["documents"],"summary":"Update Comment","description":"Update a comment","operationId":"update_comment_documents__document_id__comments__comment_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Comment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["documents"],"summary":"Delete Comment","description":"Delete a comment and its replies","operationId":"delete_comment_documents__document_id__comments__comment_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Document Id"}},{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Comment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/images":{"post":{"tags":["documents"],"summary":"Upload Document Image","operationId":"upload_document_image_documents_images_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"document_artifact_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Artifact Id"}},{"name":"workspace_id","in":"query","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_document_image_documents_images_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/documents/images/{file_id}":{"get":{"tags":["documents"],"summary":"Resolve Document Image","operationId":"resolve_document_image_documents_images__file_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"file_id","in":"path","required":true,"schema":{"type":"string","title":"File Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolvedImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/document-images":{"post":{"tags":["documents"],"summary":"Upload Agent Document Image","operationId":"upload_agent_document_image_workspaces__workspace_id__document_images_post","parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_agent_document_image_workspaces__workspace_id__document_images_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentImageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/billing/checkout-session":{"post":{"tags":["billing"],"summary":"Create Checkout Session","description":"Create a Stripe checkout session for subscription purchase.\nRequires authentication via Stytch session token.","operationId":"create_checkout_session_billing_checkout_session_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/subscription-status":{"post":{"tags":["billing"],"summary":"Get Subscription Status","description":"Check subscription status by email or session ID.\nRequires authentication via Stytch session token.","operationId":"get_subscription_status_billing_subscription_status_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionStatusRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/customer-portal":{"post":{"tags":["billing"],"summary":"Create Customer Portal Session","description":"Create a Stripe Customer Portal session for subscription management.\nAllows users to update payment methods, cancel subscriptions, view invoices, etc.\nRequires authentication via Stytch session token.","operationId":"create_customer_portal_session_billing_customer_portal_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPortalRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/usage-status":{"get":{"tags":["billing"],"summary":"Get Usage Status","description":"Get the user's current conversation usage status.\nReturns plan tier, current usage count, limit, and reset date.\nFree tier: 3 conversations per day, resets daily\nPremium tier: unlimited conversations","operationId":"get_usage_status_billing_usage_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/billing/turn-usage-status":{"get":{"tags":["billing"],"summary":"Get Turn Usage Status","description":"Hourly rolling-window message usage status for workspace turns.","operationId":"get_turn_usage_status_billing_turn_usage_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnUsageStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/e2b/stop-sandbox/{sandbox_id}":{"delete":{"tags":["e2b"],"summary":"Stop Sandbox","operationId":"stop_sandbox_e2b_stop_sandbox__sandbox_id__delete","parameters":[{"name":"sandbox_id","in":"path","required":true,"schema":{"type":"string","title":"Sandbox Id"}},{"name":"include_events","in":"query","required":false,"schema":{"type":"boolean","description":"Fetch sandbox events from E2B API","default":false,"title":"Include Events"},"description":"Fetch sandbox events from E2B API"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/e2b/agent-service-health":{"get":{"tags":["e2b"],"summary":"Health Check Sandbox","operationId":"health_check_sandbox_e2b_agent_service_health_get","parameters":[{"name":"sandbox_url","in":"query","required":true,"schema":{"type":"string","description":"Base URL of sandbox","title":"Sandbox Url"},"description":"Base URL of sandbox"},{"name":"timeout","in":"query","required":false,"schema":{"type":"number","maximum":30.0,"minimum":0.1,"description":"Request timeout in seconds","default":3.0,"title":"Timeout"},"description":"Request timeout in seconds"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Health Check Sandbox E2B Agent Service Health Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/connected-sources/setup/start/github":{"post":{"tags":["connected-sources"],"summary":"Start Github Connected Source Setup","operationId":"start_github_connected_source_setup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubBeginSetupInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedSourceSetupStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/connected-sources/setup/start/slack":{"post":{"tags":["connected-sources"],"summary":"Start Slack Connected Source Setup","operationId":"start_slack_connected_source_setup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackBeginSetupInput"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedSourceSetupStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/connected-sources/setup/start/uploaded-file":{"post":{"tags":["connected-sources"],"summary":"Start Uploaded File Connected Source Setup","operationId":"start_uploaded_file_connected_source_setup","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_start_uploaded_file_connected_source_setup"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedSourceSetupStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/connected-sources/available":{"get":{"tags":["connected-sources"],"summary":"List Available Connected Sources","operationId":"list_available_connected_sources","security":[{"HTTPBearer":[]}],"parameters":[{"name":"adapter","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AdapterType"},{"type":"null"}],"title":"Adapter"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAvailableConnectedSourcesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/connected-sources":{"post":{"tags":["connected-sources"],"summary":"Create Workspace Connected Source","operationId":"attach_connected_source","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/CreateWorkspaceConnectedSourceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectedSource"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["connected-sources"],"summary":"List Connected Sources","operationId":"list_connected_sources","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":{"type":"array","items":{"$ref":"#/components/schemas/ConnectedSource"},"title":"Response List Connected Sources"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workspaces/{workspace_id}/connected-sources/{connected_source_id}":{"delete":{"tags":["connected-sources"],"summary":"Remove Connected Source","operationId":"remove_connected_source","security":[{"HTTPBearer":[]}],"parameters":[{"name":"connected_source_id","in":"path","required":true,"schema":{"type":"string","title":"Connected Source Id"}},{"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"}}}}}}},"/integrations":{"get":{"tags":["integrations"],"summary":"List Integrations","operationId":"list_integrations","security":[{"HTTPBearer":[]}],"parameters":[{"name":"integration_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/IntegrationType"},{"type":"null"}],"title":"Integration Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListIntegrationsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/cleanrooms/grants":{"get":{"tags":["cleanroom"],"summary":"List Cleanroom Grants","description":"List customers who have granted us GitHub App access (the picker source).","operationId":"list_cleanroom_grants_internal_cleanrooms_grants_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CleanroomGrantsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/internal/cleanrooms/{customer}/up":{"post":{"tags":["cleanroom"],"summary":"Cleanroom Up","description":"Resume or create this operator's named-treatment clean room for the customer.","operationId":"cleanroom_up_internal_cleanrooms__customer__up_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","title":"Customer"}},{"name":"treatment","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,38}$","title":"Treatment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanroom Up Internal Cleanrooms  Customer  Up Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/cleanrooms/{customer}/down":{"post":{"tags":["cleanroom"],"summary":"Cleanroom Down","description":"Pause one treatment's clean room for the customer.","operationId":"cleanroom_down_internal_cleanrooms__customer__down_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","title":"Customer"}},{"name":"treatment","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,38}$","title":"Treatment"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanroom Down Internal Cleanrooms  Customer  Down Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/cleanrooms/{customer}/cut":{"post":{"tags":["cleanroom"],"summary":"Cleanroom Cut","description":"Snapshot one repo of a treatment into a code image; return its ECR digest.","operationId":"cleanroom_cut_internal_cleanrooms__customer__cut_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","title":"Customer"}},{"name":"treatment","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,38}$","title":"Treatment"}},{"name":"repo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanroom Cut Internal Cleanrooms  Customer  Cut Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/cleanrooms/{customer}/treatments":{"get":{"tags":["cleanroom"],"summary":"Cleanroom Treatments","description":"This operator's existing treatments for a customer (the CLI picker source).","operationId":"cleanroom_treatments_internal_cleanrooms__customer__treatments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","title":"Customer"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanroom Treatments Internal Cleanrooms  Customer  Treatments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/cleanrooms/resolve":{"get":{"tags":["cleanroom"],"summary":"Cleanroom Resolve","description":"Map an E2B sandbox id (from its terminal URL) to its (customer, treatment).","operationId":"cleanroom_resolve_internal_cleanrooms_resolve_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"sandbox_id","in":"query","required":true,"schema":{"type":"string","title":"Sandbox Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanroom Resolve Internal Cleanrooms Resolve Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/cleanrooms/{customer}/repos":{"get":{"tags":["cleanroom"],"summary":"Cleanroom Repos","description":"The customer's granted repos (the CLI repo-picker source).","operationId":"cleanroom_repos_internal_cleanrooms__customer__repos_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","title":"Customer"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanroom Repos Internal Cleanrooms  Customer  Repos Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/cleanrooms/{customer}/verify":{"get":{"tags":["cleanroom"],"summary":"Cleanroom Verify","description":"Inspect the latest cut image for a (repo, treatment); report safety checks.","operationId":"cleanroom_verify_internal_cleanrooms__customer__verify_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"customer","in":"path","required":true,"schema":{"type":"string","title":"Customer"}},{"name":"treatment","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,38}$","title":"Treatment"}},{"name":"repo","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanroom Verify Internal Cleanrooms  Customer  Verify Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/internal/cleanrooms":{"get":{"tags":["cleanroom"],"summary":"Cleanroom Ls","description":"List clean rooms (one row per treatment): yours by default, all with scope=all.","operationId":"cleanroom_ls_internal_cleanrooms_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"scope","in":"query","required":false,"schema":{"type":"string","pattern":"^(mine|all)$","default":"mine","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cleanroom Ls Internal Cleanrooms Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/waitlist":{"post":{"tags":["waitlist"],"summary":"Join Waitlist","description":"Add an email to the waitlist. Intentionally unauthenticated.\n\nIdempotent: duplicate email returns the existing entry.","operationId":"join_waitlist","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/cli-version":{"get":{"tags":["cli-version"],"summary":"Get Cli Version Info","operationId":"get_cli_version_info","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliVersionInfo"}}}}}}},"/issues":{"post":{"tags":["issues"],"summary":"File Issue","operationId":"file_issue","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileIssueRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileIssueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/probes":{"post":{"tags":["probes"],"summary":"Create Probe","operationId":"create_probe","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProbeBody"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["probes"],"summary":"List Probes","operationId":"list_probes","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ProbeStatus"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":1000,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProbesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/probes/{probe_id}":{"get":{"tags":["probes"],"summary":"Get Probe","operationId":"get_probe","parameters":[{"name":"probe_id","in":"path","required":true,"schema":{"type":"string","title":"Probe Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeWithArtifacts"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/probes/{probe_id}/review":{"post":{"tags":["probes"],"summary":"Review Probe","operationId":"review_probe","security":[{"HTTPBearer":[]}],"parameters":[{"name":"probe_id","in":"path","required":true,"schema":{"type":"string","title":"Probe Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewProbeBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProbeState"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github/workspaces/{workspace_id}/linkable-nodes":{"get":{"tags":["github-links"],"summary":"List Linkable Nodes","operationId":"list_linkable_nodes","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":{"$ref":"#/components/schemas/LinkableNodesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github/workspaces/{workspace_id}/pr-links":{"get":{"tags":["github-links"],"summary":"List Workspace Pr Links","operationId":"list_workspace_pr_links","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":{"$ref":"#/components/schemas/WorkspacePrLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github/pr-links":{"get":{"tags":["github-links"],"summary":"Get Pr Links","operationId":"get_pr_links","security":[{"HTTPBearer":[]}],"parameters":[{"name":"repo","in":"query","required":true,"schema":{"type":"string","title":"Repo"}},{"name":"pr_number","in":"query","required":true,"schema":{"type":"integer","title":"Pr Number"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["github-links"],"summary":"Write Pr Links","operationId":"write_pr_links","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteLinksRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WriteLinksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/github/pull-request":{"get":{"tags":["github"],"summary":"Get Github Pull Request Status","operationId":"get_github_pull_request_status","security":[{"HTTPBearer":[]}],"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","description":"github.com pull-request URL","title":"Url"},"description":"github.com pull-request URL"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrStatus"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/jwks.json":{"get":{"summary":"Jwks","description":"Public key endpoint for agent-service traffic token verification.","operationId":"jwks__well_known_jwks_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health":{"get":{"summary":"Health","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/db":{"get":{"summary":"Health Db","operationId":"health_db_health_db_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcceptInviteResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"role":{"type":"string","enum":["owner","editor","viewer","commenter"],"title":"Role"},"review":{"anyOf":[{"$ref":"#/components/schemas/AcceptInviteReviewHint"},{"type":"null"}]}},"type":"object","required":["workspace_id","role"],"title":"AcceptInviteResponse","description":"Accept result; `review` is set iff the invite carried a review request (SCO-1353)."},"AcceptInviteReviewHint":{"properties":{"review_request_id":{"type":"string","title":"Review Request Id"},"snapshot_id":{"type":"string","title":"Snapshot Id"}},"type":"object","required":["review_request_id","snapshot_id"],"title":"AcceptInviteReviewHint","description":"Node-anchored routing hint set when an accepted invite carried a review request."},"AccessTokenResponse":{"properties":{"token":{"type":"string","title":"Token","deprecated":true},"rs256_token":{"type":"string","title":"Rs256 Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["token","rs256_token","expires_at"],"title":"AccessTokenResponse"},"ActiveSessionResponse":{"properties":{"active":{"type":"boolean","title":"Active"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"},"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id"}},"type":"object","required":["active"],"title":"ActiveSessionResponse","description":"Response from active-session — tells browser if there's a live session to reconnect to"},"AdapterType":{"type":"string","enum":["github","slack","uploaded_file"],"title":"AdapterType","description":"Type of source adapter (github, uploaded_file, etc.)"},"AddWorkspaceMemberRequest":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"},"role":{"type":"string","enum":["owner","editor","viewer","commenter"],"title":"Role","default":"editor"}},"type":"object","required":["email"],"title":"AddWorkspaceMemberRequest"},"AgentCommentBody":{"properties":{"quote":{"type":"string","title":"Quote"},"body":{"type":"string","title":"Body"},"context_before":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Before"},"context_after":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context After"}},"type":"object","required":["quote","body"],"title":"AgentCommentBody","description":"A quote-anchored review comment from a synthetic reviewer."},"AgentCommentResponse":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"resolved_anchor_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolved Anchor Text"}},"type":"object","required":["thread_id"],"title":"AgentCommentResponse"},"AgentCounselContextResponse":{"properties":{"snapshot":{"$ref":"#/components/schemas/SnapshotInfo"},"workspace":{"$ref":"#/components/schemas/WorkspaceContextInfo"},"comments":{"items":{"$ref":"#/components/schemas/CommentSnapshot"},"type":"array","title":"Comments","default":[]},"turns":{"items":{"$ref":"#/components/schemas/ReviewerContextTurn"},"type":"array","title":"Turns"}},"type":"object","required":["snapshot","workspace","turns"],"title":"AgentCounselContextResponse","description":"Agent-counsel's snapshot-scoped context. Same shape as SnapshotScopedContext;\nowns its own name + OpenAPI id, decoupled from review-chat. ``turns`` is always\nempty (a counsel review is a single fire-and-forget pass)."},"AgentDecisionResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"snapshot_id":{"type":"string","title":"Snapshot Id"},"requester_id":{"type":"string","title":"Requester Id"},"reviewer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Id"},"pending_invite_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pending Invite Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"latest_agent_counsel_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Agent Counsel Turn Id"},"status":{"type":"string","enum":["open","closed","cancelled"],"title":"Status"},"state":{"anyOf":[{"type":"string","enum":["pending","in_progress","approved","rejected"]},{"type":"null"}],"title":"State"},"engaged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Engaged At"},"decision":{"anyOf":[{"type":"string","enum":["approved","rejected"]},{"type":"null"}],"title":"Decision"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"prior_decisions":{"items":{"$ref":"#/components/schemas/PriorReviewDecision"},"type":"array","title":"Prior Decisions","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","workspace_id","snapshot_id","requester_id","reviewer_id","pending_invite_id","message","status","state","engaged_at","decision","decided_at","created_at","updated_at"],"title":"AgentDecisionResponse","description":"The finish endpoint returns the unenriched review-request shape: the\nagent caller has no use for workspace_name / display names, and resolving\nthem would force a workspace fetch + profile lookup this path skips. The\nclosed request carries an approved decision; the UI hides the verdict for\nagent reviewers."},"AgentFinishBody":{"properties":{},"type":"object","title":"AgentFinishBody","description":"Empty body: the agent does not choose a verdict; finish records approved."},"AgentSpecBody":{"properties":{"model":{"type":"string","title":"Model"},"mode":{"type":"string","title":"Mode"}},"type":"object","required":["model","mode"],"title":"AgentSpecBody"},"ArtifactContent":{"properties":{"blocks":{"items":{},"type":"array","title":"Blocks"},"markdown":{"type":"string","title":"Markdown"}},"type":"object","required":["blocks","markdown"],"title":"ArtifactContent","description":"Blocks + markdown to render. Selection rule lives in\n`_build_artifact_summaries` (cursor-scoped latest capture, else\ncreation node)."},"ArtifactSummary":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"produced_at_turn_id":{"type":"string","title":"Produced At Turn Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"content":{"$ref":"#/components/schemas/ArtifactContent"},"diff":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChangeEntry"},"type":"array"},{"type":"null"}],"title":"Diff"}},"type":"object","required":["id","workspace_id","produced_at_turn_id","created_at","content"],"title":"ArtifactSummary","description":"Server-materialized view of one document artifact.\n\nIdentity + the boundary content to display. Content is picked by\n`_build_artifact_summaries`:\n  * capture snapshots scoped to the reader cursor's ancestor chain\n    (so branches don't leak each other's pre-submit edits)\n  * fallback to the creation node (agent's initial draft) when\n    no capture exists on the branch\n\nRenderer reads `content.markdown` / `content.blocks` directly."},"Body_start_uploaded_file_connected_source_setup":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"visibility":{"$ref":"#/components/schemas/SourceVisibility","default":"private"}},"type":"object","required":["file"],"title":"Body_start_uploaded_file_connected_source_setup"},"Body_upload_agent_document_image_workspaces__workspace_id__document_images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_agent_document_image_workspaces__workspace_id__document_images_post"},"Body_upload_document_image_documents_images_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_document_image_documents_images_post"},"BringForwardEntry":{"properties":{"reviewer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"pending_invite_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pending Invite Id"},"state":{"type":"string","enum":["pending","in_progress","approved","rejected"],"title":"State"},"source_request_id":{"type":"string","title":"Source Request Id"},"source_snapshot_id":{"type":"string","title":"Source Snapshot Id"},"source_snapshot_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Snapshot Name"},"source_created_at":{"type":"string","format":"date-time","title":"Source Created At"},"nodes_behind":{"type":"integer","title":"Nodes Behind"},"comment_count":{"type":"integer","title":"Comment Count"},"comments":{"items":{"$ref":"#/components/schemas/ReviewCommentPreview"},"type":"array","title":"Comments","default":[]},"suggested_action":{"type":"string","enum":["re_request","move","ask_again"],"title":"Suggested Action"}},"type":"object","required":["reviewer_id","display_name","pending_invite_id","state","source_request_id","source_snapshot_id","source_snapshot_name","source_created_at","nodes_behind","comment_count","suggested_action"],"title":"BringForwardEntry"},"BringForwardResponse":{"properties":{"reviewers":{"items":{"$ref":"#/components/schemas/BringForwardEntry"},"type":"array","title":"Reviewers"}},"type":"object","required":["reviewers"],"title":"BringForwardResponse"},"CacheBreak":{"properties":{"ts":{"type":"string","title":"Ts"},"uncached":{"type":"integer","title":"Uncached"},"total":{"type":"integer","title":"Total"},"promptKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Promptkey"},"kind":{"type":"string","enum":["main","subagent"],"title":"Kind"},"agentType":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agenttype"}},"additionalProperties":false,"type":"object","required":["ts","uncached","total","kind"],"title":"CacheBreak"},"CanonicalMessageSpec":{"properties":{"role":{"type":"string","enum":["user","assistant"],"title":"Role"},"content":{"type":"string","maxLength":200000,"title":"Content"},"fidelity":{"anyOf":[{"type":"string","enum":["verbatim","paraphrased","summarized"]},{"type":"null"}],"title":"Fidelity"},"reconstructed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Reconstructed"}},"additionalProperties":false,"type":"object","required":["role","content"],"title":"CanonicalMessageSpec","description":"One message in the verbatim conversation transcript."},"ChangeEntry":{"properties":{"changeType":{"type":"string","enum":["added","modified","removed"],"title":"Changetype"},"concept":{"type":"string","title":"Concept"},"summary":{"type":"string","title":"Summary"},"sectionHeading":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sectionheading"}},"type":"object","required":["changeType","concept","summary"],"title":"ChangeEntry","description":"One semantic change emitted by the agent's `write_document` tool.\n\nField-name casing matches the agent's serialization (camelCase) so\nPydantic round-trips without aliasing."},"CheckoutSessionRequest":{"properties":{"priceId":{"type":"string","title":"Priceid"},"quantity":{"type":"integer","title":"Quantity","default":1},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"return_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Return Url"}},"type":"object","required":["priceId"],"title":"CheckoutSessionRequest"},"CheckoutSessionResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"CheckoutSessionResponse"},"CleanroomGrant":{"properties":{"customer":{"type":"string","title":"Customer"},"name":{"type":"string","title":"Name"},"installation_id":{"type":"integer","title":"Installation Id"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"repos":{"items":{"type":"string"},"type":"array","title":"Repos"},"repo_count":{"type":"integer","title":"Repo Count"}},"type":"object","required":["customer","name","installation_id","repos","repo_count"],"title":"CleanroomGrant"},"CleanroomGrantsResponse":{"properties":{"grants":{"items":{"$ref":"#/components/schemas/CleanroomGrant"},"type":"array","title":"Grants"}},"type":"object","required":["grants"],"title":"CleanroomGrantsResponse"},"CliVersionInfo":{"properties":{"latest":{"type":"string","title":"Latest"},"minimum":{"type":"string","title":"Minimum"}},"type":"object","required":["latest","minimum"],"title":"CliVersionInfo"},"CommentCreate":{"properties":{"content":{"type":"string","title":"Content"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"start_line":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Start Line"},"end_line":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"End Line"}},"type":"object","required":["content"],"title":"CommentCreate"},"CommentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"user_id":{"type":"string","title":"User Id"},"parent_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Id"},"start_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Line"},"end_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Line"},"content":{"type":"string","title":"Content"},"resolved":{"type":"boolean","title":"Resolved"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","document_id","user_id","parent_id","start_line","end_line","content","resolved","created_at","updated_at"],"title":"CommentResponse"},"CommentSnapshot":{"properties":{"id":{"type":"string","title":"Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"author_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Display Name"},"content":{"type":"string","title":"Content"},"anchor_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Text"},"resolved":{"type":"boolean","title":"Resolved"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","content","resolved","created_at"],"title":"CommentSnapshot","description":"Comment projection for agent context — derived from `thread_comments`\njoined with `threads` and the author's user profile.\n\nReplies share `parent_id` = the thread's first comment id (so the agent\nprompt's `<comments>` block keeps its `reply_to` thread structure intact).\n`anchor_text` carries the prosemirror range the thread anchors to (mirrored\nfrom hocuspocus when the comment mark lands in the Y.Doc); null for\npre-anchor threads and threads whose anchor was lost to a concurrent edit."},"CommentThreadResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"document_id":{"type":"string","format":"uuid","title":"Document Id"},"user_id":{"type":"string","title":"User Id"},"start_line":{"type":"integer","title":"Start Line"},"end_line":{"type":"integer","title":"End Line"},"content":{"type":"string","title":"Content"},"resolved":{"type":"boolean","title":"Resolved"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"replies":{"items":{"$ref":"#/components/schemas/CommentResponse"},"type":"array","title":"Replies","default":[]}},"type":"object","required":["id","document_id","user_id","start_line","end_line","content","resolved","created_at","updated_at"],"title":"CommentThreadResponse","description":"Top-level comment with nested replies"},"CommentUpdate":{"properties":{"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"resolved":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Resolved"}},"type":"object","title":"CommentUpdate"},"CommitReferenceSummary":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"produced_at_turn_id":{"type":"string","title":"Produced At Turn Id"},"repo":{"type":"string","title":"Repo"},"branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branch"},"commit_sha":{"type":"string","title":"Commit Sha"},"short_sha":{"type":"string","title":"Short Sha"},"commit_title":{"type":"string","title":"Commit Title"},"commit_message":{"type":"string","title":"Commit Message"},"commit_url":{"type":"string","title":"Commit Url"},"author_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Name"},"author_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author Email"},"committed_at":{"type":"string","format":"date-time","title":"Committed At"},"files_changed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Files Changed"},"additions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Additions"},"deletions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Deletions"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","workspace_id","produced_at_turn_id","repo","commit_sha","short_sha","commit_title","commit_message","commit_url","committed_at","created_at"],"title":"CommitReferenceSummary","description":"Server-materialized view of one code-commit reference attached to\na turn. Read-only; rows are immutable after a Scott push.\n\nRenderer groups by `produced_at_turn_id`, parallel to `ArtifactSummary`.\nSeparate top-level list on `WorkspaceStateResponse` rather than a\ndiscriminated union with `ArtifactSummary`, because orval handles\ndiscriminated unions poorly per anti-duplication-pipeline."},"CommitSnapshotRequest":{"properties":{"name":{"type":"string","title":"Name"},"blocks":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Blocks"},"markdown":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Markdown"}},"type":"object","required":["name"],"title":"CommitSnapshotRequest"},"CompleteOnboardingResponse":{"properties":{"profile":{"$ref":"#/components/schemas/UserProfileResponse"},"current_org":{"$ref":"#/components/schemas/OrgRefDTO"}},"type":"object","required":["profile","current_org"],"title":"CompleteOnboardingResponse"},"ConnectedSource":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"linked_by_user_id":{"type":"string","title":"Linked By User Id"},"adapter":{"$ref":"#/components/schemas/AdapterType"},"visibility":{"$ref":"#/components/schemas/SourceVisibility","default":"private"},"config":{"anyOf":[{"$ref":"#/components/schemas/GitHubSourceConfig"},{"$ref":"#/components/schemas/SlackSourceConfig"},{"$ref":"#/components/schemas/UploadedFileSourceConfig"}],"title":"Config"},"metadata":{"anyOf":[{"$ref":"#/components/schemas/GitHubSourceMetadata"},{"$ref":"#/components/schemas/SlackSourceMetadata"},{"$ref":"#/components/schemas/UploadedFileSourceMetadata"}],"title":"Metadata"}},"type":"object","required":["linked_by_user_id","adapter","config","metadata"],"title":"ConnectedSource"},"ConnectedSourceSelection":{"properties":{"adapter":{"$ref":"#/components/schemas/AdapterType"},"selection":{"anyOf":[{"$ref":"#/components/schemas/GitHubSourceSelection"},{"$ref":"#/components/schemas/SlackSourceSelection"},{"$ref":"#/components/schemas/UploadedFileSourceSelection"}],"title":"Selection"}},"type":"object","required":["adapter","selection"],"title":"ConnectedSourceSelection"},"ConnectedSourceSetupStartResponse":{"properties":{"adapter":{"$ref":"#/components/schemas/AdapterType"},"setup_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Setup Token"},"expires_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In"},"setup":{"anyOf":[{"$ref":"#/components/schemas/OAuthBeginSetupResult"},{"$ref":"#/components/schemas/UploadBeginSetupResult"}],"title":"Setup"}},"type":"object","required":["adapter","setup"],"title":"ConnectedSourceSetupStartResponse"},"ConversationCreate":{"properties":{"repo_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Path"},"repo_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Repo Paths"},"task":{"type":"string","title":"Task"},"agent_configs":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Agent Configs"}},"type":"object","required":["task"],"title":"ConversationCreate"},"ConversationCreateResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"anthropic_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anthropic Key"}},"type":"object","required":["conversation_id"],"title":"ConversationCreateResponse","description":"Response when creating a new conversation"},"ConversationListResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"task":{"type":"string","title":"Task"},"repo_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Path"},"repo_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Repo Paths"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"message_count":{"type":"integer","title":"Message Count","default":0},"is_browser":{"type":"boolean","title":"Is Browser","readOnly":true}},"type":"object","required":["id","task","repo_path","created_at","updated_at","is_browser"],"title":"ConversationListResponse","description":"Lightweight response for listing conversations"},"ConversationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","title":"User Id"},"repo_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Path"},"repo_paths":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Repo Paths"},"task":{"type":"string","title":"Task"},"agent_configs":{"anyOf":[{},{"type":"null"}],"title":"Agent Configs"},"coordinator_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coordinator Session Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"is_browser":{"type":"boolean","title":"Is Browser","readOnly":true}},"type":"object","required":["id","user_id","repo_path","task","agent_configs","created_at","updated_at","is_browser"],"title":"ConversationResponse","description":"Metadata only - no messages"},"ConversationUpdate":{"properties":{"coordinator_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coordinator Session Id"}},"type":"object","title":"ConversationUpdate","description":"For updating conversation metadata"},"CoordinatorContextResponse":{"properties":{"anthropic_key":{"type":"string","title":"Anthropic Key"},"coordinator_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coordinator Session Id"},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id"}},"type":"object","required":["anthropic_key","coordinator_session_id","conversation_id"],"title":"CoordinatorContextResponse","description":"Context needed to resume coordinator for document revision"},"CreateDocumentArtifactRequest":{"properties":{"id":{"type":"string","title":"Id"},"turn_id":{"type":"string","title":"Turn Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"diff":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChangeEntry"},"type":"array"},{"type":"null"}],"title":"Diff"},"initial_blocks":{"items":{},"type":"array","title":"Initial Blocks"},"initial_markdown":{"type":"string","title":"Initial Markdown"}},"type":"object","required":["id","turn_id","initial_blocks","initial_markdown"],"title":"CreateDocumentArtifactRequest","description":"Body for POST /document-artifacts.\n\nSent by the agent service when `write_document` produces a new\ndocument artifact. The client UUID becomes the artifact's\n`document_artifact_id`. The Hocuspocus room id is built at the\nboundary as `<workspace_id>:<document_artifact_id>`; not stored in\nthe schema."},"CreateDocumentArtifactResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"produced_at_turn_id":{"type":"string","title":"Produced At Turn Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","workspace_id","name","produced_at_turn_id","created_at"],"title":"CreateDocumentArtifactResponse","description":"Same shape as the document-only fields of `ArtifactSummary`,\ndeclared here to keep the write endpoint self-contained."},"CreateInviteRequest":{"properties":{"invitee_email":{"type":"string","title":"Invitee Email"},"role":{"type":"string","enum":["owner","editor","viewer","commenter"],"title":"Role","default":"editor"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"notify_people":{"type":"boolean","title":"Notify People","default":true},"review":{"anyOf":[{"$ref":"#/components/schemas/ReviewMetadata"},{"type":"null"}]}},"type":"object","required":["invitee_email"],"title":"CreateInviteRequest"},"CreateProbeBody":{"properties":{"id":{"type":"string","title":"Id"},"site":{"type":"string","title":"Site"},"slot":{"type":"string","title":"Slot"},"subsystem":{"type":"string","title":"Subsystem"},"mint_run":{"type":"string","title":"Mint Run"},"artifacts":{"$ref":"#/components/schemas/ProbeArtifacts"},"status":{"anyOf":[{"$ref":"#/components/schemas/ProbeStatus"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["id","site","slot","subsystem","mint_run","artifacts"],"title":"CreateProbeBody"},"CreateReviewChatTurnRequest":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"parent_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Turn Id"},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"}},"type":"object","required":["snapshot_id"],"title":"CreateReviewChatTurnRequest","description":"Renderer body for opening/extending a private review-chat thread.\n\n`parent_turn_id` is null for the thread's first message and the prior turn's\nid thereafter. `id` lets the client supply the turn id (optimistic UI),\nmirroring CreateTurnRequest."},"CreateReviewChatTurnResponse":{"properties":{"turn_id":{"type":"string","title":"Turn Id"},"handoff_code":{"type":"string","title":"Handoff Code","description":"Single-use code redeemable at /agent-loop/internal/agent-token/redeem for the review-chat agent-svc JWT (caps=['review-chat-turn'] + snapshot_id) bound to this turn. 60s TTL."}},"type":"object","required":["turn_id","handoff_code"],"title":"CreateReviewChatTurnResponse"},"CreateReviewRequestsBody":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"reviewers":{"items":{"$ref":"#/components/schemas/ReviewerInput"},"type":"array","minItems":1,"title":"Reviewers"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["snapshot_id","reviewers"],"title":"CreateReviewRequestsBody"},"CreateSnapshotRequest":{"properties":{"parent_snapshot_id":{"type":"string","title":"Parent Snapshot Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["parent_snapshot_id"],"title":"CreateSnapshotRequest"},"CreateSyncChatTurnRequest":{"properties":{"parent_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Turn Id"},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"connected_sources":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConnectedSourceSelection"},"type":"array"},{"type":"null"}],"title":"Connected Sources"}},"type":"object","title":"CreateSyncChatTurnRequest","description":"Renderer body for opening/extending the caller's sync-chat thread.\n\nparent_turn_id is null for the first message, the prior turn's id\nthereafter. id lets the client supply the turn id (optimistic UI)."},"CreateSyncChatTurnResponse":{"properties":{"turn_id":{"type":"string","title":"Turn Id"},"handoff_code":{"type":"string","title":"Handoff Code","description":"Single-use code redeemable at /agent-loop/internal/agent-token/redeem for the sync-chat agent-svc JWT (caps=['sync-chat-turn']) bound to this turn. 60s TTL."}},"type":"object","required":["turn_id","handoff_code"],"title":"CreateSyncChatTurnResponse"},"CreateTurnRequest":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"artifact_context":{"items":{"type":"string"},"type":"array","title":"Artifact Context"},"parent_snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Snapshot Id"}},"type":"object","title":"CreateTurnRequest"},"CreateTurnResponse":{"properties":{"id":{"type":"string","title":"Id"},"handoff_code":{"type":"string","title":"Handoff Code","description":"Single-use code redeemable at /agent-loop/internal/agent-token/redeem for the agent-svc JWT bound to this turn. 60s TTL."}},"type":"object","required":["id","handoff_code"],"title":"CreateTurnResponse"},"CreateWorkspaceConnectedSourceRequest":{"properties":{"adapter":{"$ref":"#/components/schemas/AdapterType"},"selection":{"anyOf":[{"$ref":"#/components/schemas/GitHubSourceSelection"},{"$ref":"#/components/schemas/SlackSourceSelection"},{"$ref":"#/components/schemas/UploadedFileSourceSelection"}],"title":"Selection"}},"type":"object","required":["adapter","selection"],"title":"CreateWorkspaceConnectedSourceRequest"},"CreateWorkspaceRequest":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"initial_doc_content":{"type":"string","title":"Initial Doc Content","default":""},"initial_doc_label":{"type":"string","title":"Initial Doc Label","default":"Initial version"},"use_local_sandbox":{"type":"boolean","title":"Use Local Sandbox","default":false},"connected_sources":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConnectedSourceSelection"},"type":"array"},{"type":"null"}],"title":"Connected Sources"},"scott_push":{"anyOf":[{"$ref":"#/components/schemas/ScottPushSpec"},{"type":"null"}]}},"type":"object","required":["name"],"title":"CreateWorkspaceRequest"},"CreateWorkspaceResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"initial_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Turn Id"},"final_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Turn Id"},"planspace_url":{"type":"string","title":"Planspace Url"}},"type":"object","required":["workspace_id","planspace_url"],"title":"CreateWorkspaceResponse"},"CurrentOrg":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"claimed_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimed Domain"},"external_sharing_enabled":{"type":"boolean","title":"External Sharing Enabled"},"viewer_role":{"type":"string","enum":["owner","admin","member"],"title":"Viewer Role"},"is_personal":{"type":"boolean","title":"Is Personal","description":"True when the org has no claimed domain — i.e. it is a personal/solo org.","readOnly":true}},"type":"object","required":["id","name","external_sharing_enabled","viewer_role","is_personal"],"title":"CurrentOrg","description":"The viewer's own org — adds the fields the renderer needs to render settings\nwithout a second round-trip: the toggle value plus the viewer's role for owner-gated UI."},"CursorResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"user_id":{"type":"string","title":"User Id"},"turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turn Id"},"current_snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Snapshot Id"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["workspace_id","user_id","turn_id","updated_at"],"title":"CursorResponse"},"CustomerPortalRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"CustomerPortalRequest"},"CustomerPortalResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"CustomerPortalResponse"},"DocumentCreate":{"properties":{"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"parent_document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Document Id"},"child_document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Child Document Id"},"version_number":{"type":"integer","title":"Version Number","default":1},"coordinator_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coordinator Session Id"},"document_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Session Id"},"is_public":{"type":"boolean","title":"Is Public","default":false},"shared_with":{"items":{"type":"string"},"type":"array","title":"Shared With","default":[]},"doc_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Doc Metadata"}},"type":"object","required":["title","content"],"title":"DocumentCreate"},"DocumentImageResponse":{"properties":{"file_id":{"type":"string","title":"File Id"},"url":{"type":"string","title":"Url"}},"type":"object","required":["file_id","url"],"title":"DocumentImageResponse"},"DocumentListResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"parent_document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Document Id"},"child_document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Child Document Id"},"version_number":{"type":"integer","title":"Version Number","default":1},"coordinator_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coordinator Session Id"},"is_public":{"type":"boolean","title":"Is Public"},"shared_with":{"items":{"type":"string"},"type":"array","title":"Shared With"},"doc_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Doc Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"comment_count":{"type":"integer","title":"Comment Count","default":0}},"type":"object","required":["id","title","content","conversation_id","is_public","shared_with","doc_metadata","created_at","updated_at"],"title":"DocumentListResponse"},"DocumentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","title":"User Id"},"title":{"type":"string","title":"Title"},"content":{"type":"string","title":"Content"},"conversation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Conversation Id"},"parent_document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Document Id"},"child_document_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Child Document Id"},"version_number":{"type":"integer","title":"Version Number","default":1},"coordinator_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coordinator Session Id"},"document_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Session Id"},"is_public":{"type":"boolean","title":"Is Public"},"shared_with":{"items":{"type":"string"},"type":"array","title":"Shared With"},"doc_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Doc Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","title","content","conversation_id","is_public","shared_with","doc_metadata","created_at","updated_at"],"title":"DocumentResponse"},"DocumentUpdate":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"},"shared_with":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Shared With"},"doc_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Doc Metadata"},"document_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Session Id"}},"type":"object","title":"DocumentUpdate"},"DocumentVersionCreate":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"DocumentVersionCreate","description":"Schema for creating a new document version"},"FileIssueRequest":{"properties":{"title":{"type":"string","maxLength":300,"minLength":1,"title":"Title"},"description":{"type":"string","title":"Description","default":""},"labels":{"items":{"type":"string"},"type":"array","title":"Labels"},"state":{"type":"string","title":"State","default":"Backlog"},"extra_fields":{"items":{"$ref":"#/components/schemas/IssueField"},"type":"array","title":"Extra Fields"},"screenshots":{"items":{"type":"string"},"type":"array","title":"Screenshots"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"workspace_snapshot":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Workspace Snapshot"}},"type":"object","required":["title"],"title":"FileIssueRequest"},"FileIssueResponse":{"properties":{"issue_url":{"type":"string","title":"Issue Url"},"issue_identifier":{"type":"string","title":"Issue Identifier"}},"type":"object","required":["issue_url","issue_identifier"],"title":"FileIssueResponse"},"FileRetrievalDetails":{"properties":{"kind":{"$ref":"#/components/schemas/RetrievalKind","default":"file"},"download_url":{"type":"string","title":"Download Url"},"filename":{"type":"string","title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"}},"type":"object","required":["download_url","filename"],"title":"FileRetrievalDetails","description":"Details for retrieving source via file download"},"GitHubBeginSetupInput":{"properties":{"redirect_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect To"}},"type":"object","title":"GitHubBeginSetupInput"},"GitHubInstall":{"properties":{"integration_type":{"type":"string","const":"github","title":"Integration Type","default":"github"},"installation_id":{"type":"integer","title":"Installation Id"},"account_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Login"},"status":{"type":"string","title":"Status"}},"type":"object","required":["installation_id","status"],"title":"GitHubInstall"},"GitHubRepoAvailableSource":{"properties":{"adapter":{"type":"string","const":"github","title":"Adapter","default":"github"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"full_name":{"type":"string","title":"Full Name"},"private":{"type":"boolean","title":"Private","default":true},"branches":{"items":{"$ref":"#/components/schemas/GitHubRepoAvailableSourceBranch"},"type":"array","title":"Branches"}},"type":"object","required":["full_name"],"title":"GitHubRepoAvailableSource"},"GitHubRepoAvailableSourceBranch":{"properties":{"name":{"type":"string","title":"Name"},"commit_sha":{"type":"string","title":"Commit Sha"}},"type":"object","required":["name","commit_sha"],"title":"GitHubRepoAvailableSourceBranch"},"GitHubSourceConfig":{"properties":{"repo":{"type":"string","title":"Repo"},"branch":{"type":"string","title":"Branch"}},"type":"object","required":["repo","branch"],"title":"GitHubSourceConfig","description":"Configuration for a GitHub source"},"GitHubSourceMetadata":{"properties":{"installation_id":{"type":"integer","title":"Installation Id"},"commit_sha":{"type":"string","title":"Commit Sha"}},"type":"object","required":["installation_id","commit_sha"],"title":"GitHubSourceMetadata","description":"Metadata for a GitHub source"},"GitHubSourceSelection":{"properties":{"repo":{"type":"string","title":"Repo"},"branch":{"type":"string","title":"Branch"}},"type":"object","required":["repo","branch"],"title":"GitHubSourceSelection","description":"User's selection when connecting a GitHub source"},"GitRetrievalDetails":{"properties":{"kind":{"$ref":"#/components/schemas/RetrievalKind","default":"git"},"clone_url":{"type":"string","title":"Clone Url"},"token":{"type":"string","title":"Token"},"repo":{"type":"string","title":"Repo"},"branch":{"type":"string","title":"Branch"},"commit_sha":{"type":"string","title":"Commit Sha"}},"type":"object","required":["clone_url","token","repo","branch","commit_sha"],"title":"GitRetrievalDetails","description":"Details for retrieving source via git clone"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntegrationType":{"type":"string","enum":["github","slack"],"title":"IntegrationType","description":"Type of OAuth integration that produces a third-party install."},"InvitePreviewResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"}},"type":"object","required":["workspace_id"],"title":"InvitePreviewResponse"},"InviteResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"invitee_email":{"type":"string","title":"Invitee Email"},"role":{"type":"string","enum":["owner","editor","viewer","commenter"],"title":"Role"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"accepted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Accepted At"}},"type":"object","required":["id","workspace_id","invitee_email","role","message","token","expires_at","created_at","accepted_at"],"title":"InviteResponse"},"IssueField":{"properties":{"label":{"type":"string","maxLength":80,"minLength":1,"title":"Label"},"value":{"type":"string","maxLength":400,"minLength":1,"title":"Value"}},"type":"object","required":["label","value"],"title":"IssueField","description":"A labelled value rendered into the Linear issue description (e.g. Category)."},"LinkableNode":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"approval_state":{"type":"string","title":"Approval State"}},"type":"object","required":["snapshot_id","name","created_at","approval_state"],"title":"LinkableNode"},"LinkableNodesResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/LinkableNode"},"type":"array","title":"Nodes"}},"type":"object","required":["nodes"],"title":"LinkableNodesResponse"},"ListAvailableConnectedSourcesResponse":{"properties":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/GitHubRepoAvailableSource"},{"$ref":"#/components/schemas/SlackChannelAvailableSource"},{"$ref":"#/components/schemas/UploadedFileAvailableSource"}]},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ListAvailableConnectedSourcesResponse"},"ListIntegrationsResponse":{"properties":{"items":{"items":{"anyOf":[{"$ref":"#/components/schemas/GitHubInstall"},{"$ref":"#/components/schemas/SlackInstall"}]},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ListIntegrationsResponse"},"ListNotificationsResponse":{"properties":{"notifications":{"items":{"$ref":"#/components/schemas/NotificationResponse"},"type":"array","title":"Notifications"}},"type":"object","required":["notifications"],"title":"ListNotificationsResponse"},"ListProbesResponse":{"properties":{"probes":{"items":{"$ref":"#/components/schemas/ProbeState"},"type":"array","title":"Probes"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["probes"],"title":"ListProbesResponse"},"ListReviewRequestsResponse":{"properties":{"review_requests":{"items":{"$ref":"#/components/schemas/ReviewRequestResponse"},"type":"array","title":"Review Requests"}},"type":"object","required":["review_requests"],"title":"ListReviewRequestsResponse"},"ListWorkspaceInvitesResponse":{"properties":{"invites":{"items":{"$ref":"#/components/schemas/InviteResponse"},"type":"array","title":"Invites"}},"type":"object","required":["invites"],"title":"ListWorkspaceInvitesResponse"},"ListWorkspaceMembersResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/WorkspaceMemberResponse"},"type":"array","title":"Members"}},"type":"object","required":["members"],"title":"ListWorkspaceMembersResponse"},"ListWorkspacesResponse":{"properties":{"workspaces":{"items":{"$ref":"#/components/schemas/WorkspaceListItem"},"type":"array","title":"Workspaces"}},"type":"object","required":["workspaces"],"title":"ListWorkspacesResponse"},"MemberCursor":{"properties":{"user_id":{"type":"string","title":"User Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turn Id"}},"type":"object","required":["user_id","display_name","avatar_url","turn_id"],"title":"MemberCursor"},"MessageAppend":{"properties":{"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages"}},"type":"object","required":["messages"],"title":"MessageAppend","description":"For appending messages to a conversation"},"MessageUpdate":{"properties":{"document_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Document Id"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"}},"type":"object","title":"MessageUpdate","description":"For updating a specific message in a conversation"},"MoveReviewRequestBody":{"properties":{"target_snapshot_id":{"type":"string","title":"Target Snapshot Id"}},"type":"object","required":["target_snapshot_id"],"title":"MoveReviewRequestBody"},"MyPendingInviteResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"role":{"type":"string","enum":["owner","editor","viewer","commenter"],"title":"Role"}},"type":"object","required":["workspace_id","role"],"title":"MyPendingInviteResponse","description":"Pending-invite preview for the authenticated user, scoped to a workspace."},"NodeReviewCounts":{"properties":{"approved":{"type":"integer","title":"Approved"},"in_progress":{"type":"integer","title":"In Progress"},"rejected":{"type":"integer","title":"Rejected"},"pending":{"type":"integer","title":"Pending"}},"type":"object","required":["approved","in_progress","rejected","pending"],"title":"NodeReviewCounts"},"NotificationResponse":{"properties":{"id":{"type":"string","title":"Id"},"type":{"$ref":"#/components/schemas/NotificationType"},"workspace_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workspace Id"},"actor_user_id":{"type":"string","title":"Actor User Id"},"actor_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Display Name"},"entity_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Type"},"entity_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity Id"},"payload":{"anyOf":[{},{"type":"null"}],"title":"Payload"},"read_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Read At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","type","workspace_id","actor_user_id","entity_type","entity_id","payload","read_at","created_at"],"title":"NotificationResponse"},"NotificationType":{"type":"string","enum":["mention","workspace_invite","member_joined","fork_created","review_requested","review_decision","review_nudge","review_retracted","comment_new","comment_reply"],"title":"NotificationType","description":"Types of in-app notifications."},"NudgeReviewRequestResponse":{"properties":{"nudged":{"type":"boolean","title":"Nudged"},"next_allowed_at":{"type":"string","format":"date-time","title":"Next Allowed At"},"review_request":{"$ref":"#/components/schemas/ReviewRequestResponse"}},"type":"object","required":["nudged","next_allowed_at","review_request"],"title":"NudgeReviewRequestResponse"},"OAuthBeginSetupResult":{"properties":{"setup_kind":{"type":"string","const":"oauth","title":"Setup Kind","default":"oauth"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","title":"OAuthBeginSetupResult"},"OAuthExchangeRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"OAuthExchangeRequest"},"OAuthExchangeResponse":{"properties":{"session_token":{"type":"string","title":"Session Token"},"session_jwt":{"type":"string","title":"Session Jwt"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"}},"type":"object","required":["session_token","session_jwt","user_id"],"title":"OAuthExchangeResponse"},"OnboardingOptionsResponse":{"properties":{"has_completed_onboarding":{"type":"boolean","title":"Has Completed Onboarding"},"current_org":{"anyOf":[{"$ref":"#/components/schemas/OrgRefDTO"},{"type":"null"}]},"matching_org":{"anyOf":[{"$ref":"#/components/schemas/OrgRefDTO"},{"type":"null"}]}},"type":"object","required":["has_completed_onboarding","current_org","matching_org"],"title":"OnboardingOptionsResponse"},"OrgRefDTO":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"claimed_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimed Domain"},"is_personal":{"type":"boolean","title":"Is Personal","description":"True when the org has no claimed domain — i.e. it is a personal/solo org.","readOnly":true}},"type":"object","required":["id","name","is_personal"],"title":"OrgRefDTO","description":"Lightweight {id, name, is_personal} pointer used by settings and onboarding flows."},"OrgResponse":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"claimed_domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Claimed Domain"},"external_sharing_enabled":{"type":"boolean","title":"External Sharing Enabled"}},"type":"object","required":["id","name","external_sharing_enabled"],"title":"OrgResponse"},"PendingWalkthroughResponse":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["name"],"title":"PendingWalkthroughResponse"},"PrLinksResponse":{"properties":{"snapshot_ids":{"items":{"type":"string"},"type":"array","title":"Snapshot Ids"}},"type":"object","required":["snapshot_ids"],"title":"PrLinksResponse"},"PrStatus":{"properties":{"number":{"type":"integer","title":"Number"},"title":{"type":"string","title":"Title"},"repo":{"type":"string","title":"Repo"},"url":{"type":"string","title":"Url"},"state":{"type":"string","enum":["open","merged","closed","draft"],"title":"State"}},"type":"object","required":["number","title","repo","url","state"],"title":"PrStatus","description":"Live status of a pull request, resolved via a GitHub App installation."},"PriorReviewDecision":{"properties":{"decision":{"type":"string","enum":["approved","rejected"],"title":"Decision"},"decided_at":{"type":"string","format":"date-time","title":"Decided At"}},"type":"object","required":["decision","decided_at"],"title":"PriorReviewDecision"},"ProbeArtifacts":{"properties":{"kind":{"type":"string","enum":["repair","feature.implement.authored"],"title":"Kind","default":"repair"},"probe_md":{"type":"string","title":"Probe Md"},"meta_json":{"type":"string","title":"Meta Json"},"mutant_diff":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mutant Diff"},"sentinel_py":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sentinel Py"},"feature_contract":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feature Contract"},"oracle_test_diff":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Oracle Test Diff"},"source_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Context"},"validation_evidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation Evidence"}},"type":"object","required":["probe_md","meta_json"],"title":"ProbeArtifacts"},"ProbeComment":{"properties":{"author":{"type":"string","title":"Author"},"verdict":{"type":"string","enum":["approved","rejected"],"title":"Verdict"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"},"at":{"type":"string","format":"date-time","title":"At"}},"type":"object","required":["author","verdict","comment","at"],"title":"ProbeComment"},"ProbeState":{"properties":{"id":{"type":"string","title":"Id"},"site":{"type":"string","title":"Site"},"slot":{"type":"string","title":"Slot"},"subsystem":{"type":"string","title":"Subsystem"},"status":{"$ref":"#/components/schemas/ProbeStatus"},"mint_run":{"type":"string","title":"Mint Run"},"kind":{"type":"string","enum":["repair","feature.implement.authored"],"title":"Kind","default":"repair"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"reviewed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed By"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"comments":{"items":{"$ref":"#/components/schemas/ProbeComment"},"type":"array","title":"Comments"}},"type":"object","required":["id","site","slot","subsystem","status","mint_run","created_at"],"title":"ProbeState"},"ProbeStatus":{"type":"string","enum":["pending-review","approved","rejected"],"title":"ProbeStatus"},"ProbeWithArtifacts":{"properties":{"id":{"type":"string","title":"Id"},"site":{"type":"string","title":"Site"},"slot":{"type":"string","title":"Slot"},"subsystem":{"type":"string","title":"Subsystem"},"status":{"$ref":"#/components/schemas/ProbeStatus"},"mint_run":{"type":"string","title":"Mint Run"},"kind":{"type":"string","enum":["repair","feature.implement.authored"],"title":"Kind","default":"repair"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"reviewed_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewed By"},"reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Reviewed At"},"comments":{"items":{"$ref":"#/components/schemas/ProbeComment"},"type":"array","title":"Comments"},"artifacts":{"$ref":"#/components/schemas/ProbeArtifacts"}},"type":"object","required":["id","site","slot","subsystem","status","mint_run","created_at","artifacts"],"title":"ProbeWithArtifacts"},"PromptContextTurn":{"properties":{"text":{"type":"string","title":"Text"},"ts":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ts"},"apiCalls":{"type":"integer","title":"Apicalls"},"here":{"type":"boolean","title":"Here"}},"additionalProperties":false,"type":"object","required":["text","apiCalls","here"],"title":"PromptContextTurn"},"PromptSummary":{"properties":{"promptKey":{"type":"string","title":"Promptkey"},"ts":{"type":"string","title":"Ts"},"slashCommand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slashcommand"},"text":{"type":"string","title":"Text"},"apiCalls":{"type":"integer","title":"Apicalls"},"subagentCalls":{"type":"integer","title":"Subagentcalls"},"usage":{"$ref":"#/components/schemas/TokenUsage"},"context":{"items":{"$ref":"#/components/schemas/PromptContextTurn"},"type":"array","title":"Context"}},"additionalProperties":false,"type":"object","required":["promptKey","ts","text","apiCalls","subagentCalls","usage","context"],"title":"PromptSummary"},"RedeemHandoffRequest":{"properties":{"handoff_code":{"type":"string","title":"Handoff Code"}},"type":"object","required":["handoff_code"],"title":"RedeemHandoffRequest"},"RedeemHandoffResponse":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"RedeemHandoffResponse"},"RenameSnapshotRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"RenameSnapshotRequest"},"RequestCounselBody":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"agents":{"items":{"$ref":"#/components/schemas/AgentSpecBody"},"type":"array","maxItems":5,"minItems":1,"title":"Agents"}},"type":"object","required":["snapshot_id","agents"],"title":"RequestCounselBody"},"RequestCounselResponse":{"properties":{"reviewers":{"items":{"$ref":"#/components/schemas/StartedReviewerResponse"},"type":"array","title":"Reviewers"}},"type":"object","required":["reviewers"],"title":"RequestCounselResponse"},"ResolvedImageResponse":{"properties":{"url":{"type":"string","title":"Url"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["url","expires_in"],"title":"ResolvedImageResponse"},"ResumeConfirmationResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"confirmed":{"type":"boolean","title":"Confirmed"}},"type":"object","required":["conversation_id","confirmed"],"title":"ResumeConfirmationResponse","description":"Response from resume/confirm — sandbox is now the active one"},"ResumePreparationResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"ready":{"type":"boolean","title":"Ready"}},"type":"object","required":["conversation_id","ready"],"title":"ResumePreparationResponse","description":"Response from resume/prepare — sandbox is awake and ready for session validation"},"ResumeRejectionResponse":{"properties":{"conversation_id":{"type":"string","title":"Conversation Id"},"rejected":{"type":"boolean","title":"Rejected"}},"type":"object","required":["conversation_id","rejected"],"title":"ResumeRejectionResponse","description":"Response from resume/reject — pending sandbox cleared"},"RetrievalKind":{"type":"string","enum":["git","file"],"title":"RetrievalKind","description":"Kind of retrieval method (git clone, file download, etc.)"},"RetrievalResult":{"properties":{"adapter":{"$ref":"#/components/schemas/AdapterType"},"retrieval":{"anyOf":[{"$ref":"#/components/schemas/GitRetrievalDetails"},{"$ref":"#/components/schemas/FileRetrievalDetails"}],"title":"Retrieval"}},"type":"object","required":["adapter","retrieval"],"title":"RetrievalResult","description":"Result of retrieving a source (how to actually fetch it)"},"ReviewChatContextResponse":{"properties":{"snapshot":{"$ref":"#/components/schemas/SnapshotInfo"},"workspace":{"$ref":"#/components/schemas/WorkspaceContextInfo"},"comments":{"items":{"$ref":"#/components/schemas/CommentSnapshot"},"type":"array","title":"Comments","default":[]},"turns":{"items":{"$ref":"#/components/schemas/ReviewerContextTurn"},"type":"array","title":"Turns"}},"type":"object","required":["snapshot","workspace","turns"],"title":"ReviewChatContextResponse","description":"Review-chat's snapshot-scoped context. Shape lives in\nSnapshotScopedContext; this subclass owns review-chat's name + OpenAPI id."},"ReviewChatThreadResponse":{"properties":{"turns":{"items":{"$ref":"#/components/schemas/ReviewChatThreadTurn"},"type":"array","title":"Turns"}},"type":"object","required":["turns"],"title":"ReviewChatThreadResponse","description":"The caller's full private review-chat thread on one snapshot, oldest\nfirst. Scoped to (workspace, snapshot, reviewer); another reviewer's thread\nis never included."},"ReviewChatThreadTurn":{"properties":{"id":{"type":"string","title":"Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"status":{"type":"string","title":"Status"},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"},"assistant_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Text"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","parent_id","status","user_message","assistant_text","created_at"],"title":"ReviewChatThreadTurn","description":"One persisted review-chat turn for renderer rehydration. Mirrors the\ncontributor TurnSummary fields the Chat tab paints: the reviewer's message\nand the final assistant_text (history renders from the string, not blocks)."},"ReviewCommentPreview":{"properties":{"thread_id":{"type":"string","title":"Thread Id"},"comment_id":{"type":"string","title":"Comment Id"},"anchor_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Anchor Text"},"text":{"type":"string","title":"Text"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"resolved":{"type":"boolean","title":"Resolved"}},"type":"object","required":["thread_id","comment_id","anchor_text","text","created_at","resolved"],"title":"ReviewCommentPreview"},"ReviewMetadata":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"additionalProperties":false,"type":"object","required":["snapshot_id"],"title":"ReviewMetadata","description":"Optional review request metadata for combined invite + review flow.\n\nsnapshot_id anchors the request to the node being shared; the reviewer\nbinds in on invite acceptance."},"ReviewProbeBody":{"properties":{"verdict":{"type":"string","enum":["approved","rejected"],"title":"Verdict"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment"}},"type":"object","required":["verdict"],"title":"ReviewProbeBody"},"ReviewRequestResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"snapshot_id":{"type":"string","title":"Snapshot Id"},"requester_id":{"type":"string","title":"Requester Id"},"reviewer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Id"},"pending_invite_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pending Invite Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"latest_agent_counsel_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Agent Counsel Turn Id"},"status":{"type":"string","enum":["open","closed","cancelled"],"title":"Status"},"state":{"anyOf":[{"type":"string","enum":["pending","in_progress","approved","rejected"]},{"type":"null"}],"title":"State"},"engaged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Engaged At"},"decision":{"anyOf":[{"type":"string","enum":["approved","rejected"]},{"type":"null"}],"title":"Decision"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"prior_decisions":{"items":{"$ref":"#/components/schemas/PriorReviewDecision"},"type":"array","title":"Prior Decisions","default":[]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"workspace_name":{"type":"string","title":"Workspace Name"},"requester_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requester Display Name"},"reviewer_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Display Name"}},"type":"object","required":["id","workspace_id","snapshot_id","requester_id","reviewer_id","pending_invite_id","message","status","state","engaged_at","decision","decided_at","created_at","updated_at","workspace_name","requester_display_name","reviewer_display_name"],"title":"ReviewRequestResponse"},"ReviewSummaryNode":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"counts":{"$ref":"#/components/schemas/NodeReviewCounts"}},"type":"object","required":["snapshot_id","counts"],"title":"ReviewSummaryNode"},"ReviewSummaryResponse":{"properties":{"nodes":{"items":{"$ref":"#/components/schemas/ReviewSummaryNode"},"type":"array","title":"Nodes"}},"type":"object","required":["nodes"],"title":"ReviewSummaryResponse"},"ReviewerContextTurn":{"properties":{"id":{"type":"string","title":"Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"user_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Display Name"},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"},"assistant_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Text"},"message_deltas":{"anyOf":[{},{"type":"null"}],"title":"Message Deltas"},"usage":{"anyOf":[{},{"type":"null"}],"title":"Usage"}},"type":"object","required":["id","parent_id","user_message","assistant_text"],"title":"ReviewerContextTurn","description":"A snapshot-scoped thread turn for agent hydration. `parent_id` is the\nlinear chain pointer; user authorship is always the reviewer."},"ReviewerInput":{"properties":{"reviewer_id":{"type":"string","title":"Reviewer Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["reviewer_id"],"title":"ReviewerInput"},"ScottPushPayload":{"properties":{"project":{"type":"string","title":"Project"},"sessionId":{"type":"string","title":"Sessionid"},"cwd":{"type":"string","title":"Cwd"},"schemaVersion":{"type":"integer","title":"Schemaversion"},"generatedAt":{"type":"string","title":"Generatedat"},"span":{"$ref":"#/components/schemas/SessionSpan"},"totals":{"$ref":"#/components/schemas/ScottPushPayloadTotals"},"prompts":{"items":{"$ref":"#/components/schemas/PromptSummary"},"type":"array","title":"Prompts","default":[]},"subagents":{"items":{"$ref":"#/components/schemas/SubagentSummary"},"type":"array","title":"Subagents","default":[]},"cacheBreaks":{"items":{"$ref":"#/components/schemas/CacheBreak"},"type":"array","title":"Cachebreaks","default":[]}},"additionalProperties":false,"type":"object","required":["project","sessionId","cwd","schemaVersion","generatedAt","span","totals"],"title":"ScottPushPayload","description":"Full structured session capture produced by `scott push`.\n\nSource of truth for the TS side is the orval-generated schema (derived\nfrom this Pydantic model). Bumped via `schemaVersion` when the parser\nchanges shape."},"ScottPushPayloadTotals":{"properties":{"sessions":{"type":"integer","title":"Sessions"},"apiCalls":{"type":"integer","title":"Apicalls"},"humanMessages":{"type":"integer","title":"Humanmessages"},"usage":{"$ref":"#/components/schemas/TokenUsage"},"cacheBreaksCount":{"type":"integer","title":"Cachebreakscount"},"subagentCalls":{"type":"integer","title":"Subagentcalls"},"subagentTokens":{"type":"integer","title":"Subagenttokens"}},"additionalProperties":false,"type":"object","required":["sessions","apiCalls","humanMessages","usage","cacheBreaksCount","subagentCalls","subagentTokens"],"title":"ScottPushPayloadTotals"},"ScottPushSpec":{"properties":{"name":{"type":"string","title":"Name","description":"Inferred title for the workspace + push artifact."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"source_kind":{"type":"string","title":"Source Kind","default":"claude-code-session"},"source_id":{"type":"string","title":"Source Id","description":"Upstream session id (e.g. Claude sessionId UUID)."},"captured_by_client":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captured By Client"},"originating_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Originating Agent"},"git_remote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Remote"},"git_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Branch"},"git_head_sha":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Head Sha"},"git_dirty":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Git Dirty"},"payload":{"$ref":"#/components/schemas/ScottPushPayload"},"messages":{"items":{"$ref":"#/components/schemas/CanonicalMessageSpec"},"type":"array","maxItems":2000,"title":"Messages"},"intent":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Intent"},"synthesize":{"type":"boolean","title":"Synthesize","default":true},"transcript_provenance":{"anyOf":[{"type":"string","enum":["verbatim","reflected"]},{"type":"null"}],"title":"Transcript Provenance"}},"additionalProperties":false,"type":"object","required":["name","source_id","payload"],"title":"ScottPushSpec","description":"Optional sub-object on `CreateWorkspaceRequest` that turns the call\ninto a Scott push. Idempotent on `(captured_by_user_id, source_kind,\nsource_id)`: same triple from the same user returns the same planspace,\nreplacing the push payload and any scott_push turns in-place. See D6\nin the scott-push-v2 design doc.\n\nThe structured payload is a typed `ScottPushPayload` (mirroring\n`packages/scott-ext-core/src/types.ts` in `one-shot-core`). Strong\ntyping here is what lets orval emit useful client types instead of\n`Record<string, unknown>`."},"SessionSpan":{"properties":{"firstTs":{"type":"string","title":"Firstts"},"lastTs":{"type":"string","title":"Lastts"},"wallClockMs":{"type":"integer","title":"Wallclockms"},"activeMs":{"type":"integer","title":"Activems"}},"additionalProperties":false,"type":"object","required":["firstTs","lastTs","wallClockMs","activeMs"],"title":"SessionSpan"},"SetHasUserEditsRequest":{"properties":{"has_user_edits":{"type":"boolean","title":"Has User Edits"}},"type":"object","required":["has_user_edits"],"title":"SetHasUserEditsRequest"},"SlackBeginSetupInput":{"properties":{"redirect_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect To"}},"type":"object","title":"SlackBeginSetupInput"},"SlackChannelAvailableSource":{"properties":{"adapter":{"type":"string","const":"slack","title":"Adapter","default":"slack"},"slack_team_id":{"type":"string","title":"Slack Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"channel_id":{"type":"string","title":"Channel Id"},"channel_name":{"type":"string","title":"Channel Name"},"is_private":{"type":"boolean","title":"Is Private","default":false}},"type":"object","required":["slack_team_id","channel_id","channel_name"],"title":"SlackChannelAvailableSource"},"SlackInstall":{"properties":{"integration_type":{"type":"string","const":"slack","title":"Integration Type","default":"slack"},"slack_team_id":{"type":"string","title":"Slack Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"status":{"type":"string","title":"Status"}},"type":"object","required":["slack_team_id","status"],"title":"SlackInstall"},"SlackSourceConfig":{"properties":{"slack_team_id":{"type":"string","title":"Slack Team Id"},"channel_id":{"type":"string","title":"Channel Id"}},"type":"object","required":["slack_team_id","channel_id"],"title":"SlackSourceConfig","description":"Configuration for a Slack source"},"SlackSourceMetadata":{"properties":{"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"channel_name":{"type":"string","title":"Channel Name"},"is_private":{"type":"boolean","title":"Is Private","default":false}},"type":"object","required":["channel_name"],"title":"SlackSourceMetadata","description":"Metadata for a Slack source"},"SlackSourceSelection":{"properties":{"slack_team_id":{"type":"string","title":"Slack Team Id"},"channel_id":{"type":"string","title":"Channel Id"}},"type":"object","required":["slack_team_id","channel_id"],"title":"SlackSourceSelection","description":"User's selection when connecting a Slack source"},"SnapshotInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"content":{"type":"string","title":"Content"}},"type":"object","required":["id","content"],"title":"SnapshotInfo"},"SnapshotNode":{"properties":{"id":{"type":"string","title":"Id"},"document_artifact_id":{"type":"string","title":"Document Artifact Id"},"parent_snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Snapshot Id"},"turn_id":{"type":"string","title":"Turn Id"},"kind":{"type":"string","enum":["node","capture"],"title":"Kind"},"status":{"type":"string","enum":["draft","committed","discarded"],"title":"Status"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"content":{"$ref":"#/components/schemas/ArtifactContent"},"diff":{"anyOf":[{"items":{"$ref":"#/components/schemas/ChangeEntry"},"type":"array"},{"type":"null"}],"title":"Diff"},"has_user_edits":{"type":"boolean","title":"Has User Edits","default":false},"suggestion":{"anyOf":[{"$ref":"#/components/schemas/Suggestion"},{"type":"null"}]}},"type":"object","required":["id","document_artifact_id","turn_id","kind","status","created_at","content"],"title":"SnapshotNode"},"SnapshotResponse":{"properties":{"id":{"type":"string","title":"Id"},"document_artifact_id":{"type":"string","title":"Document Artifact Id"},"parent_snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Snapshot Id"},"turn_id":{"type":"string","title":"Turn Id"},"kind":{"type":"string","enum":["node","capture"],"title":"Kind"},"status":{"type":"string","enum":["draft","committed","discarded"],"title":"Status"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"has_user_edits":{"type":"boolean","title":"Has User Edits","default":false}},"type":"object","required":["id","document_artifact_id","parent_snapshot_id","turn_id","kind","status","name","created_at"],"title":"SnapshotResponse"},"SnapshotReviewerEntry":{"properties":{"request_id":{"type":"string","title":"Request Id"},"reviewer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reviewer Id"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"pending_invite_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pending Invite Id"},"state":{"type":"string","enum":["pending","in_progress","approved","rejected"],"title":"State"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"latest_agent_counsel_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Agent Counsel Turn Id"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"engaged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Engaged At"},"decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Decided At"},"last_activity_at":{"type":"string","format":"date-time","title":"Last Activity At"},"comment_count":{"type":"integer","title":"Comment Count"},"comments":{"items":{"$ref":"#/components/schemas/ReviewCommentPreview"},"type":"array","title":"Comments","default":[]},"prior_decisions":{"items":{"$ref":"#/components/schemas/PriorReviewDecision"},"type":"array","title":"Prior Decisions","default":[]}},"type":"object","required":["request_id","reviewer_id","display_name","pending_invite_id","state","message","requested_at","engaged_at","decided_at","last_activity_at","comment_count"],"title":"SnapshotReviewerEntry"},"SnapshotReviewsResponse":{"properties":{"snapshot_id":{"type":"string","title":"Snapshot Id"},"reviewers":{"items":{"$ref":"#/components/schemas/SnapshotReviewerEntry"},"type":"array","title":"Reviewers"}},"type":"object","required":["snapshot_id","reviewers"],"title":"SnapshotReviewsResponse"},"SourceVisibility":{"type":"string","enum":["private","public"],"title":"SourceVisibility","description":"Visibility level of a source"},"StartedReviewerResponse":{"properties":{"reviewer_id":{"type":"string","title":"Reviewer Id"},"request_id":{"type":"string","title":"Request Id"},"display_name":{"type":"string","title":"Display Name"},"model":{"type":"string","title":"Model"},"mode":{"type":"string","title":"Mode"},"turn_id":{"type":"string","title":"Turn Id"}},"type":"object","required":["reviewer_id","request_id","display_name","model","mode","turn_id"],"title":"StartedReviewerResponse"},"SubagentSummary":{"properties":{"agentId":{"type":"string","title":"Agentid"},"agentType":{"type":"string","title":"Agenttype"},"parentPromptKey":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parentpromptkey"},"span":{"$ref":"#/components/schemas/SessionSpan"},"apiCalls":{"type":"integer","title":"Apicalls"},"usage":{"$ref":"#/components/schemas/TokenUsage"}},"additionalProperties":false,"type":"object","required":["agentId","agentType","span","apiCalls","usage"],"title":"SubagentSummary"},"SubmitDecisionBody":{"properties":{"decision":{"type":"string","enum":["approved","rejected"],"title":"Decision"}},"type":"object","required":["decision"],"title":"SubmitDecisionBody"},"SubscriptionStatusRequest":{"properties":{"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"sessionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sessionid"}},"type":"object","title":"SubscriptionStatusRequest"},"SubscriptionStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"plan":{"type":"string","title":"Plan"},"customerId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customerid"},"subscriptionId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscriptionid"},"currentPeriodEnd":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Currentperiodend"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["status","plan"],"title":"SubscriptionStatusResponse"},"Suggestion":{"properties":{"suggestion_id":{"type":"string","title":"Suggestion Id"},"turn_id":{"type":"string","title":"Turn Id"},"author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Author"},"base_markdown":{"type":"string","title":"Base Markdown"},"suggested_markdown":{"type":"string","title":"Suggested Markdown"},"suggested_blocks":{"items":{},"type":"array","title":"Suggested Blocks"}},"type":"object","required":["suggestion_id","turn_id","base_markdown","suggested_markdown"],"title":"Suggestion","description":"An unresolved agent suggestion sitting on a draft snapshot.\n\nAn agent turn writes this onto the focused draft instead of committing a\nnode; the human resolves it (accept/reject) before committing. One per\ndraft, last writer wins. The draft's own `content` excludes it."},"SyncChatContextResponse":{"properties":{"digest":{"items":{"$ref":"#/components/schemas/SyncChatDigestSession"},"type":"array","title":"Digest"},"github_installs":{"items":{"$ref":"#/components/schemas/SyncChatGitHubInstall"},"type":"array","title":"Github Installs"},"connected_sources":{"items":{"$ref":"#/components/schemas/ConnectedSource"},"type":"array","title":"Connected Sources","default":[]},"connected_sources_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected Sources Fingerprint"},"turns":{"items":{"$ref":"#/components/schemas/SyncChatContextTurn"},"type":"array","title":"Turns"}},"type":"object","required":["digest","github_installs","turns"],"title":"SyncChatContextResponse","description":"Per-user context for a sync-chat turn: corpus digest, GitHub install\nstate, usable connected sources, and this user's thread ancestry."},"SyncChatContextTurn":{"properties":{"id":{"type":"string","title":"Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"},"assistant_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Text"},"message_deltas":{"anyOf":[{},{"type":"null"}],"title":"Message Deltas"},"usage":{"anyOf":[{},{"type":"null"}],"title":"Usage"}},"type":"object","required":["id","parent_id","user_message","assistant_text"],"title":"SyncChatContextTurn","description":"Sync-chat thread turn for agent hydration."},"SyncChatDigestSession":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"stats":{"anyOf":[{},{"type":"null"}],"title":"Stats"},"git_remote":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Remote"},"git_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Git Branch"},"captured_at":{"type":"string","format":"date-time","title":"Captured At"},"key_messages":{"items":{"type":"string"},"type":"array","title":"Key Messages","default":[]}},"type":"object","required":["workspace_id","name","captured_at"],"title":"SyncChatDigestSession","description":"One scott-push session row for the corpus digest."},"SyncChatGitHubInstall":{"properties":{"installation_id":{"type":"integer","title":"Installation Id"},"account_login":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Login"}},"type":"object","required":["installation_id"],"title":"SyncChatGitHubInstall"},"SyncChatPinRequest":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"pinned":{"type":"boolean","title":"Pinned","default":true}},"type":"object","required":["workspace_id"],"title":"SyncChatPinRequest","description":"Agent-service body to pin one of the caller's push planspaces."},"SyncChatThreadResponse":{"properties":{"turns":{"items":{"$ref":"#/components/schemas/SyncChatThreadTurn"},"type":"array","title":"Turns"}},"type":"object","required":["turns"],"title":"SyncChatThreadResponse","description":"The caller's full sync-chat thread, oldest first."},"SyncChatThreadTurn":{"properties":{"id":{"type":"string","title":"Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"status":{"type":"string","title":"Status"},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"},"assistant_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Text"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","parent_id","status","user_message","assistant_text","created_at"],"title":"SyncChatThreadTurn","description":"One persisted sync-chat turn for renderer rehydration."},"SyncChatTranscriptResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"turns":{"items":{"$ref":"#/components/schemas/SyncChatTranscriptTurn"},"type":"array","title":"Turns"}},"type":"object","required":["workspace_id","turns"],"title":"SyncChatTranscriptResponse","description":"Full ordered transcript of one of the caller's push sessions."},"SyncChatTranscriptTurn":{"properties":{"turn_id":{"type":"string","title":"Turn Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"status":{"type":"string","title":"Status"},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"},"assistant_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Text"},"message_deltas":{"anyOf":[{},{"type":"null"}],"title":"Message Deltas","description":"Stored replay messages for this turn when include_message_deltas=true."}},"type":"object","required":["turn_id","created_at","status","user_message","assistant_text"],"title":"SyncChatTranscriptTurn","description":"One turn of a push session's full transcript, in order."},"SyncChatWriteUpRequest":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent"}},"type":"object","required":["workspace_id"],"title":"SyncChatWriteUpRequest","description":"Agent-service body to write up (synthesize) one of the caller's planspaces."},"TokenUsage":{"properties":{"inputUncached":{"type":"integer","title":"Inputuncached"},"inputCacheCreate":{"type":"integer","title":"Inputcachecreate"},"inputCacheRead":{"type":"integer","title":"Inputcacheread"},"output":{"type":"integer","title":"Output"},"total":{"type":"integer","title":"Total"}},"additionalProperties":false,"type":"object","required":["inputUncached","inputCacheCreate","inputCacheRead","output","total"],"title":"TokenUsage"},"Turn":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"status":{"type":"string","title":"Status"},"is_from_scott_push":{"type":"boolean","title":"Is From Scott Push","default":false},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"},"assistant_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Text"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"user_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Display Name"},"tool_calls":{"anyOf":[{},{"type":"null"}],"title":"Tool Calls"},"message_deltas":{"anyOf":[{},{"type":"null"}],"title":"Message Deltas"},"usage":{"anyOf":[{},{"type":"null"}],"title":"Usage"}},"type":"object","required":["id","workspace_id","parent_id","status","user_message","assistant_text","created_at","completed_at"],"title":"Turn","description":"Agent-service turn shape (GET /context). Includes LLM internals\nso the agent can rebuild context across the parent_id chain."},"TurnSummary":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"parent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Id"},"status":{"type":"string","title":"Status"},"is_from_scott_push":{"type":"boolean","title":"Is From Scott Push","default":false},"user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Message"},"assistant_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Text"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"active_artifact_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Artifact Id"},"origin_snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin Snapshot Id"},"scott_push_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Scott Push Agent"}},"type":"object","required":["id","workspace_id","parent_id","status","user_message","assistant_text","created_at","completed_at"],"title":"TurnSummary","description":"Renderer turn shape (GET /state). Strips LLM internals.\n\nOnly DAG annotation emitted is `active_artifact_id`. GitGraph\nlayout fields (effective_doc_parent_id, doc_child_count,\nintermediate_count) are derived locally in\n`WorkspacePage/query/normalize.ts` (TurnLayoutInfo)."},"TurnUsageStatusResponse":{"properties":{"plan_tier":{"type":"string","title":"Plan Tier"},"message_count":{"type":"integer","title":"Message Count"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"is_throttled":{"type":"boolean","title":"Is Throttled"},"window_resets_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Window Resets At"}},"type":"object","required":["plan_tier","message_count","limit","is_throttled","window_resets_at"],"title":"TurnUsageStatusResponse"},"UnreadCountResponse":{"properties":{"count":{"type":"integer","title":"Count"}},"type":"object","required":["count"],"title":"UnreadCountResponse"},"UpdateInviteRequest":{"properties":{"role":{"anyOf":[{"type":"string","enum":["owner","editor","viewer","commenter"]},{"type":"null"}],"title":"Role"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"additionalProperties":false,"type":"object","title":"UpdateInviteRequest"},"UpdateMemberRoleRequest":{"properties":{"role":{"type":"string","enum":["owner","editor","viewer","commenter"],"title":"Role"}},"type":"object","required":["role"],"title":"UpdateMemberRoleRequest"},"UpdateOrgExternalSharingRequest":{"properties":{"external_sharing_enabled":{"type":"boolean","title":"External Sharing Enabled"}},"additionalProperties":false,"type":"object","required":["external_sharing_enabled"],"title":"UpdateOrgExternalSharingRequest","description":"Typed body for the PATCH endpoint — refuses unknown fields so callers fail loudly when the\nschema drifts rather than silently no-opping on a misspelled key."},"UpdateProfileRequest":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"}},"type":"object","title":"UpdateProfileRequest"},"UpdateTurnRequest":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"assistant_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assistant Text"},"tool_calls":{"anyOf":[{},{"type":"null"}],"title":"Tool Calls"},"message_deltas":{"anyOf":[{},{"type":"null"}],"title":"Message Deltas"},"usage":{"anyOf":[{},{"type":"null"}],"title":"Usage"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"UpdateTurnRequest"},"UpdateWorkspaceRequest":{"properties":{"is_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public"},"confirmed_make_public":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Confirmed Make Public","description":"Required and must be true when changing a workspace from private to public to ensure user understands the implications."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"pinned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pinned"}},"type":"object","title":"UpdateWorkspaceRequest"},"UploadBeginSetupResult":{"properties":{"setup_kind":{"type":"string","const":"upload","title":"Setup Kind","default":"upload"},"file_id":{"type":"string","title":"File Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"}},"type":"object","required":["file_id","filename"],"title":"UploadBeginSetupResult"},"UploadedFileAvailableSource":{"properties":{"adapter":{"type":"string","const":"uploaded_file","title":"Adapter","default":"uploaded_file"},"file_id":{"type":"string","title":"File Id"},"filename":{"type":"string","title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["file_id","filename","created_at"],"title":"UploadedFileAvailableSource"},"UploadedFileSourceConfig":{"properties":{"file_id":{"type":"string","title":"File Id"}},"type":"object","required":["file_id"],"title":"UploadedFileSourceConfig","description":"Configuration for an uploaded file source"},"UploadedFileSourceMetadata":{"properties":{"filename":{"type":"string","title":"Filename"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"size_bytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size Bytes"}},"type":"object","required":["filename"],"title":"UploadedFileSourceMetadata","description":"Metadata for an uploaded file source"},"UploadedFileSourceSelection":{"properties":{"file_id":{"type":"string","title":"File Id"},"visibility":{"$ref":"#/components/schemas/SourceVisibility","default":"private"}},"type":"object","required":["file_id"],"title":"UploadedFileSourceSelection","description":"User's selection when connecting an uploaded file source"},"UpsertCursorRequest":{"properties":{"turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Turn Id"},"snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Snapshot Id"}},"type":"object","title":"UpsertCursorRequest"},"UsageStatusResponse":{"properties":{"plan_tier":{"type":"string","title":"Plan Tier"},"conversation_count":{"type":"integer","title":"Conversation Count"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"day_start_date":{"type":"string","title":"Day Start Date"},"resets_at":{"type":"string","title":"Resets At"}},"type":"object","required":["plan_tier","conversation_count","limit","day_start_date","resets_at"],"title":"UsageStatusResponse"},"UserIdentityResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["user_id","email"],"title":"UserIdentityResponse","description":"Lean identity for CLI/telemetry: Stytch user_id + email only.\n\nUnlike GET /users/me this does NO DB work — no profile upsert, no commit,\nno org lookup — so it is a cheap, side-effect-free \"who am I\" suited to the\nCLI's per-invocation analytics identity resolution."},"UserProfileResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"display_name":{"type":"string","title":"Display Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"needs_onboarding":{"type":"boolean","title":"Needs Onboarding","default":false},"current_org":{"anyOf":[{"$ref":"#/components/schemas/CurrentOrg"},{"type":"null"}]}},"type":"object","required":["user_id","display_name","avatar_url","email"],"title":"UserProfileResponse"},"UserSearchResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/UserProfileResponse"},"type":"array","title":"Users"}},"type":"object","required":["users"],"title":"UserSearchResponse"},"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"},"WaitlistCreate":{"properties":{"email":{"type":"string","maxLength":254,"title":"Email"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Company"},"origin":{"type":"string","maxLength":200,"title":"Origin"},"e_team_size":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"E Team Size"},"e_role":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"E Role"},"e_message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"E Message"}},"type":"object","required":["email","origin"],"title":"WaitlistCreate"},"WaitlistResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company"},"origin":{"type":"string","title":"Origin"},"e_team_size":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"E Team Size"},"e_role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"E Role"},"e_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"E Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","email","name","company","origin","e_team_size","e_role","e_message","created_at"],"title":"WaitlistResponse"},"WakeWorkspaceResponse":{"properties":{"sandbox_url":{"type":"string","title":"Sandbox Url"}},"type":"object","required":["sandbox_url"],"title":"WakeWorkspaceResponse"},"WalkthroughActionResponse":{"properties":{"name":{"type":"string","title":"Name"},"status":{"type":"string","enum":["completed","dismissed"],"title":"Status"}},"type":"object","required":["name","status"],"title":"WalkthroughActionResponse"},"WorkspaceConfig":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"},"system_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"System Prompt"},"connected_sources":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConnectedSource"},"type":"array"},{"type":"null"}],"title":"Connected Sources"},"connected_sources_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected Sources Fingerprint"}},"type":"object","required":["id","name","created_at"],"title":"WorkspaceConfig","description":"Agent-service hydration. Used in WorkspaceSnapshotResponse only."},"WorkspaceContextInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"connected_sources":{"anyOf":[{"items":{"$ref":"#/components/schemas/ConnectedSource"},"type":"array"},{"type":"null"}],"title":"Connected Sources"},"connected_sources_fingerprint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connected Sources Fingerprint"}},"type":"object","required":["id"],"title":"WorkspaceContextInfo"},"WorkspaceListItem":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"use_local_sandbox":{"type":"boolean","title":"Use Local Sandbox","default":false},"pinned":{"type":"boolean","title":"Pinned","default":false},"is_example":{"type":"boolean","title":"Is Example","default":false},"doc_count":{"type":"integer","title":"Doc Count","default":0},"latest_doc_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Latest Doc Label"},"review_status":{"type":"string","title":"Review Status","default":"draft"},"owner_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner User Id"},"owner_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Owner Display Name"},"member_count":{"type":"integer","title":"Member Count","default":0},"viewer_role":{"anyOf":[{"type":"string","enum":["owner","editor","viewer","commenter"]},{"type":"null"}],"title":"Viewer Role"}},"type":"object","required":["id","name","created_at"],"title":"WorkspaceListItem","description":"GET /workspaces list entry. Adds turn aggregates."},"WorkspaceMemberResponse":{"properties":{"user_id":{"type":"string","title":"User Id"},"role":{"type":"string","enum":["owner","editor","viewer","commenter"],"title":"Role"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","required":["user_id","role","joined_at","display_name","avatar_url","email"],"title":"WorkspaceMemberResponse"},"WorkspacePrLink":{"properties":{"pr_number":{"type":"integer","title":"Pr Number"},"repo_full_name":{"type":"string","title":"Repo Full Name"},"pr_html_url":{"type":"string","title":"Pr Html Url"},"linked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Linked At"},"linked_by_user_id":{"type":"string","title":"Linked By User Id"}},"type":"object","required":["pr_number","repo_full_name","pr_html_url","linked_at","linked_by_user_id"],"title":"WorkspacePrLink"},"WorkspacePrLinksResponse":{"properties":{"links":{"additionalProperties":{"items":{"$ref":"#/components/schemas/WorkspacePrLink"},"type":"array"},"type":"object","title":"Links"}},"type":"object","required":["links"],"title":"WorkspacePrLinksResponse"},"WorkspaceSnapshotResponse":{"properties":{"workspace":{"$ref":"#/components/schemas/WorkspaceConfig"},"turns":{"items":{"$ref":"#/components/schemas/Turn"},"type":"array","title":"Turns"},"selected_snapshot":{"anyOf":[{"$ref":"#/components/schemas/SnapshotNode"},{"type":"null"}]},"comments":{"items":{"$ref":"#/components/schemas/CommentSnapshot"},"type":"array","title":"Comments","default":[]},"artifacts":{"items":{"$ref":"#/components/schemas/ArtifactSummary"},"type":"array","title":"Artifacts","default":[]},"commit_references":{"items":{"$ref":"#/components/schemas/CommitReferenceSummary"},"type":"array","title":"Commit References","default":[]}},"type":"object","required":["workspace","turns"],"title":"WorkspaceSnapshotResponse"},"WorkspaceStateResponse":{"properties":{"turns":{"items":{"$ref":"#/components/schemas/TurnSummary"},"type":"array","title":"Turns"},"artifacts":{"items":{"$ref":"#/components/schemas/ArtifactSummary"},"type":"array","title":"Artifacts","default":[]},"snapshot_nodes":{"items":{"$ref":"#/components/schemas/SnapshotNode"},"type":"array","title":"Snapshot Nodes","default":[]},"commit_references":{"items":{"$ref":"#/components/schemas/CommitReferenceSummary"},"type":"array","title":"Commit References","default":[]},"current_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Turn Id"},"current_snapshot_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Snapshot Id"},"member_cursors":{"items":{"$ref":"#/components/schemas/MemberCursor"},"type":"array","title":"Member Cursors","default":[]},"is_public":{"type":"boolean","title":"Is Public","default":false},"sandbox_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sandbox Url"},"review_status":{"type":"string","title":"Review Status","default":"draft"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["turns","current_turn_id"],"title":"WorkspaceStateResponse","description":"Single call gives the renderer everything needed to paint the workspace page."},"WriteLinksRequest":{"properties":{"repo":{"type":"string","title":"Repo"},"pr_number":{"type":"integer","title":"Pr Number"},"installation_id":{"type":"integer","title":"Installation Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"snapshot_ids":{"items":{"type":"string"},"type":"array","title":"Snapshot Ids"}},"type":"object","required":["repo","pr_number","installation_id","workspace_id","snapshot_ids"],"title":"WriteLinksRequest"},"WriteLinksResponse":{"properties":{"linked_snapshot_ids":{"items":{"type":"string"},"type":"array","title":"Linked Snapshot Ids"},"comment_patched":{"type":"boolean","title":"Comment Patched"}},"type":"object","required":["linked_snapshot_ids","comment_patched"],"title":"WriteLinksResponse"},"_SoloOnboarding":{"properties":{"kind":{"type":"string","const":"solo","title":"Kind"}},"type":"object","required":["kind"],"title":"_SoloOnboarding"},"_TeamOnboarding":{"properties":{"kind":{"type":"string","const":"team","title":"Kind"}},"type":"object","required":["kind"],"title":"_TeamOnboarding"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}