agent-dag 1.24.0 → 1.26.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/bin/agent-dag.js +34 -0
- package/dist/web/assets/index-CufegSZ-.js +64 -0
- package/dist/web/assets/index-uyBGpPqo.css +1 -0
- package/dist/web/index.html +2 -2
- package/hook/notify.js +60 -0
- package/package.json +1 -1
- package/src/server/ccusage.mjs +41 -6
- package/src/server/claude-accounts.mjs +220 -0
- package/src/server/cswap-auto.mjs +237 -0
- package/src/server/cswap-install.mjs +160 -0
- package/src/server/index.mjs +107 -0
- package/src/server/sound-hook.mjs +115 -0
- package/dist/web/assets/index-Dw00LH5N.js +0 -62
- package/dist/web/assets/index-m6XPuIrx.css +0 -1
package/bin/agent-dag.js
CHANGED
|
@@ -149,6 +149,40 @@ if (wantCodex) {
|
|
|
149
149
|
process.stdout.write(` ${C.dim}Codex watch skipped (no ~/.codex/, or --no-codex)${C.reset}\n`);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
+
// claude-swap backs the multi-account panel. Installing it touches the user's
|
|
153
|
+
// global tool path, so unlike the ccusage install this one announces itself.
|
|
154
|
+
{
|
|
155
|
+
const { ensureCswap } = await import(pathToFileURL(join(PKG_ROOT, "src/server/cswap-install.mjs")).href);
|
|
156
|
+
const csp = spinner("checking claude-swap…");
|
|
157
|
+
const cs = await ensureCswap();
|
|
158
|
+
if (cs.state === "present") {
|
|
159
|
+
csp.stop(true, `claude-swap ${C.dim}→ v${cs.version} (accounts panel enabled)${C.reset}`);
|
|
160
|
+
} else if (cs.state === "installed") {
|
|
161
|
+
csp.stop(true, `claude-swap ${C.dim}→ installed v${cs.version} via ${cs.via}${C.reset}`);
|
|
162
|
+
} else if (cs.state === "upgrading") {
|
|
163
|
+
csp.stop(true, `claude-swap ${C.dim}→ v${cs.version}, upgrading to v${cs.latest} in background${C.reset}`);
|
|
164
|
+
} else if (cs.state === "skipped") {
|
|
165
|
+
csp.stop(true, `claude-swap ${C.dim}not installed (AGENTS_DECK_NO_INSTALL=1)${C.reset}`);
|
|
166
|
+
} else {
|
|
167
|
+
const how = cs.reason === "no_installer"
|
|
168
|
+
? "needs uv or pipx — see https://github.com/realiti4/claude-swap"
|
|
169
|
+
: cs.reason === "not_on_path"
|
|
170
|
+
? `installed via ${cs.via} but not on PATH — add ~/.local/bin`
|
|
171
|
+
: `install failed via ${cs.via}`;
|
|
172
|
+
csp.stop(false, `claude-swap ${C.dim}${how}${C.reset}`);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// ccusage backs the usage-history modal. Primed here rather than on first
|
|
177
|
+
// open so a cold machine pays the install while the deck is still booting.
|
|
178
|
+
if (process.env.AGENTS_DECK_NO_INSTALL !== "1") {
|
|
179
|
+
const { primeCcusage } = await import(pathToFileURL(join(PKG_ROOT, "src/server/ccusage.mjs")).href);
|
|
180
|
+
const cu = primeCcusage();
|
|
181
|
+
if (cu.state === "present") process.stdout.write(` ${C.green}✓${C.reset} ccusage ${C.dim}→ v${cu.version}${C.reset}\n`);
|
|
182
|
+
else if (cu.state === "updating") process.stdout.write(` ${C.green}✓${C.reset} ccusage ${C.dim}→ v${cu.version}, checking for update${C.reset}\n`);
|
|
183
|
+
else if (cu.state === "installing") process.stdout.write(` ${C.green}✓${C.reset} ccusage ${C.dim}installing in background${C.reset}\n`);
|
|
184
|
+
}
|
|
185
|
+
|
|
152
186
|
sp = spinner("starting server…");
|
|
153
187
|
const server = await startServer({ port, persist, workspace, codex: wantCodex }).catch(err => {
|
|
154
188
|
sp.stop(false, `server failed: ${err.message}`);
|