helixevo 0.2.20 → 0.2.21

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.
@@ -57,47 +57,28 @@ export function UpdateBanner({ currentVersion }: { currentVersion: string }) {
57
57
  setState('success')
58
58
  setNewVersion(data.version)
59
59
 
60
- // Step 1: Tell server to restart (exits with code 75)
61
- setTimeout(async () => {
62
- try {
63
- await fetch('/api/restart', { method: 'POST' })
64
- } catch {}
60
+ // Tell server to restart, then wait and reload
61
+ try {
62
+ await fetch('/api/restart', { method: 'POST' })
63
+ } catch {}
65
64
 
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
- }
65
+ // Wait for: shutdown (2s) + port release (2s) + restart + compile (~8s)
66
+ // Then try to reload, retrying if server isn't ready
67
+ await new Promise(r => setTimeout(r, 6000))
78
68
 
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))
85
- try {
86
- const res = await fetch('/?_t=' + Date.now(), {
87
- cache: 'no-store',
88
- signal: AbortSignal.timeout(2000),
89
- })
90
- if (res.ok) {
91
- // Step 4: Hard reload with cache busting
92
- window.location.href = window.location.pathname + '?updated=' + Date.now()
93
- return
94
- }
95
- } catch {}
96
- }
69
+ for (let attempt = 0; attempt < 20; attempt++) {
70
+ try {
71
+ const check = await fetch('/?_bust=' + Date.now(), { cache: 'no-store' })
72
+ if (check.ok) {
73
+ window.location.href = window.location.pathname + '?updated=' + Date.now()
74
+ return
75
+ }
76
+ } catch {}
77
+ await new Promise(r => setTimeout(r, 2000))
78
+ }
97
79
 
98
- // Fallback: force reload anyway
99
- window.location.href = window.location.pathname + '?updated=' + Date.now()
100
- }, 1500)
80
+ // Final fallback
81
+ window.location.href = window.location.pathname + '?updated=' + Date.now()
101
82
  } else {
102
83
  setState('error')
103
84
  setErrorMsg(data.error ?? 'Update failed')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "helixevo",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
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": {