Files
ruflo/v3/@claude-flow/cli-core/package.json
T
randRuFlo c9b87db61d fix(cli,cli-core): anchor durable state to the project root, not raw cwd (#2633)
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>
2026-11-09 18:01:12 -05:00

58 lines
1.7 KiB
JSON

{
"name": "@claude-flow/cli-core",
"version": "3.7.7",
"description": "Lightweight core CLI surface for Claude Flow — memory + hooks commands only. Designed to load fast on cold npx cache (<5s) so plugin skills don't race the 30s MCP-startup timeout. The full @claude-flow/cli metapackage lazy-loads everything else on top of this core.",
"type": "module",
"main": "dist/src/index.js",
"types": "dist/src/index.d.ts",
"bin": {
"claude-flow-core": "dist/src/index.js"
},
"exports": {
".": "./dist/src/index.js",
"./output": "./dist/src/output.js",
"./types": "./dist/src/types.js",
"./memory": "./dist/src/memory/backend.js",
"./memory/json-backend": "./dist/src/memory/json-backend.js",
"./commands/memory": "./dist/src/commands/memory.js",
"./mcp-tools": "./dist/src/mcp-tools/index.js",
"./mcp-tools/types": "./dist/src/mcp-tools/types.js",
"./mcp-tools/validate-input": "./dist/src/mcp-tools/validate-input.js",
"./mcp-tools/memory-defs": "./dist/src/mcp-tools/memory-defs.js",
"./mcp-tools/hooks-defs": "./dist/src/mcp-tools/hooks-defs.js"
},
"scripts": {
"build": "tsc",
"test": "vitest run"
},
"files": [
"dist/",
"README.md",
"LICENSE"
],
"keywords": [
"claude-flow",
"cli",
"core",
"lite",
"lazy-load",
"mcp",
"memory",
"hooks"
],
"author": {
"name": "ruvnet",
"url": "https://github.com/ruvnet"
},
"license": "MIT",
"homepage": "https://github.com/ruvnet/ruflo",
"repository": {
"type": "git",
"url": "https://github.com/ruvnet/ruflo.git",
"directory": "v3/@claude-flow/cli-core"
},
"publishConfig": {
"access": "public"
}
}