@axiomatic-labs/claudeflow 2.26.24 → 2.26.26
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/lib/install.js +5 -73
- package/package.json +1 -1
package/lib/install.js
CHANGED
|
@@ -257,11 +257,11 @@ async function run() {
|
|
|
257
257
|
fs.rmSync(tmpExtract, { recursive: true, force: true });
|
|
258
258
|
}
|
|
259
259
|
|
|
260
|
-
//
|
|
261
|
-
//
|
|
262
|
-
//
|
|
263
|
-
//
|
|
264
|
-
|
|
260
|
+
// install does NOT touch running processes — it only writes template files.
|
|
261
|
+
// The observer daemon / dev servers are never killed here; a fresh daemon
|
|
262
|
+
// with the updated runtime code is picked up on the next session, or via the
|
|
263
|
+
// /claudeflow-observer-reset skill. Killing the daemon on update used to cascade
|
|
264
|
+
// into tearing down the user's dev servers, so update stays purely a file copy.
|
|
265
265
|
|
|
266
266
|
// Install analysis tools (ast-grep + Serena MCP)
|
|
267
267
|
installAnalysisTools();
|
|
@@ -347,74 +347,6 @@ async function run() {
|
|
|
347
347
|
showGettingStarted(cwd, cliStatus);
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
function killStaleObserverDaemon(cwd) {
|
|
351
|
-
const pidPath = path.join(cwd, '.claudeflow', 'tmp', 'error-observer.pid');
|
|
352
|
-
if (!fs.existsSync(pidPath)) return;
|
|
353
|
-
let pid;
|
|
354
|
-
try {
|
|
355
|
-
pid = Number(fs.readFileSync(pidPath, 'utf8').trim());
|
|
356
|
-
} catch {
|
|
357
|
-
return;
|
|
358
|
-
}
|
|
359
|
-
if (!Number.isFinite(pid) || pid <= 1) return;
|
|
360
|
-
try {
|
|
361
|
-
// signal 0 = "is this PID alive and ours to signal?"
|
|
362
|
-
process.kill(pid, 0);
|
|
363
|
-
} catch {
|
|
364
|
-
// Not running or not ours. Clean up the stale pidfile and move on.
|
|
365
|
-
try { fs.unlinkSync(pidPath); } catch {}
|
|
366
|
-
return;
|
|
367
|
-
}
|
|
368
|
-
try {
|
|
369
|
-
process.kill(pid, 'SIGTERM');
|
|
370
|
-
ui.success(`Stopped running observer daemon (pid ${pid}) so the update takes effect`);
|
|
371
|
-
} catch {
|
|
372
|
-
// Swallow — non-fatal. The user can restart manually if needed.
|
|
373
|
-
}
|
|
374
|
-
try { fs.unlinkSync(pidPath); } catch {}
|
|
375
|
-
|
|
376
|
-
killStaleBrowserBridge(cwd);
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
// Clean stale Chrome launch lockfiles after an update. The bridge process
|
|
380
|
-
// itself is ephemeral (inject-and-exit), but `.browser-cdp-<port>.pid` is a
|
|
381
|
-
// "have we already launched Chrome this session" lock used by
|
|
382
|
-
// UserPromptSubmit. If Chrome died but the lockfile survived (crash, kill,
|
|
383
|
-
// stale session), the next UserPromptSubmit sees the lock, decides Chrome
|
|
384
|
-
// is already running, skips the launch — and the bridge never runs again,
|
|
385
|
-
// so injected scripts in any surviving tabs keep posting to the old daemon
|
|
386
|
-
// (which we just killed) until manual recovery.
|
|
387
|
-
function killStaleBrowserBridge(cwd) {
|
|
388
|
-
const tmpDir = path.join(cwd, '.claudeflow', 'tmp');
|
|
389
|
-
let entries;
|
|
390
|
-
try {
|
|
391
|
-
entries = fs.readdirSync(tmpDir);
|
|
392
|
-
} catch {
|
|
393
|
-
return;
|
|
394
|
-
}
|
|
395
|
-
const cleaned = [];
|
|
396
|
-
for (const name of entries) {
|
|
397
|
-
if (!/^\.browser-cdp-\d+\.pid$/.test(name)) continue;
|
|
398
|
-
const full = path.join(tmpDir, name);
|
|
399
|
-
let pid;
|
|
400
|
-
try {
|
|
401
|
-
pid = Number(fs.readFileSync(full, 'utf8').trim());
|
|
402
|
-
} catch {
|
|
403
|
-
continue;
|
|
404
|
-
}
|
|
405
|
-
let alive = false;
|
|
406
|
-
if (Number.isFinite(pid) && pid > 1) {
|
|
407
|
-
try { process.kill(pid, 0); alive = true; } catch {}
|
|
408
|
-
}
|
|
409
|
-
if (!alive) {
|
|
410
|
-
try { fs.unlinkSync(full); cleaned.push(name); } catch {}
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
if (cleaned.length > 0) {
|
|
414
|
-
ui.success(`Removed ${cleaned.length} stale Chrome lockfile(s) — next prompt will relaunch the bridge cleanly`);
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
350
|
function ensureGlobalCli(version) {
|
|
419
351
|
// Returns { available: boolean, autoInstalled: boolean, upgraded: boolean, fromVersion?: string, error?: string }
|
|
420
352
|
// `commandExists('claudeflow')` yields a false positive when install.js runs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiomatic-labs/claudeflow",
|
|
3
|
-
"version": "2.26.
|
|
3
|
+
"version": "2.26.26",
|
|
4
4
|
"description": "Claudeflow — AI-powered development toolkit for Claude Code. Skills, agents, hooks, and quality gates that ship production apps.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claudeflow": "./bin/cli.js"
|