@appchy/jarvis 0.1.114 → 0.1.115

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/bin.js CHANGED
@@ -6047,11 +6047,11 @@ async function buildGraph(config2) {
6047
6047
  }
6048
6048
  return { graph: graph2, diagnostics, ledger };
6049
6049
  }
6050
- function silentSources(sources, graph2, reported) {
6050
+ function silentSources(sources, graph2, reported2) {
6051
6051
  const asserted = sources.filter((s) => !s.optional);
6052
6052
  if (asserted.length === 0) return [];
6053
6053
  const produced = new Set(graph2.nodes().map((n) => n.owner));
6054
- const spoke = new Set(reported.map((d) => d.plugin));
6054
+ const spoke = new Set(reported2.map((d) => d.plugin));
6055
6055
  const silent = asserted.filter((s) => !produced.has(s.name) && !spoke.has(s.name));
6056
6056
  if (silent.length === 0) return [];
6057
6057
  const severity = silent.length === asserted.length ? "error" : "warn";
@@ -10284,7 +10284,7 @@ import { createRequire as createRequire2 } from "module";
10284
10284
  var _require = createRequire2(import.meta.url);
10285
10285
  var VERSION2 = _require("../package.json").version ?? "0.0.0";
10286
10286
  var IS_DEV = String(_require("../package.json").name ?? "").endsWith("-dev");
10287
- var SHA = "3c9f85d";
10287
+ var SHA = "5283062";
10288
10288
  var BUILT = "2026-09-12";
10289
10289
  var BUILD = SHA ?? "source";
10290
10290
  var BUILD_LABEL = `${SHA ? `${VERSION2} (${SHA}${BUILT ? ` ${BUILT}` : ""})` : `${VERSION2} (source)`}${IS_DEV ? " \u2014 development build" : ""}`;
@@ -11321,10 +11321,11 @@ import { execFileSync as execFileSync3 } from "child_process";
11321
11321
  import { readFileSync as readFileSync6, writeFileSync as writeFileSync3 } from "fs";
11322
11322
  import { join as join8 } from "path";
11323
11323
  var BASELINE = join8(".claude", "governance.baseline.json");
11324
- var GOVERNS = (finding) => finding.severity !== "error" && finding.code !== "PLUGIN_ERROR";
11324
+ var GOVERNS = (finding) => finding.severity === "warn" && finding.code !== "PLUGIN_ERROR";
11325
+ var REPORTED = (finding) => finding.severity === "info";
11325
11326
  function countByRule(findings) {
11326
11327
  const counts = {};
11327
- for (const finding of findings.filter(GOVERNS)) {
11328
+ for (const finding of findings) {
11328
11329
  counts[finding.code] = (counts[finding.code] ?? 0) + 1;
11329
11330
  }
11330
11331
  return counts;
@@ -11339,10 +11340,12 @@ function readBaseline(repo) {
11339
11340
  }
11340
11341
  }
11341
11342
  function ratchet(baseline, findings) {
11342
- const counts = countByRule(findings);
11343
+ const counts = countByRule(findings.filter(GOVERNS));
11344
+ const census = countByRule(findings.filter(REPORTED));
11343
11345
  const raised = [];
11344
11346
  const lowered = [];
11345
- if (!baseline.adopted) return { raised: [], lowered: [], counts, passed: true, adopting: true };
11347
+ if (!baseline.adopted)
11348
+ return { raised: [], lowered: [], counts, census, passed: true, adopting: true };
11346
11349
  for (const [rule, now2] of Object.entries(counts)) {
11347
11350
  const was = baseline.allowed[rule];
11348
11351
  const agreed = was ?? 0;
@@ -11353,13 +11356,15 @@ function ratchet(baseline, findings) {
11353
11356
  }
11354
11357
  }
11355
11358
  for (const [rule, was] of Object.entries(baseline.allowed)) {
11359
+ if (rule in census) continue;
11356
11360
  if (!(rule in counts) && was > 0) lowered.push({ rule, was, now: 0 });
11357
11361
  }
11358
- return { raised, lowered, counts, passed: raised.length === 0, adopting: false };
11362
+ return { raised, lowered, counts, census, passed: raised.length === 0, adopting: false };
11359
11363
  }
11360
11364
  function tightened(baseline, report2) {
11361
11365
  const allowed = {};
11362
11366
  for (const rule of /* @__PURE__ */ new Set([...Object.keys(baseline.allowed), ...Object.keys(report2.counts)])) {
11367
+ if (rule in report2.census) continue;
11363
11368
  allowed[rule] = Math.min(baseline.allowed[rule] ?? Number.MAX_SAFE_INTEGER, report2.counts[rule] ?? 0);
11364
11369
  }
11365
11370
  return { allowed, adopted: true };
@@ -11386,13 +11391,18 @@ function touched(repo) {
11386
11391
  return /* @__PURE__ */ new Set();
11387
11392
  }
11388
11393
  }
11394
+ function reported(report2) {
11395
+ const classes = Object.entries(report2.census);
11396
+ if (classes.length === 0) return "";
11397
+ return ` Reported, never ratcheted: ${classes.map(([rule, n]) => `${rule} ${n}`).sort().join(", ")}.`;
11398
+ }
11389
11399
  function describe(report2, repo = "") {
11390
11400
  const held = Object.entries(report2.counts).reduce((sum, [, n]) => sum + n, 0);
11391
11401
  if (report2.adopting) {
11392
- return `governance baseline recorded: ${held} finding(s) across ${Object.keys(report2.counts).length} class(es), written to ${BASELINE}. From here a class may fall and may not rise.`;
11402
+ return `governance baseline recorded: ${held} finding(s) across ${Object.keys(report2.counts).length} class(es), written to ${BASELINE}. From here a class may fall and may not rise.${reported(report2)}`;
11393
11403
  }
11394
11404
  if (report2.passed) {
11395
- return report2.lowered.length > 0 ? `governance held: ${report2.lowered.map((each) => `${each.rule} ${each.was}\u2192${each.now}`).join(", ")} \u2014 baseline tightened. ${held} finding(s) carried.` : `governance held: ${held} finding(s) carried, none added.`;
11405
+ return report2.lowered.length > 0 ? `governance held: ${report2.lowered.map((each) => `${each.rule} ${each.was}\u2192${each.now}`).join(", ")} \u2014 baseline tightened. ${held} finding(s) carried.${reported(report2)}` : `governance held: ${held} finding(s) carried, none added.${reported(report2)}`;
11396
11406
  }
11397
11407
  const lines = [];
11398
11408
  const dirty = repo ? touched(repo) : /* @__PURE__ */ new Set();