ruvnet-brain 4.3.20 → 4.3.25
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 +5 -5
- package/bin/install.mjs +383 -78
- package/console/app.js +141 -9
- package/console/index.html +51 -24
- package/console/scope.css +137 -0
- package/console/scope.html +144 -0
- package/console/scope.js +209 -0
- package/console/tips.html +1 -0
- package/kb/corpus-release-identity.mjs +239 -0
- package/kb/update-storage-transaction.mjs +20 -3
- package/package.json +9 -2
- package/plugin/.claude-plugin/plugin.json +2 -2
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/commands/checkpoint.md +61 -0
- package/plugin/hooks/codex-hooks.json +64 -1
- package/plugin/hooks/hook-contracts.json +299 -6
- package/plugin/hooks/hooks.json +81 -1
- package/plugin/mcp/server.mjs +23 -0
- package/plugin/scripts/advocacy-catalog.mjs +245 -0
- package/plugin/scripts/advocacy-route.mjs +460 -0
- package/plugin/scripts/continuation-gate.mjs +25 -2
- package/plugin/scripts/continuation-objective.mjs +7 -1
- package/plugin/scripts/continuity-hook-policy.mjs +190 -15
- package/plugin/scripts/coverage-integrity.mjs +7 -0
- package/plugin/scripts/gates.mjs +113 -10
- package/plugin/scripts/grounding-turn-gate.mjs +167 -0
- package/plugin/scripts/grounding-turn-mark.mjs +91 -0
- package/plugin/scripts/hook-shim.mjs +14 -0
- package/plugin/scripts/host-shell-boundary.mjs +43 -0
- package/plugin/scripts/nightly-scheduler.mjs +37 -4
- package/plugin/scripts/project-progression-checkpoint.mjs +145 -0
- package/plugin/scripts/project-progression-contract.mjs +16 -0
- package/plugin/scripts/project-progression-hook.mjs +3 -0
- package/plugin/scripts/project-progression-producer.mjs +252 -0
- package/plugin/scripts/project-progression-reader.mjs +271 -0
- package/plugin/scripts/project-progression-session-start.mjs +93 -16
- package/plugin/scripts/project-progression-sources.mjs +220 -0
- package/plugin/scripts/project-progression-store.mjs +106 -13
- package/plugin/scripts/ruvnet-gate1-pattern.mjs +29 -0
- package/plugin/scripts/session-snapshot-hook.mjs +115 -7
- package/plugin/scripts/session-start-budget.mjs +59 -0
- package/plugin/scripts/session-start-core.mjs +234 -457
- package/plugin/scripts/session-start-fsutil.mjs +61 -0
- package/plugin/scripts/session-start-health.mjs +64 -0
- package/plugin/scripts/session-start-hook-description.mjs +45 -0
- package/plugin/scripts/session-start-issue-alert.mjs +77 -0
- package/plugin/scripts/session-start-repo-identity.mjs +54 -0
- package/plugin/scripts/session-start-signals.mjs +73 -0
- package/plugin/scripts/session-start-trace.mjs +86 -0
- package/plugin/scripts/session-start-update-plane.mjs +104 -0
- package/plugin/scripts/unprompted-runtime.mjs +32 -2
- package/plugin/scripts/update-apply.mjs +2 -32
- package/plugin/skills/ruvnet-brain/PLAYBOOK.md +26 -2
- package/plugin/skills/ruvnet-brain/SKILL.md +67 -2
- package/scripts/adr-072-completion.mjs +1 -1
- package/scripts/agentdb-fleet-doctor.mjs +5 -1
- package/scripts/approved-runtime.mjs +197 -0
- package/scripts/brain-novice-50.mjs +16 -1
- package/scripts/brain-score.mjs +23 -5
- package/scripts/build-bundle.mjs +971 -530
- package/scripts/build-concepts.mjs +36 -116
- package/scripts/console-engine.test.mjs +8 -7
- package/scripts/console-runtime-identity.mjs +4 -0
- package/scripts/corpus-aggregates.mjs +94 -77
- package/scripts/corpus-candidate.mjs +475 -222
- package/scripts/corpus-next-seed.mjs +225 -0
- package/scripts/corpus-promotion.mjs +58 -0
- package/scripts/corpus-reconcile.mjs +411 -105
- package/scripts/doc-currency.mjs +16 -1
- package/scripts/dual-host-deliberation.mjs +25 -2
- package/scripts/dual-host-suggest.mjs +17 -1
- package/scripts/falsify.mjs +13 -3
- package/scripts/gist-receipts.mjs +482 -87
- package/scripts/github-health-watch.mjs +12 -2
- package/scripts/handoff-asset.mjs +34 -0
- package/scripts/hook-retirement-check.mjs +8 -1
- package/scripts/host-registry.mjs +1 -1
- package/scripts/ingest-gists.mjs +74 -101
- package/scripts/job-heartbeat.sh +77 -14
- package/scripts/learning-replay-execution.mjs +10 -4
- package/scripts/nightly-gists.sh +27 -13
- package/scripts/nightly-two-run-proof.mjs +1 -1
- package/scripts/nightly-watchdog.mjs +61 -4
- package/scripts/onboarding-console.mjs +319 -27
- package/scripts/oracle/produce-questions.mjs +293 -0
- package/scripts/oracle/producer-hosts.mjs +235 -0
- package/scripts/oracle/repo-recall.mjs +448 -0
- package/scripts/oracle/retrieval-accuracy.mjs +818 -0
- package/scripts/oracle/source-tree.mjs +165 -0
- package/scripts/oracle/source-units.mjs +391 -0
- package/scripts/oracle/spike-run.mjs +98 -0
- package/scripts/oracle/unit-inventory.mjs +141 -0
- package/scripts/oracle/unit-sampling.mjs +128 -0
- package/scripts/oracle/validate-labels.mjs +250 -0
- package/scripts/private-overlay.mjs +248 -0
- package/scripts/product-integrity-contract.mjs +1 -1
- package/scripts/proxy/claude-proxied.sh +6 -0
- package/scripts/proxy/proxy-revert.sh +5 -0
- package/scripts/proxy/proxy-up.sh +6 -0
- package/scripts/proxy/proxy-verify.mjs +4 -0
- package/scripts/public-inputs.mjs +409 -0
- package/scripts/public-verification-inputs.mjs +112 -26
- package/scripts/public-verification-lane.mjs +1 -1
- package/scripts/published-surface-probe.mjs +34 -4
- package/scripts/qe/card-lane-gate.mjs +16 -1
- package/scripts/qe/session-start-gate.mjs +16 -1
- package/scripts/rebuild-gists-from-receipts.mjs +58 -78
- package/scripts/record-lesson.mjs +4 -1
- package/scripts/rehearse-corpus-pipeline.mjs +994 -0
- package/scripts/release-abort-stale.mjs +5 -1
- package/scripts/release-authority.mjs +104 -12
- package/scripts/release-channel-kind.mjs +86 -0
- package/scripts/release-convergence-watchdog.mjs +7 -2
- package/scripts/release-projection.mjs +177 -72
- package/scripts/release-transaction-provider.mjs +23 -6
- package/scripts/release.mjs +252 -17
- package/scripts/retrieval-canary.mjs +87 -0
- package/scripts/rvf-index-audit.mjs +573 -13
- package/scripts/rvf-wire.mjs +269 -0
- package/scripts/seal-gist-receipt.mjs +65 -0
- package/scripts/selfcheck.mjs +42 -21
- package/scripts/source-coverage.mjs +253 -24
- package/scripts/status-honesty.mjs +25 -0
- package/scripts/sync-census.mjs +0 -0
- package/scripts/sync-version.mjs +2 -0
- package/scripts/trismart.mjs +42 -0
- package/scripts/updater-manifest.mjs +162 -0
- package/scripts/verify-channels.mjs +17 -5
- package/scripts/wired-check.mjs +48 -10
- package/tri-smart-skill/QUICKSTART.md +37 -0
- package/tri-smart-skill/README.md +92 -0
- package/tri-smart-skill/install.cmd +14 -0
- package/tri-smart-skill/install.command +13 -0
- package/tri-smart-skill/install.mjs +51 -0
- package/tri-smart-skill/install.sh +9 -0
- package/tri-smart-skill/tri-smart/SKILL.md +90 -0
- package/tri-smart-skill/tri-smart/evals/evals.json +25 -0
- package/tri-smart-skill/tri-smart/references/protocol.md +25 -0
- package/tri-smart-skill/tri-smart/references/provider-cli.md +18 -0
- package/tri-smart-skill/tri-smart/scripts/review.mjs +154 -0
- package/tri-smart-skill/tri-smart/scripts/setup.mjs +97 -0
- package/tri-smart-skill/tri-smart/scripts/verify-access.mjs +107 -0
- package/scripts/corpus-seed-publish.mjs +0 -110
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Publish a corpus candidate once, under a tag derived from its exact archive digest.
|
|
3
|
-
|
|
4
|
-
import crypto from 'node:crypto';
|
|
5
|
-
import fs from 'node:fs';
|
|
6
|
-
import path from 'node:path';
|
|
7
|
-
import { spawnSync } from 'node:child_process';
|
|
8
|
-
import { fileURLToPath } from 'node:url';
|
|
9
|
-
import { verifyCorpusReceipt } from './corpus-candidate.mjs';
|
|
10
|
-
|
|
11
|
-
function fail(message) {
|
|
12
|
-
throw new Error(`[corpus-seed-publish] ${message}`);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function sha256File(file) {
|
|
16
|
-
const hash = crypto.createHash('sha256');
|
|
17
|
-
const fd = fs.openSync(file, 'r');
|
|
18
|
-
const buffer = Buffer.allocUnsafe(1024 * 1024);
|
|
19
|
-
try {
|
|
20
|
-
let bytes;
|
|
21
|
-
while ((bytes = fs.readSync(fd, buffer, 0, buffer.length, null)) > 0) hash.update(buffer.subarray(0, bytes));
|
|
22
|
-
} finally {
|
|
23
|
-
fs.closeSync(fd);
|
|
24
|
-
}
|
|
25
|
-
return hash.digest('hex');
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function corpusSeedTag(receipt) {
|
|
29
|
-
if (!/^[a-f0-9]{64}$/.test(receipt?.archive?.sha256 || '')) fail('cannot derive tag without an archive sha256');
|
|
30
|
-
return `corpus-sha256-${receipt.archive.sha256}`;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function defaultRun(command, args, options) {
|
|
34
|
-
return spawnSync(command, args, { encoding: 'utf8', ...options });
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
export async function publishCorpusSeed({
|
|
38
|
-
receiptFile,
|
|
39
|
-
bundleFile,
|
|
40
|
-
assetsDir,
|
|
41
|
-
policyFile,
|
|
42
|
-
repo,
|
|
43
|
-
run = defaultRun,
|
|
44
|
-
}) {
|
|
45
|
-
const receiptPath = path.resolve(receiptFile || '');
|
|
46
|
-
const bundlePath = path.resolve(bundleFile || '');
|
|
47
|
-
if (!assetsDir || !policyFile) fail('publishing requires --assets and --policy for full receipt verification');
|
|
48
|
-
const receipt = await verifyCorpusReceipt({
|
|
49
|
-
receiptFile: receiptPath,
|
|
50
|
-
bundleFile: bundlePath,
|
|
51
|
-
assetsDir,
|
|
52
|
-
policyFile,
|
|
53
|
-
});
|
|
54
|
-
if (!fs.existsSync(bundlePath)) fail(`bundle missing (${bundlePath})`);
|
|
55
|
-
const archiveSha256 = sha256File(bundlePath);
|
|
56
|
-
if (archiveSha256 !== receipt.archive.sha256) fail(`archive sha256=${archiveSha256}, receipt=${receipt.archive.sha256}`);
|
|
57
|
-
if (fs.statSync(bundlePath).size !== receipt.archive.bytes) fail('archive byte length differs from receipt');
|
|
58
|
-
|
|
59
|
-
const tag = corpusSeedTag(receipt);
|
|
60
|
-
const repoArgs = repo ? ['--repo', repo] : [];
|
|
61
|
-
const view = run('gh', ['release', 'view', tag, '--json', 'tagName', ...repoArgs], {
|
|
62
|
-
encoding: 'utf8',
|
|
63
|
-
stdio: ['ignore', 'pipe', 'pipe'],
|
|
64
|
-
});
|
|
65
|
-
if (view.status === 0) fail(`release ${tag} already exists; refusing to overwrite immutable corpus seed`);
|
|
66
|
-
const viewError = String(view.stderr || view.stdout || '');
|
|
67
|
-
if (!/(not found|404|no release found)/i.test(viewError)) {
|
|
68
|
-
fail(`cannot prove ${tag} is absent (${viewError.trim() || `gh exited ${view.status}`})`);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Publication stays behind the repository's one-publisher authority. This wrapper validates and
|
|
72
|
-
// seals the corpus inputs; scripts/release.mjs owns the protected GitHub mutation and its receipt.
|
|
73
|
-
const publish = run(process.execPath, [
|
|
74
|
-
path.resolve(path.dirname(fileURLToPath(import.meta.url)), 'release.mjs'),
|
|
75
|
-
'--corpus-seed',
|
|
76
|
-
'--corpus-tag', tag,
|
|
77
|
-
'--corpus-bundle', bundlePath,
|
|
78
|
-
'--corpus-receipt', receiptPath,
|
|
79
|
-
'--target', receipt.builderSourceSha,
|
|
80
|
-
...(repo ? ['--repo', repo] : []),
|
|
81
|
-
], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] });
|
|
82
|
-
if (publish.status !== 0) fail(`protected corpus publication failed (${String(publish.stderr || publish.stdout || '').trim()})`);
|
|
83
|
-
return {
|
|
84
|
-
tag,
|
|
85
|
-
archiveSha256,
|
|
86
|
-
receiptSha256: sha256File(receiptPath),
|
|
87
|
-
draft: false,
|
|
88
|
-
prerelease: true,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function arg(name, fallback) {
|
|
93
|
-
const index = process.argv.indexOf(name);
|
|
94
|
-
return index >= 0 ? process.argv[index + 1] : fallback;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
async function main() {
|
|
98
|
-
const result = await publishCorpusSeed({
|
|
99
|
-
receiptFile: arg('--receipt', 'dist/corpus-receipt.json'),
|
|
100
|
-
bundleFile: arg('--bundle', 'dist/ruvnet-brain.zip'),
|
|
101
|
-
assetsDir: arg('--assets'),
|
|
102
|
-
policyFile: arg('--policy'),
|
|
103
|
-
repo: arg('--repo'),
|
|
104
|
-
});
|
|
105
|
-
console.log(JSON.stringify({ ok: true, ...result }, null, 2));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
if (path.resolve(process.argv[1] || '') === fileURLToPath(import.meta.url)) {
|
|
109
|
-
main().catch((error) => { console.error(error.message); process.exitCode = 1; });
|
|
110
|
-
}
|