claude-flow 3.5.20 → 3.5.21

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "3.5.20",
3
+ "version": "3.5.21",
4
4
  "description": "Ruflo - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -153,6 +153,14 @@ export function generateSettings(options) {
153
153
  * Detect if we're on Windows for platform-aware hook commands.
154
154
  */
155
155
  const IS_WINDOWS = process.platform === 'win32';
156
+ /**
157
+ * Platform-aware project dir variable reference.
158
+ * Claude Code sets $CLAUDE_PROJECT_DIR (Unix) / %CLAUDE_PROJECT_DIR% (Windows)
159
+ * as an environment variable before running hook commands.
160
+ */
161
+ function projectDirVar() {
162
+ return IS_WINDOWS ? '%CLAUDE_PROJECT_DIR%' : '$CLAUDE_PROJECT_DIR';
163
+ }
156
164
  /**
157
165
  * Build a cross-platform hook command.
158
166
  * On Windows, wraps with `cmd /c` to avoid PowerShell stdin/process issues
@@ -171,11 +179,15 @@ function hookCmdEsm(script, subcommand) {
171
179
  }
172
180
  /** Shorthand for CJS hook-handler commands */
173
181
  function hookHandlerCmd(subcommand) {
174
- return hookCmd('"$CLAUDE_PROJECT_DIR/.claude/helpers/hook-handler.cjs"', subcommand);
182
+ const dir = projectDirVar();
183
+ const quote = IS_WINDOWS ? '' : '"';
184
+ return hookCmd(`${quote}${dir}/.claude/helpers/hook-handler.cjs${quote}`, subcommand);
175
185
  }
176
186
  /** Shorthand for ESM auto-memory-hook commands */
177
187
  function autoMemoryCmd(subcommand) {
178
- return hookCmdEsm('"$CLAUDE_PROJECT_DIR/.claude/helpers/auto-memory-hook.mjs"', subcommand);
188
+ const dir = projectDirVar();
189
+ const quote = IS_WINDOWS ? '' : '"';
190
+ return hookCmdEsm(`${quote}${dir}/.claude/helpers/auto-memory-hook.mjs${quote}`, subcommand);
179
191
  }
180
192
  /**
181
193
  * Generate statusLine configuration for Claude Code
@@ -187,9 +199,11 @@ function generateStatusLineConfig(_options) {
187
199
  // The script runs after each assistant message (debounced 300ms).
188
200
  // NOTE: statusline must NOT use `cmd /c` — Claude Code manages its stdin
189
201
  // directly for statusline commands, and `cmd /c` blocks stdin forwarding.
202
+ const dir = projectDirVar();
203
+ const quote = IS_WINDOWS ? '' : '"';
190
204
  return {
191
205
  type: 'command',
192
- command: `node "$CLAUDE_PROJECT_DIR/.claude/helpers/statusline.cjs"`,
206
+ command: `node ${quote}${dir}/.claude/helpers/statusline.cjs${quote}`,
193
207
  };
194
208
  }
195
209
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@claude-flow/cli",
3
- "version": "3.5.20",
3
+ "version": "3.5.21",
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",