@xopcai/xopc 0.0.392 → 0.0.394
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/telegram/src/plugin.js +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CZmaQbC9.js → agent-avatar-dicebear-CIpp0ZG6.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DzkKx0Dv.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-dWqozfQm.js +1 -0
- package/dist/gateway/static/root/assets/agents-CXG8SYr5.js +77 -0
- package/dist/gateway/static/root/assets/{agents-admin-api-znm6_dW_.js → agents-admin-api-B5aykqg_.js} +1 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-SmT1HDDg.js +1 -0
- package/dist/gateway/static/root/assets/appearance-settings-Da9jf0ZC.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-DYaxWrTI.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-dSkmoISk.js → archive-plugin-D6bFXdsA.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DhWRn0dZ.js → automations-page-CM3wI2Nr.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-BSMdKgxD.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BJlZrYym.js → binary-plugins-CYKGdQnF.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-OHBssIfN.js → block-editor-Fx38xFF4.js} +40 -40
- package/dist/gateway/static/root/assets/browser-automation-inputs-CQMc-Gol.js +1 -0
- package/dist/gateway/static/root/assets/browser-automations-page-C4VhFvyu.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-8WZOkfL7.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-page-dreSJEes.js +2 -0
- package/dist/gateway/static/root/assets/{capabilities-CgDteXZH.js → capabilities-pt2M56-E.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-settings-panel-9DviVNpG.js +8 -0
- package/dist/gateway/static/root/assets/capability-header-actions-AbVbg7kZ.js +1 -0
- package/dist/gateway/static/root/assets/channels-DqGCiVmr.js +1 -0
- package/dist/gateway/static/root/assets/chat-terminal-dock-djkqphez.js +36 -0
- package/dist/gateway/static/root/assets/computer-settings-page-DE9zl7bK.js +1 -0
- package/dist/gateway/static/root/assets/connector-service-page--gB9vL3C.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-Bcr2NNoX.js +1 -0
- package/dist/gateway/static/root/assets/date-picker-D9q-5a8a.js +1 -0
- package/dist/gateway/static/root/assets/dependency-picker-Ci0dApIr.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-CjaVVJDQ.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-settings-C7TFazyr.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-sprite-Bd-aOI7N.js +30 -0
- package/dist/gateway/static/root/assets/desktop-pet-sprite-BuB0g8zv.css +1 -0
- package/dist/gateway/static/root/assets/device-pairing-wizard-B6S-RpNJ.js +1 -0
- package/dist/gateway/static/root/assets/directory-picker-path-field-BpymM_E_.js +1 -0
- package/dist/gateway/static/root/assets/extension-debug-page-CABAv66K.js +1 -0
- package/dist/gateway/static/root/assets/extension-page-B3dACpKA.js +1 -0
- package/dist/gateway/static/root/assets/extension-settings-page-B3bwBvgp.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-BM__9Fws.js → gateway-config-swr-BEePO3Wl.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-realtime-DS_GDx-x.js → gateway-realtime-Dng_VOvI.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-DtlBf7oH.js +1 -0
- package/dist/gateway/static/root/assets/gateway-settings-CzA1bTXZ.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DosoyMIH.js → gateway-startup-retry-CDCiy7Cd.js} +1 -1
- package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-BYHXWIfK.js → highlighted-body-KQOG7T2V-53FJXO9w.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-KRPp-I4O.js +2 -0
- package/dist/gateway/static/root/assets/image-generation-api-DWRmAkoe.js +1 -0
- package/dist/gateway/static/root/assets/imports-page-B0Y8iy6G.js +1 -0
- package/dist/gateway/static/root/assets/index-BvAvfZ5R.js +260 -0
- package/dist/gateway/static/root/assets/index-CMRCop32.css +1 -0
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-CjkACa5H.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-DROP52YA.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-page-BELUF7Pg.js +1 -0
- package/dist/gateway/static/root/assets/{local-session-drafts-Bye3ZtsW.js → local-session-drafts-CYEDUPH7.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BKyOF23r.js → locale-store-CE7L6MlS.js} +1 -1
- package/dist/gateway/static/root/assets/logs-page-DBm3g8Mu.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-CcsW4Z-r.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-D_7clISS.js → markdown-view-PrKvVpRh.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-B_4o8hac.js → media-plugins-UU3qSAhq.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-CG664NRI.js +1 -0
- package/dist/gateway/static/root/assets/messages-CaeL_miw.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-BS9XnQ8a.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-Cfy_WnU-.js +8 -0
- package/dist/gateway/static/root/assets/page-context-capture-button-BD7T7uqR.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-DZEh3dXq.js +1 -0
- package/dist/gateway/static/root/assets/preview-open-alternatives--3aGeYJ5.js +1 -0
- package/dist/gateway/static/root/assets/product-open-page-B0ZxsnFO.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-content-CheSHKJq.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-Bm7bVHVo.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-DPA6QL_Z.js +1 -0
- package/dist/gateway/static/root/assets/{registry-api-DLHHYP_v.js → registry-api-BO2Ck3aA.js} +1 -1
- package/dist/gateway/static/root/assets/remote-access-hub-Pxf4EiKh.js +1 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-Dq_50s27.js → runtime-tools-api-B1sb8nlw.js} +1 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-2BnqCeNt.js +1 -0
- package/dist/gateway/static/root/assets/schema-form-KmnpEBtP.js +1 -0
- package/dist/gateway/static/root/assets/{session-api-Br11ih_M.js → session-api-CaAUJvu1.js} +1 -1
- package/dist/gateway/static/root/assets/session-manager-DoFTlgNz.js +16 -0
- package/dist/gateway/static/root/assets/sessions-page-d0anT7iK.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-DfDaPyh5.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-Db5XOKMH.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-4odCW0_2.js → settings-page-aRM6ax6B.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DCNAcalA.js +1 -0
- package/dist/gateway/static/root/assets/share-preview-page-DR3Esqa_.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-CvEwnQch.js +1 -0
- package/dist/gateway/static/root/assets/skill-api-BJBU8YgD.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-DEQ1bdN9.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-BXNFSIIy.js +2 -0
- package/dist/gateway/static/root/assets/sliding-indicator-hwz0sx3h.js +1 -0
- package/dist/gateway/static/root/assets/style-Df_wL13k.js +7 -0
- package/dist/gateway/static/root/assets/system-settings-panel-DWnyafB7.js +1 -0
- package/dist/gateway/static/root/assets/tab-completion-input-CxtEp0aP.js +1 -0
- package/dist/gateway/static/root/assets/task-detail-page-DyHDW8A5.js +2 -0
- package/dist/gateway/static/root/assets/{task-expandable-content-CmQt5uxa.js → task-expandable-content-DTEVoNrM.js} +1 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-vvREqbQ3.js +1 -0
- package/dist/gateway/static/root/assets/tunnel-api-BEzsymVO.js +1 -0
- package/dist/gateway/static/root/assets/usage-page-ByYOqsHo.js +1 -0
- package/dist/gateway/static/root/assets/use-autosave-Cp4kZ3E-.js +1 -0
- package/dist/gateway/static/root/assets/user-model-page-D0qeCXwD.js +2 -0
- package/dist/gateway/static/root/assets/voice-api-key-field-DH3OdR-w.js +1 -0
- package/dist/gateway/static/root/assets/{voice-config-api-CmDtDA4g.js → voice-config-api-D0Wscn9W.js} +1 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-CICdfBBR.js +1 -0
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-VIJQCUY5.js +3 -0
- package/dist/gateway/static/root/assets/workflows-page-DDYp2Jbo.js +6 -0
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-BTMfgVTk.js +1 -0
- package/dist/gateway/static/root/index.html +20 -69
- package/dist/package.js +1 -1
- package/dist/src/agent/agent-instance-gateway.d.ts +2 -0
- package/dist/src/agent/agent-manager.d.ts +1 -1
- package/dist/src/agent/agent-manager.js +19 -28
- package/dist/src/agent/background-review/run-background-review.js +6 -6
- package/dist/src/agent/child-agent-factory.d.ts +2 -1
- package/dist/src/agent/child-agent-factory.js +2 -1
- package/dist/src/agent/coding/projectEvidence.d.ts +9 -0
- package/dist/src/agent/coding/projectEvidence.js +177 -0
- package/dist/src/agent/coding/repository-instructions.d.ts +8 -1
- package/dist/src/agent/coding/repository-instructions.js +9 -4
- package/dist/src/agent/coding/run-verification.d.ts +17 -2
- package/dist/src/agent/coding/run-verification.js +82 -12
- package/dist/src/agent/context/execution-context.js +3 -3
- package/dist/src/agent/context/project-context.js +3 -3
- package/dist/src/agent/embedded/agent-profile-context.js +10 -4
- package/dist/src/agent/embedded/codemode-extension.js +1 -1
- package/dist/src/agent/embedded/execution-context.d.ts +1 -0
- package/dist/src/agent/embedded/execution-context.js +4 -1
- package/dist/src/agent/embedded/execution-tool-policy.js +1 -1
- package/dist/src/agent/embedded/external-tool-discovery.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +3 -2
- package/dist/src/agent/embedded/run-turn.js +42 -6
- package/dist/src/agent/embedded/session-runner.js +1 -1
- package/dist/src/agent/embedded/session-tool-result-guard.js +5 -0
- package/dist/src/agent/embedded/types.d.ts +2 -0
- package/dist/src/agent/embedded/xopc-tools-bridge.js +2 -1
- package/dist/src/agent/external-tools/cliProvider.js +2 -2
- package/dist/src/agent/external-tools/composio-provider.js +3 -3
- package/dist/src/agent/external-tools/endpoint-provider.js +2 -2
- package/dist/src/agent/external-tools/extension-provider.js +1 -1
- package/dist/src/agent/external-tools/gateway-tools.js +1 -1
- package/dist/src/agent/external-tools/memory-provider.js +1 -1
- package/dist/src/agent/inbound/attachment-pipeline.js +3 -3
- package/dist/src/agent/independent-execution.d.ts +2 -0
- package/dist/src/agent/independent-execution.js +12 -0
- package/dist/src/agent/memory/compaction.js +1 -1
- package/dist/src/agent/orchestration/delegation-scope.d.ts +1 -0
- package/dist/src/agent/orchestration/delegation-scope.js +4 -1
- package/dist/src/agent/orchestration/loop-guard.js +6 -2
- package/dist/src/agent/prompt/response-language.js +1 -1
- package/dist/src/agent/prompt/sections/agent-identity.js +4 -6
- package/dist/src/agent/prompt/sections/behavior.d.ts +3 -2
- package/dist/src/agent/prompt/sections/behavior.js +34 -27
- package/dist/src/agent/prompt/sections/memory-skills.d.ts +1 -1
- package/dist/src/agent/prompt/sections/memory-skills.js +10 -11
- package/dist/src/agent/prompt/sections/messaging-runtime.d.ts +3 -2
- package/dist/src/agent/prompt/sections/messaging-runtime.js +21 -24
- package/dist/src/agent/prompt/sections/response-language.js +7 -6
- package/dist/src/agent/prompt/sections/tooling.js +11 -10
- package/dist/src/agent/prompt/service-prompt-builder.js +4 -2
- package/dist/src/agent/prompt/system-prompt-params.d.ts +2 -1
- package/dist/src/agent/prompt/system-prompt-params.js +2 -0
- package/dist/src/agent/prompt/system-prompt.d.ts +2 -1
- package/dist/src/agent/prompt/system-prompt.js +21 -18
- package/dist/src/agent/prompt/types.d.ts +2 -0
- package/dist/src/agent/sandbox/exec-policy.js +1 -1
- package/dist/src/agent/service/process-direct-streaming.js +2 -2
- package/dist/src/agent/service.js +12 -11
- package/dist/src/agent/session/session-config-service.js +2 -2
- 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/format-skills-prompt.js +5 -2
- package/dist/src/agent/skills/hub-pull.js +2 -2
- package/dist/src/agent/skills/index.js +1 -1
- package/dist/src/agent/skills/managed-store.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/adapter.js +1 -1
- package/dist/src/agent/skills/marketplace/adapters/store/store-api-client.js +1 -1
- package/dist/src/agent/skills/skill-manage-ops.js +1 -1
- package/dist/src/agent/tasks/task-judge-service.js +6 -6
- package/dist/src/agent/tool-manuals/xopc-use.d.ts +1 -1
- package/dist/src/agent/tool-manuals/xopc-use.js +5 -0
- package/dist/src/agent/tools/dataBatch.d.ts +1 -0
- package/dist/src/agent/tools/dataBatch.js +4 -1
- package/dist/src/agent/tools/delegate-tool.d.ts +1 -0
- package/dist/src/agent/tools/delegate-tool.js +1 -0
- package/dist/src/agent/tools/error-tracker.js +4 -2
- package/dist/src/agent/tools/exec-command.d.ts +2 -0
- package/dist/src/agent/tools/exec-command.js +48 -3
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +23 -24
- package/dist/src/agent/tools/{delegation-parent-policy.d.ts → noninteractive-tool-policy.d.ts} +1 -1
- package/dist/src/agent/tools/{delegation-parent-policy.js → noninteractive-tool-policy.js} +4 -4
- package/dist/src/agent/tools/personal-attention-tool.js +1 -1
- package/dist/src/agent/tools/personal-read-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-result-tool.js +1 -1
- package/dist/src/agent/tools/personal-request-tool.js +2 -2
- package/dist/src/agent/tools/personal-task-tool.js +6 -6
- package/dist/src/agent/tools/publish-artifacts.js +2 -2
- package/dist/src/agent/tools/review-workspace.js +1 -1
- package/dist/src/agent/tools/search/cache.d.ts +3 -1
- package/dist/src/agent/tools/search/cache.js +4 -1
- package/dist/src/agent/tools/search/providers/deepseek-protocol.d.ts +9 -0
- package/dist/src/agent/tools/search/providers/deepseek-protocol.js +84 -0
- package/dist/src/agent/tools/search/providers/deepseek.d.ts +9 -0
- package/dist/src/agent/tools/search/providers/deepseek.js +55 -0
- package/dist/src/agent/tools/search/providers/xopc-cloud.d.ts +2 -1
- package/dist/src/agent/tools/search/providers/xopc-cloud.js +36 -1
- package/dist/src/agent/tools/search/registry.d.ts +1 -0
- package/dist/src/agent/tools/search/registry.js +32 -6
- package/dist/src/agent/tools/search/request-gate.d.ts +13 -0
- package/dist/src/agent/tools/search/request-gate.js +41 -0
- package/dist/src/agent/tools/search/resolve-config.js +1 -1
- package/dist/src/agent/tools/search/search-info.d.ts +8 -0
- package/dist/src/agent/tools/search/search-info.js +34 -0
- package/dist/src/agent/tools/search/types.d.ts +19 -1
- package/dist/src/agent/tools/skills-tools.js +1 -1
- package/dist/src/agent/tools/task-collaboration-tool.js +3 -3
- package/dist/src/agent/tools/toolExposure.d.ts +3 -0
- package/dist/src/agent/tools/toolExposure.js +25 -0
- package/dist/src/agent/tools/web.js +8 -1
- package/dist/src/agent/tools/write.js +1 -1
- package/dist/src/agent/tools/xopc-use-tool.js +11 -7
- package/dist/src/agent/workflow/subagent-runner.d.ts +1 -0
- package/dist/src/agent/workflow/subagent-runner.js +3 -3
- package/dist/src/agent/workflow/workflow-child-tools.js +13 -8
- package/dist/src/agent/workspace-runtime/registry.js +1 -1
- package/dist/src/agent-catalog/capabilities.js +2 -2
- 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/capabilities/drafts.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/automations/service/action-executor.js +2 -2
- package/dist/src/bootstrap/application-state.js +1 -1
- package/dist/src/capabilities/runtime/dispatcher.js +1 -1
- package/dist/src/capabilities/runtime/product.js +1 -1
- package/dist/src/capabilities/store-connector.js +2 -2
- package/dist/src/channels/index.js +1 -1
- package/dist/src/channels/manager.js +1 -1
- package/dist/src/chat-commands/agent-edit.js +1 -1
- package/dist/src/chat-commands/builtins/config.js +1 -1
- package/dist/src/chat-commands/context.js +1 -1
- package/dist/src/cli/command-manifest.js +1 -1
- package/dist/src/cli/commands/agent.js +1 -1
- package/dist/src/cli/commands/agents.js +1 -1
- package/dist/src/cli/commands/channels.js +1 -1
- package/dist/src/cli/commands/connectors.js +1 -1
- package/dist/src/cli/commands/extension-marketplace.js +2 -2
- package/dist/src/cli/commands/models.js +2 -2
- package/dist/src/cli/commands/onboard/model.js +2 -2
- package/dist/src/cli/commands/onboard.js +1 -1
- package/dist/src/cli/commands/search.d.ts +2 -2
- package/dist/src/cli/commands/search.js +8 -6
- package/dist/src/cli/commands/skills.js +1 -1
- package/dist/src/cli/utils/init-workspace-core.js +1 -1
- package/dist/src/computer/flows.js +1 -1
- package/dist/src/computer/model-adapter.d.ts +3 -0
- package/dist/src/computer/model-adapter.js +120 -3
- package/dist/src/computer/model-policy.d.ts +1 -1
- package/dist/src/computer/model-policy.js +13 -6
- package/dist/src/computer/runtime.js +1 -0
- package/dist/src/config/agent-model-intents.js +1 -1
- package/dist/src/config/agent-profile.js +2 -2
- package/dist/src/config/index.js +1 -1
- package/dist/src/config/loader.js +1 -1
- package/dist/src/config/models-json.d.ts +30 -24
- package/dist/src/config/models-json.js +3 -1
- package/dist/src/config/outbound-proxy.d.ts +11 -0
- package/dist/src/config/outbound-proxy.js +30 -0
- package/dist/src/config/rules.js +5 -0
- package/dist/src/config/schema.d.ts +29 -6
- package/dist/src/config/schema.js +25 -8
- 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 +1 -1
- package/dist/src/connectors/connected-source-understanding.js +2 -2
- package/dist/src/connectors/health.js +1 -1
- 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/agent-plugins/validation.js +1 -1
- package/dist/src/extensions/api.js +1 -1
- package/dist/src/extensions/install.js +1 -1
- package/dist/src/extensions/sdk/index.js +1 -1
- package/dist/src/extensions/update.js +1 -1
- package/dist/src/gateway/agents-admin.js +2 -2
- package/dist/src/gateway/config-tools-web.js +15 -4
- package/dist/src/gateway/file-path-classifier.js +1 -1
- package/dist/src/gateway/gateway-workflow-host.types.d.ts +3 -0
- package/dist/src/gateway/hono/lib/config-payload.d.ts +5 -0
- package/dist/src/gateway/hono/lib/config-payload.js +6 -1
- package/dist/src/gateway/hono/routes/commands-skills.js +3 -3
- package/dist/src/gateway/hono/routes/config-patch/gateway.js +7 -0
- package/dist/src/gateway/hono/routes/config-patch/misc.js +5 -5
- 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/memory-learning.js +2 -2
- package/dist/src/gateway/hono/routes/models.js +7 -4
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +4 -4
- package/dist/src/gateway/hono/routes/runtime-tools.js +1 -1
- package/dist/src/gateway/hono/routes/session-input-handler.js +2 -2
- package/dist/src/gateway/hono/routes/sessions.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 +6 -6
- package/dist/src/gateway/hono/routes/voice.js +1 -1
- package/dist/src/gateway/image-generation-setup.js +1 -1
- package/dist/src/gateway/lock.js +1 -1
- package/dist/src/gateway/media-access.js +1 -1
- package/dist/src/gateway/service/agent-runner.js +3 -3
- package/dist/src/gateway/service/config-coordinator.d.ts +8 -3
- package/dist/src/gateway/service/marketplace-service.js +2 -2
- package/dist/src/gateway/service/run-gateway-agent.js +1 -1
- package/dist/src/gateway/service/session-command-service.js +2 -2
- package/dist/src/gateway/service.js +33 -31
- package/dist/src/gateway/session-context-summary.js +4 -4
- package/dist/src/gateway/xopc-cloud-capability-setup.js +1 -1
- 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/http-proxy-env.d.ts +3 -0
- package/dist/src/infra/http-proxy-env.js +22 -2
- package/dist/src/knowledge/connected-knowledge-pipeline.js +1 -1
- package/dist/src/knowledge-memory/repository.js +1 -1
- package/dist/src/local-apps/service.js +3 -3
- package/dist/src/memory-learning/source-learning.js +2 -2
- 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.d.ts +2 -1
- package/dist/src/personal-agent/communication.js +11 -2
- package/dist/src/personal-agent/persona.d.ts +2 -1
- package/dist/src/personal-agent/persona.js +3 -2
- 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.js +7 -7
- package/dist/src/personal-agent/prompts.d.ts +2 -0
- package/dist/src/personal-agent/prompts.js +69 -7
- package/dist/src/personal-agent/reply-composer.js +8 -8
- package/dist/src/personal-agent/reply-style.d.ts +4 -2
- package/dist/src/personal-agent/reply-style.js +19 -3
- package/dist/src/personal-agent/request-delivery.js +2 -2
- package/dist/src/personal-agent/request-service.js +19 -14
- package/dist/src/personal-agent/result-reader.js +1 -1
- package/dist/src/personal-agent/service.js +3 -3
- package/dist/src/personal-agent/task-cancel.js +1 -1
- package/dist/src/pets/loopi-artwork.d.ts +2 -0
- package/dist/src/pets/loopi-artwork.js +36 -0
- package/dist/src/pets/pointer.d.ts +6 -0
- package/dist/src/pets/pointer.js +16 -0
- package/dist/src/platform/index.js +1 -1
- package/dist/src/project-trust/trust-store.d.ts +5 -0
- package/dist/src/project-trust/trust-store.js +7 -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/cloud-thinking.d.ts +3 -0
- package/dist/src/providers/cloud-thinking.js +13 -0
- package/dist/src/providers/index.js +3 -3
- package/dist/src/providers/model-catalog-persistence.js +1 -1
- package/dist/src/providers/model-registry.js +6 -1
- package/dist/src/providers/model-supplements.d.ts +0 -2
- package/dist/src/providers/model-supplements.js +2 -18
- package/dist/src/providers/register-runtime-providers.js +3 -0
- package/dist/src/providers/xopc-cloud-credit-budget.d.ts +1 -0
- package/dist/src/providers/xopc-cloud-credit-budget.js +4 -1
- package/dist/src/routing/agent-session-key.js +1 -1
- package/dist/src/routing/resolve-route.js +1 -1
- package/dist/src/routing/resolve-tui-session-key.js +1 -1
- package/dist/src/session/index.js +1 -1
- package/dist/src/session/init-session-turn.js +1 -1
- package/dist/src/session/resolve-session.js +1 -1
- package/dist/src/session/store.js +2 -2
- package/dist/src/share/hosted-session-share.js +2 -2
- package/dist/src/share/session-share-service.js +1 -1
- package/dist/src/tasks/capabilities/read.js +2 -2
- package/dist/src/tasks/capabilities/write.js +2 -2
- package/dist/src/tasks/home-query-service.js +1 -1
- package/dist/src/tasks/index.js +3 -3
- package/dist/src/tasks/task-allocation-service.js +56 -45
- package/dist/src/tasks/task-application-service.js +11 -7
- package/dist/src/tasks/task-collaboration-delivery.js +1 -1
- package/dist/src/tasks/task-context-assembler.js +2 -2
- package/dist/src/tasks/task-contract-planner.js +21 -6
- package/dist/src/tasks/task-handoff-service.js +2 -2
- package/dist/src/tasks/task-handoff.js +5 -5
- package/dist/src/tasks/task-language.d.ts +2 -0
- package/dist/src/tasks/task-language.js +13 -2
- 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-research-result.js +4 -4
- package/dist/src/tasks/task-result-delivery-repository.js +1 -1
- package/dist/src/tasks/task-result-delivery-service.js +2 -2
- package/dist/src/tasks/task-run-coordinator.js +9 -5
- package/dist/src/tasks/task-run-dispatcher.js +3 -2
- package/dist/src/tui/backends/embedded-backend.js +7 -7
- package/dist/src/tui/tui-commands.js +2 -2
- package/dist/src/tui/tui-skills-autocomplete.js +1 -1
- package/dist/src/tui/tui-startup-resources.js +3 -3
- package/dist/src/tui/tui.js +2 -2
- 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 +5 -5
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/voice/realtime/runtime.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/service/workflow-run-service.js +7 -8
- package/package.json +7 -3
- package/dist/gateway/static/root/assets/activity-YogQEteU.js +0 -1
- package/dist/gateway/static/root/assets/activity-store-DtTSRUyF.js +0 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-0GXoU7WL.js +0 -1
- package/dist/gateway/static/root/assets/agent-plugin-dialog-BxDqL7uc.js +0 -1
- package/dist/gateway/static/root/assets/agents-CYmRcXr-.js +0 -77
- package/dist/gateway/static/root/assets/app-chrome-BeB4KgOf.js +0 -1
- package/dist/gateway/static/root/assets/app-management-settings-panel-FhWeowCY.js +0 -1
- package/dist/gateway/static/root/assets/appearance-settings-DXin262V.js +0 -1
- package/dist/gateway/static/root/assets/apps-page-2M_l4Naz.js +0 -1
- package/dist/gateway/static/root/assets/automations-workspace-CVIWgoTx.js +0 -6
- package/dist/gateway/static/root/assets/browser-automation-inputs-uVEhZWHz.js +0 -1
- package/dist/gateway/static/root/assets/browser-automations-page-CEFnpvTO.js +0 -3
- package/dist/gateway/static/root/assets/browser-settings-page-sQpJic5b.js +0 -3
- package/dist/gateway/static/root/assets/button-aIC072nz.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-BSB93QBR.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-BKkN4sTh.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-DCZTR8Hu.js +0 -8
- package/dist/gateway/static/root/assets/capability-header-actions-D0HwmxyW.js +0 -1
- package/dist/gateway/static/root/assets/channels-DRraXYSd.js +0 -1
- package/dist/gateway/static/root/assets/chat-terminal-dock-DpM489kK.js +0 -36
- package/dist/gateway/static/root/assets/chevron-left-DqFhpbvK.js +0 -1
- package/dist/gateway/static/root/assets/chevron-right-BweFrslA.js +0 -1
- package/dist/gateway/static/root/assets/circle-alert-BEjgurr2.js +0 -1
- package/dist/gateway/static/root/assets/circle-dashed-8qMD7gHf.js +0 -1
- package/dist/gateway/static/root/assets/circle-dot-BAseJTrF.js +0 -1
- package/dist/gateway/static/root/assets/cloud-C4-yfnnk.js +0 -1
- package/dist/gateway/static/root/assets/computer-settings-page-D0ir9aA1.js +0 -1
- package/dist/gateway/static/root/assets/connector-service-page-Y5SYaiJO.js +0 -1
- package/dist/gateway/static/root/assets/connectors-page-DRSbj4gn.js +0 -1
- package/dist/gateway/static/root/assets/copy-text-row-C7egVuKr.js +0 -1
- package/dist/gateway/static/root/assets/date-formatters-CUZAyDEg.js +0 -1
- package/dist/gateway/static/root/assets/date-picker-DyUP-8hR.js +0 -1
- package/dist/gateway/static/root/assets/dependency-picker-QF9qLWIG.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-Qfns4SO-.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-settings-CuITd-Xa.js +0 -1
- package/dist/gateway/static/root/assets/desktop-pet-sprite-BP6iMVw1.js +0 -1
- package/dist/gateway/static/root/assets/device-pairing-wizard-C8RPqM_F.js +0 -1
- package/dist/gateway/static/root/assets/directory-picker-path-field-DnD9eyoU.js +0 -1
- package/dist/gateway/static/root/assets/dist-C3DSFZCi.js +0 -1
- package/dist/gateway/static/root/assets/electron-env-Dit0bHgy.js +0 -1
- package/dist/gateway/static/root/assets/extension-debug-page-B5ikNsSj.js +0 -1
- package/dist/gateway/static/root/assets/extension-page-D-PBMAtT.js +0 -1
- package/dist/gateway/static/root/assets/extension-provider-CdlACvkE.js +0 -1
- package/dist/gateway/static/root/assets/extension-settings-page-BPUYMNb0.js +0 -1
- package/dist/gateway/static/root/assets/form-field-width-DJw_jULe.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-uEdmIROn.js +0 -1
- package/dist/gateway/static/root/assets/gateway-settings-BKj4PQs4.js +0 -1
- package/dist/gateway/static/root/assets/globe-DSSGFWFn.js +0 -1
- package/dist/gateway/static/root/assets/home-page-D1ZBF3me.js +0 -2
- package/dist/gateway/static/root/assets/image-generation-api-BB3D6OV1.js +0 -1
- package/dist/gateway/static/root/assets/imports-page-BCcWIxOO.js +0 -1
- package/dist/gateway/static/root/assets/index-Bo70AuAq.js +0 -260
- package/dist/gateway/static/root/assets/index-BxoR4_xr.css +0 -1
- package/dist/gateway/static/root/assets/index.module-Cd9ENXfk.js +0 -1
- package/dist/gateway/static/root/assets/interaction-BdhHBbYa.js +0 -1
- package/dist/gateway/static/root/assets/is-masked-secret-DOkL5b_X.js +0 -1
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-Bc9UWPqr.js +0 -1
- package/dist/gateway/static/root/assets/loader-circle-CifKLtgG.js +0 -1
- package/dist/gateway/static/root/assets/local-app-workbench-page-jnK1j04U.js +0 -1
- package/dist/gateway/static/root/assets/local-apps-page-DpN8UN_Y.js +0 -1
- package/dist/gateway/static/root/assets/logs-page-DBR5mfxw.js +0 -2
- package/dist/gateway/static/root/assets/loopi-C09I2mNj.css +0 -1
- package/dist/gateway/static/root/assets/loopi-Djb8XU3l.js +0 -1
- package/dist/gateway/static/root/assets/management-settings-rs2cdb5f.js +0 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-Bl4kOOZT.js +0 -1
- package/dist/gateway/static/root/assets/message-square-plus-XP0tGdlV.js +0 -1
- package/dist/gateway/static/root/assets/messages-B7VtMXec.js +0 -3
- package/dist/gateway/static/root/assets/mic-CuUb7zc-.js +0 -1
- package/dist/gateway/static/root/assets/minimize-2-DtOGrlpo.js +0 -1
- package/dist/gateway/static/root/assets/models-hub-cache-D0vR7vex.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-B7R-cZWE.js +0 -5
- package/dist/gateway/static/root/assets/notes-api-DZkezSIy.js +0 -2
- package/dist/gateway/static/root/assets/notes-page-DY9MNatd.js +0 -8
- package/dist/gateway/static/root/assets/page-context-capture-button-C-X8J1IO.js +0 -1
- package/dist/gateway/static/root/assets/pencil-DmIY3Oa-.js +0 -1
- package/dist/gateway/static/root/assets/personal-page-CIZWUoUh.js +0 -1
- package/dist/gateway/static/root/assets/popover-select-DGKUpVsz.js +0 -1
- package/dist/gateway/static/root/assets/preview-open-alternatives-BJU2fmPn.js +0 -1
- package/dist/gateway/static/root/assets/product-open-page-CYV_8zRl.js +0 -1
- package/dist/gateway/static/root/assets/product-preview-content-DfQ9h_YX.js +0 -1
- package/dist/gateway/static/root/assets/project-detail-page-B_fYXcAW.js +0 -1
- package/dist/gateway/static/root/assets/projects-page-CHdeAtpp.js +0 -1
- package/dist/gateway/static/root/assets/remote-access-hub-CbJWGHW_.js +0 -1
- package/dist/gateway/static/root/assets/rotate-ccw-JM1TBLpp.js +0 -1
- package/dist/gateway/static/root/assets/rotate-cw-LIg3Am9S.js +0 -1
- package/dist/gateway/static/root/assets/runtime-tools-settings-panel-jqYXsCuk.js +0 -1
- package/dist/gateway/static/root/assets/schema-form-DNXZLVqh.js +0 -1
- package/dist/gateway/static/root/assets/search-DA7gz22f.js +0 -1
- package/dist/gateway/static/root/assets/secret-input-BxWHx6J6.js +0 -1
- package/dist/gateway/static/root/assets/send-session-input-NpLYu1ip.js +0 -1
- package/dist/gateway/static/root/assets/session-manager-Bb9pevyM.js +0 -16
- package/dist/gateway/static/root/assets/sessions-page-DrGCnBhV.js +0 -1
- package/dist/gateway/static/root/assets/settings-2-D-csvaET.js +0 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-B61Eh7eB.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-draft-Dy10ldo8.js +0 -1
- package/dist/gateway/static/root/assets/settings-form-section-num14vSv.js +0 -1
- package/dist/gateway/static/root/assets/settings-shell-dialog-layer-BU3UuiJr.js +0 -1
- package/dist/gateway/static/root/assets/setup-status-panel-DaU9o0Ll.js +0 -1
- package/dist/gateway/static/root/assets/share-link-dialog-BhjQPZbF.js +0 -1
- package/dist/gateway/static/root/assets/share-preview-page-LERhIwgz.js +0 -2
- package/dist/gateway/static/root/assets/shares-api-CgsiMdCX.js +0 -1
- package/dist/gateway/static/root/assets/shares-settings-DmvyqIyT.js +0 -1
- package/dist/gateway/static/root/assets/skeleton-BI5TyibZ.js +0 -1
- package/dist/gateway/static/root/assets/skill-api-plToSoFo.js +0 -1
- package/dist/gateway/static/root/assets/skill-api-utils-C7V4JVXM.js +0 -1
- package/dist/gateway/static/root/assets/skill-reload-api-BFw81Ar6.js +0 -1
- package/dist/gateway/static/root/assets/skill-wire-pattern-BPpeIcCi.js +0 -1
- package/dist/gateway/static/root/assets/skills-page-BLUsxGOo.js +0 -2
- package/dist/gateway/static/root/assets/style-1FPsMO2E.js +0 -7
- package/dist/gateway/static/root/assets/system-settings-panel-DL3WXRnL.js +0 -1
- package/dist/gateway/static/root/assets/tab-completion-input-D64VNmiA.js +0 -1
- package/dist/gateway/static/root/assets/task-detail-page-DWM5xGbe.js +0 -2
- package/dist/gateway/static/root/assets/theme-store-CPdeCbZI.js +0 -1
- package/dist/gateway/static/root/assets/tracing-settings-page-m51enJFx.js +0 -1
- package/dist/gateway/static/root/assets/tunnel-api-B5I53jzk.js +0 -1
- package/dist/gateway/static/root/assets/usage-page-B7qyfnMN.js +0 -1
- package/dist/gateway/static/root/assets/use-async-resource-GrnWNwMZ.js +0 -1
- package/dist/gateway/static/root/assets/use-autosave-C2__K1-y.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-61W-5Q6m.js +0 -2
- package/dist/gateway/static/root/assets/use-file-preview-expanded-DZUWxdhm.js +0 -2
- package/dist/gateway/static/root/assets/user-model-page-DkIuYpuf.js +0 -2
- package/dist/gateway/static/root/assets/voice-api-key-field-DB--pFJX.js +0 -1
- package/dist/gateway/static/root/assets/voice-transcribe-api-Cp2uDvFO.js +0 -1
- package/dist/gateway/static/root/assets/work-discovery-overlay-Blwp7T-_.js +0 -1
- package/dist/gateway/static/root/assets/workflow-run-setup-panel-Czfs5XFH.js +0 -3
- package/dist/gateway/static/root/assets/workflows-page-RN_QXcGY.js +0 -6
- package/dist/gateway/static/root/assets/workspace-api-lHTRLje0.js +0 -2
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-D31rz9OQ.js +0 -1
- package/dist/src/agent/bootstrap/project-agents-context.d.ts +0 -2
- package/dist/src/agent/bootstrap/project-agents-context.js +0 -30
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { runProcess } from "../../process/run-process.js";
|
|
2
|
+
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
2
3
|
import { commandRegistry, commandTimeout } from "../commands/command-registry.js";
|
|
3
4
|
import { evaluateExecPolicy } from "../sandbox/exec-policy.js";
|
|
4
5
|
import { formatSize, truncateTail } from "./truncate.js";
|
|
5
6
|
import { publishArtifactPaths } from "./publish-artifacts.js";
|
|
7
|
+
import { classifyVerificationCommand } from "../coding/verification-command.js";
|
|
6
8
|
import { resolve } from "node:path";
|
|
7
9
|
import { Type } from "@sinclair/typebox";
|
|
8
10
|
//#region src/agent/tools/exec-command.ts
|
|
9
11
|
const DEFAULT_MAX_OUTPUT_CHARS = 5e4;
|
|
10
12
|
const ExecCommandSchema = Type.Object({
|
|
11
|
-
cmd: Type.String({ description: "Command for the default platform shell: /bin/sh on Unix and in Docker; cmd.exe on Windows hosts.
|
|
13
|
+
cmd: Type.String({ description: "Command for the default platform shell: /bin/sh on Unix and in Docker; cmd.exe on Windows hosts. Commands start in the workspace; use cwd instead of cd. For verification, invoke the existing test runner directly without shell chains, pipes, or output filters so its exit status and evidence remain unambiguous. Use maxOutputChars to limit output." }),
|
|
12
14
|
cwd: Type.Optional(Type.String({ description: "Working directory. Relative paths are resolved under the agent workspace." })),
|
|
13
15
|
timeoutMs: Type.Optional(Type.Number({ description: "Command timeout in milliseconds. Defaults to 1800000 (30m) and is capped at 14400000 (4h)." })),
|
|
14
16
|
maxOutputChars: Type.Optional(Type.Number({ description: "Maximum characters returned to the model. UI streaming still receives output deltas." })),
|
|
@@ -17,9 +19,10 @@ const ExecCommandSchema = Type.Object({
|
|
|
17
19
|
maximum: 6e4,
|
|
18
20
|
description: "Return a running job after this wait; manage it with managed_job. Omit to wait for completion. Cannot be combined with outputs."
|
|
19
21
|
})),
|
|
22
|
+
reuseVerification: Type.Optional(Type.Boolean({ description: "Publish outputs using this exact command and cwd from a prior successful check at the identical workspace revision, without executing again. Requires outputs. Fails closed if no matching evidence; omit when a fresh execution is required." })),
|
|
20
23
|
outputs: Type.Optional(Type.Array(Type.String({ minLength: 1 }), {
|
|
21
24
|
maxItems: 50,
|
|
22
|
-
description: "Final user-facing files
|
|
25
|
+
description: "Final user-facing files to persist after this command succeeds, including files written earlier in the task. Put all final paths on the final verification command to verify and publish in one call. Relative paths resolve under the effective cwd."
|
|
23
26
|
}))
|
|
24
27
|
});
|
|
25
28
|
function clampMaxOutputChars(raw) {
|
|
@@ -52,6 +55,7 @@ function formatOutputForModel(details, maxOutputChars) {
|
|
|
52
55
|
};
|
|
53
56
|
}
|
|
54
57
|
function createExecCommandTool(workspaceCwd, options) {
|
|
58
|
+
const successfulChecks = /* @__PURE__ */ new Map();
|
|
55
59
|
return {
|
|
56
60
|
name: "exec_command",
|
|
57
61
|
description: [
|
|
@@ -60,7 +64,7 @@ function createExecCommandTool(workspaceCwd, options) {
|
|
|
60
64
|
"Use apply_patch for file edits; do not edit files by shell redirection unless explicitly necessary.",
|
|
61
65
|
"Relative cwd values resolve under the current agent workspace.",
|
|
62
66
|
"Use a fresh output directory with mkdir -p. Avoid destructive cleanup such as rm -rf on variable paths; blocked cleanup should be removed, never disguised or moved to bypass policy. A syntax preflight on Unix host commands prevents partial writes from malformed shell syntax.",
|
|
63
|
-
"
|
|
67
|
+
"Default delivery is a workspace link. For requested downloads, add outputs to a necessary check. After it passed, use reuseVerification:true with the same cmd/cwd and outputs to publish without executing again; never rerun solely for attachments. Successful receipts need no republishing."
|
|
64
68
|
].join(" "),
|
|
65
69
|
parameters: ExecCommandSchema,
|
|
66
70
|
label: "Run Command",
|
|
@@ -170,9 +174,40 @@ function createExecCommandTool(workspaceCwd, options) {
|
|
|
170
174
|
};
|
|
171
175
|
}
|
|
172
176
|
}
|
|
177
|
+
const checkKey = JSON.stringify([policy.effectiveCwd, command]);
|
|
178
|
+
if (params.reuseVerification) {
|
|
179
|
+
signal?.throwIfAborted();
|
|
180
|
+
const previous = successfulChecks.get(checkKey);
|
|
181
|
+
const revision = await readWorkspaceRevision(workspaceCwd);
|
|
182
|
+
if (!params.outputs?.length || isolation || !revision || previous?.revision !== revision) throw new Error("Nothing executed or published: no reusable successful check at this workspace revision. Use an existing artifact receipt, publish_artifacts, or perform necessary fresh verification.");
|
|
183
|
+
const artifacts = await publishArtifactPaths({
|
|
184
|
+
paths: params.outputs,
|
|
185
|
+
baseDir: policy.effectiveCwd,
|
|
186
|
+
workspaceRoot: workspaceCwd,
|
|
187
|
+
toolCallId
|
|
188
|
+
});
|
|
189
|
+
return {
|
|
190
|
+
content: [{
|
|
191
|
+
type: "text",
|
|
192
|
+
text: `No command executed. Reused successful check ${previous.toolCallId} at unchanged revision ${revision}. Artifacts: ${artifacts.filter((item) => item.availability === "available").length} published.`
|
|
193
|
+
}],
|
|
194
|
+
details: {
|
|
195
|
+
...previous.details,
|
|
196
|
+
id: void 0,
|
|
197
|
+
durationMs: 0,
|
|
198
|
+
stdout: "",
|
|
199
|
+
stderr: "",
|
|
200
|
+
aggregatedOutput: "",
|
|
201
|
+
executionPerformed: false,
|
|
202
|
+
reusedFromToolCallId: previous.toolCallId,
|
|
203
|
+
artifacts
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
}
|
|
173
207
|
const runtimeEnv = options?.prepareEnv ? await options.prepareEnv(policy.sanitizedEnv, policy.effectiveCwd) : policy.sanitizedEnv;
|
|
174
208
|
const owner = options?.getConversationId?.() ?? workspaceCwd;
|
|
175
209
|
const registry = commandRegistry();
|
|
210
|
+
successfulChecks.delete(checkKey);
|
|
176
211
|
let commandResult = await registry.start({
|
|
177
212
|
workspace: workspaceCwd,
|
|
178
213
|
isolation,
|
|
@@ -232,6 +267,16 @@ function createExecCommandTool(workspaceCwd, options) {
|
|
|
232
267
|
const published = details.artifacts.filter((item) => item.availability === "available").length;
|
|
233
268
|
const failed = details.artifacts.length - published;
|
|
234
269
|
resultText += `\n\nArtifacts: ${published} published${failed > 0 ? `, ${failed} failed` : ""}.`;
|
|
270
|
+
resultText += `\n${details.artifacts.map((item) => `${JSON.stringify(item.title)}: ${item.availability}`).join("\n")}`;
|
|
271
|
+
}
|
|
272
|
+
if (!isolation && details.status === "success" && details.exitCode === 0 && classifyVerificationCommand(command) === "check") {
|
|
273
|
+
const revision = await readWorkspaceRevision(workspaceCwd);
|
|
274
|
+
const receipt = commandResult;
|
|
275
|
+
if (revision && receipt.startRevision === revision && receipt.endRevision === revision) successfulChecks.set(checkKey, {
|
|
276
|
+
revision,
|
|
277
|
+
toolCallId,
|
|
278
|
+
details
|
|
279
|
+
});
|
|
235
280
|
}
|
|
236
281
|
return {
|
|
237
282
|
content: [{
|
|
@@ -27,6 +27,7 @@ import type { WorkflowRunServiceLike } from '../../workflows/service/workflow-ru
|
|
|
27
27
|
import type { SkillManager } from '../skills/skill-manager.js';
|
|
28
28
|
import { type ToolExecutorConfig } from './executor.js';
|
|
29
29
|
export interface ToolFactoryDeps {
|
|
30
|
+
isWorkspaceTrusted?: (workspaceDir: string) => boolean | null | undefined;
|
|
30
31
|
workspace: string;
|
|
31
32
|
extensionRegistry?: ExtensionRegistry;
|
|
32
33
|
getCurrentContext: () => {
|
|
@@ -8,24 +8,24 @@ import { getSessionMetadata } from "../../storage/sqlite/session-read-repository
|
|
|
8
8
|
import { patchSessionMetadata } from "../../storage/sqlite/session-repository.js";
|
|
9
9
|
import { getSessionTaskPlan, setSessionTaskPlan } from "../../storage/sqlite/session-task-plan-repository.js";
|
|
10
10
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
11
|
-
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
12
11
|
import { init_agent_scope, resolveDefaultAgentId } from "../agent-scope.js";
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
|
|
13
|
+
import { skillEnvironmentId } from "../skills/installer.js";
|
|
14
|
+
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
15
15
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
16
|
+
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
17
|
+
import { PERSONAL_TOOL_DESCRIPTIONS } from "../../personal-agent/policy.js";
|
|
16
18
|
import { PERSONAL_REQUEST_TOOL_IDS, TASK_EXECUTION_TOOL_IDS, filterExecutionTools, resolveExecutionToolPolicy } from "../embedded/execution-tool-policy.js";
|
|
17
19
|
import { LOCAL_READ_MAX_CHARS } from "./local-read-budget.js";
|
|
18
20
|
import { createPersonalAttentionTool } from "./personal-attention-tool.js";
|
|
21
|
+
import { withCoreToolExposure } from "./toolExposure.js";
|
|
19
22
|
import { markCodemodeCoreRead } from "./codemode-permissions.js";
|
|
20
23
|
import "../../../packages/browser-control-contract/src/index.js";
|
|
21
24
|
import { getEmbeddedExecutionRunId, getEmbeddedExecutionSession } from "../embedded/execution-context.js";
|
|
22
25
|
import { wrapToolsWithProtection } from "./executor.js";
|
|
23
|
-
import { EXTERNAL_TOOL_NAMES } from "../external-tools/gateway-tools.js";
|
|
24
26
|
import { createDefaultExternalToolGatewayTools } from "../external-tools/index.js";
|
|
25
27
|
import { createReadFileTool } from "./read.js";
|
|
26
28
|
import { createDataBatchTool } from "./dataBatch.js";
|
|
27
|
-
import { buildRuntimeEnvironment } from "../../runtime-tools/environment.js";
|
|
28
|
-
import { skillEnvironmentId } from "../skills/installer.js";
|
|
29
29
|
import { createWriteFileTool } from "./write.js";
|
|
30
30
|
import { createListDirTool } from "./list-dir.js";
|
|
31
31
|
import { createPublishArtifactsTool } from "./publish-artifacts.js";
|
|
@@ -85,7 +85,7 @@ import { ComputerRuntime } from "../../computer/runtime.js";
|
|
|
85
85
|
import { createComputerUseTool } from "./computer-use-tool.js";
|
|
86
86
|
import { createReviewWorkspaceTool } from "./review-workspace.js";
|
|
87
87
|
import { createLanguageDiagnosticsTool } from "./language-diagnostics.js";
|
|
88
|
-
import {
|
|
88
|
+
import { createNoninteractiveToolPolicy } from "./noninteractive-tool-policy.js";
|
|
89
89
|
import { mergeTtsConfigFromAppConfig } from "../../voice/tts/merge-config.js";
|
|
90
90
|
import { createTextToSpeechTool } from "./tts-tool.js";
|
|
91
91
|
import { getAgentCapabilityToolNames } from "../capabilities/registry.js";
|
|
@@ -268,7 +268,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
268
268
|
agentId: options?.agentId ?? (cfg ? resolveDefaultAgentId() : "main")
|
|
269
269
|
});
|
|
270
270
|
const agentId = options?.agentId;
|
|
271
|
-
const resolvedAgentId = agentId ?? (cfg ? resolveDefaultAgentId() : "main");
|
|
271
|
+
const resolvedAgentId = agentId ?? (executionConversationId ? getSessionMetadata(executionConversationId)?.agentId : void 0) ?? (cfg ? resolveDefaultAgentId() : "main");
|
|
272
272
|
const personalExecution = executionConversationId ? personalRequestForExecution(executionConversationId) : void 0;
|
|
273
273
|
const personalExecutionMarker = executionConversationId && isXopcDatabaseOpen() ? getSessionMetadata(executionConversationId)?.customData?.personalReadRequestId : void 0;
|
|
274
274
|
if (personalExecution && executionConversationId && personalExecutionMarker !== personalExecution.requestId) patchSessionMetadata(executionConversationId, { customData: {
|
|
@@ -292,7 +292,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
292
292
|
return key ? getSessionMetadata(key)?.projectId : void 0;
|
|
293
293
|
};
|
|
294
294
|
const getCommandIsolation = () => {
|
|
295
|
-
return this.deps.getConfig?.() ?
|
|
295
|
+
return this.deps.getConfig?.() ? resolveEffectiveAgentConfigForAgent(resolvedAgentId).config.runtime.commandIsolation : void 0;
|
|
296
296
|
};
|
|
297
297
|
const externalTools = createDefaultExternalToolGatewayTools({
|
|
298
298
|
workspace,
|
|
@@ -578,9 +578,10 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
578
578
|
startWorkflowRun: this.deps.getWorkflowRunService ? (params) => this.deps.getWorkflowRunService().startWorkflowRun(params) : void 0
|
|
579
579
|
})] : [],
|
|
580
580
|
...primary ? [createDelegateTool({
|
|
581
|
+
isWorkspaceTrusted: this.deps.isWorkspaceTrusted,
|
|
581
582
|
workspace,
|
|
582
583
|
getParentTools: () => options?.getParentTools?.() ?? filterToolsByDisabledSet(core, disabled),
|
|
583
|
-
createParentPolicy: options?.createDelegationPolicy ?? (() =>
|
|
584
|
+
createParentPolicy: options?.createDelegationPolicy ?? (() => createNoninteractiveToolPolicy({
|
|
584
585
|
getConfig: () => this.deps.getConfig?.(),
|
|
585
586
|
conversationId: currentConversationId(),
|
|
586
587
|
agentId: resolvedAgentId
|
|
@@ -602,6 +603,8 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
602
603
|
},
|
|
603
604
|
toolExecutorConfig: this.deps.toolExecutorConfig,
|
|
604
605
|
buildChildTools: (childOpts) => {
|
|
606
|
+
const childAgentId = childOpts.agentId ?? resolvedAgentId;
|
|
607
|
+
const childConfig = childOpts.getConfig() ? resolveEffectiveAgentConfigForAgent(childAgentId).config : void 0;
|
|
605
608
|
return new AgentToolsFactory({
|
|
606
609
|
workspace: childOpts.workspace,
|
|
607
610
|
bus: childOpts.bus,
|
|
@@ -609,21 +612,17 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
609
612
|
getConfig: childOpts.getConfig,
|
|
610
613
|
getPrimaryModel: () => childOpts.model,
|
|
611
614
|
endpointTools: childOpts.endpointTools ?? this.deps.endpointTools,
|
|
612
|
-
toolExecutorConfig:
|
|
615
|
+
toolExecutorConfig: {
|
|
616
|
+
...childOpts.toolExecutorConfig,
|
|
617
|
+
resolveTimeoutMs: (name) => childOpts.getConfig() ? resolveEffectiveAgentConfigForAgent(childAgentId).config.tools[name]?.timeoutMs : void 0
|
|
618
|
+
}
|
|
613
619
|
}).createAllTools({
|
|
614
620
|
workspace: childOpts.workspace,
|
|
615
621
|
getPrimaryModel: () => childOpts.model,
|
|
616
|
-
agentId:
|
|
617
|
-
conversationId: childOpts.
|
|
618
|
-
toolAllowlist:
|
|
619
|
-
disabledTools: new Set([
|
|
620
|
-
...disabled ?? [],
|
|
621
|
-
EXTERNAL_TOOL_NAMES.search,
|
|
622
|
-
EXTERNAL_TOOL_NAMES.describe,
|
|
623
|
-
EXTERNAL_TOOL_NAMES.execute,
|
|
624
|
-
EXTERNAL_TOOL_NAMES.requireConnection,
|
|
625
|
-
EXTERNAL_TOOL_NAMES.updateConnectionObjective
|
|
626
|
-
])
|
|
622
|
+
agentId: childAgentId,
|
|
623
|
+
conversationId: childOpts.conversationId,
|
|
624
|
+
toolAllowlist: childConfig?.toolAllowlist,
|
|
625
|
+
disabledTools: new Set(Object.entries(childConfig?.tools ?? {}).filter(([, policy]) => policy.mode === "deny").map(([name]) => name))
|
|
627
626
|
});
|
|
628
627
|
}
|
|
629
628
|
})] : [],
|
|
@@ -641,7 +640,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
641
640
|
"xopc_tool_execute"
|
|
642
641
|
].some((name) => !disabled?.has(name))) {
|
|
643
642
|
const dataTools = () => {
|
|
644
|
-
const policies = this.deps.getConfig?.() ?
|
|
643
|
+
const policies = this.deps.getConfig?.() ? resolveEffectiveAgentConfigForAgent(resolvedAgentId).config.tools : void 0;
|
|
645
644
|
if (policies?.data_batch?.mode === "deny") return [];
|
|
646
645
|
return filterToolsByDisabledSet(core, disabled).filter((tool) => (!allowed || allowed.has(tool.name)) && policies?.[tool.name]?.mode !== "deny");
|
|
647
646
|
};
|
|
@@ -654,7 +653,7 @@ var AgentToolsFactory = class AgentToolsFactory {
|
|
|
654
653
|
return filterExecutionTools(executionToolPolicy, filterToolsByDisabledSet(core.map(markCodemodeCoreRead), disabled).filter((tool) => (!allowed || allowed.has(tool.name)) && !(personalToolsConfigured && tool.name === "clarify")).map((tool) => personalToolsConfigured && !tool.name.startsWith("personal_") && PERSONAL_TOOL_DESCRIPTIONS[tool.name] ? {
|
|
655
654
|
...tool,
|
|
656
655
|
description: PERSONAL_TOOL_DESCRIPTIONS[tool.name]
|
|
657
|
-
} : tool));
|
|
656
|
+
} : tool)).map((tool) => executionToolPolicy.discovery ? withCoreToolExposure(tool) : tool);
|
|
658
657
|
}
|
|
659
658
|
createCapabilityTools(capabilityNames, options) {
|
|
660
659
|
const disabled = options?.disabledTools;
|
package/dist/src/agent/tools/{delegation-parent-policy.d.ts → noninteractive-tool-policy.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Config } from '../../config/schema.js';
|
|
2
2
|
/** Noninteractive callers cannot silently turn an ask policy into an allow. */
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function createNoninteractiveToolPolicy(options: {
|
|
4
4
|
getConfig: () => Config | undefined;
|
|
5
5
|
conversationId?: string;
|
|
6
6
|
agentId?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveEffectiveAgentConfigForAgent, resolveEffectiveAgentConfigForSession } from "../../config/agent-profile.js";
|
|
2
2
|
import { createAgentTurnPolicy } from "../orchestration/agent-turn-policy.js";
|
|
3
|
-
//#region src/agent/tools/
|
|
3
|
+
//#region src/agent/tools/noninteractive-tool-policy.ts
|
|
4
4
|
/** Noninteractive callers cannot silently turn an ask policy into an allow. */
|
|
5
|
-
function
|
|
5
|
+
function createNoninteractiveToolPolicy(options) {
|
|
6
6
|
const policies = (name, args) => {
|
|
7
7
|
if (!options.getConfig()) return [];
|
|
8
8
|
const resolved = options.conversationId ? resolveEffectiveAgentConfigForSession(options.conversationId) : options.agentId ? resolveEffectiveAgentConfigForAgent(options.agentId) : resolveEffectiveAgentConfigForSession(void 0);
|
|
@@ -23,7 +23,7 @@ function createDelegationParentPolicy(options) {
|
|
|
23
23
|
const blocked = policies(context.toolCall.name, context.args).find((policy) => policy.mode !== "allow");
|
|
24
24
|
return blocked ? {
|
|
25
25
|
block: true,
|
|
26
|
-
reason: `${blocked.id} requires
|
|
26
|
+
reason: `${blocked.id} requires authorization (${blocked.mode}).`
|
|
27
27
|
} : void 0;
|
|
28
28
|
},
|
|
29
29
|
resolveToolLimit: (name, args) => {
|
|
@@ -36,4 +36,4 @@ function createDelegationParentPolicy(options) {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
|
-
export {
|
|
39
|
+
export { createNoninteractiveToolPolicy };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getSqliteDatabase, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { init_session_instance_repository, readCurrentTranscriptId } from "../../storage/sqlite/session-instance-repository.js";
|
|
3
|
-
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
4
3
|
import { getPersonalAgentByConversation } from "../../personal-agent/repository.js";
|
|
4
|
+
import { resolveUserContextSessionAccess } from "../../user-context/access-policy.js";
|
|
5
5
|
import { boundedPersonalResult } from "./personal-result-budget.js";
|
|
6
6
|
import { parseLocalCheckTime } from "../../personal-agent/proactivity/follow-up-request.js";
|
|
7
7
|
import { applyThreadFeedback, getAttention, getProactivitySettings, listAttention, listInterestCandidates, patchAttention, patchProactivitySettings, rollbackStrategy, saveAttention, strategyState, userText } from "../../personal-agent/proactivity/repository.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { CapabilityDispatcher } from "../../capabilities/runtime/dispatcher.js";
|
|
1
2
|
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
2
3
|
import { LOCAL_READ_MAX_CHARS } from "./local-read-budget.js";
|
|
3
4
|
import { getEmbeddedExecutionSession } from "../embedded/execution-context.js";
|
|
4
|
-
import { CapabilityDispatcher } from "../../capabilities/runtime/dispatcher.js";
|
|
5
5
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
6
6
|
import { registerProjectReadCapabilities } from "../../projects/capabilities/read.js";
|
|
7
7
|
import { registerAutomationReadCapabilities } from "../../automations/capabilities/read.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getSqliteDatabase, init_transaction, runSqliteWriteTransaction } from "../../storage/sqlite/transaction.js";
|
|
2
2
|
import { TaskRunRepository, init_task_run_repository } from "../../tasks/task-run-repository.js";
|
|
3
3
|
import { init_request_repository, personalRequestForExecution } from "../../personal-agent/request-repository.js";
|
|
4
|
-
import { assertPersonalRequestAccountAccess } from "../../personal-agent/request-access.js";
|
|
5
4
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
6
5
|
import { selectionRequestHash } from "../../agent-matching/selection-repository.js";
|
|
6
|
+
import { assertPersonalRequestAccountAccess } from "../../personal-agent/request-access.js";
|
|
7
7
|
import { PersonalRequestResultSchema } from "../../personal-agent/request-result.js";
|
|
8
8
|
import { Type } from "@sinclair/typebox";
|
|
9
9
|
//#region src/agent/tools/personal-request-result-tool.ts
|
|
@@ -5,11 +5,11 @@ import { getPersonalRequest, init_request_repository, listPersonalRequests, upda
|
|
|
5
5
|
import { getActiveConnectionWait, init_connection_wait_repository, reviseCurrentConnectionObjective, updateConnectionWait } from "../../storage/sqlite/connection-wait-repository.js";
|
|
6
6
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
7
7
|
import { init_session_repository } from "../../storage/sqlite/session-repository.js";
|
|
8
|
-
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
9
8
|
import { TaskAllocationRepository } from "../../tasks/task-allocation-repository.js";
|
|
9
|
+
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
10
|
+
import { selectionRequestHash } from "../../agent-matching/selection-repository.js";
|
|
10
11
|
import { boundedPersonalResult } from "./personal-result-budget.js";
|
|
11
12
|
import { personalCapabilities } from "../../personal-agent/capability-service.js";
|
|
12
|
-
import { selectionRequestHash } from "../../agent-matching/selection-repository.js";
|
|
13
13
|
import { createPersonalTaskTool } from "./personal-task-tool.js";
|
|
14
14
|
import { assertPersonalRequestTimeRange, cancelPersonalRequest, personalRequestSnapshot, publishPersonalRequest, stopPersonalRequestExecution, submitPersonalRequest } from "../../personal-agent/request-service.js";
|
|
15
15
|
import { Type } from "@sinclair/typebox";
|
|
@@ -6,20 +6,20 @@ import { TaskRepository, init_task_repository } from "../../tasks/task-repositor
|
|
|
6
6
|
import { getPersonalRequest, init_request_repository } from "../../personal-agent/request-repository.js";
|
|
7
7
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
8
8
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
9
|
-
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
10
9
|
import { TaskAllocationRepository } from "../../tasks/task-allocation-repository.js";
|
|
11
10
|
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
11
|
+
import { isPersonalConversation } from "../../personal-agent/repository.js";
|
|
12
12
|
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
13
|
-
import { boundedPersonalResult } from "./personal-result-budget.js";
|
|
14
|
-
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
15
13
|
import { parseTaskHandoffReferences } from "../../tasks/task-handoff.js";
|
|
14
|
+
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
16
15
|
import { TaskApplicationService } from "../../tasks/task-application-service.js";
|
|
17
|
-
import {
|
|
16
|
+
import { AgentSelectionRepository, selectionRequestHash } from "../../agent-matching/selection-repository.js";
|
|
18
17
|
import { getAvailablePersonalAgentTools, personalAgentModelAvailability } from "../../personal-agent/specialist-capabilities.js";
|
|
19
18
|
import { assessSpecialist, matchSpecialists } from "../../agent-matching/service.js";
|
|
20
|
-
import { createXopcUseTool } from "./xopc-use-tool.js";
|
|
21
|
-
import { AgentSelectionRepository, selectionRequestHash } from "../../agent-matching/selection-repository.js";
|
|
22
19
|
import { assertSpecialistEligible, createSelectedTask } from "../../agent-matching/delegation-service.js";
|
|
20
|
+
import { boundedPersonalResult } from "./personal-result-budget.js";
|
|
21
|
+
import { PERSONAL_WORKER_RESULT_GUIDANCE } from "../../personal-agent/communication.js";
|
|
22
|
+
import { createXopcUseTool } from "./xopc-use-tool.js";
|
|
23
23
|
import { cancelPersonalTask } from "../../personal-agent/task-cancel.js";
|
|
24
24
|
import { randomUUID } from "node:crypto";
|
|
25
25
|
import { Type } from "@sinclair/typebox";
|
|
@@ -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";
|
|
3
4
|
import { evaluateFilePolicy } from "../sandbox/exec-policy.js";
|
|
4
5
|
import { readWorkspaceFile } from "../sandbox/fileAccess.js";
|
|
5
6
|
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 { Type } from "@sinclair/typebox";
|
|
@@ -75,7 +75,7 @@ function createPublishArtifactsTool(workspace) {
|
|
|
75
75
|
return {
|
|
76
76
|
name: "publish_artifacts",
|
|
77
77
|
label: "Publish Artifacts",
|
|
78
|
-
description: "Publish completed user-facing files
|
|
78
|
+
description: "Publish only completed requested user-facing files missing a current successful artifact receipt. This tool cannot read, edit, create files, or execute commands. If a required edit is blocked, report that limitation without publishing the original or probing this tool. Pass missing final paths together; exclude unchanged captured files, temporary files, and source edits.",
|
|
79
79
|
parameters: PublishArtifactsSchema,
|
|
80
80
|
mutationScope: "none",
|
|
81
81
|
supportsParallel: false,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { readWorkspaceRevision } from "../coding/workspace-revision.js";
|
|
2
1
|
import { prepareSafeToolEnv } from "../sandbox/sanitize-env-vars.js";
|
|
2
|
+
import { readWorkspaceRevision } from "../coding/workspace-revision.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,4 +1,4 @@
|
|
|
1
|
-
import type { SearchResult } from './types.js';
|
|
1
|
+
import type { SearchMetadata, SearchResult } from './types.js';
|
|
2
2
|
export declare const SEARCH_CACHE_TTL_MS: number;
|
|
3
3
|
export interface SearchCacheEntry {
|
|
4
4
|
key: string;
|
|
@@ -7,11 +7,13 @@ export interface SearchCacheEntry {
|
|
|
7
7
|
results: SearchResult[];
|
|
8
8
|
provider: string;
|
|
9
9
|
capturedAt: number;
|
|
10
|
+
metadata?: SearchMetadata;
|
|
10
11
|
}
|
|
11
12
|
export interface SearchCache {
|
|
12
13
|
get(key: string): SearchCacheEntry | undefined;
|
|
13
14
|
set(entry: SearchCacheEntry): void;
|
|
14
15
|
}
|
|
16
|
+
export declare function withoutSearchCache<T>(run: () => T): T;
|
|
15
17
|
/** Research owns this scope. No account-wide or cross-conversation cache exists. */
|
|
16
18
|
export declare function withSearchCache<T>(cache: SearchCache, run: () => T): T;
|
|
17
19
|
export declare function currentSearchCache(): SearchCache | undefined;
|
|
@@ -2,6 +2,9 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
2
2
|
//#region src/agent/tools/search/cache.ts
|
|
3
3
|
const SEARCH_CACHE_TTL_MS = 10 * 6e4;
|
|
4
4
|
const searchCache = new AsyncLocalStorage();
|
|
5
|
+
function withoutSearchCache(run) {
|
|
6
|
+
return searchCache.exit(run);
|
|
7
|
+
}
|
|
5
8
|
/** Research owns this scope. No account-wide or cross-conversation cache exists. */
|
|
6
9
|
function withSearchCache(cache, run) {
|
|
7
10
|
return searchCache.run(cache, run);
|
|
@@ -16,4 +19,4 @@ var SearchCacheWriteError = class extends Error {
|
|
|
16
19
|
}
|
|
17
20
|
};
|
|
18
21
|
//#endregion
|
|
19
|
-
export { SEARCH_CACHE_TTL_MS, SearchCacheWriteError, currentSearchCache, withSearchCache };
|
|
22
|
+
export { SEARCH_CACHE_TTL_MS, SearchCacheWriteError, currentSearchCache, withSearchCache, withoutSearchCache };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare function deepseekSearchEndpoint(baseUrl?: string): string;
|
|
2
|
+
export declare function deepseekSearchBody(query: string, count: number): string;
|
|
3
|
+
export declare function deepseekSearchResults(body: unknown): Array<{
|
|
4
|
+
title: string;
|
|
5
|
+
url: string;
|
|
6
|
+
description: string;
|
|
7
|
+
publishedAt?: string;
|
|
8
|
+
}>;
|
|
9
|
+
export declare function readDeepseekResponse(response: Response): Promise<unknown>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { __esmMin } from "../../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
//#region src/agent/tools/search/providers/deepseek-protocol.ts
|
|
3
|
+
function deepseekSearchEndpoint(baseUrl = "https://api.deepseek.com") {
|
|
4
|
+
const url = new URL(baseUrl);
|
|
5
|
+
if (url.protocol !== "https:" || url.username || url.password || url.search || url.hash || ![
|
|
6
|
+
"",
|
|
7
|
+
"/",
|
|
8
|
+
"/v1",
|
|
9
|
+
"/v1/"
|
|
10
|
+
].includes(url.pathname)) throw new Error("DeepSeek API base URL must be an HTTPS origin with optional /v1");
|
|
11
|
+
return `${url.origin}/v1/tools/search`;
|
|
12
|
+
}
|
|
13
|
+
function deepseekSearchBody(query, count) {
|
|
14
|
+
if (!query.trim() || Array.from(query).length > 128) throw new Error("DeepSeek search query must contain 1–128 Unicode characters");
|
|
15
|
+
return JSON.stringify({
|
|
16
|
+
query,
|
|
17
|
+
count: Math.max(1, Math.min(50, Math.floor(count))),
|
|
18
|
+
need_content: false
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function deepseekSearchResults(body) {
|
|
22
|
+
if (!body || typeof body !== "object" || !("results" in body) || !Array.isArray(body.results)) throw new Error("DeepSeek search returned an invalid response");
|
|
23
|
+
const seen = /* @__PURE__ */ new Set();
|
|
24
|
+
return body.results.flatMap((item) => {
|
|
25
|
+
if (!item || typeof item !== "object") return [];
|
|
26
|
+
const row = item;
|
|
27
|
+
if (typeof row.title !== "string" || !row.title.trim() || typeof row.url !== "string") return [];
|
|
28
|
+
let url;
|
|
29
|
+
try {
|
|
30
|
+
url = new URL(row.url);
|
|
31
|
+
} catch {
|
|
32
|
+
return [];
|
|
33
|
+
}
|
|
34
|
+
if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || seen.has(url.href)) return [];
|
|
35
|
+
seen.add(url.href);
|
|
36
|
+
const description = typeof row.summary === "string" && row.summary.trim() ? row.summary : typeof row.snippet === "string" ? row.snippet : "";
|
|
37
|
+
return [{
|
|
38
|
+
title: row.title.trim().slice(0, 300),
|
|
39
|
+
url: url.href,
|
|
40
|
+
description: description.trim().slice(0, 800),
|
|
41
|
+
...typeof row.date === "string" && row.date.length <= 100 ? { publishedAt: row.date } : {}
|
|
42
|
+
}];
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async function readDeepseekResponse(response) {
|
|
46
|
+
const limit = 2 * 1024 * 1024;
|
|
47
|
+
if (Number(response.headers.get("content-length")) > limit) {
|
|
48
|
+
await response.body?.cancel();
|
|
49
|
+
throw new Error("DeepSeek search response is too large");
|
|
50
|
+
}
|
|
51
|
+
const reader = response.body?.getReader();
|
|
52
|
+
if (!reader) throw new Error("DeepSeek search returned an empty response");
|
|
53
|
+
const chunks = [];
|
|
54
|
+
let length = 0;
|
|
55
|
+
try {
|
|
56
|
+
while (true) {
|
|
57
|
+
const { value, done } = await reader.read();
|
|
58
|
+
if (done) break;
|
|
59
|
+
length += value.byteLength;
|
|
60
|
+
if (length > limit) {
|
|
61
|
+
await reader.cancel();
|
|
62
|
+
throw new Error("DeepSeek search response is too large");
|
|
63
|
+
}
|
|
64
|
+
chunks.push(value);
|
|
65
|
+
}
|
|
66
|
+
} finally {
|
|
67
|
+
reader.releaseLock();
|
|
68
|
+
}
|
|
69
|
+
const bytes = new Uint8Array(length);
|
|
70
|
+
let offset = 0;
|
|
71
|
+
for (const chunk of chunks) {
|
|
72
|
+
bytes.set(chunk, offset);
|
|
73
|
+
offset += chunk.byteLength;
|
|
74
|
+
}
|
|
75
|
+
try {
|
|
76
|
+
return JSON.parse(new TextDecoder().decode(bytes));
|
|
77
|
+
} catch {
|
|
78
|
+
throw new Error("DeepSeek search returned invalid JSON");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
var init_deepseek_protocol = __esmMin((() => {}));
|
|
82
|
+
//#endregion
|
|
83
|
+
init_deepseek_protocol();
|
|
84
|
+
export { deepseekSearchBody, deepseekSearchEndpoint, deepseekSearchResults, init_deepseek_protocol, readDeepseekResponse };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SearchProvider, SearchResult } from '../types.js';
|
|
2
|
+
export declare class DeepSeekProvider implements SearchProvider {
|
|
3
|
+
private readonly apiKey;
|
|
4
|
+
private readonly baseUrl?;
|
|
5
|
+
readonly name = "deepseek";
|
|
6
|
+
constructor(apiKey: string, baseUrl?: string);
|
|
7
|
+
isAvailable(): boolean;
|
|
8
|
+
search(query: string, count: number, signal?: AbortSignal): Promise<SearchResult[]>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { deepseekSearchBody, deepseekSearchEndpoint, deepseekSearchResults, init_deepseek_protocol, readDeepseekResponse } from "./deepseek-protocol.js";
|
|
2
|
+
import { searchHttpError } from "../errors.js";
|
|
3
|
+
import { SearchRateLimitError, SearchRequestGate } from "../request-gate.js";
|
|
4
|
+
//#region src/agent/tools/search/providers/deepseek.ts
|
|
5
|
+
init_deepseek_protocol();
|
|
6
|
+
const gate = new SearchRequestGate();
|
|
7
|
+
var DeepSeekProvider = class {
|
|
8
|
+
name = "deepseek";
|
|
9
|
+
constructor(apiKey, baseUrl) {
|
|
10
|
+
this.apiKey = apiKey;
|
|
11
|
+
this.baseUrl = baseUrl;
|
|
12
|
+
}
|
|
13
|
+
isAvailable() {
|
|
14
|
+
return Boolean(this.apiKey.trim());
|
|
15
|
+
}
|
|
16
|
+
async search(query, count, signal) {
|
|
17
|
+
const endpoint = deepseekSearchEndpoint(this.baseUrl);
|
|
18
|
+
const body = deepseekSearchBody(query, count);
|
|
19
|
+
try {
|
|
20
|
+
await gate.wait(signal);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
if (error instanceof SearchRateLimitError) throw searchHttpError(new Response(null, {
|
|
23
|
+
status: 429,
|
|
24
|
+
headers: { "retry-after": String(error.retryAfterMs / 1e3) }
|
|
25
|
+
}));
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
const response = await fetch(endpoint, {
|
|
29
|
+
method: "POST",
|
|
30
|
+
redirect: "error",
|
|
31
|
+
signal,
|
|
32
|
+
headers: {
|
|
33
|
+
authorization: `Bearer ${this.apiKey}`,
|
|
34
|
+
"content-type": "application/json",
|
|
35
|
+
accept: "application/json"
|
|
36
|
+
},
|
|
37
|
+
body
|
|
38
|
+
});
|
|
39
|
+
if (!response.ok) {
|
|
40
|
+
if (response.status === 429) {
|
|
41
|
+
const retryAfter = response.headers.get("retry-after");
|
|
42
|
+
const ms = retryAfter === null ? 1e3 : Number.isFinite(Number(retryAfter)) ? Number(retryAfter) * 1e3 : Date.parse(retryAfter) - Date.now();
|
|
43
|
+
gate.cooldown(Number.isFinite(ms) ? Math.max(1e3, ms) : 1e3);
|
|
44
|
+
}
|
|
45
|
+
await response.body?.cancel();
|
|
46
|
+
throw searchHttpError(response, response.status === 402 ? "DeepSeek search account balance is insufficient" : `DeepSeek search failed (${response.status})`);
|
|
47
|
+
}
|
|
48
|
+
return deepseekSearchResults(await readDeepseekResponse(response)).slice(0, count).map(({ publishedAt: _date, ...result }) => ({
|
|
49
|
+
...result,
|
|
50
|
+
source: this.name
|
|
51
|
+
}));
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
//#endregion
|
|
55
|
+
export { DeepSeekProvider };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ModelCatalogStore } from '../../../../providers/model-catalog-store.js';
|
|
2
2
|
import { type ProviderAuthService } from '../../../../providers/provider-auth-service.js';
|
|
3
|
-
import type { SearchProvider, SearchResult } from '../types.js';
|
|
3
|
+
import type { SearchExecution, SearchProvider, SearchResult } from '../types.js';
|
|
4
4
|
interface XopcCloudSearchProviderOptions {
|
|
5
5
|
region: 'cn' | 'global';
|
|
6
6
|
fetchImpl?: typeof fetch;
|
|
@@ -17,5 +17,6 @@ export declare class XopcCloudSearchProvider implements SearchProvider {
|
|
|
17
17
|
cacheIdentity(): string;
|
|
18
18
|
isAvailable(): boolean;
|
|
19
19
|
search(query: string, count: number, signal?: AbortSignal): Promise<SearchResult[]>;
|
|
20
|
+
searchWithMetadata(query: string, count: number, signal?: AbortSignal): Promise<SearchExecution>;
|
|
20
21
|
}
|
|
21
22
|
export {};
|