Commit Graph
10310 Commits
Author SHA1 Message Date
rUv 6f44e533bd Merge pull request #4919 from ruvnet/fix/2305-embedding-config
fix(cli): memory path honours .claude-flow/embeddings.json (#2305)
2026-11-09 17:44:33 -05:00
rUv f2fe699728 Merge pull request #4918 from ruvnet/fix/3153-1177-tool-names-start-all
fix(codex): registered tool names in AGENTS.md (#3153); feat(cli): start all (#1177)
2026-11-09 17:44:29 -05:00
rUv 7dfce96333 Merge pull request #4915 from ruvnet/fix/4715-core005-compact-boundary
fix(aidefence): CORE-005 compact matching flags sentence-ending "you are now" (#4715)
2026-11-09 17:44:25 -05:00
rUv 6bfdd25f08 Merge pull request #4920 from ruvnet/fix/4861-pii-guard-toggle
feat(plugins): separate piiGuard option from the secret guard (#4861)
2026-11-09 17:44:19 -05:00
randRuFlo 102296b080 chore(cli): pin @claude-flow/aidefence 3.1.2 (published)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 16:42:09 -05:00
rUv f6fe4199f7 Merge pull request #4923 from ruvnet/feat/1227-memory-scopes
feat(memory): wire AgentMemoryScope into memory store/retrieve/search (#1227)
2026-11-09 16:38:52 -05:00
rUv a4c5303848 Merge pull request #4922 from ruvnet/feat/4852-4851-automemory
fix(helpers): auto-memory resolves @claude-flow/memory itself (#4851); read --all, read-id, dedupe (#4852)
2026-11-09 16:38:48 -05:00
rUv b3e474e512 Merge pull request #4917 from ruvnet/fix/3215-agent-spawn-model-id
fix(cli): let agent_spawn take an exact model id (#3215)
2026-11-09 16:38:43 -05:00
rUv 76ab3a37ca Merge pull request #4914 from ruvnet/fix/4862-aidefence-learn-pii
fix(cli): aidefence_learn no longer records PII feedback as a missed injection (#4862)
2026-11-09 16:38:39 -05:00
randRuFlo 9590c151ee test(ci): keep the new piiGuard kit tests off the root vitest run (#4861)
plugins/ruflo-{federation,intelligence}/tests/pii-guard.test.ts import
claude-code/testing and run under claude plugin test, like the other kit
tests in scripts/ci-test-excluded.txt.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 15:17:42 -05:00
randRuFlo 1f6ac3efbd chore(aidefence): bump to 3.1.2 for the CORE-005 compact-boundary fix
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 15:11:04 -05:00
rUv 8d7866a9bb Merge pull request #4916 from ruvnet/fix/4714-pattern-search-zero-match
fix(cli): report a healthy pattern-search zero-match as a no-match, not degraded (#4714)
2026-11-09 14:38:19 -05:00
rUv 024bb49a7b Merge pull request #4913 from ruvnet/fix/4880-4876-persist-and-search
fix(cli): report failed pattern persistence and unified-search namespace errors (#4880, #4876)
2026-11-09 14:38:15 -05:00
rUv 55df93a644 Merge pull request #4912 from ruvnet/fix/tool-schema-limits
fix(cli): advertise the real input limits in aidefence_scan, hierarchical-store and post-task schemas
2026-11-09 14:38:10 -05:00
rUv 861ae9e3c8 Merge pull request #4909 from ruvnet/fix/4888-atomic-short-write
fix(cli): write every byte in writeFileAtomic before rename (#4888)
2026-11-09 14:38:05 -05:00
rUv bdcf37c3fa Merge pull request #4908 from ruvnet/fix/4902-queen-failover-config
fix(swarm): honor enableFailover and maxDelegationAttempts in QueenCoordinator (#4902)
2026-11-09 14:38:01 -05:00
randRuFlo c7a6241947 chore(helpers): re-sign the helpers manifest for the auto-memory hook change
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:41:20 -05:00
randRuFlo f72eb46280 feat(memory): wire AgentMemoryScope into memory store/retrieve/search (#1227)
A scope is a namespace prefix in the same store:
agent-memory:<scope>:<agentId>:<namespace>. memory_store, memory_retrieve
and memory_search take an optional scope (project|local|user) plus the
agentId the memory package keys each scope by; the CLI gets matching
--scope/--agent flags. Without a scope nothing is prefixed, so existing
data and unscoped calls behave exactly as before. New read-only tool
memory_list_scopes reports each scope's agents, namespaces and counts.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:39:44 -05:00
randRuFlo b7e4ce9d8e feat(helpers): auto-memory read --all, read-id and dedupe for duplicate keys (#4852)
`read <ns> <key>` refused a key held by several entries with AMBIGUOUS_KEY
and no ids, so there was no way to see the duplicates or repair them.

- The AMBIGUOUS_KEY refusal now lists every matching id with its
  createdAt and updatedAt, and names the commands below.
- `read --all <ns> <key>` returns {multiplicity, entries[]}; `read-id <id>`
  returns one entry by id. Both are read-only: no package load, no
  directory, no lock, no write.
- `dedupe <ns> <key> [--keep <id>] [--apply]` is a dry run by default and
  reports which entry would be kept (newest updatedAt, then createdAt;
  ties broken by ascending id) and which removed. With --apply it plans
  again from a fresh read under the store lock, removes only the other
  entries of that namespace+key through the atomic write, and verifies
  the result by readback. --keep must name an entry of that key, or the
  command is refused and the store is left as it was.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:37:16 -05:00
randRuFlo 724f06e442 fix(helpers): auto-memory hook resolves @claude-flow/memory without a sidecar (#4851)
SessionStart runs auto-memory-hook.mjs directly, and the hook only found
@claude-flow/memory through the sidecar that init / upgrade / doctor write.
A fresh worktree has no sidecar (.claude-flow/ is gitignored), so imports
were DISABLED there.

The hook now tries, in order: its own sidecar; the main checkout's sidecar
when it runs in a git worktree; the in-repo dist; require.resolve from the
helper's install root and from the helper's own directory; and the CLI's
own dependencies (@claude-flow/cli, directly or under ruflo / claude-flow),
which is where recordMemoryPackagePath() resolves from. Candidates come
from MODULE_ROOT or the helper's directory only, never CLAUDE_PROJECT_DIR.
A candidate is used only if it exports AutoMemoryBridge. import and sync
record the found path in the sidecar, so the next run is fast; status
reports where it resolved but writes nothing. When nothing resolves, the
existing DISABLED warning now lists every place searched and why each
failed. No network, no install.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:35:05 -05:00
randRuFlo 34fdbec812 feat(cli): start all runs project init first when never initialized (#1177)
Step 0 of `start all` is now project init, using the exact path
`start quick` uses: isInitialized() (.claude-flow/config.yaml) and, only
when that is false, `init --minimal`. That init call is extracted into
runMinimalProjectInit() and shared by both subcommands, so `quick` keeps
its behaviour and `all` never re-inits an initialized project. A failed
or throwing project init stops the run with exitCode 1 and
failedStep: 'project init'.

runStartAll and its injectable StartAllDeps move to
src/commands/start-all.ts; start.ts is back to 487 lines.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:32:38 -05:00
randRuFlo fe31e4c61e test(cli): import the MCP schema validator from source
CI runs vitest from the repo root, where @claude-flow/mcp is not
resolvable as a package, so the import failed and the file counted as a
new failure in the test ratchet.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:15:01 -05:00
randRuFlo ffb8cb6f90 test(cli): import the MCP schema validator from source
CI runs vitest from the repo root, where @claude-flow/mcp is not
resolvable as a package, so the import failed and the file counted as a
new failure in the test ratchet.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:14:59 -05:00
randRuFlo d96d246e5c docs(plugins): README names the piiGuard option (#4861)
Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:13:25 -05:00
randRuFlo 59377fdb63 feat(plugins): separate piiGuard option from the secret guard (#4861)
ruflo-federation's one `guard` switch gated both the secret refusal and
the SSN/card refusal, so an operator could not make PII informational
without also dropping secret screening. Add a `piiGuard` userConfig
option (default on: behaviour unchanged) wherever `guard` is declared:

- ruflo-federation 0.4.0: verdict() takes the options; the hasPii refusal
  runs only while piiGuard is on. Secrets and input too large to screen
  are still refused whenever guard is on.
- ruflo-intelligence 0.5.0: the hooks_transfer EMAIL refusal is gated by
  piiGuard; the secret refusal is not. piiGuard joins the status file.
- ruflo-console 0.50.0: the mission screen gets a distinct `secret`
  status from the local secret screen (blocks guidance even when
  AIDefence is missing); `pii` blocks only while the new piiGuard option
  is on, otherwise the finding is reported in a `safe` result's detail.

New tests per plugin: default refuses PII; piiGuard off lets PII-only
text through; a secret is still refused with piiGuard off; guard off
behaves as before.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:11:22 -05:00
randRuFlo 02e5341fe7 fix(cli): memory path honours .claude-flow/embeddings.json (#2305)
`embeddings init` writes { model, dimension } to .claude-flow/embeddings.json,
but memory init, the AgentDB bridge and the router task embedder all
hardcoded Xenova/all-MiniLM-L6-v2 / 384.

Add src/memory/embedding-config.ts: resolveEmbeddingConfig(root) reads that
file (same schema commands/embeddings.ts writes; bare model names get the
Xenova/ namespace), falls back to MiniLM/384, and warns once on malformed
JSON. resolveEffectiveEmbeddingConfig() additionally checks memory.db and
agentdb-memory.db: if either already holds real vectors of another
dimension, that recorded dimension is kept with one warning; nothing is
mixed or rebuilt. Resolutions are cached per root.

Used by loadLocalEmbeddingChain, fresh vector_indexes seeds, the bridge's
registry init / embedding labels / dimension stub check, and task-embedder.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:11:08 -05:00
randRuFlo 08f72811ee feat(cli): add start all — init memory if needed, start daemon, then start (#1177)
`ruflo start all` initializes the memory database only when it is not
initialized yet (checkMemoryInitialization, then initializeMemoryDatabase
with force: false), starts the worker daemon only when it is not already
running (isDaemonAlive, then the existing `daemon start` action), and then
runs the main start action. It stops at the first failing step and
returns exitCode 1 naming that step. Existing subcommands are unchanged.

The steps are injectable (runStartAll(ctx, deps)) and the tests mock all
of them: fresh project, already-initialized project with a running
daemon, and a failure at each step.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:06:12 -05:00
randRuFlo 1664b0c887 fix(cli): report a healthy pattern-search zero-match as a no-match, not degraded (#4714)
agentdb_pattern-search only treated a ReasoningBank result as success when
it had hits. A healthy empty result fell through to the legacy
pattern-namespace fallback and came back degraded:true with
reason "reasoningBank-empty:reasoningBank", so callers that honour
`degraded` stopped although every read completed.

- bridgeSearchPatterns now reports read failures in-band (`error`):
  a throwing controller, a non-array controller result, and a failing
  reasoning_patterns substring scan. These used to become [] or null.
- The handler returns {results: [], noMatch: true, degraded: false,
  controller: 'reasoningBank', searched: [...]} only when ReasoningBank ran
  without error AND the legacy semantic, list and hydrate reads all
  succeeded with nothing found. scanLimited is set when the namespace
  holds more than the 200 entries the substring scan reads.
- A ReasoningBank error stays degraded with reason reasoningBank-error:<msg>.
  Legacy list/hydrate failures are now surfaced as listError.
- Legacy hits after an empty ReasoningBank keep the existing labelling;
  ReasoningBank hits are returned unchanged.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:05:35 -05:00
randRuFlo 836e890279 fix(codex): name only registered MCP tools in generated AGENTS.md (#3153)
The default/full/enterprise AGENTS.md templates told agents to call
`task_orchestrate` and `benchmark_run`, neither of which is a registered
MCP tool. Replace them with registered tools whose schemas match the
examples: `task_create` (assign/track work), `coordination_orchestrate`
(task coordination), `performance_benchmark` (benchmarks).

Add a CLI test that renders every AGENTS.md and CLAUDE.md template,
extracts every backticked snake_case tool-like name (bare or call form,
hyphens allowed), and checks each against listMCPTools().

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:04:51 -05:00
randRuFlo 1b2deae0ee fix(cli): let agent_spawn take an exact model id (#3215)
agent_spawn's input schema limited `model` to five aliases, so a client
that validates against the schema could not pass an exact model id such
as claude-opus-5-5 or openrouter/anthropic/claude-sonnet-5.5, although
the handler already passes non-alias strings through as modelId (#2962).

The enum is now a bounded string (1-256 chars) with an anchored pattern:
letters, digits and . _ : / @ + -, starting with a letter or digit. The
handler applies the same check to `model` and to `config.model` (the
`agent spawn -m` path, which the schema never sees), so whitespace and
shell metacharacters are refused before the agent is stored. Aliases
route as before; exact ids are reported back as modelId.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:04:39 -05:00
randRuFlo 433a7825b7 fix(cli): stop aidefence_learn recording PII feedback as a missed injection (#4862)
aidefence_learn treated any wasAccurate=false with no threat detected as a
false negative and recorded it as a missed prompt_injection, so marking a PII
detection as inaccurate taught the registry a fake injection. When the scan
found PII and the feedback is PII-related (no threatType, or one naming PII),
nothing is recorded now and the response says why. wasAccurate is documented
as covering threat detection only.

Adds retractKnownMiss(input, threatType, cwd), which removes exactly the
matching hash+type entry through the module's atomic write and leaves the
store untouched when nothing matches, exposed as retract=true on
aidefence_learn.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:03:03 -05:00
randRuFlo 6fad2c5805 fix(aidefence): keep CORE-005's trailing whitespace meaning in compact matching
Compact matching dropped every \s+ from a rule and every period from the
text, so CORE-005 (you\s+are\s+now\s+(?!going|about|ready)) became
youarenow(?!...) and matched prose ending a sentence, such as
"a price that fits where you are now." followed by a new line.

- compactSource turns a trailing required \s+ (followed only by
  lookarounds) into \s*(?=[^\s.!?,;:]) instead of dropping it.
- The compact text keeps one "." where a stripped run containing a
  period ends a line or the text, so the sentence boundary survives.

The dotted, zero-width-joined and camel-cased multiline role switches
from the issue are still detected, as is the plain base-variant case.

Fixes #4715

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 12:03:00 -05:00
randRuFlo 550691ab7c fix(cli): advertise the real input limits in aidefence_scan, hierarchical-store and post-task schemas
Schema and description metadata only; validation logic and limits are unchanged.

- aidefence_scan.input (#4886): maxLength 10000, description states the
  bound is 10000 UTF-16 code units (validateText default) and that JSON
  Schema maxLength counts code points.
- agentdb_hierarchical-store.value (#4892): minLength 1, maxLength 10000,
  same UTF-16 note. The only input that reaches the "max 100KB" error is
  the empty string (validateText refuses >10000 first), so that message
  now states the effective 10000-character limit.
- hooks_post-task taskId/agent/parentAgentId (#4887): a pattern
  equivalent to cli-core IDENTIFIER_RE, maxLength 128, `not: {enum}` for
  the CLI's reserved names, and descriptions saying these are registered
  native IDs, not host paths like /root/x. agent's pattern also accepts
  '' because the handler treats an empty agent as omitted and the HTTP
  transport enforces pattern/minLength at runtime.

Adds __tests__/tool-schema-limits.test.ts, which checks each schema with
ajv and with @claude-flow/mcp's runtime validateSchema against the real
validators and handlers.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 10:33:59 -05:00
randRuFlo ca838868be fix(cli): report unified-search namespace errors and elapsed time (#4876)
memory_search_unified:
- searchTime is now elapsed time ("12.34ms"), not a Date.now() timestamp.
- Per-namespace failures (thrown errors and success:false results such as
  "Database not found") are returned as namespaceErrors with
  namespacesSearched / namespacesFailed counts. success stays true for
  partial coverage and is false only when every namespace failed.
- Namespaces are searched concurrently, at most 4 at a time, through a small
  in-handler pool. Each search is a read of the same store with no shared
  mutable state. Results are slotted by namespace position and flattened in
  namespace order before the existing stable sort, so ranking and ordering
  match the sequential loop.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 10:32:54 -05:00
randRuFlo c05262236b fix(cli): report failed pattern persistence instead of claiming success (#4880)
LocalReasoningBank.flushToDisk() caught write errors such as ENOSPC, logged
them and left the bank dirty, but returned void, so recordTrajectory() still
returned true for patterns that only existed in memory.

- flushToDisk() now returns a boolean: true when persisted or nothing to
  write, false when the write failed (state stays dirty). It still never
  throws, so the debounce timer path is unchanged. The lock/merge/temp-file
  + rename algorithm is untouched.
- The last flush error and attempt time are recorded and exposed read-only
  through getFlushState() and getPersistenceStatus() (dirty, lastFlushError,
  lastFlushAt). A successful flush clears the error.
- recordTrajectory() and flushPatterns() return the flush result.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 10:32:54 -05:00
randRuFlo aad51af948 fix(cli): write every byte in writeFileAtomic before rename (#4888)
writeFileAtomic called writeSync once and ignored the returned byte count,
then fsynced and renamed the temp file over the target. A short write
(allowed by POSIX) published a truncated file and returned success.

Loop on writeSync's return value, advancing the buffer offset and file
position until every byte is written; throw if a call makes no progress.
The fsync, close, rename, chmod, directory fsync and cleanup-on-error
sequence is unchanged.

Fixes #4888

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 10:27:42 -05:00
randRuFlo 2dab8d94b1 fix(swarm): honor enableFailover and maxDelegationAttempts in QueenCoordinator (#4902)
QueenCoordinatorConfig declared enableFailover (default true) and
maxDelegationAttempts (default 3), but selectBackupAgents() ignored both
and hardcoded a cap of 2 backups.

selectBackupAgents() now returns no backups when enableFailover is false
and caps backups at max(0, maxDelegationAttempts - 1), counting the
primary as the first attempt. The defaults give 2, so default behavior is
unchanged.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 10:27:42 -05:00
rUv 29be054e85 Merge pull request #4904 from ruvnet/weaver/ruflo-zod4-floor
fix(deps): zod ^4.6.7 for claims/hooks/12 v3 plugins, gastown uuid → randomUUID, integration agentic-flow floor, mcp/codex ranges
2026-11-09 02:33:09 -06:00
randclaude-flow 1228287f96 fix: move @claude-flow/shared to its own PR; codex VERSION 3.0.7; floor tests survive the root ratchet
- @claude-flow/shared is a registry-resolved leaf of the cli
  (audit-leaf-package-publish): a shared version bump has to land in the same
  PR as the cli's pin, which belongs to the release lane. Its zod 4 port moves
  to a separate PR, and this one leaves shared exactly as on main.
- codex exports VERSION; it now matches package.json 3.0.7
  (audit-codex-integration).
- The repo-root test ratchet runs the v3 plugin tests against the root
  install, which hoists zod 3. The floor tests now assert the declared range
  statically, and run their runtime checks only when the resolved zod
  satisfies it, so they still fail on main's source (both checks red) and
  skip, rather than test the wrong library, under the root install.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-09 02:49:13 -05:00
randclaude-flow f3a5d14414 docs(readme): ADR-356 quickstarts for the 18 published packages in this batch
Each README gets the package's one job in its first paragraph, supported
environments, a quickstart whose expected output was captured by running it
against a freshly installed `npm pack` tarball, a link to the related
package, and the ruv.io footer. Packages above 1,000 downloads a month
(shared, hooks, mcp, codex, gastown-bridge, hyperbolic-reasoning,
perf-optimizer) get an animated SVG of their data flow (CSS keyframes, no
scripts, reduced-motion aware).

perf-optimizer's README named a package that does not exist on npm
(@claude-flow/plugin-performance-optimizer); it now names
@claude-flow/plugin-perf-optimizer.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-09 02:31:40 -05:00
randclaude-flow ab18c33548 fix(deps): zod ^4.6.7 floor, integration agentic-flow ^2.0.14, mcp/codex/shared advisory floors
zod (GHSA-mrhx-c7xc-m3w5): shared, claims, the twelve v3 plugins,
ruvector-upstream, plugins/ruflo-{arena,ai-team,chatgpt-federation,x-gateway}
and goal_ui move to zod ^4.6.7. hooks declared zod but never imported it, so
the dependency is dropped.

gastown-bridge drops uuid/@types/uuid (GHSA-w5hq-g745-h8pq).

integration: peer agentic-flow ^2.0.0-alpha -> ^2.0.14 || ^3.0.0
(GHSA-vcv2-r9jh-99m5). The repo source already matched the published 3.0.2,
so this ships as 3.0.3. A patched agentic-flow leaves a ReasoningBank timer
alive, which made plugins/ruflo-cost-tracker/scripts/compact.mjs print its
result and never exit; compact.mjs now exits after stdout drains, guarded by
scripts/smoke-compact-exit.mjs (hangs on main, passes here) in
cost-tracker-smoke.

Stale ranges outside the cli: mcp ws ^8.21.0 (GHSA-96hv-2xvq-fx4p), express
^4.22.3 (GHSA-qw6h-vgh9-j6wx), ajv ^8.20.0 (GHSA-2g4f-4pwh-qvx6); codex yaml
^2.8.3 (GHSA-48c2-rrv3-qjmp); shared express ^4.22.3 || ^5.1.0. Each package
gets an advisory-ranges test over its own manifest.

ADR-356 metadata on every published manifest: homepage https://ruv.io,
canonical repository with directory, bugs, 8-20 keywords, description
<= 200 characters.

Versions: shared 3.0.8, hooks 3.0.3, claims 3.0.1, integration 3.0.3,
mcp 3.1.7, codex 3.0.7, gastown-bridge 0.1.6, prime-radiant 0.1.7, other
v3 plugins one alpha up. Marketplace plugin.json bumps for the five changed
plugins. The cli, claude-flow and ruflo pins are left for the release lane.

Lockfiles: v3/pnpm-lock.yaml drops the agentic-flow@2.0.0-alpha tree;
standalone plugin locks were regenerated with npm 11 (npm 10 crashed on a
stale optional peer in four of them).

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-09 02:21:15 -05:00
2d789faadc fix(zod4): port shared and v3 plugin schemas to zod 4; gastown convoy IDs from crypto.randomUUID
zod < 4.6.6 can exhaust memory validating oversized constrained collections
(GHSA-mrhx-c7xc-m3w5, high) and has no 3.x fix. This ports the zod 3 APIs
that break under zod 4:

- ZodError.errors -> .issues (shared config validator, gastown sanitizers,
  validators, sync bridge)
- one-argument z.record(value) -> z.record(z.string(), value)
- z.ZodType<Out, ZodTypeDef, In> -> z.ZodType<Out, In>
- prime-radiant: `.default({})` no longer parses the default under zod 4, so
  nested defaults were dropped; the default now parses `{}`
- gastown: MCP inputSchema conversion reads zod 4's `_def.shape`/`_def.type`

The shared and plugin source ports are taken from #4535 by Dragan
Spiridonov (proffesor-for-testing), applied onto current main.

gastown-bridge also drops `uuid` (GHSA-w5hq-g745-h8pq): it only generated
v4 convoy IDs, now `crypto.randomUUID()`.

Tests: every v3 plugin gets a red/green zod floor test against its real
input schema. An oversized bounded array of invalid elements yields one
`too_big` issue under zod >= 4.6.6 and one issue per element below it; the
tests fail on main's source with zod 3.25.76 and pass here.

Co-authored-by: Dragan Spiridonov <spiridonovdragan@gmail.com>
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-09 02:20:56 -05:00
rUv ef6ae01c26 Merge pull request #4901 from ruvnet/weaver/ruflo-unregistered-optdeps
fix(plugins): drop unregistered optionalDependencies (dependency confusion); guard monteCarlo on empty input (#2025)
2026-11-09 00:48:58 -06:00
rUv 2d590fc041 Merge pull request #4900 from ruvnet/fix/3.74.1-stale-helpers
fix(release): refuse stale helpers at publish; release 3.74.1
v3.74.1
2026-11-09 00:32:48 -06:00
ruvandakhilesharora 0180d69f15 fix(plugins): drop unregistered optionalDependencies; guard monteCarlo on empty input
financial-risk and healthcare-clinical declared five unscoped
optionalDependencies that are not registered on npm (micro-hnsw-wasm,
ruvector-economy-wasm, ruvector-learning-wasm,
ruvector-sparse-inference-wasm, ruvector-hyperbolic-hnsw-wasm). npm
installs optional dependencies automatically, so whoever registered one of
those names first would run code on every plugin install (dependency
confusion, found in #2084). Their bridges load them with a guarded dynamic
import and fall back when absent, so dropping them from the manifests
changes nothing at runtime. ruvector-gnn-wasm is registered (ruvnet) and
stays.

scripts/audit-plugin-packages.mjs gains check E, which fails on any of
those names in a plugin manifest. It fails on main.

Also re-applies akhilesharora's #2025: simulateMonteCarlo returns [] for an
empty portfolio instead of NaN-filled scenarios (test included; it fails
without the guard).

Versions: plugin-financial-risk and plugin-healthcare-clinical
3.0.0-alpha.3.

Co-Authored-By: akhilesharora <akhilesharora@users.noreply.github.com>
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-09 01:29:25 -05:00
rUv a5af956f39 Merge pull request #4899 from ruvnet/weaver/ruflo-pagerank
fix(pagerank): converge MemoryGraph PageRank; fix GraphOperations teleport/weights; optional @ruvnet/sublinear-core
2026-11-09 00:26:14 -06:00
randRuFlo ee2f94ad07 fix(release): refuse to publish helpers that differ from HEAD; release 3.74.1
@claude-flow/cli@3.74.0 shipped 3.63.4 .claude/helpers. The committed
package stamp (.helpers-version) reads 3.57.1, so hook-spawned daemons
running an older checkout's CLI (3.63.4) saw the worktree's helpers as
stale and rewrote them between prepare and npm publish. verify-helpers
passed because it signs and checks whatever is on disk.

prepare-publish now diffs .claude/helpers against HEAD before signing
and again after verifying, and throws if any helper content changed
(the regenerated manifest and stamp are excluded). Tested: a dirtied
helper is refused, and a live daemon overwrite during a clean run was
caught.

Co-Authored-By: RuFlo <ruv@ruv.net>
2026-11-09 01:06:05 -05:00
ruv 4ef02ef12c test(pagerank): skip the sublinear-core cases where the optional package is not installed
The repo-root CI run (npm workspaces) does not install @claude-flow/memory's
optional dependencies, so the backend assertions for sublinear-core failed
there. The in-tree cases still run everywhere; the sublinear-core cases run
in the package's own suite.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-09 00:58:08 -05:00
ruv 4791f07685 chore(release): @claude-flow/memory 3.2.6, @claude-flow/plugins 3.0.3; cli pins memory 3.2.6
Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-09 00:58:08 -05:00
ruv 37eca9892f fix(pagerank): converge MemoryGraph PageRank; fix GraphOperations teleport and weights
MemoryGraph.computePageRank (memory-graph.ts) stopped on a per-node change
below 1e-6 within 50 iterations. On a 10k-node graph it exited after 10
iterations with an L1 error of 1.46e-4 (max 3.95e-7) against an exact
solution. It now stops on the L1 change (default 1e-10, up to 200
iterations): 30 iterations, L1 error 2.76e-11.

GraphOperations.pageRank (plugins gnn.ts) had three mass leaks:
- personalization: nodes missing from the map still got the uniform 1/n
  teleport on top of the personalization weights, so a single-seed run
  summed to 1.98;
- isolated nodes lost their mass (global runs summed to 0.983);
- weighted runs divided by the neighbour count instead of the neighbour's
  total edge weight (scores summed to ~8e12 on a weighted test graph).
Teleport is now the normalized personalization restricted to graph nodes,
dangling mass is redistributed by it, and weights are normalized by
out-strength.

Both use @ruvnet/sublinear-core (^1.0.1, zero deps) as an optional
dependency, loaded lazily via createRequire, with an in-tree fallback of
the same semantics (pagerank.ts, one copy per package).

Tests: both backends sum to 1 and match an independent power iteration
within 1e-9 (global, personalized, weighted, MemoryGraph), and the fallback
is used when the package is absent.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-11-09 00:57:55 -05:00