@monoes/monomindcli 1.10.56 → 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.
- package/dist/src/commands/mcp.d.ts +1 -1
- package/dist/src/commands/update.d.ts +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/init/helpers-generator.d.ts +1 -1
- package/dist/src/mcp-tools/auto-install.d.ts +4 -4
- package/dist/src/mcp-tools/autopilot-tools.d.ts +1 -1
- package/dist/src/mcp-tools/claims-tools.d.ts +1 -1
- package/dist/src/mcp-tools/guidance-tools.d.ts +1 -1
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +48 -14
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts +2 -2
- package/dist/src/mcp-tools/progress-tools.d.ts +1 -1
- package/dist/src/mcp-tools/transfer-tools.d.ts +1 -1
- package/dist/src/runtime/headless.d.ts +3 -3
- package/dist/src/ruvector/agent-wasm.d.ts +1 -1
- package/dist/src/ruvector/index.d.ts +12 -1
- package/dist/src/ruvector/index.d.ts.map +1 -1
- package/dist/src/ruvector/index.js +30 -0
- package/dist/src/ruvector/index.js.map +1 -1
- package/dist/src/ruvector/ruvllm-wasm.d.ts +1 -1
- package/dist/src/transfer/ipfs/upload.d.ts +1 -1
- package/dist/src/transfer/storage/gcs.d.ts +1 -1
- package/dist/src/update/checker.d.ts +1 -1
- package/dist/src/update/index.d.ts +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/src/index.d.ts
CHANGED
|
@@ -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/@
|
|
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
|
-
* @
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 '@
|
|
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 @
|
|
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 @
|
|
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 @
|
|
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;
|
|
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;AAowBzD,eAAO,MAAM,YAAY,EAAE,OAsC1B,CAA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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
|
-
//
|
|
845
|
-
//
|
|
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
|
|
850
|
-
if (
|
|
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)
|