@ashx-j/lunr 0.2.23 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -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 +1 -1
- package/dist/gateway/adapters/discord.js.map +1 -1
- package/dist/gateway/approval.d.ts +2 -6
- package/dist/gateway/approval.d.ts.map +1 -1
- package/dist/gateway/approval.js +3 -7
- package/dist/gateway/approval.js.map +1 -1
- package/dist/gateway/mobile-commands.d.ts.map +1 -1
- package/dist/gateway/mobile-commands.js +12 -11
- package/dist/gateway/mobile-commands.js.map +1 -1
- package/dist/gateway/router.d.ts.map +1 -1
- package/dist/gateway/router.js +1 -1
- package/dist/gateway/router.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -2
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/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-IEF7LQWD.js} +8 -9
- package/dist/node-runtime/{builtin-extensions-QVCXNQT4.js → builtin-extensions-EBAWTH4M.js} +3 -3
- package/dist/node-runtime/{chunk-XLTL257W.js → chunk-2KIPT4HJ.js} +5 -1
- package/dist/node-runtime/{chunk-YHQ3NBB3.js → chunk-5Q3EHOHI.js} +17 -17
- package/dist/node-runtime/{chunk-TQGPP4SC.js → chunk-CDVHZOOK.js} +1 -1
- package/dist/node-runtime/{chunk-DQMGU675.js → chunk-DE2JB6J5.js} +20 -17
- package/dist/node-runtime/{chunk-YJMMG7C6.js → chunk-DSIKTUPW.js} +1 -1
- package/dist/node-runtime/{chunk-TVJUOJZJ.js → chunk-F4FLTQKV.js} +1 -1
- package/dist/node-runtime/{chunk-GMHJCCEN.js → chunk-FU6OODRZ.js} +4 -1
- package/dist/node-runtime/{chunk-OFKSVRV7.js → chunk-GYIXXQAO.js} +1 -1
- package/dist/node-runtime/{chunk-BX2RB477.js → chunk-HFVZUPFJ.js} +1 -1
- package/dist/node-runtime/{chunk-AZJHNQKQ.js → chunk-I54LGHWM.js} +1 -1
- package/dist/node-runtime/{chunk-DD5YWFSJ.js → chunk-IGV54Q5V.js} +2 -2
- package/dist/node-runtime/{chunk-RIR5EDDJ.js → chunk-K5AGHH57.js} +17 -12
- package/dist/node-runtime/{chunk-GS66LV4M.js → chunk-KJ6DWS3K.js} +4 -4
- package/dist/node-runtime/{chunk-LLUIPGDR.js → chunk-L3LX4SNR.js} +108 -75
- 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-W64JC4E7.js → chunk-OF7PWMG4.js} +2 -2
- package/dist/node-runtime/{chunk-CSUZVNYE.js → chunk-OVX6X377.js} +10 -6
- package/dist/node-runtime/{chunk-X3URCYCU.js → chunk-QM43FEAE.js} +14 -14
- package/dist/node-runtime/{chunk-QAZOULTU.js → chunk-RORY2HMJ.js} +39 -5
- package/dist/node-runtime/{chunk-EKVFP6YF.js → chunk-WHLRAGUQ.js} +13 -12
- package/dist/node-runtime/{chunk-HPUP7E4T.js → chunk-Y73WPE6S.js} +16 -16
- package/dist/node-runtime/{chunk-LFZDVKSP.js → chunk-YVI6L6LU.js} +5 -5
- package/dist/node-runtime/{chunk-5D7LC2ZQ.js → chunk-ZXSGTGJ6.js} +54 -85
- package/dist/node-runtime/cli-runtime.js +1 -1
- package/dist/node-runtime/{command-PDVTBRWA.js → command-7BG7VVTS.js} +3 -3
- package/dist/node-runtime/{commands-KAMO2T6P.js → commands-NZLSOHPE.js} +2 -2
- package/dist/node-runtime/{commands-XDCFGIGW.js → commands-QFDKNQTL.js} +7 -7
- 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-TWR3N65G.js} +12 -12
- package/dist/node-runtime/index.js +16 -17
- package/dist/node-runtime/{init-X2LIUB2H.js → init-HS6NQXSK.js} +2 -2
- package/dist/node-runtime/{install-cli-3BO4MMQ6.js → install-cli-VAP6KBFN.js} +1 -1
- package/dist/node-runtime/{interactive-mode-4MFRKAHG.js → interactive-mode-6J5VZ2TT.js} +10 -11
- package/dist/node-runtime/{interactive-view-TUZHCQM3.js → interactive-view-NGFAMHPW.js} +2 -2
- package/dist/node-runtime/{lunr-browser-RYFIIVJN.js → lunr-browser-J5ZZYVGM.js} +1 -1
- package/dist/node-runtime/{lunr-cron-YWXEPZMQ.js → lunr-cron-CXOL37AL.js} +5 -5
- package/dist/node-runtime/main.js +14 -15
- package/dist/node-runtime/{mobile-commands-LVHDAUDP.js → mobile-commands-VTBM5DSZ.js} +4 -4
- 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-ZLW5DZXF.js} +3 -4
- 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-XPCLLKIM.js} +23 -13
- package/dist/node-runtime/{proxy-modes-OSQCWRBI.js → proxy-modes-LGEUYD7R.js} +3 -3
- package/dist/node-runtime/rpc-entry.js +14 -15
- package/dist/node-runtime/{runtime-bridges-3XUQ46XW.js → runtime-bridges-QYXUX2TG.js} +8 -1
- package/dist/node-runtime/{session-handoff-HC7R5E24.js → session-handoff-GWARVEWT.js} +2 -2
- package/dist/node-runtime/{session-manager-CFN4UFM2.js → session-manager-JB5J6XBN.js} +1 -1
- package/dist/node-runtime/{settings-manager-6VEMXRDL.js → settings-manager-WCQDUVQB.js} +7 -4
- package/dist/node-runtime/{setup-5SR2J35A.js → setup-YRBKH2LD.js} +2 -2
- package/dist/node-runtime/{subagent-executor-M5VWB3D3.js → subagent-executor-OTNISDQU.js} +40 -7
- package/dist/node-runtime/{update-cli-UVKJWRRJ.js → update-cli-VBR2777K.js} +1 -2
- package/dist/startup/interactive-view.d.ts.map +1 -1
- package/dist/startup/interactive-view.js +5 -1
- package/dist/startup/interactive-view.js.map +1 -1
- package/docs/browser.md +1 -1
- package/docs/features.md +15 -14
- package/docs/index.md +1 -1
- package/docs/keybindings.md +1 -1
- package/docs/providers.md +6 -2
- package/docs/quickstart.md +2 -2
- package/docs/settings.md +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
|
@@ -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-DE2JB6J5.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-F4FLTQKV.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-RORY2HMJ.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();
|
|
@@ -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) {
|
|
@@ -713,7 +713,8 @@ Usage:
|
|
|
713
713
|
`, desc += ` mcp({ action: "auth-start", server: "name" }) \u2192 Start manual OAuth and get a browser URL
|
|
714
714
|
`, desc += ` mcp({ action: "auth-complete", server: "name", args: '{"redirectUrl":"..."}' }) \u2192 Complete manual OAuth
|
|
715
715
|
`, desc += `
|
|
716
|
-
Mode: action > tool (call) > connect > describe > search > server (list) > nothing (status)`, desc
|
|
716
|
+
Mode: action > tool (call) > connect > describe > search > server (list) > nothing (status)`, desc += `
|
|
717
|
+
Read-only mode permits status, search, describe, and ui-messages only. Tool calls, connections, and authentication require yolo or auto; direct MCP tools are blocked in read-only.`, desc;
|
|
717
718
|
}
|
|
718
719
|
|
|
719
720
|
// packages/coding-agent/dist/builtin-extensions/pi-mcp-adapter/abort.js
|
|
@@ -254,7 +254,7 @@ var ChatboxEditor = class extends CustomEditor {
|
|
|
254
254
|
};
|
|
255
255
|
function renderStatsLine(width, ctx, theme, footerData) {
|
|
256
256
|
let sep = color(theme, "accent2", " | "), parts = [], modeZone = [], mode = lunrPermissionMode();
|
|
257
|
-
mode === "yolo" || mode === "auto" ? modeZone.push(color(theme, "warning", mode)) :
|
|
257
|
+
mode === "yolo" || mode === "auto" ? modeZone.push(color(theme, "warning", mode)) : mode === "read-only" && modeZone.push(color(theme, "white", "read"));
|
|
258
258
|
let footerToggles = lunrFooterToggles(), statuses = footerData.getExtensionStatuses?.();
|
|
259
259
|
if (statuses && statuses.size > 0) {
|
|
260
260
|
let modeKeys = footerToggles.statuses ? ["plan", "goal"] : [];
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-YPHAIRZT.js";
|
|
5
5
|
import {
|
|
6
6
|
DefaultPackageManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-F4FLTQKV.js";
|
|
8
8
|
import {
|
|
9
9
|
SettingsManager
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-RORY2HMJ.js";
|
|
11
11
|
import {
|
|
12
12
|
getProjectTrustOptions,
|
|
13
13
|
hasTrustRequiringProjectResources
|
|
@@ -2,17 +2,21 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
|
|
|
2
2
|
import {
|
|
3
3
|
getPermissionMode,
|
|
4
4
|
resetPermissions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZXSGTGJ6.js";
|
|
6
6
|
|
|
7
7
|
// packages/coding-agent/dist/core/subagent-permission-inherit.js
|
|
8
8
|
var SUBAGENT_CHILD_ENV = "PI_SUBAGENT_CHILD", SUBAGENT_CHILD_PERMISSION_ENV = "PI_SUBAGENT_CHILD_PERMISSION";
|
|
9
|
-
var
|
|
9
|
+
var READ_ONLY_WRITE_SPAWN_ERROR = 'Cannot launch a full-access child in read-only mode. Relaunch with permissions: "read-only".';
|
|
10
10
|
function isSubagentChildProcess(env = process.env) {
|
|
11
11
|
return env[SUBAGENT_CHILD_ENV] === "1";
|
|
12
12
|
}
|
|
13
13
|
function parseParentPermissionMode(value) {
|
|
14
|
-
if (value === "
|
|
14
|
+
if (value === "yolo" || value === "auto" || value === "read-only")
|
|
15
15
|
return value;
|
|
16
|
+
if (value === "plan")
|
|
17
|
+
return "read-only";
|
|
18
|
+
if (value === "manual")
|
|
19
|
+
return "yolo";
|
|
16
20
|
}
|
|
17
21
|
function parseChildPermission(value) {
|
|
18
22
|
if (value === "full" || value === "read-only")
|
|
@@ -22,14 +26,14 @@ function resolveRequestedChildPermission(requested) {
|
|
|
22
26
|
return requested === "read-only" ? "read-only" : "full";
|
|
23
27
|
}
|
|
24
28
|
function resolveChildRuntimePermissionMode(childPermission) {
|
|
25
|
-
return parseChildPermission(childPermission) === "read-only" ? "
|
|
29
|
+
return parseChildPermission(childPermission) === "read-only" ? "read-only" : "auto";
|
|
26
30
|
}
|
|
27
31
|
function snapshotParentPermissionMode(sessionId) {
|
|
28
32
|
return getPermissionMode(sessionId);
|
|
29
33
|
}
|
|
30
34
|
function resolveChildPermissions(parentMode, requested) {
|
|
31
35
|
let requestedPermission = resolveRequestedChildPermission(requested);
|
|
32
|
-
return parseParentPermissionMode(parentMode) === "
|
|
36
|
+
return parseParentPermissionMode(parentMode) === "read-only" && requestedPermission === "full" ? { ok: !1, requested: requestedPermission, error: READ_ONLY_WRITE_SPAWN_ERROR } : { ok: !0, requested: requestedPermission, effective: requestedPermission };
|
|
33
37
|
}
|
|
34
38
|
function applyInheritedSubagentPermissions(env = process.env) {
|
|
35
39
|
if (!isSubagentChildProcess(env))
|
|
@@ -39,7 +43,7 @@ function applyInheritedSubagentPermissions(env = process.env) {
|
|
|
39
43
|
}
|
|
40
44
|
|
|
41
45
|
export {
|
|
42
|
-
|
|
46
|
+
READ_ONLY_WRITE_SPAWN_ERROR,
|
|
43
47
|
snapshotParentPermissionMode,
|
|
44
48
|
resolveChildPermissions,
|
|
45
49
|
applyInheritedSubagentPermissions
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
TODOS_ENABLED_CHANGED_SYMBOL
|
|
10
10
|
} from "./chunk-CCCN2UCX.js";
|
|
11
11
|
import {
|
|
12
|
-
|
|
12
|
+
isReadOnlyModeActive,
|
|
13
13
|
requestPlanApproval
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-ZXSGTGJ6.js";
|
|
15
15
|
import {
|
|
16
16
|
ashxj_tui_default
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MPKSOJBT.js";
|
|
18
18
|
import {
|
|
19
19
|
measureStartup
|
|
20
20
|
} from "./chunk-PVCDKGR6.js";
|
|
@@ -867,16 +867,16 @@ function lunr_todos_default(pi) {
|
|
|
867
867
|
|
|
868
868
|
// packages/coding-agent/dist/builtin-extensions/lunr-plan-tools.js
|
|
869
869
|
import { Text as Text2 } from "@ashx-j/lunr-tui";
|
|
870
|
-
var PRESENT_PLAN_WRONG_MODE_TEXT = "present_plan is only available in
|
|
871
|
-
async function runPresentPlan(summary) {
|
|
872
|
-
return
|
|
870
|
+
var PRESENT_PLAN_WRONG_MODE_TEXT = "present_plan is only available in read-only mode.";
|
|
871
|
+
async function runPresentPlan(summary, sessionId) {
|
|
872
|
+
return isReadOnlyModeActive(sessionId) ? requestPlanApproval(summary) : PRESENT_PLAN_WRONG_MODE_TEXT;
|
|
873
873
|
}
|
|
874
874
|
function lunr_plan_tools_default(pi) {
|
|
875
875
|
pi.registerTool({
|
|
876
876
|
name: "present_plan",
|
|
877
877
|
label: "Plan",
|
|
878
878
|
description: [
|
|
879
|
-
"Present
|
|
879
|
+
"Present a finished plan for user approval. Only available in read-only mode.",
|
|
880
880
|
"Call once with a concise, concrete summary of the plan; the user approves",
|
|
881
881
|
"or declines it in a dialog. The result text says whether to implement or revise."
|
|
882
882
|
].join(`
|
|
@@ -884,9 +884,9 @@ function lunr_plan_tools_default(pi) {
|
|
|
884
884
|
parameters: typebox_exports.Object({
|
|
885
885
|
summary: typebox_exports.String({ description: "Concise summary of the plan to approve." })
|
|
886
886
|
}),
|
|
887
|
-
async execute(_toolCallId, params) {
|
|
887
|
+
async execute(_toolCallId, params, _signal, _onUpdate, ctx) {
|
|
888
888
|
let summary = typeof params?.summary == "string" ? params.summary.trim() : "";
|
|
889
|
-
return { content: [{ type: "text", text: await runPresentPlan(summary) }] };
|
|
889
|
+
return { content: [{ type: "text", text: await runPresentPlan(summary, ctx.sessionManager.getSessionId()) }] };
|
|
890
890
|
},
|
|
891
891
|
renderCall(_args, theme) {
|
|
892
892
|
return new Text2(theme.fg("toolTitle", theme.bold("present_plan")), 0, 0);
|
|
@@ -925,14 +925,14 @@ var lightBuiltinExtensions = [
|
|
|
925
925
|
], DEFERRED_BUILTIN_LOADERS = [
|
|
926
926
|
{ name: "pi-ollama-cloud", load: () => import("./pi-ollama-cloud-2F3Y2QNM.js") },
|
|
927
927
|
{ name: "narumiruna-pi-goal", load: () => import("./goal-NJEE5CTU.js") },
|
|
928
|
-
{ name: "lunr-cron", load: () => import("./lunr-cron-
|
|
929
|
-
{ name: "pi-intercom", load: () => import("./pi-intercom-
|
|
928
|
+
{ name: "lunr-cron", load: () => import("./lunr-cron-CXOL37AL.js") },
|
|
929
|
+
{ name: "pi-intercom", load: () => import("./pi-intercom-QM53RLTS.js") },
|
|
930
930
|
{ name: "pi-prompt-template-model", load: () => import("./pi-prompt-template-model-QWTCGLJU.js") },
|
|
931
|
-
{ name: "pi-subagents", load: () => import("./pi-subagents-
|
|
931
|
+
{ name: "pi-subagents", load: () => import("./pi-subagents-XPCLLKIM.js") },
|
|
932
932
|
{ name: "pi-web-access", load: () => import("./pi-web-access-WTGMNZ32.js") },
|
|
933
|
-
{ name: "lunr-browser", load: () => import("./lunr-browser-
|
|
933
|
+
{ name: "lunr-browser", load: () => import("./lunr-browser-J5ZZYVGM.js") },
|
|
934
934
|
{ name: "pi-lsp-extension", load: () => import("./src-IVPNZ2BX.js") },
|
|
935
|
-
{ name: "pi-mcp-adapter", load: () => import("./pi-mcp-adapter-
|
|
935
|
+
{ name: "pi-mcp-adapter", load: () => import("./pi-mcp-adapter-5UKBZP44.js") }
|
|
936
936
|
], DEFERRED_BUILTIN_EXTENSION_NAMES = DEFERRED_BUILTIN_LOADERS.map((entry) => entry.name), DEFERRED_BUILTIN_FLAGS = ["mcp-config"];
|
|
937
937
|
async function loadDeferredBuiltinExtensions() {
|
|
938
938
|
return await Promise.all(DEFERRED_BUILTIN_LOADERS.map(async ({ name, load }) => {
|