@namzu/cli 45.3.3 → 45.4.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.
- package/CHANGELOG.md +12 -0
- package/dist/bin.js +1 -1
- package/dist/chunks/{acp-EG4R7GRW.js → acp-AZLFAOF4.js} +8 -8
- package/dist/chunks/{add-WCTFVJME.js → add-KVRGXPPT.js} +5 -5
- package/dist/chunks/{agent-MYJCIPY4.js → agent-HT7EZDCT.js} +4 -4
- package/dist/chunks/{agent-session-UD2M3O3F.js → agent-session-DZ2QN7FF.js} +5 -5
- package/dist/chunks/{bin-main-AVXYUWUH.js → bin-main-TFRSQAXX.js} +3 -3
- package/dist/chunks/{chat-X73GLI7I.js → chat-D3VWR3YR.js} +2 -2
- package/dist/chunks/{chunk-ICIAFQVV.js → chunk-3ALDQTHV.js} +3 -3
- package/dist/chunks/{chunk-6VC6HCJN.js → chunk-3LQKAYY7.js} +2 -2
- package/dist/chunks/chunk-6CO3EL6W.js +260 -0
- package/dist/chunks/chunk-6CO3EL6W.js.map +6 -0
- package/dist/chunks/{chunk-KRFMMLXB.js → chunk-6Q3EYVF6.js} +2 -2
- package/dist/chunks/{chunk-I3YUF54N.js → chunk-ATUCJYY5.js} +92 -46
- package/dist/chunks/chunk-ATUCJYY5.js.map +6 -0
- package/dist/chunks/{chunk-P7DEIENP.js → chunk-BVSMAMQU.js} +4 -4
- package/dist/chunks/{chunk-4G3CFDPS.js → chunk-CD3PFLJG.js} +18 -18
- package/dist/chunks/{chunk-LM3KO4HQ.js → chunk-DLAHIIB4.js} +3 -3
- package/dist/chunks/{chunk-YHBEEH3I.js → chunk-IRUUF5QR.js} +2 -2
- package/dist/chunks/{chunk-DSRA44I5.js → chunk-J2UG66BV.js} +2 -2
- package/dist/chunks/{chunk-DAJQVD5D.js → chunk-JXAQGOHB.js} +2 -2
- package/dist/chunks/{chunk-43DHPUWU.js → chunk-NC5GT5ZI.js} +2 -2
- package/dist/chunks/{chunk-LXN2DGZE.js → chunk-RQPWIXDZ.js} +2 -2
- package/dist/chunks/{chunk-QNC7WED2.js → chunk-SYLU4JOG.js} +2 -2
- package/dist/chunks/{chunk-V2CEMLV5.js → chunk-TCGL3NEE.js} +3 -3
- package/dist/chunks/{chunk-3QHNIWDT.js → chunk-U4VQFHZ2.js} +2 -2
- package/dist/chunks/{chunk-TPS77GVG.js → chunk-UI3MVW3U.js} +2 -2
- package/dist/chunks/{chunk-HSNO7GHL.js → chunk-VSXHM53L.js} +5 -5
- package/dist/chunks/{chunk-6JICK2PM.js → chunk-WX23VXH7.js} +2 -2
- package/dist/chunks/{chunk-32TNYMYN.js → chunk-XZWVGQYH.js} +5 -2
- package/dist/chunks/{chunk-32TNYMYN.js.map → chunk-XZWVGQYH.js.map} +1 -1
- package/dist/chunks/{chunk-KAWEN22C.js → chunk-YD7KHMDW.js} +3 -3
- package/dist/chunks/{chunk-JU5CYBAG.js → chunk-YNTWN7WE.js} +2 -2
- package/dist/chunks/{chunk-VLOL3NC2.js → chunk-ZKQL4CTJ.js} +2 -2
- package/dist/chunks/{cli-runtime-RV4V7WDI.js → cli-runtime-YAAF4SRC.js} +3 -3
- package/dist/chunks/{doctor-OL6W7JUG.js → doctor-FULZISWS.js} +6 -6
- package/dist/chunks/{drain-HPY22IFR.js → drain-TUEONE4F.js} +2 -2
- package/dist/chunks/{entry-K4X4GXZF.js → entry-JREDN7MF.js} +3 -3
- package/dist/chunks/{exec-EWDNB4SA.js → exec-YIFVF55O.js} +7 -7
- package/dist/chunks/{host-3W7ZPE6Q.js → host-CAEKSCU6.js} +2 -2
- package/dist/chunks/{host-queries-MHM7JXK5.js → host-queries-42XPCXBX.js} +2 -2
- package/dist/chunks/{learn-IABAEUDX.js → learn-GUSW5DAS.js} +2 -2
- package/dist/chunks/{learn-builtin-IYZBPO3K.js → learn-builtin-BDNUVVBH.js} +3 -3
- package/dist/chunks/{lifecycle-XZKHLCKI.js → lifecycle-L2BR7PZQ.js} +6 -6
- package/dist/chunks/{list-CCBHSOQ5.js → list-GBFUOWMJ.js} +3 -3
- package/dist/chunks/{live-S5T5J3HY.js → live-KP4H5HU6.js} +5 -5
- package/dist/chunks/{mcp-PKLR4XKA.js → mcp-ZGT7SPGO.js} +2 -2
- package/dist/chunks/{message-command-XS7J46MH.js → message-command-5C6IA2PX.js} +7 -7
- package/dist/chunks/{pal-MKSD6D7G.js → pal-L5RWH4TM.js} +3 -3
- package/dist/chunks/{resident-RZBZHKII.js → resident-OHM7RGYD.js} +4 -4
- package/dist/chunks/{schedule-CIA3VATB.js → schedule-ILFE3JJQ.js} +5 -5
- package/dist/chunks/{service-42J5XJT5.js → service-PDZFN4KY.js} +38 -276
- package/dist/chunks/service-PDZFN4KY.js.map +6 -0
- package/dist/chunks/{session-step-HQSIBIBB.js → session-step-7KH6LKZW.js} +2 -2
- package/dist/chunks/{start-check-YMAUKQOU.js → start-check-JXWT73ZI.js} +2 -2
- package/dist/chunks/{tui-WTI3Z45D.js → tui-GH3WJKT3.js} +294 -72
- package/dist/chunks/tui-GH3WJKT3.js.map +6 -0
- package/dist/chunks/{upgrade-WBBH6O5R.js → upgrade-6UMTZSTP.js} +3 -3
- package/dist/chunks/{workspaces-7BI5D7PW.js → workspaces-E24UVQAY.js} +2 -2
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/schema.d.ts +8 -0
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/index.js +7 -7
- package/dist/integrations/notifications/sound/chime.d.ts +18 -0
- package/dist/integrations/notifications/sound/chime.d.ts.map +1 -0
- package/dist/integrations/notifications/sound.d.ts +83 -0
- package/dist/integrations/notifications/sound.d.ts.map +1 -0
- package/dist/integrations/resident/runner-worker.js +1 -1
- package/dist/tui/App.d.ts.map +1 -1
- package/dist/workspaces/host.d.ts.map +1 -1
- package/dist/workspaces/sidebar.d.ts +22 -6
- package/dist/workspaces/sidebar.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/chunks/chunk-I3YUF54N.js.map +0 -6
- package/dist/chunks/service-42J5XJT5.js.map +0 -6
- package/dist/chunks/tui-WTI3Z45D.js.map +0 -6
- /package/dist/chunks/{acp-EG4R7GRW.js.map → acp-AZLFAOF4.js.map} +0 -0
- /package/dist/chunks/{add-WCTFVJME.js.map → add-KVRGXPPT.js.map} +0 -0
- /package/dist/chunks/{agent-MYJCIPY4.js.map → agent-HT7EZDCT.js.map} +0 -0
- /package/dist/chunks/{agent-session-UD2M3O3F.js.map → agent-session-DZ2QN7FF.js.map} +0 -0
- /package/dist/chunks/{bin-main-AVXYUWUH.js.map → bin-main-TFRSQAXX.js.map} +0 -0
- /package/dist/chunks/{chat-X73GLI7I.js.map → chat-D3VWR3YR.js.map} +0 -0
- /package/dist/chunks/{chunk-ICIAFQVV.js.map → chunk-3ALDQTHV.js.map} +0 -0
- /package/dist/chunks/{chunk-6VC6HCJN.js.map → chunk-3LQKAYY7.js.map} +0 -0
- /package/dist/chunks/{chunk-KRFMMLXB.js.map → chunk-6Q3EYVF6.js.map} +0 -0
- /package/dist/chunks/{chunk-P7DEIENP.js.map → chunk-BVSMAMQU.js.map} +0 -0
- /package/dist/chunks/{chunk-4G3CFDPS.js.map → chunk-CD3PFLJG.js.map} +0 -0
- /package/dist/chunks/{chunk-LM3KO4HQ.js.map → chunk-DLAHIIB4.js.map} +0 -0
- /package/dist/chunks/{chunk-YHBEEH3I.js.map → chunk-IRUUF5QR.js.map} +0 -0
- /package/dist/chunks/{chunk-DSRA44I5.js.map → chunk-J2UG66BV.js.map} +0 -0
- /package/dist/chunks/{chunk-DAJQVD5D.js.map → chunk-JXAQGOHB.js.map} +0 -0
- /package/dist/chunks/{chunk-43DHPUWU.js.map → chunk-NC5GT5ZI.js.map} +0 -0
- /package/dist/chunks/{chunk-LXN2DGZE.js.map → chunk-RQPWIXDZ.js.map} +0 -0
- /package/dist/chunks/{chunk-QNC7WED2.js.map → chunk-SYLU4JOG.js.map} +0 -0
- /package/dist/chunks/{chunk-V2CEMLV5.js.map → chunk-TCGL3NEE.js.map} +0 -0
- /package/dist/chunks/{chunk-3QHNIWDT.js.map → chunk-U4VQFHZ2.js.map} +0 -0
- /package/dist/chunks/{chunk-TPS77GVG.js.map → chunk-UI3MVW3U.js.map} +0 -0
- /package/dist/chunks/{chunk-HSNO7GHL.js.map → chunk-VSXHM53L.js.map} +0 -0
- /package/dist/chunks/{chunk-6JICK2PM.js.map → chunk-WX23VXH7.js.map} +0 -0
- /package/dist/chunks/{chunk-KAWEN22C.js.map → chunk-YD7KHMDW.js.map} +0 -0
- /package/dist/chunks/{chunk-JU5CYBAG.js.map → chunk-YNTWN7WE.js.map} +0 -0
- /package/dist/chunks/{chunk-VLOL3NC2.js.map → chunk-ZKQL4CTJ.js.map} +0 -0
- /package/dist/chunks/{cli-runtime-RV4V7WDI.js.map → cli-runtime-YAAF4SRC.js.map} +0 -0
- /package/dist/chunks/{doctor-OL6W7JUG.js.map → doctor-FULZISWS.js.map} +0 -0
- /package/dist/chunks/{drain-HPY22IFR.js.map → drain-TUEONE4F.js.map} +0 -0
- /package/dist/chunks/{entry-K4X4GXZF.js.map → entry-JREDN7MF.js.map} +0 -0
- /package/dist/chunks/{exec-EWDNB4SA.js.map → exec-YIFVF55O.js.map} +0 -0
- /package/dist/chunks/{host-3W7ZPE6Q.js.map → host-CAEKSCU6.js.map} +0 -0
- /package/dist/chunks/{host-queries-MHM7JXK5.js.map → host-queries-42XPCXBX.js.map} +0 -0
- /package/dist/chunks/{learn-IABAEUDX.js.map → learn-GUSW5DAS.js.map} +0 -0
- /package/dist/chunks/{learn-builtin-IYZBPO3K.js.map → learn-builtin-BDNUVVBH.js.map} +0 -0
- /package/dist/chunks/{lifecycle-XZKHLCKI.js.map → lifecycle-L2BR7PZQ.js.map} +0 -0
- /package/dist/chunks/{list-CCBHSOQ5.js.map → list-GBFUOWMJ.js.map} +0 -0
- /package/dist/chunks/{live-S5T5J3HY.js.map → live-KP4H5HU6.js.map} +0 -0
- /package/dist/chunks/{mcp-PKLR4XKA.js.map → mcp-ZGT7SPGO.js.map} +0 -0
- /package/dist/chunks/{message-command-XS7J46MH.js.map → message-command-5C6IA2PX.js.map} +0 -0
- /package/dist/chunks/{pal-MKSD6D7G.js.map → pal-L5RWH4TM.js.map} +0 -0
- /package/dist/chunks/{resident-RZBZHKII.js.map → resident-OHM7RGYD.js.map} +0 -0
- /package/dist/chunks/{schedule-CIA3VATB.js.map → schedule-ILFE3JJQ.js.map} +0 -0
- /package/dist/chunks/{session-step-HQSIBIBB.js.map → session-step-7KH6LKZW.js.map} +0 -0
- /package/dist/chunks/{start-check-YMAUKQOU.js.map → start-check-JXWT73ZI.js.map} +0 -0
- /package/dist/chunks/{upgrade-WBBH6O5R.js.map → upgrade-6UMTZSTP.js.map} +0 -0
- /package/dist/chunks/{workspaces-7BI5D7PW.js.map → workspaces-E24UVQAY.js.map} +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { createRequire as __namzuCreateRequire } from 'node:module';
|
|
2
2
|
const require = __namzuCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
selectDesktopBackend
|
|
5
|
+
} from "./chunk-6CO3EL6W.js";
|
|
3
6
|
import {
|
|
4
7
|
NAMZU_COMPACT_WORDMARK,
|
|
5
8
|
NAMZU_WORDMARK,
|
|
@@ -11,7 +14,7 @@ import {
|
|
|
11
14
|
confirmationView,
|
|
12
15
|
describeChanges,
|
|
13
16
|
permissionsChanged
|
|
14
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-SYLU4JOG.js";
|
|
15
18
|
import {
|
|
16
19
|
visibleScheduleMessage
|
|
17
20
|
} from "./chunk-NADQQMMG.js";
|
|
@@ -56,7 +59,7 @@ import {
|
|
|
56
59
|
useReducedMotion,
|
|
57
60
|
useThemeEpoch,
|
|
58
61
|
useThemeSubscription
|
|
59
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-TCGL3NEE.js";
|
|
60
63
|
import {
|
|
61
64
|
handleTerminationSignals
|
|
62
65
|
} from "./chunk-R3DTSLY2.js";
|
|
@@ -95,12 +98,12 @@ import {
|
|
|
95
98
|
} from "./chunk-XH5YF2YX.js";
|
|
96
99
|
import {
|
|
97
100
|
settleAnsweredPark
|
|
98
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-WX23VXH7.js";
|
|
99
102
|
import {
|
|
100
103
|
DELIVERY_READ_LIMIT,
|
|
101
104
|
readSourceDeliveryPage,
|
|
102
105
|
takeSuppressedCount
|
|
103
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-VSXHM53L.js";
|
|
104
107
|
import {
|
|
105
108
|
callsCount
|
|
106
109
|
} from "./chunk-E5VLANCO.js";
|
|
@@ -117,14 +120,14 @@ import {
|
|
|
117
120
|
runsPerDay,
|
|
118
121
|
scriptShellUnavailableReason,
|
|
119
122
|
verifyScheduledScript
|
|
120
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-6Q3EYVF6.js";
|
|
121
124
|
import "./chunk-RH7CN6ME.js";
|
|
122
125
|
import {
|
|
123
126
|
allowsCommands,
|
|
124
127
|
compileJobPolicy,
|
|
125
128
|
compileScriptCheckPolicy,
|
|
126
129
|
isPresetName
|
|
127
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-RQPWIXDZ.js";
|
|
128
131
|
import {
|
|
129
132
|
formatResumeShellCommand,
|
|
130
133
|
parkedRunWords,
|
|
@@ -175,20 +178,20 @@ import {
|
|
|
175
178
|
sectionHeading,
|
|
176
179
|
withAutoChoice,
|
|
177
180
|
writeConversationExport
|
|
178
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-UI3MVW3U.js";
|
|
179
182
|
import {
|
|
180
183
|
tuiPalDefinition,
|
|
181
184
|
tuiPalEnvironment,
|
|
182
185
|
tuiPalOwner,
|
|
183
186
|
tuiPalPreferences
|
|
184
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-JXAQGOHB.js";
|
|
185
188
|
import {
|
|
186
189
|
isModelOnlyContext,
|
|
187
190
|
runtimeContextLabel
|
|
188
191
|
} from "./chunk-FJONRQQU.js";
|
|
189
192
|
import "./chunk-ANUVBWLR.js";
|
|
190
193
|
import "./chunk-ZWA2JRJV.js";
|
|
191
|
-
import "./chunk-
|
|
194
|
+
import "./chunk-NC5GT5ZI.js";
|
|
192
195
|
import "./chunk-HG6MH3OH.js";
|
|
193
196
|
import {
|
|
194
197
|
claimPalConversation,
|
|
@@ -275,7 +278,7 @@ import {
|
|
|
275
278
|
webLiveStatus,
|
|
276
279
|
webSettledLine,
|
|
277
280
|
withDebugDetail
|
|
278
|
-
} from "./chunk-
|
|
281
|
+
} from "./chunk-BVSMAMQU.js";
|
|
279
282
|
import {
|
|
280
283
|
openManagedWorktrees,
|
|
281
284
|
worktreeOpenHint
|
|
@@ -322,7 +325,7 @@ import {
|
|
|
322
325
|
isSelfMending,
|
|
323
326
|
isSpentAllowance
|
|
324
327
|
} from "./chunk-YD7Y5T7K.js";
|
|
325
|
-
import "./chunk-
|
|
328
|
+
import "./chunk-IRUUF5QR.js";
|
|
326
329
|
import {
|
|
327
330
|
describeBrowserStatus
|
|
328
331
|
} from "./chunk-WHODOMXA.js";
|
|
@@ -366,14 +369,14 @@ import {
|
|
|
366
369
|
} from "./chunk-GRG7ZV6K.js";
|
|
367
370
|
import {
|
|
368
371
|
startAutoUpdate
|
|
369
|
-
} from "./chunk-
|
|
372
|
+
} from "./chunk-ZKQL4CTJ.js";
|
|
370
373
|
import {
|
|
371
374
|
readManifest
|
|
372
375
|
} from "./chunk-AK2U3N2A.js";
|
|
373
376
|
import {
|
|
374
377
|
resolveNpmInvocation
|
|
375
|
-
} from "./chunk-
|
|
376
|
-
import "./chunk-
|
|
378
|
+
} from "./chunk-3LQKAYY7.js";
|
|
379
|
+
import "./chunk-DLAHIIB4.js";
|
|
377
380
|
import {
|
|
378
381
|
ScheduleConflictError,
|
|
379
382
|
confirmationHolds,
|
|
@@ -422,7 +425,7 @@ import {
|
|
|
422
425
|
pendingServersMessage,
|
|
423
426
|
readPermissionLayers,
|
|
424
427
|
resolveComposerTriggers
|
|
425
|
-
} from "./chunk-
|
|
428
|
+
} from "./chunk-XZWVGQYH.js";
|
|
426
429
|
import "./chunk-KONYGNG6.js";
|
|
427
430
|
import "./chunk-LCGXWCVU.js";
|
|
428
431
|
import {
|
|
@@ -33988,8 +33991,8 @@ var measure_element_default = measureElement;
|
|
|
33988
33991
|
var import_react61 = __toESM(require_react(), 1);
|
|
33989
33992
|
|
|
33990
33993
|
// src/tui/App.tsx
|
|
33991
|
-
import { existsSync as
|
|
33992
|
-
import { join as
|
|
33994
|
+
import { existsSync as existsSync3, rmSync as rmSync2 } from "node:fs";
|
|
33995
|
+
import { join as join9, relative as relative3, resolve as resolve7 } from "node:path";
|
|
33993
33996
|
var import_react60 = __toESM(require_react(), 1);
|
|
33994
33997
|
|
|
33995
33998
|
// src/tui/system-rows.ts
|
|
@@ -34425,33 +34428,33 @@ function workflowRowVariants(workflow, now) {
|
|
|
34425
34428
|
const count2 = `${workflow.done}/${workflow.total}`;
|
|
34426
34429
|
const elapsed2 = formatElapsed(Math.max(0, (workflow.endedAt ?? now) - workflow.startedAt));
|
|
34427
34430
|
const spent = workflow.tokens === void 0 ? void 0 : formatCompactCount(workflow.tokens);
|
|
34428
|
-
const
|
|
34431
|
+
const join12 = /* @__PURE__ */ __name((parts) => parts.filter((part) => part !== void 0).join(" \xB7 "), "join");
|
|
34429
34432
|
const [wide, mid, narrow] = WORKFLOW_BAR_WIDTHS;
|
|
34430
34433
|
const warned = workflow.large ? [
|
|
34431
34434
|
{
|
|
34432
34435
|
barWidth: wide,
|
|
34433
|
-
text:
|
|
34436
|
+
text: join12([count2, elapsed2, spent && `\u2193 ${spent} tokens`, LARGE_WORKFLOW_WARNING])
|
|
34434
34437
|
},
|
|
34435
34438
|
{
|
|
34436
34439
|
barWidth: wide,
|
|
34437
|
-
text:
|
|
34440
|
+
text: join12([count2, elapsed2, spent && `\u2193 ${spent} tokens`, LARGE_WORKFLOW_WARNING_SHORT])
|
|
34438
34441
|
},
|
|
34439
34442
|
{
|
|
34440
34443
|
barWidth: wide,
|
|
34441
|
-
text:
|
|
34444
|
+
text: join12([elapsed2, spent && `\u2193 ${spent}`, LARGE_WORKFLOW_WARNING_SHORT])
|
|
34442
34445
|
}
|
|
34443
34446
|
] : [];
|
|
34444
34447
|
const variants = [
|
|
34445
34448
|
...warned,
|
|
34446
34449
|
{
|
|
34447
34450
|
barWidth: wide,
|
|
34448
|
-
text:
|
|
34451
|
+
text: join12([count2, elapsed2, spent && `\u2193 ${spent} tokens`])
|
|
34449
34452
|
},
|
|
34450
|
-
{ barWidth: wide, text:
|
|
34451
|
-
{ barWidth: wide, text:
|
|
34452
|
-
{ barWidth: wide, text:
|
|
34453
|
-
{ barWidth: mid, text:
|
|
34454
|
-
{ barWidth: narrow, text:
|
|
34453
|
+
{ barWidth: wide, text: join12([elapsed2, spent && `\u2193 ${spent} tokens`]) },
|
|
34454
|
+
{ barWidth: wide, text: join12([elapsed2, spent && `\u2193 ${spent}`]) },
|
|
34455
|
+
{ barWidth: wide, text: join12([spent && `\u2193 ${spent}`]) },
|
|
34456
|
+
{ barWidth: mid, text: join12([spent && `\u2193 ${spent}`]) },
|
|
34457
|
+
{ barWidth: narrow, text: join12([spent && `\u2193 ${spent}`]) },
|
|
34455
34458
|
{ barWidth: narrow, text: "" }
|
|
34456
34459
|
];
|
|
34457
34460
|
return variants.filter(
|
|
@@ -40116,6 +40119,218 @@ async function mcpPersonCommand(args, actions) {
|
|
|
40116
40119
|
}
|
|
40117
40120
|
__name(mcpPersonCommand, "mcpPersonCommand");
|
|
40118
40121
|
|
|
40122
|
+
// src/integrations/notifications/sound.ts
|
|
40123
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
40124
|
+
import { existsSync as existsSync2, mkdirSync as mkdirSync2, renameSync, statSync as statSync2, writeFileSync } from "node:fs";
|
|
40125
|
+
import { join as join3 } from "node:path";
|
|
40126
|
+
|
|
40127
|
+
// src/integrations/notifications/sound/chime.ts
|
|
40128
|
+
var FIGURES = {
|
|
40129
|
+
// E5 then B5: a settled, rising fifth.
|
|
40130
|
+
done: [
|
|
40131
|
+
{ hz: 659.25, at: 0, ring: 0.42, level: 0.8 },
|
|
40132
|
+
{ hz: 987.77, at: 0.13, ring: 0.62, level: 1 }
|
|
40133
|
+
],
|
|
40134
|
+
// A5 struck twice.
|
|
40135
|
+
request: [
|
|
40136
|
+
{ hz: 880, at: 0, ring: 0.22, level: 0.9 },
|
|
40137
|
+
{ hz: 880, at: 0.17, ring: 0.34, level: 1 }
|
|
40138
|
+
]
|
|
40139
|
+
};
|
|
40140
|
+
var SAMPLE_RATE = 22050;
|
|
40141
|
+
var ATTACK_SECONDS = 6e-3;
|
|
40142
|
+
var PEAK = 0.42;
|
|
40143
|
+
var PARTIALS = [
|
|
40144
|
+
[1, 1],
|
|
40145
|
+
[2, 0.3],
|
|
40146
|
+
[3.01, 0.1]
|
|
40147
|
+
];
|
|
40148
|
+
function chimeSeconds(kind) {
|
|
40149
|
+
return Math.max(...FIGURES[kind].map((note) => note.at + note.ring)) + 0.05;
|
|
40150
|
+
}
|
|
40151
|
+
__name(chimeSeconds, "chimeSeconds");
|
|
40152
|
+
function chimeWav(kind) {
|
|
40153
|
+
const length = Math.ceil(chimeSeconds(kind) * SAMPLE_RATE);
|
|
40154
|
+
const samples = new Float64Array(length);
|
|
40155
|
+
for (const note of FIGURES[kind]) {
|
|
40156
|
+
const start = Math.round(note.at * SAMPLE_RATE);
|
|
40157
|
+
const count2 = Math.min(length - start, Math.round(note.ring * SAMPLE_RATE));
|
|
40158
|
+
const fall = Math.log(1e3) / note.ring;
|
|
40159
|
+
for (let i = 0; i < count2; i++) {
|
|
40160
|
+
const t = i / SAMPLE_RATE;
|
|
40161
|
+
const envelope = Math.min(1, t / ATTACK_SECONDS) * Math.exp(-fall * t);
|
|
40162
|
+
let value = 0;
|
|
40163
|
+
for (const [multiple, level] of PARTIALS) {
|
|
40164
|
+
value += level * Math.sin(2 * Math.PI * note.hz * multiple * t);
|
|
40165
|
+
}
|
|
40166
|
+
samples[start + i] = (samples[start + i] ?? 0) + value * envelope * note.level;
|
|
40167
|
+
}
|
|
40168
|
+
}
|
|
40169
|
+
let peak = 0;
|
|
40170
|
+
for (const sample of samples) peak = Math.max(peak, Math.abs(sample));
|
|
40171
|
+
const gain = peak > 0 ? PEAK / peak : 0;
|
|
40172
|
+
const dataBytes = length * 2;
|
|
40173
|
+
const wav = Buffer.alloc(44 + dataBytes);
|
|
40174
|
+
wav.write("RIFF", 0, "ascii");
|
|
40175
|
+
wav.writeUInt32LE(36 + dataBytes, 4);
|
|
40176
|
+
wav.write("WAVE", 8, "ascii");
|
|
40177
|
+
wav.write("fmt ", 12, "ascii");
|
|
40178
|
+
wav.writeUInt32LE(16, 16);
|
|
40179
|
+
wav.writeUInt16LE(1, 20);
|
|
40180
|
+
wav.writeUInt16LE(1, 22);
|
|
40181
|
+
wav.writeUInt32LE(SAMPLE_RATE, 24);
|
|
40182
|
+
wav.writeUInt32LE(SAMPLE_RATE * 2, 28);
|
|
40183
|
+
wav.writeUInt16LE(2, 32);
|
|
40184
|
+
wav.writeUInt16LE(16, 34);
|
|
40185
|
+
wav.write("data", 36, "ascii");
|
|
40186
|
+
wav.writeUInt32LE(dataBytes, 40);
|
|
40187
|
+
for (let i = 0; i < length; i++) {
|
|
40188
|
+
const sample = Math.max(-1, Math.min(1, (samples[i] ?? 0) * gain));
|
|
40189
|
+
wav.writeInt16LE(Math.round(sample * 32767), 44 + i * 2);
|
|
40190
|
+
}
|
|
40191
|
+
return wav;
|
|
40192
|
+
}
|
|
40193
|
+
__name(chimeWav, "chimeWav");
|
|
40194
|
+
|
|
40195
|
+
// src/integrations/notifications/sound.ts
|
|
40196
|
+
var SOUND_MIN_TURN_MS = 1e4;
|
|
40197
|
+
var SOUND_SPACING_MS = 1500;
|
|
40198
|
+
var SOUND_KILL_SWITCH = "NAMZU_NO_SOUND";
|
|
40199
|
+
function soundFor(moment, turnMs) {
|
|
40200
|
+
if (moment.kind === "approval-required") return "request";
|
|
40201
|
+
if (moment.kind === "idle-prompt") return void 0;
|
|
40202
|
+
if (moment.outcome !== "completed") return "request";
|
|
40203
|
+
return turnMs !== void 0 && turnMs >= SOUND_MIN_TURN_MS ? "done" : void 0;
|
|
40204
|
+
}
|
|
40205
|
+
__name(soundFor, "soundFor");
|
|
40206
|
+
var PLAY_SCRIPT = "$ErrorActionPreference = 'Stop'; (New-Object System.Media.SoundPlayer $env:NAMZU_SOUND_FILE).PlaySync()";
|
|
40207
|
+
var POWERSHELL_ARGS = [
|
|
40208
|
+
"-NoProfile",
|
|
40209
|
+
"-NonInteractive",
|
|
40210
|
+
"-ExecutionPolicy",
|
|
40211
|
+
"Bypass",
|
|
40212
|
+
"-EncodedCommand",
|
|
40213
|
+
Buffer.from(PLAY_SCRIPT, "utf16le").toString("base64")
|
|
40214
|
+
];
|
|
40215
|
+
function onPath(env3, exists, name) {
|
|
40216
|
+
for (const dir of (env3.PATH ?? "").split(":")) {
|
|
40217
|
+
if (!dir || dir.startsWith("/mnt/")) continue;
|
|
40218
|
+
const candidate = join3(dir, name);
|
|
40219
|
+
if (exists(candidate)) return candidate;
|
|
40220
|
+
}
|
|
40221
|
+
return void 0;
|
|
40222
|
+
}
|
|
40223
|
+
__name(onPath, "onPath");
|
|
40224
|
+
function selectSoundPlayer(probe = {}) {
|
|
40225
|
+
const platform2 = probe.platform ?? process.platform;
|
|
40226
|
+
const env3 = probe.env ?? process.env;
|
|
40227
|
+
const exists = probe.exists ?? existsSync2;
|
|
40228
|
+
if (platform2 === "darwin") {
|
|
40229
|
+
return { name: "afplay", command: "/usr/bin/afplay", args: /* @__PURE__ */ __name((file) => [file], "args") };
|
|
40230
|
+
}
|
|
40231
|
+
const desktop = probe.desktop ?? selectDesktopBackend({ platform: platform2, env: env3, exists });
|
|
40232
|
+
if (desktop.kind === "windows-toast") {
|
|
40233
|
+
return {
|
|
40234
|
+
name: "powershell",
|
|
40235
|
+
command: "powershell.exe",
|
|
40236
|
+
args: /* @__PURE__ */ __name(() => POWERSHELL_ARGS, "args"),
|
|
40237
|
+
env: /* @__PURE__ */ __name((base, file) => ({ ...base, NAMZU_SOUND_FILE: file }), "env")
|
|
40238
|
+
};
|
|
40239
|
+
}
|
|
40240
|
+
if (desktop.kind === "wsl-toast" && desktop.command) {
|
|
40241
|
+
const shared = desktop.env?.({}, "", "") ?? {};
|
|
40242
|
+
return {
|
|
40243
|
+
name: "powershell",
|
|
40244
|
+
command: desktop.command,
|
|
40245
|
+
args: /* @__PURE__ */ __name(() => POWERSHELL_ARGS, "args"),
|
|
40246
|
+
env: /* @__PURE__ */ __name((base, file) => {
|
|
40247
|
+
const existing = (base.WSLENV ?? "").split(":").filter((entry) => entry && !entry.startsWith("NAMZU_SOUND_FILE"));
|
|
40248
|
+
return {
|
|
40249
|
+
...base,
|
|
40250
|
+
...shared.WSL_INTEROP ? { WSL_INTEROP: shared.WSL_INTEROP } : {},
|
|
40251
|
+
NAMZU_SOUND_FILE: file,
|
|
40252
|
+
WSLENV: [...existing, "NAMZU_SOUND_FILE/p"].join(":")
|
|
40253
|
+
};
|
|
40254
|
+
}, "env"),
|
|
40255
|
+
...desktop.cwd ? { cwd: desktop.cwd } : {}
|
|
40256
|
+
};
|
|
40257
|
+
}
|
|
40258
|
+
for (const [name, args] of [
|
|
40259
|
+
["paplay", (file) => [file]],
|
|
40260
|
+
["pw-play", (file) => [file]],
|
|
40261
|
+
["aplay", (file) => ["-q", file]]
|
|
40262
|
+
]) {
|
|
40263
|
+
const command = onPath(env3, exists, name);
|
|
40264
|
+
if (command) return { name, command, args };
|
|
40265
|
+
}
|
|
40266
|
+
return void 0;
|
|
40267
|
+
}
|
|
40268
|
+
__name(selectSoundPlayer, "selectSoundPlayer");
|
|
40269
|
+
function soundFilePath(kind, home = namzuHomePath()) {
|
|
40270
|
+
return join3(home, "cache", "sound", `namzu-${kind}-v1.wav`);
|
|
40271
|
+
}
|
|
40272
|
+
__name(soundFilePath, "soundFilePath");
|
|
40273
|
+
function ensureSoundFile(kind, home) {
|
|
40274
|
+
const file = soundFilePath(kind, home);
|
|
40275
|
+
const wav = chimeWav(kind);
|
|
40276
|
+
try {
|
|
40277
|
+
if (statSync2(file).size === wav.length) return file;
|
|
40278
|
+
} catch {
|
|
40279
|
+
}
|
|
40280
|
+
mkdirSync2(join3(file, ".."), { recursive: true });
|
|
40281
|
+
const staging = `${file}.${process.pid}.tmp`;
|
|
40282
|
+
writeFileSync(staging, wav);
|
|
40283
|
+
renameSync(staging, file);
|
|
40284
|
+
return file;
|
|
40285
|
+
}
|
|
40286
|
+
__name(ensureSoundFile, "ensureSoundFile");
|
|
40287
|
+
var defaultSpawn = /* @__PURE__ */ __name((command, args, options) => {
|
|
40288
|
+
const child = spawn2(command, [...args], {
|
|
40289
|
+
stdio: "ignore",
|
|
40290
|
+
detached: true,
|
|
40291
|
+
windowsHide: true,
|
|
40292
|
+
env: options.env,
|
|
40293
|
+
...options.cwd ? { cwd: options.cwd } : {}
|
|
40294
|
+
});
|
|
40295
|
+
child.on("error", () => {
|
|
40296
|
+
});
|
|
40297
|
+
const stuck = setTimeout(() => child.kill(), 15e3);
|
|
40298
|
+
stuck.unref();
|
|
40299
|
+
child.on("exit", () => clearTimeout(stuck));
|
|
40300
|
+
child.unref();
|
|
40301
|
+
}, "defaultSpawn");
|
|
40302
|
+
var lastPlayedAt = Number.NEGATIVE_INFINITY;
|
|
40303
|
+
var cachedPlayer;
|
|
40304
|
+
function playMoment(moment, turnMs, options = {}) {
|
|
40305
|
+
try {
|
|
40306
|
+
const env3 = options.env ?? process.env;
|
|
40307
|
+
if (options.enabled === false || options.isTTY === false) return void 0;
|
|
40308
|
+
if (env3[SOUND_KILL_SWITCH] === "1") return void 0;
|
|
40309
|
+
const kind = soundFor(moment, turnMs);
|
|
40310
|
+
if (!kind) return void 0;
|
|
40311
|
+
const now = (options.now ?? Date.now)();
|
|
40312
|
+
if (now - lastPlayedAt < SOUND_SPACING_MS) return void 0;
|
|
40313
|
+
let player;
|
|
40314
|
+
if ("player" in options) player = options.player;
|
|
40315
|
+
else {
|
|
40316
|
+
cachedPlayer ??= { value: selectSoundPlayer({ env: env3 }) };
|
|
40317
|
+
player = cachedPlayer.value;
|
|
40318
|
+
}
|
|
40319
|
+
if (!player) return void 0;
|
|
40320
|
+
const file = ensureSoundFile(kind, options.home);
|
|
40321
|
+
lastPlayedAt = now;
|
|
40322
|
+
const base = player.env ? player.env(env3, file) : env3;
|
|
40323
|
+
(options.spawn ?? defaultSpawn)(player.command, player.args(file), {
|
|
40324
|
+
env: base,
|
|
40325
|
+
...player.cwd ? { cwd: player.cwd } : {}
|
|
40326
|
+
});
|
|
40327
|
+
return kind;
|
|
40328
|
+
} catch {
|
|
40329
|
+
return void 0;
|
|
40330
|
+
}
|
|
40331
|
+
}
|
|
40332
|
+
__name(playMoment, "playMoment");
|
|
40333
|
+
|
|
40119
40334
|
// src/integrations/notifications/terminal.ts
|
|
40120
40335
|
function terminalNotificationEnabled(setting, notification) {
|
|
40121
40336
|
if (setting === true) return notification.kind !== "idle-prompt";
|
|
@@ -41415,9 +41630,9 @@ async function loadImageFiles(paths, deps = {}) {
|
|
|
41415
41630
|
__name(loadImageFiles, "loadImageFiles");
|
|
41416
41631
|
|
|
41417
41632
|
// src/integrations/clipboard/image.ts
|
|
41418
|
-
import { spawn as
|
|
41633
|
+
import { spawn as spawn3 } from "node:child_process";
|
|
41419
41634
|
import { readFile as readFile2, rm } from "node:fs/promises";
|
|
41420
|
-
import { join as
|
|
41635
|
+
import { join as join4 } from "node:path";
|
|
41421
41636
|
var MAX_IMAGE_BASE64_BYTES = 5 * 1024 * 1024;
|
|
41422
41637
|
function imageFitsProvider(image2) {
|
|
41423
41638
|
return image2.data.length <= MAX_IMAGE_BASE64_BYTES;
|
|
@@ -41444,7 +41659,7 @@ var runCommand = /* @__PURE__ */ __name((file, args, options) => new Promise((re
|
|
|
41444
41659
|
}, "finish");
|
|
41445
41660
|
let child;
|
|
41446
41661
|
try {
|
|
41447
|
-
child =
|
|
41662
|
+
child = spawn3(file, [...args], { stdio: ["ignore", "pipe", "ignore"], windowsHide: true });
|
|
41448
41663
|
} catch {
|
|
41449
41664
|
resolve9({ code: null, stdout: Buffer.alloc(0), timedOut: false, spawnFailed: true });
|
|
41450
41665
|
return;
|
|
@@ -41618,7 +41833,7 @@ async function readLinux(run4, wsl, readText, fit2) {
|
|
|
41618
41833
|
__name(readLinux, "readLinux");
|
|
41619
41834
|
async function readMac(run4, fit2) {
|
|
41620
41835
|
const dir = await createTempDir("clip-");
|
|
41621
|
-
const file =
|
|
41836
|
+
const file = join4(dir, "clip.png");
|
|
41622
41837
|
try {
|
|
41623
41838
|
const result = await run4(
|
|
41624
41839
|
"osascript",
|
|
@@ -41757,7 +41972,7 @@ import {
|
|
|
41757
41972
|
openSync,
|
|
41758
41973
|
readSync,
|
|
41759
41974
|
realpathSync,
|
|
41760
|
-
statSync as
|
|
41975
|
+
statSync as statSync3
|
|
41761
41976
|
} from "node:fs";
|
|
41762
41977
|
import { resolve as resolve2, sep } from "node:path";
|
|
41763
41978
|
import { StringDecoder } from "node:string_decoder";
|
|
@@ -41770,7 +41985,7 @@ function readMentionFile(cwd2, rel, range, maxChars, budget) {
|
|
|
41770
41985
|
const abs = realpathSync(resolve2(root, rel));
|
|
41771
41986
|
const inside = /* @__PURE__ */ __name((path) => path === root || path.startsWith(root + sep), "inside");
|
|
41772
41987
|
if (!inside(abs)) return null;
|
|
41773
|
-
const before =
|
|
41988
|
+
const before = statSync3(abs);
|
|
41774
41989
|
if (!before.isFile()) return null;
|
|
41775
41990
|
fd = openSync(abs, constants2.O_RDONLY | constants2.O_NOFOLLOW | constants2.O_NONBLOCK);
|
|
41776
41991
|
const opened = fstatSync(fd);
|
|
@@ -50191,9 +50406,9 @@ function editablePrompts(history, transcript) {
|
|
|
50191
50406
|
__name(editablePrompts, "editablePrompts");
|
|
50192
50407
|
|
|
50193
50408
|
// src/tui/external-editor.ts
|
|
50194
|
-
import { spawn as
|
|
50409
|
+
import { spawn as spawn4 } from "node:child_process";
|
|
50195
50410
|
import { lstat, mkdtemp, readFile as readFile4, rm as rm2, writeFile } from "node:fs/promises";
|
|
50196
|
-
import { join as
|
|
50411
|
+
import { join as join5 } from "node:path";
|
|
50197
50412
|
var MAX_EDITED_DRAFT_BYTES = 4 * 1024 * 1024;
|
|
50198
50413
|
var ExternalEditorError = class extends Error {
|
|
50199
50414
|
static {
|
|
@@ -50279,8 +50494,8 @@ __name(resolveExternalEditorCommand, "resolveExternalEditorCommand");
|
|
|
50279
50494
|
async function editDraftInExternalEditor(seed, options) {
|
|
50280
50495
|
options.signal?.throwIfAborted();
|
|
50281
50496
|
const command = resolveExternalEditorCommand(options.env, options.pressed);
|
|
50282
|
-
const directory = options.temporaryRoot === void 0 ? await createTempDir("editor-") : await mkdtemp(
|
|
50283
|
-
const draftPath =
|
|
50497
|
+
const directory = options.temporaryRoot === void 0 ? await createTempDir("editor-") : await mkdtemp(join5(options.temporaryRoot, "namzu-editor-"));
|
|
50498
|
+
const draftPath = join5(directory, "draft.md");
|
|
50284
50499
|
let edited;
|
|
50285
50500
|
let failure;
|
|
50286
50501
|
try {
|
|
@@ -50324,7 +50539,7 @@ async function runEditorProcess(command, draftPath, options) {
|
|
|
50324
50539
|
settled2 = true;
|
|
50325
50540
|
action();
|
|
50326
50541
|
}, "settle");
|
|
50327
|
-
const child =
|
|
50542
|
+
const child = spawn4(executable, [...command.slice(1), draftPath], {
|
|
50328
50543
|
cwd: options.cwd,
|
|
50329
50544
|
env: options.env ? { ...options.env } : process.env,
|
|
50330
50545
|
signal: options.signal,
|
|
@@ -50884,7 +51099,7 @@ var AskQueue = class {
|
|
|
50884
51099
|
};
|
|
50885
51100
|
|
|
50886
51101
|
// src/tui/plugin-view.ts
|
|
50887
|
-
import { join as
|
|
51102
|
+
import { join as join6 } from "node:path";
|
|
50888
51103
|
function pluginOption(plugin) {
|
|
50889
51104
|
return {
|
|
50890
51105
|
label: plugin.name,
|
|
@@ -50927,9 +51142,9 @@ function emptyPluginReport(config, cwd2) {
|
|
|
50927
51142
|
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.";
|
|
50928
51143
|
return [
|
|
50929
51144
|
reason,
|
|
50930
|
-
`Configuration: ${
|
|
50931
|
-
...scopes.includes("project") ? [`Project plugins: ${
|
|
50932
|
-
...scopes.includes("user") ? [`User plugins: ${
|
|
51145
|
+
`Configuration: ${join6(home, "config.yaml")}`,
|
|
51146
|
+
...scopes.includes("project") ? [`Project plugins: ${join6(cwd2, ".namzu", "plugins")}`] : [],
|
|
51147
|
+
...scopes.includes("user") ? [`User plugins: ${join6(home, "plugins")}`] : [],
|
|
50933
51148
|
"Each plugin directory contains plugin.json. Only Namzu plugin manifests are supported.",
|
|
50934
51149
|
"Tools, hooks and MCP servers can execute code. Enable only plugins you trust, then restart Namzu."
|
|
50935
51150
|
].map(choiceDisplayText).join("\n");
|
|
@@ -52363,7 +52578,7 @@ __name(prepareScheduledResume, "prepareScheduledResume");
|
|
|
52363
52578
|
|
|
52364
52579
|
// src/tui/schedule/startup.ts
|
|
52365
52580
|
import { readFileSync as readFileSync6 } from "node:fs";
|
|
52366
|
-
import { join as
|
|
52581
|
+
import { join as join7 } from "node:path";
|
|
52367
52582
|
function ago(ms) {
|
|
52368
52583
|
if (ms < 36e5) return `${Math.max(1, Math.round(ms / 6e4))} min`;
|
|
52369
52584
|
if (ms < 1728e5) return `${Math.round(ms / 36e5)} h`;
|
|
@@ -52445,7 +52660,7 @@ function scheduleStartupLine(home, cwd2, now = Date.now()) {
|
|
|
52445
52660
|
parts.push("The scheduler is installed but has not started \u2014 namzu schedule status");
|
|
52446
52661
|
}
|
|
52447
52662
|
}
|
|
52448
|
-
const suppressed = takeSuppressedCount(
|
|
52663
|
+
const suppressed = takeSuppressedCount(join7(paths.daemon, "notify.json"));
|
|
52449
52664
|
if (suppressed > 0)
|
|
52450
52665
|
parts.push(
|
|
52451
52666
|
`${plural(suppressed, "scheduled notification")} ${suppressed === 1 ? "was" : "were"} held back`
|
|
@@ -53499,12 +53714,12 @@ function setSkillSuggestions(on, opts = {}) {
|
|
|
53499
53714
|
__name(setSkillSuggestions, "setSkillSuggestions");
|
|
53500
53715
|
|
|
53501
53716
|
// src/tui/skills/suggestion-ledger.ts
|
|
53502
|
-
import { mkdirSync as
|
|
53503
|
-
import { dirname, join as
|
|
53717
|
+
import { mkdirSync as mkdirSync3, readFileSync as readFileSync7, renameSync as renameSync2, writeFileSync as writeFileSync2 } from "node:fs";
|
|
53718
|
+
import { dirname, join as join8 } from "node:path";
|
|
53504
53719
|
var SUGGESTION_IGNORE_LIMIT = 3;
|
|
53505
53720
|
var FRESH_LEDGER = { v: 1, unanswered: 0, stopped: false };
|
|
53506
53721
|
function suggestionLedgerPath(namzuHome) {
|
|
53507
|
-
return
|
|
53722
|
+
return join8(namzuHome, "skills", ".suggestions.json");
|
|
53508
53723
|
}
|
|
53509
53724
|
__name(suggestionLedgerPath, "suggestionLedgerPath");
|
|
53510
53725
|
function readSuggestionLedger(namzuHome) {
|
|
@@ -53520,11 +53735,11 @@ __name(readSuggestionLedger, "readSuggestionLedger");
|
|
|
53520
53735
|
function writeSuggestionLedger(namzuHome, ledger) {
|
|
53521
53736
|
const path = suggestionLedgerPath(namzuHome);
|
|
53522
53737
|
try {
|
|
53523
|
-
|
|
53738
|
+
mkdirSync3(dirname(path), { recursive: true });
|
|
53524
53739
|
const temp = `${path}.${process.pid}.tmp`;
|
|
53525
|
-
|
|
53740
|
+
writeFileSync2(temp, `${JSON.stringify(ledger)}
|
|
53526
53741
|
`, { mode: 384 });
|
|
53527
|
-
|
|
53742
|
+
renameSync2(temp, path);
|
|
53528
53743
|
} catch {
|
|
53529
53744
|
}
|
|
53530
53745
|
}
|
|
@@ -55392,13 +55607,13 @@ function buildStatusLinePayload(input) {
|
|
|
55392
55607
|
__name(buildStatusLinePayload, "buildStatusLinePayload");
|
|
55393
55608
|
|
|
55394
55609
|
// src/tui/status-line/run-command.ts
|
|
55395
|
-
import { spawn as
|
|
55610
|
+
import { spawn as spawn5 } from "node:child_process";
|
|
55396
55611
|
var STATUS_LINE_TIMEOUT_MS = 6e5;
|
|
55397
55612
|
var MAX_OUTPUT_BYTES = 64 * 1024;
|
|
55398
55613
|
function runStatusLineCommand(options) {
|
|
55399
55614
|
return new Promise((resolve9) => {
|
|
55400
55615
|
if (options.signal.aborted) return resolve9(void 0);
|
|
55401
|
-
const run4 = options.spawnImpl ??
|
|
55616
|
+
const run4 = options.spawnImpl ?? spawn5;
|
|
55402
55617
|
let child;
|
|
55403
55618
|
try {
|
|
55404
55619
|
child = run4(options.command, {
|
|
@@ -57347,7 +57562,7 @@ ${blocks.join("\n\n")}`;
|
|
|
57347
57562
|
const scope = scopeRef.current;
|
|
57348
57563
|
if (!sessions || !scope || !conversationMaterializedRef.current) return void 0;
|
|
57349
57564
|
try {
|
|
57350
|
-
return
|
|
57565
|
+
return join9(sessions.paths.sessionDir({ sessionId: scope.sessionId }), "loops.json");
|
|
57351
57566
|
} catch {
|
|
57352
57567
|
return void 0;
|
|
57353
57568
|
}
|
|
@@ -59049,7 +59264,7 @@ ${blocks.join("\n\n")}`;
|
|
|
59049
59264
|
[clipboard, pushMessage, setCopyPicker, pushSystem]
|
|
59050
59265
|
);
|
|
59051
59266
|
const sendTerminalNotification = (0, import_react60.useCallback)(
|
|
59052
|
-
(notification) => {
|
|
59267
|
+
(notification, turnMs) => {
|
|
59053
59268
|
if (notification.kind === "approval-required") {
|
|
59054
59269
|
session?.notifyHooks?.({
|
|
59055
59270
|
type: "approval_required",
|
|
@@ -59066,6 +59281,10 @@ ${blocks.join("\n\n")}`;
|
|
|
59066
59281
|
message: notification.outcome === "completed" ? "The turn completed." : notification.outcome === "stopped" ? "The turn stopped and needs attention." : "The turn failed."
|
|
59067
59282
|
});
|
|
59068
59283
|
}
|
|
59284
|
+
playMoment(notification, turnMs, {
|
|
59285
|
+
enabled: ctx.tui?.sound !== false,
|
|
59286
|
+
isTTY: stdout.isTTY
|
|
59287
|
+
});
|
|
59069
59288
|
if (!terminalNotificationEnabled(ctx.tui?.notifications, notification)) return;
|
|
59070
59289
|
const result = writeTerminalNotification(
|
|
59071
59290
|
notification,
|
|
@@ -60393,7 +60612,7 @@ ${blocks.join("\n\n")}`;
|
|
|
60393
60612
|
doctorRunningRef.current = true;
|
|
60394
60613
|
const progressId = pushMessage("system", "Checking\u2026");
|
|
60395
60614
|
try {
|
|
60396
|
-
const { runLiveDoctor } = await import("./live-
|
|
60615
|
+
const { runLiveDoctor } = await import("./live-KP4H5HU6.js");
|
|
60397
60616
|
const { describePlainDoctor } = await import("./plain-report-XVPBQDLE.js");
|
|
60398
60617
|
const report = await runLiveDoctor({
|
|
60399
60618
|
...ctxRef.current.telemetry ? { telemetry: ctxRef.current.telemetry } : {}
|
|
@@ -61528,7 +61747,7 @@ ${plain(err)}`
|
|
|
61528
61747
|
}
|
|
61529
61748
|
const summary2 = buildPermissionSummary(review.text, {
|
|
61530
61749
|
describeUiRef: /* @__PURE__ */ __name((ref) => reviewSessionRef.current?.describeComputerUseRef?.(ref), "describeUiRef"),
|
|
61531
|
-
fileExists: /* @__PURE__ */ __name((path) =>
|
|
61750
|
+
fileExists: /* @__PURE__ */ __name((path) => existsSync3(resolve7(ctxRef.current.cwd, path)), "fileExists"),
|
|
61532
61751
|
readText: /* @__PURE__ */ __name((path) => readReviewedFile(resolve7(ctxRef.current.cwd, path)), "readText"),
|
|
61533
61752
|
workflowLimits: resolveWorkflowLimits(ctxRef.current.workflow),
|
|
61534
61753
|
readWorkflowScript: /* @__PURE__ */ __name((path) => reviewSessionRef.current?.workflows?.readScript(path), "readWorkflowScript"),
|
|
@@ -62989,7 +63208,10 @@ ${jobLines.map(([, line]) => `- ${line}`).join("\n")}`] : []
|
|
|
62989
63208
|
idleCompaction.compactor.turnSettled();
|
|
62990
63209
|
}
|
|
62991
63210
|
if (ownsTurn && !ac.signal.aborted && !goalRound && st.notification && (roundQueueRef.current.items().length === 0 || shouldPauseQueued)) {
|
|
62992
|
-
sendTerminalNotification(
|
|
63211
|
+
sendTerminalNotification(
|
|
63212
|
+
st.notification,
|
|
63213
|
+
st.startedAt !== void 0 ? Date.now() - st.startedAt : void 0
|
|
63214
|
+
);
|
|
62993
63215
|
}
|
|
62994
63216
|
}
|
|
62995
63217
|
unsettledTurnGenerationsRef.current.delete(turnToken);
|
|
@@ -63543,7 +63765,7 @@ ${jobLines.map(([, line]) => `- ${line}`).join("\n")}`] : []
|
|
|
63543
63765
|
}
|
|
63544
63766
|
try {
|
|
63545
63767
|
const sameSignIn = accounts.registry.list("codex").find(
|
|
63546
|
-
(other) => other.source.kind === "codex-home" && readCodexCredentialFile(
|
|
63768
|
+
(other) => other.source.kind === "codex-home" && readCodexCredentialFile(join9(other.source.dir, "auth.json"))?.accountId === result.accountId
|
|
63547
63769
|
);
|
|
63548
63770
|
if (sameSignIn) {
|
|
63549
63771
|
rmSync2(dir, { recursive: true, force: true });
|
|
@@ -67979,12 +68201,12 @@ __name(installFocusReporting, "installFocusReporting");
|
|
|
67979
68201
|
|
|
67980
68202
|
// src/tui/hint-counts.ts
|
|
67981
68203
|
import { randomUUID } from "node:crypto";
|
|
67982
|
-
import { mkdirSync as
|
|
67983
|
-
import { dirname as dirname2, join as
|
|
68204
|
+
import { mkdirSync as mkdirSync4, readFileSync as readFileSync8, renameSync as renameSync3, rmSync as rmSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
68205
|
+
import { dirname as dirname2, join as join10 } from "node:path";
|
|
67984
68206
|
var FILE_MODE = 384;
|
|
67985
68207
|
var DIR_MODE = 448;
|
|
67986
68208
|
function hintCountsPath(home) {
|
|
67987
|
-
return
|
|
68209
|
+
return join10(namzuHomePath(home), "hint-counts.json");
|
|
67988
68210
|
}
|
|
67989
68211
|
__name(hintCountsPath, "hintCountsPath");
|
|
67990
68212
|
function readAll(path) {
|
|
@@ -68009,12 +68231,12 @@ function writeHintCount(name, count2, home) {
|
|
|
68009
68231
|
const path = hintCountsPath(home);
|
|
68010
68232
|
const temp = `${path}.${randomUUID()}.tmp`;
|
|
68011
68233
|
try {
|
|
68012
|
-
|
|
68013
|
-
|
|
68234
|
+
mkdirSync4(dirname2(path), { recursive: true, mode: DIR_MODE });
|
|
68235
|
+
writeFileSync3(temp, `${JSON.stringify({ ...readAll(path), [name]: count2 }, null, 2)}
|
|
68014
68236
|
`, {
|
|
68015
68237
|
mode: FILE_MODE
|
|
68016
68238
|
});
|
|
68017
|
-
|
|
68239
|
+
renameSync3(temp, path);
|
|
68018
68240
|
} catch {
|
|
68019
68241
|
rmSync3(temp, { force: true });
|
|
68020
68242
|
}
|
|
@@ -68148,13 +68370,13 @@ __name(askTerminal, "askTerminal");
|
|
|
68148
68370
|
|
|
68149
68371
|
// src/tui/tip-history.ts
|
|
68150
68372
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
68151
|
-
import { mkdirSync as
|
|
68152
|
-
import { dirname as dirname3, join as
|
|
68373
|
+
import { mkdirSync as mkdirSync5, readFileSync as readFileSync9, renameSync as renameSync4, rmSync as rmSync4, writeFileSync as writeFileSync4 } from "node:fs";
|
|
68374
|
+
import { dirname as dirname3, join as join11 } from "node:path";
|
|
68153
68375
|
var FILE_MODE2 = 384;
|
|
68154
68376
|
var DIR_MODE2 = 448;
|
|
68155
68377
|
var EMPTY_TIP_HISTORY = { launches: 0, shown: {}, used: {} };
|
|
68156
68378
|
function tipHistoryPath(home) {
|
|
68157
|
-
return
|
|
68379
|
+
return join11(namzuHomePath(home), "tip-history.json");
|
|
68158
68380
|
}
|
|
68159
68381
|
__name(tipHistoryPath, "tipHistoryPath");
|
|
68160
68382
|
function wholeNumber(value) {
|
|
@@ -68188,10 +68410,10 @@ __name(readTipHistory, "readTipHistory");
|
|
|
68188
68410
|
function writeTipHistory(path, history) {
|
|
68189
68411
|
const temp = `${path}.${randomUUID2()}.tmp`;
|
|
68190
68412
|
try {
|
|
68191
|
-
|
|
68192
|
-
|
|
68413
|
+
mkdirSync5(dirname3(path), { recursive: true, mode: DIR_MODE2 });
|
|
68414
|
+
writeFileSync4(temp, `${JSON.stringify(history, null, 2)}
|
|
68193
68415
|
`, { mode: FILE_MODE2 });
|
|
68194
|
-
|
|
68416
|
+
renameSync4(temp, path);
|
|
68195
68417
|
} catch {
|
|
68196
68418
|
try {
|
|
68197
68419
|
rmSync4(temp, { force: true });
|
|
@@ -68423,7 +68645,7 @@ async function launchTui(ctx, options = {}) {
|
|
|
68423
68645
|
current: null
|
|
68424
68646
|
};
|
|
68425
68647
|
const workspacesEntry = /* @__PURE__ */ __name(() => {
|
|
68426
|
-
workspaces.current ??= import("./entry-
|
|
68648
|
+
workspaces.current ??= import("./entry-JREDN7MF.js").then(
|
|
68427
68649
|
(m) => m.createWorkspacesEntry({
|
|
68428
68650
|
proxy,
|
|
68429
68651
|
realOut: process.stdout,
|
|
@@ -68613,4 +68835,4 @@ react/cjs/react-jsx-runtime.development.js:
|
|
|
68613
68835
|
* LICENSE file in the root directory of this source tree.
|
|
68614
68836
|
*)
|
|
68615
68837
|
*/
|
|
68616
|
-
//# sourceMappingURL=tui-
|
|
68838
|
+
//# sourceMappingURL=tui-GH3WJKT3.js.map
|