@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
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-US544NN6.js";
|
|
9
9
|
import {
|
|
10
10
|
computeContextBreakdown
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CDVHZOOK.js";
|
|
12
12
|
import {
|
|
13
13
|
copyToClipboard,
|
|
14
14
|
readClipboardText
|
|
@@ -45,13 +45,13 @@ import {
|
|
|
45
45
|
peekRollbackTurnsConsumed,
|
|
46
46
|
rollbackLastTurn,
|
|
47
47
|
setRollbackWarningHandler
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-VQFSUJJG.js";
|
|
49
49
|
import {
|
|
50
50
|
notifyTodosEnabledChanged
|
|
51
51
|
} from "./chunk-CCCN2UCX.js";
|
|
52
52
|
import {
|
|
53
53
|
parseGitUrl
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-LQP3RB67.js";
|
|
55
55
|
import {
|
|
56
56
|
createAllToolDefinitions,
|
|
57
57
|
ensureTool,
|
|
@@ -80,17 +80,15 @@ import {
|
|
|
80
80
|
hasGrokCliXaiAuth,
|
|
81
81
|
refreshModelCandidatesForInit,
|
|
82
82
|
stripJsonComments
|
|
83
|
-
} from "./chunk-
|
|
83
|
+
} from "./chunk-KJ6DWS3K.js";
|
|
84
84
|
import {
|
|
85
85
|
HTTP_IDLE_TIMEOUT_CHOICES,
|
|
86
86
|
SKILL_TAG_CHARACTERS,
|
|
87
|
+
SUBAGENT_SPINNER_LABELS,
|
|
88
|
+
SUBAGENT_SPINNER_NAMES,
|
|
87
89
|
configureHttpDispatcher,
|
|
88
90
|
formatHttpIdleTimeoutMs
|
|
89
|
-
} from "./chunk-
|
|
90
|
-
import {
|
|
91
|
-
SUBAGENT_SPINNER_LABELS,
|
|
92
|
-
SUBAGENT_SPINNER_NAMES
|
|
93
|
-
} from "./chunk-LISUTZS3.js";
|
|
91
|
+
} from "./chunk-6XL67VVY.js";
|
|
94
92
|
import {
|
|
95
93
|
ProjectTrustStore,
|
|
96
94
|
getProjectTrustOptions,
|
|
@@ -103,21 +101,21 @@ import {
|
|
|
103
101
|
extractFileOpsFromMessage,
|
|
104
102
|
findExactModelReferenceMatch,
|
|
105
103
|
resolveModelScope
|
|
106
|
-
} from "./chunk-
|
|
104
|
+
} from "./chunk-GYIXXQAO.js";
|
|
107
105
|
import {
|
|
108
106
|
SubagentEscapeSequence,
|
|
109
107
|
getSubagentCancellation
|
|
110
108
|
} from "./chunk-BBUVIEZB.js";
|
|
111
109
|
import {
|
|
112
110
|
AUTO_MODE_ADDENDUM,
|
|
113
|
-
|
|
111
|
+
READ_ONLY_MODE_ADDENDUM,
|
|
114
112
|
getPermissionMode,
|
|
115
113
|
nextPermissionMode,
|
|
116
114
|
registerApprovalHandler,
|
|
117
115
|
resetPermissions,
|
|
118
116
|
restorePermissionModeAfterPlan,
|
|
119
117
|
setPermissionMode
|
|
120
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-ZXSGTGJ6.js";
|
|
121
119
|
import {
|
|
122
120
|
getGlobalInstructionsPath,
|
|
123
121
|
getModelInstructionsPath
|
|
@@ -141,11 +139,11 @@ import {
|
|
|
141
139
|
recordTuiActivity,
|
|
142
140
|
registerTransferHandler,
|
|
143
141
|
requestSessionTransfer
|
|
144
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-I54LGHWM.js";
|
|
145
143
|
import {
|
|
146
144
|
SessionManager,
|
|
147
145
|
sessionEntryToContextMessages
|
|
148
|
-
} from "./chunk-
|
|
146
|
+
} from "./chunk-2KIPT4HJ.js";
|
|
149
147
|
import {
|
|
150
148
|
createCompactionSummaryMessage
|
|
151
149
|
} from "./chunk-FVDOXRUD.js";
|
|
@@ -709,15 +707,15 @@ var BUILTIN_SLASH_COMMANDS = [
|
|
|
709
707
|
{ name: "context", description: "Show estimated context window breakdown" },
|
|
710
708
|
{
|
|
711
709
|
name: "plan",
|
|
712
|
-
description: "
|
|
710
|
+
description: "Use read-only mode to plan a task, or /plan <task> to start planning",
|
|
713
711
|
argumentHint: "[on|off|status|<task>]"
|
|
714
712
|
},
|
|
715
713
|
{
|
|
716
714
|
name: "mode",
|
|
717
|
-
description: "Set permission mode:
|
|
718
|
-
argumentHint: "[
|
|
715
|
+
description: "Set permission mode: yolo, auto, or read",
|
|
716
|
+
argumentHint: "[yolo|auto|read]"
|
|
719
717
|
},
|
|
720
|
-
{ name: "
|
|
718
|
+
{ name: "read", description: "Activate read-only permission mode" },
|
|
721
719
|
{ name: "yolo", description: "Activate YOLO permission mode (auto-approve tools)" },
|
|
722
720
|
{ name: "auto", description: "Activate auto permission mode (fully autonomous, no questions)" },
|
|
723
721
|
{ name: "processes", description: "View and manage background processes started this session" },
|
|
@@ -1296,7 +1294,7 @@ var THINKING_TAIL_LINES = 4, ThinkingTailComponent = class {
|
|
|
1296
1294
|
}
|
|
1297
1295
|
render(width) {
|
|
1298
1296
|
if (width <= 0)
|
|
1299
|
-
return ["", ""
|
|
1297
|
+
return ["", ""];
|
|
1300
1298
|
let lines = this.markdown.render(width), latest = "";
|
|
1301
1299
|
for (let index = lines.length - 1; index >= 0 && (latest = stripAnsi(lines[index]).trimEnd(), !latest.trim()); index--)
|
|
1302
1300
|
;
|
|
@@ -1305,7 +1303,7 @@ var THINKING_TAIL_LINES = 4, ThinkingTailComponent = class {
|
|
|
1305
1303
|
let cells = visibleWidth2(segment), distance = Math.abs(column + cells / 2 - center) / band, intensity = distance >= 1 ? 0 : (1 + Math.cos(Math.PI * distance)) / 2;
|
|
1306
1304
|
highlighted += this.palette[Math.round(intensity * (this.palette.length - 1))] + segment, column += cells;
|
|
1307
1305
|
}
|
|
1308
|
-
return ["", `\x1B[3m${highlighted}\x1B[23m\x1B[39m
|
|
1306
|
+
return ["", `\x1B[3m${highlighted}\x1B[23m\x1B[39m`];
|
|
1309
1307
|
}
|
|
1310
1308
|
};
|
|
1311
1309
|
|
|
@@ -3725,8 +3723,8 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3725
3723
|
id: "default-permission-mode",
|
|
3726
3724
|
label: "Default permission mode",
|
|
3727
3725
|
description: "Starting permission mode for new sessions",
|
|
3728
|
-
currentValue: config.defaultPermissionMode,
|
|
3729
|
-
values: ["
|
|
3726
|
+
currentValue: config.defaultPermissionMode === "read-only" ? "read" : config.defaultPermissionMode,
|
|
3727
|
+
values: ["yolo", "auto", "read"]
|
|
3730
3728
|
},
|
|
3731
3729
|
{
|
|
3732
3730
|
id: "double-escape-action",
|
|
@@ -3776,6 +3774,20 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3776
3774
|
currentValue: config.modelInstructions.enabled ? "on" : "off",
|
|
3777
3775
|
submenu: (_currentValue, done) => new ModelInstructionsSubmenu(config, callbacks, done)
|
|
3778
3776
|
},
|
|
3777
|
+
{
|
|
3778
|
+
id: "subagent-communication",
|
|
3779
|
+
label: "Subagent communication",
|
|
3780
|
+
description: "Allow parent and child to exchange messages during a task",
|
|
3781
|
+
currentValue: config.subagentCommunicationEnabled ? "on" : "off",
|
|
3782
|
+
values: ["on", "off"]
|
|
3783
|
+
},
|
|
3784
|
+
{
|
|
3785
|
+
id: "automatic-subagent-delegation",
|
|
3786
|
+
label: "Automatic subagent delegation",
|
|
3787
|
+
description: "Let the agent decide when to delegate work",
|
|
3788
|
+
currentValue: config.automaticSubagentDelegation ? "on" : "off",
|
|
3789
|
+
values: ["on", "off"]
|
|
3790
|
+
},
|
|
3779
3791
|
{
|
|
3780
3792
|
id: "confirm-large-subagent-launches",
|
|
3781
3793
|
label: "Confirm large subagent launches",
|
|
@@ -3969,6 +3981,12 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3969
3981
|
case "smooth-streaming":
|
|
3970
3982
|
callbacks.onSmoothStreamingChange(newValue === "true");
|
|
3971
3983
|
break;
|
|
3984
|
+
case "subagent-communication":
|
|
3985
|
+
callbacks.onSubagentCommunicationChange(newValue === "on");
|
|
3986
|
+
break;
|
|
3987
|
+
case "automatic-subagent-delegation":
|
|
3988
|
+
callbacks.onAutomaticSubagentDelegationChange(newValue === "on");
|
|
3989
|
+
break;
|
|
3972
3990
|
case "plan-usage-window":
|
|
3973
3991
|
callbacks.onPlanUsageWindowChange(newValue === "5h" ? "5h" : "weekly");
|
|
3974
3992
|
break;
|
|
@@ -3996,7 +4014,7 @@ var ThemeSubmenu = class extends Container13 {
|
|
|
3996
4014
|
break;
|
|
3997
4015
|
}
|
|
3998
4016
|
case "default-permission-mode":
|
|
3999
|
-
callbacks.onDefaultPermissionModeChange(newValue);
|
|
4017
|
+
callbacks.onDefaultPermissionModeChange(newValue === "read" ? "read-only" : newValue);
|
|
4000
4018
|
break;
|
|
4001
4019
|
case "double-escape-action":
|
|
4002
4020
|
callbacks.onDoubleEscapeActionChange(newValue);
|
|
@@ -4191,13 +4209,18 @@ var ToolExecutionComponent = class extends Container14 {
|
|
|
4191
4209
|
let state = this.isPartial ? "pending" : this.result?.isError ? "error" : "success";
|
|
4192
4210
|
return toolStatusDot(state, theme);
|
|
4193
4211
|
}
|
|
4212
|
+
getWaitDuration() {
|
|
4213
|
+
return this.toolName !== "subagent_wait" || this.isPartial || this.expanded ? void 0 : /^(?:Waited |Wait (?:timed out|aborted) after )(\d+(?:ms|[smhd])(?:\d+[smhd])*)\b/.exec(this.getTextOutput())?.[1];
|
|
4214
|
+
}
|
|
4194
4215
|
createCallFallback() {
|
|
4216
|
+
let waitDuration = this.getWaitDuration();
|
|
4195
4217
|
return new Text17(formatGroupedCall({
|
|
4196
4218
|
role: toolGroupRole(this.groupContinuation, this.groupFollowed),
|
|
4197
4219
|
compact: !this.isPartial && !this.expanded && !this.result?.isError,
|
|
4198
4220
|
tree: toolGroupTree({ expanded: this.expanded, isError: this.result?.isError }),
|
|
4199
4221
|
dot: this.getStatusDot(),
|
|
4200
|
-
title: theme.fg("toolTitle", theme.bold(this.toolName))
|
|
4222
|
+
title: theme.fg("toolTitle", theme.bold(this.toolName)),
|
|
4223
|
+
detail: waitDuration && theme.fg("toolOutput", waitDuration)
|
|
4201
4224
|
}), 0, 0);
|
|
4202
4225
|
}
|
|
4203
4226
|
createResultFallback() {
|
|
@@ -4235,7 +4258,7 @@ var ToolExecutionComponent = class extends Container14 {
|
|
|
4235
4258
|
this.toolName !== "browser" && (this.expanded = expanded, this.updateDisplay(), this.refreshGroupTail());
|
|
4236
4259
|
}
|
|
4237
4260
|
handleClick(_localY, _width) {
|
|
4238
|
-
return this.isPartial || this.toolName === "browser" || this.toolName === "subagent"
|
|
4261
|
+
return this.isPartial || this.toolName === "browser" || this.toolName === "subagent" ? !1 : (this.setExpanded(!this.expanded), this.ui.requestRender(), !0);
|
|
4239
4262
|
}
|
|
4240
4263
|
beginNextExecution(toolCallId, args) {
|
|
4241
4264
|
this.toolCallId = toolCallId, this.args = args, this.result = void 0, this.isPartial = !0, this.executionStarted = !1, this.argsComplete = !1, this.expanded = !1, this.disposeComponent(this.resultRendererComponent), this.resultRendererComponent = void 0, this.updateDisplay();
|
|
@@ -4282,7 +4305,7 @@ var ToolExecutionComponent = class extends Container14 {
|
|
|
4282
4305
|
let details = this.result.details;
|
|
4283
4306
|
return !this.result.isError && this.args?.action === "steer" ? !0 : !(this.result.isError || Array.isArray(details?.results) && details.results.length > 0 || details?.mode === "management");
|
|
4284
4307
|
}
|
|
4285
|
-
return this.toolName === "subagent_wait"
|
|
4308
|
+
return this.toolName === "subagent_wait" || this.result.isError ? !0 : this.getRenderShell() === "default";
|
|
4286
4309
|
}
|
|
4287
4310
|
refreshGroupTail() {
|
|
4288
4311
|
let next = this.groupNext;
|
|
@@ -4379,12 +4402,13 @@ var ToolExecutionComponent = class extends Container14 {
|
|
|
4379
4402
|
return getTextOutput(this.result, this.showImages);
|
|
4380
4403
|
}
|
|
4381
4404
|
formatToolExecution() {
|
|
4382
|
-
let compact = !this.isPartial && !this.expanded, text = formatGroupedCall({
|
|
4405
|
+
let compact = !this.isPartial && !this.expanded, waitDuration = this.getWaitDuration(), text = formatGroupedCall({
|
|
4383
4406
|
role: toolGroupRole(this.groupContinuation, this.groupFollowed),
|
|
4384
4407
|
compact,
|
|
4385
4408
|
tree: toolGroupTree({ expanded: this.expanded, isError: this.result?.isError }),
|
|
4386
4409
|
dot: this.getStatusDot(),
|
|
4387
|
-
title: theme.fg("toolTitle", theme.bold(this.toolName))
|
|
4410
|
+
title: theme.fg("toolTitle", theme.bold(this.toolName)),
|
|
4411
|
+
detail: waitDuration && theme.fg("toolOutput", waitDuration)
|
|
4388
4412
|
});
|
|
4389
4413
|
if (!compact) {
|
|
4390
4414
|
let content = JSON.stringify(this.args, null, 2);
|
|
@@ -5541,7 +5565,7 @@ function isDeadTerminalError(error) {
|
|
|
5541
5565
|
let code = error.code;
|
|
5542
5566
|
return code !== void 0 && DEAD_TERMINAL_ERROR_CODES.has(code);
|
|
5543
5567
|
}
|
|
5544
|
-
var ANTHROPIC_SUBSCRIPTION_AUTH_WARNING = "Anthropic subscription
|
|
5568
|
+
var ANTHROPIC_SUBSCRIPTION_AUTH_WARNING = "Claude Code handles Anthropic subscription authentication. lunR retains tool execution and conversation state. Check your Claude account for usage and any extra charges.", ANTHROPIC_TOS_DISCLAIMER = "Connecting an Anthropic subscription through Claude Code may be subject to Anthropic's Terms of Service (https://www.anthropic.com/legal/consumer-terms). Claude Code authenticates each lunR generation; lunR keeps its own tools and history. Continue?", INIT_PROMPT = `Analyze this codebase and write a starter AGENTS.md in the project root.
|
|
5545
5569
|
Scan: package manifests, directory layout, build/test/lint scripts, CI config,
|
|
5546
5570
|
existing README/docs. Include only: project purpose (one paragraph), build &
|
|
5547
5571
|
test commands, code style/conventions found, directory map, and agent rules
|
|
@@ -5676,8 +5700,7 @@ var InteractiveMode = class _InteractiveMode {
|
|
|
5676
5700
|
signalCleanupHandlers = [];
|
|
5677
5701
|
// Track if editor is in bash mode (text starts with !)
|
|
5678
5702
|
isBashMode = !1;
|
|
5679
|
-
//
|
|
5680
|
-
// / `/plan <text>` to leave plan. Shift+Tab and `/mode` pick the destination themselves.
|
|
5703
|
+
// Restore the previous mode after approving a plan or leaving read-only via /plan.
|
|
5681
5704
|
previousPermissionMode;
|
|
5682
5705
|
// lunr: mode in effect before `/goal` forced session auto. Dedicated so it cannot
|
|
5683
5706
|
// collide with plan restore.
|
|
@@ -5864,9 +5887,13 @@ var InteractiveMode = class _InteractiveMode {
|
|
|
5864
5887
|
return this.showLargeSubagentLaunchApprovalDialog(req);
|
|
5865
5888
|
if (req.kind === "plan") {
|
|
5866
5889
|
let resp = await this.showPlanApprovalDialog(req.detail);
|
|
5867
|
-
|
|
5890
|
+
if ((typeof resp == "string" ? resp : resp.decision) !== "reject") {
|
|
5891
|
+
let target = this.restoreTargetAfterPlan();
|
|
5892
|
+
this.applyPermissionMode(target === "read-only" ? "yolo" : target);
|
|
5893
|
+
}
|
|
5894
|
+
return resp;
|
|
5868
5895
|
}
|
|
5869
|
-
return
|
|
5896
|
+
return "reject";
|
|
5870
5897
|
}), initRollback(this.settingsManager, this.sessionManager.getSessionId()), setRollbackWarningHandler((msg) => this.showStatus(msg)), this.syncPermissionModeEffects(this.sessionManager.getPermissionMode() ?? this.settingsManager.getDefaultPermissionMode()), await this.themeController.applyFromSettings(), this.headerContainer.clear(), this.options.verbose || !this.settingsManager.getQuietStartup()) {
|
|
5871
5898
|
let header = theme.bold(theme.fg("accent", APP_NAME)) + theme.fg("dim", ` v${this.version}`);
|
|
5872
5899
|
this.builtInHeader = new BootScreenComponent(header, this.buildBootRows()), this.headerContainer.addChild(new Spacer19(1)), this.headerContainer.addChild(this.builtInHeader);
|
|
@@ -6948,7 +6975,7 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
6948
6975
|
}
|
|
6949
6976
|
return;
|
|
6950
6977
|
}
|
|
6951
|
-
if (text && !this.runtimeHost.isDetached && (!text.startsWith("/") || /^\/(?:model|thinking|effort|reasoning|off|minimal|low|medium|high|xhigh|max|mode|plan|
|
|
6978
|
+
if (text && !this.runtimeHost.isDetached && (!text.startsWith("/") || /^\/(?:model|thinking|effort|reasoning|off|minimal|low|medium|high|xhigh|max|mode|plan|read|yolo|auto|name|title|undo|edit|redo|tree|compact)(?:\s|$)/.test(text)) && recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir), !text) {
|
|
6952
6979
|
this.takeSubmittedImages(text);
|
|
6953
6980
|
return;
|
|
6954
6981
|
}
|
|
@@ -7046,8 +7073,8 @@ ${message}`, ["Yes", "No"], opts) === "Yes";
|
|
|
7046
7073
|
this.editor.setText(""), this.handleModeCommand(text === "/mode" ? "" : text.slice(6).trim());
|
|
7047
7074
|
return;
|
|
7048
7075
|
}
|
|
7049
|
-
if (text === "/
|
|
7050
|
-
this.editor.setText(""), this.applyPermissionMode(text.slice(1));
|
|
7076
|
+
if (text === "/read" || text === "/yolo" || text === "/auto") {
|
|
7077
|
+
this.editor.setText(""), this.applyPermissionMode(text === "/read" ? "read-only" : text.slice(1));
|
|
7051
7078
|
return;
|
|
7052
7079
|
}
|
|
7053
7080
|
if (text === "/processes") {
|
|
@@ -7965,6 +7992,8 @@ Pi will resume when the editor exits.
|
|
|
7965
7992
|
globalInstructionsPath: getGlobalInstructionsPath(getAgentDir()),
|
|
7966
7993
|
modelInstructionsPath: getModelInstructionsPath(getAgentDir(), this.session.model?.id ?? "no-model-selected"),
|
|
7967
7994
|
confirmLargeSubagentLaunches: this.settingsManager.getConfirmLargeSubagentLaunches(),
|
|
7995
|
+
subagentCommunicationEnabled: this.settingsManager.getSubagentCommunicationEnabled(),
|
|
7996
|
+
automaticSubagentDelegation: this.settingsManager.getAutomaticSubagentDelegation(),
|
|
7968
7997
|
browserEnabled: this.settingsManager.getBrowserEnabled(),
|
|
7969
7998
|
memoryEnabled: this.settingsManager.getMemoryEnabled(),
|
|
7970
7999
|
memoryCharCap: this.settingsManager.getMemoryCharCap(),
|
|
@@ -8122,6 +8151,12 @@ Pi will resume when the editor exits.
|
|
|
8122
8151
|
onConfirmLargeSubagentLaunchesChange: (enabled) => {
|
|
8123
8152
|
this.settingsManager.setConfirmLargeSubagentLaunches(enabled);
|
|
8124
8153
|
},
|
|
8154
|
+
onSubagentCommunicationChange: (enabled) => {
|
|
8155
|
+
this.settingsManager.setSubagentCommunicationEnabled(enabled);
|
|
8156
|
+
},
|
|
8157
|
+
onAutomaticSubagentDelegationChange: (enabled) => {
|
|
8158
|
+
this.settingsManager.setAutomaticSubagentDelegation(enabled), this.session.refreshToolRegistry();
|
|
8159
|
+
},
|
|
8125
8160
|
getTierThinkingLevels: (tier) => {
|
|
8126
8161
|
let model = this.resolveModelReference(this.settingsManager.getTierModel(tier));
|
|
8127
8162
|
return model ? getSupportedThinkingLevels(model) : this.session.getAvailableThinkingLevels();
|
|
@@ -8182,7 +8217,7 @@ Pi will resume when the editor exits.
|
|
|
8182
8217
|
return;
|
|
8183
8218
|
}
|
|
8184
8219
|
if (action === "status") {
|
|
8185
|
-
this.showStatus((await import("./service-
|
|
8220
|
+
this.showStatus((await import("./service-MDQIPQ26.js")).serviceStatusText());
|
|
8186
8221
|
return;
|
|
8187
8222
|
}
|
|
8188
8223
|
this.ui.stop();
|
|
@@ -8197,7 +8232,7 @@ Pi will resume when the editor exits.
|
|
|
8197
8232
|
} finally {
|
|
8198
8233
|
this.ui.start(), this.ui.requestRender(!0);
|
|
8199
8234
|
}
|
|
8200
|
-
this.showStatus((await import("./service-
|
|
8235
|
+
this.showStatus((await import("./service-MDQIPQ26.js")).serviceStatusText());
|
|
8201
8236
|
})().catch((error) => this.showStatus(error instanceof Error ? error.message : String(error)));
|
|
8202
8237
|
},
|
|
8203
8238
|
onDefaultPermissionModeChange: (mode) => {
|
|
@@ -8701,8 +8736,8 @@ Pi will resume when the editor exits.
|
|
|
8701
8736
|
}
|
|
8702
8737
|
async getLogoutProviderOptions() {
|
|
8703
8738
|
let options = [];
|
|
8704
|
-
for (let { providerId, type } of await this.session.modelRuntime.listCredentials()) {
|
|
8705
|
-
let name = this.session.modelRuntime.getProvider(providerId)?.name ?? providerId, status = { type, source: "stored credential" };
|
|
8739
|
+
for (let { providerId, type: credentialType } of await this.session.modelRuntime.listCredentials()) {
|
|
8740
|
+
let type = credentialType === "external_claude_code" ? "oauth" : credentialType, name = this.session.modelRuntime.getProvider(providerId)?.name ?? providerId, status = { type, source: "stored credential" };
|
|
8706
8741
|
if (type === "api_key") {
|
|
8707
8742
|
let subs = await this.session.modelRuntime.subscriptionManager.list(providerId);
|
|
8708
8743
|
if (subs.length > 1) {
|
|
@@ -9106,7 +9141,22 @@ Pi will resume when the editor exits.
|
|
|
9106
9141
|
return this.session.modelRuntime.login(providerId, method, {
|
|
9107
9142
|
signal: dialog.signal,
|
|
9108
9143
|
prompt: (prompt) => this.showAuthPrompt(dialog, prompt),
|
|
9109
|
-
notify: (event) => this.notifyAuthDialog(dialog, event)
|
|
9144
|
+
notify: (event) => this.notifyAuthDialog(dialog, event),
|
|
9145
|
+
handoff: async (command, args, env) => {
|
|
9146
|
+
this.ui.stop();
|
|
9147
|
+
try {
|
|
9148
|
+
await new Promise((resolve4, reject) => {
|
|
9149
|
+
let child = spawn3(command, [...args], { stdio: "inherit", env, windowsHide: !1 }), abort = () => child.kill();
|
|
9150
|
+
dialog.signal.addEventListener("abort", abort, { once: !0 }), dialog.signal.aborted && abort(), child.once("error", (error) => {
|
|
9151
|
+
dialog.signal.removeEventListener("abort", abort), reject(error);
|
|
9152
|
+
}), child.once("close", (code) => {
|
|
9153
|
+
dialog.signal.removeEventListener("abort", abort), code === 0 ? resolve4() : reject(new Error("Claude Code login did not complete"));
|
|
9154
|
+
});
|
|
9155
|
+
});
|
|
9156
|
+
} finally {
|
|
9157
|
+
this.ui.start();
|
|
9158
|
+
}
|
|
9159
|
+
}
|
|
9110
9160
|
});
|
|
9111
9161
|
}
|
|
9112
9162
|
async showLoginDialog(providerId, providerName) {
|
|
@@ -9564,56 +9614,54 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9564
9614
|
this.chatContainer.addChild(new Spacer19(1)), this.chatContainer.addChild(new Text21(lines.join(`
|
|
9565
9615
|
`), 1, 0)), this.ui.requestRender();
|
|
9566
9616
|
}
|
|
9567
|
-
//
|
|
9617
|
+
// /plan is a shortcut into read-only mode for planning.
|
|
9568
9618
|
async handlePlanCommand(args) {
|
|
9569
|
-
let sub = args.toLowerCase(),
|
|
9619
|
+
let sub = args.toLowerCase(), inReadOnly = getPermissionMode() === "read-only";
|
|
9570
9620
|
if (sub === "status") {
|
|
9571
|
-
this.showStatus(
|
|
9621
|
+
this.showStatus(inReadOnly ? "Read mode is active. /plan off to leave it." : `Permission mode: ${getPermissionMode()}.`);
|
|
9572
9622
|
return;
|
|
9573
9623
|
}
|
|
9574
9624
|
if (sub !== "" && sub !== "on" && sub !== "off") {
|
|
9575
|
-
|
|
9625
|
+
inReadOnly || this.applyPermissionMode("read-only"), await this.sendUserMessageAfterDeferredBuiltins(`Create a plan for: ${args}`);
|
|
9576
9626
|
return;
|
|
9577
9627
|
}
|
|
9578
|
-
let next = sub
|
|
9579
|
-
if (next ===
|
|
9580
|
-
this.showStatus(next ? "
|
|
9628
|
+
let next = sub !== "off";
|
|
9629
|
+
if (next === inReadOnly) {
|
|
9630
|
+
this.showStatus(next ? "Read mode is already active." : "Read mode is already off.");
|
|
9581
9631
|
return;
|
|
9582
9632
|
}
|
|
9583
|
-
next ?
|
|
9633
|
+
this.applyPermissionMode(next ? "read-only" : this.restoreTargetAfterPlan());
|
|
9584
9634
|
}
|
|
9585
|
-
// lunr: /mode — permission mode selector (manual / yolo / plan / auto). Per-session only.
|
|
9586
9635
|
handleModeCommand(args) {
|
|
9587
9636
|
let sub = args.toLowerCase();
|
|
9588
9637
|
if (sub === "status") {
|
|
9589
|
-
this.showStatus(`Permission mode: ${getPermissionMode()}`);
|
|
9638
|
+
this.showStatus(`Permission mode: ${getPermissionMode() === "read-only" ? "read" : getPermissionMode()}`);
|
|
9590
9639
|
return;
|
|
9591
9640
|
}
|
|
9592
|
-
if (sub === "
|
|
9593
|
-
this.applyPermissionMode(sub);
|
|
9641
|
+
if (sub === "yolo" || sub === "auto" || sub === "read-only" || sub === "read") {
|
|
9642
|
+
this.applyPermissionMode(sub === "read" ? "read-only" : sub);
|
|
9594
9643
|
return;
|
|
9595
9644
|
}
|
|
9596
9645
|
if (sub !== "") {
|
|
9597
|
-
this.showStatus("Usage: /mode [
|
|
9646
|
+
this.showStatus("Usage: /mode [yolo|auto|read] \u2014 bare /mode opens the selector.");
|
|
9598
9647
|
return;
|
|
9599
9648
|
}
|
|
9600
9649
|
let options = [
|
|
9601
|
-
"Manual \u2014 approve every action",
|
|
9602
9650
|
"YOLO \u2014 auto-approve tools, agent may still ask",
|
|
9603
|
-
"
|
|
9604
|
-
"
|
|
9651
|
+
"Auto \u2014 fully autonomous, no questions",
|
|
9652
|
+
"Read \u2014 inspect without making changes"
|
|
9605
9653
|
];
|
|
9606
9654
|
this.showExtensionSelector("Permission mode", options).then((choice) => {
|
|
9607
|
-
choice && (choice.startsWith("
|
|
9655
|
+
choice && (choice.startsWith("YOLO") ? this.applyPermissionMode("yolo") : choice.startsWith("Auto") ? this.applyPermissionMode("auto") : choice.startsWith("Read") && this.applyPermissionMode("read-only"));
|
|
9608
9656
|
});
|
|
9609
9657
|
}
|
|
9610
|
-
/** Destination
|
|
9658
|
+
/** Destination after plan approval or /plan off. */
|
|
9611
9659
|
restoreTargetAfterPlan() {
|
|
9612
9660
|
return restorePermissionModeAfterPlan(this.previousPermissionMode, this.settingsManager.getDefaultPermissionMode());
|
|
9613
9661
|
}
|
|
9614
9662
|
/** Apply addendum + auto-rollback for a mode without a status toast. */
|
|
9615
9663
|
syncPermissionModeEffects(mode) {
|
|
9616
|
-
this.runtimeHost.isDetached || this.transferInProgress || (this.sessionManager.setPermissionMode(mode), mode === "
|
|
9664
|
+
this.runtimeHost.isDetached || this.transferInProgress || (this.sessionManager.setPermissionMode(mode), mode === "read-only" ? this.session.setSystemPromptAppend(READ_ONLY_MODE_ADDENDUM) : mode === "auto" ? (this.session.setSystemPromptAppend(AUTO_MODE_ADDENDUM), enableRollbackForSession(this.sessionManager.getSessionId())) : this.session.setSystemPromptAppend(void 0));
|
|
9617
9665
|
}
|
|
9618
9666
|
// lunr: `/goal` forces session auto without writing settings.
|
|
9619
9667
|
enterGoalAuto() {
|
|
@@ -9629,22 +9677,7 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9629
9677
|
return;
|
|
9630
9678
|
this.sessionManager.setPermissionMode(mode), recordTuiActivity(this.sessionManager, this.runtimeHost.services.agentDir);
|
|
9631
9679
|
let prev = getPermissionMode();
|
|
9632
|
-
mode === "
|
|
9633
|
-
}
|
|
9634
|
-
// lunr: approval dialog for manual permission mode.
|
|
9635
|
-
// lunr: adds "Switch to auto" / "Switch to yolo" at the bottom so users can
|
|
9636
|
-
// escape manual approval mid-turn without a separate /mode round-trip.
|
|
9637
|
-
async showApprovalDialog(req) {
|
|
9638
|
-
return new Promise((resolve4) => {
|
|
9639
|
-
this.showSelector((done) => {
|
|
9640
|
-
let selector = new ExtensionSelectorComponent(`Approve ${req.action}?`, ["Approve once", "Approve for session", "Reject", "Switch to auto", "Switch to yolo"], (option) => {
|
|
9641
|
-
done(), option === "Approve once" ? resolve4("once") : option === "Approve for session" ? resolve4("session") : option === "Switch to auto" ? (this.applyPermissionMode("auto"), resolve4("once")) : option === "Switch to yolo" ? (this.applyPermissionMode("yolo"), resolve4("once")) : resolve4("reject");
|
|
9642
|
-
}, () => {
|
|
9643
|
-
done(), resolve4("reject");
|
|
9644
|
-
}, { message: req.detail.slice(0, 500) });
|
|
9645
|
-
return { component: selector, focus: selector };
|
|
9646
|
-
});
|
|
9647
|
-
});
|
|
9680
|
+
mode === "read-only" && prev !== "read-only" && (this.previousPermissionMode = prev), setPermissionMode(mode), this.ui.requestRender(), mode === "read-only" ? this.session.setSystemPromptAppend(READ_ONLY_MODE_ADDENDUM) : mode === "auto" ? this.session.setSystemPromptAppend(AUTO_MODE_ADDENDUM) : this.session.setSystemPromptAppend(void 0), mode === "auto" && prev !== "auto" ? enableRollbackForSession(this.sessionManager.getSessionId()) : mode !== "auto" && prev === "auto" && disableRollbackForSession(this.sessionManager.getSessionId()), !opts?.silent && (mode === "auto" && prev !== "auto" ? this.showStatus("Auto mode active \u2014 fully autonomous. Rollback enabled for this session.") : mode === "read-only" ? this.showStatus("Read mode active. Changes are blocked.") : this.showStatus(`Permission mode: ${mode}`));
|
|
9648
9681
|
}
|
|
9649
9682
|
// Approval dialog for one subagent call launching more than two children.
|
|
9650
9683
|
// "Reject with feedback" collects a one-line
|
|
@@ -9664,7 +9697,7 @@ ${theme.fg("dim", "Cache Re-billed:")} ${detail}`;
|
|
|
9664
9697
|
});
|
|
9665
9698
|
});
|
|
9666
9699
|
}
|
|
9667
|
-
//
|
|
9700
|
+
// Approval dialog for present_plan (read-only mode). The "with feedback"
|
|
9668
9701
|
// options collect a one-line note via showExtensionInput that becomes part of
|
|
9669
9702
|
// the result text the model sees. Esc/close counts as Decline.
|
|
9670
9703
|
showPlanInChat(summary) {
|
|
@@ -90,6 +90,11 @@ function claimGateway(onStop) {
|
|
|
90
90
|
}, 500);
|
|
91
91
|
return {
|
|
92
92
|
update(platforms, state = "ready") {
|
|
93
|
+
if (stopping && state !== "stopping") {
|
|
94
|
+
stopping = !1;
|
|
95
|
+
let control = readJson(controlPath());
|
|
96
|
+
control && typeof control == "object" && "instance" in control && control.instance === status.instance && rmSync(controlPath(), { force: !0 });
|
|
97
|
+
}
|
|
93
98
|
status.platforms = { ...platforms }, status.state = state, save();
|
|
94
99
|
},
|
|
95
100
|
release() {
|
|
@@ -103,8 +108,12 @@ function cliPath() {
|
|
|
103
108
|
}
|
|
104
109
|
var sleep = (ms) => new Promise((resolve2) => setTimeout(resolve2, ms));
|
|
105
110
|
async function startGatewayService() {
|
|
106
|
-
if (gatewayIsRunning())
|
|
107
|
-
|
|
111
|
+
if (gatewayIsRunning()) {
|
|
112
|
+
if (readGatewayStatus()?.state === "ready")
|
|
113
|
+
return "Gateway is already running.";
|
|
114
|
+
throw new Error(`Gateway process is running but no bot is connected. ${serviceStatusText()}
|
|
115
|
+
Inspect ${gatewayLogPath()}`);
|
|
116
|
+
}
|
|
108
117
|
mkdirSync(serviceDirectory(), { recursive: !0, mode: 448 });
|
|
109
118
|
let startup = loadServiceSettings().startup;
|
|
110
119
|
if (startup !== "off") {
|
|
@@ -122,7 +131,8 @@ async function startGatewayService() {
|
|
|
122
131
|
return "Gateway started.";
|
|
123
132
|
await sleep(200);
|
|
124
133
|
}
|
|
125
|
-
throw new Error(`Startup service did not
|
|
134
|
+
throw new Error(`Startup service did not connect within 20 seconds. ${serviceStatusText()}
|
|
135
|
+
Run lunr gateway doctor and inspect ${gatewayLogPath()}`);
|
|
126
136
|
}
|
|
127
137
|
let { openSync, closeSync } = await import("node:fs"), log = openSync(gatewayLogPath(), "a", 384), child = spawn(process.execPath, [cliPath(), "gateway", "run"], {
|
|
128
138
|
cwd: homedir(),
|
|
@@ -146,7 +156,8 @@ async function startGatewayService() {
|
|
|
146
156
|
throw new Error(`Gateway exited with code ${child.exitCode}. See ${gatewayLogPath()}`);
|
|
147
157
|
await sleep(200);
|
|
148
158
|
}
|
|
149
|
-
throw new Error(`Gateway did not
|
|
159
|
+
throw new Error(`Gateway did not connect within 20 seconds. ${serviceStatusText()}
|
|
160
|
+
Check lunr gateway status and ${gatewayLogPath()}`);
|
|
150
161
|
}
|
|
151
162
|
async function stopGatewayService() {
|
|
152
163
|
let status = readGatewayStatus();
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
gatewaySelect,
|
|
8
8
|
isGatewayOwner,
|
|
9
9
|
requireGatewayOwner
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QTU6AKNJ.js";
|
|
11
11
|
import {
|
|
12
12
|
getSubagentCancellation
|
|
13
13
|
} from "./chunk-BBUVIEZB.js";
|
|
@@ -15,13 +15,13 @@ import {
|
|
|
15
15
|
PERMISSION_MODES,
|
|
16
16
|
getPermissionMode,
|
|
17
17
|
setPermissionMode
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZXSGTGJ6.js";
|
|
19
19
|
import {
|
|
20
20
|
SessionManager
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-2KIPT4HJ.js";
|
|
22
22
|
import {
|
|
23
23
|
loadGatewayConfig
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-B4HP6ZWM.js";
|
|
25
25
|
|
|
26
26
|
// packages/coding-agent/dist/gateway/mobile-commands.js
|
|
27
27
|
import { mkdirSync, readdirSync, realpathSync, statSync } from "node:fs";
|
|
@@ -30,7 +30,7 @@ var MOBILE_COMMANDS = [
|
|
|
30
30
|
{ name: "project", description: "Browse folders and choose a project" },
|
|
31
31
|
{ name: "continue", description: "Continue a handoff or the latest TUI session" },
|
|
32
32
|
{ name: "sessions", description: "Browse saved sessions across projects" },
|
|
33
|
-
{ name: "mode", description: "Choose
|
|
33
|
+
{ name: "mode", description: "Choose yolo, auto, or read-only permissions" },
|
|
34
34
|
{ name: "plan", description: "Plan work and approve it from this chat" },
|
|
35
35
|
{ name: "settings", description: "Change this session's model, thinking, or permissions" },
|
|
36
36
|
{ name: "stopall", description: "Stop this session and its background subagents" },
|
|
@@ -147,8 +147,8 @@ async function continueSession(ctx, file) {
|
|
|
147
147
|
}
|
|
148
148
|
async function performContinue(ctx, file, signal) {
|
|
149
149
|
requireGatewayOwner(ctx.event.source);
|
|
150
|
-
let { requestSessionTransfer, SessionTransferError } = await import("./session-handoff-
|
|
151
|
-
if (
|
|
150
|
+
let { requestSessionTransfer, SessionTransferError } = await import("./session-handoff-GWARVEWT.js"), { key, bridge } = ctx;
|
|
151
|
+
if (bridge.peekSession?.(key)?.sessionManager?.getSessionFile() === file) {
|
|
152
152
|
await ctx.adapter.send(ctx.event.source.chatId, "This session is already open here.");
|
|
153
153
|
return;
|
|
154
154
|
}
|
|
@@ -157,7 +157,7 @@ async function performContinue(ctx, file, signal) {
|
|
|
157
157
|
try {
|
|
158
158
|
await requestSessionTransfer(file, { timeoutMs: 3e3, signal });
|
|
159
159
|
} catch (error) {
|
|
160
|
-
if (!(error instanceof SessionTransferError) || error.code
|
|
160
|
+
if (!(error instanceof SessionTransferError) || !["busy", "timeout"].includes(error.code))
|
|
161
161
|
throw error;
|
|
162
162
|
let choice = await gatewaySelect(key, `${error instanceof Error ? error.message : "Session is in use"}
|
|
163
163
|
How should lunR continue?`, ["Wait until idle", "Stop and continue", "Cancel"], { signal });
|
|
@@ -173,7 +173,7 @@ How should lunR continue?`, ["Wait until idle", "Stop and continue", "Cancel"],
|
|
|
173
173
|
await requestSessionTransfer(file, { timeoutMs: 3e3, signal });
|
|
174
174
|
break;
|
|
175
175
|
} catch (retryError) {
|
|
176
|
-
if (!(retryError instanceof SessionTransferError) || retryError.code
|
|
176
|
+
if (!(retryError instanceof SessionTransferError) || !["busy", "timeout"].includes(retryError.code) || Date.now() >= deadline)
|
|
177
177
|
throw retryError;
|
|
178
178
|
}
|
|
179
179
|
await new Promise((resolve2) => setTimeout(resolve2, 500));
|
|
@@ -186,14 +186,14 @@ How should lunR continue?`, ["Wait until idle", "Stop and continue", "Cancel"],
|
|
|
186
186
|
let id = session?.sessionManager?.getSessionId();
|
|
187
187
|
if (id && ["auto", "yolo"].includes(getPermissionMode(id))) {
|
|
188
188
|
let requested = getPermissionMode(id);
|
|
189
|
-
setPermissionMode("
|
|
189
|
+
setPermissionMode("read-only", id), session?.sessionManager?.setPermissionMode?.("read-only"), await gatewaySelect(key, `Continue with ${requested} permissions? Tools can change files and run commands without individual approval.`, ["Keep read-only", `Use ${requested}`]) === `Use ${requested}` && (setPermissionMode(requested, id), session?.sessionManager?.setPermissionMode?.(requested));
|
|
190
190
|
}
|
|
191
191
|
await ctx.adapter.send(ctx.event.source.chatId, `Continuing ${session?.sessionManager?.getSessionName() ?? basename(file)}
|
|
192
192
|
Project: ${cwd}
|
|
193
193
|
Send your next instruction.`, { threadId: ctx.event.source.threadId });
|
|
194
194
|
}
|
|
195
195
|
async function browseSessions(ctx, args, quick) {
|
|
196
|
-
let handoff = await import("./session-handoff-
|
|
196
|
+
let handoff = await import("./session-handoff-GWARVEWT.js");
|
|
197
197
|
if (quick) {
|
|
198
198
|
let candidates = handoff.listHandoffCandidates();
|
|
199
199
|
if (!candidates.length) {
|
|
@@ -325,7 +325,7 @@ async function handleMobileCommand(ctx, command, args) {
|
|
|
325
325
|
if (command === "settings") {
|
|
326
326
|
let choice = await gatewaySelect(ctx.key, "Session settings", ["Model", "Thinking", "Permissions"]);
|
|
327
327
|
if (choice === "Model" || choice === "Thinking") {
|
|
328
|
-
let { CHAT_COMMANDS, runChatCommand } = await import("./commands-
|
|
328
|
+
let { CHAT_COMMANDS, runChatCommand } = await import("./commands-QC6VUZJQ.js"), cmd = CHAT_COMMANDS.find((c) => c.name === choice.toLowerCase());
|
|
329
329
|
return cmd && await runChatCommand(cmd, {
|
|
330
330
|
...ctx,
|
|
331
331
|
args: "",
|
|
@@ -337,12 +337,13 @@ async function handleMobileCommand(ctx, command, args) {
|
|
|
337
337
|
if (choice !== "Permissions")
|
|
338
338
|
return !0;
|
|
339
339
|
}
|
|
340
|
-
let requested = command === "plan" ? "
|
|
340
|
+
let requested = command === "plan" ? "read-only" : args || await gatewaySelect(ctx.key, `Permission mode: ${getPermissionMode(id)}`, [...PERMISSION_MODES]);
|
|
341
341
|
if (!requested)
|
|
342
342
|
return !0;
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
343
|
+
let mode = requested === "read" ? "read-only" : requested;
|
|
344
|
+
if (!PERMISSION_MODES.includes(mode))
|
|
345
|
+
throw new Error("Choose yolo, auto, or read-only.");
|
|
346
|
+
return setPermissionMode(mode, id), session.sessionManager?.setPermissionMode?.(mode), await ctx.adapter.send(ctx.event.source.chatId, `Permission mode: ${mode}`), command === "plan" && args ? (ctx.event.text = `Create a plan for: ${args}`, !1) : !0;
|
|
346
347
|
}
|
|
347
348
|
|
|
348
349
|
export {
|