@xopcai/xopc 0.0.323 → 0.0.324
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/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -9
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DFzmThVi.js → agent-avatar-dicebear-B-Gczr_A.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CxcIHW_Z.js +1 -0
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-DYFYiuig.js → agent-plugin-dialog-CNuqJcHQ.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-BqIlB5Co.js → agents-CPpmkx7O.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BgvMRGWe.js → app-management-settings-panel-BwWdVRlb.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CliHU03A.js → appearance-settings-EoXNDO1j.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-6xEgLDv8.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-DnuPpm0u.js → archive-plugin-B_T0uMvL.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-BiwaK0ie.js → attachment-load-D9DDwxd2.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CJSISGQH.js → automations-page-jI9vNr2r.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-rztQnZDk.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-KDjduQZO.js → binary-plugins-Dzsxh9OL.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-bclvgove.js → block-editor-CWUUgWWk.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-CfQ2T9t6.js → browser-automation-inputs-DSWXq9lI.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-Cxq38Nnp.js → browser-automations-page-D96o3bDY.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-DUQzQ3ic.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-sAZT4brT.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CKWtXof8.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-C8ducWB7.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DKQC62nQ.js → chat-terminal-dock-WXZrEB3K.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-D1whpIqL.js → computer-settings-page-uy9YDwxJ.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-BAuYTgf5.js → connector-service-page-BpF0SjB9.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-eZTfIMWI.js +2 -0
- package/dist/gateway/static/root/assets/date-picker-Do1dl0La.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-DOuVO2M1.js → dependency-picker-BhS8s080.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D9tu6Bhu.js → desktop-pet-DPVPqFlh.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CQPXub2f.js → desktop-pet-settings-Dv3vG9HZ.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-DxkOYSut.js → device-pairing-wizard-DdvO1O6W.js} +1 -1
- package/dist/gateway/static/root/assets/dist-3h6cXXhT.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-CtWClPz-.js → extension-debug-page-cuG5Lnwf.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-BHh9HLCz.js → extension-page-BCTAXdyE.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-BdT3v5Uh.js → extension-settings-page-kadW_icu.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-1eqyz9vZ.js → gateway-config-swr-CoQVulMd.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-CZas_Ekx.js → gateway-settings-CLZyN-u9.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-C4rsW6vJ.js → gateway-startup-retry-B5GJ-CQV.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-BSqg-JE9.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-B5DXMylk.js → image-generation-api-DvWDkbk1.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-B1JH0G5j.js → imports-page-_pddpuej.js} +1 -1
- package/dist/gateway/static/root/assets/{index-CNc4N4TX.css → index-BKL5tg2f.css} +1 -1
- package/dist/gateway/static/root/assets/index-CJuypaNt.js +121 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DGrLJ8Yh.js → keyboard-shortcuts-settings-C1fKIjz4.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DXFnYiA0.js +1 -0
- package/dist/gateway/static/root/assets/{local-apps-page-DqjStqbL.js → local-apps-page-CkXKS5xe.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BIkcRr3t.js → locale-store-BPZR8x9b.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-C33z-ife.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-gCfH4cwH.js → management-settings-8eDZb0uS.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-Ck_5MADq.js → markdown-view-Dft8ASFD.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DTsZqgo6.js → media-plugins-Cjj-fidX.js} +1 -1
- package/dist/gateway/static/root/assets/messages-kFWhF6_t.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-C95RtLuL.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-kFxknjMR.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-DTI_g4tz.js → page-context-capture-button-OUL3fEYh.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-CfW_Q-K5.js → page-tabs-CVbY7_N5.js} +1 -1
- package/dist/gateway/static/root/assets/popover-select-DcsFzD_i.js +1 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-CuPN-vAn.js → preview-open-alternatives-CKiIby0r.js} +1 -1
- package/dist/gateway/static/root/assets/{product-open-page-BHjxRz1E.js → product-open-page-DlpCi5zT.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-LPAxUszX.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-Bk-es4i9.js → projects-page-Cbyb4hyy.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-BAAZUGnU.js → registry-api-DWWO6ajd.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BtDFZc6g.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-CHJBJKL1.js → runtime-tools-settings-panel-BT_ANpaT.js} +1 -1
- package/dist/gateway/static/root/assets/scenes-page-CJlc-mg1.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-FQAit5HL.js → schema-form-BcqsqSsV.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-CUo6-iV2.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-XeSxPjP7.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BDc6bw1q.js → settings-form-section-Dol9j_pF.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-DnhxBJjV.js → settings-page-B65vii9U.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-D3KNSQ5g.js → settings-page-layout-eqTUTW2L.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BCt__prc.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DVQCRxwK.js → share-preview-page-BS8o58NJ.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BsjSqEnw.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-evN7gs0S.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-BifYwEhe.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-mDwC9UJ-.js → skills-page.utils-DOk-iOvN.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-Bk7GrMij.js → system-settings-panel-CcSvoHfY.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-pCRG7Jb3.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-D3Aquraj.js → tunnel-api-DDGMf44u.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-C1xQ-sHn.js → use-autosave-DiIkxIq7.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-CvYeM0Ml.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-DCNECvcp.js → voice-api-key-field-DJV-qERt.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-B-_niUTU.js → voice-config-api-BaxITrwZ.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BrGx_JS_.js → work-discovery-overlay-DcHhy54L.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CmmC2Pdr.js → workflow-run-setup-panel-DbVtLh0R.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CT8ouKcB.js +6 -0
- package/dist/gateway/static/root/index.html +11 -10
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/home.js +284 -55
- package/dist/packages/gateway-contract/src/index.js +0 -2
- package/dist/packages/gateway-contract/src/notifications.js +3 -10
- package/dist/src/activity/emitter.js +2 -1
- package/dist/src/activity/service.js +2 -1
- package/dist/src/agent/agent-manager.d.ts +3 -2
- package/dist/src/agent/agent-manager.js +36 -44
- package/dist/src/agent/agent-scope.d.ts +19 -48
- package/dist/src/agent/agent-scope.js +47 -169
- package/dist/src/agent/background-review/run-background-review.js +5 -4
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
- package/dist/src/agent/commands/command-registry.js +7 -3
- package/dist/src/agent/context/coordinator.js +1 -1
- package/dist/src/agent/context/execution-context.js +2 -1
- package/dist/src/agent/context/execution-scope.js +2 -1
- package/dist/src/agent/context/workspace-seed.d.ts +1 -2
- package/dist/src/agent/context/workspace-seed.js +3 -3
- package/dist/src/agent/context/workspace-state.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +2 -2
- package/dist/src/agent/embedded/run-turn.js +2 -1
- package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js +2 -1
- package/dist/src/agent/external-tools/cliProvider.js +2 -1
- package/dist/src/agent/external-tools/composio-provider.js +2 -1
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/external-tools/index.js +2 -3
- package/dist/src/agent/external-tools/mcp-provider.js +2 -2
- package/dist/src/agent/image/tool-model-config.js +4 -5
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/ipc/bus.js +1 -1
- package/dist/src/agent/ipc/socket.js +3 -3
- package/dist/src/agent/media-generation/runtime-shared.d.ts +1 -1
- package/dist/src/agent/media-generation/runtime-shared.js +1 -1
- package/dist/src/agent/memory/plugin-discovery.js +1 -2
- package/dist/src/agent/models/manager.d.ts +1 -1
- package/dist/src/agent/models/manager.js +2 -2
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +1 -1
- package/dist/src/agent/prompt/response-language.js +2 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +6 -3
- package/dist/src/agent/prompt/system-prompt.js +2 -1
- package/dist/src/agent/reply/post-compaction-context.js +2 -2
- package/dist/src/agent/service/build-direct-message-content.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +2 -1
- package/dist/src/agent/service/parse-outbound-session-key.js +2 -1
- package/dist/src/agent/service/process-direct-streaming.js +3 -2
- package/dist/src/agent/service/webchat-tts.js +2 -1
- package/dist/src/agent/service.d.ts +1 -1
- package/dist/src/agent/service.js +12 -11
- package/dist/src/agent/service.types.d.ts +2 -0
- package/dist/src/agent/session/session-inspector.js +4 -5
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.d.ts +5 -0
- package/dist/src/agent/starter-agents.d.ts +4 -5
- package/dist/src/agent/starter-agents.js +21 -20
- package/dist/src/agent/tasks/task-judge-service.js +2 -2
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +31 -1
- package/dist/src/agent/tools/delegation-parent-policy.js +2 -3
- package/dist/src/agent/tools/factory.d.ts +2 -0
- package/dist/src/agent/tools/factory.js +10 -9
- package/dist/src/agent/tools/image-generate-tool.js +1 -1
- package/dist/src/agent/tools/workflow-tool.js +2 -3
- package/dist/src/agent/tools/xopc-use-tool.d.ts +3 -2
- package/dist/src/agent/tools/xopc-use-tool.js +54 -6
- package/dist/src/agent/workflow/workflow-child-tools.js +1 -2
- package/dist/src/agent/workspace-runtime/registry.d.ts +1 -1
- package/dist/src/agent/workspace-runtime/registry.js +2 -2
- package/dist/src/agent-catalog/capabilities.d.ts +3 -0
- package/dist/src/agent-catalog/capabilities.js +238 -0
- package/dist/src/agent-catalog/id.d.ts +15 -0
- package/dist/src/agent-catalog/id.js +101 -0
- package/dist/src/agent-catalog/index.d.ts +6 -0
- package/dist/src/agent-catalog/index.js +10 -0
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.d.ts +11 -0
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.js +195 -0
- package/dist/src/agent-catalog/repository.d.ts +39 -0
- package/dist/src/agent-catalog/repository.js +319 -0
- package/dist/src/agent-catalog/service.d.ts +33 -0
- package/dist/src/agent-catalog/service.js +202 -0
- package/dist/src/agent-catalog/test-support.d.ts +14 -0
- package/dist/src/agent-catalog/test-support.js +34 -0
- package/dist/src/agent-catalog/types.d.ts +26 -0
- package/dist/src/agent-catalog/types.js +1 -0
- package/dist/src/agent-config/index.js +2 -2
- package/dist/src/agent-config/schema.d.ts +1 -172
- package/dist/src/agent-config/schema.js +2 -41
- package/dist/src/auth/credentials.js +3 -3
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/sync-provider-auth.d.ts +1 -1
- package/dist/src/auth/sync-provider-auth.js +5 -9
- package/dist/src/automations/capabilities/drafts.js +8 -7
- package/dist/src/automations/service/action-executor.js +2 -1
- package/dist/src/bootstrap/application-state.d.ts +10 -0
- package/dist/src/bootstrap/application-state.js +26 -0
- package/dist/src/browser/automations/repository.js +2 -1
- package/dist/src/browser/automations/schema.d.ts +1 -1
- package/dist/src/browser/automations/service.d.ts +1 -1
- package/dist/src/browser/native-messaging-host.js +5 -4
- package/dist/src/browser/providers/extension.js +4 -2
- package/dist/src/browser/providers/realtime-extension.js +2 -1
- package/dist/src/capabilities/readiness/from-config.js +7 -4
- package/dist/src/capabilities/runtime/dispatcher.d.ts +1 -0
- package/dist/src/capabilities/runtime/dispatcher.js +10 -4
- package/dist/src/capabilities/runtime/product.js +2 -0
- package/dist/src/channels/catalog/channel-catalog-service.js +7 -13
- package/dist/src/chat-commands/agent-edit.js +4 -3
- package/dist/src/chat-commands/builtins/config.js +6 -8
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/builtins/workflow.js +1 -1
- package/dist/src/chat-commands/config-paths.js +1 -1
- package/dist/src/chat-commands/context.js +2 -3
- package/dist/src/chat-previews/store.js +2 -1
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/commands/agent.js +4 -4
- package/dist/src/cli/commands/agents.d.ts +1 -1
- package/dist/src/cli/commands/agents.js +36 -48
- package/dist/src/cli/commands/auth.js +1 -0
- package/dist/src/cli/commands/browser-cli-helpers.js +1 -2
- package/dist/src/cli/commands/channels.js +2 -4
- package/dist/src/cli/commands/config.js +4 -5
- package/dist/src/cli/commands/connectors.js +1 -2
- package/dist/src/cli/commands/doctor/checks/channel-config.js +2 -4
- package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js +1 -2
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -2
- package/dist/src/cli/commands/doctor/checks/config-health.js +1 -2
- package/dist/src/cli/commands/doctor/checks/database-schema.js +4 -4
- package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -2
- package/dist/src/cli/commands/doctor/checks/gateway-service.js +1 -2
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +13 -11
- package/dist/src/cli/commands/doctor/checks/security-audit.js +1 -2
- package/dist/src/cli/commands/doctor/checks/session-integrity.js +3 -3
- package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +1 -2
- package/dist/src/cli/commands/doctor/checks/workspace-status.js +5 -7
- package/dist/src/cli/commands/extension-agent-plugin.js +1 -2
- package/dist/src/cli/commands/extension-dev.js +2 -4
- package/dist/src/cli/commands/extension-marketplace.js +1 -2
- package/dist/src/cli/commands/extension-pack.js +1 -2
- package/dist/src/cli/commands/extension.js +1 -2
- package/dist/src/cli/commands/gateway/run-foreground.js +3 -3
- package/dist/src/cli/commands/gateway/shared.js +1 -1
- package/dist/src/cli/commands/history.js +2 -1
- package/dist/src/cli/commands/image.js +2 -2
- package/dist/src/cli/commands/init.js +11 -30
- package/dist/src/cli/commands/mcp.js +1 -2
- package/dist/src/cli/commands/models.js +13 -11
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -2
- package/dist/src/cli/commands/onboard/gateway.js +1 -2
- package/dist/src/cli/commands/onboard/model.d.ts +1 -1
- package/dist/src/cli/commands/onboard/model.js +17 -25
- package/dist/src/cli/commands/onboard.js +4 -2
- package/dist/src/cli/commands/platform.js +1 -0
- package/dist/src/cli/commands/project.js +3 -3
- package/dist/src/cli/commands/providers.js +1 -0
- package/dist/src/cli/commands/runtime.js +1 -2
- package/dist/src/cli/commands/search.js +1 -2
- package/dist/src/cli/commands/skills.js +1 -2
- package/dist/src/cli/commands/tui-runner.js +3 -2
- package/dist/src/cli/commands/tui.js +6 -8
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/cli/commands/voice.js +1 -2
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/cli/index.js +4 -2
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +15 -16
- package/dist/src/cli/utils/session.js +1 -2
- package/dist/src/computer/model-config.d.ts +3 -3
- package/dist/src/computer/model-config.js +10 -20
- package/dist/src/computer/runtime.js +1 -1
- package/dist/src/config/agent-model-intents.js +2 -2
- package/dist/src/config/agent-profile.d.ts +5 -6
- package/dist/src/config/agent-profile.js +19 -19
- package/dist/src/config/config-surface.d.ts +0 -3
- package/dist/src/config/default-model.js +2 -6
- package/dist/src/config/index.js +7 -8
- package/dist/src/config/loader.js +12 -18
- package/dist/src/config/models-json.d.ts +6 -6
- package/dist/src/config/paths.d.ts +18 -19
- package/dist/src/config/paths.js +35 -35
- package/dist/src/config/reload.d.ts +0 -1
- package/dist/src/config/reload.js +1 -6
- package/dist/src/config/rules.js +0 -15
- package/dist/src/config/schema.d.ts +3 -406
- package/dist/src/config/schema.js +24 -86
- package/dist/src/config/validate-channel-configs.js +8 -14
- package/dist/src/config/workspace-dirs.d.ts +3 -4
- package/dist/src/config/workspace-dirs.js +9 -8
- package/dist/src/config/workspace-path-helpers.d.ts +1 -1
- package/dist/src/config/workspace-path-helpers.js +2 -2
- package/dist/src/connectors/cli/lifecycle.js +2 -1
- package/dist/src/connectors/composio-managed-events.js +2 -1
- package/dist/src/connectors/connected-source-ingestion.js +2 -1
- package/dist/src/connectors/connected-source-understanding.js +4 -2
- package/dist/src/connectors/content-enrichment.js +2 -1
- package/dist/src/connectors/learning-coordinator.js +2 -1
- package/dist/src/connectors/runtime-adapter-registry.js +2 -1
- package/dist/src/connectors/workflow-preflight.d.ts +8 -1
- package/dist/src/connectors/workflow-preflight.js +11 -3
- package/dist/src/discussions/analyzer.js +2 -2
- package/dist/src/endpoint-tools/runtime.js +2 -1
- package/dist/src/execution-environments/subject.js +2 -1
- package/dist/src/extensions/activation-context.js +3 -16
- package/dist/src/extensions/agent-plugins/validation.js +1 -1
- package/dist/src/extensions/discover-extensions.js +9 -15
- package/dist/src/extensions/extension-metadata-snapshot.d.ts +1 -1
- package/dist/src/extensions/extension-metadata-snapshot.js +9 -16
- package/dist/src/extensions/index.js +4 -10
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.js +7 -14
- package/dist/src/extensions/manifest-registry.js +93 -98
- package/dist/src/extensions/marketplace.js +5 -2
- package/dist/src/extensions/normalize-manifest.js +12 -17
- package/dist/src/extensions/update.js +1 -2
- package/dist/src/files/file-service.js +7 -8
- package/dist/src/gateway/agents-admin.d.ts +23 -27
- package/dist/src/gateway/agents-admin.js +109 -130
- package/dist/src/gateway/file-path-classifier.js +3 -3
- package/dist/src/gateway/file-space-service.js +2 -1
- package/dist/src/gateway/global-defaults-admin.d.ts +6 -4
- package/dist/src/gateway/global-defaults-admin.js +21 -20
- package/dist/src/gateway/hono/app.js +2 -1
- package/dist/src/gateway/hono/lib/config-payload.js +12 -9
- package/dist/src/gateway/hono/middleware/auth.js +2 -1
- package/dist/src/gateway/hono/middleware/scopes.js +2 -1
- package/dist/src/gateway/hono/routes/agents.js +22 -49
- package/dist/src/gateway/hono/routes/browser.js +4 -2
- package/dist/src/gateway/hono/routes/channels.js +1 -2
- package/dist/src/gateway/hono/routes/cli-connectors.js +2 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +3 -1
- package/dist/src/gateway/hono/routes/composer-history.js +2 -1
- package/dist/src/gateway/hono/routes/config-patch/index.d.ts +1 -3
- package/dist/src/gateway/hono/routes/config-patch/index.js +1 -2
- package/dist/src/gateway/hono/routes/config-patch/misc.js +18 -11
- package/dist/src/gateway/hono/routes/config.js +0 -2
- package/dist/src/gateway/hono/routes/connectors.js +8 -4
- package/dist/src/gateway/hono/routes/context-sources.js +4 -3
- package/dist/src/gateway/hono/routes/device-pairing-approval.js +2 -1
- package/dist/src/gateway/hono/routes/device-push.js +3 -2
- package/dist/src/gateway/hono/routes/devices.js +6 -3
- package/dist/src/gateway/hono/routes/discussions.js +2 -1
- package/dist/src/gateway/hono/routes/endpoint-tools.js +2 -1
- package/dist/src/gateway/hono/routes/global-defaults.js +8 -16
- package/dist/src/gateway/hono/routes/home.js +93 -4
- package/dist/src/gateway/hono/routes/interaction-state.js +2 -1
- package/dist/src/gateway/hono/routes/models.js +8 -7
- package/dist/src/gateway/hono/routes/notes.js +4 -5
- package/dist/src/gateway/hono/routes/projects.js +6 -6
- package/dist/src/gateway/hono/routes/public-gateway.js +2 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/sessions.js +4 -2
- package/dist/src/gateway/hono/routes/shares.js +4 -3
- package/dist/src/gateway/hono/routes/site-shares.js +2 -2
- package/dist/src/gateway/hono/routes/status.js +2 -3
- package/dist/src/gateway/hono/routes/tasks.js +1 -2
- package/dist/src/gateway/hono/routes/user-model-refresh.js +2 -1
- package/dist/src/gateway/hono/routes/user-model.js +3 -2
- package/dist/src/gateway/hono/routes/work-discovery.js +1 -1
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/image-generation-setup.d.ts +19 -10
- package/dist/src/gateway/image-generation-setup.js +59 -23
- package/dist/src/gateway/index.js +1 -4
- package/dist/src/gateway/lock.js +13 -18
- package/dist/src/gateway/memory-maintenance-automation-reconciler.js +4 -3
- package/dist/src/gateway/run-loop.js +2 -3
- package/dist/src/gateway/security/gateway-scopes.js +6 -2
- package/dist/src/gateway/security/index.js +4 -1
- package/dist/src/gateway/service/agent-runner.js +4 -2
- package/dist/src/gateway/service/app-context-access.js +2 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +0 -1
- package/dist/src/gateway/service/config-coordinator.js +4 -22
- package/dist/src/gateway/service/marketplace-service.js +3 -1
- package/dist/src/gateway/service/run-gateway-agent.js +4 -2
- package/dist/src/gateway/service/session-input-coordinator.js +4 -2
- package/dist/src/gateway/service.d.ts +5 -0
- package/dist/src/gateway/service.js +109 -33
- package/dist/src/gateway/session-context-summary.js +4 -2
- package/dist/src/gateway/xopc-cloud-capability-setup.d.ts +2 -0
- package/dist/src/gateway/xopc-cloud-capability-setup.js +15 -10
- package/dist/src/home-intelligence/application-service.d.ts +31 -0
- package/dist/src/home-intelligence/application-service.js +134 -0
- package/dist/src/home-intelligence/capability-preflight.d.ts +32 -0
- package/dist/src/home-intelligence/capability-preflight.js +118 -0
- package/dist/src/home-intelligence/evaluation.d.ts +34 -0
- package/dist/src/home-intelligence/evaluation.js +49 -0
- package/dist/src/home-intelligence/generator.d.ts +125 -0
- package/dist/src/home-intelligence/generator.js +227 -0
- package/dist/src/home-intelligence/host.d.ts +53 -0
- package/dist/src/home-intelligence/host.js +257 -0
- package/dist/src/home-intelligence/notification.d.ts +8 -0
- package/dist/src/home-intelligence/notification.js +20 -0
- package/dist/src/home-intelligence/policy.d.ts +16 -0
- package/dist/src/home-intelligence/policy.js +152 -0
- package/dist/src/home-intelligence/repository.d.ts +81 -0
- package/dist/src/home-intelligence/repository.js +495 -0
- package/dist/src/home-intelligence/snapshot.d.ts +43 -0
- package/dist/src/home-intelligence/snapshot.js +133 -0
- package/dist/src/home-intelligence/strategy.d.ts +14 -0
- package/dist/src/home-intelligence/strategy.js +10 -0
- package/dist/src/home-intelligence/types.d.ts +13 -0
- package/dist/src/home-intelligence/types.js +1 -0
- package/dist/src/infra/update-restart.js +4 -2
- package/dist/src/knowledge/connected-knowledge-pipeline.js +2 -1
- package/dist/src/knowledge/ingestion-service.js +2 -1
- package/dist/src/knowledge-memory/repository.js +2 -1
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/local-apps/store.js +2 -1
- package/dist/src/mcp/channel-bridge.js +1 -2
- package/dist/src/mcp/channel-server.js +1 -2
- package/dist/src/mcp/gateway-http-client.js +1 -2
- package/dist/src/media/session-references.js +2 -1
- package/dist/src/memory-maintenance/service.js +2 -1
- package/dist/src/migrations/memory-config.js +1 -2
- package/dist/src/notes/agent-context.js +2 -1
- package/dist/src/notes/attachment-ref.js +8 -4
- package/dist/src/notes/note-attachment-sync.js +2 -1
- package/dist/src/notes/note-index-meta.js +14 -7
- package/dist/src/notes/note-markdown.js +13 -7
- package/dist/src/notes/service.js +6 -3
- package/dist/src/notes/store.js +4 -2
- package/dist/src/notifications/device-store.js +1 -1
- package/dist/src/notifications/planner.js +24 -0
- package/dist/src/notifications/service.d.ts +7 -14
- package/dist/src/notifications/service.js +13 -3
- package/dist/src/notifications/store.js +1 -1
- package/dist/src/notifications/types.d.ts +1 -1
- package/dist/src/notifications/types.js +1 -1
- package/dist/src/projects/capabilities/write.js +2 -1
- package/dist/src/projects/project-agent-suggestion.js +1 -1
- package/dist/src/projects/project-agent.js +4 -4
- package/dist/src/projects/project-service.js +2 -1
- package/dist/src/projects/workspace.js +3 -2
- package/dist/src/providers/index.js +3 -3
- package/dist/src/providers/model-reference-auditor.d.ts +1 -2
- package/dist/src/providers/model-reference-auditor.js +8 -5
- package/dist/src/realtime/runtime.js +2 -1
- package/dist/src/routing/binding-schema.d.ts +41 -0
- package/dist/src/routing/binding-schema.js +26 -0
- package/dist/src/routing/bindings.d.ts +4 -2
- package/dist/src/routing/bindings.js +4 -4
- package/dist/src/routing/index.d.ts +1 -1
- package/dist/src/routing/resolve-route.d.ts +7 -24
- package/dist/src/routing/resolve-route.js +17 -18
- package/dist/src/routing/resolve-tui-session-key.d.ts +1 -4
- package/dist/src/routing/resolve-tui-session-key.js +10 -9
- package/dist/src/scenes/execution.d.ts +1 -1
- package/dist/src/scenes/model.js +1 -1
- package/dist/src/scenes/taskFollowUp/contracts.d.ts +1 -1
- package/dist/src/scenes/taskFollowUp/service.js +6 -4
- package/dist/src/scenes/templates.d.ts +2 -2
- package/dist/src/session/config-store.js +2 -1
- package/dist/src/session/init-session-turn.js +2 -1
- package/dist/src/session/resolve-session.js +2 -1
- package/dist/src/session/session-workspace.js +1 -1
- package/dist/src/session/store.js +3 -2
- package/dist/src/storage/sqlite/activity-repository.js +6 -2
- package/dist/src/storage/sqlite/browser-tab-binding-repository.js +6 -2
- package/dist/src/storage/sqlite/clarification-wait-repository.js +13 -8
- package/dist/src/storage/sqlite/collaboration-rule-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/collaboration-rule-repository.js +8 -3
- package/dist/src/storage/sqlite/composer-input-history-repository.js +8 -3
- package/dist/src/storage/sqlite/config-repository.js +9 -5
- package/dist/src/storage/sqlite/connector-learning-repository.js +6 -2
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +6 -2
- package/dist/src/storage/sqlite/context-evidence-repository.js +8 -3
- package/dist/src/storage/sqlite/context-extraction-repository.js +8 -3
- package/dist/src/storage/sqlite/device-access-repository.js +15 -9
- package/dist/src/storage/sqlite/device-pairing-approval.js +6 -2
- package/dist/src/storage/sqlite/device-pairing-repository.js +10 -5
- package/dist/src/storage/sqlite/endpoint-principal-repository.js +6 -2
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +6 -2
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +6 -2
- package/dist/src/storage/sqlite/gateway-identity-repository.js +6 -2
- package/dist/src/storage/sqlite/home-attention-repository.js +6 -2
- package/dist/src/storage/sqlite/index.d.ts +0 -1
- package/dist/src/storage/sqlite/index.js +72 -42
- package/dist/src/storage/sqlite/interaction-state-repository.js +10 -4
- package/dist/src/storage/sqlite/knowledge-repository.js +6 -2
- package/dist/src/storage/sqlite/migrations/203_remove_retired_proactive_contracts.sql +70 -0
- package/dist/src/storage/sqlite/migrations/204_home_intelligence.sql +78 -0
- package/dist/src/storage/sqlite/migrations/205_agent_catalog.sql +66 -0
- package/dist/src/storage/sqlite/migrations/206_home_advice_strategy_version.sql +3 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +2 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.js +8 -4
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.d.ts +7 -1
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.js +2 -2
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +4 -4
- package/dist/src/storage/sqlite/note-agent-context-repository.js +6 -2
- package/dist/src/storage/sqlite/notes-repository.js +9 -4
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-task-plan-repository.js +14 -9
- package/dist/src/storage/sqlite/session-turn-replace-repository.js +9 -5
- package/dist/src/storage/sqlite/sidebar-layout-repository.js +14 -9
- package/dist/src/storage/sqlite/transcript-repository.js +10 -6
- package/dist/src/storage/sqlite/user-people-repository.js +8 -3
- package/dist/src/storage/sqlite/user-trust-repository.js +8 -3
- package/dist/src/tasks/attention-governor.d.ts +0 -1
- package/dist/src/tasks/attention-governor.js +1 -7
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.d.ts +1 -1
- package/dist/src/tasks/execution-context.d.ts +2 -2
- package/dist/src/tasks/execution-context.js +6 -5
- package/dist/src/tasks/home-query-service.d.ts +3 -2
- package/dist/src/tasks/home-query-service.js +23 -44
- package/dist/src/tasks/task-context-assembler.js +2 -1
- package/dist/src/tasks/task-context-repository.d.ts +1 -1
- package/dist/src/tasks/task-contract-planner.d.ts +0 -3
- package/dist/src/tasks/task-contract-planner.js +1 -4
- package/dist/src/tasks/task-handoff-service.d.ts +0 -2
- package/dist/src/tasks/task-handoff-service.js +3 -3
- package/dist/src/tasks/task-value-metrics-service.js +2 -1
- package/dist/src/tui/backends/embedded-backend.js +12 -14
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-commands.js +5 -3
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +3 -3
- package/dist/src/tui/tui.js +5 -5
- package/dist/src/tunnel/registration-proof.js +2 -1
- package/dist/src/user-context/access-policy.js +2 -1
- package/dist/src/user-context/domain.d.ts +1 -1
- package/dist/src/user-context/domain.js +18 -13
- package/dist/src/user-context/extraction/registry.js +2 -1
- package/dist/src/user-context/interaction-state.js +4 -1
- package/dist/src/user-context/relationship-continuity.js +2 -1
- package/dist/src/user-context/trust-policy.js +13 -8
- package/dist/src/user-model/bootstrap.js +2 -1
- package/dist/src/user-model/capture/executor.js +4 -2
- package/dist/src/user-model/capture/semantic.d.ts +1 -1
- package/dist/src/user-model/capture/semantic.js +1 -1
- package/dist/src/user-model/domain.js +7 -2
- package/dist/src/user-model/goals.js +2 -1
- package/dist/src/user-model/index.js +4 -1
- package/dist/src/user-model/repository.js +2 -1
- package/dist/src/utils/helpers.js +1 -4
- package/dist/src/utils/index.js +2 -2
- package/dist/src/utils/logger/index.d.ts +1 -1
- package/dist/src/utils/logger/index.js +2 -2
- package/dist/src/utils/logger/redact.d.ts +2 -0
- package/dist/src/utils/logger/redact.js +11 -3
- package/dist/src/utils/logger.js +2 -2
- package/dist/src/voice/realtime/memory-context.js +2 -1
- package/dist/src/voice/realtime/persona-context.js +6 -6
- package/dist/src/voice/tts/audio.js +1 -1
- package/dist/src/work-discovery/analyzer.js +3 -3
- package/dist/src/work-discovery/investigator.js +1 -1
- package/dist/src/work-discovery/service.js +12 -11
- package/dist/src/workflows/draft/workflow-draft-service.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +4 -5
- package/dist/src/workflows/store/paths.js +1 -1
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CAFHadiy.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-Drt3Foi9.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-B-Eduqwz.js +0 -7
- package/dist/gateway/static/root/assets/browser-settings-page-Dwgir6mu.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-H5L5vynP.js +0 -8
- package/dist/gateway/static/root/assets/capabilities-uFKh3Hd0.js +0 -1
- package/dist/gateway/static/root/assets/channels-settings-RFBRYe5S.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Px-v3Q6Q.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-CfCo3lqh.js +0 -1
- package/dist/gateway/static/root/assets/home-page-w3_aWeNt.js +0 -1
- package/dist/gateway/static/root/assets/index--3c0awkr.js +0 -121
- package/dist/gateway/static/root/assets/local-app-workbench-page-BYKrJpFF.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-Dl4kM4Na.js +0 -2
- package/dist/gateway/static/root/assets/messages-7VAhscYe.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-j6sioeL1.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-CMvvHv0f.js +0 -8
- package/dist/gateway/static/root/assets/popover-select-B-GDnZO9.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-C9K_e-EV.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CLGJNA42.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-ClLAD1pz.js +0 -2
- package/dist/gateway/static/root/assets/sessions-page-Xj8MkXN1.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-DwALV8mi.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-F0rCQ-2a.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-C7hf6Cov.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-xPrFejRE.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-RdDYu7Yj.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-2A966jFY.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-CnBxPBVe.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-BZVpqw4T.js +0 -6
- package/dist/packages/gateway-contract/src/proactive.js +0 -136
- package/dist/src/commands/agents.config.d.ts +0 -31
- package/dist/src/commands/agents.config.js +0 -129
- package/dist/src/gateway/hono/routes/config-patch/agents.d.ts +0 -2
- package/dist/src/gateway/hono/routes/config-patch/agents.js +0 -6
- package/dist/src/storage/sqlite/relationship-settings-repository.d.ts +0 -17
- package/dist/src/storage/sqlite/relationship-settings-repository.js +0 -65
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { init_agent_scope, resolveAgentProfileDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../../../agent/agent-scope.js";
|
|
2
2
|
import { WORKSPACE_FILES, init_paths } from "../../../../config/paths.js";
|
|
3
|
-
import {
|
|
3
|
+
import { loadConfig } from "../../../../config/loader.js";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { existsSync } from "node:fs";
|
|
6
6
|
//#region src/cli/commands/doctor/checks/workspace-status.ts
|
|
7
7
|
init_agent_scope();
|
|
8
|
-
init_loader();
|
|
9
8
|
init_paths();
|
|
10
9
|
async function checkWorkspaceStatus(ctx) {
|
|
11
10
|
if (!existsSync(ctx.configPath)) return {
|
|
@@ -15,9 +14,8 @@ async function checkWorkspaceStatus(ctx) {
|
|
|
15
14
|
message: "No config file; skipped.",
|
|
16
15
|
hints: []
|
|
17
16
|
};
|
|
18
|
-
let config;
|
|
19
17
|
try {
|
|
20
|
-
|
|
18
|
+
loadConfig(ctx.configPath);
|
|
21
19
|
} catch {
|
|
22
20
|
return {
|
|
23
21
|
id: "workspace-status",
|
|
@@ -27,9 +25,9 @@ async function checkWorkspaceStatus(ctx) {
|
|
|
27
25
|
hints: []
|
|
28
26
|
};
|
|
29
27
|
}
|
|
30
|
-
const agentId = resolveDefaultAgentId(
|
|
31
|
-
const root = resolveAgentWorkspaceDir(
|
|
32
|
-
const profileRoot = resolveAgentProfileDir(
|
|
28
|
+
const agentId = resolveDefaultAgentId();
|
|
29
|
+
const root = resolveAgentWorkspaceDir(agentId);
|
|
30
|
+
const profileRoot = resolveAgentProfileDir(agentId);
|
|
33
31
|
const hints = [];
|
|
34
32
|
const hasProfileFile = (name) => existsSync(join(profileRoot, name));
|
|
35
33
|
if (!existsSync(root)) return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
2
1
|
import { pluginServerId } from "../../extensions/agent-plugins/validation.js";
|
|
3
2
|
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
4
3
|
import { removePluginCredentials, savePluginAuthBinding } from "../../extensions/agent-plugins/auth.js";
|
|
5
4
|
import { materializePluginServers } from "../../extensions/agent-plugins/mcp-adapter.js";
|
|
5
|
+
import { loadConfig } from "../../config/loader.js";
|
|
6
6
|
import { getContextWithOpts } from "../context.js";
|
|
7
7
|
import { getMcpOAuthManager } from "../../agent/mcp/oauth/mcp-oauth-manager.js";
|
|
8
8
|
import { isAgentPluginArchive, withAgentPluginSource } from "../../extensions/agent-plugins/sources.js";
|
|
@@ -10,7 +10,6 @@ import { join, resolve } from "node:path";
|
|
|
10
10
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
11
11
|
import { confirm } from "@inquirer/prompts";
|
|
12
12
|
//#region src/cli/commands/extension-agent-plugin.ts
|
|
13
|
-
init_loader();
|
|
14
13
|
function isAgentPluginSource(source) {
|
|
15
14
|
if (source.startsWith("https://")) return true;
|
|
16
15
|
const path = resolve(source);
|
|
@@ -2,9 +2,9 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
|
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../../config/paths.js";
|
|
5
|
-
import {
|
|
6
|
-
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
5
|
+
import { normalizeExtensionManifest } from "../../extensions/normalize-manifest.js";
|
|
7
6
|
import { checkEngineCompatibility } from "../../extensions/engine-check.js";
|
|
7
|
+
import { loadConfig } from "../../config/loader.js";
|
|
8
8
|
import { getContextWithOpts } from "../context.js";
|
|
9
9
|
import { GatewayServer } from "../../gateway/server.js";
|
|
10
10
|
import { runGatewayLoop } from "../../gateway/run-loop.js";
|
|
@@ -15,9 +15,7 @@ import { join, resolve } from "node:path";
|
|
|
15
15
|
import { existsSync, mkdirSync, readFileSync, symlinkSync, unlinkSync, watch } from "node:fs";
|
|
16
16
|
import { Command } from "commander";
|
|
17
17
|
//#region src/cli/commands/extension-dev.ts
|
|
18
|
-
init_loader();
|
|
19
18
|
init_paths();
|
|
20
|
-
init_normalize_manifest();
|
|
21
19
|
init_package_version();
|
|
22
20
|
init_logger();
|
|
23
21
|
const log = createLogger("ExtensionDev");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { init_paths, resolveExtensionsDir } from "../../config/paths.js";
|
|
2
|
-
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
3
2
|
import { computeExtensionDirectoryIntegrity, getExtensionLockfileManager } from "../../extensions/lockfile.js";
|
|
4
3
|
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
5
4
|
import { downloadExtensionStoreZipBuffer, resolveExtensionZipDownloadUrl, resolveExtensionsStoreBaseUrl, verifyStoreArtifactSha256 } from "../../agent/skills/marketplace/adapters/store/store-api-client.js";
|
|
5
|
+
import { loadConfig } from "../../config/loader.js";
|
|
6
6
|
import { getContextWithOpts } from "../context.js";
|
|
7
7
|
import { peekExtensionManifestFromStoreZip } from "../../extensions/install.js";
|
|
8
8
|
import { commitStagedExtensionInstall, finalizeStagedExtensionInstall, rollbackStagedExtensionInstall, stageExtensionLocal, stageExtensionNpm, stageExtensionStoreZip } from "../../extensions/install-transaction.js";
|
|
@@ -19,7 +19,6 @@ import semver from "semver";
|
|
|
19
19
|
import { confirm } from "@inquirer/prompts";
|
|
20
20
|
import { Command } from "commander";
|
|
21
21
|
//#region src/cli/commands/extension-marketplace.ts
|
|
22
|
-
init_loader();
|
|
23
22
|
init_paths();
|
|
24
23
|
const MANIFEST = "xopc.extension.json";
|
|
25
24
|
function readJsonObject(path) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PACKAGE_VERSION, init_package_version } from "../../package-version.js";
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
-
import {
|
|
4
|
+
import { normalizeExtensionManifest } from "../../extensions/normalize-manifest.js";
|
|
5
5
|
import { checkEngineCompatibility } from "../../extensions/engine-check.js";
|
|
6
6
|
import { collectExtensionPackageDependencyIssues } from "../../extensions/package-contract.js";
|
|
7
7
|
import { colors } from "../utils/colors.js";
|
|
@@ -12,7 +12,6 @@ import { createHash } from "node:crypto";
|
|
|
12
12
|
import AdmZip from "adm-zip";
|
|
13
13
|
import { Command } from "commander";
|
|
14
14
|
//#region src/cli/commands/extension-pack.ts
|
|
15
|
-
init_normalize_manifest();
|
|
16
15
|
init_package_version();
|
|
17
16
|
init_logger();
|
|
18
17
|
const log = createLogger("ExtensionPack");
|
|
@@ -2,11 +2,11 @@ import { PACKAGE_VERSION, init_package_version } from "../../package-version.js"
|
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { init_paths, resolveExtensionsDir } from "../../config/paths.js";
|
|
5
|
-
import { init_loader, loadConfig, saveConfig } from "../../config/loader.js";
|
|
6
5
|
import { computeExtensionDirectoryIntegrity, getExtensionLockfileManager } from "../../extensions/lockfile.js";
|
|
7
6
|
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
8
7
|
import { checkEngineCompatibility } from "../../extensions/engine-check.js";
|
|
9
8
|
import { ExtensionLoader } from "../../extensions/loader.js";
|
|
9
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
10
10
|
import { getContextWithOpts } from "../context.js";
|
|
11
11
|
import { checkAllExtensionsHealth, getExtensionHealthChecker } from "../../extensions/health.js";
|
|
12
12
|
import { collectExtensionPackageDependencyIssues } from "../../extensions/package-contract.js";
|
|
@@ -21,7 +21,6 @@ import { join } from "node:path";
|
|
|
21
21
|
import { existsSync, readFileSync, readdirSync } from "node:fs";
|
|
22
22
|
import { Command } from "commander";
|
|
23
23
|
//#region src/cli/commands/extension.ts
|
|
24
|
-
init_loader();
|
|
25
24
|
init_paths();
|
|
26
25
|
init_package_version();
|
|
27
26
|
init_logger();
|
|
@@ -37,15 +37,15 @@ async function runGatewayFromCliOptions(options, ctx) {
|
|
|
37
37
|
}
|
|
38
38
|
if (tailscaleOverride && tailscaleOverride !== "off") process.env.XOPC_GATEWAY_TAILSCALE_MODE = tailscaleOverride;
|
|
39
39
|
if (options.tailscaleResetOnExit === true) process.env.XOPC_GATEWAY_TAILSCALE_RESET_ON_EXIT = "1";
|
|
40
|
-
const [{ loadConfig }, { resolveConfigPath }, { runGatewayLoop }, gatewayPorts,
|
|
40
|
+
const [{ loadConfig }, { resolveConfigPath }, { runGatewayLoop }, gatewayPorts, bootstrap] = await Promise.all([
|
|
41
41
|
import("../../../config/index.js"),
|
|
42
42
|
import("../../../config/paths.js"),
|
|
43
43
|
import("../../../gateway/run-loop.js"),
|
|
44
44
|
import("../../../gateway/ports.js"),
|
|
45
|
-
import("../../../
|
|
45
|
+
import("../../../bootstrap/application-state.js")
|
|
46
46
|
]);
|
|
47
47
|
const { checkPortAvailable, forceFreePortAndWait } = gatewayPorts;
|
|
48
|
-
|
|
48
|
+
bootstrap.bootstrapApplicationStateSync(ctx.configPath);
|
|
49
49
|
const config = loadConfig(ctx.configPath);
|
|
50
50
|
const bindFromFlagRaw = typeof options.bind === "string" && options.bind.trim().length > 0 ? options.bind.trim().toLowerCase() : void 0;
|
|
51
51
|
const bindFromFlag = bindFromFlagRaw && new Set([
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_paths, resolveConfigPath } from "../../../config/paths.js";
|
|
2
|
-
import { loadConfig } from "../../../config/loader.js";
|
|
3
2
|
import { resolveGatewayLaunchAgentLabel, resolveGatewaySystemdServiceName, resolveGatewayWindowsTaskName } from "../../../daemon/constants.js";
|
|
3
|
+
import { loadConfig } from "../../../config/loader.js";
|
|
4
4
|
import "../../../config/index.js";
|
|
5
5
|
//#region src/cli/commands/gateway/shared.ts
|
|
6
6
|
init_paths();
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { requireXopcDatabase } from "../../storage/sqlite/connection.js";
|
|
2
|
-
import "../../storage/sqlite/index.js";
|
|
2
|
+
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
3
3
|
import { formatExamples, register } from "../registry.js";
|
|
4
4
|
import { exportCtxHistory } from "../../history/ctx/exporter.js";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
//#region src/cli/commands/history.ts
|
|
7
|
+
init_sqlite();
|
|
7
8
|
async function runCtxExport(options) {
|
|
8
9
|
try {
|
|
9
10
|
const { db } = requireXopcDatabase();
|
|
@@ -6,8 +6,8 @@ import { Command } from "commander";
|
|
|
6
6
|
function createImageCommand(_ctx) {
|
|
7
7
|
const cmd = new Command("image").description("Inspect image provider availability").addHelpText("after", formatExamples(["xopc image providers # List available image generation providers", "xopc image status # Explain current image behavior"]));
|
|
8
8
|
cmd.command("status").description("Show image runtime status").action(() => {
|
|
9
|
-
console.log("Image understanding and generation inherit from
|
|
10
|
-
console.log("An
|
|
9
|
+
console.log("Image understanding and generation inherit from the global Agent defaults.");
|
|
10
|
+
console.log("An Agent may override either route in its capability settings.");
|
|
11
11
|
});
|
|
12
12
|
cmd.command("providers").description("List image generation providers").option("--json", "Output as JSON").action((opts) => {
|
|
13
13
|
const providers = listImageGenerationProvidersSummary();
|
|
@@ -3,17 +3,16 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { resolveAgentWorkspaceDir } from "../../agent/agent-scope.js";
|
|
5
5
|
import { WORKSPACE_FILES, init_paths, resolveAgentDir, resolveAgentHomeDir, resolveAgentProfileDir, resolveConfigPath } from "../../config/paths.js";
|
|
6
|
-
import {
|
|
6
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
7
7
|
import { ensureStarterAgentsInitialized } from "../../agent/starter-agents.js";
|
|
8
8
|
import { formatExamples, register } from "../registry.js";
|
|
9
9
|
import { join } from "path";
|
|
10
|
-
import { existsSync
|
|
10
|
+
import { existsSync } from "fs";
|
|
11
11
|
import { mkdir, writeFile } from "fs/promises";
|
|
12
12
|
import { Command } from "commander";
|
|
13
13
|
//#region src/cli/commands/init.ts
|
|
14
14
|
init_logger();
|
|
15
15
|
init_paths();
|
|
16
|
-
init_loader();
|
|
17
16
|
const log = createLogger("InitCommand");
|
|
18
17
|
/**
|
|
19
18
|
* Initialize xopc state directory structure
|
|
@@ -32,14 +31,13 @@ async function initCommand(options = {}) {
|
|
|
32
31
|
await mkdir(stateDir, { recursive: true });
|
|
33
32
|
const configPath = resolveConfigPath();
|
|
34
33
|
const configExists = existsSync(configPath);
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
await mkdir(
|
|
39
|
-
await mkdir(
|
|
40
|
-
await mkdir(
|
|
41
|
-
|
|
42
|
-
if (!configExists || options.force || diskTui.readable && (starterResult.changed || !diskTui.hasDefaultAgent)) {
|
|
34
|
+
ensureStarterAgentsInitialized();
|
|
35
|
+
const cfg = loadConfig(configPath);
|
|
36
|
+
await mkdir(resolveAgentHomeDir(agentId), { recursive: true });
|
|
37
|
+
await mkdir(resolveAgentProfileDir(agentId), { recursive: true });
|
|
38
|
+
await mkdir(resolveAgentDir(agentId), { recursive: true });
|
|
39
|
+
await mkdir(resolveAgentWorkspaceDir(agentId), { recursive: true });
|
|
40
|
+
if (!configExists || options.force) {
|
|
43
41
|
await saveConfig(cfg, configPath);
|
|
44
42
|
log.info({ configPath }, "Saved configuration");
|
|
45
43
|
}
|
|
@@ -49,29 +47,12 @@ async function initCommand(options = {}) {
|
|
|
49
47
|
agentId
|
|
50
48
|
}, "xopc Agent OS initialized successfully");
|
|
51
49
|
}
|
|
52
|
-
function readDiskTuiDefaultState(configPath) {
|
|
53
|
-
if (!existsSync(configPath)) return {
|
|
54
|
-
readable: true,
|
|
55
|
-
hasDefaultAgent: false
|
|
56
|
-
};
|
|
57
|
-
try {
|
|
58
|
-
return {
|
|
59
|
-
readable: true,
|
|
60
|
-
hasDefaultAgent: typeof JSON.parse(readFileSync(configPath, "utf-8")).tui?.defaultAgent === "string"
|
|
61
|
-
};
|
|
62
|
-
} catch {
|
|
63
|
-
return {
|
|
64
|
-
readable: false,
|
|
65
|
-
hasDefaultAgent: false
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
50
|
/**
|
|
70
51
|
* Create default workspace files for an agent
|
|
71
52
|
*/
|
|
72
53
|
async function createWorkspaceFiles(cfg, agentId) {
|
|
73
|
-
const workspaceDir = resolveAgentWorkspaceDir(
|
|
74
|
-
const profileDir = resolveAgentProfileDir(
|
|
54
|
+
const workspaceDir = resolveAgentWorkspaceDir(agentId);
|
|
55
|
+
const profileDir = resolveAgentProfileDir(agentId);
|
|
75
56
|
await mkdir(workspaceDir, { recursive: true });
|
|
76
57
|
await mkdir(profileDir, { recursive: true });
|
|
77
58
|
const soulPath = join(profileDir, WORKSPACE_FILES.SOUL);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { loadConfig } from "../../config/loader.js";
|
|
2
2
|
import { register } from "../registry.js";
|
|
3
3
|
import { createGatewayHttpClientFromConfig } from "../../mcp/gateway-http-client.js";
|
|
4
4
|
import { createCapabilityMcpServer } from "../../mcp/capability-server.js";
|
|
5
5
|
import { Command } from "commander";
|
|
6
6
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
7
7
|
//#region src/cli/commands/mcp.ts
|
|
8
|
-
init_loader();
|
|
9
8
|
function createMcpCommand(ctx) {
|
|
10
9
|
const command = new Command("mcp").description("Expose selected Gateway capabilities over MCP");
|
|
11
10
|
command.command("capabilities").description("Run an opt-in stdio MCP proxy for an explicit capability allowlist").requiredOption("--allow-capability <ids...>", "Exact capability IDs; no wildcards").action(async (options) => {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
2
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
1
3
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
2
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
3
4
|
import { CredentialResolver, init_credentials } from "../../auth/credentials.js";
|
|
4
5
|
import { getAllModels, getAvailableModels, getConfiguredProviders, getProviderAuthState, getProviderDisplayName, init_providers, isProviderConfigured, providerSupportsApiKey, providerSupportsOAuth, resolveModel } from "../../providers/index.js";
|
|
6
|
+
import { loadConfig } from "../../config/loader.js";
|
|
5
7
|
import { formatExamples, register } from "../registry.js";
|
|
6
8
|
import { getContextWithOpts } from "../context.js";
|
|
7
9
|
import "../../config/index.js";
|
|
@@ -14,6 +16,7 @@ import { Command } from "commander";
|
|
|
14
16
|
//#region src/cli/commands/models.ts
|
|
15
17
|
init_credentials();
|
|
16
18
|
init_schema();
|
|
19
|
+
init_repository();
|
|
17
20
|
init_providers();
|
|
18
21
|
const IMAGE_GENERATION_IDS = new Set([
|
|
19
22
|
"gpt-image-2",
|
|
@@ -43,14 +46,15 @@ const VISION_IDS = new Set([
|
|
|
43
46
|
"qwen-vl-max",
|
|
44
47
|
"qwen2.5-vl-72b-instruct"
|
|
45
48
|
]);
|
|
46
|
-
function currentModelRef(
|
|
47
|
-
return getAgentDefaultModelRef(
|
|
49
|
+
function currentModelRef(_config) {
|
|
50
|
+
return getAgentDefaultModelRef();
|
|
48
51
|
}
|
|
49
|
-
function setDefaultModel(
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
+
function setDefaultModel(modelRef) {
|
|
53
|
+
const defaults = new AgentCatalogRepository().getSettings().defaults;
|
|
54
|
+
const prep = prepareUpdateGlobalDefaults({ defaults: {
|
|
55
|
+
...defaults,
|
|
52
56
|
models: {
|
|
53
|
-
...
|
|
57
|
+
...defaults.models,
|
|
54
58
|
chat: {
|
|
55
59
|
primary: modelRef,
|
|
56
60
|
fallbacks: []
|
|
@@ -58,7 +62,7 @@ function setDefaultModel(config, modelRef) {
|
|
|
58
62
|
}
|
|
59
63
|
} });
|
|
60
64
|
if (prep.ok === false) throw new Error(prep.error);
|
|
61
|
-
|
|
65
|
+
if (prep.data.changed) new AgentCatalogService().updateDefaults(prep.data.defaults);
|
|
62
66
|
}
|
|
63
67
|
function modelRef(provider, id) {
|
|
64
68
|
return `${provider}/${id}`;
|
|
@@ -137,11 +141,9 @@ async function runModelsStatus(options) {
|
|
|
137
141
|
}
|
|
138
142
|
}
|
|
139
143
|
async function runModelsSet(model) {
|
|
140
|
-
const ctx = getContextWithOpts();
|
|
141
|
-
const config = loadConfig(ctx.configPath);
|
|
142
144
|
const resolved = resolveModel(model);
|
|
143
145
|
const ref = modelRef(resolved.provider, resolved.id);
|
|
144
|
-
|
|
146
|
+
setDefaultModel(ref);
|
|
145
147
|
console.log(`✅ Default model set: ${ref}`);
|
|
146
148
|
}
|
|
147
149
|
async function runAuthList(options) {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { buildExtensionMetadataSnapshot, init_extension_metadata_snapshot, resolveExtensionLoaderOptionsFromConfig } from "../../../../extensions/extension-metadata-snapshot.js";
|
|
2
1
|
import { listChannelPlugins } from "../../../../channels/plugins/registry.js";
|
|
3
2
|
import { ExtensionLoader } from "../../../../extensions/loader.js";
|
|
3
|
+
import { buildExtensionMetadataSnapshot, resolveExtensionLoaderOptionsFromConfig } from "../../../../extensions/extension-metadata-snapshot.js";
|
|
4
4
|
import { channelSetupWizardToConfigurator } from "./wizard-to-configurator.js";
|
|
5
5
|
import { channelOnboardToConfigurator } from "./onboard-to-configurator.js";
|
|
6
6
|
//#region src/cli/commands/onboard/channels/registry.ts
|
|
7
|
-
init_extension_metadata_snapshot();
|
|
8
7
|
function sortByMetaOrder(plugins) {
|
|
9
8
|
return [...plugins].sort((a, b) => {
|
|
10
9
|
const oa = a.meta.order ?? 999;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { GatewayLockError, acquireGatewayLock
|
|
1
|
+
import { GatewayLockError, acquireGatewayLock } from "../../../gateway/lock.js";
|
|
2
2
|
import { confirm } from "@inquirer/prompts";
|
|
3
3
|
//#region src/cli/commands/onboard/gateway.ts
|
|
4
4
|
/**
|
|
5
5
|
* Gateway Configuration and Startup for Onboarding
|
|
6
6
|
*/
|
|
7
|
-
init_lock();
|
|
8
7
|
function isInteractive() {
|
|
9
8
|
return process.stdin.isTTY && process.stdout.isTTY;
|
|
10
9
|
}
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
import type { Config } from '../../../config/schema.js';
|
|
5
5
|
import { type XopcCloudCatalogCoordinator } from '../../../providers/xopc-cloud-catalog-coordinator.js';
|
|
6
6
|
import type { CLIContext } from '../../registry.js';
|
|
7
|
-
export declare function setPrimaryModel(config: Config, workspacePath: string, modelRef: string): Config
|
|
7
|
+
export declare function setPrimaryModel(config: Config, workspacePath: string, modelRef: string): Promise<Config>;
|
|
8
8
|
export declare function refreshOnboardModelCatalogIfNeeded(provider: string, hasCatalogModels: boolean, coordinator?: Pick<XopcCloudCatalogCoordinator, 'refresh'>): Promise<void>;
|
|
9
9
|
export declare function setupModel(existingConfig: Config | null, ctx: CLIContext): Promise<Config>;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AgentCatalogRepository, init_repository } from "../../../agent-catalog/repository.js";
|
|
2
2
|
import { resolveModelsJsonPath } from "../../../config/paths.js";
|
|
3
|
+
import { AgentCatalogService } from "../../../agent-catalog/service.js";
|
|
4
|
+
import { getAgentDefaultModelRef, init_schema } from "../../../config/schema.js";
|
|
3
5
|
import { init_models_json, loadModelsJson, saveModelsJson } from "../../../config/models-json.js";
|
|
4
6
|
import { getApiKeyFromEnv } from "../../../providers/env-keys.js";
|
|
5
7
|
import { getModelRegistry } from "../../../providers/model-registry.js";
|
|
@@ -12,6 +14,7 @@ import { getDomesticProviderBaseUrl, getDomesticProviderPreset, getDomesticProvi
|
|
|
12
14
|
import { getProviderHint, getRecommendedModelsForProvider, sortModelsForPicker, sortProvidersForPicker } from "../../../providers/presentation.js";
|
|
13
15
|
import { colors } from "../../utils/colors.js";
|
|
14
16
|
import { listProfilesForProvider } from "../../../auth/profiles/profiles.js";
|
|
17
|
+
import "../../../auth/profiles/index.js";
|
|
15
18
|
import { getOAuthProvider } from "../../utils/oauth-providers.js";
|
|
16
19
|
import { runCliOAuthLogin } from "../../utils/oauth-login.js";
|
|
17
20
|
import { confirm, input, select } from "@inquirer/prompts";
|
|
@@ -23,28 +26,13 @@ init_credentials();
|
|
|
23
26
|
init_models_json();
|
|
24
27
|
init_schema();
|
|
25
28
|
init_providers();
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
nextList[index] = {
|
|
34
|
-
...agent,
|
|
35
|
-
workspace: workspacePath
|
|
36
|
-
};
|
|
37
|
-
nextConfig = {
|
|
38
|
-
...config,
|
|
39
|
-
agents: {
|
|
40
|
-
...config.agents,
|
|
41
|
-
list: nextList
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const currentModels = nextConfig.agents.defaults.models;
|
|
46
|
-
const prep = prepareUpdateGlobalDefaults(nextConfig, { defaults: {
|
|
47
|
-
...nextConfig.agents.defaults,
|
|
29
|
+
init_repository();
|
|
30
|
+
async function setPrimaryModel(config, workspacePath, modelRef) {
|
|
31
|
+
const repository = new AgentCatalogRepository();
|
|
32
|
+
const catalog = repository.snapshot();
|
|
33
|
+
const currentModels = catalog.defaults.models;
|
|
34
|
+
const prep = prepareUpdateGlobalDefaults({ defaults: {
|
|
35
|
+
...catalog.defaults,
|
|
48
36
|
models: {
|
|
49
37
|
...currentModels,
|
|
50
38
|
chat: {
|
|
@@ -54,7 +42,11 @@ function setPrimaryModel(config, workspacePath, modelRef) {
|
|
|
54
42
|
}
|
|
55
43
|
} });
|
|
56
44
|
if (prep.ok === false) throw new Error(prep.error);
|
|
57
|
-
|
|
45
|
+
const service = new AgentCatalogService(repository);
|
|
46
|
+
if (prep.data.changed) service.updateDefaults(prep.data.defaults);
|
|
47
|
+
const agent = repository.get(catalog.defaultAgentId);
|
|
48
|
+
if (agent && agent.workspace !== workspacePath) await service.update(catalog.defaultAgentId, { workspace: workspacePath });
|
|
49
|
+
return config;
|
|
58
50
|
}
|
|
59
51
|
function formatRecommended(provider) {
|
|
60
52
|
const labels = getRecommendedModelsForProvider(provider, 3).map((m) => m.name || m.id);
|
|
@@ -438,7 +430,7 @@ async function ensureProviderCredential(provider, providerName) {
|
|
|
438
430
|
async function setupModel(existingConfig, ctx) {
|
|
439
431
|
console.log("\n🤖 Step: AI Model\n");
|
|
440
432
|
const config = existingConfig || {};
|
|
441
|
-
const currentModel = getAgentDefaultModelRef(
|
|
433
|
+
const currentModel = getAgentDefaultModelRef();
|
|
442
434
|
if (currentModel) {
|
|
443
435
|
console.log("Current model:", currentModel);
|
|
444
436
|
if (await confirm({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
2
|
+
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
2
3
|
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
3
|
-
import { saveConfig } from "../../config/loader.js";
|
|
4
4
|
import { resolveGatewayLocalClientHost } from "../../config/gateway-bind.js";
|
|
5
|
+
import { saveConfig } from "../../config/loader.js";
|
|
5
6
|
import { formatExamples, register } from "../registry.js";
|
|
6
7
|
import "../../config/index.js";
|
|
7
8
|
import { provisionEagerRuntimes } from "../../runtime-tools/bootstrap.js";
|
|
@@ -13,6 +14,7 @@ import { setupChannels } from "./onboard/channels/index.js";
|
|
|
13
14
|
import { select } from "@inquirer/prompts";
|
|
14
15
|
import { Command } from "commander";
|
|
15
16
|
//#region src/cli/commands/onboard.ts
|
|
17
|
+
init_repository();
|
|
16
18
|
init_schema();
|
|
17
19
|
init_paths_state();
|
|
18
20
|
function isInteractive() {
|
|
@@ -24,7 +26,7 @@ function printGitHubStarHint() {
|
|
|
24
26
|
}
|
|
25
27
|
async function setupNonInteractive(_configPath, existingConfig) {
|
|
26
28
|
console.log("\n🤖 AI Model Configuration (Non-Interactive Mode)\n");
|
|
27
|
-
console.log("Current
|
|
29
|
+
console.log("Current Agent overrides:", JSON.stringify(new AgentCatalogRepository().snapshot().agents, null, 2));
|
|
28
30
|
console.log("\n💡 To configure in interactive mode, run: xopc onboard");
|
|
29
31
|
console.log("💡 Or set up manually in:", _configPath);
|
|
30
32
|
return existingConfig;
|
|
@@ -4,6 +4,7 @@ import "../../config/index.js";
|
|
|
4
4
|
import { PLATFORM_RUNTIME_PROFILE, PLATFORM_RUNTIME_PROVIDER, PlatformRuntimeClient, discoverPlatform } from "../../platform/client.js";
|
|
5
5
|
import "../../platform/index.js";
|
|
6
6
|
import { getProfile, upsertAuthProfile } from "../../auth/profiles/profiles.js";
|
|
7
|
+
import "../../auth/profiles/index.js";
|
|
7
8
|
import { Command } from "commander";
|
|
8
9
|
//#region src/cli/commands/platform.ts
|
|
9
10
|
async function readStdin() {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { closeXopcDatabase, isXopcDatabaseOpen, openXopcDatabase } from "../../storage/sqlite/connection.js";
|
|
2
2
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
3
3
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
4
|
-
import "../../storage/sqlite/index.js";
|
|
5
|
-
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
4
|
+
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
6
5
|
import { ProjectService } from "../../projects/project-service.js";
|
|
7
6
|
import { isValidProjectAgentId, normalizeProjectAgentId } from "../../projects/project-agent.js";
|
|
8
7
|
import "../../projects/index.js";
|
|
9
8
|
import "../../tasks/index.js";
|
|
9
|
+
import { loadConfig } from "../../config/loader.js";
|
|
10
10
|
import { formatExamples, register } from "../registry.js";
|
|
11
11
|
import { Command } from "commander";
|
|
12
12
|
//#region src/cli/commands/project.ts
|
|
13
|
-
|
|
13
|
+
init_sqlite();
|
|
14
14
|
function parseStatus(raw) {
|
|
15
15
|
return raw === "active" || raw === "paused" || raw === "archived" ? raw : void 0;
|
|
16
16
|
}
|
|
@@ -3,6 +3,7 @@ import { PROVIDER_META, getAllProviders, getSortedProviders, init_providers } fr
|
|
|
3
3
|
import { formatExamples, register } from "../registry.js";
|
|
4
4
|
import { colors } from "../utils/colors.js";
|
|
5
5
|
import { getProfile, listAllProfiles, listProfilesForProvider, removeAuthProfile, upsertAuthProfile } from "../../auth/profiles/profiles.js";
|
|
6
|
+
import "../../auth/profiles/index.js";
|
|
6
7
|
import { SETUP_EXIT } from "./setup-shared/types.js";
|
|
7
8
|
import { emitTask } from "./setup-shared/output.js";
|
|
8
9
|
import { isPromptCancelled, promptSecret } from "./setup-shared/prompts.js";
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { init_paths_state, resolveStateDir } from "../../config/paths-state.js";
|
|
2
|
-
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
3
2
|
import { ManagedRuntimeManager } from "../../runtime-tools/manager.js";
|
|
3
|
+
import { loadConfig } from "../../config/loader.js";
|
|
4
4
|
import { formatExamples, register } from "../registry.js";
|
|
5
5
|
import { pruneRuntimeTools } from "../../runtime-tools/prune.js";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
//#region src/cli/commands/runtime.ts
|
|
8
|
-
init_loader();
|
|
9
8
|
init_paths_state();
|
|
10
9
|
const RUNTIMES = [
|
|
11
10
|
"node",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { init_paths, resolveConfigPath } from "../../config/paths.js";
|
|
2
|
-
import {
|
|
2
|
+
import { loadConfig } from "../../config/loader.js";
|
|
3
3
|
import { formatExamples, register } from "../registry.js";
|
|
4
4
|
import { colors } from "../utils/colors.js";
|
|
5
5
|
import { SETUP_EXIT } from "./setup-shared/types.js";
|
|
@@ -15,7 +15,6 @@ import { Command } from "commander";
|
|
|
15
15
|
* Backed by `cfg.tools.web.search.providers[]` per `SearchProviderEntrySchema`.
|
|
16
16
|
* Adds entries idempotently keyed by `type` (brave / tavily / bing / searxng).
|
|
17
17
|
*/
|
|
18
|
-
init_loader();
|
|
19
18
|
init_paths();
|
|
20
19
|
const SEARCH_TYPES = [
|
|
21
20
|
"brave",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { init_paths, resolveBundledSkillsDir, resolveSkillsLockPath } from "../../config/paths.js";
|
|
3
|
-
import { init_loader, loadConfig } from "../../config/loader.js";
|
|
4
3
|
import { findInstallSpec, hasBinary, installSkill } from "../../agent/skills/installer.js";
|
|
5
4
|
import { createSkillConfigManager, isSkillEnabled } from "../../agent/skills/config.js";
|
|
6
5
|
import { formatScanSummary, scanSkillDirectory } from "../../agent/skills/scanner.js";
|
|
@@ -8,6 +7,7 @@ import { createSkillLoader } from "../../agent/skills/index.js";
|
|
|
8
7
|
import { loadSkillsLock } from "../../agent/skills/hub-lock.js";
|
|
9
8
|
import { pullSkillFromSource, updateSkillFromLock } from "../../agent/skills/hub-pull.js";
|
|
10
9
|
import { ProjectTrustStore } from "../../project-trust/trust-store.js";
|
|
10
|
+
import { loadConfig } from "../../config/loader.js";
|
|
11
11
|
import { register } from "../registry.js";
|
|
12
12
|
import { createSkillsTestCommand } from "./skills-test.js";
|
|
13
13
|
import { Command } from "commander";
|
|
@@ -18,7 +18,6 @@ import { Command } from "commander";
|
|
|
18
18
|
* Manage skills: list, install, enable/disable, configure, test
|
|
19
19
|
*/
|
|
20
20
|
init_paths();
|
|
21
|
-
init_loader();
|
|
22
21
|
function loadWorkspaceSkillCatalog(workspaceDir, options = {}) {
|
|
23
22
|
const trustStore = options.trustStore ?? new ProjectTrustStore();
|
|
24
23
|
const loader = createSkillLoader({ isWorkspaceTrusted: (resolvedPath) => trustStore.get(resolvedPath) === true });
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { detectMigrations } from "../../migrations/runner.js";
|
|
2
|
+
import { bootstrapApplicationStateSync } from "../../bootstrap/application-state.js";
|
|
1
3
|
import { createGatewayCredential } from "../../gateway/credential.js";
|
|
2
|
-
import { detectMigrations, runBootstrapMigrationsSync } from "../../migrations/runner.js";
|
|
3
4
|
//#region src/cli/commands/tui-runner.ts
|
|
4
5
|
function prepareTuiStartup(configPath) {
|
|
5
|
-
|
|
6
|
+
bootstrapApplicationStateSync(configPath);
|
|
6
7
|
const pendingMigrations = detectMigrations(configPath);
|
|
7
8
|
if (pendingMigrations.length > 0) console.warn(`xopc has ${pendingMigrations.length} pending migration(s). Run \`xopc doctor --fix\` or open Settings → App management.`);
|
|
8
9
|
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { setTuiDefaultAgentConfig } from "../../commands/agents.config.js";
|
|
1
|
+
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
3
2
|
import { formatExamples, register } from "../registry.js";
|
|
4
3
|
import { prepareTuiStartup, runTuiFromCliOptions } from "./tui-runner.js";
|
|
5
4
|
import { Command } from "commander";
|
|
6
5
|
//#region src/cli/commands/tui.ts
|
|
7
|
-
init_loader();
|
|
8
6
|
function createTuiCommand(ctx) {
|
|
9
7
|
return new Command("tui").description("Interactive terminal UI (pi-tui)").addHelpText("after", formatExamples([
|
|
10
8
|
"xopc # Open embedded TUI (default command)",
|
|
@@ -19,13 +17,13 @@ function createTuiCommand(ctx) {
|
|
|
19
17
|
])).option("--url <url>", "Gateway URL (default: http://localhost:3120)").option("--token <token>", "Gateway bearer token").option("--password-env <name>", "Environment variable holding the gateway password").option("-s, --session <key>", "Session key to resume (omitted: start a fresh TUI session)").option("--agent <id>", "Agent id for a fresh TUI session").option("--set-default-agent <id>", "Persist default agent for new TUI sessions and exit").option("-m, --message <text>", "Send a message on launch").option("--workdir <dir>", "Workspace directory for the new TUI session").option("--no-cwd", "Do not use the launch directory as the new TUI session workspace").option("--local", "Run in embedded mode (no gateway required)").option("--gateway", "Force gateway mode even without an explicit URL or credential").option("--theme <name>", "Theme: auto, dark, light, or custom name from ~/.xopc/themes/").option("--thinking <level>", "Thinking level override").action(async (options) => {
|
|
20
18
|
prepareTuiStartup(ctx.configPath);
|
|
21
19
|
if (typeof options.setDefaultAgent === "string") {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
try {
|
|
21
|
+
new AgentCatalogService().setSurfaceDefault("tui", options.setDefaultAgent);
|
|
22
|
+
} catch (error) {
|
|
23
|
+
console.error(`Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
25
24
|
process.exit(1);
|
|
26
25
|
}
|
|
27
|
-
|
|
28
|
-
console.log(`TUI default agent set to "${result.agentId}".`);
|
|
26
|
+
console.log(`TUI default Agent set to "${options.setDefaultAgent.trim().toLowerCase()}".`);
|
|
29
27
|
return;
|
|
30
28
|
}
|
|
31
29
|
await runTuiFromCliOptions(options);
|