claude-code-memory-explorer 1.1.2 → 1.3.0

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/public/index.html CHANGED
@@ -27,7 +27,7 @@
27
27
  <body>
28
28
  <script src="/vendor/claude-hub-sdk.js"></script>
29
29
  <div class="topbar">
30
- <div class="topbar-logo">
30
+ <div class="topbar-logo" onclick="_goUserHome()" title="User home">
31
31
  <div class="logo-mark"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M3 5v4c0 1.66 4.03 3 9 3s9-1.34 9-3V5"/><path d="M3 9v4c0 1.66 4.03 3 9 3s9-1.34 9-3V9"/><path d="M3 13v4c0 1.66 4.03 3 9 3s9-1.34 9-3v-4"/></svg></div>
32
32
  <span class="logo-text">Memory Diagnoser</span>
33
33
  </div>
@@ -70,6 +70,8 @@
70
70
  </div>
71
71
  </div>
72
72
 
73
+ <div class="home-view" id="homeView"></div>
74
+
73
75
  <!-- Main layout -->
74
76
  <div class="main-layout">
75
77
  <div class="tree-panel" id="treePanel">
package/public/style.css CHANGED
@@ -27,6 +27,8 @@
27
27
  --scope-memory: #c4a06a;
28
28
  --scope-agent-memory: #8aa8a3;
29
29
  --scope-policy: #b58a8a;
30
+ --scope-agent: #aab06a;
31
+ --scope-style: #c48aa8;
30
32
  --font-mono: 'IBM Plex Mono', monospace;
31
33
  --font-serif: 'Playfair Display', serif;
32
34
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
@@ -100,6 +102,7 @@ body {
100
102
  display: flex;
101
103
  align-items: center;
102
104
  gap: 10px;
105
+ cursor: pointer;
103
106
  }
104
107
  .logo-mark {
105
108
  width: 24px;
@@ -358,6 +361,469 @@ body.fp-mode .tree-item.fp-hit {
358
361
  }
359
362
  /* #endregion MAIN_LAYOUT */
360
363
 
364
+ /* #region HOME */
365
+ .home-view {
366
+ display: none;
367
+ flex: 1;
368
+ overflow-y: auto;
369
+ }
370
+ body.home-mode .home-view {
371
+ display: block;
372
+ }
373
+ body.home-mode .budget-bar,
374
+ body.home-mode .main-layout,
375
+ body.home-mode .summary-bar {
376
+ display: none;
377
+ }
378
+ .home-ic {
379
+ width: 1.1em;
380
+ height: 1.1em;
381
+ fill: none;
382
+ stroke: currentColor;
383
+ stroke-width: 2;
384
+ stroke-linecap: round;
385
+ stroke-linejoin: round;
386
+ vertical-align: -2px;
387
+ margin-right: 5px;
388
+ flex-shrink: 0;
389
+ }
390
+ .tree-home-link {
391
+ display: flex;
392
+ align-items: center;
393
+ gap: 6px;
394
+ padding: 6px 12px 8px;
395
+ font-size: 12px;
396
+ min-width: 0;
397
+ }
398
+ .tree-home-crumb,
399
+ .tree-home-all {
400
+ display: inline-flex;
401
+ align-items: center;
402
+ color: var(--accent-text);
403
+ cursor: pointer;
404
+ white-space: nowrap;
405
+ }
406
+ .tree-home-crumb:hover,
407
+ .tree-home-all:hover {
408
+ text-decoration: underline;
409
+ }
410
+ .tree-home-sep {
411
+ color: var(--text-muted);
412
+ }
413
+ .tree-home-focus {
414
+ color: var(--text-primary);
415
+ overflow: hidden;
416
+ text-overflow: ellipsis;
417
+ white-space: nowrap;
418
+ }
419
+ .tree-home-all {
420
+ margin-left: auto;
421
+ font-size: 11px;
422
+ }
423
+ .picker-user .picker-name::before {
424
+ content: '';
425
+ display: inline-block;
426
+ width: 8px;
427
+ height: 8px;
428
+ border-radius: 50%;
429
+ background: var(--scope-user);
430
+ margin-right: 6px;
431
+ }
432
+ /* Home sizes are multiples of --px, which grows on wide screens: real font sizes, not zoom, so text stays crisp. */
433
+ .home {
434
+ --px: 1px;
435
+ max-width: calc(1180 * var(--px));
436
+ margin: 0 auto;
437
+ padding: calc(20 * var(--px)) 16px calc(40 * var(--px));
438
+ font-size: calc(13 * var(--px));
439
+ }
440
+ .home h1 {
441
+ font-family: var(--font-serif);
442
+ font-size: calc(24 * var(--px));
443
+ margin: 0 0 calc(18 * var(--px));
444
+ }
445
+ .home-budget {
446
+ background: var(--bg-elevated);
447
+ border: 1px solid var(--border);
448
+ border-radius: calc(10 * var(--px));
449
+ padding: calc(14 * var(--px)) calc(16 * var(--px));
450
+ margin-bottom: calc(16 * var(--px));
451
+ }
452
+ .home-budget-head {
453
+ display: flex;
454
+ justify-content: space-between;
455
+ align-items: baseline;
456
+ margin-bottom: calc(10 * var(--px));
457
+ gap: calc(12 * var(--px));
458
+ flex-wrap: wrap;
459
+ }
460
+ .home-budget-head .t {
461
+ font-weight: 600;
462
+ }
463
+ .home-budget-head .n {
464
+ font-family: var(--font-serif);
465
+ font-size: calc(30 * var(--px));
466
+ font-weight: 600;
467
+ line-height: 1;
468
+ font-variant-numeric: lining-nums tabular-nums;
469
+ }
470
+ .home-budget-head .n small {
471
+ font-family: var(--font-mono);
472
+ font-size: calc(12 * var(--px));
473
+ color: var(--text-muted);
474
+ font-weight: 400;
475
+ margin-left: calc(4 * var(--px));
476
+ }
477
+ .home-bar {
478
+ display: flex;
479
+ gap: 2px;
480
+ height: calc(12 * var(--px));
481
+ border-radius: calc(6 * var(--px));
482
+ overflow: hidden;
483
+ background: var(--bg-hover);
484
+ }
485
+ .home-bar span {
486
+ display: block;
487
+ height: 100%;
488
+ min-width: 3px;
489
+ }
490
+ .home-legend {
491
+ display: flex;
492
+ gap: calc(14 * var(--px));
493
+ flex-wrap: wrap;
494
+ margin-top: calc(10 * var(--px));
495
+ font-size: calc(12 * var(--px));
496
+ color: var(--text-tertiary);
497
+ }
498
+ .home-legend i {
499
+ display: inline-block;
500
+ width: calc(9 * var(--px));
501
+ height: calc(9 * var(--px));
502
+ border-radius: 2px;
503
+ margin-right: calc(5 * var(--px));
504
+ vertical-align: -1px;
505
+ }
506
+ .home-legend b {
507
+ font-family: var(--font-mono);
508
+ font-weight: 600;
509
+ color: var(--text-secondary);
510
+ margin-left: 2px;
511
+ }
512
+ .home-legend .home-unk,
513
+ .home-legend .home-zero {
514
+ color: var(--text-muted);
515
+ }
516
+ .home-legend .home-unk {
517
+ font-style: italic;
518
+ }
519
+ .home-legend .home-zero i {
520
+ opacity: 0.35;
521
+ }
522
+ .home-legend .home-zero b {
523
+ color: var(--text-muted);
524
+ font-weight: 400;
525
+ }
526
+ .home-grid {
527
+ display: grid;
528
+ grid-template-columns: repeat(3, 1fr);
529
+ gap: calc(12 * var(--px));
530
+ }
531
+ .home-card {
532
+ background: var(--bg-elevated);
533
+ border: 1px solid var(--border);
534
+ border-left: 3px solid var(--c, var(--border));
535
+ border-radius: calc(8 * var(--px));
536
+ padding: calc(12 * var(--px)) calc(14 * var(--px));
537
+ min-width: 0;
538
+ box-shadow: var(--shadow-1);
539
+ }
540
+ .home-card[onclick] {
541
+ cursor: pointer;
542
+ transition:
543
+ border-color 0.12s,
544
+ box-shadow 0.12s;
545
+ }
546
+ .home-card[onclick]:hover {
547
+ border-color: color-mix(in srgb, var(--c) 45%, var(--border));
548
+ border-left-color: var(--c);
549
+ box-shadow: var(--shadow-2);
550
+ }
551
+ .home-card[onclick]:focus-visible {
552
+ outline: 2px solid var(--accent);
553
+ outline-offset: 2px;
554
+ }
555
+ .home-card.wide {
556
+ grid-column: span 2;
557
+ }
558
+ .home-card.full {
559
+ grid-column: 1 / -1;
560
+ }
561
+ .home-ch {
562
+ display: flex;
563
+ align-items: center;
564
+ gap: calc(8 * var(--px));
565
+ margin-bottom: calc(8 * var(--px));
566
+ }
567
+ .home-title {
568
+ display: flex;
569
+ align-items: center;
570
+ font-weight: 600;
571
+ }
572
+ .home-when {
573
+ margin-left: auto;
574
+ font-size: calc(10.5 * var(--px));
575
+ font-family: var(--font-mono);
576
+ padding: calc(2 * var(--px)) calc(6 * var(--px));
577
+ border-radius: calc(4 * var(--px));
578
+ background: var(--bg-surface);
579
+ color: var(--text-tertiary);
580
+ white-space: nowrap;
581
+ overflow: hidden;
582
+ text-overflow: ellipsis;
583
+ max-width: 60%;
584
+ }
585
+ .home-when.always {
586
+ background: var(--accent-dim);
587
+ color: var(--accent-text);
588
+ }
589
+ .home-path {
590
+ font-family: var(--font-mono);
591
+ font-size: calc(11 * var(--px));
592
+ color: var(--text-muted);
593
+ overflow: hidden;
594
+ text-overflow: ellipsis;
595
+ white-space: nowrap;
596
+ margin-bottom: calc(8 * var(--px));
597
+ }
598
+ .home-stats {
599
+ display: flex;
600
+ gap: calc(16 * var(--px));
601
+ font-family: var(--font-mono);
602
+ font-size: calc(12 * var(--px));
603
+ }
604
+ .home-stats b {
605
+ font-size: calc(16 * var(--px));
606
+ font-weight: 600;
607
+ display: block;
608
+ }
609
+ .home-stats span {
610
+ color: var(--text-muted);
611
+ font-size: calc(10.5 * var(--px));
612
+ }
613
+ .home-rows {
614
+ list-style: none;
615
+ margin: calc(8 * var(--px)) 0 0;
616
+ padding: 0;
617
+ font-size: calc(12 * var(--px));
618
+ }
619
+ .home-rows li {
620
+ display: flex;
621
+ gap: calc(8 * var(--px));
622
+ align-items: center;
623
+ padding: calc(4 * var(--px)) 0;
624
+ border-top: 1px dashed var(--border);
625
+ min-width: 0;
626
+ }
627
+ .home-rows li[onclick]:hover .home-nm,
628
+ .home-card[onclick]:hover .home-more .home-nm {
629
+ color: var(--accent-text);
630
+ }
631
+ .home-plugins {
632
+ margin-top: calc(10 * var(--px));
633
+ }
634
+ .home-plugins .home-nm {
635
+ font-family: inherit;
636
+ color: var(--text-tertiary);
637
+ }
638
+ .home-more .home-nm {
639
+ color: var(--text-muted);
640
+ font-size: calc(12 * var(--px));
641
+ }
642
+ .home-nm {
643
+ font-family: var(--font-mono);
644
+ overflow: hidden;
645
+ text-overflow: ellipsis;
646
+ white-space: nowrap;
647
+ }
648
+ .home-r {
649
+ margin-left: auto;
650
+ font-family: var(--font-mono);
651
+ color: var(--text-tertiary);
652
+ white-space: nowrap;
653
+ overflow: hidden;
654
+ text-overflow: ellipsis;
655
+ max-width: 50%;
656
+ }
657
+ .home-mini {
658
+ height: calc(5 * var(--px));
659
+ width: calc(60 * var(--px));
660
+ background: var(--bg-hover);
661
+ border-radius: 3px;
662
+ overflow: hidden;
663
+ flex-shrink: 0;
664
+ margin-left: auto;
665
+ }
666
+ .home-mini + .home-r {
667
+ margin-left: 0;
668
+ }
669
+ .home-mini span {
670
+ display: block;
671
+ height: 100%;
672
+ background: var(--c);
673
+ }
674
+ .home-mini span.warn {
675
+ background: var(--warning);
676
+ }
677
+ .home-pill {
678
+ font-size: calc(10.5 * var(--px));
679
+ padding: calc(1 * var(--px)) calc(6 * var(--px));
680
+ border-radius: 9px;
681
+ font-family: var(--font-mono);
682
+ white-space: nowrap;
683
+ }
684
+ .home-pill.warn {
685
+ background: var(--warning-dim);
686
+ color: var(--warning);
687
+ }
688
+ .home-pill.err {
689
+ background: var(--error-dim);
690
+ color: var(--error);
691
+ }
692
+ .home-pill.ok {
693
+ background: var(--success-dim);
694
+ color: var(--success);
695
+ }
696
+ .home-pill.mut {
697
+ background: var(--bg-surface);
698
+ color: var(--text-muted);
699
+ }
700
+ .home-cols {
701
+ display: grid;
702
+ grid-template-columns: 1fr 1fr;
703
+ gap: calc(14 * var(--px));
704
+ }
705
+ .home-cols > div {
706
+ min-width: 0;
707
+ }
708
+ .home-colh {
709
+ font-size: calc(11.5 * var(--px));
710
+ font-weight: 600;
711
+ color: var(--text-tertiary);
712
+ margin-bottom: calc(2 * var(--px));
713
+ }
714
+ .home-tree {
715
+ font-family: var(--font-mono);
716
+ font-size: calc(11.5 * var(--px));
717
+ color: var(--text-secondary);
718
+ line-height: 1.7;
719
+ margin-top: calc(6 * var(--px));
720
+ }
721
+ .home-tree > div {
722
+ overflow: hidden;
723
+ text-overflow: ellipsis;
724
+ white-space: nowrap;
725
+ }
726
+ .home-tree > div:hover {
727
+ color: var(--accent-text);
728
+ }
729
+ .home-d {
730
+ color: var(--text-muted);
731
+ }
732
+ .home-kv {
733
+ display: grid;
734
+ grid-template-columns: auto 1fr;
735
+ gap: calc(3 * var(--px)) calc(12 * var(--px));
736
+ font-family: var(--font-mono);
737
+ font-size: calc(11.5 * var(--px));
738
+ }
739
+ .home-k {
740
+ color: var(--text-tertiary);
741
+ }
742
+ .home-from {
743
+ color: var(--text-muted);
744
+ font-size: calc(10.5 * var(--px));
745
+ margin-left: calc(6 * var(--px));
746
+ }
747
+ .home-empty {
748
+ color: var(--text-muted);
749
+ font-style: italic;
750
+ font-size: calc(12 * var(--px));
751
+ }
752
+ .home-recents {
753
+ margin-top: calc(22 * var(--px));
754
+ }
755
+ .home-recents h2 {
756
+ font-family: var(--font-serif);
757
+ font-size: calc(16 * var(--px));
758
+ color: var(--text-secondary);
759
+ margin: 0 0 calc(8 * var(--px));
760
+ font-weight: 600;
761
+ }
762
+ .home-chips {
763
+ display: flex;
764
+ gap: calc(8 * var(--px));
765
+ flex-wrap: wrap;
766
+ }
767
+ .home-chip {
768
+ display: flex;
769
+ align-items: center;
770
+ gap: calc(6 * var(--px));
771
+ padding: calc(6 * var(--px)) calc(10 * var(--px));
772
+ background: var(--bg-elevated);
773
+ border: 1px solid var(--border);
774
+ border-radius: calc(6 * var(--px));
775
+ font-family: var(--font-mono);
776
+ font-size: calc(12 * var(--px));
777
+ cursor: pointer;
778
+ }
779
+ .home-chip:hover {
780
+ border-color: var(--accent);
781
+ }
782
+ .home-chip-add {
783
+ color: var(--text-muted);
784
+ }
785
+ .home-dot {
786
+ width: calc(7 * var(--px));
787
+ height: calc(7 * var(--px));
788
+ border-radius: 50%;
789
+ background: var(--scope-project);
790
+ }
791
+ @media (max-width: 960px) {
792
+ .home-grid {
793
+ grid-template-columns: repeat(2, 1fr);
794
+ }
795
+ }
796
+ @media (max-width: 620px) {
797
+ .home-grid,
798
+ .home-cols {
799
+ grid-template-columns: 1fr;
800
+ }
801
+ .home-card.wide {
802
+ grid-column: span 1;
803
+ }
804
+ }
805
+ @media (min-width: 1600px) {
806
+ .home {
807
+ --px: 1.08px;
808
+ }
809
+ }
810
+ @media (min-width: 1900px) {
811
+ .home {
812
+ --px: 1.15px;
813
+ }
814
+ }
815
+ @media (min-width: 2400px) {
816
+ .home {
817
+ --px: 1.25px;
818
+ }
819
+ }
820
+ @media (prefers-reduced-motion: reduce) {
821
+ .home-card[onclick] {
822
+ transition: none;
823
+ }
824
+ }
825
+ /* #endregion HOME */
826
+
361
827
  /* #region TREE */
362
828
  /* filled sticky section bars — same depth language as the marketplace tree headers */
363
829
  .tree-group-header {
@@ -1,18 +1,51 @@
1
- // claude-hub-sdk 1.2.0 (sha256 62c7d9f477b2). Copied by npm run sdk:sync in claude-code-hub. Do not edit.
2
- // Claude Code Hub SDK stub: what an app serves when no hub runs it. Under a hub, the hub hands the
3
- // app its real SDK (client.js) in place of this file. The API must match client.js; a test checks it.
4
- ((root) => {
1
+ // claude-hub-sdk 1.4.0 (sha256 7d559a8888ce). Copied by npm run sdk:sync in claude-code-hub. Do not edit.
2
+ // Claude Code Hub SDK: the one rule that names a key press, shared by the hub page, client.js and
3
+ // stub.js. The hub serves it to its page as /sdk/keys.js; mount() and sdk:sync put it in front of
4
+ // client.js and stub.js, so an app still loads one file.
5
+ // var, not const: the hub page and an app page each load it as a classic script, and a second
6
+ // const declaration in the same page would throw.
7
+ var ClaudeHubKeys = (() => {
5
8
  'use strict';
6
9
 
7
- // A copy of client.js comboOf(); a test checks they match.
10
+ // Modifiers in ctrl, alt, shift, meta order, joined by '+' to the key. macOS composes
11
+ // Option+<key> into a character (Option+1 is '¡', Option+P is 'π') and holding Control does not
12
+ // undo it, so e.key alone cannot name these presses there. e.code is the physical key, which is
13
+ // wrong for non-US layouts, hence only as a fallback. No fallback under AltGraph: Chromium sets it
14
+ // when AltGr types a character, and that press is text. Takes a real KeyboardEvent or a forwarded
15
+ // {key, code} payload; a payload without code degrades to key. A payload needs no AltGraph: the
16
+ // SDK forwards only a press whose key already names a bound combo.
17
+ // Self-contained on purpose: cck puts its source text into a sandboxed frame.
8
18
  function comboOf(e) {
9
19
  const lower = typeof e.key === 'string' ? e.key.toLowerCase() : '';
10
- const m = /^(?:Key|Digit)([A-Z1-9])$/.exec(e.code || '');
20
+ const m = !e.getModifierState?.('AltGraph') && /^(?:Key|Digit)([A-Z1-9])$/.exec(e.code || '');
11
21
  const key = /^[a-z1-9]$/.test(lower) ? lower : m ? m[1].toLowerCase() : e.key;
12
22
  const mods = [e.ctrlKey && 'ctrl', e.altKey && 'alt', e.shiftKey && 'shift', e.metaKey && 'meta'];
13
23
  return [...mods, key].filter(Boolean).join('+');
14
24
  }
15
25
 
26
+ // The keys of a combo as a help row shows them: ['Ctrl', 'Alt', 'P'], or ['⌃', '⌥', 'P'] on macOS.
27
+ // The {n} of a numbered combo reads 1…9.
28
+ function keyParts(combo, mac) {
29
+ const mods = mac
30
+ ? { ctrl: '⌃', alt: '⌥', shift: '⇧', meta: '⌘' }
31
+ : { ctrl: 'Ctrl', alt: 'Alt', shift: 'Shift', meta: 'Win' };
32
+ const named = { '{n}': '1…9', ArrowLeft: '←', ArrowRight: '→', ArrowUp: '↑', ArrowDown: '↓' };
33
+ return combo.split('+').map((k) => mods[k] ?? named[k] ?? (k.length === 1 ? k.toUpperCase() : k));
34
+ }
35
+
36
+ return { comboOf, keyParts };
37
+ })();
38
+
39
+ if (typeof module === 'object' && module.exports) module.exports = ClaudeHubKeys;
40
+
41
+ // Claude Code Hub SDK stub: what an app serves when no hub runs it. Under a hub, the hub hands the
42
+ // app its real SDK (client.js) in place of this file. The API must match client.js; a test checks it.
43
+ ((root) => {
44
+ 'use strict';
45
+
46
+ // keys.js comes first in the synced file. Required as a module, stub.js loads it itself.
47
+ const { comboOf } = typeof ClaudeHubKeys === 'object' ? ClaudeHubKeys : require('./keys');
48
+
16
49
  function createClaudeHub(win) {
17
50
  let hub = null;
18
51
  const off = () => {};
@@ -43,6 +76,7 @@
43
76
  can: (action) => !!standaloneFn(action),
44
77
  forwards: () => false,
45
78
  forwardCombos: () => [],
79
+ keyLabel: () => null,
46
80
  closeGuard() {},
47
81
  openExternal(url) {
48
82
  win.open(url, '_blank', 'noopener');