ruvector/scripts/lib
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
..
module-splitter.mjs fix(decompiler): statement-boundary splitting — 14/14 modules now parse (was 2/17) 2026-04-03 11:50:34 +00:00
rvf-builder.mjs feat(sse): decouple SSE to mcp.pi.ruv.io proxy + Claude Code source research 2026-04-02 23:39:56 +00:00