@grec0/memory-bank-mcp 0.1.26 → 0.1.27
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/index.js +6 -2
- package/dist/tools/manageAgents.js +10 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -507,11 +507,14 @@ server.tool(manageAgentsToolDefinition.name, manageAgentsToolDefinition.descript
|
|
|
507
507
|
status: z.string().optional().describe("Estado del agente (para update_status)."),
|
|
508
508
|
focus: z.string().optional().describe("Tarea o fichero en el que se enfoca (para update_status)."),
|
|
509
509
|
resource: z.string().optional().describe("Identificador del recurso a bloquear (ej: 'src/auth/')."),
|
|
510
|
+
workspacePath: z.string().optional().describe("RUTA ABSOLUTA al directorio raíz del workspace. IMPORTANTE para registro correcto del proyecto."),
|
|
510
511
|
}, async (args) => {
|
|
511
512
|
const workspaceRoot = process.cwd();
|
|
512
513
|
if ((args.action === 'register' || args.action === 'update_status') && !args.agentId) {
|
|
513
514
|
throw new Error(`agentId is required for action ${args.action}`);
|
|
514
515
|
}
|
|
516
|
+
// Use workspacePath from args if provided, otherwise fall back to workspaceRoot
|
|
517
|
+
const effectiveWorkspace = args.workspacePath || workspaceRoot;
|
|
515
518
|
const result = await manageAgentsTool({
|
|
516
519
|
projectId: args.projectId,
|
|
517
520
|
action: args.action,
|
|
@@ -519,8 +522,9 @@ server.tool(manageAgentsToolDefinition.name, manageAgentsToolDefinition.descript
|
|
|
519
522
|
sessionId: args.sessionId,
|
|
520
523
|
status: args.status,
|
|
521
524
|
focus: args.focus,
|
|
522
|
-
resource: args.resource
|
|
523
|
-
|
|
525
|
+
resource: args.resource,
|
|
526
|
+
workspacePath: effectiveWorkspace
|
|
527
|
+
});
|
|
524
528
|
return {
|
|
525
529
|
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
526
530
|
};
|
|
@@ -2,8 +2,10 @@ import { AgentBoard } from '../common/agentBoard.js';
|
|
|
2
2
|
import { RegistryManager } from '../common/registryManager.js';
|
|
3
3
|
import { sessionState } from '../common/sessionState.js';
|
|
4
4
|
import { sessionLogger } from '../common/sessionLogger.js';
|
|
5
|
-
|
|
6
|
-
export async function manageAgentsTool(params
|
|
5
|
+
import os from 'os';
|
|
6
|
+
export async function manageAgentsTool(params) {
|
|
7
|
+
// Use provided workspacePath, or fall back to home directory (will be marked as 'unknown')
|
|
8
|
+
const workspaceRoot = params.workspacePath || os.homedir();
|
|
7
9
|
const { projectId, action, agentId, sessionId, status, focus, resource } = params;
|
|
8
10
|
const board = new AgentBoard(workspaceRoot, projectId);
|
|
9
11
|
try {
|
|
@@ -89,7 +91,7 @@ export const manageAgentsToolDefinition = {
|
|
|
89
91
|
},
|
|
90
92
|
action: {
|
|
91
93
|
type: "string",
|
|
92
|
-
description: "Acción a realizar
|
|
94
|
+
description: "Acción a realizar",
|
|
93
95
|
enum: ["register", "update_status", "claim_resource", "release_resource", "get_board"],
|
|
94
96
|
},
|
|
95
97
|
agentId: {
|
|
@@ -98,7 +100,7 @@ export const manageAgentsToolDefinition = {
|
|
|
98
100
|
},
|
|
99
101
|
sessionId: {
|
|
100
102
|
type: "string",
|
|
101
|
-
description: "
|
|
103
|
+
description: "UUID de sesión del agente para tracking de contexto.",
|
|
102
104
|
},
|
|
103
105
|
status: {
|
|
104
106
|
type: "string",
|
|
@@ -112,6 +114,10 @@ export const manageAgentsToolDefinition = {
|
|
|
112
114
|
type: "string",
|
|
113
115
|
description: "Identificador del recurso a bloquear (ej: 'src/auth/').",
|
|
114
116
|
},
|
|
117
|
+
workspacePath: {
|
|
118
|
+
type: "string",
|
|
119
|
+
description: "RUTA ABSOLUTA al directorio raíz del workspace. IMPORTANTE: Debe coincidir con la ruta real del proyecto, no usar rutas relativas.",
|
|
120
|
+
},
|
|
115
121
|
},
|
|
116
122
|
required: ["projectId", "action"],
|
|
117
123
|
},
|