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,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Journal MCP Server - Database Entity Types
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Entry types for journal entries
|
|
7
|
+
*/
|
|
8
|
+
export type EntryType =
|
|
9
|
+
| 'personal_reflection'
|
|
10
|
+
| 'project_decision'
|
|
11
|
+
| 'technical_achievement'
|
|
12
|
+
| 'bug_fix'
|
|
13
|
+
| 'feature_implementation'
|
|
14
|
+
| 'code_review'
|
|
15
|
+
| 'meeting_notes'
|
|
16
|
+
| 'learning'
|
|
17
|
+
| 'research'
|
|
18
|
+
| 'planning'
|
|
19
|
+
| 'retrospective'
|
|
20
|
+
| 'standup'
|
|
21
|
+
| 'technical_note'
|
|
22
|
+
| 'development_note'
|
|
23
|
+
| 'enhancement'
|
|
24
|
+
| 'milestone'
|
|
25
|
+
| 'system_integration_test'
|
|
26
|
+
| 'test_entry'
|
|
27
|
+
| 'other'
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Significance types for important entries
|
|
31
|
+
*/
|
|
32
|
+
export type SignificanceType =
|
|
33
|
+
| 'milestone'
|
|
34
|
+
| 'breakthrough'
|
|
35
|
+
| 'technical_breakthrough'
|
|
36
|
+
| 'decision'
|
|
37
|
+
| 'lesson_learned'
|
|
38
|
+
| 'blocker_resolved'
|
|
39
|
+
| 'release'
|
|
40
|
+
| null
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Relationship types between entries
|
|
44
|
+
*
|
|
45
|
+
* Standard types:
|
|
46
|
+
* - evolves_from: Entry builds upon previous work
|
|
47
|
+
* - references: Entry mentions or links to another
|
|
48
|
+
* - implements: Entry implements a spec/design
|
|
49
|
+
* - clarifies: Entry explains or clarifies another
|
|
50
|
+
* - response_to: Entry responds to a question/issue
|
|
51
|
+
*
|
|
52
|
+
* Causal types (for decision tracing):
|
|
53
|
+
* - blocked_by: Entry was blocked by another (e.g., blocker → resolution)
|
|
54
|
+
* - resolved: Entry resolved/fixed an issue from another
|
|
55
|
+
* - caused: Entry caused or led to another outcome
|
|
56
|
+
*/
|
|
57
|
+
export type RelationshipType =
|
|
58
|
+
| 'evolves_from'
|
|
59
|
+
| 'references'
|
|
60
|
+
| 'implements'
|
|
61
|
+
| 'clarifies'
|
|
62
|
+
| 'response_to'
|
|
63
|
+
| 'blocked_by'
|
|
64
|
+
| 'resolved'
|
|
65
|
+
| 'caused'
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Journal entry entity
|
|
69
|
+
*/
|
|
70
|
+
export interface JournalEntry {
|
|
71
|
+
id: number
|
|
72
|
+
entryType: EntryType
|
|
73
|
+
content: string
|
|
74
|
+
timestamp: string
|
|
75
|
+
isPersonal: boolean
|
|
76
|
+
significanceType: SignificanceType
|
|
77
|
+
autoContext: string | null
|
|
78
|
+
deletedAt: string | null
|
|
79
|
+
tags: string[]
|
|
80
|
+
// GitHub integration fields
|
|
81
|
+
projectNumber?: number | null
|
|
82
|
+
projectOwner?: string | null
|
|
83
|
+
issueNumber?: number | null
|
|
84
|
+
issueUrl?: string | null
|
|
85
|
+
prNumber?: number | null
|
|
86
|
+
prUrl?: string | null
|
|
87
|
+
prStatus?: string | null
|
|
88
|
+
workflowRunId?: number | null
|
|
89
|
+
workflowName?: string | null
|
|
90
|
+
workflowStatus?: string | null
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Tag entity
|
|
95
|
+
*/
|
|
96
|
+
export interface Tag {
|
|
97
|
+
id: number
|
|
98
|
+
name: string
|
|
99
|
+
usageCount: number
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Relationship entity
|
|
104
|
+
*/
|
|
105
|
+
export interface Relationship {
|
|
106
|
+
id: number
|
|
107
|
+
fromEntryId: number
|
|
108
|
+
toEntryId: number
|
|
109
|
+
relationshipType: RelationshipType
|
|
110
|
+
description: string | null
|
|
111
|
+
createdAt: string
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Embedding entity for vector search
|
|
116
|
+
*/
|
|
117
|
+
export interface Embedding {
|
|
118
|
+
entryId: number
|
|
119
|
+
embedding: Float32Array
|
|
120
|
+
modelName: string
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Importance scoring breakdown showing weighted component contributions
|
|
125
|
+
*/
|
|
126
|
+
export interface ImportanceBreakdown {
|
|
127
|
+
/** Significance type contribution (weight: 0.30) */
|
|
128
|
+
significance: number
|
|
129
|
+
/** Relationship count contribution (weight: 0.35) */
|
|
130
|
+
relationships: number
|
|
131
|
+
/** Causal relationship contribution (weight: 0.20) */
|
|
132
|
+
causal: number
|
|
133
|
+
/** Recency decay contribution (weight: 0.15) */
|
|
134
|
+
recency: number
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Importance calculation result with total score and component breakdown
|
|
139
|
+
*/
|
|
140
|
+
export interface ImportanceResult {
|
|
141
|
+
/** Total importance score (0.0-1.0) */
|
|
142
|
+
score: number
|
|
143
|
+
/** Weighted component contributions */
|
|
144
|
+
breakdown: ImportanceBreakdown
|
|
145
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Journal MCP Server - Tool Filtering Types
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Tool group identifiers for Memory Journal
|
|
7
|
+
*/
|
|
8
|
+
export type ToolGroup =
|
|
9
|
+
| 'core' // Entry CRUD: create, get_by_id, get_recent, create_minimal, test_simple
|
|
10
|
+
| 'search' // Search: search_entries, search_by_date_range, semantic_search
|
|
11
|
+
| 'analytics' // Analytics: get_statistics, get_cross_project_insights
|
|
12
|
+
| 'relationships' // Relationships: link_entries, visualize_relationships
|
|
13
|
+
| 'export' // Export: export_entries
|
|
14
|
+
| 'admin' // Admin: update_entry, delete_entry
|
|
15
|
+
| 'github' // Reserved for future GitHub-specific tools
|
|
16
|
+
| 'backup' // Backup: backup_journal, list_backups, restore_backup
|
|
17
|
+
| 'team' // Team: team_create_entry, team_get_recent, team_search
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Meta-group identifiers for common multi-group selections
|
|
21
|
+
*/
|
|
22
|
+
export type MetaGroup =
|
|
23
|
+
| 'starter' // core + search (~8 tools)
|
|
24
|
+
| 'essential' // core only (~5 tools)
|
|
25
|
+
| 'full' // all groups (~16 tools)
|
|
26
|
+
| 'readonly' // everything except admin
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Tool filter rule
|
|
30
|
+
*/
|
|
31
|
+
export interface ToolFilterRule {
|
|
32
|
+
/** Rule type: include or exclude */
|
|
33
|
+
type: 'include' | 'exclude'
|
|
34
|
+
|
|
35
|
+
/** Target: group name or tool name */
|
|
36
|
+
target: string
|
|
37
|
+
|
|
38
|
+
/** Whether target is a group (true) or individual tool (false) */
|
|
39
|
+
isGroup: boolean
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Parsed tool filter configuration
|
|
44
|
+
*/
|
|
45
|
+
export interface ToolFilterConfig {
|
|
46
|
+
/** Original filter string */
|
|
47
|
+
raw: string
|
|
48
|
+
|
|
49
|
+
/** Parsed rules in order */
|
|
50
|
+
rules: ToolFilterRule[]
|
|
51
|
+
|
|
52
|
+
/** Set of enabled tool names after applying rules */
|
|
53
|
+
enabledTools: Set<string>
|
|
54
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Journal MCP Server - GitHub Integration Types
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// GitHub API Types
|
|
7
|
+
// ============================================================================
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* GitHub project information
|
|
11
|
+
*/
|
|
12
|
+
export interface GitHubProject {
|
|
13
|
+
number: number
|
|
14
|
+
title: string
|
|
15
|
+
url: string
|
|
16
|
+
state: 'OPEN' | 'CLOSED'
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* GitHub issue information
|
|
21
|
+
*/
|
|
22
|
+
export interface GitHubIssue {
|
|
23
|
+
number: number
|
|
24
|
+
title: string
|
|
25
|
+
url: string
|
|
26
|
+
state: 'OPEN' | 'CLOSED'
|
|
27
|
+
milestone?: { number: number; title: string } | null
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* GitHub pull request information
|
|
32
|
+
*/
|
|
33
|
+
export interface GitHubPullRequest {
|
|
34
|
+
number: number
|
|
35
|
+
title: string
|
|
36
|
+
url: string
|
|
37
|
+
state: 'OPEN' | 'CLOSED' | 'MERGED'
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* GitHub milestone information
|
|
42
|
+
*/
|
|
43
|
+
export interface GitHubMilestone {
|
|
44
|
+
number: number
|
|
45
|
+
title: string
|
|
46
|
+
description: string | null
|
|
47
|
+
state: 'open' | 'closed'
|
|
48
|
+
url: string
|
|
49
|
+
dueOn: string | null
|
|
50
|
+
openIssues: number
|
|
51
|
+
closedIssues: number
|
|
52
|
+
createdAt: string
|
|
53
|
+
updatedAt: string
|
|
54
|
+
creator: string | null
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* GitHub workflow run information
|
|
59
|
+
*/
|
|
60
|
+
export interface GitHubWorkflowRun {
|
|
61
|
+
id: number
|
|
62
|
+
name: string
|
|
63
|
+
status: 'queued' | 'in_progress' | 'completed'
|
|
64
|
+
conclusion: 'success' | 'failure' | 'cancelled' | 'skipped' | null
|
|
65
|
+
url: string
|
|
66
|
+
headBranch: string
|
|
67
|
+
headSha: string
|
|
68
|
+
createdAt: string
|
|
69
|
+
updatedAt: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Auto-captured project context
|
|
74
|
+
*/
|
|
75
|
+
export interface ProjectContext {
|
|
76
|
+
repoName: string | null
|
|
77
|
+
branch: string | null
|
|
78
|
+
commit: string | null
|
|
79
|
+
remoteUrl: string | null
|
|
80
|
+
projects: GitHubProject[]
|
|
81
|
+
issues: GitHubIssue[]
|
|
82
|
+
pullRequests: GitHubPullRequest[]
|
|
83
|
+
workflowRuns: GitHubWorkflowRun[]
|
|
84
|
+
milestones: GitHubMilestone[]
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// ============================================================================
|
|
88
|
+
// Repository Insights/Traffic Types
|
|
89
|
+
// ============================================================================
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Repository statistics (stars, forks, watchers)
|
|
93
|
+
*/
|
|
94
|
+
export interface RepoStats {
|
|
95
|
+
stars: number
|
|
96
|
+
forks: number
|
|
97
|
+
watchers: number
|
|
98
|
+
openIssues: number
|
|
99
|
+
size: number // KB
|
|
100
|
+
defaultBranch: string
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Aggregated traffic data (14-day rolling)
|
|
105
|
+
*/
|
|
106
|
+
export interface TrafficData {
|
|
107
|
+
clones: { total: number; unique: number; dailyAvg: number }
|
|
108
|
+
views: { total: number; unique: number; dailyAvg: number }
|
|
109
|
+
period: string // e.g. "14 days"
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Traffic referrer source
|
|
114
|
+
*/
|
|
115
|
+
export interface TrafficReferrer {
|
|
116
|
+
referrer: string
|
|
117
|
+
count: number
|
|
118
|
+
uniques: number
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Popular repository path
|
|
123
|
+
*/
|
|
124
|
+
export interface PopularPath {
|
|
125
|
+
path: string
|
|
126
|
+
title: string
|
|
127
|
+
count: number
|
|
128
|
+
uniques: number
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// ============================================================================
|
|
132
|
+
// GitHub Projects v2 Kanban Types
|
|
133
|
+
// ============================================================================
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Status option for single-select field in Projects v2
|
|
137
|
+
*/
|
|
138
|
+
export interface ProjectV2StatusOption {
|
|
139
|
+
id: string
|
|
140
|
+
name: string
|
|
141
|
+
color?: string
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Project item in a Kanban board
|
|
146
|
+
*/
|
|
147
|
+
export interface ProjectV2Item {
|
|
148
|
+
id: string
|
|
149
|
+
title: string
|
|
150
|
+
url: string
|
|
151
|
+
type: 'ISSUE' | 'PULL_REQUEST' | 'DRAFT_ISSUE'
|
|
152
|
+
status: string | null
|
|
153
|
+
number?: number
|
|
154
|
+
labels?: string[]
|
|
155
|
+
assignees?: string[]
|
|
156
|
+
createdAt: string
|
|
157
|
+
updatedAt: string
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Kanban column (grouped by Status)
|
|
162
|
+
*/
|
|
163
|
+
export interface KanbanColumn {
|
|
164
|
+
status: string
|
|
165
|
+
statusOptionId: string
|
|
166
|
+
items: ProjectV2Item[]
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Full Kanban board response
|
|
171
|
+
*/
|
|
172
|
+
export interface KanbanBoard {
|
|
173
|
+
projectId: string
|
|
174
|
+
projectNumber: number
|
|
175
|
+
projectTitle: string
|
|
176
|
+
statusFieldId: string
|
|
177
|
+
statusOptions: ProjectV2StatusOption[]
|
|
178
|
+
columns: KanbanColumn[]
|
|
179
|
+
totalItems: number
|
|
180
|
+
}
|