Commit Graph
10683 Commits
Author SHA1 Message Date
randRuFlo b86cce2727 fix(helpers): close home-delete gap and harden generated helpers (#5176)
- pre-bash (shipped helpers, generated fallback, ruflo-mods guard): a
  recursive delete of ~, ~/, ~user, $HOME, ${HOME} or "$HOME"/* is now read
  as a root delete and blocked (exit 2). Paths below home are unaffected.
  ruflo-mods 0.17.5 -> 0.17.6.
- statusline: sqlite3/sh/npx resolve only from absolute PATH entries outside
  the project, children get that filtered PATH, git runs via
  execFileSync(sh, ['-c', script]), and a non-numeric total_cost_usd no
  longer throws.
- hook-handler: post-edit dedup falls back to session_id only for
  session-end; "Updated error handling" is no longer a failed edit.
- intelligence.cjs (and the generated stub): a corrupt store is kept as
  <name>.corrupt, writes are temp+rename, consolidate() claims
  pending-insights.jsonl by rename instead of truncating it.
- session.cjs (both copies and both generators): guarded JSON.parse,
  missing metrics/startedAt, CLAUDE_PROJECT_DIR, CLI only when
  require.main === module.
- auto-commit.sh: AUTO_PUSH defaults to false, stages tracked files only
  (git add -u; file mode still commits the named file), no hardcoded
  Co-Authored-By trailer.

helpers.manifest.json is intentionally not re-signed; the maintainer
re-signs it.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-28 17:50:56 -05:00
YovanyandClaude Opus 5.5 ef7073ab72 fix(hooks): pre-bash fails closed under cmd.exe and blocks Windows drive wipes (#5166)
pre-bash took the command from `prompt`, which falls back to
process.env.PROMPT. cmd.exe always sets PROMPT=$P$G, so under a cmd
environment an empty or command-less payload validated "$p$g" and exited 0,
defeating the #4743 fail-closed gate. The classic helper and the inline
fallback now read the command only from the hook payload.

The classic helpers, the inline fallback and the ruflo-mods guard also block
wiping or formatting a whole Windows drive: format <drive>, rd/rmdir /s
<drive>, and Remove-Item (or an alias) with -Recurse on a drive root
(C:\, C:/, C:, "C:\", C:\*). Paths below the root and Format-Table pass.

The DANGEROUS_COMMANDS list is unchanged, so ADR-404 list parity holds.
helpers.manifest.json needs re-signing with the release key.

Fixes #5166

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 17:50:56 -05:00
rUvandClaude 26a02caa1c dream(memory): fix CacheManager.clear() previousSize always 0 (evaluated) (#5174)
* dream(memory): fix CacheManager.clear() previousSize always reporting 0

clear() called Map.clear() before reading this.cache.size for the
cache:cleared event payload, so previousSize was always 0 regardless of
how many entries existed. Capture the size before clearing instead.

Disclosed in the dream-cycle ledger 4 times (2026-10-27, 11-02, 11-16,
reconfirmed 11-28) without being fixed; cross-confirmed tonight by two
independent research roles (deep researcher + architecture reviewer),
scored highest (4.15) of 5 scored memory candidates. 3 new tests added
(1 discriminating, 2 controls); full @claude-flow/memory suite
748/749 -> 751/752 (+3, 0 regressions, same 1 pre-existing environmental
chmod-as-root failure both ways); tsc --noEmit clean both ways.

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

* dream(memory): #5173 ledger update + final witness stamp

Ledger row for tonight's CacheManager.clear() previousSize fix, plus
a backfill note confirming 2026-11-27 (#5143/#5144) ran and correctly
REJECTed its candidate. Gist updated with the final adversarial-critic
verdict and witness stamp.

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

* dream(memory): record PR #5174 in ledger row

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

* dream(memory): #5173 bump @claude-flow/memory to 3.4.2 for the clear() fix

The CI leaf-package-publish audit (scripts/audit-leaf-package-publish.mjs)
correctly flagged that cache-manager.ts changed without a version bump:
@claude-flow/memory is a non-bundled leaf that resolves from the npm
registry at release time, so an unbumped version means the fix would
ship nowhere. Bumped as a PATCH (bug fix, no API/schema change) and
updated @claude-flow/cli's two exact pins to match, per CLAUDE.md's
"Publishing Rules" (lockstep pin discipline, #3390/#3327 Finding A
precedent). Does not publish the package — that stays a separate,
human-gated release action.

Verified locally: audit-leaf-package-publish.mjs and
audit-umbrella-version-lockstep.mjs both pass; @claude-flow/memory
suite still 751/752 (same 1 pre-existing environmental failure).

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

* dream(memory): #5173 sync pnpm-lock.yaml for the 3.4.2 bump

pnpm install --frozen-lockfile (the Windows plugin-hooks-smoke CI job)
failed because v3/pnpm-lock.yaml still recorded @claude-flow/memory's
old specifier (3.4.1) after the package.json bump. @claude-flow/memory
is a workspace link: dependency, so no registry resolution changes are
needed -- a plain `pnpm install` would have pulled in several unrelated
upstream bumps (ruvector, codex, various @ruvector/* packages), which
is out of scope for this fix, so the lockfile specifier was edited
directly instead. Verified `pnpm install --frozen-lockfile` now
succeeds with only this one line changed.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-28 16:59:25 -05:00
rUvandr 74fcaf48c7 fix(cost-tracker): correct Claude price book rows (#5169) (#5182)
* fix(cost-tracker): correct Claude price book rows (#5169)

Give each Claude version its own price-book row at the rates on the
pricing page (asOf 2026-11-28). Opus 4.5-4.8 fell through to the legacy
Opus row (3x high), Opus 5 matched Opus 5.5, Fable 5 / 5.2 matched 5.1,
Haiku 5.5 matched the Haiku 3 fallback, Sonnet 5.5 cache reads were 0.20.
Minor-version rows use `re` with (?!\d) so fable-5-2 does not catch a
dated claude-fable-5-2026... id.

Haiku 5.5 gets a long_prompt block applied per request over 100K prompt
tokens. track.mjs and session.mjs price each response at its model row
and split 1h cache writes. Plugin 0.31.5.

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

* fix(cost-tracker): accept dotted model ids in price-book rows; README rates (#5169)

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

---------

Co-authored-by: r <r@x>
2026-11-28 16:59:18 -05:00
rUvandr 1da23656da fix(skills): init-installed AgentDB skills teach commands that exist (#5161) (#5181)
agentdb-advanced, agentdb-optimization and agentdb-learning were built around
createAgentDBAdapter (not exported by any shipped package), agentdb CLI verbs
that answer "Unknown command" (create-plugin, list-templates, list-plugins,
plugin-info, benchmark, merge, reindex) and an enableQUICSync option over a
QUIC server that opens no socket.

Rewrite them against the agentdb 3.10 API and CLI: AgentDB + getController,
LearningSystem and its nine session types, ReflexionMemory, quantization
stores, QueryCache, BatchOperations, KeywordIndex/MetadataFilter/MMR/
ContextSynthesizer, and the verbs agentdb-cli dispatches. State plainly that
sync is a reference implementation. Drop the unmeasured speed-up figures from
the descriptions and bodies.

Every code block and CLI line was run against the workspace agentdb 3.10.0.
The new test checks documented verbs against the CLI dispatch source,
imported names against the package exports, and MCP refs against the
registry.

Co-authored-by: r <r@x>
2026-11-28 16:59:14 -05:00
rUvandr 5ff9939f28 fix(memory): warn that memory.backend is not applied (#5157) (#5180)
* fix(memory): report memory.backend as not applied instead of silently ignoring it (#5157)

The memory store has no backend selector: it always runs the sql.js store
with the AgentDB bridge layered on top. memory.backend was accepted by
config set, persisted, and never read, while memory.persistPath beside it
was honoured.

- config set memory.backend/memory.type warns when the value is not the
  effective one (hybrid) and returns applied: false; the value is still
  persisted so existing scripts keep working.
- memory stats reports configuredBackend {value, source, applied: false,
  effective} in JSON and warns in text mode, reading the same sources in
  the same order as the memory path (env first, then the JSON configs).
- config set help no longer advertises memory.backend as a working setting.

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

* fix(memory): do not claim an effective backend in the #5157 notice

The configured-backend note sat beside the measured Backend label and
named 'hybrid' as what runs, which is false when the native bridge is
disabled. Report only that the value is not read, and add the issue's
config set -> memory stats reproduction as a test.

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

---------

Co-authored-by: r <r@x>
2026-11-28 16:59:11 -05:00
rUvandr 5d10f147e7 fix(mcp): swarm_status taskCount follows the task store (#5154) (#5179)
* fix(mcp): swarm_status taskCount follows the task store (#5154)

swarm_status read swarm.tasks, an array nothing ever writes, so taskCount
was 0 for a swarm's whole life while task_summary counted its tasks.

task_create now stamps the task with a swarmId (the one passed, else the
most recently created swarm, the same default agent_spawn uses), and
task_retry carries it over. swarm_status counts from the task store that
task_summary reads: tasks stamped with the swarm's id, plus unstamped
tasks assigned to one of its member agents, the membership agentCount is
computed from. It also returns a tasksByStatus breakdown.

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

* fix(mcp): task_create refuses an unknown explicit swarmId (#5154)

Matches swarm_status, which errors on an unknown id, instead of silently
creating an unstamped task the assignee fallback could count elsewhere.

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

---------

Co-authored-by: r <r@x>
2026-11-28 16:59:08 -05:00
ordinary being fa7a5669f6 fix(federation): sign the JSON wire payload for jcs-v1 (#5170)
sendToNode built the outbound AgentMessage with the FederationEnvelope class instance as its payload. The JCS canonicalizer accepts only plain objects and also rejects Dates and undefined values, so every jcs-v1 send threw 'Federation canonicalization accepts only plain objects'. legacy-v1 only permits heartbeat and status-broadcast, leaving every work-bearing message unsendable once a peer was pinned and advertised JCS (#5153).\n\n- Add FederationEnvelope.toWireObject(): the JSON projection the transport sends and the receiver reconstructs.\n- Use it for the outbound base message; the class instance itself remains rejected by the canonicalizer.\n- Legacy-v1 canonical bytes are unchanged, and no inbound verification or trust logic changes.\n\nRegression test uses a real envelope with a Date and undefined optional fields, verifies JCS signing accepts the wire projection and that a JSON wire round trip produces identical canonical bytes for the receiver.
2026-11-28 16:51:08 -05:00
Lenin MookiahandLenin Mookiah 3e2fcdf4fd fix(init): use real memory subcommands in the installed memory command pages (#5167) (#5168)
Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-28 16:03:59 -05:00
Lenin MookiahandLenin Mookiah c4d6d6d0a4 fix(skills): point the init-installed swarm skills at tools and commands that exist (#5155) (#5165)
Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-28 16:03:55 -05:00
Lenin MookiahandLenin Mookiah 89ec2262d3 fix(init): use memory search --query in the generated command kit (#5163)
The kit that init copies from v3/@claude-flow/cli/.claude/commands called 'memory query' 21 times in 18 files. memory has no query subcommand, so those lines printed the memory help and exited 0. Rewrite them to 'memory search --query', keeping the prefix and the --namespace/--limit flags, and add a regression test over the kit.

Fixes #5160

Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-28 16:03:51 -05:00
ordinary being d0aafd59c8 fix(managed-store): wait for the ledger lock instead of a fixed attempt budget (#5172)
acquireLedgerLock() gave up after 20 attempts of 10 ms (~200 ms). Eight concurrent session creators can each take longer than that to read, fsync and rename the ledger while holding the lock, so a waiter threw EEXIST and lost the session record. This is the 'child exit 1: node:fs' failure in the managed-workflows cross-process test (#4751).\n\n- Wait up to 2 s instead of 20 attempts, with a 10-50 ms backoff.\n- Check for a stale lock before the deadline, so a dead writer is still reclaimed; a live lock still throws after the deadline.\n- Keep lock ownership and stale-lock policy unchanged.\n\nRegression test holds a live lock for 500 ms and asserts the session is recorded. The pre-change source throws EEXIST after ~200 ms; the change waits and records it.
2026-11-28 16:03:47 -05:00
Lenin MookiahandLenin Mookiah 5906c59efa fix(memory): show the export fallback note and stop claiming exported vectors (#5162)
memory export printed a plain success for -f csv and -f binary although it wrote JSON: the handler's csv note and its warnings were never printed, binary had no note, and the summary line 'Vectors: N' counted entries with an embedding while the file holds no vectors.

Print the note and warnings, give every non-JSON format a note, label the count as entries with embeddings, and mark csv/binary and --include-vectors as falling back / advisory in help and the tool schema.

Fixes #5158

Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-28 16:03:43 -05:00
rUvandr df1204f538 docs(releases): animated before/after pictures for the 3.80.10 and 3.80.11 notes (#5164)
Co-authored-by: r <r@x>
2026-11-27 14:44:26 -05:00
rUvandr d643ad93e3 chore(release): 3.80.11 (#5152)
- fix(config): honour --merge in config import (#5148, #5149)
- fix(agent): report agent spawn and stop failures from the MCP tool (#5150, #5151)

Co-authored-by: r <r@x>
v3.80.11
2026-11-27 11:37:38 -05:00
Lenin MookiahandLenin Mookiah 3d429b3de7 fix(agent): report agent spawn and stop failures from the MCP tool (#5150) (#5151)
Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-27 11:19:57 -05:00
Lenin MookiahandLenin Mookiah 9457b1ef04 fix(config): honour --merge in config import (#5148) (#5149)
Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-27 11:19:52 -05:00
rUvandr e8463ac3e2 chore(release): 3.80.10 (#5147)
Ships #5146 (#5145), #5141 (#5140), #5139 (#5138), #5136 (#5135), #5132 (#5131).

Co-authored-by: r <r@x>
v3.80.10
2026-11-27 08:47:36 -05:00
Lenin MookiahandLenin Mookiah 267b336739 fix(coordination): read a weight of 0 as 0 in weighted load balancing (#5131) (#5132)
Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-27 08:17:34 -05:00
Lenin MookiahandLenin Mookiah e3414cb2a0 fix(performance): use nearest-rank percentiles in performance_metrics and performance_report (#5135) (#5136)
Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-27 08:17:29 -05:00
Andrew Chen ecaea35396 fix(memory): rebuild the HNSW index from SQLite on forceRebuild (#5139)
getHNSWIndex({ forceRebuild: true }) only skipped the in-memory cache.
It still reopened hnsw.index and, when that file and its metadata
already held entries, returned them without reading SQLite. So
`memory search --build-hnsw` and `embeddings index rebuild` kept
deleted and stale vectors while reporting a rebuild.

A forced rebuild now ignores the persisted metadata, loads from SQLite
and saves the new metadata. The load also orders by updated_at DESC
before LIMIT 10000, so the cap keeps the newest rows.
2026-11-27 08:17:24 -05:00
Andrew Chen 2d569b08d0 fix(plugins): scan MCP servers declared in plugin.json (#5141)
Claude Code loads .mcp.json and then every plugin.json#mcpServers entry (a .json path, an inline map, or an array of either), but the marketplace-trust scan read only .mcp.json, so a server declared in the manifest skipped the mcp-command and unpinned-package checks. Scan each declared entry, and report one that points outside the plugin, is missing, is not JSON, or is a bundle or URL as high, like plugin.json#hooks (#5115).
2026-11-27 08:17:20 -05:00
ordinary being 288c773c49 fix(mcp): stop advertising listChanged in modern discovery (#5146)
The 2026-07-28 server/discover response copied the legacy capability object, including tools.listChanged: true. The stdio dispatchers have no subscriptions/listen handler, so a modern client that negotiated the revision opened a notification stream and repeatedly received 'Method not found: subscriptions/listen' (#5145).\n\n- Project discovery capabilities without listChanged, copying each capability object rather than mutating the caller's object.\n- Keep legacy initialize byte-equivalent: it still returns the original capabilities.\n- Do not fabricate a subscription handler; the static catalogue simply stops advertising a stream this server does not serve.\n\nRegression: discovery drops listChanged for tools/resources/prompts, legacy initialize keeps it, and the input object is unchanged. The new case fails against the pre-change source; the focused protocol suite passes.
2026-11-27 08:17:15 -05:00
rUvandr 3f2a40a2f0 chore(release): 3.80.9 (#5134)
Co-authored-by: r <r@x>
v3.80.9
2026-11-26 09:25:41 -05:00
76c61b4191 fix(cost-tracker): price Fable sessions instead of recording $0 (#5121), 0.31.4 (#5133)
* fix(cost-tracker): price Fable sessions instead of recording $0

modelTier() only knew haiku, sonnet and opus, so a Fable model id fell
through to `unknown`, and costForUsage() priced that tier at 0. track.mjs
wrote those sessions to the cost-tracking namespace with cost_usd 0 and
session.mjs showed them as free, although data/prices.json has Fable
rates. Add a `fable` tier derived from that entry, like the other three.

Closes #5121

* chore(cost-tracker): 0.31.4 for the Fable pricing fix (#5121)

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

---------

Co-authored-by: Ayham Joumran <140757050+AyhamJo7@users.noreply.github.com>
Co-authored-by: r <r@x>
2026-11-26 09:25:37 -05:00
0c6ffbabfa fix(memory,shared): CRLF frontmatter migration (#5107) + unguessable shared session ids; memory 3.4.1, shared 3.0.11 (#5130)
* fix(memory): migrate CRLF markdown frontmatter like LF (#5107)

Cherry-picked from #5109.

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

* fix(shared): unguessable MCP session ids; publish memory 3.4.1 + shared 3.0.11

- shared: session ids use crypto.randomUUID() instead of Date.now() +
  Math.random() (same fix #5117 made in v3/mcp).
- memory 3.4.1 carries the CRLF frontmatter fix from #5109 (#5107).
- Both leaves are published; CLI and root pins moved to them.

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

---------

Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
Co-authored-by: r <r@x>
2026-11-26 09:08:18 -05:00
Andrew Chen f68c21383a fix(start): read a CRLF config.yaml like an LF one (#5129) 2026-11-26 09:08:13 -05:00
rUvandClaude 0636aa749f dream(performance) (evaluated): memoize AttentionCoordinator's redundant per-head score computation (#5113)
* dream(performance): #5112 memoize AttentionCoordinator's redundant per-head score computation

multiHeadAttentionCoordination()'s computeAttentionScore(...,head) never
read `head`, so all 8 heads recomputed a byte-identical O(n^2)
cosine-similarity matrix and averaged 8 identical copies. Deferred
2026-10-30 (scored 4.60/5) to keep that night's patch to one conceptual
change; picked up tonight.

Memoized each (i,j) pair's score once per call via flat Float64Array/
Uint8Array typed arrays (a string-keyed Map was tried first and measured
slower at n>=400 -- disclosed in-source). computeAttentionScore call count
drops from numHeads*n^2 to n^2 (exact 8x, stash-verified); wall-clock
~6.2x-6.4x at n=300-400 (this session and an independent adversarial
critic, cross-validated). 7 new tests (2 discriminating, 5 controls),
full @claude-flow/swarm suite 389/389, 0 regressions, tsc clean.

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

* dream(performance): #5112 finalize witness stamp for 2026-11-25 gist

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

* dream(performance): #5112 append 2026-11-25 ledger row

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-26 08:45:03 -05:00
Andrew Chen a7dfa9d94d fix(memory): score the newest rows in the sql.js search fallback (#5125)
searchEntries() fell back to a sql.js scan with LIMIT 1000 and no
ORDER BY, so past 1000 live rows the newest entries were never scored.
Read newest first with the bridge's search window, as #5084 did for
`embeddings search`.
2026-11-26 08:43:26 -05:00
rUvandClaude adbe1e2ff7 dream(security) (evaluated): enforce allowShell/allowNetwork/allowFileWrite in MCP policy enforcer (#5127)
* dream(security): enforce allowShell/allowNetwork/allowFileWrite in MCP policy enforcer

.harness/mcp-policy.json declares allowShell/allowNetwork/allowFileWrite:
false, but policy-enforcer.ts never read them -- decorative, on the false
premise that shell/network/filesystem access isn't reachable from this
MCP server's own tool surface. Two independent dream-cycle research
passes tonight traced the real handlers: terminal_execute (execSync),
http_fetch (raw network), hooks_fast-apply/hooks_codemod (direct
writeFileSync) all perform these operations directly inside their own
MCP tool handlers, contradicting that premise.

Adds a small, explicitly-traced MCP_TOOL_CAPABILITY table and
checkCapabilityAllowed(), wired into evaluateToolCall(), to deny calls to
those four tools when the corresponding flag is explicitly false and
RUFLO_MCP_ENFORCE_POLICY=1 is set. A tool outside the table, or a flag
left undefined, keeps today's behavior unchanged. Corrects the matching
false claim in mcp-policy.json's $comment/rationale and the module's own
docstring; regenerates manifest.json's sha256 per .harness/README.md's
documented procedure.

Scoped to the four tools traced end-to-end tonight -- the broader surface
found during research (github_* exec paths, browser_* execFileSync, more
fetch()/writeFileSync call sites, and the separate HTTP/WebSocket
dispatcher that never calls this enforcement module at all) is disclosed
as follow-up, not fixed here.

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

* dream(security): #5126 add 2026-11-26 research gist

Research gist for tonight's Dream Cycle (DEEP=security, SCAN=intelligence,swarm):
MCP policy allowShell/allowNetwork/allowFileWrite decorative-enforcement gap,
competitor comparison, hypothesis, evaluation receipt, independent adversarial
critique, Darwin skip rationale, witness, and scan findings (intelligence SONA
EWC inert for 3/5 modes; swarm PBFT leader-impersonation gap in byzantine.ts).

gh gist create unavailable (GH_TOKEN invalid, no gist MCP tool) -- committed
in-repo per established precedent since 2026-09-30.

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

* dream(security): #5126 update LEDGER for 2026-11-26

Appends tonight's row (security, #5126/#5127, ACCEPT) and a note confirming
the 2026-11-25 ledger-append gap is the same recurring cosmetic STEP 25 issue
flagged by several prior nights, not a pipeline failure (branch/PR #5112/#5113
both verified to exist via list_pull_requests).

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-26 08:34:15 -05:00
Lenin MookiahandLenin Mookiah d48671d961 fix(start): use mcp.port from config.yaml when --port is omitted (#5106) (#5108)
start always used port 3000 unless --port was passed: the flag fell back to
the default before the config lookup, the --port option had a parser
default, and the lookup read mcp.serverPort while init writes mcp.port.
Use --port, then numeric mcp.port, then mcp.serverPort, then 3000.

Fixes #5106

Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-26 08:34:11 -05:00
ordinary being b08193f9cf fix(plugin-scan): resolve plugin.json#hooks before scanning (#5116)
The marketplace-trust scanner read hooks only from hooks/hooks.json, while Claude Code takes the file from .claude-plugin/plugin.json#hooks. A plugin that renamed its hooks file escaped both the command-hook risk scan and the loaded-module walk; its listed modules, including ones under tests/ or outside the plugin, went unreported (#5115).\n\n- Resolve the hooks source the way the host does: a string path inside the plugin, an inline hooks object, or the default hooks/hooks.json.\n- A declared path outside the plugin, missing, non-regular or invalid JSON is a high finding, never a silent skip.\n- Run scanHooksJson and scanLoadedModules on the resolved file, resolving modules against its directory and citing that file in findings.\n- Keep the generic hooks/ module walk as coverage beyond the manifest.\n\nRegression tests compare a renamed hooks file against the default layout, cover command hooks, inline hooks, outside/missing paths and invalid JSON. All five cases fail on the pre-change source and pass with the fix.
2026-11-26 08:34:08 -05:00
rUvandr 48b04dce28 chore(release): 3.80.8 (#5118)
Ships #5117: linear-time channel-guard role-shift scan (CodeQL js/polynomial-redos).

Co-authored-by: r <r@x>
v3.80.8
2026-11-25 09:44:01 -05:00
rUvandr ca70a30672 fix(security): linear-time channel-guard role scan, unguessable MCP session ids (#5117)
* fix(security): linear-time channel-guard role scan, unguessable MCP session ids

- channel-guard (cli, shipped) and channel-guard-worker (hooks): the
  role-shift regex `(^|\n)\s*(system|...)` was quadratic on newline runs
  (CodeQL js/polynomial-redos #256): 400k newlines took about a minute.
  `[^\S\n]*` can't cross a newline, so the scan is linear. Leading blank
  lines before a first role marker still count as the preamble.
- legal-contracts extractKeyTerms: `\d+\s*(days?...)` and `\d+%` were
  quadratic on digit runs (CodeQL #325); `(?<!\d)` anchors them.
- shared/mcp and v3/mcp SessionManager: replace timestamp + Math.random()
  session ids with randomUUID(), matching @claude-flow/mcp.

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

* revert shared/mcp session-manager change (needs its own leaf publish; follow-up)

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

---------

Co-authored-by: r <r@x>
2026-11-25 09:21:13 -05:00
rUvandr f8a62a5f0e chore(release): 3.80.7 (#5105)
Ships #5102 (CRLF memory_import_claude, #5101), #5104 (start honours
swarm.topology from config.yaml, #5103) and #5097 (dead QLearningRouter probe).

Co-authored-by: r <r@x>
v3.80.7
2026-11-24 21:36:01 -05:00
Lenin MookiahandLenin Mookiah c807316b06 fix(start): use swarm.topology from config.yaml when --topology is omitted (#5103) (#5104)
Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-24 21:13:45 -05:00
Lenin MookiahandLenin Mookiah 22bdf92192 fix(memory): import CRLF Claude memory files like LF ones (#5101) (#5102)
memory_import_claude matched frontmatter and ## headings with \n only, so a
CRLF memory file kept its frontmatter in the stored content, used the file
name as the key and kept each section's heading line. Accept \r?\n, as the
auto-memory bridge already does for the same files.

Fixes #5101

Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-24 21:13:39 -05:00
rUvandClaude 99aeeac722 dream(swarm) (evaluated): remove dead @ruvector/core native-probe from QLearningRouter (#5097)
* dream(swarm): remove dead @ruvector/core native-probe from QLearningRouter

initialize() dynamically imported '@ruvector/core' hoping for a native
createQLearning() backend, but route()/update() never read the resulting
engine back -- the probe was dead state regardless of which package it
targeted. Confirmed: @ruvector/core is not a dependency here and isn't
installed anywhere reachable from this package; even the real published
package exports no createQLearning; @claude-flow/neural's createQLearning
(the only real, working implementation in this monorepo) uses an
incompatible trajectory-batch API. Removes the probe, documents why
useNative stays a permanent false, and adds a discriminating test.

Deferred twice before (2026-10-29, 2026-11-14) under the "wrong package"
framing; tonight's research found the deeper bug: no package swap could
ever have mattered, since nothing downstream consulted the result.

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

* docs(dream-cycle): add 2026-11-24 swarm SOTA report + witness

Research gist for tonight's dream cycle (DEEP=swarm, SCAN=ruview-
integration,ruvector-integration). Witness computed over this file with
Candidate commit/Gist SHA-256/Witness stamp held at PENDING, concatenated
with the session commit, per the documented verifier procedure.

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

* docs(dream-cycle): append 2026-11-24 ledger row (#5096, #5097)

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-24 13:01:19 -05:00
rUvandr aa9706f15e chore(release): 3.80.6 (#5100)
Ships #5092 (daily security scan: metaharness spawn containment, agenticow path containment), #5094 (CRLF lcov parsing, fixes #5093) and #5098 (learning-loop ingest screening, #5067).

Co-authored-by: r <r@x>
v3.80.6
2026-11-24 12:11:13 -05:00
ordinary being 36d0c2f6a9 fix(learning-loop): screen CLI ingest evidence and lesson paths (#5098)
#5067's mod-side fix screens the task and verifier before writing, but the CLI ingest still accepted legacy or hostile records: a secret in task/verifier evidence, ledger evidence, or a token-shaped file name could be stored and later cited as a lesson.\n\n- parseRecord() rejects a task carrying a recognised secret shape and redacts verifier.command before it reaches SONA feedback or lessons.\n- readLedger() redacts stored evidence and re-verify check names.\n- buildLessons() drops secret-shaped keywords and redacts evidence again at build time.\n- The CLI lessonFile() rejects a token-shaped path; the mod-side copy is bundled into the signed learning-loop.cjs, so its matching screen remains a follow-up requiring the maintainer re-sign.\n- Added regression coverage for a synthetic GitHub token in task, verifier command, ledger evidence, lesson keyword/evidence, and CLI file anchors.
2026-11-24 08:39:53 -05:00
Lenin MookiahandLenin Mookiah 49c76a9ce3 fix(coverage): parse CRLF lcov.info without dropping the last record (#5094)
parseLcov compared raw '\n'-split lines, so on CRLF input end_of_record
never matched: the last record was dropped and paths kept a trailing '\r'.
Trim each line and flush a record left open at the end of the input, as
commands/coverage-reader.ts already does.

Fixes #5093

Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-24 08:39:48 -05:00
rUvandClaude e7bc48f0a3 fix(security): daily scan 2026-11-24 — 2 fixes (#5092)
* fix(security): untrusted package execution in metaharness bin lookup

The metaharness bin resolver walked up node_modules from the MCP server's
working directory, so a project that ships its own node_modules/metaharness
had that package's bin run by score/genome/mcp-scan/threat-model and the
other metaharness tools. Resolve only from ruflo's own install tree
(fromCwd:false), as _darwin.mjs and _redblue.mjs already do, and fall back
to the pinned cache install. Extend test-no-tool-time-npx.mjs Phase 5.

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

* fix(security): path traversal in agenticow MCP tools

agenticow_* handlers accepted any absolute memory path from tool input and
created or overwrote <path> and <path>.agenticow.json there. Paths from MCP
input now go through resolveToolMemoryPath, which requires both files to
resolve inside the project (real parent directory, no symlinked or
executable target) via containedWritePath. The local CLI keeps its ability
to name any path. Add agenticow-path-containment.test.ts.

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

* chore(plugins): bump ruflo-metaharness to 0.5.4 for the bin lookup fix

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-24 08:39:44 -05:00
rUvandr e2e036c0db chore(release): 3.80.5 (#5091)
- fix(system): system_health reports persisted swarm state (#5087, fixes #2967)
- fix(cli): a subcommand's own --format choices shadow the global ones (#5083)
- fix(embeddings): embeddings search scores the newest rows (#5084)

Co-authored-by: r <r@x>
v3.80.5
2026-11-23 22:28:37 -05:00
Thejesh beb540c1be fix(embeddings): score the newest rows in embeddings search (#5084)
The candidate SELECT used LIMIT 1000 with no ORDER BY, so on a store
with more than 1000 embedded rows SQLite returned the oldest-inserted
1000 and the newest entries were never scored (#2982's root cause,
fixed in the memory bridge but not in this command, which reads
memory.db directly). Order by updated_at DESC and use the bridge's
search window (10000, CLAUDE_FLOW_SEARCH_WINDOW).
2026-11-23 22:05:22 -05:00
Thejesh 40be218598 fix(cli): let a subcommand's own --format choices shadow the global ones (#5083)
validateFlags checked a subcommand's --format against both its own
choices and the global text/json/table choices, so every
subcommand-specific value failed: `process monitor` exited 1 on its own
default `dashboard`, and `session export --format yaml`,
`analyze dependencies --format dot` and `performance metrics --format
prometheus` could not be selected. A command's own option now shadows
the global one of the same name, as it already does for parsing and
defaults.
2026-11-23 22:05:19 -05:00
Lenin MookiahandLenin Mookiah b2774b6603 fix(system): report persisted swarm state in system_health (#5087)
The swarm check in system_health was a fixed 'unknown' entry even after
swarm_init persisted a running swarm. Read the persisted state through
loadSwarmStore(): running swarms are healthy, no swarm stays advisory
(unknown), and a corrupt store is a warning.

Fixes #2967

Co-authored-by: Lenin Mookiah <2639584+leninworld@users.noreply.github.com>
2026-11-23 21:26:39 -05:00
rUv 65eb9fdcb2 docs(readme): tag each ruPro link with its own campaign (#5090)
The two hero images, Explore ruPro and Try the interactive demo all
pointed at untagged cognitum.one URLs, so a ruPro waitlist lead could
not be traced to the link that brought it in (cognitum-one/website#1536).
Each now carries utm_source=github, utm_medium=readme and a distinct
utm_campaign. The demo tags sit before the #demo fragment, where the
site can read them.
2026-11-23 18:24:59 -05:00
rUvandr e14d7f42bb chore(release): 3.80.4 (#5089)
Republishes 3.80.3's content. The 3.80.3 CI publish uploaded all three
archives, but npm never stored their SLSA provenance bundles (the registry
origin serves only the publish attestation), so ADR-545 left them on
release-3-80-3 and latest stayed at 3.80.2.

Carries #5079 (#5086), #5081 (#5082, neural 3.1.2) and #5085.

Co-authored-by: r <r@x>
v3.80.4
2026-11-23 15:54:44 -05:00
rUvandr d87eceff4f chore(release): 3.80.3 (#5088)
- doctor Version Freshness compares against latest, not frozen alpha (#5079, #5086)
- ReasoningBank excludes contradicted memories at retrieval via @claude-flow/neural 3.1.2 (#5081, #5082)

Co-authored-by: r <r@x>
2026-11-23 14:30:55 -05:00
rUv 9936abe8b5 fix(cli): isolate tool-time npx, contain metaharness file arguments, validate daemon stop target (3.80.3) (#5085)
Tool-time npx calls resolve packages from a ruflo-owned prefix instead of the opened project; metaharness MCP file arguments stay inside the project; daemon stop only signals a validated ruflo process. Release 3.80.3 (helpers manifest re-signed).

Co-Authored-By: claude-flow <ruv@ruv.net>
v3.80.3
2026-11-23 14:17:00 -05:00