@orangepro/orangepro-mcp 0.2.40 → 0.2.42

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.
@@ -50,6 +50,7 @@ a{color:var(--blue);text-decoration:none}
50
50
  .kpi[data-t="nosig"]{--kw:var(--rbg)} .kpi[data-t="nosig"] .kpi-num{color:var(--red)}
51
51
  .kpi[data-t="priority"]{--kw:var(--obg)} .kpi[data-t="priority"] .kpi-num{color:var(--orange)}
52
52
  .metric-scope{margin:9px 2px 0;color:var(--muted);font-size:11.5px;line-height:1.5}
53
+ .scope-note{margin:9px 0 0;padding:9px 11px;border:1px solid var(--abd);background:var(--abg);color:var(--ink2);font-size:11.5px;line-height:1.5;border-radius:6px}
53
54
 
54
55
  /* TABS */
55
56
  nav.tabs{display:flex;gap:2px;margin:18px 0 0;border-bottom:1px solid var(--bd)}
@@ -301,8 +302,6 @@ body{padding-bottom:48px}
301
302
  .mode-btn.active{background:var(--orange);color:#1a0a02;box-shadow:0 1px 3px rgba(240,136,62,.25)}
302
303
  body[data-mode="simple"] .expert-only{display:none!important}
303
304
  body[data-mode="simple"] .kpis{grid-template-columns:repeat(3,1fr)}
304
- body[data-mode="simple"] .gen-test .gen-test-body{display:block}
305
- body[data-mode="simple"] .gen-test .gen-test-toggle{display:none}
306
305
  body[data-mode="simple"] .risk-card{border-left:3px solid var(--orange)}
307
306
  body[data-mode="simple"] .risk-ctx{color:var(--ink2);font-size:13px}
308
307
  body[data-mode="simple"] .todo{font-size:12.5px;font-weight:600;color:var(--ink);background:var(--obg);border-color:var(--obd)}
@@ -345,6 +344,7 @@ body[data-mode="expert"] .simple-only{display:none!important}
345
344
  </div>
346
345
  </header>
347
346
  <div class="provenance" id="provenance"></div>
347
+ <div class="scope-note" id="cli-exclusions" hidden></div>
348
348
 
349
349
  <section class="kpis" id="kpis"></section>
350
350
  <p class="metric-scope" id="metric-scope"></p>
@@ -467,9 +467,13 @@ const D=window.DATA,$=(s)=>document.querySelector(s);
467
467
  var el2=document.getElementById("delta-banner");
468
468
  var d=D.delta;
469
469
  if(!el2||d===undefined)return;
470
- if(d===null){el2.innerHTML='';return;} // first run — baseline just recorded, nothing to compare
470
+ if(d.comparisonState==='first_run'){el2.innerHTML='';return;}
471
471
  var when=new Date(d.baselineTs);
472
472
  var ago=isNaN(when.getTime())?"last run":when.toLocaleString();
473
+ if(d.comparisonState!=='comparable'){
474
+ el2.innerHTML='<div class="delta-wrap"><span class="delta-chip dc-none">Comparison withheld: '+d.comparisonReason+'</span></div>';
475
+ return;
476
+ }
473
477
  if(!d.changed){
474
478
  el2.innerHTML='<div class="delta-wrap"><span class="delta-chip dc-none">No report changes since last run ('+ago+') for the recorded inputs</span></div>';
475
479
  return;
@@ -517,7 +521,12 @@ function scrollToRisk(path){
517
521
  (function(){
518
522
  var hero=document.getElementById("delta-hero");
519
523
  var d=D.delta;
520
- if(!hero||d===undefined||d===null)return;
524
+ if(!hero||d===undefined||d.comparisonState==='first_run')return;
525
+ if(d.comparisonState!=='comparable'){
526
+ hero.className="delta-hero simple-only dh-clear";
527
+ hero.innerHTML='<h3>Comparison withheld</h3><p>'+d.comparisonReason+'</p>';
528
+ return;
529
+ }
521
530
  if(!d.changed){
522
531
  var when=new Date(d.baselineTs);
523
532
  var ago=isNaN(when.getTime())?"last run":when.toLocaleDateString();
@@ -679,6 +688,12 @@ const prov=$("#provenance");
679
688
  const provisional=P.churn!=="available";
680
689
  prov.classList.toggle("warn",provisional);
681
690
  prov.textContent=(provisional?"PROVISIONAL RANKING · ":"VERIFIED INPUTS · ")+"source "+P.source+" · commit "+(P.commit?P.commit.slice(0,12):"unavailable")+" · history "+P.history+" · churn "+P.churn+" ("+P.churnWindow+") · OrangePro "+P.toolVersion+" · input "+P.inputFingerprint+(P.reason?" · "+P.reason:"");
691
+ const excludedCli=D.scan.excludedCliCommands||[];
692
+ if(excludedCli.length){
693
+ const note=$("#cli-exclusions");
694
+ note.hidden=false;
695
+ note.textContent="CLI command entries excluded from the behavior count: "+excludedCli.map(x=>x.path+" ("+x.reason+")").join(" · ");
696
+ }
682
697
  $("#fw-pill").textContent=D.framework;
683
698
 
684
699
  // bridge text in codebase tab
@@ -990,7 +1005,7 @@ function riskCardHtml(r){
990
1005
  const cBadge=t.concern?\`<span class="badge b-info" style="margin-left:6px;font-size:9px">\${esc(t.concern.replace('_',' '))}</span>\`:'';
991
1006
  const iBadge=t.runnable===false?\`<span class="badge b-cand" style="margin-left:6px;font-size:9px">Manual test</span>\`:'';
992
1007
  const bBadge=t.bucket?\`<span class="badge b-info" style="margin-left:6px;font-size:9px">\${esc(String(t.bucket).replace(/_/g,' '))}</span>\`:'';
993
- testsHtml+=\`<div class="gen-test"><div class="gen-test-head"><span class="gen-test-name">\${esc(t.name)}\${cBadge}\${bBadge}\${iBadge}</span><span class="gen-test-assert">\${esc(t.assertion)}</span><button class="copy-btn" onclick="event.stopPropagation();navigator.clipboard.writeText(this.closest('.gen-test').querySelector('.gen-test-body').textContent).then(()=>{this.textContent='Copied!';this.classList.add('copied');setTimeout(()=>{this.textContent='Copy';this.classList.remove('copied')},1500)})">Copy</button><span class="gen-test-toggle">&#9660;</span></div><div class="gen-test-body">\${esc(t.code)}</div></div>\`;
1008
+ testsHtml+=\`<div class="gen-test"><div class="gen-test-head" role="button" tabindex="0" aria-expanded="false"><span class="gen-test-name">\${esc(t.name)}\${cBadge}\${bBadge}\${iBadge}</span><span class="gen-test-assert">\${esc(t.assertion)}</span><button class="copy-btn" onclick="event.stopPropagation();navigator.clipboard.writeText(this.closest('.gen-test').querySelector('.gen-test-body').textContent).then(()=>{this.textContent='Copied!';this.classList.add('copied');setTimeout(()=>{this.textContent='Copy';this.classList.remove('copied')},1500)})">Copy</button><span class="gen-test-toggle" aria-hidden="true">&#9660;</span></div><div class="gen-test-body">\${esc(t.code)}</div></div>\`;
994
1009
  });
995
1010
  testsHtml+=\`</div>\`;
996
1011
  }
@@ -1067,10 +1082,24 @@ renderRisks();
1067
1082
  </div>\`;
1068
1083
  host.addEventListener("click",e=>{const r=e.target.closest("[data-path]");if(r&&topPaths.has(r.getAttribute("data-path")))scrollToRisk(r.getAttribute("data-path"));});
1069
1084
  })();
1070
- // toggle test expand
1085
+ // Generated-test drafts are collapsed by default in every view. Keep the
1086
+ // control operable by pointer and keyboard; Simple mode must not override it.
1087
+ function toggleGeneratedTest(h){
1088
+ const item=h.closest('.gen-test');
1089
+ if(!item)return;
1090
+ const open=item.classList.toggle('open');
1091
+ h.setAttribute('aria-expanded',String(open));
1092
+ }
1071
1093
  document.addEventListener('click',e=>{
1072
1094
  const h=e.target.closest('.gen-test-head');
1073
- if(h)h.parentElement.classList.toggle('open');
1095
+ if(h)toggleGeneratedTest(h);
1096
+ });
1097
+ document.addEventListener('keydown',e=>{
1098
+ const h=e.target.closest('.gen-test-head');
1099
+ if(h&&(e.key==='Enter'||e.key===' ')){
1100
+ e.preventDefault();
1101
+ toggleGeneratedTest(h);
1102
+ }
1074
1103
  });
1075
1104
 
1076
1105
  // tabs
@@ -415,7 +415,7 @@ function initViz() {
415
415
  function dotTip(e){
416
416
  var label = (dt.tier === 'proven') ? 'Proven — dynamic targeted proof'
417
417
  : (dt.tier === 'runtime') ? 'Runtime-covered — executed by a coverage report, not proof'
418
- : (dt.tier === 'associated') ? 'Associated — name/path/import/structural matching only, not proof'
418
+ : (dt.tier === 'associated') ? 'Associated — resolved static test-to-behavior invocation; not execution or mutation proof'
419
419
  : 'No link — no static or runtime signal';
420
420
  showTip('<div class="tt">' + esc(dt.area) + ' &middot; symbol</div>' +
421
421
  '<div class="trow"><span>tier</span><span class="v" style="color:' + col + '">' + TIER[dt.tier].label + '</span></div>' +
@@ -1022,12 +1022,12 @@ const HTML_TEMPLATE = `<!DOCTYPE html>
1022
1022
  <h3>Tiers</h3>
1023
1023
  <div class="legend-row"><svg class="gly" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5.2" fill="var(--proven)"/></svg><div><div class="lt">Dynamic Proven</div><div class="ld">disc · dynamic targeted proof</div></div></div>
1024
1024
  <div class="legend-row"><svg class="gly" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5.2" fill="var(--runtime)"/></svg><div><div class="lt">Runtime-covered</div><div class="ld">disc · executed by coverage, not proof</div></div></div>
1025
- <div class="legend-row"><svg class="gly" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5" fill="none" stroke="var(--assoc)" stroke-width="2.4"/></svg><div><div class="lt">Associated</div><div class="ld">ring · weak signal, not proof</div></div></div>
1025
+ <div class="legend-row"><svg class="gly" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="5" fill="none" stroke="var(--assoc)" stroke-width="2.4"/></svg><div><div class="lt">Associated</div><div class="ld">ring · invocation-backed static signal, not proof</div></div></div>
1026
1026
  <div class="legend-row"><svg class="gly" viewBox="0 0 16 16" aria-hidden="true"><circle cx="8" cy="8" r="4.4" fill="none" stroke="var(--none)" stroke-width="2.2"/><circle cx="8" cy="8" r="7" fill="none" stroke="var(--none)" stroke-width="1" opacity=".55"/></svg><div><div class="lt">No link</div><div class="ld">glowing ring · no test signal</div></div></div>
1027
1027
  </div>
1028
1028
  <div><h3>Code areas</h3><div class="areafilters" id="areafilters"></div></div>
1029
1029
  <div class="explain">
1030
- <b>Tier definitions.</b> Proven = dynamic targeted mutation proof recorded in the local ledger, not static matching or LLM. Runtime-covered = executed by a repo coverage report. Associated signal = name/path/import/structural matching only, not semantic proof. No link = no direct static or runtime signal found. Broad e2e or integration coverage may still exist.
1030
+ <b>Tier definitions.</b> Proven = dynamic targeted mutation proof recorded in the local ledger, not static matching or LLM. Runtime-covered = executed by a repo coverage report. Associated signal = a resolved static test-to-behavior invocation. It is not execution evidence and does not prove the test detects failure. No link = no direct static or runtime signal found. Broad e2e or integration coverage may still exist.
1031
1031
  </div>
1032
1032
  </div>
1033
1033
  <div class="stage" id="stage">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orangepro/orangepro-mcp",
3
- "version": "0.2.40",
3
+ "version": "0.2.42",
4
4
  "private": false,
5
5
  "description": "OrangePro (`opro`) — a local-first, BYOK CLI + MCP server that builds an evidence graph from a local checkout, ingests runtime coverage, and generates grounded tests. Metadata-only exports; no source upload; generated tests stay local.",
6
6
  "license": "MIT",