agentgui 1.0.925 → 1.0.926

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/AGENTS.md +18 -0
  2. package/package.json +1 -1
package/AGENTS.md CHANGED
@@ -86,3 +86,21 @@ The function previously returned "Model: X." when agentId was 'claude-code' and
86
86
  **WebSocket `/sync` endpoint — message ordering requires registering handler BEFORE sending.**
87
87
 
88
88
  Server sends `sync_connected` with `clientId` on connect. Legacy handler (`lib/ws-legacy-handlers.js`) handles `ping→pong`, `subscribe→subscription_confirmed`, `get_subscriptions→subscriptions`, `unsubscribe`, `latency_report`. All responses use codec encode/decode (`lib/codec.js`). Pattern: queue outbound messages and use a waiters array + sequential promises to avoid race between send and handler registration. Test structure: `const queued = []; let waiting; ws.on('message', ...); queued.forEach(msg => ws.send(msg)); waiting.resolve(...)` ensures the handler is live before messages flow.
89
+
90
+ ## better-sqlite3 & Node v24 Startup (2026-05-03)
91
+
92
+ **Node v24 has no prebuilt binary for better-sqlite3 (module version 137); npm rebuild silently fails.**
93
+
94
+ When npm install runs on Node v24, the postinstall hook for better-sqlite3 silently fails because no prebuilt `.node` binary exists for that module version. The server then fails to require better-sqlite3 and crashes. npm rebuild also silently fails.
95
+
96
+ Fix: compile from source in postinstall:
97
+ ```json
98
+ "postinstall": "node scripts/patch-fsbrowse.js && node scripts/copy-vendor.js && (cd node_modules/better-sqlite3 && node-gyp rebuild 2>/dev/null) || true"
99
+ ```
100
+
101
+ Paired changes:
102
+ - `package.json` `start` script: `"bun server.js || node server.js"` (prefer bun, fall back to node)
103
+ - `bin/gmgui.cjs` runtime detection: `spawnSync('bun', ['--version'], { shell: true })` to auto-detect bun availability, fallback to node (lines 46-47)
104
+ - better-sqlite3 bumped ^12.6.2 → ^12.9.0
105
+
106
+ bun start was already working (bun has native sqlite support via `bun:sqlite`). The node path was broken due to the missing native binding. Only compile from source fixes the node path.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.925",
3
+ "version": "1.0.926",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",