@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
|
@@ -2,39 +2,35 @@ import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
|
2
2
|
import { type MatchingContext } from '../../agent-matching/service.js';
|
|
3
3
|
export { getAvailablePersonalAgentTools, personalAgentModelAvailability } from '../../personal-agent/specialist-capabilities.js';
|
|
4
4
|
import { type XopcUseToolDeps } from './xopc-use-tool.js';
|
|
5
|
-
declare const
|
|
6
|
-
command: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"agents">, import("@sinclair/typebox").TLiteral<"match">, import("@sinclair/typebox").TLiteral<"selection">, import("@sinclair/typebox").TLiteral<"create">, import("@sinclair/typebox").TLiteral<"list">, import("@sinclair/typebox").TLiteral<"get">, import("@sinclair/typebox").TLiteral<"instruct">, import("@sinclair/typebox").TLiteral<"answer">]>;
|
|
5
|
+
declare const PersonalTaskModelSchema: import("@sinclair/typebox").TObject<{
|
|
7
6
|
requirements: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
8
7
|
version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TLiteral<1>>;
|
|
9
8
|
summary: import("@sinclair/typebox").TString;
|
|
10
|
-
domain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
11
|
-
taskType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
9
|
inputKinds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
13
10
|
outputKinds: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
domain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
12
|
+
taskType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
16
13
|
requestedAgentId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
17
14
|
}>>;
|
|
18
|
-
|
|
19
|
-
selectionSource: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"snapshot">, import("@sinclair/typebox").TLiteral<"match">, import("@sinclair/typebox").TLiteral<"explicit">]>>;
|
|
20
|
-
previousSelectionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
21
|
-
matchId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
15
|
+
command: import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<"get" | "answer" | "retry_allocation" | "selection" | "list" | "cancel" | "entry" | "submit" | "instruct" | "collaboration">[]>;
|
|
22
16
|
requestId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
23
|
-
cursor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
24
|
-
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
25
17
|
title: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
26
|
-
objective: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
27
|
-
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
28
|
-
agentId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
29
18
|
taskId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
30
|
-
|
|
31
|
-
|
|
19
|
+
requiredSkills: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
20
|
+
idempotencyKey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
21
|
+
objective: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
32
22
|
expectedOutputs: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
33
23
|
acceptanceCriteria: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
34
24
|
constraints: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
description: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
26
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
27
|
+
offset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
28
|
+
instruction: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
29
|
+
section: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<import("@sinclair/typebox").TLiteral<string>[]>>;
|
|
30
|
+
entryId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
31
|
+
afterSequence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
32
|
+
bodyOffset: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
33
|
+
questionId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
38
34
|
}>;
|
|
39
35
|
export interface PersonalTaskToolDeps extends XopcUseToolDeps {
|
|
40
36
|
getAgentToolAvailability?: MatchingContext['getAgentToolAvailability'];
|
|
@@ -56,4 +52,4 @@ export declare function buildPersonalTaskBrief(input: {
|
|
|
56
52
|
body?: string;
|
|
57
53
|
};
|
|
58
54
|
/** A narrow Task surface for the fast personal conversation. */
|
|
59
|
-
export declare function createPersonalTaskTool(deps: PersonalTaskToolDeps): AgentTool<typeof
|
|
55
|
+
export declare function createPersonalTaskTool(deps: PersonalTaskToolDeps): AgentTool<typeof PersonalTaskModelSchema, Record<string, never>>;
|
|
@@ -1,30 +1,47 @@
|
|
|
1
1
|
import { normalizeSpecialistRequirements } from "../../../packages/gateway-contract/src/specialists.js";
|
|
2
|
+
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
3
|
+
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
4
|
+
import { getSessionInputState, init_session_input_repository } from "../../storage/sqlite/session-input-repository.js";
|
|
5
|
+
import { TaskRepository, init_task_repository } from "../../tasks/task-repository.js";
|
|
2
6
|
import { getPersonalRequest, init_request_repository } from "../../personal-agent/request-repository.js";
|
|
3
7
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
4
8
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
5
|
-
import {
|
|
9
|
+
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
10
|
+
import { TaskAllocationRepository } from "../../tasks/task-allocation-repository.js";
|
|
11
|
+
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
12
|
+
import { boundedPersonalResult } from "./personal-result-budget.js";
|
|
13
|
+
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
14
|
+
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
15
|
+
import { createXopcUseTool } from "./xopc-use-tool.js";
|
|
6
16
|
import { getAvailablePersonalAgentTools, personalAgentModelAvailability } from "../../personal-agent/specialist-capabilities.js";
|
|
7
17
|
import { assessSpecialist, matchSpecialists } from "../../agent-matching/service.js";
|
|
18
|
+
import { AgentSelectionRepository, selectionRequestHash } from "../../agent-matching/selection-repository.js";
|
|
8
19
|
import { assertSpecialistEligible, createSelectedTask } from "../../agent-matching/delegation-service.js";
|
|
9
|
-
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
10
20
|
import { PERSONAL_WORKER_RESULT_GUIDANCE } from "../../personal-agent/communication.js";
|
|
11
|
-
import {
|
|
12
|
-
import { createXopcUseTool } from "./xopc-use-tool.js";
|
|
21
|
+
import { cancelPersonalTask } from "../../personal-agent/task-cancel.js";
|
|
13
22
|
import { randomUUID } from "node:crypto";
|
|
14
23
|
import { Type } from "@sinclair/typebox";
|
|
15
24
|
//#region src/agent/tools/personal-task-tool.ts
|
|
25
|
+
init_src();
|
|
16
26
|
init_sqlite();
|
|
27
|
+
init_session_input_repository();
|
|
17
28
|
init_request_repository();
|
|
29
|
+
init_task_repository();
|
|
18
30
|
const PersonalTaskSchema = Type.Object({
|
|
19
31
|
command: Type.Union([
|
|
32
|
+
Type.Literal("retry_allocation"),
|
|
33
|
+
Type.Literal("submit"),
|
|
20
34
|
Type.Literal("agents"),
|
|
21
35
|
Type.Literal("match"),
|
|
22
36
|
Type.Literal("selection"),
|
|
23
37
|
Type.Literal("create"),
|
|
24
38
|
Type.Literal("list"),
|
|
25
39
|
Type.Literal("get"),
|
|
40
|
+
Type.Literal("collaboration"),
|
|
41
|
+
Type.Literal("entry"),
|
|
26
42
|
Type.Literal("instruct"),
|
|
27
|
-
Type.Literal("answer")
|
|
43
|
+
Type.Literal("answer"),
|
|
44
|
+
Type.Literal("cancel")
|
|
28
45
|
]),
|
|
29
46
|
requirements: Type.Optional(Type.Object({
|
|
30
47
|
version: Type.Optional(Type.Literal(1)),
|
|
@@ -35,7 +52,10 @@ const PersonalTaskSchema = Type.Object({
|
|
|
35
52
|
outputKinds: Type.Optional(Type.Array(Type.String())),
|
|
36
53
|
requiredTools: Type.Optional(Type.Array(Type.String())),
|
|
37
54
|
requiredSkills: Type.Optional(Type.Array(Type.String())),
|
|
38
|
-
requestedAgentId: Type.Optional(Type.String(
|
|
55
|
+
requestedAgentId: Type.Optional(Type.String({
|
|
56
|
+
minLength: 1,
|
|
57
|
+
description: "Only an executor explicitly named by the human user. Omit this field when the background router should choose; never infer it from the specialist directory."
|
|
58
|
+
}))
|
|
39
59
|
})),
|
|
40
60
|
selectionReason: Type.Optional(Type.String({ maxLength: 500 })),
|
|
41
61
|
selectionSource: Type.Optional(Type.Union([
|
|
@@ -48,23 +68,110 @@ const PersonalTaskSchema = Type.Object({
|
|
|
48
68
|
requestId: Type.Optional(Type.String()),
|
|
49
69
|
cursor: Type.Optional(Type.String()),
|
|
50
70
|
offset: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
71
|
+
limit: Type.Optional(Type.Integer({
|
|
72
|
+
minimum: 1,
|
|
73
|
+
maximum: 20
|
|
74
|
+
})),
|
|
51
75
|
title: Type.Optional(Type.String({ description: "Short task title, ideally under 60 characters. Do not put the full instructions here." })),
|
|
52
|
-
objective: Type.Optional(Type.String({
|
|
53
|
-
|
|
76
|
+
objective: Type.Optional(Type.String({
|
|
77
|
+
minLength: 1,
|
|
78
|
+
description: "One-sentence outcome for a new delegated Task."
|
|
79
|
+
})),
|
|
80
|
+
description: Type.Optional(Type.String({
|
|
81
|
+
minLength: 1,
|
|
82
|
+
description: "Complete Markdown brief preserving the user request, input references, and delivery expectations. Optional structured fields need not repeat it."
|
|
83
|
+
})),
|
|
54
84
|
agentId: Type.Optional(Type.String({ description: "Specialist Agent ID. Never use your own ID." })),
|
|
55
85
|
taskId: Type.Optional(Type.String()),
|
|
56
86
|
instruction: Type.Optional(Type.String({ description: "The user’s new direction for this delegated Task." })),
|
|
87
|
+
entryId: Type.Optional(Type.String({ description: "Read one complete collaboration entry, including its question or instruction body." })),
|
|
88
|
+
afterSequence: Type.Optional(Type.Integer({ minimum: 0 })),
|
|
89
|
+
bodyOffset: Type.Optional(Type.Integer({
|
|
90
|
+
minimum: 0,
|
|
91
|
+
description: "Character offset for an entry body; follow nextBodyOffset until absent."
|
|
92
|
+
})),
|
|
93
|
+
section: Type.Optional(Type.Union([
|
|
94
|
+
"task",
|
|
95
|
+
"waits",
|
|
96
|
+
"runs",
|
|
97
|
+
"receipts",
|
|
98
|
+
"context",
|
|
99
|
+
"conversation",
|
|
100
|
+
"sessions",
|
|
101
|
+
"authorityGrants",
|
|
102
|
+
"dependencies",
|
|
103
|
+
"dependents",
|
|
104
|
+
"criterionReviews"
|
|
105
|
+
].map((value) => Type.Literal(value)))),
|
|
57
106
|
questionId: Type.Optional(Type.String({ description: "Collaboration question ID to answer." })),
|
|
58
107
|
expectedOutputs: Type.Optional(Type.Array(Type.String())),
|
|
59
108
|
acceptanceCriteria: Type.Optional(Type.Array(Type.String())),
|
|
60
109
|
constraints: Type.Optional(Type.Array(Type.String())),
|
|
61
110
|
requiredSkills: Type.Optional(Type.Array(Type.String({
|
|
62
111
|
minLength: 1,
|
|
63
|
-
description: "
|
|
112
|
+
description: "Only Skill names explicitly requested by the user. Forward them to the background router for validation; omit otherwise."
|
|
64
113
|
}))),
|
|
65
114
|
requiredTools: Type.Optional(Type.Array(Type.String({ description: "Tool names needed for this Task. Use names returned by agents; omit when matching by role or expertise." }))),
|
|
66
115
|
idempotencyKey: Type.Optional(Type.String())
|
|
67
116
|
});
|
|
117
|
+
const PersonalTaskModelSchema = Type.Object({
|
|
118
|
+
...Type.Omit(PersonalTaskSchema, [
|
|
119
|
+
"agentId",
|
|
120
|
+
"selectionReason",
|
|
121
|
+
"selectionSource",
|
|
122
|
+
"previousSelectionId",
|
|
123
|
+
"matchId",
|
|
124
|
+
"cursor",
|
|
125
|
+
"requiredTools"
|
|
126
|
+
]).properties,
|
|
127
|
+
requirements: Type.Optional(Type.Omit(PersonalTaskSchema.properties.requirements, ["requiredTools", "requiredSkills"], { additionalProperties: false })),
|
|
128
|
+
command: Type.Union([
|
|
129
|
+
"submit",
|
|
130
|
+
"list",
|
|
131
|
+
"get",
|
|
132
|
+
"collaboration",
|
|
133
|
+
"entry",
|
|
134
|
+
"instruct",
|
|
135
|
+
"answer",
|
|
136
|
+
"retry_allocation",
|
|
137
|
+
"selection",
|
|
138
|
+
"cancel"
|
|
139
|
+
].map((command) => Type.Literal(command)))
|
|
140
|
+
}, {
|
|
141
|
+
additionalProperties: false,
|
|
142
|
+
anyOf: [
|
|
143
|
+
{
|
|
144
|
+
properties: { command: { const: "submit" } },
|
|
145
|
+
required: ["objective", "description"]
|
|
146
|
+
},
|
|
147
|
+
{ properties: { command: { enum: ["list", "selection"] } } },
|
|
148
|
+
{
|
|
149
|
+
properties: { command: { enum: [
|
|
150
|
+
"get",
|
|
151
|
+
"collaboration",
|
|
152
|
+
"retry_allocation",
|
|
153
|
+
"cancel"
|
|
154
|
+
] } },
|
|
155
|
+
required: ["taskId"]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
properties: { command: { const: "entry" } },
|
|
159
|
+
required: ["taskId", "entryId"]
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
properties: { command: { const: "instruct" } },
|
|
163
|
+
required: ["taskId", "instruction"]
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
properties: { command: { const: "answer" } },
|
|
167
|
+
required: [
|
|
168
|
+
"taskId",
|
|
169
|
+
"instruction",
|
|
170
|
+
"questionId"
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
]
|
|
174
|
+
});
|
|
68
175
|
const MAX_PERSONAL_TASK_TITLE = 60;
|
|
69
176
|
function buildPersonalTaskBrief(input) {
|
|
70
177
|
const fullObjective = input.objective.trim();
|
|
@@ -86,18 +193,20 @@ function createPersonalTaskTool(deps) {
|
|
|
86
193
|
return {
|
|
87
194
|
name: "personal_task",
|
|
88
195
|
label: "Personal Task",
|
|
89
|
-
description: "
|
|
90
|
-
parameters:
|
|
196
|
+
description: "Submit objective and a concise complete description, then return after local persistence. Preserve the user request and source references without inventing an execution plan or extra requirements. Omit optional structured fields when they merely repeat the description. Describe required capabilities in the brief; the background Task Router selects one executor and checks its tools. Do not read input files, select Agents or invent tool names before submit. Set requirements.requestedAgentId only for an executor explicitly named by the user, using their ID or display name; preserve explicitly requested requiredSkills. get reads Task state, waits, runs, receipts and context; use section and limit/offset for complete paginated details. collaboration reads ordered message previews with afterSequence; entry reads exact message bodies using entryId and nextBodyOffset. Read full questions before answering. Delivery pending means saved, delivered means sent, confirmed means the executor acknowledged it; confirmation alone is not verified completion. get/list inspect existing Tasks with limit/offset; cancel stops a Task on explicit user instruction and reports execution stop confirmation; instruct/answer send context; retry_allocation retries selection before execution; selection explains assignment. Status and results return automatically. Preserve idempotencyKey on uncertain retries. Report only confirmed states.",
|
|
197
|
+
parameters: PersonalTaskModelSchema,
|
|
91
198
|
mutatesWorkspace: true,
|
|
92
199
|
mutationScope: "external",
|
|
93
200
|
requiresExclusiveWorkspaceLock: false,
|
|
94
201
|
finalGuardRelevant: true,
|
|
95
|
-
async execute(toolCallId,
|
|
202
|
+
async execute(toolCallId, modelInput, signal) {
|
|
203
|
+
const input = modelInput;
|
|
96
204
|
const conversationId = deps.getCurrentConversationId?.();
|
|
97
205
|
const ownAgentId = deps.getCurrentAgentId?.();
|
|
98
206
|
if (!conversationId || !ownAgentId || !isPersonalConversation(conversationId)) throw new Error("Personal conversation context is unavailable");
|
|
99
207
|
const requirements = normalizeSpecialistRequirements({
|
|
100
208
|
...input.requirements,
|
|
209
|
+
requestedAgentId: input.requirements?.requestedAgentId?.trim() || void 0,
|
|
101
210
|
version: 1,
|
|
102
211
|
summary: input.requirements?.summary ?? (input.objective?.trim() || "Specialist discovery").slice(0, 300),
|
|
103
212
|
requiredTools: [...input.requirements?.requiredTools ?? [], ...input.requiredTools ?? []],
|
|
@@ -150,13 +259,28 @@ function createPersonalTaskTool(deps) {
|
|
|
150
259
|
}
|
|
151
260
|
if (input.command === "selection") {
|
|
152
261
|
if (!(input.taskId ? new TaskOriginRepository().owns(input.taskId, conversationId) : input.requestId ? getPersonalRequest(input.requestId)?.conversationId === conversationId : true)) throw new Error("Task or Request does not belong to this personal conversation");
|
|
262
|
+
const offset = input.offset ?? 0;
|
|
263
|
+
const limit = input.limit ?? 10;
|
|
264
|
+
const rows = new AgentSelectionRepository().list(conversationId, {
|
|
265
|
+
taskId: input.taskId,
|
|
266
|
+
requestId: input.requestId,
|
|
267
|
+
offset,
|
|
268
|
+
limit: limit + 1
|
|
269
|
+
});
|
|
270
|
+
const items = rows.slice(0, limit).map(({ candidates: _candidates, assessment, ...record }) => ({
|
|
271
|
+
...record,
|
|
272
|
+
executor: {
|
|
273
|
+
id: assessment.id,
|
|
274
|
+
name: assessment.name
|
|
275
|
+
}
|
|
276
|
+
}));
|
|
153
277
|
return {
|
|
154
278
|
content: [{
|
|
155
279
|
type: "text",
|
|
156
|
-
text: JSON.stringify(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
offset:
|
|
280
|
+
text: JSON.stringify(boundedPersonalResult({
|
|
281
|
+
items,
|
|
282
|
+
offset,
|
|
283
|
+
...rows.length > limit ? { nextOffset: offset + items.length } : {}
|
|
160
284
|
}))
|
|
161
285
|
}],
|
|
162
286
|
details: {}
|
|
@@ -166,7 +290,37 @@ function createPersonalTaskTool(deps) {
|
|
|
166
290
|
let pendingSelection;
|
|
167
291
|
let command = input.command;
|
|
168
292
|
let args = {};
|
|
169
|
-
if (command === "
|
|
293
|
+
if (command === "submit") {
|
|
294
|
+
const objective = input.objective?.trim();
|
|
295
|
+
if (!objective || !input.description?.trim()) throw new Error("objective and a complete description are required");
|
|
296
|
+
if (input.agentId) throw new Error("Use requirements.requestedAgentId for an explicitly requested executor");
|
|
297
|
+
const brief = buildPersonalTaskBrief({
|
|
298
|
+
title: input.title,
|
|
299
|
+
objective,
|
|
300
|
+
description: input.description
|
|
301
|
+
});
|
|
302
|
+
const inputId = getSessionInputState(conversationId).activeInputId;
|
|
303
|
+
const submissionKey = input.idempotencyKey?.trim() || selectionRequestHash({
|
|
304
|
+
sourceInput: inputId ?? toolCallId,
|
|
305
|
+
brief,
|
|
306
|
+
requirements,
|
|
307
|
+
expectedOutputs: input.expectedOutputs,
|
|
308
|
+
acceptanceCriteria: input.acceptanceCriteria,
|
|
309
|
+
constraints: input.constraints
|
|
310
|
+
});
|
|
311
|
+
command = "create";
|
|
312
|
+
args = {
|
|
313
|
+
...brief,
|
|
314
|
+
createMode: "allocate",
|
|
315
|
+
requirements,
|
|
316
|
+
includeConversationContext: false,
|
|
317
|
+
expectedOutputs: input.expectedOutputs ?? [],
|
|
318
|
+
acceptanceCriteria: input.acceptanceCriteria ?? [],
|
|
319
|
+
constraints: input.constraints ?? [],
|
|
320
|
+
idempotencyKey: `personal-submit:${conversationId}:${selectionRequestHash(submissionKey)}`
|
|
321
|
+
};
|
|
322
|
+
if (requirements.requiredSkills?.length) args.body = `${brief.body}\n\nRequired Skills: ${requirements.requiredSkills.join(", ")}. Read and follow these Skills before execution.`;
|
|
323
|
+
} else if (command === "create") {
|
|
170
324
|
const objective = input.objective?.trim();
|
|
171
325
|
const agentId = input.agentId?.trim();
|
|
172
326
|
if (!objective || !agentId) throw new Error("objective and specialist agentId are required");
|
|
@@ -250,12 +404,81 @@ function createPersonalTaskTool(deps) {
|
|
|
250
404
|
};
|
|
251
405
|
} else if (command === "list") {
|
|
252
406
|
command = "delegated_tasks";
|
|
253
|
-
args = {
|
|
407
|
+
args = {
|
|
408
|
+
limit: input.limit ?? 10,
|
|
409
|
+
offset: input.offset ?? 0
|
|
410
|
+
};
|
|
254
411
|
} else {
|
|
255
412
|
const taskId = input.taskId?.trim();
|
|
256
413
|
if (!taskId) throw new Error("taskId is required");
|
|
257
414
|
if (!new TaskOriginRepository().owns(taskId, conversationId)) throw new Error("Task does not belong to this personal conversation");
|
|
258
|
-
if (command === "
|
|
415
|
+
if (command === "collaboration" || command === "entry") {
|
|
416
|
+
const board = new TaskCollaborationRepository();
|
|
417
|
+
if (command === "entry") {
|
|
418
|
+
const entry = input.entryId ? board.get(input.entryId) : void 0;
|
|
419
|
+
if (!entry || entry.taskId !== taskId) throw new Error("Entry does not belong to this Task");
|
|
420
|
+
const offset = input.bodyOffset ?? 0;
|
|
421
|
+
const body = entry.body.slice(offset, offset + 4e3);
|
|
422
|
+
const payload = {
|
|
423
|
+
ok: true,
|
|
424
|
+
entry: {
|
|
425
|
+
...entry,
|
|
426
|
+
body
|
|
427
|
+
},
|
|
428
|
+
bodyOffset: offset,
|
|
429
|
+
bodyLength: entry.body.length,
|
|
430
|
+
...offset + body.length < entry.body.length ? { nextBodyOffset: offset + body.length } : {}
|
|
431
|
+
};
|
|
432
|
+
return {
|
|
433
|
+
content: [{
|
|
434
|
+
type: "text",
|
|
435
|
+
text: JSON.stringify(payload)
|
|
436
|
+
}],
|
|
437
|
+
details: {}
|
|
438
|
+
};
|
|
439
|
+
}
|
|
440
|
+
const limit = input.limit ?? 10;
|
|
441
|
+
const entries = board.list(taskId, input.afterSequence ?? 0, limit + 1);
|
|
442
|
+
const items = entries.slice(0, limit).map((entry) => ({
|
|
443
|
+
...entry,
|
|
444
|
+
body: entry.body.slice(0, 600),
|
|
445
|
+
bodyLength: entry.body.length,
|
|
446
|
+
...entry.body.length > 600 ? {
|
|
447
|
+
excerpt: true,
|
|
448
|
+
readEntryId: entry.id
|
|
449
|
+
} : {}
|
|
450
|
+
}));
|
|
451
|
+
return {
|
|
452
|
+
content: [{
|
|
453
|
+
type: "text",
|
|
454
|
+
text: JSON.stringify({
|
|
455
|
+
ok: true,
|
|
456
|
+
items,
|
|
457
|
+
...entries.length > limit ? { nextAfterSequence: items.at(-1)?.sequence } : {}
|
|
458
|
+
})
|
|
459
|
+
}],
|
|
460
|
+
details: {}
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
if (command === "cancel") {
|
|
464
|
+
const result = await cancelPersonalTask(taskId, conversationId, input.idempotencyKey ?? toolCallId);
|
|
465
|
+
deps.dispatchTaskRuns?.();
|
|
466
|
+
return {
|
|
467
|
+
content: [{
|
|
468
|
+
type: "text",
|
|
469
|
+
text: JSON.stringify(result)
|
|
470
|
+
}],
|
|
471
|
+
details: {}
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
if (command === "retry_allocation") {
|
|
475
|
+
command = "command";
|
|
476
|
+
args = {
|
|
477
|
+
taskId,
|
|
478
|
+
type: "retry_allocation",
|
|
479
|
+
expectedVersion: new TaskRepository().require(taskId).version
|
|
480
|
+
};
|
|
481
|
+
} else if (command === "instruct" || command === "answer") {
|
|
259
482
|
const body = input.instruction?.trim();
|
|
260
483
|
if (!body) throw new Error("instruction is required");
|
|
261
484
|
if (command === "answer" && !input.questionId?.trim()) throw new Error("questionId is required");
|
|
@@ -264,17 +487,126 @@ function createPersonalTaskTool(deps) {
|
|
|
264
487
|
taskId,
|
|
265
488
|
kind: input.command === "answer" ? "answer" : "instruction",
|
|
266
489
|
body,
|
|
490
|
+
idempotencyKey: input.idempotencyKey?.trim() || `personal-collaboration:${selectionRequestHash({
|
|
491
|
+
inputId: getSessionInputState(conversationId).activeInputId ?? toolCallId,
|
|
492
|
+
taskId,
|
|
493
|
+
kind: input.command,
|
|
494
|
+
body,
|
|
495
|
+
questionId: input.questionId
|
|
496
|
+
})}`,
|
|
267
497
|
...input.command === "answer" ? { causationId: input.questionId.trim() } : {}
|
|
268
498
|
};
|
|
269
499
|
} else args = { taskId };
|
|
270
500
|
}
|
|
271
501
|
try {
|
|
502
|
+
const result = await selectedProductTool.execute(toolCallId, {
|
|
503
|
+
mode: "task",
|
|
504
|
+
command,
|
|
505
|
+
args
|
|
506
|
+
}, signal, void 0);
|
|
507
|
+
if ((input.command === "answer" || input.command === "instruct") && input.taskId && result.details.result && result.details.result.ok !== false) {
|
|
508
|
+
const allocation = new TaskAllocationRepository().get(input.taskId);
|
|
509
|
+
if (allocation && ["blocked", "failed"].includes(allocation.status)) {
|
|
510
|
+
new TaskApplicationService().execute({
|
|
511
|
+
taskId: input.taskId,
|
|
512
|
+
expectedVersion: new TaskRepository().require(input.taskId).version,
|
|
513
|
+
idempotencyKey: `allocation-answer:${toolCallId}`,
|
|
514
|
+
command: { type: "retry_allocation" },
|
|
515
|
+
actor: {
|
|
516
|
+
kind: "agent",
|
|
517
|
+
id: ownAgentId
|
|
518
|
+
}
|
|
519
|
+
});
|
|
520
|
+
deps.dispatchTaskRuns?.();
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
const payload = result.details.result;
|
|
524
|
+
if (payload?.ok === true && input.command === "submit") {
|
|
525
|
+
const task = payload.task;
|
|
526
|
+
const confirmation = {
|
|
527
|
+
ok: true,
|
|
528
|
+
task: {
|
|
529
|
+
id: task.id,
|
|
530
|
+
title: task.title,
|
|
531
|
+
phase: task.phase,
|
|
532
|
+
version: task.version
|
|
533
|
+
},
|
|
534
|
+
operationalState: payload.operationalState,
|
|
535
|
+
allocation: payload.allocation,
|
|
536
|
+
runId: payload.runId
|
|
537
|
+
};
|
|
538
|
+
return {
|
|
539
|
+
content: [{
|
|
540
|
+
type: "text",
|
|
541
|
+
text: appendProductDeliveryText(JSON.stringify(confirmation, null, 2), result.details.delivery)
|
|
542
|
+
}],
|
|
543
|
+
details: {}
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
if (payload && input.command === "get") {
|
|
547
|
+
const offset = input.offset ?? 0;
|
|
548
|
+
const limit = input.limit ?? 10;
|
|
549
|
+
const read = input.section ? {
|
|
550
|
+
ok: payload.ok,
|
|
551
|
+
[input.section]: payload[input.section]
|
|
552
|
+
} : { ...payload };
|
|
553
|
+
const pagination = {};
|
|
554
|
+
for (const key of [
|
|
555
|
+
"waits",
|
|
556
|
+
"runs",
|
|
557
|
+
"receipts",
|
|
558
|
+
"context",
|
|
559
|
+
"sessions",
|
|
560
|
+
"authorityGrants",
|
|
561
|
+
"dependencies",
|
|
562
|
+
"dependents",
|
|
563
|
+
"criterionReviews"
|
|
564
|
+
]) {
|
|
565
|
+
const value = read[key];
|
|
566
|
+
if (!Array.isArray(value)) continue;
|
|
567
|
+
read[key] = value.slice(offset, offset + limit);
|
|
568
|
+
pagination[key] = {
|
|
569
|
+
total: value.length,
|
|
570
|
+
offset,
|
|
571
|
+
...offset + limit < value.length ? { nextOffset: offset + limit } : {}
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
if (!input.section) {
|
|
575
|
+
read.collaboration = new TaskCollaborationRepository().recent(input.taskId, void 0, 10).map((entry) => ({
|
|
576
|
+
...entry,
|
|
577
|
+
body: entry.body.slice(0, 600),
|
|
578
|
+
bodyLength: entry.body.length,
|
|
579
|
+
...entry.body.length > 600 ? {
|
|
580
|
+
excerpt: true,
|
|
581
|
+
readEntryId: entry.id
|
|
582
|
+
} : {}
|
|
583
|
+
}));
|
|
584
|
+
read.allocation = new TaskAllocationRepository().summary(input.taskId);
|
|
585
|
+
read.guidance = "Read entry for complete question/instruction bodies; collaboration with afterSequence pages the whole board. get(section, offset) pages state details. pending is saved, delivered is sent, confirmed is acknowledged; verification and Task acceptance are separate.";
|
|
586
|
+
}
|
|
587
|
+
return {
|
|
588
|
+
content: [{
|
|
589
|
+
type: "text",
|
|
590
|
+
text: JSON.stringify({
|
|
591
|
+
...read,
|
|
592
|
+
pagination
|
|
593
|
+
})
|
|
594
|
+
}],
|
|
595
|
+
details: {}
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
if (payload && input.command === "list") return {
|
|
599
|
+
content: [{
|
|
600
|
+
type: "text",
|
|
601
|
+
text: JSON.stringify(boundedPersonalResult({
|
|
602
|
+
...payload,
|
|
603
|
+
offset: input.offset ?? 0
|
|
604
|
+
}))
|
|
605
|
+
}],
|
|
606
|
+
details: {}
|
|
607
|
+
};
|
|
272
608
|
return {
|
|
273
|
-
content:
|
|
274
|
-
mode: "task",
|
|
275
|
-
command,
|
|
276
|
-
args
|
|
277
|
-
}, signal, void 0)).content,
|
|
609
|
+
content: result.content,
|
|
278
610
|
details: {}
|
|
279
611
|
};
|
|
280
612
|
} catch (error) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { turnOutcomeKindFromFileName, turnOutcomeMimeTypeFromFileName } from "../../../packages/gateway-contract/src/turn-outcome.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
-
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
4
|
-
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
5
3
|
import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
|
|
6
4
|
import { readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
5
|
+
import { resolvePathUnderWorkspace } from "./tool-paths.js";
|
|
6
|
+
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
7
7
|
import { persistToolMedia } from "./tool-media.js";
|
|
8
8
|
import { basename, isAbsolute, relative, sep } from "node:path";
|
|
9
9
|
import { realpath } from "node:fs/promises";
|
|
@@ -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";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AgentTool } from '@earendil-works/pi-agent-core';
|
|
2
|
+
import { type XopcUseToolDeps } from './xopc-use-tool.js';
|
|
3
|
+
declare const Schema: import("@sinclair/typebox").TObject<{
|
|
4
|
+
command: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"get">, import("@sinclair/typebox").TLiteral<"post">]>;
|
|
5
|
+
section: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"collaboration">, import("@sinclair/typebox").TLiteral<"task">]>>;
|
|
6
|
+
kind: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"progress">, import("@sinclair/typebox").TLiteral<"question">, import("@sinclair/typebox").TLiteral<"ack">]>>;
|
|
7
|
+
body: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
8
|
+
causationId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
entryId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
|
+
afterSequence: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
11
|
+
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TInteger>;
|
|
12
|
+
idempotencyKey: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
13
|
+
}>;
|
|
14
|
+
/** Collaboration only: no product mutations, connection selection or external operations. */
|
|
15
|
+
export declare function createTaskCollaborationTool(deps: XopcUseToolDeps): AgentTool<typeof Schema>;
|
|
16
|
+
export {};
|