@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
|
@@ -2,23 +2,23 @@ import { resolveStateDir } from "../config/paths-state.js";
|
|
|
2
2
|
import { createLogger } from "../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../utils/logger.js";
|
|
4
4
|
import { isXopcDatabaseOpen } from "../storage/sqlite/connection.js";
|
|
5
|
-
import { consumeClarificationApproval } from "../storage/sqlite/clarification-wait-repository.js";
|
|
5
|
+
import { consumeClarificationApproval, init_clarification_wait_repository } from "../storage/sqlite/clarification-wait-repository.js";
|
|
6
6
|
import { getInteractionState } from "../storage/sqlite/interaction-state-repository.js";
|
|
7
7
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
8
|
-
import "../storage/sqlite/index.js";
|
|
8
|
+
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
9
|
+
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
10
|
+
import { init_agent_scope, listAgentEntries, resolveAgentProfileDir } from "./agent-scope.js";
|
|
11
|
+
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
12
|
+
import { extractTextContent } from "./context/workspace.js";
|
|
9
13
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
10
14
|
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
11
|
-
import { expandWorkspacePathString, init_workspace_path } from "../config/workspace-path.js";
|
|
12
|
-
import { init_agent_scope, resolveAgentProfileDir } from "./agent-scope.js";
|
|
13
15
|
import { getConversationRouting } from "../storage/sqlite/conversation-repository.js";
|
|
14
16
|
import { init_session_key } from "../routing/session-key.js";
|
|
15
17
|
import { resolveEffectiveAgentProfile, resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
16
|
-
import { init_paths, resolveBundledSkillsDir } from "../config/paths.js";
|
|
17
18
|
import { init_sync_provider_auth, resolveProviderApiKeySync } from "../auth/sync-provider-auth.js";
|
|
18
19
|
import { CredentialResolver, init_credentials } from "../auth/credentials.js";
|
|
19
20
|
import { getApiKeySync, getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
20
21
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
21
|
-
import { extractTextContent } from "./context/workspace.js";
|
|
22
22
|
import { buildExecutionScopeContextForPrompt } from "./context/execution-scope.js";
|
|
23
23
|
import { clearBootstrapSnapshot } from "./bootstrap/bootstrap-cache.js";
|
|
24
24
|
import { resolveBootstrapContextSync } from "./bootstrap/bootstrap-files.js";
|
|
@@ -68,6 +68,8 @@ init_sync_provider_auth();
|
|
|
68
68
|
init_providers();
|
|
69
69
|
init_credentials();
|
|
70
70
|
init_paths();
|
|
71
|
+
init_clarification_wait_repository();
|
|
72
|
+
init_sqlite();
|
|
71
73
|
init_session_key();
|
|
72
74
|
const log = createLogger("AgentManager");
|
|
73
75
|
var AgentManager = class {
|
|
@@ -173,22 +175,20 @@ var AgentManager = class {
|
|
|
173
175
|
return resolveUserContextSessionAccess(this.config.config, conversationId).userModel;
|
|
174
176
|
}
|
|
175
177
|
computeBaseWorkspacePath() {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
return resolveEffectiveAgentProfileForSession(cfg, null).resolvedWorkspacePath;
|
|
178
|
+
if (!this.config.config) return expandWorkspacePathString(this.config.workspace);
|
|
179
|
+
return resolveEffectiveAgentProfileForSession(null).resolvedWorkspacePath;
|
|
179
180
|
}
|
|
180
181
|
/**
|
|
181
182
|
* Workspace root for inbound attachments / side effects for this session's agent id.
|
|
182
183
|
* Uses in-memory session workspace overrides when the session has a persisted `workingDirectoryOverride`.
|
|
183
184
|
*/
|
|
184
185
|
getResolvedWorkspaceForSession(conversationId) {
|
|
185
|
-
const cfg = this.config.config;
|
|
186
186
|
const fromMap = this.sessionWorkspaceOverrides.get(conversationId);
|
|
187
187
|
if (fromMap !== void 0) return fromMap;
|
|
188
|
-
return resolveEffectiveAgentProfileForSession(
|
|
188
|
+
return resolveEffectiveAgentProfileForSession(conversationId).resolvedWorkspacePath;
|
|
189
189
|
}
|
|
190
190
|
getWorkspaceRuntimeForSession(conversationId) {
|
|
191
|
-
const profile = resolveEffectiveAgentProfileForSession(
|
|
191
|
+
const profile = resolveEffectiveAgentProfileForSession(conversationId);
|
|
192
192
|
const resolvedPath = conversationId ? this.getResolvedWorkspaceForSession(conversationId) : this.baseWorkspacePath;
|
|
193
193
|
return this.workspaceRuntimes.getOrCreate(resolvedPath, profile.agentId);
|
|
194
194
|
}
|
|
@@ -205,7 +205,7 @@ var AgentManager = class {
|
|
|
205
205
|
}
|
|
206
206
|
pickDefaultModelRef() {
|
|
207
207
|
const cfg = this.mergedConfig();
|
|
208
|
-
return getAgentDefaultModelRef(
|
|
208
|
+
return getAgentDefaultModelRef()?.trim() || getDefaultModelSync(cfg);
|
|
209
209
|
}
|
|
210
210
|
resolveModelStringToModel(modelRef) {
|
|
211
211
|
try {
|
|
@@ -220,7 +220,7 @@ var AgentManager = class {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
/**
|
|
223
|
-
*
|
|
223
|
+
* Refresh config-backed services and SQLite-backed Agent defaults after a settings change.
|
|
224
224
|
*
|
|
225
225
|
* The previous implementation rebuilt the entire `AgentToolsFactory` (80+ lines
|
|
226
226
|
* of dependency wiring) on every reload. The factory's deps are now built from
|
|
@@ -229,9 +229,9 @@ var AgentManager = class {
|
|
|
229
229
|
* reconstruction. The browser is still shut down because its cached settings
|
|
230
230
|
* (headless mode, backend choice) come from the config snapshot at connect time.
|
|
231
231
|
*/
|
|
232
|
-
|
|
232
|
+
updateRuntimeConfiguration(config) {
|
|
233
233
|
this.config.config = config;
|
|
234
|
-
const ref = getAgentDefaultModelRef(
|
|
234
|
+
const ref = getAgentDefaultModelRef();
|
|
235
235
|
this.config.model = ref;
|
|
236
236
|
this.defaultModel = ref || getDefaultModelSync(config);
|
|
237
237
|
this.baseWorkspacePath = this.computeBaseWorkspacePath();
|
|
@@ -252,9 +252,8 @@ var AgentManager = class {
|
|
|
252
252
|
hookRunner: this.config.hookRunner,
|
|
253
253
|
bus: this.config.bus,
|
|
254
254
|
toolExecutorConfig: { resolveTimeoutMs: (toolName) => {
|
|
255
|
-
const config = this.mergedConfig();
|
|
256
255
|
const conversationId = this.config.getCurrentContext?.()?.conversationId;
|
|
257
|
-
return resolveEffectiveAgentProfileForSession(
|
|
256
|
+
return resolveEffectiveAgentProfileForSession(conversationId).config.tools[toolName]?.timeoutMs;
|
|
258
257
|
} },
|
|
259
258
|
getConfig: () => this.mergedConfig(),
|
|
260
259
|
getPrimaryModel: () => this.resolveModelStringToModel(this.pickDefaultModelRef()),
|
|
@@ -270,8 +269,10 @@ var AgentManager = class {
|
|
|
270
269
|
getProjectService: this.config.getProjectService,
|
|
271
270
|
getWorkDiscovery: this.config.getWorkDiscovery,
|
|
272
271
|
getLocalAppService: this.config.getLocalAppService,
|
|
272
|
+
getChatPreviewService: this.config.getChatPreviewService,
|
|
273
273
|
dispatchTaskEvents: this.config.dispatchTaskEvents,
|
|
274
274
|
dispatchTaskRuns: this.config.dispatchTaskRuns,
|
|
275
|
+
onAgentCatalogMutate: this.config.onAgentCatalogMutate,
|
|
275
276
|
getWorkflowRunService: this.config.getWorkflowRunService,
|
|
276
277
|
getSkillIndexingContext: () => {
|
|
277
278
|
const ctx = this.config.getCurrentContext?.();
|
|
@@ -312,11 +313,11 @@ var AgentManager = class {
|
|
|
312
313
|
const cfg = this.config.config;
|
|
313
314
|
if (!cfg || !isMemorySubsystemEnabled(cfg)) return;
|
|
314
315
|
const resolvedPath = this.getResolvedWorkspaceForSession(conversationId);
|
|
315
|
-
const profile = resolveEffectiveAgentProfileForSession(
|
|
316
|
+
const profile = resolveEffectiveAgentProfileForSession(conversationId);
|
|
316
317
|
const runtime = this.workspaceRuntimes.getOrCreate(resolvedPath, profile.agentId);
|
|
317
318
|
await runtime.memoryManager.initializeAll(conversationId, {
|
|
318
319
|
workspace: resolvedPath,
|
|
319
|
-
agentWorkspace: resolveAgentProfileDir(
|
|
320
|
+
agentWorkspace: resolveAgentProfileDir(profile.agentId),
|
|
320
321
|
agentId: profile.agentId,
|
|
321
322
|
sessionId: conversationId
|
|
322
323
|
});
|
|
@@ -435,7 +436,6 @@ var AgentManager = class {
|
|
|
435
436
|
}
|
|
436
437
|
}
|
|
437
438
|
buildSystemPromptForInstance(instance, registeredToolNames = instance.registeredToolNames, activeCapabilityNames = this.activeCapabilityNames(instance)) {
|
|
438
|
-
const cfg = this.config.config;
|
|
439
439
|
const resolvedWorkspacePath = this.getResolvedWorkspaceForSession(instance.conversationId);
|
|
440
440
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedWorkspacePath, instance.effectiveProfile.agentId);
|
|
441
441
|
const contextFiles = this.resolveContextFilesForSession(instance.conversationId, instance.effectiveProfile);
|
|
@@ -444,7 +444,7 @@ var AgentManager = class {
|
|
|
444
444
|
return rt.systemPromptBuilder.build(contextFiles, {
|
|
445
445
|
externalMemoryInstructions: this.buildExternalMemoryInstructions(instance.conversationId, rt),
|
|
446
446
|
workspaceOverride: resolvedWorkspacePath,
|
|
447
|
-
profileMarkdownPathRoot: resolveAgentProfileDir(
|
|
447
|
+
profileMarkdownPathRoot: resolveAgentProfileDir(instance.effectiveProfile.agentId),
|
|
448
448
|
customInstructions: instance.effectiveProfile.customInstructions,
|
|
449
449
|
skillAllowlist: instance.effectiveProfile.skillsAllowlist,
|
|
450
450
|
registeredToolNames,
|
|
@@ -488,7 +488,7 @@ var AgentManager = class {
|
|
|
488
488
|
}
|
|
489
489
|
resolveContextFilesForSession(conversationId, profile, excludeHeartbeat) {
|
|
490
490
|
const cfg = this.config.config;
|
|
491
|
-
const profileDir = resolveAgentProfileDir(
|
|
491
|
+
const profileDir = resolveAgentProfileDir(profile.agentId);
|
|
492
492
|
const heartbeatEnabled = cfg.gateway?.heartbeat?.includeSystemPromptSection ?? false;
|
|
493
493
|
const contextInjection = "always";
|
|
494
494
|
const { contextFiles } = resolveBootstrapContextSync({
|
|
@@ -552,17 +552,16 @@ var AgentManager = class {
|
|
|
552
552
|
};
|
|
553
553
|
}
|
|
554
554
|
buildAgentSkillAvailability(unresolvedProfile, workspaceDir, registeredToolNames) {
|
|
555
|
-
const cfg = this.config.config;
|
|
556
555
|
const rt = this.workspaceRuntimes.getOrCreate(workspaceDir, unresolvedProfile.agentId);
|
|
557
556
|
const profile = this.materializeSkillAllowlist(unresolvedProfile, rt);
|
|
558
|
-
const entry =
|
|
557
|
+
const entry = listAgentEntries().find((agent) => agent.enabled !== false && agent.id.toLowerCase() === profile.agentId.toLowerCase());
|
|
559
558
|
const skillsConfig = createSkillConfigManager(resolveStateDir()).load();
|
|
560
559
|
const lock = loadSkillsLock();
|
|
561
560
|
const workspaceLock = loadSkillsLock(resolveWorkspaceSkillsLockPath(workspaceDir));
|
|
562
561
|
const allow = profile.skillsAllowlist === void 0 ? void 0 : new Set(profile.skillsAllowlist.map((s) => s.toLowerCase()));
|
|
563
562
|
const tools = registeredToolNames ?? this.toolsFactory.createAllTools({
|
|
564
563
|
workspace: workspaceDir,
|
|
565
|
-
profileMarkdownRoot: resolveAgentProfileDir(
|
|
564
|
+
profileMarkdownRoot: resolveAgentProfileDir(profile.agentId),
|
|
566
565
|
agentId: profile.agentId,
|
|
567
566
|
disabledTools: profile.tools.denied,
|
|
568
567
|
getMemoryManager: () => rt.memoryManager,
|
|
@@ -606,11 +605,11 @@ var AgentManager = class {
|
|
|
606
605
|
};
|
|
607
606
|
}
|
|
608
607
|
getAgentSkillAvailability(agentId) {
|
|
609
|
-
const profile = resolveEffectiveAgentProfile(
|
|
608
|
+
const profile = resolveEffectiveAgentProfile(agentId);
|
|
610
609
|
return this.buildAgentSkillAvailability(profile, profile.resolvedWorkspacePath);
|
|
611
610
|
}
|
|
612
611
|
getSessionSkillAvailability(conversationId) {
|
|
613
|
-
const profile = resolveEffectiveAgentProfileForSession(
|
|
612
|
+
const profile = resolveEffectiveAgentProfileForSession(conversationId);
|
|
614
613
|
return this.buildAgentSkillAvailability(profile, this.getResolvedWorkspaceForSession(conversationId), this.agents.get(conversationId)?.registeredToolNames);
|
|
615
614
|
}
|
|
616
615
|
getSessionWorkspaceTrust(conversationId) {
|
|
@@ -643,7 +642,6 @@ var AgentManager = class {
|
|
|
643
642
|
* After ~/.xopc/skills.json changes (enable/disable), refresh `<available_skills>` on active agents.
|
|
644
643
|
*/
|
|
645
644
|
refreshSkillsAfterSkillConfigChange() {
|
|
646
|
-
const cfg = this.config.config;
|
|
647
645
|
for (const rt of this.workspaceRuntimes.values()) rt.skillManager.refreshPromptFromConfig();
|
|
648
646
|
for (const instance of this.agents.values()) {
|
|
649
647
|
const resolvedWorkspacePath = this.getResolvedWorkspaceForSession(instance.conversationId);
|
|
@@ -653,7 +651,7 @@ var AgentManager = class {
|
|
|
653
651
|
const newPrompt = rt.systemPromptBuilder.build(contextFiles, {
|
|
654
652
|
externalMemoryInstructions: this.buildExternalMemoryInstructions(instance.conversationId, rt),
|
|
655
653
|
workspaceOverride: resolvedWorkspacePath,
|
|
656
|
-
profileMarkdownPathRoot: resolveAgentProfileDir(
|
|
654
|
+
profileMarkdownPathRoot: resolveAgentProfileDir(instance.effectiveProfile.agentId),
|
|
657
655
|
customInstructions: instance.effectiveProfile.customInstructions,
|
|
658
656
|
skillAllowlist: instance.effectiveProfile.skillsAllowlist,
|
|
659
657
|
registeredToolNames: instance.registeredToolNames,
|
|
@@ -718,7 +716,6 @@ var AgentManager = class {
|
|
|
718
716
|
}, 250);
|
|
719
717
|
}
|
|
720
718
|
applySkillsAfterDiskChange(reason = "disk") {
|
|
721
|
-
const cfg = this.config.config;
|
|
722
719
|
for (const rt of this.workspaceRuntimes.values()) rt.skillManager.reload(reason);
|
|
723
720
|
for (const instance of this.agents.values()) {
|
|
724
721
|
const resolvedWorkspacePath = this.getResolvedWorkspaceForSession(instance.conversationId);
|
|
@@ -728,7 +725,7 @@ var AgentManager = class {
|
|
|
728
725
|
const newPrompt = rt.systemPromptBuilder.rebuild(contextFiles, {
|
|
729
726
|
externalMemoryInstructions: this.buildExternalMemoryInstructions(instance.conversationId, rt),
|
|
730
727
|
workspaceOverride: resolvedWorkspacePath,
|
|
731
|
-
profileMarkdownPathRoot: resolveAgentProfileDir(
|
|
728
|
+
profileMarkdownPathRoot: resolveAgentProfileDir(instance.effectiveProfile.agentId),
|
|
732
729
|
customInstructions: instance.effectiveProfile.customInstructions,
|
|
733
730
|
skillAllowlist: instance.effectiveProfile.skillsAllowlist,
|
|
734
731
|
registeredToolNames: instance.registeredToolNames,
|
|
@@ -746,7 +743,6 @@ var AgentManager = class {
|
|
|
746
743
|
* Get or create an Agent instance for a session
|
|
747
744
|
*/
|
|
748
745
|
getOrCreateAgent(conversationId) {
|
|
749
|
-
const cfg = this.config.config;
|
|
750
746
|
const targetPath = this.getResolvedWorkspaceForSession(conversationId);
|
|
751
747
|
const existing = this.agents.get(conversationId);
|
|
752
748
|
if (existing) if (existing.resolvedWorkspacePath !== targetPath) this.removeAgent(conversationId);
|
|
@@ -756,7 +752,7 @@ var AgentManager = class {
|
|
|
756
752
|
log.debug({ conversationId }, "Reusing existing agent instance");
|
|
757
753
|
return existing.agent;
|
|
758
754
|
}
|
|
759
|
-
let profile = resolveEffectiveAgentProfileForSession(
|
|
755
|
+
let profile = resolveEffectiveAgentProfileForSession(conversationId);
|
|
760
756
|
const resolvedPath = targetPath;
|
|
761
757
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedPath, profile.agentId);
|
|
762
758
|
profile = this.materializeSkillAllowlist(profile, rt);
|
|
@@ -794,7 +790,7 @@ var AgentManager = class {
|
|
|
794
790
|
return agent;
|
|
795
791
|
}
|
|
796
792
|
createAgentTurnPolicy(conversationId) {
|
|
797
|
-
const profile = this.agents.get(conversationId)?.effectiveProfile ?? resolveEffectiveAgentProfileForSession(
|
|
793
|
+
const profile = this.agents.get(conversationId)?.effectiveProfile ?? resolveEffectiveAgentProfileForSession(conversationId);
|
|
798
794
|
return this.buildAgentTurnPolicy(conversationId, profile);
|
|
799
795
|
}
|
|
800
796
|
/**
|
|
@@ -855,7 +851,6 @@ var AgentManager = class {
|
|
|
855
851
|
if (!trimmed) return;
|
|
856
852
|
const instance = this.agents.get(conversationId);
|
|
857
853
|
if (!instance) return;
|
|
858
|
-
const cfg = this.config.config;
|
|
859
854
|
const resolvedWorkspacePath = this.getResolvedWorkspaceForSession(conversationId);
|
|
860
855
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedWorkspacePath, instance.effectiveProfile.agentId);
|
|
861
856
|
const contextFiles = this.resolveContextFilesForSession(conversationId, instance.effectiveProfile);
|
|
@@ -865,7 +860,7 @@ var AgentManager = class {
|
|
|
865
860
|
replaceAgentSystemPrompt(instance.agent, rt.systemPromptBuilder.build(contextFiles, {
|
|
866
861
|
externalMemoryInstructions: this.buildExternalMemoryInstructions(conversationId, rt),
|
|
867
862
|
workspaceOverride: resolvedWorkspacePath,
|
|
868
|
-
profileMarkdownPathRoot: resolveAgentProfileDir(
|
|
863
|
+
profileMarkdownPathRoot: resolveAgentProfileDir(instance.effectiveProfile.agentId),
|
|
869
864
|
customInstructions: instance.effectiveProfile.customInstructions,
|
|
870
865
|
skillAllowlist: instance.effectiveProfile.skillsAllowlist,
|
|
871
866
|
registeredToolNames: instance.registeredToolNames,
|
|
@@ -965,7 +960,7 @@ var AgentManager = class {
|
|
|
965
960
|
const contextFiles = this.resolveContextFilesForSession(conversationId, profile);
|
|
966
961
|
const tools = this.toolsFactory.createAllTools({
|
|
967
962
|
workspace: resolvedWorkspacePath,
|
|
968
|
-
profileMarkdownRoot: resolveAgentProfileDir(
|
|
963
|
+
profileMarkdownRoot: resolveAgentProfileDir(profile.agentId),
|
|
969
964
|
agentId: profile.agentId,
|
|
970
965
|
conversationId,
|
|
971
966
|
disabledTools: profile.tools.denied,
|
|
@@ -983,7 +978,7 @@ var AgentManager = class {
|
|
|
983
978
|
systemPrompt: rt.systemPromptBuilder.build(contextFiles, {
|
|
984
979
|
externalMemoryInstructions: this.buildExternalMemoryInstructions(conversationId, rt),
|
|
985
980
|
workspaceOverride: resolvedWorkspacePath,
|
|
986
|
-
profileMarkdownPathRoot: resolveAgentProfileDir(
|
|
981
|
+
profileMarkdownPathRoot: resolveAgentProfileDir(profile.agentId),
|
|
987
982
|
customInstructions: profile.customInstructions,
|
|
988
983
|
skillAllowlist: profile.skillsAllowlist,
|
|
989
984
|
registeredToolNames,
|
|
@@ -1014,7 +1009,7 @@ var AgentManager = class {
|
|
|
1014
1009
|
};
|
|
1015
1010
|
}
|
|
1016
1011
|
buildAgentTurnPolicy(conversationId, profile) {
|
|
1017
|
-
const currentProfile = () => resolveEffectiveAgentProfileForSession(
|
|
1012
|
+
const currentProfile = () => resolveEffectiveAgentProfileForSession(conversationId);
|
|
1018
1013
|
return createAgentTurnPolicy({
|
|
1019
1014
|
maxTurns: profile.config.runtime.maxTurns,
|
|
1020
1015
|
maxToolFailures: profile.config.runtime.maxToolFailuresPerTurn,
|
|
@@ -1155,7 +1150,6 @@ var AgentManager = class {
|
|
|
1155
1150
|
const interactionStateVersion = this.getInteractionStateVersion(instance.conversationId);
|
|
1156
1151
|
const userContextAccessVersion = this.getUserContextAccessVersion(instance.conversationId);
|
|
1157
1152
|
if (!force && nextProjectContext === instance.activeProjectContext && interactionStateVersion === instance.interactionStateVersion && userContextAccessVersion === instance.userContextAccessVersion) return;
|
|
1158
|
-
const cfg = this.config.config;
|
|
1159
1153
|
const resolvedWorkspacePath = this.getResolvedWorkspaceForSession(instance.conversationId);
|
|
1160
1154
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedWorkspacePath, instance.effectiveProfile.agentId);
|
|
1161
1155
|
const contextFiles = this.resolveContextFilesForSession(instance.conversationId, instance.effectiveProfile);
|
|
@@ -1164,7 +1158,7 @@ var AgentManager = class {
|
|
|
1164
1158
|
replaceAgentSystemPrompt(instance.agent, rt.systemPromptBuilder.build(contextFiles, {
|
|
1165
1159
|
externalMemoryInstructions: this.buildExternalMemoryInstructions(instance.conversationId, rt),
|
|
1166
1160
|
workspaceOverride: resolvedWorkspacePath,
|
|
1167
|
-
profileMarkdownPathRoot: resolveAgentProfileDir(
|
|
1161
|
+
profileMarkdownPathRoot: resolveAgentProfileDir(instance.effectiveProfile.agentId),
|
|
1168
1162
|
customInstructions: instance.effectiveProfile.customInstructions,
|
|
1169
1163
|
skillAllowlist: instance.effectiveProfile.skillsAllowlist,
|
|
1170
1164
|
registeredToolNames: instance.registeredToolNames,
|
|
@@ -1195,7 +1189,6 @@ var AgentManager = class {
|
|
|
1195
1189
|
try {
|
|
1196
1190
|
const model = resolveModel(modelId);
|
|
1197
1191
|
instance.agent.state.model = model;
|
|
1198
|
-
const cfg = this.config.config;
|
|
1199
1192
|
const resolvedWorkspacePath = this.getResolvedWorkspaceForSession(conversationId);
|
|
1200
1193
|
const rt = this.workspaceRuntimes.getOrCreate(resolvedWorkspacePath, instance.effectiveProfile.agentId);
|
|
1201
1194
|
const contextFiles = this.resolveContextFilesForSession(conversationId, instance.effectiveProfile);
|
|
@@ -1204,7 +1197,7 @@ var AgentManager = class {
|
|
|
1204
1197
|
replaceAgentSystemPrompt(instance.agent, rt.systemPromptBuilder.build(contextFiles, {
|
|
1205
1198
|
externalMemoryInstructions: this.buildExternalMemoryInstructions(conversationId, rt),
|
|
1206
1199
|
workspaceOverride: resolvedWorkspacePath,
|
|
1207
|
-
profileMarkdownPathRoot: resolveAgentProfileDir(
|
|
1200
|
+
profileMarkdownPathRoot: resolveAgentProfileDir(instance.effectiveProfile.agentId),
|
|
1208
1201
|
customInstructions: instance.effectiveProfile.customInstructions,
|
|
1209
1202
|
skillAllowlist: instance.effectiveProfile.skillsAllowlist,
|
|
1210
1203
|
registeredToolNames: instance.registeredToolNames,
|
|
@@ -1,54 +1,25 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export declare const DEFAULT_AGENT_ID = "main";
|
|
6
|
-
/** Normalized id segment safe for directory names under `agents/<id>/`. */
|
|
7
|
-
export declare const STRICT_AGENT_ID_RE: RegExp;
|
|
8
|
-
/** Path-safe agent id. */
|
|
9
|
-
export declare function normalizeAgentId(value: string | undefined | null): string;
|
|
10
|
-
/** Derive a folder-safe id, including for display names with no ASCII characters. */
|
|
11
|
-
export declare function deriveAgentIdFromDisplayName(displayName: string): string;
|
|
12
|
-
/**
|
|
13
|
-
* Validate agent id for new agents (folder-safe path segment).
|
|
14
|
-
* When `explicitId` is set, it must already match {@link STRICT_AGENT_ID_RE} (case-insensitive input, stored lowercase).
|
|
15
|
-
* When omitted, id is derived from `displayNameForDerivation`, with a stable hashed fallback
|
|
16
|
-
* for names that contain no ASCII id characters.
|
|
17
|
-
*/
|
|
18
|
-
export declare function validateAgentIdForNewAgent(explicitId: string | undefined | null, displayNameForDerivation: string): {
|
|
19
|
-
ok: true;
|
|
20
|
-
agentId: string;
|
|
21
|
-
} | {
|
|
22
|
-
ok: false;
|
|
23
|
-
error: string;
|
|
24
|
-
};
|
|
1
|
+
/** Agent path and list resolution backed by the SQLite Agent catalog. */
|
|
2
|
+
import type { AgentEntry } from '../agent-config/index.js';
|
|
3
|
+
import { DEFAULT_AGENT_ID, deriveAgentIdFromDisplayName, normalizeAgentId, STRICT_AGENT_ID_RE, validateAgentIdForNewAgent } from '../agent-catalog/id.js';
|
|
4
|
+
export { DEFAULT_AGENT_ID, deriveAgentIdFromDisplayName, normalizeAgentId, STRICT_AGENT_ID_RE, validateAgentIdForNewAgent, };
|
|
25
5
|
/** Expand `~` and resolve to an absolute path. */
|
|
26
6
|
export declare function resolveUserPath(raw: string): string;
|
|
27
|
-
|
|
28
|
-
export declare function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
export declare function resolveAgentWorkspaceDir(cfg: Config, agentId: string): string;
|
|
34
|
-
/**
|
|
35
|
-
* Internal agent state dir: credentials, `agent.json`, pid, inbox (`…/agent/`).
|
|
36
|
-
*/
|
|
37
|
-
export declare function resolveAgentDir(cfg: Config, agentId: string): string;
|
|
7
|
+
export declare function listAgentEntries(): AgentEntry[];
|
|
8
|
+
export declare function resolveDefaultAgentId(): string;
|
|
9
|
+
/** Markdown workspace root for an Agent. */
|
|
10
|
+
export declare function resolveAgentWorkspaceDir(agentId: string): string;
|
|
11
|
+
/** Internal Agent state dir: credentials, `agent.json`, pid, inbox (`…/agent/`). */
|
|
12
|
+
export declare function resolveAgentDir(agentId: string): string;
|
|
38
13
|
/** Parent of `sessions/` and `agent/`: `<stateDir>/agents/<id>/`. */
|
|
39
|
-
export declare function resolveAgentHomeDir(
|
|
14
|
+
export declare function resolveAgentHomeDir(agentId: string): string;
|
|
40
15
|
/** Profile Markdown + gateway avatar files: `<stateDir>/agents/<id>/profile/`. */
|
|
41
|
-
export declare function resolveAgentProfileDir(
|
|
16
|
+
export declare function resolveAgentProfileDir(agentId: string): string;
|
|
42
17
|
/** Resolved path for a single profile Markdown basename (e.g. `SOUL.md`). */
|
|
43
|
-
export declare function resolveAgentProfileMarkdownPath(
|
|
18
|
+
export declare function resolveAgentProfileMarkdownPath(agentId: string, filename: string): string;
|
|
44
19
|
/** Agent ids whose workspace root contains `workspacePath` (longest match first). */
|
|
45
|
-
export declare function resolveAgentIdsByWorkspacePath(
|
|
46
|
-
/** Best-matching
|
|
47
|
-
export declare function resolveAgentIdByWorkspacePath(
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
*/
|
|
52
|
-
export declare function resolveAgentIdForWorkspacePath(cfg: Config, resolvedWorkspacePath: string): string;
|
|
53
|
-
export declare function getDefaultWorkspacePath(cfg: Config): string;
|
|
54
|
-
export {};
|
|
20
|
+
export declare function resolveAgentIdsByWorkspacePath(workspacePath: string): string[];
|
|
21
|
+
/** Best-matching Agent id for cwd, or `undefined` when no workspace contains the path. */
|
|
22
|
+
export declare function resolveAgentIdByWorkspacePath(workspacePath: string): string | undefined;
|
|
23
|
+
/** Resolve an Agent from a workspace, falling back to the catalog default. */
|
|
24
|
+
export declare function resolveAgentIdForWorkspacePath(resolvedWorkspacePath: string): string;
|
|
25
|
+
export declare function getDefaultWorkspacePath(): string;
|