@xopcai/xopc 0.0.313 → 0.0.314
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/dist/assets/{auth-C3yV1y_l.js → auth-DKo-NMUY.js} +18 -1
- package/dist/browser-ext/dist/background.js +68 -2
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
- package/dist/extensions/feishu/src/outbound/media-load.js +2 -2
- package/dist/extensions/telegram/src/inbound-processor.js +1 -1
- package/dist/extensions/telegram/src/outbound-sender.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +3 -3
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/extensions/weixin/src/api/api.js +2 -2
- package/dist/extensions/weixin/src/auth/accounts.js +12 -12
- package/dist/extensions/weixin/src/messaging/debug-mode.js +5 -5
- package/dist/extensions/weixin/src/messaging/inbound.js +11 -11
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-C73s_EYF.js → agent-avatar-dicebear-BFkjfurL.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-BdOZ6q8Z.js +1 -0
- package/dist/gateway/static/root/assets/{agents-Bspu1pT2.js → agents-CCcavsHq.js} +1 -1
- package/dist/gateway/static/root/assets/{api-Com7kQuw.js → api-BYhRsTAc.js} +1 -1
- package/dist/gateway/static/root/assets/{app-link-CKueEVbT.js → app-link-nL8iPwEr.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-DSo_SV6G.js → app-management-settings-panel-B4kihr-A.js} +1 -1
- package/dist/gateway/static/root/assets/appearance-settings-N9sYmNOx.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-BMcy10_s.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-BWueu3Qt.js → archive-plugin-k_SuYWyV.js} +1 -1
- package/dist/gateway/static/root/assets/{attachment-load-DYV25sAC.js → attachment-load-DRv5QWUK.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-Du8AkHrH.js → automations-page-CkJV3DN0.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BEa2doeR.js +7 -0
- package/dist/gateway/static/root/assets/{binary-plugins-rahoUE_-.js → binary-plugins-Dg3h3TA7.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CVbiuQ90.js → block-editor-DVhdHntT.js} +29 -29
- package/dist/gateway/static/root/assets/{browser-automation-inputs-CAC4w9KM.js → browser-automation-inputs-BMRYUW8_.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-B3-fdrAr.js → browser-automations-page-Byv6-FY2.js} +2 -2
- package/dist/gateway/static/root/assets/browser-settings-page-DRCHGFpO.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-D0S3DuAD.js +1 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-mxRP0gl0.js +8 -0
- package/dist/gateway/static/root/assets/channels-settings-DBt_6GsB.js +1 -0
- package/dist/gateway/static/root/assets/{chat-terminal-dock-98GzKJ0K.js → chat-terminal-dock-D4AHa51o.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-CB3mySQb.js → computer-settings-page-eXPe500D.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-ZlbIXdey.js → connector-service-page-BQTFlq_k.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-BKeBWwcI.js +2 -0
- package/dist/gateway/static/root/assets/conversation-identity-Cw0n9uzK.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-WW3fY-ng.js → date-picker-7MtovynY.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-D1QgzM_s.js → dependency-picker-Bj_xkXID.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D0MtbTwu.js → desktop-pet-CTmba9zH.js} +1 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-DNM_BlWN.js +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-C2XE0QhT.js +1 -0
- package/dist/gateway/static/root/assets/{extension-debug-page-BOtWAAGM.js → extension-debug-page-J_olaL7e.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-FULvawj8.js → extension-page-pK5RvqN8.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-Dzh6lE26.js → extension-settings-page-BwroEN08.js} +1 -1
- package/dist/gateway/static/root/assets/files-BK6enEvD.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-D7SG_ECs.js → gateway-config-swr-FuJTIg_a.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-settings-CLLDp23J.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-CrHz00-9.js → gateway-startup-retry-CKg_gu8_.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-B5Epb1PH.js +1 -0
- package/dist/gateway/static/root/assets/{image-generation-api-DGiHzeLb.js → image-generation-api-Bo6NZ7zb.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-DiJrgu9D.js → imports-page-C8-hX8gS.js} +1 -1
- package/dist/gateway/static/root/assets/index-14F1yGJI.js +89 -0
- package/dist/gateway/static/root/assets/index-cB7rWIDY.css +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DZ60sucF.js → keyboard-shortcuts-settings-BkBEjUZD.js} +1 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-6jC3vQpY.js +2 -0
- package/dist/gateway/static/root/assets/{local-apps-page-Cx2YuI8E.js → local-apps-page-CrbKIixo.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-vZTDIqJB.js → locale-store-CvGwNbml.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DBHlZts9.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-DsUWLu5m.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-DJfzcZCW.js → markdown-view-nXo5nrsv.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-COpQGcN3.js → media-plugins-upxXJ-4l.js} +1 -1
- package/dist/gateway/static/root/assets/messages-B_AwRroN.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-0Q9TOtJG.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-D0NmcwNw.js +8 -0
- package/dist/gateway/static/root/assets/page-context-capture-button-DUyA-K4L.js +1 -0
- package/dist/gateway/static/root/assets/{page-tabs-nARdLZcP.js → page-tabs-Cl-NFPNr.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-open-alternatives-BEJg3fTq.js → preview-open-alternatives-DX81PwJ3.js} +1 -1
- package/dist/gateway/static/root/assets/product-delivery-chCjIpvu.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-CR4Lehku.js → product-open-page-CrfIGwm8.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-BVfVrYmn.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-nM9a9XNS.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-CF-nJ5MG.js → registry-api-CHxgohY0.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-C8b_k88G.js +1 -0
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-D3dLOW04.js +5 -0
- package/dist/gateway/static/root/assets/scenes-page-DEowreZV.js +2 -0
- package/dist/gateway/static/root/assets/{schema-form-DOsDKbWU.js → schema-form-ZxuIvD2_.js} +1 -1
- package/dist/gateway/static/root/assets/schemas-88fK3zzl.js +64 -0
- package/dist/gateway/static/root/assets/sessions-page-B_nPhera.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-BqhIOuus.js +1 -0
- package/dist/gateway/static/root/assets/{settings-form-section-kIV5M-9G.js → settings-form-section-TZRfg4yo.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-C2TS9mvq.js → settings-page-a8qcJpdZ.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-B39PogyD.js → settings-page-layout-BfvlRT9q.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-CRj5Ruqn.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-CMbgRZ7w.js → share-preview-page-DCt1pTWB.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-BNbXPk--.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-CNMCLbav.js +1 -0
- package/dist/gateway/static/root/assets/{skills-page-DV4FX1ev.js → skills-page-BIOcg44X.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page.utils-C-2lmZHk.js → skills-page.utils-CgZdzT4I.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-CQ1Z6i28.js → system-settings-panel-_YaRncA6.js} +1 -1
- package/dist/gateway/static/root/assets/task-detail-page-CAcfAG-c.js +1 -0
- package/dist/gateway/static/root/assets/tasks-CDR_RVbQ.js +1 -0
- package/dist/gateway/static/root/assets/{tunnel-api-tn6H0D44.js → tunnel-api-uOupJOoS.js} +1 -1
- package/dist/gateway/static/root/assets/turn-outcome-D0SnyZ3Z.js +1 -0
- package/dist/gateway/static/root/assets/{use-autosave-CkEM9tXu.js → use-autosave-BezzHBLE.js} +1 -1
- package/dist/gateway/static/root/assets/user-model-page-BFFeneDq.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-d0Fawetf.js → voice-api-key-field-BmYifdwL.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-D_8zU7Li.js → voice-config-api-D_5Q2_A3.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-C5FFSieF.js → work-discovery-overlay-4DmyEckJ.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-q5ammR4k.js → workflow-run-setup-panel-DeZe8bTZ.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-Sv4hEc6W.js +6 -0
- package/dist/gateway/static/root/index.html +16 -16
- package/dist/package.js +1 -1
- package/dist/packages/computer-control-contract/src/index.js +10 -1
- package/dist/packages/gateway-contract/src/app-context.js +55 -0
- package/dist/packages/gateway-contract/src/automations.js +16 -17
- package/dist/packages/gateway-contract/src/capabilities.js +1078 -0
- package/dist/packages/gateway-contract/src/extension-capabilities.js +26 -0
- package/dist/packages/gateway-contract/src/home.js +3 -3
- package/dist/packages/gateway-contract/src/index.js +8 -0
- package/dist/packages/gateway-contract/src/product-delivery.js +19 -4
- package/dist/packages/gateway-contract/src/scenes.js +199 -0
- package/dist/packages/gateway-contract/src/task-runs.js +8 -4
- package/dist/packages/gateway-contract/src/tasks.js +5 -4
- package/dist/packages/realtime-client/src/index.js +17 -4
- package/dist/src/agent/agent-manager.d.ts +1 -0
- package/dist/src/agent/agent-manager.js +19 -18
- package/dist/src/agent/agent-scope.js +2 -2
- package/dist/src/agent/background-review/run-background-review.js +4 -4
- package/dist/src/agent/child-agent-factory.d.ts +2 -0
- package/dist/src/agent/child-agent-factory.js +5 -0
- package/dist/src/agent/coding/repository-instructions.js +1 -1
- package/dist/src/agent/commands/approved-verification.d.ts +14 -0
- package/dist/src/agent/commands/approved-verification.js +48 -0
- package/dist/src/agent/context/coordinator.js +2 -2
- package/dist/src/agent/context/execution-context.js +4 -4
- package/dist/src/agent/context/execution-scope.js +4 -3
- package/dist/src/agent/context/project-context.js +5 -4
- package/dist/src/agent/data-acquisition/service.js +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.js +4 -4
- package/dist/src/agent/embedded/run-turn.js +4 -4
- package/dist/src/agent/embedded/session-tool-result-guard.js +3 -3
- package/dist/src/agent/embedded/tool-result-truncation.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.js +126 -78
- package/dist/src/agent/external-tools/composio-provider.d.ts +1 -1
- package/dist/src/agent/external-tools/composio-provider.js +73 -15
- package/dist/src/agent/external-tools/endpoint-provider.js +14 -1
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/external-tools/mcp-provider.js +2 -2
- package/dist/src/agent/image/generation/openai-images-provider.js +1 -1
- package/dist/src/agent/image/generation/providers/dashscope.js +1 -1
- package/dist/src/agent/image/generation/providers/fal.js +1 -1
- package/dist/src/agent/image/generation/providers/google.js +1 -1
- package/dist/src/agent/image/generation/runtime.js +1 -1
- package/dist/src/agent/image/index.js +1 -1
- package/dist/src/agent/image/load-image-media.js +1 -1
- package/dist/src/agent/image/tool-model-config.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +1 -1
- package/dist/src/agent/inbound/inbound-loop.js +2 -2
- package/dist/src/agent/inbound/turn-dispatcher.d.ts +2 -0
- package/dist/src/agent/inbound/turn-dispatcher.js +2 -1
- package/dist/src/agent/index.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-gateway.js +1 -1
- package/dist/src/agent/mcp/bundle-mcp-runtime.js +1 -1
- package/dist/src/agent/mcp/index.js +2 -2
- package/dist/src/agent/mcp/mcp-transport.js +1 -1
- package/dist/src/agent/mcp/oauth/mcp-oauth-store.js +1 -1
- package/dist/src/agent/memory/compaction-chunks.d.ts +6 -1
- package/dist/src/agent/memory/compaction-chunks.js +16 -3
- package/dist/src/agent/memory/compaction-ledger.d.ts +3 -1
- package/dist/src/agent/memory/compaction-ledger.js +31 -18
- package/dist/src/agent/memory/compaction-request.d.ts +2 -0
- package/dist/src/agent/memory/compaction-request.js +6 -1
- package/dist/src/agent/memory/compaction.d.ts +19 -1
- package/dist/src/agent/memory/compaction.js +112 -30
- package/dist/src/agent/memory/context-recovery.js +1 -1
- package/dist/src/agent/memory/index.js +2 -2
- package/dist/src/agent/orchestration/agent-orchestrator.js +5 -5
- package/dist/src/agent/prompt/service-prompt-builder.js +2 -2
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/service/direct-turn-helpers.js +5 -5
- package/dist/src/agent/service/process-direct-one-shot.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.d.ts +3 -0
- package/dist/src/agent/service/process-direct-streaming.js +21 -12
- package/dist/src/agent/service/webchat-tts.js +1 -1
- package/dist/src/agent/service.js +22 -21
- package/dist/src/agent/service.types.d.ts +1 -0
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/config.js +2 -0
- package/dist/src/agent/skills/filesystem-watcher.js +1 -1
- package/dist/src/agent/skills/format-skills-prompt.js +14 -1
- package/dist/src/agent/skills/hub-lock.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +3 -3
- package/dist/src/agent/skills/index.js +16 -8
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/skills/types.d.ts +1 -1
- package/dist/src/agent/source-context/app-context.d.ts +4 -0
- package/dist/src/agent/source-context/app-context.js +36 -0
- package/dist/src/agent/source-context/injector.js +1 -0
- package/dist/src/agent/source-context/types.d.ts +5 -1
- package/dist/src/agent/tasks/task-judge-service.js +6 -5
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -1
- package/dist/src/agent/tool-manuals/computer.js +1 -1
- package/dist/src/agent/tools/automation-tool.d.ts +12 -1
- package/dist/src/agent/tools/automation-tool.js +106 -32
- package/dist/src/agent/tools/create-share-tool.js +4 -4
- package/dist/src/agent/tools/dataBatch.js +1 -1
- package/dist/src/agent/tools/delegate-tool.js +3 -3
- package/dist/src/agent/tools/delegation-parent-policy.js +1 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +22 -17
- package/dist/src/agent/tools/fetch-text.js +1 -1
- package/dist/src/agent/tools/image-generate-tool.js +3 -3
- package/dist/src/agent/tools/index.js +6 -6
- package/dist/src/agent/tools/list-dir.js +1 -1
- package/dist/src/agent/tools/publish-artifacts.js +2 -2
- package/dist/src/agent/tools/read.js +2 -2
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/scoped-workspace-tools.d.ts +8 -0
- package/dist/src/agent/tools/scoped-workspace-tools.js +81 -0
- package/dist/src/agent/tools/send-media.js +2 -2
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +1 -1
- package/dist/src/agent/tools/write.js +2 -2
- package/dist/src/agent/tools/xopc-use-tool.d.ts +6 -3
- package/dist/src/agent/tools/xopc-use-tool.js +997 -908
- package/dist/src/agent/workflow/subagent-runner.js +2 -1
- package/dist/src/agent-config/index.js +2 -2
- package/dist/src/agent-config/schema.d.ts +5 -0
- package/dist/src/agent-config/schema.js +14 -10
- 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/api/routes.js +244 -164
- package/dist/src/automations/capabilities/drafts.d.ts +4 -0
- package/dist/src/automations/capabilities/drafts.js +95 -0
- package/dist/src/automations/capabilities/read.d.ts +4 -0
- package/dist/src/automations/capabilities/read.js +119 -0
- package/dist/src/automations/capabilities/write.d.ts +349 -0
- package/dist/src/automations/capabilities/write.js +172 -0
- package/dist/src/automations/domain/index.js +2 -2
- package/dist/src/automations/domain/validation.d.ts +77 -77
- package/dist/src/automations/domain/validation.js +9 -6
- package/dist/src/automations/draft/automation-draft-validator.d.ts +2 -2
- package/dist/src/automations/index.js +6 -6
- package/dist/src/automations/service/automation-service.d.ts +31 -0
- package/dist/src/automations/service/automation-service.js +213 -75
- package/dist/src/automations/service/index.js +2 -2
- package/dist/src/automations/storage/automation-repository.d.ts +2 -0
- package/dist/src/automations/storage/automation-repository.js +9 -1
- package/dist/src/automations/storage/automation-run-repository.d.ts +4 -1
- package/dist/src/automations/storage/automation-run-repository.js +16 -3
- package/dist/src/automations/storage/index.js +3 -3
- package/dist/src/browser/automations/schema.d.ts +1 -1
- package/dist/src/browser/automations/service.d.ts +1 -1
- package/dist/src/browser/observation/format.js +4 -0
- package/dist/src/browser/providers/browser-ext-install.js +1 -1
- package/dist/src/capabilities/adapters/http.d.ts +4 -0
- package/dist/src/capabilities/adapters/http.js +44 -0
- package/dist/src/capabilities/readiness/from-config.js +11 -7
- package/dist/src/capabilities/runtime/app-context.d.ts +3 -0
- package/dist/src/capabilities/runtime/app-context.js +72 -0
- package/dist/src/capabilities/runtime/atomic-operations.d.ts +11 -0
- package/dist/src/capabilities/runtime/atomic-operations.js +34 -0
- package/dist/src/capabilities/runtime/dispatcher.d.ts +67 -0
- package/dist/src/capabilities/runtime/dispatcher.js +170 -0
- package/dist/src/capabilities/runtime/errors.d.ts +6 -0
- package/dist/src/capabilities/runtime/errors.js +11 -0
- package/dist/src/capabilities/runtime/external-operations.d.ts +16 -0
- package/dist/src/capabilities/runtime/external-operations.js +92 -0
- package/dist/src/capabilities/runtime/product.d.ts +12 -0
- package/dist/src/capabilities/runtime/product.js +69 -0
- package/dist/src/capabilities/runtime/settings.d.ts +3 -0
- package/dist/src/capabilities/runtime/settings.js +27 -0
- package/dist/src/capabilities/store-connector.js +1 -1
- package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
- package/dist/src/channels/index.js +3 -3
- package/dist/src/channels/manager.js +1 -1
- package/dist/src/channels/pairing/allow-from-file.js +9 -9
- package/dist/src/channels/pairing/pairing-store.js +6 -6
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/builtins/thinking.js +1 -1
- package/dist/src/chat-commands/builtins/tts.js +1 -1
- package/dist/src/chat-commands/builtins/understanding.js +1 -1
- package/dist/src/chat-commands/builtins/workflow.js +2 -2
- package/dist/src/chat-commands/context.js +2 -2
- package/dist/src/chat-commands/index.js +2 -2
- package/dist/src/cli/cli-log-level-preset.d.ts +2 -0
- package/dist/src/cli/cli-log-level-preset.js +4 -0
- package/dist/src/cli/command-catalog.js +4 -0
- package/dist/src/cli/command-loaders.js +1 -0
- package/dist/src/cli/command-manifest.js +4 -0
- package/dist/src/cli/commands/agent.js +7 -7
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/config.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +3 -3
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/extension.js +1 -1
- package/dist/src/cli/commands/gateway/shared.js +1 -1
- package/dist/src/cli/commands/gateway/token.js +1 -1
- package/dist/src/cli/commands/image.js +1 -1
- package/dist/src/cli/commands/init.js +1 -1
- package/dist/src/cli/commands/mcp.d.ts +1 -0
- package/dist/src/cli/commands/mcp.js +51 -0
- package/dist/src/cli/commands/models.js +2 -2
- package/dist/src/cli/commands/onboard.js +2 -2
- package/dist/src/cli/commands/project.js +2 -2
- package/dist/src/cli/commands/runtime.js +1 -1
- package/dist/src/cli/commands/skills.js +2 -2
- package/dist/src/cli/commands/tunnel.js +3 -3
- package/dist/src/cli/extension-cli-register.js +4 -4
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/computer/broker.d.ts +0 -1
- package/dist/src/computer/broker.js +4 -6
- package/dist/src/computer/evaluation-harness.d.ts +45 -0
- package/dist/src/computer/evaluation-harness.js +108 -0
- package/dist/src/computer/model-adapter.d.ts +37 -2
- package/dist/src/computer/model-adapter.js +333 -42
- package/dist/src/computer/model-policy.d.ts +4 -1
- package/dist/src/computer/model-policy.js +11 -3
- package/dist/src/computer/release-gate.d.ts +22 -0
- package/dist/src/computer/release-gate.js +19 -0
- package/dist/src/computer/runtime.js +16 -12
- package/dist/src/computer/task-state.d.ts +1 -0
- package/dist/src/computer/task-state.js +1 -0
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.d.ts +14 -8
- package/dist/src/config/models-json.js +3 -3
- package/dist/src/config/schema.d.ts +4 -0
- package/dist/src/config/schema.js +4 -10
- package/dist/src/connectors/cli/authorization.js +1 -1
- package/dist/src/connectors/cli/runtime.js +1 -1
- package/dist/src/connectors/composio-sessions.d.ts +4 -2
- package/dist/src/connectors/composio-sessions.js +11 -10
- package/dist/src/connectors/composio.js +11 -9
- package/dist/src/connectors/connected-source-understanding.js +2 -2
- package/dist/src/connectors/connection-recovery-service.js +5 -5
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/discussions/action-tasks.js +2 -1
- package/dist/src/discussions/live-worker.js +1 -1
- package/dist/src/discussions/recording.js +1 -1
- package/dist/src/discussions/sealer.js +1 -1
- package/dist/src/execution-environments/local-worktree-manager.d.ts +1 -0
- package/dist/src/execution-environments/local-worktree-manager.js +13 -2
- package/dist/src/extensions/activation-context.js +3 -3
- package/dist/src/extensions/api.js +3 -3
- package/dist/src/extensions/bundled-extension-activation.js +1 -1
- package/dist/src/extensions/index.js +1 -1
- package/dist/src/extensions/loader.js +1 -1
- package/dist/src/extensions/lockfile.js +1 -1
- package/dist/src/extensions/normalize-manifest.js +6 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/sdk/media.js +1 -1
- package/dist/src/extensions/types/manifest.d.ts +3 -0
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +4 -4
- package/dist/src/gateway/device-routes.js +2 -2
- package/dist/src/gateway/file-path-classifier.js +2 -2
- package/dist/src/gateway/global-defaults-admin.js +1 -1
- package/dist/src/gateway/hono/app.js +3 -3
- package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -0
- package/dist/src/gateway/hono/lib/config-payload.js +3 -3
- package/dist/src/gateway/hono/middleware/scopes.js +1 -1
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +6 -3
- package/dist/src/gateway/hono/routes/browser.js +1 -1
- package/dist/src/gateway/hono/routes/capability-operations.d.ts +3 -0
- package/dist/src/gateway/hono/routes/capability-operations.js +52 -0
- package/dist/src/gateway/hono/routes/commands-skills.js +3 -3
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/imports.js +1 -1
- package/dist/src/gateway/hono/routes/lazy-bundles.js +16 -0
- package/dist/src/gateway/hono/routes/local-app-capabilities.d.ts +4 -0
- package/dist/src/gateway/hono/routes/local-app-capabilities.js +41 -0
- package/dist/src/gateway/hono/routes/local-apps.js +41 -9
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/media.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +7 -7
- package/dist/src/gateway/hono/routes/notes.js +216 -147
- package/dist/src/gateway/hono/routes/projects.js +219 -376
- package/dist/src/gateway/hono/routes/scenes.js +188 -75
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +60 -16
- package/dist/src/gateway/hono/routes/session-input-handler.js +45 -3
- package/dist/src/gateway/hono/routes/sessions.js +18 -1
- package/dist/src/gateway/hono/routes/shares.js +3 -3
- package/dist/src/gateway/hono/routes/site-shares.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +182 -326
- package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
- package/dist/src/gateway/hono/routes/user-model.js +4 -4
- package/dist/src/gateway/hono/routes/voice.js +6 -6
- package/dist/src/gateway/hono/routes/workflows.js +3 -3
- package/dist/src/gateway/lock.js +11 -11
- package/dist/src/gateway/media-access.js +3 -2
- package/dist/src/gateway/mobile-privacy.js +2 -2
- package/dist/src/gateway/ports.js +6 -6
- package/dist/src/gateway/scenes/host.js +14 -3
- package/dist/src/gateway/scenes/mailContext.js +1 -1
- package/dist/src/gateway/scenes/slackThreadSource.d.ts +41 -0
- package/dist/src/gateway/scenes/slackThreadSource.js +168 -0
- package/dist/src/gateway/security/gateway-scopes.d.ts +1 -1
- package/dist/src/gateway/security/gateway-scopes.js +5 -0
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/app-context-access.d.ts +11 -0
- package/dist/src/gateway/service/app-context-access.js +70 -0
- package/dist/src/gateway/service/config-coordinator.js +4 -4
- package/dist/src/gateway/service/marketplace-service.js +3 -3
- package/dist/src/gateway/service/run-gateway-agent.js +13 -4
- package/dist/src/gateway/service/session-input-coordinator.js +54 -15
- package/dist/src/gateway/service/sessions-api.d.ts +1 -0
- package/dist/src/gateway/service/sessions-api.js +4 -1
- package/dist/src/gateway/service/task-conversation-query-service.d.ts +3 -1
- package/dist/src/gateway/service/task-conversation-query-service.js +32 -3
- package/dist/src/gateway/service.d.ts +3 -0
- package/dist/src/gateway/service.js +92 -38
- package/dist/src/gateway/session-context-summary.js +3 -2
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/heartbeat/index.js +1 -1
- package/dist/src/i18n/share-tool-bundle.js +2 -2
- package/dist/src/imports/runtime.js +1 -1
- package/dist/src/{tasks/task-outbox-dispatcher.d.ts → infra/domain-outbox-dispatcher.d.ts} +2 -2
- package/dist/src/{tasks/task-outbox-dispatcher.js → infra/domain-outbox-dispatcher.js} +10 -9
- package/dist/src/infra/gateway-processes.js +2 -2
- package/dist/src/infra/operation-context.d.ts +2 -0
- package/dist/src/infra/operation-context.js +16 -0
- package/dist/src/infra/path-env.js +3 -3
- package/dist/src/infra/update-global.js +10 -10
- package/dist/src/local-apps/capabilities/contracts.d.ts +2 -0
- package/dist/src/local-apps/capabilities/contracts.js +32 -0
- package/dist/src/local-apps/capabilities/read.d.ts +3 -0
- package/dist/src/local-apps/capabilities/read.js +48 -0
- package/dist/src/local-apps/capabilities/runtime.d.ts +16 -0
- package/dist/src/local-apps/capabilities/runtime.js +66 -0
- package/dist/src/local-apps/capabilities/write.d.ts +3 -0
- package/dist/src/local-apps/capabilities/write.js +35 -0
- package/dist/src/local-apps/release-lock.d.ts +2 -0
- package/dist/src/local-apps/release-lock.js +20 -0
- package/dist/src/local-apps/runtime-entry.d.ts +0 -2
- package/dist/src/local-apps/runtime-entry.js +1 -14
- package/dist/src/local-apps/scaffold.js +4 -1
- package/dist/src/local-apps/service.d.ts +24 -1
- package/dist/src/local-apps/service.js +187 -44
- package/dist/src/local-apps/store.js +0 -2
- package/dist/src/mcp/capability-server.d.ts +4 -0
- package/dist/src/mcp/capability-server.js +96 -0
- package/dist/src/mcp/channel-bridge.js +1 -1
- package/dist/src/mcp/gateway-http-client.d.ts +7 -0
- package/dist/src/mcp/gateway-http-client.js +27 -5
- package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
- package/dist/src/notes/agent-context.js +4 -4
- package/dist/src/notes/capabilities/read.d.ts +3 -0
- package/dist/src/notes/capabilities/read.js +96 -0
- package/dist/src/notes/capabilities/write.d.ts +7 -0
- package/dist/src/notes/capabilities/write.js +152 -0
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/service.d.ts +12 -4
- package/dist/src/notes/service.js +188 -175
- package/dist/src/notes/store.d.ts +14 -9
- package/dist/src/notes/store.js +81 -21
- package/dist/src/notifications/service.d.ts +1 -0
- package/dist/src/notifications/service.js +5 -0
- package/dist/src/platform/client.d.ts +1 -1
- package/dist/src/platform/contracts.d.ts +1 -1
- package/dist/src/projects/capabilities/read.d.ts +3 -0
- package/dist/src/projects/capabilities/read.js +81 -0
- package/dist/src/projects/capabilities/write.d.ts +9 -0
- package/dist/src/projects/capabilities/write.js +260 -0
- package/dist/src/projects/index.js +2 -2
- package/dist/src/projects/project-change-events.d.ts +2 -0
- package/dist/src/projects/project-change-events.js +18 -0
- package/dist/src/projects/project-service.d.ts +11 -0
- package/dist/src/projects/project-service.js +121 -42
- package/dist/src/projects/project-skill-service.js +2 -2
- package/dist/src/projects/project-store.js +12 -2
- package/dist/src/projects/project-workspace-creation.d.ts +3 -0
- package/dist/src/projects/project-workspace-creation.js +45 -0
- package/dist/src/projects/workspace-project.js +6 -0
- 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 +1 -1
- package/dist/src/providers/model-catalog-types.d.ts +2 -1
- package/dist/src/providers/model-reference-auditor.js +5 -5
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/providers/model-supplements.js +13 -3
- package/dist/src/providers/presentation.js +3 -3
- package/dist/src/providers/register-runtime-providers.js +1 -1
- package/dist/src/providers/xopc-cloud-model-source.js +4 -2
- package/dist/src/realtime/runtime.js +4 -0
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/scenes/capabilities/read.d.ts +3 -0
- package/dist/src/scenes/capabilities/read.js +187 -0
- package/dist/src/scenes/capabilities/write.d.ts +3 -0
- package/dist/src/scenes/capabilities/write.js +151 -0
- package/dist/src/scenes/contracts.d.ts +2 -105
- package/dist/src/scenes/contracts.js +3 -88
- package/dist/src/scenes/execution.d.ts +1 -1
- package/dist/src/scenes/httpServices.d.ts +2 -0
- package/dist/src/scenes/inbox.d.ts +1 -0
- package/dist/src/scenes/inbox.js +7 -7
- package/dist/src/scenes/preferences.d.ts +3 -24
- package/dist/src/scenes/preferences.js +8 -30
- package/dist/src/scenes/repository.d.ts +1 -0
- package/dist/src/scenes/repository.js +7 -3
- package/dist/src/scenes/resultNotifications.js +2 -2
- package/dist/src/scenes/schedule.d.ts +1 -8
- package/dist/src/scenes/schedule.js +3 -15
- package/dist/src/scenes/service.d.ts +6 -0
- package/dist/src/scenes/service.js +29 -25
- package/dist/src/scenes/taskFollowUp/agentExecutor.d.ts +36 -0
- package/dist/src/scenes/taskFollowUp/agentExecutor.js +149 -0
- package/dist/src/scenes/taskFollowUp/branchInventory.d.ts +38 -0
- package/dist/src/scenes/taskFollowUp/branchInventory.js +70 -0
- package/dist/src/scenes/taskFollowUp/contracts.d.ts +91 -0
- package/dist/src/scenes/taskFollowUp/contracts.js +100 -0
- package/dist/src/scenes/taskFollowUp/resources.d.ts +19 -0
- package/dist/src/scenes/taskFollowUp/resources.js +97 -0
- package/dist/src/scenes/taskFollowUp/service.d.ts +810 -0
- package/dist/src/scenes/taskFollowUp/service.js +710 -0
- package/dist/src/scenes/taskFollowUp/workspaceFingerprint.d.ts +2 -0
- package/dist/src/scenes/taskFollowUp/workspaceFingerprint.js +46 -0
- package/dist/src/scenes/templates.d.ts +2 -2
- package/dist/src/scenes/templates.js +1 -1
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/session-find.d.ts +17 -0
- package/dist/src/session/session-find.js +56 -0
- package/dist/src/session/session-title.js +1 -1
- package/dist/src/session/store.d.ts +4 -0
- package/dist/src/session/store.js +46 -10
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/share/note-share-revocation.d.ts +3 -0
- package/dist/src/share/note-share-revocation.js +26 -0
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/share/site-proxy.js +1 -1
- package/dist/src/share/site-share-store.js +1 -1
- package/dist/src/storage/sqlite/connection.js +9 -9
- package/dist/src/storage/sqlite/migrations/190_scene_development.sql +37 -0
- package/dist/src/storage/sqlite/migrations/191_scene_task_follow_up.sql +27 -0
- package/dist/src/storage/sqlite/migrations/192_capability_operations.sql +20 -0
- package/dist/src/storage/sqlite/migrations/193_note_file_cleanup.sql +8 -0
- package/dist/src/storage/sqlite/migrations/194_capability_external_outcomes.sql +11 -0
- package/dist/src/storage/sqlite/migrations/195_automation_deleted_revisions.sql +4 -0
- package/dist/src/storage/sqlite/migrations/196_automation_run_requests.sql +23 -0
- package/dist/src/storage/sqlite/migrations/197_note_deletion_cleanup.sql +8 -0
- package/dist/src/storage/sqlite/migrations/198_project_workspace_creation.sql +7 -0
- package/dist/src/storage/sqlite/migrations/199_scene_resource_events.sql +488 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +6 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/storage/sqlite/transaction.d.ts +5 -0
- package/dist/src/storage/sqlite/transaction.js +34 -3
- package/dist/src/tasks/capabilities/management.d.ts +195 -0
- package/dist/src/tasks/capabilities/management.js +111 -0
- package/dist/src/tasks/capabilities/read.d.ts +2 -0
- package/dist/src/tasks/capabilities/read.js +141 -0
- package/dist/src/tasks/capabilities/relations.d.ts +204 -0
- package/dist/src/tasks/capabilities/relations.js +140 -0
- package/dist/src/tasks/capabilities/runs.d.ts +2 -0
- package/dist/src/tasks/capabilities/runs.js +89 -0
- package/dist/src/tasks/capabilities/write.d.ts +207 -0
- package/dist/src/tasks/capabilities/write.js +107 -0
- package/dist/src/tasks/execution-context.js +1 -1
- package/dist/src/tasks/home-query-service.js +5 -4
- package/dist/src/tasks/index.d.ts +0 -1
- package/dist/src/tasks/index.js +9 -9
- package/dist/src/tasks/project-operating-view-service.js +2 -1
- package/dist/src/tasks/task-application-service.d.ts +1 -0
- package/dist/src/tasks/task-application-service.js +4 -3
- package/dist/src/tasks/task-change-events.js +5 -3
- package/dist/src/tasks/task-context-assembler.js +3 -2
- 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.js +3 -2
- package/dist/src/tasks/task-read-model-projector.js +2 -1
- package/dist/src/tasks/task-repository.d.ts +12 -7
- package/dist/src/tasks/task-repository.js +175 -154
- package/dist/src/tasks/task-run-coordinator.js +2 -1
- package/dist/src/tasks/task-run-dispatcher.js +2 -1
- package/dist/src/tasks/task-run-repository.d.ts +1 -0
- package/dist/src/tasks/task-run-repository.js +29 -14
- package/dist/src/tasks/task-signal-service.js +2 -1
- package/dist/src/tui/backends/embedded-backend.js +10 -10
- package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
- package/dist/src/tui/extension-host/load-extensions.js +1 -1
- package/dist/src/tui/tui-command-formatters.js +1 -1
- package/dist/src/tui/tui-commands.js +6 -6
- package/dist/src/tui/tui-picker-overlay.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +4 -4
- package/dist/src/tui/tui.js +3 -3
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/user-context/config.d.ts +13 -0
- package/dist/src/user-context/config.js +2 -0
- package/dist/src/voice/local/runtime-worker.js +1 -1
- package/dist/src/voice/platform-catalog.d.ts +1 -1
- package/dist/src/voice/realtime/memory-context.js +3 -3
- package/dist/src/voice/realtime/runtime.js +3 -3
- package/dist/src/voice/stt/index.js +2 -2
- package/dist/src/voice/stt/preflight.js +1 -1
- package/dist/src/voice/stt/providers/alibaba-transcription.js +1 -1
- package/dist/src/voice/stt/providers/local-transcription.js +1 -1
- package/dist/src/voice/stt/providers/xopc-cloud-transcription.js +1 -1
- package/dist/src/voice/stt/transcribe-core.js +1 -1
- package/dist/src/voice/tts/audio.js +1 -1
- package/dist/src/voice/tts/factory.js +1 -1
- package/dist/src/voice/tts/index.js +1 -1
- package/dist/src/voice/tts/payload.js +1 -1
- package/dist/src/voice/tts/providers/xopc-cloud-speech.js +1 -1
- package/dist/src/work-discovery/incremental-repository.js +1 -1
- package/dist/src/work-discovery/index.js +1 -1
- package/dist/src/work-discovery/repository.d.ts +1 -1
- package/dist/src/work-discovery/repository.js +3 -2
- package/dist/src/work-discovery/service.d.ts +4 -0
- package/dist/src/work-discovery/service.js +40 -15
- package/dist/src/workflows/context/workflow-context.js +3 -2
- package/dist/src/workflows/service/workflow-run-service.js +7 -6
- package/dist/src/workflows/service/workflow-session-bridge.js +1 -1
- package/package.json +7 -3
- package/skills/THIRD_PARTY_NOTICES.md +2 -2
- package/skills/documents/xlsx/SKILL.md +5 -0
- package/skills/engineering/build-xopc-local-app/SKILL.md +2 -0
- package/skills/tools/find-skills/SKILL.md +3 -0
- package/dist/gateway/static/root/assets/activity-store-CS_SAPwP.js +0 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-9w_YVThL.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-Jgvx-RKL.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-403o57-3.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-Dpju5KT_.js +0 -7
- package/dist/gateway/static/root/assets/browser-settings-page-C0HJrpr1.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BanM86OX.js +0 -8
- package/dist/gateway/static/root/assets/channels-settings-Bhh0F9pO.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-BTqjm6eD.js +0 -2
- package/dist/gateway/static/root/assets/desktop-pet-settings-BI_sQTR_.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-BoPCEIm5.js +0 -1
- package/dist/gateway/static/root/assets/files-Be5viEFY.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-mpOw3R4d.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-Z-ErSgkD.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-Bq82yXVh.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BD1v6Uee.js +0 -1
- package/dist/gateway/static/root/assets/index-Ah5XDhOL.js +0 -79
- package/dist/gateway/static/root/assets/index-CV5b1pD1.css +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-BF8x3bgh.js +0 -2
- package/dist/gateway/static/root/assets/logs-page-B4vMUM7D.js +0 -2
- package/dist/gateway/static/root/assets/management-settings-Cg0UjJpy.js +0 -1
- package/dist/gateway/static/root/assets/messages-CRH2my19.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-CWVIGctd.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-CcTzMI1K.js +0 -8
- package/dist/gateway/static/root/assets/product-delivery-CrAI8ZEa.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-BNYoV9Ac.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CcKnYQqm.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-HIvwD5Xn.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-CFE2oX_l.js +0 -5
- package/dist/gateway/static/root/assets/scenes-page-BGKdg4uS.js +0 -1
- package/dist/gateway/static/root/assets/schemas-BaskVM5g.js +0 -64
- package/dist/gateway/static/root/assets/sessions-page-tn99saMj.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cx_uvwqz.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-1kYYg3BH.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-Du7BfwId.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BMhhXxRZ.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-vFn3xdlZ.js +0 -1
- package/dist/gateway/static/root/assets/theme-store-DdURyZ1M.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-uK9sxPUH.js +0 -2
- package/dist/gateway/static/root/assets/workflows-page-DIyd5AC9.js +0 -6
- package/skills/creative/algorithmic-art/SKILL.md +0 -44
- package/skills/creative/algorithmic-art/templates/generator-template.js +0 -27
- package/skills/creative/algorithmic-art/templates/viewer.html +0 -27
|
@@ -2,12 +2,12 @@ import { resolveStateDir } from "../../config/paths-state.js";
|
|
|
2
2
|
import { createLogger } from "../../utils/logger/index.js";
|
|
3
3
|
import { init_logger } from "../../utils/logger.js";
|
|
4
4
|
import { init_paths, resolveExtensionsDir } from "../../config/paths.js";
|
|
5
|
-
import { removeSkillsLockEntry } from "../../agent/skills/hub-lock.js";
|
|
6
|
-
import { deleteManagedSkill, installSkillFromZip, listManagedSkillDirs } from "../../agent/skills/managed-store.js";
|
|
7
5
|
import { createSkillConfigManager } from "../../agent/skills/config.js";
|
|
8
6
|
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "../../agent/skills/workspace-skills-dir.js";
|
|
9
|
-
import {
|
|
7
|
+
import { removeSkillsLockEntry } from "../../agent/skills/hub-lock.js";
|
|
8
|
+
import { deleteManagedSkill, installSkillFromZip, listManagedSkillDirs } from "../../agent/skills/managed-store.js";
|
|
10
9
|
import { normalizeSkillInstallTarget } from "../../agent/skills/install-target.js";
|
|
10
|
+
import { getExtensionLockfileManager } from "../../extensions/lockfile.js";
|
|
11
11
|
import { existsSync, rmSync } from "node:fs";
|
|
12
12
|
//#region src/gateway/service/marketplace-service.ts
|
|
13
13
|
/**
|
|
@@ -7,13 +7,13 @@ import { getConnectionResumeInput, init_connection_wait_repository, isConnection
|
|
|
7
7
|
import "../../storage/sqlite/index.js";
|
|
8
8
|
import { getConversationRouting } from "../../storage/sqlite/conversation-repository.js";
|
|
9
9
|
import { init_session_key } from "../../routing/session-key.js";
|
|
10
|
-
import { prependEnvelopeTimestamp } from "../../channels/envelope-timestamp.js";
|
|
11
|
-
import "../chat-limits.js";
|
|
12
|
-
import { formatAgentRunErrorForClient } from "../../agent/client-error-format.js";
|
|
13
10
|
import { resolveExecutionContext } from "../../tasks/execution-context.js";
|
|
14
11
|
import { TaskRunCoordinator } from "../../tasks/task-run-coordinator.js";
|
|
12
|
+
import { formatAgentRunErrorForClient } from "../../agent/client-error-format.js";
|
|
13
|
+
import "../chat-limits.js";
|
|
15
14
|
import { ChatStreamMapper } from "../chat-stream/mapper.js";
|
|
16
15
|
import { markdownNotificationPreview } from "../../notifications/plain-text.js";
|
|
16
|
+
import { prependEnvelopeTimestamp } from "../../channels/envelope-timestamp.js";
|
|
17
17
|
import { resolveWebchatConversationId } from "../resolve-webchat-session-key.js";
|
|
18
18
|
import { recordExplicitRelationshipFollowUp } from "../../user-context/relationship-continuity.js";
|
|
19
19
|
import { coalesceThinkingDeltas } from "../chat-stream/thinking-delta-coalescer.js";
|
|
@@ -142,7 +142,16 @@ async function* runGatewayAgent(deps, message, channel, chatId, origin, attachme
|
|
|
142
142
|
signal: mergedSignal,
|
|
143
143
|
runId,
|
|
144
144
|
sourceContexts: runOptions?.sourceContexts,
|
|
145
|
-
presentation: runOptions?.presentation
|
|
145
|
+
presentation: runOptions?.presentation,
|
|
146
|
+
onDeferredAudio: (audio) => {
|
|
147
|
+
publishRealtime("sessions", "session.audio_ready", {
|
|
148
|
+
conversationId,
|
|
149
|
+
runId,
|
|
150
|
+
...audio,
|
|
151
|
+
createdAtMs: Date.now()
|
|
152
|
+
});
|
|
153
|
+
emit("session.transcript_updated", { key: conversationId });
|
|
154
|
+
}
|
|
146
155
|
});
|
|
147
156
|
const mappedEvents = (async function* () {
|
|
148
157
|
for await (const event of eventStream) yield* mapper.map(event);
|
|
@@ -9,16 +9,25 @@ import { summarizeSourceContext } from "../../agent/source-context/types.js";
|
|
|
9
9
|
import { deleteMediaUrisNoLongerReferenced } from "../../media/session-references.js";
|
|
10
10
|
import { fitSourceContextsToBudget } from "../../agent/source-context/budget.js";
|
|
11
11
|
import crypto from "node:crypto";
|
|
12
|
+
import { isDeepStrictEqual } from "node:util";
|
|
12
13
|
//#region src/gateway/service/session-input-coordinator.ts
|
|
13
14
|
init_connection_wait_repository();
|
|
14
15
|
init_session_input_repository();
|
|
15
16
|
init_logger();
|
|
16
17
|
const log = createLogger("SessionInputCoordinator");
|
|
17
18
|
const MAX_PENDING_INPUTS = 10;
|
|
19
|
+
function sameAppContext(input, existing) {
|
|
20
|
+
const identity = (sources) => sources?.filter((source) => source.kind === "app_context").map((source) => ({
|
|
21
|
+
snapshot: source.appContext,
|
|
22
|
+
principal: source.appContextGrant?.principal.principalId
|
|
23
|
+
})) ?? [];
|
|
24
|
+
return isDeepStrictEqual(identity(input.sourceContexts), identity(existing.contextSnapshots));
|
|
25
|
+
}
|
|
18
26
|
function contextRefsMatchFrozenSnapshot(requested, frozen) {
|
|
19
|
-
|
|
27
|
+
const editable = frozen?.filter((ref) => ref.kind === "note" || ref.kind === "task") ?? [];
|
|
28
|
+
if (requested.length !== editable.length) return false;
|
|
20
29
|
return requested.every((ref, index) => {
|
|
21
|
-
const snapshot =
|
|
30
|
+
const snapshot = editable[index];
|
|
22
31
|
return snapshot?.kind === ref.kind && snapshot.sourceId === ref.sourceId && ref.expectedVersion === snapshot.version;
|
|
23
32
|
});
|
|
24
33
|
}
|
|
@@ -53,6 +62,7 @@ var SessionInputCoordinator = class {
|
|
|
53
62
|
}
|
|
54
63
|
}
|
|
55
64
|
async submit(input) {
|
|
65
|
+
input = structuredClone(input);
|
|
56
66
|
const conversationId = input.conversationId.trim();
|
|
57
67
|
try {
|
|
58
68
|
return await this.runSubmissionExclusive(conversationId, () => this.submitLocked({
|
|
@@ -68,6 +78,7 @@ var SessionInputCoordinator = class {
|
|
|
68
78
|
}
|
|
69
79
|
}
|
|
70
80
|
async replaceLatestTurn(input, beforeReplace) {
|
|
81
|
+
input = structuredClone(input);
|
|
71
82
|
const conversationId = input.conversationId.trim();
|
|
72
83
|
return this.runSubmissionExclusive(conversationId, async () => {
|
|
73
84
|
const clientMessageId = input.clientMessageId.trim();
|
|
@@ -81,14 +92,20 @@ var SessionInputCoordinator = class {
|
|
|
81
92
|
ok: false,
|
|
82
93
|
code: "BAD_REQUEST"
|
|
83
94
|
};
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
95
|
+
const existing = findSessionInput(conversationId, clientMessageId);
|
|
96
|
+
if (existing) {
|
|
97
|
+
if (!sameAppContext(input, existing)) return {
|
|
98
|
+
ok: false,
|
|
99
|
+
code: "CONTEXT_UNAVAILABLE"
|
|
100
|
+
};
|
|
101
|
+
return {
|
|
102
|
+
ok: true,
|
|
103
|
+
effectiveDelivery: "next",
|
|
104
|
+
state: this.snapshot(conversationId)
|
|
105
|
+
};
|
|
106
|
+
}
|
|
89
107
|
const target = validateLatestSessionTurnTarget(conversationId, targetTurnId);
|
|
90
108
|
if (target.ok === false) return target;
|
|
91
|
-
await beforeReplace();
|
|
92
109
|
const attachments = await this.deps.prepareAttachments(conversationId, input.attachments);
|
|
93
110
|
let sourceContexts;
|
|
94
111
|
try {
|
|
@@ -103,6 +120,7 @@ var SessionInputCoordinator = class {
|
|
|
103
120
|
code: "CONTEXT_UNAVAILABLE"
|
|
104
121
|
};
|
|
105
122
|
}
|
|
123
|
+
await beforeReplace();
|
|
106
124
|
const result = replaceLatestSessionTurnAndQueueInput({
|
|
107
125
|
conversationId,
|
|
108
126
|
targetTurnId,
|
|
@@ -149,11 +167,17 @@ var SessionInputCoordinator = class {
|
|
|
149
167
|
code: "BAD_REQUEST"
|
|
150
168
|
};
|
|
151
169
|
const existing = findSessionInput(conversationId, clientMessageId);
|
|
152
|
-
if (existing)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
170
|
+
if (existing) {
|
|
171
|
+
if (!sameAppContext(input, existing)) return {
|
|
172
|
+
ok: false,
|
|
173
|
+
code: "CONTEXT_UNAVAILABLE"
|
|
174
|
+
};
|
|
175
|
+
return {
|
|
176
|
+
ok: true,
|
|
177
|
+
effectiveDelivery: existing.effectiveDelivery,
|
|
178
|
+
state: this.snapshot(conversationId)
|
|
179
|
+
};
|
|
180
|
+
}
|
|
157
181
|
if (this.snapshot(conversationId).inputs.length >= MAX_PENDING_INPUTS) return {
|
|
158
182
|
ok: false,
|
|
159
183
|
code: "QUEUE_FULL"
|
|
@@ -227,7 +251,21 @@ var SessionInputCoordinator = class {
|
|
|
227
251
|
const runId = crypto.randomUUID();
|
|
228
252
|
const input = claimNextSessionInput(conversationId, runId);
|
|
229
253
|
if (!input) return;
|
|
230
|
-
|
|
254
|
+
let allowed;
|
|
255
|
+
try {
|
|
256
|
+
allowed = (!this.deps.beforeExecute || await this.deps.beforeExecute(input)) && consumeConnectionResume(input) && consumeClarificationResume(input);
|
|
257
|
+
} catch (err) {
|
|
258
|
+
log.warn({
|
|
259
|
+
err,
|
|
260
|
+
conversationId,
|
|
261
|
+
runId,
|
|
262
|
+
inputId: input.id
|
|
263
|
+
}, "Session input preflight failed");
|
|
264
|
+
finishSessionInputRun(conversationId, runId, "failed", "Input preflight failed");
|
|
265
|
+
this.publish(conversationId);
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
if (!allowed) {
|
|
231
269
|
finishSessionInputRun(conversationId, runId, "cancelled");
|
|
232
270
|
this.publish(conversationId);
|
|
233
271
|
continue;
|
|
@@ -272,7 +310,8 @@ var SessionInputCoordinator = class {
|
|
|
272
310
|
if (body.contextRefs !== void 0) {
|
|
273
311
|
const existing = getSessionInputById(conversationId, id);
|
|
274
312
|
if (!contextRefsMatchFrozenSnapshot(body.contextRefs, existing?.contextRefs)) try {
|
|
275
|
-
|
|
313
|
+
const resolved = await this.deps.prepareContexts(body.contextRefs) ?? [];
|
|
314
|
+
sourceContexts = fitSourceContextsToBudget([...existing?.contextSnapshots?.filter((source) => source.kind !== "note" && source.kind !== "task") ?? [], ...resolved]);
|
|
276
315
|
} catch (err) {
|
|
277
316
|
log.warn({
|
|
278
317
|
err,
|
|
@@ -133,6 +133,7 @@ export declare class GatewaySessionsApi {
|
|
|
133
133
|
}>;
|
|
134
134
|
search(query: string): Promise<import("../../session/types.js").SessionMetadata[]>;
|
|
135
135
|
searchIn(key: string, keyword: string): Promise<import("../../session/types.js").Message[]>;
|
|
136
|
+
findMessages(key: string, query: string, limit?: number): Promise<import("../../session/session-find.js").SessionFindResult>;
|
|
136
137
|
export(key: string, format: ExportFormat): Promise<{
|
|
137
138
|
content: string;
|
|
138
139
|
}>;
|
|
@@ -2,8 +2,8 @@ import { init_agent_session_key, resolveAgentIdFromConversationId } from "../../
|
|
|
2
2
|
import { retireSessionMcpRuntimeForConversationId } from "../../agent/mcp/bundle-mcp-runtime.js";
|
|
3
3
|
import { buildSessionTimeline } from "../../session/transcript-outline.js";
|
|
4
4
|
import { transcriptRowsToClientHistory } from "../../session/client-history.js";
|
|
5
|
-
import { collectMediaUrisFromValues, deleteMediaUris } from "../../media/session-references.js";
|
|
6
5
|
import "../../agent/mcp/bundle-mcp-tools.js";
|
|
6
|
+
import { collectMediaUrisFromValues, deleteMediaUris } from "../../media/session-references.js";
|
|
7
7
|
import { withModelConfigLock } from "../../session/model-config-lock.js";
|
|
8
8
|
import { getDistinctSessionChatIds } from "./session-chat-ids.js";
|
|
9
9
|
import { performSessionReset } from "../session-reset-service.js";
|
|
@@ -201,6 +201,9 @@ var GatewaySessionsApi = class {
|
|
|
201
201
|
searchIn(key, keyword) {
|
|
202
202
|
return this.opts.sessionIndex.searchInSession(key, keyword);
|
|
203
203
|
}
|
|
204
|
+
findMessages(key, query, limit) {
|
|
205
|
+
return this.opts.sessionIndex.getStore().findInSession(key, query, limit);
|
|
206
|
+
}
|
|
204
207
|
async export(key, format) {
|
|
205
208
|
return { content: await this.opts.sessionIndex.exportSession(key, format) };
|
|
206
209
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SessionFindResult } from '../../session/session-find.js';
|
|
1
2
|
import type { SessionTimelineItem } from '../../session/transcript-outline.js';
|
|
2
3
|
import { TaskConversationRepository } from '../../tasks/task-conversation-repository.js';
|
|
3
4
|
import type { GatewaySessionsApi } from './sessions-api.js';
|
|
@@ -5,7 +6,7 @@ export declare class TaskConversationQueryService {
|
|
|
5
6
|
#private;
|
|
6
7
|
private readonly sessions;
|
|
7
8
|
private readonly conversations;
|
|
8
|
-
constructor(sessions: Pick<GatewaySessionsApi, 'getMessagePage' | 'getTimeline'>, conversations?: Pick<TaskConversationRepository, 'listSessions'>);
|
|
9
|
+
constructor(sessions: Pick<GatewaySessionsApi, 'findMessages' | 'getMessagePage' | 'getTimeline'>, conversations?: Pick<TaskConversationRepository, 'listSessions'>);
|
|
9
10
|
getMessagePage(taskId: string, options: {
|
|
10
11
|
limit: number;
|
|
11
12
|
offset: number;
|
|
@@ -56,4 +57,5 @@ export declare class TaskConversationQueryService {
|
|
|
56
57
|
};
|
|
57
58
|
}>;
|
|
58
59
|
getTimeline(taskId: string): Promise<SessionTimelineItem[] | null>;
|
|
60
|
+
findMessages(taskId: string, query: string, limit?: number): Promise<SessionFindResult | null>;
|
|
59
61
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
2
2
|
//#region src/gateway/service/task-conversation-query-service.ts
|
|
3
|
+
function displayMessageCount(items) {
|
|
4
|
+
return items.reduce((count, item) => item.displayIndex === void 0 ? count : Math.max(count, item.displayIndex + 1), 0);
|
|
5
|
+
}
|
|
3
6
|
var TaskConversationQueryService = class {
|
|
4
7
|
constructor(sessions, conversations = new TaskConversationRepository()) {
|
|
5
8
|
this.sessions = sessions;
|
|
@@ -53,8 +56,8 @@ var TaskConversationQueryService = class {
|
|
|
53
56
|
let displayOffset = 0;
|
|
54
57
|
let turnOffset = 0;
|
|
55
58
|
for (const [index, link] of links.entries()) {
|
|
56
|
-
const
|
|
57
|
-
if (!items
|
|
59
|
+
const items = await this.sessions.getTimeline(link.conversationId);
|
|
60
|
+
if (!items) return null;
|
|
58
61
|
if (index > 0) output.push({
|
|
59
62
|
id: `assignment:${link.id}`,
|
|
60
63
|
kind: "branch",
|
|
@@ -70,12 +73,38 @@ var TaskConversationQueryService = class {
|
|
|
70
73
|
turn: item.turn + turnOffset,
|
|
71
74
|
...item.displayIndex === void 0 ? {} : { displayIndex: item.displayIndex + displayOffset }
|
|
72
75
|
})));
|
|
73
|
-
displayOffset +=
|
|
76
|
+
displayOffset += displayMessageCount(items);
|
|
74
77
|
const highestTurn = items.reduce((max, item) => Math.max(max, item.turn), -1);
|
|
75
78
|
turnOffset += highestTurn + 1;
|
|
76
79
|
}
|
|
77
80
|
return output;
|
|
78
81
|
}
|
|
82
|
+
async findMessages(taskId, query, limit = 1e3) {
|
|
83
|
+
const links = this.#executionSessions(taskId);
|
|
84
|
+
if (links.length === 0) return null;
|
|
85
|
+
const matches = [];
|
|
86
|
+
let displayOffset = 0;
|
|
87
|
+
let total = 0;
|
|
88
|
+
for (const link of links) {
|
|
89
|
+
const [result, items] = await Promise.all([this.sessions.findMessages(link.conversationId, query, limit), this.sessions.getTimeline(link.conversationId)]);
|
|
90
|
+
if (!result || !items) return null;
|
|
91
|
+
total += result.total;
|
|
92
|
+
for (const match of result.matches) {
|
|
93
|
+
if (matches.length >= limit) break;
|
|
94
|
+
matches.push({
|
|
95
|
+
...match,
|
|
96
|
+
displayIndex: match.displayIndex + displayOffset
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
displayOffset += displayMessageCount(items);
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
query: query.trim(),
|
|
103
|
+
total,
|
|
104
|
+
truncated: total > matches.length,
|
|
105
|
+
matches
|
|
106
|
+
};
|
|
107
|
+
}
|
|
79
108
|
#executionSessions(taskId) {
|
|
80
109
|
return this.conversations.listSessions(taskId).filter((link) => link.role === "execution").sort((a, b) => a.assignmentEpoch - b.assignmentEpoch || a.startedAt - b.startedAt);
|
|
81
110
|
}
|
|
@@ -25,6 +25,7 @@ import type { GatewayServiceConfig } from './service/types.js';
|
|
|
25
25
|
import { type GatewayReadinessSnapshot } from './startup-readiness.js';
|
|
26
26
|
import { type ConnectorLearningCoordinator } from '../connectors/learning-coordinator.js';
|
|
27
27
|
import type { SceneAccess } from '../scenes/httpServices.js';
|
|
28
|
+
import type { GatewayPrincipal } from './security/gateway-principal.js';
|
|
28
29
|
import { type ProductLanguage } from '../voice/language-profile.js';
|
|
29
30
|
import { EndpointToolRuntime } from '../endpoint-tools/index.js';
|
|
30
31
|
export type { GatewayChannelStartupPhase1Metrics, GatewayChannelStartupPhase2Metrics, GatewayServiceConfig, } from './service/types.js';
|
|
@@ -137,6 +138,8 @@ export declare class GatewayService {
|
|
|
137
138
|
ok: false;
|
|
138
139
|
code: "BAD_REQUEST" | "QUEUE_FULL" | "CONTEXT_UNAVAILABLE" | "SESSION_CHANGED";
|
|
139
140
|
}>;
|
|
141
|
+
private appContextDispatcher;
|
|
142
|
+
prepareSessionAppContext(input: unknown, principal: GatewayPrincipal, conversationId: string, clientMessageId: string): Promise<import("../agent/source-context/types.js").AgentSourceContext>;
|
|
140
143
|
replaceLatestSessionTurn(...args: Parameters<GatewayAgentRunner['replaceLatestSessionTurn']>): Promise<{
|
|
141
144
|
ok: true;
|
|
142
145
|
effectiveDelivery: "next";
|
|
@@ -8,6 +8,8 @@ import { init_logger } from "../utils/logger.js";
|
|
|
8
8
|
import { closeXopcDatabase, openXopcDatabase } from "../storage/sqlite/connection.js";
|
|
9
9
|
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
10
10
|
import { findSessionInput, init_session_input_repository, insertSessionInput } from "../storage/sqlite/session-input-repository.js";
|
|
11
|
+
import { TaskRepository } from "../tasks/task-repository.js";
|
|
12
|
+
import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
|
|
11
13
|
import { init_changes, notifyUserContextChange } from "../user-context/changes.js";
|
|
12
14
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
13
15
|
import { init_session_repository, patchSessionMetadata } from "../storage/sqlite/session-repository.js";
|
|
@@ -15,39 +17,56 @@ import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
|
15
17
|
import "../storage/sqlite/index.js";
|
|
16
18
|
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
17
19
|
import { init_agent_scope, listAgentEntries, normalizeAgentId, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../agent/agent-scope.js";
|
|
20
|
+
import { init_agent_session_key, resolveAgentMainConversationId } from "../routing/agent-session-key.js";
|
|
21
|
+
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
22
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
23
|
+
import { resolveEffectiveAgentProfileForSession } from "../config/agent-profile.js";
|
|
18
24
|
import { init_paths, resolveConfigPath, resolveExtensionsDir } from "../config/paths.js";
|
|
19
|
-
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
20
25
|
import { areExtensionsGloballyDisabled } from "../extensions/discover-extensions.js";
|
|
21
26
|
import { buildExtensionMetadataSnapshot } from "../extensions/extension-metadata-snapshot.js";
|
|
22
27
|
import { buildChannelCatalogForConfig, buildChannelCatalogFromSnapshot, init_channel_catalog_service } from "../channels/catalog/channel-catalog-service.js";
|
|
23
28
|
import { loadConfig, saveConfig } from "../config/loader.js";
|
|
24
|
-
import {
|
|
25
|
-
import { init_session_key, resolveConversationId, sanitizeSegment } from "../routing/session-key.js";
|
|
26
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
29
|
+
import { prewarmModelRegistry } from "../providers/model-registry.js";
|
|
27
30
|
import { init_providers, providers_exports } from "../providers/index.js";
|
|
28
|
-
import {
|
|
31
|
+
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
32
|
+
import { getEmbeddedExecutionSession } from "../agent/embedded/execution-context.js";
|
|
33
|
+
import { disposeAllSessionMcpRuntimes } from "../agent/mcp/bundle-mcp-runtime.js";
|
|
34
|
+
import { DomainOutboxDispatcher } from "../infra/domain-outbox-dispatcher.js";
|
|
29
35
|
import { onAutomationProductEvent, publishAutomationProductEvent } from "../automations/product-events.js";
|
|
36
|
+
import { ProjectService } from "../projects/project-service.js";
|
|
37
|
+
import { resolveProjectAgentId } from "../projects/project-agent.js";
|
|
38
|
+
import "../projects/index.js";
|
|
39
|
+
import { resolveEffectiveGatewayPort } from "./host.js";
|
|
40
|
+
import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
41
|
+
import { buildNoteAgentContext } from "../notes/agent-context.js";
|
|
42
|
+
import { NotesStore } from "../notes/store.js";
|
|
43
|
+
import { NotesService } from "../notes/service.js";
|
|
44
|
+
import { LocalAppService } from "../local-apps/service.js";
|
|
45
|
+
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
46
|
+
import { AutomationService } from "../automations/service/automation-service.js";
|
|
47
|
+
import { TaskSignalService } from "../tasks/task-signal-service.js";
|
|
48
|
+
import { createProductDispatcher } from "../capabilities/runtime/product.js";
|
|
30
49
|
import "../automations/index.js";
|
|
31
|
-
import {
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import {
|
|
50
|
+
import { TaskRunDispatcher } from "../tasks/task-run-dispatcher.js";
|
|
51
|
+
import "../tasks/index.js";
|
|
52
|
+
import "../agent/mcp/bundle-mcp-tools.js";
|
|
53
|
+
import { SessionIndex } from "../session/manager.js";
|
|
54
|
+
import "../session/index.js";
|
|
55
|
+
import { ExtensionLoader } from "../extensions/loader.js";
|
|
56
|
+
import "../extensions/index.js";
|
|
35
57
|
import { MessageBus, MessageBusShutdownError } from "../infra/bus/queue.js";
|
|
36
58
|
import "../infra/bus/index.js";
|
|
59
|
+
import { collectMediaUrisFromMessages, deleteMediaUris } from "../media/session-references.js";
|
|
60
|
+
import { AgentService } from "../agent/service.js";
|
|
61
|
+
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
37
62
|
import { getWorkspacePath } from "../config/workspace-path-helpers.js";
|
|
38
63
|
import "../config/index.js";
|
|
39
|
-
import { ExtensionLoader } from "../extensions/loader.js";
|
|
40
|
-
import "../extensions/index.js";
|
|
41
|
-
import { resolveEffectiveGatewayPort } from "./host.js";
|
|
42
|
-
import { disposeAllSessionMcpRuntimes } from "../agent/mcp/bundle-mcp-runtime.js";
|
|
43
64
|
import { ManagedComposioEventPoller } from "../connectors/composio-managed-events.js";
|
|
44
65
|
import { startConnectedKnowledgeCoordinator } from "../knowledge/coordinator.js";
|
|
45
66
|
import "../knowledge/index.js";
|
|
46
67
|
import { ConnectionRecoveryService } from "../connectors/connection-recovery-service.js";
|
|
47
68
|
import { startConnectorLearningCoordinator } from "../connectors/learning-coordinator.js";
|
|
48
69
|
import { startConnectorSupervisor } from "../connectors/supervisor.js";
|
|
49
|
-
import { TaskRepository } from "../tasks/task-repository.js";
|
|
50
|
-
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
51
70
|
import { DiscussionService } from "../discussions/service.js";
|
|
52
71
|
import { DiscussionOrganizer } from "../discussions/organizer.js";
|
|
53
72
|
import { DiscussionLiveWorker } from "../discussions/live-worker.js";
|
|
@@ -56,11 +75,9 @@ import { DiscussionSealer } from "../discussions/sealer.js";
|
|
|
56
75
|
import "../discussions/index.js";
|
|
57
76
|
import { EndpointToolRuntime } from "../endpoint-tools/runtime.js";
|
|
58
77
|
import "../endpoint-tools/index.js";
|
|
59
|
-
import { ProjectService } from "../projects/project-service.js";
|
|
60
|
-
import { resolveProjectAgentId } from "../projects/project-agent.js";
|
|
61
|
-
import "../projects/index.js";
|
|
62
78
|
import { assertGatewayAuthConfigured, extractToken, resolveGatewayAuth, validateToken } from "./auth.js";
|
|
63
79
|
import { prepareAutomationAgentSession } from "./automation-agent-session.js";
|
|
80
|
+
import { registerClarificationChannelRuntime } from "./clarify-runtime.js";
|
|
64
81
|
import { stopTailscaleExposure } from "./tailscale-lifecycle.js";
|
|
65
82
|
import { createBackgroundTask } from "../infra/background-task.js";
|
|
66
83
|
import { buildTaskAgentContext } from "../agent/source-context/task-context.js";
|
|
@@ -68,22 +85,8 @@ import { WorkDiscoveryService } from "../work-discovery/service.js";
|
|
|
68
85
|
import { buildVoiceMemoryContext } from "../voice/realtime/memory-context.js";
|
|
69
86
|
import { buildVoicePersonaContext } from "../voice/realtime/persona-context.js";
|
|
70
87
|
import { voiceMemoryBudget, voicePersonaBudget } from "../voice/realtime/conversation-context.js";
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import "../session/index.js";
|
|
74
|
-
import { getEmbeddedExecutionSession } from "../agent/embedded/execution-context.js";
|
|
75
|
-
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
76
|
-
import { collectMediaUrisFromMessages, deleteMediaUris } from "../media/session-references.js";
|
|
77
|
-
import { TaskOutboxDispatcher } from "../tasks/task-outbox-dispatcher.js";
|
|
78
|
-
import { TaskRunDispatcher } from "../tasks/task-run-dispatcher.js";
|
|
79
|
-
import { TaskSignalService } from "../tasks/task-signal-service.js";
|
|
80
|
-
import "../tasks/index.js";
|
|
81
|
-
import "../agent/mcp/bundle-mcp-tools.js";
|
|
82
|
-
import { AgentService } from "../agent/service.js";
|
|
83
|
-
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
84
|
-
import { NotesStore } from "../notes/store.js";
|
|
85
|
-
import { buildNoteAgentContext } from "../notes/agent-context.js";
|
|
86
|
-
import { NotesService } from "../notes/service.js";
|
|
88
|
+
import { setPairingBroadcastSink } from "../channels/pairing/pairing-events.js";
|
|
89
|
+
import { ChannelManager } from "../channels/manager.js";
|
|
87
90
|
import "../notes/index.js";
|
|
88
91
|
import { buildWorkflowChildTools } from "../agent/workflow/workflow-child-tools.js";
|
|
89
92
|
import { WorkflowRunService } from "../workflows/service/workflow-run-service.js";
|
|
@@ -104,7 +107,6 @@ import { getXopcCloudCatalogCoordinator } from "../providers/xopc-cloud-catalog-
|
|
|
104
107
|
import { ModelCatalogSyncService } from "../providers/model-catalog-sync-service.js";
|
|
105
108
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
106
109
|
import { NotificationService } from "../notifications/service.js";
|
|
107
|
-
import { LocalAppService } from "../local-apps/service.js";
|
|
108
110
|
import "../local-apps/index.js";
|
|
109
111
|
import { createRuntimeBrowserAutomationService } from "../browser/automations/runtime-service.js";
|
|
110
112
|
import "../browser/automations/index.js";
|
|
@@ -123,6 +125,7 @@ import { reconcileMemoryMaintenanceAutomations } from "./memory-maintenance-auto
|
|
|
123
125
|
import { GatewayReadiness } from "./startup-readiness.js";
|
|
124
126
|
import { createGatewayStartupTrace } from "./startup-trace.js";
|
|
125
127
|
import { GatewaySceneHost } from "./scenes/host.js";
|
|
128
|
+
import { checkAppContextAccess, prepareAppContext } from "./service/app-context-access.js";
|
|
126
129
|
import { applyAutomaticVoiceLanguage, inferProductLanguageFromEnvironment, initializeVoiceDefaults } from "../voice/language-profile.js";
|
|
127
130
|
import crypto from "node:crypto";
|
|
128
131
|
//#region src/gateway/service.ts
|
|
@@ -140,6 +143,7 @@ init_paths();
|
|
|
140
143
|
init_package_version();
|
|
141
144
|
init_resolve_route();
|
|
142
145
|
init_session_key();
|
|
146
|
+
init_task_run_repository();
|
|
143
147
|
init_transaction();
|
|
144
148
|
const log = createLogger("Gateway:Service");
|
|
145
149
|
var GatewayService = class {
|
|
@@ -457,7 +461,10 @@ var GatewayService = class {
|
|
|
457
461
|
emit: (type, payload) => this.emit(type, payload)
|
|
458
462
|
});
|
|
459
463
|
this.agentRunner = new GatewayAgentRunner({
|
|
460
|
-
validateConnectionResume: (input) =>
|
|
464
|
+
validateConnectionResume: async (input) => {
|
|
465
|
+
for (const source of input.contextSnapshots ?? []) if (source.kind === "app_context") await checkAppContextAccess(source, this.appContextDispatcher(), this.auth);
|
|
466
|
+
return this.connectionRecovery.preflight(input);
|
|
467
|
+
},
|
|
461
468
|
bus: this.bus,
|
|
462
469
|
sessionIndex: this.sessionIndex,
|
|
463
470
|
getAgentService: () => this.ensureAgentService(),
|
|
@@ -581,6 +588,7 @@ var GatewayService = class {
|
|
|
581
588
|
emitBrowserEvent: (type, payload) => this.emit(type, payload),
|
|
582
589
|
getNotesService: () => this.notesService,
|
|
583
590
|
getProjectService: () => this.projects,
|
|
591
|
+
getWorkDiscovery: () => this._workDiscovery ?? void 0,
|
|
584
592
|
getLocalAppService: () => this.localApps,
|
|
585
593
|
dispatchTaskEvents: () => this.dispatchTaskEvents(),
|
|
586
594
|
dispatchTaskRuns: () => this.dispatchTaskRuns(),
|
|
@@ -661,6 +669,13 @@ var GatewayService = class {
|
|
|
661
669
|
})).conversationId;
|
|
662
670
|
},
|
|
663
671
|
runAgent: async (runId, conversationId, message) => {
|
|
672
|
+
const taskRun = new TaskRunRepository().require(runId);
|
|
673
|
+
if (getSqliteDatabase().prepare("SELECT 1 FROM scene_task_bindings WHERE task_id = ?").get(taskRun.taskId)) {
|
|
674
|
+
if (!this.sceneHost?.http.followUps) throw new Error("Task follow-up runtime is disabled");
|
|
675
|
+
this.ensureAgentService();
|
|
676
|
+
await this.sceneHost.http.followUps.executeTask(runId, conversationId);
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
664
679
|
const clientMessageId = `task:${runId}`;
|
|
665
680
|
const session = await this.sessionIndex.getSessionMetadata(conversationId);
|
|
666
681
|
if (!session) throw new Error("Task session is unavailable");
|
|
@@ -686,11 +701,17 @@ var GatewayService = class {
|
|
|
686
701
|
return this.taskRunDispatcher;
|
|
687
702
|
}
|
|
688
703
|
createNotificationService() {
|
|
689
|
-
if (!this.notificationService) this.notificationService = new NotificationService({
|
|
704
|
+
if (!this.notificationService) this.notificationService = new NotificationService({
|
|
705
|
+
publish: (type, payload) => this.realtime.broker.publish("gateway", type, payload),
|
|
706
|
+
allowsNotification: (notification) => notification.target.kind !== "task" || this.sceneHost?.http.followUps?.allowsTaskNotification(notification.target.taskId) !== false
|
|
707
|
+
});
|
|
690
708
|
return this.notificationService;
|
|
691
709
|
}
|
|
692
710
|
taskRunDispatch = createBackgroundTask(async () => {
|
|
693
711
|
new TaskSignalService().tick();
|
|
712
|
+
this.notesService.flushCommittedEffects();
|
|
713
|
+
this.projects.flushCommittedEffects();
|
|
714
|
+
this._workDiscovery?.dispatchProjectUnderstanding();
|
|
694
715
|
this.dispatchTaskEvents();
|
|
695
716
|
this.createTaskRunDispatcher().dispatch();
|
|
696
717
|
await this.createWorkflowRunService().dispatchTaskRuns();
|
|
@@ -770,7 +791,10 @@ var GatewayService = class {
|
|
|
770
791
|
};
|
|
771
792
|
}
|
|
772
793
|
dispatchTaskEvents() {
|
|
773
|
-
new
|
|
794
|
+
new DomainOutboxDispatcher((event) => {
|
|
795
|
+
if (event.source === "local_apps") this.emit(event.type, event.payload);
|
|
796
|
+
else publishAutomationProductEvent(event);
|
|
797
|
+
}).drain();
|
|
774
798
|
}
|
|
775
799
|
runAgent(...args) {
|
|
776
800
|
return this.agentRunner.runAgent(...args);
|
|
@@ -785,6 +809,17 @@ var GatewayService = class {
|
|
|
785
809
|
submitSessionInput(...args) {
|
|
786
810
|
return this.agentRunner.submitSessionInput(...args);
|
|
787
811
|
}
|
|
812
|
+
appContextDispatcher() {
|
|
813
|
+
return createProductDispatcher(() => this.notesService, {
|
|
814
|
+
getProjects: () => this.projects,
|
|
815
|
+
getLocalApps: () => this.localApps,
|
|
816
|
+
getSceneAccess: () => this.sceneAccess
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
prepareSessionAppContext(input, principal, conversationId, clientMessageId) {
|
|
820
|
+
const previous = findSessionInput(conversationId, clientMessageId)?.contextSnapshots?.find((source) => source.kind === "app_context");
|
|
821
|
+
return prepareAppContext(input, principal, this.auth, this.appContextDispatcher(), previous);
|
|
822
|
+
}
|
|
788
823
|
replaceLatestSessionTurn(...args) {
|
|
789
824
|
return this.agentRunner.replaceLatestSessionTurn(...args);
|
|
790
825
|
}
|
|
@@ -949,6 +984,7 @@ var GatewayService = class {
|
|
|
949
984
|
});
|
|
950
985
|
log.debug("Starting gateway service...");
|
|
951
986
|
openXopcDatabase();
|
|
987
|
+
await this.localApps.recoverPendingReleases();
|
|
952
988
|
const { recoverCapabilityImports } = await import("../imports/runtime.js");
|
|
953
989
|
await recoverCapabilityImports();
|
|
954
990
|
this.createNotificationService().start();
|
|
@@ -1628,6 +1664,24 @@ var GatewayService = class {
|
|
|
1628
1664
|
this.stopAutomationProductEventBridge?.();
|
|
1629
1665
|
this.stopSessionTranscriptAutomationEvents?.();
|
|
1630
1666
|
this.stopAutomationProductEventBridge = onAutomationProductEvent((event) => {
|
|
1667
|
+
if (event.type === "project.deleted" && typeof event.payload.projectId === "string") {
|
|
1668
|
+
const runIds = event.payload.deletedUnderstandingRunIds;
|
|
1669
|
+
if (Array.isArray(runIds) && runIds.every((id) => typeof id === "string")) this._workDiscovery?.abortDeletedProjectRuns(event.payload.projectId, runIds);
|
|
1670
|
+
}
|
|
1671
|
+
if (event.type === "note.created" || event.type === "note.updated" || event.type === "note.deleted" || event.type === "task.changed.v2" || event.type === "task.deleted.v1" || event.type === "project.changed" || event.type === "project.created" || event.type === "project.deleted" || event.type === "scene.changed" || event.type === "scene.created" || event.type === "scene.deleted") {
|
|
1672
|
+
const note = event.type.startsWith("note.");
|
|
1673
|
+
const project = event.type.startsWith("project.");
|
|
1674
|
+
const scene = event.type.startsWith("scene.");
|
|
1675
|
+
const payload = event.payload;
|
|
1676
|
+
if (typeof payload.sourceEventId === "string") this.realtime.broker.publish(note ? "resources:notes" : project ? "resources:projects" : scene ? "resources:scenes" : "resources:tasks", "resource.changed", {
|
|
1677
|
+
eventId: payload.sourceEventId,
|
|
1678
|
+
kind: note ? "note" : project ? "project" : scene ? "scene" : "task",
|
|
1679
|
+
id: note ? payload.noteId : project ? payload.projectId : scene ? payload.sceneId : payload.taskId,
|
|
1680
|
+
revision: note || scene ? payload.revision : payload.version,
|
|
1681
|
+
operation: event.type === "task.deleted.v1" || event.type.endsWith(".deleted") ? "deleted" : event.type.endsWith(".created") ? "created" : "updated",
|
|
1682
|
+
...typeof payload.operationId === "string" ? { operationId: payload.operationId } : {}
|
|
1683
|
+
});
|
|
1684
|
+
}
|
|
1631
1685
|
if (event.type.startsWith("task.")) this.emit(event.type, event.payload);
|
|
1632
1686
|
this.automationService.triggerEvent(event).catch((err) => {
|
|
1633
1687
|
const em = err instanceof Error ? err.message : String(err);
|
|
@@ -2,20 +2,21 @@ import { createLogger } from "../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { getSqliteDatabase, init_transaction } from "../storage/sqlite/transaction.js";
|
|
4
4
|
import { hasGatewayScope } from "./security/gateway-scopes.js";
|
|
5
|
+
import { TaskRepository, init_task_repository } from "../tasks/task-repository.js";
|
|
5
6
|
import { getSessionMetadata } from "../storage/sqlite/session-read-repository.js";
|
|
6
7
|
import { init_session_repository } from "../storage/sqlite/session-repository.js";
|
|
7
8
|
import { getSessionConfig } from "../storage/sqlite/config-repository.js";
|
|
9
|
+
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
8
10
|
import { getExecutionEnvironmentForSession } from "../execution-environments/subject.js";
|
|
9
11
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
10
12
|
import { ProjectStore } from "../projects/project-store.js";
|
|
11
13
|
import { runExec } from "../infra/exec.js";
|
|
12
|
-
import { TaskRepository } from "../tasks/task-repository.js";
|
|
13
14
|
import { isSessionSourceBinding } from "../agent/source-context/types.js";
|
|
14
|
-
import { TaskConversationRepository } from "../tasks/task-conversation-repository.js";
|
|
15
15
|
import { realpath, stat } from "node:fs/promises";
|
|
16
16
|
//#region src/gateway/session-context-summary.ts
|
|
17
17
|
init_session_repository();
|
|
18
18
|
init_transaction();
|
|
19
|
+
init_task_repository();
|
|
19
20
|
init_logger();
|
|
20
21
|
const log = createLogger("SessionContextSummary");
|
|
21
22
|
const SOURCE_LIMIT = 20;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path, { relative, resolve } from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fs from "node:fs";
|
|
3
3
|
//#region src/gateway/workspace-editor-path.ts
|
|
4
4
|
/** Resolve a workspace-relative POSIX path safely (no `..`, stays under root). */
|
|
5
5
|
function resolveWorkspaceSafePath(workspaceRoot, rel) {
|
|
@@ -20,7 +20,7 @@ function isPathUnderWorkspace(workspaceRoot, absPath) {
|
|
|
20
20
|
function normalizeComparablePath(input) {
|
|
21
21
|
let resolved = resolve(input);
|
|
22
22
|
try {
|
|
23
|
-
resolved =
|
|
23
|
+
resolved = fs.realpathSync.native(resolved);
|
|
24
24
|
} catch {}
|
|
25
25
|
return process.platform === "win32" ? resolved.toLowerCase() : resolved;
|
|
26
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, shouldSilence, stripHeartbeatToken } from "./tokens.js";
|
|
1
2
|
import { isWithinActiveHours } from "./active-hours.js";
|
|
2
3
|
import { isHeartbeatContentEmpty } from "./content-check.js";
|
|
3
4
|
import { appendCronEventLines } from "./event-prompt.js";
|
|
4
|
-
import { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, shouldSilence, stripHeartbeatToken } from "./tokens.js";
|
|
5
5
|
import { createHeartbeatWake } from "./wake.js";
|
|
6
6
|
export { DEFAULT_ACK_MAX_CHARS, HEARTBEAT_OK, NO_REPLY, appendCronEventLines, createHeartbeatWake, isHeartbeatContentEmpty, isWithinActiveHours, shouldSilence, stripHeartbeatToken };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { formatI18n } from "./format.js";
|
|
2
|
-
import { normalizeServerLocale, serverLocaleOrFallback } from "./locale.js";
|
|
3
1
|
import share_tool_en_default from "./locales/share-tool.en.js";
|
|
4
2
|
import share_tool_zh_default from "./locales/share-tool.zh.js";
|
|
3
|
+
import { formatI18n } from "./format.js";
|
|
4
|
+
import { normalizeServerLocale, serverLocaleOrFallback } from "./locale.js";
|
|
5
5
|
//#region src/i18n/share-tool-bundle.ts
|
|
6
6
|
const byLocale = {
|
|
7
7
|
en: share_tool_en_default,
|