@vheins/local-memory-mcp 0.17.0 → 0.18.0
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.
|
|
85
|
-
pkgVersion = "0.
|
|
84
|
+
if ("0.18.0") {
|
|
85
|
+
pkgVersion = "0.18.0";
|
|
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";
|
|
@@ -3991,7 +4001,8 @@ var TOOL_DEFINITIONS = [
|
|
|
3991
4001
|
inputSchema: {
|
|
3992
4002
|
type: "object",
|
|
3993
4003
|
properties: {
|
|
3994
|
-
|
|
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."
|
|
@@ -4171,12 +4186,13 @@ var TOOL_DEFINITIONS = [
|
|
|
4171
4186
|
scope: {
|
|
4172
4187
|
type: "object",
|
|
4173
4188
|
properties: {
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
|
|
4177
|
-
|
|
4189
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
4190
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
4191
|
+
branch: { type: "string", description: "Git branch this memory relates to" },
|
|
4192
|
+
folder: { type: "string", description: "Subdirectory within the repo" },
|
|
4193
|
+
language: { type: "string", description: "Programming language (e.g., 'typescript', 'python')" }
|
|
4178
4194
|
},
|
|
4179
|
-
required: ["repo"]
|
|
4195
|
+
required: ["owner", "repo"]
|
|
4180
4196
|
},
|
|
4181
4197
|
tags: {
|
|
4182
4198
|
type: "array",
|
|
@@ -4191,7 +4207,11 @@ var TOOL_DEFINITIONS = [
|
|
|
4191
4207
|
type: "boolean",
|
|
4192
4208
|
description: "If true, this memory is shared across all repositories"
|
|
4193
4209
|
},
|
|
4194
|
-
ttlDays: {
|
|
4210
|
+
ttlDays: {
|
|
4211
|
+
type: "number",
|
|
4212
|
+
minimum: 1,
|
|
4213
|
+
description: "Time-to-live in days. After this period, the memory expires."
|
|
4214
|
+
},
|
|
4195
4215
|
supersedes: {
|
|
4196
4216
|
type: "string",
|
|
4197
4217
|
description: "Optional memory ID (UUID) or memory code to supersede. Resolved before storing."
|
|
@@ -4201,29 +4221,34 @@ var TOOL_DEFINITIONS = [
|
|
|
4201
4221
|
items: {
|
|
4202
4222
|
type: "object",
|
|
4203
4223
|
properties: {
|
|
4204
|
-
type: {
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4224
|
+
type: {
|
|
4225
|
+
type: "string",
|
|
4226
|
+
enum: ["code_fact", "decision", "mistake", "pattern", "task_archive"],
|
|
4227
|
+
description: "Type of durable knowledge being stored"
|
|
4228
|
+
},
|
|
4229
|
+
title: { type: "string", minLength: 3, maxLength: 100, description: "Short human-readable title" },
|
|
4230
|
+
content: { type: "string", minLength: 10, description: "The memory content" },
|
|
4231
|
+
importance: { type: "number", minimum: 1, maximum: 5, description: "Importance score (1-5)" },
|
|
4232
|
+
agent: { type: "string", description: "Name of the agent creating this memory" },
|
|
4233
|
+
role: { type: "string", default: "unknown", description: "Role of the agent creating this memory" },
|
|
4234
|
+
model: { type: "string", description: "AI model used by the agent" },
|
|
4211
4235
|
scope: {
|
|
4212
4236
|
type: "object",
|
|
4213
4237
|
properties: {
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4238
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
4239
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
4240
|
+
branch: { type: "string", description: "Git branch this memory relates to" },
|
|
4241
|
+
folder: { type: "string", description: "Subdirectory within the repo" },
|
|
4242
|
+
language: { type: "string", description: "Programming language" }
|
|
4218
4243
|
},
|
|
4219
|
-
required: ["repo"]
|
|
4244
|
+
required: ["owner", "repo"]
|
|
4220
4245
|
},
|
|
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 }
|
|
4246
|
+
code: { type: "string", description: "Optional custom code. Auto-generated if omitted." },
|
|
4247
|
+
ttlDays: { type: "number", minimum: 1, description: "Time-to-live in days" },
|
|
4248
|
+
supersedes: { type: "string", description: "UUID or code of a memory this entry replaces" },
|
|
4249
|
+
tags: { type: "array", items: { type: "string" }, description: "Technology stack tags" },
|
|
4250
|
+
metadata: { type: "object", description: "Structured metadata for non-title context" },
|
|
4251
|
+
is_global: { type: "boolean", default: false, description: "If true, shared across all repositories" }
|
|
4227
4252
|
},
|
|
4228
4253
|
required: ["type", "title", "content", "importance", "agent", "model", "scope"]
|
|
4229
4254
|
},
|
|
@@ -4345,9 +4370,14 @@ var TOOL_DEFINITIONS = [
|
|
|
4345
4370
|
inputSchema: {
|
|
4346
4371
|
type: "object",
|
|
4347
4372
|
properties: {
|
|
4348
|
-
query: {
|
|
4349
|
-
|
|
4350
|
-
|
|
4373
|
+
query: {
|
|
4374
|
+
type: "string",
|
|
4375
|
+
minLength: 3,
|
|
4376
|
+
description: "Search keyword to match against memory titles and content"
|
|
4377
|
+
},
|
|
4378
|
+
prompt: { type: "string", description: "Natural language prompt for semantic search" },
|
|
4379
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
4380
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
4351
4381
|
current_tags: {
|
|
4352
4382
|
type: "array",
|
|
4353
4383
|
items: { type: "string" },
|
|
@@ -4358,21 +4388,27 @@ var TOOL_DEFINITIONS = [
|
|
|
4358
4388
|
items: {
|
|
4359
4389
|
type: "string",
|
|
4360
4390
|
enum: ["code_fact", "decision", "mistake", "pattern", "task_archive"]
|
|
4361
|
-
}
|
|
4391
|
+
},
|
|
4392
|
+
description: "Filter by memory type(s)"
|
|
4362
4393
|
},
|
|
4363
|
-
minImportance: { type: "number", minimum: 1, maximum: 5 },
|
|
4394
|
+
minImportance: { type: "number", minimum: 1, maximum: 5, description: "Minimum importance threshold (1-5)" },
|
|
4364
4395
|
limit: { type: "number", minimum: 1, maximum: 100, default: 5 },
|
|
4365
4396
|
offset: { type: "number", minimum: 0, default: 0 },
|
|
4366
4397
|
includeRecap: { type: "boolean", default: false },
|
|
4367
|
-
current_file_path: { type: "string" },
|
|
4368
|
-
include_archived: {
|
|
4398
|
+
current_file_path: { type: "string", description: "Absolute file path for workspace-local grounding" },
|
|
4399
|
+
include_archived: {
|
|
4400
|
+
type: "boolean",
|
|
4401
|
+
default: false,
|
|
4402
|
+
description: "Include archived/expired memories in results"
|
|
4403
|
+
},
|
|
4369
4404
|
scope: {
|
|
4370
4405
|
type: "object",
|
|
4371
4406
|
properties: {
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4407
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
4408
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
4409
|
+
branch: { type: "string", description: "Git branch filter" },
|
|
4410
|
+
folder: { type: "string", description: "Subdirectory filter" },
|
|
4411
|
+
language: { type: "string", description: "Programming language filter" }
|
|
4376
4412
|
}
|
|
4377
4413
|
},
|
|
4378
4414
|
structured: {
|
|
@@ -4381,7 +4417,7 @@ var TOOL_DEFINITIONS = [
|
|
|
4381
4417
|
description: "If true, returns structured JSON without the text content summary."
|
|
4382
4418
|
}
|
|
4383
4419
|
},
|
|
4384
|
-
required: ["query", "repo"]
|
|
4420
|
+
required: ["owner", "query", "repo"]
|
|
4385
4421
|
},
|
|
4386
4422
|
outputSchema: {
|
|
4387
4423
|
type: "object",
|
|
@@ -4424,7 +4460,8 @@ var TOOL_DEFINITIONS = [
|
|
|
4424
4460
|
inputSchema: {
|
|
4425
4461
|
type: "object",
|
|
4426
4462
|
properties: {
|
|
4427
|
-
|
|
4463
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
4464
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
4428
4465
|
signals: {
|
|
4429
4466
|
type: "array",
|
|
4430
4467
|
items: { type: "string", maxLength: 200 },
|
|
@@ -4433,7 +4470,7 @@ var TOOL_DEFINITIONS = [
|
|
|
4433
4470
|
},
|
|
4434
4471
|
structured: { type: "boolean", default: false, description: "If true, returns structured JSON of the summary." }
|
|
4435
4472
|
},
|
|
4436
|
-
required: ["repo", "signals"]
|
|
4473
|
+
required: ["owner", "repo", "signals"]
|
|
4437
4474
|
},
|
|
4438
4475
|
outputSchema: {
|
|
4439
4476
|
type: "object",
|
|
@@ -4552,7 +4589,8 @@ var TOOL_DEFINITIONS = [
|
|
|
4552
4589
|
inputSchema: {
|
|
4553
4590
|
type: "object",
|
|
4554
4591
|
properties: {
|
|
4555
|
-
|
|
4592
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
4593
|
+
repo: { type: "string", description: "Repository/project name (required)" },
|
|
4556
4594
|
limit: {
|
|
4557
4595
|
type: "number",
|
|
4558
4596
|
minimum: 1,
|
|
@@ -4572,7 +4610,7 @@ var TOOL_DEFINITIONS = [
|
|
|
4572
4610
|
description: "If true, returns structured JSON without the text content summary."
|
|
4573
4611
|
}
|
|
4574
4612
|
},
|
|
4575
|
-
required: ["repo"]
|
|
4613
|
+
required: ["owner", "repo"]
|
|
4576
4614
|
},
|
|
4577
4615
|
outputSchema: {
|
|
4578
4616
|
type: "object",
|
|
@@ -4625,7 +4663,8 @@ var TOOL_DEFINITIONS = [
|
|
|
4625
4663
|
inputSchema: {
|
|
4626
4664
|
type: "object",
|
|
4627
4665
|
properties: {
|
|
4628
|
-
|
|
4666
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
4667
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
4629
4668
|
task_code: { type: "string", description: "Unique task code (e.g. TASK-001) (Required for single task)" },
|
|
4630
4669
|
phase: { type: "string", description: "Project phase (Required for single task)" },
|
|
4631
4670
|
title: {
|
|
@@ -4651,11 +4690,11 @@ var TOOL_DEFINITIONS = [
|
|
|
4651
4690
|
default: 3,
|
|
4652
4691
|
description: "Task priority where 1=Low, 2=Normal, 3=Medium, 4=High, 5=Critical."
|
|
4653
4692
|
},
|
|
4654
|
-
agent: { type: "string" },
|
|
4655
|
-
role: { type: "string" },
|
|
4656
|
-
doc_path: { type: "string" },
|
|
4657
|
-
tags: { type: "array", items: { type: "string" } },
|
|
4658
|
-
metadata: { type: "object" },
|
|
4693
|
+
agent: { type: "string", description: "Agent assigned to this task" },
|
|
4694
|
+
role: { type: "string", description: "Role of the assigned agent" },
|
|
4695
|
+
doc_path: { type: "string", description: "Path to related documentation file" },
|
|
4696
|
+
tags: { type: "array", items: { type: "string" }, description: "Tags for categorization" },
|
|
4697
|
+
metadata: { type: "object", description: "Structured metadata for additional context" },
|
|
4659
4698
|
parent_id: {
|
|
4660
4699
|
type: "string",
|
|
4661
4700
|
description: "Optional parent task ID (UUID) or parent task code (e.g. TASK-001). Resolved to UUID before storing."
|
|
@@ -4670,14 +4709,14 @@ var TOOL_DEFINITIONS = [
|
|
|
4670
4709
|
items: {
|
|
4671
4710
|
type: "object",
|
|
4672
4711
|
properties: {
|
|
4673
|
-
task_code: { type: "string" },
|
|
4674
|
-
phase: { type: "string" },
|
|
4675
|
-
title: { type: "string", minLength: 3, maxLength: 100 },
|
|
4712
|
+
task_code: { type: "string", description: "Unique task code (e.g. TASK-001)" },
|
|
4713
|
+
phase: { type: "string", description: "Project phase" },
|
|
4714
|
+
title: { type: "string", minLength: 3, maxLength: 100, description: "Task objective" },
|
|
4676
4715
|
description: {
|
|
4677
4716
|
type: "string",
|
|
4678
4717
|
description: "Detailed description. MUST follow format: 1. Context & Analysis, 2. Step & Implementation, 3. Acceptance & Verification"
|
|
4679
4718
|
},
|
|
4680
|
-
status: { type: "string", enum: ["backlog", "pending"], default: "backlog" },
|
|
4719
|
+
status: { type: "string", enum: ["backlog", "pending"], default: "backlog", description: "Task status" },
|
|
4681
4720
|
priority: {
|
|
4682
4721
|
type: "number",
|
|
4683
4722
|
minimum: 1,
|
|
@@ -4685,11 +4724,11 @@ var TOOL_DEFINITIONS = [
|
|
|
4685
4724
|
default: 3,
|
|
4686
4725
|
description: "Task priority where 1=Low, 2=Normal, 3=Medium, 4=High, 5=Critical."
|
|
4687
4726
|
},
|
|
4688
|
-
agent: { type: "string" },
|
|
4689
|
-
role: { type: "string" },
|
|
4690
|
-
doc_path: { type: "string" },
|
|
4691
|
-
tags: { type: "array", items: { type: "string" } },
|
|
4692
|
-
metadata: { type: "object" },
|
|
4727
|
+
agent: { type: "string", description: "Agent assigned to this task" },
|
|
4728
|
+
role: { type: "string", description: "Role of the assigned agent" },
|
|
4729
|
+
doc_path: { type: "string", description: "Path to related documentation file" },
|
|
4730
|
+
tags: { type: "array", items: { type: "string" }, description: "Tags for categorization" },
|
|
4731
|
+
metadata: { type: "object", description: "Structured metadata for additional context" },
|
|
4693
4732
|
parent_id: {
|
|
4694
4733
|
type: "string",
|
|
4695
4734
|
description: "Optional parent task ID (UUID) or parent task code (e.g. TASK-001). Resolved to UUID before storing."
|
|
@@ -4706,7 +4745,7 @@ var TOOL_DEFINITIONS = [
|
|
|
4706
4745
|
},
|
|
4707
4746
|
structured: { type: "boolean", default: false, description: "If true, returns structured JSON result." }
|
|
4708
4747
|
},
|
|
4709
|
-
required: ["repo"]
|
|
4748
|
+
required: ["owner", "repo"]
|
|
4710
4749
|
},
|
|
4711
4750
|
outputSchema: {
|
|
4712
4751
|
type: "object",
|
|
@@ -4866,9 +4905,10 @@ var TOOL_DEFINITIONS = [
|
|
|
4866
4905
|
inputSchema: {
|
|
4867
4906
|
type: "object",
|
|
4868
4907
|
properties: {
|
|
4908
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
4869
4909
|
repo: {
|
|
4870
4910
|
type: "string",
|
|
4871
|
-
description: "Repository name (required)"
|
|
4911
|
+
description: "Repository/project name (required)"
|
|
4872
4912
|
},
|
|
4873
4913
|
status: {
|
|
4874
4914
|
type: "string",
|
|
@@ -4902,7 +4942,7 @@ var TOOL_DEFINITIONS = [
|
|
|
4902
4942
|
description: "If true, returns structured JSON without the text content summary."
|
|
4903
4943
|
}
|
|
4904
4944
|
},
|
|
4905
|
-
required: ["repo"]
|
|
4945
|
+
required: ["owner", "repo"]
|
|
4906
4946
|
},
|
|
4907
4947
|
outputSchema: {
|
|
4908
4948
|
type: "object",
|
|
@@ -4942,7 +4982,8 @@ var TOOL_DEFINITIONS = [
|
|
|
4942
4982
|
inputSchema: {
|
|
4943
4983
|
type: "object",
|
|
4944
4984
|
properties: {
|
|
4945
|
-
|
|
4985
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
4986
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
4946
4987
|
query: {
|
|
4947
4988
|
type: "string",
|
|
4948
4989
|
minLength: 1,
|
|
@@ -4955,7 +4996,7 @@ var TOOL_DEFINITIONS = [
|
|
|
4955
4996
|
offset: { type: "number", minimum: 0, default: 0 },
|
|
4956
4997
|
structured: { type: "boolean", default: false, description: "If true, returns structured JSON result." }
|
|
4957
4998
|
},
|
|
4958
|
-
required: ["repo", "query"]
|
|
4999
|
+
required: ["owner", "repo", "query"]
|
|
4959
5000
|
},
|
|
4960
5001
|
outputSchema: {
|
|
4961
5002
|
type: "object",
|
|
@@ -4999,7 +5040,8 @@ var TOOL_DEFINITIONS = [
|
|
|
4999
5040
|
inputSchema: {
|
|
5000
5041
|
type: "object",
|
|
5001
5042
|
properties: {
|
|
5002
|
-
|
|
5043
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
5044
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
5003
5045
|
from_agent: { type: "string", description: "Agent creating the handoff" },
|
|
5004
5046
|
to_agent: { type: "string", description: "Optional target agent" },
|
|
5005
5047
|
task_id: { type: "string", format: "uuid", description: "Optional task id to associate" },
|
|
@@ -5012,7 +5054,7 @@ var TOOL_DEFINITIONS = [
|
|
|
5012
5054
|
expires_at: { type: "string", description: "Optional expiration timestamp" },
|
|
5013
5055
|
structured: { type: "boolean", default: false }
|
|
5014
5056
|
},
|
|
5015
|
-
required: ["repo", "from_agent", "summary"]
|
|
5057
|
+
required: ["owner", "repo", "from_agent", "summary"]
|
|
5016
5058
|
},
|
|
5017
5059
|
outputSchema: {
|
|
5018
5060
|
type: "object",
|
|
@@ -5073,7 +5115,8 @@ var TOOL_DEFINITIONS = [
|
|
|
5073
5115
|
inputSchema: {
|
|
5074
5116
|
type: "object",
|
|
5075
5117
|
properties: {
|
|
5076
|
-
|
|
5118
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
5119
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
5077
5120
|
status: { type: "string", enum: ["pending", "accepted", "rejected", "expired"] },
|
|
5078
5121
|
from_agent: { type: "string" },
|
|
5079
5122
|
to_agent: { type: "string" },
|
|
@@ -5081,7 +5124,7 @@ var TOOL_DEFINITIONS = [
|
|
|
5081
5124
|
offset: { type: "number", minimum: 0, default: 0 },
|
|
5082
5125
|
structured: { type: "boolean", default: false }
|
|
5083
5126
|
},
|
|
5084
|
-
required: ["repo"]
|
|
5127
|
+
required: ["owner", "repo"]
|
|
5085
5128
|
},
|
|
5086
5129
|
outputSchema: {
|
|
5087
5130
|
type: "object",
|
|
@@ -5122,7 +5165,8 @@ var TOOL_DEFINITIONS = [
|
|
|
5122
5165
|
inputSchema: {
|
|
5123
5166
|
type: "object",
|
|
5124
5167
|
properties: {
|
|
5125
|
-
|
|
5168
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
5169
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
5126
5170
|
task_id: {
|
|
5127
5171
|
type: "string",
|
|
5128
5172
|
format: "uuid",
|
|
@@ -5134,7 +5178,7 @@ var TOOL_DEFINITIONS = [
|
|
|
5134
5178
|
metadata: { type: "object", description: "Optional claim metadata" },
|
|
5135
5179
|
structured: { type: "boolean", default: false }
|
|
5136
5180
|
},
|
|
5137
|
-
required: ["repo", "agent"]
|
|
5181
|
+
required: ["owner", "repo", "agent"]
|
|
5138
5182
|
},
|
|
5139
5183
|
outputSchema: {
|
|
5140
5184
|
type: "object",
|
|
@@ -5165,14 +5209,15 @@ var TOOL_DEFINITIONS = [
|
|
|
5165
5209
|
inputSchema: {
|
|
5166
5210
|
type: "object",
|
|
5167
5211
|
properties: {
|
|
5168
|
-
|
|
5212
|
+
owner: { type: "string", description: "Organization/namespace (e.g., GitHub org or username)" },
|
|
5213
|
+
repo: { type: "string", description: "Repository/project name" },
|
|
5169
5214
|
agent: { type: "string", description: "Optional agent filter" },
|
|
5170
5215
|
active_only: { type: "boolean", description: "When true, return only unreleased claims" },
|
|
5171
5216
|
limit: { type: "number", minimum: 1, maximum: 100, default: 20 },
|
|
5172
5217
|
offset: { type: "number", minimum: 0, default: 0 },
|
|
5173
5218
|
structured: { type: "boolean", default: false }
|
|
5174
5219
|
},
|
|
5175
|
-
required: ["repo"]
|
|
5220
|
+
required: ["owner", "repo"]
|
|
5176
5221
|
},
|
|
5177
5222
|
outputSchema: {
|
|
5178
5223
|
type: "object",
|
|
@@ -5950,12 +5995,14 @@ async function getPrompt(name, args = {}, db, session) {
|
|
|
5950
5995
|
throw new Error(`Prompt not found: ${name}`);
|
|
5951
5996
|
}
|
|
5952
5997
|
const inferredRepo = inferRepoFromSession(session);
|
|
5998
|
+
const inferredOwner = inferOwnerFromSession(session);
|
|
5953
5999
|
const messages = prompt.messages.map((m) => {
|
|
5954
6000
|
let text = m.content.text;
|
|
5955
6001
|
for (const [key, value] of Object.entries(args)) {
|
|
5956
6002
|
text = text.replace(new RegExp(`\\{{${key}\\}}`, "g"), value);
|
|
5957
6003
|
}
|
|
5958
6004
|
text = text.replace(/{{current_repo}}/g, inferredRepo || "unknown-repo");
|
|
6005
|
+
text = text.replace(/{{current_owner}}/g, inferredOwner || "unknown-owner");
|
|
5959
6006
|
return {
|
|
5960
6007
|
...m,
|
|
5961
6008
|
content: {
|
|
@@ -6397,6 +6444,7 @@ export {
|
|
|
6397
6444
|
addLogSink,
|
|
6398
6445
|
LOG_LEVEL_VALUES,
|
|
6399
6446
|
createFileSink,
|
|
6447
|
+
parseRepoInput,
|
|
6400
6448
|
normalizeRepo,
|
|
6401
6449
|
SQLiteStore,
|
|
6402
6450
|
RealVectorStore,
|
|
@@ -6436,6 +6484,7 @@ export {
|
|
|
6436
6484
|
isPathWithinRoots,
|
|
6437
6485
|
findContainingRoot,
|
|
6438
6486
|
inferRepoFromSession,
|
|
6487
|
+
inferOwnerFromSession,
|
|
6439
6488
|
PROMPTS,
|
|
6440
6489
|
listPrompts,
|
|
6441
6490
|
getPrompt,
|
package/dist/dashboard/server.js
CHANGED
package/dist/mcp/server.js
CHANGED
|
@@ -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-
|
|
65
|
+
} from "../chunk-YVPDPZXG.js";
|
|
64
66
|
|
|
65
67
|
// src/mcp/server.ts
|
|
66
68
|
import readline from "readline";
|
|
@@ -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) {
|
|
@@ -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)✅
|