@claude-flow/cli 3.32.37 → 3.32.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "manifest": {
3
- "version": "3.32.37",
3
+ "version": "3.32.38",
4
4
  "files": {
5
5
  "auto-memory-hook.mjs": "68be7e9a9eba7bf9c4e8a230db7bf61a243b965639f8504842799d6c6ca28762",
6
6
  "hook-handler.cjs": "dae295fb9ae2626b89899c19a20cc911541af82b52d2eeb9b214d618b96e9a86",
@@ -8,6 +8,6 @@
8
8
  "statusline.cjs": "0457fe53f8cd2c56458ff178392536a5868efd1a573665fa43bc01d2d95ca677"
9
9
  }
10
10
  },
11
- "signature": "4aXDfffQBBhj8kE+NJo5s/G4exfj/xdhqCwWIJxyGijINFL2GleKUam1oIYH9iyDeAZ1FKWrFAUzZ2WNEwMCDg==",
11
+ "signature": "TIaAcMVhpk+ezMRAJCOA7NQlvIznNqICVsJOiEDnW0Xqpxg1Zr3/RM2VlHaMqN7kaOiDf8sdus0R7b+mwFjUAg==",
12
12
  "algorithm": "ed25519"
13
13
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "generation": 4,
4
- "generatedAt": "2026-07-29T19:40:17.000Z",
5
- "gitSha": "401e02d5",
4
+ "generatedAt": "2026-07-29T19:50:37.000Z",
5
+ "gitSha": "ad8d071d",
6
6
  "catalog": {
7
7
  "agents": 164,
8
8
  "tools": 397,
@@ -1,5 +1,14 @@
1
1
  /** True if a live daemon already holds the project's pidfile. */
2
2
  export declare function isDaemonAlive(projectRoot: string): boolean;
3
+ /**
4
+ * Return true only when the directory contains a durable Ruflo project marker.
5
+ *
6
+ * A bare `.claude/` is owned by Claude Code, and a bare `.claude-flow/` is not
7
+ * sufficient either: startup-time policy/champion migration can create it
8
+ * before this function runs. Treating that mutation as authorization caused a
9
+ * read-only command in any Claude project to spawn a detached daemon (#2852).
10
+ */
11
+ export declare function isRufloProject(projectRoot: string): boolean;
3
12
  export interface EnsureResult {
4
13
  started: boolean;
5
14
  reason?: string;
@@ -68,6 +68,43 @@ function autostartDisabled(projectRoot) {
68
68
  return true;
69
69
  return autostartDisabledByProjectConfig(projectRoot);
70
70
  }
71
+ /**
72
+ * Return true only when the directory contains a durable Ruflo project marker.
73
+ *
74
+ * A bare `.claude/` is owned by Claude Code, and a bare `.claude-flow/` is not
75
+ * sufficient either: startup-time policy/champion migration can create it
76
+ * before this function runs. Treating that mutation as authorization caused a
77
+ * read-only command in any Claude project to spawn a detached daemon (#2852).
78
+ */
79
+ export function isRufloProject(projectRoot) {
80
+ const root = path.resolve(projectRoot);
81
+ const directMarkers = [
82
+ path.join(root, '.claude-flow', 'config.yaml'),
83
+ path.join(root, '.claude-flow', 'config.yml'),
84
+ path.join(root, '.claude-flow', 'config.json'),
85
+ path.join(root, 'claude-flow.config.json'),
86
+ path.join(root, '.swarm', 'memory.db'),
87
+ ];
88
+ if (directMarkers.some((marker) => fs.existsSync(marker)))
89
+ return true;
90
+ try {
91
+ const settings = JSON.parse(fs.readFileSync(path.join(root, '.claude', 'settings.json'), 'utf-8'));
92
+ if (settings && typeof settings === 'object' && 'claudeFlow' in settings) {
93
+ return true;
94
+ }
95
+ }
96
+ catch { /* absent/malformed/non-Ruflo settings */ }
97
+ try {
98
+ const mcp = JSON.parse(fs.readFileSync(path.join(root, '.mcp.json'), 'utf-8'));
99
+ const servers = mcp?.mcpServers;
100
+ if (servers && typeof servers === 'object'
101
+ && ('ruflo' in servers || 'claude-flow' in servers)) {
102
+ return true;
103
+ }
104
+ }
105
+ catch { /* absent/malformed/non-Ruflo MCP config */ }
106
+ return false;
107
+ }
71
108
  const defaultSpawn = (projectRoot) => {
72
109
  const cliBin = process.argv[1]; // the running bin/cli.js
73
110
  const child = spawn(process.execPath, [cliBin, 'daemon', 'start', '--quiet'], {
@@ -86,10 +123,7 @@ export function ensureDaemonRunning(projectRoot, opts = {}) {
86
123
  try {
87
124
  if (autostartDisabled(projectRoot))
88
125
  return { started: false, reason: 'disabled (RUFLO_DAEMON_AUTOSTART=0 or project config)' };
89
- // `.claude/` belongs to Claude Code and is present in many repositories
90
- // that have never initialized Ruflo. Only Ruflo's own state directory is
91
- // an authorization signal for spawning a detached background process.
92
- if (!fs.existsSync(path.join(projectRoot, '.claude-flow'))) {
126
+ if (!isRufloProject(projectRoot)) {
93
127
  return { started: false, reason: 'not a ruflo project' };
94
128
  }
95
129
  const alive = (opts.isAlive ?? isDaemonAlive)(projectRoot);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.32.37",
3
+ "version": "3.32.38",
4
4
  "type": "module",
5
5
  "description": "Ruflo CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",