monomind 1.18.9 → 1.18.10
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 +1 -1
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +1 -2
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +2 -117
- package/packages/@monomind/cli/dist/src/commands/hooks.js +1 -2
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/commands/index.js +0 -1
- package/packages/@monomind/cli/dist/src/init/executor.d.ts +3 -0
- package/packages/@monomind/cli/dist/src/init/executor.js +20 -111
- package/packages/@monomind/cli/dist/src/mcp-client.js +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/track-trends.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/test-generation/suggest-tests.d.ts +4 -4
- package/packages/@monomind/cli/package.json +1 -1
- package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.d.ts +0 -134
- package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.js +0 -340
- package/packages/@monomind/cli/dist/src/benchmarks/metric-evaluators.d.ts +0 -36
- package/packages/@monomind/cli/dist/src/benchmarks/metric-evaluators.js +0 -125
- package/packages/@monomind/cli/dist/src/commands/benchmark.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/benchmark.js +0 -586
- package/packages/@monomind/cli/dist/src/commands/migrate.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/migrate.js +0 -789
- package/packages/@monomind/cli/dist/src/commands/monovector/backup.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/monovector/backup.js +0 -752
- package/packages/@monomind/cli/dist/src/commands/monovector/benchmark.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/monovector/benchmark.js +0 -502
- package/packages/@monomind/cli/dist/src/commands/monovector/import.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/commands/monovector/import.js +0 -374
- package/packages/@monomind/cli/dist/src/commands/monovector/index.d.ts +0 -29
- package/packages/@monomind/cli/dist/src/commands/monovector/index.js +0 -129
- package/packages/@monomind/cli/dist/src/commands/monovector/init.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/monovector/init.js +0 -481
- package/packages/@monomind/cli/dist/src/commands/monovector/migrate.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/monovector/migrate.js +0 -500
- package/packages/@monomind/cli/dist/src/commands/monovector/optimize.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/monovector/optimize.js +0 -515
- package/packages/@monomind/cli/dist/src/commands/monovector/setup.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/commands/monovector/setup.js +0 -775
- package/packages/@monomind/cli/dist/src/commands/monovector/status.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/monovector/status.js +0 -491
- package/packages/@monomind/cli/dist/src/commands/progress.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/progress.js +0 -261
- package/packages/@monomind/cli/dist/src/mcp-tools/progress-tools.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/mcp-tools/progress-tools.js +0 -353
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monomind",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.10",
|
|
4
4
|
"description": "Monomind - 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",
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hooks Coverage Commands
|
|
3
|
-
* Coverage-aware routing
|
|
3
|
+
* Coverage-aware routing and statusline generation.
|
|
4
4
|
* Extracted from hooks.ts to reduce file size.
|
|
5
5
|
*/
|
|
6
6
|
import type { Command } from '../types.js';
|
|
7
7
|
export { coverageRouteCommand } from './hooks-coverage-routing.js';
|
|
8
8
|
export { coverageSuggestCommand } from './hooks-coverage-routing.js';
|
|
9
9
|
export { coverageGapsCommand } from './hooks-coverage-gaps.js';
|
|
10
|
-
export { progressHookCommand } from './hooks-coverage-gaps.js';
|
|
11
10
|
export declare const statuslineCommand: Command;
|
|
12
11
|
//# sourceMappingURL=hooks-coverage-commands.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hooks Coverage Commands
|
|
3
|
-
* Coverage-aware routing
|
|
3
|
+
* Coverage-aware routing and statusline generation.
|
|
4
4
|
* Extracted from hooks.ts to reduce file size.
|
|
5
5
|
*/
|
|
6
6
|
import { output } from '../output.js';
|
|
@@ -8,7 +8,6 @@ import { output } from '../output.js';
|
|
|
8
8
|
export { coverageRouteCommand } from './hooks-coverage-routing.js';
|
|
9
9
|
export { coverageSuggestCommand } from './hooks-coverage-routing.js';
|
|
10
10
|
export { coverageGapsCommand } from './hooks-coverage-gaps.js';
|
|
11
|
-
export { progressHookCommand } from './hooks-coverage-gaps.js';
|
|
12
11
|
// Statusline subcommand - generates dynamic status display
|
|
13
12
|
export const statuslineCommand = {
|
|
14
13
|
name: 'statusline',
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Coverage gaps
|
|
2
|
+
* Coverage gaps hook commands
|
|
3
3
|
*/
|
|
4
4
|
import type { Command } from '../types.js';
|
|
5
5
|
export declare const coverageGapsCommand: Command;
|
|
6
|
-
export declare const progressHookCommand: Command;
|
|
7
6
|
//# sourceMappingURL=hooks-coverage-gaps.d.ts.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Coverage gaps
|
|
2
|
+
* Coverage gaps hook commands
|
|
3
3
|
*/
|
|
4
4
|
import { output } from '../output.js';
|
|
5
|
-
import { callMCPTool
|
|
5
|
+
import { callMCPTool } from '../mcp-client.js';
|
|
6
6
|
import { readCoverageFromDisk, classifyCoverageGap, suggestAgentsForFile, } from './hooks-coverage-utils.js';
|
|
7
7
|
export const coverageGapsCommand = {
|
|
8
8
|
name: 'coverage-gaps',
|
|
@@ -216,119 +216,4 @@ export const coverageGapsCommand = {
|
|
|
216
216
|
}
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
|
-
export const progressHookCommand = {
|
|
220
|
-
name: 'progress',
|
|
221
|
-
description: 'Check implementation progress via hooks',
|
|
222
|
-
options: [
|
|
223
|
-
{
|
|
224
|
-
name: 'detailed',
|
|
225
|
-
short: 'd',
|
|
226
|
-
description: 'Show detailed breakdown by category',
|
|
227
|
-
type: 'boolean',
|
|
228
|
-
default: false
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
name: 'sync',
|
|
232
|
-
short: 's',
|
|
233
|
-
description: 'Sync and persist progress to file',
|
|
234
|
-
type: 'boolean',
|
|
235
|
-
default: false
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
name: 'summary',
|
|
239
|
-
description: 'Show human-readable summary',
|
|
240
|
-
type: 'boolean',
|
|
241
|
-
default: false
|
|
242
|
-
}
|
|
243
|
-
],
|
|
244
|
-
examples: [
|
|
245
|
-
{ command: 'monomind hooks progress', description: 'Check current progress' },
|
|
246
|
-
{ command: 'monomind hooks progress -d', description: 'Detailed breakdown' },
|
|
247
|
-
{ command: 'monomind hooks progress --sync', description: 'Sync progress to file' },
|
|
248
|
-
{ command: 'monomind hooks progress --summary', description: 'Human-readable summary' }
|
|
249
|
-
],
|
|
250
|
-
action: async (ctx) => {
|
|
251
|
-
const detailed = ctx.flags.detailed;
|
|
252
|
-
const sync = ctx.flags.sync;
|
|
253
|
-
const summary = ctx.flags.summary;
|
|
254
|
-
try {
|
|
255
|
-
if (summary) {
|
|
256
|
-
const spinner = output.createSpinner({ text: 'Getting progress summary...' });
|
|
257
|
-
spinner.start();
|
|
258
|
-
const result = await callMCPTool('progress_summary', {});
|
|
259
|
-
spinner.stop();
|
|
260
|
-
if (ctx.flags.format === 'json') {
|
|
261
|
-
output.printJson(result);
|
|
262
|
-
return { success: true, data: result };
|
|
263
|
-
}
|
|
264
|
-
output.writeln();
|
|
265
|
-
output.writeln(result.summary);
|
|
266
|
-
return { success: true, data: result };
|
|
267
|
-
}
|
|
268
|
-
if (sync) {
|
|
269
|
-
const spinner = output.createSpinner({ text: 'Syncing progress...' });
|
|
270
|
-
spinner.start();
|
|
271
|
-
const result = await callMCPTool('progress_sync', {});
|
|
272
|
-
spinner.stop();
|
|
273
|
-
if (ctx.flags.format === 'json') {
|
|
274
|
-
output.printJson(result);
|
|
275
|
-
return { success: true, data: result };
|
|
276
|
-
}
|
|
277
|
-
output.writeln();
|
|
278
|
-
output.printSuccess(`Progress synced: ${result.progress}%`);
|
|
279
|
-
output.writeln(output.dim(` Persisted to .monomind/metrics/v1-progress.json`));
|
|
280
|
-
output.writeln(output.dim(` Last updated: ${result.lastUpdated}`));
|
|
281
|
-
return { success: true, data: result };
|
|
282
|
-
}
|
|
283
|
-
const spinner = output.createSpinner({ text: 'Checking v1 progress...' });
|
|
284
|
-
spinner.start();
|
|
285
|
-
const result = await callMCPTool('progress_check', { detailed });
|
|
286
|
-
spinner.stop();
|
|
287
|
-
if (ctx.flags.format === 'json') {
|
|
288
|
-
output.printJson(result);
|
|
289
|
-
return { success: true, data: result };
|
|
290
|
-
}
|
|
291
|
-
output.writeln();
|
|
292
|
-
const progressValue = result.overall ?? result.progress ?? 0;
|
|
293
|
-
const barWidth = 30;
|
|
294
|
-
const filled = Math.round((progressValue / 100) * barWidth);
|
|
295
|
-
const empty = barWidth - filled;
|
|
296
|
-
const bar = output.success('█'.repeat(filled)) + output.dim('░'.repeat(empty));
|
|
297
|
-
output.writeln(output.bold('v1 Implementation Progress'));
|
|
298
|
-
output.writeln();
|
|
299
|
-
output.writeln(`[${bar}] ${progressValue}%`);
|
|
300
|
-
output.writeln();
|
|
301
|
-
if (detailed && result.cli) {
|
|
302
|
-
output.writeln(output.highlight('CLI Commands:') + ` ${result.cli.progress}% (${result.cli.commands}/${result.cli.target})`);
|
|
303
|
-
output.writeln(output.highlight('MCP Tools:') + ` ${result.mcp?.progress ?? 0}% (${result.mcp?.tools ?? 0}/${result.mcp?.target ?? 0})`);
|
|
304
|
-
output.writeln(output.highlight('Hooks:') + ` ${result.hooks?.progress ?? 0}% (${result.hooks?.subcommands ?? 0}/${result.hooks?.target ?? 0})`);
|
|
305
|
-
output.writeln(output.highlight('Packages:') + ` ${result.packages?.progress ?? 0}% (${result.packages?.total ?? 0}/${result.packages?.target ?? 0})`);
|
|
306
|
-
output.writeln(output.highlight('DDD Structure:') + ` ${result.ddd?.progress ?? 0}% (${result.packages?.withDDD ?? 0}/${result.packages?.total ?? 0})`);
|
|
307
|
-
output.writeln();
|
|
308
|
-
if (result.codebase) {
|
|
309
|
-
output.writeln(output.dim(`Codebase: ${result.codebase.totalFiles} files, ${result.codebase.totalLines.toLocaleString()} lines`));
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
else if (result.breakdown) {
|
|
313
|
-
output.writeln('Breakdown:');
|
|
314
|
-
for (const [category, value] of Object.entries(result.breakdown)) {
|
|
315
|
-
output.writeln(` ${output.highlight(category)}: ${value}`);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
if (result.lastUpdated) {
|
|
319
|
-
output.writeln(output.dim(`Last updated: ${result.lastUpdated}`));
|
|
320
|
-
}
|
|
321
|
-
return { success: true, data: result };
|
|
322
|
-
}
|
|
323
|
-
catch (error) {
|
|
324
|
-
if (error instanceof MCPClientError) {
|
|
325
|
-
output.printError(`Progress check failed: ${error.message}`);
|
|
326
|
-
}
|
|
327
|
-
else {
|
|
328
|
-
output.printError(`Progress check failed: ${String(error)}`);
|
|
329
|
-
}
|
|
330
|
-
return { success: false, exitCode: 1 };
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
219
|
//# sourceMappingURL=hooks-coverage-gaps.js.map
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import { output } from '../output.js';
|
|
14
14
|
import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
15
15
|
import { intelligenceCommand, workerCommand } from './hooks-workers.js';
|
|
16
|
-
import { coverageRouteCommand, coverageSuggestCommand, coverageGapsCommand,
|
|
16
|
+
import { coverageRouteCommand, coverageSuggestCommand, coverageGapsCommand, statuslineCommand, } from './hooks-coverage-commands.js';
|
|
17
17
|
import { tokenOptimizeCommand, modelRouteCommand, modelOutcomeCommand, modelStatsCommand, teammateIdleCommand, taskCompletedCommand, notifyCommand, } from './hooks-extended-commands.js';
|
|
18
18
|
import { preEditCommand, postEditCommand, preCommandCommand, postCommandCommand, } from './hooks-core-commands.js';
|
|
19
19
|
import { routeCommand, explainCommand, pretrainCommand, buildAgentsCommand, metricsCommand, transferCommand, listCommand, } from './hooks-routing-commands.js';
|
|
@@ -423,7 +423,6 @@ export const hooksCommand = {
|
|
|
423
423
|
intelligenceCommand,
|
|
424
424
|
notifyCommand,
|
|
425
425
|
workerCommand,
|
|
426
|
-
progressHookCommand,
|
|
427
426
|
statuslineCommand,
|
|
428
427
|
// Coverage-aware routing commands
|
|
429
428
|
coverageRouteCommand,
|
|
@@ -53,7 +53,6 @@ export declare function getCompletionsCommand(): Promise<Command | undefined>;
|
|
|
53
53
|
export declare function getAnalyzeCommand(): Promise<Command | undefined>;
|
|
54
54
|
export declare function getRouteCommand(): Promise<Command | undefined>;
|
|
55
55
|
export declare function getIssuesCommand(): Promise<Command | undefined>;
|
|
56
|
-
export declare function getMonovectorCommand(): Promise<Command | undefined>;
|
|
57
56
|
export declare function getGuidanceCommand(): Promise<Command | undefined>;
|
|
58
57
|
export declare function getCleanupCommand(): Promise<Command | undefined>;
|
|
59
58
|
export declare function getAutopilotCommand(): Promise<Command | undefined>;
|
|
@@ -234,7 +234,6 @@ export async function getCompletionsCommand() { return loadCommand('completions'
|
|
|
234
234
|
export async function getAnalyzeCommand() { return loadCommand('analyze'); }
|
|
235
235
|
export async function getRouteCommand() { return loadCommand('route'); }
|
|
236
236
|
export async function getIssuesCommand() { return loadCommand('issues'); }
|
|
237
|
-
export async function getMonovectorCommand() { return loadCommand('monovector'); }
|
|
238
237
|
export async function getGuidanceCommand() { return loadCommand('guidance'); }
|
|
239
238
|
export async function getCleanupCommand() { return loadCommand('cleanup'); }
|
|
240
239
|
export async function getAutopilotCommand() { return loadCommand('autopilot'); }
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Main execution logic for V1 initialization
|
|
4
4
|
*/
|
|
5
5
|
import type { InitOptions, InitResult } from './types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Execute initialization
|
|
8
|
+
*/
|
|
6
9
|
export declare function executeInit(options: InitOptions): Promise<InitResult>;
|
|
7
10
|
/**
|
|
8
11
|
* Upgrade result interface
|
|
@@ -186,88 +186,6 @@ const DIRECTORIES = {
|
|
|
186
186
|
/**
|
|
187
187
|
* Execute initialization
|
|
188
188
|
*/
|
|
189
|
-
/**
|
|
190
|
-
* Remove legacy ruv-swarm configuration from existing project files.
|
|
191
|
-
* Safe to call even if no legacy config exists.
|
|
192
|
-
*/
|
|
193
|
-
function cleanupLegacyTools(targetDir) {
|
|
194
|
-
const cleaned = [];
|
|
195
|
-
// Helper to fix MCP server args: replace @monomind/cli@latest with monomind@latest
|
|
196
|
-
function fixMcpArgs(servers) {
|
|
197
|
-
let changed = false;
|
|
198
|
-
for (const name of Object.keys(servers)) {
|
|
199
|
-
const srv = servers[name];
|
|
200
|
-
if (Array.isArray(srv.args)) {
|
|
201
|
-
srv.args = srv.args.map((a) => {
|
|
202
|
-
if (typeof a === 'string' && a.includes('@monomind/cli@')) {
|
|
203
|
-
changed = true;
|
|
204
|
-
return a.replace(/@monomind\/cli@[^\s]*/g, 'monomind@latest');
|
|
205
|
-
}
|
|
206
|
-
return a;
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
return changed;
|
|
211
|
-
}
|
|
212
|
-
// Clean ruv-swarm from .mcp.json and fix old MCP package name
|
|
213
|
-
const mcpJsonPath = path.join(targetDir, '.mcp.json');
|
|
214
|
-
if (fs.existsSync(mcpJsonPath) && fs.statSync(mcpJsonPath).size <= MAX_EXEC_FILE_BYTES) {
|
|
215
|
-
try {
|
|
216
|
-
const mcp = JSON.parse(fs.readFileSync(mcpJsonPath, 'utf-8'));
|
|
217
|
-
let mcpChanged = false;
|
|
218
|
-
if (mcp.mcpServers && mcp.mcpServers['ruv-swarm']) {
|
|
219
|
-
delete mcp.mcpServers['ruv-swarm'];
|
|
220
|
-
mcpChanged = true;
|
|
221
|
-
cleaned.push('.mcp.json: removed ruv-swarm entry');
|
|
222
|
-
}
|
|
223
|
-
if (mcp.mcpServers && fixMcpArgs(mcp.mcpServers)) {
|
|
224
|
-
mcpChanged = true;
|
|
225
|
-
cleaned.push('.mcp.json: updated MCP package name to monomind@latest');
|
|
226
|
-
}
|
|
227
|
-
if (mcpChanged) {
|
|
228
|
-
atomicWriteFile(mcpJsonPath, JSON.stringify(mcp, null, 2));
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
catch { /* non-fatal */ }
|
|
232
|
-
}
|
|
233
|
-
// Clean ruv-swarm from .claude/settings.json hooks and fix MCP package name
|
|
234
|
-
const settingsPath = path.join(targetDir, '.claude', 'settings.json');
|
|
235
|
-
if (fs.existsSync(settingsPath) && fs.statSync(settingsPath).size <= MAX_EXEC_FILE_BYTES) {
|
|
236
|
-
try {
|
|
237
|
-
const raw = fs.readFileSync(settingsPath, 'utf-8');
|
|
238
|
-
const settings = JSON.parse(raw);
|
|
239
|
-
let settingsChanged = false;
|
|
240
|
-
if (raw.includes('ruv-swarm')) {
|
|
241
|
-
// Remove legacy ruv-swarm hook entries from all hook arrays
|
|
242
|
-
const hookKeys = ['PreToolUse', 'PostToolUse', 'UserPromptSubmit', 'SessionStart', 'SessionEnd', 'Stop', 'SubagentStart', 'SubagentStop', 'PreCompact'];
|
|
243
|
-
for (const key of hookKeys) {
|
|
244
|
-
if (Array.isArray(settings.hooks?.[key])) {
|
|
245
|
-
const before = settings.hooks[key].length;
|
|
246
|
-
settings.hooks[key] = settings.hooks[key].filter((entry) => {
|
|
247
|
-
const str = JSON.stringify(entry);
|
|
248
|
-
return !str.includes('ruv-swarm');
|
|
249
|
-
});
|
|
250
|
-
if (settings.hooks[key].length !== before)
|
|
251
|
-
settingsChanged = true;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
254
|
-
if (settingsChanged) {
|
|
255
|
-
cleaned.push('.claude/settings.json: removed ruv-swarm hooks');
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
// Fix wrong MCP package name in mcpServers
|
|
259
|
-
if (settings.mcpServers && fixMcpArgs(settings.mcpServers)) {
|
|
260
|
-
settingsChanged = true;
|
|
261
|
-
cleaned.push('.claude/settings.json: updated MCP package name to monomind@latest');
|
|
262
|
-
}
|
|
263
|
-
if (settingsChanged) {
|
|
264
|
-
atomicWriteFile(settingsPath, JSON.stringify(settings, null, 2));
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
catch { /* non-fatal */ }
|
|
268
|
-
}
|
|
269
|
-
return cleaned;
|
|
270
|
-
}
|
|
271
189
|
export async function executeInit(options) {
|
|
272
190
|
// Detect platform
|
|
273
191
|
const platform = detectPlatform();
|
|
@@ -290,11 +208,6 @@ export async function executeInit(options) {
|
|
|
290
208
|
};
|
|
291
209
|
const targetDir = options.targetDir;
|
|
292
210
|
try {
|
|
293
|
-
// Remove legacy ruv-swarm configs before writing new ones
|
|
294
|
-
const legacyCleaned = cleanupLegacyTools(targetDir);
|
|
295
|
-
for (const msg of legacyCleaned) {
|
|
296
|
-
result.created.files.push(`[cleaned] ${msg}`);
|
|
297
|
-
}
|
|
298
211
|
// Create directory structure
|
|
299
212
|
await createDirectories(targetDir, options, result);
|
|
300
213
|
// Scan directory and save fingerprint (non-fatal if failed)
|
|
@@ -678,11 +591,6 @@ export async function executeUpgrade(targetDir, upgradeSettings = false) {
|
|
|
678
591
|
settingsUpdated: [],
|
|
679
592
|
};
|
|
680
593
|
try {
|
|
681
|
-
// Fix legacy ruv-swarm configs and old MCP package names
|
|
682
|
-
const legacyCleaned = cleanupLegacyTools(targetDir);
|
|
683
|
-
for (const msg of legacyCleaned) {
|
|
684
|
-
result.updated.push(`[cleaned] ${msg}`);
|
|
685
|
-
}
|
|
686
594
|
// Ensure required directories exist
|
|
687
595
|
const dirs = [
|
|
688
596
|
'.claude/helpers',
|
|
@@ -701,7 +609,7 @@ export async function executeUpgrade(targetDir, upgradeSettings = false) {
|
|
|
701
609
|
if (sourceHelpersForUpgrade) {
|
|
702
610
|
const destHelpersDir = path.join(targetDir, '.claude', 'helpers');
|
|
703
611
|
// Copy top-level critical files atomically
|
|
704
|
-
const criticalHelpers = ['auto-memory-hook.mjs', 'hook-handler.cjs', 'intelligence.cjs'];
|
|
612
|
+
const criticalHelpers = ['auto-memory-hook.mjs', 'hook-handler.cjs', 'intelligence.cjs', 'statusline.cjs', 'graphify-freshen.cjs'];
|
|
705
613
|
for (const helperName of criticalHelpers) {
|
|
706
614
|
const targetPath = path.join(destHelpersDir, helperName);
|
|
707
615
|
const sourcePath = path.join(sourceHelpersForUpgrade, helperName);
|
|
@@ -760,26 +668,27 @@ export async function executeUpgrade(targetDir, upgradeSettings = false) {
|
|
|
760
668
|
fs.renameSync(tmp, targetPath);
|
|
761
669
|
}
|
|
762
670
|
}
|
|
763
|
-
// 1.
|
|
671
|
+
// 1. Statusline fallback — only generate if source copy above didn't cover it
|
|
764
672
|
const statuslinePath = path.join(targetDir, '.claude', 'helpers', 'statusline.cjs');
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
673
|
+
if (!sourceHelpersForUpgrade || !fs.existsSync(path.join(sourceHelpersForUpgrade, 'statusline.cjs'))) {
|
|
674
|
+
const upgradeOptions = {
|
|
675
|
+
...DEFAULT_INIT_OPTIONS,
|
|
676
|
+
targetDir,
|
|
677
|
+
force: true,
|
|
678
|
+
statusline: {
|
|
679
|
+
...DEFAULT_INIT_OPTIONS.statusline,
|
|
680
|
+
refreshInterval: 5000,
|
|
681
|
+
},
|
|
682
|
+
};
|
|
683
|
+
const statuslineContent = generateStatuslineScript(upgradeOptions);
|
|
684
|
+
if (fs.existsSync(statuslinePath)) {
|
|
685
|
+
result.updated.push('.claude/helpers/statusline.cjs');
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
result.created.push('.claude/helpers/statusline.cjs');
|
|
689
|
+
}
|
|
690
|
+
atomicWriteFile(statuslinePath, statuslineContent);
|
|
781
691
|
}
|
|
782
|
-
atomicWriteFile(statuslinePath, statuslineContent);
|
|
783
692
|
// 2. Create MISSING metrics files only (preserve existing data)
|
|
784
693
|
const metricsDir = path.join(targetDir, '.monomind', 'metrics');
|
|
785
694
|
const securityDir = path.join(targetDir, '.monomind', 'security');
|
|
@@ -18,7 +18,6 @@ import { sessionTools } from './mcp-tools/session-tools.js';
|
|
|
18
18
|
import { hiveMindTools } from './mcp-tools/hive-mind-tools.js';
|
|
19
19
|
import { workflowTools } from './mcp-tools/workflow-tools.js';
|
|
20
20
|
import { analyzeTools } from './mcp-tools/analyze-tools.js';
|
|
21
|
-
import { progressTools } from './mcp-tools/progress-tools.js';
|
|
22
21
|
import { embeddingsTools } from './mcp-tools/embeddings-tools.js';
|
|
23
22
|
import { claimsTools } from './mcp-tools/claims-tools.js';
|
|
24
23
|
import { securityTools } from './mcp-tools/security-tools.js';
|
|
@@ -72,7 +71,6 @@ registerTools([
|
|
|
72
71
|
...hiveMindTools,
|
|
73
72
|
...workflowTools,
|
|
74
73
|
...analyzeTools,
|
|
75
|
-
...progressTools,
|
|
76
74
|
...embeddingsTools,
|
|
77
75
|
...claimsTools,
|
|
78
76
|
...securityTools,
|
|
@@ -18,7 +18,6 @@ export { sessionTools } from './session-tools.js';
|
|
|
18
18
|
export { hiveMindTools } from './hive-mind-tools.js';
|
|
19
19
|
export { workflowTools } from './workflow-tools.js';
|
|
20
20
|
export { analyzeTools } from './analyze-tools.js';
|
|
21
|
-
export { progressTools } from './progress-tools.js';
|
|
22
21
|
export { transferTools } from './transfer-tools.js';
|
|
23
22
|
export { securityTools } from './security-tools.js';
|
|
24
23
|
export { embeddingsTools } from './embeddings-tools.js';
|
|
@@ -18,7 +18,6 @@ export { sessionTools } from './session-tools.js';
|
|
|
18
18
|
export { hiveMindTools } from './hive-mind-tools.js';
|
|
19
19
|
export { workflowTools } from './workflow-tools.js';
|
|
20
20
|
export { analyzeTools } from './analyze-tools.js';
|
|
21
|
-
export { progressTools } from './progress-tools.js';
|
|
22
21
|
export { transferTools } from './transfer-tools.js';
|
|
23
22
|
export { securityTools } from './security-tools.js';
|
|
24
23
|
export { embeddingsTools } from './embeddings-tools.js';
|
package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/track-trends.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const TrackTrendsInputSchema: z.ZodObject<{
|
|
|
15
15
|
includeProjections: z.ZodDefault<z.ZodBoolean>;
|
|
16
16
|
compareBaseline: z.ZodOptional<z.ZodString>;
|
|
17
17
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
metrics: ("function" | "line" | "
|
|
18
|
+
metrics: ("function" | "line" | "branch" | "statement" | "overall")[];
|
|
19
19
|
timeRange: "30d" | "7d" | "14d" | "90d" | "180d" | "365d";
|
|
20
20
|
groupBy: "commit" | "day" | "week" | "month";
|
|
21
21
|
detectRegressions: boolean;
|
|
@@ -24,7 +24,7 @@ export declare const TrackTrendsInputSchema: z.ZodObject<{
|
|
|
24
24
|
targetPath?: string | undefined;
|
|
25
25
|
compareBaseline?: string | undefined;
|
|
26
26
|
}, {
|
|
27
|
-
metrics?: ("function" | "line" | "
|
|
27
|
+
metrics?: ("function" | "line" | "branch" | "statement" | "overall")[] | undefined;
|
|
28
28
|
timeRange?: "30d" | "7d" | "14d" | "90d" | "180d" | "365d" | undefined;
|
|
29
29
|
targetPath?: string | undefined;
|
|
30
30
|
groupBy?: "commit" | "day" | "week" | "month" | undefined;
|
|
@@ -141,7 +141,7 @@ export declare const toolDefinition: {
|
|
|
141
141
|
includeProjections: z.ZodDefault<z.ZodBoolean>;
|
|
142
142
|
compareBaseline: z.ZodOptional<z.ZodString>;
|
|
143
143
|
}, "strip", z.ZodTypeAny, {
|
|
144
|
-
metrics: ("function" | "line" | "
|
|
144
|
+
metrics: ("function" | "line" | "branch" | "statement" | "overall")[];
|
|
145
145
|
timeRange: "30d" | "7d" | "14d" | "90d" | "180d" | "365d";
|
|
146
146
|
groupBy: "commit" | "day" | "week" | "month";
|
|
147
147
|
detectRegressions: boolean;
|
|
@@ -150,7 +150,7 @@ export declare const toolDefinition: {
|
|
|
150
150
|
targetPath?: string | undefined;
|
|
151
151
|
compareBaseline?: string | undefined;
|
|
152
152
|
}, {
|
|
153
|
-
metrics?: ("function" | "line" | "
|
|
153
|
+
metrics?: ("function" | "line" | "branch" | "statement" | "overall")[] | undefined;
|
|
154
154
|
timeRange?: "30d" | "7d" | "14d" | "90d" | "180d" | "365d" | undefined;
|
|
155
155
|
targetPath?: string | undefined;
|
|
156
156
|
groupBy?: "commit" | "day" | "week" | "month" | undefined;
|
package/packages/@monomind/cli/dist/src/mcp-tools/quality/test-generation/suggest-tests.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const SuggestTestsInputSchema: z.ZodObject<{
|
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
17
|
framework: "vitest" | "jest" | "mocha" | "pytest" | "junit";
|
|
18
18
|
targetPath: string;
|
|
19
|
-
focusAreas: ("
|
|
19
|
+
focusAreas: ("branches" | "lines" | "functions" | "edge-cases" | "error-handling" | "boundaries")[];
|
|
20
20
|
maxSuggestions: number;
|
|
21
21
|
priorityBy: "risk" | "complexity" | "coverage-impact" | "change-frequency";
|
|
22
22
|
includeCode: boolean;
|
|
@@ -25,7 +25,7 @@ export declare const SuggestTestsInputSchema: z.ZodObject<{
|
|
|
25
25
|
targetPath: string;
|
|
26
26
|
framework?: "vitest" | "jest" | "mocha" | "pytest" | "junit" | undefined;
|
|
27
27
|
coverageReport?: string | undefined;
|
|
28
|
-
focusAreas?: ("
|
|
28
|
+
focusAreas?: ("branches" | "lines" | "functions" | "edge-cases" | "error-handling" | "boundaries")[] | undefined;
|
|
29
29
|
maxSuggestions?: number | undefined;
|
|
30
30
|
priorityBy?: "risk" | "complexity" | "coverage-impact" | "change-frequency" | undefined;
|
|
31
31
|
includeCode?: boolean | undefined;
|
|
@@ -121,7 +121,7 @@ export declare const toolDefinition: {
|
|
|
121
121
|
}, "strip", z.ZodTypeAny, {
|
|
122
122
|
framework: "vitest" | "jest" | "mocha" | "pytest" | "junit";
|
|
123
123
|
targetPath: string;
|
|
124
|
-
focusAreas: ("
|
|
124
|
+
focusAreas: ("branches" | "lines" | "functions" | "edge-cases" | "error-handling" | "boundaries")[];
|
|
125
125
|
maxSuggestions: number;
|
|
126
126
|
priorityBy: "risk" | "complexity" | "coverage-impact" | "change-frequency";
|
|
127
127
|
includeCode: boolean;
|
|
@@ -130,7 +130,7 @@ export declare const toolDefinition: {
|
|
|
130
130
|
targetPath: string;
|
|
131
131
|
framework?: "vitest" | "jest" | "mocha" | "pytest" | "junit" | undefined;
|
|
132
132
|
coverageReport?: string | undefined;
|
|
133
|
-
focusAreas?: ("
|
|
133
|
+
focusAreas?: ("branches" | "lines" | "functions" | "edge-cases" | "error-handling" | "boundaries")[] | undefined;
|
|
134
134
|
maxSuggestions?: number | undefined;
|
|
135
135
|
priorityBy?: "risk" | "complexity" | "coverage-impact" | "change-frequency" | undefined;
|
|
136
136
|
includeCode?: boolean | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monoes/monomindcli",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Monomind 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",
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/** A single quality metric to evaluate against agent output. */
|
|
2
|
-
export interface QualityMetric {
|
|
3
|
-
/** Discriminator selecting which evaluator runs. */
|
|
4
|
-
type: 'contains_expected' | 'length_range' | 'no_hallucination' | 'json_valid' | 'custom_regex' | string;
|
|
5
|
-
/** Per-metric configuration; shape depends on `type`. */
|
|
6
|
-
config?: Record<string, unknown>;
|
|
7
|
-
}
|
|
8
|
-
/** Result of evaluating one quality metric. */
|
|
9
|
-
export interface MetricResult {
|
|
10
|
-
/** The metric type that produced this result. */
|
|
11
|
-
type: string;
|
|
12
|
-
/** Whether the metric passed. */
|
|
13
|
-
passed: boolean;
|
|
14
|
-
/** Observed value (metric-specific). */
|
|
15
|
-
actual: unknown;
|
|
16
|
-
/** Expected value (metric-specific). */
|
|
17
|
-
expected: unknown;
|
|
18
|
-
/** Human-readable explanation. */
|
|
19
|
-
message: string;
|
|
20
|
-
}
|
|
21
|
-
/** A benchmark definition loaded from a JSON file. */
|
|
22
|
-
export interface BenchmarkDefinition {
|
|
23
|
-
/** Unique benchmark identifier. */
|
|
24
|
-
benchmarkId: string;
|
|
25
|
-
/** Agent slug this benchmark targets. */
|
|
26
|
-
agentSlug: string;
|
|
27
|
-
/** Quality metrics to evaluate. */
|
|
28
|
-
qualityMetrics: QualityMetric[];
|
|
29
|
-
}
|
|
30
|
-
/** Result of running a single benchmark. */
|
|
31
|
-
export interface BenchmarkResult {
|
|
32
|
-
/** The benchmark that was run. */
|
|
33
|
-
benchmarkId: string;
|
|
34
|
-
/** Unique run identifier. */
|
|
35
|
-
runId: string;
|
|
36
|
-
/** Agent slug the benchmark targeted. */
|
|
37
|
-
agentSlug: string;
|
|
38
|
-
/** Whether all metrics passed. */
|
|
39
|
-
passed: boolean;
|
|
40
|
-
/** Per-metric results. */
|
|
41
|
-
metricResults: MetricResult[];
|
|
42
|
-
/** ISO timestamp of the run. */
|
|
43
|
-
runAt: string;
|
|
44
|
-
/** Wall-clock duration in milliseconds. */
|
|
45
|
-
durationMs: number;
|
|
46
|
-
}
|
|
47
|
-
/** A pinned baseline for regression comparison. */
|
|
48
|
-
export interface BenchmarkBaseline {
|
|
49
|
-
/** ISO timestamp when the baseline was pinned. */
|
|
50
|
-
pinnedAt: string;
|
|
51
|
-
/** Fraction of results that passed [0, 1]. */
|
|
52
|
-
passRate: number;
|
|
53
|
-
/** Average run duration in milliseconds. */
|
|
54
|
-
avgDurationMs: number;
|
|
55
|
-
}
|
|
56
|
-
export declare class BenchmarkRunner {
|
|
57
|
-
private baselines;
|
|
58
|
-
/**
|
|
59
|
-
* Load benchmark definitions from JSON files in a directory.
|
|
60
|
-
* Each JSON file should contain a single BenchmarkDefinition or an array of them.
|
|
61
|
-
*/
|
|
62
|
-
loadBenchmarks(dir: string): BenchmarkDefinition[];
|
|
63
|
-
/**
|
|
64
|
-
* Evaluate quality metrics against an output string.
|
|
65
|
-
*/
|
|
66
|
-
evaluateMetrics(output: string, metrics: QualityMetric[]): MetricResult[];
|
|
67
|
-
/**
|
|
68
|
-
* Run a single benchmark against provided agent output.
|
|
69
|
-
*/
|
|
70
|
-
runBenchmark(def: BenchmarkDefinition, agentOutput: string): BenchmarkResult;
|
|
71
|
-
/**
|
|
72
|
-
* Pin current results as the baseline for a benchmark.
|
|
73
|
-
*/
|
|
74
|
-
pinBaseline(benchmarkId: string, results: BenchmarkResult[]): BenchmarkBaseline;
|
|
75
|
-
/**
|
|
76
|
-
* Detect regression by comparing current results against a baseline.
|
|
77
|
-
* Returns true if the current pass rate is strictly below the baseline pass rate.
|
|
78
|
-
*/
|
|
79
|
-
detectRegression(current: BenchmarkResult[], baseline: BenchmarkBaseline): boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Get a stored baseline by benchmark ID.
|
|
82
|
-
*/
|
|
83
|
-
getBaseline(benchmarkId: string): BenchmarkBaseline | undefined;
|
|
84
|
-
private evaluateSingleMetric;
|
|
85
|
-
}
|
|
86
|
-
export interface SwarmBenchTask {
|
|
87
|
-
/** Unique task ID */
|
|
88
|
-
id: string;
|
|
89
|
-
/** One of the 5 SwarmBench coordination categories */
|
|
90
|
-
type: 'pursuit' | 'synchronization' | 'foraging' | 'flocking' | 'transport';
|
|
91
|
-
/** Human-readable description */
|
|
92
|
-
description: string;
|
|
93
|
-
/** Number of agents participating */
|
|
94
|
-
agentCount: number;
|
|
95
|
-
/** Steps / budget allowed */
|
|
96
|
-
stepBudget: number;
|
|
97
|
-
/** Success criterion function */
|
|
98
|
-
evaluate: (agentOutputs: string[]) => SwarmBenchResult;
|
|
99
|
-
}
|
|
100
|
-
export interface SwarmBenchResult {
|
|
101
|
-
taskId: string;
|
|
102
|
-
type: SwarmBenchTask['type'];
|
|
103
|
-
passed: boolean;
|
|
104
|
-
score: number;
|
|
105
|
-
stepsTaken: number;
|
|
106
|
-
agentCount: number;
|
|
107
|
-
details: string;
|
|
108
|
-
}
|
|
109
|
-
export declare const SWARM_BENCH_TASKS: readonly SwarmBenchTask[];
|
|
110
|
-
/**
|
|
111
|
-
* Alias for {@link SWARM_BENCH_TASKS}. Kept for ergonomic imports.
|
|
112
|
-
*/
|
|
113
|
-
export declare const SWARM: readonly SwarmBenchTask[];
|
|
114
|
-
/**
|
|
115
|
-
* SwarmBenchRunner — runs the 5 SwarmBench coordination task types.
|
|
116
|
-
* Wraps BenchmarkRunner for regression baseline tracking.
|
|
117
|
-
*
|
|
118
|
-
* Source: https://arxiv.org/abs/2505.04364
|
|
119
|
-
*/
|
|
120
|
-
export declare class SwarmBenchRunner {
|
|
121
|
-
private readonly inner;
|
|
122
|
-
private baselines;
|
|
123
|
-
/** Run all (or a subset of) SwarmBench tasks against simulated agent outputs. */
|
|
124
|
-
runAll(agentOutputsByTask: Map<string, string[]>): SwarmBenchResult[];
|
|
125
|
-
/** Run a single task type by id. */
|
|
126
|
-
runTask(taskId: string, agentOutputs: string[]): SwarmBenchResult | undefined;
|
|
127
|
-
/** Pin current results as the regression baseline. */
|
|
128
|
-
pinBaseline(results: SwarmBenchResult[]): void;
|
|
129
|
-
/** Detect regression: returns task IDs whose score dropped below baseline. */
|
|
130
|
-
detectRegressions(current: SwarmBenchResult[]): string[];
|
|
131
|
-
/** Expose underlying BenchmarkRunner for general benchmarks. */
|
|
132
|
-
get benchmarkRunner(): BenchmarkRunner;
|
|
133
|
-
}
|
|
134
|
-
//# sourceMappingURL=benchmark-runner.d.ts.map
|