@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
|
@@ -5,6 +5,7 @@ export declare const DEFAULT_SKILL_POLICY: {
|
|
|
5
5
|
mode: "selected";
|
|
6
6
|
include: ("doc-coauthoring" | "define-task" | "find-skills" | "summarize")[];
|
|
7
7
|
};
|
|
8
|
+
export declare const AgentIdSchema: z.ZodString;
|
|
8
9
|
export declare const ModelRefSchema: z.ZodString;
|
|
9
10
|
export declare const ModelRouteSchema: z.ZodObject<{
|
|
10
11
|
primary: z.ZodString;
|
|
@@ -332,177 +333,6 @@ export declare const AgentEntrySchema: z.ZodObject<{
|
|
|
332
333
|
}, z.core.$strict>>;
|
|
333
334
|
}, z.core.$strict>>;
|
|
334
335
|
}, z.core.$strict>;
|
|
335
|
-
export declare const AgentsConfigSchema: z.ZodObject<{
|
|
336
|
-
default: z.ZodDefault<z.ZodString>;
|
|
337
|
-
defaults: z.ZodDefault<z.ZodObject<{
|
|
338
|
-
models: z.ZodObject<{
|
|
339
|
-
chat: z.ZodObject<{
|
|
340
|
-
primary: z.ZodString;
|
|
341
|
-
fallbacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
342
|
-
}, z.core.$strict>;
|
|
343
|
-
intents: z.ZodDefault<z.ZodRecord<z.ZodEnum<{
|
|
344
|
-
review: "review";
|
|
345
|
-
coding: "coding";
|
|
346
|
-
fast: "fast";
|
|
347
|
-
reasoning: "reasoning";
|
|
348
|
-
vision: "vision";
|
|
349
|
-
understanding: "understanding";
|
|
350
|
-
}> & z.core.$partial, z.ZodObject<{
|
|
351
|
-
primary: z.ZodString;
|
|
352
|
-
fallbacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
353
|
-
}, z.core.$strict>>>;
|
|
354
|
-
imageUnderstanding: z.ZodOptional<z.ZodObject<{
|
|
355
|
-
primary: z.ZodString;
|
|
356
|
-
fallbacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
357
|
-
}, z.core.$strict>>;
|
|
358
|
-
computerUse: z.ZodOptional<z.ZodObject<{
|
|
359
|
-
primary: z.ZodString;
|
|
360
|
-
fallbacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
361
|
-
}, z.core.$strict>>;
|
|
362
|
-
imageGeneration: z.ZodOptional<z.ZodObject<{
|
|
363
|
-
primary: z.ZodString;
|
|
364
|
-
fallbacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
365
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
366
|
-
autoProviderFallback: z.ZodDefault<z.ZodBoolean>;
|
|
367
|
-
}, z.core.$strict>>;
|
|
368
|
-
}, z.core.$strict>;
|
|
369
|
-
skills: z.ZodDefault<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
370
|
-
mode: z.ZodLiteral<"all-enabled">;
|
|
371
|
-
exclude: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
372
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
373
|
-
mode: z.ZodLiteral<"selected">;
|
|
374
|
-
include: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
375
|
-
}, z.core.$strict>], "mode">>;
|
|
376
|
-
tools: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
377
|
-
mode: z.ZodEnum<{
|
|
378
|
-
allow: "allow";
|
|
379
|
-
deny: "deny";
|
|
380
|
-
ask: "ask";
|
|
381
|
-
}>;
|
|
382
|
-
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
383
|
-
maxCallsPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
384
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
385
|
-
}, z.core.$strict>>>;
|
|
386
|
-
workflows: z.ZodDefault<z.ZodObject<{
|
|
387
|
-
default: z.ZodOptional<z.ZodString>;
|
|
388
|
-
allowed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
389
|
-
}, z.core.$strict>>;
|
|
390
|
-
runtime: z.ZodDefault<z.ZodObject<{
|
|
391
|
-
commandIsolation: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
392
|
-
mode: z.ZodLiteral<"host">;
|
|
393
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
394
|
-
mode: z.ZodLiteral<"docker">;
|
|
395
|
-
image: z.ZodString;
|
|
396
|
-
network: z.ZodDefault<z.ZodBoolean>;
|
|
397
|
-
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
398
|
-
"read-only": "read-only";
|
|
399
|
-
"read-write": "read-write";
|
|
400
|
-
}>>;
|
|
401
|
-
}, z.core.$strict>], "mode">>;
|
|
402
|
-
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
403
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
404
|
-
maxToolFailuresPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
405
|
-
promptCache: z.ZodOptional<z.ZodObject<{
|
|
406
|
-
mode: z.ZodDefault<z.ZodEnum<{
|
|
407
|
-
off: "off";
|
|
408
|
-
auto: "auto";
|
|
409
|
-
}>>;
|
|
410
|
-
lifetime: z.ZodDefault<z.ZodEnum<{
|
|
411
|
-
short: "short";
|
|
412
|
-
long: "long";
|
|
413
|
-
}>>;
|
|
414
|
-
}, z.core.$strict>>;
|
|
415
|
-
}, z.core.$strict>>;
|
|
416
|
-
}, z.core.$strict>>;
|
|
417
|
-
list: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
418
|
-
id: z.ZodString;
|
|
419
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
420
|
-
workspace: z.ZodOptional<z.ZodString>;
|
|
421
|
-
profile: z.ZodOptional<z.ZodObject<{
|
|
422
|
-
name: z.ZodString;
|
|
423
|
-
instructions: z.ZodOptional<z.ZodString>;
|
|
424
|
-
}, z.core.$strict>>;
|
|
425
|
-
models: z.ZodOptional<z.ZodObject<{
|
|
426
|
-
chat: z.ZodOptional<z.ZodObject<{
|
|
427
|
-
primary: z.ZodString;
|
|
428
|
-
fallbacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
429
|
-
}, z.core.$strict>>;
|
|
430
|
-
intents: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
431
|
-
review: "review";
|
|
432
|
-
coding: "coding";
|
|
433
|
-
fast: "fast";
|
|
434
|
-
reasoning: "reasoning";
|
|
435
|
-
vision: "vision";
|
|
436
|
-
understanding: "understanding";
|
|
437
|
-
}> & z.core.$partial, z.ZodNullable<z.ZodObject<{
|
|
438
|
-
primary: z.ZodString;
|
|
439
|
-
fallbacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
440
|
-
}, z.core.$strict>>>>;
|
|
441
|
-
imageUnderstanding: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
442
|
-
primary: z.ZodString;
|
|
443
|
-
fallbacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
444
|
-
}, z.core.$strict>>>;
|
|
445
|
-
computerUse: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
446
|
-
primary: z.ZodString;
|
|
447
|
-
fallbacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
448
|
-
}, z.core.$strict>>>;
|
|
449
|
-
imageGeneration: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
450
|
-
primary: z.ZodString;
|
|
451
|
-
fallbacks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
452
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
453
|
-
autoProviderFallback: z.ZodDefault<z.ZodBoolean>;
|
|
454
|
-
}, z.core.$strict>>>;
|
|
455
|
-
}, z.core.$strict>>;
|
|
456
|
-
skills: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
457
|
-
mode: z.ZodLiteral<"merge">;
|
|
458
|
-
add: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
459
|
-
remove: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
460
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
461
|
-
mode: z.ZodLiteral<"replace">;
|
|
462
|
-
include: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
463
|
-
}, z.core.$strict>], "mode">>;
|
|
464
|
-
tools: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
465
|
-
mode: z.ZodEnum<{
|
|
466
|
-
allow: "allow";
|
|
467
|
-
deny: "deny";
|
|
468
|
-
ask: "ask";
|
|
469
|
-
}>;
|
|
470
|
-
readOnly: z.ZodOptional<z.ZodBoolean>;
|
|
471
|
-
maxCallsPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
472
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
473
|
-
}, z.core.$strict>>>;
|
|
474
|
-
workflows: z.ZodOptional<z.ZodObject<{
|
|
475
|
-
default: z.ZodOptional<z.ZodString>;
|
|
476
|
-
allowed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
477
|
-
}, z.core.$strict>>;
|
|
478
|
-
runtime: z.ZodOptional<z.ZodObject<{
|
|
479
|
-
commandIsolation: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
480
|
-
mode: z.ZodLiteral<"host">;
|
|
481
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
482
|
-
mode: z.ZodLiteral<"docker">;
|
|
483
|
-
image: z.ZodString;
|
|
484
|
-
network: z.ZodDefault<z.ZodBoolean>;
|
|
485
|
-
workspaceAccess: z.ZodDefault<z.ZodEnum<{
|
|
486
|
-
"read-only": "read-only";
|
|
487
|
-
"read-write": "read-write";
|
|
488
|
-
}>>;
|
|
489
|
-
}, z.core.$strict>], "mode">>;
|
|
490
|
-
maxTurns: z.ZodOptional<z.ZodNumber>;
|
|
491
|
-
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
492
|
-
maxToolFailuresPerTurn: z.ZodOptional<z.ZodNumber>;
|
|
493
|
-
promptCache: z.ZodOptional<z.ZodObject<{
|
|
494
|
-
mode: z.ZodDefault<z.ZodEnum<{
|
|
495
|
-
off: "off";
|
|
496
|
-
auto: "auto";
|
|
497
|
-
}>>;
|
|
498
|
-
lifetime: z.ZodDefault<z.ZodEnum<{
|
|
499
|
-
short: "short";
|
|
500
|
-
long: "long";
|
|
501
|
-
}>>;
|
|
502
|
-
}, z.core.$strict>>;
|
|
503
|
-
}, z.core.$strict>>;
|
|
504
|
-
}, z.core.$strict>>>;
|
|
505
|
-
}, z.core.$strict>;
|
|
506
336
|
export declare const EffectiveAgentConfigSchema: z.ZodObject<{
|
|
507
337
|
id: z.ZodString;
|
|
508
338
|
enabled: z.ZodBoolean;
|
|
@@ -595,7 +425,6 @@ export type AgentModelsOverride = z.infer<typeof AgentModelsOverrideSchema>;
|
|
|
595
425
|
export type ModelIntent = z.infer<typeof ModelIntentSchema>;
|
|
596
426
|
export type AgentDefaults = z.infer<typeof AgentDefaultsSchema>;
|
|
597
427
|
export type AgentEntry = z.infer<typeof AgentEntrySchema>;
|
|
598
|
-
export type AgentsConfig = z.infer<typeof AgentsConfigSchema>;
|
|
599
428
|
export type EffectiveAgentConfig = z.infer<typeof EffectiveAgentConfigSchema>;
|
|
600
429
|
export type SkillDefaults = z.infer<typeof SkillDefaultsSchema>;
|
|
601
430
|
export type SkillOverride = z.infer<typeof SkillOverrideSchema>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/agent-config/schema.ts
|
|
4
|
-
var DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, AgentIdSchema, ModelRefSchema, ModelRouteSchema, ImageGenerationRouteSchema, ComputerModelRouteSchema, ModelIntentSchema, ModelIntentRoutesSchema, ModelIntentOverridesSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, ToolModeSchema, ToolPolicySchema, ToolPoliciesSchema, SkillDefaultsSchema, SkillOverrideSchema, WorkflowPolicySchema, RuntimePolicySchema, AgentDefaultsSchema, AgentProfileSchema, AgentEntrySchema,
|
|
4
|
+
var DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, AgentIdSchema, ModelRefSchema, ModelRouteSchema, ImageGenerationRouteSchema, ComputerModelRouteSchema, ModelIntentSchema, ModelIntentRoutesSchema, ModelIntentOverridesSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, ToolModeSchema, ToolPolicySchema, ToolPoliciesSchema, SkillDefaultsSchema, SkillOverrideSchema, WorkflowPolicySchema, RuntimePolicySchema, AgentDefaultsSchema, AgentProfileSchema, AgentEntrySchema, EffectiveAgentConfigSchema;
|
|
5
5
|
var init_schema = __esmMin((() => {
|
|
6
6
|
DEFAULT_AGENT_MODEL_REF = "deepseek/deepseek-v4-flash";
|
|
7
7
|
DEFAULT_CORE_SKILLS = [
|
|
@@ -128,45 +128,6 @@ var init_schema = __esmMin((() => {
|
|
|
128
128
|
workflows: WorkflowPolicySchema.optional(),
|
|
129
129
|
runtime: RuntimePolicySchema.optional()
|
|
130
130
|
}).strict();
|
|
131
|
-
AgentsConfigSchema = z.object({
|
|
132
|
-
default: AgentIdSchema.default("main"),
|
|
133
|
-
defaults: AgentDefaultsSchema.default({
|
|
134
|
-
models: {
|
|
135
|
-
chat: {
|
|
136
|
-
primary: DEFAULT_AGENT_MODEL_REF,
|
|
137
|
-
fallbacks: []
|
|
138
|
-
},
|
|
139
|
-
intents: {}
|
|
140
|
-
},
|
|
141
|
-
skills: DEFAULT_SKILL_POLICY,
|
|
142
|
-
tools: {},
|
|
143
|
-
workflows: {},
|
|
144
|
-
runtime: {}
|
|
145
|
-
}),
|
|
146
|
-
list: z.array(AgentEntrySchema).default([{
|
|
147
|
-
id: "main",
|
|
148
|
-
enabled: true
|
|
149
|
-
}])
|
|
150
|
-
}).strict().superRefine((value, context) => {
|
|
151
|
-
const seen = /* @__PURE__ */ new Set();
|
|
152
|
-
value.list.forEach((agent, index) => {
|
|
153
|
-
if (seen.has(agent.id)) context.addIssue({
|
|
154
|
-
code: "custom",
|
|
155
|
-
path: [
|
|
156
|
-
"list",
|
|
157
|
-
index,
|
|
158
|
-
"id"
|
|
159
|
-
],
|
|
160
|
-
message: `duplicate agent id "${agent.id}"`
|
|
161
|
-
});
|
|
162
|
-
seen.add(agent.id);
|
|
163
|
-
});
|
|
164
|
-
if (!value.list.some((agent) => agent.id === value.default && agent.enabled)) context.addIssue({
|
|
165
|
-
code: "custom",
|
|
166
|
-
path: ["default"],
|
|
167
|
-
message: `default agent "${value.default}" must reference an enabled entry`
|
|
168
|
-
});
|
|
169
|
-
});
|
|
170
131
|
EffectiveAgentConfigSchema = z.object({
|
|
171
132
|
id: AgentIdSchema,
|
|
172
133
|
enabled: z.boolean(),
|
|
@@ -184,4 +145,4 @@ var init_schema = __esmMin((() => {
|
|
|
184
145
|
}));
|
|
185
146
|
//#endregion
|
|
186
147
|
init_schema();
|
|
187
|
-
export { AgentDefaultsSchema, AgentEntrySchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, AgentProfileSchema,
|
|
148
|
+
export { AgentDefaultsSchema, AgentEntrySchema, AgentIdSchema, AgentModelsDefaultsSchema, AgentModelsOverrideSchema, AgentProfileSchema, ComputerModelRouteSchema, DEFAULT_AGENT_MODEL_REF, DEFAULT_CORE_SKILLS, DEFAULT_SKILL_POLICY, EffectiveAgentConfigSchema, ImageGenerationRouteSchema, ModelIntentSchema, ModelRefSchema, ModelRouteSchema, RuntimePolicySchema, SkillDefaultsSchema, SkillOverrideSchema, ToolModeSchema, ToolPoliciesSchema, ToolPolicySchema, WorkflowPolicySchema, init_schema };
|
|
@@ -400,7 +400,7 @@ var init_credentials = __esmMin((() => {
|
|
|
400
400
|
version: 2,
|
|
401
401
|
profiles: {}
|
|
402
402
|
};
|
|
403
|
-
const path = resolveAgentAuthProfilesPath(this.
|
|
403
|
+
const path = resolveAgentAuthProfilesPath(this.agentId);
|
|
404
404
|
try {
|
|
405
405
|
const content = await readFile(path, "utf-8");
|
|
406
406
|
const data = JSON.parse(content);
|
|
@@ -424,7 +424,7 @@ var init_credentials = __esmMin((() => {
|
|
|
424
424
|
}
|
|
425
425
|
async saveAgentAuthProfile(profileId, profile) {
|
|
426
426
|
if (!this.agentId || !this.appConfig) throw new Error("Agent ID and appConfig required for agent-private profiles");
|
|
427
|
-
const path = resolveAgentAuthProfilesPath(this.
|
|
427
|
+
const path = resolveAgentAuthProfilesPath(this.agentId);
|
|
428
428
|
await mkdir(dirname(path), { recursive: true });
|
|
429
429
|
const file = await this.loadAgentAuthProfilesFile();
|
|
430
430
|
file.profiles[profileId] = profile;
|
|
@@ -438,7 +438,7 @@ var init_credentials = __esmMin((() => {
|
|
|
438
438
|
}
|
|
439
439
|
async deleteAgentAuthProfile(profileId) {
|
|
440
440
|
if (!this.agentId || !this.appConfig) throw new Error("Agent ID and appConfig required for agent-private profiles");
|
|
441
|
-
const path = resolveAgentAuthProfilesPath(this.
|
|
441
|
+
const path = resolveAgentAuthProfilesPath(this.agentId);
|
|
442
442
|
const file = await this.loadAgentAuthProfilesFile();
|
|
443
443
|
delete file.profiles[profileId];
|
|
444
444
|
await writeTextAtomic(path, JSON.stringify(file, null, 2));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
3
2
|
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
3
|
+
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
4
4
|
import { hostname } from "node:os";
|
|
5
5
|
import { randomBytes } from "node:crypto";
|
|
6
6
|
import http from "node:http";
|
|
@@ -10,7 +10,7 @@ import type { Config } from '../config/schema.js';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare function resolveProviderApiKeySync(provider: string): string | undefined;
|
|
12
12
|
/** Resolve one agent's private credential, then the shared credential and OAuth token. */
|
|
13
|
-
export declare function resolveProviderApiKeyForAgentSync(provider: string, agentId?: string,
|
|
13
|
+
export declare function resolveProviderApiKeyForAgentSync(provider: string, agentId?: string, _config?: Config): string | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* True if credentials exist in auth profiles (global or agent) or OAuth store,
|
|
16
16
|
* matching async CredentialResolver resolution (excluding env — callers check env separately).
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
2
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
4
|
-
import {
|
|
3
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
5
4
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
6
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
6
|
//#region src/auth/sync-provider-auth.ts
|
|
@@ -83,19 +82,18 @@ function readOAuthAccessTokenSync(provider) {
|
|
|
83
82
|
function resolveProviderApiKeySync(provider) {
|
|
84
83
|
const normalized = provider.toLowerCase();
|
|
85
84
|
if (isOAuthOnlyProvider(normalized)) return readOAuthAccessTokenSync(normalized);
|
|
86
|
-
const
|
|
87
|
-
const fromAgent = readApiKeyFromProfilesFile(resolveAgentAuthProfilesPath(cfg, getDefaultAgentId(cfg)), normalized);
|
|
85
|
+
const fromAgent = readApiKeyFromProfilesFile(resolveAgentAuthProfilesPath(getDefaultAgentId()), normalized);
|
|
88
86
|
if (fromAgent) return fromAgent;
|
|
89
87
|
const fromGlobal = readApiKeyFromProfilesFile(resolveAuthProfilesPath(), normalized);
|
|
90
88
|
if (fromGlobal) return fromGlobal;
|
|
91
89
|
return readOAuthAccessTokenSync(normalized);
|
|
92
90
|
}
|
|
93
91
|
/** Resolve one agent's private credential, then the shared credential and OAuth token. */
|
|
94
|
-
function resolveProviderApiKeyForAgentSync(provider, agentId,
|
|
92
|
+
function resolveProviderApiKeyForAgentSync(provider, agentId, _config) {
|
|
95
93
|
const normalized = provider.toLowerCase();
|
|
96
94
|
if (isOAuthOnlyProvider(normalized)) return readOAuthAccessTokenSync(normalized);
|
|
97
95
|
if (agentId?.trim()) {
|
|
98
|
-
const fromAgent = readApiKeyFromProfilesFile(resolveAgentAuthProfilesPath(
|
|
96
|
+
const fromAgent = readApiKeyFromProfilesFile(resolveAgentAuthProfilesPath(agentId.trim()), normalized);
|
|
99
97
|
if (fromAgent) return fromAgent;
|
|
100
98
|
}
|
|
101
99
|
const fromGlobal = readApiKeyFromProfilesFile(resolveAuthProfilesPath(), normalized);
|
|
@@ -108,15 +106,13 @@ function resolveProviderApiKeyForAgentSync(provider, agentId, config) {
|
|
|
108
106
|
*/
|
|
109
107
|
function hasProviderAuthOnDiskSync(provider) {
|
|
110
108
|
if (isOAuthOnlyProvider(provider.toLowerCase())) return hasOAuthTokenSync(provider);
|
|
111
|
-
|
|
112
|
-
if (hasApiKeyInProfilesFile(resolveAgentAuthProfilesPath(cfg, getDefaultAgentId(cfg)), provider)) return true;
|
|
109
|
+
if (hasApiKeyInProfilesFile(resolveAgentAuthProfilesPath(getDefaultAgentId()), provider)) return true;
|
|
113
110
|
if (hasApiKeyInProfilesFile(resolveAuthProfilesPath(), provider)) return true;
|
|
114
111
|
if (hasOAuthTokenSync(provider)) return true;
|
|
115
112
|
return false;
|
|
116
113
|
}
|
|
117
114
|
var init_sync_provider_auth = __esmMin((() => {
|
|
118
115
|
init_paths();
|
|
119
|
-
init_loader();
|
|
120
116
|
init_resolve_route();
|
|
121
117
|
init_registry();
|
|
122
118
|
}));
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { AutomationDraftOutputSchema, AutomationDraftRequestSchema, AutomationRepairDraftOutputSchema, AutomationSimulationSchema } from "../../../packages/gateway-contract/src/capabilities.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { resolveAutomationSafetyForTrust } from "../../user-context/trust-policy.js";
|
|
3
|
+
import { init_trust_policy, resolveAutomationSafetyForTrust } from "../../user-context/trust-policy.js";
|
|
4
4
|
import { getUserTrustPolicy } from "../../storage/sqlite/user-trust-repository.js";
|
|
5
|
-
import "../../storage/sqlite/index.js";
|
|
6
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
5
|
+
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
7
6
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
7
|
import { ExternalEffectNotAppliedError } from "../../capabilities/runtime/external-operations.js";
|
|
9
8
|
import { defineExternalCapability, defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
9
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
10
10
|
import { AutomationCreateCapabilityInputSchema } from "./write.js";
|
|
11
11
|
import { simulateAutomation } from "../draft/automation-draft-validator.js";
|
|
12
12
|
import { AutomationDraftService } from "../draft/automation-draft-service.js";
|
|
@@ -15,6 +15,8 @@ import { z } from "zod";
|
|
|
15
15
|
//#region src/automations/capabilities/drafts.ts
|
|
16
16
|
init_src();
|
|
17
17
|
init_agent_scope();
|
|
18
|
+
init_sqlite();
|
|
19
|
+
init_trust_policy();
|
|
18
20
|
function registerAutomationDraftCapabilities(dispatcher, service, getConfig) {
|
|
19
21
|
const policy = {
|
|
20
22
|
majorVersion: 1,
|
|
@@ -52,10 +54,9 @@ function registerAutomationDraftCapabilities(dispatcher, service, getConfig) {
|
|
|
52
54
|
input: AutomationDraftRequestSchema.extend({ prompt: z.string().trim().min(1).max(5e4) }),
|
|
53
55
|
output: z.object({ draft: AutomationDraftOutputSchema }),
|
|
54
56
|
async execute(input, context) {
|
|
55
|
-
const
|
|
56
|
-
const draft = await new AutomationDraftService({ config }).createDraft({
|
|
57
|
+
const draft = await new AutomationDraftService({ config: configuration() }).createDraft({
|
|
57
58
|
...input,
|
|
58
|
-
agentId: input.agentId ?? resolveDefaultAgentId(
|
|
59
|
+
agentId: input.agentId ?? resolveDefaultAgentId()
|
|
59
60
|
}, context.signal);
|
|
60
61
|
draft.automation.safety = { mode: resolveAutomationSafetyForTrust(getUserTrustPolicy().defaultActionLevel, draft.automation.safety?.mode) };
|
|
61
62
|
draft.simulation = simulateAutomation(draft.automation);
|
|
@@ -81,7 +82,7 @@ function registerAutomationDraftCapabilities(dispatcher, service, getConfig) {
|
|
|
81
82
|
if (!automation) throw new ExternalEffectNotAppliedError("Automation not found", { cause: new CapabilityError("NOT_FOUND", "Automation not found") });
|
|
82
83
|
const events = await service.listRunEvents(id);
|
|
83
84
|
const repair = await new AutomationDraftService({ config }).createRepairDraft({
|
|
84
|
-
agentId: agentId ?? resolveDefaultAgentId(
|
|
85
|
+
agentId: agentId ?? resolveDefaultAgentId(),
|
|
85
86
|
automation,
|
|
86
87
|
run,
|
|
87
88
|
events,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import {
|
|
3
|
+
import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
4
|
+
import { init_agent_scope } from "../../agent/agent-scope.js";
|
|
4
5
|
import { init_session_key, resolveConversationId } from "../../routing/session-key.js";
|
|
5
6
|
import { resolveAutomationTimeoutSeconds } from "../domain/defaults.js";
|
|
6
7
|
//#region src/automations/service/action-executor.ts
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type AgentCatalogCutoverResult } from '../agent-catalog/index.js';
|
|
2
|
+
export type ApplicationStateBootstrapResult = {
|
|
3
|
+
agentCatalog: AgentCatalogCutoverResult;
|
|
4
|
+
configChanged: boolean;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Bring durable application state to the current shape before strict config loading.
|
|
8
|
+
* Ordering is intentional: legacy Agent fields must leave JSON before ConfigSchema sees it.
|
|
9
|
+
*/
|
|
10
|
+
export declare function bootstrapApplicationStateSync(configPath: string): ApplicationStateBootstrapResult;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { requireXopcDatabase } from "../storage/sqlite/connection.js";
|
|
2
|
+
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
3
|
+
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
4
|
+
import { cutoverLegacyAgentConfig } from "../agent-catalog/migrations/legacy-config-cutover.js";
|
|
5
|
+
import "../agent-catalog/index.js";
|
|
6
|
+
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
7
|
+
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
8
|
+
//#region src/bootstrap/application-state.ts
|
|
9
|
+
init_sqlite();
|
|
10
|
+
/**
|
|
11
|
+
* Bring durable application state to the current shape before strict config loading.
|
|
12
|
+
* Ordering is intentional: legacy Agent fields must leave JSON before ConfigSchema sees it.
|
|
13
|
+
*/
|
|
14
|
+
function bootstrapApplicationStateSync(configPath) {
|
|
15
|
+
requireXopcDatabase();
|
|
16
|
+
const agentCatalog = cutoverLegacyAgentConfig({ configPath });
|
|
17
|
+
const configMigration = runBootstrapMigrationsSync(configPath);
|
|
18
|
+
ensureStarterAgentsInitialized();
|
|
19
|
+
new AgentCatalogService().resumePendingProvisioningSync();
|
|
20
|
+
return {
|
|
21
|
+
agentCatalog,
|
|
22
|
+
configChanged: configMigration.changed
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { bootstrapApplicationStateSync };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
|
-
import "../../storage/sqlite/index.js";
|
|
2
|
+
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
3
3
|
//#region src/browser/automations/repository.ts
|
|
4
|
+
init_sqlite();
|
|
4
5
|
const AUTOMATION_SELECT = "SELECT automation_id, revision, status, definition_json, created_at_ms, updated_at_ms FROM browser_automations";
|
|
5
6
|
const RUN_SELECT = "SELECT run_id, automation_id, automation_revision, definition_json, status, inputs_json, result_json, error, created_at_ms, started_at_ms, ended_at_ms, duration_ms FROM browser_automation_runs";
|
|
6
7
|
const parseAutomation = (row) => ({
|
|
@@ -8,8 +8,8 @@ export declare const BrowserAutomationDefinitionSchema: z.ZodObject<{
|
|
|
8
8
|
read: "read";
|
|
9
9
|
draft: "draft";
|
|
10
10
|
destructive: "destructive";
|
|
11
|
-
sensitive: "sensitive";
|
|
12
11
|
external_effect: "external_effect";
|
|
12
|
+
sensitive: "sensitive";
|
|
13
13
|
}>;
|
|
14
14
|
inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
15
15
|
type: z.ZodEnum<{
|
|
@@ -25,7 +25,7 @@ export declare class BrowserAutomationService {
|
|
|
25
25
|
id: string;
|
|
26
26
|
name: string;
|
|
27
27
|
allowedDomains: string[];
|
|
28
|
-
risk: "read" | "draft" | "destructive" | "
|
|
28
|
+
risk: "read" | "draft" | "destructive" | "external_effect" | "sensitive";
|
|
29
29
|
inputs: Record<string, {
|
|
30
30
|
type: "string" | "number" | "boolean";
|
|
31
31
|
required?: boolean;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { closeXopcDatabase, init_connection, openXopcDatabase } from "../storage/sqlite/connection.js";
|
|
2
2
|
import { browserPairingInvitationPayloadSchema, formatBrowserPairingInvitation } from "../../packages/gateway-contract/src/device-pairing.js";
|
|
3
3
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
|
-
import { getGatewayIdentityPublicKeyRaw, getOrCreateGatewayIdentity } from "../storage/sqlite/gateway-identity-repository.js";
|
|
5
|
-
import { createDevicePairingSetup } from "../storage/sqlite/device-pairing-repository.js";
|
|
6
|
-
import {
|
|
4
|
+
import { getGatewayIdentityPublicKeyRaw, getOrCreateGatewayIdentity, init_gateway_identity_repository } from "../storage/sqlite/gateway-identity-repository.js";
|
|
5
|
+
import { createDevicePairingSetup, init_device_pairing_repository } from "../storage/sqlite/device-pairing-repository.js";
|
|
6
|
+
import { loadConfig } from "../config/loader.js";
|
|
7
7
|
import { browserEnrollmentPublicKeyThumbprint } from "./enrollment.js";
|
|
8
8
|
import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "./extension-identity.js";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
//#region src/browser/native-messaging-host.ts
|
|
11
11
|
init_src();
|
|
12
|
-
init_loader();
|
|
13
12
|
init_connection();
|
|
13
|
+
init_device_pairing_repository();
|
|
14
|
+
init_gateway_identity_repository();
|
|
14
15
|
function gatewayLoopbackUrl(port) {
|
|
15
16
|
return `http://127.0.0.1:${port}`;
|
|
16
17
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { deleteBrowserTabBindingsByPrincipal, getBrowserTabBindingById } from "../../storage/sqlite/browser-tab-binding-repository.js";
|
|
4
|
-
import { getDevice } from "../../storage/sqlite/device-access-repository.js";
|
|
3
|
+
import { deleteBrowserTabBindingsByPrincipal, getBrowserTabBindingById, init_browser_tab_binding_repository } from "../../storage/sqlite/browser-tab-binding-repository.js";
|
|
4
|
+
import { getDevice, init_device_access_repository } from "../../storage/sqlite/device-access-repository.js";
|
|
5
5
|
import { browserWireAuthenticationPayload } from "../../../packages/browser-control-contract/src/index.js";
|
|
6
6
|
import { isChromeExtensionOrigin } from "../../gateway/security/origin-check.js";
|
|
7
7
|
import crypto from "node:crypto";
|
|
@@ -13,6 +13,8 @@ import crypto from "node:crypto";
|
|
|
13
13
|
* Commands are sent over the WS connection and results are returned asynchronously.
|
|
14
14
|
*/
|
|
15
15
|
init_logger();
|
|
16
|
+
init_device_access_repository();
|
|
17
|
+
init_browser_tab_binding_repository();
|
|
16
18
|
const log = createLogger("ExtensionProvider");
|
|
17
19
|
const DEFAULT_PORT = 19820;
|
|
18
20
|
const DEFAULT_HOST = "127.0.0.1";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { getBrowserTabBindingById } from "../../storage/sqlite/browser-tab-binding-repository.js";
|
|
1
|
+
import { getBrowserTabBindingById, init_browser_tab_binding_repository } from "../../storage/sqlite/browser-tab-binding-repository.js";
|
|
2
2
|
import { BROWSER_CONTROL_ENDPOINT_TOOL_NAME } from "../../../packages/browser-control-contract/src/index.js";
|
|
3
3
|
import crypto from "node:crypto";
|
|
4
4
|
//#region src/browser/providers/realtime-extension.ts
|
|
5
|
+
init_browser_tab_binding_repository();
|
|
5
6
|
var RealtimeExtensionBrowserProvider = class {
|
|
6
7
|
name = "extension";
|
|
7
8
|
connectionTimeout;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
1
2
|
import { getAgentDefaultImageGenerationModelConfig, getAgentDefaultImageModelConfig, init_schema, parseModelRef } from "../../config/schema.js";
|
|
2
3
|
import { init_model_policy, isComputerModel, isDedicatedComputerProfile } from "../../computer/model-policy.js";
|
|
3
4
|
import { getModelCatalogStore, init_model_catalog_store } from "../../providers/model-catalog-store.js";
|
|
@@ -7,6 +8,7 @@ import { DEFAULT_LOCAL_VOICE_MODEL_ID, hasInstalledLocalVoiceModel } from "../..
|
|
|
7
8
|
import { planCapabilities } from "./planner.js";
|
|
8
9
|
//#region src/capabilities/readiness/from-config.ts
|
|
9
10
|
init_model_policy();
|
|
11
|
+
init_repository();
|
|
10
12
|
init_schema();
|
|
11
13
|
init_model_catalog_store();
|
|
12
14
|
init_providers();
|
|
@@ -15,13 +17,14 @@ function buildCapabilityPlansForConfig(config, options = {}) {
|
|
|
15
17
|
const cloud = catalog.sources["xopc-cloud"];
|
|
16
18
|
const providerReady = options.providerReady ?? defaultProviderReady;
|
|
17
19
|
const cloudReady = providerReady("xopc-cloud");
|
|
18
|
-
const
|
|
20
|
+
const agentCatalog = new AgentCatalogRepository().snapshot();
|
|
21
|
+
const agentId = agentCatalog.defaultAgentId;
|
|
19
22
|
const stt = config.tools?.media?.audio;
|
|
20
23
|
const tts = config.messages?.tts;
|
|
21
24
|
const policies = {
|
|
22
|
-
vision: { explicit: refs(getAgentDefaultImageModelConfig(
|
|
23
|
-
"computer-use": { explicit: refs(
|
|
24
|
-
"image-generation": { explicit: refs(getAgentDefaultImageGenerationModelConfig(
|
|
25
|
+
vision: { explicit: refs(getAgentDefaultImageModelConfig()) },
|
|
26
|
+
"computer-use": { explicit: refs(agentCatalog.defaults.models.computerUse) },
|
|
27
|
+
"image-generation": { explicit: refs(getAgentDefaultImageGenerationModelConfig(agentId)) },
|
|
25
28
|
stt: {
|
|
26
29
|
disabled: stt?.enabled === false,
|
|
27
30
|
explicit: stt ? sttRefs(stt) : void 0
|
|
@@ -58,6 +58,7 @@ export declare class CapabilityDispatcher {
|
|
|
58
58
|
private visible;
|
|
59
59
|
list(context: CapabilityContext): CapabilityDescriptor[];
|
|
60
60
|
describe(id: string, context: CapabilityContext): CapabilityDescriptor;
|
|
61
|
+
validateInput(id: string, input: unknown, context: CapabilityContext): Promise<unknown>;
|
|
61
62
|
call(id: string, input: unknown, context: CapabilityContext, expected?: {
|
|
62
63
|
majorVersion: number;
|
|
63
64
|
descriptorDigest: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SqliteCommitEffectError, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
|
+
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
2
3
|
import { CapabilityError } from "./errors.js";
|
|
3
4
|
import { executeExternalOperation } from "./external-operations.js";
|
|
4
|
-
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/capabilities/runtime/dispatcher.ts
|
|
@@ -67,15 +67,21 @@ var CapabilityDispatcher = class {
|
|
|
67
67
|
if (!entry || !this.visible(entry.definition, context)) throw new CapabilityError("NOT_FOUND", "Capability not available");
|
|
68
68
|
return structuredClone(entry.descriptor);
|
|
69
69
|
}
|
|
70
|
-
async
|
|
71
|
-
|
|
72
|
-
if (expected && (expected.majorVersion !== descriptor.majorVersion || expected.descriptorDigest !== descriptor.descriptorDigest)) throw new CapabilityError("CONTRACT_CHANGED", "Capability contract changed; describe it again");
|
|
70
|
+
async validateInput(id, input, context) {
|
|
71
|
+
this.describe(id, context);
|
|
73
72
|
const { definition } = this.entries.get(id);
|
|
74
73
|
const parsed = definition.input.safeParse(input);
|
|
75
74
|
if (!parsed.success) throw new CapabilityError("INVALID_INPUT", parsed.error.message);
|
|
76
75
|
if (!await context.authorize(id, parsed.data)) throw new CapabilityError("FORBIDDEN", "Capability resource access denied");
|
|
77
76
|
context.assertCurrent?.();
|
|
78
77
|
if (context.signal?.aborted) throw new CapabilityError("CANCELLED", "Capability call cancelled");
|
|
78
|
+
return parsed.data;
|
|
79
|
+
}
|
|
80
|
+
async call(id, input, context, expected) {
|
|
81
|
+
const descriptor = this.describe(id, context);
|
|
82
|
+
if (expected && (expected.majorVersion !== descriptor.majorVersion || expected.descriptorDigest !== descriptor.descriptorDigest)) throw new CapabilityError("CONTRACT_CHANGED", "Capability contract changed; describe it again");
|
|
83
|
+
const { definition } = this.entries.get(id);
|
|
84
|
+
const parsed = { data: await this.validateInput(id, input, context) };
|
|
79
85
|
if (definition.effect === "external-write") {
|
|
80
86
|
const key = expected?.idempotencyKey;
|
|
81
87
|
if (!key?.trim() || key.length > 200) throw new CapabilityError("INVALID_INPUT", "A stable idempotencyKey is required");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CapabilityError } from "./errors.js";
|
|
2
2
|
import { CapabilityDispatcher } from "./dispatcher.js";
|
|
3
|
+
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
3
4
|
import { registerLocalAppReadCapabilities } from "../../local-apps/capabilities/read.js";
|
|
4
5
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
5
6
|
import { registerNoteWriteCapabilities } from "../../notes/capabilities/write.js";
|
|
@@ -23,6 +24,7 @@ function createProductDispatcher(getNotes, taskWrites) {
|
|
|
23
24
|
const dispatcher = new CapabilityDispatcher();
|
|
24
25
|
registerSettingsCapability(dispatcher);
|
|
25
26
|
registerAppContextCapability(dispatcher);
|
|
27
|
+
registerAgentCapabilities(dispatcher);
|
|
26
28
|
if (taskWrites?.getSceneAccess) {
|
|
27
29
|
registerSceneReadCapabilities(dispatcher, taskWrites.getSceneAccess);
|
|
28
30
|
registerSceneWriteCapabilities(dispatcher, taskWrites.getSceneAccess);
|