claude-flow 3.32.37 → 3.32.39

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.
@@ -0,0 +1 @@
1
+ sha256:6141a8ea990c5063b77e090ae8f37f9c539d8aa8f58dcceb30f3a82f97e57319
@@ -0,0 +1,42 @@
1
+ {
2
+ "adoptedAt": 1785375407244,
3
+ "championId": "sha256:6141a8ea990c5063b77e090ae8f37f9c539d8aa8f58dcceb30f3a82f97e57319",
4
+ "manifest": {
5
+ "schema": "ruflo.proven-config/v1",
6
+ "policy": {
7
+ "ref": "sha256:6141a8ea990c5063b77e090ae8f37f9c539d8aa8f58dcceb30f3a82f97e57319",
8
+ "value": {
9
+ "alpha": 0.3,
10
+ "subjectWeight": 1,
11
+ "mmrLambda": 0.5,
12
+ "bodyWeight": 1.5,
13
+ "typePenaltyFactor": 0.5
14
+ }
15
+ },
16
+ "layer": "framework/node-cli",
17
+ "compatibility": {
18
+ "ruflo": ">=3.24.0"
19
+ },
20
+ "benchmark": {
21
+ "corpus": "ADR-081-labelled-v1",
22
+ "corpusHash": "sha256:2f700b5c363e20a3bd88ce2bc9b87bbbbaa61732c6177894c6ec37890f888982"
23
+ },
24
+ "receipt": {
25
+ "heldOutDelta": 0.07381404928570845,
26
+ "redblue": "PASS",
27
+ "drift": 0,
28
+ "canary": {
29
+ "rollbackRate": 0,
30
+ "latencyP95": 244.612458000076,
31
+ "costPerTask": 0
32
+ },
33
+ "receiptCoverage": 1
34
+ },
35
+ "platform": [
36
+ "linux",
37
+ "macOS",
38
+ "windows"
39
+ ]
40
+ },
41
+ "previous": ""
42
+ }
@@ -1,9 +1,7 @@
1
1
  {
2
- "_note": "#1921 — hook commands invoke scripts/ruflo-hook.sh (resilient shim): prefers a locally-installed `ruflo`/`claude-flow` binary, falls back to `npx --prefer-offline`, and always exits 0 so a CLI/install failure (e.g. arborist `Invalid Version` on npm 10.8.x) never surfaces an error in Claude Code or blocks a turn. The trailing `|| true` guards the case where $CLAUDE_PLUGIN_ROOT is unset (older Claude Code) — the hook then no-ops silently. DO NOT revert to a bare `npx <pkg>@alpha hooks …` per fire.",
2
+ "description": "Hook commands invoke scripts/ruflo-hook.sh (resilient shim): prefers a locally-installed `ruflo`/`claude-flow` binary, falls back to `npx --prefer-offline`, and always exits 0 so a CLI/install failure never surfaces an error in Claude Code or blocks a turn. The trailing `|| true` guards the case where $CLAUDE_PLUGIN_ROOT is unset (older Claude Code) — the hook then no-ops silently. This manifest is intentionally POSIX-only (Mac/Linux): it uses /bin/bash, POSIX pipelines (jq, xargs, tr), and .sh scripts, and is known-broken on native Windows. It is a separately-published legacy \"claude-flow\" plugin package (not in the ruflo marketplace list) with its own jq/xargs-based hook set and its own scripts/ruflo-hook.cjs that this file never references — still needs its own Windows-compatible, Node-based rewrite.",
3
3
  "_platform": "posix",
4
- "_platform_note": "#2132 — This hooks.json uses /bin/bash, POSIX pipelines (jq, xargs, tr), and .sh scripts. It is intentionally POSIX-only (Mac/Linux) today and known-broken on native Windows (#2721 shape). The previous claim here that `ruflo init` overrides these entries with node-based equivalents on Windows was never actually implemented and is incorrect — Claude Code merges plugin-declared hooks additively with any init-generated settings.json, it does not replace them. This package (separate from plugins/ruflo-core, which got the #2721 fix) still needs its own Windows-compatible rewrite; see _legacy_unaudited_shim below.",
5
4
  "_legacy_unaudited_shim": true,
6
- "_legacy_unaudited_shim_note": "#2721 fixed plugins/ruflo-core and plugins/ruflo-cost-tracker (marketplace-listed in .claude-plugin/marketplace.json) by rewiring hooks.json to a `node -e` bootstrap around scripts/ruflo-hook.cjs. This older, separately-published \"claude-flow\" plugin package (not in the ruflo marketplace list) has its own, larger jq/xargs-based hook set and its own scripts/ruflo-hook.cjs that hooks.json never references — same underlying bug shape, NOT fixed as part of #2721. Needs its own audited pass before this flag can be removed.",
7
5
  "hooks": {
8
6
  "PreToolUse": [
9
7
  {
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.32.37",
3
+ "version": "3.32.39",
4
4
  "workspaces": [
5
5
  "v3/@claude-flow/codex",
6
6
  "v3/@claude-flow/plugin-agent-federation",
@@ -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-30T02:05:05.762Z",
5
+ "gitSha": "fabcc926",
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);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.32.37",
3
+ "version": "3.32.39",
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",