@kortix/sandbox 0.4.6 → 0.4.9

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.
@@ -28,7 +28,7 @@ app.get('/kortix/health', async (c) => {
28
28
  version = data.version || '0.0.0'
29
29
  }
30
30
  } catch {}
31
- return c.json({ status: 'ok', version, build: '0.4.6-ota-verified' })
31
+ return c.json({ status: 'ok', version, build: '0.4.9-ota-verified' })
32
32
  })
33
33
 
34
34
  // Update check — /kortix/update and /kortix/update/status
@@ -9,13 +9,15 @@ const VERSION_FILE = '/opt/kortix/.version';
9
9
  * - opencode first (depends on /opt/opencode/)
10
10
  * - then other services
11
11
  * - kortix-master LAST (deferred — it's us)
12
+ *
13
+ * Names must match s6-rc.d service directories (svc-* prefix).
12
14
  */
13
15
  const SERVICES_TO_RESTART = [
14
- 'opencode-serve',
15
- 'opencode-web',
16
- 'lss-sync',
17
- 'agent-browser-viewer',
18
- 'KORTIX-presentation-viewer',
16
+ 'svc-opencode-serve',
17
+ 'svc-opencode-web',
18
+ 'svc-lss-sync',
19
+ 'svc-agent-browser-viewer',
20
+ 'svc-presentation-viewer',
19
21
  ];
20
22
 
21
23
  // ─── State ──────────────────────────────────────────────────────────────────
@@ -56,7 +58,9 @@ async function run(cmd: string): Promise<{ ok: boolean; output: string }> {
56
58
  }
57
59
 
58
60
  async function restartService(name: string): Promise<void> {
59
- await run(`s6-svc -r /var/run/s6/services/${name} 2>/dev/null || s6-svc -r /etc/services.d/${name} 2>/dev/null || true`);
61
+ // s6-overlay v3: services live under /run/service/{name}
62
+ // Fallback to legacy paths for compatibility
63
+ await run(`s6-svc -r /run/service/${name} 2>/dev/null || s6-svc -r /var/run/s6-rc/servicedirs/${name} 2>/dev/null || s6-svc -r /var/run/s6/services/${name} 2>/dev/null || true`);
60
64
  }
61
65
 
62
66
  async function performUpdate(targetVersion: string): Promise<{
@@ -81,7 +85,7 @@ async function performUpdate(targetVersion: string): Promise<{
81
85
 
82
86
  // Self-restart deferred so the HTTP response completes
83
87
  console.log('[Update] Scheduling kortix-master restart in 2s...');
84
- setTimeout(() => restartService('kortix-master'), 2000);
88
+ setTimeout(() => restartService('svc-kortix-master'), 2000);
85
89
 
86
90
  return { success: true, output: result.output.slice(0, 1000) };
87
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kortix/sandbox",
3
- "version": "0.4.6",
3
+ "version": "0.4.9",
4
4
  "description": "Kortix sandbox runtime — kortix-master, opencode config/agents/skills, and dependencies",
5
5
  "private": false,
6
6
  "scripts": {
package/postinstall.sh CHANGED
@@ -18,6 +18,12 @@ fi
18
18
 
19
19
  echo "[sandbox-postinstall] Deploying @kortix/sandbox files..."
20
20
 
21
+ # Ensure rsync is available (Alpine base may not have it after cleanup)
22
+ if ! command -v rsync &>/dev/null; then
23
+ echo "[sandbox-postinstall] Installing rsync..."
24
+ apk add --no-cache rsync 2>/dev/null || true
25
+ fi
26
+
21
27
  # ── Kortix Master ────────────────────────────────────────────────────────────
22
28
  echo "[sandbox-postinstall] Updating kortix-master..."
23
29
  mkdir -p /opt/kortix-master