@xopcai/xopc 0.0.119 → 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-CU8J6zou.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-B9vfYoEr.js → app-management-settings-panel-CE6GkGU2.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-ClOzIO24.js → appearance-settings-BmaUjghw.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-DU0dz9Zo.js → apps-page-BWeQ1I49.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BkVIgZzA.js → archive-plugin-CX4_KWut.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CaCMWh1D.js → attachment-load-jf-PIIUU.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-suggestion-card-DhGDpKP3.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-B4TO_bsn.js → binary-plugins-DG9XQikd.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-DJRWwWNI.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-Befi89CL.js → capability-presets-api-CGM4OyMw.js} +1 -1
- package/dist/gateway/static/root/assets/{capability-presets-settings-panel-_G8eb2vJ.js → capability-presets-settings-panel-CzWt0LBb.js} +1 -1
- package/dist/gateway/static/root/assets/{channel-recipient-api-BNSuJb5f.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-WPEj8pir.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DYh402XV.js → extension-debug-page-DZxa_j7-.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-Cr_TizrN.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-Y7AEX4H3.js → fetch-Cs4ck8zA.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-api-RbMmAOpX.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-DiD_Tx4N.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-DqxVi0p5.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-Dvg53qnd.js → keyboard-shortcuts-settings-DJgYw0nB.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-DjbfSsfA.js → locale-store-Ba72bFmP.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-C10aS4XO.js +2 -0
- package/dist/gateway/static/root/assets/{markdown-split-CpHxbtWJ.js → markdown-split-gnQ_EiGo.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-SFPQRSxq.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-BUYURRgn.js → note-image-lightbox-BthwKjLA.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-BsIBSFyZ.js → notes-page-CoAwRc7L.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BHz9iWYA.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-CefkOlRg.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-BouO6JTi.js → settings-collapsible-section-s-kiLAxP.js} +1 -1
- package/dist/gateway/static/root/assets/settings-form-section-CIxIEYxU.js +1 -0
- package/dist/gateway/static/root/assets/settings-page-BJ1AhfKI.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-layout-BJ4Gsef5.js → settings-page-layout--6qT7ZJa.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-CrUjHPQo.js → setup-status-panel-C1TtS1vJ.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BDy2btRN.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-CRngrlnZ.js → system-settings-panel-Czjf0kLJ.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-CD2wtgZV.js → theme-store-Bt6vAkSB.js} +1 -1
- package/dist/gateway/static/root/assets/{typed-models-lib-BltBc0b-.js → typed-models-lib-Cmt8SYdI.js} +1 -1
- package/dist/gateway/static/root/assets/{use-channel-catalog-CjN-51e6.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-B5M5-YvK.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-B7ykUlHM.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 +9 -10
- package/dist/package.js +1 -1
- package/dist/src/agent/context/workspace-templates/AGENTS.md +3 -2
- 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/builtin-memory-store.d.ts +1 -1
- package/dist/src/agent/memory/builtin-memory-store.js +1 -1
- package/dist/src/agent/memory/builtin-memory-store.js.map +1 -1
- package/dist/src/agent/memory/builtin-provider.d.ts +2 -2
- package/dist/src/agent/memory/builtin-provider.js +2 -2
- package/dist/src/agent/memory/builtin-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/memory/dreaming/light-sweep.d.ts +0 -7
- package/dist/src/agent/memory/dreaming/light-sweep.js +16 -277
- package/dist/src/agent/memory/dreaming/light-sweep.js.map +1 -1
- package/dist/src/agent/memory/dreaming/rem-patterns.d.ts +1 -1
- package/dist/src/agent/memory/dreaming/rem-patterns.js +1 -1
- package/dist/src/agent/memory/dreaming/rem-patterns.js.map +1 -1
- package/dist/src/agent/memory/dreaming/short-term-store.d.ts +3 -3
- package/dist/src/agent/memory/dreaming/short-term-store.js +5 -5
- package/dist/src/agent/memory/dreaming/short-term-store.js.map +1 -1
- package/dist/src/agent/memory/dreaming/utils.d.ts +2 -2
- package/dist/src/agent/memory/dreaming/utils.js +2 -2
- package/dist/src/agent/memory/dreaming/utils.js.map +1 -1
- package/dist/src/agent/memory/index.d.ts +0 -2
- package/dist/src/agent/memory/index.js +1 -2
- 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/memory-skills.js +11 -10
- package/dist/src/agent/prompt/sections/memory-skills.js.map +1 -1
- package/dist/src/agent/prompt/sections/tooling.js +23 -7
- 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/reply/startup-context.js +6 -105
- package/dist/src/agent/reply/startup-context.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/service.d.ts +0 -3
- package/dist/src/agent/service.js +0 -41
- package/dist/src/agent/service.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/memory-tool.js +2 -2
- package/dist/src/agent/tools/memory-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/init.js +1 -1
- package/dist/src/cli/commands/init.js.map +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/cli/templates.js +3 -2
- package/dist/src/cli/templates.js.map +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 +73 -13
- package/dist/src/config/schema.js +59 -24
- 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/config-patch/misc.js +4 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.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/infra/update-restart.js +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/storage/sqlite/row-mappers.js +3 -1
- package/dist/src/storage/sqlite/row-mappers.js.map +1 -1
- package/dist/src/tui/backends/embedded-backend.js +1 -2
- package/dist/src/tui/backends/embedded-backend.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-B0hkpLhP.js +0 -2
- package/dist/gateway/static/root/assets/automations-page-CTedroVo.js +0 -1
- package/dist/gateway/static/root/assets/browser-settings-page-FCDwOOBK.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-C3d5JBJX.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-yaUNvt5u.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/dreaming-settings-DNrdg1Ve.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BU1KoKRj.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-C79wkXef.js +0 -1
- package/dist/gateway/static/root/assets/goal-detail-page-9paXuHdo.js +0 -1
- package/dist/gateway/static/root/assets/goals-page-CS0R-Af2.js +0 -2
- package/dist/gateway/static/root/assets/goals-settings-CSuzZ8Ae.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DXPaYJm3.js +0 -1
- package/dist/gateway/static/root/assets/index-BoKafJIZ.js +0 -191
- package/dist/gateway/static/root/assets/index-CArhCcYn.css +0 -1
- package/dist/gateway/static/root/assets/logs-page-DLXPcksQ.js +0 -2
- package/dist/gateway/static/root/assets/messages-CrDHEbss.js +0 -3
- package/dist/gateway/static/root/assets/models-hub-panel-BDF2iyRk.js +0 -2
- package/dist/gateway/static/root/assets/note-detail-page-CSb_hwig.js +0 -2
- package/dist/gateway/static/root/assets/remote-access-hub-CwzSovcS.js +0 -1
- package/dist/gateway/static/root/assets/schedule-field-CmTRoOcE.js +0 -1
- package/dist/gateway/static/root/assets/schema-form-FMKv1vGu.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-PHmX-NmA.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BRAeKJN4.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-D-4lBl6X.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-KKrbFjy8.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-B18OBmH5.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-C28-2uKQ.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-Bm2ebkwl.js +0 -2
- package/dist/gateway/static/root/assets/user-profile-settings-panel-DJ1dKwZy.js +0 -1
- package/dist/gateway/static/root/assets/voice-api-key-field-CeEevm7z.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-C4PzUQjB.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-BL84_-Ky.js +0 -18
- package/dist/src/agent/memory/memory-flush.d.ts +0 -27
- package/dist/src/agent/memory/memory-flush.js +0 -124
- package/dist/src/agent/memory/memory-flush.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { formatExamples, register } from "../registry.js";
|
|
4
3
|
import { createProfile, deleteProfile, getCurrentProfile, getSwitchCommand, listProfiles, resolveProfileStateDir } from "../../config/profile.js";
|
|
4
|
+
import { formatExamples, register } from "../registry.js";
|
|
5
5
|
import { colors } from "../utils/colors.js";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import Table from "cli-table3";
|
|
@@ -3,8 +3,8 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
4
|
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
5
5
|
import { loadTunnelState } from "../../tunnel/tunnel-state.js";
|
|
6
|
-
import { formatExamples, register } from "../registry.js";
|
|
7
6
|
import "../../config/index.js";
|
|
7
|
+
import { formatExamples, register } from "../registry.js";
|
|
8
8
|
import { TUNNEL_RISK_SUMMARY_LINES, TunnelConsentError, assertTunnelMayStart, hasValidTunnelConsent } from "../../tunnel/consent.js";
|
|
9
9
|
import { resolveTunnelBrokerUrl, resolveTunnelRegistrationSecret } from "../../tunnel/env.js";
|
|
10
10
|
import { ensureFrpcBinary } from "../../tunnel/frpc-binary.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
|
|
2
2
|
import { loadConfig } from "../../config/loader.js";
|
|
3
|
-
import { formatExamples, register } from "../registry.js";
|
|
4
3
|
import "../../config/index.js";
|
|
4
|
+
import { formatExamples, register } from "../registry.js";
|
|
5
5
|
import { acquireUpdateLock } from "../../infra/update-lock.js";
|
|
6
6
|
import { normalizeUpdateChannel } from "../../infra/update-channels.js";
|
|
7
7
|
import { compareSemver, resolveNpmChannelTag } from "../../infra/update-check.js";
|
|
@@ -4,9 +4,9 @@ import { ExtensionLoader } from "../extensions/loader.js";
|
|
|
4
4
|
import "../extensions/index.js";
|
|
5
5
|
import { MessageBus } from "../infra/bus/queue.js";
|
|
6
6
|
import "../infra/bus/index.js";
|
|
7
|
-
import { createDefaultContext } from "./registry.js";
|
|
8
7
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
9
8
|
import "../config/index.js";
|
|
9
|
+
import { createDefaultContext } from "./registry.js";
|
|
10
10
|
import { registerExtensionCliProgram } from "../extensions/sdk/channel-helpers.js";
|
|
11
11
|
import { join } from "path";
|
|
12
12
|
//#region src/cli/extension-cli-register.ts
|
|
@@ -82,8 +82,9 @@ Do not manually reread startup files unless the user asks or the provided contex
|
|
|
82
82
|
|
|
83
83
|
## Memory
|
|
84
84
|
|
|
85
|
-
-
|
|
86
|
-
-
|
|
85
|
+
- Use runtime memory tools for recall.
|
|
86
|
+
- Use curated memory for durable facts and preferences when available.
|
|
87
|
+
- Cite only memory sources that a tool actually returns.
|
|
87
88
|
|
|
88
89
|
Write what matters. Text > Brain.
|
|
89
90
|
`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","names":[],"sources":["../../../src/cli/templates.ts"],"sourcesContent":["/**\n * Workspace template files for onboarding.\n * Templates are stored in docs/reference/templates/ and loaded at runtime.\n */\n\nimport { readFileSync, existsSync } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/** Profile Markdown template file names (seeded into `agents/<id>/profile/`). */\nexport const TEMPLATE_FILES = [\n 'SOUL.md',\n 'IDENTITY.md',\n 'TOOLS.md',\n 'AGENTS.md',\n 'HEARTBEAT.md',\n 'MEMORY.md',\n] as const;\n\nexport type TemplateFile = (typeof TEMPLATE_FILES)[number];\n\n/** Alias for profile Markdown templates used by seed helpers. */\nexport const PROFILE_MARKDOWN_TEMPLATE_FILES: readonly TemplateFile[] = [...TEMPLATE_FILES];\n\n/** Template content cache */\nconst templateCache = new Map<TemplateFile, string>();\n\n/**\n * Get the path to template files.\n * Uses environment or looks in project root.\n */\nfunction getTemplatePath(): string {\n // Use environment to determine path\n const envPath = process.env.XOPC_TEMPLATE_PATH;\n if (envPath && existsSync(envPath)) {\n return envPath;\n }\n\n // Default: look in project root docs/reference/templates\n // Works for both development (src/cli/) and production (dist/cli/)\n const projectRoot = join(__dirname, '../../..');\n const defaultPath = join(projectRoot, 'docs/reference/templates');\n \n if (existsSync(defaultPath)) {\n return defaultPath;\n }\n\n // Fallback: return default (will fail gracefully)\n return defaultPath;\n}\n\n/**\n * Load a template file. Caches results for repeated access.\n */\nexport function loadTemplate(name: TemplateFile): string {\n // Return cached version if available\n if (templateCache.has(name)) {\n return templateCache.get(name)!;\n }\n\n const templatePath = join(getTemplatePath(), name);\n \n try {\n if (existsSync(templatePath)) {\n const content = readFileSync(templatePath, 'utf-8');\n templateCache.set(name, content);\n return content;\n }\n } catch {\n // Fall through to fallback\n }\n\n // Fallback: return minimal default if template is missing\n console.warn(`Warning: Template ${name} not found, using fallback`);\n return getFallbackTemplate(name);\n}\n\n/**\n * Load all templates as a record.\n */\nexport function loadAllTemplates(): Record<TemplateFile, string> {\n const result = {} as Record<TemplateFile, string>;\n for (const name of TEMPLATE_FILES) {\n result[name] = loadTemplate(name);\n }\n return result;\n}\n\n/**\n * Clear the template cache (useful for testing).\n */\nexport function clearTemplateCache(): void {\n templateCache.clear();\n}\n\n/** Minimal fallback templates in case files are missing */\nexport function getFallbackTemplate(name: TemplateFile): string {\n const fallbacks: Record<TemplateFile, string> = {\n 'AGENTS.md': `# AGENTS.md - Your Workspace\n\nThis folder is home. Treat it that way.\n\n## Session Startup\n\nUse runtime-provided startup context first. Bootstrap files (global user profile, SOUL, MEMORY, etc.) are injected by xopc on /new and /reset.\n\nDo not manually reread startup files unless the user asks or the provided context is incomplete.\n\n## Red Lines\n\n- Don't exfiltrate private data\n- Don't run destructive commands without asking\n- When in doubt, ask\n\n## Memory\n\n-
|
|
1
|
+
{"version":3,"file":"templates.js","names":[],"sources":["../../../src/cli/templates.ts"],"sourcesContent":["/**\n * Workspace template files for onboarding.\n * Templates are stored in docs/reference/templates/ and loaded at runtime.\n */\n\nimport { readFileSync, existsSync } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/** Profile Markdown template file names (seeded into `agents/<id>/profile/`). */\nexport const TEMPLATE_FILES = [\n 'SOUL.md',\n 'IDENTITY.md',\n 'TOOLS.md',\n 'AGENTS.md',\n 'HEARTBEAT.md',\n 'MEMORY.md',\n] as const;\n\nexport type TemplateFile = (typeof TEMPLATE_FILES)[number];\n\n/** Alias for profile Markdown templates used by seed helpers. */\nexport const PROFILE_MARKDOWN_TEMPLATE_FILES: readonly TemplateFile[] = [...TEMPLATE_FILES];\n\n/** Template content cache */\nconst templateCache = new Map<TemplateFile, string>();\n\n/**\n * Get the path to template files.\n * Uses environment or looks in project root.\n */\nfunction getTemplatePath(): string {\n // Use environment to determine path\n const envPath = process.env.XOPC_TEMPLATE_PATH;\n if (envPath && existsSync(envPath)) {\n return envPath;\n }\n\n // Default: look in project root docs/reference/templates\n // Works for both development (src/cli/) and production (dist/cli/)\n const projectRoot = join(__dirname, '../../..');\n const defaultPath = join(projectRoot, 'docs/reference/templates');\n \n if (existsSync(defaultPath)) {\n return defaultPath;\n }\n\n // Fallback: return default (will fail gracefully)\n return defaultPath;\n}\n\n/**\n * Load a template file. Caches results for repeated access.\n */\nexport function loadTemplate(name: TemplateFile): string {\n // Return cached version if available\n if (templateCache.has(name)) {\n return templateCache.get(name)!;\n }\n\n const templatePath = join(getTemplatePath(), name);\n \n try {\n if (existsSync(templatePath)) {\n const content = readFileSync(templatePath, 'utf-8');\n templateCache.set(name, content);\n return content;\n }\n } catch {\n // Fall through to fallback\n }\n\n // Fallback: return minimal default if template is missing\n console.warn(`Warning: Template ${name} not found, using fallback`);\n return getFallbackTemplate(name);\n}\n\n/**\n * Load all templates as a record.\n */\nexport function loadAllTemplates(): Record<TemplateFile, string> {\n const result = {} as Record<TemplateFile, string>;\n for (const name of TEMPLATE_FILES) {\n result[name] = loadTemplate(name);\n }\n return result;\n}\n\n/**\n * Clear the template cache (useful for testing).\n */\nexport function clearTemplateCache(): void {\n templateCache.clear();\n}\n\n/** Minimal fallback templates in case files are missing */\nexport function getFallbackTemplate(name: TemplateFile): string {\n const fallbacks: Record<TemplateFile, string> = {\n 'AGENTS.md': `# AGENTS.md - Your Workspace\n\nThis folder is home. Treat it that way.\n\n## Session Startup\n\nUse runtime-provided startup context first. Bootstrap files (global user profile, SOUL, MEMORY, etc.) are injected by xopc on /new and /reset.\n\nDo not manually reread startup files unless the user asks or the provided context is incomplete.\n\n## Red Lines\n\n- Don't exfiltrate private data\n- Don't run destructive commands without asking\n- When in doubt, ask\n\n## Memory\n\n- Use runtime memory tools for recall.\n- Use curated memory for durable facts and preferences when available.\n- Cite only memory sources that a tool actually returns.\n\nWrite what matters. Text > Brain.\n`,\n 'SOUL.md': `# SOUL.md - Who You Are\n\n_You're not a chatbot. You're becoming someone._\n\n## Core Truths\n\n- Be genuinely helpful, not performatively helpful\n- Have opinions\n- Be resourceful before asking\n- Earn trust through competence\n- Remember you're a guest\n\n## Boundaries\n\n- Private things stay private\n- When in doubt, ask before acting externally\n- Never send half-baked replies\n\nThis file is yours to evolve.\n`,\n 'IDENTITY.md': `# IDENTITY.md - Who Am I?\n\n_Fill this in during your first conversation._\n\n- **Name:**\n- **Creature:**\n- **Vibe:**\n- **Emoji:**\n`,\n 'TOOLS.md': `# TOOLS.md - Local Notes\n\nEnvironment-specific notes:\n\n- SSH hosts\n- API endpoints\n- Device nicknames\n`,\n 'HEARTBEAT.md': `# HEARTBEAT.md - Periodic Checks\n\nEdit this file to define what you check during heartbeat polls.\n\n## Example Checklist\n\n- [ ] Check email for urgent messages\n- [ ] Check calendar for upcoming events\n\n**Remember:** If nothing needs attention, reply \\`HEARTBEAT_OK\\`.\n`,\n 'MEMORY.md': `# MEMORY.md - Long-Term Memory\n\n_Your curated memories._\n\n## People\n\n## Projects\n\n## Preferences\n\n## Learned Lessons\n\n**Only load in main sessions.**\n`,\n };\n \n return fallbacks[name] || `# ${name}\\n\\n(Template content missing)\\n`;\n}\n"],"mappings":";;;;;;;;AAUA,MAAM,YAAY,QADC,cAAc,OAAO,KAAK,IACT,CAAC;;AAGrC,MAAa,iBAAiB;CAC5B;CACA;CACA;CACA;CACA;CACA;CACD;;AAKD,MAAa,kCAA2D,CAAC,GAAG,eAAe;;AAG3F,MAAM,gCAAgB,IAAI,KAA2B;;;;;AAMrD,SAAS,kBAA0B;CAEjC,MAAM,UAAU,QAAQ,IAAI;AAC5B,KAAI,WAAW,WAAW,QAAQ,CAChC,QAAO;CAMT,MAAM,cAAc,KADA,KAAK,WAAW,WACA,EAAE,2BAA2B;AAEjE,KAAI,WAAW,YAAY,CACzB,QAAO;AAIT,QAAO;;;;;AAMT,SAAgB,aAAa,MAA4B;AAEvD,KAAI,cAAc,IAAI,KAAK,CACzB,QAAO,cAAc,IAAI,KAAK;CAGhC,MAAM,eAAe,KAAK,iBAAiB,EAAE,KAAK;AAElD,KAAI;AACF,MAAI,WAAW,aAAa,EAAE;GAC5B,MAAM,UAAU,aAAa,cAAc,QAAQ;AACnD,iBAAc,IAAI,MAAM,QAAQ;AAChC,UAAO;;SAEH;AAKR,SAAQ,KAAK,qBAAqB,KAAK,4BAA4B;AACnE,QAAO,oBAAoB,KAAK;;;;;AAMlC,SAAgB,mBAAiD;CAC/D,MAAM,SAAS,EAAE;AACjB,MAAK,MAAM,QAAQ,eACjB,QAAO,QAAQ,aAAa,KAAK;AAEnC,QAAO;;;;;AAMT,SAAgB,qBAA2B;AACzC,eAAc,OAAO;;;AAIvB,SAAgB,oBAAoB,MAA4B;AA0F9D,QAAO;EAxFL,aAAa;;;;;;;;;;;;;;;;;;;;;;;;EAwBb,WAAW;;;;;;;;;;;;;;;;;;;;EAoBX,eAAe;;;;;;;;;EASf,YAAY;;;;;;;;EAQZ,gBAAgB;;;;;;;;;;;EAWhB,aAAa;;;;;;;;;;;;;;EAgBC,CAAC,SAAS,KAAK,KAAK"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { init_agent_scope, normalizeAgentId, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
1
2
|
import { resolveEffectiveAgentManifest } from "../agent-manifest/resolver.js";
|
|
2
3
|
import "../agent-manifest/index.js";
|
|
3
|
-
import { init_agent_scope, normalizeAgentId, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
4
4
|
import { init_session_key, parseSessionKey } from "../routing/session-key.js";
|
|
5
5
|
import { agentExists, getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
6
6
|
//#region src/config/agent-profile.ts
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const DEFAULT_MODEL_ROLE = "deep";
|
|
2
|
+
export declare const DEFAULT_MODEL_REF = "deepseek/deepseek-v4-flash";
|
|
3
|
+
export declare const DEFAULT_AGENT_MODELS: {
|
|
4
|
+
readonly defaultRole: "deep";
|
|
5
|
+
readonly roles: {
|
|
6
|
+
readonly deep: {
|
|
7
|
+
readonly model: "deepseek/deepseek-v4-flash";
|
|
8
|
+
readonly description: "Default model for general agent work.";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region src/config/default-model.ts
|
|
3
|
+
var DEFAULT_MODEL_ROLE, DEFAULT_MODEL_REF, DEFAULT_AGENT_MODELS;
|
|
4
|
+
var init_default_model = __esmMin((() => {
|
|
5
|
+
DEFAULT_MODEL_ROLE = "deep";
|
|
6
|
+
DEFAULT_MODEL_REF = "deepseek/deepseek-v4-flash";
|
|
7
|
+
DEFAULT_AGENT_MODELS = {
|
|
8
|
+
defaultRole: DEFAULT_MODEL_ROLE,
|
|
9
|
+
roles: { [DEFAULT_MODEL_ROLE]: {
|
|
10
|
+
model: DEFAULT_MODEL_REF,
|
|
11
|
+
description: "Default model for general agent work."
|
|
12
|
+
} }
|
|
13
|
+
};
|
|
14
|
+
}));
|
|
15
|
+
//#endregion
|
|
16
|
+
init_default_model();
|
|
17
|
+
export { DEFAULT_AGENT_MODELS, DEFAULT_MODEL_REF, DEFAULT_MODEL_ROLE, init_default_model };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=default-model.js.map
|
|
@@ -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<{
|
|
@@ -1583,7 +1617,7 @@ export declare const CommandsConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
1583
1617
|
}, z.core.$strict>>;
|
|
1584
1618
|
export type CommandsConfig = z.infer<typeof CommandsConfigSchema>;
|
|
1585
1619
|
export declare const TuiConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
1586
|
-
defaultAgent: z.
|
|
1620
|
+
defaultAgent: z.ZodOptional<z.ZodString>;
|
|
1587
1621
|
}, z.core.$strict>>;
|
|
1588
1622
|
export type TuiConfig = z.infer<typeof TuiConfigSchema>;
|
|
1589
1623
|
export declare const McpServerSchema: z.ZodObject<{
|
|
@@ -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<{
|
|
@@ -2609,7 +2667,7 @@ export declare const ConfigSchema: z.ZodDefault<z.ZodObject<{
|
|
|
2609
2667
|
restart: z.ZodOptional<z.ZodBoolean>;
|
|
2610
2668
|
}, z.core.$strict>>;
|
|
2611
2669
|
tui: z.ZodDefault<z.ZodObject<{
|
|
2612
|
-
defaultAgent: z.
|
|
2670
|
+
defaultAgent: z.ZodOptional<z.ZodString>;
|
|
2613
2671
|
}, z.core.$strict>>;
|
|
2614
2672
|
}, z.core.$strip>>;
|
|
2615
2673
|
export type Config = z.infer<typeof ConfigSchema>;
|
|
@@ -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",
|
|
@@ -887,7 +925,7 @@ tts: TTSConfigSchema.optional() }).optional();
|
|
|
887
925
|
CommandsConfigSchema = z.object({ restart: z.boolean().optional() }).strict().optional();
|
|
888
926
|
TuiConfigSchema = z.object({
|
|
889
927
|
/** Default agent id for fresh TUI sessions. Leaves global routing (`agents.default`) untouched. */
|
|
890
|
-
defaultAgent: z.string().min(1).
|
|
928
|
+
defaultAgent: z.string().min(1).optional() }).strict().default({});
|
|
891
929
|
McpHttpUrlSchema = z.string().url().refine((value) => {
|
|
892
930
|
try {
|
|
893
931
|
const protocol = new URL(value).protocol;
|
|
@@ -960,10 +998,7 @@ defaultAgent: z.string().min(1).default("coder") }).strict().default({ defaultAg
|
|
|
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",
|
|
@@ -1071,11 +1106,11 @@ defaultAgent: z.string().min(1).default("coder") }).strict().default({ defaultAg
|
|
|
1071
1106
|
slots: {}
|
|
1072
1107
|
},
|
|
1073
1108
|
modelsDev: { enabled: true },
|
|
1074
|
-
tui: {
|
|
1109
|
+
tui: {}
|
|
1075
1110
|
});
|
|
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
|