ruvector 0.1.77 → 0.1.78
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/cli.js +87 -0
- package/bin/mcp-server.js +231 -0
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -6123,6 +6123,93 @@ workersCmd.command('cancel')
|
|
|
6123
6123
|
}
|
|
6124
6124
|
});
|
|
6125
6125
|
|
|
6126
|
+
// Custom Worker System (agentic-flow@alpha.39+)
|
|
6127
|
+
workersCmd.command('presets')
|
|
6128
|
+
.description('List available worker presets (quick-scan, deep-analysis, security-scan, etc.)')
|
|
6129
|
+
.action(async () => {
|
|
6130
|
+
try {
|
|
6131
|
+
await runAgenticFlow(['workers', 'presets']);
|
|
6132
|
+
} catch (e) {
|
|
6133
|
+
console.error(chalk.red('Presets list failed:'), e.message);
|
|
6134
|
+
}
|
|
6135
|
+
});
|
|
6136
|
+
|
|
6137
|
+
workersCmd.command('phases')
|
|
6138
|
+
.description('List available phase executors (24 phases: file-discovery, security-analysis, etc.)')
|
|
6139
|
+
.action(async () => {
|
|
6140
|
+
try {
|
|
6141
|
+
await runAgenticFlow(['workers', 'phases']);
|
|
6142
|
+
} catch (e) {
|
|
6143
|
+
console.error(chalk.red('Phases list failed:'), e.message);
|
|
6144
|
+
}
|
|
6145
|
+
});
|
|
6146
|
+
|
|
6147
|
+
workersCmd.command('create')
|
|
6148
|
+
.description('Create a custom worker from preset')
|
|
6149
|
+
.argument('<name>', 'Worker name')
|
|
6150
|
+
.option('--preset <preset>', 'Base preset (quick-scan, deep-analysis, security-scan, learning, api-docs, test-analysis)')
|
|
6151
|
+
.option('--triggers <triggers>', 'Comma-separated trigger keywords')
|
|
6152
|
+
.action(async (name, opts) => {
|
|
6153
|
+
try {
|
|
6154
|
+
const args = ['workers', 'create', name];
|
|
6155
|
+
if (opts.preset) args.push('--preset', opts.preset);
|
|
6156
|
+
if (opts.triggers) args.push('--triggers', opts.triggers);
|
|
6157
|
+
await runAgenticFlow(args);
|
|
6158
|
+
} catch (e) {
|
|
6159
|
+
console.error(chalk.red('Worker creation failed:'), e.message);
|
|
6160
|
+
}
|
|
6161
|
+
});
|
|
6162
|
+
|
|
6163
|
+
workersCmd.command('run')
|
|
6164
|
+
.description('Run a custom worker')
|
|
6165
|
+
.argument('<name>', 'Worker name')
|
|
6166
|
+
.option('--path <path>', 'Target path to analyze', '.')
|
|
6167
|
+
.action(async (name, opts) => {
|
|
6168
|
+
try {
|
|
6169
|
+
const args = ['workers', 'run', name];
|
|
6170
|
+
if (opts.path) args.push('--path', opts.path);
|
|
6171
|
+
await runAgenticFlow(args);
|
|
6172
|
+
} catch (e) {
|
|
6173
|
+
console.error(chalk.red('Worker run failed:'), e.message);
|
|
6174
|
+
}
|
|
6175
|
+
});
|
|
6176
|
+
|
|
6177
|
+
workersCmd.command('custom')
|
|
6178
|
+
.description('List registered custom workers')
|
|
6179
|
+
.action(async () => {
|
|
6180
|
+
try {
|
|
6181
|
+
await runAgenticFlow(['workers', 'custom']);
|
|
6182
|
+
} catch (e) {
|
|
6183
|
+
console.error(chalk.red('Custom workers list failed:'), e.message);
|
|
6184
|
+
}
|
|
6185
|
+
});
|
|
6186
|
+
|
|
6187
|
+
workersCmd.command('init-config')
|
|
6188
|
+
.description('Generate example workers.yaml config file')
|
|
6189
|
+
.option('--force', 'Overwrite existing config')
|
|
6190
|
+
.action(async (opts) => {
|
|
6191
|
+
try {
|
|
6192
|
+
const args = ['workers', 'init-config'];
|
|
6193
|
+
if (opts.force) args.push('--force');
|
|
6194
|
+
await runAgenticFlow(args);
|
|
6195
|
+
} catch (e) {
|
|
6196
|
+
console.error(chalk.red('Config init failed:'), e.message);
|
|
6197
|
+
}
|
|
6198
|
+
});
|
|
6199
|
+
|
|
6200
|
+
workersCmd.command('load-config')
|
|
6201
|
+
.description('Load custom workers from workers.yaml')
|
|
6202
|
+
.option('--file <file>', 'Config file path', 'workers.yaml')
|
|
6203
|
+
.action(async (opts) => {
|
|
6204
|
+
try {
|
|
6205
|
+
const args = ['workers', 'load-config'];
|
|
6206
|
+
if (opts.file !== 'workers.yaml') args.push('--file', opts.file);
|
|
6207
|
+
await runAgenticFlow(args);
|
|
6208
|
+
} catch (e) {
|
|
6209
|
+
console.error(chalk.red('Config load failed:'), e.message);
|
|
6210
|
+
}
|
|
6211
|
+
});
|
|
6212
|
+
|
|
6126
6213
|
console.log && false; // Force registration
|
|
6127
6214
|
|
|
6128
6215
|
// MCP Server command
|
package/bin/mcp-server.js
CHANGED
|
@@ -970,6 +970,81 @@ const TOOLS = [
|
|
|
970
970
|
properties: {},
|
|
971
971
|
required: []
|
|
972
972
|
}
|
|
973
|
+
},
|
|
974
|
+
// Custom Worker System (agentic-flow@alpha.39+)
|
|
975
|
+
{
|
|
976
|
+
name: 'workers_presets',
|
|
977
|
+
description: 'List available worker presets (quick-scan, deep-analysis, security-scan, learning, api-docs, test-analysis)',
|
|
978
|
+
inputSchema: {
|
|
979
|
+
type: 'object',
|
|
980
|
+
properties: {},
|
|
981
|
+
required: []
|
|
982
|
+
}
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
name: 'workers_phases',
|
|
986
|
+
description: 'List available phase executors (24 phases including file-discovery, security-analysis, pattern-extraction)',
|
|
987
|
+
inputSchema: {
|
|
988
|
+
type: 'object',
|
|
989
|
+
properties: {},
|
|
990
|
+
required: []
|
|
991
|
+
}
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
name: 'workers_create',
|
|
995
|
+
description: 'Create a custom worker from preset with composable phases',
|
|
996
|
+
inputSchema: {
|
|
997
|
+
type: 'object',
|
|
998
|
+
properties: {
|
|
999
|
+
name: { type: 'string', description: 'Worker name' },
|
|
1000
|
+
preset: { type: 'string', description: 'Base preset (quick-scan, deep-analysis, security-scan, learning, api-docs, test-analysis)' },
|
|
1001
|
+
triggers: { type: 'string', description: 'Comma-separated trigger keywords' }
|
|
1002
|
+
},
|
|
1003
|
+
required: ['name']
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
name: 'workers_run',
|
|
1008
|
+
description: 'Run a custom worker on target path',
|
|
1009
|
+
inputSchema: {
|
|
1010
|
+
type: 'object',
|
|
1011
|
+
properties: {
|
|
1012
|
+
name: { type: 'string', description: 'Worker name' },
|
|
1013
|
+
path: { type: 'string', description: 'Target path to analyze (default: .)' }
|
|
1014
|
+
},
|
|
1015
|
+
required: ['name']
|
|
1016
|
+
}
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
name: 'workers_custom',
|
|
1020
|
+
description: 'List registered custom workers',
|
|
1021
|
+
inputSchema: {
|
|
1022
|
+
type: 'object',
|
|
1023
|
+
properties: {},
|
|
1024
|
+
required: []
|
|
1025
|
+
}
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
name: 'workers_init_config',
|
|
1029
|
+
description: 'Generate example workers.yaml config file',
|
|
1030
|
+
inputSchema: {
|
|
1031
|
+
type: 'object',
|
|
1032
|
+
properties: {
|
|
1033
|
+
force: { type: 'boolean', description: 'Overwrite existing config' }
|
|
1034
|
+
},
|
|
1035
|
+
required: []
|
|
1036
|
+
}
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
name: 'workers_load_config',
|
|
1040
|
+
description: 'Load custom workers from workers.yaml config file',
|
|
1041
|
+
inputSchema: {
|
|
1042
|
+
type: 'object',
|
|
1043
|
+
properties: {
|
|
1044
|
+
file: { type: 'string', description: 'Config file path (default: workers.yaml)' }
|
|
1045
|
+
},
|
|
1046
|
+
required: []
|
|
1047
|
+
}
|
|
973
1048
|
}
|
|
974
1049
|
];
|
|
975
1050
|
|
|
@@ -2237,6 +2312,162 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
2237
2312
|
}
|
|
2238
2313
|
}
|
|
2239
2314
|
|
|
2315
|
+
// Custom Worker System handlers (agentic-flow@alpha.39+)
|
|
2316
|
+
case 'workers_presets': {
|
|
2317
|
+
try {
|
|
2318
|
+
const result = execSync('npx agentic-flow@alpha workers presets', {
|
|
2319
|
+
encoding: 'utf-8',
|
|
2320
|
+
timeout: 15000,
|
|
2321
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
2322
|
+
});
|
|
2323
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2324
|
+
success: true,
|
|
2325
|
+
presets: result.trim()
|
|
2326
|
+
}, null, 2) }] };
|
|
2327
|
+
} catch (e) {
|
|
2328
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2329
|
+
success: true,
|
|
2330
|
+
presets: ['quick-scan', 'deep-analysis', 'security-scan', 'learning', 'api-docs', 'test-analysis'],
|
|
2331
|
+
note: 'Hardcoded fallback - install agentic-flow@alpha for full support'
|
|
2332
|
+
}, null, 2) }] };
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
|
|
2336
|
+
case 'workers_phases': {
|
|
2337
|
+
try {
|
|
2338
|
+
const result = execSync('npx agentic-flow@alpha workers phases', {
|
|
2339
|
+
encoding: 'utf-8',
|
|
2340
|
+
timeout: 15000,
|
|
2341
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
2342
|
+
});
|
|
2343
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2344
|
+
success: true,
|
|
2345
|
+
phases: result.trim()
|
|
2346
|
+
}, null, 2) }] };
|
|
2347
|
+
} catch (e) {
|
|
2348
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2349
|
+
success: true,
|
|
2350
|
+
phases: ['file-discovery', 'static-analysis', 'security-analysis', 'pattern-extraction', 'dependency-analysis', 'complexity-analysis', 'test-coverage', 'api-extraction', 'secret-detection', 'report-generation'],
|
|
2351
|
+
note: 'Partial list - install agentic-flow@alpha for all 24 phases'
|
|
2352
|
+
}, null, 2) }] };
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
case 'workers_create': {
|
|
2357
|
+
const name = args.name;
|
|
2358
|
+
const preset = args.preset || 'quick-scan';
|
|
2359
|
+
const triggers = args.triggers;
|
|
2360
|
+
try {
|
|
2361
|
+
let cmd = `npx agentic-flow@alpha workers create "${name}" --preset ${preset}`;
|
|
2362
|
+
if (triggers) cmd += ` --triggers "${triggers}"`;
|
|
2363
|
+
const result = execSync(cmd, {
|
|
2364
|
+
encoding: 'utf-8',
|
|
2365
|
+
timeout: 30000,
|
|
2366
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
2367
|
+
});
|
|
2368
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2369
|
+
success: true,
|
|
2370
|
+
message: `Worker '${name}' created with preset '${preset}'`,
|
|
2371
|
+
output: result.trim()
|
|
2372
|
+
}, null, 2) }] };
|
|
2373
|
+
} catch (e) {
|
|
2374
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2375
|
+
success: false,
|
|
2376
|
+
error: 'Worker creation failed',
|
|
2377
|
+
message: e.message
|
|
2378
|
+
}, null, 2) }] };
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
case 'workers_run': {
|
|
2383
|
+
const name = args.name;
|
|
2384
|
+
const targetPath = args.path || '.';
|
|
2385
|
+
try {
|
|
2386
|
+
const result = execSync(`npx agentic-flow@alpha workers run "${name}" --path "${targetPath}"`, {
|
|
2387
|
+
encoding: 'utf-8',
|
|
2388
|
+
timeout: 120000,
|
|
2389
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
2390
|
+
});
|
|
2391
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2392
|
+
success: true,
|
|
2393
|
+
worker: name,
|
|
2394
|
+
path: targetPath,
|
|
2395
|
+
output: result.trim()
|
|
2396
|
+
}, null, 2) }] };
|
|
2397
|
+
} catch (e) {
|
|
2398
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2399
|
+
success: false,
|
|
2400
|
+
error: `Worker '${name}' execution failed`,
|
|
2401
|
+
message: e.message
|
|
2402
|
+
}, null, 2) }] };
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
|
|
2406
|
+
case 'workers_custom': {
|
|
2407
|
+
try {
|
|
2408
|
+
const result = execSync('npx agentic-flow@alpha workers custom', {
|
|
2409
|
+
encoding: 'utf-8',
|
|
2410
|
+
timeout: 15000,
|
|
2411
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
2412
|
+
});
|
|
2413
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2414
|
+
success: true,
|
|
2415
|
+
workers: result.trim()
|
|
2416
|
+
}, null, 2) }] };
|
|
2417
|
+
} catch (e) {
|
|
2418
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2419
|
+
success: true,
|
|
2420
|
+
workers: [],
|
|
2421
|
+
note: 'No custom workers registered'
|
|
2422
|
+
}, null, 2) }] };
|
|
2423
|
+
}
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
case 'workers_init_config': {
|
|
2427
|
+
try {
|
|
2428
|
+
let cmd = 'npx agentic-flow@alpha workers init-config';
|
|
2429
|
+
if (args.force) cmd += ' --force';
|
|
2430
|
+
const result = execSync(cmd, {
|
|
2431
|
+
encoding: 'utf-8',
|
|
2432
|
+
timeout: 15000,
|
|
2433
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
2434
|
+
});
|
|
2435
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2436
|
+
success: true,
|
|
2437
|
+
message: 'workers.yaml config file created',
|
|
2438
|
+
output: result.trim()
|
|
2439
|
+
}, null, 2) }] };
|
|
2440
|
+
} catch (e) {
|
|
2441
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2442
|
+
success: false,
|
|
2443
|
+
error: 'Config init failed',
|
|
2444
|
+
message: e.message
|
|
2445
|
+
}, null, 2) }] };
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
case 'workers_load_config': {
|
|
2450
|
+
const configFile = args.file || 'workers.yaml';
|
|
2451
|
+
try {
|
|
2452
|
+
const result = execSync(`npx agentic-flow@alpha workers load-config --file "${configFile}"`, {
|
|
2453
|
+
encoding: 'utf-8',
|
|
2454
|
+
timeout: 30000,
|
|
2455
|
+
stdio: ['pipe', 'pipe', 'pipe']
|
|
2456
|
+
});
|
|
2457
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2458
|
+
success: true,
|
|
2459
|
+
file: configFile,
|
|
2460
|
+
output: result.trim()
|
|
2461
|
+
}, null, 2) }] };
|
|
2462
|
+
} catch (e) {
|
|
2463
|
+
return { content: [{ type: 'text', text: JSON.stringify({
|
|
2464
|
+
success: false,
|
|
2465
|
+
error: `Config load failed from '${configFile}'`,
|
|
2466
|
+
message: e.message
|
|
2467
|
+
}, null, 2) }] };
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
|
|
2240
2471
|
default:
|
|
2241
2472
|
return {
|
|
2242
2473
|
content: [{
|