monomind 1.15.6 → 1.16.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/github/repo-architect.md +1 -1
- package/.claude/agents/specialists/integration-architect.md +6 -6
- package/.claude/commands/hive-mind/hive-mind-init.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-memory.md +1 -1
- package/.claude/commands/mastermind/brain.md +11 -11
- package/.claude/commands/mastermind/master.md +4 -4
- package/.claude/commands/mastermind/memory.md +6 -6
- package/.claude/commands/memory/README.md +4 -4
- package/.claude/commands/truth/start.md +3 -3
- package/.claude/helpers/extras-registry.json +2 -2
- package/.claude/helpers/skill-registry.json +26 -26
- package/.claude/helpers/statusline.cjs +8 -8
- package/.claude/skills/agentic-jujutsu/SKILL.md +3 -3
- package/.claude/skills/mastermind/_protocol.md +8 -8
- package/README.md +6 -6
- package/package.json +2 -2
- package/packages/@monomind/cli/README.md +6 -6
- package/packages/@monomind/cli/dist/src/__tests__/browse-analyzer.test.js +18 -1
- package/packages/@monomind/cli/dist/src/commands/agent.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/autopilot.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/completions.js +2 -21
- package/packages/@monomind/cli/dist/src/commands/config.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hive-mind.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +31 -31
- package/packages/@monomind/cli/dist/src/commands/hooks-routing-commands.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hooks.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/commands/index.js +0 -4
- package/packages/@monomind/cli/dist/src/commands/init.js +8 -8
- package/packages/@monomind/cli/dist/src/commands/memory.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/memory.js +138 -28
- package/packages/@monomind/cli/dist/src/commands/migrate.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/neural.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/swarm.js +1 -1
- package/packages/@monomind/cli/dist/src/config-adapter.js +8 -8
- package/packages/@monomind/cli/dist/src/index.js +1 -1
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +2 -2
- package/packages/@monomind/cli/dist/src/init/executor.js +16 -16
- package/packages/@monomind/cli/dist/src/init/shared-instructions-generator.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/init/shared-instructions-generator.js +1 -1
- package/packages/@monomind/cli/dist/src/init/statusline-generator.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/init/statusline-generator.js +8 -8
- package/packages/@monomind/cli/dist/src/init/types.d.ts +3 -3
- package/packages/@monomind/cli/dist/src/init/types.js +3 -3
- package/packages/@monomind/cli/dist/src/mcp-client.js +1 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/autopilot-tools.js +3 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/daa-tools.js +13 -13
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-intelligence.js +1 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +23 -23
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.d.ts +22 -6
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +553 -505
- package/packages/@monomind/cli/dist/src/mcp-tools/progress-tools.js +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/system-tools.js +5 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/transfer-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/transfer-tools.js +1 -156
- package/packages/@monomind/cli/dist/src/memory/embedding-operations.js +3 -3
- package/packages/@monomind/cli/dist/src/memory/hnsw-operations.js +5 -5
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +2 -2
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +86 -234
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +455 -1702
- package/packages/@monomind/cli/dist/src/memory/memory-crud.js +3 -3
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +5 -5
- package/packages/@monomind/cli/dist/src/memory/memory-read.js +4 -4
- package/packages/@monomind/cli/dist/src/suggest.js +0 -1
- package/packages/@monomind/cli/dist/src/types.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/ui/dashboard.html +41 -5
- package/packages/@monomind/cli/dist/src/ui/orgs.html +91 -5
- package/packages/@monomind/cli/dist/src/ui/server.mjs +44 -0
- package/packages/@monomind/cli/dist/src/update/validator.js +1 -3
- package/packages/@monomind/cli/package.json +4 -4
- package/scripts/verify-appliance.sh +1 -1
- package/packages/@monomind/cli/dist/src/commands/plugins.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/plugins.js +0 -799
- package/packages/@monomind/cli/dist/src/plugins/manager.d.ts +0 -133
- package/packages/@monomind/cli/dist/src/plugins/manager.js +0 -498
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.d.ts +0 -88
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.js +0 -650
- package/packages/@monomind/cli/dist/src/plugins/store/index.d.ts +0 -76
- package/packages/@monomind/cli/dist/src/plugins/store/index.js +0 -141
- package/packages/@monomind/cli/dist/src/plugins/store/search.d.ts +0 -46
- package/packages/@monomind/cli/dist/src/plugins/store/search.js +0 -231
- package/packages/@monomind/cli/dist/src/plugins/store/types.d.ts +0 -274
- package/packages/@monomind/cli/dist/src/plugins/store/types.js +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.js +0 -126
- package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.js +0 -188
- package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.js +0 -206
- package/packages/@monomind/cli/dist/src/services/registry-api.d.ts +0 -58
- package/packages/@monomind/cli/dist/src/services/registry-api.js +0 -199
|
@@ -32,8 +32,6 @@ import { githubTools } from './mcp-tools/github-tools.js';
|
|
|
32
32
|
import { daaTools } from './mcp-tools/daa-tools.js';
|
|
33
33
|
import { coordinationTools } from './mcp-tools/coordination-tools.js';
|
|
34
34
|
import { browserTools } from './mcp-tools/browser-tools.js';
|
|
35
|
-
// Phase 6: AgentDB v1 controller tools
|
|
36
|
-
import { agentdbTools } from './mcp-tools/agentdb-tools.js';
|
|
37
35
|
import { guidanceTools } from './mcp-tools/guidance-tools.js';
|
|
38
36
|
import { autopilotTools } from './mcp-tools/autopilot-tools.js';
|
|
39
37
|
// Knowledge graph tools (graphify — deprecated shims + monograph native)
|
|
@@ -51,10 +49,7 @@ import { coherenceTools } from './mcp-tools/coherence-tools.js';
|
|
|
51
49
|
* Maps tool names to their handler functions
|
|
52
50
|
*/
|
|
53
51
|
const TOOL_REGISTRY = new Map();
|
|
54
|
-
// Register all tools — refuse silent overrides
|
|
55
|
-
// tool cannot shadow a built-in handler (e.g. `agent_spawn`, `memory_store`)
|
|
56
|
-
// without an explicit override flag. Logical-name collision is a real concern
|
|
57
|
-
// when the plugin system goes live.
|
|
52
|
+
// Register all tools — refuse silent overrides without an explicit override flag.
|
|
58
53
|
function registerTools(tools, options = {}) {
|
|
59
54
|
for (const tool of tools) {
|
|
60
55
|
if (TOOL_REGISTRY.has(tool.name) && !options.override) {
|
|
@@ -89,8 +84,6 @@ registerTools([
|
|
|
89
84
|
...daaTools,
|
|
90
85
|
...coordinationTools,
|
|
91
86
|
...browserTools,
|
|
92
|
-
// Phase 6: AgentDB v1 controller tools
|
|
93
|
-
...agentdbTools,
|
|
94
87
|
// Guidance & discovery tools
|
|
95
88
|
...guidanceTools,
|
|
96
89
|
// Autopilot persistent completion tools
|
|
@@ -147,7 +147,7 @@ const autopilotProgress = {
|
|
|
147
147
|
};
|
|
148
148
|
const autopilotLearn = {
|
|
149
149
|
name: 'autopilot_learn',
|
|
150
|
-
description: 'Discover success patterns from past task completions. Requires
|
|
150
|
+
description: 'Discover success patterns from past task completions. Requires memory backend for full functionality.',
|
|
151
151
|
category: 'autopilot',
|
|
152
152
|
inputSchema: { type: 'object', properties: {} },
|
|
153
153
|
handler: async () => {
|
|
@@ -159,12 +159,12 @@ const autopilotLearn = {
|
|
|
159
159
|
]);
|
|
160
160
|
return ok({ metrics, patterns });
|
|
161
161
|
}
|
|
162
|
-
return ok({ available: false, reason: '
|
|
162
|
+
return ok({ available: false, reason: 'memory backend/AutopilotLearning not initialized', patterns: [] });
|
|
163
163
|
},
|
|
164
164
|
};
|
|
165
165
|
const autopilotHistory = {
|
|
166
166
|
name: 'autopilot_history',
|
|
167
|
-
description: 'Search past completion episodes by keyword. Requires
|
|
167
|
+
description: 'Search past completion episodes by keyword. Requires memory backend.',
|
|
168
168
|
category: 'autopilot',
|
|
169
169
|
inputSchema: {
|
|
170
170
|
type: 'object',
|
|
@@ -121,7 +121,7 @@ export const daaTools = [
|
|
|
121
121
|
}
|
|
122
122
|
store.agents[id] = agent;
|
|
123
123
|
saveDAAStore(store);
|
|
124
|
-
// Store agent in
|
|
124
|
+
// Store agent in memory backend for searchable agent registry
|
|
125
125
|
try {
|
|
126
126
|
const bridge = await import('../memory/memory-bridge.js');
|
|
127
127
|
await bridge.bridgeStoreEntry({
|
|
@@ -131,7 +131,7 @@ export const daaTools = [
|
|
|
131
131
|
tags: [agent.type, agent.cognitivePattern],
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
catch { /*
|
|
134
|
+
catch { /* memory backend unavailable */ }
|
|
135
135
|
return {
|
|
136
136
|
success: true,
|
|
137
137
|
agent: {
|
|
@@ -177,7 +177,7 @@ export const daaTools = [
|
|
|
177
177
|
agent.lastActivity = new Date().toISOString();
|
|
178
178
|
agent.status = 'active';
|
|
179
179
|
saveDAAStore(store);
|
|
180
|
-
// Store adaptation feedback in
|
|
180
|
+
// Store adaptation feedback in memory backend for pattern learning (backward compat: JSON store above)
|
|
181
181
|
let _storedIn = 'json-store';
|
|
182
182
|
try {
|
|
183
183
|
const bridge = await import('../memory/memory-bridge.js');
|
|
@@ -187,9 +187,9 @@ export const daaTools = [
|
|
|
187
187
|
quality: performanceScore,
|
|
188
188
|
agent: agentId,
|
|
189
189
|
});
|
|
190
|
-
_storedIn = '
|
|
190
|
+
_storedIn = 'lancedb';
|
|
191
191
|
}
|
|
192
|
-
catch { /*
|
|
192
|
+
catch { /* memory backend unavailable */ }
|
|
193
193
|
return {
|
|
194
194
|
success: true,
|
|
195
195
|
agentId,
|
|
@@ -283,7 +283,7 @@ export const daaTools = [
|
|
|
283
283
|
}
|
|
284
284
|
workflow.status = 'running';
|
|
285
285
|
saveDAAStore(store);
|
|
286
|
-
// Store workflow state in
|
|
286
|
+
// Store workflow state in memory backend for tracking
|
|
287
287
|
try {
|
|
288
288
|
const bridge = await import('../memory/memory-bridge.js');
|
|
289
289
|
await bridge.bridgeStoreEntry({
|
|
@@ -296,7 +296,7 @@ export const daaTools = [
|
|
|
296
296
|
namespace: 'daa-workflows',
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
|
-
catch { /*
|
|
299
|
+
catch { /* memory backend unavailable */ }
|
|
300
300
|
return {
|
|
301
301
|
success: true,
|
|
302
302
|
workflowId,
|
|
@@ -325,7 +325,7 @@ export const daaTools = [
|
|
|
325
325
|
const store = loadDAAStore();
|
|
326
326
|
const sourceId = input.sourceAgentId;
|
|
327
327
|
// Cap targetIds to prevent a large array from inflating the JSON store
|
|
328
|
-
// entry and the
|
|
328
|
+
// entry and the memory backend tags blob. 100 target agents is already very
|
|
329
329
|
// generous for any realistic swarm configuration.
|
|
330
330
|
const MAX_TARGET_IDS = 100;
|
|
331
331
|
const MAX_TARGET_ID_LEN = 256;
|
|
@@ -344,7 +344,7 @@ export const daaTools = [
|
|
|
344
344
|
targetAgents: targetIds,
|
|
345
345
|
timestamp: new Date().toISOString(),
|
|
346
346
|
};
|
|
347
|
-
// Primary: store in
|
|
347
|
+
// Primary: store in memory backend for vector-searchable knowledge
|
|
348
348
|
let _storedIn = 'json-store';
|
|
349
349
|
try {
|
|
350
350
|
const bridge = await import('../memory/memory-bridge.js');
|
|
@@ -354,9 +354,9 @@ export const daaTools = [
|
|
|
354
354
|
namespace: 'daa-knowledge',
|
|
355
355
|
tags: [domain, sourceId, ...targetIds],
|
|
356
356
|
});
|
|
357
|
-
_storedIn = '
|
|
357
|
+
_storedIn = 'lancedb';
|
|
358
358
|
}
|
|
359
|
-
catch { /*
|
|
359
|
+
catch { /* memory backend unavailable */ }
|
|
360
360
|
// Backward compat: always persist in JSON store (cap at 1000 entries)
|
|
361
361
|
if (Object.keys(store.knowledge).length >= 1000) {
|
|
362
362
|
const oldest = Object.keys(store.knowledge)[0];
|
|
@@ -373,8 +373,8 @@ export const daaTools = [
|
|
|
373
373
|
domain,
|
|
374
374
|
sharedAt: knowledgeEntry.timestamp,
|
|
375
375
|
_storedIn,
|
|
376
|
-
_note: _storedIn === '
|
|
377
|
-
? 'Knowledge stored in
|
|
376
|
+
_note: _storedIn === 'lancedb'
|
|
377
|
+
? 'Knowledge stored in memory backend (vector-searchable) and JSON store. Target agents can retrieve via daa_learning_status or memory search.'
|
|
378
378
|
: 'Knowledge stored in shared JSON registry. Target agents can retrieve via daa_learning_status. No cross-agent memory transfer occurs.',
|
|
379
379
|
};
|
|
380
380
|
},
|
|
@@ -76,11 +76,11 @@ const CAPABILITY_CATALOG = {
|
|
|
76
76
|
},
|
|
77
77
|
'memory-knowledge': {
|
|
78
78
|
name: 'Memory & Knowledge',
|
|
79
|
-
description: 'Persistent memory with
|
|
79
|
+
description: 'Persistent memory with ANN vector search, LanceDB storage, and embeddings.',
|
|
80
80
|
tools: ['memory_store', 'memory_retrieve', 'memory_search', 'memory_list', 'memory_delete', 'memory_init', 'memory_export', 'memory_import', 'memory_stats', 'memory_compact', 'memory_namespace'],
|
|
81
81
|
commands: ['memory store', 'memory retrieve', 'memory search', 'memory list', 'memory delete', 'memory init'],
|
|
82
82
|
agents: ['swarm-memory-manager', 'v1-memory-specialist'],
|
|
83
|
-
skills: ['v1-memory-unification', '
|
|
83
|
+
skills: ['v1-memory-unification', 'memory-advanced', 'memory-vector-search', 'memory-patterns', 'memory-learning'],
|
|
84
84
|
whenToUse: 'When you need to persist, search, or retrieve knowledge across sessions.',
|
|
85
85
|
},
|
|
86
86
|
'intelligence-learning': {
|
|
@@ -89,7 +89,7 @@ const CAPABILITY_CATALOG = {
|
|
|
89
89
|
tools: ['neural_train', 'neural_predict', 'neural_status', 'neural_patterns', 'neural_optimize'],
|
|
90
90
|
commands: ['neural train', 'neural predict', 'neural status', 'neural patterns', 'neural optimize'],
|
|
91
91
|
agents: ['sona-learning-optimizer', 'safla-neural'],
|
|
92
|
-
skills: ['reasoningbank-intelligence', 'reasoningbank
|
|
92
|
+
skills: ['reasoningbank-intelligence', 'memory-reasoningbank'],
|
|
93
93
|
whenToUse: 'When optimizing agent routing, training patterns from outcomes, or adaptive learning.',
|
|
94
94
|
},
|
|
95
95
|
'hooks-automation': {
|
|
@@ -158,7 +158,7 @@ const CAPABILITY_CATALOG = {
|
|
|
158
158
|
tools: ['embeddings_embed', 'embeddings_batch', 'embeddings_search', 'embeddings_init'],
|
|
159
159
|
commands: ['embeddings embed', 'embeddings batch', 'embeddings search', 'embeddings init'],
|
|
160
160
|
agents: [],
|
|
161
|
-
skills: ['
|
|
161
|
+
skills: ['memory-vector-search', 'memory-optimization'],
|
|
162
162
|
whenToUse: 'When you need semantic search, document embedding, or vector similarity operations.',
|
|
163
163
|
},
|
|
164
164
|
'code-analysis': {
|
|
@@ -675,7 +675,7 @@ export const hiveMindTools = [
|
|
|
675
675
|
state.consensus.pending = state.consensus.pending.filter(p => p.proposalId !== proposal.proposalId);
|
|
676
676
|
}
|
|
677
677
|
saveHiveState(state);
|
|
678
|
-
// Persist consensus result
|
|
678
|
+
// Persist consensus result for searchable history
|
|
679
679
|
if (resolved) {
|
|
680
680
|
try {
|
|
681
681
|
const bridge = await import('../memory/memory-bridge.js');
|
|
@@ -693,7 +693,7 @@ export const hiveMindTools = [
|
|
|
693
693
|
tags: [proposal.type, proposalStrategy || 'raft', proposal.status],
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
|
-
catch { /*
|
|
696
|
+
catch { /* LanceDB not available — JSON store is primary */ }
|
|
697
697
|
// Persist consensus audit record
|
|
698
698
|
const sessionSecret = process.env.MONOMIND_SESSION_SECRET;
|
|
699
699
|
if (!sessionSecret) {
|
|
@@ -983,7 +983,7 @@ export const hiveMindTools = [
|
|
|
983
983
|
}
|
|
984
984
|
state.sharedMemory[key] = cappedValue;
|
|
985
985
|
saveHiveState(state);
|
|
986
|
-
// Also store
|
|
986
|
+
// Also store for searchable hive memory
|
|
987
987
|
try {
|
|
988
988
|
const bridge = await import('../memory/memory-bridge.js');
|
|
989
989
|
await bridge.bridgeStoreEntry({
|
|
@@ -992,7 +992,7 @@ export const hiveMindTools = [
|
|
|
992
992
|
namespace: 'hive-memory',
|
|
993
993
|
});
|
|
994
994
|
}
|
|
995
|
-
catch { /*
|
|
995
|
+
catch { /* LanceDB not available */ }
|
|
996
996
|
return {
|
|
997
997
|
action,
|
|
998
998
|
key,
|
|
@@ -735,6 +735,7 @@ export const hooksIntelligenceAttention = {
|
|
|
735
735
|
results,
|
|
736
736
|
stats: {
|
|
737
737
|
computeTimeMs,
|
|
738
|
+
speedup: implementation.startsWith('real-') ? computeTimeMs : null,
|
|
738
739
|
_stub: implementation === 'none',
|
|
739
740
|
_note: implementation === 'none' ? 'Pure-JS similarity only; native attention backends are not part of the lean build.' : undefined,
|
|
740
741
|
},
|
|
@@ -189,7 +189,7 @@ export const hooksPostCommand = {
|
|
|
189
189
|
command: typeof command === 'string' ? command.slice(0, 200) : String(command).slice(0, 200),
|
|
190
190
|
exitCode,
|
|
191
191
|
});
|
|
192
|
-
// Persist command outcome via
|
|
192
|
+
// Persist command outcome via memory backend
|
|
193
193
|
let _storedIn = 'none';
|
|
194
194
|
try {
|
|
195
195
|
const bridge = await import('../memory/memory-bridge.js');
|
|
@@ -199,10 +199,10 @@ export const hooksPostCommand = {
|
|
|
199
199
|
namespace: 'commands',
|
|
200
200
|
tags: [success ? 'success' : 'error'],
|
|
201
201
|
});
|
|
202
|
-
_storedIn = '
|
|
202
|
+
_storedIn = 'lancedb';
|
|
203
203
|
}
|
|
204
204
|
catch {
|
|
205
|
-
//
|
|
205
|
+
// memory backend unavailable — store in JSON
|
|
206
206
|
try {
|
|
207
207
|
const store = loadMemoryStore();
|
|
208
208
|
const key = `cmd-${Date.now()}`;
|
|
@@ -255,16 +255,16 @@ export const hooksRoute = {
|
|
|
255
255
|
? rawContext.slice(0, MAX_ROUTE_CTX_LEN)
|
|
256
256
|
: rawContext;
|
|
257
257
|
const useSemanticRouter = params.useSemanticRouter !== false;
|
|
258
|
-
// Phase 5: Try
|
|
258
|
+
// Phase 5: Try memory backend SemanticRouter / LearningSystem first
|
|
259
259
|
if (useSemanticRouter) {
|
|
260
260
|
try {
|
|
261
261
|
const bridge = await import('../memory/memory-bridge.js');
|
|
262
|
-
const
|
|
263
|
-
if (
|
|
264
|
-
const agents =
|
|
262
|
+
const memoryRoute = await bridge.bridgeRouteTask({ task, context });
|
|
263
|
+
if (memoryRoute && memoryRoute.confidence > 0.5) {
|
|
264
|
+
const agents = memoryRoute.agents.length > 0 ? memoryRoute.agents : ['coder', 'researcher'];
|
|
265
265
|
const complexity = task.length > 200 ? 'high' : task.length < 50 ? 'low' : 'medium';
|
|
266
|
-
const
|
|
267
|
-
const
|
|
266
|
+
const memoryMethod = `memory-${memoryRoute.controller}`;
|
|
267
|
+
const memoryConfidence = Math.round(memoryRoute.confidence * 100) / 100;
|
|
268
268
|
// Record the route recommendation so post-task can join the actual outcome
|
|
269
269
|
const routeId = randomUUID();
|
|
270
270
|
await recordRoute(getRouteOutcomesBaseDir(), {
|
|
@@ -272,33 +272,33 @@ export const hooksRoute = {
|
|
|
272
272
|
ts: Date.now(),
|
|
273
273
|
task,
|
|
274
274
|
recommendedAgent: agents[0],
|
|
275
|
-
routingMethod:
|
|
276
|
-
confidence:
|
|
275
|
+
routingMethod: memoryMethod,
|
|
276
|
+
confidence: memoryConfidence,
|
|
277
277
|
learningMode: 'js',
|
|
278
278
|
});
|
|
279
279
|
return {
|
|
280
280
|
routeId,
|
|
281
281
|
task,
|
|
282
282
|
routing: {
|
|
283
|
-
method:
|
|
284
|
-
backend:
|
|
283
|
+
method: memoryMethod,
|
|
284
|
+
backend: memoryRoute.controller,
|
|
285
285
|
latencyMs: 0,
|
|
286
286
|
throughput: 'N/A',
|
|
287
287
|
},
|
|
288
|
-
matchedPattern:
|
|
289
|
-
semanticMatches: [{ pattern:
|
|
288
|
+
matchedPattern: memoryRoute.route,
|
|
289
|
+
semanticMatches: [{ pattern: memoryRoute.route, score: memoryRoute.confidence }],
|
|
290
290
|
primaryAgent: {
|
|
291
291
|
type: agents[0],
|
|
292
|
-
confidence: Math.round(
|
|
293
|
-
reason: `
|
|
292
|
+
confidence: Math.round(memoryRoute.confidence * 100) / 100,
|
|
293
|
+
reason: `memory:${memoryRoute.controller}: "${memoryRoute.route}" (${Math.round(memoryRoute.confidence * 100)}%)`,
|
|
294
294
|
},
|
|
295
295
|
alternativeAgents: agents.slice(1).map((agent, i) => ({
|
|
296
296
|
type: agent,
|
|
297
|
-
confidence: Math.round((
|
|
298
|
-
reason: `Alternative from ${
|
|
297
|
+
confidence: Math.round((memoryRoute.confidence - (0.1 * (i + 1))) * 100) / 100,
|
|
298
|
+
reason: `Alternative from ${memoryRoute.controller}`,
|
|
299
299
|
})),
|
|
300
300
|
estimatedMetrics: {
|
|
301
|
-
successProbability: Math.round(
|
|
301
|
+
successProbability: Math.round(memoryRoute.confidence * 100) / 100,
|
|
302
302
|
estimatedDuration: complexity === 'high' ? '2-4 hours' : complexity === 'medium' ? '30-60 min' : '10-30 min',
|
|
303
303
|
complexity,
|
|
304
304
|
},
|
|
@@ -307,7 +307,7 @@ export const hooksRoute = {
|
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
catch {
|
|
310
|
-
//
|
|
310
|
+
// memory router not available — fall through to local routing
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
// Deterministic keyword routing is the baseline (and only) local path.
|
|
@@ -1004,7 +1004,7 @@ export const hooksPretrain = {
|
|
|
1004
1004
|
};
|
|
1005
1005
|
scan(repoPath, 0);
|
|
1006
1006
|
const elapsed = Math.round(performance.now() - startTime);
|
|
1007
|
-
// Store extracted patterns in
|
|
1007
|
+
// Store extracted patterns in memory backend
|
|
1008
1008
|
let patternsStored = 0;
|
|
1009
1009
|
try {
|
|
1010
1010
|
const bridge = await import('../memory/memory-bridge.js');
|
|
@@ -1016,7 +1016,7 @@ export const hooksPretrain = {
|
|
|
1016
1016
|
});
|
|
1017
1017
|
patternsStored = patterns.length;
|
|
1018
1018
|
}
|
|
1019
|
-
catch { /*
|
|
1019
|
+
catch { /* memory backend unavailable */ }
|
|
1020
1020
|
// Feed extracted import patterns into the neural training system so
|
|
1021
1021
|
// pretrain actually trains, not just scans.
|
|
1022
1022
|
let neuralPatternsLearned = 0;
|
|
@@ -10,7 +10,6 @@ export { systemTools } from './system-tools.js';
|
|
|
10
10
|
export { neuralTools } from './neural-tools.js';
|
|
11
11
|
export { performanceTools } from './performance-tools.js';
|
|
12
12
|
export { githubTools } from './github-tools.js';
|
|
13
|
-
export { agentdbTools } from './agentdb-tools.js';
|
|
14
13
|
export { memoryTools } from './memory-tools.js';
|
|
15
14
|
export { configTools } from './config-tools.js';
|
|
16
15
|
export { hooksTools } from './hooks-tools.js';
|
|
@@ -10,8 +10,6 @@ export { systemTools } from './system-tools.js';
|
|
|
10
10
|
export { neuralTools } from './neural-tools.js';
|
|
11
11
|
export { performanceTools } from './performance-tools.js';
|
|
12
12
|
export { githubTools } from './github-tools.js';
|
|
13
|
-
// Phase 6: AgentDB v1 controller tools
|
|
14
|
-
export { agentdbTools } from './agentdb-tools.js';
|
|
15
13
|
export { memoryTools } from './memory-tools.js';
|
|
16
14
|
export { configTools } from './config-tools.js';
|
|
17
15
|
export { hooksTools } from './hooks-tools.js';
|
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Memory MCP Tools
|
|
2
|
+
* Memory MCP Tools — Phase 6 of ADR-053
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
4
|
+
* Exposes Memory backend operations as MCP tools.
|
|
5
|
+
* Provides direct access to ReasoningBank, CausalGraph, SkillLibrary,
|
|
6
|
+
* AttestationLog, and bridge health through the MCP protocol.
|
|
7
|
+
*
|
|
8
|
+
* Security: All handlers validate input types, enforce length bounds,
|
|
9
|
+
* and sanitize error messages before returning to MCP callers.
|
|
9
10
|
*
|
|
10
11
|
* @module v1/cli/mcp-tools/memory-tools
|
|
11
12
|
*/
|
|
12
13
|
import type { MCPTool } from './types.js';
|
|
14
|
+
export declare const memoryHealth: MCPTool;
|
|
15
|
+
export declare const memoryControllers: MCPTool;
|
|
16
|
+
export declare const memoryPatternStore: MCPTool;
|
|
17
|
+
export declare const memoryPatternSearch: MCPTool;
|
|
18
|
+
export declare const memoryFeedback: MCPTool;
|
|
19
|
+
export declare const memoryCausalEdge: MCPTool;
|
|
20
|
+
export declare const memoryRoute: MCPTool;
|
|
21
|
+
export declare const memorySessionStart: MCPTool;
|
|
22
|
+
export declare const memorySessionEnd: MCPTool;
|
|
23
|
+
export declare const memoryHierarchicalStore: MCPTool;
|
|
24
|
+
export declare const memoryHierarchicalRecall: MCPTool;
|
|
25
|
+
export declare const memoryConsolidate: MCPTool;
|
|
26
|
+
export declare const memoryBatch: MCPTool;
|
|
27
|
+
export declare const memoryContextSynthesize: MCPTool;
|
|
28
|
+
export declare const memorySemanticRoute: MCPTool;
|
|
13
29
|
export declare const memoryTools: MCPTool[];
|
|
14
30
|
//# sourceMappingURL=memory-tools.d.ts.map
|