@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
@@ -19,7 +19,7 @@ import {
19
19
  generateBranchSummary,
20
20
  prepareCompaction,
21
21
  shouldCompact
22
- } from "./chunk-2B5RTZA4.js";
22
+ } from "./chunk-XLGSGHTG.js";
23
23
  import {
24
24
  DEFAULT_THINKING_LEVEL,
25
25
  findInitialModel
@@ -48,7 +48,7 @@ import {
48
48
  removeOnExit,
49
49
  resolveChildRuntimePermissionMode,
50
50
  wrapToolDefinition
51
- } from "./chunk-EJMB4PAV.js";
51
+ } from "./chunk-4JOKLU3I.js";
52
52
  import {
53
53
  AutoReviewTracker,
54
54
  SUBAGENT_CHILD_AUTO_REVIEW_ENV,
@@ -79,9 +79,10 @@ import {
79
79
  } from "./chunk-BDRGN3L2.js";
80
80
  import {
81
81
  ModelRuntime,
82
+ SAVED_LOGIN_WITHHELD,
82
83
  isAuthInvalidError,
83
84
  isUsageLimitError
84
- } from "./chunk-QNFPZIP3.js";
85
+ } from "./chunk-C5PAMN7Y.js";
85
86
  import {
86
87
  DEFAULT_MAX_BYTES,
87
88
  truncateTail
@@ -100,13 +101,13 @@ import {
100
101
  } from "./chunk-5UCVERGR.js";
101
102
  import {
102
103
  SessionTransferError
103
- } from "./chunk-4OALPI3C.js";
104
+ } from "./chunk-6NUWUTVC.js";
104
105
  import {
105
106
  CURRENT_SESSION_VERSION,
106
107
  SessionManager,
107
108
  getDefaultSessionDir,
108
109
  getLatestCompactionEntry
109
- } from "./chunk-HQ5A4VVO.js";
110
+ } from "./chunk-2EQL4TLM.js";
110
111
  import {
111
112
  convertToLlm
112
113
  } from "./chunk-FVDOXRUD.js";
@@ -1762,7 +1763,7 @@ var AgentSession = class {
1762
1763
  // lunr: user-role messages an extension sent, so the reviewer doesn't treat them as the user's words.
1763
1764
  _extensionUserMessages = /* @__PURE__ */ new WeakSet();
1764
1765
  constructor(config) {
1765
- this.agent = config.agent, this.sessionManager = config.sessionManager, this.settingsManager = config.settingsManager;
1766
+ this.agent = config.agent, this.sessionManager = config.sessionManager, this.sessionManager.setSavedLoginFilter(config.modelRuntime.savedLogins), this.settingsManager = config.settingsManager;
1766
1767
  let childProcess = isSubagentChildProcess(), parentAutoReview = childProcess ? process.env[SUBAGENT_CHILD_AUTO_REVIEW_ENV] : void 0, permissionMode = config.permissionMode ?? (childProcess ? resolveChildRuntimePermissionMode(process.env[SUBAGENT_CHILD_PERMISSION_ENV], parentAutoReview) : void 0) ?? this.sessionManager.getPermissionMode() ?? this.settingsManager.getDefaultPermissionMode();
1767
1768
  initializePermissionContext(this.sessionId, permissionMode, config.permissionMode), childProcess && (this._autonomous = !0, setPermissionAutonomous(!0, this.sessionId), this._parentAutoReviewRef = parentAutoReview && parentAutoReview !== "-" ? parentAutoReview : void 0), this._unregisterAutoReviewSnapshot = registerAutoReviewSnapshot(this.sessionId, () => {
1768
1769
  if (this.permissionMode !== "auto" || !this._autoReviewEnabled)
@@ -2091,7 +2092,7 @@ var AgentSession = class {
2091
2092
  }
2092
2093
  }
2093
2094
  }
2094
- if (event.type === "message_end" && this._activePromptRun?.completion?.messages.push(event.message), await this._emitExtensionEvent(event), this._emit(event.type === "agent_end" ? { ...event, willRetry: this._willRetryAfterAgentEnd(event) } : event), event.type === "message_end" && (event.message.role === "custom" ? this.sessionManager.appendCustomMessageEntry(event.message.customType, event.message.content, event.message.display, event.message.details) : (event.message.role === "user" || event.message.role === "assistant" || event.message.role === "toolResult") && this.sessionManager.appendMessage(event.message), event.message.role === "assistant")) {
2095
+ if (event.type === "message_end" && this._activePromptRun?.completion?.messages.push(event.message), await this._emitExtensionEvent(event), event.type === "message_end" && this._scrubSavedLogins(event.message), this._emit(event.type === "agent_end" ? { ...event, willRetry: this._willRetryAfterAgentEnd(event) } : event), event.type === "message_end" && (event.message.role === "custom" ? this.sessionManager.appendCustomMessageEntry(event.message.customType, event.message.content, event.message.display, event.message.details) : (event.message.role === "user" || event.message.role === "assistant" || event.message.role === "toolResult") && this.sessionManager.appendMessage(event.message), event.message.role === "assistant")) {
2095
2096
  this._lastAssistantMessage = event.message;
2096
2097
  let assistantMsg = event.message;
2097
2098
  assistantMsg.stopReason !== "error" && (this._compaction.overflowRecoveryAttempted = !1), assistantMsg.stopReason !== "error" && this._retryAttempt > 0 && (this._emit({
@@ -2128,6 +2129,24 @@ var AgentSession = class {
2128
2129
  return msg;
2129
2130
  }
2130
2131
  }
2132
+ /**
2133
+ * Replaces saved-login values (`core/saved-login-redaction.ts`) in the text of a message entering
2134
+ * history, in place, so agent state, the loop's context and every later request share it. Every
2135
+ * message the agent loop produces passes here at message_end, including its own error and refusal
2136
+ * results; `sendCustomMessage` and `recordBashResult` call it for the messages they add outside the
2137
+ * loop. Only tool results, custom messages and `!` output are filtered, and only their text: details
2138
+ * never reach a request, and the session file gets every line filtered by `SessionManager`. If
2139
+ * redaction throws, the text is replaced with SAVED_LOGIN_WITHHELD instead of going on raw.
2140
+ */
2141
+ _scrubSavedLogins(message) {
2142
+ let savedLogins = this._modelRuntime.savedLogins;
2143
+ if (savedLogins)
2144
+ try {
2145
+ message.role === "toolResult" ? message.content = savedLogins.redactContent(message.content) ?? message.content : message.role === "custom" ? message.content = savedLogins.redactMessageContent(message.content) : message.role === "bashExecution" && (message.output = savedLogins.redactText(message.output));
2146
+ } catch {
2147
+ message.role === "toolResult" ? (message.content = [{ type: "text", text: SAVED_LOGIN_WITHHELD }], message.isError = !0) : message.role === "custom" ? message.content = SAVED_LOGIN_WITHHELD : message.role === "bashExecution" && (message.output = SAVED_LOGIN_WITHHELD);
2148
+ }
2149
+ }
2131
2150
  _replaceMessageInPlace(target, replacement) {
2132
2151
  if (target === replacement)
2133
2152
  return;
@@ -2953,7 +2972,7 @@ ${args}` : skillBlock;
2953
2972
  details: message.details,
2954
2973
  timestamp: Date.now()
2955
2974
  };
2956
- options?.deliverAs === "nextTurn" ? this._pendingNextTurnMessages.push(appMessage) : this.isStreaming ? options?.deliverAs === "followUp" ? this.agent.followUp(appMessage) : this.agent.steer(appMessage) : options?.triggerTurn ? await this._runAgentPrompt(appMessage) : (this.agent.state.messages.push(appMessage), this.sessionManager.appendCustomMessageEntry(message.customType, message.content, message.display, message.details), this._emit({ type: "message_start", message: appMessage }), this._emit({ type: "message_end", message: appMessage }));
2975
+ options?.deliverAs === "nextTurn" ? this._pendingNextTurnMessages.push(appMessage) : this.isStreaming ? options?.deliverAs === "followUp" ? this.agent.followUp(appMessage) : this.agent.steer(appMessage) : options?.triggerTurn ? await this._runAgentPrompt(appMessage) : (this._scrubSavedLogins(appMessage), this.agent.state.messages.push(appMessage), this.sessionManager.appendCustomMessageEntry(appMessage.customType, appMessage.content, appMessage.display, appMessage.details), this._emit({ type: "message_start", message: appMessage }), this._emit({ type: "message_end", message: appMessage }));
2957
2976
  }
2958
2977
  /** Queue inspection is bound to this session and the sender's original details object. */
2959
2978
  hasQueuedCustomMessage(message) {
@@ -3452,7 +3471,7 @@ ${command}` : command, result = await executeBashWithOperations(resolvedCommand,
3452
3471
  timestamp: Date.now(),
3453
3472
  excludeFromContext: options?.excludeFromContext
3454
3473
  };
3455
- this.isStreaming ? this._pendingBashMessages.push(bashMessage) : (this.agent.state.messages.push(bashMessage), this.sessionManager.appendMessage(bashMessage));
3474
+ this._scrubSavedLogins(bashMessage), this.isStreaming ? this._pendingBashMessages.push(bashMessage) : (this.agent.state.messages.push(bashMessage), this.sessionManager.appendMessage(bashMessage));
3456
3475
  }
3457
3476
  /**
3458
3477
  * Cancel every running direct bash operation.
@@ -3620,9 +3639,9 @@ ${command}` : command, result = await executeBashWithOperations(resolvedCommand,
3620
3639
  */
3621
3640
  async exportToHtml(outputPath) {
3622
3641
  let [{ exportSessionToHtml }, { createToolHtmlRenderer }, { getBuiltinToolRenderer }] = await Promise.all([
3623
- import("./export-html-SW3CIZRJ.js"),
3642
+ import("./export-html-YM4QKDTD.js"),
3624
3643
  import("./tool-renderer-MV5O452K.js"),
3625
- import("./tool-renderers-KL5EPAMN.js")
3644
+ import("./tool-renderers-XZX7BEOM.js")
3626
3645
  ]), configuredThemeName = this.settingsManager.getTheme(), themeName = configuredThemeName && getThemeByName(configuredThemeName) ? configuredThemeName : void 0, toolRenderer = createToolHtmlRenderer({
3627
3646
  // Built-in definitions carry no renderers; the export draws them as the TUI does.
3628
3647
  getToolDefinition: (name) => {
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  lightBuiltinExtensions,
8
8
  loadAllBuiltinExtensions
9
- } from "./chunk-FCINT2KC.js";
9
+ } from "./chunk-VBNMCUV2.js";
10
10
  import {
11
11
  createStartupTui,
12
12
  showStartupSelector,
@@ -27,7 +27,7 @@ import {
27
27
  formatNoModelSelectedMessage,
28
28
  formatNoModelsAvailableMessage,
29
29
  getMissingSessionCwdIssue
30
- } from "./chunk-S46QLY2F.js";
30
+ } from "./chunk-SJSWJWAT.js";
31
31
  import {
32
32
  restoreStdout,
33
33
  takeOverStdout
@@ -44,7 +44,7 @@ import {
44
44
  import {
45
45
  applyInheritedSubagentPermissions,
46
46
  detectSupportedImageMimeTypeFromFile
47
- } from "./chunk-EJMB4PAV.js";
47
+ } from "./chunk-4JOKLU3I.js";
48
48
  import {
49
49
  processImage
50
50
  } from "./chunk-IAZSK7KK.js";
@@ -69,7 +69,7 @@ import {
69
69
  import {
70
70
  SessionManager,
71
71
  assertValidSessionId
72
- } from "./chunk-HQ5A4VVO.js";
72
+ } from "./chunk-2EQL4TLM.js";
73
73
  import {
74
74
  registerCustomizeBridge
75
75
  } from "./chunk-XOBFYZKQ.js";
@@ -800,12 +800,12 @@ async function main(args, options) {
800
800
  resetTimings(), (args.includes("--offline") || isOfflineModeEnabled()) && (process.env.PI_OFFLINE = "1");
801
801
  let cwd = process.cwd(), agentDir = getAgentDir(), sessionOnly = !!process.env.LUNR_ACP_WORKER_CONFIG, settingsPolicy = { sessionOnly, runtimeOverrides: sessionOnly ? ACP_SETTINGS_OVERRIDES : void 0 }, bootstrapSettingsManager = SettingsManager.create(cwd, agentDir, { projectTrusted: !1, ...settingsPolicy });
802
802
  if (applyHttpProxySettings(bootstrapSettingsManager.getGlobalSettings().httpProxy), configureHttpDispatcher(), ["setup", "features", "uninstall", "browser"].includes(args[0])) {
803
- let { handleInstallCli } = await import("./install-cli-YIIFVCFM.js");
803
+ let { handleInstallCli } = await import("./install-cli-A5HIEOOK.js");
804
804
  if (await handleInstallCli(args))
805
805
  return;
806
806
  }
807
807
  if (args[0] === "doctor") {
808
- let { handleDoctorCli } = await import("./doctor-cli-TU4HVXWP.js");
808
+ let { handleDoctorCli } = await import("./doctor-cli-DWI46VPW.js");
809
809
  if (await handleDoctorCli(args))
810
810
  return;
811
811
  }
@@ -824,7 +824,7 @@ async function main(args, options) {
824
824
  return;
825
825
  }
826
826
  if (args[0] === "gateway") {
827
- let { handleGatewayCommand } = await import("./command-6GJNLXGD.js");
827
+ let { handleGatewayCommand } = await import("./command-ARYMXJF7.js");
828
828
  if (await handleGatewayCommand(args))
829
829
  return;
830
830
  }
@@ -839,7 +839,7 @@ async function main(args, options) {
839
839
  if (time("parseArgs"), parsed.version && (console.log(VERSION), process.exit(0)), parsed.export) {
840
840
  let result;
841
841
  try {
842
- let { exportFromFile } = await import("./export-html-SW3CIZRJ.js"), outputPath = parsed.messages.length > 0 ? parsed.messages[0] : void 0;
842
+ let { exportFromFile } = await import("./export-html-YM4QKDTD.js"), outputPath = parsed.messages.length > 0 ? parsed.messages[0] : void 0;
843
843
  result = await exportFromFile(parsed.export, outputPath);
844
844
  } catch (error) {
845
845
  let message = error instanceof Error ? error.message : "Failed to export session";
@@ -847,7 +847,7 @@ async function main(args, options) {
847
847
  }
848
848
  console.log(`Exported to: ${result}`), process.exit(0);
849
849
  }
850
- let appMode = resolveAppMode(parsed, process.stdin.isTTY, process.stdout.isTTY), startupBenchmark = isTruthyEnvFlag(process.env.PI_STARTUP_BENCHMARK), readsStdin = appMode !== "rpc" && !startupBenchmark, earlyStdin = options?.pipedStdin ?? (readsStdin && appMode !== "interactive" && !readsStdinBeforeTurn(parsed) ? readPipedStdin() : void 0), interactiveModeImport = appMode === "interactive" ? import("./interactive-mode-VCPSTUAW.js") : void 0, startupView = appMode === "interactive" ? options?.startupView : void 0;
850
+ let appMode = resolveAppMode(parsed, process.stdin.isTTY, process.stdout.isTTY), startupBenchmark = isTruthyEnvFlag(process.env.PI_STARTUP_BENCHMARK), readsStdin = appMode !== "rpc" && !startupBenchmark, earlyStdin = options?.pipedStdin ?? (readsStdin && appMode !== "interactive" && !readsStdinBeforeTurn(parsed) ? readPipedStdin() : void 0), interactiveModeImport = appMode === "interactive" ? import("./interactive-mode-6UDD62TS.js") : void 0, startupView = appMode === "interactive" ? options?.startupView : void 0;
851
851
  options?.startupView && !startupView && options.startupView.stop(), applyInheritedSubagentPermissions(), appMode !== "interactive" && !isPlainRuntimeMetadataCommand(parsed) && takeOverStdout(), parsed.mode === "rpc" && parsed.fileArgs.length > 0 && (console.error(chalk4.red("Error: @file arguments are not supported in RPC mode")), process.exit(1)), validateForkFlags(parsed), validateSessionIdFlags(parsed);
852
852
  let { migratedAuthProviders: migratedProviders, deprecationWarnings } = runMigrations(cwd);
853
853
  time("runMigrations");
@@ -1038,7 +1038,7 @@ ${EXTENSION_LOAD_FAILURE_HINT}` : "";
1038
1038
  } else if (appMode === "interactive") {
1039
1039
  let [{ InteractiveMode }, { loadDeferredBuiltinExtensions }] = await Promise.all([
1040
1040
  interactiveModeImport,
1041
- import("./builtin-extensions-JNJRND4E.js")
1041
+ import("./builtin-extensions-S23KMP4W.js")
1042
1042
  ]), interactiveMode = new InteractiveMode(runtime, {
1043
1043
  migratedProviders,
1044
1044
  modelFallbackMessage,
@@ -1061,7 +1061,7 @@ ${EXTENSION_LOAD_FAILURE_HINT}` : "";
1061
1061
  }
1062
1062
  await interactiveMode.init(), time("interactiveMode.init"), process.stderr.isTTY ? process.once("exit", printTimings) : printTimings(), await interactiveMode.run();
1063
1063
  } else {
1064
- let { runPrintMode } = await import("./print-mode-M52NLHKG.js");
1064
+ let { runPrintMode } = await import("./print-mode-I6R6RWLJ.js");
1065
1065
  printTimings();
1066
1066
  let exitCode = await runPrintMode(runtime, {
1067
1067
  mode: toPrintOutputMode(appMode),
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-U5F4IC7R.js";
8
8
  import {
9
9
  SIGNAL_DISPOSE_LIMIT_MS
10
- } from "./chunk-S46QLY2F.js";
10
+ } from "./chunk-SJSWJWAT.js";
11
11
  import {
12
12
  flushRawStdout,
13
13
  writeRawStdout
@@ -979,11 +979,11 @@ var lightBuiltinExtensions = [
979
979
  ], DEFERRED_BUILTIN_LOADERS = [
980
980
  { name: "pi-ollama-cloud", load: () => import("./pi-ollama-cloud-2KQAFVBI.js") },
981
981
  { name: "narumiruna-pi-goal", load: () => import("./goal-CVGA3XFI.js") },
982
- { name: "lunr-cron", load: () => import("./lunr-cron-3VI5CLK3.js") },
982
+ { name: "lunr-cron", load: () => import("./lunr-cron-FYLIKLSZ.js") },
983
983
  { name: "lunr-pr-watch", load: () => import("./lunr-pr-watch-C7Q3TFT6.js") },
984
984
  { name: "pi-intercom", load: () => import("./pi-intercom-ZRDKISVO.js") },
985
985
  { name: "pi-prompt-template-model", load: () => import("./pi-prompt-template-model-UL2T2HLL.js") },
986
- { name: "pi-subagents", load: () => import("./pi-subagents-YVVMY4B4.js") },
986
+ { name: "pi-subagents", load: () => import("./pi-subagents-C5FBVY72.js") },
987
987
  { name: "pi-web-access", load: () => import("./pi-web-access-3LE56I3G.js") },
988
988
  { name: "lunr-browser", load: () => import("./lunr-browser-3CVKQBIJ.js") },
989
989
  { name: "pi-lsp-extension", load: () => import("./src-J6FSKIFT.js") },
@@ -2,7 +2,7 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
2
2
  import {
3
3
  buildSessionContext,
4
4
  sessionEntryToContextMessages
5
- } from "./chunk-HQ5A4VVO.js";
5
+ } from "./chunk-2EQL4TLM.js";
6
6
  import {
7
7
  convertToLlm,
8
8
  createBranchSummaryMessage,
@@ -8,14 +8,14 @@ import {
8
8
  } from "./chunk-VCVGJLQA.js";
9
9
  import {
10
10
  computeContextBreakdown
11
- } from "./chunk-GX7UZDSI.js";
11
+ } from "./chunk-EWYLZSES.js";
12
12
  import {
13
13
  getSubagentSpinnerDefinition
14
14
  } from "./chunk-US544NN6.js";
15
15
  import {
16
16
  getBuiltinToolRenderer,
17
17
  truncateToVisualLines
18
- } from "./chunk-HYOPEHDE.js";
18
+ } from "./chunk-QQSC6CTJ.js";
19
19
  import {
20
20
  copyToClipboard,
21
21
  readClipboardText
@@ -60,7 +60,7 @@ import {
60
60
  peekRollbackTurnsConsumed,
61
61
  rollbackLastTurn,
62
62
  setRollbackWarningHandler
63
- } from "./chunk-S46QLY2F.js";
63
+ } from "./chunk-SJSWJWAT.js";
64
64
  import {
65
65
  notifyTodosEnabledChanged
66
66
  } from "./chunk-KDBQKVNZ.js";
@@ -81,7 +81,7 @@ import {
81
81
  ensureTool,
82
82
  getToolPath,
83
83
  sweepStaleTempFiles
84
- } from "./chunk-EJMB4PAV.js";
84
+ } from "./chunk-4JOKLU3I.js";
85
85
  import {
86
86
  convertToPng,
87
87
  processImage
@@ -101,7 +101,7 @@ import {
101
101
  formatCatalogRefreshSummary,
102
102
  hasGrokCliXaiAuth,
103
103
  refreshModelCandidatesForInit
104
- } from "./chunk-QNFPZIP3.js";
104
+ } from "./chunk-C5PAMN7Y.js";
105
105
  import {
106
106
  DEFAULT_MAX_BYTES,
107
107
  DEFAULT_MAX_LINES,
@@ -139,11 +139,11 @@ import {
139
139
  recordTuiActivity,
140
140
  registerTransferHandler,
141
141
  requestSessionTransfer
142
- } from "./chunk-4OALPI3C.js";
142
+ } from "./chunk-6NUWUTVC.js";
143
143
  import {
144
144
  SessionManager,
145
145
  sessionEntryToContextMessages
146
- } from "./chunk-HQ5A4VVO.js";
146
+ } from "./chunk-2EQL4TLM.js";
147
147
  import {
148
148
  createCompactionSummaryMessage
149
149
  } from "./chunk-FVDOXRUD.js";
@@ -8,9 +8,9 @@ async function handleGatewayCommand(args) {
8
8
  try {
9
9
  let sub = args[1];
10
10
  if (sub === "setup")
11
- await (await import("./setup-7IC2PQIB.js")).setupGateway();
11
+ await (await import("./setup-HF7HDJKG.js")).setupGateway();
12
12
  else if (sub === "pair" && args[2] === "approve" && args.includes("--owner"))
13
- console.log((await import("./setup-7IC2PQIB.js")).approveGatewayOwner(args[3], args[4]));
13
+ console.log((await import("./setup-HF7HDJKG.js")).approveGatewayOwner(args[3], args[4]));
14
14
  else if (["start", "stop", "restart", "status", "logs", "doctor", "autostart"].includes(sub)) {
15
15
  let service = await import("./service-BA7TAWU6.js");
16
16
  if (sub === "start" && console.log(await service.startGatewayService()), sub === "stop" && console.log(await service.stopGatewayService()), sub === "restart" && (await service.stopGatewayService(), console.log(await service.startGatewayService())), (sub === "status" || sub === "doctor") && console.log(service.serviceStatusText()), sub === "logs" && console.log(service.readGatewayLog()), sub === "autostart") {
@@ -32,7 +32,7 @@ lunr gateway autostart off|login|boot
32
32
  lunr gateway pair approve <platform> <code> [--owner]
33
33
  lunr gateway pair list`);
34
34
  else {
35
- let { runGateway } = await import("./gateway-UDWVYEGX.js");
35
+ let { runGateway } = await import("./gateway-I7YA6MJ4.js");
36
36
  process.exitCode = await runGateway(sub === "run" ? args.slice(2) : args.slice(1));
37
37
  }
38
38
  } catch (error) {
@@ -5,12 +5,12 @@ import {
5
5
  formatHelpText,
6
6
  runChatCommand,
7
7
  sendCommandReply
8
- } from "./chunk-RXG6DWO2.js";
9
- import "./chunk-GAWWLIGY.js";
8
+ } from "./chunk-S2BEWKPR.js";
9
+ import "./chunk-FIDZY4JX.js";
10
10
  import "./chunk-Y4BBHJZS.js";
11
11
  import "./chunk-ODWFHNX7.js";
12
- import "./chunk-GX7UZDSI.js";
13
- import "./chunk-2B5RTZA4.js";
12
+ import "./chunk-EWYLZSES.js";
13
+ import "./chunk-XLGSGHTG.js";
14
14
  import "./chunk-3XBYDZWT.js";
15
15
  import "./chunk-AW6PDL4D.js";
16
16
  import "./chunk-CGBXPL3E.js";
@@ -20,7 +20,7 @@ import "./chunk-XPKOWSYN.js";
20
20
  import "./chunk-BDRGN3L2.js";
21
21
  import "./chunk-QTRB4APZ.js";
22
22
  import "./chunk-SJVCEPQS.js";
23
- import "./chunk-HQ5A4VVO.js";
23
+ import "./chunk-2EQL4TLM.js";
24
24
  import "./chunk-FVDOXRUD.js";
25
25
  import "./chunk-IMLCWLPI.js";
26
26
  import "./chunk-UACMVJW6.js";
@@ -14,7 +14,7 @@ import {
14
14
  ModelRuntime,
15
15
  hasGrokCliXaiAuth,
16
16
  officialCatalogCachePath
17
- } from "./chunk-QNFPZIP3.js";
17
+ } from "./chunk-C5PAMN7Y.js";
18
18
  import {
19
19
  SettingsManager
20
20
  } from "./chunk-V3AX7UT3.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
  SessionManager
4
- } from "./chunk-HQ5A4VVO.js";
4
+ } from "./chunk-2EQL4TLM.js";
5
5
  import "./chunk-FVDOXRUD.js";
6
6
  import "./chunk-UACMVJW6.js";
7
7
  import {
@@ -4,12 +4,12 @@ import {
4
4
  botCommandSpecs,
5
5
  runChatCommand,
6
6
  sendCommandReply
7
- } from "./chunk-RXG6DWO2.js";
7
+ } from "./chunk-S2BEWKPR.js";
8
8
  import {
9
9
  AgentBridge,
10
10
  QUEUED,
11
11
  startGatewayCron
12
- } from "./chunk-Y7DFMHY5.js";
12
+ } from "./chunk-KV4RBM3L.js";
13
13
  import {
14
14
  FORWARDED_COMMANDS,
15
15
  acceptGatewayInput,
@@ -35,7 +35,7 @@ import {
35
35
  startGatewayPresenter,
36
36
  stopButtonSweeper,
37
37
  stopGatewayPresenter
38
- } from "./chunk-GAWWLIGY.js";
38
+ } from "./chunk-FIDZY4JX.js";
39
39
  import {
40
40
  createPairingStore
41
41
  } from "./chunk-Y4BBHJZS.js";
@@ -43,8 +43,8 @@ import {
43
43
  claimGateway
44
44
  } from "./chunk-ODWFHNX7.js";
45
45
  import "./chunk-CJECDQKP.js";
46
- import "./chunk-GX7UZDSI.js";
47
- import "./chunk-2B5RTZA4.js";
46
+ import "./chunk-EWYLZSES.js";
47
+ import "./chunk-XLGSGHTG.js";
48
48
  import "./chunk-3XBYDZWT.js";
49
49
  import "./chunk-AW6PDL4D.js";
50
50
  import "./chunk-CGBXPL3E.js";
@@ -63,8 +63,8 @@ import "./chunk-QTRB4APZ.js";
63
63
  import "./chunk-SJVCEPQS.js";
64
64
  import "./chunk-V4VKJDRA.js";
65
65
  import "./chunk-5UCVERGR.js";
66
- import "./chunk-4OALPI3C.js";
67
- import "./chunk-HQ5A4VVO.js";
66
+ import "./chunk-6NUWUTVC.js";
67
+ import "./chunk-2EQL4TLM.js";
68
68
  import "./chunk-FVDOXRUD.js";
69
69
  import "./chunk-IMLCWLPI.js";
70
70
  import "./chunk-ETQN5FKM.js";
@@ -376,7 +376,7 @@ var DiscordAdapter = class {
376
376
  return await interaction.respond([]), !0;
377
377
  let query = String(interaction.options.getFocused()).toLowerCase(), values = [];
378
378
  if (interaction.commandName === "mode" && (values = [...PERMISSION_MODES]), this.commandSuggestions && ["thinking", "model"].includes(interaction.commandName) && (values = [...await this.commandSuggestions(source, interaction.commandName)]), interaction.commandName === "project" && (values = cfg.projectRoots ?? []), interaction.commandName === "sessions") {
379
- let { SessionManager } = await import("./session-manager-I6535F4R.js");
379
+ let { SessionManager } = await import("./session-manager-AGK72CRA.js");
380
380
  values = (await Promise.race([
381
381
  SessionManager.listAll(),
382
382
  new Promise((resolve) => setTimeout(() => resolve([]), 1500))
@@ -1177,7 +1177,7 @@ function createRouter(deps) {
1177
1177
  return !1;
1178
1178
  let firstToken = text.split(/\s+/, 1)[0].toLowerCase(), commandWord = firstToken.split("@")[0].slice(1), args = text.slice(firstToken.length).trim();
1179
1179
  if (deps.remoteControls) {
1180
- let { handleMobileCommand, cancelMobileTransfer } = await import("./mobile-commands-HQXEYAF6.js");
1180
+ let { handleMobileCommand, cancelMobileTransfer } = await import("./mobile-commands-CKQHQBEW.js");
1181
1181
  if (["stop", "stopall", "new", "cancel"].includes(commandWord) && cancelMobileTransfer(key), commandWord === "cancel")
1182
1182
  return invalidateGatewayDialogs(key), await adapter.send(event.source.chatId, "Cancelled the pending selection or transfer.", {
1183
1183
  threadId: event.source.threadId
@@ -1,7 +1,7 @@
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 {
6
6
  AssistantMessageComponent,
7
7
  BashExecutionComponent,
@@ -20,7 +20,7 @@ import {
20
20
  TreeSelectorComponent,
21
21
  UserMessageComponent,
22
22
  UserMessageSelectorComponent
23
- } from "./chunk-XXGJ7Z3C.js";
23
+ } from "./chunk-YVOU5W7H.js";
24
24
  import "./chunk-JDIZKHWA.js";
25
25
  import "./chunk-VCVGJLQA.js";
26
26
  import {
@@ -30,14 +30,14 @@ import {
30
30
  attachJsonlLineReader,
31
31
  serializeJsonLine
32
32
  } from "./chunk-M5KKHDIK.js";
33
- import "./chunk-GX7UZDSI.js";
33
+ import "./chunk-EWYLZSES.js";
34
34
  import "./chunk-U5F4IC7R.js";
35
35
  import "./chunk-US544NN6.js";
36
36
  import "./chunk-X6LRALCV.js";
37
37
  import {
38
38
  renderDiff,
39
39
  truncateToVisualLines
40
- } from "./chunk-HYOPEHDE.js";
40
+ } from "./chunk-QQSC6CTJ.js";
41
41
  import {
42
42
  copyToClipboard
43
43
  } from "./chunk-2X4MTTY2.js";
@@ -46,9 +46,9 @@ import "./chunk-3RR3PVJB.js";
46
46
  import "./chunk-UWYPDXMG.js";
47
47
  import {
48
48
  main
49
- } from "./chunk-BQROL43X.js";
49
+ } from "./chunk-TKN7VEZR.js";
50
50
  import "./chunk-KETNCBTB.js";
51
- import "./chunk-FCINT2KC.js";
51
+ import "./chunk-VBNMCUV2.js";
52
52
  import "./chunk-PDQLKTGM.js";
53
53
  import "./chunk-LY6VVOF4.js";
54
54
  import "./chunk-PKDES47T.js";
@@ -65,7 +65,7 @@ import {
65
65
  parseSkillBlock,
66
66
  wrapRegisteredTool,
67
67
  wrapRegisteredTools
68
- } from "./chunk-S46QLY2F.js";
68
+ } from "./chunk-SJSWJWAT.js";
69
69
  import {
70
70
  DefaultResourceLoader,
71
71
  createEventBus,
@@ -97,7 +97,7 @@ import {
97
97
  prepareBranchEntries,
98
98
  serializeConversation,
99
99
  shouldCompact
100
- } from "./chunk-2B5RTZA4.js";
100
+ } from "./chunk-XLGSGHTG.js";
101
101
  import {
102
102
  resolveCliModel,
103
103
  resolveModelScopeWithDiagnostics
@@ -130,7 +130,7 @@ import {
130
130
  createReadToolDefinition,
131
131
  createWriteTool,
132
132
  createWriteToolDefinition
133
- } from "./chunk-EJMB4PAV.js";
133
+ } from "./chunk-4JOKLU3I.js";
134
134
  import "./chunk-PGWSMQ4K.js";
135
135
  import {
136
136
  withFileMutationQueue
@@ -149,7 +149,7 @@ import {
149
149
  AuthStorage,
150
150
  ModelRuntime,
151
151
  readStoredCredential
152
- } from "./chunk-QNFPZIP3.js";
152
+ } from "./chunk-C5PAMN7Y.js";
153
153
  import {
154
154
  generateDiffString,
155
155
  generateUnifiedPatch
@@ -188,7 +188,7 @@ import {
188
188
  recordTuiActivity,
189
189
  registerTransferHandler,
190
190
  requestSessionTransfer
191
- } from "./chunk-4OALPI3C.js";
191
+ } from "./chunk-6NUWUTVC.js";
192
192
  import {
193
193
  CURRENT_SESSION_VERSION,
194
194
  SessionManager,
@@ -198,7 +198,7 @@ import {
198
198
  migrateSessionEntries,
199
199
  parseSessionEntries,
200
200
  sessionEntryToContextMessages
201
- } from "./chunk-HQ5A4VVO.js";
201
+ } from "./chunk-2EQL4TLM.js";
202
202
  import {
203
203
  convertToLlm
204
204
  } from "./chunk-FVDOXRUD.js";
@@ -121,7 +121,7 @@ async function runSetup(argv) {
121
121
  await installBrowser(!1);
122
122
  let next = applied.next;
123
123
  if (!parsed.yes && !explicitFeatures)
124
- await (await import("./setup-7IC2PQIB.js")).setupGateway(), next = loadInstallFeatures();
124
+ await (await import("./setup-HF7HDJKG.js")).setupGateway(), next = loadInstallFeatures();
125
125
  else {
126
126
  let enabled = /* @__PURE__ */ new Set([...applied.enabledIds, ...parsed.sets.map((set) => getFeatureSpec(set.id)?.id)]);
127
127
  for (let id of enabled) {
@@ -2,32 +2,32 @@ import { createRequire as __lunrRequire } from "node:module"; const require = __
2
2
  import {
3
3
  InteractiveMode,
4
4
  startInteractiveToolInstalls
5
- } from "./chunk-XXGJ7Z3C.js";
5
+ } from "./chunk-YVOU5W7H.js";
6
6
  import "./chunk-JDIZKHWA.js";
7
7
  import "./chunk-VCVGJLQA.js";
8
- import "./chunk-GX7UZDSI.js";
8
+ import "./chunk-EWYLZSES.js";
9
9
  import "./chunk-US544NN6.js";
10
- import "./chunk-HYOPEHDE.js";
10
+ import "./chunk-QQSC6CTJ.js";
11
11
  import "./chunk-2X4MTTY2.js";
12
12
  import "./chunk-NUIFPZWX.js";
13
13
  import "./chunk-3RR3PVJB.js";
14
14
  import "./chunk-UWYPDXMG.js";
15
15
  import "./chunk-PDQLKTGM.js";
16
16
  import "./chunk-5ZH3ZFIZ.js";
17
- import "./chunk-S46QLY2F.js";
17
+ import "./chunk-SJSWJWAT.js";
18
18
  import "./chunk-QP4I6GEW.js";
19
19
  import "./chunk-KDBQKVNZ.js";
20
20
  import "./chunk-GLSX5WQB.js";
21
21
  import "./chunk-DVGWF6A2.js";
22
22
  import "./chunk-F5NKEKNO.js";
23
- import "./chunk-2B5RTZA4.js";
23
+ import "./chunk-XLGSGHTG.js";
24
24
  import "./chunk-3XBYDZWT.js";
25
25
  import "./chunk-AW6PDL4D.js";
26
26
  import "./chunk-6Z5EUITR.js";
27
27
  import "./chunk-IXG6F4NT.js";
28
28
  import "./chunk-CGBXPL3E.js";
29
29
  import "./chunk-IMLLN6W5.js";
30
- import "./chunk-EJMB4PAV.js";
30
+ import "./chunk-4JOKLU3I.js";
31
31
  import "./chunk-PGWSMQ4K.js";
32
32
  import "./chunk-YSB6URMT.js";
33
33
  import "./chunk-IAZSK7KK.js";
@@ -35,7 +35,7 @@ import "./chunk-TCT6PCUR.js";
35
35
  import "./chunk-LGRRFSE7.js";
36
36
  import "./chunk-XPKOWSYN.js";
37
37
  import "./chunk-BDRGN3L2.js";
38
- import "./chunk-QNFPZIP3.js";
38
+ import "./chunk-C5PAMN7Y.js";
39
39
  import "./chunk-4SBPXNVV.js";
40
40
  import "./chunk-53YJI7JU.js";
41
41
  import "./chunk-V3AX7UT3.js";
@@ -47,8 +47,8 @@ import "./chunk-SJVCEPQS.js";
47
47
  import "./chunk-BY7OLK2X.js";
48
48
  import "./chunk-V4VKJDRA.js";
49
49
  import "./chunk-5UCVERGR.js";
50
- import "./chunk-4OALPI3C.js";
51
- import "./chunk-HQ5A4VVO.js";
50
+ import "./chunk-6NUWUTVC.js";
51
+ import "./chunk-2EQL4TLM.js";
52
52
  import "./chunk-FVDOXRUD.js";
53
53
  import "./chunk-XOBFYZKQ.js";
54
54
  import "./chunk-MIWAGF3T.js";
@@ -13,10 +13,10 @@ import {
13
13
  setCronDeliverValidator,
14
14
  startScheduler,
15
15
  updateJob
16
- } from "./chunk-Y7DFMHY5.js";
16
+ } from "./chunk-KV4RBM3L.js";
17
17
  import {
18
18
  resolveWithinRoots
19
- } from "./chunk-GAWWLIGY.js";
19
+ } from "./chunk-FIDZY4JX.js";
20
20
  import "./chunk-Y4BBHJZS.js";
21
21
  import "./chunk-ODWFHNX7.js";
22
22
  import {
@@ -39,8 +39,8 @@ import "./chunk-QTRB4APZ.js";
39
39
  import "./chunk-SJVCEPQS.js";
40
40
  import "./chunk-V4VKJDRA.js";
41
41
  import "./chunk-5UCVERGR.js";
42
- import "./chunk-4OALPI3C.js";
43
- import "./chunk-HQ5A4VVO.js";
42
+ import "./chunk-6NUWUTVC.js";
43
+ import "./chunk-2EQL4TLM.js";
44
44
  import "./chunk-FVDOXRUD.js";
45
45
  import "./chunk-IMLCWLPI.js";
46
46
  import "./chunk-ETQN5FKM.js";