@dollhousemcp/mcp-server 2.0.3 → 2.0.5

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 (51) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/generated/version.d.ts +2 -2
  3. package/dist/generated/version.js +3 -3
  4. package/dist/index.js +7 -1
  5. package/dist/seed-elements/memories/dollhousemcp-baseline-knowledge.yaml +149 -0
  6. package/dist/seed-elements/memories/how-to-create-custom-auto-load-memories.yaml +455 -0
  7. package/dist/seed-elements/memories/priority-best-practices-for-teams.yaml +542 -0
  8. package/dist/seed-elements/memories/token-estimation-guidelines.yaml +602 -0
  9. package/dist/utils/logger.d.ts +7 -0
  10. package/dist/utils/logger.d.ts.map +1 -1
  11. package/dist/utils/logger.js +13 -3
  12. package/dist/web/console/LeaderElection.d.ts +10 -0
  13. package/dist/web/console/LeaderElection.d.ts.map +1 -1
  14. package/dist/web/console/LeaderElection.js +44 -1
  15. package/dist/web/console/LeaderForwardingSink.d.ts +3 -1
  16. package/dist/web/console/LeaderForwardingSink.d.ts.map +1 -1
  17. package/dist/web/console/LeaderForwardingSink.js +24 -6
  18. package/dist/web/console/UnifiedConsole.d.ts.map +1 -1
  19. package/dist/web/console/UnifiedConsole.js +12 -3
  20. package/dist/web/public/fonts/ibmplexmono--F63fjptAgt5VM-kVkqdyU8n1i8q131nj-o.woff2 +0 -0
  21. package/dist/web/public/fonts/ibmplexmono--F63fjptAgt5VM-kVkqdyU8n1iAq131nj-otFQ.woff2 +0 -0
  22. package/dist/web/public/fonts/ibmplexmono--F63fjptAgt5VM-kVkqdyU8n1iEq131nj-otFQ.woff2 +0 -0
  23. package/dist/web/public/fonts/ibmplexmono--F63fjptAgt5VM-kVkqdyU8n1iIq131nj-otFQ.woff2 +0 -0
  24. package/dist/web/public/fonts/ibmplexmono--F63fjptAgt5VM-kVkqdyU8n1isq131nj-otFQ.woff2 +0 -0
  25. package/dist/web/public/fonts/ibmplexmono--F6qfjptAgt5VM-kVkqdyU8n3twJwl1FgsAXHNlYzg.woff2 +0 -0
  26. package/dist/web/public/fonts/ibmplexmono--F6qfjptAgt5VM-kVkqdyU8n3twJwl5FgsAXHNlYzg.woff2 +0 -0
  27. package/dist/web/public/fonts/ibmplexmono--F6qfjptAgt5VM-kVkqdyU8n3twJwl9FgsAXHNlYzg.woff2 +0 -0
  28. package/dist/web/public/fonts/ibmplexmono--F6qfjptAgt5VM-kVkqdyU8n3twJwlBFgsAXHNk.woff2 +0 -0
  29. package/dist/web/public/fonts/ibmplexmono--F6qfjptAgt5VM-kVkqdyU8n3twJwlRFgsAXHNlYzg.woff2 +0 -0
  30. package/dist/web/public/fonts/manrope-xn7gYHE41ni1AdIRggOxSvfedN62Zw.woff2 +0 -0
  31. package/dist/web/public/fonts/manrope-xn7gYHE41ni1AdIRggSxSvfedN62Zw.woff2 +0 -0
  32. package/dist/web/public/fonts/manrope-xn7gYHE41ni1AdIRggexSvfedN4.woff2 +0 -0
  33. package/dist/web/public/fonts/manrope-xn7gYHE41ni1AdIRggixSvfedN62Zw.woff2 +0 -0
  34. package/dist/web/public/fonts/manrope-xn7gYHE41ni1AdIRggmxSvfedN62Zw.woff2 +0 -0
  35. package/dist/web/public/fonts/manrope-xn7gYHE41ni1AdIRggqxSvfedN62Zw.woff2 +0 -0
  36. package/dist/web/public/fonts/plusjakartasans-LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yygg_vb.woff2 +0 -0
  37. package/dist/web/public/fonts/plusjakartasans-LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yygg_vbd-E.woff2 +0 -0
  38. package/dist/web/public/fonts/plusjakartasans-LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yygg_vbd-E.woff2 +0 -0
  39. package/dist/web/public/fonts/plusjakartasans-LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yygg_vbd-E.woff2 +0 -0
  40. package/dist/web/public/fonts.css +270 -0
  41. package/dist/web/public/index.html +365 -0
  42. package/dist/web/public/logs.css +472 -0
  43. package/dist/web/public/metrics.css +238 -0
  44. package/dist/web/public/permissions.css +364 -0
  45. package/dist/web/public/sessions.css +235 -0
  46. package/dist/web/public/setup.css +648 -0
  47. package/dist/web/public/styles.css +1717 -0
  48. package/dist/web/server.d.ts.map +1 -1
  49. package/dist/web/server.js +3 -2
  50. package/package.json +3 -1
  51. package/server.json +2 -2
@@ -0,0 +1,455 @@
1
+ ---
2
+ name: how-to-create-custom-auto-load-memories
3
+ type: memory
4
+ description: Complete guide for creating custom auto-load memories - step-by-step instructions and examples
5
+ version: 1.0.0
6
+ author: DollhouseMCP
7
+ category: documentation
8
+ tags:
9
+ - auto-load
10
+ - guide
11
+ - tutorial
12
+ - memory-creation
13
+ - documentation
14
+ triggers:
15
+ - how-to-auto-load
16
+ - create-auto-load-memory
17
+ - auto-load-guide
18
+ - auto-load-tutorial
19
+ - custom-auto-load
20
+ autoLoad: false
21
+ priority: 999
22
+ retention: permanent
23
+ privacyLevel: public
24
+ searchable: true
25
+ trustLevel: VALIDATED
26
+ ---
27
+
28
+ # How to Create Custom Auto-Load Memories
29
+
30
+ ## Overview
31
+
32
+ Auto-load memories are automatically loaded when DollhouseMCP starts, providing instant context without searching. Perfect for baseline knowledge, project context, team standards, and frequently-needed information.
33
+
34
+ ## Quick Start
35
+
36
+ ### 1. Create or Modify a Memory
37
+
38
+ Any memory can be marked for auto-load by adding two metadata fields:
39
+
40
+ ```yaml
41
+ ---
42
+ name: my-custom-memory
43
+ type: memory
44
+ description: My project context
45
+ autoLoad: true # ← Enable auto-load
46
+ priority: 10 # ← Load order (lower = first)
47
+ ---
48
+
49
+ # Your content here
50
+ ```
51
+
52
+ ### 2. Configure Auto-Load Settings (Optional)
53
+
54
+ Edit `~/.dollhouse/config.yaml`:
55
+
56
+ ```yaml
57
+ autoLoad:
58
+ enabled: true # Global on/off
59
+ maxTokenBudget: 5000 # Total token limit
60
+ maxSingleMemoryTokens: 2000 # Per-memory limit (optional)
61
+ suppressLargeMemoryWarnings: false
62
+ ```
63
+
64
+ ### 3. Restart DollhouseMCP
65
+
66
+ ```bash
67
+ # Restart your MCP client (Claude Desktop, Claude Code, etc.)
68
+ # Auto-load memories will be loaded automatically
69
+ ```
70
+
71
+ ## Step-by-Step Guide
72
+
73
+ ### Step 1: Decide What to Auto-Load
74
+
75
+ **Good Candidates**:
76
+ - Project overview and architecture
77
+ - Team coding standards
78
+ - Frequently-referenced specifications
79
+ - Domain knowledge (medical terms, legal concepts)
80
+ - API reference sheets
81
+ - Personal preferences and workflows
82
+
83
+ **Poor Candidates**:
84
+ - Large datasets (>10,000 tokens)
85
+ - Sensitive information (credentials, PII)
86
+ - Frequently changing content
87
+ - Temporary notes
88
+
89
+ ### Step 2: Create the Memory
90
+
91
+ #### Using MCP Tools:
92
+
93
+ ```javascript
94
+ // In Claude Code or compatible MCP client
95
+ create_element({
96
+ type: "memories",
97
+ name: "my-project-context",
98
+ description: "Core project information for AI context",
99
+ content: "# Project: MyApp\n\n## Architecture\n...",
100
+ metadata: {
101
+ autoLoad: true,
102
+ priority: 5
103
+ }
104
+ })
105
+ ```
106
+
107
+ #### Using CLI:
108
+
109
+ ```bash
110
+ dollhouse create memory my-project-context \
111
+ --autoLoad true \
112
+ --priority 5 \
113
+ --content "# Project: MyApp..."
114
+ ```
115
+
116
+ #### Manual YAML:
117
+
118
+ Create `~/.dollhouse/portfolio/memories/my-project-context.yaml`:
119
+
120
+ ```yaml
121
+ ---
122
+ name: my-project-context
123
+ type: memory
124
+ description: Core project information
125
+ autoLoad: true
126
+ priority: 5
127
+ retention: permanent
128
+ privacyLevel: private
129
+ searchable: true
130
+ ---
131
+
132
+ # Project: MyApp
133
+
134
+ ## Architecture
135
+ - Frontend: React + TypeScript
136
+ - Backend: Node.js + Express
137
+ - Database: PostgreSQL
138
+
139
+ ## Key Decisions
140
+ - Using REST API (not GraphQL) for simplicity
141
+ - Tailwind CSS for styling
142
+ - Jest for testing
143
+ ```
144
+
145
+ ### Step 3: Set Priority
146
+
147
+ Priority determines load order (lower number = loads first):
148
+
149
+ - **1-10**: System/baseline knowledge (reserved for DollhouseMCP)
150
+ - **11-50**: Critical project context (load first)
151
+ - **51-100**: Important reference material
152
+ - **101-500**: Nice-to-have context
153
+ - **501+**: Lowest priority
154
+
155
+ Example priority scheme:
156
+ ```yaml
157
+ # Priority 1: DollhouseMCP baseline (system)
158
+ name: dollhousemcp-baseline-knowledge
159
+ priority: 1
160
+
161
+ # Priority 20: Your project overview
162
+ name: project-overview
163
+ priority: 20
164
+
165
+ # Priority 30: Team coding standards
166
+ name: coding-standards
167
+ priority: 30
168
+
169
+ # Priority 50: API reference
170
+ name: api-reference
171
+ priority: 50
172
+ ```
173
+
174
+ ### Step 4: Optimize Token Usage
175
+
176
+ Check token estimate:
177
+
178
+ ```bash
179
+ dollhouse validate memory my-project-context
180
+ # Output includes: "Estimated tokens: 1,234"
181
+ ```
182
+
183
+ **Token Guidelines**:
184
+ - **Small** (0-1,000): Ideal for auto-load
185
+ - **Medium** (1,000-5,000): Good, stays under default budget
186
+ - **Large** (5,000-10,000): Consider splitting or increasing budget
187
+ - **Very Large** (10,000+): Not recommended for auto-load
188
+
189
+ Reduce token count:
190
+ - Remove verbose examples
191
+ - Use bullet points instead of paragraphs
192
+ - Link to external docs instead of embedding
193
+ - Split into multiple focused memories
194
+
195
+ ### Step 5: Test Your Memory
196
+
197
+ ```bash
198
+ # Check if memory will auto-load
199
+ dollhouse config show autoLoad
200
+
201
+ # Validate memory syntax
202
+ dollhouse validate memory my-project-context
203
+
204
+ # See auto-load order
205
+ dollhouse list memories --filter autoLoad=true --sort priority
206
+ ```
207
+
208
+ ## Advanced Configuration
209
+
210
+ ### Explicit Memory List
211
+
212
+ Override metadata-driven auto-load with explicit list:
213
+
214
+ ```yaml
215
+ # ~/.dollhouse/config.yaml
216
+ autoLoad:
217
+ enabled: true
218
+ memories:
219
+ - dollhousemcp-baseline-knowledge
220
+ - my-project-context
221
+ - coding-standards
222
+ # Only these memories will auto-load
223
+ ```
224
+
225
+ ### Conditional Auto-Load
226
+
227
+ Use environment variables to control auto-load:
228
+
229
+ ```bash
230
+ # Disable all auto-load temporarily
231
+ export DOLLHOUSE_DISABLE_AUTOLOAD=true
232
+
233
+ # Normal auto-load behavior
234
+ unset DOLLHOUSE_DISABLE_AUTOLOAD
235
+ ```
236
+
237
+ ### Per-Project Configuration
238
+
239
+ Create project-specific config:
240
+
241
+ ```yaml
242
+ # /project/.dollhouserc.yaml
243
+ autoLoad:
244
+ maxTokenBudget: 10000 # Higher budget for this project
245
+ memories:
246
+ - project-overview
247
+ - local-dev-setup
248
+ # Project-specific memories only
249
+ ```
250
+
251
+ ## Common Patterns
252
+
253
+ ### Pattern 1: Layered Context
254
+
255
+ Load knowledge in layers (general → specific):
256
+
257
+ ```yaml
258
+ # Priority 10: Company-wide standards
259
+ name: company-coding-standards
260
+ priority: 10
261
+
262
+ # Priority 20: Team standards
263
+ name: team-backend-patterns
264
+ priority: 20
265
+
266
+ # Priority 30: Project-specific context
267
+ name: myapp-architecture
268
+ priority: 30
269
+ ```
270
+
271
+ ### Pattern 2: Role-Based Context
272
+
273
+ Different memories for different roles:
274
+
275
+ ```yaml
276
+ # For backend developers
277
+ name: backend-context
278
+ autoLoad: true
279
+ tags: [backend, api, database]
280
+
281
+ # For frontend developers
282
+ name: frontend-context
283
+ autoLoad: true
284
+ tags: [frontend, ui, components]
285
+ ```
286
+
287
+ ### Pattern 3: Onboarding Kit
288
+
289
+ New team member baseline:
290
+
291
+ ```yaml
292
+ name: team-onboarding
293
+ priority: 5
294
+ description: Everything new engineers need to know
295
+ content: |
296
+ # Welcome to Team Atlas!
297
+
298
+ ## First Week Checklist
299
+ - [ ] Read architecture docs
300
+ - [ ] Set up dev environment
301
+ - [ ] Deploy your first PR
302
+
303
+ ## Key Resources
304
+ - Slack: #team-atlas
305
+ - Docs: docs.company.com/atlas
306
+ - CI/CD: Jenkins (jenkins.company.com)
307
+ ```
308
+
309
+ ## Troubleshooting
310
+
311
+ ### Memory Not Loading
312
+
313
+ 1. Check metadata:
314
+ ```yaml
315
+ autoLoad: true # Must be boolean, not string
316
+ priority: 10 # Must be number, not string
317
+ ```
318
+
319
+ 2. Verify config:
320
+ ```bash
321
+ dollhouse config show autoLoad.enabled
322
+ # Should output: true
323
+ ```
324
+
325
+ 3. Check startup logs:
326
+ ```bash
327
+ # Look for: "[ServerStartup] Auto-load complete: X memories loaded"
328
+ ```
329
+
330
+ ### Budget Exceeded
331
+
332
+ If memories are skipped due to budget:
333
+
334
+ ```yaml
335
+ # Increase budget
336
+ autoLoad:
337
+ maxTokenBudget: 10000 # Default: 5000
338
+
339
+ # Or prioritize critical memories (lower priority = loads first)
340
+ # Or split large memories into smaller focused ones
341
+ ```
342
+
343
+ ### Memory Too Large
344
+
345
+ Warning: "Memory 'xyz' is very large (~12,000 tokens)"
346
+
347
+ Solutions:
348
+ 1. Split into multiple memories
349
+ 2. Remove verbose sections
350
+ 3. Increase single memory limit:
351
+ ```yaml
352
+ autoLoad:
353
+ maxSingleMemoryTokens: 15000
354
+ ```
355
+ 4. Suppress warnings (not recommended):
356
+ ```yaml
357
+ autoLoad:
358
+ suppressLargeMemoryWarnings: true
359
+ ```
360
+
361
+ ## Examples
362
+
363
+ ### Example 1: Project Context
364
+
365
+ ```yaml
366
+ ---
367
+ name: webapp-project-context
368
+ autoLoad: true
369
+ priority: 20
370
+ ---
371
+
372
+ # WebApp Project Context
373
+
374
+ **Stack**: React + Node.js + PostgreSQL
375
+ **Deployment**: AWS (ECS + RDS)
376
+ **CI/CD**: GitHub Actions
377
+
378
+ ## Active Sprints
379
+ - Sprint 42: User authentication (ends Oct 15)
380
+ - Tech debt: Migrate to TypeScript (Q4 2025)
381
+
382
+ ## Key Contacts
383
+ - PM: Jane (@jane)
384
+ - Tech Lead: Bob (@bob)
385
+ - DevOps: Alice (@alice)
386
+ ```
387
+
388
+ ### Example 2: API Reference
389
+
390
+ ```yaml
391
+ ---
392
+ name: internal-api-reference
393
+ autoLoad: true
394
+ priority: 50
395
+ ---
396
+
397
+ # Internal API Reference
398
+
399
+ ## User Service
400
+ - `GET /api/users/:id` - Get user by ID
401
+ - `POST /api/users` - Create user
402
+ - `PUT /api/users/:id` - Update user
403
+
404
+ ## Auth
405
+ - Header: `Authorization: Bearer <token>`
406
+ - Token expires: 24 hours
407
+ ```
408
+
409
+ ### Example 3: Coding Standards
410
+
411
+ ```yaml
412
+ ---
413
+ name: team-coding-standards
414
+ autoLoad: true
415
+ priority: 30
416
+ ---
417
+
418
+ # Team Coding Standards
419
+
420
+ ## TypeScript
421
+ - Use strict mode
422
+ - No `any` types
423
+ - Prefer interfaces over types
424
+
425
+ ## Testing
426
+ - Coverage: >80% required
427
+ - Unit tests: Jest
428
+ - E2E tests: Playwright
429
+
430
+ ## PR Process
431
+ 1. Create feature branch
432
+ 2. Write tests first
433
+ 3. Get 2 approvals
434
+ 4. Squash merge to main
435
+ ```
436
+
437
+ ## Best Practices
438
+
439
+ 1. **Start Small**: Begin with 1-2 auto-load memories, expand as needed
440
+ 2. **Review Regularly**: Update memories quarterly, remove stale content
441
+ 3. **Monitor Token Usage**: Check startup logs for token counts
442
+ 4. **Use Priorities Wisely**: Reserve low priorities for critical content
443
+ 5. **Document Changes**: Add version history to memory content
444
+ 6. **Test Before Committing**: Validate memories before pushing to team
445
+ 7. **Share Configurations**: Commit `.dollhouserc.yaml` to project repos
446
+
447
+ ## Related Documentation
448
+
449
+ - [Priority Best Practices for Teams](./priority-best-practices-for-teams.yaml)
450
+ - [Token Estimation Guidelines](./token-estimation-guidelines.yaml)
451
+ - [DollhouseMCP Baseline Knowledge](./dollhousemcp-baseline-knowledge.yaml)
452
+
453
+ ---
454
+
455
+ **Last Updated**: v1.9.25 (October 2025)