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.
- package/package.json +1 -1
- package/service.mjs +15 -4
package/package.json
CHANGED
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
|
|
86
|
-
//
|
|
87
|
-
|
|
88
|
-
|
|
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') {
|