@monoes/monomindcli 1.10.55 → 1.10.57

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.
@@ -1,20 +1,20 @@
1
1
  ---
2
2
  name: mastermind-help
3
- description: Monomind commands reference — quick overview of all skills, CLI subcommands, and MCP tools available in this session
3
+ description: Mastermind commands reference — quick overview of all skills, CLI subcommands, and MCP tools available in this session
4
4
  ---
5
5
 
6
- # Monomind Help
6
+ # Mastermind Help
7
7
 
8
- Quick reference for all Monomind skills and CLI commands available in this project.
8
+ Quick reference for all Mastermind skills and CLI commands available in this project.
9
9
 
10
- ## Monomind Skills (invoke via Skill tool)
10
+ ## Mastermind Skills (invoke via Skill tool)
11
11
 
12
12
  | Skill | Description |
13
13
  |-------|-------------|
14
- | `mastermind:createtask` | Decompose a prompt, spec file, or folder into agent-optimized tasks on monotask |
15
- | `mastermind:do` | Execute tasks from monotask board with parallel/minimal/sequential agent modes |
16
- | `mastermind:ideate` | Research ideas from a prompt and decompose them into subtasks on monotask |
17
- | `mastermind:improve` | Deeply analyze a component, research improvements, create tasks |
14
+ | `mastermind:createtask` | Decompose a prompt, spec file, or folder into tasks saved to `docs/tasks/` (add `--monotask` for board) |
15
+ | `mastermind:do` | Execute tasks from a task file (add `--file <path>`) or monotask board (`--monotask`) |
16
+ | `mastermind:ideate` | Research ideas, evaluate, elaborate, decompose saved to `docs/ideas/` (add `--monotask` for board) |
17
+ | `mastermind:improve` | Analyze a component, research improvements, create tasks in `docs/improvements/` (`--monotask` for board) |
18
18
  | `mastermind:repeat` | Repeat a prompt on a schedule (default: 15 min, 10 times) |
19
19
  | `mastermind:understand` | Run semantic enrichment on the monograph knowledge graph |
20
20
  | `mastermind:specialagents` | Activate a specialist agent persona (browse categories or auto-select) |
@@ -2,7 +2,7 @@
2
2
  * CLI MCP Command
3
3
  * MCP server control and management with real server integration
4
4
  *
5
- * @module @monoes/cli/commands/mcp
5
+ * @module @monomind/cli/commands/mcp
6
6
  * @version 3.0.0
7
7
  */
8
8
  import type { Command } from '../types.js';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * CLI Update Command
3
- * Auto-update system for @monoes packages (ADR-025)
3
+ * Auto-update system for @monomind packages (ADR-025)
4
4
  */
5
5
  import type { Command } from '../types.js';
6
6
  declare const updateCommand: Command;
@@ -50,7 +50,7 @@ export declare class CLI {
50
50
  /**
51
51
  * Initialize optional subsystems at startup (non-blocking, all failures are silent).
52
52
  * Wires TierManager, ObservabilityBus + TraceCollector, and SwarmCheckpointer
53
- * so that packages/@monoes/* actually contribute to the live runtime.
53
+ * so that packages/@monomind/* actually contribute to the live runtime.
54
54
  */
55
55
  private initSubsystems;
56
56
  /**
@@ -38,7 +38,7 @@ export declare function generateIntelligenceStub(): string;
38
38
  /**
39
39
  * Generate a minimal auto-memory-hook.mjs fallback for fresh installs.
40
40
  * This ESM script handles import/sync/status commands gracefully when
41
- * @monoes/memory is not installed. Gets overwritten when source copy succeeds.
41
+ * @monomind/memory is not installed. Gets overwritten when source copy succeeds.
42
42
  */
43
43
  export declare function generateAutoMemoryHook(): string;
44
44
  /**
@@ -46,11 +46,11 @@ export declare function resetInstallAttempts(): void;
46
46
  * Optional package dependencies and their purposes
47
47
  */
48
48
  export declare const OPTIONAL_PACKAGES: {
49
- readonly '@monoes/aidefence': {
49
+ readonly '@monomind/aidefence': {
50
50
  readonly description: "AI manipulation defense (prompt injection, PII detection)";
51
51
  readonly tools: readonly ["aidefence_scan", "aidefence_analyze", "aidefence_stats", "aidefence_learn"];
52
52
  };
53
- readonly '@monoes/embeddings': {
53
+ readonly '@monomind/embeddings': {
54
54
  readonly description: "Vector embeddings with ONNX support";
55
55
  readonly tools: readonly ["embeddings_generate", "embeddings_search", "embeddings_batch"];
56
56
  };
@@ -65,11 +65,11 @@ declare const _default: {
65
65
  isPackageAvailable: typeof isPackageAvailable;
66
66
  resetInstallAttempts: typeof resetInstallAttempts;
67
67
  OPTIONAL_PACKAGES: {
68
- readonly '@monoes/aidefence': {
68
+ readonly '@monomind/aidefence': {
69
69
  readonly description: "AI manipulation defense (prompt injection, PII detection)";
70
70
  readonly tools: readonly ["aidefence_scan", "aidefence_analyze", "aidefence_stats", "aidefence_learn"];
71
71
  };
72
- readonly '@monoes/embeddings': {
72
+ readonly '@monomind/embeddings': {
73
73
  readonly description: "Vector embeddings with ONNX support";
74
74
  readonly tools: readonly ["embeddings_generate", "embeddings_search", "embeddings_batch"];
75
75
  };
@@ -5,7 +5,7 @@
5
5
  * Allows programmatic control of the autopilot loop via MCP.
6
6
  *
7
7
  * ADR-072: Autopilot Integration
8
- * @module @monoes/cli/mcp-tools/autopilot
8
+ * @module @monomind/cli/mcp-tools/autopilot
9
9
  */
10
10
  import type { MCPTool } from './types.js';
11
11
  export declare const autopilotTools: MCPTool[];
@@ -4,7 +4,7 @@
4
4
  * Implements MCP tools for ADR-016: Collaborative Issue Claims
5
5
  * Provides programmatic access to claim operations for MCP clients.
6
6
  *
7
- * @module @monoes/cli/mcp-tools/claims
7
+ * @module @monomind/cli/mcp-tools/claims
8
8
  */
9
9
  import type { MCPTool } from './types.js';
10
10
  export declare const claimsTools: MCPTool[];
@@ -4,7 +4,7 @@
4
4
  * Helps the system navigate Monomind's capabilities by providing structured
5
5
  * discovery of tools, commands, agents, skills, and recommended workflows.
6
6
  *
7
- * @module @monoes/cli/mcp-tools/guidance
7
+ * @module @monomind/cli/mcp-tools/guidance
8
8
  */
9
9
  import { type MCPTool } from './types.js';
10
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"hooks-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/hooks-tools.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,YAAY,CAAC;AA6tBzD,eAAO,MAAM,YAAY,EAAE,OAsC1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,OA4C3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,OAkC7B,C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AE,OAuCjC,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,OA4BzB,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,OAsCvB,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,OAsG/B,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,OAmEpC,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,OA4ClC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,OA4CjC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,OA4IhC,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,OAoE/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,OAqGhC,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,OA8KpC,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,OAwEpC,CAAC;AAGF,eAAO,MAAM,0BAA0B,EAAE,OAkHxC,CAAC;AA8PF,eAAO,MAAM,eAAe,EAAE,OA8C7B,CAAC;AAGF,eAAO,MAAM,mBAAmB,EAAE,OAiGjC,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,OAqD/B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,OAgE/B,CAAC;AAiBF,eAAO,MAAM,eAAe,EAAE,OAyC7B,CAAC;AAGF,eAAO,MAAM,iBAAiB,EAAE,OAuC/B,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,OAuB7B,CAAC;AAqBF,eAAO,MAAM,iBAAiB,EAAE,OAuC/B,CAAC;AAGF,eAAO,MAAM,UAAU,EAAE,OAAO,EAwC/B,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -533,6 +533,50 @@ function suggestAgentsForTask(task) {
533
533
  // Canonical set of valid monomind agent type strings.
534
534
  // Patterns whose type is not in this set (e.g. 'action', 'observation', 'routing')
535
535
  // are structural labels, not agent names, and must be excluded from routing.
536
+ // Singleton neural router — initialized once per process and reused across route calls.
537
+ // Creating + destroying NeuralLearningSystem on every call would read learned-state.json
538
+ // on each invocation and call consolidateEWC() on cleanup, both of which are wrong.
539
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
540
+ let _neuralRouterInstance = null;
541
+ let _neuralRouterInitPromise = null;
542
+ async function applyNeuralAdaptation(text, dimensions) {
543
+ if (!_neuralRouterInitPromise) {
544
+ _neuralRouterInitPromise = (async () => {
545
+ try {
546
+ const neural = await import('@monomind/neural').catch(() => null);
547
+ if (neural?.createNeuralLearningSystem) {
548
+ const sys = neural.createNeuralLearningSystem('balanced');
549
+ await sys.initialize();
550
+ _neuralRouterInstance = sys;
551
+ }
552
+ }
553
+ catch {
554
+ _neuralRouterInstance = null;
555
+ }
556
+ })();
557
+ }
558
+ await _neuralRouterInitPromise;
559
+ if (!_neuralRouterInstance)
560
+ return null;
561
+ try {
562
+ const base = new Float32Array(dimensions);
563
+ // Use a hash embedding as the base for the LoRA transform
564
+ const words = text.toLowerCase().split(/\s+/);
565
+ for (let i = 0; i < dimensions; i++) {
566
+ let v = 0;
567
+ for (let w = 0; w < words.length; w++) {
568
+ for (let c = 0; c < words[w].length; c++) {
569
+ v += Math.sin((words[w].charCodeAt(c) * (i + 1) + w * 17) * 0.0137);
570
+ }
571
+ }
572
+ base[i] = v;
573
+ }
574
+ return await _neuralRouterInstance.getSONAManager().applyAdaptations(base);
575
+ }
576
+ catch {
577
+ return null;
578
+ }
579
+ }
536
580
  const VALID_AGENT_TYPES = new Set([
537
581
  'coder', 'reviewer', 'tester', 'planner', 'researcher',
538
582
  'architect', 'security-architect', 'security-auditor',
@@ -841,23 +885,13 @@ export const hooksRoute = {
841
885
  let backendInfo = '';
842
886
  const queryText = context ? `${task} ${context}` : task;
843
887
  // Apply LoRA adaptations from the neural system when available.
844
- // This is the path where learned weights actually influence routing:
845
- // the query embedding is transformed by the session-trained LoRA before
846
- // being compared against the semantic router's pattern embeddings.
888
+ // The adapted embedding reflects what was learned in prior sessions
889
+ // (loaded from learned-state.json during _neuralRouterInstance.initialize()).
847
890
  let queryEmbedding = generateSimpleEmbedding(queryText);
848
891
  try {
849
- const neural = await import('@monomind/neural').catch(() => null);
850
- if (neural?.createNeuralLearningSystem) {
851
- const sys = neural.createNeuralLearningSystem('balanced');
852
- await sys.initialize();
853
- // applyAdaptations uses the LoRA weights from learned-state.json
854
- // (loaded during initialize()) to transform the query embedding.
855
- const base = generateSimpleEmbedding(queryText, 768);
856
- const adapted = await sys.getSONAManager().applyAdaptations(base);
857
- // Down-project to 384 to match the semantic router's expected dimension
892
+ const adapted = await applyNeuralAdaptation(queryText, 768);
893
+ if (adapted)
858
894
  queryEmbedding = adapted.slice(0, 384);
859
- await sys.cleanup();
860
- }
861
895
  }
862
896
  catch { /* fall through to hash embedding */ }
863
897
  // Try native VectorDb (HNSW-backed)