@xopcai/xopc 0.0.383 → 0.0.385
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-Cb9eaXxR.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DEV-xtgm.js +1 -0
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-CebTVaRM.js → agent-plugin-dialog-DXKc3Luj.js} +1 -1
- package/dist/gateway/static/root/assets/agents-DcNxwpJQ.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-X5i0Tz7_.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-E5WFcCdZ.js → appearance-settings-CmHHzquT.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-CExfOhRj.js → apps-page-ChFA4Zp0.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-BFqsIqOI.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-Blfak-fT.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-CpOLG3Co.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-BSbTJ9j2.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-BUlILJrB.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-CeRdkwRf.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-CIvwbZps.js → capabilities-settings-panel-S-cKsGja.js} +6 -6
- package/dist/gateway/static/root/assets/{capability-header-actions-DKaZAOWW.js → capability-header-actions-6w8pQhnn.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-D82wgP8A.js → channels-DfNTGBmp.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-DuqWzcEq.js → chat-terminal-dock-DnoQHpDc.js} +2 -2
- package/dist/gateway/static/root/assets/{computer-settings-page-BiM0fCvO.js → computer-settings-page-7yliE7sG.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-o8kuXjVt.js → connector-service-page-DOLAUFSW.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-DAsn97XG.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-5tzjG3n1.js → date-picker-DNDqr4Fk.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-DLcDUyep.js → dependency-picker-B5oG7RgE.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-D-w8487x.js → desktop-pet-K7kUCX1O.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-D-w7uF8Q.js → desktop-pet-settings-KgOAuqSh.js} +1 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-DvqniZDm.js +1 -0
- package/dist/gateway/static/root/assets/{directory-picker-path-field-B7d2s14w.js → directory-picker-path-field-BmOguLDl.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-DSSuMQxp.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-DSd__mNd.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-BJaSQNiV.js → fallback-models-D7bjbiwZ.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-hSXGWumL.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-C7xJwE61.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-DJNmlMfH.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-BufZPzGE.js} +1 -1
- package/dist/gateway/static/root/assets/index-DBRwvWzm.css +1 -0
- package/dist/gateway/static/root/assets/{index-B-wZyMBY.js → index-K8SXDtxr.js} +110 -110
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-DywXmCvO.js → keyboard-shortcuts-settings-B8pPP5RF.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-dBlBepLG.js → local-app-workbench-page-zEtvE7pJ.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-DdEXqsZw.js → local-apps-page-Bli7e_eg.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-BimZk3R4.js} +2 -2
- package/dist/gateway/static/root/assets/{management-settings-10Vl7gLU.js → management-settings-5Y4COyU9.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-DBRj4-1-.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-KLDPLVg7.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-DST0oPXD.js +8 -0
- package/dist/gateway/static/root/assets/{page-context-capture-button-DzkU3HrQ.js → page-context-capture-button-Bmed83-6.js} +1 -1
- package/dist/gateway/static/root/assets/page-tabs-HLrKIjXH.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-BG4Ystrm.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-Dbs3Xtis.js → product-open-page-CXkYP9xE.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-x-EvUxt7.js → product-preview-content-DjmupQSq.js} +1 -1
- package/dist/gateway/static/root/assets/project-detail-page-CzBmV0P6.js +1 -0
- package/dist/gateway/static/root/assets/{projects-page-CSahay3I.js → projects-page-DByqe5Em.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-DTjj-odF.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-B_ptn3T8.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-DVzrw6Q9.js → scenes-page-wkua4l5y.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-Ch-wK0Os.js → schema-form-VvOSM84Y.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-D06XwYAT.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DoAHy1wj.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-D-Uz-C5u.js → settings-page-C-6BJdb1.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-L0JSG0K-.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-BbgAUM3v.js +1 -0
- package/dist/gateway/static/root/assets/{skill-api-v1XR_zqL.js → skill-api-BFU1tPyw.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-DZw6el4o.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-DshSGWNg.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-DvRLEt8e.js → task-detail-page-CfZhq4XZ.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-DFDXwWnU.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-BdLt6u0c.js → usage-page-2RJLg54s.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-y1gjGYPI.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-Ch-KfpCF.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-CEx_jYPu.js → workflow-run-setup-panel-CTu297Hc.js} +2 -2
- package/dist/gateway/static/root/assets/{workflows-page-BYGPnFEF.js → workflows-page-CRZXG_rm.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-hEfjVjnc.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/child-agent-factory.js +7 -1
- 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/execution-tool-policy.d.ts +1 -1
- package/dist/src/agent/embedded/execution-tool-policy.js +3 -2
- package/dist/src/agent/embedded/index.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +38 -18
- package/dist/src/agent/embedded/run-turn.js +119 -35
- package/dist/src/agent/embedded/session-runner.js +12 -4
- 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/embedded/types.d.ts +2 -1
- package/dist/src/agent/external-tools/cliProvider.d.ts +1 -0
- package/dist/src/agent/external-tools/cliProvider.js +4 -3
- package/dist/src/agent/external-tools/composio-provider.js +5 -3
- package/dist/src/agent/external-tools/endpoint-provider.js +4 -4
- package/dist/src/agent/external-tools/gateway-tools.js +10 -4
- package/dist/src/agent/external-tools/index.js +1 -1
- package/dist/src/agent/external-tools/service.d.ts +1 -0
- package/dist/src/agent/external-tools/service.js +3 -1
- package/dist/src/agent/external-tools/types.d.ts +4 -0
- 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/orchestration/agent-turn-policy.d.ts +1 -0
- package/dist/src/agent/orchestration/delegation-budget.js +2 -1
- package/dist/src/agent/orchestration/llm-turn-retry.d.ts +5 -0
- package/dist/src/agent/orchestration/llm-turn-retry.js +15 -5
- package/dist/src/agent/orchestration/turn-recovery.d.ts +6 -0
- package/dist/src/agent/orchestration/turn-recovery.js +29 -0
- 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 +11 -10
- package/dist/src/agent/service/process-direct-streaming.js +12 -6
- 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 +32 -14
- 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 +50 -40
- 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.d.ts +1 -0
- package/dist/src/agent/tools/index.js +8 -7
- 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-result-tool.js +20 -3
- package/dist/src/agent/tools/personal-request-tool.js +216 -17
- 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 +17 -21
- package/dist/src/agent/tools/personal-task-tool.js +356 -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/task-collaboration-tool.d.ts +16 -0
- package/dist/src/agent/tools/task-collaboration-tool.js +153 -0
- 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 +25 -13
- 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/config.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- 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 +3 -3
- 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 +2 -2
- package/dist/src/cli/commands/onboard/channels/registry.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- 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.d.ts +6 -0
- package/dist/src/connectors/connection-recovery-service.js +157 -38
- 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/connection-waits.js +3 -1
- 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 +12 -8
- package/dist/src/gateway/service/session-command-service.js +1 -1
- package/dist/src/gateway/service/session-input-coordinator.js +4 -2
- package/dist/src/gateway/service.d.ts +1 -0
- package/dist/src/gateway/service.js +62 -48
- 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 +35 -10
- package/dist/src/personal-agent/reply-composer.js +27 -13
- package/dist/src/personal-agent/request-access.d.ts +3 -0
- package/dist/src/personal-agent/request-access.js +31 -0
- package/dist/src/personal-agent/request-delivery.js +10 -5
- package/dist/src/personal-agent/request-repository.d.ts +4 -2
- package/dist/src/personal-agent/request-repository.js +4 -4
- package/dist/src/personal-agent/request-service.d.ts +3 -1
- package/dist/src/personal-agent/request-service.js +131 -38
- 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/providers/model-response.js +13 -2
- 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 +24 -11
- 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-wait-repository.d.ts +2 -0
- package/dist/src/storage/sqlite/connection-wait-repository.js +83 -4
- 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/storage/sqlite/transcript-repository.d.ts +2 -0
- package/dist/src/storage/sqlite/transcript-repository.js +25 -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 +47 -4
- package/dist/src/tasks/task-collaboration-delivery.js +5 -2
- package/dist/src/tasks/task-collaboration-repository.d.ts +3 -0
- package/dist/src/tasks/task-collaboration-repository.js +11 -1
- package/dist/src/tasks/task-context-assembler.js +15 -7
- package/dist/src/tasks/task-continuation.d.ts +5 -0
- package/dist/src/tasks/task-continuation.js +32 -0
- 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 +15 -8
- 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 +22 -9
- 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.d.ts +1 -0
- package/dist/src/tasks/task-run-coordinator.js +31 -8
- package/dist/src/tasks/task-run-dispatcher.d.ts +1 -1
- package/dist/src/tasks/task-run-dispatcher.js +16 -4
- package/dist/src/tasks/task-run-repository.d.ts +8 -0
- package/dist/src/tasks/task-run-repository.js +32 -1
- 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/index-BvOYtdnP.css +0 -1
- 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
|
@@ -3,37 +3,43 @@ import { init_logger } from "../utils/logger.js";
|
|
|
3
3
|
import { init_attachment_ref, parseNoteAttachmentTarget } from "../notes/attachment-ref.js";
|
|
4
4
|
import { init_agent_scope, resolveAgentHomeDir, resolveDefaultAgentId } from "./agent-scope.js";
|
|
5
5
|
import { extractTextContent } from "./context/workspace.js";
|
|
6
|
-
import { getUserTimezone } from "../user-model/repository.js";
|
|
7
|
-
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
8
6
|
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
7
|
+
import { extractProfileAgentId, resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
8
|
+
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
9
9
|
import { init_providers, resolveModel } from "../providers/index.js";
|
|
10
10
|
import { configureTracing, flushTracing } from "../observability/runtime.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { extractProfileAgentId, resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
11
|
+
import { getUserTimezone } from "../user-model/repository.js";
|
|
12
|
+
import { resolveAgentTurnTimeoutMs } from "./orchestration/run-agent-turn-with-timeout.js";
|
|
13
|
+
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
15
14
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
16
15
|
import { getProjectForSession } from "../projects/workspace.js";
|
|
17
16
|
import "../user-model/index.js";
|
|
18
|
-
import { initializeCommands } from "../chat-commands/index.js";
|
|
19
|
-
import { applyConfigOverrides } from "../config/runtime-overrides.js";
|
|
20
|
-
import { ExtensionHookRunner } from "../extensions/hooks.js";
|
|
21
|
-
import "../extensions/index.js";
|
|
22
17
|
import { onSessionTranscriptUpdate } from "../session/transcript-events.js";
|
|
18
|
+
import { runWithEmbeddedExecutionSession } from "./embedded/execution-context.js";
|
|
19
|
+
import { removeSkillsLockEntry } from "./skills/hub-lock.js";
|
|
20
|
+
import { installSkillFromZip } from "./skills/managed-store.js";
|
|
23
21
|
import { resolveWorkspaceSkillsDir, resolveWorkspaceSkillsLockPath } from "./skills/workspace-skills-dir.js";
|
|
24
22
|
import { pullSkillFromSource } from "./skills/hub-pull.js";
|
|
25
|
-
import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../gateway/chat-limits.js";
|
|
26
23
|
import { persistInboundAttachments } from "../channels/attachments/inbound-persist.js";
|
|
27
24
|
import { buildTranscriptUserMessage, hydrateUserTurnForLlm } from "./inbound/attachment-pipeline.js";
|
|
28
25
|
import { drainEmbeddedSessionRunnerShutdowns } from "./embedded/session-runner.js";
|
|
29
|
-
import { maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle } from "../session/session-title.js";
|
|
30
26
|
import { resolveCompactionPolicy } from "./memory/compaction-policy.js";
|
|
27
|
+
import { getModelThinking } from "../providers/model-thinking.js";
|
|
28
|
+
import { runXopcEmbeddedTurn } from "./embedded/run-turn.js";
|
|
29
|
+
import { resolveResponseLanguageForSession } from "./prompt/response-language.js";
|
|
30
|
+
import { normalizeSkillInstallTarget } from "./skills/install-target.js";
|
|
31
|
+
import { AgentManager } from "./agent-manager.js";
|
|
32
|
+
import { MAX_WEBCHAT_ATTACHMENT_FILE_BYTES } from "../gateway/chat-limits.js";
|
|
33
|
+
import { maybeRefineSessionTitleWithLlm, maybeSetProvisionalSessionTitle } from "../session/session-title.js";
|
|
31
34
|
import { SessionStore } from "../session/store.js";
|
|
32
35
|
import { SessionConfigStore } from "../session/config-store.js";
|
|
33
36
|
import "../session/index.js";
|
|
37
|
+
import { ExtensionHookRunner } from "../extensions/hooks.js";
|
|
38
|
+
import "../extensions/index.js";
|
|
34
39
|
import { SessionTracker } from "./session/tracker.js";
|
|
35
40
|
import { ModelManager } from "./models/manager.js";
|
|
36
41
|
import "./models/index.js";
|
|
42
|
+
import { initializeCommands } from "../chat-commands/index.js";
|
|
37
43
|
import { HookHandler } from "./lifecycle/hook-handler.js";
|
|
38
44
|
import { ToolErrorTracker } from "./tools/error-tracker.js";
|
|
39
45
|
import { RequestLimiter } from "./models/request-limiter.js";
|
|
@@ -45,9 +51,6 @@ import { ContextMiddleware } from "./middleware/context.js";
|
|
|
45
51
|
import "./middleware/index.js";
|
|
46
52
|
import { LifecycleManager } from "./lifecycle/manager.js";
|
|
47
53
|
import "./lifecycle/index.js";
|
|
48
|
-
import { resolveAgentTurnTimeoutMs } from "./orchestration/run-agent-turn-with-timeout.js";
|
|
49
|
-
import { getModelThinking } from "../providers/model-thinking.js";
|
|
50
|
-
import { runXopcEmbeddedTurn } from "./embedded/run-turn.js";
|
|
51
54
|
import { MessageRouter } from "./messaging/message-router.js";
|
|
52
55
|
import { CommandHandler } from "./messaging/command-handler.js";
|
|
53
56
|
import { StreamManager } from "./messaging/stream-manager.js";
|
|
@@ -66,10 +69,7 @@ import { AgentOrchestrator } from "./orchestration/agent-orchestrator.js";
|
|
|
66
69
|
import { AgentEventHandler } from "./orchestration/agent-event-handler.js";
|
|
67
70
|
import "./orchestration/index.js";
|
|
68
71
|
import { getWorkflowProgressBroker } from "./workflow/progress-broker.js";
|
|
69
|
-
import { resolveResponseLanguageForSession } from "./prompt/response-language.js";
|
|
70
72
|
import "./workflow/index.js";
|
|
71
|
-
import { normalizeSkillInstallTarget } from "./skills/install-target.js";
|
|
72
|
-
import { AgentManager } from "./agent-manager.js";
|
|
73
73
|
import { TaskJudgeService } from "./tasks/task-judge-service.js";
|
|
74
74
|
import { analyzeResponseLanguage } from "../i18n/language-consistency.js";
|
|
75
75
|
import { readFile } from "node:fs/promises";
|
|
@@ -496,6 +496,9 @@ var AgentService = class {
|
|
|
496
496
|
getSkillCatalogSnapshot() {
|
|
497
497
|
return this.agentManager.getSkillCatalogSnapshot();
|
|
498
498
|
}
|
|
499
|
+
getAgentToolAvailability(agentId, name) {
|
|
500
|
+
return this.agentManager.getAgentToolAvailability(agentId, name);
|
|
501
|
+
}
|
|
499
502
|
getAgentSkillAvailability(agentId) {
|
|
500
503
|
return this.agentManager.getAgentSkillAvailability(agentId);
|
|
501
504
|
}
|
|
@@ -3,13 +3,13 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { chooseModelThinking } from "../../../packages/gateway-contract/src/model-selection.js";
|
|
4
4
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
5
5
|
import { ResponseLanguageSchema, init_response_language } from "../../i18n/response-language.js";
|
|
6
|
-
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
7
6
|
import { resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
|
|
8
7
|
import { normalizeWorkingDirectoryInput } from "../../session/session-workspace.js";
|
|
9
8
|
import { getProjectWorkspacePathForSession } from "../../projects/workspace.js";
|
|
9
|
+
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
10
|
+
import { getModelThinking } from "../../providers/model-thinking.js";
|
|
10
11
|
import { normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel } from "../transcript/thinking-types.js";
|
|
11
12
|
import "../../session/index.js";
|
|
12
|
-
import { getModelThinking } from "../../providers/model-thinking.js";
|
|
13
13
|
import { mkdir } from "node:fs/promises";
|
|
14
14
|
//#region src/agent/session/session-config-service.ts
|
|
15
15
|
init_src();
|
|
@@ -3,9 +3,9 @@ import { init_logger } from "../../utils/logger.js";
|
|
|
3
3
|
import { getExecutionEnvironmentForSession } from "../../execution-environments/subject.js";
|
|
4
4
|
import { effectiveWorkspacePathForSession, normalizeWorkingDirectoryInput, projectWorkspacePath } from "../../session/session-workspace.js";
|
|
5
5
|
import { getProjectForSession } from "../../projects/workspace.js";
|
|
6
|
+
import { getModelThinking } from "../../providers/model-thinking.js";
|
|
6
7
|
import { resolveEffectiveThinkingLevel } from "../../session/thinking-resolve.js";
|
|
7
8
|
import "../../session/index.js";
|
|
8
|
-
import { getModelThinking } from "../../providers/model-thinking.js";
|
|
9
9
|
import { mkdir, stat } from "node:fs/promises";
|
|
10
10
|
//#region src/agent/session/session-hydrator.ts
|
|
11
11
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { init_workspace_defaults, resolveDefaultAgentWorkspaceDir } from "../../config/workspace-defaults.js";
|
|
4
|
-
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
5
4
|
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
5
|
+
import { init_providers, resolveModel } from "../../providers/index.js";
|
|
6
6
|
import { getExecutionEnvironmentForSession } from "../../execution-environments/subject.js";
|
|
7
7
|
import { effectiveWorkspacePathForSession, projectWorkspacePath } from "../../session/session-workspace.js";
|
|
8
8
|
import { getProjectForSession } from "../../projects/workspace.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { isSessionSourceBinding, isTurnContextRef, parseTurnContextRefs, summarizeSourceContext } from "./types.js";
|
|
2
|
+
import { injectSourceContextsIntoUserMessage } from "./injector.js";
|
|
1
3
|
import { buildFileAgentContext } from "./file-context.js";
|
|
2
4
|
import { buildSessionAgentContext } from "./session-context.js";
|
|
3
5
|
import { buildBrowserTabAgentContext } from "./browser-tab.js";
|
|
4
6
|
import { buildUserAssertionAgentContext } from "./user-assertion-context.js";
|
|
5
|
-
import { isSessionSourceBinding, isTurnContextRef, parseTurnContextRefs, summarizeSourceContext } from "./types.js";
|
|
6
|
-
import { injectSourceContextsIntoUserMessage } from "./injector.js";
|
|
7
7
|
export { buildBrowserTabAgentContext, buildFileAgentContext, buildSessionAgentContext, buildUserAssertionAgentContext, injectSourceContextsIntoUserMessage, isSessionSourceBinding, isTurnContextRef, parseTurnContextRefs, summarizeSourceContext };
|
|
@@ -2,6 +2,7 @@ import type { AgentEntry } from '../agent-config/index.js';
|
|
|
2
2
|
export declare const STARTER_AGENTS_INITIALIZED_VERSION = 1;
|
|
3
3
|
type StarterAgent = {
|
|
4
4
|
id: string;
|
|
5
|
+
purpose?: AgentEntry['purpose'];
|
|
5
6
|
tools?: AgentEntry['tools'];
|
|
6
7
|
toolAllowlist?: AgentEntry['toolAllowlist'];
|
|
7
8
|
skills?: AgentEntry['skills'];
|
|
@@ -12,6 +12,17 @@ function denyTools(names) {
|
|
|
12
12
|
return Object.fromEntries(names.map((name) => [name, { mode: "deny" }]));
|
|
13
13
|
}
|
|
14
14
|
const STARTER_AGENTS = [
|
|
15
|
+
{
|
|
16
|
+
id: "task-router",
|
|
17
|
+
purpose: "task_dispatcher",
|
|
18
|
+
toolAllowlist: [],
|
|
19
|
+
profile: {
|
|
20
|
+
name: "Task Router",
|
|
21
|
+
description: "Selects one suitable specialist for a delegated task.",
|
|
22
|
+
instructions: "Compare the task brief with candidate expertise, examples, limitations and verified execution conditions. Select only a displayed eligible candidate. Preserve requested Agents, Skills and task boundaries. Return the requested structured decision."
|
|
23
|
+
},
|
|
24
|
+
profileFiles: {}
|
|
25
|
+
},
|
|
15
26
|
{
|
|
16
27
|
id: "main",
|
|
17
28
|
specialistProfile: {
|
|
@@ -269,6 +280,7 @@ function ensureStarterAgentsInitialized() {
|
|
|
269
280
|
repository.create({
|
|
270
281
|
id: starter.id,
|
|
271
282
|
enabled: true,
|
|
283
|
+
...starter.purpose ? { purpose: starter.purpose } : {},
|
|
272
284
|
...starter.specialistProfile ? { specialistProfile: starter.specialistProfile } : {},
|
|
273
285
|
...starter.profile ? { profile: starter.profile } : {},
|
|
274
286
|
...starter.tools ? { tools: starter.tools } : {},
|
|
@@ -2,17 +2,19 @@ import { createLogger } from "../../utils/logger/index.js";
|
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { TaskRepository, init_task_repository } from "../../tasks/task-repository.js";
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-run-repository.js";
|
|
5
|
-
import {
|
|
6
|
-
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
7
|
-
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
5
|
+
import { resolveEffectiveAgentProfileForSession } from "../../config/agent-profile.js";
|
|
8
6
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
9
7
|
import { getApiKey, init_providers, resolveModel } from "../../providers/index.js";
|
|
10
|
-
import { extractAssistantText, getAssistantMessageErrorReason, stripCodeFences } from "../../providers/model-response.js";
|
|
11
8
|
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
12
|
-
import {
|
|
9
|
+
import { extractAssistantText, getAssistantMessageErrorReason, isTransientProviderErrorMessage, stripCodeFences } from "../../providers/model-response.js";
|
|
10
|
+
import { canResumeAfterModelFailure } from "../orchestration/turn-recovery.js";
|
|
11
|
+
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
12
|
+
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
13
13
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
14
14
|
import { buildResponseLanguageSection } from "../prompt/sections/response-language.js";
|
|
15
15
|
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
16
|
+
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
17
|
+
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
16
18
|
//#region src/agent/tasks/task-judge-service.ts
|
|
17
19
|
init_schema();
|
|
18
20
|
init_providers();
|
|
@@ -62,13 +64,13 @@ function parseTaskJudgeDecision(raw, criteriaCount, locale = "en") {
|
|
|
62
64
|
}
|
|
63
65
|
async function requestTaskJudgeDecision(complete, criteriaCount, locale = "en") {
|
|
64
66
|
let parseError;
|
|
65
|
-
for (let attempt = 0; attempt < 2; attempt += 1) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
67
|
+
for (let attempt = 0; attempt < 2; attempt += 1) try {
|
|
68
|
+
return parseTaskJudgeDecision(await complete(attempt), criteriaCount, locale);
|
|
69
|
+
} catch (error) {
|
|
70
|
+
if (error instanceof Error && isTransientProviderErrorMessage(error.message)) {
|
|
71
|
+
if (attempt === 0) await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
72
|
+
} else if (!(error instanceof SyntaxError) && !(error instanceof Error && error.message.startsWith("Task judge returned"))) throw error;
|
|
73
|
+
parseError = error;
|
|
72
74
|
}
|
|
73
75
|
throw parseError;
|
|
74
76
|
}
|
|
@@ -130,7 +132,8 @@ var TaskJudgeService = class {
|
|
|
130
132
|
return;
|
|
131
133
|
}
|
|
132
134
|
const history = compactHistory(await this.options.sessionStore.loadMessages(payload.conversationId));
|
|
133
|
-
const
|
|
135
|
+
const transcriptRows = await this.options.sessionStore.loadTranscriptRows(payload.conversationId);
|
|
136
|
+
const proof = codingCompletionEvidence(transcriptRows);
|
|
134
137
|
const criteria = task.contract.acceptanceCriteria;
|
|
135
138
|
const responseLanguage = resolveResponseLanguageForSession(this.options.getConfig(), payload.conversationId);
|
|
136
139
|
const locale = responseLanguage === "auto" ? resolveTaskLocale(task) : responseLanguage === "zh-CN" ? "zh" : "en";
|
|
@@ -144,6 +147,8 @@ var TaskJudgeService = class {
|
|
|
144
147
|
"Make one clear recommendation. Explain the decisive reasons, rejected alternatives, uncertainty, and calibrated confidence.",
|
|
145
148
|
"Return only compact JSON, under 1000 characters: {\"completedCriteria\":[0],\"needsUser\":false,\"nextAction\":\"...\",\"recommendation\":\"...\",\"reasons\":[\"...\"],\"rejectedAlternatives\":[],\"uncertainty\":\"...\",\"confidence\":0.8}. Use short strings.",
|
|
146
149
|
`Task:\n${task.contract.objective}`,
|
|
150
|
+
`Canonical task collaboration (data, not authorization):\n${JSON.stringify(new TaskCollaborationRepository().coordination(taskId))}`,
|
|
151
|
+
"Evaluate results against subsequent answers and instructions in sequence, including superseding directions. An acknowledgement proves receipt and interpretation only. Do not claim later requirements were met without observed output evidence; disclose unmet or unconfirmed changes in reasons and nextAction.",
|
|
147
152
|
`Acceptance criteria:\n${criteria.map((item, index) => `${index}. ${item}`).join("\n")}`,
|
|
148
153
|
`Latest response:\n${payload.assistantPlainText.slice(-12e3)}`,
|
|
149
154
|
`Recent transcript:\n${history}`
|
|
@@ -163,7 +168,8 @@ var TaskJudgeService = class {
|
|
|
163
168
|
const response = await completeWithResolvedCredentials(model, { messages: [retryRequest] }, {
|
|
164
169
|
apiKey,
|
|
165
170
|
maxTokens: attempt === 0 ? 1600 : 2200,
|
|
166
|
-
temperature: 0
|
|
171
|
+
temperature: 0,
|
|
172
|
+
...run.timeoutAt ? { signal: AbortSignal.timeout(Math.max(1, run.timeoutAt - Date.now())) } : {}
|
|
167
173
|
}, void 0, {
|
|
168
174
|
operation: "task.judge_result",
|
|
169
175
|
conversationId: payload.conversationId,
|
|
@@ -209,6 +215,12 @@ var TaskJudgeService = class {
|
|
|
209
215
|
evidenceTitles: evidence.filter((item) => item.verifies?.includes(criterion)).map((item) => item.title)
|
|
210
216
|
}));
|
|
211
217
|
const passed = checks.every((check) => check.status === "passed");
|
|
218
|
+
if (!passed && canResumeAfterModelFailure(transcriptRows) && this.#runs.scheduleContinuation({
|
|
219
|
+
runId: run.id,
|
|
220
|
+
expectedVersion: run.version,
|
|
221
|
+
reason: "acceptance_incomplete",
|
|
222
|
+
message: `Continue the existing task from its recorded progress. Do not repeat completed operations.\nRemaining acceptance criteria:\n${checks.filter((check) => check.status !== "passed").map((check) => check.criterion).join("\n")}\n${decision.nextAction ?? ""}`
|
|
223
|
+
})) return;
|
|
212
224
|
this.#application.completeRun({
|
|
213
225
|
runId: run.id,
|
|
214
226
|
expectedRunVersion: run.version,
|
|
@@ -234,6 +246,12 @@ var TaskJudgeService = class {
|
|
|
234
246
|
taskId,
|
|
235
247
|
conversationId: payload.conversationId
|
|
236
248
|
}, "Task review failed");
|
|
249
|
+
if (isTransientProviderErrorMessage(error instanceof Error ? error.message : String(error)) && canResumeAfterModelFailure(transcriptRows)) this.#runs.scheduleContinuation({
|
|
250
|
+
runId: run.id,
|
|
251
|
+
expectedVersion: run.version,
|
|
252
|
+
reason: "acceptance_check_failed",
|
|
253
|
+
message: "The independent acceptance check failed because of a temporary model error. Continue from the recorded results and verify the remaining acceptance criteria. Do not repeat completed operations."
|
|
254
|
+
});
|
|
237
255
|
}
|
|
238
256
|
}
|
|
239
257
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
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 { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
4
|
-
import { resolveReverseProxyPublicUrl } from "../../gateway/public-url.js";
|
|
5
|
-
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
6
3
|
import { assertWorkspaceTreeReadable, checkedFilePath } from "../sandbox/fileAccess.js";
|
|
4
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
5
|
+
import { resolveGatewayEffectiveHost } from "../../config/gateway-bind.js";
|
|
7
6
|
import { resolveShareConfig } from "../../share/share-config.js";
|
|
8
7
|
import { mergeWithDefaults } from "../../share/site-share-config.js";
|
|
9
8
|
import { getShareStore } from "../../share/share-store.js";
|
|
10
9
|
import { getSiteShareStore } from "../../share/site-share-store.js";
|
|
11
10
|
import { resolveShareUrl, resolveSiteShareUrl } from "../../share/share-url.js";
|
|
12
11
|
import { publishHostedStaticSite } from "../../share/hosted-static-site-publish.js";
|
|
12
|
+
import { resolveReverseProxyPublicUrl } from "../../gateway/public-url.js";
|
|
13
13
|
import { audienceDefaults, decideShareKind, makeDescription, makeTitle, probeShareTarget, rememberStagedSite, stageSingleHtmlAsSite } from "../../share/share-auto.js";
|
|
14
14
|
import { scheduleThumbnail } from "../../share/share-thumbnail.js";
|
|
15
15
|
import { resolveToolLocale, shareToolErrorLine, shareToolSuccessLines } from "../../i18n/share-tool-bundle.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { renderDataBatch } from "../data-acquisition/render.js";
|
|
4
3
|
import { DataBatchSchema } from "../data-acquisition/schema.js";
|
|
5
4
|
import { acquireData } from "../data-acquisition/service.js";
|
|
5
|
+
import { renderDataBatch } from "../data-acquisition/render.js";
|
|
6
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
7
7
|
//#region src/agent/tools/dataBatch.ts
|
|
8
8
|
init_logger();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { runGit } from "../../execution-environments/git.js";
|
|
2
|
-
import { LocalWorktreeManager } from "../../execution-environments/local-worktree-manager.js";
|
|
3
|
-
import { SessionEnvironmentService } from "../../execution-environments/session-environment-service.js";
|
|
4
1
|
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
5
2
|
import { EXTERNAL_TOOL_NAMES } from "../external-tools/gateway-tools.js";
|
|
6
3
|
import "../external-tools/index.js";
|
|
7
4
|
import { getDelegationScope } from "../orchestration/delegation-scope.js";
|
|
8
5
|
import { DELEGATION_BUDGETS } from "../orchestration/delegation-budget.js";
|
|
9
6
|
import { createDelegateChildHandle } from "../child-agent-factory.js";
|
|
7
|
+
import { runGit } from "../../execution-environments/git.js";
|
|
8
|
+
import { LocalWorktreeManager } from "../../execution-environments/local-worktree-manager.js";
|
|
9
|
+
import { SessionEnvironmentService } from "../../execution-environments/session-environment-service.js";
|
|
10
10
|
import { DELEGATION_CAPABILITIES, DELEGATION_TOOL_CAPABILITIES, protectDelegatedTool, resolveDelegationTools } from "./delegation-policy.js";
|
|
11
11
|
import { Type } from "@sinclair/typebox";
|
|
12
12
|
//#region src/agent/tools/delegate-tool.ts
|
|
@@ -45,7 +45,7 @@ const DEFAULT_CONFIG = {
|
|
|
45
45
|
{
|
|
46
46
|
name: "timeout",
|
|
47
47
|
description: "Command execution timed out",
|
|
48
|
-
regex:
|
|
48
|
+
regex: /\btimeout(?:error|exception)?\b|timed out|execution time exceeded|\betimedout\b/i,
|
|
49
49
|
suggestion: "Command took too long. Consider optimizing the command, breaking into smaller tasks, or increasing timeout.",
|
|
50
50
|
autoRetry: true,
|
|
51
51
|
maxRetries: 1,
|
|
@@ -7,7 +7,7 @@ import { Type } from "@sinclair/typebox";
|
|
|
7
7
|
//#region src/agent/tools/exec-command.ts
|
|
8
8
|
const DEFAULT_MAX_OUTPUT_CHARS = 5e4;
|
|
9
9
|
const ExecCommandSchema = Type.Object({
|
|
10
|
-
cmd: Type.String({ description: "
|
|
10
|
+
cmd: Type.String({ description: "Command for the default platform shell: /bin/sh on Unix and in Docker; cmd.exe on Windows hosts. Use portable syntax, or invoke an installed shell explicitly for shell-specific features." }),
|
|
11
11
|
cwd: Type.Optional(Type.String({ description: "Working directory. Relative paths are resolved under the agent workspace." })),
|
|
12
12
|
timeoutMs: Type.Optional(Type.Number({ description: "Command timeout in milliseconds. Defaults to 1800000 (30m) and is capped at 14400000 (4h)." })),
|
|
13
13
|
maxOutputChars: Type.Optional(Type.Number({ description: "Maximum characters returned to the model. UI streaming still receives output deltas." })),
|
|
@@ -28,6 +28,7 @@ function commandFailureHint(details) {
|
|
|
28
28
|
if (details.status === "success" || details.status === "running") return void 0;
|
|
29
29
|
if (details.status === "cancelled") return "The command was cancelled. Inspect its partial output before deciding whether to restart.";
|
|
30
30
|
if (details.status === "timed_out") return "The command timed out. Re-run a narrower command, increase timeoutMs if the long run is expected, or inspect partial output before retrying.";
|
|
31
|
+
if (details.exitCode !== 0 && /(?:\/bin\/sh|\bsh:).*syntax error|bad substitution/i.test(details.stderr)) return "The default shell rejected the syntax. Use portable POSIX sh commands or invoke an installed bash explicitly for Bash-only features such as process substitution. Inspect stderr, fix the command, then rerun it.";
|
|
31
32
|
if (details.exitCode !== 0 && details.stderr.trim()) return "The command failed. Inspect stderr first, fix the underlying issue, then re-run the narrowest relevant verification command.";
|
|
32
33
|
if (details.exitCode !== 0 && details.stdout.trim()) return "The command failed. Inspect stdout for the failure location, then re-run the narrowest relevant verification command.";
|
|
33
34
|
return "The command failed without output. Verify the command, cwd, and required dependencies before retrying.";
|
|
@@ -54,6 +55,7 @@ function createExecCommandTool(workspaceCwd, options) {
|
|
|
54
55
|
name: "exec_command",
|
|
55
56
|
description: [
|
|
56
57
|
"Run shell commands for code inspection, builds, tests, type checks, and verification.",
|
|
58
|
+
"Unix and Docker use /bin/sh, not your interactive shell. Do not use Bash process substitution <(...) or other Bash-only syntax unless invoking an installed bash explicitly. Prefer separate portable commands or a script file. Windows hosts use cmd.exe.",
|
|
57
59
|
"Use apply_patch for file edits; do not edit files by shell redirection unless explicitly necessary.",
|
|
58
60
|
"Relative cwd values resolve under the current agent workspace.",
|
|
59
61
|
"When the command creates final user-facing files, declare all final paths in outputs so they are persisted with this command."
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { withRetry } from "../../infra/retry.js";
|
|
4
3
|
import { commandTimeout } from "../commands/command-registry.js";
|
|
5
4
|
import { DEFAULT_TOOL_EXECUTION_TIMEOUT_MS, TimeoutError, executeWithTimeout } from "../lifecycle/timeout-wrapper.js";
|
|
5
|
+
import { withRetry } from "../../infra/retry.js";
|
|
6
6
|
import { ToolConcurrencyController, resolveToolLockMode } from "./concurrency.js";
|
|
7
7
|
//#region src/agent/tools/executor.ts
|
|
8
8
|
init_logger();
|
|
@@ -112,6 +112,12 @@ export interface CreateCoreToolsOptions {
|
|
|
112
112
|
}
|
|
113
113
|
export declare class AgentToolsFactory {
|
|
114
114
|
private deps;
|
|
115
|
+
getAgentToolAvailability(candidateId: string, name: string): {
|
|
116
|
+
condition: string;
|
|
117
|
+
state: "blocked" | "verified";
|
|
118
|
+
reasonCode: string;
|
|
119
|
+
detail: string;
|
|
120
|
+
};
|
|
115
121
|
private browserRuntime;
|
|
116
122
|
/** Cached readiness probe keyed by the active driver configuration. */
|
|
117
123
|
private browserReadinessCache;
|
|
@@ -9,32 +9,22 @@ import { patchSessionMetadata } from "../../storage/sqlite/session-repository.js
|
|
|
9
9
|
import { getSessionTaskPlan, setSessionTaskPlan } from "../../storage/sqlite/session-task-plan-repository.js";
|
|
10
10
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
11
11
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
13
|
+
import { resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
|
|
14
|
+
import { LOCAL_READ_MAX_CHARS } from "./local-read-budget.js";
|
|
15
|
+
import { createPersonalAttentionTool } from "./personal-attention-tool.js";
|
|
16
|
+
import { markCodemodeCoreRead } from "./codemode-permissions.js";
|
|
17
|
+
import { PERSONAL_TOOL_DESCRIPTIONS } from "../../personal-agent/policy.js";
|
|
18
|
+
import { PERSONAL_REQUEST_TOOL_IDS, filterExecutionTools, resolveExecutionToolPolicy } from "../embedded/execution-tool-policy.js";
|
|
14
19
|
import "../../../packages/browser-control-contract/src/index.js";
|
|
15
|
-
import { createBrowserDriver } from "../../browser/drivers/create-driver.js";
|
|
16
|
-
import { checkBrowserReadiness } from "../../browser/readiness.js";
|
|
17
|
-
import "../../browser/index.js";
|
|
18
20
|
import { getEmbeddedExecutionRunId, getEmbeddedExecutionSession } from "../embedded/execution-context.js";
|
|
19
|
-
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
20
|
-
import { resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
|
|
21
|
-
import { ComputerRuntime } from "../../computer/runtime.js";
|
|
22
|
-
import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
|
|
23
|
-
import { skillEnvironmentId } from "../skills/installer.js";
|
|
24
21
|
import { wrapToolsWithProtection } from "./executor.js";
|
|
25
22
|
import { EXTERNAL_TOOL_NAMES } from "../external-tools/gateway-tools.js";
|
|
26
23
|
import { createDefaultExternalToolGatewayTools } from "../external-tools/index.js";
|
|
27
|
-
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
28
|
-
import { getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
|
|
29
|
-
import { createDataBatchTool } from "./dataBatch.js";
|
|
30
|
-
import { markCodemodeCoreRead } from "./codemode-permissions.js";
|
|
31
|
-
import { PERSONAL_TOOL_DESCRIPTIONS } from "../../personal-agent/policy.js";
|
|
32
|
-
import { PERSONAL_REQUEST_TOOL_IDS, filterExecutionTools, resolveExecutionToolPolicy } from "../embedded/execution-tool-policy.js";
|
|
33
|
-
import { createDelegateTool } from "./delegate-tool.js";
|
|
34
|
-
import { createDelegationParentPolicy } from "./delegation-parent-policy.js";
|
|
35
|
-
import { createPersonalAttentionTool } from "./personal-attention-tool.js";
|
|
36
|
-
import { LOCAL_READ_MAX_CHARS } from "./local-read-budget.js";
|
|
37
24
|
import { createReadFileTool } from "./read.js";
|
|
25
|
+
import { createDataBatchTool } from "./dataBatch.js";
|
|
26
|
+
import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
|
|
27
|
+
import { skillEnvironmentId } from "../skills/installer.js";
|
|
38
28
|
import { createWriteFileTool } from "./write.js";
|
|
39
29
|
import { createListDirTool } from "./list-dir.js";
|
|
40
30
|
import { createPublishArtifactsTool } from "./publish-artifacts.js";
|
|
@@ -57,7 +47,14 @@ import { createUpdatePlanTool } from "./update-plan-tool.js";
|
|
|
57
47
|
import { createSessionStatusTool } from "./session-status-tool.js";
|
|
58
48
|
import { createMemoryMaintenanceTool } from "./memory-maintenance-tool.js";
|
|
59
49
|
import { createClarifyTool } from "./clarify-tool.js";
|
|
50
|
+
import { BrowserRuntime } from "../../browser/runtime/browser-runtime.js";
|
|
51
|
+
import { createBrowserDriver } from "../../browser/drivers/create-driver.js";
|
|
52
|
+
import { checkBrowserReadiness } from "../../browser/readiness.js";
|
|
53
|
+
import "../../browser/index.js";
|
|
54
|
+
import { getPendingTranscriptUserText } from "../inbound/attachment-pipeline.js";
|
|
55
|
+
import { createDelegateTool } from "./delegate-tool.js";
|
|
60
56
|
import { createWorkflowTool } from "./workflow-tool.js";
|
|
57
|
+
import { createWorkflowCatalog } from "../workflow/catalog.js";
|
|
61
58
|
import { createWorkflowManageTool } from "./workflow-manage-tool.js";
|
|
62
59
|
import { createAutomationTool } from "./automation-tool.js";
|
|
63
60
|
import { createBrowserAutomationTool } from "./browser-automation-tool.js";
|
|
@@ -72,15 +69,19 @@ import { createManagedJobTool } from "./managed-job-tool.js";
|
|
|
72
69
|
import { createImageTool } from "./image-tool.js";
|
|
73
70
|
import { createImageGenerateTool } from "./image-generate-tool.js";
|
|
74
71
|
import { createPersonalReadTool } from "./personal-read-tool.js";
|
|
72
|
+
import { createTaskCollaborationTool } from "./task-collaboration-tool.js";
|
|
75
73
|
import "./index.js";
|
|
76
74
|
import { createPersonalTaskTool } from "./personal-task-tool.js";
|
|
77
75
|
import { createPersonalRequestTools } from "./personal-request-tool.js";
|
|
78
76
|
import { createPersonalRequestConnectionTool, createPersonalRequestResultTool } from "./personal-request-result-tool.js";
|
|
79
77
|
import { createPersonalPreferenceTool } from "./personal-preference-tool.js";
|
|
80
78
|
import { createBrowserUseTool } from "./browser/tool/browser-use-tool.js";
|
|
79
|
+
import { ComputerRuntime } from "../../computer/runtime.js";
|
|
81
80
|
import { createComputerUseTool } from "./computer-use-tool.js";
|
|
82
81
|
import { createReviewWorkspaceTool } from "./review-workspace.js";
|
|
83
82
|
import { createLanguageDiagnosticsTool } from "./language-diagnostics.js";
|
|
83
|
+
import { createDelegationParentPolicy } from "./delegation-parent-policy.js";
|
|
84
|
+
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
84
85
|
import { createTextToSpeechTool } from "./tts-tool.js";
|
|
85
86
|
import { getAgentCapabilityToolNames } from "../capabilities/registry.js";
|
|
86
87
|
import "../capabilities/index.js";
|
|
@@ -100,6 +101,24 @@ const CLARIFY_SUPPORTED_CHANNELS = new Set([
|
|
|
100
101
|
"cli"
|
|
101
102
|
]);
|
|
102
103
|
var AgentToolsFactory = class AgentToolsFactory {
|
|
104
|
+
getAgentToolAvailability(candidateId, name) {
|
|
105
|
+
const candidate = resolveEffectiveAgentConfigForAgent(candidateId).config;
|
|
106
|
+
const denied = new Set(Object.entries(candidate.tools).filter(([, policy]) => policy.mode === "deny").map(([tool]) => tool));
|
|
107
|
+
const registered = this.createAllTools({
|
|
108
|
+
agentId: candidateId,
|
|
109
|
+
workspace: candidate.workspace,
|
|
110
|
+
conversationId: "",
|
|
111
|
+
disabledTools: denied,
|
|
112
|
+
toolAllowlist: candidate.toolAllowlist
|
|
113
|
+
}).some((tool) => tool.name === name);
|
|
114
|
+
const activatable = this.getLazyCapabilityToolNames().includes(name);
|
|
115
|
+
return {
|
|
116
|
+
condition: `tool:${name}`,
|
|
117
|
+
state: registered || activatable ? "verified" : "blocked",
|
|
118
|
+
reasonCode: registered ? "tool_registered" : activatable ? "tool_activatable" : "tool_not_registered",
|
|
119
|
+
detail: candidate.tools[name]?.mode === "ask" ? "Runtime approval is still required" : "Registration checked; execution environment is checked by the tool"
|
|
120
|
+
};
|
|
121
|
+
}
|
|
103
122
|
browserRuntime = null;
|
|
104
123
|
/** Cached readiness probe keyed by the active driver configuration. */
|
|
105
124
|
browserReadinessCache = null;
|
|
@@ -254,6 +273,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
254
273
|
allowed = new Set(PERSONAL_REQUEST_TOOL_IDS.slice(0, 3).filter((name) => !allowed || allowed.has(name)));
|
|
255
274
|
allowed.add("personal_request_result");
|
|
256
275
|
allowed.add("personal_request_connection");
|
|
276
|
+
allowed.add("task_collaboration");
|
|
257
277
|
}
|
|
258
278
|
const deliveryContext = () => {
|
|
259
279
|
if (currentConversationId() && getSessionMetadata(currentConversationId())?.sessionType === "heartbeat") throw new Error("Heartbeat notifications must be returned in the final response for policy-controlled delivery.");
|
|
@@ -296,24 +316,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
296
316
|
const grep = createGrepTool(workspace);
|
|
297
317
|
const find = createFindTool(workspace);
|
|
298
318
|
const productToolDeps = {
|
|
299
|
-
getAgentToolAvailability: this.deps.getAgentToolAvailability ?? ((candidateId, name) =>
|
|
300
|
-
const candidate = resolveEffectiveAgentConfigForAgent(candidateId).config;
|
|
301
|
-
const denied = new Set(Object.entries(candidate.tools).filter(([, policy]) => policy.mode === "deny").map(([tool]) => tool));
|
|
302
|
-
const registered = this.createAllTools({
|
|
303
|
-
agentId: candidateId,
|
|
304
|
-
workspace: candidate.workspace,
|
|
305
|
-
conversationId: "",
|
|
306
|
-
disabledTools: denied,
|
|
307
|
-
toolAllowlist: candidate.toolAllowlist
|
|
308
|
-
}).some((tool) => tool.name === name);
|
|
309
|
-
const activatable = this.getLazyCapabilityToolNames().includes(name);
|
|
310
|
-
return {
|
|
311
|
-
condition: `tool:${name}`,
|
|
312
|
-
state: registered || activatable ? "verified" : "blocked",
|
|
313
|
-
reasonCode: registered ? "tool_registered" : activatable ? "tool_activatable" : "tool_not_registered",
|
|
314
|
-
detail: candidate.tools[name]?.mode === "ask" ? "Runtime approval is still required" : "Registration checked; execution environment is checked by the tool"
|
|
315
|
-
};
|
|
316
|
-
}),
|
|
319
|
+
getAgentToolAvailability: this.deps.getAgentToolAvailability ?? ((candidateId, name) => this.getAgentToolAvailability(candidateId, name)),
|
|
317
320
|
getAgentSkillAvailability: this.deps.getAgentSkillAvailability,
|
|
318
321
|
getWorkspace: () => this.deps.workspace,
|
|
319
322
|
getConfig: () => this.deps.getConfig?.(),
|
|
@@ -611,7 +614,14 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
611
614
|
}
|
|
612
615
|
})] : [],
|
|
613
616
|
...optionalTools,
|
|
614
|
-
...personalExecution ? [
|
|
617
|
+
...personalExecution ? [
|
|
618
|
+
createPersonalRequestResultTool(currentConversationId),
|
|
619
|
+
createPersonalRequestConnectionTool(currentConversationId),
|
|
620
|
+
createTaskCollaborationTool({
|
|
621
|
+
...productToolDeps,
|
|
622
|
+
getCurrentConversationId: currentConversationId
|
|
623
|
+
})
|
|
624
|
+
] : []
|
|
615
625
|
];
|
|
616
626
|
if ([
|
|
617
627
|
"read_file",
|
|
@@ -634,7 +644,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
634
644
|
allowHostGit: () => getCommandIsolation()?.mode !== "docker"
|
|
635
645
|
}));
|
|
636
646
|
}
|
|
637
|
-
const selected = filterToolsByDisabledSet(core.map(markCodemodeCoreRead), disabled).filter((tool) => (!allowed || allowed.has(tool.name)) && !(personalToolsConfigured && tool.name === "clarify")).map((tool) => personalToolsConfigured && PERSONAL_TOOL_DESCRIPTIONS[tool.name] ? {
|
|
647
|
+
const selected = filterToolsByDisabledSet(core.map(markCodemodeCoreRead), disabled).filter((tool) => (!allowed || allowed.has(tool.name)) && !(personalToolsConfigured && tool.name === "clarify")).map((tool) => personalToolsConfigured && !tool.name.startsWith("personal_") && PERSONAL_TOOL_DESCRIPTIONS[tool.name] ? {
|
|
638
648
|
...tool,
|
|
639
649
|
description: PERSONAL_TOOL_DESCRIPTIONS[tool.name]
|
|
640
650
|
} : tool);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { checkUrlSafety, checkWebsiteBlocklist } from "./url-safety.js";
|
|
2
|
-
import { lookup } from "node:dns";
|
|
3
2
|
import { Agent, fetch } from "undici";
|
|
3
|
+
import { lookup } from "node:dns";
|
|
4
4
|
//#region src/agent/tools/fetch-text.ts
|
|
5
5
|
/** Validate each redirect and the address actually used for the connection. */
|
|
6
6
|
async function fetchPublicText(input, blocklist, signal) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { getAgentDefaultImageGenerationModelConfig, init_schema } from "../../config/schema.js";
|
|
2
|
+
import { readWorkspaceFile, writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
2
3
|
import { imageAssetFromDataUrl, imageFileExtensionForMimeType, mimeTypeFromFileName, parseImageDataUrl, sniffImageMimeType } from "../image/generation/image-assets.js";
|
|
3
|
-
import {
|
|
4
|
+
import { persistToolMedia } from "./tool-media.js";
|
|
4
5
|
import { buildCapabilityPlansForConfig } from "../../capabilities/readiness/from-config.js";
|
|
5
6
|
import "../../capabilities/readiness/index.js";
|
|
6
7
|
import { applyImageGenerationModelConfigDefaults } from "../image/image-helpers.js";
|
|
7
|
-
import { readWorkspaceFile, writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
8
|
-
import { persistToolMedia } from "./tool-media.js";
|
|
9
8
|
import { isFailoverError } from "../failover-error.js";
|
|
9
|
+
import { getImageGenerationProvider } from "../image/generation/provider-registry.js";
|
|
10
10
|
import { generateImage, listImageGenerationProvidersSummary } from "../image/generation/runtime.js";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import { randomBytes } from "node:crypto";
|
|
@@ -43,3 +43,4 @@ export { createImageGenerateTool, resolveImageGenerationModelConfigForTool } fro
|
|
|
43
43
|
export { truncateHead, truncateTail, truncateLine, formatSize, type TruncationResult, type TruncationOptions, DEFAULT_MAX_LINES, DEFAULT_MAX_BYTES, GREP_MAX_LINE_LENGTH, } from './truncate.js';
|
|
44
44
|
export { normalizeToLF, restoreLineEndings, normalizeForFuzzyMatch, fuzzyFindText, stripBom, generateDiffString, type FuzzyMatchResult, } from './edit-diff.js';
|
|
45
45
|
export { createPersonalReadTool } from './personal-read-tool.js';
|
|
46
|
+
export { createTaskCollaborationTool } from './task-collaboration-tool.js';
|