@prmichaelsen/remember-mcp 3.12.0 → 3.14.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/agent/milestones/milestone-17-remember-core-migration.md +140 -0
  3. package/agent/progress.yaml +123 -6
  4. package/agent/tasks/milestone-17-remember-core-migration/task-193-foundation-setup.md +58 -0
  5. package/agent/tasks/milestone-17-remember-core-migration/task-194-migrate-relationship-tools.md +47 -0
  6. package/agent/tasks/milestone-17-remember-core-migration/task-195-migrate-preference-tools.md +34 -0
  7. package/agent/tasks/milestone-17-remember-core-migration/task-196-migrate-memory-tools.md +46 -0
  8. package/agent/tasks/milestone-17-remember-core-migration/task-197-migrate-space-confirmation-tools.md +49 -0
  9. package/agent/tasks/milestone-17-remember-core-migration/task-198-migrate-space-search-moderate.md +46 -0
  10. package/agent/tasks/milestone-17-remember-core-migration/task-199-migrate-delete-memory.md +43 -0
  11. package/agent/tasks/milestone-17-remember-core-migration/task-200-code-cleanup-verification.md +52 -0
  12. package/dist/core-services.d.ts +25 -0
  13. package/dist/server-factory.js +3578 -4485
  14. package/dist/server.js +3070 -3973
  15. package/dist/tools/confirm-publish-moderation.spec.d.ts +3 -2
  16. package/dist/tools/create-memory.d.ts +1 -1
  17. package/dist/tools/query-space.d.ts +1 -1
  18. package/dist/tools/search-space.d.ts +10 -14
  19. package/jest.config.js +11 -0
  20. package/package.json +2 -1
  21. package/src/core-services.ts +50 -0
  22. package/src/tools/confirm-publish-moderation.spec.ts +120 -176
  23. package/src/tools/confirm.ts +70 -1035
  24. package/src/tools/create-memory.ts +16 -67
  25. package/src/tools/create-relationship.ts +13 -181
  26. package/src/tools/delete-memory.ts +7 -72
  27. package/src/tools/delete-relationship.ts +7 -91
  28. package/src/tools/deny.ts +4 -14
  29. package/src/tools/find-similar.ts +16 -110
  30. package/src/tools/get-preferences.ts +3 -8
  31. package/src/tools/moderate.spec.ts +65 -81
  32. package/src/tools/moderate.ts +18 -121
  33. package/src/tools/publish.ts +7 -204
  34. package/src/tools/query-space.ts +28 -140
  35. package/src/tools/retract.ts +7 -185
  36. package/src/tools/revise.ts +4 -136
  37. package/src/tools/search-relationship.ts +17 -116
  38. package/src/tools/search-space.ts +58 -304
  39. package/src/tools/set-preference.ts +3 -8
  40. package/src/tools/update-memory.ts +22 -190
  41. package/src/tools/update-relationship.ts +16 -90
  42. package/src/v2-smoke.e2e.ts +3 -2
  43. package/dist/collections/composite-ids.d.ts +0 -106
  44. package/dist/collections/core-infrastructure.spec.d.ts +0 -11
  45. package/dist/collections/dot-notation.d.ts +0 -106
  46. package/dist/collections/tracking-arrays.d.ts +0 -176
  47. package/dist/constants/content-types.d.ts +0 -61
  48. package/dist/services/confirmation-token.service.d.ts +0 -99
  49. package/dist/services/confirmation-token.service.spec.d.ts +0 -5
  50. package/dist/services/preferences-database.service.d.ts +0 -22
  51. package/dist/services/space-config.service.d.ts +0 -23
  52. package/dist/services/space-config.service.spec.d.ts +0 -2
  53. package/src/collections/composite-ids.ts +0 -193
  54. package/src/collections/core-infrastructure.spec.ts +0 -353
  55. package/src/collections/dot-notation.ts +0 -212
  56. package/src/collections/tracking-arrays.ts +0 -298
  57. package/src/constants/content-types.ts +0 -490
  58. package/src/services/confirmation-token.service.spec.ts +0 -254
  59. package/src/services/confirmation-token.service.ts +0 -328
  60. package/src/services/preferences-database.service.ts +0 -120
  61. package/src/services/space-config.service.spec.ts +0 -102
  62. package/src/services/space-config.service.ts +0 -79
@@ -1,490 +0,0 @@
1
- /**
2
- * Content type constants and descriptions
3
- * Based on agent/design/content-types-expansion.md and default-template-library.md
4
- */
5
-
6
- import type { ContentType } from '../types/memory.js';
7
-
8
- /**
9
- * All available content types
10
- */
11
- export const CONTENT_TYPES: readonly ContentType[] = [
12
- // Core types
13
- 'code',
14
- 'note',
15
- 'documentation',
16
- 'reference',
17
- // Task & Planning
18
- 'todo',
19
- 'checklist',
20
- 'project',
21
- 'goal',
22
- 'habit',
23
- // Communication
24
- 'email',
25
- 'conversation',
26
- 'meeting',
27
- 'person', // Unified person template (replaces both 'contact' and 'person')
28
- // Content & Media
29
- 'article',
30
- 'webpage',
31
- 'social',
32
- 'image',
33
- 'video',
34
- 'audio',
35
- 'transcript',
36
- 'presentation',
37
- 'spreadsheet',
38
- 'pdf',
39
- // Creative
40
- 'song',
41
- 'screenplay',
42
- 'recipe',
43
- 'idea',
44
- 'quote',
45
- 'poetry',
46
- // Personal
47
- 'journal',
48
- 'memory',
49
- 'event',
50
- // Organizational
51
- 'bookmark',
52
- 'form',
53
- 'location',
54
- // Business
55
- 'invoice',
56
- 'contract',
57
- // System
58
- 'system',
59
- 'action',
60
- 'audit',
61
- 'history',
62
- // Cross-user & Threading
63
- 'ghost',
64
- 'comment',
65
- ] as const;
66
-
67
- /**
68
- * Content type metadata
69
- */
70
- export interface ContentTypeMetadata {
71
- name: ContentType;
72
- category: string;
73
- description: string;
74
- examples: string[];
75
- common_fields?: string[];
76
- }
77
-
78
- /**
79
- * Comprehensive content type descriptions
80
- */
81
- export const CONTENT_TYPE_METADATA: Record<ContentType, ContentTypeMetadata> = {
82
- // Core Types
83
- code: {
84
- name: 'code',
85
- category: 'core',
86
- description: 'Source code files and programming content',
87
- examples: ['Code snippets', 'Functions', 'Scripts', 'Configuration files'],
88
- common_fields: ['language', 'framework', 'purpose'],
89
- },
90
- note: {
91
- name: 'note',
92
- category: 'core',
93
- description: 'Personal notes and quick documentation',
94
- examples: ['Quick notes', 'Reminders', 'Observations', 'Thoughts'],
95
- },
96
- documentation: {
97
- name: 'documentation',
98
- category: 'core',
99
- description: 'Technical documentation and guides',
100
- examples: ['API docs', 'User guides', 'Technical specs', 'How-to guides'],
101
- },
102
- reference: {
103
- name: 'reference',
104
- category: 'core',
105
- description: 'Quick reference guides and cheat sheets',
106
- examples: ['Command references', 'Keyboard shortcuts', 'API references', 'Cheat sheets'],
107
- },
108
-
109
- // Task & Planning
110
- todo: {
111
- name: 'todo',
112
- category: 'task',
113
- description: 'Individual tasks with due dates and priorities',
114
- examples: ['Task items', 'Action items', 'Assignments'],
115
- common_fields: ['due_date', 'priority', 'status', 'assignee'],
116
- },
117
- checklist: {
118
- name: 'checklist',
119
- category: 'task',
120
- description: 'Reusable checklists and sequential steps',
121
- examples: ['Grocery lists', 'Packing lists', 'Process checklists', 'Preparation lists'],
122
- common_fields: ['items', 'completion_percentage'],
123
- },
124
- project: {
125
- name: 'project',
126
- category: 'task',
127
- description: 'Project plans and overviews',
128
- examples: ['Project documentation', 'Project plans', 'Milestones'],
129
- common_fields: ['status', 'start_date', 'end_date', 'stakeholders'],
130
- },
131
- goal: {
132
- name: 'goal',
133
- category: 'task',
134
- description: 'Goals, objectives, and milestones',
135
- examples: ['Personal goals', 'Professional objectives', 'KPIs'],
136
- common_fields: ['target_date', 'progress', 'milestones'],
137
- },
138
- habit: {
139
- name: 'habit',
140
- category: 'task',
141
- description: 'Routines and habit tracking',
142
- examples: ['Daily habits', 'Routines', 'Recurring activities'],
143
- common_fields: ['frequency', 'streak', 'trigger'],
144
- },
145
-
146
- // Communication
147
- email: {
148
- name: 'email',
149
- category: 'communication',
150
- description: 'Email messages and threads',
151
- examples: ['Email messages', 'Email threads', 'Drafts'],
152
- common_fields: ['from', 'to', 'subject', 'date'],
153
- },
154
- conversation: {
155
- name: 'conversation',
156
- category: 'communication',
157
- description: 'Chat logs and conversations',
158
- examples: ['Chat messages', 'Conversation logs', 'Discussions'],
159
- common_fields: ['participants', 'platform'],
160
- },
161
- meeting: {
162
- name: 'meeting',
163
- category: 'communication',
164
- description: 'Meeting notes and action items',
165
- examples: ['Meeting notes', 'Standup notes', 'Conference calls'],
166
- common_fields: ['attendees', 'agenda', 'decisions', 'action_items'],
167
- },
168
- person: {
169
- name: 'person',
170
- category: 'communication',
171
- description: 'Track information about people - personal, professional, or both',
172
- examples: ['Friends', 'Family', 'Colleagues', 'Professional contacts', 'Business partners'],
173
- common_fields: ['name', 'relationship', 'company', 'job_title', 'how_we_met', 'contact_info', 'birthday', 'interests'],
174
- },
175
-
176
- // Content & Media
177
- article: {
178
- name: 'article',
179
- category: 'content',
180
- description: 'Articles and blog posts',
181
- examples: ['Blog posts', 'News articles', 'Long-form content'],
182
- common_fields: ['author', 'publication', 'url'],
183
- },
184
- webpage: {
185
- name: 'webpage',
186
- category: 'content',
187
- description: 'Saved web pages and HTML content',
188
- examples: ['Web pages', 'HTML documents', 'Web content'],
189
- common_fields: ['url', 'domain', 'archived_at'],
190
- },
191
- social: {
192
- name: 'social',
193
- category: 'content',
194
- description: 'Social media posts and updates',
195
- examples: ['Tweets', 'Posts', 'Status updates'],
196
- common_fields: ['platform', 'author', 'url'],
197
- },
198
- image: {
199
- name: 'image',
200
- category: 'media',
201
- description: 'Image files and visual content',
202
- examples: ['Photos', 'Screenshots', 'Diagrams', 'Illustrations'],
203
- common_fields: ['file_path', 'dimensions', 'format'],
204
- },
205
- video: {
206
- name: 'video',
207
- category: 'media',
208
- description: 'Video files and recordings',
209
- examples: ['Videos', 'Recordings', 'Tutorials'],
210
- common_fields: ['duration', 'format', 'url'],
211
- },
212
- audio: {
213
- name: 'audio',
214
- category: 'media',
215
- description: 'Audio files and recordings',
216
- examples: ['Voice notes', 'Podcasts', 'Music', 'Recordings'],
217
- common_fields: ['duration', 'format'],
218
- },
219
- transcript: {
220
- name: 'transcript',
221
- category: 'media',
222
- description: 'Transcriptions of audio or video',
223
- examples: ['Meeting transcripts', 'Podcast transcripts', 'Video captions'],
224
- common_fields: ['source_media', 'speakers'],
225
- },
226
- presentation: {
227
- name: 'presentation',
228
- category: 'content',
229
- description: 'Presentation slides and decks',
230
- examples: ['Slide decks', 'Pitch decks', 'Presentations'],
231
- common_fields: ['slide_count', 'format'],
232
- },
233
- spreadsheet: {
234
- name: 'spreadsheet',
235
- category: 'content',
236
- description: 'Data tables and spreadsheet content',
237
- examples: ['Spreadsheets', 'Data tables', 'CSV content'],
238
- common_fields: ['rows', 'columns', 'format'],
239
- },
240
- pdf: {
241
- name: 'pdf',
242
- category: 'content',
243
- description: 'PDF documents and scanned files',
244
- examples: ['PDF documents', 'Scanned documents', 'Reports'],
245
- common_fields: ['pages', 'file_size'],
246
- },
247
-
248
- // Creative
249
- song: {
250
- name: 'song',
251
- category: 'creative',
252
- description: 'Music tracks and songs',
253
- examples: ['Songs', 'Music tracks', 'Albums', 'Playlists'],
254
- common_fields: ['artist', 'album', 'genre', 'duration', 'release_date', 'url'],
255
- },
256
- screenplay: {
257
- name: 'screenplay',
258
- category: 'creative',
259
- description: 'Screenplay and script content',
260
- examples: ['Screenplays', 'Scripts', 'Dialogue'],
261
- common_fields: ['characters', 'scenes'],
262
- },
263
- recipe: {
264
- name: 'recipe',
265
- category: 'creative',
266
- description: 'Cooking recipes and instructions',
267
- examples: ['Recipes', 'Cooking instructions', 'Meal plans'],
268
- common_fields: ['ingredients', 'instructions', 'servings', 'prep_time', 'cook_time'],
269
- },
270
- idea: {
271
- name: 'idea',
272
- category: 'creative',
273
- description: 'Brainstorming and concepts',
274
- examples: ['Ideas', 'Brainstorms', 'Concepts', 'Inspiration'],
275
- common_fields: ['category', 'potential_impact'],
276
- },
277
- quote: {
278
- name: 'quote',
279
- category: 'creative',
280
- description: 'Memorable quotes and excerpts',
281
- examples: ['Quotes', 'Excerpts', 'Highlights', 'Citations'],
282
- common_fields: ['author', 'source'],
283
- },
284
- poetry: {
285
- name: 'poetry',
286
- category: 'creative',
287
- description: 'Poems and poetic content',
288
- examples: ['Poems', 'Verses', 'Haiku', 'Sonnets', 'Free verse'],
289
- common_fields: ['author', 'form', 'theme'],
290
- },
291
-
292
- // Personal
293
- journal: {
294
- name: 'journal',
295
- category: 'personal',
296
- description: 'Daily journal entries and reflections',
297
- examples: ['Journal entries', 'Diary entries', 'Reflections'],
298
- common_fields: ['date', 'mood', 'highlights'],
299
- },
300
- memory: {
301
- name: 'memory',
302
- category: 'personal',
303
- description: 'Personal memories and significant moments',
304
- examples: ['Life events', 'Significant moments', 'Memories'],
305
- common_fields: ['date', 'people_involved', 'location'],
306
- },
307
- event: {
308
- name: 'event',
309
- category: 'personal',
310
- description: 'Calendar events and activities',
311
- examples: ['Events', 'Activities', 'Appointments'],
312
- common_fields: ['date', 'time', 'location', 'attendees'],
313
- },
314
-
315
- // Organizational
316
- bookmark: {
317
- name: 'bookmark',
318
- category: 'organizational',
319
- description: 'Web bookmarks and resource collections',
320
- examples: ['Bookmarks', 'Resource links', 'Reading lists'],
321
- common_fields: ['url', 'domain', 'read_later'],
322
- },
323
- form: {
324
- name: 'form',
325
- category: 'organizational',
326
- description: 'Forms and surveys',
327
- examples: ['Questionnaires', 'Feedback forms', 'Surveys'],
328
- common_fields: ['fields', 'responses'],
329
- },
330
- location: {
331
- name: 'location',
332
- category: 'organizational',
333
- description: 'Place information and recommendations',
334
- examples: ['Places', 'Venues', 'Destinations', 'Locations'],
335
- common_fields: ['address', 'gps', 'rating'],
336
- },
337
-
338
- // Business
339
- invoice: {
340
- name: 'invoice',
341
- category: 'business',
342
- description: 'Invoices and receipts',
343
- examples: ['Invoices', 'Receipts', 'Bills'],
344
- common_fields: ['amount', 'date', 'vendor', 'items'],
345
- },
346
- contract: {
347
- name: 'contract',
348
- category: 'business',
349
- description: 'Contracts and agreements',
350
- examples: ['Contracts', 'Agreements', 'Terms of service'],
351
- common_fields: ['parties', 'effective_date', 'terms'],
352
- },
353
-
354
- // System
355
- system: {
356
- name: 'system',
357
- category: 'system',
358
- description: 'Agent instructions (reserved for internal use only)',
359
- examples: ['System prompts', 'Agent instructions', 'Configuration'],
360
- },
361
- action: {
362
- name: 'action',
363
- category: 'system',
364
- description: 'Agent actions and operations',
365
- examples: ['Actions taken', 'Operations performed', 'Commands executed'],
366
- common_fields: ['action_type', 'status', 'result'],
367
- },
368
- audit: {
369
- name: 'audit',
370
- category: 'system',
371
- description: 'Audit logs and compliance records',
372
- examples: ['Audit logs', 'Access logs', 'Security events'],
373
- common_fields: ['event_type', 'actor', 'target', 'result'],
374
- },
375
- history: {
376
- name: 'history',
377
- category: 'system',
378
- description: 'Change history and version tracking',
379
- examples: ['Edit history', 'Version history', 'Change logs'],
380
- common_fields: ['target_id', 'change_type', 'previous_value', 'new_value'],
381
- },
382
-
383
- // Cross-user & Threading
384
- ghost: {
385
- name: 'ghost',
386
- category: 'cross_user',
387
- description: 'Ghost conversation memory — stores context from AI-mediated cross-user interactions',
388
- examples: ['Ghost conversation context', 'Cross-user interaction history'],
389
- common_fields: ['ghost_owner_id', 'conversing_user_id'],
390
- },
391
- comment: {
392
- name: 'comment',
393
- category: 'cross_user',
394
- description: 'Threaded comments on shared memories in spaces and groups',
395
- examples: ['Comments on shared memories', 'Discussion replies', 'Feedback'],
396
- common_fields: ['parent_id', 'thread_root_id'],
397
- },
398
- };
399
-
400
- /**
401
- * Content type categories
402
- */
403
- export const CONTENT_TYPE_CATEGORIES = {
404
- core: ['code', 'note', 'documentation', 'reference'],
405
- task: ['todo', 'checklist', 'project', 'goal', 'habit'],
406
- communication: ['email', 'conversation', 'meeting', 'person'],
407
- content: ['article', 'webpage', 'social', 'presentation', 'spreadsheet', 'pdf'],
408
- media: ['image', 'video', 'audio', 'transcript'],
409
- creative: ['song', 'screenplay', 'recipe', 'idea', 'quote', 'poetry'],
410
- personal: ['journal', 'memory', 'event'],
411
- organizational: ['bookmark', 'form', 'location'],
412
- business: ['invoice', 'contract'],
413
- system: ['system', 'action', 'audit', 'history'],
414
- cross_user: ['ghost', 'comment'],
415
- } as const;
416
-
417
- /**
418
- * Get content type metadata
419
- */
420
- export function getContentTypeMetadata(type: ContentType): ContentTypeMetadata {
421
- return CONTENT_TYPE_METADATA[type];
422
- }
423
-
424
- /**
425
- * Get content types by category
426
- */
427
- export function getContentTypesByCategory(category: keyof typeof CONTENT_TYPE_CATEGORIES): ContentType[] {
428
- return CONTENT_TYPE_CATEGORIES[category] as unknown as ContentType[];
429
- }
430
-
431
- /**
432
- * Validate content type
433
- */
434
- export function isValidContentType(type: string): type is ContentType {
435
- return CONTENT_TYPES.includes(type as ContentType);
436
- }
437
-
438
- /**
439
- * Get content type description for LLM prompts
440
- * Generated dynamically from CONTENT_TYPE_METADATA
441
- */
442
- export function getContentTypeDescription(): string {
443
- const categoryNames: Record<string, string> = {
444
- core: 'Core Types',
445
- task: 'Task & Planning',
446
- communication: 'Communication',
447
- content: 'Content & Media',
448
- media: 'Content & Media',
449
- creative: 'Creative',
450
- personal: 'Personal',
451
- organizational: 'Organizational',
452
- business: 'Business',
453
- system: 'System (Internal Use)',
454
- };
455
-
456
- const lines: string[] = ['Type of content:', ''];
457
-
458
- // Group by category
459
- const categorized = new Map<string, ContentType[]>();
460
-
461
- for (const type of CONTENT_TYPES) {
462
- const metadata = CONTENT_TYPE_METADATA[type];
463
- const categoryKey = metadata.category;
464
-
465
- if (!categorized.has(categoryKey)) {
466
- categorized.set(categoryKey, []);
467
- }
468
- categorized.get(categoryKey)!.push(type);
469
- }
470
-
471
- // Build description by category
472
- for (const [categoryKey, types] of categorized) {
473
- const categoryName = categoryNames[categoryKey] || categoryKey;
474
- lines.push(`${categoryName}:`);
475
-
476
- for (const type of types) {
477
- const metadata = CONTENT_TYPE_METADATA[type];
478
- lines.push(` - '${type}': ${metadata.description}`);
479
- }
480
-
481
- lines.push('');
482
- }
483
-
484
- return lines.join('\n').trim();
485
- }
486
-
487
- /**
488
- * Default content type
489
- */
490
- export const DEFAULT_CONTENT_TYPE: ContentType = 'note';