@xopcai/xopc 0.0.284 → 0.0.286
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-DB30ywek.js → auth-BXCWrPlg.js} +1 -1
- package/dist/browser-ext/dist/background.js +2 -2
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +136 -136
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/gateway-setup.js +14 -14
- package/dist/extensions/feishu/src/state/message-bindings.d.ts +1 -1
- package/dist/extensions/feishu/src/state/thread-bindings.d.ts +4 -4
- package/dist/extensions/feishu/src/state/thread-bindings.js +6 -6
- package/dist/extensions/feishu/src/subagent-hooks.d.ts +1 -1
- package/dist/extensions/feishu/src/subagent-hooks.js +5 -5
- package/dist/extensions/feishu/src/transport/socket-mode/monitor.js +9 -9
- package/dist/extensions/feishu/src/transport/webhook/monitor.js +4 -4
- package/dist/extensions/feishu/src/workflow-progress.d.ts +1 -1
- package/dist/extensions/feishu/src/workflow-progress.js +8 -7
- package/dist/extensions/telegram/src/approval-store.d.ts +2 -2
- package/dist/extensions/telegram/src/approval-store.js +1 -1
- package/dist/extensions/telegram/src/command-handler.d.ts +2 -2
- package/dist/extensions/telegram/src/command-handler.js +8 -8
- package/dist/extensions/telegram/src/delivery-chat-id.d.ts +1 -1
- package/dist/extensions/telegram/src/delivery-chat-id.js +7 -3
- package/dist/extensions/telegram/src/exec-approval-handler.js +1 -1
- package/dist/extensions/telegram/src/focus-handler.d.ts +2 -2
- package/dist/extensions/telegram/src/focus-handler.js +10 -10
- package/dist/extensions/telegram/src/inbound-processor.d.ts +3 -3
- package/dist/extensions/telegram/src/inbound-processor.js +11 -11
- package/dist/extensions/telegram/src/plugin.js +5 -5
- package/dist/extensions/telegram/src/routing-integration.d.ts +1 -1
- package/dist/extensions/telegram/src/routing-integration.js +19 -21
- package/dist/extensions/telegram/src/thread-bindings.d.ts +1 -1
- package/dist/extensions/telegram/src/workflow-progress.js +8 -7
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/auth/login-qr.d.ts +4 -4
- package/dist/extensions/weixin/src/auth/login-qr.js +21 -21
- package/dist/extensions/weixin/src/auth/weixin-account-id.d.ts +1 -1
- package/dist/extensions/weixin/src/auth/weixin-account-id.js +1 -1
- package/dist/extensions/weixin/src/cli/gateway-qr-login.d.ts +2 -2
- package/dist/extensions/weixin/src/cli/gateway-qr-login.js +13 -13
- package/dist/extensions/weixin/src/cli/qr-login.js +1 -1
- package/dist/extensions/weixin/src/delivery-to.js +6 -2
- package/dist/extensions/weixin/src/messaging/inbound.d.ts +1 -1
- package/dist/extensions/weixin/src/messaging/inbound.js +1 -1
- package/dist/extensions/weixin/src/messaging/process-message.js +3 -3
- package/dist/extensions/weixin/src/plugin.js +5 -5
- package/dist/extensions/weixin/src/routing-integration.d.ts +1 -1
- package/dist/extensions/weixin/src/routing-integration.js +3 -3
- package/dist/extensions/weixin/src/workflow-progress.d.ts +1 -1
- package/dist/extensions/weixin/src/workflow-progress.js +7 -6
- package/dist/gateway/static/root/assets/{activity-store-CwbIMGLY.js → activity-store-xOhV8FHx.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-DjiOld-S.js → agent-avatar-dicebear-BzQbYWEj.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BxR5eog4.js +1 -0
- package/dist/gateway/static/root/assets/agents-Dx1om1eN.js +1 -0
- package/dist/gateway/static/root/assets/{api-3lphBVuY.js → api-CVJQLBv9.js} +1 -1
- package/dist/gateway/static/root/assets/api-q1kIMCLW.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-B2nwCXxE.js → app-management-settings-panel-CTyuXkNC.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BXO4Ej88.js → appearance-settings-Tk-GJtvF.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-BA-7OrhJ.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-6ZRqNjla.js → archive-plugin-O49jeeXo.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-CmPZalcW.js → attachment-load-r9lBF2tW.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Bc3WbK5n.js → automations-page-CFFLXYgS.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DUZE1NOH.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-OWR6cxpc.js → binary-plugins-BpM43vsn.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-Ca-tDQXm.js → block-editor-DFrfEcGw.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-Dxy2_p3U.js → browser-automation-inputs-CyHGQwxQ.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-CibQIxpi.js → browser-automations-page-CPkOWfM9.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-BOcseZxg.js +8 -0
- package/dist/gateway/static/root/assets/button-CGlRPNzi.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-ohEV64hG.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-UOf9mgqt.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-Bh-G9mdZ.js → channels-status-swr-BArPeImO.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-lbzbSpV3.js → chat-terminal-dock-D5Aka4S8.js} +2 -2
- package/dist/gateway/static/root/assets/connectors-page-BEQR0NRq.js +2 -0
- package/dist/gateway/static/root/assets/{cron-expression-CjrWuy2m.js → cron-expression-GDPX4NxC.js} +1 -1
- package/dist/gateway/static/root/assets/{date-picker-tYvbTfZT.js → date-picker-DNtRu6EB.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-B8yo7-7V.js → dependency-picker-Dng3dIQa.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-BicYycxy.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-settings-DNeVGZNp.js → desktop-pet-settings-BEse55eX.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-be30HuFI.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-CiK0QI2p.js → extension-debug-page-YzhYyuay.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CirPNHJd.js → extension-page-CEXVIkDl.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-CrlbgK8g.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-Co4hHe0i.js → gateway-config-swr-BNuoHXiZ.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-CDJY1AOW.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DBPNJG-e.js → gateway-startup-retry-zMPfje0n.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-BtxitqZ3.js +1 -0
- package/dist/gateway/static/root/assets/home-page-_oqo0pNR.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-D0rMTumD.js → image-generation-api-B_Tyx74A.js} +1 -1
- package/dist/gateway/static/root/assets/imports-page-eZciuLw_.js +1 -0
- package/dist/gateway/static/root/assets/index--YC42LAz.css +2 -0
- package/dist/gateway/static/root/assets/index-fVtuw2o9.js +75 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CMUaF61L.js → keyboard-shortcuts-settings-B796W039.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-Z8mpau9d.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-CHxyT09t.js → local-apps-page-DXmY5jwM.js} +1 -1
- package/dist/gateway/static/root/assets/locale-store-D0001I7p.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-BGOO8ouT.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-jXbA2S54.js → management-settings-b1MG7s-3.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-CKInRsDh.js → markdown-view-2txE_Blz.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-BaPkSvW7.js → media-plugins-CDEf3ksI.js} +1 -1
- package/dist/gateway/static/root/assets/messages-BWANv-N-.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-Bm33_3xJ.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-C32-xssK.js +8 -0
- package/dist/gateway/static/root/assets/page-tabs-Bi_-DA5J.js +1 -0
- package/dist/gateway/static/root/assets/popover-select-DldSX8GX.js +1 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-DzgF1yYO.js → preview-open-alternatives-Dhfdf14p.js} +1 -1
- package/dist/gateway/static/root/assets/proactive-page-BNouL7Tv.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-iQ-eW6Aj.js → product-open-page-BkbZBqBr.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-CZ7glGYw.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DP3ZINZz.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-DMNudT60.js → registry-api-icwoEKYB.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-xqJcPdOO.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-u_wVepf7.js → runtime-tools-settings-panel-bmgxwWpW.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-YdZj2xdI.js → schema-form-DoZeepCg.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-BaxIfjpm.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cy3Ab3Vg.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-sw2bbS2b.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-CV8kVdnE.js → settings-page-BWF8uac0.js} +1 -1
- package/dist/gateway/static/root/assets/settings-page-layout-CsUQKRq0.js +1 -0
- package/dist/gateway/static/root/assets/setup-status-panel-BuYto2mT.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-BHwjHlrV.js → share-preview-page-BIHYD6-O.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DKtWUneq.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-Dn7ElMUk.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-DRKdb6O5.js → skills-page-D-7UtJIc.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-DYfaLtts.js → skills-page.utils-dvue6Ish.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CWrWpKV-.js → system-settings-panel-DCyxPWCl.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-efmH43Pq.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-CDc7Wqy5.js → theme-store-CZwYGpbY.js} +1 -1
- package/dist/gateway/static/root/assets/tunnel-api-__auf8Ww.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-D-FRib85.js → use-autosave-Iq83UDt3.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-DByIJcQq.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-iQ7EBzII.js → voice-api-key-field-D-QssKik.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-DNMWA2tx.js → voice-config-api-B0wNN_tE.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BesuhDlH.js → work-discovery-overlay-5NRYg1iI.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Du81FoCy.js → workflow-run-setup-panel-Ds2SZjLG.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-BJv3eoKR.js +6 -0
- package/dist/gateway/static/root/index.html +12 -12
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-protocol/src/index.js +312 -305
- package/dist/packages/gateway-contract/src/agent-stream.js +6 -0
- package/dist/packages/gateway-contract/src/automations.js +215 -0
- package/dist/packages/gateway-contract/src/browser-page-context.js +48 -39
- package/dist/packages/gateway-contract/src/browser-tab-binding.js +30 -25
- package/dist/packages/gateway-contract/src/clarifications.js +6 -0
- package/dist/packages/gateway-contract/src/connection-waits.js +6 -0
- package/dist/packages/gateway-contract/src/conversation-identity.js +17 -0
- package/dist/packages/gateway-contract/src/device-pairing.js +84 -78
- package/dist/packages/gateway-contract/src/discussions.js +19 -15
- package/dist/packages/gateway-contract/src/files.js +55 -0
- package/dist/packages/gateway-contract/src/home.js +188 -0
- package/dist/packages/gateway-contract/src/index.js +65 -0
- package/dist/packages/gateway-contract/src/mobile-privacy.js +26 -0
- package/dist/packages/gateway-contract/src/model-selection.js +4 -1
- package/dist/packages/gateway-contract/src/new-session.js +5 -1
- package/dist/packages/gateway-contract/src/notifications.js +64 -59
- package/dist/packages/gateway-contract/src/proactive.js +133 -119
- package/dist/packages/gateway-contract/src/product-delivery.js +56 -50
- package/dist/packages/gateway-contract/src/project-monitoring.js +33 -28
- package/dist/packages/gateway-contract/src/project-operating.js +100 -0
- package/dist/packages/gateway-contract/src/session-identity.js +38 -34
- package/dist/packages/gateway-contract/src/session-input-reliability.js +6 -0
- package/dist/packages/gateway-contract/src/sessions.js +145 -0
- package/dist/packages/gateway-contract/src/task-lifecycle.js +69 -64
- package/dist/packages/gateway-contract/src/task-runs.js +80 -75
- package/dist/packages/gateway-contract/src/tasks.js +445 -438
- package/dist/packages/gateway-contract/src/tool-activity.js +154 -149
- package/dist/packages/gateway-contract/src/turn-outcome.js +118 -112
- package/dist/packages/gateway-contract/src/user-message-display.js +13 -8
- package/dist/packages/gateway-contract/src/welcome-suggestions.js +6 -0
- package/dist/packages/realtime-client/src/index.js +1 -1
- package/dist/packages/realtime-protocol/src/index.js +4 -2
- package/dist/packages/realtime-protocol/src/voice.js +4 -4
- package/dist/src/activity/types.d.ts +1 -1
- package/dist/src/agent/agent-instance-gateway.d.ts +18 -18
- package/dist/src/agent/agent-manager.d.ts +27 -27
- package/dist/src/agent/agent-manager.js +180 -179
- package/dist/src/agent/background-review/coordinator.d.ts +3 -3
- package/dist/src/agent/background-review/coordinator.js +10 -10
- package/dist/src/agent/background-review/run-background-review.d.ts +1 -1
- package/dist/src/agent/background-review/run-background-review.js +14 -14
- package/dist/src/agent/bootstrap/bootstrap-cache.d.ts +4 -4
- package/dist/src/agent/bootstrap/bootstrap-cache.js +9 -9
- package/dist/src/agent/bootstrap/bootstrap-files.d.ts +4 -4
- package/dist/src/agent/bootstrap/bootstrap-files.js +9 -9
- package/dist/src/agent/bootstrap/filter-bootstrap-files.d.ts +1 -1
- package/dist/src/agent/bootstrap/filter-bootstrap-files.js +3 -3
- package/dist/src/agent/child-agent-factory.d.ts +3 -3
- package/dist/src/agent/child-agent-factory.js +5 -5
- package/dist/src/agent/coding/repository-instructions.js +1 -1
- package/dist/src/agent/coding/workspace-revision.js +1 -1
- package/dist/src/agent/commands/command-isolation.js +1 -1
- package/dist/src/agent/commands/command-registry.js +2 -1
- package/dist/src/agent/context/audit.d.ts +2 -2
- package/dist/src/agent/context/audit.js +5 -4
- package/dist/src/agent/context/coordinator.d.ts +6 -6
- package/dist/src/agent/context/coordinator.js +13 -13
- package/dist/src/agent/context/execution-context.js +4 -3
- package/dist/src/agent/context/execution-scope.d.ts +3 -3
- package/dist/src/agent/context/execution-scope.js +13 -13
- package/dist/src/agent/context/project-context.d.ts +1 -1
- package/dist/src/agent/context/project-context.js +4 -4
- package/dist/src/agent/embedded/execution-context.d.ts +1 -1
- package/dist/src/agent/embedded/execution-context.js +3 -3
- package/dist/src/agent/embedded/index.d.ts +1 -1
- package/dist/src/agent/embedded/index.js +2 -2
- package/dist/src/agent/embedded/run-for-session.d.ts +1 -1
- package/dist/src/agent/embedded/run-for-session.js +78 -104
- package/dist/src/agent/embedded/run-turn.js +77 -33
- package/dist/src/agent/embedded/runs.d.ts +11 -11
- package/dist/src/agent/embedded/runs.js +22 -22
- package/dist/src/agent/embedded/session-runner.d.ts +2 -2
- package/dist/src/agent/embedded/session-runner.js +5 -5
- package/dist/src/agent/embedded/session-tool-result-guard.d.ts +2 -2
- package/dist/src/agent/embedded/session-tool-result-guard.js +8 -8
- package/dist/src/agent/embedded/sqlite-hydrating-session-manager.d.ts +2 -2
- package/dist/src/agent/embedded/sqlite-hydrating-session-manager.js +4 -4
- package/dist/src/agent/embedded/transcript-runtime.d.ts +4 -3
- package/dist/src/agent/embedded/transcript-runtime.js +33 -20
- package/dist/src/agent/embedded/types.d.ts +2 -1
- package/dist/src/agent/external-tools/composio-provider.d.ts +1 -1
- package/dist/src/agent/external-tools/composio-provider.js +12 -11
- package/dist/src/agent/external-tools/endpoint-provider.js +1 -1
- package/dist/src/agent/external-tools/extension-provider.d.ts +1 -1
- package/dist/src/agent/external-tools/extension-provider.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +9 -8
- package/dist/src/agent/external-tools/index.js +3 -3
- package/dist/src/agent/external-tools/mcp-provider.d.ts +2 -2
- package/dist/src/agent/external-tools/mcp-provider.js +8 -8
- package/dist/src/agent/external-tools/memory-provider.d.ts +1 -1
- package/dist/src/agent/external-tools/memory-provider.js +1 -1
- package/dist/src/agent/external-tools/types.d.ts +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.d.ts +7 -7
- package/dist/src/agent/inbound/attachment-pipeline.js +22 -21
- package/dist/src/agent/inbound/inbound-loop.d.ts +6 -6
- package/dist/src/agent/inbound/inbound-loop.js +23 -23
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +14 -14
- package/dist/src/agent/inbound/turn-dispatcher.js +16 -16
- package/dist/src/agent/ipc/bus.d.ts +1 -1
- package/dist/src/agent/ipc/types.d.ts +3 -3
- package/dist/src/agent/ipc/types.js +1 -1
- package/dist/src/agent/lifecycle/hook-handler.d.ts +2 -2
- package/dist/src/agent/lifecycle/hook-handler.js +6 -6
- package/dist/src/agent/lifecycle/manager.d.ts +1 -1
- package/dist/src/agent/lifecycle/manager.js +4 -4
- package/dist/src/agent/lifecycle/types.d.ts +1 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.d.ts +4 -4
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +21 -20
- package/dist/src/agent/mcp/bundle-mcp-tools.d.ts +1 -1
- package/dist/src/agent/mcp/bundle-mcp-tools.js +2 -2
- package/dist/src/agent/mcp/bundle-mcp-types.d.ts +4 -4
- package/dist/src/agent/mcp/index.js +2 -2
- package/dist/src/agent/mcp/oauth/mcp-oauth-manager.js +9 -8
- package/dist/src/agent/memory/compaction-ledger.js +9 -2
- package/dist/src/agent/memory/compaction-promotion.d.ts +2 -2
- package/dist/src/agent/memory/compaction-promotion.js +6 -6
- package/dist/src/agent/memory/compaction-source-planner.d.ts +2 -0
- package/dist/src/agent/memory/compaction-source-planner.js +9 -1
- package/dist/src/agent/memory/compaction.d.ts +6 -1
- package/dist/src/agent/memory/compaction.js +22 -11
- package/dist/src/agent/memory/context-recovery.d.ts +44 -0
- package/dist/src/agent/memory/context-recovery.js +96 -0
- package/dist/src/agent/memory/manager.js +11 -11
- package/dist/src/agent/memory/turn-provenance.d.ts +5 -5
- package/dist/src/agent/memory/turn-provenance.js +21 -17
- package/dist/src/agent/memory/types.d.ts +2 -2
- package/dist/src/agent/messaging/command-handler.d.ts +11 -11
- package/dist/src/agent/messaging/command-handler.js +7 -7
- package/dist/src/agent/messaging/message-router.d.ts +1 -1
- package/dist/src/agent/messaging/message-router.js +4 -4
- package/dist/src/agent/messaging/outbound-coordinator.d.ts +2 -2
- package/dist/src/agent/messaging/outbound-coordinator.js +4 -4
- package/dist/src/agent/middleware/context.d.ts +1 -2
- package/dist/src/agent/middleware/context.js +2 -5
- package/dist/src/agent/models/manager.d.ts +10 -10
- package/dist/src/agent/models/manager.js +34 -34
- package/dist/src/agent/orchestration/agent-event-handler.js +14 -14
- package/dist/src/agent/orchestration/agent-orchestrator.d.ts +7 -7
- package/dist/src/agent/orchestration/agent-orchestrator.js +29 -29
- package/dist/src/agent/orchestration/context-overflow.js +2 -0
- package/dist/src/agent/orchestration/llm-turn-retry.d.ts +1 -1
- package/dist/src/agent/orchestration/llm-turn-retry.js +2 -2
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.d.ts +1 -1
- package/dist/src/agent/orchestration/run-agent-turn-with-timeout.js +2 -2
- package/dist/src/agent/prompt/response-language.d.ts +1 -1
- package/dist/src/agent/prompt/response-language.js +2 -2
- package/dist/src/agent/prompt/service-prompt-builder.d.ts +2 -2
- package/dist/src/agent/prompt/service-prompt-builder.js +4 -4
- package/dist/src/agent/prompt/subagent-context.d.ts +4 -4
- package/dist/src/agent/prompt/subagent-context.js +1 -1
- package/dist/src/agent/prompt/system-prompt-params.d.ts +4 -4
- package/dist/src/agent/prompt/system-prompt-params.js +13 -12
- package/dist/src/agent/reply/apply-turn-user-enrichment.d.ts +1 -1
- package/dist/src/agent/reply/apply-turn-user-enrichment.js +3 -3
- package/dist/src/agent/reply/post-compaction-context.d.ts +1 -1
- package/dist/src/agent/reply/post-compaction-context.js +2 -2
- package/dist/src/agent/service/btw-query.d.ts +1 -1
- package/dist/src/agent/service/btw-query.js +4 -4
- package/dist/src/agent/service/build-direct-message-content.d.ts +1 -1
- package/dist/src/agent/service/build-direct-message-content.js +2 -2
- package/dist/src/agent/service/direct-turn-helpers.d.ts +6 -6
- package/dist/src/agent/service/direct-turn-helpers.js +17 -16
- package/dist/src/agent/service/parse-outbound-session-key.d.ts +1 -1
- package/dist/src/agent/service/parse-outbound-session-key.js +8 -9
- package/dist/src/agent/service/process-direct-one-shot.d.ts +11 -11
- package/dist/src/agent/service/process-direct-one-shot.js +16 -16
- package/dist/src/agent/service/process-direct-streaming.d.ts +18 -18
- package/dist/src/agent/service/process-direct-streaming.js +45 -40
- package/dist/src/agent/service/session-context-report.d.ts +1 -1
- package/dist/src/agent/service/session-context-report.js +3 -3
- package/dist/src/agent/service/webchat-tts.d.ts +3 -3
- package/dist/src/agent/service/webchat-tts.js +7 -7
- package/dist/src/agent/service.d.ts +23 -23
- package/dist/src/agent/service.js +111 -108
- package/dist/src/agent/service.types.d.ts +3 -3
- package/dist/src/agent/session/session-config-service.d.ts +5 -5
- package/dist/src/agent/session/session-config-service.js +53 -66
- package/dist/src/agent/session/session-context.d.ts +2 -2
- package/dist/src/agent/session/session-context.js +2 -2
- package/dist/src/agent/session/session-hydrator.d.ts +3 -3
- package/dist/src/agent/session/session-hydrator.js +19 -19
- package/dist/src/agent/session/session-inspector.d.ts +7 -7
- package/dist/src/agent/session/session-inspector.js +45 -45
- package/dist/src/agent/session/session-lifecycle.d.ts +2 -2
- package/dist/src/agent/session/session-lifecycle.js +17 -17
- package/dist/src/agent/session/session-state-bag.d.ts +18 -18
- package/dist/src/agent/session/session-state-bag.js +46 -46
- package/dist/src/agent/session/tracker.d.ts +7 -7
- package/dist/src/agent/session/tracker.js +27 -27
- package/dist/src/agent/source-context/types.d.ts +1 -1
- package/dist/src/agent/tasks/task-judge-service.d.ts +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +11 -10
- package/dist/src/agent/tools/automation-tool.js +2 -0
- package/dist/src/agent/tools/chain-tracker.d.ts +10 -10
- package/dist/src/agent/tools/chain-tracker.js +31 -31
- package/dist/src/agent/tools/clarify-tool.d.ts +1 -1
- package/dist/src/agent/tools/create-share-tool.js +2 -0
- package/dist/src/agent/tools/delegate-tool.d.ts +1 -1
- package/dist/src/agent/tools/delegate-tool.js +4 -4
- package/dist/src/agent/tools/exec-command.d.ts +1 -1
- package/dist/src/agent/tools/exec-command.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +3 -3
- package/dist/src/agent/tools/factory.js +42 -38
- package/dist/src/agent/tools/knowledge-memory-tool.js +2 -2
- package/dist/src/agent/tools/managed-job-tool.d.ts +1 -1
- package/dist/src/agent/tools/managed-job-tool.js +2 -2
- package/dist/src/agent/tools/publish-artifacts.js +2 -0
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/send-media.js +2 -0
- package/dist/src/agent/tools/session-recall-tool.d.ts +1 -1
- package/dist/src/agent/tools/session-recall-tool.js +3 -3
- package/dist/src/agent/tools/session-search-tool.d.ts +1 -1
- package/dist/src/agent/tools/session-search-tool.js +6 -6
- package/dist/src/agent/tools/skill-install-tool.d.ts +3 -3
- package/dist/src/agent/tools/skill-install-tool.js +3 -3
- package/dist/src/agent/tools/todo-tool.d.ts +3 -3
- package/dist/src/agent/tools/todo-tool.js +4 -4
- package/dist/src/agent/tools/workflow-tool.d.ts +1 -1
- package/dist/src/agent/tools/workflow-tool.js +15 -13
- package/dist/src/agent/tools/write.js +2 -0
- package/dist/src/agent/tools/xopc-use-tool.d.ts +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +16 -13
- package/dist/src/agent/types.d.ts +1 -1
- package/dist/src/agent/workflow/catalog.js +4 -2
- package/dist/src/agent/workflow/channel-capability.d.ts +2 -2
- package/dist/src/agent/workflow/progress-broker.d.ts +4 -4
- package/dist/src/agent/workflow/progress-broker.js +17 -17
- package/dist/src/agent/workflow/subagent-runner.js +10 -10
- package/dist/src/agent/workflow/types.d.ts +2 -2
- package/dist/src/agent/workflow/workflow-child-tools.js +1 -1
- package/dist/src/agent/workspace-runtime/registry.js +1 -1
- package/dist/src/automations/domain/types.d.ts +7 -7
- package/dist/src/automations/domain/validation.js +2 -0
- package/dist/src/automations/service/action-executor.js +15 -15
- package/dist/src/automations/service/automation-service.js +4 -3
- package/dist/src/automations/storage/automation-repository.js +2 -1
- package/dist/src/automations/storage/automation-run-repository.js +9 -8
- package/dist/src/browser/native-messaging-host.js +4 -1
- package/dist/src/browser/policy/approval-store.d.ts +4 -4
- package/dist/src/browser/policy/approval-store.js +8 -8
- package/dist/src/browser/providers/browser-ext-install.js +10 -2
- package/dist/src/browser/providers/extension.js +6 -6
- package/dist/src/browser/providers/realtime-extension.js +2 -2
- package/dist/src/browser/runtime/browser-runtime.js +3 -3
- package/dist/src/channels/exec-approval-runtime.d.ts +1 -1
- package/dist/src/channels/manager.js +1 -1
- package/dist/src/channels/pipeline.js +2 -2
- package/dist/src/channels/plugin-types.d.ts +2 -2
- package/dist/src/channels/plugins/types.adapters.d.ts +1 -1
- package/dist/src/channels/telegram/index.d.ts +1 -1
- package/dist/src/channels/telegram/index.js +2 -2
- package/dist/src/chat-commands/agent-edit.js +2 -2
- package/dist/src/chat-commands/builtins/review.js +4 -4
- package/dist/src/chat-commands/builtins/session.js +1 -1
- package/dist/src/chat-commands/builtins/system.js +2 -2
- package/dist/src/chat-commands/builtins/thinking.js +7 -7
- package/dist/src/chat-commands/builtins/understanding.js +4 -4
- package/dist/src/chat-commands/builtins/workflow.js +8 -8
- package/dist/src/chat-commands/context.d.ts +9 -9
- package/dist/src/chat-commands/context.js +35 -35
- package/dist/src/chat-commands/index.d.ts +1 -1
- package/dist/src/chat-commands/index.js +2 -2
- package/dist/src/chat-commands/processor.js +2 -2
- package/dist/src/chat-commands/registry.js +1 -1
- package/dist/src/chat-commands/session-key.d.ts +3 -3
- package/dist/src/chat-commands/session-key.js +20 -24
- package/dist/src/chat-commands/types.d.ts +3 -3
- package/dist/src/cli/command-manifest.js +3 -3
- package/dist/src/cli/commands/agent/interactive.d.ts +1 -1
- package/dist/src/cli/commands/agent/interactive.js +8 -8
- package/dist/src/cli/commands/agent/stream-renderer.d.ts +1 -1
- package/dist/src/cli/commands/agent/stream-renderer.js +2 -2
- package/dist/src/cli/commands/agent.js +12 -8
- package/dist/src/cli/commands/doctor/checks/database-schema.js +3 -2
- package/dist/src/cli/commands/doctor/checks/session-integrity.js +9 -9
- package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
- package/dist/src/cli/commands/gateway/run-foreground.js +4 -0
- package/dist/src/cli/commands/import.js +56 -7
- package/dist/src/cli/commands/logs.js +3 -3
- package/dist/src/cli/commands/models.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/platform.js +1 -1
- package/dist/src/cli/commands/profile.js +1 -1
- package/dist/src/cli/commands/project.js +5 -5
- package/dist/src/cli/commands/resume.js +4 -4
- package/dist/src/cli/commands/tunnel.js +3 -2
- package/dist/src/cli/commands/update.js +1 -1
- package/dist/src/cli/extension-cli-register.js +1 -1
- package/dist/src/config/agent-profile.d.ts +3 -3
- package/dist/src/config/agent-profile.js +12 -12
- package/dist/src/config/index.js +1 -1
- package/dist/src/config/models-json.d.ts +6 -6
- package/dist/src/config/schema.d.ts +1 -1
- package/dist/src/connectors/catalog.js +2 -1
- package/dist/src/connectors/composio-sessions.d.ts +1 -1
- package/dist/src/connectors/composio-sessions.js +3 -3
- package/dist/src/connectors/connection-recovery-service.d.ts +4 -4
- package/dist/src/connectors/connection-recovery-service.js +41 -37
- package/dist/src/connectors/principal.d.ts +1 -1
- package/dist/src/connectors/principal.js +4 -3
- package/dist/src/connectors/types.d.ts +2 -2
- package/dist/src/discussions/action-tasks.js +4 -1
- package/dist/src/discussions/analyzer.js +2 -1
- package/dist/src/discussions/edits.js +3 -1
- package/dist/src/discussions/organizer.js +2 -1
- package/dist/src/discussions/recording.js +4 -1
- package/dist/src/discussions/recordingJobs.js +2 -1
- package/dist/src/discussions/repository.js +2 -1
- package/dist/src/discussions/revisions.js +2 -1
- package/dist/src/discussions/service.js +4 -1
- package/dist/src/discussions/types.js +4 -0
- package/dist/src/endpoint-tools/auth.js +2 -1
- package/dist/src/endpoint-tools/binding-service.d.ts +8 -8
- package/dist/src/endpoint-tools/binding-service.js +14 -14
- package/dist/src/endpoint-tools/invocation-service.d.ts +2 -0
- package/dist/src/endpoint-tools/invocation-service.js +50 -20
- package/dist/src/endpoint-tools/policy.js +2 -1
- package/dist/src/endpoint-tools/registry.js +2 -1
- package/dist/src/endpoint-tools/upload-service.js +2 -1
- package/dist/src/execution-environments/local-worktree-manager.d.ts +1 -1
- package/dist/src/execution-environments/local-worktree-manager.js +2 -2
- package/dist/src/execution-environments/session-environment-service.d.ts +3 -3
- package/dist/src/execution-environments/session-environment-service.js +10 -10
- package/dist/src/execution-environments/store.d.ts +2 -2
- package/dist/src/execution-environments/store.js +15 -14
- package/dist/src/execution-environments/subject.d.ts +1 -1
- package/dist/src/execution-environments/subject.js +2 -2
- package/dist/src/execution-environments/types.d.ts +2 -2
- package/dist/src/extensions/api.js +1 -1
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.d.ts +1 -1
- package/dist/src/extensions/types/core.d.ts +2 -2
- package/dist/src/extensions/types/hooks.d.ts +12 -12
- package/dist/src/extensions/types/tools.d.ts +3 -3
- package/dist/src/extensions/types/tui.d.ts +3 -3
- package/dist/src/files/file-service.d.ts +3 -3
- package/dist/src/files/file-service.js +3 -3
- package/dist/src/gateway/automation-agent-session.js +5 -5
- package/dist/src/gateway/chat-stream/mapper.d.ts +1 -1
- package/dist/src/gateway/chat-stream/mapper.js +4 -2
- package/dist/src/gateway/chat-stream/protocol.d.ts +1 -1
- package/dist/src/gateway/chat-stream/thinking-delta-coalescer.js +1 -1
- package/dist/src/gateway/clarify-runtime.d.ts +2 -2
- package/dist/src/gateway/clarify-runtime.js +2 -2
- package/dist/src/gateway/file-path-classifier.d.ts +2 -2
- package/dist/src/gateway/file-path-classifier.js +4 -4
- package/dist/src/gateway/file-reference-registry.d.ts +2 -2
- package/dist/src/gateway/file-reference-registry.js +1 -1
- package/dist/src/gateway/file-space-service.js +3 -3
- package/dist/src/gateway/gateway-workflow-host.types.d.ts +1 -1
- package/dist/src/gateway/heartbeat/check-store.d.ts +18 -0
- package/dist/src/gateway/heartbeat/check-store.js +74 -0
- package/dist/src/gateway/heartbeat/service.d.ts +12 -3
- package/dist/src/gateway/heartbeat/service.js +82 -51
- package/dist/src/gateway/hono/middleware/log-context.d.ts +1 -1
- package/dist/src/gateway/hono/middleware/log-context.js +3 -3
- package/dist/src/gateway/hono/routes/agent-stream.js +20 -20
- package/dist/src/gateway/hono/routes/browser-session.js +2 -2
- package/dist/src/gateway/hono/routes/browser.js +22 -20
- package/dist/src/gateway/hono/routes/chat-model-config.d.ts +1 -1
- package/dist/src/gateway/hono/routes/chat-model-config.js +6 -6
- package/dist/src/gateway/hono/routes/commands-skills.js +13 -13
- package/dist/src/gateway/hono/routes/connection-waits.js +5 -5
- package/dist/src/gateway/hono/routes/connectors.js +5 -5
- package/dist/src/gateway/hono/routes/context-sources.js +2 -1
- package/dist/src/gateway/hono/routes/device-pairing-approval.js +2 -0
- package/dist/src/gateway/hono/routes/devices.js +2 -0
- package/dist/src/gateway/hono/routes/endpoint-tools.js +8 -7
- package/dist/src/gateway/hono/routes/execution-environments.js +11 -11
- package/dist/src/gateway/hono/routes/file-references.js +5 -5
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/imports.js +18 -6
- package/dist/src/gateway/hono/routes/interaction-state.js +6 -6
- package/dist/src/gateway/hono/routes/logs.js +2 -2
- package/dist/src/gateway/hono/routes/media.js +3 -3
- package/dist/src/gateway/hono/routes/notes.js +11 -11
- package/dist/src/gateway/hono/routes/proactive-control.js +2 -1
- package/dist/src/gateway/hono/routes/projects.js +26 -26
- package/dist/src/gateway/hono/routes/public-gateway.js +3 -3
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +10 -10
- package/dist/src/gateway/hono/routes/session-input-handler.js +20 -17
- package/dist/src/gateway/hono/routes/sessions.js +79 -50
- package/dist/src/gateway/hono/routes/shares.js +38 -38
- package/dist/src/gateway/hono/routes/side-chats.js +4 -2
- package/dist/src/gateway/hono/routes/site-shares.js +6 -6
- package/dist/src/gateway/hono/routes/tasks.js +18 -13
- package/dist/src/gateway/hono/routes/tui.js +2 -2
- package/dist/src/gateway/hono/routes/user-model.js +1 -1
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/hono/routes/workflows.js +9 -9
- package/dist/src/gateway/media-access.d.ts +1 -1
- package/dist/src/gateway/media-access.js +3 -3
- package/dist/src/gateway/resolve-webchat-session-key.d.ts +5 -5
- package/dist/src/gateway/resolve-webchat-session-key.js +5 -5
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/service/agent-runner.d.ts +15 -15
- package/dist/src/gateway/service/agent-runner.js +63 -62
- package/dist/src/gateway/service/marketplace-service.d.ts +3 -3
- package/dist/src/gateway/service/marketplace-service.js +6 -6
- package/dist/src/gateway/service/run-gateway-agent.js +51 -49
- package/dist/src/gateway/service/session-input-coordinator.d.ts +11 -11
- package/dist/src/gateway/service/session-input-coordinator.js +76 -74
- package/dist/src/gateway/service/sessions-api.d.ts +19 -20
- package/dist/src/gateway/service/sessions-api.js +30 -38
- package/dist/src/gateway/service/task-conversation-query-service.d.ts +3 -2
- package/dist/src/gateway/service/task-conversation-query-service.js +3 -3
- package/dist/src/gateway/service.d.ts +11 -4
- package/dist/src/gateway/service.js +92 -71
- package/dist/src/gateway/session-context-summary.d.ts +1 -1
- package/dist/src/gateway/session-context-summary.js +13 -11
- package/dist/src/gateway/session-reset-service.d.ts +4 -4
- package/dist/src/gateway/session-reset-service.js +12 -12
- package/dist/src/gateway/side-chat/context-snapshot.d.ts +2 -2
- package/dist/src/gateway/side-chat/context-snapshot.js +2 -2
- package/dist/src/gateway/side-chat/manager.d.ts +4 -4
- package/dist/src/gateway/side-chat/manager.js +13 -13
- package/dist/src/gateway/side-chat/run-service.js +8 -8
- package/dist/src/gateway/side-chat/types.d.ts +4 -4
- package/dist/src/heartbeat/wake.d.ts +1 -1
- package/dist/src/history/ctx/exporter.js +11 -11
- package/dist/src/history/ctx/format.d.ts +1 -1
- package/dist/src/history/ctx/format.js +7 -7
- package/dist/src/imports/contextImport.js +2 -1
- package/dist/src/imports/importService.d.ts +17 -12
- package/dist/src/imports/importService.js +67 -70
- package/dist/src/imports/inventory.d.ts +11 -0
- package/dist/src/imports/inventory.js +202 -0
- package/dist/src/imports/productImport.d.ts +4 -4
- package/dist/src/imports/productImport.js +202 -108
- package/dist/src/imports/runtime.js +7 -2
- package/dist/src/imports/scanner.d.ts +1 -1
- package/dist/src/imports/scanner.js +4 -4
- package/dist/src/imports/types.d.ts +53 -0
- package/dist/src/infra/background-task.d.ts +2 -0
- package/dist/src/infra/background-task.js +25 -0
- package/dist/src/infra/node-sqlite.js +9 -3
- package/dist/src/infra/process-diagnostics.d.ts +5 -0
- package/dist/src/infra/process-diagnostics.js +101 -0
- package/dist/src/infra/sqlite-errors.js +25 -20
- package/dist/src/infra/unhandled-rejections.js +20 -9
- package/dist/src/infra/warning-filter.js +9 -3
- package/dist/src/knowledge/ingestion-service.js +1 -0
- package/dist/src/knowledge-memory/domain.d.ts +2 -2
- package/dist/src/knowledge-memory/repository.d.ts +1 -1
- package/dist/src/knowledge-memory/repository.js +10 -8
- package/dist/src/mcp/channel-bridge.d.ts +3 -3
- package/dist/src/mcp/channel-bridge.js +7 -7
- package/dist/src/mcp/channel-shared.d.ts +4 -4
- package/dist/src/mcp/channel-shared.js +3 -3
- package/dist/src/mcp/channel-tools.js +19 -19
- package/dist/src/media/session-references.js +2 -2
- package/dist/src/media-shared/http/ssrf-guard.js +1 -1
- package/dist/src/memory-maintenance/service.js +2 -1
- package/dist/src/migrations/conversation-routing-config.d.ts +2 -0
- package/dist/src/migrations/conversation-routing-config.js +42 -0
- package/dist/src/migrations/runner.js +6 -5
- package/dist/src/notes/service.d.ts +2 -2
- package/dist/src/notes/service.js +6 -6
- package/dist/src/notes/store.js +2 -1
- package/dist/src/notes/types.d.ts +3 -3
- package/dist/src/notifications/device-store.js +2 -1
- package/dist/src/notifications/planner.js +5 -3
- package/dist/src/notifications/proactive-channel.js +4 -1
- package/dist/src/notifications/proactive-policy.js +9 -6
- package/dist/src/notifications/service.d.ts +4 -4
- package/dist/src/notifications/service.js +4 -1
- package/dist/src/notifications/store.js +4 -1
- package/dist/src/notifications/web-push.js +4 -1
- package/dist/src/platform/contracts.d.ts +3 -3
- package/dist/src/proactive/actions/service.js +2 -1
- package/dist/src/proactive/events/product-event-bridge.js +1 -1
- package/dist/src/proactive/events/repository.js +2 -1
- package/dist/src/proactive/execution/authorization.d.ts +2 -0
- package/dist/src/proactive/execution/authorization.js +12 -2
- package/dist/src/proactive/execution/context.js +3 -1
- package/dist/src/proactive/execution/insight.js +2 -0
- package/dist/src/proactive/execution/repository.d.ts +2 -0
- package/dist/src/proactive/execution/repository.js +21 -3
- package/dist/src/proactive/execution/worker.js +15 -4
- package/dist/src/proactive/experience.d.ts +5 -2
- package/dist/src/proactive/experience.js +7 -3
- package/dist/src/proactive/follow-ups.d.ts +12 -7
- package/dist/src/proactive/follow-ups.js +23 -11
- package/dist/src/proactive/inbox/cards.js +7 -3
- package/dist/src/proactive/inbox/delivery.js +8 -8
- package/dist/src/proactive/inbox/digest.d.ts +1 -1
- package/dist/src/proactive/inbox/digest.js +25 -14
- package/dist/src/proactive/inbox/lifecycle.js +2 -1
- package/dist/src/proactive/inbox/notification-policy.d.ts +1 -1
- package/dist/src/proactive/inbox/notification-policy.js +9 -6
- package/dist/src/proactive/inbox/repository.js +5 -3
- package/dist/src/proactive/inbox/service.d.ts +6 -0
- package/dist/src/proactive/inbox/service.js +19 -0
- package/dist/src/proactive/inbox/types.d.ts +1 -0
- package/dist/src/proactive/mail-thread.js +2 -1
- package/dist/src/proactive/maintenance.js +2 -1
- package/dist/src/proactive/metrics.js +2 -1
- package/dist/src/proactive/policy/presence.d.ts +1 -1
- package/dist/src/proactive/policy/presence.js +9 -6
- package/dist/src/proactive/policy/service.d.ts +8 -5
- package/dist/src/proactive/policy/service.js +16 -13
- package/dist/src/proactive/routing/batch-repository.js +2 -1
- package/dist/src/proactive/scenarios/control.d.ts +3 -3
- package/dist/src/proactive/scenarios/control.js +16 -3
- package/dist/src/proactive/scenarios/repository.js +2 -1
- package/dist/src/proactive/service.js +2 -1
- package/dist/src/proactive/source-freshness.d.ts +8 -0
- package/dist/src/proactive/source-freshness.js +28 -0
- package/dist/src/proactive/status.d.ts +2 -0
- package/dist/src/proactive/status.js +22 -0
- package/dist/src/proactive/temporal/schedule.js +2 -1
- package/dist/src/proactive/temporal/worker.js +2 -1
- package/dist/src/projects/automation-bind.js +2 -1
- package/dist/src/projects/index.js +2 -2
- package/dist/src/projects/knowledge-bind.js +2 -1
- package/dist/src/projects/project-agent.js +4 -1
- package/dist/src/projects/project-service.d.ts +4 -4
- package/dist/src/projects/project-service.js +11 -10
- package/dist/src/projects/project-store.js +11 -9
- package/dist/src/projects/session-bind.d.ts +5 -5
- package/dist/src/projects/session-bind.js +18 -17
- package/dist/src/projects/types.d.ts +1 -1
- package/dist/src/projects/workflow-bind.js +2 -1
- package/dist/src/projects/workspace.d.ts +3 -3
- package/dist/src/projects/workspace.js +6 -6
- package/dist/src/providers/model-reference-auditor.js +1 -1
- package/dist/src/providers/prompt-cache-lifecycle.d.ts +2 -2
- package/dist/src/providers/prompt-cache-lifecycle.js +6 -6
- package/dist/src/realtime/broker.js +3 -3
- package/dist/src/realtime/runtime.js +32 -6
- package/dist/src/realtime/writer.js +16 -9
- package/dist/src/retrieval/queryProfile.d.ts +1 -1
- package/dist/src/routing/agent-session-key.d.ts +12 -41
- package/dist/src/routing/agent-session-key.js +39 -120
- package/dist/src/routing/conversation-route.d.ts +28 -0
- package/dist/src/routing/conversation-route.js +50 -0
- package/dist/src/routing/index.d.ts +2 -2
- package/dist/src/routing/index.js +5 -5
- package/dist/src/routing/resolve-route.d.ts +4 -9
- package/dist/src/routing/resolve-route.js +20 -60
- package/dist/src/routing/resolve-tui-session-key.d.ts +5 -13
- package/dist/src/routing/resolve-tui-session-key.js +11 -36
- package/dist/src/routing/session-key.d.ts +6 -39
- package/dist/src/routing/session-key.js +13 -161
- package/dist/src/session/client-history.js +2 -0
- package/dist/src/session/compaction-types.js +18 -13
- package/dist/src/session/config-store.d.ts +8 -8
- package/dist/src/session/config-store.js +19 -19
- package/dist/src/session/index.d.ts +2 -2
- package/dist/src/session/index.js +9 -5
- package/dist/src/session/init-session-turn.d.ts +7 -7
- package/dist/src/session/init-session-turn.js +18 -18
- package/dist/src/session/manager.d.ts +7 -7
- package/dist/src/session/manager.js +6 -6
- package/dist/src/session/model-config-lock.d.ts +1 -1
- package/dist/src/session/model-config-lock.js +4 -4
- package/dist/src/session/resolve-session.d.ts +10 -10
- package/dist/src/session/resolve-session.js +20 -20
- package/dist/src/session/session-context-for-llm.js +17 -10
- package/dist/src/session/session-title.d.ts +5 -5
- package/dist/src/session/session-title.js +28 -28
- package/dist/src/session/session-workspace.d.ts +1 -1
- package/dist/src/session/session-workspace.js +3 -3
- package/dist/src/session/store.d.ts +14 -14
- package/dist/src/session/store.js +70 -50
- package/dist/src/session/stored-rows-to-file-entries.d.ts +1 -1
- package/dist/src/session/stored-rows-to-file-entries.js +5 -3
- package/dist/src/session/thinking-resolve.d.ts +2 -2
- package/dist/src/session/thinking-resolve.js +4 -4
- package/dist/src/session/transcript-events.d.ts +1 -1
- package/dist/src/session/transcript-events.js +3 -3
- package/dist/src/session/transcript-outline.js +2 -1
- package/dist/src/session/turn-outcome-projector.js +2 -0
- package/dist/src/session/types.d.ts +5 -4
- package/dist/src/session/types.js +13 -9
- package/dist/src/session/user-message-display.js +2 -0
- package/dist/src/session/user-round-delete.js +2 -1
- package/dist/src/session/voice-transcript.js +8 -3
- package/dist/src/share/hosted-session-share.d.ts +6 -6
- package/dist/src/share/hosted-session-share.js +13 -11
- package/dist/src/share/hosted-static-site-publish.d.ts +1 -1
- package/dist/src/share/hosted-static-site-publish.js +1 -1
- package/dist/src/share/session-share-service.d.ts +9 -9
- package/dist/src/share/session-share-service.js +19 -19
- package/dist/src/share/share-store.d.ts +2 -2
- package/dist/src/share/share-store.js +9 -7
- package/dist/src/share/share-types.d.ts +2 -2
- package/dist/src/share/site-share-router.d.ts +2 -2
- package/dist/src/share/site-share-store.js +4 -2
- package/dist/src/share/site-share-types.d.ts +1 -1
- package/dist/src/storage/sqlite/activity-repository.js +2 -1
- package/dist/src/storage/sqlite/browser-session-repository.js +2 -1
- package/dist/src/storage/sqlite/browser-tab-binding-repository.d.ts +2 -2
- package/dist/src/storage/sqlite/browser-tab-binding-repository.js +10 -9
- package/dist/src/storage/sqlite/clarification-wait-repository.d.ts +7 -7
- package/dist/src/storage/sqlite/clarification-wait-repository.js +58 -53
- package/dist/src/storage/sqlite/collaboration-rule-repository.js +2 -1
- package/dist/src/storage/sqlite/composer-input-history-repository.js +2 -1
- package/dist/src/storage/sqlite/config-repository.d.ts +6 -6
- package/dist/src/storage/sqlite/config-repository.js +29 -25
- package/dist/src/storage/sqlite/connection-wait-repository.d.ts +11 -11
- package/dist/src/storage/sqlite/connection-wait-repository.js +61 -51
- package/dist/src/storage/sqlite/connection.js +28 -18
- package/dist/src/storage/sqlite/connector-account-repository.js +2 -1
- package/dist/src/storage/sqlite/connector-learning-repository.js +2 -1
- package/dist/src/storage/sqlite/connector-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/connector-repository.js +11 -10
- package/dist/src/storage/sqlite/connector-sync-policy-repository.js +2 -1
- package/dist/src/storage/sqlite/context-evidence-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/context-evidence-repository.js +7 -6
- package/dist/src/storage/sqlite/context-extraction-repository.js +2 -1
- package/dist/src/storage/sqlite/context-relation-repository.js +2 -1
- package/dist/src/storage/sqlite/conversation-repository.d.ts +12 -0
- package/dist/src/storage/sqlite/conversation-repository.js +76 -0
- package/dist/src/storage/sqlite/device-access-repository.js +4 -1
- package/dist/src/storage/sqlite/device-pairing-approval.js +4 -1
- package/dist/src/storage/sqlite/device-pairing-repository.js +2 -1
- package/dist/src/storage/sqlite/durable-queue.js +4 -2
- package/dist/src/storage/sqlite/durable-state.js +4 -2
- package/dist/src/storage/sqlite/endpoint-principal-repository.js +2 -1
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.d.ts +3 -3
- package/dist/src/storage/sqlite/endpoint-session-binding-repository.js +12 -11
- package/dist/src/storage/sqlite/endpoint-tool-invocation-repository.js +2 -1
- package/dist/src/storage/sqlite/fts.js +39 -34
- package/dist/src/storage/sqlite/gateway-identity-repository.js +2 -1
- package/dist/src/storage/sqlite/home-attention-repository.js +2 -1
- package/dist/src/storage/sqlite/import-repository.d.ts +2 -3
- package/dist/src/storage/sqlite/import-repository.js +5 -4
- package/dist/src/storage/sqlite/import-selection-repository.d.ts +15 -0
- package/dist/src/storage/sqlite/import-selection-repository.js +29 -0
- package/dist/src/storage/sqlite/index.d.ts +1 -1
- package/dist/src/storage/sqlite/index.js +25 -11
- package/dist/src/storage/sqlite/interaction-state-repository.d.ts +4 -4
- package/dist/src/storage/sqlite/interaction-state-repository.js +12 -11
- package/dist/src/storage/sqlite/knowledge-repository.d.ts +1 -0
- package/dist/src/storage/sqlite/knowledge-repository.js +4 -3
- package/dist/src/storage/sqlite/migrations/175_import_selections.sql +8 -0
- package/dist/src/storage/sqlite/migrations/176_proactive_quality.sql +5 -0
- package/dist/src/storage/sqlite/migrations/177_proactive_check_controls.sql +25 -0
- package/dist/src/storage/sqlite/migrations/178_conversation_uuid.sql +2 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +3 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.js +88 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.ts +66 -0
- package/dist/src/storage/sqlite/migrations/conversation-key-decoder.d.ts +8 -0
- package/dist/src/storage/sqlite/migrations/conversation-key-decoder.js +87 -0
- package/dist/src/storage/sqlite/migrations/conversation-key-decoder.ts +50 -0
- package/dist/src/storage/sqlite/migrations/conversation-uuid.d.ts +8 -0
- package/dist/src/storage/sqlite/migrations/conversation-uuid.js +366 -0
- package/dist/src/storage/sqlite/migrations/conversation-uuid.ts +324 -0
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.d.ts +1 -0
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.js +92 -0
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.ts +71 -0
- package/dist/src/storage/sqlite/migrations/discover.js +7 -3
- package/dist/src/storage/sqlite/migrations/errors.js +28 -23
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +43 -14
- package/dist/src/storage/sqlite/migrations/runner.ts +13 -3
- package/dist/src/storage/sqlite/migrations/types.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/types.ts +1 -1
- package/dist/src/storage/sqlite/note-agent-context-repository.js +2 -1
- package/dist/src/storage/sqlite/notes-repository.js +4 -2
- package/dist/src/storage/sqlite/paths.js +6 -2
- package/dist/src/storage/sqlite/relationship-settings-repository.js +2 -1
- package/dist/src/storage/sqlite/row-mappers.d.ts +10 -10
- package/dist/src/storage/sqlite/row-mappers.js +22 -15
- package/dist/src/storage/sqlite/schema-version.js +7 -2
- package/dist/src/storage/sqlite/schema.js +14 -6
- package/dist/src/storage/sqlite/session-identity-sql.js +12 -5
- package/dist/src/storage/sqlite/session-input-repository.d.ts +14 -14
- package/dist/src/storage/sqlite/session-input-repository.js +69 -61
- package/dist/src/storage/sqlite/session-instance-repository.d.ts +1 -1
- package/dist/src/storage/sqlite/session-instance-repository.js +6 -3
- package/dist/src/storage/sqlite/session-metadata.d.ts +2 -2
- package/dist/src/storage/sqlite/session-metadata.js +7 -3
- package/dist/src/storage/sqlite/session-repository.d.ts +15 -15
- package/dist/src/storage/sqlite/session-repository.js +126 -102
- package/dist/src/storage/sqlite/session-task-plan-repository.d.ts +3 -3
- package/dist/src/storage/sqlite/session-task-plan-repository.js +21 -19
- package/dist/src/storage/sqlite/session-turn-replace-repository.d.ts +2 -2
- package/dist/src/storage/sqlite/session-turn-replace-repository.js +26 -22
- package/dist/src/storage/sqlite/transaction.js +12 -6
- package/dist/src/storage/sqlite/transcript-repository.d.ts +14 -14
- package/dist/src/storage/sqlite/transcript-repository.js +107 -102
- package/dist/src/storage/sqlite/user-people-repository.js +2 -1
- package/dist/src/storage/sqlite/user-trust-repository.js +2 -1
- package/dist/src/support/collect-support-report.js +7 -7
- package/dist/src/support/types.d.ts +2 -2
- package/dist/src/support/types.js +1 -1
- package/dist/src/tasks/execution-context.d.ts +2 -2
- package/dist/src/tasks/execution-context.js +3 -3
- package/dist/src/tasks/home-query-service.d.ts +2 -2
- package/dist/src/tasks/home-query-service.js +6 -6
- package/dist/src/tasks/index.js +6 -2
- package/dist/src/tasks/project-monitoring-service.js +2 -1
- package/dist/src/tasks/project-operating-view-service.js +2 -1
- package/dist/src/tasks/task-application-service.js +9 -4
- package/dist/src/tasks/task-change-events.js +7 -2
- package/dist/src/tasks/task-context-assembler.d.ts +2 -2
- package/dist/src/tasks/task-context-assembler.js +12 -9
- package/dist/src/tasks/task-context-repository.d.ts +1 -1
- package/dist/src/tasks/task-context-repository.js +4 -3
- package/dist/src/tasks/task-conversation-repository.d.ts +7 -7
- package/dist/src/tasks/task-conversation-repository.js +27 -26
- package/dist/src/tasks/task-deletion-service.js +2 -1
- package/dist/src/tasks/task-dependency-service.js +2 -1
- package/dist/src/tasks/task-handoff-service.d.ts +2 -2
- package/dist/src/tasks/task-handoff-service.js +16 -15
- package/dist/src/tasks/task-outbox-dispatcher.js +2 -1
- package/dist/src/tasks/task-read-model-projector.js +4 -2
- package/dist/src/tasks/task-repository.js +2 -1
- package/dist/src/tasks/task-run-coordinator.js +6 -5
- package/dist/src/tasks/task-run-dispatcher.d.ts +1 -1
- package/dist/src/tasks/task-run-dispatcher.js +4 -3
- package/dist/src/tasks/task-run-repository.d.ts +2 -2
- package/dist/src/tasks/task-run-repository.js +219 -212
- package/dist/src/tasks/task-signal-service.js +6 -2
- package/dist/src/tasks/task-workflow-coordinator.js +2 -1
- package/dist/src/tui/backends/embedded-backend.d.ts +33 -32
- package/dist/src/tui/backends/embedded-backend.js +95 -83
- package/dist/src/tui/backends/gateway-realtime-backend.d.ts +34 -33
- package/dist/src/tui/backends/gateway-realtime-backend.js +95 -78
- package/dist/src/tui/components/branch-summary.js +3 -3
- package/dist/src/tui/components/session-selector.d.ts +5 -5
- package/dist/src/tui/components/session-selector.js +7 -7
- package/dist/src/tui/components/tui-bottom-bar.js +1 -1
- package/dist/src/tui/components/tui-header.d.ts +1 -1
- package/dist/src/tui/components/tui-header.js +2 -2
- package/dist/src/tui/extension-host/autocomplete.d.ts +2 -2
- package/dist/src/tui/extension-host/autocomplete.js +4 -4
- package/dist/src/tui/extension-host/host.d.ts +1 -1
- package/dist/src/tui/extension-host/runtime-context.d.ts +1 -1
- package/dist/src/tui/extension-host/runtime-context.js +2 -2
- package/dist/src/tui/extension-host/runtime.d.ts +1 -1
- package/dist/src/tui/extension-host/runtime.js +6 -6
- package/dist/src/tui/tui-backend.d.ts +43 -39
- package/dist/src/tui/tui-command-formatters.d.ts +2 -2
- package/dist/src/tui/tui-command-formatters.js +10 -18
- package/dist/src/tui/tui-commands.d.ts +3 -3
- package/dist/src/tui/tui-commands.js +31 -33
- package/dist/src/tui/tui-empty-session-cleanup.d.ts +2 -3
- package/dist/src/tui/tui-empty-session-cleanup.js +7 -15
- package/dist/src/tui/tui-file-autocomplete.d.ts +1 -1
- package/dist/src/tui/tui-file-autocomplete.js +2 -2
- package/dist/src/tui/tui-new-session-preferences.js +2 -0
- package/dist/src/tui/tui-picker-overlay.d.ts +1 -1
- package/dist/src/tui/tui-picker-overlay.js +41 -53
- package/dist/src/tui/tui-picker-services.d.ts +3 -3
- package/dist/src/tui/tui-session-actions.d.ts +1 -1
- package/dist/src/tui/tui-session-actions.js +8 -17
- package/dist/src/tui/tui-session-format.js +4 -1
- package/dist/src/tui/tui-session-snapshot.d.ts +2 -2
- package/dist/src/tui/tui-session-snapshot.js +4 -4
- package/dist/src/tui/tui-settings.js +2 -0
- package/dist/src/tui/tui-startup-resources.d.ts +1 -1
- package/dist/src/tui/tui-startup-resources.js +3 -3
- package/dist/src/tui/tui-startup-text.js +1 -1
- package/dist/src/tui/tui-transcript-tree-picker.d.ts +1 -1
- package/dist/src/tui/tui-transcript-tree-picker.js +2 -2
- package/dist/src/tui/tui-types.d.ts +4 -2
- package/dist/src/tui/tui-types.js +2 -2
- package/dist/src/tui/tui.js +114 -112
- package/dist/src/user-context/access-policy.d.ts +1 -1
- package/dist/src/user-context/access-policy.js +6 -5
- package/dist/src/user-context/changes.js +9 -4
- package/dist/src/user-context/domain.d.ts +1 -1
- package/dist/src/user-context/relationship-continuity.d.ts +1 -1
- package/dist/src/user-context/relationship-continuity.js +1 -1
- package/dist/src/user-context/sources/repository.js +4 -2
- package/dist/src/user-model/capture/executor.d.ts +1 -1
- package/dist/src/user-model/capture/executor.js +3 -3
- package/dist/src/user-model/goals.js +2 -1
- package/dist/src/user-model/repository.js +2 -1
- package/dist/src/utils/global-singleton.js +4 -1
- package/dist/src/utils/logger/context.d.ts +1 -1
- package/dist/src/utils/logger/context.js +2 -2
- package/dist/src/utils/logger/log-store.js +2 -2
- package/dist/src/utils/logger/pino-record.js +6 -6
- package/dist/src/utils/logger/types.d.ts +6 -6
- package/dist/src/voice/realtime/agentBroker.d.ts +6 -6
- package/dist/src/voice/realtime/agentBroker.js +6 -6
- package/dist/src/voice/realtime/agentEngine.js +6 -6
- package/dist/src/voice/realtime/memory-context.d.ts +2 -2
- package/dist/src/voice/realtime/memory-context.js +15 -15
- package/dist/src/voice/realtime/persona-context.d.ts +1 -1
- package/dist/src/voice/realtime/persona-context.js +6 -6
- package/dist/src/voice/realtime/runtime.d.ts +1 -1
- package/dist/src/voice/realtime/runtime.js +14 -13
- package/dist/src/voice/realtime/runtime.types.d.ts +6 -6
- package/dist/src/work-discovery/candidate-discovery.js +1 -1
- package/dist/src/work-discovery/investigation-repository.js +4 -2
- package/dist/src/work-discovery/probe.js +1 -1
- package/dist/src/work-discovery/repository.js +7 -5
- package/dist/src/work-discovery/service.js +33 -29
- package/dist/src/work-discovery/types.d.ts +1 -1
- package/dist/src/workflows/context/workflow-context-snapshot-repository.js +2 -1
- package/dist/src/workflows/domain/event.d.ts +1 -1
- package/dist/src/workflows/domain/run.d.ts +5 -5
- package/dist/src/workflows/engine/projector.js +1 -1
- package/dist/src/workflows/engine/workflow-engine.d.ts +2 -2
- package/dist/src/workflows/engine/workflow-engine.js +15 -18
- package/dist/src/workflows/index.js +3 -3
- package/dist/src/workflows/project-presets/project-workflow-preset-repository.js +2 -1
- package/dist/src/workflows/service/run-view-to-snapshot.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.d.ts +2 -2
- package/dist/src/workflows/service/workflow-run-service.js +53 -42
- package/dist/src/workflows/service/workflow-run-service.types.d.ts +2 -2
- package/dist/src/workflows/service/workflow-session-bridge.d.ts +2 -2
- package/dist/src/workflows/service/workflow-session-bridge.js +31 -31
- package/dist/src/workflows/service/workflow-session-key.d.ts +1 -1
- package/dist/src/workflows/service/workflow-session-key.js +4 -4
- package/dist/src/workflows/service/workflow-writeback-service.js +2 -1
- package/dist/src/workflows/store/event-store.js +4 -2
- package/dist/src/workflows/store/run-index-store.js +9 -8
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-D9qP10BK.js +0 -1
- package/dist/gateway/static/root/assets/agents-D-bkOuAl.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-BKwBBwJN.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-B2-f9qZu.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-Dtn4rMeq.js +0 -8
- package/dist/gateway/static/root/assets/button-BA45yciM.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DiwtR9MD.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-pTdR1q1K.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BSQ7Hs2w.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-BUGkGB4-.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-CYkT7ecp.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-Baua1_Le.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CzpSYWex.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-DTM_kYpE.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CSSJvdd6.js +0 -1
- package/dist/gateway/static/root/assets/imports-page-XqVVYbAp.js +0 -1
- package/dist/gateway/static/root/assets/index-B_Sg5BKz.css +0 -2
- package/dist/gateway/static/root/assets/index-C9aQA4Dr.js +0 -74
- package/dist/gateway/static/root/assets/local-app-workbench-page-CZSgTYuI.js +0 -2
- package/dist/gateway/static/root/assets/locale-store-DO6JJ1l2.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-z5ktnEzX.js +0 -2
- package/dist/gateway/static/root/assets/messages-BgZRsCkG.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-DSaZfkna.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-CePEyv_C.js +0 -8
- package/dist/gateway/static/root/assets/page-tabs-CdYemUOu.js +0 -1
- package/dist/gateway/static/root/assets/popover-select-DGmMQt4t.js +0 -1
- package/dist/gateway/static/root/assets/proactive-page-Cy2Gm2f8.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BliwYpns.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-Dm-BqnQn.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-C_XuQ9XR.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-Drt1aS2G.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BAUd06_9.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-Bw6xKOX5.js +0 -1
- package/dist/gateway/static/root/assets/settings-page-layout-DYelDcMV.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-BHI9e5Tw.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DOAOjZBQ.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-DU0VQpHj.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DiPgMmBM.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-Bmsy-5Fs.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-DxRaRdA0.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-CZikdgNw.js +0 -6
- package/dist/src/routing/session-key-utils.d.ts +0 -23
- package/dist/src/routing/session-key-utils.js +0 -85
- package/dist/src/session/session-id.d.ts +0 -3
- package/dist/src/session/session-id.js +0 -10
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { deleteBrowserTabBinding, getBrowserTabBinding, setBrowserTabBinding } from "../../../storage/sqlite/browser-tab-binding-repository.js";
|
|
2
2
|
import { browserTabBindingRequestSchema } from "../../../../packages/gateway-contract/src/browser-tab-binding.js";
|
|
3
|
+
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
3
4
|
import { getDevice } from "../../../storage/sqlite/device-access-repository.js";
|
|
4
5
|
import "../../../../packages/browser-control-contract/src/index.js";
|
|
5
6
|
import { decideBrowserApproval, listBrowserApprovals } from "../../../browser/policy/approval-store.js";
|
|
@@ -10,6 +11,7 @@ import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
|
10
11
|
import { getConnInfo } from "@hono/node-server/conninfo";
|
|
11
12
|
//#region src/gateway/hono/routes/browser.ts
|
|
12
13
|
/** Browser Control status, approvals, and driver diagnostics. */
|
|
14
|
+
init_src();
|
|
13
15
|
async function extensionStatus(service, includeLocalArtifacts) {
|
|
14
16
|
const endpoints = service.endpointTools.registry.list().filter((item) => item.kind === "browser" && item.tools.some((tool) => tool.descriptor.name === "browser.control")).sort((left, right) => right.lastHeartbeatAt - left.lastHeartbeatAt);
|
|
15
17
|
const endpoint = endpoints[0];
|
|
@@ -21,8 +23,8 @@ async function extensionStatus(service, includeLocalArtifacts) {
|
|
|
21
23
|
socketConnected: connected,
|
|
22
24
|
connected,
|
|
23
25
|
driverKind: "extension",
|
|
24
|
-
protocolVersion: connected ?
|
|
25
|
-
expectedProtocolVersion:
|
|
26
|
+
protocolVersion: connected ? 5 : null,
|
|
27
|
+
expectedProtocolVersion: 5,
|
|
26
28
|
extensionVersion,
|
|
27
29
|
endpoints: endpoints.map((item) => ({
|
|
28
30
|
endpointId: item.endpointId,
|
|
@@ -67,16 +69,16 @@ function chromeDevicePrincipal(c) {
|
|
|
67
69
|
const device = getDevice(principal.deviceId);
|
|
68
70
|
return device?.platform === "chrome" && device.revokedAt === void 0 ? principal : void 0;
|
|
69
71
|
}
|
|
70
|
-
function canManageBrowserSession(c, service,
|
|
72
|
+
function canManageBrowserSession(c, service, conversationId) {
|
|
71
73
|
const principal = chromeDevicePrincipal(c);
|
|
72
|
-
if (principal) return getBrowserTabBinding(
|
|
74
|
+
if (principal) return getBrowserTabBinding(conversationId)?.principalId === principal.deviceId;
|
|
73
75
|
return isLocalOwnerRequest(c, service);
|
|
74
76
|
}
|
|
75
77
|
function registerBrowserRoutes(authenticated, deps) {
|
|
76
78
|
const { service, strictRateLimitMiddleware } = deps;
|
|
77
|
-
authenticated.get("/api/browser/tab-bindings/:
|
|
78
|
-
const
|
|
79
|
-
const binding = getBrowserTabBinding(
|
|
79
|
+
authenticated.get("/api/browser/tab-bindings/:conversationId", (c) => {
|
|
80
|
+
const conversationId = c.req.param("conversationId").trim();
|
|
81
|
+
const binding = getBrowserTabBinding(conversationId);
|
|
80
82
|
if (!binding) return c.json({
|
|
81
83
|
ok: false,
|
|
82
84
|
error: {
|
|
@@ -84,7 +86,7 @@ function registerBrowserRoutes(authenticated, deps) {
|
|
|
84
86
|
message: "Tab binding not found"
|
|
85
87
|
}
|
|
86
88
|
}, 404);
|
|
87
|
-
if (!canManageBrowserSession(c, service,
|
|
89
|
+
if (!canManageBrowserSession(c, service, conversationId)) return c.json({
|
|
88
90
|
ok: false,
|
|
89
91
|
error: {
|
|
90
92
|
code: "FORBIDDEN",
|
|
@@ -96,7 +98,7 @@ function registerBrowserRoutes(authenticated, deps) {
|
|
|
96
98
|
payload: binding
|
|
97
99
|
});
|
|
98
100
|
});
|
|
99
|
-
authenticated.put("/api/browser/tab-bindings/:
|
|
101
|
+
authenticated.put("/api/browser/tab-bindings/:conversationId", async (c) => {
|
|
100
102
|
const principal = chromeDevicePrincipal(c);
|
|
101
103
|
if (!principal?.deviceId) return c.json({
|
|
102
104
|
ok: false,
|
|
@@ -121,8 +123,8 @@ function registerBrowserRoutes(authenticated, deps) {
|
|
|
121
123
|
message: "Browser endpoint is not active"
|
|
122
124
|
}
|
|
123
125
|
}, 401);
|
|
124
|
-
const
|
|
125
|
-
if (!
|
|
126
|
+
const conversationId = c.req.param("conversationId").trim();
|
|
127
|
+
if (!conversationId || !await service.sessions.getSession(conversationId)) return c.json({
|
|
126
128
|
ok: false,
|
|
127
129
|
error: {
|
|
128
130
|
code: "NOT_FOUND",
|
|
@@ -132,7 +134,7 @@ function registerBrowserRoutes(authenticated, deps) {
|
|
|
132
134
|
const { turnToken: _turnToken, ...bindingInput } = parsed.data;
|
|
133
135
|
const binding = setBrowserTabBinding({
|
|
134
136
|
...bindingInput,
|
|
135
|
-
|
|
137
|
+
conversationId,
|
|
136
138
|
principalId: principal.deviceId
|
|
137
139
|
});
|
|
138
140
|
return c.json({
|
|
@@ -140,9 +142,9 @@ function registerBrowserRoutes(authenticated, deps) {
|
|
|
140
142
|
payload: binding
|
|
141
143
|
});
|
|
142
144
|
});
|
|
143
|
-
authenticated.delete("/api/browser/tab-bindings/:
|
|
144
|
-
const
|
|
145
|
-
if (!canManageBrowserSession(c, service,
|
|
145
|
+
authenticated.delete("/api/browser/tab-bindings/:conversationId", (c) => {
|
|
146
|
+
const conversationId = c.req.param("conversationId").trim();
|
|
147
|
+
if (!canManageBrowserSession(c, service, conversationId)) return c.json({
|
|
146
148
|
ok: false,
|
|
147
149
|
error: {
|
|
148
150
|
code: "FORBIDDEN",
|
|
@@ -151,7 +153,7 @@ function registerBrowserRoutes(authenticated, deps) {
|
|
|
151
153
|
}, 403);
|
|
152
154
|
return c.json({
|
|
153
155
|
ok: true,
|
|
154
|
-
payload: { removed: deleteBrowserTabBinding(
|
|
156
|
+
payload: { removed: deleteBrowserTabBinding(conversationId) }
|
|
155
157
|
});
|
|
156
158
|
});
|
|
157
159
|
authenticated.get("/api/browser/extension-status", async (c) => {
|
|
@@ -295,20 +297,20 @@ function registerBrowserRoutes(authenticated, deps) {
|
|
|
295
297
|
}
|
|
296
298
|
});
|
|
297
299
|
authenticated.get("/api/browser/approvals", (c) => {
|
|
298
|
-
const
|
|
299
|
-
if (!isLocalOwnerRequest(c, service) && (!
|
|
300
|
+
const conversationId = c.req.query("conversationId");
|
|
301
|
+
if (!isLocalOwnerRequest(c, service) && (!conversationId || !canManageBrowserSession(c, service, conversationId))) return c.json({
|
|
300
302
|
ok: false,
|
|
301
303
|
error: "Local owner access required."
|
|
302
304
|
}, 403);
|
|
303
305
|
return c.json({
|
|
304
306
|
ok: true,
|
|
305
|
-
approvals: listBrowserApprovals(
|
|
307
|
+
approvals: listBrowserApprovals(conversationId)
|
|
306
308
|
});
|
|
307
309
|
});
|
|
308
310
|
authenticated.post("/api/browser/approvals/respond", strictRateLimitMiddleware, async (c) => {
|
|
309
311
|
const body = await c.req.json().catch(() => null);
|
|
310
312
|
const approval = typeof body?.id === "string" ? listBrowserApprovals().find((candidate) => candidate.id === body.id) : void 0;
|
|
311
|
-
if (!isLocalOwnerRequest(c, service) && (!approval || !canManageBrowserSession(c, service, approval.
|
|
313
|
+
if (!isLocalOwnerRequest(c, service) && (!approval || !canManageBrowserSession(c, service, approval.conversationId))) return c.json({
|
|
312
314
|
ok: false,
|
|
313
315
|
error: "Local owner access required."
|
|
314
316
|
}, 403);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Context } from 'hono';
|
|
2
2
|
import type { AuthenticatedRouteDeps } from './deps.js';
|
|
3
|
-
export declare function patchChatModelConfig(c: Context, service: AuthenticatedRouteDeps['service'],
|
|
3
|
+
export declare function patchChatModelConfig(c: Context, service: AuthenticatedRouteDeps['service'], conversationId: string, body: Record<string, unknown>): Promise<(Response & import("hono").TypedResponse<{
|
|
4
4
|
ok: false;
|
|
5
5
|
error: string;
|
|
6
6
|
code: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { withModelConfigLock } from "../../../session/model-config-lock.js";
|
|
2
2
|
//#region src/gateway/hono/routes/chat-model-config.ts
|
|
3
|
-
async function patchChatModelConfig(c, service,
|
|
4
|
-
return withModelConfigLock(
|
|
3
|
+
async function patchChatModelConfig(c, service, conversationId, body) {
|
|
4
|
+
return withModelConfigLock(conversationId, async () => {
|
|
5
5
|
const changesModel = body.model !== void 0 || body.thinkingLevel !== void 0;
|
|
6
6
|
if (changesModel) {
|
|
7
|
-
const state = service.getSessionInputState(
|
|
8
|
-
if (service.sessions.getActiveRun(
|
|
7
|
+
const state = service.getSessionInputState(conversationId);
|
|
8
|
+
if (service.sessions.getActiveRun(conversationId).active || state.activeRunId || state.inputs.length > 0) return c.json({
|
|
9
9
|
ok: false,
|
|
10
10
|
error: "Wait for the current reply and pending inputs to finish",
|
|
11
11
|
code: "SESSION_BUSY"
|
|
@@ -23,7 +23,7 @@ async function patchChatModelConfig(c, service, sessionKey, body) {
|
|
|
23
23
|
error: "Select a specific model"
|
|
24
24
|
}, 400);
|
|
25
25
|
}
|
|
26
|
-
const result = await service.sessions.patchAgentConfig(
|
|
26
|
+
const result = await service.sessions.patchAgentConfig(conversationId, {
|
|
27
27
|
...body,
|
|
28
28
|
...changesModel ? { fixedModel: true } : {}
|
|
29
29
|
});
|
|
@@ -34,7 +34,7 @@ async function patchChatModelConfig(c, service, sessionKey, body) {
|
|
|
34
34
|
}, result.code === "CONFIG_CHANGED" ? 409 : 400);
|
|
35
35
|
return c.json({
|
|
36
36
|
ok: true,
|
|
37
|
-
payload: await service.sessions.getAgentConfig(
|
|
37
|
+
payload: await service.sessions.getAgentConfig(conversationId)
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
40
|
}
|
|
@@ -58,9 +58,9 @@ function registerCommandsSkillsRoutes(authenticated, deps) {
|
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
authenticated.get("/api/review/context", async (c) => {
|
|
61
|
-
const
|
|
61
|
+
const conversationId = c.req.query("conversationId")?.trim();
|
|
62
62
|
try {
|
|
63
|
-
const payload = await buildReviewContext(await resolveGitRoot(effectiveWorkspacePathForSession(service.getConfig(),
|
|
63
|
+
const payload = await buildReviewContext(await resolveGitRoot(effectiveWorkspacePathForSession(service.getConfig(), conversationId, null, getProjectForSession(conversationId))));
|
|
64
64
|
return c.json({
|
|
65
65
|
ok: true,
|
|
66
66
|
payload
|
|
@@ -76,21 +76,21 @@ function registerCommandsSkillsRoutes(authenticated, deps) {
|
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
authenticated.get("/api/chat/skills", async (c) => {
|
|
79
|
-
const
|
|
79
|
+
const conversationId = c.req.query("conversationId")?.trim();
|
|
80
80
|
const agentId = c.req.query("agentId")?.trim() || service.getConfig().agents?.default || "main";
|
|
81
|
-
const payload =
|
|
81
|
+
const payload = conversationId ? await service.marketplace.getSessionSkillsApi(conversationId) : service.marketplace.getAgentSkillsApi(agentId);
|
|
82
82
|
return c.json({
|
|
83
83
|
ok: true,
|
|
84
84
|
payload
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
87
|
authenticated.get("/api/chat/workspace-trust", async (c) => {
|
|
88
|
-
const
|
|
89
|
-
if (!
|
|
88
|
+
const conversationId = c.req.query("conversationId")?.trim();
|
|
89
|
+
if (!conversationId) return c.json({
|
|
90
90
|
ok: false,
|
|
91
|
-
error: "Missing
|
|
91
|
+
error: "Missing conversationId"
|
|
92
92
|
}, 400);
|
|
93
|
-
const payload = await service.marketplace.getSessionWorkspaceTrustApi(
|
|
93
|
+
const payload = await service.marketplace.getSessionWorkspaceTrustApi(conversationId);
|
|
94
94
|
return c.json({
|
|
95
95
|
ok: true,
|
|
96
96
|
payload
|
|
@@ -106,19 +106,19 @@ function registerCommandsSkillsRoutes(authenticated, deps) {
|
|
|
106
106
|
error: "Invalid JSON"
|
|
107
107
|
}, 400);
|
|
108
108
|
}
|
|
109
|
-
const
|
|
110
|
-
if (!
|
|
109
|
+
const conversationId = typeof body.conversationId === "string" ? body.conversationId.trim() : "";
|
|
110
|
+
if (!conversationId || typeof body.trusted !== "boolean") return c.json({
|
|
111
111
|
ok: false,
|
|
112
|
-
error: "Expected {
|
|
112
|
+
error: "Expected { conversationId: string, trusted: boolean }"
|
|
113
113
|
}, 400);
|
|
114
|
-
const payload = await service.marketplace.setSessionWorkspaceTrustApi(
|
|
114
|
+
const payload = await service.marketplace.setSessionWorkspaceTrustApi(conversationId, body.trusted);
|
|
115
115
|
return c.json({
|
|
116
116
|
ok: true,
|
|
117
117
|
payload
|
|
118
118
|
});
|
|
119
119
|
});
|
|
120
120
|
authenticated.get("/api/chat/capabilities", (c) => {
|
|
121
|
-
const payload = service.agentService.getCapabilityCatalog(c.req.query("
|
|
121
|
+
const payload = service.agentService.getCapabilityCatalog(c.req.query("conversationId")?.trim());
|
|
122
122
|
return c.json({
|
|
123
123
|
ok: true,
|
|
124
124
|
payload
|
|
@@ -2,7 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
//#region src/gateway/hono/routes/connection-waits.ts
|
|
3
3
|
const actionSchema = z.object({
|
|
4
4
|
waitId: z.string().min(1),
|
|
5
|
-
|
|
5
|
+
expectedTranscriptId: z.string().min(1),
|
|
6
6
|
expectedVersion: z.number().int().positive(),
|
|
7
7
|
idempotencyKey: z.string().min(1).max(200),
|
|
8
8
|
action: z.enum([
|
|
@@ -20,11 +20,11 @@ const actionSchema = z.object({
|
|
|
20
20
|
accountId: z.string().optional()
|
|
21
21
|
}).strict();
|
|
22
22
|
function registerConnectionWaitRoutes(app, { service, strictRateLimitMiddleware }) {
|
|
23
|
-
app.get("/api/sessions/:
|
|
23
|
+
app.get("/api/sessions/:conversationId/connection-wait", (c) => {
|
|
24
24
|
try {
|
|
25
25
|
return c.json({
|
|
26
26
|
ok: true,
|
|
27
|
-
payload: service.connectionRecovery.snapshot(c.req.param("
|
|
27
|
+
payload: service.connectionRecovery.snapshot(c.req.param("conversationId"))
|
|
28
28
|
});
|
|
29
29
|
} catch {
|
|
30
30
|
return c.json({
|
|
@@ -33,14 +33,14 @@ function registerConnectionWaitRoutes(app, { service, strictRateLimitMiddleware
|
|
|
33
33
|
}, 404);
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
app.post("/api/sessions/:
|
|
36
|
+
app.post("/api/sessions/:conversationId/connection-wait/actions", strictRateLimitMiddleware, async (c) => {
|
|
37
37
|
const parsed = actionSchema.safeParse(await c.req.json().catch(() => null));
|
|
38
38
|
if (!parsed.success) return c.json({
|
|
39
39
|
ok: false,
|
|
40
40
|
error: "Invalid connection action"
|
|
41
41
|
}, 400);
|
|
42
42
|
try {
|
|
43
|
-
const payload = await service.connectionRecovery.act(c.req.param("
|
|
43
|
+
const payload = await service.connectionRecovery.act(c.req.param("conversationId"), parsed.data);
|
|
44
44
|
return c.json({
|
|
45
45
|
ok: true,
|
|
46
46
|
payload
|
|
@@ -470,14 +470,14 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
470
470
|
error: "Invalid approval status."
|
|
471
471
|
}, 400);
|
|
472
472
|
const principalId = c.req.query("principalId")?.trim() || "local-owner";
|
|
473
|
-
const
|
|
474
|
-
if (!hasGatewayScope(getGatewayPrincipal(c).scopes, "gateway.admin") && (!
|
|
473
|
+
const conversationId = c.req.query("conversationId")?.trim() || void 0;
|
|
474
|
+
if (!hasGatewayScope(getGatewayPrincipal(c).scopes, "gateway.admin") && (!conversationId || principalId !== "local-owner")) return c.json({
|
|
475
475
|
ok: false,
|
|
476
476
|
error: "A local-owner session is required to read confirmations."
|
|
477
477
|
}, 403);
|
|
478
478
|
const approvals = listConnectorApprovals({
|
|
479
479
|
principalId,
|
|
480
|
-
|
|
480
|
+
conversationId,
|
|
481
481
|
status,
|
|
482
482
|
limit: Number(c.req.query("limit") ?? "100")
|
|
483
483
|
});
|
|
@@ -595,8 +595,8 @@ function registerConnectorRoutes(authenticated, deps) {
|
|
|
595
595
|
ok: false,
|
|
596
596
|
error: "Connector approval not found."
|
|
597
597
|
}, 404);
|
|
598
|
-
const
|
|
599
|
-
if (!hasGatewayScope(getGatewayPrincipal(c).scopes, "gateway.admin") && (!
|
|
598
|
+
const conversationId = typeof record.conversationId === "string" ? record.conversationId.trim() : "";
|
|
599
|
+
if (!hasGatewayScope(getGatewayPrincipal(c).scopes, "gateway.admin") && (!conversationId || current.conversationId !== conversationId || current.principalId !== "local-owner")) return c.json({
|
|
600
600
|
ok: false,
|
|
601
601
|
error: "Confirmation does not belong to the requested local-owner session."
|
|
602
602
|
}, 403);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSqliteDatabase } from "../../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../../../storage/sqlite/transaction.js";
|
|
2
2
|
import { countKnowledgeSourceItems, deleteKnowledgeSourceItems } from "../../../storage/sqlite/knowledge-repository.js";
|
|
3
3
|
import { getConnectorAccount } from "../../../storage/sqlite/connector-account-repository.js";
|
|
4
4
|
import "../../../storage/sqlite/index.js";
|
|
@@ -11,6 +11,7 @@ import { listUnderstandingSourceDefinitions } from "../../../user-context/source
|
|
|
11
11
|
import { randomUUID } from "node:crypto";
|
|
12
12
|
//#region src/gateway/hono/routes/context-sources.ts
|
|
13
13
|
init_agent_scope();
|
|
14
|
+
init_transaction();
|
|
14
15
|
function stringField(value, field) {
|
|
15
16
|
if (!value || typeof value !== "object") return "";
|
|
16
17
|
const fieldValue = value[field];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { devicePairingCompleteSchema, devicePairingProofSchema, devicePairingRequestSchema } from "../../../../packages/gateway-contract/src/device-pairing.js";
|
|
2
|
+
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
2
3
|
import { getOrCreateGatewayIdentity, signGatewayPayload } from "../../../storage/sqlite/gateway-identity-repository.js";
|
|
3
4
|
import { resolveClientIpFromRequest } from "../../client-ip.js";
|
|
4
5
|
import { buckets } from "../../rate-limit/buckets.js";
|
|
@@ -9,6 +10,7 @@ import { z } from "zod";
|
|
|
9
10
|
import { bodyLimit } from "hono/body-limit";
|
|
10
11
|
import { getConnInfo } from "@hono/node-server/conninfo";
|
|
11
12
|
//#region src/gateway/hono/routes/device-pairing-approval.ts
|
|
13
|
+
init_src();
|
|
12
14
|
function pairingClientKey(c, options) {
|
|
13
15
|
let remoteAddress;
|
|
14
16
|
try {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { devicePairingInvitationPayloadSchema, devicePairingTargetKindSchema, formatBrowserPairingInvitation } from "../../../../packages/gateway-contract/src/device-pairing.js";
|
|
2
|
+
import { init_src } from "../../../../packages/gateway-contract/src/index.js";
|
|
2
3
|
import { listDevices, revokeDevice, rotateDeviceRefreshToken } from "../../../storage/sqlite/device-access-repository.js";
|
|
3
4
|
import { getGatewayIdentityPublicKeyRaw, getOrCreateGatewayIdentity, signGatewayPayload } from "../../../storage/sqlite/gateway-identity-repository.js";
|
|
4
5
|
import { createDevicePairingSetup, isDevicePairingSetupActive } from "../../../storage/sqlite/device-pairing-repository.js";
|
|
@@ -11,6 +12,7 @@ import os from "node:os";
|
|
|
11
12
|
import { z } from "zod";
|
|
12
13
|
import { bodyLimit } from "hono/body-limit";
|
|
13
14
|
//#region src/gateway/hono/routes/devices.ts
|
|
15
|
+
init_src();
|
|
14
16
|
const refreshRequestSchema = z.strictObject({
|
|
15
17
|
refreshToken: z.string().min(1).max(256),
|
|
16
18
|
timestamp: z.number().int().positive(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDevice } from "../../../storage/sqlite/device-access-repository.js";
|
|
2
|
-
import { endpointPrincipalRegistrationSchema, endpointSessionBindingRequestSchema } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
2
|
+
import { endpointPrincipalRegistrationSchema, endpointSessionBindingRequestSchema, init_src } from "../../../../packages/endpoint-tools-protocol/src/index.js";
|
|
3
3
|
import { createEndpointPrincipal, getEndpointPrincipal, listEndpointPrincipals, revokeEndpointPrincipal } from "../../../storage/sqlite/endpoint-principal-repository.js";
|
|
4
4
|
import { listEndpointToolInvocationAudits } from "../../../storage/sqlite/endpoint-tool-invocation-repository.js";
|
|
5
5
|
import "../../../storage/sqlite/index.js";
|
|
@@ -7,6 +7,7 @@ import { parseEndpointPublicKey } from "../../../endpoint-tools/auth.js";
|
|
|
7
7
|
import { ENDPOINT_UPLOAD_MAX_BYTES, EndpointUploadError } from "../../../endpoint-tools/upload-service.js";
|
|
8
8
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
9
9
|
//#region src/gateway/hono/routes/endpoint-tools.ts
|
|
10
|
+
init_src();
|
|
10
11
|
async function readBoundedBody(body, maxBytes) {
|
|
11
12
|
if (!body) return new Uint8Array();
|
|
12
13
|
const reader = body.getReader();
|
|
@@ -145,9 +146,9 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
145
146
|
payload: listEndpointToolInvocationAudits(Number.isFinite(limit) ? limit : 100)
|
|
146
147
|
});
|
|
147
148
|
});
|
|
148
|
-
authenticated.get("/api/endpoint-tools/bindings/:
|
|
149
|
+
authenticated.get("/api/endpoint-tools/bindings/:conversationId", (c) => {
|
|
149
150
|
try {
|
|
150
|
-
const binding = deps.service.endpointTools.bindings.get(c.req.param("
|
|
151
|
+
const binding = deps.service.endpointTools.bindings.get(c.req.param("conversationId"));
|
|
151
152
|
return binding ? c.json({
|
|
152
153
|
ok: true,
|
|
153
154
|
payload: binding
|
|
@@ -168,7 +169,7 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
168
169
|
}, 400);
|
|
169
170
|
}
|
|
170
171
|
});
|
|
171
|
-
authenticated.put("/api/endpoint-tools/bindings/:
|
|
172
|
+
authenticated.put("/api/endpoint-tools/bindings/:conversationId", async (c) => {
|
|
172
173
|
const parsed = endpointSessionBindingRequestSchema.safeParse(await c.req.json().catch(() => null));
|
|
173
174
|
if (!parsed.success) return c.json({
|
|
174
175
|
ok: false,
|
|
@@ -187,7 +188,7 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
187
188
|
}
|
|
188
189
|
}, 403);
|
|
189
190
|
try {
|
|
190
|
-
const binding = deps.service.endpointTools.bindings.bind(c.req.param("
|
|
191
|
+
const binding = deps.service.endpointTools.bindings.bind(c.req.param("conversationId"), parsed.data.endpointId);
|
|
191
192
|
return c.json({
|
|
192
193
|
ok: true,
|
|
193
194
|
payload: binding
|
|
@@ -204,9 +205,9 @@ function registerEndpointToolRoutes(authenticated, deps) {
|
|
|
204
205
|
}, status);
|
|
205
206
|
}
|
|
206
207
|
});
|
|
207
|
-
authenticated.delete("/api/endpoint-tools/bindings/:
|
|
208
|
+
authenticated.delete("/api/endpoint-tools/bindings/:conversationId", (c) => {
|
|
208
209
|
try {
|
|
209
|
-
const removed = deps.service.endpointTools.bindings.unbind(c.req.param("
|
|
210
|
+
const removed = deps.service.endpointTools.bindings.unbind(c.req.param("conversationId"));
|
|
210
211
|
return c.json({
|
|
211
212
|
ok: true,
|
|
212
213
|
payload: { removed }
|
|
@@ -54,8 +54,8 @@ function registerExecutionEnvironmentRoutes(authenticated, deps) {
|
|
|
54
54
|
})
|
|
55
55
|
});
|
|
56
56
|
});
|
|
57
|
-
authenticated.get("/api/sessions/:
|
|
58
|
-
const environment = sessions.get(c.req.param("
|
|
57
|
+
authenticated.get("/api/sessions/:conversationId/environment", (c) => {
|
|
58
|
+
const environment = sessions.get(c.req.param("conversationId"));
|
|
59
59
|
return environment ? c.json({
|
|
60
60
|
ok: true,
|
|
61
61
|
environment
|
|
@@ -64,13 +64,13 @@ function registerExecutionEnvironmentRoutes(authenticated, deps) {
|
|
|
64
64
|
error: "Execution environment not found"
|
|
65
65
|
}, 404);
|
|
66
66
|
});
|
|
67
|
-
authenticated.post("/api/sessions/:
|
|
68
|
-
const
|
|
69
|
-
if (deps.service.getActiveWebchatRunId(
|
|
67
|
+
authenticated.post("/api/sessions/:conversationId/environment", async (c) => {
|
|
68
|
+
const conversationId = c.req.param("conversationId");
|
|
69
|
+
if (deps.service.getActiveWebchatRunId(conversationId)) return c.json({
|
|
70
70
|
ok: false,
|
|
71
71
|
error: "Stop the active session run before changing its environment"
|
|
72
72
|
}, 409);
|
|
73
|
-
const session = await deps.service.sessions.getSession(
|
|
73
|
+
const session = await deps.service.sessions.getSession(conversationId);
|
|
74
74
|
if (!session) return c.json({
|
|
75
75
|
ok: false,
|
|
76
76
|
error: "Session not found"
|
|
@@ -89,7 +89,7 @@ function registerExecutionEnvironmentRoutes(authenticated, deps) {
|
|
|
89
89
|
}, 400);
|
|
90
90
|
try {
|
|
91
91
|
const environment = await sessions.attach({
|
|
92
|
-
|
|
92
|
+
conversationId,
|
|
93
93
|
project,
|
|
94
94
|
mode,
|
|
95
95
|
baseRef: typeof body.baseRef === "string" ? body.baseRef : void 0
|
|
@@ -102,14 +102,14 @@ function registerExecutionEnvironmentRoutes(authenticated, deps) {
|
|
|
102
102
|
return c.json(errorResponse(error), 409);
|
|
103
103
|
}
|
|
104
104
|
});
|
|
105
|
-
authenticated.delete("/api/sessions/:
|
|
106
|
-
const
|
|
107
|
-
if (deps.service.getActiveWebchatRunId(
|
|
105
|
+
authenticated.delete("/api/sessions/:conversationId/environment", async (c) => {
|
|
106
|
+
const conversationId = c.req.param("conversationId");
|
|
107
|
+
if (deps.service.getActiveWebchatRunId(conversationId)) return c.json({
|
|
108
108
|
ok: false,
|
|
109
109
|
error: "Stop the active session run before releasing its environment"
|
|
110
110
|
}, 409);
|
|
111
111
|
try {
|
|
112
|
-
const environment = await sessions.release(
|
|
112
|
+
const environment = await sessions.release(conversationId, c.req.query("keepManaged") !== "true");
|
|
113
113
|
return c.json({
|
|
114
114
|
ok: true,
|
|
115
115
|
environment
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileServiceError } from "../../../files/file-service.js";
|
|
2
|
-
import { buildFilePathClassifierContext, classifyFileLocation, displayNameForPath,
|
|
2
|
+
import { buildFilePathClassifierContext, classifyFileLocation, displayNameForPath, fileRefConversationIdsMatch, resolveFileReferenceCandidate } from "../../file-path-classifier.js";
|
|
3
3
|
import { classifyFileReferenceFsError } from "../../file-reference-errors.js";
|
|
4
4
|
import { FileReferenceRegistry } from "../../file-reference-registry.js";
|
|
5
5
|
import { getGatewayFileSpaceService } from "../../file-space-service.js";
|
|
@@ -14,10 +14,10 @@ function registerFileReferenceRoutes(app, deps) {
|
|
|
14
14
|
if (!body.spaceId || !body.path?.trim()) return c.json({ error: { message: "spaceId and path are required" } }, 400);
|
|
15
15
|
try {
|
|
16
16
|
const space = await files.get(body.spaceId);
|
|
17
|
-
const
|
|
17
|
+
const conversationId = body.conversationId?.trim();
|
|
18
18
|
const agentId = space.bindings.find((binding) => binding.kind === "agent")?.id;
|
|
19
19
|
const ctx = {
|
|
20
|
-
...buildFilePathClassifierContext(deps.service.currentConfig,
|
|
20
|
+
...buildFilePathClassifierContext(deps.service.currentConfig, conversationId, conversationId ? void 0 : agentId),
|
|
21
21
|
workspaceRoot: space.root
|
|
22
22
|
};
|
|
23
23
|
const inputPath = body.path.trim();
|
|
@@ -56,7 +56,7 @@ function registerFileReferenceRoutes(app, deps) {
|
|
|
56
56
|
] : ["copyPath"];
|
|
57
57
|
const ref = refs.register({
|
|
58
58
|
absolutePath,
|
|
59
|
-
|
|
59
|
+
conversationId,
|
|
60
60
|
...classified,
|
|
61
61
|
capabilities
|
|
62
62
|
});
|
|
@@ -79,7 +79,7 @@ function registerFileReferenceRoutes(app, deps) {
|
|
|
79
79
|
const ref = refs.resolve(c.req.param("id"));
|
|
80
80
|
if (!ref) return c.json({ error: { message: "File reference expired" } }, 404);
|
|
81
81
|
const body = await c.req.json();
|
|
82
|
-
if (!
|
|
82
|
+
if (!fileRefConversationIdsMatch(ref.conversationId, body.conversationId)) return c.json({ error: { message: "File reference forbidden" } }, 403);
|
|
83
83
|
if (body.action !== "openExternal" && body.action !== "revealInFolder" || !ref.capabilities.includes(body.action)) return c.json({ error: { message: "Action not allowed" } }, 403);
|
|
84
84
|
try {
|
|
85
85
|
if (await realpath(ref.absolutePath) !== ref.absolutePath) return c.json({ error: { message: "File reference changed" } }, 409);
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { getGatewayPrincipal } from "../../security/gateway-principal.js";
|
|
2
2
|
import { ImportError } from "../../../imports/types.js";
|
|
3
3
|
import { isImportSource } from "../../../imports/sources.js";
|
|
4
|
+
import { ImportSelectionRepository } from "../../../storage/sqlite/import-selection-repository.js";
|
|
5
|
+
import { getLiveInventory, previewInventoryItem, publicInventory, scanProduct } from "../../../imports/inventory.js";
|
|
6
|
+
import { importSelection, listImportSources } from "../../../imports/productImport.js";
|
|
4
7
|
import { createRuntimeImportService } from "../../../imports/runtime.js";
|
|
5
|
-
import { importProduct, listImportSources } from "../../../imports/productImport.js";
|
|
6
8
|
import { z } from "zod";
|
|
7
9
|
//#region src/gateway/hono/routes/imports.ts
|
|
8
|
-
const
|
|
10
|
+
const selectionSchema = z.object({
|
|
11
|
+
inventoryId: z.string().uuid(),
|
|
12
|
+
candidateIds: z.array(z.string().uuid()).min(1).max(5e3),
|
|
13
|
+
requestId: z.string().uuid(),
|
|
14
|
+
retryOf: z.string().uuid().optional()
|
|
15
|
+
}).strict();
|
|
9
16
|
function registerImportRoutes(app, deps) {
|
|
17
|
+
const service = () => createRuntimeImportService("gateway-owner", () => deps.service.agentService.refreshSkillsAfterDiskChange(), (root) => deps.service.agentService.getWorkspaceTrust(root).trusted);
|
|
10
18
|
const respond = async (c, run) => {
|
|
11
19
|
try {
|
|
12
20
|
if (getGatewayPrincipal(c).kind !== "owner") throw new ImportError("owner_required", "Only the Gateway owner can import local capabilities", 403);
|
|
@@ -28,17 +36,21 @@ function registerImportRoutes(app, deps) {
|
|
|
28
36
|
return c.json({
|
|
29
37
|
ok: false,
|
|
30
38
|
code: "import_failed",
|
|
31
|
-
error: "Import could not finish.
|
|
39
|
+
error: "Import could not finish. Existing content is preserved."
|
|
32
40
|
}, 400);
|
|
33
41
|
}
|
|
34
42
|
};
|
|
35
43
|
app.get("/api/imports/sources", (c) => respond(c, () => ({ sources: listImportSources("gateway-owner") })));
|
|
36
|
-
app.post("/api/imports/sources/:source/
|
|
44
|
+
app.post("/api/imports/sources/:source/scan", deps.strictRateLimitMiddleware, (c) => respond(c, async () => {
|
|
37
45
|
const source = c.req.param("source");
|
|
38
46
|
if (!isImportSource(source)) throw new ImportError("unsupported_source", "Unsupported source");
|
|
39
|
-
|
|
40
|
-
return
|
|
47
|
+
z.object({}).strict().parse(await c.req.json());
|
|
48
|
+
return scanProduct(service(), source);
|
|
41
49
|
}));
|
|
50
|
+
app.get("/api/imports/inventories/:id", (c) => respond(c, () => publicInventory(getLiveInventory("gateway-owner", c.req.param("id")))));
|
|
51
|
+
app.get("/api/imports/inventories/:id/items/:itemId/preview", (c) => respond(c, () => previewInventoryItem(service(), "gateway-owner", c.req.param("id"), c.req.param("itemId"))));
|
|
52
|
+
app.post("/api/imports/runs", deps.strictRateLimitMiddleware, (c) => respond(c, async () => importSelection(service(), selectionSchema.parse(await c.req.json()))));
|
|
53
|
+
app.get("/api/imports/runs/:id", (c) => respond(c, () => new ImportSelectionRepository("gateway-owner").get("run", c.req.param("id"))));
|
|
42
54
|
}
|
|
43
55
|
//#endregion
|
|
44
56
|
export { registerImportRoutes };
|
|
@@ -10,9 +10,9 @@ const SUPPORT_NEEDS = new Set([
|
|
|
10
10
|
]);
|
|
11
11
|
function registerInteractionStateRoutes(authenticated, deps) {
|
|
12
12
|
authenticated.get("/api/interaction-state", (c) => {
|
|
13
|
-
const
|
|
14
|
-
if (!
|
|
15
|
-
const state = getInteractionState(
|
|
13
|
+
const conversationId = c.req.query("conversationId")?.trim() ?? "";
|
|
14
|
+
if (!conversationId) return c.json({ error: "conversationId is required" }, 400);
|
|
15
|
+
const state = getInteractionState(conversationId);
|
|
16
16
|
return state ? c.json({
|
|
17
17
|
ok: true,
|
|
18
18
|
state
|
|
@@ -23,11 +23,11 @@ function registerInteractionStateRoutes(authenticated, deps) {
|
|
|
23
23
|
});
|
|
24
24
|
authenticated.patch("/api/interaction-state", deps.strictRateLimitMiddleware, async (c) => {
|
|
25
25
|
const body = await c.req.json().catch(() => null);
|
|
26
|
-
const
|
|
26
|
+
const conversationId = body && typeof body === "object" && typeof body.conversationId === "string" ? body.conversationId.trim() : "";
|
|
27
27
|
const supportNeed = body && typeof body === "object" && SUPPORT_NEEDS.has(body.supportNeed) ? body.supportNeed : void 0;
|
|
28
|
-
if (!
|
|
28
|
+
if (!conversationId || !supportNeed) return c.json({ error: "conversationId and a valid supportNeed are required" }, 400);
|
|
29
29
|
const state = setInteractionState({
|
|
30
|
-
|
|
30
|
+
conversationId,
|
|
31
31
|
signal: {
|
|
32
32
|
supportNeed,
|
|
33
33
|
confidence: 1,
|
|
@@ -12,8 +12,8 @@ function registerLogsRoutes(authenticated, _deps) {
|
|
|
12
12
|
q: query.q,
|
|
13
13
|
module: query.module,
|
|
14
14
|
requestId: query.requestId,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
conversationId: query.conversationId,
|
|
16
|
+
transcriptId: query.transcriptId,
|
|
17
17
|
limit: query.limit ? parseInt(query.limit) : 100,
|
|
18
18
|
offset: query.offset ? parseInt(query.offset) : 0
|
|
19
19
|
});
|
|
@@ -63,15 +63,15 @@ function registerMediaRoutes(authenticated, deps) {
|
|
|
63
63
|
ok: false,
|
|
64
64
|
error: { message: "Missing uri" }
|
|
65
65
|
}, 400);
|
|
66
|
-
const
|
|
66
|
+
const conversationId = c.req.query("conversationId");
|
|
67
67
|
const taskId = c.req.query("taskId");
|
|
68
|
-
if (!
|
|
68
|
+
if (!conversationId && !taskId) return c.json({
|
|
69
69
|
ok: false,
|
|
70
70
|
error: { message: "Missing media scope" }
|
|
71
71
|
}, 400);
|
|
72
72
|
try {
|
|
73
73
|
const { buffer, path } = await readMediaReference((await resolveScopedMediaReference(deps.service, uriRaw.trim(), {
|
|
74
|
-
|
|
74
|
+
conversationId,
|
|
75
75
|
taskId
|
|
76
76
|
})).uri, MAX_WEBCHAT_ATTACHMENT_FILE_BYTES);
|
|
77
77
|
const contentType = mimeTypeFromMediaPath(path);
|