@bom0792/herdgate 0.9.36 → 0.9.38
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/.agents/skills/herdr/SKILL.md +100 -0
- package/DESIGN.md +28 -0
- package/README.md +55 -1
- package/package.json +2 -1
- package/plugin/herdr-plugin.toml +17 -0
- package/plugin/server/attachments.mjs +184 -0
- package/plugin/server/e2e.mjs +27 -0
- package/plugin/server/git-safe.mjs +126 -0
- package/plugin/server/index.mjs +317 -5
- package/plugin/server/mobile-tui-core.mjs +701 -41
- package/plugin/server/mobile-tui-stream.mjs +262 -3
- package/plugin/server/pi-receipt-gc.mjs +183 -0
- package/plugin/server/pi-receipt-search.mjs +217 -0
- package/plugin/server/pi-receipts.mjs +125 -13
- package/plugin/server/pi-transcript.mjs +217 -0
- package/plugin/server/pi-usage.mjs +84 -0
- package/plugin/server/pi-wake.mjs +319 -0
- package/plugin/server/pi-worker.d.mts +7 -0
- package/plugin/server/pi-worker.mjs +45 -4
- package/plugin/server/port-attr.mjs +172 -0
- package/plugin/server/sysmon.mjs +212 -0
- package/plugin/server/wake-event.mjs +255 -0
- package/src/agent/index.ts +4 -2
- package/src/agent/qr.ts +70 -0
- package/src/cloud/gateway.ts +5 -1
- package/src/cloud/sshd.ts +5 -8
- package/src/host/main.ts +14 -1
- package/src/web/app.css +379 -0
- package/src/web/app.js +1557 -5
- package/src/web/e2e.js +29 -2
- package/src/web/index.html +1 -0
- package/windows/npm-update.mjs +261 -11
- package/windows/update-policy.mjs +98 -0
package/src/web/app.css
CHANGED
|
@@ -274,6 +274,7 @@ dialog::backdrop {
|
|
|
274
274
|
|
|
275
275
|
.row {
|
|
276
276
|
display: flex;
|
|
277
|
+
flex-wrap: wrap; /* a receipt detail expansion wraps under its row */
|
|
277
278
|
gap: 10px;
|
|
278
279
|
}
|
|
279
280
|
.row button {
|
|
@@ -331,3 +332,381 @@ dialog::backdrop {
|
|
|
331
332
|
word-break: break-word;
|
|
332
333
|
margin: 0;
|
|
333
334
|
}
|
|
335
|
+
|
|
336
|
+
/* Pi worker panel (experimental) — mirrors the SSH leg's disclosure block. */
|
|
337
|
+
#view details.worker {
|
|
338
|
+
border: 1px solid var(--line, #2a2f3a);
|
|
339
|
+
border-radius: 8px;
|
|
340
|
+
padding: 8px 12px;
|
|
341
|
+
margin: 8px 0;
|
|
342
|
+
}
|
|
343
|
+
#view details.worker summary {
|
|
344
|
+
cursor: pointer;
|
|
345
|
+
font-weight: 600;
|
|
346
|
+
}
|
|
347
|
+
#view details.worker textarea,
|
|
348
|
+
#view details.worker input {
|
|
349
|
+
width: 100%;
|
|
350
|
+
box-sizing: border-box;
|
|
351
|
+
margin: 4px 0 8px;
|
|
352
|
+
}
|
|
353
|
+
#view details.worker pre {
|
|
354
|
+
white-space: pre-wrap;
|
|
355
|
+
overflow-wrap: anywhere;
|
|
356
|
+
margin: 4px 0;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
/* Worker activity bar: one row of tab buttons over the shared worker surface. */
|
|
360
|
+
.activity-bar {
|
|
361
|
+
display: flex;
|
|
362
|
+
flex-wrap: wrap;
|
|
363
|
+
gap: 0.4rem;
|
|
364
|
+
margin: 0.2rem 0 0.5rem;
|
|
365
|
+
}
|
|
366
|
+
.activity-bar button.active {
|
|
367
|
+
font-weight: 700;
|
|
368
|
+
border-color: currentColor;
|
|
369
|
+
}
|
|
370
|
+
.recap-view > p:first-of-type {
|
|
371
|
+
margin-top: 0.4rem;
|
|
372
|
+
}
|
|
373
|
+
#view .worker .recap-view > p,
|
|
374
|
+
#view .worker .usage-view > p {
|
|
375
|
+
font-weight: 600;
|
|
376
|
+
margin: 0.5rem 0 0.15rem;
|
|
377
|
+
}
|
|
378
|
+
#view .worker .recap-view > p.muted,
|
|
379
|
+
#view .worker .usage-view > p.muted {
|
|
380
|
+
font-weight: 400;
|
|
381
|
+
}
|
|
382
|
+
#view .worker table {
|
|
383
|
+
border-collapse: collapse;
|
|
384
|
+
font-variant-numeric: tabular-nums;
|
|
385
|
+
font-size: 0.85em;
|
|
386
|
+
margin: 0.25rem 0 0.6rem;
|
|
387
|
+
}
|
|
388
|
+
#view .worker th,
|
|
389
|
+
#view .worker td {
|
|
390
|
+
padding: 0.1rem 0.5rem 0.1rem 0;
|
|
391
|
+
text-align: left;
|
|
392
|
+
}
|
|
393
|
+
#view .worker th {
|
|
394
|
+
font-weight: 600;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/* PWA v2 — Herdr status glyphs: ◉ needs-you, ◐ working, ● done, ✓ idle. */
|
|
398
|
+
:root {
|
|
399
|
+
--warn: #e0af68;
|
|
400
|
+
}
|
|
401
|
+
@media (prefers-color-scheme: light) {
|
|
402
|
+
:root {
|
|
403
|
+
--warn: #a8781f;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
.glyph {
|
|
407
|
+
margin-left: 8px;
|
|
408
|
+
font-weight: 700;
|
|
409
|
+
}
|
|
410
|
+
.glyph-needs {
|
|
411
|
+
color: var(--bad);
|
|
412
|
+
}
|
|
413
|
+
.glyph-working {
|
|
414
|
+
color: var(--warn);
|
|
415
|
+
}
|
|
416
|
+
.glyph-done {
|
|
417
|
+
color: var(--good);
|
|
418
|
+
}
|
|
419
|
+
.glyph-idle {
|
|
420
|
+
color: var(--muted);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/* Chat threads (the Timeline tab, re-imagined): user/assistant bubbles,
|
|
424
|
+
tool-run folds, Delegation cards — and the path:line flash in Diff. */
|
|
425
|
+
.chat-view .threads {
|
|
426
|
+
display: flex;
|
|
427
|
+
flex-direction: column;
|
|
428
|
+
gap: 10px;
|
|
429
|
+
margin-top: 6px;
|
|
430
|
+
}
|
|
431
|
+
.thread {
|
|
432
|
+
display: flex;
|
|
433
|
+
flex-direction: column;
|
|
434
|
+
gap: 8px;
|
|
435
|
+
border: 1px solid var(--line);
|
|
436
|
+
border-radius: 10px;
|
|
437
|
+
background: var(--surface);
|
|
438
|
+
padding: 10px 12px;
|
|
439
|
+
}
|
|
440
|
+
.msg {
|
|
441
|
+
max-width: 92%;
|
|
442
|
+
padding: 8px 11px;
|
|
443
|
+
border-radius: 12px;
|
|
444
|
+
white-space: pre-wrap;
|
|
445
|
+
overflow-wrap: anywhere;
|
|
446
|
+
font-size: 13.5px;
|
|
447
|
+
}
|
|
448
|
+
.msg.user {
|
|
449
|
+
align-self: flex-end;
|
|
450
|
+
background: color-mix(in srgb, var(--accent) 22%, var(--surface));
|
|
451
|
+
border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
|
|
452
|
+
}
|
|
453
|
+
.msg.assistant {
|
|
454
|
+
align-self: flex-start;
|
|
455
|
+
background: var(--bg);
|
|
456
|
+
border: 1px solid var(--line);
|
|
457
|
+
}
|
|
458
|
+
/* tool-run FOLD: one muted line until clicked open. */
|
|
459
|
+
.fold {
|
|
460
|
+
border: 1px dashed var(--line);
|
|
461
|
+
border-radius: 8px;
|
|
462
|
+
padding: 4px 10px;
|
|
463
|
+
font-size: 12.5px;
|
|
464
|
+
color: var(--muted);
|
|
465
|
+
}
|
|
466
|
+
.fold summary {
|
|
467
|
+
cursor: pointer;
|
|
468
|
+
user-select: none;
|
|
469
|
+
white-space: nowrap;
|
|
470
|
+
overflow: hidden;
|
|
471
|
+
text-overflow: ellipsis;
|
|
472
|
+
}
|
|
473
|
+
.fold[open] summary {
|
|
474
|
+
margin-bottom: 4px;
|
|
475
|
+
}
|
|
476
|
+
.folddetail {
|
|
477
|
+
display: flex;
|
|
478
|
+
flex-direction: column;
|
|
479
|
+
gap: 2px;
|
|
480
|
+
font: 11.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
481
|
+
}
|
|
482
|
+
/* Delegation cards: one per background spawn principal. */
|
|
483
|
+
.subagent-cards {
|
|
484
|
+
display: flex;
|
|
485
|
+
flex-wrap: wrap;
|
|
486
|
+
gap: 8px;
|
|
487
|
+
margin: 6px 0;
|
|
488
|
+
}
|
|
489
|
+
.subagent {
|
|
490
|
+
display: flex;
|
|
491
|
+
flex-direction: column;
|
|
492
|
+
align-items: flex-start;
|
|
493
|
+
gap: 2px;
|
|
494
|
+
width: auto;
|
|
495
|
+
margin: 0;
|
|
496
|
+
padding: 8px 12px;
|
|
497
|
+
border-radius: 10px;
|
|
498
|
+
background: var(--surface);
|
|
499
|
+
border: 1px solid var(--line);
|
|
500
|
+
color: var(--fg);
|
|
501
|
+
font-weight: 400;
|
|
502
|
+
text-align: left;
|
|
503
|
+
}
|
|
504
|
+
.subagent.active {
|
|
505
|
+
outline: 2px solid var(--accent);
|
|
506
|
+
}
|
|
507
|
+
.subagent-name {
|
|
508
|
+
font-weight: 600;
|
|
509
|
+
}
|
|
510
|
+
.subagent-status {
|
|
511
|
+
font-size: 12px;
|
|
512
|
+
color: var(--muted);
|
|
513
|
+
}
|
|
514
|
+
.subagent-tokens {
|
|
515
|
+
font-size: 12px;
|
|
516
|
+
color: var(--dim);
|
|
517
|
+
font-variant-numeric: tabular-nums;
|
|
518
|
+
}
|
|
519
|
+
.spawn-thread {
|
|
520
|
+
border: 1px dashed var(--line);
|
|
521
|
+
border-radius: 10px;
|
|
522
|
+
padding: 8px 12px;
|
|
523
|
+
margin: 6px 0;
|
|
524
|
+
}
|
|
525
|
+
/* Receipt detail (receipt.enrich): the expansion under a tapped receipt row —
|
|
526
|
+
transcript facts, two columns on mobile: label left, value right. */
|
|
527
|
+
.receipt-detail {
|
|
528
|
+
flex: 1 1 100%;
|
|
529
|
+
margin-top: 6px;
|
|
530
|
+
padding: 10px 12px;
|
|
531
|
+
border: 1px solid var(--line);
|
|
532
|
+
border-radius: 10px;
|
|
533
|
+
background: var(--bg);
|
|
534
|
+
display: grid;
|
|
535
|
+
grid-template-columns: max-content 1fr;
|
|
536
|
+
gap: 4px 14px;
|
|
537
|
+
font-size: 13px;
|
|
538
|
+
}
|
|
539
|
+
.receipt-detail dt {
|
|
540
|
+
color: var(--muted);
|
|
541
|
+
}
|
|
542
|
+
.receipt-detail dd {
|
|
543
|
+
margin: 0;
|
|
544
|
+
justify-self: end;
|
|
545
|
+
text-align: right;
|
|
546
|
+
font-variant-numeric: tabular-nums;
|
|
547
|
+
overflow-wrap: anywhere;
|
|
548
|
+
}
|
|
549
|
+
.receipt-detail .error {
|
|
550
|
+
margin: 0;
|
|
551
|
+
}
|
|
552
|
+
/* Context fill bar — only rendered when a real window cap is known. */
|
|
553
|
+
.receipt-detail .ctxbar {
|
|
554
|
+
grid-column: 1 / -1;
|
|
555
|
+
height: 6px;
|
|
556
|
+
border-radius: 3px;
|
|
557
|
+
background: color-mix(in srgb, var(--fg) 12%, transparent);
|
|
558
|
+
overflow: hidden;
|
|
559
|
+
}
|
|
560
|
+
.receipt-detail .ctxbar i {
|
|
561
|
+
display: block;
|
|
562
|
+
height: 100%;
|
|
563
|
+
background: var(--accent);
|
|
564
|
+
}
|
|
565
|
+
/* `path:line` links inside a chat bubble jump into the Diff view. */
|
|
566
|
+
.msg .pathline {
|
|
567
|
+
margin: 0;
|
|
568
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
569
|
+
font-size: 0.95em;
|
|
570
|
+
}
|
|
571
|
+
/* path:line deep-link flash in the Diff patch — 3s, then it fades on its own. */
|
|
572
|
+
.diff-patch .flash {
|
|
573
|
+
animation: hg-flash-line 3s ease-out;
|
|
574
|
+
border-radius: 3px;
|
|
575
|
+
}
|
|
576
|
+
@keyframes hg-flash-line {
|
|
577
|
+
0% {
|
|
578
|
+
background: color-mix(in srgb, var(--accent) 45%, transparent);
|
|
579
|
+
}
|
|
580
|
+
100% {
|
|
581
|
+
background: transparent;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
/* Diff: stat header, then the patch with + green, - red, @@ purple. */
|
|
586
|
+
.diff-view .diff-out {
|
|
587
|
+
margin-top: 4px;
|
|
588
|
+
}
|
|
589
|
+
.diff-stat {
|
|
590
|
+
margin: 6px 0;
|
|
591
|
+
white-space: pre-wrap;
|
|
592
|
+
word-break: break-word;
|
|
593
|
+
color: var(--muted);
|
|
594
|
+
font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
595
|
+
}
|
|
596
|
+
.diff-patch {
|
|
597
|
+
margin-top: 6px;
|
|
598
|
+
border: 1px solid var(--line);
|
|
599
|
+
border-radius: 8px;
|
|
600
|
+
background: var(--surface);
|
|
601
|
+
max-height: 60vh;
|
|
602
|
+
overflow: auto;
|
|
603
|
+
font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
604
|
+
}
|
|
605
|
+
.diff-add {
|
|
606
|
+
color: var(--good);
|
|
607
|
+
white-space: pre;
|
|
608
|
+
}
|
|
609
|
+
.diff-del {
|
|
610
|
+
color: var(--bad);
|
|
611
|
+
white-space: pre;
|
|
612
|
+
}
|
|
613
|
+
.diff-hunk {
|
|
614
|
+
color: #c678dd;
|
|
615
|
+
white-space: pre;
|
|
616
|
+
}
|
|
617
|
+
.diff-ctx {
|
|
618
|
+
color: var(--muted);
|
|
619
|
+
white-space: pre;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/* Cmd+K fuzzy-jump overlay (opened by the chord or the header hint). */
|
|
623
|
+
#cmdk-open {
|
|
624
|
+
background: none;
|
|
625
|
+
border: 1px solid var(--line);
|
|
626
|
+
color: var(--dim);
|
|
627
|
+
border-radius: 8px;
|
|
628
|
+
width: auto;
|
|
629
|
+
height: 30px;
|
|
630
|
+
padding: 0 10px;
|
|
631
|
+
margin: 0;
|
|
632
|
+
font-size: 11.5px;
|
|
633
|
+
font-weight: 500;
|
|
634
|
+
cursor: pointer;
|
|
635
|
+
}
|
|
636
|
+
.cmdk {
|
|
637
|
+
position: fixed;
|
|
638
|
+
inset: 0;
|
|
639
|
+
background: rgb(0 0 0 / 0.45);
|
|
640
|
+
display: flex;
|
|
641
|
+
justify-content: center;
|
|
642
|
+
align-items: flex-start;
|
|
643
|
+
padding: 12vh 16px 16px;
|
|
644
|
+
z-index: 40;
|
|
645
|
+
}
|
|
646
|
+
.cmdk[hidden] {
|
|
647
|
+
display: none;
|
|
648
|
+
}
|
|
649
|
+
.cmdk-box {
|
|
650
|
+
width: min(92vw, 480px);
|
|
651
|
+
height: fit-content;
|
|
652
|
+
background: var(--surface);
|
|
653
|
+
border: 1px solid var(--line);
|
|
654
|
+
border-radius: 12px;
|
|
655
|
+
padding: 12px;
|
|
656
|
+
box-shadow: 0 18px 50px rgb(0 0 0 / 0.35);
|
|
657
|
+
}
|
|
658
|
+
.cmdk-box input {
|
|
659
|
+
margin-bottom: 8px;
|
|
660
|
+
}
|
|
661
|
+
.cmdk-list {
|
|
662
|
+
list-style: none;
|
|
663
|
+
margin: 0 0 8px;
|
|
664
|
+
padding: 0;
|
|
665
|
+
max-height: 46vh;
|
|
666
|
+
overflow-y: auto;
|
|
667
|
+
display: flex;
|
|
668
|
+
flex-direction: column;
|
|
669
|
+
gap: 2px;
|
|
670
|
+
}
|
|
671
|
+
.cmdk-list li {
|
|
672
|
+
padding: 8px 10px;
|
|
673
|
+
border-radius: 8px;
|
|
674
|
+
cursor: pointer;
|
|
675
|
+
font-size: 13.5px;
|
|
676
|
+
}
|
|
677
|
+
.cmdk-list li.active {
|
|
678
|
+
background: var(--bg);
|
|
679
|
+
outline: 1px solid var(--accent);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
/* ---- Wave C3: composer attachments (📎) ---- */
|
|
683
|
+
|
|
684
|
+
/* The paperclip sits in the composer row like a sibling action, not a full-width
|
|
685
|
+
input: same tap target, quieter than the primary Submit. */
|
|
686
|
+
button.attach {
|
|
687
|
+
width: auto;
|
|
688
|
+
padding: 11px 14px;
|
|
689
|
+
background: none;
|
|
690
|
+
color: var(--fg);
|
|
691
|
+
border-color: var(--line);
|
|
692
|
+
font-weight: 500;
|
|
693
|
+
line-height: 1;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
/* One transient refusal line pinned above the fold's bottom — upload errors say
|
|
697
|
+
themselves, no view blanks behind them. */
|
|
698
|
+
.toast {
|
|
699
|
+
position: fixed;
|
|
700
|
+
left: 50%;
|
|
701
|
+
bottom: 18px;
|
|
702
|
+
transform: translateX(-50%);
|
|
703
|
+
max-width: min(92vw, 480px);
|
|
704
|
+
background: var(--surface);
|
|
705
|
+
border: 1px solid var(--bad);
|
|
706
|
+
color: var(--fg);
|
|
707
|
+
border-radius: var(--radius);
|
|
708
|
+
padding: 10px 14px;
|
|
709
|
+
font-size: 13px;
|
|
710
|
+
box-shadow: 0 6px 24px rgb(0 0 0 / 0.35);
|
|
711
|
+
z-index: 40;
|
|
712
|
+
}
|