thinkpool-pair 0.7.73 → 0.7.74

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/service.mjs +15 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thinkpool-pair",
3
- "version": "0.7.73",
3
+ "version": "0.7.74",
4
4
  "description": "Share a local coding-agent CLI (Claude Code, Codex, Gemini, Aider, …) into a ThinkPool Code room, live.",
5
5
  "type": "module",
6
6
  "bin": {
package/service.mjs CHANGED
@@ -82,10 +82,21 @@ export function buildArtifact(platform, { room = null, cmdArgs = [], autoUpdate
82
82
  // Modern bootstrap/enable, NOT the deprecated `launchctl load`. On current macOS
83
83
  // (Darwin 24/25) `load` silently no-ops for a GUI LaunchAgent — the plist lands on
84
84
  // disk but never loads, so the bridge is "installed" yet off (the 2026-06-26 bug).
85
- // bootout first (idempotent clean reinstall), enable to clear any stale `disabled`
86
- // override left by a prior bootout (the account-storm cleanup), then bootstrap = load.
87
- const dom = `gui/$(id -u)`
88
- return { file, content, logDir, post: [`launchctl bootout ${dom}/${label(room)} 2>/dev/null; launchctl enable ${dom}/${label(room)}; launchctl bootstrap ${dom} "${file}"`], note: 'Loaded as a LaunchAgent — starts at login, restarts on crash.' }
85
+ // Sequence: bootout any existing instance (idempotent reinstall) → WAIT for it to
86
+ // actually leave the domain (bootout is async; bootstrapping while teardown is in
87
+ // flight throws "Bootstrap failed: 5: Input/output error") → enable (clears a stale
88
+ // `disabled` override from a prior bootout / the account-storm cleanup) → bootstrap,
89
+ // retried on the EIO race → a final `print` so the command's exit code reports the
90
+ // real loaded state (installService warns if it ends not-loaded).
91
+ const lbl = label(room), dom = 'gui/$(id -u)'
92
+ const post = [
93
+ `launchctl bootout ${dom}/${lbl} 2>/dev/null`,
94
+ `for i in $(seq 1 20); do launchctl print ${dom}/${lbl} >/dev/null 2>&1 || break; sleep 0.2; done`,
95
+ `launchctl enable ${dom}/${lbl}`,
96
+ `for i in $(seq 1 20); do launchctl bootstrap ${dom} "${file}" 2>/dev/null && break; sleep 0.3; done`,
97
+ `launchctl print ${dom}/${lbl} >/dev/null 2>&1`,
98
+ ].join('; ')
99
+ return { file, content, logDir, post: [post], note: 'Loaded as a LaunchAgent — starts at login, restarts on crash.' }
89
100
  }
90
101
 
91
102
  if (platform === 'linux') {