mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
6c2da4b2f5
Add version and commit_hash fields to the /ping endpoint response, sourced from the existing internal/version package (ldflags or Go build info). The frontend capabilities store reads these values and displays them as badges at the bottom of the Profile page.
8414 lines
209 KiB
YAML
8414 lines
209 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
|
|
timezone:
|
|
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
|
|
timezone:
|
|
type: string
|
|
type: object
|
|
acl.ChannelIdentityCandidate:
|
|
properties:
|
|
avatar_url:
|
|
type: string
|
|
channel:
|
|
type: string
|
|
channel_subject_id:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
id:
|
|
type: string
|
|
linked_avatar_url:
|
|
type: string
|
|
linked_display_name:
|
|
type: string
|
|
linked_user_id:
|
|
type: string
|
|
linked_username:
|
|
type: string
|
|
type: object
|
|
acl.ChannelIdentityCandidateListResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/acl.ChannelIdentityCandidate'
|
|
type: array
|
|
type: object
|
|
acl.CreateRuleRequest:
|
|
properties:
|
|
channel_identity_id:
|
|
type: string
|
|
description:
|
|
type: string
|
|
effect:
|
|
type: string
|
|
enabled:
|
|
type: boolean
|
|
priority:
|
|
type: integer
|
|
source_scope:
|
|
$ref: '#/definitions/acl.SourceScope'
|
|
subject_channel_type:
|
|
type: string
|
|
subject_kind:
|
|
type: string
|
|
type: object
|
|
acl.DefaultEffectResponse:
|
|
properties:
|
|
default_effect:
|
|
type: string
|
|
type: object
|
|
acl.ListRulesResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/acl.Rule'
|
|
type: array
|
|
type: object
|
|
acl.ObservedConversationCandidate:
|
|
properties:
|
|
channel:
|
|
type: string
|
|
conversation_id:
|
|
type: string
|
|
conversation_name:
|
|
type: string
|
|
conversation_type:
|
|
type: string
|
|
last_observed_at:
|
|
type: string
|
|
route_id:
|
|
type: string
|
|
thread_id:
|
|
type: string
|
|
type: object
|
|
acl.ObservedConversationCandidateListResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/acl.ObservedConversationCandidate'
|
|
type: array
|
|
type: object
|
|
acl.ReorderItem:
|
|
properties:
|
|
id:
|
|
type: string
|
|
priority:
|
|
type: integer
|
|
type: object
|
|
acl.ReorderRequest:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/acl.ReorderItem'
|
|
type: array
|
|
type: object
|
|
acl.Rule:
|
|
properties:
|
|
action:
|
|
type: string
|
|
bot_id:
|
|
type: string
|
|
channel_identity_avatar_url:
|
|
type: string
|
|
channel_identity_display_name:
|
|
type: string
|
|
channel_identity_id:
|
|
type: string
|
|
channel_subject_id:
|
|
type: string
|
|
channel_type:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
description:
|
|
type: string
|
|
effect:
|
|
type: string
|
|
enabled:
|
|
type: boolean
|
|
id:
|
|
type: string
|
|
linked_user_avatar_url:
|
|
type: string
|
|
linked_user_display_name:
|
|
type: string
|
|
linked_user_id:
|
|
type: string
|
|
linked_user_username:
|
|
type: string
|
|
priority:
|
|
type: integer
|
|
source_scope:
|
|
$ref: '#/definitions/acl.SourceScope'
|
|
subject_channel_type:
|
|
type: string
|
|
subject_kind:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
acl.SourceScope:
|
|
properties:
|
|
conversation_id:
|
|
type: string
|
|
conversation_type:
|
|
type: string
|
|
thread_id:
|
|
type: string
|
|
type: object
|
|
acl.UpdateRuleRequest:
|
|
properties:
|
|
channel_identity_id:
|
|
type: string
|
|
description:
|
|
type: string
|
|
effect:
|
|
type: string
|
|
enabled:
|
|
type: boolean
|
|
priority:
|
|
type: integer
|
|
source_scope:
|
|
$ref: '#/definitions/acl.SourceScope'
|
|
subject_channel_type:
|
|
type: string
|
|
subject_kind:
|
|
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:
|
|
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
|
|
timezone:
|
|
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.CreateBotRequest:
|
|
properties:
|
|
avatar_url:
|
|
type: string
|
|
display_name:
|
|
type: string
|
|
is_active:
|
|
type: boolean
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
timezone:
|
|
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.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
|
|
timezone:
|
|
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
|
|
compaction.ListLogsResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/compaction.Log'
|
|
type: array
|
|
type: object
|
|
compaction.Log:
|
|
properties:
|
|
bot_id:
|
|
type: string
|
|
completed_at:
|
|
type: string
|
|
error_message:
|
|
type: string
|
|
id:
|
|
type: string
|
|
message_count:
|
|
type: integer
|
|
model_id:
|
|
type: string
|
|
session_id:
|
|
type: string
|
|
started_at:
|
|
type: string
|
|
status:
|
|
type: string
|
|
summary:
|
|
type: string
|
|
usage: {}
|
|
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.BrowserCoresResponse:
|
|
properties:
|
|
cores:
|
|
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:
|
|
image:
|
|
type: string
|
|
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
|
|
legacy:
|
|
type: boolean
|
|
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
|
|
timezone:
|
|
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:
|
|
commit_hash:
|
|
type: string
|
|
container_backend:
|
|
type: string
|
|
snapshot_supported:
|
|
type: boolean
|
|
status:
|
|
type: string
|
|
version:
|
|
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
|
|
schedule:
|
|
items:
|
|
$ref: '#/definitions/handlers.DailyTokenUsage'
|
|
type: array
|
|
type: object
|
|
handlers.createSessionRequest:
|
|
properties:
|
|
channel_type:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
title:
|
|
type: string
|
|
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.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
|
|
handlers.updateSessionRequest:
|
|
properties:
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
title:
|
|
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
|
|
session_id:
|
|
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
|
|
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
|
|
compact_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
|
|
sender_avatar_url:
|
|
type: string
|
|
sender_channel_identity_id:
|
|
type: string
|
|
sender_display_name:
|
|
type: string
|
|
sender_user_id:
|
|
type: string
|
|
session_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
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
mime:
|
|
type: string
|
|
name:
|
|
type: string
|
|
ordinal:
|
|
type: integer
|
|
role:
|
|
type: string
|
|
size_bytes:
|
|
type: integer
|
|
storage_key:
|
|
type: string
|
|
type: object
|
|
models.AddRequest:
|
|
properties:
|
|
config:
|
|
$ref: '#/definitions/models.ModelConfig'
|
|
llm_provider_id:
|
|
type: string
|
|
model_id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type:
|
|
$ref: '#/definitions/models.ModelType'
|
|
type: object
|
|
models.AddResponse:
|
|
properties:
|
|
id:
|
|
type: string
|
|
model_id:
|
|
type: string
|
|
type: object
|
|
models.CountResponse:
|
|
properties:
|
|
count:
|
|
type: integer
|
|
type: object
|
|
models.GetResponse:
|
|
properties:
|
|
config:
|
|
$ref: '#/definitions/models.ModelConfig'
|
|
id:
|
|
type: string
|
|
llm_provider_id:
|
|
type: string
|
|
model_id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
type:
|
|
$ref: '#/definitions/models.ModelType'
|
|
type: object
|
|
models.ModelConfig:
|
|
properties:
|
|
compatibilities:
|
|
items:
|
|
type: string
|
|
type: array
|
|
context_window:
|
|
type: integer
|
|
dimensions:
|
|
type: integer
|
|
reasoning_efforts:
|
|
items:
|
|
type: string
|
|
type: array
|
|
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
|
|
- model_not_supported
|
|
- error
|
|
type: string
|
|
x-enum-varnames:
|
|
- TestStatusOK
|
|
- TestStatusAuthError
|
|
- TestStatusModelNotSupported
|
|
- TestStatusError
|
|
models.UpdateRequest:
|
|
properties:
|
|
config:
|
|
$ref: '#/definitions/models.ModelConfig'
|
|
llm_provider_id:
|
|
type: string
|
|
model_id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
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
|
|
client_type:
|
|
type: string
|
|
icon:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
required:
|
|
- base_url
|
|
- client_type
|
|
- name
|
|
type: object
|
|
providers.GetResponse:
|
|
properties:
|
|
api_key:
|
|
type: string
|
|
base_url:
|
|
type: string
|
|
client_type:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
enable:
|
|
type: boolean
|
|
icon:
|
|
type: string
|
|
id:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
name:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
providers.ImportModelsResponse:
|
|
properties:
|
|
created:
|
|
type: integer
|
|
models:
|
|
items:
|
|
type: string
|
|
type: array
|
|
skipped:
|
|
type: integer
|
|
type: object
|
|
providers.OAuthStatus:
|
|
properties:
|
|
callback_url:
|
|
type: string
|
|
configured:
|
|
type: boolean
|
|
expired:
|
|
type: boolean
|
|
expires_at:
|
|
type: string
|
|
has_token:
|
|
type: boolean
|
|
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
|
|
client_type:
|
|
type: string
|
|
enable:
|
|
type: boolean
|
|
icon:
|
|
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.ListLogsResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/schedule.Log'
|
|
type: array
|
|
type: object
|
|
schedule.ListResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/schedule.Schedule'
|
|
type: array
|
|
type: object
|
|
schedule.Log:
|
|
properties:
|
|
bot_id:
|
|
type: string
|
|
completed_at:
|
|
type: string
|
|
error_message:
|
|
type: string
|
|
id:
|
|
type: string
|
|
result_text:
|
|
type: string
|
|
schedule_id:
|
|
type: string
|
|
session_id:
|
|
type: string
|
|
started_at:
|
|
type: string
|
|
status:
|
|
type: string
|
|
usage: {}
|
|
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
|
|
enable:
|
|
type: boolean
|
|
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
|
|
enable:
|
|
type: boolean
|
|
name:
|
|
type: string
|
|
provider:
|
|
$ref: '#/definitions/searchproviders.ProviderName'
|
|
type: object
|
|
session.Session:
|
|
properties:
|
|
bot_id:
|
|
type: string
|
|
channel_type:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
parent_session_id:
|
|
type: string
|
|
route_conversation_type:
|
|
type: string
|
|
route_id:
|
|
type: string
|
|
route_metadata:
|
|
additionalProperties: {}
|
|
type: object
|
|
title:
|
|
type: string
|
|
type:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
type: object
|
|
settings.Settings:
|
|
properties:
|
|
acl_default_effect:
|
|
type: string
|
|
browser_context_id:
|
|
type: string
|
|
chat_model_id:
|
|
type: string
|
|
compaction_enabled:
|
|
type: boolean
|
|
compaction_model_id:
|
|
type: string
|
|
compaction_threshold:
|
|
type: integer
|
|
heartbeat_enabled:
|
|
type: boolean
|
|
heartbeat_interval:
|
|
type: integer
|
|
heartbeat_model_id:
|
|
type: string
|
|
language:
|
|
type: string
|
|
memory_provider_id:
|
|
type: string
|
|
reasoning_effort:
|
|
type: string
|
|
reasoning_enabled:
|
|
type: boolean
|
|
search_provider_id:
|
|
type: string
|
|
title_model_id:
|
|
type: string
|
|
tts_model_id:
|
|
type: string
|
|
type: object
|
|
settings.UpsertRequest:
|
|
properties:
|
|
acl_default_effect:
|
|
type: string
|
|
browser_context_id:
|
|
type: string
|
|
chat_model_id:
|
|
type: string
|
|
compaction_enabled:
|
|
type: boolean
|
|
compaction_model_id:
|
|
type: string
|
|
compaction_threshold:
|
|
type: integer
|
|
heartbeat_enabled:
|
|
type: boolean
|
|
heartbeat_interval:
|
|
type: integer
|
|
heartbeat_model_id:
|
|
type: string
|
|
language:
|
|
type: string
|
|
memory_provider_id:
|
|
type: string
|
|
reasoning_effort:
|
|
type: string
|
|
reasoning_enabled:
|
|
type: boolean
|
|
search_provider_id:
|
|
type: string
|
|
title_model_id:
|
|
type: string
|
|
tts_model_id:
|
|
type: string
|
|
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
|
|
enable:
|
|
type: boolean
|
|
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:
|
|
enable:
|
|
type: boolean
|
|
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}/acl/channel-identities:
|
|
get:
|
|
description: Search locally observed channel identities for building ACL rules
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Search query
|
|
in: query
|
|
name: q
|
|
type: string
|
|
- description: Max results
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/acl.ChannelIdentityCandidateListResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Search ACL channel identity candidates
|
|
tags:
|
|
- bots
|
|
/bots/{bot_id}/acl/channel-identities/{channel_identity_id}/conversations:
|
|
get:
|
|
description: List previously observed conversation candidates for a channel
|
|
identity, for scoped rule building
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Channel Identity ID
|
|
in: path
|
|
name: channel_identity_id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/acl.ObservedConversationCandidateListResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List observed conversations for a channel identity
|
|
tags:
|
|
- bots
|
|
/bots/{bot_id}/acl/channel-types/{channel_type}/conversations:
|
|
get:
|
|
description: List previously observed group/thread conversation candidates for
|
|
a channel type under this bot
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Channel type (e.g. telegram, discord)
|
|
in: path
|
|
name: channel_type
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/acl.ObservedConversationCandidateListResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List observed conversations for a platform type
|
|
tags:
|
|
- bots
|
|
/bots/{bot_id}/acl/default-effect:
|
|
get:
|
|
description: Get the fallback effect when no rule matches
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/acl.DefaultEffectResponse'
|
|
"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 bot ACL default effect
|
|
tags:
|
|
- bots
|
|
put:
|
|
description: Set the fallback effect when no rule matches (allow or deny)
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Default effect payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/acl.DefaultEffectResponse'
|
|
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: Set bot ACL default effect
|
|
tags:
|
|
- bots
|
|
/bots/{bot_id}/acl/rules:
|
|
get:
|
|
description: List all ACL rules for a bot ordered by priority
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/acl.ListRulesResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List bot ACL rules
|
|
tags:
|
|
- bots
|
|
post:
|
|
description: Create a new priority-ordered ACL rule for chat.trigger
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Rule payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/acl.CreateRuleRequest'
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/acl.Rule'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Create ACL rule
|
|
tags:
|
|
- bots
|
|
/bots/{bot_id}/acl/rules/{rule_id}:
|
|
delete:
|
|
description: Delete an ACL rule by ID
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Rule ID
|
|
in: path
|
|
name: rule_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'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Delete ACL rule
|
|
tags:
|
|
- bots
|
|
put:
|
|
description: Update an existing ACL rule
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Rule ID
|
|
in: path
|
|
name: rule_id
|
|
required: true
|
|
type: string
|
|
- description: Rule payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/acl.UpdateRuleRequest'
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/acl.Rule'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Update ACL rule
|
|
tags:
|
|
- bots
|
|
/bots/{bot_id}/acl/rules/reorder:
|
|
put:
|
|
description: Batch-update priorities for multiple ACL rules
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Reorder payload
|
|
in: body
|
|
name: payload
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/acl.ReorderRequest'
|
|
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: Reorder ACL rules
|
|
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}/compaction/logs:
|
|
delete:
|
|
description: Delete all compaction 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 compaction logs
|
|
tags:
|
|
- compaction
|
|
get:
|
|
description: List compaction 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/compaction.ListLogsResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List compaction logs
|
|
tags:
|
|
- compaction
|
|
/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: SSE stream of container creation events
|
|
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}/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}/schedule/{id}/logs:
|
|
get:
|
|
description: List execution logs for a specific schedule
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Schedule ID
|
|
in: path
|
|
name: 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/schedule.ListLogsResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List schedule logs by schedule
|
|
tags:
|
|
- schedule
|
|
/bots/{bot_id}/schedule/logs:
|
|
delete:
|
|
description: Delete all schedule 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 schedule logs
|
|
tags:
|
|
- schedule
|
|
get:
|
|
description: List schedule 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/schedule.ListLogsResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List schedule logs
|
|
tags:
|
|
- schedule
|
|
/bots/{bot_id}/sessions:
|
|
get:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
items:
|
|
$ref: '#/definitions/session.Session'
|
|
type: array
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: List bot sessions
|
|
tags:
|
|
- sessions
|
|
post:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Session data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.createSessionRequest'
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/session.Session'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Create a new chat session
|
|
tags:
|
|
- sessions
|
|
/bots/{bot_id}/sessions/{session_id}:
|
|
delete:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Session ID
|
|
in: path
|
|
name: session_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'
|
|
summary: Soft-delete a session
|
|
tags:
|
|
- sessions
|
|
get:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Session ID
|
|
in: path
|
|
name: session_id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/session.Session'
|
|
"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'
|
|
summary: Get a session by ID
|
|
tags:
|
|
- sessions
|
|
patch:
|
|
parameters:
|
|
- description: Bot ID
|
|
in: path
|
|
name: bot_id
|
|
required: true
|
|
type: string
|
|
- description: Session ID
|
|
in: path
|
|
name: session_id
|
|
required: true
|
|
type: string
|
|
- description: Fields to update
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/handlers.updateSessionRequest'
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/session.Session'
|
|
"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'
|
|
summary: Update a session
|
|
tags:
|
|
- sessions
|
|
/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}/token-usage:
|
|
get:
|
|
description: Get daily aggregated token usage for a bot, split by chat, heartbeat,
|
|
and schedule session types, 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}/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
|
|
/browser-contexts/cores:
|
|
get:
|
|
description: Get the list of browser cores available in the Browser Gateway
|
|
container
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/handlers.BrowserCoresResponse'
|
|
"502":
|
|
description: Bad Gateway
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Get available browser cores
|
|
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 provider client type
|
|
parameters:
|
|
- description: Model type (chat, embedding)
|
|
in: query
|
|
name: type
|
|
type: string
|
|
- description: Provider 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
|
|
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}/oauth/authorize:
|
|
get:
|
|
parameters:
|
|
- description: Provider ID (UUID)
|
|
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 LLM provider
|
|
tags:
|
|
- providers-oauth
|
|
/providers/{id}/oauth/status:
|
|
get:
|
|
parameters:
|
|
- description: Provider ID (UUID)
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/providers.OAuthStatus'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: Get OAuth2 status for an LLM provider
|
|
tags:
|
|
- providers-oauth
|
|
/providers/{id}/oauth/token:
|
|
delete:
|
|
parameters:
|
|
- description: Provider 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'
|
|
summary: Revoke stored OAuth2 tokens for an LLM provider
|
|
tags:
|
|
- providers-oauth
|
|
/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
|
|
/providers/oauth/callback:
|
|
get:
|
|
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: HTML success page
|
|
schema:
|
|
type: string
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/handlers.ErrorResponse'
|
|
summary: OAuth2 callback for LLM providers
|
|
tags:
|
|
- providers-oauth
|
|
/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"
|