@xopcai/xopc 0.0.386 → 0.0.388
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-ext/dist/sidepanel.js +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/feishu/src/adapters/cli-login.js +3 -3
- package/dist/extensions/feishu/src/outbound/media-load.js +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/{agent-avatar-dicebear-D-86VOlb.js → agent-avatar-dicebear-44LqtGte.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-SmeUVHY8.js → agent-defaults-settings-panel-2VA4eKPf.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-BVT3wXq5.js → agent-plugin-dialog-DRhTOw_O.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-D7rLQFhX.js → agents-BemUH_Yf.js} +3 -3
- package/dist/gateway/static/root/assets/{app-management-settings-panel-CUR7n5iP.js → app-management-settings-panel-CR_cc7rj.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-BCotSGep.js → appearance-settings-CYofu-su.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-hk0bo9LT.js → apps-page-CHjWvDjk.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-CqxuUwox.js → automations-page-BIF0skon.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-11_Z69pr.js → automations-workspace-DOwtT4sS.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-eldB84Mj.js → block-editor-C_RD603p.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-automations-page-D4TaUPYT.js → browser-automations-page-B-Ezk_8l.js} +1 -1
- package/dist/gateway/static/root/assets/{browser-settings-page-BXRlxeGV.js → browser-settings-page-BSmmTBn4.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-DVj9n65C.js → capabilities-BX1rCiVm.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BkKgImWi.js → capabilities-CW389yo6.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-page-CyYlueEd.js → capabilities-page-xZgTYYDn.js} +2 -2
- package/dist/gateway/static/root/assets/{capabilities-settings-panel-uVEgfvo0.js → capabilities-settings-panel-oqkuOjcR.js} +3 -3
- package/dist/gateway/static/root/assets/{capability-header-actions-BXv0xu56.js → capability-header-actions-Chuhscdb.js} +1 -1
- package/dist/gateway/static/root/assets/{channels-fNb3SOzm.js → channels-Dq2C2k9M.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-terminal-dock-CnLtparQ.js → chat-terminal-dock-srB_M-aQ.js} +1 -1
- package/dist/gateway/static/root/assets/{chunk-KS7C4IRE-BMYIfy9x.js → chunk-KS7C4IRE--EKdQGRF.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-xM0AnOlP.js → computer-settings-page-Af00Kjc0.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-CdG2WUb6.js → connector-service-page-3W0_7-4L.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-page-BRd08GH6.js → connectors-page-BZk-Gou5.js} +1 -1
- package/dist/gateway/static/root/assets/constants-DeXt1mV-.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-DIBbE-O8.js → date-picker-DBgZBmik.js} +1 -1
- package/dist/gateway/static/root/assets/{dependency-picker-DDD8zokD.js → dependency-picker-BDJ406kH.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-KlF390Xn.js → desktop-pet-Do1XPn6U.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CgqQMKDC.js → desktop-pet-settings-LKeVh6OH.js} +1 -1
- package/dist/gateway/static/root/assets/{device-pairing-wizard-BR6isfG2.js → device-pairing-wizard-CvZpnSVw.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-vPQsW05P.js → directory-picker-path-field-BMLHoL6g.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-ZHLPrLbH.js → extension-debug-page-B0wTBCx4.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DJ42KFRN.js → extension-page-vR2r4uUB.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-6IcsyNaV.js → extension-provider-CJZ5EVpQ.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-D7-5v0V4.js → extension-settings-page-1tbWe5xQ.js} +1 -1
- package/dist/gateway/static/root/assets/{fallback-models-DnYn7qOV.js → fallback-models-CW6a1-GK.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-Bwe3JWX-.js → gateway-settings-vQWTUx2c.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-DefTxF3q.js → highlighted-body-KQOG7T2V-BM__yiMn.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-hfWuVtcG.js +2 -0
- package/dist/gateway/static/root/assets/{imports-page-CTdBYZib.js → imports-page-CuR6RSUM.js} +1 -1
- package/dist/gateway/static/root/assets/index-CNH8vwcY.js +260 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CXKp57O_.js → keyboard-shortcuts-settings-DpyqH2cP.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-DzD_OzGY.js → local-app-workbench-page-B4hIoxV8.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-B0E0vttg.js → local-apps-page-S7lUpENM.js} +1 -1
- package/dist/gateway/static/root/assets/local-session-drafts-Be4BGM4Z.js +1 -0
- package/dist/gateway/static/root/assets/{logs-page-eL4fYcMl.js → logs-page-CSlZT1-L.js} +1 -1
- package/dist/gateway/static/root/assets/{management-settings-DSpjodMC.js → management-settings-BYCL5CwV.js} +1 -1
- package/dist/gateway/static/root/assets/{markdown-view-DHfQAvZQ.js → markdown-view-CBjl-XEc.js} +2 -2
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-i9N5shss.js +1 -0
- package/dist/gateway/static/root/assets/{note-detail-panel-CsY5tQp5.js → note-detail-panel-CJ5Earr_.js} +3 -3
- package/dist/gateway/static/root/assets/{notes-api-nqN2wKYc.js → notes-api-BlGP533W.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-D09LjNoj.js → notes-page-CPGk8-n1.js} +5 -5
- package/dist/gateway/static/root/assets/{page-context-capture-button-DO-aP3D9.js → page-context-capture-button-C2bSXVbz.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-E8F2aGNB.js → personal-page-BjTt5R3s.js} +1 -1
- package/dist/gateway/static/root/assets/product-open-page-Cn16lm5l.js +1 -0
- package/dist/gateway/static/root/assets/{product-preview-content-B-cz-pIV.js → product-preview-content-CowgeuoG.js} +1 -1
- package/dist/gateway/static/root/assets/{project-detail-page-WhefAh8E.js → project-detail-page-CyKx4PyN.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-CyqAs0tO.js → projects-page--_hXxUMC.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-BwhRGL6m.js → remote-access-hub-Bq_eqQYf.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-o26dmPNq.js → runtime-tools-settings-panel-BgCATci5.js} +1 -1
- package/dist/gateway/static/root/assets/{scenes-page-D_e19kv_.js → scenes-page-DxE3jRPR.js} +2 -2
- package/dist/gateway/static/root/assets/{schema-form-DLLdqUC3.js → schema-form-I6pzJJzg.js} +1 -1
- package/dist/gateway/static/root/assets/{send-session-input-2I-nFJcE.js → send-session-input-C293-Hbx.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-Co5ozD0l.js → session-manager-COd9RECl.js} +2 -2
- package/dist/gateway/static/root/assets/{sessions-page-DX6INsiS.js → sessions-page-CQkGFnJM.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Dtlsvsci.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-Bc_zxxRu.js → settings-page-Dy5oQDbx.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-FpF_cPPr.js → setup-status-panel-CrAazq4r.js} +1 -1
- package/dist/gateway/static/root/assets/{share-link-dialog-C47Xgzta.js → share-link-dialog-BKGI8Kr0.js} +1 -1
- package/dist/gateway/static/root/assets/{share-preview-page-BOCcPBqQ.js → share-preview-page-BF2WaO43.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-CInxjxgJ.js → shares-settings-BNMhs-Vd.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-Bjd8WAA4.js → skill-api-RIjxQs-Y.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-8CKS3Oo2.js → skills-page-XVOxILQn.js} +1 -1
- package/dist/gateway/static/root/assets/{system-settings-panel-BgQdsrNw.js → system-settings-panel-C8aLy8T_.js} +1 -1
- package/dist/gateway/static/root/assets/{task-detail-page-BnG5ehZ6.js → task-detail-page-o1O2IDVP.js} +2 -2
- package/dist/gateway/static/root/assets/{task-expandable-content-BCuc70Vc.js → task-expandable-content-C9ohICpw.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-CY7MoDGf.js → tunnel-api-JkDu1wiC.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-s8Sv_PIG.js → usage-page-B8K6Y4ro.js} +1 -1
- package/dist/gateway/static/root/assets/{use-composer-attachments-D0S2iZF4.js → use-composer-attachments-rgW7h4sD.js} +1 -1
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-BElqELib.js → use-file-preview-expanded-DSKIxfz9.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-CyWrEtHY.js → user-model-page-C1QX47VR.js} +2 -2
- package/dist/gateway/static/root/assets/{work-discovery-overlay-DmZXLs1v.js → work-discovery-overlay-BshsEDRO.js} +1 -1
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-BdLOzHm4.js → workflow-run-setup-panel-CRG3paWy.js} +1 -1
- package/dist/gateway/static/root/assets/{workflows-page-Cx3I3AV5.js → workflows-page-c-AoSVzm.js} +3 -3
- package/dist/gateway/static/root/assets/{workspace-api-Du7-xJ0q.js → workspace-api-JWHOFos6.js} +2 -2
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-D8B136vW.js → xopc-cloud-account-card-PDSIicr1.js} +1 -1
- package/dist/gateway/static/root/index.html +15 -15
- package/dist/package.js +1 -1
- package/dist/packages/gateway-contract/src/index.js +2 -0
- package/dist/packages/gateway-contract/src/result-reference.js +25 -0
- package/dist/packages/gateway-contract/src/session-input-command.js +2 -1
- package/dist/packages/gateway-contract/src/task-research-result.js +1 -0
- package/dist/packages/gateway-contract/src/task-result-delivery.js +21 -0
- package/dist/packages/gateway-contract/src/turn-outcome.js +1 -0
- package/dist/src/agent/agent-manager.js +16 -16
- 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 +9 -9
- package/dist/src/agent/child-agent-factory.js +1 -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/run-for-session.js +5 -5
- package/dist/src/agent/embedded/run-turn.js +13 -13
- package/dist/src/agent/embedded/session-runner.js +3 -3
- package/dist/src/agent/embedded/session-tool-result-guard.js +2 -2
- package/dist/src/agent/embedded/tool-result-truncation.js +1 -1
- package/dist/src/agent/embedded/xopc-tools-bridge.js +13 -2
- package/dist/src/agent/external-tools/cliProvider.js +4 -4
- package/dist/src/agent/external-tools/composio-provider.js +3 -3
- package/dist/src/agent/external-tools/endpoint-provider.js +4 -4
- package/dist/src/agent/external-tools/gateway-tools.js +3 -3
- 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/inbound/attachment-pipeline.js +4 -4
- package/dist/src/agent/inbound/inbound-loop.js +2 -2
- package/dist/src/agent/index.js +3 -3
- 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/llm-turn-retry.js +1 -1
- package/dist/src/agent/prompt/response-language.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.d.ts +2 -0
- package/dist/src/agent/service/direct-turn-helpers.js +8 -4
- package/dist/src/agent/service/process-direct-one-shot.js +4 -1
- package/dist/src/agent/service/process-direct-streaming.js +7 -6
- package/dist/src/agent/service/webchat-tts.js +2 -2
- package/dist/src/agent/service.js +21 -21
- package/dist/src/agent/session/session-config-service.js +3 -3
- package/dist/src/agent/session/session-hydrator.js +1 -1
- package/dist/src/agent/session/session-inspector.js +1 -1
- package/dist/src/agent/skills/filesystem-watcher.js +1 -1
- package/dist/src/agent/skills/hub-pull.js +2 -2
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/source-context/index.js +2 -2
- package/dist/src/agent/source-context/result-context.d.ts +2 -0
- package/dist/src/agent/source-context/result-context.js +32 -0
- package/dist/src/agent/source-context/types.d.ts +2 -2
- package/dist/src/agent/source-context/types.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +7 -7
- 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/exec-command.js +47 -2
- package/dist/src/agent/tools/executor.js +1 -1
- package/dist/src/agent/tools/factory.js +35 -28
- package/dist/src/agent/tools/image-generate-tool.js +3 -3
- package/dist/src/agent/tools/index.js +6 -6
- package/dist/src/agent/tools/list-dir.js +1 -1
- package/dist/src/agent/tools/personal-attention-tool.js +2 -2
- package/dist/src/agent/tools/personal-performance.d.ts +2 -0
- package/dist/src/agent/tools/personal-performance.js +82 -0
- package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-tool.js +3 -3
- package/dist/src/agent/tools/personal-result-tool.d.ts +2 -0
- package/dist/src/agent/tools/personal-result-tool.js +106 -0
- package/dist/src/agent/tools/personal-task-tool.d.ts +11 -1
- package/dist/src/agent/tools/personal-task-tool.js +110 -6
- 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 +21 -2
- 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 +9 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +122 -3
- package/dist/src/agent/tools/task-evidence.d.ts +3 -0
- package/dist/src/agent/tools/task-evidence.js +71 -0
- package/dist/src/agent/tools/task-result-tool.js +24 -4
- package/dist/src/agent/tools/tool-media.js +1 -1
- package/dist/src/agent/tools/tts-tool.js +1 -1
- package/dist/src/agent/tools/user-context-tool.js +1 -1
- package/dist/src/agent/tools/write.js +2 -2
- package/dist/src/agent/tools/xopc-use-tool.js +26 -5
- 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-matching/delegation-service.js +1 -1
- package/dist/src/ai-assist/text-assist.js +1 -1
- package/dist/src/auth/oauth/xopc-cloud.js +2 -2
- package/dist/src/auth/sync-provider-auth.js +1 -1
- package/dist/src/automations/domain/index.js +1 -1
- package/dist/src/automations/draft/automation-draft-service.js +1 -1
- package/dist/src/automations/index.js +2 -2
- package/dist/src/browser/native-messaging-host.js +1 -1
- package/dist/src/capabilities/store-connector.js +2 -2
- 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/builtins/config.js +4 -4
- 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/context.js +2 -2
- package/dist/src/chat-commands/index.js +3 -3
- package/dist/src/cli/commands/agent.js +7 -7
- 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/extension-dev.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +1 -1
- package/dist/src/cli/commands/extension.js +2 -2
- 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/model.js +1 -1
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/project.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 +1 -1
- package/dist/src/config/index.js +5 -5
- package/dist/src/config/loader.js +2 -2
- package/dist/src/config/models-json.js +1 -1
- package/dist/src/config/schema.js +5 -5
- package/dist/src/connectors/cli/authorization.js +1 -1
- package/dist/src/connectors/cli/runtime.js +1 -1
- package/dist/src/connectors/composio-sessions.js +1 -1
- package/dist/src/connectors/composio.js +1 -1
- package/dist/src/connectors/connected-source-ingestion.js +4 -4
- package/dist/src/connectors/connected-source-understanding.js +4 -4
- package/dist/src/connectors/connection-recovery-service.js +5 -5
- package/dist/src/connectors/content-enrichment.js +1 -1
- package/dist/src/connectors/health.js +1 -1
- package/dist/src/connectors/learning-coordinator.js +1 -1
- package/dist/src/discussions/live-worker.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/auth.js +1 -1
- package/dist/src/extensions/agent-plugins/credentials.js +1 -1
- 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 +4 -4
- package/dist/src/gateway/hono/routes/agent-stream.js +1 -1
- package/dist/src/gateway/hono/routes/agents.js +1 -1
- package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +4 -4
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +1 -1
- package/dist/src/gateway/hono/routes/config-patch/misc.js +4 -4
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +2 -2
- package/dist/src/gateway/hono/routes/endpoint-tools.js +1 -1
- package/dist/src/gateway/hono/routes/home.js +1 -1
- package/dist/src/gateway/hono/routes/mcp.js +1 -1
- package/dist/src/gateway/hono/routes/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 +1 -1
- package/dist/src/gateway/hono/routes/projects.js +3 -3
- package/dist/src/gateway/hono/routes/runtime-tools.js +1 -1
- package/dist/src/gateway/hono/routes/session-command-handler.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.d.ts +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +5 -5
- package/dist/src/gateway/hono/routes/sessions.js +3 -3
- package/dist/src/gateway/hono/routes/shares.js +2 -2
- 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 +1 -1
- package/dist/src/gateway/hono/routes/user-model-refresh.js +1 -1
- 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 +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 +2 -2
- 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 +3 -3
- package/dist/src/gateway/service/config-coordinator.js +2 -2
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +24 -5
- package/dist/src/gateway/service/session-command-service.js +2 -2
- package/dist/src/gateway/service/session-input-coordinator.js +2 -2
- package/dist/src/gateway/service.js +72 -41
- package/dist/src/gateway/session-context-summary.js +4 -4
- 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/compatibility.js +1 -1
- package/dist/src/imports/inventory.js +3 -3
- package/dist/src/imports/productImport.js +2 -2
- package/dist/src/imports/runtime.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 +9 -9
- 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 +2 -2
- package/dist/src/mcp/gateway-http-client.js +1 -1
- package/dist/src/media/session-references.js +1 -1
- package/dist/src/media-understanding/openai-compatible-audio.js +1 -1
- package/dist/src/memory-learning/source-learning.js +4 -4
- 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/service.js +3 -3
- package/dist/src/personal-agent/capability-service.js +2 -2
- package/dist/src/personal-agent/communication.js +1 -0
- package/dist/src/personal-agent/performance.d.ts +83 -0
- package/dist/src/personal-agent/performance.js +65 -0
- package/dist/src/personal-agent/policy.d.ts +1 -1
- package/dist/src/personal-agent/policy.js +1 -0
- package/dist/src/personal-agent/proactivity/routes.js +1 -1
- package/dist/src/personal-agent/proactivity/service.js +7 -7
- package/dist/src/personal-agent/prompt-context.js +9 -7
- package/dist/src/personal-agent/prompts.js +7 -4
- package/dist/src/personal-agent/reply-composer.js +86 -15
- package/dist/src/personal-agent/request-delivery.js +5 -3
- package/dist/src/personal-agent/request-service.js +5 -5
- package/dist/src/personal-agent/result-extraction.d.ts +42 -0
- package/dist/src/personal-agent/result-extraction.js +209 -0
- package/dist/src/personal-agent/result-read-continuations.d.ts +13 -0
- package/dist/src/personal-agent/result-read-continuations.js +78 -0
- package/dist/src/personal-agent/result-reader.d.ts +43 -0
- package/dist/src/personal-agent/result-reader.js +461 -0
- package/dist/src/personal-agent/service.js +1 -1
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/platform/index.js +1 -1
- package/dist/src/projects/index.js +1 -1
- package/dist/src/projects/project-agent-suggestion.js +1 -1
- package/dist/src/projects/project-service.js +1 -1
- package/dist/src/projects/project-skill-service.js +2 -2
- package/dist/src/projects/workspace.js +1 -1
- package/dist/src/providers/model-reference-auditor.js +1 -1
- package/dist/src/providers/model-registry.js +1 -1
- package/dist/src/realtime/runtime.js +1 -1
- package/dist/src/remote-access/exposure-manager.js +1 -1
- package/dist/src/routing/agent-session-key.js +1 -1
- package/dist/src/scenes/taskFollowUp/agentExecutor.js +4 -4
- package/dist/src/scenes/taskFollowUp/resources.js +2 -2
- package/dist/src/scenes/taskFollowUp/service.js +6 -6
- package/dist/src/session/client-history.d.ts +1 -1
- package/dist/src/session/client-history.js +1 -1
- package/dist/src/session/index.js +2 -2
- package/dist/src/session/init-session-turn.js +1 -1
- package/dist/src/session/resolve-session.js +1 -1
- package/dist/src/session/session-context-for-llm.js +2 -0
- package/dist/src/session/store.js +5 -5
- package/dist/src/session/thinking-resolve.js +1 -1
- package/dist/src/share/hosted-session-share.js +2 -2
- package/dist/src/share/session-share-service.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/site-share-store.js +1 -1
- package/dist/src/storage/sqlite/connection.js +9 -9
- package/dist/src/storage/sqlite/migrations/251_personal_result_reads.sql +40 -0
- package/dist/src/storage/sqlite/migrations/252_task_work_revisions.sql +15 -0
- package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
- package/dist/src/storage/sqlite/migrations/runner.js +3 -3
- package/dist/src/storage/sqlite/schema.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +1 -1
- package/dist/src/tasks/home-query-service.js +2 -2
- package/dist/src/tasks/index.js +4 -4
- package/dist/src/tasks/task-allocation-service.js +64 -13
- package/dist/src/tasks/task-application-service.d.ts +18 -0
- package/dist/src/tasks/task-application-service.js +135 -4
- package/dist/src/tasks/task-collaboration-delivery.js +1 -1
- package/dist/src/tasks/task-context-assembler.js +10 -7
- package/dist/src/tasks/task-contract-definition.d.ts +3 -0
- package/dist/src/tasks/task-contract-planner.js +50 -16
- package/dist/src/tasks/task-conversation-repository.js +1 -1
- package/dist/src/tasks/task-evidence-ranges.d.ts +7 -0
- package/dist/src/tasks/task-evidence-ranges.js +20 -0
- package/dist/src/tasks/task-execution-capabilities.d.ts +26 -0
- package/dist/src/tasks/task-execution-capabilities.js +117 -0
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-handoff.d.ts +56 -0
- package/dist/src/tasks/task-handoff.js +510 -0
- package/dist/src/tasks/task-main-update-decision-service.js +3 -3
- package/dist/src/tasks/task-model-call.js +1 -1
- package/dist/src/tasks/task-read-model-projector.d.ts +6 -0
- package/dist/src/tasks/task-read-model-projector.js +12 -1
- package/dist/src/tasks/task-research-repair.js +6 -2
- package/dist/src/tasks/task-research-result.d.ts +16 -2
- package/dist/src/tasks/task-research-result.js +126 -42
- package/dist/src/tasks/task-result-delivery-repository.js +27 -4
- package/dist/src/tasks/task-result-delivery-service.js +38 -10
- package/dist/src/tasks/task-run-coordinator.js +7 -5
- package/dist/src/tasks/task-run-dispatcher.d.ts +1 -0
- package/dist/src/tasks/task-run-dispatcher.js +3 -2
- package/dist/src/tui/backends/embedded-backend.js +13 -13
- 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 +5 -5
- package/dist/src/tui/tui-picker-overlay.js +1 -1
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +4 -4
- package/dist/src/tui/tui.js +6 -6
- package/dist/src/tunnel/gateway-lifecycle.js +1 -1
- package/dist/src/user-context/access-policy.js +2 -2
- 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 +7 -7
- 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/incremental-repository.js +1 -1
- package/dist/src/work-discovery/service.js +7 -7
- package/dist/src/workflows/context/workflow-context.js +1 -1
- package/dist/src/workflows/engine/workflow-engine.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +7 -7
- package/dist/src/workflows/service/workflow-session-bridge.js +2 -2
- package/package.json +5 -3
- package/dist/gateway/static/root/assets/constants-CpWu0oHS.js +0 -1
- package/dist/gateway/static/root/assets/home-page-BtSy2hRV.js +0 -2
- package/dist/gateway/static/root/assets/index-B08iR7fT.js +0 -260
- package/dist/gateway/static/root/assets/local-session-drafts-D_tYFy7d.js +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-BTrk2wWv.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-aUoA-uPw.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-C4_gW1vw.js +0 -1
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { suggestedEvidenceRanges } from "../../tasks/task-evidence-ranges.js";
|
|
2
|
+
//#region src/agent/tools/task-evidence.ts
|
|
3
|
+
/** Tool-call IDs are protocol metadata and may be invisible to the model; expose the host ID in Task reads. */
|
|
4
|
+
function withTaskEvidenceIdentity(tool) {
|
|
5
|
+
if (!new Set([
|
|
6
|
+
"read_file",
|
|
7
|
+
"read_media",
|
|
8
|
+
"web_fetch",
|
|
9
|
+
"web_search",
|
|
10
|
+
"web_extract",
|
|
11
|
+
"exec_command",
|
|
12
|
+
"managed_job",
|
|
13
|
+
"xopc_tool_execute",
|
|
14
|
+
"publish_artifacts",
|
|
15
|
+
"session_status",
|
|
16
|
+
"task_collaboration"
|
|
17
|
+
]).has(tool.name)) return tool;
|
|
18
|
+
return {
|
|
19
|
+
...tool,
|
|
20
|
+
execute: async (...args) => {
|
|
21
|
+
const result = await tool.execute(args[0], args[1], args[2], args[3]);
|
|
22
|
+
const artifacts = tool.name === "publish_artifacts" ? result.details?.artifacts : void 0;
|
|
23
|
+
const receipt = artifacts ? [{
|
|
24
|
+
type: "text",
|
|
25
|
+
text: JSON.stringify({
|
|
26
|
+
publishedArtifacts: artifacts.map(({ artifactId, title, availability }) => ({
|
|
27
|
+
artifactId,
|
|
28
|
+
title,
|
|
29
|
+
availability
|
|
30
|
+
})),
|
|
31
|
+
guidance: "Use exact artifactId values in publish_task_result.finalArtifactIds to select final deliverables."
|
|
32
|
+
})
|
|
33
|
+
}] : [];
|
|
34
|
+
const execution = result.details;
|
|
35
|
+
const body = result.content.filter((part) => part.type === "text").map((part) => part.text).join("\n");
|
|
36
|
+
const ranges = !result.isError && ![
|
|
37
|
+
"failed",
|
|
38
|
+
"blocked",
|
|
39
|
+
"running",
|
|
40
|
+
"timed_out",
|
|
41
|
+
"cancelled"
|
|
42
|
+
].includes(execution?.status ?? "") && (tool.name !== "managed_job" || execution?.status === "success" && execution.exitCode === 0) ? [{
|
|
43
|
+
type: "text",
|
|
44
|
+
text: JSON.stringify({ evidence: {
|
|
45
|
+
toolCallId: args[0],
|
|
46
|
+
excerptRanges: suggestedEvidenceRanges(body),
|
|
47
|
+
guidance: "Prefer toolCallId plus excerptRange in publish_task_result.sources; omit excerpt. The host copies exact observed output. For a yielded command cite the successful managed_job completion ID, not the earlier running exec_command. Never rerun completed work merely to obtain evidence. Never reconstruct quoted code, escapes or input commands. This identifies provenance; claim support still requires review."
|
|
48
|
+
} })
|
|
49
|
+
}] : [];
|
|
50
|
+
const quote = tool.name === "exec_command" && execution?.status === "success" && execution.exitCode === 0 ? [{
|
|
51
|
+
type: "text",
|
|
52
|
+
text: "Evidence quoting: copy a short contiguous passage from the output above. The input command is not output; never prepend it to an excerpt. Successful execution and exitCode=0 are host metadata, not extra lines to invent in a quote."
|
|
53
|
+
}] : [];
|
|
54
|
+
return {
|
|
55
|
+
...result,
|
|
56
|
+
content: [
|
|
57
|
+
...result.content,
|
|
58
|
+
...receipt,
|
|
59
|
+
...quote,
|
|
60
|
+
...ranges,
|
|
61
|
+
{
|
|
62
|
+
type: "text",
|
|
63
|
+
text: `Task source toolCallId: ${args[0]}`
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { withTaskEvidenceIdentity };
|
|
@@ -6,16 +6,33 @@ const id = Type.String({
|
|
|
6
6
|
maxLength: 120
|
|
7
7
|
});
|
|
8
8
|
const schema = Type.Object({
|
|
9
|
+
finalArtifactIds: Type.Optional(Type.Array(Type.String({ minLength: 1 }), {
|
|
10
|
+
maxItems: 50,
|
|
11
|
+
uniqueItems: true
|
|
12
|
+
})),
|
|
9
13
|
mode: Type.Optional(Type.Union([Type.Literal("replace"), Type.Literal("amend")])),
|
|
10
14
|
retireClaimIds: Type.Optional(Type.Array(id, { maxItems: 40 })),
|
|
11
15
|
sources: Type.Array(Type.Object({
|
|
12
16
|
id,
|
|
13
17
|
toolCallId: Type.Optional(Type.String()),
|
|
14
|
-
excerpt: Type.String({
|
|
18
|
+
excerpt: Type.Optional(Type.String({
|
|
15
19
|
minLength: 1,
|
|
16
20
|
maxLength: 2e3
|
|
17
|
-
}),
|
|
21
|
+
})),
|
|
22
|
+
excerptRange: Type.Optional(Type.Object({
|
|
23
|
+
start: Type.Integer({ minimum: 0 }),
|
|
24
|
+
end: Type.Integer({ minimum: 1 })
|
|
25
|
+
}, { additionalProperties: false })),
|
|
18
26
|
url: Type.Optional(Type.String())
|
|
27
|
+
}, {
|
|
28
|
+
additionalProperties: false,
|
|
29
|
+
oneOf: [{
|
|
30
|
+
required: ["excerpt"],
|
|
31
|
+
not: { required: ["excerptRange"] }
|
|
32
|
+
}, {
|
|
33
|
+
required: ["toolCallId", "excerptRange"],
|
|
34
|
+
not: { required: ["excerpt"] }
|
|
35
|
+
}]
|
|
19
36
|
}), {
|
|
20
37
|
minItems: 1,
|
|
21
38
|
maxItems: 40
|
|
@@ -35,7 +52,7 @@ const schema = Type.Object({
|
|
|
35
52
|
minItems: 1,
|
|
36
53
|
maxItems: 8
|
|
37
54
|
})
|
|
38
|
-
}), {
|
|
55
|
+
}, { additionalProperties: false }), {
|
|
39
56
|
minItems: 1,
|
|
40
57
|
maxItems: 40
|
|
41
58
|
})
|
|
@@ -45,7 +62,7 @@ function createTaskResultTool(getConversationId) {
|
|
|
45
62
|
name: "publish_task_result",
|
|
46
63
|
label: "Publish research conclusions",
|
|
47
64
|
parameters: schema,
|
|
48
|
-
description: "Submit Task research evidence for per-criterion review; publish required files first. Initial submission creates the ledger; subsequent submissions default to amend so earlier evidence is retained. Use explicit replace only for a complete replacement ledger. During repair retain stable source/claim IDs, update targeted claims and retire obsolete/wrong claim IDs with retireClaimIds. All retained claims are reviewed again. Never drop valid calculation/input evidence merely to fix a file. Sources require short contiguous exact excerpts from successful read_file/read_media/web/exec/session_status results or publication receipts in this TaskRun. Never concatenate passages, invent call IDs, or cite an earlier review as factual evidence. Prefer original inputs; the host reads published reports/scripts. URL is optional; actual web metadata is preserved. Claims reference source IDs and distinguish fact/inference/recommendation. Publication receipts prove availability, not prices. This binds provenance and runs model review, not independent fact certification. Resubmit changed evidence or adopted directions; do not endlessly repeat unchanged data when review is unavailable. Do not use outside a Task.",
|
|
65
|
+
description: "For sources prefer toolCallId plus excerptRange {start,end} copied from evidence receipts, and OMIT excerpt. Ranges use Unicode character offsets, at most 1000 characters; the host extracts the original successful read exactly so code escapes and commands cannot corrupt quotes. Supply exactly one of excerptRange or a short exact excerpt. Never include the input command as output. When this execution published files, finalArtifactIds is required: explicitly select the exact artifact IDs from publication receipts for the final delivery. Exclude intermediate, failed, obsolete and unrelated files. [] explicitly selects a text-only final result. New submissions replace this final selection; no historical union. Submit Task research evidence for per-criterion review; publish required files first. Initial submission creates the ledger; subsequent submissions default to amend so earlier evidence is retained. Use explicit replace only for a complete replacement ledger. During repair retain stable source/claim IDs, update targeted claims and retire obsolete/wrong claim IDs with retireClaimIds. All retained claims are reviewed again. Reviewer support/note/checks fields are read-only; never send them back in sources or claims. Never drop valid calculation/input evidence merely to fix a file. Negative assertions such as \"never reran a script\" need an observable, scoped execution record; do not invent proof of absence or add an unnecessary absolute negative claim. Keep prohibitions as constraints, and retire unsupported optional claims while retaining required verified findings. Sources require short contiguous exact excerpts from successful read_file/read_media/web/exec/session_status results or publication receipts in this TaskRun. Never concatenate passages, invent call IDs, or cite an earlier review as factual evidence. Use task_collaboration get section evidence to list/read original toolCallIds. Your planned final reply is not evidence and should not become a claim about future delivery. On source_quote_mismatch follow the recovery instruction; never repeat unchanged sources. Prefer original inputs; the host reads published reports/scripts. URL is optional; actual web metadata is preserved. Claims reference source IDs and distinguish fact/inference/recommendation. Publication receipts prove availability, not prices. This binds provenance and runs model review, not independent fact certification. Resubmit changed evidence or adopted directions; do not endlessly repeat unchanged data when review is unavailable. Do not use outside a Task.",
|
|
49
66
|
supportsParallel: false,
|
|
50
67
|
mutationScope: "none",
|
|
51
68
|
idempotent: false,
|
|
@@ -53,11 +70,14 @@ function createTaskResultTool(getConversationId) {
|
|
|
53
70
|
const conversationId = getConversationId();
|
|
54
71
|
if (!conversationId) throw new Error("Task conversation is required");
|
|
55
72
|
const research = await submitTaskResearchResult(conversationId, toolCallId, input, signal);
|
|
73
|
+
const readyForCompletion = research.checks.length > 0 && research.checks.every((check) => check.status === "passed") && (research.instructionChecks ?? []).every((check) => check.status === "passed") && research.claims.every((claim) => claim.support === "supported");
|
|
56
74
|
return {
|
|
57
75
|
content: [{
|
|
58
76
|
type: "text",
|
|
59
77
|
text: JSON.stringify({
|
|
60
78
|
saved: true,
|
|
79
|
+
readyForCompletion,
|
|
80
|
+
...readyForCompletion ? {} : { nextAction: "The saved ledger is not fully verified. Before finishing, amend evidence for required unsupported findings; retire optional unsupported claims with retireClaimIds while preserving valid required evidence. Do not replay completed or uncertain operations just to change the ledger. If a required finding cannot be verified safely, retain an honest partial result." },
|
|
61
81
|
review: research.review,
|
|
62
82
|
claims: research.claims,
|
|
63
83
|
checks: research.checks,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { sniffImageMimeType } from "../image/generation/image-assets.js";
|
|
2
1
|
import { MEDIA_ARTIFACT_MAX_BYTES, mimeTypeFromMediaPath, saveMediaBuffer } from "../../media/store.js";
|
|
2
|
+
import { sniffImageMimeType } from "../image/generation/image-assets.js";
|
|
3
3
|
import { basename } from "node:path";
|
|
4
4
|
//#region src/agent/tools/tool-media.ts
|
|
5
5
|
function hasImageMagic(buffer) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { speak } from "../../voice/tts/speak-core.js";
|
|
4
3
|
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
5
4
|
import { getChannelOutputFormat } from "../../voice/tts/service.js";
|
|
5
|
+
import { speak } from "../../voice/tts/speak-core.js";
|
|
6
6
|
import { compressAudio } from "../../voice/tts/audio.js";
|
|
7
7
|
import { persistOutboundTtsAudio } from "../../channels/attachments/outbound-tts-persist.js";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { deleteUserAssertion, getAssertionSlot, getUserAssertion, listUserAssertionSources, listUserAssertions, reconcileAssertion, setAssertionStatus } from "../../user-model/repository.js";
|
|
2
2
|
import { canUseAssertion } from "../../user-model/usage-policy.js";
|
|
3
3
|
import "../../user-model/index.js";
|
|
4
|
-
import "./local-read-budget.js";
|
|
5
4
|
import { retrievalLexicalSimilarity } from "../../retrieval/textFeatures.js";
|
|
5
|
+
import "./local-read-budget.js";
|
|
6
6
|
import { Type } from "@sinclair/typebox";
|
|
7
7
|
//#region src/agent/tools/user-context-tool.ts
|
|
8
8
|
const SearchSchema = Type.Object({
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { appendProductDeliveryText } from "../../../packages/gateway-contract/src/product-delivery.js";
|
|
2
2
|
import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
3
|
+
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
4
|
+
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
3
5
|
import { writeWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
4
6
|
import { checkFileSafety } from "../prompt/safety.js";
|
|
5
|
-
import { isBareProfileMarkdownFileName, resolvePathUnderWorkspace, resolveProfileMarkdownPathIfBareName } from "./tool-paths.js";
|
|
6
|
-
import { fileResourceId, fileSpaceId } from "../../files/file-service.js";
|
|
7
7
|
import { basename, relative, sep } from "path";
|
|
8
8
|
import { realpath } from "fs/promises";
|
|
9
9
|
import { Type } from "@sinclair/typebox";
|
|
@@ -13,19 +13,20 @@ import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
|
13
13
|
import "../../activity/index.js";
|
|
14
14
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
15
15
|
import "../../capabilities/runtime/dispatcher.js";
|
|
16
|
-
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
17
16
|
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
18
17
|
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
19
18
|
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
20
|
-
import {
|
|
19
|
+
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
21
20
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
22
21
|
import "../../projects/index.js";
|
|
22
|
+
import { parseTaskHandoffReferences } from "../../tasks/task-handoff.js";
|
|
23
23
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
24
|
+
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
24
25
|
import { defineTaskContract } from "../../tasks/task-contract-definition.js";
|
|
26
|
+
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
25
27
|
import { resolveResponseLanguageForSession } from "../prompt/response-language.js";
|
|
26
28
|
import { TaskDeletionService } from "../../tasks/task-deletion-service.js";
|
|
27
29
|
import { TaskDeleteOutputSchema } from "../../tasks/capabilities/management.js";
|
|
28
|
-
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
29
30
|
import { AutomationCreateCapabilityInputSchema, AutomationUpdatePatchSchema } from "../../automations/capabilities/write.js";
|
|
30
31
|
import { TaskMutationOutputSchema } from "../../tasks/capabilities/write.js";
|
|
31
32
|
import { createProductDispatcher } from "../../capabilities/runtime/product.js";
|
|
@@ -1472,6 +1473,16 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1472
1473
|
explicitAgentId,
|
|
1473
1474
|
projectId
|
|
1474
1475
|
}) : explicitAgentId ?? (config ? getDefaultAgentId() : deps.getCurrentAgentId?.() ?? "main");
|
|
1476
|
+
const sourceRefs = parseTaskHandoffReferences(args.sourceRefs);
|
|
1477
|
+
if (!sourceRefs || sourceRefs.some((ref) => ![
|
|
1478
|
+
"result",
|
|
1479
|
+
"note",
|
|
1480
|
+
"task",
|
|
1481
|
+
"file"
|
|
1482
|
+
].includes(ref.kind))) return {
|
|
1483
|
+
ok: false,
|
|
1484
|
+
error: "Invalid selected task sourceRefs"
|
|
1485
|
+
};
|
|
1475
1486
|
const input = {
|
|
1476
1487
|
idempotencyKey: trimString(args.idempotencyKey) ?? randomUUID(),
|
|
1477
1488
|
title: trimString(args.title) ?? objective,
|
|
@@ -1488,14 +1499,24 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1488
1499
|
outputDestinations: []
|
|
1489
1500
|
},
|
|
1490
1501
|
dependencies: dependsOnTaskIds,
|
|
1491
|
-
context: args.includeConversationContext === false ? [] : conversationId ? [{
|
|
1502
|
+
context: [...args.includeConversationContext === false ? [] : conversationId ? [{
|
|
1492
1503
|
targetKind: "session",
|
|
1493
1504
|
targetId: conversationId,
|
|
1494
1505
|
role: "input",
|
|
1495
1506
|
pinned: false,
|
|
1496
1507
|
retrievalPolicy: {},
|
|
1497
1508
|
metadata: {}
|
|
1498
|
-
}] : [],
|
|
1509
|
+
}] : [], ...sourceRefs.map((ref) => ({
|
|
1510
|
+
targetKind: "source",
|
|
1511
|
+
targetId: `${ref.kind}:${ref.sourceId}`,
|
|
1512
|
+
role: "input",
|
|
1513
|
+
pinned: true,
|
|
1514
|
+
retrievalPolicy: { currentAuthorizationRequired: true },
|
|
1515
|
+
metadata: {
|
|
1516
|
+
kind: "task_reference_request",
|
|
1517
|
+
ref
|
|
1518
|
+
}
|
|
1519
|
+
}))],
|
|
1499
1520
|
authorityGrants: [],
|
|
1500
1521
|
activation: createMode === "allocate" ? {
|
|
1501
1522
|
mode: "allocate",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { resolveTranscriptPolicy } from "./transcript-policy.js";
|
|
2
|
-
import { dropThinkingBlocks } from "./thinking.js";
|
|
3
1
|
import { extractToolCallsFromAssistant, extractToolResultId, sanitizeToolCallId, sanitizeToolCallIdsForCloudCodeAssist } from "./tool-call-id.js";
|
|
4
2
|
import { makeMissingToolResult, repairToolUseResultPairing, sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolResultDetails } from "./session-transcript-repair.js";
|
|
3
|
+
import { resolveTranscriptPolicy } from "./transcript-policy.js";
|
|
4
|
+
import { dropThinkingBlocks } from "./thinking.js";
|
|
5
5
|
import { applySessionTranscriptHygiene, applySessionTranscriptHygieneForPersistence, applySessionTranscriptHygieneWithPolicy, resolvePolicyForModel, tryApplySessionTranscriptHygiene, tryApplySessionTranscriptHygieneForPersistence } from "./transcript-hygiene.js";
|
|
6
6
|
import { stripToolMessages } from "./strip-tool-messages.js";
|
|
7
7
|
export { applySessionTranscriptHygiene, applySessionTranscriptHygieneForPersistence, applySessionTranscriptHygieneWithPolicy, dropThinkingBlocks, extractToolCallsFromAssistant, extractToolResultId, makeMissingToolResult, repairToolUseResultPairing, resolvePolicyForModel, resolveTranscriptPolicy, sanitizeToolCallId, sanitizeToolCallIdsForCloudCodeAssist, sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolMessages, stripToolResultDetails, tryApplySessionTranscriptHygiene, tryApplySessionTranscriptHygieneForPersistence };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { resolveTranscriptPolicy } from "./transcript-policy.js";
|
|
4
|
-
import { dropThinkingBlocks } from "./thinking.js";
|
|
5
3
|
import { sanitizeToolCallIdsForCloudCodeAssist } from "./tool-call-id.js";
|
|
6
4
|
import { sanitizeToolCallInputs, sanitizeToolUseResultPairing, stripToolResultDetails } from "./session-transcript-repair.js";
|
|
5
|
+
import { resolveTranscriptPolicy } from "./transcript-policy.js";
|
|
6
|
+
import { dropThinkingBlocks } from "./thinking.js";
|
|
7
7
|
//#region src/agent/transcript/transcript-hygiene.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
const log = createLogger("transcript-hygiene");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { createSqliteTranscriptRuntime } from "../embedded/transcript-runtime.js";
|
|
4
|
+
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputTool } from "./structured-output-tool.js";
|
|
4
5
|
import { createDelegateChildHandle } from "../child-agent-factory.js";
|
|
5
6
|
import { DELEGATION_TOOL_CAPABILITIES, protectDelegatedTool, resolveDelegationTools } from "../tools/delegation-policy.js";
|
|
6
7
|
import { DELEGATE_BLOCKED_TOOLS } from "../tools/delegate-tool.js";
|
|
7
8
|
import { createDelegationParentPolicy } from "../tools/delegation-parent-policy.js";
|
|
8
|
-
import { STRUCTURED_OUTPUT_TOOL_NAME, createStructuredOutputTool } from "./structured-output-tool.js";
|
|
9
9
|
//#region src/agent/workflow/subagent-runner.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
const log = createLogger("Agent:WorkflowSubagent");
|
|
@@ -4,8 +4,8 @@ import { afterSqliteCommit, init_transaction, runSqliteWriteTransaction } from "
|
|
|
4
4
|
import { TaskRunRepository, init_task_run_repository } from "../tasks/task-run-repository.js";
|
|
5
5
|
import { TaskReadModelProjector } from "../tasks/task-read-model-projector.js";
|
|
6
6
|
import { TaskApplicationService } from "../tasks/task-application-service.js";
|
|
7
|
-
import { assessSpecialist } from "./service.js";
|
|
8
7
|
import { AgentSelectionRepository, selectionRequestHash } from "./selection-repository.js";
|
|
8
|
+
import { assessSpecialist } from "./service.js";
|
|
9
9
|
//#region src/agent-matching/delegation-service.ts
|
|
10
10
|
init_logger();
|
|
11
11
|
init_transaction();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
3
4
|
import { getDefaultModelSync, init_providers, resolveModel } from "../providers/index.js";
|
|
4
5
|
import { createExtensionAwareStreamFn } from "../providers/extension-stream-bridge.js";
|
|
5
6
|
import { trackAiUsageStream } from "../usage/recorder.js";
|
|
6
7
|
import { isLocalModelBaseUrl, resolveModelCallApiKey, resolveModelCallOptions } from "../providers/model-call.js";
|
|
7
|
-
import { getAssistantMessageErrorReason, stripCodeFences } from "../providers/model-response.js";
|
|
8
8
|
import { normalizeContext } from "@earendil-works/pi-ai";
|
|
9
9
|
//#region src/ai-assist/text-assist.ts
|
|
10
10
|
init_providers();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { __esmMin } from "../../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
3
2
|
import { init_resolution, resolveConnectedPlatformEndpoint } from "../../platform/resolution.js";
|
|
3
|
+
import { generatePKCE, init_pkce } from "./pkce.js";
|
|
4
4
|
import { hostname } from "node:os";
|
|
5
5
|
import { randomBytes } from "node:crypto";
|
|
6
|
-
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
7
6
|
import http from "node:http";
|
|
7
|
+
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
8
8
|
//#region src/auth/oauth/xopc-cloud.ts
|
|
9
9
|
function consoleUrl() {
|
|
10
10
|
return (process.env.XOPC_CONSOLE_URL ?? resolveConnectedPlatformEndpoint("authorizationServer") ?? DEFAULT_CONSOLE_URL).replace(/\/+$/, "");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __esmMin } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
-
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
3
2
|
import { init_paths, resolveAgentAuthProfilesPath, resolveAuthProfilesPath, resolveOAuthPath } from "../config/paths.js";
|
|
3
|
+
import { getDefaultAgentId, init_resolve_route } from "../routing/resolve-route.js";
|
|
4
4
|
import { assertCurrentModelProvider, init_provider_policy } from "../providers/provider-policy.js";
|
|
5
5
|
import { init_registry, isOAuthOnlyProvider } from "./oauth/registry.js";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "./validation.js";
|
|
2
|
-
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./schedule.js";
|
|
3
2
|
import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./defaults.js";
|
|
3
|
+
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./schedule.js";
|
|
4
4
|
export { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, UpdateAutomationSchema, computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds, timerDelayUntil };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
3
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
4
|
-
import { resolveModelSelector } from "../../config/agent-model-intents.js";
|
|
5
4
|
import { getDefaultModelSync, init_providers, resolveModel } from "../../providers/index.js";
|
|
6
5
|
import { completeWithResolvedCredentials } from "../../providers/model-call.js";
|
|
6
|
+
import { resolveModelSelector } from "../../config/agent-model-intents.js";
|
|
7
7
|
import { buildAutomationDraftPrompt, buildAutomationDraftRepairPrompt, buildAutomationRunRepairPrompt, buildAutomationRunRepairRetryPrompt } from "./automation-draft-prompt.js";
|
|
8
8
|
import { buildAutomationDraftResponse, parseGeneratedAutomationDraft, parseGeneratedAutomationRepairDraft } from "./automation-draft-validator.js";
|
|
9
9
|
//#region src/automations/draft/automation-draft-service.ts
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AutomationActionSchema, AutomationDeliveryPolicySchema, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, UpdateAutomationSchema } from "./domain/validation.js";
|
|
2
2
|
import { listBusinessEventDefinitions, registerBusinessEvent, validateCatalogedBusinessEvent } from "./events/event-catalog.js";
|
|
3
3
|
import { automationEventPublisher, claimAutomationEventDeliveries, claimAutomationEventsForProjection, completeAutomationEventDelivery, completeAutomationEventProjection, deferAutomationEventDelivery, expireAutomationEventProjectionLeases, failAutomationEventProjection, getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, ingestAutomationEvent, listAutomationEventRecords, listAutomationEvents, markAutomationEventDeliveryQueued, reconcileAutomationEventDeliveries, releaseAutomationEventDelivery, releaseAutomationEventProjection, replayAutomationEvent, skipAutomationEventDelivery } from "./events/event-repository.js";
|
|
4
|
-
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./domain/schedule.js";
|
|
5
4
|
import { DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, defaultAutomationTimeoutSeconds, resolveAutomationTimeoutSeconds } from "./domain/defaults.js";
|
|
5
|
+
import { computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, timerDelayUntil } from "./domain/schedule.js";
|
|
6
|
+
import "./domain/index.js";
|
|
6
7
|
import { AutomationActionExecutor } from "./service/action-executor.js";
|
|
7
8
|
import { AutomationEventDispatcher } from "./events/event-dispatcher.js";
|
|
8
9
|
import "./events/index.js";
|
|
@@ -10,6 +11,5 @@ import { resolveAutomationWebhookSecret } from "./webhook-secrets.js";
|
|
|
10
11
|
import { AutomationDeliveryRouter, getAutomationResultDeliveryMetrics, listAutomationResultDeliveries, retryAutomationResultDelivery } from "./delivery/delivery-router.js";
|
|
11
12
|
import "./delivery/index.js";
|
|
12
13
|
import { AutomationAlreadyExistsError, AutomationAlreadyRunningError, AutomationService } from "./service/automation-service.js";
|
|
13
|
-
import "./domain/index.js";
|
|
14
14
|
import "./service/index.js";
|
|
15
15
|
export { AutomationActionExecutor, AutomationActionSchema, AutomationAlreadyExistsError, AutomationAlreadyRunningError, AutomationDeliveryPolicySchema, AutomationDeliveryRouter, AutomationEventDispatcher, AutomationManagementSchema, AutomationReliabilitySchema, AutomationSafetyPolicySchema, AutomationScheduleSchema, AutomationSchema, AutomationService, AutomationStateSchema, AutomationTriggerSchema, CreateAutomationSchema, DEFAULT_AUTOMATION_TIMEOUT_SECONDS, DEFAULT_BROWSER_AUTOMATION_TIMEOUT_SECONDS, UpdateAutomationSchema, automationEventPublisher, claimAutomationEventDeliveries, claimAutomationEventsForProjection, completeAutomationEventDelivery, completeAutomationEventProjection, computeNextAutomationRunAtMs, computeNextScheduleRunAtMs, defaultAutomationTimeoutSeconds, deferAutomationEventDelivery, expireAutomationEventProjectionLeases, failAutomationEventProjection, getAutomationEventDeliveryRunId, getAutomationEventForRun, getAutomationEventQueueMetrics, getAutomationResultDeliveryMetrics, ingestAutomationEvent, listAutomationEventRecords, listAutomationEvents, listAutomationResultDeliveries, listBusinessEventDefinitions, markAutomationEventDeliveryQueued, reconcileAutomationEventDeliveries, registerBusinessEvent, releaseAutomationEventDelivery, releaseAutomationEventProjection, replayAutomationEvent, resolveAutomationTimeoutSeconds, resolveAutomationWebhookSecret, retryAutomationResultDelivery, skipAutomationEventDelivery, timerDelayUntil, validateCatalogedBusinessEvent };
|
|
@@ -3,9 +3,9 @@ import { browserPairingInvitationPayloadSchema, formatBrowserPairingInvitation }
|
|
|
3
3
|
import { init_src } from "../../packages/gateway-contract/src/index.js";
|
|
4
4
|
import { getGatewayIdentityPublicKeyRaw, getOrCreateGatewayIdentity, init_gateway_identity_repository } from "../storage/sqlite/gateway-identity-repository.js";
|
|
5
5
|
import { createDevicePairingSetup, init_device_pairing_repository } from "../storage/sqlite/device-pairing-repository.js";
|
|
6
|
-
import { loadConfig } from "../config/loader.js";
|
|
7
6
|
import { browserEnrollmentPublicKeyThumbprint } from "./enrollment.js";
|
|
8
7
|
import { BROWSER_EXTENSION_ID, BROWSER_NATIVE_HOST_NAME } from "./extension-identity.js";
|
|
8
|
+
import { loadConfig } from "../config/loader.js";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
//#region src/browser/native-messaging-host.ts
|
|
11
11
|
init_src();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { downloadConnectorStoreZipBuffer, fetchStoreConnectorPackageDetail, listConnectorPackages, resolveSkillsStoreBaseUrl } from "../agent/skills/marketplace/adapters/store/store-api-client.js";
|
|
1
2
|
import { getCliAdapter } from "../connectors/cli/adapterRegistry.js";
|
|
2
3
|
import { listConnectorInstances } from "../connectors/instances.js";
|
|
3
4
|
import { installConnectorDefinition } from "../connectors/install.js";
|
|
4
|
-
import { downloadConnectorStoreZipBuffer, fetchStoreConnectorPackageDetail, listConnectorPackages, resolveSkillsStoreBaseUrl } from "../agent/skills/marketplace/adapters/store/store-api-client.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
|
-
import { isIP } from "node:net";
|
|
7
6
|
import AdmZip from "adm-zip";
|
|
7
|
+
import { isIP } from "node:net";
|
|
8
8
|
//#region src/capabilities/store-connector.ts
|
|
9
9
|
const STORE_CONNECTOR_CANDIDATE_PREFIX = "store-connector:";
|
|
10
10
|
function storeConnectorCandidateRef(packageName, version) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
|
|
4
|
-
import { transcribe } from "../../voice/stt/transcribe-core.js";
|
|
5
3
|
import { isSTTAvailable } from "../../voice/stt/availability.js";
|
|
4
|
+
import { transcribe } from "../../voice/stt/transcribe-core.js";
|
|
6
5
|
import "../../voice/stt/index.js";
|
|
6
|
+
import { decodeInboundAttachmentBase64, readInboundAttachmentBuffer } from "./inbound-persist.js";
|
|
7
7
|
//#region src/channels/attachments/voice-stt-webchat.ts
|
|
8
8
|
init_logger();
|
|
9
9
|
const STT_MAX_BYTES = 25 * 1024 * 1024;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { parseFrontmatterBlock } from "../markdown/frontmatter.js";
|
|
2
|
-
import { getChannelPlugin, getChannelRegistryVersion, listChannelPlugins, syncChannelPluginsFromManager } from "./plugins/registry.js";
|
|
3
2
|
import { findFenceSpanAt, isSafeFenceBreak, parseFenceSpans } from "../markdown/fences.js";
|
|
4
3
|
import { chunkText } from "../markdown/chunk.js";
|
|
5
4
|
import { chunkMarkdownIR, markdownToIR, markdownToIRWithMeta } from "../markdown/ir.js";
|
|
6
|
-
import { compileAllowlist, evaluateAccess, hasBotMention, removeBotMention, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy } from "./security.js";
|
|
7
5
|
import { renderMarkdownWithMarkers } from "../markdown/render.js";
|
|
8
6
|
import { convertMarkdownTables } from "../markdown/tables.js";
|
|
9
7
|
import { buildCodeSpanIndex, createInlineCodeState } from "../markdown/code-spans.js";
|
|
10
8
|
import "./format.js";
|
|
9
|
+
import { compileAllowlist, evaluateAccess, hasBotMention, removeBotMention, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy } from "./security.js";
|
|
11
10
|
import { MessagePipeline, createEnvelopeTimestampHandler, createFilterCommandsHandler, createFilterEmptyHandler, createFilterSelfHandler, createPipeline, standardPreflightHandlers, standardProcessHandlers } from "./pipeline.js";
|
|
11
|
+
import { getChannelPlugin, getChannelRegistryVersion, listChannelPlugins, syncChannelPluginsFromManager } from "./plugins/registry.js";
|
|
12
12
|
import { ChannelManager, createChannelManager } from "./manager.js";
|
|
13
13
|
import { collectSetupWizardChannels } from "./setup-wizard-discovery.js";
|
|
14
14
|
export { ChannelManager, MessagePipeline, buildCodeSpanIndex, chunkMarkdownIR, chunkText, collectSetupWizardChannels, compileAllowlist, convertMarkdownTables, createChannelManager, createEnvelopeTimestampHandler, createFilterCommandsHandler, createFilterEmptyHandler, createFilterSelfHandler, createInlineCodeState, createPipeline, evaluateAccess, findFenceSpanAt, getChannelPlugin, getChannelRegistryVersion, hasBotMention, isSafeFenceBreak, listChannelPlugins, markdownToIR, markdownToIRWithMeta, parseFenceSpans, parseFrontmatterBlock, removeBotMention, renderMarkdownWithMarkers, resolveAllowlistMatch, resolveAllowlistMatchSimple, resolveDmPolicy, resolveGroupPolicy, standardPreflightHandlers, standardProcessHandlers, syncChannelPluginsFromManager };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
|
+
import "./internal-outbound.js";
|
|
3
4
|
import { mergeTtsConfigFromAppConfig } from "../voice/tts/merge-config.js";
|
|
4
5
|
import { maybeApplyTtsToPayload } from "../voice/tts/payload.js";
|
|
5
|
-
import "./internal-outbound.js";
|
|
6
6
|
import { deliverOutboundMessage } from "./outbound/deliver.js";
|
|
7
7
|
import { OutboundPersistStore } from "./outbound/persist-store.js";
|
|
8
8
|
//#region src/channels/outbound-sender.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fsSync from "node:fs";
|
|
3
3
|
//#region src/channels/pairing/allow-from-file.ts
|
|
4
4
|
function readAllowFromFile(filePath) {
|
|
5
5
|
try {
|
|
6
|
-
if (!
|
|
6
|
+
if (!fsSync.existsSync(filePath)) return {
|
|
7
7
|
version: 1,
|
|
8
8
|
allowFrom: []
|
|
9
9
|
};
|
|
10
|
-
const raw =
|
|
10
|
+
const raw = fsSync.readFileSync(filePath, "utf-8");
|
|
11
11
|
const parsed = JSON.parse(raw);
|
|
12
12
|
if (Array.isArray(parsed.allowFrom)) return {
|
|
13
13
|
version: 1,
|
|
@@ -26,13 +26,13 @@ function appendAllowFromIdSync(filePath, userId) {
|
|
|
26
26
|
const trimmed = userId.trim();
|
|
27
27
|
if (!trimmed) return { changed: false };
|
|
28
28
|
const dir = path.dirname(filePath);
|
|
29
|
-
|
|
29
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
30
30
|
const content = readAllowFromFile(filePath);
|
|
31
31
|
if (content.allowFrom.includes(trimmed)) return { changed: false };
|
|
32
32
|
content.allowFrom.push(trimmed);
|
|
33
|
-
|
|
33
|
+
fsSync.writeFileSync(filePath, JSON.stringify(content, null, 2), "utf-8");
|
|
34
34
|
try {
|
|
35
|
-
|
|
35
|
+
fsSync.chmodSync(filePath, 384);
|
|
36
36
|
} catch {}
|
|
37
37
|
return { changed: true };
|
|
38
38
|
}
|
|
@@ -43,13 +43,13 @@ function removeAllowFromIdSync(filePath, userId) {
|
|
|
43
43
|
const next = content.allowFrom.filter((id) => id !== trimmed);
|
|
44
44
|
if (next.length === content.allowFrom.length) return { changed: false };
|
|
45
45
|
const dir = path.dirname(filePath);
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
47
|
+
fsSync.writeFileSync(filePath, JSON.stringify({
|
|
48
48
|
version: 1,
|
|
49
49
|
allowFrom: next
|
|
50
50
|
}, null, 2), "utf-8");
|
|
51
51
|
try {
|
|
52
|
-
|
|
52
|
+
fsSync.chmodSync(filePath, 384);
|
|
53
53
|
} catch {}
|
|
54
54
|
return { changed: true };
|
|
55
55
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { appendAllowFromIdSync } from "./allow-from-file.js";
|
|
2
2
|
import "./pairing-constants.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fsSync from "node:fs";
|
|
5
5
|
import crypto from "node:crypto";
|
|
6
6
|
//#region src/channels/pairing/pairing-store.ts
|
|
7
7
|
const PAIRING_CODE_LENGTH = 8;
|
|
@@ -36,11 +36,11 @@ function requestAccountId(entry) {
|
|
|
36
36
|
}
|
|
37
37
|
function readStore(filePath) {
|
|
38
38
|
try {
|
|
39
|
-
if (!
|
|
39
|
+
if (!fsSync.existsSync(filePath)) return {
|
|
40
40
|
version: 1,
|
|
41
41
|
requests: []
|
|
42
42
|
};
|
|
43
|
-
const raw =
|
|
43
|
+
const raw = fsSync.readFileSync(filePath, "utf-8");
|
|
44
44
|
const parsed = JSON.parse(raw);
|
|
45
45
|
if (parsed && Array.isArray(parsed.requests)) return {
|
|
46
46
|
version: 1,
|
|
@@ -54,10 +54,10 @@ function readStore(filePath) {
|
|
|
54
54
|
}
|
|
55
55
|
function writeStore(filePath, store) {
|
|
56
56
|
const dir = path.dirname(filePath);
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
fsSync.mkdirSync(dir, { recursive: true });
|
|
58
|
+
fsSync.writeFileSync(filePath, JSON.stringify(store, null, 2), "utf-8");
|
|
59
59
|
try {
|
|
60
|
-
|
|
60
|
+
fsSync.chmodSync(filePath, 384);
|
|
61
61
|
} catch {}
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
4
3
|
import { init_paths, resolveConfigPath } from "../../config/paths.js";
|
|
5
|
-
import {
|
|
6
|
-
import { parseConfigValue } from "../config-value.js";
|
|
7
|
-
import { getConfigValueAtPath, parseConfigPath, setConfigValueAtPath, unsetConfigValueAtPath } from "../config-paths.js";
|
|
4
|
+
import { ConfigSchema, init_schema } from "../../config/schema.js";
|
|
8
5
|
import { loadConfig, saveConfig } from "../../config/loader.js";
|
|
9
6
|
import { resolveAllowlistMatchSimple } from "../../channels/security.js";
|
|
7
|
+
import { commandRegistry } from "../registry.js";
|
|
8
|
+
import { getConfigValueAtPath, parseConfigPath, setConfigValueAtPath, unsetConfigValueAtPath } from "../config-paths.js";
|
|
9
|
+
import { parseConfigValue } from "../config-value.js";
|
|
10
10
|
//#region src/chat-commands/builtins/config.ts
|
|
11
11
|
init_schema();
|
|
12
12
|
init_paths();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { formatThinkingLevels, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel } from "../../agent/transcript/thinking-types.js";
|
|
2
1
|
import { commandRegistry } from "../registry.js";
|
|
2
|
+
import { formatThinkingLevels, normalizeReasoningLevel, normalizeThinkLevel, normalizeVerboseLevel } from "../../agent/transcript/thinking-types.js";
|
|
3
3
|
//#region src/chat-commands/builtins/thinking.ts
|
|
4
4
|
async function setSessionAgentField(store, conversationId, field, value) {
|
|
5
5
|
if (!store) return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isTTSAvailable } from "../../voice/tts/factory.js";
|
|
2
2
|
import { appendTtsReadinessNote, formatTtsSetupHint, mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
3
|
-
import { commandRegistry } from "../registry.js";
|
|
4
3
|
import { ttsStatusTracker } from "../../voice/tts/status-tracker.js";
|
|
4
|
+
import { commandRegistry } from "../registry.js";
|
|
5
5
|
import "../../voice/tts/index.js";
|
|
6
6
|
//#region src/chat-commands/builtins/tts.ts
|
|
7
7
|
function defaultTtsVoiceForProvider(provider) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createLogger } from "../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../utils/logger.js";
|
|
3
3
|
import { resolveEffectiveAgentConfigForSession } from "../config/agent-profile.js";
|
|
4
|
-
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
5
4
|
import { effectiveWorkspacePathForSession } from "../session/session-workspace.js";
|
|
6
5
|
import { getProjectForSession } from "../projects/workspace.js";
|
|
7
|
-
import {
|
|
6
|
+
import { getAgentDefaultModelRef, init_schema } from "../config/schema.js";
|
|
8
7
|
import { saveConfig } from "../config/loader.js";
|
|
8
|
+
import { getSessionDisplayName } from "./session-key.js";
|
|
9
9
|
import { wrapMarkdownExportAsHtml } from "../session/chat-export.js";
|
|
10
10
|
import { join } from "path";
|
|
11
11
|
import { mkdir, writeFile } from "fs/promises";
|