@xopcai/xopc 0.0.383 → 0.0.384
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/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
- package/dist/extensions/feishu/src/outbound/media-load.js +1 -1
- package/dist/extensions/telegram/src/inbound-processor.js +2 -2
- package/dist/extensions/telegram/src/outbound-sender.js +1 -1
- package/dist/extensions/telegram/src/plugin.js +2 -2
- 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/{activity-store-qv0XyrXk.js → activity-store-CB2X4Gmu.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-66HwhyEK.js → agent-avatar-dicebear-BSel9yf8.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DgHMyhuY.js +1 -0
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-CebTVaRM.js → agent-plugin-dialog-BosuN4dO.js} +1 -1
- package/dist/gateway/static/root/assets/agents-B-pw5RKI.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-BGy9IvSr.js → agents-admin-api-BkULgC6Q.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-BKaU6sGT.js → app-management-settings-panel-DuOqKkfH.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-E5WFcCdZ.js → appearance-settings-8JF9rXFr.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CExfOhRj.js → apps-page-Cuclpk0A.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-BvhxzyLJ.js → archive-plugin-De0ND0oA.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CWcNFzvK.js → automations-page-D7NwNy2I.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-CSxW4wX0.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-CD0gYKR2.js → binary-plugins-Do535ZGW.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CBVXeGAt.js → block-editor-Dnb7CH_l.js} +2 -2
- package/dist/gateway/static/root/assets/{browser-automation-inputs-B-Qz_411.js → browser-automation-inputs-B9M1RYTm.js} +1 -1
- package/dist/gateway/static/root/assets/browser-automations-page-GBgDe21o.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-B2FXaO3n.js +3 -0
- package/dist/gateway/static/root/assets/{capabilities-w2GUuF7V.js → capabilities-2Do3eKMM.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-CaL5RDm3.js → capabilities-XFwwUNU3.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-f2-MquJn.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-CIvwbZps.js → capabilities-settings-panel-D9F0mw16.js} +6 -6
- package/dist/gateway/static/root/assets/{capability-header-actions-DKaZAOWW.js → capability-header-actions-DVRxJPQP.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-D82wgP8A.js → channels-CnDm5T1t.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DuqWzcEq.js → chat-terminal-dock-BxSCDbK7.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-BiM0fCvO.js → computer-settings-page-DVAB-kQw.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-o8kuXjVt.js → connector-service-page-D2EeLXei.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-DK9n4hgZ.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-5tzjG3n1.js → date-picker-Cl9KfFj8.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-DLcDUyep.js → dependency-picker-Ei6aX5WM.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D-w8487x.js → desktop-pet-4Evl4RKX.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-D-w7uF8Q.js → desktop-pet-settings-DAD_OWcX.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-BA21epMn.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-B7d2s14w.js → directory-picker-path-field-B_Zb5nNR.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-sntm2YRN.js → extension-debug-page-DtHNy4TE.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-CPbWA4Oy.js → extension-page-8gWSThWP.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-CnDGKMN6.js → extension-provider-nbgU7xBS.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-PAHKn-Az.js → extension-settings-page-CunUbB09.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-BJaSQNiV.js → fallback-models-BSAfzXby.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-config-swr-DIhXgHH-.js → gateway-config-swr-D0tBjSgj.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-BkgWeVUQ.js → gateway-realtime-BnHraJ3O.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-BVriF6Zj.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CN-2229W.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DnXc9GNb.js → gateway-startup-retry-C1DQsIH3.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-Cw_HUlEk.js → highlighted-body-KQOG7T2V-DktBCtHF.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CUJcNW3H.js +2 -0
- package/dist/gateway/static/root/assets/{image-generation-api-4dtNAW64.js → image-generation-api-DodU6GNC.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-DVvyrYUy.js → imports-page-DQm1MNNC.js} +1 -1
- package/dist/gateway/static/root/assets/{index-B-wZyMBY.js → index-BPNL54bv.js} +110 -110
- package/dist/gateway/static/root/assets/{index-BvOYtdnP.css → index-yseLAt9D.css} +1 -1
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DywXmCvO.js → keyboard-shortcuts-settings-DaC5YjuJ.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-dBlBepLG.js → local-app-workbench-page-DwQyyo7a.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-DdEXqsZw.js → local-apps-page-CpZhivpf.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-D-_OuGWH.js → local-session-drafts-D_tYFy7d.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BNDrBt2C.js → locale-store-uRu_DsWm.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-DpSob5Id.js → logs-page-Db43nh1M.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-10Vl7gLU.js → management-settings-DrKejBEZ.js} +1 -1
- package/dist/gateway/static/root/assets/markdown-view-Ct4sKkUf.css +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-pEV4TIPK.js → markdown-view-DHfQAvZQ.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-DU1Ike3m.js → media-plugins-BombFqsX.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-C4VzqE9z.js +1 -0
- package/dist/gateway/static/root/assets/messages-DTqbfje6.js +3 -0
- package/dist/gateway/static/root/assets/{models-hub-cache-Lp4PAH-A.js → models-hub-cache-Ct6X5zmB.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-a8NSwmmW.js +5 -0
- package/dist/gateway/static/root/assets/{notes-api-B_LGV8Lh.js → notes-api-nqN2wKYc.js} +1 -1
- package/dist/gateway/static/root/assets/notes-page-BKRke43F.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-DzkU3HrQ.js → page-context-capture-button-DUaMkmxv.js} +1 -1
- package/dist/gateway/static/root/assets/page-tabs-HLrKIjXH.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-BqF-HHw1.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-Dbs3Xtis.js → product-open-page-GrhtTQIz.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-x-EvUxt7.js → product-preview-content-zdP7gN0y.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-9Vd_AqDW.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-CSahay3I.js → projects-page-DGunhjoM.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-DX5EhiBp.js → registry-api-CYqA7bfl.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-BoRsF3Lx.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-DYeTxrEb.js → runtime-tools-api-zzoxjSuR.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-DbuAW7ky.js → runtime-tools-settings-panel-W0HDm--J.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-DVzrw6Q9.js → scenes-page-CYsFOfVJ.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-Ch-wK0Os.js → schema-form-CBxEbBQq.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-BKIg9cjN.js → send-session-input-BCAF-Ikt.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-Cf3ACMv7.js → session-api-CzVTrG8n.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-Djtcwo3n.js → session-manager-_yy4bxhT.js} +1 -1
- package/dist/gateway/static/root/assets/sessions-page-Dthfx_vc.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-O_0Lk38S.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-D-Uz-C5u.js → settings-page-CFs-WP_2.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-D2-9fXYL.js +1 -0
- package/dist/gateway/static/root/assets/{share-link-dialog-Cke8qSIS.js → share-link-dialog-C47Xgzta.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-CQjfWJVh.js → share-preview-page-nJ2FWAEP.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-CQapohsa.js → shares-api-B0HlMAzi.js} +1 -1
- package/dist/gateway/static/root/assets/shares-settings-DTb88RHD.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-v1XR_zqL.js → skill-api-DJ8UBsxq.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-CPW9mIZH.js → skill-reload-api-CEJx5rPd.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-Cu80KslP.js → skills-page-DjbBOikT.js} +1 -1
- package/dist/gateway/static/root/assets/specialists-4bkS5rZ4.js +1 -0
- package/dist/gateway/static/root/assets/{system-settings-panel-CbIHO53w.js → system-settings-panel-Dt5GkLhM.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-DvRLEt8e.js → task-detail-page-88EShcbs.js} +2 -2
- package/dist/gateway/static/root/assets/{task-expandable-content-CQ9Y17UE.js → task-expandable-content-CF6Bj-Qa.js} +1 -1
- package/dist/gateway/static/root/assets/tasks-DJIeIk9C.js +1 -0
- package/dist/gateway/static/root/assets/{theme-store-BNDzgUPq.js → theme-store-BUfzeDvL.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-DbbQg2I5.js → tracing-settings-page-C2q5B3Kp.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CQXrU_XI.js → tunnel-api-JHttXi63.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-BdLt6u0c.js → usage-page-B3rUa0fW.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-CFn9aZYy.js → use-autosave-DgbCgsao.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-DXCEME1D.js → use-composer-attachments-BFP3k6oC.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-CEB7pfWq.js → use-file-preview-expanded-B1BiTQNS.js} +2 -2
- package/dist/gateway/static/root/assets/user-model-page-Cq1VSsZw.js +2 -0
- package/dist/gateway/static/root/assets/{voice-api-key-field-C9s0iBGA.js → voice-api-key-field-4AIkbm9R.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-BIm_aTqX.js → voice-config-api-Kw1pYlLN.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-overlay-C3KsL1Ap.js → work-discovery-overlay-BAtG_JHv.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CEx_jYPu.js → workflow-run-setup-panel-Cw12NFgx.js} +2 -2
- package/dist/gateway/static/root/assets/{workflows-page-BYGPnFEF.js → workflows-page-kR5ouOuM.js} +3 -3
- package/dist/gateway/static/root/assets/{workspace-api-uZFF1SlQ.js → workspace-api-Xr3wz8T3.js} +2 -2
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-DcPFuTIk.js → xopc-cloud-account-card-BTBVKpSg.js} +1 -1
- package/dist/gateway/static/root/index.html +30 -29
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/index.js +1 -1
- package/dist/packages/gateway-contract/src/task-lifecycle.js +3 -0
- package/dist/packages/gateway-contract/src/tasks.js +41 -10
- package/dist/src/agent/agent-manager.d.ts +6 -0
- package/dist/src/agent/agent-manager.js +18 -15
- package/dist/src/agent/agent-scope.js +2 -2
- package/dist/src/agent/background-review/prompts.js +1 -1
- package/dist/src/agent/background-review/run-background-review.js +10 -10
- package/dist/src/agent/coding/repository-instructions.js +1 -1
- 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 +1 -1
- package/dist/src/agent/context/project-context.js +3 -3
- package/dist/src/agent/data-acquisition/service.js +1 -1
- package/dist/src/agent/embedded/codemode-extension.js +1 -1
- package/dist/src/agent/embedded/index.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +6 -6
- package/dist/src/agent/embedded/run-turn.js +12 -12
- package/dist/src/agent/embedded/session-runner.js +3 -3
- package/dist/src/agent/embedded/session-tool-result-guard.js +2 -2
- package/dist/src/agent/embedded/tool-result-truncation.js +1 -1
- package/dist/src/agent/external-tools/cliProvider.js +3 -3
- package/dist/src/agent/external-tools/composio-provider.js +3 -3
- package/dist/src/agent/external-tools/endpoint-provider.js +4 -4
- package/dist/src/agent/external-tools/gateway-tools.js +2 -2
- package/dist/src/agent/external-tools/index.js +1 -1
- package/dist/src/agent/image/generation/openai-images-provider.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 +2 -2
- package/dist/src/agent/inbound/inbound-loop.js +2 -2
- package/dist/src/agent/index.js +3 -3
- package/dist/src/agent/mcp/config.js +1 -1
- package/dist/src/agent/memory/context-budget.js +1 -1
- package/dist/src/agent/memory/context-recovery.js +1 -1
- package/dist/src/agent/memory/index.js +1 -1
- package/dist/src/agent/orchestration/agent-orchestrator.js +1 -1
- package/dist/src/agent/prompt/response-language.js +1 -1
- package/dist/src/agent/prompt/sections/tooling.js +1 -1
- package/dist/src/agent/prompt/service-prompt-builder.js +3 -3
- 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-streaming.js +5 -5
- package/dist/src/agent/service/webchat-tts.js +2 -2
- package/dist/src/agent/service.d.ts +6 -0
- package/dist/src/agent/service.js +21 -18
- package/dist/src/agent/session/session-config-service.js +2 -2
- package/dist/src/agent/session/session-hydrator.js +1 -1
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/source-context/index.js +2 -2
- package/dist/src/agent/starter-agents.d.ts +1 -0
- package/dist/src/agent/starter-agents.js +12 -0
- package/dist/src/agent/tasks/task-judge-service.js +5 -5
- package/dist/src/agent/tools/create-share-tool.js +3 -3
- package/dist/src/agent/tools/dataBatch.js +1 -1
- package/dist/src/agent/tools/delegate-tool.js +3 -3
- package/dist/src/agent/tools/error-pattern-matcher.js +1 -1
- package/dist/src/agent/tools/exec-command.js +3 -1
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.d.ts +6 -0
- package/dist/src/agent/tools/factory.js +40 -39
- 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/personal-attention-tool.d.ts +2 -0
- package/dist/src/agent/tools/personal-attention-tool.js +52 -18
- package/dist/src/agent/tools/personal-read-tool.js +16 -6
- package/dist/src/agent/tools/personal-request-tool.js +64 -12
- package/dist/src/agent/tools/personal-result-budget.d.ts +2 -0
- package/dist/src/agent/tools/personal-result-budget.js +57 -0
- package/dist/src/agent/tools/personal-task-tool.d.ts +13 -21
- package/dist/src/agent/tools/personal-task-tool.js +234 -24
- 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/send-media.js +2 -2
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/tts-tool.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.js +24 -12
- package/dist/src/agent/transcript/index.js +2 -2
- package/dist/src/agent/transcript/transcript-hygiene.js +2 -2
- package/dist/src/agent/workflow/subagent-runner.js +1 -1
- package/dist/src/agent-config/resolver.js +2 -0
- package/dist/src/agent-config/schema.d.ts +8 -0
- package/dist/src/agent-config/schema.js +2 -0
- package/dist/src/agent-matching/delegation-service.js +1 -1
- package/dist/src/agent-matching/selection-repository.d.ts +1 -0
- package/dist/src/agent-matching/selection-repository.js +1 -1
- package/dist/src/agent-matching/service.js +2 -2
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/capabilities/write.d.ts +4 -0
- package/dist/src/automations/domain/index.js +2 -2
- package/dist/src/automations/domain/validation.d.ts +8 -0
- package/dist/src/automations/draft/automation-draft-service.js +1 -1
- package/dist/src/automations/draft/automation-draft-validator.d.ts +2 -0
- package/dist/src/automations/index.js +4 -4
- package/dist/src/automations/service/automation-service.js +2 -2
- package/dist/src/backup/archive.js +1 -1
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/channels/attachments/voice-stt-webchat.js +2 -2
- package/dist/src/channels/index.js +2 -2
- package/dist/src/channels/outbound-sender.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 +3 -3
- package/dist/src/chat-commands/builtins/review.js +1 -1
- package/dist/src/chat-commands/builtins/session.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 +1 -1
- package/dist/src/chat-commands/context.js +4 -4
- package/dist/src/chat-commands/index.js +3 -3
- package/dist/src/cli/commands/agent.js +8 -8
- 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 +2 -2
- package/dist/src/cli/commands/doctor/checks/channel-plugins.js +1 -1
- package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
- package/dist/src/cli/commands/doctor/checks/gateway-health.js +1 -1
- package/dist/src/cli/commands/doctor/checks/provider-auth.js +1 -1
- package/dist/src/cli/commands/doctor/checks/tool-runtimes.js +1 -1
- package/dist/src/cli/commands/extension-agent-plugin.js +1 -1
- package/dist/src/cli/commands/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +4 -4
- package/dist/src/cli/commands/extension.js +4 -4
- 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.js +1 -1
- package/dist/src/cli/commands/models.js +3 -3
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
- 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 +4 -4
- package/dist/src/cli/extension-cli-register.js +6 -6
- package/dist/src/cli/utils/gateway-client.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/cli/utils/session.js +1 -1
- package/dist/src/computer/runtime.js +2 -2
- package/dist/src/config/agent-model-intents.js +1 -1
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/schema.js +5 -5
- package/dist/src/connectors/cli/authorization.js +1 -1
- package/dist/src/connectors/cli/runtime.js +1 -1
- package/dist/src/connectors/composio-sessions.js +1 -1
- package/dist/src/connectors/composio.js +1 -1
- package/dist/src/connectors/connected-source-ingestion.js +4 -4
- package/dist/src/connectors/connected-source-understanding.js +4 -4
- package/dist/src/connectors/connection-recovery-service.js +6 -6
- package/dist/src/connectors/content-enrichment.js +1 -1
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/connectors/learning-coordinator.js +2 -2
- 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/endpoint-tools/index.js +1 -1
- package/dist/src/endpoint-tools/runtime.js +2 -2
- package/dist/src/extensions/activation-context.js +3 -3
- package/dist/src/extensions/agent-plugins/source-http-fetch.js +1 -1
- package/dist/src/extensions/api.js +4 -4
- package/dist/src/extensions/bundled-extension-activation.js +1 -1
- package/dist/src/extensions/index.js +3 -3
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/loader.js +2 -2
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/sdk/media.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agent-builtin-tools.d.ts +1 -1
- package/dist/src/gateway/agents-admin.js +1 -1
- 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.js +3 -3
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +4 -4
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +4 -4
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +2 -2
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +1 -1
- 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/memory-learning.js +3 -3
- package/dist/src/gateway/hono/routes/models.js +5 -5
- package/dist/src/gateway/hono/routes/notes.js +1 -1
- package/dist/src/gateway/hono/routes/personal-agent.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +4 -4
- package/dist/src/gateway/hono/routes/session-command-handler.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +4 -4
- package/dist/src/gateway/hono/routes/sessions.js +2 -2
- package/dist/src/gateway/hono/routes/shares.js +3 -3
- package/dist/src/gateway/hono/routes/side-chats.js +1 -1
- package/dist/src/gateway/hono/routes/site-shares.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.js +3 -2
- package/dist/src/gateway/hono/routes/user-model.js +7 -7
- package/dist/src/gateway/hono/routes/voice.js +7 -7
- package/dist/src/gateway/hono/routes/workflows.js +2 -2
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/index.js +1 -1
- package/dist/src/gateway/lock.js +11 -11
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/mobile-privacy.js +2 -2
- package/dist/src/gateway/ports.js +6 -6
- package/dist/src/gateway/run-loop.js +1 -1
- package/dist/src/gateway/scenes/mailContext.js +1 -1
- package/dist/src/gateway/scenes/slackThreadSource.js +1 -1
- package/dist/src/gateway/server.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +2 -2
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service/marketplace-service.js +1 -1
- package/dist/src/gateway/service/run-gateway-agent.js +3 -3
- package/dist/src/gateway/service/session-command-service.js +1 -1
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +59 -45
- package/dist/src/gateway/session-context-summary.js +3 -3
- package/dist/src/gateway/workspace-editor-path.js +2 -2
- package/dist/src/home-intelligence/generator.js +2 -2
- package/dist/src/home-intelligence/host.js +2 -2
- package/dist/src/imports/inventory.js +1 -1
- package/dist/src/infra/gateway-processes.js +2 -2
- package/dist/src/infra/path-env.js +3 -3
- package/dist/src/infra/update-global.js +10 -10
- package/dist/src/knowledge/connected-knowledge-pipeline.js +2 -2
- package/dist/src/knowledge/index.js +1 -1
- package/dist/src/knowledge-memory/repository.js +1 -1
- package/dist/src/local-apps/service.js +1 -1
- package/dist/src/mcp/gateway-http-client.js +1 -1
- package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
- package/dist/src/memory-learning/source-learning.js +5 -5
- package/dist/src/memory-learning/task-receipts.js +1 -1
- package/dist/src/notes/agent-context.js +4 -4
- package/dist/src/notes/index.js +1 -1
- package/dist/src/notes/store.js +1 -1
- package/dist/src/personal-agent/capability-service.js +4 -4
- package/dist/src/personal-agent/policy.js +2 -7
- package/dist/src/personal-agent/proactivity/repository.js +1 -1
- package/dist/src/personal-agent/proactivity/routes.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +5 -5
- package/dist/src/personal-agent/prompt-context.d.ts +1 -4
- package/dist/src/personal-agent/prompt-context.js +9 -34
- package/dist/src/personal-agent/prompts.js +31 -10
- package/dist/src/personal-agent/reply-composer.js +4 -4
- package/dist/src/personal-agent/request-delivery.js +1 -1
- package/dist/src/personal-agent/request-repository.d.ts +3 -2
- package/dist/src/personal-agent/request-repository.js +4 -4
- package/dist/src/personal-agent/request-service.d.ts +1 -1
- package/dist/src/personal-agent/request-service.js +100 -32
- package/dist/src/personal-agent/task-cancel.d.ts +7 -0
- package/dist/src/personal-agent/task-cancel.js +76 -0
- package/dist/src/providers/model-reference-auditor.js +1 -1
- package/dist/src/realtime/runtime.js +1 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/scenes/taskFollowUp/agentExecutor.js +4 -4
- package/dist/src/scenes/taskFollowUp/resources.js +1 -1
- package/dist/src/scenes/taskFollowUp/service.js +5 -5
- package/dist/src/session/client-history.js +1 -1
- package/dist/src/session/index.js +1 -1
- package/dist/src/session/store.js +5 -5
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/share/share-store.js +1 -1
- package/dist/src/share/share-thumbnail.js +1 -1
- package/dist/src/share/share-zip.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/249_task_allocations.sql +17 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/relations.d.ts +38 -2
- package/dist/src/tasks/capabilities/write.d.ts +40 -0
- package/dist/src/tasks/capabilities/write.js +7 -6
- package/dist/src/tasks/execution-context.js +1 -1
- package/dist/src/tasks/home-query-service.js +2 -2
- package/dist/src/tasks/index.js +5 -5
- package/dist/src/tasks/task-allocation-repository.d.ts +25 -0
- package/dist/src/tasks/task-allocation-repository.js +82 -0
- package/dist/src/tasks/task-allocation-service.d.ts +39 -0
- package/dist/src/tasks/task-allocation-service.js +310 -0
- package/dist/src/tasks/task-application-service.js +46 -3
- package/dist/src/tasks/task-collaboration-delivery.js +1 -1
- package/dist/src/tasks/task-context-assembler.js +2 -2
- package/dist/src/tasks/task-handoff-service.js +2 -2
- package/dist/src/tasks/task-main-update-decision-service.js +2 -2
- package/dist/src/tasks/task-main-update-delivery.js +2 -0
- package/dist/src/tasks/task-origin-repository.d.ts +2 -1
- package/dist/src/tasks/task-origin-repository.js +9 -5
- package/dist/src/tasks/task-read-model-projector.d.ts +2 -1
- package/dist/src/tasks/task-read-model-projector.js +21 -8
- package/dist/src/tasks/task-result-delivery-repository.js +1 -1
- package/dist/src/tasks/task-result-delivery-service.js +4 -4
- package/dist/src/tasks/task-run-coordinator.js +10 -2
- package/dist/src/tasks/task-run-dispatcher.d.ts +1 -1
- package/dist/src/tasks/task-run-dispatcher.js +5 -4
- package/dist/src/tui/backends/embedded-backend.js +11 -11
- package/dist/src/tui/backends/gateway-realtime-backend.js +2 -2
- package/dist/src/tui/extension-host/load-extensions.js +2 -2
- 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 +2 -2
- package/dist/src/tui/tui-startup-resources.js +5 -5
- package/dist/src/tui/tui.js +7 -7
- package/dist/src/tunnel/frpc-binary.js +1 -1
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/user-context/access-policy.js +1 -1
- package/dist/src/user-model/bootstrap.js +1 -1
- package/dist/src/user-model/capture/executor.js +1 -1
- package/dist/src/user-model/index.js +2 -2
- package/dist/src/voice/realtime/memory-context.js +6 -6
- package/dist/src/voice/realtime/runtime.js +4 -4
- 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/xopc-cloud-transcription.js +1 -1
- package/dist/src/voice/stt/transcribe-core.js +1 -1
- package/dist/src/voice/tts/index.js +3 -3
- package/dist/src/voice/tts/merge-config.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/voice/tts/speak-core.js +1 -1
- package/dist/src/work-discovery/index.js +1 -1
- package/dist/src/work-discovery/service.js +7 -7
- package/dist/src/workflows/engine/workflow-engine.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +8 -8
- package/dist/src/workflows/service/workflow-session-bridge.js +2 -2
- package/package.json +3 -3
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-Bewx00VC.js +0 -1
- package/dist/gateway/static/root/assets/agents-ByJbzt3F.js +0 -77
- package/dist/gateway/static/root/assets/automations-workspace-DOJnSOJ7.js +0 -6
- package/dist/gateway/static/root/assets/browser-automations-page-DGcGOkIq.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-CHCWHtkG.js +0 -3
- package/dist/gateway/static/root/assets/capabilities-page-CVaH729t.js +0 -2
- package/dist/gateway/static/root/assets/connectors-page-BpCGV1Gg.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-CEfqb0dk.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-IK77lcix.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-CnqeYLJI.js +0 -1
- package/dist/gateway/static/root/assets/home-page-CKUJdUkK.js +0 -2
- package/dist/gateway/static/root/assets/markdown-view-CZWff4bI.css +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-Bd0DNN_v.js +0 -1
- package/dist/gateway/static/root/assets/messages-CRy8QVkB.js +0 -3
- package/dist/gateway/static/root/assets/note-detail-panel-DiJ5O3Ga.js +0 -5
- package/dist/gateway/static/root/assets/notes-page-BEhxVwpX.js +0 -8
- package/dist/gateway/static/root/assets/page-tabs-BLGO2VIm.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-Dpgj9Y5a.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-CAM4Q3Kh.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-B6y0lXZc.js +0 -1
- package/dist/gateway/static/root/assets/sessions-page-DY0UP_lC.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-BLTR6Opb.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DWAAlzV5.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DPrpUIj7.js +0 -1
- package/dist/gateway/static/root/assets/tasks-DwKXgZ-I.js +0 -1
- package/dist/gateway/static/root/assets/user-model-page-BgIW4ITJ.js +0 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
2
1
|
import { checkedFilePath, readWorkspaceFileAsync } from "../sandbox/fileAccess.js";
|
|
3
|
-
import { checkFileSafety } from "../prompt/safety.js";
|
|
4
2
|
import { dataScheduler } from "../data-acquisition/scheduler.js";
|
|
3
|
+
import { checkFileSafety } from "../prompt/safety.js";
|
|
5
4
|
import { formatSize, truncateHead } from "./truncate.js";
|
|
5
|
+
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
6
6
|
import { stat } from "fs/promises";
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
8
8
|
//#region src/agent/tools/read.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { prepareSafeToolEnv } from "../sandbox/sanitize-env-vars.js";
|
|
2
1
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
2
|
+
import { prepareSafeToolEnv } from "../sandbox/sanitize-env-vars.js";
|
|
3
3
|
import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
|
|
4
4
|
import { checkedFilePath, readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
5
5
|
import { resolve } from "node:path";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { turnOutcomeKindFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
4
|
-
import { MEDIA_MAX_BYTES } from "../../media/store.js";
|
|
5
3
|
import { readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
6
4
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
5
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
6
|
+
import { MEDIA_MAX_BYTES } from "../../media/store.js";
|
|
7
7
|
import { persistToolMedia } from "./tool-media.js";
|
|
8
8
|
import { basename } from "node:path";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { resolveStateDir } from "../../config/paths-state.js";
|
|
2
2
|
import { init_paths } from "../../config/paths.js";
|
|
3
|
-
import { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "../skills/config.js";
|
|
4
3
|
import { DEFAULT_MAX_BYTES, formatSize, truncateHead } from "./truncate.js";
|
|
4
|
+
import { createSkillConfigManager, isSkillEnabled, resolveSkillConfig } from "../skills/config.js";
|
|
5
5
|
import { resolveSkillReadablePath } from "../skills/skill-view-path.js";
|
|
6
6
|
import { readFileSync, statSync } from "fs";
|
|
7
7
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
+
import { speak } from "../../voice/tts/speak-core.js";
|
|
3
4
|
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
4
5
|
import { getChannelOutputFormat } from "../../voice/tts/service.js";
|
|
5
|
-
import { speak } from "../../voice/tts/speak-core.js";
|
|
6
6
|
import { compressAudio } from "../../voice/tts/audio.js";
|
|
7
7
|
import { persistOutboundTtsAudio } from "../../channels/attachments/outbound-tts-persist.js";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../user-model/repository.js";
|
|
2
2
|
import { canUseAssertion } from "../../user-model/usage-policy.js";
|
|
3
3
|
import "../../user-model/index.js";
|
|
4
|
-
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
5
4
|
import "./local-read-budget.js";
|
|
5
|
+
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
6
6
|
import { Type } from "@sinclair/typebox";
|
|
7
7
|
//#region src/agent/tools/user-context-tool.ts
|
|
8
8
|
const SearchSchema = Type.Object({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
4
|
-
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
5
3
|
import { writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
6
4
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
5
|
+
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
6
|
+
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
7
7
|
import { basename, relative, sep } from "path";
|
|
8
8
|
import { realpath } from "fs/promises";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { runWithActivityContext } from "../../activity/context.js";
|
|
2
2
|
import { init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
3
|
+
import { normalizeSpecialistRequirements } from "../../../packages/gateway-contract/src/specialists.js";
|
|
3
4
|
import { TaskCommandSchema, TaskContextInputSchema } from "../../../packages/gateway-contract/src/tasks.js";
|
|
4
5
|
import { ChatPreviewCreateInputSchema, ChatPreviewReviseInputSchema } from "../../../packages/gateway-contract/src/chat-previews.js";
|
|
5
6
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
@@ -12,22 +13,23 @@ import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
|
12
13
|
import "../../activity/index.js";
|
|
13
14
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
14
15
|
import "../../capabilities/runtime/dispatcher.js";
|
|
16
|
+
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
15
17
|
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
16
|
-
import {
|
|
18
|
+
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
19
|
+
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
17
20
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
18
|
-
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
19
|
-
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
20
|
-
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
21
21
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
22
22
|
import "../../projects/index.js";
|
|
23
|
-
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
24
23
|
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
25
24
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
26
25
|
import { TaskDeleteOutputSchema } from "../../tasks/capabilities/management.js";
|
|
26
|
+
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
27
|
+
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
27
28
|
import { AutomationCreateCapabilityInputSchema, AutomationUpdatePatchSchema } from "../../automations/capabilities/write.js";
|
|
28
29
|
import { TaskMutationOutputSchema } from "../../tasks/capabilities/write.js";
|
|
29
30
|
import { createProductDispatcher } from "../../capabilities/runtime/product.js";
|
|
30
31
|
import { localAppCapabilities } from "../../local-apps/capabilities/runtime.js";
|
|
32
|
+
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
31
33
|
import "../../tasks/index.js";
|
|
32
34
|
import { randomUUID } from "node:crypto";
|
|
33
35
|
import { Type } from "@sinclair/typebox";
|
|
@@ -76,6 +78,7 @@ const TASK_PRIORITIES = new Set([
|
|
|
76
78
|
"critical"
|
|
77
79
|
]);
|
|
78
80
|
const TASK_COMMANDS = new Set([
|
|
81
|
+
"retry_allocation",
|
|
79
82
|
"mark_ready",
|
|
80
83
|
"start",
|
|
81
84
|
"request_review",
|
|
@@ -85,7 +88,11 @@ const TASK_COMMANDS = new Set([
|
|
|
85
88
|
"resolve_wait",
|
|
86
89
|
"revise_contract"
|
|
87
90
|
]);
|
|
88
|
-
const TASK_CREATE_MODES = new Set([
|
|
91
|
+
const TASK_CREATE_MODES = new Set([
|
|
92
|
+
"capture",
|
|
93
|
+
"start",
|
|
94
|
+
"allocate"
|
|
95
|
+
]);
|
|
89
96
|
function okText(details) {
|
|
90
97
|
return {
|
|
91
98
|
content: [{
|
|
@@ -1202,7 +1209,7 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1202
1209
|
};
|
|
1203
1210
|
return {
|
|
1204
1211
|
ok: true,
|
|
1205
|
-
...new TaskOriginRepository().list(conversationId, finiteNumber(args.limit) ?? 20)
|
|
1212
|
+
...new TaskOriginRepository().list(conversationId, finiteNumber(args.limit) ?? 20, { offset: finiteNumber(args.offset) ?? 0 })
|
|
1206
1213
|
};
|
|
1207
1214
|
}
|
|
1208
1215
|
if (command === "collaboration" || command === "collaboration_post") {
|
|
@@ -1379,7 +1386,7 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1379
1386
|
ok: false,
|
|
1380
1387
|
error: "Invalid createMode"
|
|
1381
1388
|
};
|
|
1382
|
-
if (createMode
|
|
1389
|
+
if (createMode !== "capture" && !deps.dispatchTaskRuns) return {
|
|
1383
1390
|
ok: false,
|
|
1384
1391
|
error: "Task execution service is unavailable"
|
|
1385
1392
|
};
|
|
@@ -1472,7 +1479,7 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1472
1479
|
priority: priority ?? "normal",
|
|
1473
1480
|
...dueAt === void 0 ? {} : { dueAt },
|
|
1474
1481
|
...projectId ? { projectId } : {},
|
|
1475
|
-
delegateAgentId: agentId,
|
|
1482
|
+
...createMode !== "allocate" ? { delegateAgentId: agentId } : {},
|
|
1476
1483
|
...originConversationId ? { originConversationId } : {},
|
|
1477
1484
|
locale: taskLocale,
|
|
1478
1485
|
contract: {
|
|
@@ -1490,7 +1497,10 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1490
1497
|
metadata: {}
|
|
1491
1498
|
}] : [],
|
|
1492
1499
|
authorityGrants: [],
|
|
1493
|
-
activation: createMode === "
|
|
1500
|
+
activation: createMode === "allocate" ? {
|
|
1501
|
+
mode: "allocate",
|
|
1502
|
+
requirements: normalizeSpecialistRequirements(args.requirements)
|
|
1503
|
+
} : createMode === "capture" ? {
|
|
1494
1504
|
mode: "capture",
|
|
1495
1505
|
phase: "backlog"
|
|
1496
1506
|
} : {
|
|
@@ -1530,11 +1540,13 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1530
1540
|
error: created.reason,
|
|
1531
1541
|
...created
|
|
1532
1542
|
};
|
|
1543
|
+
const currentModel = createMode === "allocate" ? new TaskReadModelProjector().get(created.model.task.id) ?? created.model : created.model;
|
|
1533
1544
|
return {
|
|
1534
1545
|
ok: true,
|
|
1535
|
-
task:
|
|
1536
|
-
operationalState:
|
|
1546
|
+
task: currentModel.task,
|
|
1547
|
+
operationalState: currentModel.operationalState,
|
|
1537
1548
|
createMode,
|
|
1549
|
+
allocation: currentModel.allocation,
|
|
1538
1550
|
...created.runId ? { runId: created.runId } : {}
|
|
1539
1551
|
};
|
|
1540
1552
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { extractToolCallsFromAssistant, extractToolResultId, sanitizeToolCallId, sanitizeToolCallIdsForCloudCodeAssist } from "./tool-call-id.js";
|
|
2
|
-
import { makeMissingToolResult, repairToolUseResultPairing, sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolResultDetails } from "./session-transcript-repair.js";
|
|
3
1
|
import { resolveTranscriptPolicy } from "./transcript-policy.js";
|
|
4
2
|
import { dropThinkingBlocks } from "./thinking.js";
|
|
3
|
+
import { extractToolCallsFromAssistant, extractToolResultId, sanitizeToolCallId, sanitizeToolCallIdsForCloudCodeAssist } from "./tool-call-id.js";
|
|
4
|
+
import { makeMissingToolResult, repairToolUseResultPairing, sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolResultDetails } from "./session-transcript-repair.js";
|
|
5
5
|
import { applySessionTranscriptHygiene, applySessionTranscriptHygieneForPersistence, applySessionTranscriptHygieneWithPolicy, resolvePolicyForModel, tryApplySessionTranscriptHygiene, tryApplySessionTranscriptHygieneForPersistence } from "./transcript-hygiene.js";
|
|
6
6
|
import { stripToolMessages } from "./strip-tool-messages.js";
|
|
7
7
|
export { applySessionTranscriptHygiene, applySessionTranscriptHygieneForPersistence, applySessionTranscriptHygieneWithPolicy, dropThinkingBlocks, extractToolCallsFromAssistant, extractToolResultId, makeMissingToolResult, repairToolUseResultPairing, resolvePolicyForModel, resolveTranscriptPolicy, sanitizeToolCallId, sanitizeToolCallIdsForCloudCodeAssist, sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolMessages, stripToolResultDetails, tryApplySessionTranscriptHygiene, tryApplySessionTranscriptHygieneForPersistence };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { sanitizeToolCallIdsForCloudCodeAssist } from "./tool-call-id.js";
|
|
4
|
-
import { sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolResultDetails } from "./session-transcript-repair.js";
|
|
5
3
|
import { resolveTranscriptPolicy } from "./transcript-policy.js";
|
|
6
4
|
import { dropThinkingBlocks } from "./thinking.js";
|
|
5
|
+
import { sanitizeToolCallIdsForCloudCodeAssist } from "./tool-call-id.js";
|
|
6
|
+
import { sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolResultDetails } from "./session-transcript-repair.js";
|
|
7
7
|
//#region src/agent/transcript/transcript-hygiene.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
const log = createLogger("transcript-hygiene");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { createSqliteTranscriptRuntime } from "../embedded/transcript-runtime.js";
|
|
4
|
-
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputTool } from "./structured-output-tool.js";
|
|
5
4
|
import { createDelegateChildHandle } from "../child-agent-factory.js";
|
|
6
5
|
import { DELEGATION_TOOL_CAPABILITIES, protectDelegatedTool, resolveDelegationTools } from "../tools/delegation-policy.js";
|
|
7
6
|
import { DELEGATE_BLOCKED_TOOLS } from "../tools/delegate-tool.js";
|
|
8
7
|
import { createDelegationParentPolicy } from "../tools/delegation-parent-policy.js";
|
|
8
|
+
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputTool } from "./structured-output-tool.js";
|
|
9
9
|
//#region src/agent/workflow/subagent-runner.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
const log = createLogger("Agent:WorkflowSubagent");
|
|
@@ -94,6 +94,7 @@ function resolveEffectiveAgentConfig(params) {
|
|
|
94
94
|
if (agent.runtime) markObjectSources(agent.runtime, "agent", "runtime", sources);
|
|
95
95
|
const workspace = agent.workspace ?? params.defaultWorkspace?.(agent.id) ?? `~/.xopc/workspace/${agent.id}`;
|
|
96
96
|
sources.workspace = agent.workspace ? "agent" : "system";
|
|
97
|
+
if (agent.purpose) sources.purpose = "agent";
|
|
97
98
|
if (agent.profile) markObjectSources(agent.profile, "agent", "profile", sources);
|
|
98
99
|
if (agent.specialistProfile) markObjectSources(agent.specialistProfile, "agent", "specialistProfile", sources);
|
|
99
100
|
if (agent.toolAllowlist) sources.toolAllowlist = "agent";
|
|
@@ -103,6 +104,7 @@ function resolveEffectiveAgentConfig(params) {
|
|
|
103
104
|
enabled: agent.enabled,
|
|
104
105
|
workspace,
|
|
105
106
|
...agent.profile ? { profile: structuredClone(agent.profile) } : {},
|
|
107
|
+
...agent.purpose ? { purpose: agent.purpose } : {},
|
|
106
108
|
...agent.specialistProfile ? { specialistProfile: structuredClone(agent.specialistProfile) } : {},
|
|
107
109
|
models,
|
|
108
110
|
skills,
|
|
@@ -402,6 +402,10 @@ export declare const AgentEntrySchema: z.ZodObject<{
|
|
|
402
402
|
}, z.core.$strict>>;
|
|
403
403
|
instructions: z.ZodOptional<z.ZodString>;
|
|
404
404
|
}, z.core.$strict>>;
|
|
405
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
406
|
+
specialist: "specialist";
|
|
407
|
+
task_dispatcher: "task_dispatcher";
|
|
408
|
+
}>>;
|
|
405
409
|
specialistProfile: z.ZodOptional<z.ZodObject<{
|
|
406
410
|
version: z.ZodLiteral<1>;
|
|
407
411
|
domains: z.ZodArray<z.ZodString>;
|
|
@@ -564,6 +568,10 @@ export declare const EffectiveAgentConfigSchema: z.ZodObject<{
|
|
|
564
568
|
}, z.core.$strict>>;
|
|
565
569
|
instructions: z.ZodOptional<z.ZodString>;
|
|
566
570
|
}, z.core.$strict>>;
|
|
571
|
+
purpose: z.ZodOptional<z.ZodEnum<{
|
|
572
|
+
specialist: "specialist";
|
|
573
|
+
task_dispatcher: "task_dispatcher";
|
|
574
|
+
}>>;
|
|
567
575
|
specialistProfile: z.ZodOptional<z.ZodObject<{
|
|
568
576
|
version: z.ZodLiteral<1>;
|
|
569
577
|
domains: z.ZodArray<z.ZodString>;
|
|
@@ -184,6 +184,7 @@ var init_schema = __esmMin((() => {
|
|
|
184
184
|
enabled: z.boolean().default(true),
|
|
185
185
|
workspace: z.string().trim().min(1).optional(),
|
|
186
186
|
profile: AgentProfileSchema.optional(),
|
|
187
|
+
purpose: z.enum(["specialist", "task_dispatcher"]).optional(),
|
|
187
188
|
specialistProfile: SpecialistProfileSchema.optional(),
|
|
188
189
|
models: AgentModelsOverrideSchema.optional(),
|
|
189
190
|
skills: SkillOverrideSchema.optional(),
|
|
@@ -197,6 +198,7 @@ var init_schema = __esmMin((() => {
|
|
|
197
198
|
enabled: z.boolean(),
|
|
198
199
|
workspace: z.string().min(1),
|
|
199
200
|
profile: AgentProfileSchema.optional(),
|
|
201
|
+
purpose: z.enum(["specialist", "task_dispatcher"]).optional(),
|
|
200
202
|
specialistProfile: SpecialistProfileSchema.optional(),
|
|
201
203
|
models: AgentModelsDefaultsSchema,
|
|
202
204
|
skills: SkillDefaultsSchema,
|
|
@@ -4,8 +4,8 @@ import { afterSqliteCommit, init_transaction, runSqliteWriteTransaction } from "
|
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
|
|
5
5
|
import { TaskReadModelProjector } from "../tasks/task-read-model-projector.js";
|
|
6
6
|
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
7
|
-
import { AgentSelectionRepository, selectionRequestHash } from "./selection-repository.js";
|
|
8
7
|
import { assessSpecialist } from "./service.js";
|
|
8
|
+
import { AgentSelectionRepository, selectionRequestHash } from "./selection-repository.js";
|
|
9
9
|
//#region src/agent-matching/delegation-service.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
init_transaction();
|
|
@@ -53,7 +53,7 @@ var AgentSelectionRepository = class {
|
|
|
53
53
|
args.push(filter.requestId);
|
|
54
54
|
}
|
|
55
55
|
return getSqliteDatabase().prepare(`SELECT * FROM agent_selection_records WHERE ${clauses.join(" AND ")}
|
|
56
|
-
ORDER BY created_at DESC, id DESC LIMIT
|
|
56
|
+
ORDER BY created_at DESC, id DESC LIMIT ? OFFSET ?`).all(...args, Math.min(100, Math.max(1, filter.limit ?? 20)), Math.max(0, filter.offset ?? 0)).map(decode);
|
|
57
57
|
}
|
|
58
58
|
create(input) {
|
|
59
59
|
const existing = this.find(input.conversationId, input.key);
|
|
@@ -18,7 +18,7 @@ function assessSpecialist(agentId, input, context) {
|
|
|
18
18
|
reasonCode,
|
|
19
19
|
...detail ? { detail } : {}
|
|
20
20
|
});
|
|
21
|
-
const identityValid = agent && agent.enabled !== false && agent.provisioningState === "ready" && agent.id !== context.ownAgentId && !agent.id.startsWith("personal-");
|
|
21
|
+
const identityValid = agent && agent.enabled !== false && agent.provisioningState === "ready" && agent.purpose !== "task_dispatcher" && agent.id !== context.ownAgentId && !agent.id.startsWith("personal-");
|
|
22
22
|
add("identity", identityValid ? "verified" : "blocked", identityValid ? "agent_ready" : "agent_unavailable");
|
|
23
23
|
if (requirements.requestedAgentId && requirements.requestedAgentId !== agentId) add("requestedAgent", "blocked", "requested_agent_mismatch");
|
|
24
24
|
const entry = agent ? (({ revision: _revision, provisioningState: _state, provisioningError: _error, createdAt: _created, updatedAt: _updated, deletedAt: _deleted, ...value }) => value)(agent) : void 0;
|
|
@@ -149,7 +149,7 @@ function matchSpecialists(input, context, options = {}) {
|
|
|
149
149
|
offset = Number(match[2]);
|
|
150
150
|
if (!Number.isSafeInteger(offset)) throw new Error("Invalid matching cursor");
|
|
151
151
|
}
|
|
152
|
-
const ids = requirements.requestedAgentId ? [requirements.requestedAgentId] : repository.list().filter((agent) => agent.id !== context.ownAgentId && !agent.id.startsWith("personal-")).map((agent) => agent.id);
|
|
152
|
+
const ids = requirements.requestedAgentId ? [requirements.requestedAgentId] : repository.list().filter((agent) => agent.purpose !== "task_dispatcher" && agent.id !== context.ownAgentId && !agent.id.startsWith("personal-")).map((agent) => agent.id);
|
|
153
153
|
const order = {
|
|
154
154
|
eligible: 0,
|
|
155
155
|
needs_verification: 1,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
4
|
-
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
5
4
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
6
5
|
import { trackAiUsageStream } from "../usage/recorder.js";
|
|
7
6
|
import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
|
|
7
|
+
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
8
8
|
import { normalizeContext } from "@earendil-works/pi-ai";
|
|
9
9
|
//#region src/ai-assist/text-assist.ts
|
|
10
10
|
init_providers();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
2
3
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
3
4
|
import { assertCurrentModelProvider, init_provider_policy } from "../providers/provider-policy.js";
|
|
4
5
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
5
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
//#region src/auth/sync-provider-auth.ts
|
|
8
8
|
/**
|
|
@@ -38,6 +38,8 @@ export declare const AutomationCreateCapabilityInputSchema: z.ZodObject<{
|
|
|
38
38
|
kind: z.ZodLiteral<"task_command">;
|
|
39
39
|
taskId: z.ZodString;
|
|
40
40
|
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"retry_allocation">;
|
|
42
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
43
|
type: z.ZodLiteral<"move">;
|
|
42
44
|
phase: z.ZodEnum<{
|
|
43
45
|
backlog: "backlog";
|
|
@@ -239,6 +241,8 @@ export declare const AutomationUpdatePatchSchema: z.ZodObject<{
|
|
|
239
241
|
kind: z.ZodLiteral<"task_command">;
|
|
240
242
|
taskId: z.ZodString;
|
|
241
243
|
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
244
|
+
type: z.ZodLiteral<"retry_allocation">;
|
|
245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
242
246
|
type: z.ZodLiteral<"move">;
|
|
243
247
|
phase: z.ZodEnum<{
|
|
244
248
|
backlog: "backlog";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./defaults.js";
|
|
2
|
-
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./schedule.js";
|
|
3
1
|
import { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "./validation.js";
|
|
2
|
+
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./schedule.js";
|
|
3
|
+
import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./defaults.js";
|
|
4
4
|
export { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, UpdateAutomationSchema, computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds, timerDelayUntil };
|
|
@@ -68,6 +68,8 @@ export declare const AutomationActionSchema: z.ZodDiscriminatedUnion<[z.ZodObjec
|
|
|
68
68
|
kind: z.ZodLiteral<"task_command">;
|
|
69
69
|
taskId: z.ZodString;
|
|
70
70
|
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
71
|
+
type: z.ZodLiteral<"retry_allocation">;
|
|
72
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
73
|
type: z.ZodLiteral<"move">;
|
|
72
74
|
phase: z.ZodEnum<{
|
|
73
75
|
backlog: "backlog";
|
|
@@ -289,6 +291,8 @@ export declare const AutomationSchema: z.ZodObject<{
|
|
|
289
291
|
kind: z.ZodLiteral<"task_command">;
|
|
290
292
|
taskId: z.ZodString;
|
|
291
293
|
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
294
|
+
type: z.ZodLiteral<"retry_allocation">;
|
|
295
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
292
296
|
type: z.ZodLiteral<"move">;
|
|
293
297
|
phase: z.ZodEnum<{
|
|
294
298
|
backlog: "backlog";
|
|
@@ -489,6 +493,8 @@ export declare const CreateAutomationSchema: z.ZodObject<{
|
|
|
489
493
|
kind: z.ZodLiteral<"task_command">;
|
|
490
494
|
taskId: z.ZodString;
|
|
491
495
|
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
496
|
+
type: z.ZodLiteral<"retry_allocation">;
|
|
497
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
492
498
|
type: z.ZodLiteral<"move">;
|
|
493
499
|
phase: z.ZodEnum<{
|
|
494
500
|
backlog: "backlog";
|
|
@@ -716,6 +722,8 @@ export declare const UpdateAutomationSchema: z.ZodObject<{
|
|
|
716
722
|
kind: z.ZodLiteral<"task_command">;
|
|
717
723
|
taskId: z.ZodString;
|
|
718
724
|
command: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
725
|
+
type: z.ZodLiteral<"retry_allocation">;
|
|
726
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
719
727
|
type: z.ZodLiteral<"move">;
|
|
720
728
|
phase: z.ZodEnum<{
|
|
721
729
|
backlog: "backlog";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
|
+
import { resolveModelSelector } from "../../config/agent-model-intents.js";
|
|
4
5
|
import { getDefaultModelSync, init_providers, resolveModel } from "../../providers/index.js";
|
|
5
6
|
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
6
|
-
import { resolveModelSelector } from "../../config/agent-model-intents.js";
|
|
7
7
|
import { buildAutomationDraftPrompt, buildAutomationDraftRepairPrompt, buildAutomationRunRepairPrompt, buildAutomationRunRepairRetryPrompt } from "./automation-draft-prompt.js";
|
|
8
8
|
import { buildAutomationDraftResponse, parseGeneratedAutomationDraft, parseGeneratedAutomationRepairDraft } from "./automation-draft-validator.js";
|
|
9
9
|
//#region src/automations/draft/automation-draft-service.ts
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./domain/defaults.js";
|
|
2
|
-
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./domain/schedule.js";
|
|
3
1
|
import { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "./domain/validation.js";
|
|
4
|
-
import "./domain/index.js";
|
|
5
|
-
import { AutomationActionExecutor } from "./service/action-executor.js";
|
|
6
2
|
import { listBusinessEventDefinitions, registerBusinessEvent, validateCatalogedBusinessEvent } from "./events/event-catalog.js";
|
|
7
3
|
import { automationEventPublisher, claimAutomationEventDeliveries, claimAutomationEventsForProjection, completeAutomationEventDelivery, completeAutomationEventProjection, deferAutomationEventDelivery, expireAutomationEventProjectionLeases, failAutomationEventProjection, getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, ingestAutomationEvent, listAutomationEventRecords, listAutomationEvents, markAutomationEventDeliveryQueued, reconcileAutomationEventDeliveries, releaseAutomationEventDelivery, releaseAutomationEventProjection, replayAutomationEvent, skipAutomationEventDelivery } from "./events/event-repository.js";
|
|
4
|
+
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./domain/schedule.js";
|
|
5
|
+
import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./domain/defaults.js";
|
|
6
|
+
import { AutomationActionExecutor } from "./service/action-executor.js";
|
|
8
7
|
import { AutomationEventDispatcher } from "./events/event-dispatcher.js";
|
|
9
8
|
import "./events/index.js";
|
|
10
9
|
import { resolveAutomationWebhookSecret } from "./webhook-secrets.js";
|
|
11
10
|
import { AutomationDeliveryRouter, getAutomationResultDeliveryMetrics, listAutomationResultDeliveries, retryAutomationResultDelivery } from "./delivery/delivery-router.js";
|
|
12
11
|
import "./delivery/index.js";
|
|
13
12
|
import { AutomationAlreadyExistsError, AutomationAlreadyRunningError, AutomationService } from "./service/automation-service.js";
|
|
13
|
+
import "./domain/index.js";
|
|
14
14
|
import "./service/index.js";
|
|
15
15
|
export { AutomationActionExecutor, AutomationActionSchema, AutomationAlreadyExistsError, AutomationAlreadyRunningError, AutomationDeliveryPolicySchema, AutomationDeliveryRouter, AutomationEventDispatcher, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationService, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, UpdateAutomationSchema, automationEventPublisher, claimAutomationEventDeliveries, claimAutomationEventsForProjection, completeAutomationEventDelivery, completeAutomationEventProjection, computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, defaultAutomationTimeoutSeconds, deferAutomationEventDelivery, expireAutomationEventProjectionLeases, failAutomationEventProjection, getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, getAutomationResultDeliveryMetrics, ingestAutomationEvent, listAutomationEventRecords, listAutomationEvents, listAutomationResultDeliveries, listBusinessEventDefinitions, markAutomationEventDeliveryQueued, reconcileAutomationEventDeliveries, registerBusinessEvent, releaseAutomationEventDelivery, releaseAutomationEventProjection, replayAutomationEvent, resolveAutomationTimeoutSeconds, resolveAutomationWebhookSecret, retryAutomationResultDelivery, skipAutomationEventDelivery, timerDelayUntil, validateCatalogedBusinessEvent };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
4
|
-
import { computeNextAutomationRunAtMs, timerDelayUntil } from "../domain/schedule.js";
|
|
5
4
|
import { AutomationSchema, CreateAutomationSchema, UpdateAutomationSchema } from "../domain/validation.js";
|
|
6
|
-
import { AutomationActionExecutor } from "./action-executor.js";
|
|
7
5
|
import { deleteAutomation, getAutomation, getDeletedAutomationRevision, listAutomations, saveAutomation, saveAutomations } from "../storage/automation-repository.js";
|
|
8
6
|
import { appendAutomationRunEvent, getAutomationRun, getAutomationRunRequest, listAutomationRunEvents, listAutomationRuns, listAutomationRunsForProductEvent, listUnfinishedAutomationRuns, markAllAutomationRunsRead, markAutomationRunRead, pruneAutomationHistory, saveAutomationRun, saveAutomationRunRequest, touchAutomationRunLease } from "../storage/automation-run-repository.js";
|
|
9
7
|
import "../storage/index.js";
|
|
10
8
|
import { getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, ingestAutomationEvent, listAutomationEventRecords, markAutomationEventDeliveryQueued, replayAutomationEvent } from "../events/event-repository.js";
|
|
9
|
+
import { computeNextAutomationRunAtMs, timerDelayUntil } from "../domain/schedule.js";
|
|
10
|
+
import { AutomationActionExecutor } from "./action-executor.js";
|
|
11
11
|
import { AutomationEventDispatcher } from "../events/event-dispatcher.js";
|
|
12
12
|
import { AutomationDeliveryRouter, getAutomationResultDeliveryMetrics, listAutomationResultDeliveries, retryAutomationResultDelivery } from "../delivery/delivery-router.js";
|
|
13
13
|
import "../delivery/index.js";
|
|
@@ -6,8 +6,8 @@ import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "nod
|
|
|
6
6
|
import { constants, createReadStream, createWriteStream } from "node:fs";
|
|
7
7
|
import { createCipheriv, createDecipheriv, createHash, randomBytes, randomUUID, scryptSync } from "node:crypto";
|
|
8
8
|
import { chmod, lstat, mkdir, mkdtemp, open, readFile, readdir, rename, rm, writeFile } from "node:fs/promises";
|
|
9
|
-
import { Transform } from "node:stream";
|
|
10
9
|
import { pipeline } from "node:stream/promises";
|
|
10
|
+
import { Transform } from "node:stream";
|
|
11
11
|
//#region src/backup/archive.ts
|
|
12
12
|
init_node_sqlite();
|
|
13
13
|
init_conversation_backup();
|
|
@@ -3,9 +3,9 @@ import { browserPairingInvitationPayloadSchema, formatBrowserPairingInvitation }
|
|
|
3
3
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
4
|
import { getGatewayIdentityPublicKeyRaw, getOrCreateGatewayIdentity, init_gateway_identity_repository } from "../storage/sqlite/gateway-identity-repository.js";
|
|
5
5
|
import { createDevicePairingSetup, init_device_pairing_repository } from "../storage/sqlite/device-pairing-repository.js";
|
|
6
|
+
import { loadConfig } from "../config/loader.js";
|
|
6
7
|
import { browserEnrollmentPublicKeyThumbprint } from "./enrollment.js";
|
|
7
8
|
import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "./extension-identity.js";
|
|
8
|
-
import { loadConfig } from "../config/loader.js";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
//#region src/browser/native-messaging-host.ts
|
|
11
11
|
init_src();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import {
|
|
3
|
+
import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
|
|
4
4
|
import { transcribe } from "../../voice/stt/transcribe-core.js";
|
|
5
|
+
import { isSTTAvailable } from "../../voice/stt/availability.js";
|
|
5
6
|
import "../../voice/stt/index.js";
|
|
6
|
-
import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
|
|
7
7
|
//#region src/channels/attachments/voice-stt-webchat.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
const STT_MAX_BYTES = 25 * 1024 * 1024;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { parseFrontmatterBlock } from "../markdown/frontmatter.js";
|
|
2
|
+
import { getChannelPlugin, getChannelRegistryVersion, listChannelPlugins, syncChannelPluginsFromManager } from "./plugins/registry.js";
|
|
2
3
|
import { findFenceSpanAt, isSafeFenceBreak, parseFenceSpans } from "../markdown/fences.js";
|
|
3
4
|
import { chunkText } from "../markdown/chunk.js";
|
|
4
5
|
import { chunkMarkdownIR, markdownToIR, markdownToIRWithMeta } from "../markdown/ir.js";
|
|
6
|
+
import { compileAllowlist, evaluateAccess, hasBotMention, removeBotMention, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy } from "./security.js";
|
|
5
7
|
import { renderMarkdownWithMarkers } from "../markdown/render.js";
|
|
6
8
|
import { convertMarkdownTables } from "../markdown/tables.js";
|
|
7
9
|
import { buildCodeSpanIndex, createInlineCodeState } from "../markdown/code-spans.js";
|
|
8
10
|
import "./format.js";
|
|
9
|
-
import { compileAllowlist, evaluateAccess, hasBotMention, removeBotMention, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy } from "./security.js";
|
|
10
11
|
import { MessagePipeline, createEnvelopeTimestampHandler, createFilterCommandsHandler, createFilterEmptyHandler, createFilterSelfHandler, createPipeline, standardPreflightHandlers, standardProcessHandlers } from "./pipeline.js";
|
|
11
|
-
import { getChannelPlugin, getChannelRegistryVersion, listChannelPlugins, syncChannelPluginsFromManager } from "./plugins/registry.js";
|
|
12
12
|
import { ChannelManager, createChannelManager } from "./manager.js";
|
|
13
13
|
import { collectSetupWizardChannels } from "./setup-wizard-discovery.js";
|
|
14
14
|
export { ChannelManager, MessagePipeline, buildCodeSpanIndex, chunkMarkdownIR, chunkText, collectSetupWizardChannels, compileAllowlist, convertMarkdownTables, createChannelManager, createEnvelopeTimestampHandler, createFilterCommandsHandler, createFilterEmptyHandler, createFilterSelfHandler, createInlineCodeState, createPipeline, evaluateAccess, findFenceSpanAt, getChannelPlugin, getChannelRegistryVersion, hasBotMention, isSafeFenceBreak, listChannelPlugins, markdownToIR, markdownToIRWithMeta, parseFenceSpans, parseFrontmatterBlock, removeBotMention, renderMarkdownWithMarkers, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy, standardPreflightHandlers, standardProcessHandlers, syncChannelPluginsFromManager };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
-
import "./internal-outbound.js";
|
|
4
3
|
import { mergeTtsConfigFromAppConfig } from "../voice/tts/merge-config.js";
|
|
5
4
|
import { maybeApplyTtsToPayload } from "../voice/tts/payload.js";
|
|
5
|
+
import "./internal-outbound.js";
|
|
6
6
|
import { deliverOutboundMessage } from "./outbound/deliver.js";
|
|
7
7
|
import { OutboundPersistStore } from "./outbound/persist-store.js";
|
|
8
8
|
//#region src/channels/outbound-sender.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fs from "node:fs";
|
|
3
3
|
//#region src/channels/pairing/allow-from-file.ts
|
|
4
4
|
function readAllowFromFile(filePath) {
|
|
5
5
|
try {
|
|
6
|
-
if (!
|
|
6
|
+
if (!fs.existsSync(filePath)) return {
|
|
7
7
|
version: 1,
|
|
8
8
|
allowFrom: []
|
|
9
9
|
};
|
|
10
|
-
const raw =
|
|
10
|
+
const raw = fs.readFileSync(filePath, "utf-8");
|
|
11
11
|
const parsed = JSON.parse(raw);
|
|
12
12
|
if (Array.isArray(parsed.allowFrom)) return {
|
|
13
13
|
version: 1,
|
|
@@ -26,13 +26,13 @@ function appendAllowFromIdSync(filePath, userId) {
|
|
|
26
26
|
const trimmed = userId.trim();
|
|
27
27
|
if (!trimmed) return { changed: false };
|
|
28
28
|
const dir = path.dirname(filePath);
|
|
29
|
-
|
|
29
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
30
30
|
const content = readAllowFromFile(filePath);
|
|
31
31
|
if (content.allowFrom.includes(trimmed)) return { changed: false };
|
|
32
32
|
content.allowFrom.push(trimmed);
|
|
33
|
-
|
|
33
|
+
fs.writeFileSync(filePath, JSON.stringify(content, null, 2), "utf-8");
|
|
34
34
|
try {
|
|
35
|
-
|
|
35
|
+
fs.chmodSync(filePath, 384);
|
|
36
36
|
} catch {}
|
|
37
37
|
return { changed: true };
|
|
38
38
|
}
|
|
@@ -43,13 +43,13 @@ function removeAllowFromIdSync(filePath, userId) {
|
|
|
43
43
|
const next = content.allowFrom.filter((id) => id !== trimmed);
|
|
44
44
|
if (next.length === content.allowFrom.length) return { changed: false };
|
|
45
45
|
const dir = path.dirname(filePath);
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
47
|
+
fs.writeFileSync(filePath, JSON.stringify({
|
|
48
48
|
version: 1,
|
|
49
49
|
allowFrom: next
|
|
50
50
|
}, null, 2), "utf-8");
|
|
51
51
|
try {
|
|
52
|
-
|
|
52
|
+
fs.chmodSync(filePath, 384);
|
|
53
53
|
} catch {}
|
|
54
54
|
return { changed: true };
|
|
55
55
|
}
|