@xopcai/xopc 0.0.392 → 0.0.393
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/xopc.extension.json +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-CZmaQbC9.js → agent-avatar-dicebear-1AF2KGju.js} +1 -1
- package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CPJr7NRR.js +1 -0
- package/dist/gateway/static/root/assets/agent-plugin-dialog-cjJXJj_3.js +1 -0
- package/dist/gateway/static/root/assets/agents-DW3TlnIg.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-B_MFhXXU.js +1 -0
- package/dist/gateway/static/root/assets/appearance-settings-TYGidVnd.js +1 -0
- package/dist/gateway/static/root/assets/apps-page-DOkyvOF0.js +1 -0
- package/dist/gateway/static/root/assets/{archive-plugin-dSkmoISk.js → archive-plugin-BrFfEp0u.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-DhWRn0dZ.js → automations-page-B7OofUPF.js} +1 -1
- package/dist/gateway/static/root/assets/automations-workspace-DIod-bfm.js +6 -0
- package/dist/gateway/static/root/assets/{binary-plugins-BJlZrYym.js → binary-plugins-BfAWnYG8.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-OHBssIfN.js → block-editor-_Y-QwZ-3.js} +5 -5
- package/dist/gateway/static/root/assets/browser-automation-inputs-DH9QHI9m.js +1 -0
- package/dist/gateway/static/root/assets/browser-automations-page-B_SnD9B0.js +3 -0
- package/dist/gateway/static/root/assets/browser-settings-page-BPlqYpMM.js +3 -0
- package/dist/gateway/static/root/assets/capabilities-page-BtzZvMIK.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-WzoG3oBb.js +8 -0
- package/dist/gateway/static/root/assets/capability-header-actions-CFVx3iaZ.js +1 -0
- package/dist/gateway/static/root/assets/channels-BXA55GY2.js +1 -0
- package/dist/gateway/static/root/assets/chat-terminal-dock-D3GuiG3N.js +36 -0
- package/dist/gateway/static/root/assets/computer-settings-page-CIbHDlp8.js +1 -0
- package/dist/gateway/static/root/assets/connector-service-page-CDyCHkpK.js +1 -0
- package/dist/gateway/static/root/assets/connectors-page-DA2b6cJu.js +1 -0
- package/dist/gateway/static/root/assets/date-picker-C424c_g9.js +1 -0
- package/dist/gateway/static/root/assets/dependency-picker-BVJh9sYc.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-Q52A8vjp.js +1 -0
- package/dist/gateway/static/root/assets/desktop-pet-settings-CZr1CXxu.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-D_WWTsze.js +1 -0
- package/dist/gateway/static/root/assets/directory-picker-path-field-C6cUgrvg.js +1 -0
- package/dist/gateway/static/root/assets/extension-debug-page-DyyfC4gA.js +1 -0
- package/dist/gateway/static/root/assets/extension-page-Dho9o3ZZ.js +1 -0
- package/dist/gateway/static/root/assets/extension-settings-page-CdnIGyCH.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-D0KSQRNZ.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-BNpj_mIM.js} +1 -1
- package/dist/gateway/static/root/assets/home-page-CH_A0W29.js +2 -0
- package/dist/gateway/static/root/assets/image-generation-api-DwkO2y46.js +1 -0
- package/dist/gateway/static/root/assets/imports-page-BrYvomnU.js +1 -0
- package/dist/gateway/static/root/assets/index-CKdOZoVu.js +260 -0
- package/dist/gateway/static/root/assets/index-Rxjt-jc3.css +1 -0
- package/dist/gateway/static/root/assets/keyboard-shortcuts-settings-BveDYfYk.js +1 -0
- package/dist/gateway/static/root/assets/local-app-workbench-page-CcIi1BhT.js +1 -0
- package/dist/gateway/static/root/assets/local-apps-page-B1a69mlV.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-Us1jv3C4.js +2 -0
- package/dist/gateway/static/root/assets/management-settings-C9RAM7-s.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-CR1fp6IL.js} +1 -1
- package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-DQdcaMiu.js +1 -0
- package/dist/gateway/static/root/assets/messages-CaeL_miw.js +3 -0
- package/dist/gateway/static/root/assets/note-detail-panel-Q4yRx9iZ.js +5 -0
- package/dist/gateway/static/root/assets/notes-page-C9qu16IN.js +8 -0
- package/dist/gateway/static/root/assets/page-context-capture-button-Cn_WK68Y.js +1 -0
- package/dist/gateway/static/root/assets/personal-page-DrP6hEcg.js +1 -0
- package/dist/gateway/static/root/assets/preview-open-alternatives-3NbiWGRG.js +1 -0
- package/dist/gateway/static/root/assets/product-open-page-KKE5-V8k.js +1 -0
- package/dist/gateway/static/root/assets/product-preview-content-BM0oqNxi.js +1 -0
- package/dist/gateway/static/root/assets/project-detail-page-CPZrwf8n.js +1 -0
- package/dist/gateway/static/root/assets/projects-page-Besfx_07.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-CTDghL5L.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-W0X_Fy7b.js +1 -0
- package/dist/gateway/static/root/assets/schema-form-DNM2Zdyr.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-Dxtablvd.js +1 -0
- package/dist/gateway/static/root/assets/settings-advanced-gate-C7zklouD.js +1 -0
- package/dist/gateway/static/root/assets/settings-form-section-DCSHPFAN.js +1 -0
- package/dist/gateway/static/root/assets/{settings-page-4odCW0_2.js → settings-page-B18UbbaJ.js} +1 -1
- package/dist/gateway/static/root/assets/setup-status-panel-JoSfluza.js +1 -0
- package/dist/gateway/static/root/assets/share-preview-page-BLnS3hoH.js +2 -0
- package/dist/gateway/static/root/assets/shares-settings-DcIuPJK3.js +1 -0
- package/dist/gateway/static/root/assets/skill-api-CcYGkRPL.js +1 -0
- package/dist/gateway/static/root/assets/skill-reload-api-PnUZjoPK.js +1 -0
- package/dist/gateway/static/root/assets/skills-page-D3JAw62U.js +2 -0
- package/dist/gateway/static/root/assets/style-BQqU-1pP.js +7 -0
- package/dist/gateway/static/root/assets/system-settings-panel-C974myUM.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-CiljFekC.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-DEE75MUn.js +1 -0
- package/dist/gateway/static/root/assets/tunnel-api-DWyI3uA3.js +1 -0
- package/dist/gateway/static/root/assets/usage-page-DJYvbxk7.js +1 -0
- package/dist/gateway/static/root/assets/use-autosave-CY0YuljR.js +1 -0
- package/dist/gateway/static/root/assets/user-model-page-eHZJD6Fw.js +2 -0
- package/dist/gateway/static/root/assets/voice-api-key-field-BNG4ixJE.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-CohIoAre.js +1 -0
- package/dist/gateway/static/root/assets/{workflow-run-setup-panel-Czfs5XFH.js → workflow-run-setup-panel-BXI8eyYh.js} +2 -2
- package/dist/gateway/static/root/assets/workflows-page-CVti0u-l.js +6 -0
- package/dist/gateway/static/root/assets/xopc-cloud-account-card-C_COnY_B.js +1 -0
- package/dist/gateway/static/root/index.html +19 -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 +11 -20
- package/dist/src/agent/background-review/run-background-review.js +1 -1
- 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/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/external-tool-discovery.js +1 -1
- package/dist/src/agent/embedded/run-for-session.js +1 -0
- package/dist/src/agent/embedded/run-turn.js +41 -5
- 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 +2 -2
- 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/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/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 +3 -1
- 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/service/process-direct-streaming.js +1 -1
- package/dist/src/agent/service.js +3 -2
- package/dist/src/agent/skills/format-skills-prompt.js +5 -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/skill-manage-ops.js +1 -1
- 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.js +4 -3
- package/dist/src/agent/tools/factory.d.ts +1 -0
- package/dist/src/agent/tools/factory.js +20 -21
- 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-read-tool.js +1 -1
- package/dist/src/agent/tools/personal-task-tool.js +1 -1
- package/dist/src/agent/tools/publish-artifacts.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/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/xopc-use-tool.js +7 -3
- 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/automations/capabilities/drafts.js +1 -1
- 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/chat-commands/agent-edit.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/models.js +1 -1
- package/dist/src/cli/commands/onboard/model.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/utils/init-workspace-core.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/loader.js +1 -1
- package/dist/src/config/models-json.d.ts +14 -8
- 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 +21 -4
- package/dist/src/extensions/agent-plugins/validation.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/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/config-patch/gateway.js +7 -0
- package/dist/src/gateway/hono/routes/config-patch/misc.js +2 -2
- package/dist/src/gateway/hono/routes/connectors.js +1 -1
- package/dist/src/gateway/hono/routes/context-sources.js +1 -1
- package/dist/src/gateway/hono/routes/models.js +5 -2
- package/dist/src/gateway/hono/routes/notes.js +2 -2
- package/dist/src/gateway/hono/routes/projects.js +2 -2
- package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
- package/dist/src/gateway/hono/routes/tasks.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/service/config-coordinator.d.ts +8 -3
- package/dist/src/gateway/service.js +5 -3
- package/dist/src/gateway/xopc-cloud-capability-setup.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/local-apps/service.js +1 -1
- 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/service.js +1 -1
- 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 +2 -2
- 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-service.js +14 -9
- package/dist/src/personal-agent/service.js +2 -2
- 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/project-trust/trust-store.d.ts +5 -0
- package/dist/src/project-trust/trust-store.js +7 -1
- 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 +2 -0
- package/dist/src/providers/model-supplements.d.ts +0 -2
- package/dist/src/providers/model-supplements.js +2 -18
- 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/resolve-route.js +1 -1
- package/dist/src/routing/resolve-tui-session-key.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/task-allocation-service.js +51 -40
- package/dist/src/tasks/task-application-service.js +5 -1
- package/dist/src/tasks/task-contract-planner.js +21 -6
- package/dist/src/tasks/task-handoff-service.js +1 -1
- package/dist/src/tasks/task-language.d.ts +2 -0
- package/dist/src/tasks/task-language.js +13 -2
- package/dist/src/tasks/task-run-coordinator.js +5 -1
- package/dist/src/tasks/task-run-dispatcher.js +2 -1
- package/dist/src/tui/backends/embedded-backend.js +2 -2
- package/dist/src/tui/tui.js +1 -1
- package/dist/src/voice/realtime/persona-context.js +1 -1
- package/dist/src/workflows/service/workflow-run-service.js +2 -3
- package/package.json +8 -4
- 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/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
|
@@ -23,6 +23,9 @@ var XopcCloudSearchProvider = class {
|
|
|
23
23
|
return Boolean(this.catalogStore.getSource("xopc-cloud")?.search);
|
|
24
24
|
}
|
|
25
25
|
async search(query, count, signal) {
|
|
26
|
+
return (await this.searchWithMetadata(query, count, signal)).results;
|
|
27
|
+
}
|
|
28
|
+
async searchWithMetadata(query, count, signal) {
|
|
26
29
|
const source = this.catalogStore.getSource("xopc-cloud");
|
|
27
30
|
if (!source?.search) throw new Error("XOPC Cloud search is not available");
|
|
28
31
|
const requestSignal = signal ? AbortSignal.any([signal, AbortSignal.timeout(3e4)]) : AbortSignal.timeout(3e4);
|
|
@@ -46,7 +49,7 @@ var XopcCloudSearchProvider = class {
|
|
|
46
49
|
const body = await response.json().catch(() => null);
|
|
47
50
|
if (!response.ok) throw searchHttpError(response, typeof body?.error?.message === "string" ? body.error.message : `XOPC Cloud search failed (${response.status})`);
|
|
48
51
|
if (!Array.isArray(body?.results)) throw new Error("XOPC Cloud search returned an invalid response");
|
|
49
|
-
|
|
52
|
+
const results = body.results.flatMap((result) => {
|
|
50
53
|
if (typeof result.title !== "string" || typeof result.url !== "string" || typeof result.description !== "string") return [];
|
|
51
54
|
return [{
|
|
52
55
|
title: result.title,
|
|
@@ -55,7 +58,39 @@ var XopcCloudSearchProvider = class {
|
|
|
55
58
|
source: this.name
|
|
56
59
|
}];
|
|
57
60
|
});
|
|
61
|
+
const upstream = searchProviderId(response.headers.get("x-xopc-search-upstream")) ?? searchProviderId(body.upstream);
|
|
62
|
+
const countHeader = response.headers.get("x-xopc-provider-attempts");
|
|
63
|
+
const attemptCount = countHeader !== null && /^\d{1,4}$/.test(countHeader) && Number(countHeader) > 0 ? Number(countHeader) : void 0;
|
|
64
|
+
const attempts = Array.isArray(body.trace) ? body.trace.slice(0, 24).flatMap((item) => {
|
|
65
|
+
if (!item || typeof item !== "object") return [];
|
|
66
|
+
const row = item;
|
|
67
|
+
const source = searchProviderId(row.provider);
|
|
68
|
+
if (!source || ![
|
|
69
|
+
"success",
|
|
70
|
+
"empty",
|
|
71
|
+
"error",
|
|
72
|
+
"skipped"
|
|
73
|
+
].includes(String(row.outcome))) return [];
|
|
74
|
+
const reason = typeof row.reason === "string" && /^[a-z_]{1,64}$/.test(row.reason) ? row.reason : void 0;
|
|
75
|
+
return [{
|
|
76
|
+
provider: this.name,
|
|
77
|
+
upstream: source,
|
|
78
|
+
outcome: row.outcome,
|
|
79
|
+
...reason ? { reason } : {}
|
|
80
|
+
}];
|
|
81
|
+
}) : void 0;
|
|
82
|
+
return {
|
|
83
|
+
results,
|
|
84
|
+
metadata: {
|
|
85
|
+
...upstream ? { upstream } : {},
|
|
86
|
+
...attemptCount ? { attemptCount } : {},
|
|
87
|
+
...attempts?.length ? { attempts } : {}
|
|
88
|
+
}
|
|
89
|
+
};
|
|
58
90
|
}
|
|
59
91
|
};
|
|
92
|
+
function searchProviderId(value) {
|
|
93
|
+
return typeof value === "string" && /^[a-z0-9][a-z0-9_-]{0,63}$/.test(value) ? value : void 0;
|
|
94
|
+
}
|
|
60
95
|
//#endregion
|
|
61
96
|
export { XopcCloudSearchProvider };
|
|
@@ -6,6 +6,7 @@ export declare class SearchProviderRegistry {
|
|
|
6
6
|
private readonly cache;
|
|
7
7
|
private readonly cachePrefix;
|
|
8
8
|
private readonly requestTimeoutMs;
|
|
9
|
+
private readonly cloudRequestTimeoutMs;
|
|
9
10
|
private readonly retryDelayMs;
|
|
10
11
|
sourceRequests: number;
|
|
11
12
|
private readonly cooldowns;
|
|
@@ -4,6 +4,7 @@ import { executeWithTimeout } from "../../lifecycle/timeout-wrapper.js";
|
|
|
4
4
|
import { SearchError, classifySearchError, searchFailureInfo } from "./errors.js";
|
|
5
5
|
import { SearchCacheWriteError, currentSearchCache } from "./cache.js";
|
|
6
6
|
import { BraveProvider } from "./providers/brave.js";
|
|
7
|
+
import { DeepSeekProvider } from "./providers/deepseek.js";
|
|
7
8
|
import { TavilyProvider } from "./providers/tavily.js";
|
|
8
9
|
import { BingApiProvider } from "./providers/bing-api.js";
|
|
9
10
|
import { BingHtmlProvider } from "./providers/bing-html.js";
|
|
@@ -21,6 +22,7 @@ var SearchProviderRegistry = class {
|
|
|
21
22
|
cache;
|
|
22
23
|
cachePrefix;
|
|
23
24
|
requestTimeoutMs;
|
|
25
|
+
cloudRequestTimeoutMs;
|
|
24
26
|
retryDelayMs;
|
|
25
27
|
sourceRequests = 0;
|
|
26
28
|
cooldowns = /* @__PURE__ */ new Map();
|
|
@@ -43,6 +45,7 @@ var SearchProviderRegistry = class {
|
|
|
43
45
|
this.fallbackProvider?.name
|
|
44
46
|
])).digest("hex");
|
|
45
47
|
this.requestTimeoutMs = options.requestTimeoutMs ?? 1e4;
|
|
48
|
+
this.cloudRequestTimeoutMs = options.requestTimeoutMs ?? 3e4;
|
|
46
49
|
this.retryDelayMs = options.retryDelayMs ?? 300;
|
|
47
50
|
log.debug({
|
|
48
51
|
region: config.region,
|
|
@@ -58,6 +61,9 @@ var SearchProviderRegistry = class {
|
|
|
58
61
|
for (const p of config.providers) {
|
|
59
62
|
if (p.disabled) continue;
|
|
60
63
|
switch (p.type) {
|
|
64
|
+
case "deepseek":
|
|
65
|
+
list.push(new DeepSeekProvider(p.apiKey ?? "", p.url));
|
|
66
|
+
break;
|
|
61
67
|
case "brave":
|
|
62
68
|
list.push(new BraveProvider(p.apiKey ?? ""));
|
|
63
69
|
break;
|
|
@@ -91,7 +97,8 @@ var SearchProviderRegistry = class {
|
|
|
91
97
|
results: structuredClone(cached.results),
|
|
92
98
|
provider: cached.provider,
|
|
93
99
|
cached: true,
|
|
94
|
-
capturedAt: cached.capturedAt
|
|
100
|
+
capturedAt: cached.capturedAt,
|
|
101
|
+
...cached.metadata ? { metadata: structuredClone(cached.metadata) } : {}
|
|
95
102
|
} : void 0;
|
|
96
103
|
}
|
|
97
104
|
remember(query, count, response) {
|
|
@@ -102,6 +109,7 @@ var SearchProviderRegistry = class {
|
|
|
102
109
|
count,
|
|
103
110
|
results: structuredClone(response.results),
|
|
104
111
|
provider: response.provider,
|
|
112
|
+
...response.metadata ? { metadata: structuredClone(response.metadata) } : {},
|
|
105
113
|
capturedAt: response.capturedAt ?? Date.now()
|
|
106
114
|
});
|
|
107
115
|
} catch (error) {
|
|
@@ -117,7 +125,7 @@ var SearchProviderRegistry = class {
|
|
|
117
125
|
try {
|
|
118
126
|
return await executeWithTimeout(() => execute(controller.signal), {
|
|
119
127
|
toolName: `web_search:${name}`,
|
|
120
|
-
timeoutMs: this.requestTimeoutMs,
|
|
128
|
+
timeoutMs: name === "xopc-cloud" ? this.cloudRequestTimeoutMs : this.requestTimeoutMs,
|
|
121
129
|
signal,
|
|
122
130
|
onTimeout: (error) => controller.abort(error)
|
|
123
131
|
});
|
|
@@ -139,6 +147,7 @@ var SearchProviderRegistry = class {
|
|
|
139
147
|
const hit = this.cached(query, count);
|
|
140
148
|
if (hit) return hit;
|
|
141
149
|
let lastError;
|
|
150
|
+
const attempts = [];
|
|
142
151
|
for (const provider of [...this.providers, ...this.fallbackProvider ? [this.fallbackProvider] : []]) {
|
|
143
152
|
signal?.throwIfAborted();
|
|
144
153
|
authorize();
|
|
@@ -152,13 +161,24 @@ var SearchProviderRegistry = class {
|
|
|
152
161
|
signal?.throwIfAborted();
|
|
153
162
|
authorize();
|
|
154
163
|
try {
|
|
155
|
-
const
|
|
164
|
+
const execution = await this.attempt(provider.name, signal, async (requestSignal) => provider.searchWithMetadata ? provider.searchWithMetadata(query, count, requestSignal) : { results: await provider.search(query, count, requestSignal) });
|
|
156
165
|
signal?.throwIfAborted();
|
|
157
166
|
authorize();
|
|
167
|
+
const metadata = execution.metadata;
|
|
168
|
+
const route = metadata?.attempts?.length ? metadata.attempts : provider.name === "xopc-cloud" && (metadata?.attemptCount ?? 1) > 1 ? [] : [{
|
|
169
|
+
provider: provider.name,
|
|
170
|
+
...metadata?.upstream ? { upstream: metadata.upstream } : {},
|
|
171
|
+
outcome: execution.results.length ? "success" : "empty"
|
|
172
|
+
}];
|
|
158
173
|
const response = {
|
|
159
|
-
results,
|
|
174
|
+
results: execution.results,
|
|
160
175
|
provider: provider.name,
|
|
161
|
-
capturedAt: Date.now()
|
|
176
|
+
capturedAt: Date.now(),
|
|
177
|
+
metadata: {
|
|
178
|
+
...metadata,
|
|
179
|
+
attemptCount: attempts.length + (metadata?.attemptCount ?? route.length),
|
|
180
|
+
attempts: [...attempts, ...route].slice(-24)
|
|
181
|
+
}
|
|
162
182
|
};
|
|
163
183
|
this.remember(query, count, response);
|
|
164
184
|
return response;
|
|
@@ -167,6 +187,11 @@ var SearchProviderRegistry = class {
|
|
|
167
187
|
const failure = classifySearchError(error, signal);
|
|
168
188
|
if (signal?.aborted || failure.kind === "permission_denied" || failure.kind === "cancelled") throw failure;
|
|
169
189
|
lastError = failure;
|
|
190
|
+
attempts.push({
|
|
191
|
+
provider: provider.name,
|
|
192
|
+
outcome: "error",
|
|
193
|
+
reason: failure.kind
|
|
194
|
+
});
|
|
170
195
|
if (failure.kind === "rate_limited") this.cooldowns.set(provider.name, {
|
|
171
196
|
until: Date.now() + (failure.retryAfterMs ?? this.retryDelayMs),
|
|
172
197
|
error: failure
|
|
@@ -218,7 +243,8 @@ var SearchProviderRegistry = class {
|
|
|
218
243
|
const response = {
|
|
219
244
|
results: item.results,
|
|
220
245
|
provider: provider.name,
|
|
221
|
-
capturedAt: Date.now()
|
|
246
|
+
capturedAt: Date.now(),
|
|
247
|
+
metadata: item.metadata
|
|
222
248
|
};
|
|
223
249
|
this.remember(request.query, request.count, response);
|
|
224
250
|
outputs.set(this.key(request.query, request.count), {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class SearchRateLimitError extends Error {
|
|
2
|
+
readonly retryAfterMs: number;
|
|
3
|
+
readonly status = 429;
|
|
4
|
+
constructor(retryAfterMs: number);
|
|
5
|
+
}
|
|
6
|
+
/** Process-wide callers share a gate, including when credentials belong to one account. */
|
|
7
|
+
export declare class SearchRequestGate {
|
|
8
|
+
private nextStartAt;
|
|
9
|
+
private cooldownUntil;
|
|
10
|
+
private pending;
|
|
11
|
+
cooldown(ms: number): void;
|
|
12
|
+
wait(signal?: AbortSignal): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { setTimeout } from "node:timers/promises";
|
|
2
|
+
//#region src/agent/tools/search/request-gate.ts
|
|
3
|
+
var SearchRateLimitError = class extends Error {
|
|
4
|
+
status = 429;
|
|
5
|
+
constructor(retryAfterMs) {
|
|
6
|
+
super("Search upstream rate limit exceeded");
|
|
7
|
+
this.retryAfterMs = retryAfterMs;
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
/** Process-wide callers share a gate, including when credentials belong to one account. */
|
|
11
|
+
var SearchRequestGate = class {
|
|
12
|
+
nextStartAt = 0;
|
|
13
|
+
cooldownUntil = 0;
|
|
14
|
+
pending = 0;
|
|
15
|
+
cooldown(ms) {
|
|
16
|
+
this.cooldownUntil = Math.max(this.cooldownUntil, Date.now() + ms);
|
|
17
|
+
}
|
|
18
|
+
async wait(signal) {
|
|
19
|
+
signal?.throwIfAborted();
|
|
20
|
+
if (this.pending >= 8) throw new SearchRateLimitError(1e3);
|
|
21
|
+
this.pending++;
|
|
22
|
+
const queuedAt = Date.now();
|
|
23
|
+
try {
|
|
24
|
+
while (true) {
|
|
25
|
+
signal?.throwIfAborted();
|
|
26
|
+
const now = Date.now();
|
|
27
|
+
const waitMs = Math.max(0, this.nextStartAt - now, this.cooldownUntil - now);
|
|
28
|
+
if (now - queuedAt + waitMs > 2e3) throw new SearchRateLimitError(waitMs || 250);
|
|
29
|
+
if (!waitMs) {
|
|
30
|
+
this.nextStartAt = now + 250;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
await setTimeout(waitMs, void 0, { signal });
|
|
34
|
+
}
|
|
35
|
+
} finally {
|
|
36
|
+
this.pending--;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
41
|
+
export { SearchRateLimitError, SearchRequestGate };
|
|
@@ -11,7 +11,7 @@ function resolveWebSearchConfig(web) {
|
|
|
11
11
|
const search = web?.search;
|
|
12
12
|
const region = resolveWebSearchRegion(web);
|
|
13
13
|
const providers = (search?.providers ?? []).map((p) => {
|
|
14
|
-
const resolvedKey = p.apiKey !== void 0 && p.apiKey !== "" ? resolveKey(p.apiKey) : void 0;
|
|
14
|
+
const resolvedKey = p.type === "deepseek" && /^[A-Z][A-Z0-9_]*$/.test(p.apiKey ?? "") ? process.env[p.apiKey] : p.apiKey !== void 0 && p.apiKey !== "" ? resolveKey(p.apiKey) : void 0;
|
|
15
15
|
const url = p.url?.replace(/\/+$/, "");
|
|
16
16
|
return {
|
|
17
17
|
type: p.type,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SearchMetadata } from './types.js';
|
|
2
|
+
export interface SearchInfo extends SearchMetadata {
|
|
3
|
+
provider: string;
|
|
4
|
+
cached?: boolean;
|
|
5
|
+
capturedAt?: number;
|
|
6
|
+
}
|
|
7
|
+
/** Keep compact provenance through transcript truncation, excluding query and result payloads. */
|
|
8
|
+
export declare function sanitizeSearchInfo(value: unknown): SearchInfo | undefined;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/agent/tools/search/search-info.ts
|
|
2
|
+
/** Keep compact provenance through transcript truncation, excluding query and result payloads. */
|
|
3
|
+
function sanitizeSearchInfo(value) {
|
|
4
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return void 0;
|
|
5
|
+
const row = value;
|
|
6
|
+
const id = (v) => typeof v === "string" && /^[a-z0-9][a-z0-9_-]{0,63}$/.test(v);
|
|
7
|
+
if (!id(row.provider)) return void 0;
|
|
8
|
+
const attempts = Array.isArray(row.attempts) ? row.attempts.slice(0, 24).flatMap((item) => {
|
|
9
|
+
if (!item || typeof item !== "object") return [];
|
|
10
|
+
const step = item;
|
|
11
|
+
if (!id(step.provider) || ![
|
|
12
|
+
"success",
|
|
13
|
+
"empty",
|
|
14
|
+
"error",
|
|
15
|
+
"skipped"
|
|
16
|
+
].includes(String(step.outcome))) return [];
|
|
17
|
+
return [{
|
|
18
|
+
provider: step.provider,
|
|
19
|
+
outcome: step.outcome,
|
|
20
|
+
...id(step.upstream) ? { upstream: step.upstream } : {},
|
|
21
|
+
...typeof step.reason === "string" && /^[a-z_]{1,64}$/.test(step.reason) ? { reason: step.reason } : {}
|
|
22
|
+
}];
|
|
23
|
+
}) : void 0;
|
|
24
|
+
return {
|
|
25
|
+
provider: row.provider,
|
|
26
|
+
...id(row.upstream) ? { upstream: row.upstream } : {},
|
|
27
|
+
...typeof row.cached === "boolean" ? { cached: row.cached } : {},
|
|
28
|
+
...typeof row.capturedAt === "number" && Number.isSafeInteger(row.capturedAt) && row.capturedAt > 0 ? { capturedAt: row.capturedAt } : {},
|
|
29
|
+
...typeof row.attemptCount === "number" && Number.isSafeInteger(row.attemptCount) && row.attemptCount > 0 && row.attemptCount <= 1e4 ? { attemptCount: row.attemptCount } : {},
|
|
30
|
+
...attempts?.length ? { attempts } : {}
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { sanitizeSearchInfo };
|
|
@@ -11,11 +11,12 @@ export interface SearchProvider {
|
|
|
11
11
|
isAvailable(): boolean;
|
|
12
12
|
cacheIdentity?(): string;
|
|
13
13
|
search(query: string, count: number, signal?: AbortSignal): Promise<SearchResult[]>;
|
|
14
|
+
searchWithMetadata?(query: string, count: number, signal?: AbortSignal): Promise<SearchExecution>;
|
|
14
15
|
/** Optional host-implemented batch transport; ids must be echoed for partial results. */
|
|
15
16
|
searchBatch?(requests: SearchRequest[], signal?: AbortSignal): Promise<SearchBatchItem[]>;
|
|
16
17
|
}
|
|
17
18
|
export interface ResolvedSearchProviderEntry {
|
|
18
|
-
type: 'brave' | 'tavily' | 'bing' | 'searxng';
|
|
19
|
+
type: 'brave' | 'tavily' | 'bing' | 'searxng' | 'deepseek';
|
|
19
20
|
apiKey?: string;
|
|
20
21
|
url?: string;
|
|
21
22
|
disabled?: boolean;
|
|
@@ -35,12 +36,29 @@ export interface SearchBatchItem {
|
|
|
35
36
|
id: string;
|
|
36
37
|
results?: SearchResult[];
|
|
37
38
|
error?: SearchFailureInfo;
|
|
39
|
+
metadata?: SearchMetadata;
|
|
40
|
+
}
|
|
41
|
+
export interface SearchAttempt {
|
|
42
|
+
provider: string;
|
|
43
|
+
upstream?: string;
|
|
44
|
+
outcome: 'success' | 'empty' | 'error' | 'skipped';
|
|
45
|
+
reason?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface SearchMetadata {
|
|
48
|
+
upstream?: string;
|
|
49
|
+
attemptCount?: number;
|
|
50
|
+
attempts?: SearchAttempt[];
|
|
51
|
+
}
|
|
52
|
+
export interface SearchExecution {
|
|
53
|
+
results: SearchResult[];
|
|
54
|
+
metadata?: SearchMetadata;
|
|
38
55
|
}
|
|
39
56
|
export interface SearchResponse {
|
|
40
57
|
results: SearchResult[];
|
|
41
58
|
provider: string;
|
|
42
59
|
cached?: boolean;
|
|
43
60
|
capturedAt?: number;
|
|
61
|
+
metadata?: SearchMetadata;
|
|
44
62
|
}
|
|
45
63
|
export interface SearchBatchResponse extends SearchRequest {
|
|
46
64
|
response?: SearchResponse;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { getXopcToolMetadata, setXopcToolMetadata } from "../embedded/tool-metadata.js";
|
|
2
|
+
//#region src/agent/tools/toolExposure.ts
|
|
3
|
+
const EAGER_CORE_TOOLS = new Set([
|
|
4
|
+
"read_file",
|
|
5
|
+
"write_file",
|
|
6
|
+
"apply_patch",
|
|
7
|
+
"grep",
|
|
8
|
+
"find",
|
|
9
|
+
"list_dir",
|
|
10
|
+
"exec_command",
|
|
11
|
+
"review_workspace",
|
|
12
|
+
"publish_artifacts",
|
|
13
|
+
"task_collaboration",
|
|
14
|
+
"publish_task_result"
|
|
15
|
+
]);
|
|
16
|
+
/** Defer declarations, not permissions. pi tool_search loads the unchanged contract on demand. */
|
|
17
|
+
function withCoreToolExposure(tool) {
|
|
18
|
+
if (EAGER_CORE_TOOLS.has(tool.name) || getXopcToolMetadata(tool)?.exposure !== void 0) return tool;
|
|
19
|
+
return setXopcToolMetadata(tool, {
|
|
20
|
+
...getXopcToolMetadata(tool),
|
|
21
|
+
exposure: "deferred"
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { withCoreToolExposure };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SearchError, classifySearchError, searchFailureInfo } from "./search/errors.js";
|
|
2
2
|
import { SearchProviderRegistry } from "./search/registry.js";
|
|
3
3
|
import { resolveWebSearchConfig } from "./search/resolve-config.js";
|
|
4
|
+
import { sanitizeSearchInfo } from "./search/search-info.js";
|
|
4
5
|
import { fetchPublicText } from "./fetch-text.js";
|
|
5
6
|
import { Type } from "@sinclair/typebox";
|
|
6
7
|
//#region src/agent/tools/web.ts
|
|
@@ -23,7 +24,13 @@ function searchToolResult(query, count, response) {
|
|
|
23
24
|
query,
|
|
24
25
|
count,
|
|
25
26
|
cached: response.cached ?? false,
|
|
26
|
-
capturedAt: response.capturedAt
|
|
27
|
+
capturedAt: response.capturedAt,
|
|
28
|
+
searchInfo: sanitizeSearchInfo({
|
|
29
|
+
...response.metadata,
|
|
30
|
+
provider: response.provider,
|
|
31
|
+
cached: response.cached ?? false,
|
|
32
|
+
capturedAt: response.capturedAt
|
|
33
|
+
})
|
|
27
34
|
}
|
|
28
35
|
};
|
|
29
36
|
}
|
|
@@ -11,13 +11,13 @@ import { TaskRunRepository } from "../../tasks/task-run-repository.js";
|
|
|
11
11
|
import { getSessionMetadata } from "../../storage/sqlite/session-read-repository.js";
|
|
12
12
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
13
13
|
import "../../activity/index.js";
|
|
14
|
+
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
15
|
+
import "../../capabilities/runtime/dispatcher.js";
|
|
14
16
|
import { getDefaultAgentId, init_resolve_route } from "../../routing/resolve-route.js";
|
|
15
|
-
import { resolveTaskLocale } from "../../tasks/task-language.js";
|
|
17
|
+
import { hasUnlocalizedTaskText, resolveTaskLocale } from "../../tasks/task-language.js";
|
|
16
18
|
import { TaskReadModelProjector } from "../../tasks/task-read-model-projector.js";
|
|
17
19
|
import { TaskOriginRepository } from "../../tasks/task-origin-repository.js";
|
|
18
20
|
import { TaskConversationRepository } from "../../tasks/task-conversation-repository.js";
|
|
19
|
-
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
20
|
-
import "../../capabilities/runtime/dispatcher.js";
|
|
21
21
|
import { resolveProjectAgentId } from "../../projects/project-agent.js";
|
|
22
22
|
import "../../projects/index.js";
|
|
23
23
|
import { TaskCollaborationRepository } from "../../tasks/task-collaboration-repository.js";
|
|
@@ -1425,6 +1425,10 @@ async function handleTask(command, args, deps, dryRun, capabilities) {
|
|
|
1425
1425
|
ok: false,
|
|
1426
1426
|
error: `Invalid ${field}: pass a flat list of strings or omit this optional field`
|
|
1427
1427
|
};
|
|
1428
|
+
if (hasUnlocalizedTaskText(value, taskLocale)) return {
|
|
1429
|
+
ok: false,
|
|
1430
|
+
error: `Write ${field} in Simplified Chinese to match the task language. Preserve all requirements, paths, URLs and proper nouns; translate only explanatory prose.`
|
|
1431
|
+
};
|
|
1428
1432
|
contract[field] = value;
|
|
1429
1433
|
}
|
|
1430
1434
|
const originConversationId = deps.getCurrentConversationId?.();
|
|
@@ -20,6 +20,7 @@ import { type BuildChildToolsOptions } from '../child-agent-factory.js';
|
|
|
20
20
|
import type { ToolExecutorConfig } from '../tools/executor.js';
|
|
21
21
|
import type { SubagentRunOptions, SubagentRunner } from './types.js';
|
|
22
22
|
export interface DelegateSubagentRunnerDeps {
|
|
23
|
+
isWorkspaceTrusted?: (workspaceDir: string) => boolean | null | undefined;
|
|
23
24
|
workspace: string;
|
|
24
25
|
bus: MessageBus;
|
|
25
26
|
agentId?: string;
|
|
@@ -4,7 +4,7 @@ import { createSqliteTranscriptRuntime } from "../embedded/transcript-runtime.js
|
|
|
4
4
|
import { createDelegateChildHandle } from "../child-agent-factory.js";
|
|
5
5
|
import { DELEGATION_TOOL_CAPABILITIES, protectDelegatedTool, resolveDelegationTools } from "../tools/delegation-policy.js";
|
|
6
6
|
import { DELEGATE_BLOCKED_TOOLS } from "../tools/delegate-tool.js";
|
|
7
|
-
import {
|
|
7
|
+
import { createNoninteractiveToolPolicy } from "../tools/noninteractive-tool-policy.js";
|
|
8
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();
|
|
@@ -30,6 +30,7 @@ var DelegateSubagentRunner = class {
|
|
|
30
30
|
const fullPrompt = buildPrompt(prompt, opts, wantStructured);
|
|
31
31
|
const streamMode = resolveSubagentStreamMode(this.deps.getConfig);
|
|
32
32
|
const childOptions = {
|
|
33
|
+
isWorkspaceTrusted: this.deps.isWorkspaceTrusted,
|
|
33
34
|
workspace: this.deps.workspace,
|
|
34
35
|
goal: fullPrompt,
|
|
35
36
|
requesterConversationId: opts.sessionMetadata?.parentConversationId,
|
|
@@ -41,9 +42,8 @@ var DelegateSubagentRunner = class {
|
|
|
41
42
|
agentId: this.deps.agentId,
|
|
42
43
|
getConfig: this.deps.getConfig,
|
|
43
44
|
toolExecutorConfig: this.deps.toolExecutorConfig,
|
|
44
|
-
authorizeToolCall:
|
|
45
|
+
authorizeToolCall: createNoninteractiveToolPolicy({
|
|
45
46
|
getConfig: this.deps.getConfig,
|
|
46
|
-
conversationId: opts.sessionMetadata?.parentConversationId,
|
|
47
47
|
agentId: this.deps.agentId
|
|
48
48
|
}).beforeToolCall,
|
|
49
49
|
buildChildTools: (childOpts) => {
|
|
@@ -1,30 +1,35 @@
|
|
|
1
|
-
import { resolveEffectiveAgentProfile
|
|
1
|
+
import { resolveEffectiveAgentProfile } from "../../config/agent-profile.js";
|
|
2
2
|
import { AgentToolsFactory } from "../tools/factory.js";
|
|
3
3
|
//#region src/agent/workflow/workflow-child-tools.ts
|
|
4
4
|
/** Builds the tool set for workflow child agents (wired from gateway to avoid cycles). */
|
|
5
5
|
function buildWorkflowChildTools(childOptions) {
|
|
6
|
-
const
|
|
6
|
+
const config = childOptions.getConfig();
|
|
7
|
+
if (config && !childOptions.agentId) throw new Error("Workflow execution requires a configured Agent");
|
|
8
|
+
const profile = config && childOptions.agentId ? resolveEffectiveAgentProfile(childOptions.agentId) : void 0;
|
|
7
9
|
return new AgentToolsFactory({
|
|
8
10
|
workspace: childOptions.workspace,
|
|
9
11
|
bus: childOptions.bus,
|
|
10
|
-
getCurrentContext: () =>
|
|
11
|
-
conversationId: childOptions.
|
|
12
|
+
getCurrentContext: () => ({
|
|
13
|
+
conversationId: childOptions.conversationId,
|
|
12
14
|
channel: "workflow",
|
|
13
|
-
chatId: childOptions.
|
|
15
|
+
chatId: childOptions.conversationId,
|
|
14
16
|
origin: {
|
|
15
17
|
type: "system",
|
|
16
18
|
source: "workflow"
|
|
17
19
|
}
|
|
18
|
-
}
|
|
20
|
+
}),
|
|
19
21
|
getConfig: childOptions.getConfig,
|
|
20
22
|
getPrimaryModel: () => childOptions.model,
|
|
21
23
|
endpointTools: childOptions.endpointTools,
|
|
22
|
-
toolExecutorConfig:
|
|
24
|
+
toolExecutorConfig: {
|
|
25
|
+
...childOptions.toolExecutorConfig,
|
|
26
|
+
resolveTimeoutMs: (name) => childOptions.getConfig() && childOptions.agentId ? resolveEffectiveAgentProfile(childOptions.agentId).config.tools[name]?.timeoutMs : void 0
|
|
27
|
+
}
|
|
23
28
|
}).createAllTools({
|
|
24
29
|
workspace: childOptions.workspace,
|
|
25
30
|
getPrimaryModel: () => childOptions.model,
|
|
26
31
|
agentId: childOptions.agentId,
|
|
27
|
-
conversationId: childOptions.
|
|
32
|
+
conversationId: childOptions.conversationId,
|
|
28
33
|
disabledTools: profile?.tools.denied,
|
|
29
34
|
toolAllowlist: profile?.config.toolAllowlist
|
|
30
35
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_agent_session_key, normalizeAgentId } from "../../routing/agent-session-key.js";
|
|
2
1
|
import { init_agent_scope, resolveAgentIdForWorkspacePath } from "../agent-scope.js";
|
|
2
|
+
import { init_agent_session_key, normalizeAgentId } from "../../routing/agent-session-key.js";
|
|
3
3
|
import { SkillManager } from "../skills/skill-manager.js";
|
|
4
4
|
import { SystemPromptBuilder } from "../prompt/service-prompt-builder.js";
|
|
5
5
|
import { UserContextRuntimeRegistry } from "../../user-context/runtime.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AgentEntrySchema, EffectiveAgentConfigSchema } from "../agent-config/schema.js";
|
|
2
2
|
import { resolveEffectiveAgentConfig } from "../agent-config/resolver.js";
|
|
3
3
|
import { init_agent_config } from "../agent-config/index.js";
|
|
4
|
-
import { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
5
|
-
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
6
4
|
import { CapabilityError } from "../capabilities/runtime/errors.js";
|
|
7
5
|
import { defineAtomicCapability, defineReadCapability } from "../capabilities/runtime/dispatcher.js";
|
|
6
|
+
import { AgentCatalogRepository, init_repository } from "./repository.js";
|
|
7
|
+
import { init_agent_scope, resolveAgentWorkspaceDir } from "../agent/agent-scope.js";
|
|
8
8
|
import { AgentCatalogService } from "./service.js";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
//#region src/agent-catalog/capabilities.ts
|
|
@@ -3,10 +3,10 @@ import { init_src } from "../../../packages/gateway-contract/src/index.js";
|
|
|
3
3
|
import { init_trust_policy, resolveAutomationSafetyForTrust } from "../../user-context/trust-policy.js";
|
|
4
4
|
import { getUserTrustPolicy } from "../../storage/sqlite/user-trust-repository.js";
|
|
5
5
|
import { init_sqlite } from "../../storage/sqlite/index.js";
|
|
6
|
-
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
7
6
|
import { CapabilityError } from "../../capabilities/runtime/errors.js";
|
|
8
7
|
import { ExternalEffectNotAppliedError } from "../../capabilities/runtime/external-operations.js";
|
|
9
8
|
import { defineExternalCapability, defineReadCapability } from "../../capabilities/runtime/dispatcher.js";
|
|
9
|
+
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
10
10
|
import { AutomationCreateCapabilityInputSchema } from "./write.js";
|
|
11
11
|
import { simulateAutomation } from "../draft/automation-draft-validator.js";
|
|
12
12
|
import { AutomationDraftService } from "../draft/automation-draft-service.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_session_key, resolveConversationId } from "../../routing/session-key.js";
|
|
4
|
-
import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
|
|
5
3
|
import { normalizeAgentId } from "../../agent-catalog/id.js";
|
|
6
4
|
import { init_agent_scope } from "../../agent/agent-scope.js";
|
|
5
|
+
import { init_session_key, resolveConversationId } from "../../routing/session-key.js";
|
|
6
|
+
import { init_model_usage, withModelUsageOrigin } from "../../providers/model-usage.js";
|
|
7
7
|
import { resolveAutomationTimeoutSeconds } from "../domain/defaults.js";
|
|
8
8
|
//#region src/automations/service/action-executor.ts
|
|
9
9
|
init_model_usage();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { requireXopcDatabase } from "../storage/sqlite/connection.js";
|
|
2
2
|
import { init_sqlite } from "../storage/sqlite/index.js";
|
|
3
3
|
import { AgentCatalogService } from "../agent-catalog/service.js";
|
|
4
|
-
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
5
4
|
import { cutoverLegacyAgentConfig } from "../agent-catalog/migrations/legacy-config-cutover.js";
|
|
6
5
|
import "../agent-catalog/index.js";
|
|
6
|
+
import { ensureStarterAgentsInitialized } from "../agent/starter-agents.js";
|
|
7
7
|
import { migrateIdentityMarkdownToCatalog } from "../agent-catalog/migrations/identity-markdown-cutover.js";
|
|
8
8
|
import { migrateCloudPublicModelsSync } from "../migrations/cloud-public-models.js";
|
|
9
9
|
import { runBootstrapMigrationsSync } from "../migrations/runner.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SqliteCommitEffectError, init_transaction } from "../../storage/sqlite/transaction.js";
|
|
2
|
+
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
2
3
|
import { CapabilityError } from "./errors.js";
|
|
3
4
|
import { executeExternalOperation } from "./external-operations.js";
|
|
4
|
-
import { OperationConflictError, executeAtomicOperation } from "./atomic-operations.js";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/capabilities/runtime/dispatcher.ts
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CapabilityError } from "./errors.js";
|
|
2
2
|
import { CapabilityDispatcher } from "./dispatcher.js";
|
|
3
|
+
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
3
4
|
import { registerLocalAppReadCapabilities } from "../../local-apps/capabilities/read.js";
|
|
4
5
|
import { registerNoteReadCapabilities } from "../../notes/capabilities/read.js";
|
|
5
6
|
import { registerNoteWriteCapabilities } from "../../notes/capabilities/write.js";
|
|
@@ -16,7 +17,6 @@ import { registerAutomationDraftCapabilities } from "../../automations/capabilit
|
|
|
16
17
|
import { registerTaskWriteCapabilities } from "../../tasks/capabilities/write.js";
|
|
17
18
|
import { registerSettingsCapability } from "./settings.js";
|
|
18
19
|
import { registerAppContextCapability } from "./app-context.js";
|
|
19
|
-
import { registerAgentCapabilities } from "../../agent-catalog/capabilities.js";
|
|
20
20
|
//#region src/capabilities/runtime/product.ts
|
|
21
21
|
function createProductDispatcher(getNotes, taskWrites) {
|
|
22
22
|
const dispatcher = new CapabilityDispatcher();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
2
1
|
import { normalizeAgentId } from "../agent-catalog/id.js";
|
|
3
2
|
import { init_agent_scope, resolveAgentProfileDir } from "../agent/agent-scope.js";
|
|
3
|
+
import { init_agent_session_key, resolveAgentIdFromConversationId } from "../routing/agent-session-key.js";
|
|
4
4
|
import { WORKSPACE_FILES, init_paths } from "../config/paths.js";
|
|
5
5
|
import { commandRegistry } from "./registry.js";
|
|
6
6
|
import { join } from "node:path";
|
|
@@ -133,7 +133,7 @@ const ROOT_HELP_COMMANDS = [
|
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
135
|
name: "search",
|
|
136
|
-
description: "Manage web-search providers (brave / tavily / bing / searxng)"
|
|
136
|
+
description: "Manage web-search providers (brave / tavily / bing / searxng / deepseek)"
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
name: "import [options] [source]",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createLogger } from "../../utils/logger/index.js";
|
|
2
2
|
import { init_logger } from "../../utils/logger.js";
|
|
3
|
-
import { init_agent_session_key, resolveAgentMainConversationId } from "../../routing/agent-session-key.js";
|
|
4
3
|
import { init_agent_scope, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
4
|
+
import { init_agent_session_key, resolveAgentMainConversationId } from "../../routing/agent-session-key.js";
|
|
5
5
|
import { getAgentDefaultModelRef, init_schema } from "../../config/schema.js";
|
|
6
6
|
import { getWorkspacePath } from "../../config/workspace-path-helpers.js";
|
|
7
7
|
import { ExtensionLoader } from "../../extensions/loader.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { normalizeAgentId, validateAgentIdForNewAgent } from "../../agent-catalog/id.js";
|
|
2
2
|
import { AgentCatalogRepository, init_repository } from "../../agent-catalog/repository.js";
|
|
3
3
|
import { init_agent_scope, resolveAgentDir, resolveAgentWorkspaceDir, resolveDefaultAgentId } from "../../agent/agent-scope.js";
|
|
4
|
-
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
5
4
|
import { AgentCatalogService } from "../../agent-catalog/service.js";
|
|
5
|
+
import { resolveEffectiveAgentConfigForAgent } from "../../config/agent-profile.js";
|
|
6
6
|
import { colors } from "../utils/colors.js";
|
|
7
7
|
//#region src/cli/commands/agents.ts
|
|
8
8
|
init_repository();
|