3707 Commits
Author SHA1 Message Date
rUvandr 631c1557b5 release: 3.63.1 (#4501)
Co-authored-by: r <r@x>
2026-10-25 23:10:13 -04:00
ordinary being 118d3a0ab4 fix(swarm): release the old domain slot when a retry moves agents (#4499)
handleTaskFail()'s retry branch marked the failed agent idle, then called assignTask() without considering domain ownership. When the retry scored to a different agent, the original AgentPool reservation was never released and a queued domain task behind it stayed queued forever (the generic queue does not drain domain queues).\n\nAwait assignTask()'s result and call releaseDomainAgent() only when the retry landed on another agent (or assignment failed); the same-agent path keeps the reservation because the retried task now owns it. This complements the terminal-failure and heartbeat-recovery release paths.\n\nRegression fills a one-agent domain, queues a second task, adds a higher-scoring generic coder, then fails the first task with retries remaining. Baseline leaves the queued task queued; candidate assigns it to the recovered domain slot. Focused domain tests 13/13, full swarm 360/360, tsc clean.
2026-10-25 22:45:24 -04:00
ordinary being 9250d4e2bf fix(swarm): wait for consensus events instead of polling (#4498)
ByzantineConsensus.awaitConsensus() polled proposals every 10 ms and GossipConsensus.awaitConsensus() every 50 ms with setInterval, even though both already emit consensus.achieved on every accept/reject transition. Each in-flight waiter therefore kept a repeating timer alive and retained its listener, and Gossip re-ran convergence on every tick.\n\nSubscribe to consensus.achieved with one expiry setTimeout, clean up both paths, and preserve the existing timeout semantics (Byzantine expires; Gossip runs convergence once then applies its participation fallback). Unknown proposals now reject immediately like RaftConsensus.\n\nRegression covers event resolution and timeout for both algorithms, spies setInterval to prove no polling timer is created, and checks no consensus.achieved listener is left behind. Baseline fails all four with one setInterval call; candidate passes. Existing consensus suites 89/89, full swarm 359/359, tsc clean.
2026-10-25 22:16:59 -04:00
rUvandr 18d2f18a4a fix(flywheel): skip the directory fsync on Windows so flywheel run can commit (#4492) (#4493)
Co-authored-by: r <r@x>
2026-10-25 14:39:07 -04:00
rUvandr d7fcaf3b25 fix(ruflo-mods): load again: the ruRE offer no longer registers a second bare session.start, tool.call and turn.complete (0.7.1, #4485) (#4487)
Co-authored-by: r <r@x>
2026-10-25 07:52:18 -04:00
ordinary being 31f554c7b2 fix(swarm): wire downgraded topology leaders only to the leader (#4483)
addNode() resolved the requested role for the node's role field but passed the raw request to calculateInitialConnections(). In hierarchical/centralized topologies, a second node requesting queen/coordinator is downgraded to worker; the raw role still took the leader branch and connected it to every existing node. Connections, adjacency and edges therefore contradicted the stored role (#4481 hive-mind scan).\n\nResolve the role once, before calculating connections, and use it for both. Regression covers centralized and hierarchical topologies: the leader, a normal worker, then a late node requesting the leader role; the late node must be a worker whose only neighbor is the existing leader. Baseline fails with [leader, worker]; candidate passes. Full swarm suite 355/355 and tsc --noEmit clean.
2026-10-25 05:25:51 -04:00
kevin 166aef93c7 fix(agentbbs): page forward from sinceEnvelopeId in federation_bbs_watch (#4480) 2026-10-25 02:39:08 -04:00
rUvandr f02989a78c fix(managed): refuse . and .. resource ids; guard reads common argument wrappers (ruflo-agent 0.4.1) (#4478)
Follow-up to the 3.63.0 security review (low severity #6 and #9); documents #7 and #8 as known limits.

Co-authored-by: r <r@x>
2026-10-24 23:49:51 -04:00
rUvandr e2dae2f701 release: 3.63.0 (#4476)
Co-authored-by: r <r@x>
2026-10-24 23:04:13 -04:00
rUvandr db141ba70e feat: managed workflows, unified console runs and verified advisory learning (#4471)
* feat(agent): add bounded managed dynamic workflows and verified lifecycle observation

* feat(plugins): integrate managed workflows with mod policy and capability discovery

* feat(managed): unify console runs and verified advisory learning

* fix(managed): hydrate native recall receipts validated on ruOS

* docs(managed): record authenticated console host blocker

* docs(managed): qualify installed console and compatible native host

* feat(managed): integrate verified cycles and isolate native memory

* fix(managed): enforce offline native models and qualify feedback E2E

* fix(managed): independent security and correctness review findings

- gate managed_agent_interrupt through the managed_agent_control policy; terminate obeys the allowlist and deletes only its own environment when RUFLO_MANAGED_CONTROL=1
- track only events from the acknowledged message so a later poll cannot report the previous turn as finished
- require the canonical base64 verifier signature so one receipt cannot fill the ledger
- register RUFLO_MANAGED_AGENTS_BASE_URL as a trust-boundary env var (env-precedence audit) and key the credential scope marker with a per-process HMAC (CodeQL)
- best-effort local snapshot writes; report messageId when a prompt fails after it was sent
- console: rescheduling is running, budget/action-blocked sessions are active, not finished
- document the remaining known limits in ADR 0004

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs: user guide section for managed cloud agents; correct ruflo-agent README counts

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(managed): scope marker is a generation number, never a hash of the API key (CodeQL)

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-24 22:42:09 -04:00
kevin 6ed591a45a fix(memory): keep same-key entries from other namespaces in memory_search_unified (#4470)
Signed-off-by: kevin9327 <5299031+kevin9327@users.noreply.github.com>
2026-10-24 20:45:59 -04:00
rUvandr 973d0ab497 release: 3.62.0 (#4469)
Co-authored-by: r <r@x>
2026-10-24 19:46:31 -04:00
rUvandr fe99f748c5 fix(daemon): explicit maxConcurrent/workerTimeoutMs win over saved daemon-state (#4462) (#4465)
Apply the #2935 explicit-wins gate to the two scalar fields restored in
initializeWorkerStates(): constructor arg > config.json > saved state > default.

Co-authored-by: r <r@x>
2026-10-24 13:45:23 -04:00
rUvandr 075503c34e fix(headless): cancel settles the execution, deadline timer cleared, escalation keys off exit (#4463) (#4466)
Co-authored-by: r <r@x>
2026-10-24 13:31:52 -04:00
rUvandr 24450bf9f7 feat(rure): rure_cuda_launch_plan — static occupancy plan for CUDA kernels (ADR-501) (#4464)
New read-only tool: per kernel and architecture, theoretical occupancy at several
block sizes, what limits it, the best sizes and flags; optionally the text of a
driver-API harness the person can build to check it on their own GPU. Nothing is
compiled, loaded or run by ruRE.

The model equals NVIDIA's cuda_occupancy.h on 1,770,216 combinations (8 archs,
limiting sets included; fingerprints committed so CI repeats it) and the CUDA
driver on real GPUs: RTX 5080, RTX 3090, RTX 4090, A100, H100. Found on hardware:
from sm_90 the cubin's shared size already includes the driver's 1 KiB reservation.

Also fixes the reader reporting sm_5 for standalone cubins from CUDA 12 (ELF OS ABI
51 keeps the SM number in the low byte of e_flags); real CUDA 12.8 cubins added.

ruflo-rure 0.6.0.

Co-authored-by: r <r@x>
2026-10-24 12:39:54 -04:00
ordinary being 533e17e0b1 fix(swarm): make running-worker cancellation terminal (#4457)
cancel() marked a running WorkerDispatchService worker 'cancelled', but executeWorker() later overwrote it with 'completed' and emitted worker:completed when the in-flight executor returned. The caller saw a successful terminal result for work it had cancelled. cancel() also removed the id from the concurrency set immediately, so another worker could start while the cancelled executor was still running, exceeding maxConcurrent.\n\nKeep the slot until the executor settles in finally, and make executeWorker/catch preserve the cancelled state without emitting completed/failed. Pending cancellation also records the terminal timestamp and phase.\n\nRegression uses maxConcurrent=1: it cancels after the first worker starts, queues a second, and asserts the slot is not released before the cancelled executor settles, status/phase stay cancelled, result is undefined, and no completed/failed event is emitted. Baseline fails because the second worker starts immediately; candidate passes. Full swarm suite 353/353 and tsc --noEmit clean.
2026-10-24 02:32:22 -04:00
ordinary being c616d40193 fix(swarm): disclose synthetic worker dispatch results (#4456)
WorkerDispatchService returns static placeholder data from all 12 triggers but exposed it as an ordinary successful WorkerResult. The service is re-exported from the published @claude-flow/swarm package, so a direct consumer could present invented counts, recommendations and 'benchmarks' as real analysis (#4410 automation scan).\n\nMark every result from the current placeholder executors with synthetic:true and a reason, and label prompt context derived from those results as synthetic at both the heading and per-worker line. The work-phase comment now states that no real work is performed; the 10ms cap is unchanged.\n\nRegression dispatches all 12 triggers, waits for completion, and asserts the disclosure fields and context labels. Baseline (TS source stashed) fails with synthetic undefined; candidate passes. Full swarm suite 352/352 and tsc --noEmit clean.
2026-10-24 02:09:56 -04:00
rUvandr e6c3743ef1 release: 3.61.1 (#4453)
Patch release: ruflo-console 0.48.0 (ruRE outside-folder allowlist, ADR-499) reaches ruflo tui users.

Co-authored-by: r <r@x>
2026-10-24 00:52:47 -04:00
ordinary being 5988f8e4a0 fix(plugins): reuse captured extension points when rebuilding caches (#4451)
Both registries rebuild extension caches by calling every surviving plugin's register* methods again on a sibling's unregister/reload. The plugin interface documents that these methods run during initialization; non-idempotent implementations can repeat counters, listeners, timers or allocations tied to unrelated plugin churn (#4410 plugins scan).\n\nCapture the raw values returned by each plugin at initialization (and on hot reload), store them on the entry, and rebuild caches by replaying those values. The enhanced registry still runs conflict resolution on every replay, so first/last/namespace/error semantics and ownership maps are preserved without re-invoking plugin code.\n\nRegression tests count registerMCPTools across unregister for both registries, verify conflict replay, and verify hot reload replaces the snapshot. Baseline (sources stashed) fails all count assertions with 2 calls instead of 1; candidate focused suites pass 52/52. Full plugin suite: 475 passed, 3 skipped, 1 pre-existing Windows safePath failure reproduced on baseline.
2026-10-24 00:26:34 -04:00
rUvandr 52884d98aa release: 3.61.0 (#4450)
Minor release: rure_analyze_cuda (CUDA fatbin/cubin/PTX static analysis), ruflo-console 0.47.0 CUDA row, zod advisory fix.

Co-authored-by: r <r@x>
2026-10-23 23:28:30 -04:00
rUvandr cac404c54c feat(ruflo-mods): rureOffer — offer ruRE when the model reads a binary (ADR-498) (#4446)
Off by default. Observes Read/Write/Edit/MultiEdit file_path, and at the end of a
main-loop turn appends one fixed-wording line naming up to three validated
project-relative binary/library/asar/CUDA files (12 per session, each once).
Offer only: never runs ruRE, never denies or edits a call. Inert without a ruRE
MCP tool. Harness gains World.tools and $.tool.list.

Co-authored-by: r <r@x>
2026-10-23 23:12:31 -04:00
rUvandr 2bc73c0994 fix(deps): zod 4.6.7 in graph-intelligence and browser, time-boxed accepted entries for nested zod 3 (#4442) (#4444)
* fix(deps): zod 4.6.7 in graph-intelligence and browser; time-boxed accepted entries for nested zod 3 (#4442)

GHSA-mrhx-c7xc-m3w5 (zod <4.6.6) turned the supply-chain audit red for every PR.
Both projects' own zod dependency moves ^3.22.4 -> ^4.6.7; the only code change zod 4
needs is a key schema on z.record (7 calls). The regenerated locks are now consistent
with package.json (npm ci works). The audit still names zod because other packages
(@claude-flow/cli|hooks|security|plugin-gastown-bridge, agentic-flow) keep nested zod
3.25.76 copies; two time-boxed accepted entries (expire 2026-11-23, tracked in #4442)
cover those. Needs CODEOWNER review (policy file).

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(deps): pnpm lock follows the browser package's zod 4.6.7

The first commit changed v3/@claude-flow/browser/package.json but not v3/pnpm-lock.yaml,
so every 'pnpm install --frozen-lockfile' job failed with ERR_PNPM_OUTDATED_LOCKFILE.
Minimal edit: the browser importer's zod specifier/version and the /zod@4.6.7 package
block (registry integrity). Proved with a clean 'pnpm install --frozen-lockfile', then
pnpm -r build, browser tsc --noEmit and its tests (231 passed).

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-23 22:28:25 -04:00
rUvandr dd5d66cdb4 feat(rure): rure_analyze_cuda — CUDA fatbin, cubin and PTX static analysis (ADR-0006) (#4441)
* feat(rure): rure_analyze_cuda — CUDA fatbin, cubin and PTX static analysis (ADR-0006)

New read-only MCP tool and an original pure-TypeScript reader: fatbin
containers and entries (kind, sm_NN, zstd/LZ4 under size caps), cubin kernels
from the symbol table with registers (EIATTR_REGCOUNT), code size and
constant/shared/local memory, and PTX version/target/kernel names. Parses,
never executes; strings screened by AIDefence; decompression budget charged
per attempt. Checked against real nvcc 12.8 and 13.0 output (sm_75/80/90) and
cuobjdump: committed fixtures with recorded ground truth, plus a live test
that compiles with a local nvcc. ruflo-rure 0.5.0.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(rure): rure_analyze_cuda description carries the ADR-112 'Use when' guidance

The tool-description audit (ADR-112) failed the PR: one tool without guidance.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(rure): linear-time PTX sniff and scan (CodeQL js/redos, plus a quadratic one it did not flag)

looksLikePtx used a lazy comment pattern inside a repeated group, which
backtracks exponentially (CodeQL js/redos); it is now a forward scan. The
directive regexes in scanPtx matched with ^\s*, which rescans a whole run of
blank lines at every line start: 80000 blank lines took 4.6 s and 320000 took
71 s. They now match space and tab only and bound the rest. Tests: pathological
comment structure, and long blank-line and whitespace runs, all under 500 ms.

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-23 17:21:30 -04:00
rUvandr af6c74b3bc release: 3.60.1 (#4437)
* release: 3.60.1

Patch release: cleanup --keep-config fix (#4435) and ruflo-console 0.45.1 Windows writes (#4434).

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(changelog): 3.60.1 includes #4436

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(changelog): fix escaped backslashes

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-23 14:52:53 -04:00
nk-batman21 1d6930e583 fix(cleanup): honor --keep-config (#4435)
The parser stores `--keep-config` and `-k` as `keepConfig`, but cleanup
read `flags['keep-config']`, which is always undefined. So
`cleanup --force --keep-config` deleted claude-flow.config.json and
stripped the hooks and claudeFlow blocks from .claude/settings.json
anyway. Read `keepConfig`, keeping the kebab key as a fallback as
update, init and mods do.
2026-10-23 14:06:44 -04:00
rUvandr 7402c321a5 release: 3.60.0 (#4431)
* chore(release): @claude-flow/hooks 3.0.2, @claude-flow/mcp 3.1.2

hooks: restart-timer cancellation on stop (#4413), dedup count (#4415), non-blocking fallback embeddings (#4422).
mcp: unguessable session ids (#4418).

Co-Authored-By: RuFlo <ruv@ruv.net>

* release: 3.60.0

@claude-flow/cli, claude-flow and ruflo to 3.60.0 (minor: new MCP tools — the six rure_* reverse-engineering tools).
@claude-flow/mcp pin to 3.1.2 (published standalone: unguessable session ids).

Co-Authored-By: RuFlo <ruv@ruv.net>

* docs(changelog): 3.60.0

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-23 13:20:20 -04:00
rUvandr 4efb421e33 fix(update): never treat an older registry version as an update (downgrade on 3.60.0) (#4432)
getUpdateType compared major, minor and patch independently. With 3.60.0
running and 3.59.17 as the registry latest, the minor check failed but
patch(17) > patch(0) returned 'patch', so the startup check auto-installed
3.59.17: a downgrade. It also made 'ruflo init' run npm install in the project
and time out the mods-cli-bin test on the 3.60.0 release PR.

An update is a strictly newer version: guard with semver.gt first.

Co-authored-by: r <r@x>
2026-10-23 12:48:58 -04:00
Aaditya 88349655eb fix(github): stop reporting merge/close/update success when nothing happened (#4425)
* fix(github): stop reporting merge/close/update success when nothing happened

github_pr_manage merge/close and github_issue_track update/close
returned success when nothing happened on GitHub:

- A failed `gh` call (merge conflict, failing checks, auth, unknown
  number) fell through to the local JSON store and returned
  { success: true, source: 'local-store' }.
- That fallback matched records with key.includes(String(n)) against
  `pr-<Date.now()>` ids. It returned success whether or not anything
  matched, and could mark an unrelated record (prNumber 12 vs
  pr-1786319612345).
- github_pr_manage validated owner/repo but never passed them to `gh`,
  so merge/close acted on the cwd's repository (fixed for issues in
  #2963).

Now:
- When `gh` is present, a failed command returns success: false.
- Offline, only a local record whose id is exactly pr-<n> / issue-<n>
  is updated; otherwise the call returns success: false.
- A missing number is an error.
- PR actions pass --repo owner/repo.

list/create and their offline local-store behaviour are unchanged.

Fixes #4424

* fix(github): include gh's error text when merge/close/update fails

Per the #4424 triage: a failed `gh` call now reports gh's stderr (or
the error message when there is none) along with the action, e.g.
"gh pr merge 12 failed: X Pull request #12 is not mergeable: ...".

runArgv keeps its string | null contract and is now a thin wrapper over
runArgvResult, which returns { out } or { error }. The four mutating
paths use runArgvResult directly.

Refs #4424
2026-10-23 09:59:23 -04:00
Aaditya f6c6a32432 fix(neural): refuse neural_compress prune instead of deleting every pattern (#4428)
neural_compress prune deleted every pattern whose usageCount was below
targetSize and saved the result. Nothing in the neural store records
usage: patterns are written with usageCount 0 and only max-merged by
distill and import. So any targetSize above 0, including the 0.5
default and a "10% reduction" of 0.1, deleted and persisted every
pattern while reporting success.

Prune now returns success: false with the reason, and never calls
saveNeuralStore(), until usage is actually tracked. This is the same
treatment quantize received in #4195. The targetSize schema description
no longer promises a 0-1 size reduction. neural_optimize's zero-norm
prune is a separate path and is unchanged.

Fixes #4423
2026-10-23 09:46:01 -04:00
Aaditya 55cb051880 fix(daa): record performanceScore 0 as a failure, not a 0.8 success (#4427)
daa_agent_adapt read the score as
`(input.performanceScore as number) || 0.8`:

- A failing score of 0 became 0.8, raised successRate, and was sent to
  AgentDB as { success: true, quality: 0.8 }.
- A missing score was recorded as the same fabricated 0.8 success.
- Out-of-range scores were accepted, although the schema says 0-1.

A given score must now be a finite number in [0, 1], and an invalid one
returns success: false without touching the agent. An omitted score
records no score: successRate and the AgentDB outcome are left alone,
while the adaptation itself (feedback and the adaptation count) is
still recorded.

Fixes #4426
2026-10-23 09:40:25 -04:00
ordinary being b45b035e49 fix(reasoningbank): stop blocking the event loop on fallback embeddings (#4422)
FallbackEmbeddingService.embed() spawned 'npx agentic-flow@alpha embeddings generate' with execFileSync, so whenever the primary embedder was unavailable each embedding could freeze the process for up to 10 seconds. Swap to async execFile and await the callback; keep the same 10s timeout, shell:false argument array, JSON parsing, cache and hash fallback (#4410 memory scan).\n\nExport the service for a focused regression. The test mocks both execFile and execFileSync: candidate lets a 10ms timer fire while the 60ms child is pending and returns the child's vector; baseline (export-only) blocks the timer and fails.
2026-10-23 08:57:37 -04:00
ordinary being aca151dfe1 fix(memory): rescue each store's embedder, not just the first (#4421)
rescueAgentdbEmbedder() used a process-wide boolean to avoid re-patching. AgentDB registries are keyed by dbPath and each owns a distinct embedder, so after the first store was rescued every later store kept its mock embedder and wrote/searchable vectors from AgentDB's random fallback (#4410 memory scan).\n\nThe per-embedder __ruvectorRescued sentinel already makes the patch idempotent. Remove the global flag, keep the sentinel check, and export the helper for a focused two-store regression. Baseline (export-only, no behavior change) rescues the first embedder and leaves the second false; candidate rescues both.
2026-10-23 08:33:50 -04:00
DexandDextheking1 47720bd684 fix(mcp): use crypto randomUUID for session ids (#4418)
Co-authored-by: Dextheking1 <Dextheking1@users.noreply.github.com>
2026-10-23 08:24:22 -04:00
rUvandr bcaf737032 test(agentbbs): regression test for roomId path traversal (follow-up to #4416) (#4420)
publish and watch must reject roomIds containing '..'. Fails without the
#4416 validator change, passes with it.

Co-authored-by: r <r@x>
2026-10-23 08:00:36 -04:00
ordinary being 1baacb6856 fix(reasoningbank): count each duplicate removal once (#4415)
* fix(reasoningbank): count each duplicate removal once

consolidate() built its candidate array once, then kept comparing entries after deleting them. In a 3+-way similarity cluster it removed a tombstoned pattern again and incremented duplicatesRemoved a second time, issuing redundant storage/HNSW deletes and overstating the cleanup metric (#4410 deferred memory finding).\n\nSkip any pattern that is no longer live before starting its outer iteration or comparing it as a candidate. Add a 3-way cluster regression: baseline reports 3 removals for 2 duplicates; candidate reports 2 and leaves one survivor.

* fix(reasoningbank): stop comparing after the outer pattern is removed

Review repro: with lowest-quality-first insertion, the outer candidate could be removed inside its own inner loop, then keep comparing as a tombstone and remove a later live pattern. Break out of the inner loop when toRemove is patterns[i]. Parametrize the regression over high-first, low-first and mid-first insertion orders (3/3 candidate, low-first fails on baseline).
2026-10-23 07:44:16 -04:00
DexandDextheking1 279cb1fbfb fix(agentbbs): reject .. in roomId in agentbbs-tools validator (#4416)
Co-authored-by: Dextheking1 <Dextheking1@users.noreply.github.com>
2026-10-23 07:36:53 -04:00
ordinary being aa26e0d8c8 fix(daemon): cancel pending auto-restart on stop (#4413)
DaemonManager's failure backoff used a bare setTimeout stored only in a local closure. stop() cleared the interval but not that timeout, so an explicit stop could be undone about a second later when the pending restart fired. Repeated failures could also accumulate multiple backoff timers (#4410 automation scan).\n\nTrack backoff timers per daemon, clear them in start() and stop(), supersede an older backoff before scheduling a new one, and re-check stopped/stopping/disabled state inside the timer callback. unref() the timer so it does not keep the process alive. Add a fake-timer regression; baseline restarts after stop (2 attempts), candidate stays stopped (1).
2026-10-23 05:09:31 -04:00
ordinary being e0bc9b3efc fix(daemon): keep one timer per worker type (#4412)
setWorkerEnabled(type, true) called scheduleWorker() without clearing an existing timeout. this.timers kept only the newest handle, so each redundant enable leaked the previous timer; the leaked timer survived stop() (which only clears current map entries) and could run the worker again untracked. Disabling also left the type in pendingWorkers, and an in-flight run rescheduled itself even after disable (#4410 automation scan).\n\nClear any existing timer at schedule time, avoid scheduling when a timer or in-flight run already owns the type, remove disabled types from the pending queue, and only reschedule after a run while the worker is still enabled. Add fake-timer regressions; baseline leaks three timers after three enables and keeps the disabled pending worker.
2026-10-23 04:17:14 -04:00
ordinary being 11e4c2beb2 fix(agntcy): report SDKs missing the command API as not configured (#4409)
detectAgntcyRuntime() treated any module that resolved as configured, even though the three AGNTCY commands call createSlimTransport/joinGroup/publishAgentRecord and the real @agntcy/slim-bindings exports a different class-based API (#4376). Users with the package installed and an endpoint set therefore got configured:true and only discovered the mismatch at the command call site.\n\nAdd an optional requiredExports probe to detectAgntcyRuntime, pass each command's actual function names, and report a resolved-but-incompatible SDK as configured:false with the missing exports in the reason. Commands now take the normal not-configured path with an accurate message.\n\nThis does not implement the missing SDK API; it stops the capability check from claiming an API exists when it does not.
2026-10-23 02:47:16 -04:00
rUvandr a413f47812 fix(doctor): read the version of a claude.cmd shim on Windows (#4397 part 3) (#4408)
Node rejects execFile of .cmd/.bat on Windows, so the npm-global shim read
as 'version unknown'. Probe shims via cmd.exe with a quoted path; skip paths
containing cmd metacharacters.

Co-authored-by: r <r@x>
2026-10-22 22:58:56 -04:00
rUvandr 17da11320a fix(memory): restore 10000-row bridge search window, configurable (#4397 part 1) (#4405)
The #2982 ORDER BY fix kept LIMIT 1000, so rows outside the newest 1000
were unfindable (3.38.3 and the sql.js path use 10000). Default is now
10000; CLAUDE_FLOW_SEARCH_WINDOW overrides (clamped 100..100000).

Co-authored-by: r <r@x>
2026-10-22 22:16:10 -04:00
rUvandr 92731bc6bf fix(ruflo-rure): security review fixes — gate coverage, symlinks, ReDoS, parser budgets (#4403)
Closes the findings from an independent review of ruRE 0.1.0-0.4.0:
screen every attacker-derived string and report screened/skippedFiles,
walk without following symlinks under a total-byte budget, linear EVM
file sniffing, an iteration budget for ELF/PE table walks, guarded ELF
e_entry, and single-descriptor reads. Each fix has a test that fails
without it.

Co-authored-by: r <r@x>
2026-10-22 19:39:46 -04:00
rUvandr e6ec9cd687 feat(ruflo-rure): Phase 4 — EVM bytecode static inventory (#4402)
Adds rure_analyze_evm per ADR-0005: aligned disassembly and pattern scan
for dispatcher selectors, hazardous opcodes, embedded addresses, event
topics, EIP-1167 minimal proxies, solc metadata and embedded strings.
No interpreter, RPC or network; PUSH data is never read as opcodes;
input capped at 256 KiB; embedded strings pass the AIDefence gate.

Co-authored-by: r <r@x>
2026-10-22 19:11:43 -04:00
rUvandr d835597e0b feat(ruflo-rure): Phase 3 — .NET assembly metadata inspection (#4401)
Adds rure_analyze_dotnet per ADR-0004: an original pure-TypeScript
ECMA-335 metadata reader (assembly identity and references, types,
method count, P/Invoke imports, user-string literals, entry point).
No dependency, no IL decoding, never loads or runs the assembly. Table
extents are validated against the stream before any row is read, and all
extracted text passes through the AIDefence gate.

Co-authored-by: r <r@x>
2026-10-22 18:52:56 -04:00
rUvandr b31d2b0471 feat(ruflo-rure): Phase 2 — native binary static analysis (ELF/PE/Mach-O) (#4400)
Adds rure_analyze_binary per ADR-0003: an original pure-TypeScript
container parser (format, arch, entry, sections, linked libraries,
imported/exported symbols, optional strings). No disassembler, no new
dependency, never loads or executes the target. Reads are bounds-checked,
tables and strings are capped, files over 128 MiB are refused, and all
extracted text passes through the AIDefence gate.

Co-authored-by: r <r@x>
2026-10-22 18:35:26 -04:00
rUvandr 1b31914579 feat(ruflo-rure): new reverse-engineering plugin, Phase 1 (JS/Electron static analysis) (#4396)
* docs(ruflo-rure): ADR-0001 scope/dual-use policy, ADR-0002 Phase 1 architecture

Fixes #4395 (part 1 — research/planning phase)

Co-Authored-By: RuFlo <ruv@ruv.net>

* feat(ruflo-rure): Phase 1 implementation — JS/Electron static analysis

Implements the plugin scaffold (manifest, skill, command, agent, smoke
test, benchmark) and the three Phase 1 MCP tools per ADR-0001/0002:

- rure_extract_asar: resource-capped .asar extraction via @electron/asar,
  checking the archive header's declared size/file count before writing
  anything (decompression-bomb guard).
- rure_analyze_js_app: TypeScript-compiler-API-based static analysis —
  import/export graph, Electron process-boundary detection (ipcMain/
  ipcRenderer/contextBridge, require("electron"), nodeIntegration flags),
  every finding evidence-sourced to file + line range.
- rure_find_feature: deterministic lexical/structural feature search,
  explicitly not semantic/LLM matching.

Every extracted string is routed through the AIDefence content gate
before being returned; flagged content is redacted, never dropped
silently. Parses only — never executes analyzed code, independently
verified by scripts/smoke.mjs grepping the real source (comments
stripped first, so the doc comment describing the property can't trip
its own check).

27 new tests, all passing. Typecheck clean. Tool-description audit
(ADR-112) clean. Benchmark: ~3.6k-18k files/s on a synthetic Electron
bundle (plugins/ruflo-rure/scripts/benchmark.ts).

Trust tier: experimental. Marketplace/directory submission is a
separate, explicit decision, not part of this change (ADR-0001).

Part of #4395.

Co-Authored-By: RuFlo <ruv@ruv.net>

* feat(console): add ruflo-rure to the plugin map (devtools section)

Every plugin directory needs a line in PLUGIN_MAP or the console's own
plugin-coverage test fails. ruflo-rure lands in devtools, same section
as the other inspection/analysis plugins (ruflo-browser, ruflo-jujutsu,
ruflo-testgen).

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(ruflo-rure): fix CI failures — real deps, capability-brain classification

Three real bugs surfaced by PR #4396's CI, not flakes:

- typescript was only a devDependency of @claude-flow/cli, but
  src/rure/ts-walk.ts needs it at runtime. Moved to dependencies.
  (CI: "Cannot find package 'typescript'" in a from-source install.)
- @claude-flow/aidefence was never declared as a dependency of
  @claude-flow/cli at all (only resolvable locally via monorepo
  hoisting), so the AIDefence gate silently no-op'd in CI's isolated
  install. Added as an optionalDependency, matching the existing
  graceful-degradation code path and the browser_act precedent this
  also fixes.
- capability-brain.ts classified every registered MCP tool into a
  domain by prefix; the three new rure_* tools had no domain, so
  guidance-brain.test.ts's "classifies every live registered tool"
  assertion failed. Added a 'reverse-engineering' domain (experimental
  maturity, matching ADR-0001's trust tier) and its package-owner
  lookup entry.

All 35 rure + guidance-brain tests pass; typecheck clean;
audit-tool-descriptions and audit-cli-mcp-tools clean.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(ruflo-rure): revert @claude-flow/aidefence optionalDependency, mock it in tests instead

Reverts the optionalDependency added in 2570cf39d — it's on the #2561
forbidden-heavy-optionalDependencies list (CI's "Enforce CLI + ruflo
optionalDependencies budget" guard caught it): adding it back to
@claude-flow/cli regresses the cold `npx -y @claude-flow/cli@alpha
--version` startup time that #2561 fixed.

gateWithAIDefence's dynamic import was always meant to be speculative
— present only if something else in the install graph happens to pull
it in, same as the existing (unexported) copy in
browser-intent-tools.ts, which never declares it as a dependency
either. The real fix for "my tests need deterministic flagging
behavior" is mocking the module boundary, not forcing the real
optional package to be installed. Both rure-aidefence-gate.test.ts and
rure-tools.test.ts now vi.mock('@claude-flow/aidefence', ...), matching
the precedent in issue-2670-security-defend.test.ts. Added one more
test asserting graceful pass-through (not a thrown error) when the
module genuinely isn't resolvable.

36/36 rure + guidance-brain tests pass; typecheck clean; CLI
optionalDependencies back to 12 (budget 13), no forbidden entries.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(ruflo-rure): alias typescript/@electron/asar in the isolated analyze-command test

analyze-json-output.test.ts runs analyzeCommand in a fully isolated temp
directory (scrubbed PATH/HOME/TMPDIR, no real node_modules reachable),
resolving only the handful of packages it explicitly aliases to this
package's own resolved paths (vitest, semver, bcryptjs, zod, plus the
cli-core/security source trees). The capability-brain / mcp-tools
registry analyzeCommand transitively loads now reaches rure-tools.ts,
so the same treatment is needed for its two real dependencies:
typescript (compiler API, src/rure/ts-walk.ts) and @electron/asar
(src/rure/extract-asar.ts) — both aliased to requireHere.resolve(...),
matching the existing zod/semver/bcryptjs pattern exactly. This is the
sanctioned mechanism this test already uses for a dependency it
genuinely needs to execute; it's unrelated to the heavy-package
absence assertions earlier in the same file (ruvector, agentic-flow,
@huggingface/transformers, etc.), which stay untouched.

20/20 analyze-json-output tests pass; full rure + guidance-brain suite
(56 tests) passes alongside it in the same run.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(ruflo-rure): memoize the aidefence module resolution, make gateAll sequential

CI's "Test V3 Packages" job reproducibly failed exactly one test —
gateAll's "preserves order and length across mixed benign/flagged
input" — twice, while every other mock-dependent test in the same file
passed both times. gateAll was the only caller that resolves
@claude-flow/aidefence via several concurrent gateWithAIDefence calls
(Promise.all over the input array); every other test calls it once.
In CI, @claude-flow/aidefence is genuinely absent from node_modules
(confirmed by this job's own "@claude-flow/aidefence not loadable"
log line elsewhere in the same run) — unlike this dev environment,
where it's pnpm-hoisted and physically present, just mocked over.

Fix: memoize the dynamic import behind a single shared promise, so
concurrent callers all await the same resolution attempt instead of
each firing their own against a module vi.mock has to intercept
without a real file backing it. Also made gateAll sequential as
defense in depth — gating is cheap, and there's no reason multiple
calls need to race the first-ever resolution attempt at all.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(ruflo-rure): add @electron/asar to the root package.json for CI's Test Suite job

Root CI's "Test Suite" job never installs v3/'s own pnpm workspace —
it runs `npm ci` at repo root only, then runs vitest from repo root
against v3/@claude-flow/cli/__tests__/*. Module resolution for those
test files walks up from v3/@claude-flow/cli (no node_modules there in
this job) through v3/ (also none) to the repo root's node_modules,
which is why `typescript` already resolved (already a root
devDependency, for an unrelated reason) while `@electron/asar` did
not (never referenced anywhere in the root tree before this).

Added @electron/asar to the root dependencies, matching how zod/ws
are already placed there for the same reason, and regenerated
package-lock.json. The regen also synced two pieces of real,
pre-existing lockfile staleness this surfaced: the recorded root
version (3.58.0, several releases behind the actual 3.59.17) and a
leftover `toml` dependency entry (removed from package.json before
this PR, but never swept from the lockfile until this install).

Verified against CI's actual invocation shape: `node
node_modules/vitest/vitest.mjs run v3/@claude-flow/cli/__tests__/rure-*`
from repo root, not just the v3-workspace-scoped `npx vitest run` I'd
been using to verify until now.

Co-Authored-By: RuFlo <ruv@ruv.net>

* fix(ruflo-rure): lazy-load the TypeScript compiler instead of a top-level import

ts-walk.ts statically imported `typescript` at module scope. Since
rure-tools.ts is registered into mcp-client.ts's shared tool list, every
CLI invocation loaded the full TypeScript compiler into memory at
startup, not just commands that use ruRE — the same failure shape as the
#2561 cold-start regression (@claude-flow/aidefence).

This also explains three straight CI failures on the exact same file
(mods-cli-bin.test.ts, which exec's the built CLI's `init` through
execFileSync): the heavier startup made it the most likely victim of the
repo's known tinypool worker-crash flake under CI's resource limits.

Fix: import type-only `typescript` for AST types, and lazy-load the real
module (memoized) inside analyzeModuleSource, matching the pattern
already used by aidefence-gate.ts and extract-asar.ts. This makes
analyzeModuleSource/analyzeJsApp/findFeature async; updated their two
call sites in rure-tools.ts and the benchmark script, plus the test
files's call sites.

Verified: `node bin/cli.js --version` succeeds with node_modules/typescript
physically removed (previously would have crashed), confirming the
compiler is no longer loaded on every invocation.

Co-Authored-By: RuFlo <ruv@ruv.net>

---------

Co-authored-by: r <r@x>
2026-10-22 17:45:55 -04:00
nk-batman21 ac9f8b879e fix(update): honor --dry-run in update all (#4398)
The parser stores `--dry-run` as `dryRun`, but `update all` read
`flags['dry-run']`, which is always undefined. executeMultipleUpdates
then ran with dryRun = false, so a dry run ran `npm install
<pkg>@<latest> --save-exact` for every package and recorded it in the
update history. Read `dryRun` (keeping the kebab key as a fallback, as
daemon, init and mods do) for the executor call and the summary.
2026-10-22 17:07:05 -04:00
rUvandr f5af26322b release: 3.59.17 (#4393)
fix(init): stop advertising a memory path the runtime ignores (#4392)

Co-authored-by: r <r@x>
2026-10-22 09:20:12 -04:00
ordinary being 69f4daaec6 fix(init): stop advertising a memory path the runtime ignores (#4392)
ruflo init wrote memory.persistPath: .claude-flow/data into .claude-flow/config.yaml, but getMemoryRoot() only reads the JSON config candidates (claude-flow.config.json and .claude-flow/config.json) and otherwise uses .swarm. The YAML key was dead text: editing it moved nothing and could mislead users into thinking a new store location was active (#3193 part b).\n\nRemove the ignored key and point the YAML at the JSON key that actually controls the store. Add an init regression test that fails on the old YAML and asserts the generated file no longer advertises persistPath.
2026-10-22 07:51:20 -04:00
rUvandr d5c341f853 release: 3.59.16 (#4391)
Co-authored-by: r <r@x>
2026-10-22 07:18:56 -04:00