diff --git a/packages/web/openapi.json b/packages/web/openapi.json index bf05f14..e9e9bd4 100644 --- a/packages/web/openapi.json +++ b/packages/web/openapi.json @@ -1,5265 +1,6535 @@ { - "openapi": "3.1.0", - "info": { - "title": "Honcho API", - "summary": "The Identity Layer for the Agentic World", - "description": "Honcho is a platform for giving agents user-centric memory and social cognition.", - "contact": { - "name": "Plastic Labs", - "url": "https://honcho.dev/", - "email": "hello@plasticlabs.ai" - }, - "license": { - "name": "GNU Affero General Public License v3.0", - "identifier": "AGPL-3.0-only", - "url": "https://github.com/plastic-labs/honcho/blob/main/LICENSE" - }, - "version": "3.0.5" - }, - "servers": [ - { - "url": "https://api.honcho.dev", - "description": "Production SaaS Platform" - }, - { - "url": "http://localhost:8000", - "description": "Local Development Server" - } - ], - "paths": { - "/v3/workspaces": { - "post": { - "tags": ["workspaces"], - "summary": "Get Or Create Workspace", - "description": "Get a Workspace by ID.\n\nIf workspace_id is provided as a query parameter, it uses that (must match JWT workspace_id).\nOtherwise, it uses the workspace_id from the JWT.", - "operationId": "get_or_create_workspace_v3_workspaces_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkspaceCreate", - "description": "Workspace creation parameters" - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Workspace" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - }, - "security": [ - { - "HTTPBearer": [] - } - ] - } - }, - "/v3/workspaces/list": { - "post": { - "tags": ["workspaces"], - "summary": "Get All Workspaces", - "description": "Get all Workspaces, paginated with optional filters.", - "operationId": "get_all_workspaces_v3_workspaces_list_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/WorkspaceGet" - }, - { - "type": "null" - } - ], - "description": "Filtering and pagination options for the workspaces list", - "title": "Options" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Workspace_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}": { - "put": { - "tags": ["workspaces"], - "summary": "Update Workspace", - "description": "Update Workspace metadata and/or configuration.", - "operationId": "update_workspace_v3_workspaces__workspace_id__put", - "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/WorkspaceUpdate", - "description": "Updated workspace parameters" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Workspace" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": ["workspaces"], - "summary": "Delete Workspace", - "description": "Delete a Workspace. This accepts the deletion request and processes it in the background,\npermanently deleting all peers, messages, conclusions, and other resources associated\nwith the workspace.\n\nReturns 409 Conflict if the workspace contains active sessions.\nDelete all sessions first, then delete the workspace.\n\nThis action cannot be undone.", - "operationId": "delete_workspace_v3_workspaces__workspace_id__delete", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - } - ], - "responses": { - "202": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/search": { - "post": { - "tags": ["workspaces"], - "summary": "Search Workspace", - "description": "Search messages in a Workspace using optional filters. Use `limit` to control the number of\nresults returned.", - "operationId": "search_workspace_v3_workspaces__workspace_id__search_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageSearchOptions", - "description": "Message search parameters" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Message" - }, - "title": "Response Search Workspace V3 Workspaces Workspace Id Search Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/queue/status": { - "get": { - "tags": ["workspaces"], - "summary": "Get Queue Status", - "description": "Get the processing queue status for a Workspace, optionally scoped to an observer, sender,\nand/or session.\n\nOnly tracks user-facing task types (representation, summary, dream).\nInternal infrastructure tasks (reconciler, webhook, deletion) are excluded.\nNote: completed counts reflect items since the last periodic queue cleanup,\nnot lifetime totals.", - "operationId": "get_queue_status_v3_workspaces__workspace_id__queue_status_get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "observer_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Optional observer ID to filter by", - "title": "Observer Id" - }, - "description": "Optional observer ID to filter by" - }, - { - "name": "sender_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Optional sender ID to filter by", - "title": "Sender Id" - }, - "description": "Optional sender ID to filter by" - }, - { - "name": "session_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Optional session ID to filter by", - "title": "Session Id" - }, - "description": "Optional session ID to filter by" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueueStatus" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/schedule_dream": { - "post": { - "tags": ["workspaces"], - "summary": "Schedule Dream", - "description": "Manually schedule a dream task for a specific collection.\n\nThis endpoint bypasses all automatic dream conditions (document threshold,\nminimum hours between dreams) and schedules the dream task for a future execution.\n\nCurrently this endpoint only supports scheduling immediate dreams. In the future,\nusers may pass a cron-style expression to schedule dreams at specific times.", - "operationId": "schedule_dream_v3_workspaces__workspace_id__schedule_dream_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ScheduleDreamRequest", - "description": "Dream scheduling parameters" - } - } - } - }, - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/peers/list": { - "post": { - "tags": ["peers"], - "summary": "Get Peers", - "description": "Get all Peers for a Workspace, paginated with optional filters.", - "operationId": "get_peers_v3_workspaces__workspace_id__peers_list_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/PeerGet" - }, - { - "type": "null" - } - ], - "description": "Filtering options for the peers list", - "title": "Options" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Peer_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/peers": { - "post": { - "tags": ["peers"], - "summary": "Get Or Create Peer", - "description": "Get a Peer by ID or create a new Peer with the given ID.\n\nIf peer_id is provided as a query parameter, it uses that (must match JWT workspace_id).\nOtherwise, it uses the peer_id from the JWT.", - "operationId": "get_or_create_peer_v3_workspaces__workspace_id__peers_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PeerCreate", - "description": "Peer creation parameters" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Peer" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/peers/{peer_id}": { - "put": { - "tags": ["peers"], - "summary": "Update Peer", - "description": "Update a Peer's metadata and/or configuration.", - "operationId": "update_peer_v3_workspaces__workspace_id__peers__peer_id__put", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "peer_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Peer Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PeerUpdate", - "description": "Updated peer parameters" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Peer" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/peers/{peer_id}/sessions": { - "post": { - "tags": ["peers"], - "summary": "Get Sessions For Peer", - "description": "Get all Sessions for a Peer, paginated with optional filters.", - "operationId": "get_sessions_for_peer_v3_workspaces__workspace_id__peers__peer_id__sessions_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "peer_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Peer Id" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/SessionGet" - }, - { - "type": "null" - } - ], - "description": "Filtering options for the sessions list", - "title": "Options" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Session_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/peers/{peer_id}/chat": { - "post": { - "tags": ["peers"], - "summary": "Chat", - "description": "Query a Peer's representation using natural language. Performs agentic search and reasoning to comprehensively\nanswer the query based on all latent knowledge gathered about the peer from their messages and conclusions.", - "operationId": "chat_v3_workspaces__workspace_id__peers__peer_id__chat_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "peer_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Peer Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DialecticOptions" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "properties": { - "content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Content" - } - }, - "required": ["content"], - "title": "DialecticResponse", - "type": "object" - } - }, - "text/event-stream": {} - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/peers/{peer_id}/representation": { - "post": { - "tags": ["peers"], - "summary": "Get Representation", - "description": "Get a curated subset of a Peer's Representation. A Representation is always a subset of the total\nknowledge about the Peer. The subset can be scoped and filtered in various ways.\n\n\nIf a session_id is provided in the body, we get the Representation of the Peer scoped to that Session.\nIf a target is provided, we get the Representation of the target from the perspective of the Peer.\nIf no target is provided, we get the omniscient Honcho Representation of the Peer.", - "operationId": "get_representation_v3_workspaces__workspace_id__peers__peer_id__representation_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "peer_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Peer Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PeerRepresentationGet", - "description": "Options for getting the peer representation" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RepresentationResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/peers/{peer_id}/card": { - "get": { - "tags": ["peers"], - "summary": "Get Peer Card", - "description": "Get a peer card for a specific peer relationship.\n\nReturns the peer card that the observer peer has for the target peer if it exists.\nIf no target is specified, returns the observer's own peer card.", - "operationId": "get_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "peer_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "ID of the observer peer", - "title": "Peer Id" - }, - "description": "ID of the observer peer" - }, - { - "name": "target", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Optional target peer to retrieve a card for, from the observer's perspective. If not provided, returns the observer's own card", - "title": "Target" - }, - "description": "Optional target peer to retrieve a card for, from the observer's perspective. If not provided, returns the observer's own card" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PeerCardResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": ["peers"], - "summary": "Set Peer Card", - "description": "Set a peer card for a specific peer relationship.\n\nSets the peer card that the observer peer has for the target peer.\nIf no target is specified, sets the observer's own peer card.", - "operationId": "set_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_put", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "peer_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "ID of the observer peer", - "title": "Peer Id" - }, - "description": "ID of the observer peer" - }, - { - "name": "target", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Optional target peer to set a card for, from the observer's perspective. If not provided, sets the observer's own card", - "title": "Target" - }, - "description": "Optional target peer to set a card for, from the observer's perspective. If not provided, sets the observer's own card" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PeerCardSet", - "description": "Peer card data to set" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PeerCardResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/peers/{peer_id}/context": { - "get": { - "tags": ["peers"], - "summary": "Get Peer Context", - "description": "Get context for a peer, including their representation and peer card.\n\nThis endpoint returns a curated subset of the representation and peer card for a peer.\nIf a target is specified, returns the context for the target from the\nobserver peer's perspective. If no target is specified, returns the\npeer's own context (self-observation).\n\nThis is useful for getting all the context needed about a peer without\nmaking multiple API calls.", - "operationId": "get_peer_context_v3_workspaces__workspace_id__peers__peer_id__context_get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "peer_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "ID of the observer peer", - "title": "Peer Id" - }, - "description": "ID of the observer peer" - }, - { - "name": "target", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Optional target peer to get context for, from the observer's perspective. If not provided, returns the observer's own context (self-observation)", - "title": "Target" - }, - "description": "Optional target peer to get context for, from the observer's perspective. If not provided, returns the observer's own context (self-observation)" - }, - { - "name": "search_query", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Optional query to curate the representation around semantic search results", - "title": "Search Query" - }, - "description": "Optional query to curate the representation around semantic search results" - }, - { - "name": "search_top_k", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer", - "maximum": 100, - "minimum": 1 - }, - { - "type": "null" - } - ], - "description": "Only used if `search_query` is provided. Number of semantic-search-retrieved conclusions to include", - "title": "Search Top K" - }, - "description": "Only used if `search_query` is provided. Number of semantic-search-retrieved conclusions to include" - }, - { - "name": "search_max_distance", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "number", - "maximum": 1, - "minimum": 0 - }, - { - "type": "null" - } - ], - "description": "Only used if `search_query` is provided. Maximum distance for semantically relevant conclusions", - "title": "Search Max Distance" - }, - "description": "Only used if `search_query` is provided. Maximum distance for semantically relevant conclusions" - }, - { - "name": "include_most_frequent", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "Whether to include the most frequent conclusions in the representation", - "default": true, - "title": "Include Most Frequent" - }, - "description": "Whether to include the most frequent conclusions in the representation" - }, - { - "name": "max_conclusions", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer", - "maximum": 100, - "minimum": 1 - }, - { - "type": "null" - } - ], - "description": "Maximum number of conclusions to include in the representation", - "title": "Max Conclusions" - }, - "description": "Maximum number of conclusions to include in the representation" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PeerContext" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/peers/{peer_id}/search": { - "post": { - "tags": ["peers"], - "summary": "Search Peer", - "description": "Search a Peer's messages, optionally filtered by various criteria.", - "operationId": "search_peer_v3_workspaces__workspace_id__peers__peer_id__search_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "peer_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Peer Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageSearchOptions", - "description": "Message search parameters. Use `limit` to control the number of results returned." - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Message" - }, - "title": "Response Search Peer V3 Workspaces Workspace Id Peers Peer Id Search Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/list": { - "post": { - "tags": ["sessions"], - "summary": "Get Sessions", - "description": "Get all Sessions for a Workspace, paginated with optional filters.", - "operationId": "get_sessions_v3_workspaces__workspace_id__sessions_list_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/SessionGet" - }, - { - "type": "null" - } - ], - "description": "Filtering and pagination options for the sessions list", - "title": "Options" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Session_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions": { - "post": { - "tags": ["sessions"], - "summary": "Get Or Create Session", - "description": "Get a Session by ID or create a new Session with the given ID.\n\nIf Session ID is provided as a parameter, it verifies the Session is in the Workspace.\nOtherwise, it uses the session_id from the JWT for verification.", - "operationId": "get_or_create_session_v3_workspaces__workspace_id__sessions_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionCreate", - "description": "Session creation parameters" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}": { - "put": { - "tags": ["sessions"], - "summary": "Update Session", - "description": "Update a Session's metadata and/or configuration.", - "operationId": "update_session_v3_workspaces__workspace_id__sessions__session_id__put", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionUpdate", - "description": "Updated session parameters" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": ["sessions"], - "summary": "Delete Session", - "description": "Delete a Session and all associated messages.\n\nThe Session is marked as inactive immediately and returns 202 Accepted. The actual\ndeletion of all related data happens asynchronously via the queue with retry support.\n\nThis action cannot be undone.", - "operationId": "delete_session_v3_workspaces__workspace_id__sessions__session_id__delete", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - } - ], - "responses": { - "202": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}/clone": { - "post": { - "tags": ["sessions"], - "summary": "Clone Session", - "description": "Clone a Session, optionally up to a specific message ID.", - "operationId": "clone_session_v3_workspaces__workspace_id__sessions__session_id__clone_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - }, - { - "name": "message_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Message ID to cut off the clone at", - "title": "Message Id" - }, - "description": "Message ID to cut off the clone at" - } - ], - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}/peers": { - "post": { - "tags": ["sessions"], - "summary": "Add Peers To Session", - "description": "Add Peers to a Session. If a Peer does not yet exist, it will be created automatically.", - "operationId": "add_peers_to_session_v3_workspaces__workspace_id__sessions__session_id__peers_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SessionPeerConfig" - }, - "description": "List of peer IDs (with session-level configuration) to add to the session", - "title": "Peers" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": ["sessions"], - "summary": "Set Session Peers", - "description": "Set the Peers in a Session. If a Peer does not yet exist, it will be created automatically.\n\nThis will fully replace the current set of Peers in the Session.", - "operationId": "set_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_put", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SessionPeerConfig" - }, - "description": "List of peer IDs (with session-level configuration) to set for the session", - "title": "Peers" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": ["sessions"], - "summary": "Remove Peers From Session", - "description": "Remove Peers by ID from a Session.", - "operationId": "remove_peers_from_session_v3_workspaces__workspace_id__sessions__session_id__peers_delete", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - }, - "description": "List of peer IDs to remove from the session", - "title": "Peers" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Session" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "tags": ["sessions"], - "summary": "Get Session Peers", - "description": "Get all Peers in a Session. Results are paginated.", - "operationId": "get_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Peer_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}/peers/{peer_id}/config": { - "get": { - "tags": ["sessions"], - "summary": "Get Peer Config", - "description": "Get the configuration for a Peer in a Session.", - "operationId": "get_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - }, - { - "name": "peer_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Peer Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionPeerConfig" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": ["sessions"], - "summary": "Set Peer Config", - "description": "Set the configuration for a Peer in a Session.", - "operationId": "set_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_put", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - }, - { - "name": "peer_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Peer Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionPeerConfig", - "description": "New peer configuration" - } - } - } - }, - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}/context": { - "get": { - "tags": ["sessions"], - "summary": "Get Session Context", - "description": "Produce a context object from the Session. The caller provides an optional token limit which the entire context must fit into.\nIf not provided, the context will be exhaustive (within configured max tokens). To do this, we allocate 40% of the token limit\nto the summary, and 60% to recent messages -- as many as can fit. Note that the summary will usually take up less space than\nthis. If the caller does not want a summary, we allocate all the tokens to recent messages.", - "operationId": "get_session_context_v3_workspaces__workspace_id__sessions__session_id__context_get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - }, - { - "name": "tokens", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer", - "maximum": 100000 - }, - { - "type": "null" - } - ], - "description": "Number of tokens to use for the context. Includes summary if set to true. Includes representation and peer card if they are included in the response. If not provided, the context will be exhaustive (within 100000 tokens)", - "title": "Tokens" - }, - "description": "Number of tokens to use for the context. Includes summary if set to true. Includes representation and peer card if they are included in the response. If not provided, the context will be exhaustive (within 100000 tokens)" - }, - { - "name": "search_query", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "A query string used to fetch semantically relevant conclusions", - "title": "Search Query" - }, - "description": "A query string used to fetch semantically relevant conclusions" - }, - { - "name": "summary", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "Whether or not to include a summary *if* one is available for the session", - "default": true, - "title": "Summary" - }, - "description": "Whether or not to include a summary *if* one is available for the session" - }, - { - "name": "peer_target", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "The target of the perspective. If given without `peer_perspective`, will get the Honcho-level representation and peer card for this peer. If given with `peer_perspective`, will get the representation and card for this peer *from the perspective of that peer*.", - "title": "Peer Target" - }, - "description": "The target of the perspective. If given without `peer_perspective`, will get the Honcho-level representation and peer card for this peer. If given with `peer_perspective`, will get the representation and card for this peer *from the perspective of that peer*." - }, - { - "name": "peer_perspective", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "A peer to get context for. If given, response will attempt to include representation and card from the perspective of that peer. Must be provided with `peer_target`.", - "title": "Peer Perspective" - }, - "description": "A peer to get context for. If given, response will attempt to include representation and card from the perspective of that peer. Must be provided with `peer_target`." - }, - { - "name": "limit_to_session", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "Only used if `search_query` is provided. Whether to limit the representation to the session (as opposed to everything known about the target peer)", - "default": false, - "title": "Limit To Session" - }, - "description": "Only used if `search_query` is provided. Whether to limit the representation to the session (as opposed to everything known about the target peer)" - }, - { - "name": "search_top_k", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer", - "maximum": 100, - "minimum": 1 - }, - { - "type": "null" - } - ], - "description": "Only used if `search_query` is provided. The number of semantic-search-retrieved conclusions to include in the representation", - "title": "Search Top K" - }, - "description": "Only used if `search_query` is provided. The number of semantic-search-retrieved conclusions to include in the representation" - }, - { - "name": "search_max_distance", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "number", - "maximum": 1, - "minimum": 0 - }, - { - "type": "null" - } - ], - "description": "Only used if `search_query` is provided. The maximum distance to search for semantically relevant conclusions", - "title": "Search Max Distance" - }, - "description": "Only used if `search_query` is provided. The maximum distance to search for semantically relevant conclusions" - }, - { - "name": "include_most_frequent", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "Only used if `search_query` is provided. Whether to include the most frequent conclusions in the representation", - "default": false, - "title": "Include Most Frequent" - }, - "description": "Only used if `search_query` is provided. Whether to include the most frequent conclusions in the representation" - }, - { - "name": "max_conclusions", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer", - "maximum": 100, - "minimum": 1 - }, - { - "type": "null" - } - ], - "description": "Only used if `search_query` is provided. The maximum number of conclusions to include in the representation", - "title": "Max Conclusions" - }, - "description": "Only used if `search_query` is provided. The maximum number of conclusions to include in the representation" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionContext" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}/summaries": { - "get": { - "tags": ["sessions"], - "summary": "Get Session Summaries", - "description": "Get available summaries for a Session.\n\nReturns both short and long summaries if available, including metadata like\nthe message ID they cover up to, creation timestamp, and token count.", - "operationId": "get_session_summaries_v3_workspaces__workspace_id__sessions__session_id__summaries_get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SessionSummaries" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}/search": { - "post": { - "tags": ["sessions"], - "summary": "Search Session", - "description": "Search a Session with optional filters. Use `limit` to control the number of results returned.", - "operationId": "search_session_v3_workspaces__workspace_id__sessions__session_id__search_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageSearchOptions", - "description": "Message search parameters" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Message" - }, - "title": "Response Search Session V3 Workspaces Workspace Id Sessions Session Id Search Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages": { - "post": { - "tags": ["messages"], - "summary": "Create Messages For Session", - "description": "Add new message(s) to a session.", - "operationId": "create_messages_for_session_v3_workspaces__workspace_id__sessions__session_id__messages_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MessageBatchCreate" - } - } - } - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Message" - }, - "title": "Response Create Messages For Session V3 Workspaces Workspace Id Sessions Session Id Messages Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/upload": { - "post": { - "tags": ["messages"], - "summary": "Create Messages With File", - "description": "Create messages from uploaded files. Files are converted to text and split into multiple messages.", - "operationId": "create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post" - } - } - } - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Message" - }, - "title": "Response Create Messages With File V3 Workspaces Workspace Id Sessions Session Id Messages Upload Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/list": { - "post": { - "tags": ["messages"], - "summary": "Get Messages", - "description": "Get all messages for a Session with optional filters. Results are paginated.", - "operationId": "get_messages_v3_workspaces__workspace_id__sessions__session_id__messages_list_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - }, - { - "name": "reverse", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Whether to reverse the order of results", - "default": false, - "title": "Reverse" - }, - "description": "Whether to reverse the order of results" - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/MessageGet" - }, - { - "type": "null" - } - ], - "description": "Filtering options for the message list", - "title": "Options" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Message_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/{message_id}": { - "get": { - "tags": ["messages"], - "summary": "Get Message", - "description": "Get a single message by ID from a Session.", - "operationId": "get_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session Id" - } - }, - { - "name": "message_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Message Id" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Message" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": ["messages"], - "summary": "Update Message", - "description": "Update the metadata of a message.\n\nThis will overwrite any existing metadata for the message.", - "operationId": "update_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__put", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Session 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", - "description": "Updated message parameters" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Message" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/conclusions": { - "post": { - "tags": ["conclusions"], - "summary": "Create Conclusions", - "description": "Create one or more Conclusions.\n\nConclusions are logical certainties derived from interactions between Peers. They form the basis of a Peer's Representation.", - "operationId": "create_conclusions_v3_workspaces__workspace_id__conclusions_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConclusionBatchCreate", - "description": "Batch of Conclusions to create" - } - } - } - }, - "responses": { - "201": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Conclusion" - }, - "title": "Response Create Conclusions V3 Workspaces Workspace Id Conclusions Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/conclusions/list": { - "post": { - "tags": ["conclusions"], - "summary": "List Conclusions", - "description": "List Conclusions using optional filters, ordered by recency unless `reverse` is true. Results are paginated.", - "operationId": "list_conclusions_v3_workspaces__workspace_id__conclusions_list_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "reverse", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "Whether to reverse the order of results", - "default": false, - "title": "Reverse" - }, - "description": "Whether to reverse the order of results" - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/ConclusionGet" - }, - { - "type": "null" - } - ], - "description": "Filtering options for the Conclusions list", - "title": "Options" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_Conclusion_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/conclusions/query": { - "post": { - "tags": ["conclusions"], - "summary": "Query Conclusions", - "description": "Query Conclusions using semantic search. Use `top_k` to control the number of results returned.", - "operationId": "query_conclusions_v3_workspaces__workspace_id__conclusions_query_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConclusionQuery", - "description": "Semantic search parameters for Conclusions" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Conclusion" - }, - "title": "Response Query Conclusions V3 Workspaces Workspace Id Conclusions Query Post" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/conclusions/{conclusion_id}": { - "delete": { - "tags": ["conclusions"], - "summary": "Delete Conclusion", - "description": "Delete a single Conclusion by ID.\n\nThis action cannot be undone.", - "operationId": "delete_conclusion_v3_workspaces__workspace_id__conclusions__conclusion_id__delete", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Workspace Id" - } - }, - { - "name": "conclusion_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "Conclusion Id" - } - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/keys": { - "post": { - "tags": ["keys"], - "summary": "Create Key", - "description": "Create a new Key", - "operationId": "create_key_v3_keys_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "ID of the workspace to scope the key to", - "title": "Workspace Id" - }, - "description": "ID of the workspace to scope the key to" - }, - { - "name": "peer_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "ID of the peer to scope the key to", - "title": "Peer Id" - }, - "description": "ID of the peer to scope the key to" - }, - { - "name": "session_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "ID of the session to scope the key to", - "title": "Session Id" - }, - "description": "ID of the session to scope the key to" - }, - { - "name": "expires_at", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Expires At" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/webhooks": { - "post": { - "tags": ["webhooks"], - "summary": "Get Or Create Webhook Endpoint", - "description": "Get or create a webhook endpoint URL.", - "operationId": "get_or_create_webhook_endpoint_v3_workspaces__workspace_id__webhooks_post", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Workspace ID", - "title": "Workspace Id" - }, - "description": "Workspace ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookEndpointCreate", - "description": "Webhook endpoint parameters" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WebhookEndpoint" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "tags": ["webhooks"], - "summary": "List Webhook Endpoints", - "description": "List all webhook endpoints, optionally filtered by workspace.", - "operationId": "list_webhook_endpoints_v3_workspaces__workspace_id__webhooks_get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Workspace ID", - "title": "Workspace Id" - }, - "description": "Workspace ID" - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "Page number", - "default": 1, - "title": "Page" - }, - "description": "Page number" - }, - { - "name": "size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "description": "Page size", - "default": 50, - "title": "Size" - }, - "description": "Page size" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_WebhookEndpoint_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/webhooks/{endpoint_id}": { - "delete": { - "tags": ["webhooks"], - "summary": "Delete Webhook Endpoint", - "description": "Delete a specific webhook endpoint.", - "operationId": "delete_webhook_endpoint_v3_workspaces__workspace_id__webhooks__endpoint_id__delete", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Workspace ID", - "title": "Workspace Id" - }, - "description": "Workspace ID" - }, - { - "name": "endpoint_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Webhook endpoint ID", - "title": "Endpoint Id" - }, - "description": "Webhook endpoint ID" - } - ], - "responses": { - "204": { - "description": "Successful Response" - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/v3/workspaces/{workspace_id}/webhooks/test": { - "get": { - "tags": ["webhooks"], - "summary": "Test Emit", - "description": "Test publishing a webhook event.", - "operationId": "test_emit_v3_workspaces__workspace_id__webhooks_test_get", - "security": [ - { - "HTTPBearer": [] - } - ], - "parameters": [ - { - "name": "workspace_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "Workspace ID", - "title": "Workspace Id" - }, - "description": "Workspace ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - } - }, - "components": { - "schemas": { - "Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post": { - "properties": { - "file": { - "type": "string", - "contentMediaType": "application/octet-stream", - "title": "File" - }, - "peer_id": { - "type": "string", - "title": "Peer Id" - }, - "metadata": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "configuration": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Configuration" - }, - "created_at": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Created At" - } - }, - "type": "object", - "required": ["file", "peer_id"], - "title": "Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post" - }, - "Conclusion": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "content": { - "type": "string", - "title": "Content" - }, - "observer_id": { - "type": "string", - "title": "Observer Id", - "description": "The peer who made the conclusion" - }, - "observed_id": { - "type": "string", - "title": "Observed Id", - "description": "The peer the conclusion is about" - }, - "session_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Session Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - } - }, - "type": "object", - "required": [ - "id", - "content", - "observer_id", - "observed_id", - "created_at" - ], - "title": "Conclusion", - "description": "Conclusion response - external view of a document." - }, - "ConclusionBatchCreate": { - "properties": { - "conclusions": { - "items": { - "$ref": "#/components/schemas/ConclusionCreate" - }, - "type": "array", - "maxItems": 100, - "minItems": 1, - "title": "Conclusions" - } - }, - "type": "object", - "required": ["conclusions"], - "title": "ConclusionBatchCreate", - "description": "Schema for batch conclusion creation with a max of 100 conclusions." - }, - "ConclusionCreate": { - "properties": { - "content": { - "type": "string", - "maxLength": 65535, - "minLength": 1, - "title": "Content" - }, - "observer_id": { - "type": "string", - "title": "Observer Id", - "description": "The peer making the conclusion" - }, - "observed_id": { - "type": "string", - "title": "Observed Id", - "description": "The peer the conclusion is about" - }, - "session_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Session Id", - "description": "A session ID to store the conclusion in, if specified" - } - }, - "type": "object", - "required": ["content", "observer_id", "observed_id"], - "title": "ConclusionCreate", - "description": "Schema for creating a single conclusion." - }, - "ConclusionGet": { - "properties": { - "filters": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Filters" - } - }, - "type": "object", - "title": "ConclusionGet", - "description": "Schema for listing conclusions with optional filters." - }, - "ConclusionQuery": { - "properties": { - "query": { - "type": "string", - "title": "Query", - "description": "Semantic search query" - }, - "top_k": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "title": "Top K", - "description": "Number of results to return", - "default": 10 - }, - "distance": { - "anyOf": [ - { - "type": "number", - "maximum": 1, - "minimum": 0 - }, - { - "type": "null" - } - ], - "title": "Distance", - "description": "Maximum cosine distance threshold for results" - }, - "filters": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Filters", - "description": "Additional filters to apply" - } - }, - "type": "object", - "required": ["query"], - "title": "ConclusionQuery", - "description": "Query parameters for semantic search of conclusions." - }, - "DialecticOptions": { - "properties": { - "session_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Session Id", - "description": "ID of the session to scope the representation to" - }, - "target": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Target", - "description": "Optional peer to get the representation for, from the perspective of this peer" - }, - "query": { - "type": "string", - "maxLength": 10000, - "minLength": 1, - "title": "Query", - "description": "Dialectic API Prompt" - }, - "stream": { - "type": "boolean", - "title": "Stream", - "default": false - }, - "reasoning_level": { - "type": "string", - "enum": ["minimal", "low", "medium", "high", "max"], - "title": "Reasoning Level", - "description": "Level of reasoning to apply: minimal, low, medium, high, or max", - "default": "low" - } - }, - "type": "object", - "required": ["query"], - "title": "DialecticOptions" - }, - "DreamConfiguration": { - "properties": { - "enabled": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Enabled", - "description": "Whether to enable dream functionality. If reasoning is disabled, dreams will also be disabled and this setting will be ignored." - } - }, - "type": "object", - "title": "DreamConfiguration" - }, - "DreamType": { - "type": "string", - "enum": ["omni"], - "title": "DreamType", - "description": "Types of dreams that can be triggered." - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "Message": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "content": { - "type": "string", - "title": "Content" - }, - "peer_id": { - "type": "string", - "title": "Peer Id" - }, - "session_id": { - "type": "string", - "title": "Session Id" - }, - "metadata": { - "additionalProperties": true, - "type": "object", - "title": "Metadata" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "workspace_id": { - "type": "string", - "title": "Workspace Id" - }, - "token_count": { - "type": "integer", - "title": "Token Count" - } - }, - "type": "object", - "required": [ - "id", - "content", - "peer_id", - "session_id", - "created_at", - "workspace_id", - "token_count" - ], - "title": "Message" - }, - "MessageBatchCreate": { - "properties": { - "messages": { - "items": { - "$ref": "#/components/schemas/MessageCreate" - }, - "type": "array", - "maxItems": 100, - "minItems": 1, - "title": "Messages" - } - }, - "type": "object", - "required": ["messages"], - "title": "MessageBatchCreate", - "description": "Schema for batch message creation with a max of 100 messages" - }, - "MessageConfiguration": { - "properties": { - "reasoning": { - "anyOf": [ - { - "$ref": "#/components/schemas/ReasoningConfiguration" - }, - { - "type": "null" - } - ], - "description": "Configuration for reasoning functionality." - } - }, - "type": "object", - "title": "MessageConfiguration", - "description": "The set of options that can be in a message DB-level configuration dictionary.\n\nAll fields are optional. Message-level configuration overrides all other configurations." - }, - "MessageCreate": { - "properties": { - "content": { - "type": "string", - "maxLength": 25000, - "minLength": 0, - "title": "Content" - }, - "peer_id": { - "type": "string", - "title": "Peer Id" - }, - "metadata": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "configuration": { - "anyOf": [ - { - "$ref": "#/components/schemas/MessageConfiguration" - }, - { - "type": "null" - } - ] - }, - "created_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Created At" - } - }, - "type": "object", - "required": ["content", "peer_id"], - "title": "MessageCreate" - }, - "MessageGet": { - "properties": { - "filters": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Filters" - } - }, - "type": "object", - "title": "MessageGet" - }, - "MessageSearchOptions": { - "properties": { - "query": { - "type": "string", - "title": "Query", - "description": "Search query" - }, - "filters": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Filters", - "description": "Filters to scope the search" - }, - "limit": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "title": "Limit", - "description": "Number of results to return", - "default": 10 - } - }, - "type": "object", - "required": ["query"], - "title": "MessageSearchOptions" - }, - "MessageUpdate": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - } - }, - "type": "object", - "title": "MessageUpdate" - }, - "Page_Conclusion_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Conclusion" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": ["items", "total", "page", "size", "pages"], - "title": "Page[Conclusion]" - }, - "Page_Message_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Message" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": ["items", "total", "page", "size", "pages"], - "title": "Page[Message]" - }, - "Page_Peer_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Peer" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": ["items", "total", "page", "size", "pages"], - "title": "Page[Peer]" - }, - "Page_Session_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Session" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": ["items", "total", "page", "size", "pages"], - "title": "Page[Session]" - }, - "Page_WebhookEndpoint_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/WebhookEndpoint" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": ["items", "total", "page", "size", "pages"], - "title": "Page[WebhookEndpoint]" - }, - "Page_Workspace_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/Workspace" - }, - "type": "array", - "title": "Items" - }, - "total": { - "type": "integer", - "minimum": 0, - "title": "Total" - }, - "page": { - "type": "integer", - "minimum": 1, - "title": "Page" - }, - "size": { - "type": "integer", - "minimum": 1, - "title": "Size" - }, - "pages": { - "type": "integer", - "minimum": 0, - "title": "Pages" - } - }, - "type": "object", - "required": ["items", "total", "page", "size", "pages"], - "title": "Page[Workspace]" - }, - "Peer": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "workspace_id": { - "type": "string", - "title": "Workspace Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "metadata": { - "additionalProperties": true, - "type": "object", - "title": "Metadata" - }, - "configuration": { - "additionalProperties": true, - "type": "object", - "title": "Configuration" - } - }, - "type": "object", - "required": ["id", "workspace_id", "created_at"], - "title": "Peer" - }, - "PeerCardConfiguration": { - "properties": { - "use": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Use", - "description": "Whether to use peer card related to this peer during reasoning process." - }, - "create": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Create", - "description": "Whether to generate peer card based on content." - } - }, - "type": "object", - "title": "PeerCardConfiguration" - }, - "PeerCardResponse": { - "properties": { - "peer_card": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Peer Card", - "description": "The peer card content, or None if not found" - } - }, - "type": "object", - "title": "PeerCardResponse" - }, - "PeerCardSet": { - "properties": { - "peer_card": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Peer Card", - "description": "The peer card content to set" - } - }, - "type": "object", - "required": ["peer_card"], - "title": "PeerCardSet" - }, - "PeerContext": { - "properties": { - "peer_id": { - "type": "string", - "title": "Peer Id", - "description": "The ID of the peer" - }, - "target_id": { - "type": "string", - "title": "Target Id", - "description": "The ID of the target peer being observed" - }, - "representation": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Representation", - "description": "A curated subset of the representation of the target peer from the observer's perspective" - }, - "peer_card": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Peer Card", - "description": "The peer card for the target peer from the observer's perspective" - } - }, - "type": "object", - "required": ["peer_id", "target_id"], - "title": "PeerContext", - "description": "Context for a peer, including representation and peer card." - }, - "PeerCreate": { - "properties": { - "id": { - "type": "string", - "maxLength": 100, - "minLength": 1, - "pattern": "^[a-zA-Z0-9_-]+$", - "title": "Id" - }, - "metadata": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "configuration": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Configuration" - } - }, - "type": "object", - "required": ["id"], - "title": "PeerCreate" - }, - "PeerGet": { - "properties": { - "filters": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Filters" - } - }, - "type": "object", - "title": "PeerGet" - }, - "PeerRepresentationGet": { - "properties": { - "session_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Session Id", - "description": "Optional session ID within which to scope the representation" - }, - "target": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Target", - "description": "Optional peer ID to get the representation for, from the perspective of this peer" - }, - "search_query": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Search Query", - "description": "Optional input to curate the representation around semantic search results" - }, - "search_top_k": { - "anyOf": [ - { - "type": "integer", - "maximum": 100, - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Search Top K", - "description": "Only used if `search_query` is provided. Number of semantic-search-retrieved conclusions to include in the representation" - }, - "search_max_distance": { - "anyOf": [ - { - "type": "number", - "maximum": 1, - "minimum": 0 - }, - { - "type": "null" - } - ], - "title": "Search Max Distance", - "description": "Only used if `search_query` is provided. Maximum distance to search for semantically relevant conclusions" - }, - "include_most_frequent": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Include Most Frequent", - "description": "Only used if `search_query` is provided. Whether to include the most frequent conclusions in the representation" - }, - "max_conclusions": { - "anyOf": [ - { - "type": "integer", - "maximum": 100, - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Max Conclusions", - "description": "Only used if `search_query` is provided. Maximum number of conclusions to include in the representation", - "default": 25 - } - }, - "type": "object", - "title": "PeerRepresentationGet" - }, - "PeerUpdate": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "configuration": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Configuration" - } - }, - "type": "object", - "title": "PeerUpdate" - }, - "QueueStatus": { - "properties": { - "total_work_units": { - "type": "integer", - "title": "Total Work Units", - "description": "Total work units" - }, - "completed_work_units": { - "type": "integer", - "title": "Completed Work Units", - "description": "Completed work units (since last periodic cleanup)" - }, - "in_progress_work_units": { - "type": "integer", - "title": "In Progress Work Units", - "description": "Work units currently being processed" - }, - "pending_work_units": { - "type": "integer", - "title": "Pending Work Units", - "description": "Work units waiting to be processed" - }, - "sessions": { - "anyOf": [ - { - "additionalProperties": { - "$ref": "#/components/schemas/SessionQueueStatus" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Sessions", - "description": "Per-session status when not filtered by session" - } - }, - "type": "object", - "required": [ - "total_work_units", - "completed_work_units", - "in_progress_work_units", - "pending_work_units" - ], - "title": "QueueStatus", - "description": "Aggregated processing queue status.\n\nTracks user-facing task types only: representation, summary, and dream.\nInternal infrastructure tasks (reconciler, webhook, deletion) are excluded.\n\nNote: completed_work_units reflects items since the last periodic queue\ncleanup, not lifetime totals." - }, - "ReasoningConfiguration": { - "properties": { - "enabled": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Enabled", - "description": "Whether to enable reasoning functionality." - }, - "custom_instructions": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Custom Instructions", - "description": "TODO: currently unused. Custom instructions to use for the reasoning system on this workspace/session/message." - } - }, - "type": "object", - "title": "ReasoningConfiguration" - }, - "RepresentationResponse": { - "properties": { - "representation": { - "type": "string", - "title": "Representation" - } - }, - "type": "object", - "required": ["representation"], - "title": "RepresentationResponse" - }, - "ScheduleDreamRequest": { - "properties": { - "observer": { - "type": "string", - "title": "Observer", - "description": "Observer peer name" - }, - "observed": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Observed", - "description": "Observed peer name (defaults to observer if not specified)" - }, - "dream_type": { - "$ref": "#/components/schemas/DreamType", - "description": "Type of dream to schedule" - }, - "session_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Session Id", - "description": "Session ID to scope the dream to if specified" - } - }, - "type": "object", - "required": ["observer", "dream_type"], - "title": "ScheduleDreamRequest" - }, - "Session": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "is_active": { - "type": "boolean", - "title": "Is Active" - }, - "workspace_id": { - "type": "string", - "title": "Workspace Id" - }, - "metadata": { - "additionalProperties": true, - "type": "object", - "title": "Metadata" - }, - "configuration": { - "additionalProperties": true, - "type": "object", - "title": "Configuration" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - } - }, - "type": "object", - "required": ["id", "is_active", "workspace_id", "created_at"], - "title": "Session" - }, - "SessionConfiguration": { - "properties": { - "reasoning": { - "anyOf": [ - { - "$ref": "#/components/schemas/ReasoningConfiguration" - }, - { - "type": "null" - } - ], - "description": "Configuration for reasoning functionality." - }, - "peer_card": { - "anyOf": [ - { - "$ref": "#/components/schemas/PeerCardConfiguration" - }, - { - "type": "null" - } - ], - "description": "Configuration for peer card functionality. If reasoning is disabled, peer cards will also be disabled and these settings will be ignored." - }, - "summary": { - "anyOf": [ - { - "$ref": "#/components/schemas/SummaryConfiguration" - }, - { - "type": "null" - } - ], - "description": "Configuration for summary functionality." - }, - "dream": { - "anyOf": [ - { - "$ref": "#/components/schemas/DreamConfiguration" - }, - { - "type": "null" - } - ], - "description": "Configuration for dream functionality. If reasoning is disabled, dreams will also be disabled and these settings will be ignored." - } - }, - "additionalProperties": true, - "type": "object", - "title": "SessionConfiguration", - "description": "The set of options that can be in a session DB-level configuration dictionary.\n\nAll fields are optional. Session-level configuration overrides workspace-level configuration, which overrides global configuration." - }, - "SessionContext": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "messages": { - "items": { - "$ref": "#/components/schemas/Message" - }, - "type": "array", - "title": "Messages" - }, - "summary": { - "anyOf": [ - { - "$ref": "#/components/schemas/Summary" - }, - { - "type": "null" - } - ], - "description": "The summary if available" - }, - "peer_representation": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Peer Representation", - "description": "A curated subset of a peer representation, if context is requested from a specific perspective" - }, - "peer_card": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Peer Card", - "description": "The peer card, if context is requested from a specific perspective" - } - }, - "type": "object", - "required": ["id", "messages"], - "title": "SessionContext" - }, - "SessionCreate": { - "properties": { - "id": { - "type": "string", - "maxLength": 100, - "minLength": 1, - "pattern": "^[a-zA-Z0-9_-]+$", - "title": "Id" - }, - "metadata": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "peers": { - "anyOf": [ - { - "additionalProperties": { - "$ref": "#/components/schemas/SessionPeerConfig" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Peers" - }, - "configuration": { - "anyOf": [ - { - "$ref": "#/components/schemas/SessionConfiguration" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "required": ["id"], - "title": "SessionCreate" - }, - "SessionGet": { - "properties": { - "filters": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Filters" - } - }, - "type": "object", - "title": "SessionGet" - }, - "SessionPeerConfig": { - "properties": { - "observe_me": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Observe Me", - "description": "Whether Honcho will use reasoning to form a representation of this peer" - }, - "observe_others": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Observe Others", - "description": "Whether this peer should form a session-level theory-of-mind representation of other peers in the session" - } - }, - "type": "object", - "title": "SessionPeerConfig" - }, - "SessionQueueStatus": { - "properties": { - "session_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Session Id", - "description": "Session ID if filtered by session" - }, - "total_work_units": { - "type": "integer", - "title": "Total Work Units", - "description": "Total work units" - }, - "completed_work_units": { - "type": "integer", - "title": "Completed Work Units", - "description": "Completed work units" - }, - "in_progress_work_units": { - "type": "integer", - "title": "In Progress Work Units", - "description": "Work units currently being processed" - }, - "pending_work_units": { - "type": "integer", - "title": "Pending Work Units", - "description": "Work units waiting to be processed" - } - }, - "type": "object", - "required": [ - "total_work_units", - "completed_work_units", - "in_progress_work_units", - "pending_work_units" - ], - "title": "SessionQueueStatus", - "description": "Status for a specific session within the processing queue." - }, - "SessionSummaries": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "short_summary": { - "anyOf": [ - { - "$ref": "#/components/schemas/Summary" - }, - { - "type": "null" - } - ], - "description": "The short summary if available" - }, - "long_summary": { - "anyOf": [ - { - "$ref": "#/components/schemas/Summary" - }, - { - "type": "null" - } - ], - "description": "The long summary if available" - } - }, - "type": "object", - "required": ["id"], - "title": "SessionSummaries" - }, - "SessionUpdate": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "configuration": { - "anyOf": [ - { - "$ref": "#/components/schemas/SessionConfiguration" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "SessionUpdate" - }, - "Summary": { - "properties": { - "content": { - "type": "string", - "title": "Content", - "description": "The summary text" - }, - "message_id": { - "type": "string", - "title": "Message Id", - "description": "The public ID of the message that this summary covers up to" - }, - "summary_type": { - "type": "string", - "title": "Summary Type", - "description": "The type of summary (short or long)" - }, - "created_at": { - "type": "string", - "title": "Created At", - "description": "The timestamp of when the summary was created (ISO format)" - }, - "token_count": { - "type": "integer", - "title": "Token Count", - "description": "The number of tokens in the summary text" - } - }, - "type": "object", - "required": [ - "content", - "message_id", - "summary_type", - "created_at", - "token_count" - ], - "title": "Summary" - }, - "SummaryConfiguration": { - "properties": { - "enabled": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Enabled", - "description": "Whether to enable summary functionality." - }, - "messages_per_short_summary": { - "anyOf": [ - { - "type": "integer", - "minimum": 10 - }, - { - "type": "null" - } - ], - "title": "Messages Per Short Summary", - "description": "Number of messages per short summary. Must be positive, greater than or equal to 10, and less than messages_per_long_summary." - }, - "messages_per_long_summary": { - "anyOf": [ - { - "type": "integer", - "minimum": 20 - }, - { - "type": "null" - } - ], - "title": "Messages Per Long Summary", - "description": "Number of messages per long summary. Must be positive, greater than or equal to 20, and greater than messages_per_short_summary." - } - }, - "type": "object", - "title": "SummaryConfiguration" - }, - "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" - }, - "WebhookEndpoint": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "workspace_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Workspace Id" - }, - "url": { - "type": "string", - "title": "Url" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - } - }, - "type": "object", - "required": ["id", "workspace_id", "url", "created_at"], - "title": "WebhookEndpoint" - }, - "WebhookEndpointCreate": { - "properties": { - "url": { - "type": "string", - "title": "Url" - } - }, - "type": "object", - "required": ["url"], - "title": "WebhookEndpointCreate" - }, - "Workspace": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "metadata": { - "additionalProperties": true, - "type": "object", - "title": "Metadata" - }, - "configuration": { - "additionalProperties": true, - "type": "object", - "title": "Configuration" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - } - }, - "type": "object", - "required": ["id", "created_at"], - "title": "Workspace" - }, - "WorkspaceConfiguration": { - "properties": { - "reasoning": { - "anyOf": [ - { - "$ref": "#/components/schemas/ReasoningConfiguration" - }, - { - "type": "null" - } - ], - "description": "Configuration for reasoning functionality." - }, - "peer_card": { - "anyOf": [ - { - "$ref": "#/components/schemas/PeerCardConfiguration" - }, - { - "type": "null" - } - ], - "description": "Configuration for peer card functionality. If reasoning is disabled, peer cards will also be disabled and these settings will be ignored." - }, - "summary": { - "anyOf": [ - { - "$ref": "#/components/schemas/SummaryConfiguration" - }, - { - "type": "null" - } - ], - "description": "Configuration for summary functionality." - }, - "dream": { - "anyOf": [ - { - "$ref": "#/components/schemas/DreamConfiguration" - }, - { - "type": "null" - } - ], - "description": "Configuration for dream functionality. If reasoning is disabled, dreams will also be disabled and these settings will be ignored." - } - }, - "additionalProperties": true, - "type": "object", - "title": "WorkspaceConfiguration", - "description": "The set of options that can be in a workspace DB-level configuration dictionary.\n\nAll fields are optional. Session-level configuration overrides workspace-level configuration, which overrides global configuration." - }, - "WorkspaceCreate": { - "properties": { - "id": { - "type": "string", - "maxLength": 100, - "minLength": 1, - "pattern": "^[a-zA-Z0-9_-]+$", - "title": "Id" - }, - "metadata": { - "additionalProperties": true, - "type": "object", - "title": "Metadata", - "default": {} - }, - "configuration": { - "$ref": "#/components/schemas/WorkspaceConfiguration" - } - }, - "type": "object", - "required": ["id"], - "title": "WorkspaceCreate" - }, - "WorkspaceGet": { - "properties": { - "filters": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Filters" - } - }, - "type": "object", - "title": "WorkspaceGet" - }, - "WorkspaceUpdate": { - "properties": { - "metadata": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "configuration": { - "anyOf": [ - { - "$ref": "#/components/schemas/WorkspaceConfiguration" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "WorkspaceUpdate" - } - }, - "securitySchemes": { - "HTTPBearer": { - "type": "http", - "scheme": "bearer" - } - } - } + "openapi": "3.1.0", + "info": { + "title": "Honcho API", + "summary": "The Identity Layer for the Agentic World", + "description": "Honcho is a platform for giving agents user-centric memory and social cognition.", + "contact": { + "name": "Plastic Labs", + "url": "https://honcho.dev/", + "email": "hello@plasticlabs.ai" + }, + "license": { + "name": "GNU Affero General Public License v3.0", + "url": "https://github.com/plastic-labs/honcho/blob/main/LICENSE" + }, + "version": "3.2.0" + }, + "servers": [ + { + "url": "https://api.honcho.dev", + "description": "Production SaaS Platform" + }, + { + "url": "http://localhost:8000", + "description": "Local Development Server" + } + ], + "paths": { + "/v3/workspaces": { + "post": { + "tags": ["workspaces"], + "summary": "Get Or Create Workspace", + "description": "Get a Workspace by ID.\n\nIf workspace_id is provided as a query parameter, it uses that (must match JWT workspace_id).\nOtherwise, it uses the workspace_id from the JWT.", + "operationId": "get_or_create_workspace_v3_workspaces_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceCreate", + "description": "Workspace creation parameters" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workspace" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + }, + "security": [ + { + "HTTPBearer": [] + } + ] + } + }, + "/v3/workspaces/list": { + "post": { + "tags": ["workspaces"], + "summary": "Get All Workspaces", + "description": "Get all Workspaces, paginated with optional filters.", + "operationId": "get_all_workspaces_v3_workspaces_list_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to reverse the order of results", + "default": false, + "title": "Reverse" + }, + "description": "Whether to reverse the order of results" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkspaceGet" + }, + { + "type": "null" + } + ], + "description": "Filtering and pagination options for the workspaces list", + "title": "Options" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Workspace_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}": { + "put": { + "tags": ["workspaces"], + "summary": "Update Workspace", + "description": "Update Workspace metadata and/or configuration.", + "operationId": "update_workspace_v3_workspaces__workspace_id__put", + "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/WorkspaceUpdate", + "description": "Updated workspace parameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Workspace" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["workspaces"], + "summary": "Delete Workspace", + "description": "Delete a Workspace. This accepts the deletion request and processes it in the background,\npermanently deleting all peers, messages, conclusions, and other resources associated\nwith the workspace.\n\nReturns 409 Conflict if the workspace contains active sessions.\nDelete all sessions first, then delete the workspace.\n\nThis action cannot be undone.", + "operationId": "delete_workspace_v3_workspaces__workspace_id__delete", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "responses": { + "202": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/search": { + "post": { + "tags": ["workspaces"], + "summary": "Search Workspace", + "description": "Search messages in a Workspace using optional filters. Use `limit` to control the number of\nresults returned.\n\nPass `scope` to restrict the search to a scope's member sessions. A scope\nwith no member sessions returns no results (fail-closed).", + "operationId": "search_workspace_v3_workspaces__workspace_id__search_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceMessageSearchOptions", + "description": "Message search parameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + }, + "title": "Response Search Workspace V3 Workspaces Workspace Id Search Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/queue/status": { + "get": { + "tags": ["workspaces"], + "summary": "Get Queue Status", + "description": "Get the processing queue status for a Workspace, optionally scoped to an observer, sender,\nand/or session.\n\nOnly tracks user-facing task types (representation, summary, dream).\nInternal infrastructure tasks (reconciler, webhook, deletion) are excluded.\nNote: completed counts reflect items since the last periodic queue cleanup,\nnot lifetime totals.", + "operationId": "get_queue_status_v3_workspaces__workspace_id__queue_status_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "observer_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional observer ID to filter by", + "title": "Observer Id" + }, + "description": "Optional observer ID to filter by" + }, + { + "name": "sender_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional sender ID to filter by", + "title": "Sender Id" + }, + "description": "Optional sender ID to filter by" + }, + { + "name": "session_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional session ID to filter by", + "title": "Session Id" + }, + "description": "Optional session ID to filter by" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/QueueStatus" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/schedule_dream": { + "post": { + "tags": ["workspaces"], + "summary": "Schedule Dream", + "description": "Manually schedule a dream task for a specific collection.\n\nThis endpoint bypasses all automatic dream conditions (document threshold,\nminimum hours between dreams) and schedules the dream task for a future execution.\n\nCurrently this endpoint only supports scheduling immediate dreams. In the future,\nusers may pass a cron-style expression to schedule dreams at specific times.", + "operationId": "schedule_dream_v3_workspaces__workspace_id__schedule_dream_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScheduleDreamRequest", + "description": "Dream scheduling parameters" + } + } + } + }, + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/chat": { + "post": { + "tags": ["workspaces"], + "summary": "Workspace Chat", + "description": "Query the entire workspace using natural language. Runs the Dialectic agent over every peer in the workspace rather than a single (observer, observed) pair: there is no anchor peer and no `target`.\n\nPass `session_id` to narrow message tools to one session, or `scope` to restrict recall to the union of the named scopes' member sessions (always an allowlist, even for a single name; a scope with no member sessions recalls nothing). `session_id` and `scope` are mutually exclusive.\n\nSet `stream: true` to receive the answer as a `text/event-stream` of `{\"delta\": {\"content\": ...}, \"done\": false}` chunks terminated by `{\"done\": true}`. Requires a workspace- or admin-level key.", + "operationId": "chat_v3_workspaces__workspace_id__chat_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WorkspaceChatOptions" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content" + }, + "evidence": { + "anyOf": [ + { + "$ref": "#/components/schemas/Evidence" + }, + { + "type": "null" + } + ], + "description": "What the answer was built from. Present only when `include_evidence` is true." + } + }, + "required": ["content"], + "title": "DialecticResponse", + "type": "object" + } + }, + "text/event-stream": {} + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/peers/list": { + "post": { + "tags": ["peers"], + "summary": "Get Peers", + "description": "Get all Peers for a Workspace, paginated with optional filters.\n\nScope peers are excluded by default; set `kind` to \"scope\" for scope peers\nonly, or \"all\" for everything.", + "operationId": "get_peers_v3_workspaces__workspace_id__peers_list_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to reverse the order of results", + "default": false, + "title": "Reverse" + }, + "description": "Whether to reverse the order of results" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/PeerGet" + }, + { + "type": "null" + } + ], + "description": "Filtering options for the peers list", + "title": "Options" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Peer_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/peers": { + "post": { + "tags": ["peers"], + "summary": "Get Or Create Peer", + "description": "Get a Peer by ID or create a new Peer with the given ID.\n\nIf peer_id is provided as a query parameter, it uses that (must match JWT workspace_id).\nOtherwise, it uses the peer_id from the JWT.", + "operationId": "get_or_create_peer_v3_workspaces__workspace_id__peers_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PeerCreate", + "description": "Peer creation parameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Peer" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/peers/{peer_id}": { + "put": { + "tags": ["peers"], + "summary": "Update Peer", + "description": "Update a Peer's metadata and/or configuration.\n\nReturns 422 if the peer is a scope \u2014 use the scopes routes to manage scopes.", + "operationId": "update_peer_v3_workspaces__workspace_id__peers__peer_id__put", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "peer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Peer Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PeerUpdate", + "description": "Updated peer parameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Peer" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/peers/{peer_id}/sessions": { + "post": { + "tags": ["peers"], + "summary": "Get Sessions For Peer", + "description": "Get all Sessions for a Peer, paginated with optional filters.", + "operationId": "get_sessions_for_peer_v3_workspaces__workspace_id__peers__peer_id__sessions_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "peer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Peer Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to reverse the order of results", + "default": false, + "title": "Reverse" + }, + "description": "Whether to reverse the order of results" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/SessionGet" + }, + { + "type": "null" + } + ], + "description": "Filtering options for the sessions list", + "title": "Options" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Session_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/peers/{peer_id}/chat": { + "post": { + "tags": ["peers"], + "summary": "Peer Chat", + "description": "Query a Peer's representation using natural language. Performs agentic search and reasoning to comprehensively\nanswer the query based on all latent knowledge gathered about the peer from their messages and conclusions.", + "operationId": "chat_v3_workspaces__workspace_id__peers__peer_id__chat_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "peer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Peer Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DialecticOptions" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "properties": { + "content": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content" + }, + "evidence": { + "anyOf": [ + { + "$ref": "#/components/schemas/Evidence" + }, + { + "type": "null" + } + ], + "description": "What the answer was built from. Present only when `include_evidence` is true." + } + }, + "required": ["content"], + "title": "DialecticResponse", + "type": "object" + } + }, + "text/event-stream": {} + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/peers/{peer_id}/representation": { + "post": { + "tags": ["peers"], + "summary": "Get Representation", + "description": "Get a curated subset of a Peer's Representation. A Representation is always a subset of the total\nknowledge about the Peer. The subset can be scoped and filtered in various ways.\n\n\nIf a session_id is provided in the body, we get the Representation of the Peer scoped to that Session.\nIf a target is provided, we get the Representation of the target from the perspective of the Peer.\nIf no target is provided, we get the omniscient Honcho Representation of the Peer.", + "operationId": "get_representation_v3_workspaces__workspace_id__peers__peer_id__representation_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "peer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Peer Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PeerRepresentationGet", + "description": "Options for getting the peer representation" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RepresentationResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/peers/{peer_id}/card": { + "get": { + "tags": ["peers"], + "summary": "Get Peer Card", + "description": "Get a peer card for a specific peer relationship.\n\nReturns the peer card that the observer peer has for the target peer if it exists.\nIf no target is specified, returns the observer's own peer card.", + "operationId": "get_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "peer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the observer peer", + "title": "Peer Id" + }, + "description": "ID of the observer peer" + }, + { + "name": "target", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional target peer to retrieve a card for, from the observer's perspective. If not provided, returns the observer's own card", + "title": "Target" + }, + "description": "Optional target peer to retrieve a card for, from the observer's perspective. If not provided, returns the observer's own card" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PeerCardResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["peers"], + "summary": "Set Peer Card", + "description": "Set a peer card for a specific peer relationship.\n\nSets the peer card that the observer peer has for the target peer.\nIf no target is specified, sets the observer's own peer card.", + "operationId": "set_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_put", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "peer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the observer peer", + "title": "Peer Id" + }, + "description": "ID of the observer peer" + }, + { + "name": "target", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional target peer to set a card for, from the observer's perspective. If not provided, sets the observer's own card", + "title": "Target" + }, + "description": "Optional target peer to set a card for, from the observer's perspective. If not provided, sets the observer's own card" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PeerCardSet", + "description": "Peer card data to set" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PeerCardResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/peers/{peer_id}/context": { + "get": { + "tags": ["peers"], + "summary": "Get Peer Context", + "description": "Get context for a peer, including their representation and peer card.\n\nThis endpoint returns a curated subset of the representation and peer card for a peer.\nIf a target is specified, returns the context for the target from the\nobserver peer's perspective. If no target is specified, returns the\npeer's own context (self-observation).\n\nThis is useful for getting all the context needed about a peer without\nmaking multiple API calls.", + "operationId": "get_peer_context_v3_workspaces__workspace_id__peers__peer_id__context_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "peer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "ID of the observer peer", + "title": "Peer Id" + }, + "description": "ID of the observer peer" + }, + { + "name": "target", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional target peer to get context for, from the observer's perspective. If not provided, returns the observer's own context (self-observation)", + "title": "Target" + }, + "description": "Optional target peer to get context for, from the observer's perspective. If not provided, returns the observer's own context (self-observation)" + }, + { + "name": "search_query", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Optional query to curate the representation around semantic search results", + "title": "Search Query" + }, + "description": "Optional query to curate the representation around semantic search results" + }, + { + "name": "search_top_k", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 100, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "Only used if `search_query` is provided. Number of semantic-search-retrieved conclusions to include", + "title": "Search Top K" + }, + "description": "Only used if `search_query` is provided. Number of semantic-search-retrieved conclusions to include" + }, + { + "name": "search_max_distance", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "description": "Only used if `search_query` is provided. Maximum distance for semantically relevant conclusions", + "title": "Search Max Distance" + }, + "description": "Only used if `search_query` is provided. Maximum distance for semantically relevant conclusions" + }, + { + "name": "include_most_frequent", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to include the most frequent conclusions in the representation", + "default": true, + "title": "Include Most Frequent" + }, + "description": "Whether to include the most frequent conclusions in the representation" + }, + { + "name": "max_conclusions", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 100, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "Maximum number of conclusions to include in the representation", + "title": "Max Conclusions" + }, + "description": "Maximum number of conclusions to include in the representation" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PeerContext" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/peers/{peer_id}/search": { + "post": { + "tags": ["peers"], + "summary": "Search Peer", + "description": "Search a Peer's messages, optionally filtered by various criteria.", + "operationId": "search_peer_v3_workspaces__workspace_id__peers__peer_id__search_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "peer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Peer Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageSearchOptions", + "description": "Message search parameters. Use `limit` to control the number of results returned." + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + }, + "title": "Response Search Peer V3 Workspaces Workspace Id Peers Peer Id Search Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/list": { + "post": { + "tags": ["sessions"], + "summary": "Get Sessions", + "description": "Get all Sessions for a Workspace, paginated with optional filters.", + "operationId": "get_sessions_v3_workspaces__workspace_id__sessions_list_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to reverse the order of results", + "default": false, + "title": "Reverse" + }, + "description": "Whether to reverse the order of results" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/SessionGet" + }, + { + "type": "null" + } + ], + "description": "Filtering and pagination options for the sessions list", + "title": "Options" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Session_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions": { + "post": { + "tags": ["sessions"], + "summary": "Get Or Create Session", + "description": "Get a Session by ID or create a new Session with the given ID.\n\nIf Session ID is provided as a parameter, it verifies the Session is in the Workspace.\nOtherwise, it uses the session_id from the JWT for verification.", + "operationId": "get_or_create_session_v3_workspaces__workspace_id__sessions_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionCreate", + "description": "Session creation parameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}": { + "put": { + "tags": ["sessions"], + "summary": "Update Session", + "description": "Update a Session's metadata and/or configuration.", + "operationId": "update_session_v3_workspaces__workspace_id__sessions__session_id__put", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionUpdate", + "description": "Updated session parameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["sessions"], + "summary": "Delete Session", + "description": "Delete a Session and all associated messages.\n\nThe Session is marked as inactive immediately and returns 202 Accepted. The actual\ndeletion of all related data happens asynchronously via the queue with retry support.\n\nThis action cannot be undone.", + "operationId": "delete_session_v3_workspaces__workspace_id__sessions__session_id__delete", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "responses": { + "202": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}/clone": { + "post": { + "tags": ["sessions"], + "summary": "Clone Session", + "description": "Clone a Session, optionally up to a specific message ID.", + "operationId": "clone_session_v3_workspaces__workspace_id__sessions__session_id__clone_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "message_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Message ID to cut off the clone at", + "title": "Message Id" + }, + "description": "Message ID to cut off the clone at" + } + ], + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}/peers": { + "post": { + "tags": ["sessions"], + "summary": "Add Peers To Session", + "description": "Add Peers to a Session. If a Peer does not yet exist, it will be created automatically.\n\nScope peers cannot be added here; scope membership is managed via the scopes routes.", + "operationId": "add_peers_to_session_v3_workspaces__workspace_id__sessions__session_id__peers_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SessionPeerConfig" + }, + "description": "List of peer IDs (with session-level configuration) to add to the session", + "title": "Peers" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["sessions"], + "summary": "Set Session Peers", + "description": "Set the Peers in a Session. If a Peer does not yet exist, it will be created automatically.\n\nThis will fully replace the current set of Peers in the Session.\n\nScope peers cannot be set here; scope membership is managed via the scopes routes.", + "operationId": "set_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_put", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SessionPeerConfig" + }, + "description": "List of peer IDs (with session-level configuration) to set for the session", + "title": "Peers" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["sessions"], + "summary": "Remove Peers From Session", + "description": "Remove Peers by ID from a Session.\n\nScope peers cannot be removed here; scope membership is managed via the scopes routes.", + "operationId": "remove_peers_from_session_v3_workspaces__workspace_id__sessions__session_id__peers_delete", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of peer IDs to remove from the session", + "title": "Peers" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Session" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["sessions"], + "summary": "Get Session Peers", + "description": "Get all Peers in a Session. Results are paginated.", + "operationId": "get_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Peer_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}/peers/{peer_id}/config": { + "get": { + "tags": ["sessions"], + "summary": "Get Peer Config", + "description": "Get the configuration for a Peer in a Session.\n\nMember-read lets a peer-scoped key reach this route, but a peer may only\nread its own per-session config \u2014 not a co-member's. Workspace/admin and\nsession-scoped tokens (which already span the whole session) are unaffected.", + "operationId": "get_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "peer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Peer Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionPeerConfig" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["sessions"], + "summary": "Set Peer Config", + "description": "Set the configuration for a Peer in a Session.", + "operationId": "set_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_put", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "peer_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Peer Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionPeerConfig", + "description": "New peer configuration" + } + } + } + }, + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}/context": { + "get": { + "tags": ["sessions"], + "summary": "Get Session Context", + "description": "Produce a context object from the Session. The caller provides an optional token limit which the entire context must fit into.\nIf not provided, the context will be exhaustive (within configured max tokens). To do this, we allocate 40% of the token limit\nto the summary, and 60% to recent messages -- as many as can fit. Note that the summary will usually take up less space than\nthis. If the caller does not want a summary, we allocate all the tokens to recent messages.", + "operationId": "get_session_context_v3_workspaces__workspace_id__sessions__session_id__context_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "tokens", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 100000 + }, + { + "type": "null" + } + ], + "description": "Number of tokens to use for the context. Includes summary if set to true. Includes representation and peer card if they are included in the response. If not provided, the context will be exhaustive (within 100000 tokens)", + "title": "Tokens" + }, + "description": "Number of tokens to use for the context. Includes summary if set to true. Includes representation and peer card if they are included in the response. If not provided, the context will be exhaustive (within 100000 tokens)" + }, + { + "name": "search_query", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A query string used to fetch semantically relevant conclusions", + "title": "Search Query" + }, + "description": "A query string used to fetch semantically relevant conclusions" + }, + { + "name": "summary", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether or not to include a summary *if* one is available for the session", + "default": true, + "title": "Summary" + }, + "description": "Whether or not to include a summary *if* one is available for the session" + }, + { + "name": "peer_target", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "The target of the perspective. If given without `peer_perspective`, will get the Honcho-level representation and peer card for this peer. If given with `peer_perspective`, will get the representation and card for this peer *from the perspective of that peer*.", + "title": "Peer Target" + }, + "description": "The target of the perspective. If given without `peer_perspective`, will get the Honcho-level representation and peer card for this peer. If given with `peer_perspective`, will get the representation and card for this peer *from the perspective of that peer*." + }, + { + "name": "peer_perspective", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "A peer to get context for. If given, response will attempt to include representation and card from the perspective of that peer. Must be provided with `peer_target`.", + "title": "Peer Perspective" + }, + "description": "A peer to get context for. If given, response will attempt to include representation and card from the perspective of that peer. Must be provided with `peer_target`." + }, + { + "name": "scope", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "An (unprefixed) scope name to use as the perspective source: the representation and peer card of `peer_target` are read from the scope's observations instead of the global (or `peer_perspective`) view. Must be provided with `peer_target`; mutually exclusive with `peer_perspective`. Requires a workspace- or admin-level key.", + "title": "Scope" + }, + "description": "An (unprefixed) scope name to use as the perspective source: the representation and peer card of `peer_target` are read from the scope's observations instead of the global (or `peer_perspective`) view. Must be provided with `peer_target`; mutually exclusive with `peer_perspective`. Requires a workspace- or admin-level key." + }, + { + "name": "sessions", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "type": "null" + } + ], + "description": "Optional allowlist of session IDs confining the representation of `peer_target` to those sessions. This session must be one of them. Recall is restricted to conclusions stated directly in the allowed sessions \u2014 conclusions synthesized across sessions are excluded, since their provenance cannot be proven to sit inside the allowlist \u2014 and the peer card is omitted for the same reason. Mutually exclusive with `scope` and `limit_to_session`. A peer-scoped key must be an active member of every session named. The 1,000-session cap shared with the recall endpoints applies but is not reachable here: these are repeated query parameters, so a long list exceeds the request-line limit of the server or any proxy in front of it (a 414/431, not a 422) at a few hundred entries. Use a named `scope` for large or reusable session sets.", + "title": "Sessions" + }, + "description": "Optional allowlist of session IDs confining the representation of `peer_target` to those sessions. This session must be one of them. Recall is restricted to conclusions stated directly in the allowed sessions \u2014 conclusions synthesized across sessions are excluded, since their provenance cannot be proven to sit inside the allowlist \u2014 and the peer card is omitted for the same reason. Mutually exclusive with `scope` and `limit_to_session`. A peer-scoped key must be an active member of every session named. The 1,000-session cap shared with the recall endpoints applies but is not reachable here: these are repeated query parameters, so a long list exceeds the request-line limit of the server or any proxy in front of it (a 414/431, not a 422) at a few hundred entries. Use a named `scope` for large or reusable session sets." + }, + { + "name": "limit_to_session", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to limit the representation to the session (as opposed to everything known about the target peer). Narrows recall the same way `sessions` does, so the same restrictions apply: explicit-only conclusions, and the peer card is omitted because it carries no per-session provenance.", + "default": false, + "title": "Limit To Session" + }, + "description": "Whether to limit the representation to the session (as opposed to everything known about the target peer). Narrows recall the same way `sessions` does, so the same restrictions apply: explicit-only conclusions, and the peer card is omitted because it carries no per-session provenance." + }, + { + "name": "search_top_k", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 100, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "Only used if `search_query` is provided. The number of semantic-search-retrieved conclusions to include in the representation", + "title": "Search Top K" + }, + "description": "Only used if `search_query` is provided. The number of semantic-search-retrieved conclusions to include in the representation" + }, + { + "name": "search_max_distance", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "description": "Only used if `search_query` is provided. The maximum distance to search for semantically relevant conclusions", + "title": "Search Max Distance" + }, + "description": "Only used if `search_query` is provided. The maximum distance to search for semantically relevant conclusions" + }, + { + "name": "include_most_frequent", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Only used if `search_query` is provided. Whether to include the most frequent conclusions in the representation", + "default": false, + "title": "Include Most Frequent" + }, + "description": "Only used if `search_query` is provided. Whether to include the most frequent conclusions in the representation" + }, + { + "name": "max_conclusions", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer", + "maximum": 100, + "minimum": 1 + }, + { + "type": "null" + } + ], + "description": "Only used if `search_query` is provided. The maximum number of conclusions to include in the representation", + "title": "Max Conclusions" + }, + "description": "Only used if `search_query` is provided. The maximum number of conclusions to include in the representation" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionContext" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}/summaries": { + "get": { + "tags": ["sessions"], + "summary": "Get Session Summaries", + "description": "Get available summaries for a Session.\n\nReturns both short and long summaries if available, including metadata like\nthe message ID they cover up to, creation timestamp, and token count.", + "operationId": "get_session_summaries_v3_workspaces__workspace_id__sessions__session_id__summaries_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SessionSummaries" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}/search": { + "post": { + "tags": ["sessions"], + "summary": "Search Session", + "description": "Search a Session with optional filters. Use `limit` to control the number of results returned.", + "operationId": "search_session_v3_workspaces__workspace_id__sessions__session_id__search_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageSearchOptions", + "description": "Message search parameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + }, + "title": "Response Search Session V3 Workspaces Workspace Id Sessions Session Id Search Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/scopes": { + "post": { + "tags": ["scopes"], + "summary": "Get Or Create Scope", + "description": "Get a Scope by ID or create a new Scope with the given ID.\n\nReturns 201 when the scope is created and 200 when it already exists.\nA pre-existing peer occupying the scope's reserved internal name is never\nadopted; that conflict returns 409.", + "operationId": "get_or_create_scope_v3_workspaces__workspace_id__scopes_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScopeCreate", + "description": "Scope creation parameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Scope" + } + } + } + }, + "201": { + "description": "Scope created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Scope" + } + } + } + }, + "409": { + "description": "A peer already occupies the scope's reserved name", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/scopes/list": { + "post": { + "tags": ["scopes"], + "summary": "Get Scopes", + "description": "Get all Scopes for a Workspace. Results are paginated.", + "operationId": "get_scopes_v3_workspaces__workspace_id__scopes_list_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to reverse the order of results", + "default": false, + "title": "Reverse" + }, + "description": "Whether to reverse the order of results" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Scope_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/scopes/{scope_id}": { + "get": { + "tags": ["scopes"], + "summary": "Get Scope", + "description": "Get a single Scope by ID.", + "operationId": "get_scope_v3_workspaces__workspace_id__scopes__scope_id__get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "scope_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Scope Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Scope" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/scopes/{scope_id}/sessions": { + "post": { + "tags": ["scopes"], + "summary": "Add Sessions To Scope", + "description": "Add Sessions to a Scope.\n\nAll named sessions must already exist (404 otherwise). Adding a session that\nis already a member is a no-op. List the resulting membership with\n`POST /scopes/{scope_id}/sessions/list`.\n\nNote: any added session that already has messages triggers an asynchronous\nbackfill-by-copy of its existing documents into the scope; track progress\nvia ``GET /scopes/{scope_id}/status``.", + "operationId": "add_sessions_to_scope_v3_workspaces__workspace_id__scopes__scope_id__sessions_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "scope_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Scope Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScopeSessionsAdd", + "description": "IDs of the sessions to add to the scope" + } + } + } + }, + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/scopes/{scope_id}/sessions/{session_id}": { + "delete": { + "tags": ["scopes"], + "summary": "Remove Session From Scope", + "description": "Remove a Session from a Scope.\n\nNote: documents copied/derived while the session was a member are\nreconciled asynchronously \u2014 the session's explicit copies are soft-deleted\nfrom the scope, dependent derived documents follow (fail-closed), and the\nscope's card is rebuilt from the remaining evidence.", + "operationId": "remove_session_from_scope_v3_workspaces__workspace_id__scopes__scope_id__sessions__session_id__delete", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "scope_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Scope Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/scopes/{scope_id}/sessions/list": { + "post": { + "tags": ["scopes"], + "summary": "Get Scope Sessions", + "description": "Get the Sessions that are members of a Scope, paginated.\n\nOrdered by how long each session has been a member: longest-standing member\nfirst, or most recently added first when `reverse` is true.", + "operationId": "get_scope_sessions_v3_workspaces__workspace_id__scopes__scope_id__sessions_list_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "scope_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Scope Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Whether to reverse the order of results", + "default": false, + "title": "Reverse" + }, + "description": "Whether to reverse the order of results" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Session_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/scopes/{scope_id}/status": { + "get": { + "tags": ["scopes"], + "summary": "Get Scope Status", + "description": "Get the backfill/reconciliation job status for a Scope.\n\nReturns a per-session map of the backfill job state (pending / completed /\nfailed) with the number of documents copied once complete. Empty when no\nbackfill has ever been enqueued for the scope.", + "operationId": "get_scope_status_v3_workspaces__workspace_id__scopes__scope_id__status_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "scope_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Scope Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ScopeStatus" + } + } + } + }, + "404": { + "description": "Scope does not exist", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages": { + "post": { + "tags": ["messages"], + "summary": "Create Messages For Session", + "description": "Add new message(s) to a session.", + "operationId": "create_messages_for_session_v3_workspaces__workspace_id__sessions__session_id__messages_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageBatchCreate" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + }, + "title": "Response Create Messages For Session V3 Workspaces Workspace Id Sessions Session Id Messages Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/upload": { + "post": { + "tags": ["messages"], + "summary": "Create Messages With File", + "description": "Create messages from uploaded files. Files are converted to text and split into multiple messages.", + "operationId": "create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "multipart/form-data": { + "schema": { + "$ref": "#/components/schemas/Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Message" + }, + "title": "Response Create Messages With File V3 Workspaces Workspace Id Sessions Session Id Messages Upload Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/list": { + "post": { + "tags": ["messages"], + "summary": "Get Messages", + "description": "Get all messages for a Session with optional filters. Results are paginated.", + "operationId": "get_messages_v3_workspaces__workspace_id__sessions__session_id__messages_list_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Whether to reverse the order of results", + "default": false, + "title": "Reverse" + }, + "description": "Whether to reverse the order of results" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/MessageGet" + }, + { + "type": "null" + } + ], + "description": "Filtering options for the message list", + "title": "Options" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Message_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/{message_id}": { + "get": { + "tags": ["messages"], + "summary": "Get Message", + "description": "Get a single message by ID from a Session.", + "operationId": "get_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session Id" + } + }, + { + "name": "message_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Message Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Message" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "put": { + "tags": ["messages"], + "summary": "Update Message", + "description": "Update the metadata of a message.\n\nThis will overwrite any existing metadata for the message.", + "operationId": "update_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__put", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Session 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", + "description": "Updated message parameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Message" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/conclusions": { + "post": { + "tags": ["conclusions"], + "summary": "Create Conclusions", + "description": "Create one or more Conclusions.\n\nConclusions are logical certainties derived from interactions between Peers. They form the basis of a Peer's Representation.", + "operationId": "create_conclusions_v3_workspaces__workspace_id__conclusions_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConclusionBatchCreate", + "description": "Batch of Conclusions to create" + } + } + } + }, + "responses": { + "201": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Conclusion" + }, + "title": "Response Create Conclusions V3 Workspaces Workspace Id Conclusions Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/conclusions/list": { + "post": { + "tags": ["conclusions"], + "summary": "List Conclusions", + "description": "List Conclusions using optional filters, ordered by recency unless `reverse` is true. Results are paginated.", + "operationId": "list_conclusions_v3_workspaces__workspace_id__conclusions_list_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "reverse", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "description": "Whether to reverse the order of results", + "default": false, + "title": "Reverse" + }, + "description": "Whether to reverse the order of results" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "$ref": "#/components/schemas/ConclusionGet" + }, + { + "type": "null" + } + ], + "description": "Filtering options for the Conclusions list", + "title": "Options" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_Conclusion_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/conclusions/query": { + "post": { + "tags": ["conclusions"], + "summary": "Query Conclusions", + "description": "Query Conclusions using semantic search. Use `top_k` to control the number of results returned.", + "operationId": "query_conclusions_v3_workspaces__workspace_id__conclusions_query_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConclusionQuery", + "description": "Semantic search parameters for Conclusions" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Conclusion" + }, + "title": "Response Query Conclusions V3 Workspaces Workspace Id Conclusions Query Post" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/conclusions/{conclusion_id}": { + "get": { + "tags": ["conclusions"], + "summary": "Get Conclusion", + "description": "Get a single Conclusion by ID.", + "operationId": "get_conclusion_v3_workspaces__workspace_id__conclusions__conclusion_id__get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "conclusion_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conclusion Id" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Conclusion" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "delete": { + "tags": ["conclusions"], + "summary": "Delete Conclusion", + "description": "Delete a single Conclusion by ID.\n\nThis action cannot be undone.", + "operationId": "delete_conclusion_v3_workspaces__workspace_id__conclusions__conclusion_id__delete", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Workspace Id" + } + }, + { + "name": "conclusion_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "title": "Conclusion Id" + } + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/keys": { + "post": { + "tags": ["keys"], + "summary": "Create Key", + "description": "Create a new Key", + "operationId": "create_key_v3_keys_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "ID of the workspace to scope the key to", + "title": "Workspace Id" + }, + "description": "ID of the workspace to scope the key to" + }, + { + "name": "peer_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "ID of the peer to scope the key to", + "title": "Peer Id" + }, + "description": "ID of the peer to scope the key to" + }, + { + "name": "session_id", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "ID of the session to scope the key to", + "title": "Session Id" + }, + "description": "ID of the session to scope the key to" + }, + { + "name": "expires_at", + "in": "query", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Expires At" + } + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/webhooks": { + "post": { + "tags": ["webhooks"], + "summary": "Get Or Create Webhook Endpoint", + "description": "Get or create a webhook endpoint URL.", + "operationId": "get_or_create_webhook_endpoint_v3_workspaces__workspace_id__webhooks_post", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Workspace ID", + "title": "Workspace Id" + }, + "description": "Workspace ID" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookEndpointCreate", + "description": "Webhook endpoint parameters" + } + } + } + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WebhookEndpoint" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + }, + "get": { + "tags": ["webhooks"], + "summary": "List Webhook Endpoints", + "description": "List all webhook endpoints, optionally filtered by workspace.", + "operationId": "list_webhook_endpoints_v3_workspaces__workspace_id__webhooks_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Workspace ID", + "title": "Workspace Id" + }, + "description": "Workspace ID" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "minimum": 1, + "description": "Page number", + "default": 1, + "title": "Page" + }, + "description": "Page number" + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "maximum": 100, + "minimum": 1, + "description": "Page size", + "default": 50, + "title": "Size" + }, + "description": "Page size" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Page_WebhookEndpoint_" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/webhooks/{endpoint_id}": { + "delete": { + "tags": ["webhooks"], + "summary": "Delete Webhook Endpoint", + "description": "Delete a specific webhook endpoint.", + "operationId": "delete_webhook_endpoint_v3_workspaces__workspace_id__webhooks__endpoint_id__delete", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Workspace ID", + "title": "Workspace Id" + }, + "description": "Workspace ID" + }, + { + "name": "endpoint_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Webhook endpoint ID", + "title": "Endpoint Id" + }, + "description": "Webhook endpoint ID" + } + ], + "responses": { + "204": { + "description": "Successful Response" + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/v3/workspaces/{workspace_id}/webhooks/test": { + "get": { + "tags": ["webhooks"], + "summary": "Test Emit", + "description": "Test publishing a webhook event.", + "operationId": "test_emit_v3_workspaces__workspace_id__webhooks_test_get", + "security": [ + { + "HTTPBearer": [] + } + ], + "parameters": [ + { + "name": "workspace_id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "description": "Workspace ID", + "title": "Workspace Id" + }, + "description": "Workspace ID" + } + ], + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, + "/health": { + "get": { + "summary": "Health Check", + "description": "Health check endpoint for monitoring and container orchestration.", + "operationId": "health_check_health_get", + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post": { + "properties": { + "file": { + "type": "string", + "contentMediaType": "application/octet-stream", + "title": "File" + }, + "peer_id": { + "type": "string", + "title": "Peer Id" + }, + "metadata": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "configuration": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Configuration" + }, + "created_at": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created At" + } + }, + "type": "object", + "required": ["file", "peer_id"], + "title": "Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post" + }, + "Conclusion": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "content": { + "type": "string", + "title": "Content" + }, + "observer_id": { + "type": "string", + "title": "Observer Id", + "description": "The peer who made the conclusion" + }, + "observed_id": { + "type": "string", + "title": "Observed Id", + "description": "The peer the conclusion is about" + }, + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Id" + }, + "level": { + "type": "string", + "enum": ["explicit", "deductive", "inductive", "contradiction"], + "title": "Level", + "description": "Reasoning level of the conclusion: 'explicit' (directly extracted from messages) or 'deductive'/'inductive'/'contradiction' (derived during dreaming).", + "default": "explicit" + }, + "source_ids": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Source Ids", + "description": "IDs of the conclusions this one was derived from: premises for 'deductive', supporting sources for 'inductive', conflicting conclusions for 'contradiction'. None for 'explicit' conclusions." + }, + "times_derived": { + "type": "integer", + "title": "Times Derived", + "description": "Number of times this conclusion has been independently derived.", + "default": 1 + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": ["id", "content", "observer_id", "observed_id", "created_at"], + "title": "Conclusion", + "description": "Conclusion response - external view of a document." + }, + "ConclusionBatchCreate": { + "properties": { + "conclusions": { + "items": { + "$ref": "#/components/schemas/ConclusionCreate" + }, + "type": "array", + "maxItems": 100, + "minItems": 1, + "title": "Conclusions" + } + }, + "type": "object", + "required": ["conclusions"], + "title": "ConclusionBatchCreate", + "description": "Schema for batch conclusion creation with a max of 100 conclusions." + }, + "ConclusionCreate": { + "properties": { + "content": { + "type": "string", + "maxLength": 65535, + "minLength": 1, + "title": "Content" + }, + "observer_id": { + "type": "string", + "title": "Observer Id", + "description": "The peer making the conclusion" + }, + "observed_id": { + "type": "string", + "title": "Observed Id", + "description": "The peer the conclusion is about" + }, + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Id", + "description": "A session ID to store the conclusion in, if specified" + } + }, + "type": "object", + "required": ["content", "observer_id", "observed_id"], + "title": "ConclusionCreate", + "description": "Schema for creating a single conclusion." + }, + "ConclusionGet": { + "properties": { + "filters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Filters" + } + }, + "type": "object", + "title": "ConclusionGet", + "description": "Schema for listing conclusions with optional filters." + }, + "ConclusionQuery": { + "properties": { + "query": { + "type": "string", + "title": "Query", + "description": "Semantic search query" + }, + "top_k": { + "type": "integer", + "maximum": 100.0, + "minimum": 1.0, + "title": "Top K", + "description": "Number of results to return", + "default": 10 + }, + "distance": { + "anyOf": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Distance", + "description": "Maximum cosine distance threshold for results" + }, + "filters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Filters", + "description": "Additional filters to apply" + } + }, + "type": "object", + "required": ["query"], + "title": "ConclusionQuery", + "description": "Query parameters for semantic search of conclusions." + }, + "DialecticOptions": { + "properties": { + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Id", + "description": "ID of the session to scope the representation to" + }, + "filters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Filters", + "description": "Optional filters to scope recall. This endpoint supports only the 'session_id' key: a session id, a list of session ids, or {\"in\": [...]}. Recall (conclusions and messages) is restricted to the allowlist; unsupported keys are rejected. When session_id is also set, it must be included in the allowlist." + }, + "scope": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 100, + "minItems": 1 + }, + { + "type": "null" + } + ], + "title": "Scope", + "description": "Optional (unprefixed) scope name(s) to confine recall. A single scope answers from the scope's own representation of the target peer: conclusion recall is confined to what the scope observed and message recall to the scope's member sessions. A list of scopes restricts recall to the union of the scopes' member sessions (explicit allowlist, fail-closed: an empty union recalls nothing). Mutually exclusive with `filters` and `session_id`. Requires a workspace- or admin-level key." + }, + "target": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Target", + "description": "Optional peer to get the representation for, from the perspective of this peer" + }, + "query": { + "type": "string", + "maxLength": 10000, + "minLength": 1, + "title": "Query", + "description": "Dialectic API Prompt" + }, + "stream": { + "type": "boolean", + "title": "Stream", + "default": false + }, + "reasoning_level": { + "type": "string", + "enum": ["minimal", "low", "medium", "high", "max"], + "title": "Reasoning Level", + "description": "Level of reasoning to apply: minimal, low, medium, high, or max", + "default": "low" + }, + "response_format": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Response Format", + "description": "Optional JSON Schema (root type 'object') the response must conform to. When provided, `content` is a JSON string matching this schema. Only a conservative subset of JSON Schema is supported; unsupported schemas are rejected with 422. Constraint keywords (minItems, maxLength, ...) are hints to the model, not enforced server-side." + }, + "include_evidence": { + "type": "boolean", + "title": "Include Evidence", + "description": "When true, the response includes an `evidence` object listing the conclusions and messages the agent read while answering, plus the tool calls it made. Evidence is collated from what the agent accessed; the model is never asked to cite anything, so evidence may over-report (accessed is not the same as used).", + "default": false + } + }, + "type": "object", + "required": ["query"], + "title": "DialecticOptions" + }, + "DreamConfiguration": { + "properties": { + "enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enabled", + "description": "Whether to enable dream functionality. If reasoning is disabled, dreams will also be disabled and this setting will be ignored." + } + }, + "type": "object", + "title": "DreamConfiguration" + }, + "DreamType": { + "type": "string", + "enum": ["omni", "card_refresh"], + "title": "DreamType", + "description": "Types of dreams that can be triggered." + }, + "ErrorResponse": { + "properties": { + "detail": { + "type": "string", + "title": "Detail", + "description": "What went wrong" + } + }, + "type": "object", + "required": ["detail"], + "title": "ErrorResponse", + "description": "The body returned for every raised HonchoException.\n\n`HTTPValidationError` is FastAPI's own 422 shape, whose `detail` is an array\nof per-field errors. Honcho's handler returns a single message string\ninstead (see `honcho_exception_handler` in `src/main.py`), so error codes\nraised from application code document this schema rather than that one." + }, + "HTTPValidationError": { + "properties": { + "detail": { + "items": { + "$ref": "#/components/schemas/ValidationError" + }, + "type": "array", + "title": "Detail" + } + }, + "type": "object", + "title": "HTTPValidationError" + }, + "Message": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "content": { + "type": "string", + "title": "Content" + }, + "peer_id": { + "type": "string", + "title": "Peer Id" + }, + "session_id": { + "type": "string", + "title": "Session Id" + }, + "metadata": { + "additionalProperties": true, + "type": "object", + "title": "Metadata" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + }, + "token_count": { + "type": "integer", + "title": "Token Count" + } + }, + "type": "object", + "required": [ + "id", + "content", + "peer_id", + "session_id", + "created_at", + "workspace_id", + "token_count" + ], + "title": "Message" + }, + "MessageBatchCreate": { + "properties": { + "messages": { + "items": { + "$ref": "#/components/schemas/MessageCreate" + }, + "type": "array", + "maxItems": 100, + "minItems": 1, + "title": "Messages" + } + }, + "type": "object", + "required": ["messages"], + "title": "MessageBatchCreate", + "description": "Schema for batch message creation with a max of 100 messages" + }, + "MessageConfiguration": { + "properties": { + "reasoning": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReasoningConfiguration" + }, + { + "type": "null" + } + ], + "description": "Configuration for reasoning functionality." + } + }, + "type": "object", + "title": "MessageConfiguration", + "description": "The set of options that can be in a message DB-level configuration dictionary.\n\nAll fields are optional. Message-level configuration overrides all other configurations." + }, + "MessageCreate": { + "properties": { + "content": { + "type": "string", + "maxLength": 25000, + "minLength": 0, + "title": "Content" + }, + "peer_id": { + "type": "string", + "title": "Peer Id" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "configuration": { + "anyOf": [ + { + "$ref": "#/components/schemas/MessageConfiguration" + }, + { + "type": "null" + } + ] + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ], + "title": "Created At" + } + }, + "type": "object", + "required": ["content", "peer_id"], + "title": "MessageCreate" + }, + "MessageGet": { + "properties": { + "filters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Filters" + } + }, + "type": "object", + "title": "MessageGet" + }, + "MessageSearchOptions": { + "properties": { + "query": { + "type": "string", + "title": "Query", + "description": "Search query" + }, + "filters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Filters", + "description": "Filters to scope the search" + }, + "limit": { + "type": "integer", + "maximum": 100.0, + "minimum": 1.0, + "title": "Limit", + "description": "Number of results to return", + "default": 10 + } + }, + "type": "object", + "required": ["query"], + "title": "MessageSearchOptions" + }, + "MessageUpdate": { + "properties": { + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "title": "MessageUpdate" + }, + "Page_Conclusion_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Conclusion" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "minimum": 0.0, + "title": "Total" + }, + "page": { + "type": "integer", + "minimum": 1.0, + "title": "Page" + }, + "size": { + "type": "integer", + "minimum": 1.0, + "title": "Size" + }, + "pages": { + "type": "integer", + "minimum": 0.0, + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size", "pages"], + "title": "Page[Conclusion]" + }, + "Page_Message_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Message" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "minimum": 0.0, + "title": "Total" + }, + "page": { + "type": "integer", + "minimum": 1.0, + "title": "Page" + }, + "size": { + "type": "integer", + "minimum": 1.0, + "title": "Size" + }, + "pages": { + "type": "integer", + "minimum": 0.0, + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size", "pages"], + "title": "Page[Message]" + }, + "Page_Peer_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Peer" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "minimum": 0.0, + "title": "Total" + }, + "page": { + "type": "integer", + "minimum": 1.0, + "title": "Page" + }, + "size": { + "type": "integer", + "minimum": 1.0, + "title": "Size" + }, + "pages": { + "type": "integer", + "minimum": 0.0, + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size", "pages"], + "title": "Page[Peer]" + }, + "Page_Scope_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Scope" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "minimum": 0.0, + "title": "Total" + }, + "page": { + "type": "integer", + "minimum": 1.0, + "title": "Page" + }, + "size": { + "type": "integer", + "minimum": 1.0, + "title": "Size" + }, + "pages": { + "type": "integer", + "minimum": 0.0, + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size", "pages"], + "title": "Page[Scope]" + }, + "Page_Session_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Session" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "minimum": 0.0, + "title": "Total" + }, + "page": { + "type": "integer", + "minimum": 1.0, + "title": "Page" + }, + "size": { + "type": "integer", + "minimum": 1.0, + "title": "Size" + }, + "pages": { + "type": "integer", + "minimum": 0.0, + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size", "pages"], + "title": "Page[Session]" + }, + "Page_WebhookEndpoint_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/WebhookEndpoint" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "minimum": 0.0, + "title": "Total" + }, + "page": { + "type": "integer", + "minimum": 1.0, + "title": "Page" + }, + "size": { + "type": "integer", + "minimum": 1.0, + "title": "Size" + }, + "pages": { + "type": "integer", + "minimum": 0.0, + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size", "pages"], + "title": "Page[WebhookEndpoint]" + }, + "Page_Workspace_": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/Workspace" + }, + "type": "array", + "title": "Items" + }, + "total": { + "type": "integer", + "minimum": 0.0, + "title": "Total" + }, + "page": { + "type": "integer", + "minimum": 1.0, + "title": "Page" + }, + "size": { + "type": "integer", + "minimum": 1.0, + "title": "Size" + }, + "pages": { + "type": "integer", + "minimum": 0.0, + "title": "Pages" + } + }, + "type": "object", + "required": ["items", "total", "page", "size", "pages"], + "title": "Page[Workspace]" + }, + "Peer": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + }, + "metadata": { + "additionalProperties": true, + "type": "object", + "title": "Metadata" + }, + "configuration": { + "additionalProperties": true, + "type": "object", + "title": "Configuration" + } + }, + "type": "object", + "required": ["id", "workspace_id", "created_at"], + "title": "Peer" + }, + "PeerCardConfiguration": { + "properties": { + "use": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Use", + "description": "Whether to use peer card related to this peer during reasoning process." + }, + "create": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Create", + "description": "Whether to generate peer card based on content." + } + }, + "type": "object", + "title": "PeerCardConfiguration" + }, + "PeerCardResponse": { + "properties": { + "peer_card": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Peer Card", + "description": "The peer card content, or None if not found" + } + }, + "type": "object", + "title": "PeerCardResponse" + }, + "PeerCardSet": { + "properties": { + "peer_card": { + "items": { + "type": "string" + }, + "type": "array", + "title": "Peer Card", + "description": "The peer card content to set" + } + }, + "type": "object", + "required": ["peer_card"], + "title": "PeerCardSet" + }, + "PeerContext": { + "properties": { + "peer_id": { + "type": "string", + "title": "Peer Id", + "description": "The ID of the peer" + }, + "target_id": { + "type": "string", + "title": "Target Id", + "description": "The ID of the target peer being observed" + }, + "representation": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Representation", + "description": "A curated subset of the representation of the target peer from the observer's perspective" + }, + "peer_card": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Peer Card", + "description": "The peer card for the target peer from the observer's perspective" + } + }, + "type": "object", + "required": ["peer_id", "target_id"], + "title": "PeerContext", + "description": "Context for a peer, including representation and peer card." + }, + "PeerCreate": { + "properties": { + "id": { + "type": "string", + "maxLength": 512, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Id" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "configuration": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Configuration" + } + }, + "type": "object", + "required": ["id"], + "title": "PeerCreate" + }, + "PeerGet": { + "properties": { + "filters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Filters" + }, + "kind": { + "anyOf": [ + { + "type": "string", + "enum": ["scope", "all"] + }, + { + "type": "null" + } + ], + "title": "Kind", + "description": "Which kinds of peers to list. Omitted (default): regular peers only (scope peers are excluded). 'scope': scope peers only. 'all': every peer." + } + }, + "type": "object", + "title": "PeerGet" + }, + "PeerRepresentationGet": { + "properties": { + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Id", + "description": "Optional session ID within which to scope the representation" + }, + "filters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Filters", + "description": "Optional filters to scope the representation. This endpoint supports only the 'session_id' key: a session id, a list of session ids, or {\"in\": [...]}. When session_id is also set, it must be included in the allowlist." + }, + "scope": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 100, + "minItems": 1 + }, + { + "type": "null" + } + ], + "title": "Scope", + "description": "Optional (unprefixed) scope name(s) to confine the representation. A single scope reads the scope's own representation of the target peer, formed only from the scope's member sessions. A list of scopes restricts the representation to conclusions from the union of the scopes' member sessions (explicit allowlist, fail-closed: an empty union yields an empty representation). Mutually exclusive with `filters` and `session_id`. Requires a workspace- or admin-level key." + }, + "target": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Target", + "description": "Optional peer ID to get the representation for, from the perspective of this peer" + }, + "search_query": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Search Query", + "description": "Optional input to curate the representation around semantic search results" + }, + "search_top_k": { + "anyOf": [ + { + "type": "integer", + "maximum": 100.0, + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Search Top K", + "description": "Only used if `search_query` is provided. Number of semantic-search-retrieved conclusions to include in the representation" + }, + "search_max_distance": { + "anyOf": [ + { + "type": "number", + "maximum": 1.0, + "minimum": 0.0 + }, + { + "type": "null" + } + ], + "title": "Search Max Distance", + "description": "Only used if `search_query` is provided. Maximum distance to search for semantically relevant conclusions" + }, + "include_most_frequent": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Include Most Frequent", + "description": "Only used if `search_query` is provided. Whether to include the most frequent conclusions in the representation" + }, + "max_conclusions": { + "anyOf": [ + { + "type": "integer", + "maximum": 100.0, + "minimum": 1.0 + }, + { + "type": "null" + } + ], + "title": "Max Conclusions", + "description": "Only used if `search_query` is provided. Maximum number of conclusions to include in the representation", + "default": 25 + } + }, + "type": "object", + "title": "PeerRepresentationGet" + }, + "PeerUpdate": { + "properties": { + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "configuration": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Configuration" + } + }, + "type": "object", + "title": "PeerUpdate" + }, + "QueueStatus": { + "properties": { + "total_work_units": { + "type": "integer", + "title": "Total Work Units", + "description": "Total work units" + }, + "completed_work_units": { + "type": "integer", + "title": "Completed Work Units", + "description": "Completed work units (since last periodic cleanup)" + }, + "in_progress_work_units": { + "type": "integer", + "title": "In Progress Work Units", + "description": "Work units currently being processed" + }, + "pending_work_units": { + "type": "integer", + "title": "Pending Work Units", + "description": "Work units waiting to be processed" + }, + "sessions": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/SessionQueueStatus" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Sessions", + "description": "Per-session status when not filtered by session" + } + }, + "type": "object", + "required": [ + "total_work_units", + "completed_work_units", + "in_progress_work_units", + "pending_work_units" + ], + "title": "QueueStatus", + "description": "Aggregated processing queue status.\n\nTracks user-facing task types only: representation, summary, and dream.\nInternal infrastructure tasks (reconciler, webhook, deletion) are excluded.\n\nNote: completed_work_units reflects items since the last periodic queue\ncleanup, not lifetime totals." + }, + "ReasoningConfiguration": { + "properties": { + "enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enabled", + "description": "Whether to enable reasoning functionality." + }, + "custom_instructions": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Custom Instructions", + "description": "Optional custom instructions for the reasoning system on this workspace/session/message. Rejected if they exceed the deriver custom-instruction token cap." + } + }, + "type": "object", + "title": "ReasoningConfiguration" + }, + "RepresentationResponse": { + "properties": { + "representation": { + "type": "string", + "title": "Representation" + } + }, + "type": "object", + "required": ["representation"], + "title": "RepresentationResponse" + }, + "ScheduleDreamRequest": { + "properties": { + "observer": { + "type": "string", + "title": "Observer", + "description": "Observer peer name" + }, + "observed": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Observed", + "description": "Observed peer name (defaults to observer if not specified)" + }, + "dream_type": { + "$ref": "#/components/schemas/DreamType", + "description": "Type of dream to schedule" + }, + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Id", + "description": "Session ID to scope the dream to if specified" + }, + "rebuild": { + "type": "boolean", + "title": "Rebuild", + "description": "card_refresh dreams only: rebuild the peer card solely from observations currently in the collection, without injecting the existing card (use after removals)", + "default": false + } + }, + "type": "object", + "required": ["observer", "dream_type"], + "title": "ScheduleDreamRequest" + }, + "Scope": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "metadata": { + "additionalProperties": true, + "type": "object", + "title": "Metadata" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": ["id", "created_at"], + "title": "Scope", + "description": "Scope response \u2014 external view of the peer backing a scope.\n\nThe ``id`` is the unprefixed scope name; the reserved peer-name prefix is\nan internal implementation detail and never surfaces here." + }, + "ScopeCreate": { + "properties": { + "id": { + "type": "string", + "minLength": 1, + "title": "Id" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + } + }, + "type": "object", + "required": ["id"], + "title": "ScopeCreate", + "description": "Schema for creating (or getting) a scope by its unprefixed name." + }, + "ScopeSessionsAdd": { + "properties": { + "session_ids": { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 100, + "minItems": 1, + "title": "Session Ids", + "description": "IDs of existing sessions to add to the scope" + } + }, + "type": "object", + "required": ["session_ids"], + "title": "ScopeSessionsAdd", + "description": "Schema for adding sessions to a scope." + }, + "ScopeStatus": { + "properties": { + "backfill_status": { + "additionalProperties": { + "additionalProperties": true, + "type": "object" + }, + "type": "object", + "title": "Backfill Status" + } + }, + "type": "object", + "title": "ScopeStatus", + "description": "Per-session backfill/reconciliation job status for a scope.\n\n``backfill_status`` maps each session that has had a backfill enqueued to\nits current job state: ``{state, updated_at[, docs_copied]}`` where\n``state`` is ``pending``/``completed``/``failed`` and ``docs_copied`` is\npresent once a backfill completes." + }, + "Session": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "is_active": { + "type": "boolean", + "title": "Is Active" + }, + "workspace_id": { + "type": "string", + "title": "Workspace Id" + }, + "metadata": { + "additionalProperties": true, + "type": "object", + "title": "Metadata" + }, + "configuration": { + "additionalProperties": true, + "type": "object", + "title": "Configuration" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": ["id", "is_active", "workspace_id", "created_at"], + "title": "Session" + }, + "SessionConfiguration": { + "properties": { + "reasoning": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReasoningConfiguration" + }, + { + "type": "null" + } + ], + "description": "Configuration for reasoning functionality." + }, + "peer_card": { + "anyOf": [ + { + "$ref": "#/components/schemas/PeerCardConfiguration" + }, + { + "type": "null" + } + ], + "description": "Configuration for peer card functionality. If reasoning is disabled, peer cards will also be disabled and these settings will be ignored." + }, + "summary": { + "anyOf": [ + { + "$ref": "#/components/schemas/SummaryConfiguration" + }, + { + "type": "null" + } + ], + "description": "Configuration for summary functionality." + }, + "dream": { + "anyOf": [ + { + "$ref": "#/components/schemas/DreamConfiguration" + }, + { + "type": "null" + } + ], + "description": "Configuration for dream functionality. If reasoning is disabled, dreams will also be disabled and these settings will be ignored." + } + }, + "additionalProperties": true, + "type": "object", + "title": "SessionConfiguration", + "description": "The set of options that can be in a session DB-level configuration dictionary.\n\nAll fields are optional. Session-level configuration overrides workspace-level configuration, which overrides global configuration." + }, + "SessionContext": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "messages": { + "items": { + "$ref": "#/components/schemas/Message" + }, + "type": "array", + "title": "Messages" + }, + "summary": { + "anyOf": [ + { + "$ref": "#/components/schemas/Summary" + }, + { + "type": "null" + } + ], + "description": "The summary if available" + }, + "peer_representation": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Peer Representation", + "description": "A curated subset of a peer representation, if context is requested from a specific perspective" + }, + "peer_card": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "title": "Peer Card", + "description": "The peer card, if context is requested from a specific perspective" + } + }, + "type": "object", + "required": ["id", "messages"], + "title": "SessionContext" + }, + "SessionCreate": { + "properties": { + "id": { + "type": "string", + "maxLength": 512, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Id" + }, + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "peers": { + "anyOf": [ + { + "additionalProperties": { + "$ref": "#/components/schemas/SessionPeerConfig" + }, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Peers" + }, + "configuration": { + "anyOf": [ + { + "$ref": "#/components/schemas/SessionConfiguration" + }, + { + "type": "null" + } + ] + }, + "scopes": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 100 + }, + { + "type": "null" + } + ], + "title": "Scopes", + "description": "Optional list of (unprefixed) scope names to add this session to. Each scope is created if it does not exist yet. If the session already has messages, its existing documents are backfilled into the scope asynchronously." + } + }, + "type": "object", + "required": ["id"], + "title": "SessionCreate" + }, + "SessionGet": { + "properties": { + "filters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Filters" + } + }, + "type": "object", + "title": "SessionGet" + }, + "SessionPeerConfig": { + "properties": { + "observe_me": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Observe Me", + "description": "Whether Honcho will use reasoning to form a representation of this peer" + }, + "observe_others": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Observe Others", + "description": "Whether this peer should form a session-level theory-of-mind representation of other peers in the session" + } + }, + "type": "object", + "title": "SessionPeerConfig" + }, + "SessionQueueStatus": { + "properties": { + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Id", + "description": "Session ID if filtered by session" + }, + "total_work_units": { + "type": "integer", + "title": "Total Work Units", + "description": "Total work units" + }, + "completed_work_units": { + "type": "integer", + "title": "Completed Work Units", + "description": "Completed work units" + }, + "in_progress_work_units": { + "type": "integer", + "title": "In Progress Work Units", + "description": "Work units currently being processed" + }, + "pending_work_units": { + "type": "integer", + "title": "Pending Work Units", + "description": "Work units waiting to be processed" + } + }, + "type": "object", + "required": [ + "total_work_units", + "completed_work_units", + "in_progress_work_units", + "pending_work_units" + ], + "title": "SessionQueueStatus", + "description": "Status for a specific session within the processing queue." + }, + "SessionSummaries": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "short_summary": { + "anyOf": [ + { + "$ref": "#/components/schemas/Summary" + }, + { + "type": "null" + } + ], + "description": "The short summary if available" + }, + "long_summary": { + "anyOf": [ + { + "$ref": "#/components/schemas/Summary" + }, + { + "type": "null" + } + ], + "description": "The long summary if available" + } + }, + "type": "object", + "required": ["id"], + "title": "SessionSummaries" + }, + "SessionUpdate": { + "properties": { + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "configuration": { + "anyOf": [ + { + "$ref": "#/components/schemas/SessionConfiguration" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "SessionUpdate" + }, + "Summary": { + "properties": { + "content": { + "type": "string", + "title": "Content", + "description": "The summary text" + }, + "message_id": { + "type": "string", + "title": "Message Id", + "description": "The public ID of the message that this summary covers up to" + }, + "summary_type": { + "type": "string", + "title": "Summary Type", + "description": "The type of summary (short or long)" + }, + "created_at": { + "type": "string", + "title": "Created At", + "description": "The timestamp of when the summary was created (ISO format)" + }, + "token_count": { + "type": "integer", + "title": "Token Count", + "description": "The number of tokens in the summary text" + } + }, + "type": "object", + "required": ["content", "message_id", "summary_type", "created_at", "token_count"], + "title": "Summary" + }, + "SummaryConfiguration": { + "properties": { + "enabled": { + "anyOf": [ + { + "type": "boolean" + }, + { + "type": "null" + } + ], + "title": "Enabled", + "description": "Whether to enable summary functionality." + }, + "messages_per_short_summary": { + "anyOf": [ + { + "type": "integer", + "minimum": 10.0 + }, + { + "type": "null" + } + ], + "title": "Messages Per Short Summary", + "description": "Number of messages per short summary. Must be positive, greater than or equal to 10, and less than messages_per_long_summary." + }, + "messages_per_long_summary": { + "anyOf": [ + { + "type": "integer", + "minimum": 20.0 + }, + { + "type": "null" + } + ], + "title": "Messages Per Long Summary", + "description": "Number of messages per long summary. Must be positive, greater than or equal to 20, and greater than messages_per_short_summary." + } + }, + "type": "object", + "title": "SummaryConfiguration" + }, + "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" + }, + "WebhookEndpoint": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "workspace_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Workspace Id" + }, + "url": { + "type": "string", + "title": "Url" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": ["id", "workspace_id", "url", "created_at"], + "title": "WebhookEndpoint" + }, + "WebhookEndpointCreate": { + "properties": { + "url": { + "type": "string", + "title": "Url" + } + }, + "type": "object", + "required": ["url"], + "title": "WebhookEndpointCreate" + }, + "Workspace": { + "properties": { + "id": { + "type": "string", + "title": "Id" + }, + "metadata": { + "additionalProperties": true, + "type": "object", + "title": "Metadata" + }, + "configuration": { + "additionalProperties": true, + "type": "object", + "title": "Configuration" + }, + "created_at": { + "type": "string", + "format": "date-time", + "title": "Created At" + } + }, + "type": "object", + "required": ["id", "created_at"], + "title": "Workspace" + }, + "WorkspaceChatOptions": { + "properties": { + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Session Id", + "description": "Optional session to scope message tools to" + }, + "query": { + "type": "string", + "maxLength": 10000, + "minLength": 1, + "title": "Query", + "description": "Workspace chat prompt" + }, + "stream": { + "type": "boolean", + "title": "Stream", + "default": false + }, + "reasoning_level": { + "type": "string", + "enum": ["minimal", "low", "medium", "high", "max"], + "title": "Reasoning Level", + "description": "Level of reasoning to apply: minimal, low, medium, high, or max", + "default": "low" + }, + "response_format": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Response Format", + "description": "Optional JSON Schema (root type 'object') the response must conform to. When provided, `content` is a JSON string matching this schema." + }, + "scope": { + "anyOf": [ + { + "type": "string" + }, + { + "items": { + "type": "string" + }, + "type": "array", + "maxItems": 100, + "minItems": 1 + }, + { + "type": "null" + } + ], + "title": "Scope", + "description": "Optional (unprefixed) scope name(s) restricting recall to the union of the scopes' member sessions (explicit allowlist, fail-closed: an empty union recalls nothing). Mutually exclusive with `session_id`. Requires a workspace- or admin-level key." + }, + "include_evidence": { + "type": "boolean", + "title": "Include Evidence", + "description": "When true, the response includes an `evidence` object listing the conclusions and messages the agent read while answering, plus the tool calls it made. Evidence is collated from what the agent accessed; the model is never asked to cite anything, so evidence may over-report (accessed is not the same as used).", + "default": false + } + }, + "type": "object", + "required": ["query"], + "title": "WorkspaceChatOptions", + "description": "Options for workspace-level chat (no anchor peer; see DialecticOptions)." + }, + "WorkspaceConfiguration": { + "properties": { + "reasoning": { + "anyOf": [ + { + "$ref": "#/components/schemas/ReasoningConfiguration" + }, + { + "type": "null" + } + ], + "description": "Configuration for reasoning functionality." + }, + "peer_card": { + "anyOf": [ + { + "$ref": "#/components/schemas/PeerCardConfiguration" + }, + { + "type": "null" + } + ], + "description": "Configuration for peer card functionality. If reasoning is disabled, peer cards will also be disabled and these settings will be ignored." + }, + "summary": { + "anyOf": [ + { + "$ref": "#/components/schemas/SummaryConfiguration" + }, + { + "type": "null" + } + ], + "description": "Configuration for summary functionality." + }, + "dream": { + "anyOf": [ + { + "$ref": "#/components/schemas/DreamConfiguration" + }, + { + "type": "null" + } + ], + "description": "Configuration for dream functionality. If reasoning is disabled, dreams will also be disabled and these settings will be ignored." + } + }, + "additionalProperties": true, + "type": "object", + "title": "WorkspaceConfiguration", + "description": "The set of options that can be in a workspace DB-level configuration dictionary.\n\nAll fields are optional. Session-level configuration overrides workspace-level configuration, which overrides global configuration." + }, + "WorkspaceCreate": { + "properties": { + "id": { + "type": "string", + "maxLength": 512, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_-]+$", + "title": "Id" + }, + "metadata": { + "additionalProperties": true, + "type": "object", + "title": "Metadata", + "default": {} + }, + "configuration": { + "$ref": "#/components/schemas/WorkspaceConfiguration" + } + }, + "type": "object", + "required": ["id"], + "title": "WorkspaceCreate" + }, + "WorkspaceGet": { + "properties": { + "filters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Filters" + } + }, + "type": "object", + "title": "WorkspaceGet" + }, + "WorkspaceMessageSearchOptions": { + "properties": { + "query": { + "type": "string", + "title": "Query", + "description": "Search query" + }, + "filters": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Filters", + "description": "Filters to scope the search" + }, + "limit": { + "type": "integer", + "maximum": 100.0, + "minimum": 1.0, + "title": "Limit", + "description": "Number of results to return", + "default": 10 + }, + "scope": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Scope", + "description": "Optional (unprefixed) scope name restricting search to the scope's member sessions. A scope with no member sessions returns no results. Mutually exclusive with a 'session_id' key in `filters`." + } + }, + "type": "object", + "required": ["query"], + "title": "WorkspaceMessageSearchOptions", + "description": "Workspace-level message search options, extended with `scope`." + }, + "WorkspaceUpdate": { + "properties": { + "metadata": { + "anyOf": [ + { + "additionalProperties": true, + "type": "object" + }, + { + "type": "null" + } + ], + "title": "Metadata" + }, + "configuration": { + "anyOf": [ + { + "$ref": "#/components/schemas/WorkspaceConfiguration" + }, + { + "type": "null" + } + ] + } + }, + "type": "object", + "title": "WorkspaceUpdate" + }, + "Evidence": { + "description": "What the dialectic agent read and did while answering.\n\nCollated from the agent's own reads rather than reported by the model, so\nit is deterministic but over-reports: it lists what the agent accessed,\nwhich is not necessarily what the answer relied on.\n\nMeant for auditing and analytics -- inspecting why an answer looks the way\nit does, or measuring what recall actually reaches the agent. It is not a\nread API: conclusions carry their text because that text is the thing being\naudited and the deriver keeps it short, while messages carry identity alone\n(see `EvidenceMessageRef`).", + "properties": { + "conclusions": { + "description": "Conclusions the agent read, whether prefetched or found via its tools", + "items": { + "$ref": "#/components/schemas/EvidenceObservation" + }, + "title": "Conclusions", + "type": "array" + }, + "messages": { + "description": "Messages the agent read via its search and grep tools, by ID and provenance only. Fetch a message to read its content.", + "items": { + "$ref": "#/components/schemas/EvidenceMessageRef" + }, + "title": "Messages", + "type": "array" + }, + "tool_calls": { + "description": "Tools the agent invoked, in order, with their arguments. Results are omitted (they are reflected in `conclusions` and `messages`), and so are calls that failed, so this is a record of successful invocations rather than a complete reasoning trace.", + "items": { + "$ref": "#/components/schemas/EvidenceToolCall" + }, + "title": "Tool Calls", + "type": "array" + }, + "reasoning_trace_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "ID of the stored reasoning trace for this call, when trace storage is enabled", + "title": "Reasoning Trace Id" + } + }, + "title": "Evidence", + "type": "object" + }, + "EvidenceMessageRef": { + "description": "A message the dialectic agent read while answering.\n\nIdentity and provenance only -- no content. Message content is\ncaller-supplied and unbounded, so carrying it would let one answer drag\nmegabytes behind it, and would invite callers to read messages out of\nevidence in bulk rather than asking for the ones they want. Fetch the\nmessage by `id` when the text is needed.", + "properties": { + "id": { + "description": "Message ID", + "title": "Id", + "type": "string" + }, + "session_id": { + "description": "Session the message belongs to", + "title": "Session Id", + "type": "string" + }, + "peer_id": { + "description": "Peer who sent the message", + "title": "Peer Id", + "type": "string" + }, + "created_at": { + "description": "When the message was sent", + "format": "date-time", + "title": "Created At", + "type": "string" + } + }, + "required": ["id", "session_id", "peer_id", "created_at"], + "title": "EvidenceMessageRef", + "type": "object" + }, + "EvidenceObservation": { + "description": "A conclusion the dialectic agent read while answering.", + "properties": { + "id": { + "description": "Conclusion (document) ID", + "title": "Id", + "type": "string" + }, + "level": { + "description": "Conclusion level: explicit, deductive, inductive, or contradiction", + "enum": ["explicit", "deductive", "inductive", "contradiction"], + "title": "Level", + "type": "string" + }, + "content": { + "description": "The conclusion text (the derived conclusion, for non-explicit levels)", + "title": "Content", + "type": "string" + }, + "created_at": { + "description": "When the conclusion was derived, from its source messages when known", + "format": "date-time", + "title": "Created At", + "type": "string" + }, + "session_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Session the conclusion is scoped to, if any", + "title": "Session Id" + }, + "source_ids": { + "description": "IDs of the conclusions this one was derived from. Empty for explicit conclusions, which derive from messages rather than from other conclusions.", + "items": { + "type": "string" + }, + "title": "Source Ids", + "type": "array" + } + }, + "required": ["id", "level", "content", "created_at"], + "title": "EvidenceObservation", + "type": "object" + }, + "EvidenceToolCall": { + "description": "A tool the dialectic agent invoked while answering.", + "properties": { + "tool_name": { + "description": "Name of the tool", + "title": "Tool Name", + "type": "string" + }, + "tool_input": { + "additionalProperties": true, + "description": "Arguments the agent passed to the tool", + "title": "Tool Input", + "type": "object" + } + }, + "required": ["tool_name"], + "title": "EvidenceToolCall", + "type": "object" + } + }, + "securitySchemes": { + "HTTPBearer": { + "type": "http", + "scheme": "bearer" + } + } + } } diff --git a/packages/web/src/api/queries.ts b/packages/web/src/api/queries.ts index b4dd926..36ad6e9 100644 --- a/packages/web/src/api/queries.ts +++ b/packages/web/src/api/queries.ts @@ -75,10 +75,11 @@ export function useScheduleDream(workspaceId: string) { observed?: string | null; dream_type: "omni"; session_id?: string | null; + rebuild?: boolean; }) => { const { error } = await client.current.POST("/v3/workspaces/{workspace_id}/schedule_dream", { params: { path: { workspace_id: workspaceId } }, - body, + body: { rebuild: false, ...body }, }); if (error) err(error); }, @@ -301,7 +302,12 @@ export function useChat( "/v3/workspaces/{workspace_id}/peers/{peer_id}/chat", { params: { path: { workspace_id: workspaceId, peer_id: peerId } }, - body: { query: message, stream: false, reasoning_level: reasoningLevel }, + body: { + query: message, + stream: false, + reasoning_level: reasoningLevel, + include_evidence: false, + }, }, ); return data ?? err(error); diff --git a/packages/web/src/api/schema.d.ts b/packages/web/src/api/schema.d.ts index e53c5b5..a97fc34 100644 --- a/packages/web/src/api/schema.d.ts +++ b/packages/web/src/api/schema.d.ts @@ -4,3321 +4,4286 @@ */ export interface paths { - "/v3/workspaces": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Get Or Create Workspace - * @description Get a Workspace by ID. - * - * If workspace_id is provided as a query parameter, it uses that (must match JWT workspace_id). - * Otherwise, it uses the workspace_id from the JWT. - */ - post: operations["get_or_create_workspace_v3_workspaces_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Get All Workspaces - * @description Get all Workspaces, paginated with optional filters. - */ - post: operations["get_all_workspaces_v3_workspaces_list_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** - * Update Workspace - * @description Update Workspace metadata and/or configuration. - */ - put: operations["update_workspace_v3_workspaces__workspace_id__put"]; - post?: never; - /** - * Delete Workspace - * @description Delete a Workspace. This accepts the deletion request and processes it in the background, - * permanently deleting all peers, messages, conclusions, and other resources associated - * with the workspace. - * - * Returns 409 Conflict if the workspace contains active sessions. - * Delete all sessions first, then delete the workspace. - * - * This action cannot be undone. - */ - delete: operations["delete_workspace_v3_workspaces__workspace_id__delete"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/search": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Search Workspace - * @description Search messages in a Workspace using optional filters. Use `limit` to control the number of - * results returned. - */ - post: operations["search_workspace_v3_workspaces__workspace_id__search_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/queue/status": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Queue Status - * @description Get the processing queue status for a Workspace, optionally scoped to an observer, sender, - * and/or session. - * - * Only tracks user-facing task types (representation, summary, dream). - * Internal infrastructure tasks (reconciler, webhook, deletion) are excluded. - * Note: completed counts reflect items since the last periodic queue cleanup, - * not lifetime totals. - */ - get: operations["get_queue_status_v3_workspaces__workspace_id__queue_status_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/schedule_dream": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Schedule Dream - * @description Manually schedule a dream task for a specific collection. - * - * This endpoint bypasses all automatic dream conditions (document threshold, - * minimum hours between dreams) and schedules the dream task for a future execution. - * - * Currently this endpoint only supports scheduling immediate dreams. In the future, - * users may pass a cron-style expression to schedule dreams at specific times. - */ - post: operations["schedule_dream_v3_workspaces__workspace_id__schedule_dream_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/peers/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Get Peers - * @description Get all Peers for a Workspace, paginated with optional filters. - */ - post: operations["get_peers_v3_workspaces__workspace_id__peers_list_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/peers": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Get Or Create Peer - * @description Get a Peer by ID or create a new Peer with the given ID. - * - * If peer_id is provided as a query parameter, it uses that (must match JWT workspace_id). - * Otherwise, it uses the peer_id from the JWT. - */ - post: operations["get_or_create_peer_v3_workspaces__workspace_id__peers_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/peers/{peer_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** - * Update Peer - * @description Update a Peer's metadata and/or configuration. - */ - put: operations["update_peer_v3_workspaces__workspace_id__peers__peer_id__put"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/peers/{peer_id}/sessions": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Get Sessions For Peer - * @description Get all Sessions for a Peer, paginated with optional filters. - */ - post: operations["get_sessions_for_peer_v3_workspaces__workspace_id__peers__peer_id__sessions_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/peers/{peer_id}/chat": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Chat - * @description Query a Peer's representation using natural language. Performs agentic search and reasoning to comprehensively - * answer the query based on all latent knowledge gathered about the peer from their messages and conclusions. - */ - post: operations["chat_v3_workspaces__workspace_id__peers__peer_id__chat_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/peers/{peer_id}/representation": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Get Representation - * @description Get a curated subset of a Peer's Representation. A Representation is always a subset of the total - * knowledge about the Peer. The subset can be scoped and filtered in various ways. - * - * - * If a session_id is provided in the body, we get the Representation of the Peer scoped to that Session. - * If a target is provided, we get the Representation of the target from the perspective of the Peer. - * If no target is provided, we get the omniscient Honcho Representation of the Peer. - */ - post: operations["get_representation_v3_workspaces__workspace_id__peers__peer_id__representation_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/peers/{peer_id}/card": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Peer Card - * @description Get a peer card for a specific peer relationship. - * - * Returns the peer card that the observer peer has for the target peer if it exists. - * If no target is specified, returns the observer's own peer card. - */ - get: operations["get_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_get"]; - /** - * Set Peer Card - * @description Set a peer card for a specific peer relationship. - * - * Sets the peer card that the observer peer has for the target peer. - * If no target is specified, sets the observer's own peer card. - */ - put: operations["set_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_put"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/peers/{peer_id}/context": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Peer Context - * @description Get context for a peer, including their representation and peer card. - * - * This endpoint returns a curated subset of the representation and peer card for a peer. - * If a target is specified, returns the context for the target from the - * observer peer's perspective. If no target is specified, returns the - * peer's own context (self-observation). - * - * This is useful for getting all the context needed about a peer without - * making multiple API calls. - */ - get: operations["get_peer_context_v3_workspaces__workspace_id__peers__peer_id__context_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/peers/{peer_id}/search": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Search Peer - * @description Search a Peer's messages, optionally filtered by various criteria. - */ - post: operations["search_peer_v3_workspaces__workspace_id__peers__peer_id__search_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Get Sessions - * @description Get all Sessions for a Workspace, paginated with optional filters. - */ - post: operations["get_sessions_v3_workspaces__workspace_id__sessions_list_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Get Or Create Session - * @description Get a Session by ID or create a new Session with the given ID. - * - * If Session ID is provided as a parameter, it verifies the Session is in the Workspace. - * Otherwise, it uses the session_id from the JWT for verification. - */ - post: operations["get_or_create_session_v3_workspaces__workspace_id__sessions_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - /** - * Update Session - * @description Update a Session's metadata and/or configuration. - */ - put: operations["update_session_v3_workspaces__workspace_id__sessions__session_id__put"]; - post?: never; - /** - * Delete Session - * @description Delete a Session and all associated messages. - * - * The Session is marked as inactive immediately and returns 202 Accepted. The actual - * deletion of all related data happens asynchronously via the queue with retry support. - * - * This action cannot be undone. - */ - delete: operations["delete_session_v3_workspaces__workspace_id__sessions__session_id__delete"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}/clone": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Clone Session - * @description Clone a Session, optionally up to a specific message ID. - */ - post: operations["clone_session_v3_workspaces__workspace_id__sessions__session_id__clone_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}/peers": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Session Peers - * @description Get all Peers in a Session. Results are paginated. - */ - get: operations["get_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_get"]; - /** - * Set Session Peers - * @description Set the Peers in a Session. If a Peer does not yet exist, it will be created automatically. - * - * This will fully replace the current set of Peers in the Session. - */ - put: operations["set_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_put"]; - /** - * Add Peers To Session - * @description Add Peers to a Session. If a Peer does not yet exist, it will be created automatically. - */ - post: operations["add_peers_to_session_v3_workspaces__workspace_id__sessions__session_id__peers_post"]; - /** - * Remove Peers From Session - * @description Remove Peers by ID from a Session. - */ - delete: operations["remove_peers_from_session_v3_workspaces__workspace_id__sessions__session_id__peers_delete"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}/peers/{peer_id}/config": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Peer Config - * @description Get the configuration for a Peer in a Session. - */ - get: operations["get_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_get"]; - /** - * Set Peer Config - * @description Set the configuration for a Peer in a Session. - */ - put: operations["set_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_put"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}/context": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Session Context - * @description Produce a context object from the Session. The caller provides an optional token limit which the entire context must fit into. - * If not provided, the context will be exhaustive (within configured max tokens). To do this, we allocate 40% of the token limit - * to the summary, and 60% to recent messages -- as many as can fit. Note that the summary will usually take up less space than - * this. If the caller does not want a summary, we allocate all the tokens to recent messages. - */ - get: operations["get_session_context_v3_workspaces__workspace_id__sessions__session_id__context_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}/summaries": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Session Summaries - * @description Get available summaries for a Session. - * - * Returns both short and long summaries if available, including metadata like - * the message ID they cover up to, creation timestamp, and token count. - */ - get: operations["get_session_summaries_v3_workspaces__workspace_id__sessions__session_id__summaries_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}/search": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Search Session - * @description Search a Session with optional filters. Use `limit` to control the number of results returned. - */ - post: operations["search_session_v3_workspaces__workspace_id__sessions__session_id__search_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Create Messages For Session - * @description Add new message(s) to a session. - */ - post: operations["create_messages_for_session_v3_workspaces__workspace_id__sessions__session_id__messages_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/upload": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Create Messages With File - * @description Create messages from uploaded files. Files are converted to text and split into multiple messages. - */ - post: operations["create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Get Messages - * @description Get all messages for a Session with optional filters. Results are paginated. - */ - post: operations["get_messages_v3_workspaces__workspace_id__sessions__session_id__messages_list_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/{message_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Get Message - * @description Get a single message by ID from a Session. - */ - get: operations["get_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__get"]; - /** - * Update Message - * @description Update the metadata of a message. - * - * This will overwrite any existing metadata for the message. - */ - put: operations["update_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__put"]; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/conclusions": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Create Conclusions - * @description Create one or more Conclusions. - * - * Conclusions are logical certainties derived from interactions between Peers. They form the basis of a Peer's Representation. - */ - post: operations["create_conclusions_v3_workspaces__workspace_id__conclusions_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/conclusions/list": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * List Conclusions - * @description List Conclusions using optional filters, ordered by recency unless `reverse` is true. Results are paginated. - */ - post: operations["list_conclusions_v3_workspaces__workspace_id__conclusions_list_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/conclusions/query": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Query Conclusions - * @description Query Conclusions using semantic search. Use `top_k` to control the number of results returned. - */ - post: operations["query_conclusions_v3_workspaces__workspace_id__conclusions_query_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/conclusions/{conclusion_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** - * Delete Conclusion - * @description Delete a single Conclusion by ID. - * - * This action cannot be undone. - */ - delete: operations["delete_conclusion_v3_workspaces__workspace_id__conclusions__conclusion_id__delete"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/keys": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - /** - * Create Key - * @description Create a new Key - */ - post: operations["create_key_v3_keys_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/webhooks": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * List Webhook Endpoints - * @description List all webhook endpoints, optionally filtered by workspace. - */ - get: operations["list_webhook_endpoints_v3_workspaces__workspace_id__webhooks_get"]; - put?: never; - /** - * Get Or Create Webhook Endpoint - * @description Get or create a webhook endpoint URL. - */ - post: operations["get_or_create_webhook_endpoint_v3_workspaces__workspace_id__webhooks_post"]; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/webhooks/{endpoint_id}": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - get?: never; - put?: never; - post?: never; - /** - * Delete Webhook Endpoint - * @description Delete a specific webhook endpoint. - */ - delete: operations["delete_webhook_endpoint_v3_workspaces__workspace_id__webhooks__endpoint_id__delete"]; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; - "/v3/workspaces/{workspace_id}/webhooks/test": { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** - * Test Emit - * @description Test publishing a webhook event. - */ - get: operations["test_emit_v3_workspaces__workspace_id__webhooks_test_get"]; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; + "/v3/workspaces": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Or Create Workspace + * @description Get a Workspace by ID. + * + * If workspace_id is provided as a query parameter, it uses that (must match JWT workspace_id). + * Otherwise, it uses the workspace_id from the JWT. + */ + post: operations["get_or_create_workspace_v3_workspaces_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get All Workspaces + * @description Get all Workspaces, paginated with optional filters. + */ + post: operations["get_all_workspaces_v3_workspaces_list_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update Workspace + * @description Update Workspace metadata and/or configuration. + */ + put: operations["update_workspace_v3_workspaces__workspace_id__put"]; + post?: never; + /** + * Delete Workspace + * @description Delete a Workspace. This accepts the deletion request and processes it in the background, + * permanently deleting all peers, messages, conclusions, and other resources associated + * with the workspace. + * + * Returns 409 Conflict if the workspace contains active sessions. + * Delete all sessions first, then delete the workspace. + * + * This action cannot be undone. + */ + delete: operations["delete_workspace_v3_workspaces__workspace_id__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/search": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Search Workspace + * @description Search messages in a Workspace using optional filters. Use `limit` to control the number of + * results returned. + * + * Pass `scope` to restrict the search to a scope's member sessions. A scope + * with no member sessions returns no results (fail-closed). + */ + post: operations["search_workspace_v3_workspaces__workspace_id__search_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/queue/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Queue Status + * @description Get the processing queue status for a Workspace, optionally scoped to an observer, sender, + * and/or session. + * + * Only tracks user-facing task types (representation, summary, dream). + * Internal infrastructure tasks (reconciler, webhook, deletion) are excluded. + * Note: completed counts reflect items since the last periodic queue cleanup, + * not lifetime totals. + */ + get: operations["get_queue_status_v3_workspaces__workspace_id__queue_status_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/schedule_dream": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Schedule Dream + * @description Manually schedule a dream task for a specific collection. + * + * This endpoint bypasses all automatic dream conditions (document threshold, + * minimum hours between dreams) and schedules the dream task for a future execution. + * + * Currently this endpoint only supports scheduling immediate dreams. In the future, + * users may pass a cron-style expression to schedule dreams at specific times. + */ + post: operations["schedule_dream_v3_workspaces__workspace_id__schedule_dream_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Workspace Chat + * @description Query the entire workspace using natural language. Runs the Dialectic agent over every peer in the workspace rather than a single (observer, observed) pair: there is no anchor peer and no `target`. + * + * Pass `session_id` to narrow message tools to one session, or `scope` to restrict recall to the union of the named scopes' member sessions (always an allowlist, even for a single name; a scope with no member sessions recalls nothing). `session_id` and `scope` are mutually exclusive. + * + * Set `stream: true` to receive the answer as a `text/event-stream` of `{"delta": {"content": ...}, "done": false}` chunks terminated by `{"done": true}`. Requires a workspace- or admin-level key. + */ + post: operations["chat_v3_workspaces__workspace_id__chat_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/peers/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Peers + * @description Get all Peers for a Workspace, paginated with optional filters. + * + * Scope peers are excluded by default; set `kind` to "scope" for scope peers + * only, or "all" for everything. + */ + post: operations["get_peers_v3_workspaces__workspace_id__peers_list_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/peers": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Or Create Peer + * @description Get a Peer by ID or create a new Peer with the given ID. + * + * If peer_id is provided as a query parameter, it uses that (must match JWT workspace_id). + * Otherwise, it uses the peer_id from the JWT. + */ + post: operations["get_or_create_peer_v3_workspaces__workspace_id__peers_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/peers/{peer_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update Peer + * @description Update a Peer's metadata and/or configuration. + * + * Returns 422 if the peer is a scope — use the scopes routes to manage scopes. + */ + put: operations["update_peer_v3_workspaces__workspace_id__peers__peer_id__put"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/peers/{peer_id}/sessions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Sessions For Peer + * @description Get all Sessions for a Peer, paginated with optional filters. + */ + post: operations["get_sessions_for_peer_v3_workspaces__workspace_id__peers__peer_id__sessions_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/peers/{peer_id}/chat": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Peer Chat + * @description Query a Peer's representation using natural language. Performs agentic search and reasoning to comprehensively + * answer the query based on all latent knowledge gathered about the peer from their messages and conclusions. + */ + post: operations["chat_v3_workspaces__workspace_id__peers__peer_id__chat_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/peers/{peer_id}/representation": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Representation + * @description Get a curated subset of a Peer's Representation. A Representation is always a subset of the total + * knowledge about the Peer. The subset can be scoped and filtered in various ways. + * + * + * If a session_id is provided in the body, we get the Representation of the Peer scoped to that Session. + * If a target is provided, we get the Representation of the target from the perspective of the Peer. + * If no target is provided, we get the omniscient Honcho Representation of the Peer. + */ + post: operations["get_representation_v3_workspaces__workspace_id__peers__peer_id__representation_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/peers/{peer_id}/card": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Peer Card + * @description Get a peer card for a specific peer relationship. + * + * Returns the peer card that the observer peer has for the target peer if it exists. + * If no target is specified, returns the observer's own peer card. + */ + get: operations["get_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_get"]; + /** + * Set Peer Card + * @description Set a peer card for a specific peer relationship. + * + * Sets the peer card that the observer peer has for the target peer. + * If no target is specified, sets the observer's own peer card. + */ + put: operations["set_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_put"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/peers/{peer_id}/context": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Peer Context + * @description Get context for a peer, including their representation and peer card. + * + * This endpoint returns a curated subset of the representation and peer card for a peer. + * If a target is specified, returns the context for the target from the + * observer peer's perspective. If no target is specified, returns the + * peer's own context (self-observation). + * + * This is useful for getting all the context needed about a peer without + * making multiple API calls. + */ + get: operations["get_peer_context_v3_workspaces__workspace_id__peers__peer_id__context_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/peers/{peer_id}/search": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Search Peer + * @description Search a Peer's messages, optionally filtered by various criteria. + */ + post: operations["search_peer_v3_workspaces__workspace_id__peers__peer_id__search_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Sessions + * @description Get all Sessions for a Workspace, paginated with optional filters. + */ + post: operations["get_sessions_v3_workspaces__workspace_id__sessions_list_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Or Create Session + * @description Get a Session by ID or create a new Session with the given ID. + * + * If Session ID is provided as a parameter, it verifies the Session is in the Workspace. + * Otherwise, it uses the session_id from the JWT for verification. + */ + post: operations["get_or_create_session_v3_workspaces__workspace_id__sessions_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + /** + * Update Session + * @description Update a Session's metadata and/or configuration. + */ + put: operations["update_session_v3_workspaces__workspace_id__sessions__session_id__put"]; + post?: never; + /** + * Delete Session + * @description Delete a Session and all associated messages. + * + * The Session is marked as inactive immediately and returns 202 Accepted. The actual + * deletion of all related data happens asynchronously via the queue with retry support. + * + * This action cannot be undone. + */ + delete: operations["delete_session_v3_workspaces__workspace_id__sessions__session_id__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}/clone": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Clone Session + * @description Clone a Session, optionally up to a specific message ID. + */ + post: operations["clone_session_v3_workspaces__workspace_id__sessions__session_id__clone_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}/peers": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Session Peers + * @description Get all Peers in a Session. Results are paginated. + */ + get: operations["get_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_get"]; + /** + * Set Session Peers + * @description Set the Peers in a Session. If a Peer does not yet exist, it will be created automatically. + * + * This will fully replace the current set of Peers in the Session. + * + * Scope peers cannot be set here; scope membership is managed via the scopes routes. + */ + put: operations["set_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_put"]; + /** + * Add Peers To Session + * @description Add Peers to a Session. If a Peer does not yet exist, it will be created automatically. + * + * Scope peers cannot be added here; scope membership is managed via the scopes routes. + */ + post: operations["add_peers_to_session_v3_workspaces__workspace_id__sessions__session_id__peers_post"]; + /** + * Remove Peers From Session + * @description Remove Peers by ID from a Session. + * + * Scope peers cannot be removed here; scope membership is managed via the scopes routes. + */ + delete: operations["remove_peers_from_session_v3_workspaces__workspace_id__sessions__session_id__peers_delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}/peers/{peer_id}/config": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Peer Config + * @description Get the configuration for a Peer in a Session. + * + * Member-read lets a peer-scoped key reach this route, but a peer may only + * read its own per-session config — not a co-member's. Workspace/admin and + * session-scoped tokens (which already span the whole session) are unaffected. + */ + get: operations["get_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_get"]; + /** + * Set Peer Config + * @description Set the configuration for a Peer in a Session. + */ + put: operations["set_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_put"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}/context": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Session Context + * @description Produce a context object from the Session. The caller provides an optional token limit which the entire context must fit into. + * If not provided, the context will be exhaustive (within configured max tokens). To do this, we allocate 40% of the token limit + * to the summary, and 60% to recent messages -- as many as can fit. Note that the summary will usually take up less space than + * this. If the caller does not want a summary, we allocate all the tokens to recent messages. + */ + get: operations["get_session_context_v3_workspaces__workspace_id__sessions__session_id__context_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}/summaries": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Session Summaries + * @description Get available summaries for a Session. + * + * Returns both short and long summaries if available, including metadata like + * the message ID they cover up to, creation timestamp, and token count. + */ + get: operations["get_session_summaries_v3_workspaces__workspace_id__sessions__session_id__summaries_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}/search": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Search Session + * @description Search a Session with optional filters. Use `limit` to control the number of results returned. + */ + post: operations["search_session_v3_workspaces__workspace_id__sessions__session_id__search_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/scopes": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Or Create Scope + * @description Get a Scope by ID or create a new Scope with the given ID. + * + * Returns 201 when the scope is created and 200 when it already exists. + * A pre-existing peer occupying the scope's reserved internal name is never + * adopted; that conflict returns 409. + */ + post: operations["get_or_create_scope_v3_workspaces__workspace_id__scopes_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/scopes/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Scopes + * @description Get all Scopes for a Workspace. Results are paginated. + */ + post: operations["get_scopes_v3_workspaces__workspace_id__scopes_list_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/scopes/{scope_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Scope + * @description Get a single Scope by ID. + */ + get: operations["get_scope_v3_workspaces__workspace_id__scopes__scope_id__get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/scopes/{scope_id}/sessions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Add Sessions To Scope + * @description Add Sessions to a Scope. + * + * All named sessions must already exist (404 otherwise). Adding a session that + * is already a member is a no-op. List the resulting membership with + * `POST /scopes/{scope_id}/sessions/list`. + * + * Note: any added session that already has messages triggers an asynchronous + * backfill-by-copy of its existing documents into the scope; track progress + * via ``GET /scopes/{scope_id}/status``. + */ + post: operations["add_sessions_to_scope_v3_workspaces__workspace_id__scopes__scope_id__sessions_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/scopes/{scope_id}/sessions/{session_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Remove Session From Scope + * @description Remove a Session from a Scope. + * + * Note: documents copied/derived while the session was a member are + * reconciled asynchronously — the session's explicit copies are soft-deleted + * from the scope, dependent derived documents follow (fail-closed), and the + * scope's card is rebuilt from the remaining evidence. + */ + delete: operations["remove_session_from_scope_v3_workspaces__workspace_id__scopes__scope_id__sessions__session_id__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/scopes/{scope_id}/sessions/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Scope Sessions + * @description Get the Sessions that are members of a Scope, paginated. + * + * Ordered by how long each session has been a member: longest-standing member + * first, or most recently added first when `reverse` is true. + */ + post: operations["get_scope_sessions_v3_workspaces__workspace_id__scopes__scope_id__sessions_list_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/scopes/{scope_id}/status": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Scope Status + * @description Get the backfill/reconciliation job status for a Scope. + * + * Returns a per-session map of the backfill job state (pending / completed / + * failed) with the number of documents copied once complete. Empty when no + * backfill has ever been enqueued for the scope. + */ + get: operations["get_scope_status_v3_workspaces__workspace_id__scopes__scope_id__status_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create Messages For Session + * @description Add new message(s) to a session. + */ + post: operations["create_messages_for_session_v3_workspaces__workspace_id__sessions__session_id__messages_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/upload": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create Messages With File + * @description Create messages from uploaded files. Files are converted to text and split into multiple messages. + */ + post: operations["create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Get Messages + * @description Get all messages for a Session with optional filters. Results are paginated. + */ + post: operations["get_messages_v3_workspaces__workspace_id__sessions__session_id__messages_list_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/sessions/{session_id}/messages/{message_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Message + * @description Get a single message by ID from a Session. + */ + get: operations["get_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__get"]; + /** + * Update Message + * @description Update the metadata of a message. + * + * This will overwrite any existing metadata for the message. + */ + put: operations["update_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__put"]; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/conclusions": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create Conclusions + * @description Create one or more Conclusions. + * + * Conclusions are logical certainties derived from interactions between Peers. They form the basis of a Peer's Representation. + */ + post: operations["create_conclusions_v3_workspaces__workspace_id__conclusions_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/conclusions/list": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * List Conclusions + * @description List Conclusions using optional filters, ordered by recency unless `reverse` is true. Results are paginated. + */ + post: operations["list_conclusions_v3_workspaces__workspace_id__conclusions_list_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/conclusions/query": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Query Conclusions + * @description Query Conclusions using semantic search. Use `top_k` to control the number of results returned. + */ + post: operations["query_conclusions_v3_workspaces__workspace_id__conclusions_query_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/conclusions/{conclusion_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Get Conclusion + * @description Get a single Conclusion by ID. + */ + get: operations["get_conclusion_v3_workspaces__workspace_id__conclusions__conclusion_id__get"]; + put?: never; + post?: never; + /** + * Delete Conclusion + * @description Delete a single Conclusion by ID. + * + * This action cannot be undone. + */ + delete: operations["delete_conclusion_v3_workspaces__workspace_id__conclusions__conclusion_id__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/keys": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Create Key + * @description Create a new Key + */ + post: operations["create_key_v3_keys_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/webhooks": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * List Webhook Endpoints + * @description List all webhook endpoints, optionally filtered by workspace. + */ + get: operations["list_webhook_endpoints_v3_workspaces__workspace_id__webhooks_get"]; + put?: never; + /** + * Get Or Create Webhook Endpoint + * @description Get or create a webhook endpoint URL. + */ + post: operations["get_or_create_webhook_endpoint_v3_workspaces__workspace_id__webhooks_post"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/webhooks/{endpoint_id}": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + post?: never; + /** + * Delete Webhook Endpoint + * @description Delete a specific webhook endpoint. + */ + delete: operations["delete_webhook_endpoint_v3_workspaces__workspace_id__webhooks__endpoint_id__delete"]; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/v3/workspaces/{workspace_id}/webhooks/test": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Test Emit + * @description Test publishing a webhook event. + */ + get: operations["test_emit_v3_workspaces__workspace_id__webhooks_test_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; + "/health": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + /** + * Health Check + * @description Health check endpoint for monitoring and container orchestration. + */ + get: operations["health_check_health_get"]; + put?: never; + post?: never; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; } export type webhooks = Record; export interface components { - schemas: { - /** Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post */ - Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post: { - /** File */ - file: string; - /** Peer Id */ - peer_id: string; - /** Metadata */ - metadata?: string | null; - /** Configuration */ - configuration?: string | null; - /** Created At */ - created_at?: string | null; - }; - /** - * Conclusion - * @description Conclusion response - external view of a document. - */ - Conclusion: { - /** Id */ - id: string; - /** Content */ - content: string; - /** - * Observer Id - * @description The peer who made the conclusion - */ - observer_id: string; - /** - * Observed Id - * @description The peer the conclusion is about - */ - observed_id: string; - /** Session Id */ - session_id?: string | null; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** - * ConclusionBatchCreate - * @description Schema for batch conclusion creation with a max of 100 conclusions. - */ - ConclusionBatchCreate: { - /** Conclusions */ - conclusions: components["schemas"]["ConclusionCreate"][]; - }; - /** - * ConclusionCreate - * @description Schema for creating a single conclusion. - */ - ConclusionCreate: { - /** Content */ - content: string; - /** - * Observer Id - * @description The peer making the conclusion - */ - observer_id: string; - /** - * Observed Id - * @description The peer the conclusion is about - */ - observed_id: string; - /** - * Session Id - * @description A session ID to store the conclusion in, if specified - */ - session_id?: string | null; - }; - /** - * ConclusionGet - * @description Schema for listing conclusions with optional filters. - */ - ConclusionGet: { - /** Filters */ - filters?: { - [key: string]: unknown; - } | null; - }; - /** - * ConclusionQuery - * @description Query parameters for semantic search of conclusions. - */ - ConclusionQuery: { - /** - * Query - * @description Semantic search query - */ - query: string; - /** - * Top K - * @description Number of results to return - * @default 10 - */ - top_k: number; - /** - * Distance - * @description Maximum cosine distance threshold for results - */ - distance?: number | null; - /** - * Filters - * @description Additional filters to apply - */ - filters?: { - [key: string]: unknown; - } | null; - }; - /** DialecticOptions */ - DialecticOptions: { - /** - * Session Id - * @description ID of the session to scope the representation to - */ - session_id?: string | null; - /** - * Target - * @description Optional peer to get the representation for, from the perspective of this peer - */ - target?: string | null; - /** - * Query - * @description Dialectic API Prompt - */ - query: string; - /** - * Stream - * @default false - */ - stream: boolean; - /** - * Reasoning Level - * @description Level of reasoning to apply: minimal, low, medium, high, or max - * @default low - * @enum {string} - */ - reasoning_level: "minimal" | "low" | "medium" | "high" | "max"; - }; - /** DreamConfiguration */ - DreamConfiguration: { - /** - * Enabled - * @description Whether to enable dream functionality. If reasoning is disabled, dreams will also be disabled and this setting will be ignored. - */ - enabled?: boolean | null; - }; - /** - * DreamType - * @description Types of dreams that can be triggered. - * @enum {string} - */ - DreamType: "omni"; - /** HTTPValidationError */ - HTTPValidationError: { - /** Detail */ - detail?: components["schemas"]["ValidationError"][]; - }; - /** Message */ - Message: { - /** Id */ - id: string; - /** Content */ - content: string; - /** Peer Id */ - peer_id: string; - /** Session Id */ - session_id: string; - /** Metadata */ - metadata?: { - [key: string]: unknown; - }; - /** - * Created At - * Format: date-time - */ - created_at: string; - /** Workspace Id */ - workspace_id: string; - /** Token Count */ - token_count: number; - }; - /** - * MessageBatchCreate - * @description Schema for batch message creation with a max of 100 messages - */ - MessageBatchCreate: { - /** Messages */ - messages: components["schemas"]["MessageCreate"][]; - }; - /** - * MessageConfiguration - * @description The set of options that can be in a message DB-level configuration dictionary. - * - * All fields are optional. Message-level configuration overrides all other configurations. - */ - MessageConfiguration: { - /** @description Configuration for reasoning functionality. */ - reasoning?: components["schemas"]["ReasoningConfiguration"] | null; - }; - /** MessageCreate */ - MessageCreate: { - /** Content */ - content: string; - /** Peer Id */ - peer_id: string; - /** Metadata */ - metadata?: { - [key: string]: unknown; - } | null; - configuration?: components["schemas"]["MessageConfiguration"] | null; - /** Created At */ - created_at?: string | null; - }; - /** MessageGet */ - MessageGet: { - /** Filters */ - filters?: { - [key: string]: unknown; - } | null; - }; - /** MessageSearchOptions */ - MessageSearchOptions: { - /** - * Query - * @description Search query - */ - query: string; - /** - * Filters - * @description Filters to scope the search - */ - filters?: { - [key: string]: unknown; - } | null; - /** - * Limit - * @description Number of results to return - * @default 10 - */ - limit: number; - }; - /** MessageUpdate */ - MessageUpdate: { - /** Metadata */ - metadata?: { - [key: string]: unknown; - } | null; - }; - /** Page[Conclusion] */ - Page_Conclusion_: { - /** Items */ - items: components["schemas"]["Conclusion"][]; - /** Total */ - total: number; - /** Page */ - page: number; - /** Size */ - size: number; - /** Pages */ - pages: number; - }; - /** Page[Message] */ - Page_Message_: { - /** Items */ - items: components["schemas"]["Message"][]; - /** Total */ - total: number; - /** Page */ - page: number; - /** Size */ - size: number; - /** Pages */ - pages: number; - }; - /** Page[Peer] */ - Page_Peer_: { - /** Items */ - items: components["schemas"]["Peer"][]; - /** Total */ - total: number; - /** Page */ - page: number; - /** Size */ - size: number; - /** Pages */ - pages: number; - }; - /** Page[Session] */ - Page_Session_: { - /** Items */ - items: components["schemas"]["Session"][]; - /** Total */ - total: number; - /** Page */ - page: number; - /** Size */ - size: number; - /** Pages */ - pages: number; - }; - /** Page[WebhookEndpoint] */ - Page_WebhookEndpoint_: { - /** Items */ - items: components["schemas"]["WebhookEndpoint"][]; - /** Total */ - total: number; - /** Page */ - page: number; - /** Size */ - size: number; - /** Pages */ - pages: number; - }; - /** Page[Workspace] */ - Page_Workspace_: { - /** Items */ - items: components["schemas"]["Workspace"][]; - /** Total */ - total: number; - /** Page */ - page: number; - /** Size */ - size: number; - /** Pages */ - pages: number; - }; - /** Peer */ - Peer: { - /** Id */ - id: string; - /** Workspace Id */ - workspace_id: string; - /** - * Created At - * Format: date-time - */ - created_at: string; - /** Metadata */ - metadata?: { - [key: string]: unknown; - }; - /** Configuration */ - configuration?: { - [key: string]: unknown; - }; - }; - /** PeerCardConfiguration */ - PeerCardConfiguration: { - /** - * Use - * @description Whether to use peer card related to this peer during reasoning process. - */ - use?: boolean | null; - /** - * Create - * @description Whether to generate peer card based on content. - */ - create?: boolean | null; - }; - /** PeerCardResponse */ - PeerCardResponse: { - /** - * Peer Card - * @description The peer card content, or None if not found - */ - peer_card?: string[] | null; - }; - /** PeerCardSet */ - PeerCardSet: { - /** - * Peer Card - * @description The peer card content to set - */ - peer_card: string[]; - }; - /** - * PeerContext - * @description Context for a peer, including representation and peer card. - */ - PeerContext: { - /** - * Peer Id - * @description The ID of the peer - */ - peer_id: string; - /** - * Target Id - * @description The ID of the target peer being observed - */ - target_id: string; - /** - * Representation - * @description A curated subset of the representation of the target peer from the observer's perspective - */ - representation?: string | null; - /** - * Peer Card - * @description The peer card for the target peer from the observer's perspective - */ - peer_card?: string[] | null; - }; - /** PeerCreate */ - PeerCreate: { - /** Id */ - id: string; - /** Metadata */ - metadata?: { - [key: string]: unknown; - } | null; - /** Configuration */ - configuration?: { - [key: string]: unknown; - } | null; - }; - /** PeerGet */ - PeerGet: { - /** Filters */ - filters?: { - [key: string]: unknown; - } | null; - }; - /** PeerRepresentationGet */ - PeerRepresentationGet: { - /** - * Session Id - * @description Optional session ID within which to scope the representation - */ - session_id?: string | null; - /** - * Target - * @description Optional peer ID to get the representation for, from the perspective of this peer - */ - target?: string | null; - /** - * Search Query - * @description Optional input to curate the representation around semantic search results - */ - search_query?: string | null; - /** - * Search Top K - * @description Only used if `search_query` is provided. Number of semantic-search-retrieved conclusions to include in the representation - */ - search_top_k?: number | null; - /** - * Search Max Distance - * @description Only used if `search_query` is provided. Maximum distance to search for semantically relevant conclusions - */ - search_max_distance?: number | null; - /** - * Include Most Frequent - * @description Only used if `search_query` is provided. Whether to include the most frequent conclusions in the representation - */ - include_most_frequent?: boolean | null; - /** - * Max Conclusions - * @description Only used if `search_query` is provided. Maximum number of conclusions to include in the representation - * @default 25 - */ - max_conclusions: number | null; - }; - /** PeerUpdate */ - PeerUpdate: { - /** Metadata */ - metadata?: { - [key: string]: unknown; - } | null; - /** Configuration */ - configuration?: { - [key: string]: unknown; - } | null; - }; - /** - * QueueStatus - * @description Aggregated processing queue status. - * - * Tracks user-facing task types only: representation, summary, and dream. - * Internal infrastructure tasks (reconciler, webhook, deletion) are excluded. - * - * Note: completed_work_units reflects items since the last periodic queue - * cleanup, not lifetime totals. - */ - QueueStatus: { - /** - * Total Work Units - * @description Total work units - */ - total_work_units: number; - /** - * Completed Work Units - * @description Completed work units (since last periodic cleanup) - */ - completed_work_units: number; - /** - * In Progress Work Units - * @description Work units currently being processed - */ - in_progress_work_units: number; - /** - * Pending Work Units - * @description Work units waiting to be processed - */ - pending_work_units: number; - /** - * Sessions - * @description Per-session status when not filtered by session - */ - sessions?: { - [key: string]: components["schemas"]["SessionQueueStatus"]; - } | null; - }; - /** ReasoningConfiguration */ - ReasoningConfiguration: { - /** - * Enabled - * @description Whether to enable reasoning functionality. - */ - enabled?: boolean | null; - /** - * Custom Instructions - * @description TODO: currently unused. Custom instructions to use for the reasoning system on this workspace/session/message. - */ - custom_instructions?: string | null; - }; - /** RepresentationResponse */ - RepresentationResponse: { - /** Representation */ - representation: string; - }; - /** ScheduleDreamRequest */ - ScheduleDreamRequest: { - /** - * Observer - * @description Observer peer name - */ - observer: string; - /** - * Observed - * @description Observed peer name (defaults to observer if not specified) - */ - observed?: string | null; - /** @description Type of dream to schedule */ - dream_type: components["schemas"]["DreamType"]; - /** - * Session Id - * @description Session ID to scope the dream to if specified - */ - session_id?: string | null; - }; - /** Session */ - Session: { - /** Id */ - id: string; - /** Is Active */ - is_active: boolean; - /** Workspace Id */ - workspace_id: string; - /** Metadata */ - metadata?: { - [key: string]: unknown; - }; - /** Configuration */ - configuration?: { - [key: string]: unknown; - }; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** - * SessionConfiguration - * @description The set of options that can be in a session DB-level configuration dictionary. - * - * All fields are optional. Session-level configuration overrides workspace-level configuration, which overrides global configuration. - */ - SessionConfiguration: { - /** @description Configuration for reasoning functionality. */ - reasoning?: components["schemas"]["ReasoningConfiguration"] | null; - /** @description Configuration for peer card functionality. If reasoning is disabled, peer cards will also be disabled and these settings will be ignored. */ - peer_card?: components["schemas"]["PeerCardConfiguration"] | null; - /** @description Configuration for summary functionality. */ - summary?: components["schemas"]["SummaryConfiguration"] | null; - /** @description Configuration for dream functionality. If reasoning is disabled, dreams will also be disabled and these settings will be ignored. */ - dream?: components["schemas"]["DreamConfiguration"] | null; - } & { - [key: string]: unknown; - }; - /** SessionContext */ - SessionContext: { - /** Id */ - id: string; - /** Messages */ - messages: components["schemas"]["Message"][]; - /** @description The summary if available */ - summary?: components["schemas"]["Summary"] | null; - /** - * Peer Representation - * @description A curated subset of a peer representation, if context is requested from a specific perspective - */ - peer_representation?: string | null; - /** - * Peer Card - * @description The peer card, if context is requested from a specific perspective - */ - peer_card?: string[] | null; - }; - /** SessionCreate */ - SessionCreate: { - /** Id */ - id: string; - /** Metadata */ - metadata?: { - [key: string]: unknown; - } | null; - /** Peers */ - peers?: { - [key: string]: components["schemas"]["SessionPeerConfig"]; - } | null; - configuration?: components["schemas"]["SessionConfiguration"] | null; - }; - /** SessionGet */ - SessionGet: { - /** Filters */ - filters?: { - [key: string]: unknown; - } | null; - }; - /** SessionPeerConfig */ - SessionPeerConfig: { - /** - * Observe Me - * @description Whether Honcho will use reasoning to form a representation of this peer - */ - observe_me?: boolean | null; - /** - * Observe Others - * @description Whether this peer should form a session-level theory-of-mind representation of other peers in the session - */ - observe_others?: boolean | null; - }; - /** - * SessionQueueStatus - * @description Status for a specific session within the processing queue. - */ - SessionQueueStatus: { - /** - * Session Id - * @description Session ID if filtered by session - */ - session_id?: string | null; - /** - * Total Work Units - * @description Total work units - */ - total_work_units: number; - /** - * Completed Work Units - * @description Completed work units - */ - completed_work_units: number; - /** - * In Progress Work Units - * @description Work units currently being processed - */ - in_progress_work_units: number; - /** - * Pending Work Units - * @description Work units waiting to be processed - */ - pending_work_units: number; - }; - /** SessionSummaries */ - SessionSummaries: { - /** Id */ - id: string; - /** @description The short summary if available */ - short_summary?: components["schemas"]["Summary"] | null; - /** @description The long summary if available */ - long_summary?: components["schemas"]["Summary"] | null; - }; - /** SessionUpdate */ - SessionUpdate: { - /** Metadata */ - metadata?: { - [key: string]: unknown; - } | null; - configuration?: components["schemas"]["SessionConfiguration"] | null; - }; - /** Summary */ - Summary: { - /** - * Content - * @description The summary text - */ - content: string; - /** - * Message Id - * @description The public ID of the message that this summary covers up to - */ - message_id: string; - /** - * Summary Type - * @description The type of summary (short or long) - */ - summary_type: string; - /** - * Created At - * @description The timestamp of when the summary was created (ISO format) - */ - created_at: string; - /** - * Token Count - * @description The number of tokens in the summary text - */ - token_count: number; - }; - /** SummaryConfiguration */ - SummaryConfiguration: { - /** - * Enabled - * @description Whether to enable summary functionality. - */ - enabled?: boolean | null; - /** - * Messages Per Short Summary - * @description Number of messages per short summary. Must be positive, greater than or equal to 10, and less than messages_per_long_summary. - */ - messages_per_short_summary?: number | null; - /** - * Messages Per Long Summary - * @description Number of messages per long summary. Must be positive, greater than or equal to 20, and greater than messages_per_short_summary. - */ - messages_per_long_summary?: number | null; - }; - /** ValidationError */ - ValidationError: { - /** Location */ - loc: (string | number)[]; - /** Message */ - msg: string; - /** Error Type */ - type: string; - /** Input */ - input?: unknown; - /** Context */ - ctx?: Record; - }; - /** WebhookEndpoint */ - WebhookEndpoint: { - /** Id */ - id: string; - /** Workspace Id */ - workspace_id: string | null; - /** Url */ - url: string; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** WebhookEndpointCreate */ - WebhookEndpointCreate: { - /** Url */ - url: string; - }; - /** Workspace */ - Workspace: { - /** Id */ - id: string; - /** Metadata */ - metadata?: { - [key: string]: unknown; - }; - /** Configuration */ - configuration?: { - [key: string]: unknown; - }; - /** - * Created At - * Format: date-time - */ - created_at: string; - }; - /** - * WorkspaceConfiguration - * @description The set of options that can be in a workspace DB-level configuration dictionary. - * - * All fields are optional. Session-level configuration overrides workspace-level configuration, which overrides global configuration. - */ - WorkspaceConfiguration: { - /** @description Configuration for reasoning functionality. */ - reasoning?: components["schemas"]["ReasoningConfiguration"] | null; - /** @description Configuration for peer card functionality. If reasoning is disabled, peer cards will also be disabled and these settings will be ignored. */ - peer_card?: components["schemas"]["PeerCardConfiguration"] | null; - /** @description Configuration for summary functionality. */ - summary?: components["schemas"]["SummaryConfiguration"] | null; - /** @description Configuration for dream functionality. If reasoning is disabled, dreams will also be disabled and these settings will be ignored. */ - dream?: components["schemas"]["DreamConfiguration"] | null; - } & { - [key: string]: unknown; - }; - /** WorkspaceCreate */ - WorkspaceCreate: { - /** Id */ - id: string; - /** - * Metadata - * @default {} - */ - metadata: { - [key: string]: unknown; - }; - configuration?: components["schemas"]["WorkspaceConfiguration"]; - }; - /** WorkspaceGet */ - WorkspaceGet: { - /** Filters */ - filters?: { - [key: string]: unknown; - } | null; - }; - /** WorkspaceUpdate */ - WorkspaceUpdate: { - /** Metadata */ - metadata?: { - [key: string]: unknown; - } | null; - configuration?: components["schemas"]["WorkspaceConfiguration"] | null; - }; - }; - responses: never; - parameters: never; - requestBodies: never; - headers: never; - pathItems: never; + schemas: { + /** Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post */ + Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post: { + /** File */ + file: string; + /** Peer Id */ + peer_id: string; + /** Metadata */ + metadata?: string | null; + /** Configuration */ + configuration?: string | null; + /** Created At */ + created_at?: string | null; + }; + /** + * Conclusion + * @description Conclusion response - external view of a document. + */ + Conclusion: { + /** Id */ + id: string; + /** Content */ + content: string; + /** + * Observer Id + * @description The peer who made the conclusion + */ + observer_id: string; + /** + * Observed Id + * @description The peer the conclusion is about + */ + observed_id: string; + /** Session Id */ + session_id?: string | null; + /** + * Level + * @description Reasoning level of the conclusion: 'explicit' (directly extracted from messages) or 'deductive'/'inductive'/'contradiction' (derived during dreaming). + * @default explicit + * @enum {string} + */ + level: "explicit" | "deductive" | "inductive" | "contradiction"; + /** + * Source Ids + * @description IDs of the conclusions this one was derived from: premises for 'deductive', supporting sources for 'inductive', conflicting conclusions for 'contradiction'. None for 'explicit' conclusions. + */ + source_ids?: string[] | null; + /** + * Times Derived + * @description Number of times this conclusion has been independently derived. + * @default 1 + */ + times_derived: number; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** + * ConclusionBatchCreate + * @description Schema for batch conclusion creation with a max of 100 conclusions. + */ + ConclusionBatchCreate: { + /** Conclusions */ + conclusions: components["schemas"]["ConclusionCreate"][]; + }; + /** + * ConclusionCreate + * @description Schema for creating a single conclusion. + */ + ConclusionCreate: { + /** Content */ + content: string; + /** + * Observer Id + * @description The peer making the conclusion + */ + observer_id: string; + /** + * Observed Id + * @description The peer the conclusion is about + */ + observed_id: string; + /** + * Session Id + * @description A session ID to store the conclusion in, if specified + */ + session_id?: string | null; + }; + /** + * ConclusionGet + * @description Schema for listing conclusions with optional filters. + */ + ConclusionGet: { + /** Filters */ + filters?: { + [key: string]: unknown; + } | null; + }; + /** + * ConclusionQuery + * @description Query parameters for semantic search of conclusions. + */ + ConclusionQuery: { + /** + * Query + * @description Semantic search query + */ + query: string; + /** + * Top K + * @description Number of results to return + * @default 10 + */ + top_k: number; + /** + * Distance + * @description Maximum cosine distance threshold for results + */ + distance?: number | null; + /** + * Filters + * @description Additional filters to apply + */ + filters?: { + [key: string]: unknown; + } | null; + }; + /** DialecticOptions */ + DialecticOptions: { + /** + * Session Id + * @description ID of the session to scope the representation to + */ + session_id?: string | null; + /** + * Filters + * @description Optional filters to scope recall. This endpoint supports only the 'session_id' key: a session id, a list of session ids, or {"in": [...]}. Recall (conclusions and messages) is restricted to the allowlist; unsupported keys are rejected. When session_id is also set, it must be included in the allowlist. + */ + filters?: { + [key: string]: unknown; + } | null; + /** + * Scope + * @description Optional (unprefixed) scope name(s) to confine recall. A single scope answers from the scope's own representation of the target peer: conclusion recall is confined to what the scope observed and message recall to the scope's member sessions. A list of scopes restricts recall to the union of the scopes' member sessions (explicit allowlist, fail-closed: an empty union recalls nothing). Mutually exclusive with `filters` and `session_id`. Requires a workspace- or admin-level key. + */ + scope?: string | string[] | null; + /** + * Target + * @description Optional peer to get the representation for, from the perspective of this peer + */ + target?: string | null; + /** + * Query + * @description Dialectic API Prompt + */ + query: string; + /** + * Stream + * @default false + */ + stream: boolean; + /** + * Reasoning Level + * @description Level of reasoning to apply: minimal, low, medium, high, or max + * @default low + * @enum {string} + */ + reasoning_level: "minimal" | "low" | "medium" | "high" | "max"; + /** + * Response Format + * @description Optional JSON Schema (root type 'object') the response must conform to. When provided, `content` is a JSON string matching this schema. Only a conservative subset of JSON Schema is supported; unsupported schemas are rejected with 422. Constraint keywords (minItems, maxLength, ...) are hints to the model, not enforced server-side. + */ + response_format?: { + [key: string]: unknown; + } | null; + /** + * Include Evidence + * @description When true, the response includes an `evidence` object listing the conclusions and messages the agent read while answering, plus the tool calls it made. Evidence is collated from what the agent accessed; the model is never asked to cite anything, so evidence may over-report (accessed is not the same as used). + * @default false + */ + include_evidence: boolean; + }; + /** DreamConfiguration */ + DreamConfiguration: { + /** + * Enabled + * @description Whether to enable dream functionality. If reasoning is disabled, dreams will also be disabled and this setting will be ignored. + */ + enabled?: boolean | null; + }; + /** + * DreamType + * @description Types of dreams that can be triggered. + * @enum {string} + */ + DreamType: "omni" | "card_refresh"; + /** + * ErrorResponse + * @description The body returned for every raised HonchoException. + * + * `HTTPValidationError` is FastAPI's own 422 shape, whose `detail` is an array + * of per-field errors. Honcho's handler returns a single message string + * instead (see `honcho_exception_handler` in `src/main.py`), so error codes + * raised from application code document this schema rather than that one. + */ + ErrorResponse: { + /** + * Detail + * @description What went wrong + */ + detail: string; + }; + /** HTTPValidationError */ + HTTPValidationError: { + /** Detail */ + detail?: components["schemas"]["ValidationError"][]; + }; + /** Message */ + Message: { + /** Id */ + id: string; + /** Content */ + content: string; + /** Peer Id */ + peer_id: string; + /** Session Id */ + session_id: string; + /** Metadata */ + metadata?: { + [key: string]: unknown; + }; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** Workspace Id */ + workspace_id: string; + /** Token Count */ + token_count: number; + }; + /** + * MessageBatchCreate + * @description Schema for batch message creation with a max of 100 messages + */ + MessageBatchCreate: { + /** Messages */ + messages: components["schemas"]["MessageCreate"][]; + }; + /** + * MessageConfiguration + * @description The set of options that can be in a message DB-level configuration dictionary. + * + * All fields are optional. Message-level configuration overrides all other configurations. + */ + MessageConfiguration: { + /** @description Configuration for reasoning functionality. */ + reasoning?: components["schemas"]["ReasoningConfiguration"] | null; + }; + /** MessageCreate */ + MessageCreate: { + /** Content */ + content: string; + /** Peer Id */ + peer_id: string; + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + configuration?: components["schemas"]["MessageConfiguration"] | null; + /** Created At */ + created_at?: string | null; + }; + /** MessageGet */ + MessageGet: { + /** Filters */ + filters?: { + [key: string]: unknown; + } | null; + }; + /** MessageSearchOptions */ + MessageSearchOptions: { + /** + * Query + * @description Search query + */ + query: string; + /** + * Filters + * @description Filters to scope the search + */ + filters?: { + [key: string]: unknown; + } | null; + /** + * Limit + * @description Number of results to return + * @default 10 + */ + limit: number; + }; + /** MessageUpdate */ + MessageUpdate: { + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + }; + /** Page[Conclusion] */ + Page_Conclusion_: { + /** Items */ + items: components["schemas"]["Conclusion"][]; + /** Total */ + total: number; + /** Page */ + page: number; + /** Size */ + size: number; + /** Pages */ + pages: number; + }; + /** Page[Message] */ + Page_Message_: { + /** Items */ + items: components["schemas"]["Message"][]; + /** Total */ + total: number; + /** Page */ + page: number; + /** Size */ + size: number; + /** Pages */ + pages: number; + }; + /** Page[Peer] */ + Page_Peer_: { + /** Items */ + items: components["schemas"]["Peer"][]; + /** Total */ + total: number; + /** Page */ + page: number; + /** Size */ + size: number; + /** Pages */ + pages: number; + }; + /** Page[Scope] */ + Page_Scope_: { + /** Items */ + items: components["schemas"]["Scope"][]; + /** Total */ + total: number; + /** Page */ + page: number; + /** Size */ + size: number; + /** Pages */ + pages: number; + }; + /** Page[Session] */ + Page_Session_: { + /** Items */ + items: components["schemas"]["Session"][]; + /** Total */ + total: number; + /** Page */ + page: number; + /** Size */ + size: number; + /** Pages */ + pages: number; + }; + /** Page[WebhookEndpoint] */ + Page_WebhookEndpoint_: { + /** Items */ + items: components["schemas"]["WebhookEndpoint"][]; + /** Total */ + total: number; + /** Page */ + page: number; + /** Size */ + size: number; + /** Pages */ + pages: number; + }; + /** Page[Workspace] */ + Page_Workspace_: { + /** Items */ + items: components["schemas"]["Workspace"][]; + /** Total */ + total: number; + /** Page */ + page: number; + /** Size */ + size: number; + /** Pages */ + pages: number; + }; + /** Peer */ + Peer: { + /** Id */ + id: string; + /** Workspace Id */ + workspace_id: string; + /** + * Created At + * Format: date-time + */ + created_at: string; + /** Metadata */ + metadata?: { + [key: string]: unknown; + }; + /** Configuration */ + configuration?: { + [key: string]: unknown; + }; + }; + /** PeerCardConfiguration */ + PeerCardConfiguration: { + /** + * Use + * @description Whether to use peer card related to this peer during reasoning process. + */ + use?: boolean | null; + /** + * Create + * @description Whether to generate peer card based on content. + */ + create?: boolean | null; + }; + /** PeerCardResponse */ + PeerCardResponse: { + /** + * Peer Card + * @description The peer card content, or None if not found + */ + peer_card?: string[] | null; + }; + /** PeerCardSet */ + PeerCardSet: { + /** + * Peer Card + * @description The peer card content to set + */ + peer_card: string[]; + }; + /** + * PeerContext + * @description Context for a peer, including representation and peer card. + */ + PeerContext: { + /** + * Peer Id + * @description The ID of the peer + */ + peer_id: string; + /** + * Target Id + * @description The ID of the target peer being observed + */ + target_id: string; + /** + * Representation + * @description A curated subset of the representation of the target peer from the observer's perspective + */ + representation?: string | null; + /** + * Peer Card + * @description The peer card for the target peer from the observer's perspective + */ + peer_card?: string[] | null; + }; + /** PeerCreate */ + PeerCreate: { + /** Id */ + id: string; + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + /** Configuration */ + configuration?: { + [key: string]: unknown; + } | null; + }; + /** PeerGet */ + PeerGet: { + /** Filters */ + filters?: { + [key: string]: unknown; + } | null; + /** + * Kind + * @description Which kinds of peers to list. Omitted (default): regular peers only (scope peers are excluded). 'scope': scope peers only. 'all': every peer. + */ + kind?: ("scope" | "all") | null; + }; + /** PeerRepresentationGet */ + PeerRepresentationGet: { + /** + * Session Id + * @description Optional session ID within which to scope the representation + */ + session_id?: string | null; + /** + * Filters + * @description Optional filters to scope the representation. This endpoint supports only the 'session_id' key: a session id, a list of session ids, or {"in": [...]}. When session_id is also set, it must be included in the allowlist. + */ + filters?: { + [key: string]: unknown; + } | null; + /** + * Scope + * @description Optional (unprefixed) scope name(s) to confine the representation. A single scope reads the scope's own representation of the target peer, formed only from the scope's member sessions. A list of scopes restricts the representation to conclusions from the union of the scopes' member sessions (explicit allowlist, fail-closed: an empty union yields an empty representation). Mutually exclusive with `filters` and `session_id`. Requires a workspace- or admin-level key. + */ + scope?: string | string[] | null; + /** + * Target + * @description Optional peer ID to get the representation for, from the perspective of this peer + */ + target?: string | null; + /** + * Search Query + * @description Optional input to curate the representation around semantic search results + */ + search_query?: string | null; + /** + * Search Top K + * @description Only used if `search_query` is provided. Number of semantic-search-retrieved conclusions to include in the representation + */ + search_top_k?: number | null; + /** + * Search Max Distance + * @description Only used if `search_query` is provided. Maximum distance to search for semantically relevant conclusions + */ + search_max_distance?: number | null; + /** + * Include Most Frequent + * @description Only used if `search_query` is provided. Whether to include the most frequent conclusions in the representation + */ + include_most_frequent?: boolean | null; + /** + * Max Conclusions + * @description Only used if `search_query` is provided. Maximum number of conclusions to include in the representation + * @default 25 + */ + max_conclusions: number | null; + }; + /** PeerUpdate */ + PeerUpdate: { + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + /** Configuration */ + configuration?: { + [key: string]: unknown; + } | null; + }; + /** + * QueueStatus + * @description Aggregated processing queue status. + * + * Tracks user-facing task types only: representation, summary, and dream. + * Internal infrastructure tasks (reconciler, webhook, deletion) are excluded. + * + * Note: completed_work_units reflects items since the last periodic queue + * cleanup, not lifetime totals. + */ + QueueStatus: { + /** + * Total Work Units + * @description Total work units + */ + total_work_units: number; + /** + * Completed Work Units + * @description Completed work units (since last periodic cleanup) + */ + completed_work_units: number; + /** + * In Progress Work Units + * @description Work units currently being processed + */ + in_progress_work_units: number; + /** + * Pending Work Units + * @description Work units waiting to be processed + */ + pending_work_units: number; + /** + * Sessions + * @description Per-session status when not filtered by session + */ + sessions?: { + [key: string]: components["schemas"]["SessionQueueStatus"]; + } | null; + }; + /** ReasoningConfiguration */ + ReasoningConfiguration: { + /** + * Enabled + * @description Whether to enable reasoning functionality. + */ + enabled?: boolean | null; + /** + * Custom Instructions + * @description Optional custom instructions for the reasoning system on this workspace/session/message. Rejected if they exceed the deriver custom-instruction token cap. + */ + custom_instructions?: string | null; + }; + /** RepresentationResponse */ + RepresentationResponse: { + /** Representation */ + representation: string; + }; + /** ScheduleDreamRequest */ + ScheduleDreamRequest: { + /** + * Observer + * @description Observer peer name + */ + observer: string; + /** + * Observed + * @description Observed peer name (defaults to observer if not specified) + */ + observed?: string | null; + /** @description Type of dream to schedule */ + dream_type: components["schemas"]["DreamType"]; + /** + * Session Id + * @description Session ID to scope the dream to if specified + */ + session_id?: string | null; + /** + * Rebuild + * @description card_refresh dreams only: rebuild the peer card solely from observations currently in the collection, without injecting the existing card (use after removals) + * @default false + */ + rebuild: boolean; + }; + /** + * Scope + * @description Scope response — external view of the peer backing a scope. + * + * The ``id`` is the unprefixed scope name; the reserved peer-name prefix is + * an internal implementation detail and never surfaces here. + */ + Scope: { + /** Id */ + id: string; + /** Metadata */ + metadata?: { + [key: string]: unknown; + }; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** + * ScopeCreate + * @description Schema for creating (or getting) a scope by its unprefixed name. + */ + ScopeCreate: { + /** Id */ + id: string; + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + }; + /** + * ScopeSessionsAdd + * @description Schema for adding sessions to a scope. + */ + ScopeSessionsAdd: { + /** + * Session Ids + * @description IDs of existing sessions to add to the scope + */ + session_ids: string[]; + }; + /** + * ScopeStatus + * @description Per-session backfill/reconciliation job status for a scope. + * + * ``backfill_status`` maps each session that has had a backfill enqueued to + * its current job state: ``{state, updated_at[, docs_copied]}`` where + * ``state`` is ``pending``/``completed``/``failed`` and ``docs_copied`` is + * present once a backfill completes. + */ + ScopeStatus: { + /** Backfill Status */ + backfill_status?: { + [key: string]: { + [key: string]: unknown; + }; + }; + }; + /** Session */ + Session: { + /** Id */ + id: string; + /** Is Active */ + is_active: boolean; + /** Workspace Id */ + workspace_id: string; + /** Metadata */ + metadata?: { + [key: string]: unknown; + }; + /** Configuration */ + configuration?: { + [key: string]: unknown; + }; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** + * SessionConfiguration + * @description The set of options that can be in a session DB-level configuration dictionary. + * + * All fields are optional. Session-level configuration overrides workspace-level configuration, which overrides global configuration. + */ + SessionConfiguration: { + /** @description Configuration for reasoning functionality. */ + reasoning?: components["schemas"]["ReasoningConfiguration"] | null; + /** @description Configuration for peer card functionality. If reasoning is disabled, peer cards will also be disabled and these settings will be ignored. */ + peer_card?: components["schemas"]["PeerCardConfiguration"] | null; + /** @description Configuration for summary functionality. */ + summary?: components["schemas"]["SummaryConfiguration"] | null; + /** @description Configuration for dream functionality. If reasoning is disabled, dreams will also be disabled and these settings will be ignored. */ + dream?: components["schemas"]["DreamConfiguration"] | null; + } & { + [key: string]: unknown; + }; + /** SessionContext */ + SessionContext: { + /** Id */ + id: string; + /** Messages */ + messages: components["schemas"]["Message"][]; + /** @description The summary if available */ + summary?: components["schemas"]["Summary"] | null; + /** + * Peer Representation + * @description A curated subset of a peer representation, if context is requested from a specific perspective + */ + peer_representation?: string | null; + /** + * Peer Card + * @description The peer card, if context is requested from a specific perspective + */ + peer_card?: string[] | null; + }; + /** SessionCreate */ + SessionCreate: { + /** Id */ + id: string; + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + /** Peers */ + peers?: { + [key: string]: components["schemas"]["SessionPeerConfig"]; + } | null; + configuration?: components["schemas"]["SessionConfiguration"] | null; + /** + * Scopes + * @description Optional list of (unprefixed) scope names to add this session to. Each scope is created if it does not exist yet. If the session already has messages, its existing documents are backfilled into the scope asynchronously. + */ + scopes?: string[] | null; + }; + /** SessionGet */ + SessionGet: { + /** Filters */ + filters?: { + [key: string]: unknown; + } | null; + }; + /** SessionPeerConfig */ + SessionPeerConfig: { + /** + * Observe Me + * @description Whether Honcho will use reasoning to form a representation of this peer + */ + observe_me?: boolean | null; + /** + * Observe Others + * @description Whether this peer should form a session-level theory-of-mind representation of other peers in the session + */ + observe_others?: boolean | null; + }; + /** + * SessionQueueStatus + * @description Status for a specific session within the processing queue. + */ + SessionQueueStatus: { + /** + * Session Id + * @description Session ID if filtered by session + */ + session_id?: string | null; + /** + * Total Work Units + * @description Total work units + */ + total_work_units: number; + /** + * Completed Work Units + * @description Completed work units + */ + completed_work_units: number; + /** + * In Progress Work Units + * @description Work units currently being processed + */ + in_progress_work_units: number; + /** + * Pending Work Units + * @description Work units waiting to be processed + */ + pending_work_units: number; + }; + /** SessionSummaries */ + SessionSummaries: { + /** Id */ + id: string; + /** @description The short summary if available */ + short_summary?: components["schemas"]["Summary"] | null; + /** @description The long summary if available */ + long_summary?: components["schemas"]["Summary"] | null; + }; + /** SessionUpdate */ + SessionUpdate: { + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + configuration?: components["schemas"]["SessionConfiguration"] | null; + }; + /** Summary */ + Summary: { + /** + * Content + * @description The summary text + */ + content: string; + /** + * Message Id + * @description The public ID of the message that this summary covers up to + */ + message_id: string; + /** + * Summary Type + * @description The type of summary (short or long) + */ + summary_type: string; + /** + * Created At + * @description The timestamp of when the summary was created (ISO format) + */ + created_at: string; + /** + * Token Count + * @description The number of tokens in the summary text + */ + token_count: number; + }; + /** SummaryConfiguration */ + SummaryConfiguration: { + /** + * Enabled + * @description Whether to enable summary functionality. + */ + enabled?: boolean | null; + /** + * Messages Per Short Summary + * @description Number of messages per short summary. Must be positive, greater than or equal to 10, and less than messages_per_long_summary. + */ + messages_per_short_summary?: number | null; + /** + * Messages Per Long Summary + * @description Number of messages per long summary. Must be positive, greater than or equal to 20, and greater than messages_per_short_summary. + */ + messages_per_long_summary?: number | null; + }; + /** ValidationError */ + ValidationError: { + /** Location */ + loc: (string | number)[]; + /** Message */ + msg: string; + /** Error Type */ + type: string; + /** Input */ + input?: unknown; + /** Context */ + ctx?: Record; + }; + /** WebhookEndpoint */ + WebhookEndpoint: { + /** Id */ + id: string; + /** Workspace Id */ + workspace_id: string | null; + /** Url */ + url: string; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** WebhookEndpointCreate */ + WebhookEndpointCreate: { + /** Url */ + url: string; + }; + /** Workspace */ + Workspace: { + /** Id */ + id: string; + /** Metadata */ + metadata?: { + [key: string]: unknown; + }; + /** Configuration */ + configuration?: { + [key: string]: unknown; + }; + /** + * Created At + * Format: date-time + */ + created_at: string; + }; + /** + * WorkspaceChatOptions + * @description Options for workspace-level chat (no anchor peer; see DialecticOptions). + */ + WorkspaceChatOptions: { + /** + * Session Id + * @description Optional session to scope message tools to + */ + session_id?: string | null; + /** + * Query + * @description Workspace chat prompt + */ + query: string; + /** + * Stream + * @default false + */ + stream: boolean; + /** + * Reasoning Level + * @description Level of reasoning to apply: minimal, low, medium, high, or max + * @default low + * @enum {string} + */ + reasoning_level: "minimal" | "low" | "medium" | "high" | "max"; + /** + * Response Format + * @description Optional JSON Schema (root type 'object') the response must conform to. When provided, `content` is a JSON string matching this schema. + */ + response_format?: { + [key: string]: unknown; + } | null; + /** + * Scope + * @description Optional (unprefixed) scope name(s) restricting recall to the union of the scopes' member sessions (explicit allowlist, fail-closed: an empty union recalls nothing). Mutually exclusive with `session_id`. Requires a workspace- or admin-level key. + */ + scope?: string | string[] | null; + /** + * Include Evidence + * @description When true, the response includes an `evidence` object listing the conclusions and messages the agent read while answering, plus the tool calls it made. Evidence is collated from what the agent accessed; the model is never asked to cite anything, so evidence may over-report (accessed is not the same as used). + * @default false + */ + include_evidence: boolean; + }; + /** + * WorkspaceConfiguration + * @description The set of options that can be in a workspace DB-level configuration dictionary. + * + * All fields are optional. Session-level configuration overrides workspace-level configuration, which overrides global configuration. + */ + WorkspaceConfiguration: { + /** @description Configuration for reasoning functionality. */ + reasoning?: components["schemas"]["ReasoningConfiguration"] | null; + /** @description Configuration for peer card functionality. If reasoning is disabled, peer cards will also be disabled and these settings will be ignored. */ + peer_card?: components["schemas"]["PeerCardConfiguration"] | null; + /** @description Configuration for summary functionality. */ + summary?: components["schemas"]["SummaryConfiguration"] | null; + /** @description Configuration for dream functionality. If reasoning is disabled, dreams will also be disabled and these settings will be ignored. */ + dream?: components["schemas"]["DreamConfiguration"] | null; + } & { + [key: string]: unknown; + }; + /** WorkspaceCreate */ + WorkspaceCreate: { + /** Id */ + id: string; + /** + * Metadata + * @default {} + */ + metadata: { + [key: string]: unknown; + }; + configuration?: components["schemas"]["WorkspaceConfiguration"]; + }; + /** WorkspaceGet */ + WorkspaceGet: { + /** Filters */ + filters?: { + [key: string]: unknown; + } | null; + }; + /** + * WorkspaceMessageSearchOptions + * @description Workspace-level message search options, extended with `scope`. + */ + WorkspaceMessageSearchOptions: { + /** + * Query + * @description Search query + */ + query: string; + /** + * Filters + * @description Filters to scope the search + */ + filters?: { + [key: string]: unknown; + } | null; + /** + * Limit + * @description Number of results to return + * @default 10 + */ + limit: number; + /** + * Scope + * @description Optional (unprefixed) scope name restricting search to the scope's member sessions. A scope with no member sessions returns no results. Mutually exclusive with a 'session_id' key in `filters`. + */ + scope?: string | null; + }; + /** WorkspaceUpdate */ + WorkspaceUpdate: { + /** Metadata */ + metadata?: { + [key: string]: unknown; + } | null; + configuration?: components["schemas"]["WorkspaceConfiguration"] | null; + }; + /** + * Evidence + * @description What the dialectic agent read and did while answering. + * + * Collated from the agent's own reads rather than reported by the model, so + * it is deterministic but over-reports: it lists what the agent accessed, + * which is not necessarily what the answer relied on. + * + * Meant for auditing and analytics -- inspecting why an answer looks the way + * it does, or measuring what recall actually reaches the agent. It is not a + * read API: conclusions carry their text because that text is the thing being + * audited and the deriver keeps it short, while messages carry identity alone + * (see `EvidenceMessageRef`). + */ + Evidence: { + /** + * Conclusions + * @description Conclusions the agent read, whether prefetched or found via its tools + */ + conclusions?: components["schemas"]["EvidenceObservation"][]; + /** + * Messages + * @description Messages the agent read via its search and grep tools, by ID and provenance only. Fetch a message to read its content. + */ + messages?: components["schemas"]["EvidenceMessageRef"][]; + /** + * Tool Calls + * @description Tools the agent invoked, in order, with their arguments. Results are omitted (they are reflected in `conclusions` and `messages`), and so are calls that failed, so this is a record of successful invocations rather than a complete reasoning trace. + */ + tool_calls?: components["schemas"]["EvidenceToolCall"][]; + /** + * Reasoning Trace Id + * @description ID of the stored reasoning trace for this call, when trace storage is enabled + */ + reasoning_trace_id?: string | null; + }; + /** + * EvidenceMessageRef + * @description A message the dialectic agent read while answering. + * + * Identity and provenance only -- no content. Message content is + * caller-supplied and unbounded, so carrying it would let one answer drag + * megabytes behind it, and would invite callers to read messages out of + * evidence in bulk rather than asking for the ones they want. Fetch the + * message by `id` when the text is needed. + */ + EvidenceMessageRef: { + /** + * Id + * @description Message ID + */ + id: string; + /** + * Session Id + * @description Session the message belongs to + */ + session_id: string; + /** + * Peer Id + * @description Peer who sent the message + */ + peer_id: string; + /** + * Created At + * Format: date-time + * @description When the message was sent + */ + created_at: string; + }; + /** + * EvidenceObservation + * @description A conclusion the dialectic agent read while answering. + */ + EvidenceObservation: { + /** + * Id + * @description Conclusion (document) ID + */ + id: string; + /** + * Level + * @description Conclusion level: explicit, deductive, inductive, or contradiction + * @enum {string} + */ + level: "explicit" | "deductive" | "inductive" | "contradiction"; + /** + * Content + * @description The conclusion text (the derived conclusion, for non-explicit levels) + */ + content: string; + /** + * Created At + * Format: date-time + * @description When the conclusion was derived, from its source messages when known + */ + created_at: string; + /** + * Session Id + * @description Session the conclusion is scoped to, if any + */ + session_id?: string | null; + /** + * Source Ids + * @description IDs of the conclusions this one was derived from. Empty for explicit conclusions, which derive from messages rather than from other conclusions. + */ + source_ids?: string[]; + }; + /** + * EvidenceToolCall + * @description A tool the dialectic agent invoked while answering. + */ + EvidenceToolCall: { + /** + * Tool Name + * @description Name of the tool + */ + tool_name: string; + /** + * Tool Input + * @description Arguments the agent passed to the tool + */ + tool_input?: { + [key: string]: unknown; + }; + }; + }; + responses: never; + parameters: never; + requestBodies: never; + headers: never; + pathItems: never; } export type $defs = Record; export interface operations { - get_or_create_workspace_v3_workspaces_post: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["WorkspaceCreate"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Workspace"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_all_workspaces_v3_workspaces_list_post: { - parameters: { - query?: { - /** @description Page number */ - page?: number; - /** @description Page size */ - size?: number; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["WorkspaceGet"] | null; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Page_Workspace_"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - update_workspace_v3_workspaces__workspace_id__put: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["WorkspaceUpdate"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Workspace"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - delete_workspace_v3_workspaces__workspace_id__delete: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 202: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - search_workspace_v3_workspaces__workspace_id__search_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["MessageSearchOptions"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Message"][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_queue_status_v3_workspaces__workspace_id__queue_status_get: { - parameters: { - query?: { - /** @description Optional observer ID to filter by */ - observer_id?: string | null; - /** @description Optional sender ID to filter by */ - sender_id?: string | null; - /** @description Optional session ID to filter by */ - session_id?: string | null; - }; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["QueueStatus"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - schedule_dream_v3_workspaces__workspace_id__schedule_dream_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ScheduleDreamRequest"]; - }; - }; - responses: { - /** @description Successful Response */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_peers_v3_workspaces__workspace_id__peers_list_post: { - parameters: { - query?: { - /** @description Page number */ - page?: number; - /** @description Page size */ - size?: number; - }; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["PeerGet"] | null; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Page_Peer_"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_or_create_peer_v3_workspaces__workspace_id__peers_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["PeerCreate"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Peer"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - update_peer_v3_workspaces__workspace_id__peers__peer_id__put: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - peer_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["PeerUpdate"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Peer"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_sessions_for_peer_v3_workspaces__workspace_id__peers__peer_id__sessions_post: { - parameters: { - query?: { - /** @description Page number */ - page?: number; - /** @description Page size */ - size?: number; - }; - header?: never; - path: { - workspace_id: string; - peer_id: string; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SessionGet"] | null; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Page_Session_"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - chat_v3_workspaces__workspace_id__peers__peer_id__chat_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - peer_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["DialecticOptions"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": { - /** Content */ - content: string | null; - }; - "text/event-stream": unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_representation_v3_workspaces__workspace_id__peers__peer_id__representation_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - peer_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["PeerRepresentationGet"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["RepresentationResponse"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_get: { - parameters: { - query?: { - /** @description Optional target peer to retrieve a card for, from the observer's perspective. If not provided, returns the observer's own card */ - target?: string | null; - }; - header?: never; - path: { - workspace_id: string; - /** @description ID of the observer peer */ - peer_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PeerCardResponse"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - set_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_put: { - parameters: { - query?: { - /** @description Optional target peer to set a card for, from the observer's perspective. If not provided, sets the observer's own card */ - target?: string | null; - }; - header?: never; - path: { - workspace_id: string; - /** @description ID of the observer peer */ - peer_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["PeerCardSet"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PeerCardResponse"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_peer_context_v3_workspaces__workspace_id__peers__peer_id__context_get: { - parameters: { - query?: { - /** @description Optional target peer to get context for, from the observer's perspective. If not provided, returns the observer's own context (self-observation) */ - target?: string | null; - /** @description Optional query to curate the representation around semantic search results */ - search_query?: string | null; - /** @description Only used if `search_query` is provided. Number of semantic-search-retrieved conclusions to include */ - search_top_k?: number | null; - /** @description Only used if `search_query` is provided. Maximum distance for semantically relevant conclusions */ - search_max_distance?: number | null; - /** @description Whether to include the most frequent conclusions in the representation */ - include_most_frequent?: boolean; - /** @description Maximum number of conclusions to include in the representation */ - max_conclusions?: number | null; - }; - header?: never; - path: { - workspace_id: string; - /** @description ID of the observer peer */ - peer_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["PeerContext"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - search_peer_v3_workspaces__workspace_id__peers__peer_id__search_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - peer_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["MessageSearchOptions"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Message"][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_sessions_v3_workspaces__workspace_id__sessions_list_post: { - parameters: { - query?: { - /** @description Page number */ - page?: number; - /** @description Page size */ - size?: number; - }; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["SessionGet"] | null; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Page_Session_"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_or_create_session_v3_workspaces__workspace_id__sessions_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SessionCreate"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Session"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - update_session_v3_workspaces__workspace_id__sessions__session_id__put: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SessionUpdate"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Session"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - delete_session_v3_workspaces__workspace_id__sessions__session_id__delete: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 202: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - clone_session_v3_workspaces__workspace_id__sessions__session_id__clone_post: { - parameters: { - query?: { - /** @description Message ID to cut off the clone at */ - message_id?: string | null; - }; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Session"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_get: { - parameters: { - query?: { - /** @description Page number */ - page?: number; - /** @description Page size */ - size?: number; - }; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Page_Peer_"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - set_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_put: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - [key: string]: components["schemas"]["SessionPeerConfig"]; - }; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Session"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - add_peers_to_session_v3_workspaces__workspace_id__sessions__session_id__peers_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": { - [key: string]: components["schemas"]["SessionPeerConfig"]; - }; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Session"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - remove_peers_from_session_v3_workspaces__workspace_id__sessions__session_id__peers_delete: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": string[]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Session"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_get: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - peer_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SessionPeerConfig"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - set_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_put: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - peer_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["SessionPeerConfig"]; - }; - }; - responses: { - /** @description Successful Response */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_session_context_v3_workspaces__workspace_id__sessions__session_id__context_get: { - parameters: { - query?: { - /** @description Number of tokens to use for the context. Includes summary if set to true. Includes representation and peer card if they are included in the response. If not provided, the context will be exhaustive (within 100000 tokens) */ - tokens?: number | null; - /** @description A query string used to fetch semantically relevant conclusions */ - search_query?: string | null; - /** @description Whether or not to include a summary *if* one is available for the session */ - summary?: boolean; - /** @description The target of the perspective. If given without `peer_perspective`, will get the Honcho-level representation and peer card for this peer. If given with `peer_perspective`, will get the representation and card for this peer *from the perspective of that peer*. */ - peer_target?: string | null; - /** @description A peer to get context for. If given, response will attempt to include representation and card from the perspective of that peer. Must be provided with `peer_target`. */ - peer_perspective?: string | null; - /** @description Only used if `search_query` is provided. Whether to limit the representation to the session (as opposed to everything known about the target peer) */ - limit_to_session?: boolean; - /** @description Only used if `search_query` is provided. The number of semantic-search-retrieved conclusions to include in the representation */ - search_top_k?: number | null; - /** @description Only used if `search_query` is provided. The maximum distance to search for semantically relevant conclusions */ - search_max_distance?: number | null; - /** @description Only used if `search_query` is provided. Whether to include the most frequent conclusions in the representation */ - include_most_frequent?: boolean; - /** @description Only used if `search_query` is provided. The maximum number of conclusions to include in the representation */ - max_conclusions?: number | null; - }; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SessionContext"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_session_summaries_v3_workspaces__workspace_id__sessions__session_id__summaries_get: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["SessionSummaries"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - search_session_v3_workspaces__workspace_id__sessions__session_id__search_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["MessageSearchOptions"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Message"][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - create_messages_for_session_v3_workspaces__workspace_id__sessions__session_id__messages_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["MessageBatchCreate"]; - }; - }; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Message"][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "multipart/form-data": components["schemas"]["Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post"]; - }; - }; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Message"][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_messages_v3_workspaces__workspace_id__sessions__session_id__messages_list_post: { - parameters: { - query?: { - /** @description Whether to reverse the order of results */ - reverse?: boolean | null; - /** @description Page number */ - page?: number; - /** @description Page size */ - size?: number; - }; - header?: never; - path: { - workspace_id: string; - session_id: string; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["MessageGet"] | null; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Page_Message_"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__get: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - message_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Message"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - update_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__put: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - session_id: string; - message_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["MessageUpdate"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Message"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - create_conclusions_v3_workspaces__workspace_id__conclusions_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ConclusionBatchCreate"]; - }; - }; - responses: { - /** @description Successful Response */ - 201: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Conclusion"][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - list_conclusions_v3_workspaces__workspace_id__conclusions_list_post: { - parameters: { - query?: { - /** @description Whether to reverse the order of results */ - reverse?: boolean | null; - /** @description Page number */ - page?: number; - /** @description Page size */ - size?: number; - }; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody?: { - content: { - "application/json": components["schemas"]["ConclusionGet"] | null; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Page_Conclusion_"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - query_conclusions_v3_workspaces__workspace_id__conclusions_query_post: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["ConclusionQuery"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Conclusion"][]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - delete_conclusion_v3_workspaces__workspace_id__conclusions__conclusion_id__delete: { - parameters: { - query?: never; - header?: never; - path: { - workspace_id: string; - conclusion_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - create_key_v3_keys_post: { - parameters: { - query?: { - /** @description ID of the workspace to scope the key to */ - workspace_id?: string | null; - /** @description ID of the peer to scope the key to */ - peer_id?: string | null; - /** @description ID of the session to scope the key to */ - session_id?: string | null; - expires_at?: string | null; - }; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - list_webhook_endpoints_v3_workspaces__workspace_id__webhooks_get: { - parameters: { - query?: { - /** @description Page number */ - page?: number; - /** @description Page size */ - size?: number; - }; - header?: never; - path: { - /** @description Workspace ID */ - workspace_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["Page_WebhookEndpoint_"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - get_or_create_webhook_endpoint_v3_workspaces__workspace_id__webhooks_post: { - parameters: { - query?: never; - header?: never; - path: { - /** @description Workspace ID */ - workspace_id: string; - }; - cookie?: never; - }; - requestBody: { - content: { - "application/json": components["schemas"]["WebhookEndpointCreate"]; - }; - }; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["WebhookEndpoint"]; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - delete_webhook_endpoint_v3_workspaces__workspace_id__webhooks__endpoint_id__delete: { - parameters: { - query?: never; - header?: never; - path: { - /** @description Workspace ID */ - workspace_id: string; - /** @description Webhook endpoint ID */ - endpoint_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 204: { - headers: { - [name: string]: unknown; - }; - content?: never; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; - test_emit_v3_workspaces__workspace_id__webhooks_test_get: { - parameters: { - query?: never; - header?: never; - path: { - /** @description Workspace ID */ - workspace_id: string; - }; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": unknown; - }; - }; - /** @description Validation Error */ - 422: { - headers: { - [name: string]: unknown; - }; - content: { - "application/json": components["schemas"]["HTTPValidationError"]; - }; - }; - }; - }; + get_or_create_workspace_v3_workspaces_post: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["WorkspaceCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Workspace"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_all_workspaces_v3_workspaces_list_post: { + parameters: { + query?: { + /** @description Whether to reverse the order of results */ + reverse?: boolean; + /** @description Page number */ + page?: number; + /** @description Page size */ + size?: number; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["WorkspaceGet"] | null; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Page_Workspace_"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + update_workspace_v3_workspaces__workspace_id__put: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["WorkspaceUpdate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Workspace"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + delete_workspace_v3_workspaces__workspace_id__delete: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + search_workspace_v3_workspaces__workspace_id__search_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["WorkspaceMessageSearchOptions"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Message"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_queue_status_v3_workspaces__workspace_id__queue_status_get: { + parameters: { + query?: { + /** @description Optional observer ID to filter by */ + observer_id?: string | null; + /** @description Optional sender ID to filter by */ + sender_id?: string | null; + /** @description Optional session ID to filter by */ + session_id?: string | null; + }; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["QueueStatus"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + schedule_dream_v3_workspaces__workspace_id__schedule_dream_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ScheduleDreamRequest"]; + }; + }; + responses: { + /** @description Successful Response */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + chat_v3_workspaces__workspace_id__chat_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["WorkspaceChatOptions"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Content */ + content: string | null; + /** @description What the answer was built from. Present only when `include_evidence` is true. */ + evidence?: components["schemas"]["Evidence"] | null; + }; + "text/event-stream": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_peers_v3_workspaces__workspace_id__peers_list_post: { + parameters: { + query?: { + /** @description Whether to reverse the order of results */ + reverse?: boolean; + /** @description Page number */ + page?: number; + /** @description Page size */ + size?: number; + }; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["PeerGet"] | null; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Page_Peer_"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_or_create_peer_v3_workspaces__workspace_id__peers_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["PeerCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Peer"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + update_peer_v3_workspaces__workspace_id__peers__peer_id__put: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + peer_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["PeerUpdate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Peer"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_sessions_for_peer_v3_workspaces__workspace_id__peers__peer_id__sessions_post: { + parameters: { + query?: { + /** @description Whether to reverse the order of results */ + reverse?: boolean; + /** @description Page number */ + page?: number; + /** @description Page size */ + size?: number; + }; + header?: never; + path: { + workspace_id: string; + peer_id: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SessionGet"] | null; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Page_Session_"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + chat_v3_workspaces__workspace_id__peers__peer_id__chat_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + peer_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DialecticOptions"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** Content */ + content: string | null; + /** @description What the answer was built from. Present only when `include_evidence` is true. */ + evidence?: components["schemas"]["Evidence"] | null; + }; + "text/event-stream": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_representation_v3_workspaces__workspace_id__peers__peer_id__representation_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + peer_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["PeerRepresentationGet"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["RepresentationResponse"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_get: { + parameters: { + query?: { + /** @description Optional target peer to retrieve a card for, from the observer's perspective. If not provided, returns the observer's own card */ + target?: string | null; + }; + header?: never; + path: { + workspace_id: string; + /** @description ID of the observer peer */ + peer_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PeerCardResponse"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + set_peer_card_v3_workspaces__workspace_id__peers__peer_id__card_put: { + parameters: { + query?: { + /** @description Optional target peer to set a card for, from the observer's perspective. If not provided, sets the observer's own card */ + target?: string | null; + }; + header?: never; + path: { + workspace_id: string; + /** @description ID of the observer peer */ + peer_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["PeerCardSet"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PeerCardResponse"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_peer_context_v3_workspaces__workspace_id__peers__peer_id__context_get: { + parameters: { + query?: { + /** @description Optional target peer to get context for, from the observer's perspective. If not provided, returns the observer's own context (self-observation) */ + target?: string | null; + /** @description Optional query to curate the representation around semantic search results */ + search_query?: string | null; + /** @description Only used if `search_query` is provided. Number of semantic-search-retrieved conclusions to include */ + search_top_k?: number | null; + /** @description Only used if `search_query` is provided. Maximum distance for semantically relevant conclusions */ + search_max_distance?: number | null; + /** @description Whether to include the most frequent conclusions in the representation */ + include_most_frequent?: boolean; + /** @description Maximum number of conclusions to include in the representation */ + max_conclusions?: number | null; + }; + header?: never; + path: { + workspace_id: string; + /** @description ID of the observer peer */ + peer_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["PeerContext"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + search_peer_v3_workspaces__workspace_id__peers__peer_id__search_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + peer_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["MessageSearchOptions"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Message"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_sessions_v3_workspaces__workspace_id__sessions_list_post: { + parameters: { + query?: { + /** @description Whether to reverse the order of results */ + reverse?: boolean; + /** @description Page number */ + page?: number; + /** @description Page size */ + size?: number; + }; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SessionGet"] | null; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Page_Session_"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_or_create_session_v3_workspaces__workspace_id__sessions_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["SessionCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Session"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + update_session_v3_workspaces__workspace_id__sessions__session_id__put: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["SessionUpdate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Session"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + delete_session_v3_workspaces__workspace_id__sessions__session_id__delete: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 202: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + clone_session_v3_workspaces__workspace_id__sessions__session_id__clone_post: { + parameters: { + query?: { + /** @description Message ID to cut off the clone at */ + message_id?: string | null; + }; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Session"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_get: { + parameters: { + query?: { + /** @description Page number */ + page?: number; + /** @description Page size */ + size?: number; + }; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Page_Peer_"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + set_session_peers_v3_workspaces__workspace_id__sessions__session_id__peers_put: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + [key: string]: components["schemas"]["SessionPeerConfig"]; + }; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Session"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + add_peers_to_session_v3_workspaces__workspace_id__sessions__session_id__peers_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": { + [key: string]: components["schemas"]["SessionPeerConfig"]; + }; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Session"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + remove_peers_from_session_v3_workspaces__workspace_id__sessions__session_id__peers_delete: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": string[]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Session"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_get: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + peer_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SessionPeerConfig"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + set_peer_config_v3_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_put: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + peer_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["SessionPeerConfig"]; + }; + }; + responses: { + /** @description Successful Response */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_session_context_v3_workspaces__workspace_id__sessions__session_id__context_get: { + parameters: { + query?: { + /** @description Number of tokens to use for the context. Includes summary if set to true. Includes representation and peer card if they are included in the response. If not provided, the context will be exhaustive (within 100000 tokens) */ + tokens?: number | null; + /** @description A query string used to fetch semantically relevant conclusions */ + search_query?: string | null; + /** @description Whether or not to include a summary *if* one is available for the session */ + summary?: boolean; + /** @description The target of the perspective. If given without `peer_perspective`, will get the Honcho-level representation and peer card for this peer. If given with `peer_perspective`, will get the representation and card for this peer *from the perspective of that peer*. */ + peer_target?: string | null; + /** @description A peer to get context for. If given, response will attempt to include representation and card from the perspective of that peer. Must be provided with `peer_target`. */ + peer_perspective?: string | null; + /** @description An (unprefixed) scope name to use as the perspective source: the representation and peer card of `peer_target` are read from the scope's observations instead of the global (or `peer_perspective`) view. Must be provided with `peer_target`; mutually exclusive with `peer_perspective`. Requires a workspace- or admin-level key. */ + scope?: string | null; + /** @description Optional allowlist of session IDs confining the representation of `peer_target` to those sessions. This session must be one of them. Recall is restricted to conclusions stated directly in the allowed sessions — conclusions synthesized across sessions are excluded, since their provenance cannot be proven to sit inside the allowlist — and the peer card is omitted for the same reason. Mutually exclusive with `scope` and `limit_to_session`. A peer-scoped key must be an active member of every session named. The 1,000-session cap shared with the recall endpoints applies but is not reachable here: these are repeated query parameters, so a long list exceeds the request-line limit of the server or any proxy in front of it (a 414/431, not a 422) at a few hundred entries. Use a named `scope` for large or reusable session sets. */ + sessions?: string[] | null; + /** @description Whether to limit the representation to the session (as opposed to everything known about the target peer). Narrows recall the same way `sessions` does, so the same restrictions apply: explicit-only conclusions, and the peer card is omitted because it carries no per-session provenance. */ + limit_to_session?: boolean; + /** @description Only used if `search_query` is provided. The number of semantic-search-retrieved conclusions to include in the representation */ + search_top_k?: number | null; + /** @description Only used if `search_query` is provided. The maximum distance to search for semantically relevant conclusions */ + search_max_distance?: number | null; + /** @description Only used if `search_query` is provided. Whether to include the most frequent conclusions in the representation */ + include_most_frequent?: boolean; + /** @description Only used if `search_query` is provided. The maximum number of conclusions to include in the representation */ + max_conclusions?: number | null; + }; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SessionContext"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_session_summaries_v3_workspaces__workspace_id__sessions__session_id__summaries_get: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["SessionSummaries"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + search_session_v3_workspaces__workspace_id__sessions__session_id__search_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["MessageSearchOptions"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Message"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_or_create_scope_v3_workspaces__workspace_id__scopes_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ScopeCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Scope"]; + }; + }; + /** @description Scope created */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Scope"]; + }; + }; + /** @description A peer already occupies the scope's reserved name */ + 409: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_scopes_v3_workspaces__workspace_id__scopes_list_post: { + parameters: { + query?: { + /** @description Whether to reverse the order of results */ + reverse?: boolean; + /** @description Page number */ + page?: number; + /** @description Page size */ + size?: number; + }; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Page_Scope_"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_scope_v3_workspaces__workspace_id__scopes__scope_id__get: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + scope_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Scope"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + add_sessions_to_scope_v3_workspaces__workspace_id__scopes__scope_id__sessions_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + scope_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ScopeSessionsAdd"]; + }; + }; + responses: { + /** @description Successful Response */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + remove_session_from_scope_v3_workspaces__workspace_id__scopes__scope_id__sessions__session_id__delete: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + scope_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_scope_sessions_v3_workspaces__workspace_id__scopes__scope_id__sessions_list_post: { + parameters: { + query?: { + /** @description Whether to reverse the order of results */ + reverse?: boolean; + /** @description Page number */ + page?: number; + /** @description Page size */ + size?: number; + }; + header?: never; + path: { + workspace_id: string; + scope_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Page_Session_"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_scope_status_v3_workspaces__workspace_id__scopes__scope_id__status_get: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + scope_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ScopeStatus"]; + }; + }; + /** @description Scope does not exist */ + 404: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + create_messages_for_session_v3_workspaces__workspace_id__sessions__session_id__messages_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["MessageBatchCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Message"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "multipart/form-data": components["schemas"]["Body_create_messages_with_file_v3_workspaces__workspace_id__sessions__session_id__messages_upload_post"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Message"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_messages_v3_workspaces__workspace_id__sessions__session_id__messages_list_post: { + parameters: { + query?: { + /** @description Whether to reverse the order of results */ + reverse?: boolean | null; + /** @description Page number */ + page?: number; + /** @description Page size */ + size?: number; + }; + header?: never; + path: { + workspace_id: string; + session_id: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["MessageGet"] | null; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Page_Message_"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__get: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + message_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Message"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + update_message_v3_workspaces__workspace_id__sessions__session_id__messages__message_id__put: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + session_id: string; + message_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["MessageUpdate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Message"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + create_conclusions_v3_workspaces__workspace_id__conclusions_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ConclusionBatchCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 201: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Conclusion"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_conclusions_v3_workspaces__workspace_id__conclusions_list_post: { + parameters: { + query?: { + /** @description Whether to reverse the order of results */ + reverse?: boolean | null; + /** @description Page number */ + page?: number; + /** @description Page size */ + size?: number; + }; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["ConclusionGet"] | null; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Page_Conclusion_"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + query_conclusions_v3_workspaces__workspace_id__conclusions_query_post: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["ConclusionQuery"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Conclusion"][]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_conclusion_v3_workspaces__workspace_id__conclusions__conclusion_id__get: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + conclusion_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Conclusion"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + delete_conclusion_v3_workspaces__workspace_id__conclusions__conclusion_id__delete: { + parameters: { + query?: never; + header?: never; + path: { + workspace_id: string; + conclusion_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + create_key_v3_keys_post: { + parameters: { + query?: { + /** @description ID of the workspace to scope the key to */ + workspace_id?: string | null; + /** @description ID of the peer to scope the key to */ + peer_id?: string | null; + /** @description ID of the session to scope the key to */ + session_id?: string | null; + expires_at?: string | null; + }; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + list_webhook_endpoints_v3_workspaces__workspace_id__webhooks_get: { + parameters: { + query?: { + /** @description Page number */ + page?: number; + /** @description Page size */ + size?: number; + }; + header?: never; + path: { + /** @description Workspace ID */ + workspace_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["Page_WebhookEndpoint_"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + get_or_create_webhook_endpoint_v3_workspaces__workspace_id__webhooks_post: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Workspace ID */ + workspace_id: string; + }; + cookie?: never; + }; + requestBody: { + content: { + "application/json": components["schemas"]["WebhookEndpointCreate"]; + }; + }; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["WebhookEndpoint"]; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + delete_webhook_endpoint_v3_workspaces__workspace_id__webhooks__endpoint_id__delete: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Workspace ID */ + workspace_id: string; + /** @description Webhook endpoint ID */ + endpoint_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 204: { + headers: { + [name: string]: unknown; + }; + content?: never; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + test_emit_v3_workspaces__workspace_id__webhooks_test_get: { + parameters: { + query?: never; + header?: never; + path: { + /** @description Workspace ID */ + workspace_id: string; + }; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + /** @description Validation Error */ + 422: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": components["schemas"]["HTTPValidationError"]; + }; + }; + }; + }; + health_check_health_get: { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: never; + responses: { + /** @description Successful Response */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": unknown; + }; + }; + }; + }; } diff --git a/packages/web/src/components/dreams/DreamDetail.tsx b/packages/web/src/components/dreams/DreamDetail.tsx index db5a027..ffca858 100644 --- a/packages/web/src/components/dreams/DreamDetail.tsx +++ b/packages/web/src/components/dreams/DreamDetail.tsx @@ -13,6 +13,7 @@ import { dreamCounts, type ExtendedConclusion, expandPremiseTree, + hasPremiseTree, inferConclusionType, type PremiseNode, } from "@/lib/dreams"; @@ -43,13 +44,20 @@ const COLUMNS: Array<{ type: ConclusionType; label: string; description: string interface DreamDetailProps { dream: Dream; + /** Workspace-wide conclusion index so `source_ids` can resolve across dreams. */ + workspaceIndex: Map; onClose: () => void; } -export function DreamDetail({ dream, onClose }: DreamDetailProps) { +export function DreamDetail({ dream, workspaceIndex, onClose }: DreamDetailProps) { const { mask } = useDemo(); const counts = useMemo(() => dreamCounts(dream), [dream]); - const index = useMemo(() => buildPremiseIndex(dream.conclusions), [dream]); + // Prefer the workspace-wide index; fall back to dream-local so demo data and + // partial loads still resolve within their own dream. + const index = useMemo( + () => (workspaceIndex.size > 0 ? workspaceIndex : buildPremiseIndex(dream.conclusions)), + [dream, workspaceIndex], + ); const grouped = useMemo(() => { const buckets: Record = { @@ -190,10 +198,7 @@ function ConclusionCard({ conclusion, index, expandable }: ConclusionCardProps) () => (open ? expandPremiseTree(conclusion.id, index) : null), [open, conclusion.id, index], ); - const hasPremises = Boolean( - (conclusion.reasoning_tree?.premises?.length ?? 0) > 0 || - (conclusion.premises?.length ?? 0) > 0, - ); + const hasPremises = hasPremiseTree(conclusion); return (
>(() => { + const conclusions = (data as ExtendedConclusion[] | undefined) ?? []; + return buildPremiseIndex(conclusions); + }, [data]); + const selected = useMemo( () => (selectedId ? (dreams.find((d) => d.id === selectedId) ?? null) : null), [dreams, selectedId], @@ -90,7 +98,11 @@ export function DreamList() { transition={{ duration: 0.22, ease: "easeInOut" }} className="overflow-hidden mb-6" > - setSelectedId(null)} /> + setSelectedId(null)} + /> )} diff --git a/packages/web/src/components/playground/DialecticPlayground.tsx b/packages/web/src/components/playground/DialecticPlayground.tsx index 24b059f..a7184a2 100644 --- a/packages/web/src/components/playground/DialecticPlayground.tsx +++ b/packages/web/src/components/playground/DialecticPlayground.tsx @@ -110,7 +110,7 @@ export function DialecticPlayground() { "/v3/workspaces/{workspace_id}/peers/{peer_id}/chat", { params: { path: { workspace_id: workspaceId, peer_id: peerId } }, - body: { query: q, stream: false, reasoning_level: level }, + body: { query: q, stream: false, reasoning_level: level, include_evidence: false }, }, ); if (error) { diff --git a/packages/web/src/lib/dreams.ts b/packages/web/src/lib/dreams.ts index ec7e408..d413840 100644 --- a/packages/web/src/lib/dreams.ts +++ b/packages/web/src/lib/dreams.ts @@ -11,13 +11,16 @@ export const CONCLUSION_TYPES: readonly ConclusionType[] = [ "contradiction", ] as const; -// The generated OpenAPI schema (Honcho 3.0.5) does not expose `level`, `premises`, or -// `reasoning_tree`, but live Honcho 3.0.11 returns `level` on every conclusion. -// Declared optional here so the UI consumes them when present and degrades gracefully -// when absent. `premises`/`reasoning_tree` are still unserved — the premise tree stays -// empty until Honcho ships them. -export type ExtendedConclusion = ApiConclusion & { - /** Widened to `string`: Honcho may add levels this client doesn't know yet. */ +// Honcho < 3.2.0 sent conclusion fields the generated schema lacked, so +// ExtendedConclusion widened the type manually. The schema now targets +// Honcho 3.2.0 where `level`, `source_ids`, and `times_derived` are +// first-class. `Omit` + re-declaration keeps `level` widened to `string`: +// Honcho may add levels this client doesn't know yet, and the UI must +// classify unknown levels as explicit rather than dropping them. +// `premises`/`reasoning_tree` were never served by upstream Honcho; they +// stay as optional legacy-fallback inputs so older deployments degrade +// the same way they always did. +export type ExtendedConclusion = Omit & { level?: string | null; premises?: string[] | null; reasoning_tree?: ReasoningTreeNode | null; @@ -28,6 +31,20 @@ export interface ReasoningTreeNode { premises?: ReasoningTreeNode[]; } +/** Native premises: `source_ids` (Honcho >= 3.2.0), falling back to the legacy alias. */ +export function conclusionSourceIds(c: ExtendedConclusion): string[] { + if (c.source_ids?.length) return c.source_ids; + return c.premises ?? []; +} + +/** + * Cheap pre-check for whether the premise tree could be non-empty, so the UI + * only offers expansion when there is something to show. + */ +export function hasPremiseTree(c: ExtendedConclusion): boolean { + return conclusionSourceIds(c).length > 0 || Boolean(c.reasoning_tree?.premises?.length); +} + export interface Dream { id: string; observer_id: string; @@ -199,8 +216,9 @@ function walk( children = conclusion.reasoning_tree.premises.map((node) => walk(node.conclusion_id, index, nextVisited, depth + 1, maxDepth), ); - } else if (conclusion.premises?.length) { - children = conclusion.premises.map((id) => walk(id, index, nextVisited, depth + 1, maxDepth)); + } else { + const sources = conclusionSourceIds(conclusion); + children = sources.map((id) => walk(id, index, nextVisited, depth + 1, maxDepth)); } return { conclusion, conclusionId, depth, children, cycle: false }; } diff --git a/packages/web/src/test/dreams.test.ts b/packages/web/src/test/dreams.test.ts index 5163e7b..cd98617 100644 --- a/packages/web/src/test/dreams.test.ts +++ b/packages/web/src/test/dreams.test.ts @@ -2,9 +2,11 @@ import { describe, expect, it } from "vitest"; import { buildPremiseIndex, clusterConclusionsIntoDreams, + conclusionSourceIds, dreamCounts, type ExtendedConclusion, expandPremiseTree, + hasPremiseTree, } from "@/lib/dreams"; // Helpers ───────────────────────────────────────────────────────────────────── @@ -21,6 +23,7 @@ function mkConclusion( observed_id: "observed-b", session_id: null, created_at: createdAt, + times_derived: 1, ...overrides, }; } @@ -244,4 +247,63 @@ describe("expandPremiseTree", () => { const tree = expandPremiseTree("top", index); expect(tree.children.map((n) => n.conclusionId)).toEqual(["e2"]); }); + + // Honcho >= 3.2.0 serves attribution natively ──────────────────────────── + + it("walks native source_ids into direct children", () => { + const e1 = mkConclusion("e1", iso(0), { level: "explicit" }); + const e2 = mkConclusion("e2", iso(1), { level: "explicit" }); + const top = mkConclusion("top", iso(5), { + level: "deductive", + source_ids: ["e1", "e2"], + times_derived: 1, + }); + const index = buildPremiseIndex([e1, e2, top]); + + const tree = expandPremiseTree("top", index); + expect(tree.children.map((n) => n.conclusionId)).toEqual(["e1", "e2"]); + expect(tree.children.every((n) => n.conclusion !== null)).toBe(true); + }); + + it("prefers source_ids over the legacy premises alias", () => { + const native = mkConclusion("native", iso(0)); + const legacy = mkConclusion("legacy", iso(0)); + const top = mkConclusion("top", iso(5), { + source_ids: ["native"], + premises: ["legacy"], + }); + const index = buildPremiseIndex([native, legacy, top]); + + const tree = expandPremiseTree("top", index); + expect(tree.children.map((n) => n.conclusionId)).toEqual(["native"]); + }); + + it("still falls back to legacy premises when source_ids is absent", () => { + const e1 = mkConclusion("e1", iso(0)); + const top = mkConclusion("top", iso(5), { premises: ["e1"] }); + const index = buildPremiseIndex([e1, top]); + + const tree = expandPremiseTree("top", index); + expect(tree.children.map((n) => n.conclusionId)).toEqual(["e1"]); + }); + + describe("hasPremiseTree", () => { + it("is true for native source_ids", () => { + expect(hasPremiseTree(mkConclusion("c", iso(0), { source_ids: ["x"] }))).toBe(true); + }); + + it("is true for the legacy premises alias", () => { + expect(hasPremiseTree(mkConclusion("c", iso(0), { premises: ["x"] }))).toBe(true); + }); + + it("is false when neither is present", () => { + expect(hasPremiseTree(mkConclusion("c", iso(0)))).toBe(false); + }); + }); + + describe("conclusionSourceIds", () => { + it("returns an empty array when neither source is present", () => { + expect(conclusionSourceIds(mkConclusion("c", iso(0)))).toEqual([]); + }); + }); }); diff --git a/packages/web/src/test/setup.ts b/packages/web/src/test/setup.ts index b2b731e..61c85f7 100644 --- a/packages/web/src/test/setup.ts +++ b/packages/web/src/test/setup.ts @@ -2,6 +2,45 @@ import "@testing-library/jest-dom/vitest"; import { cleanup } from "@testing-library/react"; import { afterEach, vi } from "vitest"; +// Node >= 26 ships an experimental global `localStorage` that is undefined +// unless `--localstorage-file` is set. That undefined value bleeds through +// the environment compat layer and clobbers jsdom's real Storage, so every +// test touching localStorage crashes. Install a small in-memory Storage to +// keep the browser contract intact under any node version. +function installMemoryStorage(target: typeof globalThis): void { + const hadStorage = (() => { + try { + return target.localStorage instanceof Storage; + } catch { + return false; + } + })(); + if (hadStorage) return; + + const store = new Map(); + const storage: Storage = { + get length() { + return store.size; + }, + clear: () => store.clear(), + getItem: (key: string) => (store.has(key) ? (store.get(key) ?? null) : null), + key: (index: number) => Array.from(store.keys())[index] ?? null, + removeItem: (key: string) => { + store.delete(key); + }, + setItem: (key: string, value: string) => { + store.set(key, String(value)); + }, + }; + Object.defineProperty(target, "localStorage", { value: storage, configurable: true }); + Object.defineProperty(target, "sessionStorage", { value: storage, configurable: true }); +} + +installMemoryStorage(globalThis); +if (typeof window !== "undefined") { + installMemoryStorage(window as unknown as typeof globalThis); +} + // jsdom defines scrollTo but leaves it unimplemented; router scroll restoration calls it. window.scrollTo = vi.fn() as unknown as typeof window.scrollTo; diff --git a/packages/web/vitest.config.ts b/packages/web/vitest.config.ts index af9a0e1..3b5de52 100644 --- a/packages/web/vitest.config.ts +++ b/packages/web/vitest.config.ts @@ -16,6 +16,13 @@ export default defineConfig({ __APP_VERSION__: JSON.stringify("0.0.0-test"), }, test: { + // jsdom ≥ 29 treats a missing URL as an opaque origin and disables + // localStorage/sessionStorage, which most tests rely on. Pin the origin. + environmentOptions: { + jsdom: { + url: "http://localhost:5173/", + }, + }, environment: "jsdom", globals: true, setupFiles: ["./src/test/setup.ts"],