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
|
@@ -130,8 +130,100 @@ const runSubcommand = {
|
|
|
130
130
|
{ name: 'port', type: 'number', description: 'CDP port', default: 9222 },
|
|
131
131
|
],
|
|
132
132
|
action: async (ctx) => {
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
const actionId = ctx.args[0];
|
|
134
|
+
if (!actionId) {
|
|
135
|
+
output.printError('Action ID required. Usage: monomind browse action run <action-id>');
|
|
136
|
+
return { success: false, exitCode: 1 };
|
|
137
|
+
}
|
|
138
|
+
const port = ctx.flags.port ?? 9222;
|
|
139
|
+
const paramsRaw = ctx.flags.params ?? [];
|
|
140
|
+
const params = {};
|
|
141
|
+
for (const pair of paramsRaw) {
|
|
142
|
+
const eq = pair.indexOf('=');
|
|
143
|
+
if (eq > 0)
|
|
144
|
+
params[pair.slice(0, eq)] = pair.slice(eq + 1);
|
|
145
|
+
}
|
|
146
|
+
const customDir = join(ctx.cwd, '.monomind', 'actions');
|
|
147
|
+
const filename = actionId.replace(/[^a-z0-9_-]/gi, '_') + '.json';
|
|
148
|
+
let def;
|
|
149
|
+
try {
|
|
150
|
+
def = JSON.parse(await readFile(join(customDir, filename), 'utf8'));
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
output.printError(`Action not found: ${actionId}. Run "monomind browse action list" to see available actions.`);
|
|
154
|
+
return { success: false, exitCode: 1 };
|
|
155
|
+
}
|
|
156
|
+
output.printInfo(`Running action: ${def.id} (${def.steps.length} steps)`);
|
|
157
|
+
try {
|
|
158
|
+
const { connectToTarget, openUrl, clickElement, fillElement, evaluateJs, findBySelector, waitFor } = await import('@monoes/monobrowse');
|
|
159
|
+
const { client, sessionId } = await connectToTarget(port);
|
|
160
|
+
const refs = new Map();
|
|
161
|
+
const interpolate = (s) => s.replace(/\{\{(\w+)\}\}/g, (_, k) => params[k] ?? `{{${k}}}`);
|
|
162
|
+
for (const step of def.steps) {
|
|
163
|
+
switch (step.type) {
|
|
164
|
+
case 'navigate':
|
|
165
|
+
await openUrl(client, sessionId, interpolate(step.url));
|
|
166
|
+
output.writeln(output.dim(` navigate -> ${step.url}`));
|
|
167
|
+
break;
|
|
168
|
+
case 'find':
|
|
169
|
+
for (const sel of step.selectors ?? []) {
|
|
170
|
+
const found = await findBySelector(client, sessionId, refs, interpolate(sel)).catch(() => null);
|
|
171
|
+
if (found) {
|
|
172
|
+
refs.set(step.as, found);
|
|
173
|
+
break;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
output.writeln(output.dim(` find -> ${step.as}`));
|
|
177
|
+
break;
|
|
178
|
+
case 'click': {
|
|
179
|
+
const ref = refs.get(step.target);
|
|
180
|
+
if (!ref)
|
|
181
|
+
throw new Error(`Element "${step.target}" not found`);
|
|
182
|
+
await clickElement(client, sessionId, ref);
|
|
183
|
+
output.writeln(output.dim(` click -> ${step.target}`));
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
case 'type': {
|
|
187
|
+
const ref = refs.get(step.target);
|
|
188
|
+
if (!ref)
|
|
189
|
+
throw new Error(`Element "${step.target}" not found`);
|
|
190
|
+
await fillElement(client, sessionId, ref, interpolate(step.text));
|
|
191
|
+
output.writeln(output.dim(` type -> ${step.target}`));
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
194
|
+
case 'wait':
|
|
195
|
+
if (step.condition === 'network_idle')
|
|
196
|
+
await waitFor(client, sessionId, { load: 'networkidle', timeout: step.timeout });
|
|
197
|
+
else if (step.condition === 'selector')
|
|
198
|
+
await waitFor(client, sessionId, { selector: step.selector, timeout: step.timeout });
|
|
199
|
+
else if (step.condition === 'duration')
|
|
200
|
+
await new Promise(r => setTimeout(r, step.timeout ?? 1000));
|
|
201
|
+
output.writeln(output.dim(` wait -> ${step.condition}`));
|
|
202
|
+
break;
|
|
203
|
+
case 'extract': {
|
|
204
|
+
const ref = refs.get(step.target);
|
|
205
|
+
if (!ref)
|
|
206
|
+
throw new Error(`Element "${step.target}" not found`);
|
|
207
|
+
const val = await evaluateJs(client, sessionId, `document.querySelector('[data-ref="${ref.ref}"]')?.textContent`);
|
|
208
|
+
output.writeln(output.dim(` extract -> ${step.as}: ${val}`));
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
case 'condition': {
|
|
212
|
+
const result = await evaluateJs(client, sessionId, step.expression);
|
|
213
|
+
if (result) {
|
|
214
|
+
output.writeln(output.dim(' condition -> true branch'));
|
|
215
|
+
}
|
|
216
|
+
break;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
output.printSuccess(`Action ${def.id} completed successfully.`);
|
|
221
|
+
return { success: true };
|
|
222
|
+
}
|
|
223
|
+
catch (err) {
|
|
224
|
+
output.printError(`Action failed: ${err.message}`);
|
|
225
|
+
return { success: false, exitCode: 1 };
|
|
226
|
+
}
|
|
135
227
|
},
|
|
136
228
|
};
|
|
137
229
|
export const browseActionCommand = {
|
|
@@ -8,20 +8,20 @@ import { output } from '../output.js';
|
|
|
8
8
|
// Get all top-level commands for completions
|
|
9
9
|
const TOP_LEVEL_COMMANDS = [
|
|
10
10
|
'swarm', 'agent', 'task', 'session', 'config', 'memory', 'workflow',
|
|
11
|
-
'hive-mind', 'hooks', 'daemon', '
|
|
12
|
-
'providers', '
|
|
11
|
+
'hive-mind', 'hooks', 'daemon', 'security', 'performance',
|
|
12
|
+
'providers', 'claims', 'embeddings',
|
|
13
13
|
'doctor', 'completions', 'help', 'version'
|
|
14
14
|
];
|
|
15
15
|
// Swarm subcommands
|
|
16
|
-
const SWARM_SUBCOMMANDS = ['init', 'status', 'scale', 'destroy', 'monitor'
|
|
16
|
+
const SWARM_SUBCOMMANDS = ['init', 'status', 'scale', 'destroy', 'monitor'];
|
|
17
17
|
// Agent subcommands
|
|
18
18
|
const AGENT_SUBCOMMANDS = ['spawn', 'terminate', 'status', 'list', 'pool', 'health', 'update'];
|
|
19
19
|
// Task subcommands
|
|
20
20
|
const TASK_SUBCOMMANDS = ['create', 'status', 'list', 'complete', 'cancel'];
|
|
21
21
|
// Memory subcommands
|
|
22
|
-
const MEMORY_SUBCOMMANDS = ['store', 'retrieve', 'search', 'list', 'delete', 'stats', 'configure', '
|
|
22
|
+
const MEMORY_SUBCOMMANDS = ['store', 'retrieve', 'search', 'list', 'delete', 'stats', 'configure', 'export', 'import'];
|
|
23
23
|
// Hive-mind subcommands
|
|
24
|
-
const HIVE_MIND_SUBCOMMANDS = ['init', 'spawn', 'status', '
|
|
24
|
+
const HIVE_MIND_SUBCOMMANDS = ['init', 'spawn', 'status', 'join', 'leave', 'consensus', 'broadcast', 'memory', 'shutdown'];
|
|
25
25
|
// Hooks subcommands
|
|
26
26
|
const HOOKS_SUBCOMMANDS = ['pre-edit', 'post-edit', 'pre-command', 'post-command', 'pre-task', 'post-task', 'route', 'explain', 'pretrain', 'build-agents', 'metrics', 'transfer', 'list', 'intelligence'];
|
|
27
27
|
// Generate bash completion script
|
|
@@ -69,20 +69,12 @@ _monomind_completions() {
|
|
|
69
69
|
COMPREPLY=( $(compgen -W "\${hooks_commands}" -- "\${cur}") )
|
|
70
70
|
return 0
|
|
71
71
|
;;
|
|
72
|
-
neural)
|
|
73
|
-
COMPREPLY=( $(compgen -W "train status patterns predict optimize" -- "\${cur}") )
|
|
74
|
-
return 0
|
|
75
|
-
;;
|
|
76
72
|
security)
|
|
77
|
-
COMPREPLY=( $(compgen -W "scan cve
|
|
73
|
+
COMPREPLY=( $(compgen -W "scan cve audit secrets" -- "\${cur}") )
|
|
78
74
|
return 0
|
|
79
75
|
;;
|
|
80
76
|
performance)
|
|
81
|
-
COMPREPLY=( $(compgen -W "benchmark profile metrics
|
|
82
|
-
return 0
|
|
83
|
-
;;
|
|
84
|
-
deployment|deploy)
|
|
85
|
-
COMPREPLY=( $(compgen -W "deploy status rollback history environments logs" -- "\${cur}") )
|
|
77
|
+
COMPREPLY=( $(compgen -W "benchmark profile metrics bottleneck" -- "\${cur}") )
|
|
86
78
|
return 0
|
|
87
79
|
;;
|
|
88
80
|
claims)
|
|
@@ -139,11 +131,9 @@ _monomind() {
|
|
|
139
131
|
'hive-mind:Queen-led consensus coordination'
|
|
140
132
|
'hooks:Self-learning automation hooks'
|
|
141
133
|
'daemon:Background service management'
|
|
142
|
-
'neural:Neural pattern training'
|
|
143
134
|
'security:Security scanning and CVE detection'
|
|
144
135
|
'performance:Performance profiling'
|
|
145
136
|
'providers:AI provider management'
|
|
146
|
-
'deployment:Deployment management'
|
|
147
137
|
'claims:Claims-based authorization'
|
|
148
138
|
'embeddings:Vector embeddings'
|
|
149
139
|
'doctor:System diagnostics'
|
|
@@ -170,7 +160,6 @@ _monomind() {
|
|
|
170
160
|
'scale:Scale agent count'
|
|
171
161
|
'destroy:Shutdown swarm'
|
|
172
162
|
'monitor:Real-time monitoring'
|
|
173
|
-
'optimize:Optimize topology'
|
|
174
163
|
)
|
|
175
164
|
;;
|
|
176
165
|
agent)
|
|
@@ -202,8 +191,6 @@ _monomind() {
|
|
|
202
191
|
'delete:Delete entry'
|
|
203
192
|
'stats:Show statistics'
|
|
204
193
|
'configure:Configure backend'
|
|
205
|
-
'cleanup:Clean stale data'
|
|
206
|
-
'compress:Compress storage'
|
|
207
194
|
'export:Export to file'
|
|
208
195
|
'import:Import from file'
|
|
209
196
|
)
|
|
@@ -213,13 +200,11 @@ _monomind() {
|
|
|
213
200
|
'init:Initialize hive mind'
|
|
214
201
|
'spawn:Spawn worker agents'
|
|
215
202
|
'status:Show hive status'
|
|
216
|
-
'task:Submit task'
|
|
217
203
|
'join:Join agent to hive'
|
|
218
204
|
'leave:Remove agent'
|
|
219
205
|
'consensus:Consensus management'
|
|
220
206
|
'broadcast:Broadcast message'
|
|
221
207
|
'memory:Shared memory'
|
|
222
|
-
'optimize-memory:Optimize patterns'
|
|
223
208
|
'shutdown:Shutdown hive'
|
|
224
209
|
)
|
|
225
210
|
;;
|
|
@@ -241,20 +226,10 @@ _monomind() {
|
|
|
241
226
|
'intelligence:Neural intelligence commands'
|
|
242
227
|
)
|
|
243
228
|
;;
|
|
244
|
-
neural)
|
|
245
|
-
subcommands=(
|
|
246
|
-
'train:Train neural patterns'
|
|
247
|
-
'status:Check neural status'
|
|
248
|
-
'patterns:Manage patterns'
|
|
249
|
-
'predict:Make predictions'
|
|
250
|
-
'optimize:Optimize models'
|
|
251
|
-
)
|
|
252
|
-
;;
|
|
253
229
|
security)
|
|
254
230
|
subcommands=(
|
|
255
231
|
'scan:Security scan'
|
|
256
232
|
'cve:CVE detection'
|
|
257
|
-
'threats:Threat modeling'
|
|
258
233
|
'audit:Security audit'
|
|
259
234
|
'secrets:Secrets scanning'
|
|
260
235
|
)
|
|
@@ -264,20 +239,9 @@ _monomind() {
|
|
|
264
239
|
'benchmark:Run benchmarks'
|
|
265
240
|
'profile:Profile code'
|
|
266
241
|
'metrics:Show metrics'
|
|
267
|
-
'optimize:Optimize performance'
|
|
268
242
|
'bottleneck:Find bottlenecks'
|
|
269
243
|
)
|
|
270
244
|
;;
|
|
271
|
-
deployment|deploy)
|
|
272
|
-
subcommands=(
|
|
273
|
-
'deploy:Deploy to environment'
|
|
274
|
-
'status:Deployment status'
|
|
275
|
-
'rollback:Rollback version'
|
|
276
|
-
'history:Deployment history'
|
|
277
|
-
'environments:List environments'
|
|
278
|
-
'logs:View logs'
|
|
279
|
-
)
|
|
280
|
-
;;
|
|
281
245
|
claims)
|
|
282
246
|
subcommands=(
|
|
283
247
|
'list:List claims'
|
|
@@ -355,17 +319,11 @@ ${HIVE_MIND_SUBCOMMANDS.map(sub => `complete -c monomind -n "__fish_seen_subcomm
|
|
|
355
319
|
# Hooks subcommands
|
|
356
320
|
${HOOKS_SUBCOMMANDS.map(sub => `complete -c monomind -n "__fish_seen_subcommand_from hooks" -a "${sub}"`).join('\n')}
|
|
357
321
|
|
|
358
|
-
# Neural subcommands
|
|
359
|
-
complete -c monomind -n "__fish_seen_subcommand_from neural" -a "train status patterns predict optimize"
|
|
360
|
-
|
|
361
322
|
# Security subcommands
|
|
362
|
-
complete -c monomind -n "__fish_seen_subcommand_from security" -a "scan cve
|
|
323
|
+
complete -c monomind -n "__fish_seen_subcommand_from security" -a "scan cve audit secrets"
|
|
363
324
|
|
|
364
325
|
# Performance subcommands
|
|
365
|
-
complete -c monomind -n "__fish_seen_subcommand_from performance" -a "benchmark profile metrics
|
|
366
|
-
|
|
367
|
-
# Deployment subcommands
|
|
368
|
-
complete -c monomind -n "__fish_seen_subcommand_from deployment deploy" -a "deploy status rollback history environments logs"
|
|
326
|
+
complete -c monomind -n "__fish_seen_subcommand_from performance" -a "benchmark profile metrics bottleneck"
|
|
369
327
|
|
|
370
328
|
# Claims subcommands
|
|
371
329
|
complete -c monomind -n "__fish_seen_subcommand_from claims" -a "list check grant revoke roles policies"
|
|
@@ -398,11 +356,8 @@ $script:SubCommands = @{
|
|
|
398
356
|
'hive-mind' = @('${HIVE_MIND_SUBCOMMANDS.join("', '")}')
|
|
399
357
|
'hive' = @('${HIVE_MIND_SUBCOMMANDS.join("', '")}')
|
|
400
358
|
'hooks' = @('${HOOKS_SUBCOMMANDS.join("', '")}')
|
|
401
|
-
'
|
|
402
|
-
'
|
|
403
|
-
'performance' = @('benchmark', 'profile', 'metrics', 'optimize', 'bottleneck')
|
|
404
|
-
'deployment' = @('deploy', 'status', 'rollback', 'history', 'environments', 'logs')
|
|
405
|
-
'deploy' = @('deploy', 'status', 'rollback', 'history', 'environments', 'logs')
|
|
359
|
+
'security' = @('scan', 'cve', 'audit', 'secrets')
|
|
360
|
+
'performance' = @('benchmark', 'profile', 'metrics', 'bottleneck')
|
|
406
361
|
'claims' = @('list', 'check', 'grant', 'revoke', 'roles', 'policies')
|
|
407
362
|
'embeddings' = @('generate', 'search', 'compare', 'collections', 'index', 'providers')
|
|
408
363
|
'daemon' = @('start', 'stop', 'status', 'trigger', 'enable')
|
|
@@ -19,7 +19,7 @@ export declare function checkGitignoreCoverage(): Promise<HealthCheck>;
|
|
|
19
19
|
export declare function checkAgentRegistry(): Promise<HealthCheck>;
|
|
20
20
|
export declare function checkGuidanceGates(): Promise<HealthCheck>;
|
|
21
21
|
/**
|
|
22
|
-
* AutoMem proficiency check — reports memory learning health
|
|
22
|
+
* AutoMem proficiency check — reports memory learning health
|
|
23
23
|
*/
|
|
24
24
|
export declare function checkMemoryProficiency(): Promise<HealthCheck>;
|
|
25
25
|
//# sourceMappingURL=doctor-project-checks.d.ts.map
|
|
@@ -446,7 +446,7 @@ export async function checkGuidanceGates() {
|
|
|
446
446
|
}
|
|
447
447
|
}
|
|
448
448
|
/**
|
|
449
|
-
* AutoMem proficiency check — reports memory learning health
|
|
449
|
+
* AutoMem proficiency check — reports memory learning health
|
|
450
450
|
*/
|
|
451
451
|
export async function checkMemoryProficiency() {
|
|
452
452
|
try {
|
|
@@ -18,8 +18,8 @@ export const TOPOLOGIES = [
|
|
|
18
18
|
export const CONSENSUS_STRATEGIES = [
|
|
19
19
|
{ value: 'byzantine', label: 'Byzantine Fault Tolerant', hint: '2/3 majority, handles malicious actors' },
|
|
20
20
|
{ value: 'raft', label: 'Raft', hint: 'Leader-based consensus' },
|
|
21
|
-
{ value: 'gossip', label: 'Gossip', hint: 'Eventually consistent, scalable' },
|
|
22
|
-
{ value: 'crdt', label: 'CRDT', hint: 'Conflict-free replicated data' },
|
|
21
|
+
{ value: 'gossip', label: 'Gossip', hint: 'Eventually consistent, scalable (planned — not yet implemented)' },
|
|
22
|
+
{ value: 'crdt', label: 'CRDT', hint: 'Conflict-free replicated data (planned — not yet implemented)' },
|
|
23
23
|
{ value: 'quorum', label: 'Quorum', hint: 'Simple majority voting' }
|
|
24
24
|
];
|
|
25
25
|
export function groupWorkersByType(workers) {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Hive Mind operational subcommands — status
|
|
2
|
+
* Hive Mind operational subcommands — status
|
|
3
3
|
*/
|
|
4
4
|
import type { Command } from '../types.js';
|
|
5
5
|
export declare const statusCommand: Command;
|
|
6
|
-
export declare const taskCommand: Command;
|
|
7
|
-
export declare const optimizeMemoryCommand: Command;
|
|
8
6
|
//# sourceMappingURL=hive-mind-ops.d.ts.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Hive Mind operational subcommands — status
|
|
2
|
+
* Hive Mind operational subcommands — status
|
|
3
3
|
*/
|
|
4
4
|
import { output } from '../output.js';
|
|
5
|
-
import { input } from '../prompt.js';
|
|
6
5
|
import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
7
|
-
import {
|
|
6
|
+
import { formatAgentStatus, formatHiveStatus, formatHealth, } from './hive-mind-helpers.js';
|
|
8
7
|
export const statusCommand = {
|
|
9
8
|
name: 'status',
|
|
10
9
|
description: 'Show hive mind status',
|
|
@@ -117,117 +116,4 @@ export const statusCommand = {
|
|
|
117
116
|
}
|
|
118
117
|
}
|
|
119
118
|
};
|
|
120
|
-
export const taskCommand = {
|
|
121
|
-
name: 'task',
|
|
122
|
-
description: 'Submit tasks to the hive',
|
|
123
|
-
options: [
|
|
124
|
-
{ name: 'description', short: 'd', description: 'Task description', type: 'string' },
|
|
125
|
-
{ name: 'priority', short: 'p', description: 'Task priority', type: 'string', choices: ['low', 'normal', 'high', 'critical'], default: 'normal' },
|
|
126
|
-
{ name: 'require-consensus', short: 'c', description: 'Require consensus for completion', type: 'boolean', default: false },
|
|
127
|
-
{ name: 'timeout', description: 'Task timeout in seconds', type: 'number', default: 300 }
|
|
128
|
-
],
|
|
129
|
-
examples: [
|
|
130
|
-
{ command: 'monomind hive-mind task -d "Implement auth module"', description: 'Submit task' },
|
|
131
|
-
{ command: 'monomind hive-mind task -d "Security review" -p critical -c', description: 'Critical task with consensus' }
|
|
132
|
-
],
|
|
133
|
-
action: async (ctx) => {
|
|
134
|
-
let description = (ctx.flags.description || ctx.args.join(' ')).slice(0, MAX_TASK_DESC_LEN);
|
|
135
|
-
if (!description && ctx.interactive) {
|
|
136
|
-
description = await input({
|
|
137
|
-
message: 'Task description:',
|
|
138
|
-
validate: (v) => v.length > 0 || 'Description is required'
|
|
139
|
-
});
|
|
140
|
-
description = description.slice(0, MAX_TASK_DESC_LEN);
|
|
141
|
-
}
|
|
142
|
-
if (!description) {
|
|
143
|
-
output.printError('Task description is required');
|
|
144
|
-
return { success: false, exitCode: 1 };
|
|
145
|
-
}
|
|
146
|
-
const priority = ctx.flags.priority;
|
|
147
|
-
const requireConsensus = ctx.flags['require-consensus'];
|
|
148
|
-
const timeout = ctx.flags.timeout;
|
|
149
|
-
output.printInfo('Submitting task to hive...');
|
|
150
|
-
try {
|
|
151
|
-
const result = await callMCPTool('hive-mind_task', { description, priority, requireConsensus, timeout });
|
|
152
|
-
if (ctx.flags.format === 'json') {
|
|
153
|
-
output.printJson(result);
|
|
154
|
-
return { success: true, data: result };
|
|
155
|
-
}
|
|
156
|
-
output.writeln();
|
|
157
|
-
output.printBox([
|
|
158
|
-
`Task ID: ${result.taskId}`,
|
|
159
|
-
`Status: ${formatAgentStatus(result.status)}`,
|
|
160
|
-
`Priority: ${formatPriority(priority)}`,
|
|
161
|
-
`Assigned: ${result.assignedTo.join(', ')}`,
|
|
162
|
-
`Consensus: ${result.requiresConsensus ? 'Yes' : 'No'}`,
|
|
163
|
-
`Est. Time: ${result.estimatedTime}`
|
|
164
|
-
].join('\n'), 'Task Submitted');
|
|
165
|
-
output.writeln();
|
|
166
|
-
output.printSuccess('Task submitted to hive');
|
|
167
|
-
output.writeln(output.dim(` Track with: monomind hive-mind task-status ${result.taskId}`));
|
|
168
|
-
return { success: true, data: result };
|
|
169
|
-
}
|
|
170
|
-
catch (error) {
|
|
171
|
-
if (error instanceof MCPClientError) {
|
|
172
|
-
output.printError(`Task submission error: ${error.message}`);
|
|
173
|
-
}
|
|
174
|
-
else {
|
|
175
|
-
output.printError(`Unexpected error: ${String(error)}`);
|
|
176
|
-
}
|
|
177
|
-
return { success: false, exitCode: 1 };
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
};
|
|
181
|
-
export const optimizeMemoryCommand = {
|
|
182
|
-
name: 'optimize-memory',
|
|
183
|
-
description: 'Optimize hive memory and patterns',
|
|
184
|
-
options: [
|
|
185
|
-
{ name: 'aggressive', short: 'a', description: 'Aggressive optimization', type: 'boolean', default: false },
|
|
186
|
-
{ name: 'threshold', description: 'Quality threshold for pattern retention', type: 'number', default: 0.7 }
|
|
187
|
-
],
|
|
188
|
-
action: async (ctx) => {
|
|
189
|
-
const aggressive = ctx.flags.aggressive;
|
|
190
|
-
const threshold = ctx.flags.threshold;
|
|
191
|
-
output.printInfo('Optimizing hive memory...');
|
|
192
|
-
const spinner = output.createSpinner({ text: 'Analyzing patterns...', spinner: 'dots' });
|
|
193
|
-
spinner.start();
|
|
194
|
-
try {
|
|
195
|
-
const result = await callMCPTool('hive-mind_optimize-memory', { aggressive, qualityThreshold: threshold });
|
|
196
|
-
spinner.succeed('Memory optimized');
|
|
197
|
-
if (ctx.flags.format === 'json') {
|
|
198
|
-
output.printJson(result);
|
|
199
|
-
return { success: true, data: result };
|
|
200
|
-
}
|
|
201
|
-
output.writeln();
|
|
202
|
-
output.printTable({
|
|
203
|
-
columns: [
|
|
204
|
-
{ key: 'metric', header: 'Metric', width: 20 },
|
|
205
|
-
{ key: 'before', header: 'Before', width: 15, align: 'right' },
|
|
206
|
-
{ key: 'after', header: 'After', width: 15, align: 'right' }
|
|
207
|
-
],
|
|
208
|
-
data: [
|
|
209
|
-
{ metric: 'Patterns', before: result.before.patterns, after: result.after.patterns },
|
|
210
|
-
{ metric: 'Memory', before: result.before.memory, after: result.after.memory }
|
|
211
|
-
]
|
|
212
|
-
});
|
|
213
|
-
output.writeln();
|
|
214
|
-
output.printList([
|
|
215
|
-
`Patterns removed: ${result.removed}`,
|
|
216
|
-
`Patterns consolidated: ${result.consolidated}`,
|
|
217
|
-
`Optimization time: ${result.timeMs}ms`
|
|
218
|
-
]);
|
|
219
|
-
return { success: true, data: result };
|
|
220
|
-
}
|
|
221
|
-
catch (error) {
|
|
222
|
-
spinner.fail('Optimization failed');
|
|
223
|
-
if (error instanceof MCPClientError) {
|
|
224
|
-
output.printError(`Optimization error: ${error.message}`);
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
227
|
-
output.printError(`Unexpected error: ${String(error)}`);
|
|
228
|
-
}
|
|
229
|
-
return { success: false, exitCode: 1 };
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
};
|
|
233
119
|
//# sourceMappingURL=hive-mind-ops.js.map
|
|
@@ -10,7 +10,7 @@ import { select } from '../prompt.js';
|
|
|
10
10
|
import { callMCPTool, MCPClientError } from '../mcp-client.js';
|
|
11
11
|
import { TOPOLOGIES, CONSENSUS_STRATEGIES } from './hive-mind-helpers.js';
|
|
12
12
|
import { spawnCommand } from './hive-mind-spawn.js';
|
|
13
|
-
import { statusCommand
|
|
13
|
+
import { statusCommand } from './hive-mind-ops.js';
|
|
14
14
|
import { joinCommand, leaveCommand, consensusCommand, broadcastCommand, memorySubCommand, shutdownCommand } from './hive-mind-comms.js';
|
|
15
15
|
const initCommand = {
|
|
16
16
|
name: 'init',
|
|
@@ -93,13 +93,12 @@ export const hiveMindCommand = {
|
|
|
93
93
|
name: 'hive-mind',
|
|
94
94
|
aliases: ['hive'],
|
|
95
95
|
description: 'Queen-led consensus-based multi-agent coordination',
|
|
96
|
-
subcommands: [initCommand, spawnCommand, statusCommand,
|
|
96
|
+
subcommands: [initCommand, spawnCommand, statusCommand, joinCommand, leaveCommand, consensusCommand, broadcastCommand, memorySubCommand, shutdownCommand],
|
|
97
97
|
options: [],
|
|
98
98
|
examples: [
|
|
99
99
|
{ command: 'monomind hive-mind init -t hierarchical-mesh', description: 'Initialize hive' },
|
|
100
100
|
{ command: 'monomind hive-mind spawn -n 5', description: 'Spawn workers' },
|
|
101
101
|
{ command: 'monomind hive-mind spawn --claude -o "Build a feature"', description: 'Launch Claude Code with hive mind' },
|
|
102
|
-
{ command: 'monomind hive-mind task -d "Build feature"', description: 'Submit task' }
|
|
103
102
|
],
|
|
104
103
|
action: async () => {
|
|
105
104
|
output.writeln();
|
|
@@ -112,13 +111,11 @@ export const hiveMindCommand = {
|
|
|
112
111
|
`${output.highlight('init')} - Initialize hive mind`,
|
|
113
112
|
`${output.highlight('spawn')} - Spawn worker agents (use --claude to launch Claude Code)`,
|
|
114
113
|
`${output.highlight('status')} - Show hive status`,
|
|
115
|
-
`${output.highlight('task')} - Submit task to hive`,
|
|
116
114
|
`${output.highlight('join')} - Join an agent to the hive`,
|
|
117
115
|
`${output.highlight('leave')} - Remove an agent from the hive`,
|
|
118
116
|
`${output.highlight('consensus')} - Manage consensus proposals`,
|
|
119
117
|
`${output.highlight('broadcast')} - Broadcast message to workers`,
|
|
120
118
|
`${output.highlight('memory')} - Access shared memory`,
|
|
121
|
-
`${output.highlight('optimize-memory')} - Optimize patterns and memory`,
|
|
122
119
|
`${output.highlight('shutdown')} - Shutdown the hive`
|
|
123
120
|
]);
|
|
124
121
|
output.writeln();
|
|
@@ -54,7 +54,8 @@ export const statuslineCommand = {
|
|
|
54
54
|
try {
|
|
55
55
|
const stats = fs.statSync(dbPath);
|
|
56
56
|
const sizeKB = stats.size / 1024;
|
|
57
|
-
|
|
57
|
+
// Estimate: ~2KB per pattern entry on average
|
|
58
|
+
patterns = Math.floor(sizeKB / 2); // estimatedPatterns — derived from file size, not counted
|
|
58
59
|
sessions = Math.max(1, Math.floor(patterns / 10));
|
|
59
60
|
trajectories = Math.floor(patterns / 5);
|
|
60
61
|
break;
|
|
@@ -275,7 +276,7 @@ export const statuslineCommand = {
|
|
|
275
276
|
try {
|
|
276
277
|
const stats = fs.statSync(dbPath);
|
|
277
278
|
memoryStats.dbSizeKB = Math.round(stats.size / 1024);
|
|
278
|
-
memoryStats.vectorCount = Math.floor(memoryStats.dbSizeKB / 2);
|
|
279
|
+
memoryStats.vectorCount = Math.floor(memoryStats.dbSizeKB / 2); // estimated from file size
|
|
279
280
|
memoryStats.hasHnsw = memoryStats.vectorCount > 100;
|
|
280
281
|
break;
|
|
281
282
|
}
|
|
@@ -298,7 +299,7 @@ export const statuslineCommand = {
|
|
|
298
299
|
memoryStats.dbSizeKB += Math.round(fileStat.size / 1024);
|
|
299
300
|
}
|
|
300
301
|
}
|
|
301
|
-
memoryStats.vectorCount = Math.floor(memoryStats.dbSizeKB / 2);
|
|
302
|
+
memoryStats.vectorCount = Math.floor(memoryStats.dbSizeKB / 2); // estimated from file size
|
|
302
303
|
memoryStats.hasHnsw = memoryStats.vectorCount > 100;
|
|
303
304
|
if (memoryStats.vectorCount > 0)
|
|
304
305
|
break;
|
|
@@ -349,7 +350,7 @@ export const statuslineCommand = {
|
|
|
349
350
|
try {
|
|
350
351
|
const files = fs.readdirSync(fullPath, { recursive: true });
|
|
351
352
|
testStats.testFiles = files.filter((f) => /\.(test|spec)\.(ts|js|tsx|jsx)$/.test(f)).length;
|
|
352
|
-
testStats.testCases = testStats.testFiles * 28;
|
|
353
|
+
testStats.testCases = testStats.testFiles * 28; // rough estimate (~28 cases/file avg), not counted
|
|
353
354
|
}
|
|
354
355
|
catch { /* ignore */ }
|
|
355
356
|
}
|
|
@@ -373,7 +374,7 @@ export const statuslineCommand = {
|
|
|
373
374
|
}
|
|
374
375
|
else if (progress.patternsLearned > 0) {
|
|
375
376
|
const patternsK = progress.patternsLearned >= 1000 ? `${(progress.patternsLearned / 1000).toFixed(1)}k` : String(progress.patternsLearned);
|
|
376
|
-
perfIndicator = `${c.brightYellow}📚
|
|
377
|
+
perfIndicator = `${c.brightYellow}📚 ~${patternsK} patterns (est.)${c.reset}`;
|
|
377
378
|
}
|
|
378
379
|
const line1 = `${c.brightCyan}🏗️ DDD Domains${c.reset} ${progressBar(progress.domainsCompleted, progress.totalDomains)} ` +
|
|
379
380
|
`${domainsColor}${progress.domainsCompleted}${c.reset}/${c.brightWhite}${progress.totalDomains}${c.reset} ` +
|
|
@@ -400,9 +401,9 @@ export const statuslineCommand = {
|
|
|
400
401
|
const sizeDisplay = memoryStats.dbSizeKB >= 1024 ? `${(memoryStats.dbSizeKB / 1024).toFixed(1)}MB` : `${memoryStats.dbSizeKB}KB`;
|
|
401
402
|
const hnswIndicator = memoryStats.hasHnsw ? `${c.brightGreen}⚡${c.reset}` : '';
|
|
402
403
|
const line4 = `${c.brightCyan}📊 LanceDB${c.reset} ` +
|
|
403
|
-
`${c.cyan}Vectors${c.reset} ${vectorColor}
|
|
404
|
+
`${c.cyan}Vectors${c.reset} ${vectorColor}●~${memoryStats.vectorCount}${hnswIndicator}${c.reset} ${c.dim}│${c.reset} ` +
|
|
404
405
|
`${c.cyan}Size${c.reset} ${c.brightWhite}${sizeDisplay}${c.reset} ${c.dim}│${c.reset} ` +
|
|
405
|
-
`${c.cyan}Tests${c.reset} ${testColor}●${testStats.testFiles}${c.reset} ${c.dim}(
|
|
406
|
+
`${c.cyan}Tests${c.reset} ${testColor}●${testStats.testFiles}${c.reset} ${c.dim}(~${testStats.testCases} est.)${c.reset} ${c.dim}│${c.reset} ` +
|
|
406
407
|
`${c.cyan}MCP${c.reset} ${mcpColor}●${mcpStats.enabled}/${mcpStats.total}${c.reset}`;
|
|
407
408
|
output.writeln(header);
|
|
408
409
|
output.writeln(separator);
|
|
@@ -138,7 +138,7 @@ export const coverageGapsCommand = {
|
|
|
138
138
|
return { success: true, data: result };
|
|
139
139
|
}
|
|
140
140
|
try {
|
|
141
|
-
const result = await callMCPTool('
|
|
141
|
+
const result = await callMCPTool('coverage_gaps', { threshold, groupByAgent });
|
|
142
142
|
spinner.stop();
|
|
143
143
|
const gaps = criticalOnly
|
|
144
144
|
? result.gaps.filter(g => g.gapType === 'critical')
|
|
@@ -150,7 +150,7 @@ export const coverageRouteCommand = {
|
|
|
150
150
|
return { success: true, data: result };
|
|
151
151
|
}
|
|
152
152
|
try {
|
|
153
|
-
const result = await callMCPTool('
|
|
153
|
+
const result = await callMCPTool('coverage_route', { task, threshold, useMonovector });
|
|
154
154
|
spinner.stop();
|
|
155
155
|
if (ctx.flags.format === 'json') {
|
|
156
156
|
output.printJson(result);
|
|
@@ -337,7 +337,7 @@ export const coverageSuggestCommand = {
|
|
|
337
337
|
return { success: true, data: result };
|
|
338
338
|
}
|
|
339
339
|
try {
|
|
340
|
-
const result = await callMCPTool('
|
|
340
|
+
const result = await callMCPTool('coverage_suggest', { path: targetPath, threshold, limit });
|
|
341
341
|
spinner.stop();
|
|
342
342
|
if (ctx.flags.format === 'json') {
|
|
343
343
|
output.printJson(result);
|
|
@@ -4,11 +4,8 @@
|
|
|
4
4
|
* Extracted from hooks.ts to reduce file size.
|
|
5
5
|
*/
|
|
6
6
|
import type { Command } from '../types.js';
|
|
7
|
-
export declare const tokenOptimizeCommand: Command;
|
|
8
7
|
export declare const modelRouteCommand: Command;
|
|
9
8
|
export declare const modelOutcomeCommand: Command;
|
|
10
9
|
export declare const modelStatsCommand: Command;
|
|
11
|
-
export declare const teammateIdleCommand: Command;
|
|
12
|
-
export declare const taskCompletedCommand: Command;
|
|
13
10
|
export declare const notifyCommand: Command;
|
|
14
11
|
//# sourceMappingURL=hooks-extended-commands.d.ts.map
|