@ashx-j/lunr 0.2.23 → 0.2.25
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 +22 -1
- package/README.md +10 -10
- 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-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/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/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 +19 -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/core/agent-session.d.ts +1 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +5 -4
- 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 +9 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +40 -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/system-prompt.d.ts +2 -0
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +9 -4
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/gateway/adapters/discord.d.ts.map +1 -1
- package/dist/gateway/adapters/discord.js +3 -8
- package/dist/gateway/adapters/discord.js.map +1 -1
- package/dist/gateway/adapters/telegram.d.ts.map +1 -1
- package/dist/gateway/adapters/telegram.js +7 -0
- package/dist/gateway/adapters/telegram.js.map +1 -1
- package/dist/gateway/agent-bridge.d.ts +4 -1
- package/dist/gateway/agent-bridge.d.ts.map +1 -1
- package/dist/gateway/agent-bridge.js +57 -17
- package/dist/gateway/agent-bridge.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/buttons.d.ts.map +1 -1
- package/dist/gateway/buttons.js +29 -19
- package/dist/gateway/buttons.js.map +1 -1
- package/dist/gateway/commands.d.ts +2 -0
- package/dist/gateway/commands.d.ts.map +1 -1
- package/dist/gateway/commands.js +39 -18
- package/dist/gateway/commands.js.map +1 -1
- package/dist/gateway/config.d.ts +1 -0
- package/dist/gateway/config.d.ts.map +1 -1
- package/dist/gateway/config.js +2 -0
- package/dist/gateway/config.js.map +1 -1
- package/dist/gateway/cron.d.ts +1 -1
- package/dist/gateway/cron.d.ts.map +1 -1
- package/dist/gateway/cron.js +2 -2
- package/dist/gateway/cron.js.map +1 -1
- package/dist/gateway/index.d.ts.map +1 -1
- package/dist/gateway/index.js +26 -26
- package/dist/gateway/index.js.map +1 -1
- package/dist/gateway/mobile-commands.d.ts.map +1 -1
- package/dist/gateway/mobile-commands.js +15 -14
- package/dist/gateway/mobile-commands.js.map +1 -1
- package/dist/gateway/presenter.d.ts +12 -1
- package/dist/gateway/presenter.d.ts.map +1 -1
- package/dist/gateway/presenter.js +146 -48
- package/dist/gateway/presenter.js.map +1 -1
- package/dist/gateway/router.d.ts +5 -5
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +96 -42
- package/dist/gateway/router.js.map +1 -1
- package/dist/gateway/service.d.ts.map +1 -1
- package/dist/gateway/service.js +13 -4
- package/dist/gateway/service.js.map +1 -1
- package/dist/gateway/setup.d.ts +5 -0
- package/dist/gateway/setup.d.ts.map +1 -1
- package/dist/gateway/setup.js +98 -42
- package/dist/gateway/setup.js.map +1 -1
- package/dist/gateway/stream.d.ts +6 -5
- package/dist/gateway/stream.d.ts.map +1 -1
- package/dist/gateway/stream.js +24 -11
- package/dist/gateway/stream.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/settings-selector.d.ts +4 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +23 -3
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-tail.js +2 -2
- package/dist/modes/interactive/components/thinking-tail.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +1 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +12 -2
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -2
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +76 -90
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/node-runtime/{agent-session-services-GZVSOGYR.js → agent-session-services-YXXFCP5J.js} +12 -12
- package/dist/node-runtime/{builtin-extensions-QVCXNQT4.js → builtin-extensions-ZLAX7TUH.js} +3 -3
- package/dist/node-runtime/{chunk-W64JC4E7.js → chunk-2HHLJWGD.js} +3 -87
- package/dist/node-runtime/{chunk-VWCE2HSZ.js → chunk-2HMIRK7W.js} +4 -4
- package/dist/node-runtime/{chunk-XLTL257W.js → chunk-2KIPT4HJ.js} +5 -1
- package/dist/node-runtime/{chunk-RIR5EDDJ.js → chunk-3XPLBUEM.js} +17 -12
- package/dist/node-runtime/{chunk-QAZOULTU.js → chunk-6XL67VVY.js} +40 -6
- package/dist/node-runtime/chunk-7S3T6YEA.js +97 -0
- package/dist/node-runtime/{chunk-R3K2F5GI.js → chunk-B4HP6ZWM.js} +2 -0
- package/dist/node-runtime/{chunk-TQGPP4SC.js → chunk-CDVHZOOK.js} +1 -1
- package/dist/node-runtime/{chunk-YJMMG7C6.js → chunk-DSIKTUPW.js} +1 -1
- package/dist/node-runtime/{chunk-LFZDVKSP.js → chunk-E4D3IGP2.js} +41 -25
- 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-AZJHNQKQ.js → chunk-I54LGHWM.js} +1 -1
- package/dist/node-runtime/{chunk-YHQ3NBB3.js → chunk-IJIFHRTB.js} +20 -18
- package/dist/node-runtime/{chunk-GS66LV4M.js → chunk-KJ6DWS3K.js} +4 -4
- package/dist/node-runtime/{chunk-HPUP7E4T.js → chunk-KWIYUUZK.js} +68 -42
- package/dist/node-runtime/{chunk-TVJUOJZJ.js → chunk-LQP3RB67.js} +184 -1527
- 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-GMHJCCEN.js → chunk-NRKGMJYU.js} +4 -1
- package/dist/node-runtime/{chunk-CSUZVNYE.js → chunk-OVX6X377.js} +10 -6
- package/dist/node-runtime/{chunk-DD5YWFSJ.js → chunk-QTU6AKNJ.js} +130 -65
- package/dist/node-runtime/{chunk-LLUIPGDR.js → chunk-RC7DMV45.js} +110 -77
- package/dist/node-runtime/{chunk-UWPJL22I.js → chunk-SLVOAQOY.js} +15 -4
- package/dist/node-runtime/{chunk-EKVFP6YF.js → chunk-TORR5XBV.js} +17 -16
- package/dist/node-runtime/{chunk-UP2XBVH5.js → chunk-UOEDI7RP.js} +1 -1
- package/dist/node-runtime/{chunk-DQMGU675.js → chunk-VQFSUJJG.js} +20 -17
- package/dist/node-runtime/{chunk-X3URCYCU.js → chunk-WF7PGWRZ.js} +14 -14
- package/dist/node-runtime/chunk-YCUZEGJG.js +1361 -0
- 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-PDVTBRWA.js → command-6WDOYKS6.js} +5 -5
- package/dist/node-runtime/{commands-KAMO2T6P.js → commands-NZLSOHPE.js} +2 -2
- package/dist/node-runtime/{commands-XDCFGIGW.js → commands-QC6VUZJQ.js} +9 -9
- package/dist/node-runtime/{config-RORQUQFG.js → config-D4QUPAHX.js} +1 -1
- package/dist/node-runtime/{direct-tool-executor-YAVOLDFY.js → direct-tool-executor-77GW4F5P.js} +3 -3
- package/dist/node-runtime/{export-html-KSOIMVPI.js → export-html-VM4J2MNR.js} +1 -1
- package/dist/node-runtime/{gateway-AYWM5DIO.js → gateway-INAYBF4Q.js} +141 -85
- package/dist/node-runtime/index.js +23 -21
- package/dist/node-runtime/{init-X2LIUB2H.js → init-HS6NQXSK.js} +2 -2
- package/dist/node-runtime/{install-cli-3BO4MMQ6.js → install-cli-KL4UDDAD.js} +3 -3
- package/dist/node-runtime/{interactive-mode-4MFRKAHG.js → interactive-mode-Z5M7WYYZ.js} +14 -14
- package/dist/node-runtime/{interactive-view-TUZHCQM3.js → interactive-view-NGFAMHPW.js} +2 -2
- package/dist/node-runtime/{lunr-browser-RYFIIVJN.js → lunr-browser-IR7TL3J7.js} +4 -4
- package/dist/node-runtime/{lunr-cron-YWXEPZMQ.js → lunr-cron-LWIZJM2N.js} +8 -8
- package/dist/node-runtime/main.js +19 -18
- package/dist/node-runtime/{mobile-commands-LVHDAUDP.js → mobile-commands-J7OJEKFO.js} +6 -6
- package/dist/node-runtime/{model-runtime-PLQKAG4B.js → model-runtime-OO5HFLWE.js} +1 -1
- package/dist/node-runtime/{package-manager-cli-6GT3Z3CK.js → package-manager-cli-VYZM5WHN.js} +10 -8
- 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-CDWK2AKY.js → pi-subagents-DNY7EAIG.js} +23 -13
- package/dist/node-runtime/{proxy-modes-OSQCWRBI.js → proxy-modes-LGEUYD7R.js} +3 -3
- package/dist/node-runtime/rpc-entry.js +19 -18
- package/dist/node-runtime/{runtime-bridges-3XUQ46XW.js → runtime-bridges-VRDDR73P.js} +8 -1
- package/dist/node-runtime/{service-ISSP6VHE.js → service-MDQIPQ26.js} +1 -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/{settings-manager-6VEMXRDL.js → settings-manager-J4SPQPDJ.js} +10 -7
- package/dist/node-runtime/setup-CQ2NLVK5.js +214 -0
- package/dist/node-runtime/{subagent-executor-M5VWB3D3.js → subagent-executor-KZZQGAKV.js} +40 -7
- package/dist/node-runtime/{update-cli-UVKJWRRJ.js → update-cli-GTFJC7XK.js} +4 -5
- 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 +19 -18
- 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 +1 -1
- package/docs/usage.md +4 -4
- 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/setup-5SR2J35A.js +0 -155
package/dist/node-runtime/{agent-session-services-GZVSOGYR.js → agent-session-services-YXXFCP5J.js}
RENAMED
|
@@ -2,9 +2,10 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
|
|
|
2
2
|
import {
|
|
3
3
|
createAgentSessionFromServices,
|
|
4
4
|
createAgentSessionServices
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-VQFSUJJG.js";
|
|
6
6
|
import "./chunk-CCCN2UCX.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-YCUZEGJG.js";
|
|
8
|
+
import "./chunk-LQP3RB67.js";
|
|
8
9
|
import "./chunk-OBMWP3I5.js";
|
|
9
10
|
import "./chunk-DVGWF6A2.js";
|
|
10
11
|
import "./chunk-QFWG2RVL.js";
|
|
@@ -12,22 +13,21 @@ import "./chunk-YDO2F2IA.js";
|
|
|
12
13
|
import "./chunk-53YJI7JU.js";
|
|
13
14
|
import "./chunk-5ZQXRPMC.js";
|
|
14
15
|
import "./chunk-AD6VXAO7.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-LISUTZS3.js";
|
|
16
|
+
import "./chunk-KJ6DWS3K.js";
|
|
17
|
+
import "./chunk-6XL67VVY.js";
|
|
18
|
+
import "./chunk-UOEDI7RP.js";
|
|
19
|
+
import "./chunk-2HMIRK7W.js";
|
|
20
20
|
import "./chunk-URD2SLIT.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-GYIXXQAO.js";
|
|
22
22
|
import "./chunk-GJ2RDBRL.js";
|
|
23
23
|
import "./chunk-CGBXPL3E.js";
|
|
24
24
|
import "./chunk-BBUVIEZB.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-ZXSGTGJ6.js";
|
|
26
26
|
import "./chunk-M3LZLQW2.js";
|
|
27
27
|
import "./chunk-KKUTQQV7.js";
|
|
28
28
|
import "./chunk-CSFI6YXL.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-I54LGHWM.js";
|
|
30
|
+
import "./chunk-2KIPT4HJ.js";
|
|
31
31
|
import "./chunk-FVDOXRUD.js";
|
|
32
32
|
import "./chunk-UJOCPOMX.js";
|
|
33
33
|
import "./chunk-2MI5OPMN.js";
|
|
@@ -36,7 +36,7 @@ import "./chunk-UAEOTO52.js";
|
|
|
36
36
|
import "./chunk-RQ2Q5IYR.js";
|
|
37
37
|
import "./chunk-PVCDKGR6.js";
|
|
38
38
|
import "./chunk-OR4L3IB2.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-B4HP6ZWM.js";
|
|
40
40
|
import "./chunk-E24EO34J.js";
|
|
41
41
|
import "./chunk-GS42T6MX.js";
|
|
42
42
|
import "./chunk-RDDAZOMU.js";
|
|
@@ -6,13 +6,13 @@ import {
|
|
|
6
6
|
lightBuiltinExtensions,
|
|
7
7
|
loadAllBuiltinExtensions,
|
|
8
8
|
loadDeferredBuiltinExtensions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-WF7PGWRZ.js";
|
|
10
10
|
import "./chunk-PL6JKXWI.js";
|
|
11
11
|
import "./chunk-5ZH3ZFIZ.js";
|
|
12
12
|
import "./chunk-CCCN2UCX.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ZXSGTGJ6.js";
|
|
14
14
|
import "./chunk-M3LZLQW2.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-MPKSOJBT.js";
|
|
16
16
|
import "./chunk-H2EOZYMP.js";
|
|
17
17
|
import "./chunk-PVCDKGR6.js";
|
|
18
18
|
import "./chunk-GS42T6MX.js";
|
|
@@ -4,17 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-YPHAIRZT.js";
|
|
5
5
|
import {
|
|
6
6
|
DefaultPackageManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LQP3RB67.js";
|
|
8
8
|
import {
|
|
9
9
|
SettingsManager
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
getProjectTrustOptions,
|
|
13
|
-
hasTrustRequiringProjectResources
|
|
14
|
-
} from "./chunk-HTFRRDSF.js";
|
|
15
|
-
import {
|
|
16
|
-
emitProjectTrustEvent
|
|
17
|
-
} from "./chunk-GJ2RDBRL.js";
|
|
10
|
+
} from "./chunk-6XL67VVY.js";
|
|
18
11
|
import {
|
|
19
12
|
KeybindingsManager
|
|
20
13
|
} from "./chunk-5EFIU3OM.js";
|
|
@@ -213,88 +206,11 @@ async function showStartupInput(settingsManager, title, placeholder) {
|
|
|
213
206
|
});
|
|
214
207
|
}
|
|
215
208
|
|
|
216
|
-
// packages/coding-agent/dist/cli/project-trust.js
|
|
217
|
-
import chalk from "chalk";
|
|
218
|
-
function createProjectTrustContext(options) {
|
|
219
|
-
return {
|
|
220
|
-
cwd: options.cwd,
|
|
221
|
-
mode: options.mode === "interactive" ? "tui" : options.mode,
|
|
222
|
-
hasUI: options.hasUI,
|
|
223
|
-
ui: {
|
|
224
|
-
select: async (title, selectOptions) => {
|
|
225
|
-
if (options.hasUI && options.mode === "interactive")
|
|
226
|
-
return showStartupSelector(options.settingsManager, title, selectOptions.map((option) => ({ label: option, value: option })));
|
|
227
|
-
},
|
|
228
|
-
confirm: async (title, message) => !options.hasUI || options.mode !== "interactive" ? !1 : await showStartupSelector(options.settingsManager, `${title}
|
|
229
|
-
${message}`, [
|
|
230
|
-
{ label: "Yes", value: !0 },
|
|
231
|
-
{ label: "No", value: !1 }
|
|
232
|
-
]) ?? !1,
|
|
233
|
-
input: async (title, placeholder) => {
|
|
234
|
-
if (options.hasUI && options.mode === "interactive")
|
|
235
|
-
return showStartupInput(options.settingsManager, title, placeholder);
|
|
236
|
-
},
|
|
237
|
-
notify: (message, type = "info") => {
|
|
238
|
-
if (options.mode !== "interactive") {
|
|
239
|
-
let color = type === "error" ? chalk.red : type === "warning" ? chalk.yellow : chalk.cyan;
|
|
240
|
-
console.error(color(message));
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
// packages/coding-agent/dist/core/project-trust.js
|
|
248
|
-
function formatProjectTrustPrompt(cwd) {
|
|
249
|
-
return `Trust project folder?
|
|
250
|
-
${cwd}
|
|
251
|
-
|
|
252
|
-
This allows ${APP_NAME} to load ${CONFIG_DIR_NAME} settings and resources, install missing project packages, and execute project extensions.`;
|
|
253
|
-
}
|
|
254
|
-
async function selectProjectTrustOption(cwd, ctx) {
|
|
255
|
-
let options = getProjectTrustOptions(cwd, { includeSessionOnly: !0 }), selected = await ctx.ui.select(formatProjectTrustPrompt(cwd), options.map((option) => option.label));
|
|
256
|
-
return options.find((option) => option.label === selected);
|
|
257
|
-
}
|
|
258
|
-
function saveProjectTrustPromptResult(trustStore, result) {
|
|
259
|
-
result.updates.length > 0 && trustStore.setMany(result.updates);
|
|
260
|
-
}
|
|
261
|
-
async function resolveProjectTrusted(options) {
|
|
262
|
-
if (options.trustOverride !== void 0)
|
|
263
|
-
return options.trustOverride;
|
|
264
|
-
if (!hasTrustRequiringProjectResources(options.cwd))
|
|
265
|
-
return !0;
|
|
266
|
-
if (options.extensionsResult) {
|
|
267
|
-
let { result, errors } = await emitProjectTrustEvent(options.extensionsResult, { type: "project_trust", cwd: options.cwd }, options.projectTrustContext);
|
|
268
|
-
for (let error of errors)
|
|
269
|
-
options.onExtensionError?.(`Extension "${error.extensionPath}" project_trust error: ${error.error}`);
|
|
270
|
-
if (result) {
|
|
271
|
-
let trusted = result.trusted === "yes";
|
|
272
|
-
return result.remember === !0 && options.trustStore.set(options.cwd, trusted), trusted;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
let decision = options.trustStore.get(options.cwd);
|
|
276
|
-
if (decision !== null)
|
|
277
|
-
return decision;
|
|
278
|
-
switch (options.defaultProjectTrust ?? "ask") {
|
|
279
|
-
case "always":
|
|
280
|
-
return !0;
|
|
281
|
-
case "never":
|
|
282
|
-
return !1;
|
|
283
|
-
case "ask":
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
if (!options.projectTrustContext.hasUI)
|
|
287
|
-
return !1;
|
|
288
|
-
let selected = await selectProjectTrustOption(options.cwd, options.projectTrustContext);
|
|
289
|
-
return selected !== void 0 ? (saveProjectTrustPromptResult(options.trustStore, selected), selected.trusted) : !1;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
209
|
export {
|
|
293
210
|
createStartupTui,
|
|
294
211
|
startStartupTui,
|
|
295
212
|
shouldRunFirstTimeSetup,
|
|
296
213
|
showStartupSelector,
|
|
297
214
|
showFirstTimeSetup,
|
|
298
|
-
|
|
299
|
-
resolveProjectTrusted
|
|
215
|
+
showStartupInput
|
|
300
216
|
};
|
|
@@ -2,7 +2,7 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
|
|
|
2
2
|
import {
|
|
3
3
|
loadGatewayConfig,
|
|
4
4
|
saveGatewayConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-B4HP6ZWM.js";
|
|
6
6
|
import {
|
|
7
7
|
VERSION,
|
|
8
8
|
appendDebugLog,
|
|
@@ -274,11 +274,11 @@ var chatPlatformsHandler = {
|
|
|
274
274
|
if (cfg.telegram.token && (cfg.telegram.enabled = !0), cfg.discord.token && (cfg.discord.enabled = !0), saveGatewayConfig(cfg), ctx.next.options.autostart === !0) {
|
|
275
275
|
if (!cfg.telegram.token && !cfg.discord.token)
|
|
276
276
|
throw new Error("Configure a bot token with lunr gateway setup before enabling automatic startup.");
|
|
277
|
-
await (await import("./service-
|
|
278
|
-
} else ctx.previous?.options.autostart === !0 && await (await import("./service-
|
|
277
|
+
await (await import("./service-MDQIPQ26.js")).configureStartup("login");
|
|
278
|
+
} else ctx.previous?.options.autostart === !0 && await (await import("./service-MDQIPQ26.js")).configureStartup("off");
|
|
279
279
|
},
|
|
280
280
|
async disable(opts) {
|
|
281
|
-
let service = await import("./service-
|
|
281
|
+
let service = await import("./service-MDQIPQ26.js");
|
|
282
282
|
service.loadServiceSettings().startup !== "off" && await service.configureStartup("off"), await service.stopGatewayService();
|
|
283
283
|
let cfg = loadGatewayConfig();
|
|
284
284
|
cfg.telegram.enabled = !1, cfg.discord.enabled = !1, opts.purgeSecrets && (delete cfg.telegram.token, delete cfg.discord.token), saveGatewayConfig(cfg);
|
|
@@ -387,7 +387,11 @@ var SessionManager = class _SessionManager {
|
|
|
387
387
|
if (this.sessionFile)
|
|
388
388
|
try {
|
|
389
389
|
let saved = JSON.parse(readFileSync(`${this.sessionFile}.leaf.json`, "utf8"));
|
|
390
|
-
|
|
390
|
+
if (saved.id === this.sessionId) {
|
|
391
|
+
let mode = saved.permissionMode;
|
|
392
|
+
mode === "plan" || mode === "read-only" ? this.permissionMode = "read-only" : mode === "manual" || mode === "yolo" ? this.permissionMode = "yolo" : mode === "auto" && (this.permissionMode = "auto");
|
|
393
|
+
}
|
|
394
|
+
saved.id === this.sessionId && (saved.leafId === null || this.byId.has(saved.leafId)) && saved.revision === createHash("sha256").update(readFileSync(this.sessionFile)).digest("hex") && (this.leafId = saved.leafId);
|
|
391
395
|
} catch {
|
|
392
396
|
}
|
|
393
397
|
}
|
|
@@ -5,12 +5,15 @@ import {
|
|
|
5
5
|
isDiagnosticControlEvent
|
|
6
6
|
} from "./chunk-OAR4TYZE.js";
|
|
7
7
|
import {
|
|
8
|
-
|
|
8
|
+
READ_ONLY_WRITE_SPAWN_ERROR,
|
|
9
9
|
resolveChildPermissions
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OVX6X377.js";
|
|
11
11
|
import {
|
|
12
12
|
createReadOnlyTools
|
|
13
13
|
} from "./chunk-YDO2F2IA.js";
|
|
14
|
+
import {
|
|
15
|
+
subagentCommunicationEnabled
|
|
16
|
+
} from "./chunk-6XL67VVY.js";
|
|
14
17
|
import {
|
|
15
18
|
convertToLlm
|
|
16
19
|
} from "./chunk-FVDOXRUD.js";
|
|
@@ -1956,7 +1959,7 @@ function resolveRuntimeScriptPath(basePathWithoutExt) {
|
|
|
1956
1959
|
let tsPath = `${basePathWithoutExt}.ts`;
|
|
1957
1960
|
return fs9.existsSync(tsPath) ? tsPath : `${basePathWithoutExt}.js`;
|
|
1958
1961
|
}
|
|
1959
|
-
var PROMPT_RUNTIME_EXTENSION_PATH = resolveRuntimeScriptPath(path10.join(path10.dirname(fileURLToPath(new URL("../builtin-extensions/pi-subagents/src/runs/shared/pi-args.js", import.meta.url).href)), "subagent-prompt-runtime")), FANOUT_CHILD_EXTENSION_PATH = resolveRuntimeScriptPath(path10.join(path10.dirname(fileURLToPath(new URL("../builtin-extensions/pi-subagents/src/runs/shared/pi-args.js", import.meta.url).href)), "..", "..", "extension", "fanout-child")), SUBAGENT_CHILD_ENV = "PI_SUBAGENT_CHILD", SUBAGENT_ORCHESTRATOR_TARGET_ENV = "PI_SUBAGENT_ORCHESTRATOR_TARGET", SUBAGENT_ORCHESTRATOR_SESSION_ID_ENV = "PI_SUBAGENT_ORCHESTRATOR_SESSION_ID", SUBAGENT_SUPERVISOR_SESSION_ID_ENV = "PI_SUBAGENT_SUPERVISOR_SESSION_ID", SUBAGENT_SUPERVISOR_CHANNEL_DIR_ENV = "PI_SUBAGENT_SUPERVISOR_CHANNEL_DIR", SUBAGENT_RUN_ID_ENV = "PI_SUBAGENT_RUN_ID", SUBAGENT_CHILD_AGENT_ENV = "PI_SUBAGENT_CHILD_AGENT", SUBAGENT_CHILD_INDEX_ENV = "PI_SUBAGENT_CHILD_INDEX", SUBAGENT_FANOUT_CHILD_ENV = "PI_SUBAGENT_FANOUT_CHILD", SUBAGENT_PARENT_EVENT_SINK_ENV = "PI_SUBAGENT_PARENT_EVENT_SINK", SUBAGENT_PARENT_CONTROL_INBOX_ENV = "PI_SUBAGENT_PARENT_CONTROL_INBOX", SUBAGENT_PARENT_ROOT_RUN_ID_ENV = "PI_SUBAGENT_PARENT_ROOT_RUN_ID", SUBAGENT_PARENT_RUN_ID_ENV = "PI_SUBAGENT_PARENT_RUN_ID", SUBAGENT_PARENT_CHILD_INDEX_ENV = "PI_SUBAGENT_PARENT_CHILD_INDEX", SUBAGENT_PARENT_DEPTH_ENV = "PI_SUBAGENT_PARENT_DEPTH", SUBAGENT_PARENT_PATH_ENV = "PI_SUBAGENT_PARENT_PATH", SUBAGENT_PARENT_CAPABILITY_TOKEN_ENV = "PI_SUBAGENT_PARENT_CAPABILITY_TOKEN", SUBAGENT_PARENT_SESSION_ENV = "PI_SUBAGENT_PARENT_SESSION", SUBAGENT_PARENT_PERMISSION_MODE_ENV = "PI_SUBAGENT_PARENT_PERMISSION_MODE", SUBAGENT_CHILD_PERMISSION_ENV = "PI_SUBAGENT_CHILD_PERMISSION", SUBAGENT_STEER_INBOX_ENV = "PI_SUBAGENT_STEER_INBOX", SUBAGENT_STEER_CAPABILITY_ENV = "PI_SUBAGENT_STEER_CAPABILITY", SUBAGENT_STEER_ACK_DIR_ENV = "PI_SUBAGENT_STEER_ACK_DIR";
|
|
1962
|
+
var PROMPT_RUNTIME_EXTENSION_PATH = resolveRuntimeScriptPath(path10.join(path10.dirname(fileURLToPath(new URL("../builtin-extensions/pi-subagents/src/runs/shared/pi-args.js", import.meta.url).href)), "subagent-prompt-runtime")), FANOUT_CHILD_EXTENSION_PATH = resolveRuntimeScriptPath(path10.join(path10.dirname(fileURLToPath(new URL("../builtin-extensions/pi-subagents/src/runs/shared/pi-args.js", import.meta.url).href)), "..", "..", "extension", "fanout-child")), SUBAGENT_COMMUNICATION_ENV = "PI_SUBAGENT_COMMUNICATION_ENABLED", SUBAGENT_CHILD_ENV = "PI_SUBAGENT_CHILD", SUBAGENT_ORCHESTRATOR_TARGET_ENV = "PI_SUBAGENT_ORCHESTRATOR_TARGET", SUBAGENT_ORCHESTRATOR_SESSION_ID_ENV = "PI_SUBAGENT_ORCHESTRATOR_SESSION_ID", SUBAGENT_SUPERVISOR_SESSION_ID_ENV = "PI_SUBAGENT_SUPERVISOR_SESSION_ID", SUBAGENT_SUPERVISOR_CHANNEL_DIR_ENV = "PI_SUBAGENT_SUPERVISOR_CHANNEL_DIR", SUBAGENT_RUN_ID_ENV = "PI_SUBAGENT_RUN_ID", SUBAGENT_CHILD_AGENT_ENV = "PI_SUBAGENT_CHILD_AGENT", SUBAGENT_CHILD_INDEX_ENV = "PI_SUBAGENT_CHILD_INDEX", SUBAGENT_FANOUT_CHILD_ENV = "PI_SUBAGENT_FANOUT_CHILD", SUBAGENT_PARENT_EVENT_SINK_ENV = "PI_SUBAGENT_PARENT_EVENT_SINK", SUBAGENT_PARENT_CONTROL_INBOX_ENV = "PI_SUBAGENT_PARENT_CONTROL_INBOX", SUBAGENT_PARENT_ROOT_RUN_ID_ENV = "PI_SUBAGENT_PARENT_ROOT_RUN_ID", SUBAGENT_PARENT_RUN_ID_ENV = "PI_SUBAGENT_PARENT_RUN_ID", SUBAGENT_PARENT_CHILD_INDEX_ENV = "PI_SUBAGENT_PARENT_CHILD_INDEX", SUBAGENT_PARENT_DEPTH_ENV = "PI_SUBAGENT_PARENT_DEPTH", SUBAGENT_PARENT_PATH_ENV = "PI_SUBAGENT_PARENT_PATH", SUBAGENT_PARENT_CAPABILITY_TOKEN_ENV = "PI_SUBAGENT_PARENT_CAPABILITY_TOKEN", SUBAGENT_PARENT_SESSION_ENV = "PI_SUBAGENT_PARENT_SESSION", SUBAGENT_PARENT_PERMISSION_MODE_ENV = "PI_SUBAGENT_PARENT_PERMISSION_MODE", SUBAGENT_CHILD_PERMISSION_ENV = "PI_SUBAGENT_CHILD_PERMISSION", SUBAGENT_STEER_INBOX_ENV = "PI_SUBAGENT_STEER_INBOX", SUBAGENT_STEER_CAPABILITY_ENV = "PI_SUBAGENT_STEER_CAPABILITY", SUBAGENT_STEER_ACK_DIR_ENV = "PI_SUBAGENT_STEER_ACK_DIR";
|
|
1960
1963
|
function sanitizeSupervisorChannelSegment(value) {
|
|
1961
1964
|
return value.trim().replace(/[^A-Za-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "unknown";
|
|
1962
1965
|
}
|
|
@@ -1970,18 +1973,19 @@ function applyThinkingSuffix(model, thinking, replaceExisting = !1) {
|
|
|
1970
1973
|
return colonIdx !== -1 && THINKING_LEVELS.some((level) => level === model.substring(colonIdx + 1)) ? replaceExisting ? `${model.slice(0, colonIdx)}:${thinking}` : model : `${model}:${thinking}`;
|
|
1971
1974
|
}
|
|
1972
1975
|
function buildPiArgs(input) {
|
|
1973
|
-
let args = [...input.baseArgs];
|
|
1976
|
+
let communicationEnabled = input.communicationEnabled ?? subagentCommunicationEnabled(input.cwd ?? process.cwd(), getAgentDir()), args = [...input.baseArgs];
|
|
1974
1977
|
input.sessionFile ? (fs9.mkdirSync(path10.dirname(input.sessionFile), { recursive: !0 }), args.push("--session", input.sessionFile)) : (input.sessionEnabled || args.push("--no-session"), input.sessionDir && (fs9.mkdirSync(input.sessionDir, { recursive: !0 }), args.push("--session-dir", input.sessionDir)));
|
|
1975
1978
|
let modelArg = applyThinkingSuffix(input.model, input.thinking);
|
|
1976
1979
|
modelArg && args.push("--model", modelArg);
|
|
1977
|
-
let declaredBuiltinToolsBase = input.tools?.filter((tool) => !(tool.includes("/") || tool.endsWith(".ts") || tool.endsWith(".js"))) ?? [], declaredBuiltinTools = input.requireReadTool && input.tools?.length && !declaredBuiltinToolsBase.includes("read") ? ["read", ...declaredBuiltinToolsBase] : declaredBuiltinToolsBase, fanoutAuthorized = declaredBuiltinTools.includes("subagent"), toolExtensionPaths = [], requiredChildTools = [];
|
|
1980
|
+
let declaredBuiltinToolsBase = input.tools?.filter((tool) => !(tool.includes("/") || tool.endsWith(".ts") || tool.endsWith(".js")) && (communicationEnabled || tool !== "contact_supervisor" && tool !== "intercom")) ?? [], declaredBuiltinTools = input.requireReadTool && input.tools?.length && !declaredBuiltinToolsBase.includes("read") ? ["read", ...declaredBuiltinToolsBase] : declaredBuiltinToolsBase, fanoutAuthorized = declaredBuiltinTools.includes("subagent"), toolExtensionPaths = [], requiredChildTools = [];
|
|
1978
1981
|
if (input.tools?.length) {
|
|
1979
1982
|
let allowedTools = [...declaredBuiltinTools];
|
|
1980
1983
|
for (let tool of input.tools)
|
|
1981
1984
|
!declaredBuiltinTools.includes(tool) && (tool.includes("/") || tool.endsWith(".ts") || tool.endsWith(".js")) && toolExtensionPaths.push(tool);
|
|
1982
1985
|
allowedTools.length > 0 && (input.mcpDirectTools?.length && allowedTools.push(...resolveMcpDirectToolNames(input.mcpDirectTools, input.cwd)), input.structuredOutput && allowedTools.push("structured_output"), requiredChildTools = [...new Set(allowedTools)], args.push("--tools", requiredChildTools.join(",")));
|
|
1983
1986
|
}
|
|
1984
|
-
input.excludeTools
|
|
1987
|
+
let excludedTools = [...input.excludeTools ?? [], ...communicationEnabled ? [] : ["contact_supervisor", "intercom"]];
|
|
1988
|
+
excludedTools.length && args.push("--exclude-tools", [...new Set(excludedTools)].join(","));
|
|
1985
1989
|
let runtimeExtensions = fanoutAuthorized ? [PROMPT_RUNTIME_EXTENSION_PATH, FANOUT_CHILD_EXTENSION_PATH] : [PROMPT_RUNTIME_EXTENSION_PATH];
|
|
1986
1990
|
if (input.extensions !== void 0) {
|
|
1987
1991
|
args.push("--no-extensions");
|
|
@@ -2004,7 +2008,7 @@ function buildPiArgs(input) {
|
|
|
2004
2008
|
} else
|
|
2005
2009
|
args.push(`Task: ${input.task}`);
|
|
2006
2010
|
let env = {}, toolDiagnosticPath;
|
|
2007
|
-
requiredChildTools.length > 0 && (tempDir || (tempDir = fs9.mkdtempSync(path10.join(os6.tmpdir(), "pi-subagent-"))), toolDiagnosticPath = path10.join(tempDir, "tool-diagnostic.json"), env[REQUIRED_CHILD_TOOLS_ENV] = JSON.stringify(requiredChildTools), env[CHILD_TOOL_DIAGNOSTIC_PATH_ENV] = toolDiagnosticPath), env[SUBAGENT_CHILD_ENV] = "1", env[SUBAGENT_CHILD_PERMISSION_ENV] = input.childPermission ?? (input.parentPermissionMode === "
|
|
2011
|
+
requiredChildTools.length > 0 && (tempDir || (tempDir = fs9.mkdtempSync(path10.join(os6.tmpdir(), "pi-subagent-"))), toolDiagnosticPath = path10.join(tempDir, "tool-diagnostic.json"), env[REQUIRED_CHILD_TOOLS_ENV] = JSON.stringify(requiredChildTools), env[CHILD_TOOL_DIAGNOSTIC_PATH_ENV] = toolDiagnosticPath), env[SUBAGENT_CHILD_ENV] = "1", env[SUBAGENT_COMMUNICATION_ENV] = communicationEnabled ? "1" : "0", env[SUBAGENT_CHILD_PERMISSION_ENV] = input.childPermission ?? (input.parentPermissionMode === "read-only" ? "read-only" : "full"), env[SUBAGENT_PARENT_PERMISSION_MODE_ENV] = "", env[SUBAGENT_FANOUT_CHILD_ENV] = fanoutAuthorized ? "1" : "0", input.waitToolEnabled !== void 0 && (env[WAIT_TOOL_ENABLED_ENV] = input.waitToolEnabled ? "true" : "false");
|
|
2008
2012
|
let inheritedNestedRoute = !!(process.env[SUBAGENT_PARENT_EVENT_SINK_ENV] && process.env[SUBAGENT_PARENT_ROOT_RUN_ID_ENV] && process.env[SUBAGENT_PARENT_CAPABILITY_TOKEN_ENV]), parentRunId = input.parentRunId ?? input.runId ?? (inheritedNestedRoute ? process.env[SUBAGENT_RUN_ID_ENV] : void 0) ?? process.env[SUBAGENT_PARENT_RUN_ID_ENV] ?? "", parentChildIndex = input.parentChildIndex !== void 0 ? String(input.parentChildIndex) : input.childIndex !== void 0 ? String(input.childIndex) : process.env[SUBAGENT_PARENT_CHILD_INDEX_ENV] ?? "", inheritedDepth = Number(process.env[SUBAGENT_PARENT_DEPTH_ENV]), parentDepth = input.parentDepth ?? (inheritedNestedRoute && Number.isFinite(inheritedDepth) ? inheritedDepth + 1 : 1), parentPath = input.parentPath ?? [
|
|
2009
2013
|
...parseNestedPathEnv(process.env[SUBAGENT_PARENT_PATH_ENV]),
|
|
2010
2014
|
...parentRunId ? [{
|
|
@@ -2013,7 +2017,7 @@ function buildPiArgs(input) {
|
|
|
2013
2017
|
...input.childAgentName ? { agent: input.childAgentName } : {}
|
|
2014
2018
|
}] : []
|
|
2015
2019
|
];
|
|
2016
|
-
if (env[SUBAGENT_PARENT_EVENT_SINK_ENV] = fanoutAuthorized ? input.parentEventSink ?? process.env[SUBAGENT_PARENT_EVENT_SINK_ENV] ?? "" : "", env[SUBAGENT_PARENT_CONTROL_INBOX_ENV] = fanoutAuthorized ? input.parentControlInbox ?? process.env[SUBAGENT_PARENT_CONTROL_INBOX_ENV] ?? "" : "", env[SUBAGENT_PARENT_ROOT_RUN_ID_ENV] = fanoutAuthorized ? input.parentRootRunId ?? process.env[SUBAGENT_PARENT_ROOT_RUN_ID_ENV] ?? input.runId ?? "" : "", env[SUBAGENT_PARENT_RUN_ID_ENV] = fanoutAuthorized ? parentRunId : "", env[SUBAGENT_PARENT_CHILD_INDEX_ENV] = fanoutAuthorized ? parentChildIndex : "", env[SUBAGENT_PARENT_DEPTH_ENV] = fanoutAuthorized ? String(parentDepth) : "", env[SUBAGENT_PARENT_PATH_ENV] = fanoutAuthorized ? encodeNestedPathEnv(parentPath) : "", env[SUBAGENT_PARENT_CAPABILITY_TOKEN_ENV] = fanoutAuthorized ? input.parentCapabilityToken ?? process.env[SUBAGENT_PARENT_CAPABILITY_TOKEN_ENV] ?? "" : "", env.PI_SUBAGENT_INHERIT_PROJECT_CONTEXT = input.inheritProjectContext ? "1" : "0", env.PI_SUBAGENT_INHERIT_SKILLS = input.inheritSkills ? "1" : "0",
|
|
2020
|
+
if (env[SUBAGENT_PARENT_EVENT_SINK_ENV] = fanoutAuthorized ? input.parentEventSink ?? process.env[SUBAGENT_PARENT_EVENT_SINK_ENV] ?? "" : "", env[SUBAGENT_PARENT_CONTROL_INBOX_ENV] = fanoutAuthorized ? input.parentControlInbox ?? process.env[SUBAGENT_PARENT_CONTROL_INBOX_ENV] ?? "" : "", env[SUBAGENT_PARENT_ROOT_RUN_ID_ENV] = fanoutAuthorized ? input.parentRootRunId ?? process.env[SUBAGENT_PARENT_ROOT_RUN_ID_ENV] ?? input.runId ?? "" : "", env[SUBAGENT_PARENT_RUN_ID_ENV] = fanoutAuthorized ? parentRunId : "", env[SUBAGENT_PARENT_CHILD_INDEX_ENV] = fanoutAuthorized ? parentChildIndex : "", env[SUBAGENT_PARENT_DEPTH_ENV] = fanoutAuthorized ? String(parentDepth) : "", env[SUBAGENT_PARENT_PATH_ENV] = fanoutAuthorized ? encodeNestedPathEnv(parentPath) : "", env[SUBAGENT_PARENT_CAPABILITY_TOKEN_ENV] = fanoutAuthorized ? input.parentCapabilityToken ?? process.env[SUBAGENT_PARENT_CAPABILITY_TOKEN_ENV] ?? "" : "", env.PI_SUBAGENT_INHERIT_PROJECT_CONTEXT = input.inheritProjectContext ? "1" : "0", env.PI_SUBAGENT_INHERIT_SKILLS = input.inheritSkills ? "1" : "0", env.PI_SUBAGENT_INTERCOM_SESSION_NAME = communicationEnabled ? input.intercomSessionName ?? "" : "", env[SUBAGENT_ORCHESTRATOR_TARGET_ENV] = communicationEnabled ? input.orchestratorIntercomTarget ?? "" : "", env[SUBAGENT_ORCHESTRATOR_SESSION_ID_ENV] = communicationEnabled ? input.parentSessionId ?? "" : "", env[SUBAGENT_SUPERVISOR_SESSION_ID_ENV] = communicationEnabled ? input.supervisorSessionId ?? "" : "", env[SUBAGENT_SUPERVISOR_CHANNEL_DIR_ENV] = "", env[SUPERVISOR_PROTOCOL_ENV] = String(2), env[CHILD_DESCRIPTION_ENV] = input.childDescription ?? input.childAgentName ?? "", communicationEnabled && input.parentSessionId && input.runId && (input.childId || input.childAgentName)) {
|
|
2017
2021
|
let childIndex = input.childIndex ?? 0, channelAgent = input.childId ?? input.childAgentName, channelDir = supervisorChannelDir(input.runId, channelAgent, childIndex);
|
|
2018
2022
|
fs9.mkdirSync(path10.join(channelDir, "requests"), { recursive: !0 }), fs9.mkdirSync(path10.join(channelDir, "replies"), { recursive: !0 }), fs9.mkdirSync(path10.join(channelDir, "questions"), { recursive: !0 }), env[SUBAGENT_SUPERVISOR_CHANNEL_DIR_ENV] = channelDir, env[SUBAGENT_CHILD_INDEX_ENV] = String(childIndex);
|
|
2019
2023
|
}
|
|
@@ -2384,7 +2388,7 @@ function normalizeChildSpec(input, options) {
|
|
|
2384
2388
|
throw new Error(`${pathLabel}.task is required.`);
|
|
2385
2389
|
let requested = parseChildPermissionsInput(input.permissions, `${pathLabel}.permissions`), resolved = resolveChildPermissions(options.parentMode, requested);
|
|
2386
2390
|
if (!resolved.ok)
|
|
2387
|
-
throw new Error(resolved.error ||
|
|
2391
|
+
throw new Error(resolved.error || READ_ONLY_WRITE_SPAWN_ERROR);
|
|
2388
2392
|
let preservedSelection = isModelSelection(input.modelSelection) ? input.modelSelection : void 0, rawModel = optionalString(input.model);
|
|
2389
2393
|
if (rawModel === INHERIT_MODEL)
|
|
2390
2394
|
throw new Error(`${pathLabel}.model "inherit" is not supported; choose tier or an explicit provider/model.`);
|
|
@@ -4934,7 +4938,7 @@ function inactiveReason(mode, context, orchestratorTarget) {
|
|
|
4934
4938
|
return "orchestrator target is not available";
|
|
4935
4939
|
}
|
|
4936
4940
|
function diagnoseIntercomBridge(input) {
|
|
4937
|
-
let
|
|
4941
|
+
let config = resolveIntercomBridgeConfig(input.config), mode = subagentCommunicationEnabled(input.cwd ?? process.cwd(), input.agentDir ?? defaultAgentDir()) ? config.mode : "off", orchestratorTarget = input.orchestratorTarget?.trim(), wantsIntercom = mode !== "off" && !(mode === "fork-only" && input.context !== "fork"), reason = inactiveReason(mode, input.context, orchestratorTarget);
|
|
4938
4942
|
return {
|
|
4939
4943
|
active: reason === void 0,
|
|
4940
4944
|
mode,
|
|
@@ -4946,9 +4950,10 @@ function diagnoseIntercomBridge(input) {
|
|
|
4946
4950
|
};
|
|
4947
4951
|
}
|
|
4948
4952
|
function resolveIntercomBridge(input) {
|
|
4949
|
-
let config = resolveIntercomBridgeConfig(input.config), mode = config.mode, orchestratorTarget = input.orchestratorTarget?.trim(), agentDir = path16.resolve(input.agentDir ?? defaultAgentDir()), settingsDir = path16.resolve(input.settingsDir ?? defaultSubagentConfigDir(agentDir)), defaultInstruction = buildIntercomBridgeInstruction(orchestratorTarget || "{orchestratorTarget}", DEFAULT_INTERCOM_BRIDGE_TEMPLATE);
|
|
4950
|
-
return inactiveReason(mode, input.context, orchestratorTarget) || !orchestratorTarget ? { active: !1, mode, extensionDir: NATIVE_INTERCOM_EXTENSION_DIR, instruction: defaultInstruction } : {
|
|
4953
|
+
let config = resolveIntercomBridgeConfig(input.config), communicationEnabled = subagentCommunicationEnabled(input.cwd ?? process.cwd(), input.agentDir ?? defaultAgentDir()), mode = communicationEnabled ? config.mode : "off", orchestratorTarget = input.orchestratorTarget?.trim(), agentDir = path16.resolve(input.agentDir ?? defaultAgentDir()), settingsDir = path16.resolve(input.settingsDir ?? defaultSubagentConfigDir(agentDir)), defaultInstruction = buildIntercomBridgeInstruction(orchestratorTarget || "{orchestratorTarget}", DEFAULT_INTERCOM_BRIDGE_TEMPLATE);
|
|
4954
|
+
return inactiveReason(mode, input.context, orchestratorTarget) || !orchestratorTarget ? { active: !1, communicationEnabled, mode, extensionDir: NATIVE_INTERCOM_EXTENSION_DIR, instruction: defaultInstruction } : {
|
|
4951
4955
|
active: !0,
|
|
4956
|
+
communicationEnabled,
|
|
4952
4957
|
mode,
|
|
4953
4958
|
orchestratorTarget,
|
|
4954
4959
|
extensionDir: NATIVE_INTERCOM_EXTENSION_DIR,
|
|
@@ -2,11 +2,7 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
|
|
|
2
2
|
import {
|
|
3
3
|
browserEnabledDefault,
|
|
4
4
|
notifyBrowserEnabledChange
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
DEFAULT_SUBAGENT_SPINNER,
|
|
8
|
-
isSubagentSpinnerName
|
|
9
|
-
} from "./chunk-LISUTZS3.js";
|
|
5
|
+
} from "./chunk-UOEDI7RP.js";
|
|
10
6
|
import {
|
|
11
7
|
require_proper_lockfile
|
|
12
8
|
} from "./chunk-URD2SLIT.js";
|
|
@@ -18410,11 +18406,33 @@ function configureHttpDispatcher(timeoutMs = DEFAULT_HTTP_IDLE_TIMEOUT_MS) {
|
|
|
18410
18406
|
undici.setGlobalDispatcher(dispatcher), (installedGlobalFetch === void 0 ? globalThis.fetch === originalGlobalFetch : globalThis.fetch === installedGlobalFetch) && (undici.install?.(), installedGlobalFetch = globalThis.fetch);
|
|
18411
18407
|
}
|
|
18412
18408
|
|
|
18409
|
+
// packages/coding-agent/dist/core/subagent-spinner-setting.js
|
|
18410
|
+
var SUBAGENT_SPINNER_NAMES = ["braille", "orbit", "snake", "sparkle"], DEFAULT_SUBAGENT_SPINNER = "braille", SUBAGENT_SPINNER_LABELS = {
|
|
18411
|
+
braille: "Braille",
|
|
18412
|
+
orbit: "Orbit",
|
|
18413
|
+
snake: "Snake",
|
|
18414
|
+
sparkle: "Sparkle"
|
|
18415
|
+
};
|
|
18416
|
+
function isSubagentSpinnerName(value) {
|
|
18417
|
+
return typeof value == "string" && SUBAGENT_SPINNER_NAMES.includes(value);
|
|
18418
|
+
}
|
|
18419
|
+
|
|
18413
18420
|
// packages/coding-agent/dist/core/settings-manager.js
|
|
18414
18421
|
var SKILL_TAG_CHARACTERS = ["+", "~", "$"], DEFAULT_SKILL_TAG_CHARACTER = "+";
|
|
18415
18422
|
function parseSkillTagCharacter(value) {
|
|
18416
18423
|
return value === "~" || value === "$" ? value : DEFAULT_SKILL_TAG_CHARACTER;
|
|
18417
18424
|
}
|
|
18425
|
+
var SUBAGENT_COMMUNICATION_BRIDGE = /* @__PURE__ */ Symbol.for("@lunr/subagent-communication");
|
|
18426
|
+
function bindSubagentCommunicationSetting(manager) {
|
|
18427
|
+
manager ? globalThis[SUBAGENT_COMMUNICATION_BRIDGE] = manager : delete globalThis[SUBAGENT_COMMUNICATION_BRIDGE];
|
|
18428
|
+
}
|
|
18429
|
+
function subagentCommunicationEnabled(cwd, agentDir = getAgentDir()) {
|
|
18430
|
+
let inherited = process.env.PI_SUBAGENT_COMMUNICATION_ENABLED;
|
|
18431
|
+
if (process.env.PI_SUBAGENT_CHILD === "1" && (inherited === "0" || inherited === "1"))
|
|
18432
|
+
return inherited === "1";
|
|
18433
|
+
let active = globalThis[SUBAGENT_COMMUNICATION_BRIDGE];
|
|
18434
|
+
return agentDir === getAgentDir() && active && typeof active.getSubagentCommunicationEnabled == "function" ? active.getSubagentCommunicationEnabled() : inherited === "0" || inherited === "1" ? inherited === "1" : SettingsManager.create(cwd, agentDir, { projectTrusted: !1 }).getSubagentCommunicationEnabled();
|
|
18435
|
+
}
|
|
18418
18436
|
function deepMergeSettings(base, overrides) {
|
|
18419
18437
|
let result = { ...base };
|
|
18420
18438
|
for (let key of Object.keys(overrides)) {
|
|
@@ -18947,7 +18965,7 @@ var FileSettingsStorage = class {
|
|
|
18947
18965
|
// lunr: default permission mode (startup default; per-session mode is in-memory)
|
|
18948
18966
|
getDefaultPermissionMode() {
|
|
18949
18967
|
let value = this.settings.defaultPermissionMode;
|
|
18950
|
-
return value === "
|
|
18968
|
+
return value === "plan" ? "read-only" : value === "auto" || value === "read-only" ? value : "yolo";
|
|
18951
18969
|
}
|
|
18952
18970
|
setDefaultPermissionMode(mode) {
|
|
18953
18971
|
this.globalSettings.defaultPermissionMode = mode, this.markModified("defaultPermissionMode"), this.save();
|
|
@@ -19183,6 +19201,18 @@ var FileSettingsStorage = class {
|
|
|
19183
19201
|
setModelInstructionsMode(mode) {
|
|
19184
19202
|
this.globalSettings.modelInstructions ??= {}, this.globalSettings.modelInstructions.mode = mode, this.markModified("modelInstructions", "mode"), this.save();
|
|
19185
19203
|
}
|
|
19204
|
+
getSubagentCommunicationEnabled() {
|
|
19205
|
+
return this.globalSettings.subagentCommunicationEnabled ?? !0;
|
|
19206
|
+
}
|
|
19207
|
+
setSubagentCommunicationEnabled(enabled) {
|
|
19208
|
+
this.globalSettings.subagentCommunicationEnabled = enabled, this.markModified("subagentCommunicationEnabled"), this.save();
|
|
19209
|
+
}
|
|
19210
|
+
getAutomaticSubagentDelegation() {
|
|
19211
|
+
return this.settings.automaticSubagentDelegation ?? !0;
|
|
19212
|
+
}
|
|
19213
|
+
setAutomaticSubagentDelegation(enabled) {
|
|
19214
|
+
this.globalSettings.automaticSubagentDelegation = enabled, this.markModified("automaticSubagentDelegation"), this.save();
|
|
19215
|
+
}
|
|
19186
19216
|
getConfirmLargeSubagentLaunches() {
|
|
19187
19217
|
return this.settings.confirmLargeSubagentLaunches ?? !0;
|
|
19188
19218
|
}
|
|
@@ -19219,9 +19249,13 @@ export {
|
|
|
19219
19249
|
formatHttpIdleTimeoutMs,
|
|
19220
19250
|
applyHttpProxySettings,
|
|
19221
19251
|
configureHttpDispatcher,
|
|
19252
|
+
SUBAGENT_SPINNER_NAMES,
|
|
19253
|
+
SUBAGENT_SPINNER_LABELS,
|
|
19222
19254
|
SKILL_TAG_CHARACTERS,
|
|
19223
19255
|
DEFAULT_SKILL_TAG_CHARACTER,
|
|
19224
19256
|
parseSkillTagCharacter,
|
|
19257
|
+
bindSubagentCommunicationSetting,
|
|
19258
|
+
subagentCommunicationEnabled,
|
|
19225
19259
|
FileSettingsStorage,
|
|
19226
19260
|
InMemorySettingsStorage,
|
|
19227
19261
|
SettingsManager
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
showStartupInput,
|
|
4
|
+
showStartupSelector
|
|
5
|
+
} from "./chunk-2HHLJWGD.js";
|
|
6
|
+
import {
|
|
7
|
+
getProjectTrustOptions,
|
|
8
|
+
hasTrustRequiringProjectResources
|
|
9
|
+
} from "./chunk-HTFRRDSF.js";
|
|
10
|
+
import {
|
|
11
|
+
emitProjectTrustEvent
|
|
12
|
+
} from "./chunk-GJ2RDBRL.js";
|
|
13
|
+
import {
|
|
14
|
+
APP_NAME,
|
|
15
|
+
CONFIG_DIR_NAME
|
|
16
|
+
} from "./chunk-FQMM2EZ2.js";
|
|
17
|
+
|
|
18
|
+
// packages/coding-agent/dist/cli/project-trust.js
|
|
19
|
+
import chalk from "chalk";
|
|
20
|
+
function createProjectTrustContext(options) {
|
|
21
|
+
return {
|
|
22
|
+
cwd: options.cwd,
|
|
23
|
+
mode: options.mode === "interactive" ? "tui" : options.mode,
|
|
24
|
+
hasUI: options.hasUI,
|
|
25
|
+
ui: {
|
|
26
|
+
select: async (title, selectOptions) => {
|
|
27
|
+
if (options.hasUI && options.mode === "interactive")
|
|
28
|
+
return showStartupSelector(options.settingsManager, title, selectOptions.map((option) => ({ label: option, value: option })));
|
|
29
|
+
},
|
|
30
|
+
confirm: async (title, message) => !options.hasUI || options.mode !== "interactive" ? !1 : await showStartupSelector(options.settingsManager, `${title}
|
|
31
|
+
${message}`, [
|
|
32
|
+
{ label: "Yes", value: !0 },
|
|
33
|
+
{ label: "No", value: !1 }
|
|
34
|
+
]) ?? !1,
|
|
35
|
+
input: async (title, placeholder) => {
|
|
36
|
+
if (options.hasUI && options.mode === "interactive")
|
|
37
|
+
return showStartupInput(options.settingsManager, title, placeholder);
|
|
38
|
+
},
|
|
39
|
+
notify: (message, type = "info") => {
|
|
40
|
+
if (options.mode !== "interactive") {
|
|
41
|
+
let color = type === "error" ? chalk.red : type === "warning" ? chalk.yellow : chalk.cyan;
|
|
42
|
+
console.error(color(message));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// packages/coding-agent/dist/core/project-trust.js
|
|
50
|
+
function formatProjectTrustPrompt(cwd) {
|
|
51
|
+
return `Trust project folder?
|
|
52
|
+
${cwd}
|
|
53
|
+
|
|
54
|
+
This allows ${APP_NAME} to load ${CONFIG_DIR_NAME} settings and resources, install missing project packages, and execute project extensions.`;
|
|
55
|
+
}
|
|
56
|
+
async function selectProjectTrustOption(cwd, ctx) {
|
|
57
|
+
let options = getProjectTrustOptions(cwd, { includeSessionOnly: !0 }), selected = await ctx.ui.select(formatProjectTrustPrompt(cwd), options.map((option) => option.label));
|
|
58
|
+
return options.find((option) => option.label === selected);
|
|
59
|
+
}
|
|
60
|
+
function saveProjectTrustPromptResult(trustStore, result) {
|
|
61
|
+
result.updates.length > 0 && trustStore.setMany(result.updates);
|
|
62
|
+
}
|
|
63
|
+
async function resolveProjectTrusted(options) {
|
|
64
|
+
if (options.trustOverride !== void 0)
|
|
65
|
+
return options.trustOverride;
|
|
66
|
+
if (!hasTrustRequiringProjectResources(options.cwd))
|
|
67
|
+
return !0;
|
|
68
|
+
if (options.extensionsResult) {
|
|
69
|
+
let { result, errors } = await emitProjectTrustEvent(options.extensionsResult, { type: "project_trust", cwd: options.cwd }, options.projectTrustContext);
|
|
70
|
+
for (let error of errors)
|
|
71
|
+
options.onExtensionError?.(`Extension "${error.extensionPath}" project_trust error: ${error.error}`);
|
|
72
|
+
if (result) {
|
|
73
|
+
let trusted = result.trusted === "yes";
|
|
74
|
+
return result.remember === !0 && options.trustStore.set(options.cwd, trusted), trusted;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
let decision = options.trustStore.get(options.cwd);
|
|
78
|
+
if (decision !== null)
|
|
79
|
+
return decision;
|
|
80
|
+
switch (options.defaultProjectTrust ?? "ask") {
|
|
81
|
+
case "always":
|
|
82
|
+
return !0;
|
|
83
|
+
case "never":
|
|
84
|
+
return !1;
|
|
85
|
+
case "ask":
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
if (!options.projectTrustContext.hasUI)
|
|
89
|
+
return !1;
|
|
90
|
+
let selected = await selectProjectTrustOption(options.cwd, options.projectTrustContext);
|
|
91
|
+
return selected !== void 0 ? (saveProjectTrustPromptResult(options.trustStore, selected), selected.trusted) : !1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
createProjectTrustContext,
|
|
96
|
+
resolveProjectTrusted
|
|
97
|
+
};
|
|
@@ -22,6 +22,7 @@ function defaultGatewayConfig() {
|
|
|
22
22
|
return {
|
|
23
23
|
owners: { telegram: [], discord: [] },
|
|
24
24
|
projectRoots: [],
|
|
25
|
+
defaultProject: void 0,
|
|
25
26
|
telegram: defaultPlatformConfig(!1),
|
|
26
27
|
discord: { ...defaultPlatformConfig(!0), ignoredChannels: [], autoThread: !0 },
|
|
27
28
|
groupSessionsPerUser: !0,
|
|
@@ -69,6 +70,7 @@ function sanitizeConfig(raw) {
|
|
|
69
70
|
return {
|
|
70
71
|
owners: { telegram: asStringArray(owners.telegram) ?? [], discord: asStringArray(owners.discord) ?? [] },
|
|
71
72
|
projectRoots: asStringArray(r.projectRoots) ?? [],
|
|
73
|
+
defaultProject: typeof r.defaultProject == "string" ? r.defaultProject : void 0,
|
|
72
74
|
telegram: sanitizePlatform(r.telegram, base.telegram),
|
|
73
75
|
discord: sanitizeDiscord(r.discord, base.discord),
|
|
74
76
|
groupSessionsPerUser: asBoolean(r.groupSessionsPerUser) ?? base.groupSessionsPerUser,
|
|
@@ -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>/;
|