agent-dag 1.32.2 → 1.33.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/README.md +21 -0
- package/dist/web/assets/index-BKz-oUzX.js +66 -0
- package/dist/web/assets/{index-CAnz1LW4.css → index-hRjhJVfb.css} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/src/server/cswap-admin.mjs +502 -0
- package/src/server/exec.mjs +103 -0
- package/src/server/index.mjs +44 -0
- package/src/server/self-update.mjs +17 -6
- package/dist/web/assets/index-C0PC3b6r.js +0 -66
|
@@ -83,9 +83,13 @@ export function isGitCheckout(pkgRoot) {
|
|
|
83
83
|
try { return existsSync(join(pkgRoot, ".git")); } catch { return false; }
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
/** The exact line the user can paste. */
|
|
86
|
+
/** The exact line the user can paste, for the way THIS copy was installed. */
|
|
87
87
|
export function upgradeCommand(pkgRoot, name = "agents-deck") {
|
|
88
|
-
|
|
88
|
+
// A checkout is updated by pulling, and the bundle is built, not shipped —
|
|
89
|
+
// so `npm run build` is part of the answer rather than an afterthought.
|
|
90
|
+
if (isGitCheckout(pkgRoot)) return "git pull && npm run build";
|
|
91
|
+
if (isNpxInstall(pkgRoot)) return `npx -y ${name}@latest`;
|
|
92
|
+
return `npm i -g ${name}@latest`;
|
|
89
93
|
}
|
|
90
94
|
|
|
91
95
|
// ── what npm has ─────────────────────────────────────────────────────────────
|
|
@@ -278,12 +282,19 @@ export function lastMeaningfulLine(text) {
|
|
|
278
282
|
* registry is unreachable. */
|
|
279
283
|
export async function versionReport({ running, pkgRoot, name = "agents-deck", now = Date.now() }) {
|
|
280
284
|
const installed = installedVersion(pkgRoot);
|
|
281
|
-
//
|
|
282
|
-
//
|
|
285
|
+
// Only an explicit opt-out silences the registry.
|
|
286
|
+
//
|
|
287
|
+
// A checkout used to be excluded here too, on the reasoning that its version
|
|
288
|
+
// leads npm's. That reasoning holds for the COMMAND — telling someone to
|
|
289
|
+
// `npm i -g` over their working copy is wrong — but not for the question.
|
|
290
|
+
// Knowing a release shipped is useful however you would install it, and
|
|
291
|
+
// suppressing the lookup meant `latest` was always null, so the upgrade
|
|
292
|
+
// notice could never appear and the "this is a checkout" explanation had
|
|
293
|
+
// nowhere to render. A checkout that is ahead of npm still says nothing:
|
|
294
|
+
// isOlder decides that, not this.
|
|
283
295
|
const skipRegistry =
|
|
284
296
|
process.env.AGENTS_DECK_NO_UPDATE_CHECK === "1" ||
|
|
285
|
-
process.env.AGENTS_DECK_NO_INSTALL === "1"
|
|
286
|
-
isGitCheckout(pkgRoot);
|
|
297
|
+
process.env.AGENTS_DECK_NO_INSTALL === "1";
|
|
287
298
|
const latest = skipRegistry ? null : await latestOnNpm(name, now);
|
|
288
299
|
return {
|
|
289
300
|
name,
|