ruvector/scripts
rUv 86062a2e13
feat(rvforge): create command, authoring core, and Reader install/library/update (#800)
* feat(forge-core): author module for writing signed RVF containers

rvf-forge-core could verify containers but not produce them, so every
test and fixture had to hand-assemble bytes through testkit. The
author module makes writing a first-class operation: ContainerBuilder
assembles segments, computes per-segment digests, and emits a signed
root manifest that this crate's own verifier accepts.

Segment kind decides signing policy rather than the caller: a .wasm
payload becomes an executable WASM segment and is signed individually,
anything else becomes an opaque VEC segment. That keeps rule 3 of the
loading contract — unsigned executable segments are rejected by
default — a property of the writer, not something each caller has to
remember to ask for.

The parity fixture generator now builds its input through this module
instead of a bespoke byte layout, so the TypeScript and Rust sides are
compared against a shared definition of what a valid container is.

138 tests, clippy clean.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ParP55bZs2iTGEGvpnUecx

* feat(rvforge): add the create command that writes a signed agent.rvf

Closes the gap that made the published 0.1.0 unusable end to end:
init printed "Next: rvforge pack <agent.rvf>" while creating no such
file, so a first-time user's next command failed with FORGE_E_IO and
there was no supported way to produce the input every other command
needs. The only valid .rvf in the repo lived in tests/fixtures, which
is not in the published tarball.

create reads project metadata and declared capabilities from
rvforge.json and signs with the key init --keygen recorded, so the
common case takes no arguments. With no --from it writes a minimal
but complete skeleton — a META segment declaring the requested
capability classes and a signed root MANIFEST — which is enough for
validate, test, pack, publish and build to run. Walking the whole
pipeline before you have a model to put in it is the point.

--from <dir> adds files as segments in sorted order, so the same
input directory produces the same bytes.

init's next-step line now points at create rather than at a file it
does not write.

Verified from an empty directory against the built CLI: init, create,
validate --deep and test all exit 0 on a self-authored artifact.

253 tests.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ParP55bZs2iTGEGvpnUecx

* feat(reader): install, library and update flows over verified artifacts

Takes rvforge-reader from a verification surface to one that manages
installed agents: install, a library of what is installed, and update
with rollback. Each flow re-verifies rather than trusting the step
before it — an artifact that verified at download is verified again
at install and again at load, because the file on disk between those
points is not the same object the check covered.

The dock bridge keeps the trust boundary the Dock exists to enforce.
Chrome the system owns — trust badge, network indicator, pause — is
populated from SystemOwnedStatus only, and agent-supplied text stays
in AgentProvidedStatus and is sanitized before display. A hostile
agent cannot forge an approved badge or claim it has stopped while
running, because the types do not give it a channel to those fields.

Update binds to lineage: an update whose base identity does not match
the installed artifact is refused rather than applied, and rollback
restores the previous version with its state capsule intact.

189 tests, clippy clean.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ParP55bZs2iTGEGvpnUecx

* fix(deps): bump rkyv 0.8.16 to 0.8.18 for RUSTSEC-2026-0233/0234/0235

Three advisories published against rkyv 0.8.16: a use-after-free
during deserialization of crafted archives (RUSTSEC-2026-0233), and
out-of-bounds reads from insufficient archive validation for Rc/Arc
(0235) and hash tables (0234).

rkyv is a workspace-wide dependency of ruvector-core, ruvector-graph,
ruvector-router-core and ruvector-sparse-inference. All three
advisories are deserialization-side, which is where untrusted bytes
arrive, so an ignore entry would be the wrong call even though the
existing audit.toml has that mechanism — .cargo/audit.toml states the
policy directly: anything fixable is fixed via a dependency bump
rather than ignored.

Lockfile only, no manifest change. cargo audit exits 0 and the four
dependent crates check clean.

Co-Authored-By: claude-flow <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01ParP55bZs2iTGEGvpnUecx
2026-08-05 12:52:27 -03:00
..
benchmark chore: reorganize scripts into subfolders 2026-01-21 23:48:37 -05:00
build feat: Update NAPI-RS bindings with new capabilities (v0.1.15) 2025-11-26 18:47:48 +00:00
ci chore: reorganize scripts into subfolders 2026-01-21 23:48:37 -05:00
deploy chore: reorganize scripts into subfolders 2026-01-21 23:48:37 -05:00
lib fix(decompiler): statement-boundary splitting — 14/14 modules now parse (was 2/17) 2026-04-03 11:50:34 +00:00
patches/hnsw_rs Add WebAssembly binary and TypeScript definitions for rvlite 2025-12-25 19:50:53 +00:00
publish fix: 9-issue cleanup batch + regression-guard CI workflow (#466) 2026-05-16 12:14:49 -04:00
research-gate feat: ADR-280/281/282 — durable RVF metadata, role-aware embeddings, nightly research quality gate (#774) 2026-08-03 14:13:37 -03:00
sona-drift ci(sona): cross-implementation drift gate — parity harness, RVF fingerprints, stub tripwire (#554) 2026-06-11 22:40:27 -04:00
test chore: reorganize scripts into subfolders 2026-01-21 23:48:37 -05:00
training feat(training): source map extraction + v2 model (83.67% val accuracy) 2026-04-03 04:57:47 +00:00
validate chore: reorganize scripts into subfolders 2026-01-21 23:48:37 -05:00
analyze-evolution.js feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
analyze-ham10000.js feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
build-solver.sh feat: Implement complete sublinear-time sparse solver crate 2026-02-20 06:49:14 +00:00
build-sonic-ct-wasm.sh feat(sonic_ct): acoustic digital human workbench — Rust/WASM USCT + R3F UI (#595) 2026-06-22 09:54:22 -04:00
check_brain_status.sh feat: add brain training and status scripts for pi.ruv.io 2026-03-16 23:14:43 -04:00
claude-code-decompile.sh feat(sse): decouple SSE to mcp.pi.ruv.io proxy + Claude Code source research 2026-04-02 23:39:56 +00:00
claude-code-rvf-corpus.sh feat(sse): decouple SSE to mcp.pi.ruv.io proxy + Claude Code source research 2026-04-02 23:39:56 +00:00
create-brainpedia.py fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish (#227) 2026-03-03 12:53:10 -05:00
deploy-crawl-phase1.sh feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
deploy-dragnes.sh feat(sse): decouple SSE to mcp.pi.ruv.io proxy + Claude Code source research 2026-04-02 23:39:56 +00:00
deploy-gemini-agents.sh feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
deploy-wet-job.sh feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
deploy_brain_services.sh feat(brain): ADR-130 service split — SSE proxy, worker, internal queue 2026-03-30 11:54:01 -04:00
deploy_trainer.sh feat: update ADR-093 + add deploy_trainer.sh for Cloud Run scheduling 2026-03-16 23:14:43 -04:00
discover_and_train.sh feat: discover ↔ train feedback loop with live API discovery 2026-03-16 23:16:24 -04:00
extract-ruqu-rvdna-submodules.sh ADR-257: extract ruqu + rvdna into two standalone repos (git submodules) (#579) 2026-06-17 17:33:40 -04:00
gemini-agents.js feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
generate-rvf-manifest.py fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish (#227) 2026-03-03 12:53:10 -05:00
historical-crawl-import.sh feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
publish-rvf.sh feat(rvf): RuVector Format — Universal Cognitive Container SDK (#166) 2026-02-14 13:14:49 -05:00
README.md chore: reorganize scripts into subfolders 2026-01-21 23:48:37 -05:00
rebuild-all-versions.mjs feat(decompiler): rebuild all versions — organized source/rvf separation, 100% coverage 2026-04-03 03:18:41 +00:00
run_mincut_bench.sh feat: Add min-cut gating experiment scaffolding (WIP) 2026-02-20 06:52:43 +00:00
rvagent-flywheel-evaluator.mjs feat(rvagent): Hermes-class harness architecture — research, ADRs 273-279, harness repair + review fixes (#752) 2026-08-02 12:39:59 -03:00
rvforge-parity-check.sh feat(rvforge): create command, authoring core, and Reader install/library/update (#800) 2026-08-05 12:52:27 -03:00
rvforge-parity-fixture.cjs feat(rvforge): create command, authoring core, and Reader install/library/update (#800) 2026-08-05 12:52:27 -03:00
seed-brain-all.py fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish (#227) 2026-03-03 12:53:10 -05:00
seed-brain.rs fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish (#227) 2026-03-03 12:53:10 -05:00
seed-specialized.py fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish (#227) 2026-03-03 12:53:10 -05:00
setup-gcs-examples.sh fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish (#227) 2026-03-03 12:53:10 -05:00
sift1m_hnswlib_bench.mjs perf(hnsw): 4-acc AVX-512 + parallel-insert — +9.7% build throughput (query QPS unchanged: memory-bound at 1M scale) (#619) 2026-06-28 20:45:35 -04:00
sql-audit-v3.sql fix: ruvector-postgres v0.3.2 — 100% audit pass (HNSW + hybrid fixes) (#230) 2026-03-03 13:21:48 -05:00
swarm_train_15.sh feat: 15-agent concurrent discovery swarm with 12 new data sources 2026-03-16 23:16:24 -04:00
sync-lockfile.sh style: apply rustfmt across entire codebase 2026-01-28 17:00:26 +00:00
train-lora.py fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish (#227) 2026-03-03 12:53:10 -05:00
train_brain.sh feat: brain trainer core module + auth fix — 56 discoveries ingested 2026-03-16 23:14:43 -04:00
training_orchestrator.sh update: training orchestrator with improved PII stripping and color output 2026-03-16 23:21:01 -04:00
upvote_memories.py fix(brain): defer sparsifier build on startup for large graphs 2026-03-24 12:29:52 +00:00
vote-boost.py fix: ruvector-postgres v0.3.1 — audit bug fixes, 46 SQL functions, Docker publish (#227) 2026-03-03 12:53:10 -05:00
wet-filter-inject.js feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
wet-full-import.sh feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
wet-job.yaml feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
wet-orchestrate.sh feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00
wet-processor.sh feat: DrAgnes + Common Crawl WET + Gemini grounding agents (#282) 2026-03-23 10:12:50 -04:00

RuVector Automation Scripts

This directory contains automation scripts organized by purpose.

📁 Directory Structure

scripts/
├── README.md           # This file
├── benchmark/          # Performance benchmarking
├── build/              # Build utilities
├── ci/                 # CI/CD automation
├── deploy/             # Deployment scripts
├── patches/            # Patch files
├── publish/            # Package publishing
├── test/               # Testing scripts
└── validate/           # Validation & verification

🚀 Deployment

Scripts for deploying to production.

Script Description
deploy/deploy.sh Comprehensive deployment (crates.io + npm)
deploy/test-deploy.sh Test deployment without publishing
deploy/DEPLOYMENT.md Full deployment documentation
deploy/DEPLOYMENT-QUICKSTART.md Quick deployment guide

Usage:

# Full deployment
./scripts/deploy/deploy.sh

# Dry run
./scripts/deploy/deploy.sh --dry-run

# Test deployment
./scripts/deploy/test-deploy.sh

📦 Publishing

Scripts for publishing packages to registries.

Script Description
publish/publish-all.sh Publish all packages
publish/publish-crates.sh Publish Rust crates to crates.io
publish/publish-cli.sh Publish CLI package
publish/publish-router-wasm.sh Publish router WASM package
publish/check-and-publish-router-wasm.sh Check and publish router WASM

Usage:

# Set credentials first
export CRATES_API_KEY="your-crates-io-token"
export NPM_TOKEN="your-npm-token"

# Publish all
./scripts/publish/publish-all.sh

# Publish crates only
./scripts/publish/publish-crates.sh

📊 Benchmarking

Performance benchmarking scripts.

Script Description
benchmark/run_benchmarks.sh Run core benchmarks
benchmark/run_llm_benchmarks.sh Run LLM inference benchmarks

Usage:

# Run core benchmarks
./scripts/benchmark/run_benchmarks.sh

# Run LLM benchmarks
./scripts/benchmark/run_llm_benchmarks.sh

🧪 Testing

Testing and validation scripts.

Script Description
test/test-wasm.mjs Test WASM bindings
test/test-graph-cli.sh Test graph CLI commands
test/test-all-graph-commands.sh Test all graph commands
test/test-docker-package.sh Test Docker packaging

Usage:

# Test WASM
node ./scripts/test/test-wasm.mjs

# Test graph CLI
./scripts/test/test-graph-cli.sh

Validation

Package and build verification scripts.

Script Description
validate/validate-packages.sh Validate package configs
validate/validate-packages-simple.sh Simple package validation
validate/verify-paper-impl.sh Verify paper implementation
validate/verify_hnsw_build.sh Verify HNSW build

Usage:

# Validate packages
./scripts/validate/validate-packages.sh

# Verify HNSW
./scripts/validate/verify_hnsw_build.sh

🔄 CI/CD

Continuous integration scripts.

Script Description
ci/ci-sync-lockfile.sh Auto-fix lock files in CI
ci/sync-lockfile.sh Sync package-lock.json
ci/install-hooks.sh Install git hooks

Usage:

# Install git hooks (recommended)
./scripts/ci/install-hooks.sh

# Sync lockfile
./scripts/ci/sync-lockfile.sh

🛠️ Build

Build utility scripts located in build/.

🩹 Patches

Patch files for dependencies located in patches/.

🚀 Quick Start

For Development

  1. Install git hooks (recommended):

    ./scripts/ci/install-hooks.sh
    
  2. Run tests:

    ./scripts/test/test-wasm.mjs
    

For Deployment

  1. Set credentials:

    export CRATES_API_KEY="your-crates-io-token"
    export NPM_TOKEN="your-npm-token"
    
  2. Dry run first:

    ./scripts/deploy/deploy.sh --dry-run
    
  3. Deploy:

    ./scripts/deploy/deploy.sh
    

🔐 Security

Never commit credentials! Always use environment variables or .env file.

See deploy/DEPLOYMENT.md for security best practices.