memory-journal-mcp 6.3.0 → 7.0.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.
- package/README.md +90 -75
- package/dist/{chunk-VH4SRTLB.js → chunk-2BJHLTYP.js} +1237 -97
- package/dist/{chunk-QQ2ZY3CH.js → chunk-6J4RPJ4I.js} +414 -367
- package/dist/{chunk-K2SCUSN4.js → chunk-ARLH46WS.js} +34 -3
- package/dist/cli.js +26 -4
- package/dist/github-integration-PDRLXKGM.js +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +3 -3
- package/dist/tools-FFFGXIKN.js +3 -0
- package/package.json +14 -13
- package/skills/github-commander/SKILL.md +1 -1
- package/skills/github-commander/config/project-config.example.md +1 -1
- package/dist/github-integration-DTNYAKVJ.js +0 -1
- package/dist/tools-P4XXHO3Z.js +0 -3
|
@@ -47,6 +47,33 @@ var ERROR_SUGGESTIONS = [
|
|
|
47
47
|
pattern: /malformed|invalid json|unexpected token/i,
|
|
48
48
|
suggestion: "The input appears malformed. Check the format and try again.",
|
|
49
49
|
code: "VALIDATION_FAILED"
|
|
50
|
+
},
|
|
51
|
+
// Schema / types patterns
|
|
52
|
+
{
|
|
53
|
+
pattern: /invalid input syntax for type|requires a.*column/i,
|
|
54
|
+
suggestion: "The provided value is not valid for the assigned type.",
|
|
55
|
+
code: "VALIDATION_FAILED"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
pattern: /^Missing required parameters:/i,
|
|
59
|
+
suggestion: "Provide all required parameters in your request.",
|
|
60
|
+
code: "VALIDATION_FAILED"
|
|
61
|
+
},
|
|
62
|
+
// Codemode / Sandbox patterns
|
|
63
|
+
{
|
|
64
|
+
pattern: /execution timed out/i,
|
|
65
|
+
suggestion: "Reduce code complexity or increase timeout (max 30s). Break into smaller operations.",
|
|
66
|
+
code: "QUERY_FAILED"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
pattern: /code validation failed/i,
|
|
70
|
+
suggestion: "Check for blocked patterns. Use mj.* API instead.",
|
|
71
|
+
code: "VALIDATION_FAILED"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
pattern: /sandbox.*not initialized/i,
|
|
75
|
+
suggestion: "Internal sandbox error. Retry the operation.",
|
|
76
|
+
code: "INTERNAL_ERROR"
|
|
50
77
|
}
|
|
51
78
|
];
|
|
52
79
|
function matchSuggestion(message) {
|
|
@@ -306,13 +333,11 @@ var GitHubClient = class {
|
|
|
306
333
|
apiCache = /* @__PURE__ */ new Map();
|
|
307
334
|
constructor(workingDir = ".") {
|
|
308
335
|
this.token = process.env["GITHUB_TOKEN"];
|
|
309
|
-
const
|
|
310
|
-
const effectiveDir = envRepoPath || workingDir;
|
|
336
|
+
const effectiveDir = workingDir;
|
|
311
337
|
const resolvedDir = effectiveDir === "." ? process.cwd() : effectiveDir;
|
|
312
338
|
logger.info("GitHub integration using directory", {
|
|
313
339
|
module: "GitHub",
|
|
314
340
|
workingDir,
|
|
315
|
-
envRepoPath: envRepoPath ?? "not set",
|
|
316
341
|
effectiveDir,
|
|
317
342
|
resolvedDir,
|
|
318
343
|
cwd: process.cwd()
|
|
@@ -384,6 +409,7 @@ var IssuesManager = class {
|
|
|
384
409
|
constructor(client) {
|
|
385
410
|
this.client = client;
|
|
386
411
|
}
|
|
412
|
+
client;
|
|
387
413
|
async getIssues(owner, repo, state = "open", limit = 20) {
|
|
388
414
|
if (!this.client.octokit) {
|
|
389
415
|
return [];
|
|
@@ -550,6 +576,7 @@ var PullRequestsManager = class _PullRequestsManager {
|
|
|
550
576
|
constructor(client) {
|
|
551
577
|
this.client = client;
|
|
552
578
|
}
|
|
579
|
+
client;
|
|
553
580
|
/** Known Copilot bot login patterns */
|
|
554
581
|
static COPILOT_BOT_PATTERNS = [
|
|
555
582
|
"copilot-pull-request-reviewer[bot]",
|
|
@@ -731,6 +758,7 @@ var ProjectsManager = class {
|
|
|
731
758
|
constructor(client) {
|
|
732
759
|
this.client = client;
|
|
733
760
|
}
|
|
761
|
+
client;
|
|
734
762
|
async getProjectKanban(owner, projectNumber, repo) {
|
|
735
763
|
if (!this.client.graphqlWithAuth) {
|
|
736
764
|
logger.debug("GraphQL not available - no token", { module: "GitHub" });
|
|
@@ -1045,6 +1073,7 @@ var MilestonesManager = class {
|
|
|
1045
1073
|
constructor(client) {
|
|
1046
1074
|
this.client = client;
|
|
1047
1075
|
}
|
|
1076
|
+
client;
|
|
1048
1077
|
async getMilestones(owner, repo, state = "open", limit = 20) {
|
|
1049
1078
|
if (!this.client.octokit) {
|
|
1050
1079
|
return [];
|
|
@@ -1254,6 +1283,7 @@ var InsightsManager = class {
|
|
|
1254
1283
|
constructor(client) {
|
|
1255
1284
|
this.client = client;
|
|
1256
1285
|
}
|
|
1286
|
+
client;
|
|
1257
1287
|
async getRepoStats(owner, repo) {
|
|
1258
1288
|
if (!this.client.octokit) {
|
|
1259
1289
|
return null;
|
|
@@ -1379,6 +1409,7 @@ var RepositoryManager = class {
|
|
|
1379
1409
|
constructor(client) {
|
|
1380
1410
|
this.client = client;
|
|
1381
1411
|
}
|
|
1412
|
+
client;
|
|
1382
1413
|
async getRepoInfo() {
|
|
1383
1414
|
try {
|
|
1384
1415
|
const branchResult = await this.client.git.branch();
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { VERSION, createServer } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { VERSION, createServer } from './chunk-6J4RPJ4I.js';
|
|
2
|
+
import { DEFAULT_AUDIT_LOG_MAX_SIZE_BYTES } from './chunk-2BJHLTYP.js';
|
|
3
3
|
import './chunk-OKOVZ5QE.js';
|
|
4
|
-
import { logger } from './chunk-
|
|
4
|
+
import { logger } from './chunk-ARLH46WS.js';
|
|
5
5
|
import { Command } from 'commander';
|
|
6
6
|
import * as fs from 'fs';
|
|
7
7
|
|
|
@@ -43,6 +43,16 @@ program.name("memory-journal-mcp").description("Project context management for A
|
|
|
43
43
|
"--oauth-clock-tolerance <seconds>",
|
|
44
44
|
"OAuth clock tolerance in seconds (default: 60)",
|
|
45
45
|
"60"
|
|
46
|
+
).option(
|
|
47
|
+
"--audit-log <path>",
|
|
48
|
+
'Enable audit logging to the specified JSONL file path, or "stderr" for container mode (env: AUDIT_LOG_PATH)'
|
|
49
|
+
).option("--audit-redact", "Redact tool arguments from audit entries (env: AUDIT_REDACT)").option(
|
|
50
|
+
"--audit-reads",
|
|
51
|
+
"Enable audit logging for read-scoped tool calls (default: off, env: AUDIT_READS)"
|
|
52
|
+
).option(
|
|
53
|
+
"--audit-log-max-size <bytes>",
|
|
54
|
+
"Maximum audit log file size in bytes before rotation (default: 10485760 / 10MB, env: AUDIT_LOG_MAX_SIZE)",
|
|
55
|
+
String(DEFAULT_AUDIT_LOG_MAX_SIZE_BYTES)
|
|
46
56
|
).option(
|
|
47
57
|
"--instruction-level <level>",
|
|
48
58
|
"Briefing depth: essential, standard, full (env: INSTRUCTION_LEVEL)",
|
|
@@ -97,6 +107,17 @@ program.name("memory-journal-mcp").description("Project context management for A
|
|
|
97
107
|
...host ? { host } : {}
|
|
98
108
|
});
|
|
99
109
|
try {
|
|
110
|
+
const auditLogPath = options.auditLog ?? process.env["AUDIT_LOG_PATH"];
|
|
111
|
+
const auditConfig = auditLogPath ? {
|
|
112
|
+
enabled: true,
|
|
113
|
+
logPath: auditLogPath,
|
|
114
|
+
redact: options.auditRedact ?? process.env["AUDIT_REDACT"] === "true",
|
|
115
|
+
auditReads: options.auditReads ?? process.env["AUDIT_READS"] === "true",
|
|
116
|
+
maxSizeBytes: parseInt(
|
|
117
|
+
process.env["AUDIT_LOG_MAX_SIZE"] ?? options.auditLogMaxSize,
|
|
118
|
+
10
|
|
119
|
+
)
|
|
120
|
+
} : void 0;
|
|
100
121
|
await createServer({
|
|
101
122
|
transport: options.transport,
|
|
102
123
|
port: parseInt(options.port, 10),
|
|
@@ -164,7 +185,8 @@ program.name("memory-journal-mcp").description("Project context management for A
|
|
|
164
185
|
workflowSummary: options.workflowSummary ?? process.env["MEMORY_JOURNAL_WORKFLOW_SUMMARY"] ?? void 0,
|
|
165
186
|
defaultProjectNumber: options.defaultProject ? parseInt(options.defaultProject, 10) : process.env["DEFAULT_PROJECT_NUMBER"] ? parseInt(process.env["DEFAULT_PROJECT_NUMBER"], 10) : void 0
|
|
166
187
|
},
|
|
167
|
-
instructionLevel: options.instructionLevel !== "standard" ? options.instructionLevel : process.env["INSTRUCTION_LEVEL"] ?? "standard"
|
|
188
|
+
instructionLevel: options.instructionLevel !== "standard" ? options.instructionLevel : process.env["INSTRUCTION_LEVEL"] ?? "standard",
|
|
189
|
+
auditConfig
|
|
168
190
|
});
|
|
169
191
|
} catch (error) {
|
|
170
192
|
logger.error("Failed to start server", {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GitHubIntegration } from './chunk-ARLH46WS.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -401,6 +401,10 @@ interface IDatabaseAdapter {
|
|
|
401
401
|
prNumber?: number;
|
|
402
402
|
prStatus?: string;
|
|
403
403
|
workflowRunId?: number;
|
|
404
|
+
tags?: string[];
|
|
405
|
+
entryType?: EntryType;
|
|
406
|
+
startDate?: string;
|
|
407
|
+
endDate?: string;
|
|
404
408
|
}): JournalEntry[];
|
|
405
409
|
searchByDateRange(startDate: string, endDate: string, options?: {
|
|
406
410
|
entryType?: EntryType;
|
|
@@ -597,6 +601,20 @@ interface BriefingConfig {
|
|
|
597
601
|
projectRegistry?: Record<string, ProjectRegistryEntry>;
|
|
598
602
|
}
|
|
599
603
|
|
|
604
|
+
/** Audit log configuration */
|
|
605
|
+
interface AuditConfig {
|
|
606
|
+
/** Master switch — false means no interceptor is created */
|
|
607
|
+
enabled: boolean;
|
|
608
|
+
/** Absolute path to the JSONL output file, or "stderr" for container mode */
|
|
609
|
+
logPath: string;
|
|
610
|
+
/** When true, tool arguments are omitted from entries */
|
|
611
|
+
redact: boolean;
|
|
612
|
+
/** When true, read-scoped tools are also logged (default: false) */
|
|
613
|
+
auditReads: boolean;
|
|
614
|
+
/** Maximum log file size in bytes before rotation (default: 10MB). 0 = no rotation. */
|
|
615
|
+
maxSizeBytes: number;
|
|
616
|
+
}
|
|
617
|
+
|
|
600
618
|
/**
|
|
601
619
|
* Memory Journal MCP Server - Main Server
|
|
602
620
|
*
|
|
@@ -626,6 +644,7 @@ interface ServerOptions {
|
|
|
626
644
|
briefingConfig?: BriefingConfig;
|
|
627
645
|
projectRegistry?: Record<string, ProjectRegistryEntry>;
|
|
628
646
|
instructionLevel?: 'essential' | 'standard' | 'full';
|
|
647
|
+
auditConfig?: AuditConfig;
|
|
629
648
|
}
|
|
630
649
|
/**
|
|
631
650
|
* Create and start the MCP server
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export { VERSION, createServer } from './chunk-6J4RPJ4I.js';
|
|
2
|
+
export { META_GROUPS, TOOL_GROUPS, calculateTokenSavings, filterTools, getAllToolNames, getFilterSummary, getToolFilterFromEnv, getToolGroup, isToolEnabled, parseToolFilter } from './chunk-2BJHLTYP.js';
|
|
3
3
|
import './chunk-OKOVZ5QE.js';
|
|
4
|
-
export { logger } from './chunk-
|
|
4
|
+
export { logger } from './chunk-ARLH46WS.js';
|
|
5
5
|
|
|
6
6
|
// src/types/index.ts
|
|
7
7
|
var DEFAULT_CONFIG = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memory-journal-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"description": "Project context management for AI-assisted development - Persistent knowledge graphs and intelligent context recall across fragmented AI threads",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"check": "npm run lint && npm run typecheck",
|
|
24
24
|
"test": "vitest run",
|
|
25
25
|
"test:watch": "vitest",
|
|
26
|
-
"test:coverage": "vitest run --coverage",
|
|
26
|
+
"test:coverage": "vitest run --coverage && npx tsx scripts/update-badges.ts",
|
|
27
27
|
"bench": "vitest bench --run",
|
|
28
28
|
"test:e2e": "playwright test",
|
|
29
29
|
"generate:instructions": "node scripts/generate-server-instructions.ts"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"node": ">=24.0.0"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@huggingface/transformers": "^
|
|
61
|
+
"@huggingface/transformers": "^4.0.1",
|
|
62
62
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
63
63
|
"@octokit/graphql": "^9.0.3",
|
|
64
64
|
"@octokit/rest": "^22.0.1",
|
|
@@ -66,24 +66,24 @@
|
|
|
66
66
|
"commander": "^14.0.3",
|
|
67
67
|
"express": "^5.2.1",
|
|
68
68
|
"jose": "^6.2.1",
|
|
69
|
-
"simple-git": "^3.
|
|
69
|
+
"simple-git": "^3.35.2",
|
|
70
70
|
"sqlite-vec": "^0.1.7-alpha.2",
|
|
71
71
|
"zod": "^4.3.6"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@eslint/js": "^10.0.1",
|
|
75
|
-
"esbuild": "^0.
|
|
76
|
-
"@playwright/test": "^1.
|
|
75
|
+
"esbuild": "^0.28.0",
|
|
76
|
+
"@playwright/test": "^1.59.1",
|
|
77
77
|
"@types/better-sqlite3": "^7.6.13",
|
|
78
78
|
"@types/express": "^5.0.6",
|
|
79
|
-
"@types/node": "^25.
|
|
80
|
-
"@vitest/coverage-v8": "^4.
|
|
81
|
-
"eslint": "^10.0
|
|
79
|
+
"@types/node": "^25.5.2",
|
|
80
|
+
"@vitest/coverage-v8": "^4.1.3",
|
|
81
|
+
"eslint": "^10.2.0",
|
|
82
82
|
"globals": "^17.4.0",
|
|
83
83
|
"tsup": "^8.5.1",
|
|
84
|
-
"typescript": "^
|
|
84
|
+
"typescript": "^6.0.2",
|
|
85
85
|
"typescript-eslint": "^8.57.0",
|
|
86
|
-
"vitest": "^4.
|
|
86
|
+
"vitest": "^4.1.3"
|
|
87
87
|
},
|
|
88
88
|
"overrides": {
|
|
89
89
|
"axios": "^1.13.6",
|
|
@@ -92,8 +92,9 @@
|
|
|
92
92
|
"onnxruntime-web": "npm:empty-npm-package@1.0.0",
|
|
93
93
|
"sharp": "npm:empty-npm-package@1.0.0",
|
|
94
94
|
"zod": "$zod",
|
|
95
|
-
"minimatch": "10.2.
|
|
95
|
+
"minimatch": "10.2.5",
|
|
96
96
|
"tar": "7.5.13",
|
|
97
|
-
"tmp": "^0.2.5"
|
|
97
|
+
"tmp": "^0.2.5",
|
|
98
|
+
"vite": "^8.0.5"
|
|
98
99
|
}
|
|
99
100
|
}
|
|
@@ -50,7 +50,7 @@ Load this skill when any of these apply:
|
|
|
50
50
|
|
|
51
51
|
- `gh` CLI authenticated (`gh auth status`)
|
|
52
52
|
- `GITHUB_TOKEN` set for API access
|
|
53
|
-
- `
|
|
53
|
+
- `PROJECT_REGISTRY` configured for repo auto-detection
|
|
54
54
|
- Project repo cloned locally
|
|
55
55
|
|
|
56
56
|
## Configuration
|
|
@@ -12,7 +12,7 @@ Copy the relevant variables to your MCP server configuration.
|
|
|
12
12
|
"command": "memory-journal-mcp",
|
|
13
13
|
"env": {
|
|
14
14
|
"GITHUB_TOKEN": "ghp_your_token",
|
|
15
|
-
"
|
|
15
|
+
"PROJECT_REGISTRY": "{\"my-repo\":{\"path\":\"/path/to/your/repo\",\"project_number\":1}}"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { GitHubIntegration } from './chunk-K2SCUSN4.js';
|
package/dist/tools-P4XXHO3Z.js
DELETED