Commit Graph
120 Commits
Author SHA1 Message Date
r e2384d4e6e Merge branch 'pr-4029' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r ffd66d59fc Merge branch 'pr-4028' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 29b5574fd0 Merge branch 'pr-4025' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 78cd445550 Merge branch 'pr-4024' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 33af710814 Merge branch 'pr-4023' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 096643f123 Merge branch 'pr-4033' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r 18ed76d3e0 Merge branch 'pr-4032' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r af5b6b92c6 Merge branch 'pr-4022' into batch/rudycelekli-fixes 2026-10-11 10:45:19 -04:00
r cc44e3248c Merge branch 'pr-4021' into batch/rudycelekli-fixes 2026-10-11 10:45:18 -04:00
r 2940c91fcd Merge branch 'pr-4020' into batch/rudycelekli-fixes 2026-10-11 10:45:18 -04:00
rUv 325ee58359 Merge pull request #4050 from ruvnet/fix/codex-swarm-hook-manifest-3688
fix(ruflo-swarm): add host-specific no-op manifest for native Codex hook discovery
2026-10-11 07:44:33 -07:00
rUv 71b58843a8 Merge pull request #4034 from rudycelekli/fix/adr-directory-cycle-scan-20261010
fix(adr): visit each real directory once during scanning
2026-10-11 06:32:33 -07:00
ClaudeandRuFlo 6048331860 fix(ruflo-swarm): add host-specific no-op manifest for native Codex hook discovery
ruflo-swarm's hooks/hooks.json declares a Claude Code function-hook
module (modules: ["./register.ts"]) for the live swarm pane. Codex's
native plugin hook-manifest loader accepts only description and hooks
at the top level and hard-fails with `unknown field "modules"`,
dropping the plugin's hook registration entirely (#3688).

Add plugins/ruflo-swarm/.codex-plugin/plugin.json, the native override
Codex already prefers over .claude-plugin/plugin.json (same convention
used by ruflo-adr/ruflo-ddd/ruflo-sparc), pointing at a new
hooks/codex-hooks.json with an explicit no-op (`hooks: {}`). ruflo-swarm's
function hooks are a pure UI pane with no guard/security logic to port,
so an explicit no-op — not invented command hooks — is the correct
fix, matching the issue's own proposed resolution.

The Claude Code manifest and register.ts module are untouched.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01QFyyphjiSXRE1TS2rRnEwU
2026-10-11 05:19:25 +00:00
Rudy Celekli b4c9a9c45a test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:06 -04:00
Rudy Celekli 8413a620ef test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:05 -04:00
Rudy Celekli 914442da6f test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:05 -04:00
Rudy Celekli 65605015c8 test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:04 -04:00
Rudy Celekli 27ff12a65b test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:03 -04:00
Rudy Celekli c1b7c76ce1 test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:03 -04:00
Rudy Celekli 839971d8d8 test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:02 -04:00
Rudy Celekli 2af1fee0b0 test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:01 -04:00
Rudy Celekli b3d1c6d7fc test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:01 -04:00
Rudy Celekli c0efcf52c4 test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:00 -04:00
Rudy Celekli 045add0645 test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:35:00 -04:00
Rudy Celekli bca0329e17 test: run focused regressions with the repository Vitest runner
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 15:34:59 -04:00
Rudy Celekli e1f2937b5e fix(adr): avoid repeated directory traversal through cycles
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:48:43 -04:00
Rudy Celekli 35c87de121 fix(memory): allow expired JSON keys to be reused
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:47:51 -04:00
Rudy Celekli f48cb26035 fix(memory): omit nonmatching JSON substring results
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:47:08 -04:00
Rudy Celekli b92b35fe91 fix(events): rebuild RVF indexes on initialization retries
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:42:27 -04:00
Rudy Celekli ec0ae3dcda fix(events): honor zero RVF query limits
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:41:28 -04:00
Rudy Celekli 60ffe11d3f fix(adr): recognize context end of input without truncating Z
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:40:39 -04:00
Rudy Celekli ef1327c8ee test(cli-core): exercise progress controls on an interactive output
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:34:28 -04:00
Rudy Celekli bca48964ac fix(cli-core): measure visible widths for colored headers
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:29:08 -04:00
Rudy Celekli 695dcf027f fix(cli-core): include table padding in width constraints
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:27:34 -04:00
Rudy Celekli 7b718959bf fix(cli-core): honor progress output controls and empty totals
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:25:41 -04:00
Rudy Celekli c7314d700a fix(cli-core): measure JSON memory size in UTF-8 bytes
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:24:20 -04:00
Rudy Celekli 627e1a5b2b fix(cli-core): reject invalid JSON memory entry containers
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:23:08 -04:00
Rudy Celekli 2d32d9d4a2 fix(cli-core): commit owned JSON memory snapshots atomically
Signed-off-by: Rudy Celekli <rudy@gradiahq.com>
2026-10-10 12:21:44 -04:00
Stuart Kerr 24a83b3297 fix(plugins): allow native freeform inputs and version Codex hook repair 2026-10-08 16:52:49 -04:00
Stuart Kerr b968e34970 fix(plugins): add native Codex adapters for ADR DDD and SPARC mods 2026-10-08 16:52:42 -04:00
ruv 8d32e0f642 test(mods): tripwire against forwarding a mod status file into model context (ADR-450 T7)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-05 05:37:46 -04:00
ruv 00eed549d4 test(mods): check that every tool name a plugin guard watches exists in the registry
Adds scripts/check-guard-tool-names.mjs, an allowlist for tools other servers
serve, node:test tests, and a step in the all-plugins-smoke workflow. Fails
loud when nothing is extracted or the registry is empty.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-10-04 19:02:02 -04:00
rUv 66e4a12366 test/hooks: fix two stale main-tree Test Suite failures exposed by #3203 (embedding width; hook-handler exports) (#3204)
* test(context-hook): assert the hash embedding width is EMBEDDING_DIM (384), not the legacy 768

tests/context-persistence-hook.test.mjs still expected createHashEmbedding
to return 768 values; the hook has defaulted to 384 (the ONNX
all-MiniLM-L6-v2 width, EMBEDDING_DIM) since February so hash-fallback
blobs stay comparable with ONNX vectors. The mismatch was hidden while
the Test Suite job died at ETARGET (fixed in #3203) and surfaced on the
first PR runs after it (#3177, #3184). Assert EMBEDDING_DIM and pin it
to 384; fix the stale "768-dim" docstring on the blob store.

node --test tests/context-persistence-hook.test.mjs: 66 pass, 0 fail.

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

* fix(hooks): restore hook-handler's require.main guard and test exports dropped by the July helper sync

tests/hook-handler-runwithtimeout.test.cjs failed with "runWithTimeout is
not a function" on the first Test Suite runs after #3203 (#3177, #3184).
cb1e93e8d (2026-06-15) had guarded the hook dispatch behind
`require.main === module` and exported { runWithTimeout,
INTELLIGENCE_TIMEOUT_MS } for that test; the 2026-07-04 helper sync
(a5f86ad0a) replaced both copies of hook-handler.cjs with the packaged
build and dropped the guard and the exports, so require()-ing the helper
ran main() (stdin read + process.exit) and exposed nothing.

Both copies (repo dogfood + v3/@claude-flow/cli) restored identically;
direct invocation still prints usage and exits 0. The helpers manifest
is re-signed at publish (prepublishOnly), as the guard workflow expects.

node --test tests/hook-handler-runwithtimeout.test.cjs
  tests/context-persistence-hook.test.mjs: all pass, 0 fail.

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

* chore(helpers): re-sign helpers manifest after hook-handler.cjs test-surface restore

The packaged hook-handler.cjs changed in this branch (require.main guard +
runWithTimeout exports), so helpers.manifest.json still carried main's hash
and helper-signing.test.ts ("hashes match the actual shipped helper files")
failed in Test Suite (ubuntu-latest), run 33972961703. Re-signed with the
ruflo helpers key via RUFLO_HELPERS_SIGNING_SECRET; no other file changed.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_019xHM4rAH4aaShb4DTr1n6s
2026-09-05 11:15:02 -04:00
tjaiyenandClaude Fable 5 cb1e93e8db fix(hooks): harden memory/hook helpers (timeout, signals, truncation, cross-platform slug)
FIX 1 — runWithTimeout was inert: it called fn() then clearTimeout()
immediately, so an async callee's hang was never caught (the timer was
cleared before the pending promise settled). Reimplement as a real
Promise.race between the work and the timeout. Document that a synchronous
blocking callee cannot be preempted in-process (the real guard is the
file-size cap in intelligence.cjs). Applied to both hook-handler.cjs copies.

FIX 2 — auto-memory-hook.mjs swallowed ALL unhandled rejections process-wide
via `() => {}`. Keep hooks exit-0 but log the reason under RUFLO_DEBUG/DEBUG
so genuine async bugs are visible.

FIX 3 — no SIGTERM/SIGINT cleanup in the db-touching helpers. Track the active
backend and flush it (JSON persist / SQLite close + WAL flush) on signal,
avoiding half-written stores and stale agentdb.rvf.lock.

FIX 4 — silent value truncation (intelligence.cjs 500/100 chars). Add clip():
appends an ellipsis and warns under debug when it actually cuts.

FIX 5 — projectSlug only handled POSIX '/', so on Windows it never matched
Claude Code's real ~/.claude/projects/<slug> dir and memory bootstrap silently
found nothing. Slugify every non-alphanumeric to '-' to match Claude's
convention (verified: G:\My Drive\...\ruflo-fix -> G--My-Drive-...-ruflo-fix).

Also: export runWithTimeout behind a require.main guard so it is unit-testable,
and add tests/hook-handler-runwithtimeout.test.cjs (node:test, 5 cases incl.
the decisive slow-async timeout case).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-16 08:40:24 -07:00
rUv dc8463872d feat(ADR-057): RVF native storage with security hardening (#1244)
* docs: add ADR-057 — RVF native storage backend to replace sql.js

Proposes replacing the 18MB sql.js WASM SQLite dependency with
RuVector Format (RVF) across @claude-flow/shared, memory, and
embeddings packages. Includes automatic and manual migration paths
for existing .db and .json files with full backward compatibility.

Key benefits: -18MB install size, 150x-12,500x faster vector search
via native HNSW, quantization support, crash-safe append-only format.

Co-Authored-By: claude-flow <ruv@ruv.net>

* docs: extend ADR-057 with RVF embedding provider, ruvLLM persistence, and progressive download

Add three major sections to ADR-057:

- Section 3A: RVF as 5th EmbeddingProvider (52KB WASM replaces 540MB
  agentic-flow for basic use cases). Updated auto-select hierarchy:
  rvf > agentic-flow > transformers > mock.

- Section 3B: ruvLLM learning persistence via RVF segments. SONA
  patterns (ReasoningBank), LoRA adapters, and EWC++ weights now
  survive process restarts. RuVectorProvider.searchMemory works
  offline via RVF without HTTP server.

- Section 10: Progressive download architecture. Replaces npm
  optionalDependencies (all-or-nothing 1.3GB) with on-demand
  capability downloads stored as .rvf files. 5 phases from 22MB
  core CLI to full LLM/CNN/GNN/kernel capabilities.

Implementation plan expanded from 5 to 8 phases. Testing strategy
updated with 11 new test cases covering the additions.

Co-Authored-By: claude-flow <ruv@ruv.net>

* feat: add optimized Docker images for Ruflo lite/full/workers

- Dockerfile: Multi-stage Alpine build with aggressive dependency pruning.
  Result: 324MB image, 0.6s startup (vs 1.3GB/35s baseline).
  Uses --omit=optional + explicit rm -rf of heavy transitive deps.

- Dockerfile.full: Full image variant with all optional dependencies
  including native compilation (onnxruntime-node, better-sqlite3).

- Dockerfile.headless: Updated from node:20 to node:22, claude-flow
  branding to ruflo, same prune strategy as lite.

- docker-compose.yml: Three profiles (lite, full, workers) with
  appropriate resource limits and health checks.

- .dockerignore: Excludes node_modules, tests, source maps, IDE
  configs, and secrets from build context.

Co-Authored-By: claude-flow <ruv@ruv.net>

* feat(ADR-057): implement RVF native storage backend across all packages

Replace sql.js (18MB WASM) with zero-dependency RVF format across
memory, events, embeddings, and learning subsystems. Pure TypeScript
fallback with optional native @ruvector/rvf acceleration.

New files:
- memory/rvf-backend.ts: IMemoryBackend impl with HNSW + binary persistence
- memory/hnsw-lite.ts: Lightweight HNSW graph for vector search
- memory/rvf-learning-store.ts: SONA pattern/LoRA/EWC/trajectory persistence
- memory/persistent-sona.ts: PersistentSonaCoordinator wrapping learning store
- shared/events/rvf-event-log.ts: Append-only event log (replaces EventStore)
- embeddings/rvf-embedding-cache.ts: Binary file embedding cache (FNV-1a keys)
- embeddings/rvf-embedding-service.ts: Hash-based embedding provider (<0.1ms)

Integrations:
- DatabaseProvider: 'rvf' added, auto-selected first (always available)
- EmbeddingProvider: 'rvf' added, auto-selected first in async factory
- All packages export new RVF types and classes

Tests: 163 passing (5 suites), validated in Docker (node:22-alpine)
- rvf-backend: 50 tests (CRUD, query, search, persistence, HNSW)
- rvf-event-log: 33 tests (append, replay, snapshots, crash recovery)
- rvf-embeddings: 30 tests (cache, service, determinism, normalization)
- rvf-learning-store: 31 tests (patterns, LoRA, EWC, trajectories)
- rvf-integration: 19 tests (provider selection, migration, concurrency)

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(ADR-057): harden RVF storage with security, performance, and migration

Security: atomic writes (tmp+rename) across all backends, path validation,
input validation at boundaries. Performance: persist lock prevents concurrent
flushes, stack overflow fix for large datasets, timer.unref() prevents hangs,
O(1) eviction lookup in embedding cache. New: bidirectional RVF migration
utility (JSON/SQLite/RVF), format v2 with backward compat, auto-persist
patterns and trajectories before eviction. Added HnswLite and RvfMigrator
exports. 193 tests passing, 0 TS errors.

Refs #1242

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix: doctor version detection and init settings warnings (#1235, #1230)

doctor: Replace unreliable path-walking heuristic with import.meta.url
traversal to find the correct package.json. Removes stale npx cache
scanning that could report wrong versions. Fixes #1235.

init: Remove invalid TeammateIdle and TaskCompleted keys from generated
.claude/settings.json hooks section. These are not recognized by Claude
Code and caused warnings. Config remains available under the claudeFlow
namespace. Fixes #1230.

Co-Authored-By: claude-flow <ruv@ruv.net>

* fix(doctor): remove Windows-incompatible shell redirects, simplify root detection

- Remove fragile Windows root calculation (split on backslash); use
  dirname(dir) === dir instead which works on all platforms
- Remove 2>/dev/null from npm view command (fails on Windows cmd.exe);
  the catch block handles errors gracefully already

Co-Authored-By: claude-flow <ruv@ruv.net>

* security: harden RVF against crafted files and race conditions

- rvf-backend: validate dimensions (1-10000), validate RVF header
  structure and size before JSON.parse, guard persist interval
  against concurrent flushes
- rvf-embedding-cache: use random suffix for tmp files to prevent
  predictable-path attacks on multi-user systems
- rvf-event-log: add 100MB max payload size limit to prevent DoS
  from crafted event log files
- rvf-migration: add null byte and type validation on all paths

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-02-27 21:46:53 -05:00
rUvandClaude Opus 4.5 9cfc730051 Checkpoint: File edits
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-10T16:51:40Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 16:51:40 +00:00
rUvandClaude Opus 4.5 5a90c88994 Checkpoint: File edits
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-10T16:50:54Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 16:50:54 +00:00
rUvandClaude Opus 4.5 bdaa405b87 Checkpoint: File edits
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-10T16:35:50Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 16:35:50 +00:00
rUvandClaude Opus 4.5 ef8f734541 Checkpoint: File edits
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-10T16:35:27Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 16:35:27 +00:00
rUvandClaude Opus 4.5 30cd6b9341 Checkpoint: File edits
Automatic checkpoint created by Claude Code
- Branch: rebrand/ruvflow-umbrella
- Timestamp: 2026-02-10T16:09:32Z
- Changes: 1 file(s)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 16:09:32 +00:00