fengming 0.3.4 → 0.3.5
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/CHANGELOG.md +3 -2
- package/dist/abort-CjCDVBbH.js +277 -0
- package/dist/abort.runtime-DxJ8129J.js +2 -0
- package/dist/abort.runtime.js +1 -1
- package/dist/accounts-Cyn0sm_v.js +423 -0
- package/dist/accounts-DzcLKcN5.js +2 -0
- package/dist/acp/control-plane/manager.js +1 -1
- package/dist/acp-spawn-4lfz_3K9.js +1286 -0
- package/dist/acp-spawn-BCUjuO6L.js +2 -0
- package/dist/acp-stateful-target-driver-Bv99uwEA.js +89 -0
- package/dist/action-info-CP-p6RHS.js +75 -0
- package/dist/active-runtime-registry-DjKe53a5.js +62 -0
- package/dist/active-tool-schema-warnings-p7CqUnu1.js +105 -0
- package/dist/active-tool-schema-warnings-pGI92yka.js +2 -0
- package/dist/agent-B77yluip.js +1825 -0
- package/dist/agent-BooUvZnR.js +2 -0
- package/dist/agent-bundle-lsp-runtime-3ieSgTgo.js +389 -0
- package/dist/agent-bundle-lsp-runtime-CkJ0XJK7.js +2 -0
- package/dist/agent-bundle-mcp-materialize-BH-esGZL.js +124 -0
- package/dist/agent-bundle-mcp-tools-DkixTTnL.js +3 -0
- package/dist/agent-command-BJKcnQy6.js +1435 -0
- package/dist/agent-delivery-CEfe_Zzt.js +117 -0
- package/dist/agent-harness-runtime-R_Ae6o9C.js +207 -0
- package/dist/agent-kWSaRcQt.js +3 -0
- package/dist/agent-model-discovery-C49swEgd.js +238 -0
- package/dist/agent-model-discovery-DZbixJQs.js +3 -0
- package/dist/agent-runner-utils-BChpi9Ec.js +267 -0
- package/dist/agent-runner.runtime-3LOdt215.js +3784 -0
- package/dist/agent-runner.runtime.js +1 -1
- package/dist/agent-runtime-3jsv8b7Y.js +199 -0
- package/dist/agent-runtime-label-uoFI4ovH.js +30 -0
- package/dist/agent-runtime-metadata-BhFt6kLt.js +53 -0
- package/dist/agent-tool-result-middleware-loader-BxYJNC1i.js +55 -0
- package/dist/agent-tools-COLEG7aL.js +2506 -0
- package/dist/agent-tools.before-tool-call--rMZI5Rd.js +1274 -0
- package/dist/agent-tools.before-tool-call-CbX2sfP4.js +2 -0
- package/dist/agent-via-gateway-DfKij3De.js +486 -0
- package/dist/agent-wait-dedupe-BAUSJotw.js +180 -0
- package/dist/agents/agent-bundle-mcp-materialize.js +1 -1
- package/dist/agents/auth-profiles.runtime.js +1 -1
- package/dist/agents/compaction-planning.worker.js +1 -1
- package/dist/agents/embedded-agent-runner/effective-tool-policy.js +1 -1
- package/dist/agents/embedded-agent-runner/tool-split.js +1 -1
- package/dist/agents/model-catalog.runtime.js +1 -1
- package/dist/agents/model-provider-auth.worker.js +3 -3
- package/dist/agents/models-config.runtime.js +1 -1
- package/dist/agents-CZSNDJWD.js +632 -0
- package/dist/agents.command-shared-DgbjfH23.js +16 -0
- package/dist/agents.commands.add-DknGM1oz.js +304 -0
- package/dist/agents.commands.bind-DDVI0yDe.js +265 -0
- package/dist/agents.commands.delete-Dv4RHEhc.js +128 -0
- package/dist/agents.commands.identity-BSZbc1QR.js +143 -0
- package/dist/agents.commands.list-CA0OTw59.js +235 -0
- package/dist/aliases-EY1GbfwT.js +97 -0
- package/dist/api-CY0oKcRz.js +3 -0
- package/dist/api-DgjY0gIl.js +6 -0
- package/dist/api-VyMyAYze.js +2 -0
- package/dist/api-key-rotation-DxPKIdmC.js +167 -0
- package/dist/app-registration-BBDxCbFo.js +194 -0
- package/dist/apply-DMYy7tc3.js +544 -0
- package/dist/apply-Dd0n97MD.js +2 -0
- package/dist/apply-bHIT1nMp.js +416 -0
- package/dist/apply-g8x7Z83S.js +510 -0
- package/dist/apply-nnbx9TaB.js +2 -0
- package/dist/approval-native-helpers-CjaYvOaZ.js +398 -0
- package/dist/artifacts-B55YR-uA.js +368 -0
- package/dist/assistant-hJaOgfKl.js +291 -0
- package/dist/attachment-normalize-COsastJx.js +213 -0
- package/dist/attempt-execution-fDWDWcWe.js +584 -0
- package/dist/attempt-execution.helpers-Cze5xPim.js +969 -0
- package/dist/attempt-execution.runtime-B1iCG6LN.js +3 -0
- package/dist/attempt-execution.runtime.js +1 -1
- package/dist/attempt.prompt-helpers-CkBYHBBo.js +543 -0
- package/dist/attempt.tool-run-context-DzfRK5pV.js +1240 -0
- package/dist/audio-preflight.runtime-rjWd9uyk.js +7 -0
- package/dist/audio-preflight.runtime.js +1 -1
- package/dist/audit-DgFtNg3U.js +1108 -0
- package/dist/audit-L8EC3WhV.js +477 -0
- package/dist/audit.nondeep.runtime-D0sQ6bO2.js +1416 -0
- package/dist/audit.nondeep.runtime.js +1 -1
- package/dist/audit.runtime-CiG82F31.js +7 -0
- package/dist/audit.runtime.js +1 -1
- package/dist/auth-CzPdsZVM.js +567 -0
- package/dist/auth-choice-BNzS9QBI.js +3 -0
- package/dist/auth-choice-Cwr5kgcD.js +110 -0
- package/dist/auth-choice-DW9qPpMS.js +400 -0
- package/dist/auth-choice.apply.api-providers-C68tOdqj.js +34 -0
- package/dist/auth-choice.apply.api-providers-DSRK0gYo.js +2 -0
- package/dist/auth-choice.plugin-providers.runtime-BJ9VyO1C.js +11 -0
- package/dist/auth-choice.plugin-providers.runtime.js +1 -1
- package/dist/auth-health-BanKwsTW.js +219 -0
- package/dist/auth-list-Dq8obVno.js +115 -0
- package/dist/auth-order-VXqoAroP.js +105 -0
- package/dist/auth-profiles-6VFEdgC-.js +73 -0
- package/dist/auth-profiles-a0M4JYYg.js +14 -0
- package/dist/backend-config-COaTdVnN.js +259 -0
- package/dist/bash-tools-BMAquSiM.js +3 -0
- package/dist/bash-tools-DLiUXfaS.js +3497 -0
- package/dist/binding-routing-Bwvdx_7S.js +113 -0
- package/dist/binding-targets-Z_d0mK_1.js +121 -0
- package/dist/bootstrap-files-CoCV_zqu.js +202 -0
- package/dist/bootstrap-files-_T3VoTrV.js +3 -0
- package/dist/bridge-server-BIaNurGa.js +113 -0
- package/dist/browser-cli-D4wL8NU9.js +230 -0
- package/dist/browser-cli-actions-input-z40PGiYI.js +522 -0
- package/dist/browser-cli-actions-observe-C4TeyNke.js +81 -0
- package/dist/browser-cli-debug-Dv0gH-c8.js +137 -0
- package/dist/browser-cli-inspect-BUXeITYc.js +117 -0
- package/dist/browser-cli-manage-qMb3Yw5Y.js +446 -0
- package/dist/browser-cli-resize-CZWnGwGz.js +32 -0
- package/dist/browser-cli-shared-BpinhvE3.js +69 -0
- package/dist/browser-cli-state-CBbKqqgP.js +371 -0
- package/dist/browser-cli-uI5GGX51.js +2 -0
- package/dist/browser-control-auth-CFPJXdN_.js +2 -0
- package/dist/browser-profiles-D4ni3t4J.js +2 -0
- package/dist/browser-runtime-Dm5D_PLf.js +389 -0
- package/dist/browser-tool.schema-Bek02ox5.js +132 -0
- package/dist/btw-command-DdrwvCK4.js +18 -0
- package/dist/build-DkEeJ9sO.js +261 -0
- package/dist/build-info.json +2 -2
- package/dist/bundled/boot-md/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/bundled-channel-config-schema-BeowdkHi.d.ts +3168 -0
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/capability-cli-DTRuKZJC.js +1809 -0
- package/dist/capability-provider-runtime-Cpp-Jq9g.js +346 -0
- package/dist/cdp.helpers-GfQkB-B5.js +637 -0
- package/dist/channel-BRehZ4Cg.js +2309 -0
- package/dist/channel-actions-hdQKe_se.js +46 -0
- package/dist/channel-bootstrap.runtime-BzjlNG_j.js +38 -0
- package/dist/channel-bootstrap.runtime-CmNNVl40.js +2 -0
- package/dist/channel-bootstrap.runtime.js +1 -1
- package/dist/channel-core-BLcWqSk-.js +5 -0
- package/dist/channel-inbound-pR1B7HTU.js +121 -0
- package/dist/channel-message-W0VurpjH.js +12 -0
- package/dist/channel-outbound-DO4HI6E_.js +436 -0
- package/dist/channel-plugin-resolution-CLA7S5_A.js +2 -0
- package/dist/channel-plugin-resolution-DzwVj01h.js +135 -0
- package/dist/channel-resolution-DOPyiG4k.js +46 -0
- package/dist/channel-selection-kwoWZDQ3.js +171 -0
- package/dist/channel-selection.runtime-LiDliif9.js +2 -0
- package/dist/channel-selection.runtime.js +1 -1
- package/dist/channel.runtime-DDt3PayH.js +697 -0
- package/dist/channel.runtime.js +1 -1
- package/dist/channels-CKJd4eUz.js +1004 -0
- package/dist/channels-cli-DLAPi8pX.js +331 -0
- package/dist/chat-6WsYrS9m.js +3 -0
- package/dist/chat-DpsCEXAx.js +2940 -0
- package/dist/chrome-BWHc9vYG.js +1517 -0
- package/dist/chrome-mcp-BGKgR8A_.js +2 -0
- package/dist/chrome-mcp-Bg5D5PDc.js +864 -0
- package/dist/claude-live-session-BLCZnv-A.js +2 -0
- package/dist/claude-live-session-CGnB64D6.js +1338 -0
- package/dist/clawbot-cli-ynXzgp8B.js +9 -0
- package/dist/cli/daemon-cli.js +3 -3
- package/dist/cli/gateway-lifecycle.runtime.js +4 -4
- package/dist/cli/run-main.js +12 -12
- package/dist/cli-B4Ttnj0P.js +2 -0
- package/dist/cli-BjVgdamH.js +2 -0
- package/dist/cli-CNqBrHLU.js +293 -0
- package/dist/cli-backends.runtime-DoxtCrow.js +7 -0
- package/dist/cli-backends.runtime.js +1 -1
- package/dist/cli-compaction-BCuLbs75.js +363 -0
- package/dist/cli-mthNIkji.js +141 -0
- package/dist/cli-registry-loader-B2sNTdgY.js +2 -0
- package/dist/cli-registry-loader-Dz9YFrjw.js +193 -0
- package/dist/cli-runner-C9t-9-Io.js +597 -0
- package/dist/cli-runner-D21qMGk7.js +2 -0
- package/dist/cli-runner.runtime-BNqbJFgu.js +3 -0
- package/dist/cli-runner.runtime-Dv50IEvH.js +4 -0
- package/dist/cli-runner.runtime.js +1 -1
- package/dist/cli-session-jBtClYfT.js +119 -0
- package/dist/cli-startup-metadata.json +9 -9
- package/dist/cli.runtime-CGBzSGAG.js +1276 -0
- package/dist/cli.runtime.js +1 -1
- package/dist/codex-native-web-search-B3C-srtm.js +20 -0
- package/dist/codex-native-web-search-B7xh2Xcb.js +4 -0
- package/dist/codex-native-web-search-core-CrwANQg5.js +106 -0
- package/dist/command-auth-Dz_pdczs.js +135 -0
- package/dist/command-config-resolution-XCA63Yv8.js +25 -0
- package/dist/command-config-resolution-xtKMDTG9.js +2 -0
- package/dist/command-config-resolution.runtime-xtKMDTG9.js +2 -0
- package/dist/command-config-resolution.runtime.js +1 -1
- package/dist/command-execution-startup-CasEqEXh.js +90 -0
- package/dist/command-primitives-runtime-DC9gtSI3.js +3 -0
- package/dist/command-registry-BQnMdca9.js +9 -0
- package/dist/command-registry-core-hx2t1jQP.js +114 -0
- package/dist/command-registry-rbKA-L_8.js +4 -0
- package/dist/command-secret-gateway-7oveYQCx.js +589 -0
- package/dist/command-secret-targets-B7M1Us_C.js +2 -0
- package/dist/command-status-builders-DrSoZhiI.js +147 -0
- package/dist/command-status.runtime-By0071-y.js +90 -0
- package/dist/command-status.runtime.js +1 -1
- package/dist/commands/status.summary.runtime.js +3 -3
- package/dist/commands-B1MnUj5-.js +161 -0
- package/dist/commands-compact.runtime-DELj3JaW.js +10 -0
- package/dist/commands-compact.runtime.js +1 -1
- package/dist/commands-core.runtime-Zw0grrkC.js +2 -0
- package/dist/commands-core.runtime.js +1 -1
- package/dist/commands-handlers.runtime-BCl_ZHJZ.js +6327 -0
- package/dist/commands-handlers.runtime.js +1 -1
- package/dist/commands-models-Uurm-0C3.js +448 -0
- package/dist/commands-registry-Bo1AeDcq.js +195 -0
- package/dist/commands-registry.runtime-C9DBHyhh.js +4 -0
- package/dist/commands-registry.runtime.js +1 -1
- package/dist/commands-status-BoAXH-wg.js +16 -0
- package/dist/commands-status-CNALMTN9.js +3 -0
- package/dist/commands-status.runtime-CNALMTN9.js +3 -0
- package/dist/commands-status.runtime.js +1 -1
- package/dist/commands-subagents-control.runtime-Dl4IuTzV.js +2 -0
- package/dist/commands-subagents-control.runtime.js +1 -1
- package/dist/commands-system-prompt-BPzpLmUp.js +2 -0
- package/dist/commands-system-prompt-DCOZSNh5.js +161 -0
- package/dist/commands.runtime-bfCLM0Sg.js +175 -0
- package/dist/commands.runtime.js +1 -1
- package/dist/commitments/runtime.js +1 -1
- package/dist/common-CoOYhmSg.js +286 -0
- package/dist/compact-yqaUOESq.js +1165 -0
- package/dist/compact.runtime-Y91AFZVE.js +12 -0
- package/dist/compact.runtime.js +1 -1
- package/dist/compaction-planning-DVnykwzd.js +202 -0
- package/dist/completion-cli-BJjq_g_B.js +393 -0
- package/dist/config-CsmSEaNn.js +374 -0
- package/dist/config-CtNXZ0iy.js +610 -0
- package/dist/config-cli-CNpIVdqp.js +1703 -0
- package/dist/config-mutation-B-SErGM0.js +5 -0
- package/dist/config-mutations-Bu3ahkX8.js +161 -0
- package/dist/config-utils-Bv0Nisds.js +141 -0
- package/dist/config-validation-DitvTYD8.js +33 -0
- package/dist/configure-CdjbRKTg.js +771 -0
- package/dist/configure-Cvi-5ml4.js +3 -0
- package/dist/configure.commands-BJii4733.js +1253 -0
- package/dist/configure.commands-tJzVFJ0o.js +2 -0
- package/dist/context-D1N9oPds.js +2 -0
- package/dist/context-XMtJ9b3v.js +248 -0
- package/dist/context-engine-host-compat-3QznbSaW.js +280 -0
- package/dist/context-engine-host-compat-DquSpnKD.js +2 -0
- package/dist/context-engine-lifecycle-Bqdhy9JU.js +627 -0
- package/dist/control-auth-CMW_9jmY.js +114 -0
- package/dist/control-service-D-r3k91q.js +40 -0
- package/dist/control-service-uIPYrp9F.js +3 -0
- package/dist/control-ui/assets/activity-DgMhyllD.js +124 -0
- package/dist/control-ui/assets/agents-CsRhxO2O.js +1030 -0
- package/dist/control-ui/assets/channels-Dq8bzpMg.js +120 -0
- package/dist/control-ui/assets/cron-Dk5bqYwg.js +1016 -0
- package/dist/control-ui/assets/debug-CNIwFEQO.js +97 -0
- package/dist/control-ui/assets/index-CV2NsPlu.js +7214 -0
- package/dist/control-ui/assets/instances-DLr0iEvT.js +57 -0
- package/dist/control-ui/assets/nodes-D3JEksjl.js +444 -0
- package/dist/control-ui/assets/sessions-nbXWGlHZ.js +425 -0
- package/dist/control-ui/assets/skills-tBOi8OBq.js +362 -0
- package/dist/control-ui/assets/workboard-ClTo7wmK.js +402 -0
- package/dist/control-ui/index.html +1 -1
- package/dist/control-ui/sw.js +1 -1
- package/dist/control-ui-AkRMsk9S.js +750 -0
- package/dist/conversation-label-generator-DHtcgSBn.js +72 -0
- package/dist/conversation-runtime-BEgHW4ta.js +31 -0
- package/dist/core-Bslrvfnp.js +284 -0
- package/dist/core-api-BOlUb7G8.js +5 -0
- package/dist/core-api-CiBoGa2I.js +2 -0
- package/dist/crestodian/crestodian.js +1 -1
- package/dist/crestodian/rescue-message.js +1 -1
- package/dist/crestodian-mXnyuHx9.js +55 -0
- package/dist/cron-PbdpyFrD.js +453 -0
- package/dist/daemon-install-C-d4dFvn.js +66 -0
- package/dist/daemon-install-auth-profiles-store.runtime-CvE2EVVo.js +2 -0
- package/dist/daemon-install-auth-profiles-store.runtime.js +1 -1
- package/dist/dashboard-Ey5dnvMI.js +263 -0
- package/dist/defaults-CsRAv-qE.js +130 -0
- package/dist/defaults-DHZBSNHC.js +3 -0
- package/dist/defaults.constants-CR4S_tvw.js +76 -0
- package/dist/deliver-BkuuFBlm.js +1399 -0
- package/dist/deliver-P4upyes7.js +3 -0
- package/dist/deliver-runtime-CjnLI_nC.js +2 -0
- package/dist/delivery-outbound.runtime-fcJ-M8qj.js +7 -0
- package/dist/delivery-outbound.runtime.js +1 -1
- package/dist/delivery-queue-BqgHvNlY.js +863 -0
- package/dist/delivery-queue-CfsRscJb.js +2 -0
- package/dist/delivery-queue-runtime-D0PKG1Bv.js +16 -0
- package/dist/delivery-target.runtime-C5e8d0WH.js +45 -0
- package/dist/delivery-target.runtime.js +1 -1
- package/dist/delivery.runtime-2Ut8xM3P.js +470 -0
- package/dist/delivery.runtime.js +1 -1
- package/dist/detached-task-runtime-OOZBqRy-.js +86 -0
- package/dist/diagnostics-zf6WQ2h7.js +168 -0
- package/dist/dialogue-C8IOya-l.js +37 -0
- package/dist/direct-dm-wPF-KfNb.js +81 -0
- package/dist/directive-handling.defaults-C-1lmFYo.js +22 -0
- package/dist/directive-handling.fast-lane-DENPMtYI.js +70 -0
- package/dist/directive-handling.impl-C1p5t3qA.js +2 -0
- package/dist/directive-handling.impl-DOo2Sa7C.js +823 -0
- package/dist/directive-handling.model-selection-6gC-fr_g.js +122 -0
- package/dist/directive-handling.persist.runtime-CuhUd2kW.js +274 -0
- package/dist/directive-handling.persist.runtime.js +1 -1
- package/dist/directives-BIKSyN8C.js +319 -0
- package/dist/directory-cli-DZ0PU0Rv.js +239 -0
- package/dist/dispatch-DQLImAqt.js +2057 -0
- package/dist/dispatch-acp-DzyX7wsq.js +1102 -0
- package/dist/dispatch-acp-manager.runtime-CoAfs4O1.js +3 -0
- package/dist/dispatch-acp-manager.runtime.js +1 -1
- package/dist/dispatch-acp-media.runtime-7uUP_jr9.js +4 -0
- package/dist/dispatch-acp-media.runtime.js +1 -1
- package/dist/dispatch-acp-transcript.runtime-BUlmV_h0.js +40 -0
- package/dist/dispatch-acp-transcript.runtime.js +1 -1
- package/dist/dispatch-acp-tts.runtime-ChBnVkNt.js +3 -0
- package/dist/dispatch-acp-tts.runtime.js +1 -1
- package/dist/dispatch-acp.runtime-DAexFaBu.js +18 -0
- package/dist/dispatch-acp.runtime.js +1 -1
- package/dist/dispatcher-D3IQEbf9.js +106 -0
- package/dist/doctor-BSqEqfb6.js +760 -0
- package/dist/doctor-auth-flat-profiles-BIZ4wsYP.js +2 -0
- package/dist/doctor-auth-flat-profiles-DXtD5LfC.js +516 -0
- package/dist/doctor-auth-legacy-oauth-DwFbRYTP.js +48 -0
- package/dist/doctor-auth-oauth-sidecar-6I3FEJbi.js +2 -0
- package/dist/doctor-auth-oauth-sidecar-BSC3rnDM.js +177 -0
- package/dist/doctor-auth-tVGsUiM6.js +216 -0
- package/dist/doctor-bootstrap-size-B0q6bdkO.js +57 -0
- package/dist/doctor-claude-cli-Bn79OuBT.js +150 -0
- package/dist/doctor-config-flow-CCwocXpV.js +1819 -0
- package/dist/doctor-core-checks-D7-1l8jy.js +666 -0
- package/dist/doctor-core-checks-eM8FNi8B.js +2 -0
- package/dist/doctor-core-checks.runtime-Dc03aeoU.js +278 -0
- package/dist/doctor-core-checks.runtime.js +1 -1
- package/dist/doctor-gRYfpEbB.js +6 -0
- package/dist/doctor-gateway-daemon-flow-KTnHAdeV.js +349 -0
- package/dist/doctor-gateway-services-BByDQtjY.js +465 -0
- package/dist/doctor-health-CnoM718z.js +65 -0
- package/dist/doctor-health-contributions-flVKMQwr.js +874 -0
- package/dist/doctor-lint-BBm6gtBa.js +95 -0
- package/dist/doctor-memory-search-DjHVDCGo.js +407 -0
- package/dist/doctor-state-integrity-Bgw25cz1.js +1257 -0
- package/dist/doctor-tool-result-cap-advice-B8wTpiTO.js +27 -0
- package/dist/doctor-workspace-status-DcjeJIpT.js +76 -0
- package/dist/dreaming-BE4t8DVf.js +523 -0
- package/dist/dreaming-command-DWm1lB-Z.js +101 -0
- package/dist/dreaming-narrative-8DM-OMrm.js +721 -0
- package/dist/dreaming-narrative-CcFfheQI.js +2 -0
- package/dist/dreaming-phases-CqOhhTdZ.js +2 -0
- package/dist/dreaming-phases-D9eT6Kk0.js +1162 -0
- package/dist/drive-D2M5B7-2.js +899 -0
- package/dist/echo-transcript-B-wl5MoX.js +52 -0
- package/dist/effective-tool-policy-Cx8mC5aA.js +89 -0
- package/dist/embedded-agent-BTvtoOe_.js +4 -0
- package/dist/embedded-agent-CGmSKuNM.js +4074 -0
- package/dist/embedded-agent-helpers-CboIPx57.js +6 -0
- package/dist/embedded-agent-helpers-cw0InMDZ.js +1037 -0
- package/dist/embedded-agent.runtime-Bfe4bjyF.js +4 -0
- package/dist/embedded-agent.runtime.js +1 -1
- package/dist/embedded-backend-D-EshN85.js +744 -0
- package/dist/embedded-gateway-stub.runtime-Cx9qs0KV.js +12 -0
- package/dist/embedded-gateway-stub.runtime.js +1 -1
- package/dist/embedding-provider-runtime-DaXfsUPo.js +86 -0
- package/dist/embedding-providers-CdU99clu.js +2 -0
- package/dist/embeddings-http-BQnlTr-1.js +222 -0
- package/dist/engine-qmd-5jbjGywA.js +708 -0
- package/dist/engine-storage-CfAgwoDp.js +203 -0
- package/dist/entry.js +1 -1
- package/dist/errors-C0AUxo3P.js +2 -0
- package/dist/exec-approval-forwarder.runtime-BvR47p5Z.js +4 -0
- package/dist/exec-approval-forwarder.runtime.js +1 -1
- package/dist/exec-approval-session-target-CCqYgaVa.js +177 -0
- package/dist/exec-auto-reviewer-BfJaNkNy.js +2 -0
- package/dist/exec-auto-reviewer-Dqx7I88Z.js +241 -0
- package/dist/execute.runtime-Qb6Z75sG.js +579 -0
- package/dist/execute.runtime.js +1 -1
- package/dist/extensionAPI.js +2 -2
- package/dist/extensions/active-memory/index.js +3 -3
- package/dist/extensions/admin-http-rpc/index.js +1 -1
- package/dist/extensions/alibaba/index.js +1 -1
- package/dist/extensions/alibaba/video-generation-provider.js +1 -1
- package/dist/extensions/baichuan/index.js +1 -1
- 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 +5 -5
- package/dist/extensions/browser/browser-control-auth.js +2 -2
- package/dist/extensions/browser/browser-doctor.js +3 -3
- package/dist/extensions/browser/browser-maintenance.js +1 -1
- package/dist/extensions/browser/browser-profiles.js +3 -3
- package/dist/extensions/browser/browser-runtime-api.js +14 -14
- package/dist/extensions/browser/cli-metadata.js +1 -1
- package/dist/extensions/browser/index.js +1 -1
- package/dist/extensions/browser/plugin-registration.js +1 -1
- package/dist/extensions/browser/register.runtime.js +4 -4
- package/dist/extensions/browser/runtime-api.js +16 -16
- package/dist/extensions/byteplus/index.js +3 -3
- package/dist/extensions/byteplus/video-generation-provider.js +1 -1
- package/dist/extensions/canvas/index.js +3 -3
- package/dist/extensions/canvas/runtime-api.js +2 -2
- package/dist/extensions/deepseek/index.js +1 -1
- package/dist/extensions/device-pair/api.js +2 -2
- package/dist/extensions/device-pair/pair-command-approve.js +1 -1
- package/dist/extensions/device-pair/qr-image.js +2 -2
- package/dist/extensions/longcat/index.js +1 -1
- package/dist/extensions/memory-core/api.js +3 -3
- package/dist/extensions/memory-core/cli-metadata.js +1 -1
- package/dist/extensions/memory-core/cli.js +2 -2
- package/dist/extensions/memory-core/index.js +11 -11
- package/dist/extensions/memory-core/manager-runtime.js +1 -1
- package/dist/extensions/memory-core/runtime-api.js +6 -6
- 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/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/provider-registration.js +1 -1
- package/dist/extensions/minimax/speech-provider.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/moonshot/index.js +5 -5
- package/dist/extensions/moonshot/media-understanding-provider.js +1 -1
- package/dist/extensions/moonshot/web-search-provider.js +1 -1
- package/dist/extensions/qianfan/index.js +1 -1
- package/dist/extensions/qwen/index.js +5 -5
- package/dist/extensions/qwen/media-understanding-provider.js +1 -1
- package/dist/extensions/qwen/video-generation-provider.js +1 -1
- package/dist/extensions/sensenova/index.js +1 -1
- package/dist/extensions/skill-workshop/api.js +2 -2
- package/dist/extensions/skill-workshop/index.js +4 -4
- package/dist/extensions/stepfun/index.js +2 -2
- package/dist/extensions/tavily/index.js +1 -1
- package/dist/extensions/tavily/web-search-provider.js +1 -1
- package/dist/extensions/tencent/index.js +2 -2
- package/dist/extensions/tiangong/index.js +1 -1
- package/dist/extensions/volcengine/index.js +3 -3
- package/dist/extensions/volcengine/speech-provider.js +1 -1
- package/dist/extensions/webhooks/api.js +1 -1
- package/dist/extensions/webhooks/index.js +1 -1
- package/dist/extensions/weixin/index.js +3 -3
- package/dist/extensions/workboard/index.js +2 -2
- package/dist/extensions/xiaomi/index.js +4 -4
- package/dist/extensions/xiaomi/speech-provider.js +1 -1
- package/dist/extensions/xingchen/index.js +1 -1
- package/dist/extensions/yi/index.js +1 -1
- package/dist/extensions/zai/index.js +4 -4
- package/dist/extensions/zai/media-understanding-provider.js +1 -1
- package/dist/extensions/zhinao/index.js +1 -1
- package/dist/external-cli-auth-selection-CM_aOUJw.js +113 -0
- package/dist/extra-params-Bm1eLWN9.js +615 -0
- package/dist/fallback-notice-state-v1kyWACv.js +15 -0
- package/dist/fallbacks-CDllk2g1.js +31 -0
- package/dist/fallbacks-shared-DdMKEmAC.js +116 -0
- package/dist/fengming-runtime-DSv30J04.js +33 -0
- package/dist/fengming-runtime-config-BE-DquuY.js +2 -0
- package/dist/fengming-runtime-memory-BE-DquuY.js +2 -0
- package/dist/fengming-runtime-session-BE-DquuY.js +2 -0
- package/dist/fengming-tools-DHb-ZeDC.js +12221 -0
- package/dist/flows-Cz3y10A9.js +189 -0
- package/dist/fs-utils-D05rps7O.js +9 -0
- package/dist/gateway/protocol/index.d.ts +1 -1
- package/dist/gateway-DTi2D7ZS.js +133 -0
- package/dist/gateway-cli-DT2fL2fX.js +443 -0
- package/dist/gateway-install-token-CJhAycOA.js +136 -0
- package/dist/gateway-method-runtime-BuiYTDQk.js +21 -0
- package/dist/gateway-runtime-C5_cVlSW.js +23 -0
- package/dist/get-reply-Cz-dUrWm.js +5198 -0
- package/dist/get-reply-from-config.runtime-BC1HT67i.js +2 -0
- package/dist/get-reply-from-config.runtime.js +1 -1
- package/dist/github-copilot-token-09lxV3kH.js +2 -0
- package/dist/health-CmihbcqN.js +621 -0
- package/dist/health-D8L37hBZ.js +111 -0
- package/dist/health-DU7I9RrJ.js +3 -0
- package/dist/health-state-QZ2E6xGQ.js +106 -0
- package/dist/heartbeat-runner-Bz5PMzEI.js +1930 -0
- package/dist/heartbeat-runner-DfqqQ_8w.js +5 -0
- package/dist/heartbeat-runner.runtime-8BshUhoS.js +3 -0
- package/dist/heartbeat-runner.runtime.js +1 -1
- package/dist/helpers-Bkq4POdX.js +406 -0
- package/dist/hook-helpers-nmDwt3Fa.js +44 -0
- package/dist/hooks-9FOcRqfu.js +536 -0
- package/dist/hooks-cli-CrQelcwo.js +465 -0
- package/dist/http-endpoint-helpers-BD5u6YsT.js +37 -0
- package/dist/http-utils-RcKuBJ0I.js +98 -0
- package/dist/image-DwNoypK2.js +385 -0
- package/dist/image-fallbacks-BUyDnmUX.js +31 -0
- package/dist/image-generation-core.auth.runtime-CA8miEMh.js +2 -0
- package/dist/image-generation-core.auth.runtime.js +1 -1
- package/dist/image-generation-provider-DXMW5EmB.js +152 -0
- package/dist/image-runtime-D5QpNNzz.js +9 -0
- package/dist/image-tool.helpers-6vGxo1Y0.js +150 -0
- package/dist/images-BGWLzQEJ.js +416 -0
- package/dist/images-Db4UB3JG.js +2 -0
- package/dist/inbound-reply-dispatch-DRF6ZmQg.js +2 -0
- package/dist/inbound-reply-dispatch-RAKLqow4.js +147 -0
- package/dist/index-DhOQs6M_.d.ts +1497 -0
- package/dist/index.js +1 -1
- package/dist/infra-runtime-BFrpRc_V.js +32 -0
- package/dist/init-sR7bCS9D.js +59 -0
- package/dist/install-BzdJbOUx.js +262 -0
- package/dist/install.runtime-Zye6pbZ6.js +2 -0
- package/dist/internal-DL_vFx8C.js +399 -0
- package/dist/isolated-agent-Qif8Llbt.js +2 -0
- package/dist/isolated-agent-aqEjxqs-.js +1097 -0
- package/dist/kernel-B-i4c2IK.js +979 -0
- package/dist/kernel-DYDJ_hLb.js +3 -0
- package/dist/kimi-web-search-provider.runtime-95HAkvHY.js +307 -0
- package/dist/kimi-web-search-provider.runtime.js +1 -1
- package/dist/library-CZVbE5hF.js +45 -0
- package/dist/lifecycle-C8M3YLbT.js +2 -0
- package/dist/lifecycle-CPDNQnUN.js +570 -0
- package/dist/lifecycle-DpuP7n3J.js +355 -0
- package/dist/lifecycle.runtime-C8M3YLbT.js +2 -0
- package/dist/lifecycle.runtime.js +1 -1
- package/dist/link-understanding/apply.runtime.js +3 -3
- package/dist/list-B_ALwpPl.js +2 -0
- package/dist/list-Bda_GYFy.js +207 -0
- package/dist/list.list-command-W9OGfAIU.js +429 -0
- package/dist/list.model-row-LV4AaX0H.js +39 -0
- package/dist/list.probe-CrZm6BH2.js +451 -0
- package/dist/list.probe-Dfdmb8bC.js +2 -0
- package/dist/list.provider-catalog-7T1jKk0n.js +211 -0
- package/dist/list.provider-catalog-DjGyZVEj.js +2 -0
- package/dist/list.registry-load-DkCS8JZQ.js +152 -0
- package/dist/list.row-sources-B1vjo_Y9.js +474 -0
- package/dist/list.source-plan-C9Sa6zRK.js +81 -0
- package/dist/list.status-command-9daSZZDm.js +815 -0
- package/dist/live-model-switch-Dy-UFUMS.js +119 -0
- package/dist/llm-slug-generator-DEmh5-_1.js +78 -0
- package/dist/llm-slug-generator.js +1 -1
- package/dist/load-config-CvQpC8k6.js +27 -0
- package/dist/load-context-_qSHpZ5S.js +82 -0
- package/dist/loader-CntMt07B.js +7008 -0
- package/dist/local-dispatch.runtime-BSN_gqNS.js +10 -0
- package/dist/local-dispatch.runtime.js +1 -1
- package/dist/main-session-restart-recovery-Db7366lt.js +2 -0
- package/dist/main-session-restart-recovery-n87NTooQ.js +389 -0
- package/dist/managed-image-attachments-BTBBHlKl.js +2 -0
- package/dist/managed-image-attachments-C6_V1yX0.js +616 -0
- package/dist/manager-CKrWxjV6.js +3737 -0
- package/dist/manager-Dvb1FVnx.js +2314 -0
- package/dist/mcp/plugin-tools-serve.js +2 -2
- package/dist/mcp-http-CSoGXOa_.js +583 -0
- package/dist/mcp-http-D4ieDB3W.js +2 -0
- package/dist/media-runtime-GeQTQkkK.js +391 -0
- package/dist/media-services-CWbIUZDe.js +416 -0
- package/dist/media-understanding/apply.runtime.js +1 -1
- package/dist/media-understanding-DXc2BD2L.js +87 -0
- package/dist/media-understanding-provider-BkdUiVWU.js +70 -0
- package/dist/media-understanding-provider-BlgmLViW.js +13 -0
- package/dist/media-understanding-provider-C9P2VjkC.js +29 -0
- package/dist/media-understanding-provider-CJlbgAvl.js +69 -0
- package/dist/memory-CnC2jM1l.js +437 -0
- package/dist/memory-core-host-engine-embeddings-Dy9vN-Ce.js +667 -0
- package/dist/memory-core-host-engine-foundation-C-pGGQnm.js +15 -0
- package/dist/memory-core-host-engine-qmd-DLJDON9w.js +2 -0
- package/dist/memory-core-host-engine-storage-Bzf-C8XE.js +2 -0
- package/dist/memory-core-host-runtime-cli-_LWA6G3x.js +10 -0
- package/dist/memory-core-host-runtime-core-CromkNBr.js +12 -0
- package/dist/memory-core-host-runtime-files-DpbviC1b.js +4 -0
- package/dist/memory-embedding-provider-runtime-CaVVaYC5.js +36 -0
- package/dist/memory-host-core-B5dWHwBF.js +78 -0
- package/dist/memory-host-search.runtime-DqlCFac1.js +2 -0
- package/dist/memory-host-search.runtime.js +1 -1
- package/dist/memory-runtime-BCeeWb1G.js +2 -0
- package/dist/memory-runtime-pR9KGin0.js +57 -0
- package/dist/memory-search-CpDEEY2Q.js +235 -0
- package/dist/message-BeGCG-D8.js +284 -0
- package/dist/message-YGMOyqP5.js +2 -0
- package/dist/message-action-runner-ByMT3_eb.js +1922 -0
- package/dist/message-action-runner-VXmKO_W7.js +2 -0
- package/dist/message-handler-MZ0DMbCx.js +1806 -0
- package/dist/metadata-registry-loader-BH9D1UOx.js +2 -0
- package/dist/metadata-registry-loader-BK1cHCas.js +22 -0
- package/dist/migrate-BA6w0hd3.js +2 -0
- package/dist/migrate-BGuQC-1W.js +458 -0
- package/dist/migration-provider-runtime-BBdDegWG.js +2 -0
- package/dist/migration-provider-runtime-C5WUjrQz.js +68 -0
- package/dist/minimax-web-search-provider.runtime-suVFk3Zx.js +148 -0
- package/dist/minimax-web-search-provider.runtime.js +1 -1
- package/dist/model-BJZXR9dq.js +1302 -0
- package/dist/model-BL7xlN5h.js +2 -0
- package/dist/model-auth-C-6dYVob.js +6 -0
- package/dist/model-auth-DJz7R41W.js +705 -0
- package/dist/model-auth-label-DKNXktIu.js +67 -0
- package/dist/model-catalog-BjiK5rtT.js +3 -0
- package/dist/model-catalog-DM1CTjkW.js +434 -0
- package/dist/model-catalog-visibility-DEJZG0In.js +76 -0
- package/dist/model-config.helpers-BKcUeE_P.js +95 -0
- package/dist/model-context-tokens-5y_PQELY.js +572 -0
- package/dist/model-fallback-BDdBR053.js +1288 -0
- package/dist/model-fallback-auth.runtime-pcWfkIUF.js +5 -0
- package/dist/model-fallback-auth.runtime.js +1 -1
- package/dist/model-picker-Bpvp4_N4.js +1135 -0
- package/dist/model-picker-DWPPtq6d.js +3 -0
- package/dist/model-picker-visibility-BtdqVF80.js +22 -0
- package/dist/model-picker.runtime-CYlqts2z.js +48 -0
- package/dist/model-picker.runtime.js +1 -1
- package/dist/model-pricing-cache-BmmncDqL.js +856 -0
- package/dist/model-pricing-cache-CEwRyWw2.js +3 -0
- package/dist/model-pricing-cache-state-B8Aspp85.js +83 -0
- package/dist/model-provider-auth-B3KXoKkE.js +2 -0
- package/dist/model-provider-auth-Bo_8T7of.js +375 -0
- package/dist/model-runtime-aliases-Br-ZlhrL.js +133 -0
- package/dist/model-selection-D5-ERakL.js +254 -0
- package/dist/model-selection-DrzgktRu.js +7 -0
- package/dist/model-selection-ibwsPgIw.js +352 -0
- package/dist/model-selection.runtime-BRkOZejt.js +7 -0
- package/dist/model-selection.runtime.js +1 -1
- package/dist/models-RPAH3ZBn.js +57 -0
- package/dist/models-auth-status-Cwu9OXU8.js +280 -0
- package/dist/models-cli-CrYkSUoa.js +257 -0
- package/dist/models-config-Ayzj9gDz.js +1189 -0
- package/dist/models-config-BFcjB7nN.js +2 -0
- package/dist/models-config.providers.secrets-CCRUW7gL.js +2 -0
- package/dist/models-config.providers.secrets-DdX_XSRo.js +382 -0
- package/dist/models-http-jLFnelH7.js +88 -0
- package/dist/monitor-CqWICrjO.js +60 -0
- package/dist/monitor-DwccYPfp.js +1024 -0
- package/dist/monitor.account-e9EVttpP.js +5382 -0
- package/dist/music-generation-provider-Dfc--R-x.js +308 -0
- package/dist/native-hook-relay-Cioqiqv8.js +1378 -0
- package/dist/native-hook-relay-DRwJIspI.js +19 -0
- package/dist/node-cli-CrG3LH9J.js +2806 -0
- package/dist/node-command-policy-CkBTEmhl.js +295 -0
- package/dist/nodes-BxrWFA09.js +1483 -0
- package/dist/nodes-DFPTGZjc.js +3 -0
- package/dist/nodes-cli-Czwyt6r1.js +960 -0
- package/dist/nodes-pending-B_4QHyB2.js +211 -0
- package/dist/nodes-utils-c4k31OaG.js +85 -0
- package/dist/oauth-BXncC0JP.js +852 -0
- package/dist/oauth-Ba1O2vqP.js +207 -0
- package/dist/oauth-CGQkfxbJ.js +746 -0
- package/dist/onboard-I5tQlVm6.js +768 -0
- package/dist/onboard-channels-BleKfB1D.js +2 -0
- package/dist/onboard-channels-jVaUjGYX.js +1534 -0
- package/dist/onboard-custom-BR_5oqUr.js +3 -0
- package/dist/onboard-custom-Ss0DThuP.js +280 -0
- package/dist/onboard-custom-config-B-knjQm7.js +422 -0
- package/dist/onboard-search-BsIztGYF.js +412 -0
- package/dist/openai-compat-errors-UkLkk8Q9.js +136 -0
- package/dist/openai-http-mTQB44gu.js +836 -0
- package/dist/openai-transport-stream-CZSs3SIi.js +3427 -0
- package/dist/openresponses-http-BA1Shmj-.js +1175 -0
- package/dist/operations-DhgPih1F.js +805 -0
- package/dist/order-CaXafMPG.js +218 -0
- package/dist/outbound-attachment-BAp7DXDc.js +19 -0
- package/dist/param-readers-De-m2SoB.js +2 -0
- package/dist/payloads-Dg9aAEOC.js +256 -0
- package/dist/persistent-bindings.lifecycle-BkLOz501.js +2 -0
- package/dist/persistent-bindings.lifecycle-e2MLbBCo.js +85 -0
- package/dist/plugin-enabled-CGSENjXc.js +232 -0
- package/dist/plugin-install-BI9_bsVT.js +118 -0
- package/dist/plugin-install-an4V2iXO.js +2 -0
- package/dist/plugin-install-config-policy-C66Nss3D.js +169 -0
- package/dist/plugin-registration-DMerQktl.js +97 -0
- package/dist/plugin-registry-BZfdCw65.js +3 -0
- package/dist/plugin-registry-I1fegSdK.js +2 -0
- package/dist/plugin-runtime-B3XMLJka.js +102 -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-backend.js +1 -1
- package/dist/plugin-sdk/acp-runtime.js +2 -2
- package/dist/plugin-sdk/agent-harness-runtime.js +16 -16
- package/dist/plugin-sdk/agent-harness-task-runtime.js +4 -4
- package/dist/plugin-sdk/agent-harness.js +17 -17
- package/dist/plugin-sdk/agent-runtime.js +17 -17
- package/dist/plugin-sdk/agent-sessions.js +1 -1
- package/dist/plugin-sdk/approval-native-runtime.js +2 -2
- package/dist/plugin-sdk/approval-reaction-runtime.js +1 -1
- package/dist/plugin-sdk/approval-runtime.js +2 -2
- package/dist/plugin-sdk/bundled-channel-config-schema-BsOWCrJT.d.ts +3169 -0
- package/dist/plugin-sdk/bundled-channel-config-schema.d.ts +1 -1
- package/dist/plugin-sdk/channel-actions.js +2 -2
- package/dist/plugin-sdk/channel-config-schema-legacy.d.ts +1 -1
- package/dist/plugin-sdk/channel-core.js +2 -2
- package/dist/plugin-sdk/channel-envelope.js +1 -1
- package/dist/plugin-sdk/channel-inbound-roots.js +1 -1
- package/dist/plugin-sdk/channel-inbound.js +4 -4
- package/dist/plugin-sdk/channel-location.js +1 -1
- package/dist/plugin-sdk/channel-message-runtime.js +5 -5
- package/dist/plugin-sdk/channel-message.js +5 -5
- package/dist/plugin-sdk/channel-outbound.js +2 -2
- package/dist/plugin-sdk/channel-reply-options-runtime.js +1 -1
- package/dist/plugin-sdk/command-auth-native.js +2 -2
- package/dist/plugin-sdk/command-auth.js +4 -4
- package/dist/plugin-sdk/command-primitives-runtime.js +2 -2
- package/dist/plugin-sdk/command-status-runtime.js +1 -1
- package/dist/plugin-sdk/command-status.js +1 -1
- package/dist/plugin-sdk/compat.js +2 -2
- package/dist/plugin-sdk/config-mutation.js +2 -2
- package/dist/plugin-sdk/config-runtime.js +1 -1
- package/dist/plugin-sdk/config-schema.d.ts +2 -2
- package/dist/plugin-sdk/conversation-binding-runtime.js +1 -1
- package/dist/plugin-sdk/conversation-runtime.js +3 -3
- package/dist/plugin-sdk/core.js +3 -3
- package/dist/plugin-sdk/delivery-queue-runtime.js +1 -1
- package/dist/plugin-sdk/direct-dm.js +1 -1
- package/dist/plugin-sdk/discord.d.ts +1 -1
- package/dist/plugin-sdk/embedding-providers.js +2 -2
- package/dist/plugin-sdk/gateway-method-runtime.js +1 -1
- package/dist/plugin-sdk/gateway-runtime.js +2 -2
- package/dist/plugin-sdk/health.js +1 -1
- package/dist/plugin-sdk/image-generation-core.js +3 -3
- package/dist/plugin-sdk/image-generation-runtime.js +1 -1
- package/dist/plugin-sdk/image-generation.js +2 -2
- package/dist/plugin-sdk/inbound-reply-dispatch.js +3 -3
- package/dist/plugin-sdk/index.js +1 -1
- package/dist/plugin-sdk/infra-runtime.js +3 -3
- package/dist/plugin-sdk/mattermost.js +1 -1
- package/dist/plugin-sdk/media-generation-runtime-shared.js +1 -1
- package/dist/plugin-sdk/media-generation-runtime.js +1 -1
- package/dist/plugin-sdk/media-runtime.js +7 -7
- package/dist/plugin-sdk/media-understanding-runtime.js +1 -1
- package/dist/plugin-sdk/media-understanding.js +2 -2
- package/dist/plugin-sdk/memory-core-host-engine-embeddings.js +4 -4
- package/dist/plugin-sdk/memory-core-host-engine-foundation.js +2 -2
- package/dist/plugin-sdk/memory-core-host-engine-qmd.js +2 -2
- package/dist/plugin-sdk/memory-core-host-engine-storage.js +6 -6
- package/dist/plugin-sdk/memory-core-host-runtime-cli.js +2 -2
- package/dist/plugin-sdk/memory-core-host-runtime-core.js +3 -3
- package/dist/plugin-sdk/memory-core-host-runtime-files.js +4 -4
- package/dist/plugin-sdk/memory-core.js +3 -3
- package/dist/plugin-sdk/memory-host-core.js +3 -3
- package/dist/plugin-sdk/memory-host-files.js +4 -4
- package/dist/plugin-sdk/memory-host-search.js +1 -1
- package/dist/plugin-sdk/models-provider-runtime.js +1 -1
- package/dist/plugin-sdk/music-generation-core.js +1 -1
- package/dist/plugin-sdk/native-command-registry.js +1 -1
- package/dist/plugin-sdk/outbound-media.js +2 -2
- package/dist/plugin-sdk/outbound-runtime.js +3 -3
- package/dist/plugin-sdk/param-readers.js +2 -2
- package/dist/plugin-sdk/plugin-runtime.js +2 -2
- package/dist/plugin-sdk/provider-auth-api-key.js +4 -4
- package/dist/plugin-sdk/provider-auth-login.js +1 -1
- package/dist/plugin-sdk/provider-auth-runtime.js +2 -2
- package/dist/plugin-sdk/provider-auth.js +6 -6
- package/dist/plugin-sdk/provider-catalog-runtime.js +2 -2
- package/dist/plugin-sdk/provider-entry.js +1 -1
- package/dist/plugin-sdk/provider-setup.js +1 -1
- package/dist/plugin-sdk/provider-stream-family.js +3 -3
- package/dist/plugin-sdk/provider-stream.js +2 -2
- package/dist/plugin-sdk/provider-transport-runtime.js +1 -1
- package/dist/plugin-sdk/provider-web-fetch.js +2 -2
- package/dist/plugin-sdk/provider-web-search.js +4 -4
- package/dist/plugin-sdk/realtime-bootstrap-context.js +2 -2
- package/dist/plugin-sdk/realtime-transcription.js +1 -1
- package/dist/plugin-sdk/realtime-voice.js +2 -2
- package/dist/plugin-sdk/reply-dispatch-runtime.js +1 -1
- package/dist/plugin-sdk/reply-runtime.js +6 -6
- package/dist/plugin-sdk/runtime-secret-resolution.js +2 -2
- package/dist/plugin-sdk/runtime.js +3 -3
- package/dist/plugin-sdk/self-hosted-provider-setup.js +1 -1
- package/dist/plugin-sdk/simple-completion-runtime.js +1 -1
- package/dist/plugin-sdk/speech-core.js +2 -2
- package/dist/plugin-sdk/speech.js +1 -1
- package/dist/plugin-sdk/tool-plugin.js +1 -1
- package/dist/plugin-sdk/transcripts.js +1 -1
- package/dist/plugin-sdk/tts-runtime.js +1 -1
- package/dist/plugin-sdk/video-generation-core.js +2 -2
- package/dist/plugin-sdk/video-generation-runtime.js +1 -1
- package/dist/plugin-sdk/web-media.js +3 -3
- package/dist/plugin-sdk/zalouser.js +1 -1
- package/dist/plugin-service-2XF6Lu_a.js +1249 -0
- package/dist/plugins/build-smoke-entry.js +2 -2
- package/dist/plugins/loader.js +1 -1
- package/dist/plugins/provider-discovery.runtime.js +1 -1
- package/dist/plugins/provider-runtime.runtime.js +1 -1
- package/dist/plugins/runtime/index.js +19 -19
- package/dist/plugins/tools.js +1 -1
- package/dist/plugins-authoring-command-CCX6tJwd.js +304 -0
- package/dist/plugins-cli-HX8nTV2h.js +63 -0
- package/dist/plugins-cli.runtime-BYn4VsLP.js +339 -0
- package/dist/plugins-cli.runtime.js +1 -1
- package/dist/plugins-command-helpers-ByuW-yNj.js +2 -0
- package/dist/plugins-command-helpers-DaaxGnCD.js +164 -0
- package/dist/plugins-inspect-command-C9NDk23X.js +248 -0
- package/dist/plugins-install-command-B0NfUxeA.js +993 -0
- package/dist/plugins-install-command-BmuScfLI.js +2 -0
- package/dist/plugins-install-persist-CfwO876P.js +252 -0
- package/dist/plugins-list-command-Bx8X908n.js +184 -0
- package/dist/plugins-uninstall-command-p6h44-Ft.js +118 -0
- package/dist/postinstall-inventory.json +862 -862
- package/dist/prepare.runtime-8DdQ4k9k.js +798 -0
- package/dist/prepare.runtime.js +1 -1
- package/dist/presentation-card-DeAf3jYW.js +164 -0
- package/dist/preview-warnings-BF7nlTo8.js +618 -0
- package/dist/profiles-DUhMLnqX.js +194 -0
- package/dist/program-C7f_U7fr.js +131 -0
- package/dist/provider-adapters-CWLwE9KS.js +104 -0
- package/dist/provider-api-key-auth-CshQbUPZ.js +117 -0
- package/dist/provider-api-key-auth.runtime-B64jPCKn.js +14 -0
- package/dist/provider-api-key-auth.runtime.js +1 -1
- package/dist/provider-auth-D-I3YLSn.js +281 -0
- package/dist/provider-auth-api-key-Bub0Rjak.js +5 -0
- package/dist/provider-auth-choice-DpNAEScm.js +311 -0
- package/dist/provider-auth-choice-helpers-Bof937LW.js +210 -0
- package/dist/provider-auth-choice.runtime-B3spikLY.js +18 -0
- package/dist/provider-auth-choice.runtime-vVgz7FKq.js +2 -0
- package/dist/provider-auth-choice.runtime.js +1 -1
- package/dist/provider-auth-guidance-DcCL0Q2U.js +2 -0
- package/dist/provider-auth-guidance-rWRMN4Jn.js +34 -0
- package/dist/provider-auth-helpers-Cp8L-Xha.js +177 -0
- package/dist/provider-auth-login.runtime-BJUzc4iH.js +156 -0
- package/dist/provider-auth-login.runtime.js +1 -1
- package/dist/provider-auth-runtime-DmcWtzbb.js +186 -0
- package/dist/provider-discovery-JyAJi97k.js +95 -0
- package/dist/provider-discovery.runtime-D_0WTYr8.js +290 -0
- package/dist/provider-discovery.runtime.js +1 -1
- package/dist/provider-dispatcher-C8Jt94Xl.js +22 -0
- package/dist/provider-dispatcher.runtime.js +1 -1
- package/dist/provider-entry-By0ggZuI.js +134 -0
- package/dist/provider-hook-runtime-B8AUbQxf.js +255 -0
- package/dist/provider-openai-codex-oauth-C9Mmnt7d.js +2 -0
- package/dist/provider-openai-codex-oauth-CH5Jg1vk.js +44 -0
- package/dist/provider-registration-C1zvaHQP.js +235 -0
- package/dist/provider-registry-B9diJyLv.js +31 -0
- package/dist/provider-registry-BXSxmPGA.js +61 -0
- package/dist/provider-registry-CoE-sxbq.js +61 -0
- package/dist/provider-registry-DLth_GdI.js +61 -0
- package/dist/provider-registry-J4LRd5Rg.js +36 -0
- package/dist/provider-runtime-B4cw16pt.js +3 -0
- package/dist/provider-runtime-DNNbfwOK.js +386 -0
- package/dist/provider-runtime.runtime-98mAe_ni.js +26 -0
- package/dist/provider-runtime.runtime.js +1 -1
- package/dist/provider-self-hosted-setup-Dysv2Kwt.js +373 -0
- package/dist/provider-stream-BLaC8bqO.js +1084 -0
- package/dist/provider-stream-Caa5YOx2.js +313 -0
- package/dist/provider-stream-family-CvvfxLyP.js +2 -0
- package/dist/provider-usage-CVNosTP3.js +71 -0
- package/dist/provider-usage-D2NudXbO.js +4 -0
- package/dist/provider-usage.load-DG6R3lkG.js +357 -0
- package/dist/provider-web-search-DmgTaxRU.js +58 -0
- package/dist/provider-wizard-Cw-5H3tX.js +125 -0
- package/dist/providers.runtime-DF0T9lFz.js +240 -0
- package/dist/providers.runtime-oM9Vn1wr.js +2 -0
- package/dist/providers.runtime.js +1 -1
- package/dist/proxy-BxGnVyJu.js +662 -0
- package/dist/public-artifacts-BMP9hZfh.js +7 -0
- package/dist/pw-ai-CD52qfYo.js +3064 -0
- package/dist/qmd-manager-BYbvU4YC.js +2040 -0
- package/dist/qr-cli-Btz2ZdO3.js +2 -0
- package/dist/qr-cli-eyTRwMm2.js +371 -0
- package/dist/qr-image-BCwiO6tL.js +2 -0
- package/dist/queue-CJRoTOBi.js +923 -0
- package/dist/read-file-ogB-HjbK.js +183 -0
- package/dist/register-service-commands-D_gQ3b6_.js +77 -0
- package/dist/register.agent-DXQLn-r0.js +152 -0
- package/dist/register.configure-FavQPGce.js +16 -0
- package/dist/register.crestodian-Cbfmnl6h.js +24 -0
- package/dist/register.maintenance-B8xODEMU.js +85 -0
- package/dist/register.message-B8PYgZ-j.js +404 -0
- package/dist/register.migrate-CieoN8zZ.js +106 -0
- package/dist/register.onboard-BqWDIDKH.js +115 -0
- package/dist/register.setup-CgeTBW4T.js +40 -0
- package/dist/register.status-health-sessions-C99aHa5h.js +293 -0
- package/dist/register.subclis-79SvyMFt.js +31 -0
- package/dist/register.subclis-CXrO8_TO.js +3 -0
- package/dist/register.subclis-core-GoXV1yMG.js +273 -0
- package/dist/rem-harness-laL5luQa.js +649 -0
- package/dist/repair-sequencing-DGY2mBg6.js +652 -0
- package/dist/reply-media-paths.runtime-BeWVPkgy.js +2 -0
- package/dist/reply-media-paths.runtime-rzAV_Kee.js +154 -0
- package/dist/reply-media-paths.runtime.js +1 -1
- package/dist/reply-payloads-D_JHMviC.js +79 -0
- package/dist/reply-payloads-dedupe-B9GGGaL-.js +176 -0
- package/dist/reply-payloads-dedupe.runtime--C3jHs9y.js +2 -0
- package/dist/reply-payloads-dedupe.runtime.js +1 -1
- package/dist/reply-timing-tracker-DPjlETUb.js +205 -0
- package/dist/reply-turn-admission-DdfIwcMK.js +2056 -0
- package/dist/reply.runtime-BC1HT67i.js +2 -0
- package/dist/reply.runtime.js +1 -1
- package/dist/reset-preserved-selection-Czd80hug.js +45 -0
- package/dist/resolve-COJFlAZT.js +106 -0
- package/dist/restart-B9GMMIZt.js +121 -0
- package/dist/result-fallback-classifier-By0Z6b8r.js +98 -0
- package/dist/root-help-Bp0kGaUZ.js +43 -0
- package/dist/route-CgG9Z7OI.js +475 -0
- package/dist/route-reply-D9_9oRg1.js +174 -0
- package/dist/route-reply.runtime-BwNl3h2m.js +2 -0
- package/dist/route-reply.runtime.js +1 -1
- package/dist/routes-Cz2NHUV4.js +2 -0
- package/dist/routes-DMo6Eacc.js +3701 -0
- package/dist/run-SFRSThMI.js +1162 -0
- package/dist/run-auth-profile.runtime-BxLM8m_2.js +2 -0
- package/dist/run-auth-profile.runtime.js +1 -1
- package/dist/run-command-Cd5iN7eN.js +2 -0
- package/dist/run-command-ah46O06U.js +23 -0
- package/dist/run-context-DGCQJldA.js +66 -0
- package/dist/run-context.runtime-CSBHDAd5.js +2 -0
- package/dist/run-context.runtime.js +1 -1
- package/dist/run-delivery.runtime-C9xoiZ3h.js +762 -0
- package/dist/run-delivery.runtime.js +1 -1
- package/dist/run-embedded.runtime-D8bz5vfV.js +4 -0
- package/dist/run-embedded.runtime.js +1 -1
- package/dist/run-execution-cli.runtime-BAa8KPn7.js +4 -0
- package/dist/run-execution-cli.runtime.js +1 -1
- package/dist/run-executor.runtime-CNnemqSa.js +330 -0
- package/dist/run-executor.runtime.js +1 -1
- package/dist/run-model-catalog.runtime-Dh7EghXr.js +2 -0
- package/dist/run-model-catalog.runtime.js +1 -1
- package/dist/run-session-state-cMlTFwT_.js +159 -0
- package/dist/run-subagent-registry.runtime-BgQU86-E.js +2 -0
- package/dist/run-subagent-registry.runtime.js +1 -1
- package/dist/runner-B3YXRJOB.js +704 -0
- package/dist/runner.entries-DMTKpRDP.js +1485 -0
- package/dist/runtime-BHReFHE2.js +2 -0
- package/dist/runtime-BiQZ6Usw.js +615 -0
- package/dist/runtime-CAeriu2O.js +10 -0
- package/dist/runtime-CAnCRCX3.js +224 -0
- package/dist/runtime-CV_2NqSY.js +300 -0
- package/dist/runtime-CmpnvXo3.js +245 -0
- package/dist/runtime-D2fci1Ey.js +2 -0
- package/dist/runtime-DAsYmYeA.js +3 -0
- package/dist/runtime-DeA45VKG.js +210 -0
- package/dist/runtime-DvkZ8tHI.js +436 -0
- package/dist/runtime-DxVUR2Xg.js +2 -0
- package/dist/runtime-api-B88le0UE.js +12 -0
- package/dist/runtime-channel-AubRWvnH.js +2 -0
- package/dist/runtime-channel-DdclSuEu.js +148 -0
- package/dist/runtime-config-collectors-DukTj2va.js +525 -0
- package/dist/runtime-embedded-agent.runtime-BpLweeFv.js +2 -0
- package/dist/runtime-embedded-agent.runtime.js +1 -1
- package/dist/runtime-internal-CaoUylZw.js +2 -0
- package/dist/runtime-llm.runtime-DlpqGc7S.js +307 -0
- package/dist/runtime-llm.runtime.js +1 -1
- package/dist/runtime-model-auth.runtime-CLAaWzxY.js +46 -0
- package/dist/runtime-model-auth.runtime-DxVvqRTd.js +2 -0
- package/dist/runtime-model-auth.runtime.js +1 -1
- package/dist/runtime-options-TTtN01-I.js +275 -0
- package/dist/runtime-plugin-ClqxJSbp.js +92 -0
- package/dist/runtime-plugins-Bq01wLXP.js +32 -0
- package/dist/runtime-plugins.runtime-cwCvl1TR.js +2 -0
- package/dist/runtime-plugins.runtime.js +1 -1
- package/dist/runtime-prepare.runtime-Cz_hV_k5.js +81 -0
- package/dist/runtime-prepare.runtime.js +1 -1
- package/dist/runtime-provider-QCJq90av.js +24 -0
- package/dist/runtime-provider-Wllc3jC6.js +2 -0
- package/dist/runtime-registry-loader-BM1mQBJr.js +2 -0
- package/dist/runtime-registry-loader-DzhYCt4s.js +117 -0
- package/dist/runtime-shared-BfqOW-Vb.js +365 -0
- package/dist/runtime-web-channel-plugin-BcVPgD14.js +204 -0
- package/dist/runtime-web-tools-fallback.runtime.js +1 -1
- package/dist/scan-ldbaD8jq.js +573 -0
- package/dist/sdk-security-runtime-Bxhq2O1G.js +86 -0
- package/dist/sdk-setup-tools-CsQM9pF0.js +8 -0
- package/dist/secrets-cli-DbpIf4-z.js +150 -0
- package/dist/security-cli-BK4Xpa6h.js +520 -0
- package/dist/selection-BXKik6Ps.js +3 -0
- package/dist/selection-D4O3gK3Q.js +18365 -0
- package/dist/send-DaoGIay5.js +1222 -0
- package/dist/send-DzNjJGJX.js +178 -0
- package/dist/send-f5w9krNS.js +711 -0
- package/dist/send-media-cOciBxcg.js +2072 -0
- package/dist/send-result-DMFwBuOl.js +141 -0
- package/dist/server-BoC1mxZ-.js +24 -0
- package/dist/server-DZnI6w5k.js +72 -0
- package/dist/server-aux-handlers-BwRdYdub.js +1347 -0
- package/dist/server-chat-Q95f4ywD.js +827 -0
- package/dist/server-close.runtime.js +3 -3
- package/dist/server-context-CnXNaarB.js +2 -0
- package/dist/server-context-DRBebo7Y.js +955 -0
- package/dist/server-cron-C0o0ZvqF.js +3173 -0
- package/dist/server-cron-CLeBvurR.js +2 -0
- package/dist/server-maintenance-CqHfTnFD.js +152 -0
- package/dist/server-methods-BmlBQJMD.js +497 -0
- package/dist/server-middleware-DJhnR6jl.js +122 -0
- package/dist/server-model-catalog-CoSSk_Gy.js +2 -0
- package/dist/server-model-catalog-D32oDTQp.js +73 -0
- package/dist/server-node-events-DX9a4etQ.js +597 -0
- package/dist/server-plugin-bootstrap-Vco-EpxY.js +71 -0
- package/dist/server-plugins-WBX2fZRp.js +435 -0
- package/dist/server-reload-handlers-DGJLH8bg.js +719 -0
- package/dist/server-restart-sentinel-Bvon7f8K.js +700 -0
- package/dist/server-runtime-services-BNcH4vhR.js +3 -0
- package/dist/server-runtime-services-BjcQG5y7.js +147 -0
- package/dist/server-runtime-subscriptions-W39HeyoT.js +67 -0
- package/dist/server-session-events-CO73dMU-.js +244 -0
- package/dist/server-session-key-D8V67lDk.js +2 -0
- package/dist/server-session-key-v-KYSmRS.js +75 -0
- package/dist/server-startup-config-u54lUdWN.js +305 -0
- package/dist/server-startup-early-Cy5kArJG.js +87 -0
- package/dist/server-startup-memory-DvINFAYn.js +72 -0
- package/dist/server-startup-plugins-CerpbOSQ.js +127 -0
- package/dist/server-startup-post-attach-COUCwhNa.js +793 -0
- package/dist/server-ws-runtime-BfznAnbI.js +374 -0
- package/dist/server.impl-dQXccj0z.js +2622 -0
- package/dist/session-cost-usage-Bs5yIOBH.js +1600 -0
- package/dist/session-kill-http-DVleb3RW.js +121 -0
- package/dist/session-log-runtime-OG7J4j9m.js +1258 -0
- package/dist/session-override-LIWl5a9T.js +134 -0
- package/dist/session-reset-model.runtime-BpnTi4sa.js +144 -0
- package/dist/session-reset-model.runtime.js +1 -1
- package/dist/session-reset-service-HA07zS8L.js +651 -0
- package/dist/session-status.runtime-D6_clH8l.js +2 -0
- package/dist/session-status.runtime.js +1 -1
- package/dist/session-store-Cj4Rh6qc.js +273 -0
- package/dist/session-store.runtime-DSCxACdZ.js +4 -0
- package/dist/session-store.runtime.js +1 -1
- package/dist/session-subagent-reactivation.runtime-CcwaHAxg.js +2 -0
- package/dist/session-subagent-reactivation.runtime.js +1 -1
- package/dist/session-tab-registry-C-9uI2Wi.js +551 -0
- package/dist/session-utils-BRtPESA4.js +1508 -0
- package/dist/sessions-Beltl3Ra.js +1917 -0
- package/dist/sessions-DR-X-j8D.js +316 -0
- package/dist/sessions-cleanup-CR1CFcJb.js +165 -0
- package/dist/sessions-history-http-CjyHWYEv.js +432 -0
- package/dist/sessions-patch-peSeltuF.js +401 -0
- package/dist/sessions-resolve-D9ULr95s.js +180 -0
- package/dist/sessions-table-Da6bua9d.js +161 -0
- package/dist/sessions-uKpnhod0.js +12736 -0
- package/dist/sessions.runtime-C1mVNaU3.js +2 -0
- package/dist/sessions.runtime.js +1 -1
- package/dist/set-DVj21EuB.js +31 -0
- package/dist/set-image-JChDCaAP.js +17 -0
- package/dist/setup-5I-zpID3.js +614 -0
- package/dist/setup-CjtY6cli.js +2 -0
- package/dist/setup-onboard-configure-help-fast-path-C5GcSuXb.js +64 -0
- package/dist/setup.finalize-Bf10PNbl.js +586 -0
- package/dist/setup.gateway-config-EH5Rvwzy.js +281 -0
- package/dist/setup.migration-import-CoeV4Kc1.js +200 -0
- package/dist/setup.migration-import-DFFGw4DI.js +2 -0
- package/dist/setup.post-install-migration-DcQmWTE7.js +128 -0
- package/dist/shared-BFSJZ6B3.js +212 -0
- package/dist/shared-CVM-dYkO.js +5 -0
- package/dist/shared-fvgcmCsj.js +71 -0
- package/dist/simple-completion-runtime-C_TXe4M1.js +2 -0
- package/dist/simple-completion-runtime-DREq-fcF.js +206 -0
- package/dist/simple-completion-transport-DtD1fEvJ.js +83 -0
- package/dist/snapshot-urls-B-wkwDI9.js +317 -0
- package/dist/speech-core-KQg6oKcR.js +119 -0
- package/dist/speech-provider-DfyLYitQ.js +171 -0
- package/dist/speech-provider-oDvTumNW.js +227 -0
- package/dist/speech-provider-yL-TQ3Em.js +233 -0
- package/dist/stale-oauth-profile-shadows-CW11VYMM.js +2 -0
- package/dist/stale-oauth-profile-shadows-DFl6Lyf1.js +186 -0
- package/dist/standalone-runtime-registry-loader-BiponY-y.js +59 -0
- package/dist/startup-context-PVXYM-X3.js +314 -0
- package/dist/status-BA_0z83w.js +249 -0
- package/dist/status-Bc7BGlRt.js +2 -0
- package/dist/status-BwPWg9eQ.js +3 -0
- package/dist/status-CLQ66eml.js +4 -0
- package/dist/status-Ci2gChtY.js +466 -0
- package/dist/status-CmtBWJEE.js +2 -0
- package/dist/status-DdnMnPNs.js +73 -0
- package/dist/status-all-BpTvkYrt.js +573 -0
- package/dist/status-json-CizozZCr.js +15 -0
- package/dist/status-json-command-FzKa2t6O.js +84 -0
- package/dist/status-message-BHbnxwmt.js +495 -0
- package/dist/status-message.runtime-Df5WBBAk.js +6 -0
- package/dist/status-message.runtime.js +1 -1
- package/dist/status-queue.runtime-CXnZV4Bj.js +2 -0
- package/dist/status-queue.runtime.js +1 -1
- package/dist/status-runtime-shared-D3Hz8WZ_.js +289 -0
- package/dist/status-subagents.runtime-PoDdwwaw.js +32 -0
- package/dist/status-subagents.runtime.js +1 -1
- package/dist/status-text-DNxXSCuI.js +301 -0
- package/dist/status.command-C_e9GcMg.js +2 -0
- package/dist/status.command-DjVKDmt_.js +425 -0
- package/dist/status.command.text-runtime-BeHlqL8b.js +15 -0
- package/dist/status.runtime-h--fx9HY.js +2 -0
- package/dist/status.scan-WyR8TeJz.js +72 -0
- package/dist/status.scan-overview-CMzUAQMQ.js +460 -0
- package/dist/status.scan.deps.runtime-1JTrdyHk.js +19 -0
- package/dist/status.scan.deps.runtime.js +1 -1
- package/dist/status.scan.fast-json-D2jw1wKO.js +163 -0
- package/dist/status.scan.fast-json-DbN1KxJT.js +2 -0
- package/dist/status.summary-6ZijZM1g.js +2 -0
- package/dist/status.summary-CiCsChO-.js +276 -0
- package/dist/store-CdBPITcg.js +2302 -0
- package/dist/store-D0l2NCdn.js +3 -0
- package/dist/stored-model-override-HEgnFh6b.js +79 -0
- package/dist/subagent-announce-BUv_kA1W.js +353 -0
- package/dist/subagent-announce-delivery-Ci2Y_p--.js +1369 -0
- package/dist/subagent-control-BM3vNgsQ.js +492 -0
- package/dist/subagent-control.runtime-Df3pVQL9.js +3 -0
- package/dist/subagent-control.runtime.js +1 -1
- package/dist/subagent-hooks-CN2fLez2.js +2 -0
- package/dist/subagent-hooks-CeOmTJBf.js +230 -0
- package/dist/subagent-hooks-api-Cfe4DAT9.js +23 -0
- package/dist/subagent-registry-B9RPAXUs.js +2627 -0
- package/dist/subagent-registry-C7tedtVB.js +3 -0
- package/dist/subagent-registry.runtime.js +2 -2
- package/dist/subagent-session-cleanup-y0ijZ-LQ.js +390 -0
- package/dist/system-DVtrOGbV.js +111 -0
- package/dist/system-prompt-config-BVmrcmmr.js +918 -0
- package/dist/talk-CrdgqTCl.js +2454 -0
- package/dist/target-id-CrUyi-Uq.js +107 -0
- package/dist/targets-KZ2ezPwx.js +267 -0
- package/dist/targets.runtime-iZ8KdQ1C.js +2 -0
- package/dist/targets.runtime.js +1 -1
- package/dist/task-executor-893pMqzn.js +349 -0
- package/dist/task-owner-access-DC7MKz3n.js +74 -0
- package/dist/task-registry-control.runtime.js +2 -2
- package/dist/task-registry-delivery-runtime-YGMOyqP5.js +2 -0
- package/dist/task-registry-uaYJfgXF.js +2362 -0
- package/dist/task-registry.maintenance-Dx0m2NYh.js +2 -0
- package/dist/task-registry.maintenance-gApg-XOt.js +764 -0
- package/dist/task-status-access-CFhD_ieY.js +18 -0
- package/dist/tasks-B_Qoz38D.js +153 -0
- package/dist/tasks-DtV85zJT.js +548 -0
- package/dist/tasks-audit-system-Con3yYnm.js +210 -0
- package/dist/tasks-json-BM3pauZl.js +73 -0
- package/dist/tavily-web-search-provider.runtime-Cmyyc5kX.js +112 -0
- package/dist/tavily-web-search-provider.runtime.js +1 -1
- package/dist/text-report-CKxmVmt5.js +695 -0
- package/dist/text-transforms.runtime-DVwVsBRS.js +113 -0
- package/dist/text-transforms.runtime.js +1 -1
- package/dist/thread-bindings-B6UEVp9q.js +228 -0
- package/dist/tool-KOZc7TIF.js +143 -0
- package/dist/tool-dispatch-Ca4z2GEr.js +155 -0
- package/dist/tool-images-CzDwHeDR.js +247 -0
- package/dist/tool-plugin-BvQBJ2gU.js +93 -0
- package/dist/tool-resolution-Ddxl6tjh.js +153 -0
- package/dist/tool-result-truncation-BSKuIhd5.js +498 -0
- package/dist/tool-schema-nB27q-vb.js +40 -0
- package/dist/tool-schema-projection-COrMarLR.js +215 -0
- package/dist/tool-split-BjPHBFrv.js +323 -0
- package/dist/tools-CV40BWkc.js +901 -0
- package/dist/tools-catalog-5stC7W2V.js +156 -0
- package/dist/tools-effective-BVjqz2FV.js +442 -0
- package/dist/tools-effective-inventory-esPY5jRB.js +379 -0
- package/dist/tools-invoke-Czk_NM9G.js +51 -0
- package/dist/tools-invoke-http-D7PbsODz.js +68 -0
- package/dist/tools-invoke-shared-CzrEn0Dm.js +200 -0
- package/dist/tools-rSjgf61B.js +579 -0
- package/dist/tools.runtime-DiChCSGI.js +5 -0
- package/dist/tools.runtime.js +1 -1
- package/dist/transcript-rewrite-4IQefjvK.js +688 -0
- package/dist/transcripts-tool-BXTS8tE5.js +2 -0
- package/dist/transcripts-tool-CeWGgz5k.js +656 -0
- package/dist/tts-BS8EeM8p.js +2 -0
- package/dist/tts-BlTZjsaE.js +194 -0
- package/dist/tts-runtime-BfRdJDyY.js +1337 -0
- package/dist/tts-vRSvSw-t.js +3 -0
- package/dist/tts.runtime-ChBnVkNt.js +3 -0
- package/dist/tts.runtime-CmVCUbzq.js +2 -0
- package/dist/tts.runtime.js +1 -1
- package/dist/tui-BoQVBgWB.js +4860 -0
- package/dist/tui-DBYK9BeQ.js +2 -0
- package/dist/tui-backend-X0NI7rAv.js +256 -0
- package/dist/tui-cli-BpUtjV38.js +40 -0
- package/dist/typing-policy-CBwyAQh4.js +199 -0
- package/dist/usage-Bl-tgGx-.js +623 -0
- package/dist/usage-Cj_ektBl.js +1113 -0
- package/dist/usage-format-DWO9ckX3.js +394 -0
- package/dist/usage-format-DnCIXsqG.js +2 -0
- package/dist/video-generation-provider-B7ib4AeI.js +297 -0
- package/dist/video-generation-provider-CXQ6fqJx.js +64 -0
- package/dist/video-generation-provider-DXjl05T6.js +325 -0
- package/dist/video-generation-provider-Db8h71jA.js +77 -0
- package/dist/web-fetch/runtime.js +1 -1
- package/dist/web-fetch-providers.runtime-DhPkYjgB.js +41 -0
- package/dist/web-fetch-providers.runtime.js +1 -1
- package/dist/web-guarded-fetch-BdsVyvDS.js +58 -0
- package/dist/web-guarded-fetch-CJR3JCwT.js +2 -0
- package/dist/web-media-BzzQJAwk.js +4 -0
- package/dist/web-media-DViZjNBa.js +2 -0
- package/dist/web-media-inHawfBU.js +651 -0
- package/dist/web-provider-runtime-shared-Cc08Lt9p.js +142 -0
- package/dist/web-search-provider-common-CtbtmUL-.js +252 -0
- package/dist/web-search-providers.runtime-B7x_cRVn.js +41 -0
- package/dist/web-search-providers.runtime.js +1 -1
- package/dist/zod-schema.core-Cuz0lz6m.d.ts +166 -0
- package/package.json +1 -1
- package/dist/abort-CR0u3VsG.js +0 -277
- package/dist/abort.runtime-CXUxanGg.js +0 -2
- package/dist/accounts-BxBaquAf.js +0 -423
- package/dist/accounts-vQjpoqEe.js +0 -2
- package/dist/acp-spawn-2elSoS0E.js +0 -1286
- package/dist/acp-spawn-DtKOHNO1.js +0 -2
- package/dist/acp-stateful-target-driver-BqeA5j0h.js +0 -89
- package/dist/action-info-B8NotHFw.js +0 -75
- package/dist/active-runtime-registry-BO9mpPuB.js +0 -62
- package/dist/active-tool-schema-warnings-C8vGj5FX.js +0 -105
- package/dist/active-tool-schema-warnings-CVeFJuWI.js +0 -2
- package/dist/agent-BgEaDMdp.js +0 -1825
- package/dist/agent-_V5GbziF.js +0 -2
- package/dist/agent-bundle-lsp-runtime-0jBcDEHh.js +0 -389
- package/dist/agent-bundle-lsp-runtime-CQ6dZLs_.js +0 -2
- package/dist/agent-bundle-mcp-materialize-Cu6JqMzC.js +0 -124
- package/dist/agent-bundle-mcp-tools-BGL827cn.js +0 -3
- package/dist/agent-command-CMJdGr16.js +0 -1435
- package/dist/agent-delivery-DMu1MOeq.js +0 -117
- package/dist/agent-harness-runtime-BKSW2E1O.js +0 -207
- package/dist/agent-model-discovery-Cu4YL31r.js +0 -3
- package/dist/agent-model-discovery-DdmVtkZo.js +0 -238
- package/dist/agent-runner-utils-DXNDhwkI.js +0 -267
- package/dist/agent-runner.runtime-Cym4Odfd.js +0 -3784
- package/dist/agent-runtime-BkbhevY3.js +0 -199
- package/dist/agent-runtime-label-DNP06p76.js +0 -30
- package/dist/agent-runtime-metadata-JaTKc7mA.js +0 -53
- package/dist/agent-tool-result-middleware-loader-FbZE0Qpk.js +0 -55
- package/dist/agent-tools-Nwh8BlKX.js +0 -2506
- package/dist/agent-tools.before-tool-call-BwY-FYFl.js +0 -1274
- package/dist/agent-tools.before-tool-call-DwUmYhE3.js +0 -2
- package/dist/agent-u5NDWrw9.js +0 -3
- package/dist/agent-via-gateway-DMtOMwZa.js +0 -486
- package/dist/agent-wait-dedupe-CLuKbI_7.js +0 -180
- package/dist/agents-CiW7UEuB.js +0 -632
- package/dist/agents.command-shared-CXGSQscb.js +0 -16
- package/dist/agents.commands.add-BYBrZDXD.js +0 -304
- package/dist/agents.commands.bind-nfg3AlVc.js +0 -265
- package/dist/agents.commands.delete-pRj6vIrn.js +0 -128
- package/dist/agents.commands.identity-Ci2PnDDl.js +0 -143
- package/dist/agents.commands.list-Crj3BmqB.js +0 -235
- package/dist/aliases-BFspFx3-.js +0 -97
- package/dist/api-BiXhdPle.js +0 -3
- package/dist/api-Cptkjys5.js +0 -6
- package/dist/api-D3vT4ZVi.js +0 -2
- package/dist/api-key-rotation-CQgW8LEx.js +0 -167
- package/dist/app-registration-YW276fZC.js +0 -194
- package/dist/apply-BRxKrOiK.js +0 -510
- package/dist/apply-D0fWCa-U.js +0 -2
- package/dist/apply-DIR8y0ZA.js +0 -2
- package/dist/apply-DNUIV0Lt.js +0 -416
- package/dist/apply-Dux9jI7f.js +0 -544
- package/dist/approval-native-helpers-BMT-5X47.js +0 -398
- package/dist/artifacts-CTrtIv9T.js +0 -368
- package/dist/assistant-ClfI8Kho.js +0 -291
- package/dist/attachment-normalize-DAW86mZY.js +0 -213
- package/dist/attempt-execution-DTi2UfET.js +0 -584
- package/dist/attempt-execution.helpers-DrX0QToi.js +0 -969
- package/dist/attempt-execution.runtime-BCmAxwGy.js +0 -3
- package/dist/attempt.prompt-helpers-BE6kGRtT.js +0 -543
- package/dist/attempt.tool-run-context-J9O2yjbV.js +0 -1240
- package/dist/audio-preflight.runtime-D3GXVYBI.js +0 -7
- package/dist/audit-5T20D-xm.js +0 -1108
- package/dist/audit-CWuV5GlP.js +0 -477
- package/dist/audit.nondeep.runtime-DeYwRDYj.js +0 -1416
- package/dist/audit.runtime-rUlvK4Rb.js +0 -7
- package/dist/auth-DunUSatn.js +0 -567
- package/dist/auth-choice--eBzca8Y.js +0 -3
- package/dist/auth-choice-DJ9jsFUq.js +0 -400
- package/dist/auth-choice-_pLkIdVh.js +0 -110
- package/dist/auth-choice.apply.api-providers-CALcopRP.js +0 -2
- package/dist/auth-choice.apply.api-providers-Dzzm1snk.js +0 -34
- package/dist/auth-choice.plugin-providers.runtime-BHKTeZZc.js +0 -11
- package/dist/auth-health-Cs4OjiF2.js +0 -219
- package/dist/auth-list-bwJ4QDs0.js +0 -115
- package/dist/auth-order-BoHN3Dc_.js +0 -105
- package/dist/auth-profiles-BOLncVgy.js +0 -73
- package/dist/auth-profiles-BiQRkULt.js +0 -14
- package/dist/backend-config-B5yga5ay.js +0 -259
- package/dist/bash-tools-BWvldguc.js +0 -3
- package/dist/bash-tools-DEAAO5np.js +0 -3497
- package/dist/binding-routing-BbtHmU_l.js +0 -113
- package/dist/binding-targets-DSNv3-QA.js +0 -121
- package/dist/bootstrap-files-DD8V2dLe.js +0 -202
- package/dist/bootstrap-files-_6u1uJW2.js +0 -3
- package/dist/bridge-server-v1-XPnAZ.js +0 -113
- package/dist/browser-cli-CnpuO4KR.js +0 -230
- package/dist/browser-cli-DPbIn8SK.js +0 -2
- package/dist/browser-cli-actions-input-DoGR6LI-.js +0 -522
- package/dist/browser-cli-actions-observe-CYMpgmtF.js +0 -81
- package/dist/browser-cli-debug-ChJjSq-h.js +0 -137
- package/dist/browser-cli-inspect-Bbci-WPG.js +0 -117
- package/dist/browser-cli-manage-Bnscjb7b.js +0 -446
- package/dist/browser-cli-resize-D1MJdvZI.js +0 -32
- package/dist/browser-cli-shared-BCQwqz51.js +0 -69
- package/dist/browser-cli-state-BWkPsvUg.js +0 -371
- package/dist/browser-control-auth-CEP_ExeC.js +0 -2
- package/dist/browser-profiles-SvnqnHVN.js +0 -2
- package/dist/browser-runtime-0mRxjFpp.js +0 -389
- package/dist/browser-tool.schema--CLR3nDv.js +0 -132
- package/dist/btw-command-DV6HfrRV.js +0 -18
- package/dist/build-DiRmljCi.js +0 -261
- package/dist/bundled-channel-config-schema-Bte--ZlY.d.ts +0 -3168
- package/dist/capability-cli-ATfwTYFe.js +0 -1809
- package/dist/capability-provider-runtime-l3nnLGvn.js +0 -346
- package/dist/cdp.helpers-IIuc0KGS.js +0 -637
- package/dist/channel-CzTD2ouI.js +0 -2309
- package/dist/channel-actions-B5Yk5Axf.js +0 -46
- package/dist/channel-bootstrap.runtime-C9F-Pq1o.js +0 -38
- package/dist/channel-bootstrap.runtime-TPyY5Ngv.js +0 -2
- package/dist/channel-core-XMZJ-ZGF.js +0 -5
- package/dist/channel-inbound-DvqkKmiH.js +0 -121
- package/dist/channel-message-CnJ4vUyt.js +0 -12
- package/dist/channel-outbound-BhefGAqY.js +0 -436
- package/dist/channel-plugin-resolution-BiaJ8aRa.js +0 -2
- package/dist/channel-plugin-resolution-D_CxkMVc.js +0 -135
- package/dist/channel-resolution-DzI28gIM.js +0 -46
- package/dist/channel-selection-CLFO4-eQ.js +0 -171
- package/dist/channel-selection.runtime-Beb2-bMH.js +0 -2
- package/dist/channel.runtime-By5T5eGw.js +0 -697
- package/dist/channels-BrRY9Mag.js +0 -1004
- package/dist/channels-cli-CF--e2RU.js +0 -331
- package/dist/chat-BTMPilpx.js +0 -2940
- package/dist/chat-DnC7XCWK.js +0 -3
- package/dist/chrome-C3_dN9jE.js +0 -1517
- package/dist/chrome-mcp-5jjDHIgn.js +0 -864
- package/dist/chrome-mcp-DFAa-WzK.js +0 -2
- package/dist/claude-live-session-BUPeOzLE.js +0 -1338
- package/dist/claude-live-session-Bprgmr1-.js +0 -2
- package/dist/clawbot-cli-5UVkLT1Y.js +0 -9
- package/dist/cli-6a6sMEUB.js +0 -2
- package/dist/cli-COCN9B5e.js +0 -2
- package/dist/cli-CpI4dBXy.js +0 -141
- package/dist/cli-YLx-ekdH.js +0 -293
- package/dist/cli-backends.runtime-CsBjr7ag.js +0 -7
- package/dist/cli-compaction-Bh0oMwUa.js +0 -363
- package/dist/cli-registry-loader-DDbaAJgY.js +0 -2
- package/dist/cli-registry-loader-xc2Ah8S4.js +0 -193
- package/dist/cli-runner-BfSrIn-9.js +0 -597
- package/dist/cli-runner-D_FAjNbR.js +0 -2
- package/dist/cli-runner.runtime-BJetQDu1.js +0 -3
- package/dist/cli-runner.runtime-BKJQkc7C.js +0 -4
- package/dist/cli-session-Cy3IeH0g.js +0 -119
- package/dist/cli.runtime-BpOz0s3N.js +0 -1276
- package/dist/codex-native-web-search-BDtKRV3F.js +0 -4
- package/dist/codex-native-web-search-C0TrfoMX.js +0 -20
- package/dist/codex-native-web-search-core-CzlK1GfN.js +0 -106
- package/dist/command-auth-CFnvdYX2.js +0 -135
- package/dist/command-config-resolution-B_86rG8v.js +0 -2
- package/dist/command-config-resolution-BbadcA2M.js +0 -25
- package/dist/command-config-resolution.runtime-B_86rG8v.js +0 -2
- package/dist/command-execution-startup-Rrwwdg_5.js +0 -90
- package/dist/command-primitives-runtime-C9bTt5IV.js +0 -3
- package/dist/command-registry-CbpdQKmu.js +0 -9
- package/dist/command-registry-Dw-XC_Zk.js +0 -4
- package/dist/command-registry-core-rvEDki6p.js +0 -114
- package/dist/command-secret-gateway-BX6BIiFn.js +0 -589
- package/dist/command-secret-targets-DCzlTkb5.js +0 -2
- package/dist/command-status-builders-DIsZN9aY.js +0 -147
- package/dist/command-status.runtime-C2x4yMRd.js +0 -90
- package/dist/commands-FYCxWqIx.js +0 -161
- package/dist/commands-compact.runtime-BTMQfx1k.js +0 -10
- package/dist/commands-core.runtime-CuNLz2wm.js +0 -2
- package/dist/commands-handlers.runtime-DyNuPOmY.js +0 -6327
- package/dist/commands-models-s7BRmLQh.js +0 -448
- package/dist/commands-registry-BxEq-3UJ.js +0 -195
- package/dist/commands-registry.runtime-CbXW33S_.js +0 -4
- package/dist/commands-status-BRJMba4h.js +0 -16
- package/dist/commands-status-DCXEwlSF.js +0 -3
- package/dist/commands-status.runtime-DCXEwlSF.js +0 -3
- package/dist/commands-subagents-control.runtime-CduLQJFD.js +0 -2
- package/dist/commands-system-prompt-B3LD8CDs.js +0 -161
- package/dist/commands-system-prompt-DPsXTqOQ.js +0 -2
- package/dist/commands.runtime-3sVz8Qgo.js +0 -175
- package/dist/common-CZvBLb3w.js +0 -286
- package/dist/compact-DxU_9XEc.js +0 -1165
- package/dist/compact.runtime-CqQTypVl.js +0 -12
- package/dist/compaction-planning-DArTi9SN.js +0 -202
- package/dist/completion-cli-CiKl5HhI.js +0 -393
- package/dist/config--yllOaSC.js +0 -374
- package/dist/config-Yt5UcD91.js +0 -610
- package/dist/config-cli-BeXS3R6k.js +0 -1703
- package/dist/config-mutation-cQeWhUqy.js +0 -5
- package/dist/config-mutations-Cg04LH_S.js +0 -161
- package/dist/config-utils-Dhq_UKMC.js +0 -141
- package/dist/config-validation-BANohTKD.js +0 -33
- package/dist/configure-CWxhlx9G.js +0 -771
- package/dist/configure-Jejkc6dn.js +0 -3
- package/dist/configure.commands-BYy1bz8G.js +0 -2
- package/dist/configure.commands-C3hDvZse.js +0 -1253
- package/dist/context-DptQ59DZ.js +0 -248
- package/dist/context-_ZshNBhD.js +0 -2
- package/dist/context-engine-host-compat-C_eflvRw.js +0 -2
- package/dist/context-engine-host-compat-s15Pu845.js +0 -280
- package/dist/context-engine-lifecycle-COHFLnj4.js +0 -627
- package/dist/control-auth-CQJpLoIb.js +0 -114
- package/dist/control-service-BFSgA0Py.js +0 -40
- package/dist/control-service-D7GZv-GS.js +0 -3
- package/dist/control-ui/assets/activity-CCu43qU8.js +0 -124
- package/dist/control-ui/assets/agents-DCvsB0yO.js +0 -1030
- package/dist/control-ui/assets/channels-CpM2j5xT.js +0 -120
- package/dist/control-ui/assets/cron-CLXNfwYa.js +0 -1016
- package/dist/control-ui/assets/debug-BcJ34lrC.js +0 -97
- package/dist/control-ui/assets/index-CuBn2YpX.js +0 -7214
- package/dist/control-ui/assets/instances-Bu6NM_Hs.js +0 -57
- package/dist/control-ui/assets/nodes-Bd1WzVLK.js +0 -444
- package/dist/control-ui/assets/sessions-C2r8pbt7.js +0 -425
- package/dist/control-ui/assets/skills-DIjn93ee.js +0 -362
- package/dist/control-ui/assets/workboard-CHb0if1l.js +0 -402
- package/dist/control-ui-ChfTPXZo.js +0 -750
- package/dist/conversation-label-generator-CTfnInQF.js +0 -72
- package/dist/conversation-runtime-B7oAN9Tq.js +0 -31
- package/dist/core-api-CBD0dvTQ.js +0 -5
- package/dist/core-api-ClCm_yM8.js +0 -2
- package/dist/core-wuoxL08a.js +0 -284
- package/dist/crestodian--iYeGB8u.js +0 -55
- package/dist/cron-D2SzQyqo.js +0 -453
- package/dist/daemon-install-B6CAkU3V.js +0 -66
- package/dist/daemon-install-auth-profiles-store.runtime-Cpt5LSD6.js +0 -2
- package/dist/dashboard-ChYOQjM2.js +0 -263
- package/dist/defaults-CCopehWw.js +0 -130
- package/dist/defaults-H4kBp17N.js +0 -3
- package/dist/defaults.constants-CjB9HP6f.js +0 -76
- package/dist/deliver-BzPhWO_F.js +0 -3
- package/dist/deliver-DGyKH3Qi.js +0 -1399
- package/dist/deliver-runtime-Ca2kcQoZ.js +0 -2
- package/dist/delivery-outbound.runtime-D7ycPxY-.js +0 -7
- package/dist/delivery-queue-CnLv30ko.js +0 -863
- package/dist/delivery-queue-CuaDjNMh.js +0 -2
- package/dist/delivery-queue-runtime-DO2vqOIJ.js +0 -16
- package/dist/delivery-target.runtime-QcBVk_j8.js +0 -45
- package/dist/delivery.runtime-L09v4tys.js +0 -470
- package/dist/detached-task-runtime-BqU7YXYT.js +0 -86
- package/dist/diagnostics-T-Hk_Qzi.js +0 -168
- package/dist/dialogue-C0VnTMMn.js +0 -37
- package/dist/direct-dm-BWn67tDD.js +0 -81
- package/dist/directive-handling.defaults-DO6Snm4_.js +0 -22
- package/dist/directive-handling.fast-lane-BemYRfPn.js +0 -70
- package/dist/directive-handling.impl-BMVh1pMh.js +0 -823
- package/dist/directive-handling.impl-vr4MsYbt.js +0 -2
- package/dist/directive-handling.model-selection-DegP9exp.js +0 -122
- package/dist/directive-handling.persist.runtime-BUdU6_zm.js +0 -274
- package/dist/directives-1xk_ZcMf.js +0 -319
- package/dist/directory-cli-D83WEjEG.js +0 -239
- package/dist/dispatch-Ck2tvRYH.js +0 -2057
- package/dist/dispatch-acp-GdaHNdvf.js +0 -1102
- package/dist/dispatch-acp-manager.runtime-BGSrJqrW.js +0 -3
- package/dist/dispatch-acp-media.runtime-DQ8dYQh8.js +0 -4
- package/dist/dispatch-acp-transcript.runtime-CsJZGhnu.js +0 -40
- package/dist/dispatch-acp-tts.runtime-Bo-QxKgx.js +0 -3
- package/dist/dispatch-acp.runtime-C_u7sGcQ.js +0 -18
- package/dist/dispatcher-GtuYO6Ni.js +0 -106
- package/dist/doctor-B2qP9g8d.js +0 -760
- package/dist/doctor-D9wCez5t.js +0 -6
- package/dist/doctor-auth-XnseqtS7.js +0 -216
- package/dist/doctor-auth-flat-profiles-B6cL-TiJ.js +0 -516
- package/dist/doctor-auth-flat-profiles-Birb7qIk.js +0 -2
- package/dist/doctor-auth-legacy-oauth-CXO3OtyG.js +0 -48
- package/dist/doctor-auth-oauth-sidecar-BSgQPbcS.js +0 -177
- package/dist/doctor-auth-oauth-sidecar-CzzyNwxc.js +0 -2
- package/dist/doctor-bootstrap-size-BlVcO5D6.js +0 -57
- package/dist/doctor-claude-cli-_MTVnCQ-.js +0 -150
- package/dist/doctor-config-flow-0kxzjUjK.js +0 -1819
- package/dist/doctor-core-checks-C_g9REOd.js +0 -666
- package/dist/doctor-core-checks-CahzmM1L.js +0 -2
- package/dist/doctor-core-checks.runtime-Bi_oTiTZ.js +0 -278
- package/dist/doctor-gateway-daemon-flow-UAIWsI9w.js +0 -349
- package/dist/doctor-gateway-services-BiMEGiw_.js +0 -465
- package/dist/doctor-health-C69GVfMl.js +0 -65
- package/dist/doctor-health-contributions-Bz19QhI4.js +0 -874
- package/dist/doctor-lint-BVW4E6Qf.js +0 -95
- package/dist/doctor-memory-search-D2PWzDCY.js +0 -407
- package/dist/doctor-state-integrity-DuJIszQj.js +0 -1257
- package/dist/doctor-tool-result-cap-advice-Dpn4zNH3.js +0 -27
- package/dist/doctor-workspace-status-nW9TcIWi.js +0 -76
- package/dist/dreaming-CcOWzGN5.js +0 -523
- package/dist/dreaming-command-sxm3FQGb.js +0 -101
- package/dist/dreaming-narrative-BSRwiUPL.js +0 -2
- package/dist/dreaming-narrative-BskwmYdC.js +0 -721
- package/dist/dreaming-phases-BuHjGyPw.js +0 -2
- package/dist/dreaming-phases-ChVT8Ovk.js +0 -1162
- package/dist/drive-C_u5W4ln.js +0 -899
- package/dist/echo-transcript-tnZWH4EO.js +0 -52
- package/dist/effective-tool-policy-CeHdL2D7.js +0 -89
- package/dist/embedded-agent-CGULn3lb.js +0 -4
- package/dist/embedded-agent-DZTa1YiK.js +0 -4074
- package/dist/embedded-agent-helpers-B65K9o55.js +0 -6
- package/dist/embedded-agent-helpers-BPXCvWBb.js +0 -1037
- package/dist/embedded-agent.runtime-TfBgXcUV.js +0 -4
- package/dist/embedded-backend-BAaFwayA.js +0 -744
- package/dist/embedded-gateway-stub.runtime-CNyrjvgT.js +0 -12
- package/dist/embedding-provider-runtime-EnkHdROJ.js +0 -86
- package/dist/embedding-providers-CDkDb0kv.js +0 -2
- package/dist/embeddings-http-ClIu4_mP.js +0 -222
- package/dist/engine-qmd-DZRiT9i4.js +0 -708
- package/dist/engine-storage-BEqlN8TR.js +0 -203
- package/dist/errors-Co8auIlv.js +0 -2
- package/dist/exec-approval-forwarder.runtime-C7QvfWQ6.js +0 -4
- package/dist/exec-approval-session-target-ChuH1nXL.js +0 -177
- package/dist/exec-auto-reviewer-Bm7380HF.js +0 -2
- package/dist/exec-auto-reviewer-BrrdGleK.js +0 -241
- package/dist/execute.runtime-B-8jUqDB.js +0 -579
- package/dist/external-cli-auth-selection-0BxmRUps.js +0 -113
- package/dist/extra-params-BgyvpEpv.js +0 -615
- package/dist/fallback-notice-state-BXk_kRWM.js +0 -15
- package/dist/fallbacks-CPdVRP81.js +0 -31
- package/dist/fallbacks-shared-CSGf1oaf.js +0 -116
- package/dist/fengming-runtime-NUA51sEw.js +0 -33
- package/dist/fengming-runtime-config-CIZ-SHPt.js +0 -2
- package/dist/fengming-runtime-memory-CIZ-SHPt.js +0 -2
- package/dist/fengming-runtime-session-CIZ-SHPt.js +0 -2
- package/dist/fengming-tools-MvRSt0JA.js +0 -12221
- package/dist/flows-BocRit8D.js +0 -189
- package/dist/fs-utils-DSXeBcjj.js +0 -9
- package/dist/gateway-BCrUxrVw.js +0 -133
- package/dist/gateway-cli-B8bXBd_L.js +0 -443
- package/dist/gateway-install-token-pngTMc-f.js +0 -136
- package/dist/gateway-method-runtime-ueZTz7WH.js +0 -21
- package/dist/gateway-runtime-DbsoThML.js +0 -23
- package/dist/get-reply-DUuaxcBz.js +0 -5198
- package/dist/get-reply-from-config.runtime-B4Dgs3Hg.js +0 -2
- package/dist/github-copilot-token-7AfRRF7J.js +0 -2
- package/dist/health-7Yq5zpoZ.js +0 -3
- package/dist/health-DlZqxm2f.js +0 -621
- package/dist/health-DxesUuur.js +0 -111
- package/dist/health-state-BMG8kOby.js +0 -106
- package/dist/heartbeat-runner-Bq7A_Cjm.js +0 -5
- package/dist/heartbeat-runner-DVwbVyft.js +0 -1930
- package/dist/heartbeat-runner.runtime-DQ2NPXMD.js +0 -3
- package/dist/helpers-PCu2RivJ.js +0 -406
- package/dist/hook-helpers-DLEnCRO7.js +0 -44
- package/dist/hooks-Bv-otcl7.js +0 -536
- package/dist/hooks-cli-C5ve0nzF.js +0 -465
- package/dist/http-endpoint-helpers-w2SagsQz.js +0 -37
- package/dist/http-utils-CVvn0ZA-.js +0 -98
- package/dist/image-BeixBis4.js +0 -385
- package/dist/image-fallbacks-CPbmIMn9.js +0 -31
- package/dist/image-generation-core.auth.runtime-Co38iRxQ.js +0 -2
- package/dist/image-generation-provider-BA4Ar91S.js +0 -152
- package/dist/image-runtime-7ZsfioS1.js +0 -9
- package/dist/image-tool.helpers-upjA3ksB.js +0 -150
- package/dist/images-ChLi1Uog.js +0 -2
- package/dist/images-nB0XAnTa.js +0 -416
- package/dist/inbound-reply-dispatch-DglobJ8j.js +0 -2
- package/dist/inbound-reply-dispatch-QKOgNx-m.js +0 -147
- package/dist/index-AZzJCgph.d.ts +0 -1497
- package/dist/infra-runtime-CGD3RE_2.js +0 -32
- package/dist/init-poVZDCAM.js +0 -59
- package/dist/install-Dn9oPGmU.js +0 -262
- package/dist/install.runtime-D5sllsjl.js +0 -2
- package/dist/internal-CnOL_Roa.js +0 -399
- package/dist/isolated-agent-CNw6E3F0.js +0 -1097
- package/dist/isolated-agent-DjkHhEyR.js +0 -2
- package/dist/kernel-B5Y5IQ-A.js +0 -3
- package/dist/kernel-CMuO4VJy.js +0 -979
- package/dist/kimi-web-search-provider.runtime-V4m_MHsk.js +0 -307
- package/dist/library-B-1EZjtY.js +0 -45
- package/dist/lifecycle-B-5gEZ7O.js +0 -570
- package/dist/lifecycle-Bzh5Jo09.js +0 -2
- package/dist/lifecycle-DvbcJYMl.js +0 -355
- package/dist/lifecycle.runtime-Bzh5Jo09.js +0 -2
- package/dist/list-B4xSHRdU.js +0 -2
- package/dist/list-BnhZHpxx.js +0 -207
- package/dist/list.list-command-DAz-Ws_6.js +0 -429
- package/dist/list.model-row-DtdX9KDu.js +0 -39
- package/dist/list.probe-CY6lxq51.js +0 -2
- package/dist/list.probe-DPuE1GOH.js +0 -451
- package/dist/list.provider-catalog-BHc9WXI6.js +0 -211
- package/dist/list.provider-catalog-CFbrroys.js +0 -2
- package/dist/list.registry-load-C1_sr3gb.js +0 -152
- package/dist/list.row-sources-BMtHc9oi.js +0 -474
- package/dist/list.source-plan-Dth72qPP.js +0 -81
- package/dist/list.status-command-BXCnEq8Q.js +0 -815
- package/dist/live-model-switch-Dxav22vq.js +0 -119
- package/dist/llm-slug-generator-6o8RXL11.js +0 -78
- package/dist/load-config-EF3n0Dyo.js +0 -27
- package/dist/load-context-CI_ogQt_.js +0 -82
- package/dist/loader-DtwEzpp-.js +0 -7008
- package/dist/local-dispatch.runtime-21liE3rA.js +0 -10
- package/dist/main-session-restart-recovery-D1g62iJ5.js +0 -2
- package/dist/main-session-restart-recovery-v2I9CEXi.js +0 -389
- package/dist/managed-image-attachments-BEl5qfCT.js +0 -616
- package/dist/managed-image-attachments-D5KqX2Qy.js +0 -2
- package/dist/manager-DZc3xiNq.js +0 -2314
- package/dist/manager-Vf3vLTGe.js +0 -3737
- package/dist/mcp-http-BaJoPKF9.js +0 -583
- package/dist/mcp-http-CpEaJIGJ.js +0 -2
- package/dist/media-runtime-DtP_Ff8m.js +0 -391
- package/dist/media-services-CXYbyIIp.js +0 -416
- package/dist/media-understanding-DvTIsIyr.js +0 -87
- package/dist/media-understanding-provider-DBBAvuwG.js +0 -13
- package/dist/media-understanding-provider-DOf_uZrx.js +0 -70
- package/dist/media-understanding-provider-DdRfNh9h.js +0 -69
- package/dist/media-understanding-provider-mqpQDt8V.js +0 -29
- package/dist/memory-BNk25Hi6.js +0 -437
- package/dist/memory-core-host-engine-embeddings-XsK5xS70.js +0 -667
- package/dist/memory-core-host-engine-foundation-BYkoOLXl.js +0 -15
- package/dist/memory-core-host-engine-qmd-0JuUCKCK.js +0 -2
- package/dist/memory-core-host-engine-storage-MCFGjDwW.js +0 -2
- package/dist/memory-core-host-runtime-cli-fVGH65E8.js +0 -10
- package/dist/memory-core-host-runtime-core-JtXIAdlM.js +0 -12
- package/dist/memory-core-host-runtime-files-BGw_ypoN.js +0 -4
- package/dist/memory-embedding-provider-runtime-3UBzs4sx.js +0 -36
- package/dist/memory-host-core-Y_O5V-mu.js +0 -78
- package/dist/memory-host-search.runtime-B4TzyvmR.js +0 -2
- package/dist/memory-runtime-9kEPAeKV.js +0 -2
- package/dist/memory-runtime-BU4t85uu.js +0 -57
- package/dist/memory-search-CVX--mSz.js +0 -235
- package/dist/message-BVXoNpWP.js +0 -284
- package/dist/message-HaiKqj0A.js +0 -2
- package/dist/message-action-runner-Chwzn02r.js +0 -2
- package/dist/message-action-runner-tEEliptt.js +0 -1922
- package/dist/message-handler-CHDS_NF-.js +0 -1806
- package/dist/metadata-registry-loader-Croa1pgR.js +0 -22
- package/dist/metadata-registry-loader-w0p86vis.js +0 -2
- package/dist/migrate-CPCZJ4H5.js +0 -2
- package/dist/migrate-CUj6m6Cx.js +0 -458
- package/dist/migration-provider-runtime-4r4WGtf2.js +0 -2
- package/dist/migration-provider-runtime-TxrH_mM7.js +0 -68
- package/dist/minimax-web-search-provider.runtime-Dr2GJiWj.js +0 -148
- package/dist/model-BQSouNOa.js +0 -2
- package/dist/model-CAk0bcuO.js +0 -1302
- package/dist/model-auth-BF7w9Fiv.js +0 -705
- package/dist/model-auth-label-r729wcPk.js +0 -67
- package/dist/model-auth-us8b_D5d.js +0 -6
- package/dist/model-catalog-BGykBGxx.js +0 -434
- package/dist/model-catalog-BVXrqFbI.js +0 -3
- package/dist/model-catalog-visibility-Bsup46vy.js +0 -76
- package/dist/model-config.helpers-wzD1EEfE.js +0 -95
- package/dist/model-context-tokens-DrIU9eJc.js +0 -572
- package/dist/model-fallback-GySPjr3J.js +0 -1288
- package/dist/model-fallback-auth.runtime-Dg_Jmguu.js +0 -5
- package/dist/model-picker-BI6jXOjt.js +0 -3
- package/dist/model-picker-DYyJHhfH.js +0 -1135
- package/dist/model-picker-visibility-D_IMZfxd.js +0 -22
- package/dist/model-picker.runtime-B70kQMyc.js +0 -48
- package/dist/model-pricing-cache-CSpUDzSt.js +0 -856
- package/dist/model-pricing-cache-dkPwTUVJ.js +0 -3
- package/dist/model-pricing-cache-state-C6shoEWy.js +0 -83
- package/dist/model-provider-auth-BfZHbTaj.js +0 -2
- package/dist/model-provider-auth-CPCBWvqL.js +0 -375
- package/dist/model-runtime-aliases-DUzusc9_.js +0 -133
- package/dist/model-selection-8UzO5mgF.js +0 -254
- package/dist/model-selection-Cb7azWw1.js +0 -7
- package/dist/model-selection-jDYEo0WI.js +0 -352
- package/dist/model-selection.runtime-D_yHZLbs.js +0 -7
- package/dist/models-BxA2IU3W.js +0 -57
- package/dist/models-auth-status-yG7yyRcv.js +0 -280
- package/dist/models-cli-DUt4uiMH.js +0 -257
- package/dist/models-config-B5bkuh6A.js +0 -1189
- package/dist/models-config-Xj8vG_x2.js +0 -2
- package/dist/models-config.providers.secrets-DNBB440Z.js +0 -2
- package/dist/models-config.providers.secrets-DNIQlBSE.js +0 -382
- package/dist/models-http-DMILRsry.js +0 -88
- package/dist/monitor-2_c2Ttjf.js +0 -1024
- package/dist/monitor-7tD_FE_5.js +0 -60
- package/dist/monitor.account-D0F9tnWD.js +0 -5382
- package/dist/music-generation-provider-3ykPaUwR.js +0 -308
- package/dist/native-hook-relay-BJKHIhWd.js +0 -1378
- package/dist/native-hook-relay-V8Kappw1.js +0 -19
- package/dist/node-cli-BLVyQ93e.js +0 -2806
- package/dist/node-command-policy-B0ezpI_O.js +0 -295
- package/dist/nodes-DnWH_15m.js +0 -3
- package/dist/nodes-RkB4ZmP6.js +0 -1483
- package/dist/nodes-cli-upwPs91b.js +0 -960
- package/dist/nodes-pending--sojaxpI.js +0 -211
- package/dist/nodes-utils-Yks_uDZK.js +0 -85
- package/dist/oauth-CQN2efEy.js +0 -207
- package/dist/oauth-DApi3OI9.js +0 -746
- package/dist/oauth-DkUWBub2.js +0 -852
- package/dist/onboard-CiQSBSrz.js +0 -768
- package/dist/onboard-channels-DaWYXiLv.js +0 -1534
- package/dist/onboard-channels-DnwM2_IL.js +0 -2
- package/dist/onboard-custom-BQPckD0V.js +0 -3
- package/dist/onboard-custom-config-BmbThk2-.js +0 -422
- package/dist/onboard-custom-xInFj1Rs.js +0 -280
- package/dist/onboard-search-DSfmthe5.js +0 -412
- package/dist/openai-compat-errors-VR4SN1MV.js +0 -136
- package/dist/openai-http-DV95ynPi.js +0 -836
- package/dist/openai-transport-stream-BwpzqR-b.js +0 -3427
- package/dist/openresponses-http-DPchx8IC.js +0 -1175
- package/dist/operations-f9R8j-r9.js +0 -805
- package/dist/order-BQx8mNGZ.js +0 -218
- package/dist/outbound-attachment-C4yojK6p.js +0 -19
- package/dist/param-readers-BIXyd5la.js +0 -2
- package/dist/payloads-DrY1bKyF.js +0 -256
- package/dist/persistent-bindings.lifecycle-BiPN7luW.js +0 -85
- package/dist/persistent-bindings.lifecycle-X3wfan2Z.js +0 -2
- package/dist/plugin-enabled-CqsBObeO.js +0 -232
- package/dist/plugin-install-CfB1_kpX.js +0 -118
- package/dist/plugin-install-DzMraXHH.js +0 -2
- package/dist/plugin-install-config-policy-BD_elPNg.js +0 -169
- package/dist/plugin-registration-Dy58ncPf.js +0 -97
- package/dist/plugin-registry-BlmODeop.js +0 -3
- package/dist/plugin-registry-k5OK18l5.js +0 -2
- package/dist/plugin-runtime-B3t53CKr.js +0 -102
- package/dist/plugin-sdk/bundled-channel-config-schema-UtIBjviA.d.ts +0 -3169
- package/dist/plugin-service-sKF4gWFm.js +0 -1249
- package/dist/plugins-authoring-command-I72k2cuv.js +0 -304
- package/dist/plugins-cli-DMQRbPsU.js +0 -63
- package/dist/plugins-cli.runtime-CvDuKFJj.js +0 -339
- package/dist/plugins-command-helpers-C5WMM4bk.js +0 -164
- package/dist/plugins-command-helpers-DDt_pMQ4.js +0 -2
- package/dist/plugins-inspect-command-ka7Hpld3.js +0 -248
- package/dist/plugins-install-command-BHSgof-_.js +0 -2
- package/dist/plugins-install-command-t5caX9q_.js +0 -993
- package/dist/plugins-install-persist-Bah1m3x7.js +0 -252
- package/dist/plugins-list-command-BXLWwXHM.js +0 -184
- package/dist/plugins-uninstall-command-C_3m6CrW.js +0 -118
- package/dist/prepare.runtime-COZaHg5E.js +0 -798
- package/dist/presentation-card-CciJv4ru.js +0 -164
- package/dist/preview-warnings-L4VuEOyB.js +0 -618
- package/dist/profiles-CM2xoUYX.js +0 -194
- package/dist/program-B-4C7bC-.js +0 -131
- package/dist/provider-adapters-Eh8mS2Fd.js +0 -104
- package/dist/provider-api-key-auth-DTh2cbmS.js +0 -117
- package/dist/provider-api-key-auth.runtime-DrTYYfxK.js +0 -14
- package/dist/provider-auth-Bnaijzmv.js +0 -281
- package/dist/provider-auth-api-key-CNP8o5E7.js +0 -5
- package/dist/provider-auth-choice-Devw4sQf.js +0 -311
- package/dist/provider-auth-choice-helpers-DmVudRp6.js +0 -210
- package/dist/provider-auth-choice.runtime-C337IQ3W.js +0 -2
- package/dist/provider-auth-choice.runtime-DqGYalFo.js +0 -18
- package/dist/provider-auth-guidance-Bk4WV6Lg.js +0 -2
- package/dist/provider-auth-guidance-C7NCKuKn.js +0 -34
- package/dist/provider-auth-helpers-r7mC8I5l.js +0 -177
- package/dist/provider-auth-login.runtime-BFJgAAS6.js +0 -156
- package/dist/provider-auth-runtime-BiLPGiMW.js +0 -186
- package/dist/provider-discovery-uxRmAIf_.js +0 -95
- package/dist/provider-discovery.runtime-mwbSivDS.js +0 -290
- package/dist/provider-dispatcher-CtKWj3r-.js +0 -22
- package/dist/provider-entry-DjACqdrB.js +0 -134
- package/dist/provider-hook-runtime-CpJsM7Dk.js +0 -255
- package/dist/provider-openai-codex-oauth-DWGmVUYg.js +0 -2
- package/dist/provider-openai-codex-oauth-ctxd00JW.js +0 -44
- package/dist/provider-registration-l8EX4voM.js +0 -235
- package/dist/provider-registry-BgIQXJle.js +0 -31
- package/dist/provider-registry-CVuzobHN.js +0 -36
- package/dist/provider-registry-DmdDbSQs.js +0 -61
- package/dist/provider-registry-LqtLqheu.js +0 -61
- package/dist/provider-registry-pTYVjODc.js +0 -61
- package/dist/provider-runtime-BQZSuC9l.js +0 -3
- package/dist/provider-runtime-D9Q-7VuO.js +0 -386
- package/dist/provider-runtime.runtime-C6YZ8YI0.js +0 -26
- package/dist/provider-self-hosted-setup-BIAD2ISe.js +0 -373
- package/dist/provider-stream-DScdaoRo.js +0 -313
- package/dist/provider-stream-PE0IxmpZ.js +0 -1084
- package/dist/provider-stream-family-S2fhlydZ.js +0 -2
- package/dist/provider-usage-DVKHMF6l.js +0 -4
- package/dist/provider-usage-EEjx1av0.js +0 -71
- package/dist/provider-usage.load-Cu11xbrw.js +0 -357
- package/dist/provider-web-search-Dbk7MO-1.js +0 -58
- package/dist/provider-wizard-DS2Xb2eu.js +0 -125
- package/dist/providers.runtime-BPhGcupv.js +0 -240
- package/dist/providers.runtime-DoylK-ht.js +0 -2
- package/dist/proxy-BxacG0p3.js +0 -662
- package/dist/public-artifacts-Dq3y7bBv.js +0 -7
- package/dist/pw-ai-DlSSqerW.js +0 -3064
- package/dist/qmd-manager-B_SG-ejE.js +0 -2040
- package/dist/qr-cli-CT-sE_j9.js +0 -2
- package/dist/qr-cli-DPlDCXJQ.js +0 -371
- package/dist/qr-image--VmmvuDB.js +0 -2
- package/dist/queue-Be2Y7PcO.js +0 -923
- package/dist/read-file-hhemkDfq.js +0 -183
- package/dist/register-service-commands-CeVpCQU3.js +0 -77
- package/dist/register.agent-JLsb-giw.js +0 -152
- package/dist/register.configure-CP0Q-ost.js +0 -16
- package/dist/register.crestodian-CBXyXEix.js +0 -24
- package/dist/register.maintenance-DGIPQ2Vo.js +0 -85
- package/dist/register.message-BBQwz0Ld.js +0 -404
- package/dist/register.migrate-CkgNlvLD.js +0 -106
- package/dist/register.onboard-CS9gRK0c.js +0 -115
- package/dist/register.setup-DhqDOer9.js +0 -40
- package/dist/register.status-health-sessions-CiwQN_lw.js +0 -293
- package/dist/register.subclis-86Md7P0P.js +0 -3
- package/dist/register.subclis-CTVI8zvZ.js +0 -31
- package/dist/register.subclis-core-Cy4AnRCu.js +0 -273
- package/dist/rem-harness-vSsq3HiK.js +0 -649
- package/dist/repair-sequencing-SHADYdcA.js +0 -652
- package/dist/reply-media-paths.runtime-Bf5nxPuP.js +0 -154
- package/dist/reply-media-paths.runtime-sLsMpKGO.js +0 -2
- package/dist/reply-payloads-CJ3w8rSA.js +0 -79
- package/dist/reply-payloads-dedupe-DDFXWCVR.js +0 -176
- package/dist/reply-payloads-dedupe.runtime-DbXPzKmG.js +0 -2
- package/dist/reply-timing-tracker-DjVIBsVb.js +0 -205
- package/dist/reply-turn-admission-nEW5QbY5.js +0 -2056
- package/dist/reply.runtime-B4Dgs3Hg.js +0 -2
- package/dist/reset-preserved-selection-CVD1yeVC.js +0 -45
- package/dist/resolve-DidlinMh.js +0 -106
- package/dist/restart-DzTrO95c.js +0 -121
- package/dist/result-fallback-classifier-BqsFUDvP.js +0 -98
- package/dist/root-help-QGs0dCCN.js +0 -43
- package/dist/route-B3R-uzFG.js +0 -475
- package/dist/route-reply-CdfhgIoY.js +0 -174
- package/dist/route-reply.runtime-DwuU2WjH.js +0 -2
- package/dist/routes-ChXmJocl.js +0 -3701
- package/dist/routes-D-ZF4AdA.js +0 -2
- package/dist/run-ClmVDTET.js +0 -1162
- package/dist/run-auth-profile.runtime-CTxrwz0y.js +0 -2
- package/dist/run-command-CqZJQ0Im.js +0 -2
- package/dist/run-command-GClW75NL.js +0 -23
- package/dist/run-context-BOdGeRg5.js +0 -66
- package/dist/run-context.runtime-CwuKVYPj.js +0 -2
- package/dist/run-delivery.runtime-BQ39dm34.js +0 -762
- package/dist/run-embedded.runtime-e1K4Bt1_.js +0 -4
- package/dist/run-execution-cli.runtime-Cjrgt4cV.js +0 -4
- package/dist/run-executor.runtime-C2JE6JGb.js +0 -330
- package/dist/run-model-catalog.runtime-DkrLKopr.js +0 -2
- package/dist/run-session-state-C5YdQs7o.js +0 -159
- package/dist/run-subagent-registry.runtime-Dl_lXi6y.js +0 -2
- package/dist/runner-CNGHdaIg.js +0 -704
- package/dist/runner.entries-dckPkeld.js +0 -1485
- package/dist/runtime-9LxcVCyw.js +0 -615
- package/dist/runtime-BCOtBS5G.js +0 -3
- package/dist/runtime-C-pgjoJr.js +0 -210
- package/dist/runtime-CyF0vJXG.js +0 -10
- package/dist/runtime-D-7lMvGV.js +0 -2
- package/dist/runtime-D17OmF9G.js +0 -224
- package/dist/runtime-D6SweufG.js +0 -245
- package/dist/runtime-DVAM7AFd.js +0 -2
- package/dist/runtime-DX2ClrP-.js +0 -436
- package/dist/runtime-FOOWuiYX.js +0 -300
- package/dist/runtime-api-B0F0JsV1.js +0 -12
- package/dist/runtime-cREKSBYC.js +0 -2
- package/dist/runtime-channel-BmD4hoCR.js +0 -148
- package/dist/runtime-channel-BsebQSPL.js +0 -2
- package/dist/runtime-config-collectors-BjYeQ0Tk.js +0 -525
- package/dist/runtime-embedded-agent.runtime-A4r23Bn8.js +0 -2
- package/dist/runtime-internal-DkV-EMTK.js +0 -2
- package/dist/runtime-llm.runtime-BQKNnuRc.js +0 -307
- package/dist/runtime-model-auth.runtime-BbGqHVM5.js +0 -2
- package/dist/runtime-model-auth.runtime-rtJH4LBB.js +0 -46
- package/dist/runtime-options-B0EGb1Wq.js +0 -275
- package/dist/runtime-plugin-Bdqm44bH.js +0 -92
- package/dist/runtime-plugins-rZk1eAK_.js +0 -32
- package/dist/runtime-plugins.runtime-DApiYzny.js +0 -2
- package/dist/runtime-prepare.runtime-DWxvnbyY.js +0 -81
- package/dist/runtime-provider-B0slPjtk.js +0 -2
- package/dist/runtime-provider-DLgupOKt.js +0 -24
- package/dist/runtime-registry-loader-Cf2HuMjd.js +0 -2
- package/dist/runtime-registry-loader-DLzDrA7e.js +0 -117
- package/dist/runtime-shared-Bg-OiD4u.js +0 -365
- package/dist/runtime-web-channel-plugin-DrMjRaqi.js +0 -204
- package/dist/scan-DA7Oqxuv.js +0 -573
- package/dist/sdk-security-runtime-WjOaCbga.js +0 -86
- package/dist/sdk-setup-tools-DaYT6_jD.js +0 -8
- package/dist/secrets-cli-fJQ0geWO.js +0 -150
- package/dist/security-cli-CJMwGp8U.js +0 -520
- package/dist/selection-BNwLQzqJ.js +0 -3
- package/dist/selection-Cj-l80pO.js +0 -18365
- package/dist/send-DstYcrDW.js +0 -711
- package/dist/send-aTxtLkJm.js +0 -178
- package/dist/send-media-OG5Gd31l.js +0 -2072
- package/dist/send-qwDMMnM6.js +0 -1222
- package/dist/send-result-BWRKr16H.js +0 -141
- package/dist/server-CMtA1S09.js +0 -24
- package/dist/server-DIRaYiiH.js +0 -72
- package/dist/server-aux-handlers-BRO-9-Jf.js +0 -1347
- package/dist/server-chat-0J_ke0ph.js +0 -827
- package/dist/server-context-DWOSX34k.js +0 -2
- package/dist/server-context-R7MFLFdI.js +0 -955
- package/dist/server-cron-2FuFg2j8.js +0 -2
- package/dist/server-cron-ChPAVQtg.js +0 -3173
- package/dist/server-maintenance-ZvS7Id6T.js +0 -152
- package/dist/server-methods-DSbhPK3k.js +0 -497
- package/dist/server-middleware-CYxFU-e5.js +0 -122
- package/dist/server-model-catalog-B22UhmRr.js +0 -73
- package/dist/server-model-catalog-BJIHPP3P.js +0 -2
- package/dist/server-node-events-tNWJnXQM.js +0 -597
- package/dist/server-plugin-bootstrap-Ccu97zi8.js +0 -71
- package/dist/server-plugins-ByXwKPnj.js +0 -435
- package/dist/server-reload-handlers-ConGiT9Q.js +0 -719
- package/dist/server-restart-sentinel-mPHo61LL.js +0 -700
- package/dist/server-runtime-services-BR1icaUW.js +0 -3
- package/dist/server-runtime-services-Bx8n34dj.js +0 -147
- package/dist/server-runtime-subscriptions-CZklTkRG.js +0 -67
- package/dist/server-session-events-DxdiZYM2.js +0 -244
- package/dist/server-session-key-CYvLslFO.js +0 -75
- package/dist/server-session-key-D9GQut81.js +0 -2
- package/dist/server-startup-config-Byb0vR8j.js +0 -305
- package/dist/server-startup-early-a65fHTQS.js +0 -87
- package/dist/server-startup-memory-ClwzC9jX.js +0 -72
- package/dist/server-startup-plugins-CaBj0Nt2.js +0 -127
- package/dist/server-startup-post-attach-B7TcxkmO.js +0 -793
- package/dist/server-ws-runtime-Cxk_CqMr.js +0 -374
- package/dist/server.impl-CQ6dnx43.js +0 -2622
- package/dist/session-cost-usage-GsYDNvka.js +0 -1600
- package/dist/session-kill-http-CKkxZhhd.js +0 -121
- package/dist/session-log-runtime-Bwc2Oijk.js +0 -1258
- package/dist/session-override-CWbKiXiC.js +0 -134
- package/dist/session-reset-model.runtime-CDFMjwWA.js +0 -144
- package/dist/session-reset-service-SE0aK4cw.js +0 -651
- package/dist/session-status.runtime-Df89I7Fk.js +0 -2
- package/dist/session-store-RkvjJPMQ.js +0 -273
- package/dist/session-store.runtime-C7P5asx7.js +0 -4
- package/dist/session-subagent-reactivation.runtime-BhGUZG1Z.js +0 -2
- package/dist/session-tab-registry-9rSuQ0Yz.js +0 -551
- package/dist/session-utils-De8TIM0h.js +0 -1508
- package/dist/sessions-6b9a00Tl.js +0 -1917
- package/dist/sessions-CEPHczjC.js +0 -316
- package/dist/sessions-CEojHc8b.js +0 -12736
- package/dist/sessions-cleanup-BkG7_sq9.js +0 -165
- package/dist/sessions-history-http-BjJEfjJa.js +0 -432
- package/dist/sessions-patch-PwG5sknc.js +0 -401
- package/dist/sessions-resolve-CSIrd_fi.js +0 -180
- package/dist/sessions-table-8CbU7jXa.js +0 -161
- package/dist/sessions.runtime-BYHMD0M7.js +0 -2
- package/dist/set-BJDpe28W.js +0 -31
- package/dist/set-image-CwTFx7PX.js +0 -17
- package/dist/setup-B6LmeIms.js +0 -614
- package/dist/setup-B_zxHfYu.js +0 -2
- package/dist/setup-onboard-configure-help-fast-path-Bck3SKEH.js +0 -64
- package/dist/setup.finalize-CmLYX-Rf.js +0 -586
- package/dist/setup.gateway-config-H_89Msro.js +0 -281
- package/dist/setup.migration-import-DVzyUjX6.js +0 -2
- package/dist/setup.migration-import-DmJpqoqf.js +0 -200
- package/dist/setup.post-install-migration-WPFWKXXg.js +0 -128
- package/dist/shared-CUhu8NTs.js +0 -5
- package/dist/shared-D-BN2JhY.js +0 -71
- package/dist/shared-ES8nDIcn.js +0 -212
- package/dist/simple-completion-runtime-BGZkWvKr.js +0 -206
- package/dist/simple-completion-runtime-CM_IISYW.js +0 -2
- package/dist/simple-completion-transport-Bo0u9dhp.js +0 -83
- package/dist/snapshot-urls-C1KjRQD5.js +0 -317
- package/dist/speech-core-Bas7e4h0.js +0 -119
- package/dist/speech-provider-BonJQv5S.js +0 -227
- package/dist/speech-provider-CwdKQmDv.js +0 -171
- package/dist/speech-provider-DcQRnYhZ.js +0 -233
- package/dist/stale-oauth-profile-shadows-C3aeAWfv.js +0 -186
- package/dist/stale-oauth-profile-shadows-m5rb8dPc.js +0 -2
- package/dist/standalone-runtime-registry-loader-B9n2LBKC.js +0 -59
- package/dist/startup-context-DY7C4riM.js +0 -314
- package/dist/status-6EPKat7p.js +0 -73
- package/dist/status-C6Fa7Dsf.js +0 -2
- package/dist/status-CNnxDQlM.js +0 -4
- package/dist/status-D2Scvbc0.js +0 -3
- package/dist/status-Ducanro3.js +0 -2
- package/dist/status-_XX_6QVA.js +0 -466
- package/dist/status-all-BP1u6vou.js +0 -573
- package/dist/status-json-DPlOJ_ue.js +0 -15
- package/dist/status-json-command-BT7EwVKj.js +0 -84
- package/dist/status-message-Dzr9-MX-.js +0 -495
- package/dist/status-message.runtime-DFezIt1d.js +0 -6
- package/dist/status-prBlcUV5.js +0 -249
- package/dist/status-queue.runtime-C1bmg2rl.js +0 -2
- package/dist/status-runtime-shared-RjKIPEQ0.js +0 -289
- package/dist/status-subagents.runtime-tsCCe4Ny.js +0 -32
- package/dist/status-text-Bkeyg8Bf.js +0 -301
- package/dist/status.command-D06_4ATq.js +0 -425
- package/dist/status.command-dDEZM84a.js +0 -2
- package/dist/status.command.text-runtime-WH9tP7yg.js +0 -15
- package/dist/status.runtime-B76GaBIR.js +0 -2
- package/dist/status.scan-Bc6clx0F.js +0 -72
- package/dist/status.scan-overview-v_-AaFhC.js +0 -460
- package/dist/status.scan.deps.runtime-BkH1HAb4.js +0 -19
- package/dist/status.scan.fast-json-CrlfKKI3.js +0 -2
- package/dist/status.scan.fast-json-D8v6zfP8.js +0 -163
- package/dist/status.summary-DBhvgOPr.js +0 -276
- package/dist/status.summary-hQV0PKFO.js +0 -2
- package/dist/store-BClomp_4.js +0 -3
- package/dist/store-BHqDPtNw.js +0 -2302
- package/dist/stored-model-override-vm4CtQWX.js +0 -79
- package/dist/subagent-announce-D244Q4w2.js +0 -353
- package/dist/subagent-announce-delivery-qKZfF7Bs.js +0 -1369
- package/dist/subagent-control-c87mVGUE.js +0 -492
- package/dist/subagent-control.runtime-DfQtIsDb.js +0 -3
- package/dist/subagent-hooks-B_UW5Len.js +0 -2
- package/dist/subagent-hooks-CYvFWt_r.js +0 -230
- package/dist/subagent-hooks-api-DZgaJf19.js +0 -23
- package/dist/subagent-registry-BlcoCggo.js +0 -2627
- package/dist/subagent-registry-CuObhNeO.js +0 -3
- package/dist/subagent-session-cleanup-hFF8Z34s.js +0 -390
- package/dist/system-CN_Knfqq.js +0 -111
- package/dist/system-prompt-config-BmZlhYK9.js +0 -918
- package/dist/talk-DrjGczYs.js +0 -2454
- package/dist/target-id-BNpbyWkq.js +0 -107
- package/dist/targets-CQcGo6u4.js +0 -267
- package/dist/targets.runtime-DwcxNI-x.js +0 -2
- package/dist/task-executor-CZg-qt4u.js +0 -349
- package/dist/task-owner-access-Duem5jjb.js +0 -74
- package/dist/task-registry-Cw8pc3Ry.js +0 -2362
- package/dist/task-registry-delivery-runtime-HaiKqj0A.js +0 -2
- package/dist/task-registry.maintenance-BLv3wpK9.js +0 -764
- package/dist/task-registry.maintenance-CvlIcxE-.js +0 -2
- package/dist/task-status-access-C5nDJSI4.js +0 -18
- package/dist/tasks-D3CfEAlq.js +0 -548
- package/dist/tasks-WKnE5fvr.js +0 -153
- package/dist/tasks-audit-system-okJjcOjU.js +0 -210
- package/dist/tasks-json-C-iUgWNu.js +0 -73
- package/dist/tavily-web-search-provider.runtime-jpagljrA.js +0 -112
- package/dist/text-report-BTsF3Pv3.js +0 -695
- package/dist/text-transforms.runtime-CgH_pbcQ.js +0 -113
- package/dist/thread-bindings-BWxpUE9U.js +0 -228
- package/dist/tool-DhJbbm91.js +0 -143
- package/dist/tool-dispatch-CpFUfblu.js +0 -155
- package/dist/tool-images-C-tFlXjE.js +0 -247
- package/dist/tool-plugin-3NejWxZW.js +0 -93
- package/dist/tool-resolution-oW8Cbamd.js +0 -153
- package/dist/tool-result-truncation-CWFGf7Eu.js +0 -498
- package/dist/tool-schema-CMtc7PdZ.js +0 -40
- package/dist/tool-schema-projection-DJRPEEvY.js +0 -215
- package/dist/tool-split-E4RdK5jS.js +0 -323
- package/dist/tools-BAl3JiNw.js +0 -901
- package/dist/tools-DC8tCPxR.js +0 -579
- package/dist/tools-catalog-Dzv9zaBD.js +0 -156
- package/dist/tools-effective-CGvzyIL2.js +0 -442
- package/dist/tools-effective-inventory-GI5N5Q9v.js +0 -379
- package/dist/tools-invoke-CU2U0hNH.js +0 -51
- package/dist/tools-invoke-http-8s3FiUy4.js +0 -68
- package/dist/tools-invoke-shared-DIETrEY7.js +0 -200
- package/dist/tools.runtime-Bnm8CI7w.js +0 -5
- package/dist/transcript-rewrite-Buv2ITw4.js +0 -688
- package/dist/transcripts-tool-BCFlLCFd.js +0 -2
- package/dist/transcripts-tool-CWgNd0Uw.js +0 -656
- package/dist/tts-Aguo4zC5.js +0 -3
- package/dist/tts-Bf77cURn.js +0 -2
- package/dist/tts-DnADOKOP.js +0 -194
- package/dist/tts-runtime-MBSH-nOM.js +0 -1337
- package/dist/tts.runtime-B-NR9osE.js +0 -2
- package/dist/tts.runtime-Bo-QxKgx.js +0 -3
- package/dist/tui-B0CdNmCz.js +0 -4860
- package/dist/tui-ByRcXM3Z.js +0 -2
- package/dist/tui-backend-C52BUoZI.js +0 -256
- package/dist/tui-cli-BQHpZ4n0.js +0 -40
- package/dist/typing-policy-XspVOezC.js +0 -199
- package/dist/usage-BOYwzimH.js +0 -1113
- package/dist/usage-BSmLrVWB.js +0 -623
- package/dist/usage-format-CfzICmvv.js +0 -2
- package/dist/usage-format-DPJKCPic.js +0 -394
- package/dist/video-generation-provider-CdCTztQ7.js +0 -77
- package/dist/video-generation-provider-MUUshUzz.js +0 -325
- package/dist/video-generation-provider-XmzzTa6e.js +0 -297
- package/dist/video-generation-provider-weiQUJE5.js +0 -64
- package/dist/web-fetch-providers.runtime-tD9zqAS2.js +0 -41
- package/dist/web-guarded-fetch-CyhQZ1yD.js +0 -2
- package/dist/web-guarded-fetch-DIXHI-yJ.js +0 -58
- package/dist/web-media-BPnTMYE5.js +0 -4
- package/dist/web-media-DV_tCQiQ.js +0 -2
- package/dist/web-media-DYydVGCK.js +0 -651
- package/dist/web-provider-runtime-shared-h3M6Bqyg.js +0 -142
- package/dist/web-search-provider-common-CEYWuDcp.js +0 -252
- package/dist/web-search-providers.runtime-YrayP296.js +0 -41
- package/dist/zod-schema.core-BGLctDlK.d.ts +0 -166
- /package/dist/{acp-runtime-backend-CHZtaM6t.js → acp-runtime-backend-B83JR5Zf.js} +0 -0
- /package/dist/{agent-turn-attachments-BYCRK86s.js → agent-turn-attachments-D5uJijuK.js} +0 -0
- /package/dist/{auth-install-policy-t46tJ8jV.js → auth-install-policy-BIpdwrZ9.js} +0 -0
- /package/dist/{cli-backends-BHXnrVN_.js → cli-backends-79CCRQ2a.js} +0 -0
- /package/dist/{command-secret-targets-DZ0J2Wm3.js → command-secret-targets-BOJlcBil.js} +0 -0
- /package/dist/{commands-DWp49Exc.js → commands-Dw9hwmVt.js} +0 -0
- /package/dist/{commands-reset-hooks-MMq2dvff.js → commands-reset-hooks-epArfNOY.js} +0 -0
- /package/dist/{delegate-Dkj_5OvH.js → delegate-Bw8NQXVr.js} +0 -0
- /package/dist/{jobs-BGELIHcx.js → jobs-BIOTaq7l.js} +0 -0
- /package/dist/{kimi-web-search-provider-4PlMYsPx.js → kimi-web-search-provider-Bzg_DiXO.js} +0 -0
- /package/dist/{memory-host-search-Ds9GiNpf.js → memory-host-search-Dph0Mq-v.js} +0 -0
- /package/dist/{minimax-web-search-provider-d5gTJUNg.js → minimax-web-search-provider-CETxDkkI.js} +0 -0
- /package/dist/{model-selection-cli-CO6BHPiL.js → model-selection-cli-DizUvxeY.js} +0 -0
- /package/dist/{provider-auth-choice-preference-f7Us6TQL.js → provider-auth-choice-preference-uJn1811S.js} +0 -0
- /package/dist/{runtime-wfO9bV5y.js → runtime-BEVbpIgZ.js} +0 -0
- /package/dist/{runtime-web-tools-B6vr1LZs.js → runtime-web-tools-Bf0aEe-F.js} +0 -0
- /package/dist/{runtime-web-tools-fallback.runtime-Crs7KfH5.js → runtime-web-tools-fallback.runtime-DU6rTj6l.js} +0 -0
- /package/dist/{session-subagent-reactivation-H5Rdwkyy.js → session-subagent-reactivation-Bb5SCi9J.js} +0 -0
- /package/dist/{tavily-web-search-provider-DbdIzpMv.js → tavily-web-search-provider-CIEhV60D.js} +0 -0
|
@@ -1,2806 +0,0 @@
|
|
|
1
|
-
import { a as normalizeLowercaseStringOrEmpty, c as normalizeOptionalString, o as normalizeNullableString } from "./string-coerce-DKw2K5wM.js";
|
|
2
|
-
import { t as formatCliCommand } from "./command-format-Jv8eeOPe.js";
|
|
3
|
-
import { t as parseInlineOptionToken } from "./inline-option-token-UnnAKQPE.js";
|
|
4
|
-
import { t as formatDocsLink } from "./links-CgdQazeA.js";
|
|
5
|
-
import { r as theme, t as colorize } from "./theme-CLQ2HbnQ.js";
|
|
6
|
-
import { l as normalizeStringEntries } from "./string-normalization-B8G0vlWE.js";
|
|
7
|
-
import { c as sanitizeSystemRunEnvOverrides, o as sanitizeHostExecEnv, t as inspectHostExecEnvOverrides } from "./host-env-security-BujxmR07.js";
|
|
8
|
-
import { t as sameFileIdentity } from "./file-identity-BKNyWMFA.js";
|
|
9
|
-
import { _ as resolveNodeSystemdServiceName, g as resolveNodeLaunchAgentLabel, l as formatNodeServiceDescription, v as resolveNodeWindowsTaskName } from "./constants-yZ8YE2c7.js";
|
|
10
|
-
import { c as resolveNodeProgramArguments, n as resolveDaemonInstallRuntimeInputs, r as resolveDaemonNodeBinDir, t as emitDaemonInstallRuntimeWarning } from "./daemon-install-plan.shared-C4lrH4od.js";
|
|
11
|
-
import { n as VERSION } from "./version-DbEUUfgr.js";
|
|
12
|
-
import { u as buildNodeServiceEnvironment } from "./runtime-paths-Cap46_j_.js";
|
|
13
|
-
import { n as defaultRuntime } from "./runtime-BkTkFkXs.js";
|
|
14
|
-
import { l as normalizeAgentId } from "./session-key-CJf5_zWs.js";
|
|
15
|
-
import "./fs-safe-advanced-CF5H6Z2a.js";
|
|
16
|
-
import { r as isGatewayDaemonRuntime, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-FyabW1cN.js";
|
|
17
|
-
import { a as decodeWindowsOutputBuffer, o as resolveWindowsConsoleEncoding } from "./windows-command-SbCMKxJh.js";
|
|
18
|
-
import { a as logWarn } from "./logger-BZdGwGcr.js";
|
|
19
|
-
import { i as getRuntimeConfig } from "./io-DAZXanmU.js";
|
|
20
|
-
import { f as resolveApprovalAuditTrustPath, m as resolveCommandResolutionFromArgv, w as resolveExecutableFromPathEnv } from "./exec-safe-bin-trust-BavWgRnC.js";
|
|
21
|
-
import { O as normalizeExecutableToken, S as unwrapKnownDispatchWrapperInvocation, d as unwrapKnownShellMultiplexerInvocation, f as POSIX_INLINE_COMMAND_FLAGS, g as resolveInlineCommandMatch, k as splitShellArgs, l as isShellWrapperInvocation, p as advancePosixInlineOptionScan, s as isBlockedShellWrapperCommand, t as POSIX_SHELL_WRAPPERS, u as resolveShellWrapperTransportArgv, v as extractEnvAssignmentKeysFromDispatchWrappers } from "./shell-wrapper-resolution-Cl9437dq.js";
|
|
22
|
-
import "./config-Dp73zulp.js";
|
|
23
|
-
import { n as formatInvalidConfigPort, r as formatInvalidPortOption } from "./error-format-CrGPEfaz.js";
|
|
24
|
-
import { n as buildPlatformServiceStartHints, r as formatRuntimeStatus, t as buildPlatformRuntimeLogHints } from "./runtime-hints-DdaOrYoe.js";
|
|
25
|
-
import { d as resolveRuntimeStatusColor, h as installDaemonServiceAndEmit, n as createDaemonInstallActionContext, p as buildDaemonServiceSnapshot, r as failIfNixDaemonInstallMode, t as createCliStatusTextStyles } from "./shared-Chg2UDvE.js";
|
|
26
|
-
import { t as parsePort } from "./parse-port-CNAxga8y.js";
|
|
27
|
-
import { i as GATEWAY_CLIENT_NAMES, r as GATEWAY_CLIENT_MODES } from "./client-info-D6_UASoA.js";
|
|
28
|
-
import { n as GatewayClient } from "./client-mK_ev15j.js";
|
|
29
|
-
import { r as loadOrCreateDeviceIdentity } from "./device-identity-CdQCTTc_.js";
|
|
30
|
-
import { t as startGatewayClientWhenEventLoopReady } from "./client-start-readiness-Dr5DFXv2.js";
|
|
31
|
-
import { t as ConnectErrorDetailCodes } from "./connect-error-details-BqV3wdWQ.js";
|
|
32
|
-
import { i as runServiceUninstall, n as runServiceStart, r as runServiceStop, t as runServiceRestart } from "./lifecycle-core-B6CBgTRa.js";
|
|
33
|
-
import { a as getActivePluginRegistry } from "./runtime-BxNgD-nn.js";
|
|
34
|
-
import { i as NODE_SYSTEM_RUN_COMMANDS, n as NODE_EXEC_APPROVALS_COMMANDS } from "./node-commands-SnI8Vs7F.js";
|
|
35
|
-
import { t as getMachineDisplayName } from "./machine-name-D1CvdINL.js";
|
|
36
|
-
import "./exec-wrapper-resolution-6YlQSiva.js";
|
|
37
|
-
import { c as describeInterpreterInlineEval } from "./risks-DM4Eigd_.js";
|
|
38
|
-
import { c as analyzeArgvCommand, d as buildSafeBinsShellCommand, m as resolvePlannedSegmentArgv, n as evaluateShellAllowlist, t as evaluateExecAllowlist } from "./exec-approvals-allowlist-au7CtSQ2.js";
|
|
39
|
-
import { A as resolveExecApprovals, C as recordAllowlistMatchesUse, D as requiresExecApproval, F as resolveExecModePolicy, I as resolveExecPolicyForMode, R as saveExecApprovals, S as readExecApprovalsSnapshot, c as ensureExecApprovals, f as maxAsk, h as normalizeExecApprovals, l as hasDurableExecApproval, m as minSecurity, o as addDurableCommandApproval, p as mergeExecApprovalsSocketDefaults, s as commandRequiresSecurityAuditSuppressionApproval, x as persistAllowAlwaysPatterns, z as requestJsonlSocket } from "./exec-approvals-OmSY2hSB.js";
|
|
40
|
-
import { r as resolveExecSafeBinRuntimePolicy, t as isInterpreterLikeSafeBin } from "./exec-safe-bin-runtime-policy-D8i-qd_X.js";
|
|
41
|
-
import { t as ensureFengMingCliOnPath } from "./path-env-DoFiL3pG.js";
|
|
42
|
-
import { t as resolveGatewayConnectionAuth } from "./connection-auth-CMfogFIU.js";
|
|
43
|
-
import { t as formatHelpExamples } from "./help-format-CBGqVsX5.js";
|
|
44
|
-
import { n as detectPolicyInlineEval } from "./policy-D0zs1tEW.js";
|
|
45
|
-
import { c as normalizeSystemRunApprovalPlan, n as formatExecCommand, r as resolveSystemRunCommandRequest } from "./system-run-command-5NffG1dK.js";
|
|
46
|
-
import { n as loadNodeHostConfig, r as saveNodeHostConfig, t as ensureNodeHostConfig } from "./config-jV0VaBVc.js";
|
|
47
|
-
import { t as resolveNodeService } from "./node-service-DSLy3XBB.js";
|
|
48
|
-
import fs from "node:fs";
|
|
49
|
-
import path from "node:path";
|
|
50
|
-
import { spawn } from "node:child_process";
|
|
51
|
-
import crypto from "node:crypto";
|
|
52
|
-
//#region src/infra/exec-host.ts
|
|
53
|
-
async function requestExecHostViaSocket(params) {
|
|
54
|
-
const { socketPath, token, request } = params;
|
|
55
|
-
if (!socketPath || !token) return null;
|
|
56
|
-
const timeoutMs = params.timeoutMs ?? 2e4;
|
|
57
|
-
const requestJson = JSON.stringify(request);
|
|
58
|
-
const nonce = crypto.randomBytes(16).toString("hex");
|
|
59
|
-
const ts = Date.now();
|
|
60
|
-
const hmac = crypto.createHmac("sha256", token).update(`${nonce}:${ts}:${requestJson}`).digest("hex");
|
|
61
|
-
return await requestJsonlSocket({
|
|
62
|
-
socketPath,
|
|
63
|
-
requestLine: JSON.stringify({
|
|
64
|
-
type: "exec",
|
|
65
|
-
id: crypto.randomUUID(),
|
|
66
|
-
nonce,
|
|
67
|
-
ts,
|
|
68
|
-
hmac,
|
|
69
|
-
requestJson
|
|
70
|
-
}),
|
|
71
|
-
timeoutMs,
|
|
72
|
-
accept: (value) => {
|
|
73
|
-
const msg = value;
|
|
74
|
-
if (msg?.type !== "exec-res") return;
|
|
75
|
-
if (msg.ok === true && msg.payload) return {
|
|
76
|
-
ok: true,
|
|
77
|
-
payload: msg.payload
|
|
78
|
-
};
|
|
79
|
-
if (msg.ok === false && msg.error) return {
|
|
80
|
-
ok: false,
|
|
81
|
-
error: msg.error
|
|
82
|
-
};
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
//#endregion
|
|
88
|
-
//#region src/node-host/exec-policy.ts
|
|
89
|
-
function resolveExecApprovalDecision(value) {
|
|
90
|
-
if (value === "allow-once" || value === "allow-always") return value;
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
function formatSystemRunAllowlistMissMessage(params) {
|
|
94
|
-
if (params?.windowsShellWrapperBlocked) return "SYSTEM_RUN_DENIED: allowlist miss (Windows shell wrappers like cmd.exe /c require approval; approve once/always or run with --ask on-miss|always)";
|
|
95
|
-
if (params?.shellWrapperBlocked) return "SYSTEM_RUN_DENIED: allowlist miss (shell wrappers like sh/bash/zsh -c require approval; approve once/always or run with --ask on-miss|always)";
|
|
96
|
-
return "SYSTEM_RUN_DENIED: allowlist miss";
|
|
97
|
-
}
|
|
98
|
-
function evaluateSystemRunPolicy(params) {
|
|
99
|
-
const windowsShellWrapperBlocked = params.security === "allowlist" && params.shellWrapperInvocation && params.isWindows && params.cmdInvocation;
|
|
100
|
-
const shellWrapperBlocked = windowsShellWrapperBlocked;
|
|
101
|
-
const analysisOk = shellWrapperBlocked ? false : params.analysisOk;
|
|
102
|
-
const allowlistSatisfied = shellWrapperBlocked ? false : params.allowlistSatisfied;
|
|
103
|
-
const approvedByAsk = params.approvalDecision !== null || params.approved === true;
|
|
104
|
-
if (params.security === "deny") return {
|
|
105
|
-
allowed: false,
|
|
106
|
-
eventReason: "security=deny",
|
|
107
|
-
errorMessage: "SYSTEM_RUN_DISABLED: security=deny",
|
|
108
|
-
analysisOk,
|
|
109
|
-
allowlistSatisfied,
|
|
110
|
-
shellWrapperBlocked,
|
|
111
|
-
windowsShellWrapperBlocked,
|
|
112
|
-
requiresAsk: false,
|
|
113
|
-
approvalDecision: params.approvalDecision,
|
|
114
|
-
approvedByAsk
|
|
115
|
-
};
|
|
116
|
-
const requiresAsk = requiresExecApproval({
|
|
117
|
-
ask: params.ask,
|
|
118
|
-
security: params.security,
|
|
119
|
-
analysisOk,
|
|
120
|
-
allowlistSatisfied,
|
|
121
|
-
durableApprovalSatisfied: params.durableApprovalSatisfied
|
|
122
|
-
});
|
|
123
|
-
if (requiresAsk && !approvedByAsk) return {
|
|
124
|
-
allowed: false,
|
|
125
|
-
eventReason: "approval-required",
|
|
126
|
-
errorMessage: "SYSTEM_RUN_DENIED: approval required",
|
|
127
|
-
analysisOk,
|
|
128
|
-
allowlistSatisfied,
|
|
129
|
-
shellWrapperBlocked,
|
|
130
|
-
windowsShellWrapperBlocked,
|
|
131
|
-
requiresAsk,
|
|
132
|
-
approvalDecision: params.approvalDecision,
|
|
133
|
-
approvedByAsk
|
|
134
|
-
};
|
|
135
|
-
if (params.security === "allowlist" && (!analysisOk || !allowlistSatisfied) && !approvedByAsk) {
|
|
136
|
-
if (params.durableApprovalSatisfied) return {
|
|
137
|
-
allowed: true,
|
|
138
|
-
analysisOk,
|
|
139
|
-
allowlistSatisfied,
|
|
140
|
-
shellWrapperBlocked,
|
|
141
|
-
windowsShellWrapperBlocked,
|
|
142
|
-
requiresAsk,
|
|
143
|
-
approvalDecision: params.approvalDecision,
|
|
144
|
-
approvedByAsk
|
|
145
|
-
};
|
|
146
|
-
return {
|
|
147
|
-
allowed: false,
|
|
148
|
-
eventReason: "allowlist-miss",
|
|
149
|
-
errorMessage: formatSystemRunAllowlistMissMessage({
|
|
150
|
-
shellWrapperBlocked,
|
|
151
|
-
windowsShellWrapperBlocked
|
|
152
|
-
}),
|
|
153
|
-
analysisOk,
|
|
154
|
-
allowlistSatisfied,
|
|
155
|
-
shellWrapperBlocked,
|
|
156
|
-
windowsShellWrapperBlocked,
|
|
157
|
-
requiresAsk,
|
|
158
|
-
approvalDecision: params.approvalDecision,
|
|
159
|
-
approvedByAsk
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
return {
|
|
163
|
-
allowed: true,
|
|
164
|
-
analysisOk,
|
|
165
|
-
allowlistSatisfied,
|
|
166
|
-
shellWrapperBlocked,
|
|
167
|
-
windowsShellWrapperBlocked,
|
|
168
|
-
requiresAsk,
|
|
169
|
-
approvalDecision: params.approvalDecision,
|
|
170
|
-
approvedByAsk
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
//#endregion
|
|
174
|
-
//#region src/node-host/invoke-system-run-allowlist.ts
|
|
175
|
-
const POSIX_SHELL_WRAPPER_NAMES = POSIX_SHELL_WRAPPERS;
|
|
176
|
-
function evaluateSystemRunAllowlist(params) {
|
|
177
|
-
if (params.shellCommand) {
|
|
178
|
-
const allowlistEval = evaluateShellAllowlist({
|
|
179
|
-
command: params.shellCommand,
|
|
180
|
-
allowlist: params.approvals.allowlist,
|
|
181
|
-
safeBins: params.safeBins,
|
|
182
|
-
safeBinProfiles: params.safeBinProfiles,
|
|
183
|
-
cwd: params.cwd,
|
|
184
|
-
env: params.env,
|
|
185
|
-
trustedSafeBinDirs: params.trustedSafeBinDirs,
|
|
186
|
-
skillBins: params.skillBins,
|
|
187
|
-
autoAllowSkills: params.autoAllowSkills,
|
|
188
|
-
platform: process.platform
|
|
189
|
-
});
|
|
190
|
-
return {
|
|
191
|
-
analysisOk: allowlistEval.analysisOk,
|
|
192
|
-
allowlistMatches: allowlistEval.allowlistMatches,
|
|
193
|
-
allowlistSatisfied: params.security === "allowlist" && allowlistEval.analysisOk ? allowlistEval.allowlistSatisfied : false,
|
|
194
|
-
segments: allowlistEval.segments,
|
|
195
|
-
segmentAllowlistEntries: allowlistEval.segmentAllowlistEntries,
|
|
196
|
-
segmentSatisfiedBy: allowlistEval.segmentSatisfiedBy
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
const analysis = analyzeArgvCommand({
|
|
200
|
-
argv: params.argv,
|
|
201
|
-
cwd: params.cwd,
|
|
202
|
-
env: params.env
|
|
203
|
-
});
|
|
204
|
-
const allowlistEval = evaluateExecAllowlist({
|
|
205
|
-
analysis,
|
|
206
|
-
allowlist: params.approvals.allowlist,
|
|
207
|
-
safeBins: params.safeBins,
|
|
208
|
-
safeBinProfiles: params.safeBinProfiles,
|
|
209
|
-
cwd: params.cwd,
|
|
210
|
-
trustedSafeBinDirs: params.trustedSafeBinDirs,
|
|
211
|
-
skillBins: params.skillBins,
|
|
212
|
-
autoAllowSkills: params.autoAllowSkills
|
|
213
|
-
});
|
|
214
|
-
return {
|
|
215
|
-
analysisOk: analysis.ok,
|
|
216
|
-
allowlistMatches: allowlistEval.allowlistMatches,
|
|
217
|
-
allowlistSatisfied: params.security === "allowlist" && analysis.ok ? allowlistEval.allowlistSatisfied : false,
|
|
218
|
-
segments: analysis.segments,
|
|
219
|
-
segmentAllowlistEntries: allowlistEval.segmentAllowlistEntries,
|
|
220
|
-
segmentSatisfiedBy: allowlistEval.segmentSatisfiedBy
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
function resolvePlannedAllowlistArgv(params) {
|
|
224
|
-
if (params.security !== "allowlist" || params.policy.approvedByAsk || params.shellCommand || !params.policy.analysisOk || !params.policy.allowlistSatisfied || params.segments.length !== 1) return;
|
|
225
|
-
const plannedAllowlistArgv = resolvePlannedSegmentArgv(params.segments[0]);
|
|
226
|
-
return plannedAllowlistArgv && plannedAllowlistArgv.length > 0 ? plannedAllowlistArgv : null;
|
|
227
|
-
}
|
|
228
|
-
function resolveSystemRunExecArgv(params) {
|
|
229
|
-
let execArgv = params.plannedAllowlistArgv ?? params.argv;
|
|
230
|
-
if (params.security === "allowlist" && params.isWindows && !params.policy.approvedByAsk && params.shellCommand && params.policy.analysisOk && params.policy.allowlistSatisfied && params.segments.length === 1 && params.segments[0]?.argv.length > 0) execArgv = params.segments[0].argv;
|
|
231
|
-
if (params.security === "allowlist" && !params.isWindows && !params.policy.approvedByAsk && params.shellCommand && params.policy.analysisOk && params.policy.allowlistSatisfied && params.segmentSatisfiedBy.some((entry) => entry === "safeBins" || entry === "inlineChain") && isPosixShellInlineCommandTransport(params.argv)) {
|
|
232
|
-
const rebuilt = buildSafeBinsShellCommand({
|
|
233
|
-
command: params.shellCommand,
|
|
234
|
-
segments: params.segments,
|
|
235
|
-
segmentSatisfiedBy: params.segmentSatisfiedBy,
|
|
236
|
-
cwd: params.cwd,
|
|
237
|
-
env: params.env,
|
|
238
|
-
platform: process.platform
|
|
239
|
-
});
|
|
240
|
-
if (!rebuilt.ok || !rebuilt.command) return null;
|
|
241
|
-
const rewrittenArgv = replacePosixShellInlineCommand({
|
|
242
|
-
argv: params.argv,
|
|
243
|
-
oldCommand: params.shellCommand,
|
|
244
|
-
nextCommand: rebuilt.command
|
|
245
|
-
});
|
|
246
|
-
if (!rewrittenArgv) return null;
|
|
247
|
-
const rebuiltAllowlist = evaluateSystemRunAllowlist({
|
|
248
|
-
shellCommand: rebuilt.command,
|
|
249
|
-
argv: rewrittenArgv,
|
|
250
|
-
approvals: params.approvals,
|
|
251
|
-
security: params.security,
|
|
252
|
-
safeBins: params.safeBins,
|
|
253
|
-
safeBinProfiles: params.safeBinProfiles,
|
|
254
|
-
trustedSafeBinDirs: params.trustedSafeBinDirs,
|
|
255
|
-
cwd: params.cwd,
|
|
256
|
-
env: params.env,
|
|
257
|
-
skillBins: params.skillBins,
|
|
258
|
-
autoAllowSkills: params.autoAllowSkills
|
|
259
|
-
});
|
|
260
|
-
if (!rebuiltAllowlist.analysisOk || !rebuiltAllowlist.allowlistSatisfied) return null;
|
|
261
|
-
execArgv = rewrittenArgv;
|
|
262
|
-
}
|
|
263
|
-
return execArgv;
|
|
264
|
-
}
|
|
265
|
-
function isPosixShellInlineCommandTransport(argv) {
|
|
266
|
-
const transportArgv = resolveShellWrapperTransportArgv(argv);
|
|
267
|
-
return Boolean(transportArgv && POSIX_SHELL_WRAPPER_NAMES.has(normalizeExecutableToken(transportArgv[0] ?? "")));
|
|
268
|
-
}
|
|
269
|
-
function findSubsequence(haystack, needle) {
|
|
270
|
-
if (needle.length === 0 || needle.length > haystack.length) return -1;
|
|
271
|
-
for (let start = 0; start <= haystack.length - needle.length; start += 1) {
|
|
272
|
-
let matches = true;
|
|
273
|
-
for (let offset = 0; offset < needle.length; offset += 1) if (haystack[start + offset] !== needle[offset]) {
|
|
274
|
-
matches = false;
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
|
-
if (matches) return start;
|
|
278
|
-
}
|
|
279
|
-
return -1;
|
|
280
|
-
}
|
|
281
|
-
function replacePosixShellInlineCommand(params) {
|
|
282
|
-
const transportArgv = resolveShellWrapperTransportArgv(params.argv);
|
|
283
|
-
if (!transportArgv || !POSIX_SHELL_WRAPPER_NAMES.has(normalizeExecutableToken(transportArgv[0] ?? ""))) return null;
|
|
284
|
-
const transportStart = findSubsequence(params.argv, transportArgv);
|
|
285
|
-
if (transportStart < 0) return null;
|
|
286
|
-
const match = resolveInlineCommandMatch(transportArgv, POSIX_INLINE_COMMAND_FLAGS, { allowCombinedC: true });
|
|
287
|
-
if (match.valueTokenIndex === null) return null;
|
|
288
|
-
const absoluteValueIndex = transportStart + match.valueTokenIndex;
|
|
289
|
-
const token = params.argv[absoluteValueIndex];
|
|
290
|
-
if (token === void 0) return null;
|
|
291
|
-
const rewritten = [...params.argv];
|
|
292
|
-
if (token === params.oldCommand) {
|
|
293
|
-
rewritten[absoluteValueIndex] = params.nextCommand;
|
|
294
|
-
return rewritten;
|
|
295
|
-
}
|
|
296
|
-
if (token.endsWith(params.oldCommand)) {
|
|
297
|
-
rewritten[absoluteValueIndex] = token.slice(0, token.length - params.oldCommand.length) + params.nextCommand;
|
|
298
|
-
return rewritten;
|
|
299
|
-
}
|
|
300
|
-
return null;
|
|
301
|
-
}
|
|
302
|
-
function applyOutputTruncation(result) {
|
|
303
|
-
if (!result.truncated) return;
|
|
304
|
-
const suffix = "... (truncated)";
|
|
305
|
-
if (result.stderr.trim().length > 0) result.stderr = `${result.stderr}\n${suffix}`;
|
|
306
|
-
else result.stdout = `${result.stdout}\n${suffix}`;
|
|
307
|
-
}
|
|
308
|
-
//#endregion
|
|
309
|
-
//#region src/node-host/invoke-system-run-plan.ts
|
|
310
|
-
const MUTABLE_ARGV1_INTERPRETER_PATTERNS = [
|
|
311
|
-
/^(?:node|nodejs)$/,
|
|
312
|
-
/^perl$/,
|
|
313
|
-
/^php$/,
|
|
314
|
-
/^python(?:\d+(?:\.\d+)*)?$/,
|
|
315
|
-
/^ruby$/
|
|
316
|
-
];
|
|
317
|
-
const GENERIC_MUTABLE_SCRIPT_RUNNERS = new Set([
|
|
318
|
-
"esno",
|
|
319
|
-
"jiti",
|
|
320
|
-
"ts-node",
|
|
321
|
-
"ts-node-esm",
|
|
322
|
-
"tsx",
|
|
323
|
-
"vite-node"
|
|
324
|
-
]);
|
|
325
|
-
const OPAQUE_MUTABLE_SCRIPT_RUNNERS = new Set(["busybox", "toybox"]);
|
|
326
|
-
const BUN_SUBCOMMANDS = new Set([
|
|
327
|
-
"add",
|
|
328
|
-
"audit",
|
|
329
|
-
"completions",
|
|
330
|
-
"create",
|
|
331
|
-
"exec",
|
|
332
|
-
"help",
|
|
333
|
-
"init",
|
|
334
|
-
"install",
|
|
335
|
-
"link",
|
|
336
|
-
"outdated",
|
|
337
|
-
"patch",
|
|
338
|
-
"pm",
|
|
339
|
-
"publish",
|
|
340
|
-
"remove",
|
|
341
|
-
"repl",
|
|
342
|
-
"run",
|
|
343
|
-
"test",
|
|
344
|
-
"unlink",
|
|
345
|
-
"update",
|
|
346
|
-
"upgrade",
|
|
347
|
-
"x"
|
|
348
|
-
]);
|
|
349
|
-
const BUN_OPTIONS_WITH_VALUE = new Set([
|
|
350
|
-
"--backend",
|
|
351
|
-
"--bunfig",
|
|
352
|
-
"--conditions",
|
|
353
|
-
"--config",
|
|
354
|
-
"--console-depth",
|
|
355
|
-
"--cwd",
|
|
356
|
-
"--define",
|
|
357
|
-
"--elide-lines",
|
|
358
|
-
"--env-file",
|
|
359
|
-
"--extension-order",
|
|
360
|
-
"--filter",
|
|
361
|
-
"--hot",
|
|
362
|
-
"--inspect",
|
|
363
|
-
"--inspect-brk",
|
|
364
|
-
"--inspect-wait",
|
|
365
|
-
"--install",
|
|
366
|
-
"--jsx-factory",
|
|
367
|
-
"--jsx-fragment",
|
|
368
|
-
"--jsx-import-source",
|
|
369
|
-
"--loader",
|
|
370
|
-
"--origin",
|
|
371
|
-
"--port",
|
|
372
|
-
"--preload",
|
|
373
|
-
"--smol",
|
|
374
|
-
"--tsconfig-override",
|
|
375
|
-
"-c",
|
|
376
|
-
"-e",
|
|
377
|
-
"-p",
|
|
378
|
-
"-r"
|
|
379
|
-
]);
|
|
380
|
-
const DENO_RUN_OPTIONS_WITH_VALUE = new Set([
|
|
381
|
-
"--cached-only",
|
|
382
|
-
"--cert",
|
|
383
|
-
"--config",
|
|
384
|
-
"--env-file",
|
|
385
|
-
"--ext",
|
|
386
|
-
"--harmony-import-attributes",
|
|
387
|
-
"--import-map",
|
|
388
|
-
"--inspect",
|
|
389
|
-
"--inspect-brk",
|
|
390
|
-
"--inspect-wait",
|
|
391
|
-
"--location",
|
|
392
|
-
"--log-level",
|
|
393
|
-
"--lock",
|
|
394
|
-
"--node-modules-dir",
|
|
395
|
-
"--no-check",
|
|
396
|
-
"--preload",
|
|
397
|
-
"--reload",
|
|
398
|
-
"--seed",
|
|
399
|
-
"--strace-ops",
|
|
400
|
-
"--unstable-bare-node-builtins",
|
|
401
|
-
"--v8-flags",
|
|
402
|
-
"--watch",
|
|
403
|
-
"--watch-exclude",
|
|
404
|
-
"-L"
|
|
405
|
-
]);
|
|
406
|
-
const NODE_OPTIONS_WITH_FILE_VALUE = new Set([
|
|
407
|
-
"-r",
|
|
408
|
-
"--experimental-loader",
|
|
409
|
-
"--import",
|
|
410
|
-
"--loader",
|
|
411
|
-
"--require"
|
|
412
|
-
]);
|
|
413
|
-
const RUBY_UNSAFE_APPROVAL_FLAGS = new Set([
|
|
414
|
-
"-I",
|
|
415
|
-
"-r",
|
|
416
|
-
"--require"
|
|
417
|
-
]);
|
|
418
|
-
const PERL_UNSAFE_APPROVAL_FLAGS = new Set([
|
|
419
|
-
"-I",
|
|
420
|
-
"-M",
|
|
421
|
-
"-m"
|
|
422
|
-
]);
|
|
423
|
-
function normalizeOptionFlag(token) {
|
|
424
|
-
return normalizeLowercaseStringOrEmpty(parseInlineOptionToken(token).name);
|
|
425
|
-
}
|
|
426
|
-
function readTrimmedArgToken(argv, index) {
|
|
427
|
-
return normalizeNullableString(argv[index]) ?? "";
|
|
428
|
-
}
|
|
429
|
-
const POSIX_SHELL_OPTIONS_WITH_VALUE = new Set([
|
|
430
|
-
"--init-file",
|
|
431
|
-
"--rcfile",
|
|
432
|
-
"--startup-script",
|
|
433
|
-
"-O",
|
|
434
|
-
"-o",
|
|
435
|
-
"+O",
|
|
436
|
-
"+o"
|
|
437
|
-
]);
|
|
438
|
-
const POSIX_SHELLS_WITH_PLUS_OPTIONS = new Set([
|
|
439
|
-
"ash",
|
|
440
|
-
"bash",
|
|
441
|
-
"dash",
|
|
442
|
-
"ksh",
|
|
443
|
-
"sh",
|
|
444
|
-
"zsh"
|
|
445
|
-
]);
|
|
446
|
-
function isPosixShellOptionToken(token, supportsPlusOptions) {
|
|
447
|
-
return token.startsWith("-") || supportsPlusOptions && token.startsWith("+");
|
|
448
|
-
}
|
|
449
|
-
const NPM_EXEC_OPTIONS_WITH_VALUE = new Set([
|
|
450
|
-
"--cache",
|
|
451
|
-
"--package",
|
|
452
|
-
"--prefix",
|
|
453
|
-
"--script-shell",
|
|
454
|
-
"--userconfig",
|
|
455
|
-
"--workspace",
|
|
456
|
-
"-p",
|
|
457
|
-
"-w"
|
|
458
|
-
]);
|
|
459
|
-
const NPM_EXEC_FLAG_OPTIONS = new Set([
|
|
460
|
-
"--no",
|
|
461
|
-
"--quiet",
|
|
462
|
-
"--ws",
|
|
463
|
-
"--workspaces",
|
|
464
|
-
"--yes",
|
|
465
|
-
"-q",
|
|
466
|
-
"-y"
|
|
467
|
-
]);
|
|
468
|
-
const PNPM_OPTIONS_WITH_VALUE = new Set([
|
|
469
|
-
"--config",
|
|
470
|
-
"--dir",
|
|
471
|
-
"--filter",
|
|
472
|
-
"--reporter",
|
|
473
|
-
"--stream",
|
|
474
|
-
"--test-pattern",
|
|
475
|
-
"--workspace-concurrency",
|
|
476
|
-
"-C"
|
|
477
|
-
]);
|
|
478
|
-
const PNPM_FLAG_OPTIONS = new Set([
|
|
479
|
-
"--aggregate-output",
|
|
480
|
-
"--color",
|
|
481
|
-
"--parallel",
|
|
482
|
-
"--recursive",
|
|
483
|
-
"--silent",
|
|
484
|
-
"--workspace-root",
|
|
485
|
-
"-r",
|
|
486
|
-
"-s",
|
|
487
|
-
"-w"
|
|
488
|
-
]);
|
|
489
|
-
const PNPM_DLX_OPTIONS_WITH_VALUE = new Set([
|
|
490
|
-
"--allow-build",
|
|
491
|
-
"--package",
|
|
492
|
-
"-p"
|
|
493
|
-
]);
|
|
494
|
-
function pathComponentsFromRootSync(targetPath) {
|
|
495
|
-
const absolute = path.resolve(targetPath);
|
|
496
|
-
const parts = [];
|
|
497
|
-
let cursor = absolute;
|
|
498
|
-
while (true) {
|
|
499
|
-
parts.unshift(cursor);
|
|
500
|
-
const parent = path.dirname(cursor);
|
|
501
|
-
if (parent === cursor) return parts;
|
|
502
|
-
cursor = parent;
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
function isOwnedByCurrentProcessSync(candidate) {
|
|
506
|
-
if (process.platform === "win32" || typeof process.getuid !== "function") return false;
|
|
507
|
-
try {
|
|
508
|
-
return fs.statSync(candidate).uid === process.getuid();
|
|
509
|
-
} catch {
|
|
510
|
-
return false;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
function isMutableByCurrentProcessSync(candidate) {
|
|
514
|
-
try {
|
|
515
|
-
fs.accessSync(candidate, fs.constants.W_OK);
|
|
516
|
-
return true;
|
|
517
|
-
} catch {
|
|
518
|
-
return isOwnedByCurrentProcessSync(candidate);
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
function hasMutableSymlinkPathComponentSync(targetPath) {
|
|
522
|
-
for (const component of pathComponentsFromRootSync(targetPath)) try {
|
|
523
|
-
if (!fs.lstatSync(component).isSymbolicLink()) continue;
|
|
524
|
-
if (isMutableByCurrentProcessSync(path.dirname(component))) return true;
|
|
525
|
-
} catch {
|
|
526
|
-
return true;
|
|
527
|
-
}
|
|
528
|
-
return false;
|
|
529
|
-
}
|
|
530
|
-
function pathLooksMutableForShellPayloadSync(targetPath) {
|
|
531
|
-
if (isMutableByCurrentProcessSync(targetPath) || isMutableByCurrentProcessSync(path.dirname(targetPath)) || hasMutableSymlinkPathComponentSync(targetPath)) return true;
|
|
532
|
-
let realPath;
|
|
533
|
-
try {
|
|
534
|
-
realPath = fs.realpathSync(targetPath);
|
|
535
|
-
} catch {
|
|
536
|
-
return true;
|
|
537
|
-
}
|
|
538
|
-
return isMutableByCurrentProcessSync(realPath) || isMutableByCurrentProcessSync(path.dirname(realPath)) || hasMutableSymlinkPathComponentSync(realPath);
|
|
539
|
-
}
|
|
540
|
-
function shouldPinExecutableForApproval(params) {
|
|
541
|
-
if (params.shellCommand !== null) return false;
|
|
542
|
-
return (params.wrapperChain?.length ?? 0) === 0;
|
|
543
|
-
}
|
|
544
|
-
function hashFileContentsSync(filePath) {
|
|
545
|
-
return crypto.createHash("sha256").update(fs.readFileSync(filePath)).digest("hex");
|
|
546
|
-
}
|
|
547
|
-
function looksLikePathToken(token) {
|
|
548
|
-
return token.startsWith(".") || token.startsWith("/") || token.startsWith("\\") || token.includes("/") || token.includes("\\") || path.extname(token).length > 0;
|
|
549
|
-
}
|
|
550
|
-
function resolvesToExistingFileSync(rawOperand, cwd) {
|
|
551
|
-
if (!rawOperand) return false;
|
|
552
|
-
try {
|
|
553
|
-
return fs.statSync(path.resolve(cwd ?? process.cwd(), rawOperand)).isFile();
|
|
554
|
-
} catch {
|
|
555
|
-
return false;
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
function isKnownBinaryExecutableHeader(buffer) {
|
|
559
|
-
if (buffer.length >= 4 && buffer.subarray(0, 4).equals(Buffer.from([
|
|
560
|
-
127,
|
|
561
|
-
69,
|
|
562
|
-
76,
|
|
563
|
-
70
|
|
564
|
-
]))) return true;
|
|
565
|
-
if (buffer.length >= 4 && (buffer.subarray(0, 4).equals(Buffer.from([
|
|
566
|
-
254,
|
|
567
|
-
237,
|
|
568
|
-
250,
|
|
569
|
-
206
|
|
570
|
-
])) || buffer.subarray(0, 4).equals(Buffer.from([
|
|
571
|
-
206,
|
|
572
|
-
250,
|
|
573
|
-
237,
|
|
574
|
-
254
|
|
575
|
-
])) || buffer.subarray(0, 4).equals(Buffer.from([
|
|
576
|
-
254,
|
|
577
|
-
237,
|
|
578
|
-
250,
|
|
579
|
-
207
|
|
580
|
-
])) || buffer.subarray(0, 4).equals(Buffer.from([
|
|
581
|
-
207,
|
|
582
|
-
250,
|
|
583
|
-
237,
|
|
584
|
-
254
|
|
585
|
-
])) || buffer.subarray(0, 4).equals(Buffer.from([
|
|
586
|
-
202,
|
|
587
|
-
254,
|
|
588
|
-
186,
|
|
589
|
-
190
|
|
590
|
-
])) || buffer.subarray(0, 4).equals(Buffer.from([
|
|
591
|
-
190,
|
|
592
|
-
186,
|
|
593
|
-
254,
|
|
594
|
-
202
|
|
595
|
-
])) || buffer.subarray(0, 4).equals(Buffer.from([
|
|
596
|
-
202,
|
|
597
|
-
254,
|
|
598
|
-
186,
|
|
599
|
-
191
|
|
600
|
-
])) || buffer.subarray(0, 4).equals(Buffer.from([
|
|
601
|
-
191,
|
|
602
|
-
186,
|
|
603
|
-
254,
|
|
604
|
-
202
|
|
605
|
-
])))) return true;
|
|
606
|
-
if (buffer.length < 64 || !buffer.subarray(0, 2).equals(Buffer.from([77, 90]))) return false;
|
|
607
|
-
const peOffset = buffer.readUInt32LE(60);
|
|
608
|
-
return peOffset >= 0 && peOffset <= buffer.length - 4 && buffer.subarray(peOffset, peOffset + 4).equals(Buffer.from([
|
|
609
|
-
80,
|
|
610
|
-
69,
|
|
611
|
-
0,
|
|
612
|
-
0
|
|
613
|
-
]));
|
|
614
|
-
}
|
|
615
|
-
function isLikelyScriptLikePathSync(targetPath) {
|
|
616
|
-
let stat;
|
|
617
|
-
try {
|
|
618
|
-
stat = fs.statSync(targetPath);
|
|
619
|
-
} catch {
|
|
620
|
-
return true;
|
|
621
|
-
}
|
|
622
|
-
if (!stat.isFile()) return true;
|
|
623
|
-
let header;
|
|
624
|
-
try {
|
|
625
|
-
const fd = fs.openSync(targetPath, "r");
|
|
626
|
-
try {
|
|
627
|
-
header = Buffer.alloc(1024);
|
|
628
|
-
const bytesRead = fs.readSync(fd, header, 0, header.length, 0);
|
|
629
|
-
header = header.subarray(0, bytesRead);
|
|
630
|
-
} finally {
|
|
631
|
-
fs.closeSync(fd);
|
|
632
|
-
}
|
|
633
|
-
} catch {
|
|
634
|
-
return true;
|
|
635
|
-
}
|
|
636
|
-
if (header.length === 0) return true;
|
|
637
|
-
if (header.subarray(0, 2).equals(Buffer.from("#!"))) return true;
|
|
638
|
-
if (isKnownBinaryExecutableHeader(header)) return false;
|
|
639
|
-
return true;
|
|
640
|
-
}
|
|
641
|
-
function unwrapArgvForMutableOperand(argv) {
|
|
642
|
-
let current = argv;
|
|
643
|
-
let baseIndex = 0;
|
|
644
|
-
let opaqueMultiplexerSeen = false;
|
|
645
|
-
while (true) {
|
|
646
|
-
const dispatchUnwrap = unwrapKnownDispatchWrapperInvocation(current);
|
|
647
|
-
if (dispatchUnwrap.kind === "unwrapped") {
|
|
648
|
-
baseIndex += current.length - dispatchUnwrap.argv.length;
|
|
649
|
-
current = dispatchUnwrap.argv;
|
|
650
|
-
continue;
|
|
651
|
-
}
|
|
652
|
-
const shellMultiplexerUnwrap = unwrapKnownShellMultiplexerInvocation(current);
|
|
653
|
-
if (shellMultiplexerUnwrap.kind === "unwrapped") {
|
|
654
|
-
if (OPAQUE_MUTABLE_SCRIPT_RUNNERS.has(shellMultiplexerUnwrap.wrapper)) opaqueMultiplexerSeen = true;
|
|
655
|
-
baseIndex += current.length - shellMultiplexerUnwrap.argv.length;
|
|
656
|
-
current = shellMultiplexerUnwrap.argv;
|
|
657
|
-
continue;
|
|
658
|
-
}
|
|
659
|
-
const packageManagerUnwrap = unwrapKnownPackageManagerExecInvocation(current);
|
|
660
|
-
if (packageManagerUnwrap) {
|
|
661
|
-
baseIndex += current.length - packageManagerUnwrap.length;
|
|
662
|
-
current = packageManagerUnwrap;
|
|
663
|
-
continue;
|
|
664
|
-
}
|
|
665
|
-
return {
|
|
666
|
-
argv: current,
|
|
667
|
-
baseIndex,
|
|
668
|
-
opaqueMultiplexerSeen
|
|
669
|
-
};
|
|
670
|
-
}
|
|
671
|
-
}
|
|
672
|
-
function unwrapKnownPackageManagerExecInvocation(argv) {
|
|
673
|
-
switch (normalizePackageManagerExecToken(argv[0] ?? "")) {
|
|
674
|
-
case "npm": return unwrapNpmExecInvocation(argv);
|
|
675
|
-
case "npx":
|
|
676
|
-
case "bunx": return unwrapDirectPackageExecInvocation(argv);
|
|
677
|
-
case "pnpm": return unwrapPnpmExecInvocation(argv);
|
|
678
|
-
default: return null;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
function normalizePackageManagerExecToken(token) {
|
|
682
|
-
const normalized = normalizeExecutableToken(token);
|
|
683
|
-
if (!normalized) return normalized;
|
|
684
|
-
return normalized.replace(/\.(?:c|m)?js$/i, "");
|
|
685
|
-
}
|
|
686
|
-
function unwrapPnpmExecInvocation(argv) {
|
|
687
|
-
let idx = 1;
|
|
688
|
-
while (idx < argv.length) {
|
|
689
|
-
const token = readTrimmedArgToken(argv, idx);
|
|
690
|
-
if (!token) {
|
|
691
|
-
idx += 1;
|
|
692
|
-
continue;
|
|
693
|
-
}
|
|
694
|
-
if (token === "--") {
|
|
695
|
-
idx += 1;
|
|
696
|
-
continue;
|
|
697
|
-
}
|
|
698
|
-
if (!token.startsWith("-")) {
|
|
699
|
-
if (token === "exec") {
|
|
700
|
-
if (idx + 1 >= argv.length) return null;
|
|
701
|
-
const tail = argv.slice(idx + 1);
|
|
702
|
-
return tail[0] === "--" ? tail.length > 1 ? tail.slice(1) : null : tail;
|
|
703
|
-
}
|
|
704
|
-
if (token === "dlx") return unwrapPnpmDlxInvocation(argv.slice(idx + 1));
|
|
705
|
-
if (token === "node") {
|
|
706
|
-
const tail = argv.slice(idx + 1);
|
|
707
|
-
return ["node", ...tail[0] === "--" ? tail.slice(1) : tail];
|
|
708
|
-
}
|
|
709
|
-
return null;
|
|
710
|
-
}
|
|
711
|
-
const flag = normalizeOptionFlag(token);
|
|
712
|
-
if (PNPM_OPTIONS_WITH_VALUE.has(flag) || PNPM_DLX_OPTIONS_WITH_VALUE.has(flag)) {
|
|
713
|
-
idx += token.includes("=") ? 1 : 2;
|
|
714
|
-
continue;
|
|
715
|
-
}
|
|
716
|
-
if (PNPM_FLAG_OPTIONS.has(flag)) {
|
|
717
|
-
idx += 1;
|
|
718
|
-
continue;
|
|
719
|
-
}
|
|
720
|
-
return null;
|
|
721
|
-
}
|
|
722
|
-
return null;
|
|
723
|
-
}
|
|
724
|
-
function unwrapPnpmDlxInvocation(argv) {
|
|
725
|
-
let idx = 0;
|
|
726
|
-
while (idx < argv.length) {
|
|
727
|
-
const token = readTrimmedArgToken(argv, idx);
|
|
728
|
-
if (!token) {
|
|
729
|
-
idx += 1;
|
|
730
|
-
continue;
|
|
731
|
-
}
|
|
732
|
-
if (token === "--") {
|
|
733
|
-
const tail = argv.slice(idx + 1);
|
|
734
|
-
return tail.length > 0 ? tail : null;
|
|
735
|
-
}
|
|
736
|
-
if (!token.startsWith("-")) return argv.slice(idx);
|
|
737
|
-
const flag = normalizeOptionFlag(token);
|
|
738
|
-
if (flag === "-c" || flag === "--shell-mode") return null;
|
|
739
|
-
if (PNPM_OPTIONS_WITH_VALUE.has(flag) || PNPM_DLX_OPTIONS_WITH_VALUE.has(flag)) {
|
|
740
|
-
idx += token.includes("=") ? 1 : 2;
|
|
741
|
-
continue;
|
|
742
|
-
}
|
|
743
|
-
if (PNPM_FLAG_OPTIONS.has(flag)) {
|
|
744
|
-
idx += 1;
|
|
745
|
-
continue;
|
|
746
|
-
}
|
|
747
|
-
return null;
|
|
748
|
-
}
|
|
749
|
-
return null;
|
|
750
|
-
}
|
|
751
|
-
function unwrapDirectPackageExecInvocation(argv) {
|
|
752
|
-
let idx = 1;
|
|
753
|
-
while (idx < argv.length) {
|
|
754
|
-
const token = readTrimmedArgToken(argv, idx);
|
|
755
|
-
if (!token) {
|
|
756
|
-
idx += 1;
|
|
757
|
-
continue;
|
|
758
|
-
}
|
|
759
|
-
if (!token.startsWith("-")) return argv.slice(idx);
|
|
760
|
-
const flag = normalizeOptionFlag(token);
|
|
761
|
-
if (flag === "-c" || flag === "--call") return null;
|
|
762
|
-
if (NPM_EXEC_OPTIONS_WITH_VALUE.has(flag)) {
|
|
763
|
-
idx += token.includes("=") ? 1 : 2;
|
|
764
|
-
continue;
|
|
765
|
-
}
|
|
766
|
-
if (NPM_EXEC_FLAG_OPTIONS.has(flag)) {
|
|
767
|
-
idx += 1;
|
|
768
|
-
continue;
|
|
769
|
-
}
|
|
770
|
-
return null;
|
|
771
|
-
}
|
|
772
|
-
return null;
|
|
773
|
-
}
|
|
774
|
-
function unwrapNpmExecInvocation(argv) {
|
|
775
|
-
let idx = 1;
|
|
776
|
-
while (idx < argv.length) {
|
|
777
|
-
const token = readTrimmedArgToken(argv, idx);
|
|
778
|
-
if (!token) {
|
|
779
|
-
idx += 1;
|
|
780
|
-
continue;
|
|
781
|
-
}
|
|
782
|
-
if (!token.startsWith("-")) {
|
|
783
|
-
if (token !== "exec") return null;
|
|
784
|
-
idx += 1;
|
|
785
|
-
break;
|
|
786
|
-
}
|
|
787
|
-
if ((token === "-C" || token === "--prefix" || token === "--userconfig") && !token.includes("=")) {
|
|
788
|
-
idx += 2;
|
|
789
|
-
continue;
|
|
790
|
-
}
|
|
791
|
-
idx += 1;
|
|
792
|
-
}
|
|
793
|
-
if (idx >= argv.length) return null;
|
|
794
|
-
const tail = argv.slice(idx);
|
|
795
|
-
if (tail[0] === "--") return tail.length > 1 ? tail.slice(1) : null;
|
|
796
|
-
return unwrapDirectPackageExecInvocation(["npx", ...tail]);
|
|
797
|
-
}
|
|
798
|
-
function resolvePosixShellScriptOperandIndex(argv, executable) {
|
|
799
|
-
const supportsPlusOptions = POSIX_SHELLS_WITH_PLUS_OPTIONS.has(executable);
|
|
800
|
-
if (resolveInlineCommandMatch(argv, POSIX_INLINE_COMMAND_FLAGS, {
|
|
801
|
-
allowCombinedC: true,
|
|
802
|
-
isOptionToken: (token) => isPosixShellOptionToken(token, supportsPlusOptions),
|
|
803
|
-
stopAtFirstNonOption: true
|
|
804
|
-
}).valueTokenIndex !== null) return null;
|
|
805
|
-
let afterDoubleDash = false;
|
|
806
|
-
for (let i = 1; i < argv.length; i += 1) {
|
|
807
|
-
const token = readTrimmedArgToken(argv, i);
|
|
808
|
-
if (!token) continue;
|
|
809
|
-
if (token === "-") return null;
|
|
810
|
-
if (!afterDoubleDash && token === "--") {
|
|
811
|
-
afterDoubleDash = true;
|
|
812
|
-
continue;
|
|
813
|
-
}
|
|
814
|
-
if (!afterDoubleDash && token === "-s") return null;
|
|
815
|
-
if (!afterDoubleDash && isPosixShellOptionToken(token, supportsPlusOptions)) {
|
|
816
|
-
const flag = normalizeOptionFlag(token);
|
|
817
|
-
if (POSIX_SHELL_OPTIONS_WITH_VALUE.has(flag)) {
|
|
818
|
-
if (!token.includes("=")) i += 1;
|
|
819
|
-
continue;
|
|
820
|
-
}
|
|
821
|
-
i += advancePosixInlineOptionScan(token) - 1;
|
|
822
|
-
continue;
|
|
823
|
-
}
|
|
824
|
-
return i;
|
|
825
|
-
}
|
|
826
|
-
return null;
|
|
827
|
-
}
|
|
828
|
-
function resolveOptionFilteredFileOperandIndex(params) {
|
|
829
|
-
let afterDoubleDash = false;
|
|
830
|
-
for (let i = params.startIndex; i < params.argv.length; i += 1) {
|
|
831
|
-
const token = readTrimmedArgToken(params.argv, i);
|
|
832
|
-
if (!token) continue;
|
|
833
|
-
if (afterDoubleDash) return resolvesToExistingFileSync(token, params.cwd) ? i : null;
|
|
834
|
-
if (token === "--") {
|
|
835
|
-
afterDoubleDash = true;
|
|
836
|
-
continue;
|
|
837
|
-
}
|
|
838
|
-
if (token === "-") return null;
|
|
839
|
-
if (token.startsWith("-")) {
|
|
840
|
-
if (!token.includes("=") && params.optionsWithValue?.has(token)) i += 1;
|
|
841
|
-
continue;
|
|
842
|
-
}
|
|
843
|
-
return resolvesToExistingFileSync(token, params.cwd) ? i : null;
|
|
844
|
-
}
|
|
845
|
-
return null;
|
|
846
|
-
}
|
|
847
|
-
function resolveOptionFilteredPositionalIndex(params) {
|
|
848
|
-
let afterDoubleDash = false;
|
|
849
|
-
for (let i = params.startIndex; i < params.argv.length; i += 1) {
|
|
850
|
-
const token = readTrimmedArgToken(params.argv, i);
|
|
851
|
-
if (!token) continue;
|
|
852
|
-
if (afterDoubleDash) return i;
|
|
853
|
-
if (token === "--") {
|
|
854
|
-
afterDoubleDash = true;
|
|
855
|
-
continue;
|
|
856
|
-
}
|
|
857
|
-
if (token === "-") return null;
|
|
858
|
-
if (token.startsWith("-")) {
|
|
859
|
-
if (!token.includes("=") && params.optionsWithValue?.has(token)) i += 1;
|
|
860
|
-
continue;
|
|
861
|
-
}
|
|
862
|
-
return i;
|
|
863
|
-
}
|
|
864
|
-
return null;
|
|
865
|
-
}
|
|
866
|
-
function collectExistingFileOperandIndexes(params) {
|
|
867
|
-
let afterDoubleDash = false;
|
|
868
|
-
const hits = [];
|
|
869
|
-
for (let i = params.startIndex; i < params.argv.length; i += 1) {
|
|
870
|
-
const token = readTrimmedArgToken(params.argv, i);
|
|
871
|
-
if (!token) continue;
|
|
872
|
-
if (afterDoubleDash) {
|
|
873
|
-
if (resolvesToExistingFileSync(token, params.cwd)) hits.push(i);
|
|
874
|
-
continue;
|
|
875
|
-
}
|
|
876
|
-
if (token === "--") {
|
|
877
|
-
afterDoubleDash = true;
|
|
878
|
-
continue;
|
|
879
|
-
}
|
|
880
|
-
if (token === "-") return {
|
|
881
|
-
hits: [],
|
|
882
|
-
sawOptionValueFile: false
|
|
883
|
-
};
|
|
884
|
-
if (token.startsWith("-")) {
|
|
885
|
-
const option = parseInlineOptionToken(token);
|
|
886
|
-
const flag = option.name;
|
|
887
|
-
const inlineValue = option.hasInlineValue ? option.inlineValue : void 0;
|
|
888
|
-
if (params.optionsWithFileValue?.has(normalizeLowercaseStringOrEmpty(flag))) {
|
|
889
|
-
if (inlineValue && resolvesToExistingFileSync(inlineValue, params.cwd)) {
|
|
890
|
-
hits.push(i);
|
|
891
|
-
return {
|
|
892
|
-
hits,
|
|
893
|
-
sawOptionValueFile: true
|
|
894
|
-
};
|
|
895
|
-
}
|
|
896
|
-
const nextToken = readTrimmedArgToken(params.argv, i + 1);
|
|
897
|
-
if (!inlineValue && nextToken && resolvesToExistingFileSync(nextToken, params.cwd)) {
|
|
898
|
-
hits.push(i + 1);
|
|
899
|
-
return {
|
|
900
|
-
hits,
|
|
901
|
-
sawOptionValueFile: true
|
|
902
|
-
};
|
|
903
|
-
}
|
|
904
|
-
}
|
|
905
|
-
continue;
|
|
906
|
-
}
|
|
907
|
-
if (resolvesToExistingFileSync(token, params.cwd)) hits.push(i);
|
|
908
|
-
}
|
|
909
|
-
return {
|
|
910
|
-
hits,
|
|
911
|
-
sawOptionValueFile: false
|
|
912
|
-
};
|
|
913
|
-
}
|
|
914
|
-
function resolveGenericInterpreterScriptOperandIndex(params) {
|
|
915
|
-
const collection = collectExistingFileOperandIndexes({
|
|
916
|
-
argv: params.argv,
|
|
917
|
-
startIndex: 1,
|
|
918
|
-
cwd: params.cwd,
|
|
919
|
-
optionsWithFileValue: params.optionsWithFileValue
|
|
920
|
-
});
|
|
921
|
-
if (collection.sawOptionValueFile) return null;
|
|
922
|
-
return collection.hits.length === 1 ? collection.hits[0] : null;
|
|
923
|
-
}
|
|
924
|
-
function resolveBunScriptOperandIndex(params) {
|
|
925
|
-
const directIndex = resolveOptionFilteredPositionalIndex({
|
|
926
|
-
argv: params.argv,
|
|
927
|
-
startIndex: 1,
|
|
928
|
-
optionsWithValue: BUN_OPTIONS_WITH_VALUE
|
|
929
|
-
});
|
|
930
|
-
if (directIndex === null) return null;
|
|
931
|
-
const directToken = readTrimmedArgToken(params.argv, directIndex);
|
|
932
|
-
if (directToken === "run") return resolveOptionFilteredFileOperandIndex({
|
|
933
|
-
argv: params.argv,
|
|
934
|
-
startIndex: directIndex + 1,
|
|
935
|
-
cwd: params.cwd,
|
|
936
|
-
optionsWithValue: BUN_OPTIONS_WITH_VALUE
|
|
937
|
-
});
|
|
938
|
-
if (BUN_SUBCOMMANDS.has(directToken)) return null;
|
|
939
|
-
if (!looksLikePathToken(directToken)) return null;
|
|
940
|
-
return directIndex;
|
|
941
|
-
}
|
|
942
|
-
function resolveDenoRunScriptOperandIndex(params) {
|
|
943
|
-
if (readTrimmedArgToken(params.argv, 1) !== "run") return null;
|
|
944
|
-
return resolveOptionFilteredFileOperandIndex({
|
|
945
|
-
argv: params.argv,
|
|
946
|
-
startIndex: 2,
|
|
947
|
-
cwd: params.cwd,
|
|
948
|
-
optionsWithValue: DENO_RUN_OPTIONS_WITH_VALUE
|
|
949
|
-
});
|
|
950
|
-
}
|
|
951
|
-
function hasRubyUnsafeApprovalFlag(argv) {
|
|
952
|
-
let afterDoubleDash = false;
|
|
953
|
-
for (let i = 1; i < argv.length; i += 1) {
|
|
954
|
-
const token = readTrimmedArgToken(argv, i);
|
|
955
|
-
if (!token) continue;
|
|
956
|
-
if (afterDoubleDash) return false;
|
|
957
|
-
if (token === "--") {
|
|
958
|
-
afterDoubleDash = true;
|
|
959
|
-
continue;
|
|
960
|
-
}
|
|
961
|
-
if (token === "-I" || token === "-r") return true;
|
|
962
|
-
if (token.startsWith("-I") || token.startsWith("-r")) return true;
|
|
963
|
-
if (RUBY_UNSAFE_APPROVAL_FLAGS.has(normalizeLowercaseStringOrEmpty(token))) return true;
|
|
964
|
-
}
|
|
965
|
-
return false;
|
|
966
|
-
}
|
|
967
|
-
function hasPerlUnsafeApprovalFlag(argv) {
|
|
968
|
-
let afterDoubleDash = false;
|
|
969
|
-
for (let i = 1; i < argv.length; i += 1) {
|
|
970
|
-
const token = readTrimmedArgToken(argv, i);
|
|
971
|
-
if (!token) continue;
|
|
972
|
-
if (afterDoubleDash) return false;
|
|
973
|
-
if (token === "--") {
|
|
974
|
-
afterDoubleDash = true;
|
|
975
|
-
continue;
|
|
976
|
-
}
|
|
977
|
-
if (token === "-I" || token === "-M" || token === "-m") return true;
|
|
978
|
-
if (token.startsWith("-I") || token.startsWith("-M") || token.startsWith("-m")) return true;
|
|
979
|
-
if (PERL_UNSAFE_APPROVAL_FLAGS.has(token)) return true;
|
|
980
|
-
}
|
|
981
|
-
return false;
|
|
982
|
-
}
|
|
983
|
-
function isMutableScriptRunner(executable) {
|
|
984
|
-
return GENERIC_MUTABLE_SCRIPT_RUNNERS.has(executable) || OPAQUE_MUTABLE_SCRIPT_RUNNERS.has(executable) || isInterpreterLikeSafeBin(executable);
|
|
985
|
-
}
|
|
986
|
-
function resolveMutableFileOperandIndex(argv, cwd) {
|
|
987
|
-
const unwrapped = unwrapArgvForMutableOperand(argv);
|
|
988
|
-
const executable = normalizeExecutableToken(unwrapped.argv[0] ?? "");
|
|
989
|
-
if (!executable) return null;
|
|
990
|
-
if (unwrapped.opaqueMultiplexerSeen || OPAQUE_MUTABLE_SCRIPT_RUNNERS.has(executable)) return null;
|
|
991
|
-
if (POSIX_SHELL_WRAPPERS.has(executable)) {
|
|
992
|
-
const shellIndex = resolvePosixShellScriptOperandIndex(unwrapped.argv, executable);
|
|
993
|
-
return shellIndex === null ? null : unwrapped.baseIndex + shellIndex;
|
|
994
|
-
}
|
|
995
|
-
if (MUTABLE_ARGV1_INTERPRETER_PATTERNS.some((pattern) => pattern.test(executable))) {
|
|
996
|
-
const operand = readTrimmedArgToken(unwrapped.argv, 1);
|
|
997
|
-
if (operand && operand !== "-" && !operand.startsWith("-")) return unwrapped.baseIndex + 1;
|
|
998
|
-
}
|
|
999
|
-
if (executable === "bun") {
|
|
1000
|
-
const bunIndex = resolveBunScriptOperandIndex({
|
|
1001
|
-
argv: unwrapped.argv,
|
|
1002
|
-
cwd
|
|
1003
|
-
});
|
|
1004
|
-
if (bunIndex !== null) return unwrapped.baseIndex + bunIndex;
|
|
1005
|
-
}
|
|
1006
|
-
if (executable === "deno") {
|
|
1007
|
-
const denoIndex = resolveDenoRunScriptOperandIndex({
|
|
1008
|
-
argv: unwrapped.argv,
|
|
1009
|
-
cwd
|
|
1010
|
-
});
|
|
1011
|
-
if (denoIndex !== null) return unwrapped.baseIndex + denoIndex;
|
|
1012
|
-
}
|
|
1013
|
-
if (executable === "ruby" && hasRubyUnsafeApprovalFlag(unwrapped.argv)) return null;
|
|
1014
|
-
if (executable === "perl" && hasPerlUnsafeApprovalFlag(unwrapped.argv)) return null;
|
|
1015
|
-
if (!isMutableScriptRunner(executable)) return null;
|
|
1016
|
-
const genericIndex = resolveGenericInterpreterScriptOperandIndex({
|
|
1017
|
-
argv: unwrapped.argv,
|
|
1018
|
-
cwd,
|
|
1019
|
-
optionsWithFileValue: executable === "node" || executable === "nodejs" ? NODE_OPTIONS_WITH_FILE_VALUE : void 0
|
|
1020
|
-
});
|
|
1021
|
-
return genericIndex === null ? null : unwrapped.baseIndex + genericIndex;
|
|
1022
|
-
}
|
|
1023
|
-
function shellPayloadNeedsStableBinding(shellCommand, cwd) {
|
|
1024
|
-
const argv = splitShellArgs(shellCommand);
|
|
1025
|
-
if (!argv || argv.length === 0) return false;
|
|
1026
|
-
const snapshot = resolveMutableFileOperandSnapshotSync({
|
|
1027
|
-
argv,
|
|
1028
|
-
cwd,
|
|
1029
|
-
shellCommand: null
|
|
1030
|
-
});
|
|
1031
|
-
if (!snapshot.ok) return true;
|
|
1032
|
-
if (snapshot.snapshot) return true;
|
|
1033
|
-
const firstToken = readTrimmedArgToken(argv, 0);
|
|
1034
|
-
if (!resolvesToExistingFileSync(firstToken, cwd)) return false;
|
|
1035
|
-
if (!path.isAbsolute(firstToken)) return true;
|
|
1036
|
-
const resolvedPath = path.resolve(cwd ?? process.cwd(), firstToken);
|
|
1037
|
-
if (pathLooksMutableForShellPayloadSync(resolvedPath)) return true;
|
|
1038
|
-
return isLikelyScriptLikePathSync(resolvedPath);
|
|
1039
|
-
}
|
|
1040
|
-
function requiresStableInterpreterApprovalBindingWithShellCommand(params) {
|
|
1041
|
-
const unwrapped = unwrapArgvForMutableOperand(params.argv);
|
|
1042
|
-
if (unwrapped.opaqueMultiplexerSeen) return true;
|
|
1043
|
-
if (params.shellCommand !== null) return shellPayloadNeedsStableBinding(params.shellCommand, params.cwd);
|
|
1044
|
-
if (pnpmDlxInvocationNeedsFailClosedBinding(params.argv, params.cwd)) return true;
|
|
1045
|
-
const executable = normalizeExecutableToken(unwrapped.argv[0] ?? "");
|
|
1046
|
-
if (!executable) return false;
|
|
1047
|
-
if (POSIX_SHELL_WRAPPERS.has(executable)) return false;
|
|
1048
|
-
return isMutableScriptRunner(executable);
|
|
1049
|
-
}
|
|
1050
|
-
function pnpmDlxInvocationNeedsFailClosedBinding(argv, cwd) {
|
|
1051
|
-
if (normalizePackageManagerExecToken(argv[0] ?? "") !== "pnpm") return false;
|
|
1052
|
-
let idx = 1;
|
|
1053
|
-
while (idx < argv.length) {
|
|
1054
|
-
const token = readTrimmedArgToken(argv, idx);
|
|
1055
|
-
if (!token) {
|
|
1056
|
-
idx += 1;
|
|
1057
|
-
continue;
|
|
1058
|
-
}
|
|
1059
|
-
if (token === "--") {
|
|
1060
|
-
idx += 1;
|
|
1061
|
-
continue;
|
|
1062
|
-
}
|
|
1063
|
-
if (!token.startsWith("-")) {
|
|
1064
|
-
if (token !== "dlx") return false;
|
|
1065
|
-
return pnpmDlxTailNeedsFailClosedBinding(argv.slice(idx + 1), cwd);
|
|
1066
|
-
}
|
|
1067
|
-
const flag = normalizeOptionFlag(token);
|
|
1068
|
-
if (PNPM_OPTIONS_WITH_VALUE.has(flag) || PNPM_DLX_OPTIONS_WITH_VALUE.has(flag)) {
|
|
1069
|
-
idx += token.includes("=") ? 1 : 2;
|
|
1070
|
-
continue;
|
|
1071
|
-
}
|
|
1072
|
-
if (PNPM_FLAG_OPTIONS.has(flag)) {
|
|
1073
|
-
idx += 1;
|
|
1074
|
-
continue;
|
|
1075
|
-
}
|
|
1076
|
-
return true;
|
|
1077
|
-
}
|
|
1078
|
-
return false;
|
|
1079
|
-
}
|
|
1080
|
-
function pnpmDlxTailNeedsFailClosedBinding(argv, cwd) {
|
|
1081
|
-
let idx = 0;
|
|
1082
|
-
while (idx < argv.length) {
|
|
1083
|
-
const token = readTrimmedArgToken(argv, idx);
|
|
1084
|
-
if (!token) {
|
|
1085
|
-
idx += 1;
|
|
1086
|
-
continue;
|
|
1087
|
-
}
|
|
1088
|
-
if (token === "--") return pnpmDlxTailMayNeedStableBinding(argv.slice(idx + 1), cwd);
|
|
1089
|
-
if (!token.startsWith("-")) return pnpmDlxTailMayNeedStableBinding(argv.slice(idx), cwd);
|
|
1090
|
-
const flag = normalizeOptionFlag(token);
|
|
1091
|
-
if (flag === "-c" || flag === "--shell-mode") return false;
|
|
1092
|
-
if (PNPM_OPTIONS_WITH_VALUE.has(flag) || PNPM_DLX_OPTIONS_WITH_VALUE.has(flag)) {
|
|
1093
|
-
idx += token.includes("=") ? 1 : 2;
|
|
1094
|
-
continue;
|
|
1095
|
-
}
|
|
1096
|
-
if (PNPM_FLAG_OPTIONS.has(flag)) {
|
|
1097
|
-
idx += 1;
|
|
1098
|
-
continue;
|
|
1099
|
-
}
|
|
1100
|
-
return true;
|
|
1101
|
-
}
|
|
1102
|
-
return true;
|
|
1103
|
-
}
|
|
1104
|
-
function pnpmDlxTailMayNeedStableBinding(argv, cwd) {
|
|
1105
|
-
const snapshot = resolveMutableFileOperandSnapshotSync({
|
|
1106
|
-
argv,
|
|
1107
|
-
cwd,
|
|
1108
|
-
shellCommand: null
|
|
1109
|
-
});
|
|
1110
|
-
return snapshot.ok && snapshot.snapshot !== null;
|
|
1111
|
-
}
|
|
1112
|
-
function resolveMutableFileOperandSnapshotSync(params) {
|
|
1113
|
-
const argvIndex = resolveMutableFileOperandIndex(params.argv, params.cwd);
|
|
1114
|
-
if (argvIndex === null) {
|
|
1115
|
-
if (requiresStableInterpreterApprovalBindingWithShellCommand({
|
|
1116
|
-
argv: params.argv,
|
|
1117
|
-
shellCommand: params.shellCommand,
|
|
1118
|
-
cwd: params.cwd
|
|
1119
|
-
})) return {
|
|
1120
|
-
ok: false,
|
|
1121
|
-
message: "SYSTEM_RUN_DENIED: approval cannot safely bind this interpreter/runtime command"
|
|
1122
|
-
};
|
|
1123
|
-
return {
|
|
1124
|
-
ok: true,
|
|
1125
|
-
snapshot: null
|
|
1126
|
-
};
|
|
1127
|
-
}
|
|
1128
|
-
const rawOperand = readTrimmedArgToken(params.argv, argvIndex);
|
|
1129
|
-
if (!rawOperand) return {
|
|
1130
|
-
ok: false,
|
|
1131
|
-
message: "SYSTEM_RUN_DENIED: approval requires a stable script operand"
|
|
1132
|
-
};
|
|
1133
|
-
const resolvedPath = path.resolve(params.cwd ?? process.cwd(), rawOperand);
|
|
1134
|
-
let realPath;
|
|
1135
|
-
let stat;
|
|
1136
|
-
try {
|
|
1137
|
-
realPath = fs.realpathSync(resolvedPath);
|
|
1138
|
-
stat = fs.statSync(realPath);
|
|
1139
|
-
} catch {
|
|
1140
|
-
return {
|
|
1141
|
-
ok: false,
|
|
1142
|
-
message: "SYSTEM_RUN_DENIED: approval requires an existing script operand"
|
|
1143
|
-
};
|
|
1144
|
-
}
|
|
1145
|
-
if (!stat.isFile()) return {
|
|
1146
|
-
ok: false,
|
|
1147
|
-
message: "SYSTEM_RUN_DENIED: approval requires a file script operand"
|
|
1148
|
-
};
|
|
1149
|
-
return {
|
|
1150
|
-
ok: true,
|
|
1151
|
-
snapshot: {
|
|
1152
|
-
argvIndex,
|
|
1153
|
-
path: realPath,
|
|
1154
|
-
sha256: hashFileContentsSync(realPath)
|
|
1155
|
-
}
|
|
1156
|
-
};
|
|
1157
|
-
}
|
|
1158
|
-
function resolveCanonicalApprovalCwdSync(cwd) {
|
|
1159
|
-
const requestedCwd = path.resolve(cwd);
|
|
1160
|
-
let cwdLstat;
|
|
1161
|
-
let cwdStat;
|
|
1162
|
-
let cwdReal;
|
|
1163
|
-
let cwdRealStat;
|
|
1164
|
-
try {
|
|
1165
|
-
cwdLstat = fs.lstatSync(requestedCwd);
|
|
1166
|
-
cwdStat = fs.statSync(requestedCwd);
|
|
1167
|
-
cwdReal = fs.realpathSync(requestedCwd);
|
|
1168
|
-
cwdRealStat = fs.statSync(cwdReal);
|
|
1169
|
-
} catch {
|
|
1170
|
-
return {
|
|
1171
|
-
ok: false,
|
|
1172
|
-
message: "SYSTEM_RUN_DENIED: approval requires an existing canonical cwd"
|
|
1173
|
-
};
|
|
1174
|
-
}
|
|
1175
|
-
if (!cwdStat.isDirectory()) return {
|
|
1176
|
-
ok: false,
|
|
1177
|
-
message: "SYSTEM_RUN_DENIED: approval requires cwd to be a directory"
|
|
1178
|
-
};
|
|
1179
|
-
if (hasMutableSymlinkPathComponentSync(requestedCwd)) return {
|
|
1180
|
-
ok: false,
|
|
1181
|
-
message: "SYSTEM_RUN_DENIED: approval requires canonical cwd (no symlink path components)"
|
|
1182
|
-
};
|
|
1183
|
-
if (cwdLstat.isSymbolicLink()) return {
|
|
1184
|
-
ok: false,
|
|
1185
|
-
message: "SYSTEM_RUN_DENIED: approval requires canonical cwd (no symlink cwd)"
|
|
1186
|
-
};
|
|
1187
|
-
if (!sameFileIdentity(cwdStat, cwdLstat) || !sameFileIdentity(cwdStat, cwdRealStat) || !sameFileIdentity(cwdLstat, cwdRealStat)) return {
|
|
1188
|
-
ok: false,
|
|
1189
|
-
message: "SYSTEM_RUN_DENIED: approval cwd identity mismatch"
|
|
1190
|
-
};
|
|
1191
|
-
return {
|
|
1192
|
-
ok: true,
|
|
1193
|
-
snapshot: {
|
|
1194
|
-
cwd: cwdReal,
|
|
1195
|
-
stat: cwdStat
|
|
1196
|
-
}
|
|
1197
|
-
};
|
|
1198
|
-
}
|
|
1199
|
-
function revalidateApprovedCwdSnapshot(params) {
|
|
1200
|
-
const current = resolveCanonicalApprovalCwdSync(params.snapshot.cwd);
|
|
1201
|
-
if (!current.ok) return false;
|
|
1202
|
-
return sameFileIdentity(params.snapshot.stat, current.snapshot.stat);
|
|
1203
|
-
}
|
|
1204
|
-
function revalidateApprovedMutableFileOperand(params) {
|
|
1205
|
-
const operand = params.argv[params.snapshot.argvIndex]?.trim();
|
|
1206
|
-
if (!operand) return false;
|
|
1207
|
-
const resolvedPath = path.resolve(params.cwd ?? process.cwd(), operand);
|
|
1208
|
-
let realPath;
|
|
1209
|
-
try {
|
|
1210
|
-
realPath = fs.realpathSync(resolvedPath);
|
|
1211
|
-
} catch {
|
|
1212
|
-
return false;
|
|
1213
|
-
}
|
|
1214
|
-
if (realPath !== params.snapshot.path) return false;
|
|
1215
|
-
try {
|
|
1216
|
-
return hashFileContentsSync(realPath) === params.snapshot.sha256;
|
|
1217
|
-
} catch {
|
|
1218
|
-
return false;
|
|
1219
|
-
}
|
|
1220
|
-
}
|
|
1221
|
-
function hardenApprovedExecutionPaths(params) {
|
|
1222
|
-
if (!params.approvedByAsk) return {
|
|
1223
|
-
ok: true,
|
|
1224
|
-
argv: params.argv,
|
|
1225
|
-
argvChanged: false,
|
|
1226
|
-
cwd: params.cwd,
|
|
1227
|
-
approvedCwdSnapshot: void 0
|
|
1228
|
-
};
|
|
1229
|
-
let hardenedCwd = params.cwd;
|
|
1230
|
-
let approvedCwdSnapshot;
|
|
1231
|
-
if (hardenedCwd) {
|
|
1232
|
-
const canonicalCwd = resolveCanonicalApprovalCwdSync(hardenedCwd);
|
|
1233
|
-
if (!canonicalCwd.ok) return canonicalCwd;
|
|
1234
|
-
hardenedCwd = canonicalCwd.snapshot.cwd;
|
|
1235
|
-
approvedCwdSnapshot = canonicalCwd.snapshot;
|
|
1236
|
-
}
|
|
1237
|
-
if (params.argv.length === 0) return {
|
|
1238
|
-
ok: true,
|
|
1239
|
-
argv: params.argv,
|
|
1240
|
-
argvChanged: false,
|
|
1241
|
-
cwd: hardenedCwd,
|
|
1242
|
-
approvedCwdSnapshot
|
|
1243
|
-
};
|
|
1244
|
-
const resolution = resolveCommandResolutionFromArgv(params.argv, hardenedCwd);
|
|
1245
|
-
if (!shouldPinExecutableForApproval({
|
|
1246
|
-
shellCommand: params.shellCommand,
|
|
1247
|
-
wrapperChain: resolution?.wrapperChain
|
|
1248
|
-
})) return {
|
|
1249
|
-
ok: true,
|
|
1250
|
-
argv: params.argv,
|
|
1251
|
-
argvChanged: false,
|
|
1252
|
-
cwd: hardenedCwd,
|
|
1253
|
-
approvedCwdSnapshot
|
|
1254
|
-
};
|
|
1255
|
-
const pinnedExecutable = resolution?.execution.resolvedRealPath ?? resolution?.execution.resolvedPath;
|
|
1256
|
-
if (!pinnedExecutable) return {
|
|
1257
|
-
ok: false,
|
|
1258
|
-
message: "SYSTEM_RUN_DENIED: approval requires a stable executable path"
|
|
1259
|
-
};
|
|
1260
|
-
if (pinnedExecutable === params.argv[0]) return {
|
|
1261
|
-
ok: true,
|
|
1262
|
-
argv: params.argv,
|
|
1263
|
-
argvChanged: false,
|
|
1264
|
-
cwd: hardenedCwd,
|
|
1265
|
-
approvedCwdSnapshot
|
|
1266
|
-
};
|
|
1267
|
-
const argv = [...params.argv];
|
|
1268
|
-
argv[0] = pinnedExecutable;
|
|
1269
|
-
return {
|
|
1270
|
-
ok: true,
|
|
1271
|
-
argv,
|
|
1272
|
-
argvChanged: true,
|
|
1273
|
-
cwd: hardenedCwd,
|
|
1274
|
-
approvedCwdSnapshot
|
|
1275
|
-
};
|
|
1276
|
-
}
|
|
1277
|
-
function buildSystemRunApprovalPlan(params) {
|
|
1278
|
-
const command = resolveSystemRunCommandRequest({
|
|
1279
|
-
command: params.command,
|
|
1280
|
-
rawCommand: params.rawCommand
|
|
1281
|
-
});
|
|
1282
|
-
if (!command.ok) return {
|
|
1283
|
-
ok: false,
|
|
1284
|
-
message: command.message
|
|
1285
|
-
};
|
|
1286
|
-
if (command.argv.length === 0) return {
|
|
1287
|
-
ok: false,
|
|
1288
|
-
message: "command required"
|
|
1289
|
-
};
|
|
1290
|
-
if (command.shellPayload === null && isBlockedShellWrapperCommand(command.argv)) return {
|
|
1291
|
-
ok: false,
|
|
1292
|
-
message: "SYSTEM_RUN_DENIED: approval cannot safely bind this interpreter/runtime command"
|
|
1293
|
-
};
|
|
1294
|
-
const hardening = hardenApprovedExecutionPaths({
|
|
1295
|
-
approvedByAsk: true,
|
|
1296
|
-
argv: command.argv,
|
|
1297
|
-
shellCommand: command.shellPayload,
|
|
1298
|
-
cwd: normalizeNullableString(params.cwd) ?? void 0
|
|
1299
|
-
});
|
|
1300
|
-
if (!hardening.ok) return {
|
|
1301
|
-
ok: false,
|
|
1302
|
-
message: hardening.message
|
|
1303
|
-
};
|
|
1304
|
-
const commandText = formatExecCommand(hardening.argv);
|
|
1305
|
-
const commandPreview = command.previewText?.trim() && command.previewText.trim() !== commandText ? command.previewText.trim() : null;
|
|
1306
|
-
const mutableFileOperand = resolveMutableFileOperandSnapshotSync({
|
|
1307
|
-
argv: hardening.argv,
|
|
1308
|
-
cwd: hardening.cwd,
|
|
1309
|
-
shellCommand: command.shellPayload
|
|
1310
|
-
});
|
|
1311
|
-
if (!mutableFileOperand.ok) return {
|
|
1312
|
-
ok: false,
|
|
1313
|
-
message: mutableFileOperand.message
|
|
1314
|
-
};
|
|
1315
|
-
return {
|
|
1316
|
-
ok: true,
|
|
1317
|
-
plan: {
|
|
1318
|
-
argv: hardening.argv,
|
|
1319
|
-
cwd: hardening.cwd ?? null,
|
|
1320
|
-
commandText,
|
|
1321
|
-
commandPreview,
|
|
1322
|
-
agentId: normalizeNullableString(params.agentId),
|
|
1323
|
-
sessionKey: normalizeNullableString(params.sessionKey),
|
|
1324
|
-
mutableFileOperand: mutableFileOperand.snapshot ?? void 0
|
|
1325
|
-
}
|
|
1326
|
-
};
|
|
1327
|
-
}
|
|
1328
|
-
//#endregion
|
|
1329
|
-
//#region src/node-host/invoke-system-run.ts
|
|
1330
|
-
const safeBinTrustedDirWarningCache = /* @__PURE__ */ new Set();
|
|
1331
|
-
const APPROVAL_CWD_DRIFT_DENIED_MESSAGE = "SYSTEM_RUN_DENIED: approval cwd changed before execution";
|
|
1332
|
-
const APPROVAL_SCRIPT_OPERAND_BINDING_DENIED_MESSAGE = "SYSTEM_RUN_DENIED: approval missing script operand binding";
|
|
1333
|
-
const APPROVAL_SCRIPT_OPERAND_DRIFT_DENIED_MESSAGE = "SYSTEM_RUN_DENIED: approval script operand changed before execution";
|
|
1334
|
-
function hasLegacyExecPolicyOverride(exec) {
|
|
1335
|
-
return exec?.security !== void 0 || exec?.ask !== void 0;
|
|
1336
|
-
}
|
|
1337
|
-
function applyExecPolicyLayer(base, layer) {
|
|
1338
|
-
if (!layer) return base;
|
|
1339
|
-
if (layer.mode) return {
|
|
1340
|
-
mode: layer.mode,
|
|
1341
|
-
...resolveExecPolicyForMode(layer.mode)
|
|
1342
|
-
};
|
|
1343
|
-
if (hasLegacyExecPolicyOverride(layer)) return {
|
|
1344
|
-
security: layer.security ?? base.security,
|
|
1345
|
-
ask: layer.ask ?? base.ask
|
|
1346
|
-
};
|
|
1347
|
-
return base;
|
|
1348
|
-
}
|
|
1349
|
-
function warnWritableTrustedDirOnce(message) {
|
|
1350
|
-
if (safeBinTrustedDirWarningCache.has(message)) return;
|
|
1351
|
-
safeBinTrustedDirWarningCache.add(message);
|
|
1352
|
-
logWarn(message);
|
|
1353
|
-
}
|
|
1354
|
-
function normalizeDeniedReason(reason) {
|
|
1355
|
-
switch (reason) {
|
|
1356
|
-
case "security=deny":
|
|
1357
|
-
case "approval-required":
|
|
1358
|
-
case "allowlist-miss":
|
|
1359
|
-
case "execution-plan-miss":
|
|
1360
|
-
case "companion-unavailable":
|
|
1361
|
-
case "permission:screenRecording": return reason;
|
|
1362
|
-
default: return "approval-required";
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
function resolveAgentExecConfig(cfg, agentId) {
|
|
1366
|
-
if (!agentId) return;
|
|
1367
|
-
const normalizedAgentId = normalizeAgentId(agentId);
|
|
1368
|
-
return (cfg.agents?.list?.find((candidate) => candidate !== null && typeof candidate === "object" && normalizeAgentId(candidate.id) === normalizedAgentId))?.tools?.exec;
|
|
1369
|
-
}
|
|
1370
|
-
function resolveEffectiveSystemRunExecPolicy(params) {
|
|
1371
|
-
const agentExec = resolveAgentExecConfig(params.cfg, params.agentId);
|
|
1372
|
-
const globalExec = params.cfg.tools?.exec;
|
|
1373
|
-
const layeredPolicy = applyExecPolicyLayer(applyExecPolicyLayer({
|
|
1374
|
-
security: params.defaultSecurity,
|
|
1375
|
-
ask: params.defaultAsk
|
|
1376
|
-
}, globalExec), agentExec);
|
|
1377
|
-
const modePolicy = resolveExecModePolicy({
|
|
1378
|
-
mode: layeredPolicy.mode,
|
|
1379
|
-
security: layeredPolicy.security,
|
|
1380
|
-
ask: layeredPolicy.ask
|
|
1381
|
-
});
|
|
1382
|
-
const approvals = resolveExecApprovals(params.agentId, {
|
|
1383
|
-
security: modePolicy.security,
|
|
1384
|
-
ask: modePolicy.ask,
|
|
1385
|
-
requireSocket: params.requireSocket
|
|
1386
|
-
});
|
|
1387
|
-
return {
|
|
1388
|
-
agentExec,
|
|
1389
|
-
globalExec,
|
|
1390
|
-
approvals,
|
|
1391
|
-
security: minSecurity(modePolicy.security, approvals.agent.security),
|
|
1392
|
-
ask: maxAsk(modePolicy.ask, approvals.agent.ask),
|
|
1393
|
-
autoReview: modePolicy.autoReview
|
|
1394
|
-
};
|
|
1395
|
-
}
|
|
1396
|
-
async function resolveSystemRunAutoReviewer(params) {
|
|
1397
|
-
if (params.opts.autoReviewer) return params.opts.autoReviewer;
|
|
1398
|
-
const { createModelExecAutoReviewer } = await import("./exec-auto-reviewer-Bm7380HF.js");
|
|
1399
|
-
return createModelExecAutoReviewer({
|
|
1400
|
-
cfg: params.cfg,
|
|
1401
|
-
agentId: params.agentId,
|
|
1402
|
-
reviewer: params.agentExec?.reviewer ?? params.globalExec?.reviewer
|
|
1403
|
-
});
|
|
1404
|
-
}
|
|
1405
|
-
async function loadSystemRunConfig(opts) {
|
|
1406
|
-
if (opts.getRuntimeConfig) return opts.getRuntimeConfig();
|
|
1407
|
-
const { getRuntimeConfig } = await import("./config/config.js");
|
|
1408
|
-
return getRuntimeConfig();
|
|
1409
|
-
}
|
|
1410
|
-
async function sendSystemRunDenied(opts, execution, params) {
|
|
1411
|
-
await opts.sendNodeEvent(opts.client, "exec.denied", opts.buildExecEventPayload({
|
|
1412
|
-
sessionKey: execution.sessionKey,
|
|
1413
|
-
runId: execution.runId,
|
|
1414
|
-
host: "node",
|
|
1415
|
-
command: execution.commandText,
|
|
1416
|
-
reason: params.reason,
|
|
1417
|
-
suppressNotifyOnExit: execution.suppressNotifyOnExit
|
|
1418
|
-
}));
|
|
1419
|
-
await opts.sendInvokeResult({
|
|
1420
|
-
ok: false,
|
|
1421
|
-
error: {
|
|
1422
|
-
code: "UNAVAILABLE",
|
|
1423
|
-
message: params.message
|
|
1424
|
-
}
|
|
1425
|
-
});
|
|
1426
|
-
}
|
|
1427
|
-
async function sendSystemRunCompleted(opts, execution, result, payloadJSON) {
|
|
1428
|
-
await opts.sendExecFinishedEvent({
|
|
1429
|
-
sessionKey: execution.sessionKey,
|
|
1430
|
-
runId: execution.runId,
|
|
1431
|
-
commandText: execution.commandText,
|
|
1432
|
-
result,
|
|
1433
|
-
suppressNotifyOnExit: execution.suppressNotifyOnExit
|
|
1434
|
-
});
|
|
1435
|
-
await opts.sendInvokeResult({
|
|
1436
|
-
ok: true,
|
|
1437
|
-
payloadJSON
|
|
1438
|
-
});
|
|
1439
|
-
}
|
|
1440
|
-
function argvArraysMatch(left, right) {
|
|
1441
|
-
return left !== void 0 && left.length === right.length && left.every((entry, index) => entry === right[index]);
|
|
1442
|
-
}
|
|
1443
|
-
async function parseSystemRunPhase(opts) {
|
|
1444
|
-
const command = resolveSystemRunCommandRequest({
|
|
1445
|
-
command: opts.params.command,
|
|
1446
|
-
rawCommand: opts.params.rawCommand
|
|
1447
|
-
});
|
|
1448
|
-
if (!command.ok) {
|
|
1449
|
-
await opts.sendInvokeResult({
|
|
1450
|
-
ok: false,
|
|
1451
|
-
error: {
|
|
1452
|
-
code: "INVALID_REQUEST",
|
|
1453
|
-
message: command.message
|
|
1454
|
-
}
|
|
1455
|
-
});
|
|
1456
|
-
return null;
|
|
1457
|
-
}
|
|
1458
|
-
if (command.argv.length === 0) {
|
|
1459
|
-
await opts.sendInvokeResult({
|
|
1460
|
-
ok: false,
|
|
1461
|
-
error: {
|
|
1462
|
-
code: "INVALID_REQUEST",
|
|
1463
|
-
message: "command required"
|
|
1464
|
-
}
|
|
1465
|
-
});
|
|
1466
|
-
return null;
|
|
1467
|
-
}
|
|
1468
|
-
const shellPayload = command.shellPayload;
|
|
1469
|
-
const shellWrapperInvocation = isShellWrapperInvocation(command.argv);
|
|
1470
|
-
const commandText = command.commandText;
|
|
1471
|
-
const approvalPlan = opts.params.systemRunPlan === void 0 ? null : normalizeSystemRunApprovalPlan(opts.params.systemRunPlan);
|
|
1472
|
-
if (opts.params.systemRunPlan !== void 0 && !approvalPlan) {
|
|
1473
|
-
await opts.sendInvokeResult({
|
|
1474
|
-
ok: false,
|
|
1475
|
-
error: {
|
|
1476
|
-
code: "INVALID_REQUEST",
|
|
1477
|
-
message: "systemRunPlan invalid"
|
|
1478
|
-
}
|
|
1479
|
-
});
|
|
1480
|
-
return null;
|
|
1481
|
-
}
|
|
1482
|
-
const agentId = normalizeOptionalString(opts.params.agentId);
|
|
1483
|
-
const sessionKey = normalizeOptionalString(opts.params.sessionKey) ?? "node";
|
|
1484
|
-
const runId = normalizeOptionalString(opts.params.runId) ?? crypto.randomUUID();
|
|
1485
|
-
const suppressNotifyOnExit = opts.params.suppressNotifyOnExit === true;
|
|
1486
|
-
const envAssignmentKeys = extractEnvAssignmentKeysFromDispatchWrappers(command.argv);
|
|
1487
|
-
const envAssignmentDiagnostics = inspectHostExecEnvOverrides({
|
|
1488
|
-
overrides: envAssignmentKeys.length > 0 ? Object.fromEntries(envAssignmentKeys.map((key) => [key, "1"])) : void 0,
|
|
1489
|
-
blockPathOverrides: true
|
|
1490
|
-
});
|
|
1491
|
-
if (envAssignmentDiagnostics.rejectedOverrideBlockedKeys.length > 0) {
|
|
1492
|
-
await opts.sendInvokeResult({
|
|
1493
|
-
ok: false,
|
|
1494
|
-
error: {
|
|
1495
|
-
code: "INVALID_REQUEST",
|
|
1496
|
-
message: `SYSTEM_RUN_DENIED: command env assignment rejected (blocked env assignment keys: ${envAssignmentDiagnostics.rejectedOverrideBlockedKeys.join(", ")})`
|
|
1497
|
-
}
|
|
1498
|
-
});
|
|
1499
|
-
return null;
|
|
1500
|
-
}
|
|
1501
|
-
const envOverrideDiagnostics = inspectHostExecEnvOverrides({
|
|
1502
|
-
overrides: opts.params.env ?? void 0,
|
|
1503
|
-
blockPathOverrides: true
|
|
1504
|
-
});
|
|
1505
|
-
if (envOverrideDiagnostics.rejectedOverrideBlockedKeys.length > 0 || envOverrideDiagnostics.rejectedOverrideInvalidKeys.length > 0) {
|
|
1506
|
-
const details = [];
|
|
1507
|
-
if (envOverrideDiagnostics.rejectedOverrideBlockedKeys.length > 0) details.push(`blocked override keys: ${envOverrideDiagnostics.rejectedOverrideBlockedKeys.join(", ")}`);
|
|
1508
|
-
if (envOverrideDiagnostics.rejectedOverrideInvalidKeys.length > 0) details.push(`invalid non-portable override keys: ${envOverrideDiagnostics.rejectedOverrideInvalidKeys.join(", ")}`);
|
|
1509
|
-
await opts.sendInvokeResult({
|
|
1510
|
-
ok: false,
|
|
1511
|
-
error: {
|
|
1512
|
-
code: "INVALID_REQUEST",
|
|
1513
|
-
message: `SYSTEM_RUN_DENIED: environment override rejected (${details.join("; ")})`
|
|
1514
|
-
}
|
|
1515
|
-
});
|
|
1516
|
-
return null;
|
|
1517
|
-
}
|
|
1518
|
-
const envOverrides = sanitizeSystemRunEnvOverrides({
|
|
1519
|
-
overrides: opts.params.env ?? void 0,
|
|
1520
|
-
shellWrapper: shellWrapperInvocation
|
|
1521
|
-
});
|
|
1522
|
-
return {
|
|
1523
|
-
argv: command.argv,
|
|
1524
|
-
shellPayload,
|
|
1525
|
-
shellWrapperInvocation,
|
|
1526
|
-
commandText,
|
|
1527
|
-
commandPreview: command.previewText,
|
|
1528
|
-
approvalPlan,
|
|
1529
|
-
agentId,
|
|
1530
|
-
sessionKey,
|
|
1531
|
-
runId,
|
|
1532
|
-
execution: {
|
|
1533
|
-
sessionKey,
|
|
1534
|
-
runId,
|
|
1535
|
-
commandText,
|
|
1536
|
-
suppressNotifyOnExit
|
|
1537
|
-
},
|
|
1538
|
-
approvalDecision: resolveExecApprovalDecision(opts.params.approvalDecision),
|
|
1539
|
-
envOverrides,
|
|
1540
|
-
env: opts.sanitizeEnv(envOverrides),
|
|
1541
|
-
cwd: normalizeOptionalString(opts.params.cwd),
|
|
1542
|
-
timeoutMs: opts.params.timeoutMs ?? void 0,
|
|
1543
|
-
needsScreenRecording: opts.params.needsScreenRecording === true,
|
|
1544
|
-
approved: opts.params.approved === true,
|
|
1545
|
-
suppressNotifyOnExit
|
|
1546
|
-
};
|
|
1547
|
-
}
|
|
1548
|
-
async function evaluateSystemRunPolicyPhase(opts, parsed) {
|
|
1549
|
-
const cfg = await loadSystemRunConfig(opts);
|
|
1550
|
-
const effectivePolicy = resolveEffectiveSystemRunExecPolicy({
|
|
1551
|
-
cfg,
|
|
1552
|
-
agentId: parsed.agentId,
|
|
1553
|
-
defaultSecurity: opts.resolveExecSecurity(void 0),
|
|
1554
|
-
defaultAsk: opts.resolveExecAsk(void 0),
|
|
1555
|
-
requireSocket: opts.preferMacAppExecHost
|
|
1556
|
-
});
|
|
1557
|
-
const { agentExec, globalExec, approvals, security, ask } = effectivePolicy;
|
|
1558
|
-
const autoAllowSkills = approvals.agent.autoAllowSkills;
|
|
1559
|
-
const { safeBins, safeBinProfiles, trustedSafeBinDirs } = resolveExecSafeBinRuntimePolicy({
|
|
1560
|
-
global: cfg.tools?.exec,
|
|
1561
|
-
local: agentExec,
|
|
1562
|
-
onWarning: warnWritableTrustedDirOnce
|
|
1563
|
-
});
|
|
1564
|
-
const bins = autoAllowSkills ? await opts.skillBins.current() : [];
|
|
1565
|
-
let { analysisOk, allowlistMatches, allowlistSatisfied, segments, segmentAllowlistEntries, segmentSatisfiedBy } = evaluateSystemRunAllowlist({
|
|
1566
|
-
shellCommand: parsed.shellPayload,
|
|
1567
|
-
argv: parsed.argv,
|
|
1568
|
-
approvals,
|
|
1569
|
-
security,
|
|
1570
|
-
safeBins,
|
|
1571
|
-
safeBinProfiles,
|
|
1572
|
-
trustedSafeBinDirs,
|
|
1573
|
-
cwd: parsed.cwd,
|
|
1574
|
-
env: parsed.env,
|
|
1575
|
-
skillBins: bins,
|
|
1576
|
-
autoAllowSkills
|
|
1577
|
-
});
|
|
1578
|
-
const strictInlineEval = agentExec?.strictInlineEval === true || cfg.tools?.exec?.strictInlineEval === true;
|
|
1579
|
-
const inlineEvalHit = strictInlineEval ? detectPolicyInlineEval(segments) : null;
|
|
1580
|
-
const isWindows = process.platform === "win32";
|
|
1581
|
-
const cmdDetectionArgv = resolveShellWrapperTransportArgv(parsed.argv) ?? parsed.argv;
|
|
1582
|
-
const cmdInvocation = opts.isCmdExeInvocation(cmdDetectionArgv);
|
|
1583
|
-
const durableApprovalSatisfied = hasDurableExecApproval({
|
|
1584
|
-
analysisOk,
|
|
1585
|
-
segmentAllowlistEntries,
|
|
1586
|
-
allowlist: approvals.allowlist,
|
|
1587
|
-
commandText: parsed.commandText
|
|
1588
|
-
});
|
|
1589
|
-
const inlineEvalExecutableTrusted = inlineEvalHit !== null && segmentAllowlistEntries.some((entry) => entry?.source === "allow-always");
|
|
1590
|
-
let approvalDecision = parsed.approvalDecision;
|
|
1591
|
-
let policy = evaluateSystemRunPolicy({
|
|
1592
|
-
security,
|
|
1593
|
-
ask,
|
|
1594
|
-
analysisOk,
|
|
1595
|
-
allowlistSatisfied,
|
|
1596
|
-
durableApprovalSatisfied: durableApprovalSatisfied || inlineEvalExecutableTrusted,
|
|
1597
|
-
approvalDecision,
|
|
1598
|
-
approved: parsed.approved,
|
|
1599
|
-
isWindows,
|
|
1600
|
-
cmdInvocation,
|
|
1601
|
-
shellWrapperInvocation: parsed.shellPayload !== null
|
|
1602
|
-
});
|
|
1603
|
-
const requiresSecurityAuditSuppressionApproval = commandRequiresSecurityAuditSuppressionApproval({
|
|
1604
|
-
command: parsed.commandText,
|
|
1605
|
-
cwd: parsed.cwd,
|
|
1606
|
-
env: parsed.env,
|
|
1607
|
-
segments
|
|
1608
|
-
}) && !(security === "full" && ask === "off");
|
|
1609
|
-
if (requiresSecurityAuditSuppressionApproval && !policy.approvedByAsk) policy = {
|
|
1610
|
-
allowed: false,
|
|
1611
|
-
eventReason: "approval-required",
|
|
1612
|
-
errorMessage: "SYSTEM_RUN_DENIED: approval required",
|
|
1613
|
-
analysisOk: policy.analysisOk,
|
|
1614
|
-
allowlistSatisfied: policy.allowlistSatisfied,
|
|
1615
|
-
shellWrapperBlocked: policy.shellWrapperBlocked,
|
|
1616
|
-
windowsShellWrapperBlocked: policy.windowsShellWrapperBlocked,
|
|
1617
|
-
requiresAsk: true,
|
|
1618
|
-
approvalDecision: policy.approvalDecision,
|
|
1619
|
-
approvedByAsk: policy.approvedByAsk
|
|
1620
|
-
};
|
|
1621
|
-
let autoReviewDeferredMessage;
|
|
1622
|
-
analysisOk = policy.analysisOk;
|
|
1623
|
-
allowlistSatisfied = policy.allowlistSatisfied;
|
|
1624
|
-
if (inlineEvalHit !== null && !policy.approvedByAsk && (policy.allowed ? true : policy.eventReason !== "security=deny")) {
|
|
1625
|
-
await sendSystemRunDenied(opts, parsed.execution, {
|
|
1626
|
-
reason: "approval-required",
|
|
1627
|
-
message: `SYSTEM_RUN_DENIED: approval required (${describeInterpreterInlineEval(inlineEvalHit)} requires explicit approval in strictInlineEval mode)`
|
|
1628
|
-
});
|
|
1629
|
-
return null;
|
|
1630
|
-
}
|
|
1631
|
-
if (!policy.allowed) {
|
|
1632
|
-
const [autoReviewSegment] = segments;
|
|
1633
|
-
const directAutoReviewArgvMatchesRequest = parsed.shellPayload !== null || argvArraysMatch(autoReviewSegment?.argv, parsed.argv);
|
|
1634
|
-
const autoReviewArgv = segments.length === 1 && directAutoReviewArgvMatchesRequest && (parsed.shellPayload === null || autoReviewSegment?.raw !== void 0 && autoReviewSegment.raw.trim() === parsed.shellPayload.trim()) ? autoReviewSegment?.argv : void 0;
|
|
1635
|
-
if (effectivePolicy.autoReview && ask !== "always" && analysisOk && autoReviewArgv !== void 0 && parsed.approvalPlan !== null && inlineEvalHit === null && !requiresSecurityAuditSuppressionApproval && policy.eventReason !== "security=deny") {
|
|
1636
|
-
const decision = await (await resolveSystemRunAutoReviewer({
|
|
1637
|
-
opts,
|
|
1638
|
-
cfg,
|
|
1639
|
-
agentId: parsed.agentId,
|
|
1640
|
-
agentExec,
|
|
1641
|
-
globalExec
|
|
1642
|
-
}))({
|
|
1643
|
-
command: parsed.commandText,
|
|
1644
|
-
argv: autoReviewArgv,
|
|
1645
|
-
cwd: parsed.cwd,
|
|
1646
|
-
envKeys: Object.keys(parsed.envOverrides ?? {}).toSorted(),
|
|
1647
|
-
host: "node",
|
|
1648
|
-
reason: policy.eventReason === "allowlist-miss" ? "allowlist-miss" : "approval-required",
|
|
1649
|
-
analysis: {
|
|
1650
|
-
parsed: analysisOk,
|
|
1651
|
-
allowlistMatched: allowlistSatisfied,
|
|
1652
|
-
durableApprovalMatched: durableApprovalSatisfied,
|
|
1653
|
-
inlineEval: false,
|
|
1654
|
-
shellWrapper: parsed.shellWrapperInvocation
|
|
1655
|
-
},
|
|
1656
|
-
agent: {
|
|
1657
|
-
id: parsed.agentId,
|
|
1658
|
-
sessionKey: parsed.sessionKey
|
|
1659
|
-
}
|
|
1660
|
-
});
|
|
1661
|
-
if (decision.decision === "allow-once") {
|
|
1662
|
-
approvalDecision = "allow-once";
|
|
1663
|
-
policy = evaluateSystemRunPolicy({
|
|
1664
|
-
security,
|
|
1665
|
-
ask,
|
|
1666
|
-
analysisOk,
|
|
1667
|
-
allowlistSatisfied,
|
|
1668
|
-
durableApprovalSatisfied: durableApprovalSatisfied || inlineEvalExecutableTrusted,
|
|
1669
|
-
approvalDecision,
|
|
1670
|
-
approved: true,
|
|
1671
|
-
isWindows,
|
|
1672
|
-
cmdInvocation,
|
|
1673
|
-
shellWrapperInvocation: parsed.shellPayload !== null
|
|
1674
|
-
});
|
|
1675
|
-
} else autoReviewDeferredMessage = `${policy.errorMessage} (exec auto-review deferred to human approval: ${decision.rationale})`;
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
if (!policy.allowed) {
|
|
1679
|
-
await sendSystemRunDenied(opts, parsed.execution, {
|
|
1680
|
-
reason: policy.eventReason,
|
|
1681
|
-
message: autoReviewDeferredMessage ?? policy.errorMessage
|
|
1682
|
-
});
|
|
1683
|
-
return null;
|
|
1684
|
-
}
|
|
1685
|
-
if (policy.shellWrapperBlocked && !policy.approvedByAsk && !durableApprovalSatisfied) {
|
|
1686
|
-
await sendSystemRunDenied(opts, parsed.execution, {
|
|
1687
|
-
reason: "approval-required",
|
|
1688
|
-
message: "SYSTEM_RUN_DENIED: approval required"
|
|
1689
|
-
});
|
|
1690
|
-
return null;
|
|
1691
|
-
}
|
|
1692
|
-
const hardenedPaths = hardenApprovedExecutionPaths({
|
|
1693
|
-
approvedByAsk: policy.approvedByAsk,
|
|
1694
|
-
argv: parsed.argv,
|
|
1695
|
-
shellCommand: parsed.shellPayload,
|
|
1696
|
-
cwd: parsed.cwd
|
|
1697
|
-
});
|
|
1698
|
-
if (!hardenedPaths.ok) {
|
|
1699
|
-
await sendSystemRunDenied(opts, parsed.execution, {
|
|
1700
|
-
reason: "approval-required",
|
|
1701
|
-
message: hardenedPaths.message
|
|
1702
|
-
});
|
|
1703
|
-
return null;
|
|
1704
|
-
}
|
|
1705
|
-
const approvedCwdSnapshot = policy.approvedByAsk ? hardenedPaths.approvedCwdSnapshot : void 0;
|
|
1706
|
-
if (policy.approvedByAsk && hardenedPaths.cwd && !approvedCwdSnapshot) {
|
|
1707
|
-
await sendSystemRunDenied(opts, parsed.execution, {
|
|
1708
|
-
reason: "approval-required",
|
|
1709
|
-
message: APPROVAL_CWD_DRIFT_DENIED_MESSAGE
|
|
1710
|
-
});
|
|
1711
|
-
return null;
|
|
1712
|
-
}
|
|
1713
|
-
const plannedAllowlistArgv = resolvePlannedAllowlistArgv({
|
|
1714
|
-
security,
|
|
1715
|
-
shellCommand: parsed.shellPayload,
|
|
1716
|
-
policy,
|
|
1717
|
-
segments
|
|
1718
|
-
});
|
|
1719
|
-
if (plannedAllowlistArgv === null) {
|
|
1720
|
-
await sendSystemRunDenied(opts, parsed.execution, {
|
|
1721
|
-
reason: "execution-plan-miss",
|
|
1722
|
-
message: "SYSTEM_RUN_DENIED: execution plan mismatch"
|
|
1723
|
-
});
|
|
1724
|
-
return null;
|
|
1725
|
-
}
|
|
1726
|
-
return {
|
|
1727
|
-
...parsed,
|
|
1728
|
-
approvalDecision,
|
|
1729
|
-
argv: hardenedPaths.argv,
|
|
1730
|
-
cwd: hardenedPaths.cwd,
|
|
1731
|
-
approvals,
|
|
1732
|
-
security,
|
|
1733
|
-
ask,
|
|
1734
|
-
policy,
|
|
1735
|
-
durableApprovalSatisfied,
|
|
1736
|
-
strictInlineEval,
|
|
1737
|
-
inlineEvalHit,
|
|
1738
|
-
allowlistMatches,
|
|
1739
|
-
analysisOk,
|
|
1740
|
-
allowlistSatisfied,
|
|
1741
|
-
safeBins,
|
|
1742
|
-
safeBinProfiles,
|
|
1743
|
-
trustedSafeBinDirs,
|
|
1744
|
-
skillBins: bins,
|
|
1745
|
-
autoAllowSkills,
|
|
1746
|
-
segments,
|
|
1747
|
-
segmentSatisfiedBy,
|
|
1748
|
-
plannedAllowlistArgv: plannedAllowlistArgv ?? void 0,
|
|
1749
|
-
isWindows,
|
|
1750
|
-
approvedCwdSnapshot
|
|
1751
|
-
};
|
|
1752
|
-
}
|
|
1753
|
-
async function executeSystemRunPhase(opts, phase) {
|
|
1754
|
-
if (phase.approvedCwdSnapshot && !revalidateApprovedCwdSnapshot({ snapshot: phase.approvedCwdSnapshot })) {
|
|
1755
|
-
logWarn(`security: system.run approval cwd drift blocked (runId=${phase.runId})`);
|
|
1756
|
-
await sendSystemRunDenied(opts, phase.execution, {
|
|
1757
|
-
reason: "approval-required",
|
|
1758
|
-
message: APPROVAL_CWD_DRIFT_DENIED_MESSAGE
|
|
1759
|
-
});
|
|
1760
|
-
return;
|
|
1761
|
-
}
|
|
1762
|
-
const expectedMutableFileOperand = phase.approvalPlan ? resolveMutableFileOperandSnapshotSync({
|
|
1763
|
-
argv: phase.argv,
|
|
1764
|
-
cwd: phase.cwd,
|
|
1765
|
-
shellCommand: phase.shellPayload
|
|
1766
|
-
}) : null;
|
|
1767
|
-
if (expectedMutableFileOperand && !expectedMutableFileOperand.ok) {
|
|
1768
|
-
logWarn(`security: system.run approval script binding blocked (runId=${phase.runId})`);
|
|
1769
|
-
await sendSystemRunDenied(opts, phase.execution, {
|
|
1770
|
-
reason: "approval-required",
|
|
1771
|
-
message: expectedMutableFileOperand.message
|
|
1772
|
-
});
|
|
1773
|
-
return;
|
|
1774
|
-
}
|
|
1775
|
-
if (expectedMutableFileOperand?.snapshot && !phase.approvalPlan?.mutableFileOperand) {
|
|
1776
|
-
logWarn(`security: system.run approval script binding missing (runId=${phase.runId})`);
|
|
1777
|
-
await sendSystemRunDenied(opts, phase.execution, {
|
|
1778
|
-
reason: "approval-required",
|
|
1779
|
-
message: APPROVAL_SCRIPT_OPERAND_BINDING_DENIED_MESSAGE
|
|
1780
|
-
});
|
|
1781
|
-
return;
|
|
1782
|
-
}
|
|
1783
|
-
if (phase.approvalPlan?.mutableFileOperand && !revalidateApprovedMutableFileOperand({
|
|
1784
|
-
snapshot: phase.approvalPlan.mutableFileOperand,
|
|
1785
|
-
argv: phase.argv,
|
|
1786
|
-
cwd: phase.cwd
|
|
1787
|
-
})) {
|
|
1788
|
-
logWarn(`security: system.run approval script drift blocked (runId=${phase.runId})`);
|
|
1789
|
-
await sendSystemRunDenied(opts, phase.execution, {
|
|
1790
|
-
reason: "approval-required",
|
|
1791
|
-
message: APPROVAL_SCRIPT_OPERAND_DRIFT_DENIED_MESSAGE
|
|
1792
|
-
});
|
|
1793
|
-
return;
|
|
1794
|
-
}
|
|
1795
|
-
const execArgv = resolveSystemRunExecArgv({
|
|
1796
|
-
plannedAllowlistArgv: phase.plannedAllowlistArgv,
|
|
1797
|
-
argv: phase.argv,
|
|
1798
|
-
security: phase.security,
|
|
1799
|
-
approvals: phase.approvals,
|
|
1800
|
-
safeBins: phase.safeBins,
|
|
1801
|
-
safeBinProfiles: phase.safeBinProfiles,
|
|
1802
|
-
trustedSafeBinDirs: phase.trustedSafeBinDirs,
|
|
1803
|
-
skillBins: phase.skillBins,
|
|
1804
|
-
autoAllowSkills: phase.autoAllowSkills,
|
|
1805
|
-
isWindows: phase.isWindows,
|
|
1806
|
-
policy: phase.policy,
|
|
1807
|
-
shellCommand: phase.shellPayload,
|
|
1808
|
-
segments: phase.segments,
|
|
1809
|
-
segmentSatisfiedBy: phase.segmentSatisfiedBy,
|
|
1810
|
-
cwd: phase.cwd,
|
|
1811
|
-
env: phase.env
|
|
1812
|
-
});
|
|
1813
|
-
if (!execArgv) {
|
|
1814
|
-
await sendSystemRunDenied(opts, phase.execution, {
|
|
1815
|
-
reason: "execution-plan-miss",
|
|
1816
|
-
message: "SYSTEM_RUN_DENIED: execution plan mismatch"
|
|
1817
|
-
});
|
|
1818
|
-
return;
|
|
1819
|
-
}
|
|
1820
|
-
if (opts.preferMacAppExecHost) {
|
|
1821
|
-
const execRequest = {
|
|
1822
|
-
command: execArgv,
|
|
1823
|
-
rawCommand: execArgv === phase.argv ? phase.commandText || null : formatExecCommand(execArgv),
|
|
1824
|
-
cwd: phase.cwd ?? null,
|
|
1825
|
-
env: phase.envOverrides ?? null,
|
|
1826
|
-
timeoutMs: phase.timeoutMs ?? null,
|
|
1827
|
-
needsScreenRecording: phase.needsScreenRecording,
|
|
1828
|
-
agentId: phase.agentId ?? null,
|
|
1829
|
-
sessionKey: phase.sessionKey ?? null,
|
|
1830
|
-
approvalDecision: phase.approvalDecision
|
|
1831
|
-
};
|
|
1832
|
-
const response = await opts.runViaMacAppExecHost({
|
|
1833
|
-
approvals: phase.approvals,
|
|
1834
|
-
request: execRequest
|
|
1835
|
-
});
|
|
1836
|
-
if (!response) {
|
|
1837
|
-
if (opts.execHostEnforced || !opts.execHostFallbackAllowed) {
|
|
1838
|
-
await sendSystemRunDenied(opts, phase.execution, {
|
|
1839
|
-
reason: "companion-unavailable",
|
|
1840
|
-
message: "COMPANION_APP_UNAVAILABLE: macOS app exec host unreachable"
|
|
1841
|
-
});
|
|
1842
|
-
return;
|
|
1843
|
-
}
|
|
1844
|
-
} else if (!response.ok) {
|
|
1845
|
-
await sendSystemRunDenied(opts, phase.execution, {
|
|
1846
|
-
reason: normalizeDeniedReason(response.error.reason),
|
|
1847
|
-
message: response.error.message
|
|
1848
|
-
});
|
|
1849
|
-
return;
|
|
1850
|
-
} else {
|
|
1851
|
-
const result = response.payload;
|
|
1852
|
-
await sendSystemRunCompleted(opts, phase.execution, result, JSON.stringify(result));
|
|
1853
|
-
return;
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
if (phase.policy.approvalDecision === "allow-always" && phase.inlineEvalHit === null) {
|
|
1857
|
-
if ((phase.policy.analysisOk ? persistAllowAlwaysPatterns({
|
|
1858
|
-
approvals: phase.approvals.file,
|
|
1859
|
-
agentId: phase.agentId,
|
|
1860
|
-
segments: phase.segments,
|
|
1861
|
-
cwd: phase.cwd,
|
|
1862
|
-
env: phase.env,
|
|
1863
|
-
platform: process.platform,
|
|
1864
|
-
strictInlineEval: phase.strictInlineEval
|
|
1865
|
-
}) : []).length === 0) addDurableCommandApproval(phase.approvals.file, phase.agentId, phase.commandText);
|
|
1866
|
-
}
|
|
1867
|
-
recordAllowlistMatchesUse({
|
|
1868
|
-
approvals: phase.approvals.file,
|
|
1869
|
-
agentId: phase.agentId,
|
|
1870
|
-
matches: phase.allowlistMatches,
|
|
1871
|
-
command: phase.commandText,
|
|
1872
|
-
resolvedPath: resolveApprovalAuditTrustPath(phase.segments[0]?.resolution ?? null, phase.cwd)
|
|
1873
|
-
});
|
|
1874
|
-
if (phase.needsScreenRecording) {
|
|
1875
|
-
await sendSystemRunDenied(opts, phase.execution, {
|
|
1876
|
-
reason: "permission:screenRecording",
|
|
1877
|
-
message: "PERMISSION_MISSING: screenRecording"
|
|
1878
|
-
});
|
|
1879
|
-
return;
|
|
1880
|
-
}
|
|
1881
|
-
const result = await opts.runCommand(execArgv, phase.cwd, phase.env, phase.timeoutMs);
|
|
1882
|
-
applyOutputTruncation(result);
|
|
1883
|
-
await sendSystemRunCompleted(opts, phase.execution, result, JSON.stringify({
|
|
1884
|
-
exitCode: result.exitCode,
|
|
1885
|
-
timedOut: result.timedOut,
|
|
1886
|
-
success: result.success,
|
|
1887
|
-
stdout: result.stdout,
|
|
1888
|
-
stderr: result.stderr,
|
|
1889
|
-
error: result.error ?? null
|
|
1890
|
-
}));
|
|
1891
|
-
}
|
|
1892
|
-
async function handleSystemRunInvoke(opts) {
|
|
1893
|
-
const parsed = await parseSystemRunPhase(opts);
|
|
1894
|
-
if (!parsed) return;
|
|
1895
|
-
const policyPhase = await evaluateSystemRunPolicyPhase(opts, parsed);
|
|
1896
|
-
if (!policyPhase) return;
|
|
1897
|
-
await executeSystemRunPhase(opts, policyPhase);
|
|
1898
|
-
}
|
|
1899
|
-
//#endregion
|
|
1900
|
-
//#region src/node-host/plugin-node-host.ts
|
|
1901
|
-
let pluginRegistryLoaderModulePromise;
|
|
1902
|
-
async function loadPluginRegistryLoaderModule() {
|
|
1903
|
-
pluginRegistryLoaderModulePromise ??= import("./runtime-registry-loader-Cf2HuMjd.js");
|
|
1904
|
-
return await pluginRegistryLoaderModulePromise;
|
|
1905
|
-
}
|
|
1906
|
-
async function ensureNodeHostPluginRegistry(params) {
|
|
1907
|
-
(await loadPluginRegistryLoaderModule()).ensurePluginRegistryLoaded({
|
|
1908
|
-
scope: "all",
|
|
1909
|
-
config: params.config,
|
|
1910
|
-
activationSourceConfig: params.config,
|
|
1911
|
-
env: params.env
|
|
1912
|
-
});
|
|
1913
|
-
}
|
|
1914
|
-
function listRegisteredNodeHostCapsAndCommands() {
|
|
1915
|
-
const registry = getActivePluginRegistry();
|
|
1916
|
-
const caps = /* @__PURE__ */ new Set();
|
|
1917
|
-
const commands = /* @__PURE__ */ new Set();
|
|
1918
|
-
for (const entry of registry?.nodeHostCommands ?? []) {
|
|
1919
|
-
if (entry.command.cap) caps.add(entry.command.cap);
|
|
1920
|
-
commands.add(entry.command.command);
|
|
1921
|
-
}
|
|
1922
|
-
return {
|
|
1923
|
-
caps: [...caps].toSorted((left, right) => left.localeCompare(right)),
|
|
1924
|
-
commands: [...commands].toSorted((left, right) => left.localeCompare(right))
|
|
1925
|
-
};
|
|
1926
|
-
}
|
|
1927
|
-
async function invokeRegisteredNodeHostCommand(command, paramsJSON) {
|
|
1928
|
-
const match = (getActivePluginRegistry()?.nodeHostCommands ?? []).find((entry) => entry.command.command === command);
|
|
1929
|
-
if (!match) return null;
|
|
1930
|
-
return await match.command.handle(paramsJSON);
|
|
1931
|
-
}
|
|
1932
|
-
//#endregion
|
|
1933
|
-
//#region src/node-host/invoke.ts
|
|
1934
|
-
const OUTPUT_CAP = 2e5;
|
|
1935
|
-
const OUTPUT_EVENT_TAIL = 2e4;
|
|
1936
|
-
const DEFAULT_NODE_PATH$1 = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
|
|
1937
|
-
const execHostEnforced = normalizeLowercaseStringOrEmpty(process.env.FENGMING_NODE_EXEC_HOST ?? "") === "app";
|
|
1938
|
-
const execHostFallbackAllowed = normalizeLowercaseStringOrEmpty(process.env.FENGMING_NODE_EXEC_FALLBACK ?? "") !== "0";
|
|
1939
|
-
const preferMacAppExecHost = process.platform === "darwin" && execHostEnforced;
|
|
1940
|
-
function resolveExecSecurity(value) {
|
|
1941
|
-
return value === "deny" || value === "allowlist" || value === "full" ? value : "allowlist";
|
|
1942
|
-
}
|
|
1943
|
-
function isCmdExeInvocation(argv) {
|
|
1944
|
-
const token = argv[0]?.trim();
|
|
1945
|
-
if (!token) return false;
|
|
1946
|
-
const base = normalizeLowercaseStringOrEmpty(path.win32.basename(token));
|
|
1947
|
-
return base === "cmd.exe" || base === "cmd";
|
|
1948
|
-
}
|
|
1949
|
-
function resolveExecAsk(value) {
|
|
1950
|
-
return value === "off" || value === "on-miss" || value === "always" ? value : "on-miss";
|
|
1951
|
-
}
|
|
1952
|
-
function sanitizeEnv(overrides) {
|
|
1953
|
-
return sanitizeHostExecEnv({
|
|
1954
|
-
overrides,
|
|
1955
|
-
blockPathOverrides: true
|
|
1956
|
-
});
|
|
1957
|
-
}
|
|
1958
|
-
function truncateOutput(raw, maxChars) {
|
|
1959
|
-
if (raw.length <= maxChars) return {
|
|
1960
|
-
text: raw,
|
|
1961
|
-
truncated: false
|
|
1962
|
-
};
|
|
1963
|
-
return {
|
|
1964
|
-
text: `... (truncated) ${raw.slice(raw.length - maxChars)}`,
|
|
1965
|
-
truncated: true
|
|
1966
|
-
};
|
|
1967
|
-
}
|
|
1968
|
-
function decodeCapturedOutputBuffer(params) {
|
|
1969
|
-
return decodeWindowsOutputBuffer(params);
|
|
1970
|
-
}
|
|
1971
|
-
function redactExecApprovals(file) {
|
|
1972
|
-
const socketPath = file.socket?.path?.trim();
|
|
1973
|
-
return {
|
|
1974
|
-
...file,
|
|
1975
|
-
socket: socketPath ? { path: socketPath } : void 0
|
|
1976
|
-
};
|
|
1977
|
-
}
|
|
1978
|
-
function requireExecApprovalsBaseHash(params, snapshot) {
|
|
1979
|
-
if (!snapshot.exists) return;
|
|
1980
|
-
if (!snapshot.hash) throw new Error("INVALID_REQUEST: exec approvals base hash unavailable; reload and retry");
|
|
1981
|
-
const baseHash = typeof params.baseHash === "string" ? params.baseHash.trim() : "";
|
|
1982
|
-
if (!baseHash) throw new Error("INVALID_REQUEST: exec approvals base hash required; reload and retry");
|
|
1983
|
-
if (baseHash !== snapshot.hash) throw new Error("INVALID_REQUEST: exec approvals changed; reload and retry");
|
|
1984
|
-
}
|
|
1985
|
-
async function runCommand(argv, cwd, env, timeoutMs) {
|
|
1986
|
-
return await new Promise((resolve) => {
|
|
1987
|
-
const stdoutChunks = [];
|
|
1988
|
-
const stderrChunks = [];
|
|
1989
|
-
let outputLen = 0;
|
|
1990
|
-
let truncated = false;
|
|
1991
|
-
let timedOut = false;
|
|
1992
|
-
let settled = false;
|
|
1993
|
-
const windowsEncoding = resolveWindowsConsoleEncoding();
|
|
1994
|
-
const child = spawn(argv[0], argv.slice(1), {
|
|
1995
|
-
cwd,
|
|
1996
|
-
env,
|
|
1997
|
-
stdio: [
|
|
1998
|
-
"ignore",
|
|
1999
|
-
"pipe",
|
|
2000
|
-
"pipe"
|
|
2001
|
-
],
|
|
2002
|
-
windowsHide: true
|
|
2003
|
-
});
|
|
2004
|
-
const onChunk = (chunk, target) => {
|
|
2005
|
-
if (outputLen >= OUTPUT_CAP) {
|
|
2006
|
-
truncated = true;
|
|
2007
|
-
return;
|
|
2008
|
-
}
|
|
2009
|
-
const remaining = OUTPUT_CAP - outputLen;
|
|
2010
|
-
const slice = chunk.length > remaining ? chunk.subarray(0, remaining) : chunk;
|
|
2011
|
-
outputLen += slice.length;
|
|
2012
|
-
if (target === "stdout") stdoutChunks.push(slice);
|
|
2013
|
-
else stderrChunks.push(slice);
|
|
2014
|
-
if (chunk.length > remaining) truncated = true;
|
|
2015
|
-
};
|
|
2016
|
-
child.stdout?.on("data", (chunk) => onChunk(chunk, "stdout"));
|
|
2017
|
-
child.stderr?.on("data", (chunk) => onChunk(chunk, "stderr"));
|
|
2018
|
-
let timer;
|
|
2019
|
-
if (timeoutMs && timeoutMs > 0) timer = setTimeout(() => {
|
|
2020
|
-
timedOut = true;
|
|
2021
|
-
try {
|
|
2022
|
-
child.kill("SIGKILL");
|
|
2023
|
-
} catch {}
|
|
2024
|
-
}, timeoutMs);
|
|
2025
|
-
const finalize = (exitCode, error) => {
|
|
2026
|
-
if (settled) return;
|
|
2027
|
-
settled = true;
|
|
2028
|
-
if (timer) clearTimeout(timer);
|
|
2029
|
-
const stdout = decodeCapturedOutputBuffer({
|
|
2030
|
-
buffer: Buffer.concat(stdoutChunks),
|
|
2031
|
-
windowsEncoding
|
|
2032
|
-
});
|
|
2033
|
-
const stderr = decodeCapturedOutputBuffer({
|
|
2034
|
-
buffer: Buffer.concat(stderrChunks),
|
|
2035
|
-
windowsEncoding
|
|
2036
|
-
});
|
|
2037
|
-
resolve({
|
|
2038
|
-
exitCode,
|
|
2039
|
-
timedOut,
|
|
2040
|
-
success: exitCode === 0 && !timedOut && !error,
|
|
2041
|
-
stdout,
|
|
2042
|
-
stderr,
|
|
2043
|
-
error: error ?? null,
|
|
2044
|
-
truncated
|
|
2045
|
-
});
|
|
2046
|
-
};
|
|
2047
|
-
child.on("error", (err) => {
|
|
2048
|
-
finalize(void 0, err.message);
|
|
2049
|
-
});
|
|
2050
|
-
child.on("exit", (code) => {
|
|
2051
|
-
finalize(code === null ? void 0 : code, null);
|
|
2052
|
-
});
|
|
2053
|
-
});
|
|
2054
|
-
}
|
|
2055
|
-
function resolveEnvPath(env) {
|
|
2056
|
-
return (env?.PATH ?? env?.Path ?? process.env.PATH ?? process.env.Path ?? DEFAULT_NODE_PATH$1).split(path.delimiter).filter(Boolean);
|
|
2057
|
-
}
|
|
2058
|
-
function resolveExecutable(bin, env) {
|
|
2059
|
-
if (bin.includes("/") || bin.includes("\\")) return null;
|
|
2060
|
-
const extensions = process.platform === "win32" ? (process.env.PATHEXT ?? process.env.PathExt ?? ".EXE;.CMD;.BAT;.COM").split(";").map((ext) => normalizeLowercaseStringOrEmpty(ext)) : [""];
|
|
2061
|
-
for (const dir of resolveEnvPath(env)) for (const ext of extensions) {
|
|
2062
|
-
const candidate = path.join(dir, bin + ext);
|
|
2063
|
-
if (fs.existsSync(candidate)) return candidate;
|
|
2064
|
-
}
|
|
2065
|
-
return null;
|
|
2066
|
-
}
|
|
2067
|
-
async function handleSystemWhich(params, env) {
|
|
2068
|
-
const bins = normalizeStringEntries(params.bins);
|
|
2069
|
-
const found = {};
|
|
2070
|
-
for (const bin of bins) {
|
|
2071
|
-
const path = resolveExecutable(bin, env);
|
|
2072
|
-
if (path) found[bin] = path;
|
|
2073
|
-
}
|
|
2074
|
-
return { bins: found };
|
|
2075
|
-
}
|
|
2076
|
-
function buildExecEventPayload(payload) {
|
|
2077
|
-
if (!payload.output) return payload;
|
|
2078
|
-
const trimmed = payload.output.trim();
|
|
2079
|
-
if (!trimmed) return payload;
|
|
2080
|
-
const { text } = truncateOutput(trimmed, OUTPUT_EVENT_TAIL);
|
|
2081
|
-
return {
|
|
2082
|
-
...payload,
|
|
2083
|
-
output: text
|
|
2084
|
-
};
|
|
2085
|
-
}
|
|
2086
|
-
async function sendExecFinishedEvent(params) {
|
|
2087
|
-
const combined = [
|
|
2088
|
-
params.result.stdout,
|
|
2089
|
-
params.result.stderr,
|
|
2090
|
-
params.result.error
|
|
2091
|
-
].filter(Boolean).join("\n");
|
|
2092
|
-
await sendNodeEvent(params.client, "exec.finished", buildExecEventPayload({
|
|
2093
|
-
sessionKey: params.sessionKey,
|
|
2094
|
-
runId: params.runId,
|
|
2095
|
-
host: "node",
|
|
2096
|
-
command: params.commandText,
|
|
2097
|
-
exitCode: params.result.exitCode ?? void 0,
|
|
2098
|
-
timedOut: params.result.timedOut,
|
|
2099
|
-
success: params.result.success,
|
|
2100
|
-
output: combined,
|
|
2101
|
-
suppressNotifyOnExit: params.suppressNotifyOnExit
|
|
2102
|
-
}));
|
|
2103
|
-
}
|
|
2104
|
-
async function runViaMacAppExecHost(params) {
|
|
2105
|
-
const { approvals, request } = params;
|
|
2106
|
-
return await requestExecHostViaSocket({
|
|
2107
|
-
socketPath: approvals.socketPath,
|
|
2108
|
-
token: approvals.token,
|
|
2109
|
-
request
|
|
2110
|
-
});
|
|
2111
|
-
}
|
|
2112
|
-
async function sendJsonPayloadResult(client, frame, payload) {
|
|
2113
|
-
await sendInvokeResult(client, frame, {
|
|
2114
|
-
ok: true,
|
|
2115
|
-
payloadJSON: JSON.stringify(payload)
|
|
2116
|
-
});
|
|
2117
|
-
}
|
|
2118
|
-
async function sendRawPayloadResult(client, frame, payloadJSON) {
|
|
2119
|
-
await sendInvokeResult(client, frame, {
|
|
2120
|
-
ok: true,
|
|
2121
|
-
payloadJSON
|
|
2122
|
-
});
|
|
2123
|
-
}
|
|
2124
|
-
async function sendErrorResult(client, frame, code, message) {
|
|
2125
|
-
await sendInvokeResult(client, frame, {
|
|
2126
|
-
ok: false,
|
|
2127
|
-
error: {
|
|
2128
|
-
code,
|
|
2129
|
-
message
|
|
2130
|
-
}
|
|
2131
|
-
});
|
|
2132
|
-
}
|
|
2133
|
-
async function sendInvalidRequestResult(client, frame, err) {
|
|
2134
|
-
await sendErrorResult(client, frame, "INVALID_REQUEST", String(err));
|
|
2135
|
-
}
|
|
2136
|
-
async function handleInvoke(frame, client, skillBins) {
|
|
2137
|
-
const command = frame.command ?? "";
|
|
2138
|
-
if (command === "system.execApprovals.get") {
|
|
2139
|
-
try {
|
|
2140
|
-
ensureExecApprovals();
|
|
2141
|
-
const snapshot = readExecApprovalsSnapshot();
|
|
2142
|
-
await sendJsonPayloadResult(client, frame, {
|
|
2143
|
-
path: snapshot.path,
|
|
2144
|
-
exists: snapshot.exists,
|
|
2145
|
-
hash: snapshot.hash,
|
|
2146
|
-
file: redactExecApprovals(snapshot.file)
|
|
2147
|
-
});
|
|
2148
|
-
} catch (err) {
|
|
2149
|
-
const message = String(err);
|
|
2150
|
-
await sendErrorResult(client, frame, normalizeLowercaseStringOrEmpty(message).includes("timed out") ? "TIMEOUT" : "INVALID_REQUEST", message);
|
|
2151
|
-
}
|
|
2152
|
-
return;
|
|
2153
|
-
}
|
|
2154
|
-
if (command === "system.execApprovals.set") {
|
|
2155
|
-
try {
|
|
2156
|
-
const params = decodeParams(frame.paramsJSON);
|
|
2157
|
-
if (!params.file || typeof params.file !== "object") throw new Error("INVALID_REQUEST: exec approvals file required");
|
|
2158
|
-
ensureExecApprovals();
|
|
2159
|
-
const snapshot = readExecApprovalsSnapshot();
|
|
2160
|
-
requireExecApprovalsBaseHash(params, snapshot);
|
|
2161
|
-
saveExecApprovals(mergeExecApprovalsSocketDefaults({
|
|
2162
|
-
normalized: normalizeExecApprovals(params.file),
|
|
2163
|
-
current: snapshot.file
|
|
2164
|
-
}));
|
|
2165
|
-
const nextSnapshot = readExecApprovalsSnapshot();
|
|
2166
|
-
await sendJsonPayloadResult(client, frame, {
|
|
2167
|
-
path: nextSnapshot.path,
|
|
2168
|
-
exists: nextSnapshot.exists,
|
|
2169
|
-
hash: nextSnapshot.hash,
|
|
2170
|
-
file: redactExecApprovals(nextSnapshot.file)
|
|
2171
|
-
});
|
|
2172
|
-
} catch (err) {
|
|
2173
|
-
await sendInvalidRequestResult(client, frame, err);
|
|
2174
|
-
}
|
|
2175
|
-
return;
|
|
2176
|
-
}
|
|
2177
|
-
if (command === "system.which") {
|
|
2178
|
-
try {
|
|
2179
|
-
const params = decodeParams(frame.paramsJSON);
|
|
2180
|
-
if (!Array.isArray(params.bins)) throw new Error("INVALID_REQUEST: bins required");
|
|
2181
|
-
await sendJsonPayloadResult(client, frame, await handleSystemWhich(params, sanitizeEnv(void 0)));
|
|
2182
|
-
} catch (err) {
|
|
2183
|
-
await sendInvalidRequestResult(client, frame, err);
|
|
2184
|
-
}
|
|
2185
|
-
return;
|
|
2186
|
-
}
|
|
2187
|
-
try {
|
|
2188
|
-
const pluginNodeHostResult = await invokeRegisteredNodeHostCommand(command, frame.paramsJSON);
|
|
2189
|
-
if (pluginNodeHostResult !== null) {
|
|
2190
|
-
await sendRawPayloadResult(client, frame, pluginNodeHostResult);
|
|
2191
|
-
return;
|
|
2192
|
-
}
|
|
2193
|
-
} catch (err) {
|
|
2194
|
-
await sendInvalidRequestResult(client, frame, err);
|
|
2195
|
-
return;
|
|
2196
|
-
}
|
|
2197
|
-
if (command === "system.run.prepare") {
|
|
2198
|
-
try {
|
|
2199
|
-
const prepared = buildSystemRunApprovalPlan(decodeParams(frame.paramsJSON));
|
|
2200
|
-
if (!prepared.ok) {
|
|
2201
|
-
await sendErrorResult(client, frame, "INVALID_REQUEST", prepared.message);
|
|
2202
|
-
return;
|
|
2203
|
-
}
|
|
2204
|
-
const { getRuntimeConfig } = await import("./config/config.js");
|
|
2205
|
-
const execPolicy = resolveEffectiveSystemRunExecPolicy({
|
|
2206
|
-
cfg: getRuntimeConfig(),
|
|
2207
|
-
agentId: prepared.plan.agentId ?? void 0,
|
|
2208
|
-
defaultSecurity: resolveExecSecurity(void 0),
|
|
2209
|
-
defaultAsk: resolveExecAsk(void 0),
|
|
2210
|
-
requireSocket: preferMacAppExecHost
|
|
2211
|
-
});
|
|
2212
|
-
await sendJsonPayloadResult(client, frame, {
|
|
2213
|
-
plan: prepared.plan,
|
|
2214
|
-
execPolicy: {
|
|
2215
|
-
security: execPolicy.security,
|
|
2216
|
-
ask: execPolicy.ask
|
|
2217
|
-
}
|
|
2218
|
-
});
|
|
2219
|
-
} catch (err) {
|
|
2220
|
-
await sendInvalidRequestResult(client, frame, err);
|
|
2221
|
-
}
|
|
2222
|
-
return;
|
|
2223
|
-
}
|
|
2224
|
-
if (command !== "system.run") {
|
|
2225
|
-
await sendErrorResult(client, frame, "UNAVAILABLE", "command not supported");
|
|
2226
|
-
return;
|
|
2227
|
-
}
|
|
2228
|
-
let params;
|
|
2229
|
-
try {
|
|
2230
|
-
params = decodeParams(frame.paramsJSON);
|
|
2231
|
-
} catch (err) {
|
|
2232
|
-
await sendInvalidRequestResult(client, frame, err);
|
|
2233
|
-
return;
|
|
2234
|
-
}
|
|
2235
|
-
if (!Array.isArray(params.command) || params.command.length === 0) {
|
|
2236
|
-
await sendErrorResult(client, frame, "INVALID_REQUEST", "command required");
|
|
2237
|
-
return;
|
|
2238
|
-
}
|
|
2239
|
-
await handleSystemRunInvoke({
|
|
2240
|
-
client,
|
|
2241
|
-
params,
|
|
2242
|
-
skillBins,
|
|
2243
|
-
execHostEnforced,
|
|
2244
|
-
execHostFallbackAllowed,
|
|
2245
|
-
resolveExecSecurity,
|
|
2246
|
-
resolveExecAsk,
|
|
2247
|
-
isCmdExeInvocation,
|
|
2248
|
-
sanitizeEnv,
|
|
2249
|
-
runCommand,
|
|
2250
|
-
runViaMacAppExecHost,
|
|
2251
|
-
sendNodeEvent,
|
|
2252
|
-
buildExecEventPayload,
|
|
2253
|
-
sendInvokeResult: async (result) => {
|
|
2254
|
-
await sendInvokeResult(client, frame, result);
|
|
2255
|
-
},
|
|
2256
|
-
sendExecFinishedEvent: async ({ sessionKey, runId, commandText, result }) => {
|
|
2257
|
-
await sendExecFinishedEvent({
|
|
2258
|
-
client,
|
|
2259
|
-
sessionKey,
|
|
2260
|
-
runId,
|
|
2261
|
-
commandText,
|
|
2262
|
-
result
|
|
2263
|
-
});
|
|
2264
|
-
},
|
|
2265
|
-
preferMacAppExecHost
|
|
2266
|
-
});
|
|
2267
|
-
}
|
|
2268
|
-
function decodeParams(raw) {
|
|
2269
|
-
if (!raw) throw new Error("无效请求:需要 paramsJSON");
|
|
2270
|
-
try {
|
|
2271
|
-
return JSON.parse(raw);
|
|
2272
|
-
} catch {
|
|
2273
|
-
throw new Error("INVALID_REQUEST: paramsJSON malformed JSON");
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
function coerceNodeInvokePayload(payload) {
|
|
2277
|
-
if (!payload || typeof payload !== "object") return null;
|
|
2278
|
-
const obj = payload;
|
|
2279
|
-
const id = typeof obj.id === "string" ? obj.id.trim() : "";
|
|
2280
|
-
const nodeId = typeof obj.nodeId === "string" ? obj.nodeId.trim() : "";
|
|
2281
|
-
const command = typeof obj.command === "string" ? obj.command.trim() : "";
|
|
2282
|
-
if (!id || !nodeId || !command) return null;
|
|
2283
|
-
return {
|
|
2284
|
-
id,
|
|
2285
|
-
nodeId,
|
|
2286
|
-
command,
|
|
2287
|
-
paramsJSON: typeof obj.paramsJSON === "string" ? obj.paramsJSON : obj.params !== void 0 ? JSON.stringify(obj.params) : null,
|
|
2288
|
-
timeoutMs: typeof obj.timeoutMs === "number" ? obj.timeoutMs : null,
|
|
2289
|
-
idempotencyKey: typeof obj.idempotencyKey === "string" ? obj.idempotencyKey : null
|
|
2290
|
-
};
|
|
2291
|
-
}
|
|
2292
|
-
async function sendInvokeResult(client, frame, result) {
|
|
2293
|
-
try {
|
|
2294
|
-
await client.request("node.invoke.result", buildNodeInvokeResultParams(frame, result));
|
|
2295
|
-
} catch {}
|
|
2296
|
-
}
|
|
2297
|
-
function buildNodeInvokeResultParams(frame, result) {
|
|
2298
|
-
const params = {
|
|
2299
|
-
id: frame.id,
|
|
2300
|
-
nodeId: frame.nodeId,
|
|
2301
|
-
ok: result.ok
|
|
2302
|
-
};
|
|
2303
|
-
if (result.payload !== void 0) params.payload = result.payload;
|
|
2304
|
-
if (typeof result.payloadJSON === "string") params.payloadJSON = result.payloadJSON;
|
|
2305
|
-
if (result.error) params.error = result.error;
|
|
2306
|
-
return params;
|
|
2307
|
-
}
|
|
2308
|
-
async function sendNodeEvent(client, event, payload) {
|
|
2309
|
-
try {
|
|
2310
|
-
await client.request("node.event", {
|
|
2311
|
-
event,
|
|
2312
|
-
payloadJSON: payload ? JSON.stringify(payload) : null
|
|
2313
|
-
});
|
|
2314
|
-
} catch {}
|
|
2315
|
-
}
|
|
2316
|
-
//#endregion
|
|
2317
|
-
//#region src/node-host/runner.ts
|
|
2318
|
-
const DEFAULT_NODE_PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin";
|
|
2319
|
-
function resolveNodeHostGatewayPlatform(platform) {
|
|
2320
|
-
switch (platform) {
|
|
2321
|
-
case "darwin": return "macos";
|
|
2322
|
-
case "win32": return "windows";
|
|
2323
|
-
case "linux": return "linux";
|
|
2324
|
-
default: return "unknown";
|
|
2325
|
-
}
|
|
2326
|
-
}
|
|
2327
|
-
function resolveNodeHostGatewayDeviceFamily(platform) {
|
|
2328
|
-
switch (platform) {
|
|
2329
|
-
case "darwin": return "Mac";
|
|
2330
|
-
case "win32": return "Windows";
|
|
2331
|
-
case "linux": return "Linux";
|
|
2332
|
-
default: return;
|
|
2333
|
-
}
|
|
2334
|
-
}
|
|
2335
|
-
function writeStderrLine(message) {
|
|
2336
|
-
process.stderr.write(`${message}\n`);
|
|
2337
|
-
}
|
|
2338
|
-
const NODE_HOST_EXIT_ON_RECONNECT_PAUSE_CODES = new Set([
|
|
2339
|
-
ConnectErrorDetailCodes.AUTH_TOKEN_MISSING,
|
|
2340
|
-
ConnectErrorDetailCodes.AUTH_TOKEN_MISMATCH,
|
|
2341
|
-
ConnectErrorDetailCodes.AUTH_BOOTSTRAP_TOKEN_INVALID,
|
|
2342
|
-
ConnectErrorDetailCodes.AUTH_PASSWORD_MISSING,
|
|
2343
|
-
ConnectErrorDetailCodes.AUTH_PASSWORD_MISMATCH,
|
|
2344
|
-
ConnectErrorDetailCodes.CLIENT_VERSION_MISMATCH
|
|
2345
|
-
]);
|
|
2346
|
-
function shouldExitNodeHostOnReconnectPaused(detailCode) {
|
|
2347
|
-
return detailCode !== null && NODE_HOST_EXIT_ON_RECONNECT_PAUSE_CODES.has(detailCode);
|
|
2348
|
-
}
|
|
2349
|
-
function formatNodeHostReconnectPausedMessage(info, params) {
|
|
2350
|
-
const detail = info.detailCode ? ` detail=${info.detailCode}` : "";
|
|
2351
|
-
const reason = info.reason.trim() || "no close reason";
|
|
2352
|
-
const action = params?.exiting ? "exiting for supervisor restart" : "waiting for operator action";
|
|
2353
|
-
return `node host gateway reconnect paused after close (${info.code}): ${reason}${detail}; ${action}`;
|
|
2354
|
-
}
|
|
2355
|
-
function handleNodeHostReconnectPaused(info, deps = {}) {
|
|
2356
|
-
const shouldExit = shouldExitNodeHostOnReconnectPaused(info.detailCode);
|
|
2357
|
-
(deps.writeLine ?? writeStderrLine)(formatNodeHostReconnectPausedMessage(info, { exiting: shouldExit }));
|
|
2358
|
-
if (!shouldExit) return;
|
|
2359
|
-
(deps.exit ?? ((code) => process.exit(code)))(1);
|
|
2360
|
-
}
|
|
2361
|
-
function resolveExecutablePathFromEnv(bin, pathEnv) {
|
|
2362
|
-
if (bin.includes("/") || bin.includes("\\")) return null;
|
|
2363
|
-
return resolveExecutableFromPathEnv(bin, pathEnv) ?? null;
|
|
2364
|
-
}
|
|
2365
|
-
function resolveExecutableTrustPathFromEnv(bin, pathEnv) {
|
|
2366
|
-
const resolvedPath = resolveExecutablePathFromEnv(bin, pathEnv);
|
|
2367
|
-
if (!resolvedPath) return null;
|
|
2368
|
-
try {
|
|
2369
|
-
return fs.realpathSync(resolvedPath);
|
|
2370
|
-
} catch {
|
|
2371
|
-
return resolvedPath;
|
|
2372
|
-
}
|
|
2373
|
-
}
|
|
2374
|
-
function resolveSkillBinTrustEntries(bins, pathEnv) {
|
|
2375
|
-
const trustEntries = [];
|
|
2376
|
-
const seen = /* @__PURE__ */ new Set();
|
|
2377
|
-
for (const bin of bins) {
|
|
2378
|
-
const name = bin.trim();
|
|
2379
|
-
if (!name) continue;
|
|
2380
|
-
const resolvedPath = resolveExecutableTrustPathFromEnv(name, pathEnv);
|
|
2381
|
-
if (!resolvedPath) continue;
|
|
2382
|
-
const key = `${name}\u0000${resolvedPath}`;
|
|
2383
|
-
if (seen.has(key)) continue;
|
|
2384
|
-
seen.add(key);
|
|
2385
|
-
trustEntries.push({
|
|
2386
|
-
name,
|
|
2387
|
-
resolvedPath
|
|
2388
|
-
});
|
|
2389
|
-
}
|
|
2390
|
-
return trustEntries.toSorted((left, right) => left.name.localeCompare(right.name) || left.resolvedPath.localeCompare(right.resolvedPath));
|
|
2391
|
-
}
|
|
2392
|
-
var SkillBinsCache = class {
|
|
2393
|
-
constructor(fetch, pathEnv) {
|
|
2394
|
-
this.bins = [];
|
|
2395
|
-
this.lastRefresh = 0;
|
|
2396
|
-
this.ttlMs = 9e4;
|
|
2397
|
-
this.fetch = fetch;
|
|
2398
|
-
this.pathEnv = pathEnv;
|
|
2399
|
-
}
|
|
2400
|
-
async current(force = false) {
|
|
2401
|
-
if (force || Date.now() - this.lastRefresh > this.ttlMs) await this.refresh();
|
|
2402
|
-
return this.bins;
|
|
2403
|
-
}
|
|
2404
|
-
async refresh() {
|
|
2405
|
-
try {
|
|
2406
|
-
const bins = await this.fetch();
|
|
2407
|
-
this.bins = resolveSkillBinTrustEntries(bins, this.pathEnv);
|
|
2408
|
-
this.lastRefresh = Date.now();
|
|
2409
|
-
} catch {
|
|
2410
|
-
if (!this.lastRefresh) this.bins = [];
|
|
2411
|
-
}
|
|
2412
|
-
}
|
|
2413
|
-
};
|
|
2414
|
-
function ensureNodePathEnv() {
|
|
2415
|
-
ensureFengMingCliOnPath({ pathEnv: process.env.PATH ?? "" });
|
|
2416
|
-
const current = process.env.PATH ?? "";
|
|
2417
|
-
if (current.trim()) return current;
|
|
2418
|
-
process.env.PATH = DEFAULT_NODE_PATH;
|
|
2419
|
-
return DEFAULT_NODE_PATH;
|
|
2420
|
-
}
|
|
2421
|
-
async function resolveNodeHostGatewayCredentials(params) {
|
|
2422
|
-
return await resolveGatewayConnectionAuth({
|
|
2423
|
-
config: (params.config.gateway?.mode === "remote" ? "remote" : "local") === "local" ? buildNodeHostLocalAuthConfig(params.config) : params.config,
|
|
2424
|
-
env: params.env,
|
|
2425
|
-
localTokenPrecedence: "env-first",
|
|
2426
|
-
localPasswordPrecedence: "env-first",
|
|
2427
|
-
remoteTokenPrecedence: "env-first",
|
|
2428
|
-
remotePasswordPrecedence: "env-first"
|
|
2429
|
-
});
|
|
2430
|
-
}
|
|
2431
|
-
function buildNodeHostLocalAuthConfig(config) {
|
|
2432
|
-
if (!config.gateway?.remote?.token && !config.gateway?.remote?.password) return config;
|
|
2433
|
-
const nextConfig = structuredClone(config);
|
|
2434
|
-
if (nextConfig.gateway?.remote) {
|
|
2435
|
-
nextConfig.gateway.remote.token = void 0;
|
|
2436
|
-
nextConfig.gateway.remote.password = void 0;
|
|
2437
|
-
}
|
|
2438
|
-
return nextConfig;
|
|
2439
|
-
}
|
|
2440
|
-
async function runNodeHost(opts) {
|
|
2441
|
-
const config = await ensureNodeHostConfig();
|
|
2442
|
-
const nodeId = opts.nodeId?.trim() || config.nodeId;
|
|
2443
|
-
if (nodeId !== config.nodeId) config.nodeId = nodeId;
|
|
2444
|
-
const displayName = opts.displayName?.trim() || config.displayName || await getMachineDisplayName();
|
|
2445
|
-
config.displayName = displayName;
|
|
2446
|
-
const gateway = {
|
|
2447
|
-
host: opts.gatewayHost,
|
|
2448
|
-
port: opts.gatewayPort,
|
|
2449
|
-
tls: opts.gatewayTls ?? getRuntimeConfig().gateway?.tls?.enabled ?? false,
|
|
2450
|
-
tlsFingerprint: opts.gatewayTlsFingerprint
|
|
2451
|
-
};
|
|
2452
|
-
config.gateway = gateway;
|
|
2453
|
-
await saveNodeHostConfig(config);
|
|
2454
|
-
const cfg = getRuntimeConfig();
|
|
2455
|
-
await ensureNodeHostPluginRegistry({
|
|
2456
|
-
config: cfg,
|
|
2457
|
-
env: process.env
|
|
2458
|
-
});
|
|
2459
|
-
const pluginNodeHost = listRegisteredNodeHostCapsAndCommands();
|
|
2460
|
-
const { token, password } = await resolveNodeHostGatewayCredentials({
|
|
2461
|
-
config: cfg,
|
|
2462
|
-
env: process.env
|
|
2463
|
-
});
|
|
2464
|
-
const host = gateway.host ?? "127.0.0.1";
|
|
2465
|
-
const port = gateway.port ?? 18789;
|
|
2466
|
-
const url = `${gateway.tls ? "wss" : "ws"}://${host}:${port}`;
|
|
2467
|
-
const pathEnv = ensureNodePathEnv();
|
|
2468
|
-
const client = new GatewayClient({
|
|
2469
|
-
url,
|
|
2470
|
-
token: token || void 0,
|
|
2471
|
-
password: password || void 0,
|
|
2472
|
-
preauthHandshakeTimeoutMs: cfg.gateway?.handshakeTimeoutMs,
|
|
2473
|
-
instanceId: nodeId,
|
|
2474
|
-
clientName: GATEWAY_CLIENT_NAMES.NODE_HOST,
|
|
2475
|
-
clientDisplayName: displayName,
|
|
2476
|
-
clientVersion: VERSION,
|
|
2477
|
-
platform: resolveNodeHostGatewayPlatform(process.platform),
|
|
2478
|
-
deviceFamily: resolveNodeHostGatewayDeviceFamily(process.platform),
|
|
2479
|
-
mode: GATEWAY_CLIENT_MODES.NODE,
|
|
2480
|
-
role: "node",
|
|
2481
|
-
scopes: [],
|
|
2482
|
-
caps: ["system", ...pluginNodeHost.caps],
|
|
2483
|
-
commands: [
|
|
2484
|
-
...NODE_SYSTEM_RUN_COMMANDS,
|
|
2485
|
-
...NODE_EXEC_APPROVALS_COMMANDS,
|
|
2486
|
-
...pluginNodeHost.commands
|
|
2487
|
-
],
|
|
2488
|
-
pathEnv,
|
|
2489
|
-
permissions: void 0,
|
|
2490
|
-
deviceIdentity: loadOrCreateDeviceIdentity(),
|
|
2491
|
-
tlsFingerprint: gateway.tlsFingerprint,
|
|
2492
|
-
onEvent: (evt) => {
|
|
2493
|
-
if (evt.event !== "node.invoke.request") return;
|
|
2494
|
-
const payload = coerceNodeInvokePayload(evt.payload);
|
|
2495
|
-
if (!payload) return;
|
|
2496
|
-
handleInvoke(payload, client, skillBins);
|
|
2497
|
-
},
|
|
2498
|
-
onConnectError: (err) => {
|
|
2499
|
-
writeStderrLine(`node host gateway connect failed: ${err.message}`);
|
|
2500
|
-
},
|
|
2501
|
-
onReconnectPaused: (info) => {
|
|
2502
|
-
handleNodeHostReconnectPaused(info);
|
|
2503
|
-
},
|
|
2504
|
-
onClose: (code, reason) => {
|
|
2505
|
-
writeStderrLine(`node host gateway closed (${code}): ${reason}`);
|
|
2506
|
-
}
|
|
2507
|
-
});
|
|
2508
|
-
const skillBins = new SkillBinsCache(async () => {
|
|
2509
|
-
const res = await client.request("skills.bins", {});
|
|
2510
|
-
return Array.isArray(res?.bins) ? res.bins.map((bin) => String(bin)) : [];
|
|
2511
|
-
}, pathEnv);
|
|
2512
|
-
if (!(await startGatewayClientWhenEventLoopReady(client, { clientOptions: { preauthHandshakeTimeoutMs: cfg.gateway?.handshakeTimeoutMs } })).ready) throw new Error("节点主机网关事件循环就绪超时");
|
|
2513
|
-
await new Promise(() => {});
|
|
2514
|
-
}
|
|
2515
|
-
//#endregion
|
|
2516
|
-
//#region src/commands/node-daemon-install-helpers.ts
|
|
2517
|
-
function buildNodeInstallEnvironmentValueSources() {
|
|
2518
|
-
return { FENGMING_GATEWAY_TOKEN: "file" };
|
|
2519
|
-
}
|
|
2520
|
-
async function buildNodeInstallPlan(params) {
|
|
2521
|
-
const { devMode, nodePath } = await resolveDaemonInstallRuntimeInputs({
|
|
2522
|
-
env: params.env,
|
|
2523
|
-
runtime: params.runtime,
|
|
2524
|
-
devMode: params.devMode,
|
|
2525
|
-
nodePath: params.nodePath
|
|
2526
|
-
});
|
|
2527
|
-
const { programArguments, workingDirectory } = await resolveNodeProgramArguments({
|
|
2528
|
-
host: params.host,
|
|
2529
|
-
port: params.port,
|
|
2530
|
-
tls: params.tls,
|
|
2531
|
-
tlsFingerprint: params.tlsFingerprint,
|
|
2532
|
-
nodeId: params.nodeId,
|
|
2533
|
-
displayName: params.displayName,
|
|
2534
|
-
dev: devMode,
|
|
2535
|
-
runtime: params.runtime,
|
|
2536
|
-
nodePath
|
|
2537
|
-
});
|
|
2538
|
-
await emitDaemonInstallRuntimeWarning({
|
|
2539
|
-
env: params.env,
|
|
2540
|
-
runtime: params.runtime,
|
|
2541
|
-
programArguments,
|
|
2542
|
-
warn: params.warn,
|
|
2543
|
-
title: "Node daemon runtime"
|
|
2544
|
-
});
|
|
2545
|
-
const environment = buildNodeServiceEnvironment({
|
|
2546
|
-
env: params.env,
|
|
2547
|
-
extraPathDirs: resolveDaemonNodeBinDir(nodePath)
|
|
2548
|
-
});
|
|
2549
|
-
const description = formatNodeServiceDescription({ version: environment.FENGMING_SERVICE_VERSION });
|
|
2550
|
-
return {
|
|
2551
|
-
programArguments,
|
|
2552
|
-
workingDirectory,
|
|
2553
|
-
environment,
|
|
2554
|
-
environmentValueSources: buildNodeInstallEnvironmentValueSources(),
|
|
2555
|
-
description
|
|
2556
|
-
};
|
|
2557
|
-
}
|
|
2558
|
-
//#endregion
|
|
2559
|
-
//#region src/commands/node-daemon-runtime.ts
|
|
2560
|
-
const DEFAULT_NODE_DAEMON_RUNTIME = DEFAULT_GATEWAY_DAEMON_RUNTIME;
|
|
2561
|
-
function isNodeDaemonRuntime(value) {
|
|
2562
|
-
return isGatewayDaemonRuntime(value);
|
|
2563
|
-
}
|
|
2564
|
-
//#endregion
|
|
2565
|
-
//#region src/cli/node-cli/daemon.ts
|
|
2566
|
-
function renderNodeServiceStartHints() {
|
|
2567
|
-
return buildPlatformServiceStartHints({
|
|
2568
|
-
installCommand: formatCliCommand("fengming node install"),
|
|
2569
|
-
startCommand: formatCliCommand("fengming node start"),
|
|
2570
|
-
launchAgentPlistPath: `~/Library/LaunchAgents/${resolveNodeLaunchAgentLabel()}.plist`,
|
|
2571
|
-
systemdServiceName: resolveNodeSystemdServiceName(),
|
|
2572
|
-
windowsTaskName: resolveNodeWindowsTaskName()
|
|
2573
|
-
});
|
|
2574
|
-
}
|
|
2575
|
-
function buildNodeRuntimeHints(env = process.env) {
|
|
2576
|
-
return buildPlatformRuntimeLogHints({
|
|
2577
|
-
env,
|
|
2578
|
-
systemdServiceName: resolveNodeSystemdServiceName(),
|
|
2579
|
-
windowsTaskName: resolveNodeWindowsTaskName()
|
|
2580
|
-
});
|
|
2581
|
-
}
|
|
2582
|
-
function resolveNodeDefaults(opts, config) {
|
|
2583
|
-
const host = normalizeOptionalString(opts.host) || config?.gateway?.host || "127.0.0.1";
|
|
2584
|
-
const portOverride = parsePort(opts.port);
|
|
2585
|
-
if (opts.port !== void 0 && portOverride === null) return {
|
|
2586
|
-
host,
|
|
2587
|
-
port: null
|
|
2588
|
-
};
|
|
2589
|
-
return {
|
|
2590
|
-
host,
|
|
2591
|
-
port: portOverride ?? config?.gateway?.port ?? 18789
|
|
2592
|
-
};
|
|
2593
|
-
}
|
|
2594
|
-
async function runNodeDaemonInstall(opts) {
|
|
2595
|
-
const { json, stdout, warnings, emit, fail } = createDaemonInstallActionContext(opts.json);
|
|
2596
|
-
if (failIfNixDaemonInstallMode(fail)) return;
|
|
2597
|
-
const config = await loadNodeHostConfig();
|
|
2598
|
-
const { host, port } = resolveNodeDefaults(opts, config);
|
|
2599
|
-
if (!Number.isFinite(port ?? NaN) || (port ?? 0) <= 0 || (port ?? 0) > 65535) {
|
|
2600
|
-
fail(opts.port !== void 0 ? formatInvalidPortOption("--port") : formatInvalidConfigPort("node.gateway.port"));
|
|
2601
|
-
return;
|
|
2602
|
-
}
|
|
2603
|
-
const runtimeRaw = opts.runtime ? opts.runtime : DEFAULT_NODE_DAEMON_RUNTIME;
|
|
2604
|
-
if (!isNodeDaemonRuntime(runtimeRaw)) {
|
|
2605
|
-
fail("Invalid --runtime (use \"node\" or \"bun\")");
|
|
2606
|
-
return;
|
|
2607
|
-
}
|
|
2608
|
-
const service = resolveNodeService();
|
|
2609
|
-
let loaded = false;
|
|
2610
|
-
try {
|
|
2611
|
-
loaded = await service.isLoaded({ env: process.env });
|
|
2612
|
-
} catch (err) {
|
|
2613
|
-
fail(`Node service check failed: ${String(err)}`);
|
|
2614
|
-
return;
|
|
2615
|
-
}
|
|
2616
|
-
if (loaded && !opts.force) {
|
|
2617
|
-
emit({
|
|
2618
|
-
ok: true,
|
|
2619
|
-
result: "already-installed",
|
|
2620
|
-
message: `Node service already ${service.loadedText}.`,
|
|
2621
|
-
service: buildDaemonServiceSnapshot(service, loaded),
|
|
2622
|
-
warnings: warnings.length ? warnings : void 0
|
|
2623
|
-
});
|
|
2624
|
-
if (!json) {
|
|
2625
|
-
defaultRuntime.log(`Node service already ${service.loadedText}.`);
|
|
2626
|
-
defaultRuntime.log(`Reinstall with: ${formatCliCommand("fengming node install --force")}`);
|
|
2627
|
-
}
|
|
2628
|
-
return;
|
|
2629
|
-
}
|
|
2630
|
-
const tlsFingerprint = normalizeOptionalString(opts.tlsFingerprint) || config?.gateway?.tlsFingerprint;
|
|
2631
|
-
const tls = Boolean(opts.tls) || Boolean(tlsFingerprint) || Boolean(config?.gateway?.tls);
|
|
2632
|
-
const { programArguments, workingDirectory, environment, environmentValueSources, description } = await buildNodeInstallPlan({
|
|
2633
|
-
env: process.env,
|
|
2634
|
-
host,
|
|
2635
|
-
port: port ?? 18789,
|
|
2636
|
-
tls,
|
|
2637
|
-
tlsFingerprint: tlsFingerprint || void 0,
|
|
2638
|
-
nodeId: opts.nodeId,
|
|
2639
|
-
displayName: opts.displayName,
|
|
2640
|
-
runtime: runtimeRaw,
|
|
2641
|
-
warn: (message) => {
|
|
2642
|
-
if (json) warnings.push(message);
|
|
2643
|
-
else defaultRuntime.log(message);
|
|
2644
|
-
}
|
|
2645
|
-
});
|
|
2646
|
-
await installDaemonServiceAndEmit({
|
|
2647
|
-
serviceNoun: "Node",
|
|
2648
|
-
service,
|
|
2649
|
-
warnings,
|
|
2650
|
-
emit,
|
|
2651
|
-
fail,
|
|
2652
|
-
install: async () => {
|
|
2653
|
-
await service.install({
|
|
2654
|
-
env: process.env,
|
|
2655
|
-
stdout,
|
|
2656
|
-
programArguments,
|
|
2657
|
-
workingDirectory,
|
|
2658
|
-
environment,
|
|
2659
|
-
environmentValueSources,
|
|
2660
|
-
description
|
|
2661
|
-
});
|
|
2662
|
-
}
|
|
2663
|
-
});
|
|
2664
|
-
}
|
|
2665
|
-
async function runNodeDaemonUninstall(opts = {}) {
|
|
2666
|
-
return await runServiceUninstall({
|
|
2667
|
-
serviceNoun: "Node",
|
|
2668
|
-
service: resolveNodeService(),
|
|
2669
|
-
opts,
|
|
2670
|
-
stopBeforeUninstall: false,
|
|
2671
|
-
assertNotLoadedAfterUninstall: false
|
|
2672
|
-
});
|
|
2673
|
-
}
|
|
2674
|
-
async function runNodeDaemonStart(opts = {}) {
|
|
2675
|
-
return await runServiceStart({
|
|
2676
|
-
serviceNoun: "Node",
|
|
2677
|
-
service: resolveNodeService(),
|
|
2678
|
-
renderStartHints: renderNodeServiceStartHints,
|
|
2679
|
-
opts
|
|
2680
|
-
});
|
|
2681
|
-
}
|
|
2682
|
-
async function runNodeDaemonRestart(opts = {}) {
|
|
2683
|
-
await runServiceRestart({
|
|
2684
|
-
serviceNoun: "Node",
|
|
2685
|
-
service: resolveNodeService(),
|
|
2686
|
-
renderStartHints: renderNodeServiceStartHints,
|
|
2687
|
-
opts
|
|
2688
|
-
});
|
|
2689
|
-
}
|
|
2690
|
-
async function runNodeDaemonStop(opts = {}) {
|
|
2691
|
-
return await runServiceStop({
|
|
2692
|
-
serviceNoun: "Node",
|
|
2693
|
-
service: resolveNodeService(),
|
|
2694
|
-
opts
|
|
2695
|
-
});
|
|
2696
|
-
}
|
|
2697
|
-
async function runNodeDaemonStatus(opts = {}) {
|
|
2698
|
-
const json = Boolean(opts.json);
|
|
2699
|
-
const service = resolveNodeService();
|
|
2700
|
-
const [loaded, command, runtime] = await Promise.all([
|
|
2701
|
-
service.isLoaded({ env: process.env }).catch(() => false),
|
|
2702
|
-
service.readCommand(process.env).catch(() => null),
|
|
2703
|
-
service.readRuntime(process.env).catch((err) => ({
|
|
2704
|
-
status: "unknown",
|
|
2705
|
-
detail: String(err)
|
|
2706
|
-
}))
|
|
2707
|
-
]);
|
|
2708
|
-
const payload = { service: {
|
|
2709
|
-
...buildDaemonServiceSnapshot(service, loaded),
|
|
2710
|
-
command,
|
|
2711
|
-
runtime
|
|
2712
|
-
} };
|
|
2713
|
-
if (json) {
|
|
2714
|
-
defaultRuntime.writeJson(payload);
|
|
2715
|
-
return;
|
|
2716
|
-
}
|
|
2717
|
-
const { rich, label, accent, infoText, okText, warnText, errorText } = createCliStatusTextStyles();
|
|
2718
|
-
const serviceStatus = loaded ? okText(service.loadedText) : warnText(service.notLoadedText);
|
|
2719
|
-
defaultRuntime.log(`${label("Service:")} ${accent(service.label)} (${serviceStatus})`);
|
|
2720
|
-
if (command?.programArguments?.length) defaultRuntime.log(`${label("Command:")} ${infoText(command.programArguments.join(" "))}`);
|
|
2721
|
-
if (command?.sourcePath) defaultRuntime.log(`${label("Service file:")} ${infoText(command.sourcePath)}`);
|
|
2722
|
-
if (command?.workingDirectory) defaultRuntime.log(`${label("Working dir:")} ${infoText(command.workingDirectory)}`);
|
|
2723
|
-
const runtimeLine = formatRuntimeStatus(runtime);
|
|
2724
|
-
if (runtimeLine) {
|
|
2725
|
-
const runtimeColor = resolveRuntimeStatusColor(runtime?.status);
|
|
2726
|
-
defaultRuntime.log(`${label("Runtime:")} ${colorize(rich, runtimeColor, runtimeLine)}`);
|
|
2727
|
-
}
|
|
2728
|
-
if (!loaded) {
|
|
2729
|
-
defaultRuntime.log("");
|
|
2730
|
-
for (const hint of renderNodeServiceStartHints()) defaultRuntime.log(`${warnText("Start with:")} ${infoText(hint)}`);
|
|
2731
|
-
return;
|
|
2732
|
-
}
|
|
2733
|
-
const baseEnv = {
|
|
2734
|
-
...process.env,
|
|
2735
|
-
...command?.environment ?? void 0
|
|
2736
|
-
};
|
|
2737
|
-
const hintEnv = {
|
|
2738
|
-
...baseEnv,
|
|
2739
|
-
FENGMING_LOG_PREFIX: baseEnv.FENGMING_LOG_PREFIX ?? "node"
|
|
2740
|
-
};
|
|
2741
|
-
if (runtime?.missingUnit) {
|
|
2742
|
-
defaultRuntime.error(errorText("Service unit not found."));
|
|
2743
|
-
for (const hint of buildNodeRuntimeHints(hintEnv)) defaultRuntime.log(errorText(hint));
|
|
2744
|
-
return;
|
|
2745
|
-
}
|
|
2746
|
-
if (runtime?.status === "stopped") {
|
|
2747
|
-
defaultRuntime.error(errorText("Service is loaded but not running."));
|
|
2748
|
-
for (const hint of buildNodeRuntimeHints(hintEnv)) defaultRuntime.log(errorText(hint));
|
|
2749
|
-
}
|
|
2750
|
-
}
|
|
2751
|
-
//#endregion
|
|
2752
|
-
//#region src/cli/node-cli/register.ts
|
|
2753
|
-
function parsePortOption(value, fallback) {
|
|
2754
|
-
if (value === void 0) return fallback;
|
|
2755
|
-
return parsePort(value);
|
|
2756
|
-
}
|
|
2757
|
-
function registerNodeCli(program) {
|
|
2758
|
-
const node = program.command("node").description("Run and manage the headless node host service").addHelpText("after", () => `\n${theme.heading("Examples:")}\n${formatHelpExamples([
|
|
2759
|
-
["fengming node run --host 127.0.0.1 --port 18789", "Run the node host in the foreground."],
|
|
2760
|
-
["fengming node status", "Check node host service status."],
|
|
2761
|
-
["fengming node install", "Install the node host service."],
|
|
2762
|
-
["fengming node start", "Start the installed node host service."],
|
|
2763
|
-
["fengming node restart", "Restart the installed node host service."]
|
|
2764
|
-
])}\n\n${theme.muted("Docs:")} ${formatDocsLink("/cli/node", "docs.fengming.ai/cli/node")}\n`);
|
|
2765
|
-
node.command("run").description("Run the headless node host (foreground)").option("--host <host>", "Gateway host").option("--port <port>", "Gateway port").option("--tls", "Use TLS for the gateway connection").option("--tls-fingerprint <sha256>", "Expected TLS certificate fingerprint (sha256)").option("--node-id <id>", "Override node id (clears pairing token)").option("--display-name <name>", "Override node display name").action(async (opts) => {
|
|
2766
|
-
const existing = await loadNodeHostConfig();
|
|
2767
|
-
const host = normalizeOptionalString(opts.host) || existing?.gateway?.host || "127.0.0.1";
|
|
2768
|
-
const port = parsePortOption(opts.port, existing?.gateway?.port ?? 18789);
|
|
2769
|
-
if (port === null) {
|
|
2770
|
-
defaultRuntime.error(formatInvalidPortOption("--port"));
|
|
2771
|
-
defaultRuntime.exit(1);
|
|
2772
|
-
return;
|
|
2773
|
-
}
|
|
2774
|
-
const retargetedGateway = opts.host !== void 0 || opts.port !== void 0;
|
|
2775
|
-
const tlsFingerprint = opts.tlsFingerprint ?? (retargetedGateway ? void 0 : existing?.gateway?.tlsFingerprint);
|
|
2776
|
-
const inheritedTls = retargetedGateway ? void 0 : existing?.gateway?.tls;
|
|
2777
|
-
await runNodeHost({
|
|
2778
|
-
gatewayHost: host,
|
|
2779
|
-
gatewayPort: port,
|
|
2780
|
-
gatewayTls: typeof opts.tls === "boolean" ? opts.tls : Boolean(tlsFingerprint) || inheritedTls,
|
|
2781
|
-
gatewayTlsFingerprint: tlsFingerprint,
|
|
2782
|
-
nodeId: opts.nodeId,
|
|
2783
|
-
displayName: opts.displayName
|
|
2784
|
-
});
|
|
2785
|
-
});
|
|
2786
|
-
node.command("status").description("Show node host status").option("--json", "Output JSON", false).action(async (opts) => {
|
|
2787
|
-
await runNodeDaemonStatus(opts);
|
|
2788
|
-
});
|
|
2789
|
-
node.command("install").description("Install the node host service (launchd/systemd/schtasks)").option("--host <host>", "Gateway host").option("--port <port>", "Gateway port").option("--tls", "Use TLS for the gateway connection", false).option("--tls-fingerprint <sha256>", "Expected TLS certificate fingerprint (sha256)").option("--node-id <id>", "Override node id (clears pairing token)").option("--display-name <name>", "Override node display name").option("--runtime <runtime>", "Service runtime (node|bun). Default: node").option("--force", "Reinstall/overwrite if already installed", false).option("--json", "Output JSON", false).action(async (opts) => {
|
|
2790
|
-
await runNodeDaemonInstall(opts);
|
|
2791
|
-
});
|
|
2792
|
-
node.command("uninstall").description("Uninstall the node host service (launchd/systemd/schtasks)").option("--json", "Output JSON", false).action(async (opts) => {
|
|
2793
|
-
await runNodeDaemonUninstall(opts);
|
|
2794
|
-
});
|
|
2795
|
-
node.command("stop").description("Stop the node host service (launchd/systemd/schtasks)").option("--json", "Output JSON", false).action(async (opts) => {
|
|
2796
|
-
await runNodeDaemonStop(opts);
|
|
2797
|
-
});
|
|
2798
|
-
node.command("start").description("Start the node host service (launchd/systemd/schtasks)").option("--json", "Output JSON", false).action(async (opts) => {
|
|
2799
|
-
await runNodeDaemonStart(opts);
|
|
2800
|
-
});
|
|
2801
|
-
node.command("restart").description("Restart the node host service (launchd/systemd/schtasks)").option("--json", "Output JSON", false).action(async (opts) => {
|
|
2802
|
-
await runNodeDaemonRestart(opts);
|
|
2803
|
-
});
|
|
2804
|
-
}
|
|
2805
|
-
//#endregion
|
|
2806
|
-
export { registerNodeCli };
|