@xopcai/xopc 0.0.285 → 0.0.291
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/README.md +16 -0
- package/README.zh-CN.md +16 -0
- package/dist/browser-ext/dist/assets/{auth-DB30ywek.js → auth-B2CDTr_F.js} +3 -2
- 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 +171 -145
- 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-B0BTIk9j.js → activity-store-6lmzUBEr.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Dc-0QZTQ.js → agent-avatar-dicebear-BCtrkF15.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-D2eYNelh.js +1 -0
- package/dist/gateway/static/root/assets/agents-BedA5XwI.js +1 -0
- package/dist/gateway/static/root/assets/{api-Coly9ab6.js → api-D6yepxBp.js} +1 -1
- package/dist/gateway/static/root/assets/api-Dnfnl1Gd.js +1 -0
- package/dist/gateway/static/root/assets/{app-management-settings-panel-TWBO-msg.js → app-management-settings-panel-Md562Fo-.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CpTZ2KuT.js → appearance-settings-BiBFI4BM.js} +1 -1
- package/dist/gateway/static/root/assets/apps-page-Corla83b.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-z_u6alob.js → archive-plugin-A_Unp751.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-C2nS04TC.js → attachment-load-D6idSUyP.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-aIBsw9zR.js → automations-page-C6j71Lgs.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DjZdhLQ5.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CGmXoZnl.js → binary-plugins-BkKYh-8v.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CtvzCZhC.js → block-editor-CDcMvaku.js} +3 -3
- package/dist/gateway/static/root/assets/{browser-automation-inputs-BOTU1isH.js → browser-automation-inputs-Cq4sIJt2.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-BwU5V8J0.js → browser-automations-page-C64k4TBH.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-1k5rj_qR.js +8 -0
- package/dist/gateway/static/root/assets/button-CGlRPNzi.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-B2NvoTYb.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-DExixzp4.js +1 -0
- package/dist/gateway/static/root/assets/{channels-status-swr-Dfi0Desh.js → channels-status-swr-CVzEYBpX.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-B0MvcO6j.js → chat-terminal-dock-B9eKFkbg.js} +2 -2
- package/dist/gateway/static/root/assets/computer-model-settings-DW6j2lsn.js +1 -0
- package/dist/gateway/static/root/assets/computer-settings-page-C2Qyw63Q.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-C3ubZz7K.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-DXOvbHCr.js → date-picker-BdxjXVKL.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-BEnC-eS0.js → dependency-picker-CXOa4uh4.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-CBWiAaSv.js +1 -0
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CYyjcSn6.js → desktop-pet-settings-BX1aILDK.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-BPMGvAKE.js → device-pairing-wizard-bqm_Yf4i.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-H_aPMGXW.js → extension-debug-page-B4MMerja.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-C1JnpeMt.js → extension-page-B3ZtINak.js} +1 -1
- package/dist/gateway/static/root/assets/extension-settings-page-8BkQVh0z.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-G2lQt7Ak.js → gateway-config-swr-BBovMBQ1.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-ZyhacQX5.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-GP31PUrG.js → gateway-startup-retry-NXDtzZED.js} +1 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-Bllcxm2A.js +1 -0
- package/dist/gateway/static/root/assets/home-page-Cv2e8XBR.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-CKFhfHSw.js → image-generation-api-D01ieqGC.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-GROumhj8.js → imports-page-DJG1BJzd.js} +1 -1
- package/dist/gateway/static/root/assets/index-B7EieIE4.js +75 -0
- package/dist/gateway/static/root/assets/index-BD5uNzie.css +2 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-zcI822m_.js → keyboard-shortcuts-settings-6A6JOHTI.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-Cipj52Zq.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-BtgDJ92Q.js → local-apps-page-bD-m7YHJ.js} +1 -1
- package/dist/gateway/static/root/assets/locale-store-eliqUnBr.js +1 -0
- package/dist/gateway/static/root/assets/logs-page-D5feO2yw.js +2 -0
- package/dist/gateway/static/root/assets/{management-settings-DasZxCyD.js → management-settings-B7mz0_44.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-6oYdBahT.js → markdown-view-BIg7cei7.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-CxthbBvk.js → media-plugins-DQ2HfMeG.js} +1 -1
- package/dist/gateway/static/root/assets/messages-NYDOR8-j.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-DhYJigb3.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-Bg5NPUdf.js +8 -0
- package/dist/gateway/static/root/assets/page-tabs-DmG_Qjl8.js +1 -0
- package/dist/gateway/static/root/assets/popover-select-DldSX8GX.js +1 -0
- package/dist/gateway/static/root/assets/{preview-open-alternatives-Bevpbq9f.js → preview-open-alternatives-Y9J1kjKC.js} +1 -1
- package/dist/gateway/static/root/assets/proactive-page-Duc_NQ8l.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-Bi1seZpM.js → product-open-page-DtgWUAwT.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-DVOiucVA.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Dr_kDoCJ.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-D0ddwBFj.js → registry-api-Dpm3N2h0.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-hyJ2KKKK.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-Wkru8_My.js → runtime-tools-settings-panel-DB7J9opJ.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-CSMRzj9Y.js → schema-form-CMYuPOlE.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-DGsnYcoh.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DuzZqQMn.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-BayJP08a.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-BcQGAnCs.js → settings-page-CWBqZtt6.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-C97S5g5c.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-DQocUl-1.js → share-preview-page-Wn5bQA-5.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-pfVzP8F7.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DDJ0ZKx3.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-DbDpLjDW.js +2 -0
- package/dist/gateway/static/root/assets/{skills-page.utils-DtlfCgJp.js → skills-page.utils-DCHY_kou.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-Ct698Nf-.js → system-settings-panel-DhgITgId.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-UqwtiHYu.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-ng8KJsAT.js → theme-store-DUHPzKzv.js} +1 -1
- package/dist/gateway/static/root/assets/tunnel-api-DJ3gz2tM.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-BSyxRHt2.js → use-autosave-htvgT192.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-xOsXY_2W.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-SE3OQI1s.js → voice-api-key-field-BviJF3Oa.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-VNuCmdFe.js → voice-config-api-Bjy8EFqi.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-Dn1vy2oq.js → work-discovery-overlay-BOBVNEYZ.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BJEfGY-k.js → workflow-run-setup-panel-D1N9uUyM.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-2ylzlgkG.js +6 -0
- package/dist/gateway/static/root/index.html +12 -12
- package/dist/package.js +1 -1
- package/dist/packages/computer-control-contract/src/index.js +178 -0
- 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 -128
- 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-audio.js +15 -10
- package/dist/packages/realtime-protocol/src/voice-catalog.js +61 -0
- package/dist/packages/realtime-protocol/src/voice.js +257 -248
- 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 +28 -27
- package/dist/src/agent/agent-manager.js +184 -182
- 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 +15 -15
- 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/workspace-revision.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/model-runtime.js +1 -1
- package/dist/src/agent/embedded/run-for-session.d.ts +1 -1
- package/dist/src/agent/embedded/run-for-session.js +79 -105
- package/dist/src/agent/embedded/run-turn.js +86 -34
- 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 +5 -3
- 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/image/tool-model-config.js +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/mcp/oauth/mcp-oauth-store.js +1 -1
- 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 +113 -110
- 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 +46 -46
- 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/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/index.js +25 -15
- package/dist/src/agent/skills/parse-skill-metadata.d.ts +5 -1
- package/dist/src/agent/skills/parse-skill-metadata.js +21 -1
- package/dist/src/agent/skills/types.d.ts +7 -0
- 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 +14 -13
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -0
- package/dist/src/agent/tool-manuals/computer.js +19 -0
- package/dist/src/agent/tool-manuals/index.js +7 -0
- 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/computer-use-tool.d.ts +11 -0
- package/dist/src/agent/tools/computer-use-tool.js +86 -0
- 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 +5 -3
- package/dist/src/agent/tools/factory.js +66 -36
- 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/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/agent-config/index.js +2 -2
- package/dist/src/agent-config/resolver.js +5 -0
- package/dist/src/agent-config/schema.d.ts +32 -0
- package/dist/src/agent-config/schema.js +5 -2
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/credentials.js +2 -2
- package/dist/src/auth/oauth/xopc-cloud.js +1 -1
- package/dist/src/auth/profiles/store.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +2 -2
- 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 +1 -1
- 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/capabilities/readiness/from-config.js +14 -2
- package/dist/src/capabilities/readiness/planner.js +3 -2
- package/dist/src/capabilities/readiness/types.d.ts +1 -1
- 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 +1 -1
- 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 +10 -6
- package/dist/src/cli/commands/doctor/checks/database-schema.js +3 -2
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +3 -3
- 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 +2 -1
- package/dist/src/cli/commands/import.js +2 -1
- package/dist/src/cli/commands/logs.js +3 -3
- package/dist/src/cli/commands/models.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 +2 -1
- package/dist/src/computer/broker.d.ts +97 -0
- package/dist/src/computer/broker.js +337 -0
- package/dist/src/computer/config.d.ts +9 -0
- package/dist/src/computer/config.js +16 -0
- package/dist/src/computer/control-guard.d.ts +4 -0
- package/dist/src/computer/control-guard.js +17 -0
- package/dist/src/computer/errors.d.ts +7 -0
- package/dist/src/computer/errors.js +30 -0
- package/dist/src/computer/model-adapter.d.ts +44 -0
- package/dist/src/computer/model-adapter.js +273 -0
- package/dist/src/computer/model-config.d.ts +3 -0
- package/dist/src/computer/model-config.js +27 -0
- package/dist/src/computer/model-policy.d.ts +3 -0
- package/dist/src/computer/model-policy.js +20 -0
- package/dist/src/computer/runtime.d.ts +128 -0
- package/dist/src/computer/runtime.js +388 -0
- 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 +4 -4
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.d.ts +42 -6
- package/dist/src/config/models-json.js +15 -1
- package/dist/src/config/schema.d.ts +38 -1
- package/dist/src/config/schema.js +11 -2
- package/dist/src/config/voice.js +2 -2
- 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 +5 -2
- package/dist/src/discussions/analyzer.js +2 -1
- package/dist/src/discussions/edits.js +4 -2
- package/dist/src/discussions/index.js +1 -1
- package/dist/src/discussions/organizer.js +3 -2
- package/dist/src/discussions/recording.js +5 -2
- 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/sealer.js +1 -1
- package/dist/src/discussions/service.js +6 -3
- 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 +1 -0
- package/dist/src/endpoint-tools/invocation-service.js +7 -3
- package/dist/src/endpoint-tools/policy.js +9 -1
- package/dist/src/endpoint-tools/registry.js +2 -1
- package/dist/src/endpoint-tools/runtime.js +1 -0
- package/dist/src/endpoint-tools/upload-service.d.ts +13 -1
- package/dist/src/endpoint-tools/upload-service.js +75 -9
- 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/lockfile.js +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/agent-builtin-tools.d.ts +7 -1
- package/dist/src/gateway/agent-builtin-tools.js +7 -0
- package/dist/src/gateway/agents-admin.js +1 -1
- 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 +5 -5
- 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/global-defaults-admin.js +16 -0
- package/dist/src/gateway/heartbeat/check-store.js +2 -1
- package/dist/src/gateway/heartbeat/service.js +23 -9
- package/dist/src/gateway/hono/lib/config-payload.d.ts +15 -0
- package/dist/src/gateway/hono/lib/config-payload.js +2 -1
- 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/config-patch/misc.js +13 -2
- 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/discussions.js +2 -2
- package/dist/src/gateway/hono/routes/endpoint-tools.js +11 -9
- 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/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/models.js +6 -3
- package/dist/src/gateway/hono/routes/notes.js +11 -11
- 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 +56 -2
- package/dist/src/gateway/hono/routes/workflows.js +7 -7
- 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/security/gateway-scopes.d.ts +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +3 -0
- 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/config-coordinator.js +4 -1
- 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 +4 -4
- package/dist/src/gateway/service.js +76 -70
- 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/index.js +1 -1
- 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/productImport.js +2 -1
- package/dist/src/infra/node-sqlite.js +9 -3
- package/dist/src/infra/process-diagnostics.js +9 -5
- package/dist/src/infra/sqlite-errors.js +25 -20
- package/dist/src/infra/unhandled-rejections.js +15 -7
- package/dist/src/infra/update-restart.js +1 -1
- package/dist/src/infra/warning-filter.js +9 -3
- 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/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 +2 -1
- 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.js +2 -1
- package/dist/src/proactive/execution/context.js +2 -1
- package/dist/src/proactive/execution/insight.js +2 -0
- package/dist/src/proactive/execution/repository.js +2 -1
- package/dist/src/proactive/execution/worker.js +3 -2
- package/dist/src/proactive/experience.d.ts +1 -1
- package/dist/src/proactive/experience.js +4 -3
- package/dist/src/proactive/follow-ups.d.ts +7 -7
- package/dist/src/proactive/follow-ups.js +5 -4
- package/dist/src/proactive/inbox/cards.js +5 -2
- package/dist/src/proactive/inbox/delivery.js +2 -1
- package/dist/src/proactive/inbox/digest.js +2 -1
- package/dist/src/proactive/inbox/lifecycle.js +2 -1
- package/dist/src/proactive/inbox/repository.js +2 -1
- package/dist/src/proactive/inbox/service.js +2 -1
- 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.js +2 -1
- package/dist/src/proactive/policy/service.js +4 -1
- package/dist/src/proactive/routing/batch-repository.js +2 -1
- package/dist/src/proactive/scenarios/control.js +4 -1
- package/dist/src/proactive/scenarios/repository.js +2 -1
- package/dist/src/proactive/service.js +2 -1
- package/dist/src/proactive/source-freshness.js +2 -1
- package/dist/src/proactive/status.js +2 -1
- package/dist/src/proactive/temporal/schedule.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/auth-runtime/resolve-auth.js +1 -1
- package/dist/src/providers/index.js +2 -2
- package/dist/src/providers/model-catalog-persistence.js +11 -2
- package/dist/src/providers/model-catalog-store.js +1 -0
- package/dist/src/providers/model-catalog-types.d.ts +7 -2
- package/dist/src/providers/model-reference-auditor.js +7 -4
- package/dist/src/providers/model-registry.js +4 -1
- package/dist/src/providers/model-supplements.js +18 -2
- package/dist/src/providers/presentation.js +4 -2
- package/dist/src/providers/prompt-cache-lifecycle.d.ts +2 -2
- package/dist/src/providers/prompt-cache-lifecycle.js +6 -6
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/providers/xopc-cloud-model-source.js +10 -4
- package/dist/src/realtime/broker.js +3 -3
- package/dist/src/realtime/runtime.js +1 -1
- 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.js +2 -1
- package/dist/src/storage/sqlite/import-selection-repository.js +2 -1
- package/dist/src/storage/sqlite/index.d.ts +2 -2
- 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.js +2 -1
- package/dist/src/storage/sqlite/migrations/178_conversation_uuid.sql +2 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.d.ts +11 -0
- package/dist/src/storage/sqlite/migrations/conversation-backup.js +98 -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-uuid.d.ts +8 -0
- package/dist/src/storage/sqlite/migrations/conversation-uuid.js +366 -0
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.d.ts +1 -0
- package/dist/src/storage/sqlite/migrations/conversation-windows-owners.js +95 -0
- package/dist/src/storage/sqlite/migrations/discover.js +9 -5
- package/dist/src/storage/sqlite/migrations/errors.d.ts +5 -0
- package/dist/src/storage/sqlite/migrations/errors.js +38 -23
- package/dist/src/storage/sqlite/migrations/runner.d.ts +2 -2
- package/dist/src/storage/sqlite/migrations/runner.js +44 -14
- package/dist/src/storage/sqlite/migrations/types.d.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 +16 -8
- package/dist/src/storage/sqlite/schema.sql +2641 -526
- 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 +4 -4
- 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 +116 -114
- 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/platform-catalog.d.ts +81 -0
- package/dist/src/voice/platform-catalog.js +16 -0
- package/dist/src/voice/platform-settings.d.ts +4 -0
- package/dist/src/voice/platform-settings.js +120 -0
- package/dist/src/voice/platform-streams.d.ts +12 -0
- package/dist/src/voice/platform-streams.js +250 -0
- 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/omniEngine.js +8 -5
- package/dist/src/voice/realtime/omniRoute.d.ts +1 -0
- package/dist/src/voice/realtime/omniRoute.js +11 -1
- 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 +28 -19
- package/dist/src/voice/realtime/runtime.types.d.ts +6 -6
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +15 -8
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +12 -19
- 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 +35 -31
- 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 +6 -3
- package/skills/creative/algorithmic-art/SKILL.md +7 -0
- package/skills/creative/frontend-design/SKILL.md +8 -0
- package/skills/creative/hatch-pet/SKILL.md +7 -0
- package/skills/creative/theme-factory/SKILL.md +8 -0
- package/skills/documents/doc-coauthoring/SKILL.md +7 -0
- package/skills/documents/docx/SKILL.md +7 -0
- package/skills/documents/pdf/SKILL.md +7 -0
- package/skills/documents/pptx/SKILL.md +7 -0
- package/skills/documents/xlsx/SKILL.md +9 -1
- package/skills/engineering/build-xopc-local-app/SKILL.md +7 -0
- package/skills/engineering/define-task/SKILL.md +7 -0
- package/skills/engineering/diagnose/SKILL.md +8 -0
- package/skills/engineering/tdd/SKILL.md +8 -0
- package/skills/tools/find-skills/SKILL.md +8 -0
- package/skills/tools/github/SKILL.md +7 -0
- package/skills/tools/summarize/SKILL.md +8 -0
- package/skills/tools/webapp-testing/SKILL.md +8 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CcmqK1Sc.js +0 -1
- package/dist/gateway/static/root/assets/agents-B_7PVt7S.js +0 -1
- package/dist/gateway/static/root/assets/api-COG_Tzpv.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-6qxxKFsK.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-BRQlU4qk.js +0 -6
- package/dist/gateway/static/root/assets/browser-settings-page-DDjbDeHQ.js +0 -8
- package/dist/gateway/static/root/assets/button-BA45yciM.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DM1Bcf1x.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-Bq36CUxL.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-L8JehrxF.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-DtPNvznL.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-C75kCOqe.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-BCF732TU.js +0 -1
- package/dist/gateway/static/root/assets/heartbeat-settings-C7fjiowt.js +0 -1
- package/dist/gateway/static/root/assets/home-page-DZXeXdUL.js +0 -1
- package/dist/gateway/static/root/assets/index-ChIrvv3t.js +0 -74
- package/dist/gateway/static/root/assets/index-R1VNlHjj.css +0 -2
- package/dist/gateway/static/root/assets/local-app-workbench-page-CAEKGTAg.js +0 -2
- package/dist/gateway/static/root/assets/locale-store-DlOv7896.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-DHZ4BEkG.js +0 -2
- package/dist/gateway/static/root/assets/messages-Ls1Aaiqd.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-BcWq3ddw.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-DfZ8QWyv.js +0 -8
- package/dist/gateway/static/root/assets/page-tabs-BG39KidE.js +0 -1
- package/dist/gateway/static/root/assets/popover-select-DGmMQt4t.js +0 -1
- package/dist/gateway/static/root/assets/proactive-page-D2U_xQaS.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CzlGTW4F.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-mQsM-TsP.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Cb56JcO1.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-Hj9uFcIO.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-CV4-_EVA.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-wcAdCkK8.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-DzxmsaQG.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-xlJh1ccG.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-wSXJRSxX.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-AmqtBJo7.js +0 -2
- package/dist/gateway/static/root/assets/task-detail-page-sQpwq5-c.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-Boajol0M.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-DIEHnAER.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-DgRNIyr7.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
- package/dist/src/storage/sqlite/migrations/002_add_flush_columns.sql +0 -3
- package/dist/src/storage/sqlite/migrations/003_add_note_markdown_meta.sql +0 -4
- package/dist/src/storage/sqlite/migrations/004_add_session_type_metadata.sql +0 -15
- package/dist/src/storage/sqlite/migrations/005_add_note_agent_contexts.sql +0 -10
- package/dist/src/storage/sqlite/migrations/006_add_goals.sql +0 -108
- package/dist/src/storage/sqlite/migrations/007_goal_run_judge_schema.sql +0 -4
- package/dist/src/storage/sqlite/migrations/008_goal_queue_workflow_runs.sql +0 -53
- package/dist/src/storage/sqlite/migrations/009_cron_jobs.sql +0 -24
- package/dist/src/storage/sqlite/migrations/010_session_id_identity.sql +0 -30
- package/dist/src/storage/sqlite/migrations/011_goal_context_messages.sql +0 -8
- package/dist/src/storage/sqlite/migrations/012_memory_records.sql +0 -63
- package/dist/src/storage/sqlite/migrations/013_memory_trace_events.sql +0 -21
- package/dist/src/storage/sqlite/migrations/014_memory_record_governance.sql +0 -10
- package/dist/src/storage/sqlite/migrations/015_memory_trace_feedback.sql +0 -4
- package/dist/src/storage/sqlite/migrations/016_automations.sql +0 -47
- package/dist/src/storage/sqlite/migrations/017_automation_run_events.sql +0 -14
- package/dist/src/storage/sqlite/migrations/018_automation_safety.sql +0 -1
- package/dist/src/storage/sqlite/migrations/019_projects.sql +0 -40
- package/dist/src/storage/sqlite/migrations/020_project_default_agent.sql +0 -1
- package/dist/src/storage/sqlite/migrations/021_projects_fts.sql +0 -21
- package/dist/src/storage/sqlite/migrations/022_work_items.sql +0 -61
- package/dist/src/storage/sqlite/migrations/023_work_item_attachments.sql +0 -15
- package/dist/src/storage/sqlite/migrations/024_activity_events.sql +0 -62
- package/dist/src/storage/sqlite/migrations/025_project_pinned_at.sql +0 -5
- package/dist/src/storage/sqlite/migrations/026_goal_contracts.sql +0 -10
- package/dist/src/storage/sqlite/migrations/027_mobile_notifications.sql +0 -43
- package/dist/src/storage/sqlite/migrations/028_goal_evidence_requirements.sql +0 -47
- package/dist/src/storage/sqlite/migrations/029_user_understanding.sql +0 -133
- package/dist/src/storage/sqlite/migrations/030_connectors.sql +0 -94
- package/dist/src/storage/sqlite/migrations/031_connector_approvals.sql +0 -24
- package/dist/src/storage/sqlite/migrations/032_connector_webhook_deliveries.sql +0 -15
- package/dist/src/storage/sqlite/migrations/033_user_trust_policies.sql +0 -6
- package/dist/src/storage/sqlite/migrations/034_allow_global_auto_trust.sql +0 -14
- package/dist/src/storage/sqlite/migrations/035_user_profile_prompt_state.sql +0 -7
- package/dist/src/storage/sqlite/migrations/036_goal_outcome_metric.sql +0 -12
- package/dist/src/storage/sqlite/migrations/037_connected_knowledge_pipeline.sql +0 -47
- package/dist/src/storage/sqlite/migrations/038_user_owned_memory.sql +0 -68
- package/dist/src/storage/sqlite/migrations/039_memory_reference_consents.sql +0 -19
- package/dist/src/storage/sqlite/migrations/040_local_apps.sql +0 -32
- package/dist/src/storage/sqlite/migrations/041_local_app_release_lifecycle.sql +0 -17
- package/dist/src/storage/sqlite/migrations/042_work_discovery.sql +0 -41
- package/dist/src/storage/sqlite/migrations/043_local_app_acceptance_runs.sql +0 -16
- package/dist/src/storage/sqlite/migrations/044_repair_work_discovery_foreign_keys.sql +0 -75
- package/dist/src/storage/sqlite/migrations/045_extension_ui_grants.sql +0 -13
- package/dist/src/storage/sqlite/migrations/046_work_discovery_feedback.sql +0 -13
- package/dist/src/storage/sqlite/migrations/047_work_discovery_sources.sql +0 -16
- package/dist/src/storage/sqlite/migrations/048_work_understanding_investigations.sql +0 -40
- package/dist/src/storage/sqlite/migrations/049_work_understanding_threads.sql +0 -52
- package/dist/src/storage/sqlite/migrations/050_work_discovery_source_refreshes.sql +0 -15
- package/dist/src/storage/sqlite/migrations/051_focus_watches.sql +0 -26
- package/dist/src/storage/sqlite/migrations/052_proactive_insights.sql +0 -25
- package/dist/src/storage/sqlite/migrations/053_browser_recipes.sql +0 -45
- package/dist/src/storage/sqlite/migrations/054_task_outcomes.sql +0 -24
- package/dist/src/storage/sqlite/migrations/055_relationship_settings.sql +0 -14
- package/dist/src/storage/sqlite/migrations/056_task_verification.sql +0 -6
- package/dist/src/storage/sqlite/migrations/057_interaction_states.sql +0 -11
- package/dist/src/storage/sqlite/migrations/058_proactive_value.sql +0 -3
- package/dist/src/storage/sqlite/migrations/059_composer_input_history.sql +0 -8
- package/dist/src/storage/sqlite/migrations/060_remove_runtime_transcript_messages.sql +0 -45
- package/dist/src/storage/sqlite/migrations/061_drop_compaction_checkpoints.sql +0 -2
- package/dist/src/storage/sqlite/migrations/062_connector_learning_jobs.sql +0 -27
- package/dist/src/storage/sqlite/migrations/063_knowledge_collection_scopes.sql +0 -14
- package/dist/src/storage/sqlite/migrations/064_user_claims.sql +0 -60
- package/dist/src/storage/sqlite/migrations/065_knowledge_item_scope_identity.sql +0 -116
- package/dist/src/storage/sqlite/migrations/066_first_class_focuses.sql +0 -126
- package/dist/src/storage/sqlite/migrations/067_home_attention_acknowledgements.sql +0 -9
- package/dist/src/storage/sqlite/migrations/068_proactive_event_spine.sql +0 -71
- package/dist/src/storage/sqlite/migrations/069_proactive_scenario_control.sql +0 -69
- package/dist/src/storage/sqlite/migrations/070_proactive_execution.sql +0 -55
- package/dist/src/storage/sqlite/migrations/071_proactive_inbox.sql +0 -45
- package/dist/src/storage/sqlite/migrations/072_proactive_judgments.sql +0 -14
- package/dist/src/storage/sqlite/migrations/073_enable_default_proactive_scenarios.sql +0 -13
- package/dist/src/storage/sqlite/migrations/074_deduplicate_blocked_work_routing.sql +0 -5
- package/dist/src/storage/sqlite/migrations/075_connector_sync_policies.sql +0 -13
- package/dist/src/storage/sqlite/migrations/076_meeting_preparation_scenario.sql +0 -29
- package/dist/src/storage/sqlite/migrations/077_proactive_insight_fingerprints.sql +0 -4
- package/dist/src/storage/sqlite/migrations/078_discussion_captures.sql +0 -64
- package/dist/src/storage/sqlite/migrations/079_discussion_follow_up_scenario.sql +0 -29
- package/dist/src/storage/sqlite/migrations/080_task_outcome_context.sql +0 -15
- package/dist/src/storage/sqlite/migrations/081_project_monitoring_policies.sql +0 -10
- package/dist/src/storage/sqlite/migrations/082_one_click_live_discussions.sql +0 -100
- package/dist/src/storage/sqlite/migrations/083_session_task_plans.sql +0 -9
- package/dist/src/storage/sqlite/migrations/084_work_intake_lifecycle.sql +0 -26
- package/dist/src/storage/sqlite/migrations/085_task_outcome_projection.sql +0 -19
- package/dist/src/storage/sqlite/migrations/086_outcome_aggregates.sql +0 -168
- package/dist/src/storage/sqlite/migrations/087_context_snapshots.sql +0 -21
- package/dist/src/storage/sqlite/migrations/088_automation_execution_deadlines.sql +0 -5
- package/dist/src/storage/sqlite/migrations/089_automation_run_leases.sql +0 -8
- package/dist/src/storage/sqlite/migrations/090_outcome_contract_judgment.sql +0 -2
- package/dist/src/storage/sqlite/migrations/091_context_allocation.sql +0 -1
- package/dist/src/storage/sqlite/migrations/092_outcome_execution_runtime.sql +0 -88
- package/dist/src/storage/sqlite/migrations/093_remove_legacy_goals.sql +0 -174
- package/dist/src/storage/sqlite/migrations/094_outcome_judgment_and_authority.sql +0 -3
- package/dist/src/storage/sqlite/migrations/095_session_input_queue.sql +0 -35
- package/dist/src/storage/sqlite/migrations/096_drop_work_intakes.sql +0 -6
- package/dist/src/storage/sqlite/migrations/097_work_item_lifecycle.sql +0 -194
- package/dist/src/storage/sqlite/migrations/098_discussion_note_documents.sql +0 -99
- package/dist/src/storage/sqlite/migrations/099_task_model.sql +0 -500
- package/dist/src/storage/sqlite/migrations/100_project_task_taskrun.sql +0 -763
- package/dist/src/storage/sqlite/migrations/101_session_response_language.sql +0 -1
- package/dist/src/storage/sqlite/migrations/102_session_user_context_mode.sql +0 -2
- package/dist/src/storage/sqlite/migrations/103_finalize_structured_memory.sql +0 -3
- package/dist/src/storage/sqlite/migrations/104_turn_memory_feedback.sql +0 -77
- package/dist/src/storage/sqlite/migrations/105_dreaming_ledger.sql +0 -34
- package/dist/src/storage/sqlite/migrations/106_dreaming_run_reproducibility.sql +0 -2
- package/dist/src/storage/sqlite/migrations/107_connector_accounts.sql +0 -146
- package/dist/src/storage/sqlite/migrations/108_repair_user_memory_provider.sql +0 -18
- package/dist/src/storage/sqlite/migrations/109_endpoint_principals.sql +0 -14
- package/dist/src/storage/sqlite/migrations/110_session_input_origin.sql +0 -43
- package/dist/src/storage/sqlite/migrations/111_endpoint_tool_invocations.sql +0 -18
- package/dist/src/storage/sqlite/migrations/112_endpoint_instance_bindings.sql +0 -8
- package/dist/src/storage/sqlite/migrations/113_memory_evidence_single_source.sql +0 -76
- package/dist/src/storage/sqlite/migrations/114_user_context_domain.sql +0 -193
- package/dist/src/storage/sqlite/migrations/115_remove_legacy_user_context.sql +0 -6
- package/dist/src/storage/sqlite/migrations/116_structured_context_consolidation.sql +0 -38
- package/dist/src/storage/sqlite/migrations/117_unified_understanding_sources.sql +0 -110
- package/dist/src/storage/sqlite/migrations/118_task_board_rank.sql +0 -6
- package/dist/src/storage/sqlite/migrations/119_proactive_disposition.sql +0 -13
- package/dist/src/storage/sqlite/migrations/120_task_conversation.sql +0 -112
- package/dist/src/storage/sqlite/migrations/121_automation_inbox.sql +0 -24
- package/dist/src/storage/sqlite/migrations/122_automation_session_projects.sql +0 -18
- package/dist/src/storage/sqlite/migrations/123_remove_v2_compaction_boundaries.sql +0 -25
- package/dist/src/storage/sqlite/migrations/124_workflow_context_snapshots.sql +0 -15
- package/dist/src/storage/sqlite/migrations/125_project_workflow_presets.sql +0 -12
- package/dist/src/storage/sqlite/migrations/126_focus_context_governance.sql +0 -72
- package/dist/src/storage/sqlite/migrations/127_context_object_origin.sql +0 -36
- package/dist/src/storage/sqlite/migrations/128_context_extraction.sql +0 -73
- package/dist/src/storage/sqlite/migrations/129_focus_versions.sql +0 -51
- package/dist/src/storage/sqlite/migrations/130_context_evidence_provenance.sql +0 -18
- package/dist/src/storage/sqlite/migrations/131_session_input_contexts.sql +0 -2
- package/dist/src/storage/sqlite/migrations/132_transcript_source_context_metadata.sql +0 -34
- package/dist/src/storage/sqlite/migrations/133_archive_legacy_work_discovery_profile_facts.sql +0 -11
- package/dist/src/storage/sqlite/migrations/134_memory_provenance.sql +0 -18
- package/dist/src/storage/sqlite/migrations/135_user_people.sql +0 -59
- package/dist/src/storage/sqlite/migrations/136_product_notifications.sql +0 -79
- package/dist/src/storage/sqlite/migrations/137_understanding_status_audit.sql +0 -71
- package/dist/src/storage/sqlite/migrations/138_device_access.sql +0 -96
- package/dist/src/storage/sqlite/migrations/139_turn_outcome_artifact_backfill.sql +0 -231
- package/dist/src/storage/sqlite/migrations/140_endpoint_session_bindings.sql +0 -8
- package/dist/src/storage/sqlite/migrations/141_device_pairing_approval.sql +0 -17
- package/dist/src/storage/sqlite/migrations/142_session_input_instance.sql +0 -1
- package/dist/src/storage/sqlite/migrations/143_fixed_session_model.sql +0 -1
- package/dist/src/storage/sqlite/migrations/144_execution_environments.sql +0 -59
- package/dist/src/storage/sqlite/migrations/145_project_execution_mode.sql +0 -5
- package/dist/src/storage/sqlite/migrations/146_understanding_focus_exclusions.sql +0 -9
- package/dist/src/storage/sqlite/migrations/147_durable_application_state.sql +0 -39
- package/dist/src/storage/sqlite/migrations/148_user_model_foundation.sql +0 -554
- package/dist/src/storage/sqlite/migrations/149_separate_source_index_from_memory.sql +0 -18
- package/dist/src/storage/sqlite/migrations/150_session_connection_waits.sql +0 -47
- package/dist/src/storage/sqlite/migrations/151_proactive_scope_cleanup.sql +0 -6
- package/dist/src/storage/sqlite/migrations/152_proactive_scenario_contract.sql +0 -140
- package/dist/src/storage/sqlite/migrations/153_browser_control_v2.sql +0 -45
- package/dist/src/storage/sqlite/migrations/154_session_clarification_waits.sql +0 -60
- package/dist/src/storage/sqlite/migrations/155_browser_extension.sql +0 -120
- package/dist/src/storage/sqlite/migrations/156_browser_tab_bindings.sql +0 -14
- package/dist/src/storage/sqlite/migrations/157_browser_endpoint_principals.sql +0 -50
- package/dist/src/storage/sqlite/migrations/158_browser_native_enrollment.sql +0 -4
- package/dist/src/storage/sqlite/migrations/159_proactive_controls.sql +0 -68
- package/dist/src/storage/sqlite/migrations/160_proactive_web_push.sql +0 -27
- package/dist/src/storage/sqlite/migrations/161_proactive_delivery_and_lifecycle.sql +0 -51
- package/dist/src/storage/sqlite/migrations/162_proactive_product.sql +0 -7
- package/dist/src/storage/sqlite/migrations/163_proactive_follow_ups.sql +0 -29
- package/dist/src/storage/sqlite/migrations/164_browser_sessions.sql +0 -8
- package/dist/src/storage/sqlite/migrations/165_device_pairing_target.sql +0 -40
- package/dist/src/storage/sqlite/migrations/__tests__/mobile-discussion-source.test.ts +0 -20
- package/dist/src/storage/sqlite/migrations/discover.ts +0 -52
- package/dist/src/storage/sqlite/migrations/errors.ts +0 -32
- package/dist/src/storage/sqlite/migrations/runner.ts +0 -194
- package/dist/src/storage/sqlite/migrations/types.ts +0 -15
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { getSqliteDatabase } from "../../storage/sqlite/transaction.js";
|
|
3
|
+
import { getSqliteDatabase, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
4
4
|
import { evidenceSourcesFresh } from "../source-freshness.js";
|
|
5
5
|
import { authorizedConnectedSource } from "./authorization.js";
|
|
6
6
|
import { effectiveProactivePolicy } from "../policy/service.js";
|
|
@@ -10,9 +10,10 @@ import { markReadyBatches } from "../routing/batch-repository.js";
|
|
|
10
10
|
import { ContextProviderRegistry } from "./context.js";
|
|
11
11
|
import { attachSnapshot, claimNextRun, deferRunForSource, eventIdsForBatch, failRun, finishRun, saveSnapshot } from "./repository.js";
|
|
12
12
|
import { isValuableInsight, parseAnalysisResult, scoreInsight } from "./insight.js";
|
|
13
|
-
import { isDeepStrictEqual } from "node:util";
|
|
14
13
|
import { randomUUID } from "node:crypto";
|
|
14
|
+
import { isDeepStrictEqual } from "node:util";
|
|
15
15
|
//#region src/proactive/execution/worker.ts
|
|
16
|
+
init_transaction();
|
|
16
17
|
init_logger();
|
|
17
18
|
const log = createLogger("ProactiveWorker");
|
|
18
19
|
var ProactiveWorker = class {
|
|
@@ -50,7 +50,7 @@ export declare function delegationOverview(workspace: string): {
|
|
|
50
50
|
status: "completed" | "paused" | "watching";
|
|
51
51
|
revision: number;
|
|
52
52
|
lastCheckedAt: string;
|
|
53
|
-
|
|
53
|
+
conversationId: string;
|
|
54
54
|
sourceAvailable: boolean;
|
|
55
55
|
enabled: boolean;
|
|
56
56
|
subject: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { ProactiveConflict, effectiveProactivePolicy } from "./policy/service.js";
|
|
3
3
|
import { controlledSubscriptions, createControlledSubscription, requireSubscription, updateControlledSubscription } from "./scenarios/control.js";
|
|
4
4
|
import { ProactiveScenarioService } from "./scenarios/service.js";
|
|
@@ -9,6 +9,7 @@ import { getCard } from "./inbox/cards.js";
|
|
|
9
9
|
import { scanDueProjects } from "./temporal/schedule.js";
|
|
10
10
|
import { z } from "zod";
|
|
11
11
|
//#region src/proactive/experience.ts
|
|
12
|
+
init_transaction();
|
|
12
13
|
const DelegateSchema = z.object({
|
|
13
14
|
scenarioKey: z.enum([
|
|
14
15
|
"project_delivery_risk",
|
|
@@ -152,9 +153,9 @@ function projectSceneMoments(cards, delegations, followUps) {
|
|
|
152
153
|
help: card?.workDone || card?.recommendation || "I will watch the thread and prepare the next step when it matters.",
|
|
153
154
|
arrangementId: follow.subscriptionId,
|
|
154
155
|
manageRoute: `/assistant-work?follow-up=${encodeURIComponent(follow.id)}`,
|
|
155
|
-
object: follow.
|
|
156
|
+
object: follow.conversationId ? {
|
|
156
157
|
label: follow.subject ?? "Open conversation",
|
|
157
|
-
route: `/chat/${encodeURIComponent(follow.
|
|
158
|
+
route: `/chat/${encodeURIComponent(follow.conversationId)}`
|
|
158
159
|
} : null,
|
|
159
160
|
card,
|
|
160
161
|
updatedAt: card?.updatedAt ?? follow.lastCheckedAt ?? follow.dueAt
|
|
@@ -11,7 +11,7 @@ export type MailFollowUp = {
|
|
|
11
11
|
revision: number;
|
|
12
12
|
last_fingerprint: string | null;
|
|
13
13
|
last_checked_at: string | null;
|
|
14
|
-
|
|
14
|
+
conversation_id: string | null;
|
|
15
15
|
};
|
|
16
16
|
export declare function requireMailFollowUp(workspace: string, id: string): MailFollowUp;
|
|
17
17
|
export declare function authorizedMailThread(follow: MailFollowUp): {
|
|
@@ -28,7 +28,7 @@ export declare function mailFollowUpView(follow: MailFollowUp): {
|
|
|
28
28
|
status: "completed" | "paused" | "watching";
|
|
29
29
|
revision: number;
|
|
30
30
|
lastCheckedAt: string;
|
|
31
|
-
|
|
31
|
+
conversationId: string;
|
|
32
32
|
sourceAvailable: boolean;
|
|
33
33
|
enabled: boolean;
|
|
34
34
|
subject: string;
|
|
@@ -46,7 +46,7 @@ export declare function listMailFollowUps(workspace: string): {
|
|
|
46
46
|
status: "completed" | "paused" | "watching";
|
|
47
47
|
revision: number;
|
|
48
48
|
lastCheckedAt: string;
|
|
49
|
-
|
|
49
|
+
conversationId: string;
|
|
50
50
|
sourceAvailable: boolean;
|
|
51
51
|
enabled: boolean;
|
|
52
52
|
subject: string;
|
|
@@ -71,7 +71,7 @@ export declare function startMailFollowUp(workspace: string, value: unknown): {
|
|
|
71
71
|
status: "completed" | "paused" | "watching";
|
|
72
72
|
revision: number;
|
|
73
73
|
lastCheckedAt: string;
|
|
74
|
-
|
|
74
|
+
conversationId: string;
|
|
75
75
|
sourceAvailable: boolean;
|
|
76
76
|
enabled: boolean;
|
|
77
77
|
subject: string;
|
|
@@ -89,7 +89,7 @@ export declare function updateMailFollowUp(workspace: string, id: string, value:
|
|
|
89
89
|
status: "completed" | "paused" | "watching";
|
|
90
90
|
revision: number;
|
|
91
91
|
lastCheckedAt: string;
|
|
92
|
-
|
|
92
|
+
conversationId: string;
|
|
93
93
|
sourceAvailable: boolean;
|
|
94
94
|
enabled: boolean;
|
|
95
95
|
subject: string;
|
|
@@ -100,7 +100,7 @@ export declare function updateMailFollowUp(workspace: string, id: string, value:
|
|
|
100
100
|
sourceFresh: boolean;
|
|
101
101
|
};
|
|
102
102
|
/** Keep the existing chat and its exact connector confirmation flow as the write boundary. */
|
|
103
|
-
export declare function continueMailFollowUp(workspace: string, id: string,
|
|
103
|
+
export declare function continueMailFollowUp(workspace: string, id: string, conversationId: string): {
|
|
104
104
|
followUp: {
|
|
105
105
|
id: string;
|
|
106
106
|
subscriptionId: string;
|
|
@@ -109,7 +109,7 @@ export declare function continueMailFollowUp(workspace: string, id: string, sess
|
|
|
109
109
|
status: "completed" | "paused" | "watching";
|
|
110
110
|
revision: number;
|
|
111
111
|
lastCheckedAt: string;
|
|
112
|
-
|
|
112
|
+
conversationId: string;
|
|
113
113
|
sourceAvailable: boolean;
|
|
114
114
|
enabled: boolean;
|
|
115
115
|
subject: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { listKnowledgeSourceItems } from "../storage/sqlite/knowledge-repository.js";
|
|
3
3
|
import { getConnectorConnection } from "../storage/sqlite/connector-repository.js";
|
|
4
4
|
import { sourceFreshness } from "./source-freshness.js";
|
|
@@ -12,6 +12,7 @@ import { ProactiveEventService } from "./service.js";
|
|
|
12
12
|
import { randomUUID } from "node:crypto";
|
|
13
13
|
import { z } from "zod";
|
|
14
14
|
//#region src/proactive/follow-ups.ts
|
|
15
|
+
init_transaction();
|
|
15
16
|
const COMMUNICATION_SCENARIO = "communication_follow_up";
|
|
16
17
|
const CreateSchema = z.object({
|
|
17
18
|
sourceItemId: z.string().min(1),
|
|
@@ -51,7 +52,7 @@ function mailFollowUpView(follow) {
|
|
|
51
52
|
status: follow.status,
|
|
52
53
|
revision: follow.revision,
|
|
53
54
|
lastCheckedAt: follow.last_checked_at,
|
|
54
|
-
|
|
55
|
+
conversationId: follow.conversation_id,
|
|
55
56
|
sourceAvailable: Boolean(thread),
|
|
56
57
|
enabled: follow.status === "watching" && effectiveProactivePolicy(follow.subscription_id).enabled,
|
|
57
58
|
subject: thread ? emailFields(thread.origin.normalizedText).subject ?? "Email follow-up" : null,
|
|
@@ -121,11 +122,11 @@ function updateMailFollowUp(workspace, id, value) {
|
|
|
121
122
|
});
|
|
122
123
|
}
|
|
123
124
|
/** Keep the existing chat and its exact connector confirmation flow as the write boundary. */
|
|
124
|
-
function continueMailFollowUp(workspace, id,
|
|
125
|
+
function continueMailFollowUp(workspace, id, conversationId) {
|
|
125
126
|
const follow = requireMailFollowUp(workspace, id);
|
|
126
127
|
const thread = authorizedMailThread(follow);
|
|
127
128
|
if (!thread || follow.status !== "watching" || !effectiveProactivePolicy(follow.subscription_id).enabled) throw new Error("Resume and authorize this follow-up before continuing");
|
|
128
|
-
getSqliteDatabase().prepare("UPDATE proactive_follow_ups SET
|
|
129
|
+
getSqliteDatabase().prepare("UPDATE proactive_follow_ups SET conversation_id = ? WHERE id = ?").run(conversationId, id);
|
|
129
130
|
return {
|
|
130
131
|
followUp: mailFollowUpView(requireMailFollowUp(workspace, id)),
|
|
131
132
|
connectionId: thread.origin.metadata.connectionId,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { ProactiveCardActionSchema } from "../../../packages/gateway-contract/src/proactive.js";
|
|
3
|
+
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
4
|
import { getKnowledgeSourceItem } from "../../storage/sqlite/knowledge-repository.js";
|
|
4
5
|
import { insightSourcesAuthorized, insightSourcesChanged } from "../execution/authorization.js";
|
|
5
6
|
import { ProactiveConflict, effectiveProactivePolicy, subscriptionSettings } from "../policy/service.js";
|
|
@@ -9,6 +10,8 @@ import { executePendingProactiveActions } from "../actions/service.js";
|
|
|
9
10
|
import { getInboxItem } from "./repository.js";
|
|
10
11
|
import { ProactiveInboxService } from "./service.js";
|
|
11
12
|
//#region src/proactive/inbox/cards.ts
|
|
13
|
+
init_src();
|
|
14
|
+
init_transaction();
|
|
12
15
|
function requireCardScope(id, workspaceId) {
|
|
13
16
|
if (!getSqliteDatabase().prepare(`SELECT 1 FROM proactive_inbox_items i JOIN proactive_insights x USING(insight_id)
|
|
14
17
|
JOIN proactive_scenario_subscriptions s USING(subscription_id) WHERE i.inbox_item_id = ? AND s.workspace_id = ?`).get(id, workspaceId)) throw new Error("Card not found");
|
|
@@ -55,7 +58,7 @@ function getCard(id, workspaceId) {
|
|
|
55
58
|
...insight.artifact ? { artifact: insight.artifact } : {},
|
|
56
59
|
...insight.proposedAction && insight.actionStatus === "approval_required" ? { taskDraft: insight.proposedAction.input } : {},
|
|
57
60
|
...typeof insight.actionResult?.taskId === "string" ? { followUp: getSqliteDatabase().prepare("SELECT task_id AS taskId, title, phase, resolution FROM tasks WHERE task_id = ?").get(insight.actionResult.taskId) } : {},
|
|
58
|
-
...insight.scenarioKey === "communication_follow_up" ? { communication: getSqliteDatabase().prepare(`SELECT f.id, f.
|
|
61
|
+
...insight.scenarioKey === "communication_follow_up" ? { communication: getSqliteDatabase().prepare(`SELECT f.id, f.conversation_id AS conversationId
|
|
59
62
|
FROM proactive_runs r JOIN proactive_context_snapshots c ON c.snapshot_id = r.context_snapshot_id
|
|
60
63
|
JOIN proactive_follow_ups f ON f.id = json_extract(c.content_json, '$.follow_up.followUpId') WHERE r.run_id = (SELECT run_id FROM proactive_insights WHERE insight_id = ?)`).get(item.insightId) } : {},
|
|
61
64
|
relatedCardIds: item.correlationKey ? getSqliteDatabase().prepare("SELECT inbox_item_id AS id FROM proactive_inbox_items WHERE correlation_key = ? AND inbox_item_id <> ? AND withdrawn_at IS NULL").all(item.correlationKey, id).map((row) => row.id) : [],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { insightSourcesAuthorized, insightSourcesChanged, insightSourcesFresh } from "../execution/authorization.js";
|
|
3
3
|
import { effectiveProactivePolicy, localProactiveDay, nextDigestTime, quietHoursEnd, reserveProactiveNotification } from "../policy/service.js";
|
|
4
4
|
import { insightCorrelation } from "./lifecycle.js";
|
|
@@ -8,6 +8,7 @@ import { queueDigest } from "./digest.js";
|
|
|
8
8
|
import { notificationPlanFromGatewayEvent } from "../../notifications/planner.js";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
//#region src/proactive/inbox/delivery.ts
|
|
11
|
+
init_transaction();
|
|
11
12
|
/** The outbox is acknowledged only after a notification or suppression is persisted. */
|
|
12
13
|
function deliverProactiveCard(item, notifications, publish) {
|
|
13
14
|
const result = runSqliteWriteTransaction(() => {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { insightSourcesAuthorized, insightSourcesChanged, insightSourcesFresh } from "../execution/authorization.js";
|
|
3
3
|
import { effectiveProactivePolicy, localProactiveDay, nextDigestTime, proactiveChecksAllowed, proactivePreferences, quietHoursEnd } from "../policy/service.js";
|
|
4
4
|
import { getInboxItem } from "./repository.js";
|
|
5
5
|
import { getCard } from "./cards.js";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
//#region src/proactive/inbox/digest.ts
|
|
8
|
+
init_transaction();
|
|
8
9
|
function queueDigest(item, mode, dueAt) {
|
|
9
10
|
const policy = effectiveProactivePolicy(item.subscriptionId);
|
|
10
11
|
getSqliteDatabase().prepare(`INSERT INTO proactive_digest_queue(inbox_item_id, workspace_id, notification_revision, mode, due_at)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { insightSourcesAuthorized, insightSourcesChanged } from "../execution/authorization.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
//#region src/proactive/inbox/lifecycle.ts
|
|
5
|
+
init_transaction();
|
|
5
6
|
function withdrawCard(id, now = /* @__PURE__ */ new Date()) {
|
|
6
7
|
runSqliteWriteTransaction((db) => {
|
|
7
8
|
db.prepare("UPDATE proactive_inbox_items SET withdrawn_at = ?, updated_at = ? WHERE inbox_item_id = ? AND withdrawn_at IS NULL").run(now.toISOString(), now.toISOString(), id);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { insightSourcesAuthorized, insightSourcesChanged } from "../execution/authorization.js";
|
|
3
3
|
import { effectiveProactivePolicy } from "../policy/service.js";
|
|
4
4
|
import { decideProactiveDisposition, nextQuietHoursEnd, proactiveDispositionReason } from "../../tasks/project-monitoring-service.js";
|
|
5
5
|
import { randomUUID } from "node:crypto";
|
|
6
6
|
//#region src/proactive/inbox/repository.ts
|
|
7
|
+
init_transaction();
|
|
7
8
|
const s = (row, key) => String(row[key]);
|
|
8
9
|
function itemFromRow(row) {
|
|
9
10
|
const attentionKind = row.action_status === "completed" ? "receipt" : row.decision_json || row.action_status === "approval_required" ? "decision" : "information";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { getSqliteDatabase } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { publishInstructionFeedback } from "../scenarios/repository.js";
|
|
3
3
|
import { requireMailFollowUp, updateMailFollowUp } from "../follow-ups.js";
|
|
4
4
|
import { executePendingProactiveActions } from "../actions/service.js";
|
|
5
5
|
import { getInboxItem, getInboxSubscriptionId, listInbox, projectInsightsToInbox, recordDecision, recordFeedback, transitionInboxItem, wakeSnoozedItems } from "./repository.js";
|
|
6
6
|
//#region src/proactive/inbox/service.ts
|
|
7
|
+
init_transaction();
|
|
7
8
|
var ProactiveInboxService = class {
|
|
8
9
|
list = listInbox;
|
|
9
10
|
project = projectInsightsToInbox;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { getSqliteDatabase } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { getKnowledgeSourceItem } from "../storage/sqlite/knowledge-repository.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
//#region src/proactive/mail-thread.ts
|
|
5
|
+
init_transaction();
|
|
5
6
|
function emailFields(text) {
|
|
6
7
|
try {
|
|
7
8
|
const value = JSON.parse(text ?? "{}");
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
//#region src/proactive/maintenance.ts
|
|
3
|
+
init_transaction();
|
|
3
4
|
const RETENTION_DAYS = 90;
|
|
4
5
|
function pruneProactiveHistory(now = /* @__PURE__ */ new Date()) {
|
|
5
6
|
const cutoff = (/* @__PURE__ */ new Date(now.getTime() - RETENTION_DAYS * 24 * 60 * 6e4)).toISOString();
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { getSqliteDatabase } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
//#region src/proactive/metrics.ts
|
|
3
|
+
init_transaction();
|
|
3
4
|
function proactiveMetrics(workspace, now = Date.now()) {
|
|
4
5
|
const db = getSqliteDatabase();
|
|
5
6
|
const since = (/* @__PURE__ */ new Date(now - 30 * 864e5)).toISOString();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { getSqliteDatabase } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
//#region src/proactive/policy/presence.ts
|
|
4
|
+
init_transaction();
|
|
4
5
|
const PresenceSchema = z.object({
|
|
5
6
|
clientId: z.string().min(8).max(128),
|
|
6
7
|
active: z.boolean(),
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { ProactivePreferencesSchema, ProactivePreferencesUpdateSchema, ProactiveSubscriptionSettingsSchema } from "../../../packages/gateway-contract/src/proactive.js";
|
|
3
|
+
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
4
|
//#region src/proactive/policy/service.ts
|
|
5
|
+
init_src();
|
|
6
|
+
init_transaction();
|
|
4
7
|
var ProactiveConflict = class extends Error {};
|
|
5
8
|
function subscriptionSettings(id) {
|
|
6
9
|
const row = getSqliteDatabase().prepare("SELECT settings_json, revision FROM proactive_subscription_settings WHERE subscription_id = ?").get(id);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
//#region src/proactive/routing/batch-repository.ts
|
|
4
|
+
init_transaction();
|
|
4
5
|
function fromRow(row) {
|
|
5
6
|
return {
|
|
6
7
|
id: row.batch_id,
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { ProactiveSubscriptionCreateSchema, ProactiveSubscriptionSettingsSchema, ProactiveSubscriptionUpdateSchema } from "../../../packages/gateway-contract/src/proactive.js";
|
|
3
|
+
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
4
|
import { ProactiveConflict, subscriptionSettings } from "../policy/service.js";
|
|
4
5
|
import { createPromptDraft, getScenario, getSubscription, listSubscriptions, publishPromptRevision, upsertSubscription } from "./repository.js";
|
|
5
6
|
//#region src/proactive/scenarios/control.ts
|
|
7
|
+
init_src();
|
|
8
|
+
init_transaction();
|
|
6
9
|
function requireSubscription(id, workspaceId) {
|
|
7
10
|
const sub = getSubscription(id);
|
|
8
11
|
if (!sub || sub.workspaceId !== workspaceId) throw new Error("Subscription not found");
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { effectiveProactivePolicy } from "../policy/service.js";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/proactive/scenarios/repository.ts
|
|
5
|
+
init_transaction();
|
|
5
6
|
const text = (row, key) => String(row[key]);
|
|
6
7
|
function scenarioFromRow(row) {
|
|
7
8
|
const condition = row.condition_json ? JSON.parse(String(row.condition_json)) : void 0;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { getSqliteDatabase } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { normalizeEventEnvelope } from "./events/envelope.js";
|
|
3
3
|
import { getEventByDedupeKey, insertEvent, isEventRouted, listEvents, markEventRouted } from "./events/repository.js";
|
|
4
4
|
import { addEventToBatch, listBatches, markReadyBatches } from "./routing/batch-repository.js";
|
|
5
5
|
import { matchScenario } from "./routing/matcher.js";
|
|
6
6
|
//#region src/proactive/service.ts
|
|
7
|
+
init_transaction();
|
|
7
8
|
var ProactiveEventService = class {
|
|
8
9
|
constructor(routes = () => []) {
|
|
9
10
|
this.routes = routes;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { getSqliteDatabase } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { getKnowledgeSourceItem } from "../storage/sqlite/knowledge-repository.js";
|
|
3
3
|
//#region src/proactive/source-freshness.ts
|
|
4
|
+
init_transaction();
|
|
4
5
|
const MAX_SOURCE_AGE_MS = 30 * 6e4;
|
|
5
6
|
/** Only a successful pull of this collection proves its observed coverage. */
|
|
6
7
|
function sourceFreshness(itemId, notBefore, now = Date.now()) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { getSqliteDatabase } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { effectiveProactivePolicy } from "./policy/service.js";
|
|
3
3
|
//#region src/proactive/status.ts
|
|
4
|
+
init_transaction();
|
|
4
5
|
function followUpCheckStatus(subscriptionId, project) {
|
|
5
6
|
const db = getSqliteDatabase();
|
|
6
7
|
const recent = db.prepare(`SELECT run_id AS id, status, outcome_reason AS outcome, started_at AS startedAt,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
1
|
+
import { init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { effectiveProactivePolicy, localProactiveDay } from "../policy/service.js";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
//#region src/proactive/temporal/schedule.ts
|
|
5
|
+
init_transaction();
|
|
5
6
|
/** Local scans publish through the same event pipeline; next_due_at survives restarts. */
|
|
6
7
|
function scanDueProjects(events, now = /* @__PURE__ */ new Date()) {
|
|
7
8
|
return runSqliteWriteTransaction((db) => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
//#region src/projects/automation-bind.ts
|
|
3
|
+
init_transaction();
|
|
3
4
|
function bindAutomationToProject(automationId, projectId) {
|
|
4
5
|
const db = getSqliteDatabase();
|
|
5
6
|
if (!db.prepare(`SELECT 1 FROM projects WHERE project_id = ?`).get(projectId)) throw new Error(`Project not found: ${projectId}`);
|
|
@@ -2,7 +2,7 @@ import { ProjectStore, slugifyProjectName } from "./project-store.js";
|
|
|
2
2
|
import { getProjectForSession, getProjectWorkspacePathForSession, resolveProjectWorkspacePath } from "./workspace.js";
|
|
3
3
|
import { ProjectWorkspaceConflictError, ProjectWorkspaceMissingError, canonicalWorkspacePath, ensureWorkspaceDirectory, inferProjectNameFromWorkspaceRoot, isPathSameOrInsideWorkspace, isSafeAutoCreateWorkspaceRoot, resolveWorkspaceProjectRoot, workspaceDirectoryExists } from "./workspace-project.js";
|
|
4
4
|
import { inferProjectExecutionMode, inferProjectKind } from "./project-kind.js";
|
|
5
|
-
import { bindSessionToProject, bindSessionsToProject,
|
|
5
|
+
import { bindSessionToProject, bindSessionsToProject, listProjectConversationIds, moveSessionToProject, unbindSessionFromProject } from "./session-bind.js";
|
|
6
6
|
import { ProjectService } from "./project-service.js";
|
|
7
7
|
import { ProjectSkillError, ProjectSkillService } from "./project-skill-service.js";
|
|
8
8
|
import { isValidProjectAgentId, normalizeProjectAgentId, resolveProjectAgentId } from "./project-agent.js";
|
|
@@ -11,4 +11,4 @@ import { buildProjectLoopOverview } from "./project-loop.js";
|
|
|
11
11
|
import { bindWorkflowRunToProject } from "./workflow-bind.js";
|
|
12
12
|
import { bindAutomationToProject } from "./automation-bind.js";
|
|
13
13
|
import { bindKnowledgeItemToProject } from "./knowledge-bind.js";
|
|
14
|
-
export { CODING_PROJECT_AGENT_ID, ProjectService, ProjectSkillError, ProjectSkillService, ProjectStore, ProjectWorkspaceConflictError, ProjectWorkspaceMissingError, bindAutomationToProject, bindKnowledgeItemToProject, bindSessionToProject, bindSessionsToProject, bindWorkflowRunToProject, buildProjectLoopOverview, canonicalWorkspacePath, ensureWorkspaceDirectory, getProjectForSession, getProjectWorkspacePathForSession, inferProjectExecutionMode, inferProjectKind, inferProjectNameFromWorkspaceRoot, inferSuggestedProjectDefaultAgentId, isPathSameOrInsideWorkspace, isSafeAutoCreateWorkspaceRoot, isValidProjectAgentId,
|
|
14
|
+
export { CODING_PROJECT_AGENT_ID, ProjectService, ProjectSkillError, ProjectSkillService, ProjectStore, ProjectWorkspaceConflictError, ProjectWorkspaceMissingError, bindAutomationToProject, bindKnowledgeItemToProject, bindSessionToProject, bindSessionsToProject, bindWorkflowRunToProject, buildProjectLoopOverview, canonicalWorkspacePath, ensureWorkspaceDirectory, getProjectForSession, getProjectWorkspacePathForSession, inferProjectExecutionMode, inferProjectKind, inferProjectNameFromWorkspaceRoot, inferSuggestedProjectDefaultAgentId, isPathSameOrInsideWorkspace, isSafeAutoCreateWorkspaceRoot, isValidProjectAgentId, listProjectConversationIds, moveSessionToProject, normalizeProjectAgentId, resolveProjectAgentId, resolveProjectWorkspacePath, resolveWorkspaceProjectRoot, slugifyProjectName, suggestProjectDefaultAgentId, unbindSessionFromProject, workspaceDirectoryExists };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
//#region src/projects/knowledge-bind.ts
|
|
3
|
+
init_transaction();
|
|
3
4
|
function bindKnowledgeItemToProject(knowledgeId, projectId) {
|
|
4
5
|
const db = getSqliteDatabase();
|
|
5
6
|
if (!db.prepare("SELECT 1 FROM projects WHERE project_id = ?").get(projectId)) throw new Error(`Project not found: ${projectId}`);
|
|
@@ -8,7 +8,10 @@ function normalizeAgentId(value) {
|
|
|
8
8
|
function resolveProjectAgentId(input) {
|
|
9
9
|
const fallback = getDefaultAgentId(input.config);
|
|
10
10
|
const explicitAgentId = normalizeAgentId(input.explicitAgentId);
|
|
11
|
-
if (explicitAgentId
|
|
11
|
+
if (explicitAgentId) {
|
|
12
|
+
if (!agentExists(explicitAgentId, input.config)) throw new Error(`Agent not found: ${explicitAgentId}`);
|
|
13
|
+
return explicitAgentId;
|
|
14
|
+
}
|
|
12
15
|
const projectId = input.projectId?.trim();
|
|
13
16
|
const projectAgentId = projectId ? normalizeAgentId(input.projects.get(projectId)?.defaultAgentId) : void 0;
|
|
14
17
|
if (projectAgentId && agentExists(projectAgentId, input.config)) return projectAgentId;
|
|
@@ -50,8 +50,8 @@ export declare class ProjectService {
|
|
|
50
50
|
nextSteps?: string[];
|
|
51
51
|
actor: Record<string, unknown>;
|
|
52
52
|
}): ProjectUpdate;
|
|
53
|
-
attachSession(
|
|
54
|
-
detachSession(
|
|
55
|
-
|
|
56
|
-
suggestProjectsForSession(
|
|
53
|
+
attachSession(conversationId: string, projectId: string): void;
|
|
54
|
+
detachSession(conversationId: string): void;
|
|
55
|
+
listConversationIds(projectId: string, limit?: number, offset?: number): string[];
|
|
56
|
+
suggestProjectsForSession(conversationId: string): ProjectSuggestion[];
|
|
57
57
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
import { getSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
3
3
|
import "../storage/sqlite/index.js";
|
|
4
4
|
import { changedFieldsFromPatch, emitActivity, systemActivityActor, systemActivitySource } from "../activity/emitter.js";
|
|
5
5
|
import { ProjectStore } from "./project-store.js";
|
|
6
6
|
import { ProjectWorkspaceConflictError, ProjectWorkspaceMissingError, canonicalWorkspacePath, ensureWorkspaceDirectory, inferProjectNameFromWorkspaceRoot, isPathSameOrInsideWorkspace, isSafeAutoCreateWorkspaceRoot, resolveWorkspaceProjectRoot, workspaceDirectoryExists } from "./workspace-project.js";
|
|
7
7
|
import { inferProjectExecutionMode } from "./project-kind.js";
|
|
8
|
-
import { bindSessionToProject,
|
|
8
|
+
import { bindSessionToProject, listProjectConversationIds, unbindSessionFromProject } from "./session-bind.js";
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
10
10
|
//#region src/projects/project-service.ts
|
|
11
|
+
init_transaction();
|
|
11
12
|
var ProjectService = class {
|
|
12
13
|
constructor(store = new ProjectStore(), signals, workspaceId = "default") {
|
|
13
14
|
this.store = store;
|
|
@@ -245,17 +246,17 @@ var ProjectService = class {
|
|
|
245
246
|
createUpdate(projectId, input) {
|
|
246
247
|
return this.store.createUpdate(projectId, input);
|
|
247
248
|
}
|
|
248
|
-
attachSession(
|
|
249
|
-
bindSessionToProject(
|
|
249
|
+
attachSession(conversationId, projectId) {
|
|
250
|
+
bindSessionToProject(conversationId, projectId);
|
|
250
251
|
}
|
|
251
|
-
detachSession(
|
|
252
|
-
unbindSessionFromProject(
|
|
252
|
+
detachSession(conversationId) {
|
|
253
|
+
unbindSessionFromProject(conversationId);
|
|
253
254
|
}
|
|
254
|
-
|
|
255
|
-
return
|
|
255
|
+
listConversationIds(projectId, limit, offset) {
|
|
256
|
+
return listProjectConversationIds(projectId, limit, offset);
|
|
256
257
|
}
|
|
257
|
-
suggestProjectsForSession(
|
|
258
|
-
const session = getSessionMetadata(
|
|
258
|
+
suggestProjectsForSession(conversationId) {
|
|
259
|
+
const session = getSessionMetadata(conversationId);
|
|
259
260
|
if (!session) return [];
|
|
260
261
|
const projects = this.list({
|
|
261
262
|
status: "active",
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
|
-
import { escapeFts5Query } from "../storage/sqlite/fts.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
|
+
import { escapeFts5Query, init_fts } from "../storage/sqlite/fts.js";
|
|
3
3
|
import { randomUUID } from "node:crypto";
|
|
4
4
|
//#region src/projects/project-store.ts
|
|
5
|
+
init_fts();
|
|
6
|
+
init_transaction();
|
|
5
7
|
function trimOptional(value) {
|
|
6
8
|
if (value == null) return void 0;
|
|
7
9
|
return value.trim() || void 0;
|
|
@@ -234,14 +236,14 @@ var ProjectStore = class {
|
|
|
234
236
|
const clauses = [`s.updated_at >= ?`];
|
|
235
237
|
params.push(query.updatedAfter);
|
|
236
238
|
if (query.includePinned) clauses.push(`s.status = 'pinned'`);
|
|
237
|
-
const
|
|
238
|
-
if (
|
|
239
|
-
clauses.push(`s.
|
|
240
|
-
params.push(
|
|
239
|
+
const includeConversationId = query.includeConversationId?.trim();
|
|
240
|
+
if (includeConversationId) {
|
|
241
|
+
clauses.push(`s.conversation_id = ?`);
|
|
242
|
+
params.push(includeConversationId);
|
|
241
243
|
}
|
|
242
244
|
sessionConditions.push(`(${clauses.join(" OR ")})`);
|
|
243
245
|
}
|
|
244
|
-
const whereParts = [...projectConditions, ...sessionConditions.length ? [`(s.
|
|
246
|
+
const whereParts = [...projectConditions, ...sessionConditions.length ? [`(s.conversation_id IS NULL OR (${sessionConditions.join(" AND ")}))`] : []];
|
|
245
247
|
const where = whereParts.length ? `WHERE ${whereParts.join(" AND ")}` : "";
|
|
246
248
|
const limit = clampLimit(query.limit, 50);
|
|
247
249
|
const offset = Math.max(0, Math.floor(query.offset ?? 0));
|
|
@@ -327,9 +329,9 @@ var ProjectStore = class {
|
|
|
327
329
|
WHERE project_id = ? AND phase <> 'closed'`).get(id).total;
|
|
328
330
|
}
|
|
329
331
|
getRecentSessions(id, limit = 5) {
|
|
330
|
-
return getSqliteDatabase().prepare(`SELECT
|
|
332
|
+
return getSqliteDatabase().prepare(`SELECT conversation_id, name, updated_at, agent_id FROM sessions
|
|
331
333
|
WHERE project_id = ? AND hidden_from_session_list = 0 ORDER BY updated_at DESC LIMIT ?`).all(id, clampLimit(limit, 5)).map((row) => ({
|
|
332
|
-
key: row.
|
|
334
|
+
key: row.conversation_id,
|
|
333
335
|
name: row.name ?? void 0,
|
|
334
336
|
updatedAt: new Date(row.updated_at).toISOString(),
|
|
335
337
|
agentId: row.agent_id
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function bindSessionToProject(
|
|
2
|
-
export declare function unbindSessionFromProject(
|
|
3
|
-
export declare function
|
|
4
|
-
export declare function bindSessionsToProject(
|
|
5
|
-
export declare function moveSessionToProject(
|
|
1
|
+
export declare function bindSessionToProject(conversationId: string, projectId: string): void;
|
|
2
|
+
export declare function unbindSessionFromProject(conversationId: string): void;
|
|
3
|
+
export declare function listProjectConversationIds(projectId: string, limit?: number, offset?: number): string[];
|
|
4
|
+
export declare function bindSessionsToProject(conversationIds: string[], projectId: string): void;
|
|
5
|
+
export declare function moveSessionToProject(conversationId: string, targetProjectId: string): void;
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import { getSqliteDatabase, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
1
|
+
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../storage/sqlite/transaction.js";
|
|
2
2
|
//#region src/projects/session-bind.ts
|
|
3
|
+
init_transaction();
|
|
3
4
|
function projectExists(projectId) {
|
|
4
5
|
return Boolean(getSqliteDatabase().prepare(`SELECT 1 FROM projects WHERE project_id = ?`).get(projectId));
|
|
5
6
|
}
|
|
6
7
|
function assertProjectExists(projectId) {
|
|
7
8
|
if (!projectExists(projectId)) throw new Error(`Project not found: ${projectId}`);
|
|
8
9
|
}
|
|
9
|
-
function assertSessionExists(
|
|
10
|
-
if (!getSqliteDatabase().prepare(`SELECT 1 FROM sessions WHERE
|
|
10
|
+
function assertSessionExists(conversationId) {
|
|
11
|
+
if (!getSqliteDatabase().prepare(`SELECT 1 FROM sessions WHERE conversation_id = ?`).get(conversationId)) throw new Error(`Session not found: ${conversationId}`);
|
|
11
12
|
}
|
|
12
|
-
function bindSessionToProject(
|
|
13
|
+
function bindSessionToProject(conversationId, projectId) {
|
|
13
14
|
assertProjectExists(projectId);
|
|
14
|
-
assertSessionExists(
|
|
15
|
+
assertSessionExists(conversationId);
|
|
15
16
|
runSqliteWriteTransaction((db) => {
|
|
16
17
|
const now = Date.now();
|
|
17
|
-
db.prepare(`UPDATE sessions SET project_id = ?, updated_at = ? WHERE
|
|
18
|
+
db.prepare(`UPDATE sessions SET project_id = ?, updated_at = ? WHERE conversation_id = ?`).run(projectId, now, conversationId);
|
|
18
19
|
db.prepare(`UPDATE projects SET last_active_at = ?, updated_at = ? WHERE project_id = ?`).run(now, now, projectId);
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
|
-
function unbindSessionFromProject(
|
|
22
|
-
assertSessionExists(
|
|
22
|
+
function unbindSessionFromProject(conversationId) {
|
|
23
|
+
assertSessionExists(conversationId);
|
|
23
24
|
runSqliteWriteTransaction((db) => {
|
|
24
|
-
db.prepare(`UPDATE sessions SET project_id = NULL, updated_at = ? WHERE
|
|
25
|
+
db.prepare(`UPDATE sessions SET project_id = NULL, updated_at = ? WHERE conversation_id = ?`).run(Date.now(), conversationId);
|
|
25
26
|
});
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function listProjectConversationIds(projectId, limit = 100, offset = 0) {
|
|
28
29
|
assertProjectExists(projectId);
|
|
29
|
-
return getSqliteDatabase().prepare(`SELECT
|
|
30
|
+
return getSqliteDatabase().prepare(`SELECT conversation_id FROM sessions WHERE project_id = ? ORDER BY updated_at DESC LIMIT ? OFFSET ?`).all(projectId, Math.min(500, Math.max(1, Math.floor(limit))), Math.max(0, Math.floor(offset))).map((row) => row.conversation_id);
|
|
30
31
|
}
|
|
31
|
-
function bindSessionsToProject(
|
|
32
|
+
function bindSessionsToProject(conversationIds, projectId) {
|
|
32
33
|
assertProjectExists(projectId);
|
|
33
34
|
runSqliteWriteTransaction((db) => {
|
|
34
35
|
const now = Date.now();
|
|
35
|
-
const stmt = db.prepare(`UPDATE sessions SET project_id = ?, updated_at = ? WHERE
|
|
36
|
-
for (const key of
|
|
36
|
+
const stmt = db.prepare(`UPDATE sessions SET project_id = ?, updated_at = ? WHERE conversation_id = ?`);
|
|
37
|
+
for (const key of conversationIds) stmt.run(projectId, now, key);
|
|
37
38
|
db.prepare(`UPDATE projects SET last_active_at = ?, updated_at = ? WHERE project_id = ?`).run(now, now, projectId);
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
|
-
function moveSessionToProject(
|
|
41
|
-
bindSessionToProject(
|
|
41
|
+
function moveSessionToProject(conversationId, targetProjectId) {
|
|
42
|
+
bindSessionToProject(conversationId, targetProjectId);
|
|
42
43
|
}
|
|
43
44
|
//#endregion
|
|
44
|
-
export { bindSessionToProject, bindSessionsToProject,
|
|
45
|
+
export { bindSessionToProject, bindSessionsToProject, listProjectConversationIds, moveSessionToProject, unbindSessionFromProject };
|