@vheins/local-memory-mcp 0.16.1 → 0.16.2

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.
@@ -81,8 +81,8 @@ function loadServerInstructions() {
81
81
  // src/mcp/capabilities.ts
82
82
  var __dirname2 = path2.dirname(fileURLToPath2(import.meta.url));
83
83
  var pkgVersion = "0.1.0";
84
- if ("0.16.1") {
85
- pkgVersion = "0.16.1";
84
+ if ("0.16.2") {
85
+ pkgVersion = "0.16.2";
86
86
  } else {
87
87
  let searchDir = __dirname2;
88
88
  for (let i = 0; i < 5; i++) {
@@ -1908,6 +1908,18 @@ var TaskEntity = class extends BaseEntity {
1908
1908
  const row = this.get(query, params);
1909
1909
  return (row?.count ?? 0) > 0;
1910
1910
  }
1911
+ getChildrenByParentId(id) {
1912
+ return this.all(
1913
+ "SELECT task_code, title, status FROM tasks WHERE parent_id = ? ORDER BY created_at ASC",
1914
+ [id]
1915
+ );
1916
+ }
1917
+ getDependedByTaskId(id) {
1918
+ return this.all(
1919
+ "SELECT task_code, title, status FROM tasks WHERE depends_on = ? ORDER BY created_at ASC",
1920
+ [id]
1921
+ );
1922
+ }
1911
1923
  getExistingTaskCodes(repo, codes) {
1912
1924
  if (codes.length === 0) return /* @__PURE__ */ new Set();
1913
1925
  const placeholders = codes.map(() => "?").join(",");
@@ -3463,6 +3475,27 @@ var MemorySynthesizeSchema = z.object({
3463
3475
  });
3464
3476
  var TaskStatusSchema = z.enum(["backlog", "pending", "in_progress", "completed", "canceled", "blocked"]);
3465
3477
  var TaskPrioritySchema = z.number().min(1).max(5);
3478
+ var TaskMetadataSchema = z.record(z.string(), z.any()).optional().superRefine((metadata, ctx) => {
3479
+ if (!metadata) return;
3480
+ if (metadata.required_skills !== void 0) {
3481
+ if (!Array.isArray(metadata.required_skills)) {
3482
+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "metadata.required_skills must be an array of strings", path: ["metadata", "required_skills"] });
3483
+ } else if (metadata.required_skills.length === 0) {
3484
+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "metadata.required_skills must not be empty when present", path: ["metadata", "required_skills"] });
3485
+ } else if (!metadata.required_skills.every((s) => typeof s === "string" && s.length > 0)) {
3486
+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "metadata.required_skills must be an array of non-empty strings", path: ["metadata", "required_skills"] });
3487
+ }
3488
+ }
3489
+ if (metadata.fsm_gates !== void 0) {
3490
+ if (!Array.isArray(metadata.fsm_gates)) {
3491
+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "metadata.fsm_gates must be an array of strings", path: ["metadata", "fsm_gates"] });
3492
+ } else if (metadata.fsm_gates.length === 0) {
3493
+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "metadata.fsm_gates must not be empty when present", path: ["metadata", "fsm_gates"] });
3494
+ } else if (!metadata.fsm_gates.every((s) => typeof s === "string" && s.length > 0)) {
3495
+ ctx.addIssue({ code: z.ZodIssueCode.custom, message: "metadata.fsm_gates must be an array of non-empty strings", path: ["metadata", "fsm_gates"] });
3496
+ }
3497
+ }
3498
+ });
3466
3499
  var SingleTaskCreateSchema = z.object({
3467
3500
  task_code: z.string().min(1).optional(),
3468
3501
  phase: z.string().min(1),
@@ -3475,7 +3508,7 @@ var SingleTaskCreateSchema = z.object({
3475
3508
  doc_path: z.string().optional(),
3476
3509
  tags: z.array(z.string()).optional(),
3477
3510
  suggested_skills: z.array(z.string()).optional(),
3478
- metadata: z.record(z.string(), z.any()).optional(),
3511
+ metadata: TaskMetadataSchema,
3479
3512
  parent_id: z.string().optional(),
3480
3513
  depends_on: z.string().optional(),
3481
3514
  est_tokens: z.number().int().min(0).optional()