memory-journal-mcp 7.6.0 → 7.6.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
CHANGED
|
@@ -206,7 +206,6 @@ Control which tools are exposed via `MEMORY_JOURNAL_MCP_TOOL_FILTER` (or CLI: `-
|
|
|
206
206
|
- `session-summary` - Create a session summary entry with accomplishments, pending items, and next-session context
|
|
207
207
|
- `team-session-summary` - Create a retrospective team session summary entry securely isolated to the team database
|
|
208
208
|
|
|
209
|
-
|
|
210
209
|
**[Complete prompts guide →](https://github.com/neverinfamous/memory-journal-mcp/wiki/Prompts)**
|
|
211
210
|
|
|
212
211
|
### 📡 **36 Resources** (27 Static + 9 Template)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TOOL_GROUPS, logger, getGitHubIntegration, parseToolFilter, getFilterSummary, getToolFilterFromEnv, getTools, getRequiredScope, getEnabledGroups, callTool, MetricsAccumulator, getAuthContext, getRequestContext, ConfigurationError, sendProgress, SUPPORTED_SCOPES, enforceAccessBoundary, runWithAuthContext, isValidScope, requestContextStorage, ConnectionError, ResourceNotFoundError, QueryError, assertNoPathTraversal, ValidationError, resolveGitHubRepo, isResourceError, markUntrustedContentInline, milestoneCompletionPct, sanitizeAuthor, markUntrustedContent, parseFlagContext, DEFAULT_FLAG_VOCABULARY, parseScopes, BASE_SCOPES, validateDateFormatPattern, getAllToolNames, assertSafeFilePath, assertSafeDirectoryPath, MemoryJournalMcpError, sanitizeSearchQuery, DEFAULT_BRIEFING_CONFIG } from './chunk-
|
|
1
|
+
import { TOOL_GROUPS, logger, getGitHubIntegration, parseToolFilter, getFilterSummary, getToolFilterFromEnv, getTools, getRequiredScope, getEnabledGroups, callTool, MetricsAccumulator, getAuthContext, getRequestContext, ConfigurationError, sendProgress, SUPPORTED_SCOPES, enforceAccessBoundary, runWithAuthContext, isValidScope, requestContextStorage, ConnectionError, ResourceNotFoundError, QueryError, assertNoPathTraversal, ValidationError, resolveGitHubRepo, isResourceError, markUntrustedContentInline, milestoneCompletionPct, sanitizeAuthor, markUntrustedContent, parseFlagContext, DEFAULT_FLAG_VOCABULARY, parseScopes, BASE_SCOPES, validateDateFormatPattern, getAllToolNames, assertSafeFilePath, assertSafeDirectoryPath, MemoryJournalMcpError, sanitizeSearchQuery, DEFAULT_BRIEFING_CONFIG } from './chunk-SYTB5YNH.js';
|
|
2
2
|
import { createRequire } from 'module';
|
|
3
3
|
import { appendFile, open, mkdir, stat, rename } from 'fs/promises';
|
|
4
4
|
import * as path4 from 'path';
|
|
@@ -5423,7 +5423,9 @@ var rulesResource = {
|
|
|
5423
5423
|
return {
|
|
5424
5424
|
data: cachedData ? cachedData.content : "",
|
|
5425
5425
|
annotations: {
|
|
5426
|
-
lastModified: new Date(
|
|
5426
|
+
lastModified: new Date(
|
|
5427
|
+
cachedData ? cachedData.timestamp : Date.now()
|
|
5428
|
+
).toISOString()
|
|
5427
5429
|
}
|
|
5428
5430
|
};
|
|
5429
5431
|
} catch (err) {
|
|
@@ -6908,7 +6910,7 @@ function getHelpResourceDefinitions() {
|
|
|
6908
6910
|
var toolIndexModule = null;
|
|
6909
6911
|
async function getAllToolDefinitionsAsync(context) {
|
|
6910
6912
|
try {
|
|
6911
|
-
toolIndexModule ??= await import('./tools-
|
|
6913
|
+
toolIndexModule ??= await import('./tools-JQPK5JFS.js');
|
|
6912
6914
|
if (toolIndexModule === null) return [];
|
|
6913
6915
|
const tools = toolIndexModule.getTools(context.db, null);
|
|
6914
6916
|
return tools.map((t) => ({
|
|
@@ -8840,10 +8842,7 @@ var HttpTransport = class {
|
|
|
8840
8842
|
const reqRecord = req;
|
|
8841
8843
|
const d = reqRecord[["a", "u", "t", "h"].join("")];
|
|
8842
8844
|
if (d !== void 0 && d !== null) {
|
|
8843
|
-
runWithAuthContext(
|
|
8844
|
-
{ authenticated: true, claims: d, scopes: d.scopes },
|
|
8845
|
-
next
|
|
8846
|
-
);
|
|
8845
|
+
runWithAuthContext({ authenticated: true, claims: d, scopes: d.scopes }, next);
|
|
8847
8846
|
} else {
|
|
8848
8847
|
next();
|
|
8849
8848
|
}
|
|
@@ -7567,16 +7567,52 @@ var ResolveFlagOutputSchema = z.object({
|
|
|
7567
7567
|
resolution: z.string().nullable().optional(),
|
|
7568
7568
|
error: z.string().optional()
|
|
7569
7569
|
}).extend(ErrorFieldsMixin.shape);
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7570
|
+
var FlagContextSchema = z.object({
|
|
7571
|
+
flag_type: z.string(),
|
|
7572
|
+
target_user: z.string().nullable().optional(),
|
|
7573
|
+
link: z.string().nullable().optional(),
|
|
7574
|
+
resolved: z.boolean(),
|
|
7575
|
+
resolved_at: z.string().nullable().optional(),
|
|
7576
|
+
resolution: z.string().nullable().optional(),
|
|
7577
|
+
author: z.string().optional()
|
|
7578
|
+
});
|
|
7579
|
+
var VersionedEnvelopeSchema = z.object({
|
|
7580
|
+
version: z.string(),
|
|
7581
|
+
data: z.unknown()
|
|
7582
|
+
});
|
|
7583
|
+
var AutoContextSchema = z.union([FlagContextSchema, VersionedEnvelopeSchema]);
|
|
7584
|
+
function parseAutoContext(autoContext) {
|
|
7585
|
+
if (!autoContext) return null;
|
|
7574
7586
|
try {
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7587
|
+
const parsed = JSON.parse(autoContext);
|
|
7588
|
+
if (typeof parsed !== "object" || parsed === null) {
|
|
7589
|
+
return null;
|
|
7590
|
+
}
|
|
7591
|
+
const result = AutoContextSchema.safeParse(parsed);
|
|
7592
|
+
if (result.success) {
|
|
7593
|
+
return result.data;
|
|
7594
|
+
}
|
|
7595
|
+
logger.debug("AutoContext schema miss", {
|
|
7596
|
+
module: "Validator",
|
|
7597
|
+
issues: result.error.issues
|
|
7598
|
+
});
|
|
7599
|
+
return parsed;
|
|
7600
|
+
} catch (error) {
|
|
7601
|
+
logger.warning("Failed to parse auto_context JSON", {
|
|
7602
|
+
module: "Validator",
|
|
7603
|
+
error: error instanceof Error ? error.message : "Unknown error"
|
|
7604
|
+
});
|
|
7605
|
+
return null;
|
|
7578
7606
|
}
|
|
7579
7607
|
}
|
|
7608
|
+
function parseFlagContext(autoContext) {
|
|
7609
|
+
const parsed = parseAutoContext(autoContext);
|
|
7610
|
+
if (parsed === null) return null;
|
|
7611
|
+
const result = FlagContextSchema.safeParse(parsed);
|
|
7612
|
+
return result.success ? result.data : null;
|
|
7613
|
+
}
|
|
7614
|
+
|
|
7615
|
+
// src/handlers/tools/team/core-tools.ts
|
|
7580
7616
|
function getTeamCoreTools(context) {
|
|
7581
7617
|
const { teamDb } = context;
|
|
7582
7618
|
return [
|
|
@@ -7784,7 +7820,7 @@ function getTeamSearchTools(context) {
|
|
|
7784
7820
|
return { ...TEAM_DB_ERROR_RESPONSE };
|
|
7785
7821
|
}
|
|
7786
7822
|
const { query, tags, limit, sort_by, project_number } = TeamSearchSchema.parse(params);
|
|
7787
|
-
const isGlobalFlagSearch = tags
|
|
7823
|
+
const isGlobalFlagSearch = tags !== void 0 && tags.length > 0 && tags.every((t) => t.startsWith("flag:"));
|
|
7788
7824
|
if (project_number == null && !isGlobalFlagSearch) {
|
|
7789
7825
|
return {
|
|
7790
7826
|
success: false,
|
|
@@ -7804,6 +7840,9 @@ function getTeamSearchTools(context) {
|
|
|
7804
7840
|
sortBy: sort_by,
|
|
7805
7841
|
projectNumber: project_number
|
|
7806
7842
|
});
|
|
7843
|
+
if (project_number == null) {
|
|
7844
|
+
entries = entries.filter((e) => e.entryType === "flag");
|
|
7845
|
+
}
|
|
7807
7846
|
if (tags && tags.length > 0) {
|
|
7808
7847
|
const entryIds = entries.map((e) => e.id);
|
|
7809
7848
|
if (entryIds.length > 0) {
|
|
@@ -7856,7 +7895,7 @@ function getTeamSearchTools(context) {
|
|
|
7856
7895
|
sort_by,
|
|
7857
7896
|
project_number
|
|
7858
7897
|
} = TeamSearchByDateRangeSchema.parse(params);
|
|
7859
|
-
const isGlobalFlagSearch = entry_type === "flag" || tags
|
|
7898
|
+
const isGlobalFlagSearch = entry_type === "flag" || tags !== void 0 && tags.length > 0 && tags.every((t) => t.startsWith("flag:"));
|
|
7860
7899
|
if (project_number == null && !isGlobalFlagSearch) {
|
|
7861
7900
|
return {
|
|
7862
7901
|
success: false,
|
|
@@ -7881,7 +7920,8 @@ function getTeamSearchTools(context) {
|
|
|
7881
7920
|
};
|
|
7882
7921
|
}
|
|
7883
7922
|
const entries = teamDb.searchByDateRange(start_date, end_date, {
|
|
7884
|
-
|
|
7923
|
+
// Security: Enforce entryType constraint for cross-tenant searches
|
|
7924
|
+
entryType: project_number == null ? "flag" : entry_type,
|
|
7885
7925
|
tags,
|
|
7886
7926
|
limit,
|
|
7887
7927
|
sortBy: sort_by,
|
|
@@ -8963,50 +9003,6 @@ function getTeamVectorTools(context) {
|
|
|
8963
9003
|
}
|
|
8964
9004
|
];
|
|
8965
9005
|
}
|
|
8966
|
-
var FlagContextSchema = z.object({
|
|
8967
|
-
flag_type: z.string(),
|
|
8968
|
-
target_user: z.string().nullable().optional(),
|
|
8969
|
-
link: z.string().nullable().optional(),
|
|
8970
|
-
resolved: z.boolean(),
|
|
8971
|
-
resolved_at: z.string().nullable().optional(),
|
|
8972
|
-
resolution: z.string().nullable().optional(),
|
|
8973
|
-
author: z.string().optional()
|
|
8974
|
-
});
|
|
8975
|
-
var VersionedEnvelopeSchema = z.object({
|
|
8976
|
-
version: z.string(),
|
|
8977
|
-
data: z.unknown()
|
|
8978
|
-
});
|
|
8979
|
-
var AutoContextSchema = z.union([FlagContextSchema, VersionedEnvelopeSchema]);
|
|
8980
|
-
function parseAutoContext(autoContext) {
|
|
8981
|
-
if (!autoContext) return null;
|
|
8982
|
-
try {
|
|
8983
|
-
const parsed = JSON.parse(autoContext);
|
|
8984
|
-
if (typeof parsed !== "object" || parsed === null) {
|
|
8985
|
-
return null;
|
|
8986
|
-
}
|
|
8987
|
-
const result = AutoContextSchema.safeParse(parsed);
|
|
8988
|
-
if (result.success) {
|
|
8989
|
-
return result.data;
|
|
8990
|
-
}
|
|
8991
|
-
logger.debug("AutoContext schema miss", {
|
|
8992
|
-
module: "Validator",
|
|
8993
|
-
issues: result.error.issues
|
|
8994
|
-
});
|
|
8995
|
-
return parsed;
|
|
8996
|
-
} catch (error) {
|
|
8997
|
-
logger.warning("Failed to parse auto_context JSON", {
|
|
8998
|
-
module: "Validator",
|
|
8999
|
-
error: error instanceof Error ? error.message : "Unknown error"
|
|
9000
|
-
});
|
|
9001
|
-
return null;
|
|
9002
|
-
}
|
|
9003
|
-
}
|
|
9004
|
-
function parseFlagContext2(autoContext) {
|
|
9005
|
-
const parsed = parseAutoContext(autoContext);
|
|
9006
|
-
if (parsed === null) return null;
|
|
9007
|
-
const result = FlagContextSchema.safeParse(parsed);
|
|
9008
|
-
return result.success ? result.data : null;
|
|
9009
|
-
}
|
|
9010
9006
|
|
|
9011
9007
|
// src/handlers/tools/team/flag-tools.ts
|
|
9012
9008
|
function getVocabulary(context) {
|
|
@@ -9145,7 +9141,7 @@ function getTeamFlagTools(context) {
|
|
|
9145
9141
|
recoverable: true
|
|
9146
9142
|
};
|
|
9147
9143
|
}
|
|
9148
|
-
const flagCtx =
|
|
9144
|
+
const flagCtx = parseFlagContext(entry.autoContext);
|
|
9149
9145
|
if (!flagCtx) {
|
|
9150
9146
|
return {
|
|
9151
9147
|
success: false,
|
|
@@ -10777,4 +10773,4 @@ function getAllToolDefinitions(context) {
|
|
|
10777
10773
|
];
|
|
10778
10774
|
}
|
|
10779
10775
|
|
|
10780
|
-
export { BASE_SCOPES, ConfigurationError, ConnectionError, DEFAULT_BRIEFING_CONFIG, DEFAULT_FLAG_VOCABULARY, META_GROUPS, MemoryJournalMcpError, MetricsAccumulator, QueryError, ResourceNotFoundError, SUPPORTED_SCOPES, TOOL_GROUPS, ValidationError, assertNoPathTraversal, assertSafeDirectoryPath, assertSafeFilePath, calculateTokenSavings, callTool, enforceAccessBoundary, filterTools, getAllToolNames, getAuthContext, getEnabledGroups, getFilterSummary, getGitHubIntegration, getRequestContext, getRequiredScope, getToolFilterFromEnv, getToolGroup, getTools, isResourceError, isToolEnabled, isValidScope, logger, markUntrustedContent, markUntrustedContentInline, milestoneCompletionPct,
|
|
10776
|
+
export { BASE_SCOPES, ConfigurationError, ConnectionError, DEFAULT_BRIEFING_CONFIG, DEFAULT_FLAG_VOCABULARY, META_GROUPS, MemoryJournalMcpError, MetricsAccumulator, QueryError, ResourceNotFoundError, SUPPORTED_SCOPES, TOOL_GROUPS, ValidationError, assertNoPathTraversal, assertSafeDirectoryPath, assertSafeFilePath, calculateTokenSavings, callTool, enforceAccessBoundary, filterTools, getAllToolNames, getAuthContext, getEnabledGroups, getFilterSummary, getGitHubIntegration, getRequestContext, getRequiredScope, getToolFilterFromEnv, getToolGroup, getTools, isResourceError, isToolEnabled, isValidScope, logger, markUntrustedContent, markUntrustedContentInline, milestoneCompletionPct, parseFlagContext, parseScopes, parseToolFilter, requestContextStorage, resolveGitHubRepo, runWithAuthContext, sanitizeAuthor, sanitizeSearchQuery, sendProgress, validateDateFormatPattern };
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { VERSION, DEFAULT_AUDIT_LOG_MAX_SIZE_BYTES, createServer } from './chunk-
|
|
2
|
-
import { logger } from './chunk-
|
|
1
|
+
import { VERSION, DEFAULT_AUDIT_LOG_MAX_SIZE_BYTES, createServer } from './chunk-DFQG7UR5.js';
|
|
2
|
+
import { logger } from './chunk-SYTB5YNH.js';
|
|
3
3
|
import { Command } from 'commander';
|
|
4
4
|
import * as path from 'path';
|
|
5
5
|
import * as fs from 'fs';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { VERSION, createServer } from './chunk-
|
|
2
|
-
export { META_GROUPS, TOOL_GROUPS, calculateTokenSavings, filterTools, getAllToolNames, getFilterSummary, getToolFilterFromEnv, getToolGroup, isToolEnabled, logger, parseToolFilter } from './chunk-
|
|
1
|
+
export { VERSION, createServer } from './chunk-DFQG7UR5.js';
|
|
2
|
+
export { META_GROUPS, TOOL_GROUPS, calculateTokenSavings, filterTools, getAllToolNames, getFilterSummary, getToolFilterFromEnv, getToolGroup, isToolEnabled, logger, parseToolFilter } from './chunk-SYTB5YNH.js';
|
|
3
3
|
|
|
4
4
|
// src/types/index.ts
|
|
5
5
|
var DEFAULT_CONFIG = {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { callTool, getTools } from './chunk-SYTB5YNH.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memory-journal-mcp",
|
|
3
|
-
"version": "7.6.
|
|
3
|
+
"version": "7.6.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",
|
package/dist/tools-QF7CPU2H.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { callTool, getTools } from './chunk-SV3CKPMF.js';
|