@mneme-ai/xray 2.155.0 → 2.156.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/index.html +29 -19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mneme-ai/xray",
3
- "version": "2.155.0",
3
+ "version": "2.156.0",
4
4
  "description": "Mneme Repo X-Ray — a signed, raw-free, deterministic X-Ray of any repo. Every number is reproducible from git/AST/metadata and sealed with an offline-verifiable NOTARY receipt. No source code ever leaves the machine; no LLM guesses anything.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/public/index.html CHANGED
@@ -28,10 +28,14 @@
28
28
  h1{font-size:54px;line-height:1.04;font-weight:700;margin:18px 0 14px;letter-spacing:-.035em;color:var(--ink)}
29
29
  .lede{color:var(--sub);font-size:19px;line-height:1.55;max-width:500px;margin:0 auto;font-weight:400}
30
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);
31
+ input{flex:1;padding:0 18px;height:54px;border:1.5px solid #d3d6dd;border-radius:var(--rs);
32
32
  font-size:16px;color:var(--ink);outline:none;background:#fff;transition:border-color .18s, box-shadow .18s}
33
- input::placeholder{color:#b7bbc2}
33
+ input::placeholder{color:#aeb2ba}
34
34
  input:focus{border-color:var(--a);box-shadow:0 0 0 4px var(--a-soft)}
35
+ .btnhelp{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 26px;margin:14px auto 0;max-width:640px;
36
+ color:var(--sub);font-size:13px;line-height:1.5}
37
+ .btnhelp b{color:var(--ink2);font-weight:600}
38
+ .keyhelp{font-size:12.5px;color:var(--sub);margin:12px 0 0;line-height:1.5;text-align:center}
35
39
  button{height:54px;padding:0 24px;border:0;border-radius:var(--rs);background:var(--ink);color:#fff;
36
40
  font-size:15.5px;font-weight:560;cursor:pointer;transition:transform .12s, opacity .18s, background .18s;white-space:nowrap}
37
41
  button:hover{background:#22232c}
@@ -126,6 +130,8 @@
126
130
  .pactions{display:flex;gap:10px;flex-wrap:wrap;padding:16px 30px;background:var(--soft);border-bottom:1px solid var(--line2)}
127
131
  .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
132
  .pwhy{padding:13px 30px;font-size:12.5px;color:var(--sub);background:var(--soft)}
133
+ .paste-hint{align-self:center;font-size:12.5px;color:var(--sub)}
134
+ .paste-hint b{color:var(--ink2);font-weight:560}
129
135
  /* local bridge panel */
130
136
  .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}
131
137
  .localbox.on{display:block}
@@ -181,19 +187,19 @@
181
187
  <p class="lede">Paste a public repo. Get a signed, reproducible X-Ray — dependencies, secrets, bus factor, vitality, complexity. No source leaves the machine. No AI guesses anything.</p>
182
188
  <form id="f">
183
189
  <input id="u" placeholder="https://github.com/owner/repo" autocomplete="off" spellcheck="false" />
184
- <button id="go" type="submit">X-Ray</button>
185
- <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>
190
+ <button id="go" type="submit" title="Health report: dependencies, secrets, risk, who-to-ask">X-Ray</button>
191
+ <button id="packgo" type="button" class="ghostbtn" title="Bundle the whole repo into one AI-ready text you paste into any AI chat">📦 AI Pack</button>
186
192
  </form>
187
- <p class="hint">Every number is <b>reproducible</b> from git / AST / npm metadata and sealed with an <b>offline-verifiable</b> signature.</p>
188
- <div class="steps">
189
- <span><b>1</b> Paste a public repo URL</span>
190
- <span><b>2</b> Get a signed grade in seconds</span>
191
- <span><b>3</b> Private repo? run <code>npx mneme-xray ./path --publish</code> — source never leaves your machine</span>
193
+ <div class="btnhelp">
194
+ <span><b>X-Ray</b> — instant health report: dependencies, secrets, risk &amp; who-to-ask.</span>
195
+ <span><b>📦 AI Pack</b> bundle the whole repo into one text to paste into any AI chat.</span>
192
196
  </div>
197
+ <p class="hint">Every number is <b>reproducible</b> from git, code &amp; package metadata and sealed with an <b>offline-verifiable</b> signature. <span class="muted">Private folder? run <code>npx @mneme-ai/xray bridge</code> and Browse below.</span></p>
193
198
  <details class="keybox">
194
- <summary>Have an X-Ray key? Sign in to keep your reports</summary>
199
+ <summary>🔖 Optional save your reports</summary>
200
+ <div class="keyhelp">A “key” is simply a password you make up (no sign-up). Use the same one any time to find your reports under <b>My repos</b>.</div>
195
201
  <div class="keyrow">
196
- <input id="key" placeholder="your key (any secret string you choose)" autocomplete="off" />
202
+ <input id="key" placeholder="make up a password e.g. my-secret-123" autocomplete="off" />
197
203
  <button id="savekey" type="button">Save</button>
198
204
  <span id="keystate" class="kstate"></span>
199
205
  </div>
@@ -220,7 +226,7 @@
220
226
  <div id="board"></div>
221
227
  </div>
222
228
  </div>
223
- <footer>Mneme — the trust &amp; cost layer for code. Deterministic. Signed. Local-first.</footer>
229
+ <footer>Mneme — the trust &amp; cost layer for code. Deterministic · Signed · Local-first.<br/><span id="copyr">© Mneme</span></footer>
224
230
 
225
231
  <script src="/card.js"></script>
226
232
  <script>
@@ -244,11 +250,13 @@ function mountShare(r){
244
250
  }
245
251
  const badge = `${origin}/badge/${badgeTarget}.svg`;
246
252
  const md = `[![Mneme X-Ray](${badge})](${link})`;
253
+ const ogimg = `${origin}/og/${r.fingerprint}.png`;
247
254
  el.innerHTML = `
248
255
  <img class="badgeimg" src="${badge}" alt="X-Ray badge"/>
249
- <button class="sbtn" data-copy="${esc(md)}">Copy badge markdown</button>
250
- <button class="sbtn ghost" data-copy="${esc(link)}">Copy permalink</button>
251
- <a class="sbtn ghost" href="${link}" target="_blank" rel="noopener">Open ↗</a>`;
256
+ <button class="sbtn" data-copy="${esc(md)}">Copy badge for README</button>
257
+ <button class="sbtn ghost" data-copy="${esc(link)}">Copy share link</button>
258
+ <a class="sbtn ghost" href="${link}" target="_blank" rel="noopener">Open ↗</a>
259
+ <a class="sbtn ghost" href="${ogimg}" target="_blank" rel="noopener" title="The preview image shown when you share the link on X/Slack/LinkedIn">🖼 Preview image</a>`;
252
260
  el.querySelectorAll("[data-copy]").forEach(b=>b.addEventListener("click",async()=>{
253
261
  try{ await navigator.clipboard.writeText(b.dataset.copy); const t=b.textContent; b.textContent="Copied ✓"; setTimeout(()=>b.textContent=t,1200);}catch{}
254
262
  }));
@@ -364,7 +372,7 @@ document.getElementById("localgo").addEventListener("click", async ()=>{
364
372
  }catch(ex){ err.textContent="Could not reach the local agent. Run: npx @mneme-ai/xray bridge"; err.style.display="block"; }
365
373
  finally{ btn.disabled=false; btn.textContent="Scan local"; }
366
374
  });
367
- // ---- AI CONTEXT PACK (beats gitingest: prioritized · budgeted · secret-redacted) ----
375
+ // ---- AI CONTEXT PACK (prioritized · budgeted · secret-redacted · fits any model) ----
368
376
  function renderPack(p){
369
377
  const md = p.markdown || "";
370
378
  document.getElementById("packout").innerHTML = `
@@ -378,13 +386,14 @@ function renderPack(p){
378
386
  </div>
379
387
  </div>
380
388
  <div class="pactions">
381
- <button class="sbtn" id="pcopy">Copy for ChatGPT / Claude</button>
389
+ <button class="sbtn" id="pcopy">📋 Copy for your AI</button>
382
390
  <button class="sbtn ghost" id="pdl">Download .md</button>
391
+ <span class="paste-hint">→ paste into <b>any</b> AI chat (ChatGPT · Claude · Grok · Gemini · Copilot…) so it understands your whole codebase</span>
383
392
  </div>
384
- <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>
393
+ <div class="pwhy">Smarter than a raw repo dump: prioritized by real signals, secret-redacted, and budgeted so it actually fits the model — not millions of unusable tokens.</div>
385
394
  <pre class="pre">${esc(md.slice(0,20000))}${md.length>20000?"\n\n… (truncated preview — Copy/Download for the full pack)":""}</pre>
386
395
  </div>`;
387
- 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{}});
396
+ document.getElementById("pcopy").addEventListener("click",async e=>{try{await navigator.clipboard.writeText(md);e.target.textContent="Copied ✓ — paste into any AI";setTimeout(()=>e.target.textContent="📋 Copy for your AI",1600);}catch{}});
388
397
  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();});
389
398
  }
390
399
  document.getElementById("packgo").addEventListener("click", async ()=>{
@@ -435,6 +444,7 @@ document.getElementById("localpack").addEventListener("click", async ()=>{
435
444
  }catch(ex){ err.textContent="Could not reach the local agent. Run: npx @mneme-ai/xray bridge"; err.style.display="block"; }
436
445
  finally{ btn.disabled=false; btn.textContent="📦 Pack"; }
437
446
  });
447
+ document.getElementById("copyr").textContent = "© " + new Date().getFullYear() + " Mneme · MIT";
438
448
  detectBridge();
439
449
  refreshKeyState();
440
450
  loadList();