mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
627b673a5c
* refactor: restructure memory into multi-provider adapters, remove manifest.json dependency - Rename internal/memory/provider to internal/memory/adapters with per-provider subdirectories (builtin, mem0, openviking) - Replace manifest.json-based delete/update with scan-based index from daily files - Add mem0 and openviking provider adapters with HTTP client, chat hooks, MCP tools, and CRUD - Wire provider lifecycle into registry (auto-instantiate on create, evict on update/delete) - Split docker-compose into base stack + optional overlays (qdrant, browser, mem0, openviking) - Update admin UI to support dynamic provider config schema rendering * chore(lint): fix all golangci-lint issues for clean CI * refactor(docker): replace compose overlay files with profiles * feat(memory): add built-in memory multi modes * fix(ci): golangci lint * feat(memory): edit built-in memory sparse design
8114 lines
202 KiB
YAML
8114 lines
202 KiB
YAML
definitions:
|
|
accounts.Account:
|
|
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
|
|
type: object
|
|
accounts.CreateAccountRequest:
|
|
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
|
|
type: object
|
|
accounts.ListAccountsResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/accounts.Account'
|
|
type: array
|
|
type: object
|
|
accounts.ResetPasswordRequest:
|
|
properties:
|
|
new_password:
|
|
type: string
|
|
type: object
|
|
accounts.UpdateAccountRequest:
|
|
properties:
|
|
avatar_url:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
is_active:
|
|
type: boolean
|
|
role:
|
|
type: string
|
|
type: object
|
|
accounts.UpdatePasswordRequest:
|
|
properties:
|
|
current_password:
|
|
type: string
|
|
new_password:
|
|
type: string
|
|
type: object
|
|
accounts.UpdateProfileRequest:
|
|
properties:
|
|
avatar_url:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
type: object
|
|
adapters.CDFPoint:
|
|
properties:
|
|
cumulative:
|
|
description: cumulative weight fraction [0.0, 1.0]
|
|
type: number
|
|
k:
|
|
description: rank position (1-based, sorted by value desc)
|
|
type: integer
|
|
type: object
|
|
adapters.CompactResult:
|
|
properties:
|
|
after_count:
|
|
type: integer
|
|
before_count:
|
|
type: integer
|
|
ratio:
|
|
type: number
|
|
results:
|
|
items:
|
|
$ref: '#/definitions/adapters.MemoryItem'
|
|
type: array
|
|
type: object
|
|
adapters.DeleteResponse:
|
|
properties:
|
|
message:
|
|
type: string
|
|
type: object
|
|
adapters.HealthStatus:
|
|
properties:
|
|
error:
|
|
type: string
|
|
ok:
|
|
type: boolean
|
|
type: object
|
|
adapters.MemoryItem:
|
|
properties:
|
|
agent_id:
|
|
type: string
|
|
bot_id:
|
|
type: string
|
|
cdf_curve:
|
|
items:
|
|
$ref: '#/definitions/adapters.CDFPoint'
|
|
type: array
|
|
created_at:
|
|
type: string
|
|
hash:
|
|
type: string
|
|
id:
|
|
type: string
|
|
memory:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
run_id:
|
|
type: string
|
|
score:
|
|
type: number
|
|
top_k_buckets:
|
|
items:
|
|
$ref: '#/definitions/adapters.TopKBucket'
|
|
type: array
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
adapters.MemoryStatusResponse:
|
|
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
|
|
type: object
|
|
adapters.Message:
|
|
properties:
|
|
content:
|
|
type: string
|
|
role:
|
|
type: string
|
|
type: object
|
|
adapters.ProviderCollectionStatus:
|
|
properties:
|
|
exists:
|
|
type: boolean
|
|
name:
|
|
type: string
|
|
points:
|
|
type: integer
|
|
qdrant:
|
|
$ref: '#/definitions/adapters.HealthStatus'
|
|
type: object
|
|
adapters.ProviderConfigSchema:
|
|
properties:
|
|
fields:
|
|
additionalProperties:
|
|
$ref: '#/definitions/adapters.ProviderFieldSchema'
|
|
type: object
|
|
type: object
|
|
adapters.ProviderCreateRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
provider:
|
|
$ref: '#/definitions/adapters.ProviderType'
|
|
type: object
|
|
adapters.ProviderFieldSchema:
|
|
properties:
|
|
description:
|
|
type: string
|
|
example: {}
|
|
required:
|
|
type: boolean
|
|
secret:
|
|
type: boolean
|
|
title:
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
adapters.ProviderGetResponse:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
created_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
is_default:
|
|
type: boolean
|
|
name:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
adapters.ProviderMeta:
|
|
properties:
|
|
config_schema:
|
|
$ref: '#/definitions/adapters.ProviderConfigSchema'
|
|
display_name:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
type: object
|
|
adapters.ProviderStatusResponse:
|
|
properties:
|
|
collections:
|
|
items:
|
|
$ref: '#/definitions/adapters.ProviderCollectionStatus'
|
|
type: array
|
|
embedding_model_id:
|
|
type: string
|
|
memory_mode:
|
|
type: string
|
|
provider_type:
|
|
type: string
|
|
type: object
|
|
adapters.ProviderType:
|
|
enum:
|
|
- builtin
|
|
- mem0
|
|
- openviking
|
|
type: string
|
|
x-enum-varnames:
|
|
- ProviderBuiltin
|
|
- ProviderMem0
|
|
- ProviderOpenViking
|
|
adapters.ProviderUpdateRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
type: object
|
|
adapters.RebuildResult:
|
|
properties:
|
|
fs_count:
|
|
type: integer
|
|
missing_count:
|
|
type: integer
|
|
restored_count:
|
|
type: integer
|
|
storage_count:
|
|
type: integer
|
|
type: object
|
|
adapters.SearchResponse:
|
|
properties:
|
|
relations:
|
|
items: {}
|
|
type: array
|
|
results:
|
|
items:
|
|
$ref: '#/definitions/adapters.MemoryItem'
|
|
type: array
|
|
type: object
|
|
adapters.TopKBucket:
|
|
properties:
|
|
index:
|
|
description: sparse dimension index (term hash)
|
|
type: integer
|
|
value:
|
|
description: weight (term frequency)
|
|
type: number
|
|
type: object
|
|
adapters.UsageResponse:
|
|
properties:
|
|
avg_text_bytes:
|
|
type: integer
|
|
count:
|
|
type: integer
|
|
estimated_storage_bytes:
|
|
type: integer
|
|
total_text_bytes:
|
|
type: integer
|
|
type: object
|
|
bots.Bot:
|
|
properties:
|
|
allow_guest:
|
|
type: boolean
|
|
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:
|
|
additionalProperties: {}
|
|
type: object
|
|
owner_user_id:
|
|
type: string
|
|
status:
|
|
type: string
|
|
type:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
bots.BotCheck:
|
|
properties:
|
|
detail:
|
|
type: string
|
|
id:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
status:
|
|
type: string
|
|
subtitle:
|
|
type: string
|
|
summary:
|
|
type: string
|
|
title_key:
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
bots.BotMember:
|
|
properties:
|
|
bot_id:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
role:
|
|
type: string
|
|
user_id:
|
|
type: string
|
|
type: object
|
|
bots.CreateBotRequest:
|
|
properties:
|
|
avatar_url:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
is_active:
|
|
type: boolean
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
type:
|
|
type: string
|
|
type: object
|
|
bots.ListBotsResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/bots.Bot'
|
|
type: array
|
|
type: object
|
|
bots.ListChecksResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/bots.BotCheck'
|
|
type: array
|
|
type: object
|
|
bots.ListMembersResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/bots.BotMember'
|
|
type: array
|
|
type: object
|
|
bots.TransferBotRequest:
|
|
properties:
|
|
owner_user_id:
|
|
type: string
|
|
type: object
|
|
bots.UpdateBotRequest:
|
|
properties:
|
|
avatar_url:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
is_active:
|
|
type: boolean
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
type: object
|
|
bots.UpsertMemberRequest:
|
|
properties:
|
|
role:
|
|
type: string
|
|
user_id:
|
|
type: string
|
|
type: object
|
|
browsercontexts.BrowserContext:
|
|
properties:
|
|
config:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
created_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
browsercontexts.CreateRequest:
|
|
properties:
|
|
config:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
name:
|
|
type: string
|
|
type: object
|
|
browsercontexts.UpdateRequest:
|
|
properties:
|
|
config:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
name:
|
|
type: string
|
|
type: object
|
|
channel.Action:
|
|
properties:
|
|
label:
|
|
type: string
|
|
type:
|
|
type: string
|
|
url:
|
|
type: string
|
|
value:
|
|
type: string
|
|
type: object
|
|
channel.Attachment:
|
|
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:
|
|
additionalProperties: {}
|
|
type: object
|
|
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
|
|
type: object
|
|
channel.AttachmentType:
|
|
enum:
|
|
- image
|
|
- audio
|
|
- video
|
|
- voice
|
|
- file
|
|
- gif
|
|
type: string
|
|
x-enum-varnames:
|
|
- AttachmentImage
|
|
- AttachmentAudio
|
|
- AttachmentVideo
|
|
- AttachmentVoice
|
|
- AttachmentFile
|
|
- AttachmentGIF
|
|
channel.ChannelCapabilities:
|
|
properties:
|
|
attachments:
|
|
type: boolean
|
|
block_streaming:
|
|
type: boolean
|
|
buttons:
|
|
type: boolean
|
|
chat_types:
|
|
items:
|
|
type: string
|
|
type: array
|
|
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
|
|
type: object
|
|
channel.ChannelConfig:
|
|
properties:
|
|
bot_id:
|
|
type: string
|
|
channel_type:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
credentials:
|
|
additionalProperties: {}
|
|
type: object
|
|
disabled:
|
|
type: boolean
|
|
external_identity:
|
|
type: string
|
|
id:
|
|
type: string
|
|
routing:
|
|
additionalProperties: {}
|
|
type: object
|
|
self_identity:
|
|
additionalProperties: {}
|
|
type: object
|
|
updated_at:
|
|
type: string
|
|
verified_at:
|
|
type: string
|
|
type: object
|
|
channel.ChannelIdentityBinding:
|
|
properties:
|
|
channel_identity_id:
|
|
type: string
|
|
channel_type:
|
|
type: string
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
created_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
channel.ConfigSchema:
|
|
properties:
|
|
fields:
|
|
additionalProperties:
|
|
$ref: '#/definitions/channel.FieldSchema'
|
|
type: object
|
|
version:
|
|
type: integer
|
|
type: object
|
|
channel.FieldSchema:
|
|
properties:
|
|
description:
|
|
type: string
|
|
enum:
|
|
items:
|
|
type: string
|
|
type: array
|
|
example: {}
|
|
required:
|
|
type: boolean
|
|
title:
|
|
type: string
|
|
type:
|
|
$ref: '#/definitions/channel.FieldType'
|
|
type: object
|
|
channel.FieldType:
|
|
enum:
|
|
- string
|
|
- secret
|
|
- bool
|
|
- number
|
|
- enum
|
|
type: string
|
|
x-enum-varnames:
|
|
- FieldString
|
|
- FieldSecret
|
|
- FieldBool
|
|
- FieldNumber
|
|
- FieldEnum
|
|
channel.Message:
|
|
properties:
|
|
actions:
|
|
items:
|
|
$ref: '#/definitions/channel.Action'
|
|
type: array
|
|
attachments:
|
|
items:
|
|
$ref: '#/definitions/channel.Attachment'
|
|
type: array
|
|
format:
|
|
$ref: '#/definitions/channel.MessageFormat'
|
|
id:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
parts:
|
|
items:
|
|
$ref: '#/definitions/channel.MessagePart'
|
|
type: array
|
|
reply:
|
|
$ref: '#/definitions/channel.ReplyRef'
|
|
text:
|
|
type: string
|
|
thread:
|
|
$ref: '#/definitions/channel.ThreadRef'
|
|
type: object
|
|
channel.MessageFormat:
|
|
enum:
|
|
- plain
|
|
- markdown
|
|
- rich
|
|
type: string
|
|
x-enum-varnames:
|
|
- MessageFormatPlain
|
|
- MessageFormatMarkdown
|
|
- MessageFormatRich
|
|
channel.MessagePart:
|
|
properties:
|
|
channel_identity_id:
|
|
type: string
|
|
emoji:
|
|
type: string
|
|
language:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
styles:
|
|
items:
|
|
$ref: '#/definitions/channel.MessageTextStyle'
|
|
type: array
|
|
text:
|
|
type: string
|
|
type:
|
|
$ref: '#/definitions/channel.MessagePartType'
|
|
url:
|
|
type: string
|
|
type: object
|
|
channel.MessagePartType:
|
|
enum:
|
|
- text
|
|
- link
|
|
- code_block
|
|
- mention
|
|
- emoji
|
|
type: string
|
|
x-enum-varnames:
|
|
- MessagePartText
|
|
- MessagePartLink
|
|
- MessagePartCodeBlock
|
|
- MessagePartMention
|
|
- MessagePartEmoji
|
|
channel.MessageTextStyle:
|
|
enum:
|
|
- bold
|
|
- italic
|
|
- strikethrough
|
|
- code
|
|
type: string
|
|
x-enum-varnames:
|
|
- MessageStyleBold
|
|
- MessageStyleItalic
|
|
- MessageStyleStrikethrough
|
|
- MessageStyleCode
|
|
channel.ReplyRef:
|
|
properties:
|
|
message_id:
|
|
type: string
|
|
target:
|
|
type: string
|
|
type: object
|
|
channel.SendRequest:
|
|
properties:
|
|
channel_identity_id:
|
|
type: string
|
|
message:
|
|
$ref: '#/definitions/channel.Message'
|
|
target:
|
|
type: string
|
|
type: object
|
|
channel.TargetHint:
|
|
properties:
|
|
example:
|
|
type: string
|
|
label:
|
|
type: string
|
|
type: object
|
|
channel.TargetSpec:
|
|
properties:
|
|
format:
|
|
type: string
|
|
hints:
|
|
items:
|
|
$ref: '#/definitions/channel.TargetHint'
|
|
type: array
|
|
type: object
|
|
channel.ThreadRef:
|
|
properties:
|
|
id:
|
|
type: string
|
|
type: object
|
|
channel.UpdateChannelStatusRequest:
|
|
properties:
|
|
disabled:
|
|
type: boolean
|
|
type: object
|
|
channel.UpsertChannelIdentityConfigRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
type: object
|
|
channel.UpsertConfigRequest:
|
|
properties:
|
|
credentials:
|
|
additionalProperties: {}
|
|
type: object
|
|
disabled:
|
|
type: boolean
|
|
external_identity:
|
|
type: string
|
|
routing:
|
|
additionalProperties: {}
|
|
type: object
|
|
self_identity:
|
|
additionalProperties: {}
|
|
type: object
|
|
verified_at:
|
|
type: string
|
|
type: object
|
|
email.BindingResponse:
|
|
properties:
|
|
bot_id:
|
|
type: string
|
|
can_delete:
|
|
type: boolean
|
|
can_read:
|
|
type: boolean
|
|
can_write:
|
|
type: boolean
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
created_at:
|
|
type: string
|
|
email_address:
|
|
type: string
|
|
email_provider_id:
|
|
type: string
|
|
id:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
email.ConfigSchema:
|
|
properties:
|
|
fields:
|
|
items:
|
|
$ref: '#/definitions/email.FieldSchema'
|
|
type: array
|
|
type: object
|
|
email.CreateBindingRequest:
|
|
properties:
|
|
can_delete:
|
|
type: boolean
|
|
can_read:
|
|
type: boolean
|
|
can_write:
|
|
type: boolean
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
email_address:
|
|
type: string
|
|
email_provider_id:
|
|
type: string
|
|
type: object
|
|
email.CreateProviderRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
type: object
|
|
email.FieldSchema:
|
|
properties:
|
|
description:
|
|
type: string
|
|
enum:
|
|
items:
|
|
type: string
|
|
type: array
|
|
example: {}
|
|
key:
|
|
type: string
|
|
order:
|
|
type: integer
|
|
required:
|
|
type: boolean
|
|
title:
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
email.OutboxItemResponse:
|
|
properties:
|
|
attachments:
|
|
items: {}
|
|
type: array
|
|
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:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
email.ProviderMeta:
|
|
properties:
|
|
config_schema:
|
|
$ref: '#/definitions/email.ConfigSchema'
|
|
display_name:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
type: object
|
|
email.ProviderResponse:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
created_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
email.UpdateBindingRequest:
|
|
properties:
|
|
can_delete:
|
|
type: boolean
|
|
can_read:
|
|
type: boolean
|
|
can_write:
|
|
type: boolean
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
email_address:
|
|
type: string
|
|
type: object
|
|
email.UpdateProviderRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
type: object
|
|
github_com_memohai_memoh_internal_mcp.Connection:
|
|
properties:
|
|
auth_type:
|
|
type: string
|
|
bot_id:
|
|
type: string
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
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:
|
|
items:
|
|
$ref: '#/definitions/mcp.ToolDescriptor'
|
|
type: array
|
|
type:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
handlers.BatchDeleteRequest:
|
|
properties:
|
|
ids:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
handlers.ChannelMeta:
|
|
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'
|
|
type: object
|
|
handlers.CreateContainerRequest:
|
|
properties:
|
|
restore_data:
|
|
type: boolean
|
|
snapshotter:
|
|
type: string
|
|
type: object
|
|
handlers.CreateContainerResponse:
|
|
properties:
|
|
container_id:
|
|
type: string
|
|
data_restored:
|
|
type: boolean
|
|
has_preserved_data:
|
|
type: boolean
|
|
image:
|
|
type: string
|
|
snapshotter:
|
|
type: string
|
|
started:
|
|
type: boolean
|
|
type: object
|
|
handlers.CreateSnapshotRequest:
|
|
properties:
|
|
snapshot_name:
|
|
type: string
|
|
type: object
|
|
handlers.CreateSnapshotResponse:
|
|
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
|
|
type: object
|
|
handlers.DailyTokenUsage:
|
|
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
|
|
type: object
|
|
handlers.ErrorResponse:
|
|
properties:
|
|
message:
|
|
type: string
|
|
type: object
|
|
handlers.FSDeleteRequest:
|
|
properties:
|
|
path:
|
|
type: string
|
|
recursive:
|
|
type: boolean
|
|
type: object
|
|
handlers.FSFileInfo:
|
|
properties:
|
|
isDir:
|
|
type: boolean
|
|
modTime:
|
|
type: string
|
|
mode:
|
|
type: string
|
|
name:
|
|
type: string
|
|
path:
|
|
type: string
|
|
size:
|
|
type: integer
|
|
type: object
|
|
handlers.FSListResponse:
|
|
properties:
|
|
entries:
|
|
items:
|
|
$ref: '#/definitions/handlers.FSFileInfo'
|
|
type: array
|
|
path:
|
|
type: string
|
|
type: object
|
|
handlers.FSMkdirRequest:
|
|
properties:
|
|
path:
|
|
type: string
|
|
type: object
|
|
handlers.FSReadResponse:
|
|
properties:
|
|
content:
|
|
type: string
|
|
path:
|
|
type: string
|
|
size:
|
|
type: integer
|
|
type: object
|
|
handlers.FSRenameRequest:
|
|
properties:
|
|
newPath:
|
|
type: string
|
|
oldPath:
|
|
type: string
|
|
type: object
|
|
handlers.FSUploadResponse:
|
|
properties:
|
|
path:
|
|
type: string
|
|
size:
|
|
type: integer
|
|
type: object
|
|
handlers.FSWriteRequest:
|
|
properties:
|
|
content:
|
|
type: string
|
|
path:
|
|
type: string
|
|
type: object
|
|
handlers.GetContainerResponse:
|
|
properties:
|
|
container_id:
|
|
type: string
|
|
container_path:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
has_preserved_data:
|
|
type: boolean
|
|
image:
|
|
type: string
|
|
namespace:
|
|
type: string
|
|
status:
|
|
type: string
|
|
task_running:
|
|
type: boolean
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
handlers.ListSnapshotsResponse:
|
|
properties:
|
|
snapshots:
|
|
items:
|
|
$ref: '#/definitions/handlers.SnapshotInfo'
|
|
type: array
|
|
snapshotter:
|
|
type: string
|
|
type: object
|
|
handlers.LocalChannelMessageRequest:
|
|
properties:
|
|
message:
|
|
$ref: '#/definitions/channel.Message'
|
|
type: object
|
|
handlers.LoginRequest:
|
|
properties:
|
|
password:
|
|
type: string
|
|
username:
|
|
type: string
|
|
type: object
|
|
handlers.LoginResponse:
|
|
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
|
|
type: object
|
|
handlers.MCPStdioRequest:
|
|
properties:
|
|
args:
|
|
items:
|
|
type: string
|
|
type: array
|
|
command:
|
|
type: string
|
|
cwd:
|
|
type: string
|
|
env:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
name:
|
|
type: string
|
|
type: object
|
|
handlers.MCPStdioResponse:
|
|
properties:
|
|
connection_id:
|
|
type: string
|
|
tools:
|
|
items:
|
|
type: string
|
|
type: array
|
|
url:
|
|
type: string
|
|
type: object
|
|
handlers.ModelTokenUsage:
|
|
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
|
|
type: object
|
|
handlers.PingResponse:
|
|
properties:
|
|
container_backend:
|
|
type: string
|
|
snapshot_supported:
|
|
type: boolean
|
|
status:
|
|
type: string
|
|
type: object
|
|
handlers.ProbeResponse:
|
|
properties:
|
|
auth_required:
|
|
type: boolean
|
|
error:
|
|
type: string
|
|
status:
|
|
type: string
|
|
tools:
|
|
items:
|
|
$ref: '#/definitions/mcp.ToolDescriptor'
|
|
type: array
|
|
type: object
|
|
handlers.RefreshResponse:
|
|
properties:
|
|
access_token:
|
|
type: string
|
|
expires_at:
|
|
type: string
|
|
token_type:
|
|
type: string
|
|
type: object
|
|
handlers.RollbackRequest:
|
|
properties:
|
|
version:
|
|
type: integer
|
|
type: object
|
|
handlers.SkillItem:
|
|
properties:
|
|
content:
|
|
type: string
|
|
description:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
raw:
|
|
type: string
|
|
type: object
|
|
handlers.SkillsDeleteRequest:
|
|
properties:
|
|
names:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
handlers.SkillsResponse:
|
|
properties:
|
|
skills:
|
|
items:
|
|
$ref: '#/definitions/handlers.SkillItem'
|
|
type: array
|
|
type: object
|
|
handlers.SkillsUpsertRequest:
|
|
properties:
|
|
skills:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
handlers.SnapshotInfo:
|
|
properties:
|
|
created_at:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
kind:
|
|
type: string
|
|
labels:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
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
|
|
type: object
|
|
handlers.TokenUsageResponse:
|
|
properties:
|
|
by_model:
|
|
items:
|
|
$ref: '#/definitions/handlers.ModelTokenUsage'
|
|
type: array
|
|
chat:
|
|
items:
|
|
$ref: '#/definitions/handlers.DailyTokenUsage'
|
|
type: array
|
|
heartbeat:
|
|
items:
|
|
$ref: '#/definitions/handlers.DailyTokenUsage'
|
|
type: array
|
|
type: object
|
|
handlers.emailOAuthStatusResponse:
|
|
properties:
|
|
configured:
|
|
type: boolean
|
|
email_address:
|
|
type: string
|
|
expired:
|
|
type: boolean
|
|
expires_at:
|
|
type: string
|
|
has_token:
|
|
type: boolean
|
|
provider:
|
|
type: string
|
|
type: object
|
|
handlers.fsOpResponse:
|
|
properties:
|
|
ok:
|
|
type: boolean
|
|
type: object
|
|
handlers.listMyIdentitiesResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/identities.ChannelIdentity'
|
|
type: array
|
|
user_id:
|
|
type: string
|
|
type: object
|
|
handlers.markReadRequest:
|
|
properties:
|
|
ids:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
handlers.memoryAddPayload:
|
|
properties:
|
|
embedding_enabled:
|
|
type: boolean
|
|
filters:
|
|
additionalProperties: {}
|
|
type: object
|
|
infer:
|
|
type: boolean
|
|
message:
|
|
type: string
|
|
messages:
|
|
items:
|
|
$ref: '#/definitions/adapters.Message'
|
|
type: array
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
namespace:
|
|
type: string
|
|
run_id:
|
|
type: string
|
|
type: object
|
|
handlers.memoryCompactPayload:
|
|
properties:
|
|
decay_days:
|
|
type: integer
|
|
ratio:
|
|
type: number
|
|
type: object
|
|
handlers.memoryDeletePayload:
|
|
properties:
|
|
memory_ids:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
handlers.memorySearchPayload:
|
|
properties:
|
|
embedding_enabled:
|
|
type: boolean
|
|
filters:
|
|
additionalProperties: {}
|
|
type: object
|
|
limit:
|
|
type: integer
|
|
no_stats:
|
|
type: boolean
|
|
query:
|
|
type: string
|
|
run_id:
|
|
type: string
|
|
sources:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
handlers.oauthAuthorizeRequest:
|
|
properties:
|
|
callback_url:
|
|
type: string
|
|
client_id:
|
|
type: string
|
|
client_secret:
|
|
type: string
|
|
type: object
|
|
handlers.oauthDiscoverRequest:
|
|
properties:
|
|
url:
|
|
type: string
|
|
type: object
|
|
handlers.oauthExchangeRequest:
|
|
properties:
|
|
code:
|
|
type: string
|
|
state:
|
|
type: string
|
|
type: object
|
|
handlers.skillsOpResponse:
|
|
properties:
|
|
ok:
|
|
type: boolean
|
|
type: object
|
|
handlers.synthesizeRequest:
|
|
properties:
|
|
text:
|
|
type: string
|
|
type: object
|
|
handlers.synthesizeResponse:
|
|
properties:
|
|
content_type:
|
|
type: string
|
|
size:
|
|
type: integer
|
|
temp_id:
|
|
type: string
|
|
type: object
|
|
handlers.terminalInfoResponse:
|
|
properties:
|
|
available:
|
|
type: boolean
|
|
shell:
|
|
type: string
|
|
type: object
|
|
heartbeat.ListLogsResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/heartbeat.Log'
|
|
type: array
|
|
type: object
|
|
heartbeat.Log:
|
|
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: {}
|
|
type: object
|
|
identities.ChannelIdentity:
|
|
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:
|
|
additionalProperties: {}
|
|
type: object
|
|
updated_at:
|
|
type: string
|
|
user_id:
|
|
type: string
|
|
type: object
|
|
inbox.CountResult:
|
|
properties:
|
|
total:
|
|
type: integer
|
|
unread:
|
|
type: integer
|
|
type: object
|
|
inbox.CreateRequest:
|
|
properties:
|
|
action:
|
|
type: string
|
|
bot_id:
|
|
type: string
|
|
content:
|
|
type: string
|
|
header:
|
|
additionalProperties: {}
|
|
type: object
|
|
source:
|
|
type: string
|
|
type: object
|
|
inbox.Item:
|
|
properties:
|
|
action:
|
|
type: string
|
|
bot_id:
|
|
type: string
|
|
content:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
header:
|
|
additionalProperties: {}
|
|
type: object
|
|
id:
|
|
type: string
|
|
is_read:
|
|
type: boolean
|
|
read_at:
|
|
type: string
|
|
source:
|
|
type: string
|
|
type: object
|
|
mcp.AuthorizeResult:
|
|
properties:
|
|
authorization_url:
|
|
type: string
|
|
type: object
|
|
mcp.DiscoveryResult:
|
|
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:
|
|
items:
|
|
type: string
|
|
type: array
|
|
token_endpoint:
|
|
type: string
|
|
type: object
|
|
mcp.ExportResponse:
|
|
properties:
|
|
mcpServers:
|
|
additionalProperties:
|
|
$ref: '#/definitions/mcp.MCPServerEntry'
|
|
type: object
|
|
type: object
|
|
mcp.ImportRequest:
|
|
properties:
|
|
mcpServers:
|
|
additionalProperties:
|
|
$ref: '#/definitions/mcp.MCPServerEntry'
|
|
type: object
|
|
type: object
|
|
mcp.ListResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/github_com_memohai_memoh_internal_mcp.Connection'
|
|
type: array
|
|
type: object
|
|
mcp.MCPServerEntry:
|
|
properties:
|
|
args:
|
|
items:
|
|
type: string
|
|
type: array
|
|
command:
|
|
type: string
|
|
cwd:
|
|
type: string
|
|
env:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
headers:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
transport:
|
|
type: string
|
|
url:
|
|
type: string
|
|
type: object
|
|
mcp.OAuthStatus:
|
|
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
|
|
type: object
|
|
mcp.ToolDescriptor:
|
|
properties:
|
|
description:
|
|
type: string
|
|
inputSchema:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
type: object
|
|
mcp.UpsertRequest:
|
|
properties:
|
|
args:
|
|
items:
|
|
type: string
|
|
type: array
|
|
auth_type:
|
|
type: string
|
|
command:
|
|
type: string
|
|
cwd:
|
|
type: string
|
|
env:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
headers:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
is_active:
|
|
type: boolean
|
|
name:
|
|
type: string
|
|
transport:
|
|
type: string
|
|
url:
|
|
type: string
|
|
type: object
|
|
message.Message:
|
|
properties:
|
|
assets:
|
|
items:
|
|
$ref: '#/definitions/message.MessageAsset'
|
|
type: array
|
|
bot_id:
|
|
type: string
|
|
content:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
created_at:
|
|
type: string
|
|
external_message_id:
|
|
type: string
|
|
id:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
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:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
type: object
|
|
message.MessageAsset:
|
|
properties:
|
|
content_hash:
|
|
type: string
|
|
mime:
|
|
type: string
|
|
ordinal:
|
|
type: integer
|
|
role:
|
|
type: string
|
|
size_bytes:
|
|
type: integer
|
|
storage_key:
|
|
type: string
|
|
type: object
|
|
models.AddRequest:
|
|
properties:
|
|
client_type:
|
|
$ref: '#/definitions/models.ClientType'
|
|
dimensions:
|
|
type: integer
|
|
input_modalities:
|
|
items:
|
|
type: string
|
|
type: array
|
|
llm_provider_id:
|
|
type: string
|
|
model_id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
supports_reasoning:
|
|
type: boolean
|
|
type:
|
|
$ref: '#/definitions/models.ModelType'
|
|
type: object
|
|
models.AddResponse:
|
|
properties:
|
|
id:
|
|
type: string
|
|
model_id:
|
|
type: string
|
|
type: object
|
|
models.ClientType:
|
|
enum:
|
|
- openai-responses
|
|
- openai-completions
|
|
- anthropic-messages
|
|
- google-generative-ai
|
|
type: string
|
|
x-enum-varnames:
|
|
- ClientTypeOpenAIResponses
|
|
- ClientTypeOpenAICompletions
|
|
- ClientTypeAnthropicMessages
|
|
- ClientTypeGoogleGenerativeAI
|
|
models.CountResponse:
|
|
properties:
|
|
count:
|
|
type: integer
|
|
type: object
|
|
models.GetResponse:
|
|
properties:
|
|
client_type:
|
|
$ref: '#/definitions/models.ClientType'
|
|
dimensions:
|
|
type: integer
|
|
id:
|
|
type: string
|
|
input_modalities:
|
|
items:
|
|
type: string
|
|
type: array
|
|
llm_provider_id:
|
|
type: string
|
|
model_id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
supports_reasoning:
|
|
type: boolean
|
|
type:
|
|
$ref: '#/definitions/models.ModelType'
|
|
type: object
|
|
models.ModelType:
|
|
enum:
|
|
- chat
|
|
- embedding
|
|
type: string
|
|
x-enum-varnames:
|
|
- ModelTypeChat
|
|
- ModelTypeEmbedding
|
|
models.TestResponse:
|
|
properties:
|
|
latency_ms:
|
|
type: integer
|
|
message:
|
|
type: string
|
|
reachable:
|
|
type: boolean
|
|
status:
|
|
$ref: '#/definitions/models.TestStatus'
|
|
type: object
|
|
models.TestStatus:
|
|
enum:
|
|
- ok
|
|
- auth_error
|
|
- error
|
|
type: string
|
|
x-enum-varnames:
|
|
- TestStatusOK
|
|
- TestStatusAuthError
|
|
- TestStatusError
|
|
models.UpdateRequest:
|
|
properties:
|
|
client_type:
|
|
$ref: '#/definitions/models.ClientType'
|
|
dimensions:
|
|
type: integer
|
|
input_modalities:
|
|
items:
|
|
type: string
|
|
type: array
|
|
llm_provider_id:
|
|
type: string
|
|
model_id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
supports_reasoning:
|
|
type: boolean
|
|
type:
|
|
$ref: '#/definitions/models.ModelType'
|
|
type: object
|
|
providers.CountResponse:
|
|
properties:
|
|
count:
|
|
type: integer
|
|
type: object
|
|
providers.CreateRequest:
|
|
properties:
|
|
api_key:
|
|
type: string
|
|
base_url:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
required:
|
|
- base_url
|
|
- name
|
|
type: object
|
|
providers.GetResponse:
|
|
properties:
|
|
api_key:
|
|
type: string
|
|
base_url:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
providers.ImportModelsRequest:
|
|
properties:
|
|
client_type:
|
|
type: string
|
|
type: object
|
|
providers.ImportModelsResponse:
|
|
properties:
|
|
created:
|
|
type: integer
|
|
models:
|
|
items:
|
|
type: string
|
|
type: array
|
|
skipped:
|
|
type: integer
|
|
type: object
|
|
providers.TestResponse:
|
|
properties:
|
|
latency_ms:
|
|
type: integer
|
|
message:
|
|
type: string
|
|
reachable:
|
|
type: boolean
|
|
type: object
|
|
providers.UpdateRequest:
|
|
properties:
|
|
api_key:
|
|
type: string
|
|
base_url:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
type: object
|
|
schedule.CreateRequest:
|
|
properties:
|
|
command:
|
|
type: string
|
|
description:
|
|
type: string
|
|
enabled:
|
|
type: boolean
|
|
max_calls:
|
|
$ref: '#/definitions/schedule.NullableInt'
|
|
name:
|
|
type: string
|
|
pattern:
|
|
type: string
|
|
type: object
|
|
schedule.ListResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/schedule.Schedule'
|
|
type: array
|
|
type: object
|
|
schedule.NullableInt:
|
|
properties:
|
|
set:
|
|
type: boolean
|
|
value:
|
|
type: integer
|
|
type: object
|
|
schedule.Schedule:
|
|
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
|
|
type: object
|
|
schedule.UpdateRequest:
|
|
properties:
|
|
command:
|
|
type: string
|
|
description:
|
|
type: string
|
|
enabled:
|
|
type: boolean
|
|
max_calls:
|
|
$ref: '#/definitions/schedule.NullableInt'
|
|
name:
|
|
type: string
|
|
pattern:
|
|
type: string
|
|
type: object
|
|
searchproviders.CreateRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
provider:
|
|
$ref: '#/definitions/searchproviders.ProviderName'
|
|
type: object
|
|
searchproviders.GetResponse:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
created_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
searchproviders.ProviderConfigSchema:
|
|
properties:
|
|
fields:
|
|
additionalProperties:
|
|
$ref: '#/definitions/searchproviders.ProviderFieldSchema'
|
|
type: object
|
|
type: object
|
|
searchproviders.ProviderFieldSchema:
|
|
properties:
|
|
description:
|
|
type: string
|
|
enum:
|
|
items:
|
|
type: string
|
|
type: array
|
|
example: {}
|
|
required:
|
|
type: boolean
|
|
title:
|
|
type: string
|
|
type:
|
|
type: string
|
|
type: object
|
|
searchproviders.ProviderMeta:
|
|
properties:
|
|
config_schema:
|
|
$ref: '#/definitions/searchproviders.ProviderConfigSchema'
|
|
display_name:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
type: object
|
|
searchproviders.ProviderName:
|
|
enum:
|
|
- brave
|
|
- bing
|
|
- google
|
|
- tavily
|
|
- sogou
|
|
- serper
|
|
- searxng
|
|
- jina
|
|
- exa
|
|
- bocha
|
|
- duckduckgo
|
|
- yandex
|
|
type: string
|
|
x-enum-varnames:
|
|
- ProviderBrave
|
|
- ProviderBing
|
|
- ProviderGoogle
|
|
- ProviderTavily
|
|
- ProviderSogou
|
|
- ProviderSerper
|
|
- ProviderSearXNG
|
|
- ProviderJina
|
|
- ProviderExa
|
|
- ProviderBocha
|
|
- ProviderDuckDuckGo
|
|
- ProviderYandex
|
|
searchproviders.UpdateRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
provider:
|
|
$ref: '#/definitions/searchproviders.ProviderName'
|
|
type: object
|
|
settings.Settings:
|
|
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
|
|
type: object
|
|
settings.UpsertRequest:
|
|
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
|
|
type: object
|
|
subagent.AddSkillsRequest:
|
|
properties:
|
|
skills:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
subagent.ContextResponse:
|
|
properties:
|
|
messages:
|
|
items:
|
|
additionalProperties: {}
|
|
type: object
|
|
type: array
|
|
usage:
|
|
additionalProperties: {}
|
|
type: object
|
|
type: object
|
|
subagent.CreateRequest:
|
|
properties:
|
|
description:
|
|
type: string
|
|
messages:
|
|
items:
|
|
additionalProperties: {}
|
|
type: object
|
|
type: array
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
skills:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
subagent.ListResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/subagent.Subagent'
|
|
type: array
|
|
type: object
|
|
subagent.SkillsResponse:
|
|
properties:
|
|
skills:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
subagent.Subagent:
|
|
properties:
|
|
bot_id:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
deleted:
|
|
type: boolean
|
|
deleted_at:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
messages:
|
|
items:
|
|
additionalProperties: {}
|
|
type: object
|
|
type: array
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
skills:
|
|
items:
|
|
type: string
|
|
type: array
|
|
updated_at:
|
|
type: string
|
|
usage:
|
|
additionalProperties: {}
|
|
type: object
|
|
type: object
|
|
subagent.UpdateContextRequest:
|
|
properties:
|
|
messages:
|
|
items:
|
|
additionalProperties: {}
|
|
type: object
|
|
type: array
|
|
usage:
|
|
additionalProperties: {}
|
|
type: object
|
|
type: object
|
|
subagent.UpdateRequest:
|
|
properties:
|
|
description:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
type: object
|
|
subagent.UpdateSkillsRequest:
|
|
properties:
|
|
skills:
|
|
items:
|
|
type: string
|
|
type: array
|
|
type: object
|
|
tts.CreateModelRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
model_id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
tts_provider_id:
|
|
type: string
|
|
type: object
|
|
tts.CreateProviderRequest:
|
|
properties:
|
|
name:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
type: object
|
|
tts.ModelCapabilities:
|
|
properties:
|
|
formats:
|
|
items:
|
|
type: string
|
|
type: array
|
|
pitch:
|
|
$ref: '#/definitions/tts.ParamConstraint'
|
|
speed:
|
|
$ref: '#/definitions/tts.ParamConstraint'
|
|
voices:
|
|
items:
|
|
$ref: '#/definitions/tts.VoiceInfo'
|
|
type: array
|
|
type: object
|
|
tts.ModelInfo:
|
|
properties:
|
|
capabilities:
|
|
$ref: '#/definitions/tts.ModelCapabilities'
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
tts.ModelResponse:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
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
|
|
type: object
|
|
tts.ParamConstraint:
|
|
properties:
|
|
default:
|
|
type: number
|
|
max:
|
|
type: number
|
|
min:
|
|
type: number
|
|
options:
|
|
items:
|
|
type: number
|
|
type: array
|
|
type: object
|
|
tts.ProviderMetaResponse:
|
|
properties:
|
|
default_model:
|
|
type: string
|
|
description:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
models:
|
|
items:
|
|
$ref: '#/definitions/tts.ModelInfo'
|
|
type: array
|
|
provider:
|
|
type: string
|
|
type: object
|
|
tts.ProviderResponse:
|
|
properties:
|
|
created_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
provider:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
tts.TestSynthesizeRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
text:
|
|
type: string
|
|
type: object
|
|
tts.UpdateModelRequest:
|
|
properties:
|
|
config:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
type: object
|
|
tts.UpdateProviderRequest:
|
|
properties:
|
|
name:
|
|
type: string
|
|
type: object
|
|
tts.VoiceInfo:
|
|
properties:
|
|
id:
|
|
type: string
|
|
lang:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type: object
|
|
info:
|
|
contact: {}
|
|
title: Memoh API
|
|
version: 1.0.0
|
|
paths:
|
|
/auth/login:
|
|
post:
|
|
description: Validate user credentials and issue a JWT
|
|
parameters:
|
|
- description: Login request
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Login
|
|
tags:
|
|
- auth
|
|
/auth/refresh:
|
|
post:
|
|
description: Issue a new JWT using the existing claims with updated expiration
|
|
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'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Refresh Token
|
|
tags:
|
|
- auth
|
|
/bots:
|
|
get:
|
|
description: List bots accessible to current user (admin can specify owner_id)
|
|
parameters:
|
|
- description: Owner user ID (admin only)
|
|
in: query
|
|
name: owner_id
|
|
type: string
|
|
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'
|
|
summary: List bots
|
|
tags:
|
|
- bots
|
|
post:
|
|
description: Create a bot user owned by current user (or admin-specified owner)
|
|
parameters:
|
|
- description: Bot payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create bot user
|
|
tags:
|
|
- bots
|
|
/bots/{bot_id}/cli/messages:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Post a user message (with optional attachments) through the local
|
|
channel pipeline.
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Message payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.LocalChannelMessageRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"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'
|
|
summary: Send a message to a local channel
|
|
tags:
|
|
- local-channel
|
|
/bots/{bot_id}/cli/stream:
|
|
get:
|
|
description: Open a persistent SSE connection to receive real-time stream events
|
|
for the given bot.
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- text/event-stream
|
|
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'
|
|
summary: Subscribe to local channel events via SSE
|
|
tags:
|
|
- local-channel
|
|
/bots/{bot_id}/cli/ws:
|
|
get:
|
|
description: Upgrade to WebSocket for bidirectional chat streaming with abort
|
|
support.
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: WebSocket chat endpoint
|
|
tags:
|
|
- local-channel
|
|
/bots/{bot_id}/container:
|
|
delete:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Export /data before deletion
|
|
in: query
|
|
name: preserve_data
|
|
type: boolean
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete MCP container for bot
|
|
tags:
|
|
- containerd
|
|
get:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get container info for bot
|
|
tags:
|
|
- containerd
|
|
post:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Create container payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create and start MCP container for bot
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/data/export:
|
|
post:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/gzip
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
type: file
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Export container /data as a tar.gz archive
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/data/import:
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: tar.gz archive
|
|
in: formData
|
|
name: file
|
|
required: true
|
|
type: file
|
|
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'
|
|
summary: Import a tar.gz archive into container /data
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/data/restore:
|
|
post:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Restore previously preserved data into container
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/fs:
|
|
get:
|
|
description: Returns metadata about a file or directory at the given container
|
|
path
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Container path
|
|
in: query
|
|
name: path
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get file or directory info
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/fs/delete:
|
|
post:
|
|
description: Deletes a file or directory at the given container path
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Delete request
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Delete a file or directory
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/fs/download:
|
|
get:
|
|
description: Downloads a file from the container with appropriate Content-Type
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Container file path
|
|
in: query
|
|
name: path
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/octet-stream
|
|
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'
|
|
summary: Download a file as binary stream
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/fs/list:
|
|
get:
|
|
description: Lists files and directories at the given container path
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Container directory path
|
|
in: query
|
|
name: path
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: List directory contents
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/fs/mkdir:
|
|
post:
|
|
description: Creates a directory (and parents) at the given container path
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Mkdir request
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create a directory
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/fs/read:
|
|
get:
|
|
description: Reads the content of a file and returns it as a JSON string
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Container file path
|
|
in: query
|
|
name: path
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Read file content as text
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/fs/rename:
|
|
post:
|
|
description: Renames or moves a file/directory from oldPath to newPath
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Rename request
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Rename or move a file/directory
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/fs/upload:
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
description: Uploads a binary file to the given container path
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Destination container path
|
|
in: formData
|
|
name: path
|
|
required: true
|
|
type: string
|
|
- description: File to upload
|
|
in: formData
|
|
name: file
|
|
required: true
|
|
type: file
|
|
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'
|
|
summary: Upload a file via multipart form
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/fs/write:
|
|
post:
|
|
description: Creates or overwrites a file with the provided text content
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Write request
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Write text content to a file
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/skills:
|
|
delete:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Delete skills payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Delete skills from data directory
|
|
tags:
|
|
- containerd
|
|
get:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: List skills from data directory
|
|
tags:
|
|
- containerd
|
|
post:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Skills payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Upload skills into data directory
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/snapshots:
|
|
get:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Snapshotter name
|
|
in: query
|
|
name: snapshotter
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/handlers.ListSnapshotsResponse'
|
|
"501":
|
|
description: Snapshots currently not supported on this backend
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List snapshots
|
|
tags:
|
|
- containerd
|
|
post:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Create snapshot payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create container snapshot for bot
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/snapshots/rollback:
|
|
post:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Rollback payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Rollback container to a previous snapshot version
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/start:
|
|
post:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Start container task for bot
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/stop:
|
|
post:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Stop container task for bot
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/terminal:
|
|
get:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/handlers.terminalInfoResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Check terminal availability for bot container
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/container/terminal/ws:
|
|
get:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- default: 80
|
|
description: Initial terminal columns
|
|
in: query
|
|
name: cols
|
|
type: integer
|
|
- default: 24
|
|
description: Initial terminal rows
|
|
in: query
|
|
name: rows
|
|
type: integer
|
|
- description: Auth token
|
|
in: query
|
|
name: token
|
|
type: string
|
|
responses:
|
|
"101":
|
|
description: WebSocket upgrade
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Interactive WebSocket terminal for bot container
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/email-bindings:
|
|
get:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/email.BindingResponse'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List email bindings for a bot
|
|
tags:
|
|
- email-bindings
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Binding configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/email.CreateBindingRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Bind an email provider to a bot
|
|
tags:
|
|
- email-bindings
|
|
/bots/{bot_id}/email-bindings/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Binding ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Remove an email binding
|
|
tags:
|
|
- email-bindings
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Binding ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated binding
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/email.UpdateBindingRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Update an email binding
|
|
tags:
|
|
- email-bindings
|
|
/bots/{bot_id}/email-outbox:
|
|
get:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- default: 20
|
|
description: Limit
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
- default: 0
|
|
description: Offset
|
|
in: query
|
|
name: offset
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties: true
|
|
type: object
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List outbox emails for a bot (audit)
|
|
tags:
|
|
- email-outbox
|
|
/bots/{bot_id}/email-outbox/{id}:
|
|
get:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Email ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/email.OutboxItemResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Get outbox email detail
|
|
tags:
|
|
- email-outbox
|
|
/bots/{bot_id}/heartbeat/logs:
|
|
delete:
|
|
description: Delete all heartbeat execution logs for a bot
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete heartbeat logs
|
|
tags:
|
|
- heartbeat
|
|
get:
|
|
description: List heartbeat execution logs for a bot
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Before timestamp (RFC3339)
|
|
in: query
|
|
name: before
|
|
type: string
|
|
- default: 50
|
|
description: Limit
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
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'
|
|
summary: List heartbeat logs
|
|
tags:
|
|
- heartbeat
|
|
/bots/{bot_id}/inbox:
|
|
get:
|
|
description: List inbox items for a bot with optional filters
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Filter by read status (true/false)
|
|
in: query
|
|
name: is_read
|
|
type: string
|
|
- description: Filter by source
|
|
in: query
|
|
name: source
|
|
type: string
|
|
- default: 50
|
|
description: Max items to return
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
- default: 0
|
|
description: Offset for pagination
|
|
in: query
|
|
name: offset
|
|
type: integer
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/inbox.Item'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List inbox items
|
|
tags:
|
|
- inbox
|
|
post:
|
|
description: Create a new inbox item (for external integrations)
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Inbox item payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create inbox item
|
|
tags:
|
|
- inbox
|
|
/bots/{bot_id}/inbox/{id}:
|
|
delete:
|
|
description: Delete a single inbox item
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Inbox item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete inbox item
|
|
tags:
|
|
- inbox
|
|
get:
|
|
description: Get a single inbox item by ID
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Inbox item ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get inbox item
|
|
tags:
|
|
- inbox
|
|
/bots/{bot_id}/inbox/count:
|
|
get:
|
|
description: Count unread and total inbox items
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Count inbox items
|
|
tags:
|
|
- inbox
|
|
/bots/{bot_id}/inbox/mark-read:
|
|
post:
|
|
description: Batch mark inbox items as read
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Item IDs to mark as read
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Mark inbox items as read
|
|
tags:
|
|
- inbox
|
|
/bots/{bot_id}/mcp:
|
|
get:
|
|
description: List MCP connections for a bot
|
|
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'
|
|
summary: List MCP connections
|
|
tags:
|
|
- mcp
|
|
post:
|
|
description: Create a MCP connection for a bot
|
|
parameters:
|
|
- description: MCP payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create MCP connection
|
|
tags:
|
|
- mcp
|
|
/bots/{bot_id}/mcp-ops/batch-delete:
|
|
post:
|
|
description: Delete multiple MCP connections by IDs.
|
|
parameters:
|
|
- description: IDs to delete
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Batch delete MCP connections
|
|
tags:
|
|
- mcp
|
|
/bots/{bot_id}/mcp-stdio:
|
|
post:
|
|
description: Start a stdio MCP process in the bot container and expose it as
|
|
MCP HTTP endpoint.
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Stdio MCP payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create MCP stdio proxy
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/mcp-stdio/{connection_id}:
|
|
post:
|
|
description: Proxies MCP JSON-RPC requests to a stdio MCP process in the container.
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Connection ID
|
|
in: path
|
|
name: connection_id
|
|
required: true
|
|
type: string
|
|
- description: JSON-RPC request
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: MCP stdio proxy (JSON-RPC)
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/mcp/{id}:
|
|
delete:
|
|
description: Delete a MCP connection by ID
|
|
parameters:
|
|
- description: MCP ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Delete MCP connection
|
|
tags:
|
|
- mcp
|
|
get:
|
|
description: Get a MCP connection by ID
|
|
parameters:
|
|
- description: MCP ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get MCP connection
|
|
tags:
|
|
- mcp
|
|
put:
|
|
description: Update a MCP connection by ID
|
|
parameters:
|
|
- description: MCP ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: MCP payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update MCP connection
|
|
tags:
|
|
- mcp
|
|
/bots/{bot_id}/mcp/{id}/oauth/authorize:
|
|
post:
|
|
description: Generate PKCE and return authorization URL for the user to authorize
|
|
parameters:
|
|
- description: MCP connection ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Optional client_id
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Start OAuth authorization flow
|
|
tags:
|
|
- mcp
|
|
/bots/{bot_id}/mcp/{id}/oauth/discover:
|
|
post:
|
|
description: Probe MCP server URL for OAuth requirements and discover authorization
|
|
server metadata
|
|
parameters:
|
|
- description: MCP connection ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Optional URL override
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Discover OAuth configuration for MCP server
|
|
tags:
|
|
- mcp
|
|
/bots/{bot_id}/mcp/{id}/oauth/exchange:
|
|
post:
|
|
description: Frontend callback page calls this to exchange the authorization
|
|
code for access/refresh tokens
|
|
parameters:
|
|
- description: Authorization code and state
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.oauthExchangeRequest'
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: boolean
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Exchange OAuth authorization code for tokens
|
|
tags:
|
|
- mcp
|
|
/bots/{bot_id}/mcp/{id}/oauth/status:
|
|
get:
|
|
description: Returns the current OAuth status including whether tokens are available
|
|
parameters:
|
|
- description: MCP connection ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get OAuth status for MCP connection
|
|
tags:
|
|
- mcp
|
|
/bots/{bot_id}/mcp/{id}/oauth/token:
|
|
delete:
|
|
description: Clears stored OAuth tokens
|
|
parameters:
|
|
- description: MCP connection ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Revoke OAuth tokens for MCP connection
|
|
tags:
|
|
- mcp
|
|
/bots/{bot_id}/mcp/{id}/probe:
|
|
post:
|
|
description: Probe a MCP connection to discover tools and verify connectivity
|
|
parameters:
|
|
- description: MCP connection ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Probe MCP connection
|
|
tags:
|
|
- mcp
|
|
/bots/{bot_id}/mcp/export:
|
|
get:
|
|
description: Export all MCP connections for a bot in standard mcpServers format.
|
|
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'
|
|
summary: Export MCP connections
|
|
tags:
|
|
- mcp
|
|
/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.
|
|
parameters:
|
|
- description: mcpServers dict
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Import MCP connections
|
|
tags:
|
|
- mcp
|
|
/bots/{bot_id}/memory:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Delete specific memories by IDs, or delete all memories if no IDs
|
|
are provided
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: 'Optional: specify memory_ids to delete; if omitted, deletes
|
|
all'
|
|
in: body
|
|
name: payload
|
|
schema:
|
|
$ref: '#/definitions/handlers.memoryDeletePayload'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Delete memories
|
|
tags:
|
|
- memory
|
|
get:
|
|
description: List all memories in the bot-shared namespace
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Skip optional stats in memory search response
|
|
in: query
|
|
name: no_stats
|
|
type: boolean
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get all memories
|
|
tags:
|
|
- memory
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Add memory into the bot-shared namespace
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Memory add payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.memoryAddPayload'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Add memory
|
|
tags:
|
|
- memory
|
|
/bots/{bot_id}/memory/{id}:
|
|
delete:
|
|
description: Delete a single memory by its ID
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Memory ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Delete a single memory
|
|
tags:
|
|
- memory
|
|
/bots/{bot_id}/memory/compact:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: |-
|
|
Consolidate memories by merging similar/redundant entries using LLM.
|
|
|
|
**ratio** (required, range (0,1]):
|
|
- 0.8 = light compression, mostly dedup, keep ~80% of entries
|
|
- 0.5 = moderate compression, merge similar facts, keep ~50%
|
|
- 0.3 = aggressive compression, heavily consolidate, keep ~30%
|
|
|
|
**decay_days** (optional): enable time decay — memories older than N days are treated as low priority and more likely to be merged/dropped.
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: ratio (0,1] required; decay_days optional
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.memoryCompactPayload'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Compact memories
|
|
tags:
|
|
- memory
|
|
/bots/{bot_id}/memory/rebuild:
|
|
post:
|
|
description: Read memory files from the container filesystem (source of truth)
|
|
and restore missing entries to memory storage
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Rebuild memories from filesystem
|
|
tags:
|
|
- memory
|
|
/bots/{bot_id}/memory/search:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Search memory in the bot-shared namespace
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Memory search payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.memorySearchPayload'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Search memory
|
|
tags:
|
|
- memory
|
|
/bots/{bot_id}/memory/status:
|
|
get:
|
|
description: Get the resolved memory runtime status for a bot, including index
|
|
health and source counts
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get memory runtime status
|
|
tags:
|
|
- memory
|
|
/bots/{bot_id}/memory/usage:
|
|
get:
|
|
description: Query the estimated storage usage of current memories
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get memory usage
|
|
tags:
|
|
- memory
|
|
/bots/{bot_id}/messages:
|
|
delete:
|
|
description: Clear all persisted bot-level history messages
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Delete all bot history messages
|
|
tags:
|
|
- messages
|
|
get:
|
|
description: List messages for a bot history with optional pagination
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Limit
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
- description: Before
|
|
in: query
|
|
name: before
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
items:
|
|
$ref: '#/definitions/message.Message'
|
|
type: array
|
|
type: object
|
|
"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'
|
|
summary: List bot history messages
|
|
tags:
|
|
- messages
|
|
/bots/{bot_id}/schedule:
|
|
get:
|
|
description: List schedules for current user
|
|
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'
|
|
summary: List schedules
|
|
tags:
|
|
- schedule
|
|
post:
|
|
description: Create a schedule for current user
|
|
parameters:
|
|
- description: Schedule payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create schedule
|
|
tags:
|
|
- schedule
|
|
/bots/{bot_id}/schedule/{id}:
|
|
delete:
|
|
description: Delete a schedule by ID
|
|
parameters:
|
|
- description: Schedule ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete schedule
|
|
tags:
|
|
- schedule
|
|
get:
|
|
description: Get a schedule by ID
|
|
parameters:
|
|
- description: Schedule ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get schedule
|
|
tags:
|
|
- schedule
|
|
put:
|
|
description: Update a schedule by ID
|
|
parameters:
|
|
- description: Schedule ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Schedule payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update schedule
|
|
tags:
|
|
- schedule
|
|
/bots/{bot_id}/settings:
|
|
delete:
|
|
description: Remove agent settings for current user
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete user settings
|
|
tags:
|
|
- settings
|
|
get:
|
|
description: Get agent settings for current user
|
|
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'
|
|
summary: Get user settings
|
|
tags:
|
|
- settings
|
|
post:
|
|
description: Update or create agent settings for current user
|
|
parameters:
|
|
- description: Settings payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update user settings
|
|
tags:
|
|
- settings
|
|
put:
|
|
description: Update or create agent settings for current user
|
|
parameters:
|
|
- description: Settings payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update user settings
|
|
tags:
|
|
- settings
|
|
/bots/{bot_id}/subagents:
|
|
get:
|
|
description: List subagents for current user
|
|
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'
|
|
summary: List subagents
|
|
tags:
|
|
- subagent
|
|
post:
|
|
description: Create a subagent for current user
|
|
parameters:
|
|
- description: Subagent payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create subagent
|
|
tags:
|
|
- subagent
|
|
/bots/{bot_id}/subagents/{id}:
|
|
delete:
|
|
description: Delete a subagent by ID
|
|
parameters:
|
|
- description: Subagent ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Delete subagent
|
|
tags:
|
|
- subagent
|
|
get:
|
|
description: Get a subagent by ID
|
|
parameters:
|
|
- description: Subagent ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get subagent
|
|
tags:
|
|
- subagent
|
|
put:
|
|
description: Update a subagent by ID
|
|
parameters:
|
|
- description: Subagent ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Subagent payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update subagent
|
|
tags:
|
|
- subagent
|
|
/bots/{bot_id}/subagents/{id}/context:
|
|
get:
|
|
description: Get a subagent's message context
|
|
parameters:
|
|
- description: Subagent ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get subagent context
|
|
tags:
|
|
- subagent
|
|
put:
|
|
description: Update a subagent's message context
|
|
parameters:
|
|
- description: Subagent ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Context payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update subagent context
|
|
tags:
|
|
- subagent
|
|
/bots/{bot_id}/subagents/{id}/skills:
|
|
get:
|
|
description: Get a subagent's skills
|
|
parameters:
|
|
- description: Subagent ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get subagent skills
|
|
tags:
|
|
- subagent
|
|
post:
|
|
description: Add skills to a subagent
|
|
parameters:
|
|
- description: Subagent ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Skills payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Add subagent skills
|
|
tags:
|
|
- subagent
|
|
put:
|
|
description: Replace a subagent's skills
|
|
parameters:
|
|
- description: Subagent ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Skills payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update subagent skills
|
|
tags:
|
|
- subagent
|
|
/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
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Start date (YYYY-MM-DD)
|
|
in: query
|
|
name: from
|
|
required: true
|
|
type: string
|
|
- description: End date exclusive (YYYY-MM-DD)
|
|
in: query
|
|
name: to
|
|
required: true
|
|
type: string
|
|
- description: Optional model UUID to filter by
|
|
in: query
|
|
name: model_id
|
|
type: string
|
|
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'
|
|
summary: Get token usage statistics
|
|
tags:
|
|
- token-usage
|
|
/bots/{bot_id}/tools:
|
|
post:
|
|
description: MCP endpoint for tool discovery and invocation.
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: JSON-RPC request
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Unified MCP tools gateway
|
|
tags:
|
|
- containerd
|
|
/bots/{bot_id}/tts/synthesize:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Stream-synthesize text using the bot's configured TTS model, write
|
|
to temp file
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Text to synthesize
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.synthesizeRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Synthesize speech for a bot
|
|
tags:
|
|
- bots
|
|
/bots/{bot_id}/web/messages:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Post a user message (with optional attachments) through the local
|
|
channel pipeline.
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Message payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.LocalChannelMessageRequest'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"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'
|
|
summary: Send a message to a local channel
|
|
tags:
|
|
- local-channel
|
|
/bots/{bot_id}/web/stream:
|
|
get:
|
|
description: Open a persistent SSE connection to receive real-time stream events
|
|
for the given bot.
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- text/event-stream
|
|
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'
|
|
summary: Subscribe to local channel events via SSE
|
|
tags:
|
|
- local-channel
|
|
/bots/{bot_id}/web/ws:
|
|
get:
|
|
description: Upgrade to WebSocket for bidirectional chat streaming with abort
|
|
support.
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: WebSocket chat endpoint
|
|
tags:
|
|
- local-channel
|
|
/bots/{id}:
|
|
delete:
|
|
description: Delete a bot user (owner/admin only)
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"202":
|
|
description: Accepted
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"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'
|
|
summary: Delete bot
|
|
tags:
|
|
- bots
|
|
get:
|
|
description: Get a bot by ID (owner/admin only)
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get bot details
|
|
tags:
|
|
- bots
|
|
put:
|
|
description: Update bot profile (owner/admin only)
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Bot update payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update bot details
|
|
tags:
|
|
- bots
|
|
/bots/{id}/channel/{platform}:
|
|
delete:
|
|
description: Remove bot channel configuration
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Channel platform
|
|
in: path
|
|
name: platform
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Delete bot channel config
|
|
tags:
|
|
- bots
|
|
get:
|
|
description: Get bot channel configuration
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Channel platform
|
|
in: path
|
|
name: platform
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get bot channel config
|
|
tags:
|
|
- bots
|
|
put:
|
|
description: Update bot channel configuration
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Channel platform
|
|
in: path
|
|
name: platform
|
|
required: true
|
|
type: string
|
|
- description: Channel config payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update bot channel config
|
|
tags:
|
|
- bots
|
|
/bots/{id}/channel/{platform}/send:
|
|
post:
|
|
description: Send a message using bot channel configuration
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Channel platform
|
|
in: path
|
|
name: platform
|
|
required: true
|
|
type: string
|
|
- description: Send payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/channel.SendRequest'
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"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'
|
|
summary: Send message via bot channel
|
|
tags:
|
|
- bots
|
|
/bots/{id}/channel/{platform}/send_chat:
|
|
post:
|
|
description: Send a message using a session-scoped token (reply only)
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Channel platform
|
|
in: path
|
|
name: platform
|
|
required: true
|
|
type: string
|
|
- description: Send payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/channel.SendRequest'
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"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'
|
|
summary: Send message via bot channel session token
|
|
tags:
|
|
- bots
|
|
/bots/{id}/channel/{platform}/status:
|
|
patch:
|
|
description: Update bot channel enabled/disabled status
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Channel platform
|
|
in: path
|
|
name: platform
|
|
required: true
|
|
type: string
|
|
- description: Channel status payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update bot channel status
|
|
tags:
|
|
- bots
|
|
/bots/{id}/checks:
|
|
get:
|
|
description: Evaluate bot attached resource checks in runtime
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: List bot runtime checks
|
|
tags:
|
|
- bots
|
|
/bots/{id}/members:
|
|
get:
|
|
description: List members for a bot
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/bots.ListMembersResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List bot members
|
|
tags:
|
|
- bots
|
|
put:
|
|
description: Add or update bot member role
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Member payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/bots.UpsertMemberRequest'
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/bots.BotMember'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Upsert bot member
|
|
tags:
|
|
- bots
|
|
/bots/{id}/members/{user_id}:
|
|
delete:
|
|
description: Remove a member from a bot
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: User ID
|
|
in: path
|
|
name: user_id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Delete bot member
|
|
tags:
|
|
- bots
|
|
/bots/{id}/owner:
|
|
put:
|
|
description: Transfer bot ownership to another human user
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Transfer payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Transfer bot owner (admin only)
|
|
tags:
|
|
- bots
|
|
/browser-contexts:
|
|
get:
|
|
description: List all browser context configurations
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/browsercontexts.BrowserContext'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List browser contexts
|
|
tags:
|
|
- browser-contexts
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a browser context configuration
|
|
parameters:
|
|
- description: Browser context configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/browsercontexts.CreateRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create a browser context
|
|
tags:
|
|
- browser-contexts
|
|
/browser-contexts/{id}:
|
|
delete:
|
|
description: Delete browser context by ID
|
|
parameters:
|
|
- description: Browser Context ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete a browser context
|
|
tags:
|
|
- browser-contexts
|
|
get:
|
|
description: Get browser context by ID
|
|
parameters:
|
|
- description: Browser Context ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get a browser context
|
|
tags:
|
|
- browser-contexts
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update browser context by ID
|
|
parameters:
|
|
- description: Browser Context ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/browsercontexts.UpdateRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Update a browser context
|
|
tags:
|
|
- browser-contexts
|
|
/channels:
|
|
get:
|
|
description: List channel meta information including capabilities and schemas
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/handlers.ChannelMeta'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List channel capabilities and schemas
|
|
tags:
|
|
- channel
|
|
/channels/{platform}:
|
|
get:
|
|
description: Get channel meta information including capabilities and schemas
|
|
parameters:
|
|
- description: Channel platform
|
|
in: path
|
|
name: platform
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get channel capabilities and schemas
|
|
tags:
|
|
- channel
|
|
/email-providers:
|
|
get:
|
|
parameters:
|
|
- description: Provider type filter
|
|
in: query
|
|
name: provider
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/email.ProviderResponse'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List email providers
|
|
tags:
|
|
- email-providers
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Email provider configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/email.CreateProviderRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create an email provider
|
|
tags:
|
|
- email-providers
|
|
/email-providers/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete an email provider
|
|
tags:
|
|
- email-providers
|
|
get:
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/email.ProviderResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Get an email provider
|
|
tags:
|
|
- email-providers
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/email.UpdateProviderRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Update an email provider
|
|
tags:
|
|
- email-providers
|
|
/email-providers/{id}/oauth/authorize:
|
|
get:
|
|
description: Returns the authorization URL to redirect the user to
|
|
parameters:
|
|
- description: Email provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Start OAuth2 authorization for an email provider
|
|
tags:
|
|
- email-oauth
|
|
/email-providers/{id}/oauth/status:
|
|
get:
|
|
parameters:
|
|
- description: Email provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get OAuth2 status for an email provider
|
|
tags:
|
|
- email-oauth
|
|
/email-providers/{id}/oauth/token:
|
|
delete:
|
|
parameters:
|
|
- description: Email provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Revoke stored OAuth2 tokens for an email provider
|
|
tags:
|
|
- email-oauth
|
|
/email-providers/meta:
|
|
get:
|
|
description: List available email provider types and config schemas
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/email.ProviderMeta'
|
|
type: array
|
|
summary: List email provider metadata
|
|
tags:
|
|
- email-providers
|
|
/email/mailgun/webhook/{config_id}:
|
|
post:
|
|
description: Receives inbound emails from Mailgun
|
|
parameters:
|
|
- description: Email provider config ID
|
|
in: path
|
|
name: config_id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"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'
|
|
summary: Mailgun inbound email webhook
|
|
tags:
|
|
- email-webhook
|
|
/email/oauth/callback:
|
|
get:
|
|
description: Handles the OAuth2 callback, exchanges the code for tokens
|
|
parameters:
|
|
- description: Authorization code
|
|
in: query
|
|
name: code
|
|
required: true
|
|
type: string
|
|
- description: State parameter
|
|
in: query
|
|
name: state
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: OAuth2 callback for email providers
|
|
tags:
|
|
- email-oauth
|
|
/memory-providers:
|
|
get:
|
|
description: List configured memory providers
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/adapters.ProviderGetResponse'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List memory providers
|
|
tags:
|
|
- memory-providers
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a memory provider configuration
|
|
parameters:
|
|
- description: Memory provider configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/adapters.ProviderCreateRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create a memory provider
|
|
tags:
|
|
- memory-providers
|
|
/memory-providers/{id}:
|
|
delete:
|
|
description: Delete memory provider by ID
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete a memory provider
|
|
tags:
|
|
- memory-providers
|
|
get:
|
|
description: Get memory provider by ID
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get a memory provider
|
|
tags:
|
|
- memory-providers
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update memory provider by ID
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/adapters.ProviderUpdateRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Update a memory provider
|
|
tags:
|
|
- memory-providers
|
|
/memory-providers/{id}/status:
|
|
get:
|
|
description: Get runtime status data for a memory provider
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get memory provider status
|
|
tags:
|
|
- memory-providers
|
|
/memory-providers/meta:
|
|
get:
|
|
description: List available memory provider types and config schemas
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/adapters.ProviderMeta'
|
|
type: array
|
|
summary: List memory provider metadata
|
|
tags:
|
|
- memory-providers
|
|
/models:
|
|
get:
|
|
description: Get a list of all configured models, optionally filtered by type
|
|
or client type
|
|
parameters:
|
|
- description: Model type (chat, embedding)
|
|
in: query
|
|
name: type
|
|
type: string
|
|
- description: Client type (openai-responses, openai-completions, anthropic-messages,
|
|
google-generative-ai)
|
|
in: query
|
|
name: client_type
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/models.GetResponse'
|
|
type: array
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List all models
|
|
tags:
|
|
- models
|
|
post:
|
|
description: Create a new model configuration
|
|
parameters:
|
|
- description: Model configuration
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create a new model
|
|
tags:
|
|
- models
|
|
/models/{id}:
|
|
delete:
|
|
description: Delete a model configuration by its internal UUID
|
|
parameters:
|
|
- description: Model internal ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Delete model by internal ID
|
|
tags:
|
|
- models
|
|
get:
|
|
description: Get a model configuration by its internal UUID
|
|
parameters:
|
|
- description: Model internal ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get model by internal ID
|
|
tags:
|
|
- models
|
|
put:
|
|
description: Update a model configuration by its internal UUID
|
|
parameters:
|
|
- description: Model internal ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated model configuration
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update model by internal ID
|
|
tags:
|
|
- models
|
|
/models/{id}/test:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Probe a model's provider endpoint using the model's real model_id
|
|
and client_type to verify configuration
|
|
parameters:
|
|
- description: Model internal ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Test model connectivity
|
|
tags:
|
|
- models
|
|
/models/count:
|
|
get:
|
|
description: Get the total count of models, optionally filtered by type
|
|
parameters:
|
|
- description: Model type (chat, embedding)
|
|
in: query
|
|
name: type
|
|
type: string
|
|
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'
|
|
summary: Get model count
|
|
tags:
|
|
- models
|
|
/models/model/{modelId}:
|
|
delete:
|
|
description: Delete a model configuration by its model_id field (e.g., gpt-4)
|
|
parameters:
|
|
- description: Model ID (e.g., gpt-4)
|
|
in: path
|
|
name: modelId
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Delete model by model ID
|
|
tags:
|
|
- models
|
|
get:
|
|
description: Get a model configuration by its model_id field (e.g., gpt-4)
|
|
parameters:
|
|
- description: Model ID (e.g., gpt-4)
|
|
in: path
|
|
name: modelId
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get model by model ID
|
|
tags:
|
|
- models
|
|
put:
|
|
description: Update a model configuration by its model_id field (e.g., gpt-4)
|
|
parameters:
|
|
- description: Model ID (e.g., gpt-4)
|
|
in: path
|
|
name: modelId
|
|
required: true
|
|
type: string
|
|
- description: Updated model configuration
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update model by model ID
|
|
tags:
|
|
- models
|
|
/ping:
|
|
get:
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/handlers.PingResponse'
|
|
summary: Health check with server capabilities
|
|
tags:
|
|
- system
|
|
/providers:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get a list of all configured LLM providers
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/providers.GetResponse'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List all LLM providers
|
|
tags:
|
|
- providers
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new LLM provider configuration
|
|
parameters:
|
|
- description: Provider configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/providers.CreateRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create a new LLM provider
|
|
tags:
|
|
- providers
|
|
/providers/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Delete a provider configuration
|
|
parameters:
|
|
- description: Provider ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Delete provider
|
|
tags:
|
|
- providers
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get a provider configuration by its ID
|
|
parameters:
|
|
- description: Provider ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get provider by ID
|
|
tags:
|
|
- providers
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update an existing provider configuration
|
|
parameters:
|
|
- description: Provider ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated provider configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/providers.UpdateRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Update provider
|
|
tags:
|
|
- providers
|
|
/providers/{id}/import-models:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Fetch models from provider's /v1/models endpoint and import them
|
|
parameters:
|
|
- description: Provider ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Import configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/providers.ImportModelsRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Import models from provider
|
|
tags:
|
|
- providers
|
|
/providers/{id}/models:
|
|
get:
|
|
description: Get models for a provider by id, optionally filtered by type
|
|
parameters:
|
|
- description: Provider ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Model type (chat, embedding)
|
|
in: query
|
|
name: type
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/models.GetResponse'
|
|
type: array
|
|
"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'
|
|
summary: List provider models
|
|
tags:
|
|
- providers
|
|
/providers/{id}/test:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Probe a provider's base URL to check reachability, supported client
|
|
types, and embedding support
|
|
parameters:
|
|
- description: Provider ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Test provider connectivity
|
|
tags:
|
|
- providers
|
|
/providers/count:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get the total count of providers
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/providers.CountResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Count providers
|
|
tags:
|
|
- providers
|
|
/providers/name/{name}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get a provider configuration by its name
|
|
parameters:
|
|
- description: Provider name
|
|
in: path
|
|
name: name
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get provider by name
|
|
tags:
|
|
- providers
|
|
/search-providers:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: List configured search providers
|
|
parameters:
|
|
- description: Provider filter (brave)
|
|
in: query
|
|
name: provider
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/searchproviders.GetResponse'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List search providers
|
|
tags:
|
|
- search-providers
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a search provider configuration
|
|
parameters:
|
|
- description: Search provider configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/searchproviders.CreateRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create a search provider
|
|
tags:
|
|
- search-providers
|
|
/search-providers/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Delete search provider by ID
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete a search provider
|
|
tags:
|
|
- search-providers
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get search provider by ID
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Get a search provider
|
|
tags:
|
|
- search-providers
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update search provider by ID
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/searchproviders.UpdateRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Update a search provider
|
|
tags:
|
|
- search-providers
|
|
/search-providers/meta:
|
|
get:
|
|
description: List available search provider types and config schemas
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/searchproviders.ProviderMeta'
|
|
type: array
|
|
summary: List search provider metadata
|
|
tags:
|
|
- search-providers
|
|
/tts-models:
|
|
get:
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/tts.ModelResponse'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List all TTS models
|
|
tags:
|
|
- tts-models
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Manually create a TTS model under a specific provider
|
|
parameters:
|
|
- description: TTS model configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/tts.CreateModelRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create a TTS model
|
|
tags:
|
|
- tts-models
|
|
/tts-models/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: Model ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete a TTS model
|
|
tags:
|
|
- tts-models
|
|
get:
|
|
parameters:
|
|
- description: Model ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/tts.ModelResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Get a TTS model
|
|
tags:
|
|
- tts-models
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Model ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/tts.UpdateModelRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Update a TTS model
|
|
tags:
|
|
- tts-models
|
|
/tts-models/{id}/capabilities:
|
|
get:
|
|
parameters:
|
|
- description: Model ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/tts.ModelCapabilities'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Get TTS model capabilities
|
|
tags:
|
|
- tts-models
|
|
/tts-models/{id}/test:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Synthesize text using a specific model's config and return audio
|
|
parameters:
|
|
- description: Model ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Text to synthesize
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/tts.TestSynthesizeRequest'
|
|
produces:
|
|
- application/octet-stream
|
|
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'
|
|
summary: Test TTS model synthesis
|
|
tags:
|
|
- tts-models
|
|
/tts-providers:
|
|
get:
|
|
parameters:
|
|
- description: Provider type filter
|
|
in: query
|
|
name: provider
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/tts.ProviderResponse'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List TTS providers
|
|
tags:
|
|
- tts-providers
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a TTS provider and auto-import its available models
|
|
parameters:
|
|
- description: TTS provider configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/tts.CreateProviderRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Create a TTS provider
|
|
tags:
|
|
- tts-providers
|
|
/tts-providers/{id}:
|
|
delete:
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"204":
|
|
description: No Content
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete a TTS provider
|
|
tags:
|
|
- tts-providers
|
|
get:
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/tts.ProviderResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Get a TTS provider
|
|
tags:
|
|
- tts-providers
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Updated configuration
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/tts.UpdateProviderRequest'
|
|
produces:
|
|
- application/json
|
|
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'
|
|
summary: Update a TTS provider
|
|
tags:
|
|
- tts-providers
|
|
/tts-providers/{id}/import-models:
|
|
post:
|
|
description: Discover and import available models from the TTS adapter
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/tts.ModelResponse'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Import models for a TTS provider
|
|
tags:
|
|
- tts-providers
|
|
/tts-providers/{id}/models:
|
|
get:
|
|
parameters:
|
|
- description: Provider ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/tts.ModelResponse'
|
|
type: array
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List models for a TTS provider
|
|
tags:
|
|
- tts-providers
|
|
/tts-providers/meta:
|
|
get:
|
|
description: List available TTS provider types with their models and capabilities
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/tts.ProviderMetaResponse'
|
|
type: array
|
|
summary: List TTS provider metadata
|
|
tags:
|
|
- tts-providers
|
|
/users:
|
|
get:
|
|
description: List users
|
|
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'
|
|
summary: List users (admin only)
|
|
tags:
|
|
- users
|
|
post:
|
|
description: Create a new human user account
|
|
parameters:
|
|
- description: User payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Create human user (admin only)
|
|
tags:
|
|
- users
|
|
/users/{id}:
|
|
get:
|
|
description: Get user details (self or admin only)
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get user by ID
|
|
tags:
|
|
- users
|
|
put:
|
|
description: Update user profile and status
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: User update payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update user (admin only)
|
|
tags:
|
|
- users
|
|
/users/{id}/password:
|
|
put:
|
|
description: Reset a user password
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Password payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Reset user password (admin only)
|
|
tags:
|
|
- users
|
|
/users/me:
|
|
get:
|
|
description: Get current user profile
|
|
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'
|
|
summary: Get current user
|
|
tags:
|
|
- users
|
|
put:
|
|
description: Update current user display name or avatar
|
|
parameters:
|
|
- description: Profile payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update current user profile
|
|
tags:
|
|
- users
|
|
/users/me/channels/{platform}:
|
|
get:
|
|
description: Get channel binding configuration for current user
|
|
parameters:
|
|
- description: Channel platform
|
|
in: path
|
|
name: platform
|
|
required: true
|
|
type: string
|
|
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'
|
|
summary: Get channel user config
|
|
tags:
|
|
- channel
|
|
put:
|
|
description: Update channel binding configuration for current user
|
|
parameters:
|
|
- description: Channel platform
|
|
in: path
|
|
name: platform
|
|
required: true
|
|
type: string
|
|
- description: Channel user config payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update channel user config
|
|
tags:
|
|
- channel
|
|
/users/me/identities:
|
|
get:
|
|
description: List all channel identities linked to current user
|
|
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'
|
|
summary: List current user's channel identities
|
|
tags:
|
|
- users
|
|
/users/me/password:
|
|
put:
|
|
description: Update current user password with current password check
|
|
parameters:
|
|
- description: Password payload
|
|
in: body
|
|
name: payload
|
|
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'
|
|
summary: Update current user password
|
|
tags:
|
|
- users
|
|
swagger: "2.0"
|