mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-12-04 06:21:59 +09:00
6f44e533bd2c58ea30b86dfd22d4f2b07cdae56e
6
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
24450bf9f7 |
feat(rure): rure_cuda_launch_plan — static occupancy plan for CUDA kernels (ADR-501) (#4464)
New read-only tool: per kernel and architecture, theoretical occupancy at several block sizes, what limits it, the best sizes and flags; optionally the text of a driver-API harness the person can build to check it on their own GPU. Nothing is compiled, loaded or run by ruRE. The model equals NVIDIA's cuda_occupancy.h on 1,770,216 combinations (8 archs, limiting sets included; fingerprints committed so CI repeats it) and the CUDA driver on real GPUs: RTX 5080, RTX 3090, RTX 4090, A100, H100. Found on hardware: from sm_90 the cubin's shared size already includes the driver's 1 KiB reservation. Also fixes the reader reporting sm_5 for standalone cubins from CUDA 12 (ELF OS ABI 51 keeps the SM number in the low byte of e_flags); real CUDA 12.8 cubins added. ruflo-rure 0.6.0. Co-authored-by: r <r@x> |
||
|
|
dd5d66cdb4 |
feat(rure): rure_analyze_cuda — CUDA fatbin, cubin and PTX static analysis (ADR-0006) (#4441)
* feat(rure): rure_analyze_cuda — CUDA fatbin, cubin and PTX static analysis (ADR-0006) New read-only MCP tool and an original pure-TypeScript reader: fatbin containers and entries (kind, sm_NN, zstd/LZ4 under size caps), cubin kernels from the symbol table with registers (EIATTR_REGCOUNT), code size and constant/shared/local memory, and PTX version/target/kernel names. Parses, never executes; strings screened by AIDefence; decompression budget charged per attempt. Checked against real nvcc 12.8 and 13.0 output (sm_75/80/90) and cuobjdump: committed fixtures with recorded ground truth, plus a live test that compiles with a local nvcc. ruflo-rure 0.5.0. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(rure): rure_analyze_cuda description carries the ADR-112 'Use when' guidance The tool-description audit (ADR-112) failed the PR: one tool without guidance. Co-Authored-By: RuFlo <ruv@ruv.net> * fix(rure): linear-time PTX sniff and scan (CodeQL js/redos, plus a quadratic one it did not flag) looksLikePtx used a lazy comment pattern inside a repeated group, which backtracks exponentially (CodeQL js/redos); it is now a forward scan. The directive regexes in scanPtx matched with ^\s*, which rescans a whole run of blank lines at every line start: 80000 blank lines took 4.6 s and 320000 took 71 s. They now match space and tab only and bound the rest. Tests: pathological comment structure, and long blank-line and whitespace runs, all under 500 ms. Co-Authored-By: RuFlo <ruv@ruv.net> --------- Co-authored-by: r <r@x> |
||
|
|
e6ec9cd687 |
feat(ruflo-rure): Phase 4 — EVM bytecode static inventory (#4402)
Adds rure_analyze_evm per ADR-0005: aligned disassembly and pattern scan for dispatcher selectors, hazardous opcodes, embedded addresses, event topics, EIP-1167 minimal proxies, solc metadata and embedded strings. No interpreter, RPC or network; PUSH data is never read as opcodes; input capped at 256 KiB; embedded strings pass the AIDefence gate. Co-authored-by: r <r@x> |
||
|
|
d835597e0b |
feat(ruflo-rure): Phase 3 — .NET assembly metadata inspection (#4401)
Adds rure_analyze_dotnet per ADR-0004: an original pure-TypeScript ECMA-335 metadata reader (assembly identity and references, types, method count, P/Invoke imports, user-string literals, entry point). No dependency, no IL decoding, never loads or runs the assembly. Table extents are validated against the stream before any row is read, and all extracted text passes through the AIDefence gate. Co-authored-by: r <r@x> |
||
|
|
b31d2b0471 |
feat(ruflo-rure): Phase 2 — native binary static analysis (ELF/PE/Mach-O) (#4400)
Adds rure_analyze_binary per ADR-0003: an original pure-TypeScript container parser (format, arch, entry, sections, linked libraries, imported/exported symbols, optional strings). No disassembler, no new dependency, never loads or executes the target. Reads are bounds-checked, tables and strings are capped, files over 128 MiB are refused, and all extracted text passes through the AIDefence gate. Co-authored-by: r <r@x> |
||
|
|
1b31914579 |
feat(ruflo-rure): new reverse-engineering plugin, Phase 1 (JS/Electron static analysis) (#4396)
* docs(ruflo-rure): ADR-0001 scope/dual-use policy, ADR-0002 Phase 1 architecture
Fixes #4395 (part 1 — research/planning phase)
Co-Authored-By: RuFlo <ruv@ruv.net>
* feat(ruflo-rure): Phase 1 implementation — JS/Electron static analysis
Implements the plugin scaffold (manifest, skill, command, agent, smoke
test, benchmark) and the three Phase 1 MCP tools per ADR-0001/0002:
- rure_extract_asar: resource-capped .asar extraction via @electron/asar,
checking the archive header's declared size/file count before writing
anything (decompression-bomb guard).
- rure_analyze_js_app: TypeScript-compiler-API-based static analysis —
import/export graph, Electron process-boundary detection (ipcMain/
ipcRenderer/contextBridge, require("electron"), nodeIntegration flags),
every finding evidence-sourced to file + line range.
- rure_find_feature: deterministic lexical/structural feature search,
explicitly not semantic/LLM matching.
Every extracted string is routed through the AIDefence content gate
before being returned; flagged content is redacted, never dropped
silently. Parses only — never executes analyzed code, independently
verified by scripts/smoke.mjs grepping the real source (comments
stripped first, so the doc comment describing the property can't trip
its own check).
27 new tests, all passing. Typecheck clean. Tool-description audit
(ADR-112) clean. Benchmark: ~3.6k-18k files/s on a synthetic Electron
bundle (plugins/ruflo-rure/scripts/benchmark.ts).
Trust tier: experimental. Marketplace/directory submission is a
separate, explicit decision, not part of this change (ADR-0001).
Part of #4395.
Co-Authored-By: RuFlo <ruv@ruv.net>
* feat(console): add ruflo-rure to the plugin map (devtools section)
Every plugin directory needs a line in PLUGIN_MAP or the console's own
plugin-coverage test fails. ruflo-rure lands in devtools, same section
as the other inspection/analysis plugins (ruflo-browser, ruflo-jujutsu,
ruflo-testgen).
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(ruflo-rure): fix CI failures — real deps, capability-brain classification
Three real bugs surfaced by PR #4396's CI, not flakes:
- typescript was only a devDependency of @claude-flow/cli, but
src/rure/ts-walk.ts needs it at runtime. Moved to dependencies.
(CI: "Cannot find package 'typescript'" in a from-source install.)
- @claude-flow/aidefence was never declared as a dependency of
@claude-flow/cli at all (only resolvable locally via monorepo
hoisting), so the AIDefence gate silently no-op'd in CI's isolated
install. Added as an optionalDependency, matching the existing
graceful-degradation code path and the browser_act precedent this
also fixes.
- capability-brain.ts classified every registered MCP tool into a
domain by prefix; the three new rure_* tools had no domain, so
guidance-brain.test.ts's "classifies every live registered tool"
assertion failed. Added a 'reverse-engineering' domain (experimental
maturity, matching ADR-0001's trust tier) and its package-owner
lookup entry.
All 35 rure + guidance-brain tests pass; typecheck clean;
audit-tool-descriptions and audit-cli-mcp-tools clean.
Co-Authored-By: RuFlo <ruv@ruv.net>
* fix(ruflo-rure): revert @claude-flow/aidefence optionalDependency, mock it in tests instead
Reverts the optionalDependency added in
|