@grec0/memory-bank-mcp 0.1.28 → 0.1.30

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.
@@ -1,2 +1,2 @@
1
1
  // Version of the MCP Kanban server
2
- export const VERSION = "0.1.27";
2
+ export const VERSION = "0.1.29";
@@ -4,9 +4,13 @@ import { sessionState } from '../common/sessionState.js';
4
4
  import { sessionLogger } from '../common/sessionLogger.js';
5
5
  import os from 'os';
6
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();
9
- const { projectId, action, agentId, sessionId, status, focus, resource } = params;
7
+ const { projectId, action, agentId, sessionId, status, focus, resource, workspacePath } = params;
8
+ // For register action, workspacePath is REQUIRED to correctly register the project
9
+ if (action === 'register' && !workspacePath) {
10
+ throw new Error('workspacePath is REQUIRED for register action. Please provide the absolute path to the project workspace.');
11
+ }
12
+ // Use provided workspacePath, or fall back to home directory for non-register actions
13
+ const workspaceRoot = workspacePath || os.homedir();
10
14
  const board = new AgentBoard(workspaceRoot, projectId);
11
15
  try {
12
16
  switch (action) {
@@ -4,6 +4,8 @@
4
4
  */
5
5
  import * as fs from "fs";
6
6
  import * as path from "path";
7
+ import { AgentBoard } from "../common/agentBoard.js";
8
+ import { sessionState } from "../common/sessionState.js";
7
9
  /**
8
10
  * Parses existing progress data from the markdown content
9
11
  */
@@ -185,15 +187,34 @@ export async function trackProgress(params, storagePath = ".memorybank") {
185
187
  }
186
188
  // Track updated sections
187
189
  const updatedSections = [];
190
+ const createdTaskIds = [];
188
191
  // Merge tasks
189
192
  const completed = mergeTasks(existing.completed, progress.completed);
190
193
  if (progress.completed?.length)
191
194
  updatedSections.push("Completed");
192
195
  // Move completed tasks from inProgress to completed
193
196
  let inProgress = existing.inProgress.filter(t => !progress.completed?.some(c => c.toLowerCase() === t.toLowerCase()));
197
+ // Identify NEW tasks being added to inProgress (not already in existing)
198
+ const newInProgressTasks = (progress.inProgress || []).filter(task => !existing.inProgress.some(e => e.toLowerCase() === task.toLowerCase()));
194
199
  inProgress = mergeTasks(inProgress, progress.inProgress);
195
200
  if (progress.inProgress?.length)
196
201
  updatedSections.push("In Progress");
202
+ // Register NEW inProgress tasks in SQLite for tracking
203
+ if (newInProgressTasks.length > 0) {
204
+ try {
205
+ const board = new AgentBoard(storagePath, projectId);
206
+ const currentAgent = sessionState.getCurrentAgentId() || 'SYSTEM';
207
+ for (const taskTitle of newInProgressTasks) {
208
+ const taskId = await board.createTask(taskTitle, currentAgent, '', // assignedTo (deprecated, ignored)
209
+ `Task created via track_progress`);
210
+ createdTaskIds.push(taskId);
211
+ console.error(` Created SQLite task: ${taskId} - ${taskTitle}`);
212
+ }
213
+ }
214
+ catch (err) {
215
+ console.error(` Warning: Could not create SQLite tasks: ${err}`);
216
+ }
217
+ }
197
218
  const blocked = mergeTasks(existing.blocked, progress.blocked);
198
219
  if (progress.blocked?.length)
199
220
  updatedSections.push("Blocked");
@@ -241,13 +262,20 @@ export async function trackProgress(params, storagePath = ".memorybank") {
241
262
  };
242
263
  console.error(` Updated sections: ${updatedSections.join(", ") || "None"}`);
243
264
  console.error(` Stats: ${JSON.stringify(stats)}`);
265
+ if (createdTaskIds.length > 0) {
266
+ console.error(` Created ${createdTaskIds.length} SQLite task(s): ${createdTaskIds.join(", ")}`);
267
+ }
244
268
  console.error(`\n=== Progress Updated ===`);
269
+ const taskInfo = createdTaskIds.length > 0
270
+ ? ` Created ${createdTaskIds.length} task(s) in SQLite: ${createdTaskIds.join(", ")}.`
271
+ : "";
245
272
  return {
246
273
  success: true,
247
- message: `Progress updated for project "${projectId}". ${updatedSections.length > 0 ? `Updated: ${updatedSections.join(", ")}` : "No changes"}. Stats: ${stats.completed} completed, ${stats.inProgress} in progress, ${stats.upcoming} upcoming.`,
274
+ message: `Progress updated for project "${projectId}". ${updatedSections.length > 0 ? `Updated: ${updatedSections.join(", ")}` : "No changes"}. Stats: ${stats.completed} completed, ${stats.inProgress} in progress, ${stats.upcoming} upcoming.${taskInfo}`,
248
275
  projectId,
249
276
  updatedSections,
250
277
  stats,
278
+ createdTasks: createdTaskIds,
251
279
  };
252
280
  }
253
281
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grec0/memory-bank-mcp",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "MCP server for semantic code indexing with Memory Bank - AI-powered codebase understanding",
5
5
  "license": "MIT",
6
6
  "author": "@grec0",