@ashx-j/lunr-dev 0.2.40-dev.60.1 → 0.2.40-dev.62.1

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.
Files changed (63) hide show
  1. package/dist/core/agent-session.d.ts +10 -0
  2. package/dist/core/agent-session.js +49 -1
  3. package/dist/core/auth-storage.d.ts +2 -0
  4. package/dist/core/auth-storage.js +5 -0
  5. package/dist/core/model-runtime.d.ts +3 -0
  6. package/dist/core/model-runtime.js +20 -5
  7. package/dist/core/resolve-config-value.d.ts +5 -0
  8. package/dist/core/resolve-config-value.js +16 -0
  9. package/dist/core/saved-login-redaction.d.ts +74 -0
  10. package/dist/core/saved-login-redaction.js +322 -0
  11. package/dist/core/session-manager.d.ts +13 -0
  12. package/dist/core/session-manager.js +19 -8
  13. package/dist/core/subscriptions.d.ts +2 -0
  14. package/dist/core/subscriptions.js +5 -0
  15. package/dist/core/tools/edit.d.ts +11 -4
  16. package/dist/core/tools/edit.js +36 -20
  17. package/dist/modes/interactive/tool-renderers/edit.js +4 -0
  18. package/dist/node-runtime/{agent-session-services-UOVUJAX2.js → agent-session-services-2MOVXNT5.js} +6 -6
  19. package/dist/node-runtime/{builtin-extensions-JNJRND4E.js → builtin-extensions-S23KMP4W.js} +1 -1
  20. package/dist/node-runtime/{chunk-HQ5A4VVO.js → chunk-2EQL4TLM.js} +19 -8
  21. package/dist/node-runtime/{chunk-EJMB4PAV.js → chunk-4JOKLU3I.js} +35 -20
  22. package/dist/node-runtime/{chunk-4OALPI3C.js → chunk-6NUWUTVC.js} +1 -1
  23. package/dist/node-runtime/{chunk-QNFPZIP3.js → chunk-C5PAMN7Y.js} +244 -17
  24. package/dist/node-runtime/{chunk-GX7UZDSI.js → chunk-EWYLZSES.js} +1 -1
  25. package/dist/node-runtime/{chunk-GAWWLIGY.js → chunk-FIDZY4JX.js} +4 -4
  26. package/dist/node-runtime/{chunk-U7MTVVT3.js → chunk-JCL5IRM5.js} +1 -1
  27. package/dist/node-runtime/{chunk-Y7DFMHY5.js → chunk-KV4RBM3L.js} +10 -10
  28. package/dist/node-runtime/{chunk-HYOPEHDE.js → chunk-QQSC6CTJ.js} +1 -1
  29. package/dist/node-runtime/{chunk-RXG6DWO2.js → chunk-S2BEWKPR.js} +3 -3
  30. package/dist/node-runtime/{chunk-S46QLY2F.js → chunk-SJSWJWAT.js} +30 -11
  31. package/dist/node-runtime/{chunk-BQROL43X.js → chunk-TKN7VEZR.js} +11 -11
  32. package/dist/node-runtime/{chunk-QDQAKIVU.js → chunk-TYPA7FJQ.js} +1 -1
  33. package/dist/node-runtime/{chunk-FCINT2KC.js → chunk-VBNMCUV2.js} +2 -2
  34. package/dist/node-runtime/{chunk-2B5RTZA4.js → chunk-XLGSGHTG.js} +1 -1
  35. package/dist/node-runtime/{chunk-XXGJ7Z3C.js → chunk-YVOU5W7H.js} +7 -7
  36. package/dist/node-runtime/{command-6GJNLXGD.js → command-ARYMXJF7.js} +3 -3
  37. package/dist/node-runtime/{commands-2UG5F4VT.js → commands-E3EQFYAC.js} +5 -5
  38. package/dist/node-runtime/{doctor-cli-TU4HVXWP.js → doctor-cli-DWI46VPW.js} +1 -1
  39. package/dist/node-runtime/{export-html-SW3CIZRJ.js → export-html-YM4QKDTD.js} +1 -1
  40. package/dist/node-runtime/{gateway-UDWVYEGX.js → gateway-I7YA6MJ4.js} +9 -9
  41. package/dist/node-runtime/index.js +12 -12
  42. package/dist/node-runtime/{install-cli-YIIFVCFM.js → install-cli-A5HIEOOK.js} +1 -1
  43. package/dist/node-runtime/{interactive-mode-VCPSTUAW.js → interactive-mode-6UDD62TS.js} +9 -9
  44. package/dist/node-runtime/{lunr-cron-3VI5CLK3.js → lunr-cron-FYLIKLSZ.js} +4 -4
  45. package/dist/node-runtime/main.js +8 -8
  46. package/dist/node-runtime/{mobile-commands-HQXEYAF6.js → mobile-commands-CKQHQBEW.js} +2 -2
  47. package/dist/node-runtime/{model-runtime-T552YPXL.js → model-runtime-RFMIP23V.js} +1 -1
  48. package/dist/node-runtime/{pi-subagents-YVVMY4B4.js → pi-subagents-C5FBVY72.js} +3 -3
  49. package/dist/node-runtime/{print-mode-M52NLHKG.js → print-mode-I6R6RWLJ.js} +7 -7
  50. package/dist/node-runtime/rpc-entry.js +8 -8
  51. package/dist/node-runtime/{session-handoff-TEOBWIFW.js → session-handoff-XCKL6SRJ.js} +2 -2
  52. package/dist/node-runtime/{session-manager-I6535F4R.js → session-manager-AGK72CRA.js} +1 -1
  53. package/dist/node-runtime/{setup-7IC2PQIB.js → setup-HF7HDJKG.js} +1 -1
  54. package/dist/node-runtime/{subagent-executor-RTGKJ35C.js → subagent-executor-N6FKWYCK.js} +3 -3
  55. package/dist/node-runtime/{tool-renderers-KL5EPAMN.js → tool-renderers-XZX7BEOM.js} +1 -1
  56. package/docs/extensions.md +3 -1
  57. package/docs/security.md +28 -0
  58. package/examples/extensions/built-in-tool-renderer.ts +2 -0
  59. package/examples/extensions/minimal-mode.ts +2 -0
  60. package/install-lock/package-lock.json +24 -24
  61. package/install-lock/package.json +2 -2
  62. package/npm-shrinkwrap.json +12 -12
  63. package/package.json +4 -4
@@ -1,28 +1,28 @@
1
1
  import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
2
  import {
3
3
  main
4
- } from "./chunk-BQROL43X.js";
4
+ } from "./chunk-TKN7VEZR.js";
5
5
  import "./chunk-KETNCBTB.js";
6
- import "./chunk-FCINT2KC.js";
6
+ import "./chunk-VBNMCUV2.js";
7
7
  import "./chunk-PDQLKTGM.js";
8
8
  import "./chunk-LY6VVOF4.js";
9
9
  import "./chunk-PKDES47T.js";
10
10
  import "./chunk-TYHNGMLA.js";
11
11
  import "./chunk-5ZH3ZFIZ.js";
12
- import "./chunk-S46QLY2F.js";
12
+ import "./chunk-SJSWJWAT.js";
13
13
  import "./chunk-QP4I6GEW.js";
14
14
  import "./chunk-KDBQKVNZ.js";
15
15
  import "./chunk-GLSX5WQB.js";
16
16
  import "./chunk-DVGWF6A2.js";
17
17
  import "./chunk-F5NKEKNO.js";
18
- import "./chunk-2B5RTZA4.js";
18
+ import "./chunk-XLGSGHTG.js";
19
19
  import "./chunk-3XBYDZWT.js";
20
20
  import "./chunk-AW6PDL4D.js";
21
21
  import "./chunk-6Z5EUITR.js";
22
22
  import "./chunk-IXG6F4NT.js";
23
23
  import "./chunk-CGBXPL3E.js";
24
24
  import "./chunk-IMLLN6W5.js";
25
- import "./chunk-EJMB4PAV.js";
25
+ import "./chunk-4JOKLU3I.js";
26
26
  import "./chunk-PGWSMQ4K.js";
27
27
  import "./chunk-YSB6URMT.js";
28
28
  import "./chunk-IAZSK7KK.js";
@@ -30,7 +30,7 @@ import "./chunk-TCT6PCUR.js";
30
30
  import "./chunk-LGRRFSE7.js";
31
31
  import "./chunk-XPKOWSYN.js";
32
32
  import "./chunk-BDRGN3L2.js";
33
- import "./chunk-QNFPZIP3.js";
33
+ import "./chunk-C5PAMN7Y.js";
34
34
  import "./chunk-4SBPXNVV.js";
35
35
  import "./chunk-53YJI7JU.js";
36
36
  import "./chunk-AKTUXVTN.js";
@@ -43,8 +43,8 @@ import "./chunk-SJVCEPQS.js";
43
43
  import "./chunk-BY7OLK2X.js";
44
44
  import "./chunk-V4VKJDRA.js";
45
45
  import "./chunk-5UCVERGR.js";
46
- import "./chunk-4OALPI3C.js";
47
- import "./chunk-HQ5A4VVO.js";
46
+ import "./chunk-6NUWUTVC.js";
47
+ import "./chunk-2EQL4TLM.js";
48
48
  import "./chunk-FVDOXRUD.js";
49
49
  import "./chunk-XOBFYZKQ.js";
50
50
  import "./chunk-MIWAGF3T.js";
@@ -6,7 +6,7 @@ import {
6
6
  createProjectFolder,
7
7
  handleMobileCommand,
8
8
  resolveWithinRoots
9
- } from "./chunk-GAWWLIGY.js";
9
+ } from "./chunk-FIDZY4JX.js";
10
10
  import "./chunk-Y4BBHJZS.js";
11
11
  import "./chunk-ODWFHNX7.js";
12
12
  import "./chunk-AW6PDL4D.js";
@@ -16,7 +16,7 @@ import "./chunk-XPKOWSYN.js";
16
16
  import "./chunk-BDRGN3L2.js";
17
17
  import "./chunk-QTRB4APZ.js";
18
18
  import "./chunk-SJVCEPQS.js";
19
- import "./chunk-HQ5A4VVO.js";
19
+ import "./chunk-2EQL4TLM.js";
20
20
  import "./chunk-FVDOXRUD.js";
21
21
  import "./chunk-UACMVJW6.js";
22
22
  import "./chunk-DXUUF654.js";
@@ -2,7 +2,7 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
2
2
  import {
3
3
  ModelRuntime,
4
4
  refreshModelCandidatesForInit
5
- } from "./chunk-QNFPZIP3.js";
5
+ } from "./chunk-C5PAMN7Y.js";
6
6
  import "./chunk-V4VKJDRA.js";
7
7
  import "./chunk-SRCSFFDW.js";
8
8
  import "./chunk-IMLCWLPI.js";
@@ -73,7 +73,7 @@ import {
73
73
  validateExecutionAcceptance,
74
74
  validateToolBudgetConfig,
75
75
  writeAtomicJson
76
- } from "./chunk-U7MTVVT3.js";
76
+ } from "./chunk-JCL5IRM5.js";
77
77
  import {
78
78
  ASYNC_DIR,
79
79
  DEFAULT_ARTIFACT_CONFIG,
@@ -121,7 +121,7 @@ import {
121
121
  createSubagentCancellation,
122
122
  registerSubagentCancellation
123
123
  } from "./chunk-IMLLN6W5.js";
124
- import "./chunk-EJMB4PAV.js";
124
+ import "./chunk-4JOKLU3I.js";
125
125
  import "./chunk-PGWSMQ4K.js";
126
126
  import "./chunk-YSB6URMT.js";
127
127
  import "./chunk-IAZSK7KK.js";
@@ -6444,7 +6444,7 @@ function registerSubagentExtension(pi) {
6444
6444
  try {
6445
6445
  let currentGeneration = generation;
6446
6446
  if (signal?.throwIfAborted(), !executorPromise) {
6447
- let pending = import("./subagent-executor-RTGKJ35C.js").then(({ createSubagentExecutor }) => {
6447
+ let pending = import("./subagent-executor-N6FKWYCK.js").then(({ createSubagentExecutor }) => {
6448
6448
  if (generation !== currentGeneration)
6449
6449
  throw new Error("Subagent session changed before initialization");
6450
6450
  return createSubagentExecutor({
@@ -1,23 +1,23 @@
1
1
  import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
2
  import {
3
3
  runPrintMode
4
- } from "./chunk-QDQAKIVU.js";
4
+ } from "./chunk-TYPA7FJQ.js";
5
5
  import "./chunk-JDIZKHWA.js";
6
6
  import "./chunk-U5F4IC7R.js";
7
- import "./chunk-S46QLY2F.js";
7
+ import "./chunk-SJSWJWAT.js";
8
8
  import "./chunk-QP4I6GEW.js";
9
9
  import "./chunk-KDBQKVNZ.js";
10
10
  import "./chunk-GLSX5WQB.js";
11
11
  import "./chunk-DVGWF6A2.js";
12
12
  import "./chunk-F5NKEKNO.js";
13
- import "./chunk-2B5RTZA4.js";
13
+ import "./chunk-XLGSGHTG.js";
14
14
  import "./chunk-3XBYDZWT.js";
15
15
  import "./chunk-AW6PDL4D.js";
16
16
  import "./chunk-6Z5EUITR.js";
17
17
  import "./chunk-IXG6F4NT.js";
18
18
  import "./chunk-CGBXPL3E.js";
19
19
  import "./chunk-IMLLN6W5.js";
20
- import "./chunk-EJMB4PAV.js";
20
+ import "./chunk-4JOKLU3I.js";
21
21
  import "./chunk-PGWSMQ4K.js";
22
22
  import "./chunk-YSB6URMT.js";
23
23
  import "./chunk-IAZSK7KK.js";
@@ -25,7 +25,7 @@ import "./chunk-TCT6PCUR.js";
25
25
  import "./chunk-LGRRFSE7.js";
26
26
  import "./chunk-XPKOWSYN.js";
27
27
  import "./chunk-BDRGN3L2.js";
28
- import "./chunk-QNFPZIP3.js";
28
+ import "./chunk-C5PAMN7Y.js";
29
29
  import "./chunk-4SBPXNVV.js";
30
30
  import "./chunk-53YJI7JU.js";
31
31
  import "./chunk-V3AX7UT3.js";
@@ -36,8 +36,8 @@ import "./chunk-5ZDIECKE.js";
36
36
  import "./chunk-SJVCEPQS.js";
37
37
  import "./chunk-V4VKJDRA.js";
38
38
  import "./chunk-5UCVERGR.js";
39
- import "./chunk-4OALPI3C.js";
40
- import "./chunk-HQ5A4VVO.js";
39
+ import "./chunk-6NUWUTVC.js";
40
+ import "./chunk-2EQL4TLM.js";
41
41
  import "./chunk-FVDOXRUD.js";
42
42
  import "./chunk-MIWAGF3T.js";
43
43
  import "./chunk-SRCSFFDW.js";
@@ -2,28 +2,28 @@
2
2
  import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
3
3
  import {
4
4
  main
5
- } from "./chunk-BQROL43X.js";
5
+ } from "./chunk-TKN7VEZR.js";
6
6
  import "./chunk-KETNCBTB.js";
7
- import "./chunk-FCINT2KC.js";
7
+ import "./chunk-VBNMCUV2.js";
8
8
  import "./chunk-PDQLKTGM.js";
9
9
  import "./chunk-LY6VVOF4.js";
10
10
  import "./chunk-PKDES47T.js";
11
11
  import "./chunk-TYHNGMLA.js";
12
12
  import "./chunk-5ZH3ZFIZ.js";
13
- import "./chunk-S46QLY2F.js";
13
+ import "./chunk-SJSWJWAT.js";
14
14
  import "./chunk-QP4I6GEW.js";
15
15
  import "./chunk-KDBQKVNZ.js";
16
16
  import "./chunk-GLSX5WQB.js";
17
17
  import "./chunk-DVGWF6A2.js";
18
18
  import "./chunk-F5NKEKNO.js";
19
- import "./chunk-2B5RTZA4.js";
19
+ import "./chunk-XLGSGHTG.js";
20
20
  import "./chunk-3XBYDZWT.js";
21
21
  import "./chunk-AW6PDL4D.js";
22
22
  import "./chunk-6Z5EUITR.js";
23
23
  import "./chunk-IXG6F4NT.js";
24
24
  import "./chunk-CGBXPL3E.js";
25
25
  import "./chunk-IMLLN6W5.js";
26
- import "./chunk-EJMB4PAV.js";
26
+ import "./chunk-4JOKLU3I.js";
27
27
  import "./chunk-PGWSMQ4K.js";
28
28
  import "./chunk-YSB6URMT.js";
29
29
  import "./chunk-IAZSK7KK.js";
@@ -31,7 +31,7 @@ import "./chunk-TCT6PCUR.js";
31
31
  import "./chunk-LGRRFSE7.js";
32
32
  import "./chunk-XPKOWSYN.js";
33
33
  import "./chunk-BDRGN3L2.js";
34
- import "./chunk-QNFPZIP3.js";
34
+ import "./chunk-C5PAMN7Y.js";
35
35
  import "./chunk-4SBPXNVV.js";
36
36
  import "./chunk-53YJI7JU.js";
37
37
  import "./chunk-AKTUXVTN.js";
@@ -46,8 +46,8 @@ import "./chunk-SJVCEPQS.js";
46
46
  import "./chunk-BY7OLK2X.js";
47
47
  import "./chunk-V4VKJDRA.js";
48
48
  import "./chunk-5UCVERGR.js";
49
- import "./chunk-4OALPI3C.js";
50
- import "./chunk-HQ5A4VVO.js";
49
+ import "./chunk-6NUWUTVC.js";
50
+ import "./chunk-2EQL4TLM.js";
51
51
  import "./chunk-FVDOXRUD.js";
52
52
  import "./chunk-XOBFYZKQ.js";
53
53
  import "./chunk-MIWAGF3T.js";
@@ -11,8 +11,8 @@ import {
11
11
  recordTuiActivity,
12
12
  registerTransferHandler,
13
13
  requestSessionTransfer
14
- } from "./chunk-4OALPI3C.js";
15
- import "./chunk-HQ5A4VVO.js";
14
+ } from "./chunk-6NUWUTVC.js";
15
+ import "./chunk-2EQL4TLM.js";
16
16
  import "./chunk-FVDOXRUD.js";
17
17
  import "./chunk-UACMVJW6.js";
18
18
  import "./chunk-6FNQ6H4D.js";
@@ -12,7 +12,7 @@ import {
12
12
  migrateSessionEntries,
13
13
  parseSessionEntries,
14
14
  sessionEntryToContextMessages
15
- } from "./chunk-HQ5A4VVO.js";
15
+ } from "./chunk-2EQL4TLM.js";
16
16
  import "./chunk-FVDOXRUD.js";
17
17
  import "./chunk-UACMVJW6.js";
18
18
  import "./chunk-6FNQ6H4D.js";
@@ -159,7 +159,7 @@ Guide: https://docs.discord.com/developers/quick-start/getting-started`);
159
159
  { label: "When the computer boots", value: "boot" }
160
160
  ], loadServiceSettings().startup);
161
161
  startup === "boot" && console.log("Boot startup may require administrator permission or OS-managed account credentials. lunR does not save your account password.");
162
- let { ModelRuntime } = await import("./model-runtime-T552YPXL.js"), models = await (await ModelRuntime.create({ allowModelNetwork: !1 })).getAvailable();
162
+ let { ModelRuntime } = await import("./model-runtime-RFMIP23V.js"), models = await (await ModelRuntime.create({ allowModelNetwork: !1 })).getAvailable();
163
163
  if (!models.length)
164
164
  throw new Error("No saved model credentials found. Open lunr locally and use /login, then rerun gateway setup. Nothing saved.");
165
165
  let settings = SettingsManager.create(cfg.defaultProject), providers = [...new Set(models.map((model2) => model2.provider))], provider = await choose("Model provider", providers.map((value) => ({ label: value, value })), settings.getDefaultProvider()), choices = models.filter((model2) => model2.provider === provider), model = await choose("Model", choices.map((value) => ({ label: value.id, value })), choices.find((model2) => model2.id === settings.getDefaultModel()));
@@ -144,7 +144,7 @@ import {
144
144
  writeNestedControlRequest,
145
145
  writeNestedEvent,
146
146
  writePrivateAtomicJson
147
- } from "./chunk-U7MTVVT3.js";
147
+ } from "./chunk-JCL5IRM5.js";
148
148
  import {
149
149
  ASYNC_DIR,
150
150
  CHAIN_RUNS_DIR,
@@ -200,7 +200,7 @@ import {
200
200
  removeOnExit,
201
201
  resolveChildPermissions,
202
202
  snapshotParentPermissionMode
203
- } from "./chunk-EJMB4PAV.js";
203
+ } from "./chunk-4JOKLU3I.js";
204
204
  import {
205
205
  snapshotParentAutoReview
206
206
  } from "./chunk-PGWSMQ4K.js";
@@ -228,7 +228,7 @@ import "./chunk-V4VKJDRA.js";
228
228
  import "./chunk-5UCVERGR.js";
229
229
  import {
230
230
  SessionManager
231
- } from "./chunk-HQ5A4VVO.js";
231
+ } from "./chunk-2EQL4TLM.js";
232
232
  import "./chunk-FVDOXRUD.js";
233
233
  import "./chunk-MIWAGF3T.js";
234
234
  import "./chunk-IMLCWLPI.js";
@@ -1,7 +1,7 @@
1
1
  import { createRequire as __lunrRequire } from "node:module"; const require = __lunrRequire(import.meta.url);
2
2
  import {
3
3
  getBuiltinToolRenderer
4
- } from "./chunk-HYOPEHDE.js";
4
+ } from "./chunk-QQSC6CTJ.js";
5
5
  import "./chunk-4SBPXNVV.js";
6
6
  import "./chunk-53YJI7JU.js";
7
7
  import "./chunk-SJVCEPQS.js";
@@ -1912,7 +1912,7 @@ async execute(toolCallId, params) {
1912
1912
 
1913
1913
  **Argument preparation:** `prepareArguments(args)` is optional. If defined, it runs before schema validation and before `execute()`. Use it to mimic an older accepted input shape when lunR resumes an older session whose stored tool call arguments no longer match the current schema. Return the object you want validated against `parameters`. Keep the public schema strict. Do not add deprecated compatibility fields to `parameters` just to keep old resumed sessions working.
1914
1914
 
1915
- Example: an older session may contain an `edit` tool call with top-level `oldText` and `newText`, while the current schema only accepts `edits: [{ oldText, newText }]`.
1915
+ Example: an older session may contain a call to your own `edit` tool with top-level `oldText` and `newText`, while your current schema only accepts `edits: [{ oldText, newText }]`.
1916
1916
 
1917
1917
  ```typescript
1918
1918
  pi.registerTool({
@@ -1976,6 +1976,8 @@ See [examples/extensions/tool-override.ts](../examples/extensions/tool-override.
1976
1976
 
1977
1977
  **Rendering:** Built-in renderer inheritance is resolved per slot. Execution override and rendering override are independent. If your override omits `renderCall`, the built-in `renderCall` is used. If your override omits `renderResult`, the built-in `renderResult` is used. If your override omits both, the built-in renderer is used automatically (syntax highlighting, diffs, etc.). This lets you wrap built-in tools for logging or access control without reimplementing the UI.
1978
1978
 
1979
+ An override of `edit` that reuses the built-in `parameters` must also pass the built-in `prepareArguments`. It folds the flat `oldText`/`newText` form into `edits`, and without it a flat call reaches `execute` with no `edits`.
1980
+
1979
1981
  **Your implementation must match the exact result shape**, including the `details` type. The UI and session logic depend on these shapes for rendering and state tracking.
1980
1982
 
1981
1983
  Built-in tool implementations:
package/docs/security.md CHANGED
@@ -57,6 +57,34 @@ This stops an accidental read, or a web page telling the model to read the files
57
57
  - a relative name after a directory change bash can't be read from the command text, such as `cd "$D"`, `pushd` or `cd -`
58
58
  - a symlink to a directory inside `mcp-oauth/`, used by a path that doesn't name `mcp-oauth`
59
59
 
60
+ The saved values still don't reach the model through those routes. lunR replaces each one with `[saved login removed by lunR]` in two places:
61
+
62
+ - in the text the model's later requests are built from: tool results (including the errors and refusals lunR writes itself), messages extensions add (such as background subagent results), the output of your own `!` commands, and stored compaction and branch summaries, also ones an extension supplies. A value split across 2 text blocks of 1 result is caught too.
63
+ - in every line lunR writes to the session file, whatever the line holds.
64
+
65
+ If the replacement fails, lunR stores a short notice that the output was withheld instead of the output.
66
+
67
+ The values it removes, each 16 characters or more:
68
+
69
+ - API keys in `auth.json` written out literally, not as a `!command` or `$VARIABLE` reference
70
+ - OAuth access and refresh tokens in `auth.json`
71
+ - the keys of the `subscriptions.json` pool
72
+
73
+ lunR checks both files before each message and session line it filters, so a login added, refreshed or removed by this or another lunR process applies to the next output. A value removed from the files stops being replaced. A value that equals the replacement text is skipped.
74
+
75
+ Not removed:
76
+
77
+ - text an extension writes into a prompt itself: an input transform, a replaced user message, a `before_agent_start` system prompt or a prompt it sends. Extensions run inside lunR and can read the files anyway.
78
+ - text you type, including the text of a `!` command (its output is covered)
79
+ - an encoded or transformed value (base64, hex, gzip), part of a value cut off by output truncation, or a value split across 2 results
80
+ - a command that sends the file somewhere itself, such as `curl -d @auth.json`, without printing it
81
+ - keys kept only in environment variables, the values `!command` and `$VARIABLE` references resolve to, MCP tokens in `mcp-oauth/`, gateway tokens, and logins kept by other programs such as Claude Code
82
+ - images
83
+ - values already stored in a session written before this version, when you resume it
84
+ - output stored before the value was saved (for example a key printed, then saved with `/login`), in that session and in its forks and resumes
85
+
86
+ What lunR streams while a tool runs and when it finishes is not changed: your screen, the tool progress and tool end events that print-JSON and RPC mode send, and the tool progress and completion content ACP sends through its own protocol carry the raw text. The bash tool's full-output temp file and background job logs are raw local files; reading one with a tool returns a redacted result.
87
+
60
88
  The guard covers tool calls the model makes. Text you add yourself, such as `@~/.lunr/agent/auth.json` in a prompt, goes to the model as you wrote it. With `MCP_OAUTH_DIR` set, the MCP tokens live outside the profile and are not covered. Other secrets on the machine, such as `~/.ssh`, `.env` files and cloud credentials, are not covered either. lunR itself (login, `lunr doctor`) reads the files directly and is not affected.
61
89
 
62
90
  ## Running Untrusted or Unmonitored Work
@@ -157,6 +157,8 @@ export default function (pi: ExtensionAPI) {
157
157
  label: "edit",
158
158
  description: originalEdit.description,
159
159
  parameters: originalEdit.parameters,
160
+ // Folds the flat oldText/newText form into edits before execute sees it.
161
+ prepareArguments: originalEdit.prepareArguments,
160
162
  renderShell: "self",
161
163
 
162
164
  async execute(toolCallId, params, signal, onUpdate) {
@@ -212,6 +212,8 @@ export default function (pi: ExtensionAPI) {
212
212
  description:
213
213
  "Edit a file by replacing exact text. The oldText must match exactly (including whitespace). Use this for precise, surgical edits.",
214
214
  parameters: getBuiltInTools(process.cwd()).edit.parameters,
215
+ // Folds the flat oldText/newText form into edits before execute sees it.
216
+ prepareArguments: getBuiltInTools(process.cwd()).edit.prepareArguments,
215
217
 
216
218
  async execute(toolCallId, params, signal, onUpdate, ctx) {
217
219
  const tools = getBuiltInTools(ctx.cwd);
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@ashx-j/lunr-dev-install",
3
- "version": "0.2.40-dev.60.1",
3
+ "version": "0.2.40-dev.62.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ashx-j/lunr-dev-install",
9
- "version": "0.2.40-dev.60.1",
9
+ "version": "0.2.40-dev.62.1",
10
10
  "dependencies": {
11
- "@ashx-j/lunr-dev": "0.2.40-dev.60.1"
11
+ "@ashx-j/lunr-dev": "0.2.40-dev.62.1"
12
12
  },
13
13
  "engines": {
14
14
  "node": ">=22.19.0"
@@ -598,11 +598,11 @@
598
598
  }
599
599
  },
600
600
  "node_modules/@ashx-j/lunr-agent": {
601
- "version": "0.2.40-dev.60.1",
602
- "resolved": "https://registry.npmjs.org/@ashx-j/lunr-agent/-/lunr-agent-0.2.40-dev.60.1.tgz",
601
+ "version": "0.2.40-dev.62.1",
602
+ "resolved": "https://registry.npmjs.org/@ashx-j/lunr-agent/-/lunr-agent-0.2.40-dev.62.1.tgz",
603
603
  "license": "MIT",
604
604
  "dependencies": {
605
- "@ashx-j/lunr-ai": "0.2.40-dev.60.1",
605
+ "@ashx-j/lunr-ai": "0.2.40-dev.62.1",
606
606
  "typebox": "1.1.38"
607
607
  },
608
608
  "engines": {
@@ -610,8 +610,8 @@
610
610
  }
611
611
  },
612
612
  "node_modules/@ashx-j/lunr-ai": {
613
- "version": "0.2.40-dev.60.1",
614
- "resolved": "https://registry.npmjs.org/@ashx-j/lunr-ai/-/lunr-ai-0.2.40-dev.60.1.tgz",
613
+ "version": "0.2.40-dev.62.1",
614
+ "resolved": "https://registry.npmjs.org/@ashx-j/lunr-ai/-/lunr-ai-0.2.40-dev.62.1.tgz",
615
615
  "license": "MIT",
616
616
  "dependencies": {
617
617
  "@anthropic-ai/sdk": "0.91.1",
@@ -634,14 +634,14 @@
634
634
  }
635
635
  },
636
636
  "node_modules/@ashx-j/lunr-dev": {
637
- "version": "0.2.40-dev.60.1",
638
- "resolved": "https://registry.npmjs.org/@ashx-j/lunr-dev/-/lunr-dev-0.2.40-dev.60.1.tgz",
637
+ "version": "0.2.40-dev.62.1",
638
+ "resolved": "https://registry.npmjs.org/@ashx-j/lunr-dev/-/lunr-dev-0.2.40-dev.62.1.tgz",
639
639
  "license": "MIT",
640
640
  "dependencies": {
641
641
  "@agentclientprotocol/sdk": "0.26.0",
642
- "@ashx-j/lunr-agent": "0.2.40-dev.60.1",
643
- "@ashx-j/lunr-ai": "0.2.40-dev.60.1",
644
- "@ashx-j/lunr-tui": "0.2.40-dev.60.1",
642
+ "@ashx-j/lunr-agent": "0.2.40-dev.62.1",
643
+ "@ashx-j/lunr-ai": "0.2.40-dev.62.1",
644
+ "@ashx-j/lunr-tui": "0.2.40-dev.62.1",
645
645
  "@modelcontextprotocol/ext-apps": "1.7.4",
646
646
  "@modelcontextprotocol/sdk": "1.30.0",
647
647
  "@mozilla/readability": "0.6.0",
@@ -677,9 +677,9 @@
677
677
  },
678
678
  "optionalDependencies": {
679
679
  "@mariozechner/clipboard": "0.3.9",
680
- "@ashx-j/lunr-computer-win32-x64": "0.2.40-dev.60.1",
681
- "@ashx-j/lunr-computer-win32-arm64": "0.2.40-dev.60.1",
682
- "@ashx-j/lunr-computer-darwin-arm64": "0.2.40-dev.60.1"
680
+ "@ashx-j/lunr-computer-win32-x64": "0.2.40-dev.62.1",
681
+ "@ashx-j/lunr-computer-win32-arm64": "0.2.40-dev.62.1",
682
+ "@ashx-j/lunr-computer-darwin-arm64": "0.2.40-dev.62.1"
683
683
  },
684
684
  "bin": {
685
685
  "lunr-dev": "dist/dev-cli.js"
@@ -699,8 +699,8 @@
699
699
  }
700
700
  },
701
701
  "node_modules/@ashx-j/lunr-tui": {
702
- "version": "0.2.40-dev.60.1",
703
- "resolved": "https://registry.npmjs.org/@ashx-j/lunr-tui/-/lunr-tui-0.2.40-dev.60.1.tgz",
702
+ "version": "0.2.40-dev.62.1",
703
+ "resolved": "https://registry.npmjs.org/@ashx-j/lunr-tui/-/lunr-tui-0.2.40-dev.62.1.tgz",
704
704
  "license": "MIT",
705
705
  "dependencies": {
706
706
  "get-east-asian-width": "1.6.0",
@@ -3694,8 +3694,8 @@
3694
3694
  }
3695
3695
  },
3696
3696
  "node_modules/@ashx-j/lunr-computer-win32-x64": {
3697
- "version": "0.2.40-dev.60.1",
3698
- "resolved": "https://registry.npmjs.org/@ashx-j/lunr-computer-win32-x64/-/lunr-computer-win32-x64-0.2.40-dev.60.1.tgz",
3697
+ "version": "0.2.40-dev.62.1",
3698
+ "resolved": "https://registry.npmjs.org/@ashx-j/lunr-computer-win32-x64/-/lunr-computer-win32-x64-0.2.40-dev.62.1.tgz",
3699
3699
  "license": "MIT",
3700
3700
  "optional": true,
3701
3701
  "os": [
@@ -3706,8 +3706,8 @@
3706
3706
  ]
3707
3707
  },
3708
3708
  "node_modules/@ashx-j/lunr-computer-win32-arm64": {
3709
- "version": "0.2.40-dev.60.1",
3710
- "resolved": "https://registry.npmjs.org/@ashx-j/lunr-computer-win32-arm64/-/lunr-computer-win32-arm64-0.2.40-dev.60.1.tgz",
3709
+ "version": "0.2.40-dev.62.1",
3710
+ "resolved": "https://registry.npmjs.org/@ashx-j/lunr-computer-win32-arm64/-/lunr-computer-win32-arm64-0.2.40-dev.62.1.tgz",
3711
3711
  "license": "MIT",
3712
3712
  "optional": true,
3713
3713
  "os": [
@@ -3718,8 +3718,8 @@
3718
3718
  ]
3719
3719
  },
3720
3720
  "node_modules/@ashx-j/lunr-computer-darwin-arm64": {
3721
- "version": "0.2.40-dev.60.1",
3722
- "resolved": "https://registry.npmjs.org/@ashx-j/lunr-computer-darwin-arm64/-/lunr-computer-darwin-arm64-0.2.40-dev.60.1.tgz",
3721
+ "version": "0.2.40-dev.62.1",
3722
+ "resolved": "https://registry.npmjs.org/@ashx-j/lunr-computer-darwin-arm64/-/lunr-computer-darwin-arm64-0.2.40-dev.62.1.tgz",
3723
3723
  "license": "MIT",
3724
3724
  "optional": true,
3725
3725
  "os": [
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@ashx-j/lunr-dev-install",
3
- "version": "0.2.40-dev.60.1",
3
+ "version": "0.2.40-dev.62.1",
4
4
  "private": true,
5
5
  "description": "Lockfile root used by the Pi installer and updater.",
6
6
  "dependencies": {
7
- "@ashx-j/lunr-dev": "0.2.40-dev.60.1"
7
+ "@ashx-j/lunr-dev": "0.2.40-dev.62.1"
8
8
  },
9
9
  "overrides": {
10
10
  "rimraf": "6.1.2",
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@ashx-j/lunr-dev",
3
- "version": "0.2.40-dev.60.1",
3
+ "version": "0.2.40-dev.62.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@ashx-j/lunr-dev",
9
- "version": "0.2.40-dev.60.1",
9
+ "version": "0.2.40-dev.62.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@agentclientprotocol/sdk": "0.26.0",
13
- "@ashx-j/lunr-agent": "0.2.40-dev.60.1",
14
- "@ashx-j/lunr-ai": "0.2.40-dev.60.1",
15
- "@ashx-j/lunr-tui": "0.2.40-dev.60.1",
13
+ "@ashx-j/lunr-agent": "0.2.40-dev.62.1",
14
+ "@ashx-j/lunr-ai": "0.2.40-dev.62.1",
15
+ "@ashx-j/lunr-tui": "0.2.40-dev.62.1",
16
16
  "@modelcontextprotocol/ext-apps": "1.7.4",
17
17
  "@modelcontextprotocol/sdk": "1.30.0",
18
18
  "@mozilla/readability": "0.6.0",
@@ -650,11 +650,11 @@
650
650
  }
651
651
  },
652
652
  "node_modules/@ashx-j/lunr-agent": {
653
- "version": "0.2.40-dev.60.1",
654
- "resolved": "https://registry.npmjs.org/@ashx-j/lunr-agent/-/lunr-agent-0.2.40-dev.60.1.tgz",
653
+ "version": "0.2.40-dev.62.1",
654
+ "resolved": "https://registry.npmjs.org/@ashx-j/lunr-agent/-/lunr-agent-0.2.40-dev.62.1.tgz",
655
655
  "license": "MIT",
656
656
  "dependencies": {
657
- "@ashx-j/lunr-ai": "0.2.40-dev.60.1",
657
+ "@ashx-j/lunr-ai": "0.2.40-dev.62.1",
658
658
  "typebox": "1.1.38"
659
659
  },
660
660
  "engines": {
@@ -662,8 +662,8 @@
662
662
  }
663
663
  },
664
664
  "node_modules/@ashx-j/lunr-ai": {
665
- "version": "0.2.40-dev.60.1",
666
- "resolved": "https://registry.npmjs.org/@ashx-j/lunr-ai/-/lunr-ai-0.2.40-dev.60.1.tgz",
665
+ "version": "0.2.40-dev.62.1",
666
+ "resolved": "https://registry.npmjs.org/@ashx-j/lunr-ai/-/lunr-ai-0.2.40-dev.62.1.tgz",
667
667
  "license": "MIT",
668
668
  "dependencies": {
669
669
  "@anthropic-ai/sdk": "0.91.1",
@@ -686,8 +686,8 @@
686
686
  }
687
687
  },
688
688
  "node_modules/@ashx-j/lunr-tui": {
689
- "version": "0.2.40-dev.60.1",
690
- "resolved": "https://registry.npmjs.org/@ashx-j/lunr-tui/-/lunr-tui-0.2.40-dev.60.1.tgz",
689
+ "version": "0.2.40-dev.62.1",
690
+ "resolved": "https://registry.npmjs.org/@ashx-j/lunr-tui/-/lunr-tui-0.2.40-dev.62.1.tgz",
691
691
  "license": "MIT",
692
692
  "dependencies": {
693
693
  "get-east-asian-width": "1.6.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ashx-j/lunr-dev",
3
- "version": "0.2.40-dev.60.1",
3
+ "version": "0.2.40-dev.62.1",
4
4
  "description": "Terminal coding agent with subagents, MCP, permission modes, scheduled prompts and a Telegram/Discord bot",
5
5
  "type": "module",
6
6
  "piConfig": {
@@ -49,9 +49,9 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@agentclientprotocol/sdk": "0.26.0",
52
- "@ashx-j/lunr-agent": "0.2.40-dev.60.1",
53
- "@ashx-j/lunr-ai": "0.2.40-dev.60.1",
54
- "@ashx-j/lunr-tui": "0.2.40-dev.60.1",
52
+ "@ashx-j/lunr-agent": "0.2.40-dev.62.1",
53
+ "@ashx-j/lunr-ai": "0.2.40-dev.62.1",
54
+ "@ashx-j/lunr-tui": "0.2.40-dev.62.1",
55
55
  "@modelcontextprotocol/ext-apps": "1.7.4",
56
56
  "@modelcontextprotocol/sdk": "1.30.0",
57
57
  "@mozilla/readability": "0.6.0",