@xopcai/xopc 0.0.321 → 0.0.324
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/dist/assets/{auth-DKo-NMUY.js → auth-DocRzRlS.js} +95 -21
- package/dist/browser-ext/dist/background.js +1 -1
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +18 -2
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/plugin.js +1 -9
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-C69p1Gbr.js → agent-avatar-dicebear-B-Gczr_A.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CxcIHW_Z.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-CNuqJcHQ.js +1 -0
- package/dist/gateway/static/root/assets/{agents-CWR3p3t3.js → agents-CPpmkx7O.js} +1 -1
- package/dist/gateway/static/root/assets/{app-link-nL8iPwEr.js → app-link-C6gA5Nck.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-D98bt40S.js → app-management-settings-panel-BwWdVRlb.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-ChMUELAZ.js → appearance-settings-EoXNDO1j.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-6xEgLDv8.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BIIiu6uP.js → archive-plugin-B_T0uMvL.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CDJpcsCp.js → attachment-load-D9DDwxd2.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Cb5a_WOk.js → automations-page-jI9vNr2r.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-rztQnZDk.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-zp55zQPu.js → binary-plugins-Dzsxh9OL.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-B0CTIZb-.js → block-editor-CWUUgWWk.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-Bx3W4J4H.js → browser-automation-inputs-DSWXq9lI.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-D5Lr9b8a.js → browser-automations-page-D96o3bDY.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-DUQzQ3ic.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-sAZT4brT.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CKWtXof8.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-C8ducWB7.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-1I1PdIq0.js → chat-terminal-dock-WXZrEB3K.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-BT-EfoI6.js → computer-settings-page-uy9YDwxJ.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-mhQ-19tj.js → connector-service-page-BpF0SjB9.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-eZTfIMWI.js +2 -0
- package/dist/gateway/static/root/assets/date-picker-Do1dl0La.js +1 -0
- package/dist/gateway/static/root/assets/{dependency-picker-DLDLJx3D.js → dependency-picker-BhS8s080.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-kSFeHyrt.js → desktop-pet-DPVPqFlh.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-BjY7DqD7.js → desktop-pet-settings-Dv3vG9HZ.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DdvO1O6W.js +1 -0
- package/dist/gateway/static/root/assets/dist-3h6cXXhT.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-DbWJDT4X.js → extension-debug-page-cuG5Lnwf.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-lAC_2xWA.js → extension-page-BCTAXdyE.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-jFy1NJg9.js → extension-settings-page-kadW_icu.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-B7WpH3VW.js → gateway-config-swr-CoQVulMd.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-CLZyN-u9.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-C8F_z865.js → gateway-startup-retry-B5GJ-CQV.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-BSqg-JE9.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-Dc7d0_7q.js → image-generation-api-DvWDkbk1.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-_fMvJvzM.js → imports-page-_pddpuej.js} +1 -1
- package/dist/gateway/static/root/assets/index-BKL5tg2f.css +1 -0
- package/dist/gateway/static/root/assets/index-CJuypaNt.js +121 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CHnZYx1U.js → keyboard-shortcuts-settings-C1fKIjz4.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-DXFnYiA0.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-Bpja8nC6.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-page-CkXKS5xe.js +1 -0
- package/dist/gateway/static/root/assets/{locale-store-D9krC43K.js → locale-store-BPZR8x9b.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-C33z-ife.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-8eDZb0uS.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-CurpvCbB.js → markdown-view-Dft8ASFD.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CYldyH6K.js → media-plugins-Cjj-fidX.js} +1 -1
- package/dist/gateway/static/root/assets/messages-kFWhF6_t.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-C95RtLuL.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-kFxknjMR.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-DZOiI84c.js → page-context-capture-button-OUL3fEYh.js} +1 -1
- package/dist/gateway/static/root/assets/{page-tabs-C-XCf9cR.js → page-tabs-CVbY7_N5.js} +1 -1
- package/dist/gateway/static/root/assets/popover-select-DcsFzD_i.js +1 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-CvgeoEU8.js → preview-open-alternatives-CKiIby0r.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-bv3z8Xkh.js +1 -0
- package/dist/gateway/static/root/assets/product-open-page-DlpCi5zT.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-LPAxUszX.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Cbyb4hyy.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-cK-g8BDq.js → registry-api-DWWO6ajd.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BtDFZc6g.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DlUodTo-.js → runtime-tools-settings-panel-BT_ANpaT.js} +2 -2
- package/dist/gateway/static/root/assets/scenes-page-CJlc-mg1.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-BfboLCeN.js → schema-form-BcqsqSsV.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-CUo6-iV2.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-XeSxPjP7.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-BytEfCGo.js → settings-form-section-Dol9j_pF.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-Da2ql9KX.js → settings-page-B65vii9U.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-CBfB_7yz.js → settings-page-layout-eqTUTW2L.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BCt__prc.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-B8J0Saj5.js → share-preview-page-BS8o58NJ.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BsjSqEnw.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-evN7gs0S.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-BifYwEhe.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-B53tyGx5.js → skills-page.utils-DOk-iOvN.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-0HAvlVtR.js → system-settings-panel-CcSvoHfY.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-pCRG7Jb3.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-DJsxU6q_.js → tunnel-api-DDGMf44u.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-eIELzAOD.js → use-autosave-DiIkxIq7.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-CvYeM0Ml.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-BJ59ZCAn.js → voice-api-key-field-DJV-qERt.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DBXZJWLS.js → voice-config-api-BaxITrwZ.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BpSxdIgB.js → work-discovery-overlay-DcHhy54L.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Bhlv3VUX.js → workflow-run-setup-panel-DbVtLh0R.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CT8ouKcB.js +6 -0
- package/dist/gateway/static/root/index.html +14 -12
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/capabilities.js +4 -110
- package/dist/packages/gateway-contract/src/chat-previews.js +73 -0
- package/dist/packages/gateway-contract/src/home.js +284 -55
- package/dist/packages/gateway-contract/src/index.js +6 -2
- package/dist/packages/gateway-contract/src/local-apps.js +215 -0
- package/dist/packages/gateway-contract/src/notifications.js +3 -10
- package/dist/packages/gateway-contract/src/product-delivery.js +62 -17
- package/dist/packages/gateway-contract/src/user-turn-document.js +60 -0
- package/dist/src/activity/emitter.js +2 -1
- package/dist/src/activity/service.js +2 -1
- package/dist/src/agent/agent-manager.d.ts +4 -2
- package/dist/src/agent/agent-manager.js +37 -44
- package/dist/src/agent/agent-scope.d.ts +19 -48
- package/dist/src/agent/agent-scope.js +47 -169
- package/dist/src/agent/background-review/run-background-review.js +5 -4
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +1 -1
- package/dist/src/agent/commands/command-registry.js +7 -3
- package/dist/src/agent/context/coordinator.js +1 -1
- package/dist/src/agent/context/execution-context.js +2 -1
- package/dist/src/agent/context/execution-scope.js +2 -1
- package/dist/src/agent/context/workspace-seed.d.ts +1 -2
- package/dist/src/agent/context/workspace-seed.js +3 -3
- package/dist/src/agent/context/workspace-state.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +2 -2
- package/dist/src/agent/embedded/run-turn.js +2 -1
- package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js +2 -1
- package/dist/src/agent/embedded/transcript-runtime.d.ts +3 -0
- package/dist/src/agent/embedded/transcript-runtime.js +6 -0
- package/dist/src/agent/external-tools/cliProvider.js +6 -2
- package/dist/src/agent/external-tools/composio-provider.js +11 -4
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/external-tools/gateway-tools.js +17 -10
- package/dist/src/agent/external-tools/index.js +2 -3
- package/dist/src/agent/external-tools/mcp-provider.d.ts +3 -1
- package/dist/src/agent/external-tools/mcp-provider.js +93 -8
- package/dist/src/agent/external-tools/service.d.ts +2 -1
- package/dist/src/agent/external-tools/service.js +8 -3
- package/dist/src/agent/external-tools/types.d.ts +9 -0
- package/dist/src/agent/image/tool-model-config.js +4 -5
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/ipc/bus.js +1 -1
- package/dist/src/agent/ipc/socket.js +3 -3
- package/dist/src/agent/mcp/bundle-mcp-config.js +37 -5
- package/dist/src/agent/mcp/bundle-mcp-gateway.d.ts +1 -0
- package/dist/src/agent/mcp/bundle-mcp-gateway.js +1 -0
- package/dist/src/agent/mcp/bundle-mcp-names.js +2 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +33 -1
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +4 -0
- package/dist/src/agent/mcp/index.js +1 -1
- package/dist/src/agent/mcp/mcp-stdio-transport.d.ts +1 -0
- package/dist/src/agent/mcp/mcp-stdio-transport.js +10 -0
- package/dist/src/agent/mcp/mcp-transport.js +12 -8
- package/dist/src/agent/mcp/oauth/index.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.d.ts +6 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +70 -14
- package/dist/src/agent/mcp/oauth/mcp-oauth-provider.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-session.d.ts +2 -0
- package/dist/src/agent/mcp/oauth/mcp-oauth-session.js +12 -0
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.d.ts +3 -0
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +13 -1
- package/dist/src/agent/mcp/plugin-http-fetch.d.ts +2 -0
- package/dist/src/agent/mcp/plugin-http-fetch.js +56 -0
- package/dist/src/agent/media-generation/runtime-shared.d.ts +1 -1
- package/dist/src/agent/media-generation/runtime-shared.js +1 -1
- package/dist/src/agent/memory/plugin-discovery.js +1 -2
- package/dist/src/agent/models/manager.d.ts +1 -1
- package/dist/src/agent/models/manager.js +2 -2
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +1 -1
- package/dist/src/agent/prompt/response-language.js +2 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +6 -3
- package/dist/src/agent/prompt/system-prompt.js +2 -1
- package/dist/src/agent/reply/post-compaction-context.js +2 -2
- package/dist/src/agent/service/build-direct-message-content.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +2 -1
- package/dist/src/agent/service/parse-outbound-session-key.js +2 -1
- package/dist/src/agent/service/process-direct-streaming.js +30 -14
- package/dist/src/agent/service/webchat-tts.js +2 -1
- package/dist/src/agent/service.d.ts +1 -1
- package/dist/src/agent/service.js +13 -11
- package/dist/src/agent/service.types.d.ts +4 -0
- package/dist/src/agent/session/session-inspector.js +4 -5
- package/dist/src/agent/skills/hub-pull.js +1 -1
- package/dist/src/agent/skills/index.js +8 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.d.ts +5 -0
- package/dist/src/agent/skills/skill-manager.d.ts +2 -0
- package/dist/src/agent/skills/skill-manager.js +8 -0
- package/dist/src/agent/skills/skill-sources.js +17 -0
- package/dist/src/agent/skills/types.d.ts +3 -1
- package/dist/src/agent/source-context/injector.js +10 -5
- package/dist/src/agent/source-context/types.d.ts +3 -0
- package/dist/src/agent/source-context/types.js +8 -2
- package/dist/src/agent/starter-agents.d.ts +4 -5
- package/dist/src/agent/starter-agents.js +21 -20
- package/dist/src/agent/tasks/task-judge-service.js +2 -2
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +42 -2
- package/dist/src/agent/tools/automation-tool.js +1 -1
- package/dist/src/agent/tools/delegation-parent-policy.js +2 -3
- package/dist/src/agent/tools/factory.d.ts +3 -0
- package/dist/src/agent/tools/factory.js +12 -10
- package/dist/src/agent/tools/image-generate-tool.js +1 -1
- package/dist/src/agent/tools/workflow-tool.js +3 -4
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.d.ts +5 -2
- package/dist/src/agent/tools/xopc-use-tool.js +171 -15
- package/dist/src/agent/workflow/workflow-child-tools.js +1 -2
- package/dist/src/agent/workspace-runtime/registry.d.ts +1 -1
- package/dist/src/agent/workspace-runtime/registry.js +2 -2
- package/dist/src/agent-catalog/capabilities.d.ts +3 -0
- package/dist/src/agent-catalog/capabilities.js +238 -0
- package/dist/src/agent-catalog/id.d.ts +15 -0
- package/dist/src/agent-catalog/id.js +101 -0
- package/dist/src/agent-catalog/index.d.ts +6 -0
- package/dist/src/agent-catalog/index.js +10 -0
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.d.ts +11 -0
- package/dist/src/agent-catalog/migrations/legacy-config-cutover.js +195 -0
- package/dist/src/agent-catalog/repository.d.ts +39 -0
- package/dist/src/agent-catalog/repository.js +319 -0
- package/dist/src/agent-catalog/service.d.ts +33 -0
- package/dist/src/agent-catalog/service.js +202 -0
- package/dist/src/agent-catalog/test-support.d.ts +14 -0
- package/dist/src/agent-catalog/test-support.js +34 -0
- package/dist/src/agent-catalog/types.d.ts +26 -0
- package/dist/src/agent-catalog/types.js +1 -0
- package/dist/src/agent-config/index.js +2 -2
- package/dist/src/agent-config/schema.d.ts +1 -172
- package/dist/src/agent-config/schema.js +2 -41
- package/dist/src/auth/credentials.js +3 -3
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/sync-provider-auth.d.ts +1 -1
- package/dist/src/auth/sync-provider-auth.js +5 -9
- package/dist/src/automations/capabilities/drafts.js +8 -7
- package/dist/src/automations/service/action-executor.js +2 -1
- package/dist/src/bootstrap/application-state.d.ts +10 -0
- package/dist/src/bootstrap/application-state.js +26 -0
- package/dist/src/browser/automations/repository.js +2 -1
- package/dist/src/browser/automations/schema.d.ts +1 -1
- package/dist/src/browser/automations/service.d.ts +1 -1
- package/dist/src/browser/native-messaging-host.js +5 -4
- package/dist/src/browser/providers/extension.js +4 -2
- package/dist/src/browser/providers/realtime-extension.js +2 -1
- package/dist/src/capabilities/readiness/from-config.js +7 -4
- package/dist/src/capabilities/runtime/dispatcher.d.ts +1 -0
- package/dist/src/capabilities/runtime/dispatcher.js +10 -4
- package/dist/src/capabilities/runtime/product.js +2 -0
- package/dist/src/channels/catalog/channel-catalog-service.js +7 -13
- package/dist/src/chat-commands/agent-edit.js +4 -3
- package/dist/src/chat-commands/builtins/config.js +6 -8
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/builtins/workflow.js +1 -1
- package/dist/src/chat-commands/config-paths.js +1 -1
- package/dist/src/chat-commands/context.js +2 -3
- package/dist/src/chat-previews/index.d.ts +2 -0
- package/dist/src/chat-previews/index.js +3 -0
- package/dist/src/chat-previews/service.d.ts +27 -0
- package/dist/src/chat-previews/service.js +106 -0
- package/dist/src/chat-previews/store.d.ts +28 -0
- package/dist/src/chat-previews/store.js +78 -0
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/commands/agent.js +4 -4
- package/dist/src/cli/commands/agents.d.ts +1 -1
- package/dist/src/cli/commands/agents.js +36 -48
- package/dist/src/cli/commands/auth.js +1 -0
- package/dist/src/cli/commands/browser-cli-helpers.js +1 -2
- package/dist/src/cli/commands/channels.js +2 -4
- package/dist/src/cli/commands/config.js +4 -5
- package/dist/src/cli/commands/connectors.js +1 -2
- package/dist/src/cli/commands/doctor/checks/channel-config.js +2 -4
- package/dist/src/cli/commands/doctor/checks/channel-pairing-pending.js +1 -2
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -2
- package/dist/src/cli/commands/doctor/checks/config-health.js +1 -2
- package/dist/src/cli/commands/doctor/checks/database-schema.js +4 -4
- package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -2
- package/dist/src/cli/commands/doctor/checks/gateway-service.js +1 -2
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +13 -11
- package/dist/src/cli/commands/doctor/checks/security-audit.js +1 -2
- package/dist/src/cli/commands/doctor/checks/session-integrity.js +3 -3
- package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +1 -2
- package/dist/src/cli/commands/doctor/checks/workspace-status.js +5 -7
- package/dist/src/cli/commands/extension-agent-plugin.d.ts +8 -0
- package/dist/src/cli/commands/extension-agent-plugin.js +81 -0
- package/dist/src/cli/commands/extension-dev.js +2 -4
- package/dist/src/cli/commands/extension-marketplace.js +45 -6
- package/dist/src/cli/commands/extension-pack.js +1 -2
- package/dist/src/cli/commands/extension.js +36 -5
- package/dist/src/cli/commands/gateway/run-foreground.js +3 -3
- package/dist/src/cli/commands/gateway/shared.js +1 -1
- package/dist/src/cli/commands/history.js +2 -1
- package/dist/src/cli/commands/image.js +2 -2
- package/dist/src/cli/commands/init.js +11 -30
- package/dist/src/cli/commands/mcp.js +1 -2
- package/dist/src/cli/commands/models.js +13 -11
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -2
- package/dist/src/cli/commands/onboard/gateway.js +1 -2
- package/dist/src/cli/commands/onboard/model.d.ts +1 -1
- package/dist/src/cli/commands/onboard/model.js +17 -25
- package/dist/src/cli/commands/onboard.js +4 -2
- package/dist/src/cli/commands/platform.js +1 -0
- package/dist/src/cli/commands/project.js +3 -3
- package/dist/src/cli/commands/providers.js +1 -0
- package/dist/src/cli/commands/runtime.js +1 -2
- package/dist/src/cli/commands/search.js +1 -2
- package/dist/src/cli/commands/skills.js +1 -2
- package/dist/src/cli/commands/tui-runner.js +3 -2
- package/dist/src/cli/commands/tui.js +6 -8
- package/dist/src/cli/commands/tunnel.js +1 -1
- package/dist/src/cli/commands/voice.js +1 -2
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/cli/index.js +4 -2
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +15 -16
- package/dist/src/cli/utils/session.js +1 -2
- package/dist/src/computer/model-config.d.ts +3 -3
- package/dist/src/computer/model-config.js +10 -20
- package/dist/src/computer/runtime.js +1 -1
- package/dist/src/config/agent-model-intents.js +2 -2
- package/dist/src/config/agent-profile.d.ts +5 -6
- package/dist/src/config/agent-profile.js +19 -19
- package/dist/src/config/config-surface.d.ts +0 -3
- package/dist/src/config/default-model.js +2 -6
- package/dist/src/config/index.js +7 -8
- package/dist/src/config/loader.js +12 -18
- package/dist/src/config/models-json.d.ts +6 -6
- package/dist/src/config/paths.d.ts +18 -19
- package/dist/src/config/paths.js +35 -35
- package/dist/src/config/reload.d.ts +0 -1
- package/dist/src/config/reload.js +1 -6
- package/dist/src/config/rules.js +0 -15
- package/dist/src/config/schema.d.ts +3 -406
- package/dist/src/config/schema.js +24 -86
- package/dist/src/config/validate-channel-configs.js +8 -14
- package/dist/src/config/workspace-dirs.d.ts +3 -4
- package/dist/src/config/workspace-dirs.js +9 -8
- package/dist/src/config/workspace-path-helpers.d.ts +1 -1
- package/dist/src/config/workspace-path-helpers.js +2 -2
- package/dist/src/connectors/account-selection.js +1 -1
- package/dist/src/connectors/cli/lifecycle.js +2 -1
- package/dist/src/connectors/composio-managed-events.js +2 -1
- package/dist/src/connectors/connected-source-ingestion.js +2 -1
- package/dist/src/connectors/connected-source-understanding.js +4 -2
- package/dist/src/connectors/connection-candidates.d.ts +4 -1
- package/dist/src/connectors/connection-candidates.js +8 -2
- package/dist/src/connectors/connection-capabilities.d.ts +2 -2
- package/dist/src/connectors/connection-capabilities.js +3 -1
- package/dist/src/connectors/connection-recovery-service.d.ts +6 -1
- package/dist/src/connectors/connection-recovery-service.js +138 -26
- package/dist/src/connectors/content-enrichment.js +2 -1
- package/dist/src/connectors/learning-coordinator.js +2 -1
- package/dist/src/connectors/plugin-mcp-recovery.d.ts +28 -0
- package/dist/src/connectors/plugin-mcp-recovery.js +90 -0
- package/dist/src/connectors/runtime-adapter-registry.js +2 -1
- package/dist/src/connectors/workflow-preflight.d.ts +8 -1
- package/dist/src/connectors/workflow-preflight.js +11 -3
- package/dist/src/discussions/analyzer.js +2 -2
- package/dist/src/endpoint-tools/runtime.js +2 -1
- package/dist/src/execution-environments/subject.js +2 -1
- package/dist/src/extensions/activation-context.js +3 -16
- package/dist/src/extensions/agent-plugins/auth.d.ts +39 -0
- package/dist/src/extensions/agent-plugins/auth.js +156 -0
- package/dist/src/extensions/agent-plugins/connection.d.ts +8 -0
- package/dist/src/extensions/agent-plugins/connection.js +41 -0
- package/dist/src/extensions/agent-plugins/health.d.ts +4 -0
- package/dist/src/extensions/agent-plugins/health.js +48 -0
- package/dist/src/extensions/agent-plugins/inventory.d.ts +53 -0
- package/dist/src/extensions/agent-plugins/inventory.js +34 -0
- package/dist/src/extensions/agent-plugins/mcp-adapter.d.ts +3 -0
- package/dist/src/extensions/agent-plugins/mcp-adapter.js +47 -0
- package/dist/src/extensions/agent-plugins/sources.d.ts +5 -0
- package/dist/src/extensions/agent-plugins/sources.js +72 -0
- package/dist/src/extensions/agent-plugins/store.d.ts +61 -0
- package/dist/src/extensions/agent-plugins/store.js +305 -0
- package/dist/src/extensions/agent-plugins/validation.d.ts +59 -0
- package/dist/src/extensions/agent-plugins/validation.js +211 -0
- package/dist/src/extensions/discover-extensions.js +9 -15
- package/dist/src/extensions/extension-metadata-snapshot.d.ts +1 -1
- package/dist/src/extensions/extension-metadata-snapshot.js +9 -16
- package/dist/src/extensions/index.js +4 -10
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.js +7 -14
- package/dist/src/extensions/manifest-registry.js +93 -98
- package/dist/src/extensions/marketplace.js +5 -2
- package/dist/src/extensions/normalize-manifest.js +12 -17
- package/dist/src/extensions/update.js +2 -3
- package/dist/src/files/file-service.js +7 -8
- package/dist/src/gateway/agents-admin.d.ts +23 -27
- package/dist/src/gateway/agents-admin.js +109 -130
- package/dist/src/gateway/chat-stream/mapper.js +10 -3
- package/dist/src/gateway/file-path-classifier.js +3 -3
- package/dist/src/gateway/file-space-service.js +2 -1
- package/dist/src/gateway/global-defaults-admin.d.ts +6 -4
- package/dist/src/gateway/global-defaults-admin.js +21 -20
- package/dist/src/gateway/hono/app.js +2 -1
- package/dist/src/gateway/hono/lib/config-payload.js +12 -9
- package/dist/src/gateway/hono/middleware/auth.js +2 -1
- package/dist/src/gateway/hono/middleware/scopes.js +2 -1
- package/dist/src/gateway/hono/routes/agent-plugins.d.ts +3 -0
- package/dist/src/gateway/hono/routes/agent-plugins.js +166 -0
- package/dist/src/gateway/hono/routes/agent-stream.js +14 -0
- package/dist/src/gateway/hono/routes/agents.js +22 -49
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +4 -2
- package/dist/src/gateway/hono/routes/browser.js +4 -2
- package/dist/src/gateway/hono/routes/channels.js +1 -2
- package/dist/src/gateway/hono/routes/chat-previews.d.ts +3 -0
- package/dist/src/gateway/hono/routes/chat-previews.js +41 -0
- package/dist/src/gateway/hono/routes/cli-connectors.js +2 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +3 -1
- package/dist/src/gateway/hono/routes/composer-history.js +2 -1
- package/dist/src/gateway/hono/routes/config-patch/index.d.ts +1 -3
- package/dist/src/gateway/hono/routes/config-patch/index.js +1 -2
- package/dist/src/gateway/hono/routes/config-patch/misc.js +18 -11
- package/dist/src/gateway/hono/routes/config.js +0 -2
- package/dist/src/gateway/hono/routes/connection-waits.js +4 -2
- package/dist/src/gateway/hono/routes/connectors.js +8 -4
- package/dist/src/gateway/hono/routes/context-sources.js +4 -3
- package/dist/src/gateway/hono/routes/device-pairing-approval.js +2 -1
- package/dist/src/gateway/hono/routes/device-push.js +3 -2
- package/dist/src/gateway/hono/routes/devices.js +6 -3
- package/dist/src/gateway/hono/routes/discussions.js +2 -1
- package/dist/src/gateway/hono/routes/endpoint-tools.js +2 -1
- package/dist/src/gateway/hono/routes/global-defaults.js +8 -16
- package/dist/src/gateway/hono/routes/home.js +93 -4
- package/dist/src/gateway/hono/routes/index.js +2 -0
- package/dist/src/gateway/hono/routes/interaction-state.js +2 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/local-apps.js +71 -39
- package/dist/src/gateway/hono/routes/mcp.js +48 -21
- package/dist/src/gateway/hono/routes/models.js +8 -7
- package/dist/src/gateway/hono/routes/notes.js +4 -5
- package/dist/src/gateway/hono/routes/projects.js +6 -6
- package/dist/src/gateway/hono/routes/public-gateway.js +2 -1
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +4 -0
- package/dist/src/gateway/hono/routes/session-input-handler.js +23 -1
- package/dist/src/gateway/hono/routes/sessions.js +4 -2
- package/dist/src/gateway/hono/routes/shares.js +4 -3
- package/dist/src/gateway/hono/routes/side-chats.js +11 -0
- package/dist/src/gateway/hono/routes/site-shares.js +2 -2
- package/dist/src/gateway/hono/routes/status.js +2 -3
- package/dist/src/gateway/hono/routes/tasks.js +1 -2
- package/dist/src/gateway/hono/routes/user-model-refresh.js +2 -1
- package/dist/src/gateway/hono/routes/user-model.js +3 -2
- package/dist/src/gateway/hono/routes/work-discovery.js +1 -1
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/image-generation-setup.d.ts +19 -10
- package/dist/src/gateway/image-generation-setup.js +59 -23
- package/dist/src/gateway/index.js +1 -4
- package/dist/src/gateway/lock.js +13 -18
- package/dist/src/gateway/memory-maintenance-automation-reconciler.js +4 -3
- package/dist/src/gateway/run-loop.js +2 -3
- package/dist/src/gateway/security/gateway-scopes.js +6 -2
- package/dist/src/gateway/security/index.js +4 -1
- package/dist/src/gateway/service/agent-runner.js +11 -3
- package/dist/src/gateway/service/app-context-access.js +2 -1
- package/dist/src/gateway/service/config-coordinator.d.ts +0 -1
- package/dist/src/gateway/service/config-coordinator.js +4 -22
- package/dist/src/gateway/service/marketplace-service.d.ts +1 -0
- package/dist/src/gateway/service/marketplace-service.js +18 -2
- package/dist/src/gateway/service/run-gateway-agent.js +4 -2
- package/dist/src/gateway/service/session-input-coordinator.js +7 -5
- package/dist/src/gateway/service.d.ts +10 -1
- package/dist/src/gateway/service.js +123 -33
- package/dist/src/gateway/session-context-summary.js +4 -2
- package/dist/src/gateway/side-chat/index.d.ts +3 -1
- package/dist/src/gateway/side-chat/index.js +2 -1
- package/dist/src/gateway/side-chat/manager.d.ts +16 -0
- package/dist/src/gateway/side-chat/manager.js +40 -6
- package/dist/src/gateway/side-chat/promotion-service.d.ts +19 -0
- package/dist/src/gateway/side-chat/promotion-service.js +111 -0
- package/dist/src/gateway/side-chat/run-service.js +1 -0
- package/dist/src/gateway/side-chat/types.d.ts +1 -1
- package/dist/src/gateway/xopc-cloud-capability-setup.d.ts +2 -0
- package/dist/src/gateway/xopc-cloud-capability-setup.js +15 -10
- package/dist/src/home-intelligence/application-service.d.ts +31 -0
- package/dist/src/home-intelligence/application-service.js +134 -0
- package/dist/src/home-intelligence/capability-preflight.d.ts +32 -0
- package/dist/src/home-intelligence/capability-preflight.js +118 -0
- package/dist/src/home-intelligence/evaluation.d.ts +34 -0
- package/dist/src/home-intelligence/evaluation.js +49 -0
- package/dist/src/home-intelligence/generator.d.ts +125 -0
- package/dist/src/home-intelligence/generator.js +227 -0
- package/dist/src/home-intelligence/host.d.ts +53 -0
- package/dist/src/home-intelligence/host.js +257 -0
- package/dist/src/home-intelligence/notification.d.ts +8 -0
- package/dist/src/home-intelligence/notification.js +20 -0
- package/dist/src/home-intelligence/policy.d.ts +16 -0
- package/dist/src/home-intelligence/policy.js +152 -0
- package/dist/src/home-intelligence/repository.d.ts +81 -0
- package/dist/src/home-intelligence/repository.js +495 -0
- package/dist/src/home-intelligence/snapshot.d.ts +43 -0
- package/dist/src/home-intelligence/snapshot.js +133 -0
- package/dist/src/home-intelligence/strategy.d.ts +14 -0
- package/dist/src/home-intelligence/strategy.js +10 -0
- package/dist/src/home-intelligence/types.d.ts +13 -0
- package/dist/src/home-intelligence/types.js +1 -0
- package/dist/src/infra/update-restart.js +4 -2
- package/dist/src/knowledge/connected-knowledge-pipeline.js +2 -1
- package/dist/src/knowledge/ingestion-service.js +2 -1
- package/dist/src/knowledge-memory/repository.js +2 -1
- package/dist/src/local-apps/artifact-files.d.ts +3 -0
- package/dist/src/local-apps/artifact-files.js +45 -0
- package/dist/src/local-apps/capabilities/write.js +1 -1
- package/dist/src/local-apps/fix-guidance.d.ts +3 -0
- package/dist/src/local-apps/fix-guidance.js +75 -0
- package/dist/src/local-apps/index.d.ts +2 -1
- package/dist/src/local-apps/scaffold.d.ts +5 -0
- package/dist/src/local-apps/scaffold.js +18 -5
- package/dist/src/local-apps/service.d.ts +18 -3
- package/dist/src/local-apps/service.js +107 -65
- package/dist/src/local-apps/snapshot-store.d.ts +8 -0
- package/dist/src/local-apps/snapshot-store.js +68 -0
- package/dist/src/local-apps/store.js +2 -1
- package/dist/src/local-apps/types.d.ts +4 -87
- package/dist/src/mcp/channel-bridge.js +1 -2
- package/dist/src/mcp/channel-server.js +1 -2
- package/dist/src/mcp/gateway-http-client.js +1 -2
- package/dist/src/media/session-references.js +2 -1
- package/dist/src/memory-maintenance/service.js +2 -1
- package/dist/src/migrations/memory-config.js +1 -2
- package/dist/src/notes/agent-context.js +2 -1
- package/dist/src/notes/attachment-ref.js +8 -4
- package/dist/src/notes/note-attachment-sync.js +2 -1
- package/dist/src/notes/note-index-meta.js +14 -7
- package/dist/src/notes/note-markdown.js +13 -7
- package/dist/src/notes/service.js +6 -3
- package/dist/src/notes/store.js +4 -2
- package/dist/src/notifications/device-store.js +1 -1
- package/dist/src/notifications/planner.js +24 -0
- package/dist/src/notifications/service.d.ts +7 -14
- package/dist/src/notifications/service.js +13 -3
- package/dist/src/notifications/store.js +1 -1
- package/dist/src/notifications/types.d.ts +1 -1
- package/dist/src/notifications/types.js +1 -1
- package/dist/src/projects/capabilities/write.js +2 -1
- package/dist/src/projects/project-agent-suggestion.js +1 -1
- package/dist/src/projects/project-agent.js +4 -4
- package/dist/src/projects/project-service.js +2 -1
- package/dist/src/projects/workspace.js +3 -2
- package/dist/src/providers/index.js +3 -3
- package/dist/src/providers/model-reference-auditor.d.ts +1 -2
- package/dist/src/providers/model-reference-auditor.js +8 -5
- package/dist/src/realtime/runtime.js +2 -1
- package/dist/src/routing/binding-schema.d.ts +41 -0
- package/dist/src/routing/binding-schema.js +26 -0
- package/dist/src/routing/bindings.d.ts +4 -2
- package/dist/src/routing/bindings.js +4 -4
- package/dist/src/routing/index.d.ts +1 -1
- package/dist/src/routing/resolve-route.d.ts +7 -24
- package/dist/src/routing/resolve-route.js +17 -18
- package/dist/src/routing/resolve-tui-session-key.d.ts +1 -4
- package/dist/src/routing/resolve-tui-session-key.js +10 -9
- package/dist/src/scenes/execution.d.ts +1 -1
- package/dist/src/scenes/model.js +1 -1
- package/dist/src/scenes/taskFollowUp/contracts.d.ts +1 -1
- package/dist/src/scenes/taskFollowUp/service.js +6 -4
- package/dist/src/scenes/templates.d.ts +2 -2
- package/dist/src/session/client-history.d.ts +3 -1
- package/dist/src/session/client-history.js +10 -3
- package/dist/src/session/config-store.js +2 -1
- package/dist/src/session/index.d.ts +1 -1
- package/dist/src/session/init-session-turn.js +2 -1
- package/dist/src/session/manager.d.ts +4 -0
- package/dist/src/session/manager.js +6 -0
- package/dist/src/session/resolve-session.js +2 -1
- package/dist/src/session/session-context-for-llm.d.ts +12 -1
- package/dist/src/session/session-context-for-llm.js +16 -2
- package/dist/src/session/session-workspace.js +1 -1
- package/dist/src/session/store.d.ts +14 -0
- package/dist/src/session/store.js +20 -2
- package/dist/src/session/stored-rows-to-file-entries.js +10 -1
- package/dist/src/session/transcript-outline.js +10 -3
- package/dist/src/storage/sqlite/activity-repository.js +6 -2
- package/dist/src/storage/sqlite/browser-tab-binding-repository.js +6 -2
- package/dist/src/storage/sqlite/clarification-wait-repository.js +13 -8
- package/dist/src/storage/sqlite/collaboration-rule-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/collaboration-rule-repository.js +8 -3
- package/dist/src/storage/sqlite/composer-input-history-repository.js +8 -3
- package/dist/src/storage/sqlite/config-repository.js +9 -5
- package/dist/src/storage/sqlite/connection-wait-repository.js +9 -3
- package/dist/src/storage/sqlite/connector-learning-repository.js +6 -2
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +6 -2
- package/dist/src/storage/sqlite/context-evidence-repository.js +8 -3
- package/dist/src/storage/sqlite/context-extraction-repository.js +8 -3
- package/dist/src/storage/sqlite/device-access-repository.js +15 -9
- package/dist/src/storage/sqlite/device-pairing-approval.js +6 -2
- package/dist/src/storage/sqlite/device-pairing-repository.js +10 -5
- package/dist/src/storage/sqlite/endpoint-principal-repository.js +6 -2
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +6 -2
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +6 -2
- package/dist/src/storage/sqlite/gateway-identity-repository.js +6 -2
- package/dist/src/storage/sqlite/home-attention-repository.js +6 -2
- package/dist/src/storage/sqlite/index.d.ts +0 -1
- package/dist/src/storage/sqlite/index.js +72 -42
- package/dist/src/storage/sqlite/interaction-state-repository.js +10 -4
- package/dist/src/storage/sqlite/knowledge-repository.js +6 -2
- package/dist/src/storage/sqlite/migrations/202_chat_previews.sql +26 -0
- package/dist/src/storage/sqlite/migrations/203_remove_retired_proactive_contracts.sql +70 -0
- package/dist/src/storage/sqlite/migrations/204_home_intelligence.sql +78 -0
- package/dist/src/storage/sqlite/migrations/205_agent_catalog.sql +66 -0
- package/dist/src/storage/sqlite/migrations/206_home_advice_strategy_version.sql +3 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +2 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.js +8 -4
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.d.ts +7 -1
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.js +2 -2
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +4 -4
- package/dist/src/storage/sqlite/note-agent-context-repository.js +6 -2
- package/dist/src/storage/sqlite/notes-repository.js +9 -4
- package/dist/src/storage/sqlite/row-mappers.js +6 -1
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/session-task-plan-repository.js +14 -9
- package/dist/src/storage/sqlite/session-turn-replace-repository.js +9 -5
- package/dist/src/storage/sqlite/sidebar-layout-repository.js +14 -9
- package/dist/src/storage/sqlite/transcript-repository.js +10 -6
- package/dist/src/storage/sqlite/user-people-repository.js +8 -3
- package/dist/src/storage/sqlite/user-trust-repository.js +8 -3
- package/dist/src/tasks/attention-governor.d.ts +0 -1
- package/dist/src/tasks/attention-governor.js +1 -7
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.d.ts +1 -1
- package/dist/src/tasks/execution-context.d.ts +2 -2
- package/dist/src/tasks/execution-context.js +6 -5
- package/dist/src/tasks/home-query-service.d.ts +3 -2
- package/dist/src/tasks/home-query-service.js +23 -44
- package/dist/src/tasks/task-context-assembler.js +2 -1
- package/dist/src/tasks/task-context-repository.d.ts +1 -1
- package/dist/src/tasks/task-contract-planner.d.ts +0 -3
- package/dist/src/tasks/task-contract-planner.js +1 -4
- package/dist/src/tasks/task-handoff-service.d.ts +0 -2
- package/dist/src/tasks/task-handoff-service.js +3 -3
- package/dist/src/tasks/task-value-metrics-service.js +2 -1
- package/dist/src/tui/backends/embedded-backend.js +12 -14
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-commands.js +5 -3
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +3 -3
- package/dist/src/tui/tui.js +5 -5
- package/dist/src/tunnel/registration-proof.js +2 -1
- package/dist/src/user-context/access-policy.js +2 -1
- package/dist/src/user-context/domain.d.ts +1 -1
- package/dist/src/user-context/domain.js +18 -13
- package/dist/src/user-context/extraction/registry.js +2 -1
- package/dist/src/user-context/interaction-state.js +4 -1
- package/dist/src/user-context/relationship-continuity.js +2 -1
- package/dist/src/user-context/trust-policy.js +13 -8
- package/dist/src/user-model/bootstrap.js +2 -1
- package/dist/src/user-model/capture/executor.js +4 -2
- package/dist/src/user-model/capture/semantic.d.ts +1 -1
- package/dist/src/user-model/capture/semantic.js +1 -1
- package/dist/src/user-model/domain.js +7 -2
- package/dist/src/user-model/goals.js +2 -1
- package/dist/src/user-model/index.js +4 -1
- package/dist/src/user-model/repository.js +2 -1
- package/dist/src/utils/helpers.js +1 -4
- package/dist/src/utils/index.js +2 -2
- package/dist/src/utils/logger/index.d.ts +1 -1
- package/dist/src/utils/logger/index.js +2 -2
- package/dist/src/utils/logger/redact.d.ts +2 -0
- package/dist/src/utils/logger/redact.js +11 -3
- package/dist/src/utils/logger.js +2 -2
- package/dist/src/voice/realtime/memory-context.js +2 -1
- package/dist/src/voice/realtime/persona-context.js +6 -6
- package/dist/src/voice/tts/audio.js +1 -1
- package/dist/src/work-discovery/analyzer.js +3 -3
- package/dist/src/work-discovery/investigator.js +1 -1
- package/dist/src/work-discovery/service.js +12 -11
- package/dist/src/workflows/draft/workflow-draft-service.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +4 -5
- package/dist/src/workflows/store/paths.js +1 -1
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DWLXHWXg.js +0 -1
- package/dist/gateway/static/root/assets/api-Df2D6d3C.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-BzytHIn1.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-CtSV8tp-.js +0 -7
- package/dist/gateway/static/root/assets/browser-settings-page-DrvNA-G2.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-D0S3DuAD.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-c0k2virA.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-Bkl9fDHc.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-Dw_h-5Qh.js +0 -2
- package/dist/gateway/static/root/assets/date-picker-BqcldZoN.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-C5f4FRpE.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-D7XbH6Hk.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CFJypY6Y.js +0 -1
- package/dist/gateway/static/root/assets/index-B4Vwh0H-.css +0 -1
- package/dist/gateway/static/root/assets/index-BNubE2Zi.js +0 -89
- package/dist/gateway/static/root/assets/local-app-workbench-page-BLKCFXvr.js +0 -2
- package/dist/gateway/static/root/assets/local-apps-page-BNFmOkxs.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-COxOJsgX.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-BX5NtnQ2.js +0 -1
- package/dist/gateway/static/root/assets/messages-B1sTgIrE.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-DZ0IWx1R.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-B9F1uue_.js +0 -8
- package/dist/gateway/static/root/assets/popover-select-B-GDnZO9.js +0 -1
- package/dist/gateway/static/root/assets/product-delivery-chCjIpvu.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-DEYWx__w.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-9qMDEKVd.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-D4UTOpEm.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CPmOucUB.js +0 -1
- package/dist/gateway/static/root/assets/scenes-page-DO8vGorm.js +0 -2
- package/dist/gateway/static/root/assets/sessions-page-zu5P0dk5.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-ClEw-i1l.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DElF2sgq.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-MLolJfoV.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DTPsW9TY.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-CNQHhsiv.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-Dc30oS9J.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-Bq6ab5WJ.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-Ci-4HAYm.js +0 -6
- package/dist/packages/gateway-contract/src/proactive.js +0 -136
- package/dist/src/commands/agents.config.d.ts +0 -31
- package/dist/src/commands/agents.config.js +0 -129
- package/dist/src/gateway/hono/routes/config-patch/agents.d.ts +0 -2
- package/dist/src/gateway/hono/routes/config-patch/agents.js +0 -6
- package/dist/src/storage/sqlite/relationship-settings-repository.d.ts +0 -17
- package/dist/src/storage/sqlite/relationship-settings-repository.js +0 -65
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { runWithActivityContext } from "../../activity/context.js";
|
|
2
2
|
import { TaskCommandSchema, TaskContextInputSchema } from "../../../packages/gateway-contract/src/tasks.js";
|
|
3
|
+
import { ChatPreviewCreateInputSchema, ChatPreviewReviseInputSchema } from "../../../packages/gateway-contract/src/chat-previews.js";
|
|
3
4
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
4
5
|
import { AutomationCancelOutputSchema, AutomationDeleteOutputSchema, AutomationMutationOutputSchema, AutomationReadAllInputSchema, AutomationReadAllOutputSchema, AutomationReadOutputSchema, AutomationRunMutationOutputSchema, CapabilityCallSchema, CapabilityResourceInputSchema, NoteDeleteOutputSchema, NoteGetOutputSchema, ProjectCreateInputSchema, ProjectDeleteInputSchema, ProjectDeleteOutputSchema, ProjectEditInputSchema, ProjectMilestoneCreateInputSchema, ProjectMilestoneDeleteInputSchema, ProjectMilestoneDeleteOutputSchema, ProjectMilestoneOutputSchema, ProjectMilestoneUpdateInputSchema, ProjectMutationOutputSchema, ProjectResolveWorkspaceInputSchema, ProjectResolveWorkspaceOutputSchema, ProjectSetPinnedInputSchema, ProjectUpdateCreateInputSchema, ProjectUpdateOutputSchema, SceneWriteContracts, TaskRunCancelInputSchema, TaskRunCancelOutputSchema, TaskRunFeedbackInputSchema, TaskRunFeedbackOutputSchema } from "../../../packages/gateway-contract/src/capabilities.js";
|
|
5
6
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
6
7
|
import { TaskRepository } from "../../tasks/task-repository.js";
|
|
7
8
|
import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
8
9
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
9
|
-
import "../../storage/sqlite/index.js";
|
|
10
|
+
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
10
11
|
import "../../activity/index.js";
|
|
11
|
-
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
12
12
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
13
13
|
import "../../capabilities/runtime/dispatcher.js";
|
|
14
|
+
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
14
15
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
15
16
|
import "../../projects/index.js";
|
|
16
17
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
@@ -26,6 +27,7 @@ import { Type } from "@sinclair/typebox";
|
|
|
26
27
|
//#region src/agent/tools/xopc-use-tool.ts
|
|
27
28
|
init_src();
|
|
28
29
|
init_resolve_route();
|
|
30
|
+
init_sqlite();
|
|
29
31
|
const XopcUseToolSchema = Type.Object({
|
|
30
32
|
mode: Type.Union([
|
|
31
33
|
Type.Literal("context"),
|
|
@@ -36,9 +38,11 @@ const XopcUseToolSchema = Type.Object({
|
|
|
36
38
|
Type.Literal("task"),
|
|
37
39
|
Type.Literal("task_run"),
|
|
38
40
|
Type.Literal("local_app"),
|
|
41
|
+
Type.Literal("chat_preview"),
|
|
42
|
+
Type.Literal("agent"),
|
|
39
43
|
Type.Literal("settings")
|
|
40
44
|
]),
|
|
41
|
-
command: Type.String({ description: "Context resolve takes an explicit AppContextEnvelope; never guess a current page. Automation draft/repair_draft accept prompt/id, agentId?, language?, idempotencyKey?; simulate explains an automation without running it. Local_app record_acceptance records supplied checks and sourceHash, not proof that checks were executed. Project create accepts idempotencyKey; update/pin/unpin/delete accepts {projectId, expectedVersion?, idempotencyKey?}; stable retries require the original expectedVersion. Delete preserves workspace files and does not confirm external execution stopped. Project milestone writes support idempotencyKey; update_milestone/delete_milestone require original expectedRevision for stable retries, and create_update requires original expectedVersion. TaskRun cancel accepts idempotencyKey and expectedVersion, and does not confirm external execution stopped. Automation diagnostics: get_run/run_events {runId}, metrics {}, product_events {eventType, source?, payloadKey?, payloadValue?, limit?}; payload filters require both key and value. Automation also supports cancel/read {runId, idempotencyKey?} and read_all {projectId?, idempotencyKey?}; omitted projectId means all projects. Cancel acceptance is not confirmation of stopping. Object command. Scene commands: templates, list, get {id}, mail_accounts, mail_search {accountId, query}, mail_sources, read_notes {id}, preflight/start {templateKey, templateVersion, goal, scope, permissions}, configure {id, expectedRevision, goal, scope, permissions}, transition {id, expectedRevision, status: paused|active|completed|archived}, check {id}, notes {id, expectedRevision, content, validUntil?}, work_item {id, subjectId, accountId, dueAt}, update_work_item {workItemId, expectedRevision, dueAt?, status?}, schedule {id, triggerKey, expectedRevision, schedule}, results {id?}, feedback {presentationId, expectedRevision, rating}, mark_read {presentationId, read}, diagnostics, get_preferences, set_preferences {expectedRevision, ...preferences}. Start and check accept a stable requestId for retries. Scenes prepare read-only suggestions and drafts; never send mail. Only create a scene for work explicitly delegated by the user; inspect existing scenes first. Supports project list/get/create/update/resolve_workspace/list_milestones/create_milestone/update_milestone/list_updates/create_update, automation list/get/create/update/delete/run/rerun/pause/resume/history (rerun takes runId; run/rerun accept idempotencyKey), note list/get/project_summaries/history {noteId}/snapshot {noteId, timestamp}/create/append/update/preview_edit/delete, task list/get/create/update_dependencies/add_context/remove_context/command/delete, task_run list/get/cancel, local_app list/get/create/validate, and settings open." }),
|
|
45
|
+
command: Type.String({ description: "Context resolve takes an explicit AppContextEnvelope; never guess a current page. Automation draft/repair_draft accept prompt/id, agentId?, language?, idempotencyKey?; simulate explains an automation without running it. Local_app record_acceptance records supplied checks and sourceHash, not proof that checks were executed. Agent commands: list, get {id}, create {id, profile, workspace?, models?, skills?, tools?, workflows?, runtime?, idempotencyKey?}, update {id, expectedRevision, patch, idempotencyKey?}, set_default {id, expectedRevision, idempotencyKey?}, disable/delete/purge {id, expectedRevision, idempotencyKey?}. Purge also removes on-disk data. Project create accepts idempotencyKey; update/pin/unpin/delete accepts {projectId, expectedVersion?, idempotencyKey?}; stable retries require the original expectedVersion. Delete preserves workspace files and does not confirm external execution stopped. Project milestone writes support idempotencyKey; update_milestone/delete_milestone require original expectedRevision for stable retries, and create_update requires original expectedVersion. TaskRun cancel accepts idempotencyKey and expectedVersion, and does not confirm external execution stopped. Automation diagnostics: get_run/run_events {runId}, metrics {}, product_events {eventType, source?, payloadKey?, payloadValue?, limit?}; payload filters require both key and value. Automation also supports cancel/read {runId, idempotencyKey?} and read_all {projectId?, idempotencyKey?}; omitted projectId means all projects. Cancel acceptance is not confirmation of stopping. Object command. Scene commands: templates, list, get {id}, mail_accounts, mail_search {accountId, query}, mail_sources, read_notes {id}, preflight/start {templateKey, templateVersion, goal, scope, permissions}, configure {id, expectedRevision, goal, scope, permissions}, transition {id, expectedRevision, status: paused|active|completed|archived}, check {id}, notes {id, expectedRevision, content, validUntil?}, work_item {id, subjectId, accountId, dueAt}, update_work_item {workItemId, expectedRevision, dueAt?, status?}, schedule {id, triggerKey, expectedRevision, schedule}, results {id?}, feedback {presentationId, expectedRevision, rating}, mark_read {presentationId, read}, diagnostics, get_preferences, set_preferences {expectedRevision, ...preferences}. Start and check accept a stable requestId for retries. Scenes prepare read-only suggestions and drafts; never send mail. Only create a scene for work explicitly delegated by the user; inspect existing scenes first. Supports project list/get/create/update/resolve_workspace/list_milestones/create_milestone/update_milestone/list_updates/create_update, automation list/get/create/update/delete/run/rerun/pause/resume/history (rerun takes runId; run/rerun accept idempotencyKey), note list/get/project_summaries/history {noteId}/snapshot {noteId, timestamp}/create/append/update/preview_edit/delete, task list/get/create/update_dependencies/add_context/remove_context/command/delete, task_run list/get/cancel, chat_preview create/revise/get, local_app list/get/create/validate, and settings open." }),
|
|
42
46
|
args: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
43
47
|
dryRun: Type.Optional(Type.Boolean({ description: "Validate and preview the action without mutating xopc state." }))
|
|
44
48
|
});
|
|
@@ -160,7 +164,7 @@ function deliveryForXopcResult(mode, command, result, dryRun) {
|
|
|
160
164
|
}] : [];
|
|
161
165
|
});
|
|
162
166
|
return {
|
|
163
|
-
version:
|
|
167
|
+
version: 2,
|
|
164
168
|
operation: "opened",
|
|
165
169
|
presentation: {
|
|
166
170
|
kind: "table",
|
|
@@ -187,7 +191,7 @@ function deliveryForXopcResult(mode, command, result, dryRun) {
|
|
|
187
191
|
}];
|
|
188
192
|
});
|
|
189
193
|
return {
|
|
190
|
-
version:
|
|
194
|
+
version: 2,
|
|
191
195
|
operation: "opened",
|
|
192
196
|
presentation: {
|
|
193
197
|
kind: "diff",
|
|
@@ -309,6 +313,7 @@ function deliveryForXopcResult(mode, command, result, dryRun) {
|
|
|
309
313
|
};
|
|
310
314
|
} else if (mode === "local_app") {
|
|
311
315
|
source = record(resultRecord.app);
|
|
316
|
+
const snapshot = record(resultRecord.snapshot);
|
|
312
317
|
const id = deliveryText(source?.id);
|
|
313
318
|
if (id) primary = {
|
|
314
319
|
kind: "local_app",
|
|
@@ -316,16 +321,35 @@ function deliveryForXopcResult(mode, command, result, dryRun) {
|
|
|
316
321
|
title: deliveryText(source?.name) ?? "Local app",
|
|
317
322
|
summary: deliverySummary(source?.description, source?.idea),
|
|
318
323
|
status: deliveryText(source?.installationState) ?? deliveryText(source?.status),
|
|
319
|
-
revision:
|
|
324
|
+
revision: deliveryText(snapshot?.sourceHash),
|
|
320
325
|
projectId: deliveryText(source?.projectId),
|
|
321
326
|
capabilities: [
|
|
322
327
|
"open",
|
|
323
328
|
"preview",
|
|
324
329
|
"edit",
|
|
325
330
|
"continue_in_chat",
|
|
331
|
+
"fix",
|
|
326
332
|
"run"
|
|
327
333
|
]
|
|
328
334
|
};
|
|
335
|
+
} else if (mode === "chat_preview") {
|
|
336
|
+
source = record(resultRecord.preview);
|
|
337
|
+
const revision = record(resultRecord.revision);
|
|
338
|
+
const id = deliveryText(source?.id);
|
|
339
|
+
const sourceHash = deliveryText(revision?.sourceHash) ?? deliveryText(source?.latestRevision);
|
|
340
|
+
if (id && sourceHash) primary = {
|
|
341
|
+
kind: "chat_preview",
|
|
342
|
+
id,
|
|
343
|
+
title: deliveryText(source?.title) ?? "Preview",
|
|
344
|
+
status: "preview_ready",
|
|
345
|
+
revision: sourceHash,
|
|
346
|
+
capabilities: [
|
|
347
|
+
"preview",
|
|
348
|
+
"edit",
|
|
349
|
+
"continue_in_chat",
|
|
350
|
+
"fix"
|
|
351
|
+
]
|
|
352
|
+
};
|
|
329
353
|
} else if (mode === "settings") {
|
|
330
354
|
source = record(resultRecord.settings);
|
|
331
355
|
const id = deliveryText(source?.section);
|
|
@@ -342,10 +366,26 @@ function deliveryForXopcResult(mode, command, result, dryRun) {
|
|
|
342
366
|
};
|
|
343
367
|
}
|
|
344
368
|
if (!primary) return void 0;
|
|
369
|
+
const localAppSnapshotHash = mode === "local_app" ? deliveryText(record(resultRecord.snapshot)?.sourceHash) : void 0;
|
|
370
|
+
if (mode === "local_app" && !localAppSnapshotHash) return void 0;
|
|
371
|
+
const chatPreviewSourceHash = mode === "chat_preview" ? deliveryText(record(resultRecord.revision)?.sourceHash) ?? deliveryText(record(resultRecord.preview)?.latestRevision) : void 0;
|
|
372
|
+
if (mode === "chat_preview" && !chatPreviewSourceHash) return void 0;
|
|
345
373
|
return {
|
|
346
|
-
version:
|
|
374
|
+
version: 2,
|
|
347
375
|
operation: mode === "task" && deliveryText(resultRecord.runId) || mode === "automation" && (command === "run" || command === "rerun") || mode === "scene" && command === "check" ? "started" : command === "create" || mode === "scene" && command === "start" ? "created" : command === "get" || command === "resolve_workspace" || mode === "settings" ? "opened" : command === "validate" ? "completed" : "updated",
|
|
348
|
-
primary
|
|
376
|
+
primary,
|
|
377
|
+
...mode === "local_app" ? { presentation: {
|
|
378
|
+
kind: "inline_app",
|
|
379
|
+
reference: primary,
|
|
380
|
+
snapshot: { sourceHash: localAppSnapshotHash },
|
|
381
|
+
preferredHeight: 480
|
|
382
|
+
} } : {},
|
|
383
|
+
...mode === "chat_preview" ? { presentation: {
|
|
384
|
+
kind: "inline_preview",
|
|
385
|
+
reference: primary,
|
|
386
|
+
sourceHash: chatPreviewSourceHash,
|
|
387
|
+
preferredHeight: Number(source?.preferredHeight) || 480
|
|
388
|
+
} } : {}
|
|
349
389
|
};
|
|
350
390
|
}
|
|
351
391
|
function currentProjectId(args, deps) {
|
|
@@ -374,6 +414,52 @@ function optionalProjectWorkspaceRootArg(args) {
|
|
|
374
414
|
if (args.workspacePath !== void 0) return optionalString(args.workspacePath);
|
|
375
415
|
if (args.path !== void 0) return optionalString(args.path);
|
|
376
416
|
}
|
|
417
|
+
async function handleAgent(command, args, dryRun, capabilities, deps, toolCallId, signal) {
|
|
418
|
+
const readCommands = new Set(["list", "get"]);
|
|
419
|
+
const writeCommands = new Set([
|
|
420
|
+
"create",
|
|
421
|
+
"update",
|
|
422
|
+
"set_default",
|
|
423
|
+
"disable",
|
|
424
|
+
"delete",
|
|
425
|
+
"purge"
|
|
426
|
+
]);
|
|
427
|
+
if (!readCommands.has(command) && !writeCommands.has(command)) return {
|
|
428
|
+
ok: false,
|
|
429
|
+
error: `Unsupported agent command: ${command}`
|
|
430
|
+
};
|
|
431
|
+
const operation = `xopc.agents.${command}`;
|
|
432
|
+
const { idempotencyKey, ...fields } = args;
|
|
433
|
+
if (idempotencyKey !== void 0 && !trimString(idempotencyKey)) return {
|
|
434
|
+
ok: false,
|
|
435
|
+
error: "idempotencyKey must be a non-empty string"
|
|
436
|
+
};
|
|
437
|
+
const input = command === "list" ? {} : fields;
|
|
438
|
+
const caller = {
|
|
439
|
+
principalId: `agent:${deps.getCurrentAgentId?.() ?? "main"}`,
|
|
440
|
+
surface: "agent",
|
|
441
|
+
scopes: writeCommands.has(command) ? ["gateway.admin"] : ["agents.read"],
|
|
442
|
+
actor: {
|
|
443
|
+
kind: "agent",
|
|
444
|
+
id: deps.getCurrentAgentId?.() ?? "main"
|
|
445
|
+
},
|
|
446
|
+
authorize: deps.authorizeCapability ?? (() => true),
|
|
447
|
+
signal
|
|
448
|
+
};
|
|
449
|
+
if (dryRun && writeCommands.has(command)) return {
|
|
450
|
+
ok: true,
|
|
451
|
+
dryRun: true,
|
|
452
|
+
action: command,
|
|
453
|
+
input: await capabilities.validateInput(operation, input, caller)
|
|
454
|
+
};
|
|
455
|
+
const expected = writeCommands.has(command) ? {
|
|
456
|
+
...capabilities.describe(operation, caller),
|
|
457
|
+
idempotencyKey: trimString(idempotencyKey) ?? toolCallId
|
|
458
|
+
} : void 0;
|
|
459
|
+
const result = await capabilities.call(operation, input, caller, expected);
|
|
460
|
+
if (writeCommands.has(command)) deps.onAgentCatalogMutate?.();
|
|
461
|
+
return result;
|
|
462
|
+
}
|
|
377
463
|
async function handleProject(command, args, deps, dryRun, capabilities) {
|
|
378
464
|
const projects = deps.getProjectService?.();
|
|
379
465
|
if (!projects) return {
|
|
@@ -1173,7 +1259,7 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1173
1259
|
projects: projectService,
|
|
1174
1260
|
explicitAgentId,
|
|
1175
1261
|
projectId
|
|
1176
|
-
}) : explicitAgentId ?? (config ? getDefaultAgentId(
|
|
1262
|
+
}) : explicitAgentId ?? (config ? getDefaultAgentId() : deps.getCurrentAgentId?.() ?? "main");
|
|
1177
1263
|
const input = {
|
|
1178
1264
|
idempotencyKey: trimString(args.idempotencyKey) ?? randomUUID(),
|
|
1179
1265
|
title: trimString(args.title) ?? objective,
|
|
@@ -1530,6 +1616,63 @@ async function handleLocalApp(command, args, deps, dryRun) {
|
|
|
1530
1616
|
error: `Unsupported local_app command: ${command}`
|
|
1531
1617
|
};
|
|
1532
1618
|
}
|
|
1619
|
+
async function handleChatPreview(command, args, deps, dryRun) {
|
|
1620
|
+
const previews = deps.getChatPreviewService?.();
|
|
1621
|
+
if (!previews) return {
|
|
1622
|
+
ok: false,
|
|
1623
|
+
error: "Chat preview service is unavailable"
|
|
1624
|
+
};
|
|
1625
|
+
const id = trimString(args.previewId) ?? trimString(args.id);
|
|
1626
|
+
if (command === "create") {
|
|
1627
|
+
const conversationId = deps.getCurrentConversationId?.();
|
|
1628
|
+
if (!conversationId) return {
|
|
1629
|
+
ok: false,
|
|
1630
|
+
error: "A current conversation is required"
|
|
1631
|
+
};
|
|
1632
|
+
const input = ChatPreviewCreateInputSchema.parse(args);
|
|
1633
|
+
if (dryRun) return {
|
|
1634
|
+
ok: true,
|
|
1635
|
+
dryRun: true,
|
|
1636
|
+
action: "create_chat_preview",
|
|
1637
|
+
input
|
|
1638
|
+
};
|
|
1639
|
+
return {
|
|
1640
|
+
ok: true,
|
|
1641
|
+
...previews.create(conversationId, input)
|
|
1642
|
+
};
|
|
1643
|
+
}
|
|
1644
|
+
if (!id) return {
|
|
1645
|
+
ok: false,
|
|
1646
|
+
error: "previewId is required"
|
|
1647
|
+
};
|
|
1648
|
+
if (command === "get") {
|
|
1649
|
+
const preview = previews.get(id);
|
|
1650
|
+
return {
|
|
1651
|
+
ok: true,
|
|
1652
|
+
preview,
|
|
1653
|
+
revision: previews.getRevision(id, trimString(args.sourceHash) ?? preview.latestRevision)
|
|
1654
|
+
};
|
|
1655
|
+
}
|
|
1656
|
+
if (command === "revise") {
|
|
1657
|
+
const { previewId: _previewId, id: _id, ...rawInput } = args;
|
|
1658
|
+
const input = ChatPreviewReviseInputSchema.parse(rawInput);
|
|
1659
|
+
if (dryRun) return {
|
|
1660
|
+
ok: true,
|
|
1661
|
+
dryRun: true,
|
|
1662
|
+
action: "revise_chat_preview",
|
|
1663
|
+
previewId: id,
|
|
1664
|
+
input
|
|
1665
|
+
};
|
|
1666
|
+
return {
|
|
1667
|
+
ok: true,
|
|
1668
|
+
...previews.revise(id, input)
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
return {
|
|
1672
|
+
ok: false,
|
|
1673
|
+
error: `Unsupported chat_preview command: ${command}`
|
|
1674
|
+
};
|
|
1675
|
+
}
|
|
1533
1676
|
function createXopcUseTool(deps) {
|
|
1534
1677
|
const capabilities = createProductDispatcher(deps.getNotesService, {
|
|
1535
1678
|
getConfig: deps.getConfig,
|
|
@@ -1543,7 +1686,7 @@ function createXopcUseTool(deps) {
|
|
|
1543
1686
|
return {
|
|
1544
1687
|
name: "xopc_use",
|
|
1545
1688
|
label: "XOPC Use",
|
|
1546
|
-
description: "Operate first-class xopc objects through one safe entry point. Local App capabilities takes extensionId and discovers already granted bindings. Local App invoke requires extensionId, the discovered manifestDigest, capabilityId and a pinned call {majorVersion, descriptorDigest, input, idempotencyKey for writes}. Never manufacture grants or change a retry key after an uncertain write. Use for scenes, projects, automations, notes, tasks, TaskRuns, local apps, and exact settings jump targets instead of editing storage files directly. For non-trivial object changes, load the built-in manual first with tool_manual({ tool: \"xopc_use\" }).",
|
|
1689
|
+
description: "Operate first-class xopc objects through one safe entry point. Use chat_preview for lightweight UI mockups in the current conversation; do not create a Local App unless the user asks for a durable app. Local App capabilities takes extensionId and discovers already granted bindings. Local App invoke requires extensionId, the discovered manifestDigest, capabilityId and a pinned call {majorVersion, descriptorDigest, input, idempotencyKey for writes}. Never manufacture grants or change a retry key after an uncertain write. Use for Agents, scenes, projects, automations, notes, tasks, TaskRuns, chat previews, local apps, and exact settings jump targets instead of editing storage files directly. For non-trivial object changes, load the built-in manual first with tool_manual({ tool: \"xopc_use\" }).",
|
|
1547
1690
|
parameters: XopcUseToolSchema,
|
|
1548
1691
|
mutatesWorkspace: true,
|
|
1549
1692
|
mutationScope: "external",
|
|
@@ -1719,15 +1862,22 @@ function createXopcUseTool(deps) {
|
|
|
1719
1862
|
authorize: deps.authorizeCapability ?? (() => true),
|
|
1720
1863
|
signal
|
|
1721
1864
|
};
|
|
1722
|
-
const
|
|
1723
|
-
|
|
1865
|
+
const id = args.localAppId ?? args.id;
|
|
1866
|
+
const result = await capabilities.call(`xopc.local_apps.${command}`, command === "list" ? {} : { id }, caller);
|
|
1867
|
+
if (command === "validate") Object.assign(result, await capabilities.call("xopc.local_apps.get", { id }, caller));
|
|
1868
|
+
const appId = deliveryText(record(result.app)?.id);
|
|
1869
|
+
const snapshot = appId && command !== "list" ? deps.getLocalAppService?.()?.materializeSnapshot(appId) : void 0;
|
|
1870
|
+
const deliveryResult = snapshot ? {
|
|
1871
|
+
...result,
|
|
1872
|
+
snapshot
|
|
1873
|
+
} : result;
|
|
1724
1874
|
return okText({
|
|
1725
1875
|
...details,
|
|
1726
1876
|
result: {
|
|
1727
1877
|
ok: true,
|
|
1728
1878
|
...result
|
|
1729
1879
|
},
|
|
1730
|
-
delivery: deliveryForXopcResult(mode, command,
|
|
1880
|
+
delivery: deliveryForXopcResult(mode, command, deliveryResult, dryRun)
|
|
1731
1881
|
});
|
|
1732
1882
|
}
|
|
1733
1883
|
if (mode === "task" && command === "metrics") {
|
|
@@ -1976,14 +2126,20 @@ function createXopcUseTool(deps) {
|
|
|
1976
2126
|
kind: "xopc_use",
|
|
1977
2127
|
toolCallId
|
|
1978
2128
|
}
|
|
1979
|
-
}, async () => mode === "scene" ? await handleScene(command, args, deps, dryRun) : mode === "project" ? await handleProject(command, args, deps, dryRun, capabilities) : mode === "automation" ? await handleAutomation(command, args, deps, dryRun, capabilities) : mode === "note" ? await handleNote(command, args, deps, dryRun, capabilities) : mode === "task" ? await handleTask(command, args, deps, dryRun, capabilities) : mode === "task_run" ? await handleTaskRun(command, args, dryRun, deps, capabilities) : mode === "local_app" ? await handleLocalApp(command, args, deps, dryRun) : {
|
|
2129
|
+
}, async () => mode === "scene" ? await handleScene(command, args, deps, dryRun) : mode === "agent" ? await handleAgent(command, args, dryRun, capabilities, deps, toolCallId, signal) : mode === "project" ? await handleProject(command, args, deps, dryRun, capabilities) : mode === "automation" ? await handleAutomation(command, args, deps, dryRun, capabilities) : mode === "note" ? await handleNote(command, args, deps, dryRun, capabilities) : mode === "task" ? await handleTask(command, args, deps, dryRun, capabilities) : mode === "task_run" ? await handleTaskRun(command, args, dryRun, deps, capabilities) : mode === "local_app" ? await handleLocalApp(command, args, deps, dryRun) : mode === "chat_preview" ? await handleChatPreview(command, args, deps, dryRun) : {
|
|
1980
2130
|
ok: false,
|
|
1981
2131
|
error: `Unsupported mode: ${String(mode)}`
|
|
1982
2132
|
});
|
|
2133
|
+
const resultRecord = record(result);
|
|
2134
|
+
const createdAppId = deliveryText((mode === "local_app" && command === "create" ? record(resultRecord.app) : void 0)?.id);
|
|
2135
|
+
const deliveryResult = createdAppId ? {
|
|
2136
|
+
...resultRecord,
|
|
2137
|
+
snapshot: deps.getLocalAppService?.()?.materializeSnapshot(createdAppId)
|
|
2138
|
+
} : result;
|
|
1983
2139
|
return okText({
|
|
1984
2140
|
...details,
|
|
1985
2141
|
result,
|
|
1986
|
-
delivery: deliveryForXopcResult(mode, command,
|
|
2142
|
+
delivery: deliveryForXopcResult(mode, command, deliveryResult, dryRun)
|
|
1987
2143
|
});
|
|
1988
2144
|
} catch (err) {
|
|
1989
2145
|
return errorText(err instanceof Error ? err.message : String(err), details);
|
|
@@ -3,8 +3,7 @@ import { AgentToolsFactory } from "../tools/factory.js";
|
|
|
3
3
|
//#region src/agent/workflow/workflow-child-tools.ts
|
|
4
4
|
/** Builds the tool set for workflow child agents (wired from gateway to avoid cycles). */
|
|
5
5
|
function buildWorkflowChildTools(childOptions) {
|
|
6
|
-
const
|
|
7
|
-
const profile = config ? childOptions.browserConversationId ? resolveEffectiveAgentProfileForSession(config, childOptions.browserConversationId) : childOptions.agentId ? resolveEffectiveAgentProfile(config, childOptions.agentId) : resolveEffectiveAgentProfileForSession(config, void 0) : void 0;
|
|
6
|
+
const profile = childOptions.getConfig() ? childOptions.browserConversationId ? resolveEffectiveAgentProfileForSession(childOptions.browserConversationId) : childOptions.agentId ? resolveEffectiveAgentProfile(childOptions.agentId) : resolveEffectiveAgentProfileForSession(void 0) : void 0;
|
|
8
7
|
return new AgentToolsFactory({
|
|
9
8
|
workspace: childOptions.workspace,
|
|
10
9
|
bus: childOptions.bus,
|
|
@@ -48,7 +48,7 @@ export declare class WorkspaceRuntimeRegistry {
|
|
|
48
48
|
values(): IterableIterator<WorkspaceRuntime>;
|
|
49
49
|
/**
|
|
50
50
|
* Tear down every runtime (shutdown memory providers) and forget the cache.
|
|
51
|
-
* Used by `AgentManager.
|
|
51
|
+
* Used by `AgentManager.updateRuntimeConfiguration` and `AgentManager.dispose`.
|
|
52
52
|
*/
|
|
53
53
|
clearAll(): Promise<void>;
|
|
54
54
|
}
|
|
@@ -23,7 +23,7 @@ var WorkspaceRuntimeRegistry = class {
|
|
|
23
23
|
/** Lazily construct and cache an agent-scoped runtime for a workspace. */
|
|
24
24
|
getOrCreate(resolvedPath, requestedAgentId) {
|
|
25
25
|
const cfg = this.getConfig();
|
|
26
|
-
const runtimeKey = `${normalizeAgentId(requestedAgentId?.trim() || resolveAgentIdForWorkspacePath(
|
|
26
|
+
const runtimeKey = `${normalizeAgentId(requestedAgentId?.trim() || resolveAgentIdForWorkspacePath(resolvedPath))}\u0000${resolvedPath}`;
|
|
27
27
|
const existing = this.runtimes.get(runtimeKey);
|
|
28
28
|
if (existing) return existing;
|
|
29
29
|
const { memoryManager } = this.userContextRuntimes.getOrCreate(cfg);
|
|
@@ -50,7 +50,7 @@ var WorkspaceRuntimeRegistry = class {
|
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
52
|
* Tear down every runtime (shutdown memory providers) and forget the cache.
|
|
53
|
-
* Used by `AgentManager.
|
|
53
|
+
* Used by `AgentManager.updateRuntimeConfiguration` and `AgentManager.dispose`.
|
|
54
54
|
*/
|
|
55
55
|
async clearAll() {
|
|
56
56
|
this.runtimes.clear();
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { AgentEntrySchema, EffectiveAgentConfigSchema } from "../agent-config/schema.js";
|
|
2
|
+
import { resolveEffectiveAgentConfig } from "../agent-config/resolver.js";
|
|
3
|
+
import { init_agent_config } from "../agent-config/index.js";
|
|
4
|
+
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
5
|
+
import { defineAtomicCapability, defineReadCapability } from "../capabilities/runtime/dispatcher.js";
|
|
6
|
+
import { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
7
|
+
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
8
|
+
import { AgentCatalogService } from "./service.js";
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
//#region src/agent-catalog/capabilities.ts
|
|
11
|
+
init_agent_config();
|
|
12
|
+
init_agent_scope();
|
|
13
|
+
init_repository();
|
|
14
|
+
const AgentIdInputSchema = z.strictObject({ id: AgentEntrySchema.shape.id });
|
|
15
|
+
const EmptyInputSchema = z.strictObject({});
|
|
16
|
+
const StoredAgentSchema = AgentEntrySchema.extend({
|
|
17
|
+
revision: z.number().int().positive(),
|
|
18
|
+
provisioningState: z.enum([
|
|
19
|
+
"pending",
|
|
20
|
+
"ready",
|
|
21
|
+
"error"
|
|
22
|
+
]),
|
|
23
|
+
provisioningError: z.string().optional(),
|
|
24
|
+
createdAt: z.number().int().nonnegative(),
|
|
25
|
+
updatedAt: z.number().int().nonnegative(),
|
|
26
|
+
deletedAt: z.number().int().nonnegative().optional()
|
|
27
|
+
});
|
|
28
|
+
const AgentViewSchema = z.object({
|
|
29
|
+
agent: StoredAgentSchema,
|
|
30
|
+
effective: EffectiveAgentConfigSchema
|
|
31
|
+
});
|
|
32
|
+
const AgentMutationOutputSchema = AgentViewSchema.extend({ ok: z.literal(true) });
|
|
33
|
+
const AgentListOutputSchema = z.object({
|
|
34
|
+
ok: z.literal(true),
|
|
35
|
+
defaultAgentId: AgentEntrySchema.shape.id,
|
|
36
|
+
catalogRevision: z.number().int().positive(),
|
|
37
|
+
agents: z.array(AgentViewSchema)
|
|
38
|
+
});
|
|
39
|
+
const AgentUpdateInputSchema = z.strictObject({
|
|
40
|
+
id: AgentEntrySchema.shape.id,
|
|
41
|
+
expectedRevision: z.number().int().positive(),
|
|
42
|
+
patch: AgentEntrySchema.omit({ id: true }).partial()
|
|
43
|
+
});
|
|
44
|
+
const AgentSetDefaultInputSchema = z.strictObject({
|
|
45
|
+
id: AgentEntrySchema.shape.id,
|
|
46
|
+
expectedRevision: z.number().int().positive()
|
|
47
|
+
});
|
|
48
|
+
const AgentDeleteOutputSchema = z.object({
|
|
49
|
+
ok: z.literal(true),
|
|
50
|
+
deleted: z.literal(true),
|
|
51
|
+
agent: StoredAgentSchema,
|
|
52
|
+
removedBindings: z.number().int().nonnegative()
|
|
53
|
+
});
|
|
54
|
+
function effective(repository, agent) {
|
|
55
|
+
const { revision: _revision, provisioningState: _state, provisioningError: _error, createdAt: _created, updatedAt: _updated, deletedAt: _deleted, ...entry } = agent;
|
|
56
|
+
return resolveEffectiveAgentConfig({
|
|
57
|
+
defaults: repository.getSettings().defaults,
|
|
58
|
+
agent: entry,
|
|
59
|
+
defaultWorkspace: resolveAgentWorkspaceDir
|
|
60
|
+
}).config;
|
|
61
|
+
}
|
|
62
|
+
function view(repository, agent) {
|
|
63
|
+
return {
|
|
64
|
+
agent,
|
|
65
|
+
effective: effective(repository, agent)
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function requireAgent(repository, id) {
|
|
69
|
+
const agent = repository.get(id);
|
|
70
|
+
if (!agent) throw new CapabilityError("NOT_FOUND", `Agent "${id}" not found`);
|
|
71
|
+
return agent;
|
|
72
|
+
}
|
|
73
|
+
function translateMutationError(execute) {
|
|
74
|
+
try {
|
|
75
|
+
return execute();
|
|
76
|
+
} catch (error) {
|
|
77
|
+
if (error instanceof CapabilityError) throw error;
|
|
78
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
79
|
+
throw new CapabilityError(/not found/i.test(message) ? "NOT_FOUND" : /conflict|already exists|default Agent|cannot be disabled|not available/i.test(message) ? "REVISION_CONFLICT" : "INVALID_INPUT", message);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/** Register Agent catalog operations for UI, HTTP, CLI, and conversational tools. */
|
|
83
|
+
function registerAgentCapabilities(dispatcher) {
|
|
84
|
+
const repository = new AgentCatalogRepository();
|
|
85
|
+
const service = new AgentCatalogService(repository);
|
|
86
|
+
const readPolicy = {
|
|
87
|
+
majorVersion: 1,
|
|
88
|
+
effect: "read",
|
|
89
|
+
surfaces: [
|
|
90
|
+
"http",
|
|
91
|
+
"agent",
|
|
92
|
+
"cli"
|
|
93
|
+
],
|
|
94
|
+
scopes: ["agents.read"]
|
|
95
|
+
};
|
|
96
|
+
const writePolicy = {
|
|
97
|
+
majorVersion: 1,
|
|
98
|
+
effect: "local-write",
|
|
99
|
+
surfaces: [
|
|
100
|
+
"http",
|
|
101
|
+
"agent",
|
|
102
|
+
"cli"
|
|
103
|
+
],
|
|
104
|
+
scopes: ["gateway.admin"]
|
|
105
|
+
};
|
|
106
|
+
dispatcher.register(defineReadCapability({
|
|
107
|
+
...readPolicy,
|
|
108
|
+
id: "xopc.agents.list",
|
|
109
|
+
description: "List Agent definitions with their effective inherited configuration.",
|
|
110
|
+
input: EmptyInputSchema,
|
|
111
|
+
output: AgentListOutputSchema,
|
|
112
|
+
execute() {
|
|
113
|
+
const settings = repository.getSettings();
|
|
114
|
+
return {
|
|
115
|
+
ok: true,
|
|
116
|
+
defaultAgentId: settings.defaultAgentId,
|
|
117
|
+
catalogRevision: settings.revision,
|
|
118
|
+
agents: repository.list().map((agent) => view(repository, agent))
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}));
|
|
122
|
+
dispatcher.register(defineReadCapability({
|
|
123
|
+
...readPolicy,
|
|
124
|
+
id: "xopc.agents.get",
|
|
125
|
+
description: "Read one Agent definition and its effective inherited configuration.",
|
|
126
|
+
input: AgentIdInputSchema,
|
|
127
|
+
output: AgentMutationOutputSchema,
|
|
128
|
+
execute({ id }) {
|
|
129
|
+
return {
|
|
130
|
+
ok: true,
|
|
131
|
+
...view(repository, requireAgent(repository, id))
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}));
|
|
135
|
+
dispatcher.register(defineAtomicCapability({
|
|
136
|
+
...writePolicy,
|
|
137
|
+
id: "xopc.agents.create",
|
|
138
|
+
description: "Create a complete Agent definition and queue recoverable directory provisioning.",
|
|
139
|
+
input: AgentEntrySchema,
|
|
140
|
+
output: AgentMutationOutputSchema,
|
|
141
|
+
execute(input) {
|
|
142
|
+
return {
|
|
143
|
+
ok: true,
|
|
144
|
+
...view(repository, translateMutationError(() => repository.create(input)))
|
|
145
|
+
};
|
|
146
|
+
},
|
|
147
|
+
afterCommit: () => service.resumePendingProvisioning()
|
|
148
|
+
}));
|
|
149
|
+
dispatcher.register(defineAtomicCapability({
|
|
150
|
+
...writePolicy,
|
|
151
|
+
id: "xopc.agents.update",
|
|
152
|
+
description: "Update an Agent at an exact revision.",
|
|
153
|
+
input: AgentUpdateInputSchema,
|
|
154
|
+
output: AgentMutationOutputSchema,
|
|
155
|
+
execute({ id, expectedRevision, patch }) {
|
|
156
|
+
const { revision: _revision, provisioningState: _state, provisioningError: _error, createdAt: _created, updatedAt: _updated, deletedAt: _deleted, ...entry } = requireAgent(repository, id);
|
|
157
|
+
return {
|
|
158
|
+
ok: true,
|
|
159
|
+
...view(repository, translateMutationError(() => repository.update(id, expectedRevision, {
|
|
160
|
+
...entry,
|
|
161
|
+
...patch,
|
|
162
|
+
id
|
|
163
|
+
}, { reprovision: true })))
|
|
164
|
+
};
|
|
165
|
+
},
|
|
166
|
+
afterCommit: () => service.resumePendingProvisioning()
|
|
167
|
+
}));
|
|
168
|
+
dispatcher.register(defineAtomicCapability({
|
|
169
|
+
...writePolicy,
|
|
170
|
+
id: "xopc.agents.set_default",
|
|
171
|
+
description: "Select the global default Agent at an exact catalog revision.",
|
|
172
|
+
input: AgentSetDefaultInputSchema,
|
|
173
|
+
output: z.object({
|
|
174
|
+
ok: z.literal(true),
|
|
175
|
+
defaultAgentId: AgentEntrySchema.shape.id,
|
|
176
|
+
catalogRevision: z.number().int().positive()
|
|
177
|
+
}),
|
|
178
|
+
execute({ id, expectedRevision }) {
|
|
179
|
+
const settings = translateMutationError(() => repository.setDefault(id, expectedRevision));
|
|
180
|
+
return {
|
|
181
|
+
ok: true,
|
|
182
|
+
defaultAgentId: settings.defaultAgentId,
|
|
183
|
+
catalogRevision: settings.revision
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}));
|
|
187
|
+
dispatcher.register(defineAtomicCapability({
|
|
188
|
+
...writePolicy,
|
|
189
|
+
id: "xopc.agents.disable",
|
|
190
|
+
description: "Disable a non-default Agent at an exact revision.",
|
|
191
|
+
input: z.strictObject({
|
|
192
|
+
id: AgentEntrySchema.shape.id,
|
|
193
|
+
expectedRevision: z.number().int().positive()
|
|
194
|
+
}),
|
|
195
|
+
output: AgentMutationOutputSchema,
|
|
196
|
+
execute({ id, expectedRevision }) {
|
|
197
|
+
const { revision: _revision, provisioningState: _state, provisioningError: _error, createdAt: _created, updatedAt: _updated, deletedAt: _deleted, ...entry } = requireAgent(repository, id);
|
|
198
|
+
return {
|
|
199
|
+
ok: true,
|
|
200
|
+
...view(repository, translateMutationError(() => repository.update(id, expectedRevision, {
|
|
201
|
+
...entry,
|
|
202
|
+
enabled: false,
|
|
203
|
+
id
|
|
204
|
+
})))
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
}));
|
|
208
|
+
for (const purge of [false, true]) dispatcher.register(defineAtomicCapability({
|
|
209
|
+
...writePolicy,
|
|
210
|
+
id: purge ? "xopc.agents.purge" : "xopc.agents.delete",
|
|
211
|
+
description: purge ? "Delete an Agent and remove its state and workspace after commit." : "Delete an Agent definition without removing workspace files.",
|
|
212
|
+
input: z.strictObject({
|
|
213
|
+
id: AgentEntrySchema.shape.id,
|
|
214
|
+
expectedRevision: z.number().int().positive()
|
|
215
|
+
}),
|
|
216
|
+
output: AgentDeleteOutputSchema,
|
|
217
|
+
...purge ? { prepare: ({ id, expectedRevision }) => {
|
|
218
|
+
const current = requireAgent(repository, id);
|
|
219
|
+
if (current.revision !== expectedRevision) throw new CapabilityError("REVISION_CONFLICT", "Agent changed");
|
|
220
|
+
service.validatePurgeEntry(current, repository.getSettings().defaultAgentId);
|
|
221
|
+
} } : {},
|
|
222
|
+
execute({ id, expectedRevision }) {
|
|
223
|
+
if (requireAgent(repository, id).revision !== expectedRevision) throw new CapabilityError("REVISION_CONFLICT", "Agent changed");
|
|
224
|
+
const result = translateMutationError(() => repository.delete(id, { purge }));
|
|
225
|
+
return {
|
|
226
|
+
ok: true,
|
|
227
|
+
deleted: true,
|
|
228
|
+
agent: result.agent,
|
|
229
|
+
removedBindings: result.removedBindings
|
|
230
|
+
};
|
|
231
|
+
},
|
|
232
|
+
...purge ? { afterCommit: async () => {
|
|
233
|
+
if ((await service.resumePendingPurge()).length) throw new CapabilityError("UNAVAILABLE", "Agent was deleted; data purge is pending retry");
|
|
234
|
+
} } : {}
|
|
235
|
+
}));
|
|
236
|
+
}
|
|
237
|
+
//#endregion
|
|
238
|
+
export { registerAgentCapabilities };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const DEFAULT_AGENT_ID = "main";
|
|
2
|
+
/** Normalized id segment safe for directory names under `agents/<id>/`. */
|
|
3
|
+
export declare const STRICT_AGENT_ID_RE: RegExp;
|
|
4
|
+
/** Path-safe agent id. */
|
|
5
|
+
export declare function normalizeAgentId(value: string | undefined | null): string;
|
|
6
|
+
/** Derive a folder-safe id, including for display names with no ASCII characters. */
|
|
7
|
+
export declare function deriveAgentIdFromDisplayName(displayName: string): string;
|
|
8
|
+
/** Validate a new Agent id before it becomes a filesystem path segment. */
|
|
9
|
+
export declare function validateAgentIdForNewAgent(explicitId: string | undefined | null, displayNameForDerivation: string): {
|
|
10
|
+
ok: true;
|
|
11
|
+
agentId: string;
|
|
12
|
+
} | {
|
|
13
|
+
ok: false;
|
|
14
|
+
error: string;
|
|
15
|
+
};
|