π The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
docs(modules): publish standalone-use recipes for memory, embeddings, security + flag @ruvector/sona empty-publish blocking neural
ruvca0a6fa5cb16
diff --git a/v3/@claude-flow/embeddings/README.md b/v3/@claude-flow/embeddings/README.mdindex d045c058cf..c8fe6e02c7 100644--- a/v3/@claude-flow/embeddings/README.md+++ b/v3/@claude-flow/embeddings/README.md@@ -32,6 +32,65 @@npm install @claude-flow/embeddings```+## Standalone use (without the Ruflo CLI)++This package runs on its own β no `@claude-flow/cli`, no MCP server,+no API key required for the recipes below (the `MockEmbeddingService`+gives deterministic 384-dim vectors so examples are reproducible).+Swap to `OpenAIEmbeddingService` / `TransformersEmbeddingService` /+`AgenticFlowEmbeddingService` when you're ready for real embeddings.++### Recipe β Embed + compare without a network call++```typescript+// recipe.mjs+import {+ MockEmbeddingService,+ cosineSimilarity,+} from '@claude-flow/embeddings';++const service = new MockEmbeddingService({ dimension: 384 });++// `embed()` returns { embedding: Float32Array, tokens, ... } β+// destructure for the raw vector.+const [{ embedding: cat }, { embedding: dog }, { embedding: car }] =+ await Promise.all([+ service.embed('a friendly cat'),+ service.embed('a friendly dog'),+ service.embed('a red sports car'),+ ]);++console.log('cat β dog:', cosineSimilarity(cat, dog).toFixed(4));+console.log('cat β car:', cosineSimilarity(cat, car).toFixed(4));+// With real embeddings the pet pair will score higher than the cat/car pair.+```++### Provider swap β same surface, real vectors++```typescript+import { createEmbeddingService, cosineSimilarity } from '@claude-flow/embeddings';++// OpenAI+const openai = createEmbeddingService({+ provider: 'openai',+ model: 'text-embedding-3-small',+ apiKey: process.env.OPENAI_API_KEY!,+});++// Or local ONNX via @huggingface/transformers (no API key needed)+const local = createEmbeddingService({+ provider: 'transformers',+ model: 'Xenova/all-MiniLM-L6-v2', // 384-dim, ~25MB+});++await openai.initialize();+const v = await openai.embed('hello world');+```++`cosineSimilarity`, `euclideanDistance`, `dotProduct`, and+`computeSimilarity` are exported as plain functions β useful when you+already have vectors from another source and just need the math.+## Quick Start```typescriptdiff --git a/v3/@claude-flow/memory/README.md b/v3/@claude-flow/memory/README.mdindex b96c58c761..269a7d1e42 100644--- a/v3/@claude-flow/memory/README.md+++ b/v3/@claude-flow/memory/README.md@@ -28,6 +28,66 @@npm install @claude-flow/memory```+## Standalone use (without the Ruflo CLI)++This package works on its own β you don't need `@claude-flow/cli` or the+full Ruflo install. Use it any time you want HNSW vector search, an+AgentDB faΓ§ade, or the v3 controller registry from your own app.++Two recipes that exercise the most-installed surface:++### Recipe 1 β HNSW index with built-in quantization (no other deps)++```typescript+// recipe.mjs+import { HNSWIndex } from '@claude-flow/memory';++const index = new HNSWIndex({+ dimensions: 8,+ M: 16,+ efConstruction: 200,+ metric: 'cosine',+});++// Add a few vectors+await index.addPoint('doc-a', new Float32Array([1, 0, 0, 0, 0, 0, 0, 0]));+await index.addPoint('doc-b', new Float32Array([0.9, 0.1, 0, 0, 0, 0, 0, 0]));+await index.addPoint('doc-c', new Float32Array([0, 1, 0, 0, 0, 0, 0, 0]));++// Search β top 2 nearest to "doc-a"-shaped query+const hits = await index.search(new Float32Array([1, 0, 0, 0, 0, 0, 0, 0]), 2);+console.log(hits); // [{ id: 'doc-a', distance: 0 }, { id: 'doc-b', distance: ~0.005 }]+```++### Recipe 2 β Drive the controller registry against your own AgentDB++The registry coordinates 15+ memory controllers (learning bridge, memory+graph, tiered cache, vector backend, etc.) on top of an AgentDB instance+you own. Useful when you already have an AgentDB lifecycle and just+want the v3 governance layer (issue #2019 added the `agentdb` injection+field that makes this clean).++```typescript+import { ControllerRegistry } from '@claude-flow/memory';+import { AgentDB } from 'agentdb';++const agentdb = new AgentDB({ dbPath: ':memory:' });+await agentdb.initialize();++const registry = new ControllerRegistry();+await registry.initialize({ agentdb });++// Now everything backed by AgentDB is reachable through the registry+const reflexion = registry.get('reflexion'); // ReflexionMemory+const vectorBackend = registry.get('vectorBackend'); // live vector backend+const enabled = registry.isEnabled('skills'); // true++const health = await registry.healthCheck();+console.log(`${health.activeControllers}/${health.controllers.length} controllers active`);++await registry.shutdown();+```+## Quick Start```typescriptdiff --git a/v3/@claude-flow/neural/README.md b/v3/@claude-flow/neural/README.mdindex 13ed9009f7..51d0364706 100644--- a/v3/@claude-flow/neural/README.md+++ b/v3/@claude-flow/neural/README.md@@ -17,6 +17,15 @@ A self-contained learning module that records agent execution trajectories, distnpm install @claude-flow/neural```+> **Known issue (2026-05-16):** `@claude-flow/[email protected]`+> transitively depends on `@ruvector/sona`, and the latest published+> `@ruvector/[email protected]` is an empty release (README + `package.json`+> only β no `index.js`, no native bins). Until a content-bearing+> sona is republished or this package pins `@ruvector/sona@^0.1.5`,+> fresh `npm install`s of `@claude-flow/neural` will fail at import+> time with `Cannot find package 'β¦/node_modules/@ruvector/sona/index.js'`.+> See ruvnet/ruflo for a tracking issue.+## Quick start (recommended)`NeuralLearningSystem` is the high-level entry point β it wires `SONAManager`, `ReasoningBank`, and `PatternLearner` together so callers don't have to:diff --git a/v3/@claude-flow/security/README.md b/v3/@claude-flow/security/README.mdindex 64aa501e74..31a4236c6d 100644--- a/v3/@claude-flow/security/README.md+++ b/v3/@claude-flow/security/README.md@@ -24,6 +24,64 @@npm install @claude-flow/security```+## Standalone use (without the Ruflo CLI)++This is a plain library β every primitive (`PasswordHasher`,+`PathValidator`, `SafeExecutor`, `InputValidator`, `CredentialGenerator`)+is independently importable. No CLI, no MCP server, no daemon. The+primitives close CVE-2 (weak hashing), CVE-3 (default credentials),+HIGH-1 (command injection), and HIGH-2 (path traversal) β drop them+into any Node app that needs to validate at a system boundary.++### Recipe β Validate input, hash a password, generate an API key++```typescript+// recipe.mjs+import {+ InputValidator,+ EmailSchema,+ PasswordHasher,+ createCredentialGenerator,+} from '@claude-flow/security';++// 1. Validate user input at the boundary (Zod schemas, no surprises)+const email = InputValidator.validate(EmailSchema, '[email protected]');+// β³ throws if invalid; returns the typed value otherwise++// 2. Hash a password with bcrypt at the recommended cost (CVE-2)+// Default policy: β₯8 chars, β₯1 upper, β₯1 lower, β₯1 digit.+// Tune with new PasswordHasher({ rounds, requireUppercase, ... }).+const hasher = new PasswordHasher({ rounds: 12 });+const hash = await hasher.hash('CorrectHorseBatteryStaple9');+const ok = await hasher.verify('CorrectHorseBatteryStaple9', hash); // true++// 3. Generate a high-entropy API key (CVE-3) β uses crypto.randomBytes+// under the hood and refuses to emit keys below 32 bytes of entropy.+const creds = createCredentialGenerator();+const apiKey = creds.generateApiKey('ck_live_');+console.log(apiKey.keyId, apiKey.key.slice(0, 16) + 'β¦');+// β 7e2b1a9c-β¦ ck_live_xX9aQβ¦+```++### Recipe β Refuse command injection + path traversal++```typescript+import {+ createDevelopmentExecutor,+ createProjectPathValidator,+} from '@claude-flow/security';++// SafeExecutor β only the allow-listed commands ever run (HIGH-1)+const exec = createDevelopmentExecutor({ projectRoot: process.cwd() });+const { stdout } = await exec.execute('git', ['status', '--porcelain']);++// PathValidator β refuses traversal and symlinks out of the project (HIGH-2)+const paths = createProjectPathValidator(process.cwd());+const result = await paths.validate('../../etc/passwd');+if (!result.isValid) console.log('blocked:', result.errors.join('; '));+// β blocked: Path traversal pattern detected+```+## Quick Start```typescript