@namzu/cli 45.9.3 → 45.10.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.
- package/CHANGELOG.md +6 -0
- package/dist/bin.js +1 -1
- package/dist/chunks/{acp-XQR3O5Z5.js → acp-3BPCM2WA.js} +8 -8
- package/dist/chunks/{add-G57WA2GJ.js → add-OHTAZUMT.js} +5 -5
- package/dist/chunks/{agent-K547PXS7.js → agent-CP7TJMBB.js} +4 -4
- package/dist/chunks/{agent-session-JFGRPZHQ.js → agent-session-RIIQB63L.js} +5 -5
- package/dist/chunks/{bin-main-COD43DP4.js → bin-main-KOGFY7YP.js} +3 -3
- package/dist/chunks/{chat-BBW3FSWW.js → chat-XLIEE6C2.js} +2 -2
- package/dist/chunks/{chunk-H5HR43HQ.js → chunk-2PVFI6GK.js} +223 -66
- package/dist/chunks/chunk-2PVFI6GK.js.map +6 -0
- package/dist/chunks/{chunk-4MZSEJ5J.js → chunk-36QUG4CL.js} +5 -5
- package/dist/chunks/{chunk-7JX7V5P4.js → chunk-4YGXTFAE.js} +2 -2
- package/dist/chunks/{chunk-5FXZQ42Q.js → chunk-5C2PVGLX.js} +2 -2
- package/dist/chunks/{chunk-UZ75A4DA.js → chunk-5OIMQOJG.js} +4 -3
- package/dist/chunks/chunk-5OIMQOJG.js.map +6 -0
- package/dist/chunks/{chunk-TAPS6JOC.js → chunk-A6NKIHAU.js} +2 -2
- package/dist/chunks/{chunk-RP6O2GVC.js → chunk-DP35HQBK.js} +3 -3
- package/dist/chunks/{chunk-VTYV7ZXP.js → chunk-GXPRMEBI.js} +2 -2
- package/dist/chunks/{chunk-WBDSJSAB.js → chunk-HUNGHFGK.js} +2 -2
- package/dist/chunks/{chunk-4IUTV7UN.js → chunk-ITSDVVZ7.js} +3 -3
- package/dist/chunks/{chunk-C2SLVYIT.js → chunk-KXRUF6WE.js} +2 -2
- package/dist/chunks/{chunk-JG2ZBJOQ.js → chunk-L6MFBL7H.js} +17 -17
- package/dist/chunks/{chunk-KD6UPZT7.js → chunk-L7VMS5JX.js} +3 -3
- package/dist/chunks/{chunk-GP3ZE47C.js → chunk-LDTCQCX2.js} +3 -3
- package/dist/chunks/{chunk-WNC7MDAC.js → chunk-LFBTW453.js} +2 -2
- package/dist/chunks/{chunk-4E7CFJKP.js → chunk-LN2JFGCM.js} +2 -2
- package/dist/chunks/{chunk-CNKZ5OEN.js → chunk-QHQHQFTY.js} +2 -2
- package/dist/chunks/{chunk-PTBVQOSI.js → chunk-RZ74SRZR.js} +2 -2
- package/dist/chunks/{chunk-3XPCMW6Y.js → chunk-VYTQ3GJF.js} +2 -2
- package/dist/chunks/{chunk-Q275XU7A.js → chunk-WL2KAT7X.js} +2 -2
- package/dist/chunks/{chunk-76ZHDUSD.js → chunk-X7ODFDJW.js} +2 -2
- package/dist/chunks/{cli-runtime-FI5IMJQW.js → cli-runtime-7LU3JUKO.js} +3 -3
- package/dist/chunks/{doctor-NPOW6W7J.js → doctor-5JZJK4AJ.js} +6 -6
- package/dist/chunks/{drain-BH55K7YU.js → drain-WVJZCIHU.js} +2 -2
- package/dist/chunks/{exec-MX3B2UN3.js → exec-GHHQAUM5.js} +7 -7
- package/dist/chunks/{host-queries-HZWZJC3A.js → host-queries-TTVZPVFH.js} +2 -2
- package/dist/chunks/{learn-USAWIP7K.js → learn-QWKYL537.js} +2 -2
- package/dist/chunks/{learn-builtin-E2VD4DHQ.js → learn-builtin-TDSK4FNG.js} +3 -3
- package/dist/chunks/{lifecycle-7VSEDBPU.js → lifecycle-QVPXT3GP.js} +6 -6
- package/dist/chunks/{list-ZM3IAEUT.js → list-CVEFKJW7.js} +3 -3
- package/dist/chunks/{live-7SJSBRSQ.js → live-ZJXXVGTH.js} +5 -5
- package/dist/chunks/{mcp-L4CZFIYN.js → mcp-FKSBFVBF.js} +2 -2
- package/dist/chunks/{message-command-V2J24YP5.js → message-command-OSVRQUH7.js} +7 -7
- package/dist/chunks/{pal-7IB7RW64.js → pal-M3GCQRFL.js} +3 -3
- package/dist/chunks/{resident-3RTS73JY.js → resident-3U5NY24H.js} +4 -4
- package/dist/chunks/{schedule-2K3YV2MJ.js → schedule-N5YZBH26.js} +5 -5
- package/dist/chunks/{service-YYTU36DB.js → service-ZZH7EKSL.js} +5 -5
- package/dist/chunks/{session-step-AUWOQOPI.js → session-step-4JBIREGL.js} +2 -2
- package/dist/chunks/{start-check-YXOI4UKE.js → start-check-OVCPWK4G.js} +2 -2
- package/dist/chunks/{tui-VJUFUWQH.js → tui-GBZ7SLVJ.js} +67 -154
- package/dist/chunks/tui-GBZ7SLVJ.js.map +6 -0
- package/dist/chunks/{upgrade-PBDROOBR.js → upgrade-GWJDTRRD.js} +3 -3
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/schema.d.ts +3 -1
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/integrations/decision/memory-admit.d.ts +27 -0
- package/dist/integrations/decision/memory-admit.d.ts.map +1 -0
- package/dist/integrations/resident/runner-worker.js +1 -1
- package/dist/tui/agent.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/chunks/chunk-H5HR43HQ.js.map +0 -6
- package/dist/chunks/chunk-UZ75A4DA.js.map +0 -6
- package/dist/chunks/tui-VJUFUWQH.js.map +0 -6
- /package/dist/chunks/{acp-XQR3O5Z5.js.map → acp-3BPCM2WA.js.map} +0 -0
- /package/dist/chunks/{add-G57WA2GJ.js.map → add-OHTAZUMT.js.map} +0 -0
- /package/dist/chunks/{agent-K547PXS7.js.map → agent-CP7TJMBB.js.map} +0 -0
- /package/dist/chunks/{agent-session-JFGRPZHQ.js.map → agent-session-RIIQB63L.js.map} +0 -0
- /package/dist/chunks/{bin-main-COD43DP4.js.map → bin-main-KOGFY7YP.js.map} +0 -0
- /package/dist/chunks/{chat-BBW3FSWW.js.map → chat-XLIEE6C2.js.map} +0 -0
- /package/dist/chunks/{chunk-4MZSEJ5J.js.map → chunk-36QUG4CL.js.map} +0 -0
- /package/dist/chunks/{chunk-7JX7V5P4.js.map → chunk-4YGXTFAE.js.map} +0 -0
- /package/dist/chunks/{chunk-5FXZQ42Q.js.map → chunk-5C2PVGLX.js.map} +0 -0
- /package/dist/chunks/{chunk-TAPS6JOC.js.map → chunk-A6NKIHAU.js.map} +0 -0
- /package/dist/chunks/{chunk-RP6O2GVC.js.map → chunk-DP35HQBK.js.map} +0 -0
- /package/dist/chunks/{chunk-VTYV7ZXP.js.map → chunk-GXPRMEBI.js.map} +0 -0
- /package/dist/chunks/{chunk-WBDSJSAB.js.map → chunk-HUNGHFGK.js.map} +0 -0
- /package/dist/chunks/{chunk-4IUTV7UN.js.map → chunk-ITSDVVZ7.js.map} +0 -0
- /package/dist/chunks/{chunk-C2SLVYIT.js.map → chunk-KXRUF6WE.js.map} +0 -0
- /package/dist/chunks/{chunk-JG2ZBJOQ.js.map → chunk-L6MFBL7H.js.map} +0 -0
- /package/dist/chunks/{chunk-KD6UPZT7.js.map → chunk-L7VMS5JX.js.map} +0 -0
- /package/dist/chunks/{chunk-GP3ZE47C.js.map → chunk-LDTCQCX2.js.map} +0 -0
- /package/dist/chunks/{chunk-WNC7MDAC.js.map → chunk-LFBTW453.js.map} +0 -0
- /package/dist/chunks/{chunk-4E7CFJKP.js.map → chunk-LN2JFGCM.js.map} +0 -0
- /package/dist/chunks/{chunk-CNKZ5OEN.js.map → chunk-QHQHQFTY.js.map} +0 -0
- /package/dist/chunks/{chunk-PTBVQOSI.js.map → chunk-RZ74SRZR.js.map} +0 -0
- /package/dist/chunks/{chunk-3XPCMW6Y.js.map → chunk-VYTQ3GJF.js.map} +0 -0
- /package/dist/chunks/{chunk-Q275XU7A.js.map → chunk-WL2KAT7X.js.map} +0 -0
- /package/dist/chunks/{chunk-76ZHDUSD.js.map → chunk-X7ODFDJW.js.map} +0 -0
- /package/dist/chunks/{cli-runtime-FI5IMJQW.js.map → cli-runtime-7LU3JUKO.js.map} +0 -0
- /package/dist/chunks/{doctor-NPOW6W7J.js.map → doctor-5JZJK4AJ.js.map} +0 -0
- /package/dist/chunks/{drain-BH55K7YU.js.map → drain-WVJZCIHU.js.map} +0 -0
- /package/dist/chunks/{exec-MX3B2UN3.js.map → exec-GHHQAUM5.js.map} +0 -0
- /package/dist/chunks/{host-queries-HZWZJC3A.js.map → host-queries-TTVZPVFH.js.map} +0 -0
- /package/dist/chunks/{learn-USAWIP7K.js.map → learn-QWKYL537.js.map} +0 -0
- /package/dist/chunks/{learn-builtin-E2VD4DHQ.js.map → learn-builtin-TDSK4FNG.js.map} +0 -0
- /package/dist/chunks/{lifecycle-7VSEDBPU.js.map → lifecycle-QVPXT3GP.js.map} +0 -0
- /package/dist/chunks/{list-ZM3IAEUT.js.map → list-CVEFKJW7.js.map} +0 -0
- /package/dist/chunks/{live-7SJSBRSQ.js.map → live-ZJXXVGTH.js.map} +0 -0
- /package/dist/chunks/{mcp-L4CZFIYN.js.map → mcp-FKSBFVBF.js.map} +0 -0
- /package/dist/chunks/{message-command-V2J24YP5.js.map → message-command-OSVRQUH7.js.map} +0 -0
- /package/dist/chunks/{pal-7IB7RW64.js.map → pal-M3GCQRFL.js.map} +0 -0
- /package/dist/chunks/{resident-3RTS73JY.js.map → resident-3U5NY24H.js.map} +0 -0
- /package/dist/chunks/{schedule-2K3YV2MJ.js.map → schedule-N5YZBH26.js.map} +0 -0
- /package/dist/chunks/{service-YYTU36DB.js.map → service-ZZH7EKSL.js.map} +0 -0
- /package/dist/chunks/{session-step-AUWOQOPI.js.map → session-step-4JBIREGL.js.map} +0 -0
- /package/dist/chunks/{start-check-YXOI4UKE.js.map → start-check-OVCPWK4G.js.map} +0 -0
- /package/dist/chunks/{upgrade-PBDROOBR.js.map → upgrade-GWJDTRRD.js.map} +0 -0
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
confirmationView,
|
|
15
15
|
describeChanges,
|
|
16
16
|
permissionsChanged
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-HUNGHFGK.js";
|
|
18
18
|
import {
|
|
19
19
|
visibleScheduleMessage
|
|
20
20
|
} from "./chunk-NADQQMMG.js";
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
turnLimitCommands,
|
|
55
55
|
useThemeEpoch,
|
|
56
56
|
useThemeSubscription
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-ITSDVVZ7.js";
|
|
58
58
|
import {
|
|
59
59
|
handleTerminationSignals
|
|
60
60
|
} from "./chunk-UP7OLJBD.js";
|
|
@@ -93,12 +93,12 @@ import {
|
|
|
93
93
|
} from "./chunk-XH5YF2YX.js";
|
|
94
94
|
import {
|
|
95
95
|
settleAnsweredPark
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-KXRUF6WE.js";
|
|
97
97
|
import {
|
|
98
98
|
DELIVERY_READ_LIMIT,
|
|
99
99
|
readSourceDeliveryPage,
|
|
100
100
|
takeSuppressedCount
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-36QUG4CL.js";
|
|
102
102
|
import {
|
|
103
103
|
callsCount
|
|
104
104
|
} from "./chunk-HFY2647W.js";
|
|
@@ -115,14 +115,14 @@ import {
|
|
|
115
115
|
runsPerDay,
|
|
116
116
|
scriptShellUnavailableReason,
|
|
117
117
|
verifyScheduledScript
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-4YGXTFAE.js";
|
|
119
119
|
import "./chunk-SGWVJCYH.js";
|
|
120
120
|
import {
|
|
121
121
|
allowsCommands,
|
|
122
122
|
compileJobPolicy,
|
|
123
123
|
compileScriptCheckPolicy,
|
|
124
124
|
isPresetName
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-5C2PVGLX.js";
|
|
126
126
|
import {
|
|
127
127
|
formatResumeShellCommand,
|
|
128
128
|
parkedRunWords,
|
|
@@ -180,20 +180,20 @@ import {
|
|
|
180
180
|
sectionHeading,
|
|
181
181
|
withAutoChoice,
|
|
182
182
|
writeConversationExport
|
|
183
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-A6NKIHAU.js";
|
|
184
184
|
import {
|
|
185
185
|
tuiPalDefinition,
|
|
186
186
|
tuiPalEnvironment,
|
|
187
187
|
tuiPalOwner,
|
|
188
188
|
tuiPalPreferences
|
|
189
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-RZ74SRZR.js";
|
|
190
190
|
import {
|
|
191
191
|
isModelOnlyContext,
|
|
192
192
|
runtimeContextLabel
|
|
193
193
|
} from "./chunk-FJONRQQU.js";
|
|
194
194
|
import "./chunk-VHDPSOSS.js";
|
|
195
195
|
import "./chunk-ZWA2JRJV.js";
|
|
196
|
-
import "./chunk-
|
|
196
|
+
import "./chunk-GXPRMEBI.js";
|
|
197
197
|
import "./chunk-SIY3OOJJ.js";
|
|
198
198
|
import {
|
|
199
199
|
claimPalConversation,
|
|
@@ -232,6 +232,7 @@ import {
|
|
|
232
232
|
compactionSummaryLines,
|
|
233
233
|
connectorToolLabel,
|
|
234
234
|
createAgentSession,
|
|
235
|
+
createDecisionPoints,
|
|
235
236
|
createQuestionGate,
|
|
236
237
|
declinedLine,
|
|
237
238
|
describeAllows,
|
|
@@ -273,6 +274,7 @@ import {
|
|
|
273
274
|
spansText,
|
|
274
275
|
toAgentEvent,
|
|
275
276
|
turnLabel,
|
|
277
|
+
verdictOf,
|
|
276
278
|
verifyCredential,
|
|
277
279
|
viewRowText,
|
|
278
280
|
visibleHint,
|
|
@@ -281,7 +283,7 @@ import {
|
|
|
281
283
|
webLiveStatus,
|
|
282
284
|
webSettledLine,
|
|
283
285
|
withDebugDetail
|
|
284
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-2PVFI6GK.js";
|
|
285
287
|
import {
|
|
286
288
|
openManagedWorktrees,
|
|
287
289
|
worktreeOpenHint
|
|
@@ -328,7 +330,7 @@ import {
|
|
|
328
330
|
isSelfMending,
|
|
329
331
|
isSpentAllowance
|
|
330
332
|
} from "./chunk-SQJVX2ST.js";
|
|
331
|
-
import "./chunk-
|
|
333
|
+
import "./chunk-QHQHQFTY.js";
|
|
332
334
|
import {
|
|
333
335
|
describeBrowserStatus
|
|
334
336
|
} from "./chunk-WHODOMXA.js";
|
|
@@ -372,14 +374,14 @@ import {
|
|
|
372
374
|
} from "./chunk-BMIQVFLW.js";
|
|
373
375
|
import {
|
|
374
376
|
startAutoUpdate
|
|
375
|
-
} from "./chunk-
|
|
377
|
+
} from "./chunk-LFBTW453.js";
|
|
376
378
|
import {
|
|
377
379
|
readManifest
|
|
378
380
|
} from "./chunk-AK2U3N2A.js";
|
|
379
381
|
import {
|
|
380
382
|
resolveNpmInvocation
|
|
381
|
-
} from "./chunk-
|
|
382
|
-
import "./chunk-
|
|
383
|
+
} from "./chunk-X7ODFDJW.js";
|
|
384
|
+
import "./chunk-L7VMS5JX.js";
|
|
383
385
|
import {
|
|
384
386
|
ScheduleConflictError,
|
|
385
387
|
confirmationHolds,
|
|
@@ -429,7 +431,7 @@ import {
|
|
|
429
431
|
pendingServersMessage,
|
|
430
432
|
readPermissionLayers,
|
|
431
433
|
resolveComposerTriggers
|
|
432
|
-
} from "./chunk-
|
|
434
|
+
} from "./chunk-5OIMQOJG.js";
|
|
433
435
|
import "./chunk-KONYGNG6.js";
|
|
434
436
|
import "./chunk-LCGXWCVU.js";
|
|
435
437
|
import {
|
|
@@ -33997,7 +33999,7 @@ var import_react61 = __toESM(require_react(), 1);
|
|
|
33997
33999
|
|
|
33998
34000
|
// src/tui/App.tsx
|
|
33999
34001
|
import { existsSync as existsSync3, rmSync as rmSync2 } from "node:fs";
|
|
34000
|
-
import { join as
|
|
34002
|
+
import { join as join9, relative as relative3, resolve as resolve7 } from "node:path";
|
|
34001
34003
|
var import_react60 = __toESM(require_react(), 1);
|
|
34002
34004
|
|
|
34003
34005
|
// src/tui/system-rows.ts
|
|
@@ -34433,33 +34435,33 @@ function workflowRowVariants(workflow, now) {
|
|
|
34433
34435
|
const count2 = `${workflow.done}/${workflow.total}`;
|
|
34434
34436
|
const elapsed2 = formatElapsed(Math.max(0, (workflow.endedAt ?? now) - workflow.startedAt));
|
|
34435
34437
|
const spent = workflow.tokens === void 0 ? void 0 : formatCompactCount(workflow.tokens);
|
|
34436
|
-
const
|
|
34438
|
+
const join12 = /* @__PURE__ */ __name((parts) => parts.filter((part) => part !== void 0).join(" \xB7 "), "join");
|
|
34437
34439
|
const [wide, mid, narrow] = WORKFLOW_BAR_WIDTHS;
|
|
34438
34440
|
const warned = workflow.large ? [
|
|
34439
34441
|
{
|
|
34440
34442
|
barWidth: wide,
|
|
34441
|
-
text:
|
|
34443
|
+
text: join12([count2, elapsed2, spent && `\u2193 ${spent} tokens`, LARGE_WORKFLOW_WARNING])
|
|
34442
34444
|
},
|
|
34443
34445
|
{
|
|
34444
34446
|
barWidth: wide,
|
|
34445
|
-
text:
|
|
34447
|
+
text: join12([count2, elapsed2, spent && `\u2193 ${spent} tokens`, LARGE_WORKFLOW_WARNING_SHORT])
|
|
34446
34448
|
},
|
|
34447
34449
|
{
|
|
34448
34450
|
barWidth: wide,
|
|
34449
|
-
text:
|
|
34451
|
+
text: join12([elapsed2, spent && `\u2193 ${spent}`, LARGE_WORKFLOW_WARNING_SHORT])
|
|
34450
34452
|
}
|
|
34451
34453
|
] : [];
|
|
34452
34454
|
const variants = [
|
|
34453
34455
|
...warned,
|
|
34454
34456
|
{
|
|
34455
34457
|
barWidth: wide,
|
|
34456
|
-
text:
|
|
34458
|
+
text: join12([count2, elapsed2, spent && `\u2193 ${spent} tokens`])
|
|
34457
34459
|
},
|
|
34458
|
-
{ barWidth: wide, text:
|
|
34459
|
-
{ barWidth: wide, text:
|
|
34460
|
-
{ barWidth: wide, text:
|
|
34461
|
-
{ barWidth: mid, text:
|
|
34462
|
-
{ barWidth: narrow, text:
|
|
34460
|
+
{ barWidth: wide, text: join12([elapsed2, spent && `\u2193 ${spent} tokens`]) },
|
|
34461
|
+
{ barWidth: wide, text: join12([elapsed2, spent && `\u2193 ${spent}`]) },
|
|
34462
|
+
{ barWidth: wide, text: join12([spent && `\u2193 ${spent}`]) },
|
|
34463
|
+
{ barWidth: mid, text: join12([spent && `\u2193 ${spent}`]) },
|
|
34464
|
+
{ barWidth: narrow, text: join12([spent && `\u2193 ${spent}`]) },
|
|
34463
34465
|
{ barWidth: narrow, text: "" }
|
|
34464
34466
|
];
|
|
34465
34467
|
return variants.filter(
|
|
@@ -40045,95 +40047,6 @@ function notifyWorthyQuestion(input) {
|
|
|
40045
40047
|
}
|
|
40046
40048
|
__name(notifyWorthyQuestion, "notifyWorthyQuestion");
|
|
40047
40049
|
|
|
40048
|
-
// src/integrations/decision/points.ts
|
|
40049
|
-
import { appendFileSync, mkdirSync as mkdirSync2, renameSync, statSync as statSync2 } from "node:fs";
|
|
40050
|
-
import { join as join3 } from "node:path";
|
|
40051
|
-
var DEFAULT_TIMEOUT_MS2 = 1500;
|
|
40052
|
-
var LOG_ROTATE_BYTES = 1e6;
|
|
40053
|
-
function createDecisionPoints(options) {
|
|
40054
|
-
const { model } = options;
|
|
40055
|
-
const now = options.now ?? Date.now;
|
|
40056
|
-
const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS2;
|
|
40057
|
-
const log = options.log ?? appendDecisionLog;
|
|
40058
|
-
const mode = /* @__PURE__ */ __name((point) => model === void 0 ? "off" : options.modes?.[point] ?? "off", "mode");
|
|
40059
|
-
return {
|
|
40060
|
-
mode,
|
|
40061
|
-
async ask(question, signal) {
|
|
40062
|
-
const current = mode(question.point);
|
|
40063
|
-
if (current === "off" || model === void 0) return void 0;
|
|
40064
|
-
const startedAt = now();
|
|
40065
|
-
const controller = new AbortController();
|
|
40066
|
-
let timer;
|
|
40067
|
-
const onOuterAbort = /* @__PURE__ */ __name(() => controller.abort(), "onOuterAbort");
|
|
40068
|
-
signal?.addEventListener("abort", onOuterAbort, { once: true });
|
|
40069
|
-
if (signal?.aborted) controller.abort();
|
|
40070
|
-
let p;
|
|
40071
|
-
let outcome = "answered";
|
|
40072
|
-
try {
|
|
40073
|
-
const timedOut = new Promise((_, reject) => {
|
|
40074
|
-
timer = setTimeout(() => {
|
|
40075
|
-
controller.abort();
|
|
40076
|
-
reject(new Error("timeout"));
|
|
40077
|
-
}, timeoutMs);
|
|
40078
|
-
});
|
|
40079
|
-
const answer = await Promise.race([
|
|
40080
|
-
model.yesno(question.state, question.instructions, { signal: controller.signal }),
|
|
40081
|
-
timedOut
|
|
40082
|
-
]);
|
|
40083
|
-
p = answer.p;
|
|
40084
|
-
if (typeof p !== "number" || !Number.isFinite(p) || p < 0 || p > 1) {
|
|
40085
|
-
p = void 0;
|
|
40086
|
-
outcome = "error";
|
|
40087
|
-
}
|
|
40088
|
-
} catch (error) {
|
|
40089
|
-
outcome = error instanceof Error && error.message === "timeout" ? "timeout" : "error";
|
|
40090
|
-
} finally {
|
|
40091
|
-
if (timer !== void 0) clearTimeout(timer);
|
|
40092
|
-
signal?.removeEventListener("abort", onOuterAbort);
|
|
40093
|
-
}
|
|
40094
|
-
try {
|
|
40095
|
-
log({
|
|
40096
|
-
at: startedAt,
|
|
40097
|
-
point: question.point,
|
|
40098
|
-
mode: current,
|
|
40099
|
-
...p !== void 0 ? { p } : {},
|
|
40100
|
-
rule: question.rule,
|
|
40101
|
-
latencyMs: Math.max(0, now() - startedAt),
|
|
40102
|
-
outcome,
|
|
40103
|
-
chars: question.state.length
|
|
40104
|
-
});
|
|
40105
|
-
} catch {
|
|
40106
|
-
}
|
|
40107
|
-
return current === "on" ? p : void 0;
|
|
40108
|
-
}
|
|
40109
|
-
};
|
|
40110
|
-
}
|
|
40111
|
-
__name(createDecisionPoints, "createDecisionPoints");
|
|
40112
|
-
function appendDecisionLog(entry, home = namzuHomePath()) {
|
|
40113
|
-
try {
|
|
40114
|
-
const directory = join3(home, "decision");
|
|
40115
|
-
const file = join3(directory, "points.jsonl");
|
|
40116
|
-
mkdirSync2(directory, { recursive: true, mode: 448 });
|
|
40117
|
-
try {
|
|
40118
|
-
if (statSync2(file).size >= LOG_ROTATE_BYTES) renameSync(file, `${file}.1`);
|
|
40119
|
-
} catch {
|
|
40120
|
-
}
|
|
40121
|
-
appendFileSync(file, `${JSON.stringify(entry)}
|
|
40122
|
-
`, { mode: 384 });
|
|
40123
|
-
} catch {
|
|
40124
|
-
}
|
|
40125
|
-
}
|
|
40126
|
-
__name(appendDecisionLog, "appendDecisionLog");
|
|
40127
|
-
var CONFIDENT_YES = 0.7;
|
|
40128
|
-
var CONFIDENT_NO = 0.3;
|
|
40129
|
-
function verdictOf(p) {
|
|
40130
|
-
if (p === void 0) return "unsure";
|
|
40131
|
-
if (p >= CONFIDENT_YES) return "yes";
|
|
40132
|
-
if (p <= CONFIDENT_NO) return "no";
|
|
40133
|
-
return "unsure";
|
|
40134
|
-
}
|
|
40135
|
-
__name(verdictOf, "verdictOf");
|
|
40136
|
-
|
|
40137
40050
|
// src/integrations/mcp/person-commands.ts
|
|
40138
40051
|
var MCP_PERSON_USAGE = [
|
|
40139
40052
|
"/mcp prompts [server]",
|
|
@@ -40226,8 +40139,8 @@ __name(mcpPersonCommand, "mcpPersonCommand");
|
|
|
40226
40139
|
|
|
40227
40140
|
// src/integrations/notifications/sound.ts
|
|
40228
40141
|
import { spawn as spawn2 } from "node:child_process";
|
|
40229
|
-
import { existsSync as existsSync2, mkdirSync as
|
|
40230
|
-
import { join as
|
|
40142
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, renameSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
40143
|
+
import { join as join3 } from "node:path";
|
|
40231
40144
|
|
|
40232
40145
|
// src/integrations/notifications/sound/chime.ts
|
|
40233
40146
|
var FIGURES = {
|
|
@@ -40329,7 +40242,7 @@ var POWERSHELL_ARGS = [
|
|
|
40329
40242
|
function onPath(env3, exists, name) {
|
|
40330
40243
|
for (const dir of (env3.PATH ?? "").split(":")) {
|
|
40331
40244
|
if (!dir || dir.startsWith("/mnt/")) continue;
|
|
40332
|
-
const candidate =
|
|
40245
|
+
const candidate = join3(dir, name);
|
|
40333
40246
|
if (exists(candidate)) return candidate;
|
|
40334
40247
|
}
|
|
40335
40248
|
return void 0;
|
|
@@ -40381,20 +40294,20 @@ function selectSoundPlayer(probe = {}) {
|
|
|
40381
40294
|
}
|
|
40382
40295
|
__name(selectSoundPlayer, "selectSoundPlayer");
|
|
40383
40296
|
function soundFilePath(kind, home = namzuHomePath()) {
|
|
40384
|
-
return
|
|
40297
|
+
return join3(home, "cache", "sound", `namzu-${kind}-v1.wav`);
|
|
40385
40298
|
}
|
|
40386
40299
|
__name(soundFilePath, "soundFilePath");
|
|
40387
40300
|
function ensureSoundFile(kind, home) {
|
|
40388
40301
|
const file = soundFilePath(kind, home);
|
|
40389
40302
|
const wav = chimeWav(kind);
|
|
40390
40303
|
try {
|
|
40391
|
-
if (
|
|
40304
|
+
if (statSync2(file).size === wav.length) return file;
|
|
40392
40305
|
} catch {
|
|
40393
40306
|
}
|
|
40394
|
-
|
|
40307
|
+
mkdirSync2(join3(file, ".."), { recursive: true });
|
|
40395
40308
|
const staging = `${file}.${process.pid}.tmp`;
|
|
40396
40309
|
writeFileSync(staging, wav);
|
|
40397
|
-
|
|
40310
|
+
renameSync(staging, file);
|
|
40398
40311
|
return file;
|
|
40399
40312
|
}
|
|
40400
40313
|
__name(ensureSoundFile, "ensureSoundFile");
|
|
@@ -41746,7 +41659,7 @@ __name(loadImageFiles, "loadImageFiles");
|
|
|
41746
41659
|
// src/integrations/clipboard/image.ts
|
|
41747
41660
|
import { spawn as spawn3 } from "node:child_process";
|
|
41748
41661
|
import { readFile as readFile2, rm } from "node:fs/promises";
|
|
41749
|
-
import { join as
|
|
41662
|
+
import { join as join4 } from "node:path";
|
|
41750
41663
|
var MAX_IMAGE_BASE64_BYTES = 5 * 1024 * 1024;
|
|
41751
41664
|
function imageFitsProvider(image2) {
|
|
41752
41665
|
return image2.data.length <= MAX_IMAGE_BASE64_BYTES;
|
|
@@ -41947,7 +41860,7 @@ async function readLinux(run4, wsl, readText, fit2) {
|
|
|
41947
41860
|
__name(readLinux, "readLinux");
|
|
41948
41861
|
async function readMac(run4, fit2) {
|
|
41949
41862
|
const dir = await createTempDir("clip-");
|
|
41950
|
-
const file =
|
|
41863
|
+
const file = join4(dir, "clip.png");
|
|
41951
41864
|
try {
|
|
41952
41865
|
const result = await run4(
|
|
41953
41866
|
"osascript",
|
|
@@ -42086,7 +41999,7 @@ import {
|
|
|
42086
41999
|
openSync,
|
|
42087
42000
|
readSync,
|
|
42088
42001
|
realpathSync,
|
|
42089
|
-
statSync as
|
|
42002
|
+
statSync as statSync3
|
|
42090
42003
|
} from "node:fs";
|
|
42091
42004
|
import { resolve as resolve2, sep } from "node:path";
|
|
42092
42005
|
import { StringDecoder } from "node:string_decoder";
|
|
@@ -42099,7 +42012,7 @@ function readMentionFile(cwd2, rel, range, maxChars, budget) {
|
|
|
42099
42012
|
const abs = realpathSync(resolve2(root, rel));
|
|
42100
42013
|
const inside = /* @__PURE__ */ __name((path) => path === root || path.startsWith(root + sep), "inside");
|
|
42101
42014
|
if (!inside(abs)) return null;
|
|
42102
|
-
const before =
|
|
42015
|
+
const before = statSync3(abs);
|
|
42103
42016
|
if (!before.isFile()) return null;
|
|
42104
42017
|
fd = openSync(abs, constants2.O_RDONLY | constants2.O_NOFOLLOW | constants2.O_NONBLOCK);
|
|
42105
42018
|
const opened = fstatSync(fd);
|
|
@@ -50551,7 +50464,7 @@ __name(editablePrompts, "editablePrompts");
|
|
|
50551
50464
|
// src/tui/external-editor.ts
|
|
50552
50465
|
import { spawn as spawn4 } from "node:child_process";
|
|
50553
50466
|
import { lstat, mkdtemp, readFile as readFile4, rm as rm2, writeFile } from "node:fs/promises";
|
|
50554
|
-
import { join as
|
|
50467
|
+
import { join as join5 } from "node:path";
|
|
50555
50468
|
var MAX_EDITED_DRAFT_BYTES = 4 * 1024 * 1024;
|
|
50556
50469
|
var ExternalEditorError = class extends Error {
|
|
50557
50470
|
static {
|
|
@@ -50637,8 +50550,8 @@ __name(resolveExternalEditorCommand, "resolveExternalEditorCommand");
|
|
|
50637
50550
|
async function editDraftInExternalEditor(seed, options) {
|
|
50638
50551
|
options.signal?.throwIfAborted();
|
|
50639
50552
|
const command = resolveExternalEditorCommand(options.env, options.pressed);
|
|
50640
|
-
const directory = options.temporaryRoot === void 0 ? await createTempDir("editor-") : await mkdtemp(
|
|
50641
|
-
const draftPath =
|
|
50553
|
+
const directory = options.temporaryRoot === void 0 ? await createTempDir("editor-") : await mkdtemp(join5(options.temporaryRoot, "namzu-editor-"));
|
|
50554
|
+
const draftPath = join5(directory, "draft.md");
|
|
50642
50555
|
let edited;
|
|
50643
50556
|
let failure;
|
|
50644
50557
|
try {
|
|
@@ -51242,7 +51155,7 @@ var AskQueue = class {
|
|
|
51242
51155
|
};
|
|
51243
51156
|
|
|
51244
51157
|
// src/tui/plugin-view.ts
|
|
51245
|
-
import { join as
|
|
51158
|
+
import { join as join6 } from "node:path";
|
|
51246
51159
|
function pluginOption(plugin) {
|
|
51247
51160
|
return {
|
|
51248
51161
|
label: plugin.name,
|
|
@@ -51285,9 +51198,9 @@ function emptyPluginReport(config, cwd2) {
|
|
|
51285
51198
|
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.";
|
|
51286
51199
|
return [
|
|
51287
51200
|
reason,
|
|
51288
|
-
`Configuration: ${
|
|
51289
|
-
...scopes.includes("project") ? [`Project plugins: ${
|
|
51290
|
-
...scopes.includes("user") ? [`User plugins: ${
|
|
51201
|
+
`Configuration: ${join6(home, "config.yaml")}`,
|
|
51202
|
+
...scopes.includes("project") ? [`Project plugins: ${join6(cwd2, ".namzu", "plugins")}`] : [],
|
|
51203
|
+
...scopes.includes("user") ? [`User plugins: ${join6(home, "plugins")}`] : [],
|
|
51291
51204
|
"Each plugin directory contains plugin.json. Only Namzu plugin manifests are supported.",
|
|
51292
51205
|
"Tools, hooks and MCP servers can execute code. Enable only plugins you trust, then restart Namzu."
|
|
51293
51206
|
].map(choiceDisplayText).join("\n");
|
|
@@ -52721,7 +52634,7 @@ __name(prepareScheduledResume, "prepareScheduledResume");
|
|
|
52721
52634
|
|
|
52722
52635
|
// src/tui/schedule/startup.ts
|
|
52723
52636
|
import { readFileSync as readFileSync6 } from "node:fs";
|
|
52724
|
-
import { join as
|
|
52637
|
+
import { join as join7 } from "node:path";
|
|
52725
52638
|
function ago(ms) {
|
|
52726
52639
|
if (ms < 36e5) return `${Math.max(1, Math.round(ms / 6e4))} min`;
|
|
52727
52640
|
if (ms < 1728e5) return `${Math.round(ms / 36e5)} h`;
|
|
@@ -52803,7 +52716,7 @@ function scheduleStartupLine(home, cwd2, now = Date.now()) {
|
|
|
52803
52716
|
parts.push("The scheduler is installed but has not started \u2014 namzu schedule status");
|
|
52804
52717
|
}
|
|
52805
52718
|
}
|
|
52806
|
-
const suppressed = takeSuppressedCount(
|
|
52719
|
+
const suppressed = takeSuppressedCount(join7(paths.daemon, "notify.json"));
|
|
52807
52720
|
if (suppressed > 0)
|
|
52808
52721
|
parts.push(
|
|
52809
52722
|
`${plural(suppressed, "scheduled notification")} ${suppressed === 1 ? "was" : "were"} held back`
|
|
@@ -53857,12 +53770,12 @@ function setSkillSuggestions(on, opts = {}) {
|
|
|
53857
53770
|
__name(setSkillSuggestions, "setSkillSuggestions");
|
|
53858
53771
|
|
|
53859
53772
|
// src/tui/skills/suggestion-ledger.ts
|
|
53860
|
-
import { mkdirSync as
|
|
53861
|
-
import { dirname, join as
|
|
53773
|
+
import { mkdirSync as mkdirSync3, readFileSync as readFileSync7, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
53774
|
+
import { dirname, join as join8 } from "node:path";
|
|
53862
53775
|
var SUGGESTION_IGNORE_LIMIT = 3;
|
|
53863
53776
|
var FRESH_LEDGER = { v: 1, unanswered: 0, stopped: false };
|
|
53864
53777
|
function suggestionLedgerPath(namzuHome) {
|
|
53865
|
-
return
|
|
53778
|
+
return join8(namzuHome, "skills", ".suggestions.json");
|
|
53866
53779
|
}
|
|
53867
53780
|
__name(suggestionLedgerPath, "suggestionLedgerPath");
|
|
53868
53781
|
function readSuggestionLedger(namzuHome) {
|
|
@@ -53878,11 +53791,11 @@ __name(readSuggestionLedger, "readSuggestionLedger");
|
|
|
53878
53791
|
function writeSuggestionLedger(namzuHome, ledger) {
|
|
53879
53792
|
const path = suggestionLedgerPath(namzuHome);
|
|
53880
53793
|
try {
|
|
53881
|
-
|
|
53794
|
+
mkdirSync3(dirname(path), { recursive: true });
|
|
53882
53795
|
const temp = `${path}.${process.pid}.tmp`;
|
|
53883
53796
|
writeFileSync2(temp, `${JSON.stringify(ledger)}
|
|
53884
53797
|
`, { mode: 384 });
|
|
53885
|
-
|
|
53798
|
+
renameSync2(temp, path);
|
|
53886
53799
|
} catch {
|
|
53887
53800
|
}
|
|
53888
53801
|
}
|
|
@@ -57712,7 +57625,7 @@ ${blocks.join("\n\n")}`;
|
|
|
57712
57625
|
const scope = scopeRef.current;
|
|
57713
57626
|
if (!sessions || !scope || !conversationMaterializedRef.current) return void 0;
|
|
57714
57627
|
try {
|
|
57715
|
-
return
|
|
57628
|
+
return join9(sessions.paths.sessionDir({ sessionId: scope.sessionId }), "loops.json");
|
|
57716
57629
|
} catch {
|
|
57717
57630
|
return void 0;
|
|
57718
57631
|
}
|
|
@@ -60786,7 +60699,7 @@ ${blocks.join("\n\n")}`;
|
|
|
60786
60699
|
doctorRunningRef.current = true;
|
|
60787
60700
|
const progressId = pushMessage("system", "Checking\u2026");
|
|
60788
60701
|
try {
|
|
60789
|
-
const { runLiveDoctor } = await import("./live-
|
|
60702
|
+
const { runLiveDoctor } = await import("./live-ZJXXVGTH.js");
|
|
60790
60703
|
const { describePlainDoctor } = await import("./plain-report-XVPBQDLE.js");
|
|
60791
60704
|
const report = await runLiveDoctor({
|
|
60792
60705
|
...ctxRef.current.telemetry ? { telemetry: ctxRef.current.telemetry } : {}
|
|
@@ -63940,7 +63853,7 @@ ${jobLines.map(([, line]) => `- ${line}`).join("\n")}`] : []
|
|
|
63940
63853
|
}
|
|
63941
63854
|
try {
|
|
63942
63855
|
const sameSignIn = accounts.registry.list("codex").find(
|
|
63943
|
-
(other) => other.source.kind === "codex-home" && readCodexCredentialFile(
|
|
63856
|
+
(other) => other.source.kind === "codex-home" && readCodexCredentialFile(join9(other.source.dir, "auth.json"))?.accountId === result.accountId
|
|
63944
63857
|
);
|
|
63945
63858
|
if (sameSignIn) {
|
|
63946
63859
|
rmSync2(dir, { recursive: true, force: true });
|
|
@@ -68418,12 +68331,12 @@ __name(installFocusReporting, "installFocusReporting");
|
|
|
68418
68331
|
|
|
68419
68332
|
// src/tui/hint-counts.ts
|
|
68420
68333
|
import { randomUUID } from "node:crypto";
|
|
68421
|
-
import { mkdirSync as
|
|
68422
|
-
import { dirname as dirname2, join as
|
|
68334
|
+
import { mkdirSync as mkdirSync4, readFileSync as readFileSync8, renameSync as renameSync3, rmSync as rmSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
68335
|
+
import { dirname as dirname2, join as join10 } from "node:path";
|
|
68423
68336
|
var FILE_MODE = 384;
|
|
68424
68337
|
var DIR_MODE = 448;
|
|
68425
68338
|
function hintCountsPath(home) {
|
|
68426
|
-
return
|
|
68339
|
+
return join10(namzuHomePath(home), "hint-counts.json");
|
|
68427
68340
|
}
|
|
68428
68341
|
__name(hintCountsPath, "hintCountsPath");
|
|
68429
68342
|
function readAll(path) {
|
|
@@ -68448,12 +68361,12 @@ function writeHintCount(name, count2, home) {
|
|
|
68448
68361
|
const path = hintCountsPath(home);
|
|
68449
68362
|
const temp = `${path}.${randomUUID()}.tmp`;
|
|
68450
68363
|
try {
|
|
68451
|
-
|
|
68364
|
+
mkdirSync4(dirname2(path), { recursive: true, mode: DIR_MODE });
|
|
68452
68365
|
writeFileSync3(temp, `${JSON.stringify({ ...readAll(path), [name]: count2 }, null, 2)}
|
|
68453
68366
|
`, {
|
|
68454
68367
|
mode: FILE_MODE
|
|
68455
68368
|
});
|
|
68456
|
-
|
|
68369
|
+
renameSync3(temp, path);
|
|
68457
68370
|
} catch {
|
|
68458
68371
|
rmSync3(temp, { force: true });
|
|
68459
68372
|
}
|
|
@@ -68587,13 +68500,13 @@ __name(askTerminal, "askTerminal");
|
|
|
68587
68500
|
|
|
68588
68501
|
// src/tui/tip-history.ts
|
|
68589
68502
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
68590
|
-
import { mkdirSync as
|
|
68591
|
-
import { dirname as dirname3, join as
|
|
68503
|
+
import { mkdirSync as mkdirSync5, readFileSync as readFileSync9, renameSync as renameSync4, rmSync as rmSync4, writeFileSync as writeFileSync4 } from "node:fs";
|
|
68504
|
+
import { dirname as dirname3, join as join11 } from "node:path";
|
|
68592
68505
|
var FILE_MODE2 = 384;
|
|
68593
68506
|
var DIR_MODE2 = 448;
|
|
68594
68507
|
var EMPTY_TIP_HISTORY = { launches: 0, shown: {}, used: {} };
|
|
68595
68508
|
function tipHistoryPath(home) {
|
|
68596
|
-
return
|
|
68509
|
+
return join11(namzuHomePath(home), "tip-history.json");
|
|
68597
68510
|
}
|
|
68598
68511
|
__name(tipHistoryPath, "tipHistoryPath");
|
|
68599
68512
|
function wholeNumber(value) {
|
|
@@ -68627,10 +68540,10 @@ __name(readTipHistory, "readTipHistory");
|
|
|
68627
68540
|
function writeTipHistory(path, history) {
|
|
68628
68541
|
const temp = `${path}.${randomUUID2()}.tmp`;
|
|
68629
68542
|
try {
|
|
68630
|
-
|
|
68543
|
+
mkdirSync5(dirname3(path), { recursive: true, mode: DIR_MODE2 });
|
|
68631
68544
|
writeFileSync4(temp, `${JSON.stringify(history, null, 2)}
|
|
68632
68545
|
`, { mode: FILE_MODE2 });
|
|
68633
|
-
|
|
68546
|
+
renameSync4(temp, path);
|
|
68634
68547
|
} catch {
|
|
68635
68548
|
try {
|
|
68636
68549
|
rmSync4(temp, { force: true });
|
|
@@ -69052,4 +68965,4 @@ react/cjs/react-jsx-runtime.development.js:
|
|
|
69052
68965
|
* LICENSE file in the root directory of this source tree.
|
|
69053
68966
|
*)
|
|
69054
68967
|
*/
|
|
69055
|
-
//# sourceMappingURL=tui-
|
|
68968
|
+
//# sourceMappingURL=tui-GBZ7SLVJ.js.map
|