monomind 1.18.13 → 1.19.0
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/.claude/agents/core/researcher.md +29 -24
- package/.claude/agents/github/code-review-swarm.md +1 -1
- package/.claude/agents/github/github-modes.md +1 -1
- package/.claude/agents/github/issue-tracker.md +1 -1
- package/.claude/agents/github/multi-repo-swarm.md +1 -1
- package/.claude/agents/github/pr-manager.md +1 -1
- package/.claude/agents/github/project-board-sync.md +1 -1
- package/.claude/agents/github/release-manager.md +1 -1
- package/.claude/agents/github/repo-architect.md +1 -1
- package/.claude/agents/github/swarm-issue.md +1 -1
- package/.claude/agents/github/swarm-pr.md +1 -1
- package/.claude/agents/github/sync-coordinator.md +1 -1
- package/.claude/agents/github/workflow-automation.md +1 -1
- package/.claude/agents/goal/goal-planner.md +1 -1
- package/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
- package/.claude/agents/testing/production-validator.md +8 -7
- package/.claude/agents/testing/testing-evidence-collector.md +3 -1
- package/.claude/commands/mastermind/_repeat.md +22 -3
- package/.claude/commands/mastermind/architect.md +1 -1
- package/.claude/commands/mastermind/autodev.md +1 -1
- package/.claude/commands/mastermind/build.md +1 -1
- package/.claude/commands/mastermind/code-review.md +5 -5
- package/.claude/commands/mastermind/debug.md +1 -1
- package/.claude/commands/mastermind/help.md +2 -2
- package/.claude/commands/mastermind/idea.md +1 -1
- package/.claude/commands/mastermind/improve.md +1 -1
- package/.claude/commands/mastermind/okf-export.md +14 -0
- package/.claude/commands/mastermind/okf-import.md +15 -0
- package/.claude/commands/mastermind/plan.md +1 -1
- package/.claude/commands/mastermind/research.md +1 -1
- package/.claude/commands/mastermind/review.md +12 -1
- package/.claude/commands/mastermind/runorg.md +1 -1
- package/.claude/commands/mastermind/taskdev.md +1 -1
- package/.claude/commands/mastermind/tdd.md +1 -1
- package/.claude/commands/mastermind/verify.md +1 -1
- package/.claude/helpers/graphify-freshen.cjs +16 -20
- package/.claude/helpers/handlers/agent-start-handler.cjs +11 -36
- package/.claude/helpers/handlers/capture-handler.cjs +110 -0
- package/.claude/helpers/handlers/route-handler.cjs +180 -256
- package/.claude/helpers/handlers/session-handler.cjs +139 -142
- package/.claude/helpers/handlers/session-restore-handler.cjs +15 -10
- package/.claude/helpers/handlers/task-handler.cjs +8 -155
- package/.claude/helpers/hook-handler.cjs +89 -5
- package/.claude/helpers/intelligence.cjs +164 -15
- package/.claude/helpers/learning-service.mjs +1 -0
- package/.claude/helpers/mastermind-activate.cjs +33 -51
- package/.claude/helpers/monolean-activate.cjs +13 -3
- package/.claude/helpers/monolean-propagate.cjs +7 -3
- package/.claude/helpers/router.cjs +47 -9
- package/.claude/helpers/utils/monograph.cjs +37 -20
- package/.claude/settings.json +0 -20
- package/.claude/skills/mastermind-skills/_repeat.md +29 -4
- package/.claude/skills/mastermind-skills/architect.md +5 -6
- package/.claude/skills/mastermind-skills/autodev.md +8 -5
- package/.claude/skills/mastermind-skills/review.md +25 -11
- package/.claude/skills/mastermind-skills/techport.md +37 -3
- package/.claude/skills/monodesign/document.md +9 -6
- package/.claude/skills/monodesign/extract.md +1 -1
- package/.claude/skills/monodesign/reference/document.md +1 -1
- package/.claude/skills/monodesign/reference/live.md +1 -1
- package/.claude/skills/monolean/SKILL.md +1 -1
- package/package.json +1 -1
- package/packages/@monomind/cli/.claude/agents/core/researcher.md +29 -24
- package/packages/@monomind/cli/.claude/agents/github/code-review-swarm.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/github-modes.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/issue-tracker.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/multi-repo-swarm.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/pr-manager.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/project-board-sync.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/release-manager.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/repo-architect.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/swarm-issue.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/swarm-pr.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/sync-coordinator.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/workflow-automation.md +1 -1
- package/packages/@monomind/cli/.claude/agents/goal/goal-planner.md +1 -1
- package/packages/@monomind/cli/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
- package/packages/@monomind/cli/.claude/agents/testing/production-validator.md +8 -7
- package/packages/@monomind/cli/.claude/agents/testing/testing-evidence-collector.md +3 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/_repeat.md +22 -3
- package/packages/@monomind/cli/.claude/commands/mastermind/architect.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/autodev.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/build.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/code-review.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/debug.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/help.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/idea.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/improve.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/okf-export.md +14 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/okf-import.md +15 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/plan.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/research.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/review.md +12 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/runorg.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/taskdev.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/tdd.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/verify.md +1 -1
- package/packages/@monomind/cli/.claude/helpers/graphify-freshen.cjs +16 -20
- package/packages/@monomind/cli/.claude/helpers/handlers/agent-start-handler.cjs +11 -36
- package/packages/@monomind/cli/.claude/helpers/handlers/capture-handler.cjs +110 -0
- package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +180 -256
- package/packages/@monomind/cli/.claude/helpers/handlers/session-handler.cjs +139 -142
- package/packages/@monomind/cli/.claude/helpers/handlers/session-restore-handler.cjs +15 -10
- package/packages/@monomind/cli/.claude/helpers/handlers/task-handler.cjs +8 -155
- package/packages/@monomind/cli/.claude/helpers/hook-handler.cjs +89 -5
- package/packages/@monomind/cli/.claude/helpers/intelligence.cjs +164 -15
- package/packages/@monomind/cli/.claude/helpers/learning-service.mjs +1 -0
- package/packages/@monomind/cli/.claude/helpers/mastermind-activate.cjs +33 -51
- package/packages/@monomind/cli/.claude/helpers/monolean-activate.cjs +13 -3
- package/packages/@monomind/cli/.claude/helpers/monolean-propagate.cjs +7 -3
- package/packages/@monomind/cli/.claude/helpers/router.cjs +47 -9
- package/packages/@monomind/cli/.claude/helpers/utils/monograph.cjs +37 -20
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/_repeat.md +29 -4
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/architect.md +5 -6
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/autodev.md +8 -5
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/review.md +25 -11
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/techport.md +37 -3
- package/packages/@monomind/cli/.claude/skills/monodesign/document.md +9 -6
- package/packages/@monomind/cli/.claude/skills/monodesign/extract.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/document.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/live.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monolean/SKILL.md +1 -1
- package/packages/@monomind/cli/bin/mcp-server.js +11 -1
- package/packages/@monomind/cli/dist/src/commands/agent-ops.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/agent-ops.js +1 -59
- package/packages/@monomind/cli/dist/src/commands/agent.js +2 -3
- package/packages/@monomind/cli/dist/src/commands/analyze-diff.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/browse-action.js +94 -2
- package/packages/@monomind/cli/dist/src/commands/completions.js +11 -56
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hive-mind-helpers.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.d.ts +1 -3
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.js +2 -116
- package/packages/@monomind/cli/dist/src/commands/hive-mind.js +2 -5
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +8 -7
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.js +0 -307
- package/packages/@monomind/cli/dist/src/commands/hooks.js +1 -12
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +3 -51
- package/packages/@monomind/cli/dist/src/commands/index.js +36 -184
- package/packages/@monomind/cli/dist/src/commands/init-wizard.js +2 -4
- package/packages/@monomind/cli/dist/src/commands/mcp.js +32 -4
- package/packages/@monomind/cli/dist/src/commands/memory-admin.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/memory-admin.js +1 -118
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.js +5 -171
- package/packages/@monomind/cli/dist/src/commands/memory.js +3 -6
- package/packages/@monomind/cli/dist/src/commands/neural-core.d.ts +3 -1
- package/packages/@monomind/cli/dist/src/commands/neural-core.js +145 -6
- package/packages/@monomind/cli/dist/src/commands/neural-optimize.js +4 -4
- package/packages/@monomind/cli/dist/src/commands/neural-registry.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural-registry.js +4 -4
- package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural.js +6 -6
- package/packages/@monomind/cli/dist/src/commands/performance.js +68 -58
- package/packages/@monomind/cli/dist/src/commands/providers.js +2 -131
- package/packages/@monomind/cli/dist/src/commands/security-misc.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/commands/security-misc.js +69 -45
- package/packages/@monomind/cli/dist/src/commands/security.js +2 -4
- package/packages/@monomind/cli/dist/src/commands/session.js +1 -285
- package/packages/@monomind/cli/dist/src/commands/start.js +2 -41
- package/packages/@monomind/cli/dist/src/commands/status.js +18 -29
- package/packages/@monomind/cli/dist/src/commands/swarm.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/task.js +2 -49
- package/packages/@monomind/cli/dist/src/commands/workflow.js +2 -104
- package/packages/@monomind/cli/dist/src/index.js +7 -0
- package/packages/@monomind/cli/dist/src/init/executor.js +3 -14
- package/packages/@monomind/cli/dist/src/init/helpers-generator.js +2 -22
- package/packages/@monomind/cli/dist/src/init/settings-generator.js +0 -1
- package/packages/@monomind/cli/dist/src/init/types.d.ts +1 -3
- package/packages/@monomind/cli/dist/src/init/types.js +0 -2
- package/packages/@monomind/cli/dist/src/mcp-client.js +0 -6
- package/packages/@monomind/cli/dist/src/mcp-server.js +16 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +0 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.d.ts +5 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.js +32 -46
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.d.ts +2 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.js +22 -20
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.d.ts +3 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.js +32 -19
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.js +11 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +2 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.js +51 -32
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/types.d.ts +5 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +25 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +45 -159
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +1 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +24 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +452 -7
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +4 -10
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +28 -54
- package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.js +5 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.d.ts +7 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.js +7 -257
- package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +7 -8
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +15 -16
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +1 -0
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +37 -0
- package/packages/@monomind/cli/dist/src/services/worker-daemon.d.ts +3 -21
- package/packages/@monomind/cli/dist/src/services/worker-daemon.js +13 -80
- package/packages/@monomind/cli/dist/src/suggest.js +0 -5
- package/packages/@monomind/cli/package.json +1 -1
- package/packages/@monomind/guidance/README.md +49 -1153
- package/packages/@monomind/guidance/package.json +1 -74
- package/.claude/helpers/auto-memory-hook.mjs +0 -503
- package/packages/@monomind/cli/.claude/helpers/auto-memory-hook.mjs +0 -503
- package/packages/@monomind/cli/dist/src/commands/deployment.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/deployment.js +0 -706
|
@@ -5,9 +5,6 @@
|
|
|
5
5
|
import { output } from '../output.js';
|
|
6
6
|
import { confirm, input, select } from '../prompt.js';
|
|
7
7
|
import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
8
|
-
import * as fs from 'fs';
|
|
9
|
-
import * as path from 'path';
|
|
10
|
-
import { gzipSync } from 'node:zlib';
|
|
11
8
|
// Format date for display
|
|
12
9
|
function formatDate(dateStr) {
|
|
13
10
|
const date = new Date(dateStr);
|
|
@@ -416,253 +413,13 @@ const deleteCommand = {
|
|
|
416
413
|
}
|
|
417
414
|
}
|
|
418
415
|
};
|
|
419
|
-
// Export subcommand
|
|
420
|
-
const exportCommand = {
|
|
421
|
-
name: 'export',
|
|
422
|
-
description: 'Export session to file',
|
|
423
|
-
options: [
|
|
424
|
-
{
|
|
425
|
-
name: 'output',
|
|
426
|
-
short: 'o',
|
|
427
|
-
description: 'Output file path',
|
|
428
|
-
type: 'string'
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
name: 'format',
|
|
432
|
-
short: 'f',
|
|
433
|
-
description: 'Export format (json, yaml)',
|
|
434
|
-
type: 'string',
|
|
435
|
-
choices: ['json', 'yaml'],
|
|
436
|
-
default: 'json'
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
name: 'include-memory',
|
|
440
|
-
description: 'Include memory data',
|
|
441
|
-
type: 'boolean',
|
|
442
|
-
default: true
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
name: 'compress',
|
|
446
|
-
description: 'Compress output',
|
|
447
|
-
type: 'boolean',
|
|
448
|
-
default: false
|
|
449
|
-
}
|
|
450
|
-
],
|
|
451
|
-
action: async (ctx) => {
|
|
452
|
-
let sessionId = ctx.args[0];
|
|
453
|
-
let outputPath = ctx.flags.output;
|
|
454
|
-
const exportFormat = ctx.flags.format;
|
|
455
|
-
const compress = ctx.flags.compress;
|
|
456
|
-
// Get current session if no ID provided
|
|
457
|
-
if (!sessionId) {
|
|
458
|
-
try {
|
|
459
|
-
const current = await callMCPTool('session_current', {});
|
|
460
|
-
sessionId = current.sessionId;
|
|
461
|
-
}
|
|
462
|
-
catch {
|
|
463
|
-
output.printError('No active session. Provide a session ID to export.');
|
|
464
|
-
return { success: false, exitCode: 1 };
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
// Generate output path if not provided
|
|
468
|
-
if (!outputPath) {
|
|
469
|
-
const ext = compress ? '.gz' : '';
|
|
470
|
-
outputPath = `session-${sessionId}.${exportFormat}${ext}`;
|
|
471
|
-
}
|
|
472
|
-
const spinner = output.createSpinner({ text: 'Exporting session...' });
|
|
473
|
-
spinner.start();
|
|
474
|
-
try {
|
|
475
|
-
const result = await callMCPTool('session_export', {
|
|
476
|
-
sessionId,
|
|
477
|
-
includeMemory: ctx.flags['include-memory'] !== false
|
|
478
|
-
});
|
|
479
|
-
// Format output
|
|
480
|
-
let content;
|
|
481
|
-
if (exportFormat === 'yaml') {
|
|
482
|
-
content = toSimpleYaml(result.data);
|
|
483
|
-
}
|
|
484
|
-
else {
|
|
485
|
-
content = JSON.stringify(result.data, null, 2);
|
|
486
|
-
}
|
|
487
|
-
// Path traversal protection: resolved path must stay within CWD
|
|
488
|
-
const effectiveCwd = ctx.cwd || process.cwd();
|
|
489
|
-
const absolutePath = path.isAbsolute(outputPath)
|
|
490
|
-
? outputPath
|
|
491
|
-
: path.join(effectiveCwd, outputPath);
|
|
492
|
-
const resolvedOutputPath = path.resolve(absolutePath);
|
|
493
|
-
const resolvedCwd = path.resolve(effectiveCwd);
|
|
494
|
-
if (!resolvedOutputPath.startsWith(resolvedCwd + path.sep) && resolvedOutputPath !== resolvedCwd) {
|
|
495
|
-
output.printError(`Output path must be within the working directory.`);
|
|
496
|
-
return { success: false, exitCode: 1 };
|
|
497
|
-
}
|
|
498
|
-
// Write atomically (tmp + rename) to avoid partial writes — use resolvedOutputPath
|
|
499
|
-
const tmpPath = `${resolvedOutputPath}.${process.pid}.${Date.now()}.tmp`;
|
|
500
|
-
if (compress) {
|
|
501
|
-
const compressed = gzipSync(Buffer.from(content, 'utf-8'));
|
|
502
|
-
fs.writeFileSync(tmpPath, compressed);
|
|
503
|
-
}
|
|
504
|
-
else {
|
|
505
|
-
fs.writeFileSync(tmpPath, content, 'utf-8');
|
|
506
|
-
}
|
|
507
|
-
fs.renameSync(tmpPath, resolvedOutputPath);
|
|
508
|
-
spinner.succeed('Session exported');
|
|
509
|
-
output.writeln();
|
|
510
|
-
output.printTable({
|
|
511
|
-
columns: [
|
|
512
|
-
{ key: 'property', header: 'Property', width: 18 },
|
|
513
|
-
{ key: 'value', header: 'Value', width: 40 }
|
|
514
|
-
],
|
|
515
|
-
data: [
|
|
516
|
-
{ property: 'Session ID', value: sessionId },
|
|
517
|
-
{ property: 'Output File', value: absolutePath },
|
|
518
|
-
{ property: 'Format', value: exportFormat.toUpperCase() },
|
|
519
|
-
{ property: 'Agents', value: result.stats.agentCount },
|
|
520
|
-
{ property: 'Tasks', value: result.stats.taskCount },
|
|
521
|
-
{ property: 'Memory Entries', value: result.stats.memoryEntries },
|
|
522
|
-
{ property: 'File Size', value: formatSize(content.length) }
|
|
523
|
-
]
|
|
524
|
-
});
|
|
525
|
-
output.writeln();
|
|
526
|
-
output.printSuccess(`Session exported to ${outputPath}`);
|
|
527
|
-
return {
|
|
528
|
-
success: true,
|
|
529
|
-
data: { sessionId, outputPath, format: exportFormat, size: content.length }
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
catch (error) {
|
|
533
|
-
spinner.fail('Failed to export session');
|
|
534
|
-
if (error instanceof MCPClientError) {
|
|
535
|
-
output.printError(`Error: ${error.message}`);
|
|
536
|
-
}
|
|
537
|
-
else {
|
|
538
|
-
output.printError(`Unexpected error: ${String(error)}`);
|
|
539
|
-
}
|
|
540
|
-
return { success: false, exitCode: 1 };
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
};
|
|
544
|
-
// Import subcommand
|
|
545
|
-
const importCommand = {
|
|
546
|
-
name: 'import',
|
|
547
|
-
description: 'Import session from file',
|
|
548
|
-
options: [
|
|
549
|
-
{
|
|
550
|
-
name: 'name',
|
|
551
|
-
short: 'n',
|
|
552
|
-
description: 'Session name for imported session',
|
|
553
|
-
type: 'string'
|
|
554
|
-
},
|
|
555
|
-
{
|
|
556
|
-
name: 'activate',
|
|
557
|
-
description: 'Activate session after import',
|
|
558
|
-
type: 'boolean',
|
|
559
|
-
default: false
|
|
560
|
-
}
|
|
561
|
-
],
|
|
562
|
-
action: async (ctx) => {
|
|
563
|
-
const filePath = ctx.args[0];
|
|
564
|
-
const sessionName = ctx.flags.name;
|
|
565
|
-
const activate = ctx.flags.activate;
|
|
566
|
-
if (!filePath) {
|
|
567
|
-
output.printError('File path is required');
|
|
568
|
-
return { success: false, exitCode: 1 };
|
|
569
|
-
}
|
|
570
|
-
const absolutePath = path.isAbsolute(filePath)
|
|
571
|
-
? filePath
|
|
572
|
-
: path.join(ctx.cwd, filePath);
|
|
573
|
-
// Path traversal protection: resolved path must stay within cwd or home
|
|
574
|
-
const resolvedPath = path.resolve(absolutePath);
|
|
575
|
-
const cwd = ctx.cwd || process.cwd();
|
|
576
|
-
const home = process.env.HOME || '';
|
|
577
|
-
const underCwd = resolvedPath === cwd || resolvedPath.startsWith(cwd + path.sep);
|
|
578
|
-
const underHome = home && (resolvedPath === home || resolvedPath.startsWith(home + path.sep));
|
|
579
|
-
if (!underCwd && !underHome) {
|
|
580
|
-
output.printError(`Path '${filePath}' escapes the allowed directories.`);
|
|
581
|
-
return { success: false, exitCode: 1 };
|
|
582
|
-
}
|
|
583
|
-
if (!fs.existsSync(absolutePath)) {
|
|
584
|
-
output.printError(`File not found: ${absolutePath}`);
|
|
585
|
-
return { success: false, exitCode: 1 };
|
|
586
|
-
}
|
|
587
|
-
// Reject oversized files before reading into memory
|
|
588
|
-
const MAX_IMPORT_BYTES = 50 * 1024 * 1024; // 50 MB
|
|
589
|
-
const stat = fs.statSync(absolutePath);
|
|
590
|
-
if (stat.size > MAX_IMPORT_BYTES) {
|
|
591
|
-
output.printError(`File too large: ${absolutePath} (${(stat.size / 1024 / 1024).toFixed(1)} MB > 50 MB limit)`);
|
|
592
|
-
return { success: false, exitCode: 1 };
|
|
593
|
-
}
|
|
594
|
-
const spinner = output.createSpinner({ text: 'Importing session...' });
|
|
595
|
-
spinner.start();
|
|
596
|
-
try {
|
|
597
|
-
const content = fs.readFileSync(absolutePath, 'utf-8');
|
|
598
|
-
let data;
|
|
599
|
-
// Parse based on extension
|
|
600
|
-
if (absolutePath.endsWith('.yaml') || absolutePath.endsWith('.yml')) {
|
|
601
|
-
output.printError('YAML import is not supported. Please convert to JSON first.');
|
|
602
|
-
spinner.fail('Import failed');
|
|
603
|
-
return { success: false, exitCode: 1 };
|
|
604
|
-
}
|
|
605
|
-
else {
|
|
606
|
-
data = JSON.parse(content, (key, value) => {
|
|
607
|
-
if (key === '__proto__' || key === 'constructor' || key === 'prototype')
|
|
608
|
-
return undefined;
|
|
609
|
-
return value;
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
const result = await callMCPTool('session_import', {
|
|
613
|
-
data,
|
|
614
|
-
name: sessionName,
|
|
615
|
-
activate
|
|
616
|
-
});
|
|
617
|
-
spinner.succeed('Session imported');
|
|
618
|
-
output.writeln();
|
|
619
|
-
output.printTable({
|
|
620
|
-
columns: [
|
|
621
|
-
{ key: 'property', header: 'Property', width: 20 },
|
|
622
|
-
{ key: 'value', header: 'Value', width: 35 }
|
|
623
|
-
],
|
|
624
|
-
data: [
|
|
625
|
-
{ property: 'Session ID', value: result.sessionId },
|
|
626
|
-
{ property: 'Name', value: result.name },
|
|
627
|
-
{ property: 'Source File', value: path.basename(absolutePath) },
|
|
628
|
-
{ property: 'Agents Imported', value: result.stats.agentsImported },
|
|
629
|
-
{ property: 'Tasks Imported', value: result.stats.tasksImported },
|
|
630
|
-
{ property: 'Memory Entries', value: result.stats.memoryEntriesImported },
|
|
631
|
-
{ property: 'Activated', value: result.activated ? 'Yes' : 'No' }
|
|
632
|
-
]
|
|
633
|
-
});
|
|
634
|
-
output.writeln();
|
|
635
|
-
output.printSuccess(`Session imported: ${result.sessionId}`);
|
|
636
|
-
if (!result.activated) {
|
|
637
|
-
output.printInfo(`Restore with: monomind session restore ${result.sessionId}`);
|
|
638
|
-
}
|
|
639
|
-
if (ctx.flags.format === 'json') {
|
|
640
|
-
output.printJson(result);
|
|
641
|
-
}
|
|
642
|
-
return { success: true, data: result };
|
|
643
|
-
}
|
|
644
|
-
catch (error) {
|
|
645
|
-
spinner.fail('Failed to import session');
|
|
646
|
-
if (error instanceof MCPClientError) {
|
|
647
|
-
output.printError(`Error: ${error.message}`);
|
|
648
|
-
}
|
|
649
|
-
else if (error instanceof SyntaxError) {
|
|
650
|
-
output.printError('Invalid file format. Expected JSON or YAML.');
|
|
651
|
-
}
|
|
652
|
-
else {
|
|
653
|
-
output.printError(`Unexpected error: ${String(error)}`);
|
|
654
|
-
}
|
|
655
|
-
return { success: false, exitCode: 1 };
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
};
|
|
659
416
|
// Current subcommand
|
|
660
417
|
const currentCommand = {
|
|
661
418
|
name: 'current',
|
|
662
419
|
description: 'Show current active session',
|
|
663
420
|
action: async (ctx) => {
|
|
664
421
|
try {
|
|
665
|
-
const result = await callMCPTool('
|
|
422
|
+
const result = await callMCPTool('session_info', { includeStats: true });
|
|
666
423
|
if (ctx.flags.format === 'json') {
|
|
667
424
|
output.printJson(result);
|
|
668
425
|
return { success: true, data: result };
|
|
@@ -720,41 +477,6 @@ function formatDuration(ms) {
|
|
|
720
477
|
}
|
|
721
478
|
return `${seconds}s`;
|
|
722
479
|
}
|
|
723
|
-
function toSimpleYaml(obj, indent = 0) {
|
|
724
|
-
// Simple YAML serializer (for basic types)
|
|
725
|
-
if (obj === null)
|
|
726
|
-
return 'null';
|
|
727
|
-
if (typeof obj === 'boolean')
|
|
728
|
-
return String(obj);
|
|
729
|
-
if (typeof obj === 'number')
|
|
730
|
-
return String(obj);
|
|
731
|
-
if (typeof obj === 'string') {
|
|
732
|
-
const needsQuoting = /[:"'\n\r\\]|^(true|false|null|yes|no|on|off)$/i.test(obj) || /^\s|\s$/.test(obj) || /^[!&|>{\[]/.test(obj);
|
|
733
|
-
if (needsQuoting)
|
|
734
|
-
return `"${obj.replace(/\\/g, '\\\\').replace(/"/g, '\\"')}"`;
|
|
735
|
-
return obj;
|
|
736
|
-
}
|
|
737
|
-
const spaces = ' '.repeat(indent);
|
|
738
|
-
let result = '';
|
|
739
|
-
if (Array.isArray(obj)) {
|
|
740
|
-
for (const item of obj) {
|
|
741
|
-
result += `${spaces}- ${toSimpleYaml(item, indent + 1).trim()}\n`;
|
|
742
|
-
}
|
|
743
|
-
return result;
|
|
744
|
-
}
|
|
745
|
-
if (typeof obj === 'object') {
|
|
746
|
-
for (const [key, value] of Object.entries(obj)) {
|
|
747
|
-
if (typeof value === 'object' && value !== null) {
|
|
748
|
-
result += `${spaces}${key}:\n${toSimpleYaml(value, indent + 1)}`;
|
|
749
|
-
}
|
|
750
|
-
else {
|
|
751
|
-
result += `${spaces}${key}: ${toSimpleYaml(value, indent)}\n`;
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
return result;
|
|
755
|
-
}
|
|
756
|
-
return String(obj);
|
|
757
|
-
}
|
|
758
480
|
// Main session command
|
|
759
481
|
export const sessionCommand = {
|
|
760
482
|
name: 'session',
|
|
@@ -764,8 +486,6 @@ export const sessionCommand = {
|
|
|
764
486
|
saveCommand,
|
|
765
487
|
restoreCommand,
|
|
766
488
|
deleteCommand,
|
|
767
|
-
exportCommand,
|
|
768
|
-
importCommand,
|
|
769
489
|
currentCommand
|
|
770
490
|
],
|
|
771
491
|
options: [],
|
|
@@ -774,8 +494,6 @@ export const sessionCommand = {
|
|
|
774
494
|
{ command: 'monomind session save -n "checkpoint-1"', description: 'Save current session' },
|
|
775
495
|
{ command: 'monomind session restore session-123', description: 'Restore a session' },
|
|
776
496
|
{ command: 'monomind session delete session-123', description: 'Delete a session' },
|
|
777
|
-
{ command: 'monomind session export -o backup.json', description: 'Export session to file' },
|
|
778
|
-
{ command: 'monomind session import backup.json', description: 'Import session from file' },
|
|
779
497
|
{ command: 'monomind session current', description: 'Show current session' }
|
|
780
498
|
],
|
|
781
499
|
action: async (ctx) => {
|
|
@@ -791,8 +509,6 @@ export const sessionCommand = {
|
|
|
791
509
|
`${output.highlight('save')} - Save current session state`,
|
|
792
510
|
`${output.highlight('restore')} - Restore a saved session`,
|
|
793
511
|
`${output.highlight('delete')} - Delete a saved session`,
|
|
794
|
-
`${output.highlight('export')} - Export session to file`,
|
|
795
|
-
`${output.highlight('import')} - Import session from file`,
|
|
796
512
|
`${output.highlight('current')} - Show current active session`
|
|
797
513
|
]);
|
|
798
514
|
output.writeln();
|
|
@@ -98,15 +98,11 @@ const startAction = async (ctx) => {
|
|
|
98
98
|
// Load configuration
|
|
99
99
|
const config = loadConfig(cwd);
|
|
100
100
|
const swarmConfig = config?.swarm || {};
|
|
101
|
-
const mcpConfig = config?.mcp || {};
|
|
102
101
|
const VALID_TOPOLOGIES = new Set(['hierarchical-mesh', 'mesh', 'hierarchical', 'ring', 'star']);
|
|
103
102
|
const rawTopology = topology || swarmConfig.topology || DEFAULT_TOPOLOGY;
|
|
104
103
|
const finalTopology = VALID_TOPOLOGIES.has(rawTopology) ? rawTopology : DEFAULT_TOPOLOGY;
|
|
105
104
|
const rawMaxAgents = Number(swarmConfig.maxAgents || DEFAULT_MAX_AGENTS);
|
|
106
105
|
const maxAgents = Number.isFinite(rawMaxAgents) ? Math.max(1, Math.min(rawMaxAgents, 100)) : DEFAULT_MAX_AGENTS;
|
|
107
|
-
const autoStartMcp = mcpConfig.autoStart !== false && !skipMcp;
|
|
108
|
-
const rawMcpPort = port || Number(mcpConfig.serverPort) || DEFAULT_PORT;
|
|
109
|
-
const mcpPort = Number.isFinite(rawMcpPort) ? Math.max(1, Math.min(rawMcpPort, 65535)) : DEFAULT_PORT;
|
|
110
106
|
output.writeln();
|
|
111
107
|
output.writeln(output.bold('Starting Monomind'));
|
|
112
108
|
output.writeln();
|
|
@@ -122,28 +118,7 @@ const startAction = async (ctx) => {
|
|
|
122
118
|
v1Mode: true
|
|
123
119
|
});
|
|
124
120
|
spinner.succeed(`Swarm initialized (${finalTopology})`);
|
|
125
|
-
// Step 2:
|
|
126
|
-
let mcpResult = null;
|
|
127
|
-
if (autoStartMcp) {
|
|
128
|
-
spinner.setText('Starting MCP server...');
|
|
129
|
-
spinner.start();
|
|
130
|
-
try {
|
|
131
|
-
mcpResult = await callMCPTool('mcp_start', {
|
|
132
|
-
port: mcpPort,
|
|
133
|
-
transport: mcpConfig.transportType || 'stdio',
|
|
134
|
-
tools: mcpConfig.tools || ['agent', 'swarm', 'memory', 'task']
|
|
135
|
-
});
|
|
136
|
-
spinner.succeed(`MCP server started on port ${mcpPort}`);
|
|
137
|
-
}
|
|
138
|
-
catch (error) {
|
|
139
|
-
spinner.fail('MCP server failed to start');
|
|
140
|
-
output.printWarning(error instanceof MCPClientError
|
|
141
|
-
? error.message
|
|
142
|
-
: String(error));
|
|
143
|
-
// Continue without MCP
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
// Step 3: Run health check
|
|
121
|
+
// Step 2: Run health check
|
|
147
122
|
spinner.setText('Running health checks...');
|
|
148
123
|
spinner.start();
|
|
149
124
|
const healthResult = await callMCPTool('swarm_health', {
|
|
@@ -164,7 +139,6 @@ const startAction = async (ctx) => {
|
|
|
164
139
|
`Swarm ID: ${swarmResult.swarmId}`,
|
|
165
140
|
`Topology: ${finalTopology}`,
|
|
166
141
|
`Max Agents: ${maxAgents}`,
|
|
167
|
-
`MCP Server: ${autoStartMcp ? `localhost:${mcpPort}` : 'disabled'}`,
|
|
168
142
|
`Mode: ${daemon ? 'Daemon' : 'Foreground'}`,
|
|
169
143
|
`Health: ${healthResult.status}`
|
|
170
144
|
].join('\n'), 'System Status');
|
|
@@ -223,10 +197,6 @@ const startAction = async (ctx) => {
|
|
|
223
197
|
swarmId: swarmResult.swarmId,
|
|
224
198
|
topology: finalTopology,
|
|
225
199
|
maxAgents,
|
|
226
|
-
mcp: mcpResult ? {
|
|
227
|
-
port: mcpPort,
|
|
228
|
-
transport: mcpConfig.transportType || 'stdio'
|
|
229
|
-
} : null,
|
|
230
200
|
health: healthResult.status,
|
|
231
201
|
daemon,
|
|
232
202
|
startedAt: new Date().toISOString()
|
|
@@ -286,20 +256,11 @@ const stopCommand = {
|
|
|
286
256
|
const spinner = output.createSpinner({ text: 'Stopping system...' });
|
|
287
257
|
spinner.start();
|
|
288
258
|
try {
|
|
289
|
-
// Stop MCP server
|
|
290
|
-
spinner.setText('Stopping MCP server...');
|
|
291
|
-
try {
|
|
292
|
-
await callMCPTool('mcp_stop', { graceful: !force, timeout });
|
|
293
|
-
spinner.succeed('MCP server stopped');
|
|
294
|
-
}
|
|
295
|
-
catch {
|
|
296
|
-
spinner.fail('MCP server was not running');
|
|
297
|
-
}
|
|
298
259
|
// Stop swarm
|
|
299
260
|
spinner.setText('Stopping swarm...');
|
|
300
261
|
spinner.start();
|
|
301
262
|
try {
|
|
302
|
-
await callMCPTool('
|
|
263
|
+
await callMCPTool('swarm_shutdown', {
|
|
303
264
|
graceful: !force,
|
|
304
265
|
timeout,
|
|
305
266
|
saveState: true
|
|
@@ -79,8 +79,13 @@ async function getSystemStatus() {
|
|
|
79
79
|
catch {
|
|
80
80
|
// MCP not running
|
|
81
81
|
}
|
|
82
|
-
//
|
|
83
|
-
const memoryStatus =
|
|
82
|
+
// Memory status — no MCP tool available; use defaults
|
|
83
|
+
const memoryStatus = {
|
|
84
|
+
entries: 0,
|
|
85
|
+
size: 0,
|
|
86
|
+
backend: 'lancedb',
|
|
87
|
+
performance: { avgSearchTime: 0, cacheHitRate: 0 },
|
|
88
|
+
};
|
|
84
89
|
// Get task status
|
|
85
90
|
const taskStatus = await callMCPTool('task_summary', {});
|
|
86
91
|
return {
|
|
@@ -495,8 +500,17 @@ const memoryCommand = {
|
|
|
495
500
|
name: 'memory',
|
|
496
501
|
description: 'Show detailed memory status',
|
|
497
502
|
action: async (ctx) => {
|
|
503
|
+
// memory_detailed-stats MCP tool is not registered; use memory bridge directly
|
|
498
504
|
try {
|
|
499
|
-
const
|
|
505
|
+
const { bridgeListEntries } = await import('../memory/memory-bridge.js');
|
|
506
|
+
const listed = await bridgeListEntries({ limit: 10000 });
|
|
507
|
+
const entries = listed?.success ? listed.entries : [];
|
|
508
|
+
const totalBytes = entries.reduce((s, e) => s + (e.content || '').length, 0);
|
|
509
|
+
const result = {
|
|
510
|
+
backend: 'LanceDB',
|
|
511
|
+
entries: entries.length,
|
|
512
|
+
size: totalBytes,
|
|
513
|
+
};
|
|
500
514
|
if (ctx.flags.format === 'json') {
|
|
501
515
|
output.printJson(result);
|
|
502
516
|
return { success: true, data: result };
|
|
@@ -513,37 +527,12 @@ const memoryCommand = {
|
|
|
513
527
|
{ property: 'Backend', value: result.backend },
|
|
514
528
|
{ property: 'Total Entries', value: result.entries.toLocaleString() },
|
|
515
529
|
{ property: 'Storage Size', value: formatBytes(result.size) },
|
|
516
|
-
{ property: 'HNSW Index', value: result.performance.hnswEnabled ? 'Enabled' : 'Disabled' }
|
|
517
|
-
]
|
|
518
|
-
});
|
|
519
|
-
output.writeln();
|
|
520
|
-
output.writeln(output.bold('Performance'));
|
|
521
|
-
output.printTable({
|
|
522
|
-
columns: [
|
|
523
|
-
{ key: 'metric', header: 'Metric', width: 20 },
|
|
524
|
-
{ key: 'value', header: 'Value', width: 20, align: 'right' }
|
|
525
|
-
],
|
|
526
|
-
data: [
|
|
527
|
-
{ metric: 'Avg Search Time', value: `${result.performance.avgSearchTime.toFixed(2)}ms` },
|
|
528
|
-
{ metric: 'Avg Write Time', value: `${result.performance.avgWriteTime.toFixed(2)}ms` },
|
|
529
|
-
{ metric: 'Cache Hit Rate', value: `${(result.performance.cacheHitRate * 100).toFixed(1)}%` }
|
|
530
530
|
]
|
|
531
531
|
});
|
|
532
|
-
output.writeln();
|
|
533
|
-
output.writeln(output.bold('v1 Performance Gains'));
|
|
534
|
-
output.printList([
|
|
535
|
-
`Search Speed: ${output.success(result.v1Gains.searchImprovement)}`,
|
|
536
|
-
`Memory Usage: ${output.success(result.v1Gains.memoryReduction)}`
|
|
537
|
-
]);
|
|
538
532
|
return { success: true, data: result };
|
|
539
533
|
}
|
|
540
534
|
catch (error) {
|
|
541
|
-
|
|
542
|
-
output.printError(`Failed to get memory status: ${error.message}`);
|
|
543
|
-
}
|
|
544
|
-
else {
|
|
545
|
-
output.printError(`Unexpected error: ${String(error)}`);
|
|
546
|
-
}
|
|
535
|
+
output.printError(`Failed to get memory status: ${error instanceof Error ? error.message : String(error)}`);
|
|
547
536
|
return { success: false, exitCode: 1 };
|
|
548
537
|
}
|
|
549
538
|
}
|
|
@@ -575,7 +575,7 @@ const stopCommand = {
|
|
|
575
575
|
// Attempt MCP cleanup first — only persist 'stopped' state if it succeeds
|
|
576
576
|
let mcpStopped = false;
|
|
577
577
|
try {
|
|
578
|
-
await callMCPTool('
|
|
578
|
+
await callMCPTool('swarm_shutdown', { swarmId, force });
|
|
579
579
|
output.writeln(output.dim(' MCP swarm stopped'));
|
|
580
580
|
mcpStopped = true;
|
|
581
581
|
}
|
|
@@ -601,56 +601,11 @@ const assignCommand = {
|
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
};
|
|
604
|
-
// Retry subcommand
|
|
605
|
-
const retryCommand = {
|
|
606
|
-
name: 'retry',
|
|
607
|
-
aliases: ['rerun'],
|
|
608
|
-
description: 'Retry a failed task',
|
|
609
|
-
options: [
|
|
610
|
-
{
|
|
611
|
-
name: 'reset-state',
|
|
612
|
-
description: 'Reset task state completely',
|
|
613
|
-
type: 'boolean',
|
|
614
|
-
default: false
|
|
615
|
-
}
|
|
616
|
-
],
|
|
617
|
-
action: async (ctx) => {
|
|
618
|
-
const taskId = (ctx.args[0] || '').slice(0, MAX_TASK_ID_LEN);
|
|
619
|
-
const resetState = ctx.flags['reset-state'];
|
|
620
|
-
if (!taskId) {
|
|
621
|
-
output.printError('Task ID is required');
|
|
622
|
-
return { success: false, exitCode: 1 };
|
|
623
|
-
}
|
|
624
|
-
try {
|
|
625
|
-
const result = await callMCPTool('task_retry', {
|
|
626
|
-
taskId,
|
|
627
|
-
resetState
|
|
628
|
-
});
|
|
629
|
-
output.writeln();
|
|
630
|
-
output.printSuccess(`Task ${taskId} retried`);
|
|
631
|
-
output.printInfo(`New task ID: ${result.newTaskId}`);
|
|
632
|
-
output.printInfo(`Status: ${formatStatus(result.status)}`);
|
|
633
|
-
if (ctx.flags.format === 'json') {
|
|
634
|
-
output.printJson(result);
|
|
635
|
-
}
|
|
636
|
-
return { success: true, data: result };
|
|
637
|
-
}
|
|
638
|
-
catch (error) {
|
|
639
|
-
if (error instanceof MCPClientError) {
|
|
640
|
-
output.printError(`Failed to retry task: ${error.message}`);
|
|
641
|
-
}
|
|
642
|
-
else {
|
|
643
|
-
output.printError(`Unexpected error: ${String(error)}`);
|
|
644
|
-
}
|
|
645
|
-
return { success: false, exitCode: 1 };
|
|
646
|
-
}
|
|
647
|
-
}
|
|
648
|
-
};
|
|
649
604
|
// Main task command
|
|
650
605
|
export const taskCommand = {
|
|
651
606
|
name: 'task',
|
|
652
607
|
description: 'Task management commands',
|
|
653
|
-
subcommands: [createCommand, listCommand, statusCommand, cancelCommand, assignCommand
|
|
608
|
+
subcommands: [createCommand, listCommand, statusCommand, cancelCommand, assignCommand],
|
|
654
609
|
options: [],
|
|
655
610
|
examples: [
|
|
656
611
|
{ command: 'monomind task create -t implementation -d "Add user auth"', description: 'Create a task' },
|
|
@@ -659,7 +614,6 @@ export const taskCommand = {
|
|
|
659
614
|
{ command: 'monomind task status task-123', description: 'Get task details' },
|
|
660
615
|
{ command: 'monomind task cancel task-123', description: 'Cancel a task' },
|
|
661
616
|
{ command: 'monomind task assign task-123 --agent coder-1', description: 'Assign task to agent' },
|
|
662
|
-
{ command: 'monomind task retry task-123', description: 'Retry a failed task' }
|
|
663
617
|
],
|
|
664
618
|
action: async (ctx) => {
|
|
665
619
|
// Show help if no subcommand
|
|
@@ -674,8 +628,7 @@ export const taskCommand = {
|
|
|
674
628
|
`${output.highlight('list')} - List tasks`,
|
|
675
629
|
`${output.highlight('status')} - Get task details`,
|
|
676
630
|
`${output.highlight('cancel')} - Cancel a running task`,
|
|
677
|
-
`${output.highlight('assign')} - Assign task to agent(s)
|
|
678
|
-
`${output.highlight('retry')} - Retry a failed task`
|
|
631
|
+
`${output.highlight('assign')} - Assign task to agent(s)`
|
|
679
632
|
]);
|
|
680
633
|
output.writeln();
|
|
681
634
|
output.writeln('Run "monomind task <subcommand> --help" for subcommand help');
|