@grec0/memory-bank-mcp 0.1.19 → 0.1.20
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/common/version.js +1 -1
- package/dist/tools/manageAgents.js +13 -1
- package/package.json +1 -1
package/dist/common/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Version of the MCP Kanban server
|
|
2
|
-
export const VERSION = "0.1.
|
|
2
|
+
export const VERSION = "0.1.20";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgentBoard } from '../common/agentBoard.js';
|
|
2
|
+
import { RegistryManager } from '../common/registryManager.js';
|
|
2
3
|
import * as crypto from 'crypto';
|
|
3
4
|
const WORKSPACE_ROOT = process.cwd(); // Will be overridden by actual workspace logic if passed
|
|
4
5
|
export async function manageAgentsTool(params, workspaceRoot = WORKSPACE_ROOT) {
|
|
@@ -10,9 +11,20 @@ export async function manageAgentsTool(params, workspaceRoot = WORKSPACE_ROOT) {
|
|
|
10
11
|
if (!agentId)
|
|
11
12
|
throw new Error('agentId is required for register');
|
|
12
13
|
// Auto-generate session ID if not provided.
|
|
13
|
-
// This abstracts the session management from the agent.
|
|
14
14
|
const effectiveSessionId = sessionId || crypto.randomUUID();
|
|
15
|
+
// 1. Register agent on local board
|
|
15
16
|
await board.registerAgent(agentId, effectiveSessionId);
|
|
17
|
+
// 2. Ensure project is registered in Global Registry
|
|
18
|
+
try {
|
|
19
|
+
const registry = new RegistryManager();
|
|
20
|
+
// We try to infer keywords or description, but for now we keep it simple.
|
|
21
|
+
// If the project is already registered, this updates the "lastActive" timestamp.
|
|
22
|
+
await registry.registerProject(projectId, workspaceRoot, `Auto-registered via Agent ${agentId}`, ['auto-discovered']);
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
console.error(`Failed to auto-register project in global registry: ${err}`);
|
|
26
|
+
// We don't fail the agent registration if global registry fails (e.g. permission issues)
|
|
27
|
+
}
|
|
16
28
|
return {
|
|
17
29
|
success: true,
|
|
18
30
|
message: `Agent ${agentId} registered`,
|