Files
Memoh/spec/docs.go
T
Menci d5b410d7e3 refactor(workspace): new workspace v3 container architecture (#244)
* feat(mcp): workspace container with bridge architecture

Migrate MCP containers to use UDS-based bridge communication instead of
TCP gRPC. Containers now mount runtime binaries and Unix domain sockets
from the host, eliminating the need for a dedicated MCP Docker image.

- Remove Dockerfile.mcp and entrypoint.sh in favor of standard base images
- Add toolkit Dockerfile for building MCP binary separately
- Containers use bind mounts for /opt/memoh (runtime) and /run/memoh (UDS)
- Update all config files with new runtime_path and socket_dir settings
- Support custom base images per bot (debian, alpine, ubuntu, etc.)
- Legacy container detection and TCP fallback for pre-bridge containers
- Frontend: add base image selector in container creation UI

* feat(container): SSE progress bar for container creation

Add real-time progress feedback during container image pull and creation
using Server-Sent Events, without breaking the existing synchronous JSON
API (content negotiation via Accept header).

Backend:
- Add PullProgress/LayerStatus types and OnProgress callback to
  PullImageOptions (containerd service layer)
- DefaultService.PullImage polls ContentStore.ListStatuses every 500ms
  when OnProgress is set; AppleService ignores it
- CreateContainer handler checks Accept: text/event-stream and switches
  to SSE branch: pulling → pull_progress → creating → complete/error

Frontend:
- handleCreateContainer/handleRecreateContainer use fetch + SSE instead
  of the SDK's synchronous postBotsByBotIdContainer
- Progress bar shows layer-level pull progress (offset/total) during
  pulling phase and indeterminate animation during creating phase
- i18n keys added for pullingImage and creatingContainer (en/zh)

* fix(container): clear stale legacy route and type create SSE

* fix(ci): resolve lint errors and arm64 musl node.js download

- Fix unused-receiver lint: rename `s` to `_` on stub methods in
  manager_legacy_test.go
- Fix sloglint: use slog.DiscardHandler instead of
  slog.NewTextHandler(io.Discard, nil)
- Handle missing arm64 musl Node.js builds: unofficial-builds.nodejs.org
  does not provide arm64 musl binaries, fall back to glibc build

* fix(lint): address errcheck, staticcheck, and gosec findings

- Discard os.Setenv/os.Remove return values explicitly with _
- Use omitted receiver name instead of _ (staticcheck ST1006)
- Tighten directory permissions from 0o755 to 0o750 (gosec G301)

* fix(lint): sanitize socket path to satisfy gosec G703

filepath.Clean the env-sourced socket path before os.Remove
to avoid path-traversal taint warning.

* fix(lint): use nolint directive for gosec G703 on socket path

filepath.Clean does not satisfy gosec's taint analysis. The socket
path comes from MCP_SOCKET_PATH env (operator-configured) or a
compiled-in default, not from end-user input.

* refactor: rename MCP container/bridge to workspace/bridge

Split internal/mcp/ to separate container lifecycle management from
Model Context Protocol connections, eliminating naming confusion:

- internal/mcp/ (container mgmt) → internal/workspace/
- internal/mcp/mcpclient/ → internal/workspace/bridge/
- internal/mcp/mcpcontainer/ → internal/workspace/bridgepb/
- cmd/mcp/ → cmd/bridge/
- config: MCPConfig → WorkspaceConfig, [mcp] → [workspace]
- container prefix: mcp-{id} → workspace-{id}
- labels: mcp.bot_id → memoh.bot_id, add memoh.workspace=v1
- socket: mcp.sock → bridge.sock, env BRIDGE_SOCKET_PATH
- runtime: /opt/memoh/runtime/mcp → /opt/memoh/runtime/bridge
- devenv: mcp-build.sh → bridge-build.sh

Legacy containers (mcp- prefix) detected by container name prefix
and handled via existing fallback path.

* fix(container): use memoh.workspace=v3 label value

* refactor(container): drop LegacyBotLabelKey, infer bot ID from container name

Legacy containers use mcp-{botID} naming, so bot ID can be derived
via TrimPrefix instead of looking up the mcp.bot_id label.

* fix(workspace): resolve containers via manager and drop gateway container ID

* docs: fix stale mcp references in AGENTS.md and DEPLOYMENT.md

* refactor(workspace): move container lifecycle ownership into manager

* dev: isolate local devenv from prod config

* toolkit: support musl node runtime

* containerd: fix fallback resolv.conf permissions

* web: preserve container create progress on completion

* web: add bot creation wait hint

* fix(workspace): preserve image selection across recreate

* feat(web): shorten default docker hub image refs

* fix(container): address code review findings

- Remove synchronous CreateContainer path (SSE-only now)
- Move flusher check before WriteHeader to avoid committed 200 on error
- Fix legacy container IP not cached via ensureContainerAndTask path
- Add atomic guard to prevent stale pull_progress after PullImage returns
- Defensive copy for tzEnv slice to avoid mutating shared backing array
- Restore network failure severity in restartContainer (return + Error)
- Extract duplicate progress bar into ContainerCreateProgress component
- Fix codesync comments to use repo-relative paths
- Add SaaS image validation note and kernel version comment on reaper

* refactor(devenv): extract toolkit install into shared script

Unify the Node.js + uv download logic into docker/toolkit/install.sh,
used by the production Dockerfile and runnable locally for dev.

Dev environment no longer bakes toolkit into the Docker image — it is
volume-mounted from .toolkit/ instead, so wrapper script changes take
effect immediately without rebuilding. The entrypoint checks for the
toolkit directory and prints a clear error if missing.

* fix(ci): address go ci failures

* chore(docker): remove unused containerd image

* refactor(config): rename workspace image key

* fix(workspace): fix legacy container data loss on migration and stop swallowing errors

Three root causes were identified and fixed:

1. Delete() used hardcoded "workspace-" prefix to look up legacy "mcp-"
   containers, causing GetContainer to return NotFound. CleanupBotContainer
   then silently skipped the error and deleted the DB record without ever
   calling PreserveData. Fix: resolve the actual container ID via
   ContainerID() (DB → label → scan) before operating.

2. Multiple restore error paths were silently swallowed (logged as Warn
   but not returned), so the user saw HTTP 200/204 with no data and no
   error. Fix: all errors in the preserve/restore chain now block the
   workflow and propagate to the caller.

3. tarGzDir used cached DirEntry.Info() for tar header size, which on
   overlayfs can differ from the actual file size, causing "archive/tar:
   write too long". Fix: open the file first, Fstat the fd for a
   race-free size, and use LimitReader as a safeguard.

Also adds a "restoring" SSE phase so the frontend shows a progress
indicator ("Restoring data, this may take a while...") during data
migration on container recreation.

* refactor(workspace): single-point container ID resolution

Replace the `containerID func(string) string` field with a single
`resolveContainerID(ctx, botID)` method that resolves the actual
container ID via DB → label → scan → fallback. All ~16 lookup
callsites across manager.go, dataio.go, versioning.go, and
manager_lifecycle.go now go through this single resolver, which
correctly handles both legacy "mcp-" and new "workspace-" containers.

Only `ensureBotWithImage` inlines `ContainerPrefix + botID` for
creating brand-new containers — every other path resolves dynamically.

* fix(web): show progress during data backup phase of container recreate

The recreate flow (delete with preserve_data + create with restore_data)
blocked on the DELETE call while backing up /data with no progress
indication. Add a 'preserving' phase to the progress component so
users see "正在备份数据..." instead of an unexplained hang.

* chore: remove [MYDEBUG] debug logging

Clean up all 112 temporary debug log statements added during the
legacy container migration investigation. Kept only meaningful
warn-level logs for non-fatal errors (network teardown, rename
failures).
2026-03-18 15:19:09 +08:00

12761 lines
428 KiB
Go

// 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"
}
}
}
}
},
"/auth/refresh": {
"post": {
"security": [
{
"BearerAuth": []
}
],
"description": "Issue a new JWT using the existing claims with updated expiration",
"tags": [
"auth"
],
"summary": "Refresh Token",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.RefreshResponse"
}
},
"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}/access/channel_identities": {
"get": {
"description": "Search locally observed channel identity candidates for bot access control",
"tags": [
"bots"
],
"summary": "Search access channel identities",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Search query",
"name": "q",
"in": "query"
},
{
"type": "integer",
"description": "Max results",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/acl.ChannelIdentityCandidateListResponse"
}
},
"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}/access/channel_identities/{channel_identity_id}/conversations": {
"get": {
"description": "List previously observed conversation candidates for a channel identity under a bot",
"tags": [
"bots"
],
"summary": "List observed conversations for a channel identity",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Channel Identity ID",
"name": "channel_identity_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/acl.ObservedConversationCandidateListResponse"
}
},
"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}/access/users": {
"get": {
"description": "Search user candidates for bot access control",
"tags": [
"bots"
],
"summary": "Search access users",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Search query",
"name": "q",
"in": "query"
},
{
"type": "integer",
"description": "Max results",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/acl.UserCandidateListResponse"
}
},
"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}/blacklist": {
"get": {
"description": "List guest deny rules for chat trigger",
"tags": [
"bots"
],
"summary": "List bot blacklist",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/acl.ListRulesResponse"
}
},
"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"
}
}
}
},
"put": {
"description": "Add a guest deny rule for chat trigger",
"tags": [
"bots"
],
"summary": "Upsert bot blacklist entry",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Blacklist payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/acl.UpsertRuleRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/acl.Rule"
}
},
"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}/blacklist/{rule_id}": {
"delete": {
"description": "Delete a guest deny rule by rule ID",
"tags": [
"bots"
],
"summary": "Delete bot blacklist entry",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Rule ID",
"name": "rule_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}/cli/messages": {
"post": {
"description": "Post a user message (with optional attachments) through the local channel pipeline.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"local-channel"
],
"summary": "Send a message to a local channel",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Message payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.LocalChannelMessageRequest"
}
}
],
"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"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/cli/stream": {
"get": {
"description": "Open a persistent SSE connection to receive real-time stream events for the given bot.",
"produces": [
"text/event-stream"
],
"tags": [
"local-channel"
],
"summary": "Subscribe to local channel events via SSE",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "SSE stream",
"schema": {
"type": "string"
}
},
"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}/cli/ws": {
"get": {
"description": "Upgrade to WebSocket for bidirectional chat streaming with abort support.",
"tags": [
"local-channel"
],
"summary": "WebSocket chat endpoint",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"101": {
"description": "Switching Protocols",
"schema": {
"type": "string"
}
},
"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}/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
},
{
"type": "boolean",
"description": "Export /data before deletion",
"name": "preserve_data",
"in": "query"
}
],
"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/data/export": {
"post": {
"produces": [
"application/gzip"
],
"tags": [
"containerd"
],
"summary": "Export container /data as a tar.gz archive",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/container/data/import": {
"post": {
"consumes": [
"multipart/form-data"
],
"tags": [
"containerd"
],
"summary": "Import a tar.gz archive into container /data",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "file",
"description": "tar.gz archive",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/container/data/restore": {
"post": {
"tags": [
"containerd"
],
"summary": "Restore previously preserved data into container",
"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/fs": {
"get": {
"description": "Returns metadata about a file or directory at the given container path",
"tags": [
"containerd"
],
"summary": "Get file or directory info",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Container path",
"name": "path",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.FSFileInfo"
}
},
"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}/container/fs/delete": {
"post": {
"description": "Deletes a file or directory at the given container path",
"tags": [
"containerd"
],
"summary": "Delete a file or directory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Delete request",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.FSDeleteRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.fsOpResponse"
}
},
"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}/container/fs/download": {
"get": {
"description": "Downloads a file from the container with appropriate Content-Type",
"produces": [
"application/octet-stream"
],
"tags": [
"containerd"
],
"summary": "Download a file as binary stream",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Container file path",
"name": "path",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "file"
}
},
"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/list": {
"get": {
"description": "Lists files and directories at the given container path",
"tags": [
"containerd"
],
"summary": "List directory contents",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Container directory path",
"name": "path",
"in": "query",
"required": true
}
],
"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"
}
}
}
}
},
"/bots/{bot_id}/container/fs/mkdir": {
"post": {
"description": "Creates a directory (and parents) at the given container path",
"tags": [
"containerd"
],
"summary": "Create a directory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Mkdir request",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.FSMkdirRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.fsOpResponse"
}
},
"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}/container/fs/read": {
"get": {
"description": "Reads the content of a file and returns it as a JSON string",
"tags": [
"containerd"
],
"summary": "Read file content as text",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Container 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"
}
}
}
}
},
"/bots/{bot_id}/container/fs/rename": {
"post": {
"description": "Renames or moves a file/directory from oldPath to newPath",
"tags": [
"containerd"
],
"summary": "Rename or move a file/directory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Rename request",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.FSRenameRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.fsOpResponse"
}
},
"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}/container/fs/upload": {
"post": {
"description": "Uploads a binary file to the given container path",
"consumes": [
"multipart/form-data"
],
"tags": [
"containerd"
],
"summary": "Upload a file via multipart form",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Destination container path",
"name": "path",
"in": "formData",
"required": true
},
{
"type": "file",
"description": "File to upload",
"name": "file",
"in": "formData",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.FSUploadResponse"
}
},
"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}/container/fs/write": {
"post": {
"description": "Creates or overwrites a file with the provided text content",
"tags": [
"containerd"
],
"summary": "Write text content to a file",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Write request",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.FSWriteRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.fsOpResponse"
}
},
"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}/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"
}
},
"501": {
"description": "Snapshots currently not supported on this backend",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"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"
}
},
"501": {
"description": "Snapshots currently not supported on this backend",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/container/snapshots/rollback": {
"post": {
"tags": [
"containerd"
],
"summary": "Rollback container to a previous snapshot version",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Rollback payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.RollbackRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object"
}
},
"400": {
"description": "Bad Request",
"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}/container/terminal": {
"get": {
"tags": [
"containerd"
],
"summary": "Check terminal availability for bot container",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.terminalInfoResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/container/terminal/ws": {
"get": {
"tags": [
"containerd"
],
"summary": "Interactive WebSocket terminal for bot container",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "integer",
"default": 80,
"description": "Initial terminal columns",
"name": "cols",
"in": "query"
},
{
"type": "integer",
"default": 24,
"description": "Initial terminal rows",
"name": "rows",
"in": "query"
},
{
"type": "string",
"description": "Auth token",
"name": "token",
"in": "query"
}
],
"responses": {
"101": {
"description": "WebSocket upgrade"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/email-bindings": {
"get": {
"produces": [
"application/json"
],
"tags": [
"email-bindings"
],
"summary": "List email bindings for a bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/email.BindingResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"email-bindings"
],
"summary": "Bind an email provider to a bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Binding configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/email.CreateBindingRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/email.BindingResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/email-bindings/{id}": {
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"email-bindings"
],
"summary": "Update an email binding",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Binding ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated binding",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/email.UpdateBindingRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/email.BindingResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"email-bindings"
],
"summary": "Remove an email binding",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Binding ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/email-outbox": {
"get": {
"produces": [
"application/json"
],
"tags": [
"email-outbox"
],
"summary": "List outbox emails for a bot (audit)",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "integer",
"default": 20,
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"default": 0,
"description": "Offset",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": true
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/email-outbox/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"email-outbox"
],
"summary": "Get outbox email detail",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Email ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/email.OutboxItemResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/heartbeat/logs": {
"get": {
"description": "List heartbeat execution logs for a bot",
"tags": [
"heartbeat"
],
"summary": "List heartbeat logs",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Before timestamp (RFC3339)",
"name": "before",
"in": "query"
},
{
"type": "integer",
"default": 50,
"description": "Limit",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/heartbeat.ListLogsResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete all heartbeat execution logs for a bot",
"tags": [
"heartbeat"
],
"summary": "Delete heartbeat logs",
"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}/inbox": {
"get": {
"description": "List inbox items for a bot with optional filters",
"tags": [
"inbox"
],
"summary": "List inbox items",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Filter by read status (true/false)",
"name": "is_read",
"in": "query"
},
{
"type": "string",
"description": "Filter by source",
"name": "source",
"in": "query"
},
{
"type": "integer",
"default": 50,
"description": "Max items to return",
"name": "limit",
"in": "query"
},
{
"type": "integer",
"default": 0,
"description": "Offset for pagination",
"name": "offset",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/inbox.Item"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a new inbox item (for external integrations)",
"tags": [
"inbox"
],
"summary": "Create inbox item",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Inbox item payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/inbox.CreateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/inbox.Item"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/inbox/count": {
"get": {
"description": "Count unread and total inbox items",
"tags": [
"inbox"
],
"summary": "Count inbox items",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/inbox.CountResult"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/inbox/mark-read": {
"post": {
"description": "Batch mark inbox items as read",
"tags": [
"inbox"
],
"summary": "Mark inbox items as read",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Item IDs to mark as read",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.markReadRequest"
}
}
],
"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}/inbox/{id}": {
"get": {
"description": "Get a single inbox item by ID",
"tags": [
"inbox"
],
"summary": "Get inbox item",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Inbox item ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/inbox.Item"
}
},
"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 single inbox item",
"tags": [
"inbox"
],
"summary": "Delete inbox item",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Inbox item 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}/mcp": {
"get": {
"description": "List MCP connections for a bot",
"tags": [
"mcp"
],
"summary": "List MCP connections",
"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": [
{
"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-ops/batch-delete": {
"post": {
"description": "Delete multiple MCP connections by IDs.",
"tags": [
"mcp"
],
"summary": "Batch delete MCP connections",
"parameters": [
{
"description": "IDs to delete",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.BatchDeleteRequest"
}
}
],
"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-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/{connection_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": "Connection ID",
"name": "connection_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/export": {
"get": {
"description": "Export all MCP connections for a bot in standard mcpServers format.",
"tags": [
"mcp"
],
"summary": "Export MCP connections",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcp.ExportResponse"
}
},
"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/import": {
"put": {
"description": "Batch import MCP connections from standard mcpServers format. Existing connections (matched by name) get config updated with is_active preserved. New connections are created as active.",
"tags": [
"mcp"
],
"summary": "Import MCP connections",
"parameters": [
{
"description": "mcpServers dict",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/mcp.ImportRequest"
}
}
],
"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"
}
},
"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": "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": "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": "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}/mcp/{id}/oauth/authorize": {
"post": {
"description": "Generate PKCE and return authorization URL for the user to authorize",
"tags": [
"mcp"
],
"summary": "Start OAuth authorization flow",
"parameters": [
{
"type": "string",
"description": "MCP connection ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Optional client_id",
"name": "payload",
"in": "body",
"schema": {
"$ref": "#/definitions/handlers.oauthAuthorizeRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcp.AuthorizeResult"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/oauth/discover": {
"post": {
"description": "Probe MCP server URL for OAuth requirements and discover authorization server metadata",
"tags": [
"mcp"
],
"summary": "Discover OAuth configuration for MCP server",
"parameters": [
{
"type": "string",
"description": "MCP connection ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Optional URL override",
"name": "payload",
"in": "body",
"schema": {
"$ref": "#/definitions/handlers.oauthDiscoverRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcp.DiscoveryResult"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/oauth/exchange": {
"post": {
"description": "Frontend callback page calls this to exchange the authorization code for access/refresh tokens",
"tags": [
"mcp"
],
"summary": "Exchange OAuth authorization code for tokens",
"parameters": [
{
"description": "Authorization code and state",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.oauthExchangeRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "boolean"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/oauth/status": {
"get": {
"description": "Returns the current OAuth status including whether tokens are available",
"tags": [
"mcp"
],
"summary": "Get OAuth status for MCP connection",
"parameters": [
{
"type": "string",
"description": "MCP connection ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/mcp.OAuthStatus"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/oauth/token": {
"delete": {
"description": "Clears stored OAuth tokens",
"tags": [
"mcp"
],
"summary": "Revoke OAuth tokens for MCP connection",
"parameters": [
{
"type": "string",
"description": "MCP connection ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/mcp/{id}/probe": {
"post": {
"description": "Probe a MCP connection to discover tools and verify connectivity",
"tags": [
"mcp"
],
"summary": "Probe MCP connection",
"parameters": [
{
"type": "string",
"description": "MCP connection ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.ProbeResponse"
}
},
"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": {
"get": {
"description": "List all memories in the bot-shared namespace",
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Get all memories",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "boolean",
"description": "Skip optional stats in memory search response",
"name": "no_stats",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.SearchResponse"
}
},
"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"
}
},
"503": {
"description": "Service Unavailable",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Add memory into the bot-shared namespace",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Add memory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Memory add payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.memoryAddPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.SearchResponse"
}
},
"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"
}
},
"503": {
"description": "Service Unavailable",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete specific memories by IDs, or delete all memories if no IDs are provided",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Delete memories",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Optional: specify memory_ids to delete; if omitted, deletes all",
"name": "payload",
"in": "body",
"schema": {
"$ref": "#/definitions/handlers.memoryDeletePayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.DeleteResponse"
}
},
"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"
}
},
"503": {
"description": "Service Unavailable",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/memory/compact": {
"post": {
"description": "Consolidate memories by merging similar/redundant entries using LLM.\n\n**ratio** (required, range (0,1]):\n- 0.8 = light compression, mostly dedup, keep ~80% of entries\n- 0.5 = moderate compression, merge similar facts, keep ~50%\n- 0.3 = aggressive compression, heavily consolidate, keep ~30%\n\n**decay_days** (optional): enable time decay — memories older than N days are treated as low priority and more likely to be merged/dropped.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Compact memories",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "ratio (0,1] required; decay_days optional",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.memoryCompactPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.CompactResult"
}
},
"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"
}
},
"503": {
"description": "Service Unavailable",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/memory/rebuild": {
"post": {
"description": "Read memory files from the container filesystem (source of truth) and restore missing entries to memory storage",
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Rebuild memories from filesystem",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.RebuildResult"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"503": {
"description": "Service Unavailable",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/memory/search": {
"post": {
"description": "Search memory in the bot-shared namespace",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Search memory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Memory search payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.memorySearchPayload"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.SearchResponse"
}
},
"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"
}
},
"503": {
"description": "Service Unavailable",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/memory/status": {
"get": {
"description": "Get the resolved memory runtime status for a bot, including index health and source counts",
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Get memory runtime status",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.MemoryStatusResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"503": {
"description": "Service Unavailable",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/memory/usage": {
"get": {
"description": "Query the estimated storage usage of current memories",
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Get memory usage",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.UsageResponse"
}
},
"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"
}
},
"503": {
"description": "Service Unavailable",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/memory/{id}": {
"delete": {
"description": "Delete a single memory by its ID",
"produces": [
"application/json"
],
"tags": [
"memory"
],
"summary": "Delete a single memory",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Memory ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.DeleteResponse"
}
},
"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"
}
},
"503": {
"description": "Service Unavailable",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/messages": {
"get": {
"description": "List messages for a bot history with optional pagination",
"produces": [
"application/json"
],
"tags": [
"messages"
],
"summary": "List bot history messages",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "integer",
"description": "Limit",
"name": "limit",
"in": "query"
},
{
"type": "string",
"description": "Before",
"name": "before",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/message.Message"
}
}
}
},
"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"
}
}
}
},
"delete": {
"description": "Clear all persisted bot-level history messages",
"produces": [
"application/json"
],
"tags": [
"messages"
],
"summary": "Delete all bot history messages",
"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"
}
},
"403": {
"description": "Forbidden",
"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",
"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": [
{
"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": "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": "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": "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",
"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": [
{
"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": [
{
"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",
"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",
"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": [
{
"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": "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": "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": "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": "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": "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": "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": "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": "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/{bot_id}/token-usage": {
"get": {
"description": "Get daily aggregated token usage for a bot, split by chat and heartbeat, with optional model filter and per-model breakdown",
"tags": [
"token-usage"
],
"summary": "Get token usage statistics",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Start date (YYYY-MM-DD)",
"name": "from",
"in": "query",
"required": true
},
{
"type": "string",
"description": "End date exclusive (YYYY-MM-DD)",
"name": "to",
"in": "query",
"required": true
},
{
"type": "string",
"description": "Optional model UUID to filter by",
"name": "model_id",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.TokenUsageResponse"
}
},
"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}/tools": {
"post": {
"description": "MCP endpoint for tool discovery and invocation.",
"tags": [
"containerd"
],
"summary": "Unified MCP tools gateway",
"parameters": [
{
"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}/tts/synthesize": {
"post": {
"description": "Stream-synthesize text using the bot's configured TTS model, write to temp file",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"bots"
],
"summary": "Synthesize speech for a bot",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Text to synthesize",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.synthesizeRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.synthesizeResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/web/messages": {
"post": {
"description": "Post a user message (with optional attachments) through the local channel pipeline.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"local-channel"
],
"summary": "Send a message to a local channel",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Message payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.LocalChannelMessageRequest"
}
}
],
"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"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/bots/{bot_id}/web/stream": {
"get": {
"description": "Open a persistent SSE connection to receive real-time stream events for the given bot.",
"produces": [
"text/event-stream"
],
"tags": [
"local-channel"
],
"summary": "Subscribe to local channel events via SSE",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "SSE stream",
"schema": {
"type": "string"
}
},
"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}/web/ws": {
"get": {
"description": "Upgrade to WebSocket for bidirectional chat streaming with abort support.",
"tags": [
"local-channel"
],
"summary": "WebSocket chat endpoint",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"101": {
"description": "Switching Protocols",
"schema": {
"type": "string"
}
},
"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}/whitelist": {
"get": {
"description": "List guest allow rules for chat trigger",
"tags": [
"bots"
],
"summary": "List bot whitelist",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/acl.ListRulesResponse"
}
},
"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"
}
}
}
},
"put": {
"description": "Add a guest allow rule for chat trigger",
"tags": [
"bots"
],
"summary": "Upsert bot whitelist entry",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"description": "Whitelist payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/acl.UpsertRuleRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/acl.Rule"
}
},
"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}/whitelist/{rule_id}": {
"delete": {
"description": "Delete a guest allow rule by rule ID",
"tags": [
"bots"
],
"summary": "Delete bot whitelist entry",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "bot_id",
"in": "path",
"required": true
},
{
"type": "string",
"description": "Rule ID",
"name": "rule_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/{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": {
"202": {
"description": "Accepted",
"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}": {
"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"
}
}
}
},
"delete": {
"description": "Remove bot channel configuration",
"tags": [
"bots"
],
"summary": "Delete 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": {
"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/{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_chat": {
"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}/channel/{platform}/status": {
"patch": {
"description": "Update bot channel enabled/disabled status",
"tags": [
"bots"
],
"summary": "Update bot channel status",
"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 status payload",
"name": "payload",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/channel.UpdateChannelStatusRequest"
}
}
],
"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}/checks": {
"get": {
"description": "Evaluate bot attached resource checks in runtime",
"tags": [
"bots"
],
"summary": "List bot runtime checks",
"parameters": [
{
"type": "string",
"description": "Bot ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/bots.ListChecksResponse"
}
},
"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"
}
}
}
}
},
"/browser-contexts": {
"get": {
"description": "List all browser context configurations",
"produces": [
"application/json"
],
"tags": [
"browser-contexts"
],
"summary": "List browser contexts",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/browsercontexts.BrowserContext"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a browser context configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"browser-contexts"
],
"summary": "Create a browser context",
"parameters": [
{
"description": "Browser context configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/browsercontexts.CreateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/browsercontexts.BrowserContext"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/browser-contexts/cores": {
"get": {
"description": "Get the list of browser cores available in the Browser Gateway container",
"produces": [
"application/json"
],
"tags": [
"browser-contexts"
],
"summary": "Get available browser cores",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.BrowserCoresResponse"
}
},
"502": {
"description": "Bad Gateway",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/browser-contexts/{id}": {
"get": {
"description": "Get browser context by ID",
"produces": [
"application/json"
],
"tags": [
"browser-contexts"
],
"summary": "Get a browser context",
"parameters": [
{
"type": "string",
"description": "Browser Context ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/browsercontexts.BrowserContext"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Update browser context by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"browser-contexts"
],
"summary": "Update a browser context",
"parameters": [
{
"type": "string",
"description": "Browser Context ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/browsercontexts.UpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/browsercontexts.BrowserContext"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete browser context by ID",
"tags": [
"browser-contexts"
],
"summary": "Delete a browser context",
"parameters": [
{
"type": "string",
"description": "Browser Context 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"
}
}
}
}
},
"/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"
}
}
}
}
},
"/email-providers": {
"get": {
"produces": [
"application/json"
],
"tags": [
"email-providers"
],
"summary": "List email providers",
"parameters": [
{
"type": "string",
"description": "Provider type filter",
"name": "provider",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/email.ProviderResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"email-providers"
],
"summary": "Create an email provider",
"parameters": [
{
"description": "Email provider configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/email.CreateProviderRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/email.ProviderResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/email-providers/meta": {
"get": {
"description": "List available email provider types and config schemas",
"tags": [
"email-providers"
],
"summary": "List email provider metadata",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/email.ProviderMeta"
}
}
}
}
}
},
"/email-providers/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"email-providers"
],
"summary": "Get an email provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/email.ProviderResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"email-providers"
],
"summary": "Update an email provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/email.UpdateProviderRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/email.ProviderResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"email-providers"
],
"summary": "Delete an email provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/email-providers/{id}/oauth/authorize": {
"get": {
"description": "Returns the authorization URL to redirect the user to",
"tags": [
"email-oauth"
],
"summary": "Start OAuth2 authorization for an email provider",
"parameters": [
{
"type": "string",
"description": "Email provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/email-providers/{id}/oauth/status": {
"get": {
"tags": [
"email-oauth"
],
"summary": "Get OAuth2 status for an email provider",
"parameters": [
{
"type": "string",
"description": "Email provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.emailOAuthStatusResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/email-providers/{id}/oauth/token": {
"delete": {
"tags": [
"email-oauth"
],
"summary": "Revoke stored OAuth2 tokens for an email provider",
"parameters": [
{
"type": "string",
"description": "Email provider 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"
}
}
}
}
},
"/email/mailgun/webhook/{config_id}": {
"post": {
"description": "Receives inbound emails from Mailgun",
"tags": [
"email-webhook"
],
"summary": "Mailgun inbound email webhook",
"parameters": [
{
"type": "string",
"description": "Email provider config ID",
"name": "config_id",
"in": "path",
"required": true
}
],
"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"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/email/oauth/callback": {
"get": {
"description": "Handles the OAuth2 callback, exchanges the code for tokens",
"tags": [
"email-oauth"
],
"summary": "OAuth2 callback for email providers",
"parameters": [
{
"type": "string",
"description": "Authorization code",
"name": "code",
"in": "query",
"required": true
},
{
"type": "string",
"description": "State parameter",
"name": "state",
"in": "query",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/memory-providers": {
"get": {
"description": "List configured memory providers",
"produces": [
"application/json"
],
"tags": [
"memory-providers"
],
"summary": "List memory providers",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/adapters.ProviderGetResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a memory provider configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory-providers"
],
"summary": "Create a memory provider",
"parameters": [
{
"description": "Memory provider configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adapters.ProviderCreateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/adapters.ProviderGetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/memory-providers/meta": {
"get": {
"description": "List available memory provider types and config schemas",
"tags": [
"memory-providers"
],
"summary": "List memory provider metadata",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/adapters.ProviderMeta"
}
}
}
}
}
},
"/memory-providers/{id}": {
"get": {
"description": "Get memory provider by ID",
"produces": [
"application/json"
],
"tags": [
"memory-providers"
],
"summary": "Get a memory provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.ProviderGetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Update memory provider by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"memory-providers"
],
"summary": "Update a memory provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/adapters.ProviderUpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.ProviderGetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete memory provider by ID",
"tags": [
"memory-providers"
],
"summary": "Delete a memory provider",
"parameters": [
{
"type": "string",
"description": "Provider 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"
}
}
}
}
},
"/memory-providers/{id}/status": {
"get": {
"description": "Get runtime status data for a memory provider",
"produces": [
"application/json"
],
"tags": [
"memory-providers"
],
"summary": "Get memory provider status",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/adapters.ProviderStatusResponse"
}
},
"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": {
"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-responses, openai-completions, anthropic-messages, google-generative-ai)",
"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/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"
}
}
}
}
},
"/models/{id}/test": {
"post": {
"description": "Probe a model's provider endpoint using the model's real model_id and client_type to verify configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"models"
],
"summary": "Test model connectivity",
"parameters": [
{
"type": "string",
"description": "Model internal ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/models.TestResponse"
}
},
"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"
}
}
}
}
},
"/ping": {
"get": {
"tags": [
"system"
],
"summary": "Health check with server capabilities",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.PingResponse"
}
}
}
}
},
"/providers": {
"get": {
"description": "Get a list of all configured LLM providers",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "List all LLM providers",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/providers.GetResponse"
}
}
},
"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",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Count providers",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/providers.CountResponse"
}
},
"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}/import-models": {
"post": {
"description": "Fetch models from provider's /v1/models endpoint and import them",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Import models from provider",
"parameters": [
{
"type": "string",
"description": "Provider ID (UUID)",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Import configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/providers.ImportModelsRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/providers.ImportModelsResponse"
}
},
"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"
}
}
}
}
},
"/providers/{id}/test": {
"post": {
"description": "Probe a provider's base URL to check reachability, supported client types, and embedding support",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"providers"
],
"summary": "Test provider connectivity",
"parameters": [
{
"type": "string",
"description": "Provider ID (UUID)",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/providers.TestResponse"
}
},
"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"
}
}
}
}
},
"/search-providers": {
"get": {
"description": "List configured search providers",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search-providers"
],
"summary": "List search providers",
"parameters": [
{
"type": "string",
"description": "Provider filter (brave)",
"name": "provider",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/searchproviders.GetResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a search provider configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search-providers"
],
"summary": "Create a search provider",
"parameters": [
{
"description": "Search provider configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/searchproviders.CreateRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/searchproviders.GetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/search-providers/meta": {
"get": {
"description": "List available search provider types and config schemas",
"tags": [
"search-providers"
],
"summary": "List search provider metadata",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/searchproviders.ProviderMeta"
}
}
}
}
}
},
"/search-providers/{id}": {
"get": {
"description": "Get search provider by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search-providers"
],
"summary": "Get a search provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/searchproviders.GetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"description": "Update search provider by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search-providers"
],
"summary": "Update a search provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/searchproviders.UpdateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/searchproviders.GetResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"description": "Delete search provider by ID",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"search-providers"
],
"summary": "Delete a search provider",
"parameters": [
{
"type": "string",
"description": "Provider 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"
}
}
}
}
},
"/tts-models": {
"get": {
"produces": [
"application/json"
],
"tags": [
"tts-models"
],
"summary": "List all TTS models",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/tts.ModelResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Manually create a TTS model under a specific provider",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tts-models"
],
"summary": "Create a TTS model",
"parameters": [
{
"description": "TTS model configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/tts.CreateModelRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/tts.ModelResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/tts-models/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"tts-models"
],
"summary": "Get a TTS model",
"parameters": [
{
"type": "string",
"description": "Model ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tts.ModelResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tts-models"
],
"summary": "Update a TTS model",
"parameters": [
{
"type": "string",
"description": "Model ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/tts.UpdateModelRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tts.ModelResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"tts-models"
],
"summary": "Delete a TTS model",
"parameters": [
{
"type": "string",
"description": "Model ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/tts-models/{id}/capabilities": {
"get": {
"produces": [
"application/json"
],
"tags": [
"tts-models"
],
"summary": "Get TTS model capabilities",
"parameters": [
{
"type": "string",
"description": "Model ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tts.ModelCapabilities"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/tts-models/{id}/test": {
"post": {
"description": "Synthesize text using a specific model's config and return audio",
"consumes": [
"application/json"
],
"produces": [
"application/octet-stream"
],
"tags": [
"tts-models"
],
"summary": "Test TTS model synthesis",
"parameters": [
{
"type": "string",
"description": "Model ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Text to synthesize",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/tts.TestSynthesizeRequest"
}
}
],
"responses": {
"200": {
"description": "Audio data",
"schema": {
"type": "file"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/tts-providers": {
"get": {
"produces": [
"application/json"
],
"tags": [
"tts-providers"
],
"summary": "List TTS providers",
"parameters": [
{
"type": "string",
"description": "Provider type filter",
"name": "provider",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/tts.ProviderResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"post": {
"description": "Create a TTS provider and auto-import its available models",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tts-providers"
],
"summary": "Create a TTS provider",
"parameters": [
{
"description": "TTS provider configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/tts.CreateProviderRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/tts.ProviderResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/tts-providers/meta": {
"get": {
"description": "List available TTS provider types with their models and capabilities",
"tags": [
"tts-providers"
],
"summary": "List TTS provider metadata",
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/tts.ProviderMetaResponse"
}
}
}
}
}
},
"/tts-providers/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"tts-providers"
],
"summary": "Get a TTS provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tts.ProviderResponse"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"put": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"tts-providers"
],
"summary": "Update a TTS provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Updated configuration",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/tts.UpdateProviderRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/tts.ProviderResponse"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
},
"delete": {
"tags": [
"tts-providers"
],
"summary": "Delete a TTS provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No Content"
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/tts-providers/{id}/import-models": {
"post": {
"description": "Discover and import available models from the TTS adapter",
"produces": [
"application/json"
],
"tags": [
"tts-providers"
],
"summary": "Import models for a TTS provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/tts.ModelResponse"
}
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/tts-providers/{id}/models": {
"get": {
"produces": [
"application/json"
],
"tags": [
"tts-providers"
],
"summary": "List models for a TTS provider",
"parameters": [
{
"type": "string",
"description": "Provider ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/tts.ModelResponse"
}
}
},
"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/accounts.ListAccountsResponse"
}
},
"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/accounts.CreateAccountRequest"
}
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/accounts.Account"
}
},
"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/accounts.Account"
}
},
"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/accounts.UpdateProfileRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/accounts.Account"
}
},
"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.ChannelIdentityBinding"
}
},
"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.UpsertChannelIdentityConfigRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/channel.ChannelIdentityBinding"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/handlers.ErrorResponse"
}
}
}
}
},
"/users/me/identities": {
"get": {
"description": "List all channel identities linked to current user",
"tags": [
"users"
],
"summary": "List current user's channel identities",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.listMyIdentitiesResponse"
}
},
"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/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/accounts.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/accounts.Account"
}
},
"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/accounts.UpdateAccountRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/accounts.Account"
}
},
"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/accounts.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": {
"accounts.Account": {
"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"
}
}
},
"accounts.CreateAccountRequest": {
"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"
}
}
},
"accounts.ListAccountsResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/accounts.Account"
}
}
}
},
"accounts.ResetPasswordRequest": {
"type": "object",
"properties": {
"new_password": {
"type": "string"
}
}
},
"accounts.UpdateAccountRequest": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"display_name": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"role": {
"type": "string"
}
}
},
"accounts.UpdatePasswordRequest": {
"type": "object",
"properties": {
"current_password": {
"type": "string"
},
"new_password": {
"type": "string"
}
}
},
"accounts.UpdateProfileRequest": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"display_name": {
"type": "string"
}
}
},
"acl.ChannelIdentityCandidate": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"channel": {
"type": "string"
},
"channel_subject_id": {
"type": "string"
},
"display_name": {
"type": "string"
},
"id": {
"type": "string"
},
"linked_avatar_url": {
"type": "string"
},
"linked_display_name": {
"type": "string"
},
"linked_username": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"acl.ChannelIdentityCandidateListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/acl.ChannelIdentityCandidate"
}
}
}
},
"acl.ListRulesResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/acl.Rule"
}
}
}
},
"acl.ObservedConversationCandidate": {
"type": "object",
"properties": {
"channel": {
"type": "string"
},
"conversation_id": {
"type": "string"
},
"conversation_name": {
"type": "string"
},
"conversation_type": {
"type": "string"
},
"last_observed_at": {
"type": "string"
},
"route_id": {
"type": "string"
},
"thread_id": {
"type": "string"
}
}
},
"acl.ObservedConversationCandidateListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/acl.ObservedConversationCandidate"
}
}
}
},
"acl.Rule": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"channel_identity_avatar_url": {
"type": "string"
},
"channel_identity_display_name": {
"type": "string"
},
"channel_identity_id": {
"type": "string"
},
"channel_subject_id": {
"type": "string"
},
"channel_type": {
"type": "string"
},
"created_at": {
"type": "string"
},
"effect": {
"type": "string"
},
"id": {
"type": "string"
},
"linked_user_avatar_url": {
"type": "string"
},
"linked_user_display_name": {
"type": "string"
},
"linked_user_id": {
"type": "string"
},
"linked_user_username": {
"type": "string"
},
"source_scope": {
"$ref": "#/definitions/acl.SourceScope"
},
"subject_kind": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"user_avatar_url": {
"type": "string"
},
"user_display_name": {
"type": "string"
},
"user_id": {
"type": "string"
},
"user_username": {
"type": "string"
}
}
},
"acl.SourceScope": {
"type": "object",
"properties": {
"channel": {
"type": "string"
},
"conversation_id": {
"type": "string"
},
"conversation_type": {
"type": "string"
},
"thread_id": {
"type": "string"
}
}
},
"acl.UpsertRuleRequest": {
"type": "object",
"properties": {
"channel_identity_id": {
"type": "string"
},
"source_scope": {
"$ref": "#/definitions/acl.SourceScope"
},
"user_id": {
"type": "string"
}
}
},
"acl.UserCandidate": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"display_name": {
"type": "string"
},
"email": {
"type": "string"
},
"id": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"acl.UserCandidateListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/acl.UserCandidate"
}
}
}
},
"adapters.CDFPoint": {
"type": "object",
"properties": {
"cumulative": {
"description": "cumulative weight fraction [0.0, 1.0]",
"type": "number"
},
"k": {
"description": "rank position (1-based, sorted by value desc)",
"type": "integer"
}
}
},
"adapters.CompactResult": {
"type": "object",
"properties": {
"after_count": {
"type": "integer"
},
"before_count": {
"type": "integer"
},
"ratio": {
"type": "number"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/adapters.MemoryItem"
}
}
}
},
"adapters.DeleteResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"adapters.HealthStatus": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"ok": {
"type": "boolean"
}
}
},
"adapters.MemoryItem": {
"type": "object",
"properties": {
"agent_id": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"cdf_curve": {
"type": "array",
"items": {
"$ref": "#/definitions/adapters.CDFPoint"
}
},
"created_at": {
"type": "string"
},
"hash": {
"type": "string"
},
"id": {
"type": "string"
},
"memory": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"run_id": {
"type": "string"
},
"score": {
"type": "number"
},
"top_k_buckets": {
"type": "array",
"items": {
"$ref": "#/definitions/adapters.TopKBucket"
}
},
"updated_at": {
"type": "string"
}
}
},
"adapters.MemoryStatusResponse": {
"type": "object",
"properties": {
"can_manual_sync": {
"type": "boolean"
},
"encoder": {
"$ref": "#/definitions/adapters.HealthStatus"
},
"indexed_count": {
"type": "integer"
},
"markdown_file_count": {
"type": "integer"
},
"memory_mode": {
"type": "string"
},
"overview_path": {
"type": "string"
},
"provider_type": {
"type": "string"
},
"qdrant": {
"$ref": "#/definitions/adapters.HealthStatus"
},
"qdrant_collection": {
"type": "string"
},
"source_count": {
"type": "integer"
},
"source_dir": {
"type": "string"
}
}
},
"adapters.Message": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"role": {
"type": "string"
}
}
},
"adapters.ProviderCollectionStatus": {
"type": "object",
"properties": {
"exists": {
"type": "boolean"
},
"name": {
"type": "string"
},
"points": {
"type": "integer"
},
"qdrant": {
"$ref": "#/definitions/adapters.HealthStatus"
}
}
},
"adapters.ProviderConfigSchema": {
"type": "object",
"properties": {
"fields": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/adapters.ProviderFieldSchema"
}
}
}
},
"adapters.ProviderCreateRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"provider": {
"$ref": "#/definitions/adapters.ProviderType"
}
}
},
"adapters.ProviderFieldSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"example": {},
"required": {
"type": "boolean"
},
"secret": {
"type": "boolean"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"adapters.ProviderGetResponse": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"is_default": {
"type": "boolean"
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"adapters.ProviderMeta": {
"type": "object",
"properties": {
"config_schema": {
"$ref": "#/definitions/adapters.ProviderConfigSchema"
},
"display_name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"adapters.ProviderStatusResponse": {
"type": "object",
"properties": {
"collections": {
"type": "array",
"items": {
"$ref": "#/definitions/adapters.ProviderCollectionStatus"
}
},
"embedding_model_id": {
"type": "string"
},
"memory_mode": {
"type": "string"
},
"provider_type": {
"type": "string"
}
}
},
"adapters.ProviderType": {
"type": "string",
"enum": [
"builtin",
"mem0",
"openviking"
],
"x-enum-varnames": [
"ProviderBuiltin",
"ProviderMem0",
"ProviderOpenViking"
]
},
"adapters.ProviderUpdateRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
}
}
},
"adapters.RebuildResult": {
"type": "object",
"properties": {
"fs_count": {
"type": "integer"
},
"missing_count": {
"type": "integer"
},
"restored_count": {
"type": "integer"
},
"storage_count": {
"type": "integer"
}
}
},
"adapters.SearchResponse": {
"type": "object",
"properties": {
"relations": {
"type": "array",
"items": {}
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/adapters.MemoryItem"
}
}
}
},
"adapters.TopKBucket": {
"type": "object",
"properties": {
"index": {
"description": "sparse dimension index (term hash)",
"type": "integer"
},
"value": {
"description": "weight (term frequency)",
"type": "number"
}
}
},
"adapters.UsageResponse": {
"type": "object",
"properties": {
"avg_text_bytes": {
"type": "integer"
},
"count": {
"type": "integer"
},
"estimated_storage_bytes": {
"type": "integer"
},
"total_text_bytes": {
"type": "integer"
}
}
},
"bots.Bot": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"check_issue_count": {
"type": "integer"
},
"check_state": {
"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"
},
"status": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"bots.BotCheck": {
"type": "object",
"properties": {
"detail": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"status": {
"type": "string"
},
"subtitle": {
"type": "string"
},
"summary": {
"type": "string"
},
"title_key": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"bots.CreateBotRequest": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"display_name": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"metadata": {
"type": "object",
"additionalProperties": {}
}
}
},
"bots.ListBotsResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/bots.Bot"
}
}
}
},
"bots.ListChecksResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/bots.BotCheck"
}
}
}
},
"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": {}
}
}
},
"browsercontexts.BrowserContext": {
"type": "object",
"properties": {
"config": {
"type": "array",
"items": {
"type": "integer"
}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"browsercontexts.CreateRequest": {
"type": "object",
"properties": {
"config": {
"type": "array",
"items": {
"type": "integer"
}
},
"name": {
"type": "string"
}
}
},
"browsercontexts.UpdateRequest": {
"type": "object",
"properties": {
"config": {
"type": "array",
"items": {
"type": "integer"
}
},
"name": {
"type": "string"
}
}
},
"channel.Action": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"type": {
"type": "string"
},
"url": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"channel.Attachment": {
"type": "object",
"properties": {
"base64": {
"description": "data URL for agent delivery",
"type": "string"
},
"caption": {
"type": "string"
},
"content_hash": {
"type": "string"
},
"duration_ms": {
"type": "integer"
},
"height": {
"type": "integer"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"mime": {
"type": "string"
},
"name": {
"type": "string"
},
"platform_key": {
"type": "string"
},
"size": {
"type": "integer"
},
"source_platform": {
"type": "string"
},
"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": {
"bot_id": {
"type": "string"
},
"channel_type": {
"type": "string"
},
"created_at": {
"type": "string"
},
"credentials": {
"type": "object",
"additionalProperties": {}
},
"disabled": {
"type": "boolean"
},
"external_identity": {
"type": "string"
},
"id": {
"type": "string"
},
"routing": {
"type": "object",
"additionalProperties": {}
},
"self_identity": {
"type": "object",
"additionalProperties": {}
},
"updated_at": {
"type": "string"
},
"verified_at": {
"type": "string"
}
}
},
"channel.ChannelIdentityBinding": {
"type": "object",
"properties": {
"channel_identity_id": {
"type": "string"
},
"channel_type": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"updated_at": {
"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": {
"channel_identity_id": {
"type": "string"
},
"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"
}
}
},
"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": {
"channel_identity_id": {
"type": "string"
},
"message": {
"$ref": "#/definitions/channel.Message"
},
"target": {
"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.UpdateChannelStatusRequest": {
"type": "object",
"properties": {
"disabled": {
"type": "boolean"
}
}
},
"channel.UpsertChannelIdentityConfigRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
}
}
},
"channel.UpsertConfigRequest": {
"type": "object",
"properties": {
"credentials": {
"type": "object",
"additionalProperties": {}
},
"disabled": {
"type": "boolean"
},
"external_identity": {
"type": "string"
},
"routing": {
"type": "object",
"additionalProperties": {}
},
"self_identity": {
"type": "object",
"additionalProperties": {}
},
"verified_at": {
"type": "string"
}
}
},
"email.BindingResponse": {
"type": "object",
"properties": {
"bot_id": {
"type": "string"
},
"can_delete": {
"type": "boolean"
},
"can_read": {
"type": "boolean"
},
"can_write": {
"type": "boolean"
},
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"email_address": {
"type": "string"
},
"email_provider_id": {
"type": "string"
},
"id": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"email.ConfigSchema": {
"type": "object",
"properties": {
"fields": {
"type": "array",
"items": {
"$ref": "#/definitions/email.FieldSchema"
}
}
}
},
"email.CreateBindingRequest": {
"type": "object",
"properties": {
"can_delete": {
"type": "boolean"
},
"can_read": {
"type": "boolean"
},
"can_write": {
"type": "boolean"
},
"config": {
"type": "object",
"additionalProperties": {}
},
"email_address": {
"type": "string"
},
"email_provider_id": {
"type": "string"
}
}
},
"email.CreateProviderRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"email.FieldSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"example": {},
"key": {
"type": "string"
},
"order": {
"type": "integer"
},
"required": {
"type": "boolean"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"email.OutboxItemResponse": {
"type": "object",
"properties": {
"attachments": {
"type": "array",
"items": {}
},
"body_html": {
"type": "string"
},
"body_text": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"error": {
"type": "string"
},
"from": {
"type": "string"
},
"id": {
"type": "string"
},
"message_id": {
"type": "string"
},
"provider_id": {
"type": "string"
},
"sent_at": {
"type": "string"
},
"status": {
"type": "string"
},
"subject": {
"type": "string"
},
"to": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"email.ProviderMeta": {
"type": "object",
"properties": {
"config_schema": {
"$ref": "#/definitions/email.ConfigSchema"
},
"display_name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"email.ProviderResponse": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"email.UpdateBindingRequest": {
"type": "object",
"properties": {
"can_delete": {
"type": "boolean"
},
"can_read": {
"type": "boolean"
},
"can_write": {
"type": "boolean"
},
"config": {
"type": "object",
"additionalProperties": {}
},
"email_address": {
"type": "string"
}
}
},
"email.UpdateProviderRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"github_com_memohai_memoh_internal_mcp.Connection": {
"type": "object",
"properties": {
"auth_type": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"is_active": {
"type": "boolean"
},
"last_probed_at": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"type": "string"
},
"status_message": {
"type": "string"
},
"tools_cache": {
"type": "array",
"items": {
"$ref": "#/definitions/mcp.ToolDescriptor"
}
},
"type": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"handlers.BatchDeleteRequest": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"handlers.BrowserCoresResponse": {
"type": "object",
"properties": {
"cores": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"handlers.ChannelMeta": {
"type": "object",
"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"
},
"restore_data": {
"type": "boolean"
},
"snapshotter": {
"type": "string"
}
}
},
"handlers.CreateContainerResponse": {
"type": "object",
"properties": {
"container_id": {
"type": "string"
},
"data_restored": {
"type": "boolean"
},
"has_preserved_data": {
"type": "boolean"
},
"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"
},
"display_name": {
"type": "string"
},
"runtime_snapshot_name": {
"type": "string"
},
"snapshot_name": {
"type": "string"
},
"snapshotter": {
"type": "string"
},
"source": {
"type": "string"
},
"version": {
"type": "integer"
}
}
},
"handlers.DailyTokenUsage": {
"type": "object",
"properties": {
"cache_read_tokens": {
"type": "integer"
},
"cache_write_tokens": {
"type": "integer"
},
"day": {
"type": "string"
},
"input_tokens": {
"type": "integer"
},
"output_tokens": {
"type": "integer"
},
"reasoning_tokens": {
"type": "integer"
}
}
},
"handlers.ErrorResponse": {
"type": "object",
"properties": {
"message": {
"type": "string"
}
}
},
"handlers.FSDeleteRequest": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"recursive": {
"type": "boolean"
}
}
},
"handlers.FSFileInfo": {
"type": "object",
"properties": {
"isDir": {
"type": "boolean"
},
"modTime": {
"type": "string"
},
"mode": {
"type": "string"
},
"name": {
"type": "string"
},
"path": {
"type": "string"
},
"size": {
"type": "integer"
}
}
},
"handlers.FSListResponse": {
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.FSFileInfo"
}
},
"path": {
"type": "string"
}
}
},
"handlers.FSMkdirRequest": {
"type": "object",
"properties": {
"path": {
"type": "string"
}
}
},
"handlers.FSReadResponse": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"path": {
"type": "string"
},
"size": {
"type": "integer"
}
}
},
"handlers.FSRenameRequest": {
"type": "object",
"properties": {
"newPath": {
"type": "string"
},
"oldPath": {
"type": "string"
}
}
},
"handlers.FSUploadResponse": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"size": {
"type": "integer"
}
}
},
"handlers.FSWriteRequest": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"handlers.GetContainerResponse": {
"type": "object",
"properties": {
"container_id": {
"type": "string"
},
"container_path": {
"type": "string"
},
"created_at": {
"type": "string"
},
"has_preserved_data": {
"type": "boolean"
},
"image": {
"type": "string"
},
"legacy": {
"type": "boolean"
},
"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.LocalChannelMessageRequest": {
"type": "object",
"properties": {
"message": {
"$ref": "#/definitions/channel.Message"
}
}
},
"handlers.LoginRequest": {
"type": "object",
"properties": {
"password": {
"type": "string"
},
"username": {
"type": "string"
}
}
},
"handlers.LoginResponse": {
"type": "object",
"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": {
"connection_id": {
"type": "string"
},
"tools": {
"type": "array",
"items": {
"type": "string"
}
},
"url": {
"type": "string"
}
}
},
"handlers.ModelTokenUsage": {
"type": "object",
"properties": {
"input_tokens": {
"type": "integer"
},
"model_id": {
"type": "string"
},
"model_name": {
"type": "string"
},
"model_slug": {
"type": "string"
},
"output_tokens": {
"type": "integer"
},
"provider_name": {
"type": "string"
}
}
},
"handlers.PingResponse": {
"type": "object",
"properties": {
"container_backend": {
"type": "string"
},
"snapshot_supported": {
"type": "boolean"
},
"status": {
"type": "string"
}
}
},
"handlers.ProbeResponse": {
"type": "object",
"properties": {
"auth_required": {
"type": "boolean"
},
"error": {
"type": "string"
},
"status": {
"type": "string"
},
"tools": {
"type": "array",
"items": {
"$ref": "#/definitions/mcp.ToolDescriptor"
}
}
}
},
"handlers.RefreshResponse": {
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"expires_at": {
"type": "string"
},
"token_type": {
"type": "string"
}
}
},
"handlers.RollbackRequest": {
"type": "object",
"properties": {
"version": {
"type": "integer"
}
}
},
"handlers.SkillItem": {
"type": "object",
"properties": {
"content": {
"type": "string"
},
"description": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"raw": {
"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": {
"type": "string"
}
}
}
},
"handlers.SnapshotInfo": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"display_name": {
"type": "string"
},
"kind": {
"type": "string"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"managed": {
"type": "boolean"
},
"name": {
"type": "string"
},
"parent": {
"type": "string"
},
"runtime_snapshot_name": {
"type": "string"
},
"snapshotter": {
"type": "string"
},
"source": {
"type": "string"
},
"updated_at": {
"type": "string"
},
"version": {
"type": "integer"
}
}
},
"handlers.TokenUsageResponse": {
"type": "object",
"properties": {
"by_model": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.ModelTokenUsage"
}
},
"chat": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.DailyTokenUsage"
}
},
"heartbeat": {
"type": "array",
"items": {
"$ref": "#/definitions/handlers.DailyTokenUsage"
}
}
}
},
"handlers.emailOAuthStatusResponse": {
"type": "object",
"properties": {
"configured": {
"type": "boolean"
},
"email_address": {
"type": "string"
},
"expired": {
"type": "boolean"
},
"expires_at": {
"type": "string"
},
"has_token": {
"type": "boolean"
},
"provider": {
"type": "string"
}
}
},
"handlers.fsOpResponse": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
}
},
"handlers.listMyIdentitiesResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/identities.ChannelIdentity"
}
},
"user_id": {
"type": "string"
}
}
},
"handlers.markReadRequest": {
"type": "object",
"properties": {
"ids": {
"type": "array",
"items": {
"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/adapters.Message"
}
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"namespace": {
"type": "string"
},
"run_id": {
"type": "string"
}
}
},
"handlers.memoryCompactPayload": {
"type": "object",
"properties": {
"decay_days": {
"type": "integer"
},
"ratio": {
"type": "number"
}
}
},
"handlers.memoryDeletePayload": {
"type": "object",
"properties": {
"memory_ids": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"handlers.memorySearchPayload": {
"type": "object",
"properties": {
"embedding_enabled": {
"type": "boolean"
},
"filters": {
"type": "object",
"additionalProperties": {}
},
"limit": {
"type": "integer"
},
"no_stats": {
"type": "boolean"
},
"query": {
"type": "string"
},
"run_id": {
"type": "string"
},
"sources": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"handlers.oauthAuthorizeRequest": {
"type": "object",
"properties": {
"callback_url": {
"type": "string"
},
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
}
}
},
"handlers.oauthDiscoverRequest": {
"type": "object",
"properties": {
"url": {
"type": "string"
}
}
},
"handlers.oauthExchangeRequest": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"state": {
"type": "string"
}
}
},
"handlers.skillsOpResponse": {
"type": "object",
"properties": {
"ok": {
"type": "boolean"
}
}
},
"handlers.synthesizeRequest": {
"type": "object",
"properties": {
"text": {
"type": "string"
}
}
},
"handlers.synthesizeResponse": {
"type": "object",
"properties": {
"content_type": {
"type": "string"
},
"size": {
"type": "integer"
},
"temp_id": {
"type": "string"
}
}
},
"handlers.terminalInfoResponse": {
"type": "object",
"properties": {
"available": {
"type": "boolean"
},
"shell": {
"type": "string"
}
}
},
"heartbeat.ListLogsResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/heartbeat.Log"
}
}
}
},
"heartbeat.Log": {
"type": "object",
"properties": {
"bot_id": {
"type": "string"
},
"completed_at": {
"type": "string"
},
"error_message": {
"type": "string"
},
"id": {
"type": "string"
},
"result_text": {
"type": "string"
},
"started_at": {
"type": "string"
},
"status": {
"type": "string"
},
"usage": {}
}
},
"identities.ChannelIdentity": {
"type": "object",
"properties": {
"avatar_url": {
"type": "string"
},
"channel": {
"type": "string"
},
"channel_subject_id": {
"type": "string"
},
"created_at": {
"type": "string"
},
"display_name": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"updated_at": {
"type": "string"
},
"user_id": {
"type": "string"
}
}
},
"inbox.CountResult": {
"type": "object",
"properties": {
"total": {
"type": "integer"
},
"unread": {
"type": "integer"
}
}
},
"inbox.CreateRequest": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"content": {
"type": "string"
},
"header": {
"type": "object",
"additionalProperties": {}
},
"source": {
"type": "string"
}
}
},
"inbox.Item": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"bot_id": {
"type": "string"
},
"content": {
"type": "string"
},
"created_at": {
"type": "string"
},
"header": {
"type": "object",
"additionalProperties": {}
},
"id": {
"type": "string"
},
"is_read": {
"type": "boolean"
},
"read_at": {
"type": "string"
},
"source": {
"type": "string"
}
}
},
"mcp.AuthorizeResult": {
"type": "object",
"properties": {
"authorization_url": {
"type": "string"
}
}
},
"mcp.DiscoveryResult": {
"type": "object",
"properties": {
"authorization_endpoint": {
"type": "string"
},
"authorization_server_url": {
"type": "string"
},
"registration_endpoint": {
"type": "string"
},
"resource_metadata_url": {
"type": "string"
},
"resource_uri": {
"type": "string"
},
"scopes_supported": {
"type": "array",
"items": {
"type": "string"
}
},
"token_endpoint": {
"type": "string"
}
}
},
"mcp.ExportResponse": {
"type": "object",
"properties": {
"mcpServers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/mcp.MCPServerEntry"
}
}
}
},
"mcp.ImportRequest": {
"type": "object",
"properties": {
"mcpServers": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/mcp.MCPServerEntry"
}
}
}
},
"mcp.ListResponse": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/github_com_memohai_memoh_internal_mcp.Connection"
}
}
}
},
"mcp.MCPServerEntry": {
"type": "object",
"properties": {
"args": {
"type": "array",
"items": {
"type": "string"
}
},
"command": {
"type": "string"
},
"cwd": {
"type": "string"
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"transport": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"mcp.OAuthStatus": {
"type": "object",
"properties": {
"auth_server": {
"type": "string"
},
"callback_url": {
"type": "string"
},
"configured": {
"type": "boolean"
},
"expired": {
"type": "boolean"
},
"expires_at": {
"type": "string"
},
"has_token": {
"type": "boolean"
},
"scopes": {
"type": "string"
}
}
},
"mcp.ToolDescriptor": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"inputSchema": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
}
}
},
"mcp.UpsertRequest": {
"type": "object",
"properties": {
"args": {
"type": "array",
"items": {
"type": "string"
}
},
"auth_type": {
"type": "string"
},
"command": {
"type": "string"
},
"cwd": {
"type": "string"
},
"env": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"is_active": {
"type": "boolean"
},
"name": {
"type": "string"
},
"transport": {
"type": "string"
},
"url": {
"type": "string"
}
}
},
"message.Message": {
"type": "object",
"properties": {
"assets": {
"type": "array",
"items": {
"$ref": "#/definitions/message.MessageAsset"
}
},
"bot_id": {
"type": "string"
},
"content": {
"type": "array",
"items": {
"type": "integer"
}
},
"created_at": {
"type": "string"
},
"external_message_id": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"platform": {
"type": "string"
},
"role": {
"type": "string"
},
"route_id": {
"type": "string"
},
"sender_avatar_url": {
"type": "string"
},
"sender_channel_identity_id": {
"type": "string"
},
"sender_display_name": {
"type": "string"
},
"sender_user_id": {
"type": "string"
},
"source_reply_to_message_id": {
"type": "string"
},
"usage": {
"type": "array",
"items": {
"type": "integer"
}
}
}
},
"message.MessageAsset": {
"type": "object",
"properties": {
"content_hash": {
"type": "string"
},
"mime": {
"type": "string"
},
"ordinal": {
"type": "integer"
},
"role": {
"type": "string"
},
"size_bytes": {
"type": "integer"
},
"storage_key": {
"type": "string"
}
}
},
"models.AddRequest": {
"type": "object",
"properties": {
"client_type": {
"$ref": "#/definitions/models.ClientType"
},
"dimensions": {
"type": "integer"
},
"input_modalities": {
"type": "array",
"items": {
"type": "string"
}
},
"llm_provider_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"name": {
"type": "string"
},
"supports_reasoning": {
"type": "boolean"
},
"type": {
"$ref": "#/definitions/models.ModelType"
}
}
},
"models.AddResponse": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"model_id": {
"type": "string"
}
}
},
"models.ClientType": {
"type": "string",
"enum": [
"openai-responses",
"openai-completions",
"anthropic-messages",
"google-generative-ai"
],
"x-enum-varnames": [
"ClientTypeOpenAIResponses",
"ClientTypeOpenAICompletions",
"ClientTypeAnthropicMessages",
"ClientTypeGoogleGenerativeAI"
]
},
"models.CountResponse": {
"type": "object",
"properties": {
"count": {
"type": "integer"
}
}
},
"models.GetResponse": {
"type": "object",
"properties": {
"client_type": {
"$ref": "#/definitions/models.ClientType"
},
"dimensions": {
"type": "integer"
},
"id": {
"type": "string"
},
"input_modalities": {
"type": "array",
"items": {
"type": "string"
}
},
"llm_provider_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"name": {
"type": "string"
},
"supports_reasoning": {
"type": "boolean"
},
"type": {
"$ref": "#/definitions/models.ModelType"
}
}
},
"models.ModelType": {
"type": "string",
"enum": [
"chat",
"embedding"
],
"x-enum-varnames": [
"ModelTypeChat",
"ModelTypeEmbedding"
]
},
"models.TestResponse": {
"type": "object",
"properties": {
"latency_ms": {
"type": "integer"
},
"message": {
"type": "string"
},
"reachable": {
"type": "boolean"
},
"status": {
"$ref": "#/definitions/models.TestStatus"
}
}
},
"models.TestStatus": {
"type": "string",
"enum": [
"ok",
"auth_error",
"error"
],
"x-enum-varnames": [
"TestStatusOK",
"TestStatusAuthError",
"TestStatusError"
]
},
"models.UpdateRequest": {
"type": "object",
"properties": {
"client_type": {
"$ref": "#/definitions/models.ClientType"
},
"dimensions": {
"type": "integer"
},
"input_modalities": {
"type": "array",
"items": {
"type": "string"
}
},
"llm_provider_id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"name": {
"type": "string"
},
"supports_reasoning": {
"type": "boolean"
},
"type": {
"$ref": "#/definitions/models.ModelType"
}
}
},
"providers.CountResponse": {
"type": "object",
"properties": {
"count": {
"type": "integer"
}
}
},
"providers.CreateRequest": {
"type": "object",
"required": [
"base_url",
"name"
],
"properties": {
"api_key": {
"type": "string"
},
"base_url": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
}
}
},
"providers.GetResponse": {
"type": "object",
"properties": {
"api_key": {
"type": "string"
},
"base_url": {
"type": "string"
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"providers.ImportModelsRequest": {
"type": "object",
"properties": {
"client_type": {
"type": "string"
}
}
},
"providers.ImportModelsResponse": {
"type": "object",
"properties": {
"created": {
"type": "integer"
},
"models": {
"type": "array",
"items": {
"type": "string"
}
},
"skipped": {
"type": "integer"
}
}
},
"providers.TestResponse": {
"type": "object",
"properties": {
"latency_ms": {
"type": "integer"
},
"message": {
"type": "string"
},
"reachable": {
"type": "boolean"
}
}
},
"providers.UpdateRequest": {
"type": "object",
"properties": {
"api_key": {
"type": "string"
},
"base_url": {
"type": "string"
},
"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"
}
}
},
"searchproviders.CreateRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"provider": {
"$ref": "#/definitions/searchproviders.ProviderName"
}
}
},
"searchproviders.GetResponse": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"searchproviders.ProviderConfigSchema": {
"type": "object",
"properties": {
"fields": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/searchproviders.ProviderFieldSchema"
}
}
}
},
"searchproviders.ProviderFieldSchema": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"example": {},
"required": {
"type": "boolean"
},
"title": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"searchproviders.ProviderMeta": {
"type": "object",
"properties": {
"config_schema": {
"$ref": "#/definitions/searchproviders.ProviderConfigSchema"
},
"display_name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"searchproviders.ProviderName": {
"type": "string",
"enum": [
"brave",
"bing",
"google",
"tavily",
"sogou",
"serper",
"searxng",
"jina",
"exa",
"bocha",
"duckduckgo",
"yandex"
],
"x-enum-varnames": [
"ProviderBrave",
"ProviderBing",
"ProviderGoogle",
"ProviderTavily",
"ProviderSogou",
"ProviderSerper",
"ProviderSearXNG",
"ProviderJina",
"ProviderExa",
"ProviderBocha",
"ProviderDuckDuckGo",
"ProviderYandex"
]
},
"searchproviders.UpdateRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
},
"provider": {
"$ref": "#/definitions/searchproviders.ProviderName"
}
}
},
"settings.Settings": {
"type": "object",
"properties": {
"allow_guest": {
"type": "boolean"
},
"browser_context_id": {
"type": "string"
},
"chat_model_id": {
"type": "string"
},
"heartbeat_enabled": {
"type": "boolean"
},
"heartbeat_interval": {
"type": "integer"
},
"heartbeat_model_id": {
"type": "string"
},
"language": {
"type": "string"
},
"max_context_load_time": {
"type": "integer"
},
"max_context_tokens": {
"type": "integer"
},
"max_inbox_items": {
"type": "integer"
},
"memory_provider_id": {
"type": "string"
},
"reasoning_effort": {
"type": "string"
},
"reasoning_enabled": {
"type": "boolean"
},
"search_provider_id": {
"type": "string"
},
"tts_model_id": {
"type": "string"
}
}
},
"settings.UpsertRequest": {
"type": "object",
"properties": {
"allow_guest": {
"type": "boolean"
},
"browser_context_id": {
"type": "string"
},
"chat_model_id": {
"type": "string"
},
"heartbeat_enabled": {
"type": "boolean"
},
"heartbeat_interval": {
"type": "integer"
},
"heartbeat_model_id": {
"type": "string"
},
"language": {
"type": "string"
},
"max_context_load_time": {
"type": "integer"
},
"max_context_tokens": {
"type": "integer"
},
"max_inbox_items": {
"type": "integer"
},
"memory_provider_id": {
"type": "string"
},
"reasoning_effort": {
"type": "string"
},
"reasoning_enabled": {
"type": "boolean"
},
"search_provider_id": {
"type": "string"
},
"tts_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": {}
}
},
"usage": {
"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"
},
"usage": {
"type": "object",
"additionalProperties": {}
}
}
},
"subagent.UpdateContextRequest": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
}
},
"usage": {
"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"
}
}
}
},
"tts.CreateModelRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"model_id": {
"type": "string"
},
"name": {
"type": "string"
},
"tts_provider_id": {
"type": "string"
}
}
},
"tts.CreateProviderRequest": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"provider": {
"type": "string"
}
}
},
"tts.ModelCapabilities": {
"type": "object",
"properties": {
"formats": {
"type": "array",
"items": {
"type": "string"
}
},
"pitch": {
"$ref": "#/definitions/tts.ParamConstraint"
},
"speed": {
"$ref": "#/definitions/tts.ParamConstraint"
},
"voices": {
"type": "array",
"items": {
"$ref": "#/definitions/tts.VoiceInfo"
}
}
}
},
"tts.ModelInfo": {
"type": "object",
"properties": {
"capabilities": {
"$ref": "#/definitions/tts.ModelCapabilities"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"tts.ModelResponse": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"model_id": {
"type": "string"
},
"name": {
"type": "string"
},
"provider_type": {
"type": "string"
},
"tts_provider_id": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"tts.ParamConstraint": {
"type": "object",
"properties": {
"default": {
"type": "number"
},
"max": {
"type": "number"
},
"min": {
"type": "number"
},
"options": {
"type": "array",
"items": {
"type": "number"
}
}
}
},
"tts.ProviderMetaResponse": {
"type": "object",
"properties": {
"default_model": {
"type": "string"
},
"description": {
"type": "string"
},
"display_name": {
"type": "string"
},
"models": {
"type": "array",
"items": {
"$ref": "#/definitions/tts.ModelInfo"
}
},
"provider": {
"type": "string"
}
}
},
"tts.ProviderResponse": {
"type": "object",
"properties": {
"created_at": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"provider": {
"type": "string"
},
"updated_at": {
"type": "string"
}
}
},
"tts.TestSynthesizeRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"text": {
"type": "string"
}
}
},
"tts.UpdateModelRequest": {
"type": "object",
"properties": {
"config": {
"type": "object",
"additionalProperties": {}
},
"name": {
"type": "string"
}
}
},
"tts.UpdateProviderRequest": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
},
"tts.VoiceInfo": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"lang": {
"type": "string"
},
"name": {
"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)
}