@orangepro/orangepro-mcp 0.2.20 → 0.2.22

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.
@@ -264,6 +264,18 @@ nav.tabs{display:flex;gap:2px;margin:18px 0 0;border-bottom:1px solid var(--bd)}
264
264
  .paywall-btn:hover{opacity:.85}
265
265
 
266
266
 
267
+ /* PLATFORM CTA: STICKY FOOTER */
268
+ .platform-footer{position:fixed;bottom:0;left:0;right:0;background:linear-gradient(135deg,#1a0a02 0%,#2a1508 100%);border-top:1px solid var(--obd);padding:8px 20px;display:flex;align-items:center;justify-content:center;gap:12px;z-index:999;font-size:12px}
269
+ .platform-footer-text{color:var(--muted);font-size:12px}
270
+ .platform-footer-text b{color:var(--orange);font-weight:700}
271
+ .platform-footer-btn{display:inline-flex;align-items:center;gap:5px;background:var(--orange);color:#1a0a02;font-size:11px;font-weight:700;padding:5px 12px;border-radius:5px;text-decoration:none;transition:opacity .12s;white-space:nowrap}
272
+ .platform-footer-btn:hover{opacity:.85}
273
+ /* PLATFORM CTA: TOP BANNER (inside risk panel) */
274
+ .platform-top-banner{background:linear-gradient(135deg,rgba(240,136,62,.06),rgba(240,136,62,.02));border:1px solid var(--obd);border-radius:8px;padding:10px 14px;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;gap:12px}
275
+ .platform-top-banner-text{font-size:12px;color:var(--muted)}
276
+ .platform-top-banner-text b{color:var(--ink)}
277
+ /* Add bottom padding to body so sticky footer doesn't overlap content */
278
+ body{padding-bottom:48px}
267
279
  /* === OPTION A: MODE TOGGLE (SEGMENTED PILL) === */
268
280
  .mode-switch{display:inline-flex;align-items:center;background:var(--s2);border-radius:7px;padding:3px;gap:2px;border:1px solid var(--bd)}
269
281
  .mode-btn{padding:5px 14px;font:650 11px var(--sans);border-radius:5px;cursor:pointer;border:none;background:transparent;color:var(--muted);transition:all .15s;letter-spacing:.01em}
@@ -442,6 +454,11 @@ const D=window.DATA,$=(s)=>document.querySelector(s);
442
454
  var a=e.target.closest('[data-action]');
443
455
  if(a){
444
456
  var act=a.getAttribute('data-action');
457
+ if(act==='signal'){
458
+ var btab=document.querySelector('[data-tab="behaviors"]');
459
+ if(btab)btab.click();
460
+ return;
461
+ }
445
462
  var t=D.risks.find(function(r){return r.tags&&r.tags.some(function(tg){return act==='proven'?(tg[0]==='Proven'||tg[0]==='Dynamically Proven'):(tg[0]==='Has tests'||tg[0]==='Test signal');});});
446
463
  if(t)scrollToRisk(t.path);
447
464
  }
@@ -449,9 +466,12 @@ const D=window.DATA,$=(s)=>document.querySelector(s);
449
466
  })();
450
467
  // ── Delta Hero: prominent simple-mode section (clickable) ──
451
468
  function scrollToRisk(path){
469
+ if(!path)return;
452
470
  var id='risk-'+path.replace(/[^a-zA-Z0-9]/g,'-');
453
471
  var tab=document.querySelector('[data-tab="risks"]');
454
472
  if(tab)tab.click();
473
+ // Reset filter to "all" so the target card is visible
474
+ if(typeof activeRiskFilter!=='undefined'){activeRiskFilter='all';renderRiskFilters();renderRisks();}
455
475
  setTimeout(function(){
456
476
  var el=document.getElementById(id);
457
477
  if(el){el.scrollIntoView({behavior:'smooth',block:'center'});el.classList.add('highlight-pulse');setTimeout(function(){el.classList.remove('highlight-pulse')},2400);}
@@ -844,6 +864,12 @@ if(cf&&cf.flows.length){
844
864
  });
845
865
  }
846
866
 
867
+ // Platform CTA: after flows
868
+ const flowCta=el("div","paywall",
869
+ \`<div class="paywall-num">\\\${D.flows.length} flows mapped locally</div>
870
+ <div class="paywall-txt">Track flow regressions across commits, correlate with production incidents, and set merge gates on OrangePro Platform.</div>
871
+ <a class="paywall-btn" href="https://orangepro.ai/get-started" target="_blank">Unlock Full Analysis &rarr;</a>\`);
872
+ fl.after(flowCta);
847
873
  // risks + generated test samples
848
874
  const riskList=$("#risk-list"),riskTools=$("#risk-tools");
849
875
  if(D.viewMeta){
@@ -851,6 +877,11 @@ if(D.viewMeta){
851
877
  if(rm&&rm.scored>rm.shown)$("#risk-cap-note").textContent="Showing the top "+rm.shown+" of "+rm.scored.toLocaleString()+" scored behaviors — every behavior is scored; only the highest-risk are surfaced here. Full ranking: opro gaps --limit N, or .orangepro/graph.json.";
852
878
  if(fm&&fm.shown>0&&fm.prunedByCaps>0)$("#flow-cap-note").textContent="Showing "+fm.shown.toLocaleString()+" flows, endpoint-anchored first. "+fm.prunedByCaps.toLocaleString()+" additional branch expansions were pruned by depth/branch/global rendering caps — pruning affects display only, not scoring.";
853
879
  }
880
+ // Platform CTA: top banner in risk panel
881
+ const riskTopBanner=el("div","platform-top-banner",
882
+ \`<span class="platform-top-banner-text">Local scan shows <b>\\\${D.risks.length}</b> priority gaps. Full ranked list, incident correlation, and CI merge gate on Platform.</span>
883
+ <a class="platform-footer-btn" href="https://orangepro.ai/get-started" target="_blank">Unlock Full Analysis &rarr;</a>\`);
884
+ riskList.before(riskTopBanner);
854
885
  const generatedRiskCount=D.risks.filter(r=>r.generatedTests&&r.generatedTests.length).length;
855
886
  let activeRiskFilter=generatedRiskCount?"generated":"all";
856
887
  function riskMatchesFilter(r){
@@ -910,18 +941,18 @@ function riskCardHtml(r){
910
941
  function renderRisks(){
911
942
  riskList.innerHTML="";
912
943
  D.risks.filter(riskMatchesFilter).forEach(r=>{const card=el("div","risk-card",riskCardHtml(r));card.setAttribute("data-path",r.path);card.id="risk-"+r.path.replace(/[^a-zA-Z0-9]/g,"-");riskList.append(card);});
913
- if(activeRiskFilter==="all"&&D.generatedTotal){
944
+ if(D.generatedTotal){
914
945
  const hiddenGeneratedFlows=Math.max(0,generatedRiskCount-D.risks.filter(riskMatchesFilter).length);
915
946
  const remainingRiskFlows=Math.max(0,D.risks.length-generatedRiskCount);
916
947
  riskList.append(el("div","paywall",
917
948
  hiddenGeneratedFlows
918
949
  ? \`<div class="paywall-num">\${hiddenGeneratedFlows} more flows with tests</div>
919
950
  <div class="paywall-txt">OrangePro accepted \${D.generatedTotal} runnable generated test\${D.generatedTotal===1?"":"s"} across \${generatedRiskCount} high-risk flow\${generatedRiskCount===1?"":"s"}. Use the “Flows with tests” filter to review them first.</div>
920
- <a class="paywall-btn" href="https://platform.orangepro.ai/" target="_blank">View all on OrangePro Platform &rarr;</a>\`
951
+ <a class="paywall-btn" href="https://orangepro.ai/get-started" target="_blank">View all on OrangePro Platform &rarr;</a>\`
921
952
  : remainingRiskFlows
922
953
  ? \`<div class="paywall-num">\${remainingRiskFlows} high-risk flows left</div>
923
954
  <div class="paywall-txt">The local MCP accepted \${D.generatedTotal} runnable generated test\${D.generatedTotal===1?"":"s"} across \${generatedRiskCount} high-risk flow\${generatedRiskCount===1?"":"s"}. Generate the remaining high-risk flow tests on OrangePro Platform.</div>
924
- <a class="paywall-btn" href="https://platform.orangepro.ai/" target="_blank">Generate remaining tests on Platform &rarr;</a>\`
955
+ <a class="paywall-btn" href="https://orangepro.ai/get-started" target="_blank">Generate remaining tests on Platform &rarr;</a>\`
925
956
  : \`<div class="paywall-num">All generated tests are shown</div>
926
957
  <div class="paywall-txt">OrangePro generated tests for every high-risk flow in this report, and every generated test is visible here.</div>\`));
927
958
  }
@@ -946,8 +977,19 @@ const tabs=[...document.querySelectorAll(".tab")];
946
977
  tabs.forEach(t=>t.onclick=()=>activateTab(t.dataset.tab));
947
978
  // Set initial tab based on mode
948
979
  activateTab(viewMode==="simple"?"risks":"codebase");
980
+ // Update platform footer with real numbers
981
+ const pf=document.getElementById("platform-cta-footer");
982
+ if(pf&&D.viewMeta&&D.viewMeta.risks){
983
+ const rm=D.viewMeta.risks;
984
+ pf.querySelector(".platform-footer-text").innerHTML=
985
+ \`Showing top <b>\\\${rm.shown}</b> of <b>\\\${rm.scored.toLocaleString()}</b> scored behaviors. Full risk ranking + incident correlation + CI gate on Platform.\`;
986
+ }
949
987
  })();
950
988
  </script>
989
+ <div class="platform-footer" id="platform-cta-footer">
990
+ <span class="platform-footer-text">Showing top <b>20</b> blind spots. Full risk ranking + incident correlation + CI gate on Platform.</span>
991
+ <a class="platform-footer-btn" href="https://orangepro.ai/get-started" target="_blank">Unlock Full Analysis &rarr;</a>
992
+ </div>
951
993
  </body>
952
994
  </html>
953
995
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orangepro/orangepro-mcp",
3
- "version": "0.2.20",
3
+ "version": "0.2.22",
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",