diff --git a/apps/web/src/i18n/locales/en.json b/apps/web/src/i18n/locales/en.json index 794fafaf..a3045115 100644 --- a/apps/web/src/i18n/locales/en.json +++ b/apps/web/src/i18n/locales/en.json @@ -564,6 +564,7 @@ "mcp": "MCP", "subagents": "Subagents", "heartbeat": "Heartbeat", + "compaction": "Compaction", "schedule": "Schedule", "history": "History", "skills": "Skills", @@ -777,6 +778,12 @@ "heartbeatModel": "Heartbeat Model", "heartbeatModelDescription": "Select a model for heartbeat checks. Defaults to the bot's chat model if not set.", "heartbeatModelPlaceholder": "Use chat model (default)", + "compactionEnabled": "Enable Context Compaction", + "compactionDescription": "Automatically summarize older messages when context gets too large", + "compactionThreshold": "Compaction Threshold (input tokens)", + "compactionModel": "Compaction Model", + "compactionModelDescription": "Select a model for summarization. Defaults to the bot's chat model if not set.", + "compactionModelPlaceholder": "Use chat model (default)", "browserContext": "Browser Context", "browserContextPlaceholder": "Select browser context (disabled if empty)", "allowGuest": "Allow Guest Access", @@ -935,6 +942,24 @@ "saveFailed": "Failed to save skill", "loadFailed": "Failed to load skills" }, + "compaction": { + "title": "Compaction Logs", + "loadFailed": "Failed to load compaction logs", + "empty": "No compaction logs", + "loadMore": "Load More", + "clearLogs": "Clear Logs", + "clearConfirm": "Are you sure you want to clear all compaction logs? This cannot be undone.", + "clearSuccess": "Compaction logs cleared", + "clearFailed": "Failed to clear compaction logs", + "status": "Status", + "time": "Time", + "duration": "Duration", + "error": "Error", + "statusOk": "OK", + "statusPending": "Pending", + "statusError": "Error", + "filterAll": "All" + }, "heartbeat": { "title": "Heartbeat Logs", "loadFailed": "Failed to load heartbeat logs", diff --git a/apps/web/src/i18n/locales/zh.json b/apps/web/src/i18n/locales/zh.json index c2bd771c..945f68ff 100644 --- a/apps/web/src/i18n/locales/zh.json +++ b/apps/web/src/i18n/locales/zh.json @@ -560,6 +560,7 @@ "mcp": "MCP", "subagents": "子智能体", "heartbeat": "心跳", + "compaction": "上下文压缩", "schedule": "定时任务", "history": "对话历史", "skills": "技能", @@ -773,6 +774,12 @@ "heartbeatModel": "心跳模型", "heartbeatModelDescription": "选择心跳检查使用的模型,未设置时默认使用聊天模型。", "heartbeatModelPlaceholder": "使用聊天模型(默认)", + "compactionEnabled": "启用上下文压缩", + "compactionDescription": "上下文过大时自动摘要旧消息以节省 token", + "compactionThreshold": "压缩阈值(输入 token 数)", + "compactionModel": "压缩模型", + "compactionModelDescription": "选择用于摘要的模型,未设置时默认使用聊天模型。", + "compactionModelPlaceholder": "使用聊天模型(默认)", "browserContext": "浏览器上下文", "browserContextPlaceholder": "选择浏览器上下文(未配置时不启用)", "allowGuest": "允许游客访问", @@ -931,6 +938,24 @@ "saveFailed": "保存技能失败", "loadFailed": "加载技能失败" }, + "compaction": { + "title": "压缩记录", + "loadFailed": "加载压缩记录失败", + "empty": "暂无压缩记录", + "loadMore": "加载更多", + "clearLogs": "清空记录", + "clearConfirm": "确定要清空所有压缩记录吗?此操作不可撤销。", + "clearSuccess": "压缩记录已清空", + "clearFailed": "清空压缩记录失败", + "status": "状态", + "time": "时间", + "duration": "耗时", + "error": "错误", + "statusOk": "成功", + "statusPending": "进行中", + "statusError": "错误", + "filterAll": "全部" + }, "heartbeat": { "title": "心跳日志", "loadFailed": "加载心跳日志失败", diff --git a/apps/web/src/pages/bots/components/bot-compaction.vue b/apps/web/src/pages/bots/components/bot-compaction.vue new file mode 100644 index 00000000..13c6cc84 --- /dev/null +++ b/apps/web/src/pages/bots/components/bot-compaction.vue @@ -0,0 +1,431 @@ + + + diff --git a/apps/web/src/pages/bots/detail.vue b/apps/web/src/pages/bots/detail.vue index 75afe32b..e6c2aa7d 100644 --- a/apps/web/src/pages/bots/detail.vue +++ b/apps/web/src/pages/bots/detail.vue @@ -243,6 +243,7 @@ import BotMemory from './components/bot-memory.vue' import BotSkills from './components/bot-skills.vue' import BotHistory from './components/bot-history.vue' import BotHeartbeat from './components/bot-heartbeat.vue' +import BotCompaction from './components/bot-compaction.vue' import BotEmail from './components/bot-email.vue' import BotSubagents from './components/bot-subagents.vue' import BotOverview from './components/bot-overview.vue' @@ -287,6 +288,7 @@ const tabList = computed(() => { { value: 'mcp', label: 'bots.tabs.mcp', component: BotMcp, params: { 'bot-id': bot_id } }, { value: 'subagents', label: 'bots.tabs.subagents', component: BotSubagents, params: { 'bot-id': bot_id } }, { value: 'heartbeat', label: 'bots.tabs.heartbeat', component: BotHeartbeat, params: { 'bot-id': bot_id } }, + { value: 'compaction', label: 'bots.tabs.compaction', component: BotCompaction, params: { 'bot-id': bot_id } }, { value: 'schedule', label: 'bots.tabs.schedule', component: BotSchedule, params: { 'bot-id': bot_id } }, { value: 'history', label: 'bots.tabs.history', component: BotHistory, params: { 'bot-id': bot_id } }, { value: 'skills', label: 'bots.tabs.skills', component: BotSkills, params: { 'bot-id': bot_id } }, diff --git a/cmd/agent/main.go b/cmd/agent/main.go index 547ee563..189f08a6 100644 --- a/cmd/agent/main.go +++ b/cmd/agent/main.go @@ -39,6 +39,7 @@ import ( "github.com/memohai/memoh/internal/channel/inbound" "github.com/memohai/memoh/internal/channel/route" "github.com/memohai/memoh/internal/command" + "github.com/memohai/memoh/internal/compaction" "github.com/memohai/memoh/internal/config" ctr "github.com/memohai/memoh/internal/containerd" "github.com/memohai/memoh/internal/conversation" @@ -209,6 +210,7 @@ func runServe() { schedule.NewService, provideHeartbeatTriggerer, heartbeat.NewService, + compaction.NewService, // containerd handler & tool gateway provideContainerdHandler, @@ -231,6 +233,7 @@ func runServe() { provideServerHandler(handlers.NewBindHandler), provideServerHandler(handlers.NewScheduleHandler), provideServerHandler(handlers.NewHeartbeatHandler), + provideServerHandler(handlers.NewCompactionHandler), provideServerHandler(handlers.NewSubagentHandler), provideServerHandler(handlers.NewChannelHandler), provideServerHandler(feishu.NewWebhookServerHandler), @@ -432,13 +435,14 @@ func injectToolProviders(a *agentpkg.Agent, providers []agenttools.ToolProvider) a.SetToolProviders(providers) } -func provideChatResolver(log *slog.Logger, a *agentpkg.Agent, modelsService *models.Service, queries *dbsqlc.Queries, chatService *conversation.Service, msgService *message.DBService, settingsService *settings.Service, mediaService *media.Service, containerdHandler *handlers.ContainerdHandler, memoryRegistry *memprovider.Registry, sessionService *sessionpkg.Service, eventHub *event.Hub) *flow.Resolver { +func provideChatResolver(log *slog.Logger, a *agentpkg.Agent, modelsService *models.Service, queries *dbsqlc.Queries, chatService *conversation.Service, msgService *message.DBService, settingsService *settings.Service, mediaService *media.Service, containerdHandler *handlers.ContainerdHandler, memoryRegistry *memprovider.Registry, sessionService *sessionpkg.Service, eventHub *event.Hub, compactionService *compaction.Service) *flow.Resolver { resolver := flow.NewResolver(log, modelsService, queries, chatService, msgService, settingsService, a, 120*time.Second) resolver.SetMemoryRegistry(memoryRegistry) resolver.SetSkillLoader(&skillLoaderAdapter{handler: containerdHandler}) resolver.SetGatewayAssetLoader(&gatewayAssetLoaderAdapter{media: mediaService}) resolver.SetSessionService(sessionService) resolver.SetEventPublisher(eventHub) + resolver.SetCompactionService(compactionService) return resolver } diff --git a/cmd/memoh/serve.go b/cmd/memoh/serve.go index 44271471..c79d7cae 100644 --- a/cmd/memoh/serve.go +++ b/cmd/memoh/serve.go @@ -40,6 +40,7 @@ import ( "github.com/memohai/memoh/internal/channel/inbound" "github.com/memohai/memoh/internal/channel/route" "github.com/memohai/memoh/internal/command" + "github.com/memohai/memoh/internal/compaction" "github.com/memohai/memoh/internal/config" ctr "github.com/memohai/memoh/internal/containerd" "github.com/memohai/memoh/internal/conversation" @@ -139,6 +140,7 @@ func runServe() { schedule.NewService, provideHeartbeatTriggerer, heartbeat.NewService, + compaction.NewService, provideContainerdHandler, provideFederationGateway, provideToolGatewayService, @@ -157,6 +159,7 @@ func runServe() { provideServerHandler(handlers.NewBindHandler), provideServerHandler(handlers.NewScheduleHandler), provideServerHandler(handlers.NewHeartbeatHandler), + provideServerHandler(handlers.NewCompactionHandler), provideServerHandler(handlers.NewSubagentHandler), provideServerHandler(handlers.NewChannelHandler), provideServerHandler(feishu.NewWebhookServerHandler), @@ -340,13 +343,14 @@ func injectToolProviders(a *agentpkg.Agent, providers []agenttools.ToolProvider) a.SetToolProviders(providers) } -func provideChatResolver(log *slog.Logger, a *agentpkg.Agent, modelsService *models.Service, queries *dbsqlc.Queries, chatService *conversation.Service, msgService *message.DBService, settingsService *settings.Service, mediaService *media.Service, containerdHandler *handlers.ContainerdHandler, memoryRegistry *memprovider.Registry, sessionService *sessionpkg.Service, eventHub *event.Hub) *flow.Resolver { +func provideChatResolver(log *slog.Logger, a *agentpkg.Agent, modelsService *models.Service, queries *dbsqlc.Queries, chatService *conversation.Service, msgService *message.DBService, settingsService *settings.Service, mediaService *media.Service, containerdHandler *handlers.ContainerdHandler, memoryRegistry *memprovider.Registry, sessionService *sessionpkg.Service, eventHub *event.Hub, compactionService *compaction.Service) *flow.Resolver { resolver := flow.NewResolver(log, modelsService, queries, chatService, msgService, settingsService, a, 120*time.Second) resolver.SetMemoryRegistry(memoryRegistry) resolver.SetSkillLoader(&skillLoaderAdapter{handler: containerdHandler}) resolver.SetGatewayAssetLoader(&gatewayAssetLoaderAdapter{media: mediaService}) resolver.SetSessionService(sessionService) resolver.SetEventPublisher(eventHub) + resolver.SetCompactionService(compactionService) return resolver } diff --git a/db/migrations/0001_init.up.sql b/db/migrations/0001_init.up.sql index d2ca6610..6d0f8900 100644 --- a/db/migrations/0001_init.up.sql +++ b/db/migrations/0001_init.up.sql @@ -172,6 +172,9 @@ CREATE TABLE IF NOT EXISTS bots ( heartbeat_interval INTEGER NOT NULL DEFAULT 30, heartbeat_prompt TEXT NOT NULL DEFAULT '', heartbeat_model_id UUID REFERENCES models(id) ON DELETE SET NULL, + compaction_enabled BOOLEAN NOT NULL DEFAULT false, + compaction_threshold INTEGER NOT NULL DEFAULT 100000, + compaction_model_id UUID REFERENCES models(id) ON DELETE SET NULL, title_model_id UUID REFERENCES models(id) ON DELETE SET NULL, tts_model_id UUID REFERENCES tts_models(id) ON DELETE SET NULL, browser_context_id UUID REFERENCES browser_contexts(id) ON DELETE SET NULL, @@ -373,10 +376,12 @@ CREATE TABLE IF NOT EXISTS bot_history_messages ( metadata JSONB NOT NULL DEFAULT '{}'::jsonb, usage JSONB, model_id UUID REFERENCES models(id) ON DELETE SET NULL, + compact_id UUID, created_at TIMESTAMPTZ NOT NULL DEFAULT now() ); CREATE INDEX IF NOT EXISTS idx_bot_history_messages_bot_created ON bot_history_messages(bot_id, created_at); +CREATE INDEX IF NOT EXISTS idx_bot_history_messages_compact ON bot_history_messages(compact_id); CREATE INDEX IF NOT EXISTS idx_bot_history_messages_session ON bot_history_messages(session_id, created_at); CREATE INDEX IF NOT EXISTS idx_bot_history_messages_session_source @@ -539,6 +544,23 @@ CREATE TABLE IF NOT EXISTS bot_heartbeat_logs ( CREATE INDEX IF NOT EXISTS idx_heartbeat_logs_bot_started ON bot_heartbeat_logs(bot_id, started_at DESC); +CREATE TABLE IF NOT EXISTS bot_history_message_compacts ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + bot_id UUID NOT NULL REFERENCES bots(id) ON DELETE CASCADE, + session_id UUID REFERENCES bot_sessions(id) ON DELETE SET NULL, + status TEXT NOT NULL DEFAULT 'pending' CHECK (status IN ('pending', 'ok', 'error')), + summary TEXT NOT NULL DEFAULT '', + message_count INTEGER NOT NULL DEFAULT 0, + error_message TEXT NOT NULL DEFAULT '', + usage JSONB, + model_id UUID REFERENCES models(id) ON DELETE SET NULL, + started_at TIMESTAMPTZ NOT NULL DEFAULT now(), + completed_at TIMESTAMPTZ +); +CREATE INDEX IF NOT EXISTS idx_compacts_bot_session ON bot_history_message_compacts(bot_id, session_id, started_at DESC); + +ALTER TABLE bot_history_messages ADD CONSTRAINT fk_compact_id FOREIGN KEY (compact_id) REFERENCES bot_history_message_compacts(id) ON DELETE SET NULL; + -- schedule_logs: structured execution records for scheduled tasks. CREATE TABLE IF NOT EXISTS schedule_logs ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), diff --git a/db/migrations/0040_compaction.down.sql b/db/migrations/0040_compaction.down.sql new file mode 100644 index 00000000..2344fd19 --- /dev/null +++ b/db/migrations/0040_compaction.down.sql @@ -0,0 +1,12 @@ +-- 0040_compaction (down) +-- Revert context compaction support. + +ALTER TABLE bots DROP COLUMN IF EXISTS compaction_model_id; +ALTER TABLE bots DROP COLUMN IF EXISTS compaction_threshold; +ALTER TABLE bots DROP COLUMN IF EXISTS compaction_enabled; + +DROP INDEX IF EXISTS idx_bot_history_messages_compact; +ALTER TABLE bot_history_messages DROP COLUMN IF EXISTS compact_id; + +DROP INDEX IF EXISTS idx_compacts_bot_session; +DROP TABLE IF EXISTS bot_history_message_compacts; diff --git a/db/migrations/0040_compaction.up.sql b/db/migrations/0040_compaction.up.sql new file mode 100644 index 00000000..d8262657 --- /dev/null +++ b/db/migrations/0040_compaction.up.sql @@ -0,0 +1,28 @@ +-- 0040_compaction +-- Add context compaction support: compaction logs table, compact_id on messages, bot settings columns. + +-- bot_history_message_compacts: stores compaction records and summaries. +CREATE TABLE IF NOT EXISTS bot_history_message_compacts ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + bot_id UUID NOT NULL REFERENCES bots(id) ON DELETE CASCADE, + session_id UUID REFERENCES bot_sessions(id) ON DELETE SET NULL, + status TEXT NOT NULL DEFAULT 'pending' CHECK (status IN ('pending', 'ok', 'error')), + summary TEXT NOT NULL DEFAULT '', + message_count INTEGER NOT NULL DEFAULT 0, + error_message TEXT NOT NULL DEFAULT '', + usage JSONB, + model_id UUID REFERENCES models(id) ON DELETE SET NULL, + started_at TIMESTAMPTZ NOT NULL DEFAULT now(), + completed_at TIMESTAMPTZ +); + +CREATE INDEX IF NOT EXISTS idx_compacts_bot_session ON bot_history_message_compacts(bot_id, session_id, started_at DESC); + +-- Add compact_id to messages to track which compaction a message belongs to. +ALTER TABLE bot_history_messages ADD COLUMN IF NOT EXISTS compact_id UUID REFERENCES bot_history_message_compacts(id) ON DELETE SET NULL; +CREATE INDEX IF NOT EXISTS idx_bot_history_messages_compact ON bot_history_messages(compact_id); + +-- Bot-level compaction settings. +ALTER TABLE bots ADD COLUMN IF NOT EXISTS compaction_enabled BOOLEAN NOT NULL DEFAULT false; +ALTER TABLE bots ADD COLUMN IF NOT EXISTS compaction_threshold INTEGER NOT NULL DEFAULT 100000; +ALTER TABLE bots ADD COLUMN IF NOT EXISTS compaction_model_id UUID REFERENCES models(id) ON DELETE SET NULL; diff --git a/db/queries/bots.sql b/db/queries/bots.sql index 8ca01c7c..a3a7346e 100644 --- a/db/queries/bots.sql +++ b/db/queries/bots.sql @@ -4,7 +4,7 @@ VALUES ($1, $2, $3, $4, $5, $6) RETURNING id, owner_user_id, display_name, avatar_url, is_active, status, max_context_load_time, max_context_tokens, language, reasoning_enabled, reasoning_effort, chat_model_id, search_provider_id, memory_provider_id, heartbeat_enabled, heartbeat_interval, heartbeat_prompt, metadata, created_at, updated_at; -- name: GetBotByID :one -SELECT id, owner_user_id, display_name, avatar_url, is_active, status, max_context_load_time, max_context_tokens, language, reasoning_enabled, reasoning_effort, chat_model_id, search_provider_id, memory_provider_id, heartbeat_enabled, heartbeat_interval, heartbeat_prompt, metadata, created_at, updated_at +SELECT id, owner_user_id, display_name, avatar_url, is_active, status, max_context_load_time, max_context_tokens, language, reasoning_enabled, reasoning_effort, chat_model_id, search_provider_id, memory_provider_id, heartbeat_enabled, heartbeat_interval, heartbeat_prompt, compaction_enabled, compaction_threshold, compaction_model_id, metadata, created_at, updated_at FROM bots WHERE id = $1; diff --git a/db/queries/compaction_logs.sql b/db/queries/compaction_logs.sql new file mode 100644 index 00000000..bae4c8b6 --- /dev/null +++ b/db/queries/compaction_logs.sql @@ -0,0 +1,38 @@ +-- name: CreateCompactionLog :one +INSERT INTO bot_history_message_compacts (bot_id, session_id) +VALUES ($1, $2) +RETURNING id, bot_id, session_id, status, summary, message_count, error_message, usage, model_id, started_at, completed_at; + +-- name: CompleteCompactionLog :one +UPDATE bot_history_message_compacts +SET status = $2, + summary = $3, + message_count = $4, + error_message = $5, + usage = $6, + model_id = $7, + completed_at = now() +WHERE id = $1 +RETURNING id, bot_id, session_id, status, summary, message_count, error_message, usage, model_id, started_at, completed_at; + +-- name: GetCompactionLogByID :one +SELECT id, bot_id, session_id, status, summary, message_count, error_message, usage, model_id, started_at, completed_at +FROM bot_history_message_compacts +WHERE id = $1; + +-- name: ListCompactionLogsByBot :many +SELECT id, bot_id, session_id, status, summary, message_count, error_message, usage, model_id, started_at, completed_at +FROM bot_history_message_compacts +WHERE bot_id = $1 + AND ($2::timestamptz IS NULL OR started_at < $2) +ORDER BY started_at DESC +LIMIT $3; + +-- name: ListCompactionLogsBySession :many +SELECT id, bot_id, session_id, status, summary, message_count, error_message, usage, model_id, started_at, completed_at +FROM bot_history_message_compacts +WHERE session_id = $1 +ORDER BY started_at ASC; + +-- name: DeleteCompactionLogsByBot :exec +DELETE FROM bot_history_message_compacts WHERE bot_id = $1; diff --git a/db/queries/messages.sql b/db/queries/messages.sql index 6595abd8..b67b74dc 100644 --- a/db/queries/messages.sql +++ b/db/queries/messages.sql @@ -148,6 +148,7 @@ SELECT m.content, m.metadata, m.usage, + m.compact_id, m.created_at, ci.display_name AS sender_display_name, ci.avatar_url AS sender_avatar_url, @@ -173,6 +174,7 @@ SELECT m.content, m.metadata, m.usage, + m.compact_id, m.created_at, ci.display_name AS sender_display_name, ci.avatar_url AS sender_avatar_url, @@ -360,3 +362,16 @@ WHERE m.bot_id = sqlc.arg(bot_id) ) ILIKE '%' || sqlc.narg(keyword)::text || '%') ORDER BY m.created_at DESC LIMIT sqlc.arg(max_count); + +-- name: MarkMessagesCompacted :exec +UPDATE bot_history_messages +SET compact_id = $1 +WHERE id = ANY($2::uuid[]); + +-- name: ListUncompactedMessagesBySession :many +SELECT id, chat_id, session_id, role, content, usage, platform, external_message_id, sender_channel_identity_id, compact_id, created_at +FROM bot_history_messages +WHERE session_id = $1 + AND compact_id IS NULL + AND is_active = true +ORDER BY created_at ASC; diff --git a/db/queries/settings.sql b/db/queries/settings.sql index 94870253..82e239b7 100644 --- a/db/queries/settings.sql +++ b/db/queries/settings.sql @@ -9,8 +9,11 @@ SELECT bots.heartbeat_enabled, bots.heartbeat_interval, bots.heartbeat_prompt, + bots.compaction_enabled, + bots.compaction_threshold, chat_models.id AS chat_model_id, heartbeat_models.id AS heartbeat_model_id, + compaction_models.id AS compaction_model_id, title_models.id AS title_model_id, search_providers.id AS search_provider_id, memory_providers.id AS memory_provider_id, @@ -19,6 +22,7 @@ SELECT FROM bots LEFT JOIN models AS chat_models ON chat_models.id = bots.chat_model_id LEFT JOIN models AS heartbeat_models ON heartbeat_models.id = bots.heartbeat_model_id +LEFT JOIN models AS compaction_models ON compaction_models.id = bots.compaction_model_id LEFT JOIN models AS title_models ON title_models.id = bots.title_model_id LEFT JOIN search_providers ON search_providers.id = bots.search_provider_id LEFT JOIN memory_providers ON memory_providers.id = bots.memory_provider_id @@ -37,8 +41,11 @@ WITH updated AS ( heartbeat_enabled = sqlc.arg(heartbeat_enabled), heartbeat_interval = sqlc.arg(heartbeat_interval), heartbeat_prompt = sqlc.arg(heartbeat_prompt), + compaction_enabled = sqlc.arg(compaction_enabled), + compaction_threshold = sqlc.arg(compaction_threshold), chat_model_id = COALESCE(sqlc.narg(chat_model_id)::uuid, bots.chat_model_id), heartbeat_model_id = COALESCE(sqlc.narg(heartbeat_model_id)::uuid, bots.heartbeat_model_id), + compaction_model_id = COALESCE(sqlc.narg(compaction_model_id)::uuid, bots.compaction_model_id), title_model_id = COALESCE(sqlc.narg(title_model_id)::uuid, bots.title_model_id), search_provider_id = COALESCE(sqlc.narg(search_provider_id)::uuid, bots.search_provider_id), memory_provider_id = COALESCE(sqlc.narg(memory_provider_id)::uuid, bots.memory_provider_id), @@ -46,7 +53,7 @@ WITH updated AS ( browser_context_id = COALESCE(sqlc.narg(browser_context_id)::uuid, bots.browser_context_id), updated_at = now() WHERE bots.id = sqlc.arg(id) - RETURNING bots.id, bots.max_context_load_time, bots.max_context_tokens, bots.language, bots.reasoning_enabled, bots.reasoning_effort, bots.heartbeat_enabled, bots.heartbeat_interval, bots.heartbeat_prompt, bots.chat_model_id, bots.heartbeat_model_id, bots.title_model_id, bots.search_provider_id, bots.memory_provider_id, bots.tts_model_id, bots.browser_context_id + RETURNING bots.id, bots.max_context_load_time, bots.max_context_tokens, bots.language, bots.reasoning_enabled, bots.reasoning_effort, bots.heartbeat_enabled, bots.heartbeat_interval, bots.heartbeat_prompt, bots.compaction_enabled, bots.compaction_threshold, bots.chat_model_id, bots.heartbeat_model_id, bots.compaction_model_id, bots.title_model_id, bots.search_provider_id, bots.memory_provider_id, bots.tts_model_id, bots.browser_context_id ) SELECT updated.id AS bot_id, @@ -58,8 +65,11 @@ SELECT updated.heartbeat_enabled, updated.heartbeat_interval, updated.heartbeat_prompt, + updated.compaction_enabled, + updated.compaction_threshold, chat_models.id AS chat_model_id, heartbeat_models.id AS heartbeat_model_id, + compaction_models.id AS compaction_model_id, title_models.id AS title_model_id, search_providers.id AS search_provider_id, memory_providers.id AS memory_provider_id, @@ -68,6 +78,7 @@ SELECT FROM updated LEFT JOIN models AS chat_models ON chat_models.id = updated.chat_model_id LEFT JOIN models AS heartbeat_models ON heartbeat_models.id = updated.heartbeat_model_id +LEFT JOIN models AS compaction_models ON compaction_models.id = updated.compaction_model_id LEFT JOIN models AS title_models ON title_models.id = updated.title_model_id LEFT JOIN search_providers ON search_providers.id = updated.search_provider_id LEFT JOIN memory_providers ON memory_providers.id = updated.memory_provider_id @@ -84,8 +95,11 @@ SET max_context_load_time = 1440, heartbeat_enabled = false, heartbeat_interval = 30, heartbeat_prompt = '', + compaction_enabled = false, + compaction_threshold = 100000, chat_model_id = NULL, heartbeat_model_id = NULL, + compaction_model_id = NULL, title_model_id = NULL, search_provider_id = NULL, memory_provider_id = NULL, diff --git a/internal/acl/service_test.go b/internal/acl/service_test.go index 99a6413e..2004fe09 100644 --- a/internal/acl/service_test.go +++ b/internal/acl/service_test.go @@ -74,9 +74,12 @@ func makeBotRow(botID, ownerUserID pgtype.UUID) *fakeRow { *dest[14].(*bool) = false *dest[15].(*int32) = 30 *dest[16].(*string) = "" - *dest[17].(*[]byte) = []byte(`{}`) - *dest[18].(*pgtype.Timestamptz) = pgtype.Timestamptz{} - *dest[19].(*pgtype.Timestamptz) = pgtype.Timestamptz{} + *dest[17].(*bool) = false // CompactionEnabled + *dest[18].(*int32) = 100000 // CompactionThreshold + *dest[19].(*pgtype.UUID) = pgtype.UUID{} // CompactionModelID + *dest[20].(*[]byte) = []byte(`{}`) + *dest[21].(*pgtype.Timestamptz) = pgtype.Timestamptz{} + *dest[22].(*pgtype.Timestamptz) = pgtype.Timestamptz{} return nil }, } diff --git a/internal/bots/service_test.go b/internal/bots/service_test.go index fa701a7d..7557bd53 100644 --- a/internal/bots/service_test.go +++ b/internal/bots/service_test.go @@ -44,11 +44,13 @@ func (d *fakeDBTX) QueryRow(ctx context.Context, sql string, args ...any) pgx.Ro // Column order: id, owner_user_id, display_name, avatar_url, is_active, status, // max_context_load_time, max_context_tokens, language, // reasoning_enabled, reasoning_effort, chat_model_id, search_provider_id, memory_provider_id, -// heartbeat_enabled, heartbeat_interval, heartbeat_prompt, metadata, created_at, updated_at. +// heartbeat_enabled, heartbeat_interval, heartbeat_prompt, +// compaction_enabled, compaction_threshold, compaction_model_id, +// metadata, created_at, updated_at. func makeBotRow(botID, ownerUserID pgtype.UUID) *fakeRow { return &fakeRow{ scanFunc: func(dest ...any) error { - if len(dest) < 20 { + if len(dest) < 23 { return pgx.ErrNoRows } *dest[0].(*pgtype.UUID) = botID @@ -68,9 +70,12 @@ func makeBotRow(botID, ownerUserID pgtype.UUID) *fakeRow { *dest[14].(*bool) = false // HeartbeatEnabled *dest[15].(*int32) = 30 // HeartbeatInterval *dest[16].(*string) = "" // HeartbeatPrompt - *dest[17].(*[]byte) = []byte(`{}`) - *dest[18].(*pgtype.Timestamptz) = pgtype.Timestamptz{} - *dest[19].(*pgtype.Timestamptz) = pgtype.Timestamptz{} + *dest[17].(*bool) = false // CompactionEnabled + *dest[18].(*int32) = 100000 // CompactionThreshold + *dest[19].(*pgtype.UUID) = pgtype.UUID{} // CompactionModelID + *dest[20].(*[]byte) = []byte(`{}`) + *dest[21].(*pgtype.Timestamptz) = pgtype.Timestamptz{} + *dest[22].(*pgtype.Timestamptz) = pgtype.Timestamptz{} return nil }, } diff --git a/internal/compaction/prompt.go b/internal/compaction/prompt.go new file mode 100644 index 00000000..834d4246 --- /dev/null +++ b/internal/compaction/prompt.go @@ -0,0 +1,39 @@ +package compaction + +import ( + "fmt" + "strings" +) + +const systemPrompt = `You are a conversation summarizer. Given a conversation history, produce a concise summary that preserves: +- Key facts, decisions, and agreements +- User preferences and requests +- Important context needed for continuing the conversation +- Names, dates, numbers, and specific details +- Tool usage outcomes and their results + +If is provided, it contains summaries of earlier conversation segments. Use them ONLY to understand the conversation flow and maintain continuity. Do NOT include, repeat, or rephrase any content from in your output. + +Output ONLY the summary of the new conversation segment. No preamble, no headers.` + +type messageEntry struct { + Role string + Content string +} + +func buildUserPrompt(priorSummaries []string, messages []messageEntry) string { + var sb strings.Builder + if len(priorSummaries) > 0 { + sb.WriteString("\n") + sb.WriteString("The following are summaries of earlier parts of this conversation. They are provided ONLY as reference context to help you understand the conversation flow. Do NOT include or repeat any of this content in your output summary.\n\n") + sb.WriteString(strings.Join(priorSummaries, "\n---\n")) + sb.WriteString("\n\n\n") + sb.WriteString("Now summarize the following conversation segment:\n") + } else { + sb.WriteString("Summarize the following conversation:\n") + } + for _, m := range messages { + fmt.Fprintf(&sb, "%s: %s\n", m.Role, m.Content) + } + return sb.String() +} diff --git a/internal/compaction/service.go b/internal/compaction/service.go new file mode 100644 index 00000000..774a530c --- /dev/null +++ b/internal/compaction/service.go @@ -0,0 +1,256 @@ +package compaction + +import ( + "context" + "encoding/json" + "log/slog" + "strings" + "time" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgtype" + sdk "github.com/memohai/twilight-ai/sdk" + + "github.com/memohai/memoh/internal/agent" + "github.com/memohai/memoh/internal/db" + "github.com/memohai/memoh/internal/db/sqlc" +) + +// Service manages context compaction for bot conversations. +type Service struct { + queries *sqlc.Queries + logger *slog.Logger +} + +// NewService creates a new compaction Service. +func NewService(log *slog.Logger, queries *sqlc.Queries) *Service { + return &Service{ + queries: queries, + logger: log, + } +} + +// ShouldCompact returns true if inputTokens exceeds the threshold. +func ShouldCompact(inputTokens, threshold int) bool { + return threshold > 0 && inputTokens >= threshold +} + +// TriggerCompaction runs compaction in the background. +func (s *Service) TriggerCompaction(ctx context.Context, cfg TriggerConfig) { + go func() { + bgCtx := context.WithoutCancel(ctx) + if err := s.runCompaction(bgCtx, cfg); err != nil { + s.logger.Error("compaction failed", slog.String("bot_id", cfg.BotID), slog.String("session_id", cfg.SessionID), slog.String("error", err.Error())) + } + }() +} + +func (s *Service) runCompaction(ctx context.Context, cfg TriggerConfig) error { + botUUID, err := db.ParseUUID(cfg.BotID) + if err != nil { + return err + } + sessionUUID, err := db.ParseUUID(cfg.SessionID) + if err != nil { + return err + } + + logRow, err := s.queries.CreateCompactionLog(ctx, sqlc.CreateCompactionLogParams{ + BotID: botUUID, + SessionID: sessionUUID, + }) + if err != nil { + return err + } + + compactErr := s.doCompaction(ctx, logRow.ID, sessionUUID, cfg) + if compactErr != nil { + s.completeLog(ctx, logRow.ID, "error", "", compactErr.Error(), nil, pgtype.UUID{}) + } + return compactErr +} + +func (s *Service) doCompaction(ctx context.Context, logID pgtype.UUID, sessionUUID pgtype.UUID, cfg TriggerConfig) error { + messages, err := s.queries.ListUncompactedMessagesBySession(ctx, sessionUUID) + if err != nil { + return err + } + if len(messages) == 0 { + s.completeLog(ctx, logID, "ok", "", "", nil, pgtype.UUID{}) + return nil + } + + priorLogs, err := s.queries.ListCompactionLogsBySession(ctx, sessionUUID) + if err != nil { + return err + } + var priorSummaries []string + for _, l := range priorLogs { + if l.Summary != "" { + priorSummaries = append(priorSummaries, l.Summary) + } + } + + entries := make([]messageEntry, 0, len(messages)) + messageIDs := make([]pgtype.UUID, 0, len(messages)) + for _, m := range messages { + entries = append(entries, messageEntry{ + Role: m.Role, + Content: extractTextContent(m.Content), + }) + messageIDs = append(messageIDs, m.ID) + } + + userPrompt := buildUserPrompt(priorSummaries, entries) + + model := agent.CreateModel(agent.ModelConfig{ + ClientType: cfg.ClientType, + BaseURL: cfg.BaseURL, + APIKey: cfg.APIKey, + ModelID: cfg.ModelID, + }) + + result, err := sdk.GenerateTextResult(ctx, + sdk.WithModel(model), + sdk.WithSystem(systemPrompt), + sdk.WithMessages([]sdk.Message{sdk.UserMessage(userPrompt)}), + ) + if err != nil { + return err + } + + usageJSON, _ := json.Marshal(result.Usage) + + modelUUID := db.ParseUUIDOrEmpty(cfg.ModelID) + + if err := s.queries.MarkMessagesCompacted(ctx, sqlc.MarkMessagesCompactedParams{ + CompactID: logID, + MessageIds: messageIDs, + }); err != nil { + return err + } + + s.completeLog(ctx, logID, "ok", result.Text, "", usageJSON, modelUUID) + return nil +} + +func (s *Service) completeLog(ctx context.Context, logID pgtype.UUID, status, summary, errMsg string, usage []byte, modelID pgtype.UUID) { + if _, err := s.queries.CompleteCompactionLog(ctx, sqlc.CompleteCompactionLogParams{ + ID: logID, + Status: status, + Summary: summary, + MessageCount: 0, + ErrorMessage: errMsg, + Usage: usage, + ModelID: modelID, + }); err != nil { + s.logger.Error("failed to complete compaction log", slog.String("error", err.Error())) + } +} + +// ListLogs returns paginated compaction logs for a bot. +func (s *Service) ListLogs(ctx context.Context, botID string, before *time.Time, limit int) ([]Log, error) { + botUUID, err := db.ParseUUID(botID) + if err != nil { + return nil, err + } + + var beforeTS pgtype.Timestamptz + if before != nil { + beforeTS = pgtype.Timestamptz{Time: *before, Valid: true} + } + + clampedLimit := limit + if clampedLimit > 1000 { + clampedLimit = 1000 + } + rows, err := s.queries.ListCompactionLogsByBot(ctx, sqlc.ListCompactionLogsByBotParams{ + BotID: botUUID, + Column2: beforeTS, + Limit: int32(clampedLimit), //nolint:gosec // clamped above + }) + if err != nil { + return nil, err + } + + logs := make([]Log, len(rows)) + for i, r := range rows { + logs[i] = toLog(r) + } + return logs, nil +} + +// DeleteLogs deletes all compaction logs for a bot. +func (s *Service) DeleteLogs(ctx context.Context, botID string) error { + botUUID, err := db.ParseUUID(botID) + if err != nil { + return err + } + return s.queries.DeleteCompactionLogsByBot(ctx, botUUID) +} + +func toLog(r sqlc.BotHistoryMessageCompact) Log { + l := Log{ + ID: formatUUID(r.ID), + BotID: formatUUID(r.BotID), + SessionID: formatUUID(r.SessionID), + Status: r.Status, + Summary: r.Summary, + MessageCount: int(r.MessageCount), + ErrorMessage: r.ErrorMessage, + ModelID: formatUUID(r.ModelID), + StartedAt: r.StartedAt.Time, + } + if r.CompletedAt.Valid { + t := r.CompletedAt.Time + l.CompletedAt = &t + } + if len(r.Usage) > 0 { + var u any + if json.Unmarshal(r.Usage, &u) == nil { + l.Usage = u + } + } + return l +} + +func formatUUID(id pgtype.UUID) string { + if !id.Valid { + return "" + } + return uuid.UUID(id.Bytes).String() +} + +// extractTextContent extracts plain text from a message content JSONB field. +// The content may be a JSON string, an array of content parts, or raw bytes. +func extractTextContent(content []byte) string { + if len(content) == 0 { + return "" + } + + var s string + if json.Unmarshal(content, &s) == nil { + return s + } + + var parts []map[string]any + if json.Unmarshal(content, &parts) == nil { + var texts []string + for _, p := range parts { + if t, ok := p["type"].(string); ok && t == "text" { + if text, ok := p["text"].(string); ok { + texts = append(texts, text) + } + } + } + if len(texts) > 0 { + return joinTexts(texts) + } + } + + return string(content) +} + +func joinTexts(parts []string) string { + return strings.Join(parts, " ") +} diff --git a/internal/compaction/types.go b/internal/compaction/types.go new file mode 100644 index 00000000..4d13b628 --- /dev/null +++ b/internal/compaction/types.go @@ -0,0 +1,33 @@ +package compaction + +import "time" + +// Log represents a compaction log entry. +type Log struct { + ID string `json:"id"` + BotID string `json:"bot_id"` + SessionID string `json:"session_id,omitempty"` + Status string `json:"status"` + Summary string `json:"summary"` + MessageCount int `json:"message_count"` + ErrorMessage string `json:"error_message"` + Usage any `json:"usage,omitempty"` + ModelID string `json:"model_id,omitempty"` + StartedAt time.Time `json:"started_at"` + CompletedAt *time.Time `json:"completed_at,omitempty"` +} + +// ListLogsResponse is the API response for listing compaction logs. +type ListLogsResponse struct { + Items []Log `json:"items"` +} + +// TriggerConfig holds the parameters needed to trigger a compaction. +type TriggerConfig struct { + BotID string + SessionID string + ModelID string + ClientType string + APIKey string //nolint:gosec // runtime credential, not a hardcoded secret + BaseURL string +} diff --git a/internal/conversation/flow/resolver.go b/internal/conversation/flow/resolver.go index fe5d1f57..b423be16 100644 --- a/internal/conversation/flow/resolver.go +++ b/internal/conversation/flow/resolver.go @@ -11,6 +11,7 @@ import ( sdk "github.com/memohai/twilight-ai/sdk" agentpkg "github.com/memohai/memoh/internal/agent" + "github.com/memohai/memoh/internal/compaction" "github.com/memohai/memoh/internal/conversation" "github.com/memohai/memoh/internal/db/sqlc" memprovider "github.com/memohai/memoh/internal/memory/adapters" @@ -49,19 +50,20 @@ type gatewayAssetLoader interface { // Resolver orchestrates chat with the internal agent. type Resolver struct { - agent *agentpkg.Agent - modelsService *models.Service - queries *sqlc.Queries - memoryRegistry *memprovider.Registry - conversationSvc ConversationSettingsReader - messageService messagepkg.Service - settingsService *settings.Service - sessionService SessionService - eventPublisher messageevent.Publisher - skillLoader SkillLoader - assetLoader gatewayAssetLoader - timeout time.Duration - logger *slog.Logger + agent *agentpkg.Agent + modelsService *models.Service + queries *sqlc.Queries + memoryRegistry *memprovider.Registry + conversationSvc ConversationSettingsReader + messageService messagepkg.Service + settingsService *settings.Service + sessionService SessionService + compactionService *compaction.Service + eventPublisher messageevent.Publisher + skillLoader SkillLoader + assetLoader gatewayAssetLoader + timeout time.Duration + logger *slog.Logger } // NewResolver creates a Resolver that uses the internal agent directly. @@ -106,6 +108,11 @@ func (r *Resolver) SetGatewayAssetLoader(loader gatewayAssetLoader) { r.assetLoader = loader } +// SetCompactionService configures the compaction service for context compaction. +func (r *Resolver) SetCompactionService(s *compaction.Service) { + r.compactionService = s +} + type usageInfo struct { InputTokens *int `json:"inputTokens"` OutputTokens *int `json:"outputTokens"` @@ -199,6 +206,7 @@ func (r *Resolver) resolve(ctx context.Context, req conversation.ChatRequest) (r } loaded = pruneHistoryForGateway(loaded) loaded = dedupePersistedCurrentUserMessage(loaded, req) + loaded = r.replaceCompactedMessages(ctx, loaded) messages = trimMessagesByTokens(r.logger, loaded, historyBudget) r.logger.Debug("context trim result", slog.Int("loaded_messages", len(loaded)), @@ -318,6 +326,11 @@ func (r *Resolver) Chat(ctx context.Context, req conversation.ChatRequest) (conv if err := r.storeRound(ctx, req, roundMessages, rc.model.ID); err != nil { return conversation.ChatResponse{}, err } + + if result.Usage != nil { + go r.maybeCompact(context.WithoutCancel(ctx), req, rc, result.Usage.InputTokens) + } + return conversation.ChatResponse{ Messages: outputMessages, Model: rc.model.ModelID, diff --git a/internal/conversation/flow/resolver_compaction.go b/internal/conversation/flow/resolver_compaction.go new file mode 100644 index 00000000..6b178829 --- /dev/null +++ b/internal/conversation/flow/resolver_compaction.go @@ -0,0 +1,55 @@ +package flow + +import ( + "context" + "log/slog" + + "github.com/memohai/memoh/internal/compaction" + "github.com/memohai/memoh/internal/conversation" + "github.com/memohai/memoh/internal/models" +) + +func (r *Resolver) maybeCompact(ctx context.Context, req conversation.ChatRequest, rc resolvedContext, inputTokens int) { + if r.compactionService == nil || r.settingsService == nil { + return + } + settings, err := r.settingsService.GetBot(ctx, req.BotID) + if err != nil { + r.logger.Warn("compaction: failed to load settings", slog.Any("error", err)) + return + } + if !settings.CompactionEnabled || settings.CompactionThreshold <= 0 { + return + } + if !compaction.ShouldCompact(inputTokens, settings.CompactionThreshold) { + return + } + + modelID := settings.CompactionModelID + if modelID == "" { + modelID = rc.model.ID + } + + cfg := compaction.TriggerConfig{ + BotID: req.BotID, + SessionID: req.SessionID, + } + + model, err := r.modelsService.GetByID(ctx, modelID) + if err != nil { + r.logger.Warn("compaction: failed to resolve model", slog.Any("error", err)) + return + } + cfg.ModelID = model.ModelID + cfg.ClientType = string(model.ClientType) + + provider, err := models.FetchProviderByID(ctx, r.queries, model.LlmProviderID) + if err != nil { + r.logger.Warn("compaction: failed to fetch provider", slog.Any("error", err)) + return + } + cfg.APIKey = provider.ApiKey + cfg.BaseURL = provider.BaseUrl + + r.compactionService.TriggerCompaction(ctx, cfg) +} diff --git a/internal/conversation/flow/resolver_history.go b/internal/conversation/flow/resolver_history.go index 7140e4d8..cb1404c9 100644 --- a/internal/conversation/flow/resolver_history.go +++ b/internal/conversation/flow/resolver_history.go @@ -8,6 +8,7 @@ import ( "time" "github.com/memohai/memoh/internal/conversation" + "github.com/memohai/memoh/internal/db" messagepkg "github.com/memohai/memoh/internal/message" ) @@ -19,6 +20,7 @@ type messageWithUsage struct { ExternalMessageID string Platform string SenderChannelID string + CompactID string } func (r *Resolver) loadMessages(ctx context.Context, chatID string, sessionID string, maxContextMinutes int) ([]messageWithUsage, error) { @@ -63,6 +65,7 @@ func (r *Resolver) loadMessages(ctx context.Context, chatID string, sessionID st ExternalMessageID: strings.TrimSpace(m.ExternalMessageID), Platform: strings.TrimSpace(m.Platform), SenderChannelID: strings.TrimSpace(m.SenderChannelIdentityID), + CompactID: strings.TrimSpace(m.CompactID), }) } return result, nil @@ -165,3 +168,62 @@ func trimMessagesByTokens(log *slog.Logger, messages []messageWithUsage, maxToke } return result } + +func (r *Resolver) replaceCompactedMessages(ctx context.Context, messages []messageWithUsage) []messageWithUsage { + if r.queries == nil { + return messages + } + + compactGroups := make(map[string][]int) // compact_id -> indices + for i, m := range messages { + if m.CompactID != "" { + compactGroups[m.CompactID] = append(compactGroups[m.CompactID], i) + } + } + if len(compactGroups) == 0 { + return messages + } + + summaries := make(map[string]string) + for compactID := range compactGroups { + cUUID, err := db.ParseUUID(compactID) + if err != nil { + continue + } + log, err := r.queries.GetCompactionLogByID(ctx, cUUID) + if err != nil { + r.logger.Warn("replaceCompactedMessages: failed to load compact log", slog.String("compact_id", compactID), slog.Any("error", err)) + continue + } + if log.Status == "ok" && log.Summary != "" { + summaries[compactID] = log.Summary + } + } + + var result []messageWithUsage + replaced := make(map[string]bool) + for _, m := range messages { + if m.CompactID == "" { + result = append(result, m) + continue + } + if replaced[m.CompactID] { + continue + } + replaced[m.CompactID] = true + summary, ok := summaries[m.CompactID] + if !ok || summary == "" { + for _, idx := range compactGroups[m.CompactID] { + result = append(result, messages[idx]) + } + continue + } + result = append(result, messageWithUsage{ + Message: conversation.ModelMessage{ + Role: "user", + Content: json.RawMessage(`"\n` + summary + `\n"`), + }, + }) + } + return result +} diff --git a/internal/conversation/flow/resolver_stream.go b/internal/conversation/flow/resolver_stream.go index c468d2c0..7f49ed2a 100644 --- a/internal/conversation/flow/resolver_stream.go +++ b/internal/conversation/flow/resolver_stream.go @@ -63,7 +63,7 @@ func (r *Resolver) StreamChat(ctx context.Context, req conversation.ChatRequest) continue } if !stored && event.IsTerminal() && len(event.Messages) > 0 { - if _, storeErr := r.tryStoreStream(ctx, streamReq, data, rc.model.ID); storeErr != nil { + if _, storeErr := r.tryStoreStream(ctx, streamReq, data, rc.model.ID, rc); storeErr != nil { r.logger.Error("stream persist failed", slog.Any("error", storeErr)) } else { stored = true @@ -124,7 +124,7 @@ func (r *Resolver) StreamChatWS( } if !stored && event.IsTerminal() && len(event.Messages) > 0 { - if _, storeErr := r.tryStoreStream(ctx, req, data, modelID); storeErr != nil { + if _, storeErr := r.tryStoreStream(ctx, req, data, modelID, rc); storeErr != nil { r.logger.Error("ws persist failed", slog.Any("error", storeErr)) } else { stored = true @@ -142,10 +142,11 @@ func (r *Resolver) StreamChatWS( } // tryStoreStream attempts to extract final messages from a stream event and persist them. -func (r *Resolver) tryStoreStream(ctx context.Context, req conversation.ChatRequest, data []byte, modelID string) (bool, error) { +func (r *Resolver) tryStoreStream(ctx context.Context, req conversation.ChatRequest, data []byte, modelID string, rc resolvedContext) (bool, error) { var envelope struct { Type string `json:"type"` Messages json.RawMessage `json:"messages"` + Usage json.RawMessage `json:"usage,omitempty"` } if err := json.Unmarshal(data, &envelope); err != nil { return false, nil @@ -161,5 +162,26 @@ func (r *Resolver) tryStoreStream(ctx context.Context, req conversation.ChatRequ outputMessages := sdkMessagesToModelMessages(sdkMsgs) roundMessages := prependUserMessage(req.Query, outputMessages) - return true, r.storeRound(ctx, req, roundMessages, modelID) + if err := r.storeRound(ctx, req, roundMessages, modelID); err != nil { + return false, err + } + + if inputTokens := extractInputTokensFromUsage(envelope.Usage); inputTokens > 0 { + go r.maybeCompact(context.WithoutCancel(ctx), req, rc, inputTokens) + } + + return true, nil +} + +func extractInputTokensFromUsage(raw json.RawMessage) int { + if len(raw) == 0 { + return 0 + } + var u struct { + InputTokens int `json:"inputTokens"` + } + if json.Unmarshal(raw, &u) != nil { + return 0 + } + return u.InputTokens } diff --git a/internal/db/sqlc/bots.sql.go b/internal/db/sqlc/bots.sql.go index cbc03f84..0f92efeb 100644 --- a/internal/db/sqlc/bots.sql.go +++ b/internal/db/sqlc/bots.sql.go @@ -94,32 +94,35 @@ func (q *Queries) DeleteBotByID(ctx context.Context, id pgtype.UUID) error { } const getBotByID = `-- name: GetBotByID :one -SELECT id, owner_user_id, display_name, avatar_url, is_active, status, max_context_load_time, max_context_tokens, language, reasoning_enabled, reasoning_effort, chat_model_id, search_provider_id, memory_provider_id, heartbeat_enabled, heartbeat_interval, heartbeat_prompt, metadata, created_at, updated_at +SELECT id, owner_user_id, display_name, avatar_url, is_active, status, max_context_load_time, max_context_tokens, language, reasoning_enabled, reasoning_effort, chat_model_id, search_provider_id, memory_provider_id, heartbeat_enabled, heartbeat_interval, heartbeat_prompt, compaction_enabled, compaction_threshold, compaction_model_id, metadata, created_at, updated_at FROM bots WHERE id = $1 ` type GetBotByIDRow struct { - ID pgtype.UUID `json:"id"` - OwnerUserID pgtype.UUID `json:"owner_user_id"` - DisplayName pgtype.Text `json:"display_name"` - AvatarUrl pgtype.Text `json:"avatar_url"` - IsActive bool `json:"is_active"` - Status string `json:"status"` - MaxContextLoadTime int32 `json:"max_context_load_time"` - MaxContextTokens int32 `json:"max_context_tokens"` - Language string `json:"language"` - ReasoningEnabled bool `json:"reasoning_enabled"` - ReasoningEffort string `json:"reasoning_effort"` - ChatModelID pgtype.UUID `json:"chat_model_id"` - SearchProviderID pgtype.UUID `json:"search_provider_id"` - MemoryProviderID pgtype.UUID `json:"memory_provider_id"` - HeartbeatEnabled bool `json:"heartbeat_enabled"` - HeartbeatInterval int32 `json:"heartbeat_interval"` - HeartbeatPrompt string `json:"heartbeat_prompt"` - Metadata []byte `json:"metadata"` - CreatedAt pgtype.Timestamptz `json:"created_at"` - UpdatedAt pgtype.Timestamptz `json:"updated_at"` + ID pgtype.UUID `json:"id"` + OwnerUserID pgtype.UUID `json:"owner_user_id"` + DisplayName pgtype.Text `json:"display_name"` + AvatarUrl pgtype.Text `json:"avatar_url"` + IsActive bool `json:"is_active"` + Status string `json:"status"` + MaxContextLoadTime int32 `json:"max_context_load_time"` + MaxContextTokens int32 `json:"max_context_tokens"` + Language string `json:"language"` + ReasoningEnabled bool `json:"reasoning_enabled"` + ReasoningEffort string `json:"reasoning_effort"` + ChatModelID pgtype.UUID `json:"chat_model_id"` + SearchProviderID pgtype.UUID `json:"search_provider_id"` + MemoryProviderID pgtype.UUID `json:"memory_provider_id"` + HeartbeatEnabled bool `json:"heartbeat_enabled"` + HeartbeatInterval int32 `json:"heartbeat_interval"` + HeartbeatPrompt string `json:"heartbeat_prompt"` + CompactionEnabled bool `json:"compaction_enabled"` + CompactionThreshold int32 `json:"compaction_threshold"` + CompactionModelID pgtype.UUID `json:"compaction_model_id"` + Metadata []byte `json:"metadata"` + CreatedAt pgtype.Timestamptz `json:"created_at"` + UpdatedAt pgtype.Timestamptz `json:"updated_at"` } func (q *Queries) GetBotByID(ctx context.Context, id pgtype.UUID) (GetBotByIDRow, error) { @@ -143,6 +146,9 @@ func (q *Queries) GetBotByID(ctx context.Context, id pgtype.UUID) (GetBotByIDRow &i.HeartbeatEnabled, &i.HeartbeatInterval, &i.HeartbeatPrompt, + &i.CompactionEnabled, + &i.CompactionThreshold, + &i.CompactionModelID, &i.Metadata, &i.CreatedAt, &i.UpdatedAt, diff --git a/internal/db/sqlc/compaction_logs.sql.go b/internal/db/sqlc/compaction_logs.sql.go new file mode 100644 index 00000000..5f5a7adf --- /dev/null +++ b/internal/db/sqlc/compaction_logs.sql.go @@ -0,0 +1,225 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.30.0 +// source: compaction_logs.sql + +package sqlc + +import ( + "context" + + "github.com/jackc/pgx/v5/pgtype" +) + +const completeCompactionLog = `-- name: CompleteCompactionLog :one +UPDATE bot_history_message_compacts +SET status = $2, + summary = $3, + message_count = $4, + error_message = $5, + usage = $6, + model_id = $7, + completed_at = now() +WHERE id = $1 +RETURNING id, bot_id, session_id, status, summary, message_count, error_message, usage, model_id, started_at, completed_at +` + +type CompleteCompactionLogParams struct { + ID pgtype.UUID `json:"id"` + Status string `json:"status"` + Summary string `json:"summary"` + MessageCount int32 `json:"message_count"` + ErrorMessage string `json:"error_message"` + Usage []byte `json:"usage"` + ModelID pgtype.UUID `json:"model_id"` +} + +func (q *Queries) CompleteCompactionLog(ctx context.Context, arg CompleteCompactionLogParams) (BotHistoryMessageCompact, error) { + row := q.db.QueryRow(ctx, completeCompactionLog, + arg.ID, + arg.Status, + arg.Summary, + arg.MessageCount, + arg.ErrorMessage, + arg.Usage, + arg.ModelID, + ) + var i BotHistoryMessageCompact + err := row.Scan( + &i.ID, + &i.BotID, + &i.SessionID, + &i.Status, + &i.Summary, + &i.MessageCount, + &i.ErrorMessage, + &i.Usage, + &i.ModelID, + &i.StartedAt, + &i.CompletedAt, + ) + return i, err +} + +const createCompactionLog = `-- name: CreateCompactionLog :one +INSERT INTO bot_history_message_compacts (bot_id, session_id, started_at) +VALUES ($1, $2::uuid, now()) +RETURNING id, bot_id, session_id, status, summary, message_count, error_message, usage, started_at, completed_at +` + +type CreateCompactionLogParams struct { + BotID pgtype.UUID `json:"bot_id"` + SessionID pgtype.UUID `json:"session_id"` +} + +type CreateCompactionLogRow struct { + ID pgtype.UUID `json:"id"` + BotID pgtype.UUID `json:"bot_id"` + SessionID pgtype.UUID `json:"session_id"` + Status string `json:"status"` + Summary string `json:"summary"` + MessageCount int32 `json:"message_count"` + ErrorMessage string `json:"error_message"` + Usage []byte `json:"usage"` + StartedAt pgtype.Timestamptz `json:"started_at"` + CompletedAt pgtype.Timestamptz `json:"completed_at"` +} + +func (q *Queries) CreateCompactionLog(ctx context.Context, arg CreateCompactionLogParams) (CreateCompactionLogRow, error) { + row := q.db.QueryRow(ctx, createCompactionLog, arg.BotID, arg.SessionID) + var i CreateCompactionLogRow + err := row.Scan( + &i.ID, + &i.BotID, + &i.SessionID, + &i.Status, + &i.Summary, + &i.MessageCount, + &i.ErrorMessage, + &i.Usage, + &i.StartedAt, + &i.CompletedAt, + ) + return i, err +} + +const deleteCompactionLogsByBot = `-- name: DeleteCompactionLogsByBot :exec +DELETE FROM bot_history_message_compacts WHERE bot_id = $1 +` + +func (q *Queries) DeleteCompactionLogsByBot(ctx context.Context, botID pgtype.UUID) error { + _, err := q.db.Exec(ctx, deleteCompactionLogsByBot, botID) + return err +} + +const getCompactionLogByID = `-- name: GetCompactionLogByID :one +SELECT id, bot_id, session_id, status, summary, message_count, error_message, usage, model_id, started_at, completed_at +FROM bot_history_message_compacts +WHERE id = $1 +` + +func (q *Queries) GetCompactionLogByID(ctx context.Context, id pgtype.UUID) (BotHistoryMessageCompact, error) { + row := q.db.QueryRow(ctx, getCompactionLogByID, id) + var i BotHistoryMessageCompact + err := row.Scan( + &i.ID, + &i.BotID, + &i.SessionID, + &i.Status, + &i.Summary, + &i.MessageCount, + &i.ErrorMessage, + &i.Usage, + &i.ModelID, + &i.StartedAt, + &i.CompletedAt, + ) + return i, err +} + +const listCompactionLogsByBot = `-- name: ListCompactionLogsByBot :many +SELECT id, bot_id, session_id, status, summary, message_count, error_message, usage, model_id, started_at, completed_at +FROM bot_history_message_compacts +WHERE bot_id = $1 + AND ($2::timestamptz IS NULL OR started_at < $2::timestamptz) +ORDER BY started_at DESC +LIMIT $3 +` + +type ListCompactionLogsByBotParams struct { + BotID pgtype.UUID `json:"bot_id"` + Column2 pgtype.Timestamptz `json:"column_2"` + Limit int32 `json:"limit"` +} + +func (q *Queries) ListCompactionLogsByBot(ctx context.Context, arg ListCompactionLogsByBotParams) ([]BotHistoryMessageCompact, error) { + rows, err := q.db.Query(ctx, listCompactionLogsByBot, arg.BotID, arg.Column2, arg.Limit) + if err != nil { + return nil, err + } + defer rows.Close() + var items []BotHistoryMessageCompact + for rows.Next() { + var i BotHistoryMessageCompact + if err := rows.Scan( + &i.ID, + &i.BotID, + &i.SessionID, + &i.Status, + &i.Summary, + &i.MessageCount, + &i.ErrorMessage, + &i.Usage, + &i.ModelID, + &i.StartedAt, + &i.CompletedAt, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const listCompactionLogsBySession = `-- name: ListCompactionLogsBySession :many +SELECT id, bot_id, session_id, status, summary, message_count, error_message, usage, model_id, started_at, completed_at +FROM bot_history_message_compacts +WHERE session_id = $1 + AND status = 'ok' +ORDER BY started_at ASC +` + +func (q *Queries) ListCompactionLogsBySession(ctx context.Context, sessionID pgtype.UUID) ([]BotHistoryMessageCompact, error) { + rows, err := q.db.Query(ctx, listCompactionLogsBySession, sessionID) + if err != nil { + return nil, err + } + defer rows.Close() + var items []BotHistoryMessageCompact + for rows.Next() { + var i BotHistoryMessageCompact + if err := rows.Scan( + &i.ID, + &i.BotID, + &i.SessionID, + &i.Status, + &i.Summary, + &i.MessageCount, + &i.ErrorMessage, + &i.Usage, + &i.ModelID, + &i.StartedAt, + &i.CompletedAt, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} diff --git a/internal/db/sqlc/conversations.sql.go b/internal/db/sqlc/conversations.sql.go index 2126d76f..6dc43a0f 100644 --- a/internal/db/sqlc/conversations.sql.go +++ b/internal/db/sqlc/conversations.sql.go @@ -511,7 +511,7 @@ WITH updated AS ( SET display_name = $1, updated_at = now() WHERE bots.id = $2 - RETURNING id, owner_user_id, display_name, avatar_url, is_active, status, max_context_load_time, max_context_tokens, language, reasoning_enabled, reasoning_effort, chat_model_id, search_provider_id, memory_provider_id, heartbeat_enabled, heartbeat_interval, heartbeat_prompt, heartbeat_model_id, title_model_id, tts_model_id, browser_context_id, metadata, created_at, updated_at + RETURNING id, owner_user_id, display_name, avatar_url, is_active, status, max_context_load_time, max_context_tokens, language, reasoning_enabled, reasoning_effort, chat_model_id, search_provider_id, memory_provider_id, heartbeat_enabled, heartbeat_interval, heartbeat_prompt, heartbeat_model_id, title_model_id, tts_model_id, browser_context_id, compaction_enabled, compaction_threshold, compaction_model_id, metadata, created_at, updated_at ) SELECT updated.id AS id, diff --git a/internal/db/sqlc/messages.sql.go b/internal/db/sqlc/messages.sql.go index c0314c1c..158b3b16 100644 --- a/internal/db/sqlc/messages.sql.go +++ b/internal/db/sqlc/messages.sql.go @@ -147,6 +147,7 @@ SELECT m.content, m.metadata, m.usage, + m.compact_id, m.created_at, ci.display_name AS sender_display_name, ci.avatar_url AS sender_avatar_url, @@ -177,6 +178,7 @@ type ListActiveMessagesSinceRow struct { Content []byte `json:"content"` Metadata []byte `json:"metadata"` Usage []byte `json:"usage"` + CompactID pgtype.UUID `json:"compact_id"` CreatedAt pgtype.Timestamptz `json:"created_at"` SenderDisplayName pgtype.Text `json:"sender_display_name"` SenderAvatarUrl pgtype.Text `json:"sender_avatar_url"` @@ -204,6 +206,7 @@ func (q *Queries) ListActiveMessagesSince(ctx context.Context, arg ListActiveMes &i.Content, &i.Metadata, &i.Usage, + &i.CompactID, &i.CreatedAt, &i.SenderDisplayName, &i.SenderAvatarUrl, @@ -232,6 +235,7 @@ SELECT m.content, m.metadata, m.usage, + m.compact_id, m.created_at, ci.display_name AS sender_display_name, ci.avatar_url AS sender_avatar_url, @@ -262,6 +266,7 @@ type ListActiveMessagesSinceBySessionRow struct { Content []byte `json:"content"` Metadata []byte `json:"metadata"` Usage []byte `json:"usage"` + CompactID pgtype.UUID `json:"compact_id"` CreatedAt pgtype.Timestamptz `json:"created_at"` SenderDisplayName pgtype.Text `json:"sender_display_name"` SenderAvatarUrl pgtype.Text `json:"sender_avatar_url"` @@ -289,6 +294,7 @@ func (q *Queries) ListActiveMessagesSinceBySession(ctx context.Context, arg List &i.Content, &i.Metadata, &i.Usage, + &i.CompactID, &i.CreatedAt, &i.SenderDisplayName, &i.SenderAvatarUrl, @@ -1050,6 +1056,64 @@ func (q *Queries) ListObservedConversationsByChannelIdentity(ctx context.Context return items, nil } +const listUncompactedMessagesBySession = `-- name: ListUncompactedMessagesBySession :many +SELECT id, role, content, usage, created_at +FROM bot_history_messages +WHERE session_id = $1 + AND compact_id IS NULL +ORDER BY created_at ASC +` + +type ListUncompactedMessagesBySessionRow struct { + ID pgtype.UUID `json:"id"` + Role string `json:"role"` + Content []byte `json:"content"` + Usage []byte `json:"usage"` + CreatedAt pgtype.Timestamptz `json:"created_at"` +} + +func (q *Queries) ListUncompactedMessagesBySession(ctx context.Context, sessionID pgtype.UUID) ([]ListUncompactedMessagesBySessionRow, error) { + rows, err := q.db.Query(ctx, listUncompactedMessagesBySession, sessionID) + if err != nil { + return nil, err + } + defer rows.Close() + var items []ListUncompactedMessagesBySessionRow + for rows.Next() { + var i ListUncompactedMessagesBySessionRow + if err := rows.Scan( + &i.ID, + &i.Role, + &i.Content, + &i.Usage, + &i.CreatedAt, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const markMessagesCompacted = `-- name: MarkMessagesCompacted :exec +UPDATE bot_history_messages +SET compact_id = $1 +WHERE id = ANY($2::uuid[]) +` + +type MarkMessagesCompactedParams struct { + CompactID pgtype.UUID `json:"compact_id"` + MessageIds []pgtype.UUID `json:"message_ids"` +} + +func (q *Queries) MarkMessagesCompacted(ctx context.Context, arg MarkMessagesCompactedParams) error { + _, err := q.db.Exec(ctx, markMessagesCompacted, arg.CompactID, arg.MessageIds) + return err +} + const searchMessages = `-- name: SearchMessages :many SELECT m.id, diff --git a/internal/db/sqlc/models.go b/internal/db/sqlc/models.go index 4405caea..a9b57874 100644 --- a/internal/db/sqlc/models.go +++ b/internal/db/sqlc/models.go @@ -9,30 +9,33 @@ import ( ) type Bot struct { - ID pgtype.UUID `json:"id"` - OwnerUserID pgtype.UUID `json:"owner_user_id"` - DisplayName pgtype.Text `json:"display_name"` - AvatarUrl pgtype.Text `json:"avatar_url"` - IsActive bool `json:"is_active"` - Status string `json:"status"` - MaxContextLoadTime int32 `json:"max_context_load_time"` - MaxContextTokens int32 `json:"max_context_tokens"` - Language string `json:"language"` - ReasoningEnabled bool `json:"reasoning_enabled"` - ReasoningEffort string `json:"reasoning_effort"` - ChatModelID pgtype.UUID `json:"chat_model_id"` - SearchProviderID pgtype.UUID `json:"search_provider_id"` - MemoryProviderID pgtype.UUID `json:"memory_provider_id"` - HeartbeatEnabled bool `json:"heartbeat_enabled"` - HeartbeatInterval int32 `json:"heartbeat_interval"` - HeartbeatPrompt string `json:"heartbeat_prompt"` - HeartbeatModelID pgtype.UUID `json:"heartbeat_model_id"` - TitleModelID pgtype.UUID `json:"title_model_id"` - TtsModelID pgtype.UUID `json:"tts_model_id"` - BrowserContextID pgtype.UUID `json:"browser_context_id"` - Metadata []byte `json:"metadata"` - CreatedAt pgtype.Timestamptz `json:"created_at"` - UpdatedAt pgtype.Timestamptz `json:"updated_at"` + ID pgtype.UUID `json:"id"` + OwnerUserID pgtype.UUID `json:"owner_user_id"` + DisplayName pgtype.Text `json:"display_name"` + AvatarUrl pgtype.Text `json:"avatar_url"` + IsActive bool `json:"is_active"` + Status string `json:"status"` + MaxContextLoadTime int32 `json:"max_context_load_time"` + MaxContextTokens int32 `json:"max_context_tokens"` + Language string `json:"language"` + ReasoningEnabled bool `json:"reasoning_enabled"` + ReasoningEffort string `json:"reasoning_effort"` + ChatModelID pgtype.UUID `json:"chat_model_id"` + SearchProviderID pgtype.UUID `json:"search_provider_id"` + MemoryProviderID pgtype.UUID `json:"memory_provider_id"` + HeartbeatEnabled bool `json:"heartbeat_enabled"` + HeartbeatInterval int32 `json:"heartbeat_interval"` + HeartbeatPrompt string `json:"heartbeat_prompt"` + HeartbeatModelID pgtype.UUID `json:"heartbeat_model_id"` + TitleModelID pgtype.UUID `json:"title_model_id"` + TtsModelID pgtype.UUID `json:"tts_model_id"` + BrowserContextID pgtype.UUID `json:"browser_context_id"` + CompactionEnabled bool `json:"compaction_enabled"` + CompactionThreshold int32 `json:"compaction_threshold"` + CompactionModelID pgtype.UUID `json:"compaction_model_id"` + Metadata []byte `json:"metadata"` + CreatedAt pgtype.Timestamptz `json:"created_at"` + UpdatedAt pgtype.Timestamptz `json:"updated_at"` } type BotAclRule struct { @@ -121,6 +124,7 @@ type BotHistoryMessage struct { Metadata []byte `json:"metadata"` Usage []byte `json:"usage"` ModelID pgtype.UUID `json:"model_id"` + CompactID pgtype.UUID `json:"compact_id"` CreatedAt pgtype.Timestamptz `json:"created_at"` } @@ -135,6 +139,20 @@ type BotHistoryMessageAsset struct { CreatedAt pgtype.Timestamptz `json:"created_at"` } +type BotHistoryMessageCompact struct { + ID pgtype.UUID `json:"id"` + BotID pgtype.UUID `json:"bot_id"` + SessionID pgtype.UUID `json:"session_id"` + Status string `json:"status"` + Summary string `json:"summary"` + MessageCount int32 `json:"message_count"` + ErrorMessage string `json:"error_message"` + Usage []byte `json:"usage"` + ModelID pgtype.UUID `json:"model_id"` + StartedAt pgtype.Timestamptz `json:"started_at"` + CompletedAt pgtype.Timestamptz `json:"completed_at"` +} + type BotSession struct { ID pgtype.UUID `json:"id"` BotID pgtype.UUID `json:"bot_id"` diff --git a/internal/db/sqlc/settings.sql.go b/internal/db/sqlc/settings.sql.go index 42dc7fdd..923912c5 100644 --- a/internal/db/sqlc/settings.sql.go +++ b/internal/db/sqlc/settings.sql.go @@ -21,8 +21,11 @@ SET max_context_load_time = 1440, heartbeat_enabled = false, heartbeat_interval = 30, heartbeat_prompt = '', + compaction_enabled = false, + compaction_threshold = 100000, chat_model_id = NULL, heartbeat_model_id = NULL, + compaction_model_id = NULL, title_model_id = NULL, search_provider_id = NULL, memory_provider_id = NULL, @@ -48,8 +51,11 @@ SELECT bots.heartbeat_enabled, bots.heartbeat_interval, bots.heartbeat_prompt, + bots.compaction_enabled, + bots.compaction_threshold, chat_models.id AS chat_model_id, heartbeat_models.id AS heartbeat_model_id, + compaction_models.id AS compaction_model_id, title_models.id AS title_model_id, search_providers.id AS search_provider_id, memory_providers.id AS memory_provider_id, @@ -58,6 +64,7 @@ SELECT FROM bots LEFT JOIN models AS chat_models ON chat_models.id = bots.chat_model_id LEFT JOIN models AS heartbeat_models ON heartbeat_models.id = bots.heartbeat_model_id +LEFT JOIN models AS compaction_models ON compaction_models.id = bots.compaction_model_id LEFT JOIN models AS title_models ON title_models.id = bots.title_model_id LEFT JOIN search_providers ON search_providers.id = bots.search_provider_id LEFT JOIN memory_providers ON memory_providers.id = bots.memory_provider_id @@ -67,22 +74,25 @@ WHERE bots.id = $1 ` type GetSettingsByBotIDRow struct { - BotID pgtype.UUID `json:"bot_id"` - MaxContextLoadTime int32 `json:"max_context_load_time"` - MaxContextTokens int32 `json:"max_context_tokens"` - Language string `json:"language"` - ReasoningEnabled bool `json:"reasoning_enabled"` - ReasoningEffort string `json:"reasoning_effort"` - HeartbeatEnabled bool `json:"heartbeat_enabled"` - HeartbeatInterval int32 `json:"heartbeat_interval"` - HeartbeatPrompt string `json:"heartbeat_prompt"` - ChatModelID pgtype.UUID `json:"chat_model_id"` - HeartbeatModelID pgtype.UUID `json:"heartbeat_model_id"` - TitleModelID pgtype.UUID `json:"title_model_id"` - SearchProviderID pgtype.UUID `json:"search_provider_id"` - MemoryProviderID pgtype.UUID `json:"memory_provider_id"` - TtsModelID pgtype.UUID `json:"tts_model_id"` - BrowserContextID pgtype.UUID `json:"browser_context_id"` + BotID pgtype.UUID `json:"bot_id"` + MaxContextLoadTime int32 `json:"max_context_load_time"` + MaxContextTokens int32 `json:"max_context_tokens"` + Language string `json:"language"` + ReasoningEnabled bool `json:"reasoning_enabled"` + ReasoningEffort string `json:"reasoning_effort"` + HeartbeatEnabled bool `json:"heartbeat_enabled"` + HeartbeatInterval int32 `json:"heartbeat_interval"` + HeartbeatPrompt string `json:"heartbeat_prompt"` + CompactionEnabled bool `json:"compaction_enabled"` + CompactionThreshold int32 `json:"compaction_threshold"` + ChatModelID pgtype.UUID `json:"chat_model_id"` + HeartbeatModelID pgtype.UUID `json:"heartbeat_model_id"` + CompactionModelID pgtype.UUID `json:"compaction_model_id"` + TitleModelID pgtype.UUID `json:"title_model_id"` + SearchProviderID pgtype.UUID `json:"search_provider_id"` + MemoryProviderID pgtype.UUID `json:"memory_provider_id"` + TtsModelID pgtype.UUID `json:"tts_model_id"` + BrowserContextID pgtype.UUID `json:"browser_context_id"` } func (q *Queries) GetSettingsByBotID(ctx context.Context, id pgtype.UUID) (GetSettingsByBotIDRow, error) { @@ -98,8 +108,11 @@ func (q *Queries) GetSettingsByBotID(ctx context.Context, id pgtype.UUID) (GetSe &i.HeartbeatEnabled, &i.HeartbeatInterval, &i.HeartbeatPrompt, + &i.CompactionEnabled, + &i.CompactionThreshold, &i.ChatModelID, &i.HeartbeatModelID, + &i.CompactionModelID, &i.TitleModelID, &i.SearchProviderID, &i.MemoryProviderID, @@ -120,16 +133,19 @@ WITH updated AS ( heartbeat_enabled = $6, heartbeat_interval = $7, heartbeat_prompt = $8, - chat_model_id = COALESCE($9::uuid, bots.chat_model_id), - heartbeat_model_id = COALESCE($10::uuid, bots.heartbeat_model_id), - title_model_id = COALESCE($11::uuid, bots.title_model_id), - search_provider_id = COALESCE($12::uuid, bots.search_provider_id), - memory_provider_id = COALESCE($13::uuid, bots.memory_provider_id), - tts_model_id = COALESCE($14::uuid, bots.tts_model_id), - browser_context_id = COALESCE($15::uuid, bots.browser_context_id), + compaction_enabled = $9, + compaction_threshold = $10, + chat_model_id = COALESCE($11::uuid, bots.chat_model_id), + heartbeat_model_id = COALESCE($12::uuid, bots.heartbeat_model_id), + compaction_model_id = COALESCE($13::uuid, bots.compaction_model_id), + title_model_id = COALESCE($14::uuid, bots.title_model_id), + search_provider_id = COALESCE($15::uuid, bots.search_provider_id), + memory_provider_id = COALESCE($16::uuid, bots.memory_provider_id), + tts_model_id = COALESCE($17::uuid, bots.tts_model_id), + browser_context_id = COALESCE($18::uuid, bots.browser_context_id), updated_at = now() - WHERE bots.id = $16 - RETURNING bots.id, bots.max_context_load_time, bots.max_context_tokens, bots.language, bots.reasoning_enabled, bots.reasoning_effort, bots.heartbeat_enabled, bots.heartbeat_interval, bots.heartbeat_prompt, bots.chat_model_id, bots.heartbeat_model_id, bots.title_model_id, bots.search_provider_id, bots.memory_provider_id, bots.tts_model_id, bots.browser_context_id + WHERE bots.id = $19 + RETURNING bots.id, bots.max_context_load_time, bots.max_context_tokens, bots.language, bots.reasoning_enabled, bots.reasoning_effort, bots.heartbeat_enabled, bots.heartbeat_interval, bots.heartbeat_prompt, bots.compaction_enabled, bots.compaction_threshold, bots.chat_model_id, bots.heartbeat_model_id, bots.compaction_model_id, bots.title_model_id, bots.search_provider_id, bots.memory_provider_id, bots.tts_model_id, bots.browser_context_id ) SELECT updated.id AS bot_id, @@ -141,8 +157,11 @@ SELECT updated.heartbeat_enabled, updated.heartbeat_interval, updated.heartbeat_prompt, + updated.compaction_enabled, + updated.compaction_threshold, chat_models.id AS chat_model_id, heartbeat_models.id AS heartbeat_model_id, + compaction_models.id AS compaction_model_id, title_models.id AS title_model_id, search_providers.id AS search_provider_id, memory_providers.id AS memory_provider_id, @@ -151,6 +170,7 @@ SELECT FROM updated LEFT JOIN models AS chat_models ON chat_models.id = updated.chat_model_id LEFT JOIN models AS heartbeat_models ON heartbeat_models.id = updated.heartbeat_model_id +LEFT JOIN models AS compaction_models ON compaction_models.id = updated.compaction_model_id LEFT JOIN models AS title_models ON title_models.id = updated.title_model_id LEFT JOIN search_providers ON search_providers.id = updated.search_provider_id LEFT JOIN memory_providers ON memory_providers.id = updated.memory_provider_id @@ -159,41 +179,47 @@ LEFT JOIN browser_contexts ON browser_contexts.id = updated.browser_context_id ` type UpsertBotSettingsParams struct { - MaxContextLoadTime int32 `json:"max_context_load_time"` - MaxContextTokens int32 `json:"max_context_tokens"` - Language string `json:"language"` - ReasoningEnabled bool `json:"reasoning_enabled"` - ReasoningEffort string `json:"reasoning_effort"` - HeartbeatEnabled bool `json:"heartbeat_enabled"` - HeartbeatInterval int32 `json:"heartbeat_interval"` - HeartbeatPrompt string `json:"heartbeat_prompt"` - ChatModelID pgtype.UUID `json:"chat_model_id"` - HeartbeatModelID pgtype.UUID `json:"heartbeat_model_id"` - TitleModelID pgtype.UUID `json:"title_model_id"` - SearchProviderID pgtype.UUID `json:"search_provider_id"` - MemoryProviderID pgtype.UUID `json:"memory_provider_id"` - TtsModelID pgtype.UUID `json:"tts_model_id"` - BrowserContextID pgtype.UUID `json:"browser_context_id"` - ID pgtype.UUID `json:"id"` + MaxContextLoadTime int32 `json:"max_context_load_time"` + MaxContextTokens int32 `json:"max_context_tokens"` + Language string `json:"language"` + ReasoningEnabled bool `json:"reasoning_enabled"` + ReasoningEffort string `json:"reasoning_effort"` + HeartbeatEnabled bool `json:"heartbeat_enabled"` + HeartbeatInterval int32 `json:"heartbeat_interval"` + HeartbeatPrompt string `json:"heartbeat_prompt"` + CompactionEnabled bool `json:"compaction_enabled"` + CompactionThreshold int32 `json:"compaction_threshold"` + ChatModelID pgtype.UUID `json:"chat_model_id"` + HeartbeatModelID pgtype.UUID `json:"heartbeat_model_id"` + CompactionModelID pgtype.UUID `json:"compaction_model_id"` + TitleModelID pgtype.UUID `json:"title_model_id"` + SearchProviderID pgtype.UUID `json:"search_provider_id"` + MemoryProviderID pgtype.UUID `json:"memory_provider_id"` + TtsModelID pgtype.UUID `json:"tts_model_id"` + BrowserContextID pgtype.UUID `json:"browser_context_id"` + ID pgtype.UUID `json:"id"` } type UpsertBotSettingsRow struct { - BotID pgtype.UUID `json:"bot_id"` - MaxContextLoadTime int32 `json:"max_context_load_time"` - MaxContextTokens int32 `json:"max_context_tokens"` - Language string `json:"language"` - ReasoningEnabled bool `json:"reasoning_enabled"` - ReasoningEffort string `json:"reasoning_effort"` - HeartbeatEnabled bool `json:"heartbeat_enabled"` - HeartbeatInterval int32 `json:"heartbeat_interval"` - HeartbeatPrompt string `json:"heartbeat_prompt"` - ChatModelID pgtype.UUID `json:"chat_model_id"` - HeartbeatModelID pgtype.UUID `json:"heartbeat_model_id"` - TitleModelID pgtype.UUID `json:"title_model_id"` - SearchProviderID pgtype.UUID `json:"search_provider_id"` - MemoryProviderID pgtype.UUID `json:"memory_provider_id"` - TtsModelID pgtype.UUID `json:"tts_model_id"` - BrowserContextID pgtype.UUID `json:"browser_context_id"` + BotID pgtype.UUID `json:"bot_id"` + MaxContextLoadTime int32 `json:"max_context_load_time"` + MaxContextTokens int32 `json:"max_context_tokens"` + Language string `json:"language"` + ReasoningEnabled bool `json:"reasoning_enabled"` + ReasoningEffort string `json:"reasoning_effort"` + HeartbeatEnabled bool `json:"heartbeat_enabled"` + HeartbeatInterval int32 `json:"heartbeat_interval"` + HeartbeatPrompt string `json:"heartbeat_prompt"` + CompactionEnabled bool `json:"compaction_enabled"` + CompactionThreshold int32 `json:"compaction_threshold"` + ChatModelID pgtype.UUID `json:"chat_model_id"` + HeartbeatModelID pgtype.UUID `json:"heartbeat_model_id"` + CompactionModelID pgtype.UUID `json:"compaction_model_id"` + TitleModelID pgtype.UUID `json:"title_model_id"` + SearchProviderID pgtype.UUID `json:"search_provider_id"` + MemoryProviderID pgtype.UUID `json:"memory_provider_id"` + TtsModelID pgtype.UUID `json:"tts_model_id"` + BrowserContextID pgtype.UUID `json:"browser_context_id"` } func (q *Queries) UpsertBotSettings(ctx context.Context, arg UpsertBotSettingsParams) (UpsertBotSettingsRow, error) { @@ -206,8 +232,11 @@ func (q *Queries) UpsertBotSettings(ctx context.Context, arg UpsertBotSettingsPa arg.HeartbeatEnabled, arg.HeartbeatInterval, arg.HeartbeatPrompt, + arg.CompactionEnabled, + arg.CompactionThreshold, arg.ChatModelID, arg.HeartbeatModelID, + arg.CompactionModelID, arg.TitleModelID, arg.SearchProviderID, arg.MemoryProviderID, @@ -226,8 +255,11 @@ func (q *Queries) UpsertBotSettings(ctx context.Context, arg UpsertBotSettingsPa &i.HeartbeatEnabled, &i.HeartbeatInterval, &i.HeartbeatPrompt, + &i.CompactionEnabled, + &i.CompactionThreshold, &i.ChatModelID, &i.HeartbeatModelID, + &i.CompactionModelID, &i.TitleModelID, &i.SearchProviderID, &i.MemoryProviderID, diff --git a/internal/handlers/compaction.go b/internal/handlers/compaction.go new file mode 100644 index 00000000..77a7787a --- /dev/null +++ b/internal/handlers/compaction.go @@ -0,0 +1,119 @@ +package handlers + +import ( + "context" + "log/slog" + "net/http" + "strconv" + "strings" + "time" + + "github.com/labstack/echo/v4" + + "github.com/memohai/memoh/internal/accounts" + "github.com/memohai/memoh/internal/bots" + "github.com/memohai/memoh/internal/compaction" +) + +type CompactionHandler struct { + service *compaction.Service + botService *bots.Service + accountService *accounts.Service + logger *slog.Logger +} + +func NewCompactionHandler(log *slog.Logger, service *compaction.Service, botService *bots.Service, accountService *accounts.Service) *CompactionHandler { + return &CompactionHandler{ + service: service, + botService: botService, + accountService: accountService, + logger: log.With(slog.String("handler", "compaction")), + } +} + +func (h *CompactionHandler) Register(e *echo.Echo) { + group := e.Group("/bots/:bot_id/compaction") + group.GET("/logs", h.ListLogs) + group.DELETE("/logs", h.DeleteLogs) +} + +// ListLogs godoc +// @Summary List compaction logs +// @Description List compaction logs for a bot +// @Tags compaction +// @Param bot_id path string true "Bot ID" +// @Param before query string false "Before timestamp (RFC3339)" +// @Param limit query int false "Limit" default(50) +// @Success 200 {object} compaction.ListLogsResponse +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse +// @Router /bots/{bot_id}/compaction/logs [get]. +func (h *CompactionHandler) ListLogs(c echo.Context) error { + userID, err := h.requireUserID(c) + if err != nil { + return err + } + botID := strings.TrimSpace(c.Param("bot_id")) + if botID == "" { + return echo.NewHTTPError(http.StatusBadRequest, "bot id is required") + } + if _, err := h.authorizeBotAccess(c.Request().Context(), userID, botID); err != nil { + return err + } + + var before *time.Time + if raw := strings.TrimSpace(c.QueryParam("before")); raw != "" { + t, err := time.Parse(time.RFC3339Nano, raw) + if err != nil { + return echo.NewHTTPError(http.StatusBadRequest, "invalid before timestamp") + } + before = &t + } + limit := 50 + if raw := strings.TrimSpace(c.QueryParam("limit")); raw != "" { + if v, err := strconv.Atoi(raw); err == nil && v > 0 { + limit = v + } + } + + items, err := h.service.ListLogs(c.Request().Context(), botID, before, limit) + if err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + return c.JSON(http.StatusOK, compaction.ListLogsResponse{Items: items}) +} + +// DeleteLogs godoc +// @Summary Delete compaction logs +// @Description Delete all compaction logs for a bot +// @Tags compaction +// @Param bot_id path string true "Bot ID" +// @Success 204 "No Content" +// @Failure 400 {object} ErrorResponse +// @Failure 500 {object} ErrorResponse +// @Router /bots/{bot_id}/compaction/logs [delete]. +func (h *CompactionHandler) DeleteLogs(c echo.Context) error { + userID, err := h.requireUserID(c) + if err != nil { + return err + } + botID := strings.TrimSpace(c.Param("bot_id")) + if botID == "" { + return echo.NewHTTPError(http.StatusBadRequest, "bot id is required") + } + if _, err := h.authorizeBotAccess(c.Request().Context(), userID, botID); err != nil { + return err + } + if err := h.service.DeleteLogs(c.Request().Context(), botID); err != nil { + return echo.NewHTTPError(http.StatusInternalServerError, err.Error()) + } + return c.NoContent(http.StatusNoContent) +} + +func (*CompactionHandler) requireUserID(c echo.Context) (string, error) { + return RequireChannelIdentityID(c) +} + +func (h *CompactionHandler) authorizeBotAccess(ctx context.Context, userID, botID string) (bots.Bot, error) { + return AuthorizeBotAccess(ctx, h.botService, h.accountService, userID, botID) +} diff --git a/internal/message/service.go b/internal/message/service.go index ddadc3a3..ea8b130e 100644 --- a/internal/message/service.go +++ b/internal/message/service.go @@ -482,7 +482,7 @@ func toMessageFromSinceBySessionRow(row sqlc.ListMessagesSinceBySessionRow) Mess } func toMessageFromActiveSinceRow(row sqlc.ListActiveMessagesSinceRow) Message { - return toMessageFields( + m := toMessageFields( row.ID, row.BotID, row.SessionID, @@ -499,10 +499,14 @@ func toMessageFromActiveSinceRow(row sqlc.ListActiveMessagesSinceRow) Message { row.Usage, row.CreatedAt, ) + if row.CompactID.Valid { + m.CompactID = row.CompactID.String() + } + return m } func toMessageFromActiveSinceBySessionRow(row sqlc.ListActiveMessagesSinceBySessionRow) Message { - return toMessageFields( + m := toMessageFields( row.ID, row.BotID, row.SessionID, @@ -519,6 +523,10 @@ func toMessageFromActiveSinceBySessionRow(row sqlc.ListActiveMessagesSinceBySess row.Usage, row.CreatedAt, ) + if row.CompactID.Valid { + m.CompactID = row.CompactID.String() + } + return m } func toMessageFromLatestRow(row sqlc.ListMessagesLatestRow) Message { diff --git a/internal/message/types.go b/internal/message/types.go index c5d1925c..3ce48a61 100644 --- a/internal/message/types.go +++ b/internal/message/types.go @@ -36,6 +36,7 @@ type Message struct { Metadata map[string]any `json:"metadata,omitempty"` Usage json.RawMessage `json:"usage,omitempty"` Assets []MessageAsset `json:"assets,omitempty"` + CompactID string `json:"compact_id,omitempty"` CreatedAt time.Time `json:"created_at"` } diff --git a/internal/settings/service.go b/internal/settings/service.go index c504ec1f..513cc8b6 100644 --- a/internal/settings/service.go +++ b/internal/settings/service.go @@ -70,7 +70,7 @@ func (s *Service) UpsertBot(ctx context.Context, botID string, req UpsertRequest if err != nil { return Settings{}, err } - current := normalizeBotSetting(botRow.MaxContextLoadTime, botRow.MaxContextTokens, botRow.Language, allowGuest, botRow.ReasoningEnabled, botRow.ReasoningEffort, botRow.HeartbeatEnabled, botRow.HeartbeatInterval) + current := normalizeBotSetting(botRow.MaxContextLoadTime, botRow.MaxContextTokens, botRow.Language, allowGuest, botRow.ReasoningEnabled, botRow.ReasoningEffort, botRow.HeartbeatEnabled, botRow.HeartbeatInterval, botRow.CompactionEnabled, botRow.CompactionThreshold) if req.MaxContextLoadTime != nil && *req.MaxContextLoadTime > 0 { current.MaxContextLoadTime = *req.MaxContextLoadTime } @@ -95,6 +95,12 @@ func (s *Service) UpsertBot(ctx context.Context, botID string, req UpsertRequest if req.HeartbeatInterval != nil && *req.HeartbeatInterval > 0 { current.HeartbeatInterval = *req.HeartbeatInterval } + if req.CompactionEnabled != nil { + current.CompactionEnabled = *req.CompactionEnabled + } + if req.CompactionThreshold != nil && *req.CompactionThreshold >= 0 { + current.CompactionThreshold = *req.CompactionThreshold + } chatModelUUID := pgtype.UUID{} if value := strings.TrimSpace(req.ChatModelID); value != "" { modelID, err := s.resolveModelUUID(ctx, value) @@ -111,6 +117,16 @@ func (s *Service) UpsertBot(ctx context.Context, botID string, req UpsertRequest } heartbeatModelUUID = modelID } + compactionModelUUID := pgtype.UUID{} + if req.CompactionModelID != nil { + if value := strings.TrimSpace(*req.CompactionModelID); value != "" { + modelID, err := s.resolveModelUUID(ctx, value) + if err != nil { + return Settings{}, err + } + compactionModelUUID = modelID + } + } titleModelUUID := pgtype.UUID{} if value := strings.TrimSpace(req.TitleModelID); value != "" { modelID, err := s.resolveModelUUID(ctx, value) @@ -153,27 +169,31 @@ func (s *Service) UpsertBot(ctx context.Context, botID string, req UpsertRequest } if current.MaxContextLoadTime < math.MinInt32 || current.MaxContextLoadTime > math.MaxInt32 || current.MaxContextTokens < math.MinInt32 || current.MaxContextTokens > math.MaxInt32 || - current.HeartbeatInterval < math.MinInt32 || current.HeartbeatInterval > math.MaxInt32 { + current.HeartbeatInterval < math.MinInt32 || current.HeartbeatInterval > math.MaxInt32 || + current.CompactionThreshold < math.MinInt32 || current.CompactionThreshold > math.MaxInt32 { return Settings{}, errors.New("settings numeric value out of int32 range") } updated, err := s.queries.UpsertBotSettings(ctx, sqlc.UpsertBotSettingsParams{ - ID: pgID, - MaxContextLoadTime: int32(current.MaxContextLoadTime), //nolint:gosec // range validated above - MaxContextTokens: int32(current.MaxContextTokens), - Language: current.Language, - ReasoningEnabled: current.ReasoningEnabled, - ReasoningEffort: current.ReasoningEffort, - HeartbeatEnabled: current.HeartbeatEnabled, - HeartbeatInterval: int32(current.HeartbeatInterval), - HeartbeatPrompt: "", - ChatModelID: chatModelUUID, - HeartbeatModelID: heartbeatModelUUID, - TitleModelID: titleModelUUID, - SearchProviderID: searchProviderUUID, - MemoryProviderID: memoryProviderUUID, - TtsModelID: ttsModelUUID, - BrowserContextID: browserContextUUID, + ID: pgID, + MaxContextLoadTime: int32(current.MaxContextLoadTime), //nolint:gosec // range validated above + MaxContextTokens: int32(current.MaxContextTokens), + Language: current.Language, + ReasoningEnabled: current.ReasoningEnabled, + ReasoningEffort: current.ReasoningEffort, + HeartbeatEnabled: current.HeartbeatEnabled, + HeartbeatInterval: int32(current.HeartbeatInterval), + HeartbeatPrompt: "", + CompactionEnabled: current.CompactionEnabled, + CompactionThreshold: int32(current.CompactionThreshold), //nolint:gosec // range validated above + ChatModelID: chatModelUUID, + HeartbeatModelID: heartbeatModelUUID, + CompactionModelID: compactionModelUUID, + TitleModelID: titleModelUUID, + SearchProviderID: searchProviderUUID, + MemoryProviderID: memoryProviderUUID, + TtsModelID: ttsModelUUID, + BrowserContextID: browserContextUUID, }) if err != nil { return Settings{}, err @@ -204,16 +224,18 @@ func (s *Service) Delete(ctx context.Context, botID string) error { return s.setAllowGuest(ctx, botID, "", false) } -func normalizeBotSetting(maxContextLoadTime int32, maxContextTokens int32, language string, allowGuest bool, reasoningEnabled bool, reasoningEffort string, heartbeatEnabled bool, heartbeatInterval int32) Settings { +func normalizeBotSetting(maxContextLoadTime int32, maxContextTokens int32, language string, allowGuest bool, reasoningEnabled bool, reasoningEffort string, heartbeatEnabled bool, heartbeatInterval int32, compactionEnabled bool, compactionThreshold int32) Settings { settings := Settings{ - MaxContextLoadTime: int(maxContextLoadTime), - MaxContextTokens: int(maxContextTokens), - Language: strings.TrimSpace(language), - AllowGuest: allowGuest, - ReasoningEnabled: reasoningEnabled, - ReasoningEffort: strings.TrimSpace(reasoningEffort), - HeartbeatEnabled: heartbeatEnabled, - HeartbeatInterval: int(heartbeatInterval), + MaxContextLoadTime: int(maxContextLoadTime), + MaxContextTokens: int(maxContextTokens), + Language: strings.TrimSpace(language), + AllowGuest: allowGuest, + ReasoningEnabled: reasoningEnabled, + ReasoningEffort: strings.TrimSpace(reasoningEffort), + HeartbeatEnabled: heartbeatEnabled, + HeartbeatInterval: int(heartbeatInterval), + CompactionEnabled: compactionEnabled, + CompactionThreshold: int(compactionThreshold), } if settings.MaxContextLoadTime <= 0 { settings.MaxContextLoadTime = DefaultMaxContextLoadTime @@ -230,6 +252,9 @@ func normalizeBotSetting(maxContextLoadTime int32, maxContextTokens int32, langu if settings.HeartbeatInterval <= 0 { settings.HeartbeatInterval = DefaultHeartbeatInterval } + if settings.CompactionThreshold < 0 { + settings.CompactionThreshold = 0 + } return settings } @@ -251,8 +276,11 @@ func normalizeBotSettingsReadRow(row sqlc.GetSettingsByBotIDRow) Settings { row.ReasoningEffort, row.HeartbeatEnabled, row.HeartbeatInterval, + row.CompactionEnabled, + row.CompactionThreshold, row.ChatModelID, row.HeartbeatModelID, + row.CompactionModelID, row.TitleModelID, row.SearchProviderID, row.MemoryProviderID, @@ -270,8 +298,11 @@ func normalizeBotSettingsWriteRow(row sqlc.UpsertBotSettingsRow) Settings { row.ReasoningEffort, row.HeartbeatEnabled, row.HeartbeatInterval, + row.CompactionEnabled, + row.CompactionThreshold, row.ChatModelID, row.HeartbeatModelID, + row.CompactionModelID, row.TitleModelID, row.SearchProviderID, row.MemoryProviderID, @@ -288,21 +319,27 @@ func normalizeBotSettingsFields( reasoningEffort string, heartbeatEnabled bool, heartbeatInterval int32, + compactionEnabled bool, + compactionThreshold int32, chatModelID pgtype.UUID, heartbeatModelID pgtype.UUID, + compactionModelID pgtype.UUID, titleModelID pgtype.UUID, searchProviderID pgtype.UUID, memoryProviderID pgtype.UUID, ttsModelID pgtype.UUID, browserContextID pgtype.UUID, ) Settings { - settings := normalizeBotSetting(maxContextLoadTime, maxContextTokens, language, false, reasoningEnabled, reasoningEffort, heartbeatEnabled, heartbeatInterval) + settings := normalizeBotSetting(maxContextLoadTime, maxContextTokens, language, false, reasoningEnabled, reasoningEffort, heartbeatEnabled, heartbeatInterval, compactionEnabled, compactionThreshold) if chatModelID.Valid { settings.ChatModelID = uuid.UUID(chatModelID.Bytes).String() } if heartbeatModelID.Valid { settings.HeartbeatModelID = uuid.UUID(heartbeatModelID.Bytes).String() } + if compactionModelID.Valid { + settings.CompactionModelID = uuid.UUID(compactionModelID.Bytes).String() + } if titleModelID.Valid { settings.TitleModelID = uuid.UUID(titleModelID.Bytes).String() } diff --git a/internal/settings/types.go b/internal/settings/types.go index 9b094981..3d889941 100644 --- a/internal/settings/types.go +++ b/internal/settings/types.go @@ -8,37 +8,43 @@ const ( ) type Settings struct { - ChatModelID string `json:"chat_model_id"` - SearchProviderID string `json:"search_provider_id"` - MemoryProviderID string `json:"memory_provider_id"` - TtsModelID string `json:"tts_model_id"` - BrowserContextID string `json:"browser_context_id"` - MaxContextLoadTime int `json:"max_context_load_time"` - MaxContextTokens int `json:"max_context_tokens"` - Language string `json:"language"` - AllowGuest bool `json:"allow_guest"` - ReasoningEnabled bool `json:"reasoning_enabled"` - ReasoningEffort string `json:"reasoning_effort"` - HeartbeatEnabled bool `json:"heartbeat_enabled"` - HeartbeatInterval int `json:"heartbeat_interval"` - HeartbeatModelID string `json:"heartbeat_model_id"` - TitleModelID string `json:"title_model_id"` + ChatModelID string `json:"chat_model_id"` + SearchProviderID string `json:"search_provider_id"` + MemoryProviderID string `json:"memory_provider_id"` + TtsModelID string `json:"tts_model_id"` + BrowserContextID string `json:"browser_context_id"` + MaxContextLoadTime int `json:"max_context_load_time"` + MaxContextTokens int `json:"max_context_tokens"` + Language string `json:"language"` + AllowGuest bool `json:"allow_guest"` + ReasoningEnabled bool `json:"reasoning_enabled"` + ReasoningEffort string `json:"reasoning_effort"` + HeartbeatEnabled bool `json:"heartbeat_enabled"` + HeartbeatInterval int `json:"heartbeat_interval"` + HeartbeatModelID string `json:"heartbeat_model_id"` + TitleModelID string `json:"title_model_id"` + CompactionEnabled bool `json:"compaction_enabled"` + CompactionThreshold int `json:"compaction_threshold"` + CompactionModelID string `json:"compaction_model_id,omitempty"` } type UpsertRequest struct { - ChatModelID string `json:"chat_model_id,omitempty"` - SearchProviderID string `json:"search_provider_id,omitempty"` - MemoryProviderID string `json:"memory_provider_id,omitempty"` - TtsModelID string `json:"tts_model_id,omitempty"` - BrowserContextID string `json:"browser_context_id,omitempty"` - MaxContextLoadTime *int `json:"max_context_load_time,omitempty"` - MaxContextTokens *int `json:"max_context_tokens,omitempty"` - Language string `json:"language,omitempty"` - AllowGuest *bool `json:"allow_guest,omitempty"` - ReasoningEnabled *bool `json:"reasoning_enabled,omitempty"` - ReasoningEffort *string `json:"reasoning_effort,omitempty"` - HeartbeatEnabled *bool `json:"heartbeat_enabled,omitempty"` - HeartbeatInterval *int `json:"heartbeat_interval,omitempty"` - HeartbeatModelID string `json:"heartbeat_model_id,omitempty"` - TitleModelID string `json:"title_model_id,omitempty"` + ChatModelID string `json:"chat_model_id,omitempty"` + SearchProviderID string `json:"search_provider_id,omitempty"` + MemoryProviderID string `json:"memory_provider_id,omitempty"` + TtsModelID string `json:"tts_model_id,omitempty"` + BrowserContextID string `json:"browser_context_id,omitempty"` + MaxContextLoadTime *int `json:"max_context_load_time,omitempty"` + MaxContextTokens *int `json:"max_context_tokens,omitempty"` + Language string `json:"language,omitempty"` + AllowGuest *bool `json:"allow_guest,omitempty"` + ReasoningEnabled *bool `json:"reasoning_enabled,omitempty"` + ReasoningEffort *string `json:"reasoning_effort,omitempty"` + HeartbeatEnabled *bool `json:"heartbeat_enabled,omitempty"` + HeartbeatInterval *int `json:"heartbeat_interval,omitempty"` + HeartbeatModelID string `json:"heartbeat_model_id,omitempty"` + TitleModelID string `json:"title_model_id,omitempty"` + CompactionEnabled *bool `json:"compaction_enabled,omitempty"` + CompactionThreshold *int `json:"compaction_threshold,omitempty"` + CompactionModelID *string `json:"compaction_model_id,omitempty"` } diff --git a/packages/sdk/src/@pinia/colada.gen.ts b/packages/sdk/src/@pinia/colada.gen.ts index be67beb1..bb8e2710 100644 --- a/packages/sdk/src/@pinia/colada.gen.ts +++ b/packages/sdk/src/@pinia/colada.gen.ts @@ -4,8 +4,8 @@ import { type _JSONValue, defineQueryOptions, type UseMutationOptions } from '@p import { serializeQueryKeyValue } from '../client'; import { client } from '../client.gen'; -import { deleteBotsByBotIdBlacklistByRuleId, deleteBotsByBotIdContainer, deleteBotsByBotIdContainerSkills, deleteBotsByBotIdEmailBindingsById, deleteBotsByBotIdHeartbeatLogs, deleteBotsByBotIdMcpById, deleteBotsByBotIdMcpByIdOauthToken, deleteBotsByBotIdMemory, deleteBotsByBotIdMemoryById, deleteBotsByBotIdMessages, deleteBotsByBotIdScheduleById, deleteBotsByBotIdScheduleLogs, deleteBotsByBotIdSessionsBySessionId, deleteBotsByBotIdSettings, deleteBotsByBotIdSubagentsById, deleteBotsByBotIdWhitelistByRuleId, deleteBotsById, deleteBotsByIdChannelByPlatform, deleteBrowserContextsById, deleteEmailProvidersById, deleteEmailProvidersByIdOauthToken, deleteMemoryProvidersById, deleteModelsById, deleteModelsModelByModelId, deleteProvidersById, deleteSearchProvidersById, deleteTtsModelsById, deleteTtsProvidersById, getBots, getBotsByBotIdAccessChannelIdentities, getBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversations, getBotsByBotIdAccessUsers, getBotsByBotIdBlacklist, getBotsByBotIdCliWs, getBotsByBotIdContainer, getBotsByBotIdContainerFs, getBotsByBotIdContainerFsDownload, getBotsByBotIdContainerFsList, getBotsByBotIdContainerFsRead, getBotsByBotIdContainerSkills, getBotsByBotIdContainerSnapshots, getBotsByBotIdContainerTerminal, getBotsByBotIdContainerTerminalWs, getBotsByBotIdEmailBindings, getBotsByBotIdEmailOutbox, getBotsByBotIdEmailOutboxById, getBotsByBotIdHeartbeatLogs, getBotsByBotIdMcp, getBotsByBotIdMcpById, getBotsByBotIdMcpByIdOauthStatus, getBotsByBotIdMcpExport, getBotsByBotIdMemory, getBotsByBotIdMemoryStatus, getBotsByBotIdMemoryUsage, getBotsByBotIdMessages, getBotsByBotIdSchedule, getBotsByBotIdScheduleById, getBotsByBotIdScheduleByIdLogs, getBotsByBotIdScheduleLogs, getBotsByBotIdSessions, getBotsByBotIdSessionsBySessionId, getBotsByBotIdSettings, getBotsByBotIdSubagents, getBotsByBotIdSubagentsById, getBotsByBotIdSubagentsByIdContext, getBotsByBotIdSubagentsByIdSkills, getBotsByBotIdTokenUsage, getBotsByBotIdWebWs, getBotsByBotIdWhitelist, getBotsById, getBotsByIdChannelByPlatform, getBotsByIdChecks, getBrowserContexts, getBrowserContextsById, getBrowserContextsCores, getChannels, getChannelsByPlatform, getEmailOauthCallback, getEmailProviders, getEmailProvidersById, getEmailProvidersByIdOauthAuthorize, getEmailProvidersByIdOauthStatus, getEmailProvidersMeta, getMemoryProviders, getMemoryProvidersById, getMemoryProvidersByIdStatus, getMemoryProvidersMeta, getModels, getModelsById, getModelsCount, getModelsModelByModelId, getPing, getProviders, getProvidersById, getProvidersByIdModels, getProvidersCount, getProvidersNameByName, getSearchProviders, getSearchProvidersById, getSearchProvidersMeta, getTtsModels, getTtsModelsById, getTtsModelsByIdCapabilities, getTtsProviders, getTtsProvidersById, getTtsProvidersByIdModels, getTtsProvidersMeta, getUsers, getUsersById, getUsersMe, getUsersMeChannelsByPlatform, getUsersMeIdentities, type Options, patchBotsByBotIdSessionsBySessionId, patchBotsByIdChannelByPlatformStatus, postAuthLogin, postAuthRefresh, postBots, postBotsByBotIdCliMessages, postBotsByBotIdContainer, postBotsByBotIdContainerDataExport, postBotsByBotIdContainerDataImport, postBotsByBotIdContainerDataRestore, postBotsByBotIdContainerFsDelete, postBotsByBotIdContainerFsMkdir, postBotsByBotIdContainerFsRename, postBotsByBotIdContainerFsUpload, postBotsByBotIdContainerFsWrite, postBotsByBotIdContainerSkills, postBotsByBotIdContainerSnapshots, postBotsByBotIdContainerSnapshotsRollback, postBotsByBotIdContainerStart, postBotsByBotIdContainerStop, postBotsByBotIdEmailBindings, postBotsByBotIdMcp, postBotsByBotIdMcpByIdOauthAuthorize, postBotsByBotIdMcpByIdOauthDiscover, postBotsByBotIdMcpByIdOauthExchange, postBotsByBotIdMcpByIdProbe, postBotsByBotIdMcpOpsBatchDelete, postBotsByBotIdMcpStdio, postBotsByBotIdMcpStdioByConnectionId, postBotsByBotIdMemory, postBotsByBotIdMemoryCompact, postBotsByBotIdMemoryRebuild, postBotsByBotIdMemorySearch, postBotsByBotIdSchedule, postBotsByBotIdSessions, postBotsByBotIdSettings, postBotsByBotIdSubagents, postBotsByBotIdSubagentsByIdSkills, postBotsByBotIdTools, postBotsByBotIdTtsSynthesize, postBotsByBotIdWebMessages, postBotsByIdChannelByPlatformSend, postBotsByIdChannelByPlatformSendChat, postBrowserContexts, postEmailMailgunWebhookByConfigId, postEmailProviders, postMemoryProviders, postModels, postModelsByIdTest, postProviders, postProvidersByIdImportModels, postProvidersByIdTest, postSearchProviders, postTtsModels, postTtsModelsByIdTest, postTtsProviders, postTtsProvidersByIdImportModels, postUsers, putBotsByBotIdBlacklist, putBotsByBotIdEmailBindingsById, putBotsByBotIdMcpById, putBotsByBotIdMcpImport, putBotsByBotIdScheduleById, putBotsByBotIdSettings, putBotsByBotIdSubagentsById, putBotsByBotIdSubagentsByIdContext, putBotsByBotIdSubagentsByIdSkills, putBotsByBotIdWhitelist, putBotsById, putBotsByIdChannelByPlatform, putBotsByIdOwner, putBrowserContextsById, putEmailProvidersById, putMemoryProvidersById, putModelsById, putModelsModelByModelId, putProvidersById, putSearchProvidersById, putTtsModelsById, putTtsProvidersById, putUsersById, putUsersByIdPassword, putUsersMe, putUsersMeChannelsByPlatform, putUsersMePassword } from '../sdk.gen'; -import type { DeleteBotsByBotIdBlacklistByRuleIdData, DeleteBotsByBotIdBlacklistByRuleIdError, DeleteBotsByBotIdContainerData, DeleteBotsByBotIdContainerError, DeleteBotsByBotIdContainerSkillsData, DeleteBotsByBotIdContainerSkillsError, DeleteBotsByBotIdContainerSkillsResponse, DeleteBotsByBotIdEmailBindingsByIdData, DeleteBotsByBotIdEmailBindingsByIdError, DeleteBotsByBotIdHeartbeatLogsData, DeleteBotsByBotIdHeartbeatLogsError, DeleteBotsByBotIdMcpByIdData, DeleteBotsByBotIdMcpByIdError, DeleteBotsByBotIdMcpByIdOauthTokenData, DeleteBotsByBotIdMcpByIdOauthTokenError, DeleteBotsByBotIdMemoryByIdData, DeleteBotsByBotIdMemoryByIdError, DeleteBotsByBotIdMemoryByIdResponse, DeleteBotsByBotIdMemoryData, DeleteBotsByBotIdMemoryError, DeleteBotsByBotIdMemoryResponse, DeleteBotsByBotIdMessagesData, DeleteBotsByBotIdMessagesError, DeleteBotsByBotIdScheduleByIdData, DeleteBotsByBotIdScheduleByIdError, DeleteBotsByBotIdScheduleLogsData, DeleteBotsByBotIdScheduleLogsError, DeleteBotsByBotIdSessionsBySessionIdData, DeleteBotsByBotIdSessionsBySessionIdError, DeleteBotsByBotIdSettingsData, DeleteBotsByBotIdSettingsError, DeleteBotsByBotIdSubagentsByIdData, DeleteBotsByBotIdSubagentsByIdError, DeleteBotsByBotIdWhitelistByRuleIdData, DeleteBotsByBotIdWhitelistByRuleIdError, DeleteBotsByIdChannelByPlatformData, DeleteBotsByIdChannelByPlatformError, DeleteBotsByIdData, DeleteBotsByIdError, DeleteBotsByIdResponse, DeleteBrowserContextsByIdData, DeleteBrowserContextsByIdError, DeleteEmailProvidersByIdData, DeleteEmailProvidersByIdError, DeleteEmailProvidersByIdOauthTokenData, DeleteEmailProvidersByIdOauthTokenError, DeleteMemoryProvidersByIdData, DeleteMemoryProvidersByIdError, DeleteModelsByIdData, DeleteModelsByIdError, DeleteModelsModelByModelIdData, DeleteModelsModelByModelIdError, DeleteProvidersByIdData, DeleteProvidersByIdError, DeleteSearchProvidersByIdData, DeleteSearchProvidersByIdError, DeleteTtsModelsByIdData, DeleteTtsModelsByIdError, DeleteTtsProvidersByIdData, DeleteTtsProvidersByIdError, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsData, GetBotsByBotIdAccessChannelIdentitiesData, GetBotsByBotIdAccessUsersData, GetBotsByBotIdBlacklistData, GetBotsByBotIdCliWsData, GetBotsByBotIdContainerData, GetBotsByBotIdContainerFsData, GetBotsByBotIdContainerFsDownloadData, GetBotsByBotIdContainerFsListData, GetBotsByBotIdContainerFsReadData, GetBotsByBotIdContainerSkillsData, GetBotsByBotIdContainerSnapshotsData, GetBotsByBotIdContainerTerminalData, GetBotsByBotIdContainerTerminalWsData, GetBotsByBotIdEmailBindingsData, GetBotsByBotIdEmailOutboxByIdData, GetBotsByBotIdEmailOutboxData, GetBotsByBotIdHeartbeatLogsData, GetBotsByBotIdMcpByIdData, GetBotsByBotIdMcpByIdOauthStatusData, GetBotsByBotIdMcpData, GetBotsByBotIdMcpExportData, GetBotsByBotIdMemoryData, GetBotsByBotIdMemoryStatusData, GetBotsByBotIdMemoryUsageData, GetBotsByBotIdMessagesData, GetBotsByBotIdScheduleByIdData, GetBotsByBotIdScheduleByIdLogsData, GetBotsByBotIdScheduleData, GetBotsByBotIdScheduleLogsData, GetBotsByBotIdSessionsBySessionIdData, GetBotsByBotIdSessionsData, GetBotsByBotIdSettingsData, GetBotsByBotIdSubagentsByIdContextData, GetBotsByBotIdSubagentsByIdData, GetBotsByBotIdSubagentsByIdSkillsData, GetBotsByBotIdSubagentsData, GetBotsByBotIdTokenUsageData, GetBotsByBotIdWebWsData, GetBotsByBotIdWhitelistData, GetBotsByIdChannelByPlatformData, GetBotsByIdChecksData, GetBotsByIdData, GetBotsData, GetBrowserContextsByIdData, GetBrowserContextsCoresData, GetBrowserContextsData, GetChannelsByPlatformData, GetChannelsData, GetEmailOauthCallbackData, GetEmailProvidersByIdData, GetEmailProvidersByIdOauthAuthorizeData, GetEmailProvidersByIdOauthStatusData, GetEmailProvidersData, GetEmailProvidersMetaData, GetMemoryProvidersByIdData, GetMemoryProvidersByIdStatusData, GetMemoryProvidersData, GetMemoryProvidersMetaData, GetModelsByIdData, GetModelsCountData, GetModelsData, GetModelsModelByModelIdData, GetPingData, GetProvidersByIdData, GetProvidersByIdModelsData, GetProvidersCountData, GetProvidersData, GetProvidersNameByNameData, GetSearchProvidersByIdData, GetSearchProvidersData, GetSearchProvidersMetaData, GetTtsModelsByIdCapabilitiesData, GetTtsModelsByIdData, GetTtsModelsData, GetTtsProvidersByIdData, GetTtsProvidersByIdModelsData, GetTtsProvidersData, GetTtsProvidersMetaData, GetUsersByIdData, GetUsersData, GetUsersMeChannelsByPlatformData, GetUsersMeData, GetUsersMeIdentitiesData, PatchBotsByBotIdSessionsBySessionIdData, PatchBotsByBotIdSessionsBySessionIdError, PatchBotsByBotIdSessionsBySessionIdResponse, PatchBotsByIdChannelByPlatformStatusData, PatchBotsByIdChannelByPlatformStatusError, PatchBotsByIdChannelByPlatformStatusResponse, PostAuthLoginData, PostAuthLoginError, PostAuthLoginResponse, PostAuthRefreshData, PostAuthRefreshError, PostAuthRefreshResponse, PostBotsByBotIdCliMessagesData, PostBotsByBotIdCliMessagesError, PostBotsByBotIdCliMessagesResponse, PostBotsByBotIdContainerData, PostBotsByBotIdContainerDataExportData, PostBotsByBotIdContainerDataExportError, PostBotsByBotIdContainerDataImportData, PostBotsByBotIdContainerDataImportError, PostBotsByBotIdContainerDataImportResponse, PostBotsByBotIdContainerDataRestoreData, PostBotsByBotIdContainerDataRestoreError, PostBotsByBotIdContainerDataRestoreResponse, PostBotsByBotIdContainerError, PostBotsByBotIdContainerFsDeleteData, PostBotsByBotIdContainerFsDeleteError, PostBotsByBotIdContainerFsDeleteResponse, PostBotsByBotIdContainerFsMkdirData, PostBotsByBotIdContainerFsMkdirError, PostBotsByBotIdContainerFsMkdirResponse, PostBotsByBotIdContainerFsRenameData, PostBotsByBotIdContainerFsRenameError, PostBotsByBotIdContainerFsRenameResponse, PostBotsByBotIdContainerFsUploadData, PostBotsByBotIdContainerFsUploadError, PostBotsByBotIdContainerFsUploadResponse, PostBotsByBotIdContainerFsWriteData, PostBotsByBotIdContainerFsWriteError, PostBotsByBotIdContainerFsWriteResponse, PostBotsByBotIdContainerResponse, PostBotsByBotIdContainerSkillsData, PostBotsByBotIdContainerSkillsError, PostBotsByBotIdContainerSkillsResponse, PostBotsByBotIdContainerSnapshotsData, PostBotsByBotIdContainerSnapshotsError, PostBotsByBotIdContainerSnapshotsResponse, PostBotsByBotIdContainerSnapshotsRollbackData, PostBotsByBotIdContainerSnapshotsRollbackError, PostBotsByBotIdContainerSnapshotsRollbackResponse, PostBotsByBotIdContainerStartData, PostBotsByBotIdContainerStartError, PostBotsByBotIdContainerStartResponse, PostBotsByBotIdContainerStopData, PostBotsByBotIdContainerStopError, PostBotsByBotIdContainerStopResponse, PostBotsByBotIdEmailBindingsData, PostBotsByBotIdEmailBindingsError, PostBotsByBotIdEmailBindingsResponse, PostBotsByBotIdMcpByIdOauthAuthorizeData, PostBotsByBotIdMcpByIdOauthAuthorizeError, PostBotsByBotIdMcpByIdOauthAuthorizeResponse, PostBotsByBotIdMcpByIdOauthDiscoverData, PostBotsByBotIdMcpByIdOauthDiscoverError, PostBotsByBotIdMcpByIdOauthDiscoverResponse, PostBotsByBotIdMcpByIdOauthExchangeData, PostBotsByBotIdMcpByIdOauthExchangeError, PostBotsByBotIdMcpByIdOauthExchangeResponse, PostBotsByBotIdMcpByIdProbeData, PostBotsByBotIdMcpByIdProbeError, PostBotsByBotIdMcpByIdProbeResponse, PostBotsByBotIdMcpData, PostBotsByBotIdMcpError, PostBotsByBotIdMcpOpsBatchDeleteData, PostBotsByBotIdMcpOpsBatchDeleteError, PostBotsByBotIdMcpResponse, PostBotsByBotIdMcpStdioByConnectionIdData, PostBotsByBotIdMcpStdioByConnectionIdError, PostBotsByBotIdMcpStdioByConnectionIdResponse, PostBotsByBotIdMcpStdioData, PostBotsByBotIdMcpStdioError, PostBotsByBotIdMcpStdioResponse, PostBotsByBotIdMemoryCompactData, PostBotsByBotIdMemoryCompactError, PostBotsByBotIdMemoryCompactResponse, PostBotsByBotIdMemoryData, PostBotsByBotIdMemoryError, PostBotsByBotIdMemoryRebuildData, PostBotsByBotIdMemoryRebuildError, PostBotsByBotIdMemoryRebuildResponse, PostBotsByBotIdMemoryResponse, PostBotsByBotIdMemorySearchData, PostBotsByBotIdMemorySearchError, PostBotsByBotIdMemorySearchResponse, PostBotsByBotIdScheduleData, PostBotsByBotIdScheduleError, PostBotsByBotIdScheduleResponse, PostBotsByBotIdSessionsData, PostBotsByBotIdSessionsError, PostBotsByBotIdSessionsResponse, PostBotsByBotIdSettingsData, PostBotsByBotIdSettingsError, PostBotsByBotIdSettingsResponse, PostBotsByBotIdSubagentsByIdSkillsData, PostBotsByBotIdSubagentsByIdSkillsError, PostBotsByBotIdSubagentsByIdSkillsResponse, PostBotsByBotIdSubagentsData, PostBotsByBotIdSubagentsError, PostBotsByBotIdSubagentsResponse, PostBotsByBotIdToolsData, PostBotsByBotIdToolsError, PostBotsByBotIdToolsResponse, PostBotsByBotIdTtsSynthesizeData, PostBotsByBotIdTtsSynthesizeError, PostBotsByBotIdTtsSynthesizeResponse, PostBotsByBotIdWebMessagesData, PostBotsByBotIdWebMessagesError, PostBotsByBotIdWebMessagesResponse, PostBotsByIdChannelByPlatformSendChatData, PostBotsByIdChannelByPlatformSendChatError, PostBotsByIdChannelByPlatformSendChatResponse, PostBotsByIdChannelByPlatformSendData, PostBotsByIdChannelByPlatformSendError, PostBotsByIdChannelByPlatformSendResponse, PostBotsData, PostBotsError, PostBotsResponse, PostBrowserContextsData, PostBrowserContextsError, PostBrowserContextsResponse, PostEmailMailgunWebhookByConfigIdData, PostEmailMailgunWebhookByConfigIdError, PostEmailMailgunWebhookByConfigIdResponse, PostEmailProvidersData, PostEmailProvidersError, PostEmailProvidersResponse, PostMemoryProvidersData, PostMemoryProvidersError, PostMemoryProvidersResponse, PostModelsByIdTestData, PostModelsByIdTestError, PostModelsByIdTestResponse, PostModelsData, PostModelsError, PostModelsResponse, PostProvidersByIdImportModelsData, PostProvidersByIdImportModelsError, PostProvidersByIdImportModelsResponse, PostProvidersByIdTestData, PostProvidersByIdTestError, PostProvidersByIdTestResponse, PostProvidersData, PostProvidersError, PostProvidersResponse, PostSearchProvidersData, PostSearchProvidersError, PostSearchProvidersResponse, PostTtsModelsByIdTestData, PostTtsModelsByIdTestError, PostTtsModelsData, PostTtsModelsError, PostTtsModelsResponse, PostTtsProvidersByIdImportModelsData, PostTtsProvidersByIdImportModelsError, PostTtsProvidersByIdImportModelsResponse, PostTtsProvidersData, PostTtsProvidersError, PostTtsProvidersResponse, PostUsersData, PostUsersError, PostUsersResponse, PutBotsByBotIdBlacklistData, PutBotsByBotIdBlacklistError, PutBotsByBotIdBlacklistResponse, PutBotsByBotIdEmailBindingsByIdData, PutBotsByBotIdEmailBindingsByIdError, PutBotsByBotIdEmailBindingsByIdResponse, PutBotsByBotIdMcpByIdData, PutBotsByBotIdMcpByIdError, PutBotsByBotIdMcpByIdResponse, PutBotsByBotIdMcpImportData, PutBotsByBotIdMcpImportError, PutBotsByBotIdMcpImportResponse, PutBotsByBotIdScheduleByIdData, PutBotsByBotIdScheduleByIdError, PutBotsByBotIdScheduleByIdResponse, PutBotsByBotIdSettingsData, PutBotsByBotIdSettingsError, PutBotsByBotIdSettingsResponse, PutBotsByBotIdSubagentsByIdContextData, PutBotsByBotIdSubagentsByIdContextError, PutBotsByBotIdSubagentsByIdContextResponse, PutBotsByBotIdSubagentsByIdData, PutBotsByBotIdSubagentsByIdError, PutBotsByBotIdSubagentsByIdResponse, PutBotsByBotIdSubagentsByIdSkillsData, PutBotsByBotIdSubagentsByIdSkillsError, PutBotsByBotIdSubagentsByIdSkillsResponse, PutBotsByBotIdWhitelistData, PutBotsByBotIdWhitelistError, PutBotsByBotIdWhitelistResponse, PutBotsByIdChannelByPlatformData, PutBotsByIdChannelByPlatformError, PutBotsByIdChannelByPlatformResponse, PutBotsByIdData, PutBotsByIdError, PutBotsByIdOwnerData, PutBotsByIdOwnerError, PutBotsByIdOwnerResponse, PutBotsByIdResponse, PutBrowserContextsByIdData, PutBrowserContextsByIdError, PutBrowserContextsByIdResponse, PutEmailProvidersByIdData, PutEmailProvidersByIdError, PutEmailProvidersByIdResponse, PutMemoryProvidersByIdData, PutMemoryProvidersByIdError, PutMemoryProvidersByIdResponse, PutModelsByIdData, PutModelsByIdError, PutModelsByIdResponse, PutModelsModelByModelIdData, PutModelsModelByModelIdError, PutModelsModelByModelIdResponse, PutProvidersByIdData, PutProvidersByIdError, PutProvidersByIdResponse, PutSearchProvidersByIdData, PutSearchProvidersByIdError, PutSearchProvidersByIdResponse, PutTtsModelsByIdData, PutTtsModelsByIdError, PutTtsModelsByIdResponse, PutTtsProvidersByIdData, PutTtsProvidersByIdError, PutTtsProvidersByIdResponse, PutUsersByIdData, PutUsersByIdError, PutUsersByIdPasswordData, PutUsersByIdPasswordError, PutUsersByIdResponse, PutUsersMeChannelsByPlatformData, PutUsersMeChannelsByPlatformError, PutUsersMeChannelsByPlatformResponse, PutUsersMeData, PutUsersMeError, PutUsersMePasswordData, PutUsersMePasswordError, PutUsersMeResponse } from '../types.gen'; +import { deleteBotsByBotIdBlacklistByRuleId, deleteBotsByBotIdCompactionLogs, deleteBotsByBotIdContainer, deleteBotsByBotIdContainerSkills, deleteBotsByBotIdEmailBindingsById, deleteBotsByBotIdHeartbeatLogs, deleteBotsByBotIdMcpById, deleteBotsByBotIdMcpByIdOauthToken, deleteBotsByBotIdMemory, deleteBotsByBotIdMemoryById, deleteBotsByBotIdMessages, deleteBotsByBotIdScheduleById, deleteBotsByBotIdScheduleLogs, deleteBotsByBotIdSessionsBySessionId, deleteBotsByBotIdSettings, deleteBotsByBotIdSubagentsById, deleteBotsByBotIdWhitelistByRuleId, deleteBotsById, deleteBotsByIdChannelByPlatform, deleteBrowserContextsById, deleteEmailProvidersById, deleteEmailProvidersByIdOauthToken, deleteMemoryProvidersById, deleteModelsById, deleteModelsModelByModelId, deleteProvidersById, deleteSearchProvidersById, deleteTtsModelsById, deleteTtsProvidersById, getBots, getBotsByBotIdAccessChannelIdentities, getBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversations, getBotsByBotIdAccessUsers, getBotsByBotIdBlacklist, getBotsByBotIdCliWs, getBotsByBotIdCompactionLogs, getBotsByBotIdContainer, getBotsByBotIdContainerFs, getBotsByBotIdContainerFsDownload, getBotsByBotIdContainerFsList, getBotsByBotIdContainerFsRead, getBotsByBotIdContainerSkills, getBotsByBotIdContainerSnapshots, getBotsByBotIdContainerTerminal, getBotsByBotIdContainerTerminalWs, getBotsByBotIdEmailBindings, getBotsByBotIdEmailOutbox, getBotsByBotIdEmailOutboxById, getBotsByBotIdHeartbeatLogs, getBotsByBotIdMcp, getBotsByBotIdMcpById, getBotsByBotIdMcpByIdOauthStatus, getBotsByBotIdMcpExport, getBotsByBotIdMemory, getBotsByBotIdMemoryStatus, getBotsByBotIdMemoryUsage, getBotsByBotIdMessages, getBotsByBotIdSchedule, getBotsByBotIdScheduleById, getBotsByBotIdScheduleByIdLogs, getBotsByBotIdScheduleLogs, getBotsByBotIdSessions, getBotsByBotIdSessionsBySessionId, getBotsByBotIdSettings, getBotsByBotIdSubagents, getBotsByBotIdSubagentsById, getBotsByBotIdSubagentsByIdContext, getBotsByBotIdSubagentsByIdSkills, getBotsByBotIdTokenUsage, getBotsByBotIdWebWs, getBotsByBotIdWhitelist, getBotsById, getBotsByIdChannelByPlatform, getBotsByIdChecks, getBrowserContexts, getBrowserContextsById, getBrowserContextsCores, getChannels, getChannelsByPlatform, getEmailOauthCallback, getEmailProviders, getEmailProvidersById, getEmailProvidersByIdOauthAuthorize, getEmailProvidersByIdOauthStatus, getEmailProvidersMeta, getMemoryProviders, getMemoryProvidersById, getMemoryProvidersByIdStatus, getMemoryProvidersMeta, getModels, getModelsById, getModelsCount, getModelsModelByModelId, getPing, getProviders, getProvidersById, getProvidersByIdModels, getProvidersCount, getProvidersNameByName, getSearchProviders, getSearchProvidersById, getSearchProvidersMeta, getTtsModels, getTtsModelsById, getTtsModelsByIdCapabilities, getTtsProviders, getTtsProvidersById, getTtsProvidersByIdModels, getTtsProvidersMeta, getUsers, getUsersById, getUsersMe, getUsersMeChannelsByPlatform, getUsersMeIdentities, type Options, patchBotsByBotIdSessionsBySessionId, patchBotsByIdChannelByPlatformStatus, postAuthLogin, postAuthRefresh, postBots, postBotsByBotIdCliMessages, postBotsByBotIdContainer, postBotsByBotIdContainerDataExport, postBotsByBotIdContainerDataImport, postBotsByBotIdContainerDataRestore, postBotsByBotIdContainerFsDelete, postBotsByBotIdContainerFsMkdir, postBotsByBotIdContainerFsRename, postBotsByBotIdContainerFsUpload, postBotsByBotIdContainerFsWrite, postBotsByBotIdContainerSkills, postBotsByBotIdContainerSnapshots, postBotsByBotIdContainerSnapshotsRollback, postBotsByBotIdContainerStart, postBotsByBotIdContainerStop, postBotsByBotIdEmailBindings, postBotsByBotIdMcp, postBotsByBotIdMcpByIdOauthAuthorize, postBotsByBotIdMcpByIdOauthDiscover, postBotsByBotIdMcpByIdOauthExchange, postBotsByBotIdMcpByIdProbe, postBotsByBotIdMcpOpsBatchDelete, postBotsByBotIdMcpStdio, postBotsByBotIdMcpStdioByConnectionId, postBotsByBotIdMemory, postBotsByBotIdMemoryCompact, postBotsByBotIdMemoryRebuild, postBotsByBotIdMemorySearch, postBotsByBotIdSchedule, postBotsByBotIdSessions, postBotsByBotIdSettings, postBotsByBotIdSubagents, postBotsByBotIdSubagentsByIdSkills, postBotsByBotIdTools, postBotsByBotIdTtsSynthesize, postBotsByBotIdWebMessages, postBotsByIdChannelByPlatformSend, postBotsByIdChannelByPlatformSendChat, postBrowserContexts, postEmailMailgunWebhookByConfigId, postEmailProviders, postMemoryProviders, postModels, postModelsByIdTest, postProviders, postProvidersByIdImportModels, postProvidersByIdTest, postSearchProviders, postTtsModels, postTtsModelsByIdTest, postTtsProviders, postTtsProvidersByIdImportModels, postUsers, putBotsByBotIdBlacklist, putBotsByBotIdEmailBindingsById, putBotsByBotIdMcpById, putBotsByBotIdMcpImport, putBotsByBotIdScheduleById, putBotsByBotIdSettings, putBotsByBotIdSubagentsById, putBotsByBotIdSubagentsByIdContext, putBotsByBotIdSubagentsByIdSkills, putBotsByBotIdWhitelist, putBotsById, putBotsByIdChannelByPlatform, putBotsByIdOwner, putBrowserContextsById, putEmailProvidersById, putMemoryProvidersById, putModelsById, putModelsModelByModelId, putProvidersById, putSearchProvidersById, putTtsModelsById, putTtsProvidersById, putUsersById, putUsersByIdPassword, putUsersMe, putUsersMeChannelsByPlatform, putUsersMePassword } from '../sdk.gen'; +import type { DeleteBotsByBotIdBlacklistByRuleIdData, DeleteBotsByBotIdBlacklistByRuleIdError, DeleteBotsByBotIdCompactionLogsData, DeleteBotsByBotIdCompactionLogsError, DeleteBotsByBotIdContainerData, DeleteBotsByBotIdContainerError, DeleteBotsByBotIdContainerSkillsData, DeleteBotsByBotIdContainerSkillsError, DeleteBotsByBotIdContainerSkillsResponse, DeleteBotsByBotIdEmailBindingsByIdData, DeleteBotsByBotIdEmailBindingsByIdError, DeleteBotsByBotIdHeartbeatLogsData, DeleteBotsByBotIdHeartbeatLogsError, DeleteBotsByBotIdMcpByIdData, DeleteBotsByBotIdMcpByIdError, DeleteBotsByBotIdMcpByIdOauthTokenData, DeleteBotsByBotIdMcpByIdOauthTokenError, DeleteBotsByBotIdMemoryByIdData, DeleteBotsByBotIdMemoryByIdError, DeleteBotsByBotIdMemoryByIdResponse, DeleteBotsByBotIdMemoryData, DeleteBotsByBotIdMemoryError, DeleteBotsByBotIdMemoryResponse, DeleteBotsByBotIdMessagesData, DeleteBotsByBotIdMessagesError, DeleteBotsByBotIdScheduleByIdData, DeleteBotsByBotIdScheduleByIdError, DeleteBotsByBotIdScheduleLogsData, DeleteBotsByBotIdScheduleLogsError, DeleteBotsByBotIdSessionsBySessionIdData, DeleteBotsByBotIdSessionsBySessionIdError, DeleteBotsByBotIdSettingsData, DeleteBotsByBotIdSettingsError, DeleteBotsByBotIdSubagentsByIdData, DeleteBotsByBotIdSubagentsByIdError, DeleteBotsByBotIdWhitelistByRuleIdData, DeleteBotsByBotIdWhitelistByRuleIdError, DeleteBotsByIdChannelByPlatformData, DeleteBotsByIdChannelByPlatformError, DeleteBotsByIdData, DeleteBotsByIdError, DeleteBotsByIdResponse, DeleteBrowserContextsByIdData, DeleteBrowserContextsByIdError, DeleteEmailProvidersByIdData, DeleteEmailProvidersByIdError, DeleteEmailProvidersByIdOauthTokenData, DeleteEmailProvidersByIdOauthTokenError, DeleteMemoryProvidersByIdData, DeleteMemoryProvidersByIdError, DeleteModelsByIdData, DeleteModelsByIdError, DeleteModelsModelByModelIdData, DeleteModelsModelByModelIdError, DeleteProvidersByIdData, DeleteProvidersByIdError, DeleteSearchProvidersByIdData, DeleteSearchProvidersByIdError, DeleteTtsModelsByIdData, DeleteTtsModelsByIdError, DeleteTtsProvidersByIdData, DeleteTtsProvidersByIdError, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsData, GetBotsByBotIdAccessChannelIdentitiesData, GetBotsByBotIdAccessUsersData, GetBotsByBotIdBlacklistData, GetBotsByBotIdCliWsData, GetBotsByBotIdCompactionLogsData, GetBotsByBotIdContainerData, GetBotsByBotIdContainerFsData, GetBotsByBotIdContainerFsDownloadData, GetBotsByBotIdContainerFsListData, GetBotsByBotIdContainerFsReadData, GetBotsByBotIdContainerSkillsData, GetBotsByBotIdContainerSnapshotsData, GetBotsByBotIdContainerTerminalData, GetBotsByBotIdContainerTerminalWsData, GetBotsByBotIdEmailBindingsData, GetBotsByBotIdEmailOutboxByIdData, GetBotsByBotIdEmailOutboxData, GetBotsByBotIdHeartbeatLogsData, GetBotsByBotIdMcpByIdData, GetBotsByBotIdMcpByIdOauthStatusData, GetBotsByBotIdMcpData, GetBotsByBotIdMcpExportData, GetBotsByBotIdMemoryData, GetBotsByBotIdMemoryStatusData, GetBotsByBotIdMemoryUsageData, GetBotsByBotIdMessagesData, GetBotsByBotIdScheduleByIdData, GetBotsByBotIdScheduleByIdLogsData, GetBotsByBotIdScheduleData, GetBotsByBotIdScheduleLogsData, GetBotsByBotIdSessionsBySessionIdData, GetBotsByBotIdSessionsData, GetBotsByBotIdSettingsData, GetBotsByBotIdSubagentsByIdContextData, GetBotsByBotIdSubagentsByIdData, GetBotsByBotIdSubagentsByIdSkillsData, GetBotsByBotIdSubagentsData, GetBotsByBotIdTokenUsageData, GetBotsByBotIdWebWsData, GetBotsByBotIdWhitelistData, GetBotsByIdChannelByPlatformData, GetBotsByIdChecksData, GetBotsByIdData, GetBotsData, GetBrowserContextsByIdData, GetBrowserContextsCoresData, GetBrowserContextsData, GetChannelsByPlatformData, GetChannelsData, GetEmailOauthCallbackData, GetEmailProvidersByIdData, GetEmailProvidersByIdOauthAuthorizeData, GetEmailProvidersByIdOauthStatusData, GetEmailProvidersData, GetEmailProvidersMetaData, GetMemoryProvidersByIdData, GetMemoryProvidersByIdStatusData, GetMemoryProvidersData, GetMemoryProvidersMetaData, GetModelsByIdData, GetModelsCountData, GetModelsData, GetModelsModelByModelIdData, GetPingData, GetProvidersByIdData, GetProvidersByIdModelsData, GetProvidersCountData, GetProvidersData, GetProvidersNameByNameData, GetSearchProvidersByIdData, GetSearchProvidersData, GetSearchProvidersMetaData, GetTtsModelsByIdCapabilitiesData, GetTtsModelsByIdData, GetTtsModelsData, GetTtsProvidersByIdData, GetTtsProvidersByIdModelsData, GetTtsProvidersData, GetTtsProvidersMetaData, GetUsersByIdData, GetUsersData, GetUsersMeChannelsByPlatformData, GetUsersMeData, GetUsersMeIdentitiesData, PatchBotsByBotIdSessionsBySessionIdData, PatchBotsByBotIdSessionsBySessionIdError, PatchBotsByBotIdSessionsBySessionIdResponse, PatchBotsByIdChannelByPlatformStatusData, PatchBotsByIdChannelByPlatformStatusError, PatchBotsByIdChannelByPlatformStatusResponse, PostAuthLoginData, PostAuthLoginError, PostAuthLoginResponse, PostAuthRefreshData, PostAuthRefreshError, PostAuthRefreshResponse, PostBotsByBotIdCliMessagesData, PostBotsByBotIdCliMessagesError, PostBotsByBotIdCliMessagesResponse, PostBotsByBotIdContainerData, PostBotsByBotIdContainerDataExportData, PostBotsByBotIdContainerDataExportError, PostBotsByBotIdContainerDataImportData, PostBotsByBotIdContainerDataImportError, PostBotsByBotIdContainerDataImportResponse, PostBotsByBotIdContainerDataRestoreData, PostBotsByBotIdContainerDataRestoreError, PostBotsByBotIdContainerDataRestoreResponse, PostBotsByBotIdContainerError, PostBotsByBotIdContainerFsDeleteData, PostBotsByBotIdContainerFsDeleteError, PostBotsByBotIdContainerFsDeleteResponse, PostBotsByBotIdContainerFsMkdirData, PostBotsByBotIdContainerFsMkdirError, PostBotsByBotIdContainerFsMkdirResponse, PostBotsByBotIdContainerFsRenameData, PostBotsByBotIdContainerFsRenameError, PostBotsByBotIdContainerFsRenameResponse, PostBotsByBotIdContainerFsUploadData, PostBotsByBotIdContainerFsUploadError, PostBotsByBotIdContainerFsUploadResponse, PostBotsByBotIdContainerFsWriteData, PostBotsByBotIdContainerFsWriteError, PostBotsByBotIdContainerFsWriteResponse, PostBotsByBotIdContainerResponse, PostBotsByBotIdContainerSkillsData, PostBotsByBotIdContainerSkillsError, PostBotsByBotIdContainerSkillsResponse, PostBotsByBotIdContainerSnapshotsData, PostBotsByBotIdContainerSnapshotsError, PostBotsByBotIdContainerSnapshotsResponse, PostBotsByBotIdContainerSnapshotsRollbackData, PostBotsByBotIdContainerSnapshotsRollbackError, PostBotsByBotIdContainerSnapshotsRollbackResponse, PostBotsByBotIdContainerStartData, PostBotsByBotIdContainerStartError, PostBotsByBotIdContainerStartResponse, PostBotsByBotIdContainerStopData, PostBotsByBotIdContainerStopError, PostBotsByBotIdContainerStopResponse, PostBotsByBotIdEmailBindingsData, PostBotsByBotIdEmailBindingsError, PostBotsByBotIdEmailBindingsResponse, PostBotsByBotIdMcpByIdOauthAuthorizeData, PostBotsByBotIdMcpByIdOauthAuthorizeError, PostBotsByBotIdMcpByIdOauthAuthorizeResponse, PostBotsByBotIdMcpByIdOauthDiscoverData, PostBotsByBotIdMcpByIdOauthDiscoverError, PostBotsByBotIdMcpByIdOauthDiscoverResponse, PostBotsByBotIdMcpByIdOauthExchangeData, PostBotsByBotIdMcpByIdOauthExchangeError, PostBotsByBotIdMcpByIdOauthExchangeResponse, PostBotsByBotIdMcpByIdProbeData, PostBotsByBotIdMcpByIdProbeError, PostBotsByBotIdMcpByIdProbeResponse, PostBotsByBotIdMcpData, PostBotsByBotIdMcpError, PostBotsByBotIdMcpOpsBatchDeleteData, PostBotsByBotIdMcpOpsBatchDeleteError, PostBotsByBotIdMcpResponse, PostBotsByBotIdMcpStdioByConnectionIdData, PostBotsByBotIdMcpStdioByConnectionIdError, PostBotsByBotIdMcpStdioByConnectionIdResponse, PostBotsByBotIdMcpStdioData, PostBotsByBotIdMcpStdioError, PostBotsByBotIdMcpStdioResponse, PostBotsByBotIdMemoryCompactData, PostBotsByBotIdMemoryCompactError, PostBotsByBotIdMemoryCompactResponse, PostBotsByBotIdMemoryData, PostBotsByBotIdMemoryError, PostBotsByBotIdMemoryRebuildData, PostBotsByBotIdMemoryRebuildError, PostBotsByBotIdMemoryRebuildResponse, PostBotsByBotIdMemoryResponse, PostBotsByBotIdMemorySearchData, PostBotsByBotIdMemorySearchError, PostBotsByBotIdMemorySearchResponse, PostBotsByBotIdScheduleData, PostBotsByBotIdScheduleError, PostBotsByBotIdScheduleResponse, PostBotsByBotIdSessionsData, PostBotsByBotIdSessionsError, PostBotsByBotIdSessionsResponse, PostBotsByBotIdSettingsData, PostBotsByBotIdSettingsError, PostBotsByBotIdSettingsResponse, PostBotsByBotIdSubagentsByIdSkillsData, PostBotsByBotIdSubagentsByIdSkillsError, PostBotsByBotIdSubagentsByIdSkillsResponse, PostBotsByBotIdSubagentsData, PostBotsByBotIdSubagentsError, PostBotsByBotIdSubagentsResponse, PostBotsByBotIdToolsData, PostBotsByBotIdToolsError, PostBotsByBotIdToolsResponse, PostBotsByBotIdTtsSynthesizeData, PostBotsByBotIdTtsSynthesizeError, PostBotsByBotIdTtsSynthesizeResponse, PostBotsByBotIdWebMessagesData, PostBotsByBotIdWebMessagesError, PostBotsByBotIdWebMessagesResponse, PostBotsByIdChannelByPlatformSendChatData, PostBotsByIdChannelByPlatformSendChatError, PostBotsByIdChannelByPlatformSendChatResponse, PostBotsByIdChannelByPlatformSendData, PostBotsByIdChannelByPlatformSendError, PostBotsByIdChannelByPlatformSendResponse, PostBotsData, PostBotsError, PostBotsResponse, PostBrowserContextsData, PostBrowserContextsError, PostBrowserContextsResponse, PostEmailMailgunWebhookByConfigIdData, PostEmailMailgunWebhookByConfigIdError, PostEmailMailgunWebhookByConfigIdResponse, PostEmailProvidersData, PostEmailProvidersError, PostEmailProvidersResponse, PostMemoryProvidersData, PostMemoryProvidersError, PostMemoryProvidersResponse, PostModelsByIdTestData, PostModelsByIdTestError, PostModelsByIdTestResponse, PostModelsData, PostModelsError, PostModelsResponse, PostProvidersByIdImportModelsData, PostProvidersByIdImportModelsError, PostProvidersByIdImportModelsResponse, PostProvidersByIdTestData, PostProvidersByIdTestError, PostProvidersByIdTestResponse, PostProvidersData, PostProvidersError, PostProvidersResponse, PostSearchProvidersData, PostSearchProvidersError, PostSearchProvidersResponse, PostTtsModelsByIdTestData, PostTtsModelsByIdTestError, PostTtsModelsData, PostTtsModelsError, PostTtsModelsResponse, PostTtsProvidersByIdImportModelsData, PostTtsProvidersByIdImportModelsError, PostTtsProvidersByIdImportModelsResponse, PostTtsProvidersData, PostTtsProvidersError, PostTtsProvidersResponse, PostUsersData, PostUsersError, PostUsersResponse, PutBotsByBotIdBlacklistData, PutBotsByBotIdBlacklistError, PutBotsByBotIdBlacklistResponse, PutBotsByBotIdEmailBindingsByIdData, PutBotsByBotIdEmailBindingsByIdError, PutBotsByBotIdEmailBindingsByIdResponse, PutBotsByBotIdMcpByIdData, PutBotsByBotIdMcpByIdError, PutBotsByBotIdMcpByIdResponse, PutBotsByBotIdMcpImportData, PutBotsByBotIdMcpImportError, PutBotsByBotIdMcpImportResponse, PutBotsByBotIdScheduleByIdData, PutBotsByBotIdScheduleByIdError, PutBotsByBotIdScheduleByIdResponse, PutBotsByBotIdSettingsData, PutBotsByBotIdSettingsError, PutBotsByBotIdSettingsResponse, PutBotsByBotIdSubagentsByIdContextData, PutBotsByBotIdSubagentsByIdContextError, PutBotsByBotIdSubagentsByIdContextResponse, PutBotsByBotIdSubagentsByIdData, PutBotsByBotIdSubagentsByIdError, PutBotsByBotIdSubagentsByIdResponse, PutBotsByBotIdSubagentsByIdSkillsData, PutBotsByBotIdSubagentsByIdSkillsError, PutBotsByBotIdSubagentsByIdSkillsResponse, PutBotsByBotIdWhitelistData, PutBotsByBotIdWhitelistError, PutBotsByBotIdWhitelistResponse, PutBotsByIdChannelByPlatformData, PutBotsByIdChannelByPlatformError, PutBotsByIdChannelByPlatformResponse, PutBotsByIdData, PutBotsByIdError, PutBotsByIdOwnerData, PutBotsByIdOwnerError, PutBotsByIdOwnerResponse, PutBotsByIdResponse, PutBrowserContextsByIdData, PutBrowserContextsByIdError, PutBrowserContextsByIdResponse, PutEmailProvidersByIdData, PutEmailProvidersByIdError, PutEmailProvidersByIdResponse, PutMemoryProvidersByIdData, PutMemoryProvidersByIdError, PutMemoryProvidersByIdResponse, PutModelsByIdData, PutModelsByIdError, PutModelsByIdResponse, PutModelsModelByModelIdData, PutModelsModelByModelIdError, PutModelsModelByModelIdResponse, PutProvidersByIdData, PutProvidersByIdError, PutProvidersByIdResponse, PutSearchProvidersByIdData, PutSearchProvidersByIdError, PutSearchProvidersByIdResponse, PutTtsModelsByIdData, PutTtsModelsByIdError, PutTtsModelsByIdResponse, PutTtsProvidersByIdData, PutTtsProvidersByIdError, PutTtsProvidersByIdResponse, PutUsersByIdData, PutUsersByIdError, PutUsersByIdPasswordData, PutUsersByIdPasswordError, PutUsersByIdResponse, PutUsersMeChannelsByPlatformData, PutUsersMeChannelsByPlatformError, PutUsersMeChannelsByPlatformResponse, PutUsersMeData, PutUsersMeError, PutUsersMePasswordData, PutUsersMePasswordError, PutUsersMeResponse } from '../types.gen'; /** * Login @@ -252,6 +252,41 @@ export const getBotsByBotIdCliWsQuery = defineQueryOptions((options: Options>): UseMutationOptions, DeleteBotsByBotIdCompactionLogsError> => ({ + mutation: async (vars) => { + const { data } = await deleteBotsByBotIdCompactionLogs({ + ...options, + ...vars, + throwOnError: true + }); + return data; + } +}); + +export const getBotsByBotIdCompactionLogsQueryKey = (options: Options) => createQueryKey('getBotsByBotIdCompactionLogs', options); + +/** + * List compaction logs + * + * List context compaction logs for a bot + */ +export const getBotsByBotIdCompactionLogsQuery = defineQueryOptions((options: Options) => ({ + key: getBotsByBotIdCompactionLogsQueryKey(options), + query: async (context) => { + const { data } = await getBotsByBotIdCompactionLogs({ + ...options, + ...context, + throwOnError: true + }); + return data; + } +})); + /** * Delete MCP container for bot */ diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index 47d003ba..8c6cefa8 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -1,4 +1,4 @@ // This file is auto-generated by @hey-api/openapi-ts -export { deleteBotsByBotIdBlacklistByRuleId, deleteBotsByBotIdContainer, deleteBotsByBotIdContainerSkills, deleteBotsByBotIdEmailBindingsById, deleteBotsByBotIdHeartbeatLogs, deleteBotsByBotIdMcpById, deleteBotsByBotIdMcpByIdOauthToken, deleteBotsByBotIdMemory, deleteBotsByBotIdMemoryById, deleteBotsByBotIdMessages, deleteBotsByBotIdScheduleById, deleteBotsByBotIdScheduleLogs, deleteBotsByBotIdSessionsBySessionId, deleteBotsByBotIdSettings, deleteBotsByBotIdSubagentsById, deleteBotsByBotIdWhitelistByRuleId, deleteBotsById, deleteBotsByIdChannelByPlatform, deleteBrowserContextsById, deleteEmailProvidersById, deleteEmailProvidersByIdOauthToken, deleteMemoryProvidersById, deleteModelsById, deleteModelsModelByModelId, deleteProvidersById, deleteSearchProvidersById, deleteTtsModelsById, deleteTtsProvidersById, getBots, getBotsByBotIdAccessChannelIdentities, getBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversations, getBotsByBotIdAccessUsers, getBotsByBotIdBlacklist, getBotsByBotIdCliStream, getBotsByBotIdCliWs, getBotsByBotIdContainer, getBotsByBotIdContainerFs, getBotsByBotIdContainerFsDownload, getBotsByBotIdContainerFsList, getBotsByBotIdContainerFsRead, getBotsByBotIdContainerSkills, getBotsByBotIdContainerSnapshots, getBotsByBotIdContainerTerminal, getBotsByBotIdContainerTerminalWs, getBotsByBotIdEmailBindings, getBotsByBotIdEmailOutbox, getBotsByBotIdEmailOutboxById, getBotsByBotIdHeartbeatLogs, getBotsByBotIdMcp, getBotsByBotIdMcpById, getBotsByBotIdMcpByIdOauthStatus, getBotsByBotIdMcpExport, getBotsByBotIdMemory, getBotsByBotIdMemoryStatus, getBotsByBotIdMemoryUsage, getBotsByBotIdMessages, getBotsByBotIdSchedule, getBotsByBotIdScheduleById, getBotsByBotIdScheduleByIdLogs, getBotsByBotIdScheduleLogs, getBotsByBotIdSessions, getBotsByBotIdSessionsBySessionId, getBotsByBotIdSettings, getBotsByBotIdSubagents, getBotsByBotIdSubagentsById, getBotsByBotIdSubagentsByIdContext, getBotsByBotIdSubagentsByIdSkills, getBotsByBotIdTokenUsage, getBotsByBotIdWebStream, getBotsByBotIdWebWs, getBotsByBotIdWhitelist, getBotsById, getBotsByIdChannelByPlatform, getBotsByIdChecks, getBrowserContexts, getBrowserContextsById, getBrowserContextsCores, getChannels, getChannelsByPlatform, getEmailOauthCallback, getEmailProviders, getEmailProvidersById, getEmailProvidersByIdOauthAuthorize, getEmailProvidersByIdOauthStatus, getEmailProvidersMeta, getMemoryProviders, getMemoryProvidersById, getMemoryProvidersByIdStatus, getMemoryProvidersMeta, getModels, getModelsById, getModelsCount, getModelsModelByModelId, getPing, getProviders, getProvidersById, getProvidersByIdModels, getProvidersCount, getProvidersNameByName, getSearchProviders, getSearchProvidersById, getSearchProvidersMeta, getTtsModels, getTtsModelsById, getTtsModelsByIdCapabilities, getTtsProviders, getTtsProvidersById, getTtsProvidersByIdModels, getTtsProvidersMeta, getUsers, getUsersById, getUsersMe, getUsersMeChannelsByPlatform, getUsersMeIdentities, type Options, patchBotsByBotIdSessionsBySessionId, patchBotsByIdChannelByPlatformStatus, postAuthLogin, postAuthRefresh, postBots, postBotsByBotIdCliMessages, postBotsByBotIdContainer, postBotsByBotIdContainerDataExport, postBotsByBotIdContainerDataImport, postBotsByBotIdContainerDataRestore, postBotsByBotIdContainerFsDelete, postBotsByBotIdContainerFsMkdir, postBotsByBotIdContainerFsRename, postBotsByBotIdContainerFsUpload, postBotsByBotIdContainerFsWrite, postBotsByBotIdContainerSkills, postBotsByBotIdContainerSnapshots, postBotsByBotIdContainerSnapshotsRollback, postBotsByBotIdContainerStart, postBotsByBotIdContainerStop, postBotsByBotIdEmailBindings, postBotsByBotIdMcp, postBotsByBotIdMcpByIdOauthAuthorize, postBotsByBotIdMcpByIdOauthDiscover, postBotsByBotIdMcpByIdOauthExchange, postBotsByBotIdMcpByIdProbe, postBotsByBotIdMcpOpsBatchDelete, postBotsByBotIdMcpStdio, postBotsByBotIdMcpStdioByConnectionId, postBotsByBotIdMemory, postBotsByBotIdMemoryCompact, postBotsByBotIdMemoryRebuild, postBotsByBotIdMemorySearch, postBotsByBotIdSchedule, postBotsByBotIdSessions, postBotsByBotIdSettings, postBotsByBotIdSubagents, postBotsByBotIdSubagentsByIdSkills, postBotsByBotIdTools, postBotsByBotIdTtsSynthesize, postBotsByBotIdWebMessages, postBotsByIdChannelByPlatformSend, postBotsByIdChannelByPlatformSendChat, postBrowserContexts, postEmailMailgunWebhookByConfigId, postEmailProviders, postMemoryProviders, postModels, postModelsByIdTest, postProviders, postProvidersByIdImportModels, postProvidersByIdTest, postSearchProviders, postTtsModels, postTtsModelsByIdTest, postTtsProviders, postTtsProvidersByIdImportModels, postUsers, putBotsByBotIdBlacklist, putBotsByBotIdEmailBindingsById, putBotsByBotIdMcpById, putBotsByBotIdMcpImport, putBotsByBotIdScheduleById, putBotsByBotIdSettings, putBotsByBotIdSubagentsById, putBotsByBotIdSubagentsByIdContext, putBotsByBotIdSubagentsByIdSkills, putBotsByBotIdWhitelist, putBotsById, putBotsByIdChannelByPlatform, putBotsByIdOwner, putBrowserContextsById, putEmailProvidersById, putMemoryProvidersById, putModelsById, putModelsModelByModelId, putProvidersById, putSearchProvidersById, putTtsModelsById, putTtsProvidersById, putUsersById, putUsersByIdPassword, putUsersMe, putUsersMeChannelsByPlatform, putUsersMePassword } from './sdk.gen'; -export type { AccountsAccount, AccountsCreateAccountRequest, AccountsListAccountsResponse, AccountsResetPasswordRequest, AccountsUpdateAccountRequest, AccountsUpdatePasswordRequest, AccountsUpdateProfileRequest, AclChannelIdentityCandidate, AclChannelIdentityCandidateListResponse, AclListRulesResponse, AclObservedConversationCandidate, AclObservedConversationCandidateListResponse, AclRule, AclSourceScope, AclUpsertRuleRequest, AclUserCandidate, AclUserCandidateListResponse, AdaptersCdfPoint, AdaptersCompactResult, AdaptersDeleteResponse, AdaptersHealthStatus, AdaptersMemoryItem, AdaptersMemoryStatusResponse, AdaptersMessage, AdaptersProviderCollectionStatus, AdaptersProviderConfigSchema, AdaptersProviderCreateRequest, AdaptersProviderFieldSchema, AdaptersProviderGetResponse, AdaptersProviderMeta, AdaptersProviderStatusResponse, AdaptersProviderType, AdaptersProviderUpdateRequest, AdaptersRebuildResult, AdaptersSearchResponse, AdaptersTopKBucket, AdaptersUsageResponse, BotsBot, BotsBotCheck, BotsCreateBotRequest, BotsListBotsResponse, BotsListChecksResponse, BotsTransferBotRequest, BotsUpdateBotRequest, BrowsercontextsBrowserContext, BrowsercontextsCreateRequest, BrowsercontextsUpdateRequest, ChannelAction, ChannelAttachment, ChannelAttachmentType, ChannelChannelCapabilities, ChannelChannelConfig, ChannelChannelIdentityBinding, ChannelConfigSchema, ChannelFieldSchema, ChannelFieldType, ChannelMessage, ChannelMessageFormat, ChannelMessagePart, ChannelMessagePartType, ChannelMessageTextStyle, ChannelReplyRef, ChannelSendRequest, ChannelTargetHint, ChannelTargetSpec, ChannelThreadRef, ChannelUpdateChannelStatusRequest, ChannelUpsertChannelIdentityConfigRequest, ChannelUpsertConfigRequest, ClientOptions, DeleteBotsByBotIdBlacklistByRuleIdData, DeleteBotsByBotIdBlacklistByRuleIdError, DeleteBotsByBotIdBlacklistByRuleIdErrors, DeleteBotsByBotIdBlacklistByRuleIdResponses, DeleteBotsByBotIdContainerData, DeleteBotsByBotIdContainerError, DeleteBotsByBotIdContainerErrors, DeleteBotsByBotIdContainerResponses, DeleteBotsByBotIdContainerSkillsData, DeleteBotsByBotIdContainerSkillsError, DeleteBotsByBotIdContainerSkillsErrors, DeleteBotsByBotIdContainerSkillsResponse, DeleteBotsByBotIdContainerSkillsResponses, DeleteBotsByBotIdEmailBindingsByIdData, DeleteBotsByBotIdEmailBindingsByIdError, DeleteBotsByBotIdEmailBindingsByIdErrors, DeleteBotsByBotIdEmailBindingsByIdResponses, DeleteBotsByBotIdHeartbeatLogsData, DeleteBotsByBotIdHeartbeatLogsError, DeleteBotsByBotIdHeartbeatLogsErrors, DeleteBotsByBotIdHeartbeatLogsResponses, DeleteBotsByBotIdMcpByIdData, DeleteBotsByBotIdMcpByIdError, DeleteBotsByBotIdMcpByIdErrors, DeleteBotsByBotIdMcpByIdOauthTokenData, DeleteBotsByBotIdMcpByIdOauthTokenError, DeleteBotsByBotIdMcpByIdOauthTokenErrors, DeleteBotsByBotIdMcpByIdOauthTokenResponses, DeleteBotsByBotIdMcpByIdResponses, DeleteBotsByBotIdMemoryByIdData, DeleteBotsByBotIdMemoryByIdError, DeleteBotsByBotIdMemoryByIdErrors, DeleteBotsByBotIdMemoryByIdResponse, DeleteBotsByBotIdMemoryByIdResponses, DeleteBotsByBotIdMemoryData, DeleteBotsByBotIdMemoryError, DeleteBotsByBotIdMemoryErrors, DeleteBotsByBotIdMemoryResponse, DeleteBotsByBotIdMemoryResponses, DeleteBotsByBotIdMessagesData, DeleteBotsByBotIdMessagesError, DeleteBotsByBotIdMessagesErrors, DeleteBotsByBotIdMessagesResponses, DeleteBotsByBotIdScheduleByIdData, DeleteBotsByBotIdScheduleByIdError, DeleteBotsByBotIdScheduleByIdErrors, DeleteBotsByBotIdScheduleByIdResponses, DeleteBotsByBotIdScheduleLogsData, DeleteBotsByBotIdScheduleLogsError, DeleteBotsByBotIdScheduleLogsErrors, DeleteBotsByBotIdScheduleLogsResponses, DeleteBotsByBotIdSessionsBySessionIdData, DeleteBotsByBotIdSessionsBySessionIdError, DeleteBotsByBotIdSessionsBySessionIdErrors, DeleteBotsByBotIdSessionsBySessionIdResponses, DeleteBotsByBotIdSettingsData, DeleteBotsByBotIdSettingsError, DeleteBotsByBotIdSettingsErrors, DeleteBotsByBotIdSettingsResponses, DeleteBotsByBotIdSubagentsByIdData, DeleteBotsByBotIdSubagentsByIdError, DeleteBotsByBotIdSubagentsByIdErrors, DeleteBotsByBotIdSubagentsByIdResponses, DeleteBotsByBotIdWhitelistByRuleIdData, DeleteBotsByBotIdWhitelistByRuleIdError, DeleteBotsByBotIdWhitelistByRuleIdErrors, DeleteBotsByBotIdWhitelistByRuleIdResponses, DeleteBotsByIdChannelByPlatformData, DeleteBotsByIdChannelByPlatformError, DeleteBotsByIdChannelByPlatformErrors, DeleteBotsByIdChannelByPlatformResponses, DeleteBotsByIdData, DeleteBotsByIdError, DeleteBotsByIdErrors, DeleteBotsByIdResponse, DeleteBotsByIdResponses, DeleteBrowserContextsByIdData, DeleteBrowserContextsByIdError, DeleteBrowserContextsByIdErrors, DeleteBrowserContextsByIdResponses, DeleteEmailProvidersByIdData, DeleteEmailProvidersByIdError, DeleteEmailProvidersByIdErrors, DeleteEmailProvidersByIdOauthTokenData, DeleteEmailProvidersByIdOauthTokenError, DeleteEmailProvidersByIdOauthTokenErrors, DeleteEmailProvidersByIdOauthTokenResponses, DeleteEmailProvidersByIdResponses, DeleteMemoryProvidersByIdData, DeleteMemoryProvidersByIdError, DeleteMemoryProvidersByIdErrors, DeleteMemoryProvidersByIdResponses, DeleteModelsByIdData, DeleteModelsByIdError, DeleteModelsByIdErrors, DeleteModelsByIdResponses, DeleteModelsModelByModelIdData, DeleteModelsModelByModelIdError, DeleteModelsModelByModelIdErrors, DeleteModelsModelByModelIdResponses, DeleteProvidersByIdData, DeleteProvidersByIdError, DeleteProvidersByIdErrors, DeleteProvidersByIdResponses, DeleteSearchProvidersByIdData, DeleteSearchProvidersByIdError, DeleteSearchProvidersByIdErrors, DeleteSearchProvidersByIdResponses, DeleteTtsModelsByIdData, DeleteTtsModelsByIdError, DeleteTtsModelsByIdErrors, DeleteTtsModelsByIdResponses, DeleteTtsProvidersByIdData, DeleteTtsProvidersByIdError, DeleteTtsProvidersByIdErrors, DeleteTtsProvidersByIdResponses, EmailBindingResponse, EmailConfigSchema, EmailCreateBindingRequest, EmailCreateProviderRequest, EmailFieldSchema, EmailOutboxItemResponse, EmailProviderMeta, EmailProviderResponse, EmailUpdateBindingRequest, EmailUpdateProviderRequest, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsData, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsError, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsErrors, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsResponse, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsResponses, GetBotsByBotIdAccessChannelIdentitiesData, GetBotsByBotIdAccessChannelIdentitiesError, GetBotsByBotIdAccessChannelIdentitiesErrors, GetBotsByBotIdAccessChannelIdentitiesResponse, GetBotsByBotIdAccessChannelIdentitiesResponses, GetBotsByBotIdAccessUsersData, GetBotsByBotIdAccessUsersError, GetBotsByBotIdAccessUsersErrors, GetBotsByBotIdAccessUsersResponse, GetBotsByBotIdAccessUsersResponses, GetBotsByBotIdBlacklistData, GetBotsByBotIdBlacklistError, GetBotsByBotIdBlacklistErrors, GetBotsByBotIdBlacklistResponse, GetBotsByBotIdBlacklistResponses, GetBotsByBotIdCliStreamData, GetBotsByBotIdCliStreamError, GetBotsByBotIdCliStreamErrors, GetBotsByBotIdCliStreamResponse, GetBotsByBotIdCliStreamResponses, GetBotsByBotIdCliWsData, GetBotsByBotIdCliWsError, GetBotsByBotIdCliWsErrors, GetBotsByBotIdContainerData, GetBotsByBotIdContainerError, GetBotsByBotIdContainerErrors, GetBotsByBotIdContainerFsData, GetBotsByBotIdContainerFsDownloadData, GetBotsByBotIdContainerFsDownloadError, GetBotsByBotIdContainerFsDownloadErrors, GetBotsByBotIdContainerFsDownloadResponses, GetBotsByBotIdContainerFsError, GetBotsByBotIdContainerFsErrors, GetBotsByBotIdContainerFsListData, GetBotsByBotIdContainerFsListError, GetBotsByBotIdContainerFsListErrors, GetBotsByBotIdContainerFsListResponse, GetBotsByBotIdContainerFsListResponses, GetBotsByBotIdContainerFsReadData, GetBotsByBotIdContainerFsReadError, GetBotsByBotIdContainerFsReadErrors, GetBotsByBotIdContainerFsReadResponse, GetBotsByBotIdContainerFsReadResponses, GetBotsByBotIdContainerFsResponse, GetBotsByBotIdContainerFsResponses, GetBotsByBotIdContainerResponse, GetBotsByBotIdContainerResponses, GetBotsByBotIdContainerSkillsData, GetBotsByBotIdContainerSkillsError, GetBotsByBotIdContainerSkillsErrors, GetBotsByBotIdContainerSkillsResponse, GetBotsByBotIdContainerSkillsResponses, GetBotsByBotIdContainerSnapshotsData, GetBotsByBotIdContainerSnapshotsError, GetBotsByBotIdContainerSnapshotsErrors, GetBotsByBotIdContainerSnapshotsResponse, GetBotsByBotIdContainerSnapshotsResponses, GetBotsByBotIdContainerTerminalData, GetBotsByBotIdContainerTerminalError, GetBotsByBotIdContainerTerminalErrors, GetBotsByBotIdContainerTerminalResponse, GetBotsByBotIdContainerTerminalResponses, GetBotsByBotIdContainerTerminalWsData, GetBotsByBotIdContainerTerminalWsError, GetBotsByBotIdContainerTerminalWsErrors, GetBotsByBotIdEmailBindingsData, GetBotsByBotIdEmailBindingsError, GetBotsByBotIdEmailBindingsErrors, GetBotsByBotIdEmailBindingsResponse, GetBotsByBotIdEmailBindingsResponses, GetBotsByBotIdEmailOutboxByIdData, GetBotsByBotIdEmailOutboxByIdError, GetBotsByBotIdEmailOutboxByIdErrors, GetBotsByBotIdEmailOutboxByIdResponse, GetBotsByBotIdEmailOutboxByIdResponses, GetBotsByBotIdEmailOutboxData, GetBotsByBotIdEmailOutboxError, GetBotsByBotIdEmailOutboxErrors, GetBotsByBotIdEmailOutboxResponse, GetBotsByBotIdEmailOutboxResponses, GetBotsByBotIdHeartbeatLogsData, GetBotsByBotIdHeartbeatLogsError, GetBotsByBotIdHeartbeatLogsErrors, GetBotsByBotIdHeartbeatLogsResponse, GetBotsByBotIdHeartbeatLogsResponses, GetBotsByBotIdMcpByIdData, GetBotsByBotIdMcpByIdError, GetBotsByBotIdMcpByIdErrors, GetBotsByBotIdMcpByIdOauthStatusData, GetBotsByBotIdMcpByIdOauthStatusError, GetBotsByBotIdMcpByIdOauthStatusErrors, GetBotsByBotIdMcpByIdOauthStatusResponse, GetBotsByBotIdMcpByIdOauthStatusResponses, GetBotsByBotIdMcpByIdResponse, GetBotsByBotIdMcpByIdResponses, GetBotsByBotIdMcpData, GetBotsByBotIdMcpError, GetBotsByBotIdMcpErrors, GetBotsByBotIdMcpExportData, GetBotsByBotIdMcpExportError, GetBotsByBotIdMcpExportErrors, GetBotsByBotIdMcpExportResponse, GetBotsByBotIdMcpExportResponses, GetBotsByBotIdMcpResponse, GetBotsByBotIdMcpResponses, GetBotsByBotIdMemoryData, GetBotsByBotIdMemoryError, GetBotsByBotIdMemoryErrors, GetBotsByBotIdMemoryResponse, GetBotsByBotIdMemoryResponses, GetBotsByBotIdMemoryStatusData, GetBotsByBotIdMemoryStatusError, GetBotsByBotIdMemoryStatusErrors, GetBotsByBotIdMemoryStatusResponse, GetBotsByBotIdMemoryStatusResponses, GetBotsByBotIdMemoryUsageData, GetBotsByBotIdMemoryUsageError, GetBotsByBotIdMemoryUsageErrors, GetBotsByBotIdMemoryUsageResponse, GetBotsByBotIdMemoryUsageResponses, GetBotsByBotIdMessagesData, GetBotsByBotIdMessagesError, GetBotsByBotIdMessagesErrors, GetBotsByBotIdMessagesResponse, GetBotsByBotIdMessagesResponses, GetBotsByBotIdScheduleByIdData, GetBotsByBotIdScheduleByIdError, GetBotsByBotIdScheduleByIdErrors, GetBotsByBotIdScheduleByIdLogsData, GetBotsByBotIdScheduleByIdLogsError, GetBotsByBotIdScheduleByIdLogsErrors, GetBotsByBotIdScheduleByIdLogsResponse, GetBotsByBotIdScheduleByIdLogsResponses, GetBotsByBotIdScheduleByIdResponse, GetBotsByBotIdScheduleByIdResponses, GetBotsByBotIdScheduleData, GetBotsByBotIdScheduleError, GetBotsByBotIdScheduleErrors, GetBotsByBotIdScheduleLogsData, GetBotsByBotIdScheduleLogsError, GetBotsByBotIdScheduleLogsErrors, GetBotsByBotIdScheduleLogsResponse, GetBotsByBotIdScheduleLogsResponses, GetBotsByBotIdScheduleResponse, GetBotsByBotIdScheduleResponses, GetBotsByBotIdSessionsBySessionIdData, GetBotsByBotIdSessionsBySessionIdError, GetBotsByBotIdSessionsBySessionIdErrors, GetBotsByBotIdSessionsBySessionIdResponse, GetBotsByBotIdSessionsBySessionIdResponses, GetBotsByBotIdSessionsData, GetBotsByBotIdSessionsError, GetBotsByBotIdSessionsErrors, GetBotsByBotIdSessionsResponse, GetBotsByBotIdSessionsResponses, GetBotsByBotIdSettingsData, GetBotsByBotIdSettingsError, GetBotsByBotIdSettingsErrors, GetBotsByBotIdSettingsResponse, GetBotsByBotIdSettingsResponses, GetBotsByBotIdSubagentsByIdContextData, GetBotsByBotIdSubagentsByIdContextError, GetBotsByBotIdSubagentsByIdContextErrors, GetBotsByBotIdSubagentsByIdContextResponse, GetBotsByBotIdSubagentsByIdContextResponses, GetBotsByBotIdSubagentsByIdData, GetBotsByBotIdSubagentsByIdError, GetBotsByBotIdSubagentsByIdErrors, GetBotsByBotIdSubagentsByIdResponse, GetBotsByBotIdSubagentsByIdResponses, GetBotsByBotIdSubagentsByIdSkillsData, GetBotsByBotIdSubagentsByIdSkillsError, GetBotsByBotIdSubagentsByIdSkillsErrors, GetBotsByBotIdSubagentsByIdSkillsResponse, GetBotsByBotIdSubagentsByIdSkillsResponses, GetBotsByBotIdSubagentsData, GetBotsByBotIdSubagentsError, GetBotsByBotIdSubagentsErrors, GetBotsByBotIdSubagentsResponse, GetBotsByBotIdSubagentsResponses, GetBotsByBotIdTokenUsageData, GetBotsByBotIdTokenUsageError, GetBotsByBotIdTokenUsageErrors, GetBotsByBotIdTokenUsageResponse, GetBotsByBotIdTokenUsageResponses, GetBotsByBotIdWebStreamData, GetBotsByBotIdWebStreamError, GetBotsByBotIdWebStreamErrors, GetBotsByBotIdWebStreamResponse, GetBotsByBotIdWebStreamResponses, GetBotsByBotIdWebWsData, GetBotsByBotIdWebWsError, GetBotsByBotIdWebWsErrors, GetBotsByBotIdWhitelistData, GetBotsByBotIdWhitelistError, GetBotsByBotIdWhitelistErrors, GetBotsByBotIdWhitelistResponse, GetBotsByBotIdWhitelistResponses, GetBotsByIdChannelByPlatformData, GetBotsByIdChannelByPlatformError, GetBotsByIdChannelByPlatformErrors, GetBotsByIdChannelByPlatformResponse, GetBotsByIdChannelByPlatformResponses, GetBotsByIdChecksData, GetBotsByIdChecksError, GetBotsByIdChecksErrors, GetBotsByIdChecksResponse, GetBotsByIdChecksResponses, GetBotsByIdData, GetBotsByIdError, GetBotsByIdErrors, GetBotsByIdResponse, GetBotsByIdResponses, GetBotsData, GetBotsError, GetBotsErrors, GetBotsResponse, GetBotsResponses, GetBrowserContextsByIdData, GetBrowserContextsByIdError, GetBrowserContextsByIdErrors, GetBrowserContextsByIdResponse, GetBrowserContextsByIdResponses, GetBrowserContextsCoresData, GetBrowserContextsCoresError, GetBrowserContextsCoresErrors, GetBrowserContextsCoresResponse, GetBrowserContextsCoresResponses, GetBrowserContextsData, GetBrowserContextsError, GetBrowserContextsErrors, GetBrowserContextsResponse, GetBrowserContextsResponses, GetChannelsByPlatformData, GetChannelsByPlatformError, GetChannelsByPlatformErrors, GetChannelsByPlatformResponse, GetChannelsByPlatformResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetEmailOauthCallbackData, GetEmailOauthCallbackError, GetEmailOauthCallbackErrors, GetEmailOauthCallbackResponse, GetEmailOauthCallbackResponses, GetEmailProvidersByIdData, GetEmailProvidersByIdError, GetEmailProvidersByIdErrors, GetEmailProvidersByIdOauthAuthorizeData, GetEmailProvidersByIdOauthAuthorizeError, GetEmailProvidersByIdOauthAuthorizeErrors, GetEmailProvidersByIdOauthAuthorizeResponse, GetEmailProvidersByIdOauthAuthorizeResponses, GetEmailProvidersByIdOauthStatusData, GetEmailProvidersByIdOauthStatusError, GetEmailProvidersByIdOauthStatusErrors, GetEmailProvidersByIdOauthStatusResponse, GetEmailProvidersByIdOauthStatusResponses, GetEmailProvidersByIdResponse, GetEmailProvidersByIdResponses, GetEmailProvidersData, GetEmailProvidersError, GetEmailProvidersErrors, GetEmailProvidersMetaData, GetEmailProvidersMetaResponse, GetEmailProvidersMetaResponses, GetEmailProvidersResponse, GetEmailProvidersResponses, GetMemoryProvidersByIdData, GetMemoryProvidersByIdError, GetMemoryProvidersByIdErrors, GetMemoryProvidersByIdResponse, GetMemoryProvidersByIdResponses, GetMemoryProvidersByIdStatusData, GetMemoryProvidersByIdStatusError, GetMemoryProvidersByIdStatusErrors, GetMemoryProvidersByIdStatusResponse, GetMemoryProvidersByIdStatusResponses, GetMemoryProvidersData, GetMemoryProvidersError, GetMemoryProvidersErrors, GetMemoryProvidersMetaData, GetMemoryProvidersMetaResponse, GetMemoryProvidersMetaResponses, GetMemoryProvidersResponse, GetMemoryProvidersResponses, GetModelsByIdData, GetModelsByIdError, GetModelsByIdErrors, GetModelsByIdResponse, GetModelsByIdResponses, GetModelsCountData, GetModelsCountError, GetModelsCountErrors, GetModelsCountResponse, GetModelsCountResponses, GetModelsData, GetModelsError, GetModelsErrors, GetModelsModelByModelIdData, GetModelsModelByModelIdError, GetModelsModelByModelIdErrors, GetModelsModelByModelIdResponse, GetModelsModelByModelIdResponses, GetModelsResponse, GetModelsResponses, GetPingData, GetPingResponse, GetPingResponses, GetProvidersByIdData, GetProvidersByIdError, GetProvidersByIdErrors, GetProvidersByIdModelsData, GetProvidersByIdModelsError, GetProvidersByIdModelsErrors, GetProvidersByIdModelsResponse, GetProvidersByIdModelsResponses, GetProvidersByIdResponse, GetProvidersByIdResponses, GetProvidersCountData, GetProvidersCountError, GetProvidersCountErrors, GetProvidersCountResponse, GetProvidersCountResponses, GetProvidersData, GetProvidersError, GetProvidersErrors, GetProvidersNameByNameData, GetProvidersNameByNameError, GetProvidersNameByNameErrors, GetProvidersNameByNameResponse, GetProvidersNameByNameResponses, GetProvidersResponse, GetProvidersResponses, GetSearchProvidersByIdData, GetSearchProvidersByIdError, GetSearchProvidersByIdErrors, GetSearchProvidersByIdResponse, GetSearchProvidersByIdResponses, GetSearchProvidersData, GetSearchProvidersError, GetSearchProvidersErrors, GetSearchProvidersMetaData, GetSearchProvidersMetaResponse, GetSearchProvidersMetaResponses, GetSearchProvidersResponse, GetSearchProvidersResponses, GetTtsModelsByIdCapabilitiesData, GetTtsModelsByIdCapabilitiesError, GetTtsModelsByIdCapabilitiesErrors, GetTtsModelsByIdCapabilitiesResponse, GetTtsModelsByIdCapabilitiesResponses, GetTtsModelsByIdData, GetTtsModelsByIdError, GetTtsModelsByIdErrors, GetTtsModelsByIdResponse, GetTtsModelsByIdResponses, GetTtsModelsData, GetTtsModelsError, GetTtsModelsErrors, GetTtsModelsResponse, GetTtsModelsResponses, GetTtsProvidersByIdData, GetTtsProvidersByIdError, GetTtsProvidersByIdErrors, GetTtsProvidersByIdModelsData, GetTtsProvidersByIdModelsError, GetTtsProvidersByIdModelsErrors, GetTtsProvidersByIdModelsResponse, GetTtsProvidersByIdModelsResponses, GetTtsProvidersByIdResponse, GetTtsProvidersByIdResponses, GetTtsProvidersData, GetTtsProvidersError, GetTtsProvidersErrors, GetTtsProvidersMetaData, GetTtsProvidersMetaResponse, GetTtsProvidersMetaResponses, GetTtsProvidersResponse, GetTtsProvidersResponses, GetUsersByIdData, GetUsersByIdError, GetUsersByIdErrors, GetUsersByIdResponse, GetUsersByIdResponses, GetUsersData, GetUsersError, GetUsersErrors, GetUsersMeChannelsByPlatformData, GetUsersMeChannelsByPlatformError, GetUsersMeChannelsByPlatformErrors, GetUsersMeChannelsByPlatformResponse, GetUsersMeChannelsByPlatformResponses, GetUsersMeData, GetUsersMeError, GetUsersMeErrors, GetUsersMeIdentitiesData, GetUsersMeIdentitiesError, GetUsersMeIdentitiesErrors, GetUsersMeIdentitiesResponse, GetUsersMeIdentitiesResponses, GetUsersMeResponse, GetUsersMeResponses, GetUsersResponse, GetUsersResponses, GithubComMemohaiMemohInternalMcpConnection, HandlersBatchDeleteRequest, HandlersBrowserCoresResponse, HandlersChannelMeta, HandlersCreateContainerRequest, HandlersCreateContainerResponse, HandlersCreateSessionRequest, HandlersCreateSnapshotRequest, HandlersCreateSnapshotResponse, HandlersDailyTokenUsage, HandlersEmailOAuthStatusResponse, HandlersErrorResponse, HandlersFsDeleteRequest, HandlersFsFileInfo, HandlersFsListResponse, HandlersFsMkdirRequest, HandlersFsOpResponse, HandlersFsReadResponse, HandlersFsRenameRequest, HandlersFsUploadResponse, HandlersFsWriteRequest, HandlersGetContainerResponse, HandlersListMyIdentitiesResponse, HandlersListSnapshotsResponse, HandlersLocalChannelMessageRequest, HandlersLoginRequest, HandlersLoginResponse, HandlersMcpStdioRequest, HandlersMcpStdioResponse, HandlersMemoryAddPayload, HandlersMemoryCompactPayload, HandlersMemoryDeletePayload, HandlersMemorySearchPayload, HandlersModelTokenUsage, HandlersOauthAuthorizeRequest, HandlersOauthDiscoverRequest, HandlersOauthExchangeRequest, HandlersPingResponse, HandlersProbeResponse, HandlersRefreshResponse, HandlersRollbackRequest, HandlersSkillItem, HandlersSkillsDeleteRequest, HandlersSkillsOpResponse, HandlersSkillsResponse, HandlersSkillsUpsertRequest, HandlersSnapshotInfo, HandlersSynthesizeRequest, HandlersSynthesizeResponse, HandlersTerminalInfoResponse, HandlersTokenUsageResponse, HandlersUpdateSessionRequest, HeartbeatListLogsResponse, HeartbeatLog, IdentitiesChannelIdentity, McpAuthorizeResult, McpDiscoveryResult, McpExportResponse, McpImportRequest, McpListResponse, McpMcpServerEntry, McpOAuthStatus, McpToolDescriptor, McpUpsertRequest, MessageMessage, MessageMessageAsset, ModelsAddRequest, ModelsAddResponse, ModelsClientType, ModelsCountResponse, ModelsGetResponse, ModelsModelType, ModelsTestResponse, ModelsTestStatus, ModelsUpdateRequest, PatchBotsByBotIdSessionsBySessionIdData, PatchBotsByBotIdSessionsBySessionIdError, PatchBotsByBotIdSessionsBySessionIdErrors, PatchBotsByBotIdSessionsBySessionIdResponse, PatchBotsByBotIdSessionsBySessionIdResponses, PatchBotsByIdChannelByPlatformStatusData, PatchBotsByIdChannelByPlatformStatusError, PatchBotsByIdChannelByPlatformStatusErrors, PatchBotsByIdChannelByPlatformStatusResponse, PatchBotsByIdChannelByPlatformStatusResponses, PostAuthLoginData, PostAuthLoginError, PostAuthLoginErrors, PostAuthLoginResponse, PostAuthLoginResponses, PostAuthRefreshData, PostAuthRefreshError, PostAuthRefreshErrors, PostAuthRefreshResponse, PostAuthRefreshResponses, PostBotsByBotIdCliMessagesData, PostBotsByBotIdCliMessagesError, PostBotsByBotIdCliMessagesErrors, PostBotsByBotIdCliMessagesResponse, PostBotsByBotIdCliMessagesResponses, PostBotsByBotIdContainerData, PostBotsByBotIdContainerDataExportData, PostBotsByBotIdContainerDataExportError, PostBotsByBotIdContainerDataExportErrors, PostBotsByBotIdContainerDataExportResponses, PostBotsByBotIdContainerDataImportData, PostBotsByBotIdContainerDataImportError, PostBotsByBotIdContainerDataImportErrors, PostBotsByBotIdContainerDataImportResponse, PostBotsByBotIdContainerDataImportResponses, PostBotsByBotIdContainerDataRestoreData, PostBotsByBotIdContainerDataRestoreError, PostBotsByBotIdContainerDataRestoreErrors, PostBotsByBotIdContainerDataRestoreResponse, PostBotsByBotIdContainerDataRestoreResponses, PostBotsByBotIdContainerError, PostBotsByBotIdContainerErrors, PostBotsByBotIdContainerFsDeleteData, PostBotsByBotIdContainerFsDeleteError, PostBotsByBotIdContainerFsDeleteErrors, PostBotsByBotIdContainerFsDeleteResponse, PostBotsByBotIdContainerFsDeleteResponses, PostBotsByBotIdContainerFsMkdirData, PostBotsByBotIdContainerFsMkdirError, PostBotsByBotIdContainerFsMkdirErrors, PostBotsByBotIdContainerFsMkdirResponse, PostBotsByBotIdContainerFsMkdirResponses, PostBotsByBotIdContainerFsRenameData, PostBotsByBotIdContainerFsRenameError, PostBotsByBotIdContainerFsRenameErrors, PostBotsByBotIdContainerFsRenameResponse, PostBotsByBotIdContainerFsRenameResponses, PostBotsByBotIdContainerFsUploadData, PostBotsByBotIdContainerFsUploadError, PostBotsByBotIdContainerFsUploadErrors, PostBotsByBotIdContainerFsUploadResponse, PostBotsByBotIdContainerFsUploadResponses, PostBotsByBotIdContainerFsWriteData, PostBotsByBotIdContainerFsWriteError, PostBotsByBotIdContainerFsWriteErrors, PostBotsByBotIdContainerFsWriteResponse, PostBotsByBotIdContainerFsWriteResponses, PostBotsByBotIdContainerResponse, PostBotsByBotIdContainerResponses, PostBotsByBotIdContainerSkillsData, PostBotsByBotIdContainerSkillsError, PostBotsByBotIdContainerSkillsErrors, PostBotsByBotIdContainerSkillsResponse, PostBotsByBotIdContainerSkillsResponses, PostBotsByBotIdContainerSnapshotsData, PostBotsByBotIdContainerSnapshotsError, PostBotsByBotIdContainerSnapshotsErrors, PostBotsByBotIdContainerSnapshotsResponse, PostBotsByBotIdContainerSnapshotsResponses, PostBotsByBotIdContainerSnapshotsRollbackData, PostBotsByBotIdContainerSnapshotsRollbackError, PostBotsByBotIdContainerSnapshotsRollbackErrors, PostBotsByBotIdContainerSnapshotsRollbackResponse, PostBotsByBotIdContainerSnapshotsRollbackResponses, PostBotsByBotIdContainerStartData, PostBotsByBotIdContainerStartError, PostBotsByBotIdContainerStartErrors, PostBotsByBotIdContainerStartResponse, PostBotsByBotIdContainerStartResponses, PostBotsByBotIdContainerStopData, PostBotsByBotIdContainerStopError, PostBotsByBotIdContainerStopErrors, PostBotsByBotIdContainerStopResponse, PostBotsByBotIdContainerStopResponses, PostBotsByBotIdEmailBindingsData, PostBotsByBotIdEmailBindingsError, PostBotsByBotIdEmailBindingsErrors, PostBotsByBotIdEmailBindingsResponse, PostBotsByBotIdEmailBindingsResponses, PostBotsByBotIdMcpByIdOauthAuthorizeData, PostBotsByBotIdMcpByIdOauthAuthorizeError, PostBotsByBotIdMcpByIdOauthAuthorizeErrors, PostBotsByBotIdMcpByIdOauthAuthorizeResponse, PostBotsByBotIdMcpByIdOauthAuthorizeResponses, PostBotsByBotIdMcpByIdOauthDiscoverData, PostBotsByBotIdMcpByIdOauthDiscoverError, PostBotsByBotIdMcpByIdOauthDiscoverErrors, PostBotsByBotIdMcpByIdOauthDiscoverResponse, PostBotsByBotIdMcpByIdOauthDiscoverResponses, PostBotsByBotIdMcpByIdOauthExchangeData, PostBotsByBotIdMcpByIdOauthExchangeError, PostBotsByBotIdMcpByIdOauthExchangeErrors, PostBotsByBotIdMcpByIdOauthExchangeResponse, PostBotsByBotIdMcpByIdOauthExchangeResponses, PostBotsByBotIdMcpByIdProbeData, PostBotsByBotIdMcpByIdProbeError, PostBotsByBotIdMcpByIdProbeErrors, PostBotsByBotIdMcpByIdProbeResponse, PostBotsByBotIdMcpByIdProbeResponses, PostBotsByBotIdMcpData, PostBotsByBotIdMcpError, PostBotsByBotIdMcpErrors, PostBotsByBotIdMcpOpsBatchDeleteData, PostBotsByBotIdMcpOpsBatchDeleteError, PostBotsByBotIdMcpOpsBatchDeleteErrors, PostBotsByBotIdMcpOpsBatchDeleteResponses, PostBotsByBotIdMcpResponse, PostBotsByBotIdMcpResponses, PostBotsByBotIdMcpStdioByConnectionIdData, PostBotsByBotIdMcpStdioByConnectionIdError, PostBotsByBotIdMcpStdioByConnectionIdErrors, PostBotsByBotIdMcpStdioByConnectionIdResponse, PostBotsByBotIdMcpStdioByConnectionIdResponses, PostBotsByBotIdMcpStdioData, PostBotsByBotIdMcpStdioError, PostBotsByBotIdMcpStdioErrors, PostBotsByBotIdMcpStdioResponse, PostBotsByBotIdMcpStdioResponses, PostBotsByBotIdMemoryCompactData, PostBotsByBotIdMemoryCompactError, PostBotsByBotIdMemoryCompactErrors, PostBotsByBotIdMemoryCompactResponse, PostBotsByBotIdMemoryCompactResponses, PostBotsByBotIdMemoryData, PostBotsByBotIdMemoryError, PostBotsByBotIdMemoryErrors, PostBotsByBotIdMemoryRebuildData, PostBotsByBotIdMemoryRebuildError, PostBotsByBotIdMemoryRebuildErrors, PostBotsByBotIdMemoryRebuildResponse, PostBotsByBotIdMemoryRebuildResponses, PostBotsByBotIdMemoryResponse, PostBotsByBotIdMemoryResponses, PostBotsByBotIdMemorySearchData, PostBotsByBotIdMemorySearchError, PostBotsByBotIdMemorySearchErrors, PostBotsByBotIdMemorySearchResponse, PostBotsByBotIdMemorySearchResponses, PostBotsByBotIdScheduleData, PostBotsByBotIdScheduleError, PostBotsByBotIdScheduleErrors, PostBotsByBotIdScheduleResponse, PostBotsByBotIdScheduleResponses, PostBotsByBotIdSessionsData, PostBotsByBotIdSessionsError, PostBotsByBotIdSessionsErrors, PostBotsByBotIdSessionsResponse, PostBotsByBotIdSessionsResponses, PostBotsByBotIdSettingsData, PostBotsByBotIdSettingsError, PostBotsByBotIdSettingsErrors, PostBotsByBotIdSettingsResponse, PostBotsByBotIdSettingsResponses, PostBotsByBotIdSubagentsByIdSkillsData, PostBotsByBotIdSubagentsByIdSkillsError, PostBotsByBotIdSubagentsByIdSkillsErrors, PostBotsByBotIdSubagentsByIdSkillsResponse, PostBotsByBotIdSubagentsByIdSkillsResponses, PostBotsByBotIdSubagentsData, PostBotsByBotIdSubagentsError, PostBotsByBotIdSubagentsErrors, PostBotsByBotIdSubagentsResponse, PostBotsByBotIdSubagentsResponses, PostBotsByBotIdToolsData, PostBotsByBotIdToolsError, PostBotsByBotIdToolsErrors, PostBotsByBotIdToolsResponse, PostBotsByBotIdToolsResponses, PostBotsByBotIdTtsSynthesizeData, PostBotsByBotIdTtsSynthesizeError, PostBotsByBotIdTtsSynthesizeErrors, PostBotsByBotIdTtsSynthesizeResponse, PostBotsByBotIdTtsSynthesizeResponses, PostBotsByBotIdWebMessagesData, PostBotsByBotIdWebMessagesError, PostBotsByBotIdWebMessagesErrors, PostBotsByBotIdWebMessagesResponse, PostBotsByBotIdWebMessagesResponses, PostBotsByIdChannelByPlatformSendChatData, PostBotsByIdChannelByPlatformSendChatError, PostBotsByIdChannelByPlatformSendChatErrors, PostBotsByIdChannelByPlatformSendChatResponse, PostBotsByIdChannelByPlatformSendChatResponses, PostBotsByIdChannelByPlatformSendData, PostBotsByIdChannelByPlatformSendError, PostBotsByIdChannelByPlatformSendErrors, PostBotsByIdChannelByPlatformSendResponse, PostBotsByIdChannelByPlatformSendResponses, PostBotsData, PostBotsError, PostBotsErrors, PostBotsResponse, PostBotsResponses, PostBrowserContextsData, PostBrowserContextsError, PostBrowserContextsErrors, PostBrowserContextsResponse, PostBrowserContextsResponses, PostEmailMailgunWebhookByConfigIdData, PostEmailMailgunWebhookByConfigIdError, PostEmailMailgunWebhookByConfigIdErrors, PostEmailMailgunWebhookByConfigIdResponse, PostEmailMailgunWebhookByConfigIdResponses, PostEmailProvidersData, PostEmailProvidersError, PostEmailProvidersErrors, PostEmailProvidersResponse, PostEmailProvidersResponses, PostMemoryProvidersData, PostMemoryProvidersError, PostMemoryProvidersErrors, PostMemoryProvidersResponse, PostMemoryProvidersResponses, PostModelsByIdTestData, PostModelsByIdTestError, PostModelsByIdTestErrors, PostModelsByIdTestResponse, PostModelsByIdTestResponses, PostModelsData, PostModelsError, PostModelsErrors, PostModelsResponse, PostModelsResponses, PostProvidersByIdImportModelsData, PostProvidersByIdImportModelsError, PostProvidersByIdImportModelsErrors, PostProvidersByIdImportModelsResponse, PostProvidersByIdImportModelsResponses, PostProvidersByIdTestData, PostProvidersByIdTestError, PostProvidersByIdTestErrors, PostProvidersByIdTestResponse, PostProvidersByIdTestResponses, PostProvidersData, PostProvidersError, PostProvidersErrors, PostProvidersResponse, PostProvidersResponses, PostSearchProvidersData, PostSearchProvidersError, PostSearchProvidersErrors, PostSearchProvidersResponse, PostSearchProvidersResponses, PostTtsModelsByIdTestData, PostTtsModelsByIdTestError, PostTtsModelsByIdTestErrors, PostTtsModelsByIdTestResponses, PostTtsModelsData, PostTtsModelsError, PostTtsModelsErrors, PostTtsModelsResponse, PostTtsModelsResponses, PostTtsProvidersByIdImportModelsData, PostTtsProvidersByIdImportModelsError, PostTtsProvidersByIdImportModelsErrors, PostTtsProvidersByIdImportModelsResponse, PostTtsProvidersByIdImportModelsResponses, PostTtsProvidersData, PostTtsProvidersError, PostTtsProvidersErrors, PostTtsProvidersResponse, PostTtsProvidersResponses, PostUsersData, PostUsersError, PostUsersErrors, PostUsersResponse, PostUsersResponses, ProvidersCountResponse, ProvidersCreateRequest, ProvidersGetResponse, ProvidersImportModelsRequest, ProvidersImportModelsResponse, ProvidersTestResponse, ProvidersUpdateRequest, PutBotsByBotIdBlacklistData, PutBotsByBotIdBlacklistError, PutBotsByBotIdBlacklistErrors, PutBotsByBotIdBlacklistResponse, PutBotsByBotIdBlacklistResponses, PutBotsByBotIdEmailBindingsByIdData, PutBotsByBotIdEmailBindingsByIdError, PutBotsByBotIdEmailBindingsByIdErrors, PutBotsByBotIdEmailBindingsByIdResponse, PutBotsByBotIdEmailBindingsByIdResponses, PutBotsByBotIdMcpByIdData, PutBotsByBotIdMcpByIdError, PutBotsByBotIdMcpByIdErrors, PutBotsByBotIdMcpByIdResponse, PutBotsByBotIdMcpByIdResponses, PutBotsByBotIdMcpImportData, PutBotsByBotIdMcpImportError, PutBotsByBotIdMcpImportErrors, PutBotsByBotIdMcpImportResponse, PutBotsByBotIdMcpImportResponses, PutBotsByBotIdScheduleByIdData, PutBotsByBotIdScheduleByIdError, PutBotsByBotIdScheduleByIdErrors, PutBotsByBotIdScheduleByIdResponse, PutBotsByBotIdScheduleByIdResponses, PutBotsByBotIdSettingsData, PutBotsByBotIdSettingsError, PutBotsByBotIdSettingsErrors, PutBotsByBotIdSettingsResponse, PutBotsByBotIdSettingsResponses, PutBotsByBotIdSubagentsByIdContextData, PutBotsByBotIdSubagentsByIdContextError, PutBotsByBotIdSubagentsByIdContextErrors, PutBotsByBotIdSubagentsByIdContextResponse, PutBotsByBotIdSubagentsByIdContextResponses, PutBotsByBotIdSubagentsByIdData, PutBotsByBotIdSubagentsByIdError, PutBotsByBotIdSubagentsByIdErrors, PutBotsByBotIdSubagentsByIdResponse, PutBotsByBotIdSubagentsByIdResponses, PutBotsByBotIdSubagentsByIdSkillsData, PutBotsByBotIdSubagentsByIdSkillsError, PutBotsByBotIdSubagentsByIdSkillsErrors, PutBotsByBotIdSubagentsByIdSkillsResponse, PutBotsByBotIdSubagentsByIdSkillsResponses, PutBotsByBotIdWhitelistData, PutBotsByBotIdWhitelistError, PutBotsByBotIdWhitelistErrors, PutBotsByBotIdWhitelistResponse, PutBotsByBotIdWhitelistResponses, PutBotsByIdChannelByPlatformData, PutBotsByIdChannelByPlatformError, PutBotsByIdChannelByPlatformErrors, PutBotsByIdChannelByPlatformResponse, PutBotsByIdChannelByPlatformResponses, PutBotsByIdData, PutBotsByIdError, PutBotsByIdErrors, PutBotsByIdOwnerData, PutBotsByIdOwnerError, PutBotsByIdOwnerErrors, PutBotsByIdOwnerResponse, PutBotsByIdOwnerResponses, PutBotsByIdResponse, PutBotsByIdResponses, PutBrowserContextsByIdData, PutBrowserContextsByIdError, PutBrowserContextsByIdErrors, PutBrowserContextsByIdResponse, PutBrowserContextsByIdResponses, PutEmailProvidersByIdData, PutEmailProvidersByIdError, PutEmailProvidersByIdErrors, PutEmailProvidersByIdResponse, PutEmailProvidersByIdResponses, PutMemoryProvidersByIdData, PutMemoryProvidersByIdError, PutMemoryProvidersByIdErrors, PutMemoryProvidersByIdResponse, PutMemoryProvidersByIdResponses, PutModelsByIdData, PutModelsByIdError, PutModelsByIdErrors, PutModelsByIdResponse, PutModelsByIdResponses, PutModelsModelByModelIdData, PutModelsModelByModelIdError, PutModelsModelByModelIdErrors, PutModelsModelByModelIdResponse, PutModelsModelByModelIdResponses, PutProvidersByIdData, PutProvidersByIdError, PutProvidersByIdErrors, PutProvidersByIdResponse, PutProvidersByIdResponses, PutSearchProvidersByIdData, PutSearchProvidersByIdError, PutSearchProvidersByIdErrors, PutSearchProvidersByIdResponse, PutSearchProvidersByIdResponses, PutTtsModelsByIdData, PutTtsModelsByIdError, PutTtsModelsByIdErrors, PutTtsModelsByIdResponse, PutTtsModelsByIdResponses, PutTtsProvidersByIdData, PutTtsProvidersByIdError, PutTtsProvidersByIdErrors, PutTtsProvidersByIdResponse, PutTtsProvidersByIdResponses, PutUsersByIdData, PutUsersByIdError, PutUsersByIdErrors, PutUsersByIdPasswordData, PutUsersByIdPasswordError, PutUsersByIdPasswordErrors, PutUsersByIdPasswordResponses, PutUsersByIdResponse, PutUsersByIdResponses, PutUsersMeChannelsByPlatformData, PutUsersMeChannelsByPlatformError, PutUsersMeChannelsByPlatformErrors, PutUsersMeChannelsByPlatformResponse, PutUsersMeChannelsByPlatformResponses, PutUsersMeData, PutUsersMeError, PutUsersMeErrors, PutUsersMePasswordData, PutUsersMePasswordError, PutUsersMePasswordErrors, PutUsersMePasswordResponses, PutUsersMeResponse, PutUsersMeResponses, ScheduleCreateRequest, ScheduleListLogsResponse, ScheduleListResponse, ScheduleLog, ScheduleNullableInt, ScheduleSchedule, ScheduleUpdateRequest, SearchprovidersCreateRequest, SearchprovidersGetResponse, SearchprovidersProviderConfigSchema, SearchprovidersProviderFieldSchema, SearchprovidersProviderMeta, SearchprovidersProviderName, SearchprovidersUpdateRequest, SessionSession, SettingsSettings, SettingsUpsertRequest, SubagentAddSkillsRequest, SubagentContextResponse, SubagentCreateRequest, SubagentListResponse, SubagentSkillsResponse, SubagentSubagent, SubagentUpdateContextRequest, SubagentUpdateRequest, SubagentUpdateSkillsRequest, TtsCreateModelRequest, TtsCreateProviderRequest, TtsModelCapabilities, TtsModelInfo, TtsModelResponse, TtsParamConstraint, TtsProviderMetaResponse, TtsProviderResponse, TtsTestSynthesizeRequest, TtsUpdateModelRequest, TtsUpdateProviderRequest, TtsVoiceInfo } from './types.gen'; +export { deleteBotsByBotIdBlacklistByRuleId, deleteBotsByBotIdCompactionLogs, deleteBotsByBotIdContainer, deleteBotsByBotIdContainerSkills, deleteBotsByBotIdEmailBindingsById, deleteBotsByBotIdHeartbeatLogs, deleteBotsByBotIdMcpById, deleteBotsByBotIdMcpByIdOauthToken, deleteBotsByBotIdMemory, deleteBotsByBotIdMemoryById, deleteBotsByBotIdMessages, deleteBotsByBotIdScheduleById, deleteBotsByBotIdScheduleLogs, deleteBotsByBotIdSessionsBySessionId, deleteBotsByBotIdSettings, deleteBotsByBotIdSubagentsById, deleteBotsByBotIdWhitelistByRuleId, deleteBotsById, deleteBotsByIdChannelByPlatform, deleteBrowserContextsById, deleteEmailProvidersById, deleteEmailProvidersByIdOauthToken, deleteMemoryProvidersById, deleteModelsById, deleteModelsModelByModelId, deleteProvidersById, deleteSearchProvidersById, deleteTtsModelsById, deleteTtsProvidersById, getBots, getBotsByBotIdAccessChannelIdentities, getBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversations, getBotsByBotIdAccessUsers, getBotsByBotIdBlacklist, getBotsByBotIdCliStream, getBotsByBotIdCliWs, getBotsByBotIdCompactionLogs, getBotsByBotIdContainer, getBotsByBotIdContainerFs, getBotsByBotIdContainerFsDownload, getBotsByBotIdContainerFsList, getBotsByBotIdContainerFsRead, getBotsByBotIdContainerSkills, getBotsByBotIdContainerSnapshots, getBotsByBotIdContainerTerminal, getBotsByBotIdContainerTerminalWs, getBotsByBotIdEmailBindings, getBotsByBotIdEmailOutbox, getBotsByBotIdEmailOutboxById, getBotsByBotIdHeartbeatLogs, getBotsByBotIdMcp, getBotsByBotIdMcpById, getBotsByBotIdMcpByIdOauthStatus, getBotsByBotIdMcpExport, getBotsByBotIdMemory, getBotsByBotIdMemoryStatus, getBotsByBotIdMemoryUsage, getBotsByBotIdMessages, getBotsByBotIdSchedule, getBotsByBotIdScheduleById, getBotsByBotIdScheduleByIdLogs, getBotsByBotIdScheduleLogs, getBotsByBotIdSessions, getBotsByBotIdSessionsBySessionId, getBotsByBotIdSettings, getBotsByBotIdSubagents, getBotsByBotIdSubagentsById, getBotsByBotIdSubagentsByIdContext, getBotsByBotIdSubagentsByIdSkills, getBotsByBotIdTokenUsage, getBotsByBotIdWebStream, getBotsByBotIdWebWs, getBotsByBotIdWhitelist, getBotsById, getBotsByIdChannelByPlatform, getBotsByIdChecks, getBrowserContexts, getBrowserContextsById, getBrowserContextsCores, getChannels, getChannelsByPlatform, getEmailOauthCallback, getEmailProviders, getEmailProvidersById, getEmailProvidersByIdOauthAuthorize, getEmailProvidersByIdOauthStatus, getEmailProvidersMeta, getMemoryProviders, getMemoryProvidersById, getMemoryProvidersByIdStatus, getMemoryProvidersMeta, getModels, getModelsById, getModelsCount, getModelsModelByModelId, getPing, getProviders, getProvidersById, getProvidersByIdModels, getProvidersCount, getProvidersNameByName, getSearchProviders, getSearchProvidersById, getSearchProvidersMeta, getTtsModels, getTtsModelsById, getTtsModelsByIdCapabilities, getTtsProviders, getTtsProvidersById, getTtsProvidersByIdModels, getTtsProvidersMeta, getUsers, getUsersById, getUsersMe, getUsersMeChannelsByPlatform, getUsersMeIdentities, type Options, patchBotsByBotIdSessionsBySessionId, patchBotsByIdChannelByPlatformStatus, postAuthLogin, postAuthRefresh, postBots, postBotsByBotIdCliMessages, postBotsByBotIdContainer, postBotsByBotIdContainerDataExport, postBotsByBotIdContainerDataImport, postBotsByBotIdContainerDataRestore, postBotsByBotIdContainerFsDelete, postBotsByBotIdContainerFsMkdir, postBotsByBotIdContainerFsRename, postBotsByBotIdContainerFsUpload, postBotsByBotIdContainerFsWrite, postBotsByBotIdContainerSkills, postBotsByBotIdContainerSnapshots, postBotsByBotIdContainerSnapshotsRollback, postBotsByBotIdContainerStart, postBotsByBotIdContainerStop, postBotsByBotIdEmailBindings, postBotsByBotIdMcp, postBotsByBotIdMcpByIdOauthAuthorize, postBotsByBotIdMcpByIdOauthDiscover, postBotsByBotIdMcpByIdOauthExchange, postBotsByBotIdMcpByIdProbe, postBotsByBotIdMcpOpsBatchDelete, postBotsByBotIdMcpStdio, postBotsByBotIdMcpStdioByConnectionId, postBotsByBotIdMemory, postBotsByBotIdMemoryCompact, postBotsByBotIdMemoryRebuild, postBotsByBotIdMemorySearch, postBotsByBotIdSchedule, postBotsByBotIdSessions, postBotsByBotIdSettings, postBotsByBotIdSubagents, postBotsByBotIdSubagentsByIdSkills, postBotsByBotIdTools, postBotsByBotIdTtsSynthesize, postBotsByBotIdWebMessages, postBotsByIdChannelByPlatformSend, postBotsByIdChannelByPlatformSendChat, postBrowserContexts, postEmailMailgunWebhookByConfigId, postEmailProviders, postMemoryProviders, postModels, postModelsByIdTest, postProviders, postProvidersByIdImportModels, postProvidersByIdTest, postSearchProviders, postTtsModels, postTtsModelsByIdTest, postTtsProviders, postTtsProvidersByIdImportModels, postUsers, putBotsByBotIdBlacklist, putBotsByBotIdEmailBindingsById, putBotsByBotIdMcpById, putBotsByBotIdMcpImport, putBotsByBotIdScheduleById, putBotsByBotIdSettings, putBotsByBotIdSubagentsById, putBotsByBotIdSubagentsByIdContext, putBotsByBotIdSubagentsByIdSkills, putBotsByBotIdWhitelist, putBotsById, putBotsByIdChannelByPlatform, putBotsByIdOwner, putBrowserContextsById, putEmailProvidersById, putMemoryProvidersById, putModelsById, putModelsModelByModelId, putProvidersById, putSearchProvidersById, putTtsModelsById, putTtsProvidersById, putUsersById, putUsersByIdPassword, putUsersMe, putUsersMeChannelsByPlatform, putUsersMePassword } from './sdk.gen'; +export type { AccountsAccount, AccountsCreateAccountRequest, AccountsListAccountsResponse, AccountsResetPasswordRequest, AccountsUpdateAccountRequest, AccountsUpdatePasswordRequest, AccountsUpdateProfileRequest, AclChannelIdentityCandidate, AclChannelIdentityCandidateListResponse, AclListRulesResponse, AclObservedConversationCandidate, AclObservedConversationCandidateListResponse, AclRule, AclSourceScope, AclUpsertRuleRequest, AclUserCandidate, AclUserCandidateListResponse, AdaptersCdfPoint, AdaptersCompactResult, AdaptersDeleteResponse, AdaptersHealthStatus, AdaptersMemoryItem, AdaptersMemoryStatusResponse, AdaptersMessage, AdaptersProviderCollectionStatus, AdaptersProviderConfigSchema, AdaptersProviderCreateRequest, AdaptersProviderFieldSchema, AdaptersProviderGetResponse, AdaptersProviderMeta, AdaptersProviderStatusResponse, AdaptersProviderType, AdaptersProviderUpdateRequest, AdaptersRebuildResult, AdaptersSearchResponse, AdaptersTopKBucket, AdaptersUsageResponse, BotsBot, BotsBotCheck, BotsCreateBotRequest, BotsListBotsResponse, BotsListChecksResponse, BotsTransferBotRequest, BotsUpdateBotRequest, BrowsercontextsBrowserContext, BrowsercontextsCreateRequest, BrowsercontextsUpdateRequest, ChannelAction, ChannelAttachment, ChannelAttachmentType, ChannelChannelCapabilities, ChannelChannelConfig, ChannelChannelIdentityBinding, ChannelConfigSchema, ChannelFieldSchema, ChannelFieldType, ChannelMessage, ChannelMessageFormat, ChannelMessagePart, ChannelMessagePartType, ChannelMessageTextStyle, ChannelReplyRef, ChannelSendRequest, ChannelTargetHint, ChannelTargetSpec, ChannelThreadRef, ChannelUpdateChannelStatusRequest, ChannelUpsertChannelIdentityConfigRequest, ChannelUpsertConfigRequest, ClientOptions, CompactionListLogsResponse, CompactionLog, DeleteBotsByBotIdBlacklistByRuleIdData, DeleteBotsByBotIdBlacklistByRuleIdError, DeleteBotsByBotIdBlacklistByRuleIdErrors, DeleteBotsByBotIdBlacklistByRuleIdResponses, DeleteBotsByBotIdCompactionLogsData, DeleteBotsByBotIdCompactionLogsError, DeleteBotsByBotIdCompactionLogsErrors, DeleteBotsByBotIdCompactionLogsResponses, DeleteBotsByBotIdContainerData, DeleteBotsByBotIdContainerError, DeleteBotsByBotIdContainerErrors, DeleteBotsByBotIdContainerResponses, DeleteBotsByBotIdContainerSkillsData, DeleteBotsByBotIdContainerSkillsError, DeleteBotsByBotIdContainerSkillsErrors, DeleteBotsByBotIdContainerSkillsResponse, DeleteBotsByBotIdContainerSkillsResponses, DeleteBotsByBotIdEmailBindingsByIdData, DeleteBotsByBotIdEmailBindingsByIdError, DeleteBotsByBotIdEmailBindingsByIdErrors, DeleteBotsByBotIdEmailBindingsByIdResponses, DeleteBotsByBotIdHeartbeatLogsData, DeleteBotsByBotIdHeartbeatLogsError, DeleteBotsByBotIdHeartbeatLogsErrors, DeleteBotsByBotIdHeartbeatLogsResponses, DeleteBotsByBotIdMcpByIdData, DeleteBotsByBotIdMcpByIdError, DeleteBotsByBotIdMcpByIdErrors, DeleteBotsByBotIdMcpByIdOauthTokenData, DeleteBotsByBotIdMcpByIdOauthTokenError, DeleteBotsByBotIdMcpByIdOauthTokenErrors, DeleteBotsByBotIdMcpByIdOauthTokenResponses, DeleteBotsByBotIdMcpByIdResponses, DeleteBotsByBotIdMemoryByIdData, DeleteBotsByBotIdMemoryByIdError, DeleteBotsByBotIdMemoryByIdErrors, DeleteBotsByBotIdMemoryByIdResponse, DeleteBotsByBotIdMemoryByIdResponses, DeleteBotsByBotIdMemoryData, DeleteBotsByBotIdMemoryError, DeleteBotsByBotIdMemoryErrors, DeleteBotsByBotIdMemoryResponse, DeleteBotsByBotIdMemoryResponses, DeleteBotsByBotIdMessagesData, DeleteBotsByBotIdMessagesError, DeleteBotsByBotIdMessagesErrors, DeleteBotsByBotIdMessagesResponses, DeleteBotsByBotIdScheduleByIdData, DeleteBotsByBotIdScheduleByIdError, DeleteBotsByBotIdScheduleByIdErrors, DeleteBotsByBotIdScheduleByIdResponses, DeleteBotsByBotIdScheduleLogsData, DeleteBotsByBotIdScheduleLogsError, DeleteBotsByBotIdScheduleLogsErrors, DeleteBotsByBotIdScheduleLogsResponses, DeleteBotsByBotIdSessionsBySessionIdData, DeleteBotsByBotIdSessionsBySessionIdError, DeleteBotsByBotIdSessionsBySessionIdErrors, DeleteBotsByBotIdSessionsBySessionIdResponses, DeleteBotsByBotIdSettingsData, DeleteBotsByBotIdSettingsError, DeleteBotsByBotIdSettingsErrors, DeleteBotsByBotIdSettingsResponses, DeleteBotsByBotIdSubagentsByIdData, DeleteBotsByBotIdSubagentsByIdError, DeleteBotsByBotIdSubagentsByIdErrors, DeleteBotsByBotIdSubagentsByIdResponses, DeleteBotsByBotIdWhitelistByRuleIdData, DeleteBotsByBotIdWhitelistByRuleIdError, DeleteBotsByBotIdWhitelistByRuleIdErrors, DeleteBotsByBotIdWhitelistByRuleIdResponses, DeleteBotsByIdChannelByPlatformData, DeleteBotsByIdChannelByPlatformError, DeleteBotsByIdChannelByPlatformErrors, DeleteBotsByIdChannelByPlatformResponses, DeleteBotsByIdData, DeleteBotsByIdError, DeleteBotsByIdErrors, DeleteBotsByIdResponse, DeleteBotsByIdResponses, DeleteBrowserContextsByIdData, DeleteBrowserContextsByIdError, DeleteBrowserContextsByIdErrors, DeleteBrowserContextsByIdResponses, DeleteEmailProvidersByIdData, DeleteEmailProvidersByIdError, DeleteEmailProvidersByIdErrors, DeleteEmailProvidersByIdOauthTokenData, DeleteEmailProvidersByIdOauthTokenError, DeleteEmailProvidersByIdOauthTokenErrors, DeleteEmailProvidersByIdOauthTokenResponses, DeleteEmailProvidersByIdResponses, DeleteMemoryProvidersByIdData, DeleteMemoryProvidersByIdError, DeleteMemoryProvidersByIdErrors, DeleteMemoryProvidersByIdResponses, DeleteModelsByIdData, DeleteModelsByIdError, DeleteModelsByIdErrors, DeleteModelsByIdResponses, DeleteModelsModelByModelIdData, DeleteModelsModelByModelIdError, DeleteModelsModelByModelIdErrors, DeleteModelsModelByModelIdResponses, DeleteProvidersByIdData, DeleteProvidersByIdError, DeleteProvidersByIdErrors, DeleteProvidersByIdResponses, DeleteSearchProvidersByIdData, DeleteSearchProvidersByIdError, DeleteSearchProvidersByIdErrors, DeleteSearchProvidersByIdResponses, DeleteTtsModelsByIdData, DeleteTtsModelsByIdError, DeleteTtsModelsByIdErrors, DeleteTtsModelsByIdResponses, DeleteTtsProvidersByIdData, DeleteTtsProvidersByIdError, DeleteTtsProvidersByIdErrors, DeleteTtsProvidersByIdResponses, EmailBindingResponse, EmailConfigSchema, EmailCreateBindingRequest, EmailCreateProviderRequest, EmailFieldSchema, EmailOutboxItemResponse, EmailProviderMeta, EmailProviderResponse, EmailUpdateBindingRequest, EmailUpdateProviderRequest, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsData, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsError, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsErrors, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsResponse, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsResponses, GetBotsByBotIdAccessChannelIdentitiesData, GetBotsByBotIdAccessChannelIdentitiesError, GetBotsByBotIdAccessChannelIdentitiesErrors, GetBotsByBotIdAccessChannelIdentitiesResponse, GetBotsByBotIdAccessChannelIdentitiesResponses, GetBotsByBotIdAccessUsersData, GetBotsByBotIdAccessUsersError, GetBotsByBotIdAccessUsersErrors, GetBotsByBotIdAccessUsersResponse, GetBotsByBotIdAccessUsersResponses, GetBotsByBotIdBlacklistData, GetBotsByBotIdBlacklistError, GetBotsByBotIdBlacklistErrors, GetBotsByBotIdBlacklistResponse, GetBotsByBotIdBlacklistResponses, GetBotsByBotIdCliStreamData, GetBotsByBotIdCliStreamError, GetBotsByBotIdCliStreamErrors, GetBotsByBotIdCliStreamResponse, GetBotsByBotIdCliStreamResponses, GetBotsByBotIdCliWsData, GetBotsByBotIdCliWsError, GetBotsByBotIdCliWsErrors, GetBotsByBotIdCompactionLogsData, GetBotsByBotIdCompactionLogsError, GetBotsByBotIdCompactionLogsErrors, GetBotsByBotIdCompactionLogsResponse, GetBotsByBotIdCompactionLogsResponses, GetBotsByBotIdContainerData, GetBotsByBotIdContainerError, GetBotsByBotIdContainerErrors, GetBotsByBotIdContainerFsData, GetBotsByBotIdContainerFsDownloadData, GetBotsByBotIdContainerFsDownloadError, GetBotsByBotIdContainerFsDownloadErrors, GetBotsByBotIdContainerFsDownloadResponses, GetBotsByBotIdContainerFsError, GetBotsByBotIdContainerFsErrors, GetBotsByBotIdContainerFsListData, GetBotsByBotIdContainerFsListError, GetBotsByBotIdContainerFsListErrors, GetBotsByBotIdContainerFsListResponse, GetBotsByBotIdContainerFsListResponses, GetBotsByBotIdContainerFsReadData, GetBotsByBotIdContainerFsReadError, GetBotsByBotIdContainerFsReadErrors, GetBotsByBotIdContainerFsReadResponse, GetBotsByBotIdContainerFsReadResponses, GetBotsByBotIdContainerFsResponse, GetBotsByBotIdContainerFsResponses, GetBotsByBotIdContainerResponse, GetBotsByBotIdContainerResponses, GetBotsByBotIdContainerSkillsData, GetBotsByBotIdContainerSkillsError, GetBotsByBotIdContainerSkillsErrors, GetBotsByBotIdContainerSkillsResponse, GetBotsByBotIdContainerSkillsResponses, GetBotsByBotIdContainerSnapshotsData, GetBotsByBotIdContainerSnapshotsError, GetBotsByBotIdContainerSnapshotsErrors, GetBotsByBotIdContainerSnapshotsResponse, GetBotsByBotIdContainerSnapshotsResponses, GetBotsByBotIdContainerTerminalData, GetBotsByBotIdContainerTerminalError, GetBotsByBotIdContainerTerminalErrors, GetBotsByBotIdContainerTerminalResponse, GetBotsByBotIdContainerTerminalResponses, GetBotsByBotIdContainerTerminalWsData, GetBotsByBotIdContainerTerminalWsError, GetBotsByBotIdContainerTerminalWsErrors, GetBotsByBotIdEmailBindingsData, GetBotsByBotIdEmailBindingsError, GetBotsByBotIdEmailBindingsErrors, GetBotsByBotIdEmailBindingsResponse, GetBotsByBotIdEmailBindingsResponses, GetBotsByBotIdEmailOutboxByIdData, GetBotsByBotIdEmailOutboxByIdError, GetBotsByBotIdEmailOutboxByIdErrors, GetBotsByBotIdEmailOutboxByIdResponse, GetBotsByBotIdEmailOutboxByIdResponses, GetBotsByBotIdEmailOutboxData, GetBotsByBotIdEmailOutboxError, GetBotsByBotIdEmailOutboxErrors, GetBotsByBotIdEmailOutboxResponse, GetBotsByBotIdEmailOutboxResponses, GetBotsByBotIdHeartbeatLogsData, GetBotsByBotIdHeartbeatLogsError, GetBotsByBotIdHeartbeatLogsErrors, GetBotsByBotIdHeartbeatLogsResponse, GetBotsByBotIdHeartbeatLogsResponses, GetBotsByBotIdMcpByIdData, GetBotsByBotIdMcpByIdError, GetBotsByBotIdMcpByIdErrors, GetBotsByBotIdMcpByIdOauthStatusData, GetBotsByBotIdMcpByIdOauthStatusError, GetBotsByBotIdMcpByIdOauthStatusErrors, GetBotsByBotIdMcpByIdOauthStatusResponse, GetBotsByBotIdMcpByIdOauthStatusResponses, GetBotsByBotIdMcpByIdResponse, GetBotsByBotIdMcpByIdResponses, GetBotsByBotIdMcpData, GetBotsByBotIdMcpError, GetBotsByBotIdMcpErrors, GetBotsByBotIdMcpExportData, GetBotsByBotIdMcpExportError, GetBotsByBotIdMcpExportErrors, GetBotsByBotIdMcpExportResponse, GetBotsByBotIdMcpExportResponses, GetBotsByBotIdMcpResponse, GetBotsByBotIdMcpResponses, GetBotsByBotIdMemoryData, GetBotsByBotIdMemoryError, GetBotsByBotIdMemoryErrors, GetBotsByBotIdMemoryResponse, GetBotsByBotIdMemoryResponses, GetBotsByBotIdMemoryStatusData, GetBotsByBotIdMemoryStatusError, GetBotsByBotIdMemoryStatusErrors, GetBotsByBotIdMemoryStatusResponse, GetBotsByBotIdMemoryStatusResponses, GetBotsByBotIdMemoryUsageData, GetBotsByBotIdMemoryUsageError, GetBotsByBotIdMemoryUsageErrors, GetBotsByBotIdMemoryUsageResponse, GetBotsByBotIdMemoryUsageResponses, GetBotsByBotIdMessagesData, GetBotsByBotIdMessagesError, GetBotsByBotIdMessagesErrors, GetBotsByBotIdMessagesResponse, GetBotsByBotIdMessagesResponses, GetBotsByBotIdScheduleByIdData, GetBotsByBotIdScheduleByIdError, GetBotsByBotIdScheduleByIdErrors, GetBotsByBotIdScheduleByIdLogsData, GetBotsByBotIdScheduleByIdLogsError, GetBotsByBotIdScheduleByIdLogsErrors, GetBotsByBotIdScheduleByIdLogsResponse, GetBotsByBotIdScheduleByIdLogsResponses, GetBotsByBotIdScheduleByIdResponse, GetBotsByBotIdScheduleByIdResponses, GetBotsByBotIdScheduleData, GetBotsByBotIdScheduleError, GetBotsByBotIdScheduleErrors, GetBotsByBotIdScheduleLogsData, GetBotsByBotIdScheduleLogsError, GetBotsByBotIdScheduleLogsErrors, GetBotsByBotIdScheduleLogsResponse, GetBotsByBotIdScheduleLogsResponses, GetBotsByBotIdScheduleResponse, GetBotsByBotIdScheduleResponses, GetBotsByBotIdSessionsBySessionIdData, GetBotsByBotIdSessionsBySessionIdError, GetBotsByBotIdSessionsBySessionIdErrors, GetBotsByBotIdSessionsBySessionIdResponse, GetBotsByBotIdSessionsBySessionIdResponses, GetBotsByBotIdSessionsData, GetBotsByBotIdSessionsError, GetBotsByBotIdSessionsErrors, GetBotsByBotIdSessionsResponse, GetBotsByBotIdSessionsResponses, GetBotsByBotIdSettingsData, GetBotsByBotIdSettingsError, GetBotsByBotIdSettingsErrors, GetBotsByBotIdSettingsResponse, GetBotsByBotIdSettingsResponses, GetBotsByBotIdSubagentsByIdContextData, GetBotsByBotIdSubagentsByIdContextError, GetBotsByBotIdSubagentsByIdContextErrors, GetBotsByBotIdSubagentsByIdContextResponse, GetBotsByBotIdSubagentsByIdContextResponses, GetBotsByBotIdSubagentsByIdData, GetBotsByBotIdSubagentsByIdError, GetBotsByBotIdSubagentsByIdErrors, GetBotsByBotIdSubagentsByIdResponse, GetBotsByBotIdSubagentsByIdResponses, GetBotsByBotIdSubagentsByIdSkillsData, GetBotsByBotIdSubagentsByIdSkillsError, GetBotsByBotIdSubagentsByIdSkillsErrors, GetBotsByBotIdSubagentsByIdSkillsResponse, GetBotsByBotIdSubagentsByIdSkillsResponses, GetBotsByBotIdSubagentsData, GetBotsByBotIdSubagentsError, GetBotsByBotIdSubagentsErrors, GetBotsByBotIdSubagentsResponse, GetBotsByBotIdSubagentsResponses, GetBotsByBotIdTokenUsageData, GetBotsByBotIdTokenUsageError, GetBotsByBotIdTokenUsageErrors, GetBotsByBotIdTokenUsageResponse, GetBotsByBotIdTokenUsageResponses, GetBotsByBotIdWebStreamData, GetBotsByBotIdWebStreamError, GetBotsByBotIdWebStreamErrors, GetBotsByBotIdWebStreamResponse, GetBotsByBotIdWebStreamResponses, GetBotsByBotIdWebWsData, GetBotsByBotIdWebWsError, GetBotsByBotIdWebWsErrors, GetBotsByBotIdWhitelistData, GetBotsByBotIdWhitelistError, GetBotsByBotIdWhitelistErrors, GetBotsByBotIdWhitelistResponse, GetBotsByBotIdWhitelistResponses, GetBotsByIdChannelByPlatformData, GetBotsByIdChannelByPlatformError, GetBotsByIdChannelByPlatformErrors, GetBotsByIdChannelByPlatformResponse, GetBotsByIdChannelByPlatformResponses, GetBotsByIdChecksData, GetBotsByIdChecksError, GetBotsByIdChecksErrors, GetBotsByIdChecksResponse, GetBotsByIdChecksResponses, GetBotsByIdData, GetBotsByIdError, GetBotsByIdErrors, GetBotsByIdResponse, GetBotsByIdResponses, GetBotsData, GetBotsError, GetBotsErrors, GetBotsResponse, GetBotsResponses, GetBrowserContextsByIdData, GetBrowserContextsByIdError, GetBrowserContextsByIdErrors, GetBrowserContextsByIdResponse, GetBrowserContextsByIdResponses, GetBrowserContextsCoresData, GetBrowserContextsCoresError, GetBrowserContextsCoresErrors, GetBrowserContextsCoresResponse, GetBrowserContextsCoresResponses, GetBrowserContextsData, GetBrowserContextsError, GetBrowserContextsErrors, GetBrowserContextsResponse, GetBrowserContextsResponses, GetChannelsByPlatformData, GetChannelsByPlatformError, GetChannelsByPlatformErrors, GetChannelsByPlatformResponse, GetChannelsByPlatformResponses, GetChannelsData, GetChannelsError, GetChannelsErrors, GetChannelsResponse, GetChannelsResponses, GetEmailOauthCallbackData, GetEmailOauthCallbackError, GetEmailOauthCallbackErrors, GetEmailOauthCallbackResponse, GetEmailOauthCallbackResponses, GetEmailProvidersByIdData, GetEmailProvidersByIdError, GetEmailProvidersByIdErrors, GetEmailProvidersByIdOauthAuthorizeData, GetEmailProvidersByIdOauthAuthorizeError, GetEmailProvidersByIdOauthAuthorizeErrors, GetEmailProvidersByIdOauthAuthorizeResponse, GetEmailProvidersByIdOauthAuthorizeResponses, GetEmailProvidersByIdOauthStatusData, GetEmailProvidersByIdOauthStatusError, GetEmailProvidersByIdOauthStatusErrors, GetEmailProvidersByIdOauthStatusResponse, GetEmailProvidersByIdOauthStatusResponses, GetEmailProvidersByIdResponse, GetEmailProvidersByIdResponses, GetEmailProvidersData, GetEmailProvidersError, GetEmailProvidersErrors, GetEmailProvidersMetaData, GetEmailProvidersMetaResponse, GetEmailProvidersMetaResponses, GetEmailProvidersResponse, GetEmailProvidersResponses, GetMemoryProvidersByIdData, GetMemoryProvidersByIdError, GetMemoryProvidersByIdErrors, GetMemoryProvidersByIdResponse, GetMemoryProvidersByIdResponses, GetMemoryProvidersByIdStatusData, GetMemoryProvidersByIdStatusError, GetMemoryProvidersByIdStatusErrors, GetMemoryProvidersByIdStatusResponse, GetMemoryProvidersByIdStatusResponses, GetMemoryProvidersData, GetMemoryProvidersError, GetMemoryProvidersErrors, GetMemoryProvidersMetaData, GetMemoryProvidersMetaResponse, GetMemoryProvidersMetaResponses, GetMemoryProvidersResponse, GetMemoryProvidersResponses, GetModelsByIdData, GetModelsByIdError, GetModelsByIdErrors, GetModelsByIdResponse, GetModelsByIdResponses, GetModelsCountData, GetModelsCountError, GetModelsCountErrors, GetModelsCountResponse, GetModelsCountResponses, GetModelsData, GetModelsError, GetModelsErrors, GetModelsModelByModelIdData, GetModelsModelByModelIdError, GetModelsModelByModelIdErrors, GetModelsModelByModelIdResponse, GetModelsModelByModelIdResponses, GetModelsResponse, GetModelsResponses, GetPingData, GetPingResponse, GetPingResponses, GetProvidersByIdData, GetProvidersByIdError, GetProvidersByIdErrors, GetProvidersByIdModelsData, GetProvidersByIdModelsError, GetProvidersByIdModelsErrors, GetProvidersByIdModelsResponse, GetProvidersByIdModelsResponses, GetProvidersByIdResponse, GetProvidersByIdResponses, GetProvidersCountData, GetProvidersCountError, GetProvidersCountErrors, GetProvidersCountResponse, GetProvidersCountResponses, GetProvidersData, GetProvidersError, GetProvidersErrors, GetProvidersNameByNameData, GetProvidersNameByNameError, GetProvidersNameByNameErrors, GetProvidersNameByNameResponse, GetProvidersNameByNameResponses, GetProvidersResponse, GetProvidersResponses, GetSearchProvidersByIdData, GetSearchProvidersByIdError, GetSearchProvidersByIdErrors, GetSearchProvidersByIdResponse, GetSearchProvidersByIdResponses, GetSearchProvidersData, GetSearchProvidersError, GetSearchProvidersErrors, GetSearchProvidersMetaData, GetSearchProvidersMetaResponse, GetSearchProvidersMetaResponses, GetSearchProvidersResponse, GetSearchProvidersResponses, GetTtsModelsByIdCapabilitiesData, GetTtsModelsByIdCapabilitiesError, GetTtsModelsByIdCapabilitiesErrors, GetTtsModelsByIdCapabilitiesResponse, GetTtsModelsByIdCapabilitiesResponses, GetTtsModelsByIdData, GetTtsModelsByIdError, GetTtsModelsByIdErrors, GetTtsModelsByIdResponse, GetTtsModelsByIdResponses, GetTtsModelsData, GetTtsModelsError, GetTtsModelsErrors, GetTtsModelsResponse, GetTtsModelsResponses, GetTtsProvidersByIdData, GetTtsProvidersByIdError, GetTtsProvidersByIdErrors, GetTtsProvidersByIdModelsData, GetTtsProvidersByIdModelsError, GetTtsProvidersByIdModelsErrors, GetTtsProvidersByIdModelsResponse, GetTtsProvidersByIdModelsResponses, GetTtsProvidersByIdResponse, GetTtsProvidersByIdResponses, GetTtsProvidersData, GetTtsProvidersError, GetTtsProvidersErrors, GetTtsProvidersMetaData, GetTtsProvidersMetaResponse, GetTtsProvidersMetaResponses, GetTtsProvidersResponse, GetTtsProvidersResponses, GetUsersByIdData, GetUsersByIdError, GetUsersByIdErrors, GetUsersByIdResponse, GetUsersByIdResponses, GetUsersData, GetUsersError, GetUsersErrors, GetUsersMeChannelsByPlatformData, GetUsersMeChannelsByPlatformError, GetUsersMeChannelsByPlatformErrors, GetUsersMeChannelsByPlatformResponse, GetUsersMeChannelsByPlatformResponses, GetUsersMeData, GetUsersMeError, GetUsersMeErrors, GetUsersMeIdentitiesData, GetUsersMeIdentitiesError, GetUsersMeIdentitiesErrors, GetUsersMeIdentitiesResponse, GetUsersMeIdentitiesResponses, GetUsersMeResponse, GetUsersMeResponses, GetUsersResponse, GetUsersResponses, GithubComMemohaiMemohInternalMcpConnection, HandlersBatchDeleteRequest, HandlersBrowserCoresResponse, HandlersChannelMeta, HandlersCreateContainerRequest, HandlersCreateContainerResponse, HandlersCreateSessionRequest, HandlersCreateSnapshotRequest, HandlersCreateSnapshotResponse, HandlersDailyTokenUsage, HandlersEmailOAuthStatusResponse, HandlersErrorResponse, HandlersFsDeleteRequest, HandlersFsFileInfo, HandlersFsListResponse, HandlersFsMkdirRequest, HandlersFsOpResponse, HandlersFsReadResponse, HandlersFsRenameRequest, HandlersFsUploadResponse, HandlersFsWriteRequest, HandlersGetContainerResponse, HandlersListMyIdentitiesResponse, HandlersListSnapshotsResponse, HandlersLocalChannelMessageRequest, HandlersLoginRequest, HandlersLoginResponse, HandlersMcpStdioRequest, HandlersMcpStdioResponse, HandlersMemoryAddPayload, HandlersMemoryCompactPayload, HandlersMemoryDeletePayload, HandlersMemorySearchPayload, HandlersModelTokenUsage, HandlersOauthAuthorizeRequest, HandlersOauthDiscoverRequest, HandlersOauthExchangeRequest, HandlersPingResponse, HandlersProbeResponse, HandlersRefreshResponse, HandlersRollbackRequest, HandlersSkillItem, HandlersSkillsDeleteRequest, HandlersSkillsOpResponse, HandlersSkillsResponse, HandlersSkillsUpsertRequest, HandlersSnapshotInfo, HandlersSynthesizeRequest, HandlersSynthesizeResponse, HandlersTerminalInfoResponse, HandlersTokenUsageResponse, HandlersUpdateSessionRequest, HeartbeatListLogsResponse, HeartbeatLog, IdentitiesChannelIdentity, McpAuthorizeResult, McpDiscoveryResult, McpExportResponse, McpImportRequest, McpListResponse, McpMcpServerEntry, McpOAuthStatus, McpToolDescriptor, McpUpsertRequest, MessageMessage, MessageMessageAsset, ModelsAddRequest, ModelsAddResponse, ModelsClientType, ModelsCountResponse, ModelsGetResponse, ModelsModelType, ModelsTestResponse, ModelsTestStatus, ModelsUpdateRequest, PatchBotsByBotIdSessionsBySessionIdData, PatchBotsByBotIdSessionsBySessionIdError, PatchBotsByBotIdSessionsBySessionIdErrors, PatchBotsByBotIdSessionsBySessionIdResponse, PatchBotsByBotIdSessionsBySessionIdResponses, PatchBotsByIdChannelByPlatformStatusData, PatchBotsByIdChannelByPlatformStatusError, PatchBotsByIdChannelByPlatformStatusErrors, PatchBotsByIdChannelByPlatformStatusResponse, PatchBotsByIdChannelByPlatformStatusResponses, PostAuthLoginData, PostAuthLoginError, PostAuthLoginErrors, PostAuthLoginResponse, PostAuthLoginResponses, PostAuthRefreshData, PostAuthRefreshError, PostAuthRefreshErrors, PostAuthRefreshResponse, PostAuthRefreshResponses, PostBotsByBotIdCliMessagesData, PostBotsByBotIdCliMessagesError, PostBotsByBotIdCliMessagesErrors, PostBotsByBotIdCliMessagesResponse, PostBotsByBotIdCliMessagesResponses, PostBotsByBotIdContainerData, PostBotsByBotIdContainerDataExportData, PostBotsByBotIdContainerDataExportError, PostBotsByBotIdContainerDataExportErrors, PostBotsByBotIdContainerDataExportResponses, PostBotsByBotIdContainerDataImportData, PostBotsByBotIdContainerDataImportError, PostBotsByBotIdContainerDataImportErrors, PostBotsByBotIdContainerDataImportResponse, PostBotsByBotIdContainerDataImportResponses, PostBotsByBotIdContainerDataRestoreData, PostBotsByBotIdContainerDataRestoreError, PostBotsByBotIdContainerDataRestoreErrors, PostBotsByBotIdContainerDataRestoreResponse, PostBotsByBotIdContainerDataRestoreResponses, PostBotsByBotIdContainerError, PostBotsByBotIdContainerErrors, PostBotsByBotIdContainerFsDeleteData, PostBotsByBotIdContainerFsDeleteError, PostBotsByBotIdContainerFsDeleteErrors, PostBotsByBotIdContainerFsDeleteResponse, PostBotsByBotIdContainerFsDeleteResponses, PostBotsByBotIdContainerFsMkdirData, PostBotsByBotIdContainerFsMkdirError, PostBotsByBotIdContainerFsMkdirErrors, PostBotsByBotIdContainerFsMkdirResponse, PostBotsByBotIdContainerFsMkdirResponses, PostBotsByBotIdContainerFsRenameData, PostBotsByBotIdContainerFsRenameError, PostBotsByBotIdContainerFsRenameErrors, PostBotsByBotIdContainerFsRenameResponse, PostBotsByBotIdContainerFsRenameResponses, PostBotsByBotIdContainerFsUploadData, PostBotsByBotIdContainerFsUploadError, PostBotsByBotIdContainerFsUploadErrors, PostBotsByBotIdContainerFsUploadResponse, PostBotsByBotIdContainerFsUploadResponses, PostBotsByBotIdContainerFsWriteData, PostBotsByBotIdContainerFsWriteError, PostBotsByBotIdContainerFsWriteErrors, PostBotsByBotIdContainerFsWriteResponse, PostBotsByBotIdContainerFsWriteResponses, PostBotsByBotIdContainerResponse, PostBotsByBotIdContainerResponses, PostBotsByBotIdContainerSkillsData, PostBotsByBotIdContainerSkillsError, PostBotsByBotIdContainerSkillsErrors, PostBotsByBotIdContainerSkillsResponse, PostBotsByBotIdContainerSkillsResponses, PostBotsByBotIdContainerSnapshotsData, PostBotsByBotIdContainerSnapshotsError, PostBotsByBotIdContainerSnapshotsErrors, PostBotsByBotIdContainerSnapshotsResponse, PostBotsByBotIdContainerSnapshotsResponses, PostBotsByBotIdContainerSnapshotsRollbackData, PostBotsByBotIdContainerSnapshotsRollbackError, PostBotsByBotIdContainerSnapshotsRollbackErrors, PostBotsByBotIdContainerSnapshotsRollbackResponse, PostBotsByBotIdContainerSnapshotsRollbackResponses, PostBotsByBotIdContainerStartData, PostBotsByBotIdContainerStartError, PostBotsByBotIdContainerStartErrors, PostBotsByBotIdContainerStartResponse, PostBotsByBotIdContainerStartResponses, PostBotsByBotIdContainerStopData, PostBotsByBotIdContainerStopError, PostBotsByBotIdContainerStopErrors, PostBotsByBotIdContainerStopResponse, PostBotsByBotIdContainerStopResponses, PostBotsByBotIdEmailBindingsData, PostBotsByBotIdEmailBindingsError, PostBotsByBotIdEmailBindingsErrors, PostBotsByBotIdEmailBindingsResponse, PostBotsByBotIdEmailBindingsResponses, PostBotsByBotIdMcpByIdOauthAuthorizeData, PostBotsByBotIdMcpByIdOauthAuthorizeError, PostBotsByBotIdMcpByIdOauthAuthorizeErrors, PostBotsByBotIdMcpByIdOauthAuthorizeResponse, PostBotsByBotIdMcpByIdOauthAuthorizeResponses, PostBotsByBotIdMcpByIdOauthDiscoverData, PostBotsByBotIdMcpByIdOauthDiscoverError, PostBotsByBotIdMcpByIdOauthDiscoverErrors, PostBotsByBotIdMcpByIdOauthDiscoverResponse, PostBotsByBotIdMcpByIdOauthDiscoverResponses, PostBotsByBotIdMcpByIdOauthExchangeData, PostBotsByBotIdMcpByIdOauthExchangeError, PostBotsByBotIdMcpByIdOauthExchangeErrors, PostBotsByBotIdMcpByIdOauthExchangeResponse, PostBotsByBotIdMcpByIdOauthExchangeResponses, PostBotsByBotIdMcpByIdProbeData, PostBotsByBotIdMcpByIdProbeError, PostBotsByBotIdMcpByIdProbeErrors, PostBotsByBotIdMcpByIdProbeResponse, PostBotsByBotIdMcpByIdProbeResponses, PostBotsByBotIdMcpData, PostBotsByBotIdMcpError, PostBotsByBotIdMcpErrors, PostBotsByBotIdMcpOpsBatchDeleteData, PostBotsByBotIdMcpOpsBatchDeleteError, PostBotsByBotIdMcpOpsBatchDeleteErrors, PostBotsByBotIdMcpOpsBatchDeleteResponses, PostBotsByBotIdMcpResponse, PostBotsByBotIdMcpResponses, PostBotsByBotIdMcpStdioByConnectionIdData, PostBotsByBotIdMcpStdioByConnectionIdError, PostBotsByBotIdMcpStdioByConnectionIdErrors, PostBotsByBotIdMcpStdioByConnectionIdResponse, PostBotsByBotIdMcpStdioByConnectionIdResponses, PostBotsByBotIdMcpStdioData, PostBotsByBotIdMcpStdioError, PostBotsByBotIdMcpStdioErrors, PostBotsByBotIdMcpStdioResponse, PostBotsByBotIdMcpStdioResponses, PostBotsByBotIdMemoryCompactData, PostBotsByBotIdMemoryCompactError, PostBotsByBotIdMemoryCompactErrors, PostBotsByBotIdMemoryCompactResponse, PostBotsByBotIdMemoryCompactResponses, PostBotsByBotIdMemoryData, PostBotsByBotIdMemoryError, PostBotsByBotIdMemoryErrors, PostBotsByBotIdMemoryRebuildData, PostBotsByBotIdMemoryRebuildError, PostBotsByBotIdMemoryRebuildErrors, PostBotsByBotIdMemoryRebuildResponse, PostBotsByBotIdMemoryRebuildResponses, PostBotsByBotIdMemoryResponse, PostBotsByBotIdMemoryResponses, PostBotsByBotIdMemorySearchData, PostBotsByBotIdMemorySearchError, PostBotsByBotIdMemorySearchErrors, PostBotsByBotIdMemorySearchResponse, PostBotsByBotIdMemorySearchResponses, PostBotsByBotIdScheduleData, PostBotsByBotIdScheduleError, PostBotsByBotIdScheduleErrors, PostBotsByBotIdScheduleResponse, PostBotsByBotIdScheduleResponses, PostBotsByBotIdSessionsData, PostBotsByBotIdSessionsError, PostBotsByBotIdSessionsErrors, PostBotsByBotIdSessionsResponse, PostBotsByBotIdSessionsResponses, PostBotsByBotIdSettingsData, PostBotsByBotIdSettingsError, PostBotsByBotIdSettingsErrors, PostBotsByBotIdSettingsResponse, PostBotsByBotIdSettingsResponses, PostBotsByBotIdSubagentsByIdSkillsData, PostBotsByBotIdSubagentsByIdSkillsError, PostBotsByBotIdSubagentsByIdSkillsErrors, PostBotsByBotIdSubagentsByIdSkillsResponse, PostBotsByBotIdSubagentsByIdSkillsResponses, PostBotsByBotIdSubagentsData, PostBotsByBotIdSubagentsError, PostBotsByBotIdSubagentsErrors, PostBotsByBotIdSubagentsResponse, PostBotsByBotIdSubagentsResponses, PostBotsByBotIdToolsData, PostBotsByBotIdToolsError, PostBotsByBotIdToolsErrors, PostBotsByBotIdToolsResponse, PostBotsByBotIdToolsResponses, PostBotsByBotIdTtsSynthesizeData, PostBotsByBotIdTtsSynthesizeError, PostBotsByBotIdTtsSynthesizeErrors, PostBotsByBotIdTtsSynthesizeResponse, PostBotsByBotIdTtsSynthesizeResponses, PostBotsByBotIdWebMessagesData, PostBotsByBotIdWebMessagesError, PostBotsByBotIdWebMessagesErrors, PostBotsByBotIdWebMessagesResponse, PostBotsByBotIdWebMessagesResponses, PostBotsByIdChannelByPlatformSendChatData, PostBotsByIdChannelByPlatformSendChatError, PostBotsByIdChannelByPlatformSendChatErrors, PostBotsByIdChannelByPlatformSendChatResponse, PostBotsByIdChannelByPlatformSendChatResponses, PostBotsByIdChannelByPlatformSendData, PostBotsByIdChannelByPlatformSendError, PostBotsByIdChannelByPlatformSendErrors, PostBotsByIdChannelByPlatformSendResponse, PostBotsByIdChannelByPlatformSendResponses, PostBotsData, PostBotsError, PostBotsErrors, PostBotsResponse, PostBotsResponses, PostBrowserContextsData, PostBrowserContextsError, PostBrowserContextsErrors, PostBrowserContextsResponse, PostBrowserContextsResponses, PostEmailMailgunWebhookByConfigIdData, PostEmailMailgunWebhookByConfigIdError, PostEmailMailgunWebhookByConfigIdErrors, PostEmailMailgunWebhookByConfigIdResponse, PostEmailMailgunWebhookByConfigIdResponses, PostEmailProvidersData, PostEmailProvidersError, PostEmailProvidersErrors, PostEmailProvidersResponse, PostEmailProvidersResponses, PostMemoryProvidersData, PostMemoryProvidersError, PostMemoryProvidersErrors, PostMemoryProvidersResponse, PostMemoryProvidersResponses, PostModelsByIdTestData, PostModelsByIdTestError, PostModelsByIdTestErrors, PostModelsByIdTestResponse, PostModelsByIdTestResponses, PostModelsData, PostModelsError, PostModelsErrors, PostModelsResponse, PostModelsResponses, PostProvidersByIdImportModelsData, PostProvidersByIdImportModelsError, PostProvidersByIdImportModelsErrors, PostProvidersByIdImportModelsResponse, PostProvidersByIdImportModelsResponses, PostProvidersByIdTestData, PostProvidersByIdTestError, PostProvidersByIdTestErrors, PostProvidersByIdTestResponse, PostProvidersByIdTestResponses, PostProvidersData, PostProvidersError, PostProvidersErrors, PostProvidersResponse, PostProvidersResponses, PostSearchProvidersData, PostSearchProvidersError, PostSearchProvidersErrors, PostSearchProvidersResponse, PostSearchProvidersResponses, PostTtsModelsByIdTestData, PostTtsModelsByIdTestError, PostTtsModelsByIdTestErrors, PostTtsModelsByIdTestResponses, PostTtsModelsData, PostTtsModelsError, PostTtsModelsErrors, PostTtsModelsResponse, PostTtsModelsResponses, PostTtsProvidersByIdImportModelsData, PostTtsProvidersByIdImportModelsError, PostTtsProvidersByIdImportModelsErrors, PostTtsProvidersByIdImportModelsResponse, PostTtsProvidersByIdImportModelsResponses, PostTtsProvidersData, PostTtsProvidersError, PostTtsProvidersErrors, PostTtsProvidersResponse, PostTtsProvidersResponses, PostUsersData, PostUsersError, PostUsersErrors, PostUsersResponse, PostUsersResponses, ProvidersCountResponse, ProvidersCreateRequest, ProvidersGetResponse, ProvidersImportModelsRequest, ProvidersImportModelsResponse, ProvidersTestResponse, ProvidersUpdateRequest, PutBotsByBotIdBlacklistData, PutBotsByBotIdBlacklistError, PutBotsByBotIdBlacklistErrors, PutBotsByBotIdBlacklistResponse, PutBotsByBotIdBlacklistResponses, PutBotsByBotIdEmailBindingsByIdData, PutBotsByBotIdEmailBindingsByIdError, PutBotsByBotIdEmailBindingsByIdErrors, PutBotsByBotIdEmailBindingsByIdResponse, PutBotsByBotIdEmailBindingsByIdResponses, PutBotsByBotIdMcpByIdData, PutBotsByBotIdMcpByIdError, PutBotsByBotIdMcpByIdErrors, PutBotsByBotIdMcpByIdResponse, PutBotsByBotIdMcpByIdResponses, PutBotsByBotIdMcpImportData, PutBotsByBotIdMcpImportError, PutBotsByBotIdMcpImportErrors, PutBotsByBotIdMcpImportResponse, PutBotsByBotIdMcpImportResponses, PutBotsByBotIdScheduleByIdData, PutBotsByBotIdScheduleByIdError, PutBotsByBotIdScheduleByIdErrors, PutBotsByBotIdScheduleByIdResponse, PutBotsByBotIdScheduleByIdResponses, PutBotsByBotIdSettingsData, PutBotsByBotIdSettingsError, PutBotsByBotIdSettingsErrors, PutBotsByBotIdSettingsResponse, PutBotsByBotIdSettingsResponses, PutBotsByBotIdSubagentsByIdContextData, PutBotsByBotIdSubagentsByIdContextError, PutBotsByBotIdSubagentsByIdContextErrors, PutBotsByBotIdSubagentsByIdContextResponse, PutBotsByBotIdSubagentsByIdContextResponses, PutBotsByBotIdSubagentsByIdData, PutBotsByBotIdSubagentsByIdError, PutBotsByBotIdSubagentsByIdErrors, PutBotsByBotIdSubagentsByIdResponse, PutBotsByBotIdSubagentsByIdResponses, PutBotsByBotIdSubagentsByIdSkillsData, PutBotsByBotIdSubagentsByIdSkillsError, PutBotsByBotIdSubagentsByIdSkillsErrors, PutBotsByBotIdSubagentsByIdSkillsResponse, PutBotsByBotIdSubagentsByIdSkillsResponses, PutBotsByBotIdWhitelistData, PutBotsByBotIdWhitelistError, PutBotsByBotIdWhitelistErrors, PutBotsByBotIdWhitelistResponse, PutBotsByBotIdWhitelistResponses, PutBotsByIdChannelByPlatformData, PutBotsByIdChannelByPlatformError, PutBotsByIdChannelByPlatformErrors, PutBotsByIdChannelByPlatformResponse, PutBotsByIdChannelByPlatformResponses, PutBotsByIdData, PutBotsByIdError, PutBotsByIdErrors, PutBotsByIdOwnerData, PutBotsByIdOwnerError, PutBotsByIdOwnerErrors, PutBotsByIdOwnerResponse, PutBotsByIdOwnerResponses, PutBotsByIdResponse, PutBotsByIdResponses, PutBrowserContextsByIdData, PutBrowserContextsByIdError, PutBrowserContextsByIdErrors, PutBrowserContextsByIdResponse, PutBrowserContextsByIdResponses, PutEmailProvidersByIdData, PutEmailProvidersByIdError, PutEmailProvidersByIdErrors, PutEmailProvidersByIdResponse, PutEmailProvidersByIdResponses, PutMemoryProvidersByIdData, PutMemoryProvidersByIdError, PutMemoryProvidersByIdErrors, PutMemoryProvidersByIdResponse, PutMemoryProvidersByIdResponses, PutModelsByIdData, PutModelsByIdError, PutModelsByIdErrors, PutModelsByIdResponse, PutModelsByIdResponses, PutModelsModelByModelIdData, PutModelsModelByModelIdError, PutModelsModelByModelIdErrors, PutModelsModelByModelIdResponse, PutModelsModelByModelIdResponses, PutProvidersByIdData, PutProvidersByIdError, PutProvidersByIdErrors, PutProvidersByIdResponse, PutProvidersByIdResponses, PutSearchProvidersByIdData, PutSearchProvidersByIdError, PutSearchProvidersByIdErrors, PutSearchProvidersByIdResponse, PutSearchProvidersByIdResponses, PutTtsModelsByIdData, PutTtsModelsByIdError, PutTtsModelsByIdErrors, PutTtsModelsByIdResponse, PutTtsModelsByIdResponses, PutTtsProvidersByIdData, PutTtsProvidersByIdError, PutTtsProvidersByIdErrors, PutTtsProvidersByIdResponse, PutTtsProvidersByIdResponses, PutUsersByIdData, PutUsersByIdError, PutUsersByIdErrors, PutUsersByIdPasswordData, PutUsersByIdPasswordError, PutUsersByIdPasswordErrors, PutUsersByIdPasswordResponses, PutUsersByIdResponse, PutUsersByIdResponses, PutUsersMeChannelsByPlatformData, PutUsersMeChannelsByPlatformError, PutUsersMeChannelsByPlatformErrors, PutUsersMeChannelsByPlatformResponse, PutUsersMeChannelsByPlatformResponses, PutUsersMeData, PutUsersMeError, PutUsersMeErrors, PutUsersMePasswordData, PutUsersMePasswordError, PutUsersMePasswordErrors, PutUsersMePasswordResponses, PutUsersMeResponse, PutUsersMeResponses, ScheduleCreateRequest, ScheduleListLogsResponse, ScheduleListResponse, ScheduleLog, ScheduleNullableInt, ScheduleSchedule, ScheduleUpdateRequest, SearchprovidersCreateRequest, SearchprovidersGetResponse, SearchprovidersProviderConfigSchema, SearchprovidersProviderFieldSchema, SearchprovidersProviderMeta, SearchprovidersProviderName, SearchprovidersUpdateRequest, SessionSession, SettingsSettings, SettingsUpsertRequest, SubagentAddSkillsRequest, SubagentContextResponse, SubagentCreateRequest, SubagentListResponse, SubagentSkillsResponse, SubagentSubagent, SubagentUpdateContextRequest, SubagentUpdateRequest, SubagentUpdateSkillsRequest, TtsCreateModelRequest, TtsCreateProviderRequest, TtsModelCapabilities, TtsModelInfo, TtsModelResponse, TtsParamConstraint, TtsProviderMetaResponse, TtsProviderResponse, TtsTestSynthesizeRequest, TtsUpdateModelRequest, TtsUpdateProviderRequest, TtsVoiceInfo } from './types.gen'; diff --git a/packages/sdk/src/sdk.gen.ts b/packages/sdk/src/sdk.gen.ts index 5ad93ec4..a6a5ea29 100644 --- a/packages/sdk/src/sdk.gen.ts +++ b/packages/sdk/src/sdk.gen.ts @@ -2,7 +2,7 @@ import { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client'; import { client } from './client.gen'; -import type { DeleteBotsByBotIdBlacklistByRuleIdData, DeleteBotsByBotIdBlacklistByRuleIdErrors, DeleteBotsByBotIdBlacklistByRuleIdResponses, DeleteBotsByBotIdContainerData, DeleteBotsByBotIdContainerErrors, DeleteBotsByBotIdContainerResponses, DeleteBotsByBotIdContainerSkillsData, DeleteBotsByBotIdContainerSkillsErrors, DeleteBotsByBotIdContainerSkillsResponses, DeleteBotsByBotIdEmailBindingsByIdData, DeleteBotsByBotIdEmailBindingsByIdErrors, DeleteBotsByBotIdEmailBindingsByIdResponses, DeleteBotsByBotIdHeartbeatLogsData, DeleteBotsByBotIdHeartbeatLogsErrors, DeleteBotsByBotIdHeartbeatLogsResponses, DeleteBotsByBotIdMcpByIdData, DeleteBotsByBotIdMcpByIdErrors, DeleteBotsByBotIdMcpByIdOauthTokenData, DeleteBotsByBotIdMcpByIdOauthTokenErrors, DeleteBotsByBotIdMcpByIdOauthTokenResponses, DeleteBotsByBotIdMcpByIdResponses, DeleteBotsByBotIdMemoryByIdData, DeleteBotsByBotIdMemoryByIdErrors, DeleteBotsByBotIdMemoryByIdResponses, DeleteBotsByBotIdMemoryData, DeleteBotsByBotIdMemoryErrors, DeleteBotsByBotIdMemoryResponses, DeleteBotsByBotIdMessagesData, DeleteBotsByBotIdMessagesErrors, DeleteBotsByBotIdMessagesResponses, DeleteBotsByBotIdScheduleByIdData, DeleteBotsByBotIdScheduleByIdErrors, DeleteBotsByBotIdScheduleByIdResponses, DeleteBotsByBotIdScheduleLogsData, DeleteBotsByBotIdScheduleLogsErrors, DeleteBotsByBotIdScheduleLogsResponses, DeleteBotsByBotIdSessionsBySessionIdData, DeleteBotsByBotIdSessionsBySessionIdErrors, DeleteBotsByBotIdSessionsBySessionIdResponses, DeleteBotsByBotIdSettingsData, DeleteBotsByBotIdSettingsErrors, DeleteBotsByBotIdSettingsResponses, DeleteBotsByBotIdSubagentsByIdData, DeleteBotsByBotIdSubagentsByIdErrors, DeleteBotsByBotIdSubagentsByIdResponses, DeleteBotsByBotIdWhitelistByRuleIdData, DeleteBotsByBotIdWhitelistByRuleIdErrors, DeleteBotsByBotIdWhitelistByRuleIdResponses, DeleteBotsByIdChannelByPlatformData, DeleteBotsByIdChannelByPlatformErrors, DeleteBotsByIdChannelByPlatformResponses, DeleteBotsByIdData, DeleteBotsByIdErrors, DeleteBotsByIdResponses, DeleteBrowserContextsByIdData, DeleteBrowserContextsByIdErrors, DeleteBrowserContextsByIdResponses, DeleteEmailProvidersByIdData, DeleteEmailProvidersByIdErrors, DeleteEmailProvidersByIdOauthTokenData, DeleteEmailProvidersByIdOauthTokenErrors, DeleteEmailProvidersByIdOauthTokenResponses, DeleteEmailProvidersByIdResponses, DeleteMemoryProvidersByIdData, DeleteMemoryProvidersByIdErrors, DeleteMemoryProvidersByIdResponses, DeleteModelsByIdData, DeleteModelsByIdErrors, DeleteModelsByIdResponses, DeleteModelsModelByModelIdData, DeleteModelsModelByModelIdErrors, DeleteModelsModelByModelIdResponses, DeleteProvidersByIdData, DeleteProvidersByIdErrors, DeleteProvidersByIdResponses, DeleteSearchProvidersByIdData, DeleteSearchProvidersByIdErrors, DeleteSearchProvidersByIdResponses, DeleteTtsModelsByIdData, DeleteTtsModelsByIdErrors, DeleteTtsModelsByIdResponses, DeleteTtsProvidersByIdData, DeleteTtsProvidersByIdErrors, DeleteTtsProvidersByIdResponses, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsData, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsErrors, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsResponses, GetBotsByBotIdAccessChannelIdentitiesData, GetBotsByBotIdAccessChannelIdentitiesErrors, GetBotsByBotIdAccessChannelIdentitiesResponses, GetBotsByBotIdAccessUsersData, GetBotsByBotIdAccessUsersErrors, GetBotsByBotIdAccessUsersResponses, GetBotsByBotIdBlacklistData, GetBotsByBotIdBlacklistErrors, GetBotsByBotIdBlacklistResponses, GetBotsByBotIdCliStreamData, GetBotsByBotIdCliStreamErrors, GetBotsByBotIdCliStreamResponses, GetBotsByBotIdCliWsData, GetBotsByBotIdCliWsErrors, GetBotsByBotIdContainerData, GetBotsByBotIdContainerErrors, GetBotsByBotIdContainerFsData, GetBotsByBotIdContainerFsDownloadData, GetBotsByBotIdContainerFsDownloadErrors, GetBotsByBotIdContainerFsDownloadResponses, GetBotsByBotIdContainerFsErrors, GetBotsByBotIdContainerFsListData, GetBotsByBotIdContainerFsListErrors, GetBotsByBotIdContainerFsListResponses, GetBotsByBotIdContainerFsReadData, GetBotsByBotIdContainerFsReadErrors, GetBotsByBotIdContainerFsReadResponses, GetBotsByBotIdContainerFsResponses, GetBotsByBotIdContainerResponses, GetBotsByBotIdContainerSkillsData, GetBotsByBotIdContainerSkillsErrors, GetBotsByBotIdContainerSkillsResponses, GetBotsByBotIdContainerSnapshotsData, GetBotsByBotIdContainerSnapshotsErrors, GetBotsByBotIdContainerSnapshotsResponses, GetBotsByBotIdContainerTerminalData, GetBotsByBotIdContainerTerminalErrors, GetBotsByBotIdContainerTerminalResponses, GetBotsByBotIdContainerTerminalWsData, GetBotsByBotIdContainerTerminalWsErrors, GetBotsByBotIdEmailBindingsData, GetBotsByBotIdEmailBindingsErrors, GetBotsByBotIdEmailBindingsResponses, GetBotsByBotIdEmailOutboxByIdData, GetBotsByBotIdEmailOutboxByIdErrors, GetBotsByBotIdEmailOutboxByIdResponses, GetBotsByBotIdEmailOutboxData, GetBotsByBotIdEmailOutboxErrors, GetBotsByBotIdEmailOutboxResponses, GetBotsByBotIdHeartbeatLogsData, GetBotsByBotIdHeartbeatLogsErrors, GetBotsByBotIdHeartbeatLogsResponses, GetBotsByBotIdMcpByIdData, GetBotsByBotIdMcpByIdErrors, GetBotsByBotIdMcpByIdOauthStatusData, GetBotsByBotIdMcpByIdOauthStatusErrors, GetBotsByBotIdMcpByIdOauthStatusResponses, GetBotsByBotIdMcpByIdResponses, GetBotsByBotIdMcpData, GetBotsByBotIdMcpErrors, GetBotsByBotIdMcpExportData, GetBotsByBotIdMcpExportErrors, GetBotsByBotIdMcpExportResponses, GetBotsByBotIdMcpResponses, GetBotsByBotIdMemoryData, GetBotsByBotIdMemoryErrors, GetBotsByBotIdMemoryResponses, GetBotsByBotIdMemoryStatusData, GetBotsByBotIdMemoryStatusErrors, GetBotsByBotIdMemoryStatusResponses, GetBotsByBotIdMemoryUsageData, GetBotsByBotIdMemoryUsageErrors, GetBotsByBotIdMemoryUsageResponses, GetBotsByBotIdMessagesData, GetBotsByBotIdMessagesErrors, GetBotsByBotIdMessagesResponses, GetBotsByBotIdScheduleByIdData, GetBotsByBotIdScheduleByIdErrors, GetBotsByBotIdScheduleByIdLogsData, GetBotsByBotIdScheduleByIdLogsErrors, GetBotsByBotIdScheduleByIdLogsResponses, GetBotsByBotIdScheduleByIdResponses, GetBotsByBotIdScheduleData, GetBotsByBotIdScheduleErrors, GetBotsByBotIdScheduleLogsData, GetBotsByBotIdScheduleLogsErrors, GetBotsByBotIdScheduleLogsResponses, GetBotsByBotIdScheduleResponses, GetBotsByBotIdSessionsBySessionIdData, GetBotsByBotIdSessionsBySessionIdErrors, GetBotsByBotIdSessionsBySessionIdResponses, GetBotsByBotIdSessionsData, GetBotsByBotIdSessionsErrors, GetBotsByBotIdSessionsResponses, GetBotsByBotIdSettingsData, GetBotsByBotIdSettingsErrors, GetBotsByBotIdSettingsResponses, GetBotsByBotIdSubagentsByIdContextData, GetBotsByBotIdSubagentsByIdContextErrors, GetBotsByBotIdSubagentsByIdContextResponses, GetBotsByBotIdSubagentsByIdData, GetBotsByBotIdSubagentsByIdErrors, GetBotsByBotIdSubagentsByIdResponses, GetBotsByBotIdSubagentsByIdSkillsData, GetBotsByBotIdSubagentsByIdSkillsErrors, GetBotsByBotIdSubagentsByIdSkillsResponses, GetBotsByBotIdSubagentsData, GetBotsByBotIdSubagentsErrors, GetBotsByBotIdSubagentsResponses, GetBotsByBotIdTokenUsageData, GetBotsByBotIdTokenUsageErrors, GetBotsByBotIdTokenUsageResponses, GetBotsByBotIdWebStreamData, GetBotsByBotIdWebStreamErrors, GetBotsByBotIdWebStreamResponses, GetBotsByBotIdWebWsData, GetBotsByBotIdWebWsErrors, GetBotsByBotIdWhitelistData, GetBotsByBotIdWhitelistErrors, GetBotsByBotIdWhitelistResponses, GetBotsByIdChannelByPlatformData, GetBotsByIdChannelByPlatformErrors, GetBotsByIdChannelByPlatformResponses, GetBotsByIdChecksData, GetBotsByIdChecksErrors, GetBotsByIdChecksResponses, GetBotsByIdData, GetBotsByIdErrors, GetBotsByIdResponses, GetBotsData, GetBotsErrors, GetBotsResponses, GetBrowserContextsByIdData, GetBrowserContextsByIdErrors, GetBrowserContextsByIdResponses, GetBrowserContextsCoresData, GetBrowserContextsCoresErrors, GetBrowserContextsCoresResponses, GetBrowserContextsData, GetBrowserContextsErrors, GetBrowserContextsResponses, GetChannelsByPlatformData, GetChannelsByPlatformErrors, GetChannelsByPlatformResponses, GetChannelsData, GetChannelsErrors, GetChannelsResponses, GetEmailOauthCallbackData, GetEmailOauthCallbackErrors, GetEmailOauthCallbackResponses, GetEmailProvidersByIdData, GetEmailProvidersByIdErrors, GetEmailProvidersByIdOauthAuthorizeData, GetEmailProvidersByIdOauthAuthorizeErrors, GetEmailProvidersByIdOauthAuthorizeResponses, GetEmailProvidersByIdOauthStatusData, GetEmailProvidersByIdOauthStatusErrors, GetEmailProvidersByIdOauthStatusResponses, GetEmailProvidersByIdResponses, GetEmailProvidersData, GetEmailProvidersErrors, GetEmailProvidersMetaData, GetEmailProvidersMetaResponses, GetEmailProvidersResponses, GetMemoryProvidersByIdData, GetMemoryProvidersByIdErrors, GetMemoryProvidersByIdResponses, GetMemoryProvidersByIdStatusData, GetMemoryProvidersByIdStatusErrors, GetMemoryProvidersByIdStatusResponses, GetMemoryProvidersData, GetMemoryProvidersErrors, GetMemoryProvidersMetaData, GetMemoryProvidersMetaResponses, GetMemoryProvidersResponses, GetModelsByIdData, GetModelsByIdErrors, GetModelsByIdResponses, GetModelsCountData, GetModelsCountErrors, GetModelsCountResponses, GetModelsData, GetModelsErrors, GetModelsModelByModelIdData, GetModelsModelByModelIdErrors, GetModelsModelByModelIdResponses, GetModelsResponses, GetPingData, GetPingResponses, GetProvidersByIdData, GetProvidersByIdErrors, GetProvidersByIdModelsData, GetProvidersByIdModelsErrors, GetProvidersByIdModelsResponses, GetProvidersByIdResponses, GetProvidersCountData, GetProvidersCountErrors, GetProvidersCountResponses, GetProvidersData, GetProvidersErrors, GetProvidersNameByNameData, GetProvidersNameByNameErrors, GetProvidersNameByNameResponses, GetProvidersResponses, GetSearchProvidersByIdData, GetSearchProvidersByIdErrors, GetSearchProvidersByIdResponses, GetSearchProvidersData, GetSearchProvidersErrors, GetSearchProvidersMetaData, GetSearchProvidersMetaResponses, GetSearchProvidersResponses, GetTtsModelsByIdCapabilitiesData, GetTtsModelsByIdCapabilitiesErrors, GetTtsModelsByIdCapabilitiesResponses, GetTtsModelsByIdData, GetTtsModelsByIdErrors, GetTtsModelsByIdResponses, GetTtsModelsData, GetTtsModelsErrors, GetTtsModelsResponses, GetTtsProvidersByIdData, GetTtsProvidersByIdErrors, GetTtsProvidersByIdModelsData, GetTtsProvidersByIdModelsErrors, GetTtsProvidersByIdModelsResponses, GetTtsProvidersByIdResponses, GetTtsProvidersData, GetTtsProvidersErrors, GetTtsProvidersMetaData, GetTtsProvidersMetaResponses, GetTtsProvidersResponses, GetUsersByIdData, GetUsersByIdErrors, GetUsersByIdResponses, GetUsersData, GetUsersErrors, GetUsersMeChannelsByPlatformData, GetUsersMeChannelsByPlatformErrors, GetUsersMeChannelsByPlatformResponses, GetUsersMeData, GetUsersMeErrors, GetUsersMeIdentitiesData, GetUsersMeIdentitiesErrors, GetUsersMeIdentitiesResponses, GetUsersMeResponses, GetUsersResponses, PatchBotsByBotIdSessionsBySessionIdData, PatchBotsByBotIdSessionsBySessionIdErrors, PatchBotsByBotIdSessionsBySessionIdResponses, PatchBotsByIdChannelByPlatformStatusData, PatchBotsByIdChannelByPlatformStatusErrors, PatchBotsByIdChannelByPlatformStatusResponses, PostAuthLoginData, PostAuthLoginErrors, PostAuthLoginResponses, PostAuthRefreshData, PostAuthRefreshErrors, PostAuthRefreshResponses, PostBotsByBotIdCliMessagesData, PostBotsByBotIdCliMessagesErrors, PostBotsByBotIdCliMessagesResponses, PostBotsByBotIdContainerData, PostBotsByBotIdContainerDataExportData, PostBotsByBotIdContainerDataExportErrors, PostBotsByBotIdContainerDataExportResponses, PostBotsByBotIdContainerDataImportData, PostBotsByBotIdContainerDataImportErrors, PostBotsByBotIdContainerDataImportResponses, PostBotsByBotIdContainerDataRestoreData, PostBotsByBotIdContainerDataRestoreErrors, PostBotsByBotIdContainerDataRestoreResponses, PostBotsByBotIdContainerErrors, PostBotsByBotIdContainerFsDeleteData, PostBotsByBotIdContainerFsDeleteErrors, PostBotsByBotIdContainerFsDeleteResponses, PostBotsByBotIdContainerFsMkdirData, PostBotsByBotIdContainerFsMkdirErrors, PostBotsByBotIdContainerFsMkdirResponses, PostBotsByBotIdContainerFsRenameData, PostBotsByBotIdContainerFsRenameErrors, PostBotsByBotIdContainerFsRenameResponses, PostBotsByBotIdContainerFsUploadData, PostBotsByBotIdContainerFsUploadErrors, PostBotsByBotIdContainerFsUploadResponses, PostBotsByBotIdContainerFsWriteData, PostBotsByBotIdContainerFsWriteErrors, PostBotsByBotIdContainerFsWriteResponses, PostBotsByBotIdContainerResponses, PostBotsByBotIdContainerSkillsData, PostBotsByBotIdContainerSkillsErrors, PostBotsByBotIdContainerSkillsResponses, PostBotsByBotIdContainerSnapshotsData, PostBotsByBotIdContainerSnapshotsErrors, PostBotsByBotIdContainerSnapshotsResponses, PostBotsByBotIdContainerSnapshotsRollbackData, PostBotsByBotIdContainerSnapshotsRollbackErrors, PostBotsByBotIdContainerSnapshotsRollbackResponses, PostBotsByBotIdContainerStartData, PostBotsByBotIdContainerStartErrors, PostBotsByBotIdContainerStartResponses, PostBotsByBotIdContainerStopData, PostBotsByBotIdContainerStopErrors, PostBotsByBotIdContainerStopResponses, PostBotsByBotIdEmailBindingsData, PostBotsByBotIdEmailBindingsErrors, PostBotsByBotIdEmailBindingsResponses, PostBotsByBotIdMcpByIdOauthAuthorizeData, PostBotsByBotIdMcpByIdOauthAuthorizeErrors, PostBotsByBotIdMcpByIdOauthAuthorizeResponses, PostBotsByBotIdMcpByIdOauthDiscoverData, PostBotsByBotIdMcpByIdOauthDiscoverErrors, PostBotsByBotIdMcpByIdOauthDiscoverResponses, PostBotsByBotIdMcpByIdOauthExchangeData, PostBotsByBotIdMcpByIdOauthExchangeErrors, PostBotsByBotIdMcpByIdOauthExchangeResponses, PostBotsByBotIdMcpByIdProbeData, PostBotsByBotIdMcpByIdProbeErrors, PostBotsByBotIdMcpByIdProbeResponses, PostBotsByBotIdMcpData, PostBotsByBotIdMcpErrors, PostBotsByBotIdMcpOpsBatchDeleteData, PostBotsByBotIdMcpOpsBatchDeleteErrors, PostBotsByBotIdMcpOpsBatchDeleteResponses, PostBotsByBotIdMcpResponses, PostBotsByBotIdMcpStdioByConnectionIdData, PostBotsByBotIdMcpStdioByConnectionIdErrors, PostBotsByBotIdMcpStdioByConnectionIdResponses, PostBotsByBotIdMcpStdioData, PostBotsByBotIdMcpStdioErrors, PostBotsByBotIdMcpStdioResponses, PostBotsByBotIdMemoryCompactData, PostBotsByBotIdMemoryCompactErrors, PostBotsByBotIdMemoryCompactResponses, PostBotsByBotIdMemoryData, PostBotsByBotIdMemoryErrors, PostBotsByBotIdMemoryRebuildData, PostBotsByBotIdMemoryRebuildErrors, PostBotsByBotIdMemoryRebuildResponses, PostBotsByBotIdMemoryResponses, PostBotsByBotIdMemorySearchData, PostBotsByBotIdMemorySearchErrors, PostBotsByBotIdMemorySearchResponses, PostBotsByBotIdScheduleData, PostBotsByBotIdScheduleErrors, PostBotsByBotIdScheduleResponses, PostBotsByBotIdSessionsData, PostBotsByBotIdSessionsErrors, PostBotsByBotIdSessionsResponses, PostBotsByBotIdSettingsData, PostBotsByBotIdSettingsErrors, PostBotsByBotIdSettingsResponses, PostBotsByBotIdSubagentsByIdSkillsData, PostBotsByBotIdSubagentsByIdSkillsErrors, PostBotsByBotIdSubagentsByIdSkillsResponses, PostBotsByBotIdSubagentsData, PostBotsByBotIdSubagentsErrors, PostBotsByBotIdSubagentsResponses, PostBotsByBotIdToolsData, PostBotsByBotIdToolsErrors, PostBotsByBotIdToolsResponses, PostBotsByBotIdTtsSynthesizeData, PostBotsByBotIdTtsSynthesizeErrors, PostBotsByBotIdTtsSynthesizeResponses, PostBotsByBotIdWebMessagesData, PostBotsByBotIdWebMessagesErrors, PostBotsByBotIdWebMessagesResponses, PostBotsByIdChannelByPlatformSendChatData, PostBotsByIdChannelByPlatformSendChatErrors, PostBotsByIdChannelByPlatformSendChatResponses, PostBotsByIdChannelByPlatformSendData, PostBotsByIdChannelByPlatformSendErrors, PostBotsByIdChannelByPlatformSendResponses, PostBotsData, PostBotsErrors, PostBotsResponses, PostBrowserContextsData, PostBrowserContextsErrors, PostBrowserContextsResponses, PostEmailMailgunWebhookByConfigIdData, PostEmailMailgunWebhookByConfigIdErrors, PostEmailMailgunWebhookByConfigIdResponses, PostEmailProvidersData, PostEmailProvidersErrors, PostEmailProvidersResponses, PostMemoryProvidersData, PostMemoryProvidersErrors, PostMemoryProvidersResponses, PostModelsByIdTestData, PostModelsByIdTestErrors, PostModelsByIdTestResponses, PostModelsData, PostModelsErrors, PostModelsResponses, PostProvidersByIdImportModelsData, PostProvidersByIdImportModelsErrors, PostProvidersByIdImportModelsResponses, PostProvidersByIdTestData, PostProvidersByIdTestErrors, PostProvidersByIdTestResponses, PostProvidersData, PostProvidersErrors, PostProvidersResponses, PostSearchProvidersData, PostSearchProvidersErrors, PostSearchProvidersResponses, PostTtsModelsByIdTestData, PostTtsModelsByIdTestErrors, PostTtsModelsByIdTestResponses, PostTtsModelsData, PostTtsModelsErrors, PostTtsModelsResponses, PostTtsProvidersByIdImportModelsData, PostTtsProvidersByIdImportModelsErrors, PostTtsProvidersByIdImportModelsResponses, PostTtsProvidersData, PostTtsProvidersErrors, PostTtsProvidersResponses, PostUsersData, PostUsersErrors, PostUsersResponses, PutBotsByBotIdBlacklistData, PutBotsByBotIdBlacklistErrors, PutBotsByBotIdBlacklistResponses, PutBotsByBotIdEmailBindingsByIdData, PutBotsByBotIdEmailBindingsByIdErrors, PutBotsByBotIdEmailBindingsByIdResponses, PutBotsByBotIdMcpByIdData, PutBotsByBotIdMcpByIdErrors, PutBotsByBotIdMcpByIdResponses, PutBotsByBotIdMcpImportData, PutBotsByBotIdMcpImportErrors, PutBotsByBotIdMcpImportResponses, PutBotsByBotIdScheduleByIdData, PutBotsByBotIdScheduleByIdErrors, PutBotsByBotIdScheduleByIdResponses, PutBotsByBotIdSettingsData, PutBotsByBotIdSettingsErrors, PutBotsByBotIdSettingsResponses, PutBotsByBotIdSubagentsByIdContextData, PutBotsByBotIdSubagentsByIdContextErrors, PutBotsByBotIdSubagentsByIdContextResponses, PutBotsByBotIdSubagentsByIdData, PutBotsByBotIdSubagentsByIdErrors, PutBotsByBotIdSubagentsByIdResponses, PutBotsByBotIdSubagentsByIdSkillsData, PutBotsByBotIdSubagentsByIdSkillsErrors, PutBotsByBotIdSubagentsByIdSkillsResponses, PutBotsByBotIdWhitelistData, PutBotsByBotIdWhitelistErrors, PutBotsByBotIdWhitelistResponses, PutBotsByIdChannelByPlatformData, PutBotsByIdChannelByPlatformErrors, PutBotsByIdChannelByPlatformResponses, PutBotsByIdData, PutBotsByIdErrors, PutBotsByIdOwnerData, PutBotsByIdOwnerErrors, PutBotsByIdOwnerResponses, PutBotsByIdResponses, PutBrowserContextsByIdData, PutBrowserContextsByIdErrors, PutBrowserContextsByIdResponses, PutEmailProvidersByIdData, PutEmailProvidersByIdErrors, PutEmailProvidersByIdResponses, PutMemoryProvidersByIdData, PutMemoryProvidersByIdErrors, PutMemoryProvidersByIdResponses, PutModelsByIdData, PutModelsByIdErrors, PutModelsByIdResponses, PutModelsModelByModelIdData, PutModelsModelByModelIdErrors, PutModelsModelByModelIdResponses, PutProvidersByIdData, PutProvidersByIdErrors, PutProvidersByIdResponses, PutSearchProvidersByIdData, PutSearchProvidersByIdErrors, PutSearchProvidersByIdResponses, PutTtsModelsByIdData, PutTtsModelsByIdErrors, PutTtsModelsByIdResponses, PutTtsProvidersByIdData, PutTtsProvidersByIdErrors, PutTtsProvidersByIdResponses, PutUsersByIdData, PutUsersByIdErrors, PutUsersByIdPasswordData, PutUsersByIdPasswordErrors, PutUsersByIdPasswordResponses, PutUsersByIdResponses, PutUsersMeChannelsByPlatformData, PutUsersMeChannelsByPlatformErrors, PutUsersMeChannelsByPlatformResponses, PutUsersMeData, PutUsersMeErrors, PutUsersMePasswordData, PutUsersMePasswordErrors, PutUsersMePasswordResponses, PutUsersMeResponses } from './types.gen'; +import type { DeleteBotsByBotIdBlacklistByRuleIdData, DeleteBotsByBotIdBlacklistByRuleIdErrors, DeleteBotsByBotIdBlacklistByRuleIdResponses, DeleteBotsByBotIdCompactionLogsData, DeleteBotsByBotIdCompactionLogsErrors, DeleteBotsByBotIdCompactionLogsResponses, DeleteBotsByBotIdContainerData, DeleteBotsByBotIdContainerErrors, DeleteBotsByBotIdContainerResponses, DeleteBotsByBotIdContainerSkillsData, DeleteBotsByBotIdContainerSkillsErrors, DeleteBotsByBotIdContainerSkillsResponses, DeleteBotsByBotIdEmailBindingsByIdData, DeleteBotsByBotIdEmailBindingsByIdErrors, DeleteBotsByBotIdEmailBindingsByIdResponses, DeleteBotsByBotIdHeartbeatLogsData, DeleteBotsByBotIdHeartbeatLogsErrors, DeleteBotsByBotIdHeartbeatLogsResponses, DeleteBotsByBotIdMcpByIdData, DeleteBotsByBotIdMcpByIdErrors, DeleteBotsByBotIdMcpByIdOauthTokenData, DeleteBotsByBotIdMcpByIdOauthTokenErrors, DeleteBotsByBotIdMcpByIdOauthTokenResponses, DeleteBotsByBotIdMcpByIdResponses, DeleteBotsByBotIdMemoryByIdData, DeleteBotsByBotIdMemoryByIdErrors, DeleteBotsByBotIdMemoryByIdResponses, DeleteBotsByBotIdMemoryData, DeleteBotsByBotIdMemoryErrors, DeleteBotsByBotIdMemoryResponses, DeleteBotsByBotIdMessagesData, DeleteBotsByBotIdMessagesErrors, DeleteBotsByBotIdMessagesResponses, DeleteBotsByBotIdScheduleByIdData, DeleteBotsByBotIdScheduleByIdErrors, DeleteBotsByBotIdScheduleByIdResponses, DeleteBotsByBotIdScheduleLogsData, DeleteBotsByBotIdScheduleLogsErrors, DeleteBotsByBotIdScheduleLogsResponses, DeleteBotsByBotIdSessionsBySessionIdData, DeleteBotsByBotIdSessionsBySessionIdErrors, DeleteBotsByBotIdSessionsBySessionIdResponses, DeleteBotsByBotIdSettingsData, DeleteBotsByBotIdSettingsErrors, DeleteBotsByBotIdSettingsResponses, DeleteBotsByBotIdSubagentsByIdData, DeleteBotsByBotIdSubagentsByIdErrors, DeleteBotsByBotIdSubagentsByIdResponses, DeleteBotsByBotIdWhitelistByRuleIdData, DeleteBotsByBotIdWhitelistByRuleIdErrors, DeleteBotsByBotIdWhitelistByRuleIdResponses, DeleteBotsByIdChannelByPlatformData, DeleteBotsByIdChannelByPlatformErrors, DeleteBotsByIdChannelByPlatformResponses, DeleteBotsByIdData, DeleteBotsByIdErrors, DeleteBotsByIdResponses, DeleteBrowserContextsByIdData, DeleteBrowserContextsByIdErrors, DeleteBrowserContextsByIdResponses, DeleteEmailProvidersByIdData, DeleteEmailProvidersByIdErrors, DeleteEmailProvidersByIdOauthTokenData, DeleteEmailProvidersByIdOauthTokenErrors, DeleteEmailProvidersByIdOauthTokenResponses, DeleteEmailProvidersByIdResponses, DeleteMemoryProvidersByIdData, DeleteMemoryProvidersByIdErrors, DeleteMemoryProvidersByIdResponses, DeleteModelsByIdData, DeleteModelsByIdErrors, DeleteModelsByIdResponses, DeleteModelsModelByModelIdData, DeleteModelsModelByModelIdErrors, DeleteModelsModelByModelIdResponses, DeleteProvidersByIdData, DeleteProvidersByIdErrors, DeleteProvidersByIdResponses, DeleteSearchProvidersByIdData, DeleteSearchProvidersByIdErrors, DeleteSearchProvidersByIdResponses, DeleteTtsModelsByIdData, DeleteTtsModelsByIdErrors, DeleteTtsModelsByIdResponses, DeleteTtsProvidersByIdData, DeleteTtsProvidersByIdErrors, DeleteTtsProvidersByIdResponses, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsData, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsErrors, GetBotsByBotIdAccessChannelIdentitiesByChannelIdentityIdConversationsResponses, GetBotsByBotIdAccessChannelIdentitiesData, GetBotsByBotIdAccessChannelIdentitiesErrors, GetBotsByBotIdAccessChannelIdentitiesResponses, GetBotsByBotIdAccessUsersData, GetBotsByBotIdAccessUsersErrors, GetBotsByBotIdAccessUsersResponses, GetBotsByBotIdBlacklistData, GetBotsByBotIdBlacklistErrors, GetBotsByBotIdBlacklistResponses, GetBotsByBotIdCliStreamData, GetBotsByBotIdCliStreamErrors, GetBotsByBotIdCliStreamResponses, GetBotsByBotIdCliWsData, GetBotsByBotIdCliWsErrors, GetBotsByBotIdCompactionLogsData, GetBotsByBotIdCompactionLogsErrors, GetBotsByBotIdCompactionLogsResponses, GetBotsByBotIdContainerData, GetBotsByBotIdContainerErrors, GetBotsByBotIdContainerFsData, GetBotsByBotIdContainerFsDownloadData, GetBotsByBotIdContainerFsDownloadErrors, GetBotsByBotIdContainerFsDownloadResponses, GetBotsByBotIdContainerFsErrors, GetBotsByBotIdContainerFsListData, GetBotsByBotIdContainerFsListErrors, GetBotsByBotIdContainerFsListResponses, GetBotsByBotIdContainerFsReadData, GetBotsByBotIdContainerFsReadErrors, GetBotsByBotIdContainerFsReadResponses, GetBotsByBotIdContainerFsResponses, GetBotsByBotIdContainerResponses, GetBotsByBotIdContainerSkillsData, GetBotsByBotIdContainerSkillsErrors, GetBotsByBotIdContainerSkillsResponses, GetBotsByBotIdContainerSnapshotsData, GetBotsByBotIdContainerSnapshotsErrors, GetBotsByBotIdContainerSnapshotsResponses, GetBotsByBotIdContainerTerminalData, GetBotsByBotIdContainerTerminalErrors, GetBotsByBotIdContainerTerminalResponses, GetBotsByBotIdContainerTerminalWsData, GetBotsByBotIdContainerTerminalWsErrors, GetBotsByBotIdEmailBindingsData, GetBotsByBotIdEmailBindingsErrors, GetBotsByBotIdEmailBindingsResponses, GetBotsByBotIdEmailOutboxByIdData, GetBotsByBotIdEmailOutboxByIdErrors, GetBotsByBotIdEmailOutboxByIdResponses, GetBotsByBotIdEmailOutboxData, GetBotsByBotIdEmailOutboxErrors, GetBotsByBotIdEmailOutboxResponses, GetBotsByBotIdHeartbeatLogsData, GetBotsByBotIdHeartbeatLogsErrors, GetBotsByBotIdHeartbeatLogsResponses, GetBotsByBotIdMcpByIdData, GetBotsByBotIdMcpByIdErrors, GetBotsByBotIdMcpByIdOauthStatusData, GetBotsByBotIdMcpByIdOauthStatusErrors, GetBotsByBotIdMcpByIdOauthStatusResponses, GetBotsByBotIdMcpByIdResponses, GetBotsByBotIdMcpData, GetBotsByBotIdMcpErrors, GetBotsByBotIdMcpExportData, GetBotsByBotIdMcpExportErrors, GetBotsByBotIdMcpExportResponses, GetBotsByBotIdMcpResponses, GetBotsByBotIdMemoryData, GetBotsByBotIdMemoryErrors, GetBotsByBotIdMemoryResponses, GetBotsByBotIdMemoryStatusData, GetBotsByBotIdMemoryStatusErrors, GetBotsByBotIdMemoryStatusResponses, GetBotsByBotIdMemoryUsageData, GetBotsByBotIdMemoryUsageErrors, GetBotsByBotIdMemoryUsageResponses, GetBotsByBotIdMessagesData, GetBotsByBotIdMessagesErrors, GetBotsByBotIdMessagesResponses, GetBotsByBotIdScheduleByIdData, GetBotsByBotIdScheduleByIdErrors, GetBotsByBotIdScheduleByIdLogsData, GetBotsByBotIdScheduleByIdLogsErrors, GetBotsByBotIdScheduleByIdLogsResponses, GetBotsByBotIdScheduleByIdResponses, GetBotsByBotIdScheduleData, GetBotsByBotIdScheduleErrors, GetBotsByBotIdScheduleLogsData, GetBotsByBotIdScheduleLogsErrors, GetBotsByBotIdScheduleLogsResponses, GetBotsByBotIdScheduleResponses, GetBotsByBotIdSessionsBySessionIdData, GetBotsByBotIdSessionsBySessionIdErrors, GetBotsByBotIdSessionsBySessionIdResponses, GetBotsByBotIdSessionsData, GetBotsByBotIdSessionsErrors, GetBotsByBotIdSessionsResponses, GetBotsByBotIdSettingsData, GetBotsByBotIdSettingsErrors, GetBotsByBotIdSettingsResponses, GetBotsByBotIdSubagentsByIdContextData, GetBotsByBotIdSubagentsByIdContextErrors, GetBotsByBotIdSubagentsByIdContextResponses, GetBotsByBotIdSubagentsByIdData, GetBotsByBotIdSubagentsByIdErrors, GetBotsByBotIdSubagentsByIdResponses, GetBotsByBotIdSubagentsByIdSkillsData, GetBotsByBotIdSubagentsByIdSkillsErrors, GetBotsByBotIdSubagentsByIdSkillsResponses, GetBotsByBotIdSubagentsData, GetBotsByBotIdSubagentsErrors, GetBotsByBotIdSubagentsResponses, GetBotsByBotIdTokenUsageData, GetBotsByBotIdTokenUsageErrors, GetBotsByBotIdTokenUsageResponses, GetBotsByBotIdWebStreamData, GetBotsByBotIdWebStreamErrors, GetBotsByBotIdWebStreamResponses, GetBotsByBotIdWebWsData, GetBotsByBotIdWebWsErrors, GetBotsByBotIdWhitelistData, GetBotsByBotIdWhitelistErrors, GetBotsByBotIdWhitelistResponses, GetBotsByIdChannelByPlatformData, GetBotsByIdChannelByPlatformErrors, GetBotsByIdChannelByPlatformResponses, GetBotsByIdChecksData, GetBotsByIdChecksErrors, GetBotsByIdChecksResponses, GetBotsByIdData, GetBotsByIdErrors, GetBotsByIdResponses, GetBotsData, GetBotsErrors, GetBotsResponses, GetBrowserContextsByIdData, GetBrowserContextsByIdErrors, GetBrowserContextsByIdResponses, GetBrowserContextsCoresData, GetBrowserContextsCoresErrors, GetBrowserContextsCoresResponses, GetBrowserContextsData, GetBrowserContextsErrors, GetBrowserContextsResponses, GetChannelsByPlatformData, GetChannelsByPlatformErrors, GetChannelsByPlatformResponses, GetChannelsData, GetChannelsErrors, GetChannelsResponses, GetEmailOauthCallbackData, GetEmailOauthCallbackErrors, GetEmailOauthCallbackResponses, GetEmailProvidersByIdData, GetEmailProvidersByIdErrors, GetEmailProvidersByIdOauthAuthorizeData, GetEmailProvidersByIdOauthAuthorizeErrors, GetEmailProvidersByIdOauthAuthorizeResponses, GetEmailProvidersByIdOauthStatusData, GetEmailProvidersByIdOauthStatusErrors, GetEmailProvidersByIdOauthStatusResponses, GetEmailProvidersByIdResponses, GetEmailProvidersData, GetEmailProvidersErrors, GetEmailProvidersMetaData, GetEmailProvidersMetaResponses, GetEmailProvidersResponses, GetMemoryProvidersByIdData, GetMemoryProvidersByIdErrors, GetMemoryProvidersByIdResponses, GetMemoryProvidersByIdStatusData, GetMemoryProvidersByIdStatusErrors, GetMemoryProvidersByIdStatusResponses, GetMemoryProvidersData, GetMemoryProvidersErrors, GetMemoryProvidersMetaData, GetMemoryProvidersMetaResponses, GetMemoryProvidersResponses, GetModelsByIdData, GetModelsByIdErrors, GetModelsByIdResponses, GetModelsCountData, GetModelsCountErrors, GetModelsCountResponses, GetModelsData, GetModelsErrors, GetModelsModelByModelIdData, GetModelsModelByModelIdErrors, GetModelsModelByModelIdResponses, GetModelsResponses, GetPingData, GetPingResponses, GetProvidersByIdData, GetProvidersByIdErrors, GetProvidersByIdModelsData, GetProvidersByIdModelsErrors, GetProvidersByIdModelsResponses, GetProvidersByIdResponses, GetProvidersCountData, GetProvidersCountErrors, GetProvidersCountResponses, GetProvidersData, GetProvidersErrors, GetProvidersNameByNameData, GetProvidersNameByNameErrors, GetProvidersNameByNameResponses, GetProvidersResponses, GetSearchProvidersByIdData, GetSearchProvidersByIdErrors, GetSearchProvidersByIdResponses, GetSearchProvidersData, GetSearchProvidersErrors, GetSearchProvidersMetaData, GetSearchProvidersMetaResponses, GetSearchProvidersResponses, GetTtsModelsByIdCapabilitiesData, GetTtsModelsByIdCapabilitiesErrors, GetTtsModelsByIdCapabilitiesResponses, GetTtsModelsByIdData, GetTtsModelsByIdErrors, GetTtsModelsByIdResponses, GetTtsModelsData, GetTtsModelsErrors, GetTtsModelsResponses, GetTtsProvidersByIdData, GetTtsProvidersByIdErrors, GetTtsProvidersByIdModelsData, GetTtsProvidersByIdModelsErrors, GetTtsProvidersByIdModelsResponses, GetTtsProvidersByIdResponses, GetTtsProvidersData, GetTtsProvidersErrors, GetTtsProvidersMetaData, GetTtsProvidersMetaResponses, GetTtsProvidersResponses, GetUsersByIdData, GetUsersByIdErrors, GetUsersByIdResponses, GetUsersData, GetUsersErrors, GetUsersMeChannelsByPlatformData, GetUsersMeChannelsByPlatformErrors, GetUsersMeChannelsByPlatformResponses, GetUsersMeData, GetUsersMeErrors, GetUsersMeIdentitiesData, GetUsersMeIdentitiesErrors, GetUsersMeIdentitiesResponses, GetUsersMeResponses, GetUsersResponses, PatchBotsByBotIdSessionsBySessionIdData, PatchBotsByBotIdSessionsBySessionIdErrors, PatchBotsByBotIdSessionsBySessionIdResponses, PatchBotsByIdChannelByPlatformStatusData, PatchBotsByIdChannelByPlatformStatusErrors, PatchBotsByIdChannelByPlatformStatusResponses, PostAuthLoginData, PostAuthLoginErrors, PostAuthLoginResponses, PostAuthRefreshData, PostAuthRefreshErrors, PostAuthRefreshResponses, PostBotsByBotIdCliMessagesData, PostBotsByBotIdCliMessagesErrors, PostBotsByBotIdCliMessagesResponses, PostBotsByBotIdContainerData, PostBotsByBotIdContainerDataExportData, PostBotsByBotIdContainerDataExportErrors, PostBotsByBotIdContainerDataExportResponses, PostBotsByBotIdContainerDataImportData, PostBotsByBotIdContainerDataImportErrors, PostBotsByBotIdContainerDataImportResponses, PostBotsByBotIdContainerDataRestoreData, PostBotsByBotIdContainerDataRestoreErrors, PostBotsByBotIdContainerDataRestoreResponses, PostBotsByBotIdContainerErrors, PostBotsByBotIdContainerFsDeleteData, PostBotsByBotIdContainerFsDeleteErrors, PostBotsByBotIdContainerFsDeleteResponses, PostBotsByBotIdContainerFsMkdirData, PostBotsByBotIdContainerFsMkdirErrors, PostBotsByBotIdContainerFsMkdirResponses, PostBotsByBotIdContainerFsRenameData, PostBotsByBotIdContainerFsRenameErrors, PostBotsByBotIdContainerFsRenameResponses, PostBotsByBotIdContainerFsUploadData, PostBotsByBotIdContainerFsUploadErrors, PostBotsByBotIdContainerFsUploadResponses, PostBotsByBotIdContainerFsWriteData, PostBotsByBotIdContainerFsWriteErrors, PostBotsByBotIdContainerFsWriteResponses, PostBotsByBotIdContainerResponses, PostBotsByBotIdContainerSkillsData, PostBotsByBotIdContainerSkillsErrors, PostBotsByBotIdContainerSkillsResponses, PostBotsByBotIdContainerSnapshotsData, PostBotsByBotIdContainerSnapshotsErrors, PostBotsByBotIdContainerSnapshotsResponses, PostBotsByBotIdContainerSnapshotsRollbackData, PostBotsByBotIdContainerSnapshotsRollbackErrors, PostBotsByBotIdContainerSnapshotsRollbackResponses, PostBotsByBotIdContainerStartData, PostBotsByBotIdContainerStartErrors, PostBotsByBotIdContainerStartResponses, PostBotsByBotIdContainerStopData, PostBotsByBotIdContainerStopErrors, PostBotsByBotIdContainerStopResponses, PostBotsByBotIdEmailBindingsData, PostBotsByBotIdEmailBindingsErrors, PostBotsByBotIdEmailBindingsResponses, PostBotsByBotIdMcpByIdOauthAuthorizeData, PostBotsByBotIdMcpByIdOauthAuthorizeErrors, PostBotsByBotIdMcpByIdOauthAuthorizeResponses, PostBotsByBotIdMcpByIdOauthDiscoverData, PostBotsByBotIdMcpByIdOauthDiscoverErrors, PostBotsByBotIdMcpByIdOauthDiscoverResponses, PostBotsByBotIdMcpByIdOauthExchangeData, PostBotsByBotIdMcpByIdOauthExchangeErrors, PostBotsByBotIdMcpByIdOauthExchangeResponses, PostBotsByBotIdMcpByIdProbeData, PostBotsByBotIdMcpByIdProbeErrors, PostBotsByBotIdMcpByIdProbeResponses, PostBotsByBotIdMcpData, PostBotsByBotIdMcpErrors, PostBotsByBotIdMcpOpsBatchDeleteData, PostBotsByBotIdMcpOpsBatchDeleteErrors, PostBotsByBotIdMcpOpsBatchDeleteResponses, PostBotsByBotIdMcpResponses, PostBotsByBotIdMcpStdioByConnectionIdData, PostBotsByBotIdMcpStdioByConnectionIdErrors, PostBotsByBotIdMcpStdioByConnectionIdResponses, PostBotsByBotIdMcpStdioData, PostBotsByBotIdMcpStdioErrors, PostBotsByBotIdMcpStdioResponses, PostBotsByBotIdMemoryCompactData, PostBotsByBotIdMemoryCompactErrors, PostBotsByBotIdMemoryCompactResponses, PostBotsByBotIdMemoryData, PostBotsByBotIdMemoryErrors, PostBotsByBotIdMemoryRebuildData, PostBotsByBotIdMemoryRebuildErrors, PostBotsByBotIdMemoryRebuildResponses, PostBotsByBotIdMemoryResponses, PostBotsByBotIdMemorySearchData, PostBotsByBotIdMemorySearchErrors, PostBotsByBotIdMemorySearchResponses, PostBotsByBotIdScheduleData, PostBotsByBotIdScheduleErrors, PostBotsByBotIdScheduleResponses, PostBotsByBotIdSessionsData, PostBotsByBotIdSessionsErrors, PostBotsByBotIdSessionsResponses, PostBotsByBotIdSettingsData, PostBotsByBotIdSettingsErrors, PostBotsByBotIdSettingsResponses, PostBotsByBotIdSubagentsByIdSkillsData, PostBotsByBotIdSubagentsByIdSkillsErrors, PostBotsByBotIdSubagentsByIdSkillsResponses, PostBotsByBotIdSubagentsData, PostBotsByBotIdSubagentsErrors, PostBotsByBotIdSubagentsResponses, PostBotsByBotIdToolsData, PostBotsByBotIdToolsErrors, PostBotsByBotIdToolsResponses, PostBotsByBotIdTtsSynthesizeData, PostBotsByBotIdTtsSynthesizeErrors, PostBotsByBotIdTtsSynthesizeResponses, PostBotsByBotIdWebMessagesData, PostBotsByBotIdWebMessagesErrors, PostBotsByBotIdWebMessagesResponses, PostBotsByIdChannelByPlatformSendChatData, PostBotsByIdChannelByPlatformSendChatErrors, PostBotsByIdChannelByPlatformSendChatResponses, PostBotsByIdChannelByPlatformSendData, PostBotsByIdChannelByPlatformSendErrors, PostBotsByIdChannelByPlatformSendResponses, PostBotsData, PostBotsErrors, PostBotsResponses, PostBrowserContextsData, PostBrowserContextsErrors, PostBrowserContextsResponses, PostEmailMailgunWebhookByConfigIdData, PostEmailMailgunWebhookByConfigIdErrors, PostEmailMailgunWebhookByConfigIdResponses, PostEmailProvidersData, PostEmailProvidersErrors, PostEmailProvidersResponses, PostMemoryProvidersData, PostMemoryProvidersErrors, PostMemoryProvidersResponses, PostModelsByIdTestData, PostModelsByIdTestErrors, PostModelsByIdTestResponses, PostModelsData, PostModelsErrors, PostModelsResponses, PostProvidersByIdImportModelsData, PostProvidersByIdImportModelsErrors, PostProvidersByIdImportModelsResponses, PostProvidersByIdTestData, PostProvidersByIdTestErrors, PostProvidersByIdTestResponses, PostProvidersData, PostProvidersErrors, PostProvidersResponses, PostSearchProvidersData, PostSearchProvidersErrors, PostSearchProvidersResponses, PostTtsModelsByIdTestData, PostTtsModelsByIdTestErrors, PostTtsModelsByIdTestResponses, PostTtsModelsData, PostTtsModelsErrors, PostTtsModelsResponses, PostTtsProvidersByIdImportModelsData, PostTtsProvidersByIdImportModelsErrors, PostTtsProvidersByIdImportModelsResponses, PostTtsProvidersData, PostTtsProvidersErrors, PostTtsProvidersResponses, PostUsersData, PostUsersErrors, PostUsersResponses, PutBotsByBotIdBlacklistData, PutBotsByBotIdBlacklistErrors, PutBotsByBotIdBlacklistResponses, PutBotsByBotIdEmailBindingsByIdData, PutBotsByBotIdEmailBindingsByIdErrors, PutBotsByBotIdEmailBindingsByIdResponses, PutBotsByBotIdMcpByIdData, PutBotsByBotIdMcpByIdErrors, PutBotsByBotIdMcpByIdResponses, PutBotsByBotIdMcpImportData, PutBotsByBotIdMcpImportErrors, PutBotsByBotIdMcpImportResponses, PutBotsByBotIdScheduleByIdData, PutBotsByBotIdScheduleByIdErrors, PutBotsByBotIdScheduleByIdResponses, PutBotsByBotIdSettingsData, PutBotsByBotIdSettingsErrors, PutBotsByBotIdSettingsResponses, PutBotsByBotIdSubagentsByIdContextData, PutBotsByBotIdSubagentsByIdContextErrors, PutBotsByBotIdSubagentsByIdContextResponses, PutBotsByBotIdSubagentsByIdData, PutBotsByBotIdSubagentsByIdErrors, PutBotsByBotIdSubagentsByIdResponses, PutBotsByBotIdSubagentsByIdSkillsData, PutBotsByBotIdSubagentsByIdSkillsErrors, PutBotsByBotIdSubagentsByIdSkillsResponses, PutBotsByBotIdWhitelistData, PutBotsByBotIdWhitelistErrors, PutBotsByBotIdWhitelistResponses, PutBotsByIdChannelByPlatformData, PutBotsByIdChannelByPlatformErrors, PutBotsByIdChannelByPlatformResponses, PutBotsByIdData, PutBotsByIdErrors, PutBotsByIdOwnerData, PutBotsByIdOwnerErrors, PutBotsByIdOwnerResponses, PutBotsByIdResponses, PutBrowserContextsByIdData, PutBrowserContextsByIdErrors, PutBrowserContextsByIdResponses, PutEmailProvidersByIdData, PutEmailProvidersByIdErrors, PutEmailProvidersByIdResponses, PutMemoryProvidersByIdData, PutMemoryProvidersByIdErrors, PutMemoryProvidersByIdResponses, PutModelsByIdData, PutModelsByIdErrors, PutModelsByIdResponses, PutModelsModelByModelIdData, PutModelsModelByModelIdErrors, PutModelsModelByModelIdResponses, PutProvidersByIdData, PutProvidersByIdErrors, PutProvidersByIdResponses, PutSearchProvidersByIdData, PutSearchProvidersByIdErrors, PutSearchProvidersByIdResponses, PutTtsModelsByIdData, PutTtsModelsByIdErrors, PutTtsModelsByIdResponses, PutTtsProvidersByIdData, PutTtsProvidersByIdErrors, PutTtsProvidersByIdResponses, PutUsersByIdData, PutUsersByIdErrors, PutUsersByIdPasswordData, PutUsersByIdPasswordErrors, PutUsersByIdPasswordResponses, PutUsersByIdResponses, PutUsersMeChannelsByPlatformData, PutUsersMeChannelsByPlatformErrors, PutUsersMeChannelsByPlatformResponses, PutUsersMeData, PutUsersMeErrors, PutUsersMePasswordData, PutUsersMePasswordErrors, PutUsersMePasswordResponses, PutUsersMeResponses } from './types.gen'; export type Options = Options2 & { /** @@ -137,6 +137,20 @@ export const getBotsByBotIdCliStream = (op */ export const getBotsByBotIdCliWs = (options: Options) => (options.client ?? client).get({ url: '/bots/{bot_id}/cli/ws', ...options }); +/** + * Delete compaction logs + * + * Delete all context compaction logs for a bot + */ +export const deleteBotsByBotIdCompactionLogs = (options: Options) => (options.client ?? client).delete({ url: '/bots/{bot_id}/compaction/logs', ...options }); + +/** + * List compaction logs + * + * List context compaction logs for a bot + */ +export const getBotsByBotIdCompactionLogs = (options: Options) => (options.client ?? client).get({ url: '/bots/{bot_id}/compaction/logs', ...options }); + /** * Delete MCP container for bot */ diff --git a/packages/sdk/src/types.gen.ts b/packages/sdk/src/types.gen.ts index 85d05d98..7ed5b7af 100644 --- a/packages/sdk/src/types.gen.ts +++ b/packages/sdk/src/types.gen.ts @@ -552,6 +552,24 @@ export type ChannelUpsertConfigRequest = { verified_at?: string; }; +export type CompactionListLogsResponse = { + items?: Array; +}; + +export type CompactionLog = { + bot_id?: string; + completed_at?: string; + error_message?: string; + id?: string; + message_count?: number; + model_id?: string; + session_id?: string; + started_at?: string; + status?: string; + summary?: string; + usage?: unknown; +}; + export type EmailBindingResponse = { bot_id?: string; can_delete?: boolean; @@ -1121,6 +1139,7 @@ export type McpUpsertRequest = { export type MessageMessage = { assets?: Array; bot_id?: string; + compact_id?: string; content?: Array; created_at?: string; external_message_id?: string; @@ -1388,6 +1407,9 @@ export type SettingsSettings = { allow_guest?: boolean; browser_context_id?: string; chat_model_id?: string; + compaction_enabled?: boolean; + compaction_model_id?: string; + compaction_threshold?: number; heartbeat_enabled?: boolean; heartbeat_interval?: number; heartbeat_model_id?: string; @@ -1406,6 +1428,9 @@ export type SettingsUpsertRequest = { allow_guest?: boolean; browser_context_id?: string; chat_model_id?: string; + compaction_enabled?: boolean; + compaction_model_id?: string; + compaction_threshold?: number; heartbeat_enabled?: boolean; heartbeat_interval?: number; heartbeat_model_id?: string; @@ -2087,6 +2112,81 @@ export type GetBotsByBotIdCliWsErrors = { export type GetBotsByBotIdCliWsError = GetBotsByBotIdCliWsErrors[keyof GetBotsByBotIdCliWsErrors]; +export type DeleteBotsByBotIdCompactionLogsData = { + body?: never; + path: { + /** + * Bot ID + */ + bot_id: string; + }; + query?: never; + url: '/bots/{bot_id}/compaction/logs'; +}; + +export type DeleteBotsByBotIdCompactionLogsErrors = { + /** + * Bad Request + */ + 400: HandlersErrorResponse; + /** + * Internal Server Error + */ + 500: HandlersErrorResponse; +}; + +export type DeleteBotsByBotIdCompactionLogsError = DeleteBotsByBotIdCompactionLogsErrors[keyof DeleteBotsByBotIdCompactionLogsErrors]; + +export type DeleteBotsByBotIdCompactionLogsResponses = { + /** + * No Content + */ + 204: unknown; +}; + +export type GetBotsByBotIdCompactionLogsData = { + body?: never; + path: { + /** + * Bot ID + */ + bot_id: string; + }; + query?: { + /** + * Before timestamp (RFC3339) + */ + before?: string; + /** + * Limit + */ + limit?: number; + }; + url: '/bots/{bot_id}/compaction/logs'; +}; + +export type GetBotsByBotIdCompactionLogsErrors = { + /** + * Bad Request + */ + 400: HandlersErrorResponse; + /** + * Internal Server Error + */ + 500: HandlersErrorResponse; +}; + +export type GetBotsByBotIdCompactionLogsError = GetBotsByBotIdCompactionLogsErrors[keyof GetBotsByBotIdCompactionLogsErrors]; + +export type GetBotsByBotIdCompactionLogsResponses = { + /** + * OK + */ + 200: CompactionListLogsResponse; +}; + +export type GetBotsByBotIdCompactionLogsResponse = GetBotsByBotIdCompactionLogsResponses[keyof GetBotsByBotIdCompactionLogsResponses]; + export type DeleteBotsByBotIdContainerData = { body?: never; path: { diff --git a/spec/docs.go b/spec/docs.go index 53139b47..0209c884 100644 --- a/spec/docs.go +++ b/spec/docs.go @@ -641,6 +641,90 @@ const docTemplate = `{ } } }, + "/bots/{bot_id}/compaction/logs": { + "get": { + "description": "List context compaction logs for a bot", + "tags": [ + "compaction" + ], + "summary": "List compaction logs", + "parameters": [ + { + "type": "string", + "description": "Bot ID", + "name": "bot_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Before timestamp (RFC3339)", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "default": 50, + "description": "Limit", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/compaction.ListLogsResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/handlers.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/handlers.ErrorResponse" + } + } + } + }, + "delete": { + "description": "Delete all context compaction logs for a bot", + "tags": [ + "compaction" + ], + "summary": "Delete compaction logs", + "parameters": [ + { + "type": "string", + "description": "Bot ID", + "name": "bot_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/handlers.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/handlers.ErrorResponse" + } + } + } + } + }, "/bots/{bot_id}/container": { "get": { "tags": [ @@ -10316,6 +10400,53 @@ const docTemplate = `{ } } }, + "compaction.ListLogsResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/compaction.Log" + } + } + } + }, + "compaction.Log": { + "type": "object", + "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": {} + } + }, "email.BindingResponse": { "type": "object", "properties": { @@ -11709,6 +11840,9 @@ const docTemplate = `{ "bot_id": { "type": "string" }, + "compact_id": { + "type": "string" + }, "content": { "type": "array", "items": { @@ -12416,6 +12550,15 @@ const docTemplate = `{ "chat_model_id": { "type": "string" }, + "compaction_enabled": { + "type": "boolean" + }, + "compaction_model_id": { + "type": "string" + }, + "compaction_threshold": { + "type": "integer" + }, "heartbeat_enabled": { "type": "boolean" }, @@ -12466,6 +12609,15 @@ const docTemplate = `{ "chat_model_id": { "type": "string" }, + "compaction_enabled": { + "type": "boolean" + }, + "compaction_model_id": { + "type": "string" + }, + "compaction_threshold": { + "type": "integer" + }, "heartbeat_enabled": { "type": "boolean" }, diff --git a/spec/swagger.json b/spec/swagger.json index 2961fbdb..df3dc31b 100644 --- a/spec/swagger.json +++ b/spec/swagger.json @@ -632,6 +632,90 @@ } } }, + "/bots/{bot_id}/compaction/logs": { + "get": { + "description": "List context compaction logs for a bot", + "tags": [ + "compaction" + ], + "summary": "List compaction logs", + "parameters": [ + { + "type": "string", + "description": "Bot ID", + "name": "bot_id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "Before timestamp (RFC3339)", + "name": "before", + "in": "query" + }, + { + "type": "integer", + "default": 50, + "description": "Limit", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/compaction.ListLogsResponse" + } + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/handlers.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/handlers.ErrorResponse" + } + } + } + }, + "delete": { + "description": "Delete all context compaction logs for a bot", + "tags": [ + "compaction" + ], + "summary": "Delete compaction logs", + "parameters": [ + { + "type": "string", + "description": "Bot ID", + "name": "bot_id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request", + "schema": { + "$ref": "#/definitions/handlers.ErrorResponse" + } + }, + "500": { + "description": "Internal Server Error", + "schema": { + "$ref": "#/definitions/handlers.ErrorResponse" + } + } + } + } + }, "/bots/{bot_id}/container": { "get": { "tags": [ @@ -10307,6 +10391,53 @@ } } }, + "compaction.ListLogsResponse": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/compaction.Log" + } + } + } + }, + "compaction.Log": { + "type": "object", + "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": {} + } + }, "email.BindingResponse": { "type": "object", "properties": { @@ -11700,6 +11831,9 @@ "bot_id": { "type": "string" }, + "compact_id": { + "type": "string" + }, "content": { "type": "array", "items": { @@ -12407,6 +12541,15 @@ "chat_model_id": { "type": "string" }, + "compaction_enabled": { + "type": "boolean" + }, + "compaction_model_id": { + "type": "string" + }, + "compaction_threshold": { + "type": "integer" + }, "heartbeat_enabled": { "type": "boolean" }, @@ -12457,6 +12600,15 @@ "chat_model_id": { "type": "string" }, + "compaction_enabled": { + "type": "boolean" + }, + "compaction_model_id": { + "type": "string" + }, + "compaction_threshold": { + "type": "integer" + }, "heartbeat_enabled": { "type": "boolean" }, diff --git a/spec/swagger.yaml b/spec/swagger.yaml index 0949180f..2647f528 100644 --- a/spec/swagger.yaml +++ b/spec/swagger.yaml @@ -915,6 +915,37 @@ definitions: 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: @@ -1825,6 +1856,8 @@ definitions: type: array bot_id: type: string + compact_id: + type: string content: items: type: integer @@ -2303,6 +2336,12 @@ definitions: 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: @@ -2336,6 +2375,12 @@ definitions: 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: @@ -3032,6 +3077,62 @@ paths: summary: WebSocket chat endpoint tags: - local-channel + /bots/{bot_id}/compaction/logs: + delete: + description: Delete all context 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 context 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: