@namzu/cli 45.7.0 → 45.8.0

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 (110) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/bin.js +1 -1
  3. package/dist/chunks/{acp-VJBPFMDK.js → acp-JBHJROEH.js} +8 -8
  4. package/dist/chunks/{add-FRWIF4G3.js → add-LFNYFY3Q.js} +5 -5
  5. package/dist/chunks/{agent-R6JYTUTC.js → agent-Y6CN4KJW.js} +4 -4
  6. package/dist/chunks/{agent-session-I45DFZQY.js → agent-session-A2GKM6DR.js} +5 -5
  7. package/dist/chunks/{bin-main-LXWGB4OG.js → bin-main-S56ONZ3V.js} +3 -3
  8. package/dist/chunks/{chat-43PBV7FK.js → chat-K4FCFUWQ.js} +2 -2
  9. package/dist/chunks/{chunk-BTMU336W.js → chunk-2ZUXBK2G.js} +2 -2
  10. package/dist/chunks/{chunk-4X3I6SZF.js → chunk-3C34WF54.js} +28 -3
  11. package/dist/chunks/{chunk-4X3I6SZF.js.map → chunk-3C34WF54.js.map} +1 -1
  12. package/dist/chunks/{chunk-76GATJYU.js → chunk-6DZX5T3S.js} +2 -2
  13. package/dist/chunks/{chunk-6GGXRCTW.js → chunk-7EO7AVNF.js} +2 -2
  14. package/dist/chunks/{chunk-AMDJD6CH.js → chunk-7LUBE6UX.js} +2 -2
  15. package/dist/chunks/{chunk-I73NPSRQ.js → chunk-ACEUJQLA.js} +5 -5
  16. package/dist/chunks/{chunk-EXQE56JO.js → chunk-BP62WUCC.js} +2 -2
  17. package/dist/chunks/{chunk-SVMUXZQE.js → chunk-BWSU3DAY.js} +2 -2
  18. package/dist/chunks/{chunk-CX7BSYST.js → chunk-CGZZAOM3.js} +2 -2
  19. package/dist/chunks/{chunk-YX7WHZAR.js → chunk-DFGGKZAN.js} +2 -2
  20. package/dist/chunks/{chunk-GPA7Y4OA.js → chunk-EUFLKDG6.js} +17 -17
  21. package/dist/chunks/{chunk-Z7XLQDDV.js → chunk-GBSX7ZFZ.js} +3 -3
  22. package/dist/chunks/{chunk-G3TIGCWK.js → chunk-H7JRG6GI.js} +2 -2
  23. package/dist/chunks/{chunk-SSYTEIX5.js → chunk-JR6WEANS.js} +2 -2
  24. package/dist/chunks/{chunk-36QGYDNX.js → chunk-LXJ7DTNX.js} +5 -4
  25. package/dist/chunks/{chunk-M4JIXKZL.js → chunk-MDA27KYF.js} +3 -3
  26. package/dist/chunks/{chunk-NHCVWH7D.js → chunk-PKYLKUGU.js} +3 -3
  27. package/dist/chunks/{chunk-I4NKYTRH.js → chunk-RZJ36LG4.js} +2 -2
  28. package/dist/chunks/{chunk-YUMBJ6IT.js → chunk-VXNVO5KJ.js} +3 -3
  29. package/dist/chunks/{chunk-MLAJ6ZIG.js → chunk-XMSKDE7G.js} +2 -2
  30. package/dist/chunks/{chunk-HFWISJ3W.js → chunk-YLDVAXIV.js} +2 -2
  31. package/dist/chunks/{cli-runtime-NB4HBCBU.js → cli-runtime-42P3ZY2L.js} +3 -3
  32. package/dist/chunks/{doctor-DUEPRCGZ.js → doctor-D7H7UXX6.js} +6 -6
  33. package/dist/chunks/{drain-555N6B62.js → drain-SQ2VZUFJ.js} +2 -2
  34. package/dist/chunks/{exec-544ZWPWM.js → exec-XFV5IMJK.js} +7 -7
  35. package/dist/chunks/{host-queries-FV3F52SM.js → host-queries-HBSQEKUN.js} +2 -2
  36. package/dist/chunks/{learn-XV2UYYVX.js → learn-M5HKRVLA.js} +2 -2
  37. package/dist/chunks/{learn-builtin-W37PQFJV.js → learn-builtin-WLEJOPPA.js} +3 -3
  38. package/dist/chunks/{lifecycle-OJC7MXNX.js → lifecycle-7YYVKNQ4.js} +6 -6
  39. package/dist/chunks/{list-IKFFQ2WL.js → list-OKJHK375.js} +3 -3
  40. package/dist/chunks/{live-6CIVSKFU.js → live-A5IU5I6S.js} +5 -5
  41. package/dist/chunks/{mcp-KJ3RGN3D.js → mcp-MNISFJGL.js} +2 -2
  42. package/dist/chunks/{message-command-SNUKD4UM.js → message-command-X2JR6V5A.js} +7 -7
  43. package/dist/chunks/{pal-NJWKENBJ.js → pal-3GWS24QH.js} +3 -3
  44. package/dist/chunks/{resident-RAXXTDAY.js → resident-QR32XZKI.js} +4 -4
  45. package/dist/chunks/{schedule-QIA3XRIE.js → schedule-VGYXOLXD.js} +5 -5
  46. package/dist/chunks/{service-MVWDIVXD.js → service-TNJWG2JK.js} +5 -5
  47. package/dist/chunks/{session-step-JL6A7XWG.js → session-step-2A6KZCPC.js} +2 -2
  48. package/dist/chunks/{start-check-M4YDWO36.js → start-check-XGAFZVD7.js} +2 -2
  49. package/dist/chunks/{tui-OYA5Z4UH.js → tui-2PZSAL7N.js} +224 -82
  50. package/dist/chunks/tui-2PZSAL7N.js.map +6 -0
  51. package/dist/chunks/{upgrade-7W7CHF72.js → upgrade-HQWKNEAA.js} +3 -3
  52. package/dist/config/load.d.ts.map +1 -1
  53. package/dist/config/schema.d.ts +11 -0
  54. package/dist/config/schema.d.ts.map +1 -1
  55. package/dist/index.js +7 -7
  56. package/dist/integrations/decision/notify-worthy.d.ts +25 -0
  57. package/dist/integrations/decision/notify-worthy.d.ts.map +1 -0
  58. package/dist/integrations/decision/points.d.ts +71 -0
  59. package/dist/integrations/decision/points.d.ts.map +1 -0
  60. package/dist/integrations/notifications/sound.d.ts +9 -0
  61. package/dist/integrations/notifications/sound.d.ts.map +1 -1
  62. package/dist/integrations/resident/runner-worker.js +1 -1
  63. package/dist/tui/App.d.ts.map +1 -1
  64. package/package.json +6 -6
  65. package/dist/chunks/tui-OYA5Z4UH.js.map +0 -6
  66. /package/dist/chunks/{acp-VJBPFMDK.js.map → acp-JBHJROEH.js.map} +0 -0
  67. /package/dist/chunks/{add-FRWIF4G3.js.map → add-LFNYFY3Q.js.map} +0 -0
  68. /package/dist/chunks/{agent-R6JYTUTC.js.map → agent-Y6CN4KJW.js.map} +0 -0
  69. /package/dist/chunks/{agent-session-I45DFZQY.js.map → agent-session-A2GKM6DR.js.map} +0 -0
  70. /package/dist/chunks/{bin-main-LXWGB4OG.js.map → bin-main-S56ONZ3V.js.map} +0 -0
  71. /package/dist/chunks/{chat-43PBV7FK.js.map → chat-K4FCFUWQ.js.map} +0 -0
  72. /package/dist/chunks/{chunk-BTMU336W.js.map → chunk-2ZUXBK2G.js.map} +0 -0
  73. /package/dist/chunks/{chunk-76GATJYU.js.map → chunk-6DZX5T3S.js.map} +0 -0
  74. /package/dist/chunks/{chunk-6GGXRCTW.js.map → chunk-7EO7AVNF.js.map} +0 -0
  75. /package/dist/chunks/{chunk-AMDJD6CH.js.map → chunk-7LUBE6UX.js.map} +0 -0
  76. /package/dist/chunks/{chunk-I73NPSRQ.js.map → chunk-ACEUJQLA.js.map} +0 -0
  77. /package/dist/chunks/{chunk-EXQE56JO.js.map → chunk-BP62WUCC.js.map} +0 -0
  78. /package/dist/chunks/{chunk-SVMUXZQE.js.map → chunk-BWSU3DAY.js.map} +0 -0
  79. /package/dist/chunks/{chunk-CX7BSYST.js.map → chunk-CGZZAOM3.js.map} +0 -0
  80. /package/dist/chunks/{chunk-YX7WHZAR.js.map → chunk-DFGGKZAN.js.map} +0 -0
  81. /package/dist/chunks/{chunk-GPA7Y4OA.js.map → chunk-EUFLKDG6.js.map} +0 -0
  82. /package/dist/chunks/{chunk-Z7XLQDDV.js.map → chunk-GBSX7ZFZ.js.map} +0 -0
  83. /package/dist/chunks/{chunk-G3TIGCWK.js.map → chunk-H7JRG6GI.js.map} +0 -0
  84. /package/dist/chunks/{chunk-SSYTEIX5.js.map → chunk-JR6WEANS.js.map} +0 -0
  85. /package/dist/chunks/{chunk-36QGYDNX.js.map → chunk-LXJ7DTNX.js.map} +0 -0
  86. /package/dist/chunks/{chunk-M4JIXKZL.js.map → chunk-MDA27KYF.js.map} +0 -0
  87. /package/dist/chunks/{chunk-NHCVWH7D.js.map → chunk-PKYLKUGU.js.map} +0 -0
  88. /package/dist/chunks/{chunk-I4NKYTRH.js.map → chunk-RZJ36LG4.js.map} +0 -0
  89. /package/dist/chunks/{chunk-YUMBJ6IT.js.map → chunk-VXNVO5KJ.js.map} +0 -0
  90. /package/dist/chunks/{chunk-MLAJ6ZIG.js.map → chunk-XMSKDE7G.js.map} +0 -0
  91. /package/dist/chunks/{chunk-HFWISJ3W.js.map → chunk-YLDVAXIV.js.map} +0 -0
  92. /package/dist/chunks/{cli-runtime-NB4HBCBU.js.map → cli-runtime-42P3ZY2L.js.map} +0 -0
  93. /package/dist/chunks/{doctor-DUEPRCGZ.js.map → doctor-D7H7UXX6.js.map} +0 -0
  94. /package/dist/chunks/{drain-555N6B62.js.map → drain-SQ2VZUFJ.js.map} +0 -0
  95. /package/dist/chunks/{exec-544ZWPWM.js.map → exec-XFV5IMJK.js.map} +0 -0
  96. /package/dist/chunks/{host-queries-FV3F52SM.js.map → host-queries-HBSQEKUN.js.map} +0 -0
  97. /package/dist/chunks/{learn-XV2UYYVX.js.map → learn-M5HKRVLA.js.map} +0 -0
  98. /package/dist/chunks/{learn-builtin-W37PQFJV.js.map → learn-builtin-WLEJOPPA.js.map} +0 -0
  99. /package/dist/chunks/{lifecycle-OJC7MXNX.js.map → lifecycle-7YYVKNQ4.js.map} +0 -0
  100. /package/dist/chunks/{list-IKFFQ2WL.js.map → list-OKJHK375.js.map} +0 -0
  101. /package/dist/chunks/{live-6CIVSKFU.js.map → live-A5IU5I6S.js.map} +0 -0
  102. /package/dist/chunks/{mcp-KJ3RGN3D.js.map → mcp-MNISFJGL.js.map} +0 -0
  103. /package/dist/chunks/{message-command-SNUKD4UM.js.map → message-command-X2JR6V5A.js.map} +0 -0
  104. /package/dist/chunks/{pal-NJWKENBJ.js.map → pal-3GWS24QH.js.map} +0 -0
  105. /package/dist/chunks/{resident-RAXXTDAY.js.map → resident-QR32XZKI.js.map} +0 -0
  106. /package/dist/chunks/{schedule-QIA3XRIE.js.map → schedule-VGYXOLXD.js.map} +0 -0
  107. /package/dist/chunks/{service-MVWDIVXD.js.map → service-TNJWG2JK.js.map} +0 -0
  108. /package/dist/chunks/{session-step-JL6A7XWG.js.map → session-step-2A6KZCPC.js.map} +0 -0
  109. /package/dist/chunks/{start-check-M4YDWO36.js.map → start-check-XGAFZVD7.js.map} +0 -0
  110. /package/dist/chunks/{upgrade-7W7CHF72.js.map → upgrade-HQWKNEAA.js.map} +0 -0
@@ -14,7 +14,7 @@ import {
14
14
  confirmationView,
15
15
  describeChanges,
16
16
  permissionsChanged
17
- } from "./chunk-76GATJYU.js";
17
+ } from "./chunk-6DZX5T3S.js";
18
18
  import {
19
19
  visibleScheduleMessage
20
20
  } from "./chunk-NADQQMMG.js";
@@ -59,7 +59,7 @@ import {
59
59
  useReducedMotion,
60
60
  useThemeEpoch,
61
61
  useThemeSubscription
62
- } from "./chunk-M4JIXKZL.js";
62
+ } from "./chunk-MDA27KYF.js";
63
63
  import {
64
64
  handleTerminationSignals
65
65
  } from "./chunk-WVNXGMNE.js";
@@ -98,12 +98,12 @@ import {
98
98
  } from "./chunk-XH5YF2YX.js";
99
99
  import {
100
100
  settleAnsweredPark
101
- } from "./chunk-I4NKYTRH.js";
101
+ } from "./chunk-RZJ36LG4.js";
102
102
  import {
103
103
  DELIVERY_READ_LIMIT,
104
104
  readSourceDeliveryPage,
105
105
  takeSuppressedCount
106
- } from "./chunk-I73NPSRQ.js";
106
+ } from "./chunk-ACEUJQLA.js";
107
107
  import {
108
108
  callsCount
109
109
  } from "./chunk-HFY2647W.js";
@@ -120,14 +120,14 @@ import {
120
120
  runsPerDay,
121
121
  scriptShellUnavailableReason,
122
122
  verifyScheduledScript
123
- } from "./chunk-EXQE56JO.js";
123
+ } from "./chunk-BP62WUCC.js";
124
124
  import "./chunk-R4FHPOJJ.js";
125
125
  import {
126
126
  allowsCommands,
127
127
  compileJobPolicy,
128
128
  compileScriptCheckPolicy,
129
129
  isPresetName
130
- } from "./chunk-HFWISJ3W.js";
130
+ } from "./chunk-YLDVAXIV.js";
131
131
  import {
132
132
  formatResumeShellCommand,
133
133
  parkedRunWords,
@@ -178,20 +178,20 @@ import {
178
178
  sectionHeading,
179
179
  withAutoChoice,
180
180
  writeConversationExport
181
- } from "./chunk-6GGXRCTW.js";
181
+ } from "./chunk-7EO7AVNF.js";
182
182
  import {
183
183
  tuiPalDefinition,
184
184
  tuiPalEnvironment,
185
185
  tuiPalOwner,
186
186
  tuiPalPreferences
187
- } from "./chunk-MLAJ6ZIG.js";
187
+ } from "./chunk-XMSKDE7G.js";
188
188
  import {
189
189
  isModelOnlyContext,
190
190
  runtimeContextLabel
191
191
  } from "./chunk-FJONRQQU.js";
192
192
  import "./chunk-RSAZJF3I.js";
193
193
  import "./chunk-ZWA2JRJV.js";
194
- import "./chunk-G3TIGCWK.js";
194
+ import "./chunk-H7JRG6GI.js";
195
195
  import "./chunk-EPV5O6RP.js";
196
196
  import {
197
197
  claimPalConversation,
@@ -249,6 +249,7 @@ import {
249
249
  hiddenLinesHint,
250
250
  hintRows,
251
251
  isSessionPlanPath,
252
+ maybeCreateDecisionModel,
252
253
  mergeGroups,
253
254
  modelListingCause,
254
255
  mustAskPerson,
@@ -278,7 +279,7 @@ import {
278
279
  webLiveStatus,
279
280
  webSettledLine,
280
281
  withDebugDetail
281
- } from "./chunk-36QGYDNX.js";
282
+ } from "./chunk-LXJ7DTNX.js";
282
283
  import {
283
284
  openManagedWorktrees,
284
285
  worktreeOpenHint
@@ -325,7 +326,7 @@ import {
325
326
  isSelfMending,
326
327
  isSpentAllowance
327
328
  } from "./chunk-C3YZAJ2Z.js";
328
- import "./chunk-SVMUXZQE.js";
329
+ import "./chunk-BWSU3DAY.js";
329
330
  import {
330
331
  describeBrowserStatus
331
332
  } from "./chunk-WHODOMXA.js";
@@ -369,14 +370,14 @@ import {
369
370
  } from "./chunk-PRNBQTUI.js";
370
371
  import {
371
372
  startAutoUpdate
372
- } from "./chunk-CX7BSYST.js";
373
+ } from "./chunk-CGZZAOM3.js";
373
374
  import {
374
375
  readManifest
375
376
  } from "./chunk-AK2U3N2A.js";
376
377
  import {
377
378
  resolveNpmInvocation
378
- } from "./chunk-SSYTEIX5.js";
379
- import "./chunk-NHCVWH7D.js";
379
+ } from "./chunk-JR6WEANS.js";
380
+ import "./chunk-PKYLKUGU.js";
380
381
  import {
381
382
  ScheduleConflictError,
382
383
  confirmationHolds,
@@ -426,7 +427,7 @@ import {
426
427
  pendingServersMessage,
427
428
  readPermissionLayers,
428
429
  resolveComposerTriggers
429
- } from "./chunk-4X3I6SZF.js";
430
+ } from "./chunk-3C34WF54.js";
430
431
  import "./chunk-KONYGNG6.js";
431
432
  import "./chunk-LCGXWCVU.js";
432
433
  import {
@@ -33994,7 +33995,7 @@ var import_react61 = __toESM(require_react(), 1);
33994
33995
 
33995
33996
  // src/tui/App.tsx
33996
33997
  import { existsSync as existsSync3, rmSync as rmSync2 } from "node:fs";
33997
- import { join as join9, relative as relative3, resolve as resolve7 } from "node:path";
33998
+ import { join as join10, relative as relative3, resolve as resolve7 } from "node:path";
33998
33999
  var import_react60 = __toESM(require_react(), 1);
33999
34000
 
34000
34001
  // src/tui/system-rows.ts
@@ -34430,33 +34431,33 @@ function workflowRowVariants(workflow, now) {
34430
34431
  const count2 = `${workflow.done}/${workflow.total}`;
34431
34432
  const elapsed2 = formatElapsed(Math.max(0, (workflow.endedAt ?? now) - workflow.startedAt));
34432
34433
  const spent = workflow.tokens === void 0 ? void 0 : formatCompactCount(workflow.tokens);
34433
- const join12 = /* @__PURE__ */ __name((parts) => parts.filter((part) => part !== void 0).join(" \xB7 "), "join");
34434
+ const join13 = /* @__PURE__ */ __name((parts) => parts.filter((part) => part !== void 0).join(" \xB7 "), "join");
34434
34435
  const [wide, mid, narrow] = WORKFLOW_BAR_WIDTHS;
34435
34436
  const warned = workflow.large ? [
34436
34437
  {
34437
34438
  barWidth: wide,
34438
- text: join12([count2, elapsed2, spent && `\u2193 ${spent} tokens`, LARGE_WORKFLOW_WARNING])
34439
+ text: join13([count2, elapsed2, spent && `\u2193 ${spent} tokens`, LARGE_WORKFLOW_WARNING])
34439
34440
  },
34440
34441
  {
34441
34442
  barWidth: wide,
34442
- text: join12([count2, elapsed2, spent && `\u2193 ${spent} tokens`, LARGE_WORKFLOW_WARNING_SHORT])
34443
+ text: join13([count2, elapsed2, spent && `\u2193 ${spent} tokens`, LARGE_WORKFLOW_WARNING_SHORT])
34443
34444
  },
34444
34445
  {
34445
34446
  barWidth: wide,
34446
- text: join12([elapsed2, spent && `\u2193 ${spent}`, LARGE_WORKFLOW_WARNING_SHORT])
34447
+ text: join13([elapsed2, spent && `\u2193 ${spent}`, LARGE_WORKFLOW_WARNING_SHORT])
34447
34448
  }
34448
34449
  ] : [];
34449
34450
  const variants = [
34450
34451
  ...warned,
34451
34452
  {
34452
34453
  barWidth: wide,
34453
- text: join12([count2, elapsed2, spent && `\u2193 ${spent} tokens`])
34454
+ text: join13([count2, elapsed2, spent && `\u2193 ${spent} tokens`])
34454
34455
  },
34455
- { barWidth: wide, text: join12([elapsed2, spent && `\u2193 ${spent} tokens`]) },
34456
- { barWidth: wide, text: join12([elapsed2, spent && `\u2193 ${spent}`]) },
34457
- { barWidth: wide, text: join12([spent && `\u2193 ${spent}`]) },
34458
- { barWidth: mid, text: join12([spent && `\u2193 ${spent}`]) },
34459
- { barWidth: narrow, text: join12([spent && `\u2193 ${spent}`]) },
34456
+ { barWidth: wide, text: join13([elapsed2, spent && `\u2193 ${spent} tokens`]) },
34457
+ { barWidth: wide, text: join13([elapsed2, spent && `\u2193 ${spent}`]) },
34458
+ { barWidth: wide, text: join13([spent && `\u2193 ${spent}`]) },
34459
+ { barWidth: mid, text: join13([spent && `\u2193 ${spent}`]) },
34460
+ { barWidth: narrow, text: join13([spent && `\u2193 ${spent}`]) },
34460
34461
  { barWidth: narrow, text: "" }
34461
34462
  ];
34462
34463
  return variants.filter(
@@ -40014,6 +40015,123 @@ function hostAccountFacts(input) {
40014
40015
  }
40015
40016
  __name(hostAccountFacts, "hostAccountFacts");
40016
40017
 
40018
+ // src/integrations/decision/notify-worthy.ts
40019
+ var NOTIFY_WORTHY_TAIL_CHARS = 1200;
40020
+ var NOTIFY_WORTHY_INSTRUCTIONS = "Would a person who stepped away from the terminal want to be called back right now? Answer yes when the reply asks them something, needs their decision or approval, hands over a finished result, or reports a failure they must act on. Answer no for progress notes, acknowledgements, and a short answer to something they just asked and are watching for.";
40021
+ function printable(text) {
40022
+ let out = "";
40023
+ for (const ch of text) {
40024
+ const code = ch.codePointAt(0) ?? 0;
40025
+ if (code < 32 && code !== 10 && code !== 9 || code === 127) continue;
40026
+ out += ch;
40027
+ }
40028
+ return out;
40029
+ }
40030
+ __name(printable, "printable");
40031
+ function notifyWorthyQuestion(input) {
40032
+ const chars = [...printable(input.reply).trim()];
40033
+ const tail = chars.slice(-NOTIFY_WORTHY_TAIL_CHARS).join("");
40034
+ const seconds = Math.round(input.turnMs / 1e3);
40035
+ return {
40036
+ point: "notify-worthy",
40037
+ state: `${tail}
40038
+
40039
+ [the turn took ${seconds}s]`,
40040
+ instructions: NOTIFY_WORTHY_INSTRUCTIONS,
40041
+ rule: input.rule
40042
+ };
40043
+ }
40044
+ __name(notifyWorthyQuestion, "notifyWorthyQuestion");
40045
+
40046
+ // src/integrations/decision/points.ts
40047
+ import { appendFileSync, mkdirSync as mkdirSync2, renameSync, statSync as statSync2 } from "node:fs";
40048
+ import { join as join3 } from "node:path";
40049
+ var DEFAULT_TIMEOUT_MS2 = 1500;
40050
+ var LOG_ROTATE_BYTES = 1e6;
40051
+ function createDecisionPoints(options) {
40052
+ const { model } = options;
40053
+ const now = options.now ?? Date.now;
40054
+ const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS2;
40055
+ const log = options.log ?? appendDecisionLog;
40056
+ const mode = /* @__PURE__ */ __name((point) => model === void 0 ? "off" : options.modes?.[point] ?? "off", "mode");
40057
+ return {
40058
+ mode,
40059
+ async ask(question, signal) {
40060
+ const current = mode(question.point);
40061
+ if (current === "off" || model === void 0) return void 0;
40062
+ const startedAt = now();
40063
+ const controller = new AbortController();
40064
+ let timer;
40065
+ const onOuterAbort = /* @__PURE__ */ __name(() => controller.abort(), "onOuterAbort");
40066
+ signal?.addEventListener("abort", onOuterAbort, { once: true });
40067
+ if (signal?.aborted) controller.abort();
40068
+ let p;
40069
+ let outcome = "answered";
40070
+ try {
40071
+ const timedOut = new Promise((_, reject) => {
40072
+ timer = setTimeout(() => {
40073
+ controller.abort();
40074
+ reject(new Error("timeout"));
40075
+ }, timeoutMs);
40076
+ });
40077
+ const answer = await Promise.race([
40078
+ model.yesno(question.state, question.instructions, { signal: controller.signal }),
40079
+ timedOut
40080
+ ]);
40081
+ p = answer.p;
40082
+ if (typeof p !== "number" || !Number.isFinite(p) || p < 0 || p > 1) {
40083
+ p = void 0;
40084
+ outcome = "error";
40085
+ }
40086
+ } catch (error) {
40087
+ outcome = error instanceof Error && error.message === "timeout" ? "timeout" : "error";
40088
+ } finally {
40089
+ if (timer !== void 0) clearTimeout(timer);
40090
+ signal?.removeEventListener("abort", onOuterAbort);
40091
+ }
40092
+ try {
40093
+ log({
40094
+ at: startedAt,
40095
+ point: question.point,
40096
+ mode: current,
40097
+ ...p !== void 0 ? { p } : {},
40098
+ rule: question.rule,
40099
+ latencyMs: Math.max(0, now() - startedAt),
40100
+ outcome,
40101
+ chars: question.state.length
40102
+ });
40103
+ } catch {
40104
+ }
40105
+ return current === "on" ? p : void 0;
40106
+ }
40107
+ };
40108
+ }
40109
+ __name(createDecisionPoints, "createDecisionPoints");
40110
+ function appendDecisionLog(entry, home = namzuHomePath()) {
40111
+ try {
40112
+ const directory = join3(home, "decision");
40113
+ const file = join3(directory, "points.jsonl");
40114
+ mkdirSync2(directory, { recursive: true, mode: 448 });
40115
+ try {
40116
+ if (statSync2(file).size >= LOG_ROTATE_BYTES) renameSync(file, `${file}.1`);
40117
+ } catch {
40118
+ }
40119
+ appendFileSync(file, `${JSON.stringify(entry)}
40120
+ `, { mode: 384 });
40121
+ } catch {
40122
+ }
40123
+ }
40124
+ __name(appendDecisionLog, "appendDecisionLog");
40125
+ var CONFIDENT_YES = 0.7;
40126
+ var CONFIDENT_NO = 0.3;
40127
+ function verdictOf(p) {
40128
+ if (p === void 0) return "unsure";
40129
+ if (p >= CONFIDENT_YES) return "yes";
40130
+ if (p <= CONFIDENT_NO) return "no";
40131
+ return "unsure";
40132
+ }
40133
+ __name(verdictOf, "verdictOf");
40134
+
40017
40135
  // src/integrations/mcp/person-commands.ts
40018
40136
  var MCP_PERSON_USAGE = [
40019
40137
  "/mcp prompts [server]",
@@ -40106,8 +40224,8 @@ __name(mcpPersonCommand, "mcpPersonCommand");
40106
40224
 
40107
40225
  // src/integrations/notifications/sound.ts
40108
40226
  import { spawn as spawn2 } from "node:child_process";
40109
- import { existsSync as existsSync2, mkdirSync as mkdirSync2, renameSync, statSync as statSync2, writeFileSync } from "node:fs";
40110
- import { join as join3 } from "node:path";
40227
+ import { existsSync as existsSync2, mkdirSync as mkdirSync3, renameSync as renameSync2, statSync as statSync3, writeFileSync } from "node:fs";
40228
+ import { join as join4 } from "node:path";
40111
40229
 
40112
40230
  // src/integrations/notifications/sound/chime.ts
40113
40231
  var FIGURES = {
@@ -40188,6 +40306,15 @@ function soundFor(moment, turnMs) {
40188
40306
  return turnMs !== void 0 && turnMs >= SOUND_MIN_TURN_MS ? "done" : void 0;
40189
40307
  }
40190
40308
  __name(soundFor, "soundFor");
40309
+ function soundForVerdict(moment, turnMs, verdict) {
40310
+ if (moment.kind !== "turn-settled" || moment.outcome !== "completed") {
40311
+ return soundFor(moment, turnMs);
40312
+ }
40313
+ if (verdict === "yes") return "done";
40314
+ if (verdict === "no") return void 0;
40315
+ return soundFor(moment, turnMs);
40316
+ }
40317
+ __name(soundForVerdict, "soundForVerdict");
40191
40318
  var PLAY_SCRIPT = "$ErrorActionPreference = 'Stop'; (New-Object System.Media.SoundPlayer $env:NAMZU_SOUND_FILE).PlaySync()";
40192
40319
  var POWERSHELL_ARGS = [
40193
40320
  "-NoProfile",
@@ -40200,7 +40327,7 @@ var POWERSHELL_ARGS = [
40200
40327
  function onPath(env3, exists, name) {
40201
40328
  for (const dir of (env3.PATH ?? "").split(":")) {
40202
40329
  if (!dir || dir.startsWith("/mnt/")) continue;
40203
- const candidate = join3(dir, name);
40330
+ const candidate = join4(dir, name);
40204
40331
  if (exists(candidate)) return candidate;
40205
40332
  }
40206
40333
  return void 0;
@@ -40252,20 +40379,20 @@ function selectSoundPlayer(probe = {}) {
40252
40379
  }
40253
40380
  __name(selectSoundPlayer, "selectSoundPlayer");
40254
40381
  function soundFilePath(kind, home = namzuHomePath()) {
40255
- return join3(home, "cache", "sound", `namzu-${kind}-v1.wav`);
40382
+ return join4(home, "cache", "sound", `namzu-${kind}-v1.wav`);
40256
40383
  }
40257
40384
  __name(soundFilePath, "soundFilePath");
40258
40385
  function ensureSoundFile(kind, home) {
40259
40386
  const file = soundFilePath(kind, home);
40260
40387
  const wav = chimeWav(kind);
40261
40388
  try {
40262
- if (statSync2(file).size === wav.length) return file;
40389
+ if (statSync3(file).size === wav.length) return file;
40263
40390
  } catch {
40264
40391
  }
40265
- mkdirSync2(join3(file, ".."), { recursive: true });
40392
+ mkdirSync3(join4(file, ".."), { recursive: true });
40266
40393
  const staging = `${file}.${process.pid}.tmp`;
40267
40394
  writeFileSync(staging, wav);
40268
- renameSync(staging, file);
40395
+ renameSync2(staging, file);
40269
40396
  return file;
40270
40397
  }
40271
40398
  __name(ensureSoundFile, "ensureSoundFile");
@@ -40291,7 +40418,7 @@ function playMoment(moment, turnMs, options = {}) {
40291
40418
  const env3 = options.env ?? process.env;
40292
40419
  if (options.enabled === false || options.isTTY === false) return void 0;
40293
40420
  if (env3[SOUND_KILL_SWITCH] === "1") return void 0;
40294
- const kind = soundFor(moment, turnMs);
40421
+ const kind = soundForVerdict(moment, turnMs, options.verdict);
40295
40422
  if (!kind) return void 0;
40296
40423
  const now = (options.now ?? Date.now)();
40297
40424
  if (now - lastPlayedAt < SOUND_SPACING_MS) return void 0;
@@ -41617,7 +41744,7 @@ __name(loadImageFiles, "loadImageFiles");
41617
41744
  // src/integrations/clipboard/image.ts
41618
41745
  import { spawn as spawn3 } from "node:child_process";
41619
41746
  import { readFile as readFile2, rm } from "node:fs/promises";
41620
- import { join as join4 } from "node:path";
41747
+ import { join as join5 } from "node:path";
41621
41748
  var MAX_IMAGE_BASE64_BYTES = 5 * 1024 * 1024;
41622
41749
  function imageFitsProvider(image2) {
41623
41750
  return image2.data.length <= MAX_IMAGE_BASE64_BYTES;
@@ -41818,7 +41945,7 @@ async function readLinux(run4, wsl, readText, fit2) {
41818
41945
  __name(readLinux, "readLinux");
41819
41946
  async function readMac(run4, fit2) {
41820
41947
  const dir = await createTempDir("clip-");
41821
- const file = join4(dir, "clip.png");
41948
+ const file = join5(dir, "clip.png");
41822
41949
  try {
41823
41950
  const result = await run4(
41824
41951
  "osascript",
@@ -41957,7 +42084,7 @@ import {
41957
42084
  openSync,
41958
42085
  readSync,
41959
42086
  realpathSync,
41960
- statSync as statSync3
42087
+ statSync as statSync4
41961
42088
  } from "node:fs";
41962
42089
  import { resolve as resolve2, sep } from "node:path";
41963
42090
  import { StringDecoder } from "node:string_decoder";
@@ -41970,7 +42097,7 @@ function readMentionFile(cwd2, rel, range, maxChars, budget) {
41970
42097
  const abs = realpathSync(resolve2(root, rel));
41971
42098
  const inside = /* @__PURE__ */ __name((path) => path === root || path.startsWith(root + sep), "inside");
41972
42099
  if (!inside(abs)) return null;
41973
- const before = statSync3(abs);
42100
+ const before = statSync4(abs);
41974
42101
  if (!before.isFile()) return null;
41975
42102
  fd = openSync(abs, constants2.O_RDONLY | constants2.O_NOFOLLOW | constants2.O_NONBLOCK);
41976
42103
  const opened = fstatSync(fd);
@@ -47844,9 +47971,9 @@ function editLine(text, key) {
47844
47971
  if (key.ctrl || key.meta || key.tab || key.return || key.escape) return null;
47845
47972
  if (key.upArrow || key.downArrow || key.leftArrow || key.rightArrow || key.pageUp || key.pageDown || key.home || key.end)
47846
47973
  return null;
47847
- const printable2 = key.input.replace(/[\u0000-\u001f\u007f]/g, "");
47848
- if (printable2.length === 0) return null;
47849
- return text + printable2;
47974
+ const printable3 = key.input.replace(/[\u0000-\u001f\u007f]/g, "");
47975
+ if (printable3.length === 0) return null;
47976
+ return text + printable3;
47850
47977
  }
47851
47978
  __name(editLine, "editLine");
47852
47979
  function resumeScopeLabel(scope) {
@@ -48274,10 +48401,10 @@ function confirmKey(state, input, key, env3) {
48274
48401
  };
48275
48402
  }
48276
48403
  if (input && !key.ctrl && !key.meta) {
48277
- const printable2 = [...input].filter((ch) => !isControl(ch)).join("");
48278
- if (printable2) {
48404
+ const printable3 = [...input].filter((ch) => !isControl(ch)).join("");
48405
+ if (printable3) {
48279
48406
  return {
48280
- state: { ...state, texts: { ...state.texts, [slot]: state.texts[slot] + printable2 } }
48407
+ state: { ...state, texts: { ...state.texts, [slot]: state.texts[slot] + printable3 } }
48281
48408
  };
48282
48409
  }
48283
48410
  }
@@ -50422,7 +50549,7 @@ __name(editablePrompts, "editablePrompts");
50422
50549
  // src/tui/external-editor.ts
50423
50550
  import { spawn as spawn4 } from "node:child_process";
50424
50551
  import { lstat, mkdtemp, readFile as readFile4, rm as rm2, writeFile } from "node:fs/promises";
50425
- import { join as join5 } from "node:path";
50552
+ import { join as join6 } from "node:path";
50426
50553
  var MAX_EDITED_DRAFT_BYTES = 4 * 1024 * 1024;
50427
50554
  var ExternalEditorError = class extends Error {
50428
50555
  static {
@@ -50508,8 +50635,8 @@ __name(resolveExternalEditorCommand, "resolveExternalEditorCommand");
50508
50635
  async function editDraftInExternalEditor(seed, options) {
50509
50636
  options.signal?.throwIfAborted();
50510
50637
  const command = resolveExternalEditorCommand(options.env, options.pressed);
50511
- const directory = options.temporaryRoot === void 0 ? await createTempDir("editor-") : await mkdtemp(join5(options.temporaryRoot, "namzu-editor-"));
50512
- const draftPath = join5(directory, "draft.md");
50638
+ const directory = options.temporaryRoot === void 0 ? await createTempDir("editor-") : await mkdtemp(join6(options.temporaryRoot, "namzu-editor-"));
50639
+ const draftPath = join6(directory, "draft.md");
50513
50640
  let edited;
50514
50641
  let failure;
50515
50642
  try {
@@ -51113,7 +51240,7 @@ var AskQueue = class {
51113
51240
  };
51114
51241
 
51115
51242
  // src/tui/plugin-view.ts
51116
- import { join as join6 } from "node:path";
51243
+ import { join as join7 } from "node:path";
51117
51244
  function pluginOption(plugin) {
51118
51245
  return {
51119
51246
  label: plugin.name,
@@ -51156,9 +51283,9 @@ function emptyPluginReport(config, cwd2) {
51156
51283
  const reason = config?.enabled !== true ? "Plugins are off. Set plugins.enabled: true in your Namzu configuration to load trusted plugins at startup." : config.autoDiscovery === false ? "Plugin discovery is off (plugins.autoDiscovery: false)." : scopes.length === 0 ? "No plugin scopes are allowed (plugins.allowedScopes: [])." : "No plugins are loaded in this conversation.";
51157
51284
  return [
51158
51285
  reason,
51159
- `Configuration: ${join6(home, "config.yaml")}`,
51160
- ...scopes.includes("project") ? [`Project plugins: ${join6(cwd2, ".namzu", "plugins")}`] : [],
51161
- ...scopes.includes("user") ? [`User plugins: ${join6(home, "plugins")}`] : [],
51286
+ `Configuration: ${join7(home, "config.yaml")}`,
51287
+ ...scopes.includes("project") ? [`Project plugins: ${join7(cwd2, ".namzu", "plugins")}`] : [],
51288
+ ...scopes.includes("user") ? [`User plugins: ${join7(home, "plugins")}`] : [],
51162
51289
  "Each plugin directory contains plugin.json. Only Namzu plugin manifests are supported.",
51163
51290
  "Tools, hooks and MCP servers can execute code. Enable only plugins you trust, then restart Namzu."
51164
51291
  ].map(choiceDisplayText).join("\n");
@@ -52592,7 +52719,7 @@ __name(prepareScheduledResume, "prepareScheduledResume");
52592
52719
 
52593
52720
  // src/tui/schedule/startup.ts
52594
52721
  import { readFileSync as readFileSync6 } from "node:fs";
52595
- import { join as join7 } from "node:path";
52722
+ import { join as join8 } from "node:path";
52596
52723
  function ago(ms) {
52597
52724
  if (ms < 36e5) return `${Math.max(1, Math.round(ms / 6e4))} min`;
52598
52725
  if (ms < 1728e5) return `${Math.round(ms / 36e5)} h`;
@@ -52674,7 +52801,7 @@ function scheduleStartupLine(home, cwd2, now = Date.now()) {
52674
52801
  parts.push("The scheduler is installed but has not started \u2014 namzu schedule status");
52675
52802
  }
52676
52803
  }
52677
- const suppressed = takeSuppressedCount(join7(paths.daemon, "notify.json"));
52804
+ const suppressed = takeSuppressedCount(join8(paths.daemon, "notify.json"));
52678
52805
  if (suppressed > 0)
52679
52806
  parts.push(
52680
52807
  `${plural(suppressed, "scheduled notification")} ${suppressed === 1 ? "was" : "were"} held back`
@@ -53728,12 +53855,12 @@ function setSkillSuggestions(on, opts = {}) {
53728
53855
  __name(setSkillSuggestions, "setSkillSuggestions");
53729
53856
 
53730
53857
  // src/tui/skills/suggestion-ledger.ts
53731
- import { mkdirSync as mkdirSync3, readFileSync as readFileSync7, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
53732
- import { dirname, join as join8 } from "node:path";
53858
+ import { mkdirSync as mkdirSync4, readFileSync as readFileSync7, renameSync as renameSync3, writeFileSync as writeFileSync2 } from "node:fs";
53859
+ import { dirname, join as join9 } from "node:path";
53733
53860
  var SUGGESTION_IGNORE_LIMIT = 3;
53734
53861
  var FRESH_LEDGER = { v: 1, unanswered: 0, stopped: false };
53735
53862
  function suggestionLedgerPath(namzuHome) {
53736
- return join8(namzuHome, "skills", ".suggestions.json");
53863
+ return join9(namzuHome, "skills", ".suggestions.json");
53737
53864
  }
53738
53865
  __name(suggestionLedgerPath, "suggestionLedgerPath");
53739
53866
  function readSuggestionLedger(namzuHome) {
@@ -53749,11 +53876,11 @@ __name(readSuggestionLedger, "readSuggestionLedger");
53749
53876
  function writeSuggestionLedger(namzuHome, ledger) {
53750
53877
  const path = suggestionLedgerPath(namzuHome);
53751
53878
  try {
53752
- mkdirSync3(dirname(path), { recursive: true });
53879
+ mkdirSync4(dirname(path), { recursive: true });
53753
53880
  const temp = `${path}.${process.pid}.tmp`;
53754
53881
  writeFileSync2(temp, `${JSON.stringify(ledger)}
53755
53882
  `, { mode: 384 });
53756
- renameSync2(temp, path);
53883
+ renameSync3(temp, path);
53757
53884
  } catch {
53758
53885
  }
53759
53886
  }
@@ -55897,10 +56024,10 @@ var TITLE_ANIMATION_MS = 960;
55897
56024
  var TITLE_NAME_MAX = 100;
55898
56025
  var OSC_SET_TITLE_AND_ICON = "\x1B]0;";
55899
56026
  var BEL4 = "\x07";
55900
- function printable(text) {
56027
+ function printable2(text) {
55901
56028
  return text.replace(/[\u0000-\u001f\u007f-\u009f]+/gu, " ").replace(/\s+/gu, " ").trim();
55902
56029
  }
55903
- __name(printable, "printable");
56030
+ __name(printable2, "printable");
55904
56031
  function titleAnimates(input) {
55905
56032
  return input.working && input.focused && !underMultiplexer(input.env);
55906
56033
  }
@@ -55910,7 +56037,7 @@ function underMultiplexer(env3) {
55910
56037
  }
55911
56038
  __name(underMultiplexer, "underMultiplexer");
55912
56039
  function terminalTitleText(input) {
55913
- const name = [input.named, input.generated, DEFAULT_TERMINAL_TITLE].map((candidate) => printable(candidate ?? "")).find((candidate) => candidate.length > 0);
56040
+ const name = [input.named, input.generated, DEFAULT_TERMINAL_TITLE].map((candidate) => printable2(candidate ?? "")).find((candidate) => candidate.length > 0);
55914
56041
  const shown = name.length > TITLE_NAME_MAX ? `${name.slice(0, TITLE_NAME_MAX - 1)}\u2026` : name;
55915
56042
  const frames = BUSY_TITLE_FRAMES.length;
55916
56043
  const glyph = input.busy ? BUSY_TITLE_FRAMES[((input.frame ?? 0) % frames + frames) % frames] ?? BUSY_TITLE_GLYPH : IDLE_TITLE_GLYPH;
@@ -55918,7 +56045,7 @@ function terminalTitleText(input) {
55918
56045
  }
55919
56046
  __name(terminalTitleText, "terminalTitleText");
55920
56047
  function setTerminalTitleSequence(text) {
55921
- return `${OSC_SET_TITLE_AND_ICON}${printable(text)}${BEL4}`;
56048
+ return `${OSC_SET_TITLE_AND_ICON}${printable2(text)}${BEL4}`;
55922
56049
  }
55923
56050
  __name(setTerminalTitleSequence, "setTerminalTitleSequence");
55924
56051
  var RESET_TERMINAL_TITLE_SEQUENCE = `${OSC_SET_TITLE_AND_ICON}${BEL4}`;
@@ -57580,7 +57707,7 @@ ${blocks.join("\n\n")}`;
57580
57707
  const scope = scopeRef.current;
57581
57708
  if (!sessions || !scope || !conversationMaterializedRef.current) return void 0;
57582
57709
  try {
57583
- return join9(sessions.paths.sessionDir({ sessionId: scope.sessionId }), "loops.json");
57710
+ return join10(sessions.paths.sessionDir({ sessionId: scope.sessionId }), "loops.json");
57584
57711
  } catch {
57585
57712
  return void 0;
57586
57713
  }
@@ -59291,8 +59418,15 @@ ${blocks.join("\n\n")}`;
59291
59418
  },
59292
59419
  [clipboard, pushMessage, setCopyPicker, pushSystem]
59293
59420
  );
59421
+ const decisionPointsRef = (0, import_react60.useRef)(null);
59422
+ if (decisionPointsRef.current === null) {
59423
+ decisionPointsRef.current = createDecisionPoints({
59424
+ model: maybeCreateDecisionModel(ctx.decision, process.env),
59425
+ modes: ctx.decision?.points
59426
+ });
59427
+ }
59294
59428
  const sendTerminalNotification = (0, import_react60.useCallback)(
59295
- (notification, turnMs) => {
59429
+ (notification, turnMs, reply) => {
59296
59430
  if (notification.kind === "approval-required") {
59297
59431
  session?.notifyHooks?.({
59298
59432
  type: "approval_required",
@@ -59309,10 +59443,17 @@ ${blocks.join("\n\n")}`;
59309
59443
  message: notification.outcome === "completed" ? "The turn completed." : notification.outcome === "stopped" ? "The turn stopped and needs attention." : "The turn failed."
59310
59444
  });
59311
59445
  }
59312
- playMoment(notification, turnMs, {
59313
- enabled: ctx.tui?.sound !== false,
59314
- isTTY: stdout.isTTY
59315
- });
59446
+ const sound = { enabled: ctx.tui?.sound !== false, isTTY: stdout.isTTY };
59447
+ const points = decisionPointsRef.current;
59448
+ if (reply !== void 0 && sound.enabled && notification.kind === "turn-settled" && notification.outcome === "completed" && points?.mode("notify-worthy") !== "off") {
59449
+ void points?.ask(
59450
+ notifyWorthyQuestion({
59451
+ reply,
59452
+ turnMs: turnMs ?? 0,
59453
+ rule: soundFor(notification, turnMs) !== void 0
59454
+ })
59455
+ ).then((p) => playMoment(notification, turnMs, { ...sound, verdict: verdictOf(p) }));
59456
+ } else playMoment(notification, turnMs, sound);
59316
59457
  if (!terminalNotificationEnabled(ctx.tui?.notifications, notification)) return;
59317
59458
  const result = writeTerminalNotification(
59318
59459
  notification,
@@ -60640,7 +60781,7 @@ ${blocks.join("\n\n")}`;
60640
60781
  doctorRunningRef.current = true;
60641
60782
  const progressId = pushMessage("system", "Checking\u2026");
60642
60783
  try {
60643
- const { runLiveDoctor } = await import("./live-6CIVSKFU.js");
60784
+ const { runLiveDoctor } = await import("./live-A5IU5I6S.js");
60644
60785
  const { describePlainDoctor } = await import("./plain-report-XVPBQDLE.js");
60645
60786
  const report = await runLiveDoctor({
60646
60787
  ...ctxRef.current.telemetry ? { telemetry: ctxRef.current.telemetry } : {}
@@ -63238,7 +63379,8 @@ ${jobLines.map(([, line]) => `- ${line}`).join("\n")}`] : []
63238
63379
  if (ownsTurn && !ac.signal.aborted && !goalRound && st.notification && (roundQueueRef.current.items().length === 0 || shouldPauseQueued)) {
63239
63380
  sendTerminalNotification(
63240
63381
  st.notification,
63241
- st.startedAt !== void 0 ? Date.now() - st.startedAt : void 0
63382
+ st.startedAt !== void 0 ? Date.now() - st.startedAt : void 0,
63383
+ st.text
63242
63384
  );
63243
63385
  }
63244
63386
  }
@@ -63793,7 +63935,7 @@ ${jobLines.map(([, line]) => `- ${line}`).join("\n")}`] : []
63793
63935
  }
63794
63936
  try {
63795
63937
  const sameSignIn = accounts.registry.list("codex").find(
63796
- (other) => other.source.kind === "codex-home" && readCodexCredentialFile(join9(other.source.dir, "auth.json"))?.accountId === result.accountId
63938
+ (other) => other.source.kind === "codex-home" && readCodexCredentialFile(join10(other.source.dir, "auth.json"))?.accountId === result.accountId
63797
63939
  );
63798
63940
  if (sameSignIn) {
63799
63941
  rmSync2(dir, { recursive: true, force: true });
@@ -68271,12 +68413,12 @@ __name(installFocusReporting, "installFocusReporting");
68271
68413
 
68272
68414
  // src/tui/hint-counts.ts
68273
68415
  import { randomUUID } from "node:crypto";
68274
- import { mkdirSync as mkdirSync4, readFileSync as readFileSync8, renameSync as renameSync3, rmSync as rmSync3, writeFileSync as writeFileSync3 } from "node:fs";
68275
- import { dirname as dirname2, join as join10 } from "node:path";
68416
+ import { mkdirSync as mkdirSync5, readFileSync as readFileSync8, renameSync as renameSync4, rmSync as rmSync3, writeFileSync as writeFileSync3 } from "node:fs";
68417
+ import { dirname as dirname2, join as join11 } from "node:path";
68276
68418
  var FILE_MODE = 384;
68277
68419
  var DIR_MODE = 448;
68278
68420
  function hintCountsPath(home) {
68279
- return join10(namzuHomePath(home), "hint-counts.json");
68421
+ return join11(namzuHomePath(home), "hint-counts.json");
68280
68422
  }
68281
68423
  __name(hintCountsPath, "hintCountsPath");
68282
68424
  function readAll(path) {
@@ -68301,12 +68443,12 @@ function writeHintCount(name, count2, home) {
68301
68443
  const path = hintCountsPath(home);
68302
68444
  const temp = `${path}.${randomUUID()}.tmp`;
68303
68445
  try {
68304
- mkdirSync4(dirname2(path), { recursive: true, mode: DIR_MODE });
68446
+ mkdirSync5(dirname2(path), { recursive: true, mode: DIR_MODE });
68305
68447
  writeFileSync3(temp, `${JSON.stringify({ ...readAll(path), [name]: count2 }, null, 2)}
68306
68448
  `, {
68307
68449
  mode: FILE_MODE
68308
68450
  });
68309
- renameSync3(temp, path);
68451
+ renameSync4(temp, path);
68310
68452
  } catch {
68311
68453
  rmSync3(temp, { force: true });
68312
68454
  }
@@ -68440,13 +68582,13 @@ __name(askTerminal, "askTerminal");
68440
68582
 
68441
68583
  // src/tui/tip-history.ts
68442
68584
  import { randomUUID as randomUUID2 } from "node:crypto";
68443
- import { mkdirSync as mkdirSync5, readFileSync as readFileSync9, renameSync as renameSync4, rmSync as rmSync4, writeFileSync as writeFileSync4 } from "node:fs";
68444
- import { dirname as dirname3, join as join11 } from "node:path";
68585
+ import { mkdirSync as mkdirSync6, readFileSync as readFileSync9, renameSync as renameSync5, rmSync as rmSync4, writeFileSync as writeFileSync4 } from "node:fs";
68586
+ import { dirname as dirname3, join as join12 } from "node:path";
68445
68587
  var FILE_MODE2 = 384;
68446
68588
  var DIR_MODE2 = 448;
68447
68589
  var EMPTY_TIP_HISTORY = { launches: 0, shown: {}, used: {} };
68448
68590
  function tipHistoryPath(home) {
68449
- return join11(namzuHomePath(home), "tip-history.json");
68591
+ return join12(namzuHomePath(home), "tip-history.json");
68450
68592
  }
68451
68593
  __name(tipHistoryPath, "tipHistoryPath");
68452
68594
  function wholeNumber(value) {
@@ -68480,10 +68622,10 @@ __name(readTipHistory, "readTipHistory");
68480
68622
  function writeTipHistory(path, history) {
68481
68623
  const temp = `${path}.${randomUUID2()}.tmp`;
68482
68624
  try {
68483
- mkdirSync5(dirname3(path), { recursive: true, mode: DIR_MODE2 });
68625
+ mkdirSync6(dirname3(path), { recursive: true, mode: DIR_MODE2 });
68484
68626
  writeFileSync4(temp, `${JSON.stringify(history, null, 2)}
68485
68627
  `, { mode: FILE_MODE2 });
68486
- renameSync4(temp, path);
68628
+ renameSync5(temp, path);
68487
68629
  } catch {
68488
68630
  try {
68489
68631
  rmSync4(temp, { force: true });
@@ -68905,4 +69047,4 @@ react/cjs/react-jsx-runtime.development.js:
68905
69047
  * LICENSE file in the root directory of this source tree.
68906
69048
  *)
68907
69049
  */
68908
- //# sourceMappingURL=tui-OYA5Z4UH.js.map
69050
+ //# sourceMappingURL=tui-2PZSAL7N.js.map