@freeway-hub/web-agent 0.0.0-stage → 1.0.5

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.
@@ -0,0 +1,13 @@
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" />
6
+ <title>Web Agent Config Editor</title>
7
+ <link rel="stylesheet" href="./styles.css" />
8
+ </head>
9
+ <body>
10
+ <div id="app"></div>
11
+ <script src="./config-editor-runtime.js"></script>
12
+ </body>
13
+ </html>
@@ -0,0 +1,587 @@
1
+ /*
2
+ * Global UI design tokens and base element styling shared by all MCP tool apps. It establishes color, spacing, typography, and accessibility-friendly defaults.
3
+ */
4
+ :root {
5
+ color-scheme: light dark;
6
+
7
+ /* Spec variables with light-dark() fallbacks (following customer-segmentation pattern).
8
+ When a host provides --color-* via applyHostStyleVariables, the var() picks it up;
9
+ otherwise the light-dark() fallback keeps the UI legible. */
10
+ --bg: transparent;
11
+ --panel: var(--color-background-primary, light-dark(#ffffff, #1e1e2e));
12
+ --panel-subtle: var(--color-background-tertiary, light-dark(#f5f5f5, #2a2a3c));
13
+ --panel-muted: var(--color-background-tertiary, light-dark(#f5f5f5, #2a2a3c));
14
+ --text: var(--color-text-primary, light-dark(#1a1a2e, #e4e4ef));
15
+ --text-secondary: var(--color-text-secondary, light-dark(#4a4a5a, #a0a0b8));
16
+ --muted: var(--color-text-tertiary, light-dark(#94a3b8, #64748b));
17
+ --border: var(--color-border-primary, light-dark(#e2e8f0, #334155));
18
+ --accent: var(--color-text-info, light-dark(#2563eb, #60a5fa));
19
+ --accent-hover: var(--color-text-info, var(--accent));
20
+ --accent-soft: var(--color-background-info, var(--panel-subtle));
21
+ --focus-ring: var(--color-border-primary, var(--accent));
22
+ --shadow-sm: var(--shadow-sm, none);
23
+ --success-bg: var(--color-background-success, var(--panel-subtle));
24
+ --success-border: var(--color-border-success, var(--border));
25
+ --success-text: var(--color-text-success, light-dark(#059669, #34d399));
26
+ --error-bg: var(--color-background-danger, var(--panel-subtle));
27
+ --error-border: var(--color-border-danger, var(--border));
28
+ --error-text: var(--color-text-danger, light-dark(#dc2626, #f87171));
29
+ --warning-bg: var(--color-background-warning, var(--panel-subtle));
30
+ --warning-border: var(--color-border-warning, var(--border));
31
+ --warning-text: var(--color-text-warning, light-dark(#d97706, #fbbf24));
32
+ }
33
+
34
+ html {
35
+ background: var(--bg);
36
+ }
37
+
38
+ * {
39
+ box-sizing: border-box;
40
+ }
41
+
42
+ body {
43
+ margin: 0;
44
+ background: var(--bg);
45
+ color: var(--text);
46
+ font-family: var(--font-sans, system-ui, sans-serif);
47
+ max-height: 32px;
48
+ overflow: hidden;
49
+ }
50
+
51
+ body.dc-ready {
52
+ max-height: none;
53
+ overflow: auto;
54
+ overflow: clip;
55
+ }
56
+
57
+ #app {
58
+ min-height: 0;
59
+ }
60
+
61
+ .shell {
62
+ max-width: none;
63
+ margin: 0;
64
+ padding: 6px;
65
+ }
66
+
67
+ .tool-shell.collapsed .panel {
68
+ display: none;
69
+ }
70
+
71
+ .hidden {
72
+ display: none !important;
73
+ }
74
+
75
+
76
+ .compact-row {
77
+ display: flex;
78
+ align-items: center;
79
+ gap: 6px;
80
+ padding: 6px 2px;
81
+ font-size: 13px;
82
+ color: var(--muted);
83
+ line-height: 1;
84
+ user-select: none;
85
+ }
86
+
87
+ .compact-row--ready {
88
+ cursor: pointer;
89
+ border-radius: 8px;
90
+ transition: color 150ms ease;
91
+ }
92
+
93
+ .compact-row--ready:hover {
94
+ color: var(--text-secondary);
95
+ }
96
+
97
+ .compact-row--ready:hover .compact-chevron {
98
+ color: var(--text-secondary);
99
+ }
100
+
101
+ .compact-chevron {
102
+ width: 14px;
103
+ height: 14px;
104
+ fill: currentColor;
105
+ color: var(--muted);
106
+ flex-shrink: 0;
107
+ transition: transform 200ms ease, color 150ms ease;
108
+ }
109
+
110
+ .tool-shell.expanded .compact-chevron {
111
+ transform: rotate(90deg);
112
+ }
113
+
114
+ .compact-label {
115
+ color: inherit;
116
+ }
117
+
118
+ .compact-filename {
119
+ color: var(--text);
120
+ font-weight: 600;
121
+ }
122
+
123
+ .compact-row--ready .compact-label::after {
124
+ content: ' · ';
125
+ }
126
+
127
+ .compact-row--loading {
128
+ animation: fade-pulse 1.5s ease-in-out infinite;
129
+ }
130
+
131
+ @keyframes fade-pulse {
132
+ 0%,
133
+ 100% {
134
+ opacity: 0.5;
135
+ }
136
+
137
+ 50% {
138
+ opacity: 1;
139
+ }
140
+ }
141
+
142
+
143
+ :root {
144
+ --cfg-bg: var(--bg);
145
+ --cfg-surface: var(--panel);
146
+ --cfg-text: var(--text);
147
+ --cfg-muted: var(--text-secondary);
148
+ --cfg-border: var(--border);
149
+ --cfg-toggle-knob: var(--panel);
150
+ --cfg-toggle-knob-ring: color-mix(in srgb, var(--text) 72%, transparent);
151
+ --cfg-toggle-on: var(
152
+ --color-text-info,
153
+ var(--color-background-info, var(--color-background-success, color-mix(in srgb, var(--accent) 72%, var(--cfg-border))))
154
+ );
155
+ }
156
+
157
+ body {
158
+ margin: 0;
159
+ font-family: var(--font-sans, "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif);
160
+ background: var(--cfg-bg);
161
+ color: var(--cfg-text);
162
+ }
163
+
164
+ .config-shell {
165
+ max-width: none;
166
+ min-height: 0;
167
+ padding: 8px;
168
+ opacity: 0;
169
+ transform: translateY(4px);
170
+ animation: cfg-fade-in 180ms ease-out forwards;
171
+ }
172
+
173
+ @keyframes cfg-fade-in {
174
+ from {
175
+ opacity: 0;
176
+ transform: translateY(4px);
177
+ }
178
+ to {
179
+ opacity: 1;
180
+ transform: translateY(0);
181
+ }
182
+ }
183
+
184
+ .config-card {
185
+ margin-top: 6px;
186
+ background: var(--cfg-surface);
187
+ border: 1px solid color-mix(in srgb, var(--cfg-border) 50%, transparent);
188
+ border-radius: 16px;
189
+ overflow: hidden;
190
+ }
191
+
192
+ .panel-content-wrapper {
193
+ padding: 10px;
194
+ display: block;
195
+ overflow: hidden;
196
+ min-height: 0;
197
+ background: inherit;
198
+ }
199
+
200
+ .settings-stack {
201
+ display: grid;
202
+ gap: 0;
203
+ overflow: visible;
204
+ background: inherit;
205
+ }
206
+
207
+ .setting-row {
208
+ border-bottom: none;
209
+ background: transparent;
210
+ padding: 10px 4px;
211
+ display: grid;
212
+ grid-template-columns: minmax(0, 1fr) auto;
213
+ gap: 12px;
214
+ align-items: center;
215
+ }
216
+
217
+ .setting-row + .setting-row {
218
+ border-top: 1px solid color-mix(in srgb, var(--cfg-border) 40%, transparent);
219
+ }
220
+
221
+ .setting-info h3 {
222
+ margin: 0;
223
+ font-size: 14px;
224
+ font-weight: 600;
225
+ }
226
+
227
+ .setting-info p {
228
+ margin: 2px 0 0;
229
+ font-size: 12px;
230
+ color: var(--cfg-muted);
231
+ line-height: 1.45;
232
+ }
233
+
234
+ .setting-info .setting-summary {
235
+ margin-top: 6px;
236
+ font-size: 11px;
237
+ color: var(--cfg-muted);
238
+ font-weight: 500;
239
+ }
240
+
241
+ .setting-control {
242
+ min-width: 180px;
243
+ justify-self: end;
244
+ display: flex;
245
+ justify-content: flex-end;
246
+ align-items: center;
247
+ gap: 8px;
248
+ }
249
+
250
+ .setting-inline-input {
251
+ width: 120px;
252
+ box-sizing: border-box;
253
+ border: 1px solid var(--cfg-border);
254
+ border-radius: 10px;
255
+ padding: 8px 10px;
256
+ font: inherit;
257
+ font-size: 13px;
258
+ color: var(--cfg-text);
259
+ background: transparent;
260
+ }
261
+
262
+ .setting-inline-action {
263
+ border: 1px solid var(--cfg-border);
264
+ background: transparent;
265
+ color: var(--cfg-text);
266
+ border-radius: 10px;
267
+ padding: 7px 12px;
268
+ font: inherit;
269
+ font-size: 12px;
270
+ cursor: pointer;
271
+ }
272
+
273
+ .setting-inline-select {
274
+ width: 120px;
275
+ box-sizing: border-box;
276
+ border: 1px solid var(--cfg-border);
277
+ border-radius: 10px;
278
+ padding: 8px 10px;
279
+ font: inherit;
280
+ font-size: 13px;
281
+ color: var(--cfg-text);
282
+ background: transparent;
283
+ }
284
+
285
+ .setting-shell-control {
286
+ display: grid;
287
+ gap: 6px;
288
+ justify-items: end;
289
+ }
290
+
291
+ .setting-shell-custom {
292
+ width: 120px;
293
+ }
294
+
295
+ .hidden {
296
+ display: none;
297
+ }
298
+
299
+ .config-tooltip[hidden] {
300
+ display: none;
301
+ }
302
+
303
+ .config-tooltip {
304
+ position: fixed;
305
+ right: 12px;
306
+ bottom: 12px;
307
+ z-index: 40;
308
+ max-width: min(420px, calc(100vw - 24px));
309
+ padding: 8px 10px;
310
+ border-radius: 10px;
311
+ border: 1px solid color-mix(in srgb, var(--cfg-border) 70%, transparent);
312
+ background: color-mix(in srgb, var(--panel) 90%, var(--cfg-border));
313
+ color: var(--cfg-text);
314
+ font-size: 12px;
315
+ line-height: 1.35;
316
+ box-shadow: 0 10px 30px color-mix(in srgb, var(--cfg-border) 26%, transparent);
317
+ }
318
+
319
+ .config-tooltip--error {
320
+ border-color: color-mix(in srgb, var(--error-text) 55%, var(--cfg-border));
321
+ background: color-mix(in srgb, var(--error-text) 10%, var(--panel));
322
+ }
323
+
324
+ .config-tooltip--success {
325
+ border-color: color-mix(in srgb, var(--success-text) 55%, var(--cfg-border));
326
+ background: color-mix(in srgb, var(--success-text) 8%, var(--panel));
327
+ }
328
+
329
+ .setting-inline-static {
330
+ font-size: 12px;
331
+ color: var(--cfg-muted);
332
+ }
333
+
334
+ .setting-switch {
335
+ display: inline-flex;
336
+ align-items: center;
337
+ position: relative;
338
+ width: 40px;
339
+ height: 24px;
340
+ cursor: pointer;
341
+ }
342
+
343
+ .setting-switch input {
344
+ position: absolute;
345
+ inset: 0;
346
+ width: 100%;
347
+ height: 100%;
348
+ opacity: 0;
349
+ pointer-events: auto;
350
+ cursor: pointer;
351
+ }
352
+
353
+ .array-modal[hidden] {
354
+ display: none;
355
+ }
356
+
357
+ .array-modal {
358
+ position: fixed;
359
+ inset: 0;
360
+ background: rgba(0, 0, 0, 0.24);
361
+ display: grid;
362
+ place-items: center;
363
+ z-index: 20;
364
+ }
365
+
366
+ .array-modal-card {
367
+ width: min(760px, calc(100vw - 32px));
368
+ max-height: min(88vh, 900px);
369
+ background: var(--panel);
370
+ border: 1px solid var(--cfg-border);
371
+ border-radius: 14px;
372
+ padding: 12px;
373
+ box-sizing: border-box;
374
+ display: grid;
375
+ grid-template-rows: auto auto auto auto minmax(0, 1fr);
376
+ gap: 8px;
377
+ overflow: hidden;
378
+ }
379
+
380
+ .array-modal-card header {
381
+ display: flex;
382
+ align-items: center;
383
+ justify-content: space-between;
384
+ }
385
+
386
+ .array-modal-card header h3 {
387
+ margin: 0;
388
+ font-size: 14px;
389
+ }
390
+
391
+ .array-modal-description {
392
+ margin: 0;
393
+ font-size: 12px;
394
+ line-height: 1.4;
395
+ color: var(--cfg-muted);
396
+ }
397
+
398
+ .array-modal-hint {
399
+ margin: 0;
400
+ font-size: 11px;
401
+ line-height: 1.35;
402
+ color: var(--cfg-muted);
403
+ }
404
+
405
+ .array-modal-actions {
406
+ display: flex;
407
+ align-items: center;
408
+ gap: 6px;
409
+ }
410
+
411
+ .array-modal-card header button {
412
+ border: 1px solid var(--cfg-border);
413
+ background: transparent;
414
+ color: var(--cfg-text);
415
+ border-radius: 8px;
416
+ width: 30px;
417
+ height: 30px;
418
+ padding: 0;
419
+ display: inline-flex;
420
+ align-items: center;
421
+ justify-content: center;
422
+ cursor: pointer;
423
+ }
424
+
425
+ .array-modal-card header button svg {
426
+ width: 14px;
427
+ height: 14px;
428
+ fill: none;
429
+ stroke: currentcolor;
430
+ stroke-width: 2;
431
+ stroke-linecap: round;
432
+ stroke-linejoin: round;
433
+ }
434
+
435
+ .array-modal-error {
436
+ margin: 0;
437
+ font-size: 12px;
438
+ line-height: 1.35;
439
+ color: var(--error-text);
440
+ }
441
+
442
+ .array-modal-list {
443
+ display: grid;
444
+ gap: 8px;
445
+ min-height: 0;
446
+ overflow: auto;
447
+ }
448
+
449
+ .array-modal-row {
450
+ display: flex;
451
+ align-items: center;
452
+ gap: 8px;
453
+ }
454
+
455
+ .array-modal-row input {
456
+ flex: 1;
457
+ min-width: 0;
458
+ box-sizing: border-box;
459
+ border: 1px solid var(--cfg-border);
460
+ border-radius: 9px;
461
+ padding: 8px 10px;
462
+ background: transparent;
463
+ color: var(--cfg-text);
464
+ font: inherit;
465
+ font-size: 13px;
466
+ }
467
+
468
+ .array-modal-item-remove {
469
+ border: 1px solid var(--cfg-border);
470
+ background: transparent;
471
+ color: var(--cfg-text);
472
+ border-radius: 8px;
473
+ width: 30px;
474
+ height: 30px;
475
+ padding: 0;
476
+ display: inline-flex;
477
+ align-items: center;
478
+ justify-content: center;
479
+ cursor: pointer;
480
+ }
481
+
482
+ .array-modal-item-remove svg {
483
+ width: 14px;
484
+ height: 14px;
485
+ fill: none;
486
+ stroke: currentcolor;
487
+ stroke-width: 2;
488
+ stroke-linecap: round;
489
+ stroke-linejoin: round;
490
+ }
491
+
492
+ .config-boolean-slider {
493
+ width: 40px;
494
+ height: 24px;
495
+ border-radius: 999px;
496
+ background: color-mix(in srgb, var(--cfg-border) 80%, transparent);
497
+ position: relative;
498
+ transition: background 150ms ease;
499
+ }
500
+
501
+ .config-boolean-slider::after {
502
+ content: '';
503
+ width: 18px;
504
+ height: 18px;
505
+ border-radius: 50%;
506
+ background: var(--cfg-toggle-knob);
507
+ border: 1px solid var(--cfg-toggle-knob-ring);
508
+ box-sizing: border-box;
509
+ position: absolute;
510
+ top: 3px;
511
+ left: 3px;
512
+ transition: transform 150ms ease;
513
+ }
514
+
515
+ .setting-switch input:checked + .config-boolean-slider {
516
+ background: var(--cfg-toggle-on);
517
+ }
518
+
519
+ .setting-switch input:checked + .config-boolean-slider::after {
520
+ transform: translateX(16px);
521
+ }
522
+
523
+ .config-shell.host-framed {
524
+ max-width: none;
525
+ min-height: 0;
526
+ padding: 0;
527
+ background: var(--cfg-surface);
528
+ opacity: 1;
529
+ transform: none;
530
+ animation: none;
531
+ }
532
+
533
+ .config-shell.host-framed .config-card {
534
+ margin-top: 0;
535
+ border: none;
536
+ border-radius: 0;
537
+ background: var(--cfg-surface);
538
+ box-shadow: none;
539
+ padding: 0;
540
+ }
541
+
542
+ .config-shell.host-framed .panel-content-wrapper {
543
+ padding: 6px 0;
544
+ }
545
+
546
+ .config-shell.host-framed .compact-row {
547
+ display: none;
548
+ }
549
+
550
+ .config-shell.compact {
551
+ min-height: 0;
552
+ }
553
+
554
+ @media (max-width: 640px) {
555
+ .config-shell {
556
+ padding: 12px;
557
+ min-height: 0;
558
+ }
559
+
560
+ .panel-content-wrapper {
561
+ padding: 12px;
562
+ }
563
+
564
+ .setting-row {
565
+ grid-template-columns: 1fr;
566
+ align-items: start;
567
+ gap: 8px;
568
+ }
569
+
570
+ .setting-control {
571
+ justify-self: stretch;
572
+ justify-content: flex-start;
573
+ min-width: 0;
574
+ }
575
+
576
+ .setting-inline-input,
577
+ .setting-inline-select,
578
+ .setting-shell-custom {
579
+ width: 100%;
580
+ }
581
+
582
+ .array-modal-card {
583
+ width: calc(100vw - 24px);
584
+ max-height: calc(100vh - 24px);
585
+ }
586
+ }
587
+
@@ -0,0 +1,16 @@
1
+ <!doctype html>
2
+ <!--
3
+ Host page for the File Preview MCP UI. It establishes the root structure and script/style loading required to render text, markdown, and HTML previews safely.
4
+ -->
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="utf-8" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
9
+ <title>Web Agent File Preview</title>
10
+ <link rel="stylesheet" href="./styles.css" />
11
+ </head>
12
+ <body>
13
+ <div id="app"></div>
14
+ <script src="./preview-runtime.js"></script>
15
+ </body>
16
+ </html>