@ashx-j/lunr 0.2.22 → 0.2.24
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 +16 -1
- package/README.md +15 -13
- package/dist/builtin-extensions/ashxj-tui.d.ts.map +1 -1
- package/dist/builtin-extensions/ashxj-tui.js +2 -2
- package/dist/builtin-extensions/ashxj-tui.js.map +1 -1
- package/dist/builtin-extensions/lunr-browser.d.ts +7 -1
- package/dist/builtin-extensions/lunr-browser.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-browser.js +116 -3
- package/dist/builtin-extensions/lunr-browser.js.map +1 -1
- package/dist/builtin-extensions/lunr-plan-tools.d.ts +7 -7
- package/dist/builtin-extensions/lunr-plan-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/lunr-plan-tools.js +12 -12
- package/dist/builtin-extensions/lunr-plan-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-intercom/index.js +2 -0
- package/dist/builtin-extensions/pi-intercom/index.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js +1 -0
- package/dist/builtin-extensions/pi-mcp-adapter/direct-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.js +1 -1
- package/dist/builtin-extensions/pi-mcp-adapter/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/index.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/schemas.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts +4 -4
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js +6 -4
- package/dist/builtin-extensions/pi-subagents/src/extension/tool-description.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js +6 -3
- package/dist/builtin-extensions/pi-subagents/src/intercom/intercom-bridge.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js +7 -2
- package/dist/builtin-extensions/pi-subagents/src/intercom/native-supervisor-channel.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js +4 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/async-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-runner.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js +9 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/background/subagent-wait.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js +41 -3
- package/dist/builtin-extensions/pi-subagents/src/runs/background/wait-tool.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js +5 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/chain-execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js +3 -2
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/execution.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js +23 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/foreground/subagent-executor.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/child-tools.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts +2 -0
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js +17 -15
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/pi-args.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js +3 -1
- package/dist/builtin-extensions/pi-subagents/src/runs/shared/subagent-prompt-runtime.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js +2 -2
- package/dist/builtin-extensions/pi-subagents/src/shared/child-spec.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts +1 -0
- package/dist/builtin-extensions/pi-subagents/src/shared/types.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/shared/types.js.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.d.ts.map +1 -1
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js +3 -2
- package/dist/builtin-extensions/pi-subagents/src/tui/communication.js.map +1 -1
- package/dist/core/agent-session.d.ts +20 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +235 -107
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/browser/schema.d.ts +1 -1
- package/dist/core/browser/schema.d.ts.map +1 -1
- package/dist/core/browser/schema.js +1 -1
- package/dist/core/browser/schema.js.map +1 -1
- package/dist/core/catalog-cache-scope.d.ts.map +1 -1
- package/dist/core/catalog-cache-scope.js +3 -1
- package/dist/core/catalog-cache-scope.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +3 -2
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/permissions.d.ts +16 -23
- package/dist/core/permissions.d.ts.map +1 -1
- package/dist/core/permissions.js +66 -141
- package/dist/core/permissions.js.map +1 -1
- package/dist/core/plan-mode.d.ts +10 -12
- package/dist/core/plan-mode.d.ts.map +1 -1
- package/dist/core/plan-mode.js +16 -18
- package/dist/core/plan-mode.js.map +1 -1
- package/dist/core/runtime-bridges.d.ts.map +1 -1
- package/dist/core/runtime-bridges.js +2 -0
- package/dist/core/runtime-bridges.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +13 -6
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +9 -2
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +13 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +49 -1
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +4 -4
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/subagent-permission-inherit.d.ts +6 -10
- package/dist/core/subagent-permission-inherit.d.ts.map +1 -1
- package/dist/core/subagent-permission-inherit.js +14 -14
- package/dist/core/subagent-permission-inherit.js.map +1 -1
- package/dist/core/subagent-wait-interruption.d.ts +11 -0
- package/dist/core/subagent-wait-interruption.d.ts.map +1 -0
- package/dist/core/subagent-wait-interruption.js +19 -0
- package/dist/core/subagent-wait-interruption.js.map +1 -0
- package/dist/core/system-prompt.d.ts +2 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +11 -4
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +3 -3
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +3 -3
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/gateway/adapters/discord.d.ts.map +1 -1
- package/dist/gateway/adapters/discord.js +1 -1
- package/dist/gateway/adapters/discord.js.map +1 -1
- package/dist/gateway/approval.d.ts +2 -6
- package/dist/gateway/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +3 -7
- package/dist/gateway/approval.js.map +1 -1
- package/dist/gateway/mobile-commands.d.ts.map +1 -1
- package/dist/gateway/mobile-commands.js +12 -11
- package/dist/gateway/mobile-commands.js.map +1 -1
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +1 -1
- package/dist/gateway/router.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -2
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +10 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +29 -5
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/copyable-text.d.ts +2 -6
- package/dist/modes/interactive/components/copyable-text.d.ts.map +1 -1
- package/dist/modes/interactive/components/copyable-text.js +26 -35
- package/dist/modes/interactive/components/copyable-text.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +7 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +36 -3
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.d.ts +9 -2
- package/dist/modes/interactive/components/thinking-tail.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.js +43 -1
- package/dist/modes/interactive/components/thinking-tail.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +5 -3
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +44 -45
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +7 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +194 -129
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +1 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +23 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/node-runtime/{agent-session-services-NQ6GKOIK.js → agent-session-services-IEF7LQWD.js} +12 -13
- package/dist/node-runtime/{builtin-extensions-GVC6IFDU.js → builtin-extensions-EBAWTH4M.js} +5 -5
- package/dist/node-runtime/{chunk-XLTL257W.js → chunk-2KIPT4HJ.js} +5 -1
- package/dist/node-runtime/{chunk-IWOWXRWU.js → chunk-5Q3EHOHI.js} +21 -21
- package/dist/node-runtime/{chunk-6B2POMK7.js → chunk-6VYZ5UFP.js} +1 -1
- package/dist/node-runtime/{chunk-TQGPP4SC.js → chunk-CDVHZOOK.js} +1 -1
- package/dist/node-runtime/{chunk-TDL7UWJ7.js → chunk-DE2JB6J5.js} +189 -70
- package/dist/node-runtime/{chunk-YJMMG7C6.js → chunk-DSIKTUPW.js} +1 -1
- package/dist/node-runtime/{chunk-IQIEU7SB.js → chunk-F4FLTQKV.js} +2 -2
- package/dist/node-runtime/{chunk-GMHJCCEN.js → chunk-FU6OODRZ.js} +4 -1
- package/dist/node-runtime/{chunk-5BNJ4JUH.js → chunk-GJ2RDBRL.js} +1 -1
- package/dist/node-runtime/{chunk-GNN7H3B7.js → chunk-GS42T6MX.js} +1 -1
- package/dist/node-runtime/{chunk-OFKSVRV7.js → chunk-GYIXXQAO.js} +1 -1
- package/dist/node-runtime/{chunk-BX2RB477.js → chunk-HFVZUPFJ.js} +1 -1
- package/dist/node-runtime/{chunk-PC2Z5TKZ.js → chunk-HMBGROQK.js} +3 -3
- package/dist/node-runtime/{chunk-AZJHNQKQ.js → chunk-I54LGHWM.js} +1 -1
- package/dist/node-runtime/{chunk-IVXYUAJE.js → chunk-IF24A3FH.js} +1 -1
- package/dist/node-runtime/{chunk-VJPTNWAP.js → chunk-IGV54Q5V.js} +3 -3
- package/dist/node-runtime/{chunk-QDGKKKUM.js → chunk-K5AGHH57.js} +18 -13
- package/dist/node-runtime/{chunk-GS66LV4M.js → chunk-KJ6DWS3K.js} +4 -4
- package/dist/node-runtime/{chunk-EQ63ANHL.js → chunk-L3LX4SNR.js} +310 -192
- package/dist/node-runtime/{chunk-VSELYKWU.js → chunk-LWYIVUGV.js} +2 -1
- package/dist/node-runtime/{chunk-JHYKXIMM.js → chunk-MPKSOJBT.js} +1 -1
- package/dist/node-runtime/{chunk-UAFLNHSH.js → chunk-OF7PWMG4.js} +8 -8
- package/dist/node-runtime/{chunk-CSUZVNYE.js → chunk-OVX6X377.js} +10 -6
- package/dist/node-runtime/{chunk-ORH324EP.js → chunk-PCEW76PM.js} +3 -3
- package/dist/node-runtime/{chunk-6427XAWG.js → chunk-QH6YL7VK.js} +3 -3
- package/dist/node-runtime/{chunk-LMBNLFXQ.js → chunk-QM43FEAE.js} +15 -15
- package/dist/node-runtime/{chunk-7QWNYZDI.js → chunk-RDDAZOMU.js} +16 -0
- package/dist/node-runtime/{chunk-WADV2VDS.js → chunk-RORY2HMJ.js} +46 -5
- package/dist/node-runtime/{chunk-H3XF4UVQ.js → chunk-RWTKOC3B.js} +1 -1
- package/dist/node-runtime/{chunk-V2A7CEXK.js → chunk-WHLRAGUQ.js} +13 -12
- package/dist/node-runtime/{chunk-GJSAD4AB.js → chunk-Y73WPE6S.js} +17 -17
- package/dist/node-runtime/{chunk-VSSXXL36.js → chunk-YDO2F2IA.js} +2 -2
- package/dist/node-runtime/{chunk-BFNXONG3.js → chunk-YVI6L6LU.js} +5 -5
- package/dist/node-runtime/{chunk-5D7LC2ZQ.js → chunk-ZXSGTGJ6.js} +54 -85
- package/dist/node-runtime/cli-runtime.js +1 -1
- package/dist/node-runtime/{command-3JHHXOPX.js → command-7BG7VVTS.js} +3 -3
- package/dist/node-runtime/{commands-KAMO2T6P.js → commands-NZLSOHPE.js} +2 -2
- package/dist/node-runtime/{commands-2JVNFGMQ.js → commands-QFDKNQTL.js} +9 -9
- package/dist/node-runtime/{direct-tool-executor-YAVOLDFY.js → direct-tool-executor-77GW4F5P.js} +3 -3
- package/dist/node-runtime/{export-html-KBFVV63J.js → export-html-VM4J2MNR.js} +2 -2
- package/dist/node-runtime/{extension-input-K24TVKVW.js → extension-input-E7BJZ35H.js} +4 -4
- package/dist/node-runtime/{extension-selector-SPNF7EDR.js → extension-selector-WU42XDTU.js} +4 -4
- package/dist/node-runtime/{gateway-VFO6SFKK.js → gateway-TWR3N65G.js} +14 -14
- package/dist/node-runtime/index.js +26 -27
- package/dist/node-runtime/{init-X2LIUB2H.js → init-HS6NQXSK.js} +2 -2
- package/dist/node-runtime/{install-cli-C3CF7O7N.js → install-cli-VAP6KBFN.js} +1 -1
- package/dist/node-runtime/{interactive-mode-LOM6AIF6.js → interactive-mode-6J5VZ2TT.js} +19 -20
- package/dist/node-runtime/{interactive-view-IDSCPPK7.js → interactive-view-NGFAMHPW.js} +7 -7
- package/dist/node-runtime/lunr-browser-J5ZZYVGM.js +174 -0
- package/dist/node-runtime/{lunr-cron-BKHGNBKT.js → lunr-cron-CXOL37AL.js} +7 -7
- package/dist/node-runtime/main.js +22 -23
- package/dist/node-runtime/{mobile-commands-HMP25WBC.js → mobile-commands-VTBM5DSZ.js} +6 -6
- package/dist/node-runtime/{model-runtime-PLQKAG4B.js → model-runtime-OO5HFLWE.js} +1 -1
- package/dist/node-runtime/{package-manager-cli-VCK4E2RC.js → package-manager-cli-ZLW5DZXF.js} +9 -10
- package/dist/node-runtime/{pi-intercom-HBPK5HSJ.js → pi-intercom-QM53RLTS.js} +2 -0
- package/dist/node-runtime/{pi-mcp-adapter-E6WULBKF.js → pi-mcp-adapter-5UKBZP44.js} +7 -6
- package/dist/node-runtime/{pi-subagents-FEUDLJOE.js → pi-subagents-XPCLLKIM.js} +65 -21
- package/dist/node-runtime/{proxy-modes-OSQCWRBI.js → proxy-modes-LGEUYD7R.js} +3 -3
- package/dist/node-runtime/rpc-entry.js +22 -23
- package/dist/node-runtime/{rpc-mode-P5ODXPEG.js → rpc-mode-O3XV4SID.js} +2 -2
- package/dist/node-runtime/{runtime-bridges-3XUQ46XW.js → runtime-bridges-QYXUX2TG.js} +8 -1
- package/dist/node-runtime/{session-handoff-HC7R5E24.js → session-handoff-GWARVEWT.js} +2 -2
- package/dist/node-runtime/{session-manager-CFN4UFM2.js → session-manager-JB5J6XBN.js} +1 -1
- package/dist/node-runtime/{session-selector-LHRMJOKT.js → session-selector-GIM4DHQ2.js} +4 -4
- package/dist/node-runtime/{settings-manager-UUZ6NUXI.js → settings-manager-WCQDUVQB.js} +7 -4
- package/dist/node-runtime/{setup-NRXVZBLJ.js → setup-YRBKH2LD.js} +2 -2
- package/dist/node-runtime/{subagent-executor-MLUMBWCP.js → subagent-executor-OTNISDQU.js} +47 -10
- package/dist/node-runtime/{theme-U7IGOA7O.js → theme-UOO5RVFN.js} +1 -1
- package/dist/node-runtime/{update-cli-4TP25CNW.js → update-cli-VBR2777K.js} +1 -2
- package/dist/startup/interactive-view.d.ts.map +1 -1
- package/dist/startup/interactive-view.js +5 -1
- package/dist/startup/interactive-view.js.map +1 -1
- package/docs/browser.md +1 -1
- package/docs/features.md +17 -14
- package/docs/index.md +1 -1
- package/docs/keybindings.md +1 -1
- package/docs/providers.md +6 -2
- package/docs/quickstart.md +2 -2
- package/docs/settings.md +2 -1
- package/docs/usage.md +6 -6
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/plan-mode/README.md +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
- package/dist/node-runtime/chunk-LISUTZS3.js +0 -19
- package/dist/node-runtime/lunr-browser-YNW7FTYX.js +0 -87
|
@@ -2,7 +2,7 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
|
|
|
2
2
|
import {
|
|
3
3
|
lightBuiltinExtensions,
|
|
4
4
|
loadAllBuiltinExtensions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QM43FEAE.js";
|
|
6
6
|
import {
|
|
7
7
|
createProjectTrustContext,
|
|
8
8
|
createStartupTui,
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
showFirstTimeSetup,
|
|
12
12
|
showStartupSelector,
|
|
13
13
|
startStartupTui
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-OF7PWMG4.js";
|
|
15
15
|
import {
|
|
16
16
|
applyInheritedSubagentPermissions
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-OVX6X377.js";
|
|
18
18
|
import {
|
|
19
19
|
MissingSessionCwdError,
|
|
20
20
|
createAgentSessionFromServices,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
formatMissingSessionCwdPrompt,
|
|
24
24
|
formatNoModelsAvailableMessage,
|
|
25
25
|
getMissingSessionCwdIssue
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DE2JB6J5.js";
|
|
27
27
|
import {
|
|
28
28
|
restoreStdout,
|
|
29
29
|
takeOverStdout
|
|
@@ -31,18 +31,18 @@ import {
|
|
|
31
31
|
import {
|
|
32
32
|
detectSupportedImageMimeTypeFromFile,
|
|
33
33
|
resolveReadPath
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-YDO2F2IA.js";
|
|
35
35
|
import {
|
|
36
36
|
processImage
|
|
37
37
|
} from "./chunk-AD6VXAO7.js";
|
|
38
|
+
import {
|
|
39
|
+
bindRuntimeBridges
|
|
40
|
+
} from "./chunk-FU6OODRZ.js";
|
|
38
41
|
import {
|
|
39
42
|
SettingsManager,
|
|
40
43
|
applyHttpProxySettings,
|
|
41
44
|
configureHttpDispatcher
|
|
42
|
-
} from "./chunk-
|
|
43
|
-
import {
|
|
44
|
-
bindRuntimeBridges
|
|
45
|
-
} from "./chunk-GMHJCCEN.js";
|
|
45
|
+
} from "./chunk-RORY2HMJ.js";
|
|
46
46
|
import {
|
|
47
47
|
ProjectTrustStore,
|
|
48
48
|
hasTrustRequiringProjectResources
|
|
@@ -50,14 +50,14 @@ import {
|
|
|
50
50
|
import {
|
|
51
51
|
resolveCliModel,
|
|
52
52
|
resolveModelScope
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-GYIXXQAO.js";
|
|
54
54
|
import {
|
|
55
55
|
migrateLegacyGlobalInstructions
|
|
56
56
|
} from "./chunk-M3LZLQW2.js";
|
|
57
57
|
import {
|
|
58
58
|
SessionManager,
|
|
59
59
|
assertValidSessionId
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-2KIPT4HJ.js";
|
|
61
61
|
import {
|
|
62
62
|
registerCustomizeBridge
|
|
63
63
|
} from "./chunk-4EULYYR4.js";
|
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
} from "./chunk-2TKODGBZ.js";
|
|
70
70
|
import {
|
|
71
71
|
SessionSelectorComponent
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-PCEW76PM.js";
|
|
73
73
|
import {
|
|
74
74
|
SessionOwnership
|
|
75
75
|
} from "./chunk-UAEOTO52.js";
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
import {
|
|
93
93
|
initTheme,
|
|
94
94
|
stopThemeWatcher
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-RDDAZOMU.js";
|
|
96
96
|
import {
|
|
97
97
|
APP_NAME,
|
|
98
98
|
CONFIG_DIR_NAME,
|
|
@@ -730,17 +730,17 @@ async function main(args, options) {
|
|
|
730
730
|
resetTimings(), (args.includes("--offline") || isTruthyEnvFlag(process.env.PI_OFFLINE)) && (process.env.PI_OFFLINE = "1");
|
|
731
731
|
let cwd = process.cwd(), agentDir = getAgentDir(), bootstrapSettingsManager = SettingsManager.create(cwd, agentDir, { projectTrusted: !1 });
|
|
732
732
|
if (applyHttpProxySettings(bootstrapSettingsManager.getGlobalSettings().httpProxy), configureHttpDispatcher(), ["setup", "features", "uninstall", "browser"].includes(args[0])) {
|
|
733
|
-
let { handleInstallCli } = await import("./install-cli-
|
|
733
|
+
let { handleInstallCli } = await import("./install-cli-VAP6KBFN.js");
|
|
734
734
|
if (await handleInstallCli(args))
|
|
735
735
|
return;
|
|
736
736
|
}
|
|
737
737
|
if (args[0] === "update") {
|
|
738
|
-
let { handleUpdateCli } = await import("./update-cli-
|
|
738
|
+
let { handleUpdateCli } = await import("./update-cli-VBR2777K.js");
|
|
739
739
|
if (await handleUpdateCli(args))
|
|
740
740
|
return;
|
|
741
741
|
}
|
|
742
742
|
if (["install", "remove", "uninstall", "list", "config"].includes(args[0])) {
|
|
743
|
-
let { handleConfigCommand, handlePackageCommand } = await import("./package-manager-cli-
|
|
743
|
+
let { handleConfigCommand, handlePackageCommand } = await import("./package-manager-cli-ZLW5DZXF.js");
|
|
744
744
|
if (await handlePackageCommand(args, { extensionFactories: options?.extensionFactories })) {
|
|
745
745
|
process.exit(process.exitCode ?? 0);
|
|
746
746
|
return;
|
|
@@ -749,7 +749,7 @@ async function main(args, options) {
|
|
|
749
749
|
return;
|
|
750
750
|
}
|
|
751
751
|
if (args[0] === "gateway") {
|
|
752
|
-
let { handleGatewayCommand } = await import("./command-
|
|
752
|
+
let { handleGatewayCommand } = await import("./command-7BG7VVTS.js");
|
|
753
753
|
if (await handleGatewayCommand(args))
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
@@ -764,7 +764,7 @@ async function main(args, options) {
|
|
|
764
764
|
if (time("parseArgs"), parsed.version && (console.log(VERSION), process.exit(0)), parsed.export) {
|
|
765
765
|
let result;
|
|
766
766
|
try {
|
|
767
|
-
let { exportFromFile } = await import("./export-html-
|
|
767
|
+
let { exportFromFile } = await import("./export-html-VM4J2MNR.js"), outputPath = parsed.messages.length > 0 ? parsed.messages[0] : void 0;
|
|
768
768
|
result = await exportFromFile(parsed.export, outputPath);
|
|
769
769
|
} catch (error) {
|
|
770
770
|
let message = error instanceof Error ? error.message : "Failed to export session";
|
|
@@ -772,7 +772,7 @@ async function main(args, options) {
|
|
|
772
772
|
}
|
|
773
773
|
console.log(`Exported to: ${result}`), process.exit(0);
|
|
774
774
|
}
|
|
775
|
-
let appMode = resolveAppMode(parsed, process.stdin.isTTY, process.stdout.isTTY), interactiveModeImport = appMode === "interactive" ? import("./interactive-mode-
|
|
775
|
+
let appMode = resolveAppMode(parsed, process.stdin.isTTY, process.stdout.isTTY), interactiveModeImport = appMode === "interactive" ? import("./interactive-mode-6J5VZ2TT.js") : void 0, startupView = appMode === "interactive" ? options?.startupView : void 0;
|
|
776
776
|
options?.startupView && !startupView && options.startupView.stop(), applyInheritedSubagentPermissions(), appMode !== "interactive" && !isPlainRuntimeMetadataCommand(parsed) && takeOverStdout(), parsed.mode === "rpc" && parsed.fileArgs.length > 0 && (console.error(chalk4.red("Error: @file arguments are not supported in RPC mode")), process.exit(1)), validateForkFlags(parsed), validateSessionIdFlags(parsed);
|
|
777
777
|
let { migratedAuthProviders: migratedProviders, deprecationWarnings } = runMigrations(cwd);
|
|
778
778
|
time("runMigrations");
|
|
@@ -929,12 +929,12 @@ ${EXTENSION_LOAD_FAILURE_HINT}` : "";
|
|
|
929
929
|
extensionHint && console.error(chalk4.yellow(EXTENSION_LOAD_FAILURE_HINT)), process.exit(1);
|
|
930
930
|
}
|
|
931
931
|
if (time("createAgentSession"), appMode !== "interactive" && !session.model && (console.error(chalk4.red(formatNoModelsAvailableMessage())), process.exit(1)), startupBenchmark && appMode !== "interactive" && (console.error(chalk4.red("Error: PI_STARTUP_BENCHMARK only supports interactive mode")), process.exit(1)), appMode === "rpc") {
|
|
932
|
-
let { runRpcMode } = await import("./rpc-mode-
|
|
932
|
+
let { runRpcMode } = await import("./rpc-mode-O3XV4SID.js");
|
|
933
933
|
printTimings(), await runRpcMode(runtime);
|
|
934
934
|
} else if (appMode === "interactive") {
|
|
935
935
|
let [{ InteractiveMode }, { loadDeferredBuiltinExtensions }] = await Promise.all([
|
|
936
936
|
interactiveModeImport,
|
|
937
|
-
import("./builtin-extensions-
|
|
937
|
+
import("./builtin-extensions-EBAWTH4M.js")
|
|
938
938
|
]), interactiveMode = new InteractiveMode(runtime, {
|
|
939
939
|
migratedProviders,
|
|
940
940
|
modelFallbackMessage,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
theme
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-RDDAZOMU.js";
|
|
5
5
|
|
|
6
6
|
// packages/coding-agent/dist/modes/interactive/components/dynamic-border.js
|
|
7
7
|
var DynamicBorder = class {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
estimateTokens
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GYIXXQAO.js";
|
|
5
5
|
|
|
6
6
|
// packages/coding-agent/dist/core/context-breakdown.js
|
|
7
7
|
var CHARS_PER_TOKEN = 4, PROJECT_CONTEXT_RE = /<project_context>[\s\S]*?<\/project_context>/, PROJECT_INSTRUCTIONS_RE = /<project_instructions(?:\s+path="([^"]*)")?>([\s\S]*?)<\/project_instructions>/g, SKILLS_BLOCK_RE = /\n\nThe following skills provide specialized instructions for specific tasks\.[\s\S]*<\/available_skills>/;
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
createSyntheticSourceInfo,
|
|
8
8
|
expandPromptTemplate,
|
|
9
9
|
formatSkillsForPrompt
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-F4FLTQKV.js";
|
|
11
11
|
import {
|
|
12
12
|
stripFrontmatter
|
|
13
13
|
} from "./chunk-QFWG2RVL.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
createLocalBashOperations,
|
|
17
17
|
createToolDefinitionFromAgentTool,
|
|
18
18
|
wrapToolDefinition
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-YDO2F2IA.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_MAX_BYTES,
|
|
22
22
|
truncateTail
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
ModelRuntime,
|
|
29
29
|
isAuthInvalidError,
|
|
30
30
|
isUsageLimitError
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-KJ6DWS3K.js";
|
|
32
32
|
import {
|
|
33
33
|
SettingsManager
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-RORY2HMJ.js";
|
|
35
35
|
import {
|
|
36
36
|
DEFAULT_THINKING_LEVEL,
|
|
37
37
|
calculateContextTokens,
|
|
@@ -43,17 +43,17 @@ import {
|
|
|
43
43
|
generateBranchSummary,
|
|
44
44
|
prepareCompaction,
|
|
45
45
|
shouldCompact
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-GYIXXQAO.js";
|
|
47
47
|
import {
|
|
48
48
|
ExtensionRunner,
|
|
49
49
|
emitSessionShutdownEvent
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-GJ2RDBRL.js";
|
|
51
51
|
import {
|
|
52
52
|
getSubagentCancellation
|
|
53
53
|
} from "./chunk-BBUVIEZB.js";
|
|
54
54
|
import {
|
|
55
55
|
gateToolCall
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-ZXSGTGJ6.js";
|
|
57
57
|
import {
|
|
58
58
|
isUserInstructionsPath,
|
|
59
59
|
loadSelectedUserInstructions
|
|
@@ -66,13 +66,13 @@ import {
|
|
|
66
66
|
} from "./chunk-CSFI6YXL.js";
|
|
67
67
|
import {
|
|
68
68
|
SessionTransferError
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-I54LGHWM.js";
|
|
70
70
|
import {
|
|
71
71
|
CURRENT_SESSION_VERSION,
|
|
72
72
|
SessionManager,
|
|
73
73
|
getDefaultSessionDir,
|
|
74
74
|
getLatestCompactionEntry
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-2KIPT4HJ.js";
|
|
76
76
|
import {
|
|
77
77
|
convertToLlm
|
|
78
78
|
} from "./chunk-FVDOXRUD.js";
|
|
@@ -90,7 +90,7 @@ import {
|
|
|
90
90
|
import {
|
|
91
91
|
getThemeByName,
|
|
92
92
|
theme
|
|
93
|
-
} from "./chunk-
|
|
93
|
+
} from "./chunk-RDDAZOMU.js";
|
|
94
94
|
import {
|
|
95
95
|
CONFIG_DIR_NAME,
|
|
96
96
|
getAgentDir,
|
|
@@ -649,9 +649,25 @@ function snapFileName(absPath) {
|
|
|
649
649
|
return `${createHash("sha1").update(absPath).digest("hex")}.snap`;
|
|
650
650
|
}
|
|
651
651
|
|
|
652
|
+
// packages/coding-agent/dist/core/subagent-wait-interruption.js
|
|
653
|
+
var SUBAGENT_WAIT_INTERRUPTION_SYMBOL = /* @__PURE__ */ Symbol.for("@lunr/subagent-wait-interruption");
|
|
654
|
+
function getBridge() {
|
|
655
|
+
let globals = globalThis, existing = globals[SUBAGENT_WAIT_INTERRUPTION_SYMBOL];
|
|
656
|
+
if (existing)
|
|
657
|
+
return existing;
|
|
658
|
+
let bridge = { owners: /* @__PURE__ */ new Map() };
|
|
659
|
+
return globals[SUBAGENT_WAIT_INTERRUPTION_SYMBOL] = bridge, bridge;
|
|
660
|
+
}
|
|
661
|
+
function registerSubagentWaitInterruptionOwner(sessionId, owner) {
|
|
662
|
+
let owners = getBridge().owners;
|
|
663
|
+
return owners.set(sessionId, owner), () => {
|
|
664
|
+
owners.get(sessionId) === owner && owners.delete(sessionId);
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
|
|
652
668
|
// packages/coding-agent/dist/core/system-prompt.js
|
|
653
669
|
function buildSystemPrompt(options) {
|
|
654
|
-
let { customPrompt, modelSlug, selectedTools, appendSystemPrompt, cwd, contextFiles: providedContextFiles, skills: providedSkills } = options, promptCwd = cwd.replace(/\\/g, "/"), appendSection = appendSystemPrompt ? `
|
|
670
|
+
let { customPrompt, modelSlug, automaticSubagentDelegation = !0, selectedTools, appendSystemPrompt, cwd, contextFiles: providedContextFiles, skills: providedSkills } = options, promptCwd = cwd.replace(/\\/g, "/"), appendSection = appendSystemPrompt ? `
|
|
655
671
|
|
|
656
672
|
${appendSystemPrompt}` : "", contextFiles = providedContextFiles ?? [], skills = providedSkills ?? [];
|
|
657
673
|
if (customPrompt) {
|
|
@@ -684,11 +700,11 @@ Behavior guidelines:
|
|
|
684
700
|
- Default to writing no comments. Only add one if the why is non-obvious: a hidden constraint, a subtle invariant, a workaround for a specific bug, something that would surprise the reader. If removing the comment wouldn't confuse a future reader, don't write it.
|
|
685
701
|
- Keep comments up to date! When making changes, it's important to keep things in sync. An outdated comment is worse than no comment at all.
|
|
686
702
|
- Carefully consider the reversibility and blast radius of actions. Generally you can freely take local, reversible actions like editing files or running tests. But for actions that are hard to reverse, affect shared systems beyond your local environment, or could otherwise be risky or destructive, check with the user before proceeding.
|
|
687
|
-
- Orchestrate subagents with intent! Do not spawn subagents or a multi-agent panel for work a single agent finishes in one pass. Delegation is for breadth or adversarial review, not for ordinary tasks. Use subagents as a tool when there is genuine benefit to it or the user explicitly asks for it.
|
|
703
|
+
${automaticSubagentDelegation ? "- Orchestrate subagents with intent! Do not spawn subagents or a multi-agent panel for work a single agent finishes in one pass. Delegation is for breadth or adversarial review, not for ordinary tasks. Use subagents as a tool when there is genuine benefit to it or the user explicitly asks for it." : "- Work on tasks directly. Launch subagents only when the user specifically instructs you to delegate work."}
|
|
688
704
|
- When several agents work in parallel, state file ownership up front so they do not collide.
|
|
689
705
|
- Tests are good! Endless smoke tests, regressions tests for feature deletions, etc, much less good. Tests should be focused, not slop.
|
|
690
706
|
- Prefer editing existing files to creating new ones.
|
|
691
|
-
- When a reusable excerpt, prompt, or code fragment should
|
|
707
|
+
- When a reusable excerpt, prompt, or code fragment should be click-to-copy, wrap only that payload in a fenced Markdown block with the info string \`lunr-copy\`. Keep explanation outside the block. Use a longer backtick or tilde fence when the payload contains fenced code.
|
|
692
708
|
- Only use emojis if the user explicitly requests it.
|
|
693
709
|
- Never exfil private data on public platforms like github or any other services under any circumstances.
|
|
694
710
|
|
|
@@ -701,9 +717,11 @@ Guidelines:
|
|
|
701
717
|
- Each edits[].oldText is matched against the original file, not after earlier edits are applied. Do not emit overlapping or nested edits. Merge nearby changes into one edit.
|
|
702
718
|
- Keep edits[].oldText as small as possible while still being unique in the file. Do not pad with large unchanged regions.
|
|
703
719
|
- Use write only for new files or complete rewrites.
|
|
704
|
-
${todoGuideline}
|
|
720
|
+
${todoGuideline}${automaticSubagentDelegation ? `- Use subagents for independent parallel work, specialist analysis, or substantial research. Subagents start with fresh sessions. Use intercom instead to coordinate with an existing lunR session.
|
|
721
|
+
` : ""}- Resume a subagent only when its work is unfinished or the next task genuinely needs the context it built up. Otherwise launch a new subagent.
|
|
705
722
|
- Use ast_search for structural code matches.
|
|
706
723
|
- Use cron only when the user asks to schedule or manage unattended prompts.
|
|
724
|
+
- For gateway work, inspect with \`lunr gateway status\` or \`lunr gateway doctor\`, configure with \`lunr gateway setup\`, and run \`lunr gateway start\` or \`lunr gateway stop\` only with user approval. Test by asking the user to send \`/whoami\` or a normal message to the bot; there is no arbitrary outbound send command. Keep bot tokens out of commands and output. See ${docsPath}/features.md for pairing, logs, and service details.
|
|
707
725
|
- Memory stores established, durable facts and stable preferences. Do not store behavior instructions, transient task details, transcripts, guesses, or secrets. Change memory only with the memory tools.
|
|
708
726
|
- ~/.lunr/agent/agents/ contains optional global and per-model AGENTS.md instructions written by the user. Never modify this tree, including through shell commands.
|
|
709
727
|
- Use web search when information is current, uncertain, externally referenced, or research-heavy, and cite the sources used.
|
|
@@ -765,6 +783,11 @@ var THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"
|
|
|
765
783
|
_isAgentRunActive = !1;
|
|
766
784
|
_idleWaitPromise;
|
|
767
785
|
_resolveIdleWait;
|
|
786
|
+
_activePromptRun;
|
|
787
|
+
_waitPromptHandoff;
|
|
788
|
+
_waitPromptAcceptance = Promise.resolve();
|
|
789
|
+
_waitPromptGeneration = 0;
|
|
790
|
+
_unregisterSubagentWaitInterruptionOwners = [];
|
|
768
791
|
/** Tracks pending steering messages for UI display. Removed when delivered. */
|
|
769
792
|
_steeringMessages = [];
|
|
770
793
|
/** Tracks pending follow-up messages for UI display. Removed when delivered. */
|
|
@@ -815,12 +838,16 @@ var THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"
|
|
|
815
838
|
_baseSystemPrompt = "";
|
|
816
839
|
_baseSystemPromptOptions;
|
|
817
840
|
_systemPromptOverride;
|
|
818
|
-
// lunr: core-owned system-prompt append (
|
|
841
|
+
// lunr: core-owned system-prompt append (read-only mode addendum) applied on top of base/override
|
|
819
842
|
_systemPromptAppend;
|
|
820
|
-
// lunr: core-owned tool-call gates (
|
|
843
|
+
// lunr: core-owned tool-call gates (read-only mode) checked before extension tool_call handlers
|
|
821
844
|
_toolCallGates = [];
|
|
822
845
|
constructor(config) {
|
|
823
|
-
this.agent = config.agent, this.sessionManager = config.sessionManager, this.settingsManager = config.settingsManager, this._scopedModels = config.scopedModels ?? [], this._resourceLoader = config.resourceLoader, this._customTools = config.customTools ?? [], this._cwd = config.cwd, this._agentDir = config.agentDir ?? getAgentDir(), this._modelRuntime = config.modelRuntime, this._syncOpenAIServiceTier(), this._extensionRunnerRef = config.extensionRunnerRef, this._initialActiveToolNames = config.initialActiveToolNames, this._allowedToolNames = config.allowedToolNames ? new Set(config.allowedToolNames) : void 0, this._excludedToolNames = config.excludedToolNames ? new Set(config.excludedToolNames) : void 0, this._baseToolsOverride = config.baseToolsOverride, this._sessionStartEvent = config.sessionStartEvent ?? { type: "session_start", reason: "startup" }
|
|
846
|
+
this.agent = config.agent, this.sessionManager = config.sessionManager, this.settingsManager = config.settingsManager, this._scopedModels = config.scopedModels ?? [], this._resourceLoader = config.resourceLoader, this._customTools = config.customTools ?? [], this._cwd = config.cwd, this._agentDir = config.agentDir ?? getAgentDir(), this._modelRuntime = config.modelRuntime, this._syncOpenAIServiceTier(), this._extensionRunnerRef = config.extensionRunnerRef, this._initialActiveToolNames = config.initialActiveToolNames, this._allowedToolNames = config.allowedToolNames ? new Set(config.allowedToolNames) : void 0, this._excludedToolNames = config.excludedToolNames ? new Set(config.excludedToolNames) : void 0, this._baseToolsOverride = config.baseToolsOverride, this._sessionStartEvent = config.sessionStartEvent ?? { type: "session_start", reason: "startup" };
|
|
847
|
+
let waitInterruptionOwner = { register: () => this._registerSubagentWaitInterruption() };
|
|
848
|
+
for (let identity of new Set([this.sessionId, this.sessionFile].filter((value) => !!value)))
|
|
849
|
+
this._unregisterSubagentWaitInterruptionOwners.push(registerSubagentWaitInterruptionOwner(identity, waitInterruptionOwner));
|
|
850
|
+
this._unsubscribeAgent = this.agent.subscribe(this._handleAgentEvent), this._installAgentToolHooks(), this._installAgentNextTurnRefresh(), this._buildRuntime({
|
|
824
851
|
activeToolNames: this._initialActiveToolNames,
|
|
825
852
|
includeAllExtensionTools: !0
|
|
826
853
|
});
|
|
@@ -1152,13 +1179,16 @@ var THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"
|
|
|
1152
1179
|
*/
|
|
1153
1180
|
transferring = !1;
|
|
1154
1181
|
setTransferring(value) {
|
|
1155
|
-
this.transferring = value;
|
|
1182
|
+
this.transferring = value, value && this._invalidateWaitPromptHandoffs("Session transfer interrupted the pending prompt.");
|
|
1156
1183
|
}
|
|
1157
1184
|
assertCanStartWork() {
|
|
1158
1185
|
if (this.sessionManager.assertWritable(), this.transferring)
|
|
1159
1186
|
throw new Error("Session transfer is in progress. Wait or reclaim the session.");
|
|
1160
1187
|
}
|
|
1161
1188
|
dispose() {
|
|
1189
|
+
this._invalidateWaitPromptHandoffs("Session closed before the pending prompt could run.");
|
|
1190
|
+
for (let unregister of this._unregisterSubagentWaitInterruptionOwners.splice(0))
|
|
1191
|
+
unregister();
|
|
1162
1192
|
try {
|
|
1163
1193
|
this.abortRetry(), this.abortCompaction(), this.abortBranchSummary(), this.abortBash(), this.agent.abort();
|
|
1164
1194
|
} catch {
|
|
@@ -1188,12 +1218,16 @@ var THINKING_LEVELS = ["off", "minimal", "low", "medium", "high", "xhigh", "max"
|
|
|
1188
1218
|
get isIdle() {
|
|
1189
1219
|
return !this._isAgentRunActive;
|
|
1190
1220
|
}
|
|
1221
|
+
/** Whether normal Enter is still being reserved for an interrupted wait handoff. */
|
|
1222
|
+
get isWaitPromptHandoffActive() {
|
|
1223
|
+
return this._waitPromptHandoff?.accepting === !0;
|
|
1224
|
+
}
|
|
1191
1225
|
/** Current effective system prompt (includes any per-turn extension modifications) */
|
|
1192
1226
|
get systemPrompt() {
|
|
1193
1227
|
return this.agent.state.systemPrompt;
|
|
1194
1228
|
}
|
|
1195
1229
|
/**
|
|
1196
|
-
* lunr: register a core-owned tool-call gate (
|
|
1230
|
+
* lunr: register a core-owned tool-call gate (read-only mode). Gates run before extension
|
|
1197
1231
|
* tool_call handlers and even when no extension handles tool_call. Returns an
|
|
1198
1232
|
* unsubscribe function.
|
|
1199
1233
|
*/
|
|
@@ -1337,6 +1371,7 @@ ${this._systemPromptAppend}` : prompt;
|
|
|
1337
1371
|
return this._baseSystemPromptOptions = {
|
|
1338
1372
|
cwd: this._cwd,
|
|
1339
1373
|
modelSlug: this.model ? `${this.model.provider}/${this.model.id}` : void 0,
|
|
1374
|
+
automaticSubagentDelegation: this.settingsManager.getAutomaticSubagentDelegation(),
|
|
1340
1375
|
skills: loadedSkills,
|
|
1341
1376
|
contextFiles,
|
|
1342
1377
|
customPrompt: loaderSystemPrompt,
|
|
@@ -1352,23 +1387,47 @@ ${this._systemPromptAppend}` : prompt;
|
|
|
1352
1387
|
// =========================================================================
|
|
1353
1388
|
// Prompting
|
|
1354
1389
|
// =========================================================================
|
|
1390
|
+
_registerSubagentWaitInterruption() {
|
|
1391
|
+
let run = this._activePromptRun, ownerSignal = this.agent.signal, wait = run && ownerSignal ? { controller: new AbortController(), interrupted: !1, ownerSignal } : void 0;
|
|
1392
|
+
return run && wait && (run.waits.add(wait), run.gracefulStopRequested && (wait.interrupted = !0, wait.controller.abort())), {
|
|
1393
|
+
signal: wait?.controller.signal ?? new AbortController().signal,
|
|
1394
|
+
wasInterrupted: () => wait?.interrupted === !0,
|
|
1395
|
+
unregister: () => {
|
|
1396
|
+
wait && run?.waits.delete(wait);
|
|
1397
|
+
}
|
|
1398
|
+
};
|
|
1399
|
+
}
|
|
1400
|
+
_interruptSubagentWaits(run, ownerSignal) {
|
|
1401
|
+
for (let wait of run.waits)
|
|
1402
|
+
wait.ownerSignal === ownerSignal && (wait.interrupted = !0, wait.controller.abort());
|
|
1403
|
+
}
|
|
1404
|
+
_invalidateWaitPromptHandoffs(message) {
|
|
1405
|
+
this._waitPromptGeneration++;
|
|
1406
|
+
let handoff = this._waitPromptHandoff;
|
|
1407
|
+
if (this._waitPromptHandoff = void 0, !handoff)
|
|
1408
|
+
return;
|
|
1409
|
+
let error = new Error(message);
|
|
1410
|
+
for (let reservation of handoff.reservations.splice(0))
|
|
1411
|
+
reservation.reject(error);
|
|
1412
|
+
}
|
|
1355
1413
|
async _runAgentPrompt(messages) {
|
|
1356
|
-
|
|
1414
|
+
let run = { waits: /* @__PURE__ */ new Set(), gracefulStopRequested: !1 };
|
|
1415
|
+
this._activePromptRun = run, this._isAgentRunActive = !0;
|
|
1357
1416
|
try {
|
|
1358
|
-
for (await this.agent.prompt(messages); await this._handlePostAgentRun(); )
|
|
1417
|
+
for (await this.agent.prompt(messages); await this._handlePostAgentRun(run); )
|
|
1359
1418
|
await this.agent.continue();
|
|
1360
1419
|
} finally {
|
|
1361
|
-
this._systemPromptOverride = void 0, this._flushPendingBashMessages(), await this._emitAgentSettled();
|
|
1420
|
+
this._activePromptRun === run && (this._activePromptRun = void 0), this._systemPromptOverride = void 0, this._flushPendingBashMessages(), await this._emitAgentSettled();
|
|
1362
1421
|
}
|
|
1363
1422
|
}
|
|
1364
|
-
async _handlePostAgentRun() {
|
|
1423
|
+
async _handlePostAgentRun(run) {
|
|
1365
1424
|
let msg = this._lastAssistantMessage;
|
|
1366
|
-
return this._lastAssistantMessage = void 0, msg ? msg.stopReason === "error" && this._isRotationError(msg) && await this._tryRotateSubscriptionKey(msg) || this._isRetryableError(msg) && await this._prepareRetry(msg) || msg.stopReason === "error" && this._isRetryableError(msg) && await this._tryRotateSubscriptionKey(msg) || (msg.stopReason === "error" && this._retryAttempt > 0 && (this._emit({
|
|
1425
|
+
return this._lastAssistantMessage = void 0, !msg || run.gracefulStopRequested ? !1 : msg.stopReason === "error" && this._isRotationError(msg) && await this._tryRotateSubscriptionKey(msg) || this._isRetryableError(msg) && await this._prepareRetry(msg) || msg.stopReason === "error" && this._isRetryableError(msg) && await this._tryRotateSubscriptionKey(msg) || (msg.stopReason === "error" && this._retryAttempt > 0 && (this._emit({
|
|
1367
1426
|
type: "auto_retry_end",
|
|
1368
1427
|
success: !1,
|
|
1369
1428
|
attempt: this._retryAttempt,
|
|
1370
1429
|
finalError: msg.errorMessage
|
|
1371
|
-
}), this._retryAttempt = 0), await this._checkCompaction(msg)) ? !0 : this.agent.hasQueuedMessages()
|
|
1430
|
+
}), this._retryAttempt = 0), await this._checkCompaction(msg)) ? !0 : this.agent.hasQueuedMessages();
|
|
1372
1431
|
}
|
|
1373
1432
|
/**
|
|
1374
1433
|
* Send a prompt to the agent.
|
|
@@ -1381,60 +1440,117 @@ ${this._systemPromptAppend}` : prompt;
|
|
|
1381
1440
|
*/
|
|
1382
1441
|
async prompt(text, options) {
|
|
1383
1442
|
this.assertCanStartWork();
|
|
1384
|
-
let
|
|
1443
|
+
let preflightResult = options?.preflightResult, prepared, messages;
|
|
1385
1444
|
try {
|
|
1386
|
-
if (
|
|
1445
|
+
if (prepared = await this._preparePromptInput(text, options, this.isStreaming ? options?.streamingBehavior : void 0), !prepared) {
|
|
1387
1446
|
preflightResult?.(!0);
|
|
1388
1447
|
return;
|
|
1389
1448
|
}
|
|
1390
|
-
|
|
1391
|
-
if (this._extensionRunner.hasHandlers("input")) {
|
|
1392
|
-
let inputResult = await this._extensionRunner.emitInput(currentText, currentImages, options?.source ?? "interactive", this.isStreaming ? options?.streamingBehavior : void 0);
|
|
1393
|
-
if (inputResult.action === "handled") {
|
|
1394
|
-
preflightResult?.(!0);
|
|
1395
|
-
return;
|
|
1396
|
-
}
|
|
1397
|
-
inputResult.action === "transform" && (currentText = inputResult.text, currentImages = inputResult.images ?? currentImages);
|
|
1398
|
-
}
|
|
1399
|
-
let expandedText = currentText;
|
|
1400
|
-
if (expandPromptTemplates && (expandedText = this._expandSkillCommand(expandedText), expandedText = expandPromptTemplate(expandedText, [...this.promptTemplates])), this.isStreaming) {
|
|
1449
|
+
if (this.isStreaming) {
|
|
1401
1450
|
if (!options?.streamingBehavior)
|
|
1402
1451
|
throw new Error("Agent is already processing. Specify streamingBehavior ('steer' or 'followUp') to queue the message.");
|
|
1403
|
-
options.streamingBehavior === "followUp" ? await this._queueFollowUp(
|
|
1452
|
+
options.streamingBehavior === "followUp" ? await this._queueFollowUp(prepared.text, prepared.images) : await this._queueSteer(prepared.text, prepared.images), preflightResult?.(!0);
|
|
1404
1453
|
return;
|
|
1405
1454
|
}
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1455
|
+
messages = await this._createPromptMessages(prepared);
|
|
1456
|
+
} catch (error) {
|
|
1457
|
+
throw preflightResult?.(!1), error;
|
|
1458
|
+
}
|
|
1459
|
+
preflightResult?.(!0), await this._runAgentPrompt(messages);
|
|
1460
|
+
}
|
|
1461
|
+
async _preparePromptInput(text, options, streamingBehavior) {
|
|
1462
|
+
let expandPromptTemplates = options?.expandPromptTemplates ?? !0;
|
|
1463
|
+
if (expandPromptTemplates && text.startsWith("/") && await this._tryExecuteExtensionCommand(text))
|
|
1464
|
+
return;
|
|
1465
|
+
let currentText = text, currentImages = options?.images;
|
|
1466
|
+
if (this._extensionRunner.hasHandlers("input")) {
|
|
1467
|
+
let inputResult = await this._extensionRunner.emitInput(currentText, currentImages, options?.source ?? "interactive", streamingBehavior);
|
|
1468
|
+
if (inputResult.action === "handled")
|
|
1469
|
+
return;
|
|
1470
|
+
inputResult.action === "transform" && (currentText = inputResult.text, currentImages = inputResult.images ?? currentImages);
|
|
1471
|
+
}
|
|
1472
|
+
return expandPromptTemplates && (currentText = this._expandSkillCommand(currentText), currentText = expandPromptTemplate(currentText, [...this.promptTemplates])), { text: currentText, images: currentImages };
|
|
1473
|
+
}
|
|
1474
|
+
async _createPromptMessages(input) {
|
|
1475
|
+
if (this._flushPendingBashMessages(), !this.model)
|
|
1476
|
+
throw new Error(formatNoModelSelectedMessage());
|
|
1477
|
+
if (!(this._modelRuntime.hasConfiguredAuth(this.model.provider) || await this._modelRuntime.checkAuth(this.model.provider) !== void 0))
|
|
1478
|
+
throw this._modelRuntime.isUsingOAuth(this.model.provider) ? new Error(`Authentication failed for "${this.model.provider}". Credentials may have expired or network is unavailable. Run '/login ${this.model.provider}' to re-authenticate.`) : new Error(formatNoApiKeyFoundMessage(this.model.provider));
|
|
1479
|
+
let lastAssistant = this._findLastAssistantMessage();
|
|
1480
|
+
lastAssistant && await this._checkCompaction(lastAssistant, !1);
|
|
1481
|
+
let userContent = [{ type: "text", text: input.text }];
|
|
1482
|
+
input.images && userContent.push(...input.images);
|
|
1483
|
+
let messages = [
|
|
1484
|
+
{
|
|
1414
1485
|
role: "user",
|
|
1415
1486
|
content: userContent,
|
|
1416
1487
|
timestamp: Date.now()
|
|
1417
|
-
}
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1488
|
+
},
|
|
1489
|
+
...this._pendingNextTurnMessages
|
|
1490
|
+
];
|
|
1491
|
+
this._pendingNextTurnMessages = [];
|
|
1492
|
+
let result = await this._extensionRunner.emitBeforeAgentStart(input.text, input.images, this._baseSystemPrompt, this._baseSystemPromptOptions);
|
|
1493
|
+
if (result?.messages)
|
|
1494
|
+
for (let msg of result.messages)
|
|
1495
|
+
messages.push({
|
|
1496
|
+
role: "custom",
|
|
1497
|
+
customType: msg.customType,
|
|
1498
|
+
content: msg.content ?? [],
|
|
1499
|
+
display: msg.display,
|
|
1500
|
+
details: msg.details,
|
|
1501
|
+
timestamp: Date.now()
|
|
1502
|
+
});
|
|
1503
|
+
return result?.systemPrompt !== void 0 ? (this._systemPromptOverride = result.systemPrompt, this.agent.state.systemPrompt = this._withSystemPromptAppend(result.systemPrompt)) : (this._systemPromptOverride = void 0, this.agent.state.systemPrompt = this._withSystemPromptAppend(this._baseSystemPrompt)), messages;
|
|
1504
|
+
}
|
|
1505
|
+
async interruptSubagentWaitWithPrompt(text, options) {
|
|
1506
|
+
let acceptance = this._waitPromptAcceptance.then(() => this._reserveWaitPrompt(text, options));
|
|
1507
|
+
return this._waitPromptAcceptance = acceptance.then(() => {
|
|
1508
|
+
}, () => {
|
|
1509
|
+
}), acceptance;
|
|
1510
|
+
}
|
|
1511
|
+
async _reserveWaitPrompt(text, options) {
|
|
1512
|
+
this.assertCanStartWork();
|
|
1513
|
+
let activeRun = this._activePromptRun, existing = this._waitPromptHandoff, activeWait = activeRun?.waits.values().next().value, run = existing?.accepting ? existing.run : activeWait ? activeRun : void 0, ownerSignal = existing?.accepting ? existing.ownerSignal : activeWait?.ownerSignal;
|
|
1514
|
+
if (!run || !ownerSignal)
|
|
1515
|
+
return;
|
|
1516
|
+
let handoff = existing?.run === run && existing.accepting ? existing : {
|
|
1517
|
+
run,
|
|
1518
|
+
ownerSignal,
|
|
1519
|
+
generation: this._waitPromptGeneration,
|
|
1520
|
+
reservations: [],
|
|
1521
|
+
draining: !1,
|
|
1522
|
+
accepting: !0
|
|
1523
|
+
};
|
|
1524
|
+
this._waitPromptHandoff = handoff;
|
|
1525
|
+
let prepared;
|
|
1526
|
+
try {
|
|
1527
|
+
prepared = await this._preparePromptInput(text, options, void 0);
|
|
1434
1528
|
} catch (error) {
|
|
1435
|
-
throw
|
|
1529
|
+
throw handoff.reservations.length === 0 && this._waitPromptHandoff === handoff && (this._waitPromptHandoff = void 0), error;
|
|
1530
|
+
}
|
|
1531
|
+
if (!prepared)
|
|
1532
|
+
return handoff.reservations.length === 0 && this._waitPromptHandoff === handoff && (this._waitPromptHandoff = void 0), { completion: Promise.resolve() };
|
|
1533
|
+
let resolveCompletion = () => {
|
|
1534
|
+
}, rejectCompletion = (_error) => {
|
|
1535
|
+
}, completion = new Promise((resolve3, reject) => {
|
|
1536
|
+
resolveCompletion = resolve3, rejectCompletion = reject;
|
|
1537
|
+
});
|
|
1538
|
+
return handoff.reservations.push({ input: prepared, resolve: resolveCompletion, reject: rejectCompletion }), !run.gracefulStopRequested && this.agent.requestGracefulStop(handoff.ownerSignal) && (run.gracefulStopRequested = !0), this._interruptSubagentWaits(run, handoff.ownerSignal), handoff.draining || (handoff.draining = !0, this._drainWaitPromptHandoff(handoff)), { completion };
|
|
1539
|
+
}
|
|
1540
|
+
async _drainWaitPromptHandoff(handoff) {
|
|
1541
|
+
for (await this.waitForIdle(); this._waitPromptHandoff === handoff && handoff.generation === this._waitPromptGeneration && handoff.reservations.length > 0; ) {
|
|
1542
|
+
let reservation = handoff.reservations[0];
|
|
1543
|
+
try {
|
|
1544
|
+
this.assertCanStartWork();
|
|
1545
|
+
let messages = await this._createPromptMessages(reservation.input);
|
|
1546
|
+
handoff.accepting = !1, await this._runAgentPrompt(messages), reservation.resolve();
|
|
1547
|
+
} catch (error) {
|
|
1548
|
+
reservation.reject(error);
|
|
1549
|
+
} finally {
|
|
1550
|
+
handoff.reservations[0] === reservation && handoff.reservations.shift();
|
|
1551
|
+
}
|
|
1436
1552
|
}
|
|
1437
|
-
|
|
1553
|
+
handoff.accepting = !1, this._waitPromptHandoff === handoff && (this._waitPromptHandoff = void 0);
|
|
1438
1554
|
}
|
|
1439
1555
|
/**
|
|
1440
1556
|
* Try to execute an extension command. Returns true if command was found and executed.
|
|
@@ -1618,7 +1734,7 @@ ${args}` : skillBlock;
|
|
|
1618
1734
|
* Abort current operation and wait for agent to become idle.
|
|
1619
1735
|
*/
|
|
1620
1736
|
async abort() {
|
|
1621
|
-
this.abortRetry(), this.agent.abort(), await this.waitForIdle();
|
|
1737
|
+
this._invalidateWaitPromptHandoffs("The active run was aborted before the pending prompt could run."), this.abortRetry(), this.agent.abort(), await this.waitForIdle();
|
|
1622
1738
|
}
|
|
1623
1739
|
async waitForIdle() {
|
|
1624
1740
|
this.isIdle || await this._getIdleWaitPromise();
|
|
@@ -2289,6 +2405,7 @@ ${args}` : skillBlock;
|
|
|
2289
2405
|
});
|
|
2290
2406
|
}
|
|
2291
2407
|
async reload(options) {
|
|
2408
|
+
this._invalidateWaitPromptHandoffs("Extensions reloaded before the pending prompt could run.");
|
|
2292
2409
|
let previousFlagValues = this._extensionRunner.getFlagValues();
|
|
2293
2410
|
await emitSessionShutdownEvent(this._extensionRunner, { type: "session_shutdown", reason: "reload" }), await this.settingsManager.reload(), this.syncQueueModesFromSettings(), resetApiProviders(), await this._resourceLoader.reload(), this._buildRuntime({
|
|
2294
2411
|
activeToolNames: this.getActiveToolNames(),
|
|
@@ -2663,7 +2780,7 @@ ${command}` : command;
|
|
|
2663
2780
|
*/
|
|
2664
2781
|
async exportToHtml(outputPath) {
|
|
2665
2782
|
let [{ exportSessionToHtml }, { createToolHtmlRenderer }] = await Promise.all([
|
|
2666
|
-
import("./export-html-
|
|
2783
|
+
import("./export-html-VM4J2MNR.js"),
|
|
2667
2784
|
import("./tool-renderer-MV5O452K.js")
|
|
2668
2785
|
]), configuredThemeName = this.settingsManager.getTheme(), themeName = configuredThemeName && getThemeByName(configuredThemeName) ? configuredThemeName : void 0, toolRenderer = createToolHtmlRenderer({
|
|
2669
2786
|
getToolDefinition: (name) => this.getToolDefinition(name),
|
|
@@ -3115,15 +3232,17 @@ async function createOwnedAgentSession(options) {
|
|
|
3115
3232
|
},
|
|
3116
3233
|
convertToLlm: convertToLlmWithBlockImages,
|
|
3117
3234
|
streamFn: async (model2, context, options2) => {
|
|
3118
|
-
let providerRetrySettings = settingsManager.getProviderRetrySettings(), httpIdleTimeoutMs = settingsManager.getHttpIdleTimeoutMs(), effectiveTimeoutMs = httpIdleTimeoutMs === 0 ? 2147483647 : httpIdleTimeoutMs, timeoutMs = options2?.timeoutMs ?? providerRetrySettings.timeoutMs ?? effectiveTimeoutMs, websocketConnectTimeoutMs = options2?.websocketConnectTimeoutMs ?? settingsManager.getWebSocketConnectTimeoutMs(), headerRunner = extensionRunnerRef.current;
|
|
3235
|
+
let providerRetrySettings = settingsManager.getProviderRetrySettings(), httpIdleTimeoutMs = settingsManager.getHttpIdleTimeoutMs(), effectiveTimeoutMs = httpIdleTimeoutMs === 0 ? 2147483647 : httpIdleTimeoutMs, timeoutMs = options2?.timeoutMs ?? providerRetrySettings.timeoutMs ?? effectiveTimeoutMs, websocketConnectTimeoutMs = options2?.websocketConnectTimeoutMs ?? settingsManager.getWebSocketConnectTimeoutMs(), headerRunner = extensionRunnerRef.current, subscription = model2.provider === "anthropic" && (await modelRuntime.getAuth(model2, { apiKey: options2?.apiKey, env: options2?.env }))?.auth.externalClaudeCode;
|
|
3119
3236
|
return modelRuntime.streamSimple(model2, context, {
|
|
3120
3237
|
...options2,
|
|
3238
|
+
...subscription && !headerRunner?.hasHandlers("before_provider_request") ? { onPayload: void 0 } : {},
|
|
3239
|
+
...subscription && !headerRunner?.hasHandlers("after_provider_response") ? { onResponse: void 0 } : {},
|
|
3121
3240
|
timeoutMs,
|
|
3122
3241
|
websocketConnectTimeoutMs,
|
|
3123
3242
|
cacheRetention: settingsManager.getCacheRetention(),
|
|
3124
3243
|
maxRetries: options2?.maxRetries ?? providerRetrySettings.maxRetries,
|
|
3125
3244
|
maxRetryDelayMs: options2?.maxRetryDelayMs ?? providerRetrySettings.maxRetryDelayMs,
|
|
3126
|
-
transformHeaders: async (requestHeaders) => {
|
|
3245
|
+
transformHeaders: subscription && !headerRunner?.hasHandlers("before_provider_headers") ? void 0 : async (requestHeaders) => {
|
|
3127
3246
|
let headers = mergeProviderAttributionHeaders(model2, settingsManager, options2?.sessionId, requestHeaders);
|
|
3128
3247
|
return headerRunner?.hasHandlers("before_provider_headers") ? headerRunner.emitBeforeProviderHeaders(headers ?? {}) : headers ?? {};
|
|
3129
3248
|
}
|