@xopcai/xopc 0.0.321 → 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/dist/assets/{auth-DKo-NMUY.js → auth-DocRzRlS.js} +95 -21
- package/dist/browser-ext/dist/background.js +1 -1
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +18 -2
- 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-C69p1Gbr.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-CNuqJcHQ.js +1 -0
- package/dist/gateway/static/root/assets/{agents-CWR3p3t3.js → agents-CPpmkx7O.js} +1 -1
- package/dist/gateway/static/root/assets/{app-link-nL8iPwEr.js → app-link-C6gA5Nck.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-D98bt40S.js → app-management-settings-panel-BwWdVRlb.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-ChMUELAZ.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-BIIiu6uP.js → archive-plugin-B_T0uMvL.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CDJpcsCp.js → attachment-load-D9DDwxd2.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Cb5a_WOk.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-zp55zQPu.js → binary-plugins-Dzsxh9OL.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-B0CTIZb-.js → block-editor-CWUUgWWk.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-Bx3W4J4H.js → browser-automation-inputs-DSWXq9lI.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-D5Lr9b8a.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-1I1PdIq0.js → chat-terminal-dock-WXZrEB3K.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-BT-EfoI6.js → computer-settings-page-uy9YDwxJ.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-mhQ-19tj.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-DLDLJx3D.js → dependency-picker-BhS8s080.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-kSFeHyrt.js → desktop-pet-DPVPqFlh.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BjY7DqD7.js → desktop-pet-settings-Dv3vG9HZ.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DdvO1O6W.js +1 -0
- package/dist/gateway/static/root/assets/dist-3h6cXXhT.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DbWJDT4X.js → extension-debug-page-cuG5Lnwf.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-lAC_2xWA.js → extension-page-BCTAXdyE.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-jFy1NJg9.js → extension-settings-page-kadW_icu.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-B7WpH3VW.js → gateway-config-swr-CoQVulMd.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-CLZyN-u9.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-C8F_z865.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-Dc7d0_7q.js → image-generation-api-DvWDkbk1.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-_fMvJvzM.js → imports-page-_pddpuej.js} +1 -1
- package/dist/gateway/static/root/assets/index-BKL5tg2f.css +1 -0
- package/dist/gateway/static/root/assets/index-CJuypaNt.js +121 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CHnZYx1U.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-Bpja8nC6.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-page-CkXKS5xe.js +1 -0
- package/dist/gateway/static/root/assets/{locale-store-D9krC43K.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-8eDZb0uS.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-CurpvCbB.js → markdown-view-Dft8ASFD.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CYldyH6K.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-DZOiI84c.js → page-context-capture-button-OUL3fEYh.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-C-XCf9cR.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-CvgeoEU8.js → preview-open-alternatives-CKiIby0r.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-bv3z8Xkh.js +1 -0
- package/dist/gateway/static/root/assets/product-open-page-DlpCi5zT.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-LPAxUszX.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Cbyb4hyy.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-cK-g8BDq.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-DlUodTo-.js → runtime-tools-settings-panel-BT_ANpaT.js} +2 -2
- package/dist/gateway/static/root/assets/scenes-page-CJlc-mg1.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-BfboLCeN.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-BytEfCGo.js → settings-form-section-Dol9j_pF.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-Da2ql9KX.js → settings-page-B65vii9U.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-CBfB_7yz.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-B8J0Saj5.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-B53tyGx5.js → skills-page.utils-DOk-iOvN.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-0HAvlVtR.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-DJsxU6q_.js → tunnel-api-DDGMf44u.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-eIELzAOD.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-BJ59ZCAn.js → voice-api-key-field-DJV-qERt.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DBXZJWLS.js → voice-config-api-BaxITrwZ.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BpSxdIgB.js → work-discovery-overlay-DcHhy54L.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Bhlv3VUX.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 +14 -12
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/capabilities.js +4 -110
- package/dist/packages/gateway-contract/src/chat-previews.js +73 -0
- package/dist/packages/gateway-contract/src/home.js +284 -55
- package/dist/packages/gateway-contract/src/index.js +6 -2
- package/dist/packages/gateway-contract/src/local-apps.js +215 -0
- package/dist/packages/gateway-contract/src/notifications.js +3 -10
- package/dist/packages/gateway-contract/src/product-delivery.js +62 -17
- package/dist/packages/gateway-contract/src/user-turn-document.js +60 -0
- package/dist/src/activity/emitter.js +2 -1
- package/dist/src/activity/service.js +2 -1
- package/dist/src/agent/agent-manager.d.ts +4 -2
- package/dist/src/agent/agent-manager.js +37 -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/embedded/transcript-runtime.d.ts +3 -0
- package/dist/src/agent/embedded/transcript-runtime.js +6 -0
- package/dist/src/agent/external-tools/cliProvider.js +6 -2
- package/dist/src/agent/external-tools/composio-provider.js +11 -4
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/external-tools/gateway-tools.js +17 -10
- package/dist/src/agent/external-tools/index.js +2 -3
- package/dist/src/agent/external-tools/mcp-provider.d.ts +3 -1
- package/dist/src/agent/external-tools/mcp-provider.js +93 -8
- package/dist/src/agent/external-tools/service.d.ts +2 -1
- package/dist/src/agent/external-tools/service.js +8 -3
- package/dist/src/agent/external-tools/types.d.ts +9 -0
- 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/mcp/bundle-mcp-config.js +37 -5
- package/dist/src/agent/mcp/bundle-mcp-gateway.d.ts +1 -0
- package/dist/src/agent/mcp/bundle-mcp-gateway.js +1 -0
- package/dist/src/agent/mcp/bundle-mcp-names.js +2 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +33 -1
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +4 -0
- package/dist/src/agent/mcp/index.js +1 -1
- package/dist/src/agent/mcp/mcp-stdio-transport.d.ts +1 -0
- package/dist/src/agent/mcp/mcp-stdio-transport.js +10 -0
- package/dist/src/agent/mcp/mcp-transport.js +12 -8
- package/dist/src/agent/mcp/oauth/index.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.d.ts +6 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +70 -14
- package/dist/src/agent/mcp/oauth/mcp-oauth-provider.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-session.d.ts +2 -0
- package/dist/src/agent/mcp/oauth/mcp-oauth-session.js +12 -0
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.d.ts +3 -0
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +13 -1
- package/dist/src/agent/mcp/plugin-http-fetch.d.ts +2 -0
- package/dist/src/agent/mcp/plugin-http-fetch.js +56 -0
- 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 +30 -14
- 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 +13 -11
- package/dist/src/agent/service.types.d.ts +4 -0
- package/dist/src/agent/session/session-inspector.js +4 -5
- package/dist/src/agent/skills/hub-pull.js +1 -1
- package/dist/src/agent/skills/index.js +8 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.d.ts +5 -0
- package/dist/src/agent/skills/skill-manager.d.ts +2 -0
- package/dist/src/agent/skills/skill-manager.js +8 -0
- package/dist/src/agent/skills/skill-sources.js +17 -0
- package/dist/src/agent/skills/types.d.ts +3 -1
- package/dist/src/agent/source-context/injector.js +10 -5
- package/dist/src/agent/source-context/types.d.ts +3 -0
- package/dist/src/agent/source-context/types.js +8 -2
- 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 +42 -2
- package/dist/src/agent/tools/automation-tool.js +1 -1
- package/dist/src/agent/tools/delegation-parent-policy.js +2 -3
- package/dist/src/agent/tools/factory.d.ts +3 -0
- package/dist/src/agent/tools/factory.js +12 -10
- package/dist/src/agent/tools/image-generate-tool.js +1 -1
- package/dist/src/agent/tools/workflow-tool.js +3 -4
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.d.ts +5 -2
- package/dist/src/agent/tools/xopc-use-tool.js +171 -15
- 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/index.d.ts +2 -0
- package/dist/src/chat-previews/index.js +3 -0
- package/dist/src/chat-previews/service.d.ts +27 -0
- package/dist/src/chat-previews/service.js +106 -0
- package/dist/src/chat-previews/store.d.ts +28 -0
- package/dist/src/chat-previews/store.js +78 -0
- 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.d.ts +8 -0
- package/dist/src/cli/commands/extension-agent-plugin.js +81 -0
- package/dist/src/cli/commands/extension-dev.js +2 -4
- package/dist/src/cli/commands/extension-marketplace.js +45 -6
- package/dist/src/cli/commands/extension-pack.js +1 -2
- package/dist/src/cli/commands/extension.js +36 -5
- 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/account-selection.js +1 -1
- 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/connection-candidates.d.ts +4 -1
- package/dist/src/connectors/connection-candidates.js +8 -2
- package/dist/src/connectors/connection-capabilities.d.ts +2 -2
- package/dist/src/connectors/connection-capabilities.js +3 -1
- package/dist/src/connectors/connection-recovery-service.d.ts +6 -1
- package/dist/src/connectors/connection-recovery-service.js +138 -26
- package/dist/src/connectors/content-enrichment.js +2 -1
- package/dist/src/connectors/learning-coordinator.js +2 -1
- package/dist/src/connectors/plugin-mcp-recovery.d.ts +28 -0
- package/dist/src/connectors/plugin-mcp-recovery.js +90 -0
- 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/auth.d.ts +39 -0
- package/dist/src/extensions/agent-plugins/auth.js +156 -0
- package/dist/src/extensions/agent-plugins/connection.d.ts +8 -0
- package/dist/src/extensions/agent-plugins/connection.js +41 -0
- package/dist/src/extensions/agent-plugins/health.d.ts +4 -0
- package/dist/src/extensions/agent-plugins/health.js +48 -0
- package/dist/src/extensions/agent-plugins/inventory.d.ts +53 -0
- package/dist/src/extensions/agent-plugins/inventory.js +34 -0
- package/dist/src/extensions/agent-plugins/mcp-adapter.d.ts +3 -0
- package/dist/src/extensions/agent-plugins/mcp-adapter.js +47 -0
- package/dist/src/extensions/agent-plugins/sources.d.ts +5 -0
- package/dist/src/extensions/agent-plugins/sources.js +72 -0
- package/dist/src/extensions/agent-plugins/store.d.ts +61 -0
- package/dist/src/extensions/agent-plugins/store.js +305 -0
- package/dist/src/extensions/agent-plugins/validation.d.ts +59 -0
- package/dist/src/extensions/agent-plugins/validation.js +211 -0
- 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 +2 -3
- 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/chat-stream/mapper.js +10 -3
- 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/agent-plugins.d.ts +3 -0
- package/dist/src/gateway/hono/routes/agent-plugins.js +166 -0
- package/dist/src/gateway/hono/routes/agent-stream.js +14 -0
- package/dist/src/gateway/hono/routes/agents.js +22 -49
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +4 -2
- 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/chat-previews.d.ts +3 -0
- package/dist/src/gateway/hono/routes/chat-previews.js +41 -0
- 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/connection-waits.js +4 -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/index.js +2 -0
- package/dist/src/gateway/hono/routes/interaction-state.js +2 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/local-apps.js +71 -39
- package/dist/src/gateway/hono/routes/mcp.js +48 -21
- 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.d.ts +4 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +23 -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/side-chats.js +11 -0
- 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 +11 -3
- 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.d.ts +1 -0
- package/dist/src/gateway/service/marketplace-service.js +18 -2
- package/dist/src/gateway/service/run-gateway-agent.js +4 -2
- package/dist/src/gateway/service/session-input-coordinator.js +7 -5
- package/dist/src/gateway/service.d.ts +10 -1
- package/dist/src/gateway/service.js +123 -33
- package/dist/src/gateway/session-context-summary.js +4 -2
- package/dist/src/gateway/side-chat/index.d.ts +3 -1
- package/dist/src/gateway/side-chat/index.js +2 -1
- package/dist/src/gateway/side-chat/manager.d.ts +16 -0
- package/dist/src/gateway/side-chat/manager.js +40 -6
- package/dist/src/gateway/side-chat/promotion-service.d.ts +19 -0
- package/dist/src/gateway/side-chat/promotion-service.js +111 -0
- package/dist/src/gateway/side-chat/run-service.js +1 -0
- package/dist/src/gateway/side-chat/types.d.ts +1 -1
- 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/artifact-files.d.ts +3 -0
- package/dist/src/local-apps/artifact-files.js +45 -0
- package/dist/src/local-apps/capabilities/write.js +1 -1
- package/dist/src/local-apps/fix-guidance.d.ts +3 -0
- package/dist/src/local-apps/fix-guidance.js +75 -0
- package/dist/src/local-apps/index.d.ts +2 -1
- package/dist/src/local-apps/scaffold.d.ts +5 -0
- package/dist/src/local-apps/scaffold.js +18 -5
- package/dist/src/local-apps/service.d.ts +18 -3
- package/dist/src/local-apps/service.js +107 -65
- package/dist/src/local-apps/snapshot-store.d.ts +8 -0
- package/dist/src/local-apps/snapshot-store.js +68 -0
- package/dist/src/local-apps/store.js +2 -1
- package/dist/src/local-apps/types.d.ts +4 -87
- 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/client-history.d.ts +3 -1
- package/dist/src/session/client-history.js +10 -3
- package/dist/src/session/config-store.js +2 -1
- package/dist/src/session/index.d.ts +1 -1
- package/dist/src/session/init-session-turn.js +2 -1
- package/dist/src/session/manager.d.ts +4 -0
- package/dist/src/session/manager.js +6 -0
- package/dist/src/session/resolve-session.js +2 -1
- package/dist/src/session/session-context-for-llm.d.ts +12 -1
- package/dist/src/session/session-context-for-llm.js +16 -2
- package/dist/src/session/session-workspace.js +1 -1
- package/dist/src/session/store.d.ts +14 -0
- package/dist/src/session/store.js +20 -2
- package/dist/src/session/stored-rows-to-file-entries.js +10 -1
- package/dist/src/session/transcript-outline.js +10 -3
- 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/connection-wait-repository.js +9 -3
- 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/202_chat_previews.sql +26 -0
- 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/row-mappers.js +6 -1
- 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 +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DWLXHWXg.js +0 -1
- package/dist/gateway/static/root/assets/api-Df2D6d3C.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-BzytHIn1.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-CtSV8tp-.js +0 -7
- package/dist/gateway/static/root/assets/browser-settings-page-DrvNA-G2.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-D0S3DuAD.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-c0k2virA.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-Bkl9fDHc.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Dw_h-5Qh.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-BqcldZoN.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-C5f4FRpE.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-D7XbH6Hk.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CFJypY6Y.js +0 -1
- package/dist/gateway/static/root/assets/index-B4Vwh0H-.css +0 -1
- package/dist/gateway/static/root/assets/index-BNubE2Zi.js +0 -89
- package/dist/gateway/static/root/assets/local-app-workbench-page-BLKCFXvr.js +0 -2
- package/dist/gateway/static/root/assets/local-apps-page-BNFmOkxs.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-COxOJsgX.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-BX5NtnQ2.js +0 -1
- package/dist/gateway/static/root/assets/messages-B1sTgIrE.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-DZ0IWx1R.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-B9F1uue_.js +0 -8
- package/dist/gateway/static/root/assets/popover-select-B-GDnZO9.js +0 -1
- package/dist/gateway/static/root/assets/product-delivery-chCjIpvu.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-DEYWx__w.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-9qMDEKVd.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-D4UTOpEm.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CPmOucUB.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-DO8vGorm.js +0 -2
- package/dist/gateway/static/root/assets/sessions-page-zu5P0dk5.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-ClEw-i1l.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DElF2sgq.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-MLolJfoV.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DTPsW9TY.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-CNQHhsiv.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-Dc30oS9J.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-Bq6ab5WJ.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-Ci-4HAYm.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,10 +1,14 @@
|
|
|
1
|
+
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
2
|
+
import { AgentCatalogRepository, init_repository } from "../agent-catalog/repository.js";
|
|
3
|
+
import { init_agent_scope } from "../agent/agent-scope.js";
|
|
4
|
+
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
1
5
|
import { ConfigSchema, init_schema } from "../config/schema.js";
|
|
2
|
-
import { init_agent_scope, normalizeAgentId } from "../agent/agent-scope.js";
|
|
3
6
|
import { resolveEffectiveAgentConfigForAgent } from "../config/agent-profile.js";
|
|
4
7
|
import { fetchWithTimeoutGuarded } from "../media-shared/http/provider-http.js";
|
|
5
8
|
import "../media-shared/http/index.js";
|
|
6
9
|
import { getImageGenerationProvider, listImageGenerationProvidersSummary } from "../agent/image/generation/provider-registry.js";
|
|
7
10
|
//#region src/gateway/image-generation-setup.ts
|
|
11
|
+
init_repository();
|
|
8
12
|
init_agent_scope();
|
|
9
13
|
init_schema();
|
|
10
14
|
function getImageGenerationCatalog(config) {
|
|
@@ -51,18 +55,18 @@ function parseProviderConfig(provider, input) {
|
|
|
51
55
|
value
|
|
52
56
|
};
|
|
53
57
|
}
|
|
54
|
-
function getAgentImageGenerationConfig(
|
|
58
|
+
function getAgentImageGenerationConfig(agentIdRaw) {
|
|
55
59
|
const agentId = normalizeAgentId(agentIdRaw);
|
|
56
|
-
if (!
|
|
60
|
+
if (!new AgentCatalogRepository().get(agentId)) throw new Error(`Agent not found: ${agentId}`);
|
|
57
61
|
return {
|
|
58
62
|
agentId,
|
|
59
|
-
model: resolveEffectiveAgentConfigForAgent(
|
|
63
|
+
model: resolveEffectiveAgentConfigForAgent(agentId).config.models.imageGeneration ?? null
|
|
60
64
|
};
|
|
61
65
|
}
|
|
62
|
-
function getDefaultImageGenerationConfig(
|
|
63
|
-
return { model:
|
|
66
|
+
function getDefaultImageGenerationConfig() {
|
|
67
|
+
return { model: new AgentCatalogRepository().getSettings().defaults.models.imageGeneration ?? null };
|
|
64
68
|
}
|
|
65
|
-
function prepareImageGenerationConfig(config, input
|
|
69
|
+
function prepareImageGenerationConfig(config, input) {
|
|
66
70
|
const providerId = input.providerId.trim();
|
|
67
71
|
const provider = getImageGenerationProvider(providerId);
|
|
68
72
|
if (!provider) return {
|
|
@@ -87,11 +91,11 @@ function prepareImageGenerationConfig(config, input, applyModel) {
|
|
|
87
91
|
...parsedProviderConfig.value
|
|
88
92
|
}
|
|
89
93
|
};
|
|
90
|
-
|
|
94
|
+
const model = {
|
|
91
95
|
primary: `${providerId}/${modelId}`,
|
|
92
96
|
fallbacks: [],
|
|
93
97
|
autoProviderFallback: false
|
|
94
|
-
}
|
|
98
|
+
};
|
|
95
99
|
const parsed = ConfigSchema.safeParse(next);
|
|
96
100
|
if (!parsed.success) return {
|
|
97
101
|
ok: false,
|
|
@@ -101,28 +105,60 @@ function prepareImageGenerationConfig(config, input, applyModel) {
|
|
|
101
105
|
ok: true,
|
|
102
106
|
config: next,
|
|
103
107
|
providerId,
|
|
104
|
-
modelId
|
|
108
|
+
modelId,
|
|
109
|
+
model
|
|
105
110
|
};
|
|
106
111
|
}
|
|
107
112
|
function prepareDefaultImageGenerationSetup(config, input) {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
113
|
+
const prepared = prepareImageGenerationConfig(config, input);
|
|
114
|
+
if (prepared.ok === false) return prepared;
|
|
115
|
+
const { model, ...rest } = prepared;
|
|
116
|
+
return {
|
|
117
|
+
...rest,
|
|
118
|
+
catalogUpdate: {
|
|
119
|
+
target: "defaults",
|
|
120
|
+
model
|
|
121
|
+
}
|
|
122
|
+
};
|
|
111
123
|
}
|
|
112
124
|
function prepareImageGenerationSetup(config, agentIdRaw, input) {
|
|
113
125
|
const agentId = normalizeAgentId(agentIdRaw);
|
|
114
|
-
if (!
|
|
126
|
+
if (!new AgentCatalogRepository().get(agentId)) return {
|
|
115
127
|
ok: false,
|
|
116
128
|
error: `Agent not found: ${agentId}`
|
|
117
129
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
130
|
+
const prepared = prepareImageGenerationConfig(config, input);
|
|
131
|
+
if (prepared.ok === false) return prepared;
|
|
132
|
+
const { model, ...rest } = prepared;
|
|
133
|
+
return {
|
|
134
|
+
...rest,
|
|
135
|
+
catalogUpdate: {
|
|
136
|
+
target: "agent",
|
|
137
|
+
agentId,
|
|
138
|
+
model
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
async function applyImageGenerationCatalogUpdate(update) {
|
|
143
|
+
const repository = new AgentCatalogRepository();
|
|
144
|
+
const service = new AgentCatalogService(repository);
|
|
145
|
+
if (update.target === "defaults") {
|
|
146
|
+
const defaults = repository.getSettings().defaults;
|
|
147
|
+
service.updateDefaults({
|
|
148
|
+
...defaults,
|
|
149
|
+
models: {
|
|
150
|
+
...defaults.models,
|
|
151
|
+
imageGeneration: update.model
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
const agent = repository.get(update.agentId);
|
|
157
|
+
if (!agent) throw new Error(`Agent not found: ${update.agentId}`);
|
|
158
|
+
await service.update(update.agentId, { models: {
|
|
159
|
+
...agent.models ?? {},
|
|
160
|
+
imageGeneration: update.model
|
|
161
|
+
} });
|
|
126
162
|
}
|
|
127
163
|
async function verifyImageGenerationCredential(input) {
|
|
128
164
|
const apiKey = input.apiKey.trim();
|
|
@@ -174,4 +210,4 @@ async function verifyImageGenerationCredential(input) {
|
|
|
174
210
|
}
|
|
175
211
|
}
|
|
176
212
|
//#endregion
|
|
177
|
-
export { getAgentImageGenerationConfig, getDefaultImageGenerationConfig, getImageGenerationCatalog, prepareDefaultImageGenerationSetup, prepareImageGenerationSetup, verifyImageGenerationCredential };
|
|
213
|
+
export { applyImageGenerationCatalogUpdate, getAgentImageGenerationConfig, getDefaultImageGenerationConfig, getImageGenerationCatalog, prepareDefaultImageGenerationSetup, prepareImageGenerationSetup, verifyImageGenerationCredential };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GatewayLockError, acquireGatewayLock, init_lock } from "./lock.js";
|
|
2
1
|
import { buildDefaultCorsOrigins, isAllInterfacesHost, isLoopbackHost, resolveEffectiveGatewayPort, resolveGatewayServiceListenPort } from "./host.js";
|
|
3
2
|
import { defaultGatewayBindMode, isContainerEnvironment, resolveGatewayBindHost, resolveGatewayBindHostSync, resolveGatewayBindMode, resolveGatewayEffectiveHost } from "../config/gateway-bind.js";
|
|
3
|
+
import { GatewayLockError, acquireGatewayLock } from "./lock.js";
|
|
4
4
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
5
5
|
import { resolveGatewayListenHost, resolveGatewayListenPlan } from "./listen.js";
|
|
6
6
|
import { buckets } from "./rate-limit/buckets.js";
|
|
@@ -16,7 +16,4 @@ import { checkPortAvailable, forceFreePortAndWait, listPortListeners, parseLsofO
|
|
|
16
16
|
import { apiError, apiOk } from "./protocol.js";
|
|
17
17
|
import "./hono/index.js";
|
|
18
18
|
import { assertSecureGatewayHttpUrl, assertSecureWebSocketUrl, isInsecurePrivateWsAllowed, isSecureWebSocketUrl } from "./ws-security.js";
|
|
19
|
-
//#region src/gateway/index.ts
|
|
20
|
-
init_lock();
|
|
21
|
-
//#endregion
|
|
22
19
|
export { GatewayLockError, GatewayServer, GatewayService, acquireGatewayLock, apiError, apiOk, assertGatewayAuthConfigured, assertGatewayRuntimeConfig, assertSecureGatewayHttpUrl, assertSecureWebSocketUrl, buckets, buildDefaultCorsOrigins, checkPortAvailable, createHonoApp, defaultGatewayBindMode, extractToken, forceFreePortAndWait, isAllInterfacesHost, isContainerEnvironment, isGatewayStrictSecurityEnabled, isInsecurePrivateWsAllowed, isLoopbackHost, isSecureWebSocketUrl, listPortListeners, parseLsofOutput, resolveEffectiveGatewayPort, resolveGatewayAuth, resolveGatewayBindHost, resolveGatewayBindHostSync, resolveGatewayBindMode, resolveGatewayEffectiveHost, resolveGatewayListenHost, resolveGatewayListenPlan, resolveGatewayServiceListenPort, restartGatewayProcessWithFreshPid, runGatewayLoop, validateToken };
|
package/dist/src/gateway/lock.js
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
|
-
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
1
|
import path from "node:path";
|
|
3
2
|
import fs from "node:fs";
|
|
4
3
|
import { createHash } from "node:crypto";
|
|
5
|
-
import net from "node:net";
|
|
6
4
|
import fs$1 from "node:fs/promises";
|
|
5
|
+
import net from "node:net";
|
|
7
6
|
import { homedir } from "os";
|
|
8
7
|
//#region src/gateway/lock.ts
|
|
9
8
|
/**
|
|
10
9
|
* Gateway Lock - Prevents multiple gateway instances from running simultaneously
|
|
11
10
|
*/
|
|
11
|
+
const DEFAULT_TIMEOUT_MS = 5e3;
|
|
12
|
+
const DEFAULT_POLL_INTERVAL_MS = 100;
|
|
13
|
+
const DEFAULT_STALE_MS = 3e4;
|
|
14
|
+
const DEFAULT_PORT_PROBE_TIMEOUT_MS = 1e3;
|
|
15
|
+
var GatewayLockError = class extends Error {
|
|
16
|
+
constructor(message, cause) {
|
|
17
|
+
super(message);
|
|
18
|
+
this.cause = cause;
|
|
19
|
+
this.name = "GatewayLockError";
|
|
20
|
+
}
|
|
21
|
+
};
|
|
12
22
|
function resolveLockDir() {
|
|
13
23
|
return path.join(homedir(), ".xopc", "locks");
|
|
14
24
|
}
|
|
@@ -162,20 +172,5 @@ async function acquireGatewayLock(configPath, opts = {}) {
|
|
|
162
172
|
}
|
|
163
173
|
throw new GatewayLockError(`Gateway already running${lastPayload?.pid ? ` (pid ${lastPayload.pid})` : ""}; lock timeout after ${timeoutMs}ms`);
|
|
164
174
|
}
|
|
165
|
-
var DEFAULT_TIMEOUT_MS, DEFAULT_POLL_INTERVAL_MS, DEFAULT_STALE_MS, DEFAULT_PORT_PROBE_TIMEOUT_MS, GatewayLockError;
|
|
166
|
-
var init_lock = __esmMin((() => {
|
|
167
|
-
DEFAULT_TIMEOUT_MS = 5e3;
|
|
168
|
-
DEFAULT_POLL_INTERVAL_MS = 100;
|
|
169
|
-
DEFAULT_STALE_MS = 3e4;
|
|
170
|
-
DEFAULT_PORT_PROBE_TIMEOUT_MS = 1e3;
|
|
171
|
-
GatewayLockError = class extends Error {
|
|
172
|
-
constructor(message, cause) {
|
|
173
|
-
super(message);
|
|
174
|
-
this.cause = cause;
|
|
175
|
-
this.name = "GatewayLockError";
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
}));
|
|
179
175
|
//#endregion
|
|
180
|
-
|
|
181
|
-
export { GatewayLockError, acquireGatewayLock, init_lock, isGatewayConfigLockedByAnotherProcessSync, resolveGatewayLockPath };
|
|
176
|
+
export { GatewayLockError, acquireGatewayLock, isGatewayConfigLockedByAnotherProcessSync, resolveGatewayLockPath };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
2
|
+
import { init_agent_scope, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
2
3
|
import { maintenanceInstruction, resolveMemoryMaintenanceSchedules } from "../memory-maintenance/schedule.js";
|
|
3
4
|
import "../memory-maintenance/index.js";
|
|
4
5
|
//#region src/gateway/memory-maintenance-automation-reconciler.ts
|
|
@@ -16,8 +17,8 @@ async function reconcileMemoryMaintenanceAutomations(input) {
|
|
|
16
17
|
};
|
|
17
18
|
const schedules = resolveMemoryMaintenanceSchedules(input.config);
|
|
18
19
|
const enabledIds = new Set(schedules.map((item) => item.automationId));
|
|
19
|
-
const agentId = normalizeAgentId(resolveDefaultAgentId(
|
|
20
|
-
const workingDirectory = resolveAgentWorkspaceDir(
|
|
20
|
+
const agentId = normalizeAgentId(resolveDefaultAgentId());
|
|
21
|
+
const workingDirectory = resolveAgentWorkspaceDir(agentId);
|
|
21
22
|
for (const id of AUTOMATION_IDS) {
|
|
22
23
|
if (enabledIds.has(id)) continue;
|
|
23
24
|
if ((await input.automationService.get(id))?.enabled) {
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { acquireGatewayLock
|
|
1
|
+
import { acquireGatewayLock } from "./lock.js";
|
|
2
2
|
import { loadConfig } from "../config/loader.js";
|
|
3
|
+
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
3
4
|
import "../config/index.js";
|
|
4
5
|
import { isRestartEnabled } from "../config/commands.flags.js";
|
|
5
|
-
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
6
6
|
import { restartGatewayProcessWithFreshPid } from "./respawn.js";
|
|
7
7
|
import { consumeGatewayRestartIntentSync, consumeGatewaySigusr1RestartAuthorization, isGatewaySigusr1RestartExternallyAllowed, resetGatewayRestartStateForInProcessRestart, scheduleGatewaySigusr1Restart, setGatewaySigusr1RestartPolicy } from "../infra/restart.js";
|
|
8
8
|
//#region src/gateway/run-loop.ts
|
|
9
9
|
/**
|
|
10
10
|
* Gateway Run Loop - Core run loop for gateway process management
|
|
11
11
|
*/
|
|
12
|
-
init_lock();
|
|
13
12
|
async function runGatewayLoop(opts) {
|
|
14
13
|
runBootstrapMigrationsSync(opts.configPath);
|
|
15
14
|
setGatewaySigusr1RestartPolicy({ allowExternal: isRestartEnabled(loadConfig(opts.configPath)) });
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
1
2
|
import { DEFAULT_BROWSER_EXTENSION_SCOPES, DEFAULT_MOBILE_SCOPES, GATEWAY_SCOPES, isGatewayScope } from "../../../packages/gateway-contract/src/gateway-scopes.js";
|
|
2
3
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
4
|
//#region src/gateway/security/gateway-scopes.ts
|
|
4
|
-
init_src();
|
|
5
5
|
function parseGatewayScopes(value) {
|
|
6
6
|
const parsed = JSON.parse(value);
|
|
7
7
|
if (!Array.isArray(parsed) || !parsed.every(isGatewayScope)) throw new Error("Stored device scopes are invalid");
|
|
@@ -40,5 +40,9 @@ function requiredGatewayScope(method, path) {
|
|
|
40
40
|
function hasGatewayScope(granted, required) {
|
|
41
41
|
return granted.includes("gateway.admin") || granted.includes(required);
|
|
42
42
|
}
|
|
43
|
+
var init_gateway_scopes = __esmMin((() => {
|
|
44
|
+
init_src();
|
|
45
|
+
}));
|
|
43
46
|
//#endregion
|
|
44
|
-
|
|
47
|
+
init_gateway_scopes();
|
|
48
|
+
export { DEFAULT_BROWSER_EXTENSION_SCOPES, DEFAULT_MOBILE_SCOPES, GATEWAY_SCOPES, hasGatewayScope, init_gateway_scopes, isGatewayScope, parseGatewayScopes, requiredGatewayScope };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_MOBILE_SCOPES, GATEWAY_SCOPES, isGatewayScope } from "../../../packages/gateway-contract/src/gateway-scopes.js";
|
|
2
|
-
import { hasGatewayScope, parseGatewayScopes, requiredGatewayScope } from "./gateway-scopes.js";
|
|
2
|
+
import { hasGatewayScope, init_gateway_scopes, parseGatewayScopes, requiredGatewayScope } from "./gateway-scopes.js";
|
|
3
3
|
import { safeEqualSecret } from "./secret-equal.js";
|
|
4
4
|
import { KNOWN_WEAK_GATEWAY_TOKEN_PLACEHOLDERS, assertGatewayAuthNotKnownWeak } from "./known-weak-secrets.js";
|
|
5
5
|
import { auditGatewayConfig, collectGatewayConfigFindings, collectGatewaySecurityFindings, collectGatewayStartupGuardFindings } from "./audit.js";
|
|
@@ -9,4 +9,7 @@ import { checkBrowserOrigin } from "./origin-check.js";
|
|
|
9
9
|
import { getGatewayPrincipal, setGatewayPrincipal } from "./gateway-principal.js";
|
|
10
10
|
import { DEFAULT_GATEWAY_HTTP_TOOL_DENY, filterDangerousHttpTools, isDangerousHttpTool } from "./dangerous-tools.js";
|
|
11
11
|
import { detectSuspiciousPatterns, wrapExternalContent, wrapWebContent } from "./external-content.js";
|
|
12
|
+
//#region src/gateway/security/index.ts
|
|
13
|
+
init_gateway_scopes();
|
|
14
|
+
//#endregion
|
|
12
15
|
export { DEFAULT_GATEWAY_HTTP_TOOL_DENY, DEFAULT_MOBILE_SCOPES, GATEWAY_SCOPES, KNOWN_WEAK_GATEWAY_TOKEN_PLACEHOLDERS, assertGatewayAuthNotKnownWeak, auditGatewayConfig, buildGatewayConsoleCspHeader, checkBrowserOrigin, collectGatewayConfigFindings, collectGatewaySecurityFindings, collectGatewayStartupGuardFindings, computeInlineScriptHashes, createPreauthConnectionBudget, detectSuspiciousPatterns, filterDangerousHttpTools, getGatewayPrincipal, getMaxPreauthConnectionsPerIp, hasGatewayScope, isDangerousHttpTool, isGatewayScope, parseGatewayScopes, requiredGatewayScope, safeEqualSecret, setGatewayPrincipal, wrapExternalContent, wrapWebContent };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { listActiveSessionInputRuns } from "../../storage/sqlite/session-input-repository.js";
|
|
4
|
-
import { createClarificationWait, getClarification, getClarificationSnapshot, resolveClarification, supersedeActiveClarification } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
4
|
+
import { createClarificationWait, getClarification, getClarificationSnapshot, init_clarification_wait_repository, resolveClarification, supersedeActiveClarification } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
5
5
|
import { init_connection_wait_repository, onConnectionWaitChanged } from "../../storage/sqlite/connection-wait-repository.js";
|
|
6
|
-
import "../../storage/sqlite/index.js";
|
|
6
|
+
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
7
7
|
import { EphemeralClarificationWaiter } from "../ephemeral-clarification-waiter.js";
|
|
8
8
|
import { runGatewayAgent } from "./run-gateway-agent.js";
|
|
9
9
|
import { fitSourceContextsToBudget } from "../../agent/source-context/budget.js";
|
|
@@ -11,7 +11,9 @@ import { SessionInputCoordinator } from "./session-input-coordinator.js";
|
|
|
11
11
|
import crypto from "node:crypto";
|
|
12
12
|
//#region src/gateway/service/agent-runner.ts
|
|
13
13
|
init_connection_wait_repository();
|
|
14
|
+
init_clarification_wait_repository();
|
|
14
15
|
init_logger();
|
|
16
|
+
init_sqlite();
|
|
15
17
|
/**
|
|
16
18
|
* Owns gateway agent runs, durable clarification coordination, and the
|
|
17
19
|
* lifecycle-bound clarification waiter used by ephemeral side chats.
|
|
@@ -87,7 +89,13 @@ var GatewayAgentRunner = class {
|
|
|
87
89
|
});
|
|
88
90
|
}
|
|
89
91
|
if (unique.size > MAX_TURN_CONTEXTS) throw new Error(`A message can reference at most ${MAX_TURN_CONTEXTS} sources`);
|
|
90
|
-
const contexts = await Promise.all([...unique.values()].map((ref) =>
|
|
92
|
+
const contexts = await Promise.all([...unique.values()].map(async (ref) => {
|
|
93
|
+
const context = await opts.resolveTurnContext(ref, conversationId);
|
|
94
|
+
return context && ref.refId ? {
|
|
95
|
+
...context,
|
|
96
|
+
refId: ref.refId
|
|
97
|
+
} : context;
|
|
98
|
+
}));
|
|
91
99
|
if (contexts.some((context) => context === null)) throw new Error("A referenced source is unavailable or has changed; select it again");
|
|
92
100
|
return fitSourceContextsToBudget(contexts.filter((context) => context !== null));
|
|
93
101
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parseAppContextEnvelope } from "../../../packages/gateway-contract/src/app-context.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { getDevice } from "../../storage/sqlite/device-access-repository.js";
|
|
3
|
+
import { getDevice, init_device_access_repository } from "../../storage/sqlite/device-access-repository.js";
|
|
4
4
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
5
5
|
import { canonicalCapabilityJson } from "../../capabilities/runtime/dispatcher.js";
|
|
6
6
|
import { isBrowserSessionActive } from "../../storage/sqlite/browser-session-repository.js";
|
|
@@ -8,6 +8,7 @@ import { appContextToAgentContext } from "../../agent/source-context/app-context
|
|
|
8
8
|
import { createHmac, randomBytes } from "node:crypto";
|
|
9
9
|
//#region src/gateway/service/app-context-access.ts
|
|
10
10
|
init_src();
|
|
11
|
+
init_device_access_repository();
|
|
11
12
|
const authorizationEpochKey = randomBytes(32);
|
|
12
13
|
function authRevision(auth) {
|
|
13
14
|
return createHmac("sha256", authorizationEpochKey).update(canonicalCapabilityJson(JSON.parse(JSON.stringify(auth)))).digest("hex");
|
|
@@ -87,7 +87,6 @@ export declare class GatewayConfigCoordinator {
|
|
|
87
87
|
*/
|
|
88
88
|
handleChannelsReload(newConfig: Config): Promise<void>;
|
|
89
89
|
private handleModelsReload;
|
|
90
|
-
private handleAgentDefaultsReload;
|
|
91
90
|
/**
|
|
92
91
|
* Coalesces rapid saves so Telegram/Weixin do not stop/start repeatedly.
|
|
93
92
|
* The persist path schedules the channel apply; the same coalescer absorbs
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
4
3
|
import { getModelRegistry } from "../../providers/model-registry.js";
|
|
5
4
|
import { init_providers } from "../../providers/index.js";
|
|
6
5
|
import { disposeAllSessionMcpRuntimes } from "../../agent/mcp/bundle-mcp-runtime.js";
|
|
7
6
|
import { reloadImageGenerationProviders } from "../../agent/image/generation/provider-registry.js";
|
|
8
7
|
import "../../agent/mcp/bundle-mcp-tools.js";
|
|
8
|
+
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
9
9
|
import { ConfigHotReloader } from "../../config/reload.js";
|
|
10
10
|
import "../../config/index.js";
|
|
11
|
-
import { validateComputerModelChanges } from "../../computer/model-config.js";
|
|
12
11
|
import { computeBundledExtensionExtensionsPatch } from "../../extensions/bundled-extension-activation.js";
|
|
13
12
|
import { sanitizeTunnelConfig } from "../../tunnel/tunnel-config.js";
|
|
14
13
|
//#region src/gateway/service/config-coordinator.ts
|
|
@@ -28,7 +27,6 @@ var GatewayConfigCoordinator = class {
|
|
|
28
27
|
if (this.configReloader) return;
|
|
29
28
|
this.configReloader = new ConfigHotReloader(this.opts.configPath, this.opts.getConfig(), {
|
|
30
29
|
onModelsReload: (newConfig) => this.handleModelsReload(newConfig),
|
|
31
|
-
onAgentDefaultsReload: (newConfig) => this.handleAgentDefaultsReload(newConfig),
|
|
32
30
|
onChannelsReload: (newConfig) => this.handleChannelsReload(newConfig),
|
|
33
31
|
onCronReload: (newConfig) => this.handleAutomationReload(newConfig),
|
|
34
32
|
onToolsReload: (newConfig) => this.handleToolsReload(newConfig),
|
|
@@ -72,7 +70,6 @@ var GatewayConfigCoordinator = class {
|
|
|
72
70
|
}
|
|
73
71
|
async saveConfig(config) {
|
|
74
72
|
try {
|
|
75
|
-
validateComputerModelChanges(config, this.opts.getConfig());
|
|
76
73
|
await this.writeConfigAndReloadFromDisk(config);
|
|
77
74
|
this.scheduleChannelPluginsAfterPersist();
|
|
78
75
|
return { saved: true };
|
|
@@ -97,7 +94,6 @@ var GatewayConfigCoordinator = class {
|
|
|
97
94
|
...this.opts.getConfig(),
|
|
98
95
|
...updates
|
|
99
96
|
};
|
|
100
|
-
validateComputerModelChanges(merged, this.opts.getConfig());
|
|
101
97
|
this.opts.setConfig(merged);
|
|
102
98
|
await this.writeConfigAndReloadFromDisk(merged);
|
|
103
99
|
this.scheduleChannelPluginsAfterPersist();
|
|
@@ -177,7 +173,7 @@ var GatewayConfigCoordinator = class {
|
|
|
177
173
|
async afterWeixinCredentialsPersisted() {
|
|
178
174
|
const next = loadConfig(this.opts.configPath);
|
|
179
175
|
this.opts.setConfig(next);
|
|
180
|
-
this.opts.getAgentService().
|
|
176
|
+
this.opts.getAgentService().applyRuntimeConfiguration(next);
|
|
181
177
|
this.configReloader?.syncCurrentConfig(next);
|
|
182
178
|
await this.handleChannelsReload(next);
|
|
183
179
|
const { weixinPlugin } = await import("../../channels/weixin/index.js");
|
|
@@ -187,7 +183,7 @@ var GatewayConfigCoordinator = class {
|
|
|
187
183
|
async afterFeishuCredentialsPersisted() {
|
|
188
184
|
const next = loadConfig(this.opts.configPath);
|
|
189
185
|
this.opts.setConfig(next);
|
|
190
|
-
this.opts.getAgentService().
|
|
186
|
+
this.opts.getAgentService().applyRuntimeConfiguration(next);
|
|
191
187
|
this.configReloader?.syncCurrentConfig(next);
|
|
192
188
|
await this.handleChannelsReload(next);
|
|
193
189
|
log.info("Feishu config applied after QR setup");
|
|
@@ -213,20 +209,6 @@ var GatewayConfigCoordinator = class {
|
|
|
213
209
|
this.opts.emit("config.reload", { section: "models" });
|
|
214
210
|
log.debug("Models config reloaded");
|
|
215
211
|
}
|
|
216
|
-
handleAgentDefaultsReload(newConfig) {
|
|
217
|
-
log.debug("Reloading agent defaults...");
|
|
218
|
-
this.opts.setConfig(newConfig);
|
|
219
|
-
this.opts.getAgentService().applyAgentDefaultsFromConfig(newConfig);
|
|
220
|
-
this.opts.reconcileMemoryMaintenanceAutomations().catch((err) => {
|
|
221
|
-
const em = err instanceof Error ? err.message : String(err);
|
|
222
|
-
log.warn({
|
|
223
|
-
err,
|
|
224
|
-
errorMessage: em
|
|
225
|
-
}, `Memory maintenance automation refresh failed: ${em}`);
|
|
226
|
-
});
|
|
227
|
-
this.opts.emit("config.reload", { section: "agents" });
|
|
228
|
-
log.debug("Agent defaults reloaded");
|
|
229
|
-
}
|
|
230
212
|
/**
|
|
231
213
|
* Coalesces rapid saves so Telegram/Weixin do not stop/start repeatedly.
|
|
232
214
|
* The persist path schedules the channel apply; the same coalescer absorbs
|
|
@@ -335,7 +317,7 @@ var GatewayConfigCoordinator = class {
|
|
|
335
317
|
const reloaded = loadConfig(this.opts.configPath);
|
|
336
318
|
this.opts.setConfig(reloaded);
|
|
337
319
|
if (sanitizeTunnelConfig(reloaded)) await saveConfig(reloaded, this.opts.configPath);
|
|
338
|
-
this.opts.getAgentService().
|
|
320
|
+
this.opts.getAgentService().applyRuntimeConfiguration(reloaded);
|
|
339
321
|
await this.opts.reconcileMemoryMaintenanceAutomations().catch((err) => {
|
|
340
322
|
const em = err instanceof Error ? err.message : String(err);
|
|
341
323
|
log.warn({
|
|
@@ -52,6 +52,7 @@ export interface SkillSourceInstallResultPayload extends SkillInstallResultPaylo
|
|
|
52
52
|
contentHash: string;
|
|
53
53
|
}
|
|
54
54
|
export interface ExtensionMarketplacePackageDetailPayload extends MarketplacePackageDetail {
|
|
55
|
+
format?: 'native-extension' | 'agent-plugin';
|
|
55
56
|
installability: {
|
|
56
57
|
available: boolean;
|
|
57
58
|
reason?: string;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
4
5
|
import { init_paths, resolveExtensionsDir } from "../../config/paths.js";
|
|
6
|
+
import { getExtensionLockfileManager } from "../../extensions/lockfile.js";
|
|
7
|
+
import { AgentPluginStore } from "../../extensions/agent-plugins/store.js";
|
|
5
8
|
import { createSkillConfigManager } from "../../agent/skills/config.js";
|
|
6
9
|
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "../../agent/skills/workspace-skills-dir.js";
|
|
7
10
|
import { removeSkillsLockEntry } from "../../agent/skills/hub-lock.js";
|
|
8
11
|
import { deleteManagedSkill, installSkillFromZip, listManagedSkillDirs } from "../../agent/skills/managed-store.js";
|
|
9
12
|
import { normalizeSkillInstallTarget } from "../../agent/skills/install-target.js";
|
|
10
|
-
import {
|
|
13
|
+
import { isAgentPluginArchive, withAgentPluginArchive } from "../../extensions/agent-plugins/sources.js";
|
|
11
14
|
import { existsSync, rmSync } from "node:fs";
|
|
12
15
|
//#region src/gateway/service/marketplace-service.ts
|
|
13
16
|
/**
|
|
@@ -27,6 +30,7 @@ import { existsSync, rmSync } from "node:fs";
|
|
|
27
30
|
* lives here too so callers (commands-skills routes) depend on a single narrow
|
|
28
31
|
* service instead of the full `GatewayService`.
|
|
29
32
|
*/
|
|
33
|
+
init_agent_scope();
|
|
30
34
|
init_paths();
|
|
31
35
|
init_logger();
|
|
32
36
|
const log = createLogger("Gateway:Marketplace");
|
|
@@ -173,7 +177,7 @@ var GatewayMarketplaceService = class {
|
|
|
173
177
|
return listRegisteredProviders();
|
|
174
178
|
}
|
|
175
179
|
getDefaultAgentId() {
|
|
176
|
-
return
|
|
180
|
+
return resolveDefaultAgentId();
|
|
177
181
|
}
|
|
178
182
|
getInstallAvailability(skillId) {
|
|
179
183
|
const snapshot = this.opts.getAgentService().getSkillCatalogSnapshot();
|
|
@@ -206,6 +210,18 @@ var GatewayMarketplaceService = class {
|
|
|
206
210
|
const resolved = await resolveExtensionZipDownloadUrl(base, packageName.trim());
|
|
207
211
|
const buffer = await downloadExtensionStoreZipBuffer(base, resolved.downloadUrl);
|
|
208
212
|
verifyStoreArtifactSha256(buffer, resolved.sha256);
|
|
213
|
+
if (isAgentPluginArchive(buffer)) {
|
|
214
|
+
const plan = withAgentPluginArchive(buffer, (path) => new AgentPluginStore().inspect(path));
|
|
215
|
+
return {
|
|
216
|
+
...detail,
|
|
217
|
+
format: "agent-plugin",
|
|
218
|
+
manifest: plan.manifest,
|
|
219
|
+
installability: {
|
|
220
|
+
available: true,
|
|
221
|
+
sha256: resolved.sha256
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
}
|
|
209
225
|
const { peekExtensionManifestFromStoreZip, peekExtensionPackageJsonFromStoreZip } = await import("../../extensions/install.js");
|
|
210
226
|
const manifest = peekExtensionManifestFromStoreZip(buffer);
|
|
211
227
|
const packageJson = peekExtensionPackageJsonFromStoreZip(buffer);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { inboundCorrelationMetadataFromAsyncLogContext, updateAsyncLogContext } from "../../utils/logger/context.js";
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
|
-
import { isClarificationSuspended } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
4
|
+
import { init_clarification_wait_repository, isClarificationSuspended } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
5
5
|
import { updateInteractionStateFromMessage } from "../../storage/sqlite/interaction-state-repository.js";
|
|
6
6
|
import { getConnectionResumeInput, init_connection_wait_repository, isConnectionSuspended } from "../../storage/sqlite/connection-wait-repository.js";
|
|
7
|
-
import "../../storage/sqlite/index.js";
|
|
7
|
+
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
8
8
|
import { getConversationRouting } from "../../storage/sqlite/conversation-repository.js";
|
|
9
9
|
import { init_session_key } from "../../routing/session-key.js";
|
|
10
10
|
import { resolveExecutionContext } from "../../tasks/execution-context.js";
|
|
@@ -20,8 +20,10 @@ import { coalesceThinkingDeltas } from "../chat-stream/thinking-delta-coalescer.
|
|
|
20
20
|
import crypto from "crypto";
|
|
21
21
|
//#region src/gateway/service/run-gateway-agent.ts
|
|
22
22
|
init_connection_wait_repository();
|
|
23
|
+
init_clarification_wait_repository();
|
|
23
24
|
init_logger();
|
|
24
25
|
init_session_key();
|
|
26
|
+
init_sqlite();
|
|
25
27
|
const log = createLogger("Gateway:Service");
|
|
26
28
|
/**
|
|
27
29
|
* @param runOptions.signal — When set (e.g. client disconnect), aborts in-flight generation and persists partial output.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { SessionInstanceChangedError, cancelQueuedSessionInput, claimNextSessionInput, findSessionInput, finishSessionInputRun, getSessionInputById, getSessionInputState, init_session_input_repository, insertSessionInput, mutateQueuedSessionInput, recoverSessionInputState, setSessionInputStatus } from "../../storage/sqlite/session-input-repository.js";
|
|
4
|
-
import { consumeClarificationResume, supersedeActiveClarification } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
4
|
+
import { consumeClarificationResume, init_clarification_wait_repository, supersedeActiveClarification } from "../../storage/sqlite/clarification-wait-repository.js";
|
|
5
5
|
import { replaceLatestSessionTurnAndQueueInput, validateLatestSessionTurnTarget } from "../../storage/sqlite/session-turn-replace-repository.js";
|
|
6
6
|
import { cancelConnectionObjective, consumeConnectionResume, init_connection_wait_repository, invalidateConnectionResumeIntent, publishConnectionWait } from "../../storage/sqlite/connection-wait-repository.js";
|
|
7
|
-
import "../../storage/sqlite/index.js";
|
|
7
|
+
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
8
8
|
import { summarizeSourceContext } from "../../agent/source-context/types.js";
|
|
9
9
|
import { deleteMediaUrisNoLongerReferenced } from "../../media/session-references.js";
|
|
10
10
|
import { fitSourceContextsToBudget } from "../../agent/source-context/budget.js";
|
|
@@ -12,7 +12,9 @@ import crypto from "node:crypto";
|
|
|
12
12
|
import { isDeepStrictEqual } from "node:util";
|
|
13
13
|
//#region src/gateway/service/session-input-coordinator.ts
|
|
14
14
|
init_connection_wait_repository();
|
|
15
|
+
init_clarification_wait_repository();
|
|
15
16
|
init_session_input_repository();
|
|
17
|
+
init_sqlite();
|
|
16
18
|
init_logger();
|
|
17
19
|
const log = createLogger("SessionInputCoordinator");
|
|
18
20
|
const MAX_PENDING_INPUTS = 10;
|
|
@@ -24,11 +26,11 @@ function sameAppContext(input, existing) {
|
|
|
24
26
|
return isDeepStrictEqual(identity(input.sourceContexts), identity(existing.contextSnapshots));
|
|
25
27
|
}
|
|
26
28
|
function contextRefsMatchFrozenSnapshot(requested, frozen) {
|
|
27
|
-
const editable = frozen?.filter((ref) => ref.kind === "note" || ref.kind === "task") ?? [];
|
|
29
|
+
const editable = frozen?.filter((ref) => ref.kind === "note" || ref.kind === "task" || ref.kind === "file" || ref.kind === "session" || ref.kind === "browser_tab" || ref.kind === "mcp_resource") ?? [];
|
|
28
30
|
if (requested.length !== editable.length) return false;
|
|
29
31
|
return requested.every((ref, index) => {
|
|
30
32
|
const snapshot = editable[index];
|
|
31
|
-
return snapshot?.kind === ref.kind && snapshot.sourceId === ref.sourceId && ref.expectedVersion === snapshot.version;
|
|
33
|
+
return snapshot?.kind === ref.kind && snapshot.sourceId === ref.sourceId && snapshot.refId === ref.refId && ref.expectedVersion === snapshot.version;
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
36
|
var SessionInputCoordinator = class {
|
|
@@ -311,7 +313,7 @@ var SessionInputCoordinator = class {
|
|
|
311
313
|
const existing = getSessionInputById(conversationId, id);
|
|
312
314
|
if (!contextRefsMatchFrozenSnapshot(body.contextRefs, existing?.contextRefs)) try {
|
|
313
315
|
const resolved = await this.deps.prepareContexts(conversationId, body.contextRefs) ?? [];
|
|
314
|
-
sourceContexts = fitSourceContextsToBudget([...existing?.contextSnapshots?.filter((source) => source.kind
|
|
316
|
+
sourceContexts = fitSourceContextsToBudget([...existing?.contextSnapshots?.filter((source) => source.kind === "app_context" || source.kind === "browser_page") ?? [], ...resolved]);
|
|
315
317
|
} catch (err) {
|
|
316
318
|
log.warn({
|
|
317
319
|
err,
|
|
@@ -8,12 +8,13 @@ import { NotesService } from '../notes/index.js';
|
|
|
8
8
|
import { WorkflowRunService } from '../workflows/service/workflow-run-service.js';
|
|
9
9
|
import { ExtensionLoader } from '../extensions/index.js';
|
|
10
10
|
import { SessionIndex } from '../session/index.js';
|
|
11
|
-
import { EphemeralSideChatManager, SideChatRunService } from './side-chat/index.js';
|
|
11
|
+
import { EphemeralSideChatManager, SideChatPromotionService, SideChatRunService } from './side-chat/index.js';
|
|
12
12
|
import type { Config } from '../config/schema.js';
|
|
13
13
|
import { type ResolvedGatewayAuth } from './auth.js';
|
|
14
14
|
import { ModelCatalogSyncService } from '../providers/model-catalog-sync-service.js';
|
|
15
15
|
import { ProjectService } from '../projects/index.js';
|
|
16
16
|
import { LocalAppService } from '../local-apps/index.js';
|
|
17
|
+
import { ChatPreviewService } from '../chat-previews/index.js';
|
|
17
18
|
import { TaskConversationRepository } from '../tasks/task-conversation-repository.js';
|
|
18
19
|
import { type BrowserAutomationService } from '../browser/automations/index.js';
|
|
19
20
|
import { GatewaySessionsApi } from './service/sessions-api.js';
|
|
@@ -28,6 +29,7 @@ import type { SceneAccess } from '../scenes/httpServices.js';
|
|
|
28
29
|
import type { GatewayPrincipal } from './security/gateway-principal.js';
|
|
29
30
|
import { type ProductLanguage } from '../voice/language-profile.js';
|
|
30
31
|
import { EndpointToolRuntime } from '../endpoint-tools/index.js';
|
|
32
|
+
import { HomeIntelligenceHost } from '../home-intelligence/host.js';
|
|
31
33
|
export type { GatewayChannelStartupPhase1Metrics, GatewayChannelStartupPhase2Metrics, GatewayServiceConfig, } from './service/types.js';
|
|
32
34
|
export declare class GatewayService {
|
|
33
35
|
private serviceConfig;
|
|
@@ -42,6 +44,7 @@ export declare class GatewayService {
|
|
|
42
44
|
private extensionLoader;
|
|
43
45
|
private extensionMetadataSnapshot;
|
|
44
46
|
private sceneHost;
|
|
47
|
+
private homeIntelligenceHost;
|
|
45
48
|
private sessionIndex;
|
|
46
49
|
private running;
|
|
47
50
|
private startTime;
|
|
@@ -86,6 +89,7 @@ export declare class GatewayService {
|
|
|
86
89
|
/** Process-local, non-persistent side conversations forked from durable sessions. */
|
|
87
90
|
readonly sideChats: EphemeralSideChatManager;
|
|
88
91
|
readonly sideChatRuns: SideChatRunService;
|
|
92
|
+
readonly sideChatPromotions: SideChatPromotionService;
|
|
89
93
|
/**
|
|
90
94
|
* Session CRUD / search / compaction / tag-archive-pin / stats — the gateway
|
|
91
95
|
* REST surface for sessions. Routes should depend on this narrow service
|
|
@@ -107,12 +111,16 @@ export declare class GatewayService {
|
|
|
107
111
|
readonly discussionSealer: DiscussionSealer;
|
|
108
112
|
/** Local user-created apps, their coder projects, previews, and installs. */
|
|
109
113
|
readonly localApps: LocalAppService;
|
|
114
|
+
/** Immutable, conversation-scoped UI previews that do not create projects. */
|
|
115
|
+
readonly chatPreviews: ChatPreviewService;
|
|
110
116
|
get sceneAccess(): SceneAccess | undefined;
|
|
111
117
|
constructor(serviceConfig?: GatewayServiceConfig);
|
|
112
118
|
/** Lazy AgentService — constructed on first use or during `start()`. */
|
|
113
119
|
get agentService(): AgentService;
|
|
114
120
|
refreshActionTrustPolicy(): void;
|
|
115
121
|
refreshUserProfileContext(): void;
|
|
122
|
+
/** Refresh long-lived runtime caches after an Agent catalog mutation. */
|
|
123
|
+
refreshAgentCatalog(): void;
|
|
116
124
|
private ensureAgentService;
|
|
117
125
|
private createTaskRunDispatcher;
|
|
118
126
|
private createNotificationService;
|
|
@@ -304,6 +312,7 @@ export declare class GatewayService {
|
|
|
304
312
|
invokeGatewayMethod(method: string, params: Record<string, unknown>): Promise<unknown>;
|
|
305
313
|
get currentConfig(): Config;
|
|
306
314
|
get currentWorkspacePath(): string;
|
|
315
|
+
get homeIntelligence(): HomeIntelligenceHost;
|
|
307
316
|
get messageBusInstance(): MessageBus;
|
|
308
317
|
/** Effective HTTP listen port (CLI `--port` override or config default). */
|
|
309
318
|
getEffectiveListenPort(): number;
|