🌊 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
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
Merge branch 'feat/console-vector' into feat/console-starts
ruv3e2b2def5143
diff --cc plugins/ruflo-console/hooks/bindings.tsindex b99c9f2b62,65fd753a41..14ec70ccc4--- a/plugins/ruflo-console/hooks/bindings.ts+++ b/plugins/ruflo-console/hooks/bindings.ts@@@ -12,8 -10,8 +12,9 @@@ import { memoryActions } from './memoryimport { filterPalette, paletteEntries } from './palette'import type { Runner } from './runner'import { skillActions } from './skills'+import { moreSkillActions } from './skills-lab'import { PANE_ID, viewOf, type State } from './state'+ import { vectorActions } from './vector'import type { Actions } from './views/common'import { openTasks, selection } from './views/select'@@@ -256,8 -250,9 +257,10 @@@ export function actionsOf(state: State},},// ▸ edit hands the skill to the AI terminal, as x.ruv.io's ▸ open does: typed, not run.- skills: skillActions(state, host, runner, text => actions.term.load('claude', text)),+ skills: { ...skillActions(state, host, runner, text => actions.term.load('claude', text)), ...moreSkillActions(state, host, runner, text => actions.term.load('claude', text)) },+ memory: memoryActions(state, runner, host.invalidate),+ // An rvlite query is MCP-only: it goes to the AI terminal typed, as ▸ edit does, and runs only when sent.+ vector: vectorActions(state, runner, text => actions.term.load('claude', text)),}return actionsdiff --cc plugins/ruflo-console/hooks/palette.tsindex 05e4d94b15,97b6e57c77..48a10f5eb4--- a/plugins/ruflo-console/hooks/palette.ts+++ b/plugins/ruflo-console/hooks/palette.ts@@@ -4,20 -4,12 +4,21 @@@* argument from the query after their keyword: `route fix the login bug`.*/import { HIVE_ROLES, pickedProposal } from './data/hive'+import { START_IDS, START_LABEL, startSpec } from './starts'+import { BUDGET_PRESETS, budgetWhy, inspectModels, setBudget } from './cost'import { hiveBroadcast, hivePropose, hiveSpawn, hiveVote } from './hive'import { claimTask, handoffClaim, releaseClaim, stealClaim, type ActionSpec } from './actions'+import { MEM_KEYWORDS, MEM_LAB, memSpecOf, memWhy } from './memory-lab'import { LAB, labSpec, labWhy } from './mh-lab'+import { PERF } from './perf'+import { SECURE, SECURE_KEYWORDS, SECURE_TEXT, secSpec, secTextSpec } from './secure'+import { skillPaletteEntries } from './skills-lab'+import { automateEntries } from './automate'+import { neuralEntries } from './neural'import { AGENT_TYPES, agentLogs, dispatchWorker, memorySearch, memoryStore, reroute, setClaimStatus, spawnAgent, stopAgent, swarmInit, swarmStop, vote, WORKERS } from './ops'import { VIEWS, type State, type ViewId } from './state'+import { XRUV } from './xruv'+ import { VEC, vecSpec, vecWhy } from './vector'import { selection } from './views/select'export type PaletteRun =@@@ -134,30 -117,12 +135,36 @@@ export function paletteEntries(state: S// The MetaHarness lab: reads run at once, the rest ask first; promotion is never an entry (see mh-lab.ts).for (const entry of LAB) add(entry.id, 'metaharness', entry.label, { kind: 'spec', spec: labSpec(entry, state), why: labWhy(entry) })+ // The x.ruv.io board: reads run at once (the ask is the consent), writes ask first, admin rows need the token.+ for (const entry of XRUV) {+ // An admin row without the token is a spec with its reason, so `/ruflo run x-admit …` says why instead of "type …".+ if (entry.takes !== undefined && (entry.kind !== 'admin' || state.xruv.hasAdminToken === true)) add(entry.id, 'x.ruv.io', `${entry.id.slice(2)} <${entry.takes}>: ${entry.label}`, { kind: 'text', keyword: entry.id, make: text => entry.spec(state, text) })+ else add(entry.id, 'x.ruv.io', entry.label, { kind: 'spec', spec: entry.spec(state, ''), why: entry.why(state, '') })+ }++ // The Memory Lab: an entry that takes text reads it after its id (`mem-search jwt refresh`), the rest run as they are.+ for (const entry of MEM_LAB) {+ add(entry.id, 'memory', entry.label, entry.takes === undefined ? { kind: 'spec', spec: memSpecOf(entry, '', state), why: memWhy(entry) } : { kind: 'text', keyword: entry.id, make: text => memSpecOf(entry, text, state) })+ }++ // Security & Doctor and Performance: reads run at once, the rest ask with their cost on the confirm row (secure.ts, perf.ts).+ for (const entry of [...SECURE, ...PERF]) add(entry.id, entry.id.startsWith('perf') ? 'performance' : 'security', entry.label, { kind: 'spec', spec: secSpec(entry, entry.args, state), why: '' })+ for (const entry of SECURE_TEXT) add(entry.id, 'security', entry.label, { kind: 'text', keyword: entry.id, make: text => secTextSpec(entry, text, state) })+ // The skills view's search, update-all, restore and sync, so /ruflo run skills-update works headless.+ out.push(...skillPaletteEntries(state))+++ // Automation and the Learning Lab: reads run at once, the rest ask first; per-row verbs come from the lists last read.+ for (const entry of [...automateEntries(state), ...neuralEntries(state)]) {+ add(entry.id, entry.group, entry.label, entry.make !== undefined ? { kind: 'text', keyword: entry.id, make: entry.make } : { kind: 'spec', spec: entry.spec ?? null, why: entry.why ?? '' })+ }++ // The Vector Lab: a typed entry's id is its keyword (`/ruflo run vec-brain-search hnsw`); n/a ones say why.+ for (const entry of VEC) {+ if (entry.field !== undefined && entry.na === undefined) add(entry.id, 'vector', `${entry.label} <${entry.rule ?? 'text'}>`, { kind: 'text', keyword: entry.id, make: text => vecSpec(entry, state, text) })+ else add(entry.id, 'vector', entry.label, { kind: 'spec', spec: vecSpec(entry, state), why: vecWhy(entry, state) })+ }+for (const worker of WORKERS) add(`worker-${worker}`, 'workers', `dispatch the ${worker} background worker`, { kind: 'spec', spec: dispatchWorker(worker), why: 'unknown worker' })add('route', 'learning', 'route <task words>: ask the router for a pick', { kind: 'text', keyword: 'route', make: reroute })diff --cc plugins/ruflo-console/hooks/state.tsindex d2b9603ed1,ecbda23722..3db95f7191--- a/plugins/ruflo-console/hooks/state.ts+++ b/plugins/ruflo-console/hooks/state.ts@@@ -5,14 -4,14 +5,15 @@@ import type { ProbeResult } from './datimport type { ConsoleEvent } from './data/events'import type { ReadCache } from './data/files'import { emptySkills, type SkillsState } from './data/skills'+import { emptyMemoryLab, type MemoryLabState } from './memory-lab'+ import { emptyVector, type VectorState } from './data/vector'import type { Snapshot } from './data/snapshot'import type { RufloRoute, RufloSnapshot } from '../types'export const PLUGIN_NAME = 'ruflo-console'export const PANE_ID = 'ruflo-console'- export type ViewId = 'menu' | 'overview' | 'swarm' | 'hive' | 'claims' | 'federation' | 'plugins' | 'learning' | 'metaharness' | 'memory' | 'cost' | 'timeline' | 'approvals' | 'events' | 'missions' | 'xruv' | 'terminal' | 'skills' | 'agent' | 'secure' | 'perf' | 'automate' | 'neural'-export type ViewId = 'menu' | 'overview' | 'swarm' | 'hive' | 'claims' | 'federation' | 'plugins' | 'learning' | 'metaharness' | 'memory' | 'cost' | 'timeline' | 'approvals' | 'events' | 'missions' | 'xruv' | 'terminal' | 'skills' | 'vector' | 'agent'++export type ViewId = 'menu' | 'overview' | 'swarm' | 'hive' | 'claims' | 'federation' | 'plugins' | 'learning' | 'metaharness' | 'memory' | 'cost' | 'timeline' | 'approvals' | 'events' | 'missions' | 'xruv' | 'terminal' | 'skills' | 'agent' | 'secure' | 'perf' | 'automate' | 'neural' | 'vector'/*** The views in tab order, each with its hotkey and the inline height it asks for. Digits are the first nine; the three@@@ -40,15 -39,12 +41,17 @@@ export const VIEWS: readonly { id: View{ id: 'approvals', key: 'q', label: 'Approvals', short: 'Apv', icon: '✅', blurb: 'decisions waiting for a person: votes, stealable claims, refused mods, budget', rows: 24 },{ id: 'events', key: 'e', label: 'Events', short: 'Evt', icon: '📡', blurb: 'every swarm, claim, memory and mod event as it happens (f filters them)', rows: 26 },{ id: 'missions', key: 'm', label: 'Missions', short: 'Msn', icon: '🎯', blurb: 'ADR-406 missions: the plan, task dependencies, acceptance and budget (observe only)', rows: 26 },- { id: 'xruv', key: 'w', label: 'x.ruv.io', short: 'XRV', icon: '🛸', blurb: 'the open agent federation: what it offers, how to join, its channels and who is on', rows: 34 },+ { id: 'xruv', key: 'w', label: 'x.ruv.io', short: 'XRV', icon: '🛸', blurb: 'the open agent federation: what it offers, how to join, its channels and who is on', rows: 50 },{ id: 'terminal', key: 'i', label: 'Terminal', short: 'Trm', icon: '💻', blurb: 'an AI terminal: codex, claude or both, each a session that remembers the conversation, streamed live', rows: 32 },// No hotkey: every digit and letter is taken. The tab, the menu prompt and /ruflo skills reach it by name.- { id: 'skills', key: '', label: 'Skills', short: 'Skl', icon: '🧰', blurb: 'agent skills (npx skills, skills.sh): what is installed here and globally, search, add, update, remove, create', rows: 34 },+{ id: 'skills', key: '', label: 'Skills', short: 'Skl', icon: '🧰', blurb: 'agent skills (npx skills, skills.sh): installed, search, use without installing, preview, add to chosen agents, update, create', rows: 60 },+ // No hotkeys either: reached by the tab, the menu prompt (secure, perf) or /ruflo secure.+ { id: 'secure', key: '', label: 'Security & Doctor', short: 'Sec', icon: '🔒',blurb: 'security scans, a paste field that checks text for injection and PII, policy, and every doctor check', rows: 40 },+ { id: 'perf', key: '', label: 'Performance', short: 'Prf', icon: '📈', blurb: 'metrics, profile, benchmarks, bottlenecks and a latency sparkline from each run', rows: 30 },+ { id: 'automate', key: '', label: 'Automation', short: 'Aut', icon: '🤖', blurb: 'workflows, the twelve background workers and their daemon, autopilot, sessions, config and a task kanban', rows: 44 },+ { id: 'neural', key: '', label: 'Learning Lab', short: 'Lab', icon: '🧪', blurb: 'train neural patterns and watch the loss, ask the router which agent fits a task, and why', rows: 36 },+ // No hotkey either: reached from the tab, the menu prompt (vector) or /ruflo vector.+ { id: 'vector', key: '', label: 'Vector Lab', short: 'Vec', icon: '🧲', blurb: 'ruvector: the shared brain, RVF stores, rvlite queries, decompile, workers, edge, hooks intel and your pi identity', rows: 44 },]export const AGENT_VIEW = { id: 'agent' as const, rows: 28 }@@@ -233,10 -220,8 +236,12 @@@ export type State =}/** The skills view: installed skills, the last search, and the change running now. */skills: SkillsState+ /** The Memory Lab's fields and picks (its last run is `lab.result`, under a mem- id). */+ memoryLab: MemoryLabState+ /** The Automation and Learning Lab views: the lists a click asked for, and this session's training runs. */+ auto: AutoState+ /** The Vector Lab's fields; its runs land in `lab` under vec- ids. */+ vector: VectorStatetimers: Map<string, Timer>stats: { renders: number[]; refreshes: number[]; frames: number[] }}@@@ -278,13 -262,11 +283,14 @@@ export function newState(raw: PluginOptoutcome: null,isActing: false,lab: { result: null, running: null },+ xruv: { result: null, running: null, pubkey: null, hasAdminToken: null },isRefreshing: false,barDrawnAtMs: 0,- terminal: { harness: 'codex', draft: '', lines: [], runs: new Map(), sessions: {}, isLive: { codex: false, claude: false }, turns: { codex: 0, claude: 0 }, costUsd: 0, scroll: 0, unseen: 0, asked: null },+ terminal: { harness: 'codex', draft: '', lines: [], runs: new Map(), sessions: {}, isLive: { codex: false, claude: false }, turns: { codex: 0, claude: 0 }, costUsd: 0, costReports: 0, scroll: 0, unseen: 0, asked: null },skills: emptySkills(),+ memoryLab: emptyMemoryLab(),+ auto: emptyAuto(),+ vector: emptyVector(),timers: new Map(),stats: { renders: [], refreshes: [], frames: [] },}diff --cc plugins/ruflo-console/hooks/views/common.tsindex 9929a5e5f0,fc6d2afdc8..a17aed7d2b--- a/plugins/ruflo-console/hooks/views/common.ts+++ b/plugins/ruflo-console/hooks/views/common.ts@@@ -7,11 -7,9 +7,12 @@@ import type { Elements, RenderChildrenimport type { ProbeResult } from '../data/cli'import type { Grid } from '../gfx/raster'+import type { MemoryActions } from '../memory-lab'import type { SkillActions } from '../skills'+import { START_LABEL, type StartId } from '../starts'+import type { MoreSkillActions } from '../skills-lab'import type { HarnessId, State, ViewId } from '../state'+ import type { VectorActions } from '../vector'export type Kit = Pick<Elements['terminal'], 'Box' | 'Text' | 'Button'> & { Raster?: Elements['terminal']['Raster']; Input?: Elements['terminal']['Input'] }@@@ -49,9 -44,9 +50,11 @@@ export type Actions =menu: (text: string) => voidterm: { harness: (id: HarnessId) => void; draft: (text: string) => void; submit: (text: string) => void; stop: () => void; fresh: () => void; clear: () => void; load: (id: HarnessId, text: string) => void; /** Moves the window up (positive) or down by screen rows. */ scroll: (by: number) => void; /** Puts an earlier question back in the field. */ reuse: (text: string) => void }/** The skills view: list, search, and the confirm-gated add, remove, update and create; edit loads the terminal. */- skills: SkillActions+ skills: SkillActions & MoreSkillActions+ /** The Memory Lab: its fields, search, browse filter, and an entry's open or delete (each through the runner). */+ memory: MemoryActions+ /** The Vector Lab: its fields, its entries (asked or run through the runner), and rvlite queries handed to the terminal. */+ vector: VectorActions}export type Ctx = {diff --cc plugins/ruflo-console/hooks/views/pane.tsindex 37fe6bc3d5,f225d7ee02..88608967d1--- a/plugins/ruflo-console/hooks/views/pane.ts+++ b/plugins/ruflo-console/hooks/views/pane.ts@@@ -60,10 -54,7 +61,11 @@@ const BODIES: Record<ViewId, (ctx: Ctxxruv: xruvView,terminal: terminalView,skills: skillsView,+ secure: secureView,+ perf: perfView,+ automate: automateView,+ neural: neuralView,+ vector: vectorView,agent: agentView,}diff --cc plugins/ruflo-console/tests/conformance.spec.tsindex 44ad362643,0000000000..09b6af5fddmode 100644,000000..100644--- a/plugins/ruflo-console/tests/conformance.spec.ts+++ b/plugins/ruflo-console/tests/conformance.spec.ts@@@ -1,162 -1,0 +1,191 @@@+/**+ * Every action the console can issue, checked against the real ruflo CLI: the subcommand exists and every `--flag` in+ * the argv is one that subcommand documents (its `--help`), and every `mcp exec -t <tool>` names a real MCP tool. An+ * invented flag or tool fails here, not in a person's pane. It runs the CLI, so it is opt-in:+ * RUFLO_CONFORMANCE=1 npx vitest run plugins/ruflo-console/tests/conformance.spec.ts+ * Entries are collected from the palette (every spec and text entry), the one-click starts and the MetaHarness lab,+ * over a project with a hive-mind, so the entries that need a selection exist.+ */+import { spawnSync } from 'node:child_process'+import { readFileSync, readdirSync } from 'node:fs'+import { describe, expect, it } from 'vitest'++import type { ActionSpec } from '../hooks/actions'+import type { ReadCache } from '../hooks/data/files'+import { readSnapshot } from '../hooks/data/snapshot'+import { LAB, labSpec } from '../hooks/mh-lab'+import { paletteEntries } from '../hooks/palette'+import { START_IDS, startSpec } from '../hooks/starts'+import { newState } from '../hooks/state'+import { HIVE_FILES } from './fixtures/hive'++const CLI = ['npx', '--offline', '-y', '@claude-flow/cli@latest']+const SRC = new URL('../../../v3/@claude-flow/cli/src/', import.meta.url).pathname+const TOOLS_DIR = `${SRC}mcp-tools/`+const PLUGIN_SCRIPTS = new URL('../../ruflo-metaharness/scripts/', import.meta.url).pathname++const memoryFs = (files: Record<string, string>) => ({+ read: async (path: string) => files[path] ?? Promise.reject(new Error('ENOENT')),+ stat: async (path: string) => (files[path] !== undefined ? { mtimeMs: 1, size: (files[path] as string).length } : Promise.reject(new Error('ENOENT'))),+ list: async () => Promise.reject(new Error('ENOENT')),+})++/** Every spec the console can build for a project that has a swarm, claims, a task and a hive with workers. */+async function allSpecs(): Promise<{ id: string; spec: ActionSpec }[]> {+ const files = Object.fromEntries(Object.entries(HIVE_FILES).map(([path, text]) => [`/work/${path}`, text]))+ const state = newState({})++ state.snapshot = await readSnapshot(memoryFs(files), new Map() as ReadCache, '/work', '/home/dev', {}, 0)++ const out: { id: string; spec: ActionSpec }[] = []+ const nowMs = 1_790_000_000_000++ for (const entry of paletteEntries(state, nowMs)) {+ if (entry.run.kind === 'spec' && entry.run.spec !== null) out.push({ id: entry.id, spec: entry.run.spec })+ if (entry.run.kind === 'text') {+ const spec = entry.run.make(`${entry.run.keyword === 'propose' ? 'design: ' : ''}sample text`)++ if (spec !== null) out.push({ id: `${entry.id} <text>`, spec })+ }+ }++ for (const id of START_IDS) {+ const spec = startSpec(id, nowMs)++ if (spec !== null) out.push({ id: `start:${id}`, spec })+ }++ for (const id of ['task', 'mission'] as const) {+ const spec = startSpec(id, nowMs, 'sample text')++ if (spec !== null) out.push({ id: `start:${id}`, spec })+ }++ for (const entry of LAB) {+ const spec = labSpec(entry, state)++ if (spec !== null) out.push({ id: `lab:${entry.id}`, spec })+ }++ return out+}++const helpCache = new Map<string, string>()++/** `ruflo <words…> --help` as text (ANSI stripped), cached; empty when the command does not exist. */+function helpOf(words: readonly string[]): string {+ const key = words.join(' ')++ if (!helpCache.has(key)) {+ const run = spawnSync(CLI[0] as string, [...CLI.slice(1), ...words, '--help'], { encoding: 'utf8', timeout: 90_000 })++ helpCache.set(key, `${run.stdout ?? ''}${run.stderr ?? ''}`.replace(/\u001b\[[0-9;]*m/g, ''))+ }++ return helpCache.get(key) as string+}+++/** `<ruvector CLI> <words…> --help` as text, cached: the Vector Lab's entries run the ruvector CLI, not ruflo's. */++function rvHelpOf(prefix: readonly string[], words: readonly string[]): string {++ const key = `rv ${prefix.join(' ')} ${words.join(' ')}`++++ if (!helpCache.has(key)) {++ const run = spawnSync(prefix[0] as string, [...prefix.slice(1), ...words, '--help'], { encoding: 'utf8', timeout: 90_000 })++++ helpCache.set(key, `${run.stdout ?? ''}${run.stderr ?? ''}`.replace(/\u001b\[[0-9;]*m/g, ''))++ }++++ return helpCache.get(key) as string++}+++/** The command path of an argv: its leading words up to the first flag, at most three. */+function pathOf(args: readonly string[]): string[] {+ const words: string[] = []++ for (const word of args) {+ if (word.startsWith('-') || words.length === 3) break+ words.push(word)+ }++ return words+}++/**+ * Whether a command's source declares `--flag`: in the parser's global options or in the command's own file. Help text+ * is no authority here: a nested subcommand prints its parent's help, and global flags (--format) are not listed in it.+ */+function declares(command: string, flag: string): boolean {+ const name = flag.slice(2)+ // `metaharness` hands its flags to the plugin's scripts (redblue.mjs, bench…), which declare them.+ const scripts = command === 'metaharness' ? readdirSync(PLUGIN_SCRIPTS).map(file => `${PLUGIN_SCRIPTS}${file}`) : []+ const sources = [`${SRC}parser.ts`, `${SRC}commands/${command}.ts`, ...scripts].flatMap(file => {+ try {+ return [readFileSync(file, 'utf8')]+ } catch {+ return []+ }+ })++ return sources.some(text => text.includes(`'${name}'`) || text.includes(`--${name}`))+}++/** Every MCP tool name the CLI registers, read from its source. */+function toolNames(): Set<string> {+ const names = new Set<string>()++ for (const file of readdirSync(TOOLS_DIR).filter(name => name.endsWith('.ts'))) {+ for (const match of readFileSync(`${TOOLS_DIR}${file}`, 'utf8').matchAll(/name:\s*'([a-z0-9_-]+)'/g)) names.add(match[1] as string)+ }++ return names+}++describe.skipIf(process.env.RUFLO_CONFORMANCE !== '1')('console actions vs the real CLI', () => {+ it('every subcommand exists and every long flag in every argv is documented by it', async () => {+ const tools = toolNames()+ const problems: string[] = []++ for (const { id, spec } of await allSpecs()) {+ const args = spec.args as readonly string[]+++ // Another CLI than ruflo's: the ruvector ones are checked against its help; `claude plugin configure` (Cost) is fixed, not a flag set to verify here.++ if (spec.argv !== undefined && !spec.argv.some(word => word.startsWith('ruvector'))) continue++++ if (spec.argv !== undefined) {++ const at = spec.argv.findIndex(word => word.startsWith('ruvector'))++ const rest = spec.argv.slice(at + 1)++ const path = pathOf(rest)++ const help = rvHelpOf(spec.argv.slice(0, at + 1), path)++++ if (!/Usage:/i.test(help)) problems.push(`${id}: no such ruvector command "${path.join(' ')}"`)++++ for (const flag of rest.filter(word => /^--[a-z]/.test(word))) if (!help.includes(flag)) problems.push(`${id}: ruvector "${path.join(' ')}" declares no ${flag}`)++++ continue++ }+++ if (args[0] === 'mcp' && args[1] === 'exec') {+ const tool = args[args.indexOf('-t') + 1] ?? ''++ if (!tools.has(tool)) problems.push(`${id}: no MCP tool "${tool}"`)++ continue+ }++ const path = pathOf(args)+ const help = helpOf(path)++ if (/unknown command|not found|Unknown/i.test(help.slice(0, 300)) && !/Usage|USAGE|Options/i.test(help)) {+ problems.push(`${id}: no such command "${path.join(' ')}"`)++ continue+ }++ for (const flag of args.filter(word => /^--[a-z]/.test(word))) {+ if (!help.includes(flag) && !declares(path[0] ?? '', flag)) problems.push(`${id}: "${path.join(' ')}" declares no ${flag} (not in its help or its source)`)+ }+ }++ expect(problems).toEqual([])+ }, 900_000)+})diff --cc plugins/ruflo-console/tests/vector.test.tsindex 0000000000,0000000000..4f69e7e887new file mode 100644--- /dev/null+++ b/plugins/ruflo-console/tests/vector.test.ts@@@ -1,0 -1,0 +1,106 @@@++import type { TestBody } from 'claude-code/testing'++import { describe, expect, mock, test } from 'claude-code/testing'++++import { autoAnswer, FAKE_SECRET, WF_ID } from './fixtures/automate'++import { HIVE_FILES, RAFT_ID, WORKERS } from './fixtures/hive'++import { MEM_OUT } from './fixtures/memory'++import { MISSION_OBSERVATION } from './fixtures/missions'++import { HIVE_TOKEN, RUFLO_FILES } from './fixtures/ruflo-run'++import { FIND_OUT, LIST_OUT, LS_GLOBAL, USE_OUT } from './fixtures/skills'++import { VEC_OUT } from './fixtures/vector'++import { cliAnswer, command, elementsOf, fakeRuflo, keyOf, paneAt, PLUGIN, SESSION, textOf, worldOf } from './fixtures/world'++++const HOME_FILES = {++ '.claude/plugins/installed_plugins.json': JSON.stringify({++ version: 2,++ plugins: {++ 'ruflo-core@ruflo': [{ scope: 'user', version: '0.2.6', lastUpdated: '2026-07-30T12:06:11.791Z' }],++ 'ruflo-swarm@ruflo': [{ scope: 'user', version: '0.2.1' }],++ },++ }),++ '.claude/plugins/known_marketplaces.json': JSON.stringify({ ruflo: { installLocation: '/home/dev/.claude/plugins/marketplaces/ruflo', lastUpdated: '2026-09-03T18:45:31.282Z', autoUpdate: true } }),++ '.claude/plugins/marketplaces/ruflo/.claude-plugin/marketplace.json': JSON.stringify({ name: 'ruflo', plugins: [{ name: 'ruflo-core' }, { name: 'ruflo-swarm' }] }),++}++++import { drawn } from './fixtures/views'++++describe('vector lab', () => {++ test('vector lab: every section, its fields and tagged entries; opening it runs no ruvector command', { options: { boot: false } }, async ($, on) => {++ const world = worldOf(on, RUFLO_FILES)++ const vecRuns = () => world.runs.filter(argv => argv[3] === '[email protected]')++++ world.respond = argv => (argv[3] !== '[email protected]' ? cliAnswer(argv) : { exitCode: 0, stdout: '{"success": true}', stderr: '' })++ mock.clock(on)++ await $.session.start(SESSION)++++ const { text, tree } = await drawn($, 'vector')++++ for (const title of ['RESULT', 'BRAIN', 'RVF CONTAINERS', 'SQL / GRAPH', 'DECOMPILE', 'WORKERS', 'EDGE', 'HOOKS INTEL', 'IDENTITY']) expect(text).toContain(`▓▒░ ${title} ░▒▓`)++ expect(text).toContain('nothing run yet')++ expect(text).toMatch(/pub \n SHARE \.+/)++ expect(text).toMatch(/del \n DELETE \.+/)++ expect(text).toContain('rvf_delete is an MCP tool of the ruvector server with no CLI verb')++ expect(elementsOf(tree, 'Input').map(keyOf)).toEqual(['vec-in-brain', 'vec-in-rvfPath', 'vec-in-rvfArg', 'vec-in-sql', 'vec-in-target', 'vec-in-worker', 'vec-in-task'])++ expect(elementsOf(tree, 'Button').map(keyOf)).toEqual(expect.arrayContaining(['vec-brain-status', 'vec-brain-share', 'vec-rvf-query', 'vec-sql', 'vec-hooks-stats', 'vec-identity-generate']))++ expect(elementsOf(tree, 'Button').map(keyOf)).not.toContain('vec-rvf-delete')++ expect(vecRuns()).toHaveLength(0)++ })++++ test('vector lab: a local read runs one fixed argv at once and shows its lines; the shared brain asks first', { options: { boot: false } }, async ($, on) => {++ const world = worldOf(on, RUFLO_FILES)++ const vecRuns = () => world.runs.filter(argv => argv[3] === '[email protected]').map(argv => argv.slice(4).join(' '))++++ world.respond = argv => (argv[3] !== '[email protected]' ? cliAnswer(argv) : argv[4] === 'hooks' && argv[5] === 'stats' ? { exitCode: 0, stdout: VEC_OUT.hooksStats, stderr: '' } : argv[4] === 'hooks' ? { exitCode: 0, stdout: VEC_OUT.route, stderr: '' } : { exitCode: 0, stdout: '{"total_memories": 12}', stderr: '' })++ mock.clock(on)++ await $.session.start(SESSION)++ await $.command.run(command('vector'))++++ const pane = await $.ui.mount({ ...paneAt(110), surface: 'terminal' as const, plugin: PLUGIN })++++ await pane.press({ key: 'vec-hooks-stats' })++ expect(textOf(await pane.drawn())).toContain('2 Q-learning patterns')++ expect(world.runs.filter(argv => argv[3] === '[email protected]')).toEqual([['npx', '--offline', '-y', '[email protected]', 'hooks', 'stats']])++++ await pane.input({ key: 'vec-in-task', text: 'write the login tests', kind: 'submit' })++ expect(textOf(await pane.drawn())).toContain('recommended: coder')++ expect(vecRuns()).toEqual(['hooks stats', 'hooks route -- write the login tests'])++++ await pane.press({ key: 'vec-brain-status' })++++ const asked = textOf(await pane.drawn())++++ expect(asked).toContain('runs: npx --offline -y [email protected] brain status')++ expect(asked).toContain('reaches pi.ruv.io')++ expect(vecRuns()).toHaveLength(2)++++ await pane.press({ key: 'confirm' })++ expect(textOf(await pane.drawn())).toContain('total_memories: 12')++ expect(vecRuns()).toEqual(['hooks stats', 'hooks route -- write the login tests', 'brain status'])++++ // Generate waits for a show that found no key: nothing is asked, nothing runs.++ await pane.press({ key: 'vec-identity-generate' })++ expect(textOf(await pane.drawn())).toContain('run ▸ SHOW first')++ expect(vecRuns()).toHaveLength(3)++ await pane.unmount()++ })++++ test('vector lab headless: /ruflo run vec-<id> <text> answers with the lines; a network one asks and runs on yes', { options: { boot: false } }, async ($, on) => {++ const world = worldOf(on, RUFLO_FILES)++ const vecRuns = () => world.runs.filter(argv => argv[3] === '[email protected]').map(argv => argv.slice(4).join(' '))++++ world.respond = argv => (argv[3] !== '[email protected]' ? cliAnswer(argv) : argv[4] === 'hooks' ? { exitCode: 0, stdout: VEC_OUT.route, stderr: '' } : { exitCode: 1, stdout: '', stderr: VEC_OUT.brainMissing })++ mock.clock(on)++ await $.session.start({ ...SESSION, isInteractive: false })++++ const routed = (await $.command.run(command('run vec-hooks-route Fix the login bug'))).text ?? ''++++ expect(routed).toMatch(/^✓ hooks route: an agent for the task · exit 0\n/)++ expect(routed).toContain(' recommended: coder')++ expect(vecRuns()).toEqual(['hooks route -- Fix the login bug'])++ expect((await $.command.run(command('run vec-brain-search hnsw recall'))).text).toContain('Asked: brain search: the field’s words. Confirm with /ruflo yes (or y in the pane), cancel with /ruflo no.')++ expect(vecRuns()).toHaveLength(1)++ expect((await $.command.run(command('yes'))).text).toContain('Brain commands require @ruvector/pi-brain')++ expect(vecRuns()).toEqual(['hooks route -- Fix the login bug', 'brain search hnsw recall --limit 10'])++ expect((await $.command.run(command('run vec-rvf-delete'))).text).toMatch(/^nothing to do: n\/a: rvf_delete is an MCP tool/)++ })++})diff --cc plugins/ruflo-console/tests/views.test.tsindex 0d282c43d9,7ba318a973..61e034dd36--- a/plugins/ruflo-console/tests/views.test.ts+++ b/plugins/ruflo-console/tests/views.test.ts@@@ -1,12 -1,11 +1,13 @@@import type { TestBody } from 'claude-code/testing'import { describe, expect, mock, test } from 'claude-code/testing'+import { autoAnswer, FAKE_SECRET, WF_ID } from './fixtures/automate'import { HIVE_FILES, RAFT_ID, WORKERS } from './fixtures/hive'+import { MEM_OUT } from './fixtures/memory'import { MISSION_OBSERVATION } from './fixtures/missions'import { HIVE_TOKEN, RUFLO_FILES } from './fixtures/ruflo-run'-import { FIND_OUT, LS_GLOBAL } from './fixtures/skills'+import { FIND_OUT, LIST_OUT, LS_GLOBAL, USE_OUT } from './fixtures/skills'+ import { VEC_OUT } from './fixtures/vector'import { cliAnswer, command, elementsOf, fakeRuflo, keyOf, paneAt, PLUGIN, SESSION, textOf, worldOf } from './fixtures/world'const HOME_FILES = {diff --cc scripts/ci-test-baseline.txtindex 757a2fb441,e3fe62415a..9d7b11068c--- a/scripts/ci-test-baseline.txt+++ b/scripts/ci-test-baseline.txt@@@ -163,6 -163,3 +163,7 @@@ plugins/ruflo-console/tests/actions.tesplugins/ruflo-console/tests/behaviour.test.tsplugins/ruflo-console/tests/palette.test.tsplugins/ruflo-console/tests/views.test.ts+plugins/ruflo-console/tests/labs.test.ts++plugins/ruflo-console/tests/vector.test.ts+plugins/ruflo-console/tests/skills-secure.test.ts+plugins/ruflo-console/tests/xruv.test.ts