@vheins/local-memory-mcp 0.19.8 → 0.19.9

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.
Files changed (2) hide show
  1. package/dist/mcp/server.js +13 -16
  2. package/package.json +1 -1
@@ -74,8 +74,8 @@ import path from "path";
74
74
  import { fileURLToPath } from "url";
75
75
  var __dirname = path.dirname(fileURLToPath(import.meta.url));
76
76
  var pkgVersion = "0.1.0";
77
- if ("0.19.8") {
78
- pkgVersion = "0.19.8";
77
+ if ("0.19.9") {
78
+ pkgVersion = "0.19.9";
79
79
  } else {
80
80
  let searchDir = __dirname;
81
81
  for (let i = 0; i < 5; i++) {
@@ -2341,15 +2341,13 @@ async function handleTaskCreate(args, storage) {
2341
2341
  throw new Error(`Duplicate task_code: '${code}' already exists in repository '${repo}'`);
2342
2342
  }
2343
2343
  codesInRequest.add(code);
2344
- const normalizedStatus = taskData.status || "backlog";
2344
+ let normalizedStatus = taskData.status || "backlog";
2345
2345
  if (normalizedStatus !== "backlog" && normalizedStatus !== "pending") {
2346
2346
  throw new Error(`New tasks must be 'backlog' or 'pending'. Task '${code}' has status '${normalizedStatus}'.`);
2347
2347
  }
2348
2348
  if (normalizedStatus === "pending") {
2349
- if (initialStats.todo + pendingInRequestCount >= 10) {
2350
- throw new Error(
2351
- `Cannot create task '${code}' as 'pending'. Maximum of 10 pending tasks reached. Please use status 'backlog' for new tasks instead.`
2352
- );
2349
+ if (initialStats.todo + pendingInRequestCount > 10) {
2350
+ normalizedStatus = "backlog";
2353
2351
  }
2354
2352
  }
2355
2353
  const statusTimestamps2 = deriveTaskStatusTimestamps(normalizedStatus, now2);
@@ -2405,7 +2403,7 @@ async function handleTaskCreate(args, storage) {
2405
2403
  phase,
2406
2404
  title,
2407
2405
  description,
2408
- status,
2406
+ status: requestedStatus,
2409
2407
  priority,
2410
2408
  agent,
2411
2409
  role,
@@ -2418,24 +2416,23 @@ async function handleTaskCreate(args, storage) {
2418
2416
  if (!phase || !title || !description) {
2419
2417
  throw new Error("Missing required fields for single task creation (phase, title, description)");
2420
2418
  }
2419
+ let effectiveStatus = requestedStatus || "backlog";
2421
2420
  const resolvedCode = task_code || generateNextCode(owner ?? "", repo, "task", storage);
2422
2421
  if (storage.tasks.isTaskCodeDuplicate(owner, repo, resolvedCode)) {
2423
2422
  throw new Error(`Duplicate task_code: '${resolvedCode}' already exists in repository '${repo}'`);
2424
2423
  }
2425
- if (status !== "backlog" && status !== "pending" && status !== void 0) {
2424
+ if (requestedStatus !== "backlog" && requestedStatus !== "pending" && requestedStatus !== void 0) {
2426
2425
  throw new Error("New tasks must be created with status 'backlog' or 'pending'.");
2427
2426
  }
2428
- if (status === "pending") {
2427
+ if (requestedStatus === "pending") {
2429
2428
  const stats = storage.taskStats.getTaskStats(owner, repo);
2430
- if (stats.todo >= 10) {
2431
- throw new Error(
2432
- `Cannot create task as 'pending'. Maximum of 10 pending tasks reached. Please use status 'backlog' for new tasks instead.`
2433
- );
2429
+ if (stats.todo > 10) {
2430
+ effectiveStatus = "backlog";
2434
2431
  }
2435
2432
  }
2436
2433
  const taskId = randomUUID4();
2437
2434
  const now = (/* @__PURE__ */ new Date()).toISOString();
2438
- const statusTimestamps = deriveTaskStatusTimestamps(status || "backlog", now);
2435
+ const statusTimestamps = deriveTaskStatusTimestamps(effectiveStatus, now);
2439
2436
  const finalTags = [...singleTask.tags || []];
2440
2437
  const phaseTag = `phase:${phase}`;
2441
2438
  if (!finalTags.includes(phaseTag)) {
@@ -2449,7 +2446,7 @@ async function handleTaskCreate(args, storage) {
2449
2446
  phase,
2450
2447
  title,
2451
2448
  description,
2452
- status: status || "backlog",
2449
+ status: effectiveStatus,
2453
2450
  priority: priority || 3,
2454
2451
  agent: agent || "unknown",
2455
2452
  role: role || "unknown",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vheins/local-memory-mcp",
3
- "version": "0.19.8",
3
+ "version": "0.19.9",
4
4
  "description": "MCP Local Memory Service for coding copilot agents",
5
5
  "mcpName": "io.github.vheins/local-memory-mcp",
6
6
  "type": "module",