agentgui 1.0.658 → 1.0.659

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.658",
3
+ "version": "1.0.659",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
@@ -78,12 +78,14 @@ class WsClient {
78
78
 
79
79
  window.WsClient = WsClient;
80
80
 
81
- // Bootstrap: load codec (which pulls gpt-tokenizer from esm.sh), then connect
81
+ // Bootstrap: create wsManager and wsClient synchronously so other modules can use them immediately.
82
+ // Codec is loaded async and upgrades encoding once ready; websocket-manager falls back to msgpackr until then.
83
+ window.wsManager = new WebSocketManager();
84
+ window.wsClient = new WsClient(window.wsManager);
85
+ window.wsManager.connect().catch(function() {});
86
+
82
87
  import('./codec.js').then(codec => {
83
88
  window._codec = codec;
84
- window.wsManager = new WebSocketManager();
85
- window.wsClient = new WsClient(window.wsManager);
86
- window.wsManager.connect().catch(function() {});
87
89
  }).catch(e => {
88
- console.error('[ws-client] Failed to load codec:', e);
90
+ console.error('[ws-client] Failed to load codec, using msgpackr fallback:', e);
89
91
  });