@claude-flow/cli 3.74.1 and 3.75.0 (and the claude-flow umbrella) bundle
@claude-flow/security 3.0.7, which needs zod >=4.6.7, while the wrappers
keep zod 3. The staging script stripped the nested dependencies, so
security's `import 'zod'` resolved to zod 3 and the root export threw
`z.config is not a function`.
Declaring the dependency is not enough: npm never installs the
dependencies of a bundled package (checked against the 3.75.0 tarball).
The stager now vendors declared leaf dependencies into the bundled
package's own node_modules, checks the workspace copy satisfies the
declared range, and refuses a dependency that has dependencies itself.
The npx-install smoke now imports every bundled runtime package from the
installed CLI, so this fails CI instead of users.
Co-Authored-By: RuFlo <ruv@ruv.net>
Under an agent the Bash tool cwd is sticky, and MCP servers and hooks inherit
it, so process.cwd() is often a subdirectory of the project. Memory, autopilot,
neural and metrics state keyed to it was written under the subdirectory and
never read again: loadState() returned defaults and the learning state
silently started over.
- Extract the #2877 daemon marker walk (nearest Ruflo marker, `.git` hard
stop, start dir when nothing matches, read-only) into
cli/src/services/project-root.ts; resolveDaemonProjectRoot and
isRufloProject delegate to it unchanged.
- getProjectRoot()/anchorToProjectRoot() add the home/filesystem-root guard
cli-core already applies, so a ~/.claude/settings.json claudeFlow key never
makes $HOME the project.
- getMemoryRoot(), `memory backup` and `memory distill` resolve memory
against the project root.
- autopilot-state resolves its state, log, swarm-tasks and checklist paths
against the project root per call (exported constants stay relative).
- neural checkpoints/patterns, `.claude-flow/memory` patterns, LoRA weights,
EWC fisher and swarm-activity metrics use the project root.
- cli-core: export isRufloProject/resolveProjectRoot from mcp-tools/types;
getProjectCwd() keeps CLAUDE_FLOW_CWD precedence, else walks up from
process.cwd(), falling back to process.cwd() when no marker is found or
the walk lands on home / a filesystem root. Bump cli-core to 3.7.7.
The CLI pins cli-core 3.7.6, which lacks these exports, so the CLI carries a
copy of the walk; a parity test pins both copies together.
Fixes#2633
Co-Authored-By: RuFlo <ruv@ruv.net>
The command catalog copy changed (#2640 command renames + catch-up
regeneration), so ruflo-console moves 0.50.0 -> 0.50.1 in plugin.json,
hooks/version.ts, scripts/smoke.sh and the CHANGELOG. The catalog is
regenerated on the merged tree (one entry changed by main) and copied to
the console again.
The single-host AGENTS.md snapshot follows main's #3153 change (#4918:
registered MCP tool names); no other line differs.
Co-Authored-By: RuFlo <ruv@ruv.net>
Adds agentdb_pattern-list (ReasoningBank.listPatterns), agentdb_skill-list
(SkillLibrary.listSkills), agentdb_skill-get (SkillLibrary.getSkill) and the
count-only agentdb_hierarchical-stats (TieredMemoryStore.getTierStats +
countPersisted). They read through the existing memory-bridge registry under
the bridge operation lease. A missing controller or method returns
success:false, code:'unsupported' naming the method, never an empty list;
native errors (page validation, graph-adapter refusal) keep their own code.
Fixes#4707
Co-Authored-By: RuFlo <ruv@ruv.net>
`ruflo catalog generate` + copy to the ruflo-console catalog (their digests
must match). Picks up memory-neural, stream-chain-run and swarm-orchestrate.
The committed catalog was already stale on main (243 entries; now 290: new
mod registrations and plugins since the last regeneration), so this also
carries that drift. The host-specific engine report is left as committed.
Co-Authored-By: RuFlo <ruv@ruv.net>
The Codex integration audit forbids `@claude-flow/cli@latest` anywhere in
codex src. The shared-instructions module now takes the CLI prefix as a
parameter: codex defaults to its generators' convention (`npx @claude-flow/cli`,
unversioned, as AGENTS.md already uses), and the CLI passes its own
`@latest` form, so the single-host CLAUDE.md is byte-identical (snapshots
unchanged). finalizeDualInstructions checks AGENTS.md for the codex form.
Both copies of the module stay byte-identical.
Co-Authored-By: RuFlo <ruv@ruv.net>
With the ruflo Claude Code plugins installed (ruflo-core@ruflo installed and
not switched off in enabledPlugins), `ruflo init` copied a full shadow copy of
the agents, commands and skills those plugins ship, and registered a second,
standalone `claude-flow` MCP server next to the plugin's.
- init/plugin-dedup.ts: read-only detection via Claude Code's own records
(installed_plugins.json through mods/plugin-resolve installedState, plus
enabledPlugins in local/project/user settings). It lists the agents,
commands and skills of every installed *@ruflo plugin. A missing or
malformed record means "no plugin": today's behaviour.
- executor: skips those agents/commands/skills (per file inside category
dirs; a dir left empty is not created) and the standalone `claude-flow`
MCP entry, keeping any other server the preset asks for. The skip list is
returned as result.pluginDedup; `ruflo init` prints it with the reason and
the opt-out.
- `deferToPlugins` is on in the default/minimal presets and off in
FULL_INIT_OPTIONS, so `init --full` keeps today's full copy.
- Renamed the 3 init commands whose names collided with plugin commands:
memory/neural -> memory-neural (ruflo-intelligence), stream-chain/run ->
stream-chain-run (ruflo-ruos), swarm/swarm -> swarm-orchestrate
(ruflo-swarm).
- smoke-init-bundle-invariants: assertion 4, no init/plugin command-name
collision.
- Two existing init tests now pin CLAUDE_CONFIG_DIR so the plugins installed
on the machine running them cannot change what init writes.
Fixes#2640
Co-Authored-By: RuFlo <ruv@ruv.net>
`ruflo init --dual` (and `@claude-flow/codex init --dual`) wrote two divergent
instruction files. Now AGENTS.md carries the shared sections once plus the
Codex-only ones, and CLAUDE.md is Claude Code's `@AGENTS.md` import plus only
the Claude-specific sections.
- codex/src/generators/shared-instructions.ts: the shared sections (rules,
swarm routing, memory & learning, agents, build & test, CLI reference).
The CLI keeps a byte-identical mirror (a test compares the files) because
it resolves @claude-flow/codex from the registry at the pinned version.
- claudemd-generator.ts builds its shared sections from that module;
single-host output is byte-identical (snapshot recorded on origin/main).
New generateDualClaudeMd keeps only Claude-only sections + template extras.
- Existing CLAUDE.md is only replaced when missing, generated by init and
unedited, or under --force (backed up); otherwise kept with migration steps.
- After the Codex pass, finalizeDualInstructions keeps the import only if
AGENTS.md carries every shared section verbatim; else the full CLAUDE.md
is written back, so an older codex adapter cannot lose content.
- commands/init.ts (outside the lane's file list): pass instructionsSource and
dual to the two passes, run the finalize step, never pass --dual to a
fetched adapter of unknown version.
Fixes#2638
Co-Authored-By: RuFlo <ruv@ruv.net>
TieredMemoryStore exposed store/recall/remove/count but no way to enumerate
what is persisted or read an entry back by id. recall() scores the hydrated
maps, which cap each tier and the archive at 5,000 rows and collapse same-key
rows, so the in-memory view cannot establish the persisted population.
@claude-flow/memory 3.3.0:
- TieredMemoryStore.listEntries({ tier, status = 'active', limit = 100, cursor })
reads the tiered_memory table with keyset pagination on ts DESC, id DESC.
status is active | expired | superseded | archived | all, derived by one
function with fixed precedence (superseded > archived > expired > active;
not-yet-valid rows count as expired, matching recall's includeExpired).
limit is clamped to 1..1000. The cursor is base64url JSON bound to the
tier/status filter; altered, malformed or foreign cursors throw
TieredMemoryCursorError. totalEstimate is an exact COUNT for all /
superseded / archived and omitted for the temporal filters.
- TieredMemoryStore.getEntry(id, { includeInactive = false }) is an exact
stable-id read returning the entry plus its status, or null.
- Both throw TieredMemoryUnsupportedError ("unsupported: volatile store") on a
store without a SQLite handle, never write, and let SQL errors propagate.
- Logic lives in tiered-memory-inventory.ts with injected decode/isValid, so
there is no runtime import cycle.
CLI: read-only MCP tools agentdb_hierarchical-list and agentdb_hierarchical-get,
appended at the end of agentdbTools from a new module. Bridge helpers are
appended to memory-bridge.ts and run inside one bridge operation; they refuse
with a reason on a native agentdb controller, an older @claude-flow/memory
without the API, a volatile store, or a read failure.
Fixes#4712
Co-Authored-By: RuFlo <ruv@ruv.net>
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>
Adds `ruflo plugins host <install|update|uninstall|enable|disable|sync|status>`.
Each host's own plugin CLI is driven via execFile with a literal argv; host
executables are resolved by a PATH/PATHEXT scan with fs.access (no `which`,
no shell). Windows npm .cmd shims are run as `node <bin.js>` only after the
owning package's name and bin are verified. Plugin names are validated
against a strict pattern before reaching any argv. Results are reported per
host; any failed host makes the exit code non-zero.
sync: union of enabled plugins, additive, never removes, keeps explicit
disables, refuses a foreign-source marketplace of the same name.
Fixes#2854
Co-Authored-By: RuFlo <ruv@ruv.net>