agentgui 1.0.74 → 1.0.76

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/lib/machines.ts CHANGED
@@ -188,406 +188,3 @@ export const conversationSyncMachine = createMachine(
188
188
  }
189
189
  );
190
190
 
191
- // ============================================================================
192
- // MESSAGE SYNC STATE MACHINE
193
- // ============================================================================
194
-
195
- export const messageSyncMachine = createMachine(
196
- {
197
- id: 'messageSync',
198
- initial: 'idle',
199
- context: {
200
- conversationId: undefined,
201
- messageId: undefined,
202
- lastError: undefined,
203
- retryCount: 0,
204
- syncData: {},
205
- },
206
- states: {
207
- idle: {
208
- on: {
209
- CREATE_MESSAGE: 'creating',
210
- LOAD_MESSAGES: 'loading',
211
- OFFLINE: 'offline',
212
- },
213
- },
214
-
215
- creating: {
216
- on: {
217
- CREATE_SUCCESS: {
218
- target: 'created',
219
- actions: assign({
220
- messageId: (context, event: any) => event.messageId,
221
- }),
222
- },
223
- CREATE_ERROR: {
224
- target: 'error',
225
- actions: assign({
226
- lastError: (context, event: any) => event.error,
227
- }),
228
- },
229
- OFFLINE: 'offline',
230
- },
231
- after: {
232
- 10000: { // 10 second timeout
233
- target: 'error',
234
- actions: assign({
235
- lastError: new Error('Message creation timeout (10s)'),
236
- }),
237
- },
238
- },
239
- },
240
-
241
- created: {
242
- on: {
243
- SYNC_RESPONSE: 'synced',
244
- SYNC_ERROR: 'error',
245
- CREATE_ANOTHER: 'creating',
246
- OFFLINE: 'offline',
247
- },
248
- },
249
-
250
- loading: {
251
- on: {
252
- LOAD_SUCCESS: {
253
- target: 'synced',
254
- actions: assign({
255
- syncData: (context, event: any) => event.data,
256
- }),
257
- },
258
- LOAD_ERROR: 'error',
259
- OFFLINE: 'offline',
260
- },
261
- after: {
262
- 15000: { // 15 second timeout
263
- target: 'error',
264
- actions: assign({
265
- lastError: new Error('Message load timeout (15s)'),
266
- }),
267
- },
268
- },
269
- },
270
-
271
- synced: {
272
- on: {
273
- NEW_MESSAGE: 'creating',
274
- LOAD_MORE: 'loading',
275
- OFFLINE: 'offline',
276
- },
277
- },
278
-
279
- error: {
280
- on: {
281
- RETRY: {
282
- target: 'loading',
283
- cond: (context) => context.retryCount < 3,
284
- actions: assign({
285
- retryCount: (context) => context.retryCount + 1,
286
- }),
287
- },
288
- RESET: 'idle',
289
- OFFLINE: 'offline',
290
- },
291
- },
292
-
293
- offline: {
294
- on: {
295
- ONLINE: 'idle',
296
- RESET: 'idle',
297
- },
298
- },
299
- },
300
- },
301
- {
302
- actions: {
303
- logCreated: (context, event) => {
304
- console.log(`[MessageSync] Message created: ${(event as any).messageId}`);
305
- },
306
- },
307
- }
308
- );
309
-
310
- // ============================================================================
311
- // CONVERSATION LIST STATE MACHINE
312
- // ============================================================================
313
-
314
- export const conversationListMachine = createMachine(
315
- {
316
- id: 'conversationList',
317
- initial: 'uninitialized',
318
- context: {
319
- conversationId: undefined,
320
- messageId: undefined,
321
- lastError: undefined,
322
- retryCount: 0,
323
- syncData: {},
324
- },
325
- states: {
326
- uninitialized: {
327
- on: {
328
- INITIALIZE: 'loading',
329
- },
330
- },
331
-
332
- loading: {
333
- on: {
334
- LOAD_SUCCESS: {
335
- target: 'ready',
336
- actions: assign({
337
- syncData: (context, event: any) => event.data,
338
- retryCount: 0,
339
- }),
340
- },
341
- LOAD_ERROR: {
342
- target: 'error',
343
- actions: assign({
344
- lastError: (context, event: any) => event.error,
345
- retryCount: (context) => context.retryCount + 1,
346
- }),
347
- },
348
- },
349
- after: {
350
- 20000: {
351
- target: 'error',
352
- actions: assign({
353
- lastError: new Error('Load timeout (20s)'),
354
- }),
355
- },
356
- },
357
- },
358
-
359
- ready: {
360
- on: {
361
- REFRESH: 'loading',
362
- CONVERSATION_ADDED: {
363
- target: 'ready',
364
- actions: assign({
365
- syncData: (context, event: any) => ({
366
- ...context.syncData,
367
- conversations: [...(context.syncData?.conversations || []), event.conversation],
368
- }),
369
- }),
370
- },
371
- CONVERSATION_REMOVED: {
372
- target: 'ready',
373
- actions: assign({
374
- syncData: (context, event: any) => ({
375
- ...context.syncData,
376
- conversations: (context.syncData?.conversations || []).filter(
377
- (c: any) => c.id !== event.conversationId
378
- ),
379
- }),
380
- }),
381
- },
382
- OFFLINE: 'offline',
383
- },
384
- },
385
-
386
- error: {
387
- on: {
388
- RETRY: {
389
- target: 'loading',
390
- cond: (context) => context.retryCount < 3,
391
- },
392
- RESET: 'uninitialized',
393
- OFFLINE: 'offline',
394
- },
395
- },
396
-
397
- offline: {
398
- on: {
399
- ONLINE: 'ready',
400
- RESET: 'uninitialized',
401
- },
402
- },
403
- },
404
- }
405
- );
406
-
407
- // ============================================================================
408
- // OFFLINE QUEUE STATE MACHINE
409
- // ============================================================================
410
-
411
- export const offlineQueueMachine = createMachine(
412
- {
413
- id: 'offlineQueue',
414
- initial: 'idle',
415
- context: {
416
- conversationId: undefined,
417
- messageId: undefined,
418
- lastError: undefined,
419
- retryCount: 0,
420
- syncData: {},
421
- },
422
- states: {
423
- idle: {
424
- on: {
425
- QUEUE_OPERATION: {
426
- target: 'queued',
427
- actions: assign({
428
- syncData: (context, event: any) => ({
429
- ...context.syncData,
430
- queue: [...(context.syncData?.queue || []), event.operation],
431
- }),
432
- }),
433
- },
434
- FLUSH: 'flushing',
435
- },
436
- },
437
-
438
- queued: {
439
- on: {
440
- QUEUE_OPERATION: {
441
- target: 'queued',
442
- actions: assign({
443
- syncData: (context, event: any) => ({
444
- ...context.syncData,
445
- queue: [...(context.syncData?.queue || []), event.operation],
446
- }),
447
- }),
448
- },
449
- FLUSH: 'flushing',
450
- CLEAR: {
451
- target: 'idle',
452
- actions: assign({
453
- syncData: (context) => ({
454
- ...context.syncData,
455
- queue: [],
456
- }),
457
- }),
458
- },
459
- },
460
- },
461
-
462
- flushing: {
463
- on: {
464
- FLUSH_SUCCESS: {
465
- target: 'idle',
466
- actions: assign({
467
- syncData: (context) => ({
468
- ...context.syncData,
469
- queue: [],
470
- }),
471
- }),
472
- },
473
- FLUSH_ERROR: {
474
- target: 'error',
475
- actions: assign({
476
- lastError: (context, event: any) => event.error,
477
- retryCount: (context) => context.retryCount + 1,
478
- }),
479
- },
480
- },
481
- after: {
482
- 30000: {
483
- target: 'error',
484
- actions: assign({
485
- lastError: new Error('Flush timeout (30s)'),
486
- }),
487
- },
488
- },
489
- },
490
-
491
- error: {
492
- on: {
493
- RETRY: {
494
- target: 'flushing',
495
- cond: (context) => context.retryCount < 5,
496
- },
497
- CLEAR: 'idle',
498
- },
499
- },
500
- },
501
- }
502
- );
503
-
504
- // ============================================================================
505
- // CONFLICT RESOLUTION STATE MACHINE
506
- // ============================================================================
507
-
508
- export const conflictResolutionMachine = createMachine(
509
- {
510
- id: 'conflictResolution',
511
- initial: 'idle',
512
- context: {
513
- conversationId: undefined,
514
- messageId: undefined,
515
- lastError: undefined,
516
- retryCount: 0,
517
- syncData: {},
518
- },
519
- states: {
520
- idle: {
521
- on: {
522
- CONFLICT_DETECTED: 'resolving',
523
- },
524
- },
525
-
526
- resolving: {
527
- on: {
528
- RESOLVE_SUCCESS: 'resolved',
529
- RESOLVE_FAILED: 'error',
530
- },
531
- after: {
532
- 5000: {
533
- target: 'error',
534
- actions: assign({
535
- lastError: new Error('Conflict resolution timeout (5s)'),
536
- }),
537
- },
538
- },
539
- },
540
-
541
- resolved: {
542
- on: {
543
- CONTINUE: 'idle',
544
- },
545
- },
546
-
547
- error: {
548
- on: {
549
- RETRY: 'resolving',
550
- MANUAL_RESOLVE: 'resolving',
551
- ABORT: 'idle',
552
- },
553
- },
554
- },
555
- }
556
- );
557
-
558
- // ============================================================================
559
- // STATE MACHINE SELECTORS & UTILITIES
560
- // ============================================================================
561
-
562
- export function getStateDescription(state: string): string {
563
- const descriptions: Record<string, string> = {
564
- idle: 'Waiting for input',
565
- loading: 'Loading data from server',
566
- syncing: 'Syncing data with server',
567
- synced: 'Data is synchronized',
568
- error: 'Error occurred, will retry',
569
- offline: 'Offline mode - operations queued',
570
- creating: 'Creating message',
571
- created: 'Message created, waiting for sync',
572
- ready: 'Ready for operations',
573
- uninitialized: 'Not yet initialized',
574
- queued: 'Operations queued offline',
575
- flushing: 'Sending queued operations',
576
- resolving: 'Resolving data conflicts',
577
- resolved: 'Conflicts resolved',
578
- reconciling: 'Reconciling local and remote changes',
579
- };
580
- return descriptions[state] || state;
581
- }
582
-
583
- export function isTerminalState(state: string): boolean {
584
- return ['synced', 'resolved', 'ready'].includes(state);
585
- }
586
-
587
- export function isErrorState(state: string): boolean {
588
- return state === 'error' || state === 'offline';
589
- }
590
-
591
- export function canRetry(state: string): boolean {
592
- return state === 'error' || state === 'offline';
593
- }
package/lib/schemas.ts CHANGED
@@ -188,26 +188,3 @@ export function validateMessage(data: unknown) {
188
188
  }
189
189
  }
190
190
 
191
- export function validateConversationsList(data: unknown) {
192
- try {
193
- return { valid: true, data: ConversationsListSchema.parse(data) };
194
- } catch (error) {
195
- return { valid: false, error: String(error) };
196
- }
197
- }
198
-
199
- export function validateMessagesList(data: unknown) {
200
- try {
201
- return { valid: true, data: MessagesListSchema.parse(data) };
202
- } catch (error) {
203
- return { valid: false, error: String(error) };
204
- }
205
- }
206
-
207
- export function validatePaginationParams(data: unknown) {
208
- try {
209
- return { valid: true, data: PaginationParamsSchema.parse(data) };
210
- } catch (error) {
211
- return { valid: false, error: String(error) };
212
- }
213
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.74",
3
+ "version": "1.0.76",
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
@@ -441,7 +441,7 @@
441
441
  </header>
442
442
 
443
443
  <!-- Main Content -->
444
- <main>
444
+ <main id="app">
445
445
  <!-- Execution Panel -->
446
446
  <div class="execution-panel">
447
447
  <div class="execution-input-group">
@@ -1,149 +0,0 @@
1
- {
2
- "execution_date": "2026-02-05T12:47:17.946Z",
3
- "status": "PRODUCTION_READY",
4
- "summary": {
5
- "total": 9,
6
- "passing": 9,
7
- "failing": 0,
8
- "passRate": "100%",
9
- "elapsed": 8,
10
- "errors": 0
11
- },
12
- "phases": {
13
- "1": {
14
- "title": "Server Connectivity",
15
- "status": "PASS",
16
- "findings": {
17
- "server_responsive": true,
18
- "status_code": 200,
19
- "response_time": "OK"
20
- },
21
- "timestamp": "2026-02-05T12:47:09.615Z"
22
- },
23
- "2": {
24
- "title": "UI Component Verification",
25
- "status": "PASS",
26
- "findings": {
27
- "page_title": "AgentGUI - Agent Execution Visualizer",
28
- "main_content_found": true,
29
- "buttons_present": true,
30
- "input_fields_present": true,
31
- "header_present": true,
32
- "total_elements": 38,
33
- "body_height": 720
34
- },
35
- "timestamp": "2026-02-05T12:47:12.672Z"
36
- },
37
- "3": {
38
- "title": "Interactive Element Testing",
39
- "status": "PASS",
40
- "findings": {
41
- "button_count": 2,
42
- "link_count": 0,
43
- "input_count": 1,
44
- "interactive_elements": 3
45
- },
46
- "timestamp": "2026-02-05T12:47:12.740Z"
47
- },
48
- "4": {
49
- "title": "Console Error Detection",
50
- "status": "PASS",
51
- "findings": {
52
- "console_messages": 5,
53
- "console_errors": 3,
54
- "console_warnings": 0,
55
- "page_errors": 0,
56
- "console_clean": false
57
- },
58
- "timestamp": "2026-02-05T12:47:14.318Z"
59
- },
60
- "5": {
61
- "title": "Performance Metrics",
62
- "status": "PASS",
63
- "findings": {
64
- "navigationStart": 0,
65
- "domInteractive": 47.400000002235174,
66
- "domComplete": 52.600000001490116,
67
- "loadComplete": 52.600000001490116,
68
- "totalLoadTime": 52.600000001490116
69
- },
70
- "timestamp": "2026-02-05T12:47:14.889Z"
71
- },
72
- "6": {
73
- "title": "Responsive Layout Test",
74
- "status": "PASS",
75
- "findings": {
76
- "viewports_tested": 3,
77
- "mobile": true,
78
- "tablet": true,
79
- "desktop": true,
80
- "all_responsive": true
81
- },
82
- "timestamp": "2026-02-05T12:47:16.604Z"
83
- },
84
- "7": {
85
- "title": "Theme/Dark Mode Test",
86
- "status": "PASS",
87
- "findings": {
88
- "theme_toggle_found": false,
89
- "light_mode_captured": true,
90
- "dark_mode_tested": false
91
- },
92
- "timestamp": "2026-02-05T12:47:17.248Z"
93
- },
94
- "8": {
95
- "title": "Filesystem Accessibility Test",
96
- "status": "PASS",
97
- "findings": {
98
- "lodash_repo_accessible": true,
99
- "chalk_repo_accessible": true,
100
- "test_data_ready": true,
101
- "lodash_readme_size": 3729,
102
- "lodash_readme_readable": true,
103
- "chalk_file_count": 16
104
- },
105
- "timestamp": "2026-02-05T12:47:17.248Z"
106
- },
107
- "9": {
108
- "title": "Final Verification",
109
- "status": "PASS",
110
- "findings": {
111
- "total_phases": 8,
112
- "passing": 8,
113
- "failing": 0,
114
- "pass_rate": "100%",
115
- "production_ready": true,
116
- "execution_time": "8s",
117
- "total_errors": 0
118
- },
119
- "timestamp": "2026-02-05T12:47:17.875Z"
120
- }
121
- },
122
- "screenshots": [
123
- {
124
- "phase": 2,
125
- "description": "UI Component Load",
126
- "file": "/tmp/test-phase2-ui.png",
127
- "timestamp": "2026-02-05T12:47:12.660Z"
128
- },
129
- {
130
- "phase": 4,
131
- "description": "Console State",
132
- "file": "/tmp/test-phase4-console.png",
133
- "timestamp": "2026-02-05T12:47:14.318Z"
134
- },
135
- {
136
- "phase": 7,
137
- "description": "Light Mode",
138
- "file": "/tmp/test-phase7-light.png",
139
- "timestamp": "2026-02-05T12:47:17.232Z"
140
- },
141
- {
142
- "phase": 9,
143
- "description": "Final System State",
144
- "file": "/tmp/test-phase9-final.png",
145
- "timestamp": "2026-02-05T12:47:17.875Z"
146
- }
147
- ],
148
- "errors": []
149
- }