helixevo 0.2.16 → 0.2.17

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.
@@ -56,23 +56,47 @@ export function UpdateBanner({ currentVersion }: { currentVersion: string }) {
56
56
  if (data.success) {
57
57
  setState('success')
58
58
  setNewVersion(data.version)
59
- // Trigger dashboard restart — the CLI will auto-relaunch
59
+
60
+ // Step 1: Tell server to restart (exits with code 75)
60
61
  setTimeout(async () => {
61
62
  try {
62
63
  await fetch('/api/restart', { method: 'POST' })
63
64
  } catch {}
64
- // Poll until the new server is ready, then reload
65
- const poll = setInterval(async () => {
65
+
66
+ // Step 2: Wait for old server to go DOWN (fetch should fail)
67
+ let serverDown = false
68
+ for (let i = 0; i < 20; i++) {
69
+ await new Promise(r => setTimeout(r, 1000))
70
+ try {
71
+ await fetch('/api/restart', { method: 'GET', signal: AbortSignal.timeout(1000) })
72
+ // Still up — keep waiting
73
+ } catch {
74
+ serverDown = true
75
+ break
76
+ }
77
+ }
78
+
79
+ // Step 3: Wait for new server to come UP
80
+ if (serverDown) {
81
+ await new Promise(r => setTimeout(r, 2000)) // give it time to start
82
+ }
83
+ for (let i = 0; i < 40; i++) {
84
+ await new Promise(r => setTimeout(r, 1500))
66
85
  try {
67
- const res = await fetch('/', { cache: 'no-store' })
86
+ const res = await fetch('/?_t=' + Date.now(), {
87
+ cache: 'no-store',
88
+ signal: AbortSignal.timeout(2000),
89
+ })
68
90
  if (res.ok) {
69
- clearInterval(poll)
70
- window.location.reload()
91
+ // Step 4: Hard reload with cache busting
92
+ window.location.href = window.location.pathname + '?updated=' + Date.now()
93
+ return
71
94
  }
72
95
  } catch {}
73
- }, 1500)
74
- // Stop polling after 60s
75
- setTimeout(() => clearInterval(poll), 60000)
96
+ }
97
+
98
+ // Fallback: force reload anyway
99
+ window.location.href = window.location.pathname + '?updated=' + Date.now()
76
100
  }, 1500)
77
101
  } else {
78
102
  setState('error')
package/dist/cli.js CHANGED
@@ -12405,15 +12405,22 @@ function launchDashboard(dir, openBrowser) {
12405
12405
  console.log(`
12406
12406
  \uD83D\uDD04 Restarting dashboard after update...
12407
12407
  `);
12408
- const newDir = prepareDashboard() ?? dir;
12409
- ensureSkillGraph();
12410
- let updatedVersion = currentVersion;
12411
- try {
12412
- updatedVersion = execSync2("helixevo --version 2>/dev/null", { encoding: "utf-8" }).trim() || currentVersion;
12413
- } catch {}
12414
- console.log(` \uD83C\uDF10 HelixEvo Dashboard v${updatedVersion} at http://localhost:3847
12408
+ setTimeout(() => {
12409
+ const nextCache = join15(dir, ".next");
12410
+ if (existsSync10(nextCache)) {
12411
+ try {
12412
+ rmSync2(nextCache, { recursive: true });
12413
+ } catch {}
12414
+ }
12415
+ ensureSkillGraph();
12416
+ let updatedVersion = currentVersion;
12417
+ try {
12418
+ updatedVersion = execSync2("helixevo --version 2>/dev/null", { encoding: "utf-8" }).trim() || currentVersion;
12419
+ } catch {}
12420
+ console.log(` \uD83C\uDF10 HelixEvo Dashboard v${updatedVersion} at http://localhost:3847
12415
12421
  `);
12416
- launchDashboard(newDir, false);
12422
+ launchDashboard(dir, false);
12423
+ }, 2000);
12417
12424
  } else {
12418
12425
  process.exit(code ?? 0);
12419
12426
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "helixevo",
3
- "version": "0.2.16",
3
+ "version": "0.2.17",
4
4
  "description": "Self-evolving skill ecosystem for AI agents. Skills and projects co-evolve through multi-judge evaluation and a Pareto frontier.",
5
5
  "type": "module",
6
6
  "bin": {