@vheins/local-memory-mcp 0.17.0 → 0.18.1

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.17.0") {
85
- pkgVersion = "0.17.0";
84
+ if ("0.18.1") {
85
+ pkgVersion = "0.18.1";
86
86
  } else {
87
87
  let searchDir = __dirname2;
88
88
  for (let i = 0; i < 5; i++) {
@@ -3487,6 +3487,16 @@ function inferRepoFromSession(session) {
3487
3487
  }
3488
3488
  return void 0;
3489
3489
  }
3490
+ function inferOwnerFromSession(session) {
3491
+ const roots = getFilesystemRoots(session);
3492
+ if (roots.length === 1) {
3493
+ const parts = roots[0].split(path5.sep).filter(Boolean);
3494
+ if (parts.length >= 2) {
3495
+ return parts[parts.length - 2];
3496
+ }
3497
+ }
3498
+ return void 0;
3499
+ }
3490
3500
 
3491
3501
  // src/mcp/tools/schemas.ts
3492
3502
  import { z } from "zod";
@@ -3741,7 +3751,7 @@ var TaskCreateInteractiveSchema = SingleTaskCreateSchema.partial().extend({
3741
3751
  structured: z.boolean().default(false)
3742
3752
  });
3743
3753
  var TaskUpdateSchema = z.object({
3744
- owner: z.string().optional().default(""),
3754
+ owner: z.string().min(1),
3745
3755
  repo: z.string().min(1).transform(normalizeRepo),
3746
3756
  id: z.string().uuid().optional(),
3747
3757
  ids: z.array(z.string().uuid()).min(1).optional(),
@@ -3793,7 +3803,7 @@ var TaskSearchSchema = z.object({
3793
3803
  structured: z.boolean().default(false)
3794
3804
  });
3795
3805
  var TaskDeleteSchema = z.object({
3796
- owner: z.string().optional().default(""),
3806
+ owner: z.string().min(1),
3797
3807
  repo: z.string().min(1).transform(normalizeRepo),
3798
3808
  id: z.string().uuid().optional(),
3799
3809
  ids: z.array(z.string().uuid()).min(1).optional(),
@@ -3831,7 +3841,7 @@ var StandardDeleteSchema = z.object({
3831
3841
  }
3832
3842
  );
3833
3843
  var TaskGetSchema = z.object({
3834
- owner: z.string().optional().default(""),
3844
+ owner: z.string().min(1),
3835
3845
  repo: z.string().min(1).transform(normalizeRepo),
3836
3846
  id: z.string().uuid().optional(),
3837
3847
  task_code: z.string().optional(),
@@ -3898,7 +3908,7 @@ var ClaimListSchema = z.object({
3898
3908
  structured: z.boolean().default(false)
3899
3909
  });
3900
3910
  var ClaimReleaseSchema = z.object({
3901
- owner: z.string().optional().default(""),
3911
+ owner: z.string().min(1),
3902
3912
  repo: z.string().min(1).transform(normalizeRepo),
3903
3913
  task_id: z.string().uuid().optional(),
3904
3914
  task_code: z.string().optional(),
@@ -3917,7 +3927,7 @@ var StandardStoreSchema = z.object({
3917
3927
  version: z.string().optional(),
3918
3928
  language: z.string().optional(),
3919
3929
  stack: z.array(z.string()).optional(),
3920
- owner: z.string().optional().default(""),
3930
+ owner: z.string().min(1),
3921
3931
  repo: z.string().transform(normalizeRepo).optional(),
3922
3932
  is_global: z.boolean().optional(),
3923
3933
  tags: z.array(z.string().min(1)).min(1).optional(),
@@ -3991,7 +4001,8 @@ var TOOL_DEFINITIONS = [
3991
4001
  inputSchema: {
3992
4002
  type: "object",
3993
4003
  properties: {
3994
- repo: { type: "string", description: "Repository name. Optional when a single MCP root is active." },
4004
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4005
+ repo: { type: "string", description: "Repository/project name. Optional when a single MCP root is active." },
3995
4006
  objective: { type: "string", minLength: 5, description: "Question or synthesis objective." },
3996
4007
  current_file_path: {
3997
4008
  type: "string",
@@ -4008,7 +4019,7 @@ var TOOL_DEFINITIONS = [
4008
4019
  max_tokens: { type: "number", minimum: 128, maximum: 4e3, default: 1200 },
4009
4020
  structured: { type: "boolean", default: false, description: "If true, returns structured JSON results." }
4010
4021
  },
4011
- required: ["objective"]
4022
+ required: ["owner", "objective"]
4012
4023
  },
4013
4024
  outputSchema: {
4014
4025
  type: "object",
@@ -4037,6 +4048,10 @@ var TOOL_DEFINITIONS = [
4037
4048
  inputSchema: {
4038
4049
  type: "object",
4039
4050
  properties: {
4051
+ owner: {
4052
+ type: "string",
4053
+ description: "Organization/namespace (e.g., GitHub org or username)"
4054
+ },
4040
4055
  repo: {
4041
4056
  type: "string",
4042
4057
  description: "Repository name. Optional when it can be inferred from MCP roots or elicited from the user."
@@ -4109,6 +4124,7 @@ var TOOL_DEFINITIONS = [
4109
4124
  inputSchema: {
4110
4125
  type: "object",
4111
4126
  properties: {
4127
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4112
4128
  repo: { type: "string", description: "Repository name" },
4113
4129
  id: { type: "string", format: "uuid", description: "Task ID (optional if task_code is provided)" },
4114
4130
  task_code: { type: "string", description: "Task code (e.g. TASK-001) (optional if id is provided)" },
@@ -4118,7 +4134,7 @@ var TOOL_DEFINITIONS = [
4118
4134
  description: "If true, returns structured JSON without the text content details."
4119
4135
  }
4120
4136
  },
4121
- required: ["repo"]
4137
+ required: ["repo", "owner"]
4122
4138
  }
4123
4139
  },
4124
4140
  {
@@ -4171,12 +4187,13 @@ var TOOL_DEFINITIONS = [
4171
4187
  scope: {
4172
4188
  type: "object",
4173
4189
  properties: {
4174
- repo: { type: "string", description: "Repository name" },
4175
- branch: { type: "string" },
4176
- folder: { type: "string" },
4177
- language: { type: "string" }
4190
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4191
+ repo: { type: "string", description: "Repository/project name" },
4192
+ branch: { type: "string", description: "Git branch this memory relates to" },
4193
+ folder: { type: "string", description: "Subdirectory within the repo" },
4194
+ language: { type: "string", description: "Programming language (e.g., 'typescript', 'python')" }
4178
4195
  },
4179
- required: ["repo"]
4196
+ required: ["owner", "repo"]
4180
4197
  },
4181
4198
  tags: {
4182
4199
  type: "array",
@@ -4191,7 +4208,11 @@ var TOOL_DEFINITIONS = [
4191
4208
  type: "boolean",
4192
4209
  description: "If true, this memory is shared across all repositories"
4193
4210
  },
4194
- ttlDays: { type: "number", minimum: 1 },
4211
+ ttlDays: {
4212
+ type: "number",
4213
+ minimum: 1,
4214
+ description: "Time-to-live in days. After this period, the memory expires."
4215
+ },
4195
4216
  supersedes: {
4196
4217
  type: "string",
4197
4218
  description: "Optional memory ID (UUID) or memory code to supersede. Resolved before storing."
@@ -4201,29 +4222,34 @@ var TOOL_DEFINITIONS = [
4201
4222
  items: {
4202
4223
  type: "object",
4203
4224
  properties: {
4204
- type: { type: "string", enum: ["code_fact", "decision", "mistake", "pattern", "task_archive"] },
4205
- title: { type: "string", minLength: 3, maxLength: 100 },
4206
- content: { type: "string", minLength: 10 },
4207
- importance: { type: "number", minimum: 1, maximum: 5 },
4208
- agent: { type: "string" },
4209
- role: { type: "string", default: "unknown" },
4210
- model: { type: "string" },
4225
+ type: {
4226
+ type: "string",
4227
+ enum: ["code_fact", "decision", "mistake", "pattern", "task_archive"],
4228
+ description: "Type of durable knowledge being stored"
4229
+ },
4230
+ title: { type: "string", minLength: 3, maxLength: 100, description: "Short human-readable title" },
4231
+ content: { type: "string", minLength: 10, description: "The memory content" },
4232
+ importance: { type: "number", minimum: 1, maximum: 5, description: "Importance score (1-5)" },
4233
+ agent: { type: "string", description: "Name of the agent creating this memory" },
4234
+ role: { type: "string", default: "unknown", description: "Role of the agent creating this memory" },
4235
+ model: { type: "string", description: "AI model used by the agent" },
4211
4236
  scope: {
4212
4237
  type: "object",
4213
4238
  properties: {
4214
- repo: { type: "string" },
4215
- branch: { type: "string" },
4216
- folder: { type: "string" },
4217
- language: { type: "string" }
4239
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4240
+ repo: { type: "string", description: "Repository/project name" },
4241
+ branch: { type: "string", description: "Git branch this memory relates to" },
4242
+ folder: { type: "string", description: "Subdirectory within the repo" },
4243
+ language: { type: "string", description: "Programming language" }
4218
4244
  },
4219
- required: ["repo"]
4245
+ required: ["owner", "repo"]
4220
4246
  },
4221
- code: { type: "string" },
4222
- ttlDays: { type: "number", minimum: 1 },
4223
- supersedes: { type: "string" },
4224
- tags: { type: "array", items: { type: "string" } },
4225
- metadata: { type: "object" },
4226
- is_global: { type: "boolean", default: false }
4247
+ code: { type: "string", description: "Optional custom code. Auto-generated if omitted." },
4248
+ ttlDays: { type: "number", minimum: 1, description: "Time-to-live in days" },
4249
+ supersedes: { type: "string", description: "UUID or code of a memory this entry replaces" },
4250
+ tags: { type: "array", items: { type: "string" }, description: "Technology stack tags" },
4251
+ metadata: { type: "object", description: "Structured metadata for non-title context" },
4252
+ is_global: { type: "boolean", default: false, description: "If true, shared across all repositories" }
4227
4253
  },
4228
4254
  required: ["type", "title", "content", "importance", "agent", "model", "scope"]
4229
4255
  },
@@ -4345,9 +4371,14 @@ var TOOL_DEFINITIONS = [
4345
4371
  inputSchema: {
4346
4372
  type: "object",
4347
4373
  properties: {
4348
- query: { type: "string", minLength: 3 },
4349
- prompt: { type: "string" },
4350
- repo: { type: "string" },
4374
+ query: {
4375
+ type: "string",
4376
+ minLength: 3,
4377
+ description: "Search keyword to match against memory titles and content"
4378
+ },
4379
+ prompt: { type: "string", description: "Natural language prompt for semantic search" },
4380
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4381
+ repo: { type: "string", description: "Repository/project name" },
4351
4382
  current_tags: {
4352
4383
  type: "array",
4353
4384
  items: { type: "string" },
@@ -4358,21 +4389,27 @@ var TOOL_DEFINITIONS = [
4358
4389
  items: {
4359
4390
  type: "string",
4360
4391
  enum: ["code_fact", "decision", "mistake", "pattern", "task_archive"]
4361
- }
4392
+ },
4393
+ description: "Filter by memory type(s)"
4362
4394
  },
4363
- minImportance: { type: "number", minimum: 1, maximum: 5 },
4395
+ minImportance: { type: "number", minimum: 1, maximum: 5, description: "Minimum importance threshold (1-5)" },
4364
4396
  limit: { type: "number", minimum: 1, maximum: 100, default: 5 },
4365
4397
  offset: { type: "number", minimum: 0, default: 0 },
4366
4398
  includeRecap: { type: "boolean", default: false },
4367
- current_file_path: { type: "string" },
4368
- include_archived: { type: "boolean", default: false },
4399
+ current_file_path: { type: "string", description: "Absolute file path for workspace-local grounding" },
4400
+ include_archived: {
4401
+ type: "boolean",
4402
+ default: false,
4403
+ description: "Include archived/expired memories in results"
4404
+ },
4369
4405
  scope: {
4370
4406
  type: "object",
4371
4407
  properties: {
4372
- repo: { type: "string" },
4373
- branch: { type: "string" },
4374
- folder: { type: "string" },
4375
- language: { type: "string" }
4408
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4409
+ repo: { type: "string", description: "Repository/project name" },
4410
+ branch: { type: "string", description: "Git branch filter" },
4411
+ folder: { type: "string", description: "Subdirectory filter" },
4412
+ language: { type: "string", description: "Programming language filter" }
4376
4413
  }
4377
4414
  },
4378
4415
  structured: {
@@ -4381,7 +4418,7 @@ var TOOL_DEFINITIONS = [
4381
4418
  description: "If true, returns structured JSON without the text content summary."
4382
4419
  }
4383
4420
  },
4384
- required: ["query", "repo"]
4421
+ required: ["owner", "query", "repo"]
4385
4422
  },
4386
4423
  outputSchema: {
4387
4424
  type: "object",
@@ -4424,7 +4461,8 @@ var TOOL_DEFINITIONS = [
4424
4461
  inputSchema: {
4425
4462
  type: "object",
4426
4463
  properties: {
4427
- repo: { type: "string", description: "Repository name" },
4464
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4465
+ repo: { type: "string", description: "Repository/project name" },
4428
4466
  signals: {
4429
4467
  type: "array",
4430
4468
  items: { type: "string", maxLength: 200 },
@@ -4433,7 +4471,7 @@ var TOOL_DEFINITIONS = [
4433
4471
  },
4434
4472
  structured: { type: "boolean", default: false, description: "If true, returns structured JSON of the summary." }
4435
4473
  },
4436
- required: ["repo", "signals"]
4474
+ required: ["owner", "repo", "signals"]
4437
4475
  },
4438
4476
  outputSchema: {
4439
4477
  type: "object",
@@ -4552,7 +4590,8 @@ var TOOL_DEFINITIONS = [
4552
4590
  inputSchema: {
4553
4591
  type: "object",
4554
4592
  properties: {
4555
- repo: { type: "string", description: "Repository name (required)" },
4593
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4594
+ repo: { type: "string", description: "Repository/project name (required)" },
4556
4595
  limit: {
4557
4596
  type: "number",
4558
4597
  minimum: 1,
@@ -4572,7 +4611,7 @@ var TOOL_DEFINITIONS = [
4572
4611
  description: "If true, returns structured JSON without the text content summary."
4573
4612
  }
4574
4613
  },
4575
- required: ["repo"]
4614
+ required: ["owner", "repo"]
4576
4615
  },
4577
4616
  outputSchema: {
4578
4617
  type: "object",
@@ -4625,7 +4664,8 @@ var TOOL_DEFINITIONS = [
4625
4664
  inputSchema: {
4626
4665
  type: "object",
4627
4666
  properties: {
4628
- repo: { type: "string", description: "Repository name" },
4667
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4668
+ repo: { type: "string", description: "Repository/project name" },
4629
4669
  task_code: { type: "string", description: "Unique task code (e.g. TASK-001) (Required for single task)" },
4630
4670
  phase: { type: "string", description: "Project phase (Required for single task)" },
4631
4671
  title: {
@@ -4651,11 +4691,11 @@ var TOOL_DEFINITIONS = [
4651
4691
  default: 3,
4652
4692
  description: "Task priority where 1=Low, 2=Normal, 3=Medium, 4=High, 5=Critical."
4653
4693
  },
4654
- agent: { type: "string" },
4655
- role: { type: "string" },
4656
- doc_path: { type: "string" },
4657
- tags: { type: "array", items: { type: "string" } },
4658
- metadata: { type: "object" },
4694
+ agent: { type: "string", description: "Agent assigned to this task" },
4695
+ role: { type: "string", description: "Role of the assigned agent" },
4696
+ doc_path: { type: "string", description: "Path to related documentation file" },
4697
+ tags: { type: "array", items: { type: "string" }, description: "Tags for categorization" },
4698
+ metadata: { type: "object", description: "Structured metadata for additional context" },
4659
4699
  parent_id: {
4660
4700
  type: "string",
4661
4701
  description: "Optional parent task ID (UUID) or parent task code (e.g. TASK-001). Resolved to UUID before storing."
@@ -4670,14 +4710,14 @@ var TOOL_DEFINITIONS = [
4670
4710
  items: {
4671
4711
  type: "object",
4672
4712
  properties: {
4673
- task_code: { type: "string" },
4674
- phase: { type: "string" },
4675
- title: { type: "string", minLength: 3, maxLength: 100 },
4713
+ task_code: { type: "string", description: "Unique task code (e.g. TASK-001)" },
4714
+ phase: { type: "string", description: "Project phase" },
4715
+ title: { type: "string", minLength: 3, maxLength: 100, description: "Task objective" },
4676
4716
  description: {
4677
4717
  type: "string",
4678
4718
  description: "Detailed description. MUST follow format: 1. Context & Analysis, 2. Step & Implementation, 3. Acceptance & Verification"
4679
4719
  },
4680
- status: { type: "string", enum: ["backlog", "pending"], default: "backlog" },
4720
+ status: { type: "string", enum: ["backlog", "pending"], default: "backlog", description: "Task status" },
4681
4721
  priority: {
4682
4722
  type: "number",
4683
4723
  minimum: 1,
@@ -4685,11 +4725,11 @@ var TOOL_DEFINITIONS = [
4685
4725
  default: 3,
4686
4726
  description: "Task priority where 1=Low, 2=Normal, 3=Medium, 4=High, 5=Critical."
4687
4727
  },
4688
- agent: { type: "string" },
4689
- role: { type: "string" },
4690
- doc_path: { type: "string" },
4691
- tags: { type: "array", items: { type: "string" } },
4692
- metadata: { type: "object" },
4728
+ agent: { type: "string", description: "Agent assigned to this task" },
4729
+ role: { type: "string", description: "Role of the assigned agent" },
4730
+ doc_path: { type: "string", description: "Path to related documentation file" },
4731
+ tags: { type: "array", items: { type: "string" }, description: "Tags for categorization" },
4732
+ metadata: { type: "object", description: "Structured metadata for additional context" },
4693
4733
  parent_id: {
4694
4734
  type: "string",
4695
4735
  description: "Optional parent task ID (UUID) or parent task code (e.g. TASK-001). Resolved to UUID before storing."
@@ -4706,7 +4746,7 @@ var TOOL_DEFINITIONS = [
4706
4746
  },
4707
4747
  structured: { type: "boolean", default: false, description: "If true, returns structured JSON result." }
4708
4748
  },
4709
- required: ["repo"]
4749
+ required: ["owner", "repo"]
4710
4750
  },
4711
4751
  outputSchema: {
4712
4752
  type: "object",
@@ -4737,6 +4777,7 @@ var TOOL_DEFINITIONS = [
4737
4777
  inputSchema: {
4738
4778
  type: "object",
4739
4779
  properties: {
4780
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4740
4781
  repo: { type: "string", description: "Repository name" },
4741
4782
  id: { type: "string", format: "uuid", description: "Task ID (for single update)" },
4742
4783
  ids: { type: "array", items: { type: "string", format: "uuid" }, description: "Task IDs (for bulk update)" },
@@ -4796,7 +4837,7 @@ var TOOL_DEFINITIONS = [
4796
4837
  },
4797
4838
  structured: { type: "boolean", default: false, description: "If true, returns structured JSON result." }
4798
4839
  },
4799
- required: ["repo"]
4840
+ required: ["repo", "owner"]
4800
4841
  },
4801
4842
  outputSchema: {
4802
4843
  type: "object",
@@ -4829,6 +4870,7 @@ var TOOL_DEFINITIONS = [
4829
4870
  inputSchema: {
4830
4871
  type: "object",
4831
4872
  properties: {
4873
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4832
4874
  repo: { type: "string", description: "Repository name" },
4833
4875
  id: {
4834
4876
  type: "string",
@@ -4839,7 +4881,7 @@ var TOOL_DEFINITIONS = [
4839
4881
  task_code: { type: "string", description: "Task code (e.g. TASK-001). Optional if id is provided." },
4840
4882
  structured: { type: "boolean", default: false, description: "If true, returns structured JSON result." }
4841
4883
  },
4842
- required: ["repo"]
4884
+ required: ["repo", "owner"]
4843
4885
  },
4844
4886
  outputSchema: {
4845
4887
  type: "object",
@@ -4866,9 +4908,10 @@ var TOOL_DEFINITIONS = [
4866
4908
  inputSchema: {
4867
4909
  type: "object",
4868
4910
  properties: {
4911
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4869
4912
  repo: {
4870
4913
  type: "string",
4871
- description: "Repository name (required)"
4914
+ description: "Repository/project name (required)"
4872
4915
  },
4873
4916
  status: {
4874
4917
  type: "string",
@@ -4902,7 +4945,7 @@ var TOOL_DEFINITIONS = [
4902
4945
  description: "If true, returns structured JSON without the text content summary."
4903
4946
  }
4904
4947
  },
4905
- required: ["repo"]
4948
+ required: ["owner", "repo"]
4906
4949
  },
4907
4950
  outputSchema: {
4908
4951
  type: "object",
@@ -4942,7 +4985,8 @@ var TOOL_DEFINITIONS = [
4942
4985
  inputSchema: {
4943
4986
  type: "object",
4944
4987
  properties: {
4945
- repo: { type: "string", description: "Repository name" },
4988
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
4989
+ repo: { type: "string", description: "Repository/project name" },
4946
4990
  query: {
4947
4991
  type: "string",
4948
4992
  minLength: 1,
@@ -4955,7 +4999,7 @@ var TOOL_DEFINITIONS = [
4955
4999
  offset: { type: "number", minimum: 0, default: 0 },
4956
5000
  structured: { type: "boolean", default: false, description: "If true, returns structured JSON result." }
4957
5001
  },
4958
- required: ["repo", "query"]
5002
+ required: ["owner", "repo", "query"]
4959
5003
  },
4960
5004
  outputSchema: {
4961
5005
  type: "object",
@@ -4999,7 +5043,8 @@ var TOOL_DEFINITIONS = [
4999
5043
  inputSchema: {
5000
5044
  type: "object",
5001
5045
  properties: {
5002
- repo: { type: "string", description: "Repository name" },
5046
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
5047
+ repo: { type: "string", description: "Repository/project name" },
5003
5048
  from_agent: { type: "string", description: "Agent creating the handoff" },
5004
5049
  to_agent: { type: "string", description: "Optional target agent" },
5005
5050
  task_id: { type: "string", format: "uuid", description: "Optional task id to associate" },
@@ -5012,7 +5057,7 @@ var TOOL_DEFINITIONS = [
5012
5057
  expires_at: { type: "string", description: "Optional expiration timestamp" },
5013
5058
  structured: { type: "boolean", default: false }
5014
5059
  },
5015
- required: ["repo", "from_agent", "summary"]
5060
+ required: ["owner", "repo", "from_agent", "summary"]
5016
5061
  },
5017
5062
  outputSchema: {
5018
5063
  type: "object",
@@ -5073,7 +5118,8 @@ var TOOL_DEFINITIONS = [
5073
5118
  inputSchema: {
5074
5119
  type: "object",
5075
5120
  properties: {
5076
- repo: { type: "string", description: "Repository name" },
5121
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
5122
+ repo: { type: "string", description: "Repository/project name" },
5077
5123
  status: { type: "string", enum: ["pending", "accepted", "rejected", "expired"] },
5078
5124
  from_agent: { type: "string" },
5079
5125
  to_agent: { type: "string" },
@@ -5081,7 +5127,7 @@ var TOOL_DEFINITIONS = [
5081
5127
  offset: { type: "number", minimum: 0, default: 0 },
5082
5128
  structured: { type: "boolean", default: false }
5083
5129
  },
5084
- required: ["repo"]
5130
+ required: ["owner", "repo"]
5085
5131
  },
5086
5132
  outputSchema: {
5087
5133
  type: "object",
@@ -5122,7 +5168,8 @@ var TOOL_DEFINITIONS = [
5122
5168
  inputSchema: {
5123
5169
  type: "object",
5124
5170
  properties: {
5125
- repo: { type: "string", description: "Repository name" },
5171
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
5172
+ repo: { type: "string", description: "Repository/project name" },
5126
5173
  task_id: {
5127
5174
  type: "string",
5128
5175
  format: "uuid",
@@ -5134,7 +5181,7 @@ var TOOL_DEFINITIONS = [
5134
5181
  metadata: { type: "object", description: "Optional claim metadata" },
5135
5182
  structured: { type: "boolean", default: false }
5136
5183
  },
5137
- required: ["repo", "agent"]
5184
+ required: ["owner", "repo", "agent"]
5138
5185
  },
5139
5186
  outputSchema: {
5140
5187
  type: "object",
@@ -5165,14 +5212,15 @@ var TOOL_DEFINITIONS = [
5165
5212
  inputSchema: {
5166
5213
  type: "object",
5167
5214
  properties: {
5168
- repo: { type: "string", description: "Repository name" },
5215
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
5216
+ repo: { type: "string", description: "Repository/project name" },
5169
5217
  agent: { type: "string", description: "Optional agent filter" },
5170
5218
  active_only: { type: "boolean", description: "When true, return only unreleased claims" },
5171
5219
  limit: { type: "number", minimum: 1, maximum: 100, default: 20 },
5172
5220
  offset: { type: "number", minimum: 0, default: 0 },
5173
5221
  structured: { type: "boolean", default: false }
5174
5222
  },
5175
- required: ["repo"]
5223
+ required: ["owner", "repo"]
5176
5224
  },
5177
5225
  outputSchema: {
5178
5226
  type: "object",
@@ -5213,6 +5261,7 @@ var TOOL_DEFINITIONS = [
5213
5261
  inputSchema: {
5214
5262
  type: "object",
5215
5263
  properties: {
5264
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
5216
5265
  repo: { type: "string", description: "Repository name" },
5217
5266
  task_id: {
5218
5267
  type: "string",
@@ -5223,7 +5272,7 @@ var TOOL_DEFINITIONS = [
5223
5272
  agent: { type: "string", description: "Optional agent name to release only that claim" },
5224
5273
  structured: { type: "boolean", default: false }
5225
5274
  },
5226
- required: ["repo"]
5275
+ required: ["repo", "owner"]
5227
5276
  },
5228
5277
  outputSchema: {
5229
5278
  type: "object",
@@ -5250,6 +5299,7 @@ var TOOL_DEFINITIONS = [
5250
5299
  inputSchema: {
5251
5300
  type: "object",
5252
5301
  properties: {
5302
+ owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
5253
5303
  name: { type: "string", minLength: 3, maxLength: 255, description: "Human-readable standard name" },
5254
5304
  content: {
5255
5305
  type: "string",
@@ -5307,7 +5357,8 @@ var TOOL_DEFINITIONS = [
5307
5357
  description: "Array of standards for bulk creation"
5308
5358
  },
5309
5359
  structured: { type: "boolean", default: false }
5310
- }
5360
+ },
5361
+ required: ["owner"]
5311
5362
  },
5312
5363
  outputSchema: {
5313
5364
  type: "object",
@@ -5950,12 +6001,14 @@ async function getPrompt(name, args = {}, db, session) {
5950
6001
  throw new Error(`Prompt not found: ${name}`);
5951
6002
  }
5952
6003
  const inferredRepo = inferRepoFromSession(session);
6004
+ const inferredOwner = inferOwnerFromSession(session);
5953
6005
  const messages = prompt.messages.map((m) => {
5954
6006
  let text = m.content.text;
5955
6007
  for (const [key, value] of Object.entries(args)) {
5956
6008
  text = text.replace(new RegExp(`\\{{${key}\\}}`, "g"), value);
5957
6009
  }
5958
6010
  text = text.replace(/{{current_repo}}/g, inferredRepo || "unknown-repo");
6011
+ text = text.replace(/{{current_owner}}/g, inferredOwner || "unknown-owner");
5959
6012
  return {
5960
6013
  ...m,
5961
6014
  content: {
@@ -6261,7 +6314,7 @@ async function handleTaskClaim(args, storage) {
6261
6314
  storage.taskComments.insertTaskComment({
6262
6315
  id: randomUUID2(),
6263
6316
  task_id: task.id,
6264
- owner: repo,
6317
+ owner,
6265
6318
  repo,
6266
6319
  comment: `Claimed by ${agent} \u2014 auto-promoted to in_progress`,
6267
6320
  agent,
@@ -6397,6 +6450,7 @@ export {
6397
6450
  addLogSink,
6398
6451
  LOG_LEVEL_VALUES,
6399
6452
  createFileSink,
6453
+ parseRepoInput,
6400
6454
  normalizeRepo,
6401
6455
  SQLiteStore,
6402
6456
  RealVectorStore,
@@ -6436,6 +6490,7 @@ export {
6436
6490
  isPathWithinRoots,
6437
6491
  findContainingRoot,
6438
6492
  inferRepoFromSession,
6493
+ inferOwnerFromSession,
6439
6494
  PROMPTS,
6440
6495
  listPrompts,
6441
6496
  getPrompt,
@@ -16,7 +16,7 @@ import {
16
16
  handleTaskClaim,
17
17
  listResources,
18
18
  logger
19
- } from "../chunk-SITVJ6EA.js";
19
+ } from "../chunk-LEXNGJHN.js";
20
20
 
21
21
  // src/dashboard/server.ts
22
22
  import express from "express";
@@ -48,6 +48,7 @@ import {
48
48
  handleHandoffList,
49
49
  handleHandoffUpdate,
50
50
  handleTaskClaim,
51
+ inferOwnerFromSession,
51
52
  inferRepoFromSession,
52
53
  isPathWithinRoots,
53
54
  listPrompts,
@@ -55,12 +56,13 @@ import {
55
56
  listResources,
56
57
  logger,
57
58
  normalizeRepo,
59
+ parseRepoInput,
58
60
  readResource,
59
61
  setLogLevel,
60
62
  toContextSlug,
61
63
  updateSessionFromInitialize,
62
64
  updateSessionRoots
63
- } from "../chunk-SITVJ6EA.js";
65
+ } from "../chunk-LEXNGJHN.js";
64
66
 
65
67
  // src/mcp/server.ts
66
68
  import readline from "readline";
@@ -1305,7 +1307,7 @@ async function handleTaskUpdate(args, storage, vectors2) {
1305
1307
  throw new Error("est_tokens is required when changing task status to completed");
1306
1308
  }
1307
1309
  }
1308
- if (updates.task_code && storage.tasks.isTaskCodeDuplicate(repo, updates.task_code, targetId)) {
1310
+ if (updates.task_code && storage.tasks.isTaskCodeDuplicate(owner, repo, updates.task_code, targetId)) {
1309
1311
  throw new Error(`Duplicate task_code: '${updates.task_code}' already exists`);
1310
1312
  }
1311
1313
  const finalUpdates = { ...updates };
@@ -2804,6 +2806,29 @@ function normalizeToolArguments(args, session2) {
2804
2806
  if (scope && !scope.repo) {
2805
2807
  scope.repo = nextArgs.repo ?? inferRepoFromSession(session2);
2806
2808
  }
2809
+ if (!nextArgs.owner) {
2810
+ const repoVal2 = nextArgs.repo || "";
2811
+ const parsed = parseRepoInput(repoVal2, void 0);
2812
+ nextArgs.owner = parsed.owner || inferOwnerFromSession(session2) || "";
2813
+ }
2814
+ if (scope && !scope.owner) {
2815
+ const repoVal2 = scope.repo || nextArgs.repo || "";
2816
+ const parsed = parseRepoInput(repoVal2, void 0);
2817
+ scope.owner = parsed.owner || nextArgs.owner || inferOwnerFromSession(session2) || "";
2818
+ }
2819
+ const ownerVal = nextArgs.owner || inferOwnerFromSession(session2) || "";
2820
+ const repoVal = nextArgs.repo || inferRepoFromSession(session2) || "";
2821
+ const memories = nextArgs.memories;
2822
+ if (memories) {
2823
+ for (const mem of memories) {
2824
+ const memScope = mem.scope;
2825
+ if (memScope) {
2826
+ if (!memScope.owner)
2827
+ memScope.owner = ownerVal || parseRepoInput(memScope.repo || repoVal, void 0).owner || "";
2828
+ if (!memScope.repo) memScope.repo = repoVal;
2829
+ }
2830
+ }
2831
+ }
2807
2832
  if (typeof nextArgs.current_file_path === "string" && scope) {
2808
2833
  const containingRoot = path2.isAbsolute(nextArgs.current_file_path) ? findContainingRoot(nextArgs.current_file_path, session2) : null;
2809
2834
  if (containingRoot) {
@@ -65,4 +65,4 @@ If you refuse, return exactly:
65
65
  }
66
66
  ```
67
67
 
68
- Path: {{path}} Repo: {{current_repo}}
68
+ Path: {{path}} Owner: {{current_owner}} Repo: {{current_repo}}
@@ -70,4 +70,4 @@ If you refuse, return exactly:
70
70
  }
71
71
  ```
72
72
 
73
- Source: {{source_url}} Repo: {{current_repo}}
73
+ Source: {{source_url}} Owner: {{current_owner}} Repo: {{current_repo}}
@@ -5,6 +5,15 @@ description: Main instructions for the MCP server
5
5
 
6
6
  Local Memory MCP — persistent memory, task coordination, and coding standards for AI agents.
7
7
 
8
+ ## Data Scoping
9
+
10
+ All data (memories, tasks, handoffs, claims) is scoped by **owner/repo**:
11
+
12
+ - **owner** = organization/namespace (e.g., GitHub org, username)
13
+ - **repo** = project/repository name
14
+
15
+ Pass both `owner` and `repo` whenever a tool requires them. The `owner/repo` pair forms the unique data boundary.
16
+
8
17
  ## Session Start Mode
9
18
 
10
19
  Entry=orient → hydrate → ready Guard: S(N) req S(N-1)✅
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vheins/local-memory-mcp",
3
- "version": "0.17.0",
3
+ "version": "0.18.1",
4
4
  "description": "MCP Local Memory Service for coding copilot agents",
5
5
  "mcpName": "io.github.vheins/local-memory-mcp",
6
6
  "type": "module",