@miadi/ncp-story-studio 0.1.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 (126) hide show
  1. package/LICENSE +21 -0
  2. package/PHASES.md +160 -0
  3. package/README.md +140 -0
  4. package/assets/PROVENANCE.json +5 -0
  5. package/assets/examples/PROVENANCE.json +26 -0
  6. package/assets/examples/anora.json +228 -0
  7. package/assets/examples/example-story.json +112 -0
  8. package/assets/examples/the-shawshank-redemption.json +2068 -0
  9. package/assets/examples/weaver_of_words__the_catalyst_of_change_251101.json +1132 -0
  10. package/assets/ncp-schema.json +794 -0
  11. package/assets/terminology.json +2919 -0
  12. package/dist/agents/adapter.d.ts +60 -0
  13. package/dist/agents/adapter.d.ts.map +1 -0
  14. package/dist/agents/adapter.js +69 -0
  15. package/dist/agents/adapter.js.map +1 -0
  16. package/dist/agents/context.d.ts +19 -0
  17. package/dist/agents/context.d.ts.map +1 -0
  18. package/dist/agents/context.js +49 -0
  19. package/dist/agents/context.js.map +1 -0
  20. package/dist/agents/index.d.ts +5 -0
  21. package/dist/agents/index.d.ts.map +1 -0
  22. package/dist/agents/index.js +7 -0
  23. package/dist/agents/index.js.map +1 -0
  24. package/dist/agents/links.d.ts +41 -0
  25. package/dist/agents/links.d.ts.map +1 -0
  26. package/dist/agents/links.js +76 -0
  27. package/dist/agents/links.js.map +1 -0
  28. package/dist/agents/personas.d.ts +16 -0
  29. package/dist/agents/personas.d.ts.map +1 -0
  30. package/dist/agents/personas.js +34 -0
  31. package/dist/agents/personas.js.map +1 -0
  32. package/dist/fixtures/index.d.ts +27 -0
  33. package/dist/fixtures/index.d.ts.map +1 -0
  34. package/dist/fixtures/index.js +69 -0
  35. package/dist/fixtures/index.js.map +1 -0
  36. package/dist/graph/index.d.ts +60 -0
  37. package/dist/graph/index.d.ts.map +1 -0
  38. package/dist/graph/index.js +97 -0
  39. package/dist/graph/index.js.map +1 -0
  40. package/dist/graph/react/index.d.ts +2 -0
  41. package/dist/graph/react/index.d.ts.map +1 -0
  42. package/dist/graph/react/index.js +5 -0
  43. package/dist/graph/react/index.js.map +1 -0
  44. package/dist/graph/react/story-graph.d.ts +17 -0
  45. package/dist/graph/react/story-graph.d.ts.map +1 -0
  46. package/dist/graph/react/story-graph.js +26 -0
  47. package/dist/graph/react/story-graph.js.map +1 -0
  48. package/dist/graph/tones.d.ts +36 -0
  49. package/dist/graph/tones.d.ts.map +1 -0
  50. package/dist/graph/tones.js +38 -0
  51. package/dist/graph/tones.js.map +1 -0
  52. package/dist/index.d.ts +33 -0
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.js +24 -0
  55. package/dist/index.js.map +1 -0
  56. package/dist/schema/constants.d.ts +3 -0
  57. package/dist/schema/constants.d.ts.map +1 -0
  58. package/dist/schema/constants.js +3 -0
  59. package/dist/schema/constants.js.map +1 -0
  60. package/dist/schema/extensions.d.ts +14 -0
  61. package/dist/schema/extensions.d.ts.map +1 -0
  62. package/dist/schema/extensions.js +61 -0
  63. package/dist/schema/extensions.js.map +1 -0
  64. package/dist/schema/generated-terms.d.ts +7 -0
  65. package/dist/schema/generated-terms.d.ts.map +1 -0
  66. package/dist/schema/generated-terms.js +518 -0
  67. package/dist/schema/generated-terms.js.map +1 -0
  68. package/dist/schema/generated.d.ts +64 -0
  69. package/dist/schema/generated.d.ts.map +1 -0
  70. package/dist/schema/generated.js +497 -0
  71. package/dist/schema/generated.js.map +1 -0
  72. package/dist/schema/index.d.ts +48 -0
  73. package/dist/schema/index.d.ts.map +1 -0
  74. package/dist/schema/index.js +92 -0
  75. package/dist/schema/index.js.map +1 -0
  76. package/dist/schema/normalize.d.ts +20 -0
  77. package/dist/schema/normalize.d.ts.map +1 -0
  78. package/dist/schema/normalize.js +88 -0
  79. package/dist/schema/normalize.js.map +1 -0
  80. package/dist/schema/read.d.ts +31 -0
  81. package/dist/schema/read.d.ts.map +1 -0
  82. package/dist/schema/read.js +640 -0
  83. package/dist/schema/read.js.map +1 -0
  84. package/dist/schema/terms.d.ts +11 -0
  85. package/dist/schema/terms.d.ts.map +1 -0
  86. package/dist/schema/terms.js +80 -0
  87. package/dist/schema/terms.js.map +1 -0
  88. package/dist/schema/types.d.ts +140 -0
  89. package/dist/schema/types.d.ts.map +1 -0
  90. package/dist/schema/types.js +2 -0
  91. package/dist/schema/types.js.map +1 -0
  92. package/dist/schema/validate.d.ts +54 -0
  93. package/dist/schema/validate.d.ts.map +1 -0
  94. package/dist/schema/validate.js +490 -0
  95. package/dist/schema/validate.js.map +1 -0
  96. package/dist/store/index.d.ts +76 -0
  97. package/dist/store/index.d.ts.map +1 -0
  98. package/dist/store/index.js +96 -0
  99. package/dist/store/index.js.map +1 -0
  100. package/dist/store/json.d.ts +35 -0
  101. package/dist/store/json.d.ts.map +1 -0
  102. package/dist/store/json.js +192 -0
  103. package/dist/store/json.js.map +1 -0
  104. package/dist/store/mutations.d.ts +45 -0
  105. package/dist/store/mutations.d.ts.map +1 -0
  106. package/dist/store/mutations.js +181 -0
  107. package/dist/store/mutations.js.map +1 -0
  108. package/dist/store/neon.d.ts +42 -0
  109. package/dist/store/neon.d.ts.map +1 -0
  110. package/dist/store/neon.js +167 -0
  111. package/dist/store/neon.js.map +1 -0
  112. package/dist/terminology/generated.d.ts +3 -0
  113. package/dist/terminology/generated.d.ts.map +1 -0
  114. package/dist/terminology/generated.js +2923 -0
  115. package/dist/terminology/generated.js.map +1 -0
  116. package/dist/terminology/index.d.ts +20 -0
  117. package/dist/terminology/index.d.ts.map +1 -0
  118. package/dist/terminology/index.js +71 -0
  119. package/dist/terminology/index.js.map +1 -0
  120. package/dist/terminology/types.d.ts +25 -0
  121. package/dist/terminology/types.d.ts.map +1 -0
  122. package/dist/terminology/types.js +2 -0
  123. package/dist/terminology/types.js.map +1 -0
  124. package/package.json +117 -0
  125. package/rispecs/README.rise.md +5 -0
  126. package/rispecs/RISPEC.md +9 -0
@@ -0,0 +1,497 @@
1
+ // GENERATED FILE — do not edit by hand.
2
+ // Regenerate with: npm run sync-schema (scripts/sync-canonical-schema.mjs)
3
+ // Source: /workspace/repos/avadisabelle/holisticagnostic-narrative-context-protocol/schema/ncp-schema.json
4
+ // sha256: c7a72b1588c988a063d6b92f9ee227f48885fcec666387e464843c434550d811
5
+ export const CANONICAL_SCHEMA_PROVENANCE = {
6
+ source_path: "/workspace/repos/avadisabelle/holisticagnostic-narrative-context-protocol/schema/ncp-schema.json",
7
+ sha256: "c7a72b1588c988a063d6b92f9ee227f48885fcec666387e464843c434550d811",
8
+ synced_at: "2026-09-12",
9
+ schema_title: "Narrative Context Protcol Schema",
10
+ declared_schema_version: "1.0",
11
+ };
12
+ /** The canonical schema's own `required` lists, by element. */
13
+ export const CANONICAL_REQUIRED = {
14
+ "story": [
15
+ "id",
16
+ "title",
17
+ "genre",
18
+ "logline",
19
+ "created_at",
20
+ "narratives"
21
+ ],
22
+ "narrative": [
23
+ "id",
24
+ "title",
25
+ "subtext",
26
+ "storytelling"
27
+ ],
28
+ "subtext": [
29
+ "perspectives",
30
+ "players",
31
+ "dynamics",
32
+ "storypoints",
33
+ "storybeats"
34
+ ],
35
+ "storytelling": [],
36
+ "perspective": [
37
+ "id",
38
+ "pov",
39
+ "summary",
40
+ "storytelling"
41
+ ],
42
+ "player": [
43
+ "id",
44
+ "name",
45
+ "role",
46
+ "visual",
47
+ "audio",
48
+ "summary",
49
+ "storytelling",
50
+ "perspectives"
51
+ ],
52
+ "dynamic": [
53
+ "id",
54
+ "dynamic",
55
+ "vector",
56
+ "summary",
57
+ "storytelling"
58
+ ],
59
+ "storypoint": [
60
+ "id",
61
+ "appreciation",
62
+ "narrative_function",
63
+ "illustration",
64
+ "summary",
65
+ "storytelling",
66
+ "perspectives"
67
+ ],
68
+ "storybeat": [
69
+ "id",
70
+ "appreciation",
71
+ "sequence",
72
+ "narrative_function",
73
+ "illustration",
74
+ "summary",
75
+ "storytelling",
76
+ "tones",
77
+ "perspectives"
78
+ ],
79
+ "moment": []
80
+ };
81
+ /** What the canonical schema says about `storybeat.sequence`. */
82
+ export const SEQUENCE_CONSTRAINTS = {
83
+ "minimum": 1,
84
+ "type": "integer",
85
+ "ranges": {
86
+ "signpost": {
87
+ "minimum": 1,
88
+ "maximum": 4
89
+ },
90
+ "progression": {
91
+ "minimum": 1,
92
+ "maximum": 16
93
+ },
94
+ "event": {
95
+ "minimum": 1,
96
+ "maximum": 64
97
+ }
98
+ }
99
+ };
100
+ export const AUTHOR_STRUCTURAL_POV = [
101
+ "i",
102
+ "you",
103
+ "we",
104
+ "they",
105
+ ];
106
+ export const DYNAMIC_KINDS = [
107
+ "main_character_resolve",
108
+ "influence_character_resolve",
109
+ "main_character_growth",
110
+ "main_character_approach",
111
+ "problem_solving_style",
112
+ "story_limit",
113
+ "story_driver",
114
+ "story_outcome",
115
+ "story_judgment",
116
+ ];
117
+ export const DYNAMIC_VECTORS = [
118
+ "change",
119
+ "steadfast",
120
+ "stop",
121
+ "start",
122
+ "do_er",
123
+ "be_er",
124
+ "linear",
125
+ "holistic",
126
+ "optionlock",
127
+ "timelock",
128
+ "action",
129
+ "decision",
130
+ "success",
131
+ "failure",
132
+ "good",
133
+ "bad",
134
+ ];
135
+ export const STORYPOINT_APPRECIATIONS = [
136
+ "domain",
137
+ "concern",
138
+ "issue",
139
+ "problem",
140
+ "solution",
141
+ "symptom",
142
+ "response",
143
+ "catalyst",
144
+ "inhibitor",
145
+ "unique_ability",
146
+ "critical_flaw",
147
+ "benchmark",
148
+ "story_goal",
149
+ "story_requirements",
150
+ "story_prerequisites",
151
+ "story_preconditions",
152
+ "story_costs",
153
+ "story_dividends",
154
+ "story_forewarnings",
155
+ "story_consequence",
156
+ "pivotal_element",
157
+ "initial_story_driver",
158
+ "second_story_driver",
159
+ "midpoint_story_driver",
160
+ "fourth_story_driver",
161
+ "concluding_story_driver",
162
+ "signpost",
163
+ "progression",
164
+ "event",
165
+ ];
166
+ export const STORYPOINT_NARRATIVE_FUNCTIONS = [
167
+ "universe",
168
+ "physics",
169
+ "psychology",
170
+ "mind",
171
+ "past",
172
+ "understanding",
173
+ "conceptualizing",
174
+ "memory",
175
+ "progress",
176
+ "doing",
177
+ "being",
178
+ "preconscious",
179
+ "future",
180
+ "obtaining",
181
+ "becoming",
182
+ "subconscious",
183
+ "present",
184
+ "learning",
185
+ "conceiving",
186
+ "conscious",
187
+ "fate",
188
+ "prediction",
189
+ "interdiction",
190
+ "destiny",
191
+ "instinct",
192
+ "senses",
193
+ "interpretation",
194
+ "conditioning",
195
+ "fact",
196
+ "security",
197
+ "threat",
198
+ "fantasy",
199
+ "wisdom",
200
+ "skill",
201
+ "experience",
202
+ "enlightenment",
203
+ "openness",
204
+ "delay",
205
+ "choice",
206
+ "preconception",
207
+ "approach",
208
+ "self_interest",
209
+ "altruism",
210
+ "attitude",
211
+ "work",
212
+ "attraction",
213
+ "repulsion",
214
+ "attempt",
215
+ "qualification",
216
+ "strategy",
217
+ "analysis",
218
+ "stipulation",
219
+ "truth",
220
+ "evidence",
221
+ "suspicion",
222
+ "falsehood",
223
+ "state_of_being",
224
+ "situation",
225
+ "circumstances",
226
+ "sense_of_self",
227
+ "value",
228
+ "confidence",
229
+ "worry",
230
+ "worth",
231
+ "knowing",
232
+ "able",
233
+ "driven",
234
+ "thinking",
235
+ "closure",
236
+ "hope",
237
+ "dream",
238
+ "denial",
239
+ "rationalization",
240
+ "commitment",
241
+ "responsibility",
242
+ "obligation",
243
+ "investigation",
244
+ "appraisal",
245
+ "reappraisal",
246
+ "doubt",
247
+ "permission",
248
+ "need",
249
+ "expediency",
250
+ "deficiency",
251
+ "ability",
252
+ "acceptance",
253
+ "accurate",
254
+ "actuality",
255
+ "avoid",
256
+ "aware",
257
+ "cause",
258
+ "certainty",
259
+ "change",
260
+ "chaos",
261
+ "conscience",
262
+ "consider",
263
+ "control",
264
+ "deduction",
265
+ "desire",
266
+ "determination",
267
+ "disbelief",
268
+ "effect",
269
+ "ending",
270
+ "equity",
271
+ "evaluation",
272
+ "expectation",
273
+ "faith",
274
+ "feeling",
275
+ "help",
276
+ "hinder",
277
+ "hunch",
278
+ "inaction",
279
+ "induction",
280
+ "inequity",
281
+ "inertia",
282
+ "knowledge",
283
+ "logic",
284
+ "rejection",
285
+ "deviation",
286
+ "oppose",
287
+ "order",
288
+ "perception",
289
+ "possibility",
290
+ "potentiality",
291
+ "proaction",
292
+ "probability",
293
+ "process",
294
+ "production",
295
+ "projection",
296
+ "protection",
297
+ "proven",
298
+ "pursuit",
299
+ "re_evaluation",
300
+ "reaction",
301
+ "reconsider",
302
+ "reduction",
303
+ "result",
304
+ "self_aware",
305
+ "speculation",
306
+ "support",
307
+ "temptation",
308
+ "test",
309
+ "theory",
310
+ "thought",
311
+ "trust",
312
+ "uncontrolled",
313
+ "continuing",
314
+ "presumption",
315
+ ];
316
+ export const STORYBEAT_APPRECIATIONS = [
317
+ "signpost",
318
+ "progression",
319
+ "event",
320
+ ];
321
+ export const STORYBEAT_NARRATIVE_FUNCTIONS = [
322
+ "past",
323
+ "understanding",
324
+ "conceptualizing",
325
+ "memory",
326
+ "progress",
327
+ "doing",
328
+ "being",
329
+ "preconscious",
330
+ "future",
331
+ "obtaining",
332
+ "becoming",
333
+ "subconscious",
334
+ "present",
335
+ "learning",
336
+ "conceiving",
337
+ "conscious",
338
+ "fate",
339
+ "prediction",
340
+ "interdiction",
341
+ "destiny",
342
+ "instinct",
343
+ "senses",
344
+ "interpretation",
345
+ "conditioning",
346
+ "fact",
347
+ "security",
348
+ "threat",
349
+ "fantasy",
350
+ "wisdom",
351
+ "skill",
352
+ "experience",
353
+ "enlightenment",
354
+ "openness",
355
+ "delay",
356
+ "choice",
357
+ "preconception",
358
+ "approach",
359
+ "self_interest",
360
+ "altruism",
361
+ "attitude",
362
+ "work",
363
+ "attraction",
364
+ "repulsion",
365
+ "attempt",
366
+ "qualification",
367
+ "strategy",
368
+ "analysis",
369
+ "stipulation",
370
+ "truth",
371
+ "evidence",
372
+ "suspicion",
373
+ "falsehood",
374
+ "state_of_being",
375
+ "situation",
376
+ "circumstances",
377
+ "sense_of_self",
378
+ "value",
379
+ "confidence",
380
+ "worry",
381
+ "worth",
382
+ "knowing",
383
+ "able",
384
+ "driven",
385
+ "thinking",
386
+ "closure",
387
+ "hope",
388
+ "dream",
389
+ "denial",
390
+ "rationalization",
391
+ "commitment",
392
+ "responsibility",
393
+ "obligation",
394
+ "investigation",
395
+ "appraisal",
396
+ "reappraisal",
397
+ "doubt",
398
+ "permission",
399
+ "need",
400
+ "expediency",
401
+ "deficiency",
402
+ "ability",
403
+ "acceptance",
404
+ "accurate",
405
+ "actuality",
406
+ "avoid",
407
+ "aware",
408
+ "cause",
409
+ "certainty",
410
+ "change",
411
+ "chaos",
412
+ "conscience",
413
+ "consider",
414
+ "control",
415
+ "deduction",
416
+ "desire",
417
+ "determination",
418
+ "disbelief",
419
+ "effect",
420
+ "ending",
421
+ "equity",
422
+ "evaluation",
423
+ "expectation",
424
+ "faith",
425
+ "feeling",
426
+ "help",
427
+ "hinder",
428
+ "hunch",
429
+ "inaction",
430
+ "induction",
431
+ "inequity",
432
+ "inertia",
433
+ "knowledge",
434
+ "logic",
435
+ "rejection",
436
+ "deviation",
437
+ "oppose",
438
+ "order",
439
+ "perception",
440
+ "possibility",
441
+ "potentiality",
442
+ "proaction",
443
+ "probability",
444
+ "process",
445
+ "production",
446
+ "projection",
447
+ "protection",
448
+ "proven",
449
+ "pursuit",
450
+ "re_evaluation",
451
+ "reaction",
452
+ "reconsider",
453
+ "reduction",
454
+ "result",
455
+ "self_aware",
456
+ "speculation",
457
+ "support",
458
+ "temptation",
459
+ "test",
460
+ "theory",
461
+ "thought",
462
+ "trust",
463
+ "abandon",
464
+ "continuing",
465
+ "presumption",
466
+ ];
467
+ export const TONE_ABSTRACTION = [
468
+ "situation",
469
+ "action",
470
+ "justification",
471
+ "opinion",
472
+ ];
473
+ export const TONE_SPATIAL = [
474
+ "potential",
475
+ "resistance",
476
+ "current",
477
+ "power",
478
+ ];
479
+ export const TONE_TEMPORAL = [
480
+ "expression",
481
+ "experimentation",
482
+ "integration",
483
+ "transcendence",
484
+ ];
485
+ export const AUDIENCE_EXPERIENTIAL_POV = [
486
+ "first_person_central",
487
+ "first_person_peripheral",
488
+ "second_person",
489
+ "third_person_limited",
490
+ "third_person_objective",
491
+ "third_person_omniscient",
492
+ ];
493
+ export const MOMENT_FABRIC_TYPES = [
494
+ "space",
495
+ "time",
496
+ ];
497
+ //# sourceMappingURL=generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated.js","sourceRoot":"","sources":["../../src/schema/generated.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,2EAA2E;AAC3E,2GAA2G;AAC3G,2EAA2E;AAE3E,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,WAAW,EAAE,kGAAkG;IAC/G,MAAM,EAAE,kEAAkE;IAC1E,SAAS,EAAE,YAAY;IACvB,YAAY,EAAE,kCAAkC;IAChD,uBAAuB,EAAE,KAAK;CACtB,CAAA;AAEV,+DAA+D;AAC/D,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,OAAO,EAAE;QACP,IAAI;QACJ,OAAO;QACP,OAAO;QACP,SAAS;QACT,YAAY;QACZ,YAAY;KACb;IACD,WAAW,EAAE;QACX,IAAI;QACJ,OAAO;QACP,SAAS;QACT,cAAc;KACf;IACD,SAAS,EAAE;QACT,cAAc;QACd,SAAS;QACT,UAAU;QACV,aAAa;QACb,YAAY;KACb;IACD,cAAc,EAAE,EAAE;IAClB,aAAa,EAAE;QACb,IAAI;QACJ,KAAK;QACL,SAAS;QACT,cAAc;KACf;IACD,QAAQ,EAAE;QACR,IAAI;QACJ,MAAM;QACN,MAAM;QACN,QAAQ;QACR,OAAO;QACP,SAAS;QACT,cAAc;QACd,cAAc;KACf;IACD,SAAS,EAAE;QACT,IAAI;QACJ,SAAS;QACT,QAAQ;QACR,SAAS;QACT,cAAc;KACf;IACD,YAAY,EAAE;QACZ,IAAI;QACJ,cAAc;QACd,oBA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;CACL,CAAA;AAGV,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,WAAW;IACX,QAAQ;IACR,eAAe;IACf,SAAS;CACD,CAAA;AAGV,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,WAAW;IACX,YAAY;IACZ,SAAS;IACT,OAAO;CACC,CAAA;AAGV,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY;IACZ,iBAAiB;IACjB,aAAa;IACb,eAAe;CACP,CAAA;AAGV,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACvC,sBAAsB;IACtB,yBAAyB;IACzB,eAAe;IACf,sBAAsB;IACtB,wBAAwB;IACxB,yBAAyB;CACjB,CAAA;AAGV,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,OAAO;IACP,MAAM;CACE,CAAA"}
@@ -0,0 +1,48 @@
1
+ export * from './generated.js';
2
+ export * from './types.js';
3
+ export * from './extensions.js';
4
+ export * from './validate.js';
5
+ export * from './normalize.js';
6
+ export * from './constants.js';
7
+ export * from './terms.js';
8
+ export * from './read.js';
9
+ import type { Narrative, NcpDocument, Story, StorySummary, Storybeat } from './types.js';
10
+ /** Wrap a story as a document at the version this package writes. */
11
+ export declare function toNcpDocument(story: Story, schemaVersion?: string): NcpDocument;
12
+ /** The narrative a view should open by default. */
13
+ export declare function primaryNarrative(story: Story): Narrative | undefined;
14
+ /** Beats in reading order. Never mutates the input. */
15
+ export declare function orderedBeats(narrative: Narrative): Storybeat[];
16
+ /** Find a beat by id across every narrative of a story. */
17
+ export declare function findBeat(story: Story, beatId: string): {
18
+ narrative: Narrative;
19
+ beat: Storybeat;
20
+ } | undefined;
21
+ /** Metadata for a project list, without shipping the whole document. */
22
+ export declare function summarizeStory(story: Story, lastModified?: string): StorySummary;
23
+ /** How much of the structure a story has filled in, per element, 0..1. */
24
+ export interface StoryCompleteness {
25
+ perspectives: number;
26
+ players: number;
27
+ dynamics: number;
28
+ storypoints: number;
29
+ storybeats: number;
30
+ toned_beats: number;
31
+ moments: number;
32
+ /** Mean of the element scores, 0..1. */
33
+ overall: number;
34
+ }
35
+ /**
36
+ * Completeness is measured against a documented target for each element, so the
37
+ * number means something a reader can check rather than an opaque score.
38
+ */
39
+ export declare const COMPLETENESS_TARGETS: {
40
+ readonly perspectives: 4;
41
+ readonly players: 2;
42
+ readonly dynamics: 4;
43
+ readonly storypoints: 4;
44
+ readonly storybeats: 4;
45
+ readonly moments: 1;
46
+ };
47
+ export declare function storyCompleteness(story: Story): StoryCompleteness;
48
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAEA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AAGzB,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAExF,qEAAqE;AACrE,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,aAAa,GAAE,MAA2B,GAAG,WAAW,CAEnG;AAED,mDAAmD;AACnD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,SAAS,CAEpE;AAED,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,EAAE,CAE9D;AAED,2DAA2D;AAC3D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAG;IAAE,SAAS,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAAG,SAAS,CAM5G;AAED,wEAAwE;AACxE,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,YAAY,CAYhF;AAED,0EAA0E;AAC1E,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;CAOvB,CAAA;AAEV,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,iBAAiB,CAgCjE"}
@@ -0,0 +1,92 @@
1
+ // `@miadi/ncp-story-studio/schema` — the vocabulary every other module and
2
+ // every consumer produces data against.
3
+ export * from './generated.js';
4
+ export * from './types.js';
5
+ export * from './extensions.js';
6
+ export * from './validate.js';
7
+ export * from './normalize.js';
8
+ export * from './constants.js';
9
+ export * from './terms.js';
10
+ export * from './read.js';
11
+ import { NCP_SCHEMA_VERSION } from './constants.js';
12
+ /** Wrap a story as a document at the version this package writes. */
13
+ export function toNcpDocument(story, schemaVersion = NCP_SCHEMA_VERSION) {
14
+ return { schema_version: schemaVersion, story };
15
+ }
16
+ /** The narrative a view should open by default. */
17
+ export function primaryNarrative(story) {
18
+ return story.narratives[0];
19
+ }
20
+ /** Beats in reading order. Never mutates the input. */
21
+ export function orderedBeats(narrative) {
22
+ return [...narrative.subtext.storybeats].sort((a, b) => a.sequence - b.sequence);
23
+ }
24
+ /** Find a beat by id across every narrative of a story. */
25
+ export function findBeat(story, beatId) {
26
+ for (const narrative of story.narratives) {
27
+ const beat = narrative.subtext.storybeats.find((candidate) => candidate.id === beatId);
28
+ if (beat)
29
+ return { narrative, beat };
30
+ }
31
+ return undefined;
32
+ }
33
+ /** Metadata for a project list, without shipping the whole document. */
34
+ export function summarizeStory(story, lastModified) {
35
+ const beatCount = story.narratives.reduce((total, narrative) => total + narrative.subtext.storybeats.length, 0);
36
+ return {
37
+ id: story.id,
38
+ title: story.title,
39
+ genre: story.genre,
40
+ logline: story.logline,
41
+ created_at: story.created_at,
42
+ last_modified: lastModified,
43
+ narrative_count: story.narratives.length,
44
+ beat_count: beatCount,
45
+ };
46
+ }
47
+ /**
48
+ * Completeness is measured against a documented target for each element, so the
49
+ * number means something a reader can check rather than an opaque score.
50
+ */
51
+ export const COMPLETENESS_TARGETS = {
52
+ perspectives: 4,
53
+ players: 2,
54
+ dynamics: 4,
55
+ storypoints: 4,
56
+ storybeats: 4,
57
+ moments: 1,
58
+ };
59
+ export function storyCompleteness(story) {
60
+ const counts = {
61
+ perspectives: 0,
62
+ players: 0,
63
+ dynamics: 0,
64
+ storypoints: 0,
65
+ storybeats: 0,
66
+ toned: 0,
67
+ moments: 0,
68
+ };
69
+ for (const narrative of story.narratives) {
70
+ counts.perspectives += narrative.subtext.perspectives.length;
71
+ counts.players += narrative.subtext.players.length;
72
+ counts.dynamics += narrative.subtext.dynamics.length;
73
+ counts.storypoints += narrative.subtext.storypoints.length;
74
+ counts.storybeats += narrative.subtext.storybeats.length;
75
+ counts.toned += narrative.subtext.storybeats.filter((beat) => beat.tones !== undefined).length;
76
+ counts.moments += narrative.storytelling.moments.length;
77
+ }
78
+ const ratio = (value, target) => Math.min(1, target === 0 ? 0 : value / target);
79
+ const scores = {
80
+ perspectives: ratio(counts.perspectives, COMPLETENESS_TARGETS.perspectives),
81
+ players: ratio(counts.players, COMPLETENESS_TARGETS.players),
82
+ dynamics: ratio(counts.dynamics, COMPLETENESS_TARGETS.dynamics),
83
+ storypoints: ratio(counts.storypoints, COMPLETENESS_TARGETS.storypoints),
84
+ storybeats: ratio(counts.storybeats, COMPLETENESS_TARGETS.storybeats),
85
+ toned_beats: counts.storybeats === 0 ? 0 : counts.toned / counts.storybeats,
86
+ moments: ratio(counts.moments, COMPLETENESS_TARGETS.moments),
87
+ };
88
+ const values = Object.values(scores);
89
+ const overall = values.reduce((total, value) => total + value, 0) / values.length;
90
+ return { ...scores, overall };
91
+ }
92
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,wCAAwC;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AAEzB,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAGnD,qEAAqE;AACrE,MAAM,UAAU,aAAa,CAAC,KAAY,EAAE,gBAAwB,kBAAkB;IACpF,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAAE,CAAA;AACjD,CAAC;AAED,mDAAmD;AACnD,MAAM,UAAU,gBAAgB,CAAC,KAAY;IAC3C,OAAO,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;AAC5B,CAAC;AAED,uDAAuD;AACvD,MAAM,UAAU,YAAY,CAAC,SAAoB;IAC/C,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAA;AAClF,CAAC;AAED,2DAA2D;AAC3D,MAAM,UAAU,QAAQ,CAAC,KAAY,EAAE,MAAc;IACnD,KAAK,MAAM,SAAS,IAAI,KAAK,CAAC,UAAU,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAA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,MAAM,CAAC,UAAU,EAAE,oBAAoB,CAAC,UAAU,CAAC;QACrE,WAAW,EAAE,MAAM,CAAC,UAAU,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,UAAU;QAC3E,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC;KAC7D,CAAA;IACD,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACpC,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,EAAE,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,CAAA;IACjF,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,CAAA;AAC/B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { NcpDocument } from './types.js';
2
+ export interface NormalizeNote {
3
+ path: string;
4
+ action: string;
5
+ }
6
+ export interface NormalizeResult {
7
+ document: NcpDocument;
8
+ notes: NormalizeNote[];
9
+ }
10
+ /**
11
+ * Accepts:
12
+ * - `{ schema_version, story }` — canonical, passed through
13
+ * - `{ story, narratives }` — the layout `anora.json` and `the-shawshank-redemption.json` use
14
+ * - `{ story }` without a schema version
15
+ * - a bare story object
16
+ */
17
+ export declare function normalizeNcpInput(input: unknown, options?: {
18
+ schemaVersion?: string;
19
+ }): NormalizeResult;
20
+ //# sourceMappingURL=normalize.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/schema/normalize.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAa,WAAW,EAAS,MAAM,YAAY,CAAA;AAE/D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,WAAW,CAAA;IACrB,KAAK,EAAE,aAAa,EAAE,CAAA;CACvB;AAUD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,eAAe,CAsCvG"}