kaijibot 2026.6.21 → 2026.6.22
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/.buildstamp +1 -1
- package/dist/abort-CxZY3nsr.js +202 -0
- package/dist/abort-cutoff.runtime-D5FOsnYW.js +20 -0
- package/dist/abort-cutoff.runtime.js +1 -1
- package/dist/abort.runtime-DfIOyW8M.js +2 -0
- package/dist/abort.runtime.js +1 -1
- package/dist/acp-cli-CGXRdw_k.js +2171 -0
- package/dist/acp-spawn-DKbKvPuU.js +1023 -0
- package/dist/acp-stateful-target-driver-WeMIyQR2.js +87 -0
- package/dist/action-agents-Dw33v5ym.js +67 -0
- package/dist/action-focus-BTLYwzxx.js +124 -0
- package/dist/action-help-DjgRJFg3.js +7 -0
- package/dist/action-info-6xDvEX0Q.js +58 -0
- package/dist/action-kill-DtQoZS29.js +33 -0
- package/dist/action-list-ClDeI7iE.js +21 -0
- package/dist/action-log-DSosstuh.js +30 -0
- package/dist/action-send-Vh1BuuNd.js +39 -0
- package/dist/action-spawn-B08ssbZ3.js +46 -0
- package/dist/action-unfocus-CEw-Ww9k.js +28 -0
- package/dist/agent-BXBykpuI.js +2 -0
- package/dist/agent-command-CUB1Qm88.js +1479 -0
- package/dist/agent-runner-utils-DN7nVODy.js +202 -0
- package/dist/agent-runner.runtime-DVXE9zZ9.js +2825 -0
- package/dist/agent-runner.runtime.js +1 -1
- package/dist/agents/model-catalog.runtime.js +1 -1
- package/dist/agents-BqqSOUcc.js +887 -0
- package/dist/agents-CVsWMDVp.js +5 -0
- package/dist/api--VGwAnD8.js +3 -0
- package/dist/api-6V55tozK.js +5 -0
- package/dist/api-B6ziqa7E.js +5 -0
- package/dist/api-C4yFynS8.js +2 -0
- package/dist/api-CT1XstLQ.js +4 -0
- package/dist/api-CgLK0Nl9.js +45 -0
- package/dist/api-CkSziYo8.js +4 -0
- package/dist/api-CmDVoeIs.js +2 -0
- package/dist/api-CziR8HhH.js +35 -0
- package/dist/api-D85vczn8.js +2 -0
- package/dist/api-DlP6Jt7i.js +3 -0
- package/dist/api-DvwX5wEJ.js +16 -0
- package/dist/api-cZen2Qw8.js +44 -0
- package/dist/api-gQ5luSlW.js +19 -0
- package/dist/apply-DQD25Xw1.js +493 -0
- package/dist/apply.runtime-BUedp4X6.js +166 -0
- package/dist/apply.runtime-CUOWwc5E.js +2 -0
- package/dist/apply.runtime.js +1 -1
- package/dist/audit-channel.collect.runtime.js +1 -1
- package/dist/audit-extra.async-UlJ9dtlX.js +847 -0
- package/dist/audit-u9caRELf.js +885 -0
- package/dist/audit.deep.runtime-DV71Wkn_.js +2 -0
- package/dist/audit.deep.runtime.js +1 -1
- package/dist/audit.nondeep.runtime-DOxcit3s.js +859 -0
- package/dist/audit.nondeep.runtime.js +1 -1
- package/dist/audit.runtime-CkaC5K-V.js +7 -0
- package/dist/audit.runtime.js +1 -1
- package/dist/auth-BtFIcjkK.js +181 -0
- package/dist/auth-choice-BDu6h5u6.js +353 -0
- package/dist/auth-choice-ChZMk5hI.js +3 -0
- package/dist/auth-choice-oYsuPPg8.js +71 -0
- package/dist/auth-choice-options-kLAihnil.js +104 -0
- package/dist/auth-choice-prompt-C6XJsZ_j.js +2 -0
- package/dist/auth-choice-prompt-sWGu0fT8.js +36 -0
- package/dist/auth-choice.plugin-providers.runtime.js +1 -1
- package/dist/auto-disable-B57JdBwe.js +69 -0
- package/dist/auto-disable-CmJfHDbk.js +2 -0
- package/dist/banner-BLSO_rVb.js +290 -0
- package/dist/banner-Bq8rH7x0.js +2 -0
- package/dist/binding-routing-CUqlgYnB.js +50 -0
- package/dist/binding-targets-r1FCdNWk.js +99 -0
- package/dist/bridge-server-DBiqLRkF.js +103 -0
- package/dist/browser-node-runtime-CaV_umAQ.js +12 -0
- package/dist/browser-runtime-a3vYRS_q.js +377 -0
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +3 -3
- package/dist/bundled/bootstrap-extra-files/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +3 -3
- package/dist/call.runtime.js +1 -1
- package/dist/capability-cli-5gQaEAHR.js +1350 -0
- package/dist/catalog-provider-DtmYtDqx.js +40 -0
- package/dist/cdp.helpers-C6bHP7D_.js +372 -0
- package/dist/channel-core-CmBBxIyB.js +5 -0
- package/dist/channel-plugin-resolution-CmsYI1my.js +146 -0
- package/dist/channel-selection.runtime.js +1 -1
- package/dist/channel.runtime-CVJx87rS.js +399 -0
- package/dist/channel.runtime.js +1 -1
- package/dist/channels-DSyzN9z5.js +1146 -0
- package/dist/channels-cli-CyaVWu4s.js +247 -0
- package/dist/chat-fHuZdqCl.js +213 -0
- package/dist/chrome-DMEt4NXy.js +1080 -0
- package/dist/chrome.executables-B9jFs6UO.js +541 -0
- package/dist/clawbot-cli-mwz1sM6a.js +9 -0
- package/dist/clawhub-D05ayw3D.js +400 -0
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/cli-8zsU8vEs.js +191 -0
- package/dist/cli-Bi46ARiq.js +57 -0
- package/dist/cli-By89kZva.js +154 -0
- package/dist/cli-C746a0v5.js +2 -0
- package/dist/cli-auth-seam-BTvzapW1.js +14 -0
- package/dist/cli-backend-lsjr78tt.js +66 -0
- package/dist/cli-migration-DcoLYfHA.js +127 -0
- package/dist/cli-pyy2tVYy.js +2 -0
- package/dist/cli-runner-CdYSI1Cq.js +1661 -0
- package/dist/cli-runner.runtime-DAabHOxt.js +3 -0
- package/dist/cli-runner.runtime-DVi1zg9k.js +2 -0
- package/dist/cli-runner.runtime.js +1 -1
- package/dist/cli-shared-DFDLtvnu.js +142 -0
- package/dist/cli-startup-metadata.json +2 -2
- package/dist/cli.runtime-Cz1t2jpS.js +819 -0
- package/dist/cli.runtime.js +1 -1
- package/dist/collector-DrX56GKv.js +378 -0
- package/dist/collector-Shnn0RWR.js +2 -0
- package/dist/command-config-resolution-CZpMVpIs.js +2 -0
- package/dist/command-config-resolution-CcNutmmy.js +23 -0
- package/dist/command-execution-startup-BQsvV7-V.js +269 -0
- package/dist/command-poll-backoff.runtime.js +1 -1
- package/dist/command-queue-BfrVf4dr.js +260 -0
- package/dist/command-registry-9kQrd6fb.js +108 -0
- package/dist/command-registry-Bdx4B3wy.js +3 -0
- package/dist/command-secret-gateway-DxVWgQ4Q.js +528 -0
- package/dist/commands-acp-DBpRNdkG.js +1017 -0
- package/dist/commands-compact.runtime-BxRaheVf.js +10 -0
- package/dist/commands-compact.runtime.js +1 -1
- package/dist/commands-core.runtime-DoUzOeqH.js +2 -0
- package/dist/commands-core.runtime.js +1 -1
- package/dist/commands-handlers.runtime-CscK2Pgm.js +3762 -0
- package/dist/commands-handlers.runtime.js +1 -1
- package/dist/commands-models-DqYeVT69.js +306 -0
- package/dist/commands-registry.runtime.js +1 -1
- package/dist/commands-reset-hooks-CRAAqkiL.js +129 -0
- package/dist/commands-status-D8ZaMIRi.js +223 -0
- package/dist/commands-status.runtime-BtUfa8Vo.js +2 -0
- package/dist/commands-status.runtime.js +1 -1
- package/dist/commands-subagents-control.runtime-3mseouWV.js +2 -0
- package/dist/commands-subagents-control.runtime-C7Ew7ep6.js +3 -0
- package/dist/commands-subagents-control.runtime.js +1 -1
- package/dist/commands.runtime-BJ_5rAYe.js +103 -0
- package/dist/commands.runtime.js +1 -1
- package/dist/comment-shared-yDp8Dd41.js +40 -0
- package/dist/compact-k1PfNa6G.js +11322 -0
- package/dist/compact.runtime-cKbXZ_kZ.js +7 -0
- package/dist/compact.runtime.js +1 -1
- package/dist/completion-cli-DUy1xq5t.js +2 -0
- package/dist/completion-cli-TT57JQFZ.js +464 -0
- package/dist/config-Bza6q-tk.js +107 -0
- package/dist/config-CAd-vFQh.js +2 -0
- package/dist/config-CpSlb4Mg.js +166 -0
- package/dist/config-CwRPACbU.js +136 -0
- package/dist/config-cli-_8Iokq8y.js +947 -0
- package/dist/config-defaults-Bjf5n5HI.js +163 -0
- package/dist/config-guard-CfF5-yEi.js +94 -0
- package/dist/config-runtime-BNDhHDpw.js +14 -0
- package/dist/config-validation-BhhUrU16.js +279 -0
- package/dist/configure-CQyw8lzJ.js +1159 -0
- package/dist/configure-qodb2db7.js +2 -0
- package/dist/context-writer-AquXRiMC.js +286 -0
- package/dist/control-auth-CBhIsAGb.js +122 -0
- package/dist/conversation-id-BpHFaBiM.js +140 -0
- package/dist/conversation-runtime-CV7B9eh2.js +31 -0
- package/dist/core-Dhps3xfM.js +210 -0
- package/dist/core-command-descriptors-ByQEHYvG.js +106 -0
- package/dist/cron-cli-CZI77HtC.js +637 -0
- package/dist/curator-CqSJZrlY.js +586 -0
- package/dist/daemon-cli-BdP5r4bR.js +416 -0
- package/dist/daemon-install-C8jNe_d9.js +63 -0
- package/dist/delegate-BLZcdNc7.js +61 -0
- package/dist/deliver-BZKHu27h.js +3 -0
- package/dist/deliver-C_JUBT2Q.js +782 -0
- package/dist/deliver-runtime-BlUTLk1h.js +2 -0
- package/dist/delivery-outbound.runtime-Dx5f5V4o.js +6 -0
- package/dist/delivery-outbound.runtime.js +1 -1
- package/dist/delivery-queue-BEM44EtF.js +372 -0
- package/dist/delivery-queue-DtcoyE2W.js +2 -0
- package/dist/detect-B4AtZ1VF.js +113 -0
- package/dist/devices-cli-BwUXV1ns.js +329 -0
- package/dist/diagnostic-B9b_3vaL.js +311 -0
- package/dist/direct-dm-06KHJO-9.js +139 -0
- package/dist/directive-handling.fast-lane-BAXtkU2a.js +64 -0
- package/dist/directive-handling.fast-lane-cbiyzgY6.js +2 -0
- package/dist/directive-handling.impl-DXbCFQNy.js +2 -0
- package/dist/directive-handling.impl-DscJlWrJ.js +659 -0
- package/dist/directive-handling.parse-BjPmnlrf.js +376 -0
- package/dist/directive-handling.persist-CR8atm5a.js +139 -0
- package/dist/directive-handling.persist.runtime-BD4hf46l.js +2 -0
- package/dist/directive-handling.persist.runtime.js +1 -1
- package/dist/directive-handling.shared-CBO8J9ho.js +159 -0
- package/dist/directory-cli-jmT5IFyz.js +239 -0
- package/dist/dispatch-D0nF0fyZ.js +1041 -0
- package/dist/dispatch-acp-DkXjplxI.js +969 -0
- package/dist/dispatch-acp-manager.runtime-BatYBoZJ.js +3 -0
- package/dist/dispatch-acp-manager.runtime.js +1 -1
- package/dist/dispatch-acp-media.runtime-ij81_4Nz.js +3 -0
- package/dist/dispatch-acp-media.runtime.js +1 -1
- package/dist/dispatch-acp-session.runtime-BuR_lKDu.js +2 -0
- package/dist/dispatch-acp-session.runtime.js +1 -1
- package/dist/dispatch-acp-tts.runtime-7dlcj_x_.js +3 -0
- package/dist/dispatch-acp-tts.runtime.js +1 -1
- package/dist/dispatch-acp.runtime-DD9eCP-b.js +19 -0
- package/dist/dispatch-acp.runtime.js +1 -1
- package/dist/dns-cli-RO2WqQHr.js +192 -0
- package/dist/doctor-completion-5vnr7sel.js +90 -0
- package/dist/doctor-config-preflight-6FaPZK61.js +148 -0
- package/dist/doctor-config-preflight-CTYLYtZw.js +2 -0
- package/dist/doctor-state-migrations-BvJBqBwP.js +2 -0
- package/dist/doctor-state-migrations-CH2rs-LR.js +3 -0
- package/dist/drive-D8QfYZ4p.js +750 -0
- package/dist/embedding-provider-Bj7KsQ8q.js +129 -0
- package/dist/engine-BY6K0Vfe.js +72 -0
- package/dist/entry-capabilities-BSz58Ocn.js +89 -0
- package/dist/entry.js +5 -5
- package/dist/env-overrides.runtime.js +1 -1
- package/dist/exec-approval-forwarder.runtime-D5JousLd.js +3 -0
- package/dist/exec-approval-forwarder.runtime.js +1 -1
- package/dist/exec-approvals-cli-C63N8e4p.js +484 -0
- package/dist/exec-defaults-BWTMcQ8O.js +1440 -0
- package/dist/extensionAPI.js +4 -4
- package/dist/extensions/alibaba/index.js +1 -1
- package/dist/extensions/alibaba/video-generation-provider.js +1 -1
- package/dist/extensions/anthropic/api.js +2 -2
- package/dist/extensions/anthropic/cli-auth-seam.js +1 -1
- package/dist/extensions/anthropic/cli-backend-api.js +2 -2
- package/dist/extensions/anthropic/cli-backend.js +1 -1
- package/dist/extensions/anthropic/cli-migration.js +1 -1
- package/dist/extensions/anthropic/cli-shared.js +1 -1
- package/dist/extensions/anthropic/config-defaults.js +1 -1
- package/dist/extensions/anthropic/contract-api.js +1 -1
- package/dist/extensions/anthropic/index.js +1 -1
- package/dist/extensions/anthropic/media-understanding-provider.js +1 -1
- package/dist/extensions/anthropic/provider-policy-api.js +1 -1
- package/dist/extensions/anthropic/register.runtime.js +1 -1
- package/dist/extensions/anthropic/setup-api.js +1 -1
- package/dist/extensions/anthropic/stream-wrappers.js +1 -1
- package/dist/extensions/anthropic/test-api.js +3 -3
- package/dist/extensions/anthropic-vertex/api.js +3 -3
- package/dist/extensions/anthropic-vertex/index.js +2 -2
- package/dist/extensions/anthropic-vertex/provider-catalog.js +1 -1
- package/dist/extensions/anthropic-vertex/region.js +1 -1
- package/dist/extensions/anthropic-vertex/setup-api.js +1 -1
- package/dist/extensions/arcee/index.js +2 -2
- package/dist/extensions/browser/browser-bridge.js +1 -1
- package/dist/extensions/browser/browser-cdp.js +1 -1
- package/dist/extensions/browser/browser-config.js +3 -3
- package/dist/extensions/browser/browser-control-auth.js +1 -1
- package/dist/extensions/browser/browser-doctor.js +3 -3
- package/dist/extensions/browser/browser-host-inspection.js +1 -1
- package/dist/extensions/browser/browser-maintenance.js +2 -2
- package/dist/extensions/browser/browser-profiles.js +1 -1
- package/dist/extensions/browser/browser-runtime-api.js +11 -11
- package/dist/extensions/browser/index.js +1 -1
- package/dist/extensions/browser/plugin-registration.js +1 -1
- package/dist/extensions/browser/register.runtime.js +3 -3
- package/dist/extensions/browser/runtime-api.js +12 -12
- package/dist/extensions/browser/setup-api.js +2 -2
- package/dist/extensions/browser/test-support.js +2 -2
- package/dist/extensions/byteplus/index.js +3 -3
- package/dist/extensions/byteplus/video-generation-provider.js +1 -1
- package/dist/extensions/cerebras/index.js +1 -1
- package/dist/extensions/chutes/api.js +3 -3
- package/dist/extensions/chutes/index.js +8 -8
- package/dist/extensions/chutes/models.js +1 -1
- package/dist/extensions/chutes/onboard.js +2 -2
- package/dist/extensions/chutes/provider-catalog.js +1 -1
- package/dist/extensions/cloudflare-ai-gateway/api.js +1 -1
- package/dist/extensions/cloudflare-ai-gateway/catalog-provider.js +1 -1
- package/dist/extensions/cloudflare-ai-gateway/index.js +3 -3
- package/dist/extensions/deepinfra/api.js +2 -2
- package/dist/extensions/deepinfra/index.js +2 -2
- package/dist/extensions/deepinfra/media-understanding-provider.js +1 -1
- package/dist/extensions/deepinfra/video-generation-provider.js +1 -1
- package/dist/extensions/deepseek/index.js +1 -1
- package/dist/extensions/device-pair/api.js +2 -2
- package/dist/extensions/device-pair/index.js +5 -5
- package/dist/extensions/device-pair/notify.js +1 -1
- package/dist/extensions/device-pair/pair-command-approve.js +1 -1
- package/dist/extensions/device-pair/qr-image.js +2 -2
- package/dist/extensions/diffs/.kaijibot-runtime-deps-stamp.json +1 -1
- package/dist/extensions/diffs/index.js +1 -1
- package/dist/extensions/diffs/node_modules/.package-lock.json +3 -3
- package/dist/extensions/diffs/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/dist/extensions/diffs/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/dist/extensions/diffs/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/dist/extensions/diffs/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/dist/extensions/diffs/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/dist/extensions/diffs/node_modules/typebox/build/guard/guard.d.mts +0 -4
- package/dist/extensions/diffs/node_modules/typebox/build/guard/guard.mjs +0 -8
- package/dist/extensions/diffs/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/schema/engine/schema.mjs +0 -5
- package/dist/extensions/diffs/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/dist/extensions/diffs/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/dist/extensions/diffs/node_modules/typebox/build/system/memory/clone.mjs +72 -26
- package/dist/extensions/diffs/node_modules/typebox/build/type/action/index.d.mts +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/type/action/index.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/dist/extensions/diffs/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/dist/extensions/diffs/node_modules/typebox/build/type/action/with.d.mts +0 -10
- package/dist/extensions/diffs/node_modules/typebox/build/type/action/with.mjs +0 -8
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/cyclic/check.d.mts +1 -4
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/cyclic/check.mjs +9 -15
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/index.d.mts +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/index.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +1 -1
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +4 -2
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/instantiate.d.mts +7 -12
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/instantiate.mjs +60 -66
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +1 -1
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +4 -1
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/dist/extensions/diffs/node_modules/typebox/build/type/extends/extends_left.d.mts +1 -7
- package/dist/extensions/diffs/node_modules/typebox/build/type/extends/extends_left.mjs +23 -32
- package/dist/extensions/diffs/node_modules/typebox/build/type/script/mapping.d.mts +0 -12
- package/dist/extensions/diffs/node_modules/typebox/build/type/script/mapping.mjs +21 -25
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/_refine.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/index.d.mts +0 -4
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/index.mjs +0 -4
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/static.d.mts +1 -5
- package/dist/extensions/diffs/node_modules/typebox/build/typebox.d.mts +2 -7
- package/dist/extensions/diffs/node_modules/typebox/build/typebox.mjs +2 -7
- package/dist/extensions/diffs/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/dist/extensions/diffs/node_modules/typebox/build/value/clone/clone.mjs +1 -86
- package/dist/extensions/diffs/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/dist/extensions/diffs/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/dist/extensions/diffs/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/dist/extensions/diffs/node_modules/typebox/build/value/index.d.mts +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/value/index.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/value/repair/from_type.mjs +2 -12
- package/dist/extensions/diffs/node_modules/typebox/build/value/value.d.mts +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/value/value.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/package.json +1 -1
- package/dist/extensions/diffs/node_modules/typebox/readme.md +1 -1
- package/dist/extensions/exa/index.js +1 -1
- package/dist/extensions/feishu/.kaijibot-runtime-deps-stamp.json +1 -1
- package/dist/extensions/feishu/api.js +16 -16
- package/dist/extensions/feishu/contract-api.js +2 -2
- package/dist/extensions/feishu/node_modules/.package-lock.json +3 -3
- package/dist/extensions/feishu/node_modules/typebox/build/compile/validator.d.mts +2 -7
- package/dist/extensions/feishu/node_modules/typebox/build/compile/validator.mjs +6 -36
- package/dist/extensions/feishu/node_modules/typebox/build/error/errors.d.mts +1 -7
- package/dist/extensions/feishu/node_modules/typebox/build/guard/emit.d.mts +0 -4
- package/dist/extensions/feishu/node_modules/typebox/build/guard/emit.mjs +0 -8
- package/dist/extensions/feishu/node_modules/typebox/build/guard/guard.d.mts +0 -4
- package/dist/extensions/feishu/node_modules/typebox/build/guard/guard.mjs +0 -8
- package/dist/extensions/feishu/node_modules/typebox/build/schema/engine/index.d.mts +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/schema/engine/index.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/schema/engine/schema.mjs +0 -5
- package/dist/extensions/feishu/node_modules/typebox/build/schema/engine/type.mjs +14 -18
- package/dist/extensions/feishu/node_modules/typebox/build/schema/types/index.d.mts +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/schema/types/index.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/ar_001.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/bn_BD.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/cs_CZ.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/de_DE.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/el_GR.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/en_US.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/es_419.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/es_AR.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/es_ES.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/es_MX.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/fa_IR.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/fil_PH.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/fr_CA.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/fr_FR.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/ha_NG.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/hi_IN.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/hu_HU.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/id_ID.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/it_IT.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/ja_JP.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/ko_KR.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/ms_MY.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/nl_NL.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/pl_PL.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/pt_BR.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/pt_PT.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/ro_RO.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/ru_RU.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/sv_SE.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/sw_TZ.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/th_TH.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/tr_TR.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/uk_UA.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/ur_PK.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/vi_VN.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/yo_NG.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/zh_Hans.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/locale/zh_Hant.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/system/memory/clone.d.mts +2 -3
- package/dist/extensions/feishu/node_modules/typebox/build/system/memory/clone.mjs +72 -26
- package/dist/extensions/feishu/node_modules/typebox/build/type/action/index.d.mts +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/type/action/index.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/type/action/readonly_object.d.mts +0 -5
- package/dist/extensions/feishu/node_modules/typebox/build/type/action/readonly_object.mjs +0 -5
- package/dist/extensions/feishu/node_modules/typebox/build/type/action/with.d.mts +0 -10
- package/dist/extensions/feishu/node_modules/typebox/build/type/action/with.mjs +0 -8
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/cyclic/check.d.mts +1 -4
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/cyclic/check.mjs +9 -15
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +1 -4
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +9 -15
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +1 -4
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/cyclic/extends.mjs +8 -14
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/index.d.mts +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/index.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +1 -1
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +4 -2
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/instantiate.d.mts +7 -12
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/instantiate.mjs +60 -66
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +1 -1
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +4 -1
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/this/expand_this.d.mts +1 -4
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/this/expand_this.mjs +7 -13
- package/dist/extensions/feishu/node_modules/typebox/build/type/extends/extends_left.d.mts +1 -7
- package/dist/extensions/feishu/node_modules/typebox/build/type/extends/extends_left.mjs +23 -32
- package/dist/extensions/feishu/node_modules/typebox/build/type/script/mapping.d.mts +0 -12
- package/dist/extensions/feishu/node_modules/typebox/build/type/script/mapping.mjs +21 -25
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/_refine.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/_refine.mjs +1 -2
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/index.d.mts +0 -4
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/index.mjs +0 -4
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/static.d.mts +1 -5
- package/dist/extensions/feishu/node_modules/typebox/build/typebox.d.mts +2 -7
- package/dist/extensions/feishu/node_modules/typebox/build/typebox.mjs +2 -7
- package/dist/extensions/feishu/node_modules/typebox/build/value/clean/from_type.mjs +8 -10
- package/dist/extensions/feishu/node_modules/typebox/build/value/clone/clone.mjs +1 -86
- package/dist/extensions/feishu/node_modules/typebox/build/value/convert/from_type.mjs +19 -21
- package/dist/extensions/feishu/node_modules/typebox/build/value/create/from_type.mjs +23 -31
- package/dist/extensions/feishu/node_modules/typebox/build/value/default/from_type.mjs +8 -10
- package/dist/extensions/feishu/node_modules/typebox/build/value/index.d.mts +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/value/index.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/value/repair/from_type.mjs +2 -12
- package/dist/extensions/feishu/node_modules/typebox/build/value/value.d.mts +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/value/value.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/package.json +1 -1
- package/dist/extensions/feishu/node_modules/typebox/readme.md +1 -1
- package/dist/extensions/feishu/runtime-api.js +2 -2
- package/dist/extensions/feishu/security-contract-api.js +1 -1
- package/dist/extensions/feishu/session-key-api.js +1 -1
- package/dist/extensions/feishu/setup-api.js +1 -1
- package/dist/extensions/fireworks/index.js +1 -1
- package/dist/extensions/github-copilot/api.js +1 -1
- package/dist/extensions/github-copilot/index.js +4 -4
- package/dist/extensions/github-copilot/login.js +1 -1
- package/dist/extensions/github-copilot/models-defaults.js +1 -1
- package/dist/extensions/github-copilot/models.js +1 -1
- package/dist/extensions/github-copilot/register.runtime.js +3 -3
- package/dist/extensions/github-copilot/replay-policy.js +1 -1
- package/dist/extensions/google/api.js +1 -1
- package/dist/extensions/google/gemini-cli-provider.js +1 -1
- package/dist/extensions/google/google-shared.test-helpers.js +1 -1
- package/dist/extensions/google/image-generation-provider.js +1 -1
- package/dist/extensions/google/index.js +5 -5
- package/dist/extensions/google/media-understanding-provider.js +1 -1
- package/dist/extensions/google/music-generation-provider.js +1 -1
- package/dist/extensions/google/oauth-token-shared.js +1 -1
- package/dist/extensions/google/oauth.credentials.js +1 -1
- package/dist/extensions/google/oauth.flow.js +1 -1
- package/dist/extensions/google/oauth.js +2 -2
- package/dist/extensions/google/oauth.runtime.js +1 -1
- package/dist/extensions/google/oauth.settings.js +1 -1
- package/dist/extensions/google/oauth.token.js +1 -1
- package/dist/extensions/google/provider-models.js +1 -1
- package/dist/extensions/google/provider-registration.js +1 -1
- package/dist/extensions/google/runtime-api.js +2 -2
- package/dist/extensions/google/test-api.js +2 -2
- package/dist/extensions/google/video-generation-provider.js +1 -1
- package/dist/extensions/google/web-search-provider.js +1 -1
- package/dist/extensions/groq/index.js +1 -1
- package/dist/extensions/groq/media-understanding-provider.js +1 -1
- package/dist/extensions/groq/test-api.js +1 -1
- package/dist/extensions/huggingface/api.js +3 -3
- package/dist/extensions/huggingface/index.js +3 -3
- package/dist/extensions/huggingface/models.js +1 -1
- package/dist/extensions/huggingface/onboard.js +1 -1
- package/dist/extensions/huggingface/provider-catalog.js +2 -2
- package/dist/extensions/image-generation-core/api.js +1 -1
- package/dist/extensions/kilocode/api.js +2 -2
- package/dist/extensions/kilocode/index.js +4 -4
- package/dist/extensions/kilocode/onboard.js +2 -2
- package/dist/extensions/kilocode/provider-catalog.js +1 -1
- package/dist/extensions/kilocode/provider-models.js +1 -1
- package/dist/extensions/kilocode/shared.js +1 -1
- package/dist/extensions/kimi-coding/index.js +3 -3
- package/dist/extensions/knowledge-wiki/index.js +26 -12
- package/dist/extensions/knowledge-wiki/kaijibot.plugin.json +2 -1
- package/dist/extensions/litellm/api.js +1 -1
- package/dist/extensions/litellm/index.js +3 -3
- package/dist/extensions/litellm/onboard.js +1 -1
- package/dist/extensions/litellm/provider-catalog.js +1 -1
- package/dist/extensions/llm-task/api.js +1 -1
- package/dist/extensions/llm-task/index.js +2 -2
- package/dist/extensions/lmstudio/api.js +2 -2
- package/dist/extensions/lmstudio/index.js +2 -2
- package/dist/extensions/lmstudio/runtime-api.js +1 -1
- package/dist/extensions/media-understanding-core/runtime-api.js +2 -2
- package/dist/extensions/memory-core/cli-metadata.js +2 -2
- package/dist/extensions/memory-core/index.js +13 -13
- package/dist/extensions/memory-core/manager-runtime.js +1 -1
- package/dist/extensions/memory-core/runtime-api.js +4 -4
- package/dist/extensions/memory-lancedb/api.js +1 -1
- package/dist/extensions/memory-lancedb/cli-metadata.js +1 -1
- package/dist/extensions/memory-lancedb/config.js +1 -1
- package/dist/extensions/memory-lancedb/index.js +4 -4
- package/dist/extensions/memory-lancedb/lancedb-runtime.js +1 -1
- package/dist/extensions/microsoft/index.js +1 -1
- package/dist/extensions/microsoft/speech-provider.js +1 -1
- package/dist/extensions/microsoft/test-api.js +1 -1
- package/dist/extensions/microsoft/tts.js +1 -1
- package/dist/extensions/microsoft-foundry/auth.js +1 -1
- package/dist/extensions/microsoft-foundry/cli.js +1 -1
- package/dist/extensions/microsoft-foundry/index.js +1 -1
- package/dist/extensions/microsoft-foundry/onboard.js +2 -2
- package/dist/extensions/microsoft-foundry/provider.js +1 -1
- package/dist/extensions/microsoft-foundry/runtime.js +1 -1
- package/dist/extensions/microsoft-foundry/shared-runtime.js +2 -2
- package/dist/extensions/microsoft-foundry/shared.js +1 -1
- package/dist/extensions/minimax/api.js +5 -5
- package/dist/extensions/minimax/image-generation-provider.js +1 -1
- package/dist/extensions/minimax/index.js +7 -7
- package/dist/extensions/minimax/media-understanding-provider.js +1 -1
- package/dist/extensions/minimax/model-definitions.js +1 -1
- package/dist/extensions/minimax/music-generation-provider.js +1 -1
- package/dist/extensions/minimax/oauth.js +1 -1
- package/dist/extensions/minimax/oauth.runtime.js +1 -1
- package/dist/extensions/minimax/onboard.js +1 -1
- package/dist/extensions/minimax/provider-catalog.js +1 -1
- package/dist/extensions/minimax/provider-http.test-helpers.js +1 -1
- package/dist/extensions/minimax/provider-models.js +1 -1
- package/dist/extensions/minimax/provider-registration.js +1 -1
- package/dist/extensions/minimax/speech-provider.js +1 -1
- package/dist/extensions/minimax/test-api.js +2 -2
- package/dist/extensions/minimax/tts.js +1 -1
- package/dist/extensions/minimax/video-generation-provider.js +1 -1
- package/dist/extensions/minimax/web-search-provider.js +1 -1
- package/dist/extensions/mistral/api.js +4 -4
- package/dist/extensions/mistral/embedding-provider.js +1 -1
- package/dist/extensions/mistral/index.js +6 -6
- package/dist/extensions/mistral/media-understanding-provider.js +1 -1
- package/dist/extensions/mistral/memory-embedding-adapter.js +1 -1
- package/dist/extensions/mistral/model-definitions.js +1 -1
- package/dist/extensions/mistral/onboard.js +1 -1
- package/dist/extensions/mistral/provider-catalog.js +1 -1
- package/dist/extensions/mistral/provider-compat.js +1 -1
- package/dist/extensions/mistral/realtime-transcription-provider.js +1 -1
- package/dist/extensions/mistral/test-api.js +2 -2
- package/dist/extensions/moonshot/api.js +3 -3
- package/dist/extensions/moonshot/index.js +6 -6
- package/dist/extensions/moonshot/media-understanding-provider.js +1 -1
- package/dist/extensions/moonshot/onboard.js +1 -1
- package/dist/extensions/moonshot/provider-catalog.js +1 -1
- package/dist/extensions/moonshot/test-api.js +2 -2
- package/dist/extensions/moonshot/web-search-provider.js +1 -1
- package/dist/extensions/nvidia/api.js +1 -1
- package/dist/extensions/nvidia/index.js +2 -2
- package/dist/extensions/nvidia/provider-catalog.js +1 -1
- package/dist/extensions/ollama/api.js +4 -4
- package/dist/extensions/ollama/index.js +7 -7
- package/dist/extensions/ollama/provider-discovery.js +1 -1
- package/dist/extensions/ollama/runtime-api.js +2 -2
- package/dist/extensions/ollama/web-search-provider.js +1 -1
- package/dist/extensions/open-prose/runtime-api.js +1 -1
- package/dist/extensions/openai/api.js +5 -5
- package/dist/extensions/openai/cli-backend.js +1 -1
- package/dist/extensions/openai/default-models.js +1 -1
- package/dist/extensions/openai/image-generation-provider.js +1 -1
- package/dist/extensions/openai/index.js +10 -10
- package/dist/extensions/openai/media-understanding-provider.js +1 -1
- package/dist/extensions/openai/openai-codex-auth-identity.js +1 -1
- package/dist/extensions/openai/openai-codex-catalog.js +1 -1
- package/dist/extensions/openai/openai-codex-cli-auth.js +1 -1
- package/dist/extensions/openai/openai-codex-provider.js +1 -1
- package/dist/extensions/openai/openai-codex-shared.js +1 -1
- package/dist/extensions/openai/openai-provider.js +1 -1
- package/dist/extensions/openai/prompt-overlay.js +1 -1
- package/dist/extensions/openai/realtime-provider-shared.js +1 -1
- package/dist/extensions/openai/realtime-transcription-provider.js +1 -1
- package/dist/extensions/openai/realtime-voice-provider.js +1 -1
- package/dist/extensions/openai/register.runtime.js +9 -9
- package/dist/extensions/openai/replay-policy.js +1 -1
- package/dist/extensions/openai/setup-api.js +1 -1
- package/dist/extensions/openai/shared.js +1 -1
- package/dist/extensions/openai/speech-provider.js +1 -1
- package/dist/extensions/openai/test-api.js +6 -6
- package/dist/extensions/openai/transport-policy.js +1 -1
- package/dist/extensions/openai/tts.js +1 -1
- package/dist/extensions/openai/video-generation-provider.js +1 -1
- package/dist/extensions/opencode/api.js +2 -2
- package/dist/extensions/opencode/index.js +4 -4
- package/dist/extensions/opencode/onboard.js +1 -1
- package/dist/extensions/opencode-go/api.js +2 -2
- package/dist/extensions/opencode-go/index.js +3 -3
- package/dist/extensions/opencode-go/onboard.js +1 -1
- package/dist/extensions/openrouter/api.js +5 -5
- package/dist/extensions/openrouter/image-generation-provider.js +1 -1
- package/dist/extensions/openrouter/index.js +8 -8
- package/dist/extensions/openrouter/media-understanding-provider.js +1 -1
- package/dist/extensions/openrouter/models.js +1 -1
- package/dist/extensions/openrouter/music-generation-provider.js +1 -1
- package/dist/extensions/openrouter/onboard.js +1 -1
- package/dist/extensions/openrouter/provider-catalog.js +1 -1
- package/dist/extensions/openrouter/provider-policy-api.js +1 -1
- package/dist/extensions/openrouter/speech-provider.js +1 -1
- package/dist/extensions/openrouter/stream.js +1 -1
- package/dist/extensions/openrouter/test-api.js +4 -4
- package/dist/extensions/openrouter/thinking-policy.js +1 -1
- package/dist/extensions/openrouter/video-generation-provider.js +4 -4
- package/dist/extensions/openrouter/video-http.js +1 -1
- package/dist/extensions/openrouter/video-model-catalog.js +1 -1
- package/dist/extensions/openshell/index.js +4 -4
- package/dist/extensions/perplexity/index.js +1 -1
- package/dist/extensions/perplexity/test-api.js +1 -1
- package/dist/extensions/perplexity/web-search-contract-api.js +1 -1
- package/dist/extensions/perplexity/web-search-provider.js +1 -1
- package/dist/extensions/qianfan/api.js +2 -2
- package/dist/extensions/qianfan/index.js +3 -3
- package/dist/extensions/qianfan/onboard.js +1 -1
- package/dist/extensions/qianfan/provider-catalog.js +1 -1
- package/dist/extensions/qwen/api.js +4 -4
- package/dist/extensions/qwen/index.js +8 -8
- package/dist/extensions/qwen/media-understanding-provider.js +1 -1
- package/dist/extensions/qwen/model-definitions.js +1 -1
- package/dist/extensions/qwen/models.js +1 -1
- package/dist/extensions/qwen/onboard.js +1 -1
- package/dist/extensions/qwen/provider-catalog.js +1 -1
- package/dist/extensions/qwen/stream.js +1 -1
- package/dist/extensions/qwen/test-api.js +2 -2
- package/dist/extensions/qwen/video-generation-provider.js +1 -1
- package/dist/extensions/runway/index.js +1 -1
- package/dist/extensions/runway/video-generation-provider.js +1 -1
- package/dist/extensions/sglang/api.js +3 -3
- package/dist/extensions/sglang/defaults.js +1 -1
- package/dist/extensions/sglang/index.js +3 -3
- package/dist/extensions/sglang/models.js +1 -1
- package/dist/extensions/speech-core/api.js +1 -1
- package/dist/extensions/speech-core/runtime-api.js +3 -3
- package/dist/extensions/stepfun/index.js +4 -4
- package/dist/extensions/stepfun/onboard.js +1 -1
- package/dist/extensions/stepfun/provider-catalog.js +1 -1
- package/dist/extensions/talk-voice/api.js +1 -1
- package/dist/extensions/talk-voice/index.js +2 -2
- package/dist/extensions/tavily/index.js +1 -1
- package/dist/extensions/together/api.js +3 -3
- package/dist/extensions/together/index.js +3 -3
- package/dist/extensions/together/models.js +1 -1
- package/dist/extensions/together/onboard.js +1 -1
- package/dist/extensions/together/provider-catalog.js +1 -1
- package/dist/extensions/together/video-generation-provider.js +2 -2
- package/dist/extensions/venice/api.js +3 -3
- package/dist/extensions/venice/index.js +5 -5
- package/dist/extensions/venice/models.js +1 -1
- package/dist/extensions/venice/onboard.js +2 -2
- package/dist/extensions/venice/provider-catalog.js +1 -1
- package/dist/extensions/vercel-ai-gateway/api.js +3 -3
- package/dist/extensions/vercel-ai-gateway/index.js +3 -3
- package/dist/extensions/vercel-ai-gateway/models.js +1 -1
- package/dist/extensions/vercel-ai-gateway/onboard.js +1 -1
- package/dist/extensions/vercel-ai-gateway/provider-catalog.js +1 -1
- package/dist/extensions/vllm/api.js +3 -3
- package/dist/extensions/vllm/defaults.js +1 -1
- package/dist/extensions/vllm/index.js +3 -3
- package/dist/extensions/vllm/models.js +1 -1
- package/dist/extensions/vllm/register.runtime.js +3 -3
- package/dist/extensions/volcengine/api.js +2 -2
- package/dist/extensions/volcengine/index.js +4 -4
- package/dist/extensions/volcengine/models.js +1 -1
- package/dist/extensions/volcengine/provider-catalog.js +1 -1
- package/dist/extensions/vydra/image-generation-provider.js +1 -1
- package/dist/extensions/vydra/index.js +6 -6
- package/dist/extensions/vydra/onboard.js +1 -1
- package/dist/extensions/vydra/shared.js +1 -1
- package/dist/extensions/vydra/speech-provider.js +1 -1
- package/dist/extensions/vydra/video-generation-provider.js +1 -1
- package/dist/extensions/webhooks/.kaijibot-runtime-deps-stamp.json +1 -1
- package/dist/extensions/webhooks/api.js +1 -1
- package/dist/extensions/webhooks/index.js +3 -3
- package/dist/extensions/webhooks/runtime-api.js +1 -1
- package/dist/extensions/xai/api.js +5 -5
- package/dist/extensions/xai/code-execution.js +4 -4
- package/dist/extensions/xai/index.js +11 -11
- package/dist/extensions/xai/model-definitions.js +1 -1
- package/dist/extensions/xai/model-id.js +1 -1
- package/dist/extensions/xai/onboard.js +1 -1
- package/dist/extensions/xai/provider-catalog.js +1 -1
- package/dist/extensions/xai/provider-models.js +1 -1
- package/dist/extensions/xai/setup-api.js +1 -1
- package/dist/extensions/xai/stream.js +1 -1
- package/dist/extensions/xai/video-generation-provider.js +1 -1
- package/dist/extensions/xai/web-search.js +1 -1
- package/dist/extensions/xai/x-search-tool-shared.js +1 -1
- package/dist/extensions/xai/x-search.js +4 -4
- package/dist/extensions/xiaomi/api.js +2 -2
- package/dist/extensions/xiaomi/index.js +3 -3
- package/dist/extensions/xiaomi/onboard.js +1 -1
- package/dist/extensions/xiaomi/provider-catalog.js +1 -1
- package/dist/extensions/zai/api.js +3 -3
- package/dist/extensions/zai/detect.js +1 -1
- package/dist/extensions/zai/index.js +6 -6
- package/dist/extensions/zai/media-understanding-provider.js +1 -1
- package/dist/extensions/zai/model-definitions.js +1 -1
- package/dist/extensions/zai/onboard.js +1 -1
- package/dist/extensions/zai/runtime-api.js +1 -1
- package/dist/extensions/zai/test-api.js +1 -1
- package/dist/fragment-collector-MPWszaY5.js +189 -0
- package/dist/fragment-store-SR8Bo1em.js +218 -0
- package/dist/fragment-store-TRt-PDu_.js +2 -0
- package/dist/gateway-cli-Lc4_vwt0.js +1518 -0
- package/dist/gateway-discovery-targets-_JD1loMg.js +431 -0
- package/dist/gateway-install-token-DuMEOLtu.js +284 -0
- package/dist/gateway-rpc-JpewBoh5.js +14 -0
- package/dist/gateway-rpc.runtime.js +1 -1
- package/dist/gateway-secret-options-DIWh0avy.js +38 -0
- package/dist/gemini-cli-provider-DJmyF3F1.js +106 -0
- package/dist/gemini-web-search-provider-cXSR-qZm.js +167 -0
- package/dist/get-reply-from-config.runtime-dgpM1fFS.js +2 -0
- package/dist/get-reply-from-config.runtime.js +1 -1
- package/dist/git-commit-D50Y5N45.js +2 -0
- package/dist/groups.runtime.js +1 -1
- package/dist/hard-trigger-DRIZJ_PJ.js +98 -0
- package/dist/health-BF4wCwJ7.js +2 -0
- package/dist/health-DuV85G9Q.js +579 -0
- package/dist/heartbeat-runner-CIQHWCd1.js +1209 -0
- package/dist/heartbeat-runner-DMXeqQSX.js +4 -0
- package/dist/heartbeat-runner.runtime-DSMkYfFM.js +2 -0
- package/dist/heartbeat-runner.runtime.js +1 -1
- package/dist/help-Byb6TFWt.js +81 -0
- package/dist/hooks-cli-DnhC5miz.js +354 -0
- package/dist/hooks-status-7gNHQOXj.js +86 -0
- package/dist/image-generation-core-DgBQ7yxF.js +17 -0
- package/dist/image-generation-core.auth.runtime.js +1 -1
- package/dist/image-generation-provider-BKlDd4sX.js +130 -0
- package/dist/image-generation-provider-BVJFZnGv.js +136 -0
- package/dist/image-generation-provider-C4zaGMAe.js +279 -0
- package/dist/image-generation-provider-CYdLui77.js +94 -0
- package/dist/image-generation-provider-vw6Mifhx.js +163 -0
- package/dist/image-runtime-B76ETuEi.js +7 -0
- package/dist/inbound-reply-dispatch-DcaeKmuz.js +73 -0
- package/dist/inbound.runtime-DzuOEHYA.js +4 -0
- package/dist/inbound.runtime-ImqdTVOI.js +3 -0
- package/dist/inbound.runtime.js +1 -1
- package/dist/index.js +2 -2
- package/dist/ingest-BNyXzldJ.js +842 -0
- package/dist/ingest-C35XEC_T.js +2 -0
- package/dist/install-BdauYB9u.js +662 -0
- package/dist/install-security-scan-ZoCtjNeN.js +22 -0
- package/dist/install-security-scan.runtime-B1sRhkiV.js +299 -0
- package/dist/install-security-scan.runtime.js +1 -1
- package/dist/install-skills-CQnadGky.js +70 -0
- package/dist/install.runtime-QcrQsqdQ.js +12 -0
- package/dist/install.runtime-zgelN4-_.js +27 -0
- package/dist/install.runtime.js +1 -1
- package/dist/kaijibot-tools-Dl2qUSAS.js +9233 -0
- package/dist/kaijibot-tools.runtime-BuTXGJaj.js +2 -0
- package/dist/kaijibot-tools.runtime.js +1 -1
- package/dist/kimi-web-search-provider-OUDV-0Ow.js +308 -0
- package/dist/lancedb-runtime-DyHQv3-S.js +201 -0
- package/dist/library-Dhl58R3p.js +45 -0
- package/dist/list.runtime-CeH-Xrnd.js +9 -0
- package/dist/list.runtime-FnCw60Xk.js +12 -0
- package/dist/list.runtime.js +1 -1
- package/dist/llm-draft-generator-Be49MQGG.js +567 -0
- package/dist/llm-draft-generator-DEhC2yYf.js +2 -0
- package/dist/llm-engine-BFepNvS0.js +2 -0
- package/dist/llm-engine-BNOxcQrz.js +1829 -0
- package/dist/llm-slug-generator.js +2 -2
- package/dist/login-DAPUtXft.js +108 -0
- package/dist/logs-cli-Dee6SLM_.js +264 -0
- package/dist/logs-cli.runtime.js +1 -1
- package/dist/manager-ZJ_EZtK4.js +2048 -0
- package/dist/manager-czo1q1sv.js +3301 -0
- package/dist/mcp-cli-BjG2nOiR.js +723 -0
- package/dist/media-runtime-CGXSFOdW.js +312 -0
- package/dist/media-understanding-CEFjui05.js +83 -0
- package/dist/media-understanding-provider-2LeNsCXQ.js +13 -0
- package/dist/media-understanding-provider-AxZChB3Q.js +14 -0
- package/dist/media-understanding-provider-B8KTGMNt.js +67 -0
- package/dist/media-understanding-provider-BhfBs6XJ.js +37 -0
- package/dist/media-understanding-provider-By7-KDWp.js +112 -0
- package/dist/media-understanding-provider-CJvPSRD_.js +18 -0
- package/dist/media-understanding-provider-CeDiKBMV.js +21 -0
- package/dist/media-understanding-provider-Cflmzkbe.js +18 -0
- package/dist/media-understanding-provider-D0G4SyRE.js +69 -0
- package/dist/media-understanding-provider-D5w0Ycf_.js +30 -0
- package/dist/media-understanding-provider-RWVVnBkv.js +123 -0
- package/dist/media-understanding-runtime-DrGfjXfY.js +2 -0
- package/dist/memory-C89wZkq_.js +3 -0
- package/dist/memory-core-host-runtime-cli-D5QiXWY7.js +9 -0
- package/dist/memory-host-search.runtime.js +1 -1
- package/dist/memory-index-B4acWB-F.js +514 -0
- package/dist/memory-index-Ci_IEkkP.js +2 -0
- package/dist/memory-kGhz1aad.js +242 -0
- package/dist/memory-repair-CXOPaLj_.js +2 -0
- package/dist/message-VnqF7FPQ.js +223 -0
- package/dist/message-action-runner-D1JKJNCt.js +1628 -0
- package/dist/message-action-runner-sNr7cRbq.js +2 -0
- package/dist/message.config.runtime.js +1 -1
- package/dist/message.gateway.runtime.js +1 -1
- package/dist/metadata-registry-loader-FpYi7huO.js +2 -0
- package/dist/minimax-web-search-provider-B80wlL3J.js +165 -0
- package/dist/mmr-BUVQm7ma.js +146 -0
- package/dist/model-catalog-BGubK2PO.js +157 -0
- package/dist/model-definitions-6-ZRKXxZ.js +74 -0
- package/dist/model-definitions-BGyaoan5.js +258 -0
- package/dist/model-definitions-CcSMc0tQ.js +28 -0
- package/dist/model-picker-BFYJZOu-.js +490 -0
- package/dist/model-picker-DU3_Nbi5.js +3 -0
- package/dist/model-picker.runtime-CMM8ER27.js +15 -0
- package/dist/model-picker.runtime.js +1 -1
- package/dist/model-selection-Beb96cml.js +381 -0
- package/dist/model-suppression.runtime.js +1 -1
- package/dist/models-B86OciCd.js +47 -0
- package/dist/models-BNG4ZStW.js +18 -0
- package/dist/models-Bw6Q27IA.js +555 -0
- package/dist/models-CUBw1avj.js +18 -0
- package/dist/models-CwtKbjMZ.js +157 -0
- package/dist/models-DUOR6dY_.js +760 -0
- package/dist/models-DltDSCEF.js +19 -0
- package/dist/models-EzdNn5lr.js +2 -0
- package/dist/models-cWV4E77X.js +2584 -0
- package/dist/models-cli-CSnvqJzN.js +197 -0
- package/dist/models.fetch-CmkgmRli.js +518 -0
- package/dist/monitor-Cy4MsZcL.js +4435 -0
- package/dist/music-generation-provider-IKtFX3pf.js +169 -0
- package/dist/music-generation-provider-qXzAqm-8.js +238 -0
- package/dist/music-generation-provider-x1vHpdDc.js +142 -0
- package/dist/node-cli-U7yaSPh3.js +2362 -0
- package/dist/nodes-cli-CsrUwJmw.js +1046 -0
- package/dist/notify-DnKv7zGy.js +305 -0
- package/dist/oauth-BU9Kg4J4.js +57 -0
- package/dist/oauth-D9z3vVZZ.js +152 -0
- package/dist/oauth-token-shared-C2vJuJJA.js +28 -0
- package/dist/oauth.credentials-BDOOigYJ.js +165 -0
- package/dist/oauth.flow-Bi3XRwXD.js +122 -0
- package/dist/oauth.settings-BRN2Sz6R.js +44 -0
- package/dist/oauth.token-CASx9EQP.js +43 -0
- package/dist/onboard-4eXQ1KyP.js +29 -0
- package/dist/onboard-8UfovJuH.js +48 -0
- package/dist/onboard-BEkTYzmT.js +25 -0
- package/dist/onboard-BFu8lV32.js +312 -0
- package/dist/onboard-BICzWILe.js +36 -0
- package/dist/onboard-BOUcR8be.js +621 -0
- package/dist/onboard-BcoQSNQW.js +25 -0
- package/dist/onboard-BuBPPxds.js +26 -0
- package/dist/onboard-CX7hnr8D.js +39 -0
- package/dist/onboard-CXfC1yg8.js +67 -0
- package/dist/onboard-CbymSfBU.js +58 -0
- package/dist/onboard-DGyDRLc3.js +29 -0
- package/dist/onboard-DK-jzfWx.js +22 -0
- package/dist/onboard-DVWKadpJ.js +34 -0
- package/dist/onboard-DoIWd2We.js +25 -0
- package/dist/onboard-Ez4QGniV2.js +54 -0
- package/dist/onboard-channels-BILGE-i9.js +2 -0
- package/dist/onboard-channels-MuLliRf5.js +1260 -0
- package/dist/onboard-config-Byvc0oUh.js +2 -0
- package/dist/onboard-custom-CLaOD_BI.js +2 -0
- package/dist/onboard-custom-CbRHjDNL.js +647 -0
- package/dist/onboard-helpers-BJhCcI9U.js +223 -0
- package/dist/onboard-helpers-CMvJfZTX.js +5 -0
- package/dist/onboard-hooks-BfXdgHQj.js +35 -0
- package/dist/onboard-remote-B0KquzSo.js +193 -0
- package/dist/onboard-remote-B7vnhLj3.js +2 -0
- package/dist/onboard-search-BLjfhCPG.js +324 -0
- package/dist/onboard-skills-CkO8UvfF.js +134 -0
- package/dist/onboard-skills-D9ML0g4M.js +2 -0
- package/dist/openai-codex-auth-identity-DSKWx0wS.js +45 -0
- package/dist/openai-codex-cli-auth-DzOuQekO.js +57 -0
- package/dist/openai-codex-provider-DmVwiyKq.js +299 -0
- package/dist/openai-codex-shared-DGT1w6Uz.js +6 -0
- package/dist/openai-provider-SnRU2x3L.js +283 -0
- package/dist/openclaw-migrator-BQWk325M.js +2 -0
- package/dist/pair-command-approve-DdHdrhCK.js +34 -0
- package/dist/pairing-cli-B57ZjuC5.js +117 -0
- package/dist/perplexity-web-search-provider-BbeQ3_8w.js +92 -0
- package/dist/perplexity-web-search-provider.runtime-BtpRxkdq.js +332 -0
- package/dist/perplexity-web-search-provider.runtime-Dt4WauP_.js +2 -0
- package/dist/perplexity-web-search-provider.runtime.js +1 -1
- package/dist/persistent-bindings.lifecycle-BevP5OlU.js +94 -0
- package/dist/pi-embedded-BbJAO5yK.js +6 -0
- package/dist/pi-embedded-runner-DZaBmFzW.js +8346 -0
- package/dist/pi-embedded-subscribe.handlers.compaction.runtime-CfHAZp-z.js +23 -0
- package/dist/pi-embedded-subscribe.handlers.compaction.runtime.js +1 -1
- package/dist/pi-embedded-tQf0HjTv.js +2 -0
- package/dist/pi-embedded.runtime-B9ZAb_RR.js +5 -0
- package/dist/pi-embedded.runtime.js +1 -1
- package/dist/pi-tools.before-tool-call.runtime-BqDR-_03.js +354 -0
- package/dist/pi-tools.before-tool-call.runtime.js +1 -1
- package/dist/plugin-enabled-B2DgsAtk.js +71 -0
- package/dist/plugin-install-BjOxLVHm.js +227 -0
- package/dist/plugin-install-CLGT8Lak.js +2 -0
- package/dist/plugin-install-config-policy-CZTvkRR9.js +137 -0
- package/dist/plugin-install-plan-CySOZ7mU.js +50 -0
- package/dist/plugin-registration-CfKqWKnW.js +23 -0
- package/dist/plugin-registry-C1mIFpCz.js +2 -0
- package/dist/plugin-registry-igF4eBbt.js +3 -0
- package/dist/plugin-registry-loader-BUYJrGoS.js +22 -0
- package/dist/plugin-sdk/.boundary-entry-shims.stamp +1 -1
- package/dist/plugin-sdk/acp-binding-runtime.js +1 -1
- package/dist/plugin-sdk/acp-runtime.js +3 -3
- package/dist/plugin-sdk/agent-harness-runtime.js +4 -4
- package/dist/plugin-sdk/agent-runtime.js +2 -2
- package/dist/plugin-sdk/browser-node-runtime.js +2 -2
- package/dist/plugin-sdk/browser-support.js +2 -2
- package/dist/plugin-sdk/channel-core.js +2 -2
- package/dist/plugin-sdk/channel-inbound.js +3 -3
- package/dist/plugin-sdk/command-auth.js +3 -3
- package/dist/plugin-sdk/compat.js +1 -1
- package/dist/plugin-sdk/config-runtime.js +3 -3
- package/dist/plugin-sdk/conversation-binding-runtime.js +1 -1
- package/dist/plugin-sdk/conversation-runtime.js +4 -4
- package/dist/plugin-sdk/core.js +3 -3
- package/dist/plugin-sdk/direct-dm.js +1 -1
- package/dist/plugin-sdk/gateway-method-runtime.js +1 -1
- package/dist/plugin-sdk/image-generation-core.js +1 -1
- package/dist/plugin-sdk/inbound-reply-dispatch.js +1 -1
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/infra-runtime.js +1 -1
- package/dist/plugin-sdk/media-runtime.js +5 -5
- package/dist/plugin-sdk/media-understanding-runtime.js +2 -2
- package/dist/plugin-sdk/media-understanding.js +2 -2
- package/dist/plugin-sdk/memory-core-host-runtime-cli.js +2 -2
- package/dist/plugin-sdk/memory-core.js +2 -2
- package/dist/plugin-sdk/memory-host-search.js +1 -1
- package/dist/plugin-sdk/models-provider-runtime.js +1 -1
- package/dist/plugin-sdk/plugin-test-contracts.js +1 -1
- package/dist/plugin-sdk/plugin-test-runtime.js +1 -1
- package/dist/plugin-sdk/provider-auth-api-key.js +2 -2
- package/dist/plugin-sdk/provider-auth-login.js +1 -1
- package/dist/plugin-sdk/provider-auth.js +2 -2
- package/dist/plugin-sdk/provider-entry.js +1 -1
- package/dist/plugin-sdk/provider-http-test-mocks.js +1 -1
- package/dist/plugin-sdk/provider-test-contracts.js +1 -1
- package/dist/plugin-sdk/reply-dispatch-runtime.js +1 -1
- package/dist/plugin-sdk/reply-runtime.js +4 -4
- package/dist/plugin-sdk/runtime-doctor.js +1 -1
- package/dist/plugin-sdk/runtime-secret-resolution.js +1 -1
- package/dist/plugin-sdk/runtime.js +3 -3
- package/dist/plugin-sdk/sandbox.js +2 -2
- package/dist/plugin-sdk/session-store-runtime.js +2 -2
- package/dist/plugin-sdk/skill-commands-runtime.js +1 -1
- package/dist/plugin-sdk/test-env.js +1 -1
- package/dist/plugin-sdk/testing.js +4 -4
- package/dist/plugin-sdk/text-runtime.js +2 -2
- package/dist/plugin-service-Dozf9cCQ.js +2494 -0
- package/dist/plugins/runtime/index.js +1 -1
- package/dist/plugins-cli-DQjn2ytT.js +566 -0
- package/dist/plugins-command-helpers-Bq2ECLcC.js +117 -0
- package/dist/plugins-install-persist-chKkbZiL.js +121 -0
- package/dist/plugins-update-command-CmzP42fb.js +1008 -0
- package/dist/policy-BsszCKEI.js +172 -0
- package/dist/preemptive-compaction-CVDrUhXK.js +430 -0
- package/dist/proactive-scheduler-tMSsCjDZ.js +1311 -0
- package/dist/probe-Kqo7OqQF.js +426 -0
- package/dist/probe-auth-BJ3yckIw.js +3 -0
- package/dist/program-DFP-Y-n2.js +111 -0
- package/dist/program-context-6irSsyF2.js +2 -0
- package/dist/prompt-overlay-BEhj9P_7.js +72 -0
- package/dist/prompt-select-styled-sDck0Qqt.js +5299 -0
- package/dist/provider-CeNuW2fv.js +70 -0
- package/dist/provider-api-key-auth-URznqBcK.js +113 -0
- package/dist/provider-api-key-auth.runtime.js +1 -1
- package/dist/provider-auth-6QHap3yT.js +36 -0
- package/dist/provider-auth-api-key-LiKYWj18.js +5 -0
- package/dist/provider-auth-choice-Dos9S6zz.js +134 -0
- package/dist/provider-auth-choice-preference-CT90SYMg.js +62 -0
- package/dist/provider-auth-login-CxyguwXg.js +8 -0
- package/dist/provider-auth-login.runtime-CcwpVvy3.js +206 -0
- package/dist/provider-auth-login.runtime.js +1 -1
- package/dist/provider-catalog-5ZYAb8dU.js +11 -0
- package/dist/provider-catalog-B4PQf5FY.js +12 -0
- package/dist/provider-catalog-BDZO2k2i.js +18 -0
- package/dist/provider-catalog-BfLspzSz.js +11 -0
- package/dist/provider-catalog-CVTCMT4G.js +11 -0
- package/dist/provider-catalog-CsAe-lZz.js +11 -0
- package/dist/provider-catalog-DHN9L06H.js +61 -0
- package/dist/provider-catalog-DIJbow9j.js +26 -0
- package/dist/provider-catalog-DWOeklon.js +16 -0
- package/dist/provider-catalog-FJLanWNs.js +16 -0
- package/dist/provider-catalog-High_lTQ.js +13 -0
- package/dist/provider-catalog-n-gU9Nae.js +56 -0
- package/dist/provider-catalog-wB54CKl2.js +17 -0
- package/dist/provider-compat-luZe7x7D.js +37 -0
- package/dist/provider-dispatcher-BXUvUURc.js +22 -0
- package/dist/provider-entry-DTu3iGNy.js +97 -0
- package/dist/provider-flow-0fivwh2g.js +66 -0
- package/dist/provider-models-BLjQcHNo.js +35 -0
- package/dist/provider-models-CLzRFNLI.js +116 -0
- package/dist/provider-models-K_luQ9zn.js +119 -0
- package/dist/provider-registration-CCkbZbdG.js +238 -0
- package/dist/provider-registration-COl5A7qb.js +57 -0
- package/dist/push-apns-8kAU9XsA.js +1013 -0
- package/dist/pw-ai-BNM0ufGa.js +2268 -0
- package/dist/qmd-manager-jB94G-JS.js +1799 -0
- package/dist/qr-cli-6tySRB_t.js +2 -0
- package/dist/qr-cli-CIhINSCH.js +359 -0
- package/dist/qr-image-D0nYZ-TN.js +2 -0
- package/dist/queue-BjJj4JaJ.js +636 -0
- package/dist/realtime-provider-shared-DW8GAMAi.js +21 -0
- package/dist/realtime-transcription-provider-5PlTLQxo.js +180 -0
- package/dist/realtime-voice-provider-Rl-_1Ycr.js +342 -0
- package/dist/record-shared-7rP3Bc1p.js +10 -0
- package/dist/region-BMo8YuB-.js +74 -0
- package/dist/register-command-groups-BoiHpzbo.js +121 -0
- package/dist/register.agent-CMlgjTUp.js +241 -0
- package/dist/register.configure-D2PnybVp.js +15 -0
- package/dist/register.maintenance-Cx1bo75e.js +438 -0
- package/dist/register.message-CX4jxOsU.js +601 -0
- package/dist/register.migrate-BSWEPPJq.js +195 -0
- package/dist/register.onboard-D204MxI8.js +79 -0
- package/dist/register.runtime-BHO4Mi1q.js +343 -0
- package/dist/register.runtime-CVCoeVMv.js +81 -0
- package/dist/register.runtime.js +1 -1
- package/dist/register.setup-B4Satuvx.js +104 -0
- package/dist/register.status-health-sessions-CFmAM_xF.js +1210 -0
- package/dist/register.subclis-BXqnDdhF.js +237 -0
- package/dist/register.subclis-BZeyeBpg.js +3 -0
- package/dist/replay-policy-DDo0U5gR.js +8 -0
- package/dist/reply-DOkWfPrg.js +3498 -0
- package/dist/reply-payloads-dedupe.runtime.js +1 -1
- package/dist/reply.runtime-7BWsyeU3.js +2 -0
- package/dist/reply.runtime.js +1 -1
- package/dist/resolve-BF5HlfJ2.js +280 -0
- package/dist/root-help-Do6N50zy.js +44 -0
- package/dist/route-reply-CxLiVUHW.js +141 -0
- package/dist/route-reply.runtime-WJUFT71F.js +2 -0
- package/dist/route-reply.runtime.js +1 -1
- package/dist/rpc-DaMAO4N5.js +61 -0
- package/dist/rpc.runtime.js +1 -1
- package/dist/run-main-i1Lwkfhp.js +452 -0
- package/dist/runner-BhfpNH-y.js +1497 -0
- package/dist/runs-Dtgg0O85.js +495 -0
- package/dist/runtime-BkiJ7uXt.js +725 -0
- package/dist/runtime-DMH3YN2r.js +200 -0
- package/dist/runtime-Dbujl_K6.js +72 -0
- package/dist/runtime-api-CyQJnTq5.js +3 -0
- package/dist/runtime-api-DTGmvXqo.js +2 -0
- package/dist/runtime-api-XhgZNDDz.js +12 -0
- package/dist/runtime-embedded-pi.runtime-2IY46Gqk.js +3 -0
- package/dist/runtime-embedded-pi.runtime.js +1 -1
- package/dist/runtime-hZStyXlw.js +9 -0
- package/dist/runtime-iikVqZe4.js +107 -0
- package/dist/runtime-internal-ezWrk6r4.js +2 -0
- package/dist/runtime-manifest.runtime.js +1 -1
- package/dist/runtime-model-auth.runtime.js +1 -1
- package/dist/runtime-plugins-Db6kuYci.js +69 -0
- package/dist/runtime-prepare.runtime-Cwi1gPe8.js +80 -0
- package/dist/runtime-prepare.runtime.js +1 -1
- package/dist/runtime-provider-FNR5p8dE.js +21 -0
- package/dist/runtime-registry-loader-B2uTAkcu.js +2 -0
- package/dist/runtime-registry-loader-BSSFfiA2.js +58 -0
- package/dist/runtime-taskflow-BNYQSKvj.js +250 -0
- package/dist/runtime-web-tools-C2G_nK0L.js +1467 -0
- package/dist/runtime-web-tools-fallback.runtime.js +1 -1
- package/dist/runtime-web-tools-manifest.runtime.js +1 -1
- package/dist/runtime-web-tools-public-artifacts.runtime.js +1 -1
- package/dist/runtime-xrE2MaAG.js +2 -0
- package/dist/sandbox-BvT5A1gq.js +2586 -0
- package/dist/sandbox-DcIgRqKW.js +4 -0
- package/dist/sandbox-cli-6nhldN9E.js +446 -0
- package/dist/secrets-cli-Cvl-P5yr.js +2099 -0
- package/dist/security-audit-BeGlFXMY.js +34 -0
- package/dist/security-cli-oVahjZR_.js +486 -0
- package/dist/semantic-dedup-CA-I7Ukf.js +95 -0
- package/dist/send-D85zCCtz.js +993 -0
- package/dist/server-A5MuFop-.js +13 -0
- package/dist/server-BeEiCBG9.js +77 -0
- package/dist/server-context-COXRgV8p.js +4164 -0
- package/dist/server-methods-CXboJZ1n.js +11666 -0
- package/dist/server-middleware-4ESC7-Sf.js +110 -0
- package/dist/server-node-events-CBlxJH3f.js +451 -0
- package/dist/server.impl-DZDIujUx.js +19517 -0
- package/dist/session-CA0A9yxZ.js +48 -0
- package/dist/session-archive.runtime.js +1 -1
- package/dist/session-conversation-BECTi25r.js +27 -0
- package/dist/session-file-B8YnZYnE.js +44 -0
- package/dist/session-fork.runtime.js +1 -1
- package/dist/session-key-DlOZb3y8.js +65 -0
- package/dist/session-meta-Mc12pE_f.js +109 -0
- package/dist/session-override-BOCk8YTE.js +103 -0
- package/dist/session-reset-model.runtime-Dd8V_Qvt.js +120 -0
- package/dist/session-reset-model.runtime.js +1 -1
- package/dist/session-reset-service-Di0Ge9fM.js +473 -0
- package/dist/session-subagent-reactivation.runtime-Cj6XCKz6.js +2 -0
- package/dist/session-subagent-reactivation.runtime.js +1 -1
- package/dist/session-tab-registry-DGfXa1gc.js +553 -0
- package/dist/session-updates-D3PEvDgu.js +234 -0
- package/dist/session-updates.runtime-CkHjMzfc.js +2 -0
- package/dist/session-updates.runtime.js +1 -1
- package/dist/session-utils-D1IfM96V.js +915 -0
- package/dist/sessions-CEUVpAYU.js +2 -0
- package/dist/sessions-CoYhbu6F.js +45 -0
- package/dist/sessions-Dr45TPx1.js +226 -0
- package/dist/sessions.runtime-3gC3AX8f.js +2 -0
- package/dist/sessions.runtime.js +1 -1
- package/dist/setup-CuKFik4t.js +496 -0
- package/dist/setup-DAJzkyY_.js +329 -0
- package/dist/setup-surface-Df7BhHSW.js +586 -0
- package/dist/setup.finalize-DhoSjlM4.js +432 -0
- package/dist/setup.gateway-config-B52nJix9.js +246 -0
- package/dist/shared-BYZv0yT8.js +218 -0
- package/dist/shared-D0v2yZO3.js +224 -0
- package/dist/shared-DNpedGYM.js +175 -0
- package/dist/shared-rD1K1AE-.js +36 -0
- package/dist/shared-runtime-C_5NHgLY.js +7 -0
- package/dist/short-term-promotion-BVTlPjVr.js +1631 -0
- package/dist/skill-commands-DRwVp1wc.js +82 -0
- package/dist/skill-commands.runtime-BKbablWg.js +2 -0
- package/dist/skill-commands.runtime.js +1 -1
- package/dist/skill-lifecycle-rVTllkZP.js +105 -0
- package/dist/skill-quality-gate-DHgd48qD.js +127 -0
- package/dist/skill-usage-tracker-B7aHh_Ob.js +31 -0
- package/dist/skills-cli-KHLSIaYT.js +370 -0
- package/dist/skills-install-Bi0q12q3.js +822 -0
- package/dist/speech-provider-BKPgfWII.js +103 -0
- package/dist/speech-provider-CqKVL2PU.js +184 -0
- package/dist/speech-provider-DaDkiNqQ.js +182 -0
- package/dist/speech-provider-DzPBhJrM.js +43 -0
- package/dist/speech-provider-vPL2J1om.js +167 -0
- package/dist/stage-sandbox-media.runtime-BKwxztks.js +230 -0
- package/dist/stage-sandbox-media.runtime.js +1 -1
- package/dist/state-dir-env-BwtlM2-b.js +156 -0
- package/dist/state-migrations-yqQW8QaA.js +822 -0
- package/dist/status-B1w-wvI5.js +278 -0
- package/dist/status-BhC5yy0h.js +479 -0
- package/dist/status-BnKPMpvt.js +473 -0
- package/dist/status-CRKDtvgH.js +391 -0
- package/dist/status-D9-BPbMq.js +3 -0
- package/dist/status-DuipKIlm.js +2 -0
- package/dist/status-I6cSEcXL.js +2 -0
- package/dist/status-all-dJ4Cgy30.js +487 -0
- package/dist/status-json-7SU-gA25.js +14 -0
- package/dist/status-json-command-SjLpkj4G.js +84 -0
- package/dist/status-runtime-shared-DAXwrfRv.js +254 -0
- package/dist/status.command.text-runtime-DBq5ztDE.js +15 -0
- package/dist/status.gateway-connection.runtime.js +1 -1
- package/dist/status.gateway-probe-BMXgnQZz.js +16 -0
- package/dist/status.link-channel-Co7PKXYC.js +35 -0
- package/dist/status.node-mode-BskByQcM.js +2 -0
- package/dist/status.node-mode-MNP21t-j.js +32 -0
- package/dist/status.scan-86I4Stxm.js +62 -0
- package/dist/status.scan-overview-CL7c8JQD.js +395 -0
- package/dist/status.scan.deps.runtime.js +1 -1
- package/dist/status.scan.fast-json-C3Kd8f32.js +128 -0
- package/dist/status.scan.fast-json-DLYIlSmm.js +2 -0
- package/dist/status.scan.runtime-D7E5Jl1o.js +417 -0
- package/dist/status.scan.runtime.js +1 -1
- package/dist/status.summary-0CUmMOwK.js +209 -0
- package/dist/status.summary-Bc7FVtbT.js +2 -0
- package/dist/store-DEIAq0ow.js +190 -0
- package/dist/store-Dv1w50zD.js +1112 -0
- package/dist/store.runtime-CMb32WnT.js +2 -0
- package/dist/store.runtime.js +1 -1
- package/dist/stream-CV2RD2-m.js +153 -0
- package/dist/stream-DcD1NqBt.js +649 -0
- package/dist/stream-wrappers-C7tDdQmU.js +144 -0
- package/dist/subagent-announce.registry.runtime-BN09hP9S.js +3 -0
- package/dist/subagent-announce.registry.runtime.js +1 -1
- package/dist/subagent-control-g8gumjoW.js +485 -0
- package/dist/subagent-followup.runtime-D8_8y-bE.js +68 -0
- package/dist/subagent-followup.runtime.js +1 -1
- package/dist/subagent-list-BQadcXKp.js +168 -0
- package/dist/subagent-orphan-recovery-DKtl7-gN.js +214 -0
- package/dist/subagent-registry-CgA-7Sw0.js +2888 -0
- package/dist/subagent-registry-runtime-U36TYYp-.js +2 -0
- package/dist/subagent-registry.runtime-BG_04MZ8.js +3 -0
- package/dist/subagent-registry.runtime.js +1 -1
- package/dist/subagent-spawn-C-lFCaZU.js +781 -0
- package/dist/subagents-format-L-LSiKRw.js +628 -0
- package/dist/subcli-descriptors-BhcmMAKP.js +173 -0
- package/dist/supervisor-D0ax5pz4.js +737 -0
- package/dist/supervisor-log.runtime.js +1 -1
- package/dist/system-cli-R67ndVvg.js +59 -0
- package/dist/systemd-linger-BGik3fP6.js +2 -0
- package/dist/targets-fPlUpwy5.js +594 -0
- package/dist/targets.runtime.js +1 -1
- package/dist/task-executor-C5OqCdJT.js +350 -0
- package/dist/task-owner-access-DUUqFfrD.js +48 -0
- package/dist/task-registry-BLiMD4oJ.js +2346 -0
- package/dist/task-registry-control.runtime-r5niRcNj.js +3 -0
- package/dist/task-registry-control.runtime.js +1 -1
- package/dist/task-registry-delivery-runtime-IKmxWzoW.js +3 -0
- package/dist/task-registry-delivery-runtime-OKU7m4ZJ.js +2 -0
- package/dist/task-registry.maintenance-BD6d9fLw.js +425 -0
- package/dist/task-registry.maintenance-BWULaP2e.js +2 -0
- package/dist/test.DNmyFkvJ-NRc14Xgm.js +13549 -0
- package/dist/testing-CaQDWPX6.js +441 -0
- package/dist/text-report-B1SlZa6w.js +587 -0
- package/dist/text-runtime-CNganbWZ.js +313 -0
- package/dist/thinking-policy-Cvv8S99b.js +25 -0
- package/dist/thread-bindings-1wsoDY-O.js +223 -0
- package/dist/tool-auth-shared-C6gQslQe.js +53 -0
- package/dist/tool-config-shared-RmlkWteZ.js +19 -0
- package/dist/tool-schema-runtime-CNP7lov-.js +1892 -0
- package/dist/tools-effective-inventory-D2LiEd3k.js +152 -0
- package/dist/tools.runtime-dLGMSI3J.js +4 -0
- package/dist/tools.runtime.js +1 -1
- package/dist/topic-types-DbuGFU7y.js +176 -0
- package/dist/topic-types-zRlULO3k.js +2 -0
- package/dist/transcript-DYzzYksv.js +191 -0
- package/dist/transcript.runtime-ChFgiLq_.js +2 -0
- package/dist/transcript.runtime.js +1 -1
- package/dist/transport-policy-BHGu-DSE.js +75 -0
- package/dist/tts-lKPaxyDc.js +31 -0
- package/dist/tts.runtime-DLCeTRap.js +3 -0
- package/dist/tts.runtime.js +1 -1
- package/dist/tui-1ksaisKX.js +4017 -0
- package/dist/tui-cli-B809Ui8G.js +31 -0
- package/dist/uninstall-CG2Twdr_.js +172 -0
- package/dist/update-3rFnCBJG.js +1253 -0
- package/dist/update-cli-S6D0vMUi.js +1763 -0
- package/dist/update-runner-Cp7B-UEq.js +1490 -0
- package/dist/video-generation-provider-4GrzW0iH.js +240 -0
- package/dist/video-generation-provider-BFzOwA12.js +77 -0
- package/dist/video-generation-provider-BIqj5J7G.js +227 -0
- package/dist/video-generation-provider-BrpGBUIA.js +64 -0
- package/dist/video-generation-provider-Bww0w9Vg.js +263 -0
- package/dist/video-generation-provider-CAqz-_cR.js +246 -0
- package/dist/video-generation-provider-DVgCz9i4.js +181 -0
- package/dist/video-generation-provider-_ge0iP27.js +233 -0
- package/dist/video-generation-provider-cMUD_fls.js +104 -0
- package/dist/video-generation-provider-m9cCpntw.js +171 -0
- package/dist/video-model-catalog-CyWIvCKl.js +187 -0
- package/dist/web-search-BtwmRrNq.js +221 -0
- package/dist/web-search-provider-BpVY1JYn.js +155 -0
- package/dist/webhooks-cli-BGIp-CI4.js +321 -0
- package/dist/workspace-B5a0KS0o.js +306 -0
- package/dist/x-search-shared-lXehAzFd.js +109 -0
- package/package.json +1 -1
- package/dist/abort-BAZ4Ebr2.js +0 -202
- package/dist/abort-cutoff.runtime-igWwDxEw.js +0 -20
- package/dist/abort.runtime-DcpaA7X3.js +0 -2
- package/dist/acp-cli-fDFv0ZXk.js +0 -2171
- package/dist/acp-spawn-DMdjDkJ5.js +0 -1023
- package/dist/acp-stateful-target-driver-D5xSz_pT.js +0 -87
- package/dist/action-agents-qdK1hUqZ.js +0 -67
- package/dist/action-focus-CdznyCxX.js +0 -124
- package/dist/action-help-BXDtyZ9B.js +0 -7
- package/dist/action-info-DeYigB1U.js +0 -58
- package/dist/action-kill-BYYddQgx.js +0 -33
- package/dist/action-list-DCUxXaqg.js +0 -21
- package/dist/action-log-ta83LqJ5.js +0 -30
- package/dist/action-send-BwBxb6AI.js +0 -39
- package/dist/action-spawn-CDGEb2hC.js +0 -46
- package/dist/action-unfocus-MTpGUzeN.js +0 -28
- package/dist/agent-5S4TqcpJ.js +0 -2
- package/dist/agent-command-DYyWnBzs.js +0 -1479
- package/dist/agent-runner-utils-rqbgwfQ0.js +0 -202
- package/dist/agent-runner.runtime-CTRf_5bQ.js +0 -2825
- package/dist/agents-CfpAO55S.js +0 -887
- package/dist/agents-D-ZmUSjz.js +0 -5
- package/dist/api-C5y5vg1n.js +0 -35
- package/dist/api-CepvsESp.js +0 -5
- package/dist/api-CxsUi6pI.js +0 -4
- package/dist/api-D-WxCS9o.js +0 -16
- package/dist/api-D0KNG-Ur.js +0 -3
- package/dist/api-D2Ik6_Ws.js +0 -4
- package/dist/api-D2RppWnw.js +0 -3
- package/dist/api-DSlHQbdg.js +0 -2
- package/dist/api-DZMhnnQa.js +0 -2
- package/dist/api-Do7V2W5w.js +0 -5
- package/dist/api-Dzb-44IA.js +0 -45
- package/dist/api-Nut6qdm_.js +0 -2
- package/dist/api-YOeD914m.js +0 -19
- package/dist/api-uhRvZWia.js +0 -44
- package/dist/apply-BVSjDVZt.js +0 -493
- package/dist/apply.runtime-BHaqP4o2.js +0 -2
- package/dist/apply.runtime-CGLynFYo.js +0 -166
- package/dist/audit-D0PNQf9m.js +0 -885
- package/dist/audit-extra.async-fyXymls3.js +0 -847
- package/dist/audit.deep.runtime-T3-fGhge.js +0 -2
- package/dist/audit.nondeep.runtime-D-CVblWF.js +0 -859
- package/dist/audit.runtime-CjBqFqlt.js +0 -7
- package/dist/auth-CeX7bu-Z.js +0 -181
- package/dist/auth-choice-D5Gw60Q0.js +0 -3
- package/dist/auth-choice-DEMT93N0.js +0 -71
- package/dist/auth-choice-ilal0OWZ.js +0 -353
- package/dist/auth-choice-options-BwW-zFH5.js +0 -104
- package/dist/auth-choice-prompt--rfX_gS3.js +0 -2
- package/dist/auth-choice-prompt-X5e5PeD9.js +0 -36
- package/dist/auto-disable-BIMG7Fjd.js +0 -69
- package/dist/auto-disable-C-48B0tK.js +0 -2
- package/dist/banner-B6HSrIeR.js +0 -2
- package/dist/banner-Dd3dApUc.js +0 -290
- package/dist/binding-routing-cuSlltgJ.js +0 -50
- package/dist/binding-targets-Cx48IZQc.js +0 -99
- package/dist/bridge-server-CRtklB7G.js +0 -103
- package/dist/browser-node-runtime-BwLBwW3b.js +0 -12
- package/dist/browser-runtime-DjH_OV90.js +0 -377
- package/dist/capability-cli-KFyLj819.js +0 -1350
- package/dist/catalog-provider-B4tNRXms.js +0 -40
- package/dist/cdp.helpers-01EoG2KI.js +0 -372
- package/dist/channel-core-D1nci65b.js +0 -5
- package/dist/channel-plugin-resolution-xTnpOtic.js +0 -146
- package/dist/channel.runtime-DadpArDu.js +0 -399
- package/dist/channels-6yreyEBs.js +0 -1146
- package/dist/channels-cli-bimz2bUo.js +0 -247
- package/dist/chat-BFMiUu-G.js +0 -213
- package/dist/chrome-WA-FdKve.js +0 -1080
- package/dist/chrome.executables-BlV3kIfY.js +0 -541
- package/dist/clawbot-cli-BLdu0IQ8.js +0 -9
- package/dist/clawhub-BuLRhTNF.js +0 -400
- package/dist/cli-CDdqVrBY.js +0 -2
- package/dist/cli-DOuRcnxP.js +0 -2
- package/dist/cli-DgwVAGNK.js +0 -154
- package/dist/cli-DkIGpSHw.js +0 -57
- package/dist/cli-auth-seam-ynlvw1N6.js +0 -14
- package/dist/cli-backend-6x4Q-WdC.js +0 -66
- package/dist/cli-geEuOB-I.js +0 -191
- package/dist/cli-migration-ChII14Ro.js +0 -127
- package/dist/cli-runner-B1EhBITN.js +0 -1661
- package/dist/cli-runner.runtime-Boum-j7F.js +0 -3
- package/dist/cli-runner.runtime-h-ixiuX9.js +0 -2
- package/dist/cli-shared-Bz_H1_nP.js +0 -142
- package/dist/cli.runtime-D9B-1X3E.js +0 -819
- package/dist/collector-CkXyPwuF.js +0 -378
- package/dist/collector-Fmz7hWGE.js +0 -2
- package/dist/command-config-resolution-C7qsfOyi.js +0 -23
- package/dist/command-config-resolution-DaAgReAg.js +0 -2
- package/dist/command-execution-startup-BBpnISEp.js +0 -269
- package/dist/command-queue-BCnBBdS2.js +0 -260
- package/dist/command-registry-BXxYFSZD.js +0 -3
- package/dist/command-registry-CWHMKAbU.js +0 -108
- package/dist/command-secret-gateway-B-nb52Yw.js +0 -528
- package/dist/commands-acp-B6t0636h.js +0 -1017
- package/dist/commands-compact.runtime-Bs4Jrohf.js +0 -10
- package/dist/commands-core.runtime-uSBWVpXt.js +0 -2
- package/dist/commands-handlers.runtime-i2DbzlBK.js +0 -3762
- package/dist/commands-models-iSG3asW2.js +0 -306
- package/dist/commands-reset-hooks-CRo29fjd.js +0 -129
- package/dist/commands-status-CDGtgSo_.js +0 -223
- package/dist/commands-status.runtime-VMRV_4zg.js +0 -2
- package/dist/commands-subagents-control.runtime-B8wUjfcG.js +0 -3
- package/dist/commands-subagents-control.runtime-DlZEcLMM.js +0 -2
- package/dist/commands.runtime-faXcqJ1G.js +0 -103
- package/dist/comment-shared-CZcHHaVj.js +0 -40
- package/dist/compact-CJd53VDB.js +0 -11322
- package/dist/compact.runtime-BM5uCK5R.js +0 -7
- package/dist/completion-cli-CYgAzE_f.js +0 -2
- package/dist/completion-cli-W2b6VuQY.js +0 -464
- package/dist/config-B3ly_OWp.js +0 -2
- package/dist/config-BZWQh368.js +0 -136
- package/dist/config-CAo3Ki55.js +0 -101
- package/dist/config-DHTe4Ity.js +0 -166
- package/dist/config-cli-W3JjPbd5.js +0 -947
- package/dist/config-defaults-BQ8HCUkk.js +0 -163
- package/dist/config-guard-BWis2bnW.js +0 -94
- package/dist/config-runtime-Buoon-Hh.js +0 -14
- package/dist/config-validation-DiYgptBq.js +0 -279
- package/dist/configure-Bza-h92_.js +0 -1159
- package/dist/configure-DBn0SJq4.js +0 -2
- package/dist/context-writer-vqAKHKCE.js +0 -286
- package/dist/control-auth-OK_tGODq.js +0 -122
- package/dist/conversation-id-CRxR5h1M.js +0 -140
- package/dist/conversation-runtime-BijGAsoO.js +0 -31
- package/dist/core-DgA4TZVZ.js +0 -210
- package/dist/core-command-descriptors-CLSA5Moa.js +0 -106
- package/dist/cron-cli-Dm_zUhf-.js +0 -637
- package/dist/curator-BPSUUSGi.js +0 -586
- package/dist/daemon-cli-DZEJkmJ3.js +0 -416
- package/dist/daemon-install--tdrtKs3.js +0 -63
- package/dist/delegate-UEuflcXA.js +0 -61
- package/dist/deliver-BALTiw7q.js +0 -782
- package/dist/deliver-D0l9CtEc.js +0 -3
- package/dist/deliver-runtime-Dq4JvMOl.js +0 -2
- package/dist/delivery-outbound.runtime-CWIWrBQ9.js +0 -6
- package/dist/delivery-queue--ayb_Pk_.js +0 -2
- package/dist/delivery-queue-BwVoZNGI.js +0 -372
- package/dist/detect-BgviB4L6.js +0 -113
- package/dist/devices-cli-BdpXHC-r.js +0 -329
- package/dist/diagnostic-IuQCudMt.js +0 -311
- package/dist/direct-dm-DJMPWBuI.js +0 -139
- package/dist/directive-handling.fast-lane-f0CLC4-E.js +0 -2
- package/dist/directive-handling.fast-lane-sh0YnNSx.js +0 -64
- package/dist/directive-handling.impl-B7o2ov0i.js +0 -2
- package/dist/directive-handling.impl-a0yZtzf0.js +0 -659
- package/dist/directive-handling.parse-UrrfLTt9.js +0 -376
- package/dist/directive-handling.persist-DMdCGdJo.js +0 -139
- package/dist/directive-handling.persist.runtime-Bj-oQrrf.js +0 -2
- package/dist/directive-handling.shared-B3kBVf8z.js +0 -159
- package/dist/directory-cli-Dd1zPBaO.js +0 -239
- package/dist/dispatch-acp-D_6seEb3.js +0 -969
- package/dist/dispatch-acp-manager.runtime-CblPKuWP.js +0 -3
- package/dist/dispatch-acp-media.runtime-jQ51iwVZ.js +0 -3
- package/dist/dispatch-acp-session.runtime-CztwPJU8.js +0 -2
- package/dist/dispatch-acp-tts.runtime-CYwftiQH.js +0 -3
- package/dist/dispatch-acp.runtime-CslN35Tv.js +0 -19
- package/dist/dispatch-rlOjKp0R.js +0 -1041
- package/dist/dns-cli-oGpuQf5e.js +0 -192
- package/dist/doctor-completion-DzuKPgxo.js +0 -90
- package/dist/doctor-config-preflight-BvbXh8XL.js +0 -2
- package/dist/doctor-config-preflight-gAI_GeuH.js +0 -148
- package/dist/doctor-state-migrations-BVYC3Dnw.js +0 -2
- package/dist/doctor-state-migrations-Bb5ljS8B.js +0 -3
- package/dist/drive-C-EcQpgt.js +0 -750
- package/dist/embedding-provider-p9lV_6yT.js +0 -129
- package/dist/engine-lzlFl9eS.js +0 -72
- package/dist/entry-capabilities-C4wBXlqX.js +0 -89
- package/dist/exec-approval-forwarder.runtime-pAraMyEv.js +0 -3
- package/dist/exec-approvals-cli-DFRUYivK.js +0 -484
- package/dist/exec-defaults-DiLurRDC.js +0 -1440
- package/dist/extensions/diffs/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/dist/extensions/diffs/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/dist/extensions/diffs/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/dist/extensions/diffs/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/dist/extensions/diffs/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/dist/extensions/diffs/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/awaited/index.d.mts +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/awaited/index.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/dist/extensions/diffs/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/dist/extensions/diffs/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/dist/extensions/diffs/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/dist/extensions/diffs/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/dist/extensions/diffs/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/dist/extensions/diffs/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/dist/extensions/diffs/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/dist/extensions/diffs/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/dist/extensions/diffs/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/dist/extensions/diffs/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/dist/extensions/diffs/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/dist/extensions/diffs/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/dist/extensions/diffs/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/dist/extensions/diffs/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/dist/extensions/diffs/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/dist/extensions/diffs/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/dist/extensions/diffs/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/dist/extensions/diffs/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- package/dist/extensions/feishu/node_modules/typebox/build/schema/engine/_guard.d.mts +0 -6
- package/dist/extensions/feishu/node_modules/typebox/build/schema/engine/_guard.mjs +0 -26
- package/dist/extensions/feishu/node_modules/typebox/build/schema/types/_guard.d.mts +0 -10
- package/dist/extensions/feishu/node_modules/typebox/build/schema/types/_guard.mjs +0 -16
- package/dist/extensions/feishu/node_modules/typebox/build/type/action/awaited.d.mts +0 -15
- package/dist/extensions/feishu/node_modules/typebox/build/type/action/awaited.mjs +0 -15
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/awaited/index.d.mts +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/awaited/index.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/awaited/instantiate.d.mts +0 -11
- package/dist/extensions/feishu/node_modules/typebox/build/type/engine/awaited/instantiate.mjs +0 -20
- package/dist/extensions/feishu/node_modules/typebox/build/type/extends/async_iterator.d.mts +0 -7
- package/dist/extensions/feishu/node_modules/typebox/build/type/extends/async_iterator.mjs +0 -9
- package/dist/extensions/feishu/node_modules/typebox/build/type/extends/iterator.d.mts +0 -7
- package/dist/extensions/feishu/node_modules/typebox/build/type/extends/iterator.mjs +0 -9
- package/dist/extensions/feishu/node_modules/typebox/build/type/extends/promise.d.mts +0 -7
- package/dist/extensions/feishu/node_modules/typebox/build/type/extends/promise.mjs +0 -9
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/async_iterator.d.mts +0 -20
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/async_iterator.mjs +0 -28
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/base.d.mts +0 -50
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/base.mjs +0 -84
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/iterator.d.mts +0 -20
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/iterator.mjs +0 -28
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/promise.d.mts +0 -21
- package/dist/extensions/feishu/node_modules/typebox/build/type/types/promise.mjs +0 -29
- package/dist/extensions/feishu/node_modules/typebox/build/value/clean/from_base.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/clean/from_base.mjs +0 -4
- package/dist/extensions/feishu/node_modules/typebox/build/value/convert/from_base.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/convert/from_base.mjs +0 -4
- package/dist/extensions/feishu/node_modules/typebox/build/value/create/from_async_iterator.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/create/from_async_iterator.mjs +0 -5
- package/dist/extensions/feishu/node_modules/typebox/build/value/create/from_base.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/create/from_base.mjs +0 -4
- package/dist/extensions/feishu/node_modules/typebox/build/value/create/from_iterator.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/create/from_iterator.mjs +0 -5
- package/dist/extensions/feishu/node_modules/typebox/build/value/create/from_promise.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/create/from_promise.mjs +0 -5
- package/dist/extensions/feishu/node_modules/typebox/build/value/default/from_base.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/default/from_base.mjs +0 -5
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/error.d.mts +0 -3
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/error.mjs +0 -6
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/from_array.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/from_array.mjs +0 -16
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/from_object.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/from_object.mjs +0 -40
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/from_unknown.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/from_unknown.mjs +0 -7
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/from_value.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/from_value.mjs +0 -12
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/index.d.mts +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/index.mjs +0 -1
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/mutate.d.mts +0 -11
- package/dist/extensions/feishu/node_modules/typebox/build/value/mutate/mutate.mjs +0 -41
- package/dist/extensions/feishu/node_modules/typebox/build/value/repair/from_base.d.mts +0 -2
- package/dist/extensions/feishu/node_modules/typebox/build/value/repair/from_base.mjs +0 -8
- package/dist/fragment-collector-BCPVxm0P.js +0 -189
- package/dist/fragment-store-9TxXgGV-.js +0 -218
- package/dist/fragment-store-BHYVqNjU.js +0 -2
- package/dist/gateway-cli-Apcziann.js +0 -1518
- package/dist/gateway-discovery-targets-B_svEsZh.js +0 -431
- package/dist/gateway-install-token-DYyEiJEM.js +0 -284
- package/dist/gateway-rpc-rkIqagFK.js +0 -14
- package/dist/gateway-secret-options-DqYvLFrh.js +0 -38
- package/dist/gemini-cli-provider-D_Q97B93.js +0 -106
- package/dist/gemini-web-search-provider-C5AqCOHg.js +0 -167
- package/dist/get-reply-from-config.runtime-yQ65D-BO.js +0 -2
- package/dist/git-commit-CYrjhrEv.js +0 -2
- package/dist/hard-trigger-CWQ1TzAM.js +0 -98
- package/dist/health-C-3mkxI4.js +0 -2
- package/dist/health-Jkvh_gy_.js +0 -579
- package/dist/heartbeat-runner-COZgAa6a.js +0 -4
- package/dist/heartbeat-runner-c-hruBTy.js +0 -1209
- package/dist/heartbeat-runner.runtime-CGjPrCRu.js +0 -2
- package/dist/help-ChHRacYd.js +0 -81
- package/dist/hooks-cli-Be0aA_p5.js +0 -354
- package/dist/hooks-status-y8H2HWQf.js +0 -86
- package/dist/image-generation-core-DmsyCN1n.js +0 -17
- package/dist/image-generation-provider-BV6Pfe-s.js +0 -136
- package/dist/image-generation-provider-BlMt8X7X.js +0 -94
- package/dist/image-generation-provider-BoAxEAD_.js +0 -130
- package/dist/image-generation-provider-CrsgbMNJ.js +0 -163
- package/dist/image-generation-provider-ppz9PIhB.js +0 -279
- package/dist/image-runtime-DHMm2iiA.js +0 -7
- package/dist/inbound-reply-dispatch-D4pxE_PL.js +0 -73
- package/dist/inbound.runtime-CgrGH800.js +0 -4
- package/dist/inbound.runtime-ddIkY_PP.js +0 -3
- package/dist/ingest-CUZSOIc_.js +0 -2
- package/dist/ingest-DAxhsmxh.js +0 -691
- package/dist/install-3w_mg2Qx.js +0 -662
- package/dist/install-security-scan-C-6bE5h5.js +0 -22
- package/dist/install-security-scan.runtime-B_GzpPuC.js +0 -299
- package/dist/install-skills-YwdSU6-H.js +0 -70
- package/dist/install.runtime-B-r9-spQ.js +0 -27
- package/dist/install.runtime-Cy-vGIfI.js +0 -12
- package/dist/kaijibot-tools-oT0CsNSN.js +0 -9233
- package/dist/kaijibot-tools.runtime-SmBrfYIG.js +0 -2
- package/dist/kimi-web-search-provider-CH8BxsLJ.js +0 -308
- package/dist/lancedb-runtime-SvOqB09K.js +0 -201
- package/dist/library-BAFScIar.js +0 -45
- package/dist/list.runtime-CpyEd39c.js +0 -9
- package/dist/list.runtime-DC4mjmHx.js +0 -12
- package/dist/llm-draft-generator-DCqJ5qYk.js +0 -567
- package/dist/llm-draft-generator-DRAYzsiM.js +0 -2
- package/dist/llm-engine-BFVOaalJ.js +0 -1829
- package/dist/llm-engine-Bi8xqCtn.js +0 -2
- package/dist/login-D-oLC3GG.js +0 -108
- package/dist/logs-cli-DWeiHJ3L.js +0 -264
- package/dist/manager-CO5bSnH2.js +0 -3301
- package/dist/manager-Mv-1Vint.js +0 -2048
- package/dist/mcp-cli-D-6e6tc4.js +0 -723
- package/dist/media-runtime-vNPB_wvw.js +0 -312
- package/dist/media-understanding-LgBsXLVI.js +0 -83
- package/dist/media-understanding-provider-BOjajU5r.js +0 -18
- package/dist/media-understanding-provider-BTwJ_UWh.js +0 -112
- package/dist/media-understanding-provider-BXCpgh96.js +0 -13
- package/dist/media-understanding-provider-B_nfix0N.js +0 -30
- package/dist/media-understanding-provider-C6Wlc9vT.js +0 -21
- package/dist/media-understanding-provider-CvCuZ9SC.js +0 -14
- package/dist/media-understanding-provider-D7M3-aQh.js +0 -67
- package/dist/media-understanding-provider-DcEr1WSL.js +0 -123
- package/dist/media-understanding-provider-Ph7rGWKI.js +0 -37
- package/dist/media-understanding-provider-Wri695dH.js +0 -69
- package/dist/media-understanding-provider-um6kxSmK.js +0 -18
- package/dist/media-understanding-runtime-DJKuKxY0.js +0 -2
- package/dist/memory-B1XoiBa2.js +0 -3
- package/dist/memory-CYhHObg6.js +0 -242
- package/dist/memory-core-host-runtime-cli-DKoKyS93.js +0 -9
- package/dist/memory-index-BJqUmQXm.js +0 -2
- package/dist/memory-index-BUBt9yHK.js +0 -514
- package/dist/memory-repair-BhB6W5xm.js +0 -2
- package/dist/message-DVdUnIlB.js +0 -223
- package/dist/message-action-runner-QfFvL3oa.js +0 -2
- package/dist/message-action-runner-Y7yazXbD.js +0 -1628
- package/dist/metadata-registry-loader-DWwP6rZg.js +0 -2
- package/dist/minimax-web-search-provider-QCTjMoVf.js +0 -165
- package/dist/mmr-B1GMktQo.js +0 -146
- package/dist/model-catalog-CA2IsB6Z.js +0 -157
- package/dist/model-definitions-BNLayQ7G.js +0 -74
- package/dist/model-definitions-DejSv-w8.js +0 -28
- package/dist/model-definitions-DhIGF3DB.js +0 -258
- package/dist/model-picker-BoTUAvyS.js +0 -3
- package/dist/model-picker-zTMq5U_r.js +0 -490
- package/dist/model-picker.runtime-COHk6fb4.js +0 -15
- package/dist/model-selection-FnwgRfx6.js +0 -381
- package/dist/models-3LfDzypw.js +0 -2584
- package/dist/models-8gXAOc0J.js +0 -555
- package/dist/models-BQ8ZS754.js +0 -18
- package/dist/models-BXgvHura.js +0 -760
- package/dist/models-BdrRvR0O.js +0 -157
- package/dist/models-Be6rN_97.js +0 -19
- package/dist/models-CgvFbxD_.js +0 -47
- package/dist/models-Dq3fePTE.js +0 -18
- package/dist/models-_CdIkMJJ.js +0 -2
- package/dist/models-cli-ChSB3jod.js +0 -197
- package/dist/models.fetch-BlOH1ObL.js +0 -518
- package/dist/monitor-SKMOYue_.js +0 -4435
- package/dist/music-generation-provider-CAgLx7IH.js +0 -169
- package/dist/music-generation-provider-CWV2efO0.js +0 -142
- package/dist/music-generation-provider-tvRm1diG.js +0 -238
- package/dist/node-cli-CnQUquRc.js +0 -2362
- package/dist/nodes-cli-k8tVMKp0.js +0 -1046
- package/dist/notify-Da_SjUtR.js +0 -305
- package/dist/oauth-BgpHp4DM.js +0 -152
- package/dist/oauth-CnJkK1xf.js +0 -57
- package/dist/oauth-token-shared-GMxqYtaF.js +0 -28
- package/dist/oauth.credentials-Bz3A0tpU.js +0 -165
- package/dist/oauth.flow-C1pBobyI.js +0 -122
- package/dist/oauth.settings-DO5ybG8C.js +0 -44
- package/dist/oauth.token-BiOjbfIt.js +0 -43
- package/dist/onboard-4cz1qQ_A.js +0 -25
- package/dist/onboard-BDsdPtMZ.js +0 -25
- package/dist/onboard-BMwN-mJd.js +0 -29
- package/dist/onboard-BdGGek2m.js +0 -26
- package/dist/onboard-BfesemW3.js +0 -34
- package/dist/onboard-C5lGFfDY.js +0 -39
- package/dist/onboard-CNrLUedN.js +0 -25
- package/dist/onboard-CR_sdI-6.js +0 -29
- package/dist/onboard-CpyvClpQ.js +0 -621
- package/dist/onboard-CuviKb6n2.js +0 -54
- package/dist/onboard-D2FOrkio.js +0 -67
- package/dist/onboard-DAt-DAZJ.js +0 -22
- package/dist/onboard-DIurCAm9.js +0 -36
- package/dist/onboard-DJZmbiCZ.js +0 -58
- package/dist/onboard-NUWGhXYK.js +0 -48
- package/dist/onboard-_zwmdns7.js +0 -312
- package/dist/onboard-channels-8xjH4Rxx.js +0 -2
- package/dist/onboard-channels-C5YcSaTV.js +0 -1260
- package/dist/onboard-config-BPXiaYYN.js +0 -2
- package/dist/onboard-custom-CbvrlqwN.js +0 -2
- package/dist/onboard-custom-DpGZWCkE.js +0 -647
- package/dist/onboard-helpers-BkgpYw91.js +0 -223
- package/dist/onboard-helpers-DNXP1va5.js +0 -5
- package/dist/onboard-hooks-DBikJ6h9.js +0 -35
- package/dist/onboard-remote-CGGcjWRI.js +0 -193
- package/dist/onboard-remote-CjC2kFSP.js +0 -2
- package/dist/onboard-search-_eepOkzc.js +0 -324
- package/dist/onboard-skills-BhHUGPqh.js +0 -2
- package/dist/onboard-skills-CEzVQ_WL.js +0 -134
- package/dist/openai-codex-auth-identity-D-KQbSyQ.js +0 -45
- package/dist/openai-codex-cli-auth-CuaNZ-Xi.js +0 -57
- package/dist/openai-codex-provider-CbIKBwnQ.js +0 -299
- package/dist/openai-codex-shared-C17lyOLN.js +0 -6
- package/dist/openai-provider-CgI6oZZJ.js +0 -283
- package/dist/openclaw-migrator-ulNNIw-g.js +0 -2
- package/dist/pair-command-approve-B6cPcRmP.js +0 -34
- package/dist/pairing-cli-Dopy7pMf.js +0 -117
- package/dist/perplexity-web-search-provider-CLfCz5ll.js +0 -92
- package/dist/perplexity-web-search-provider.runtime-BlBBCnh1.js +0 -332
- package/dist/perplexity-web-search-provider.runtime-F_tn1b70.js +0 -2
- package/dist/persistent-bindings.lifecycle-4Sj3YvH6.js +0 -94
- package/dist/pi-embedded-CXUV32ut.js +0 -2
- package/dist/pi-embedded-DoNNtCWr.js +0 -6
- package/dist/pi-embedded-runner-Dq4lYjca.js +0 -8346
- package/dist/pi-embedded-subscribe.handlers.compaction.runtime-Ca5o8DbU.js +0 -23
- package/dist/pi-embedded.runtime-BCRJuvse.js +0 -5
- package/dist/pi-tools.before-tool-call.runtime-B6HYOE8c.js +0 -354
- package/dist/plugin-enabled-CKRm8wtW.js +0 -71
- package/dist/plugin-install-CybWKOIa.js +0 -2
- package/dist/plugin-install-config-policy-DTrvBgla.js +0 -137
- package/dist/plugin-install-oAl4Yczg.js +0 -227
- package/dist/plugin-install-plan-DLIR_ZqM.js +0 -50
- package/dist/plugin-registration-BmV1gqZB.js +0 -23
- package/dist/plugin-registry-1Rq5Tmvl.js +0 -3
- package/dist/plugin-registry-DL8pf5Mp.js +0 -2
- package/dist/plugin-registry-loader-CAAg3dpS.js +0 -22
- package/dist/plugin-service-CK4Rim4g.js +0 -2494
- package/dist/plugins-cli-CjQt0z09.js +0 -566
- package/dist/plugins-command-helpers-AJAozWnL.js +0 -117
- package/dist/plugins-install-persist-Dj-wP3UP.js +0 -121
- package/dist/plugins-update-command-DfAN1qbt.js +0 -1008
- package/dist/policy-B_C91HSo.js +0 -172
- package/dist/preemptive-compaction-DHty3miI.js +0 -430
- package/dist/proactive-scheduler-BQynqyS0.js +0 -1287
- package/dist/probe-CASgRLVo.js +0 -426
- package/dist/probe-auth-Crs0lOpZ.js +0 -3
- package/dist/program-BlfK81FP.js +0 -111
- package/dist/program-context-BgeVW_T_.js +0 -2
- package/dist/prompt-overlay-v0MJ0MCL.js +0 -72
- package/dist/prompt-select-styled-Dzmrxj1a.js +0 -5299
- package/dist/provider-BilPcosq.js +0 -70
- package/dist/provider-api-key-auth-CgLB-D5X.js +0 -113
- package/dist/provider-auth-DBykvpJk.js +0 -36
- package/dist/provider-auth-api-key-BFqSZqff.js +0 -5
- package/dist/provider-auth-choice-mXKWNw2A.js +0 -134
- package/dist/provider-auth-choice-preference-C8geLQZU.js +0 -62
- package/dist/provider-auth-login-C8nHiSGB.js +0 -8
- package/dist/provider-auth-login.runtime-Bw7qvsMK.js +0 -206
- package/dist/provider-catalog-BLuW7xxm.js +0 -18
- package/dist/provider-catalog-Ba8jbbQC.js +0 -11
- package/dist/provider-catalog-BezjZlH4.js +0 -11
- package/dist/provider-catalog-Bzs0kPzn.js +0 -13
- package/dist/provider-catalog-CXItaIYb.js +0 -11
- package/dist/provider-catalog-CaVK2dyj.js +0 -12
- package/dist/provider-catalog-CcWsqYpE.js +0 -61
- package/dist/provider-catalog-CksVg6Lz.js +0 -16
- package/dist/provider-catalog-CvVlJ7h-.js +0 -26
- package/dist/provider-catalog-Dh9jKgh9.js +0 -56
- package/dist/provider-catalog-Dm1dfTk-.js +0 -11
- package/dist/provider-catalog-DqcQOA4Z.js +0 -17
- package/dist/provider-catalog-pqamOkUm.js +0 -16
- package/dist/provider-compat-D9qDQQMG.js +0 -37
- package/dist/provider-dispatcher-C3XfRHRF.js +0 -22
- package/dist/provider-entry-zMxxN1fH.js +0 -97
- package/dist/provider-flow-ao7lxs66.js +0 -66
- package/dist/provider-models-CuPoy-A4.js +0 -119
- package/dist/provider-models-DU2n84FS.js +0 -116
- package/dist/provider-models-jw0IBHgS.js +0 -35
- package/dist/provider-registration-6GPZtKMt.js +0 -57
- package/dist/provider-registration-CjmTFGKf.js +0 -238
- package/dist/push-apns-Bzrexlse.js +0 -1013
- package/dist/pw-ai-C7JdV54y.js +0 -2268
- package/dist/qmd-manager-T2BUCG7n.js +0 -1799
- package/dist/qr-cli-B_e_0-SF.js +0 -359
- package/dist/qr-cli-rxc0H2Mk.js +0 -2
- package/dist/qr-image-BYACGRPv.js +0 -2
- package/dist/queue-CF6El_UA.js +0 -636
- package/dist/realtime-provider-shared-Yd1KkPvt.js +0 -21
- package/dist/realtime-transcription-provider-DwmEvubU.js +0 -180
- package/dist/realtime-voice-provider-T861rzVh.js +0 -342
- package/dist/record-shared-BKxprVFr.js +0 -10
- package/dist/region--gybyKDE.js +0 -74
- package/dist/register-command-groups-1_FI6ux5.js +0 -121
- package/dist/register.agent-Bhv7o14f.js +0 -241
- package/dist/register.configure-Bix6QVEo.js +0 -15
- package/dist/register.maintenance-Bw2Dbvb6.js +0 -438
- package/dist/register.message-PxnL8FCg.js +0 -601
- package/dist/register.migrate-DLiZYeE7.js +0 -195
- package/dist/register.onboard-CfOvvN5q.js +0 -79
- package/dist/register.runtime--HXgNnrv.js +0 -343
- package/dist/register.runtime-DJaq2P7l.js +0 -81
- package/dist/register.setup-B0IYNZZy.js +0 -104
- package/dist/register.status-health-sessions-5Avwn_Rh.js +0 -1210
- package/dist/register.subclis-Bhqe4RNX.js +0 -3
- package/dist/register.subclis-CwyReoC0.js +0 -237
- package/dist/replay-policy-DRHPdlTy.js +0 -8
- package/dist/reply-DsQGSqHM.js +0 -3498
- package/dist/reply.runtime-BoEhxvtc.js +0 -2
- package/dist/resolve-vsY3RgCu.js +0 -280
- package/dist/root-help-C9EaUEol.js +0 -44
- package/dist/route-reply-yzqZEMM1.js +0 -141
- package/dist/route-reply.runtime-Dn_gMZjY.js +0 -2
- package/dist/rpc-DZksOtsP.js +0 -61
- package/dist/run-main-29gZWc8b.js +0 -452
- package/dist/runner-W6n2pkfJ.js +0 -1497
- package/dist/runs-OzLk07t4.js +0 -495
- package/dist/runtime-CGl5K_IU.js +0 -72
- package/dist/runtime-D0vBMNhQ.js +0 -2
- package/dist/runtime-DFgQhIdO.js +0 -725
- package/dist/runtime-DKfK_AD5.js +0 -107
- package/dist/runtime-DyrhCUAq.js +0 -200
- package/dist/runtime-api-BDFg7VKM.js +0 -2
- package/dist/runtime-api-BWcPxjgR.js +0 -3
- package/dist/runtime-api-C1USU1Xg.js +0 -12
- package/dist/runtime-embedded-pi.runtime-CMNGvq_M.js +0 -3
- package/dist/runtime-internal-BjxS9kh1.js +0 -2
- package/dist/runtime-plugins-BrjMM_2S.js +0 -69
- package/dist/runtime-prepare.runtime-C5uhgIL5.js +0 -80
- package/dist/runtime-provider-Bd6DTZcR.js +0 -21
- package/dist/runtime-qvUIWcEn.js +0 -9
- package/dist/runtime-registry-loader-DC_zdtAM.js +0 -58
- package/dist/runtime-registry-loader-ZJtMVrYf.js +0 -2
- package/dist/runtime-taskflow-DkJ0OEcb.js +0 -250
- package/dist/runtime-web-tools-Caph1Q8W.js +0 -1467
- package/dist/sandbox-BPefFVsD.js +0 -2586
- package/dist/sandbox-VqaevbKP.js +0 -4
- package/dist/sandbox-cli-Dmz8tNOk.js +0 -446
- package/dist/secrets-cli-DjJm5KkT.js +0 -2099
- package/dist/security-audit-sGsom2f1.js +0 -34
- package/dist/security-cli-2B9RasP6.js +0 -486
- package/dist/semantic-dedup-I5wMh6pu.js +0 -95
- package/dist/send-CHJpeuAq.js +0 -993
- package/dist/server-Cf1sUtlR.js +0 -13
- package/dist/server-ChrBeFtC.js +0 -77
- package/dist/server-context-C9DshDZM.js +0 -4164
- package/dist/server-methods-42GWgP-w.js +0 -11666
- package/dist/server-middleware-DpGttIke.js +0 -110
- package/dist/server-node-events-LXraw8n1.js +0 -451
- package/dist/server.impl-DcCSaFuL.js +0 -19522
- package/dist/session-DB-oGCus.js +0 -48
- package/dist/session-conversation-BVC-IDB-.js +0 -27
- package/dist/session-file-DcogHTZ9.js +0 -44
- package/dist/session-key-BeN4V5Ps.js +0 -65
- package/dist/session-meta-B2LNjKYp.js +0 -109
- package/dist/session-override-DT7hcbx1.js +0 -103
- package/dist/session-reset-model.runtime-DKJSQ8Rr.js +0 -120
- package/dist/session-reset-service-DFqsF-Zh.js +0 -473
- package/dist/session-subagent-reactivation.runtime-yj_xOXm2.js +0 -2
- package/dist/session-tab-registry-C5JZRgsa.js +0 -553
- package/dist/session-updates-Z-4cmoh_.js +0 -234
- package/dist/session-updates.runtime-Co08h535.js +0 -2
- package/dist/session-utils-Cxgqr7-c.js +0 -915
- package/dist/sessions-BgcN8F-X.js +0 -226
- package/dist/sessions-Ciwd_Ht8.js +0 -2
- package/dist/sessions-DE-AO5Jk.js +0 -45
- package/dist/sessions.runtime-CG1opxuM.js +0 -2
- package/dist/setup-BysllKEA.js +0 -496
- package/dist/setup-ayo63KAb.js +0 -329
- package/dist/setup-surface-DbrOe3E8.js +0 -586
- package/dist/setup.finalize-DhLR2yO4.js +0 -432
- package/dist/setup.gateway-config-Df2_Em8i.js +0 -246
- package/dist/shared-B-rMwdad.js +0 -218
- package/dist/shared-BWdSBVdK.js +0 -224
- package/dist/shared-BX9blqPL.js +0 -36
- package/dist/shared-C_-wWbDm.js +0 -175
- package/dist/shared-runtime-rz9t-KLz.js +0 -7
- package/dist/short-term-promotion-FgE_Jnib.js +0 -1631
- package/dist/skill-commands-FgYq8X4R.js +0 -82
- package/dist/skill-commands.runtime-CUJDRqa1.js +0 -2
- package/dist/skill-lifecycle-BVV6fXSs.js +0 -105
- package/dist/skill-quality-gate-4pWY82-e.js +0 -127
- package/dist/skill-usage-tracker-BxM2RLxT.js +0 -31
- package/dist/skills-cli-LwJDf23u.js +0 -370
- package/dist/skills-install-CkncHLZo.js +0 -822
- package/dist/speech-provider-CMtHMx9Y.js +0 -182
- package/dist/speech-provider-DczkEjhR.js +0 -103
- package/dist/speech-provider-Mv_D3qiG.js +0 -43
- package/dist/speech-provider-US8CydoJ.js +0 -167
- package/dist/speech-provider-WWkc6FaL.js +0 -184
- package/dist/stage-sandbox-media.runtime-D71Kd4Ch.js +0 -230
- package/dist/state-dir-env-DYjPXVYi.js +0 -156
- package/dist/state-migrations-B6uRvX1P.js +0 -822
- package/dist/status-BBFiEAa-.js +0 -391
- package/dist/status-CcJcQrD4.js +0 -479
- package/dist/status-CoxoUT8_.js +0 -473
- package/dist/status-DNCnieP0.js +0 -2
- package/dist/status-DpqurBP_.js +0 -3
- package/dist/status-OQhsSx2y.js +0 -2
- package/dist/status-all-CMnGLf_-.js +0 -487
- package/dist/status-json-LKYWmcM2.js +0 -14
- package/dist/status-json-command-ChpTTpoM.js +0 -84
- package/dist/status-runtime-shared-D-NmIA_0.js +0 -254
- package/dist/status-wtlbmlzi.js +0 -278
- package/dist/status.command.text-runtime-B-0GXh3N.js +0 -15
- package/dist/status.gateway-probe-Bqtogs2U.js +0 -16
- package/dist/status.link-channel-BPe4GfI5.js +0 -35
- package/dist/status.node-mode-Chn_dsMR.js +0 -32
- package/dist/status.node-mode-CqkA7hYz.js +0 -2
- package/dist/status.scan-Cwao8eXh.js +0 -62
- package/dist/status.scan-overview-_YjgtE8T.js +0 -395
- package/dist/status.scan.fast-json-BDSAZ_0A.js +0 -128
- package/dist/status.scan.fast-json-D0XMZbbT.js +0 -2
- package/dist/status.scan.runtime-KroF5nhu.js +0 -417
- package/dist/status.summary-CdBWpLqd.js +0 -2
- package/dist/status.summary-jy2zyMVD.js +0 -209
- package/dist/store-BAOUBmZQ.js +0 -190
- package/dist/store-Da7djjD4.js +0 -1112
- package/dist/store.runtime-abrTHLrz.js +0 -2
- package/dist/stream-DTFokQkL.js +0 -153
- package/dist/stream-DjBbXFCo.js +0 -649
- package/dist/stream-wrappers-DyQzM00M.js +0 -144
- package/dist/subagent-announce.registry.runtime-BABRFSMF.js +0 -3
- package/dist/subagent-control-D2OSqmZ7.js +0 -485
- package/dist/subagent-followup.runtime-DTNKCe5w.js +0 -68
- package/dist/subagent-list-MAV67Sxm.js +0 -168
- package/dist/subagent-orphan-recovery-Kzzz2mgk.js +0 -214
- package/dist/subagent-registry-CTAMEje4.js +0 -2888
- package/dist/subagent-registry-runtime-CP_a8qhv.js +0 -2
- package/dist/subagent-registry.runtime-DeC3RNRE.js +0 -3
- package/dist/subagent-spawn-C5uY3sfO.js +0 -781
- package/dist/subagents-format-D73DetCG.js +0 -628
- package/dist/subcli-descriptors-DlMSW5i6.js +0 -173
- package/dist/supervisor-BahyZDOz.js +0 -737
- package/dist/system-cli-Dt32QC1G.js +0 -59
- package/dist/systemd-linger-3DzEUocY.js +0 -2
- package/dist/targets-CnJhw62V.js +0 -594
- package/dist/task-executor-BBNtTTy3.js +0 -350
- package/dist/task-owner-access-CnjSqyDU.js +0 -48
- package/dist/task-registry-BEFL1tD7.js +0 -2346
- package/dist/task-registry-control.runtime-Dgk5Yb4X.js +0 -3
- package/dist/task-registry-delivery-runtime-BiITP8us.js +0 -2
- package/dist/task-registry-delivery-runtime-V0EObe7x.js +0 -3
- package/dist/task-registry.maintenance-CRGVNmNv.js +0 -2
- package/dist/task-registry.maintenance-E1MKWD6e.js +0 -425
- package/dist/test.DNmyFkvJ-DJRLm6sy.js +0 -13549
- package/dist/testing-ehflWoVg.js +0 -441
- package/dist/text-report-XuvHwHc9.js +0 -587
- package/dist/text-runtime-DsiP7VdZ.js +0 -313
- package/dist/thinking-policy-ZVmg-bUw.js +0 -25
- package/dist/thread-bindings-BCS_rM9y.js +0 -223
- package/dist/tool-auth-shared-DdmOv578.js +0 -53
- package/dist/tool-config-shared-CP5dDyyW.js +0 -19
- package/dist/tool-schema-runtime-BjWzmAN3.js +0 -1892
- package/dist/tools-effective-inventory-Dy07SBEL.js +0 -152
- package/dist/tools.runtime-DImY1euX.js +0 -4
- package/dist/topic-types-BXXY5uZL.js +0 -176
- package/dist/topic-types-CDaB_YbE.js +0 -2
- package/dist/transcript-CF5_OBmp.js +0 -191
- package/dist/transcript.runtime-D5nr49Ef.js +0 -2
- package/dist/transport-policy-w54T42K4.js +0 -75
- package/dist/tts-zh6pvJpM.js +0 -31
- package/dist/tts.runtime-CWxkpW7l.js +0 -3
- package/dist/tui-cli-Ci0sIDB1.js +0 -31
- package/dist/tui-h4YVnTtv.js +0 -4017
- package/dist/uninstall-D37a24rS.js +0 -172
- package/dist/update-Y8g3ecTl.js +0 -1253
- package/dist/update-cli-D3D_lWB1.js +0 -1763
- package/dist/update-runner-YEixuUNC.js +0 -1490
- package/dist/vault--pPeoJoM.js +0 -64
- package/dist/vault-ETiei3jF.js +0 -2
- package/dist/video-generation-provider-BfYPJ2X3.js +0 -227
- package/dist/video-generation-provider-BhdoE2LB.js +0 -77
- package/dist/video-generation-provider-BltQBaCu.js +0 -171
- package/dist/video-generation-provider-C6Y4MTBa.js +0 -233
- package/dist/video-generation-provider-CPMWGfJj.js +0 -64
- package/dist/video-generation-provider-CTEKMPLy.js +0 -240
- package/dist/video-generation-provider-CcCvv3LR.js +0 -104
- package/dist/video-generation-provider-CpGtTNnb.js +0 -246
- package/dist/video-generation-provider-CvpbK0Tj.js +0 -263
- package/dist/video-generation-provider-PvbMacjT.js +0 -181
- package/dist/video-model-catalog-Cp71BhF6.js +0 -187
- package/dist/web-search-DP15ZlNE.js +0 -221
- package/dist/web-search-provider-CpRV6QJI.js +0 -155
- package/dist/webhooks-cli-DdLGU5xA.js +0 -321
- package/dist/workspace-BpzmLImG.js +0 -306
- package/dist/x-search-shared-D-L79ilT.js +0 -109
- /package/dist/{api-BFKI2NNn.js → api-B6g0B-IG.js} +0 -0
- /package/dist/{api-BhPfvHfo.js → api-B_5tuRF_.js} +0 -0
- /package/dist/{api-BUpga5J-.js → api-ChDERchn.js} +0 -0
- /package/dist/{api-B1PE6fwA.js → api-DiGfNOT2.js} +0 -0
- /package/dist/{api-DkqAFzSg.js → api-O7zsDPPJ.js} +0 -0
- /package/dist/{audit-channel.collect.runtime-CaPqFh87.js → audit-channel.collect.runtime-CUn9BMvq.js} +0 -0
- /package/dist/{audit-log-C8WDD3D1.js → audit-log-pMArHIEh.js} +0 -0
- /package/dist/{auth-choice-legacy-waB0iFpm.js → auth-choice-legacy-BM0vn9R-.js} +0 -0
- /package/dist/{auth-choice.apply-helpers-BvYl7HR5.js → auth-choice.apply-helpers-Bw9wToYL.js} +0 -0
- /package/dist/{auth-choice.plugin-providers.runtime-PpyhN_80.js → auth-choice.plugin-providers.runtime-BZseWyNy.js} +0 -0
- /package/dist/{auth-surface-resolution-BZLSPNTs.js → auth-surface-resolution-CrQGM9Cp.js} +0 -0
- /package/dist/{auto-recall-B1PCG6uf.js → auto-recall-B_bK8mCh.js} +0 -0
- /package/dist/{block-reply-pipeline-B79ibtIR.js → block-reply-pipeline-Dq4aLNqX.js} +0 -0
- /package/dist/{call.runtime-BwcZkbkG.js → call.runtime-DVcVSdEu.js} +0 -0
- /package/dist/{channel-account-context-BNzGuw03.js → channel-account-context-D0WBO2Yx.js} +0 -0
- /package/dist/{channel-options-dCZOcBUc.js → channel-options-plNrATBP.js} +0 -0
- /package/dist/{channel-plugin-ids-jLxAn1L5.js → channel-plugin-ids-CscSLyjB.js} +0 -0
- /package/dist/{channel-selection.runtime-rS6hNp6w.js → channel-selection.runtime-Dd9_LxxA.js} +0 -0
- /package/dist/{channels-status-issues-QT-v4vzD.js → channels-status-issues-byWfP2WG.js} +0 -0
- /package/dist/{clack-prompter-BarukVw2.js → clack-prompter-OiJwdy5r.js} +0 -0
- /package/dist/{cli-backend-CNk0L0wa.js → cli-backend-CdM4Rh6F.js} +0 -0
- /package/dist/{close-reason-nz_ERN9v.js → close-reason-CI_g9IO0.js} +0 -0
- /package/dist/{cognitive-delivery-B8bSjIL2.js → cognitive-delivery-B5TbScd2.js} +0 -0
- /package/dist/{command-poll-backoff.runtime-DDWZcsnF.js → command-poll-backoff.runtime-CFRUBpul.js} +0 -0
- /package/dist/{command-registration-policy-CVzf9lZy.js → command-registration-policy-Bp03ya2T.js} +0 -0
- /package/dist/{commands-registry.runtime-CThK_6yQ.js → commands-registry.runtime-C9vjMKif.js} +0 -0
- /package/dist/{config-DCqmbAmi.js → config-DWP1lSic.js} +0 -0
- /package/dist/{config-BXvOgFjS.js → config-GpqmqI37.js} +0 -0
- /package/dist/{config-value-C7bZPr1X.js → config-value-1FzBpid8.js} +0 -0
- /package/dist/{consolidation-userid-BtKeSaAs.js → consolidation-userid-Di0Sgxnz.js} +0 -0
- /package/dist/{dangerous-tools-Cwuv7WFD.js → dangerous-tools-C6SsOcC4.js} +0 -0
- /package/dist/{default-models-CTHi5V4f.js → default-models-DxJmcrq7.js} +0 -0
- /package/dist/{defaults-CwPgGXAk.js → defaults-DWxSBxL9.js} +0 -0
- /package/dist/{defaults-BQA1GDhJ.js → defaults-UyycRG_v.js} +0 -0
- /package/dist/{dispatch-acp-command-bypass-imK9PCdQ.js → dispatch-acp-command-bypass-B9NMLuX9.js} +0 -0
- /package/dist/{docs-cli-Dv1RQsBb.js → docs-cli-DDIF10fG.js} +0 -0
- /package/dist/{dotenv-CmO55tnC.js → dotenv-DPb0MMoy.js} +0 -0
- /package/dist/{embedding-provider-BYQlcbTv.js → embedding-provider-BiItBepR.js} +0 -0
- /package/dist/{env-overrides.runtime-BbiEI7F8.js → env-overrides.runtime-BtBGU8bb.js} +0 -0
- /package/dist/{exec-approvals-effective-MiJpVS3B.js → exec-approvals-effective-C4m2WXg-.js} +0 -0
- /package/dist/{extractor-Dc5z0hMf.js → extractor-B-CDYBJx.js} +0 -0
- /package/dist/{fallback-state-D3l8zuca.js → fallback-state-C-BXNQDE.js} +0 -0
- /package/dist/{fragment-types-B8q-zg6v.js → fragment-types-3NSFX3fG.js} +0 -0
- /package/dist/{frontmatter-XYZsyLoY.js → frontmatter-CMd6M3iu.js} +0 -0
- /package/dist/{gateway-lock-BkhPbe1x.js → gateway-lock-B4lxvDfZ.js} +0 -0
- /package/dist/{gateway-presence-C7ZKme5I.js → gateway-presence-D2Ad8otD.js} +0 -0
- /package/dist/{gateway-rpc.runtime-mL0HdmjE.js → gateway-rpc.runtime-eZMYTrLe.js} +0 -0
- /package/dist/{gaxios-fetch-compat-jL2xxHMj.js → gaxios-fetch-compat-DvraiCww.js} +0 -0
- /package/dist/{git-commit-XJxkSBCC.js → git-commit-BIx8__jW.js} +0 -0
- /package/dist/{gmail-setup-utils-DjHySRPr.js → gmail-setup-utils-Jqi6TbIM.js} +0 -0
- /package/dist/{groups.runtime-BFrnryp_.js → groups.runtime-BmbQxpi-.js} +0 -0
- /package/dist/{health-format-lG7x3cNF.js → health-format-CPlFnpEc.js} +0 -0
- /package/dist/{helpers-5EtzqHah.js → helpers-q3dUkuqz.js} +0 -0
- /package/dist/{hooks-policy-DudtxOUW.js → hooks-policy-Bmv6J1kh.js} +0 -0
- /package/dist/{image-v-_YZCwf.js → image-De5xRFlj.js} +0 -0
- /package/dist/{image-generation-core.auth.runtime-BN813D6r.js → image-generation-core.auth.runtime-BGoZ9htm.js} +0 -0
- /package/dist/{includes-scan-DpxlIONl.js → includes-scan-9AWKrWlU.js} +0 -0
- /package/dist/{info-scan-source-DnaROGLQ.js → info-scan-source-JX82stxX.js} +0 -0
- /package/dist/{input-files-DgrhtMjl.js → input-files-CnyTkGg0.js} +0 -0
- /package/dist/{install-target-BX2Crr_Y.js → install-target-9iPjuY88.js} +0 -0
- /package/dist/{installs-DbMRUEa5.js → installs-30EmXCK0.js} +0 -0
- /package/dist/{ipv4-Lxd0AUyd.js → ipv4-Ddm_keVD.js} +0 -0
- /package/dist/{json-mode-DXOGRndc.js → json-mode-Be3c80wJ.js} +0 -0
- /package/dist/{kaijibot.plugin-BhXQfURP.js → kaijibot.plugin-DzS9VUni.js} +0 -0
- /package/dist/{kaijibot.plugin-CtsiVmAP.js → kaijibot.plugin-xVZah2G8.js} +0 -0
- /package/dist/{lifecycle-B9_XEJMF.js → lifecycle-DwLKRe0M.js} +0 -0
- /package/dist/{llm-extractor-bvGxU-9w.js → llm-extractor-CssLZel9.js} +0 -0
- /package/dist/{llm-key-probe-DBxS-6MP.js → llm-key-probe-BH61J04k.js} +0 -0
- /package/dist/{local-date-DXS-3gnV.js → local-date-Dx9LHstd.js} +0 -0
- /package/dist/{logs-cli.runtime-DjFXprX7.js → logs-cli.runtime-DCwDBoHH.js} +0 -0
- /package/dist/{magic-string.es-DBWRzyEr.js → magic-string.es-JqU65QWY.js} +0 -0
- /package/dist/{memory-host-search.runtime-D1s9jwc9.js → memory-host-search.runtime-BKu5Oyo8.js} +0 -0
- /package/dist/{memory-repair-RLio0mfn.js → memory-repair-DONaxvFd.js} +0 -0
- /package/dist/{message.config.runtime-m-HYPbwu.js → message.config.runtime-CbnMOfHF.js} +0 -0
- /package/dist/{message.gateway.runtime-ypqgoSHq.js → message.gateway.runtime-B93AumDT.js} +0 -0
- /package/dist/{metadata-registry-loader-BiXHJddm.js → metadata-registry-loader-Dgk5UBMT.js} +0 -0
- /package/dist/{model-definitions-CqVPpHiG.js → model-definitions-JcfBkTza.js} +0 -0
- /package/dist/{model-id-cnFVogsJ.js → model-id-D1Wk8S2O.js} +0 -0
- /package/dist/{model-param-b-WFgsRlGS.js → model-param-b-B7-mzaOP.js} +0 -0
- /package/dist/{model-suppression.runtime-Cc9MfXhr.js → model-suppression.runtime-Bb9ypkGZ.js} +0 -0
- /package/dist/{models-CGB1Gmfi.js → models--eT1kpdv.js} +0 -0
- /package/dist/{models-DnnqdU39.js → models-CI5KSADc.js} +0 -0
- /package/dist/{models-Cuivu-zg.js → models-D56ZxCfo.js} +0 -0
- /package/dist/{models-JQFu1Rq9.js → models-N8WgRXKT.js} +0 -0
- /package/dist/{oauth-refresh-failure-Bf74s_bF.js → oauth-refresh-failure-DWFIDvjh.js} +0 -0
- /package/dist/{onboard-DQP5yP_h.js → onboard-C36W-uR9.js} +0 -0
- /package/dist/{onboard-BaA-_42k.js → onboard-C5_C5Dgl.js} +0 -0
- /package/dist/{onboard-2v_escld.js → onboard-DDG1-mJG.js} +0 -0
- /package/dist/{onboard-UHJyYUjC.js → onboard-DJoyh-Z8.js} +0 -0
- /package/dist/{onboard-AGZDUqWC.js → onboard-DSxroSTN.js} +0 -0
- /package/dist/{onboard-KTOtavc-.js → onboard-b6hp3tPS.js} +0 -0
- /package/dist/{onboard-config-BXe45WpU.js → onboard-config-Lh_yB7dL.js} +0 -0
- /package/dist/{openai-codex-catalog-DQgPnnGt.js → openai-codex-catalog-DD_VIQlG.js} +0 -0
- /package/dist/{openclaw-migrator-DUfsOWq9.js → openclaw-migrator-CaGcuTUZ.js} +0 -0
- /package/dist/{package-update-utils-D9AkQosZ.js → package-update-utils-Yv076eAO.js} +0 -0
- /package/dist/{parse-log-line-B4l-DSpE.js → parse-log-line-BIaXQg_P.js} +0 -0
- /package/dist/{path-env-CoRBKA1C.js → path-env-Dk2a_giL.js} +0 -0
- /package/dist/{perplexity-web-search-provider.shared-o8SEWE6d.js → perplexity-web-search-provider.shared-65M7qer4.js} +0 -0
- /package/dist/{persona-change-source-sZfR2-3I.js → persona-change-source-QUczl_FE.js} +0 -0
- /package/dist/{ports-BrD2WgKB.js → ports-Qs7MEJp6.js} +0 -0
- /package/dist/{preference-learner-Dd-MkiXx.js → preference-learner-BoMWQ_UT.js} +0 -0
- /package/dist/{probe-70HRGl4a.js → probe-BvHudo6i.js} +0 -0
- /package/dist/{probe-auth-BQSPI8E3.js → probe-auth-DhX7blo2.js} +0 -0
- /package/dist/{probe-target-DD7FyREr.js → probe-target-BeTB7wVs.js} +0 -0
- /package/dist/{program-context-BcxnUK0Z.js → program-context-B9uUWtK2.js} +0 -0
- /package/dist/{provider-api-key-auth.runtime-HSJGnSmr.js → provider-api-key-auth.runtime-N653FDIT.js} +0 -0
- /package/dist/{provider-auth-choice-helpers-CcPOjvnI.js → provider-auth-choice-helpers-ChvFgjfz.js} +0 -0
- /package/dist/{provider-auth-guidance-ChSkQI-k.js → provider-auth-guidance-Ctl6x9Du.js} +0 -0
- /package/dist/{provider-catalog-145O7qu0.js → provider-catalog-BDAFvO45.js} +0 -0
- /package/dist/{provider-catalog-BV3gdu3r.js → provider-catalog-CO-sQSae.js} +0 -0
- /package/dist/{provider-catalog-BWbMEO1u.js → provider-catalog-D34gpSgG.js} +0 -0
- /package/dist/{provider-catalog-CmraKltl.js → provider-catalog-Dwp85UjM.js} +0 -0
- /package/dist/{provider-catalog-CGGu1xY7.js → provider-catalog-NxTI5xr-.js} +0 -0
- /package/dist/{provider-catalog-BwaMk_71.js → provider-catalog-dX-9JR2_.js} +0 -0
- /package/dist/{provider-models-Cj2Dj2Eb.js → provider-models-BS_NZn6m.js} +0 -0
- /package/dist/{provider-models-yFLzb_gM.js → provider-models-BrE46jCo2.js} +0 -0
- /package/dist/{provider-oauth-flow-Dwldw3m9.js → provider-oauth-flow-CdiPoFwM.js} +0 -0
- /package/dist/{provider-openai-codex-oauth-tls-B5spv5ZL.js → provider-openai-codex-oauth-tls-Dd7Khxm1.js} +0 -0
- /package/dist/{qa-cli-CHZ17YNo.js → qa-cli-BTEZmDBl.js} +0 -0
- /package/dist/{realtime-transcription-provider-CaGqiqi5.js → realtime-transcription-provider-DKVD0xK4.js} +0 -0
- /package/dist/{register.backup-DEGba8yV.js → register.backup-BsTZm_ln.js} +0 -0
- /package/dist/{remote-env-XoAdM3lK.js → remote-env-DlSMoBM9.js} +0 -0
- /package/dist/{replay-policy-Cz4vCd2t.js → replay-policy-DBCcSA9H.js} +0 -0
- /package/dist/{reply-payloads-dedupe.runtime-DHqFOSfO.js → reply-payloads-dedupe.runtime-DoaNG4lo.js} +0 -0
- /package/dist/{resolve-pBPj3wEy.js → resolve-D1pCHyvv.js} +0 -0
- /package/dist/{responses-tool-shared-CjK_9Hne.js → responses-tool-shared-DHcb1dPQ.js} +0 -0
- /package/dist/{root-help-metadata-CHfvsXBe.js → root-help-metadata-Drx7dB2u.js} +0 -0
- /package/dist/{rpc.runtime-DvvupI-T.js → rpc.runtime-DUWYp4eO.js} +0 -0
- /package/dist/{runtime-api-BzmBrFf3.js → runtime-api-CUPLCkbC.js} +0 -0
- /package/dist/{runtime-manifest.runtime-T4MgRCzw.js → runtime-manifest.runtime-CT5Jdegq.js} +0 -0
- /package/dist/{runtime-model-auth.runtime-DkBcOdwA.js → runtime-model-auth.runtime-C1QVotRO.js} +0 -0
- /package/dist/{runtime-web-channel-plugin-CSkwa3oV.js → runtime-web-channel-plugin-B_jKtF5_.js} +0 -0
- /package/dist/{runtime-web-tools-fallback.runtime-Cl479qhm.js → runtime-web-tools-fallback.runtime-vvVY2hzf.js} +0 -0
- /package/dist/{runtime-web-tools-manifest.runtime-BsrsHIeH.js → runtime-web-tools-manifest.runtime-q4FwzQyo.js} +0 -0
- /package/dist/{runtime-web-tools-public-artifacts.runtime--NfpoCOF.js → runtime-web-tools-public-artifacts.runtime-DH1OendY.js} +0 -0
- /package/dist/{schedule-10eqkliM.js → schedule-B0pphiI5.js} +0 -0
- /package/dist/{secret-file-yoaT8Z2N.js → secret-file-CZYHVmYt.js} +0 -0
- /package/dist/{session-archive.runtime-CoAMhBxN.js → session-archive.runtime-DMp_Mux1.js} +0 -0
- /package/dist/{session-fork.runtime-CZDDfV7c.js → session-fork.runtime--xGBhpew.js} +0 -0
- /package/dist/{setup.plugin-config-B6erjihE.js → setup.plugin-config-DcRd-H0v.js} +0 -0
- /package/dist/{setup.secret-input-BR7Y2Hg1.js → setup.secret-input-NrcTToqs.js} +0 -0
- /package/dist/{skill-draft-generator-C8zPLkD-.js → skill-draft-generator-m9nku0CK.js} +0 -0
- /package/dist/{skill-reviewer-ZeuLRxUy.js → skill-reviewer-BzUB5yY8.js} +0 -0
- /package/dist/{skill-scanner-C3hWfmOb.js → skill-scanner-BlxMlpUH.js} +0 -0
- /package/dist/{skill-writer-DNOmOldW.js → skill-writer-C43S6Lsi.js} +0 -0
- /package/dist/{soul-cli-Co0KcdP3.js → soul-cli-Bb2iCP9P.js} +0 -0
- /package/dist/{ssh-config-m0F_3hKh.js → ssh-config-BA1Y7a8V.js} +0 -0
- /package/dist/{status-config-DbtvFlek.js → status-config-IryaKgaK.js} +0 -0
- /package/dist/{status.agent-local-BNfQnBBE.js → status.agent-local-VigNjFn5.js} +0 -0
- /package/dist/{status.gateway-connection.runtime-eEPv-X0Z.js → status.gateway-connection.runtime-YZTKQZGP.js} +0 -0
- /package/dist/{status.scan.deps.runtime-BAPi7Dm4.js → status.scan.deps.runtime-d3HueyxP.js} +0 -0
- /package/dist/{store-CeTaOlf7.js → store-C-kqItww.js} +0 -0
- /package/dist/{store-DE9I_z-U.js → store-CioZN-iH.js} +0 -0
- /package/dist/{store-BFeUim-y.js → store-Dji_Mahl.js} +0 -0
- /package/dist/{stream-BoFx9-PE.js → stream-BENwbELC.js} +0 -0
- /package/dist/{stream-Bb3o_iaj.js → stream-C2mX5-8a.js} +0 -0
- /package/dist/{subagent-followup-hints-DSxKx2h5.js → subagent-followup-hints-BSNsTYsF.js} +0 -0
- /package/dist/{supervisor-log.runtime-CtoSv_g7.js → supervisor-log.runtime-BSystMWy.js} +0 -0
- /package/dist/{systemd-linger-BeOkR_jw.js → systemd-linger-p1W5Ka5U.js} +0 -0
- /package/dist/{table-B8RObGt5.js → table-UVJgHZWO.js} +0 -0
- /package/dist/{targets.runtime-BTOlvIZi.js → targets.runtime-Dy1_53At.js} +0 -0
- /package/dist/{task-registry.audit.shared-D1VOvgzO.js → task-registry.audit.shared-Bzuti1TG.js} +0 -0
- /package/dist/{text-similarity-DIRFELa3.js → text-similarity-BLCcuUbL.js} +0 -0
- /package/dist/{trust-calculator-lCRAZCPt.js → trust-calculator-CEYEccNS.js} +0 -0
- /package/dist/{tts-CUq9yK2z.js → tts-CKB2MJSq.js} +0 -0
- /package/dist/{tts-B0_QVtVV.js → tts-y10rjplW.js} +0 -0
- /package/dist/{tts.runtime-DIBAMvsb.js → tts.runtime-DJhcLC3T.js} +0 -0
- /package/dist/{types-CNJErmew.js → types-Cl5KlDxs.js} +0 -0
- /package/dist/{video-http-BlHIyytb.js → video-http-lbLggCxb.js} +0 -0
- /package/dist/{widearea-dns-BWrAD9S6.js → widearea-dns-DYys1Z7C.js} +0 -0
- /package/dist/{x-search-tool-shared-Cxa0ul0H.js → x-search-tool-shared-Dy7MMhpV.js} +0 -0
|
@@ -0,0 +1,2586 @@
|
|
|
1
|
+
import { i as normalizeLowercaseStringOrEmpty, o as normalizeOptionalLowercaseString, s as normalizeOptionalString } from "./string-coerce-CIT1-v_a.js";
|
|
2
|
+
import { n as defaultRuntime } from "./runtime-CgZZEqw7.js";
|
|
3
|
+
import { c as resolveBoundaryPath, f as isPathInside, r as openBoundaryFile } from "./boundary-file-read-yTFhgtfy.js";
|
|
4
|
+
import { m as resolveUserPath } from "./utils-CE5zxr9Z.js";
|
|
5
|
+
import { n as resolvePreferredKaijiBotTmpDir } from "./tmp-kaijibot-dir-NjkPBIBe.js";
|
|
6
|
+
import { a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_SOUL_FILENAME, d as ensureAgentWorkspace, i as DEFAULT_HEARTBEAT_FILENAME, l as DEFAULT_TOOLS_FILENAME, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, t as DEFAULT_AGENTS_FILENAME, u as DEFAULT_USER_FILENAME } from "./workspace-DbhTI_u7.js";
|
|
7
|
+
import { a as loadConfig } from "./io-4SsSDURt.js";
|
|
8
|
+
import "./config-BAxY-VFe.js";
|
|
9
|
+
import { t as loadActivatedBundledPluginPublicSurfaceModuleSync } from "./facade-runtime-DwxUHh4P.js";
|
|
10
|
+
import { a as isToolAllowed, f as SANDBOX_AGENT_WORKSPACE_MOUNT, m as SANDBOX_BROWSER_SECURITY_HASH_EPOCH, n as resolveSandboxConfigForAgent, t as resolveSandboxBrowserDockerCreateConfig } from "./config-B03NtMF7.js";
|
|
11
|
+
import { n as resolveSandboxRuntimeStatus } from "./runtime-status-BiEtv0A1.js";
|
|
12
|
+
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-C72eQrF6.js";
|
|
13
|
+
import { i as resolveSandboxPath, r as resolveSandboxInputPath } from "./sandbox-paths-CXQ7jg5Z.js";
|
|
14
|
+
import { M as buildDockerExecArgs, r as getRemoteSkillEligibility, t as canExecRequestNode } from "./exec-defaults-BWTMcQ8O.js";
|
|
15
|
+
import { l as syncSkillsToWorkspace } from "./skills-DapCVO_j.js";
|
|
16
|
+
import { t as sanitizeEnvVars } from "./sanitize-env-vars-D1ENgN8V.js";
|
|
17
|
+
import { n as resolveBrowserControlAuth, t as ensureBrowserControlAuth } from "./browser-control-auth-VfWtrFLc.js";
|
|
18
|
+
import { r as deriveDefaultBrowserCdpPortRange } from "./port-defaults-CcH8MpTc.js";
|
|
19
|
+
import { i as DEFAULT_KAIJIBOT_BROWSER_COLOR, l as resolveProfile, o as DEFAULT_KAIJIBOT_BROWSER_PROFILE_NAME } from "./browser-profiles-fhPj_OZr.js";
|
|
20
|
+
import { C as updateRegistry, S as updateBrowserRegistry, _ as slugifySessionKey, a as execDockerRaw, b as removeBrowserRegistryEntry, c as readDockerPort, d as validateNetworkMode, f as resolveSandboxHostPathViaExistingAncestor, g as resolveSandboxWorkspaceDir, h as resolveSandboxScopeKey, i as execDocker, l as appendWorkspaceMountArgs, m as resolveSandboxAgentId, n as dockerContainerState, o as readDockerContainerEnvVar, p as splitSandboxBindSpec, r as ensureSandboxContainer, s as readDockerContainerLabel, t as buildSandboxCreateArgs, v as readBrowserRegistry, w as computeSandboxBrowserConfigHash, x as removeRegistryEntry, y as readRegistry } from "./docker-DYYLVhpx.js";
|
|
21
|
+
import { t as parseSshTarget } from "./ssh-tunnel-CPsxdhty.js";
|
|
22
|
+
import fs from "node:fs";
|
|
23
|
+
import path from "node:path";
|
|
24
|
+
import { spawn } from "node:child_process";
|
|
25
|
+
import os from "node:os";
|
|
26
|
+
import fs$1 from "node:fs/promises";
|
|
27
|
+
import crypto from "node:crypto";
|
|
28
|
+
//#region src/agents/sandbox/docker-backend.ts
|
|
29
|
+
function resolveConfiguredDockerRuntimeImage(params) {
|
|
30
|
+
const sandboxCfg = resolveSandboxConfigForAgent(params.config, params.agentId);
|
|
31
|
+
switch (params.configLabelKind) {
|
|
32
|
+
case "BrowserImage": return sandboxCfg.browser.image;
|
|
33
|
+
case "Image":
|
|
34
|
+
case void 0:
|
|
35
|
+
default: return sandboxCfg.docker.image;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async function createDockerSandboxBackend(params) {
|
|
39
|
+
return createDockerSandboxBackendHandle({
|
|
40
|
+
containerName: await ensureSandboxContainer({
|
|
41
|
+
sessionKey: params.sessionKey,
|
|
42
|
+
workspaceDir: params.workspaceDir,
|
|
43
|
+
agentWorkspaceDir: params.agentWorkspaceDir,
|
|
44
|
+
cfg: params.cfg
|
|
45
|
+
}),
|
|
46
|
+
workdir: params.cfg.docker.workdir,
|
|
47
|
+
env: params.cfg.docker.env,
|
|
48
|
+
image: params.cfg.docker.image
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function createDockerSandboxBackendHandle(params) {
|
|
52
|
+
return {
|
|
53
|
+
id: "docker",
|
|
54
|
+
runtimeId: params.containerName,
|
|
55
|
+
runtimeLabel: params.containerName,
|
|
56
|
+
workdir: params.workdir,
|
|
57
|
+
env: params.env,
|
|
58
|
+
configLabel: params.image,
|
|
59
|
+
configLabelKind: "Image",
|
|
60
|
+
capabilities: { browser: true },
|
|
61
|
+
async buildExecSpec({ command, workdir, env, usePty }) {
|
|
62
|
+
return {
|
|
63
|
+
argv: ["docker", ...buildDockerExecArgs({
|
|
64
|
+
containerName: params.containerName,
|
|
65
|
+
command,
|
|
66
|
+
workdir: workdir ?? params.workdir,
|
|
67
|
+
env,
|
|
68
|
+
tty: usePty
|
|
69
|
+
})],
|
|
70
|
+
env: process.env,
|
|
71
|
+
stdinMode: usePty ? "pipe-open" : "pipe-closed"
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
runShellCommand(command) {
|
|
75
|
+
return runDockerSandboxShellCommand({
|
|
76
|
+
containerName: params.containerName,
|
|
77
|
+
...command
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function runDockerSandboxShellCommand(params) {
|
|
83
|
+
const dockerArgs = [
|
|
84
|
+
"exec",
|
|
85
|
+
"-i",
|
|
86
|
+
params.containerName,
|
|
87
|
+
"sh",
|
|
88
|
+
"-c",
|
|
89
|
+
params.script,
|
|
90
|
+
"kaijibot-sandbox-fs"
|
|
91
|
+
];
|
|
92
|
+
if (params.args?.length) dockerArgs.push(...params.args);
|
|
93
|
+
return execDockerRaw(dockerArgs, {
|
|
94
|
+
input: params.stdin,
|
|
95
|
+
allowFailure: params.allowFailure,
|
|
96
|
+
signal: params.signal
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
const dockerSandboxBackendManager = {
|
|
100
|
+
async describeRuntime({ entry, config, agentId }) {
|
|
101
|
+
const state = await dockerContainerState(entry.containerName);
|
|
102
|
+
let actualConfigLabel = entry.image;
|
|
103
|
+
if (state.exists) try {
|
|
104
|
+
const result = await execDocker([
|
|
105
|
+
"inspect",
|
|
106
|
+
"-f",
|
|
107
|
+
"{{.Config.Image}}",
|
|
108
|
+
entry.containerName
|
|
109
|
+
], { allowFailure: true });
|
|
110
|
+
if (result.code === 0) actualConfigLabel = result.stdout.trim() || actualConfigLabel;
|
|
111
|
+
} catch {}
|
|
112
|
+
const configuredImage = resolveConfiguredDockerRuntimeImage({
|
|
113
|
+
config,
|
|
114
|
+
agentId,
|
|
115
|
+
configLabelKind: entry.configLabelKind
|
|
116
|
+
});
|
|
117
|
+
return {
|
|
118
|
+
running: state.running,
|
|
119
|
+
actualConfigLabel,
|
|
120
|
+
configLabelMatch: actualConfigLabel === configuredImage
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
async removeRuntime({ entry }) {
|
|
124
|
+
try {
|
|
125
|
+
await execDocker([
|
|
126
|
+
"rm",
|
|
127
|
+
"-f",
|
|
128
|
+
entry.containerName
|
|
129
|
+
], { allowFailure: true });
|
|
130
|
+
} catch {}
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/agents/sandbox/fs-bridge-mutation-helper.ts
|
|
135
|
+
const SANDBOX_PINNED_MUTATION_PYTHON_CANDIDATES = [
|
|
136
|
+
"/usr/bin/python3",
|
|
137
|
+
"/usr/local/bin/python3",
|
|
138
|
+
"/opt/homebrew/bin/python3",
|
|
139
|
+
"/bin/python3"
|
|
140
|
+
];
|
|
141
|
+
const SANDBOX_PINNED_MUTATION_PYTHON = [
|
|
142
|
+
"import errno",
|
|
143
|
+
"import os",
|
|
144
|
+
"import secrets",
|
|
145
|
+
"import stat",
|
|
146
|
+
"import sys",
|
|
147
|
+
"",
|
|
148
|
+
"operation = sys.argv[1]",
|
|
149
|
+
"",
|
|
150
|
+
"DIR_FLAGS = os.O_RDONLY",
|
|
151
|
+
"if hasattr(os, 'O_DIRECTORY'):",
|
|
152
|
+
" DIR_FLAGS |= os.O_DIRECTORY",
|
|
153
|
+
"if hasattr(os, 'O_NOFOLLOW'):",
|
|
154
|
+
" DIR_FLAGS |= os.O_NOFOLLOW",
|
|
155
|
+
"",
|
|
156
|
+
"READ_FLAGS = os.O_RDONLY",
|
|
157
|
+
"if hasattr(os, 'O_NOFOLLOW'):",
|
|
158
|
+
" READ_FLAGS |= os.O_NOFOLLOW",
|
|
159
|
+
"",
|
|
160
|
+
"WRITE_FLAGS = os.O_WRONLY | os.O_CREAT | os.O_EXCL",
|
|
161
|
+
"if hasattr(os, 'O_NOFOLLOW'):",
|
|
162
|
+
" WRITE_FLAGS |= os.O_NOFOLLOW",
|
|
163
|
+
"",
|
|
164
|
+
"def split_relative(path_value):",
|
|
165
|
+
" segments = []",
|
|
166
|
+
" for segment in path_value.split('/'):",
|
|
167
|
+
" if not segment or segment == '.':",
|
|
168
|
+
" continue",
|
|
169
|
+
" if segment == '..':",
|
|
170
|
+
" raise OSError(errno.EPERM, 'path traversal is not allowed', segment)",
|
|
171
|
+
" segments.append(segment)",
|
|
172
|
+
" return segments",
|
|
173
|
+
"",
|
|
174
|
+
"def open_dir(path_value, dir_fd=None):",
|
|
175
|
+
" return os.open(path_value, DIR_FLAGS, dir_fd=dir_fd)",
|
|
176
|
+
"",
|
|
177
|
+
"def walk_dir(root_fd, rel_path, mkdir_enabled):",
|
|
178
|
+
" current_fd = os.dup(root_fd)",
|
|
179
|
+
" try:",
|
|
180
|
+
" for segment in split_relative(rel_path):",
|
|
181
|
+
" try:",
|
|
182
|
+
" next_fd = open_dir(segment, dir_fd=current_fd)",
|
|
183
|
+
" except FileNotFoundError:",
|
|
184
|
+
" if not mkdir_enabled:",
|
|
185
|
+
" raise",
|
|
186
|
+
" os.mkdir(segment, 0o777, dir_fd=current_fd)",
|
|
187
|
+
" next_fd = open_dir(segment, dir_fd=current_fd)",
|
|
188
|
+
" os.close(current_fd)",
|
|
189
|
+
" current_fd = next_fd",
|
|
190
|
+
" return current_fd",
|
|
191
|
+
" except Exception:",
|
|
192
|
+
" os.close(current_fd)",
|
|
193
|
+
" raise",
|
|
194
|
+
"",
|
|
195
|
+
"def create_temp_file(parent_fd, basename):",
|
|
196
|
+
" prefix = '.kaijibot-write-' + basename + '.'",
|
|
197
|
+
" for _ in range(128):",
|
|
198
|
+
" candidate = prefix + secrets.token_hex(6)",
|
|
199
|
+
" try:",
|
|
200
|
+
" fd = os.open(candidate, WRITE_FLAGS, 0o600, dir_fd=parent_fd)",
|
|
201
|
+
" return candidate, fd",
|
|
202
|
+
" except FileExistsError:",
|
|
203
|
+
" continue",
|
|
204
|
+
" raise RuntimeError('failed to allocate sandbox temp file')",
|
|
205
|
+
"",
|
|
206
|
+
"def create_temp_dir(parent_fd, basename, mode):",
|
|
207
|
+
" prefix = '.kaijibot-move-' + basename + '.'",
|
|
208
|
+
" for _ in range(128):",
|
|
209
|
+
" candidate = prefix + secrets.token_hex(6)",
|
|
210
|
+
" try:",
|
|
211
|
+
" os.mkdir(candidate, mode, dir_fd=parent_fd)",
|
|
212
|
+
" return candidate",
|
|
213
|
+
" except FileExistsError:",
|
|
214
|
+
" continue",
|
|
215
|
+
" raise RuntimeError('failed to allocate sandbox temp directory')",
|
|
216
|
+
"",
|
|
217
|
+
"def write_atomic(parent_fd, basename, stdin_buffer):",
|
|
218
|
+
" temp_fd = None",
|
|
219
|
+
" temp_name = None",
|
|
220
|
+
" try:",
|
|
221
|
+
" temp_name, temp_fd = create_temp_file(parent_fd, basename)",
|
|
222
|
+
" while True:",
|
|
223
|
+
" chunk = stdin_buffer.read(65536)",
|
|
224
|
+
" if not chunk:",
|
|
225
|
+
" break",
|
|
226
|
+
" os.write(temp_fd, chunk)",
|
|
227
|
+
" os.fsync(temp_fd)",
|
|
228
|
+
" os.close(temp_fd)",
|
|
229
|
+
" temp_fd = None",
|
|
230
|
+
" os.replace(temp_name, basename, src_dir_fd=parent_fd, dst_dir_fd=parent_fd)",
|
|
231
|
+
" temp_name = None",
|
|
232
|
+
" os.fsync(parent_fd)",
|
|
233
|
+
" finally:",
|
|
234
|
+
" if temp_fd is not None:",
|
|
235
|
+
" os.close(temp_fd)",
|
|
236
|
+
" if temp_name is not None:",
|
|
237
|
+
" try:",
|
|
238
|
+
" os.unlink(temp_name, dir_fd=parent_fd)",
|
|
239
|
+
" except FileNotFoundError:",
|
|
240
|
+
" pass",
|
|
241
|
+
"",
|
|
242
|
+
"def read_file(parent_fd, basename):",
|
|
243
|
+
" file_fd = os.open(basename, READ_FLAGS, dir_fd=parent_fd)",
|
|
244
|
+
" try:",
|
|
245
|
+
" file_stat = os.fstat(file_fd)",
|
|
246
|
+
" if not stat.S_ISREG(file_stat.st_mode):",
|
|
247
|
+
" raise OSError(errno.EPERM, 'only regular files are allowed', basename)",
|
|
248
|
+
" if file_stat.st_nlink > 1:",
|
|
249
|
+
" raise OSError(errno.EPERM, 'hardlinked file is not allowed', basename)",
|
|
250
|
+
" while True:",
|
|
251
|
+
" chunk = os.read(file_fd, 65536)",
|
|
252
|
+
" if not chunk:",
|
|
253
|
+
" break",
|
|
254
|
+
" os.write(1, chunk)",
|
|
255
|
+
" finally:",
|
|
256
|
+
" os.close(file_fd)",
|
|
257
|
+
"",
|
|
258
|
+
"def remove_tree(parent_fd, basename):",
|
|
259
|
+
" entry_stat = os.lstat(basename, dir_fd=parent_fd)",
|
|
260
|
+
" if not stat.S_ISDIR(entry_stat.st_mode) or stat.S_ISLNK(entry_stat.st_mode):",
|
|
261
|
+
" os.unlink(basename, dir_fd=parent_fd)",
|
|
262
|
+
" return",
|
|
263
|
+
" dir_fd = open_dir(basename, dir_fd=parent_fd)",
|
|
264
|
+
" try:",
|
|
265
|
+
" for child in os.listdir(dir_fd):",
|
|
266
|
+
" remove_tree(dir_fd, child)",
|
|
267
|
+
" finally:",
|
|
268
|
+
" os.close(dir_fd)",
|
|
269
|
+
" os.rmdir(basename, dir_fd=parent_fd)",
|
|
270
|
+
"",
|
|
271
|
+
"def move_entry(src_parent_fd, src_basename, dst_parent_fd, dst_basename):",
|
|
272
|
+
" try:",
|
|
273
|
+
" os.rename(src_basename, dst_basename, src_dir_fd=src_parent_fd, dst_dir_fd=dst_parent_fd)",
|
|
274
|
+
" os.fsync(dst_parent_fd)",
|
|
275
|
+
" os.fsync(src_parent_fd)",
|
|
276
|
+
" return",
|
|
277
|
+
" except OSError as err:",
|
|
278
|
+
" if err.errno != errno.EXDEV:",
|
|
279
|
+
" raise",
|
|
280
|
+
" src_stat = os.lstat(src_basename, dir_fd=src_parent_fd)",
|
|
281
|
+
" if stat.S_ISDIR(src_stat.st_mode) and not stat.S_ISLNK(src_stat.st_mode):",
|
|
282
|
+
" temp_dir_name = create_temp_dir(dst_parent_fd, dst_basename, stat.S_IMODE(src_stat.st_mode) or 0o755)",
|
|
283
|
+
" temp_dir_fd = open_dir(temp_dir_name, dir_fd=dst_parent_fd)",
|
|
284
|
+
" src_dir_fd = open_dir(src_basename, dir_fd=src_parent_fd)",
|
|
285
|
+
" try:",
|
|
286
|
+
" for child in os.listdir(src_dir_fd):",
|
|
287
|
+
" move_entry(src_dir_fd, child, temp_dir_fd, child)",
|
|
288
|
+
" finally:",
|
|
289
|
+
" os.close(src_dir_fd)",
|
|
290
|
+
" os.close(temp_dir_fd)",
|
|
291
|
+
" os.rename(temp_dir_name, dst_basename, src_dir_fd=dst_parent_fd, dst_dir_fd=dst_parent_fd)",
|
|
292
|
+
" os.rmdir(src_basename, dir_fd=src_parent_fd)",
|
|
293
|
+
" os.fsync(dst_parent_fd)",
|
|
294
|
+
" os.fsync(src_parent_fd)",
|
|
295
|
+
" return",
|
|
296
|
+
" if stat.S_ISLNK(src_stat.st_mode):",
|
|
297
|
+
" link_target = os.readlink(src_basename, dir_fd=src_parent_fd)",
|
|
298
|
+
" try:",
|
|
299
|
+
" os.unlink(dst_basename, dir_fd=dst_parent_fd)",
|
|
300
|
+
" except FileNotFoundError:",
|
|
301
|
+
" pass",
|
|
302
|
+
" os.symlink(link_target, dst_basename, dir_fd=dst_parent_fd)",
|
|
303
|
+
" os.unlink(src_basename, dir_fd=src_parent_fd)",
|
|
304
|
+
" os.fsync(dst_parent_fd)",
|
|
305
|
+
" os.fsync(src_parent_fd)",
|
|
306
|
+
" return",
|
|
307
|
+
" src_fd = os.open(src_basename, READ_FLAGS, dir_fd=src_parent_fd)",
|
|
308
|
+
" temp_fd = None",
|
|
309
|
+
" temp_name = None",
|
|
310
|
+
" try:",
|
|
311
|
+
" src_file_stat = os.fstat(src_fd)",
|
|
312
|
+
" if not stat.S_ISREG(src_file_stat.st_mode):",
|
|
313
|
+
" raise OSError(errno.EPERM, 'only regular files are allowed', src_basename)",
|
|
314
|
+
" if src_file_stat.st_nlink > 1:",
|
|
315
|
+
" raise OSError(errno.EPERM, 'hardlinked file is not allowed', src_basename)",
|
|
316
|
+
" temp_name, temp_fd = create_temp_file(dst_parent_fd, dst_basename)",
|
|
317
|
+
" while True:",
|
|
318
|
+
" chunk = os.read(src_fd, 65536)",
|
|
319
|
+
" if not chunk:",
|
|
320
|
+
" break",
|
|
321
|
+
" os.write(temp_fd, chunk)",
|
|
322
|
+
" try:",
|
|
323
|
+
" os.fchmod(temp_fd, stat.S_IMODE(src_stat.st_mode))",
|
|
324
|
+
" except AttributeError:",
|
|
325
|
+
" pass",
|
|
326
|
+
" os.fsync(temp_fd)",
|
|
327
|
+
" os.close(temp_fd)",
|
|
328
|
+
" temp_fd = None",
|
|
329
|
+
" os.replace(temp_name, dst_basename, src_dir_fd=dst_parent_fd, dst_dir_fd=dst_parent_fd)",
|
|
330
|
+
" temp_name = None",
|
|
331
|
+
" os.unlink(src_basename, dir_fd=src_parent_fd)",
|
|
332
|
+
" os.fsync(dst_parent_fd)",
|
|
333
|
+
" os.fsync(src_parent_fd)",
|
|
334
|
+
" finally:",
|
|
335
|
+
" if temp_fd is not None:",
|
|
336
|
+
" os.close(temp_fd)",
|
|
337
|
+
" if temp_name is not None:",
|
|
338
|
+
" try:",
|
|
339
|
+
" os.unlink(temp_name, dir_fd=dst_parent_fd)",
|
|
340
|
+
" except FileNotFoundError:",
|
|
341
|
+
" pass",
|
|
342
|
+
" os.close(src_fd)",
|
|
343
|
+
"",
|
|
344
|
+
"if operation == 'write':",
|
|
345
|
+
" root_fd = open_dir(sys.argv[2])",
|
|
346
|
+
" parent_fd = None",
|
|
347
|
+
" try:",
|
|
348
|
+
" parent_fd = walk_dir(root_fd, sys.argv[3], sys.argv[5] == '1')",
|
|
349
|
+
" write_atomic(parent_fd, sys.argv[4], sys.stdin.buffer)",
|
|
350
|
+
" finally:",
|
|
351
|
+
" if parent_fd is not None:",
|
|
352
|
+
" os.close(parent_fd)",
|
|
353
|
+
" os.close(root_fd)",
|
|
354
|
+
"elif operation == 'read':",
|
|
355
|
+
" root_fd = open_dir(sys.argv[2])",
|
|
356
|
+
" parent_fd = None",
|
|
357
|
+
" try:",
|
|
358
|
+
" parent_fd = walk_dir(root_fd, sys.argv[3], False)",
|
|
359
|
+
" read_file(parent_fd, sys.argv[4])",
|
|
360
|
+
" finally:",
|
|
361
|
+
" if parent_fd is not None:",
|
|
362
|
+
" os.close(parent_fd)",
|
|
363
|
+
" os.close(root_fd)",
|
|
364
|
+
"elif operation == 'mkdirp':",
|
|
365
|
+
" root_fd = open_dir(sys.argv[2])",
|
|
366
|
+
" target_fd = None",
|
|
367
|
+
" try:",
|
|
368
|
+
" target_fd = walk_dir(root_fd, sys.argv[3], True)",
|
|
369
|
+
" os.fsync(target_fd)",
|
|
370
|
+
" finally:",
|
|
371
|
+
" if target_fd is not None:",
|
|
372
|
+
" os.close(target_fd)",
|
|
373
|
+
" os.close(root_fd)",
|
|
374
|
+
"elif operation == 'remove':",
|
|
375
|
+
" root_fd = open_dir(sys.argv[2])",
|
|
376
|
+
" parent_fd = None",
|
|
377
|
+
" try:",
|
|
378
|
+
" parent_fd = walk_dir(root_fd, sys.argv[3], False)",
|
|
379
|
+
" try:",
|
|
380
|
+
" if sys.argv[5] == '1':",
|
|
381
|
+
" remove_tree(parent_fd, sys.argv[4])",
|
|
382
|
+
" else:",
|
|
383
|
+
" entry_stat = os.lstat(sys.argv[4], dir_fd=parent_fd)",
|
|
384
|
+
" if stat.S_ISDIR(entry_stat.st_mode) and not stat.S_ISLNK(entry_stat.st_mode):",
|
|
385
|
+
" os.rmdir(sys.argv[4], dir_fd=parent_fd)",
|
|
386
|
+
" else:",
|
|
387
|
+
" os.unlink(sys.argv[4], dir_fd=parent_fd)",
|
|
388
|
+
" os.fsync(parent_fd)",
|
|
389
|
+
" except FileNotFoundError:",
|
|
390
|
+
" if sys.argv[6] != '1':",
|
|
391
|
+
" raise",
|
|
392
|
+
" finally:",
|
|
393
|
+
" if parent_fd is not None:",
|
|
394
|
+
" os.close(parent_fd)",
|
|
395
|
+
" os.close(root_fd)",
|
|
396
|
+
"elif operation == 'rename':",
|
|
397
|
+
" src_root_fd = open_dir(sys.argv[2])",
|
|
398
|
+
" dst_root_fd = open_dir(sys.argv[5])",
|
|
399
|
+
" src_parent_fd = None",
|
|
400
|
+
" dst_parent_fd = None",
|
|
401
|
+
" try:",
|
|
402
|
+
" src_parent_fd = walk_dir(src_root_fd, sys.argv[3], False)",
|
|
403
|
+
" dst_parent_fd = walk_dir(dst_root_fd, sys.argv[6], sys.argv[8] == '1')",
|
|
404
|
+
" move_entry(src_parent_fd, sys.argv[4], dst_parent_fd, sys.argv[7])",
|
|
405
|
+
" finally:",
|
|
406
|
+
" if src_parent_fd is not None:",
|
|
407
|
+
" os.close(src_parent_fd)",
|
|
408
|
+
" if dst_parent_fd is not None:",
|
|
409
|
+
" os.close(dst_parent_fd)",
|
|
410
|
+
" os.close(src_root_fd)",
|
|
411
|
+
" os.close(dst_root_fd)",
|
|
412
|
+
"else:",
|
|
413
|
+
" raise RuntimeError('unknown sandbox mutation operation: ' + operation)"
|
|
414
|
+
].join("\n");
|
|
415
|
+
const SANDBOX_PINNED_MUTATION_PYTHON_SHELL_LITERAL = `'${SANDBOX_PINNED_MUTATION_PYTHON.replaceAll("'", `'\\''`)}'`;
|
|
416
|
+
function buildPinnedMutationPlan(params) {
|
|
417
|
+
return {
|
|
418
|
+
checks: params.checks,
|
|
419
|
+
recheckBeforeCommand: true,
|
|
420
|
+
script: [
|
|
421
|
+
"set -eu",
|
|
422
|
+
"python_cmd=''",
|
|
423
|
+
...SANDBOX_PINNED_MUTATION_PYTHON_CANDIDATES.map((candidate) => `if [ -z "$python_cmd" ] && [ -x '${candidate}' ]; then python_cmd='${candidate}'; fi`),
|
|
424
|
+
"if [ -z \"$python_cmd\" ]; then python_cmd=$(command -v python3 2>/dev/null || command -v python 2>/dev/null || true); fi",
|
|
425
|
+
"if [ -z \"$python_cmd\" ]; then",
|
|
426
|
+
" echo >&2 'sandbox pinned mutation helper requires python3 or python'",
|
|
427
|
+
" exit 127",
|
|
428
|
+
"fi",
|
|
429
|
+
`python_script=${SANDBOX_PINNED_MUTATION_PYTHON_SHELL_LITERAL}`,
|
|
430
|
+
"exec \"$python_cmd\" -c \"$python_script\" \"$@\""
|
|
431
|
+
].join("\n"),
|
|
432
|
+
args: params.args
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
function buildPinnedWritePlan(params) {
|
|
436
|
+
return buildPinnedMutationPlan({
|
|
437
|
+
checks: [params.check],
|
|
438
|
+
args: [
|
|
439
|
+
"write",
|
|
440
|
+
params.pinned.mountRootPath,
|
|
441
|
+
params.pinned.relativeParentPath,
|
|
442
|
+
params.pinned.basename,
|
|
443
|
+
params.mkdir ? "1" : "0"
|
|
444
|
+
]
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
function buildPinnedMkdirpPlan(params) {
|
|
448
|
+
return buildPinnedMutationPlan({
|
|
449
|
+
checks: [params.check],
|
|
450
|
+
args: [
|
|
451
|
+
"mkdirp",
|
|
452
|
+
params.pinned.mountRootPath,
|
|
453
|
+
params.pinned.relativePath
|
|
454
|
+
]
|
|
455
|
+
});
|
|
456
|
+
}
|
|
457
|
+
function buildPinnedRemovePlan(params) {
|
|
458
|
+
return buildPinnedMutationPlan({
|
|
459
|
+
checks: [{
|
|
460
|
+
target: params.check.target,
|
|
461
|
+
options: {
|
|
462
|
+
...params.check.options,
|
|
463
|
+
aliasPolicy: PATH_ALIAS_POLICIES.unlinkTarget
|
|
464
|
+
}
|
|
465
|
+
}],
|
|
466
|
+
args: [
|
|
467
|
+
"remove",
|
|
468
|
+
params.pinned.mountRootPath,
|
|
469
|
+
params.pinned.relativeParentPath,
|
|
470
|
+
params.pinned.basename,
|
|
471
|
+
params.recursive ? "1" : "0",
|
|
472
|
+
params.force === false ? "0" : "1"
|
|
473
|
+
]
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
function buildPinnedRenamePlan(params) {
|
|
477
|
+
return buildPinnedMutationPlan({
|
|
478
|
+
checks: [{
|
|
479
|
+
target: params.fromCheck.target,
|
|
480
|
+
options: {
|
|
481
|
+
...params.fromCheck.options,
|
|
482
|
+
aliasPolicy: PATH_ALIAS_POLICIES.unlinkTarget
|
|
483
|
+
}
|
|
484
|
+
}, params.toCheck],
|
|
485
|
+
args: [
|
|
486
|
+
"rename",
|
|
487
|
+
params.from.mountRootPath,
|
|
488
|
+
params.from.relativeParentPath,
|
|
489
|
+
params.from.basename,
|
|
490
|
+
params.to.mountRootPath,
|
|
491
|
+
params.to.relativeParentPath,
|
|
492
|
+
params.to.basename,
|
|
493
|
+
"1"
|
|
494
|
+
]
|
|
495
|
+
});
|
|
496
|
+
}
|
|
497
|
+
//#endregion
|
|
498
|
+
//#region src/agents/sandbox/fs-bridge-rename-targets.ts
|
|
499
|
+
function resolveWritableRenameTargets(params) {
|
|
500
|
+
const action = params.action ?? "rename files";
|
|
501
|
+
const from = params.resolveTarget({
|
|
502
|
+
filePath: params.from,
|
|
503
|
+
cwd: params.cwd
|
|
504
|
+
});
|
|
505
|
+
const to = params.resolveTarget({
|
|
506
|
+
filePath: params.to,
|
|
507
|
+
cwd: params.cwd
|
|
508
|
+
});
|
|
509
|
+
params.ensureWritable(from, action);
|
|
510
|
+
params.ensureWritable(to, action);
|
|
511
|
+
return {
|
|
512
|
+
from,
|
|
513
|
+
to
|
|
514
|
+
};
|
|
515
|
+
}
|
|
516
|
+
function resolveWritableRenameTargetsForBridge(params, resolveTarget, ensureWritable) {
|
|
517
|
+
return resolveWritableRenameTargets({
|
|
518
|
+
...params,
|
|
519
|
+
resolveTarget,
|
|
520
|
+
ensureWritable
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
function createWritableRenameTargetResolver(resolveTarget, ensureWritable) {
|
|
524
|
+
return (params) => resolveWritableRenameTargetsForBridge(params, resolveTarget, ensureWritable);
|
|
525
|
+
}
|
|
526
|
+
//#endregion
|
|
527
|
+
//#region src/agents/sandbox/path-utils.ts
|
|
528
|
+
function normalizeContainerPath$1(value) {
|
|
529
|
+
const normalized = path.posix.normalize(value);
|
|
530
|
+
return normalized === "." ? "/" : normalized;
|
|
531
|
+
}
|
|
532
|
+
function isPathInsideContainerRoot(root, target) {
|
|
533
|
+
const normalizedRoot = normalizeContainerPath$1(root);
|
|
534
|
+
const normalizedTarget = normalizeContainerPath$1(target);
|
|
535
|
+
if (normalizedRoot === "/") return true;
|
|
536
|
+
return normalizedTarget === normalizedRoot || normalizedTarget.startsWith(`${normalizedRoot}/`);
|
|
537
|
+
}
|
|
538
|
+
//#endregion
|
|
539
|
+
//#region src/agents/sandbox/remote-fs-bridge.ts
|
|
540
|
+
function createRemoteShellSandboxFsBridge(params) {
|
|
541
|
+
return new RemoteShellSandboxFsBridge(params.sandbox, params.runtime);
|
|
542
|
+
}
|
|
543
|
+
var RemoteShellSandboxFsBridge = class {
|
|
544
|
+
constructor(sandbox, runtime) {
|
|
545
|
+
this.sandbox = sandbox;
|
|
546
|
+
this.runtime = runtime;
|
|
547
|
+
this.resolveRenameTargets = createWritableRenameTargetResolver((target) => this.resolveTarget(target), (target, action) => this.ensureWritable(target, action));
|
|
548
|
+
}
|
|
549
|
+
resolvePath(params) {
|
|
550
|
+
const target = this.resolveTarget(params);
|
|
551
|
+
return {
|
|
552
|
+
relativePath: target.relativePath,
|
|
553
|
+
containerPath: target.containerPath
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
async readFile(params) {
|
|
557
|
+
const target = this.resolveTarget(params);
|
|
558
|
+
const relativePath = path.posix.relative(target.mountRootPath, target.containerPath);
|
|
559
|
+
if (relativePath === "" || relativePath === "." || relativePath.startsWith("..") || path.posix.isAbsolute(relativePath)) throw new Error(`Invalid sandbox entry target: ${target.containerPath}`);
|
|
560
|
+
return (await this.runMutation({
|
|
561
|
+
args: [
|
|
562
|
+
"read",
|
|
563
|
+
target.mountRootPath,
|
|
564
|
+
path.posix.dirname(relativePath) === "." ? "" : path.posix.dirname(relativePath),
|
|
565
|
+
path.posix.basename(relativePath)
|
|
566
|
+
],
|
|
567
|
+
signal: params.signal
|
|
568
|
+
})).stdout;
|
|
569
|
+
}
|
|
570
|
+
async writeFile(params) {
|
|
571
|
+
const target = this.resolveTarget(params);
|
|
572
|
+
this.ensureWritable(target, "write files");
|
|
573
|
+
const pinned = await this.resolvePinnedParent({
|
|
574
|
+
containerPath: target.containerPath,
|
|
575
|
+
action: "write files",
|
|
576
|
+
requireWritable: true
|
|
577
|
+
});
|
|
578
|
+
await this.assertNoHardlinkedFile({
|
|
579
|
+
containerPath: target.containerPath,
|
|
580
|
+
action: "write files",
|
|
581
|
+
signal: params.signal
|
|
582
|
+
});
|
|
583
|
+
const buffer = Buffer.isBuffer(params.data) ? params.data : Buffer.from(params.data, params.encoding ?? "utf8");
|
|
584
|
+
await this.runMutation({
|
|
585
|
+
args: [
|
|
586
|
+
"write",
|
|
587
|
+
pinned.mountRootPath,
|
|
588
|
+
pinned.relativeParentPath,
|
|
589
|
+
pinned.basename,
|
|
590
|
+
params.mkdir !== false ? "1" : "0"
|
|
591
|
+
],
|
|
592
|
+
stdin: buffer,
|
|
593
|
+
signal: params.signal
|
|
594
|
+
});
|
|
595
|
+
}
|
|
596
|
+
async mkdirp(params) {
|
|
597
|
+
const target = this.resolveTarget(params);
|
|
598
|
+
this.ensureWritable(target, "create directories");
|
|
599
|
+
const relativePath = path.posix.relative(target.mountRootPath, target.containerPath);
|
|
600
|
+
if (relativePath.startsWith("..") || path.posix.isAbsolute(relativePath)) throw new Error(`Sandbox path escapes allowed mounts; cannot create directories: ${target.containerPath}`);
|
|
601
|
+
await this.runMutation({
|
|
602
|
+
args: [
|
|
603
|
+
"mkdirp",
|
|
604
|
+
target.mountRootPath,
|
|
605
|
+
relativePath === "." ? "" : relativePath
|
|
606
|
+
],
|
|
607
|
+
signal: params.signal
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
async remove(params) {
|
|
611
|
+
const target = this.resolveTarget(params);
|
|
612
|
+
this.ensureWritable(target, "remove files");
|
|
613
|
+
if (!await this.remotePathExists(target.containerPath, params.signal)) {
|
|
614
|
+
if (params.force === false) throw new Error(`Sandbox path not found; cannot remove files: ${target.containerPath}`);
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
const pinned = await this.resolvePinnedParent({
|
|
618
|
+
containerPath: target.containerPath,
|
|
619
|
+
action: "remove files",
|
|
620
|
+
requireWritable: true,
|
|
621
|
+
allowFinalSymlinkForUnlink: true
|
|
622
|
+
});
|
|
623
|
+
await this.runMutation({
|
|
624
|
+
args: [
|
|
625
|
+
"remove",
|
|
626
|
+
pinned.mountRootPath,
|
|
627
|
+
pinned.relativeParentPath,
|
|
628
|
+
pinned.basename,
|
|
629
|
+
params.recursive ? "1" : "0",
|
|
630
|
+
params.force === false ? "0" : "1"
|
|
631
|
+
],
|
|
632
|
+
signal: params.signal,
|
|
633
|
+
allowFailure: params.force !== false
|
|
634
|
+
});
|
|
635
|
+
}
|
|
636
|
+
async rename(params) {
|
|
637
|
+
const { from, to } = this.resolveRenameTargets(params);
|
|
638
|
+
const fromPinned = await this.resolvePinnedParent({
|
|
639
|
+
containerPath: from.containerPath,
|
|
640
|
+
action: "rename files",
|
|
641
|
+
requireWritable: true,
|
|
642
|
+
allowFinalSymlinkForUnlink: true
|
|
643
|
+
});
|
|
644
|
+
const toPinned = await this.resolvePinnedParent({
|
|
645
|
+
containerPath: to.containerPath,
|
|
646
|
+
action: "rename files",
|
|
647
|
+
requireWritable: true
|
|
648
|
+
});
|
|
649
|
+
await this.runMutation({
|
|
650
|
+
args: [
|
|
651
|
+
"rename",
|
|
652
|
+
fromPinned.mountRootPath,
|
|
653
|
+
fromPinned.relativeParentPath,
|
|
654
|
+
fromPinned.basename,
|
|
655
|
+
toPinned.mountRootPath,
|
|
656
|
+
toPinned.relativeParentPath,
|
|
657
|
+
toPinned.basename,
|
|
658
|
+
"1"
|
|
659
|
+
],
|
|
660
|
+
signal: params.signal
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
async stat(params) {
|
|
664
|
+
const target = this.resolveTarget(params);
|
|
665
|
+
if (!await this.remotePathExists(target.containerPath, params.signal)) return null;
|
|
666
|
+
const canonical = await this.resolveCanonicalPath({
|
|
667
|
+
containerPath: target.containerPath,
|
|
668
|
+
action: "stat files",
|
|
669
|
+
signal: params.signal
|
|
670
|
+
});
|
|
671
|
+
await this.assertNoHardlinkedFile({
|
|
672
|
+
containerPath: canonical,
|
|
673
|
+
action: "stat files",
|
|
674
|
+
signal: params.signal
|
|
675
|
+
});
|
|
676
|
+
const [kindRaw = "", sizeRaw = "0", mtimeRaw = "0"] = (await this.runRemoteScript({
|
|
677
|
+
script: "set -eu\nstat -c \"%F|%s|%Y\" -- \"$1\"",
|
|
678
|
+
args: [canonical],
|
|
679
|
+
signal: params.signal
|
|
680
|
+
})).stdout.toString("utf8").trim().split("|");
|
|
681
|
+
return {
|
|
682
|
+
type: kindRaw === "directory" ? "directory" : kindRaw === "regular file" ? "file" : "other",
|
|
683
|
+
size: Number(sizeRaw),
|
|
684
|
+
mtimeMs: Number(mtimeRaw) * 1e3
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
getMounts() {
|
|
688
|
+
const mounts = [{
|
|
689
|
+
containerRoot: normalizeContainerPath(this.runtime.remoteWorkspaceDir),
|
|
690
|
+
writable: this.sandbox.workspaceAccess === "rw",
|
|
691
|
+
source: "workspace"
|
|
692
|
+
}];
|
|
693
|
+
if (this.sandbox.workspaceAccess !== "none" && path.resolve(this.sandbox.agentWorkspaceDir) !== path.resolve(this.sandbox.workspaceDir)) mounts.push({
|
|
694
|
+
containerRoot: normalizeContainerPath(this.runtime.remoteAgentWorkspaceDir),
|
|
695
|
+
writable: this.sandbox.workspaceAccess === "rw",
|
|
696
|
+
source: "agent"
|
|
697
|
+
});
|
|
698
|
+
return mounts;
|
|
699
|
+
}
|
|
700
|
+
resolveTarget(params) {
|
|
701
|
+
const workspaceRoot = path.resolve(this.sandbox.workspaceDir);
|
|
702
|
+
const agentRoot = path.resolve(this.sandbox.agentWorkspaceDir);
|
|
703
|
+
const workspaceContainerRoot = normalizeContainerPath(this.runtime.remoteWorkspaceDir);
|
|
704
|
+
const agentContainerRoot = normalizeContainerPath(this.runtime.remoteAgentWorkspaceDir);
|
|
705
|
+
const mounts = this.getMounts();
|
|
706
|
+
const input = params.filePath.trim();
|
|
707
|
+
const inputPosix = input.replace(/\\/g, "/");
|
|
708
|
+
const maybeContainerMount = path.posix.isAbsolute(inputPosix) ? this.resolveMountByContainerPath(mounts, normalizeContainerPath(inputPosix)) : null;
|
|
709
|
+
if (maybeContainerMount) return this.toResolvedPath({
|
|
710
|
+
mount: maybeContainerMount,
|
|
711
|
+
containerPath: normalizeContainerPath(inputPosix)
|
|
712
|
+
});
|
|
713
|
+
const hostCwd = params.cwd ? path.resolve(params.cwd) : workspaceRoot;
|
|
714
|
+
const hostCandidate = path.isAbsolute(input) ? path.resolve(input) : path.resolve(hostCwd, input);
|
|
715
|
+
if (isPathInside(workspaceRoot, hostCandidate)) {
|
|
716
|
+
const relative = toPosixRelative(workspaceRoot, hostCandidate);
|
|
717
|
+
return this.toResolvedPath({
|
|
718
|
+
mount: mounts[0],
|
|
719
|
+
containerPath: relative ? path.posix.join(workspaceContainerRoot, relative) : workspaceContainerRoot
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
if (mounts[1] && isPathInside(agentRoot, hostCandidate)) {
|
|
723
|
+
const relative = toPosixRelative(agentRoot, hostCandidate);
|
|
724
|
+
return this.toResolvedPath({
|
|
725
|
+
mount: mounts[1],
|
|
726
|
+
containerPath: relative ? path.posix.join(agentContainerRoot, relative) : agentContainerRoot
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
if (params.cwd) {
|
|
730
|
+
const cwdPosix = params.cwd.replace(/\\/g, "/");
|
|
731
|
+
if (path.posix.isAbsolute(cwdPosix)) {
|
|
732
|
+
const cwdContainer = normalizeContainerPath(cwdPosix);
|
|
733
|
+
const cwdMount = this.resolveMountByContainerPath(mounts, cwdContainer);
|
|
734
|
+
if (cwdMount) return this.toResolvedPath({
|
|
735
|
+
mount: cwdMount,
|
|
736
|
+
containerPath: normalizeContainerPath(path.posix.resolve(cwdContainer, inputPosix))
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
throw new Error(`Sandbox path escapes allowed mounts; cannot access: ${params.filePath}`);
|
|
741
|
+
}
|
|
742
|
+
toResolvedPath(params) {
|
|
743
|
+
const relative = path.posix.relative(params.mount.containerRoot, params.containerPath);
|
|
744
|
+
if (relative.startsWith("..") || path.posix.isAbsolute(relative)) throw new Error(`Sandbox path escapes allowed mounts; cannot access: ${params.containerPath}`);
|
|
745
|
+
return {
|
|
746
|
+
relativePath: params.mount.source === "workspace" ? relative === "." ? "" : relative : relative === "." ? params.mount.containerRoot : `${params.mount.containerRoot}/${relative}`,
|
|
747
|
+
containerPath: params.containerPath,
|
|
748
|
+
writable: params.mount.writable,
|
|
749
|
+
mountRootPath: params.mount.containerRoot,
|
|
750
|
+
source: params.mount.source
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
resolveMountByContainerPath(mounts, containerPath) {
|
|
754
|
+
const ordered = [...mounts].toSorted((a, b) => b.containerRoot.length - a.containerRoot.length);
|
|
755
|
+
for (const mount of ordered) if (isPathInsideContainerRoot(mount.containerRoot, containerPath)) return mount;
|
|
756
|
+
return null;
|
|
757
|
+
}
|
|
758
|
+
ensureWritable(target, action) {
|
|
759
|
+
if (this.sandbox.workspaceAccess !== "rw" || !target.writable) throw new Error(`Sandbox path is read-only; cannot ${action}: ${target.containerPath}`);
|
|
760
|
+
}
|
|
761
|
+
async remotePathExists(containerPath, signal) {
|
|
762
|
+
return (await this.runRemoteScript({
|
|
763
|
+
script: "if [ -e \"$1\" ] || [ -L \"$1\" ]; then printf \"1\\n\"; else printf \"0\\n\"; fi",
|
|
764
|
+
args: [containerPath],
|
|
765
|
+
signal
|
|
766
|
+
})).stdout.toString("utf8").trim() === "1";
|
|
767
|
+
}
|
|
768
|
+
async resolveCanonicalPath(params) {
|
|
769
|
+
const script = [
|
|
770
|
+
"set -eu",
|
|
771
|
+
"target=\"$1\"",
|
|
772
|
+
"allow_final=\"$2\"",
|
|
773
|
+
"suffix=\"\"",
|
|
774
|
+
"probe=\"$target\"",
|
|
775
|
+
"if [ \"$allow_final\" = \"1\" ] && [ -L \"$target\" ]; then probe=$(dirname -- \"$target\"); fi",
|
|
776
|
+
"cursor=\"$probe\"",
|
|
777
|
+
"while [ ! -e \"$cursor\" ] && [ ! -L \"$cursor\" ]; do",
|
|
778
|
+
" parent=$(dirname -- \"$cursor\")",
|
|
779
|
+
" if [ \"$parent\" = \"$cursor\" ]; then break; fi",
|
|
780
|
+
" base=$(basename -- \"$cursor\")",
|
|
781
|
+
" suffix=\"/$base$suffix\"",
|
|
782
|
+
" cursor=\"$parent\"",
|
|
783
|
+
"done",
|
|
784
|
+
"canonical=$(readlink -f -- \"$cursor\")",
|
|
785
|
+
"printf \"%s%s\\n\" \"$canonical\" \"$suffix\""
|
|
786
|
+
].join("\n");
|
|
787
|
+
const canonical = normalizeContainerPath((await this.runRemoteScript({
|
|
788
|
+
script,
|
|
789
|
+
args: [params.containerPath, params.allowFinalSymlinkForUnlink ? "1" : "0"],
|
|
790
|
+
signal: params.signal
|
|
791
|
+
})).stdout.toString("utf8").trim());
|
|
792
|
+
if (!this.resolveMountByContainerPath(this.getMounts(), canonical)) throw new Error(`Sandbox path escapes allowed mounts; cannot ${params.action}: ${params.containerPath}`);
|
|
793
|
+
return canonical;
|
|
794
|
+
}
|
|
795
|
+
async assertNoHardlinkedFile(params) {
|
|
796
|
+
const output = (await this.runRemoteScript({
|
|
797
|
+
script: [
|
|
798
|
+
"if [ ! -e \"$1\" ] && [ ! -L \"$1\" ]; then exit 0; fi",
|
|
799
|
+
"stats=$(stat -c \"%F|%h\" -- \"$1\")",
|
|
800
|
+
"printf \"%s\\n\" \"$stats\""
|
|
801
|
+
].join("\n"),
|
|
802
|
+
args: [params.containerPath],
|
|
803
|
+
signal: params.signal,
|
|
804
|
+
allowFailure: true
|
|
805
|
+
})).stdout.toString("utf8").trim();
|
|
806
|
+
if (!output) return;
|
|
807
|
+
const [kind = "", linksRaw = "1"] = output.split("|");
|
|
808
|
+
if (kind === "regular file" && Number(linksRaw) > 1) throw new Error(`Hardlinked path is not allowed under sandbox mount root: ${params.containerPath}`);
|
|
809
|
+
}
|
|
810
|
+
async resolvePinnedParent(params) {
|
|
811
|
+
const basename = path.posix.basename(params.containerPath);
|
|
812
|
+
if (!basename || basename === "." || basename === "/") throw new Error(`Invalid sandbox entry target: ${params.containerPath}`);
|
|
813
|
+
const canonicalParent = await this.resolveCanonicalPath({
|
|
814
|
+
containerPath: normalizeContainerPath(path.posix.dirname(params.containerPath)),
|
|
815
|
+
action: params.action,
|
|
816
|
+
allowFinalSymlinkForUnlink: params.allowFinalSymlinkForUnlink
|
|
817
|
+
});
|
|
818
|
+
const mount = this.resolveMountByContainerPath(this.getMounts(), canonicalParent);
|
|
819
|
+
if (!mount) throw new Error(`Sandbox path escapes allowed mounts; cannot ${params.action}: ${params.containerPath}`);
|
|
820
|
+
if (params.requireWritable && !mount.writable) throw new Error(`Sandbox path is read-only; cannot ${params.action}: ${params.containerPath}`);
|
|
821
|
+
const relativeParentPath = path.posix.relative(mount.containerRoot, canonicalParent);
|
|
822
|
+
if (relativeParentPath.startsWith("..") || path.posix.isAbsolute(relativeParentPath)) throw new Error(`Sandbox path escapes allowed mounts; cannot ${params.action}: ${params.containerPath}`);
|
|
823
|
+
return {
|
|
824
|
+
mountRootPath: mount.containerRoot,
|
|
825
|
+
relativeParentPath: relativeParentPath === "." ? "" : relativeParentPath,
|
|
826
|
+
basename
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
async runMutation(params) {
|
|
830
|
+
return await this.runRemoteScript({
|
|
831
|
+
script: [
|
|
832
|
+
"set -eu",
|
|
833
|
+
"python3 /dev/fd/3 \"$@\" 3<<'PY'",
|
|
834
|
+
SANDBOX_PINNED_MUTATION_PYTHON,
|
|
835
|
+
"PY"
|
|
836
|
+
].join("\n"),
|
|
837
|
+
args: params.args,
|
|
838
|
+
stdin: params.stdin,
|
|
839
|
+
signal: params.signal,
|
|
840
|
+
allowFailure: params.allowFailure
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
async runRemoteScript(params) {
|
|
844
|
+
return await this.runtime.runRemoteShellScript({
|
|
845
|
+
script: params.script,
|
|
846
|
+
args: params.args,
|
|
847
|
+
stdin: params.stdin,
|
|
848
|
+
signal: params.signal,
|
|
849
|
+
allowFailure: params.allowFailure
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
};
|
|
853
|
+
function normalizeContainerPath(value) {
|
|
854
|
+
const normalized = normalizeContainerPath$1(value.trim() || "/");
|
|
855
|
+
return normalized.startsWith("/") ? normalized : `/${normalized}`;
|
|
856
|
+
}
|
|
857
|
+
function toPosixRelative(root, candidate) {
|
|
858
|
+
return path.relative(root, candidate).split(path.sep).filter(Boolean).join(path.posix.sep);
|
|
859
|
+
}
|
|
860
|
+
//#endregion
|
|
861
|
+
//#region src/agents/sandbox/ssh.ts
|
|
862
|
+
function normalizeInlineSshMaterial(contents, filename) {
|
|
863
|
+
const normalizedEscapedNewlines = contents.replace(/^\uFEFF/, "").replace(/\r\n?/g, "\n").replace(/\\r\\n/g, "\\n").replace(/\\r/g, "\\n");
|
|
864
|
+
const expanded = filename === "identity" || filename === "certificate.pub" ? normalizedEscapedNewlines.replace(/\\n/g, "\n") : normalizedEscapedNewlines;
|
|
865
|
+
return expanded.endsWith("\n") ? expanded : `${expanded}\n`;
|
|
866
|
+
}
|
|
867
|
+
function buildSshFailureMessage(stderr, exitCode) {
|
|
868
|
+
const trimmed = stderr.trim();
|
|
869
|
+
if (trimmed.includes("error in libcrypto") && (trimmed.includes("Load key \"") || trimmed.includes("Permission denied (publickey)"))) return `${trimmed}\nSSH sandbox failed to load the configured identity. The private key contents may be malformed (for example CRLF or escaped newlines). Prefer identityFile when possible.`;
|
|
870
|
+
return trimmed || (exitCode !== void 0 ? `ssh exited with code ${exitCode}` : "ssh exited with a non-zero status");
|
|
871
|
+
}
|
|
872
|
+
function shellEscape(value) {
|
|
873
|
+
return `'${value.replaceAll("'", `'"'"'`)}'`;
|
|
874
|
+
}
|
|
875
|
+
function buildRemoteCommand(argv) {
|
|
876
|
+
return argv.map((entry) => shellEscape(entry)).join(" ");
|
|
877
|
+
}
|
|
878
|
+
function buildExecRemoteCommand(params) {
|
|
879
|
+
const body = params.workdir ? `cd ${shellEscape(params.workdir)} && ${params.command}` : params.command;
|
|
880
|
+
return buildRemoteCommand(Object.keys(params.env).length > 0 ? [
|
|
881
|
+
"env",
|
|
882
|
+
...Object.entries(params.env).map(([key, value]) => `${key}=${value}`),
|
|
883
|
+
"/bin/sh",
|
|
884
|
+
"-c",
|
|
885
|
+
body
|
|
886
|
+
] : [
|
|
887
|
+
"/bin/sh",
|
|
888
|
+
"-c",
|
|
889
|
+
body
|
|
890
|
+
]);
|
|
891
|
+
}
|
|
892
|
+
function buildSshSandboxArgv(params) {
|
|
893
|
+
return [
|
|
894
|
+
params.session.command,
|
|
895
|
+
"-F",
|
|
896
|
+
params.session.configPath,
|
|
897
|
+
...params.tty ? [
|
|
898
|
+
"-tt",
|
|
899
|
+
"-o",
|
|
900
|
+
"RequestTTY=force",
|
|
901
|
+
"-o",
|
|
902
|
+
"SetEnv=TERM=xterm-256color"
|
|
903
|
+
] : [
|
|
904
|
+
"-T",
|
|
905
|
+
"-o",
|
|
906
|
+
"RequestTTY=no"
|
|
907
|
+
],
|
|
908
|
+
params.session.host,
|
|
909
|
+
params.remoteCommand
|
|
910
|
+
];
|
|
911
|
+
}
|
|
912
|
+
async function createSshSandboxSessionFromConfigText(params) {
|
|
913
|
+
const host = params.host?.trim() || parseSshConfigHost(params.configText);
|
|
914
|
+
if (!host) throw new Error("Failed to parse SSH config output.");
|
|
915
|
+
const configDir = await fs$1.mkdtemp(path.join(resolveSshTmpRoot(), "kaijibot-sandbox-ssh-"));
|
|
916
|
+
const configPath = path.join(configDir, "config");
|
|
917
|
+
await fs$1.writeFile(configPath, params.configText, {
|
|
918
|
+
encoding: "utf8",
|
|
919
|
+
mode: 384
|
|
920
|
+
});
|
|
921
|
+
await fs$1.chmod(configPath, 384);
|
|
922
|
+
return {
|
|
923
|
+
command: params.command?.trim() || "ssh",
|
|
924
|
+
configPath,
|
|
925
|
+
host
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
async function createSshSandboxSessionFromSettings(settings) {
|
|
929
|
+
const parsed = parseSshTarget(settings.target);
|
|
930
|
+
if (!parsed) throw new Error(`Invalid sandbox SSH target: ${settings.target}`);
|
|
931
|
+
const configDir = await fs$1.mkdtemp(path.join(resolveSshTmpRoot(), "kaijibot-sandbox-ssh-"));
|
|
932
|
+
try {
|
|
933
|
+
const materializedIdentity = settings.identityData ? await writeSecretMaterial(configDir, "identity", settings.identityData) : void 0;
|
|
934
|
+
const materializedCertificate = settings.certificateData ? await writeSecretMaterial(configDir, "certificate.pub", settings.certificateData) : void 0;
|
|
935
|
+
const materializedKnownHosts = settings.knownHostsData ? await writeSecretMaterial(configDir, "known_hosts", settings.knownHostsData) : void 0;
|
|
936
|
+
const identityFile = materializedIdentity ?? resolveOptionalLocalPath(settings.identityFile);
|
|
937
|
+
const certificateFile = materializedCertificate ?? resolveOptionalLocalPath(settings.certificateFile);
|
|
938
|
+
const knownHostsFile = materializedKnownHosts ?? resolveOptionalLocalPath(settings.knownHostsFile);
|
|
939
|
+
const hostAlias = "kaijibot-sandbox";
|
|
940
|
+
const configPath = path.join(configDir, "config");
|
|
941
|
+
const lines = [
|
|
942
|
+
`Host ${hostAlias}`,
|
|
943
|
+
` HostName ${parsed.host}`,
|
|
944
|
+
` Port ${parsed.port}`,
|
|
945
|
+
" BatchMode yes",
|
|
946
|
+
" ConnectTimeout 5",
|
|
947
|
+
" ServerAliveInterval 15",
|
|
948
|
+
" ServerAliveCountMax 3",
|
|
949
|
+
` StrictHostKeyChecking ${settings.strictHostKeyChecking ? "yes" : "no"}`,
|
|
950
|
+
` UpdateHostKeys ${settings.updateHostKeys ? "yes" : "no"}`
|
|
951
|
+
];
|
|
952
|
+
if (parsed.user) lines.push(` User ${parsed.user}`);
|
|
953
|
+
if (knownHostsFile) lines.push(` UserKnownHostsFile ${knownHostsFile}`);
|
|
954
|
+
else if (!settings.strictHostKeyChecking) lines.push(" UserKnownHostsFile /dev/null");
|
|
955
|
+
if (identityFile) lines.push(` IdentityFile ${identityFile}`);
|
|
956
|
+
if (certificateFile) lines.push(` CertificateFile ${certificateFile}`);
|
|
957
|
+
if (identityFile || certificateFile) lines.push(" IdentitiesOnly yes");
|
|
958
|
+
await fs$1.writeFile(configPath, `${lines.join("\n")}\n`, {
|
|
959
|
+
encoding: "utf8",
|
|
960
|
+
mode: 384
|
|
961
|
+
});
|
|
962
|
+
await fs$1.chmod(configPath, 384);
|
|
963
|
+
return {
|
|
964
|
+
command: settings.command.trim() || "ssh",
|
|
965
|
+
configPath,
|
|
966
|
+
host: hostAlias
|
|
967
|
+
};
|
|
968
|
+
} catch (error) {
|
|
969
|
+
await fs$1.rm(configDir, {
|
|
970
|
+
recursive: true,
|
|
971
|
+
force: true
|
|
972
|
+
});
|
|
973
|
+
throw error;
|
|
974
|
+
}
|
|
975
|
+
}
|
|
976
|
+
async function disposeSshSandboxSession(session) {
|
|
977
|
+
await fs$1.rm(path.dirname(session.configPath), {
|
|
978
|
+
recursive: true,
|
|
979
|
+
force: true
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
async function runSshSandboxCommand(params) {
|
|
983
|
+
const argv = buildSshSandboxArgv({
|
|
984
|
+
session: params.session,
|
|
985
|
+
remoteCommand: params.remoteCommand,
|
|
986
|
+
tty: params.tty
|
|
987
|
+
});
|
|
988
|
+
const sshEnv = sanitizeEnvVars(process.env).allowed;
|
|
989
|
+
return await new Promise((resolve, reject) => {
|
|
990
|
+
const child = spawn(argv[0], argv.slice(1), {
|
|
991
|
+
stdio: [
|
|
992
|
+
"pipe",
|
|
993
|
+
"pipe",
|
|
994
|
+
"pipe"
|
|
995
|
+
],
|
|
996
|
+
env: sshEnv,
|
|
997
|
+
signal: params.signal
|
|
998
|
+
});
|
|
999
|
+
const stdoutChunks = [];
|
|
1000
|
+
const stderrChunks = [];
|
|
1001
|
+
child.stdout.on("data", (chunk) => stdoutChunks.push(Buffer.from(chunk)));
|
|
1002
|
+
child.stderr.on("data", (chunk) => stderrChunks.push(Buffer.from(chunk)));
|
|
1003
|
+
child.on("error", reject);
|
|
1004
|
+
child.on("close", (code) => {
|
|
1005
|
+
const stdout = Buffer.concat(stdoutChunks);
|
|
1006
|
+
const stderr = Buffer.concat(stderrChunks);
|
|
1007
|
+
const exitCode = code ?? 0;
|
|
1008
|
+
if (exitCode !== 0 && !params.allowFailure) {
|
|
1009
|
+
reject(Object.assign(new Error(buildSshFailureMessage(stderr.toString("utf8"), exitCode)), {
|
|
1010
|
+
code: exitCode,
|
|
1011
|
+
stdout,
|
|
1012
|
+
stderr
|
|
1013
|
+
}));
|
|
1014
|
+
return;
|
|
1015
|
+
}
|
|
1016
|
+
resolve({
|
|
1017
|
+
stdout,
|
|
1018
|
+
stderr,
|
|
1019
|
+
code: exitCode
|
|
1020
|
+
});
|
|
1021
|
+
});
|
|
1022
|
+
if (params.stdin !== void 0) {
|
|
1023
|
+
child.stdin.end(params.stdin);
|
|
1024
|
+
return;
|
|
1025
|
+
}
|
|
1026
|
+
child.stdin.end();
|
|
1027
|
+
});
|
|
1028
|
+
}
|
|
1029
|
+
async function uploadDirectoryToSshTarget(params) {
|
|
1030
|
+
await assertSafeUploadSymlinks(params.localDir);
|
|
1031
|
+
const remoteCommand = buildRemoteCommand([
|
|
1032
|
+
"/bin/sh",
|
|
1033
|
+
"-c",
|
|
1034
|
+
"mkdir -p -- \"$1\" && tar -xf - -C \"$1\"",
|
|
1035
|
+
"kaijibot-sandbox-upload",
|
|
1036
|
+
params.remoteDir
|
|
1037
|
+
]);
|
|
1038
|
+
const sshArgv = buildSshSandboxArgv({
|
|
1039
|
+
session: params.session,
|
|
1040
|
+
remoteCommand
|
|
1041
|
+
});
|
|
1042
|
+
const sshEnv = sanitizeEnvVars(process.env).allowed;
|
|
1043
|
+
await new Promise((resolve, reject) => {
|
|
1044
|
+
const tar = spawn("tar", [
|
|
1045
|
+
"-C",
|
|
1046
|
+
params.localDir,
|
|
1047
|
+
"-cf",
|
|
1048
|
+
"-",
|
|
1049
|
+
"."
|
|
1050
|
+
], {
|
|
1051
|
+
stdio: [
|
|
1052
|
+
"ignore",
|
|
1053
|
+
"pipe",
|
|
1054
|
+
"pipe"
|
|
1055
|
+
],
|
|
1056
|
+
signal: params.signal
|
|
1057
|
+
});
|
|
1058
|
+
const ssh = spawn(sshArgv[0], sshArgv.slice(1), {
|
|
1059
|
+
stdio: [
|
|
1060
|
+
"pipe",
|
|
1061
|
+
"pipe",
|
|
1062
|
+
"pipe"
|
|
1063
|
+
],
|
|
1064
|
+
env: sshEnv,
|
|
1065
|
+
signal: params.signal
|
|
1066
|
+
});
|
|
1067
|
+
const tarStderr = [];
|
|
1068
|
+
const sshStdout = [];
|
|
1069
|
+
const sshStderr = [];
|
|
1070
|
+
let tarClosed = false;
|
|
1071
|
+
let sshClosed = false;
|
|
1072
|
+
let tarCode = 0;
|
|
1073
|
+
let sshCode = 0;
|
|
1074
|
+
tar.stderr.on("data", (chunk) => tarStderr.push(Buffer.from(chunk)));
|
|
1075
|
+
ssh.stdout.on("data", (chunk) => sshStdout.push(Buffer.from(chunk)));
|
|
1076
|
+
ssh.stderr.on("data", (chunk) => sshStderr.push(Buffer.from(chunk)));
|
|
1077
|
+
const fail = (error) => {
|
|
1078
|
+
tar.kill("SIGKILL");
|
|
1079
|
+
ssh.kill("SIGKILL");
|
|
1080
|
+
reject(error);
|
|
1081
|
+
};
|
|
1082
|
+
tar.on("error", fail);
|
|
1083
|
+
ssh.on("error", fail);
|
|
1084
|
+
tar.stdout.pipe(ssh.stdin);
|
|
1085
|
+
tar.on("close", (code) => {
|
|
1086
|
+
tarClosed = true;
|
|
1087
|
+
tarCode = code ?? 0;
|
|
1088
|
+
maybeResolve();
|
|
1089
|
+
});
|
|
1090
|
+
ssh.on("close", (code) => {
|
|
1091
|
+
sshClosed = true;
|
|
1092
|
+
sshCode = code ?? 0;
|
|
1093
|
+
maybeResolve();
|
|
1094
|
+
});
|
|
1095
|
+
function maybeResolve() {
|
|
1096
|
+
if (!tarClosed || !sshClosed) return;
|
|
1097
|
+
if (tarCode !== 0) {
|
|
1098
|
+
reject(new Error(Buffer.concat(tarStderr).toString("utf8").trim() || `tar exited with code ${tarCode}`));
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1101
|
+
if (sshCode !== 0) {
|
|
1102
|
+
reject(new Error(Buffer.concat(sshStderr).toString("utf8").trim() || `ssh exited with code ${sshCode}`));
|
|
1103
|
+
return;
|
|
1104
|
+
}
|
|
1105
|
+
resolve();
|
|
1106
|
+
}
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
async function assertSafeUploadSymlinks(localDir) {
|
|
1110
|
+
const rootDir = path.resolve(localDir);
|
|
1111
|
+
await walkDirectory(rootDir);
|
|
1112
|
+
async function walkDirectory(currentDir) {
|
|
1113
|
+
const entries = await fs$1.readdir(currentDir, { withFileTypes: true });
|
|
1114
|
+
for (const entry of entries) {
|
|
1115
|
+
const entryPath = path.join(currentDir, entry.name);
|
|
1116
|
+
if (entry.isSymbolicLink()) {
|
|
1117
|
+
try {
|
|
1118
|
+
await resolveBoundaryPath({
|
|
1119
|
+
absolutePath: entryPath,
|
|
1120
|
+
rootPath: rootDir,
|
|
1121
|
+
boundaryLabel: "SSH sandbox upload tree"
|
|
1122
|
+
});
|
|
1123
|
+
} catch (error) {
|
|
1124
|
+
const relativePath = path.relative(rootDir, entryPath).split(path.sep).join("/");
|
|
1125
|
+
throw new Error(`SSH sandbox upload refuses symlink escaping the workspace: ${relativePath}`, { cause: error });
|
|
1126
|
+
}
|
|
1127
|
+
continue;
|
|
1128
|
+
}
|
|
1129
|
+
if (entry.isDirectory()) await walkDirectory(entryPath);
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
function parseSshConfigHost(configText) {
|
|
1134
|
+
return configText.match(/^\s*Host\s+(\S+)/m)?.[1]?.trim() || null;
|
|
1135
|
+
}
|
|
1136
|
+
function resolveSshTmpRoot() {
|
|
1137
|
+
return path.resolve(resolvePreferredKaijiBotTmpDir() ?? os.tmpdir());
|
|
1138
|
+
}
|
|
1139
|
+
function resolveOptionalLocalPath(value) {
|
|
1140
|
+
const trimmed = value?.trim();
|
|
1141
|
+
return trimmed ? resolveUserPath(trimmed) : void 0;
|
|
1142
|
+
}
|
|
1143
|
+
async function writeSecretMaterial(dir, filename, contents) {
|
|
1144
|
+
const pathname = path.join(dir, filename);
|
|
1145
|
+
await fs$1.writeFile(pathname, normalizeInlineSshMaterial(contents, filename), {
|
|
1146
|
+
encoding: "utf8",
|
|
1147
|
+
mode: 384
|
|
1148
|
+
});
|
|
1149
|
+
await fs$1.chmod(pathname, 384);
|
|
1150
|
+
return pathname;
|
|
1151
|
+
}
|
|
1152
|
+
//#endregion
|
|
1153
|
+
//#region src/agents/sandbox/ssh-backend.ts
|
|
1154
|
+
const sshSandboxBackendManager = {
|
|
1155
|
+
async describeRuntime({ entry, config, agentId }) {
|
|
1156
|
+
const cfg = resolveSandboxConfigForAgent(config, agentId);
|
|
1157
|
+
if (cfg.backend !== "ssh" || !cfg.ssh.target) return {
|
|
1158
|
+
running: false,
|
|
1159
|
+
actualConfigLabel: cfg.ssh.target,
|
|
1160
|
+
configLabelMatch: false
|
|
1161
|
+
};
|
|
1162
|
+
const runtimePaths = resolveSshRuntimePaths(cfg.ssh.workspaceRoot, entry.sessionKey);
|
|
1163
|
+
const session = await createSshSandboxSessionFromSettings({
|
|
1164
|
+
...cfg.ssh,
|
|
1165
|
+
target: cfg.ssh.target
|
|
1166
|
+
});
|
|
1167
|
+
try {
|
|
1168
|
+
return {
|
|
1169
|
+
running: (await runSshSandboxCommand({
|
|
1170
|
+
session,
|
|
1171
|
+
remoteCommand: buildRemoteCommand([
|
|
1172
|
+
"/bin/sh",
|
|
1173
|
+
"-c",
|
|
1174
|
+
"if [ -d \"$1\" ]; then printf \"1\\n\"; else printf \"0\\n\"; fi",
|
|
1175
|
+
"kaijibot-sandbox-check",
|
|
1176
|
+
runtimePaths.runtimeRootDir
|
|
1177
|
+
])
|
|
1178
|
+
})).stdout.toString("utf8").trim() === "1",
|
|
1179
|
+
actualConfigLabel: cfg.ssh.target,
|
|
1180
|
+
configLabelMatch: entry.image === cfg.ssh.target
|
|
1181
|
+
};
|
|
1182
|
+
} finally {
|
|
1183
|
+
await disposeSshSandboxSession(session);
|
|
1184
|
+
}
|
|
1185
|
+
},
|
|
1186
|
+
async removeRuntime({ entry, config, agentId }) {
|
|
1187
|
+
const cfg = resolveSandboxConfigForAgent(config, agentId);
|
|
1188
|
+
if (cfg.backend !== "ssh" || !cfg.ssh.target) return;
|
|
1189
|
+
const runtimePaths = resolveSshRuntimePaths(cfg.ssh.workspaceRoot, entry.sessionKey);
|
|
1190
|
+
const session = await createSshSandboxSessionFromSettings({
|
|
1191
|
+
...cfg.ssh,
|
|
1192
|
+
target: cfg.ssh.target
|
|
1193
|
+
});
|
|
1194
|
+
try {
|
|
1195
|
+
await runSshSandboxCommand({
|
|
1196
|
+
session,
|
|
1197
|
+
remoteCommand: buildRemoteCommand([
|
|
1198
|
+
"/bin/sh",
|
|
1199
|
+
"-c",
|
|
1200
|
+
"rm -rf -- \"$1\"",
|
|
1201
|
+
"kaijibot-sandbox-remove",
|
|
1202
|
+
runtimePaths.runtimeRootDir
|
|
1203
|
+
]),
|
|
1204
|
+
allowFailure: true
|
|
1205
|
+
});
|
|
1206
|
+
} finally {
|
|
1207
|
+
await disposeSshSandboxSession(session);
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
};
|
|
1211
|
+
async function createSshSandboxBackend(params) {
|
|
1212
|
+
if ((params.cfg.docker.binds?.length ?? 0) > 0) throw new Error("SSH sandbox backend does not support sandbox.docker.binds.");
|
|
1213
|
+
const target = params.cfg.ssh.target;
|
|
1214
|
+
if (!target) throw new Error("Sandbox backend \"ssh\" requires agents.defaults.sandbox.ssh.target.");
|
|
1215
|
+
return new SshSandboxBackendImpl({
|
|
1216
|
+
createParams: params,
|
|
1217
|
+
target,
|
|
1218
|
+
runtimePaths: resolveSshRuntimePaths(params.cfg.ssh.workspaceRoot, params.scopeKey)
|
|
1219
|
+
}).asHandle();
|
|
1220
|
+
}
|
|
1221
|
+
var SshSandboxBackendImpl = class {
|
|
1222
|
+
constructor(params) {
|
|
1223
|
+
this.params = params;
|
|
1224
|
+
this.ensurePromise = null;
|
|
1225
|
+
}
|
|
1226
|
+
asHandle() {
|
|
1227
|
+
return {
|
|
1228
|
+
id: "ssh",
|
|
1229
|
+
runtimeId: this.params.runtimePaths.runtimeId,
|
|
1230
|
+
runtimeLabel: this.params.runtimePaths.runtimeId,
|
|
1231
|
+
workdir: this.params.runtimePaths.remoteWorkspaceDir,
|
|
1232
|
+
env: this.params.createParams.cfg.docker.env,
|
|
1233
|
+
configLabel: this.params.target,
|
|
1234
|
+
configLabelKind: "Target",
|
|
1235
|
+
remoteWorkspaceDir: this.params.runtimePaths.remoteWorkspaceDir,
|
|
1236
|
+
remoteAgentWorkspaceDir: this.params.runtimePaths.remoteAgentWorkspaceDir,
|
|
1237
|
+
buildExecSpec: async ({ command, workdir, env, usePty }) => {
|
|
1238
|
+
await this.ensureRuntime();
|
|
1239
|
+
const sshSession = await this.createSession();
|
|
1240
|
+
return {
|
|
1241
|
+
argv: buildSshSandboxArgv({
|
|
1242
|
+
session: sshSession,
|
|
1243
|
+
remoteCommand: buildExecRemoteCommand({
|
|
1244
|
+
command,
|
|
1245
|
+
workdir: workdir ?? this.params.runtimePaths.remoteWorkspaceDir,
|
|
1246
|
+
env
|
|
1247
|
+
}),
|
|
1248
|
+
tty: usePty
|
|
1249
|
+
}),
|
|
1250
|
+
env: sanitizeEnvVars(process.env).allowed,
|
|
1251
|
+
stdinMode: "pipe-open",
|
|
1252
|
+
finalizeToken: { sshSession }
|
|
1253
|
+
};
|
|
1254
|
+
},
|
|
1255
|
+
finalizeExec: async ({ token }) => {
|
|
1256
|
+
const sshSession = token?.sshSession;
|
|
1257
|
+
if (sshSession) await disposeSshSandboxSession(sshSession);
|
|
1258
|
+
},
|
|
1259
|
+
runShellCommand: async (command) => await this.runRemoteShellScript(command),
|
|
1260
|
+
createFsBridge: ({ sandbox }) => createRemoteShellSandboxFsBridge({
|
|
1261
|
+
sandbox,
|
|
1262
|
+
runtime: this.asHandle()
|
|
1263
|
+
}),
|
|
1264
|
+
runRemoteShellScript: async (command) => await this.runRemoteShellScript(command)
|
|
1265
|
+
};
|
|
1266
|
+
}
|
|
1267
|
+
async createSession() {
|
|
1268
|
+
return await createSshSandboxSessionFromSettings({
|
|
1269
|
+
...this.params.createParams.cfg.ssh,
|
|
1270
|
+
target: this.params.target
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
async ensureRuntime() {
|
|
1274
|
+
if (this.ensurePromise) return await this.ensurePromise;
|
|
1275
|
+
this.ensurePromise = this.ensureRuntimeInner();
|
|
1276
|
+
try {
|
|
1277
|
+
await this.ensurePromise;
|
|
1278
|
+
} catch (error) {
|
|
1279
|
+
this.ensurePromise = null;
|
|
1280
|
+
throw error;
|
|
1281
|
+
}
|
|
1282
|
+
}
|
|
1283
|
+
async ensureRuntimeInner() {
|
|
1284
|
+
const session = await this.createSession();
|
|
1285
|
+
try {
|
|
1286
|
+
if ((await runSshSandboxCommand({
|
|
1287
|
+
session,
|
|
1288
|
+
remoteCommand: buildRemoteCommand([
|
|
1289
|
+
"/bin/sh",
|
|
1290
|
+
"-c",
|
|
1291
|
+
"if [ -d \"$1\" ]; then printf \"1\\n\"; else printf \"0\\n\"; fi",
|
|
1292
|
+
"kaijibot-sandbox-check",
|
|
1293
|
+
this.params.runtimePaths.runtimeRootDir
|
|
1294
|
+
])
|
|
1295
|
+
})).stdout.toString("utf8").trim() === "1") return;
|
|
1296
|
+
await this.replaceRemoteDirectoryFromLocal(session, this.params.createParams.workspaceDir, this.params.runtimePaths.remoteWorkspaceDir);
|
|
1297
|
+
if (this.params.createParams.cfg.workspaceAccess !== "none" && path.resolve(this.params.createParams.agentWorkspaceDir) !== path.resolve(this.params.createParams.workspaceDir)) await this.replaceRemoteDirectoryFromLocal(session, this.params.createParams.agentWorkspaceDir, this.params.runtimePaths.remoteAgentWorkspaceDir);
|
|
1298
|
+
} finally {
|
|
1299
|
+
await disposeSshSandboxSession(session);
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
async replaceRemoteDirectoryFromLocal(session, localDir, remoteDir) {
|
|
1303
|
+
await runSshSandboxCommand({
|
|
1304
|
+
session,
|
|
1305
|
+
remoteCommand: buildRemoteCommand([
|
|
1306
|
+
"/bin/sh",
|
|
1307
|
+
"-c",
|
|
1308
|
+
"mkdir -p -- \"$1\" && find \"$1\" -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +",
|
|
1309
|
+
"kaijibot-sandbox-clear",
|
|
1310
|
+
remoteDir
|
|
1311
|
+
])
|
|
1312
|
+
});
|
|
1313
|
+
await uploadDirectoryToSshTarget({
|
|
1314
|
+
session,
|
|
1315
|
+
localDir,
|
|
1316
|
+
remoteDir
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
async runRemoteShellScript(params) {
|
|
1320
|
+
await this.ensureRuntime();
|
|
1321
|
+
const session = await this.createSession();
|
|
1322
|
+
try {
|
|
1323
|
+
return await runSshSandboxCommand({
|
|
1324
|
+
session,
|
|
1325
|
+
remoteCommand: buildRemoteCommand([
|
|
1326
|
+
"/bin/sh",
|
|
1327
|
+
"-c",
|
|
1328
|
+
params.script,
|
|
1329
|
+
"kaijibot-sandbox-fs",
|
|
1330
|
+
...params.args ?? []
|
|
1331
|
+
]),
|
|
1332
|
+
stdin: params.stdin,
|
|
1333
|
+
allowFailure: params.allowFailure,
|
|
1334
|
+
signal: params.signal
|
|
1335
|
+
});
|
|
1336
|
+
} finally {
|
|
1337
|
+
await disposeSshSandboxSession(session);
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
};
|
|
1341
|
+
function resolveSshRuntimePaths(workspaceRoot, scopeKey) {
|
|
1342
|
+
const runtimeId = buildSshSandboxRuntimeId(scopeKey);
|
|
1343
|
+
const runtimeRootDir = path.posix.join(workspaceRoot, runtimeId);
|
|
1344
|
+
return {
|
|
1345
|
+
runtimeId,
|
|
1346
|
+
runtimeRootDir,
|
|
1347
|
+
remoteWorkspaceDir: path.posix.join(runtimeRootDir, "workspace"),
|
|
1348
|
+
remoteAgentWorkspaceDir: path.posix.join(runtimeRootDir, "agent")
|
|
1349
|
+
};
|
|
1350
|
+
}
|
|
1351
|
+
function buildSshSandboxRuntimeId(scopeKey) {
|
|
1352
|
+
const trimmed = scopeKey.trim() || "session";
|
|
1353
|
+
const safe = normalizeLowercaseStringOrEmpty(trimmed).replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 32);
|
|
1354
|
+
const hash = Array.from(trimmed).reduce((acc, char) => (acc * 33 ^ char.charCodeAt(0)) >>> 0, 5381);
|
|
1355
|
+
return `kaijibot-ssh-${safe || "session"}-${hash.toString(16).slice(0, 8)}`;
|
|
1356
|
+
}
|
|
1357
|
+
//#endregion
|
|
1358
|
+
//#region src/agents/sandbox/backend.ts
|
|
1359
|
+
const SANDBOX_BACKEND_FACTORIES = /* @__PURE__ */ new Map();
|
|
1360
|
+
function normalizeSandboxBackendId(id) {
|
|
1361
|
+
const normalized = normalizeOptionalLowercaseString(id);
|
|
1362
|
+
if (!normalized) throw new Error("Sandbox backend id must not be empty.");
|
|
1363
|
+
return normalized;
|
|
1364
|
+
}
|
|
1365
|
+
function registerSandboxBackend(id, registration) {
|
|
1366
|
+
const normalizedId = normalizeSandboxBackendId(id);
|
|
1367
|
+
const resolved = typeof registration === "function" ? { factory: registration } : registration;
|
|
1368
|
+
const previous = SANDBOX_BACKEND_FACTORIES.get(normalizedId);
|
|
1369
|
+
SANDBOX_BACKEND_FACTORIES.set(normalizedId, resolved);
|
|
1370
|
+
return () => {
|
|
1371
|
+
if (previous) {
|
|
1372
|
+
SANDBOX_BACKEND_FACTORIES.set(normalizedId, previous);
|
|
1373
|
+
return;
|
|
1374
|
+
}
|
|
1375
|
+
SANDBOX_BACKEND_FACTORIES.delete(normalizedId);
|
|
1376
|
+
};
|
|
1377
|
+
}
|
|
1378
|
+
function getSandboxBackendFactory(id) {
|
|
1379
|
+
return SANDBOX_BACKEND_FACTORIES.get(normalizeSandboxBackendId(id))?.factory ?? null;
|
|
1380
|
+
}
|
|
1381
|
+
function getSandboxBackendManager(id) {
|
|
1382
|
+
return SANDBOX_BACKEND_FACTORIES.get(normalizeSandboxBackendId(id))?.manager ?? null;
|
|
1383
|
+
}
|
|
1384
|
+
function requireSandboxBackendFactory(id) {
|
|
1385
|
+
const factory = getSandboxBackendFactory(id);
|
|
1386
|
+
if (factory) return factory;
|
|
1387
|
+
throw new Error([`Sandbox backend "${id}" is not registered.`, "Load the plugin that provides it, or set agents.defaults.sandbox.backend=docker."].join("\n"));
|
|
1388
|
+
}
|
|
1389
|
+
registerSandboxBackend("docker", {
|
|
1390
|
+
factory: createDockerSandboxBackend,
|
|
1391
|
+
manager: dockerSandboxBackendManager
|
|
1392
|
+
});
|
|
1393
|
+
registerSandboxBackend("ssh", {
|
|
1394
|
+
factory: createSshSandboxBackend,
|
|
1395
|
+
manager: sshSandboxBackendManager
|
|
1396
|
+
});
|
|
1397
|
+
//#endregion
|
|
1398
|
+
//#region src/plugin-sdk/browser-bridge.ts
|
|
1399
|
+
function loadFacadeModule() {
|
|
1400
|
+
return loadActivatedBundledPluginPublicSurfaceModuleSync({
|
|
1401
|
+
dirName: "browser",
|
|
1402
|
+
artifactBasename: "runtime-api.js"
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
async function startBrowserBridgeServer(params) {
|
|
1406
|
+
return await loadFacadeModule().startBrowserBridgeServer(params);
|
|
1407
|
+
}
|
|
1408
|
+
async function stopBrowserBridgeServer(server) {
|
|
1409
|
+
await loadFacadeModule().stopBrowserBridgeServer(server);
|
|
1410
|
+
}
|
|
1411
|
+
//#endregion
|
|
1412
|
+
//#region src/agents/sandbox/browser-bridges.ts
|
|
1413
|
+
const BROWSER_BRIDGES = /* @__PURE__ */ new Map();
|
|
1414
|
+
//#endregion
|
|
1415
|
+
//#region src/agents/sandbox/novnc-auth.ts
|
|
1416
|
+
const NOVNC_PASSWORD_ENV_KEY = "KAIJIBOT_BROWSER_NOVNC_PASSWORD";
|
|
1417
|
+
const NOVNC_TOKEN_TTL_MS = 60 * 1e3;
|
|
1418
|
+
const NOVNC_PASSWORD_LENGTH = 8;
|
|
1419
|
+
const NOVNC_PASSWORD_ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
1420
|
+
const NO_VNC_OBSERVER_TOKENS = /* @__PURE__ */ new Map();
|
|
1421
|
+
function pruneExpiredNoVncObserverTokens(now) {
|
|
1422
|
+
for (const [token, entry] of NO_VNC_OBSERVER_TOKENS) if (entry.expiresAt <= now) NO_VNC_OBSERVER_TOKENS.delete(token);
|
|
1423
|
+
}
|
|
1424
|
+
function isNoVncEnabled(params) {
|
|
1425
|
+
return params.enableNoVnc && !params.headless;
|
|
1426
|
+
}
|
|
1427
|
+
function generateNoVncPassword() {
|
|
1428
|
+
let out = "";
|
|
1429
|
+
for (let i = 0; i < NOVNC_PASSWORD_LENGTH; i += 1) out += NOVNC_PASSWORD_ALPHABET[crypto.randomInt(0, 62)];
|
|
1430
|
+
return out;
|
|
1431
|
+
}
|
|
1432
|
+
function issueNoVncObserverToken(params) {
|
|
1433
|
+
const now = params.nowMs ?? Date.now();
|
|
1434
|
+
pruneExpiredNoVncObserverTokens(now);
|
|
1435
|
+
const token = crypto.randomBytes(24).toString("hex");
|
|
1436
|
+
NO_VNC_OBSERVER_TOKENS.set(token, {
|
|
1437
|
+
noVncPort: params.noVncPort,
|
|
1438
|
+
password: normalizeOptionalString(params.password),
|
|
1439
|
+
expiresAt: now + Math.max(1, params.ttlMs ?? NOVNC_TOKEN_TTL_MS)
|
|
1440
|
+
});
|
|
1441
|
+
return token;
|
|
1442
|
+
}
|
|
1443
|
+
function consumeNoVncObserverToken(token, nowMs) {
|
|
1444
|
+
const now = nowMs ?? Date.now();
|
|
1445
|
+
pruneExpiredNoVncObserverTokens(now);
|
|
1446
|
+
const normalized = token.trim();
|
|
1447
|
+
if (!normalized) return null;
|
|
1448
|
+
const entry = NO_VNC_OBSERVER_TOKENS.get(normalized);
|
|
1449
|
+
if (!entry) return null;
|
|
1450
|
+
NO_VNC_OBSERVER_TOKENS.delete(normalized);
|
|
1451
|
+
if (entry.expiresAt <= now) return null;
|
|
1452
|
+
return {
|
|
1453
|
+
noVncPort: entry.noVncPort,
|
|
1454
|
+
password: entry.password
|
|
1455
|
+
};
|
|
1456
|
+
}
|
|
1457
|
+
function buildNoVncObserverTokenUrl(baseUrl, token) {
|
|
1458
|
+
return `${baseUrl}/sandbox/novnc?${new URLSearchParams({ token }).toString()}`;
|
|
1459
|
+
}
|
|
1460
|
+
//#endregion
|
|
1461
|
+
//#region src/agents/sandbox/browser.ts
|
|
1462
|
+
const HOT_BROWSER_WINDOW_MS = 300 * 1e3;
|
|
1463
|
+
const CDP_SOURCE_RANGE_ENV_KEY = "KAIJIBOT_BROWSER_CDP_SOURCE_RANGE";
|
|
1464
|
+
async function waitForSandboxCdp(params) {
|
|
1465
|
+
const deadline = Date.now() + Math.max(0, params.timeoutMs);
|
|
1466
|
+
const url = `http://127.0.0.1:${params.cdpPort}/json/version`;
|
|
1467
|
+
while (Date.now() < deadline) {
|
|
1468
|
+
try {
|
|
1469
|
+
const ctrl = new AbortController();
|
|
1470
|
+
const t = setTimeout(ctrl.abort.bind(ctrl), 1e3);
|
|
1471
|
+
try {
|
|
1472
|
+
if ((await fetch(url, { signal: ctrl.signal })).ok) return true;
|
|
1473
|
+
} finally {
|
|
1474
|
+
clearTimeout(t);
|
|
1475
|
+
}
|
|
1476
|
+
} catch {}
|
|
1477
|
+
await new Promise((r) => setTimeout(r, 150));
|
|
1478
|
+
}
|
|
1479
|
+
return false;
|
|
1480
|
+
}
|
|
1481
|
+
function buildSandboxBrowserResolvedConfig(params) {
|
|
1482
|
+
const cdpHost = "127.0.0.1";
|
|
1483
|
+
const cdpPortRange = deriveDefaultBrowserCdpPortRange(params.controlPort);
|
|
1484
|
+
return {
|
|
1485
|
+
enabled: true,
|
|
1486
|
+
evaluateEnabled: params.evaluateEnabled,
|
|
1487
|
+
controlPort: params.controlPort,
|
|
1488
|
+
cdpProtocol: "http",
|
|
1489
|
+
cdpHost,
|
|
1490
|
+
cdpIsLoopback: true,
|
|
1491
|
+
cdpPortRangeStart: cdpPortRange.start,
|
|
1492
|
+
cdpPortRangeEnd: cdpPortRange.end,
|
|
1493
|
+
remoteCdpTimeoutMs: 1500,
|
|
1494
|
+
remoteCdpHandshakeTimeoutMs: 3e3,
|
|
1495
|
+
color: DEFAULT_KAIJIBOT_BROWSER_COLOR,
|
|
1496
|
+
executablePath: void 0,
|
|
1497
|
+
headless: params.headless,
|
|
1498
|
+
noSandbox: false,
|
|
1499
|
+
attachOnly: true,
|
|
1500
|
+
defaultProfile: DEFAULT_KAIJIBOT_BROWSER_PROFILE_NAME,
|
|
1501
|
+
extraArgs: [],
|
|
1502
|
+
profiles: { [DEFAULT_KAIJIBOT_BROWSER_PROFILE_NAME]: {
|
|
1503
|
+
cdpPort: params.cdpPort,
|
|
1504
|
+
color: DEFAULT_KAIJIBOT_BROWSER_COLOR
|
|
1505
|
+
} }
|
|
1506
|
+
};
|
|
1507
|
+
}
|
|
1508
|
+
async function ensureSandboxBrowserImage(image) {
|
|
1509
|
+
if ((await execDocker([
|
|
1510
|
+
"image",
|
|
1511
|
+
"inspect",
|
|
1512
|
+
image
|
|
1513
|
+
], { allowFailure: true })).code === 0) return;
|
|
1514
|
+
throw new Error(`Sandbox browser image not found: ${image}. Build it with scripts/sandbox-browser-setup.sh.`);
|
|
1515
|
+
}
|
|
1516
|
+
async function ensureDockerNetwork(network, opts) {
|
|
1517
|
+
validateNetworkMode(network, { allowContainerNamespaceJoin: opts?.allowContainerNamespaceJoin === true });
|
|
1518
|
+
const normalized = normalizeOptionalLowercaseString(network) ?? "";
|
|
1519
|
+
if (!normalized || normalized === "bridge" || normalized === "none") return;
|
|
1520
|
+
if ((await execDocker([
|
|
1521
|
+
"network",
|
|
1522
|
+
"inspect",
|
|
1523
|
+
network
|
|
1524
|
+
], { allowFailure: true })).code === 0) return;
|
|
1525
|
+
await execDocker([
|
|
1526
|
+
"network",
|
|
1527
|
+
"create",
|
|
1528
|
+
"--driver",
|
|
1529
|
+
"bridge",
|
|
1530
|
+
network
|
|
1531
|
+
]);
|
|
1532
|
+
}
|
|
1533
|
+
async function ensureSandboxBrowser(params) {
|
|
1534
|
+
if (!params.cfg.browser.enabled) return null;
|
|
1535
|
+
if (!isToolAllowed(params.cfg.tools, "browser")) return null;
|
|
1536
|
+
const slug = params.cfg.scope === "shared" ? "shared" : slugifySessionKey(params.scopeKey);
|
|
1537
|
+
const containerName = `${params.cfg.browser.containerPrefix}${slug}`.slice(0, 63);
|
|
1538
|
+
const state = await dockerContainerState(containerName);
|
|
1539
|
+
const browserImage = params.cfg.browser.image ?? "kaijibot-sandbox-browser:bookworm-slim";
|
|
1540
|
+
const cdpSourceRange = normalizeOptionalString(params.cfg.browser.cdpSourceRange);
|
|
1541
|
+
const browserDockerCfg = resolveSandboxBrowserDockerCreateConfig({
|
|
1542
|
+
docker: params.cfg.docker,
|
|
1543
|
+
browser: {
|
|
1544
|
+
...params.cfg.browser,
|
|
1545
|
+
image: browserImage
|
|
1546
|
+
}
|
|
1547
|
+
});
|
|
1548
|
+
const expectedHash = computeSandboxBrowserConfigHash({
|
|
1549
|
+
docker: browserDockerCfg,
|
|
1550
|
+
browser: {
|
|
1551
|
+
cdpPort: params.cfg.browser.cdpPort,
|
|
1552
|
+
vncPort: params.cfg.browser.vncPort,
|
|
1553
|
+
noVncPort: params.cfg.browser.noVncPort,
|
|
1554
|
+
headless: params.cfg.browser.headless,
|
|
1555
|
+
enableNoVnc: params.cfg.browser.enableNoVnc,
|
|
1556
|
+
cdpSourceRange
|
|
1557
|
+
},
|
|
1558
|
+
securityEpoch: SANDBOX_BROWSER_SECURITY_HASH_EPOCH,
|
|
1559
|
+
workspaceAccess: params.cfg.workspaceAccess,
|
|
1560
|
+
workspaceDir: params.workspaceDir,
|
|
1561
|
+
agentWorkspaceDir: params.agentWorkspaceDir,
|
|
1562
|
+
mountFormatVersion: 2
|
|
1563
|
+
});
|
|
1564
|
+
const now = Date.now();
|
|
1565
|
+
let hasContainer = state.exists;
|
|
1566
|
+
let running = state.running;
|
|
1567
|
+
let currentHash = null;
|
|
1568
|
+
let hashMismatch = false;
|
|
1569
|
+
const noVncEnabled = isNoVncEnabled(params.cfg.browser);
|
|
1570
|
+
let noVncPassword;
|
|
1571
|
+
if (hasContainer) {
|
|
1572
|
+
if (noVncEnabled) noVncPassword = await readDockerContainerEnvVar(containerName, "KAIJIBOT_BROWSER_NOVNC_PASSWORD") ?? void 0;
|
|
1573
|
+
const registryEntry = (await readBrowserRegistry()).entries.find((entry) => entry.containerName === containerName);
|
|
1574
|
+
currentHash = await readDockerContainerLabel(containerName, "kaijibot.configHash");
|
|
1575
|
+
hashMismatch = !currentHash || currentHash !== expectedHash;
|
|
1576
|
+
if (!currentHash) {
|
|
1577
|
+
currentHash = registryEntry?.configHash ?? null;
|
|
1578
|
+
hashMismatch = !currentHash || currentHash !== expectedHash;
|
|
1579
|
+
}
|
|
1580
|
+
if (hashMismatch) {
|
|
1581
|
+
const lastUsedAtMs = registryEntry?.lastUsedAtMs;
|
|
1582
|
+
if (running && (typeof lastUsedAtMs !== "number" || now - lastUsedAtMs < HOT_BROWSER_WINDOW_MS)) {
|
|
1583
|
+
const hint = (() => {
|
|
1584
|
+
if (params.cfg.scope === "session") return `kaijibot sandbox recreate --browser --session ${params.scopeKey}`;
|
|
1585
|
+
if (params.cfg.scope === "agent") return `kaijibot sandbox recreate --browser --agent ${resolveSandboxAgentId(params.scopeKey) ?? "main"}`;
|
|
1586
|
+
return "kaijibot sandbox recreate --browser --all";
|
|
1587
|
+
})();
|
|
1588
|
+
defaultRuntime.log(`Sandbox browser config changed for ${containerName} (recently used). Recreate to apply: ${hint}`);
|
|
1589
|
+
} else {
|
|
1590
|
+
await execDocker([
|
|
1591
|
+
"rm",
|
|
1592
|
+
"-f",
|
|
1593
|
+
containerName
|
|
1594
|
+
], { allowFailure: true });
|
|
1595
|
+
hasContainer = false;
|
|
1596
|
+
running = false;
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
if (!hasContainer) {
|
|
1601
|
+
if (noVncEnabled) noVncPassword = generateNoVncPassword();
|
|
1602
|
+
await ensureDockerNetwork(browserDockerCfg.network, { allowContainerNamespaceJoin: browserDockerCfg.dangerouslyAllowContainerNamespaceJoin === true });
|
|
1603
|
+
await ensureSandboxBrowserImage(browserImage);
|
|
1604
|
+
const args = buildSandboxCreateArgs({
|
|
1605
|
+
name: containerName,
|
|
1606
|
+
cfg: browserDockerCfg,
|
|
1607
|
+
scopeKey: params.scopeKey,
|
|
1608
|
+
labels: {
|
|
1609
|
+
"kaijibot.sandboxBrowser": "1",
|
|
1610
|
+
"kaijibot.browserConfigEpoch": SANDBOX_BROWSER_SECURITY_HASH_EPOCH
|
|
1611
|
+
},
|
|
1612
|
+
configHash: expectedHash,
|
|
1613
|
+
includeBinds: false,
|
|
1614
|
+
bindSourceRoots: [params.workspaceDir, params.agentWorkspaceDir]
|
|
1615
|
+
});
|
|
1616
|
+
appendWorkspaceMountArgs({
|
|
1617
|
+
args,
|
|
1618
|
+
workspaceDir: params.workspaceDir,
|
|
1619
|
+
agentWorkspaceDir: params.agentWorkspaceDir,
|
|
1620
|
+
workdir: params.cfg.docker.workdir,
|
|
1621
|
+
workspaceAccess: params.cfg.workspaceAccess
|
|
1622
|
+
});
|
|
1623
|
+
if (browserDockerCfg.binds?.length) for (const bind of browserDockerCfg.binds) args.push("-v", bind);
|
|
1624
|
+
args.push("-p", `127.0.0.1::${params.cfg.browser.cdpPort}`);
|
|
1625
|
+
if (noVncEnabled) args.push("-p", `127.0.0.1::${params.cfg.browser.noVncPort}`);
|
|
1626
|
+
args.push("-e", `KAIJIBOT_BROWSER_HEADLESS=${params.cfg.browser.headless ? "1" : "0"}`);
|
|
1627
|
+
args.push("-e", `KAIJIBOT_BROWSER_ENABLE_NOVNC=${params.cfg.browser.enableNoVnc ? "1" : "0"}`);
|
|
1628
|
+
args.push("-e", `KAIJIBOT_BROWSER_CDP_PORT=${params.cfg.browser.cdpPort}`);
|
|
1629
|
+
if (cdpSourceRange) args.push("-e", `${CDP_SOURCE_RANGE_ENV_KEY}=${cdpSourceRange}`);
|
|
1630
|
+
args.push("-e", `KAIJIBOT_BROWSER_VNC_PORT=${params.cfg.browser.vncPort}`);
|
|
1631
|
+
args.push("-e", `KAIJIBOT_BROWSER_NOVNC_PORT=${params.cfg.browser.noVncPort}`);
|
|
1632
|
+
args.push("-e", "KAIJIBOT_BROWSER_NO_SANDBOX=1");
|
|
1633
|
+
if (noVncEnabled && noVncPassword) args.push("-e", `${NOVNC_PASSWORD_ENV_KEY}=${noVncPassword}`);
|
|
1634
|
+
args.push(browserImage);
|
|
1635
|
+
await execDocker(args);
|
|
1636
|
+
await execDocker(["start", containerName]);
|
|
1637
|
+
} else if (!running) await execDocker(["start", containerName]);
|
|
1638
|
+
const mappedCdp = await readDockerPort(containerName, params.cfg.browser.cdpPort);
|
|
1639
|
+
if (!mappedCdp) throw new Error(`Failed to resolve CDP port mapping for ${containerName}.`);
|
|
1640
|
+
const mappedNoVnc = noVncEnabled ? await readDockerPort(containerName, params.cfg.browser.noVncPort) : null;
|
|
1641
|
+
if (noVncEnabled && !noVncPassword) noVncPassword = await readDockerContainerEnvVar(containerName, "KAIJIBOT_BROWSER_NOVNC_PASSWORD") ?? void 0;
|
|
1642
|
+
const existing = BROWSER_BRIDGES.get(params.scopeKey);
|
|
1643
|
+
const existingProfile = existing ? resolveProfile(existing.bridge.state.resolved, DEFAULT_KAIJIBOT_BROWSER_PROFILE_NAME) : null;
|
|
1644
|
+
let desiredAuthToken = normalizeOptionalString(params.bridgeAuth?.token);
|
|
1645
|
+
let desiredAuthPassword = normalizeOptionalString(params.bridgeAuth?.password);
|
|
1646
|
+
if (!desiredAuthToken && !desiredAuthPassword) {
|
|
1647
|
+
desiredAuthToken = existing?.authToken;
|
|
1648
|
+
desiredAuthPassword = existing?.authPassword;
|
|
1649
|
+
if (!desiredAuthToken && !desiredAuthPassword) desiredAuthToken = crypto.randomBytes(24).toString("hex");
|
|
1650
|
+
}
|
|
1651
|
+
const shouldReuse = existing && existing.containerName === containerName && existingProfile?.cdpPort === mappedCdp;
|
|
1652
|
+
const authMatches = !existing || existing.authToken === desiredAuthToken && existing.authPassword === desiredAuthPassword;
|
|
1653
|
+
if (existing && !shouldReuse) {
|
|
1654
|
+
await stopBrowserBridgeServer(existing.bridge.server).catch(() => void 0);
|
|
1655
|
+
BROWSER_BRIDGES.delete(params.scopeKey);
|
|
1656
|
+
}
|
|
1657
|
+
if (existing && shouldReuse && !authMatches) {
|
|
1658
|
+
await stopBrowserBridgeServer(existing.bridge.server).catch(() => void 0);
|
|
1659
|
+
BROWSER_BRIDGES.delete(params.scopeKey);
|
|
1660
|
+
}
|
|
1661
|
+
const bridge = (() => {
|
|
1662
|
+
if (shouldReuse && authMatches && existing) return existing.bridge;
|
|
1663
|
+
return null;
|
|
1664
|
+
})();
|
|
1665
|
+
const ensureBridge = async () => {
|
|
1666
|
+
if (bridge) return bridge;
|
|
1667
|
+
const onEnsureAttachTarget = params.cfg.browser.autoStart ? async () => {
|
|
1668
|
+
const currentState = await dockerContainerState(containerName);
|
|
1669
|
+
if (currentState.exists && !currentState.running) await execDocker(["start", containerName]);
|
|
1670
|
+
if (!await waitForSandboxCdp({
|
|
1671
|
+
cdpPort: mappedCdp,
|
|
1672
|
+
timeoutMs: params.cfg.browser.autoStartTimeoutMs
|
|
1673
|
+
})) throw new Error(`Sandbox browser CDP did not become reachable on 127.0.0.1:${mappedCdp} within ${params.cfg.browser.autoStartTimeoutMs}ms.`);
|
|
1674
|
+
} : void 0;
|
|
1675
|
+
return await startBrowserBridgeServer({
|
|
1676
|
+
resolved: buildSandboxBrowserResolvedConfig({
|
|
1677
|
+
controlPort: 0,
|
|
1678
|
+
cdpPort: mappedCdp,
|
|
1679
|
+
headless: params.cfg.browser.headless,
|
|
1680
|
+
evaluateEnabled: params.evaluateEnabled ?? true
|
|
1681
|
+
}),
|
|
1682
|
+
authToken: desiredAuthToken,
|
|
1683
|
+
authPassword: desiredAuthPassword,
|
|
1684
|
+
onEnsureAttachTarget,
|
|
1685
|
+
resolveSandboxNoVncToken: consumeNoVncObserverToken
|
|
1686
|
+
});
|
|
1687
|
+
};
|
|
1688
|
+
const resolvedBridge = await ensureBridge();
|
|
1689
|
+
if (!shouldReuse || !authMatches) BROWSER_BRIDGES.set(params.scopeKey, {
|
|
1690
|
+
bridge: resolvedBridge,
|
|
1691
|
+
containerName,
|
|
1692
|
+
authToken: desiredAuthToken,
|
|
1693
|
+
authPassword: desiredAuthPassword
|
|
1694
|
+
});
|
|
1695
|
+
await updateBrowserRegistry({
|
|
1696
|
+
containerName,
|
|
1697
|
+
sessionKey: params.scopeKey,
|
|
1698
|
+
createdAtMs: now,
|
|
1699
|
+
lastUsedAtMs: now,
|
|
1700
|
+
image: browserImage,
|
|
1701
|
+
configHash: hashMismatch && running ? currentHash ?? void 0 : expectedHash,
|
|
1702
|
+
cdpPort: mappedCdp,
|
|
1703
|
+
noVncPort: mappedNoVnc ?? void 0
|
|
1704
|
+
});
|
|
1705
|
+
const noVncUrl = mappedNoVnc && noVncEnabled ? (() => {
|
|
1706
|
+
const token = issueNoVncObserverToken({
|
|
1707
|
+
noVncPort: mappedNoVnc,
|
|
1708
|
+
password: noVncPassword
|
|
1709
|
+
});
|
|
1710
|
+
return buildNoVncObserverTokenUrl(resolvedBridge.baseUrl, token);
|
|
1711
|
+
})() : void 0;
|
|
1712
|
+
return {
|
|
1713
|
+
bridgeUrl: resolvedBridge.baseUrl,
|
|
1714
|
+
noVncUrl,
|
|
1715
|
+
containerName
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
//#endregion
|
|
1719
|
+
//#region src/agents/sandbox/fs-bridge-path-safety.ts
|
|
1720
|
+
var SandboxFsPathGuard = class {
|
|
1721
|
+
constructor(params) {
|
|
1722
|
+
this.mountsByContainer = params.mountsByContainer;
|
|
1723
|
+
this.runCommand = params.runCommand;
|
|
1724
|
+
}
|
|
1725
|
+
async assertPathChecks(checks) {
|
|
1726
|
+
for (const check of checks) await this.assertPathSafety(check.target, check.options);
|
|
1727
|
+
}
|
|
1728
|
+
async assertPathSafety(target, options) {
|
|
1729
|
+
const guarded = await this.openBoundaryWithinRequiredMount(target, options.action, {
|
|
1730
|
+
aliasPolicy: options.aliasPolicy,
|
|
1731
|
+
allowedType: options.allowedType
|
|
1732
|
+
});
|
|
1733
|
+
await this.assertGuardedPathSafety(target, options, guarded);
|
|
1734
|
+
}
|
|
1735
|
+
async openReadableFile(target) {
|
|
1736
|
+
const opened = await this.openBoundaryWithinRequiredMount(target, "read files");
|
|
1737
|
+
if (!opened.ok) throw opened.error instanceof Error ? opened.error : /* @__PURE__ */ new Error(`Sandbox boundary checks failed; cannot read files: ${target.containerPath}`);
|
|
1738
|
+
return opened;
|
|
1739
|
+
}
|
|
1740
|
+
resolveRequiredMount(containerPath, action) {
|
|
1741
|
+
const lexicalMount = this.resolveMountByContainerPath(containerPath);
|
|
1742
|
+
if (!lexicalMount) throw new Error(`Sandbox path escapes allowed mounts; cannot ${action}: ${containerPath}`);
|
|
1743
|
+
return lexicalMount;
|
|
1744
|
+
}
|
|
1745
|
+
finalizePinnedEntry(params) {
|
|
1746
|
+
const relativeParentPath = path.posix.relative(params.mount.containerRoot, params.parentPath);
|
|
1747
|
+
if (relativeParentPath.startsWith("..") || path.posix.isAbsolute(relativeParentPath)) throw new Error(`Sandbox path escapes allowed mounts; cannot ${params.action}: ${params.targetPath}`);
|
|
1748
|
+
return {
|
|
1749
|
+
mountRootPath: params.mount.containerRoot,
|
|
1750
|
+
relativeParentPath: relativeParentPath === "." ? "" : relativeParentPath,
|
|
1751
|
+
basename: params.basename
|
|
1752
|
+
};
|
|
1753
|
+
}
|
|
1754
|
+
async assertGuardedPathSafety(target, options, guarded) {
|
|
1755
|
+
if (!guarded.ok) {
|
|
1756
|
+
if (guarded.reason !== "path") {
|
|
1757
|
+
if (!(options.allowedType === "directory" && this.pathIsExistingDirectory(target.hostPath))) throw guarded.error instanceof Error ? guarded.error : /* @__PURE__ */ new Error(`Sandbox boundary checks failed; cannot ${options.action}: ${target.containerPath}`);
|
|
1758
|
+
}
|
|
1759
|
+
} else fs.closeSync(guarded.fd);
|
|
1760
|
+
const canonicalContainerPath = await this.resolveCanonicalContainerPath({
|
|
1761
|
+
containerPath: target.containerPath,
|
|
1762
|
+
allowFinalSymlinkForUnlink: options.aliasPolicy?.allowFinalSymlinkForUnlink === true
|
|
1763
|
+
});
|
|
1764
|
+
const canonicalMount = this.resolveRequiredMount(canonicalContainerPath, options.action);
|
|
1765
|
+
if (options.requireWritable && !canonicalMount.writable) throw new Error(`Sandbox path is read-only; cannot ${options.action}: ${target.containerPath}`);
|
|
1766
|
+
}
|
|
1767
|
+
async openBoundaryWithinRequiredMount(target, action, options) {
|
|
1768
|
+
const lexicalMount = this.resolveRequiredMount(target.containerPath, action);
|
|
1769
|
+
return await openBoundaryFile({
|
|
1770
|
+
absolutePath: target.hostPath,
|
|
1771
|
+
rootPath: lexicalMount.hostRoot,
|
|
1772
|
+
boundaryLabel: "sandbox mount root",
|
|
1773
|
+
aliasPolicy: options?.aliasPolicy,
|
|
1774
|
+
allowedType: options?.allowedType
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
resolvePinnedEntry(target, action) {
|
|
1778
|
+
const basename = path.posix.basename(target.containerPath);
|
|
1779
|
+
if (!basename || basename === "." || basename === "/") throw new Error(`Invalid sandbox entry target: ${target.containerPath}`);
|
|
1780
|
+
const parentPath = normalizeContainerPath$1(path.posix.dirname(target.containerPath));
|
|
1781
|
+
const mount = this.resolveRequiredMount(parentPath, action);
|
|
1782
|
+
return this.finalizePinnedEntry({
|
|
1783
|
+
mount,
|
|
1784
|
+
parentPath,
|
|
1785
|
+
basename,
|
|
1786
|
+
targetPath: target.containerPath,
|
|
1787
|
+
action
|
|
1788
|
+
});
|
|
1789
|
+
}
|
|
1790
|
+
async resolveAnchoredSandboxEntry(target, action) {
|
|
1791
|
+
const basename = path.posix.basename(target.containerPath);
|
|
1792
|
+
if (!basename || basename === "." || basename === "/") throw new Error(`Invalid sandbox entry target: ${target.containerPath}`);
|
|
1793
|
+
const parentPath = normalizeContainerPath$1(path.posix.dirname(target.containerPath));
|
|
1794
|
+
const canonicalParentPath = await this.resolveCanonicalContainerPath({
|
|
1795
|
+
containerPath: parentPath,
|
|
1796
|
+
allowFinalSymlinkForUnlink: false
|
|
1797
|
+
});
|
|
1798
|
+
this.resolveRequiredMount(canonicalParentPath, action);
|
|
1799
|
+
return {
|
|
1800
|
+
canonicalParentPath,
|
|
1801
|
+
basename
|
|
1802
|
+
};
|
|
1803
|
+
}
|
|
1804
|
+
async resolveAnchoredPinnedEntry(target, action) {
|
|
1805
|
+
const anchoredTarget = await this.resolveAnchoredSandboxEntry(target, action);
|
|
1806
|
+
const mount = this.resolveRequiredMount(anchoredTarget.canonicalParentPath, action);
|
|
1807
|
+
return this.finalizePinnedEntry({
|
|
1808
|
+
mount,
|
|
1809
|
+
parentPath: anchoredTarget.canonicalParentPath,
|
|
1810
|
+
basename: anchoredTarget.basename,
|
|
1811
|
+
targetPath: target.containerPath,
|
|
1812
|
+
action
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
1815
|
+
resolvePinnedDirectoryEntry(target, action) {
|
|
1816
|
+
const mount = this.resolveRequiredMount(target.containerPath, action);
|
|
1817
|
+
const relativePath = path.posix.relative(mount.containerRoot, target.containerPath);
|
|
1818
|
+
if (relativePath.startsWith("..") || path.posix.isAbsolute(relativePath)) throw new Error(`Sandbox path escapes allowed mounts; cannot ${action}: ${target.containerPath}`);
|
|
1819
|
+
return {
|
|
1820
|
+
mountRootPath: mount.containerRoot,
|
|
1821
|
+
relativePath: relativePath === "." ? "" : relativePath
|
|
1822
|
+
};
|
|
1823
|
+
}
|
|
1824
|
+
pathIsExistingDirectory(hostPath) {
|
|
1825
|
+
try {
|
|
1826
|
+
return fs.statSync(hostPath).isDirectory();
|
|
1827
|
+
} catch {
|
|
1828
|
+
return false;
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
resolveMountByContainerPath(containerPath) {
|
|
1832
|
+
const normalized = normalizeContainerPath$1(containerPath);
|
|
1833
|
+
for (const mount of this.mountsByContainer) if (isPathInsideContainerRoot(normalizeContainerPath$1(mount.containerRoot), normalized)) return mount;
|
|
1834
|
+
return null;
|
|
1835
|
+
}
|
|
1836
|
+
async resolveCanonicalContainerPath(params) {
|
|
1837
|
+
const script = [
|
|
1838
|
+
"set -eu",
|
|
1839
|
+
"target=\"$1\"",
|
|
1840
|
+
"allow_final=\"$2\"",
|
|
1841
|
+
"suffix=\"\"",
|
|
1842
|
+
"probe=\"$target\"",
|
|
1843
|
+
"if [ \"$allow_final\" = \"1\" ] && [ -L \"$target\" ]; then probe=$(dirname -- \"$target\"); fi",
|
|
1844
|
+
"cursor=\"$probe\"",
|
|
1845
|
+
"while [ ! -e \"$cursor\" ] && [ ! -L \"$cursor\" ]; do",
|
|
1846
|
+
" parent=$(dirname -- \"$cursor\")",
|
|
1847
|
+
" if [ \"$parent\" = \"$cursor\" ]; then break; fi",
|
|
1848
|
+
" base=$(basename -- \"$cursor\")",
|
|
1849
|
+
" suffix=\"/$base$suffix\"",
|
|
1850
|
+
" cursor=\"$parent\"",
|
|
1851
|
+
"done",
|
|
1852
|
+
"canonical=$(readlink -f -- \"$cursor\")",
|
|
1853
|
+
"printf \"%s%s\\n\" \"$canonical\" \"$suffix\""
|
|
1854
|
+
].join("\n");
|
|
1855
|
+
const canonical = (await this.runCommand(script, { args: [params.containerPath, params.allowFinalSymlinkForUnlink ? "1" : "0"] })).stdout.toString("utf8").trim();
|
|
1856
|
+
if (!canonical.startsWith("/")) throw new Error(`Failed to resolve canonical sandbox path: ${params.containerPath}`);
|
|
1857
|
+
return normalizeContainerPath$1(canonical);
|
|
1858
|
+
}
|
|
1859
|
+
};
|
|
1860
|
+
//#endregion
|
|
1861
|
+
//#region src/agents/sandbox/fs-bridge-shell-command-plans.ts
|
|
1862
|
+
function buildStatPlan(target, anchoredTarget) {
|
|
1863
|
+
return {
|
|
1864
|
+
checks: [{
|
|
1865
|
+
target,
|
|
1866
|
+
options: { action: "stat files" }
|
|
1867
|
+
}],
|
|
1868
|
+
script: "set -eu\ncd -- \"$1\"\nstat -c \"%F|%s|%Y\" -- \"$2\"",
|
|
1869
|
+
args: [anchoredTarget.canonicalParentPath, anchoredTarget.basename],
|
|
1870
|
+
allowFailure: true
|
|
1871
|
+
};
|
|
1872
|
+
}
|
|
1873
|
+
//#endregion
|
|
1874
|
+
//#region src/agents/sandbox/fs-paths.ts
|
|
1875
|
+
function parseSandboxBindMount(spec) {
|
|
1876
|
+
const trimmed = spec.trim();
|
|
1877
|
+
if (!trimmed) return null;
|
|
1878
|
+
const parsed = splitSandboxBindSpec(trimmed);
|
|
1879
|
+
if (!parsed) return null;
|
|
1880
|
+
const hostToken = parsed.host.trim();
|
|
1881
|
+
const containerToken = parsed.container.trim();
|
|
1882
|
+
if (!hostToken || !containerToken || !path.posix.isAbsolute(containerToken)) return null;
|
|
1883
|
+
const optionsToken = normalizeOptionalLowercaseString(parsed.options) ?? "";
|
|
1884
|
+
const writable = !(optionsToken ? optionsToken.split(",").map((entry) => entry.trim()).filter(Boolean) : []).includes("ro");
|
|
1885
|
+
return {
|
|
1886
|
+
hostRoot: path.resolve(hostToken),
|
|
1887
|
+
containerRoot: normalizeContainerPath$1(containerToken),
|
|
1888
|
+
writable
|
|
1889
|
+
};
|
|
1890
|
+
}
|
|
1891
|
+
function buildSandboxFsMounts(sandbox) {
|
|
1892
|
+
const mounts = [{
|
|
1893
|
+
hostRoot: path.resolve(sandbox.workspaceDir),
|
|
1894
|
+
containerRoot: normalizeContainerPath$1(sandbox.containerWorkdir),
|
|
1895
|
+
writable: sandbox.workspaceAccess === "rw",
|
|
1896
|
+
source: "workspace"
|
|
1897
|
+
}];
|
|
1898
|
+
if (sandbox.workspaceAccess !== "none" && path.resolve(sandbox.agentWorkspaceDir) !== path.resolve(sandbox.workspaceDir)) mounts.push({
|
|
1899
|
+
hostRoot: path.resolve(sandbox.agentWorkspaceDir),
|
|
1900
|
+
containerRoot: SANDBOX_AGENT_WORKSPACE_MOUNT,
|
|
1901
|
+
writable: sandbox.workspaceAccess === "rw",
|
|
1902
|
+
source: "agent"
|
|
1903
|
+
});
|
|
1904
|
+
for (const bind of sandbox.docker.binds ?? []) {
|
|
1905
|
+
const parsed = parseSandboxBindMount(bind);
|
|
1906
|
+
if (!parsed) continue;
|
|
1907
|
+
mounts.push({
|
|
1908
|
+
hostRoot: parsed.hostRoot,
|
|
1909
|
+
containerRoot: parsed.containerRoot,
|
|
1910
|
+
writable: parsed.writable,
|
|
1911
|
+
source: "bind"
|
|
1912
|
+
});
|
|
1913
|
+
}
|
|
1914
|
+
return dedupeMounts(mounts);
|
|
1915
|
+
}
|
|
1916
|
+
function resolveSandboxFsPathWithMounts(params) {
|
|
1917
|
+
const mountsByContainer = [...params.mounts].toSorted(compareMountsByContainerPath);
|
|
1918
|
+
const mountsByHost = [...params.mounts].toSorted(compareMountsByHostPath);
|
|
1919
|
+
const input = params.filePath;
|
|
1920
|
+
const inputPosix = normalizePosixInput(input);
|
|
1921
|
+
if (path.posix.isAbsolute(inputPosix)) {
|
|
1922
|
+
const containerMount = findMountByContainerPath(mountsByContainer, inputPosix);
|
|
1923
|
+
if (containerMount) {
|
|
1924
|
+
const rel = path.posix.relative(containerMount.containerRoot, inputPosix);
|
|
1925
|
+
return {
|
|
1926
|
+
hostPath: rel ? path.resolve(containerMount.hostRoot, ...toHostSegments(rel)) : containerMount.hostRoot,
|
|
1927
|
+
containerPath: rel ? path.posix.join(containerMount.containerRoot, rel) : containerMount.containerRoot,
|
|
1928
|
+
relativePath: toDisplayRelative({
|
|
1929
|
+
containerPath: rel ? path.posix.join(containerMount.containerRoot, rel) : containerMount.containerRoot,
|
|
1930
|
+
defaultContainerRoot: params.defaultContainerRoot
|
|
1931
|
+
}),
|
|
1932
|
+
writable: containerMount.writable
|
|
1933
|
+
};
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
const hostResolved = resolveSandboxInputPath(input, params.cwd);
|
|
1937
|
+
const hostMount = findMountByHostPath(mountsByHost, hostResolved);
|
|
1938
|
+
if (hostMount) {
|
|
1939
|
+
const relHost = path.relative(hostMount.hostRoot, hostResolved);
|
|
1940
|
+
const relPosix = relHost ? relHost.split(path.sep).join(path.posix.sep) : "";
|
|
1941
|
+
const containerPath = relPosix ? path.posix.join(hostMount.containerRoot, relPosix) : hostMount.containerRoot;
|
|
1942
|
+
return {
|
|
1943
|
+
hostPath: hostResolved,
|
|
1944
|
+
containerPath,
|
|
1945
|
+
relativePath: toDisplayRelative({
|
|
1946
|
+
containerPath,
|
|
1947
|
+
defaultContainerRoot: params.defaultContainerRoot
|
|
1948
|
+
}),
|
|
1949
|
+
writable: hostMount.writable
|
|
1950
|
+
};
|
|
1951
|
+
}
|
|
1952
|
+
resolveSandboxPath({
|
|
1953
|
+
filePath: input,
|
|
1954
|
+
cwd: params.cwd,
|
|
1955
|
+
root: params.defaultWorkspaceRoot
|
|
1956
|
+
});
|
|
1957
|
+
throw new Error(`Path escapes sandbox root (${params.defaultWorkspaceRoot}): ${input}`);
|
|
1958
|
+
}
|
|
1959
|
+
function compareMountsByContainerPath(a, b) {
|
|
1960
|
+
const byLength = b.containerRoot.length - a.containerRoot.length;
|
|
1961
|
+
if (byLength !== 0) return byLength;
|
|
1962
|
+
return mountSourcePriority(b.source) - mountSourcePriority(a.source);
|
|
1963
|
+
}
|
|
1964
|
+
function compareMountsByHostPath(a, b) {
|
|
1965
|
+
const byLength = b.hostRoot.length - a.hostRoot.length;
|
|
1966
|
+
if (byLength !== 0) return byLength;
|
|
1967
|
+
return mountSourcePriority(b.source) - mountSourcePriority(a.source);
|
|
1968
|
+
}
|
|
1969
|
+
function mountSourcePriority(source) {
|
|
1970
|
+
if (source === "bind") return 2;
|
|
1971
|
+
if (source === "agent") return 1;
|
|
1972
|
+
return 0;
|
|
1973
|
+
}
|
|
1974
|
+
function dedupeMounts(mounts) {
|
|
1975
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1976
|
+
const deduped = [];
|
|
1977
|
+
for (const mount of mounts) {
|
|
1978
|
+
const key = `${mount.hostRoot}=>${mount.containerRoot}`;
|
|
1979
|
+
if (seen.has(key)) continue;
|
|
1980
|
+
seen.add(key);
|
|
1981
|
+
deduped.push(mount);
|
|
1982
|
+
}
|
|
1983
|
+
return deduped;
|
|
1984
|
+
}
|
|
1985
|
+
function findMountByContainerPath(mounts, target) {
|
|
1986
|
+
for (const mount of mounts) if (isPathInsideContainerRoot(mount.containerRoot, target)) return mount;
|
|
1987
|
+
return null;
|
|
1988
|
+
}
|
|
1989
|
+
function findMountByHostPath(mounts, target) {
|
|
1990
|
+
for (const mount of mounts) if (isPathInsideHost(mount.hostRoot, target)) return mount;
|
|
1991
|
+
return null;
|
|
1992
|
+
}
|
|
1993
|
+
function isPathInsideHost(root, target) {
|
|
1994
|
+
const canonicalRoot = resolveSandboxHostPathViaExistingAncestor(path.resolve(root));
|
|
1995
|
+
const resolvedTarget = path.resolve(target);
|
|
1996
|
+
const canonicalTargetParent = resolveSandboxHostPathViaExistingAncestor(path.dirname(resolvedTarget));
|
|
1997
|
+
const canonicalTarget = path.resolve(canonicalTargetParent, path.basename(resolvedTarget));
|
|
1998
|
+
const rel = path.relative(canonicalRoot, canonicalTarget);
|
|
1999
|
+
if (!rel) return true;
|
|
2000
|
+
return !(rel.startsWith("..") || path.isAbsolute(rel));
|
|
2001
|
+
}
|
|
2002
|
+
function toHostSegments(relativePosix) {
|
|
2003
|
+
return relativePosix.split("/").filter(Boolean);
|
|
2004
|
+
}
|
|
2005
|
+
function toDisplayRelative(params) {
|
|
2006
|
+
const rel = path.posix.relative(params.defaultContainerRoot, params.containerPath);
|
|
2007
|
+
if (!rel) return "";
|
|
2008
|
+
if (!rel.startsWith("..") && !path.posix.isAbsolute(rel)) return rel;
|
|
2009
|
+
return params.containerPath;
|
|
2010
|
+
}
|
|
2011
|
+
function normalizePosixInput(value) {
|
|
2012
|
+
return value.replace(/\\/g, "/").trim();
|
|
2013
|
+
}
|
|
2014
|
+
//#endregion
|
|
2015
|
+
//#region src/agents/sandbox/fs-bridge.ts
|
|
2016
|
+
function createSandboxFsBridge(params) {
|
|
2017
|
+
return new SandboxFsBridgeImpl(params.sandbox);
|
|
2018
|
+
}
|
|
2019
|
+
var SandboxFsBridgeImpl = class {
|
|
2020
|
+
constructor(sandbox) {
|
|
2021
|
+
this.sandbox = sandbox;
|
|
2022
|
+
this.mounts = buildSandboxFsMounts(sandbox);
|
|
2023
|
+
this.pathGuard = new SandboxFsPathGuard({
|
|
2024
|
+
mountsByContainer: [...this.mounts].toSorted((a, b) => b.containerRoot.length - a.containerRoot.length),
|
|
2025
|
+
runCommand: (script, options) => this.runCommand(script, options)
|
|
2026
|
+
});
|
|
2027
|
+
}
|
|
2028
|
+
resolvePath(params) {
|
|
2029
|
+
const target = this.resolveResolvedPath(params);
|
|
2030
|
+
return {
|
|
2031
|
+
hostPath: target.hostPath,
|
|
2032
|
+
relativePath: target.relativePath,
|
|
2033
|
+
containerPath: target.containerPath
|
|
2034
|
+
};
|
|
2035
|
+
}
|
|
2036
|
+
async readFile(params) {
|
|
2037
|
+
const target = this.resolveResolvedPath(params);
|
|
2038
|
+
return this.readPinnedFile(target);
|
|
2039
|
+
}
|
|
2040
|
+
async writeFile(params) {
|
|
2041
|
+
const target = this.resolveResolvedPath(params);
|
|
2042
|
+
this.ensureWriteAccess(target, "write files");
|
|
2043
|
+
const writeCheck = {
|
|
2044
|
+
target,
|
|
2045
|
+
options: {
|
|
2046
|
+
action: "write files",
|
|
2047
|
+
requireWritable: true
|
|
2048
|
+
}
|
|
2049
|
+
};
|
|
2050
|
+
await this.pathGuard.assertPathSafety(target, writeCheck.options);
|
|
2051
|
+
const buffer = Buffer.isBuffer(params.data) ? params.data : Buffer.from(params.data, params.encoding ?? "utf8");
|
|
2052
|
+
const pinnedWriteTarget = await this.pathGuard.resolveAnchoredPinnedEntry(target, "write files");
|
|
2053
|
+
await this.runCheckedCommand({
|
|
2054
|
+
...buildPinnedWritePlan({
|
|
2055
|
+
check: writeCheck,
|
|
2056
|
+
pinned: pinnedWriteTarget,
|
|
2057
|
+
mkdir: params.mkdir !== false
|
|
2058
|
+
}),
|
|
2059
|
+
stdin: buffer,
|
|
2060
|
+
signal: params.signal
|
|
2061
|
+
});
|
|
2062
|
+
}
|
|
2063
|
+
async mkdirp(params) {
|
|
2064
|
+
const target = this.resolveResolvedPath(params);
|
|
2065
|
+
this.ensureWriteAccess(target, "create directories");
|
|
2066
|
+
const mkdirCheck = {
|
|
2067
|
+
target,
|
|
2068
|
+
options: {
|
|
2069
|
+
action: "create directories",
|
|
2070
|
+
requireWritable: true,
|
|
2071
|
+
allowedType: "directory"
|
|
2072
|
+
}
|
|
2073
|
+
};
|
|
2074
|
+
await this.runCheckedCommand({
|
|
2075
|
+
...buildPinnedMkdirpPlan({
|
|
2076
|
+
check: mkdirCheck,
|
|
2077
|
+
pinned: this.pathGuard.resolvePinnedDirectoryEntry(target, "create directories")
|
|
2078
|
+
}),
|
|
2079
|
+
signal: params.signal
|
|
2080
|
+
});
|
|
2081
|
+
}
|
|
2082
|
+
async remove(params) {
|
|
2083
|
+
const target = this.resolveResolvedPath(params);
|
|
2084
|
+
this.ensureWriteAccess(target, "remove files");
|
|
2085
|
+
const removeCheck = {
|
|
2086
|
+
target,
|
|
2087
|
+
options: {
|
|
2088
|
+
action: "remove files",
|
|
2089
|
+
requireWritable: true
|
|
2090
|
+
}
|
|
2091
|
+
};
|
|
2092
|
+
await this.runCheckedCommand({
|
|
2093
|
+
...buildPinnedRemovePlan({
|
|
2094
|
+
check: removeCheck,
|
|
2095
|
+
pinned: this.pathGuard.resolvePinnedEntry(target, "remove files"),
|
|
2096
|
+
recursive: params.recursive,
|
|
2097
|
+
force: params.force
|
|
2098
|
+
}),
|
|
2099
|
+
signal: params.signal
|
|
2100
|
+
});
|
|
2101
|
+
}
|
|
2102
|
+
async rename(params) {
|
|
2103
|
+
const from = this.resolveResolvedPath({
|
|
2104
|
+
filePath: params.from,
|
|
2105
|
+
cwd: params.cwd
|
|
2106
|
+
});
|
|
2107
|
+
const to = this.resolveResolvedPath({
|
|
2108
|
+
filePath: params.to,
|
|
2109
|
+
cwd: params.cwd
|
|
2110
|
+
});
|
|
2111
|
+
this.ensureWriteAccess(from, "rename files");
|
|
2112
|
+
this.ensureWriteAccess(to, "rename files");
|
|
2113
|
+
const fromCheck = {
|
|
2114
|
+
target: from,
|
|
2115
|
+
options: {
|
|
2116
|
+
action: "rename files",
|
|
2117
|
+
requireWritable: true
|
|
2118
|
+
}
|
|
2119
|
+
};
|
|
2120
|
+
const toCheck = {
|
|
2121
|
+
target: to,
|
|
2122
|
+
options: {
|
|
2123
|
+
action: "rename files",
|
|
2124
|
+
requireWritable: true
|
|
2125
|
+
}
|
|
2126
|
+
};
|
|
2127
|
+
await this.runCheckedCommand({
|
|
2128
|
+
...buildPinnedRenamePlan({
|
|
2129
|
+
fromCheck,
|
|
2130
|
+
toCheck,
|
|
2131
|
+
from: this.pathGuard.resolvePinnedEntry(from, "rename files"),
|
|
2132
|
+
to: this.pathGuard.resolvePinnedEntry(to, "rename files")
|
|
2133
|
+
}),
|
|
2134
|
+
signal: params.signal
|
|
2135
|
+
});
|
|
2136
|
+
}
|
|
2137
|
+
async stat(params) {
|
|
2138
|
+
const target = this.resolveResolvedPath(params);
|
|
2139
|
+
const anchoredTarget = await this.pathGuard.resolveAnchoredSandboxEntry(target, "stat files");
|
|
2140
|
+
const result = await this.runPlannedCommand(buildStatPlan(target, anchoredTarget), params.signal);
|
|
2141
|
+
if (result.code !== 0) {
|
|
2142
|
+
const stderr = result.stderr.toString("utf8");
|
|
2143
|
+
if (stderr.includes("No such file or directory")) return null;
|
|
2144
|
+
const message = stderr.trim() || `stat failed with code ${result.code}`;
|
|
2145
|
+
throw new Error(`stat failed for ${target.containerPath}: ${message}`);
|
|
2146
|
+
}
|
|
2147
|
+
const [typeRaw, sizeRaw, mtimeRaw] = result.stdout.toString("utf8").trim().split("|");
|
|
2148
|
+
const size = Number.parseInt(sizeRaw ?? "0", 10);
|
|
2149
|
+
const mtime = Number.parseInt(mtimeRaw ?? "0", 10) * 1e3;
|
|
2150
|
+
return {
|
|
2151
|
+
type: coerceStatType(typeRaw),
|
|
2152
|
+
size: Number.isFinite(size) ? size : 0,
|
|
2153
|
+
mtimeMs: Number.isFinite(mtime) ? mtime : 0
|
|
2154
|
+
};
|
|
2155
|
+
}
|
|
2156
|
+
async runCommand(script, options = {}) {
|
|
2157
|
+
const backend = this.sandbox.backend;
|
|
2158
|
+
if (backend) return await backend.runShellCommand({
|
|
2159
|
+
script,
|
|
2160
|
+
args: options.args,
|
|
2161
|
+
stdin: options.stdin,
|
|
2162
|
+
allowFailure: options.allowFailure,
|
|
2163
|
+
signal: options.signal
|
|
2164
|
+
});
|
|
2165
|
+
return await runDockerSandboxShellCommand({
|
|
2166
|
+
containerName: this.sandbox.containerName,
|
|
2167
|
+
script,
|
|
2168
|
+
args: options.args,
|
|
2169
|
+
stdin: options.stdin,
|
|
2170
|
+
allowFailure: options.allowFailure,
|
|
2171
|
+
signal: options.signal
|
|
2172
|
+
});
|
|
2173
|
+
}
|
|
2174
|
+
async readPinnedFile(target) {
|
|
2175
|
+
const opened = await this.pathGuard.openReadableFile(target);
|
|
2176
|
+
try {
|
|
2177
|
+
return fs.readFileSync(opened.fd);
|
|
2178
|
+
} finally {
|
|
2179
|
+
fs.closeSync(opened.fd);
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
async runCheckedCommand(plan) {
|
|
2183
|
+
await this.pathGuard.assertPathChecks(plan.checks);
|
|
2184
|
+
if (plan.recheckBeforeCommand) await this.pathGuard.assertPathChecks(plan.checks);
|
|
2185
|
+
return await this.runCommand(plan.script, {
|
|
2186
|
+
args: plan.args,
|
|
2187
|
+
stdin: plan.stdin,
|
|
2188
|
+
allowFailure: plan.allowFailure,
|
|
2189
|
+
signal: plan.signal
|
|
2190
|
+
});
|
|
2191
|
+
}
|
|
2192
|
+
async runPlannedCommand(plan, signal) {
|
|
2193
|
+
return await this.runCheckedCommand({
|
|
2194
|
+
...plan,
|
|
2195
|
+
signal
|
|
2196
|
+
});
|
|
2197
|
+
}
|
|
2198
|
+
ensureWriteAccess(target, action) {
|
|
2199
|
+
if (!allowsWrites(this.sandbox.workspaceAccess) || !target.writable) throw new Error(`Sandbox path is read-only; cannot ${action}: ${target.containerPath}`);
|
|
2200
|
+
}
|
|
2201
|
+
resolveResolvedPath(params) {
|
|
2202
|
+
return resolveSandboxFsPathWithMounts({
|
|
2203
|
+
filePath: params.filePath,
|
|
2204
|
+
cwd: params.cwd ?? this.sandbox.workspaceDir,
|
|
2205
|
+
defaultWorkspaceRoot: this.sandbox.workspaceDir,
|
|
2206
|
+
defaultContainerRoot: this.sandbox.containerWorkdir,
|
|
2207
|
+
mounts: this.mounts
|
|
2208
|
+
});
|
|
2209
|
+
}
|
|
2210
|
+
};
|
|
2211
|
+
function allowsWrites(access) {
|
|
2212
|
+
return access === "rw";
|
|
2213
|
+
}
|
|
2214
|
+
function coerceStatType(typeRaw) {
|
|
2215
|
+
if (!typeRaw) return "other";
|
|
2216
|
+
const normalized = normalizeOptionalLowercaseString(typeRaw) ?? "";
|
|
2217
|
+
if (normalized.includes("directory")) return "directory";
|
|
2218
|
+
if (normalized.includes("file")) return "file";
|
|
2219
|
+
return "other";
|
|
2220
|
+
}
|
|
2221
|
+
//#endregion
|
|
2222
|
+
//#region src/agents/sandbox/prune.ts
|
|
2223
|
+
let lastPruneAtMs = 0;
|
|
2224
|
+
function shouldPruneSandboxEntry(cfg, now, entry) {
|
|
2225
|
+
const idleHours = cfg.prune.idleHours;
|
|
2226
|
+
const maxAgeDays = cfg.prune.maxAgeDays;
|
|
2227
|
+
if (idleHours === 0 && maxAgeDays === 0) return false;
|
|
2228
|
+
const idleMs = now - entry.lastUsedAtMs;
|
|
2229
|
+
const ageMs = now - entry.createdAtMs;
|
|
2230
|
+
return idleHours > 0 && idleMs > idleHours * 60 * 60 * 1e3 || maxAgeDays > 0 && ageMs > maxAgeDays * 24 * 60 * 60 * 1e3;
|
|
2231
|
+
}
|
|
2232
|
+
async function pruneSandboxRegistryEntries(params) {
|
|
2233
|
+
const now = Date.now();
|
|
2234
|
+
if (params.cfg.prune.idleHours === 0 && params.cfg.prune.maxAgeDays === 0) return;
|
|
2235
|
+
const registry = await params.read();
|
|
2236
|
+
for (const entry of registry.entries) {
|
|
2237
|
+
if (!shouldPruneSandboxEntry(params.cfg, now, entry)) continue;
|
|
2238
|
+
try {
|
|
2239
|
+
await params.removeRuntime(entry);
|
|
2240
|
+
} catch {} finally {
|
|
2241
|
+
await params.remove(entry.containerName);
|
|
2242
|
+
await params.onRemoved?.(entry);
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
}
|
|
2246
|
+
async function pruneSandboxContainers(cfg) {
|
|
2247
|
+
const config = loadConfig();
|
|
2248
|
+
await pruneSandboxRegistryEntries({
|
|
2249
|
+
cfg,
|
|
2250
|
+
read: readRegistry,
|
|
2251
|
+
remove: removeRegistryEntry,
|
|
2252
|
+
removeRuntime: async (entry) => {
|
|
2253
|
+
await getSandboxBackendManager(entry.backendId ?? "docker")?.removeRuntime({
|
|
2254
|
+
entry,
|
|
2255
|
+
config
|
|
2256
|
+
});
|
|
2257
|
+
}
|
|
2258
|
+
});
|
|
2259
|
+
}
|
|
2260
|
+
async function pruneSandboxBrowsers(cfg) {
|
|
2261
|
+
const config = loadConfig();
|
|
2262
|
+
await pruneSandboxRegistryEntries({
|
|
2263
|
+
cfg,
|
|
2264
|
+
read: readBrowserRegistry,
|
|
2265
|
+
remove: removeBrowserRegistryEntry,
|
|
2266
|
+
removeRuntime: async (entry) => {
|
|
2267
|
+
await dockerSandboxBackendManager.removeRuntime({
|
|
2268
|
+
entry: {
|
|
2269
|
+
...entry,
|
|
2270
|
+
backendId: "docker",
|
|
2271
|
+
runtimeLabel: entry.containerName,
|
|
2272
|
+
configLabelKind: "Image"
|
|
2273
|
+
},
|
|
2274
|
+
config
|
|
2275
|
+
});
|
|
2276
|
+
},
|
|
2277
|
+
onRemoved: async (entry) => {
|
|
2278
|
+
const bridge = BROWSER_BRIDGES.get(entry.sessionKey);
|
|
2279
|
+
if (bridge?.containerName === entry.containerName) {
|
|
2280
|
+
await stopBrowserBridgeServer(bridge.bridge.server).catch(() => void 0);
|
|
2281
|
+
BROWSER_BRIDGES.delete(entry.sessionKey);
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
});
|
|
2285
|
+
}
|
|
2286
|
+
async function maybePruneSandboxes(cfg) {
|
|
2287
|
+
const now = Date.now();
|
|
2288
|
+
if (now - lastPruneAtMs < 300 * 1e3) return;
|
|
2289
|
+
lastPruneAtMs = now;
|
|
2290
|
+
try {
|
|
2291
|
+
await pruneSandboxContainers(cfg);
|
|
2292
|
+
await pruneSandboxBrowsers(cfg);
|
|
2293
|
+
} catch (error) {
|
|
2294
|
+
const message = error instanceof Error ? error.message : typeof error === "string" ? error : JSON.stringify(error);
|
|
2295
|
+
defaultRuntime.error?.(`Sandbox prune failed: ${message ?? "unknown error"}`);
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
//#endregion
|
|
2299
|
+
//#region src/agents/sandbox/workspace.ts
|
|
2300
|
+
async function ensureSandboxWorkspace(workspaceDir, seedFrom, skipBootstrap) {
|
|
2301
|
+
await fs$1.mkdir(workspaceDir, { recursive: true });
|
|
2302
|
+
if (seedFrom) {
|
|
2303
|
+
const seed = resolveUserPath(seedFrom);
|
|
2304
|
+
const files = [
|
|
2305
|
+
DEFAULT_AGENTS_FILENAME,
|
|
2306
|
+
DEFAULT_SOUL_FILENAME,
|
|
2307
|
+
DEFAULT_TOOLS_FILENAME,
|
|
2308
|
+
DEFAULT_IDENTITY_FILENAME,
|
|
2309
|
+
DEFAULT_USER_FILENAME,
|
|
2310
|
+
DEFAULT_BOOTSTRAP_FILENAME,
|
|
2311
|
+
DEFAULT_HEARTBEAT_FILENAME
|
|
2312
|
+
];
|
|
2313
|
+
for (const name of files) {
|
|
2314
|
+
const src = path.join(seed, name);
|
|
2315
|
+
const dest = path.join(workspaceDir, name);
|
|
2316
|
+
try {
|
|
2317
|
+
await fs$1.access(dest);
|
|
2318
|
+
} catch {
|
|
2319
|
+
try {
|
|
2320
|
+
const opened = await openBoundaryFile({
|
|
2321
|
+
absolutePath: src,
|
|
2322
|
+
rootPath: seed,
|
|
2323
|
+
boundaryLabel: "sandbox seed workspace"
|
|
2324
|
+
});
|
|
2325
|
+
if (!opened.ok) continue;
|
|
2326
|
+
try {
|
|
2327
|
+
const content = fs.readFileSync(opened.fd, "utf-8");
|
|
2328
|
+
await fs$1.writeFile(dest, content, {
|
|
2329
|
+
encoding: "utf-8",
|
|
2330
|
+
flag: "wx"
|
|
2331
|
+
});
|
|
2332
|
+
} finally {
|
|
2333
|
+
fs.closeSync(opened.fd);
|
|
2334
|
+
}
|
|
2335
|
+
} catch {}
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
await ensureAgentWorkspace({
|
|
2340
|
+
dir: workspaceDir,
|
|
2341
|
+
ensureBootstrapFiles: !skipBootstrap
|
|
2342
|
+
});
|
|
2343
|
+
}
|
|
2344
|
+
//#endregion
|
|
2345
|
+
//#region src/agents/sandbox/context.ts
|
|
2346
|
+
async function ensureSandboxWorkspaceLayout(params) {
|
|
2347
|
+
const { cfg, rawSessionKey } = params;
|
|
2348
|
+
const agentWorkspaceDir = resolveUserPath(params.workspaceDir?.trim() || DEFAULT_AGENT_WORKSPACE_DIR);
|
|
2349
|
+
const workspaceRoot = resolveUserPath(cfg.workspaceRoot);
|
|
2350
|
+
const scopeKey = resolveSandboxScopeKey(cfg.scope, rawSessionKey);
|
|
2351
|
+
const sandboxWorkspaceDir = cfg.scope === "shared" ? workspaceRoot : resolveSandboxWorkspaceDir(workspaceRoot, scopeKey);
|
|
2352
|
+
const workspaceDir = cfg.workspaceAccess === "rw" ? agentWorkspaceDir : sandboxWorkspaceDir;
|
|
2353
|
+
if (workspaceDir === sandboxWorkspaceDir) {
|
|
2354
|
+
await ensureSandboxWorkspace(sandboxWorkspaceDir, agentWorkspaceDir, params.config?.agents?.defaults?.skipBootstrap);
|
|
2355
|
+
if (cfg.workspaceAccess !== "rw") try {
|
|
2356
|
+
await syncSkillsToWorkspace({
|
|
2357
|
+
sourceWorkspaceDir: agentWorkspaceDir,
|
|
2358
|
+
targetWorkspaceDir: sandboxWorkspaceDir,
|
|
2359
|
+
config: params.config,
|
|
2360
|
+
agentId: params.agentId,
|
|
2361
|
+
eligibility: { remote: getRemoteSkillEligibility({ advertiseExecNode: canExecRequestNode({
|
|
2362
|
+
cfg: params.config,
|
|
2363
|
+
sessionKey: rawSessionKey,
|
|
2364
|
+
agentId: params.agentId
|
|
2365
|
+
}) }) }
|
|
2366
|
+
});
|
|
2367
|
+
} catch (error) {
|
|
2368
|
+
const message = error instanceof Error ? error.message : JSON.stringify(error);
|
|
2369
|
+
defaultRuntime.error?.(`Sandbox skill sync failed: ${message}`);
|
|
2370
|
+
}
|
|
2371
|
+
} else await fs$1.mkdir(workspaceDir, { recursive: true });
|
|
2372
|
+
return {
|
|
2373
|
+
agentWorkspaceDir,
|
|
2374
|
+
scopeKey,
|
|
2375
|
+
sandboxWorkspaceDir,
|
|
2376
|
+
workspaceDir
|
|
2377
|
+
};
|
|
2378
|
+
}
|
|
2379
|
+
async function resolveSandboxDockerUser(params) {
|
|
2380
|
+
if (params.docker.user?.trim()) return params.docker;
|
|
2381
|
+
const stat = params.stat ?? ((workspaceDir) => fs$1.stat(workspaceDir));
|
|
2382
|
+
try {
|
|
2383
|
+
const workspaceStat = await stat(params.workspaceDir);
|
|
2384
|
+
const uid = Number.isInteger(workspaceStat.uid) ? workspaceStat.uid : null;
|
|
2385
|
+
const gid = Number.isInteger(workspaceStat.gid) ? workspaceStat.gid : null;
|
|
2386
|
+
if (uid === null || gid === null || uid < 0 || gid < 0) return params.docker;
|
|
2387
|
+
return {
|
|
2388
|
+
...params.docker,
|
|
2389
|
+
user: `${uid}:${gid}`
|
|
2390
|
+
};
|
|
2391
|
+
} catch {
|
|
2392
|
+
return params.docker;
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
function resolveSandboxSession(params) {
|
|
2396
|
+
const rawSessionKey = params.sessionKey?.trim();
|
|
2397
|
+
if (!rawSessionKey) return null;
|
|
2398
|
+
const runtime = resolveSandboxRuntimeStatus({
|
|
2399
|
+
cfg: params.config,
|
|
2400
|
+
sessionKey: rawSessionKey
|
|
2401
|
+
});
|
|
2402
|
+
if (!runtime.sandboxed) return null;
|
|
2403
|
+
return {
|
|
2404
|
+
rawSessionKey,
|
|
2405
|
+
runtime,
|
|
2406
|
+
cfg: resolveSandboxConfigForAgent(params.config, runtime.agentId)
|
|
2407
|
+
};
|
|
2408
|
+
}
|
|
2409
|
+
async function resolveSandboxContext(params) {
|
|
2410
|
+
const resolved = resolveSandboxSession(params);
|
|
2411
|
+
if (!resolved) return null;
|
|
2412
|
+
const { rawSessionKey, cfg, runtime } = resolved;
|
|
2413
|
+
await maybePruneSandboxes(cfg);
|
|
2414
|
+
const { agentWorkspaceDir, scopeKey, workspaceDir } = await ensureSandboxWorkspaceLayout({
|
|
2415
|
+
cfg,
|
|
2416
|
+
agentId: runtime.agentId,
|
|
2417
|
+
rawSessionKey,
|
|
2418
|
+
config: params.config,
|
|
2419
|
+
workspaceDir: params.workspaceDir
|
|
2420
|
+
});
|
|
2421
|
+
const docker = await resolveSandboxDockerUser({
|
|
2422
|
+
docker: cfg.docker,
|
|
2423
|
+
workspaceDir
|
|
2424
|
+
});
|
|
2425
|
+
const resolvedCfg = docker === cfg.docker ? cfg : {
|
|
2426
|
+
...cfg,
|
|
2427
|
+
docker
|
|
2428
|
+
};
|
|
2429
|
+
const backend = await requireSandboxBackendFactory(resolvedCfg.backend)({
|
|
2430
|
+
sessionKey: rawSessionKey,
|
|
2431
|
+
scopeKey,
|
|
2432
|
+
workspaceDir,
|
|
2433
|
+
agentWorkspaceDir,
|
|
2434
|
+
cfg: resolvedCfg
|
|
2435
|
+
});
|
|
2436
|
+
await updateRegistry({
|
|
2437
|
+
containerName: backend.runtimeId,
|
|
2438
|
+
backendId: backend.id,
|
|
2439
|
+
runtimeLabel: backend.runtimeLabel,
|
|
2440
|
+
sessionKey: scopeKey,
|
|
2441
|
+
createdAtMs: Date.now(),
|
|
2442
|
+
lastUsedAtMs: Date.now(),
|
|
2443
|
+
image: backend.configLabel ?? resolvedCfg.docker.image,
|
|
2444
|
+
configLabelKind: backend.configLabelKind ?? "Image"
|
|
2445
|
+
});
|
|
2446
|
+
const evaluateEnabled = params.config?.browser?.evaluateEnabled ?? true;
|
|
2447
|
+
const bridgeAuth = cfg.browser.enabled ? await (async () => {
|
|
2448
|
+
const cfgForAuth = params.config ?? loadConfig();
|
|
2449
|
+
let browserAuth = resolveBrowserControlAuth(cfgForAuth);
|
|
2450
|
+
try {
|
|
2451
|
+
browserAuth = (await ensureBrowserControlAuth({ cfg: cfgForAuth })).auth;
|
|
2452
|
+
} catch (error) {
|
|
2453
|
+
const message = error instanceof Error ? error.message : JSON.stringify(error);
|
|
2454
|
+
defaultRuntime.error?.(`Sandbox browser auth ensure failed: ${message}`);
|
|
2455
|
+
}
|
|
2456
|
+
return browserAuth;
|
|
2457
|
+
})() : void 0;
|
|
2458
|
+
if (resolvedCfg.browser.enabled && backend.capabilities?.browser !== true) throw new Error(`Sandbox backend "${resolvedCfg.backend}" does not support browser sandboxes yet.`);
|
|
2459
|
+
const browser = resolvedCfg.browser.enabled && backend.capabilities?.browser === true ? await ensureSandboxBrowser({
|
|
2460
|
+
scopeKey,
|
|
2461
|
+
workspaceDir,
|
|
2462
|
+
agentWorkspaceDir,
|
|
2463
|
+
cfg: resolvedCfg,
|
|
2464
|
+
evaluateEnabled,
|
|
2465
|
+
bridgeAuth
|
|
2466
|
+
}) : null;
|
|
2467
|
+
const sandboxContext = {
|
|
2468
|
+
enabled: true,
|
|
2469
|
+
backendId: backend.id,
|
|
2470
|
+
sessionKey: rawSessionKey,
|
|
2471
|
+
workspaceDir,
|
|
2472
|
+
agentWorkspaceDir,
|
|
2473
|
+
workspaceAccess: resolvedCfg.workspaceAccess,
|
|
2474
|
+
runtimeId: backend.runtimeId,
|
|
2475
|
+
runtimeLabel: backend.runtimeLabel,
|
|
2476
|
+
containerName: backend.runtimeId,
|
|
2477
|
+
containerWorkdir: backend.workdir,
|
|
2478
|
+
docker: resolvedCfg.docker,
|
|
2479
|
+
tools: resolvedCfg.tools,
|
|
2480
|
+
browserAllowHostControl: resolvedCfg.browser.allowHostControl,
|
|
2481
|
+
browser: browser ?? void 0,
|
|
2482
|
+
backend
|
|
2483
|
+
};
|
|
2484
|
+
sandboxContext.fsBridge = backend.createFsBridge?.({ sandbox: sandboxContext }) ?? createSandboxFsBridge({ sandbox: sandboxContext });
|
|
2485
|
+
return sandboxContext;
|
|
2486
|
+
}
|
|
2487
|
+
async function ensureSandboxWorkspaceForSession(params) {
|
|
2488
|
+
const resolved = resolveSandboxSession(params);
|
|
2489
|
+
if (!resolved) return null;
|
|
2490
|
+
const { rawSessionKey, cfg, runtime } = resolved;
|
|
2491
|
+
const { workspaceDir } = await ensureSandboxWorkspaceLayout({
|
|
2492
|
+
cfg,
|
|
2493
|
+
agentId: runtime.agentId,
|
|
2494
|
+
rawSessionKey,
|
|
2495
|
+
config: params.config,
|
|
2496
|
+
workspaceDir: params.workspaceDir
|
|
2497
|
+
});
|
|
2498
|
+
return {
|
|
2499
|
+
workspaceDir,
|
|
2500
|
+
containerWorkdir: cfg.docker.workdir
|
|
2501
|
+
};
|
|
2502
|
+
}
|
|
2503
|
+
//#endregion
|
|
2504
|
+
//#region src/agents/sandbox/manage.ts
|
|
2505
|
+
function toBrowserDockerRuntimeEntry(entry) {
|
|
2506
|
+
return {
|
|
2507
|
+
...entry,
|
|
2508
|
+
backendId: "docker",
|
|
2509
|
+
runtimeLabel: entry.containerName,
|
|
2510
|
+
configLabelKind: "BrowserImage"
|
|
2511
|
+
};
|
|
2512
|
+
}
|
|
2513
|
+
async function listSandboxContainers() {
|
|
2514
|
+
const config = loadConfig();
|
|
2515
|
+
const registry = await readRegistry();
|
|
2516
|
+
const results = [];
|
|
2517
|
+
for (const entry of registry.entries) {
|
|
2518
|
+
const manager = getSandboxBackendManager(entry.backendId ?? "docker");
|
|
2519
|
+
if (!manager) {
|
|
2520
|
+
results.push({
|
|
2521
|
+
...entry,
|
|
2522
|
+
running: false,
|
|
2523
|
+
imageMatch: true
|
|
2524
|
+
});
|
|
2525
|
+
continue;
|
|
2526
|
+
}
|
|
2527
|
+
const agentId = resolveSandboxAgentId(entry.sessionKey);
|
|
2528
|
+
const runtime = await manager.describeRuntime({
|
|
2529
|
+
entry,
|
|
2530
|
+
config,
|
|
2531
|
+
agentId
|
|
2532
|
+
});
|
|
2533
|
+
results.push({
|
|
2534
|
+
...entry,
|
|
2535
|
+
image: runtime.actualConfigLabel ?? entry.image,
|
|
2536
|
+
running: runtime.running,
|
|
2537
|
+
imageMatch: runtime.configLabelMatch
|
|
2538
|
+
});
|
|
2539
|
+
}
|
|
2540
|
+
return results;
|
|
2541
|
+
}
|
|
2542
|
+
async function listSandboxBrowsers() {
|
|
2543
|
+
const config = loadConfig();
|
|
2544
|
+
const registry = await readBrowserRegistry();
|
|
2545
|
+
const results = [];
|
|
2546
|
+
for (const entry of registry.entries) {
|
|
2547
|
+
const agentId = resolveSandboxAgentId(entry.sessionKey);
|
|
2548
|
+
const runtime = await dockerSandboxBackendManager.describeRuntime({
|
|
2549
|
+
entry: toBrowserDockerRuntimeEntry(entry),
|
|
2550
|
+
config,
|
|
2551
|
+
agentId
|
|
2552
|
+
});
|
|
2553
|
+
results.push({
|
|
2554
|
+
...entry,
|
|
2555
|
+
image: runtime.actualConfigLabel ?? entry.image,
|
|
2556
|
+
running: runtime.running,
|
|
2557
|
+
imageMatch: runtime.configLabelMatch
|
|
2558
|
+
});
|
|
2559
|
+
}
|
|
2560
|
+
return results;
|
|
2561
|
+
}
|
|
2562
|
+
async function removeSandboxContainer(containerName) {
|
|
2563
|
+
const config = loadConfig();
|
|
2564
|
+
const entry = (await readRegistry()).entries.find((item) => item.containerName === containerName);
|
|
2565
|
+
if (entry) await getSandboxBackendManager(entry.backendId ?? "docker")?.removeRuntime({
|
|
2566
|
+
entry,
|
|
2567
|
+
config,
|
|
2568
|
+
agentId: resolveSandboxAgentId(entry.sessionKey)
|
|
2569
|
+
});
|
|
2570
|
+
await removeRegistryEntry(containerName);
|
|
2571
|
+
}
|
|
2572
|
+
async function removeSandboxBrowserContainer(containerName) {
|
|
2573
|
+
const config = loadConfig();
|
|
2574
|
+
const entry = (await readBrowserRegistry()).entries.find((item) => item.containerName === containerName);
|
|
2575
|
+
if (entry) await dockerSandboxBackendManager.removeRuntime({
|
|
2576
|
+
entry: toBrowserDockerRuntimeEntry(entry),
|
|
2577
|
+
config
|
|
2578
|
+
});
|
|
2579
|
+
await removeBrowserRegistryEntry(containerName);
|
|
2580
|
+
for (const [sessionKey, bridge] of BROWSER_BRIDGES.entries()) if (bridge.containerName === containerName) {
|
|
2581
|
+
await stopBrowserBridgeServer(bridge.bridge.server).catch(() => void 0);
|
|
2582
|
+
BROWSER_BRIDGES.delete(sessionKey);
|
|
2583
|
+
}
|
|
2584
|
+
}
|
|
2585
|
+
//#endregion
|
|
2586
|
+
export { resolveWritableRenameTargetsForBridge as C, resolveWritableRenameTargets as S, runSshSandboxCommand as _, ensureSandboxWorkspaceForSession as a, createRemoteShellSandboxFsBridge as b, getSandboxBackendManager as c, buildExecRemoteCommand as d, buildRemoteCommand as f, disposeSshSandboxSession as g, createSshSandboxSessionFromSettings as h, removeSandboxContainer as i, registerSandboxBackend as l, createSshSandboxSessionFromConfigText as m, listSandboxContainers as n, resolveSandboxContext as o, buildSshSandboxArgv as p, removeSandboxBrowserContainer as r, getSandboxBackendFactory as s, listSandboxBrowsers as t, requireSandboxBackendFactory as u, shellEscape as v, createWritableRenameTargetResolver as x, uploadDirectoryToSshTarget as y };
|