Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 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

feat(ruflo-console): ruRE page in TOOLS — static reverse engineering from the console (ADR-494) (#4430)

rUve8c98eb91606
diff --git a/plugins/ruflo-console/.claude-plugin/plugin.json b/plugins/ruflo-console/.claude-plugin/plugin.json
index 1e7921950f..edd50371c1 100644
--- a/plugins/ruflo-console/.claude-plugin/plugin.json
+++ b/plugins/ruflo-console/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "ruflo-console",
"description": "ruflo's cockpit inside Claude Code and the one /ruflo command for every ruflo mod (function hooks, early access). Views: overview with health alerts, swarm topology graph, claims flow with TTL rings, federation map, plugin health matrix, learning curve and pipeline, MetaHarness radar and audit trend, memory, cost gauge, agent timeline, approvals queue, event stream, a main menu, an x.ruv.io federation board, an AI terminal (codex, claude or both in remembered sessions, streamed), Skills (npx skills), a Hive-Mind view, a MetaHarness lab, agent drill-down; a command palette for confirm-gated actions through the ruflo CLI; a band above the prompt. Reads ruflo's files and the CLI's local JSON; anything not measured reads n/a. The one network call it makes by itself is a daily read of the published plugin.json at github.com/ruvnet/ruflo to offer an update (Settings → Updates: ask, auto, or off); it installs only through Claude Code's own claude plugin update, and never a new major version without asking.",
- "version": "0.44.7",
+ "version": "0.45.0",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
diff --git a/plugins/ruflo-console/CHANGELOG.md b/plugins/ruflo-console/CHANGELOG.md
index 5c26f86ba3..b18eff85be 100644
--- a/plugins/ruflo-console/CHANGELOG.md
+++ b/plugins/ruflo-console/CHANGELOG.md
@@ -2,6 +2,10 @@
Newest first. One `## <version> — <date>` heading per version, then `feat:`, `fix:`, `breaking:` and `chore:` bullets (ADR-478). Built from git history; older versions: `git log -- plugins/ruflo-console`.
+## 0.45.0 — 2026-10-23
+- feat: a **ruRE** page in the TOOLS group (ADR-494): static reverse engineering of a file in your project through the six `rure_*` tools — a JS/Electron app (APP MAP, FIND FEATURE, UNPACK .ASAR), a native binary (ELF, PE, Mach-O), a .NET assembly and EVM bytecode. The tools parse and never run the file. Five rows are `$0` reads that run at once; UNPACK .ASAR writes to a temp folder and asks first. The file is named by a new *sample* field that takes only a path inside the project. Every row is a palette id (`/ruflo run dt-re-bin <path>`). Names and strings from the analyzed file are shown cleaned, so a hostile binary cannot put a terminal escape on the screen. On a ruflo CLI without the tools (3.59.17 and older) the rows say to update.
+- chore: Enter in a field on a page of its own can run that page’s row (the ruRE page); the same `query` field on the Plugins page still runs the plugin search. The boot specs now derive the finish time from the number of areas instead of a fixed 5.4 s.
+
## 0.44.7 — 2026-10-21
- fix: the ADRs page, the Events/Timeline export and the AI terminal's "save transcript" now work on Windows (#4356, thanks @marioja). All three hardcoded a leading-`/` check as their "is the project folder known" guard; on Windows `state.cwd` is a drive path (`C:\Users\...`), so every one of them refused with "no project folder is known" regardless of settings. They now use the existing `isAbsolutePath` helper (already fixed for register.ts in #4175). Also fixed a second, independent bug on the transcript-save path: it pre-joined `state.cwd` into the string handed to `resolveExportPath`, which refuses any backslash in its input — so even after the first fix, a Windows transcript save still failed; it now passes the relative file name only, same as the Events/Timeline export already did.
diff --git a/plugins/ruflo-console/README.md b/plugins/ruflo-console/README.md
index 0537c1f28e..c89b30074b 100644
--- a/plugins/ruflo-console/README.md
+++ b/plugins/ruflo-console/README.md
@@ -45,6 +45,16 @@ CONSOLE_DRIVE_INSTALL="$PWD:ruflo-mods@ruflo" RUFLO_E2E_LIVE=1 bash plugins/rufl
- **Missions, loops, swarms.** Attach ADRs to the active mission (the page suggests some from the goal's words; you decide). Claude's mission context, each task's instruction and spawned swarm agents (ruflo-swarm 0.3.5) are told the accepted decisions, masked and capped. At *verify*, changed files are compared with the paths the attached accepted ADRs name: a warning in the mission record. **That compares paths only. It does not prove a change follows or breaks a decision, and it never blocks.** When a mission is done, *draft an ADR from this mission* prepares a proposed record from its goal and tasks; the decision is yours to write.
- **For Claude.** `/ruflo run adr-propose <title>`, `adr-accept <n>`, `adr-supersede <old> <new>`, `adr-attach <n>` and the rest are palette entries, so Claude reaches them through `console_run` at the *write* control level (reading the page is *read*); a change still waits for your Yes on the diff.
+## Look inside a file without running it: ruRE (ADR-494)
+
+**TOOLS → ruRE** is the page for the six static-analysis tools of ruflo-rure: type a file or folder **inside your project** in the *sample* field and press a row.
+
+- **JavaScript and Electron.** *APP MAP* (imports and Electron boundaries per module) and *FIND FEATURE* (where a feature lives, in words) read a folder of source; *UNPACK .ASAR* extracts an app archive to a temp folder outside the project, so it asks first, and you copy that folder in to map it.
+- **Native, .NET, EVM.** *NATIVE BINARY* reads ELF, PE and Mach-O; *.NET ASSEMBLY* reads metadata only; *EVM BYTECODE* takes a file of hex or raw bytes and lists selectors, risky opcodes and proxies.
+- **Parse only.** Nothing is executed. Names and strings in a result are the file’s own text: shown cleaned (no escape sequence reaches the terminal) and to be treated as untrusted. A risky opcode or import is an inventory fact, not a finding.
+- **For Claude.** Every row is a palette id: `/ruflo run dt-re-bin tools/app.exe`, `dt-re-js`, `dt-re-find`, `dt-re-net`, `dt-re-evm`, `dt-re-asar`. The tools ship in a ruflo newer than 3.59.17; on an older one the rows say `update ruflo`.
+- **Limits.** Only project-relative paths are accepted (a symlink inside the project that points outside is still followed by the tool). Dynamic analysis is not part of this page.
+
## In a terminal of its own: `ruflo tui` (ADR-489)
The same views the mod draws, on five pages (Overview, Cost, Swarm, Events, Missions), drawn by a small standalone terminal host instead of Claude Code, and a sixth, AI, that asks Codex or OpenRouter. The five are read-only; the AI page shows a card of exactly what would be sent and sends only after a `y`; `npx ruflo tui` (the `ruflo` package and `@claude-flow/cli` carry the bundle).
diff --git a/plugins/ruflo-console/hooks/ask-claude.ts b/plugins/ruflo-console/hooks/ask-claude.ts
index e8f2a5c73b..30eab4c4e2 100644
--- a/plugins/ruflo-console/hooks/ask-claude.ts
+++ b/plugins/ruflo-console/hooks/ask-claude.ts
@@ -51,6 +51,7 @@ export const VIEW_ASK: Record<ViewId, ViewAsk> = {
sandbox: { default: 'Which sandbox fits what I want to try, and is anything running here I should end?', slash: 'ruflo-rvf:rvf' },
market: { default: 'Which of these plugins would help most for what I am doing?' },
adrs: { default: 'Which of my project’s ADRs matter for what I am working on, and does anything I have changed cut across an accepted decision?' },
+ rure: { default: 'What do the ruRE results above say about this file: what does it import and expose, and does anything in it deserve a closer look? Say what the tools cannot tell.' },
whatsnew: { default: 'Which of these plugin changes matter for how I work, and does any breaking change need action from me?' },
themes: { default: 'Help me design a readable animated console theme with Theme Studio.' },
settings: { default: 'Which of these settings should I change for how I work?' },
diff --git a/plugins/ruflo-console/hooks/data/devtools.ts b/plugins/ruflo-console/hooks/data/devtools.ts
index fae6897021..b377614883 100644
--- a/plugins/ruflo-console/hooks/data/devtools.ts
+++ b/plugins/ruflo-console/hooks/data/devtools.ts
@@ -6,14 +6,15 @@
import { jsonAfter } from './cli'
import { plain, recordOf } from './parse'
import { labLines } from '../mh-lab'
+import { rureLines } from './rure'
-export type DevField = 'ref' | 'path' | 'label' | 'url' | 'target' | 'query' | 'task' | 'cmd' | 'id' | 'note' | 'session' | 'send'
+export type DevField = 'ref' | 'path' | 'label' | 'url' | 'target' | 'query' | 'task' | 'cmd' | 'id' | 'note' | 'session' | 'send' | 'sample'
export type DevFields = Record<DevField, string>
-export const DEV_FIELDS: readonly DevField[] = ['ref', 'path', 'label', 'url', 'target', 'query', 'task', 'cmd', 'id', 'note', 'session', 'send']
+export const DEV_FIELDS: readonly DevField[] = ['ref', 'path', 'label', 'url', 'target', 'query', 'task', 'cmd', 'id', 'note', 'session', 'send', 'sample']
-export const emptyFields = (): DevFields => ({ ref: 'HEAD', path: '', label: '', url: '', target: '', query: '', task: '', cmd: '', id: '', note: '', session: '', send: '' })
+export const emptyFields = (): DevFields => ({ ref: 'HEAD', path: '', label: '', url: '', target: '', query: '', task: '', cmd: '', id: '', note: '', session: '', send: '', sample: '' })
const CONTROL = /[\u0000-\u001f\u007f]/
@@ -50,6 +51,8 @@ function urlOf(text: string): string | null {
const RULES: Record<DevField, { test: (text: string) => string | null; rule: string }> = {
ref: { test: text => (/^[A-Za-z0-9@][A-Za-z0-9._/~^@{}-]{0,99}$/.test(text.trim()) ? text.trim() : null), rule: 'a git ref: HEAD, HEAD~3, main..HEAD, a branch or a sha (letters, digits . _ / ~ ^ @ { } -, not starting with -)' },
path: { test: pathOf, rule: 'a path under the project: relative, letters, digits . _ / -, no .. segment, at most 160' },
+ // ruRE (ADR-492): the file or folder to analyze. Same rule as `path`: only what is inside the project can be named here.
+ sample: { test: pathOf, rule: 'a file or folder under the project: relative, letters, digits . _ / -, no .. segment, at most 160 (the ruRE page analyzes only what is inside this project)' },
label: { test: text => (/^[A-Za-z0-9][A-Za-z0-9._-]{0,39}$/.test(text.trim()) ? text.trim() : null), rule: 'a label: letters, digits . _ -, at most 40, not starting with . or -' },
url: { test: urlOf, rule: 'an http(s) URL with no spaces or quotes, at most 300' },
target: { test: text => (/^@e\d{1,5}$/.test(text.trim()) ? text.trim() : null), rule: 'an element ref from a snapshot: @e1, @e12 …' },
@@ -146,6 +149,13 @@ export function brainLines(value: unknown): string[] {
export function devLines(id: string, stdout: string, stderr = ''): string[] {
const answer = unwrap(stdout)
+ // ruRE (ADR-492): its own readers, applied first; a CLI without the tools is said plainly.
+ if (id.startsWith('dt-re-')) {
+ const lines = rureLines(id, answer?.value ?? null, stdout, stderr)
+
+ if (lines.length > 0) return lines
+ }
+
if (answer === null) return labLines(id, stdout, stderr)
const { value, isError } = answer
diff --git a/plugins/ruflo-console/hooks/data/rure.ts b/plugins/ruflo-console/hooks/data/rure.ts
new file mode 100644
index 0000000000..3f182c38f6
--- /dev/null
+++ b/plugins/ruflo-console/hooks/data/rure.ts
@@ -0,0 +1,165 @@
+/**
+ * ruRE in Dev Tools (ADR-492): the readers for what the six `rure_*` tools answer through `ruflo mcp exec`. The tools
+ * parse a file and never run it, but what they return is the file's own text (section names, imports, strings, type
+ * names), so every such value passes plain() before it is a line: an escape sequence in a hostile binary never reaches
+ * the terminal. Counts and offsets are shown only when they are measurements (#3822). Pure: strings in, lines out.
+ */
+import { plain, recordOf } from './parse'
+import { measureOf } from './safe'
+
+/** Lines a ruRE answer keeps; the panel scrolls (j/k) past its window. */
+export const RE_MAX_LINES = 40
+
+/** The CLI's own words when it has no such tool: the ruRE tools shipped after the releases that predate them. */
+export const NO_TOOLS = 'this ruflo CLI has no rure_* tools: update ruflo (npx ruflo@latest), or run the one built from main'
+
+const list = (value: unknown): unknown[] => (Array.isArray(value) ? value : [])
+/** A whole, non-negative measurement, else undefined: 1e300 is not clamped into a plausible count, it reads n/a (#3822). */
+const countOf = (value: unknown): number | undefined => {
+ const n = measureOf(value)
+
+ return n !== undefined && n >= 0 ? Math.floor(n) : undefined
+}
+const text = (value: unknown, max = 80): string => (typeof value === 'string' ? plain(value, max) : typeof value === 'number' ? String(measureOf(value) ?? 'n/a') : '')
+const num = (value: unknown): string => String(countOf(value) ?? 'n/a')
+const hex = (value: unknown): string => (countOf(value) === undefined ? 'n/a' : `0x${(countOf(value) as number).toString(16)}`)
+const strs = (value: unknown, max: number, each = 40): string => {
+ const items = list(value).map(item => text(item, each)).filter(item => item !== '')
+
+ return items.length === 0 ? '(none)' : `${items.slice(0, max).join(', ')}${items.length > max ? `, … +${items.length - max}` : ''}`
+}
+
+/** What every answer says about itself: the parser's warnings, a cut walk, and what AIDefence held back. */
+function caveats(record: Record<string, unknown>): string[] {
+ const out = list(record.warnings).slice(0, 4).map(warning => `⚠ ${text(warning, 140)}`)
+
+ if (record.truncated === true) out.push('⚠ truncated: a size or count cap was reached, so this is a partial inventory')
+ if (countOf(record.skippedFiles) !== undefined && (record.skippedFiles as number) > 0) out.push(`⚠ ${num(record.skippedFiles)} file(s) could not be parsed`)
+ if ((countOf(record.redactedCount) ?? 0) > 0 || (countOf(record.redactedSnippetCount) ?? 0) > 0) out.push(`⚠ ${num(record.redactedCount ?? record.redactedSnippetCount)} value(s) hidden by AIDefence: they looked like a threat or PII`)
+ if (record.screened === false) out.push('⚠ not screened: AIDefence was unavailable, so treat every string here as untrusted')
+
+ return out
+}
+
+function binaryLines(record: Record<string, unknown>): string[] {
+ const sections = list(record.sections).map(recordOf).filter((section): section is Record<string, unknown> => section !== null && text(section.name) !== '')
+ const strings = list(record.strings).map(recordOf).flatMap(item => (item !== null && typeof item.value === 'string' ? [plain(item.value, 60)] : []))
+
+ return [
+ `${text(record.format).toUpperCase() || 'n/a'} · ${text(record.arch) || 'n/a'} · ${num(record.bits)}-bit ${text(record.endianness) || 'n/a'}-endian · ${text(record.kind) || 'n/a'}`,
+ `entry ${hex(record.entryPoint)}`,
+ `libraries (${list(record.libraries).length}): ${strs(record.libraries, 8)}`,
+ `imports (${list(record.imports).length}): ${strs(record.imports, 12)}`,
+ `exports (${list(record.exports).length}): ${strs(record.exports, 12)}`,
+ `sections (${sections.length}): ${sections.slice(0, 8).map(section => `${text(section.name, 20)} ${hex(section.offset)}+${num(section.size)}`).join(' · ') || '(none)'}`,
+ ...(strings.length > 0 ? [`strings (${strings.length}${record.stringsTruncated === true ? '+' : ''}): ${strings.slice(0, 12).join(' | ')}`] : []),
+ ]
+}
+
+function dotnetLines(record: Record<string, unknown>): string[] {
+ if (record.isManaged !== true) return ['not a managed .NET assembly (no CLR header): use the native binary reader']
+
+ const assembly = recordOf(record.assembly)
+ const refs = list(record.assemblyRefs).map(recordOf).flatMap(ref => (ref === null ? [] : [`${text(ref.name, 30)} ${text(ref.version, 16)}`]))
+ const calls = list(record.pinvokes).map(recordOf).flatMap(call => (call === null ? [] : [`${text(call.module, 30)}!${text(call.function, 30)}`]))
+
+ return [
+ `${text(assembly?.name) || 'n/a'} ${text(assembly?.version, 20)} · runtime ${text(record.runtimeVersion, 20) || 'n/a'}`,
+ `references (${refs.length}): ${refs.slice(0, 8).join(', ') || '(none)'}`,
+ `types (${num(record.typeCount)}): ${strs(record.types, 10, 50)}`,
+ `methods ${num(record.methodCount)} · entry token ${hex(record.entryPointToken)}`,
+ `P/Invoke (${calls.length}): ${calls.slice(0, 10).join(', ') || '(none)'}`,
+ `user strings (${list(record.userStrings).length}): ${strs(record.userStrings, 8, 50)}`,
+ ]
+}
+
+function evmLines(record: Record<string, unknown>): string[] {
+ const selectors = list(record.selectors).map(recordOf).flatMap(item => (item === null ? [] : [`${text(item.selector, 12)} ${text(item.name, 50) || '(unknown)'} @${num(item.offset)}`]))
+ const hazards = Object.entries(recordOf(record.hazards) ?? {}).flatMap(([name, value]) => {
+ const item = recordOf(value)
+
+ return item === null ? [] : [`${plain(name, 16)} ×${num(item.count)} @${list(item.offsets).slice(0, 3).map(offset => num(offset)).join(',')}`]
+ })
+ const topics = list(record.eventTopics).map(recordOf).flatMap(item => (item === null ? [] : [text(item.name, 50) || text(item.topic, 14)]))
+ const proxy = recordOf(record.minimalProxy)
+ const meta = recordOf(record.metadata)
+
+ return [
+ `${num(record.byteLength)} bytes · ${num(record.instructionCount)} instructions · ${num(record.jumpdestCount)} JUMPDEST · ${num(record.invalidOpcodeCount)} invalid`,
+ `selectors (${selectors.length}): ${selectors.slice(0, 8).join(' · ') || '(none found: unusual dispatcher or no ABI)'}`,
+ `hazards: ${hazards.join(' · ') || 'none of the tracked opcodes (an inventory, not a finding)'}`,
+ `addresses (${list(record.addresses).length}): ${strs(record.addresses, 4, 44)}`,
+ `events (${topics.length}): ${topics.slice(0, 6).join(', ') || '(none)'}`,
+ ...(proxy !== null ? [`EIP-1167 minimal proxy → ${text(proxy.implementation, 44)}`] : []),
+ ...(meta !== null ? [`compiler: solc ${text(meta.solc, 16) || 'n/a'}${typeof meta.ipfs === 'string' ? ` · ipfs ${plain(meta.ipfs, 12)}` : ''}`] : []),
+ ...(list(record.strings).length > 0 ? [`strings: ${strs(record.strings, 6, 60)}`] : []),
+ ]
+}
+
+function jsLines(record: Record<string, unknown>): string[] {
+ const modules = list(record.modules).map(recordOf).filter((module): module is Record<string, unknown> => module !== null)
+ const kinds = new Map<string, number>()
+ const sources = new Set<string>()
+
+ for (const module of modules) {
+ for (const boundary of list(module.electronBoundaries).map(recordOf)) if (boundary !== null) kinds.set(text(boundary.kind, 24), (kinds.get(text(boundary.kind, 24)) ?? 0) + 1)
+ for (const item of list(module.imports).map(recordOf)) if (item !== null && sources.size < 40) sources.add(text(item.source, 40))
+ }
+
+ return [
+ `${record.isElectron === true ? 'Electron app' : 'JavaScript'} · ${num(record.filesScanned)} files scanned · ${modules.length} modules`,
+ `Electron boundaries: ${[...kinds].map(([kind, count]) => `${kind} ×${count}`).join(' · ') || 'none'}`,
+ `imports (${sources.size}): ${[...sources].slice(0, 14).join(', ') || '(none)'}`,
+ ...modules.slice(0, 6).map(module => ` ${text(module.file, 60)} · ${list(module.imports).length} imports · ${list(module.electronBoundaries).length} boundaries`),
+ ]
+}
+
+function findLines(record: Record<string, unknown>): string[] {
+ const matches = list(record.matches).map(recordOf).filter((match): match is Record<string, unknown> => match !== null)
+ const head = `${matches.length} match${matches.length === 1 ? '' : 'es'} · ${num(record.filesScanned)} files scanned`
+
+ return [
+ head,
+ ...matches.slice(0, 6).flatMap(match => {
+ const range = recordOf(match.lineRange)
+ const first = typeof match.snippet === 'string' ? plain(match.snippet.split('\n').find(line => line.trim() !== '') ?? '', 100) : ''
+
+ return [`${text(match.file, 60)}:${num(range?.start)}-${num(range?.end)} · score ${text(match.score, 8)}${match.redacted === true ? ' · snippet hidden by AIDefence' : ''}`, ...(first !== '' ? [` ${first}`] : [])]
+ }),
+ ]
+}
+
+function asarLines(record: Record<string, unknown>): string[] {
+ const where = text(record.unpackedPath, 120)
+
+ return [
+ `extracted ${num(record.fileCount)} files (${num(record.totalBytes)} bytes)${record.truncated === true ? ' — stopped at a cap' : ''}`,
+ `to ${where}`,
+ 'that folder is outside the project, which Dev Tools cannot read: copy it under the project (cp -r) to run JS APP or FEATURE here',
+ ]
+}
+
+const READERS: Record<string, (record: Record<string, unknown>) => string[]> = {
+ 'dt-re-asar': asarLines,
+ 'dt-re-js': jsLines,
+ 'dt-re-find': findLines,
+ 'dt-re-bin': binaryLines,
+ 'dt-re-net': dotnetLines,
+ 'dt-re-evm': evmLines,
+}
+
+/**
+ * What a ruRE run printed, as lines: the tool's answer read by its shape, its caveats first. `value` is the answer with
+ * mcp exec's wrapper already taken off; null when the CLI printed no JSON at all. A tool-missing message is said plainly.
+ */
+export function rureLines(id: string, value: unknown, stdout = '', stderr = ''): string[] {
+ const record = recordOf(value)
+
+ if (record === null) return /Tool not found/i.test(`${stdout}\n${stderr}`) ? [`✗ ${NO_TOOLS}`] : []
+
+ if (record.success === false) return [`✗ ${text(record.error, 200) || 'the tool failed'}`]
+
+ const read = READERS[id]
+
+ return read === undefined ? [] : [...caveats(record), ...read(record)].slice(0, RE_MAX_LINES)
+}
diff --git a/plugins/ruflo-console/hooks/devtools.ts b/plugins/ruflo-console/hooks/devtools.ts
index be8d2bb1e8..62322542e7 100644
--- a/plugins/ruflo-console/hooks/devtools.ts
+++ b/plugins/ruflo-console/hooks/devtools.ts
@@ -10,13 +10,14 @@ import type { ActionSpec } from './actions'
import { devLines, fieldRule, fieldValue, need, tool, type DevField, type DevFields } from './data/devtools'
import type { Host } from './host'
import type { PaletteEntry } from './palette'
+import { RURE, RURE_GROUPS } from './rure'
import { SANDBOX, SANDBOX_GROUPS } from './sandbox'
import type { State } from './state'
/** `read`: local, $0, changes nothing. `local`: local compute that keeps nothing. Then writes, the network, money, deletes. */
export type DevCost = 'read' | 'local' | 'writes' | 'network' | 'spends' | 'deletes'
-export type DevGroup = 'github' | 'analyze' | 'cow' | 'wasm' | 'browser' | 'terminal' | 'providers' | 'plugins' | 'ruvllm' | 'daa' | 'brain' | 'managed' | 'maint' | 'tmux' | 'rvm'
+export type DevGroup = 'github' | 'analyze' | 'cow' | 'wasm' | 'browser' | 'terminal' | 'providers' | 'plugins' | 'ruvllm' | 'daa' | 'brain' | 'managed' | 'maint' | 'tmux' | 'rvm' | 'rure-app' | 'rure-native'
export type DevEntry = {
id: string
@@ -58,6 +59,7 @@ export const DEV_GROUPS: readonly { id: DevGroup; title: string; right: string }
{ id: 'managed', title: 'Managed agents', right: 'Anthropic cloud · every call asks' },
{ id: 'maint', title: 'Maintenance', right: 'cleanup · update · migrate · process · appliance' },
...SANDBOX_GROUPS,
+ ...RURE_GROUPS,
]
const SESSION = 'ruflo-console'
@@ -169,6 +171,7 @@ export const DEV: readonly DevEntry[] = [
{ id: 'dt-app-inspect', group: 'maint', name: 'APPLIANCE', about: 'the RVFA header and sections of the path field’s .rvf', label: 'appliance inspect', cost: 'read', input: 'path', args: f => need(f, ['path'], v => ['appliance', 'inspect', '-f', v.path, '--json']) },
{ id: 'dt-app-verify', group: 'maint', name: 'APPLIANCE VERIFY', about: 'its integrity (quick, no capability tests)', label: 'appliance verify --quick', cost: 'read', input: 'path', args: f => need(f, ['path'], v => ['appliance', 'verify', '-f', v.path, '--quick']) },
...SANDBOX,
+ ...RURE,
]
/** What an entry's own `cost` says its class is: the console's confirm gate never reads an action as less than this. `local` and `read` declare nothing. */
@@ -212,7 +215,7 @@ export function devWhy(entry: DevEntry, fields: DevFields): string {
}
/** A value each field accepts, to find which field kept an entry from running. */
-const SAMPLE: DevFields = { ref: 'HEAD', path: 'memory.rvf', label: 'l', url: 'https://example.com', target: '@e1', query: 'q', task: 't', cmd: 'c', id: 'i', note: 'n', session: 's', send: 'c' }
+const SAMPLE: DevFields = { ref: 'HEAD', path: 'memory.rvf', label: 'l', url: 'https://example.com', target: '@e1', query: 'q', task: 't', cmd: 'c', id: 'i', note: 'n', session: 's', send: 'c', sample: 'app/x' }
/**
* Every runnable entry as a palette entry, so `/ruflo run dt-diff HEAD~3` works headless: an entry with an input field
@@ -251,10 +254,16 @@ export const withTmux = (entry: DevEntry, tmux: State['devtools']['tmux']): DevE
/** Which entry Enter in each field runs; a field with none only keeps its text. */
const SUBMITS: Partial<Record<DevField, string>> = { task: 'dt-brain', ref: 'dt-diff', path: 'dt-cow-status', session: 'dt-sb-capture', send: 'dt-sb-send', url: 'dt-br-open', target: 'dt-br-click', query: 'dt-plug-search', cmd: 'dt-term-exec' }
+/** Enter in a field on a page of its own: the entry that page runs for it, where that differs from the shared `SUBMITS` (the ruRE page, ADR-492). */
+const PAGE_SUBMITS: Partial<Record<DevGroup, Partial<Record<DevField, string>>>> = {
+ 'rure-app': { sample: 'dt-re-js', query: 'dt-re-find' },
+ 'rure-native': { sample: 'dt-re-bin' },
+}
+
export type DevtoolsActions = {
draft: (field: DevField, text: string) => void
- /** Enter in a field: keep its text and run its entry (a read at once, the rest asked first). */
- submit: (field: DevField, text: string) => void
+ /** Enter in a field: keep its text and run its entry (a read at once, the rest asked first); `group` is the section the field is drawn in. */
+ submit: (field: DevField, text: string, group?: DevGroup) => void
}
export function devtoolsActions(state: State, host: Host, run: (id: string, text: string) => boolean, refuse: (why: string) => void): DevtoolsActions {
@@ -262,11 +271,11 @@ export function devtoolsActions(state: State, host: Host, run: (id: string, text
draft: (field, text) => {
state.devtools.fields[field] = text
},
- submit: (field, text) => {
+ submit: (field, text, group) => {
state.devtools.fields[field] = text
host.invalidate()
- const id = SUBMITS[field]
+ const id = (group === undefined ? undefined : PAGE_SUBMITS[group]?.[field]) ?? SUBMITS[field]
if (id === undefined) return
if (fieldValue(field, text) === null) refuse(`${field} field: ${fieldRule(field)}`)
diff --git a/plugins/ruflo-console/hooks/gfx/boot.ts b/plugins/ruflo-console/hooks/gfx/boot.ts
index 9531784db9..a17eb23426 100644
--- a/plugins/ruflo-console/hooks/gfx/boot.ts
+++ b/plugins/ruflo-console/hooks/gfx/boot.ts
@@ -59,6 +59,7 @@ export const BOOT_MODULES: readonly { name: string; note: string }[] = [
{ name: 'Performance', note: 'metrics and bottlenecks' },
{ name: 'AI Terminal', note: 'ruflo, codex, claude' },
{ name: 'ADRs', note: 'decisions your project made' },
+ { name: 'ruRE', note: 'static reverse engineering' },
{ name: 'What’s new', note: 'changes in your plugins' },
{ name: 'Themes', note: 'look, colors, motion' },
{ name: 'Settings', note: 'every option a button' },
diff --git a/plugins/ruflo-console/hooks/help-docs.ts b/plugins/ruflo-console/hooks/help-docs.ts
index 2bd0f27789..98d0157c49 100644
--- a/plugins/ruflo-console/hooks/help-docs.ts
+++ b/plugins/ruflo-console/hooks/help-docs.ts
@@ -69,6 +69,7 @@ export const VIEW_TOPIC: Partial<Record<ViewId, string>> = {
settings: 'settings',
whatsnew: 'whatsnew',
adrs: 'adrs',
+ rure: 'rure',
themes: 'themes',
timeline: 'watch',
events: 'watch',
diff --git a/plugins/ruflo-console/hooks/help-topics-more.ts b/plugins/ruflo-console/hooks/help-topics-more.ts
index 9508c12f27..de9e36057b 100644
--- a/plugins/ruflo-console/hooks/help-topics-more.ts
+++ b/plugins/ruflo-console/hooks/help-topics-more.ts
@@ -247,6 +247,22 @@ export const MORE_TOPICS: readonly HelpTopic[] = [
related: ['mission', 'settings'],
keywords: ['adr', 'architecture', 'decision', 'record', 'madr', 'nygard', 'supersede'],
},
+ {
+ id: 'rure',
+ title: 'ruRE: look inside a file without running it',
+ group: 'Console',
+ summary: 'static reverse engineering of a file in your project: what it imports, exposes and carries',
+ steps: [
+ { text: 'Open ruRE (TOOLS group, or /ruflo rure). Type the path of a file or folder inside this project in the sample field; the page cannot reach anything outside the project.', go: { view: 'rure' } },
+ { text: 'Pick the row that fits: APP MAP and FIND FEATURE for a JavaScript or Electron source folder, UNPACK .ASAR for a packed app, NATIVE BINARY for ELF, PE or Mach-O, .NET ASSEMBLY for managed code, EVM BYTECODE for a contract. A read runs at once and shows below.' },
+ { text: 'UNPACK .ASAR asks first: it writes the files to a temp folder outside the project. Copy that folder under the project (cp -r) to run APP MAP or FIND FEATURE on it here.' },
+ { text: 'Every tool parses and never runs the file. Names and strings in the result are the file’s own text, shown cleaned: treat them as untrusted, and note that a risky opcode or import is an inventory fact, not a finding.' },
+ { text: 'Claude reaches the same rows through /ruflo run dt-re-bin <path> (and dt-re-js, dt-re-find, dt-re-net, dt-re-evm, dt-re-asar). The tools ship in a newer ruflo than 3.59.17: on an older one the rows say so.' },
+ ],
+ tips: ['It reads only files inside the project, by design: the ruRE tools themselves will read any path the process can, so keep samples you do not trust in a folder of their own.'],
+ related: ['devtools', 'adrs'],
+ keywords: ['ruRE', 'reverse', 'engineering', 'binary', 'elf', 'pe', 'mach-o', 'asar', 'electron', 'dotnet', 'evm', 'bytecode', 'static analysis'],
+ },
{
id: 'whatsnew',
title: 'What’s new in your plugins',
diff --git a/plugins/ruflo-console/hooks/nav-state.ts b/plugins/ruflo-console/hooks/nav-state.ts
index f879738cb9..353fd6ee46 100644
--- a/plugins/ruflo-console/hooks/nav-state.ts
+++ b/plugins/ruflo-console/hooks/nav-state.ts
@@ -12,7 +12,7 @@ export const NAV_GROUPS: readonly { title: string; icon: string; rows: readonly
{ title: 'MIND', icon: '🧠', rows: [['learning', 'neural', 'metaharness', 'evolve', 'memory', 'vector']] },
{ title: 'SAFETY', icon: '🛡️', rows: [['secure', 'cost', 'perf', 'timeline', 'events', 'room']] },
{ title: 'NETWORK', icon: '🌐', rows: [['federation', 'xruv', 'sandbox', 'skills', 'market']] },
- { title: 'TOOLS', icon: '🛠️', rows: [['terminal', 'automate', 'devtools', 'plugins'], ['adrs', 'whatsnew', 'themes', 'settings']] },
+ { title: 'TOOLS', icon: '🛠️', rows: [['terminal', 'automate', 'devtools', 'plugins'], ['adrs', 'rure', 'whatsnew', 'themes', 'settings']] },
]
export const groupOf = (view: ViewId): string | null => NAV_GROUPS.find(group => group.rows.some(row => row.includes(view)))?.title ?? null
diff --git a/plugins/ruflo-console/hooks/rure.ts b/plugins/ruflo-console/hooks/rure.ts
new file mode 100644
index 0000000000..838e473476
--- /dev/null
+++ b/plugins/ruflo-console/hooks/rure.ts
@@ -0,0 +1,25 @@
+/**
+ * The ruRE page's catalog (ADR-492): static reverse engineering of a file in the project, through the six `rure_*` tools of
+ * ruflo-rure (ADR-0001..0005 of that plugin). Every tool parses and never executes the target, so five are local $0 reads that
+ * run at once; unpacking an .asar writes files to a temp folder, so it asks first. The file is named only by the `sample` field,
+ * which holds a path inside the project: nothing outside it can be reached from here (the tools themselves accept any readable
+ * path, so that limit is this page's, kept in data/devtools.ts). These entries join `DEV`, so the confirm row, the palette ids
+ * (`/ruflo run dt-re-bin app/bin/tool`) and the self-check treat them like every other Dev Tools row. Pure.
+ */
+import { need, tool } from './data/devtools'
+import type { DevEntry } from './devtools'
+
+/** The ruRE groups: drawn on the ruRE page, not on Dev Tools. */
+export const RURE_GROUPS = [
+ { id: 'rure-app', title: 'JavaScript and Electron apps', right: 'an .asar or a folder of source · parse only' },
+ { id: 'rure-native', title: 'Native binaries, .NET and EVM', right: 'ELF · PE · Mach-O · .NET · EVM bytecode · parse only' },
+] as const
+
+export const RURE: readonly DevEntry[] = [
+ { id: 'dt-re-asar', group: 'rure-app', name: 'UNPACK .ASAR', about: 'extract an Electron app.asar (size and file caps) to a temp folder', label: 'ruRE: unpack the .asar', cost: 'writes', input: 'sample', args: f => need(f, ['sample'], v => tool('rure_extract_asar', { path: v.sample })), note: 'writes the unpacked files to a new temp folder outside the project (it is not cleaned up); nothing in the archive is run' },
+ { id: 'dt-re-js', group: 'rure-app', name: 'APP MAP', about: 'imports, Electron boundaries (ipc, preload, webview) per module', label: 'ruRE: map a JS/Electron source folder', cost: 'read', input: 'sample', args: f => need(f, ['sample'], v => tool('rure_analyze_js_app', { path: v.sample })) },
+ { id: 'dt-re-find', group: 'rure-app', name: 'FIND FEATURE', about: 'where a feature lives: the sample folder, and the words in the feature field', label: 'ruRE: find a feature in a JS source folder', cost: 'read', input: 'query', args: f => need(f, ['sample', 'query'], v => tool('rure_find_feature', { path: v.sample, query: v.query })) },
+ { id: 'dt-re-bin', group: 'rure-native', name: 'NATIVE BINARY', about: 'ELF, PE or Mach-O: sections, libraries, imports, exports, strings', label: 'ruRE: inspect a native binary', cost: 'read', input: 'sample', args: f => need(f, ['sample'], v => tool('rure_analyze_binary', { path: v.sample, includeStrings: true })) },
+ { id: 'dt-re-net', group: 'rure-native', name: '.NET ASSEMBLY', about: 'metadata only: references, types, P/Invoke, string literals', label: 'ruRE: inspect a .NET assembly', cost: 'read', input: 'sample', args: f => need(f, ['sample'], v => tool('rure_analyze_dotnet', { path: v.sample })) },
+ { id: 'dt-re-evm', group: 'rure-native', name: 'EVM BYTECODE', about: 'a file of hex or raw bytecode: selectors, risky opcodes, proxies', label: 'ruRE: inventory EVM bytecode', cost: 'read', input: 'sample', args: f => need(f, ['sample'], v => tool('rure_analyze_evm', { path: v.sample })) },
+]
diff --git a/plugins/ruflo-console/hooks/self-check.ts b/plugins/ruflo-console/hooks/self-check.ts
index 3ba46bee28..2a98aea7fe 100644
--- a/plugins/ruflo-console/hooks/self-check.ts
+++ b/plugins/ruflo-console/hooks/self-check.ts
@@ -22,17 +22,17 @@ export const AREA_VIEW: Record<string, ViewId> = {
Missions: 'missions', Overview: 'overview', Swarm: 'swarm', Workflows: 'workflows', 'Hive-Mind': 'hive', Claims: 'claims', Approvals: 'approvals', Automation: 'automate',
Learning: 'learning', Neural: 'neural', 'Vector Lab': 'vector', 'Memory Lab': 'memory', MetaHarness: 'metaharness', 'Self-Evolution': 'evolve',
Security: 'secure', Federation: 'federation', 'x.ruv.io': 'xruv', 'Plugins & Mods': 'plugins', Skills: 'skills', 'Plugin Catalog': 'market',
- 'Dev Tools': 'devtools', Sandbox: 'sandbox', 'Cost & Budget': 'cost', Timeline: 'timeline', Events: 'events', 'The Room': 'room', Performance: 'perf', 'AI Terminal': 'terminal', 'What’s new': 'whatsnew', ADRs: 'adrs', Themes: 'themes', Settings: 'settings',
+ 'Dev Tools': 'devtools', Sandbox: 'sandbox', 'Cost & Budget': 'cost', Timeline: 'timeline', Events: 'events', 'The Room': 'room', Performance: 'perf', 'AI Terminal': 'terminal', 'What’s new': 'whatsnew', ADRs: 'adrs', ruRE: 'rure', Themes: 'themes', Settings: 'settings',
}
/** Pages with no hotkey on purpose (every letter is taken): reached from the menu, the nav, the palette or by name. */
-const NAMED_ONLY: ReadonlySet<string> = new Set(['sandbox', 'room', 'workflows', 'whatsnew', 'adrs', 'themes'])
+const NAMED_ONLY: ReadonlySet<string> = new Set(['sandbox', 'room', 'workflows', 'whatsnew', 'adrs', 'rure', 'themes'])
export type Registries = { secure: readonly SecEntry[]; secureText: readonly SecText[]; perf: readonly PerfEntry[]; dev: readonly DevEntry[]; lab: readonly LabEntry[] }
export const REGISTRIES: Registries = { secure: SECURE, secureText: SECURE_TEXT, perf: PERF, dev: DEV, lab: LAB }
/** One value per field that its rule accepts, so every runnable Dev Tools row has an input that runs. */
-export const SAMPLE_FIELDS: DevFields = { ref: 'HEAD~1', path: 'memory/sample.rvf', label: 'ckpt-1', url: 'https://example.com', target: '@e1', query: 'auth', task: 'review my pull request', cmd: 'ls', id: 'agent-1', note: 'hello', session: 'demo', send: 'ls -la' }
+export const SAMPLE_FIELDS: DevFields = { ref: 'HEAD~1', path: 'memory/sample.rvf', label: 'ckpt-1', url: 'https://example.com', target: '@e1', query: 'auth', task: 'review my pull request', cmd: 'ls', id: 'agent-1', note: 'hello', session: 'demo', send: 'ls -la', sample: 'app/tool.bin' }
/** Free text, then an action type (policy-eval takes one): a text verb passes when any of these builds its command. */
const SAMPLE_TEXTS = ['hello world', 'deploy']
diff --git a/plugins/ruflo-console/hooks/state.ts b/plugins/ruflo-console/hooks/state.ts
index d7500bf83b..cc1996dbb5 100644
--- a/plugins/ruflo-console/hooks/state.ts
+++ b/plugins/ruflo-console/hooks/state.ts
@@ -28,7 +28,7 @@ export type NavStyle = 'auto' | 'icons' | 'brief' | 'full'
export const NAV_STYLES: readonly NavStyle[] = ['auto', 'icons', 'brief', 'full']
export const NAV_KEY = 'nav-style'
-export type ViewId = 'menu' | 'overview' | 'swarm' | 'workflows' | 'hive' | 'claims' | 'federation' | 'plugins' | 'learning' | 'metaharness' | 'memory' | 'cost' | 'timeline' | 'approvals' | 'events' | 'room' | 'missions' | 'xruv' | 'terminal' | 'skills' | 'agent' | 'secure' | 'perf' | 'automate' | 'neural' | 'vector' | 'evolve' | 'devtools' | 'sandbox' | 'market' | 'settings' | 'themes' | 'whatsnew' | 'adrs'
+export type ViewId = 'menu' | 'overview' | 'swarm' | 'workflows' | 'hive' | 'claims' | 'federation' | 'plugins' | 'learning' | 'metaharness' | 'memory' | 'cost' | 'timeline' | 'approvals' | 'events' | 'room' | 'missions' | 'xruv' | 'terminal' | 'skills' | 'agent' | 'secure' | 'perf' | 'automate' | 'neural' | 'vector' | 'evolve' | 'devtools' | 'sandbox' | 'market' | 'settings' | 'themes' | 'whatsnew' | 'adrs' | 'rure'
/**
* The views in tab order, each with its hotkey and the inline height it asks for. Digits are the first nine; the three
@@ -72,6 +72,7 @@ export const VIEWS: readonly { id: ViewId; key: string; label: string; short: st
{ id: 'sandbox', key: '', label: 'Sandbox', short: 'Sbx', icon: '🧫', blurb: 'isolated places to try things: tmux sessions, RVF copy-on-write branches, RVM', rows: 40 },
{ id: 'market', key: 'm', label: 'Plugin Catalog', short: 'Cat', icon: '📦', blurb: 'every ruflo plugin, mod and skill: what it ships, install, enable, disable, update, view and use', rows: 50 },
{ id: 'adrs', key: '', label: 'ADRs', short: 'ADR', icon: '📐', blurb: 'your project’s Architecture Decision Records: find, propose, accept and supersede them, attach them to a mission so Claude and the swarm follow what was decided', rows: 44 },
+ { id: 'rure', key: '', label: 'ruRE', short: 'RE', icon: '🔬', blurb: 'static reverse engineering of a file in your project: a JS/Electron app, a native binary, a .NET assembly or EVM bytecode. It parses and never runs the file', rows: 40 },
{ id: 'whatsnew', key: '', label: 'What’s new', short: 'New', icon: '🆕', blurb: 'what changed in your ruflo plugins, newest first: from each plugin’s own CHANGELOG, breaking changes pinned until you dismiss them', rows: 40 },
{ id: 'themes', key: '', label: 'Theme Studio', short: 'Themes', icon: '◈', blurb: 'theme selection, color picker, animated palettes and Claude or Codex theme generator', rows: 50 },
{ id: 'settings', key: 's', label: 'Settings', short: 'Set', icon: '⚙️', blurb: 'simple to advanced settings: plugin options, ruflo config, updates, and the AI terminal’s model and budget, each edited in place', rows: 50 },
diff --git a/plugins/ruflo-console/hooks/version.ts b/plugins/ruflo-console/hooks/version.ts
index 44dac6b6e7..e6eeca6693 100644
--- a/plugins/ruflo-console/hooks/version.ts
+++ b/plugins/ruflo-console/hooks/version.ts
@@ -2,4 +2,4 @@
* The console's version, shown on the header so a person can tell which build is running. Kept equal to the plugin's manifest
* (`.claude-plugin/plugin.json`); tests/version.spec.ts fails if the two drift.
*/
-export const CONSOLE_VERSION = '0.44.7'
+export const CONSOLE_VERSION = '0.45.0'
diff --git a/plugins/ruflo-console/hooks/views/devtools.ts b/plugins/ruflo-console/hooks/views/devtools.ts
index f796dcb70f..7bf114129b 100644
--- a/plugins/ruflo-console/hooks/views/devtools.ts
+++ b/plugins/ruflo-console/hooks/views/devtools.ts
@@ -5,6 +5,7 @@ import { DEV, DEV_GROUPS, devSpec, type DevCost, type DevEntry, type DevGroup }
import { slot } from './attention'
import { ago, button, clip, col, type Ctx, row, section, tagChip, text, THEME } from './common'
import { frameResult } from './status-card'
+import { RURE_GROUPS } from '../rure'
import { SANDBOX_GROUPS } from '../sandbox'
import { spinAt } from '../spinner'
import { sendResultRow } from './secure'
@@ -45,6 +46,12 @@ const FIELDS: Partial<Record<DevGroup, readonly { field: DevField; label: string
{ field: 'send', label: 'type', placeholder: 'one command line to type into that session: Enter shows it, then asks before it runs', submit: 'send' },
],
daa: [{ field: 'note', label: 'note', placeholder: 'feedback or knowledge to send (also a managed-agent prompt)' }],
+ // The ruRE page (ADR-492) draws these two sections; the sample is a path inside the project.
+ 'rure-app': [
+ { field: 'sample', label: 'sample', placeholder: 'a .asar file or a folder of JS source, inside this project', submit: 'map' },
+ { field: 'query', label: 'feature', placeholder: 'for FIND FEATURE: the feature in words, e.g. license check', submit: 'find' },
+ ],
+ 'rure-native': [{ field: 'sample', label: 'sample', placeholder: 'a binary, .NET assembly or bytecode file, inside this project', submit: 'inspect' }],
}
/** One dotted-leader row: the cost tag, the name, what it does, and its ▸ button; an n/a row says why instead. */
@@ -83,7 +90,7 @@ export function fieldRows(ctx: Ctx, group: DevGroup): RenderElement[] {
value: ctx.state.devtools.fields[field],
submitLabel: submit ?? 'keep',
onInput: value => ctx.act.devtools.draft(field, value),
- onSubmit: value => ctx.act.devtools.submit(field, value),
+ onSubmit: value => ctx.act.devtools.submit(field, value, group),
}),
)
}
@@ -146,8 +153,8 @@ export function devtoolsView(ctx: Ctx): RenderElement {
const hasRun = state.lab.running?.id.startsWith('dt-') === true || state.lab.result?.id.startsWith('dt-') === true || state.pending !== null
const rows: RenderElement[] = [text(ctx, ' $0 local read, runs at once · cpu/wr local work or a write · net the network · $$ may spend · del deletes: each of these asks first', { dimColor: true })]
- // The sandbox groups (tmux, RVM) are drawn on the Sandbox page, not here.
- DEV_GROUPS.filter(group => !SANDBOX_GROUPS.some(sandbox => sandbox.id === group.id)).forEach((group, i) => {
+ // The sandbox groups (tmux, RVM) are drawn on the Sandbox page and the ruRE groups on the ruRE page, not here.
+ DEV_GROUPS.filter(group => !SANDBOX_GROUPS.some(sandbox => sandbox.id === group.id) && !RURE_GROUPS.some(re => re.id === group.id)).forEach((group, i) => {
const entries = DEV.filter(candidate => candidate.group === group.id)
// The first group, and every group with a text field, opens: a field folded away could not be typed into, so its runs would refuse.
diff --git a/plugins/ruflo-console/hooks/views/menu.ts b/plugins/ruflo-console/hooks/views/menu.ts
index f6284a347c..82d386a884 100644
--- a/plugins/ruflo-console/hooks/views/menu.ts
+++ b/plugins/ruflo-console/hooks/views/menu.ts
@@ -52,7 +52,7 @@ export const GROUPS: readonly { title: string; sections: readonly { name: string
},
{
title: 'TOOLS',
- sections: [{ name: 'tools', items: [{ label: 'AI Terminal', go: 'terminal' }, { label: 'Automation', go: 'automate' }, { label: 'Dev Tools', go: 'devtools' }, { label: 'Plugins & Mods', go: 'plugins' }, { label: 'ADRs', go: 'adrs' }, { label: 'What’s new', go: 'whatsnew' }, { label: 'Theme Studio', go: 'themes' }, { label: 'Settings', go: 'settings' }, { label: 'Command Palette', go: 'palette' }, { label: 'Help', go: 'help' }, { label: 'Log Off', go: 'close' }] }],
+ sections: [{ name: 'tools', items: [{ label: 'AI Terminal', go: 'terminal' }, { label: 'Automation', go: 'automate' }, { label: 'Dev Tools', go: 'devtools' }, { label: 'Plugins & Mods', go: 'plugins' }, { label: 'ADRs', go: 'adrs' }, { label: 'ruRE', go: 'rure' }, { label: 'What’s new', go: 'whatsnew' }, { label: 'Theme Studio', go: 'themes' }, { label: 'Settings', go: 'settings' }, { label: 'Command Palette', go: 'palette' }, { label: 'Help', go: 'help' }, { label: 'Log Off', go: 'close' }] }],
},
]
diff --git a/plugins/ruflo-console/hooks/views/pane.ts b/plugins/ruflo-console/hooks/views/pane.ts
index bc42ba209b..e35a735d64 100644
--- a/plugins/ruflo-console/hooks/views/pane.ts
+++ b/plugins/ruflo-console/hooks/views/pane.ts
@@ -30,6 +30,7 @@ import { themesView } from './themes'
import { settingsView } from './settings'
import { whatsnewView } from './whatsnew'
import { adrsView } from './adr'
+import { rureView } from './rure'
import { devtoolsResult, devtoolsView } from './devtools'
import { sandboxView } from './sandbox'
import { federationView } from './federation'
@@ -100,7 +101,7 @@ export const BODIES: Record<ViewId, (ctx: Ctx) => RenderElement> = {
market: catalogView,
themes: themesView,
settings: settingsView,
- whatsnew: whatsnewView, adrs: adrsView,
+ whatsnew: whatsnewView, adrs: adrsView, rure: rureView,
agent: agentView,
}
diff --git a/plugins/ruflo-console/hooks/views/rure.ts b/plugins/ruflo-console/hooks/views/rure.ts
new file mode 100644
index 0000000000..e18f819cbd
--- /dev/null
+++ b/plugins/ruflo-console/hooks/views/rure.ts
@@ -0,0 +1,36 @@
+import type { RenderElement } from 'claude-code'
+
+import { DEV, DEV_GROUPS, type DevGroup } from '../devtools'
+import { col, type Ctx, section, text } from './common'
+import { devtoolsResult, entryRow, fieldRows, resultRight } from './devtools'
+
+const right = (group: DevGroup): string => DEV_GROUPS.find(entry => entry.id === group)?.right ?? ''
+const title = (group: DevGroup): string => DEV_GROUPS.find(entry => entry.id === group)?.title ?? group
+
+/**
+ * ruRE (ADR-492): static reverse engineering of a file in the project, in two sections (JavaScript and Electron apps; native
+ * binaries, .NET and EVM) and the result of the last run below. The rows are the Dev Tools rows, the fields and the result panel
+ * the same; only the page is its own. Drawing it runs nothing. Everything in a result is the file's own text: it is shown cleaned
+ * (no escape sequence reaches the terminal) and the page says to treat it as untrusted.
+ */
+export function rureView(ctx: Ctx): RenderElement {
+ const { state } = ctx
+ const lead = Math.max(16, Math.min(24, ctx.columns - 44))
+ const hasRun = state.lab.running?.id.startsWith('dt-re-') === true || state.lab.result?.id.startsWith('dt-re-') === true || state.pending !== null
+ const group = (id: DevGroup, note: string): RenderElement[] =>
+ section(ctx, id, title(id), `${DEV.filter(entry => entry.group === id).length} · ${right(id)}`, [text(ctx, note, { dimColor: true }), ...fieldRows(ctx, id), ...DEV.filter(entry => entry.group === id).map(entry => entryRow(ctx, entry, lead))], true)
+
+ return col(
+ ctx,
+ [
+ text(ctx, ' look inside a file without running it: the tools only parse it', { dimColor: true }),
+ text(ctx, ' a read runs at once; unpacking an .asar writes files, so it asks first', { dimColor: true }),
+ text(ctx, ' only files inside this project can be named; results are untrusted text', { dimColor: true }),
+ ...group('rure-app', ' an .asar (UNPACK, then copy the folder in) or a folder of source'),
+ ...group('rure-native', ' one reader for ELF, PE, Mach-O; .NET: metadata only; EVM: hex or raw'),
+ ...section(ctx, 'dt-result', 'Result', resultRight(ctx), devtoolsResult(ctx), hasRun),
+ text(ctx, ' every row is a palette id: /ruflo run dt-re-bin tools/app.exe', { dimColor: true }),
+ ],
+ 'rure',
+ )
+}
diff --git a/plugins/ruflo-console/scripts/smoke.sh b/plugins/ruflo-console/scripts/smoke.sh
index 25c09f2335..73ef30ab55 100755
--- a/plugins/ruflo-console/scripts/smoke.sh
+++ b/plugins/ruflo-console/scripts/smoke.sh
@@ -11,9 +11,9 @@ step() { printf "→ %s ... " "$1"; }
ok() { printf "PASS\n"; PASS=$((PASS+1)); }
bad() { printf "FAIL: %s\n" "$1"; FAIL=$((FAIL+1)); }
-step "1. plugin.json declares ruflo-console 0.44.7"
+step "1. plugin.json declares ruflo-console 0.45.0"
grep -q '"name": "ruflo-console"' "$ROOT/.claude-plugin/plugin.json" \
- && grep -q '"version": "0.44.7"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
+ && grep -q '"version": "0.45.0"' "$ROOT/.claude-plugin/plugin.json" && ok || bad "name/version"
step "2. hooks.json names exactly one module and no classic hook commands"
grep -q '"modules": \["./register.ts"\]' "$HOOKS/hooks.json" && ! grep -q '"command"' "$HOOKS/hooks.json" \
diff --git a/plugins/ruflo-console/tests/boot-cyber.spec.ts b/plugins/ruflo-console/tests/boot-cyber.spec.ts
index a00b0c5986..5b3b4227a3 100644
--- a/plugins/ruflo-console/tests/boot-cyber.spec.ts
+++ b/plugins/ruflo-console/tests/boot-cyber.spec.ts
@@ -59,7 +59,7 @@ describe('the cyberpunk log', () => {
expect(text).toContain('RUV.NET // RUVECTOR CONSTELLATION')
expect(text).toContain('rUv · ruflo v0.26.0 · abc123')
expect(text).toContain('ruvector')
- expect(text).toMatch(/\[WARN\] READY · 32 of 32 areas verified · \d+ stars? dark/)
+ expect(text).toMatch(/\[WARN\] READY · 33 of 33 areas verified · \d+ stars? dark/)
expect(text).not.toContain('ALL STARS ALIGNED')
})
@@ -76,7 +76,7 @@ describe('the cyberpunk log', () => {
const failed = textOf(bootPicture('p', 90, 6000, 10, 10, rowsFor, failing, bootFacts(lit, '1', '')))
expect(failed).not.toContain('ALL STARS ALIGNED')
- expect(failed).toMatch(/\[FAIL\] READY · 31 of 32 areas verified · 1 failed/)
+ expect(failed).toMatch(/\[FAIL\] READY · 32 of 33 areas verified · 1 failed/)
})
it('shows the easter egg only in its window, and it decodes to rUv', () => {
@@ -97,7 +97,7 @@ describe('the cyberpunk log', () => {
it('falls back to the plain log in a narrow or short pane', () => {
const facts = bootFacts(withPlugins([]), '1', '')
- expect(textOf(bootPicture('p', 44, 6000, 10, 10, rowsFor, allOk, facts))).toContain('[ OK ] READY 32 of 32 areas verified')
+ expect(textOf(bootPicture('p', 44, 6000, 10, 10, rowsFor, allOk, facts))).toContain('[ OK ] READY 33 of 33 areas verified')
expect(textOf(bootPicture('p', 90, 6000, 10, 10, BOOT_ROWS + 6, allOk, facts))).not.toContain('RUV.NET')
})
})
diff --git a/plugins/ruflo-console/tests/devtools.spec.ts b/plugins/ruflo-console/tests/devtools.spec.ts
index a1583b3de7..b45f80cd8c 100644
--- a/plugins/ruflo-console/tests/devtools.spec.ts
+++ b/plugins/ruflo-console/tests/devtools.spec.ts
@@ -56,6 +56,12 @@ const SCHEMA: Record<string, { props: readonly string[]; req?: readonly string[]
ruvllm_hnsw_create: { props: ['dimensions', 'maxPatterns', 'efSearch'], req: ['dimensions', 'maxPatterns'] },
ruvllm_sona_create: { props: ['hiddenDim', 'learningRate', 'patternCapacity'] },
ruvllm_microlora_create: { props: ['inputDim', 'outputDim', 'rank', 'alpha'], req: ['inputDim', 'outputDim'] },
+ rure_extract_asar: { props: ['path'], req: ['path'] },
+ rure_analyze_js_app: { props: ['path'], req: ['path'] },
+ rure_find_feature: { props: ['path', 'query'], req: ['path', 'query'] },
+ rure_analyze_binary: { props: ['path', 'includeStrings'], req: ['path'] },
+ rure_analyze_dotnet: { props: ['path'], req: ['path'] },
+ rure_analyze_evm: { props: ['bytecode', 'path', 'includeDisassembly'] },
daa_learning_status: { props: ['agentId', 'detailed'] },
daa_performance_metrics: { props: ['category', 'timeRange'] },
daa_agent_create: { props: ['id', 'name', 'type', 'cognitivePattern', 'learningRate', 'enableMemory', 'capabilities'], req: ['id'] },
@@ -94,7 +100,7 @@ const COMMANDS: Record<string, readonly string[]> = {
'appliance verify': ['-f', '--quick'],
}
-const FULL: DevFields = { ref: 'main..HEAD', path: '.swarm/memory.rvf', label: 'try-1', url: 'https://example.com/a?b=1', target: '@e3', query: 'neural', task: 'review my pull request', cmd: 'git status', id: 'agent-1', note: 'worked well', session: 'demo', send: 'git status' }
+const FULL: DevFields = { ref: 'main..HEAD', path: '.swarm/memory.rvf', label: 'try-1', url: 'https://example.com/a?b=1', target: '@e3', query: 'neural', task: 'review my pull request', cmd: 'git status', id: 'agent-1', note: 'worked well', session: 'demo', send: 'git status', sample: 'app/tool.bin' }
const runnable = DEV.filter(entry => entry.na === undefined)
@@ -188,7 +194,7 @@ describe('the Dev Tools catalog', () => {
describe('the fields', () => {
it('refuse what could read as a flag, control characters, and over-long text', () => {
- for (const field of ['ref', 'path', 'label', 'query', 'task', 'cmd', 'id', 'note'] as const) {
+ for (const field of ['ref', 'path', 'label', 'query', 'task', 'cmd', 'id', 'note', 'sample'] as const) {
expect(fieldValue(field, '-rf'), field).toBeNull()
expect(fieldValue(field, '--help'), field).toBeNull()
expect(fieldValue(field, 'a\nb'), field).toBeNull()
diff --git a/plugins/ruflo-console/tests/diagrams.spec.ts b/plugins/ruflo-console/tests/diagrams.spec.ts
index d5815a6065..8ef64db5d6 100644
--- a/plugins/ruflo-console/tests/diagrams.spec.ts
+++ b/plugins/ruflo-console/tests/diagrams.spec.ts
@@ -8,6 +8,9 @@ import { gaugePicture, pipelinePicture, radarPicture, samplesPicture, trendPictu
import { flowModelOf, flowPicture, flowRows, ringOf } from '../hooks/gfx/flow'
import { federationPicture, ganttPicture, heatmapPicture } from '../hooks/gfx/maps'
import { BOOT_MODULES, BOOT_ROWS } from '../hooks/gfx/boot'
+
+/** When the boot log has printed every area and READY: it starts at 1.5 s and prints a line every 120 ms, so it grows with the areas (not a fixed time). */
+const BOOT_DONE_MS = 1_500 + (BOOT_MODULES.length + 1) * 120
import { activityPicture, bannerPicture, bootPicture, curvePicture, edges, headerPicture, layout, markPicture, palettePicture, topologyPicture, type TopoModel } from '../hooks/gfx/pictures'
import { isBooting, newState, optionsOf } from '../hooks/state'
import type { Grid } from '../hooks/gfx/raster'
@@ -151,13 +154,13 @@ describe('BBS boot screen', () => {
const text = (grid: ReturnType<typeof bootPicture>, width: number) => Array.from({ length: grid.rows }, (_, y) => String.fromCodePoint(...Array.from({ length: width }, (_, x) => grid.glyph(x, y) || 32))).join('\n')
it('draws the logo and fills a bar from elapsed time and answered reads, with no modem dial-up', () => {
- for (const age of [100, 700, 2_000, 5_400]) {
+ for (const age of [100, 700, 2_000, BOOT_DONE_MS]) {
const shown = text(bootPicture('demo', 60, age, 5, 10), 60)
expect(shown, `${age} ms`).not.toMatch(/ATDT|RING|CONNECT 115200/)
}
- const done = text(bootPicture('demo', 60, 5_400, 10, 10), 60)
+ const done = text(bootPicture('demo', 60, BOOT_DONE_MS, 10, 10), 60)
expect(done).toContain('│ ~~~~~ │')
expect(done).toContain('▐▌')
@@ -178,7 +181,7 @@ describe('BBS boot screen', () => {
expect(text(bootPicture('demo', 80, 1_700, 0, 10, rows), 80)).not.toContain('Hive-Mind')
// Every area, in menu order, then READY.
- const full = text(bootPicture('demo', 80, 5_400, 10, 10, rows), 80)
+ const full = text(bootPicture('demo', 80, BOOT_DONE_MS, 10, 10, rows), 80)
for (const entry of BOOT_MODULES) expect(full).toContain(entry.name)
expect(full.indexOf('Missions')).toBeLessThan(full.indexOf('Settings'))
@@ -187,19 +190,19 @@ describe('BBS boot screen', () => {
expect(full).toContain('100% reads 10/10')
// A short pane shows the newest lines, not the oldest; no rows given: the sign alone, as before.
- const short = text(bootPicture('demo', 80, 5_400, 10, 10, BOOT_ROWS + 1 + 5), 80)
+ const short = text(bootPicture('demo', 80, BOOT_DONE_MS, 10, 10, BOOT_ROWS + 1 + 5), 80)
expect(short).toContain('READY')
expect(short).not.toContain('Missions')
- expect(bootPicture('demo', 80, 5_400, 10, 10).rows).toBe(BOOT_ROWS)
+ expect(bootPicture('demo', 80, BOOT_DONE_MS, 10, 10).rows).toBe(BOOT_ROWS)
})
it('reports the self-check: [ OK ] only for an area whose check passed, [FAIL] and its problem for one that did not, READY counting what was verified', () => {
const rows = BOOT_ROWS + 1 + BOOT_MODULES.length + 1
const passing = BOOT_MODULES.map(entry => ({ area: entry.name, ok: true, problems: [] as string[] }))
const withFailure = passing.map(result => (result.area === 'Security' ? { ...result, ok: false, problems: ['aid-check: an empty field must be refused'] } : result))
- const good = text(bootPicture('demo', 80, 5_400, 10, 10, rows, passing), 80)
- const bad = text(bootPicture('demo', 80, 5_400, 10, 10, rows, withFailure), 80)
+ const good = text(bootPicture('demo', 80, BOOT_DONE_MS, 10, 10, rows, passing), 80)
+ const bad = text(bootPicture('demo', 80, BOOT_DONE_MS, 10, 10, rows, withFailure), 80)
expect(good).toContain('[ OK ] Security')
expect(good).toContain(`${BOOT_MODULES.length} of ${BOOT_MODULES.length} areas verified`)
diff --git a/plugins/ruflo-console/tests/fixtures/rure/asar-error.txt b/plugins/ruflo-console/tests/fixtures/rure/asar-error.txt
new file mode 100644
index 0000000000..fb464f743d
--- /dev/null
+++ b/plugins/ruflo-console/tests/fixtures/rure/asar-error.txt
@@ -0,0 +1,15 @@
+[INFO] Executing tool: rure_extract_asar
+ Parameters: {"path":"nothere.asar"}
+
+[OK] Tool executed in 16.30ms
+
+Result:
+{
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"success\":false,\"error\":\"asar extraction failed: ENOENT: no such file or directory, open 'nothere.asar'\"}"
+ }
+ ],
+ "isError": true
+}
diff --git a/plugins/ruflo-console/tests/fixtures/rure/asar.txt b/plugins/ruflo-console/tests/fixtures/rure/asar.txt
new file mode 100644
index 0000000000..4231f8da93
--- /dev/null
+++ b/plugins/ruflo-console/tests/fixtures/rure/asar.txt
@@ -0,0 +1,14 @@
+[INFO] Executing tool: rure_extract_asar
+ Parameters: {"path":"app.asar"}
+
+[OK] Tool executed in 17.26ms
+
+Result:
+{
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"success\":true,\"truncated\":false,\"unpackedPath\":\"/tmp/ruflo-rure-asar-IeyRSI/unpacked\",\"fileCount\":2,\"totalBytes\":257}"
+ }
+ ]
+}
diff --git a/plugins/ruflo-console/tests/fixtures/rure/binary-elf.txt b/plugins/ruflo-console/tests/fixtures/rure/binary-elf.txt
new file mode 100644
index 0000000000..c2b891e06a
--- /dev/null
+++ b/plugins/ruflo-console/tests/fixtures/rure/binary-elf.txt
@@ -0,0 +1,14 @@
+[INFO] Executing tool: rure_analyze_binary
+ Parameters: {"path":"sample.elf","includeStrings":true}
+
+[OK] Tool executed in 13.92ms
+
+Result:
+{
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"success\":true,\"format\":\"elf\",\"arch\":\"x86-64\",\"bits\":64,\"endianness\":\"little\",\"kind\":\"shared-or-pie\",\"entryPoint\":4160,\"sections\":[{\"name\":\"\",\"offset\":0,\"size\":0},{\"name\":\".shstrtab\",\"offset\":64,\"size\":36},{\"name\":\".dynstr\",\"offset\":100,\"size\":28},{\"name\":\".dynamic\",\"offset\":128,\"size\":32},{\"name\":\".dynsym\",\"offset\":160,\"size\":72}],\"libraries\":[\"libc.so.6\"],\"imports\":[\"puts\"],\"exports\":[\"exported_fn\"],\"warnings\":[],\"truncated\":false,\"strings\":[{\"value\":\".shstrtab\",\"offset\":65},{\"value\":\".dynstr\",\"offset\":75},{\"value\":\".dynamic\",\"offset\":83},{\"value\":\".dynsym\",\"offset\":92},{\"value\":\"libc.so.6\",\"offset\":101},{\"value\":\"exported_fn\",\"offset\":116}],\"stringsTruncated\":false,\"redactedCount\":0,\"screened\":true}"
+ }
+ ]
+}
diff --git a/plugins/ruflo-console/tests/fixtures/rure/binary-macho.txt b/plugins/ruflo-console/tests/fixtures/rure/binary-macho.txt
new file mode 100644
index 0000000000..f4ed02111e
--- /dev/null
+++ b/plugins/ruflo-console/tests/fixtures/rure/binary-macho.txt
@@ -0,0 +1,14 @@
+[INFO] Executing tool: rure_analyze_binary
+ Parameters: {"path":"sample.macho"}
+
+[OK] Tool executed in 13.11ms
+
+Result:
+{
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"success\":true,\"format\":\"macho\",\"arch\":\"aarch64\",\"bits\":64,\"endianness\":\"little\",\"kind\":\"executable\",\"entryPoint\":4660,\"sections\":[],\"libraries\":[\"/usr/lib/libSystem.B.dylib\"],\"imports\":[],\"exports\":[],\"warnings\":[],\"truncated\":false,\"redactedCount\":0,\"screened\":true}"
+ }
+ ]
+}
diff --git a/plugins/ruflo-console/tests/fixtures/rure/binary-pe.txt b/plugins/ruflo-console/tests/fixtures/rure/binary-pe.txt
new file mode 100644
index 0000000000..52af6e3deb
--- /dev/null
+++ b/plugins/ruflo-console/tests/fixtures/rure/binary-pe.txt
@@ -0,0 +1,14 @@
+[INFO] Executing tool: rure_analyze_binary
+ Parameters: {"path":"sample.exe"}
+
+[OK] Tool executed in 12.19ms
+
+Result:
+{
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"success\":true,\"format\":\"pe\",\"arch\":\"x86-64\",\"bits\":64,\"endianness\":\"little\",\"kind\":\"executable\",\"entryPoint\":4096,\"sections\":[{\"name\":\".idata\",\"offset\":512,\"size\":512}],\"libraries\":[\"KERNEL32.dll\"],\"imports\":[\"KERNEL32.dll!ExitProcess\"],\"exports\":[],\"warnings\":[],\"truncated\":false,\"redactedCount\":0,\"screened\":true}"
+ }
+ ]
+}
diff --git a/plugins/ruflo-console/tests/fixtures/rure/dotnet.txt b/plugins/ruflo-console/tests/fixtures/rure/dotnet.txt
new file mode 100644
index 0000000000..0dc5a5124f
--- /dev/null
+++ b/plugins/ruflo-console/tests/fixtures/rure/dotnet.txt
@@ -0,0 +1,14 @@
+[INFO] Executing tool: rure_analyze_dotnet
+ Parameters: {"path":"sample.dll"}
+
+[OK] Tool executed in 13.18ms
+
+Result:
+{
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"success\":true,\"isManaged\":true,\"runtimeVersion\":\"v4.0.30319\",\"assembly\":{\"name\":\"Demo\",\"version\":\"1.2.3.4\"},\"assemblyRefs\":[{\"name\":\"System.Runtime\",\"version\":\"6.0.0.0\"}],\"typeCount\":2,\"types\":[\"<Module>\",\"Foo.Bar\"],\"methodCount\":1,\"pinvokes\":[{\"module\":\"libnative\",\"function\":\"do_thing\"}],\"userStrings\":[\"hello-dotnet\",\"[content redacted by AIDefence — threat or PII detected]\"],\"entryPointToken\":100663297,\"warnings\":[],\"truncated\":false,\"redactedCount\":1,\"screened\":true}"
+ }
+ ]
+}
diff --git a/plugins/ruflo-console/tests/fixtures/rure/evm-proxy.txt b/plugins/ruflo-console/tests/fixtures/rure/evm-proxy.txt
new file mode 100644
index 0000000000..5ae3de5dd8
--- /dev/null
+++ b/plugins/ruflo-console/tests/fixtures/rure/evm-proxy.txt
@@ -0,0 +1,14 @@
+[INFO] Executing tool: rure_analyze_evm
+ Parameters: {"path":"proxy.evm"}
+
+[OK] Tool executed in 11.15ms
+
+Result:
+{
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"success\":true,\"byteLength\":45,\"instructionCount\":24,\"jumpdestCount\":1,\"invalidOpcodeCount\":0,\"selectors\":[],\"hazards\":{\"DELEGATECALL\":{\"count\":1,\"offsets\":[31]}},\"addresses\":[\"0xbebebebebebebebebebebebebebebebebebebebe\"],\"eventTopics\":[],\"minimalProxy\":{\"implementation\":\"0xbebebebebebebebebebebebebebebebebebebebe\"},\"metadata\":null,\"strings\":[],\"warnings\":[],\"truncated\":false,\"redactedCount\":0,\"screened\":true}"
+ }
+ ]
+}
diff --git a/plugins/ruflo-console/tests/fixtures/rure/evm.txt b/plugins/ruflo-console/tests/fixtures/rure/evm.txt
new file mode 100644
index 0000000000..2610663f9f
--- /dev/null
+++ b/plugins/ruflo-console/tests/fixtures/rure/evm.txt
@@ -0,0 +1,14 @@
+[INFO] Executing tool: rure_analyze_evm
+ Parameters: {"path":"sample.evm"}
+
+[OK] Tool executed in 12.53ms
+
+Result:
+{
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"success\":true,\"byteLength\":202,\"instructionCount\":79,\"jumpdestCount\":2,\"invalidOpcodeCount\":35,\"selectors\":[{\"selector\":\"0xa9059cbb\",\"name\":\"transfer(address,uint256)\",\"offset\":6},{\"selector\":\"0x12345678\",\"name\":null,\"offset\":17},{\"selector\":\"0x70a08231\",\"name\":\"balanceOf(address)\",\"offset\":27}],\"hazards\":{\"ORIGIN\":{\"count\":1,\"offsets\":[54]},\"SELFDESTRUCT\":{\"count\":1,\"offsets\":[55]},\"DELEGATECALL\":{\"count\":1,\"offsets\":[56]}},\"addresses\":[\"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef\"],\"eventTopics\":[{\"topic\":\"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\",\"name\":\"Transfer(address,address,uint256)\",\"offset\":115},{\"topic\":\"0x4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572\",\"name\":null,\"offset\":149}],\"minimalProxy\":null,\"metadata\":{\"ipfs\":\"abababababababababababababababababababababababababababababababababab\",\"solc\":\"0.8.20\"},\"strings\":[\"Ownable: caller is not the owner\"],\"warnings\":[],\"truncated\":false,\"redactedCount\":0,\"screened\":true}"
+ }
+ ]
+}
diff --git a/plugins/ruflo-console/tests/fixtures/rure/find.txt b/plugins/ruflo-console/tests/fixtures/rure/find.txt
new file mode 100644
index 0000000000..2844987c83
--- /dev/null
+++ b/plugins/ruflo-console/tests/fixtures/rure/find.txt
@@ -0,0 +1,14 @@
+[INFO] Executing tool: rure_find_feature
+ Parameters: {"path":"app","query":"license check"}
+
+[OK] Tool executed in 160.01ms
+
+Result:
+{
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"success\":true,\"matches\":[{\"file\":\"app/src/main.js\",\"lineRange\":{\"start\":1,\"end\":5},\"snippet\":\"const { ipcMain, BrowserWindow } = require('electron');\\nconst fs = require('fs');\\nipcMain.handle('license:check', async (e, key) => { return fs.readFileSync(key, 'utf8'); });\\nfetch('https://api.example.com/v1/activate');\\n\",\"score\":2,\"redacted\":false}],\"filesScanned\":1,\"truncated\":false,\"skippedFiles\":0,\"screened\":true}"
+ }
+ ]
+}
diff --git a/plugins/ruflo-console/tests/fixtures/rure/js-app.txt b/plugins/ruflo-console/tests/fixtures/rure/js-app.txt
new file mode 100644
index 0000000000..a5906bf0f6
--- /dev/null
+++ b/plugins/ruflo-console/tests/fixtures/rure/js-app.txt
@@ -0,0 +1,14 @@
+[INFO] Executing tool: rure_analyze_js_app
+ Parameters: {"path":"app"}
+
+[OK] Tool executed in 156.13ms
+
+Result:
+{
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"success\":true,\"filesScanned\":1,\"truncated\":false,\"skippedFiles\":0,\"isElectron\":true,\"modules\":[{\"file\":\"app/src/main.js\",\"imports\":[{\"source\":\"electron\",\"names\":[],\"evidence\":{\"file\":\"app/src/main.js\",\"lineStart\":1,\"lineEnd\":1}},{\"source\":\"fs\",\"names\":[],\"evidence\":{\"file\":\"app/src/main.js\",\"lineStart\":2,\"lineEnd\":2}}],\"exports\":[],\"electronBoundaries\":[{\"kind\":\"ipcMain\",\"detail\":\"ipcMain\",\"evidence\":{\"file\":\"app/src/main.js\",\"lineStart\":1,\"lineEnd\":1}},{\"kind\":\"require-electron\",\"detail\":\"require(\\\"electron\\\")\",\"evidence\":{\"file\":\"app/src/main.js\",\"lineStart\":1,\"lineEnd\":1}},{\"kind\":\"ipcMain\",\"detail\":\"ipcMain\",\"evidence\":{\"file\":\"app/src/main.js\",\"lineStart\":3,\"lineEnd\":3}}]}],\"redactedSnippetCount\":0,\"screened\":true}"
+ }
+ ]
+}
diff --git a/plugins/ruflo-console/tests/nav.spec.ts b/plugins/ruflo-console/tests/nav.spec.ts
index 878d5aa7df..f4091d9404 100644
--- a/plugins/ruflo-console/tests/nav.spec.ts
+++ b/plugins/ruflo-console/tests/nav.spec.ts
@@ -12,7 +12,7 @@ describe('main nav hotkeys', () => {
expect(keys.every(key => /^[0-9a-z]$/.test(key))).toBe(true)
expect(new Set(keys).size).toBe(keys.length)
- expect(VIEWS.filter(view => view.key === '').map(view => view.id)).toEqual(['workflows', 'room', 'sandbox', 'adrs', 'whatsnew', 'themes'])
+ expect(VIEWS.filter(view => view.key === '').map(view => view.id)).toEqual(['workflows', 'room', 'sandbox', 'adrs', 'rure', 'whatsnew', 'themes'])
})
it('none takes a key the footer, the confirm row, scrolling or the menu prompt owns', () => {
diff --git a/plugins/ruflo-console/tests/rure-e2e.spec.ts b/plugins/ruflo-console/tests/rure-e2e.spec.ts
new file mode 100644
index 0000000000..32384cd8a0
--- /dev/null
+++ b/plugins/ruflo-console/tests/rure-e2e.spec.ts
@@ -0,0 +1,163 @@
+/**
+ * ruRE end to end (ADR-492): every row of the page, as the console would run it, against the REAL built ruflo CLI and real files.
+ * A temp project gets an ELF, a PE, a Mach-O, a .NET assembly, two EVM contracts, a JS/Electron app, an .asar built from it and an
+ * ELF whose section name carries terminal escapes; each row's exact argv (`ruflo mcp exec -t rure_* -p {...}`) runs in that project,
+ * and what the CLI printed goes through the console's own reader. Nothing is mocked and nothing in the target is run.
+ *
+ * Needs the CLI built from a tree that has the ruRE tools: `cd v3/@claude-flow/cli && npx tsc`. Without a build the whole file skips,
+ * and says so; with one that predates the tools (an older release) it skips as well, because that case is covered in rure-page.spec.ts.
+ * Run with
+ * npx vitest run plugins/ruflo-console/tests/rure-e2e.spec.ts
+ */
+import { spawnSync } from 'node:child_process'
+import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
+import { createRequire } from 'node:module'
+import { tmpdir } from 'node:os'
+import { dirname, join, resolve } from 'node:path'
+import { afterAll, beforeAll, describe, expect, it } from 'vitest'
+
+import { devLines, emptyFields, unwrap, type DevFields } from '../hooks/data/devtools'
+import { NO_TOOLS } from '../hooks/data/rure'
+import { DEV, devSpec } from '../hooks/devtools'
+// The same fixture builders the ruRE tools' own tests use: real file formats, built byte by byte.
+import { buildDotNetPe, buildElf64, buildEvmBytecode, buildMachO64, buildMinimalProxy, buildPe64 } from '../../../v3/@claude-flow/cli/__tests__/rure-binary-fixtures'
+
+const CLI_DIR = resolve(__dirname, '../../../v3/@claude-flow/cli')
+const CLI = join(CLI_DIR, 'bin', 'cli.js')
+const TOOLS = join(CLI_DIR, 'dist', 'src', 'mcp-tools', 'rure-tools.js')
+const HAVE_CLI = existsSync(CLI) && existsSync(TOOLS) && readFileSync(TOOLS, 'utf8').includes('rure_analyze_evm')
+
+if (!HAVE_CLI) console.log('SKIP ruRE e2e: build the CLI first (cd v3/@claude-flow/cli && npx tsc); it needs the rure_* tools')
+
+const EVIL = '\u001b[31mEVIL\u001b[0m\u001b]52;c;aGk=\u0007'
+let project = ''
+
+const fields = (over: Partial<DevFields>): DevFields => ({ ...emptyFields(), ...over })
+
+/** One row as the console runs it: its fields -> its spec -> the real CLI in the project -> the console's own reader. */
+function run(id: string, over: Partial<DevFields>): { lines: string[]; stdout: string; status: number | null } {
+ const entry = DEV.find(candidate => candidate.id === id)!
+ const spec = devSpec(entry, fields(over))
+
+ expect(spec, `${id} builds from ${JSON.stringify(over)}`).not.toBeNull()
+
+ const done = spawnSync(process.execPath, [CLI, ...spec!.args], { cwd: project, encoding: 'utf8', timeout: 90_000, env: { ...process.env, NO_COLOR: '1' } })
+ const stdout = done.stdout ?? ''
+
+ return { lines: spec!.lines?.(stdout, done.stderr ?? '') ?? [], stdout, status: done.status }
+}
+
+beforeAll(async () => {
+ if (!HAVE_CLI) return
+
+ project = mkdtempSync(join(tmpdir(), 'ruflo-console-rure-e2e-'))
+
+ for (const dir of ['bin', 'lib', 'contracts', 'app/src']) mkdirSync(join(project, dir), { recursive: true })
+
+ writeFileSync(join(project, 'bin/sample.elf'), buildElf64())
+ writeFileSync(join(project, 'bin/hostile.elf'), buildElf64(EVIL))
+ writeFileSync(join(project, 'bin/sample.exe'), buildPe64())
+ writeFileSync(join(project, 'bin/sample.macho'), buildMachO64())
+ writeFileSync(join(project, 'lib/sample.dll'), buildDotNetPe())
+ writeFileSync(join(project, 'contracts/token.bin'), buildEvmBytecode())
+ writeFileSync(join(project, 'contracts/proxy.bin'), buildMinimalProxy())
+ writeFileSync(join(project, 'app/package.json'), JSON.stringify({ name: 'demo', main: 'src/main.js' }))
+ writeFileSync(join(project, 'app/src/main.js'), "const { ipcMain, BrowserWindow } = require('electron');\nconst fs = require('fs');\nipcMain.handle('license:check', async (e, key) => { return fs.readFileSync(key, 'utf8'); });\nfetch('https://api.example.com/v1/activate');\n")
+
+ // The packer lives in the CLI's own dependencies, as in the ruRE tools' tests.
+ const asar = createRequire(join(CLI_DIR, 'package.json'))('@electron/asar') as { createPackage: (src: string, dest: string) => Promise<void> }
+
+ await asar.createPackage(join(project, 'app'), join(project, 'app.asar'))
+}, 120_000)
+
+afterAll(() => {
+ if (project !== '') rmSync(project, { recursive: true, force: true })
+})
+
+describe.skipIf(!HAVE_CLI)('ruRE rows against the real CLI', () => {
+ it('NATIVE BINARY reads an ELF, a PE and a Mach-O from the project', () => {
+ const elf = run('dt-re-bin', { sample: 'bin/sample.elf' })
+
+ expect(elf.status).toBe(0)
+ expect(elf.lines.join('\n')).toContain('ELF · x86-64 · 64-bit little-endian')
+ expect(elf.lines.join('\n')).toContain('libraries (1): libc.so.6')
+ expect(elf.lines.join('\n')).toContain('imports (1): puts')
+ expect(run('dt-re-bin', { sample: 'bin/sample.exe' }).lines.join('\n')).toContain('imports (1): KERNEL32.dll!ExitProcess')
+ expect(run('dt-re-bin', { sample: 'bin/sample.macho' }).lines.join('\n')).toContain('MACHO · aarch64')
+ }, 120_000)
+
+ it('.NET ASSEMBLY reads metadata and P/Invoke, and says what happened to the screening of its string literals', () => {
+ const net = run('dt-re-net', { sample: 'lib/sample.dll' }).lines.join('\n')
+
+ expect(net).toContain('Demo 1.2.3.4')
+ expect(net).toContain('P/Invoke (1): libnative!do_thing')
+ expect(net).toContain('hello-dotnet')
+ // With AIDefence installed the flagged literal is hidden and counted; without it (CI) the tool reports screened:false and the page says so.
+ // Either way the screening state is on screen: a page that said nothing would let untrusted strings pass as clean.
+ expect(net).toMatch(/hidden by AIDefence|not screened: AIDefence was unavailable/)
+ }, 120_000)
+
+ it('EVM BYTECODE lists selectors, hazards and a minimal proxy', () => {
+ const token = run('dt-re-evm', { sample: 'contracts/token.bin' }).lines.join('\n')
+
+ expect(token).toContain('0xa9059cbb transfer(address,uint256)')
+ expect(token).toMatch(/SELFDESTRUCT ×1/)
+ expect(run('dt-re-evm', { sample: 'contracts/proxy.bin' }).lines.join('\n')).toContain('EIP-1167 minimal proxy')
+ }, 120_000)
+
+ it('APP MAP and FIND FEATURE read a source folder; FIND FEATURE needs the feature words', () => {
+ const app = run('dt-re-js', { sample: 'app' }).lines.join('\n')
+
+ expect(app).toContain('Electron app')
+ expect(app).toMatch(/ipcMain ×2/)
+
+ const found = run('dt-re-find', { sample: 'app', query: 'license check' }).lines.join('\n')
+
+ expect(found).toMatch(/1 match/)
+ expect(found).toContain('app/src/main.js')
+ expect(devSpec(DEV.find(entry => entry.id === 'dt-re-find')!, fields({ sample: 'app' }))).toBeNull()
+ }, 120_000)
+
+ it('UNPACK .ASAR extracts to a temp folder outside the project and says so, then it is cleaned up here', () => {
+ const asar = run('dt-re-asar', { sample: 'app.asar' })
+ const text = asar.lines.join('\n')
+
+ expect(text).toContain('extracted 2 files')
+ expect(text).toMatch(/outside the project/)
+
+ const where = (unwrap(asar.stdout)?.value as { unpackedPath?: string } | undefined)?.unpackedPath
+
+ expect(where).toBeDefined()
+ expect(existsSync(where!)).toBe(true)
+ expect(where!.startsWith(tmpdir())).toBe(true)
+ expect(where!.startsWith(project)).toBe(false)
+ // The tool does not clean up after itself (a known gap): the test does.
+ rmSync(dirname(where!), { recursive: true, force: true })
+ }, 120_000)
+
+ it('a binary whose section name carries terminal escapes never puts one in a line', () => {
+ const hostile = run('dt-re-bin', { sample: 'bin/hostile.elf' })
+
+ expect(hostile.status).toBe(0)
+ expect(hostile.lines.length).toBeGreaterThan(0)
+ // eslint-disable-next-line no-control-regex
+ for (const line of hostile.lines) expect(line, JSON.stringify(line)).not.toMatch(/[\u0000-\u001f\u007f‪-‮]/)
+ }, 120_000)
+
+ it('a missing file is one ✗ line from the tool, not a stack trace', () => {
+ const missing = run('dt-re-bin', { sample: 'bin/nothere.elf' })
+
+ expect(missing.lines).toHaveLength(1)
+ expect(missing.lines[0]).toMatch(/^✗ /)
+ }, 120_000)
+
+ it('a path outside the project never reaches the CLI: the row builds nothing', () => {
+ for (const bad of ['/etc/passwd', '../outside', 'bin/../../x']) expect(devSpec(DEV.find(entry => entry.id === 'dt-re-bin')!, fields({ sample: bad })), bad).toBeNull()
+ })
+
+ it('a CLI without the ruRE tools (an older release) is read as "update ruflo", not as a crash', () => {
+ const old = spawnSync(process.execPath, [CLI, 'mcp', 'exec', '-t', 'rure_tool_this_cli_does_not_have', '-p', '{"path":"bin/sample.elf"}'], { cwd: project, encoding: 'utf8', timeout: 90_000 })
+
+ expect(devLines('dt-re-bin', old.stdout ?? '', old.stderr ?? '')).toEqual([`✗ ${NO_TOOLS}`])
+ }, 120_000)
+})
diff --git a/plugins/ruflo-console/tests/rure-page.spec.ts b/plugins/ruflo-console/tests/rure-page.spec.ts
new file mode 100644
index 0000000000..db472e3630
--- /dev/null
+++ b/plugins/ruflo-console/tests/rure-page.spec.ts
@@ -0,0 +1,321 @@
+/**
+ * The ruRE page (ADR-492) under vitest: the catalog against the real tool schemas, what the `sample` field refuses, the readers
+ * against what the real CLI printed (tests/fixtures/rure/*.txt are captured `ruflo mcp exec` runs, not hand-written JSON), a hostile
+ * answer, the page itself, its palette ids and Enter routing, and its guide. Run with
+ * npx vitest run plugins/ruflo-console/tests/rure-page.spec.ts
+ * The same entries against the real built CLI: tests/rure-e2e.spec.ts.
+ */
+import { readFileSync } from 'node:fs'
+import { join } from 'node:path'
+import { describe, expect, it, vi } from 'vitest'
+
+import { devLines, emptyFields, fieldValue, type DevFields } from '../hooks/data/devtools'
+import { NO_TOOLS, RE_MAX_LINES } from '../hooks/data/rure'
+import { DEV, DEV_GROUPS, devPalette, devSpec, devWhy, devtoolsActions } from '../hooks/devtools'
+import { VIEW_TOPIC } from '../hooks/help-docs'
+import { topicById } from '../hooks/help-topics'
+import type { Host } from '../hooks/host'
+import { groupOf, NAV_GROUPS } from '../hooks/nav-state'
+import { RURE, RURE_GROUPS } from '../hooks/rure'
+import { newState, VIEWS } from '../hooks/state'
+import { devtoolsView } from '../hooks/views/devtools'
+import type { Ctx } from '../hooks/views/common'
+import { GROUPS } from '../hooks/views/menu'
+import { rureView } from '../hooks/views/rure'
+
+const fixture = (name: string): string => readFileSync(join(__dirname, 'fixtures', 'rure', `${name}.txt`), 'utf8')
+const fields = (over: Partial<DevFields>): DevFields => ({ ...emptyFields(), ...over })
+const entry = (id: string) => DEV.find(candidate => candidate.id === id)!
+const params = (id: string, over: Partial<DevFields>): Record<string, unknown> | null => {
+ const argv = devSpec(entry(id), fields(over))?.args
+
+ return argv === undefined ? null : (JSON.parse(argv[5] ?? 'null') as Record<string, unknown>)
+}
+const linesOf = (id: string, name: string): string => devLines(id, fixture(name), '').join('\n')
+
+/** What `ruflo mcp exec` prints around an answer, for a hand-made one. */
+const wrapped = (inner: unknown, isError = false) => `[INFO] Executing tool: x\n[OK] Tool executed in 6ms\nResult:\n${JSON.stringify({ content: [{ type: 'text', text: JSON.stringify(inner) }], ...(isError && { isError: true }) }, null, 2)}\n`
+
+describe('the ruRE catalog', () => {
+ it('has the six tools, each with a unique dt-re- id, in a ruRE group, and the groups have rows', () => {
+ expect(RURE.map(item => item.id)).toEqual(['dt-re-asar', 'dt-re-js', 'dt-re-find', 'dt-re-bin', 'dt-re-net', 'dt-re-evm'])
+ expect(RURE.every(item => DEV.includes(item))).toBe(true)
+ expect(RURE_GROUPS.every(group => DEV_GROUPS.some(known => known.id === group.id) && RURE.some(item => item.group === group.id))).toBe(true)
+ })
+
+ it('reads at once, except unpacking an .asar, which writes and says so', () => {
+ for (const item of RURE) {
+ const spec = devSpec(item, fields({ sample: 'app/x', query: 'license' }))
+
+ expect(spec?.isReadOnly === true, item.id).toBe(item.id !== 'dt-re-asar')
+ }
+
+ const asar = devSpec(entry('dt-re-asar'), fields({ sample: 'app/app.asar' }))
+
+ expect(asar?.declared).toBe('write')
+ expect(asar?.note).toMatch(/outside the project/)
+ })
+
+ it('calls the right tool with the sample, and find also with the feature', () => {
+ expect(params('dt-re-asar', { sample: 'a/app.asar' })).toEqual({ path: 'a/app.asar' })
+ expect(params('dt-re-js', { sample: 'src' })).toEqual({ path: 'src' })
+ expect(params('dt-re-find', { sample: 'src', query: 'license check' })).toEqual({ path: 'src', query: 'license check' })
+ expect(params('dt-re-bin', { sample: 'bin/tool' })).toEqual({ path: 'bin/tool', includeStrings: true })
+ expect(params('dt-re-net', { sample: 'lib/a.dll' })).toEqual({ path: 'lib/a.dll' })
+ expect(params('dt-re-evm', { sample: 'c/token.bin' })).toEqual({ path: 'c/token.bin' })
+ expect(devSpec(entry('dt-re-bin'), fields({ sample: 'bin/tool' }))?.args.slice(0, 4)).toEqual(['mcp', 'exec', '-t', 'rure_analyze_binary'])
+ })
+
+ it('the sample is a path inside the project: nothing outside it, no flag, no escape', () => {
+ for (const bad of ['/etc/passwd', '../secret', 'a/../../b', '-rf', '--help', 'a//b', '~/x', 'C:\\Windows\\x', 'a\nb', 'a b', '', 'x'.repeat(200)]) {
+ expect(fieldValue('sample', bad), JSON.stringify(bad)).toBeNull()
+ expect(devSpec(entry('dt-re-bin'), fields({ sample: bad })), JSON.stringify(bad)).toBeNull()
+ }
+
+ expect(fieldValue('sample', 'app/resources/app.asar')).toBe('app/resources/app.asar')
+ expect(fieldValue('sample', '.cache/tool.exe')).toBe('.cache/tool.exe')
+ })
+
+ it('an empty sample blocks the row and names the field; find also needs the feature', () => {
+ expect(devSpec(entry('dt-re-bin'), emptyFields())).toBeNull()
+ expect(devWhy(entry('dt-re-bin'), emptyFields())).toMatch(/^sample field is empty: type it in the field above, then ▶ run: a file or folder under the project/)
+ expect(devSpec(entry('dt-re-find'), fields({ sample: 'src' }))).toBeNull()
+ expect(devWhy(entry('dt-re-find'), fields({ sample: 'src' }))).toMatch(/^query field/)
+ })
+})
+
+describe('the readers, against what the real CLI printed', () => {
+ it('a native binary: format, entry, libraries, imports, exports, sections and strings', () => {
+ const elf = linesOf('dt-re-bin', 'binary-elf')
+
+ expect(elf).toContain('ELF · x86-64 · 64-bit little-endian · shared-or-pie')
+ expect(elf).toContain('entry 0x1040')
+ expect(elf).toContain('libraries (1): libc.so.6')
+ expect(elf).toContain('imports (1): puts')
+ expect(elf).toContain('exports (1): exported_fn')
+ expect(elf).toContain('.shstrtab 0x40+36')
+ expect(elf).toContain('strings (6)')
+ expect(linesOf('dt-re-bin', 'binary-pe')).toContain('imports (1): KERNEL32.dll!ExitProcess')
+ expect(linesOf('dt-re-bin', 'binary-macho')).toContain('MACHO · aarch64')
+ expect(linesOf('dt-re-bin', 'binary-macho')).toContain('/usr/lib/libSystem.B.dylib')
+ })
+
+ it('a .NET assembly: identity, references, types, P/Invoke and string literals, with a redacted one said', () => {
+ const net = linesOf('dt-re-net', 'dotnet')
+
+ expect(net).toContain('Demo 1.2.3.4 · runtime v4.0.30319')
+ expect(net).toContain('references (1): System.Runtime 6.0.0.0')
+ expect(net).toContain('types (2): <Module>, Foo.Bar')
+ expect(net).toContain('P/Invoke (1): libnative!do_thing')
+ expect(net).toContain('hello-dotnet')
+ expect(net).toMatch(/1 value\(s\) hidden by AIDefence/)
+ })
+
+ it('EVM: selectors with names, hazards with offsets, events, a proxy and the compiler', () => {
+ const evm = linesOf('dt-re-evm', 'evm')
+
+ expect(evm).toContain('202 bytes · 79 instructions · 2 JUMPDEST')
+ expect(evm).toContain('0xa9059cbb transfer(address,uint256) @6')
+ expect(evm).toContain('0x12345678 (unknown) @17')
+ expect(evm).toMatch(/hazards: .*SELFDESTRUCT ×1 @55/)
+ expect(evm).toContain('Transfer(address,address,uint256)')
+ expect(evm).toContain('compiler: solc 0.8.20')
+ // plain() already marks a clipped value with one ellipsis: never two.
+ expect(evm).not.toContain('……')
+ expect(evm).toContain('Ownable: caller is not the owner')
+ expect(linesOf('dt-re-evm', 'evm-proxy')).toContain('EIP-1167 minimal proxy → 0xbebebebebebebebebebebebebebebebebebebebe')
+ expect(linesOf('dt-re-evm', 'evm-proxy')).toContain('selectors (0)')
+ })
+
+ it('a JS app and a feature search: the boundaries, the imports and where the match is', () => {
+ const app = linesOf('dt-re-js', 'js-app')
+
+ expect(app).toContain('Electron app · 1 files scanned · 1 modules')
+ expect(app).toContain('Electron boundaries: ipcMain ×2 · require-electron ×1')
+ expect(app).toContain('imports (2): electron, fs')
+
+ const found = linesOf('dt-re-find', 'find')
+
+ expect(found).toContain('1 match · 1 files scanned')
+ expect(found).toContain('app/src/main.js:1-5 · score 2')
+ expect(found).toContain("const { ipcMain, BrowserWindow } = require('electron');")
+ })
+
+ it('an unpacked .asar says where, and that the folder is outside the project', () => {
+ const asar = linesOf('dt-re-asar', 'asar')
+
+ expect(asar).toContain('extracted 2 files (257 bytes)')
+ expect(asar).toContain('/tmp/ruflo-rure-asar-IeyRSI/unpacked')
+ expect(asar).toMatch(/outside the project/)
+ })
+
+ it('a failed tool is one ✗ line with its reason; a CLI without the tools says to update', () => {
+ expect(linesOf('dt-re-asar', 'asar-error')).toMatch(/^✗ asar extraction failed: ENOENT/)
+ expect(devLines('dt-re-bin', '[INFO] Executing tool: rure_analyze_binary\n[ERROR] Tool not found: rure_analyze_binary\n', '')).toEqual([`✗ ${NO_TOOLS}`])
+ expect(devLines('dt-re-bin', '', '[ERROR] Tool not found: rure_analyze_binary')).toEqual([`✗ ${NO_TOOLS}`])
+ })
+
+ it('shows a cut walk and a missing screen as warnings first', () => {
+ const lines = devLines('dt-re-bin', wrapped({ success: true, format: 'elf', arch: 'x86-64', bits: 64, endianness: 'little', kind: 'executable', entryPoint: 1, sections: [], libraries: [], imports: [], exports: [], warnings: ['section table out of range'], truncated: true, redactedCount: 0, screened: false }))
+
+ expect(lines[0]).toBe('⚠ section table out of range')
+ expect(lines.join('\n')).toMatch(/truncated: a size or count cap was reached/)
+ expect(lines.join('\n')).toMatch(/not screened: AIDefence was unavailable/)
+ })
+})
+
+describe('a hostile file', () => {
+ it('its section names, imports, strings and type names never put an escape or control character in a line', () => {
+ const evil = '\u001b[31mRED\u001b[0m\u001b]52;c;aGk=\u0007\u202eTXT\u0000end'
+ const answers: [string, unknown][] = [
+ ['dt-re-bin', { success: true, format: evil, arch: evil, bits: 64, endianness: evil, kind: evil, entryPoint: 4096, sections: [{ name: evil, offset: 0, size: 1 }], libraries: [evil], imports: [evil], exports: [evil], strings: [{ value: evil, offset: 1 }], warnings: [evil], truncated: false, redactedCount: 0, screened: true }],
+ ['dt-re-net', { success: true, isManaged: true, runtimeVersion: evil, assembly: { name: evil, version: evil }, assemblyRefs: [{ name: evil, version: evil }], typeCount: 1, types: [evil], methodCount: 1, pinvokes: [{ module: evil, function: evil }], userStrings: [evil], entryPointToken: 1, warnings: [evil], truncated: false, redactedCount: 0, screened: true }],
+ ['dt-re-evm', { success: true, byteLength: 1, instructionCount: 1, jumpdestCount: 0, invalidOpcodeCount: 0, selectors: [{ selector: evil, name: evil, offset: 1 }], hazards: { [evil]: { count: 1, offsets: [1] } }, addresses: [evil], eventTopics: [{ topic: evil, name: evil, offset: 1 }], minimalProxy: { implementation: evil }, metadata: { solc: evil, ipfs: evil }, strings: [evil], warnings: [evil], truncated: false, redactedCount: 0, screened: true }],
+ ['dt-re-js', { success: true, filesScanned: 1, isElectron: true, modules: [{ file: evil, imports: [{ source: evil }], exports: [], electronBoundaries: [{ kind: evil }] }], truncated: false, screened: true }],
+ ['dt-re-find', { success: true, matches: [{ file: evil, lineRange: { start: 1, end: 2 }, snippet: evil, score: evil, redacted: false }], filesScanned: 1, truncated: false, screened: true }],
+ ['dt-re-asar', { success: true, truncated: false, unpackedPath: evil, fileCount: 1, totalBytes: 1 }],
+ ['dt-re-bin', { success: false, error: evil }],
+ ]
+
+ for (const [id, answer] of answers) {
+ const lines = devLines(id, wrapped(answer))
+
+ expect(lines.length, id).toBeGreaterThan(0)
+ // eslint-disable-next-line no-control-regex
+ for (const line of lines) expect(line, `${id}: ${JSON.stringify(line)}`).not.toMatch(/[\u0000-\u001f\u007f\u202a-\u202e]/)
+ }
+ })
+
+ it('a huge answer is cut to the panel, and a number that is not a measurement reads n/a', () => {
+ const many = Array.from({ length: 5000 }, (_, i) => `sym${i}`)
+ const lines = devLines('dt-re-bin', wrapped({ success: true, format: 'elf', arch: 'x', bits: 1e300, endianness: 'little', kind: 'k', entryPoint: 1e300, sections: [], libraries: many, imports: many, exports: many, warnings: many, truncated: false, redactedCount: 0, screened: true }))
+
+ expect(lines.length).toBeLessThanOrEqual(RE_MAX_LINES)
+ expect(lines.join('\n')).toContain('n/a-bit')
+ expect(lines.join('\n')).toContain('entry n/a')
+ expect(lines.every(line => line.length < 400)).toBe(true)
+ })
+})
+
+type El = { props: Record<string, unknown> }
+const kit = { Box: (props: Record<string, unknown>): El => ({ props }), Text: (props: Record<string, unknown>): El => ({ props }), Button: (props: Record<string, unknown>): El => ({ props }), Input: (props: Record<string, unknown>): El => ({ props }) }
+const flat = (el: unknown): El[] => {
+ const node = el as El
+
+ if (typeof node !== 'object' || node === null) return []
+
+ const kids = node.props.children
+
+ return [node, ...(Array.isArray(kids) ? kids.flatMap(flat) : typeof kids === 'object' ? flat(kids) : [])]
+}
+const words = (nodes: El[]): string => nodes.map(node => String(node.props.children ?? node.props.label ?? node.props.title ?? '')).join('\n')
+const ctxOf = (state: ReturnType<typeof newState>, columns = 110) => ({ kit, state, nowMs: Date.now(), columns, pictures: new Map(), act: new Proxy({}, { get: () => () => undefined }) as never, cards: true }) as unknown as Ctx
+
+describe('the page', () => {
+ it('has both sections with their fields and all six rows, and says what it will and will not do', () => {
+ const state = newState({})
+
+ state.view = 'rure'
+
+ const nodes = flat(rureView(ctxOf(state)))
+ const text = words(nodes)
+ const keys = nodes.map(node => String(node.props.key ?? ''))
+
+ expect(text).toMatch(/the tools only parse it/)
+ expect(text).toMatch(/unpacking an \.asar writes files, so it asks first/)
+ expect(text).toMatch(/only files inside this project can be named; results are untrusted text/)
+ for (const group of RURE_GROUPS) expect(text).toContain(group.title)
+ expect(keys).toContain('dt-field-rure-app-sample')
+ expect(keys).toContain('dt-field-rure-app-query')
+ expect(keys).toContain('dt-field-rure-native-sample')
+ for (const item of RURE) expect(keys, item.id).toContain(`dt-${item.id.slice(3)}`)
+ expect(text).toMatch(/\/ruflo run dt-re-bin/)
+ })
+
+ it('is not drawn on the Dev Tools page, which still draws its own groups', () => {
+ const state = newState({})
+
+ state.view = 'devtools'
+
+ const keys = flat(devtoolsView(ctxOf(state))).map(node => String(node.props.key ?? ''))
+
+ expect(keys.some(key => key.startsWith('dt-re-') || key.includes('rure'))).toBe(false)
+ expect(keys.some(key => key.startsWith('dt-diff') || key === 'dt-brain')).toBe(true)
+ })
+
+ it('is a TOOLS page with no hotkey, on the menu, with a guide that points at pages that exist', () => {
+ const view = VIEWS.find(candidate => candidate.id === 'rure')
+
+ expect(view?.key).toBe('')
+ expect(groupOf('rure')).toBe('TOOLS')
+ expect(NAV_GROUPS.find(group => group.title === 'TOOLS')?.rows.flat()).toContain('rure')
+ expect(GROUPS.find(group => group.title === 'TOOLS')?.sections.flatMap(section => section.items).some(item => item.go === 'rure')).toBe(true)
+
+ const topic = topicById('rure')!
+
+ expect(VIEW_TOPIC.rure).toBe('rure')
+ expect(topic.related).toContain('devtools')
+
+ const known = new Set<string>(VIEWS.map(candidate => candidate.id))
+
+ for (const step of topic.steps) if (step.go !== undefined && 'view' in step.go) expect(known.has(step.go.view)).toBe(true)
+
+ expect(topic.steps.map(step => step.text).join(' ')).toMatch(/UNPACK \.ASAR asks first/)
+ expect(topic.tips?.join(' ')).toMatch(/inside the project/)
+ })
+})
+
+describe('headless and Enter', () => {
+ it('every ruRE row is a palette id; its text fills the sample (find: the feature) before it builds the argv', () => {
+ const state = newState({})
+ const palette = devPalette(state).filter(item => item.id.startsWith('dt-re-'))
+
+ expect(palette.map(item => item.id).sort()).toEqual(RURE.map(item => item.id).sort())
+
+ const bin = palette.find(item => item.id === 'dt-re-bin')!
+ const find = palette.find(item => item.id === 'dt-re-find')!
+
+ expect(bin.run.kind).toBe('text')
+ if (bin.run.kind === 'text') {
+ expect(bin.run.make('bin/tool')?.args[3]).toBe('rure_analyze_binary')
+ expect(state.devtools.fields.sample).toBe('bin/tool')
+ }
+
+ // The sample is kept, so find needs only the feature text.
+ if (find.run.kind === 'text') {
+ expect(find.run.make('license check')?.args[3]).toBe('rure_find_feature')
+ expect(JSON.parse(find.run.make('license check')?.args[5] ?? '{}')).toEqual({ path: 'bin/tool', query: 'license check' })
+ }
+
+ // A path outside the project builds nothing and says the rule.
+ if (bin.run.kind === 'text') {
+ expect(bin.run.make('/etc/passwd')).toBeNull()
+ expect(bin.run.why('/etc/passwd')).toMatch(/^sample field: a file or folder under the project/)
+ }
+ })
+
+ it('Enter in a ruRE field runs that page’s row; the same query field elsewhere still runs the plugin search', () => {
+ const state = newState({})
+ const ran: string[] = []
+ const host = { invalidate: () => undefined } as unknown as Host
+ const actions = devtoolsActions(state, host, id => (ran.push(id), true), vi.fn())
+
+ actions.submit('sample', 'src', 'rure-app')
+ actions.submit('query', 'license', 'rure-app')
+ actions.submit('sample', 'bin/tool', 'rure-native')
+ actions.submit('query', 'neural', 'plugins')
+ actions.submit('query', 'neural')
+ expect(ran).toEqual(['dt-re-js', 'dt-re-find', 'dt-re-bin', 'dt-plug-search', 'dt-plug-search'])
+ })
+
+ it('Enter in the sample with a path outside the project refuses with the rule and runs nothing', () => {
+ const state = newState({})
+ const ran: string[] = []
+ const refused: string[] = []
+ const actions = devtoolsActions(state, { invalidate: () => undefined } as unknown as Host, id => (ran.push(id), true), why => refused.push(why))
+
+ actions.submit('sample', '/etc/passwd', 'rure-native')
+ expect(ran).toEqual([])
+ expect(refused[0]).toMatch(/^sample field: a file or folder under the project/)
+ })
+})
diff --git a/plugins/ruflo-console/tui/parity.ts b/plugins/ruflo-console/tui/parity.ts
index 82e38aefb1..885f5faeb7 100644
--- a/plugins/ruflo-console/tui/parity.ts
+++ b/plugins/ruflo-console/tui/parity.ts
@@ -44,6 +44,7 @@ export const PARITY: Record<ViewId | 'agent', Parity> = {
sandbox: { status: 'partial', why: READ_ONLY },
market: { status: 'partial', why: READ_ONLY },
adrs: { status: 'partial', why: READ_ONLY },
+ rure: { status: 'partial', why: READ_ONLY },
whatsnew: { status: 'same', why: 'changelogs of the installed plugins' },
themes: { status: 'partial', why: 'the look is chosen with t or --look; the colour picker and generated themes are not here yet' },
settings: { status: 'partial', why: 'shown as the standalone defaults; plugin options live in the Claude Code settings and the standalone has no store for them yet (the look is --look/t, the speed --fps)' },
diff --git a/plugins/ruflo-rure/.claude-plugin/plugin.json b/plugins/ruflo-rure/.claude-plugin/plugin.json
index 32ab29deec..eba1be81df 100644
--- a/plugins/ruflo-rure/.claude-plugin/plugin.json
+++ b/plugins/ruflo-rure/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "ruflo-rure",
"description": "Statically analyze a local JS/Electron app you're authorized to study, with file+line evidence, and build an original reimplementation of what you find. Experimental. Phase 1: JS/Electron static analysis. Phase 2: native ELF/PE/Mach-O container inspection. Phase 3: .NET assembly metadata. Phase 4: EVM bytecode inventory. Parses, never executes. Dynamic analysis is a future phase, not yet implemented.",
- "version": "0.4.1",
+ "version": "0.4.2",
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
diff --git a/plugins/ruflo-rure/CHANGELOG.md b/plugins/ruflo-rure/CHANGELOG.md
index 658725322b..f3a7136536 100644
--- a/plugins/ruflo-rure/CHANGELOG.md
+++ b/plugins/ruflo-rure/CHANGELOG.md
@@ -2,6 +2,10 @@
Newest first. One `## <version> — <date>` heading per version, then `feat:`, `fix:`, `breaking:` and `chore:` bullets. Built from git history; see `git log -- plugins/ruflo-rure` for the full record.
+## 0.4.2 — 2026-10-23
+
+- docs: the six tools now have a page in the ruflo console (TOOLS → ruRE, ruflo-console 0.45.0, ruflo ADR-494), so a person can run them without asking Claude. The console accepts only project-relative paths and shows the file's own text cleaned of terminal escapes. No tool, schema or behavior changed.
+
## 0.4.1 — 2026-10-22
Fixes from an independent security review of 0.1.0-0.4.0. Each finding was reproduced against the real source before fixing, and each fix has a test that fails without it.
diff --git a/plugins/ruflo-rure/skills/analyze-app/SKILL.md b/plugins/ruflo-rure/skills/analyze-app/SKILL.md
index 9860dd0a51..a6e0369118 100644
--- a/plugins/ruflo-rure/skills/analyze-app/SKILL.md
+++ b/plugins/ruflo-rure/skills/analyze-app/SKILL.md
@@ -19,3 +19,4 @@ Uses the ruRE tools (server `ruflo-rure`): `rure_extract_asar`, `rure_analyze_js
7. For a native ELF/PE/Mach-O file (for example a `.node` addon or helper executable bundled with the app), call `rure_analyze_binary` for its format, architecture, sections, linked libraries and imported/exported symbols. It inspects the container only: it does not disassemble, and it never runs the file. A non-empty `warnings` array means part of the file was malformed or out of range; report that rather than filling the gap.
8. For a managed .NET assembly (`.dll`/`.exe` with a CLR header), call `rure_analyze_dotnet` for its assembly references, types, P/Invoke native imports and string literals. It reads metadata only: no IL disassembly, nothing is loaded or run. `isManaged: false` means the file is native; use `rure_analyze_binary` instead.
9. For EVM contract bytecode (inline hex or a file), call `rure_analyze_evm` for the exposed selectors, hazardous opcodes, embedded addresses and topics, proxy status and revert strings. Report hazardous opcodes as inventory, not as vulnerabilities, and say when selector names are missing because the selector is not in the small built-in table. It cannot tell you whether anything is exploitable.
+10. A person can run the same six tools themselves on the ruflo console's ruRE page (TOOLS → ruRE): the page takes only a path inside the project, and each row is also `/ruflo run dt-re-bin <path>` (and `dt-re-js`, `dt-re-find`, `dt-re-net`, `dt-re-evm`, `dt-re-asar`). When you suggest it, say that unpacking an `.asar` asks first and writes outside the project.
diff --git a/v3/docs/adr/ADR-489-ruflo-tui-standalone-console.md b/v3/docs/adr/ADR-489-ruflo-tui-standalone-console.md
index 32e13d758a..d7b04e78a8 100644
--- a/v3/docs/adr/ADR-489-ruflo-tui-standalone-console.md
+++ b/v3/docs/adr/ADR-489-ruflo-tui-standalone-console.md
@@ -204,6 +204,7 @@ not a replacement and not a second implementation.
| `sandbox` | Sandbox | partial | its buttons are not drawn; its actions are asked for by name at the go prompt (:), each after the console card |
| `market` | Plugin Catalog | partial | its buttons are not drawn; its actions are asked for by name at the go prompt (:), each after the console card |
| `adrs` | ADRs | partial | its buttons are not drawn; its actions are asked for by name at the go prompt (:), each after the console card |
+| `rure` | ruRE | partial | its buttons are not drawn; its actions are asked for by name at the go prompt (:), each after the console card |
| `whatsnew` | What’s new | same | changelogs of the installed plugins |
| `themes` | Theme Studio | partial | the look is chosen with t or --look; the colour picker and generated themes are not here yet |
| `settings` | Settings | partial | shown as the standalone defaults; plugin options live in the Claude Code settings and the standalone has no store for them yet (the look is --look/t, the speed --fps) |
diff --git a/v3/docs/adr/ADR-494-ruflo-console-rure-page.md b/v3/docs/adr/ADR-494-ruflo-console-rure-page.md
new file mode 100644
index 0000000000..fc5950062f
--- /dev/null
+++ b/v3/docs/adr/ADR-494-ruflo-console-rure-page.md
@@ -0,0 +1,95 @@
+# ADR 494: ruRE in the ruflo console: a TOOLS page for static reverse engineering
+
+Status: Accepted (built and tested against the real CLI; not yet released: the `rure_*` tools are in `main` after 3.59.17)
+
+Date: 2026-10-23
+
+Builds on: ADR-442 (the Sandbox page: a page whose rows are Dev Tools entries), ADR-480 (the ADRs page: a TOOLS page and its wiring), ADR-489 (`ruflo tui` parity table).
+Related: ruflo-rure ADR-0001 (scope and dual-use policy), ADR-0002..0005 (the six tools), ADR-407 (the cockpit).
+Number note: 492 and 493 are claimed by open drafts (#4253, #4264); this ADR takes 494.
+
+## 1. Context
+
+ruflo-rure (plugin 0.4.1) gives agents six read-only static-analysis tools: `rure_extract_asar`, `rure_analyze_js_app`,
+`rure_find_feature`, `rure_analyze_binary` (ELF, PE, Mach-O), `rure_analyze_dotnet` and `rure_analyze_evm`. A person using `/ruflo` could
+not reach any of them: the console only filed the plugin under Devtools in `hooks/plugin-map.ts`. Claude could call them as MCP tools,
+the person could not look at the result without asking Claude.
+
+The console already has the machinery for this. The Sandbox page (ADR-442) is a page of its own whose rows are Dev Tools entries: they
+share the confirm gate, the palette ids (`/ruflo run dt-...`, so Claude reaches them through `console_run`), the self-check and the
+result panel. The ADRs page (ADR-480) is the model for registering a TOOLS page.
+
+## 2. Decision
+
+Add a **ruRE** page to the TOOLS group, built the way the Sandbox page is.
+
+- **Rows.** Six entries joined to the Dev Tools catalog (`DEV`), ids `dt-re-asar`, `dt-re-js`, `dt-re-find`, `dt-re-bin`, `dt-re-net`,
+ `dt-re-evm`, each one `ruflo mcp exec -t rure_* -p {...}` with fixed argv. Two sections: JavaScript and Electron apps, and native
+ binaries, .NET and EVM. The page draws them; Dev Tools does not (like the Sandbox groups).
+- **Cost classes.** The five analysis rows are local `$0` reads and run at once. UNPACK .ASAR writes files to a new temp folder outside
+ the project, so it is a `write`: it asks first and its note says where the files go.
+- **The sample is a path inside the project.** A new `sample` field takes the same rule as the existing `path` field: relative, a plain
+ character set, no `..` segment, no empty segment, at most 160 characters. An absolute path, a flag-like name, a control character or
+ anything outside the project builds no argv. FIND FEATURE also takes the existing `query` field (the feature, in words).
+- **Enter** in a ruRE field runs that page's row (APP MAP, FIND FEATURE, NATIVE BINARY) and not the row the same field runs elsewhere
+ (`query` still runs the plugin search on its own page). This is a per-group submit table in `devtools.ts`.
+- **Readers.** `hooks/data/rure.ts` turns each tool's answer into lines: format, entry, libraries, imports, exports, sections and
+ strings for a native file; identity, references, types, P/Invoke and literals for .NET; selectors, hazards, events, proxy and compiler
+ for EVM; boundaries and imports for a JS app; matches with their first line for a feature search; the unpack path for an .asar. The
+ parser's own warnings, a cut walk and anything AIDefence held back or could not screen come first.
+- **A CLI without the tools** says so: `mcp exec` answers "Tool not found", and the page prints `update ruflo` instead of the generic
+ failure (the tools are in `main` after 3.59.17).
+- **Terminal host.** `ruflo tui` lists the page as `partial` and read-only, like every page with actions (`tui/parity.ts`, ADR-489's table).
+- **No new MCP tool, no new CLI command, no change to the six tools.** The page is a surface over what exists.
+
+## 3. What the page treats as hostile, and how
+
+Every value in an answer is the analyzed file's own text (section names, imports, type names, strings, a matched line).
+
+1. **Terminal escapes.** The tools return such text intact (a section name holding `ESC[31m` and an OSC 52 clipboard sequence comes back
+ JSON-escaped, and parsing the JSON makes the characters real). Every string passes `plain()` before it is a line: no escape, control,
+ hidden or bidi-override character reaches the terminal. Numbers are shown only when they are plain measurements: a hostile `1e300` reads
+ `n/a`, it is not clamped into a plausible count (#3822). The panel shows at most 40 lines.
+2. **Reading outside the project.** The tools accept any path the process can read (a known gap, ruflo-rure changelog). The page does not
+ widen it: the `sample` field refuses what is not a project-relative path, and Claude reaches the rows only through the same field.
+3. **A row run by Claude.** `/ruflo run dt-re-bin <path>` goes through the same field rule and the same confirm gate; a read of an
+ in-project file needs no confirm, as with every Dev Tools read; the unpack asks.
+4. **The files are never run.** The tools parse. Dynamic analysis (attaching to or instrumenting a process) is out of scope and needs its
+ own consent-and-sandbox ADR first (ruflo-rure ADR-0001).
+
+## 4. Limits, stated plainly
+
+- The path rule is **syntactic**. It stops an absolute path and `..`. A symlink inside the project that points outside is followed by
+ the tool's open of the top-level file; the page does not resolve links. (Directory walks inside the tools skip symlinks.) Keep samples
+ you do not trust in a folder of their own.
+- The unpacked folder of an .asar is **outside the project**, so the page cannot read it: it says so and tells the person to copy it
+ under the project. The tool does not clean that temp folder up; the page does not either.
+- Only files inside the project can be analyzed from the page. A binary installed elsewhere has to be copied in (or analyzed by Claude
+ through the MCP tools directly).
+- EVM and P/Invoke handling in the tools were validated on built fixtures and not on compiled-from-source contracts or real P/Invoke
+ assemblies (ruflo-rure changelog). A hazardous opcode is an inventory fact, not a finding.
+- The standalone terminal host shows the page read-only; its actions are asked for by name.
+
+## 5. Consequences
+
+The console gets a real surface for ruRE with no new trust: the same field rules, confirm gate and result panel as Dev Tools. The cost is
+one more page (33 areas in the boot log, a keyless TOOLS page) and a `sample` field in the shared field set.
+
+## 6. Verification
+
+- `tests/rure-page.spec.ts`: the catalog against the tools' real input schemas; what `sample` refuses; each reader against the
+ **real captured CLI output** in `tests/fixtures/rure/` (ELF, PE, Mach-O, .NET, two EVM contracts, a JS app, a feature search, an
+ unpacked and a failed .asar); a hostile answer in every reader; the page, its guide, its nav and menu entries; palette ids and Enter
+ routing.
+- `tests/rure-e2e.spec.ts`: builds real files (the ruflo-rure fixture builders, an .asar made with `@electron/asar`) in a temp project and
+ runs every row's exact argv through the **built CLI**, then reads the output with the console's reader. It includes a binary whose
+ section name carries terminal escapes, a missing file, a path outside the project (no argv), and a CLI without the tools. It skips with
+ a message when the CLI is not built. With `plain()` removed from the reader, both the unit and the e2e hostile tests fail.
+- `tests/devtools.spec.ts` gained the six tools' schemas, so the catalog invariants (a `mcp exec` call names a real tool and only declared
+ parameters; reads run at once, everything else asks and says what it does) cover the new rows.
+
+## 7. Not decided here
+
+A "detect the type for me" row that picks the tool from the file's first bytes; an allowlist of folders outside the project; resolving
+symlinks before a sample is accepted; showing the page in the terminal host with its buttons; calling the tools with inline EVM hex from
+a field. Each is a change to the rule in section 3 and needs its own decision.
diff --git a/v3/docs/adr/INDEX-mod-system.md b/v3/docs/adr/INDEX-mod-system.md
index 8d23b073f1..f740c99881 100644
--- a/v3/docs/adr/INDEX-mod-system.md
+++ b/v3/docs/adr/INDEX-mod-system.md
@@ -19,6 +19,7 @@ Two files carry the number 430 (the menu's accents, and the menu-design amendmen
| 452 | Mod-system overnight hardening: findings, changes, open items | Accepted (record) | 10-05 | 404, 444, 445, 446, 450, 451 | — | #3735; records #3706, #3711, #3713, #3714, #3715, #3717, #3719, #3727, #3732, #3733, #3734 (all merged) | no code of its own | `probe-mod-guards`, `sync-mod-screen --check` |
| 453 | Project Anatole: an optional, learning watchdog for unattended agents | Proposed | 10-05 | 404, 444, 445, 446, 450, 451, 452; related 449 | — | this PR (ADR only) | not built | — |
| 491 | ruflo-mods across Claude Code and Codex: a host-neutral core and a thin Codex adapter | Proposed | 10-11 | 404, 406, 444, 447, 451, 488, 490; related 489 | — | this PR (ADR only) | not built; evidence table measured by ADR-490's loop | `scripts/e2e/leg-codex.mjs` policy probes |
+| 494 | ruRE in the ruflo console: a TOOLS page for static reverse engineering | Accepted | 10-23 | 442, 480; related 489 | — | this PR | ruflo-console 0.45.0 (the `rure_*` tools are in `main` after 3.59.17) | `tests/rure-page.spec.ts`, `tests/rure-e2e.spec.ts` (real CLI) |
## Console: mission control and Claude control