@xopcai/xopc 0.0.120 → 0.0.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/dashscope/src/image-generation-provider.d.ts +6 -5
- package/dist/extensions/dashscope/src/image-generation-provider.js +40 -64
- package/dist/extensions/dashscope/src/image-generation-provider.js.map +1 -1
- package/dist/extensions/dashscope/src/index.d.ts +1 -1
- package/dist/extensions/dashscope/src/index.js +2 -2
- package/dist/extensions/dashscope/xopc.extension.json +3 -2
- package/dist/extensions/minimax/src/image-generation-provider.d.ts +7 -5
- package/dist/extensions/minimax/src/image-generation-provider.js +43 -37
- package/dist/extensions/minimax/src/image-generation-provider.js.map +1 -1
- package/dist/extensions/minimax/src/index.d.ts +1 -1
- package/dist/extensions/minimax/src/index.js +2 -2
- package/dist/extensions/minimax/xopc.extension.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/Combination-HAlzriaz.js +41 -0
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-APTlX9Sq.js → agent-avatar-dicebear-4AW4JgSU.js} +1 -1
- package/dist/gateway/static/root/assets/agents-2SVUUPlp.js +2 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DTKc5HHT.js → app-management-settings-panel-CE6GkGU2.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BTciFrE9.js → appearance-settings-BmaUjghw.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DT52OrbM.js → apps-page-BWeQ1I49.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-CiHaUMII.js → archive-plugin-CX4_KWut.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-t4gSrNjL.js → attachment-load-jf-PIIUU.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-suggestion-card-CtysjSoQ.js → automation-suggestion-card-BHk5rtJz.js} +1 -1
- package/dist/gateway/static/root/assets/automations-page-QHotl53D.js +1 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BAbSldW5.js → binary-plugins-DG9XQikd.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-BNr_82xl.js → block-editor-Up_VIxLJ.js} +6 -6
- package/dist/gateway/static/root/assets/browser-settings-page-Cmwi6IIQ.js +8 -0
- package/dist/gateway/static/root/assets/{capability-presets-api-tzD702Gg.js → capability-presets-api-CGM4OyMw.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-presets-settings-panel-AGhTueAc.js → capability-presets-settings-panel-CzWt0LBb.js} +1 -1
- package/dist/gateway/static/root/assets/{channel-recipient-api-DL_KzwGE.js → channel-recipient-api-BEByL4_o.js} +1 -1
- package/dist/gateway/static/root/assets/channels-settings-BOMCUe2J.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-C-Dexk_F.js +2 -0
- package/dist/gateway/static/root/assets/dist-Mys7eFJ5.js +1 -0
- package/dist/gateway/static/root/assets/dist-wO9a2_ID.js +1 -0
- package/dist/gateway/static/root/assets/{dreaming-settings-BEwWA1yf.js → dreaming-settings-WPEj8pir.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-Dl2kO0Sf.js → extension-debug-page-DZxa_j7-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DmbLPsx_.js → extension-page-CseziW53.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-B_9J-xyo.js +1 -0
- package/dist/gateway/static/root/assets/{fetch-B3ME5Eri.js → fetch-Cs4ck8zA.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-DI9_BBTo.js → gateway-config-api-Dl223a7r.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-DdzbtW9R.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CSZQTz6K.js → gateway-startup-retry-IvePwjFE.js} +1 -1
- package/dist/gateway/static/root/assets/goal-detail-page-Dxldogms.js +1 -0
- package/dist/gateway/static/root/assets/{goals-config-api-Bhzqrp2w.js → goals-config-api-CUCP6yCl.js} +1 -1
- package/dist/gateway/static/root/assets/goals-page-DU5Nd6Xp.js +2 -0
- package/dist/gateway/static/root/assets/goals-settings-Dj87qPxv.js +1 -0
- package/dist/gateway/static/root/assets/heartbeat-settings-Cgm5JmwH.js +1 -0
- package/dist/gateway/static/root/assets/index-BU1pvxmS.js +191 -0
- package/dist/gateway/static/root/assets/index-l54WfSqe.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-kMp08SlX.js → keyboard-shortcuts-settings-DJgYw0nB.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-C10aS4XO.js +2 -0
- package/dist/gateway/static/root/assets/{markdown-split-Bc0w40vz.js → markdown-split-gnQ_EiGo.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DJ_HvgIy.js → media-plugins-CQV-mgJn.js} +1 -1
- package/dist/gateway/static/root/assets/messages-C6Kc4Jhf.js +3 -0
- package/dist/gateway/static/root/assets/models-hub-panel-B35CAfg6.js +2 -0
- package/dist/gateway/static/root/assets/note-detail-page-Brlwse8x.js +2 -0
- package/dist/gateway/static/root/assets/{note-image-lightbox-4zntqpZq.js → note-image-lightbox-BthwKjLA.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-VocWOjoK.js → notes-page-CoAwRc7L.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BbA7sRd_.js → preview-open-alternatives-BPMXC-2u.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-B36RQ05h.js +1 -0
- package/dist/gateway/static/root/assets/{save-bar-controls-Dividh61.js → save-bar-controls-BEHqwZjz.js} +1 -1
- package/dist/gateway/static/root/assets/schedule-field-CMY25m97.js +1 -0
- package/dist/gateway/static/root/assets/schema-form-CxjxsFfg.js +1 -0
- package/dist/gateway/static/root/assets/sessions-page-73THChnj.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-CR9VsY-R.js +1 -0
- package/dist/gateway/static/root/assets/{settings-collapsible-section-BMCOfuE_.js → settings-collapsible-section-s-kiLAxP.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-form-section-DBkGwpIN.js → settings-form-section-CIxIEYxU.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-BJ1AhfKI.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-layout-NxoW5Y57.js → settings-page-layout--6qT7ZJa.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-C1TtS1vJ.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-B0suFCfj.js → share-preview-page-BZADSbS1.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-gqC8Rmhy.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-C9P-WYvS.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-CEpSvOhF.js +2 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-CrmEnyX4.js → system-settings-panel-Czjf0kLJ.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-BAsGn25g.js → typed-models-lib-Cmt8SYdI.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-C7vcAoGb.js → use-channel-catalog-DyM-ckEQ.js} +1 -1
- package/dist/gateway/static/root/assets/user-profile-settings-panel-BygLv8vm.js +1 -0
- package/dist/gateway/static/root/assets/{utils-Dl9efgnV.js → utils-CloW8coB.js} +1 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-BsoqJba6.js +1 -0
- package/dist/gateway/static/root/assets/{voice-player-store-CMC5NOJp.js → voice-player-store-DduWlJYV.js} +1 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-CcQeX6l5.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-CeA8A9Ef.js +18 -0
- package/dist/gateway/static/root/index.html +7 -8
- package/dist/package.js +1 -1
- package/dist/src/agent/embedded/xopc-auth-storage.d.ts +1 -5
- package/dist/src/agent/embedded/xopc-auth-storage.js +2 -8
- package/dist/src/agent/embedded/xopc-auth-storage.js.map +1 -1
- package/dist/src/agent/embedded/xopc-tools-bridge.js +23 -0
- package/dist/src/agent/embedded/xopc-tools-bridge.js.map +1 -1
- package/dist/src/agent/goals/checklist-judge.js +1 -1
- package/dist/src/agent/goals/checklist-judge.js.map +1 -1
- package/dist/src/agent/goals/judge.js +1 -1
- package/dist/src/agent/goals/judge.js.map +1 -1
- package/dist/src/agent/image/tool-model-config.d.ts +2 -0
- package/dist/src/agent/image/tool-model-config.js +2 -2
- package/dist/src/agent/image/tool-model-config.js.map +1 -1
- package/dist/src/agent/image/understanding/pi-ai-provider.js +1 -1
- package/dist/src/agent/image/understanding/pi-ai-provider.js.map +1 -1
- package/dist/src/agent/memory/compaction.d.ts +1 -1
- package/dist/src/agent/memory/compaction.js +1 -1
- package/dist/src/agent/memory/compaction.js.map +1 -1
- package/dist/src/agent/middleware/self-verify.d.ts +3 -0
- package/dist/src/agent/middleware/self-verify.js +18 -0
- package/dist/src/agent/middleware/self-verify.js.map +1 -1
- package/dist/src/agent/orchestration/agent-event-handler.js +28 -3
- package/dist/src/agent/orchestration/agent-event-handler.js.map +1 -1
- package/dist/src/agent/prompt/sections/tooling.js +21 -5
- package/dist/src/agent/prompt/sections/tooling.js.map +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +1 -0
- package/dist/src/agent/prompt/service-prompt-builder.js.map +1 -1
- package/dist/src/agent/prompt/system-prompt.d.ts +1 -0
- package/dist/src/agent/prompt/system-prompt.js +13 -1
- package/dist/src/agent/prompt/system-prompt.js.map +1 -1
- package/dist/src/agent/sandbox/path-policy.js +30 -6
- package/dist/src/agent/sandbox/path-policy.js.map +1 -1
- package/dist/src/agent/service/btw-query.js +1 -1
- package/dist/src/agent/service/btw-query.js.map +1 -1
- package/dist/src/agent/starter-agents.js +16 -16
- package/dist/src/agent/starter-agents.js.map +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +12 -1
- package/dist/src/agent/tools/image-generate-tool.js.map +1 -1
- package/dist/src/agent/tools/session-search-tool.js +1 -1
- package/dist/src/agent/tools/session-search-tool.js.map +1 -1
- package/dist/src/agent/tools/web-extract.js +1 -1
- package/dist/src/agent/tools/web-extract.js.map +1 -1
- package/dist/src/agent-manifest/index.js +2 -2
- package/dist/src/agent-manifest/schema.d.ts +66 -0
- package/dist/src/agent-manifest/schema.js +28 -2
- package/dist/src/agent-manifest/schema.js.map +1 -1
- package/dist/src/automations/draft/automation-draft-service.js +1 -1
- package/dist/src/automations/draft/automation-draft-service.js.map +1 -1
- package/dist/src/cli/commands/agent.js +2 -2
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.js +161 -11
- package/dist/src/cli/commands/onboard/model.js.map +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/profile.js +1 -1
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/config/agent-profile.js +1 -1
- package/dist/src/config/default-model.d.ts +11 -0
- package/dist/src/config/default-model.js +19 -0
- package/dist/src/config/default-model.js.map +1 -0
- package/dist/src/config/index.js +3 -3
- package/dist/src/config/schema.d.ts +71 -11
- package/dist/src/config/schema.js +57 -22
- package/dist/src/config/schema.js.map +1 -1
- package/dist/src/connectors/registries/smithery.js +10 -9
- package/dist/src/connectors/registries/smithery.js.map +1 -1
- package/dist/src/daemon/install-plan.js +2 -1
- package/dist/src/daemon/install-plan.js.map +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- package/dist/src/gateway/global-defaults-admin.js +6 -16
- package/dist/src/gateway/global-defaults-admin.js.map +1 -1
- package/dist/src/gateway/hono/lib/config-payload.d.ts +24 -0
- package/dist/src/gateway/hono/routes/agents.js +1 -79
- package/dist/src/gateway/hono/routes/agents.js.map +1 -1
- package/dist/src/gateway/hono/routes/models.js +132 -14
- package/dist/src/gateway/hono/routes/models.js.map +1 -1
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js.map +1 -1
- package/dist/src/gateway/image-capabilities.d.ts +11 -1
- package/dist/src/gateway/image-capabilities.js +32 -43
- package/dist/src/gateway/image-capabilities.js.map +1 -1
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/workspace-editor-path.js +9 -1
- package/dist/src/gateway/workspace-editor-path.js.map +1 -1
- package/dist/src/generated/bundled-image-generation-providers.d.ts +4 -2
- package/dist/src/generated/bundled-image-generation-providers.js +6 -4
- package/dist/src/generated/bundled-image-generation-providers.js.map +1 -1
- package/dist/src/mcp/channel-bridge.js +1 -1
- package/dist/src/media/paths.js +3 -4
- package/dist/src/media/paths.js.map +1 -1
- package/dist/src/notes/service.js +1 -1
- package/dist/src/notes/service.js.map +1 -1
- package/dist/src/providers/domestic-presets.d.ts +615 -0
- package/dist/src/providers/domestic-presets.js +834 -0
- package/dist/src/providers/domestic-presets.js.map +1 -0
- package/dist/src/providers/env-keys.js +29 -5
- package/dist/src/providers/env-keys.js.map +1 -1
- package/dist/src/providers/extension-stream-bridge.js +1 -1
- package/dist/src/providers/extension-stream-bridge.js.map +1 -1
- package/dist/src/providers/index.d.ts +5 -5
- package/dist/src/providers/index.js +101 -21
- package/dist/src/providers/index.js.map +1 -1
- package/dist/src/providers/model-discovery.d.ts +17 -0
- package/dist/src/providers/model-discovery.js +61 -0
- package/dist/src/providers/model-discovery.js.map +1 -0
- package/dist/src/providers/model-registry.d.ts +1 -1
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/model-registry.js.map +1 -1
- package/dist/src/providers/presentation.js +185 -14
- package/dist/src/providers/presentation.js.map +1 -1
- package/dist/src/session/session-title.js +1 -1
- package/dist/src/session/session-title.js.map +1 -1
- package/dist/src/tui/xopc-tui-keybindings.d.ts +1 -1
- package/dist/src/voice/tts/summarize.js +1 -1
- package/dist/src/voice/tts/summarize.js.map +1 -1
- package/dist/src/workflows/draft/workflow-draft-service.js +1 -1
- package/dist/src/workflows/draft/workflow-draft-service.js.map +1 -1
- package/package.json +6 -6
- package/dist/gateway/static/root/assets/Combination-BzaXOLd9.js +0 -41
- package/dist/gateway/static/root/assets/agents-CFW_FS_V.js +0 -2
- package/dist/gateway/static/root/assets/automations-page-B2YvT3ES.js +0 -1
- package/dist/gateway/static/root/assets/browser-settings-page-BQEXPhDU.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-DRTutLlN.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DneJVuge.js +0 -2
- package/dist/gateway/static/root/assets/dist-By6Rh2ee.js +0 -1
- package/dist/gateway/static/root/assets/dist-CkobR7mk.js +0 -1
- package/dist/gateway/static/root/assets/dist-DokQNVMQ.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BS2rx40e.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-DAFI_T0W.js +0 -1
- package/dist/gateway/static/root/assets/goal-detail-page-DLuz4jC9.js +0 -1
- package/dist/gateway/static/root/assets/goals-page-DTAfv9Ft.js +0 -2
- package/dist/gateway/static/root/assets/goals-settings-CWN2iirQ.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-CkkkHvOi.js +0 -1
- package/dist/gateway/static/root/assets/index-CnjzMw5i.js +0 -191
- package/dist/gateway/static/root/assets/index-E1QinYKp.css +0 -1
- package/dist/gateway/static/root/assets/logs-page-CDXDlS_W.js +0 -2
- package/dist/gateway/static/root/assets/messages-CISb1HLv.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-panel-BTwxMIgZ.js +0 -2
- package/dist/gateway/static/root/assets/note-detail-page-BBfOeB0m.js +0 -2
- package/dist/gateway/static/root/assets/remote-access-hub-CXwjuD_Q.js +0 -1
- package/dist/gateway/static/root/assets/schedule-field-pRheF2CO.js +0 -1
- package/dist/gateway/static/root/assets/schema-form-D6PiPxfr.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-CpcVySQK.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BVy_TawT.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-CZpNyCWn.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-MVHLLu_a.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-C6DBbQGo.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-6hJmhwSn.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-Im1MA0Iw.js +0 -2
- package/dist/gateway/static/root/assets/user-profile-settings-panel-QAQWGelF.js +0 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-D-6XueTv.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-DVPllR4k.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-B94WISTW.js +0 -18
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-model.js","names":[],"sources":["../../../src/config/default-model.ts"],"sourcesContent":["export const DEFAULT_MODEL_ROLE = 'deep';\nexport const DEFAULT_MODEL_REF = 'deepseek/deepseek-v4-flash';\n\nexport const DEFAULT_AGENT_MODELS = {\n defaultRole: DEFAULT_MODEL_ROLE,\n roles: {\n [DEFAULT_MODEL_ROLE]: {\n model: DEFAULT_MODEL_REF,\n description: 'Default model for general agent work.',\n },\n },\n} as const;\n"],"mappings":";;;;AAAa,sBAAqB;AACrB,qBAAoB;AAEpB,wBAAuB;EAClC,aAAa;EACb,OAAO,GACJ,qBAAqB;GACpB,OAAO;GACP,aAAa;GACd,EACF;EACF"}
|
package/dist/src/config/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema } from "../../extensions/telegram/src/config-schema.js";
|
|
2
2
|
import { WeixinAccountConfigSchema, WeixinConfigSchema } from "../../extensions/weixin/src/config-schema.js";
|
|
3
|
-
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
3
|
+
import { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef } from "./schema.js";
|
|
4
4
|
import { applyConfigOverrides, getConfigOverrides, resetConfigOverrides, setConfigOverride, unsetConfigOverride } from "./runtime-overrides.js";
|
|
5
5
|
import { ENV_VARS, XOPC_DB_FILENAME, resolveHomeDir, resolveStateDir, resolveXopcDatabasePath } from "./paths-state.js";
|
|
6
6
|
import { expandWorkspacePathString, init_workspace_path, normalizeWorkspaceDir, resolveWorkspaceRoot } from "./workspace-path.js";
|
|
@@ -13,10 +13,10 @@ import { clearConfigValueCache, getAllowedCommands, getCacheStats, init_resolve_
|
|
|
13
13
|
import { CustomModelSchema, ModelOverrideSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProviderConfigSchema, VercelGatewayRoutingSchema, getDefaultModelValues, init_models_json, loadModelsJson, modelsJsonExists, saveModelsJson, validateModelsConfig } from "./models-json.js";
|
|
14
14
|
import { canonicalizeConfiguredMcpServer, isKnownCliMcpTypeAlias, normalizeConfiguredMcpServers, resolveXopcMcpTransportAlias } from "./mcp-config-normalize.js";
|
|
15
15
|
import { formatThinkingLevels, listThinkingLevels, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, thinkLevelToNumber } from "../agent/transcript/thinking-types.js";
|
|
16
|
+
import { diffConfigPaths } from "./diff.js";
|
|
16
17
|
import { getWorkspacePath } from "./workspace-path-helpers.js";
|
|
17
18
|
import { listAgentProfileMarkdownDirs, listAgentWorkspaceDirs } from "./workspace-dirs.js";
|
|
18
19
|
import { ProfileManager, createProfile, deleteProfile, getCurrentProfile, getProfileManager, getProfileNameFromDir, getSwitchCommand, listProfiles, resolveProfileStateDir } from "./profile.js";
|
|
19
|
-
import { diffConfigPaths } from "./diff.js";
|
|
20
20
|
import { BASE_RELOAD_RULES, buildReloadPlan, matchReloadRule } from "./rules.js";
|
|
21
21
|
import { ConfigHotReloader } from "./reload.js";
|
|
22
22
|
//#region src/config/index.ts
|
|
@@ -27,6 +27,6 @@ init_workspace_path();
|
|
|
27
27
|
init_models_json();
|
|
28
28
|
init_resolve_config_value();
|
|
29
29
|
//#endregion
|
|
30
|
-
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BASE_RELOAD_RULES, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigHotReloader, ConfigSchema, ConnectorsConfigSchema, CustomModelSchema, ENV_VARS, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, FILENAMES, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelOverrideSchema, ModelsDevConfigSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProfileManager, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, USER_MEMORY_FILENAME, USER_PROFILE_FILENAME, UpdateAutoConfigSchema, UpdateConfigSchema, VercelGatewayRoutingSchema, WORKSPACE_FILES, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, XOPC_DB_FILENAME, applyConfigOverrides, buildReloadPlan, canonicalizeConfiguredMcpServer, clearConfigValueCache, createProfile, deleteProfile, diffConfigPaths, existsSync, expandWorkspacePathString, extractProfileAgentId, formatThinkingLevels, getAgentDefaultModelRef, getAllowedCommands, getCacheStats, getConfigOverrides, getCurrentProfile, getDefaultModelValues, resolveModelsJsonPath as getModelsJsonPath, getProfileManager, getProfileNameFromDir, getSwitchCommand, getWorkspacePath, isKnownCliMcpTypeAlias, listAgentProfileMarkdownDirs, listAgentWorkspaceDirs, listProfiles, listThinkingLevels, loadConfig, loadModelsJson, matchReloadRule, modelsJsonExists, normalizeConfiguredMcpServers, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, normalizeWorkspaceDir, parseModelRef, resetConfigOverrides, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentDir$1 as resolveAgentDirFromConfig, resolveAgentHomeDir, resolveAgentHomeDir$1 as resolveAgentHomeDirFromConfig, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAgentWorkspaceDir, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveConfigValue, resolveCredentialsDir, resolveDefaultAgentWorkspaceDir, resolveEffectiveAgentManifestForAgent, resolveEffectiveAgentManifestForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveHeaders, resolveHomeDir, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveProfileStateDir, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStateDir, resolveStatusPath, resolveToolsDir, resolveUserDir, resolveUserMemoryPath, resolveUserProfilePath, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceRoot, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath, resolveXopcDatabasePath, resolveXopcMcpTransportAlias, saveConfig, saveModelsJson, setConfigOverride, testApiKeyResolution, thinkLevelToNumber, unsetConfigOverride, validateModelsConfig };
|
|
30
|
+
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BASE_RELOAD_RULES, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigHotReloader, ConfigSchema, ConnectorsConfigSchema, CustomModelSchema, ENV_VARS, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, FILENAMES, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelOverrideSchema, ModelsDevConfigSchema, ModelsJsonSchema, OpenAICompatSchema, OpenAICompletionsCompatSchema, OpenAIResponsesCompatSchema, OpenRouterRoutingSchema, ProfileManager, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, USER_MEMORY_FILENAME, USER_PROFILE_FILENAME, UpdateAutoConfigSchema, UpdateConfigSchema, VercelGatewayRoutingSchema, WORKSPACE_FILES, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, XOPC_DB_FILENAME, applyConfigOverrides, buildReloadPlan, canonicalizeConfiguredMcpServer, clearConfigValueCache, createProfile, deleteProfile, diffConfigPaths, existsSync, expandWorkspacePathString, extractProfileAgentId, formatThinkingLevels, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, getAllowedCommands, getCacheStats, getConfigOverrides, getCurrentProfile, getDefaultModelValues, resolveModelsJsonPath as getModelsJsonPath, getProfileManager, getProfileNameFromDir, getSwitchCommand, getWorkspacePath, isKnownCliMcpTypeAlias, listAgentProfileMarkdownDirs, listAgentWorkspaceDirs, listProfiles, listThinkingLevels, loadConfig, loadModelsJson, matchReloadRule, modelsJsonExists, normalizeConfiguredMcpServers, normalizeElevatedMode, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel, normalizeWorkspaceDir, parseModelRef, resetConfigOverrides, resolveAgentAuthProfilesPath, resolveAgentDir, resolveAgentDir$1 as resolveAgentDirFromConfig, resolveAgentHomeDir, resolveAgentHomeDir$1 as resolveAgentHomeDirFromConfig, resolveAgentProfileDir, resolveAgentProfileMarkdownPath, resolveAgentWorkspaceDir, resolveAuthProfilesPath, resolveBinDir, resolveBundledExtensionsDir, resolveBundledSkillsDir, resolveConfigPath, resolveConfigValue, resolveCredentialsDir, resolveDefaultAgentWorkspaceDir, resolveEffectiveAgentManifestForAgent, resolveEffectiveAgentManifestForSession, resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession, resolveExtensionSdkPath, resolveExtensionsDir, resolveExtensionsLockPath, resolveHeaders, resolveHomeDir, resolveInboxDir, resolveInboxMessagePath, resolveInboxPendingDir, resolveInboxProcessedDir, resolveLogPath, resolveLogsDir, resolveModelsJsonPath, resolveNodeBinDir, resolveNodeBinPath, resolveNodeToolsDir, resolveNpmBinPath, resolveOAuthPath, resolvePidPath, resolveProfileStateDir, resolveSkillPath, resolveSkillsCachePath, resolveSkillsDir, resolveSkillsLockPath, resolveSocketPath, resolveStateDir, resolveStatusPath, resolveToolsDir, resolveUserDir, resolveUserMemoryPath, resolveUserProfilePath, resolveWorkspaceExtensionsDir, resolveWorkspaceFile, resolveWorkspaceRoot, resolveWorkspaceStateDir, resolveWorkspaceStatePath, resolveXopcBinPath, resolveXopcDatabasePath, resolveXopcMcpTransportAlias, saveConfig, saveModelsJson, setConfigOverride, testApiKeyResolution, thinkLevelToNumber, unsetConfigOverride, validateModelsConfig };
|
|
31
31
|
|
|
32
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -9,6 +9,17 @@ export declare const AgentModelRefSchema: z.ZodObject<{
|
|
|
9
9
|
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
10
|
}, z.core.$strict>;
|
|
11
11
|
export type AgentModelConfig = z.infer<typeof AgentModelRefSchema>;
|
|
12
|
+
/**
|
|
13
|
+
* Image-generation model ref. {@link AgentModelRefSchema} plus runtime knobs
|
|
14
|
+
* (`timeoutMs`, `autoProviderFallback`) used by the image-generation runtime.
|
|
15
|
+
*/
|
|
16
|
+
export declare const AgentImageGenerationModelSchema: z.ZodObject<{
|
|
17
|
+
primary: z.ZodString;
|
|
18
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
export type AgentImageGenerationModelConfig = z.infer<typeof AgentImageGenerationModelSchema>;
|
|
12
23
|
export declare const AgentTypedModelRoleSchema: z.ZodObject<{
|
|
13
24
|
description: z.ZodOptional<z.ZodString>;
|
|
14
25
|
model: z.ZodString;
|
|
@@ -22,19 +33,18 @@ export declare const AgentModelsSchema: z.ZodOptional<z.ZodObject<{
|
|
|
22
33
|
model: z.ZodString;
|
|
23
34
|
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
35
|
}, z.core.$strict>>>;
|
|
36
|
+
imageModel: z.ZodOptional<z.ZodObject<{
|
|
37
|
+
primary: z.ZodString;
|
|
38
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
39
|
+
}, z.core.$strict>>;
|
|
40
|
+
imageGenerationModel: z.ZodOptional<z.ZodObject<{
|
|
41
|
+
primary: z.ZodString;
|
|
42
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
44
|
+
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
45
|
+
}, z.core.$strict>>;
|
|
25
46
|
}, z.core.$strict>>;
|
|
26
47
|
export type AgentModelsConfig = z.infer<typeof AgentModelsSchema>;
|
|
27
|
-
/**
|
|
28
|
-
* Image-generation model ref. {@link AgentModelRefSchema} plus runtime knobs
|
|
29
|
-
* (`timeoutMs`, `autoProviderFallback`) used by the image-generation runtime.
|
|
30
|
-
*/
|
|
31
|
-
export declare const AgentImageGenerationModelSchema: z.ZodObject<{
|
|
32
|
-
primary: z.ZodString;
|
|
33
|
-
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
35
|
-
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
36
|
-
}, z.core.$strict>;
|
|
37
|
-
export type AgentImageGenerationModelConfig = z.infer<typeof AgentImageGenerationModelSchema>;
|
|
38
48
|
export type AgentTypedModel = AgentTypedModelRole & {
|
|
39
49
|
id: string;
|
|
40
50
|
};
|
|
@@ -54,6 +64,18 @@ export declare const AgentsConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
54
64
|
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
65
|
description: z.ZodOptional<z.ZodString>;
|
|
56
66
|
}, z.core.$strict>>>;
|
|
67
|
+
imageModel: z.ZodOptional<z.ZodObject<{
|
|
68
|
+
primary: z.ZodString;
|
|
69
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
70
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
71
|
+
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
72
|
+
}, z.core.$strict>>;
|
|
73
|
+
imageGenerationModel: z.ZodOptional<z.ZodObject<{
|
|
74
|
+
primary: z.ZodString;
|
|
75
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
76
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
78
|
+
}, z.core.$strict>>;
|
|
57
79
|
policy: z.ZodOptional<z.ZodObject<{
|
|
58
80
|
allowFallbacks: z.ZodOptional<z.ZodBoolean>;
|
|
59
81
|
maxCostTier: z.ZodOptional<z.ZodEnum<{
|
|
@@ -477,6 +499,18 @@ export declare const AgentsConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
477
499
|
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
478
500
|
description: z.ZodOptional<z.ZodString>;
|
|
479
501
|
}, z.core.$strict>>>;
|
|
502
|
+
imageModel: z.ZodOptional<z.ZodObject<{
|
|
503
|
+
primary: z.ZodString;
|
|
504
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
505
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
506
|
+
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
507
|
+
}, z.core.$strict>>;
|
|
508
|
+
imageGenerationModel: z.ZodOptional<z.ZodObject<{
|
|
509
|
+
primary: z.ZodString;
|
|
510
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
511
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
512
|
+
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
513
|
+
}, z.core.$strict>>;
|
|
480
514
|
policy: z.ZodOptional<z.ZodObject<{
|
|
481
515
|
allowFallbacks: z.ZodOptional<z.ZodBoolean>;
|
|
482
516
|
maxCostTier: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1660,6 +1694,18 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
1660
1694
|
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1661
1695
|
description: z.ZodOptional<z.ZodString>;
|
|
1662
1696
|
}, z.core.$strict>>>;
|
|
1697
|
+
imageModel: z.ZodOptional<z.ZodObject<{
|
|
1698
|
+
primary: z.ZodString;
|
|
1699
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1700
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
1701
|
+
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
1702
|
+
}, z.core.$strict>>;
|
|
1703
|
+
imageGenerationModel: z.ZodOptional<z.ZodObject<{
|
|
1704
|
+
primary: z.ZodString;
|
|
1705
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1706
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
1707
|
+
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
1708
|
+
}, z.core.$strict>>;
|
|
1663
1709
|
policy: z.ZodOptional<z.ZodObject<{
|
|
1664
1710
|
allowFallbacks: z.ZodOptional<z.ZodBoolean>;
|
|
1665
1711
|
maxCostTier: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2083,6 +2129,18 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
2083
2129
|
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2084
2130
|
description: z.ZodOptional<z.ZodString>;
|
|
2085
2131
|
}, z.core.$strict>>>;
|
|
2132
|
+
imageModel: z.ZodOptional<z.ZodObject<{
|
|
2133
|
+
primary: z.ZodString;
|
|
2134
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2135
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
2136
|
+
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
2137
|
+
}, z.core.$strict>>;
|
|
2138
|
+
imageGenerationModel: z.ZodOptional<z.ZodObject<{
|
|
2139
|
+
primary: z.ZodString;
|
|
2140
|
+
fallbacks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2141
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
2142
|
+
autoProviderFallback: z.ZodOptional<z.ZodBoolean>;
|
|
2143
|
+
}, z.core.$strict>>;
|
|
2086
2144
|
policy: z.ZodOptional<z.ZodObject<{
|
|
2087
2145
|
allowFallbacks: z.ZodOptional<z.ZodBoolean>;
|
|
2088
2146
|
maxCostTier: z.ZodOptional<z.ZodEnum<{
|
|
@@ -2627,5 +2685,7 @@ export interface ParsedModelRef {
|
|
|
2627
2685
|
model: string;
|
|
2628
2686
|
}
|
|
2629
2687
|
export declare function getAgentDefaultModelRef(config: Config): string | undefined;
|
|
2688
|
+
export declare function getAgentDefaultImageModelConfig(config: Config): AgentModelConfig | undefined;
|
|
2689
|
+
export declare function getAgentDefaultImageGenerationModelConfig(config: Config): AgentImageGenerationModelConfig | undefined;
|
|
2630
2690
|
/** `provider/model` or null when invalid. */
|
|
2631
2691
|
export declare function parseModelRef(ref: string): ParsedModelRef | null;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { AgentConfigEntrySchema, CapabilityPresetSchema, DEFAULT_CAPABILITY_PRESET_ID, init_schema as init_schema$1 } from "../agent-manifest/schema.js";
|
|
3
3
|
import { checkCacheDir, init_cache_dir_policy } from "../browser/cache-dir-policy.js";
|
|
4
|
+
import { DEFAULT_AGENT_MODELS, init_default_model } from "./default-model.js";
|
|
4
5
|
import { init_public_url, validatePublicUrl } from "./public-url.js";
|
|
5
6
|
import { TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, init_config_schema } from "../../extensions/telegram/src/config-schema.js";
|
|
6
7
|
import { WeixinAccountConfigSchema, WeixinConfigSchema, init_config_schema as init_config_schema$1 } from "../../extensions/weixin/src/config-schema.js";
|
|
@@ -32,6 +33,43 @@ function getAgentDefaultModelRef(config) {
|
|
|
32
33
|
applyModels(agent.models);
|
|
33
34
|
return modelRef;
|
|
34
35
|
}
|
|
36
|
+
function getAgentDefaultModelsConfig(config) {
|
|
37
|
+
const list = Array.isArray(config.agents?.list) ? config.agents.list : [];
|
|
38
|
+
const defaultId = config.agents?.default?.trim() || list.find((entry) => entry.default === true)?.id?.trim() || list[0]?.id;
|
|
39
|
+
const agent = list.find((entry) => entry.enabled !== false && entry.id === defaultId) ?? list[0];
|
|
40
|
+
if (!agent) return void 0;
|
|
41
|
+
let modelConfig;
|
|
42
|
+
const visited = /* @__PURE__ */ new Set();
|
|
43
|
+
const applyModels = (models) => {
|
|
44
|
+
if (!models) return;
|
|
45
|
+
modelConfig = {
|
|
46
|
+
...modelConfig,
|
|
47
|
+
...models,
|
|
48
|
+
roles: {
|
|
49
|
+
...modelConfig?.roles ?? {},
|
|
50
|
+
...models.roles ?? {}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
const applyPreset = (presetId) => {
|
|
55
|
+
if (visited.has(presetId)) return;
|
|
56
|
+
visited.add(presetId);
|
|
57
|
+
const preset = config.agents.capabilityPresets[presetId];
|
|
58
|
+
if (!preset) return;
|
|
59
|
+
for (const parent of preset.extends ?? []) applyPreset(parent);
|
|
60
|
+
applyModels(preset.models);
|
|
61
|
+
};
|
|
62
|
+
applyPreset(config.agents.defaultPreset);
|
|
63
|
+
for (const presetId of agent.extends ?? []) if (presetId !== config.agents.defaultPreset) applyPreset(presetId);
|
|
64
|
+
applyModels(agent.models);
|
|
65
|
+
return modelConfig;
|
|
66
|
+
}
|
|
67
|
+
function getAgentDefaultImageModelConfig(config) {
|
|
68
|
+
return getAgentDefaultModelsConfig(config)?.imageModel;
|
|
69
|
+
}
|
|
70
|
+
function getAgentDefaultImageGenerationModelConfig(config) {
|
|
71
|
+
return getAgentDefaultModelsConfig(config)?.imageGenerationModel;
|
|
72
|
+
}
|
|
35
73
|
/** `provider/model` or null when invalid. */
|
|
36
74
|
function parseModelRef(ref) {
|
|
37
75
|
const trimmed = ref.trim();
|
|
@@ -42,10 +80,11 @@ function parseModelRef(ref) {
|
|
|
42
80
|
model: trimmed.slice(idx + 1).trim()
|
|
43
81
|
};
|
|
44
82
|
}
|
|
45
|
-
var AgentModelRefSchema, AgentTypedModelRoleSchema, AgentTypedModelRolesSchema, AgentModelsSchema,
|
|
83
|
+
var AgentModelRefSchema, AgentImageGenerationModelSchema, AgentTypedModelRoleSchema, AgentTypedModelRolesSchema, AgentModelsSchema, AgentsConfigSchema, BrowserCloudConfigSchema, BrowserExtensionConfigSchema, BrowserCloakConfigSchema, BrowserConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, SessionDmScopeSchema, SessionStorageConfigSchema, SessionResetModeSchema, SessionResetConfigSchema, SessionResetByTypeSchema, SessionScopeSchema, SessionConfigSchema, ChannelsConfigSchema, SearchProviderEntrySchema, WebSearchConfigSchema, WebsiteBlocklistSchema, WebToolsConfigSchema, ToolsConfigSchema, GatewayAuthRateLimitSchema, GatewaySecuritySchema, GatewayTrustedProxySchema, GatewayAuthSchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayRemoteSchema, GatewayTlsSchema, GatewayModeSchema, HeartbeatConfigSchema, GatewayChannelConnectDeferModeSchema, TunnelConsentSchema, TunnelConfigSchema, WorkspaceImportConfigSchema, WorkspaceConfigSchema, GatewayBindModeSchema, GatewayConfigSchema, ModelsDevConfigSchema, SttProviderConfigCatchallSchema, STTProviderConfigSchema, STTFallbackConfigSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, STTConfigSchema, TtsProviderConfigCatchallSchema, TTSProviderConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSEdgeConfigSchema, TTSSummarizationConfigSchema, TTSConfigSchema, MessagesConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProviderAuthConfigSchema, ProvidersConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, UpdateAutoConfigSchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, UpdateConfigSchema, CommandsConfigSchema, TuiConfigSchema, McpHttpUrlSchema, ConnectorSecretReferenceSchema, McpConfigScalarSchema, McpServerSchema, McpConfigSchema, ConnectorsConfigSchema, ConfigSchema;
|
|
46
84
|
var init_schema = __esmMin((() => {
|
|
47
85
|
init_schema$1();
|
|
48
86
|
init_cache_dir_policy();
|
|
87
|
+
init_default_model();
|
|
49
88
|
init_public_url();
|
|
50
89
|
init_config_schema();
|
|
51
90
|
init_config_schema$1();
|
|
@@ -53,6 +92,17 @@ var init_schema = __esmMin((() => {
|
|
|
53
92
|
primary: z.string().min(1),
|
|
54
93
|
fallbacks: z.array(z.string()).optional()
|
|
55
94
|
}).strict();
|
|
95
|
+
AgentImageGenerationModelSchema = z.object({
|
|
96
|
+
primary: z.string().min(1),
|
|
97
|
+
fallbacks: z.array(z.string()).optional(),
|
|
98
|
+
/** Hard cap for the whole generation attempt (ms). */
|
|
99
|
+
timeoutMs: z.number().int().positive().optional(),
|
|
100
|
+
/**
|
|
101
|
+
* When all `primary + fallbacks` candidates fail, sweep every other
|
|
102
|
+
* configured provider before giving up.
|
|
103
|
+
*/
|
|
104
|
+
autoProviderFallback: z.boolean().optional()
|
|
105
|
+
}).strict();
|
|
56
106
|
AgentTypedModelRoleSchema = z.object({
|
|
57
107
|
description: z.string().max(500).optional(),
|
|
58
108
|
model: z.string().min(1),
|
|
@@ -77,19 +127,10 @@ var init_schema = __esmMin((() => {
|
|
|
77
127
|
AgentTypedModelRolesSchema = z.record(z.string().regex(/^[a-z][a-z0-9_-]{0,63}$/), AgentTypedModelRoleSchema).optional();
|
|
78
128
|
AgentModelsSchema = z.object({
|
|
79
129
|
defaultRole: z.string().regex(/^[a-z][a-z0-9_-]{0,63}$/).optional(),
|
|
80
|
-
roles: AgentTypedModelRolesSchema
|
|
130
|
+
roles: AgentTypedModelRolesSchema,
|
|
131
|
+
imageModel: AgentModelRefSchema.optional(),
|
|
132
|
+
imageGenerationModel: AgentImageGenerationModelSchema.optional()
|
|
81
133
|
}).strict().optional();
|
|
82
|
-
AgentImageGenerationModelSchema = z.object({
|
|
83
|
-
primary: z.string().min(1),
|
|
84
|
-
fallbacks: z.array(z.string()).optional(),
|
|
85
|
-
/** Hard cap for the whole generation attempt (ms). */
|
|
86
|
-
timeoutMs: z.number().int().positive().optional(),
|
|
87
|
-
/**
|
|
88
|
-
* When all `primary + fallbacks` candidates fail, sweep every other
|
|
89
|
-
* configured provider before giving up.
|
|
90
|
-
*/
|
|
91
|
-
autoProviderFallback: z.boolean().optional()
|
|
92
|
-
}).strict();
|
|
93
134
|
AgentsConfigSchema = z.object({
|
|
94
135
|
/** Default agent id when not specified (routing / session creation). */
|
|
95
136
|
default: z.string().optional(),
|
|
@@ -105,10 +146,7 @@ var init_schema = __esmMin((() => {
|
|
|
105
146
|
name: "Global defaults",
|
|
106
147
|
description: "Default capabilities inherited by every agent.",
|
|
107
148
|
version: 1,
|
|
108
|
-
models:
|
|
109
|
-
defaultRole: "deep",
|
|
110
|
-
roles: {}
|
|
111
|
-
}
|
|
149
|
+
models: DEFAULT_AGENT_MODELS
|
|
112
150
|
} },
|
|
113
151
|
list: [{
|
|
114
152
|
id: "main",
|
|
@@ -960,10 +998,7 @@ defaultAgent: z.string().min(1).optional() }).strict().default({});
|
|
|
960
998
|
name: "Global defaults",
|
|
961
999
|
description: "Default capabilities inherited by every agent.",
|
|
962
1000
|
version: 1,
|
|
963
|
-
models:
|
|
964
|
-
defaultRole: "deep",
|
|
965
|
-
roles: {}
|
|
966
|
-
}
|
|
1001
|
+
models: DEFAULT_AGENT_MODELS
|
|
967
1002
|
} },
|
|
968
1003
|
list: [{
|
|
969
1004
|
id: "main",
|
|
@@ -1076,6 +1111,6 @@ defaultAgent: z.string().min(1).optional() }).strict().default({});
|
|
|
1076
1111
|
}));
|
|
1077
1112
|
//#endregion
|
|
1078
1113
|
init_schema();
|
|
1079
|
-
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultModelRef, init_schema, parseModelRef };
|
|
1114
|
+
export { AgentImageGenerationModelSchema, AgentModelRefSchema, AgentModelsSchema, AgentTypedModelRoleSchema, AgentsConfigSchema, BindingMatchSchema, BindingRuleSchema, BindingsConfigSchema, BrowserConfigSchema, ChannelsConfigSchema, CommandsConfigSchema, ConfigSchema, ConnectorsConfigSchema, ExtensionSecurityConfigSchema, ExtensionSlotsConfigSchema, ExtensionsConfigSchema, GatewayAuthRateLimitSchema, GatewayAuthSchema, GatewayBindModeSchema, GatewayChannelConnectDeferModeSchema, GatewayConfigSchema, GatewayModeSchema, GatewayRemoteSchema, GatewaySecuritySchema, GatewayTailscaleConsentSchema, GatewayTailscaleSchema, GatewayTlsSchema, GatewayTrustedProxySchema, GoalNotificationEventSchema, GoalNotificationTargetSchema, GoalNotificationsConfigSchema, GoalsConfigSchema, HeartbeatConfigSchema, McpConfigSchema, McpServerSchema, MediaUnderstandingCapabilitiesSchema, MediaUnderstandingModelSchema, MessagesConfigSchema, ModelsDevConfigSchema, ProviderAuthConfigSchema, ProviderAzureConfigSchema, ProviderRequestOverridesSchema, ProvidersConfigSchema, STTConfigSchema, STTFallbackConfigSchema, STTProviderConfigSchema, SearchProviderEntrySchema, SessionConfigSchema, SessionDmScopeSchema, SessionResetByTypeSchema, SessionResetConfigSchema, SessionResetModeSchema, SessionScopeSchema, SessionStorageConfigSchema, TTSConfigSchema, TTSEdgeConfigSchema, TTSFallbackConfigSchema, TTSModelOverridesConfigSchema, TTSProviderConfigSchema, TTSSummarizationConfigSchema, TelegramAccountConfigSchema, TelegramConfigSchema, TelegramGroupConfigSchema, TelegramTopicConfigSchema, ToolsConfigSchema, ToolsMediaAudioConfigSchema, ToolsMediaConfigSchema, TuiConfigSchema, TunnelConfigSchema, TunnelConsentSchema, UpdateAutoConfigSchema, UpdateConfigSchema, WebSearchConfigSchema, WebToolsConfigSchema, WebsiteBlocklistSchema, WeixinAccountConfigSchema, WeixinConfigSchema, WorkspaceConfigSchema, WorkspaceImportConfigSchema, getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, getAgentDefaultModelRef, init_schema, parseModelRef };
|
|
1080
1115
|
|
|
1081
1116
|
//# sourceMappingURL=schema.js.map
|