monomind 1.10.12 → 1.10.13
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.
|
@@ -1161,6 +1161,7 @@ const handlers = {
|
|
|
1161
1161
|
if (clean.length >= 3) {
|
|
1162
1162
|
var hits = getMonographSuggestions(clean, 5);
|
|
1163
1163
|
if (hits.length > 0) {
|
|
1164
|
+
_recordGraphTelemetry('graph_assist_search');
|
|
1164
1165
|
console.log('[MONOGRAPH_HIT] Graph has ' + hits.length + ' file(s) for "' + clean.slice(0, 40) + '" — consider monograph_query instead of shell grep:');
|
|
1165
1166
|
for (var j = 0; j < hits.length; j++) {
|
|
1166
1167
|
var h = hits[j];
|
|
@@ -1185,7 +1186,6 @@ const handlers = {
|
|
|
1185
1186
|
var clean = pattern.replace(/[\\^$.*+?()\[\]{}|]/g, ' ').trim();
|
|
1186
1187
|
if (clean.length < 3) return;
|
|
1187
1188
|
|
|
1188
|
-
// Loop drift detection
|
|
1189
1189
|
var sig = (toolName || 'Search') + ':' + clean.slice(0, 60);
|
|
1190
1190
|
var count = _recordToolCall(sig);
|
|
1191
1191
|
if (count >= 3) {
|
|
@@ -1193,6 +1193,9 @@ const handlers = {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
var suggestions = getMonographSuggestions(clean, 5);
|
|
1195
1195
|
if (suggestions.length === 0) return;
|
|
1196
|
+
// Successful intercept — count as a "graph assist" so the ratio reflects
|
|
1197
|
+
// server-side wins, not just LLM-initiated MCP calls.
|
|
1198
|
+
_recordGraphTelemetry('graph_assist_search');
|
|
1196
1199
|
console.log('[MONOGRAPH_HIT] Graph already knows ' + suggestions.length + ' file(s) matching "' + clean.slice(0, 40) + '":');
|
|
1197
1200
|
for (var i = 0; i < suggestions.length; i++) {
|
|
1198
1201
|
var s = suggestions[i];
|
|
@@ -1214,6 +1217,7 @@ const handlers = {
|
|
|
1214
1217
|
if (n.importedBy.length > 0) parts.push('imported-by: ' + n.importedBy.slice(0, 4).join(', '));
|
|
1215
1218
|
if (n.imports.length > 0) parts.push('imports: ' + n.imports.slice(0, 4).join(', '));
|
|
1216
1219
|
if (parts.length === 0) return;
|
|
1220
|
+
_recordGraphTelemetry('graph_assist_neighbors');
|
|
1217
1221
|
console.log('[MONOGRAPH_NEIGHBORS] ' + parts.join(' · '));
|
|
1218
1222
|
} catch (e) { /* non-fatal */ }
|
|
1219
1223
|
},
|
|
@@ -720,21 +720,27 @@ function getHookLatency() {
|
|
|
720
720
|
} catch { return null; }
|
|
721
721
|
}
|
|
722
722
|
|
|
723
|
-
// Graph usage telemetry —
|
|
723
|
+
// Graph usage telemetry — counts ALL graph wins (MCP calls + silent assists)
|
|
724
|
+
// vs greps that got no graph help. "graph %" reflects how often the graph
|
|
725
|
+
// actually touched the LLM's flow, not just how often the LLM invoked MCP.
|
|
724
726
|
function getGraphUsage() {
|
|
725
727
|
const usagePath = path.join(CWD, '.monomind', 'metrics', 'graph-usage.json');
|
|
726
728
|
try {
|
|
727
729
|
if (!fs.existsSync(usagePath)) return null;
|
|
728
730
|
const d = JSON.parse(fs.readFileSync(usagePath, 'utf-8'));
|
|
729
|
-
const
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
731
|
+
const graphWins =
|
|
732
|
+
(d.monograph_call || 0) // LLM-initiated MCP monograph tool call
|
|
733
|
+
+ (d.preresolve_hit || 0) // route hook injected pre-resolved files
|
|
734
|
+
+ (d.graph_assist_search || 0) // pre-search / pre-bash injected hits
|
|
735
|
+
+ (d.graph_assist_neighbors || 0); // post-read neighbor footer
|
|
736
|
+
const searches = (d.grep_call || 0) + (d.glob_call || 0)
|
|
737
|
+
+ (d.bash_grep_call || 0) + (d.bash_find_call || 0);
|
|
738
|
+
const total = graphWins + searches;
|
|
733
739
|
if (total === 0) return null;
|
|
734
740
|
return {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
pct: Math.round((
|
|
741
|
+
graphWins,
|
|
742
|
+
searches,
|
|
743
|
+
pct: Math.round((graphWins / total) * 100),
|
|
738
744
|
dollarsSaved: d.dollars_saved || 0,
|
|
739
745
|
};
|
|
740
746
|
} catch { return null; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "monomind",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.13",
|
|
4
4
|
"description": "Monomind - Enterprise AI agent orchestration for Claude Code. Deploy 60+ specialized agents in coordinated swarms with self-learning, fault-tolerant consensus, vector memory, and MCP integration",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -849,18 +849,20 @@ function getHookLatency() {
|
|
|
849
849
|
} catch { return null; }
|
|
850
850
|
}
|
|
851
851
|
|
|
852
|
-
// Graph usage telemetry —
|
|
852
|
+
// Graph usage telemetry — counts ALL graph wins (MCP calls + silent assists)
|
|
853
|
+
// vs greps that got no graph help.
|
|
853
854
|
function getGraphUsage() {
|
|
854
855
|
const usagePath = path.join(CWD, '.monomind', 'metrics', 'graph-usage.json');
|
|
855
856
|
try {
|
|
856
857
|
if (!fs.existsSync(usagePath)) return null;
|
|
857
858
|
const d = JSON.parse(fs.readFileSync(usagePath, 'utf-8'));
|
|
858
|
-
const
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
859
|
+
const graphWins = (d.monograph_call || 0) + (d.preresolve_hit || 0)
|
|
860
|
+
+ (d.graph_assist_search || 0) + (d.graph_assist_neighbors || 0);
|
|
861
|
+
const searches = (d.grep_call || 0) + (d.glob_call || 0)
|
|
862
|
+
+ (d.bash_grep_call || 0) + (d.bash_find_call || 0);
|
|
863
|
+
const total = graphWins + searches;
|
|
862
864
|
if (total === 0) return null;
|
|
863
|
-
return {
|
|
865
|
+
return { graphWins: graphWins, searches: searches, pct: Math.round((graphWins / total) * 100), dollarsSaved: d.dollars_saved || 0 };
|
|
864
866
|
} catch { return null; }
|
|
865
867
|
}
|
|
866
868
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monoes/monomindcli",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.13",
|
|
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",
|