@vforsh/argus 0.1.19 → 0.1.20

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 (40) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/argus.js +257 -59
  3. package/dist/cli/register/extensionCommands.d.ts.map +1 -1
  4. package/dist/cli/register/extensionCommands.js +28 -3
  5. package/dist/cli/register/extensionCommands.js.map +1 -1
  6. package/dist/commands/extension/extensionId.d.ts +27 -0
  7. package/dist/commands/extension/extensionId.d.ts.map +1 -0
  8. package/dist/commands/extension/extensionId.js +37 -0
  9. package/dist/commands/extension/extensionId.js.map +1 -0
  10. package/dist/commands/extension/extensionPath.d.ts +15 -0
  11. package/dist/commands/extension/extensionPath.d.ts.map +1 -0
  12. package/dist/commands/extension/extensionPath.js +61 -0
  13. package/dist/commands/extension/extensionPath.js.map +1 -0
  14. package/dist/commands/extension/install.d.ts +16 -0
  15. package/dist/commands/extension/install.d.ts.map +1 -0
  16. package/dist/commands/extension/install.js +154 -0
  17. package/dist/commands/extension/install.js.map +1 -0
  18. package/dist/commands/extension/setup.d.ts +2 -1
  19. package/dist/commands/extension/setup.d.ts.map +1 -1
  20. package/dist/commands/extension/setup.js +5 -2
  21. package/dist/commands/extension/setup.js.map +1 -1
  22. package/dist/extension/dist/background/auth-header-monitor.js +77 -0
  23. package/dist/extension/dist/background/bridge-client.js +120 -0
  24. package/dist/extension/dist/background/cdp-proxy.js +201 -0
  25. package/dist/extension/dist/background/debugger-manager.js +296 -0
  26. package/dist/extension/dist/background/service-worker.js +2004 -0
  27. package/dist/extension/dist/background/service-worker.js.map +7 -0
  28. package/dist/extension/dist/popup/popup.js +730 -0
  29. package/dist/extension/dist/popup/popup.js.map +7 -0
  30. package/dist/extension/dist/popup/tabMarkup.js +104 -0
  31. package/dist/extension/dist/popup/viewState.js +60 -0
  32. package/dist/extension/dist/types/messages.js +5 -0
  33. package/dist/extension/icons/icon-128.png +0 -0
  34. package/dist/extension/icons/icon-16.png +0 -0
  35. package/dist/extension/icons/icon-48.png +0 -0
  36. package/dist/extension/manifest.json +26 -0
  37. package/dist/extension/src/popup/popup.html +756 -0
  38. package/dist/skill/argus/SKILL.md +3 -1
  39. package/dist/skill/argus/reference/EXTENSION.md +13 -8
  40. package/package.json +2 -2
@@ -0,0 +1,756 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <title>Argus CDP Bridge</title>
7
+ <style>
8
+ * {
9
+ box-sizing: border-box;
10
+ margin: 0;
11
+ padding: 0;
12
+ }
13
+
14
+ body {
15
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
16
+ font-size: 13px;
17
+ width: 360px;
18
+ min-height: 240px;
19
+ max-height: 640px;
20
+ background: #f3f5f7;
21
+ color: #27313b;
22
+ overflow: hidden;
23
+ scrollbar-width: none;
24
+ }
25
+
26
+ .header {
27
+ padding: 12px 16px 14px;
28
+ background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
29
+ border-bottom: 1px solid #e0e0e0;
30
+ }
31
+
32
+ .header-top {
33
+ display: flex;
34
+ align-items: center;
35
+ gap: 10px;
36
+ }
37
+
38
+ .header h1 {
39
+ font-size: 15px;
40
+ font-weight: 600;
41
+ color: #333;
42
+ }
43
+
44
+ .status-indicator {
45
+ width: 8px;
46
+ height: 8px;
47
+ border-radius: 50%;
48
+ background: #ff5722;
49
+ }
50
+
51
+ .status-indicator.connected {
52
+ background: #4caf50;
53
+ }
54
+
55
+ .status-text {
56
+ font-size: 11px;
57
+ color: #697684;
58
+ margin-left: auto;
59
+ }
60
+
61
+ .tab-actions {
62
+ display: flex;
63
+ gap: 6px;
64
+ flex-shrink: 0;
65
+ }
66
+
67
+ .tab-action {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ justify-content: center;
71
+ flex-shrink: 0;
72
+ border: none;
73
+ cursor: pointer;
74
+ }
75
+
76
+ .tab-action.icon-only {
77
+ width: 28px;
78
+ height: 28px;
79
+ padding: 0;
80
+ border-radius: 8px;
81
+ border: 1px solid transparent;
82
+ background: transparent;
83
+ transition:
84
+ background-color 0.15s,
85
+ border-color 0.15s,
86
+ color 0.15s;
87
+ }
88
+
89
+ .tab-action svg {
90
+ width: 14px;
91
+ height: 14px;
92
+ stroke: currentColor;
93
+ }
94
+
95
+ .tab-action-icon {
96
+ display: inline-flex;
97
+ align-items: center;
98
+ justify-content: center;
99
+ }
100
+
101
+ [data-button-icon] {
102
+ display: inline-flex;
103
+ align-items: center;
104
+ justify-content: center;
105
+ }
106
+
107
+ .tab-action.copy {
108
+ color: #687887;
109
+ }
110
+
111
+ .tab-action.copy:hover:not(:disabled),
112
+ .tab-action.copy:focus-visible:not(:disabled) {
113
+ background: #eef4fb;
114
+ border-color: #d2e1f2;
115
+ color: #1b5e92;
116
+ }
117
+
118
+ .tab-action[data-feedback-state='success'] {
119
+ opacity: 1;
120
+ }
121
+
122
+ .tab-action.copy[data-feedback-state='success'] {
123
+ background: #edf8f0;
124
+ border-color: #cde8d5;
125
+ color: #2e7d32;
126
+ }
127
+
128
+ .page {
129
+ padding: 12px;
130
+ overflow-y: auto;
131
+ max-height: 520px;
132
+ display: flex;
133
+ flex-direction: column;
134
+ gap: 12px;
135
+ scrollbar-width: none;
136
+ -ms-overflow-style: none;
137
+ }
138
+
139
+ /* Hide scrollbars while keeping scroll behavior */
140
+ body::-webkit-scrollbar,
141
+ .page::-webkit-scrollbar {
142
+ display: none;
143
+ }
144
+
145
+ .panel {
146
+ background: #fff;
147
+ border: 1px solid #e2e7ec;
148
+ border-radius: 10px;
149
+ padding: 12px;
150
+ }
151
+
152
+ .error-banner {
153
+ padding: 10px 12px;
154
+ border-radius: 10px;
155
+ background: #fff0f0;
156
+ border: 1px solid #f1b4b4;
157
+ color: #a03434;
158
+ font-size: 12px;
159
+ line-height: 1.4;
160
+ }
161
+
162
+ .hidden {
163
+ display: none;
164
+ }
165
+
166
+ .health-grid {
167
+ display: grid;
168
+ grid-template-columns: repeat(2, minmax(0, 1fr));
169
+ gap: 10px 14px;
170
+ }
171
+
172
+ .health-item {
173
+ display: flex;
174
+ flex-direction: column;
175
+ gap: 2px;
176
+ min-width: 0;
177
+ }
178
+
179
+ .health-label {
180
+ font-size: 10px;
181
+ font-weight: 700;
182
+ letter-spacing: 0.4px;
183
+ text-transform: uppercase;
184
+ color: #7a8794;
185
+ }
186
+
187
+ .health-value {
188
+ font-size: 12px;
189
+ font-weight: 500;
190
+ color: #223140;
191
+ white-space: nowrap;
192
+ overflow: hidden;
193
+ text-overflow: ellipsis;
194
+ }
195
+
196
+ .health-value.connected {
197
+ color: #2e7d32;
198
+ }
199
+
200
+ .health-value.disconnected {
201
+ color: #c62828;
202
+ }
203
+
204
+ .health-value.warning {
205
+ color: #b26a00;
206
+ }
207
+
208
+ .health-panel {
209
+ border: none;
210
+ }
211
+
212
+ .health-summary {
213
+ display: flex;
214
+ align-items: center;
215
+ gap: 8px;
216
+ padding: 0;
217
+ cursor: pointer;
218
+ user-select: none;
219
+ list-style: none;
220
+ }
221
+
222
+ .health-summary::-webkit-details-marker {
223
+ display: none;
224
+ }
225
+
226
+ .health-summary::before {
227
+ content: '▸';
228
+ font-size: 10px;
229
+ color: #7b8793;
230
+ flex-shrink: 0;
231
+ transition: transform 0.15s;
232
+ }
233
+
234
+ .health-panel[open] > .health-summary::before {
235
+ transform: rotate(90deg);
236
+ }
237
+
238
+ .health-summary-text {
239
+ font-size: 11px;
240
+ font-weight: 500;
241
+ color: #5f6b76;
242
+ white-space: nowrap;
243
+ overflow: hidden;
244
+ text-overflow: ellipsis;
245
+ min-width: 0;
246
+ }
247
+
248
+ .health-summary-actions {
249
+ display: flex;
250
+ gap: 6px;
251
+ margin-left: auto;
252
+ flex-shrink: 0;
253
+ }
254
+
255
+ .health-details {
256
+ padding-top: 12px;
257
+ }
258
+
259
+ .section-title {
260
+ font-size: 11px;
261
+ text-transform: uppercase;
262
+ letter-spacing: 0.5px;
263
+ color: #666;
264
+ margin-bottom: 10px;
265
+ }
266
+
267
+ .panel-button {
268
+ display: inline-flex;
269
+ align-items: center;
270
+ justify-content: center;
271
+ gap: 6px;
272
+ padding: 6px 9px;
273
+ border: 1px solid #d3dbe4;
274
+ border-radius: 8px;
275
+ background: #fff;
276
+ color: #425364;
277
+ font-size: 11px;
278
+ font-weight: 500;
279
+ cursor: pointer;
280
+ flex-shrink: 0;
281
+ }
282
+
283
+ /* Compact buttons when used inline in the health summary row */
284
+ .health-summary-actions .panel-button {
285
+ padding: 4px 7px;
286
+ font-size: 10px;
287
+ }
288
+
289
+ .panel-button svg {
290
+ width: 14px;
291
+ height: 14px;
292
+ stroke: currentColor;
293
+ }
294
+
295
+ .panel-button:hover:not(:disabled) {
296
+ border-color: #9fc2e6;
297
+ color: #1b5e92;
298
+ }
299
+
300
+ .panel-button[data-feedback-state='success'] {
301
+ opacity: 1;
302
+ background: #edf8f0;
303
+ border-color: #cde8d5;
304
+ color: #2e7d32;
305
+ }
306
+
307
+ .panel-button.danger {
308
+ border-color: #f0c6c6;
309
+ color: #c0392b;
310
+ }
311
+
312
+ .panel-button.danger:hover:not(:disabled) {
313
+ border-color: #e59b9b;
314
+ color: #a62c20;
315
+ }
316
+
317
+ .panel-button:disabled {
318
+ cursor: default;
319
+ opacity: 0.45;
320
+ }
321
+
322
+ .tab-list {
323
+ display: flex;
324
+ flex-direction: column;
325
+ gap: 6px;
326
+ }
327
+
328
+ .tab-item {
329
+ display: flex;
330
+ align-items: center;
331
+ gap: 10px;
332
+ padding: 10px 12px;
333
+ background: #fff;
334
+ border-radius: 6px;
335
+ cursor: pointer;
336
+ transition: outline-color 0.15s;
337
+ outline: 2px solid transparent;
338
+ outline-offset: -2px;
339
+ }
340
+
341
+ .tab-item:hover {
342
+ outline-color: #90caf9;
343
+ }
344
+
345
+ .tab-item.attached {
346
+ background: #e8f5e9;
347
+ border: 1px solid #81c784;
348
+ }
349
+
350
+ .tab-item.attached:hover {
351
+ outline-color: #6fb37c;
352
+ }
353
+
354
+ .tab-favicon {
355
+ width: 16px;
356
+ height: 16px;
357
+ border-radius: 2px;
358
+ flex-shrink: 0;
359
+ }
360
+
361
+ .tab-info {
362
+ flex: 1;
363
+ min-width: 0;
364
+ }
365
+
366
+ .tab-title {
367
+ font-weight: 500;
368
+ color: #333;
369
+ white-space: nowrap;
370
+ overflow: hidden;
371
+ text-overflow: ellipsis;
372
+ }
373
+
374
+ .tab-url {
375
+ font-size: 11px;
376
+ color: #888;
377
+ white-space: nowrap;
378
+ overflow: hidden;
379
+ text-overflow: ellipsis;
380
+ }
381
+
382
+ .tab-action.attach {
383
+ background: #e3f2fd;
384
+ color: #1976d2;
385
+ padding: 4px 10px;
386
+ font-size: 11px;
387
+ border-radius: 4px;
388
+ }
389
+
390
+ .tab-action.attach:hover {
391
+ background: #bbdefb;
392
+ }
393
+
394
+ .tab-action:disabled {
395
+ cursor: default;
396
+ opacity: 0.45;
397
+ }
398
+
399
+ .tab-action.detach {
400
+ color: #c16a6a;
401
+ }
402
+
403
+ .tab-action.detach:hover:not(:disabled),
404
+ .tab-action.detach:focus-visible:not(:disabled) {
405
+ background: #fff1f1;
406
+ border-color: #f0d3d3;
407
+ color: #a62c20;
408
+ }
409
+
410
+ .tab-action:focus-visible {
411
+ outline: 2px solid #9fc2e6;
412
+ outline-offset: 2px;
413
+ }
414
+
415
+ .target-list {
416
+ display: flex;
417
+ flex-direction: column;
418
+ gap: 6px;
419
+ margin: -2px 0 8px 26px;
420
+ }
421
+
422
+ .target-item {
423
+ display: flex;
424
+ align-items: flex-start;
425
+ gap: 10px;
426
+ width: 100%;
427
+ padding: 0;
428
+ border: 1px solid #dce3ea;
429
+ border-radius: 6px;
430
+ background: #fff;
431
+ text-align: left;
432
+ min-width: 0;
433
+ overflow: hidden;
434
+ }
435
+
436
+ .target-item:hover,
437
+ .target-item:focus-within {
438
+ border-color: #90caf9;
439
+ }
440
+
441
+ .target-item.selected {
442
+ background: #e3f2fd;
443
+ border-color: #64b5f6;
444
+ }
445
+
446
+ .target-select-action {
447
+ display: flex;
448
+ align-items: flex-start;
449
+ gap: 10px;
450
+ flex: 1;
451
+ min-width: 0;
452
+ padding: 8px 10px;
453
+ border: 0;
454
+ background: transparent;
455
+ color: inherit;
456
+ cursor: pointer;
457
+ text-align: left;
458
+ }
459
+
460
+ .target-select-action:disabled {
461
+ cursor: default;
462
+ }
463
+
464
+ .target-visibility-action {
465
+ display: inline-flex;
466
+ align-items: center;
467
+ justify-content: center;
468
+ align-self: stretch;
469
+ width: 34px;
470
+ min-width: 34px;
471
+ border: 0;
472
+ border-left: 1px solid transparent;
473
+ border-radius: 0;
474
+ background: transparent;
475
+ color: #71808f;
476
+ cursor: pointer;
477
+ }
478
+
479
+ .target-visibility-action:hover:not(:disabled),
480
+ .target-visibility-action:focus-visible:not(:disabled) {
481
+ background: #eef4fb;
482
+ border-left-color: #d2e1f2;
483
+ color: #1b5e92;
484
+ }
485
+
486
+ .target-visibility-action:disabled {
487
+ cursor: default;
488
+ opacity: 0.45;
489
+ }
490
+
491
+ .target-visibility-action svg {
492
+ width: 15px;
493
+ height: 15px;
494
+ stroke: currentColor;
495
+ }
496
+
497
+ .target-kind {
498
+ flex-shrink: 0;
499
+ min-width: 44px;
500
+ font-size: 10px;
501
+ font-weight: 600;
502
+ text-transform: uppercase;
503
+ letter-spacing: 0.4px;
504
+ color: #5f6b76;
505
+ padding-top: 2px;
506
+ }
507
+
508
+ .target-meta {
509
+ display: flex;
510
+ flex-direction: column;
511
+ min-width: 0;
512
+ gap: 2px;
513
+ }
514
+
515
+ .target-title {
516
+ font-size: 12px;
517
+ font-weight: 500;
518
+ color: #23303d;
519
+ white-space: nowrap;
520
+ overflow: hidden;
521
+ text-overflow: ellipsis;
522
+ }
523
+
524
+ .target-url {
525
+ font-size: 11px;
526
+ color: #7b8793;
527
+ white-space: nowrap;
528
+ overflow: hidden;
529
+ text-overflow: ellipsis;
530
+ }
531
+
532
+ .target-collapsed {
533
+ border: none;
534
+ }
535
+
536
+ .target-collapsed-toggle {
537
+ display: flex;
538
+ align-items: center;
539
+ gap: 6px;
540
+ padding: 5px 10px;
541
+ font-size: 11px;
542
+ color: #7b8793;
543
+ cursor: pointer;
544
+ user-select: none;
545
+ list-style: none;
546
+ }
547
+
548
+ .target-collapsed-toggle::-webkit-details-marker {
549
+ display: none;
550
+ }
551
+
552
+ .target-collapsed-toggle::before {
553
+ content: '▸';
554
+ font-size: 10px;
555
+ transition: transform 0.15s;
556
+ }
557
+
558
+ .target-collapsed[open] > .target-collapsed-toggle::before {
559
+ transform: rotate(90deg);
560
+ }
561
+
562
+ .target-collapsed-toggle:hover {
563
+ color: #4a5662;
564
+ }
565
+
566
+ .target-collapsed-list {
567
+ display: flex;
568
+ flex-direction: column;
569
+ gap: 4px;
570
+ padding-top: 4px;
571
+ }
572
+
573
+ .target-collapsed-list .target-item {
574
+ opacity: 0.65;
575
+ }
576
+
577
+ .target-collapsed-list .target-item:hover,
578
+ .target-collapsed-list .target-item.selected {
579
+ opacity: 1;
580
+ }
581
+
582
+ .target-hidden-list .target-collapsed-list .target-item {
583
+ opacity: 0.72;
584
+ }
585
+
586
+ .target-hidden-list .target-collapsed-list .target-item:hover,
587
+ .target-hidden-list .target-collapsed-list .target-item:focus-within {
588
+ opacity: 1;
589
+ }
590
+
591
+ .target-hidden-list .target-item {
592
+ background: #f8fafc;
593
+ border-style: dashed;
594
+ }
595
+
596
+ .empty-state {
597
+ text-align: center;
598
+ padding: 40px 20px;
599
+ color: #888;
600
+ }
601
+
602
+ .empty-state .icon {
603
+ font-size: 32px;
604
+ margin-bottom: 12px;
605
+ }
606
+
607
+ .loading {
608
+ display: flex;
609
+ align-items: center;
610
+ justify-content: center;
611
+ padding: 28px;
612
+ color: #888;
613
+ }
614
+
615
+ .footer {
616
+ padding: 10px 16px;
617
+ background: #fff;
618
+ border-top: 1px solid #e0e0e0;
619
+ font-size: 11px;
620
+ color: #888;
621
+ display: flex;
622
+ justify-content: space-between;
623
+ }
624
+
625
+ .footer a {
626
+ color: #1976d2;
627
+ text-decoration: none;
628
+ }
629
+
630
+ .footer a:hover {
631
+ text-decoration: underline;
632
+ }
633
+ </style>
634
+ </head>
635
+ <body>
636
+ <div class="header">
637
+ <div class="header-top">
638
+ <div class="status-indicator" id="statusIndicator"></div>
639
+ <h1>Argus CDP Bridge</h1>
640
+ <span class="status-text" id="statusText">Connecting...</span>
641
+ </div>
642
+ </div>
643
+
644
+ <div class="page">
645
+ <div class="error-banner hidden" id="errorBanner"></div>
646
+
647
+ <details class="panel health-panel" id="healthPanel">
648
+ <summary class="health-summary">
649
+ <span class="health-summary-text" id="healthSummary">Connecting...</span>
650
+ <span class="health-summary-actions" role="group" aria-label="Watcher actions">
651
+ <button
652
+ class="panel-button"
653
+ id="copyAllButton"
654
+ type="button"
655
+ title="Copy all watcher info"
656
+ aria-label="Copy all watcher info"
657
+ disabled
658
+ >
659
+ <span data-button-icon aria-hidden="true">
660
+ <svg
661
+ viewBox="0 0 24 24"
662
+ fill="none"
663
+ stroke-width="2"
664
+ stroke-linecap="round"
665
+ stroke-linejoin="round"
666
+ aria-hidden="true"
667
+ >
668
+ <rect width="14" height="14" x="8" y="8" rx="2" ry="2"></rect>
669
+ <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"></path>
670
+ </svg>
671
+ </span>
672
+ <span data-button-label>Copy All</span>
673
+ </button>
674
+ <button
675
+ class="panel-button danger"
676
+ id="detachAllButton"
677
+ type="button"
678
+ title="Detach all watchers"
679
+ aria-label="Detach all watchers"
680
+ disabled
681
+ >
682
+ <span data-button-icon aria-hidden="true">
683
+ <svg
684
+ viewBox="0 0 16 16"
685
+ fill="none"
686
+ stroke-width="1.4"
687
+ stroke-linecap="round"
688
+ stroke-linejoin="round"
689
+ aria-hidden="true"
690
+ >
691
+ <path d="M5.4 1.75h5.2l3.65 3.65v5.2l-3.65 3.65H5.4l-3.65-3.65V5.4z"></path>
692
+ <path d="M6 6l4 4"></path>
693
+ <path d="M10 6l-4 4"></path>
694
+ </svg>
695
+ </span>
696
+ <span data-button-label>Detach All</span>
697
+ </button>
698
+ </span>
699
+ </summary>
700
+ <div class="health-details">
701
+ <div class="health-grid">
702
+ <div class="health-item">
703
+ <div class="health-label">Native Host</div>
704
+ <div class="health-value" id="healthNativeHost">Unknown</div>
705
+ </div>
706
+ <div class="health-item">
707
+ <div class="health-label">Watcher HTTP</div>
708
+ <div class="health-value" id="healthWatcherReady">Unknown</div>
709
+ </div>
710
+ <div class="health-item">
711
+ <div class="health-label">Watcher ID</div>
712
+ <div class="health-value" id="healthWatcherId">-</div>
713
+ </div>
714
+ <div class="health-item">
715
+ <div class="health-label">Attached Tabs</div>
716
+ <div class="health-value" id="healthAttachedCount">0</div>
717
+ </div>
718
+ <div class="health-item">
719
+ <div class="health-label">Selected Target</div>
720
+ <div class="health-value" id="healthSelectedTarget">-</div>
721
+ </div>
722
+ <div class="health-item">
723
+ <div class="health-label">Last Message</div>
724
+ <div class="health-value" id="healthLastMessage">-</div>
725
+ </div>
726
+ <div class="health-item">
727
+ <div class="health-label">Host PID</div>
728
+ <div class="health-value" id="healthPid">-</div>
729
+ </div>
730
+ </div>
731
+ </div>
732
+ </details>
733
+
734
+ <div class="panel" id="attachedSection">
735
+ <div class="section-title">Attached Tabs</div>
736
+ <div id="attachedContent">
737
+ <div class="loading">Loading tabs...</div>
738
+ </div>
739
+ </div>
740
+
741
+ <div class="panel" id="availableSection">
742
+ <div class="section-title">Available Tabs</div>
743
+ <div id="availableContent">
744
+ <div class="loading">Loading tabs...</div>
745
+ </div>
746
+ </div>
747
+ </div>
748
+
749
+ <div class="footer">
750
+ <span id="attachedCount">0 attached</span>
751
+ <a href="https://github.com/vforsh/argus" target="_blank">Documentation</a>
752
+ </div>
753
+
754
+ <script src="../../dist/popup/popup.js" type="module"></script>
755
+ </body>
756
+ </html>