@mneme-ai/xray 2.152.0 → 2.154.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/dist/battery/security.d.ts +3 -0
- package/dist/battery/security.d.ts.map +1 -0
- package/dist/battery/security.js +121 -0
- package/dist/battery/security.js.map +1 -0
- package/dist/bin.js +33 -0
- package/dist/bin.js.map +1 -1
- package/dist/bridge.d.ts.map +1 -1
- package/dist/bridge.js +19 -0
- package/dist/bridge.js.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +23 -6
- package/dist/engine.js.map +1 -1
- package/dist/gauntlet.d.ts.map +1 -1
- package/dist/gauntlet.js +1 -0
- package/dist/gauntlet.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pack.d.ts +17 -0
- package/dist/pack.d.ts.map +1 -0
- package/dist/pack.js +168 -0
- package/dist/pack.js.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +32 -1
- package/dist/server.js.map +1 -1
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/public/card.js +5 -0
- package/public/index.html +187 -113
package/public/index.html
CHANGED
|
@@ -7,140 +7,160 @@
|
|
|
7
7
|
<link rel="icon" href="/favicon.svg" />
|
|
8
8
|
<style>
|
|
9
9
|
:root{
|
|
10
|
-
--ink:#
|
|
11
|
-
--
|
|
12
|
-
--
|
|
10
|
+
--ink:#0b0b0f; --ink2:#33333b; --sub:#8b8f98; --line:#ececef; --line2:#f3f3f5;
|
|
11
|
+
--bg:#ffffff; --soft:#fafafb; --a:#5b5bf6; --a-soft:#eef0ff;
|
|
12
|
+
--green:#16a34a; --amber:#d97706; --red:#e11d48;
|
|
13
|
+
--r:18px; --rs:12px;
|
|
14
|
+
--sh:0 1px 2px rgba(11,11,20,.04), 0 14px 44px -12px rgba(11,11,20,.10);
|
|
15
|
+
--sh-sm:0 1px 2px rgba(11,11,20,.05);
|
|
13
16
|
}
|
|
14
17
|
*{box-sizing:border-box}
|
|
15
|
-
html
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
18
|
+
html{-webkit-text-size-adjust:100%}
|
|
19
|
+
body{margin:0;background:var(--bg);color:var(--ink2);
|
|
20
|
+
font:16px/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",Inter,"Helvetica Neue",Roboto,sans-serif;
|
|
21
|
+
-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
|
|
22
|
+
font-feature-settings:"cv11","ss01";letter-spacing:-0.011em}
|
|
23
|
+
::selection{background:var(--a-soft)}
|
|
24
|
+
.wrap{max-width:720px;margin:0 auto;padding:0 24px}
|
|
25
|
+
/* hero */
|
|
26
|
+
header{padding:96px 0 40px;text-align:center}
|
|
27
|
+
.mark{font-size:12px;letter-spacing:.22em;text-transform:uppercase;color:var(--sub);font-weight:600}
|
|
28
|
+
h1{font-size:54px;line-height:1.04;font-weight:700;margin:18px 0 14px;letter-spacing:-.035em;color:var(--ink)}
|
|
29
|
+
.lede{color:var(--sub);font-size:19px;line-height:1.55;max-width:500px;margin:0 auto;font-weight:400}
|
|
30
|
+
form{display:flex;gap:10px;margin:38px auto 10px;max-width:600px}
|
|
31
|
+
input{flex:1;padding:0 18px;height:54px;border:1px solid var(--line);border-radius:var(--rs);
|
|
32
|
+
font-size:16px;color:var(--ink);outline:none;background:#fff;transition:border-color .18s, box-shadow .18s}
|
|
33
|
+
input::placeholder{color:#b7bbc2}
|
|
34
|
+
input:focus{border-color:var(--a);box-shadow:0 0 0 4px var(--a-soft)}
|
|
35
|
+
button{height:54px;padding:0 24px;border:0;border-radius:var(--rs);background:var(--ink);color:#fff;
|
|
36
|
+
font-size:15.5px;font-weight:560;cursor:pointer;transition:transform .12s, opacity .18s, background .18s;white-space:nowrap}
|
|
37
|
+
button:hover{background:#22232c}
|
|
38
|
+
button:active{transform:scale(.98)}
|
|
39
|
+
button:disabled{opacity:.5;cursor:default}
|
|
40
|
+
.hint{color:var(--sub);font-size:13.5px;text-align:center;line-height:1.6}
|
|
41
|
+
.hint b{color:var(--ink2);font-weight:560}
|
|
32
42
|
.err{color:var(--red);text-align:center;margin-top:18px;font-size:14.5px}
|
|
33
|
-
/*
|
|
34
|
-
.card{border:1px solid var(--line);border-radius:
|
|
35
|
-
box-shadow:
|
|
36
|
-
@keyframes rise{from{opacity:0;transform:translateY(
|
|
37
|
-
.card .top{display:flex;align-items:center;gap:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
.g-
|
|
42
|
-
.
|
|
43
|
-
.
|
|
44
|
-
.
|
|
45
|
-
.
|
|
43
|
+
/* cards */
|
|
44
|
+
.card,.packcard{border:1px solid var(--line);border-radius:var(--r);margin-top:32px;overflow:hidden;
|
|
45
|
+
background:#fff;box-shadow:var(--sh);animation:rise .35s cubic-bezier(.2,.7,.2,1)}
|
|
46
|
+
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
|
|
47
|
+
.card .top{display:flex;align-items:center;gap:22px;padding:28px 30px;border-bottom:1px solid var(--line2);
|
|
48
|
+
background:linear-gradient(180deg,#fff,#fcfcfd)}
|
|
49
|
+
.grade{width:72px;height:72px;border-radius:16px;display:grid;place-items:center;
|
|
50
|
+
font-size:36px;font-weight:740;color:#fff;flex:none;box-shadow:inset 0 -2px 6px rgba(0,0,0,.12)}
|
|
51
|
+
.g-A{background:linear-gradient(135deg,#1fb255,#15863f)} .g-B{background:linear-gradient(135deg,#7bb736,#5c8f1e)}
|
|
52
|
+
.g-C{background:linear-gradient(135deg,#eaa83a,#c9821a)} .g-D{background:linear-gradient(135deg,#f0742e,#d4571a)}
|
|
53
|
+
.g-F{background:linear-gradient(135deg,#f43f5e,#be123c)}
|
|
54
|
+
.top .repo{font-size:22px;font-weight:640;letter-spacing:-.02em;color:var(--ink);word-break:break-all;line-height:1.2}
|
|
55
|
+
.top .head{color:var(--sub);font-size:14px;margin-top:4px}
|
|
56
|
+
.rows{padding:6px 30px 16px}
|
|
57
|
+
.row{display:flex;gap:18px;padding:17px 0;border-bottom:1px solid var(--line2);align-items:baseline}
|
|
46
58
|
.row:last-child{border-bottom:0}
|
|
47
|
-
.row .k{
|
|
48
|
-
.row .
|
|
49
|
-
.
|
|
50
|
-
.
|
|
51
|
-
.
|
|
52
|
-
.
|
|
53
|
-
.
|
|
59
|
+
.row .k{width:132px;flex:none;display:flex;flex-direction:column;gap:3px}
|
|
60
|
+
.row .k>:first-child,.row .k{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:var(--sub);font-weight:600}
|
|
61
|
+
.kdesc{font-size:11px;color:#a3a7af;text-transform:none;letter-spacing:0;font-weight:400;line-height:1.35}
|
|
62
|
+
.row .v{font-size:15px;color:var(--ink2)}
|
|
63
|
+
.row .v .big{font-weight:660;color:var(--ink);font-size:16px}
|
|
64
|
+
.muted{color:var(--sub)}
|
|
65
|
+
.spark{font-family:ui-monospace,Menlo,monospace;letter-spacing:1px;color:var(--a)}
|
|
66
|
+
.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
|
|
67
|
+
.chip{font-size:12px;padding:4px 10px;border-radius:8px;background:var(--soft);border:1px solid var(--line);color:#5c616b;font-weight:450}
|
|
68
|
+
.chip.bad{background:#fff1f3;border-color:#ffe0e6;color:var(--red)}
|
|
69
|
+
.chip.warn{background:#fff8ed;border-color:#fde6cc;color:#b45309}
|
|
54
70
|
.foot{display:flex;align-items:center;justify-content:space-between;gap:12px;
|
|
55
|
-
padding:16px
|
|
71
|
+
padding:16px 30px;background:var(--soft);font-size:13px;color:var(--sub);flex-wrap:wrap}
|
|
56
72
|
.verified{display:inline-flex;align-items:center;gap:7px;color:var(--green);font-weight:560}
|
|
57
|
-
.dot{width:8px;height:8px;border-radius:50%;background:var(--green)}
|
|
58
|
-
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.
|
|
62
|
-
.bitem{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--soft);font-size:14.5px}
|
|
63
|
-
.bg{width:24px;height:24px;border-radius:7px;display:grid;place-items:center;color:#fff;font-size:12px;font-weight:700;flex:none}
|
|
64
|
-
.bitem .nm{font-weight:540}.bitem .hd{color:var(--sub);margin-left:auto;font-size:13px}
|
|
65
|
-
footer{padding:30px 0 60px;text-align:center;color:var(--sub);font-size:13px}
|
|
66
|
-
.pill{display:inline-block;margin-top:14px;font-size:12.5px;color:var(--sub);background:var(--soft);
|
|
67
|
-
border:1px solid var(--line);border-radius:999px;padding:5px 13px}
|
|
68
|
-
.steps{display:flex;flex-wrap:wrap;gap:8px 18px;justify-content:center;margin:18px auto 0;max-width:640px;
|
|
73
|
+
.dot{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 3px rgba(22,163,74,.14)}
|
|
74
|
+
code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12.5px;background:var(--soft);
|
|
75
|
+
padding:2px 6px;border-radius:6px;border:1px solid var(--line)}
|
|
76
|
+
/* secondary panels — quieter than the hero */
|
|
77
|
+
.steps{display:flex;flex-wrap:wrap;gap:10px 22px;justify-content:center;margin:22px auto 0;max-width:660px;
|
|
69
78
|
color:var(--sub);font-size:13px}
|
|
70
|
-
.steps span{display:inline-flex;align-items:center;gap:
|
|
71
|
-
.steps b{display:inline-grid;place-items:center;width:
|
|
79
|
+
.steps span{display:inline-flex;align-items:center;gap:8px}
|
|
80
|
+
.steps b{display:inline-grid;place-items:center;width:19px;height:19px;border-radius:50%;background:var(--ink);
|
|
72
81
|
color:#fff;font-size:11px;font-weight:700}
|
|
73
|
-
.
|
|
74
|
-
|
|
82
|
+
.pill{display:inline-block;margin-top:14px;font-size:12.5px;color:var(--sub);background:var(--soft);
|
|
83
|
+
border:1px solid var(--line);border-radius:999px;padding:5px 13px}
|
|
84
|
+
.keybox{max-width:560px;margin:22px auto 0;font-size:13px;color:var(--sub)}
|
|
85
|
+
.keybox summary{cursor:pointer;text-align:center;list-style:none;color:var(--a);font-weight:540}
|
|
75
86
|
.keybox summary::-webkit-details-marker{display:none}
|
|
76
|
-
.keyrow{display:flex;gap:8px;margin-top:
|
|
77
|
-
.keyrow input{flex:1;padding:
|
|
78
|
-
.keyrow button{padding:
|
|
87
|
+
.keyrow{display:flex;gap:8px;margin-top:14px}
|
|
88
|
+
.keyrow input{flex:1;height:44px;padding:0 14px;border:1px solid var(--line);border-radius:10px;font-size:14px}
|
|
89
|
+
.keyrow button{height:44px;padding:0 18px;border:0;border-radius:10px;background:var(--ink);color:#fff;cursor:pointer;font-size:14px}
|
|
79
90
|
.kstate{align-self:center;color:var(--green);font-size:12.5px;white-space:nowrap}
|
|
80
|
-
|
|
81
|
-
.
|
|
82
|
-
|
|
91
|
+
/* board / listview */
|
|
92
|
+
.board{margin:60px 0 30px}
|
|
93
|
+
.tabs{display:flex;gap:8px;margin-bottom:12px}
|
|
94
|
+
.tab{background:none;border:0;padding:6px 0;margin-right:20px;font-size:12px;letter-spacing:.14em;
|
|
95
|
+
text-transform:uppercase;color:var(--sub);cursor:pointer;border-bottom:2px solid transparent;font-weight:600}
|
|
83
96
|
.tab.on{color:var(--ink);border-bottom-color:var(--ink)}
|
|
84
|
-
.listbox{max-height:
|
|
85
|
-
.bitem{display:flex;align-items:center;gap:
|
|
97
|
+
.listbox{max-height:440px;overflow:auto;border:1px solid var(--line);border-radius:var(--r);background:#fff;box-shadow:var(--sh-sm)}
|
|
98
|
+
.bitem{display:flex;align-items:center;gap:14px;padding:14px 18px;border-bottom:1px solid var(--line2);font-size:14.5px;cursor:pointer;transition:background .12s}
|
|
86
99
|
.bitem:last-child{border-bottom:0}
|
|
87
100
|
.bitem:hover{background:var(--soft)}
|
|
88
|
-
.
|
|
89
|
-
.bitem .nm{font-weight:560;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
90
|
-
.bitem .dates{display:flex;gap:
|
|
91
|
-
.bitem .dates b{color:var(--
|
|
92
|
-
.bitem .cnt{color:var(--sub);font-size:12.5px;white-space:nowrap;min-width:
|
|
93
|
-
.bitem .arr{color
|
|
94
|
-
.bitem.muted{cursor:default;color:var(--sub)}
|
|
95
|
-
.bitem.muted:hover{background:none}
|
|
101
|
+
.bg{width:26px;height:26px;border-radius:8px;display:grid;place-items:center;color:#fff;font-size:12px;font-weight:700;flex:none}
|
|
102
|
+
.bitem .nm{font-weight:560;color:var(--ink);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
103
|
+
.bitem .dates{display:flex;gap:16px;color:var(--sub);font-size:12.5px;white-space:nowrap}
|
|
104
|
+
.bitem .dates b{color:var(--ink2);font-weight:560}
|
|
105
|
+
.bitem .cnt{color:var(--sub);font-size:12.5px;white-space:nowrap;min-width:58px;text-align:right}
|
|
106
|
+
.bitem .arr{color:#c2c6cd}
|
|
107
|
+
.bitem.muted{cursor:default;color:var(--sub)}.bitem.muted:hover{background:none}
|
|
96
108
|
.lock{margin-right:4px}
|
|
97
|
-
.listfoot{display:flex;justify-content:space-between;align-items:center;padding:
|
|
98
|
-
.moreb{padding:
|
|
109
|
+
.listfoot{display:flex;justify-content:space-between;align-items:center;padding:14px 4px 0;font-size:13px}
|
|
110
|
+
.moreb{height:38px;padding:0 18px;border:1px solid var(--line);background:#fff;border-radius:10px;cursor:pointer;font-size:13px;font-weight:540;transition:border-color .15s}
|
|
99
111
|
.moreb:hover{border-color:var(--ink)}
|
|
100
|
-
|
|
101
|
-
.share{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:
|
|
112
|
+
/* share + buttons */
|
|
113
|
+
.share{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:18px 30px;border-top:1px solid var(--line2)}
|
|
102
114
|
.badgeimg{height:20px}
|
|
103
|
-
.sbtn{padding:
|
|
104
|
-
font-size:13px;cursor:pointer;text-decoration:none}
|
|
115
|
+
.sbtn{height:38px;display:inline-flex;align-items:center;padding:0 15px;border:1px solid var(--ink);background:var(--ink);color:#fff;border-radius:10px;
|
|
116
|
+
font-size:13px;font-weight:540;cursor:pointer;text-decoration:none;transition:opacity .15s}
|
|
117
|
+
.sbtn:hover{opacity:.88}
|
|
105
118
|
.sbtn.ghost{background:#fff;color:var(--ink)}
|
|
106
|
-
.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
.
|
|
110
|
-
|
|
111
|
-
.
|
|
112
|
-
.
|
|
113
|
-
.
|
|
114
|
-
.
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
.ghostbtn{background:#fff;color:var(--ink);border:1px solid var(--line)}
|
|
120
|
+
.ghostbtn:hover{background:var(--soft);border-color:var(--ink)}
|
|
121
|
+
/* AI pack card */
|
|
122
|
+
.packcard .ptop{padding:24px 30px;border-bottom:1px solid var(--line2)}
|
|
123
|
+
.packcard .ptop b{font-size:19px;color:var(--ink);font-weight:640}
|
|
124
|
+
.pstats{display:flex;flex-wrap:wrap;gap:20px;margin-top:12px;color:var(--sub);font-size:13.5px}
|
|
125
|
+
.pstats .pn{color:var(--ink);font-weight:660}
|
|
126
|
+
.pactions{display:flex;gap:10px;flex-wrap:wrap;padding:16px 30px;background:var(--soft);border-bottom:1px solid var(--line2)}
|
|
127
|
+
.pre{max-height:440px;overflow:auto;margin:0;padding:20px 30px;font-family:ui-monospace,Menlo,monospace;font-size:12px;line-height:1.55;white-space:pre-wrap;word-break:break-word;color:#4b5059}
|
|
128
|
+
.pwhy{padding:13px 30px;font-size:12.5px;color:var(--sub);background:var(--soft)}
|
|
129
|
+
/* local bridge panel */
|
|
130
|
+
.localbox{max-width:560px;margin:22px auto 0;border:1px solid var(--line);border-radius:var(--rs);padding:18px 20px;background:var(--soft);display:none;text-align:left}
|
|
117
131
|
.localbox.on{display:block}
|
|
118
|
-
.localbox .lh{display:flex;align-items:center;gap:
|
|
119
|
-
.localdot{width:
|
|
120
|
-
.localrow{display:flex;gap:8px;margin-top:
|
|
121
|
-
.localrow input{flex:1;padding:
|
|
122
|
-
.localrow button{padding:
|
|
123
|
-
.localhint{font-size:12px;color:var(--sub);margin-top:
|
|
124
|
-
|
|
132
|
+
.localbox .lh{display:flex;align-items:center;gap:9px;font-size:13.5px;font-weight:560;color:var(--ink2)}
|
|
133
|
+
.localdot{width:9px;height:9px;border-radius:50%;background:var(--green);box-shadow:0 0 0 3px rgba(22,163,74,.14)}
|
|
134
|
+
.localrow{display:flex;gap:8px;margin-top:12px}
|
|
135
|
+
.localrow input{flex:1;height:44px;padding:0 14px;border:1px solid var(--line);border-radius:10px;font-size:13.5px;font-family:ui-monospace,Menlo,monospace}
|
|
136
|
+
.localrow button{height:44px;padding:0 16px;border:0;border-radius:10px;background:var(--ink);color:#fff;cursor:pointer;font-size:13.5px}
|
|
137
|
+
.localhint{font-size:12px;color:var(--sub);margin-top:9px}
|
|
138
|
+
footer{padding:40px 0 70px;text-align:center;color:#aab0b8;font-size:13px}
|
|
139
|
+
.spin{display:inline-block;width:15px;height:15px;border:2px solid currentColor;border-top-color:transparent;
|
|
140
|
+
border-radius:50%;animation:s .7s linear infinite;vertical-align:-2px;margin-right:7px;opacity:.9}
|
|
141
|
+
@keyframes s{to{transform:rotate(360deg)}}
|
|
142
|
+
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
|
|
143
|
+
/* ---- responsive — every breakpoint, every browser ---- */
|
|
125
144
|
@media (max-width:680px){
|
|
126
|
-
.wrap{padding:0
|
|
127
|
-
header{padding:
|
|
128
|
-
h1{font-size:
|
|
129
|
-
.lede{font-size:
|
|
130
|
-
form{flex-direction:column}
|
|
145
|
+
.wrap{padding:0 18px}
|
|
146
|
+
header{padding:56px 0 28px}
|
|
147
|
+
h1{font-size:34px;letter-spacing:-.03em}
|
|
148
|
+
.lede{font-size:16.5px}
|
|
149
|
+
form{flex-direction:column;gap:8px}
|
|
131
150
|
button{width:100%}
|
|
132
|
-
.steps{gap:8px
|
|
133
|
-
.card .top{
|
|
134
|
-
.grade{width:
|
|
135
|
-
.top .repo{font-size:
|
|
136
|
-
.rows{padding:
|
|
137
|
-
.row{flex-direction:column;gap:
|
|
138
|
-
.row .k{width:auto}
|
|
139
|
-
.
|
|
140
|
-
.share{
|
|
141
|
-
.
|
|
151
|
+
.steps{gap:8px 14px;font-size:12.5px}
|
|
152
|
+
.card .top{gap:16px;padding:20px}
|
|
153
|
+
.grade{width:58px;height:58px;font-size:27px;border-radius:14px}
|
|
154
|
+
.top .repo{font-size:18px}
|
|
155
|
+
.rows{padding:2px 18px 10px}
|
|
156
|
+
.row{flex-direction:column;gap:5px;padding:14px 0}
|
|
157
|
+
.row .k{width:auto;flex-direction:row;align-items:baseline;gap:8px}
|
|
158
|
+
.kdesc{display:none}
|
|
159
|
+
.foot,.share,.pactions,.ptop,.pre,.pwhy{padding-left:18px;padding-right:18px}
|
|
160
|
+
.bitem .dates{display:none}.bitem .cnt{min-width:auto}
|
|
161
|
+
.sbtn{flex:1;justify-content:center}
|
|
142
162
|
}
|
|
143
|
-
@media (max-width:380px){ h1{font-size:
|
|
163
|
+
@media (max-width:380px){ h1{font-size:29px} .grade{width:50px;height:50px;font-size:23px} }
|
|
144
164
|
</style>
|
|
145
165
|
</head>
|
|
146
166
|
<body>
|
|
@@ -152,6 +172,7 @@
|
|
|
152
172
|
<form id="f">
|
|
153
173
|
<input id="u" placeholder="https://github.com/owner/repo" autocomplete="off" spellcheck="false" />
|
|
154
174
|
<button id="go" type="submit">X-Ray</button>
|
|
175
|
+
<button id="packgo" type="button" class="ghostbtn" title="Build a prioritized, secret-redacted, token-budgeted context pack to paste into ChatGPT/Claude">📦 AI Pack</button>
|
|
155
176
|
</form>
|
|
156
177
|
<p class="hint">Every number is <b>reproducible</b> from git / AST / npm metadata and sealed with an <b>offline-verifiable</b> signature.</p>
|
|
157
178
|
<div class="steps">
|
|
@@ -172,6 +193,7 @@
|
|
|
172
193
|
<div class="localrow">
|
|
173
194
|
<input id="localpath" placeholder="/absolute/path/to/your/repo (git or not)" autocomplete="off" spellcheck="false" />
|
|
174
195
|
<button id="localgo" type="button">Scan local</button>
|
|
196
|
+
<button id="localpack" type="button" class="ghostbtn">📦 Pack</button>
|
|
175
197
|
</div>
|
|
176
198
|
<div class="localhint">Private code? This reads it locally and shows the signed result here — nothing is uploaded.</div>
|
|
177
199
|
</div>
|
|
@@ -179,6 +201,7 @@
|
|
|
179
201
|
</header>
|
|
180
202
|
|
|
181
203
|
<div id="out"></div>
|
|
204
|
+
<div id="packout"></div>
|
|
182
205
|
|
|
183
206
|
<div class="board">
|
|
184
207
|
<div class="tabs"><button id="tabBoard" class="tab on">Recently X-rayed</button><button id="tabMine" class="tab" style="display:none">My repos</button></div>
|
|
@@ -329,6 +352,57 @@ document.getElementById("localgo").addEventListener("click", async ()=>{
|
|
|
329
352
|
}catch(ex){ err.textContent="Could not reach the local agent. Run: npx @mneme-ai/xray bridge"; err.style.display="block"; }
|
|
330
353
|
finally{ btn.disabled=false; btn.textContent="Scan local"; }
|
|
331
354
|
});
|
|
355
|
+
// ---- AI CONTEXT PACK (beats gitingest: prioritized · budgeted · secret-redacted) ----
|
|
356
|
+
function renderPack(p){
|
|
357
|
+
const md = p.markdown || "";
|
|
358
|
+
document.getElementById("packout").innerHTML = `
|
|
359
|
+
<div class="packcard">
|
|
360
|
+
<div class="ptop"><b>📦 AI Context Pack — ${esc(p.repoName||"repo")}</b>
|
|
361
|
+
<div class="pstats">
|
|
362
|
+
<span><span class="pn">~${(p.estTokens||0).toLocaleString()}</span> tokens (fits your model)</span>
|
|
363
|
+
<span><span class="pn">${p.filesIncluded||0}</span> files (${p.filesFull||0} full · ${p.filesOutline||0} outline)</span>
|
|
364
|
+
<span><span class="pn">${p.secretsRedacted||0}</span> secrets redacted</span>
|
|
365
|
+
${p.filesOmitted?`<span><span class="pn">${p.filesOmitted}</span> low-signal files omitted</span>`:""}
|
|
366
|
+
</div>
|
|
367
|
+
</div>
|
|
368
|
+
<div class="pactions">
|
|
369
|
+
<button class="sbtn" id="pcopy">Copy for ChatGPT / Claude</button>
|
|
370
|
+
<button class="sbtn ghost" id="pdl">Download .md</button>
|
|
371
|
+
</div>
|
|
372
|
+
<div class="pwhy">Unlike a raw dump (gitingest): prioritized by real signals, secret-redacted, and budgeted so it actually fits the model — not millions of unusable tokens.</div>
|
|
373
|
+
<pre class="pre">${esc(md.slice(0,20000))}${md.length>20000?"\n\n… (truncated preview — Copy/Download for the full pack)":""}</pre>
|
|
374
|
+
</div>`;
|
|
375
|
+
document.getElementById("pcopy").addEventListener("click",async e=>{try{await navigator.clipboard.writeText(md);e.target.textContent="Copied ✓";setTimeout(()=>e.target.textContent="Copy for ChatGPT / Claude",1400);}catch{}});
|
|
376
|
+
document.getElementById("pdl").addEventListener("click",()=>{const b=new Blob([md],{type:"text/markdown"});const a=document.createElement("a");a.href=URL.createObjectURL(b);a.download=(p.repoName||"repo").replace(/\W+/g,"-")+"-context-pack.md";a.click();});
|
|
377
|
+
}
|
|
378
|
+
document.getElementById("packgo").addEventListener("click", async ()=>{
|
|
379
|
+
const u=document.getElementById("u").value.trim();
|
|
380
|
+
const err=document.getElementById("err"), btn=document.getElementById("packgo");
|
|
381
|
+
err.style.display="none"; document.getElementById("out").innerHTML=""; document.getElementById("packout").innerHTML="";
|
|
382
|
+
if(!u){ err.textContent="Paste a public repo URL (or use the local agent panel for a private folder)."; err.style.display="block"; return; }
|
|
383
|
+
btn.disabled=true; btn.innerHTML='<span class="spin"></span>Packing…';
|
|
384
|
+
try{
|
|
385
|
+
const res=await fetch("/api/pack",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({gitUrl:u})});
|
|
386
|
+
const data=await res.json();
|
|
387
|
+
if(!res.ok){ err.textContent=data.error||"pack failed"; err.style.display="block"; }
|
|
388
|
+
else { renderPack(data); window.scrollTo({top:document.getElementById("packout").offsetTop-20,behavior:"smooth"}); }
|
|
389
|
+
}catch(ex){ err.textContent=String(ex); err.style.display="block"; }
|
|
390
|
+
finally{ btn.disabled=false; btn.textContent="📦 AI Pack"; }
|
|
391
|
+
});
|
|
392
|
+
document.getElementById("localpack").addEventListener("click", async ()=>{
|
|
393
|
+
const p=document.getElementById("localpath").value.trim();
|
|
394
|
+
const err=document.getElementById("err"), btn=document.getElementById("localpack");
|
|
395
|
+
err.style.display="none"; document.getElementById("out").innerHTML=""; document.getElementById("packout").innerHTML="";
|
|
396
|
+
if(!p) return;
|
|
397
|
+
btn.disabled=true; btn.innerHTML='<span class="spin"></span>Packing…';
|
|
398
|
+
try{
|
|
399
|
+
const res=await fetch(BRIDGE+"/bridge/pack",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({path:p})});
|
|
400
|
+
const data=await res.json();
|
|
401
|
+
if(!res.ok){ err.textContent=data.error||"local pack failed"; err.style.display="block"; }
|
|
402
|
+
else { renderPack(data); window.scrollTo({top:document.getElementById("packout").offsetTop-20,behavior:"smooth"}); }
|
|
403
|
+
}catch(ex){ err.textContent="Could not reach the local agent. Run: npx @mneme-ai/xray bridge"; err.style.display="block"; }
|
|
404
|
+
finally{ btn.disabled=false; btn.textContent="📦 Pack"; }
|
|
405
|
+
});
|
|
332
406
|
detectBridge();
|
|
333
407
|
refreshKeyState();
|
|
334
408
|
loadList();
|