agent-dag 1.33.129 → 1.33.130
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/bin/agent-dag.js +3 -2
- package/bin/deck.js +14 -13
- package/dist/web/assets/index-_807Yt6B.js +66 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/src/server/brand.mjs +16 -0
- package/src/server/ccusage.mjs +4 -3
- package/src/server/codex-auth.mjs +2 -1
- package/src/server/codex-quota.mjs +2 -1
- package/src/server/codex-usage.mjs +2 -1
- package/src/server/cswap-admin.mjs +2 -1
- package/src/server/index.mjs +6 -5
- package/src/server/installer.mjs +2 -1
- package/src/server/quota.mjs +2 -1
- package/dist/web/assets/index-6fcA52jg.js +0 -66
package/bin/agent-dag.js
CHANGED
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
} from "../src/server/self-update.mjs";
|
|
43
43
|
import { dieOfSignal, upgradeAttempt, upgradeRefusalText, workerExitAction } from "../src/server/supervisor.mjs";
|
|
44
44
|
import { colorProfile, glyphs, palette, unicodeOK } from "../src/server/term.mjs";
|
|
45
|
+
import { PRODUCT } from "../src/server/brand.mjs";
|
|
45
46
|
|
|
46
47
|
const BIN_DIR = dirname(fileURLToPath(import.meta.url));
|
|
47
48
|
const WORKER = join(BIN_DIR, "deck.js");
|
|
@@ -152,7 +153,7 @@ function launch(respawn) {
|
|
|
152
153
|
});
|
|
153
154
|
|
|
154
155
|
worker.on("error", (err) => {
|
|
155
|
-
console.error(
|
|
156
|
+
console.error(`${PRODUCT}: could not start ${WORKER}: ${err.message}`);
|
|
156
157
|
process.exit(1);
|
|
157
158
|
});
|
|
158
159
|
}
|
|
@@ -342,7 +343,7 @@ function launchNpx() {
|
|
|
342
343
|
if (stopping || served) return; // the user stopped it, or it ran and ended
|
|
343
344
|
const summary = npxFailureSummary(tail);
|
|
344
345
|
const hint = npxFailureHint(tail);
|
|
345
|
-
console.error(
|
|
346
|
+
console.error(`${PRODUCT}: ${why} — staying on v${VERSION}`);
|
|
346
347
|
if (summary) console.error(` ${summary}`);
|
|
347
348
|
if (hint) console.error(` ${hint}`);
|
|
348
349
|
// Left for the worker about to be launched: it is the only way the browser
|
package/bin/deck.js
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
CURSOR_HIDE, CURSOR_SHOW, colorProfile, fit, glyphs, labelColumn, link, motionOK, palette,
|
|
14
14
|
pulseText, spinnerFrames, statusLine, supportsHyperlinks, termColumns, unicodeOK, wordmark,
|
|
15
15
|
} from "../src/server/term.mjs";
|
|
16
|
+
import { PRODUCT } from "../src/server/brand.mjs";
|
|
16
17
|
|
|
17
18
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
19
|
const PKG_ROOT = resolve(__dirname, "..");
|
|
@@ -42,8 +43,8 @@ if (flags.uninstall) {
|
|
|
42
43
|
const { uninstallHooks, hasCodexInstalled } = await import(pathToFileURL(join(PKG_ROOT, "src/server/installer.mjs")).href);
|
|
43
44
|
const claude = await uninstallHooks({ provider: "claude" });
|
|
44
45
|
console.log(claude.changed
|
|
45
|
-
?
|
|
46
|
-
:
|
|
46
|
+
? `${PRODUCT}: hooks removed from ${claude.settingsPath}`
|
|
47
|
+
: `${PRODUCT}: no Claude hooks to remove`);
|
|
47
48
|
// The sound toggle is a second entry in the same file, marked
|
|
48
49
|
// __agent-dag-sound rather than __agent-dag, and uninstallHooks does not know
|
|
49
50
|
// that mark — so it used to be left behind, playing on every turn after the
|
|
@@ -53,16 +54,16 @@ if (flags.uninstall) {
|
|
|
53
54
|
const { uninstallSoundHook } = await import(pathToFileURL(join(PKG_ROOT, "src/server/sound-hook.mjs")).href);
|
|
54
55
|
const sound = await uninstallSoundHook();
|
|
55
56
|
if (sound.ok === false) {
|
|
56
|
-
console.error(
|
|
57
|
+
console.error(`${PRODUCT}: sound hook left in place — ${sound.message}`);
|
|
57
58
|
} else {
|
|
58
|
-
if (sound.removed) console.log(
|
|
59
|
-
if (sound.restored) console.log(
|
|
59
|
+
if (sound.removed) console.log(`${PRODUCT}: sound hook removed`);
|
|
60
|
+
if (sound.restored) console.log(`${PRODUCT}: restored ${sound.restored} of your own sound hook(s)`);
|
|
60
61
|
}
|
|
61
62
|
if (hasCodexInstalled()) {
|
|
62
63
|
const codex = await uninstallHooks({ provider: "codex" });
|
|
63
64
|
console.log(codex.changed
|
|
64
|
-
?
|
|
65
|
-
:
|
|
65
|
+
? `${PRODUCT}: hooks removed from ${codex.settingsPath}`
|
|
66
|
+
: `${PRODUCT}: no Codex hooks to remove`);
|
|
66
67
|
}
|
|
67
68
|
process.exit(0);
|
|
68
69
|
}
|
|
@@ -102,7 +103,7 @@ const wantCodex = flags.noCodex
|
|
|
102
103
|
|
|
103
104
|
const WEB_DIST = join(PKG_ROOT, "dist", "web", "index.html");
|
|
104
105
|
if (!existsSync(WEB_DIST)) {
|
|
105
|
-
console.error(
|
|
106
|
+
console.error(`${PRODUCT}: ui not built. run \`npm run build\` (or \`pnpm build\`) first.`);
|
|
106
107
|
process.exit(1);
|
|
107
108
|
}
|
|
108
109
|
|
|
@@ -274,7 +275,7 @@ async function reportStartup(jobs) {
|
|
|
274
275
|
// The file it names is one only the user can repair, and every Claude Code
|
|
275
276
|
// session on this machine is reading it too.
|
|
276
277
|
write(row({ mark: G.fail, tone: P.err, label: "Claude hooks", detail: "not installed" }));
|
|
277
|
-
console.error(`\n
|
|
278
|
+
console.error(`\n ${PRODUCT}: ${hooks.err.message}\n`);
|
|
278
279
|
process.exit(1);
|
|
279
280
|
}
|
|
280
281
|
write(row({ mark: G.ok, label: "Claude hooks", detail: fileLink(hooks.v.hookPath) }));
|
|
@@ -428,7 +429,7 @@ const starting = startServer({
|
|
|
428
429
|
const server = await (RESPAWN ? starting : step(`starting server${G.ellipsis}`, starting)).catch(err => {
|
|
429
430
|
// stderr, not a row: a deck that could not bind is not a status line, and
|
|
430
431
|
// whatever launched it reads this stream.
|
|
431
|
-
console.error(
|
|
432
|
+
console.error(`${PRODUCT}: server failed: ${err.message}`);
|
|
432
433
|
process.exit(1);
|
|
433
434
|
});
|
|
434
435
|
const addr = server.address();
|
|
@@ -584,10 +585,10 @@ function parseArgs(args) {
|
|
|
584
585
|
}
|
|
585
586
|
|
|
586
587
|
function printHelp() {
|
|
587
|
-
process.stdout.write(
|
|
588
|
+
process.stdout.write(`${PRODUCT} — live deck of Claude Code + Codex agents
|
|
588
589
|
|
|
589
590
|
Usage:
|
|
590
|
-
|
|
591
|
+
${PRODUCT} [options]
|
|
591
592
|
|
|
592
593
|
Options:
|
|
593
594
|
-p, --port <number> Preferred port (default: 4317; falls back to random 4318–4400)
|
|
@@ -599,7 +600,7 @@ Options:
|
|
|
599
600
|
--no-persist Don't write or replay events log (RAM-only)
|
|
600
601
|
--codex Force-enable Codex capture even if ~/.codex/ missing
|
|
601
602
|
--no-codex Skip Codex capture (Claude only)
|
|
602
|
-
--uninstall Remove
|
|
603
|
+
--uninstall Remove ${PRODUCT}'s hooks from ~/.claude/settings.json and
|
|
603
604
|
~/.codex/hooks.json, and restore any sound hooks of yours it parked
|
|
604
605
|
-h, --help Show this help
|
|
605
606
|
`);
|