agentgui 1.0.684 → 1.0.686

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.684",
3
+ "version": "1.0.686",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "server.js",
package/static/index.html CHANGED
@@ -3233,13 +3233,19 @@
3233
3233
  </button>
3234
3234
  </div>
3235
3235
  <button class="inject-btn" id="injectBtn" title="Steer or inject into running agent" aria-label="Steer/Inject">
3236
- <svg viewBox="0 0 24 24" fill="currentColor" width="18" height="18">
3237
- <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/>
3236
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="18" height="18">
3237
+ <polyline points="23 4 23 10 17 10"></polyline>
3238
+ <path d="M20.49 15a9 9 0 1 1 .12-14.85"></path>
3238
3239
  </svg>
3239
3240
  </button>
3240
3241
  <button class="queue-btn" id="queueBtn" title="Queue message for running agent" aria-label="Queue message">
3241
- <svg viewBox="0 0 24 24" fill="currentColor" width="18" height="18">
3242
- <path d="M15 13H1v-2h14v2zm0-4H1V7h14v2zM1 19h14v-2H1v2z"/>
3242
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" width="18" height="18">
3243
+ <line x1="8" y1="6" x2="21" y2="6"></line>
3244
+ <line x1="8" y1="12" x2="21" y2="12"></line>
3245
+ <line x1="8" y1="18" x2="21" y2="18"></line>
3246
+ <line x1="3" y1="6" x2="3.01" y2="6"></line>
3247
+ <line x1="3" y1="12" x2="3.01" y2="12"></line>
3248
+ <line x1="3" y1="18" x2="3.01" y2="18"></line>
3243
3249
  </svg>
3244
3250
  </button>
3245
3251
  <button class="stop-btn" id="stopBtn" title="Stop running agent (emergency)" aria-label="Stop agent">
@@ -1,47 +1,2 @@
1
- /**
2
- * Client-side codec mirrors lib/codec.js exactly.
3
- * msgpackr (global from msgpackr.min.js) + GPT tokenizer BPE compression.
4
- */
5
- import { encode as tokEncode, decode as tokDecode } from 'https://esm.sh/gpt-tokenizer';
6
-
7
- const THRESHOLD = 200;
8
- const COMPRESSIBLE = new Set(['content', 'text', 'output', 'response', 'prompt', 'input', 'data']);
9
-
10
- function compressText(str) {
11
- return { __tok: true, d: tokEncode(str) };
12
- }
13
-
14
- function decompressText(val) {
15
- return tokDecode(val.d);
16
- }
17
-
18
- function encodeObj(obj) {
19
- if (!obj || typeof obj !== 'object') return obj;
20
- if (Array.isArray(obj)) return obj.map(encodeObj);
21
- const out = {};
22
- for (const k of Object.keys(obj)) {
23
- const v = obj[k];
24
- if (COMPRESSIBLE.has(k) && typeof v === 'string' && v.length > THRESHOLD) {
25
- out[k] = compressText(v);
26
- } else if (v && typeof v === 'object' && !(v instanceof ArrayBuffer) && !ArrayBuffer.isView(v)) {
27
- out[k] = encodeObj(v);
28
- } else {
29
- out[k] = v;
30
- }
31
- }
32
- return out;
33
- }
34
-
35
- function decodeObj(obj) {
36
- if (!obj || typeof obj !== 'object') return obj;
37
- if (Array.isArray(obj)) return obj.map(decodeObj);
38
- if (obj.__tok && obj.d) return decompressText(obj);
39
- const out = {};
40
- for (const k of Object.keys(obj)) {
41
- out[k] = decodeObj(obj[k]);
42
- }
43
- return out;
44
- }
45
-
46
- export function encode(obj) { return msgpackr.pack(encodeObj(obj)); }
47
- export function decode(buf) { return decodeObj(msgpackr.unpack(new Uint8Array(buf instanceof ArrayBuffer ? buf : buf))); }
1
+ export function encode(obj) { return msgpackr.pack(obj); }
2
+ export function decode(buf) { return msgpackr.unpack(new Uint8Array(buf instanceof ArrayBuffer ? buf : buf)); }