Commit graph

3 commits

Author SHA1 Message Date
rUv
9efd712ce4 fix(decompiler): statement-boundary splitting — 14/14 modules now parse (was 2/17)
Complete rewrite of module splitter across 3 files (JS, MJS, TS):

parseTopLevelStatements(): proper parser tracking brace/paren/bracket
depth, skipping strings/regex/comments/template literals. Only splits
at depth 0.

isStatementBoundaryAfterBrace(): prevents splitting destructuring,
import/export, and chained expressions.

classifyStatement(): scores COMPLETE statements against module keywords.
Statements are NEVER split across modules.

isSyntacticallyValid(): validates via new Function() with ESM stripping,
async wrapping, and brace-balance fallback.

Before: 2/17 modules parse (keyword line-grep, cuts mid-expression)
After: 14/14 modules parse (statement-boundary, brace-balanced)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-03 11:50:34 +00:00
rUv
e39b5901c1 feat(decompiler): rebuild all versions — organized source/rvf separation, 100% coverage
Rebuilt all 4 versions from scratch:
- v0.2.x: 1,049 classes, 13,869 functions, 3,375 RVF vectors
- v1.0.x: 1,390 classes, 16,593 functions, 4,669 RVF vectors
- v2.0.x: 1,612 classes, 20,395 functions, 5,712 RVF vectors
- v2.1.x: 1,632 classes, 19,906 functions, 9,058 RVF vectors

Structure: source/ (17 JS modules in subfolders) + rvf/ (9 containers)
- Zero mixing: no JS in rvf dirs, no RVF in source dirs
- 100% code coverage: uncategorized/ catches everything
- 17 modules: core/3, tools/3, permissions/1, config/3, telemetry/1, ui/2, types/1, uncategorized/1
- 9 RVF containers per version (1 master + 8 per-category)

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-03 03:18:41 +00:00
rUv
930fca916f feat(sse): decouple SSE to mcp.pi.ruv.io proxy + Claude Code source research
SSE Proxy Decoupling (ADR-130):
- Fix ruvbrain-sse proxy: proper MCP handshake, session creation, drain polling
- Fix internal queue endpoints: session_create keeps receiver, drain returns buffered messages
- Add response_queues to AppState for SSE proxy communication
- Skip sparsifier for >5M edge graphs (was crashing on 16M edges)
- Add SSE_DISABLED/MAX_SSE env vars for configurable connection limits
- Route SSE to dedicated mcp.pi.ruv.io subdomain (Cloudflare CNAME)
- Serve SSE at root / path on proxy (no /sse needed)
- Update all references from pi.ruv.io/sse to mcp.pi.ruv.io
- Fix Dockerfile consciousness crate build (feature/version mismatches)

Claude Code CLI Source Research (ADR-133):
- 19 research documents analyzing Claude Code internals (3000+ lines)
- Decompiler script + RVF corpus builder for all major versions
- Binary RVF containers for v0.2, v1.0, v2.0, v2.1 (300-2068 vectors each)
- Call graphs, class hierarchies, state machines from minified source

Integration Strategy (ADR-134):
- 6-tier integration plan: WASM MCP, agents, hooks, cache, SDK, plugin
- Integration guide with architecture diagrams and performance targets

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-04-02 23:39:56 +00:00