@viberaven/cli 1.4.3 → 1.4.4

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/cli.js CHANGED
@@ -11558,7 +11558,7 @@ var VERSION;
11558
11558
  var init_version = __esm({
11559
11559
  "src/version.ts"() {
11560
11560
  "use strict";
11561
- VERSION = "1.4.3";
11561
+ VERSION = "1.4.4";
11562
11562
  }
11563
11563
  });
11564
11564
 
@@ -19683,17 +19683,47 @@ function ChatEnvironmentConnectCard() {
19683
19683
  const slotHtml = slots.map((slot) => {
19684
19684
  const provider = slot.providerId ? providers.find((item) => item.id === slot.providerId) : null;
19685
19685
  const mcp = provider ? providerMcp(provider) : null;
19686
- const connected = Boolean(mcp && mcp.status === 'connected');
19686
+ // Two independent facts, and the panel used to collapse them into one. MCP
19687
+ // status comes from the user's global config (~/.codex/config.toml), so it
19688
+ // says "connected" for providers this repo does not use \u2014 which contradicted
19689
+ // the card next to it reading actual repo evidence. Project membership wins:
19690
+ // never claim a provider is wired up when it is not in this project.
19691
+ const inProject = Boolean(provider && provider.state !== 'not_detected');
19692
+ const mcpConnected = Boolean(mcp && mcp.status === 'connected');
19693
+ const connected = inProject && mcpConnected;
19687
19694
  const icon = provider
19688
19695
  ? (provider.iconHtml || '<img src="' + providerAssetSrc(provider) + '" alt="" />')
19689
19696
  : Icon('plus');
19690
- const status = connected ? 'Connected' : slot.action === 'more' ? 'Browse' : 'Connect';
19697
+ const tone = slot.action === 'more'
19698
+ ? 'is-browse'
19699
+ : !inProject
19700
+ ? 'is-absent'
19701
+ : connected
19702
+ ? 'is-connected'
19703
+ : 'is-disconnected';
19704
+ const status = slot.action === 'more'
19705
+ ? 'Browse'
19706
+ : !inProject
19707
+ ? 'Not in project'
19708
+ : connected
19709
+ ? 'Connected'
19710
+ : 'Connect';
19711
+ const hint = slot.action === 'more'
19712
+ ? 'Browse every provider card'
19713
+ : !inProject
19714
+ ? slot.label + ' was not found in this repo' + (mcpConnected ? ', even though its MCP server is in your global config' : '')
19715
+ : connected
19716
+ ? slot.label + ' is in this repo and chat can read its live state'
19717
+ : slot.label + ' is in this repo. Connect MCP so chat reads live state instead of guessing.';
19718
+ // A provider that is not in the repo has nothing to connect, so send that
19719
+ // click to the provider context flow (which prefills the "help me add it"
19720
+ // mission) rather than an MCP connect that would not mean anything.
19691
19721
  const attrs = slot.action === 'more'
19692
19722
  ? 'data-action="add-provider"'
19693
- : connected
19723
+ : connected || !inProject
19694
19724
  ? 'data-provider="' + escapeHtml(slot.providerId) + '"'
19695
19725
  : 'data-action="connect-mcp" data-provider-id="' + escapeHtml(slot.providerId) + '"';
19696
- return '<button type="button" class="vr-env-connect-option ' + (connected ? 'is-connected' : 'is-disconnected') + '" ' + attrs + '>' +
19726
+ return '<button type="button" class="vr-env-connect-option ' + tone + '" ' + attrs + ' title="' + escapeHtml(hint) + '">' +
19697
19727
  '<span>' + icon + '</span>' +
19698
19728
  '<strong>' + escapeHtml(slot.label) + '</strong>' +
19699
19729
  '<b>' + escapeHtml(status) + '</b>' +
@@ -19916,9 +19946,20 @@ function TablePlaque() {
19916
19946
  const graded = detected.filter((item) => item.grade && typeof item.grade.value === 'number');
19917
19947
  const avg = graded.length ? graded.reduce((sum, item) => sum + item.grade.value, 0) / graded.length : 0;
19918
19948
  const dirty = (demo.worktree && Number(demo.worktree.dirtyCount)) || 0;
19949
+ // Two different numbers used to sit here unlabelled: the average provider card
19950
+ // grade (0-10) and, in the terminal, the gate score (0-100). A repo could read
19951
+ // "GRADE 0.0" here and "score 65" from viberaven check with nothing saying
19952
+ // they measure different things. Both now carry their scale, and the gate score
19953
+ // is shown so the header and the terminal agree on the headline verdict.
19954
+ const gateScore = typeof gate.score === 'number' ? gate.score : null;
19919
19955
  const cells = [
19920
19956
  { label: 'Providers', value: String(detected.length), tone: 'gold' },
19921
- { label: 'Grade', value: graded.length ? avg.toFixed(1) : '&#8212;', tone: 'gold' },
19957
+ {
19958
+ label: 'Gate score /100',
19959
+ value: gateScore == null ? '&#8212;' : String(gateScore),
19960
+ tone: gateClear ? 'green' : gateScore == null ? 'muted' : 'orange',
19961
+ },
19962
+ { label: 'Grade /10', value: graded.length ? avg.toFixed(1) : '&#8212;', tone: 'gold' },
19922
19963
  { label: 'Review', value: String(review), tone: review > 0 ? 'orange' : 'muted' },
19923
19964
  { label: 'Uncommitted', value: String(dirty), tone: dirty > 0 ? 'orange' : 'green' },
19924
19965
  ];
@@ -31018,6 +31059,17 @@ body:has(.vr-app.is-dragging) {
31018
31059
  color: #86efac;
31019
31060
  }
31020
31061
 
31062
+ /* Not in this repo. Same orange the provider cards use for "Not detected", so
31063
+ the panel and the card agree instead of contradicting each other. */
31064
+ .vr-env-connect-option.is-absent b {
31065
+ background: rgba(148, 163, 184, 0.08);
31066
+ color: #94a3b8;
31067
+ }
31068
+
31069
+ .vr-env-connect-option.is-absent > span {
31070
+ opacity: 0.5;
31071
+ }
31072
+
31021
31073
  /* Gate chip is a button now \xE2\u20AC\u201D keep the pill look. */
31022
31074
  button.vr-chat-gate-chip {
31023
31075
  cursor: pointer;