// Package spec Code generated by swaggo/swag. DO NOT EDIT package spec import "github.com/swaggo/swag" const docTemplate = `{ "schemes": {{ marshal .Schemes }}, "swagger": "2.0", "info": { "description": "{{escape .Description}}", "title": "{{.Title}}", "contact": {}, "version": "{{.Version}}" }, "host": "{{.Host}}", "basePath": "{{.BasePath}}", "paths": { "/auth/login": { "post": { "description": "Validate user credentials and issue a JWT", "tags": [ "auth" ], "summary": "Login", "parameters": [ { "description": "Login request", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.LoginRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.LoginResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots": { "get": { "description": "List bots accessible to current user (admin can specify owner_id)", "tags": [ "bots" ], "summary": "List bots", "parameters": [ { "type": "string", "description": "Owner user ID (admin only)", "name": "owner_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/bots.ListBotsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "description": "Create a bot user owned by current user (or admin-specified owner)", "tags": [ "bots" ], "summary": "Create bot user", "parameters": [ { "description": "Bot payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/bots.CreateBotRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/bots.Bot" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/chat": { "post": { "description": "Send a chat message and get a response. The system will automatically select an appropriate chat model from the database.", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "chat" ], "summary": "Chat with AI", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Chat request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/chat.ChatRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/chat.ChatResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/chat/stream": { "post": { "description": "Send a chat message and get a streaming response. The system will automatically select an appropriate chat model from the database.", "consumes": [ "application/json" ], "produces": [ "text/event-stream" ], "tags": [ "chat" ], "summary": "Stream chat with AI", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Chat request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/chat.ChatRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "string" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container": { "get": { "tags": [ "containerd" ], "summary": "Get container info for bot", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.GetContainerResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "tags": [ "containerd" ], "summary": "Create and start MCP container for bot", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Create container payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateContainerRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.CreateContainerResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "tags": [ "containerd" ], "summary": "Delete MCP container for bot", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/fs": { "get": { "description": "List entries under a relative path", "tags": [ "fs" ], "summary": "List files for a bot", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Relative directory path", "name": "path", "in": "query" }, { "type": "boolean", "description": "Recursive listing", "name": "recursive", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.FSListResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "tags": [ "fs" ], "summary": "Delete a file or directory", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Relative path", "name": "path", "in": "query", "required": true }, { "type": "boolean", "description": "Recursive delete for directories", "name": "recursive", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.FSDeleteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/fs-mcp": { "post": { "description": "Forwards MCP JSON-RPC requests to the MCP server inside the container.\nRequired:\n- container task is running\n- container has data mount (default /data) bound to \u003cdata_root\u003e/users/\u003cuser_id\u003e\n- container image contains the \"mcp\" binary\nAuth: Bearer JWT is used to determine user_id (sub or user_id).\nPaths must be relative (no leading slash) and must not contain \"..\".\n\nExample: tools/list\n{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}\n\nExample: tools/call (fs.read)\n{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"fs.read\",\"arguments\":{\"path\":\"notes.txt\"}}}", "tags": [ "containerd" ], "summary": "MCP filesystem tools (JSON-RPC)", "parameters": [ { "type": "string", "description": "Bearer \u003ctoken\u003e", "name": "Authorization", "in": "header", "required": true }, { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "JSON-RPC request", "name": "payload", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "JSON-RPC response: {jsonrpc,id,result|error}", "schema": { "type": "object" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/fs/dir": { "post": { "tags": [ "fs" ], "summary": "Create a directory", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Directory payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.FSMkdirRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.FSWriteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/fs/file": { "get": { "tags": [ "fs" ], "summary": "Read file content", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Relative file path", "name": "path", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.FSReadResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "tags": [ "fs" ], "summary": "Create or overwrite a file", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "File write payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.FSWriteRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.FSWriteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/fs/stat": { "get": { "tags": [ "fs" ], "summary": "Get file or directory metadata", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Relative path", "name": "path", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.FSStatResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/fs/upload": { "post": { "tags": [ "fs" ], "summary": "Upload a file", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Relative file path or directory", "name": "path", "in": "query" }, { "type": "file", "description": "File to upload", "name": "file", "in": "formData", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.FSWriteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/fs/usage": { "get": { "tags": [ "fs" ], "summary": "Get usage under a path", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Relative directory path", "name": "path", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.FSUsageResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/skills": { "get": { "tags": [ "containerd" ], "summary": "List skills from data directory", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.SkillsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "tags": [ "containerd" ], "summary": "Upload skills into data directory", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Skills payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.SkillsUpsertRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.skillsOpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "tags": [ "containerd" ], "summary": "Delete skills from data directory", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Delete skills payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.SkillsDeleteRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.skillsOpResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/snapshots": { "get": { "tags": [ "containerd" ], "summary": "List snapshots", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Snapshotter name", "name": "snapshotter", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.ListSnapshotsResponse" } } } }, "post": { "tags": [ "containerd" ], "summary": "Create container snapshot for bot", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Create snapshot payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.CreateSnapshotRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.CreateSnapshotResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/start": { "post": { "tags": [ "containerd" ], "summary": "Start container task for bot", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/container/stop": { "post": { "tags": [ "containerd" ], "summary": "Stop container task for bot", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/history": { "get": { "description": "List history records for current user", "tags": [ "history" ], "summary": "List history records", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "integer", "description": "Limit", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/history.ListResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "description": "Create a history record for current user", "tags": [ "history" ], "summary": "Create history record", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "History payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/history.CreateRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/history.Record" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete all history records for current user", "tags": [ "history" ], "summary": "Delete all history records", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/history/{id}": { "get": { "description": "Get a history record by ID (must belong to current user)", "tags": [ "history" ], "summary": "Get history record", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "History ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/history.Record" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete a history record by ID (must belong to current user)", "tags": [ "history" ], "summary": "Delete history record", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "History ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/mcp": { "get": { "description": "List MCP connections for a bot", "tags": [ "mcp" ], "summary": "List MCP connections", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/mcp.ListResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "description": "Create a MCP connection for a bot", "tags": [ "mcp" ], "summary": "Create MCP connection", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "MCP payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/mcp.UpsertRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/github_com_memohai_memoh_internal_mcp.Connection" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/mcp-stdio": { "post": { "description": "Start a stdio MCP process in the bot container and expose it as MCP HTTP endpoint.", "tags": [ "containerd" ], "summary": "Create MCP stdio proxy", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Stdio MCP payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.MCPStdioRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.MCPStdioResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/mcp-stdio/{session_id}": { "post": { "description": "Proxies MCP JSON-RPC requests to a stdio MCP process in the container.", "tags": [ "containerd" ], "summary": "MCP stdio proxy (JSON-RPC)", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Session ID", "name": "session_id", "in": "path", "required": true }, { "description": "JSON-RPC request", "name": "payload", "in": "body", "required": true, "schema": { "type": "object" } } ], "responses": { "200": { "description": "JSON-RPC response: {jsonrpc,id,result|error}", "schema": { "type": "object" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/mcp/{id}": { "get": { "description": "Get a MCP connection by ID", "tags": [ "mcp" ], "summary": "Get MCP connection", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_memohai_memoh_internal_mcp.Connection" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update a MCP connection by ID", "tags": [ "mcp" ], "summary": "Update MCP connection", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true }, { "description": "MCP payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/mcp.UpsertRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/github_com_memohai_memoh_internal_mcp.Connection" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete a MCP connection by ID", "tags": [ "mcp" ], "summary": "Delete MCP connection", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "MCP ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/memory/add": { "post": { "description": "Add memory for a user via memory. Auth: Bearer JWT determines user_id (sub or user_id).", "tags": [ "memory" ], "summary": "Add memory", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Add request", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.memoryAddPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/memory.SearchResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/memory/embed": { "post": { "description": "Embed text or multimodal input and upsert into memory store. Auth: Bearer JWT determines user_id (sub or user_id).", "tags": [ "memory" ], "summary": "Embed and upsert memory", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Embed upsert request", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.memoryEmbedUpsertPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/memory.EmbedUpsertResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/memory/memories": { "get": { "description": "List memories for a user via memory. Auth: Bearer JWT determines user_id (sub or user_id).", "tags": [ "memory" ], "summary": "List memories", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Run ID", "name": "run_id", "in": "query" }, { "type": "integer", "description": "Limit", "name": "limit", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/memory.SearchResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete all memories for a user via memory. Auth: Bearer JWT determines user_id (sub or user_id).", "tags": [ "memory" ], "summary": "Delete memories", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Delete all request", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.memoryDeleteAllPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/memory.DeleteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/memory/memories/{memoryId}": { "get": { "description": "Get a memory by ID via memory. Auth: Bearer JWT determines user_id (sub or user_id).", "tags": [ "memory" ], "summary": "Get memory", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Memory ID", "name": "memoryId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/memory.MemoryItem" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete a memory by ID via memory. Auth: Bearer JWT determines user_id (sub or user_id).", "tags": [ "memory" ], "summary": "Delete memory", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Memory ID", "name": "memoryId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/memory.DeleteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/memory/search": { "post": { "description": "Search memories for a user via memory. Auth: Bearer JWT determines user_id (sub or user_id).", "tags": [ "memory" ], "summary": "Search memories", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Search request", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.memorySearchPayload" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/memory.SearchResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/memory/update": { "post": { "description": "Update a memory by ID via memory. Auth: Bearer JWT determines user_id (sub or user_id).", "tags": [ "memory" ], "summary": "Update memory", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Update request", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/memory.UpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/memory.MemoryItem" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/schedule": { "get": { "description": "List schedules for current user", "tags": [ "schedule" ], "summary": "List schedules", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/schedule.ListResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "description": "Create a schedule for current user", "tags": [ "schedule" ], "summary": "Create schedule", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Schedule payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/schedule.CreateRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/schedule.Schedule" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/schedule/{id}": { "get": { "description": "Get a schedule by ID", "tags": [ "schedule" ], "summary": "Get schedule", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Schedule ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/schedule.Schedule" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update a schedule by ID", "tags": [ "schedule" ], "summary": "Update schedule", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Schedule ID", "name": "id", "in": "path", "required": true }, { "description": "Schedule payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/schedule.UpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/schedule.Schedule" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete a schedule by ID", "tags": [ "schedule" ], "summary": "Delete schedule", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Schedule ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/settings": { "get": { "description": "Get agent settings for current user", "tags": [ "settings" ], "summary": "Get user settings", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/settings.Settings" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update or create agent settings for current user", "tags": [ "settings" ], "summary": "Update user settings", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Settings payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/settings.UpsertRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/settings.Settings" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "description": "Update or create agent settings for current user", "tags": [ "settings" ], "summary": "Update user settings", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Settings payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/settings.UpsertRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/settings.Settings" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Remove agent settings for current user", "tags": [ "settings" ], "summary": "Delete user settings", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/subagents": { "get": { "description": "List subagents for current user", "tags": [ "subagent" ], "summary": "List subagents", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subagent.ListResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "description": "Create a subagent for current user", "tags": [ "subagent" ], "summary": "Create subagent", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "description": "Subagent payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/subagent.CreateRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/subagent.Subagent" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/subagents/{id}": { "get": { "description": "Get a subagent by ID", "tags": [ "subagent" ], "summary": "Get subagent", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Subagent ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subagent.Subagent" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update a subagent by ID", "tags": [ "subagent" ], "summary": "Update subagent", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Subagent ID", "name": "id", "in": "path", "required": true }, { "description": "Subagent payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/subagent.UpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subagent.Subagent" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete a subagent by ID", "tags": [ "subagent" ], "summary": "Delete subagent", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Subagent ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/subagents/{id}/context": { "get": { "description": "Get a subagent's message context", "tags": [ "subagent" ], "summary": "Get subagent context", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Subagent ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subagent.ContextResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update a subagent's message context", "tags": [ "subagent" ], "summary": "Update subagent context", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Subagent ID", "name": "id", "in": "path", "required": true }, { "description": "Context payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/subagent.UpdateContextRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subagent.ContextResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{bot_id}/subagents/{id}/skills": { "get": { "description": "Get a subagent's skills", "tags": [ "subagent" ], "summary": "Get subagent skills", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Subagent ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subagent.SkillsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Replace a subagent's skills", "tags": [ "subagent" ], "summary": "Update subagent skills", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Subagent ID", "name": "id", "in": "path", "required": true }, { "description": "Skills payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/subagent.UpdateSkillsRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subagent.SkillsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "description": "Add skills to a subagent", "tags": [ "subagent" ], "summary": "Add subagent skills", "parameters": [ { "type": "string", "description": "Bot ID", "name": "bot_id", "in": "path", "required": true }, { "type": "string", "description": "Subagent ID", "name": "id", "in": "path", "required": true }, { "description": "Skills payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/subagent.AddSkillsRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/subagent.SkillsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{id}": { "get": { "description": "Get a bot by ID (owner/admin only)", "tags": [ "bots" ], "summary": "Get bot details", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/bots.Bot" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update bot profile (owner/admin only)", "tags": [ "bots" ], "summary": "Update bot details", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true }, { "description": "Bot update payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/bots.UpdateBotRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/bots.Bot" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete a bot user (owner/admin only)", "tags": [ "bots" ], "summary": "Delete bot", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{id}/channel/{platform}": { "get": { "description": "Get bot channel configuration", "tags": [ "bots" ], "summary": "Get bot channel config", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Channel platform", "name": "platform", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/channel.ChannelConfig" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update bot channel configuration", "tags": [ "bots" ], "summary": "Update bot channel config", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Channel platform", "name": "platform", "in": "path", "required": true }, { "description": "Channel config payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/channel.UpsertConfigRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/channel.ChannelConfig" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{id}/channel/{platform}/send": { "post": { "description": "Send a message using bot channel configuration", "tags": [ "bots" ], "summary": "Send message via bot channel", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Channel platform", "name": "platform", "in": "path", "required": true }, { "description": "Send payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/channel.SendRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{id}/channel/{platform}/send_session": { "post": { "description": "Send a message using a session-scoped token (reply only)", "tags": [ "bots" ], "summary": "Send message via bot channel session token", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Channel platform", "name": "platform", "in": "path", "required": true }, { "description": "Send payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/channel.SendRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "additionalProperties": { "type": "string" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "401": { "description": "Unauthorized", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{id}/members": { "get": { "description": "List members for a bot", "tags": [ "bots" ], "summary": "List bot members", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/bots.ListMembersResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Add or update bot member role", "tags": [ "bots" ], "summary": "Upsert bot member", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true }, { "description": "Member payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/bots.UpsertMemberRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/bots.BotMember" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{id}/members/{user_id}": { "delete": { "description": "Remove a member from a bot", "tags": [ "bots" ], "summary": "Delete bot member", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "User ID", "name": "user_id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/bots/{id}/owner": { "put": { "description": "Transfer bot ownership to another human user", "tags": [ "bots" ], "summary": "Transfer bot owner (admin only)", "parameters": [ { "type": "string", "description": "Bot ID", "name": "id", "in": "path", "required": true }, { "description": "Transfer payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/bots.TransferBotRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/bots.Bot" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/channels": { "get": { "description": "List channel meta information including capabilities and schemas", "tags": [ "channel" ], "summary": "List channel capabilities and schemas", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/handlers.ChannelMeta" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/channels/{platform}": { "get": { "description": "Get channel meta information including capabilities and schemas", "tags": [ "channel" ], "summary": "Get channel capabilities and schemas", "parameters": [ { "type": "string", "description": "Channel platform", "name": "platform", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.ChannelMeta" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/embeddings": { "post": { "description": "Create text or multimodal embeddings", "tags": [ "embeddings" ], "summary": "Create embeddings", "parameters": [ { "description": "Embeddings request", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.EmbeddingsRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/handlers.EmbeddingsResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "501": { "description": "Not Implemented", "schema": { "$ref": "#/definitions/handlers.EmbeddingsResponse" } } } } }, "/models": { "get": { "description": "Get a list of all configured models, optionally filtered by type or client type", "tags": [ "models" ], "summary": "List all models", "parameters": [ { "type": "string", "description": "Model type (chat, embedding)", "name": "type", "in": "query" }, { "type": "string", "description": "Client type (openai, anthropic, google)", "name": "client_type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.GetResponse" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "description": "Create a new model configuration", "tags": [ "models" ], "summary": "Create a new model", "parameters": [ { "description": "Model configuration", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.AddRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/models.AddResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/models/count": { "get": { "description": "Get the total count of models, optionally filtered by type", "tags": [ "models" ], "summary": "Get model count", "parameters": [ { "type": "string", "description": "Model type (chat, embedding)", "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.CountResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/models/enable": { "post": { "description": "Update the current user's settings to use the selected model", "tags": [ "models" ], "summary": "Enable model for chat/memory/embedding", "parameters": [ { "description": "Enable model payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/handlers.EnableModelRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/settings.Settings" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/models/model/{modelId}": { "get": { "description": "Get a model configuration by its model_id field (e.g., gpt-4)", "tags": [ "models" ], "summary": "Get model by model ID", "parameters": [ { "type": "string", "description": "Model ID (e.g., gpt-4)", "name": "modelId", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.GetResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update a model configuration by its model_id field (e.g., gpt-4)", "tags": [ "models" ], "summary": "Update model by model ID", "parameters": [ { "type": "string", "description": "Model ID (e.g., gpt-4)", "name": "modelId", "in": "path", "required": true }, { "description": "Updated model configuration", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.UpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.GetResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete a model configuration by its model_id field (e.g., gpt-4)", "tags": [ "models" ], "summary": "Delete model by model ID", "parameters": [ { "type": "string", "description": "Model ID (e.g., gpt-4)", "name": "modelId", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/models/{id}": { "get": { "description": "Get a model configuration by its internal UUID", "tags": [ "models" ], "summary": "Get model by internal ID", "parameters": [ { "type": "string", "description": "Model internal ID (UUID)", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.GetResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update a model configuration by its internal UUID", "tags": [ "models" ], "summary": "Update model by internal ID", "parameters": [ { "type": "string", "description": "Model internal ID (UUID)", "name": "id", "in": "path", "required": true }, { "description": "Updated model configuration", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/models.UpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/models.GetResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete a model configuration by its internal UUID", "tags": [ "models" ], "summary": "Delete model by internal ID", "parameters": [ { "type": "string", "description": "Model internal ID (UUID)", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/providers": { "get": { "description": "Get a list of all configured LLM providers, optionally filtered by client type", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "providers" ], "summary": "List all LLM providers", "parameters": [ { "type": "string", "description": "Client type filter (openai, anthropic, google, ollama)", "name": "client_type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/providers.GetResponse" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "description": "Create a new LLM provider configuration", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "providers" ], "summary": "Create a new LLM provider", "parameters": [ { "description": "Provider configuration", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/providers.CreateRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/providers.GetResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/providers/count": { "get": { "description": "Get the total count of providers, optionally filtered by client type", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "providers" ], "summary": "Count providers", "parameters": [ { "type": "string", "description": "Client type filter (openai, anthropic, google, ollama)", "name": "client_type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/providers.CountResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/providers/name/{name}": { "get": { "description": "Get a provider configuration by its name", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "providers" ], "summary": "Get provider by name", "parameters": [ { "type": "string", "description": "Provider name", "name": "name", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/providers.GetResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/providers/{id}": { "get": { "description": "Get a provider configuration by its ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "providers" ], "summary": "Get provider by ID", "parameters": [ { "type": "string", "description": "Provider ID (UUID)", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/providers.GetResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update an existing provider configuration", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "providers" ], "summary": "Update provider", "parameters": [ { "type": "string", "description": "Provider ID (UUID)", "name": "id", "in": "path", "required": true }, { "description": "Updated provider configuration", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/providers.UpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/providers.GetResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "delete": { "description": "Delete a provider configuration", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "providers" ], "summary": "Delete provider", "parameters": [ { "type": "string", "description": "Provider ID (UUID)", "name": "id", "in": "path", "required": true } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/providers/{id}/models": { "get": { "description": "Get models for a provider by id, optionally filtered by type", "tags": [ "providers" ], "summary": "List provider models", "parameters": [ { "type": "string", "description": "Provider ID (UUID)", "name": "id", "in": "path", "required": true }, { "type": "string", "description": "Model type (chat, embedding)", "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/models.GetResponse" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users": { "get": { "description": "List users", "tags": [ "users" ], "summary": "List users (admin only)", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users.ListUsersResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "post": { "description": "Create a new human user account", "tags": [ "users" ], "summary": "Create human user (admin only)", "parameters": [ { "description": "User payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/users.CreateUserRequest" } } ], "responses": { "201": { "description": "Created", "schema": { "$ref": "#/definitions/users.User" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/me": { "get": { "description": "Get current user profile", "tags": [ "users" ], "summary": "Get current user", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users.User" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update current user display name or avatar", "tags": [ "users" ], "summary": "Update current user profile", "parameters": [ { "description": "Profile payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/users.UpdateProfileRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users.User" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/me/channels/{platform}": { "get": { "description": "Get channel binding configuration for current user", "tags": [ "channel" ], "summary": "Get channel user config", "parameters": [ { "type": "string", "description": "Channel platform", "name": "platform", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/channel.ChannelUserBinding" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update channel binding configuration for current user", "tags": [ "channel" ], "summary": "Update channel user config", "parameters": [ { "type": "string", "description": "Channel platform", "name": "platform", "in": "path", "required": true }, { "description": "Channel user config payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/channel.UpsertUserConfigRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/channel.ChannelUserBinding" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/me/password": { "put": { "description": "Update current user password with current password check", "tags": [ "users" ], "summary": "Update current user password", "parameters": [ { "description": "Password payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/users.UpdatePasswordRequest" } } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/{id}": { "get": { "description": "Get user details (self or admin only)", "tags": [ "users" ], "summary": "Get user by ID", "parameters": [ { "type": "string", "description": "User ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users.User" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } }, "put": { "description": "Update user profile and status", "tags": [ "users" ], "summary": "Update user (admin only)", "parameters": [ { "type": "string", "description": "User ID", "name": "id", "in": "path", "required": true }, { "description": "User update payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/users.UpdateUserRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/users.User" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } }, "/users/{id}/password": { "put": { "description": "Reset a user password", "tags": [ "users" ], "summary": "Reset user password (admin only)", "parameters": [ { "type": "string", "description": "User ID", "name": "id", "in": "path", "required": true }, { "description": "Password payload", "name": "payload", "in": "body", "required": true, "schema": { "$ref": "#/definitions/users.ResetPasswordRequest" } } ], "responses": { "204": { "description": "No Content" }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "403": { "description": "Forbidden", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/handlers.ErrorResponse" } } } } } }, "definitions": { "bots.Bot": { "type": "object", "required": [ "created_at", "display_name", "id", "is_active", "owner_user_id", "type", "updated_at" ], "properties": { "avatar_url": { "type": "string" }, "created_at": { "type": "string" }, "display_name": { "type": "string" }, "id": { "type": "string" }, "is_active": { "type": "boolean" }, "metadata": { "type": "object", "additionalProperties": {} }, "owner_user_id": { "type": "string" }, "type": { "type": "string" }, "updated_at": { "type": "string" } } }, "bots.BotMember": { "type": "object", "properties": { "bot_id": { "type": "string" }, "created_at": { "type": "string" }, "role": { "type": "string" }, "user_id": { "type": "string" } } }, "bots.CreateBotRequest": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "is_active": { "type": "boolean" }, "metadata": { "type": "object", "additionalProperties": {} }, "type": { "type": "string" } } }, "bots.ListBotsResponse": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/bots.Bot" } } } }, "bots.ListMembersResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/bots.BotMember" } } } }, "bots.TransferBotRequest": { "type": "object", "properties": { "owner_user_id": { "type": "string" } } }, "bots.UpdateBotRequest": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "is_active": { "type": "boolean" }, "metadata": { "type": "object", "additionalProperties": {} } } }, "bots.UpsertMemberRequest": { "type": "object", "properties": { "role": { "type": "string" }, "user_id": { "type": "string" } } }, "channel.Action": { "type": "object", "properties": { "label": { "type": "string" }, "type": { "type": "string" }, "url": { "type": "string" }, "value": { "type": "string" } } }, "channel.Attachment": { "type": "object", "properties": { "caption": { "type": "string" }, "duration_ms": { "type": "integer" }, "height": { "type": "integer" }, "metadata": { "type": "object", "additionalProperties": {} }, "mime": { "type": "string" }, "name": { "type": "string" }, "size": { "type": "integer" }, "thumbnail_url": { "type": "string" }, "type": { "$ref": "#/definitions/channel.AttachmentType" }, "url": { "type": "string" }, "width": { "type": "integer" } } }, "channel.AttachmentType": { "type": "string", "enum": [ "image", "audio", "video", "voice", "file", "gif" ], "x-enum-varnames": [ "AttachmentImage", "AttachmentAudio", "AttachmentVideo", "AttachmentVoice", "AttachmentFile", "AttachmentGIF" ] }, "channel.ChannelCapabilities": { "type": "object", "properties": { "attachments": { "type": "boolean" }, "block_streaming": { "type": "boolean" }, "buttons": { "type": "boolean" }, "chat_types": { "type": "array", "items": { "type": "string" } }, "edit": { "type": "boolean" }, "markdown": { "type": "boolean" }, "media": { "type": "boolean" }, "native_commands": { "type": "boolean" }, "polls": { "type": "boolean" }, "reactions": { "type": "boolean" }, "reply": { "type": "boolean" }, "rich_text": { "type": "boolean" }, "streaming": { "type": "boolean" }, "text": { "type": "boolean" }, "threads": { "type": "boolean" }, "unsend": { "type": "boolean" } } }, "channel.ChannelConfig": { "type": "object", "properties": { "botID": { "type": "string" }, "channelType": { "type": "string" }, "createdAt": { "type": "string" }, "credentials": { "type": "object", "additionalProperties": {} }, "externalIdentity": { "type": "string" }, "id": { "type": "string" }, "routing": { "type": "object", "additionalProperties": {} }, "selfIdentity": { "type": "object", "additionalProperties": {} }, "status": { "type": "string" }, "updatedAt": { "type": "string" }, "verifiedAt": { "type": "string" } } }, "channel.ChannelUserBinding": { "type": "object", "properties": { "channelType": { "type": "string" }, "config": { "type": "object", "additionalProperties": {} }, "createdAt": { "type": "string" }, "id": { "type": "string" }, "updatedAt": { "type": "string" }, "userID": { "type": "string" } } }, "channel.ConfigSchema": { "type": "object", "properties": { "fields": { "type": "object", "additionalProperties": { "$ref": "#/definitions/channel.FieldSchema" } }, "version": { "type": "integer" } } }, "channel.FieldSchema": { "type": "object", "properties": { "description": { "type": "string" }, "enum": { "type": "array", "items": { "type": "string" } }, "example": {}, "required": { "type": "boolean" }, "title": { "type": "string" }, "type": { "$ref": "#/definitions/channel.FieldType" } } }, "channel.FieldType": { "type": "string", "enum": [ "string", "secret", "bool", "number", "enum" ], "x-enum-varnames": [ "FieldString", "FieldSecret", "FieldBool", "FieldNumber", "FieldEnum" ] }, "channel.Message": { "type": "object", "properties": { "actions": { "type": "array", "items": { "$ref": "#/definitions/channel.Action" } }, "attachments": { "type": "array", "items": { "$ref": "#/definitions/channel.Attachment" } }, "format": { "$ref": "#/definitions/channel.MessageFormat" }, "id": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": {} }, "parts": { "type": "array", "items": { "$ref": "#/definitions/channel.MessagePart" } }, "reply": { "$ref": "#/definitions/channel.ReplyRef" }, "text": { "type": "string" }, "thread": { "$ref": "#/definitions/channel.ThreadRef" } } }, "channel.MessageFormat": { "type": "string", "enum": [ "plain", "markdown", "rich" ], "x-enum-varnames": [ "MessageFormatPlain", "MessageFormatMarkdown", "MessageFormatRich" ] }, "channel.MessagePart": { "type": "object", "properties": { "emoji": { "type": "string" }, "language": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": {} }, "styles": { "type": "array", "items": { "$ref": "#/definitions/channel.MessageTextStyle" } }, "text": { "type": "string" }, "type": { "$ref": "#/definitions/channel.MessagePartType" }, "url": { "type": "string" }, "user_id": { "type": "string" } } }, "channel.MessagePartType": { "type": "string", "enum": [ "text", "link", "code_block", "mention", "emoji" ], "x-enum-varnames": [ "MessagePartText", "MessagePartLink", "MessagePartCodeBlock", "MessagePartMention", "MessagePartEmoji" ] }, "channel.MessageTextStyle": { "type": "string", "enum": [ "bold", "italic", "strikethrough", "code" ], "x-enum-varnames": [ "MessageStyleBold", "MessageStyleItalic", "MessageStyleStrikethrough", "MessageStyleCode" ] }, "channel.ReplyRef": { "type": "object", "properties": { "message_id": { "type": "string" }, "target": { "type": "string" } } }, "channel.SendRequest": { "type": "object", "properties": { "message": { "$ref": "#/definitions/channel.Message" }, "target": { "type": "string" }, "user_id": { "type": "string" } } }, "channel.TargetHint": { "type": "object", "properties": { "example": { "type": "string" }, "label": { "type": "string" } } }, "channel.TargetSpec": { "type": "object", "properties": { "format": { "type": "string" }, "hints": { "type": "array", "items": { "$ref": "#/definitions/channel.TargetHint" } } } }, "channel.ThreadRef": { "type": "object", "properties": { "id": { "type": "string" } } }, "channel.UpsertConfigRequest": { "type": "object", "properties": { "credentials": { "type": "object", "additionalProperties": {} }, "external_identity": { "type": "string" }, "routing": { "type": "object", "additionalProperties": {} }, "self_identity": { "type": "object", "additionalProperties": {} }, "status": { "type": "string" }, "verified_at": { "type": "string" } } }, "channel.UpsertUserConfigRequest": { "type": "object", "properties": { "config": { "type": "object", "additionalProperties": {} } } }, "chat.ChatRequest": { "type": "object", "properties": { "allowed_actions": { "type": "array", "items": { "type": "string" } }, "channels": { "type": "array", "items": { "type": "string" } }, "current_channel": { "type": "string" }, "language": { "type": "string" }, "max_context_load_time": { "type": "integer" }, "messages": { "type": "array", "items": { "$ref": "#/definitions/chat.ModelMessage" } }, "model": { "type": "string" }, "provider": { "type": "string" }, "query": { "type": "string" }, "skills": { "type": "array", "items": { "type": "string" } } } }, "chat.ChatResponse": { "type": "object", "properties": { "messages": { "type": "array", "items": { "$ref": "#/definitions/chat.ModelMessage" } }, "model": { "type": "string" }, "provider": { "type": "string" }, "skills": { "type": "array", "items": { "type": "string" } } } }, "chat.ModelMessage": { "type": "object", "properties": { "content": { "type": "array", "items": { "type": "integer" } }, "name": { "type": "string" }, "role": { "type": "string" }, "tool_call_id": { "type": "string" }, "tool_calls": { "type": "array", "items": { "$ref": "#/definitions/chat.ToolCall" } } } }, "chat.ToolCall": { "type": "object", "properties": { "function": { "$ref": "#/definitions/chat.ToolCallFunction" }, "id": { "type": "string" }, "type": { "type": "string" } } }, "chat.ToolCallFunction": { "type": "object", "properties": { "arguments": { "type": "string" }, "name": { "type": "string" } } }, "github_com_memohai_memoh_internal_mcp.Connection": { "type": "object", "required": [ "active", "bot_id", "config", "created_at", "id", "name", "type", "updated_at" ], "properties": { "active": { "type": "boolean" }, "bot_id": { "type": "string" }, "config": { "type": "object", "additionalProperties": {} }, "created_at": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string" }, "updated_at": { "type": "string" } } }, "handlers.ChannelMeta": { "type": "object", "required": [ "capabilities", "config_schema", "display_name", "type" ], "properties": { "capabilities": { "$ref": "#/definitions/channel.ChannelCapabilities" }, "config_schema": { "$ref": "#/definitions/channel.ConfigSchema" }, "configless": { "type": "boolean" }, "display_name": { "type": "string" }, "target_spec": { "$ref": "#/definitions/channel.TargetSpec" }, "type": { "type": "string" }, "user_config_schema": { "$ref": "#/definitions/channel.ConfigSchema" } } }, "handlers.CreateContainerRequest": { "type": "object", "properties": { "image": { "type": "string" }, "snapshotter": { "type": "string" } } }, "handlers.CreateContainerResponse": { "type": "object", "properties": { "container_id": { "type": "string" }, "image": { "type": "string" }, "snapshotter": { "type": "string" }, "started": { "type": "boolean" } } }, "handlers.CreateSnapshotRequest": { "type": "object", "properties": { "snapshot_name": { "type": "string" } } }, "handlers.CreateSnapshotResponse": { "type": "object", "properties": { "container_id": { "type": "string" }, "snapshot_name": { "type": "string" }, "snapshotter": { "type": "string" } } }, "handlers.EmbeddingsInput": { "type": "object", "properties": { "image_url": { "type": "string" }, "text": { "type": "string" }, "video_url": { "type": "string" } } }, "handlers.EmbeddingsRequest": { "type": "object", "properties": { "dimensions": { "type": "integer" }, "input": { "$ref": "#/definitions/handlers.EmbeddingsInput" }, "model": { "type": "string" }, "provider": { "type": "string" }, "type": { "type": "string" } } }, "handlers.EmbeddingsResponse": { "type": "object", "properties": { "dimensions": { "type": "integer" }, "embedding": { "type": "array", "items": { "type": "number" } }, "message": { "type": "string" }, "model": { "type": "string" }, "provider": { "type": "string" }, "type": { "type": "string" }, "usage": { "$ref": "#/definitions/handlers.EmbeddingsUsage" } } }, "handlers.EmbeddingsUsage": { "type": "object", "properties": { "image_tokens": { "type": "integer" }, "input_tokens": { "type": "integer" }, "video_tokens": { "type": "integer" } } }, "handlers.EnableModelRequest": { "type": "object", "properties": { "as": { "type": "string" }, "model_id": { "type": "string" } } }, "handlers.ErrorResponse": { "type": "object", "properties": { "message": { "type": "string" } } }, "handlers.FSDeleteResponse": { "type": "object", "properties": { "ok": { "type": "boolean" } } }, "handlers.FSListResponse": { "type": "object", "properties": { "entries": { "type": "array", "items": { "$ref": "#/definitions/handlers.FSRestEntry" } }, "path": { "type": "string" } } }, "handlers.FSMkdirRequest": { "type": "object", "properties": { "parents": { "type": "boolean" }, "path": { "type": "string" } } }, "handlers.FSReadResponse": { "type": "object", "properties": { "content": { "type": "string" }, "mod_time": { "type": "string" }, "mode": { "type": "integer" }, "path": { "type": "string" }, "size": { "type": "integer" } } }, "handlers.FSRestEntry": { "type": "object", "properties": { "is_dir": { "type": "boolean" }, "mod_time": { "type": "string" }, "mode": { "type": "integer" }, "path": { "type": "string" }, "size": { "type": "integer" } } }, "handlers.FSStatResponse": { "type": "object", "properties": { "is_dir": { "type": "boolean" }, "mod_time": { "type": "string" }, "mode": { "type": "integer" }, "path": { "type": "string" }, "size": { "type": "integer" } } }, "handlers.FSUsageResponse": { "type": "object", "properties": { "dir_count": { "type": "integer" }, "file_count": { "type": "integer" }, "path": { "type": "string" }, "total_bytes": { "type": "integer" } } }, "handlers.FSWriteRequest": { "type": "object", "properties": { "content": { "type": "string" }, "overwrite": { "type": "boolean" }, "path": { "type": "string" } } }, "handlers.FSWriteResponse": { "type": "object", "properties": { "ok": { "type": "boolean" } } }, "handlers.GetContainerResponse": { "type": "object", "properties": { "container_id": { "type": "string" }, "container_path": { "type": "string" }, "created_at": { "type": "string" }, "host_path": { "type": "string" }, "image": { "type": "string" }, "namespace": { "type": "string" }, "status": { "type": "string" }, "task_running": { "type": "boolean" }, "updated_at": { "type": "string" } } }, "handlers.ListSnapshotsResponse": { "type": "object", "properties": { "snapshots": { "type": "array", "items": { "$ref": "#/definitions/handlers.SnapshotInfo" } }, "snapshotter": { "type": "string" } } }, "handlers.LoginRequest": { "type": "object", "required": [ "password", "username" ], "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "handlers.LoginResponse": { "type": "object", "required": [ "access_token", "display_name", "expires_at", "role", "token_type", "user_id", "username" ], "properties": { "access_token": { "type": "string" }, "display_name": { "type": "string" }, "expires_at": { "type": "string" }, "role": { "type": "string" }, "token_type": { "type": "string" }, "user_id": { "type": "string" }, "username": { "type": "string" } } }, "handlers.MCPStdioRequest": { "type": "object", "properties": { "args": { "type": "array", "items": { "type": "string" } }, "command": { "type": "string" }, "cwd": { "type": "string" }, "env": { "type": "object", "additionalProperties": { "type": "string" } }, "name": { "type": "string" } } }, "handlers.MCPStdioResponse": { "type": "object", "properties": { "session_id": { "type": "string" }, "tools": { "type": "array", "items": { "type": "string" } }, "url": { "type": "string" } } }, "handlers.SkillItem": { "type": "object", "properties": { "content": { "type": "string" }, "description": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": {} }, "name": { "type": "string" } } }, "handlers.SkillsDeleteRequest": { "type": "object", "properties": { "names": { "type": "array", "items": { "type": "string" } } } }, "handlers.SkillsResponse": { "type": "object", "properties": { "skills": { "type": "array", "items": { "$ref": "#/definitions/handlers.SkillItem" } } } }, "handlers.SkillsUpsertRequest": { "type": "object", "properties": { "skills": { "type": "array", "items": { "$ref": "#/definitions/handlers.SkillItem" } } } }, "handlers.SnapshotInfo": { "type": "object", "properties": { "created_at": { "type": "string" }, "kind": { "type": "string" }, "labels": { "type": "object", "additionalProperties": { "type": "string" } }, "name": { "type": "string" }, "parent": { "type": "string" }, "snapshotter": { "type": "string" }, "updated_at": { "type": "string" } } }, "handlers.memoryAddPayload": { "type": "object", "properties": { "embedding_enabled": { "type": "boolean" }, "filters": { "type": "object", "additionalProperties": {} }, "infer": { "type": "boolean" }, "message": { "type": "string" }, "messages": { "type": "array", "items": { "$ref": "#/definitions/memory.Message" } }, "metadata": { "type": "object", "additionalProperties": {} }, "run_id": { "type": "string" } } }, "handlers.memoryDeleteAllPayload": { "type": "object", "properties": { "run_id": { "type": "string" } } }, "handlers.memoryEmbedUpsertPayload": { "type": "object", "properties": { "filters": { "type": "object", "additionalProperties": {} }, "input": { "$ref": "#/definitions/memory.EmbedInput" }, "metadata": { "type": "object", "additionalProperties": {} }, "model": { "type": "string" }, "provider": { "type": "string" }, "run_id": { "type": "string" }, "source": { "type": "string" }, "type": { "type": "string" } } }, "handlers.memorySearchPayload": { "type": "object", "properties": { "embedding_enabled": { "type": "boolean" }, "filters": { "type": "object", "additionalProperties": {} }, "limit": { "type": "integer" }, "query": { "type": "string" }, "run_id": { "type": "string" }, "sources": { "type": "array", "items": { "type": "string" } } } }, "handlers.skillsOpResponse": { "type": "object", "properties": { "ok": { "type": "boolean" } } }, "history.CreateRequest": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "additionalProperties": {} } }, "metadata": { "type": "object", "additionalProperties": {} }, "skills": { "type": "array", "items": { "type": "string" } } } }, "history.ListResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/history.Record" } } } }, "history.Record": { "type": "object", "properties": { "bot_id": { "type": "string" }, "id": { "type": "string" }, "messages": { "type": "array", "items": { "type": "object", "additionalProperties": {} } }, "metadata": { "type": "object", "additionalProperties": {} }, "session_id": { "type": "string" }, "skills": { "type": "array", "items": { "type": "string" } }, "timestamp": { "type": "string" } } }, "mcp.ListResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/github_com_memohai_memoh_internal_mcp.Connection" } } } }, "mcp.UpsertRequest": { "type": "object", "properties": { "active": { "type": "boolean" }, "config": { "type": "object", "additionalProperties": {} }, "name": { "type": "string" }, "type": { "type": "string" } } }, "memory.DeleteResponse": { "type": "object", "properties": { "message": { "type": "string" } } }, "memory.EmbedInput": { "type": "object", "properties": { "image_url": { "type": "string" }, "text": { "type": "string" }, "video_url": { "type": "string" } } }, "memory.EmbedUpsertResponse": { "type": "object", "properties": { "dimensions": { "type": "integer" }, "item": { "$ref": "#/definitions/memory.MemoryItem" }, "model": { "type": "string" }, "provider": { "type": "string" } } }, "memory.MemoryItem": { "type": "object", "properties": { "agentId": { "type": "string" }, "botId": { "type": "string" }, "createdAt": { "type": "string" }, "hash": { "type": "string" }, "id": { "type": "string" }, "memory": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": {} }, "runId": { "type": "string" }, "score": { "type": "number" }, "sessionId": { "type": "string" }, "updatedAt": { "type": "string" } } }, "memory.Message": { "type": "object", "properties": { "content": { "type": "string" }, "role": { "type": "string" } } }, "memory.SearchResponse": { "type": "object", "properties": { "relations": { "type": "array", "items": {} }, "results": { "type": "array", "items": { "$ref": "#/definitions/memory.MemoryItem" } } } }, "memory.UpdateRequest": { "type": "object", "properties": { "embedding_enabled": { "type": "boolean" }, "memory": { "type": "string" }, "memory_id": { "type": "string" } } }, "models.AddRequest": { "type": "object", "required": [ "llm_provider_id", "model_id", "name", "type" ], "properties": { "dimensions": { "type": "integer" }, "input": { "type": "array", "items": { "type": "string" } }, "is_multimodal": { "type": "boolean" }, "llm_provider_id": { "type": "string" }, "model_id": { "type": "string" }, "name": { "type": "string" }, "type": { "$ref": "#/definitions/models.ModelType" } } }, "models.AddResponse": { "type": "object", "properties": { "id": { "type": "string" }, "model_id": { "type": "string" } } }, "models.CountResponse": { "type": "object", "properties": { "count": { "type": "integer" } } }, "models.GetResponse": { "type": "object", "required": [ "llm_provider_id", "model_id", "name", "type" ], "properties": { "dimensions": { "type": "integer" }, "input": { "type": "array", "items": { "type": "string" } }, "is_multimodal": { "type": "boolean" }, "llm_provider_id": { "type": "string" }, "model_id": { "type": "string" }, "name": { "type": "string" }, "type": { "$ref": "#/definitions/models.ModelType" } } }, "models.ModelType": { "type": "string", "enum": [ "chat", "embedding" ], "x-enum-varnames": [ "ModelTypeChat", "ModelTypeEmbedding" ] }, "models.UpdateRequest": { "type": "object", "required": [ "llm_provider_id", "model_id", "name", "type" ], "properties": { "dimensions": { "type": "integer" }, "input": { "type": "array", "items": { "type": "string" } }, "is_multimodal": { "type": "boolean" }, "llm_provider_id": { "type": "string" }, "model_id": { "type": "string" }, "name": { "type": "string" }, "type": { "$ref": "#/definitions/models.ModelType" } } }, "providers.ClientType": { "type": "string", "enum": [ "openai", "openai-compat", "anthropic", "google", "ollama" ], "x-enum-varnames": [ "ClientTypeOpenAI", "ClientTypeOpenAICompat", "ClientTypeAnthropic", "ClientTypeGoogle", "ClientTypeOllama" ] }, "providers.CountResponse": { "type": "object", "properties": { "count": { "type": "integer" } } }, "providers.CreateRequest": { "type": "object", "required": [ "base_url", "client_type", "name" ], "properties": { "api_key": { "type": "string" }, "base_url": { "type": "string" }, "client_type": { "$ref": "#/definitions/providers.ClientType" }, "metadata": { "type": "object", "additionalProperties": {} }, "name": { "type": "string" } } }, "providers.GetResponse": { "type": "object", "required": [ "base_url", "client_type", "created_at", "id", "name", "updated_at" ], "properties": { "api_key": { "description": "masked in response", "type": "string" }, "base_url": { "type": "string" }, "client_type": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": {} }, "name": { "type": "string" }, "updated_at": { "type": "string" } } }, "providers.UpdateRequest": { "type": "object", "properties": { "api_key": { "type": "string" }, "base_url": { "type": "string" }, "client_type": { "$ref": "#/definitions/providers.ClientType" }, "metadata": { "type": "object", "additionalProperties": {} }, "name": { "type": "string" } } }, "schedule.CreateRequest": { "type": "object", "properties": { "command": { "type": "string" }, "description": { "type": "string" }, "enabled": { "type": "boolean" }, "max_calls": { "$ref": "#/definitions/schedule.NullableInt" }, "name": { "type": "string" }, "pattern": { "type": "string" } } }, "schedule.ListResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/schedule.Schedule" } } } }, "schedule.NullableInt": { "type": "object", "properties": { "set": { "type": "boolean" }, "value": { "type": "integer" } } }, "schedule.Schedule": { "type": "object", "properties": { "bot_id": { "type": "string" }, "command": { "type": "string" }, "created_at": { "type": "string" }, "current_calls": { "type": "integer" }, "description": { "type": "string" }, "enabled": { "type": "boolean" }, "id": { "type": "string" }, "max_calls": { "type": "integer" }, "name": { "type": "string" }, "pattern": { "type": "string" }, "updated_at": { "type": "string" } } }, "schedule.UpdateRequest": { "type": "object", "properties": { "command": { "type": "string" }, "description": { "type": "string" }, "enabled": { "type": "boolean" }, "max_calls": { "$ref": "#/definitions/schedule.NullableInt" }, "name": { "type": "string" }, "pattern": { "type": "string" } } }, "settings.Settings": { "type": "object", "required": [ "allow_guest", "chat_model_id", "embedding_model_id", "language", "max_context_load_time", "memory_model_id" ], "properties": { "allow_guest": { "type": "boolean" }, "chat_model_id": { "type": "string" }, "embedding_model_id": { "type": "string" }, "language": { "type": "string" }, "max_context_load_time": { "type": "integer" }, "memory_model_id": { "type": "string" } } }, "settings.UpsertRequest": { "type": "object", "properties": { "allow_guest": { "type": "boolean" }, "chat_model_id": { "type": "string" }, "embedding_model_id": { "type": "string" }, "language": { "type": "string" }, "max_context_load_time": { "type": "integer" }, "memory_model_id": { "type": "string" } } }, "subagent.AddSkillsRequest": { "type": "object", "properties": { "skills": { "type": "array", "items": { "type": "string" } } } }, "subagent.ContextResponse": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "additionalProperties": {} } } } }, "subagent.CreateRequest": { "type": "object", "properties": { "description": { "type": "string" }, "messages": { "type": "array", "items": { "type": "object", "additionalProperties": {} } }, "metadata": { "type": "object", "additionalProperties": {} }, "name": { "type": "string" }, "skills": { "type": "array", "items": { "type": "string" } } } }, "subagent.ListResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/subagent.Subagent" } } } }, "subagent.SkillsResponse": { "type": "object", "properties": { "skills": { "type": "array", "items": { "type": "string" } } } }, "subagent.Subagent": { "type": "object", "properties": { "bot_id": { "type": "string" }, "created_at": { "type": "string" }, "deleted": { "type": "boolean" }, "deleted_at": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "string" }, "messages": { "type": "array", "items": { "type": "object", "additionalProperties": {} } }, "metadata": { "type": "object", "additionalProperties": {} }, "name": { "type": "string" }, "skills": { "type": "array", "items": { "type": "string" } }, "updated_at": { "type": "string" } } }, "subagent.UpdateContextRequest": { "type": "object", "properties": { "messages": { "type": "array", "items": { "type": "object", "additionalProperties": {} } } } }, "subagent.UpdateRequest": { "type": "object", "properties": { "description": { "type": "string" }, "metadata": { "type": "object", "additionalProperties": {} }, "name": { "type": "string" } } }, "subagent.UpdateSkillsRequest": { "type": "object", "properties": { "skills": { "type": "array", "items": { "type": "string" } } } }, "users.CreateUserRequest": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "email": { "type": "string" }, "is_active": { "type": "boolean" }, "password": { "type": "string" }, "role": { "type": "string" }, "username": { "type": "string" } } }, "users.ListUsersResponse": { "type": "object", "properties": { "items": { "type": "array", "items": { "$ref": "#/definitions/users.User" } } } }, "users.ResetPasswordRequest": { "type": "object", "properties": { "new_password": { "type": "string" } } }, "users.UpdatePasswordRequest": { "type": "object", "properties": { "current_password": { "type": "string" }, "new_password": { "type": "string" } } }, "users.UpdateProfileRequest": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" } } }, "users.UpdateUserRequest": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "display_name": { "type": "string" }, "is_active": { "type": "boolean" }, "role": { "type": "string" } } }, "users.User": { "type": "object", "properties": { "avatar_url": { "type": "string" }, "created_at": { "type": "string" }, "display_name": { "type": "string" }, "email": { "type": "string" }, "id": { "type": "string" }, "is_active": { "type": "boolean" }, "last_login_at": { "type": "string" }, "role": { "type": "string" }, "updated_at": { "type": "string" }, "username": { "type": "string" } } } } }` // SwaggerInfo holds exported Swagger Info so clients can modify it var SwaggerInfo = &swag.Spec{ Version: "1.0.0", Host: "", BasePath: "", Schemes: []string{}, Title: "Memoh API", Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, LeftDelim: "{{", RightDelim: "}}", } func init() { swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo) }