memory-journal-mcp 4.3.0 → 4.4.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/.dockerignore +131 -122
- package/.gitattributes +29 -0
- package/.github/workflows/docker-publish.yml +1 -1
- package/.github/workflows/lint-and-test.yml +1 -2
- package/.github/workflows/secrets-scanning.yml +0 -1
- package/.github/workflows/security-update.yml +6 -6
- package/.vscode/settings.json +17 -15
- package/CHANGELOG.md +1065 -11
- package/DOCKER_README.md +51 -33
- package/Dockerfile +14 -12
- package/README.md +68 -33
- package/SECURITY.md +225 -220
- package/dist/cli.js +7 -0
- package/dist/cli.js.map +1 -1
- package/dist/constants/ServerInstructions.d.ts +1 -1
- package/dist/constants/ServerInstructions.d.ts.map +1 -1
- package/dist/constants/ServerInstructions.js +70 -26
- package/dist/constants/ServerInstructions.js.map +1 -1
- package/dist/constants/icons.d.ts +2 -0
- package/dist/constants/icons.d.ts.map +1 -1
- package/dist/constants/icons.js +6 -0
- package/dist/constants/icons.js.map +1 -1
- package/dist/database/SqliteAdapter.d.ts +51 -10
- package/dist/database/SqliteAdapter.d.ts.map +1 -1
- package/dist/database/SqliteAdapter.js +143 -43
- package/dist/database/SqliteAdapter.js.map +1 -1
- package/dist/filtering/ToolFilter.d.ts +1 -1
- package/dist/filtering/ToolFilter.d.ts.map +1 -1
- package/dist/filtering/ToolFilter.js +7 -1
- package/dist/filtering/ToolFilter.js.map +1 -1
- package/dist/github/GitHubIntegration.d.ts +74 -2
- package/dist/github/GitHubIntegration.d.ts.map +1 -1
- package/dist/github/GitHubIntegration.js +508 -7
- package/dist/github/GitHubIntegration.js.map +1 -1
- package/dist/handlers/prompts/index.js +1 -0
- package/dist/handlers/prompts/index.js.map +1 -1
- package/dist/handlers/resources/index.d.ts.map +1 -1
- package/dist/handlers/resources/index.js +257 -13
- package/dist/handlers/resources/index.js.map +1 -1
- package/dist/handlers/tools/index.d.ts.map +1 -1
- package/dist/handlers/tools/index.js +595 -8
- package/dist/handlers/tools/index.js.map +1 -1
- package/dist/server/McpServer.d.ts +2 -0
- package/dist/server/McpServer.d.ts.map +1 -1
- package/dist/server/McpServer.js +69 -26
- package/dist/server/McpServer.js.map +1 -1
- package/dist/types/index.d.ts +97 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/utils/logger.d.ts +1 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +8 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/progress-utils.d.ts +18 -3
- package/dist/utils/progress-utils.d.ts.map +1 -1
- package/dist/utils/progress-utils.js.map +1 -1
- package/dist/utils/security-utils.d.ts +91 -0
- package/dist/utils/security-utils.d.ts.map +1 -0
- package/dist/utils/security-utils.js +184 -0
- package/dist/utils/security-utils.js.map +1 -0
- package/dist/vector/VectorSearchManager.d.ts +2 -1
- package/dist/vector/VectorSearchManager.d.ts.map +1 -1
- package/dist/vector/VectorSearchManager.js +100 -34
- package/dist/vector/VectorSearchManager.js.map +1 -1
- package/docker-compose.yml +46 -37
- package/mcp-config-example.json +0 -2
- package/package.json +21 -14
- package/releases/v4.3.1.md +69 -0
- package/releases/v4.4.0.md +120 -0
- package/server.json +3 -3
- package/src/cli.ts +11 -0
- package/src/constants/ServerInstructions.ts +70 -26
- package/src/constants/icons.ts +7 -0
- package/src/database/SqliteAdapter.ts +165 -44
- package/src/filtering/ToolFilter.ts +7 -1
- package/src/github/GitHubIntegration.ts +588 -8
- package/src/handlers/prompts/index.ts +1 -0
- package/src/handlers/resources/index.ts +318 -12
- package/src/handlers/tools/index.ts +686 -13
- package/src/server/McpServer.ts +79 -37
- package/src/types/index.ts +98 -0
- package/src/utils/logger.ts +10 -1
- package/src/utils/progress-utils.ts +17 -6
- package/src/utils/security-utils.ts +205 -0
- package/src/vector/VectorSearchManager.ts +110 -39
- package/tests/constants/icons.test.ts +102 -0
- package/tests/constants/server-instructions.test.ts +549 -0
- package/tests/database/sqlite-adapter.bench.ts +63 -0
- package/tests/database/sqlite-adapter.test.ts +555 -0
- package/tests/filtering/tool-filter.test.ts +266 -0
- package/tests/github/github-integration.test.ts +1024 -0
- package/tests/handlers/github-resource-handlers.test.ts +473 -0
- package/tests/handlers/github-tool-handlers.test.ts +556 -0
- package/tests/handlers/prompt-handlers.test.ts +91 -0
- package/tests/handlers/resource-handlers.test.ts +339 -0
- package/tests/handlers/tool-handlers.test.ts +497 -0
- package/tests/handlers/vector-tool-handlers.test.ts +238 -0
- package/tests/security/sql-injection.test.ts +347 -0
- package/tests/server/mcp-server.bench.ts +55 -0
- package/tests/server/mcp-server.test.ts +675 -0
- package/tests/utils/logger.test.ts +180 -0
- package/tests/utils/mcp-logger.test.ts +212 -0
- package/tests/utils/progress-utils.test.ts +156 -0
- package/tests/utils/security-utils.test.ts +82 -0
- package/tests/vector/vector-search-manager.test.ts +335 -0
- package/tests/vector/vector-search.bench.ts +53 -0
- package/vitest.config.ts +15 -0
- package/.github/workflows/DOCKER_DEPLOYMENT_SETUP.md +0 -387
- package/.github/workflows/dependabot-auto-merge.yml +0 -42
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* These instructions are automatically sent to MCP clients during initialization,
|
|
5
5
|
* providing guidance for AI agents on tool usage.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* Unreleased: Optimized for token efficiency with tiered instruction levels.
|
|
8
8
|
*/
|
|
9
9
|
import { TOOL_GROUPS } from '../filtering/ToolFilter.js';
|
|
10
10
|
/**
|
|
@@ -41,6 +41,7 @@ const GITHUB_INSTRUCTIONS = `
|
|
|
41
41
|
- After closing issue/merging PR → create summary entry with learnings
|
|
42
42
|
- CI failures → \`actions-failure-digest\` prompt or \`memory://actions/recent\`
|
|
43
43
|
- Kanban: \`get_kanban_board(project_number)\` → \`move_kanban_item\` → document completion
|
|
44
|
+
- Milestones: \`get_github_milestones\` → track project progress, \`memory://github/milestones\`
|
|
44
45
|
- GitHub tools auto-detect owner/repo from git context; specify explicitly if null
|
|
45
46
|
`;
|
|
46
47
|
/**
|
|
@@ -81,10 +82,10 @@ const TOOL_PARAMETER_REFERENCE = `
|
|
|
81
82
|
### Entry Operations
|
|
82
83
|
| Tool | Required Parameters | Optional Parameters |
|
|
83
84
|
|------|---------------------|---------------------|
|
|
84
|
-
| \`create_entry\` | \`content\` (string) | \`entry_type\`, \`tags\` (array), \`is_personal\`
|
|
85
|
+
| \`create_entry\` | \`content\` (string) | \`entry_type\`, \`tags\` (array), \`is_personal\`, \`significance_type\`, \`share_with_team\`, \`auto_context\`, \`issue_number\`, \`issue_url\`, \`pr_number\`, \`pr_url\`, \`pr_status\`, \`project_number\`, \`project_owner\`, \`workflow_run_id\`, \`workflow_name\`, \`workflow_status\` |
|
|
85
86
|
| \`create_entry_minimal\` | \`content\` (string) | none |
|
|
86
|
-
| \`get_entry_by_id\` | \`entry_id\` (number) |
|
|
87
|
-
| \`get_recent_entries\` | none | \`limit\` (default
|
|
87
|
+
| \`get_entry_by_id\` | \`entry_id\` (number) | \`include_relationships\` (bool, default true) |
|
|
88
|
+
| \`get_recent_entries\` | none | \`limit\` (default 5), \`is_personal\` (bool) |
|
|
88
89
|
| \`update_entry\` | \`entry_id\` (number) | \`content\`, \`tags\`, \`entry_type\`, \`is_personal\` |
|
|
89
90
|
| \`delete_entry\` | \`entry_id\` (number) | \`permanent\` (bool, default false) |
|
|
90
91
|
| \`list_tags\` | none | none |
|
|
@@ -92,33 +93,40 @@ const TOOL_PARAMETER_REFERENCE = `
|
|
|
92
93
|
### Search Tools
|
|
93
94
|
| Tool | Required Parameters | Optional Parameters |
|
|
94
95
|
|------|---------------------|---------------------|
|
|
95
|
-
| \`search_entries\` | \`query\`
|
|
96
|
-
| \`search_by_date_range\` | \`start_date\`, \`end_date\` (YYYY-MM-DD) | \`tags\`, \`entry_type\` |
|
|
97
|
-
| \`semantic_search\` | \`query\` (string) | \`limit\`, \`similarity_threshold\` (default 0.
|
|
96
|
+
| \`search_entries\` | none | \`query\`, \`limit\`, \`is_personal\`, \`issue_number\`, \`pr_number\`, \`pr_status\`, \`project_number\`, \`workflow_run_id\` |
|
|
97
|
+
| \`search_by_date_range\` | \`start_date\`, \`end_date\` (YYYY-MM-DD) | \`tags\`, \`entry_type\`, \`is_personal\`, \`issue_number\`, \`pr_number\`, \`project_number\`, \`workflow_run_id\` |
|
|
98
|
+
| \`semantic_search\` | \`query\` (string) | \`limit\`, \`similarity_threshold\` (default 0.25), \`is_personal\`, \`hint_on_empty\` (bool, default true) |
|
|
98
99
|
| \`get_vector_index_stats\` | none | none |
|
|
99
100
|
|
|
100
101
|
### Relationship Tools
|
|
101
102
|
| Tool | Required Parameters | Notes |
|
|
102
103
|
|------|---------------------|-------|
|
|
103
|
-
| \`link_entries\` | \`from_entry_id\`, \`to_entry_id\` (numbers) | Types: \`evolves_from\`, \`references\`, \`implements\`, \`clarifies\`, \`response_to\`, \`blocked_by\`, \`resolved\`, \`caused\` |
|
|
104
|
-
| \`visualize_relationships\` | \`entry_id\` (
|
|
104
|
+
| \`link_entries\` | \`from_entry_id\`, \`to_entry_id\` (numbers) | Types: \`evolves_from\`, \`references\`, \`implements\`, \`clarifies\`, \`response_to\`, \`blocked_by\`, \`resolved\`, \`caused\`. Optional \`description\`. |
|
|
105
|
+
| \`visualize_relationships\` | none | Optional \`entry_id\`, \`tags\` (array), \`depth\` (1-3, default 2), \`limit\` (default 20). Returns Mermaid diagram. |
|
|
105
106
|
|
|
106
107
|
### GitHub Tools
|
|
107
108
|
| Tool | Required Parameters | Notes |
|
|
108
109
|
|------|---------------------|-------|
|
|
109
|
-
| \`get_github_context\` | none | Returns repo info, open issues/PRs |
|
|
110
|
-
| \`get_github_issues\` | none | Optional \`state\` (open/closed/all), \`limit\` |
|
|
111
|
-
| \`get_github_prs\` | none | Optional \`state\`, \`limit\` |
|
|
112
|
-
| \`get_github_issue\` | \`issue_number\` (number) | Fetches single issue details |
|
|
113
|
-
| \`get_github_pr\` | \`pr_number\` (number) | Fetches single PR details |
|
|
110
|
+
| \`get_github_context\` | none | Returns repo info, open issues/PRs. Only counts OPEN items. |
|
|
111
|
+
| \`get_github_issues\` | none | Optional \`state\` (open/closed/all), \`limit\`, \`owner\`, \`repo\` |
|
|
112
|
+
| \`get_github_prs\` | none | Optional \`state\`, \`limit\`, \`owner\`, \`repo\` |
|
|
113
|
+
| \`get_github_issue\` | \`issue_number\` (number) | Optional \`owner\`, \`repo\`. Fetches single issue details. |
|
|
114
|
+
| \`get_github_pr\` | \`pr_number\` (number) | Optional \`owner\`, \`repo\`. Fetches single PR details. |
|
|
115
|
+
| \`get_repo_insights\` | none | Optional \`sections\` (stars/traffic/referrers/paths/all, default "stars"), \`owner\`, \`repo\`. Requires push access for traffic. |
|
|
114
116
|
|
|
115
117
|
GitHub tools auto-detect owner/repo from GITHUB_REPO_PATH. If \`detectedOwner\`/\`detectedRepo\` are null in response, specify \`owner\` and \`repo\` parameters explicitly.
|
|
116
118
|
|
|
119
|
+
### Issue Lifecycle Tools
|
|
120
|
+
| Tool | Required Parameters | Notes |
|
|
121
|
+
|------|---------------------|-------|
|
|
122
|
+
| \`create_github_issue_with_entry\` | \`title\` (string) | Optional \`body\`, \`labels\` (array), \`assignees\` (array), \`project_number\`, \`initial_status\`, \`milestone_number\`, \`entry_content\`, \`tags\`, \`owner\`, \`repo\` |
|
|
123
|
+
| \`close_github_issue_with_entry\` | \`issue_number\` (number) | Optional \`comment\`, \`resolution_notes\`, \`tags\`, \`move_to_done\` (bool), \`project_number\`, \`owner\`, \`repo\` |
|
|
124
|
+
|
|
117
125
|
### Kanban Tools (GitHub Projects v2)
|
|
118
126
|
| Tool | Required Parameters | Notes |
|
|
119
127
|
|------|---------------------|-------|
|
|
120
|
-
| \`get_kanban_board\` | \`project_number\` (number) | Returns columns with items grouped by Status |
|
|
121
|
-
| \`move_kanban_item\` | \`project_number\`, \`item_id\` (string), \`target_status\` (string) | \`item_id\` is the GraphQL node ID from board items |
|
|
128
|
+
| \`get_kanban_board\` | \`project_number\` (number) | Optional \`owner\`. Returns columns with items grouped by Status |
|
|
129
|
+
| \`move_kanban_item\` | \`project_number\`, \`item_id\` (string), \`target_status\` (string) | Optional \`owner\`. \`item_id\` is the GraphQL node ID from board items. Status matching is case-insensitive. |
|
|
122
130
|
|
|
123
131
|
**Finding the right project**: User may have multiple projects. Use \`get_kanban_board\` with different project numbers (1, 2, 3...) to find the correct one by checking \`projectTitle\`.
|
|
124
132
|
|
|
@@ -135,33 +143,53 @@ Kanban resources:
|
|
|
135
143
|
- \`memory://kanban/{project_number}\` - JSON board data
|
|
136
144
|
- \`memory://kanban/{project_number}/diagram\` - Mermaid visualization
|
|
137
145
|
|
|
146
|
+
### Milestone Tools
|
|
147
|
+
| Tool | Required Parameters | Notes |
|
|
148
|
+
|------|---------------------|-------|
|
|
149
|
+
| \`get_github_milestones\` | none | Optional \`state\` (open/closed/all), \`limit\`, \`owner\`, \`repo\` |
|
|
150
|
+
| \`get_github_milestone\` | \`milestone_number\` (number) | Optional \`owner\`, \`repo\`. Single milestone with completion %. |
|
|
151
|
+
| \`create_github_milestone\` | \`title\` (string) | Optional \`description\`, \`due_on\` (YYYY-MM-DD), \`owner\`, \`repo\` |
|
|
152
|
+
| \`update_github_milestone\` | \`milestone_number\` (number) | Optional \`title\`, \`description\`, \`due_on\`, \`state\` (open/closed), \`owner\`, \`repo\` |
|
|
153
|
+
| \`delete_github_milestone\` | \`milestone_number\`, \`confirm: true\` | Optional \`owner\`, \`repo\`. Permanent deletion. |
|
|
154
|
+
|
|
155
|
+
Milestone resources:
|
|
156
|
+
- \`memory://github/milestones\` - Open milestones with completion %
|
|
157
|
+
- \`memory://milestones/{number}\` - Single milestone detail
|
|
158
|
+
|
|
138
159
|
### Admin Tools
|
|
139
160
|
| Tool | Required Parameters | Notes |
|
|
140
161
|
|------|---------------------|-------|
|
|
141
|
-
| \`backup_journal\` | none | Optional \`
|
|
162
|
+
| \`backup_journal\` | none | Optional \`name\` (custom backup name) |
|
|
142
163
|
| \`list_backups\` | none | Returns available backup files |
|
|
143
|
-
| \`
|
|
164
|
+
| \`cleanup_backups\` | none | Optional \`keep_count\` (default 5). Deletes old backups, keeps N most recent. |
|
|
165
|
+
| \`restore_backup\` | \`filename\`, \`confirm: true\` | Creates auto-backup before restore |
|
|
144
166
|
| \`add_to_vector_index\` | \`entry_id\` (single number) | Indexes one entry for semantic search |
|
|
145
167
|
| \`rebuild_vector_index\` | none | Re-indexes all entries |
|
|
146
168
|
|
|
147
169
|
### Export Tools
|
|
148
170
|
| Tool | Required Parameters | Notes |
|
|
149
171
|
|------|---------------------|-------|
|
|
150
|
-
| \`export_entries\` | none | Optional \`format\` (json/markdown), \`limit
|
|
172
|
+
| \`export_entries\` | none | Optional \`format\` (json/markdown), \`limit\` (default 100), \`tags\`, \`start_date\`, \`end_date\`, \`entry_types\` |
|
|
151
173
|
|
|
152
174
|
## Entry Types
|
|
153
175
|
Valid values for \`entry_type\` parameter:
|
|
154
176
|
- \`personal_reflection\` (default) - Personal thoughts and notes
|
|
155
|
-
- \`
|
|
177
|
+
- \`project_decision\` - Architectural and team decisions
|
|
178
|
+
- \`technical_achievement\` - Milestones and breakthroughs
|
|
156
179
|
- \`bug_fix\` - Bug fixes and resolutions
|
|
157
|
-
- \`
|
|
180
|
+
- \`feature_implementation\` - Feature builds and rollouts
|
|
158
181
|
- \`code_review\` - Code review notes
|
|
159
|
-
- \`
|
|
160
|
-
- \`
|
|
182
|
+
- \`meeting_notes\` - Meeting summaries
|
|
183
|
+
- \`learning\` - Learning and research insights
|
|
184
|
+
- \`research\` - Research and exploration
|
|
185
|
+
- \`planning\` - Planning sessions and roadmaps (\`create_github_issue_with_entry\` uses this type)
|
|
186
|
+
- \`retrospective\` - Sprint and project retrospectives
|
|
187
|
+
- \`standup\` - Daily standup notes
|
|
188
|
+
- \`other\` - Miscellaneous
|
|
161
189
|
|
|
162
190
|
## Field Notes
|
|
163
191
|
- **\`autoContext\`**: Reserved for future automatic context capture. Currently always \`null\`.
|
|
164
|
-
- **\`memory://tags\` vs \`list_tags\`**: Resource includes \`id\`, \`name\`, \`count\`; tool returns only \`name\`, \`count\`.
|
|
192
|
+
- **\`memory://tags\` vs \`list_tags\`**: Resource includes \`id\`, \`name\`, \`count\`; tool returns only \`name\`, \`count\`. Neither returns orphan tags with zero usage.
|
|
165
193
|
- **Tag naming**: Use lowercase with dashes (e.g., \`bug-fix\`, \`phase-2\`). Use \`merge_tags\` to consolidate duplicates (e.g., merge \`phase2\` into \`phase-2\`).
|
|
166
194
|
- **\`merge_tags\` behavior**: Only updates non-deleted entries. Deleted entries retain their original tags.
|
|
167
195
|
- **\`prStatus\` in entries**: Reflects PR state at entry creation time, not current state. Use \`get_github_pr\` for live status.
|
|
@@ -170,19 +198,35 @@ Valid values for \`entry_type\` parameter:
|
|
|
170
198
|
- **\`semantic_search\` thresholds**: Default similarity threshold is 0.25. For broader matches, try 0.15-0.2. Higher values (0.4+) return only very close semantic matches.
|
|
171
199
|
- **Causal relationship types**: Use \`blocked_by\` (A was blocked by B), \`resolved\` (A resolved B), \`caused\` (A caused B) for decision tracing and failure analysis. Visualizations use distinct arrow styles for causal types.
|
|
172
200
|
- **Enhanced analytics**: \`get_statistics\` returns \`decisionDensity\` (significant entries per period), \`relationshipComplexity\` (avg relationships per entry), \`activityTrend\` (period-over-period growth %), and \`causalMetrics\` (counts for blocked_by/resolved/caused).
|
|
173
|
-
- **Importance scores**: \`get_entry_by_id\` returns
|
|
201
|
+
- **Importance scores**: \`get_entry_by_id\` returns \`importance\` (0.0-1.0) and \`importanceBreakdown\` showing weighted components: significance (30%), relationships (35%), causal (20%), recency (15%). \`memory://significant\` sorts entries by importance.
|
|
202
|
+
- **\`inactiveThresholdDays\`**: \`get_cross_project_insights\` includes \`inactiveThresholdDays: 7\` in output, documenting the inactive project classification cutoff.
|
|
203
|
+
- **GitHub metadata in entries**: Entry output includes 10 GitHub fields (\`issueNumber\`, \`issueUrl\`, \`prNumber\`, \`prUrl\`, \`prStatus\`, \`projectNumber\`, \`projectOwner\`, \`workflowRunId\`, \`workflowName\`, \`workflowStatus\`) in all tool responses.
|
|
204
|
+
- **\`delete_entry\` on soft-deleted**: \`delete_entry(id, permanent: true)\` works on previously soft-deleted entries. Returns \`success: false\` for nonexistent entries.
|
|
174
205
|
|
|
175
206
|
## Key Resources
|
|
176
207
|
| URI | Description |
|
|
177
208
|
|-----|-------------|
|
|
178
209
|
| \`memory://health\` | Server health, DB stats, tool filter status |
|
|
179
210
|
| \`memory://briefing\` | Session context with userMessage to show user |
|
|
211
|
+
| \`memory://instructions\` | Full server instructions and tool reference |
|
|
180
212
|
| \`memory://statistics\` | Entry counts by type and period |
|
|
181
213
|
| \`memory://recent\` | 10 most recent entries |
|
|
182
214
|
| \`memory://tags\` | All tags with usage counts |
|
|
183
|
-
| \`memory://significant\` | Entries
|
|
215
|
+
| \`memory://significant\` | Entries sorted by importance score |
|
|
184
216
|
| \`memory://graph/recent\` | Mermaid diagram of recent relationships |
|
|
217
|
+
| \`memory://graph/actions\` | CI/CD narrative graph |
|
|
218
|
+
| \`memory://actions/recent\` | Recent workflow runs |
|
|
219
|
+
| \`memory://team/recent\` | Team-shared entries |
|
|
220
|
+
| \`memory://github/status\` | GitHub repo overview (CI, issues, PRs, milestones) |
|
|
221
|
+
| \`memory://github/milestones\` | Open milestones with completion % |
|
|
222
|
+
| \`memory://github/insights\` | Stars, forks, and 14-day traffic summary |
|
|
185
223
|
| \`memory://kanban/{n}\` | Kanban board for project number n |
|
|
224
|
+
| \`memory://kanban/{n}/diagram\` | Mermaid Kanban visualization |
|
|
225
|
+
| \`memory://milestones/{n}\` | Single milestone detail + progress |
|
|
226
|
+
| \`memory://projects/{n}/timeline\` | Project entries timeline |
|
|
227
|
+
| \`memory://issues/{n}/entries\` | Entries linked to issue n |
|
|
228
|
+
| \`memory://prs/{n}/entries\` | Entries linked to PR n |
|
|
229
|
+
| \`memory://prs/{n}/timeline\` | PR lifecycle and linked entries |
|
|
186
230
|
`;
|
|
187
231
|
/**
|
|
188
232
|
* Generate dynamic instructions based on enabled tools, resources, prompts, and latest entry
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServerInstructions.js","sourceRoot":"","sources":["../../src/constants/ServerInstructions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAqCxD;;;GAGG;AACH,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;CAoB9B,CAAA;AAED;;GAEG;AACH,MAAM,mBAAmB,GAAG
|
|
1
|
+
{"version":3,"file":"ServerInstructions.js","sourceRoot":"","sources":["../../src/constants/ServerInstructions.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAqCxD;;;GAGG;AACH,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;CAoB9B,CAAA;AAED;;GAEG;AACH,MAAM,mBAAmB,GAAG;;;;;;;;CAQ3B,CAAA;AAED;;GAEG;AACH,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyBlC,CAAA;AAED;;GAEG;AACH,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuJhC,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,oBAAoB,CAChC,YAAyB,EACzB,UAAgC,EAChC,OAA2B,EAC3B,WAAiC,EACjC,QAA0B,UAAU;IAEpC,IAAI,YAAY,GAAG,sBAAsB,CAAA;IAEzC,mEAAmE;IACnE,IAAI,WAAW,EAAE,CAAC;QACd,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,KAAK,CA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MAAM,CAAC,IAAI,QAAQ,MAAM,CAAC,WAAW,IAAI,EAAE,IAAI,CAAA;YAC1E,CAAC;QACL,CAAC;IACL,CAAC;IAED,OAAO,YAAY,CAAA;AACvB,CAAC;AAED;;GAEG;AACH,SAAS,mBAAmB,CAAC,YAAyB;IAClD,MAAM,YAAY,GAA4C,EAAE,CAAA;IAEhE,KAAK,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAA4B,EAAE,CAAC;QACrF,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAA;QACxE,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5B,YAAY,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC,CAAA;QACvD,CAAC;IACL,CAAC;IAED,OAAO,YAAY,CAAA;AACvB,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAAsB,GAAG,mBAAmB,CAAA"}
|
|
@@ -43,6 +43,8 @@ export declare const ICON_TEAM: McpIcon;
|
|
|
43
43
|
export declare const ICON_ISSUE: McpIcon;
|
|
44
44
|
/** Git merge for PR resources */
|
|
45
45
|
export declare const ICON_PR: McpIcon;
|
|
46
|
+
/** Flag for milestone tracking */
|
|
47
|
+
export declare const ICON_MILESTONE: McpIcon;
|
|
46
48
|
/** Message bubble for prompts */
|
|
47
49
|
export declare const ICON_PROMPT: McpIcon;
|
|
48
50
|
/** Map tool group name to icon */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../src/constants/icons.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAMhD,gDAAgD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C;AAClC,eAAO,MAAM,cAAc,EAAE,OAI5B,CAAA;AAED,iCAAiC;AACjC,eAAO,MAAM,WAAW,EAAE,OAIzB,CAAA;AAMD,kCAAkC;AAClC,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CASpD,CAAA;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,SAAS,CAGhE"}
|
package/dist/constants/icons.js
CHANGED
|
@@ -120,6 +120,12 @@ export const ICON_PR = {
|
|
|
120
120
|
mimeType: 'image/svg+xml',
|
|
121
121
|
sizes: ['24x24'],
|
|
122
122
|
};
|
|
123
|
+
/** Flag for milestone tracking */
|
|
124
|
+
export const ICON_MILESTONE = {
|
|
125
|
+
src: 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"%3E%3Cpath d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z"/%3E%3Cline x1="4" y1="22" x2="4" y2="15"/%3E%3C/svg%3E',
|
|
126
|
+
mimeType: 'image/svg+xml',
|
|
127
|
+
sizes: ['24x24'],
|
|
128
|
+
};
|
|
123
129
|
/** Message bubble for prompts */
|
|
124
130
|
export const ICON_PROMPT = {
|
|
125
131
|
src: 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"%3E%3Cpath d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"/%3E%3C/svg%3E',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/constants/icons.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,+EAA+E;AAC/E,mBAAmB;AACnB,+EAA+E;AAE/E,gDAAgD;AAChD,MAAM,CAAC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,CAAC;CACnB,CAAA;AAED,iCAAiC;AACjC,MAAM,CAAC,MAAM,OAAO,GAAY;IAC5B,GAAG,EAAE,yPAAyP;IAC9P,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,CAAC,OAAO,CAAC;CACnB,CAAA;AAED,kCAAkC;AAClC,MAAM,CAAC,MAAM,cAAc,GAAY;IACnC,GAAG,EAAE,oQAAoQ;IACzQ,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,CAAC,OAAO,CAAC;CACnB,CAAA;AAED,iCAAiC;AACjC,MAAM,CAAC,MAAM,WAAW,GAAY;IAChC,GAAG,EAAE,0NAA0N;IAC/N,QAAQ,EAAE,eAAe;IACzB,KAAK,EAAE,CAAC,OAAO,CAAC;CACnB,CAAA;AAED,+EAA+E;AAC/E,0BAA0B;AAC1B,+EAA+E;AAE/E,kCAAkC;AAClC,MAAM,CAAC,MAAM,gBAAgB,GAA4B;IACrD,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,WAAW;IACnB,SAAS,EAAE,cAAc;IACzB,aAAa,EAAE,kBAAkB;IACjC,MAAM,EAAE,WAAW;IACnB,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,WAAW;CACtB,CAAA;AAED;;GAEG;AACH,MAAM,UAAU,WAAW,CAAC,KAAa;IACrC,MAAM,IAAI,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAA;IACpC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AACpC,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Note: sql.js is pure JavaScript, no native compilation required.
|
|
6
6
|
*/
|
|
7
7
|
import { type Database } from 'sql.js';
|
|
8
|
-
import type { JournalEntry, Tag, Relationship, EntryType, SignificanceType, RelationshipType } from '../types/index.js';
|
|
8
|
+
import type { JournalEntry, Tag, Relationship, EntryType, SignificanceType, RelationshipType, ImportanceResult } from '../types/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* Input for creating a new entry
|
|
11
11
|
*/
|
|
@@ -34,17 +34,30 @@ export declare class SqliteAdapter {
|
|
|
34
34
|
private db;
|
|
35
35
|
private readonly dbPath;
|
|
36
36
|
private initialized;
|
|
37
|
+
/** Timer handle for debounced save */
|
|
38
|
+
private saveTimer;
|
|
39
|
+
/** Debounce interval for batching disk writes (ms) */
|
|
40
|
+
private static readonly SAVE_DEBOUNCE_MS;
|
|
37
41
|
constructor(dbPath: string);
|
|
38
42
|
/**
|
|
39
43
|
* Initialize the database (must be called before using)
|
|
40
44
|
*/
|
|
41
45
|
initialize(): Promise<void>;
|
|
42
46
|
/**
|
|
43
|
-
*
|
|
47
|
+
* Schedule a debounced save to disk.
|
|
48
|
+
* Batches rapid mutations into a single write after SAVE_DEBOUNCE_MS.
|
|
49
|
+
* Used by all mutation methods (createEntry, updateEntry, etc.).
|
|
44
50
|
*/
|
|
45
|
-
private
|
|
51
|
+
private scheduleSave;
|
|
46
52
|
/**
|
|
47
|
-
*
|
|
53
|
+
* Immediately flush the database to disk (synchronous).
|
|
54
|
+
* Cancels any pending debounced save.
|
|
55
|
+
* Used by close() and initialize() for guaranteed persistence.
|
|
56
|
+
*/
|
|
57
|
+
flushSave(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Close database connection.
|
|
60
|
+
* Flushes any pending writes immediately before closing.
|
|
48
61
|
*/
|
|
49
62
|
close(): void;
|
|
50
63
|
/**
|
|
@@ -59,20 +72,46 @@ export declare class SqliteAdapter {
|
|
|
59
72
|
* Get entry by ID
|
|
60
73
|
*/
|
|
61
74
|
getEntryById(id: number): JournalEntry | null;
|
|
75
|
+
/**
|
|
76
|
+
* Get entry by ID, including soft-deleted entries.
|
|
77
|
+
* Used for permanent deletion of previously soft-deleted entries.
|
|
78
|
+
*/
|
|
79
|
+
getEntryByIdIncludeDeleted(id: number): JournalEntry | null;
|
|
80
|
+
/**
|
|
81
|
+
* Importance score result with scoring breakdown
|
|
82
|
+
*/
|
|
83
|
+
static readonly IMPORTANCE_WEIGHTS: {
|
|
84
|
+
readonly significance: 0.3;
|
|
85
|
+
readonly relationships: 0.35;
|
|
86
|
+
readonly causal: 0.2;
|
|
87
|
+
readonly recency: 0.15;
|
|
88
|
+
};
|
|
62
89
|
/**
|
|
63
90
|
* Calculate importance score for an entry (0.0-1.0)
|
|
64
91
|
*
|
|
65
92
|
* Formula:
|
|
66
|
-
* -
|
|
67
|
-
* -
|
|
68
|
-
* -
|
|
69
|
-
* -
|
|
93
|
+
* - significance (0.30): 1.0 if significanceType set, else 0.0
|
|
94
|
+
* - relationships (0.35): min(relCount / 5, 1.0)
|
|
95
|
+
* - causal (0.20): min(causalCount / 3, 1.0)
|
|
96
|
+
* - recency (0.15): max(0, 1 - daysSince / 90)
|
|
97
|
+
*
|
|
98
|
+
* Returns ImportanceResult with score and component breakdown.
|
|
70
99
|
*/
|
|
71
|
-
calculateImportance(entryId: number):
|
|
100
|
+
calculateImportance(entryId: number): ImportanceResult;
|
|
72
101
|
/**
|
|
73
102
|
* Get recent entries
|
|
74
103
|
*/
|
|
75
104
|
getRecentEntries(limit?: number, isPersonal?: boolean): JournalEntry[];
|
|
105
|
+
/**
|
|
106
|
+
* Get a page of active entries for batch processing (e.g., vector index rebuild).
|
|
107
|
+
* Returns entries ordered by ID ascending for deterministic pagination.
|
|
108
|
+
*/
|
|
109
|
+
getEntriesPage(offset: number, limit: number): JournalEntry[];
|
|
110
|
+
/**
|
|
111
|
+
* Get total count of active (non-deleted) entries.
|
|
112
|
+
* Used for progress reporting and pagination bounds.
|
|
113
|
+
*/
|
|
114
|
+
getActiveEntryCount(): number;
|
|
76
115
|
/**
|
|
77
116
|
* Update an entry
|
|
78
117
|
*/
|
|
@@ -84,6 +123,7 @@ export declare class SqliteAdapter {
|
|
|
84
123
|
}): JournalEntry | null;
|
|
85
124
|
/**
|
|
86
125
|
* Soft delete an entry
|
|
126
|
+
* Returns false if entry does not exist (P154: Proactive Object Existence Verification)
|
|
87
127
|
*/
|
|
88
128
|
deleteEntry(id: number, permanent?: boolean): boolean;
|
|
89
129
|
/**
|
|
@@ -114,7 +154,7 @@ export declare class SqliteAdapter {
|
|
|
114
154
|
*/
|
|
115
155
|
getTagsForEntry(entryId: number): string[];
|
|
116
156
|
/**
|
|
117
|
-
* List all tags
|
|
157
|
+
* List all tags with at least one usage
|
|
118
158
|
*/
|
|
119
159
|
listTags(): Tag[];
|
|
120
160
|
/**
|
|
@@ -129,6 +169,7 @@ export declare class SqliteAdapter {
|
|
|
129
169
|
};
|
|
130
170
|
/**
|
|
131
171
|
* Link two entries
|
|
172
|
+
* Throws if either entry does not exist (P154: Proactive Object Existence Verification)
|
|
132
173
|
*/
|
|
133
174
|
linkEntries(fromEntryId: number, toEntryId: number, relationshipType: RelationshipType, description?: string): Relationship;
|
|
134
175
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteAdapter.d.ts","sourceRoot":"","sources":["../../src/database/SqliteAdapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAkB,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"SqliteAdapter.d.ts","sourceRoot":"","sources":["../../src/database/SqliteAdapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAkB,EAAE,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAKjD,OAAO,KAAK,EACR,YAAY,EACZ,GAAG,EACH,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAEhB,gBAAgB,EACnB,MAAM,mBAAmB,CAAA;AA8E1B;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,gBAAgB,CA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