claude-flow 2.7.22 → 2.7.23
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/bin/claude-flow
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/core/version.js"],"sourcesContent":["/**\n * Centralized version management (JavaScript version)\n * Reads version from package.json to ensure consistency\n */\n\nimport { readFileSync } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\n// Get the directory of this module\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n// Read version from package.json\nlet VERSION;\nlet BUILD_DATE;\n\ntry {\n // Navigate to project root and read package.json\n const packageJsonPath = join(__dirname, '../../package.json');\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\n VERSION = packageJson.version;\n BUILD_DATE = new Date().toISOString().split('T')[0];\n} catch (error) {\n // Fallback version if package.json can't be read\n console.warn('Warning: Could not read version from package.json, using fallback');\n VERSION = '2.0.0-alpha.101';\n BUILD_DATE = new Date().toISOString().split('T')[0];\n}\n\nexport { VERSION, BUILD_DATE };\n\n// Helper function to get formatted version string\nexport function getVersionString(includeV = true) {\n return includeV ? `v${VERSION}` : VERSION;\n}\n\n// Helper function for version display in CLI\nexport function displayVersion() {\n console.log(getVersionString());\n}"],"names":["readFileSync","join","dirname","fileURLToPath","__filename","url","__dirname","VERSION","BUILD_DATE","packageJsonPath","packageJson","JSON","parse","version","Date","toISOString","split","error","console","warn","getVersionString","includeV","displayVersion","log"],"mappings":"AAKA,SAASA,YAAY,QAAQ,KAAK;AAClC,SAASC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AACrC,SAASC,aAAa,QAAQ,MAAM;AAGpC,MAAMC,aAAaD,cAAc,YAAYE,GAAG;AAChD,MAAMC,YAAYJ,QAAQE;AAG1B,IAAIG;AACJ,IAAIC;AAEJ,IAAI;IAEF,MAAMC,kBAAkBR,KAAKK,WAAW;IACxC,MAAMI,cAAcC,KAAKC,KAAK,CAACZ,aAAaS,iBAAiB;IAC7DF,UAAUG,YAAYG,OAAO;IAC7BL,aAAa,IAAIM,OAAOC,WAAW,GAAGC,KAAK,CAAC,IAAI,CAAC,EAAE;AACrD,EAAE,OAAOC,OAAO;IAEdC,QAAQC,IAAI,CAAC;IACbZ,UAAU;IACVC,aAAa,IAAIM,OAAOC,WAAW,GAAGC,KAAK,CAAC,IAAI,CAAC,EAAE;AACrD;AAEA,SAAST,OAAO,EAAEC,UAAU,GAAG;AAG/B,OAAO,SAASY,iBAAiBC,WAAW,IAAI;IAC9C,OAAOA,WAAW,CAAC,CAAC,EAAEd,SAAS,GAAGA;AACpC;AAGA,OAAO,SAASe;IACdJ,QAAQK,GAAG,CAACH;AACd"}
|
|
1
|
+
{"version":3,"sources":["../../../src/core/version.js"],"sourcesContent":["/**\n * Centralized version management (JavaScript version)\n * Reads version from package.json to ensure consistency\n */\n\nimport { readFileSync } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\n// Get the directory of this module\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n// Read version from package.json\nlet VERSION;\nlet BUILD_DATE;\n\ntry {\n // Navigate to project root and read package.json\n const packageJsonPath = join(__dirname, '../../package.json');\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\n VERSION = packageJson.version;\n BUILD_DATE = new Date().toISOString().split('T')[0];\n} catch (error) {\n // Fallback version if package.json can't be read\n console.warn('Warning: Could not read version from package.json, using fallback');\n VERSION = '2.0.0-alpha.101';\n BUILD_DATE = new Date().toISOString().split('T')[0];\n}\n\nexport { VERSION, BUILD_DATE };\n\n// Helper function to get formatted version string\nexport function getVersionString(includeV = true) {\n return includeV ? `v${VERSION}` : VERSION;\n}\n\n// Helper function for version display in CLI\nexport function displayVersion() {\n console.log(getVersionString());\n}"],"names":["readFileSync","join","dirname","fileURLToPath","__filename","url","__dirname","VERSION","BUILD_DATE","packageJsonPath","packageJson","JSON","parse","version","Date","toISOString","split","error","console","warn","getVersionString","includeV","displayVersion","log"],"mappings":"AAKA,SAASA,YAAY,QAAQ,KAAK;AAClC,SAASC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AACrC,SAASC,aAAa,QAAQ,MAAM;AAGpC,MAAMC,aAAaD,cAAc,YAAYE,GAAG;AAChD,MAAMC,YAAYJ,QAAQE;AAG1B,IAAIG;AACJ,IAAIC;AAEJ,IAAI;IAEF,MAAMC,kBAAkBR,KAAKK,WAAW;IACxC,MAAMI,cAAcC,KAAKC,KAAK,CAACZ,aAAaS,iBAAiB;IAC7DF,UAAUG,YAAYG,OAAO;IAC7BL,aAAa,IAAIM,OAAOC,WAAW,GAAGC,KAAK,CAAC,IAAI,CAAC,EAAE;AACrD,EAAE,OAAOC,OAAO;IAEdC,QAAQC,IAAI,CAAC;IACbZ,UAAU;IACVC,aAAa,IAAIM,OAAOC,WAAW,GAAGC,KAAK,CAAC,IAAI,CAAC,EAAE;AACrD;AAEA,SAAST,OAAO,EAAEC,UAAU,GAAG;AAG/B,OAAO,SAASY,iBAAiBC,WAAW,IAAI;IAC9C,OAAOA,WAAW,CAAC,CAAC,EAAEd,SAAS,GAAGA;AACpC;AAGA,OAAO,SAASe;IACdJ,QAAQK,GAAG,CAACH;AACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/key-redactor.
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/key-redactor.ts"],"sourcesContent":["/**\n * API Key Redaction Utility\n * Prevents sensitive data from leaking into logs, memory, or git commits\n */\n\nexport interface RedactionConfig {\n patterns: RegExp[];\n replacement: string;\n maskLength: number;\n}\n\nexport class KeyRedactor {\n private static readonly API_KEY_PATTERNS = [\n // Anthropic API keys\n /sk-ant-[a-zA-Z0-9_-]{95,}/gi,\n\n // OpenRouter API keys\n /sk-or-[a-zA-Z0-9_-]{32,}/gi,\n\n // Google/Gemini API keys\n /AIza[a-zA-Z0-9_-]{35}/gi,\n\n // Generic API keys\n /[a-zA-Z0-9_-]{20,}API[a-zA-Z0-9_-]{20,}/gi,\n\n // Bearer tokens\n /Bearer\\s+[a-zA-Z0-9_\\-\\.]{20,}/gi,\n\n // Environment variable format\n /([A-Z_]+_API_KEY|[A-Z_]+_TOKEN|[A-Z_]+_SECRET)=[\"']?([^\"'\\s]+)[\"']?/gi,\n\n // Supabase keys\n /eyJ[a-zA-Z0-9_-]*\\.eyJ[a-zA-Z0-9_-]*\\.[a-zA-Z0-9_-]*/gi,\n ];\n\n private static readonly SENSITIVE_FIELDS = [\n 'apiKey',\n 'api_key',\n 'token',\n 'secret',\n 'password',\n 'private_key',\n 'privateKey',\n 'accessToken',\n 'access_token',\n 'refreshToken',\n 'refresh_token',\n ];\n\n /**\n * Redact API keys and sensitive data from text\n */\n static redact(text: string, showPrefix = true): string {\n if (!text) return text;\n\n let redacted = text;\n\n // Redact using patterns\n this.API_KEY_PATTERNS.forEach(pattern => {\n redacted = redacted.replace(pattern, (match) => {\n if (showPrefix && match.length > 8) {\n const prefix = match.substring(0, 8);\n return `${prefix}...[REDACTED]`;\n }\n return '[REDACTED_API_KEY]';\n });\n });\n\n return redacted;\n }\n\n /**\n * Redact sensitive fields in objects\n */\n static redactObject<T extends Record<string, any>>(obj: T, deep = true): T {\n if (!obj || typeof obj !== 'object') return obj;\n\n const redacted = { ...obj };\n\n Object.keys(redacted).forEach(key => {\n const lowerKey = key.toLowerCase();\n\n // Check if field name is sensitive\n const isSensitive = this.SENSITIVE_FIELDS.some(field =>\n lowerKey.includes(field)\n );\n\n if (isSensitive && typeof redacted[key] === 'string') {\n const value = redacted[key] as string;\n if (value && value.length > 8) {\n redacted[key] = `${value.substring(0, 4)}...[REDACTED]` as any;\n } else {\n redacted[key] = '[REDACTED]' as any;\n }\n } else if (deep && typeof redacted[key] === 'object' && redacted[key] !== null) {\n redacted[key] = this.redactObject(redacted[key], deep);\n } else if (typeof redacted[key] === 'string') {\n // Redact any API keys in string values\n redacted[key] = this.redact(redacted[key]) as any;\n }\n });\n\n return redacted;\n }\n\n /**\n * Sanitize text for safe logging\n */\n static sanitize(text: string): string {\n return this.redact(text, true);\n }\n\n /**\n * Sanitize command arguments\n */\n static sanitizeArgs(args: string[]): string[] {\n return args.map(arg => {\n // Check if arg is a flag value pair\n if (arg.includes('key') || arg.includes('token') || arg.includes('secret')) {\n return this.redact(arg);\n }\n return arg;\n });\n }\n\n /**\n * Check if text contains unredacted sensitive data\n */\n static containsSensitiveData(text: string): boolean {\n return this.API_KEY_PATTERNS.some(pattern => pattern.test(text));\n }\n\n /**\n * Validate that text is safe for logging/storage\n */\n static validate(text: string): { safe: boolean; warnings: string[] } {\n const warnings: string[] = [];\n\n this.API_KEY_PATTERNS.forEach((pattern, index) => {\n if (pattern.test(text)) {\n warnings.push(`Potential API key detected (pattern ${index + 1})`);\n }\n });\n\n return {\n safe: warnings.length === 0,\n warnings,\n };\n }\n\n /**\n * Redact environment variables\n */\n static redactEnv(env: Record<string, string | undefined>): Record<string, string> {\n const redacted: Record<string, string> = {};\n\n Object.keys(env).forEach(key => {\n const value = env[key];\n if (!value) {\n redacted[key] = '';\n return;\n }\n\n const lowerKey = key.toLowerCase();\n const isSensitive = lowerKey.includes('key') ||\n lowerKey.includes('token') ||\n lowerKey.includes('secret') ||\n lowerKey.includes('password');\n\n if (isSensitive) {\n redacted[key] = value.length > 8\n ? `${value.substring(0, 4)}...[REDACTED]`\n : '[REDACTED]';\n } else {\n redacted[key] = value;\n }\n });\n\n return redacted;\n }\n}\n\n// Export singleton instance\nexport const redactor = KeyRedactor;\n"],"names":["KeyRedactor","API_KEY_PATTERNS","SENSITIVE_FIELDS","redact","text","showPrefix","redacted","forEach","pattern","replace","match","length","prefix","substring","redactObject","obj","deep","Object","keys","key","lowerKey","toLowerCase","isSensitive","some","field","includes","value","sanitize","sanitizeArgs","args","map","arg","containsSensitiveData","test","validate","warnings","index","push","safe","redactEnv","env","redactor"],"mappings":"AAWA,O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B,IAAI,CAACO,OAAO;gBACVpB,QAAQ,CAACa,IAAI,GAAG;gBAChB;YACF;YAEA,MAAMC,WAAWD,IAAIE,WAAW;YAChC,MAAMC,cAAcF,SAASK,QAAQ,CAAC,UACnBL,SAASK,QAAQ,CAAC,YAClBL,SAASK,QAAQ,CAAC,aAClBL,SAASK,QAAQ,CAAC;YAErC,IAAIH,aAAa;gBACfhB,QAAQ,CAACa,IAAI,GAAGO,MAAMf,MAAM,GAAG,IAC3B,GAAGe,MAAMb,SAAS,CAAC,GAAG,GAAG,aAAa,CAAC,GACvC;YACN,OAAO;gBACLP,QAAQ,CAACa,IAAI,GAAGO;YAClB;QACF;QAEA,OAAOpB;IACT;AACF;AAGA,OAAO,MAAMmC,WAAWzC,YAAY"}
|
|
@@ -166,4 +166,14 @@ export class MetricsReader {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
//# sourceMappingURL=metrics-reader.js.map processCount: 0,
|
|
170
|
+
orchestratorRunning: false,
|
|
171
|
+
port: null,
|
|
172
|
+
connections: 0
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
export { MetricsReader };
|
|
178
|
+
|
|
169
179
|
//# sourceMappingURL=metrics-reader.js.map
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
# Fix for agentic-flow "Enabled: false" Log Message
|
|
2
|
+
|
|
3
|
+
## Problem
|
|
4
|
+
|
|
5
|
+
When using `npx claude-flow@alpha memory store`, the log shows:
|
|
6
|
+
```
|
|
7
|
+
[ReasoningBank] Enabled: false
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Even though ReasoningBank is working correctly. This is misleading to users.
|
|
11
|
+
|
|
12
|
+
## Root Cause
|
|
13
|
+
|
|
14
|
+
**File:** `agentic-flow/src/reasoningbank/index.ts` (or `.js`)
|
|
15
|
+
**Line:** ~41
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
console.log(`[ReasoningBank] Enabled: ${!!process.env.REASONINGBANK_ENABLED}`);
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
This checks for an environment variable that is never set, so it always shows `false`.
|
|
22
|
+
|
|
23
|
+
## Solution
|
|
24
|
+
|
|
25
|
+
Change line 41 from:
|
|
26
|
+
```typescript
|
|
27
|
+
console.log(`[ReasoningBank] Enabled: ${!!process.env.REASONINGBANK_ENABLED}`);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
To:
|
|
31
|
+
```typescript
|
|
32
|
+
console.log('[ReasoningBank] Enabled: true (initializing...)');
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Steps to Fix in agentic-flow Repository
|
|
36
|
+
|
|
37
|
+
### 1. Navigate to agentic-flow Repository
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
cd /path/to/agentic-flow
|
|
41
|
+
git checkout updates-oct-25 # Or your working branch
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 2. Edit the Source File
|
|
45
|
+
|
|
46
|
+
**File:** `src/reasoningbank/index.ts` (or `src/reasoningbank/index.js`)
|
|
47
|
+
|
|
48
|
+
Find line 41 (approximately):
|
|
49
|
+
```typescript
|
|
50
|
+
export async function initialize() {
|
|
51
|
+
const config = loadConfig();
|
|
52
|
+
console.log('[ReasoningBank] Initializing...');
|
|
53
|
+
console.log(`[ReasoningBank] Enabled: ${!!process.env.REASONINGBANK_ENABLED}`); // ← FIX THIS LINE
|
|
54
|
+
console.log(`[ReasoningBank] Database: ${process.env.CLAUDE_FLOW_DB_PATH || '.swarm/memory.db'}`);
|
|
55
|
+
// ... rest of function
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Replace with:
|
|
60
|
+
```typescript
|
|
61
|
+
export async function initialize() {
|
|
62
|
+
const config = loadConfig();
|
|
63
|
+
console.log('[ReasoningBank] Initializing...');
|
|
64
|
+
console.log('[ReasoningBank] Enabled: true (initializing...)'); // ← FIXED!
|
|
65
|
+
console.log(`[ReasoningBank] Database: ${process.env.CLAUDE_FLOW_DB_PATH || '.swarm/memory.db'}`);
|
|
66
|
+
// ... rest of function
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### 3. Build the Package
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# If using TypeScript
|
|
74
|
+
npm run build
|
|
75
|
+
|
|
76
|
+
# Or if building with swc
|
|
77
|
+
npm run build:esm
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 4. Verify the Dist File
|
|
81
|
+
|
|
82
|
+
Check that `dist/reasoningbank/index.js` line 41 now shows:
|
|
83
|
+
```javascript
|
|
84
|
+
console.log('[ReasoningBank] Enabled: true (initializing...)');
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 5. Update Version
|
|
88
|
+
|
|
89
|
+
Edit `package.json`:
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"version": "1.8.5"
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 6. Commit and Publish
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
git add .
|
|
100
|
+
git commit -m "fix: Show accurate 'Enabled: true' during ReasoningBank initialization
|
|
101
|
+
|
|
102
|
+
- Changed misleading env variable check to hardcoded true
|
|
103
|
+
- Users were confused by 'Enabled: false' when ReasoningBank was working
|
|
104
|
+
- Affects npx users who see this message during initialization"
|
|
105
|
+
|
|
106
|
+
git push origin updates-oct-25
|
|
107
|
+
|
|
108
|
+
# Publish to npm
|
|
109
|
+
npm publish
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Expected Output After Fix
|
|
113
|
+
|
|
114
|
+
### Before (agentic-flow@1.8.4):
|
|
115
|
+
```
|
|
116
|
+
[ReasoningBank] Initializing...
|
|
117
|
+
[ReasoningBank] Enabled: false ← MISLEADING!
|
|
118
|
+
[ReasoningBank] Database: .swarm/memory.db
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### After (agentic-flow@1.8.5):
|
|
122
|
+
```
|
|
123
|
+
[ReasoningBank] Initializing...
|
|
124
|
+
[ReasoningBank] Enabled: true (initializing...) ← ACCURATE!
|
|
125
|
+
[ReasoningBank] Database: .swarm/memory.db
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Update claude-flow After Publishing
|
|
129
|
+
|
|
130
|
+
Once agentic-flow@1.8.5 is published, update claude-flow:
|
|
131
|
+
|
|
132
|
+
### 1. Update Dependency
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
cd /workspaces/claude-code-flow
|
|
136
|
+
npm install agentic-flow@1.8.5 --legacy-peer-deps
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### 2. Update package.json
|
|
140
|
+
|
|
141
|
+
Already set to use `^1.8.4`, which will automatically pick up 1.8.5:
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"dependencies": {
|
|
145
|
+
"agentic-flow": "^1.8.4" // Will match 1.8.5
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### 3. Remove Unnecessary Patch Script
|
|
151
|
+
|
|
152
|
+
The postinstall patch is no longer needed. Edit `package.json`:
|
|
153
|
+
|
|
154
|
+
**Before:**
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"postinstall": "node scripts/install-arm64.js || true && bash scripts/fix-agentdb-imports.sh || true && bash scripts/fix-agentic-flow-sqlite.sh || true && bash scripts/fix-agentic-flow-enabled-log.sh || true"
|
|
158
|
+
}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**After:**
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"postinstall": "node scripts/install-arm64.js || true && bash scripts/fix-agentdb-imports.sh || true"
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### 4. Publish claude-flow@2.7.23
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Update version
|
|
172
|
+
npm version patch # Changes to 2.7.23
|
|
173
|
+
|
|
174
|
+
# Build
|
|
175
|
+
npm run build:esm
|
|
176
|
+
|
|
177
|
+
# Commit
|
|
178
|
+
git add .
|
|
179
|
+
git commit -m "chore: v2.7.23 - Use agentic-flow@1.8.5 with fixed log message"
|
|
180
|
+
|
|
181
|
+
# Publish
|
|
182
|
+
npm publish --tag alpha
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Testing
|
|
186
|
+
|
|
187
|
+
### Test with npx (no local installation):
|
|
188
|
+
```bash
|
|
189
|
+
npx claude-flow@alpha memory store "test" "value"
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Expected output:**
|
|
193
|
+
```
|
|
194
|
+
[ReasoningBank] Initializing...
|
|
195
|
+
[ReasoningBank] Enabled: true (initializing...) ✅
|
|
196
|
+
[ReasoningBank] Database: .swarm/memory.db
|
|
197
|
+
[INFO] Database migrations completed
|
|
198
|
+
✅ Stored successfully in ReasoningBank
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## Why Patch Scripts Don't Work for npx
|
|
202
|
+
|
|
203
|
+
**The issue:** Postinstall hooks don't run when using npx because:
|
|
204
|
+
1. npx installs to a temporary directory
|
|
205
|
+
2. npx skips postinstall scripts for security reasons
|
|
206
|
+
3. The package is downloaded fresh from npm registry
|
|
207
|
+
|
|
208
|
+
**The solution:** Fix must be in the source code of agentic-flow, not a runtime patch.
|
|
209
|
+
|
|
210
|
+
## Related Issues
|
|
211
|
+
|
|
212
|
+
- GitHub Issue #840: SQLite fix (agentic-flow@1.8.4)
|
|
213
|
+
- This issue: Log message fix (agentic-flow@1.8.5)
|
|
214
|
+
|
|
215
|
+
## Timeline
|
|
216
|
+
|
|
217
|
+
- **v1.8.3**: Had `const BetterSqlite3 = null;` bug
|
|
218
|
+
- **v1.8.4**: Fixed better-sqlite3 import
|
|
219
|
+
- **v1.8.5**: Fix misleading "Enabled: false" log message (this fix)
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
**Summary:** The "Enabled: false" message needs to be fixed in agentic-flow's source code and published as v1.8.5, just like the better-sqlite3 fix was published in v1.8.4.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-flow",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.23",
|
|
4
4
|
"description": "Enterprise-grade AI agent orchestration with WASM-powered ReasoningBank memory and AgentDB vector database (always uses latest agentic-flow)",
|
|
5
5
|
"mcpName": "io.github.ruvnet/claude-flow",
|
|
6
6
|
"main": "cli.mjs",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"@anthropic-ai/claude-code": "^2.0.1",
|
|
121
121
|
"@anthropic-ai/sdk": "^0.65.0",
|
|
122
122
|
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
123
|
-
"agentic-flow": "^1.8.
|
|
123
|
+
"agentic-flow": "^1.8.5",
|
|
124
124
|
"blessed": "^0.1.81",
|
|
125
125
|
"chalk": "^4.1.2",
|
|
126
126
|
"cli-table3": "^0.6.3",
|
|
@@ -138,7 +138,8 @@
|
|
|
138
138
|
"p-queue": "^8.1.0",
|
|
139
139
|
"ruv-swarm": "^1.0.14",
|
|
140
140
|
"ws": "^8.18.3",
|
|
141
|
-
"yaml": "^2.8.0"
|
|
141
|
+
"yaml": "^2.8.0",
|
|
142
|
+
"yoctocolors-cjs": "^2.1.3"
|
|
142
143
|
},
|
|
143
144
|
"optionalDependencies": {
|
|
144
145
|
"@types/better-sqlite3": "^7.6.13",
|