@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,7 +1,7 @@
|
|
|
1
1
|
import { logAuthEvent } from "../../../utils/logger/audit.js";
|
|
2
2
|
import { createLogger } from "../../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../../utils/logger.js";
|
|
4
|
-
import { authenticateDeviceAccessToken, getDevice } from "../../../storage/sqlite/device-access-repository.js";
|
|
4
|
+
import { authenticateDeviceAccessToken, getDevice, init_device_access_repository } from "../../../storage/sqlite/device-access-repository.js";
|
|
5
5
|
import { safeEqualSecret } from "../../security/secret-equal.js";
|
|
6
6
|
import { resolveClientIpFromRequest } from "../../client-ip.js";
|
|
7
7
|
import { authPolicyConfig, buckets, resolveAuthRateLimit } from "../../rate-limit/buckets.js";
|
|
@@ -16,6 +16,7 @@ import { setGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
|
16
16
|
import { createMiddleware } from "hono/factory";
|
|
17
17
|
import { getConnInfo } from "@hono/node-server/conninfo";
|
|
18
18
|
//#region src/gateway/hono/middleware/auth.ts
|
|
19
|
+
init_device_access_repository();
|
|
19
20
|
init_logger();
|
|
20
21
|
const log = createLogger("Gateway:Auth");
|
|
21
22
|
function resolveExpectedCredential(auth) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../../utils/logger.js";
|
|
3
|
-
import { hasGatewayScope, requiredGatewayScope } from "../../security/gateway-scopes.js";
|
|
3
|
+
import { hasGatewayScope, init_gateway_scopes, requiredGatewayScope } from "../../security/gateway-scopes.js";
|
|
4
4
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
5
5
|
import { createMiddleware } from "hono/factory";
|
|
6
6
|
//#region src/gateway/hono/middleware/scopes.ts
|
|
7
|
+
init_gateway_scopes();
|
|
7
8
|
init_logger();
|
|
8
9
|
const log = createLogger("Hono:Scopes");
|
|
9
10
|
/** Enforces fail-closed route scopes after authentication establishes a principal. */
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { AgentPluginStore } from "../../../extensions/agent-plugins/store.js";
|
|
2
|
+
import { removePluginCredentials, savePluginAuthBinding } from "../../../extensions/agent-plugins/auth.js";
|
|
3
|
+
import { disposeAllSessionMcpRuntimes } from "../../../agent/mcp/bundle-mcp-runtime.js";
|
|
4
|
+
import { withAgentPluginSource } from "../../../extensions/agent-plugins/sources.js";
|
|
5
|
+
import { agentPluginInventoryRow } from "../../../extensions/agent-plugins/inventory.js";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
//#region src/gateway/hono/routes/agent-plugins.ts
|
|
8
|
+
const sourceBody = z.strictObject({
|
|
9
|
+
source: z.string().min(1),
|
|
10
|
+
reviewHash: z.string().optional()
|
|
11
|
+
});
|
|
12
|
+
function registerAgentPluginRoutes(app, deps) {
|
|
13
|
+
const store = new AgentPluginStore();
|
|
14
|
+
const refresh = async () => {
|
|
15
|
+
await disposeAllSessionMcpRuntimes();
|
|
16
|
+
deps.service.marketplace.reloadSkills();
|
|
17
|
+
};
|
|
18
|
+
app.post("/api/extensions/inspect", deps.strictRateLimitMiddleware, async (c) => {
|
|
19
|
+
try {
|
|
20
|
+
const body = sourceBody.parse(await c.req.json());
|
|
21
|
+
return c.json({
|
|
22
|
+
ok: true,
|
|
23
|
+
payload: await withAgentPluginSource(body.source, deps.service.currentConfig, (source) => store.inspect(source))
|
|
24
|
+
});
|
|
25
|
+
} catch (error) {
|
|
26
|
+
return c.json({
|
|
27
|
+
ok: false,
|
|
28
|
+
error: error instanceof Error ? error.message : String(error)
|
|
29
|
+
}, 400);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
app.post("/api/extensions/install", deps.strictRateLimitMiddleware, async (c) => {
|
|
33
|
+
try {
|
|
34
|
+
const body = sourceBody.parse(await c.req.json());
|
|
35
|
+
const plugin = await withAgentPluginSource(body.source, deps.service.currentConfig, (source) => store.install(source, {
|
|
36
|
+
reviewHash: body.reviewHash,
|
|
37
|
+
sourceLabel: body.source
|
|
38
|
+
}));
|
|
39
|
+
await refresh();
|
|
40
|
+
return c.json({
|
|
41
|
+
ok: true,
|
|
42
|
+
payload: agentPluginInventoryRow(plugin)
|
|
43
|
+
});
|
|
44
|
+
} catch (error) {
|
|
45
|
+
return c.json({
|
|
46
|
+
ok: false,
|
|
47
|
+
error: error instanceof Error ? error.message : String(error)
|
|
48
|
+
}, 400);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
app.get("/api/extensions/agent-plugins/:id", (c) => {
|
|
52
|
+
try {
|
|
53
|
+
const plugin = store.get(c.req.param("id"));
|
|
54
|
+
return plugin ? c.json({
|
|
55
|
+
ok: true,
|
|
56
|
+
payload: agentPluginInventoryRow(plugin)
|
|
57
|
+
}) : c.json({
|
|
58
|
+
ok: false,
|
|
59
|
+
error: "Plugin not found"
|
|
60
|
+
}, 404);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
return c.json({
|
|
63
|
+
ok: false,
|
|
64
|
+
error: error instanceof Error ? error.message : String(error)
|
|
65
|
+
}, 400);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
app.post("/api/extensions/agent-plugins/:id/activation", deps.strictRateLimitMiddleware, async (c) => {
|
|
69
|
+
try {
|
|
70
|
+
const body = z.strictObject({ enabled: z.boolean() }).parse(await c.req.json());
|
|
71
|
+
const plugin = store.setEnabled(c.req.param("id"), body.enabled);
|
|
72
|
+
await refresh();
|
|
73
|
+
return c.json({
|
|
74
|
+
ok: true,
|
|
75
|
+
payload: agentPluginInventoryRow(plugin)
|
|
76
|
+
});
|
|
77
|
+
} catch (error) {
|
|
78
|
+
return c.json({
|
|
79
|
+
ok: false,
|
|
80
|
+
error: error instanceof Error ? error.message : String(error)
|
|
81
|
+
}, 400);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
app.post("/api/extensions/agent-plugins/:id/update", deps.strictRateLimitMiddleware, async (c) => {
|
|
85
|
+
try {
|
|
86
|
+
const body = sourceBody.parse(await c.req.json());
|
|
87
|
+
const plugin = await withAgentPluginSource(body.source, deps.service.currentConfig, (source) => store.install(source, {
|
|
88
|
+
reviewHash: body.reviewHash,
|
|
89
|
+
replace: true,
|
|
90
|
+
expectedId: c.req.param("id"),
|
|
91
|
+
sourceLabel: body.source
|
|
92
|
+
}));
|
|
93
|
+
await refresh();
|
|
94
|
+
return c.json({
|
|
95
|
+
ok: true,
|
|
96
|
+
payload: agentPluginInventoryRow(plugin)
|
|
97
|
+
});
|
|
98
|
+
} catch (error) {
|
|
99
|
+
return c.json({
|
|
100
|
+
ok: false,
|
|
101
|
+
error: error instanceof Error ? error.message : String(error)
|
|
102
|
+
}, 400);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
app.post("/api/extensions/agent-plugins/:id/rollback", deps.strictRateLimitMiddleware, async (c) => {
|
|
106
|
+
try {
|
|
107
|
+
const plugin = store.rollback(c.req.param("id"));
|
|
108
|
+
await refresh();
|
|
109
|
+
return c.json({
|
|
110
|
+
ok: true,
|
|
111
|
+
payload: agentPluginInventoryRow(plugin)
|
|
112
|
+
});
|
|
113
|
+
} catch (error) {
|
|
114
|
+
return c.json({
|
|
115
|
+
ok: false,
|
|
116
|
+
error: error instanceof Error ? error.message : String(error)
|
|
117
|
+
}, 400);
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
app.put("/api/extensions/agent-plugins/:id/mcp/:server/auth", deps.strictRateLimitMiddleware, async (c) => {
|
|
121
|
+
try {
|
|
122
|
+
const body = z.strictObject({
|
|
123
|
+
mode: z.enum([
|
|
124
|
+
"auto",
|
|
125
|
+
"oauth",
|
|
126
|
+
"api-key",
|
|
127
|
+
"none"
|
|
128
|
+
]),
|
|
129
|
+
secrets: z.array(z.strictObject({
|
|
130
|
+
target: z.enum(["headers", "env"]),
|
|
131
|
+
key: z.string(),
|
|
132
|
+
value: z.string(),
|
|
133
|
+
prefix: z.string().optional()
|
|
134
|
+
})).max(20).optional()
|
|
135
|
+
}).parse(await c.req.json());
|
|
136
|
+
await savePluginAuthBinding(store, c.req.param("id"), c.req.param("server"), body);
|
|
137
|
+
await refresh();
|
|
138
|
+
return c.json({ ok: true });
|
|
139
|
+
} catch (error) {
|
|
140
|
+
return c.json({
|
|
141
|
+
ok: false,
|
|
142
|
+
error: error instanceof Error ? error.message : String(error)
|
|
143
|
+
}, 400);
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
app.delete("/api/extensions/agent-plugins/:id", deps.strictRateLimitMiddleware, async (c) => {
|
|
147
|
+
try {
|
|
148
|
+
const body = z.strictObject({
|
|
149
|
+
removeData: z.boolean().optional(),
|
|
150
|
+
removeCredentials: z.boolean().optional()
|
|
151
|
+
}).parse(await c.req.json());
|
|
152
|
+
await disposeAllSessionMcpRuntimes();
|
|
153
|
+
if (body.removeCredentials) await removePluginCredentials(store, c.req.param("id"));
|
|
154
|
+
store.remove(c.req.param("id"), body.removeData);
|
|
155
|
+
deps.service.marketplace.reloadSkills();
|
|
156
|
+
return c.json({ ok: true });
|
|
157
|
+
} catch (error) {
|
|
158
|
+
return c.json({
|
|
159
|
+
ok: false,
|
|
160
|
+
error: error instanceof Error ? error.message : String(error)
|
|
161
|
+
}, 400);
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
export { registerAgentPluginRoutes };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { parseUserTurnDocument, userTurnDocumentRefIds } from "../../../../packages/gateway-contract/src/user-turn-document.js";
|
|
2
|
+
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
1
3
|
import { validateWebchatAttachments, validateWebchatContent } from "../../chat-limits.js";
|
|
2
4
|
import { parseTurnContextRefs } from "../../../agent/source-context/types.js";
|
|
3
5
|
import { replaceLatestSessionTurn, submitSessionInput } from "./session-input-handler.js";
|
|
4
6
|
//#region src/gateway/hono/routes/agent-stream.ts
|
|
7
|
+
init_src();
|
|
5
8
|
function registerAgentStreamRoutes(authenticated, deps) {
|
|
6
9
|
const { service, chatRateLimitMiddleware } = deps;
|
|
7
10
|
authenticated.post("/api/agent/abort", chatRateLimitMiddleware, async (c) => {
|
|
@@ -60,6 +63,17 @@ function registerAgentStreamRoutes(authenticated, deps) {
|
|
|
60
63
|
message: "Invalid source context references"
|
|
61
64
|
}
|
|
62
65
|
}, 400);
|
|
66
|
+
if (typeof body.content === "string") {
|
|
67
|
+
const document = parseUserTurnDocument(body.content);
|
|
68
|
+
const refIds = new Set((contextRefs ?? []).flatMap((ref) => ref.refId ? [ref.refId] : []));
|
|
69
|
+
if (document && !userTurnDocumentRefIds(document).every((refId) => refIds.has(refId))) return c.json({
|
|
70
|
+
ok: false,
|
|
71
|
+
error: {
|
|
72
|
+
code: "BAD_REQUEST",
|
|
73
|
+
message: "Input contains an unknown context reference"
|
|
74
|
+
}
|
|
75
|
+
}, 400);
|
|
76
|
+
}
|
|
63
77
|
if (body.content !== void 0) {
|
|
64
78
|
const contentError = validateWebchatContent(body.content);
|
|
65
79
|
if (contentError) return c.json({
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AgentModelsOverrideSchema, AgentProfileSchema, RuntimePolicySchema, SkillOverrideSchema, ToolPoliciesSchema, WorkflowPolicySchema } from "../../../agent-config/schema.js";
|
|
2
2
|
import { init_agent_config } from "../../../agent-config/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { normalizeAgentId } from "../../../agent-catalog/id.js";
|
|
4
|
+
import { init_agent_scope } from "../../../agent/agent-scope.js";
|
|
5
|
+
import { createGatewayAgent, deleteAgentAvatarFile, deleteGatewayAgent, getGatewayAgentEffectiveConfig, listAgentProfileFiles, listGatewayAgents, readAgentAvatarFile, readAgentProfileFile, updateGatewayAgent, writeAgentAvatarFromBase64, writeAgentProfileFile } from "../../agents-admin.js";
|
|
5
6
|
import { getVoiceModelsConfig } from "../../../config/voice.js";
|
|
6
7
|
//#region src/gateway/hono/routes/agents.ts
|
|
7
8
|
init_agent_config();
|
|
@@ -39,8 +40,7 @@ function parsePatchModels(raw) {
|
|
|
39
40
|
function registerAgentsRoutes(authenticated, deps) {
|
|
40
41
|
const { service, strictRateLimitMiddleware } = deps;
|
|
41
42
|
authenticated.get("/api/agents", async (c) => {
|
|
42
|
-
const
|
|
43
|
-
const payload = await listGatewayAgents(cfg, { locale: c.req.query("locale") || c.req.header("Accept-Language")?.split(",")[0]?.trim() });
|
|
43
|
+
const payload = await listGatewayAgents({ locale: c.req.query("locale") || c.req.header("Accept-Language")?.split(",")[0]?.trim() });
|
|
44
44
|
return c.json({
|
|
45
45
|
ok: true,
|
|
46
46
|
payload
|
|
@@ -61,24 +61,14 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
61
61
|
ok: false,
|
|
62
62
|
error: { message: parsed.error }
|
|
63
63
|
}, 400);
|
|
64
|
-
const prep =
|
|
64
|
+
const prep = await createGatewayAgent(parsed);
|
|
65
65
|
if (prep.ok === false) return c.json({
|
|
66
66
|
ok: false,
|
|
67
67
|
error: { message: prep.error }
|
|
68
68
|
}, prep.status ?? 400);
|
|
69
|
-
const {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
ok: false,
|
|
73
|
-
error: { message: save.error ?? "save failed" }
|
|
74
|
-
}, 500);
|
|
75
|
-
const finalized = await finalizeCreateAgentDirs(service.currentConfig, agentId);
|
|
76
|
-
if (finalized.ok === false) return c.json({
|
|
77
|
-
ok: false,
|
|
78
|
-
error: { message: finalized.error }
|
|
79
|
-
}, finalized.status ?? 400);
|
|
80
|
-
const locale = c.req.query("locale") || c.req.header("Accept-Language")?.split(",")[0]?.trim();
|
|
81
|
-
const agentsPayload = await listGatewayAgents(service.currentConfig, { locale });
|
|
69
|
+
const { agentId } = prep.data;
|
|
70
|
+
service.refreshAgentCatalog();
|
|
71
|
+
const agentsPayload = await listGatewayAgents({ locale: c.req.query("locale") || c.req.header("Accept-Language")?.split(",")[0]?.trim() });
|
|
82
72
|
return c.json({
|
|
83
73
|
ok: true,
|
|
84
74
|
payload: {
|
|
@@ -88,8 +78,7 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
88
78
|
});
|
|
89
79
|
});
|
|
90
80
|
authenticated.get("/api/agents/:id/effective-config", async (c) => {
|
|
91
|
-
const
|
|
92
|
-
const res = getGatewayAgentEffectiveConfig(service.currentConfig, id);
|
|
81
|
+
const res = getGatewayAgentEffectiveConfig(normalizeAgentId(c.req.param("id") ?? ""));
|
|
93
82
|
if (res.ok === false) return c.json({
|
|
94
83
|
ok: false,
|
|
95
84
|
error: { message: res.error }
|
|
@@ -170,7 +159,7 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
170
159
|
ok: false,
|
|
171
160
|
error: { message: "workspace must be a string or null" }
|
|
172
161
|
}, 400);
|
|
173
|
-
const prep =
|
|
162
|
+
const prep = await updateGatewayAgent(id, {
|
|
174
163
|
...workspacePatch !== void 0 ? { workspace: workspacePatch } : {},
|
|
175
164
|
...profilePatch !== void 0 ? { profile: profilePatch === null ? null : profilePatch.data } : {},
|
|
176
165
|
...modelsPatch !== void 0 ? { models: modelsPatch } : {},
|
|
@@ -184,13 +173,8 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
184
173
|
ok: false,
|
|
185
174
|
error: { message: prep.error }
|
|
186
175
|
}, prep.status ?? 400);
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
ok: false,
|
|
190
|
-
error: { message: save.error ?? "save failed" }
|
|
191
|
-
}, 500);
|
|
192
|
-
const locale = c.req.query("locale") || c.req.header("Accept-Language")?.split(",")[0]?.trim();
|
|
193
|
-
const agentsPayload = await listGatewayAgents(service.currentConfig, { locale });
|
|
176
|
+
service.refreshAgentCatalog();
|
|
177
|
+
const agentsPayload = await listGatewayAgents({ locale: c.req.query("locale") || c.req.header("Accept-Language")?.split(",")[0]?.trim() });
|
|
194
178
|
return c.json({
|
|
195
179
|
ok: true,
|
|
196
180
|
payload: agentsPayload
|
|
@@ -199,20 +183,14 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
199
183
|
authenticated.delete("/api/agents/:id", strictRateLimitMiddleware, async (c) => {
|
|
200
184
|
const id = normalizeAgentId(c.req.param("id") ?? "");
|
|
201
185
|
const purge = c.req.query("purge") === "1" || c.req.query("purge") === "true";
|
|
202
|
-
const prep =
|
|
186
|
+
const prep = await deleteGatewayAgent(id, { purge });
|
|
203
187
|
if (prep.ok === false) return c.json({
|
|
204
188
|
ok: false,
|
|
205
189
|
error: { message: prep.error }
|
|
206
190
|
}, prep.status ?? 400);
|
|
207
|
-
const {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
ok: false,
|
|
211
|
-
error: { message: save.error ?? "save failed" }
|
|
212
|
-
}, 500);
|
|
213
|
-
if (purge) await runAfterDeletePurge(service.currentConfig, agentId);
|
|
214
|
-
const locale = c.req.query("locale") || c.req.header("Accept-Language")?.split(",")[0]?.trim();
|
|
215
|
-
const agentsPayload = await listGatewayAgents(service.currentConfig, { locale });
|
|
191
|
+
const { agentId } = prep.data;
|
|
192
|
+
service.refreshAgentCatalog();
|
|
193
|
+
const agentsPayload = await listGatewayAgents({ locale: c.req.query("locale") || c.req.header("Accept-Language")?.split(",")[0]?.trim() });
|
|
216
194
|
return c.json({
|
|
217
195
|
ok: true,
|
|
218
196
|
payload: {
|
|
@@ -223,8 +201,7 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
223
201
|
});
|
|
224
202
|
});
|
|
225
203
|
authenticated.get("/api/agents/:id/avatar", async (c) => {
|
|
226
|
-
const
|
|
227
|
-
const res = await readAgentAvatarFile(service.currentConfig, id);
|
|
204
|
+
const res = await readAgentAvatarFile(normalizeAgentId(c.req.param("id") ?? ""));
|
|
228
205
|
if (res.ok === false) return c.json({
|
|
229
206
|
ok: false,
|
|
230
207
|
error: { message: res.error }
|
|
@@ -248,9 +225,7 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
248
225
|
error: { message: "Invalid JSON" }
|
|
249
226
|
}, 400);
|
|
250
227
|
}
|
|
251
|
-
const
|
|
252
|
-
const mimeType = typeof body.mimeType === "string" ? body.mimeType : "";
|
|
253
|
-
const res = await writeAgentAvatarFromBase64(service.currentConfig, id, base64, mimeType);
|
|
228
|
+
const res = await writeAgentAvatarFromBase64(id, typeof body.base64 === "string" ? body.base64 : "", typeof body.mimeType === "string" ? body.mimeType : "");
|
|
254
229
|
if (res.ok === false) return c.json({
|
|
255
230
|
ok: false,
|
|
256
231
|
error: { message: res.error }
|
|
@@ -261,8 +236,7 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
261
236
|
});
|
|
262
237
|
});
|
|
263
238
|
authenticated.delete("/api/agents/:id/avatar", strictRateLimitMiddleware, async (c) => {
|
|
264
|
-
const
|
|
265
|
-
const res = await deleteAgentAvatarFile(service.currentConfig, id);
|
|
239
|
+
const res = await deleteAgentAvatarFile(normalizeAgentId(c.req.param("id") ?? ""));
|
|
266
240
|
if (res.ok === false) return c.json({
|
|
267
241
|
ok: false,
|
|
268
242
|
error: { message: res.error }
|
|
@@ -273,8 +247,7 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
273
247
|
});
|
|
274
248
|
});
|
|
275
249
|
authenticated.get("/api/agents/:id/files", async (c) => {
|
|
276
|
-
const
|
|
277
|
-
const res = await listAgentProfileFiles(service.currentConfig, id);
|
|
250
|
+
const res = await listAgentProfileFiles(normalizeAgentId(c.req.param("id") ?? ""));
|
|
278
251
|
if (res.ok === false) return c.json({
|
|
279
252
|
ok: false,
|
|
280
253
|
error: { message: res.error }
|
|
@@ -287,7 +260,7 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
287
260
|
authenticated.get("/api/agents/:id/files/:name", async (c) => {
|
|
288
261
|
const id = normalizeAgentId(c.req.param("id") ?? "");
|
|
289
262
|
const name = decodeURIComponent(c.req.param("name") ?? "");
|
|
290
|
-
const res = await readAgentProfileFile(
|
|
263
|
+
const res = await readAgentProfileFile(id, name);
|
|
291
264
|
if (res.ok === false) return c.json({
|
|
292
265
|
ok: false,
|
|
293
266
|
error: { message: res.error }
|
|
@@ -314,7 +287,7 @@ function registerAgentsRoutes(authenticated, deps) {
|
|
|
314
287
|
error: { message: "Invalid JSON" }
|
|
315
288
|
}, 400);
|
|
316
289
|
}
|
|
317
|
-
const res = await writeAgentProfileFile(
|
|
290
|
+
const res = await writeAgentProfileFile(id, name, content);
|
|
318
291
|
if (res.ok === false) return c.json({
|
|
319
292
|
ok: false,
|
|
320
293
|
error: { message: res.error }
|
|
@@ -7,6 +7,7 @@ import { createOAuthAsyncHandler } from "../oauth-async.js";
|
|
|
7
7
|
import { createOAuthHandler } from "../oauth.js";
|
|
8
8
|
import { extensionAssetMimeType } from "../lib/extension-assets.js";
|
|
9
9
|
import { loadExtensionStore, saveExtensionStore } from "../lib/extension-store.js";
|
|
10
|
+
import { listAgentPluginInventory } from "../../../extensions/agent-plugins/inventory.js";
|
|
10
11
|
import { relative, resolve } from "node:path";
|
|
11
12
|
import { existsSync, readFileSync, statSync } from "node:fs";
|
|
12
13
|
//#region src/gateway/hono/routes/auth-registry-extensions.ts
|
|
@@ -152,7 +153,7 @@ function registerAuthRegistryExtensionsRoutes(authenticated, deps) {
|
|
|
152
153
|
});
|
|
153
154
|
authenticated.get("/api/extensions", async (c) => {
|
|
154
155
|
const loader = service.getExtensionLoader();
|
|
155
|
-
if (!loader) return c.json({ extensions:
|
|
156
|
+
if (!loader) return c.json({ extensions: listAgentPluginInventory() });
|
|
156
157
|
const registry = loader.getRegistry();
|
|
157
158
|
const discovered = loader.discoverExtensions();
|
|
158
159
|
const activeIds = /* @__PURE__ */ new Set();
|
|
@@ -166,6 +167,7 @@ function registerAuthRegistryExtensionsRoutes(authenticated, deps) {
|
|
|
166
167
|
activationEligibleIds = /* @__PURE__ */ new Set();
|
|
167
168
|
}
|
|
168
169
|
const extensions = discovered.map((ext) => ({
|
|
170
|
+
format: "native-extension",
|
|
169
171
|
id: ext.manifest.id,
|
|
170
172
|
name: ext.manifest.name,
|
|
171
173
|
description: ext.manifest.description,
|
|
@@ -182,7 +184,7 @@ function registerAuthRegistryExtensionsRoutes(authenticated, deps) {
|
|
|
182
184
|
contributions: ext.manifest.ui.contributions
|
|
183
185
|
} : void 0
|
|
184
186
|
}));
|
|
185
|
-
return c.json({ extensions });
|
|
187
|
+
return c.json({ extensions: [...extensions, ...listAgentPluginInventory()] });
|
|
186
188
|
});
|
|
187
189
|
/**
|
|
188
190
|
* Built-in (bundled) extension enable/disable — persists `extensions.enabled` / `extensions.disabled`.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { deleteBrowserTabBinding, getBrowserTabBinding, setBrowserTabBinding } from "../../../storage/sqlite/browser-tab-binding-repository.js";
|
|
1
|
+
import { deleteBrowserTabBinding, getBrowserTabBinding, init_browser_tab_binding_repository, setBrowserTabBinding } from "../../../storage/sqlite/browser-tab-binding-repository.js";
|
|
2
2
|
import { browserTabBindingRequestSchema } from "../../../../packages/gateway-contract/src/browser-tab-binding.js";
|
|
3
3
|
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
4
|
-
import { getDevice } from "../../../storage/sqlite/device-access-repository.js";
|
|
4
|
+
import { getDevice, init_device_access_repository } from "../../../storage/sqlite/device-access-repository.js";
|
|
5
5
|
import "../../../../packages/browser-control-contract/src/index.js";
|
|
6
6
|
import { decideBrowserApproval, listBrowserApprovals } from "../../../browser/policy/approval-store.js";
|
|
7
7
|
import { createBrowserDriver } from "../../../browser/drivers/create-driver.js";
|
|
@@ -12,6 +12,8 @@ import { getConnInfo } from "@hono/node-server/conninfo";
|
|
|
12
12
|
//#region src/gateway/hono/routes/browser.ts
|
|
13
13
|
/** Browser Control status, approvals, and driver diagnostics. */
|
|
14
14
|
init_src();
|
|
15
|
+
init_device_access_repository();
|
|
16
|
+
init_browser_tab_binding_repository();
|
|
15
17
|
async function extensionStatus(service, includeLocalArtifacts) {
|
|
16
18
|
const endpoints = service.endpointTools.registry.list().filter((item) => item.kind === "browser" && item.tools.some((tool) => tool.descriptor.name === "browser.control")).sort((left, right) => right.lastHeartbeatAt - left.lastHeartbeatAt);
|
|
17
19
|
const endpoint = endpoints[0];
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus
|
|
1
|
+
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, getChannelSetupStatus } from "../../../channels/catalog/channel-catalog-service.js";
|
|
2
2
|
import { approveChannelPairing, approveChannelPairingBySender, dismissChannelPairingPending, listChannelPairingState, listChannelPairingSummary, revokeChannelPairingPaired } from "../../../channels/pairing/pairing-service.js";
|
|
3
3
|
//#region src/gateway/hono/routes/channels.ts
|
|
4
|
-
init_channel_catalog_service();
|
|
5
4
|
function channelIdParam(raw) {
|
|
6
5
|
return (raw ?? "").trim().toLowerCase();
|
|
7
6
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ChatPreviewFixGuidanceInputSchema, ChatPreviewSourceHashSchema } from "../../../../packages/gateway-contract/src/chat-previews.js";
|
|
2
|
+
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { ChatPreviewNotFoundError } from "../../../chat-previews/service.js";
|
|
4
|
+
import "../../../chat-previews/index.js";
|
|
5
|
+
//#region src/gateway/hono/routes/chat-previews.ts
|
|
6
|
+
init_src();
|
|
7
|
+
function registerChatPreviewRoutes(app, deps) {
|
|
8
|
+
app.get("/api/chat-previews/:id/revisions/:sourceHash", (c) => {
|
|
9
|
+
const sourceHash = ChatPreviewSourceHashSchema.safeParse(c.req.param("sourceHash"));
|
|
10
|
+
if (!sourceHash.success) return c.json({ error: "Invalid preview revision" }, 400);
|
|
11
|
+
try {
|
|
12
|
+
return c.json({ revision: deps.service.chatPreviews.getRevision(c.req.param("id"), sourceHash.data) }, 200, { "Cache-Control": "private, max-age=31536000, immutable" });
|
|
13
|
+
} catch (error) {
|
|
14
|
+
if (error instanceof ChatPreviewNotFoundError) return c.json({ error: error.message }, 404);
|
|
15
|
+
throw error;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
app.post("/api/chat-previews/:id/fix-guidance", async (c) => {
|
|
19
|
+
const parsed = ChatPreviewFixGuidanceInputSchema.safeParse(await c.req.json().catch(() => null));
|
|
20
|
+
if (!parsed.success) return c.json({ error: "Invalid fix guidance input" }, 400);
|
|
21
|
+
try {
|
|
22
|
+
return c.json({ guidance: deps.service.chatPreviews.getFixGuidance(c.req.param("id"), parsed.data.sourceHash, parsed.data.diagnostics, parsed.data.locale) });
|
|
23
|
+
} catch (error) {
|
|
24
|
+
if (error instanceof ChatPreviewNotFoundError) return c.json({ error: error.message }, 404);
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
app.post("/api/chat-previews/:id/promote", async (c) => {
|
|
29
|
+
const body = await c.req.json().catch(() => null);
|
|
30
|
+
const sourceHash = ChatPreviewSourceHashSchema.safeParse(body?.sourceHash);
|
|
31
|
+
if (!sourceHash.success) return c.json({ error: "Invalid preview revision" }, 400);
|
|
32
|
+
try {
|
|
33
|
+
return c.json({ app: deps.service.chatPreviews.promote(c.req.param("id"), sourceHash.data) }, 201);
|
|
34
|
+
} catch (error) {
|
|
35
|
+
if (error instanceof ChatPreviewNotFoundError) return c.json({ error: error.message }, 404);
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { registerChatPreviewRoutes };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getSqliteDatabase, init_transaction } from "../../../storage/sqlite/transaction.js";
|
|
2
|
-
import { hasGatewayScope } from "../../security/gateway-scopes.js";
|
|
2
|
+
import { hasGatewayScope, init_gateway_scopes } from "../../security/gateway-scopes.js";
|
|
3
3
|
import { getConnectorAccount, init_connector_account_repository, listConnectorAccounts, updateConnectorAccount } from "../../../storage/sqlite/connector-account-repository.js";
|
|
4
4
|
import { getConnectorConnection, getConnectorInstallation, init_connector_repository, listConnectorConnections, upsertConnectorConnection, upsertConnectorInstallation } from "../../../storage/sqlite/connector-repository.js";
|
|
5
5
|
import { cancelCliContext, cliContextPath, resolveCliArtifact } from "../../../connectors/cli/process.js";
|
|
@@ -12,6 +12,7 @@ import { readFile } from "node:fs/promises";
|
|
|
12
12
|
init_connector_account_repository();
|
|
13
13
|
init_connector_repository();
|
|
14
14
|
init_transaction();
|
|
15
|
+
init_gateway_scopes();
|
|
15
16
|
function registerCliConnectorRoutes(app, deps) {
|
|
16
17
|
const admin = async (c, next) => {
|
|
17
18
|
if (!hasGatewayScope(getGatewayPrincipal(c).scopes, "gateway.admin")) return c.json({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../../agent/agent-scope.js";
|
|
1
2
|
import { effectiveWorkspacePathForSession } from "../../../session/session-workspace.js";
|
|
2
3
|
import { getProjectForSession } from "../../../projects/workspace.js";
|
|
3
4
|
import { isRegisteredProvider } from "../../../agent/skills/marketplace/registry.js";
|
|
@@ -7,6 +8,7 @@ import { commandRegistry } from "../../../chat-commands/registry.js";
|
|
|
7
8
|
import { buildReviewContext, resolveGitRoot } from "../../../review/review-git.js";
|
|
8
9
|
import "../../../chat-commands/index.js";
|
|
9
10
|
//#region src/gateway/hono/routes/commands-skills.ts
|
|
11
|
+
init_agent_scope();
|
|
10
12
|
function parseMarketplaceProviderQuery(raw) {
|
|
11
13
|
const v = raw?.trim().toLowerCase();
|
|
12
14
|
if (v && isRegisteredProvider(v)) return v;
|
|
@@ -77,7 +79,7 @@ function registerCommandsSkillsRoutes(authenticated, deps) {
|
|
|
77
79
|
});
|
|
78
80
|
authenticated.get("/api/chat/skills", async (c) => {
|
|
79
81
|
const conversationId = c.req.query("conversationId")?.trim();
|
|
80
|
-
const agentId = c.req.query("agentId")?.trim() ||
|
|
82
|
+
const agentId = c.req.query("agentId")?.trim() || resolveDefaultAgentId();
|
|
81
83
|
const payload = conversationId ? await service.marketplace.getSessionSkillsApi(conversationId) : service.marketplace.getAgentSkillsApi(agentId);
|
|
82
84
|
return c.json({
|
|
83
85
|
ok: true,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { appendComposerInputHistory, clearComposerInputHistory, listComposerInputHistory } from "../../../storage/sqlite/composer-input-history-repository.js";
|
|
2
|
-
import "../../../storage/sqlite/index.js";
|
|
2
|
+
import { init_sqlite } from "../../../storage/sqlite/index.js";
|
|
3
3
|
//#region src/gateway/hono/routes/composer-history.ts
|
|
4
|
+
init_sqlite();
|
|
4
5
|
const MAX_TEXT_LENGTH = 1e5;
|
|
5
6
|
function registerComposerHistoryRoutes(authenticated, deps) {
|
|
6
7
|
authenticated.get("/api/composer-history", (c) => {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Barrel for `PATCH /api/config` section patchers.
|
|
3
|
-
* `channels.ts`, `gateway.ts`, `misc.ts` for the per-section split.
|
|
2
|
+
* Barrel for `PATCH /api/config` section patchers.
|
|
4
3
|
*/
|
|
5
|
-
export { applyAgentsPatch } from './agents.js';
|
|
6
4
|
export { applyChannelsPatch } from './channels.js';
|
|
7
5
|
export { applyGatewayPatch } from './gateway.js';
|
|
8
6
|
export { applyMiscPatch, validateGatewayAfterPatch } from './misc.js';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { applyAgentsPatch } from "./agents.js";
|
|
2
1
|
import { applyChannelsPatch } from "./channels.js";
|
|
3
2
|
import { PATCH_OK, patchError } from "./result.js";
|
|
4
3
|
import { applyGatewayPatch } from "./gateway.js";
|
|
5
4
|
import { applyMiscPatch, validateGatewayAfterPatch } from "./misc.js";
|
|
6
|
-
export { PATCH_OK,
|
|
5
|
+
export { PATCH_OK, applyChannelsPatch, applyGatewayPatch, applyMiscPatch, patchError, validateGatewayAfterPatch };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { BindingsSchema, init_binding_schema } from "../../../../routing/binding-schema.js";
|
|
2
|
+
import { AgentCatalogService } from "../../../../agent-catalog/service.js";
|
|
1
3
|
import { ComputerConfigSchema, init_config } from "../../../../computer/config.js";
|
|
2
4
|
import { ContextPlanningConfigSchema, KnowledgeMemoryConfigSchema, UserContextConfigSchema, UserModelConfigSchema, init_config as init_config$1 } from "../../../../user-context/config.js";
|
|
3
|
-
import {
|
|
5
|
+
import { BrowserConfigSchema, McpConfigSchema, VoiceConfigSchema, init_schema } from "../../../../config/schema.js";
|
|
4
6
|
import { CredentialResolver, init_credentials } from "../../../../auth/credentials.js";
|
|
5
7
|
import { canonicalizeConfiguredMcpServer } from "../../../../config/mcp-config-normalize.js";
|
|
6
|
-
import { setTuiDefaultAgentConfig } from "../../../../commands/agents.config.js";
|
|
7
8
|
import { mergeGatewaySkillsMarketplacePatch, mergeSessionConfigPatch, mergeUpdateConfigPatch } from "../../../../config/web-patch.js";
|
|
8
9
|
import { assertGatewayAuthConfigured, resolveGatewayAuth } from "../../../auth.js";
|
|
9
10
|
import { isMaskedSecretPatchValue } from "../../lib/mask-secret-length.js";
|
|
@@ -15,6 +16,7 @@ import { PATCH_OK, patchError } from "./result.js";
|
|
|
15
16
|
//#region src/gateway/hono/routes/config-patch/misc.ts
|
|
16
17
|
init_config();
|
|
17
18
|
init_schema();
|
|
19
|
+
init_binding_schema();
|
|
18
20
|
init_credentials();
|
|
19
21
|
init_config$1();
|
|
20
22
|
async function applyMiscPatch(config, body) {
|
|
@@ -116,14 +118,15 @@ async function applyMiscPatch(config, body) {
|
|
|
116
118
|
if (body.tui !== void 0) {
|
|
117
119
|
if (typeof body.tui !== "object" || body.tui === null || Array.isArray(body.tui)) return patchError("tui must be an object");
|
|
118
120
|
const tuiPatch = body.tui;
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
} else {
|
|
121
|
+
const catalog = new AgentCatalogService();
|
|
122
|
+
if (tuiPatch.defaultAgent !== void 0) if (tuiPatch.defaultAgent === null) catalog.clearSurfaceDefault("tui");
|
|
123
|
+
else {
|
|
123
124
|
if (typeof tuiPatch.defaultAgent !== "string" || !tuiPatch.defaultAgent.trim()) return patchError("tui.defaultAgent must be a non-empty string");
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
try {
|
|
126
|
+
catalog.setSurfaceDefault("tui", tuiPatch.defaultAgent);
|
|
127
|
+
} catch (error) {
|
|
128
|
+
return patchError(error instanceof Error ? error.message : String(error));
|
|
129
|
+
}
|
|
127
130
|
}
|
|
128
131
|
}
|
|
129
132
|
if (body.browser !== void 0) {
|
|
@@ -212,9 +215,13 @@ async function applyMiscPatch(config, body) {
|
|
|
212
215
|
}
|
|
213
216
|
if (body.bindings !== void 0) {
|
|
214
217
|
if (!Array.isArray(body.bindings)) return patchError("bindings must be an array");
|
|
215
|
-
const parsed =
|
|
218
|
+
const parsed = BindingsSchema.safeParse(body.bindings);
|
|
216
219
|
if (!parsed.success) return patchError(parsed.error.issues.map((i) => i.message).join("; "));
|
|
217
|
-
|
|
220
|
+
try {
|
|
221
|
+
new AgentCatalogService().replaceBindings(parsed.data);
|
|
222
|
+
} catch (error) {
|
|
223
|
+
return patchError(error instanceof Error ? error.message : String(error));
|
|
224
|
+
}
|
|
218
225
|
}
|
|
219
226
|
if (body.mcp !== void 0) if (body.mcp === null) delete config.mcp;
|
|
220
227
|
else if (typeof body.mcp !== "object" || Array.isArray(body.mcp)) return patchError("mcp must be an object");
|