run-dmcp 0.2.0 → 0.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.
Files changed (59) hide show
  1. package/README.md +51 -13
  2. package/dist/bin/run-dmcp.js +1 -1
  3. package/dist/db/schema.js +170 -18
  4. package/dist/http/server.js +22 -1
  5. package/dist/index.d.ts +34 -2
  6. package/dist/index.js +86 -2
  7. package/dist/mcp-server.d.ts +1 -1
  8. package/dist/mcp-server.js +1 -1
  9. package/dist/register/resources.js +2 -2
  10. package/dist/rpg/index.d.ts +0 -16
  11. package/dist/rpg/index.js +4 -22
  12. package/dist/rpg/server.d.ts +16 -0
  13. package/dist/rpg/server.js +22 -0
  14. package/dist/schemas/index.d.ts +62 -62
  15. package/dist/server.d.ts +1 -0
  16. package/dist/server.js +20 -0
  17. package/dist/timeline/changes.d.ts +8 -0
  18. package/dist/timeline/changes.js +8 -0
  19. package/dist/timeline/export.d.ts +10 -0
  20. package/dist/timeline/export.js +10 -0
  21. package/dist/timeline/irreversible.d.ts +2 -0
  22. package/dist/timeline/replay.d.ts +22 -0
  23. package/dist/timeline/replay.js +22 -0
  24. package/dist/timeline/schema.js +2 -0
  25. package/dist/tools/audio.js +13 -9
  26. package/dist/tools/game.js +33 -1
  27. package/dist/tools/images.js +17 -10
  28. package/dist/tools/resource.d.ts +2 -2
  29. package/dist/tools/time.js +18 -3
  30. package/dist/types/index.d.ts +1 -1
  31. package/dist/utils/media-path.d.ts +52 -0
  32. package/dist/utils/media-path.js +106 -0
  33. package/dist/utils/output-schemas.d.ts +63 -63
  34. package/dist/utils/output-schemas.js +1 -1
  35. package/package.json +14 -2
  36. package/dist/register/abilities.d.ts +0 -2
  37. package/dist/register/abilities.js +0 -165
  38. package/dist/register/combat.d.ts +0 -2
  39. package/dist/register/combat.js +0 -207
  40. package/dist/register/mcp-prompts.d.ts +0 -2
  41. package/dist/register/mcp-prompts.js +0 -684
  42. package/dist/register/quests.d.ts +0 -2
  43. package/dist/register/quests.js +0 -118
  44. package/dist/register/status.d.ts +0 -2
  45. package/dist/register/status.js +0 -130
  46. package/dist/register/tables.d.ts +0 -2
  47. package/dist/register/tables.js +0 -146
  48. package/dist/tools/ability.d.ts +0 -48
  49. package/dist/tools/ability.js +0 -238
  50. package/dist/tools/combat.d.ts +0 -13
  51. package/dist/tools/combat.js +0 -195
  52. package/dist/tools/dice.d.ts +0 -23
  53. package/dist/tools/dice.js +0 -111
  54. package/dist/tools/quest.d.ts +0 -34
  55. package/dist/tools/quest.js +0 -164
  56. package/dist/tools/status.d.ts +0 -36
  57. package/dist/tools/status.js +0 -218
  58. package/dist/tools/tables.d.ts +0 -33
  59. package/dist/tools/tables.js +0 -209
@@ -0,0 +1,22 @@
1
+ import { createCoreMcpServer } from "../mcp-server.js";
2
+ import { registerRpgTools } from "./index.js";
3
+ /**
4
+ * Build the FULL assembly: every core tool plus every RPG tool, resource and
5
+ * prompt this engine has always served. Same name and same `{ mechanics?,
6
+ * vocabulary? }` options as the pre-split `createMcpServer` in
7
+ * src/mcp-server.ts, so src/bin/run-dmcp.ts's zero-argument call site keeps
8
+ * working unchanged and the registered tool/resource/prompt set is unchanged
9
+ * too (src/__tests__/layerBoundary.test.ts asserts this exactly).
10
+ */
11
+ export function createMcpServer(options) {
12
+ const server = createCoreMcpServer(options);
13
+ registerRpgTools(server);
14
+ return server;
15
+ }
16
+ // The web UI. An application opts into serving it; importing this never
17
+ // does. It lives on disk at src/http/server.ts, not under src/rpg/ -- it
18
+ // imports RPG tools (quest/ability/combat), which is why it cannot be
19
+ // reachable from the core entry point, but its CLIENT_DIST path resolution
20
+ // is depth-sensitive in both src/ and compiled dist/, so it stays put and
21
+ // only its EXPORT moves up to this layer.
22
+ export { createHttpServer, startHttpServer } from "../http/server.js";
@@ -15,8 +15,8 @@ export declare const subjectDescriptionSchema: z.ZodObject<{
15
15
  distinguishingMarks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
16
16
  }, "strip", z.ZodTypeAny, {
17
17
  height?: string | undefined;
18
- age?: string | undefined;
19
18
  gender?: string | undefined;
19
+ age?: string | undefined;
20
20
  bodyType?: string | undefined;
21
21
  skinTone?: string | undefined;
22
22
  hairColor?: string | undefined;
@@ -26,8 +26,8 @@ export declare const subjectDescriptionSchema: z.ZodObject<{
26
26
  distinguishingMarks?: string[] | undefined;
27
27
  }, {
28
28
  height?: string | undefined;
29
- age?: string | undefined;
30
29
  gender?: string | undefined;
30
+ age?: string | undefined;
31
31
  bodyType?: string | undefined;
32
32
  skinTone?: string | undefined;
33
33
  hairColor?: string | undefined;
@@ -66,16 +66,16 @@ export declare const subjectDescriptionSchema: z.ZodObject<{
66
66
  weather?: string | undefined;
67
67
  lighting?: string | undefined;
68
68
  architecture?: string | undefined;
69
- vegetation?: string | undefined;
70
69
  notableFeatures?: string[] | undefined;
70
+ vegetation?: string | undefined;
71
71
  }, {
72
72
  setting: string;
73
73
  timeOfDay?: string | undefined;
74
74
  weather?: string | undefined;
75
75
  lighting?: string | undefined;
76
76
  architecture?: string | undefined;
77
- vegetation?: string | undefined;
78
77
  notableFeatures?: string[] | undefined;
78
+ vegetation?: string | undefined;
79
79
  }>>;
80
80
  objectDetails: z.ZodOptional<z.ZodObject<{
81
81
  material: z.ZodOptional<z.ZodString>;
@@ -101,8 +101,8 @@ export declare const subjectDescriptionSchema: z.ZodObject<{
101
101
  primaryDescription: string;
102
102
  physicalTraits?: {
103
103
  height?: string | undefined;
104
- age?: string | undefined;
105
104
  gender?: string | undefined;
105
+ age?: string | undefined;
106
106
  bodyType?: string | undefined;
107
107
  skinTone?: string | undefined;
108
108
  hairColor?: string | undefined;
@@ -123,8 +123,8 @@ export declare const subjectDescriptionSchema: z.ZodObject<{
123
123
  weather?: string | undefined;
124
124
  lighting?: string | undefined;
125
125
  architecture?: string | undefined;
126
- vegetation?: string | undefined;
127
126
  notableFeatures?: string[] | undefined;
127
+ vegetation?: string | undefined;
128
128
  } | undefined;
129
129
  objectDetails?: {
130
130
  size?: string | undefined;
@@ -140,8 +140,8 @@ export declare const subjectDescriptionSchema: z.ZodObject<{
140
140
  primaryDescription: string;
141
141
  physicalTraits?: {
142
142
  height?: string | undefined;
143
- age?: string | undefined;
144
143
  gender?: string | undefined;
144
+ age?: string | undefined;
145
145
  bodyType?: string | undefined;
146
146
  skinTone?: string | undefined;
147
147
  hairColor?: string | undefined;
@@ -162,8 +162,8 @@ export declare const subjectDescriptionSchema: z.ZodObject<{
162
162
  weather?: string | undefined;
163
163
  lighting?: string | undefined;
164
164
  architecture?: string | undefined;
165
- vegetation?: string | undefined;
166
165
  notableFeatures?: string[] | undefined;
166
+ vegetation?: string | undefined;
167
167
  } | undefined;
168
168
  objectDetails?: {
169
169
  size?: string | undefined;
@@ -188,16 +188,16 @@ export declare const styleDescriptionSchema: z.ZodObject<{
188
188
  artisticStyle: string;
189
189
  mood: string;
190
190
  colorScheme?: string | undefined;
191
- qualityTags?: string[] | undefined;
192
191
  influences?: string[] | undefined;
192
+ qualityTags?: string[] | undefined;
193
193
  negativeElements?: string[] | undefined;
194
194
  }, {
195
195
  genre: string;
196
196
  artisticStyle: string;
197
197
  mood: string;
198
198
  colorScheme?: string | undefined;
199
- qualityTags?: string[] | undefined;
200
199
  influences?: string[] | undefined;
200
+ qualityTags?: string[] | undefined;
201
201
  negativeElements?: string[] | undefined;
202
202
  }>;
203
203
  export declare const compositionDescriptionSchema: z.ZodObject<{
@@ -210,15 +210,15 @@ export declare const compositionDescriptionSchema: z.ZodObject<{
210
210
  }, "strip", z.ZodTypeAny, {
211
211
  framing: string;
212
212
  background?: string | undefined;
213
- aspectRatio?: string | undefined;
214
213
  cameraAngle?: string | undefined;
214
+ aspectRatio?: string | undefined;
215
215
  focusPoint?: string | undefined;
216
216
  depth?: string | undefined;
217
217
  }, {
218
218
  framing: string;
219
219
  background?: string | undefined;
220
- aspectRatio?: string | undefined;
221
220
  cameraAngle?: string | undefined;
221
+ aspectRatio?: string | undefined;
222
222
  focusPoint?: string | undefined;
223
223
  depth?: string | undefined;
224
224
  }>;
@@ -230,11 +230,11 @@ export declare const comfyUIPromptSchema: z.ZodObject<{
230
230
  name: z.ZodString;
231
231
  weight: z.ZodNumber;
232
232
  }, "strip", z.ZodTypeAny, {
233
- weight: number;
234
233
  name: string;
235
- }, {
236
234
  weight: number;
235
+ }, {
237
236
  name: string;
237
+ weight: number;
238
238
  }>, "many">>;
239
239
  samplerSettings: z.ZodOptional<z.ZodObject<{
240
240
  sampler: z.ZodOptional<z.ZodString>;
@@ -257,8 +257,8 @@ export declare const comfyUIPromptSchema: z.ZodObject<{
257
257
  negative: string;
258
258
  checkpoint?: string | undefined;
259
259
  loras?: {
260
- weight: number;
261
260
  name: string;
261
+ weight: number;
262
262
  }[] | undefined;
263
263
  samplerSettings?: {
264
264
  sampler?: string | undefined;
@@ -271,8 +271,8 @@ export declare const comfyUIPromptSchema: z.ZodObject<{
271
271
  negative: string;
272
272
  checkpoint?: string | undefined;
273
273
  loras?: {
274
- weight: number;
275
274
  name: string;
275
+ weight: number;
276
276
  }[] | undefined;
277
277
  samplerSettings?: {
278
278
  sampler?: string | undefined;
@@ -292,22 +292,22 @@ export declare const generatedImageSchema: z.ZodObject<{
292
292
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
293
293
  }, "strip", z.ZodTypeAny, {
294
294
  id: string;
295
- tool: string;
296
- prompt: string;
297
295
  timestamp: string;
296
+ prompt: string;
297
+ tool: string;
298
298
  url?: string | undefined;
299
299
  base64?: string | undefined;
300
- seed?: number | undefined;
301
300
  metadata?: Record<string, unknown> | undefined;
301
+ seed?: number | undefined;
302
302
  }, {
303
303
  id: string;
304
- tool: string;
305
- prompt: string;
306
304
  timestamp: string;
305
+ prompt: string;
306
+ tool: string;
307
307
  url?: string | undefined;
308
308
  base64?: string | undefined;
309
- seed?: number | undefined;
310
309
  metadata?: Record<string, unknown> | undefined;
310
+ seed?: number | undefined;
311
311
  }>;
312
312
  export declare const imageGenSchema: z.ZodObject<{
313
313
  subject: z.ZodObject<{
@@ -326,8 +326,8 @@ export declare const imageGenSchema: z.ZodObject<{
326
326
  distinguishingMarks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
327
327
  }, "strip", z.ZodTypeAny, {
328
328
  height?: string | undefined;
329
- age?: string | undefined;
330
329
  gender?: string | undefined;
330
+ age?: string | undefined;
331
331
  bodyType?: string | undefined;
332
332
  skinTone?: string | undefined;
333
333
  hairColor?: string | undefined;
@@ -337,8 +337,8 @@ export declare const imageGenSchema: z.ZodObject<{
337
337
  distinguishingMarks?: string[] | undefined;
338
338
  }, {
339
339
  height?: string | undefined;
340
- age?: string | undefined;
341
340
  gender?: string | undefined;
341
+ age?: string | undefined;
342
342
  bodyType?: string | undefined;
343
343
  skinTone?: string | undefined;
344
344
  hairColor?: string | undefined;
@@ -377,16 +377,16 @@ export declare const imageGenSchema: z.ZodObject<{
377
377
  weather?: string | undefined;
378
378
  lighting?: string | undefined;
379
379
  architecture?: string | undefined;
380
- vegetation?: string | undefined;
381
380
  notableFeatures?: string[] | undefined;
381
+ vegetation?: string | undefined;
382
382
  }, {
383
383
  setting: string;
384
384
  timeOfDay?: string | undefined;
385
385
  weather?: string | undefined;
386
386
  lighting?: string | undefined;
387
387
  architecture?: string | undefined;
388
- vegetation?: string | undefined;
389
388
  notableFeatures?: string[] | undefined;
389
+ vegetation?: string | undefined;
390
390
  }>>;
391
391
  objectDetails: z.ZodOptional<z.ZodObject<{
392
392
  material: z.ZodOptional<z.ZodString>;
@@ -412,8 +412,8 @@ export declare const imageGenSchema: z.ZodObject<{
412
412
  primaryDescription: string;
413
413
  physicalTraits?: {
414
414
  height?: string | undefined;
415
- age?: string | undefined;
416
415
  gender?: string | undefined;
416
+ age?: string | undefined;
417
417
  bodyType?: string | undefined;
418
418
  skinTone?: string | undefined;
419
419
  hairColor?: string | undefined;
@@ -434,8 +434,8 @@ export declare const imageGenSchema: z.ZodObject<{
434
434
  weather?: string | undefined;
435
435
  lighting?: string | undefined;
436
436
  architecture?: string | undefined;
437
- vegetation?: string | undefined;
438
437
  notableFeatures?: string[] | undefined;
438
+ vegetation?: string | undefined;
439
439
  } | undefined;
440
440
  objectDetails?: {
441
441
  size?: string | undefined;
@@ -451,8 +451,8 @@ export declare const imageGenSchema: z.ZodObject<{
451
451
  primaryDescription: string;
452
452
  physicalTraits?: {
453
453
  height?: string | undefined;
454
- age?: string | undefined;
455
454
  gender?: string | undefined;
455
+ age?: string | undefined;
456
456
  bodyType?: string | undefined;
457
457
  skinTone?: string | undefined;
458
458
  hairColor?: string | undefined;
@@ -473,8 +473,8 @@ export declare const imageGenSchema: z.ZodObject<{
473
473
  weather?: string | undefined;
474
474
  lighting?: string | undefined;
475
475
  architecture?: string | undefined;
476
- vegetation?: string | undefined;
477
476
  notableFeatures?: string[] | undefined;
477
+ vegetation?: string | undefined;
478
478
  } | undefined;
479
479
  objectDetails?: {
480
480
  size?: string | undefined;
@@ -499,16 +499,16 @@ export declare const imageGenSchema: z.ZodObject<{
499
499
  artisticStyle: string;
500
500
  mood: string;
501
501
  colorScheme?: string | undefined;
502
- qualityTags?: string[] | undefined;
503
502
  influences?: string[] | undefined;
503
+ qualityTags?: string[] | undefined;
504
504
  negativeElements?: string[] | undefined;
505
505
  }, {
506
506
  genre: string;
507
507
  artisticStyle: string;
508
508
  mood: string;
509
509
  colorScheme?: string | undefined;
510
- qualityTags?: string[] | undefined;
511
510
  influences?: string[] | undefined;
511
+ qualityTags?: string[] | undefined;
512
512
  negativeElements?: string[] | undefined;
513
513
  }>;
514
514
  composition: z.ZodObject<{
@@ -521,15 +521,15 @@ export declare const imageGenSchema: z.ZodObject<{
521
521
  }, "strip", z.ZodTypeAny, {
522
522
  framing: string;
523
523
  background?: string | undefined;
524
- aspectRatio?: string | undefined;
525
524
  cameraAngle?: string | undefined;
525
+ aspectRatio?: string | undefined;
526
526
  focusPoint?: string | undefined;
527
527
  depth?: string | undefined;
528
528
  }, {
529
529
  framing: string;
530
530
  background?: string | undefined;
531
- aspectRatio?: string | undefined;
532
531
  cameraAngle?: string | undefined;
532
+ aspectRatio?: string | undefined;
533
533
  focusPoint?: string | undefined;
534
534
  depth?: string | undefined;
535
535
  }>;
@@ -547,11 +547,11 @@ export declare const imageGenSchema: z.ZodObject<{
547
547
  name: z.ZodString;
548
548
  weight: z.ZodNumber;
549
549
  }, "strip", z.ZodTypeAny, {
550
- weight: number;
551
550
  name: string;
552
- }, {
553
551
  weight: number;
552
+ }, {
554
553
  name: string;
554
+ weight: number;
555
555
  }>, "many">>;
556
556
  samplerSettings: z.ZodOptional<z.ZodObject<{
557
557
  sampler: z.ZodOptional<z.ZodString>;
@@ -574,8 +574,8 @@ export declare const imageGenSchema: z.ZodObject<{
574
574
  negative: string;
575
575
  checkpoint?: string | undefined;
576
576
  loras?: {
577
- weight: number;
578
577
  name: string;
578
+ weight: number;
579
579
  }[] | undefined;
580
580
  samplerSettings?: {
581
581
  sampler?: string | undefined;
@@ -588,8 +588,8 @@ export declare const imageGenSchema: z.ZodObject<{
588
588
  negative: string;
589
589
  checkpoint?: string | undefined;
590
590
  loras?: {
591
- weight: number;
592
591
  name: string;
592
+ weight: number;
593
593
  }[] | undefined;
594
594
  samplerSettings?: {
595
595
  sampler?: string | undefined;
@@ -607,8 +607,8 @@ export declare const imageGenSchema: z.ZodObject<{
607
607
  negative: string;
608
608
  checkpoint?: string | undefined;
609
609
  loras?: {
610
- weight: number;
611
610
  name: string;
611
+ weight: number;
612
612
  }[] | undefined;
613
613
  samplerSettings?: {
614
614
  sampler?: string | undefined;
@@ -628,8 +628,8 @@ export declare const imageGenSchema: z.ZodObject<{
628
628
  negative: string;
629
629
  checkpoint?: string | undefined;
630
630
  loras?: {
631
- weight: number;
632
631
  name: string;
632
+ weight: number;
633
633
  }[] | undefined;
634
634
  samplerSettings?: {
635
635
  sampler?: string | undefined;
@@ -652,22 +652,22 @@ export declare const imageGenSchema: z.ZodObject<{
652
652
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
653
653
  }, "strip", z.ZodTypeAny, {
654
654
  id: string;
655
- tool: string;
656
- prompt: string;
657
655
  timestamp: string;
656
+ prompt: string;
657
+ tool: string;
658
658
  url?: string | undefined;
659
659
  base64?: string | undefined;
660
- seed?: number | undefined;
661
660
  metadata?: Record<string, unknown> | undefined;
661
+ seed?: number | undefined;
662
662
  }, {
663
663
  id: string;
664
- tool: string;
665
- prompt: string;
666
664
  timestamp: string;
665
+ prompt: string;
666
+ tool: string;
667
667
  url?: string | undefined;
668
668
  base64?: string | undefined;
669
- seed?: number | undefined;
670
669
  metadata?: Record<string, unknown> | undefined;
670
+ seed?: number | undefined;
671
671
  }>, "many">>;
672
672
  consistency: z.ZodOptional<z.ZodObject<{
673
673
  characterRef: z.ZodOptional<z.ZodString>;
@@ -691,8 +691,8 @@ export declare const imageGenSchema: z.ZodObject<{
691
691
  artisticStyle: string;
692
692
  mood: string;
693
693
  colorScheme?: string | undefined;
694
- qualityTags?: string[] | undefined;
695
694
  influences?: string[] | undefined;
695
+ qualityTags?: string[] | undefined;
696
696
  negativeElements?: string[] | undefined;
697
697
  };
698
698
  subject: {
@@ -700,8 +700,8 @@ export declare const imageGenSchema: z.ZodObject<{
700
700
  primaryDescription: string;
701
701
  physicalTraits?: {
702
702
  height?: string | undefined;
703
- age?: string | undefined;
704
703
  gender?: string | undefined;
704
+ age?: string | undefined;
705
705
  bodyType?: string | undefined;
706
706
  skinTone?: string | undefined;
707
707
  hairColor?: string | undefined;
@@ -722,8 +722,8 @@ export declare const imageGenSchema: z.ZodObject<{
722
722
  weather?: string | undefined;
723
723
  lighting?: string | undefined;
724
724
  architecture?: string | undefined;
725
- vegetation?: string | undefined;
726
725
  notableFeatures?: string[] | undefined;
726
+ vegetation?: string | undefined;
727
727
  } | undefined;
728
728
  objectDetails?: {
729
729
  size?: string | undefined;
@@ -738,8 +738,8 @@ export declare const imageGenSchema: z.ZodObject<{
738
738
  composition: {
739
739
  framing: string;
740
740
  background?: string | undefined;
741
- aspectRatio?: string | undefined;
742
741
  cameraAngle?: string | undefined;
742
+ aspectRatio?: string | undefined;
743
743
  focusPoint?: string | undefined;
744
744
  depth?: string | undefined;
745
745
  };
@@ -758,8 +758,8 @@ export declare const imageGenSchema: z.ZodObject<{
758
758
  negative: string;
759
759
  checkpoint?: string | undefined;
760
760
  loras?: {
761
- weight: number;
762
761
  name: string;
762
+ weight: number;
763
763
  }[] | undefined;
764
764
  samplerSettings?: {
765
765
  sampler?: string | undefined;
@@ -773,13 +773,13 @@ export declare const imageGenSchema: z.ZodObject<{
773
773
  } | undefined;
774
774
  generations?: {
775
775
  id: string;
776
- tool: string;
777
- prompt: string;
778
776
  timestamp: string;
777
+ prompt: string;
778
+ tool: string;
779
779
  url?: string | undefined;
780
780
  base64?: string | undefined;
781
- seed?: number | undefined;
782
781
  metadata?: Record<string, unknown> | undefined;
782
+ seed?: number | undefined;
783
783
  }[] | undefined;
784
784
  }, {
785
785
  style: {
@@ -787,8 +787,8 @@ export declare const imageGenSchema: z.ZodObject<{
787
787
  artisticStyle: string;
788
788
  mood: string;
789
789
  colorScheme?: string | undefined;
790
- qualityTags?: string[] | undefined;
791
790
  influences?: string[] | undefined;
791
+ qualityTags?: string[] | undefined;
792
792
  negativeElements?: string[] | undefined;
793
793
  };
794
794
  subject: {
@@ -796,8 +796,8 @@ export declare const imageGenSchema: z.ZodObject<{
796
796
  primaryDescription: string;
797
797
  physicalTraits?: {
798
798
  height?: string | undefined;
799
- age?: string | undefined;
800
799
  gender?: string | undefined;
800
+ age?: string | undefined;
801
801
  bodyType?: string | undefined;
802
802
  skinTone?: string | undefined;
803
803
  hairColor?: string | undefined;
@@ -818,8 +818,8 @@ export declare const imageGenSchema: z.ZodObject<{
818
818
  weather?: string | undefined;
819
819
  lighting?: string | undefined;
820
820
  architecture?: string | undefined;
821
- vegetation?: string | undefined;
822
821
  notableFeatures?: string[] | undefined;
822
+ vegetation?: string | undefined;
823
823
  } | undefined;
824
824
  objectDetails?: {
825
825
  size?: string | undefined;
@@ -834,8 +834,8 @@ export declare const imageGenSchema: z.ZodObject<{
834
834
  composition: {
835
835
  framing: string;
836
836
  background?: string | undefined;
837
- aspectRatio?: string | undefined;
838
837
  cameraAngle?: string | undefined;
838
+ aspectRatio?: string | undefined;
839
839
  focusPoint?: string | undefined;
840
840
  depth?: string | undefined;
841
841
  };
@@ -854,8 +854,8 @@ export declare const imageGenSchema: z.ZodObject<{
854
854
  negative: string;
855
855
  checkpoint?: string | undefined;
856
856
  loras?: {
857
- weight: number;
858
857
  name: string;
858
+ weight: number;
859
859
  }[] | undefined;
860
860
  samplerSettings?: {
861
861
  sampler?: string | undefined;
@@ -869,13 +869,13 @@ export declare const imageGenSchema: z.ZodObject<{
869
869
  } | undefined;
870
870
  generations?: {
871
871
  id: string;
872
- tool: string;
873
- prompt: string;
874
872
  timestamp: string;
873
+ prompt: string;
874
+ tool: string;
875
875
  url?: string | undefined;
876
876
  base64?: string | undefined;
877
- seed?: number | undefined;
878
877
  metadata?: Record<string, unknown> | undefined;
878
+ seed?: number | undefined;
879
879
  }[] | undefined;
880
880
  }>;
881
881
  export declare const voiceSchema: z.ZodObject<{
@@ -0,0 +1 @@
1
+ export { createCoreMcpServer, SERVER_NAME, SERVER_VERSION } from "./mcp-server.js";
package/dist/server.js ADDED
@@ -0,0 +1,20 @@
1
+ // The core assembly: the MCP server built from the core's tools.
2
+ //
3
+ // This is a SEPARATE entry point (`run-dmcp/server`) from the core library
4
+ // (`run-dmcp`, src/index.ts) for one reason, and it is a cost. Building a
5
+ // server means loading the MCP SDK and twenty-one register modules; wanting
6
+ // `LIMITS` or `createGame` does not. While these lived on the same entry,
7
+ // every consumer paid for both -- 97.4ms per process against 46.8ms for the
8
+ // mechanism alone, measured cold at 0.3.0 over nine spawns, on a consumer
9
+ // that spawns a fresh process per turn and never calls this function.
10
+ //
11
+ // The split is a move, not a change: `createCoreMcpServer` is the same
12
+ // function with the same options, reached by a different specifier.
13
+ // src/__tests__/assemblyBoundary.test.ts asserts that it stays reachable
14
+ // from here, and unreachable from there.
15
+ //
16
+ // Importing this module must still do nothing to the machine -- the rule
17
+ // src/index.ts's header states applies to every library entry this package
18
+ // publishes, and src/__tests__/entrypoints.test.ts holds it. Starting things
19
+ // is src/bin/run-dmcp.ts.
20
+ export { createCoreMcpServer, SERVER_NAME, SERVER_VERSION } from "./mcp-server.js";
@@ -92,6 +92,14 @@ export interface ChangeSet {
92
92
  * retroactively un-happen it. Filtering these rows by aliveness would be
93
93
  * exactly the kind of policy this module isn't allowed to have an opinion
94
94
  * on (see `ChangeSet`'s doc comment).
95
+ *
96
+ * DECISION(#18): changesWithin() returns every transition, whoever could observe it.
97
+ *
98
+ * Omniscient for the same reason and by the same decision as `replay()` --
99
+ * see its doc comment for the argument. Every transition in the window is
100
+ * returned regardless of which principal could have observed it, and a
101
+ * later per-principal filter arrives as one predicate on the two queries
102
+ * below (issue #18).
95
103
  */
96
104
  export declare function changesWithin(params: {
97
105
  gameId: string;
@@ -71,6 +71,14 @@ function compareChanges(a, b) {
71
71
  * retroactively un-happen it. Filtering these rows by aliveness would be
72
72
  * exactly the kind of policy this module isn't allowed to have an opinion
73
73
  * on (see `ChangeSet`'s doc comment).
74
+ *
75
+ * DECISION(#18): changesWithin() returns every transition, whoever could observe it.
76
+ *
77
+ * Omniscient for the same reason and by the same decision as `replay()` --
78
+ * see its doc comment for the argument. Every transition in the window is
79
+ * returned regardless of which principal could have observed it, and a
80
+ * later per-principal filter arrives as one predicate on the two queries
81
+ * below (issue #18).
74
82
  */
75
83
  export function changesWithin(params) {
76
84
  const { gameId, t0, t1 } = params;
@@ -28,6 +28,16 @@ import type { EntityKind } from "./kinds.js";
28
28
  * artifact contains no `file_path` anywhere and that those rows
29
29
  * contributed nothing (not even an extra entity).
30
30
  *
31
+ * DECISION(#18): the frozen artifact carries no per-principal projection.
32
+ *
33
+ * No visibility filtering either, and the same "requirement, not omission"
34
+ * applies (issue #18): the artifact is the omniscient timeline. Whether a
35
+ * per-principal export should exist is not a small question deferred for
36
+ * tidiness -- it decides whether §6's "one file a deterministic consumer
37
+ * depends on" becomes N files plus a rule for choosing between them. That
38
+ * is a decision for the caller that first needs it to own, and it cannot be
39
+ * made well against no caller, so it is not made here.
40
+ *
31
41
  * No live tables either. The live projected tables (`games`, `characters`,
32
42
  * `resources`, ...) are a projection of the timeline, not a second source
33
43
  * of truth (design §5.4's decided destination) -- a file carrying both
@@ -28,6 +28,16 @@ import { getDatabase, withTransaction } from "../db/connection.js";
28
28
  * artifact contains no `file_path` anywhere and that those rows
29
29
  * contributed nothing (not even an extra entity).
30
30
  *
31
+ * DECISION(#18): the frozen artifact carries no per-principal projection.
32
+ *
33
+ * No visibility filtering either, and the same "requirement, not omission"
34
+ * applies (issue #18): the artifact is the omniscient timeline. Whether a
35
+ * per-principal export should exist is not a small question deferred for
36
+ * tidiness -- it decides whether §6's "one file a deterministic consumer
37
+ * depends on" becomes N files plus a rule for choosing between them. That
38
+ * is a decision for the caller that first needs it to own, and it cannot be
39
+ * made well against no caller, so it is not made here.
40
+ *
31
41
  * No live tables either. The live projected tables (`games`, `characters`,
32
42
  * `resources`, ...) are a projection of the timeline, not a second source
33
43
  * of truth (design §5.4's decided destination) -- a file carrying both
@@ -1,5 +1,7 @@
1
1
  import { type FactProvenance } from "./provenance.js";
2
2
  /**
3
+ * DECISION(#21): contradiction is whole-value comparison under one key.
4
+ *
3
5
  * `irreversible` -- the temporal member of the constraint family alongside
4
6
  * `bounded`, `monotonic`, and conserved sets (design §5.3). Declared per
5
7
  * fact, not per entity or per value: `facts.irreversible` is a column on the
@@ -57,6 +57,28 @@ export interface Snapshot {
57
57
  * large one and make every distinct entity count its own SQL text, which
58
58
  * defeats better-sqlite3's prepared-statement cache. Fixed SQL, two binds
59
59
  * of `t`, regardless of how many entities exist.
60
+ *
61
+ * DECISION(#18): replay() applies no visibility filtering, by decision rather than omission.
62
+ *
63
+ * OMNISCIENT, DELIBERATELY (issue #18). This returns every fact valid at
64
+ * `t`, for every entity alive at `t`, with no visibility filtering of any
65
+ * kind. That is a decision, not an omission: per-principal visibility is
66
+ * deferred until a real caller makes the requirement concrete, because the
67
+ * expensive half of such a feature is the principal model, and inventing a
68
+ * principal against an imagined client is precisely what design §13 forbids.
69
+ *
70
+ * Worth stating out loud here rather than leaving to be inferred, because
71
+ * the predecessor's unenforced version of the same decision is legible
72
+ * today for exactly one reason -- `get_secret`'s own description says "DM
73
+ * view - shows all info" -- and a reader who finds an unfiltered query with
74
+ * no such sentence cannot tell a decision from a hole.
75
+ *
76
+ * A later filter is additive and needs nothing reserved for it now: it is
77
+ * one predicate, added here once, because this function is the single place
78
+ * every reader of "what was true at `t`" goes through. Do NOT add a
79
+ * nullable visibility column to `facts` in anticipation -- an unpopulated
80
+ * one reads equally well as "visible to everyone" and "visible to no one",
81
+ * and both readings survive review.
60
82
  */
61
83
  export declare function replay(params: {
62
84
  gameId: string;
@@ -36,6 +36,28 @@ const ALIVE_AT_T = "e.created_at_t <= ? AND (e.destroyed_at_t IS NULL OR e.destr
36
36
  * large one and make every distinct entity count its own SQL text, which
37
37
  * defeats better-sqlite3's prepared-statement cache. Fixed SQL, two binds
38
38
  * of `t`, regardless of how many entities exist.
39
+ *
40
+ * DECISION(#18): replay() applies no visibility filtering, by decision rather than omission.
41
+ *
42
+ * OMNISCIENT, DELIBERATELY (issue #18). This returns every fact valid at
43
+ * `t`, for every entity alive at `t`, with no visibility filtering of any
44
+ * kind. That is a decision, not an omission: per-principal visibility is
45
+ * deferred until a real caller makes the requirement concrete, because the
46
+ * expensive half of such a feature is the principal model, and inventing a
47
+ * principal against an imagined client is precisely what design §13 forbids.
48
+ *
49
+ * Worth stating out loud here rather than leaving to be inferred, because
50
+ * the predecessor's unenforced version of the same decision is legible
51
+ * today for exactly one reason -- `get_secret`'s own description says "DM
52
+ * view - shows all info" -- and a reader who finds an unfiltered query with
53
+ * no such sentence cannot tell a decision from a hole.
54
+ *
55
+ * A later filter is additive and needs nothing reserved for it now: it is
56
+ * one predicate, added here once, because this function is the single place
57
+ * every reader of "what was true at `t`" goes through. Do NOT add a
58
+ * nullable visibility column to `facts` in anticipation -- an unpopulated
59
+ * one reads equally well as "visible to everyone" and "visible to no one",
60
+ * and both readings survive review.
39
61
  */
40
62
  export function replay(params) {
41
63
  const { gameId, t } = params;