memory-journal-mcp 4.4.2 → 5.0.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.
- package/.github/workflows/codeql.yml +1 -6
- package/.github/workflows/docker-publish.yml +15 -49
- package/.github/workflows/lint-and-test.yml +1 -1
- package/.github/workflows/secrets-scanning.yml +4 -3
- package/.github/workflows/security-update.yml +3 -3
- package/CHANGELOG.md +213 -0
- package/CONTRIBUTING.md +132 -97
- package/DOCKER_README.md +184 -235
- package/Dockerfile +27 -24
- package/README.md +218 -190
- package/SECURITY.md +27 -35
- package/dist/cli.js +16 -1
- package/dist/cli.js.map +1 -1
- package/dist/constants/ServerInstructions.d.ts +5 -1
- package/dist/constants/ServerInstructions.d.ts.map +1 -1
- package/dist/constants/ServerInstructions.js +133 -73
- package/dist/constants/ServerInstructions.js.map +1 -1
- package/dist/constants/icons.d.ts +2 -2
- package/dist/constants/icons.d.ts.map +1 -1
- package/dist/constants/icons.js +7 -6
- package/dist/constants/icons.js.map +1 -1
- package/dist/database/SqliteAdapter.d.ts +37 -24
- package/dist/database/SqliteAdapter.d.ts.map +1 -1
- package/dist/database/SqliteAdapter.js +319 -157
- package/dist/database/SqliteAdapter.js.map +1 -1
- package/dist/database/schema.d.ts +45 -0
- package/dist/database/schema.d.ts.map +1 -0
- package/dist/database/schema.js +92 -0
- package/dist/database/schema.js.map +1 -0
- package/dist/filtering/ToolFilter.d.ts +1 -1
- package/dist/filtering/ToolFilter.d.ts.map +1 -1
- package/dist/filtering/ToolFilter.js +13 -2
- package/dist/filtering/ToolFilter.js.map +1 -1
- package/dist/github/GitHubIntegration.d.ts.map +1 -1
- package/dist/github/GitHubIntegration.js +1 -3
- package/dist/github/GitHubIntegration.js.map +1 -1
- package/dist/handlers/prompts/github.d.ts +12 -0
- package/dist/handlers/prompts/github.d.ts.map +1 -0
- package/dist/handlers/prompts/github.js +178 -0
- package/dist/handlers/prompts/github.js.map +1 -0
- package/dist/handlers/prompts/index.d.ts +23 -2
- package/dist/handlers/prompts/index.d.ts.map +1 -1
- package/dist/handlers/prompts/index.js +7 -432
- package/dist/handlers/prompts/index.js.map +1 -1
- package/dist/handlers/prompts/workflow.d.ts +12 -0
- package/dist/handlers/prompts/workflow.d.ts.map +1 -0
- package/dist/handlers/prompts/workflow.js +277 -0
- package/dist/handlers/prompts/workflow.js.map +1 -0
- package/dist/handlers/resources/core.d.ts +11 -0
- package/dist/handlers/resources/core.d.ts.map +1 -0
- package/dist/handlers/resources/core.js +433 -0
- package/dist/handlers/resources/core.js.map +1 -0
- package/dist/handlers/resources/github.d.ts +11 -0
- package/dist/handlers/resources/github.d.ts.map +1 -0
- package/dist/handlers/resources/github.js +314 -0
- package/dist/handlers/resources/github.js.map +1 -0
- package/dist/handlers/resources/graph.d.ts +11 -0
- package/dist/handlers/resources/graph.d.ts.map +1 -0
- package/dist/handlers/resources/graph.js +204 -0
- package/dist/handlers/resources/graph.js.map +1 -0
- package/dist/handlers/resources/index.d.ts +5 -20
- package/dist/handlers/resources/index.d.ts.map +1 -1
- package/dist/handlers/resources/index.js +16 -1278
- package/dist/handlers/resources/index.js.map +1 -1
- package/dist/handlers/resources/shared.d.ts +60 -0
- package/dist/handlers/resources/shared.d.ts.map +1 -0
- package/dist/handlers/resources/shared.js +49 -0
- package/dist/handlers/resources/shared.js.map +1 -0
- package/dist/handlers/resources/team.d.ts +13 -0
- package/dist/handlers/resources/team.d.ts.map +1 -0
- package/dist/handlers/resources/team.js +119 -0
- package/dist/handlers/resources/team.js.map +1 -0
- package/dist/handlers/resources/templates.d.ts +13 -0
- package/dist/handlers/resources/templates.d.ts.map +1 -0
- package/dist/handlers/resources/templates.js +310 -0
- package/dist/handlers/resources/templates.js.map +1 -0
- package/dist/handlers/tools/admin.d.ts +8 -0
- package/dist/handlers/tools/admin.d.ts.map +1 -0
- package/dist/handlers/tools/admin.js +270 -0
- package/dist/handlers/tools/admin.js.map +1 -0
- package/dist/handlers/tools/analytics.d.ts +8 -0
- package/dist/handlers/tools/analytics.d.ts.map +1 -0
- package/dist/handlers/tools/analytics.js +256 -0
- package/dist/handlers/tools/analytics.js.map +1 -0
- package/dist/handlers/tools/backup.d.ts +8 -0
- package/dist/handlers/tools/backup.d.ts.map +1 -0
- package/dist/handlers/tools/backup.js +224 -0
- package/dist/handlers/tools/backup.js.map +1 -0
- package/dist/handlers/tools/core.d.ts +9 -0
- package/dist/handlers/tools/core.d.ts.map +1 -0
- package/dist/handlers/tools/core.js +326 -0
- package/dist/handlers/tools/core.js.map +1 -0
- package/dist/handlers/tools/export.d.ts +8 -0
- package/dist/handlers/tools/export.d.ts.map +1 -0
- package/dist/handlers/tools/export.js +89 -0
- package/dist/handlers/tools/export.js.map +1 -0
- package/dist/handlers/tools/github/helpers.d.ts +34 -0
- package/dist/handlers/tools/github/helpers.d.ts.map +1 -0
- package/dist/handlers/tools/github/helpers.js +52 -0
- package/dist/handlers/tools/github/helpers.js.map +1 -0
- package/dist/handlers/tools/github/insights-tools.d.ts +8 -0
- package/dist/handlers/tools/github/insights-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/insights-tools.js +104 -0
- package/dist/handlers/tools/github/insights-tools.js.map +1 -0
- package/dist/handlers/tools/github/issue-tools.d.ts +8 -0
- package/dist/handlers/tools/github/issue-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/issue-tools.js +359 -0
- package/dist/handlers/tools/github/issue-tools.js.map +1 -0
- package/dist/handlers/tools/github/kanban-tools.d.ts +8 -0
- package/dist/handlers/tools/github/kanban-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/kanban-tools.js +108 -0
- package/dist/handlers/tools/github/kanban-tools.js.map +1 -0
- package/dist/handlers/tools/github/milestone-tools.d.ts +9 -0
- package/dist/handlers/tools/github/milestone-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/milestone-tools.js +302 -0
- package/dist/handlers/tools/github/milestone-tools.js.map +1 -0
- package/dist/handlers/tools/github/mutation-tools.d.ts +12 -0
- package/dist/handlers/tools/github/mutation-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/mutation-tools.js +15 -0
- package/dist/handlers/tools/github/mutation-tools.js.map +1 -0
- package/dist/handlers/tools/github/read-tools.d.ts +8 -0
- package/dist/handlers/tools/github/read-tools.d.ts.map +1 -0
- package/dist/handlers/tools/github/read-tools.js +260 -0
- package/dist/handlers/tools/github/read-tools.js.map +1 -0
- package/dist/handlers/tools/github/schemas.d.ts +467 -0
- package/dist/handlers/tools/github/schemas.d.ts.map +1 -0
- package/dist/handlers/tools/github/schemas.js +335 -0
- package/dist/handlers/tools/github/schemas.js.map +1 -0
- package/dist/handlers/tools/github.d.ts +14 -0
- package/dist/handlers/tools/github.d.ts.map +1 -0
- package/dist/handlers/tools/github.js +28 -0
- package/dist/handlers/tools/github.js.map +1 -0
- package/dist/handlers/tools/index.d.ts +15 -20
- package/dist/handlers/tools/index.d.ts.map +1 -1
- package/dist/handlers/tools/index.js +117 -2909
- package/dist/handlers/tools/index.js.map +1 -1
- package/dist/handlers/tools/relationships.d.ts +8 -0
- package/dist/handlers/tools/relationships.d.ts.map +1 -0
- package/dist/handlers/tools/relationships.js +308 -0
- package/dist/handlers/tools/relationships.js.map +1 -0
- package/dist/handlers/tools/schemas.d.ts +108 -0
- package/dist/handlers/tools/schemas.d.ts.map +1 -0
- package/dist/handlers/tools/schemas.js +122 -0
- package/dist/handlers/tools/schemas.js.map +1 -0
- package/dist/handlers/tools/search.d.ts +8 -0
- package/dist/handlers/tools/search.d.ts.map +1 -0
- package/dist/handlers/tools/search.js +282 -0
- package/dist/handlers/tools/search.js.map +1 -0
- package/dist/handlers/tools/team.d.ts +11 -0
- package/dist/handlers/tools/team.d.ts.map +1 -0
- package/dist/handlers/tools/team.js +239 -0
- package/dist/handlers/tools/team.js.map +1 -0
- package/dist/server/McpServer.d.ts +4 -0
- package/dist/server/McpServer.d.ts.map +1 -1
- package/dist/server/McpServer.js +48 -297
- package/dist/server/McpServer.js.map +1 -1
- package/dist/server/Scheduler.d.ts +91 -0
- package/dist/server/Scheduler.d.ts.map +1 -0
- package/dist/server/Scheduler.js +201 -0
- package/dist/server/Scheduler.js.map +1 -0
- package/dist/transports/http.d.ts +66 -0
- package/dist/transports/http.d.ts.map +1 -0
- package/dist/transports/http.js +519 -0
- package/dist/transports/http.js.map +1 -0
- package/dist/types/entities.d.ts +101 -0
- package/dist/types/entities.d.ts.map +1 -0
- package/dist/types/entities.js +5 -0
- package/dist/types/entities.js.map +1 -0
- package/dist/types/filtering.d.ts +34 -0
- package/dist/types/filtering.d.ts.map +1 -0
- package/dist/types/filtering.js +5 -0
- package/dist/types/filtering.js.map +1 -0
- package/dist/types/github.d.ts +166 -0
- package/dist/types/github.d.ts.map +1 -0
- package/dist/types/github.js +5 -0
- package/dist/types/github.js.map +1 -0
- package/dist/types/index.d.ts +35 -292
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -2
- package/dist/types/index.js.map +1 -1
- package/dist/utils/error-helpers.d.ts +37 -0
- package/dist/utils/error-helpers.d.ts.map +1 -0
- package/dist/utils/error-helpers.js +47 -0
- package/dist/utils/error-helpers.js.map +1 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +6 -3
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/security-utils.d.ts +0 -21
- package/dist/utils/security-utils.d.ts.map +1 -1
- package/dist/utils/security-utils.js +0 -47
- package/dist/utils/security-utils.js.map +1 -1
- package/dist/vector/VectorSearchManager.d.ts.map +1 -1
- package/dist/vector/VectorSearchManager.js +9 -32
- package/dist/vector/VectorSearchManager.js.map +1 -1
- package/docker-compose.yml +11 -2
- package/hooks/README.md +107 -0
- package/hooks/cursor/hooks.json +10 -0
- package/hooks/cursor/memory-journal.mdc +22 -0
- package/hooks/cursor/session-end.sh +19 -0
- package/hooks/kilo-code/session-end-mode.json +11 -0
- package/hooks/kiro/session-end.md +13 -0
- package/mcp-config-example.json +1 -0
- package/package.json +11 -9
- package/playwright.config.ts +29 -0
- package/releases/v4.5.0.md +116 -0
- package/releases/v5.0.0.md +105 -0
- package/scripts/generate-server-instructions.ts +176 -0
- package/scripts/server-instructions-function-body.ts +77 -0
- package/server.json +3 -3
- package/src/cli.ts +45 -1
- package/src/constants/ServerInstructions.ts +133 -73
- package/src/constants/icons.ts +8 -7
- package/src/constants/server-instructions.md +268 -0
- package/src/database/SqliteAdapter.ts +358 -192
- package/src/database/schema.ts +125 -0
- package/src/filtering/ToolFilter.ts +13 -2
- package/src/github/GitHubIntegration.ts +1 -3
- package/src/handlers/prompts/github.ts +209 -0
- package/src/handlers/prompts/index.ts +10 -499
- package/src/handlers/prompts/workflow.ts +314 -0
- package/src/handlers/resources/core.ts +528 -0
- package/src/handlers/resources/github.ts +358 -0
- package/src/handlers/resources/graph.ts +254 -0
- package/src/handlers/resources/index.ts +23 -1570
- package/src/handlers/resources/shared.ts +103 -0
- package/src/handlers/resources/team.ts +133 -0
- package/src/handlers/resources/templates.ts +374 -0
- package/src/handlers/tools/admin.ts +285 -0
- package/src/handlers/tools/analytics.ts +301 -0
- package/src/handlers/tools/backup.ts +242 -0
- package/src/handlers/tools/core.ts +350 -0
- package/src/handlers/tools/export.ts +115 -0
- package/src/handlers/tools/github/helpers.ts +86 -0
- package/src/handlers/tools/github/insights-tools.ts +119 -0
- package/src/handlers/tools/github/issue-tools.ts +439 -0
- package/src/handlers/tools/github/kanban-tools.ts +134 -0
- package/src/handlers/tools/github/milestone-tools.ts +392 -0
- package/src/handlers/tools/github/mutation-tools.ts +17 -0
- package/src/handlers/tools/github/read-tools.ts +328 -0
- package/src/handlers/tools/github/schemas.ts +369 -0
- package/src/handlers/tools/github.ts +36 -0
- package/src/handlers/tools/index.ts +144 -3325
- package/src/handlers/tools/relationships.ts +358 -0
- package/src/handlers/tools/schemas.ts +132 -0
- package/src/handlers/tools/search.ts +343 -0
- package/src/handlers/tools/team.ts +273 -0
- package/src/server/McpServer.ts +63 -358
- package/src/server/Scheduler.ts +278 -0
- package/src/transports/http.ts +635 -0
- package/src/types/entities.ts +145 -0
- package/src/types/filtering.ts +54 -0
- package/src/types/github.ts +180 -0
- package/src/types/index.ts +67 -375
- package/src/utils/error-helpers.ts +52 -0
- package/src/utils/logger.ts +6 -3
- package/src/utils/security-utils.ts +0 -52
- package/src/vector/VectorSearchManager.ts +9 -33
- package/tests/constants/icons.test.ts +1 -2
- package/tests/constants/server-instructions.test.ts +30 -4
- package/tests/database/sqlite-adapter.test.ts +91 -7
- package/tests/e2e/auth.spec.ts +154 -0
- package/tests/e2e/health.spec.ts +63 -0
- package/tests/e2e/protocols.spec.ts +134 -0
- package/tests/e2e/resources.spec.ts +103 -0
- package/tests/e2e/scheduler.spec.ts +79 -0
- package/tests/e2e/security.spec.ts +91 -0
- package/tests/e2e/sessions.spec.ts +95 -0
- package/tests/e2e/stateless.spec.ts +121 -0
- package/tests/e2e/tools.spec.ts +111 -0
- package/tests/filtering/tool-filter.test.ts +46 -0
- package/tests/handlers/error-path-coverage.test.ts +324 -0
- package/tests/handlers/github-resource-handlers.test.ts +453 -0
- package/tests/handlers/github-tool-handlers.test.ts +899 -0
- package/tests/handlers/prompt-handler-coverage.test.ts +106 -0
- package/tests/handlers/prompt-handlers.test.ts +40 -0
- package/tests/handlers/resource-handler-coverage.test.ts +181 -0
- package/tests/handlers/resource-handlers.test.ts +33 -9
- package/tests/handlers/search-tool-handlers.test.ts +272 -0
- package/tests/handlers/targeted-gap-closure.test.ts +387 -0
- package/tests/handlers/team-resource-handlers.test.ts +156 -0
- package/tests/handlers/team-tool-handlers.test.ts +301 -0
- package/tests/handlers/tool-handler-coverage.test.ts +469 -0
- package/tests/handlers/tool-handlers.test.ts +2 -2
- package/tests/security/sql-injection.test.ts +3 -54
- package/tests/server/mcp-server.test.ts +503 -8
- package/tests/server/scheduler.test.ts +400 -0
- package/tests/transports/http-transport.test.ts +620 -0
- package/tests/vector/vector-search-manager.test.ts +60 -0
- package/vitest.config.ts +4 -1
- package/.memory-journal-team.db +0 -0
- package/.vscode/settings.json +0 -84
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Journal MCP Server - Tool Filtering Types
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Tool group identifiers for Memory Journal
|
|
6
|
+
*/
|
|
7
|
+
export type ToolGroup = 'core' | 'search' | 'analytics' | 'relationships' | 'export' | 'admin' | 'github' | 'backup' | 'team';
|
|
8
|
+
/**
|
|
9
|
+
* Meta-group identifiers for common multi-group selections
|
|
10
|
+
*/
|
|
11
|
+
export type MetaGroup = 'starter' | 'essential' | 'full' | 'readonly';
|
|
12
|
+
/**
|
|
13
|
+
* Tool filter rule
|
|
14
|
+
*/
|
|
15
|
+
export interface ToolFilterRule {
|
|
16
|
+
/** Rule type: include or exclude */
|
|
17
|
+
type: 'include' | 'exclude';
|
|
18
|
+
/** Target: group name or tool name */
|
|
19
|
+
target: string;
|
|
20
|
+
/** Whether target is a group (true) or individual tool (false) */
|
|
21
|
+
isGroup: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parsed tool filter configuration
|
|
25
|
+
*/
|
|
26
|
+
export interface ToolFilterConfig {
|
|
27
|
+
/** Original filter string */
|
|
28
|
+
raw: string;
|
|
29
|
+
/** Parsed rules in order */
|
|
30
|
+
rules: ToolFilterRule[];
|
|
31
|
+
/** Set of enabled tool names after applying rules */
|
|
32
|
+
enabledTools: Set<string>;
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=filtering.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.d.ts","sourceRoot":"","sources":["../../src/types/filtering.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GACf,MAAM,GACN,QAAQ,GACR,WAAW,GACX,eAAe,GACf,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,MAAM,CAAA;AAEZ;;GAEG;AACH,MAAM,MAAM,SAAS,GACf,SAAS,GACT,WAAW,GACX,MAAM,GACN,UAAU,CAAA;AAEhB;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,oCAAoC;IACpC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAA;IAE3B,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAA;IAEd,kEAAkE;IAClE,OAAO,EAAE,OAAO,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,6BAA6B;IAC7B,GAAG,EAAE,MAAM,CAAA;IAEX,4BAA4B;IAC5B,KAAK,EAAE,cAAc,EAAE,CAAA;IAEvB,qDAAqD;IACrD,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAC5B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering.js","sourceRoot":"","sources":["../../src/types/filtering.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Journal MCP Server - GitHub Integration Types
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* GitHub project information
|
|
6
|
+
*/
|
|
7
|
+
export interface GitHubProject {
|
|
8
|
+
number: number;
|
|
9
|
+
title: string;
|
|
10
|
+
url: string;
|
|
11
|
+
state: 'OPEN' | 'CLOSED';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* GitHub issue information
|
|
15
|
+
*/
|
|
16
|
+
export interface GitHubIssue {
|
|
17
|
+
number: number;
|
|
18
|
+
title: string;
|
|
19
|
+
url: string;
|
|
20
|
+
state: 'OPEN' | 'CLOSED';
|
|
21
|
+
milestone?: {
|
|
22
|
+
number: number;
|
|
23
|
+
title: string;
|
|
24
|
+
} | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* GitHub pull request information
|
|
28
|
+
*/
|
|
29
|
+
export interface GitHubPullRequest {
|
|
30
|
+
number: number;
|
|
31
|
+
title: string;
|
|
32
|
+
url: string;
|
|
33
|
+
state: 'OPEN' | 'CLOSED' | 'MERGED';
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* GitHub milestone information
|
|
37
|
+
*/
|
|
38
|
+
export interface GitHubMilestone {
|
|
39
|
+
number: number;
|
|
40
|
+
title: string;
|
|
41
|
+
description: string | null;
|
|
42
|
+
state: 'open' | 'closed';
|
|
43
|
+
url: string;
|
|
44
|
+
dueOn: string | null;
|
|
45
|
+
openIssues: number;
|
|
46
|
+
closedIssues: number;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
updatedAt: string;
|
|
49
|
+
creator: string | null;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* GitHub workflow run information
|
|
53
|
+
*/
|
|
54
|
+
export interface GitHubWorkflowRun {
|
|
55
|
+
id: number;
|
|
56
|
+
name: string;
|
|
57
|
+
status: 'queued' | 'in_progress' | 'completed';
|
|
58
|
+
conclusion: 'success' | 'failure' | 'cancelled' | 'skipped' | null;
|
|
59
|
+
url: string;
|
|
60
|
+
headBranch: string;
|
|
61
|
+
headSha: string;
|
|
62
|
+
createdAt: string;
|
|
63
|
+
updatedAt: string;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Auto-captured project context
|
|
67
|
+
*/
|
|
68
|
+
export interface ProjectContext {
|
|
69
|
+
repoName: string | null;
|
|
70
|
+
branch: string | null;
|
|
71
|
+
commit: string | null;
|
|
72
|
+
remoteUrl: string | null;
|
|
73
|
+
projects: GitHubProject[];
|
|
74
|
+
issues: GitHubIssue[];
|
|
75
|
+
pullRequests: GitHubPullRequest[];
|
|
76
|
+
workflowRuns: GitHubWorkflowRun[];
|
|
77
|
+
milestones: GitHubMilestone[];
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Repository statistics (stars, forks, watchers)
|
|
81
|
+
*/
|
|
82
|
+
export interface RepoStats {
|
|
83
|
+
stars: number;
|
|
84
|
+
forks: number;
|
|
85
|
+
watchers: number;
|
|
86
|
+
openIssues: number;
|
|
87
|
+
size: number;
|
|
88
|
+
defaultBranch: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Aggregated traffic data (14-day rolling)
|
|
92
|
+
*/
|
|
93
|
+
export interface TrafficData {
|
|
94
|
+
clones: {
|
|
95
|
+
total: number;
|
|
96
|
+
unique: number;
|
|
97
|
+
dailyAvg: number;
|
|
98
|
+
};
|
|
99
|
+
views: {
|
|
100
|
+
total: number;
|
|
101
|
+
unique: number;
|
|
102
|
+
dailyAvg: number;
|
|
103
|
+
};
|
|
104
|
+
period: string;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Traffic referrer source
|
|
108
|
+
*/
|
|
109
|
+
export interface TrafficReferrer {
|
|
110
|
+
referrer: string;
|
|
111
|
+
count: number;
|
|
112
|
+
uniques: number;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Popular repository path
|
|
116
|
+
*/
|
|
117
|
+
export interface PopularPath {
|
|
118
|
+
path: string;
|
|
119
|
+
title: string;
|
|
120
|
+
count: number;
|
|
121
|
+
uniques: number;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Status option for single-select field in Projects v2
|
|
125
|
+
*/
|
|
126
|
+
export interface ProjectV2StatusOption {
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
color?: string;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Project item in a Kanban board
|
|
133
|
+
*/
|
|
134
|
+
export interface ProjectV2Item {
|
|
135
|
+
id: string;
|
|
136
|
+
title: string;
|
|
137
|
+
url: string;
|
|
138
|
+
type: 'ISSUE' | 'PULL_REQUEST' | 'DRAFT_ISSUE';
|
|
139
|
+
status: string | null;
|
|
140
|
+
number?: number;
|
|
141
|
+
labels?: string[];
|
|
142
|
+
assignees?: string[];
|
|
143
|
+
createdAt: string;
|
|
144
|
+
updatedAt: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Kanban column (grouped by Status)
|
|
148
|
+
*/
|
|
149
|
+
export interface KanbanColumn {
|
|
150
|
+
status: string;
|
|
151
|
+
statusOptionId: string;
|
|
152
|
+
items: ProjectV2Item[];
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Full Kanban board response
|
|
156
|
+
*/
|
|
157
|
+
export interface KanbanBoard {
|
|
158
|
+
projectId: string;
|
|
159
|
+
projectNumber: number;
|
|
160
|
+
projectTitle: string;
|
|
161
|
+
statusFieldId: string;
|
|
162
|
+
statusOptions: ProjectV2StatusOption[];
|
|
163
|
+
columns: KanbanColumn[];
|
|
164
|
+
totalItems: number;
|
|
165
|
+
}
|
|
166
|
+
//# sourceMappingURL=github.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../../src/types/github.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAA;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,QAAQ,CAAA;IACxB,SAAS,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACvD;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAC9B,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAA;CACt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E,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,EAAE,aAAa,EAAE,CAAA;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,EAAE,MAAM,CAAA;IACpB,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,qBAAqB,EAAE,CAAA;IACtC,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.js","sourceRoot":"","sources":["../../src/types/github.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,39 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Memory Journal MCP Server - Type Definitions
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Barrel file re-exporting all types from sub-modules, plus types
|
|
5
|
+
* that depend on external imports (SqliteAdapter, VectorSearchManager, etc.).
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export type MetaGroup = 'starter' | 'essential' | 'full' | 'readonly';
|
|
15
|
-
/**
|
|
16
|
-
* Tool filter rule
|
|
17
|
-
*/
|
|
18
|
-
export interface ToolFilterRule {
|
|
19
|
-
/** Rule type: include or exclude */
|
|
20
|
-
type: 'include' | 'exclude';
|
|
21
|
-
/** Target: group name or tool name */
|
|
22
|
-
target: string;
|
|
23
|
-
/** Whether target is a group (true) or individual tool (false) */
|
|
24
|
-
isGroup: boolean;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Parsed tool filter configuration
|
|
28
|
-
*/
|
|
29
|
-
export interface ToolFilterConfig {
|
|
30
|
-
/** Original filter string */
|
|
31
|
-
raw: string;
|
|
32
|
-
/** Parsed rules in order */
|
|
33
|
-
rules: ToolFilterRule[];
|
|
34
|
-
/** Set of enabled tool names after applying rules */
|
|
35
|
-
enabledTools: Set<string>;
|
|
36
|
-
}
|
|
7
|
+
import type { SqliteAdapter } from '../database/SqliteAdapter.js';
|
|
8
|
+
import type { VectorSearchManager } from '../vector/VectorSearchManager.js';
|
|
9
|
+
import type { GitHubIntegration } from '../github/GitHubIntegration.js';
|
|
10
|
+
import type { ProgressContext } from '../utils/progress-utils.js';
|
|
11
|
+
export type { ToolGroup, MetaGroup, ToolFilterRule, ToolFilterConfig } from './filtering.js';
|
|
12
|
+
export type { EntryType, SignificanceType, RelationshipType, JournalEntry, Tag, Relationship, Embedding, ImportanceBreakdown, ImportanceResult, } from './entities.js';
|
|
13
|
+
export type { GitHubProject, GitHubIssue, GitHubPullRequest, GitHubMilestone, GitHubWorkflowRun, ProjectContext, RepoStats, TrafficData, TrafficReferrer, PopularPath, ProjectV2StatusOption, ProjectV2Item, KanbanColumn, KanbanBoard, } from './github.js';
|
|
37
14
|
/**
|
|
38
15
|
* MCP Tool Annotations (MCP Spec 2025-11-25)
|
|
39
16
|
*
|
|
@@ -74,6 +51,7 @@ export interface McpIcon {
|
|
|
74
51
|
/** Size descriptors (e.g., ['48x48'], ['any']) */
|
|
75
52
|
sizes?: string[];
|
|
76
53
|
}
|
|
54
|
+
import type { ToolGroup } from './filtering.js';
|
|
77
55
|
/**
|
|
78
56
|
* Tool definition for registration
|
|
79
57
|
*/
|
|
@@ -93,7 +71,31 @@ export interface ToolDefinition {
|
|
|
93
71
|
/** Behavioral hints for AI clients */
|
|
94
72
|
annotations: ToolAnnotations;
|
|
95
73
|
/** Tool handler function */
|
|
96
|
-
handler: (params: unknown) =>
|
|
74
|
+
handler: (params: unknown) => unknown;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Tool handler configuration options
|
|
78
|
+
*/
|
|
79
|
+
export interface ToolHandlerConfig {
|
|
80
|
+
/** Default GitHub Project number for auto-assignment */
|
|
81
|
+
defaultProjectNumber?: number;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Tool execution context passed to all tool group modules
|
|
85
|
+
*/
|
|
86
|
+
export interface ToolContext {
|
|
87
|
+
/** Database adapter */
|
|
88
|
+
db: SqliteAdapter;
|
|
89
|
+
/** Team database adapter (optional, requires TEAM_DB_PATH) */
|
|
90
|
+
teamDb?: SqliteAdapter;
|
|
91
|
+
/** Vector search manager (optional) */
|
|
92
|
+
vectorManager?: VectorSearchManager;
|
|
93
|
+
/** GitHub integration (optional) */
|
|
94
|
+
github?: GitHubIntegration;
|
|
95
|
+
/** Handler configuration */
|
|
96
|
+
config?: ToolHandlerConfig;
|
|
97
|
+
/** Progress reporting context */
|
|
98
|
+
progress?: ProgressContext;
|
|
97
99
|
}
|
|
98
100
|
/**
|
|
99
101
|
* Resource definition for MCP
|
|
@@ -131,265 +133,6 @@ export interface PromptDefinition {
|
|
|
131
133
|
/** Prompt handler */
|
|
132
134
|
handler: (args: Record<string, string>) => Promise<unknown>;
|
|
133
135
|
}
|
|
134
|
-
/**
|
|
135
|
-
* Entry types for journal entries
|
|
136
|
-
*/
|
|
137
|
-
export type EntryType = 'personal_reflection' | 'project_decision' | 'technical_achievement' | 'bug_fix' | 'feature_implementation' | 'code_review' | 'meeting_notes' | 'learning' | 'research' | 'planning' | 'retrospective' | 'standup' | 'other';
|
|
138
|
-
/**
|
|
139
|
-
* Significance types for important entries
|
|
140
|
-
*/
|
|
141
|
-
export type SignificanceType = 'milestone' | 'breakthrough' | 'technical_breakthrough' | 'decision' | 'lesson_learned' | 'blocker_resolved' | 'release' | null;
|
|
142
|
-
/**
|
|
143
|
-
* Relationship types between entries
|
|
144
|
-
*
|
|
145
|
-
* Standard types:
|
|
146
|
-
* - evolves_from: Entry builds upon previous work
|
|
147
|
-
* - references: Entry mentions or links to another
|
|
148
|
-
* - implements: Entry implements a spec/design
|
|
149
|
-
* - clarifies: Entry explains or clarifies another
|
|
150
|
-
* - response_to: Entry responds to a question/issue
|
|
151
|
-
*
|
|
152
|
-
* Causal types (for decision tracing):
|
|
153
|
-
* - blocked_by: Entry was blocked by another (e.g., blocker → resolution)
|
|
154
|
-
* - resolved: Entry resolved/fixed an issue from another
|
|
155
|
-
* - caused: Entry caused or led to another outcome
|
|
156
|
-
*/
|
|
157
|
-
export type RelationshipType = 'evolves_from' | 'references' | 'implements' | 'clarifies' | 'response_to' | 'blocked_by' | 'resolved' | 'caused';
|
|
158
|
-
/**
|
|
159
|
-
* Journal entry entity
|
|
160
|
-
*/
|
|
161
|
-
export interface JournalEntry {
|
|
162
|
-
id: number;
|
|
163
|
-
entryType: EntryType;
|
|
164
|
-
content: string;
|
|
165
|
-
timestamp: string;
|
|
166
|
-
isPersonal: boolean;
|
|
167
|
-
significanceType: SignificanceType;
|
|
168
|
-
autoContext: string | null;
|
|
169
|
-
deletedAt: string | null;
|
|
170
|
-
tags: string[];
|
|
171
|
-
projectNumber?: number | null;
|
|
172
|
-
projectOwner?: string | null;
|
|
173
|
-
issueNumber?: number | null;
|
|
174
|
-
issueUrl?: string | null;
|
|
175
|
-
prNumber?: number | null;
|
|
176
|
-
prUrl?: string | null;
|
|
177
|
-
prStatus?: string | null;
|
|
178
|
-
workflowRunId?: number | null;
|
|
179
|
-
workflowName?: string | null;
|
|
180
|
-
workflowStatus?: string | null;
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* Tag entity
|
|
184
|
-
*/
|
|
185
|
-
export interface Tag {
|
|
186
|
-
id: number;
|
|
187
|
-
name: string;
|
|
188
|
-
usageCount: number;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Relationship entity
|
|
192
|
-
*/
|
|
193
|
-
export interface Relationship {
|
|
194
|
-
id: number;
|
|
195
|
-
fromEntryId: number;
|
|
196
|
-
toEntryId: number;
|
|
197
|
-
relationshipType: RelationshipType;
|
|
198
|
-
description: string | null;
|
|
199
|
-
createdAt: string;
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Embedding entity for vector search
|
|
203
|
-
*/
|
|
204
|
-
export interface Embedding {
|
|
205
|
-
entryId: number;
|
|
206
|
-
embedding: Float32Array;
|
|
207
|
-
modelName: string;
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Importance scoring breakdown showing weighted component contributions
|
|
211
|
-
*/
|
|
212
|
-
export interface ImportanceBreakdown {
|
|
213
|
-
/** Significance type contribution (weight: 0.30) */
|
|
214
|
-
significance: number;
|
|
215
|
-
/** Relationship count contribution (weight: 0.35) */
|
|
216
|
-
relationships: number;
|
|
217
|
-
/** Causal relationship contribution (weight: 0.20) */
|
|
218
|
-
causal: number;
|
|
219
|
-
/** Recency decay contribution (weight: 0.15) */
|
|
220
|
-
recency: number;
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Importance calculation result with total score and component breakdown
|
|
224
|
-
*/
|
|
225
|
-
export interface ImportanceResult {
|
|
226
|
-
/** Total importance score (0.0-1.0) */
|
|
227
|
-
score: number;
|
|
228
|
-
/** Weighted component contributions */
|
|
229
|
-
breakdown: ImportanceBreakdown;
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* GitHub project information
|
|
233
|
-
*/
|
|
234
|
-
export interface GitHubProject {
|
|
235
|
-
number: number;
|
|
236
|
-
title: string;
|
|
237
|
-
url: string;
|
|
238
|
-
state: 'OPEN' | 'CLOSED';
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* GitHub issue information
|
|
242
|
-
*/
|
|
243
|
-
export interface GitHubIssue {
|
|
244
|
-
number: number;
|
|
245
|
-
title: string;
|
|
246
|
-
url: string;
|
|
247
|
-
state: 'OPEN' | 'CLOSED';
|
|
248
|
-
milestone?: {
|
|
249
|
-
number: number;
|
|
250
|
-
title: string;
|
|
251
|
-
} | null;
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* GitHub pull request information
|
|
255
|
-
*/
|
|
256
|
-
export interface GitHubPullRequest {
|
|
257
|
-
number: number;
|
|
258
|
-
title: string;
|
|
259
|
-
url: string;
|
|
260
|
-
state: 'OPEN' | 'CLOSED' | 'MERGED';
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* GitHub milestone information
|
|
264
|
-
*/
|
|
265
|
-
export interface GitHubMilestone {
|
|
266
|
-
number: number;
|
|
267
|
-
title: string;
|
|
268
|
-
description: string | null;
|
|
269
|
-
state: 'open' | 'closed';
|
|
270
|
-
url: string;
|
|
271
|
-
dueOn: string | null;
|
|
272
|
-
openIssues: number;
|
|
273
|
-
closedIssues: number;
|
|
274
|
-
createdAt: string;
|
|
275
|
-
updatedAt: string;
|
|
276
|
-
creator: string | null;
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* GitHub workflow run information
|
|
280
|
-
*/
|
|
281
|
-
export interface GitHubWorkflowRun {
|
|
282
|
-
id: number;
|
|
283
|
-
name: string;
|
|
284
|
-
status: 'queued' | 'in_progress' | 'completed';
|
|
285
|
-
conclusion: 'success' | 'failure' | 'cancelled' | 'skipped' | null;
|
|
286
|
-
url: string;
|
|
287
|
-
headBranch: string;
|
|
288
|
-
headSha: string;
|
|
289
|
-
createdAt: string;
|
|
290
|
-
updatedAt: string;
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Auto-captured project context
|
|
294
|
-
*/
|
|
295
|
-
export interface ProjectContext {
|
|
296
|
-
repoName: string | null;
|
|
297
|
-
branch: string | null;
|
|
298
|
-
commit: string | null;
|
|
299
|
-
remoteUrl: string | null;
|
|
300
|
-
projects: GitHubProject[];
|
|
301
|
-
issues: GitHubIssue[];
|
|
302
|
-
pullRequests: GitHubPullRequest[];
|
|
303
|
-
workflowRuns: GitHubWorkflowRun[];
|
|
304
|
-
milestones: GitHubMilestone[];
|
|
305
|
-
}
|
|
306
|
-
/**
|
|
307
|
-
* Repository statistics (stars, forks, watchers)
|
|
308
|
-
*/
|
|
309
|
-
export interface RepoStats {
|
|
310
|
-
stars: number;
|
|
311
|
-
forks: number;
|
|
312
|
-
watchers: number;
|
|
313
|
-
openIssues: number;
|
|
314
|
-
size: number;
|
|
315
|
-
defaultBranch: string;
|
|
316
|
-
}
|
|
317
|
-
/**
|
|
318
|
-
* Aggregated traffic data (14-day rolling)
|
|
319
|
-
*/
|
|
320
|
-
export interface TrafficData {
|
|
321
|
-
clones: {
|
|
322
|
-
total: number;
|
|
323
|
-
unique: number;
|
|
324
|
-
dailyAvg: number;
|
|
325
|
-
};
|
|
326
|
-
views: {
|
|
327
|
-
total: number;
|
|
328
|
-
unique: number;
|
|
329
|
-
dailyAvg: number;
|
|
330
|
-
};
|
|
331
|
-
period: string;
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Traffic referrer source
|
|
335
|
-
*/
|
|
336
|
-
export interface TrafficReferrer {
|
|
337
|
-
referrer: string;
|
|
338
|
-
count: number;
|
|
339
|
-
uniques: number;
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* Popular repository path
|
|
343
|
-
*/
|
|
344
|
-
export interface PopularPath {
|
|
345
|
-
path: string;
|
|
346
|
-
title: string;
|
|
347
|
-
count: number;
|
|
348
|
-
uniques: number;
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* Status option for single-select field in Projects v2
|
|
352
|
-
*/
|
|
353
|
-
export interface ProjectV2StatusOption {
|
|
354
|
-
id: string;
|
|
355
|
-
name: string;
|
|
356
|
-
color?: string;
|
|
357
|
-
}
|
|
358
|
-
/**
|
|
359
|
-
* Project item in a Kanban board
|
|
360
|
-
*/
|
|
361
|
-
export interface ProjectV2Item {
|
|
362
|
-
id: string;
|
|
363
|
-
title: string;
|
|
364
|
-
url: string;
|
|
365
|
-
type: 'ISSUE' | 'PULL_REQUEST' | 'DRAFT_ISSUE';
|
|
366
|
-
status: string | null;
|
|
367
|
-
number?: number;
|
|
368
|
-
labels?: string[];
|
|
369
|
-
assignees?: string[];
|
|
370
|
-
createdAt: string;
|
|
371
|
-
updatedAt: string;
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* Kanban column (grouped by Status)
|
|
375
|
-
*/
|
|
376
|
-
export interface KanbanColumn {
|
|
377
|
-
status: string;
|
|
378
|
-
statusOptionId: string;
|
|
379
|
-
items: ProjectV2Item[];
|
|
380
|
-
}
|
|
381
|
-
/**
|
|
382
|
-
* Full Kanban board response
|
|
383
|
-
*/
|
|
384
|
-
export interface KanbanBoard {
|
|
385
|
-
projectId: string;
|
|
386
|
-
projectNumber: number;
|
|
387
|
-
projectTitle: string;
|
|
388
|
-
statusFieldId: string;
|
|
389
|
-
statusOptions: ProjectV2StatusOption[];
|
|
390
|
-
columns: KanbanColumn[];
|
|
391
|
-
totalItems: number;
|
|
392
|
-
}
|
|
393
136
|
/**
|
|
394
137
|
* Server configuration
|
|
395
138
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAGjE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,EAAE,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S,EAAE,MAAM,CAAA;QACjB,UAAU,EAAE,MAAM,CAAA;QAClB,iBAAiB,EAAE,MAAM,CAAA;QACzB,iBAAiB,EAAE,MAAM,CAAA;QACzB,QAAQ,EAAE,MAAM,CAAA;KACnB,CAAA;IAED,yBAAyB;IACzB,OAAO,EAAE;QACL,SAAS,EAAE,MAAM,CAAA;QACjB,KAAK,EAAE,MAAM,CAAA;QACb,UAAU,EAAE;YACR,QAAQ,EAAE,MAAM,CAAA;YAChB,SAAS,EAAE,MAAM,CAAA;YACjB,SAAS,EAAE,MAAM,CAAA;SACpB,GAAG,IAAI,CAAA;KACX,CAAA;IAED,iCAAiC;IACjC,WAAW,EAAE;QACT,SAAS,EAAE,OAAO,CAAA;QAClB,SAAS,EAAE,MAAM,CAAA;QACjB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;KAC3B,GAAG,IAAI,CAAA;IAER,gCAAgC;IAChC,UAAU,EAAE;QACR,MAAM,EAAE,OAAO,CAAA;QACf,YAAY,EAAE,MAAM,CAAA;QACpB,UAAU,EAAE,MAAM,CAAA;QAClB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;KAC9B,CAAA;IAED,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAA;CACpB"}
|
package/dist/types/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Memory Journal MCP Server - Type Definitions
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Barrel file re-exporting all types from sub-modules, plus types
|
|
5
|
+
* that depend on external imports (SqliteAdapter, VectorSearchManager, etc.).
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
8
8
|
* Default configuration values
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAwOH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAA0B;IACjD,MAAM,EAAE,qBAAqB;IAC7B,oBAAoB,EAAE,IAAI;IAC1B,SAAS,EAAE,kBAAkB;CAChC,CAAA"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized Error Helpers for Memory Journal MCP
|
|
3
|
+
*
|
|
4
|
+
* Provides consistent error formatting across all tool handlers.
|
|
5
|
+
* Follows the deterministic error handling standard from mysql-mcp:
|
|
6
|
+
* all errors return { success: false, error: "Human-readable message" }
|
|
7
|
+
* instead of throwing uncaught exceptions.
|
|
8
|
+
*/
|
|
9
|
+
import { ZodError } from 'zod';
|
|
10
|
+
/**
|
|
11
|
+
* Extract human-readable messages from a ZodError instead of raw JSON array.
|
|
12
|
+
* Maps each Zod issue to its path + message for clear validation feedback.
|
|
13
|
+
*/
|
|
14
|
+
export declare function formatZodError(error: ZodError): string;
|
|
15
|
+
/**
|
|
16
|
+
* Format any caught error into a structured handler error response.
|
|
17
|
+
*
|
|
18
|
+
* Handles ZodError (validation) and general errors (runtime).
|
|
19
|
+
* Use as the single catch block for all tool handlers:
|
|
20
|
+
*
|
|
21
|
+
* ```typescript
|
|
22
|
+
* handler: async (params) => {
|
|
23
|
+
* try {
|
|
24
|
+
* const parsed = Schema.parse(params);
|
|
25
|
+
* // ... domain logic ...
|
|
26
|
+
* return { success: true, ... };
|
|
27
|
+
* } catch (err) {
|
|
28
|
+
* return formatHandlerError(err);
|
|
29
|
+
* }
|
|
30
|
+
* }
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function formatHandlerError(err: unknown): {
|
|
34
|
+
success: false;
|
|
35
|
+
error: string;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=error-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-helpers.d.ts","sourceRoot":"","sources":["../../src/utils/error-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAE9B;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAOtD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG;IAC9C,OAAO,EAAE,KAAK,CAAA;IACd,KAAK,EAAE,MAAM,CAAA;CAChB,CAMA"}
|