@sparkleideas/cli 3.1.0-alpha.20 → 3.1.0-alpha.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/dist/src/commands/benchmark.js +2 -2
- package/dist/src/commands/claims.js +1 -1
- package/dist/src/commands/config.js +1 -1
- package/dist/src/commands/daemon.js +5 -5
- package/dist/src/commands/deployment.js +5 -5
- package/dist/src/commands/doctor.js +5 -5
- package/dist/src/commands/embeddings.js +3 -3
- package/dist/src/commands/guidance.js +1 -1
- package/dist/src/commands/hooks.js +11 -11
- package/dist/src/commands/init.js +11 -11
- package/dist/src/commands/migrate.js +7 -7
- package/dist/src/commands/neural.js +3 -3
- package/dist/src/commands/process.js +4 -4
- package/dist/src/commands/progress.js +1 -1
- package/dist/src/commands/start.js +4 -4
- package/dist/src/commands/status.js +1 -1
- package/dist/src/config-adapter.js +2 -2
- package/dist/src/init/executor.js +41 -41
- package/dist/src/init/helpers-generator.js +10 -10
- package/dist/src/init/statusline-generator.js +16 -16
- package/dist/src/init/types.d.ts +2 -2
- package/dist/src/mcp-tools/agent-tools.js +1 -1
- package/dist/src/mcp-tools/claims-tools.js +1 -1
- package/dist/src/mcp-tools/config-tools.js +1 -1
- package/dist/src/mcp-tools/coordination-tools.js +1 -1
- package/dist/src/mcp-tools/daa-tools.js +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +1 -1
- package/dist/src/mcp-tools/github-tools.js +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +3 -3
- package/dist/src/mcp-tools/hooks-tools.js +1 -1
- package/dist/src/mcp-tools/memory-tools.js +1 -1
- package/dist/src/mcp-tools/neural-tools.js +1 -1
- package/dist/src/mcp-tools/performance-tools.js +1 -1
- package/dist/src/mcp-tools/progress-tools.js +1 -1
- package/dist/src/mcp-tools/session-tools.js +1 -1
- package/dist/src/mcp-tools/system-tools.js +2 -2
- package/dist/src/mcp-tools/task-tools.js +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +1 -1
- package/dist/src/mcp-tools/workflow-tools.js +1 -1
- package/dist/src/memory/intelligence.js +5 -5
- package/dist/src/memory/memory-bridge.js +2 -2
- package/dist/src/memory/memory-initializer.js +1 -1
- package/dist/src/plugins/manager.js +2 -2
- package/dist/src/plugins/store/discovery.js +1 -1
- package/dist/src/services/claim-service.js +1 -1
- package/dist/src/services/container-worker-pool.js +2 -2
- package/dist/src/services/headless-worker-executor.js +2 -2
- package/dist/src/services/worker-daemon.js +14 -14
- package/dist/src/transfer/store/registry.js +1 -1
- package/dist/src/update/executor.js +1 -1
- package/dist/src/update/rate-limiter.js +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
7
7
|
import { join } from 'node:path';
|
|
8
8
|
// Storage paths
|
|
9
|
-
const STORAGE_DIR = '
|
|
9
|
+
const STORAGE_DIR = '.claude-flow';
|
|
10
10
|
const TASK_DIR = 'tasks';
|
|
11
11
|
const TASK_FILE = 'store.json';
|
|
12
12
|
function getTaskDir() {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
12
12
|
import { join } from 'node:path';
|
|
13
13
|
// Storage paths
|
|
14
|
-
const STORAGE_DIR = '
|
|
14
|
+
const STORAGE_DIR = '.claude-flow';
|
|
15
15
|
const TERMINAL_DIR = 'terminals';
|
|
16
16
|
const TERMINAL_FILE = 'store.json';
|
|
17
17
|
function getTerminalDir() {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'node:fs';
|
|
7
7
|
import { join } from 'node:path';
|
|
8
8
|
// Storage paths
|
|
9
|
-
const STORAGE_DIR = '
|
|
9
|
+
const STORAGE_DIR = '.claude-flow';
|
|
10
10
|
const WORKFLOW_DIR = 'workflows';
|
|
11
11
|
const WORKFLOW_FILE = 'store.json';
|
|
12
12
|
function getWorkflowDir() {
|
|
@@ -18,15 +18,15 @@ import { join } from 'node:path';
|
|
|
18
18
|
// ============================================================================
|
|
19
19
|
/**
|
|
20
20
|
* Get the data directory for neural pattern persistence
|
|
21
|
-
* Uses
|
|
21
|
+
* Uses .claude-flow/neural in the current working directory,
|
|
22
22
|
* falling back to home directory
|
|
23
23
|
*/
|
|
24
24
|
function getDataDir() {
|
|
25
25
|
const cwd = process.cwd();
|
|
26
|
-
const localDir = join(cwd, '
|
|
27
|
-
const homeDir = join(homedir(), '
|
|
28
|
-
// Prefer local directory if
|
|
29
|
-
if (existsSync(join(cwd, '
|
|
26
|
+
const localDir = join(cwd, '.claude-flow', 'neural');
|
|
27
|
+
const homeDir = join(homedir(), '.claude-flow', 'neural');
|
|
28
|
+
// Prefer local directory if .claude-flow exists
|
|
29
|
+
if (existsSync(join(cwd, '.claude-flow'))) {
|
|
30
30
|
return localDir;
|
|
31
31
|
}
|
|
32
32
|
return homeDir;
|
|
@@ -297,7 +297,7 @@ export async function bridgeStoreEntry(options) {
|
|
|
297
297
|
let model = 'local';
|
|
298
298
|
if (options.generateEmbeddingFlag !== false && value.length > 0) {
|
|
299
299
|
try {
|
|
300
|
-
const embedder = ctx
|
|
300
|
+
const embedder = ctx.agentdb.embedder;
|
|
301
301
|
if (embedder) {
|
|
302
302
|
const emb = await embedder.embed(value);
|
|
303
303
|
if (emb) {
|
|
@@ -363,7 +363,7 @@ export async function bridgeSearchEntries(options) {
|
|
|
363
363
|
// Generate query embedding
|
|
364
364
|
let queryEmbedding = null;
|
|
365
365
|
try {
|
|
366
|
-
const embedder = ctx
|
|
366
|
+
const embedder = ctx.agentdb.embedder;
|
|
367
367
|
if (embedder) {
|
|
368
368
|
const emb = await embedder.embed(queryStr);
|
|
369
369
|
queryEmbedding = Array.from(emb);
|
|
@@ -879,7 +879,7 @@ export async function checkAndMigrateLegacy(options) {
|
|
|
879
879
|
path.join(process.cwd(), 'memory.db'),
|
|
880
880
|
path.join(process.cwd(), '.claude/memory.db'),
|
|
881
881
|
path.join(process.cwd(), 'data/memory.db'),
|
|
882
|
-
path.join(process.cwd(), '
|
|
882
|
+
path.join(process.cwd(), '.claude-flow/memory.db')
|
|
883
883
|
];
|
|
884
884
|
for (const legacyPath of legacyPaths) {
|
|
885
885
|
if (fs.existsSync(legacyPath) && legacyPath !== dbPath) {
|
|
@@ -33,7 +33,7 @@ export class PluginManager {
|
|
|
33
33
|
config;
|
|
34
34
|
manifest = null;
|
|
35
35
|
constructor(baseDir = process.cwd()) {
|
|
36
|
-
const pluginsDir = path.join(baseDir, '
|
|
36
|
+
const pluginsDir = path.join(baseDir, '.claude-flow', 'plugins');
|
|
37
37
|
this.config = {
|
|
38
38
|
pluginsDir,
|
|
39
39
|
manifestPath: path.join(pluginsDir, 'installed.json'),
|
|
@@ -389,7 +389,7 @@ export function getPluginManager(baseDir) {
|
|
|
389
389
|
if (!defaultManager) {
|
|
390
390
|
defaultManager = new PluginManager(baseDir);
|
|
391
391
|
}
|
|
392
|
-
else if (baseDir && defaultManager.getPluginsDir() !== path.join(baseDir, '
|
|
392
|
+
else if (baseDir && defaultManager.getPluginsDir() !== path.join(baseDir, '.claude-flow', 'plugins')) {
|
|
393
393
|
console.warn(`[PluginManager] Warning: getPluginManager called with different baseDir. Using existing instance. Call resetPluginManager() first to change.`);
|
|
394
394
|
}
|
|
395
395
|
return defaultManager;
|
|
@@ -72,7 +72,7 @@ export const DEFAULT_PLUGIN_STORE_CONFIG = {
|
|
|
72
72
|
defaultRegistry: 'claude-flow-official',
|
|
73
73
|
gateway: 'https://gateway.pinata.cloud',
|
|
74
74
|
timeout: 30000,
|
|
75
|
-
cacheDir: '
|
|
75
|
+
cacheDir: '.claude-flow/plugins/cache',
|
|
76
76
|
cacheExpiry: 3600000, // 1 hour
|
|
77
77
|
requireVerification: true,
|
|
78
78
|
requireSecurityAudit: false,
|
|
@@ -43,7 +43,7 @@ export class ClaimService extends EventEmitter {
|
|
|
43
43
|
eventLog = [];
|
|
44
44
|
constructor(projectRoot, config) {
|
|
45
45
|
super();
|
|
46
|
-
this.storagePath = path.join(projectRoot, '
|
|
46
|
+
this.storagePath = path.join(projectRoot, '.claude-flow', 'claims');
|
|
47
47
|
this.config = { ...DEFAULT_CONFIG, ...config };
|
|
48
48
|
}
|
|
49
49
|
// ==========================================================================
|
|
@@ -35,7 +35,7 @@ const DEFAULT_CONFIG = {
|
|
|
35
35
|
healthCheckIntervalMs: 30000,
|
|
36
36
|
idleTimeoutMs: 300000, // 5 minutes
|
|
37
37
|
workspacePath: '/workspace',
|
|
38
|
-
statePath: '
|
|
38
|
+
statePath: '.claude-flow/container-pool',
|
|
39
39
|
defaultSandbox: 'strict',
|
|
40
40
|
};
|
|
41
41
|
// ============================================
|
|
@@ -274,7 +274,7 @@ export class ContainerWorkerPool extends EventEmitter {
|
|
|
274
274
|
'--cpus', this.config.resources.cpus,
|
|
275
275
|
'--memory', this.config.resources.memory,
|
|
276
276
|
'-v', `${this.projectRoot}:${this.config.workspacePath}:ro`,
|
|
277
|
-
'-v', `${join(this.projectRoot, this.config.statePath)}:/root
|
|
277
|
+
'-v', `${join(this.projectRoot, this.config.statePath)}:/root/.claude-flow`,
|
|
278
278
|
'-w', this.config.workspacePath,
|
|
279
279
|
];
|
|
280
280
|
// Add environment variables
|
|
@@ -255,7 +255,7 @@ Provide preload suggestions as JSON:
|
|
|
255
255
|
sandbox: 'strict',
|
|
256
256
|
model: 'haiku',
|
|
257
257
|
outputFormat: 'json',
|
|
258
|
-
contextPatterns: ['
|
|
258
|
+
contextPatterns: ['.claude-flow/metrics/*.json'],
|
|
259
259
|
timeoutMs: 2 * 60 * 1000,
|
|
260
260
|
},
|
|
261
261
|
},
|
|
@@ -368,7 +368,7 @@ export class HeadlessWorkerExecutor extends EventEmitter {
|
|
|
368
368
|
defaultTimeoutMs: options?.defaultTimeoutMs ?? 5 * 60 * 1000,
|
|
369
369
|
maxContextFiles: options?.maxContextFiles ?? 20,
|
|
370
370
|
maxCharsPerFile: options?.maxCharsPerFile ?? 5000,
|
|
371
|
-
logDir: options?.logDir ?? join(projectRoot, '
|
|
371
|
+
logDir: options?.logDir ?? join(projectRoot, '.claude-flow', 'logs', 'headless'),
|
|
372
372
|
cacheContext: options?.cacheContext ?? true,
|
|
373
373
|
cacheTtlMs: options?.cacheTtlMs ?? 60000, // 1 minute default
|
|
374
374
|
};
|
|
@@ -43,7 +43,7 @@ export class WorkerDaemon extends EventEmitter {
|
|
|
43
43
|
constructor(projectRoot, config) {
|
|
44
44
|
super();
|
|
45
45
|
this.projectRoot = projectRoot;
|
|
46
|
-
const claudeFlowDir = join(projectRoot, '
|
|
46
|
+
const claudeFlowDir = join(projectRoot, '.claude-flow');
|
|
47
47
|
this.config = {
|
|
48
48
|
autoStart: config?.autoStart ?? false, // P1 fix: Default to false for explicit consent
|
|
49
49
|
logDir: config?.logDir ?? join(claudeFlowDir, 'logs'),
|
|
@@ -449,8 +449,8 @@ export class WorkerDaemon extends EventEmitter {
|
|
|
449
449
|
// Worker implementations
|
|
450
450
|
async runMapWorker() {
|
|
451
451
|
// Scan project structure and update metrics
|
|
452
|
-
const metricsFile = join(this.projectRoot, '
|
|
453
|
-
const metricsDir = join(this.projectRoot, '
|
|
452
|
+
const metricsFile = join(this.projectRoot, '.claude-flow', 'metrics', 'codebase-map.json');
|
|
453
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
454
454
|
if (!existsSync(metricsDir)) {
|
|
455
455
|
mkdirSync(metricsDir, { recursive: true });
|
|
456
456
|
}
|
|
@@ -461,7 +461,7 @@ export class WorkerDaemon extends EventEmitter {
|
|
|
461
461
|
hasPackageJson: existsSync(join(this.projectRoot, 'package.json')),
|
|
462
462
|
hasTsConfig: existsSync(join(this.projectRoot, 'tsconfig.json')),
|
|
463
463
|
hasClaudeConfig: existsSync(join(this.projectRoot, '.claude')),
|
|
464
|
-
hasClaudeFlow: existsSync(join(this.projectRoot, '
|
|
464
|
+
hasClaudeFlow: existsSync(join(this.projectRoot, '.claude-flow')),
|
|
465
465
|
},
|
|
466
466
|
scannedAt: Date.now(),
|
|
467
467
|
};
|
|
@@ -473,8 +473,8 @@ export class WorkerDaemon extends EventEmitter {
|
|
|
473
473
|
*/
|
|
474
474
|
async runAuditWorkerLocal() {
|
|
475
475
|
// Basic security checks
|
|
476
|
-
const auditFile = join(this.projectRoot, '
|
|
477
|
-
const metricsDir = join(this.projectRoot, '
|
|
476
|
+
const auditFile = join(this.projectRoot, '.claude-flow', 'metrics', 'security-audit.json');
|
|
477
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
478
478
|
if (!existsSync(metricsDir)) {
|
|
479
479
|
mkdirSync(metricsDir, { recursive: true });
|
|
480
480
|
}
|
|
@@ -498,8 +498,8 @@ export class WorkerDaemon extends EventEmitter {
|
|
|
498
498
|
*/
|
|
499
499
|
async runOptimizeWorkerLocal() {
|
|
500
500
|
// Update performance metrics
|
|
501
|
-
const optimizeFile = join(this.projectRoot, '
|
|
502
|
-
const metricsDir = join(this.projectRoot, '
|
|
501
|
+
const optimizeFile = join(this.projectRoot, '.claude-flow', 'metrics', 'performance.json');
|
|
502
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
503
503
|
if (!existsSync(metricsDir)) {
|
|
504
504
|
mkdirSync(metricsDir, { recursive: true });
|
|
505
505
|
}
|
|
@@ -519,8 +519,8 @@ export class WorkerDaemon extends EventEmitter {
|
|
|
519
519
|
}
|
|
520
520
|
async runConsolidateWorker() {
|
|
521
521
|
// Memory consolidation - clean up old patterns
|
|
522
|
-
const consolidateFile = join(this.projectRoot, '
|
|
523
|
-
const metricsDir = join(this.projectRoot, '
|
|
522
|
+
const consolidateFile = join(this.projectRoot, '.claude-flow', 'metrics', 'consolidation.json');
|
|
523
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
524
524
|
if (!existsSync(metricsDir)) {
|
|
525
525
|
mkdirSync(metricsDir, { recursive: true });
|
|
526
526
|
}
|
|
@@ -538,8 +538,8 @@ export class WorkerDaemon extends EventEmitter {
|
|
|
538
538
|
*/
|
|
539
539
|
async runTestGapsWorkerLocal() {
|
|
540
540
|
// Check for test coverage gaps
|
|
541
|
-
const testGapsFile = join(this.projectRoot, '
|
|
542
|
-
const metricsDir = join(this.projectRoot, '
|
|
541
|
+
const testGapsFile = join(this.projectRoot, '.claude-flow', 'metrics', 'test-gaps.json');
|
|
542
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
543
543
|
if (!existsSync(metricsDir)) {
|
|
544
544
|
mkdirSync(metricsDir, { recursive: true });
|
|
545
545
|
}
|
|
@@ -618,8 +618,8 @@ export class WorkerDaemon extends EventEmitter {
|
|
|
618
618
|
* Local benchmark worker
|
|
619
619
|
*/
|
|
620
620
|
async runBenchmarkWorkerLocal() {
|
|
621
|
-
const benchmarkFile = join(this.projectRoot, '
|
|
622
|
-
const metricsDir = join(this.projectRoot, '
|
|
621
|
+
const benchmarkFile = join(this.projectRoot, '.claude-flow', 'metrics', 'benchmark.json');
|
|
622
|
+
const metricsDir = join(this.projectRoot, '.claude-flow', 'metrics');
|
|
623
623
|
if (!existsSync(metricsDir)) {
|
|
624
624
|
mkdirSync(metricsDir, { recursive: true });
|
|
625
625
|
}
|
|
@@ -36,7 +36,7 @@ export const DEFAULT_STORE_CONFIG = {
|
|
|
36
36
|
defaultRegistry: 'claude-flow-official',
|
|
37
37
|
gateway: 'https://w3s.link',
|
|
38
38
|
timeout: 30000,
|
|
39
|
-
cacheDir: '
|
|
39
|
+
cacheDir: '.claude-flow/patterns/cache',
|
|
40
40
|
cacheExpiry: 3600000, // 1 hour
|
|
41
41
|
requireVerification: false,
|
|
42
42
|
minTrustLevel: 'unverified',
|
|
@@ -7,7 +7,7 @@ import * as fs from 'fs';
|
|
|
7
7
|
import * as path from 'path';
|
|
8
8
|
import * as os from 'os';
|
|
9
9
|
import { validateUpdate } from './validator.js';
|
|
10
|
-
const HISTORY_FILE = path.join(os.homedir(), '
|
|
10
|
+
const HISTORY_FILE = path.join(os.homedir(), '.claude-flow', 'update-history.json');
|
|
11
11
|
const MAX_HISTORY_ENTRIES = 100;
|
|
12
12
|
function ensureDir() {
|
|
13
13
|
const dir = path.dirname(HISTORY_FILE);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as fs from 'fs';
|
|
6
6
|
import * as path from 'path';
|
|
7
7
|
import * as os from 'os';
|
|
8
|
-
const STATE_FILE = path.join(os.homedir(), '
|
|
8
|
+
const STATE_FILE = path.join(os.homedir(), '.claude-flow', 'update-state.json');
|
|
9
9
|
const DEFAULT_INTERVAL_HOURS = 24;
|
|
10
10
|
const MAX_CHECKS_PER_DAY = 10;
|
|
11
11
|
function ensureDir() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sparkleideas/cli",
|
|
3
|
-
"version": "3.1.0-alpha.
|
|
3
|
+
"version": "3.1.0-alpha.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Claude Flow 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",
|