2887 Commits
Author SHA1 Message Date
randRuFlo 9045ab8477 release: 3.71.3 — Claude Code 2.1.318 adoption, narrow band, AutoMemory persistence, daemon stop, sweep fixes; performance 3.0.1, browser 3.0.1
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 18:52:18 -05:00
Michael ValderramaandMichael Valderrama 1a5ceb62cc feat(hive-mind): add --model to hive-mind spawn --claude (#4672)
Part of #1870. With --claude, -m/--model goes to the Claude Code worker as --model. No flag, no change. Values starting with '-' are refused before anything spawns.

Co-authored-by: Michael Valderrama <17348490+ibucketbranch@users.noreply.github.com>
2026-11-04 17:48:51 -06:00
rUvandr 8d4475d963 fix(auto-memory): JSON store surfaces write/read failures, verifies imports, adds read-only lookup (#4685) (#4708)
* fix(auto-memory): JSON store surfaces write/read failures and verifies imports (#4685)

- JsonFileBackend._persist() no longer swallows errors: a failed write or
  rename rejects store/bulkInsert/bulkDelete/update/shutdown.
- Only ENOENT means "no store". A read failure (e.g. EACCES), invalid JSON,
  a non-array document, or an entry without a unique non-empty string id
  throws a StoreError, and the file is never rewritten, so its bytes stay.
- Every persist reads the file back inside the lock and checks the intended
  entries are present and equal and the deleted ids are gone.
- import reports success only after shutdown plus a fresh readback of every
  entry it wrote; a failed import (including unreadable source files) exits 1.
  Sync failures also exit 1. Exit 2 is never used, since Claude Code treats it
  as "block". A missing @claude-flow/memory still exits 0 with its warning.
- New read-only `read <namespace> <key>` prints
  {schemaVersion, store, storePresent, namespace, key, found, entry}; it never
  loads the memory package, creates directories, takes the lock or calls
  shutdown, and refuses an ambiguous key.
- The repository and packaged helper copies are byte-identical again.

The signed helpers.manifest.json is NOT re-signed here: the
auto-memory-hook.mjs hash in it is now stale, so helper-signing.test.ts and
the helpers-manifest-guard workflow fail until a maintainer runs
`node scripts/sign-helpers.mjs` (docs/helpers-sync.md step 2).

Regression: __tests__/auto-memory-persistence-4685.test.ts (28 of 30 fail on
the previous helper). Reported by @sparkling.

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

* chore(helpers): re-sign helpers.manifest.json for the auto-memory-hook fix (#4685)

Signed with the project key through RUFLO_HELPERS_SIGNING_SECRET (Secret
Manager, ruv-dev); check-helper-sync passes.

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

---------

Co-authored-by: r <r@x>
2026-11-04 17:48:45 -06:00
rUvandr 8a033a4e63 fix(daemon): keep a stopped daemon stopped until an explicit start (#4654) (#4706)
Every ruflo-core plugin hook runs the CLI, and the CLI auto-starts a daemon
whenever none is alive, so a daemon the user stopped came back within minutes.

daemon stop now writes .claude-flow/daemon.stopped (only in a Ruflo project or
an existing .claude-flow/; stop --all marks every stamped workspace).
ensureDaemonRunning declines to spawn while the marker exists. An explicit
daemon start clears it. The start that auto-start spawns carries
RUFLO_DAEMON_AUTOSTARTED=1: it never clears the marker and re-checks it, so a
stop that lands after the hook checked still wins.

Co-authored-by: r <r@x>
2026-11-04 17:48:40 -06:00
randRuFlo e95c77d469 fix: refuse a trajectoryIds selection in hooks_intelligence_learn (#4693); route research synthesis away from the episode controller (#4691)
- hooks_intelligence_learn advertised trajectoryIds but never read it, so a
  scoped request ran global learning. The learning path cannot select, so an
  explicit selection is now refused before anything is imported or mutated.
- agentdb_context-synthesize summarizes validated task episodes; its description,
  the research-synthesize skill (ruflo-goals 0.4.6) and the researcher agent
  (ruflo-core 0.2.14) no longer send research documents to it.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 17:46:14 -05:00
r 062a1988fb Merge PR #4698 2026-11-04 17:43:20 -05:00
r 01673fcbf3 Merge PR #4695 2026-11-04 17:43:20 -05:00
r 4685e6962b Merge PR #4694 2026-11-04 17:43:19 -05:00
rUvandr bdfbcc11ad feat(cli): adapt headless workers and hooks to Claude Code 2.1.295–2.1.318 (#4699)
- headless claude -p argv gets --permission-mode auto unless the caller set a
  mode or --dangerously-skip-permissions (2.1.302 starts -p in manual mode on
  third-party providers, telemetry off, or fresh installs; workers would stall).
  RUFLO_HEADLESS_PERMISSION_MODE overrides; none passes no flag.
- parse credential_expires_at from the -p JSON result (2.1.318), carry it on
  the execution result and emit 'credential-expiring' within 10 days.
- onFailure: "block" on the pre-bash safety gate in init-generated and repo
  settings (2.1.295): a gate that can't start or times out blocks instead of
  letting the command through. Older Claude Code ignores the key (checked on
  2.1.289).

Co-authored-by: r <r@x>
2026-11-04 14:33:07 -06:00
kevin9327 178fb86095 fix(tasks): mark agents assigned in task_create as busy 2026-11-05 04:42:11 +09:00
randRuFlo af95dd71a0 release: 3.71.2 — PR sweep fixes (embeddings, session, memory paging, claims, terminal, security) + providers 3.0.1
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 13:18:23 -05:00
kevin9327 65081ae7eb fix(claims): leave completed claims out of claims_load and claims_rebalance 2026-11-05 02:18:00 +09:00
kevin9327 07d39352f1 fix(claims): take a claim off the stealable list when claims_handoff hands it over 2026-11-05 02:16:18 +09:00
r 5048deda75 Merge PR #4671: fix(security): daily scan 2026-11-03 — 2 fixes 2026-11-04 10:28:55 -05:00
r 2ad1257416 Merge PR #4579: fix(cli): stop installing default skills whose commands v3 does not ship 2026-11-04 10:28:55 -05:00
r e68b7ebe10 Merge PR #4655: fix(claims): take a claim off the stealable list when claims_status updates it 2026-11-04 10:28:54 -05:00
r a2e3a1dc66 Merge PR #4656: fix(claims): keep the claim context in claims_steal when no handoff context was given 2026-11-04 10:28:54 -05:00
r c9816cf623 Merge PR #4658: fix(terminal): report an unknown sessionId in terminal_execute instead of running in a new session 2026-11-04 10:28:54 -05:00
r 36ea7452c3 Merge PR #4675: fix(embeddings): read --db-path, --max-size, --ef-construction and --batch-size 2026-11-04 10:28:53 -05:00
ordinary being ad7e9e5416 fix(memory): page list row identities before loading payloads (#4687)
bridgeListEntries() and the sql.js listEntries() fallback selected full content and embedding columns before ORDER BY updated_at DESC LIMIT/OFFSET, so metadata-only pages sorted large payloads that were then discarded (#4686).\n\nUse a rowid subquery to order/limit row identities first, then fetch the page's payload columns. The original full-row query remains as a fallback for legacy WITHOUT ROWID tables. Filters (status/TTL/namespace/provenance/tags), total count, embedding cap, page membership, order and returned fields are unchanged.\n\nAdds a sql.js fixture test for descending offset pages, full content, total and limit 0. Existing sql.js list/provenance/tag and ADR-472 embedding tests pass 12/12 locally; tsc reports only the pre-existing missing workspace packages.
2026-11-04 09:05:02 -06:00
nk-batman21 cc665b12f6 fix(session): honor the component flags in session save, restore and export (#4649)
The parser stores --memory-only as flags.memoryOnly and --no-include-memory
(or --include-memory false) as flags.includeMemory = false, but session
save, restore and export read only the kebab-case keys, which are never
set. `session restore <id> --memory-only` overwrote the agent and task
stores, and `session save` / `session export` with --no-include-memory
still wrote the memory entries.

Read the camelCase keys and keep the kebab ones as a fallback, as init and
mods do.
2026-11-04 09:04:51 -06:00
kevin 36d0d79b06 fix(embeddings): honour threshold 0 in embeddings_search (#4611) 2026-11-04 09:04:45 -06:00
randRuFlo 2a75e765c3 chore(release): 3.71.1 — shared 3.0.7, mcp 3.1.6, plugin-agent-federation 1.0.5
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-04 03:30:34 -05:00
r 3c388f18e0 Merge PR #4669 into release/3.71.1 2026-11-04 03:28:54 -05:00
rUv 9973d61028 Merge branch 'main' into fix/dry-run-ruvector-deployment 2026-11-04 01:58:05 -06:00
rUv 32f6f680be Merge branch 'main' into fix/memory-import-claude-slug 2026-11-04 01:58:03 -06:00
rUvandr bbd057eb17 fix(memory): find stored patterns when agentdb serves mock embeddings (#4643) (#4681)
agentdb_pattern-store writes through ReasoningBank.storePattern(), but when
agentdb's Transformers.js model fails to load (offline, failed sharp install,
or a loaded CI runner) it serves hash-based mock embeddings. A passage and a
query then embed to unrelated vectors, so searchPatterns() returned [] for a
pattern that was just stored. This is the full-suite #2226 failure that has
kept the CI ratchet red since the move to agentdb 3.2.

- bridgeSearchPatterns: when the agentdb vector search returns nothing, scan
  the same reasoning_patterns table for the query text, matching what the
  LocalReasoningBank branch already does over getAll().
- rescueAgentdbEmbedder: agentdb 3.x's ReasoningBank calls embedQuery() /
  embedPassage(), which bypass embed(). Patch the role methods too and clear
  the cached mock vectors, so a host with ONNX actually gets real vectors.
- Regression test forces AGENTDB_DISABLE_TRANSFORMERS=1 and requires the
  round-trip to hit; it fails without the fix.

Co-authored-by: r <r@x>
2026-11-04 01:57:56 -06:00
ordinary being 762fbf74c2 fix(memory): expose AgentDB init failures in health (#4667)
agentdb_health could return available:true with controllers while AgentDB itself had failed to open (for example because the daemon or another MCP server owned the RuVector store). The only trace was the separate isBridgeAvailable() check; the health payload had no init error or lock hint (#4654).\n\nbridgeHealthCheck now reads the registry's getAgentDBInitError(), reports available:false, includes agentdbInitError and the recorded bridgeFailureReason, and adds an actionable hint when the cause is an already-open/locked native store. Older registries without the record are unchanged.\n\nRegression extends the #4622 fake registry with listControllers and covers failed and healthy health payloads. Baseline returns available:true and no error for the failure case; candidate 5/5 with the Windows bridge opt-in, existing 3 tests unchanged.
2026-11-04 01:01:20 -06:00
Aaditya 55260ca55a fix(neural): call the @ruvector/attention API that exists (#4613)
* fix(neural): call the @ruvector/attention API that exists

ruvector-training called methods the binding does not have, in 0.1.31
and in the latest 2.2.2:

- computeContrastiveLoss called InfoNceLoss.compute(anchor, positives[],
  negatives), which throws "Get TypedArray info failed" because the
  binding takes a single positive, and then InfoNceLoss.backward(),
  which does not exist. `neural train`'s contrastive leg (with --backend
  wasm, or auto without the native ruvllm trainer) swallowed the error
  every epoch and reported "LoRA Adaptations 0".
- computeFlashAttention, computeMoEAttention and
  computeHyperbolicAttention called computeRaw(); the classes expose
  compute(query, keys, values).

computeContrastiveLoss now uses computeWithGradients(anchor, positive,
negatives) and averages over the positives, so the list signature keeps
its meaning; it rejects an empty list. The attention helpers call
compute(). With the fix, `neural train --backend wasm --epochs 5` reports
3 LoRA adaptations instead of 0.

Fixes #4610

* test(neural): skip the #4610 cases unless initializeTraining brought the feature up

Resolving @ruvector/attention is not enough. In CI the package resolves
but the binding does not initialize, so the cases failed with "Flash
attention not initialized". The test now runs initializeTraining once
in a child and gates each case on the feature it reports: InfoNCE Loss
for the contrastive case, and FlashAttention, MoE and
HyperbolicAttention for their helpers.

Refs #4610
2026-11-04 01:01:04 -06:00
Tanishq 093298ef53 fix(memory): match Claude Code's project slug for all non-alphanumerics in memory_import_claude
Claude Code names ~/.claude/projects/<slug> by replacing every character
other than [A-Za-z0-9] with `-`. resolveProjectMemoryDir() only tried
slugs that replace slashes, backslashes, `:` and whitespace, so for a
project path with `_`, `.` or the like (/home/alice/my_app, a Windows
user folder such as john.doe, a WSL /mnt/c/.../my_proj path)
memory_import_claude found nothing and returned "No Claude memory files
found", with or without projectPath.

Also try Claude Code's rule after the existing candidates of each path,
and for a WSL path on its Windows form too. The cost tracker's
_encode-project-path.mjs uses the same rule (#4366).
2026-11-04 01:47:25 +05:30
kevin d1afa3fb0e fix(embeddings): read --db-path, --max-size, --ef-construction and --batch-size
The parser stores every long flag under its camelCase key, but the
embeddings subcommands read ctx.flags['db-path'], ['max-size'],
['ef-construction'] and ['batch-size'], which are never set. The flags
(and the documented `chunk -s 256` short form) were ignored and the
hard-coded defaults used instead. Read the camelCase keys.
2026-11-04 04:16:40 +09:00
ClaudeandRuFlo d369bb73b8 fix(security): path traversal in session_export outputPath
session_export wrote the session JSON to any outputPath given in MCP tool
input, so a caller could create or overwrite files anywhere the MCP server
process could write. The path is now resolved against the project root, its
real parent directory must stay inside the real project root, and an
existing symlink or non-file target is refused. The CLI 'session export'
command writes its own file and is unaffected.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01MfPHVKCrsaLkwMr8CpYU7J
2026-11-03 04:48:48 +00:00
ClaudeandRuFlo 4dc2c1d304 fix(security): prototype pollution in DAA, workflow and claims stores
The DAA, workflow and claims stores are plain JSON-parsed objects keyed by
ids from MCP tool input. validateIdentifier accepts names such as
__proto__ and constructor, so daa_workflow_execute, workflow_cancel and
workflow_stop could resolve such an id to Object.prototype and write status
and error fields onto it, and claims_steal treated an inherited built-in as
a stealable marker. The record maps now load as null-prototype maps.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01MfPHVKCrsaLkwMr8CpYU7J
2026-11-03 04:47:26 +00:00
Tanishq 82e96a5b3d fix(cli): honor --dry-run in ruvector migrate, ruvector backup restore and deployment deploy
The parser stores `--dry-run` (and `-d` on `deployment deploy`) as
`dryRun`, but these three actions read `flags['dry-run']`, which is
never set, so each of them ran the real operation:

- `ruvector migrate --dry-run` applied every pending migration, and with
  `--down` it ran the rollback SQL (DROP TABLE for 1.2.0 to 1.5.0).
- `ruvector backup restore --clean --dry-run` dropped and recreated the
  schema, then inserted the backup's rows.
- `deployment deploy --dry-run` recorded a deployment and made it the
  active one in .claude-flow/deployments.json.

Read `dryRun`, keeping the kebab key as a fallback, as the top-level
migrate, update, init and mods commands do.
2026-11-03 03:38:58 +05:30
kevin a91fc435d2 fix(terminal): report an unknown sessionId in terminal_execute instead of running in a new session 2026-11-02 14:04:39 +09:00
PerryLink 778aef9d12 fix(cli): move only the command-dependent GitHub skills into the legacy group
Review follow-up: flipping skills.github off also dropped github-code-review and
github-project-management, which only use hooks and work on v3. Only
github-multi-repo, github-release-management and github-workflow-automation
drive verbs v3 does not ship.

Keep those two in the default GitHub group, move the other three into
skills.legacy next to stream-chain and sparc-methodology, and leave the
GitHub group selected in the wizard again.
2026-11-02 12:41:03 +08:00
kevin9327 9744cf4801 fix(claims): keep the claim context in claims_steal when no handoff context was given 2026-11-02 08:08:40 +09:00
kevin9327 8ab4095436 fix(claims): take a claim off the stealable list when claims_status updates it 2026-11-02 08:07:56 +09:00
rUv 5f3dacc54b feat(mods): automatic context delegation (ruflo-mods 0.15.0, ADR-522) + release 3.71.0 (#4652)
* feat(mods): automatic context delegation (ruflo-mods 0.15.0, ADR-522) + release 3.71.0

New contextDelegation option (off | observe | enforce, default off). A
main-loop whole-file Read of a 14-120 KB file for an analysis prompt is
answered by a no-tools haiku $.model.complete on the session's own
credentials. Every quote is checked against the file and the model sees
only the cited passages (the file's own lines) plus how to read the rest.
The real Read always runs first, so a later Edit works (spike: answering
the Read without next(e) breaks Edit); any failure shows the whole file.

Live A/B (real binary, haiku main, 6 repo files 17-83 KB): 6/6 correct
both ways, 6/6 delegated, total cost -22.5% incl. worker, main input
-21.5%, wall +6.5%. First run delegated 0/6: haiku drops indentation in
quotes; the verifier now trims per-line whitespace and relocates up to 3
lines, showing the file's own lines.

Tests: 8 plugin tests, 3 real-binary e2e (extract + Edit, forged quote,
off), CLI parity test vs DEFAULT_CONTEXT_LIMITS and core verdicts. Smoke
step 4 now allows exactly one gated $.model.complete.

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01MfPHVHXWyvDvDtYMTsA6MP

* ci: keep the claude-code test-kit plugin test out of the vitest ratchet

Co-Authored-By: RuFlo <ruv@ruv.net>
Claude-Session: https://claude.ai/code/session_01MfPHVHXWyvDvDtYMTsA6MP
2026-11-01 15:14:10 -05:00
rUv a3d45e64b9 feat(core): governed context delegation with reproducible benchmark proof (#4648)
* feat(core): add bounded context delegation with source-bound benchmark proof

* feat(core): add governed Messages adapter and durable resumable live pilot

* fix(benchmarks): isolate pilot fixtures and record bounded live timeout proof

* fix(context-delegation): review fixes — pilot env allowlist, hash-before-import, real policy root; ADR-521

- subscription-pilot: the spawned claude gets an allowlisted environment
  (PATH, HOME, locale, XDG, CLAUDE_CONFIG_DIR, plus names in
  RUFLO_PILOT_CHILD_ENV_PASS) instead of the whole shell; a GH_TOKEN
  canary test proves it. Policy is evaluated for process.cwd(), not a
  hardcoded /home/ruv.
- provider-pilot: the --runtime entry and policy runtime are contained
  and hashed before they are imported.
- ADR renumbered 520 -> 521 (520 is agentdb episode CRUD on main).
- Evidence regenerated for the new snapshot (9301fbfd…, Node 24): 300/300
  quotes, coordinator bytes -97.56%, total boundary +3.83%; verify.mjs ok.

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

* fix(context-delegation): honour --worker-available through the CLI parser; scope evidence hashes to owned files

- context-plan read only f['worker-available'], but the parser camelCases
  flags, so the documented command always planned 'worker-unavailable'.
  Accept both spellings; new test drives the real CommandParser (fails
  without the fix).
- results.json no longer hashes hooks.ts, index.ts and global-ai-budget.ts.
  Those files change in unrelated PRs, which would have failed
  verify.mjs on the next one. Evidence regenerated (20491e6e…, 14 hashes),
  163/163 tests, verify ok.

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

* chore(release): 3.70.0

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-01 14:13:37 -05:00
rUv 3c30ee3fa3 feat(agentdb): episode CRUD over agentdb 3.3 (ADR-520) + release 3.69.0 (#4642)
* feat(agentdb): episode get/list/update/delete over agentdb 3.3 (ADR-520)

agentdb_episode-get, -list, -update and -delete reach agentdb 3.3's
ReflexionMemory through one new bridge helper (withReflexionController),
so a verified session can be marked success with a critique in place,
keeping its id, and recall re-ranks it. Strict integer ids; pre-3.3
builds get a clear error (delete is gated so the old parseInt-ing
deleteEpisode is never used).

agentdb ^3.3.0 in root and CLI, ruflo override >=3.3.0, both lockfiles;
marketplace agentdb plugin -> plugin-v3.3.0.

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

* fix(agentdb): ADR-112 use-when guidance on episode CRUD tool descriptions

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

* chore(release): 3.69.0

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-01 12:52:22 -05:00
rUvandr 47406b0a96 fix(memory,neural): AgentDB SQL fallback persistence, cache size reuse, MoE mean P_i (#4639)
* fix(memory,neural): persist AgentDB SQL fallback, reuse cached sizes, average MoE P_i

- memory (#4410): AgentDBBackend's SQL fallback gated on db.run/db.get, which
  agentdb's prepare/exec handle never has, so no table was created and every
  write was a silent no-op. Use prepare().run/get with spread params (safe on
  better-sqlite3 and agentdb's sql.js shim) and quote the "references" column.
- memory (#4481): CacheManager stores each entry's size on its LRU node and
  refunds that number on overwrite/delete/eviction instead of re-serializing.
- neural (#4381): computeLoadBalanceLoss() uses the mean gate probability over
  the same route() history as f_i, persisted and reset with the routing stats.
- Bump @claude-flow/memory 3.2.2, @claude-flow/neural 3.0.2.

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

* chore(cli): pin @claude-flow/memory 3.2.2 and @claude-flow/neural 3.0.2 (both published)

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

---------

Co-authored-by: r <r@x>
2026-11-01 12:17:59 -05:00
rUvandr 73b20daf6e fix(cli): session-end consolidation, session snapshot IDs, Fisher decay env (#4638)
* fix(cli): session-end consolidation, snapshot IDs, Fisher decay env, read-path regression test

- #3908: bridgeSessionEnd probed only `nightlyLearner.consolidate`, which
  neither the MemoryConsolidator wrapper nor AgentDB's NightlyLearner has.
  Feature-detect consolidate -> run -> runAll, bounded (10s) and non-fatal.
- #4404: session_save keyed snapshot rows by a bare `namespace::key`, so
  tuples containing `::` collided (one dropped on save, a distinct sibling
  row skipped as a mirror). Percent-escape `%` and `:` per component;
  ordinary IDs are unchanged and restore reads the explicit fields.
- #3475: CLAUDE_FLOW_FISHER_DECAY overrides the default Fisher EMA decay;
  only a finite number in (0, 1] is honoured, constructor config still wins.
- #4570: the sql.js read paths no longer rewrite memory.db on main (fixed by
  #3918's ensureSchemaColumns change); add a regression test asserting
  inode/mtime/ctime/size are unchanged across searchEntries, listEntries,
  memory_search, memory_list and memory_search_unified.

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

* test(cli): drop #4570 regression test (issue closed separately as fixed by #3918)

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

---------

Co-authored-by: r <r@x>
2026-11-01 12:17:55 -05:00
rUvandr 60f3b336ca fix(security): realpath containment in hooks_codemod (#4346); strict-majority Raft quorum (#4458) (#4636)
* fix(security): realpath containment in hooks_codemod; strict-majority Raft quorum

hooks_codemod (#4346, CWE-59): the project-root check compared lexically
resolved paths, so a symlink inside the project pointing outside it let the
codemod read and rewrite files outside the root. Both the file/files[] and
glob branches now also compare real paths (nearest existing ancestor for
missing leaves) against realpath(projectRoot) using path.relative.

RaftConsensus (#4458): quorum was floor(n * 0.66), i.e. 1 for 2- and
3-voter clusters, so the leader's self-vote accepted a proposal even after
a peer rejected it. Quorum is now max(floor(n/2)+1, floor(n * threshold)).
@claude-flow/swarm 3.0.2 -> 3.0.3.

Fixes #4346
Fixes #4458

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

* chore(swarm): 3.0.4 (3.0.3 was published without dist)

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

---------

Co-authored-by: r <r@x>
2026-11-01 12:17:51 -05:00
rUvandClaude 7cd8c4517c fix(security): prototype pollution in config MCP tools scope handling (#4635)
config_get/set/reset/export/import/list indexed store.scopes with the
caller-supplied scope name. validateIdentifier accepted reserved names
such as __proto__, and inherited names (toString, hasOwnProperty)
resolved to shared built-ins, so a scoped write could land on
Object.prototype for the whole MCP server process.

Scope names now go through validateScope (rejects __proto__,
constructor, prototype) and scopes are only read/created as own
properties via readScope/ensureScope. Scoped config_set also rejects a
reserved key.


Claude-Session: https://claude.ai/code/session_01MfPHVKWbict6fc5sWyA3zp

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 12:17:47 -05:00
rUvandr 3667ba6573 fix(cli): enforce swarm.maxAgents in agent_spawn (#4572); fix the two red main CI tests (#4640)
agent_spawn now resolves the target swarm before writing the agent and
refuses a spawn into an active swarm that already holds maxAgents live
(non-terminated) agents, with current/max in the error. No swarm, a
shut-down swarm, or a retry of an agent already in the swarm behave as
before.

Main CI: the ratchet runs vitest from the repo root with no config, so the
5 s default testTimeout applied. On a loaded runner the #4203 recall test
took 6.2 s and timed out; its abandoned search imported rabitq-index.js
after the next test's vi.resetModules() and built the index there, which
failed "concurrent ensureRabitqIndex()" on its initialized === false
precondition. The suite gets an explicit 60 s budget. The #2226 test
searched the repo-root .swarm store that every other test file writes
patterns to; it now uses a store of its own.

Co-authored-by: r <r@x>
2026-11-01 11:43:06 -05:00
rUvandClaude bb3869c9c9 fix: align bundled SKILL.md name: fields with their directory names (#1054) (#4616)
21 skills under .claude/skills/ (both the repo-dev copy and the shipped
v3/@claude-flow/cli/.claude/skills copy that `init` actually installs into
user projects) had a display-friendly `name:` in their SKILL.md frontmatter
instead of their kebab-case directory name. Claude Code resolves a skill
invocation (e.g. `/pair-programming`) by directory name but surfaces the
`name:` field in autocomplete, so a mismatch makes the skill unselectable
("skill not found").

Adds a regression test (skill-name-matches-dir-1054.test.ts) scanning the
shipped skills directory and asserting every SKILL.md's name: matches its
directory; it fails on the pre-fix content and passes after.

Note: open PR #1587 addresses the same report but only touches the separate
.agents/skills/ mirror, not the .claude/skills copy that `init` ships, so it
would not have fixed the reported repro on its own.


Claude-Session: https://claude.ai/code/session_01ReiDH3nbkdgFmZjAXyWZpp

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 10:26:26 -05:00
rUvandClaude 45b42984d3 fix: statusline DDD% reflects pattern count, not DDD domains (#1047) (#4615)
The statusline's "DDD Domains" / "DDD ●XX%" fields were purely derived
from `.swarm/memory.db` file-size-based pattern-count thresholds in
getV3Progress() — nothing to do with Domain-Driven-Design domain
completion. Running `memory init --force` could drop "DDD progress"
from 100% to 80% just by resetting the DB file size, with zero change
to any actual architecture work.

Relabel the full and compact statusline views honestly ("Learning
Tier" / "Learning:") and replace the fabricated "DDD ●XX%" percentage
with the real pattern count it was derived from ("Memory ●N"), per the
issue's own suggested remediation. The CVE-count half of this issue
was already fixed by #2694; the ADR-count half is already tracked
separately by #1588, so neither is touched here.

Adds a regression test (issue-1047-ddd-statusline-metrics.test.ts)
that fails on the old code and passes after the fix.


Claude-Session: https://claude.ai/code/session_01ReiDH3nbkdgFmZjAXyWZpp

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 10:26:22 -05:00
kevin b18d641478 fix(claims): keep recorded progress when claims_handoff omits progress (#4596) 2026-11-01 10:26:11 -05:00
kevin 173e047e04 fix(daa): keep the names of object steps in daa_workflow_create (#4599) 2026-11-01 10:26:07 -05:00