ruvnet-brain 4.3.37 β 4.3.39
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/README.md +2 -2
- package/bin/install.mjs +32 -9
- package/kb/forge-update.mjs +1884 -0
- package/package.json +3 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/hooks/codex-hooks.json +4 -4
- package/plugin/hooks/hook-contracts.json +7 -7
- package/plugin/hooks/hooks.json +2 -2
- package/plugin/scripts/capability-claim-evidence.mjs +11 -2
- package/plugin/scripts/capacity-aware-parallel-work.mjs +71 -15
- package/plugin/scripts/codex-hook-wrapper.mjs +3 -0
- package/plugin/scripts/completion-claim-evidence.mjs +262 -0
- package/plugin/scripts/continuation-gate.mjs +105 -21
- package/plugin/scripts/continuation-objective.mjs +15 -0
- package/plugin/scripts/decision-gate.mjs +22 -2
- package/plugin/scripts/duplicate-gate.mjs +503 -0
- package/plugin/scripts/grounding-turn-evidence.mjs +339 -0
- package/plugin/scripts/grounding-turn-gate.mjs +77 -25
- package/plugin/scripts/grounding-turn-mark.mjs +61 -14
- package/plugin/scripts/hook-input.mjs +15 -0
- package/plugin/scripts/host-update.mjs +45 -0
- package/plugin/scripts/nightly-scheduler.mjs +34 -0
- package/plugin/scripts/session-start-budget.mjs +1 -0
- package/plugin/scripts/session-start-core.mjs +15 -2
- package/plugin/scripts/session-start-health.mjs +101 -1
- package/plugin/scripts/session-start-update-plane.mjs +71 -1
- package/scripts/approved-runtime.mjs +1 -1
- package/scripts/completion-claim-replay.mjs +114 -0
- package/scripts/corpus-canary.mjs +396 -0
- package/scripts/corpus-dispatch-decision.mjs +2 -2
- package/scripts/corpus-promotion.mjs +49 -0
- package/scripts/corpus-reconcile.mjs +27 -3
- package/scripts/corpus-watchdog.mjs +45 -6
- package/scripts/duplicate-gate-replay.mjs +98 -0
- package/scripts/grounding-turn-replay.mjs +131 -0
- package/scripts/nightly-watchdog.mjs +3 -3
- package/scripts/protected-release-invocation.mjs +1 -1
- package/scripts/release.mjs +180 -77
- package/scripts/single-source-check.mjs +12 -6
- package/scripts/wired-check.mjs +2 -0
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Created: 2026-06-29 22:36:38 EDT
|
|
|
7
7
|
|
|
8
8
|
# π§ RuvNet Brain
|
|
9
9
|
|
|
10
|
-
### π§ RuvNet Brain β [](https://github.com/stuinfla/ruvnet-brain/blob/main/plugin/.claude-plugin/plugin.json)
|
|
11
11
|
|
|
12
12
|
**A portable, source-grounded brain over Reuven Cohen's (rUv's) RuvNet stack β delivered as a Claude Code plugin that makes Claude _use_ the stack instead of fighting it.**
|
|
13
13
|
|
|
@@ -562,7 +562,7 @@ node forge-ask-all.mjs --dir . --q "How does RuVector implement HNSW vector sear
|
|
|
562
562
|
|
|
563
563
|
This project versions in the open (see the live badge up top for the exact plugin version; the downloadable knowledge bundle is a separate track) β we don't claim βdone,β βcomplete,β or βzero hallucinations.β Where it stands:
|
|
564
564
|
|
|
565
|
-
- β
**The grounding brain is real and proven** β 199 public stores Β·
|
|
565
|
+
- β
**The grounding brain is real and proven** β 199 public stores Β· 161,322 public source chunks, dual embeddings, cross-encoder rerank, plugin (MCP tool + explicit skills; automatic hooks retired), all re-runnable.
|
|
566
566
|
- β
**Code-level depth** β the code-rich repos are indexed to full function bodies; βhow is it implemented?β returns the implementation. Verified in the shipped bundle (clean-room 3/3).
|
|
567
567
|
- β
**Routing holds** β named 47/48, described 26/28, scenario 7/8; behavioral L1βL3 all pass (**L4 downgraded β it measures that the brain spoke, not that anything listened**); private stores fenced out of the public bundle (zero-leak verified).
|
|
568
568
|
- β οΈ **Two routing residuals** (above) β surfaced, not hidden.
|
package/bin/install.mjs
CHANGED
|
@@ -528,21 +528,42 @@ export function copyLocalBundleInto(sourceDir, cacheDir) {
|
|
|
528
528
|
// which a private-overlay brain refuses. Idempotent, byte-compared, atomic; a symlink is replaced by
|
|
529
529
|
// a real file because a link is not a trusted regular file.
|
|
530
530
|
const TRUSTED_VALIDATOR_SOURCE = path.join(REPO_ROOT, 'plugin', 'scripts', 'coverage-integrity.mjs');
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
let bytes;
|
|
534
|
-
try { bytes = fs.readFileSync(source); }
|
|
535
|
-
catch (error) { throw new Error(`trusted coverage validator is missing from this package (${source}): ${error.message}`); }
|
|
536
|
-
const target = path.join(kbDir, 'coverage-integrity.mjs');
|
|
531
|
+
// Byte-compared, atomic, symlink-safe placement of one file the installer owns inside the KB.
|
|
532
|
+
function placeFileAtomic(target, bytes) {
|
|
537
533
|
let existing = null;
|
|
538
534
|
try { existing = fs.lstatSync(target); } catch (error) { if (error.code !== 'ENOENT') throw error; }
|
|
539
|
-
const unchanged = existing && existing.isFile() && !existing.isSymbolicLink() && fs.readFileSync(target).equals(bytes);
|
|
535
|
+
const unchanged = !!(existing && existing.isFile() && !existing.isSymbolicLink() && fs.readFileSync(target).equals(bytes));
|
|
540
536
|
if (!unchanged) {
|
|
541
537
|
const staged = `${target}.${process.pid}.${Date.now()}.tmp`;
|
|
542
538
|
fs.writeFileSync(staged, bytes, { mode: 0o644 });
|
|
543
539
|
if (existing && existing.isSymbolicLink()) fs.unlinkSync(target); // never write through a link
|
|
544
540
|
fs.renameSync(staged, target);
|
|
545
541
|
}
|
|
542
|
+
return { existing, unchanged };
|
|
543
|
+
}
|
|
544
|
+
// The updater that runs on a customer is the forge-update.mjs inside their OWN installed KB, which only
|
|
545
|
+
// changes when a bundle replaces it β so a fix to the updater never reached installs that already had
|
|
546
|
+
// one. The signed npm package carries the updater and the sibling modules it imports; the `--update`
|
|
547
|
+
// preflight places them (same trust as the validator) so a stale updater upgrades itself before it runs.
|
|
548
|
+
const UPDATER_FILES = ['forge-update.mjs', 'zip-extract.mjs', 'brain-profile.mjs', 'refresh-run.mjs',
|
|
549
|
+
'update-storage-transaction.mjs', 'lifecycle-evidence-retention.mjs', 'corpus-release-identity.mjs'];
|
|
550
|
+
export function placeUpdater(kbDir, { sourceDir = path.join(REPO_ROOT, 'kb') } = {}) {
|
|
551
|
+
const placed = {};
|
|
552
|
+
for (const name of UPDATER_FILES) {
|
|
553
|
+
let bytes;
|
|
554
|
+
try { bytes = fs.readFileSync(path.join(sourceDir, name)); }
|
|
555
|
+
catch (error) { throw new Error(`updater file ${name} is missing from this package (${sourceDir}): ${error.message}`); }
|
|
556
|
+
placed[name] = placeFileAtomic(path.join(kbDir, name), bytes).unchanged ? 'unchanged' : 'placed';
|
|
557
|
+
}
|
|
558
|
+
return placed;
|
|
559
|
+
}
|
|
560
|
+
export function placeTrustedCoverageValidator(kbDir, { source = TRUSTED_VALIDATOR_SOURCE,
|
|
561
|
+
brainVersion = PACKAGE_VERSION } = {}) {
|
|
562
|
+
let bytes;
|
|
563
|
+
try { bytes = fs.readFileSync(source); }
|
|
564
|
+
catch (error) { throw new Error(`trusted coverage validator is missing from this package (${source}): ${error.message}`); }
|
|
565
|
+
const target = path.join(kbDir, 'coverage-integrity.mjs');
|
|
566
|
+
const { existing, unchanged } = placeFileAtomic(target, bytes);
|
|
546
567
|
// STAMP THE APPROVED RUNTIME IN THE SAME BREATH AS PLACING ITS EXECUTABLES (ADR-086 step 16).
|
|
547
568
|
//
|
|
548
569
|
// This is the one moment where "which runtime is this brain running" is a measured fact rather
|
|
@@ -558,7 +579,7 @@ export function placeTrustedCoverageValidator(kbDir, { source = TRUSTED_VALIDATO
|
|
|
558
579
|
/** `--update` preflight: place the validator only where an updater exists to consume it. */
|
|
559
580
|
export function ensureUpdaterPrerequisites(kbDir) {
|
|
560
581
|
if (!fs.existsSync(path.join(kbDir, 'forge-update.mjs'))) return { updater: false, validator: null };
|
|
561
|
-
return { updater: true, validator: placeTrustedCoverageValidator(kbDir) };
|
|
582
|
+
return { updater: true, files: placeUpdater(kbDir), validator: placeTrustedCoverageValidator(kbDir) };
|
|
562
583
|
}
|
|
563
584
|
|
|
564
585
|
export async function unzipInto(zipPath, cacheDir, sourceDir = null, { releaseTag = null, activate = true } = {}) {
|
|
@@ -2729,10 +2750,12 @@ async function doctor() {
|
|
|
2729
2750
|
ok(`nightly scheduler: ${nightlyHealth.evidence}`);
|
|
2730
2751
|
if (nightlyHealth.runHealth?.state === 'ok' || nightlyHealth.runHealth?.state === 'running') {
|
|
2731
2752
|
ok(`nightly execution: ${nightlyHealth.runHealth.evidence}`);
|
|
2753
|
+
} else if (nightlyHealth.runHealth?.state === 'failed') {
|
|
2754
|
+
warn(`nightly refresh FAILED β the brain is not updating: ${nightlyHealth.runHealth.evidence}`);
|
|
2732
2755
|
} else warn(`nightly execution unproven: ${nightlyHealth.runHealth?.evidence || 'no run receipt'}`);
|
|
2733
2756
|
}
|
|
2734
2757
|
else if (nightlyHealth.state === 'degraded') warn(`nightly scheduler degraded: ${nightlyHealth.evidence}`);
|
|
2735
|
-
else if (nightlyHealth.state === 'off')
|
|
2758
|
+
else if (nightlyHealth.state === 'off') warn('nightly scheduler is OFF β knowledge updates only when a session starts (SessionStart retries at most every 6h); for nightly updates run npx ruvnet-brain --enable-nightly (skip if agentic-kit manages this machine)');
|
|
2736
2759
|
else info(`nightly scheduler status unavailable: ${nightlyHealth.evidence}`);
|
|
2737
2760
|
have('node') ? ok('node present') : warn('node missing');
|
|
2738
2761
|
have('npm') ? ok('npm present') : warn('npm missing');
|