@monoes/monomindcli 1.11.5 → 1.11.7

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.
Files changed (75) hide show
  1. package/README.md +0 -1
  2. package/dist/src/commands/agent.d.ts.map +1 -1
  3. package/dist/src/commands/agent.js +8 -1
  4. package/dist/src/commands/agent.js.map +1 -1
  5. package/dist/src/commands/benchmark.d.ts.map +1 -1
  6. package/dist/src/commands/benchmark.js +17 -45
  7. package/dist/src/commands/benchmark.js.map +1 -1
  8. package/dist/src/commands/index.d.ts +0 -2
  9. package/dist/src/commands/index.d.ts.map +1 -1
  10. package/dist/src/commands/index.js +0 -7
  11. package/dist/src/commands/index.js.map +1 -1
  12. package/dist/src/commands/monograph.js +1 -1
  13. package/dist/src/commands/monograph.js.map +1 -1
  14. package/dist/src/commands/plugins.d.ts.map +1 -1
  15. package/dist/src/commands/plugins.js +1 -2
  16. package/dist/src/commands/plugins.js.map +1 -1
  17. package/dist/src/commands/route.d.ts.map +1 -1
  18. package/dist/src/commands/route.js +27 -36
  19. package/dist/src/commands/route.js.map +1 -1
  20. package/dist/src/index.d.ts.map +1 -1
  21. package/dist/src/index.js +6 -26
  22. package/dist/src/index.js.map +1 -1
  23. package/dist/src/mcp-server.js +1 -1
  24. package/dist/src/mcp-server.js.map +1 -1
  25. package/dist/src/mcp-tools/auto-install.d.ts +0 -8
  26. package/dist/src/mcp-tools/auto-install.d.ts.map +1 -1
  27. package/dist/src/mcp-tools/auto-install.js +0 -4
  28. package/dist/src/mcp-tools/auto-install.js.map +1 -1
  29. package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
  30. package/dist/src/mcp-tools/hooks-tools.js +2 -7
  31. package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
  32. package/dist/src/mcp-tools/monograph-compat.d.ts +4 -313
  33. package/dist/src/mcp-tools/monograph-compat.d.ts.map +1 -1
  34. package/dist/src/mcp-tools/monograph-compat.js +11 -1051
  35. package/dist/src/mcp-tools/monograph-compat.js.map +1 -1
  36. package/dist/src/mcp-tools/monograph-tools.js +25 -25
  37. package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
  38. package/dist/src/mcp-tools/neural-tools.d.ts +1 -1
  39. package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
  40. package/dist/src/mcp-tools/neural-tools.js +4 -30
  41. package/dist/src/mcp-tools/neural-tools.js.map +1 -1
  42. package/dist/src/memory/memory-bridge.d.ts +1 -2
  43. package/dist/src/memory/memory-bridge.d.ts.map +1 -1
  44. package/dist/src/memory/memory-bridge.js +1 -2
  45. package/dist/src/memory/memory-bridge.js.map +1 -1
  46. package/dist/src/memory/memory-initializer.d.ts.map +1 -1
  47. package/dist/src/memory/memory-initializer.js +7 -115
  48. package/dist/src/memory/memory-initializer.js.map +1 -1
  49. package/dist/src/monovector/index.d.ts +1 -8
  50. package/dist/src/monovector/index.d.ts.map +1 -1
  51. package/dist/src/monovector/index.js +1 -13
  52. package/dist/src/monovector/index.js.map +1 -1
  53. package/dist/src/plugins/store/discovery.d.ts.map +1 -1
  54. package/dist/src/plugins/store/discovery.js +0 -33
  55. package/dist/src/plugins/store/discovery.js.map +1 -1
  56. package/dist/src/routing/llm-caller.d.ts +24 -0
  57. package/dist/src/routing/llm-caller.d.ts.map +1 -0
  58. package/dist/src/routing/llm-caller.js +109 -0
  59. package/dist/src/routing/llm-caller.js.map +1 -0
  60. package/dist/src/ui/orgs.html +189 -0
  61. package/dist/src/ui/server.mjs +25 -0
  62. package/dist/src/update/checker.d.ts.map +1 -1
  63. package/dist/src/update/checker.js +0 -1
  64. package/dist/src/update/checker.js.map +1 -1
  65. package/dist/src/update/validator.d.ts.map +1 -1
  66. package/dist/src/update/validator.js +0 -10
  67. package/dist/src/update/validator.js.map +1 -1
  68. package/dist/tsconfig.tsbuildinfo +1 -1
  69. package/package.json +4 -11
  70. package/scripts/publish-registry.ts +0 -1
  71. package/bundled-graph/dist/src/build.js +0 -73
  72. package/bundled-graph/dist/src/cluster.js +0 -120
  73. package/bundled-graph/package.json +0 -57
  74. package/dist/src/commands/embeddings.d.ts +0 -18
  75. package/dist/src/commands/embeddings.js +0 -1628
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monoes/monomindcli",
3
- "version": "1.11.5",
3
+ "version": "1.11.7",
4
4
  "type": "module",
5
5
  "description": "Monomind CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",
@@ -68,7 +68,6 @@
68
68
  "dist",
69
69
  "bin",
70
70
  ".claude",
71
- "bundled-graph",
72
71
  "scripts",
73
72
  "README.md"
74
73
  ],
@@ -88,26 +87,20 @@
88
87
  "dependencies": {
89
88
  "ws": "^8.18.0",
90
89
  "@noble/ed25519": "^2.1.0",
91
- "@monoes/monograph": "^1.1.0",
90
+ "@monoes/monograph": "^1.2.0",
92
91
  "@monomind/aidefence": "workspace:*",
93
- "@monomind/embeddings": "workspace:*",
94
92
  "@monomind/guidance": "workspace:*",
95
93
  "@monomind/mcp": "workspace:*",
94
+ "@monomind/routing": "workspace:*",
96
95
  "graphology": "^0.25.4",
97
- "graphology-communities-louvain": "^2.0.1",
98
96
  "graphology-metrics": "^2.4.0",
99
- "graphology-shortest-path": "^2.0.2",
100
- "graphology-traversal": "^0.3.1",
101
- "graphology-types": "^0.24.7",
102
- "chokidar": "^3.6.0",
103
97
  "semver": "^7.6.0"
104
98
  },
105
99
  "optionalDependencies": {
106
100
  "sql.js": "^1.14.1",
107
101
  "@monoes/memory": "workspace:*",
108
102
  "@monomind/plugin-gastown-bridge": "^0.1.3",
109
- "agentic-flow": "^3.0.0-alpha.1",
110
- "@anthropic-ai/sdk": "*"
103
+ "agentic-flow": "^3.0.0-alpha.1"
111
104
  },
112
105
  "publishConfig": {
113
106
  "access": "public",
@@ -195,7 +195,6 @@ async function generateRegistry(): Promise<PluginRegistry> {
195
195
  '@monomind/plugin-gastown-bridge',
196
196
  '@monomind/security',
197
197
  '@monomind/claims',
198
- '@monomind/embeddings',
199
198
  '@monomind/performance',
200
199
  '@monomind/plugins',
201
200
  ];
@@ -1,73 +0,0 @@
1
- import Graph from 'graphology';
2
- // Mirrors upstream graphify's _normalize_id: lowercase + collapse non-alphanumeric to underscores.
3
- function normalizeId(s) {
4
- return s.replace(/[^a-zA-Z0-9]+/g, '_').replace(/^_+|_+$/g, '').toLowerCase();
5
- }
6
- /**
7
- * Build a graphology Graph from extracted nodes and edges.
8
- * Deduplicates nodes by id, merges parallel edges with higher weight.
9
- */
10
- export function buildGraph(extraction) {
11
- const graph = new Graph({ type: 'directed', multi: false });
12
- // Add all nodes — merge attributes if already present (dedup by id)
13
- for (const node of extraction.nodes) {
14
- if (!graph.hasNode(node.id)) {
15
- graph.addNode(node.id, { ...node });
16
- }
17
- else {
18
- graph.mergeNodeAttributes(node.id, { ...node });
19
- }
20
- }
21
- // Build normalized ID lookup to remap mismatched edge endpoints before stubbing.
22
- const normToId = new Map();
23
- graph.forEachNode((id) => {
24
- normToId.set(normalizeId(id), id);
25
- });
26
- // Add edges — skip self-loops, remap via normalization, stub only true externals
27
- for (const edge of extraction.edges) {
28
- let src = edge.source;
29
- let tgt = edge.target;
30
- if (!graph.hasNode(src)) {
31
- const remapped = normToId.get(normalizeId(src));
32
- if (remapped) {
33
- src = remapped;
34
- }
35
- else {
36
- graph.addNode(src, { id: src, label: src, fileType: 'unknown', sourceFile: '' });
37
- normToId.set(normalizeId(src), src);
38
- }
39
- }
40
- if (!graph.hasNode(tgt)) {
41
- const remapped = normToId.get(normalizeId(tgt));
42
- if (remapped) {
43
- tgt = remapped;
44
- }
45
- else {
46
- graph.addNode(tgt, { id: tgt, label: tgt, fileType: 'unknown', sourceFile: '' });
47
- normToId.set(normalizeId(tgt), tgt);
48
- }
49
- }
50
- if (src === tgt)
51
- continue;
52
- try {
53
- graph.addEdge(src, tgt, {
54
- relation: edge.relation,
55
- confidence: edge.confidence,
56
- confidenceScore: edge.confidenceScore,
57
- weight: edge.weight ?? 1,
58
- sourceFile: edge.sourceFile,
59
- sourceLocation: edge.sourceLocation,
60
- });
61
- }
62
- catch {
63
- // Edge already exists — bump its weight
64
- const existing = graph.edge(src, tgt);
65
- if (existing) {
66
- const prev = graph.getEdgeAttribute(existing, 'weight') ?? 1;
67
- graph.setEdgeAttribute(existing, 'weight', prev + 1);
68
- }
69
- }
70
- }
71
- return graph;
72
- }
73
- //# sourceMappingURL=build.js.map
@@ -1,120 +0,0 @@
1
- import Graph from 'graphology';
2
- export async function detectCommunities(graph) {
3
- let louvainFn = null;
4
- try {
5
- const mod = await import('graphology-communities-louvain');
6
- louvainFn = mod.default;
7
- }
8
- catch { /* louvain not available */ }
9
- if (louvainFn) {
10
- try {
11
- const assignment = louvainFn(graph);
12
- for (const [nodeId, communityId] of Object.entries(assignment)) {
13
- graph.setNodeAttribute(nodeId, 'community', communityId);
14
- }
15
- const communities = {};
16
- for (const [nodeId, communityId] of Object.entries(assignment)) {
17
- if (!communities[communityId])
18
- communities[communityId] = [];
19
- communities[communityId].push(nodeId);
20
- }
21
- return splitOversizedCommunities(graph, communities, 0.25, louvainFn);
22
- }
23
- catch { /* fall through */ }
24
- }
25
- return splitOversizedCommunities(graph, fallbackCluster(graph), 0.25, louvainFn);
26
- }
27
- function fallbackCluster(graph) {
28
- const dirMap = new Map();
29
- let nextId = 0;
30
- const communities = {};
31
- graph.forEachNode((id, attrs) => {
32
- const file = attrs.sourceFile || '';
33
- const parts = file.split('/');
34
- const dir = parts.length > 1 ? parts.slice(0, -1).join('/') : 'root';
35
- if (!dirMap.has(dir))
36
- dirMap.set(dir, nextId++);
37
- const cid = dirMap.get(dir);
38
- graph.setNodeAttribute(id, 'community', cid);
39
- if (!communities[cid])
40
- communities[cid] = [];
41
- communities[cid].push(id);
42
- });
43
- return communities;
44
- }
45
- export function cohesionScore(graph, communityNodes) {
46
- const memberSet = new Set(communityNodes);
47
- let totalEdges = 0;
48
- let internalEdges = 0;
49
- graph.forEachEdge((_edge, _attrs, source, target) => {
50
- const srcIn = memberSet.has(source);
51
- const tgtIn = memberSet.has(target);
52
- if (srcIn || tgtIn) {
53
- totalEdges++;
54
- if (srcIn && tgtIn)
55
- internalEdges++;
56
- }
57
- });
58
- return totalEdges === 0 ? 1.0 : internalEdges / totalEdges;
59
- }
60
- export function splitOversizedCommunities(graph, communities, threshold = 0.25, louvainFn = null) {
61
- const maxSize = threshold * graph.order;
62
- const allIds = Object.keys(communities).map(Number);
63
- let nextId = allIds.length > 0 ? Math.max(...allIds) + 1 : 0;
64
- for (const [cidStr, members] of Object.entries(communities)) {
65
- if (members.length <= maxSize)
66
- continue;
67
- const cid = Number(cidStr);
68
- // Attempt topology-based second pass via Louvain on the community subgraph
69
- if (louvainFn && members.length >= 10) {
70
- try {
71
- const memberSet = new Set(members);
72
- const subG = new Graph({ type: 'undirected', multi: false });
73
- for (const nodeId of members)
74
- subG.addNode(nodeId);
75
- graph.forEachEdge((_e, _a, source, target) => {
76
- if (memberSet.has(source) && memberSet.has(target) && source !== target && !subG.hasEdge(source, target))
77
- subG.addEdge(source, target);
78
- });
79
- const subAssignment = louvainFn(subG);
80
- const subCommunityCount = new Set(Object.values(subAssignment)).size;
81
- if (subCommunityCount > 1 && subCommunityCount <= Math.ceil(members.length / 2)) {
82
- const subIdMap = new Map();
83
- const newSubIds = {};
84
- for (const [nodeId, localId] of Object.entries(subAssignment)) {
85
- if (!subIdMap.has(localId))
86
- subIdMap.set(localId, nextId++);
87
- const globalId = subIdMap.get(localId);
88
- graph.setNodeAttribute(nodeId, 'community', globalId);
89
- if (!newSubIds[globalId])
90
- newSubIds[globalId] = [];
91
- newSubIds[globalId].push(nodeId);
92
- }
93
- delete communities[cid];
94
- Object.assign(communities, newSubIds);
95
- continue;
96
- }
97
- }
98
- catch { /* fall through to directory heuristic */ }
99
- }
100
- // Directory heuristic fallback
101
- const subMap = new Map();
102
- const newSubIds = {};
103
- for (const nodeId of members) {
104
- const file = graph.getNodeAttribute(nodeId, 'sourceFile') || '';
105
- const parts = file.split('/');
106
- const parentDir = parts.length > 1 ? parts[parts.length - 2] : 'root';
107
- if (!subMap.has(parentDir))
108
- subMap.set(parentDir, nextId++);
109
- const subId = subMap.get(parentDir);
110
- graph.setNodeAttribute(nodeId, 'community', subId);
111
- if (!newSubIds[subId])
112
- newSubIds[subId] = [];
113
- newSubIds[subId].push(nodeId);
114
- }
115
- delete communities[cid];
116
- Object.assign(communities, newSubIds);
117
- }
118
- return communities;
119
- }
120
- //# sourceMappingURL=cluster.js.map
@@ -1,57 +0,0 @@
1
- {
2
- "name": "@monomind/graph",
3
- "version": "1.4.0",
4
- "type": "module",
5
- "description": "Knowledge graph engine for monomind — AST extraction, graph construction, community detection, and persistent codebase understanding",
6
- "main": "./dist/src/index.js",
7
- "types": "./dist/src/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/src/index.d.ts",
11
- "import": "./dist/src/index.js"
12
- }
13
- },
14
- "files": [
15
- "dist",
16
- "src"
17
- ],
18
- "scripts": {
19
- "build": "tsc",
20
- "test": "vitest run",
21
- "clean": "rm -rf dist"
22
- },
23
- "dependencies": {
24
- "graphology": "^0.25.4",
25
- "graphology-types": "^0.24.7",
26
- "graphology-communities-louvain": "^2.0.1",
27
- "graphology-shortest-path": "^2.0.2",
28
- "graphology-traversal": "^0.3.1",
29
- "graphology-metrics": "^2.4.0",
30
- "chokidar": "^3.6.0"
31
- },
32
- "devDependencies": {
33
- "@types/node": "^20.0.0",
34
- "typescript": "^5.3.0",
35
- "vitest": "^4.1.4"
36
- },
37
- "optionalDependencies": {
38
- "node-tree-sitter": "^0.22.4",
39
- "tree-sitter-typescript": "^0.23.2",
40
- "tree-sitter-javascript": "^0.23.1",
41
- "tree-sitter-python": "^0.23.6",
42
- "tree-sitter-go": "^0.23.4",
43
- "tree-sitter-rust": "^0.23.2",
44
- "tree-sitter-java": "^0.23.5",
45
- "tree-sitter-c": "^0.23.4",
46
- "tree-sitter-cpp": "^0.23.4",
47
- "tree-sitter-ruby": "^0.23.1",
48
- "tree-sitter-c-sharp": "^0.23.1",
49
- "tree-sitter-kotlin": "^0.3.9",
50
- "tree-sitter-swift": "^0.6.1",
51
- "tree-sitter-scala": "^0.23.4",
52
- "tree-sitter-php": "^0.23.11"
53
- },
54
- "publishConfig": {
55
- "access": "public"
56
- }
57
- }
@@ -1,18 +0,0 @@
1
- /**
2
- * CLI Embeddings Command
3
- * Vector embeddings, semantic search, similarity operations
4
- *
5
- * Features:
6
- * - Multiple providers: OpenAI, Transformers.js, Agentic-Flow, Mock
7
- * - Document chunking with overlap
8
- * - L2/L1/minmax/zscore normalization
9
- * - Hyperbolic embeddings (Poincaré ball)
10
- * - Neural substrate integration
11
- * - Persistent SQLite cache
12
- *
13
- * github.com/nokhodian/monomind
14
- */
15
- import type { Command } from '../types.js';
16
- export declare const embeddingsCommand: Command;
17
- export default embeddingsCommand;
18
- //# sourceMappingURL=embeddings.d.ts.map