moflo 4.6.2 → 4.6.4

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": "moflo",
3
- "version": "4.6.2",
3
+ "version": "4.6.4",
4
4
  "description": "MoFlo — AI agent orchestration for Claude Code. Forked from ruflo/claude-flow with patches applied to source, plus feature-level orchestration.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -22,7 +22,26 @@ if (isMCPMode) {
22
22
  // Run MCP server mode
23
23
  const { listMCPTools, callMCPTool, hasTool } = await import('../dist/src/mcp-client.js');
24
24
 
25
- const VERSION = '3.0.0';
25
+ // Read version from the root moflo package.json dynamically
26
+ const { readFileSync } = await import('fs');
27
+ const { dirname: _dirname, join: _join } = await import('path');
28
+ const { fileURLToPath: _fileURLToPath } = await import('url');
29
+ let VERSION = '4.6.2';
30
+ try {
31
+ const _thisDir = _dirname(_fileURLToPath(import.meta.url));
32
+ // Walk up to find root moflo package.json
33
+ let _dir = _thisDir;
34
+ for (;;) {
35
+ const _candidate = _join(_dir, 'package.json');
36
+ try {
37
+ const _pkg = JSON.parse(readFileSync(_candidate, 'utf8'));
38
+ if (_pkg.name === 'moflo' && _pkg.version) { VERSION = _pkg.version; break; }
39
+ } catch {}
40
+ const _parent = _dirname(_dir);
41
+ if (_parent === _dir) break;
42
+ _dir = _parent;
43
+ }
44
+ } catch {}
26
45
  const sessionId = `mcp-${Date.now()}-${randomUUID().slice(0, 8)}`;
27
46
 
28
47
  console.error(
@@ -131,30 +131,6 @@ async function checkMemoryDatabase() {
131
131
  }
132
132
  return { name: 'Memory Database', status: 'warn', message: 'Not initialized', fix: 'claude-flow memory configure --backend hybrid' };
133
133
  }
134
- // Check API keys
135
- async function checkApiKeys() {
136
- const keys = ['ANTHROPIC_API_KEY', 'CLAUDE_API_KEY', 'OPENAI_API_KEY'];
137
- const found = [];
138
- for (const key of keys) {
139
- if (process.env[key]) {
140
- found.push(key);
141
- }
142
- }
143
- // Detect Claude Code environment — API keys are managed internally
144
- const inClaudeCode = !!(process.env.CLAUDE_CODE || process.env.CLAUDE_PROJECT_DIR || process.env.MCP_SESSION_ID);
145
- if (found.includes('ANTHROPIC_API_KEY') || found.includes('CLAUDE_API_KEY')) {
146
- return { name: 'API Keys', status: 'pass', message: `Found: ${found.join(', ')}` };
147
- }
148
- else if (inClaudeCode) {
149
- return { name: 'API Keys', status: 'pass', message: 'Claude Code (managed internally)' };
150
- }
151
- else if (found.length > 0) {
152
- return { name: 'API Keys', status: 'warn', message: `Found: ${found.join(', ')} (no Claude key)`, fix: 'export ANTHROPIC_API_KEY=your_key' };
153
- }
154
- else {
155
- return { name: 'API Keys', status: 'warn', message: 'No API keys found', fix: 'export ANTHROPIC_API_KEY=your_key' };
156
- }
157
- }
158
134
  // Check git (async with proper env inheritance)
159
135
  async function checkGit() {
160
136
  try {
@@ -263,7 +239,7 @@ async function checkVersionFreshness() {
263
239
  const pkg = JSON.parse(readFileSync(candidate, 'utf8'));
264
240
  if (pkg.version &&
265
241
  typeof pkg.name === 'string' &&
266
- (pkg.name === '@claude-flow/cli' || pkg.name === 'claude-flow' || pkg.name === 'ruflo')) {
242
+ (pkg.name === '@claude-flow/cli' || pkg.name === 'claude-flow' || pkg.name === 'ruflo' || pkg.name === 'moflo' || pkg.name === '@moflo/cli')) {
267
243
  currentVersion = pkg.version;
268
244
  break;
269
245
  }
@@ -289,7 +265,7 @@ async function checkVersionFreshness() {
289
265
  // Query npm for latest version (using alpha tag since that's what we publish to)
290
266
  let latestVersion = currentVersion;
291
267
  try {
292
- const npmInfo = await runCommand('npm view @claude-flow/cli@alpha version', 5000);
268
+ const npmInfo = await runCommand('npm view moflo version', 5000);
293
269
  latestVersion = npmInfo.trim();
294
270
  }
295
271
  catch {
@@ -491,7 +467,6 @@ export const doctorCommand = {
491
467
  checkConfigFile,
492
468
  checkDaemonStatus,
493
469
  checkMemoryDatabase,
494
- checkApiKeys,
495
470
  checkMcpServers,
496
471
  checkDiskSpace,
497
472
  checkBuildTools,
@@ -506,7 +481,6 @@ export const doctorCommand = {
506
481
  'config': checkConfigFile,
507
482
  'daemon': checkDaemonStatus,
508
483
  'memory': checkMemoryDatabase,
509
- 'api': checkApiKeys,
510
484
  'git': checkGit,
511
485
  'mcp': checkMcpServers,
512
486
  'disk': checkDiskSpace,