@serene-pub/core-catalog 0.6.0-pr-2 → 0.6.0-pr-4

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 (243) hide show
  1. package/README.md +21 -1
  2. package/components/{sessions → genres/chat}/authors-note/AuthorsNote.svelte +1 -1
  3. package/components/{sessions → genres/chat}/authors-note/AuthorsNoteWidget.svelte +1 -1
  4. package/components/{sessions → shared}/lore-entries/LoreEntries.svelte +1 -1
  5. package/components/{sessions → shared}/lore-entries/LoreEntriesWidget.svelte +1 -1
  6. package/components/{sessions → shared}/messages/MessageComposer.svelte +1 -1
  7. package/components/{sessions → shared}/messages/Messages.svelte +1 -1
  8. package/components/{sessions → shared}/messages/MessagesWidget.svelte +1 -1
  9. package/components/{sessions → shared}/messages/SessionComposer.svelte +1 -1
  10. package/components/{sessions → shared}/messages/SessionMessage.svelte +1 -1
  11. package/components/{sessions → shared}/messages/conversation.svelte.ts +1 -1
  12. package/components/{sessions → shared}/scene-portraits/ScenePortraits.svelte +1 -1
  13. package/components/{sessions → shared}/scene-portraits/ScenePortraitsWidget.svelte +1 -1
  14. package/components/{sessions → shared}/stats/Stats.svelte +1 -1
  15. package/components/{sessions → shared}/stats/StatsWidget.svelte +1 -1
  16. package/components/{sessions → shared}/world-state/WorldState.svelte +1 -1
  17. package/components/{sessions → shared}/world-state/WorldStateWidget.svelte +1 -1
  18. package/dist/components/authors-note.js +5 -5
  19. package/dist/components/authors-note.source.json +1 -1
  20. package/dist/components/core-ui.json +1 -1
  21. package/dist/components/lore-entries.js +5 -5
  22. package/dist/components/lore-entries.source.json +1 -1
  23. package/dist/components/messages.js +26 -26
  24. package/dist/components/messages.source.json +1 -1
  25. package/dist/components/scene-portraits.js +7 -7
  26. package/dist/components/scene-portraits.source.json +1 -1
  27. package/dist/components/{shared-TCQZXBE3.js → shared-3FGURYVS.js} +2 -2
  28. package/dist/components/{shared-AINANAIA.js → shared-FXYLABGF.js} +6 -6
  29. package/dist/components/{shared-UAQVMZZK.js → shared-U3UU5V7L.js} +3 -3
  30. package/dist/components/stats.js +6 -6
  31. package/dist/components/stats.source.json +1 -1
  32. package/dist/components/world-state.js +6 -6
  33. package/dist/components/world-state.source.json +1 -1
  34. package/dist/{answerForm.d.ts → factories/answerForm.d.ts} +4 -30
  35. package/dist/{answerForm.js → factories/answerForm.js} +4 -37
  36. package/dist/factories/once.d.ts +7 -0
  37. package/dist/factories/once.js +9 -0
  38. package/dist/{turnOrder.d.ts → factories/turnOrder.d.ts} +0 -22
  39. package/dist/{turnOrder.js → factories/turnOrder.js} +4 -104
  40. package/dist/genres/adventure/advanceTime.d.ts +11 -0
  41. package/dist/genres/adventure/advanceTime.js +17 -0
  42. package/dist/genres/adventure/answer.d.ts +23 -0
  43. package/dist/genres/adventure/answer.js +59 -0
  44. package/dist/genres/adventure/answerForm.d.ts +9 -0
  45. package/dist/genres/adventure/answerForm.js +11 -0
  46. package/dist/genres/adventure/ask.d.ts +73 -0
  47. package/dist/genres/adventure/ask.js +157 -0
  48. package/dist/genres/adventure/create.d.ts +36 -0
  49. package/dist/genres/adventure/create.js +62 -0
  50. package/dist/genres/adventure/index.d.ts +43 -0
  51. package/dist/genres/adventure/index.js +43 -0
  52. package/dist/genres/adventure/keeperAction.d.ts +24 -0
  53. package/dist/genres/adventure/keeperAction.js +150 -0
  54. package/dist/genres/adventure/look.d.ts +45 -0
  55. package/dist/genres/adventure/look.js +209 -0
  56. package/dist/{adventure.d.ts → genres/adventure/respond.d.ts} +10 -34
  57. package/dist/{adventure.js → genres/adventure/respond.js} +34 -60
  58. package/dist/genres/adventure/rest.d.ts +10 -0
  59. package/dist/genres/adventure/rest.js +16 -0
  60. package/dist/genres/adventure/turnOrder.d.ts +10 -0
  61. package/dist/genres/adventure/turnOrder.js +27 -0
  62. package/dist/genres/chat/answerForm.d.ts +9 -0
  63. package/dist/genres/chat/answerForm.js +11 -0
  64. package/dist/genres/chat/create.d.ts +7 -0
  65. package/dist/{createChat.js → genres/chat/create.js} +6 -6
  66. package/dist/genres/chat/generateImage.d.ts +7 -0
  67. package/dist/{generateImage.js → genres/chat/generateImage.js} +5 -5
  68. package/dist/genres/chat/index.d.ts +15 -0
  69. package/dist/genres/chat/index.js +15 -0
  70. package/dist/{narrate.d.ts → genres/chat/narrate.d.ts} +3 -3
  71. package/dist/{narrate.js → genres/chat/narrate.js} +34 -12
  72. package/dist/{narrateCharacter.d.ts → genres/chat/narrateCharacter.d.ts} +2 -2
  73. package/dist/{narrateCharacter.js → genres/chat/narrateCharacter.js} +35 -16
  74. package/dist/genres/chat/respond.d.ts +25 -0
  75. package/dist/{respond.js → genres/chat/respond.js} +48 -22
  76. package/dist/genres/chat/turnOrder.d.ts +9 -0
  77. package/dist/genres/chat/turnOrder.js +28 -0
  78. package/dist/{ui/sessions → genres/chat/ui}/authors-note/index.d.ts +1 -1
  79. package/dist/genres/guide/answerForm.d.ts +9 -0
  80. package/dist/genres/guide/answerForm.js +11 -0
  81. package/dist/genres/guide/create.d.ts +24 -0
  82. package/dist/genres/guide/create.js +58 -0
  83. package/dist/genres/guide/index.d.ts +9 -0
  84. package/dist/genres/guide/index.js +9 -0
  85. package/dist/{guide.d.ts → genres/guide/respond.d.ts} +1 -20
  86. package/dist/{guide.js → genres/guide/respond.js} +29 -60
  87. package/dist/genres/guide/turnOrder.d.ts +10 -0
  88. package/dist/genres/guide/turnOrder.js +27 -0
  89. package/dist/genres/index.d.ts +14 -0
  90. package/dist/genres/index.js +41 -0
  91. package/dist/genres/lair/answerForm.d.ts +17 -0
  92. package/dist/genres/lair/answerForm.js +19 -0
  93. package/dist/genres/lair/buildRoom.d.ts +64 -0
  94. package/dist/genres/lair/buildRoom.js +244 -0
  95. package/dist/genres/lair/castellanAction.d.ts +27 -0
  96. package/dist/genres/lair/castellanAction.js +177 -0
  97. package/dist/genres/lair/create.d.ts +28 -0
  98. package/dist/genres/lair/create.js +69 -0
  99. package/dist/genres/lair/fileRoom.d.ts +53 -0
  100. package/dist/genres/lair/fileRoom.js +288 -0
  101. package/dist/genres/lair/index.d.ts +60 -0
  102. package/dist/genres/lair/index.js +60 -0
  103. package/dist/genres/lair/nudge.d.ts +25 -0
  104. package/dist/genres/lair/nudge.js +78 -0
  105. package/dist/{lair.d.ts → genres/lair/respond.d.ts} +15 -28
  106. package/dist/{lair.js → genres/lair/respond.js} +45 -76
  107. package/dist/genres/lair/reveal.d.ts +10 -0
  108. package/dist/genres/lair/reveal.js +18 -0
  109. package/dist/genres/lair/roomAnswer.d.ts +86 -0
  110. package/dist/genres/lair/roomAnswer.js +378 -0
  111. package/dist/genres/lair/trap.d.ts +11 -0
  112. package/dist/genres/lair/trap.js +24 -0
  113. package/dist/genres/lair/turnOrder.d.ts +9 -0
  114. package/dist/genres/lair/turnOrder.js +36 -0
  115. package/dist/genres/lair/whisper.d.ts +35 -0
  116. package/dist/genres/lair/whisper.js +90 -0
  117. package/dist/index.d.ts +47 -29
  118. package/dist/index.js +117 -88
  119. package/dist/{genres.js → registry/genres.js} +4 -4
  120. package/dist/{ui/sessions → registry}/widgets.js +6 -6
  121. package/dist/{presets.js → seed/presets.js} +28 -13
  122. package/dist/{prompts.js → seed/prompts.js} +27 -56
  123. package/dist/{annexField.d.ts → shared/annexField.d.ts} +3 -2
  124. package/dist/{annexField.js → shared/annexField.js} +6 -8
  125. package/dist/shared/builtins/branch.d.ts +8 -0
  126. package/dist/shared/builtins/branch.js +13 -0
  127. package/dist/{builtins.d.ts → shared/builtins/builtIn.d.ts} +16 -21
  128. package/dist/{builtins.js → shared/builtins/builtIn.js} +3 -37
  129. package/dist/shared/builtins/delete.d.ts +8 -0
  130. package/dist/shared/builtins/delete.js +13 -0
  131. package/dist/shared/builtins/edit.d.ts +8 -0
  132. package/dist/shared/builtins/edit.js +13 -0
  133. package/dist/shared/builtins/hide.d.ts +8 -0
  134. package/dist/shared/builtins/hide.js +13 -0
  135. package/dist/shared/builtins/index.d.ts +11 -0
  136. package/dist/shared/builtins/index.js +11 -0
  137. package/dist/shared/builtins/swipe.d.ts +8 -0
  138. package/dist/shared/builtins/swipe.js +17 -0
  139. package/dist/shared/sprites.d.ts +34 -0
  140. package/dist/shared/sprites.js +98 -0
  141. package/dist/shared/summarize/character.d.ts +9 -0
  142. package/dist/shared/summarize/character.js +10 -0
  143. package/dist/shared/summarize/history.d.ts +9 -0
  144. package/dist/shared/summarize/history.js +10 -0
  145. package/dist/shared/summarize/index.d.ts +10 -0
  146. package/dist/shared/summarize/index.js +10 -0
  147. package/dist/shared/summarize/scene.d.ts +38 -0
  148. package/dist/shared/summarize/scene.js +42 -0
  149. package/dist/shared/summarize/summarizeSpec.d.ts +54 -0
  150. package/dist/{summarize.js → shared/summarize/summarizeSpec.js} +8 -53
  151. package/dist/shared/summarize/world.d.ts +8 -0
  152. package/dist/shared/summarize/world.js +9 -0
  153. package/dist/{toolLoop.d.ts → shared/toolLoop.d.ts} +25 -3
  154. package/dist/{toolLoop.js → shared/toolLoop.js} +67 -14
  155. package/dist/{ui/sessions → shared/ui}/conversation/index.d.ts +1 -1
  156. package/dist/{ui/sessions → shared/ui}/conversation/index.js +1 -1
  157. package/dist/{ui/sessions → shared/ui}/coreWidgetsEntry.d.ts +1 -1
  158. package/dist/{ui/sessions → shared/ui}/coreWidgetsEntry.js +1 -1
  159. package/dist/{ui/sessions → shared/ui}/lore-entries/index.d.ts +1 -1
  160. package/dist/{ui/sessions → shared/ui}/scene-portraits/index.d.ts +1 -1
  161. package/dist/{ui/sessions → shared/ui}/scene-portraits/index.js +1 -1
  162. package/dist/{ui/sessions → shared/ui}/session-state/index.d.ts +1 -1
  163. package/dist/{ui/sessions → shared/ui}/session-state/index.js +1 -1
  164. package/package.json +28 -28
  165. package/dist/adventureActions.d.ts +0 -169
  166. package/dist/adventureActions.js +0 -599
  167. package/dist/createChat.d.ts +0 -7
  168. package/dist/generateImage.d.ts +0 -7
  169. package/dist/lairActions.d.ts +0 -296
  170. package/dist/lairActions.js +0 -1287
  171. package/dist/respond.d.ts +0 -24
  172. package/dist/sprites.d.ts +0 -24
  173. package/dist/sprites.js +0 -102
  174. package/dist/summarize.d.ts +0 -76
  175. /package/components/{sessions → genres/chat}/authors-note/authors-note.ts +0 -0
  176. /package/components/{sessions/shared → shared}/context.ts +0 -0
  177. /package/components/{sessions → shared}/lore-entries/lore-entries.ts +0 -0
  178. /package/components/{sessions → shared}/messages/MessageBlocksView.svelte +0 -0
  179. /package/components/{sessions → shared}/messages/MessageControls.svelte +0 -0
  180. /package/components/{sessions → shared}/messages/MessageMediaStrip.svelte +0 -0
  181. /package/components/{sessions → shared}/messages/MessagePartsView.svelte +0 -0
  182. /package/components/{sessions → shared}/messages/MessageStateLedger.svelte +0 -0
  183. /package/components/{sessions → shared}/messages/NextCharacterBlock.svelte +0 -0
  184. /package/components/{sessions → shared}/messages/SessionContainer.svelte +0 -0
  185. /package/components/{sessions → shared}/messages/StateProposalList.svelte +0 -0
  186. /package/components/{sessions → shared}/messages/mediaStrip.ts +0 -0
  187. /package/components/{sessions → shared}/messages/messages.ts +0 -0
  188. /package/components/{sessions → shared}/scene-portraits/StatBars.svelte +0 -0
  189. /package/components/{sessions → shared}/scene-portraits/scene-portraits.ts +0 -0
  190. /package/components/{sessions → shared}/state/SlotControl.svelte +0 -0
  191. /package/components/{sessions → shared}/state/entryFinder.ts +0 -0
  192. /package/components/{sessions → shared}/state/slotWriter.svelte.ts +0 -0
  193. /package/components/{sessions → shared}/stats/stats.ts +0 -0
  194. /package/components/{sessions/shared → shared}/widgetRef.svelte.ts +0 -0
  195. /package/components/{sessions → shared}/world-state/world-state.ts +0 -0
  196. /package/dist/{ui/sessions → genres/chat/ui}/authors-note/index.js +0 -0
  197. /package/dist/{entries.d.ts → registry/entries.d.ts} +0 -0
  198. /package/dist/{entries.js → registry/entries.js} +0 -0
  199. /package/dist/{genres.d.ts → registry/genres.d.ts} +0 -0
  200. /package/dist/{ui/sessions → registry}/layouts.d.ts +0 -0
  201. /package/dist/{ui/sessions → registry}/layouts.js +0 -0
  202. /package/dist/{slots.d.ts → registry/slots.d.ts} +0 -0
  203. /package/dist/{slots.js → registry/slots.js} +0 -0
  204. /package/dist/{statShapes.d.ts → registry/statShapes.d.ts} +0 -0
  205. /package/dist/{statShapes.js → registry/statShapes.js} +0 -0
  206. /package/dist/{ui/sessions → registry}/widgets.d.ts +0 -0
  207. /package/dist/{guideMascotImage.d.ts → seed/guideMascotImage.d.ts} +0 -0
  208. /package/dist/{guideMascotImage.js → seed/guideMascotImage.js} +0 -0
  209. /package/dist/{presets.d.ts → seed/presets.d.ts} +0 -0
  210. /package/dist/{prompts.d.ts → seed/prompts.d.ts} +0 -0
  211. /package/dist/{graphBuild.d.ts → shared/graphBuild.d.ts} +0 -0
  212. /package/dist/{graphBuild.js → shared/graphBuild.js} +0 -0
  213. /package/dist/{ui/sessions → shared/ui}/conversation/actionsDisclosure.d.ts +0 -0
  214. /package/dist/{ui/sessions → shared/ui}/conversation/actionsDisclosure.js +0 -0
  215. /package/dist/{ui/sessions → shared/ui}/conversation/composerTray.d.ts +0 -0
  216. /package/dist/{ui/sessions → shared/ui}/conversation/composerTray.js +0 -0
  217. /package/dist/{ui/sessions → shared/ui}/conversation/dossier.d.ts +0 -0
  218. /package/dist/{ui/sessions → shared/ui}/conversation/dossier.js +0 -0
  219. /package/dist/{ui/sessions → shared/ui}/conversation/formAnswer.d.ts +0 -0
  220. /package/dist/{ui/sessions → shared/ui}/conversation/formAnswer.js +0 -0
  221. /package/dist/{ui/sessions → shared/ui}/conversation/itemValues.d.ts +0 -0
  222. /package/dist/{ui/sessions → shared/ui}/conversation/itemValues.js +0 -0
  223. /package/dist/{ui/sessions → shared/ui}/conversation/messageOrder.d.ts +0 -0
  224. /package/dist/{ui/sessions → shared/ui}/conversation/messageOrder.js +0 -0
  225. /package/dist/{ui/sessions → shared/ui}/conversation/messageSpeaker.d.ts +0 -0
  226. /package/dist/{ui/sessions → shared/ui}/conversation/messageSpeaker.js +0 -0
  227. /package/dist/{ui/sessions → shared/ui}/conversation/messageVerbState.d.ts +0 -0
  228. /package/dist/{ui/sessions → shared/ui}/conversation/messageVerbState.js +0 -0
  229. /package/dist/{ui/sessions → shared/ui}/conversation/slashPalette.d.ts +0 -0
  230. /package/dist/{ui/sessions → shared/ui}/conversation/slashPalette.js +0 -0
  231. /package/dist/{ui/sessions → shared/ui}/conversation/text.d.ts +0 -0
  232. /package/dist/{ui/sessions → shared/ui}/conversation/text.js +0 -0
  233. /package/dist/{ui/sessions → shared/ui}/lore-entries/index.js +0 -0
  234. /package/dist/{ui/sessions → shared/ui}/scene-portraits/portraits.d.ts +0 -0
  235. /package/dist/{ui/sessions → shared/ui}/scene-portraits/portraits.js +0 -0
  236. /package/dist/{ui/sessions → shared/ui}/session-state/barMath.d.ts +0 -0
  237. /package/dist/{ui/sessions → shared/ui}/session-state/barMath.js +0 -0
  238. /package/dist/{ui/sessions → shared/ui}/session-state/shapes.d.ts +0 -0
  239. /package/dist/{ui/sessions → shared/ui}/session-state/shapes.js +0 -0
  240. /package/dist/{ui/sessions → shared/ui}/session-state/stateView.d.ts +0 -0
  241. /package/dist/{ui/sessions → shared/ui}/session-state/stateView.js +0 -0
  242. /package/dist/{ui/sessions → shared/ui}/widgetContext.d.ts +0 -0
  243. /package/dist/{ui/sessions → shared/ui}/widgetContext.js +0 -0
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * publishable package: SP core boot-seeds from it (the app's
6
6
  * `src/lib/server/pipelines/specs/*` are thin re-exports of this package),
7
7
  * conformance consumes it as fixtures, and modders import it for typed
8
- * references — `import { respond, chatGenre } from "@serene-pub/core-catalog"`.
8
+ * references — `import { chatGenre, chatTurnOrder } from "@serene-pub/core-catalog"`.
9
9
  *
10
10
  * Moving the documents here is what makes core the first consumer of the
11
11
  * announce path rather than a special case: one validator, one document
@@ -13,20 +13,38 @@
13
13
  * shipped prompts and the default preset ride the announcement too (T6b);
14
14
  * the shipped default configs stay derived (declarations + default author
15
15
  * preset + ref defaults) — there is no hand-authored config data to carry.
16
+ *
17
+ * ## Where things live
18
+ *
19
+ * - `genres/<genre>/` — every pipeline locked to that genre (create, reply,
20
+ * actions, answer form, turn order), one per file, and any widget only that
21
+ * genre offers (Chat's Author's note, under `genres/chat/ui/`).
22
+ * - `shared/` — what more than one genre uses: the built-in writes, sprites,
23
+ * the annex field write, summarize, the story-graph build, and the shared
24
+ * widgets' typed sections (`shared/ui/`). Also the tool-loop reference,
25
+ * exported as an example and test fixture but not in `CORE_SPECS`.
26
+ * - `factories/` — the builders a genre calls once per genre (answer form,
27
+ * turn order), core's genres and a plugin's alike.
28
+ * - `registry/` — the modules that register on import (genres, slots, stat
29
+ * shapes, entry types, core's widgets) and the layouts the genres name.
30
+ * - `seed/` — the shipped prompts, presets and the guide's mascot image.
31
+ *
32
+ * The widgets' Svelte sources mirror it under `../components/` (`genres/chat/`,
33
+ * `shared/`).
16
34
  */
17
35
  import { type AnnouncementDocument, type CoverageReport, type Extension, type I18n } from '@serene-pub/sdk';
18
- export * from './genres.js';
36
+ export * from './registry/genres.js';
19
37
  /**
20
38
  * The attribute slots core's genres bring.
21
39
  *
22
- * ⚠ A load-bearing re-export, on the same terms as `./entries.js` below:
40
+ * ⚠ A load-bearing re-export, on the same terms as `./registry/entries.js` below:
23
41
  * declaring a slot REGISTERS it, and nothing imports these by value. Without
24
42
  * the module being reached, the Adventure genre would name seven declarations
25
43
  * that this process has never heard of.
26
44
  */
27
45
  /** Core's catalogue of stat shapes — declared before the slots that name them. */
28
- export * from './statShapes.js';
29
- export * from './slots.js';
46
+ export * from './registry/statShapes.js';
47
+ export * from './registry/slots.js';
30
48
  /**
31
49
  * Core's entry types (Part 1). Declaring one **registers** it, which is the
32
50
  * fact-about-the-code route node types take — so this re-export is what puts
@@ -41,29 +59,23 @@ export * from './slots.js';
41
59
  * coreCatalogSideEffects.test.ts` fails when a registering module is missing
42
60
  * from the list.
43
61
  */
44
- export * from './entries.js';
45
- export * from './prompts.js';
46
- export * from './presets.js';
47
- export * from './createChat.js';
48
- export * from './guide.js';
49
- export * from './adventure.js';
50
- export * from './adventureActions.js';
51
- export * from './lair.js';
52
- export * from './lairActions.js';
53
- export * from './answerForm.js';
54
- export * from './respond.js';
55
- export * from './turnOrder.js';
56
- export * from './narrate.js';
57
- export * from './narrateCharacter.js';
58
- export * from './annexField.js';
59
- export * from './builtins.js';
60
- export * from './sprites.js';
61
- export * from './toolLoop.js';
62
- export * from './generateImage.js';
63
- export * from './graphBuild.js';
64
- export * from './summarize.js';
65
- export * from './ui/sessions/widgets.js';
66
- export * from './ui/sessions/layouts.js';
62
+ export * from './registry/entries.js';
63
+ export * from './seed/prompts.js';
64
+ export * from './seed/presets.js';
65
+ /** Every genre's pipelines, a folder each, and the lists that span them. */
66
+ export * from './genres/index.js';
67
+ /** The builders a genre calls once per genre — core's and a plugin genre's alike. */
68
+ export * from './factories/answerForm.js';
69
+ export * from './factories/turnOrder.js';
70
+ /** What more than one genre runs. */
71
+ export * from './shared/annexField.js';
72
+ export * from './shared/builtins/index.js';
73
+ export * from './shared/sprites.js';
74
+ export * from './shared/toolLoop.js';
75
+ export * from './shared/graphBuild.js';
76
+ export * from './shared/summarize/index.js';
77
+ export * from './registry/widgets.js';
78
+ export * from './registry/layouts.js';
67
79
  /** @experimental */
68
80
  export interface CoreSpec {
69
81
  slug: string;
@@ -80,8 +92,14 @@ export interface CoreSpec {
80
92
  /**
81
93
  * The pipelines core ships — one registry rather than a list of builders
82
94
  * beside a map of display names (two collections that had to agree). `name`
83
- * is what a person calls the thing; a list showing `core:spec/respond` is a
95
+ * is what a person calls the thing; a list showing `core:spec/chat-respond` is a
84
96
  * list of identifiers, not of things.
97
+ *
98
+ * A name says what the pipeline does and never which genre it serves (ruled
99
+ * 2026-10-05): every list of several genres' pipelines shows the genre beside
100
+ * it, so the four create pipelines are each "Create session" and the four
101
+ * replies each "Reply". The slug is genre first, `core:spec/<genre>-<what>`;
102
+ * one that serves every genre is `core:spec/<what>`.
85
103
  * @experimental
86
104
  */
87
105
  export declare const CORE_SPECS: CoreSpec[];
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * publishable package: SP core boot-seeds from it (the app's
6
6
  * `src/lib/server/pipelines/specs/*` are thin re-exports of this package),
7
7
  * conformance consumes it as fixtures, and modders import it for typed
8
- * references — `import { respond, chatGenre } from "@serene-pub/core-catalog"`.
8
+ * references — `import { chatGenre, chatTurnOrder } from "@serene-pub/core-catalog"`.
9
9
  *
10
10
  * Moving the documents here is what makes core the first consumer of the
11
11
  * announce path rather than a special case: one validator, one document
@@ -13,42 +13,82 @@
13
13
  * shipped prompts and the default preset ride the announcement too (T6b);
14
14
  * the shipped default configs stay derived (declarations + default author
15
15
  * preset + ref defaults) — there is no hand-authored config data to carry.
16
+ *
17
+ * ## Where things live
18
+ *
19
+ * - `genres/<genre>/` — every pipeline locked to that genre (create, reply,
20
+ * actions, answer form, turn order), one per file, and any widget only that
21
+ * genre offers (Chat's Author's note, under `genres/chat/ui/`).
22
+ * - `shared/` — what more than one genre uses: the built-in writes, sprites,
23
+ * the annex field write, summarize, the story-graph build, and the shared
24
+ * widgets' typed sections (`shared/ui/`). Also the tool-loop reference,
25
+ * exported as an example and test fixture but not in `CORE_SPECS`.
26
+ * - `factories/` — the builders a genre calls once per genre (answer form,
27
+ * turn order), core's genres and a plugin's alike.
28
+ * - `registry/` — the modules that register on import (genres, slots, stat
29
+ * shapes, entry types, core's widgets) and the layouts the genres name.
30
+ * - `seed/` — the shipped prompts, presets and the guide's mascot image.
31
+ *
32
+ * The widgets' Svelte sources mirror it under `../components/` (`genres/chat/`,
33
+ * `shared/`).
16
34
  */
17
35
  import { announcementOf, defineExtension, } from '@serene-pub/sdk';
18
- import { CORE_PROMPTS } from './prompts.js';
19
- import { corePresetInputs } from './presets.js';
20
- import { adventureGenre, chatGenre, guideGenre } from './genres.js';
21
- import { lairGenre } from './genres.js';
22
- import { CREATE_CHAT_SPEC_ID, createChatSpec } from './createChat.js';
23
- import { CREATE_GUIDE_SPEC_ID, createGuideSpec, GUIDE_RESPOND_SPEC_ID, guideRespondSpec, } from './guide.js';
24
- import { ADVENTURE_CREATE_SPEC_ID, ADVENTURE_RESPOND_SPEC_ID, adventureCreateSpec, adventureRespondSpec, } from './adventure.js';
25
- import { ADVENTURE_ADVANCE_TIME_SPEC_ID, ADVENTURE_ANSWER_SPEC_ID, ADVENTURE_ASK_SPEC_ID, ADVENTURE_LOOK_SPEC_ID, ADVENTURE_REST_SPEC_ID, adventureAdvanceTimeSpec, adventureAnswerSpec, adventureAskSpec, adventureLookSpec, adventureRestSpec, } from './adventureActions.js';
26
- import { ANSWER_FORM_ADVENTURE_SPEC_ID, ANSWER_FORM_CHAT_SPEC_ID, ANSWER_FORM_GUIDE_SPEC_ID, ANSWER_FORM_LAIR_SPEC_ID, answerFormAdventureSpec, answerFormChatSpec, answerFormGuideSpec, answerFormLairSpec, } from './answerForm.js';
27
- import { LAIR_CREATE_SPEC_ID, LAIR_RESPOND_SPEC_ID, lairCreateSpec, lairRespondSpec, } from './lair.js';
28
- import { LAIR_BUILD_ROOM_SPEC_ID, LAIR_FILE_ROOM_SPEC_ID, LAIR_NUDGE_SPEC_ID, LAIR_REVEAL_SPEC_ID, LAIR_ROOM_ANSWER_SPEC_ID, LAIR_TRAP_SPEC_ID, LAIR_WHISPER_SPEC_ID, lairBuildRoomSpec, lairFileRoomSpec, lairNudgeSpec, lairRevealSpec, lairRoomAnswerSpec, lairTrapSpec, lairWhisperSpec, } from './lairActions.js';
29
- import { RESPOND_SPEC_ID, respondSpec } from './respond.js';
30
- import { TURN_ORDER_BY_GENRE } from './turnOrder.js';
31
- import { NARRATE_SPEC_ID, narrateSpec } from './narrate.js';
32
- import { NARRATE_CHARACTER_SPEC_ID, narrateCharacterSpec } from './narrateCharacter.js';
33
- import { CORE_ANNEX_FIELDS, SET_ANNEX_FIELD_SPEC_ID, setAnnexFieldSpec } from './annexField.js';
34
- import { BUILTIN_BRANCH_SPEC_ID, BUILTIN_DELETE_SPEC_ID, BUILTIN_EDIT_SPEC_ID, BUILTIN_HIDE_SPEC_ID, BUILTIN_SWIPE_SPEC_ID, builtinBranchSpec, builtinDeleteSpec, builtinEditSpec, builtinHideSpec, builtinSwipeSpec, } from './builtins.js';
35
- import { TOOL_LOOP_SPEC_ID, toolLoopSpec } from './toolLoop.js';
36
- import { SHOW_SPRITE_SPEC_ID, showSpriteSpec } from './sprites.js';
37
- import { GENERATE_IMAGE_SPEC_ID, generateImageSpec } from './generateImage.js';
38
- import { GRAPH_BUILD_SPEC_ID, graphBuildSpec } from './graphBuild.js';
39
- import { SUMMARIZE_CHARACTER_SPEC_ID, SUMMARIZE_HISTORY_SPEC_ID, SUMMARIZE_SCENE_SPEC_ID, SUMMARIZE_WORLD_SPEC_ID, summarizeCharacterSpec, summarizeHistorySpec, summarizeSceneSpec, summarizeWorldSpec, } from './summarize.js';
40
- export * from './genres.js';
36
+ import { CORE_PROMPTS } from './seed/prompts.js';
37
+ import { corePresetInputs } from './seed/presets.js';
38
+ import { adventureGenre, chatGenre, guideGenre } from './registry/genres.js';
39
+ import { lairGenre } from './registry/genres.js';
40
+ import { CHAT_CREATE_SPEC_ID, createChatSpec } from './genres/chat/create.js';
41
+ import { GUIDE_CREATE_SPEC_ID, createGuideSpec } from './genres/guide/create.js';
42
+ import { GUIDE_RESPOND_SPEC_ID, guideRespondSpec } from './genres/guide/respond.js';
43
+ import { ADVENTURE_CREATE_SPEC_ID, adventureCreateSpec } from './genres/adventure/create.js';
44
+ import { ADVENTURE_RESPOND_SPEC_ID, adventureRespondSpec } from './genres/adventure/respond.js';
45
+ import { ADVENTURE_LOOK_SPEC_ID, adventureLookSpec } from './genres/adventure/look.js';
46
+ import { ADVENTURE_REST_SPEC_ID, adventureRestSpec } from './genres/adventure/rest.js';
47
+ import { ADVENTURE_ADVANCE_TIME_SPEC_ID, adventureAdvanceTimeSpec } from './genres/adventure/advanceTime.js';
48
+ import { ADVENTURE_ASK_SPEC_ID, adventureAskSpec } from './genres/adventure/ask.js';
49
+ import { ADVENTURE_ANSWER_SPEC_ID, adventureAnswerSpec } from './genres/adventure/answer.js';
50
+ import { CHAT_ANSWER_FORM_SPEC_ID, answerFormChatSpec } from './genres/chat/answerForm.js';
51
+ import { ADVENTURE_ANSWER_FORM_SPEC_ID, answerFormAdventureSpec } from './genres/adventure/answerForm.js';
52
+ import { GUIDE_ANSWER_FORM_SPEC_ID, answerFormGuideSpec } from './genres/guide/answerForm.js';
53
+ import { LAIR_ANSWER_FORM_SPEC_ID, answerFormLairSpec } from './genres/lair/answerForm.js';
54
+ import { LAIR_CREATE_SPEC_ID, lairCreateSpec } from './genres/lair/create.js';
55
+ import { LAIR_RESPOND_SPEC_ID, lairRespondSpec } from './genres/lair/respond.js';
56
+ import { LAIR_BUILD_ROOM_SPEC_ID, lairBuildRoomSpec } from './genres/lair/buildRoom.js';
57
+ import { LAIR_ROOM_ANSWER_SPEC_ID, lairRoomAnswerSpec } from './genres/lair/roomAnswer.js';
58
+ import { LAIR_FILE_ROOM_SPEC_ID, lairFileRoomSpec } from './genres/lair/fileRoom.js';
59
+ import { LAIR_NUDGE_SPEC_ID, lairNudgeSpec } from './genres/lair/nudge.js';
60
+ import { LAIR_WHISPER_SPEC_ID, lairWhisperSpec } from './genres/lair/whisper.js';
61
+ import { LAIR_TRAP_SPEC_ID, lairTrapSpec } from './genres/lair/trap.js';
62
+ import { LAIR_REVEAL_SPEC_ID, lairRevealSpec } from './genres/lair/reveal.js';
63
+ import { CHAT_RESPOND_SPEC_ID, respondSpec } from './genres/chat/respond.js';
64
+ import { TURN_ORDER_BY_GENRE } from './genres/index.js';
65
+ import { CHAT_NARRATE_SPEC_ID, narrateSpec } from './genres/chat/narrate.js';
66
+ import { CHAT_SIDE_CHARACTER_SPEC_ID, narrateCharacterSpec } from './genres/chat/narrateCharacter.js';
67
+ import { CORE_ANNEX_FIELDS, SET_ANNEX_FIELD_SPEC_ID, setAnnexFieldSpec } from './shared/annexField.js';
68
+ import { BUILTIN_DELETE_SPEC_ID, builtinDeleteSpec } from './shared/builtins/delete.js';
69
+ import { BUILTIN_HIDE_SPEC_ID, builtinHideSpec } from './shared/builtins/hide.js';
70
+ import { BUILTIN_EDIT_SPEC_ID, builtinEditSpec } from './shared/builtins/edit.js';
71
+ import { BUILTIN_SWIPE_SPEC_ID, builtinSwipeSpec } from './shared/builtins/swipe.js';
72
+ import { BUILTIN_BRANCH_SPEC_ID, builtinBranchSpec } from './shared/builtins/branch.js';
73
+ import { SHOW_SPRITE_SPEC_ID, showSpriteSpec } from './shared/sprites.js';
74
+ import { CHAT_GENERATE_IMAGE_SPEC_ID, generateImageSpec } from './genres/chat/generateImage.js';
75
+ import { GRAPH_BUILD_SPEC_ID, graphBuildSpec } from './shared/graphBuild.js';
76
+ import { SUMMARIZE_WORLD_SPEC_ID, summarizeWorldSpec } from './shared/summarize/world.js';
77
+ import { SUMMARIZE_CHARACTER_SPEC_ID, summarizeCharacterSpec } from './shared/summarize/character.js';
78
+ import { SUMMARIZE_SCENE_SPEC_ID, summarizeSceneSpec } from './shared/summarize/scene.js';
79
+ import { SUMMARIZE_HISTORY_SPEC_ID, summarizeHistorySpec } from './shared/summarize/history.js';
80
+ export * from './registry/genres.js';
41
81
  /**
42
82
  * The attribute slots core's genres bring.
43
83
  *
44
- * ⚠ A load-bearing re-export, on the same terms as `./entries.js` below:
84
+ * ⚠ A load-bearing re-export, on the same terms as `./registry/entries.js` below:
45
85
  * declaring a slot REGISTERS it, and nothing imports these by value. Without
46
86
  * the module being reached, the Adventure genre would name seven declarations
47
87
  * that this process has never heard of.
48
88
  */
49
89
  /** Core's catalogue of stat shapes — declared before the slots that name them. */
50
- export * from './statShapes.js';
51
- export * from './slots.js';
90
+ export * from './registry/statShapes.js';
91
+ export * from './registry/slots.js';
52
92
  /**
53
93
  * Core's entry types (Part 1). Declaring one **registers** it, which is the
54
94
  * fact-about-the-code route node types take — so this re-export is what puts
@@ -63,52 +103,52 @@ export * from './slots.js';
63
103
  * coreCatalogSideEffects.test.ts` fails when a registering module is missing
64
104
  * from the list.
65
105
  */
66
- export * from './entries.js';
67
- export * from './prompts.js';
68
- export * from './presets.js';
69
- export * from './createChat.js';
70
- export * from './guide.js';
71
- export * from './adventure.js';
72
- export * from './adventureActions.js';
73
- export * from './lair.js';
74
- export * from './lairActions.js';
75
- export * from './answerForm.js';
76
- export * from './respond.js';
77
- export * from './turnOrder.js';
78
- export * from './narrate.js';
79
- export * from './narrateCharacter.js';
80
- export * from './annexField.js';
81
- export * from './builtins.js';
82
- export * from './sprites.js';
83
- export * from './toolLoop.js';
84
- export * from './generateImage.js';
85
- export * from './graphBuild.js';
86
- export * from './summarize.js';
87
- export * from './ui/sessions/widgets.js';
88
- export * from './ui/sessions/layouts.js';
106
+ export * from './registry/entries.js';
107
+ export * from './seed/prompts.js';
108
+ export * from './seed/presets.js';
109
+ /** Every genre's pipelines, a folder each, and the lists that span them. */
110
+ export * from './genres/index.js';
111
+ /** The builders a genre calls once per genre — core's and a plugin genre's alike. */
112
+ export * from './factories/answerForm.js';
113
+ export * from './factories/turnOrder.js';
114
+ /** What more than one genre runs. */
115
+ export * from './shared/annexField.js';
116
+ export * from './shared/builtins/index.js';
117
+ export * from './shared/sprites.js';
118
+ export * from './shared/toolLoop.js';
119
+ export * from './shared/graphBuild.js';
120
+ export * from './shared/summarize/index.js';
121
+ export * from './registry/widgets.js';
122
+ export * from './registry/layouts.js';
89
123
  /**
90
124
  * The pipelines core ships — one registry rather than a list of builders
91
125
  * beside a map of display names (two collections that had to agree). `name`
92
- * is what a person calls the thing; a list showing `core:spec/respond` is a
126
+ * is what a person calls the thing; a list showing `core:spec/chat-respond` is a
93
127
  * list of identifiers, not of things.
128
+ *
129
+ * A name says what the pipeline does and never which genre it serves (ruled
130
+ * 2026-10-05): every list of several genres' pipelines shows the genre beside
131
+ * it, so the four create pipelines are each "Create session" and the four
132
+ * replies each "Reply". The slug is genre first, `core:spec/<genre>-<what>`;
133
+ * one that serves every genre is `core:spec/<what>`.
94
134
  * @experimental
95
135
  */
96
136
  export const CORE_SPECS = [
97
137
  // First, deliberately: the genre's create pipeline must exist before
98
138
  // anything that declares itself for the genre (24 §3).
99
- { slug: CREATE_CHAT_SPEC_ID, name: 'Create chat', build: createChatSpec },
139
+ { slug: CHAT_CREATE_SPEC_ID, name: 'Create session', build: createChatSpec },
100
140
  /**
101
141
  * The Adventure genre, in the same order and for the same reason: its
102
142
  * create pipeline exists before anything that declares itself for it.
103
143
  */
104
144
  {
105
145
  slug: ADVENTURE_CREATE_SPEC_ID,
106
- name: 'Create adventure',
146
+ name: 'Create session',
107
147
  build: adventureCreateSpec,
108
148
  },
109
149
  {
110
150
  slug: ADVENTURE_RESPOND_SPEC_ID,
111
- name: 'Adventure turn',
151
+ name: 'Reply',
112
152
  build: adventureRespondSpec,
113
153
  },
114
154
  { slug: ADVENTURE_LOOK_SPEC_ID, name: 'Look', build: adventureLookSpec },
@@ -127,10 +167,10 @@ export const CORE_SPECS = [
127
167
  * so nothing that declares itself for the genre can be published before the
128
168
  * genre exists.
129
169
  */
130
- { slug: LAIR_CREATE_SPEC_ID, name: 'Create lair', build: lairCreateSpec },
131
- { slug: LAIR_RESPOND_SPEC_ID, name: 'Lair turn', build: lairRespondSpec },
170
+ { slug: LAIR_CREATE_SPEC_ID, name: 'Create session', build: lairCreateSpec },
171
+ { slug: LAIR_RESPOND_SPEC_ID, name: 'Reply', build: lairRespondSpec },
132
172
  { slug: LAIR_BUILD_ROOM_SPEC_ID, name: 'Build room', build: lairBuildRoomSpec },
133
- /** What the knock's options fire — in no listing; see `lairActions.ts`. */
173
+ /** What the knock's options fire — in no listing; see `genres/lair/roomAnswer.ts`. */
134
174
  { slug: LAIR_ROOM_ANSWER_SPEC_ID, name: 'Answer the door', build: lairRoomAnswerSpec },
135
175
  /** A room described in a message, filed through review (R11) — on a message's ⋮. */
136
176
  { slug: LAIR_FILE_ROOM_SPEC_ID, name: 'File as a room', build: lairFileRoomSpec },
@@ -142,29 +182,29 @@ export const CORE_SPECS = [
142
182
  * The guide genre (R-18, U5g): create first, for the reason above; its
143
183
  * reply answers as the genre's envoy.
144
184
  */
145
- { slug: CREATE_GUIDE_SPEC_ID, name: 'Create guide session', build: createGuideSpec },
146
- { slug: GUIDE_RESPOND_SPEC_ID, name: 'Guide reply', build: guideRespondSpec },
147
- { slug: RESPOND_SPEC_ID, name: 'Session reply', build: respondSpec },
185
+ { slug: GUIDE_CREATE_SPEC_ID, name: 'Create session', build: createGuideSpec },
186
+ { slug: GUIDE_RESPOND_SPEC_ID, name: 'Reply', build: guideRespondSpec },
187
+ { slug: CHAT_RESPOND_SPEC_ID, name: 'Reply', build: respondSpec },
148
188
  /**
149
189
  * The answer pipelines (R-15 *Forms*; U5d): one graph, published once
150
190
  * per shipped genre because a preset binds a spec locked to its genre.
151
191
  * After every genre's create spec, for the reason those come first.
152
192
  */
153
- { slug: ANSWER_FORM_CHAT_SPEC_ID, name: 'Answer a form (chat)', build: answerFormChatSpec },
193
+ { slug: CHAT_ANSWER_FORM_SPEC_ID, name: 'Answer a form', build: answerFormChatSpec },
154
194
  {
155
- slug: ANSWER_FORM_ADVENTURE_SPEC_ID,
156
- name: 'Answer a form (adventure)',
195
+ slug: ADVENTURE_ANSWER_FORM_SPEC_ID,
196
+ name: 'Answer a form',
157
197
  build: answerFormAdventureSpec,
158
198
  },
159
- { slug: ANSWER_FORM_GUIDE_SPEC_ID, name: 'Answer a form (guide)', build: answerFormGuideSpec },
160
- { slug: ANSWER_FORM_LAIR_SPEC_ID, name: 'Answer a form (lair)', build: answerFormLairSpec },
161
- { slug: NARRATE_SPEC_ID, name: 'World narration', build: narrateSpec },
199
+ { slug: GUIDE_ANSWER_FORM_SPEC_ID, name: 'Answer a form', build: answerFormGuideSpec },
200
+ { slug: LAIR_ANSWER_FORM_SPEC_ID, name: 'Answer a form', build: answerFormLairSpec },
201
+ { slug: CHAT_NARRATE_SPEC_ID, name: 'Narrate', build: narrateSpec },
162
202
  // The other half of the narrator split (ruling 2026-09-07). A NEW spec,
163
203
  // not a bump: the 0.6 freeze forbids moving an existing semver and says
164
204
  // nothing about publishing a new slug.
165
205
  {
166
- slug: NARRATE_CHARACTER_SPEC_ID,
167
- name: 'Side character narration',
206
+ slug: CHAT_SIDE_CHARACTER_SPEC_ID,
207
+ name: 'Side character',
168
208
  build: narrateCharacterSpec,
169
209
  },
170
210
  /** Every annex field's write (2026-09-26) — contributes no action; the host's door runs it. */
@@ -185,45 +225,34 @@ export const CORE_SPECS = [
185
225
  * same way: one receipted action per press, emitting `sprite-shown`.
186
226
  */
187
227
  { slug: SHOW_SPRITE_SPEC_ID, name: 'Change sprite', build: showSpriteSpec },
188
- /**
189
- * The tool-loop reference (20 §9). Published like the others so the
190
- * integration suite runs it against a seeded database — an example nobody
191
- * runs is an example that is already wrong — and bound to no genre, so it
192
- * is never offered in a person's composer.
193
- */
194
- {
195
- slug: TOOL_LOOP_SPEC_ID,
196
- name: 'Tool loop (reference)',
197
- build: toolLoopSpec,
198
- },
199
228
  {
200
- slug: GENERATE_IMAGE_SPEC_ID,
229
+ slug: CHAT_GENERATE_IMAGE_SPEC_ID,
201
230
  name: 'Generate image',
202
231
  build: generateImageSpec,
203
232
  },
204
233
  {
205
234
  slug: SUMMARIZE_WORLD_SPEC_ID,
206
- name: 'Summarize: world lore',
235
+ name: 'Summarize world lore',
207
236
  build: summarizeWorldSpec,
208
237
  },
209
238
  {
210
239
  slug: SUMMARIZE_CHARACTER_SPEC_ID,
211
- name: 'Summarize: character lore',
240
+ name: 'Summarize character lore',
212
241
  build: summarizeCharacterSpec,
213
242
  },
214
243
  {
215
244
  slug: SUMMARIZE_SCENE_SPEC_ID,
216
- name: 'Summarize: scene',
245
+ name: 'Summarize scene',
217
246
  build: summarizeSceneSpec,
218
247
  },
219
248
  {
220
249
  slug: SUMMARIZE_HISTORY_SPEC_ID,
221
- name: 'Summarize: history entry',
250
+ name: 'Summarize history entry',
222
251
  build: summarizeHistorySpec,
223
252
  },
224
253
  {
225
254
  slug: GRAPH_BUILD_SPEC_ID,
226
- name: 'Narrative graph build',
255
+ name: 'Build the story graph',
227
256
  build: graphBuildSpec,
228
257
  },
229
258
  /**
@@ -234,9 +263,9 @@ export const CORE_SPECS = [
234
263
  * what they wrote. Last, because each one's lock names its genre and a
235
264
  * spec cannot be published before its genre's create pipeline (24 §3).
236
265
  */
237
- ...TURN_ORDER_BY_GENRE.map(({ spec, genre, build }) => ({
266
+ ...TURN_ORDER_BY_GENRE.map(({ spec, build }) => ({
238
267
  slug: spec,
239
- name: `Turn order (${typeof genre.name === 'string' ? genre.name : genre.name.en})`,
268
+ name: 'Turn order',
240
269
  build,
241
270
  })),
242
271
  ];
@@ -284,7 +313,7 @@ export const coreExtension = () => defineExtension({
284
313
  nodeType: p.nodeType,
285
314
  slot: p.slot,
286
315
  // The announcement-level identity is the bare slug; the seed
287
- // pass's idempotence key wraps it (see prompts.ts). Unique
316
+ // pass's idempotence key wraps it (see seed/prompts.ts). Unique
288
317
  // within a pool, not globally — `summarize-scene-default`
289
318
  // names a row in three of them.
290
319
  slug: p.seedKey.split(':').at(-1),
@@ -8,11 +8,11 @@
8
8
  * the in-repo half of that package.
9
9
  */
10
10
  import { genre, layout, sessionEvents } from "@serene-pub/sdk";
11
- import { ADVENTURE_LAYOUT, CHAT_LAYOUT, LAIR_LAYOUT } from "./ui/sessions/layouts.js";
11
+ import { ADVENTURE_LAYOUT, CHAT_LAYOUT, LAIR_LAYOUT } from "./layouts.js";
12
12
  import { ADVENTURE_SHEET, ADVENTURE_SLOTS } from "./slots.js";
13
13
  import { LAIR_SHEET, LAIR_SLOTS } from "./slots.js";
14
- import { GUIDE_MASCOT_IMAGE } from "./guideMascotImage.js";
15
- import { coreWidgets } from "./ui/sessions/widgets.js";
14
+ import { GUIDE_MASCOT_IMAGE } from "../seed/guideMascotImage.js";
15
+ import { coreWidgets } from "./widgets.js";
16
16
  /**
17
17
  * Auto-advance (PLAN-turn-order §4.6, R16): whether the head turn fires by
18
18
  * itself after a send, and how far.
@@ -198,7 +198,7 @@ export const chatGenre = genre(CHAT_GENRE_ID, {
198
198
  greeting: { enabled: true, channel: "main" },
199
199
  // No `turnOrder` here (retired 2026-09-23, R28): the Turn order
200
200
  // control is `core:spec/chat-turn-order`'s `strategy` node and the
201
- // swaps it declares (turnOrder.ts), like any other swappable node.
201
+ // swaps it declares (genres/chat/turnOrder.ts), like any other swappable node.
202
202
  /** The session settings form's own sections (§4.11): declared, never automatic. */
203
203
  scenario: true,
204
204
  tags: true,
@@ -530,30 +530,30 @@ export const coreWidgets = {
530
530
  * @experimental
531
531
  */
532
532
  export const CORE_COMPONENTS = [
533
- component({ slug: 'messages', label: 'Messages', entry: 'components/sessions/messages/messages.ts', framework: 'svelte' }),
533
+ component({ slug: 'messages', label: 'Messages', entry: 'components/shared/messages/messages.ts', framework: 'svelte' }),
534
534
  component({
535
535
  slug: 'world-state',
536
536
  label: 'World State',
537
- entry: 'components/sessions/world-state/world-state.ts',
537
+ entry: 'components/shared/world-state/world-state.ts',
538
538
  framework: 'svelte',
539
539
  }),
540
- component({ slug: 'stats', label: 'Stats', entry: 'components/sessions/stats/stats.ts', framework: 'svelte' }),
540
+ component({ slug: 'stats', label: 'Stats', entry: 'components/shared/stats/stats.ts', framework: 'svelte' }),
541
541
  component({
542
542
  slug: 'lore-entries',
543
543
  label: 'Lore entries',
544
- entry: 'components/sessions/lore-entries/lore-entries.ts',
544
+ entry: 'components/shared/lore-entries/lore-entries.ts',
545
545
  framework: 'svelte',
546
546
  }),
547
547
  component({
548
548
  slug: 'scene-portraits',
549
549
  label: 'Scene Portraits',
550
- entry: 'components/sessions/scene-portraits/scene-portraits.ts',
550
+ entry: 'components/shared/scene-portraits/scene-portraits.ts',
551
551
  framework: 'svelte',
552
552
  }),
553
553
  component({
554
554
  slug: 'authors-note',
555
555
  label: "Author's note",
556
- entry: 'components/sessions/authors-note/authors-note.ts',
556
+ entry: 'components/genres/chat/authors-note/authors-note.ts',
557
557
  framework: 'svelte',
558
558
  }),
559
559
  ];
@@ -8,19 +8,34 @@
8
8
  * cannot disagree.
9
9
  */
10
10
  import { i18nText, preset } from "@serene-pub/sdk";
11
- import { adventureGenre, chatGenre, guideGenre } from "./genres.js";
12
- import { lairGenre } from "./genres.js";
13
- import { createChatSpec } from "./createChat.js";
14
- import { createGuideSpec, guideRespondSpec } from "./guide.js";
15
- import { respondSpec } from "./respond.js";
16
- import { narrateSpec } from "./narrate.js";
17
- import { adventureCreateSpec, adventureRespondSpec } from "./adventure.js";
18
- import { adventureAdvanceTimeSpec, adventureAnswerSpec, adventureAskSpec, adventureLookSpec, adventureRestSpec } from "./adventureActions.js";
19
- import { answerFormAdventureSpec, answerFormChatSpec, answerFormGuideSpec } from "./answerForm.js";
20
- import { answerFormLairSpec } from "./answerForm.js";
21
- import { lairCreateSpec, lairRespondSpec } from "./lair.js";
22
- import { lairBuildRoomSpec, lairFileRoomSpec, lairNudgeSpec, lairRevealSpec, lairRoomAnswerSpec, lairTrapSpec, lairWhisperSpec } from "./lairActions.js";
23
- import { TURN_ORDER_BY_GENRE } from "./turnOrder.js";
11
+ import { adventureGenre, chatGenre, guideGenre } from "../registry/genres.js";
12
+ import { lairGenre } from "../registry/genres.js";
13
+ import { createChatSpec } from "../genres/chat/create.js";
14
+ import { createGuideSpec } from "../genres/guide/create.js";
15
+ import { guideRespondSpec } from "../genres/guide/respond.js";
16
+ import { respondSpec } from "../genres/chat/respond.js";
17
+ import { narrateSpec } from "../genres/chat/narrate.js";
18
+ import { adventureCreateSpec } from "../genres/adventure/create.js";
19
+ import { adventureRespondSpec } from "../genres/adventure/respond.js";
20
+ import { adventureAdvanceTimeSpec } from "../genres/adventure/advanceTime.js";
21
+ import { adventureAnswerSpec } from "../genres/adventure/answer.js";
22
+ import { adventureAskSpec } from "../genres/adventure/ask.js";
23
+ import { adventureLookSpec } from "../genres/adventure/look.js";
24
+ import { adventureRestSpec } from "../genres/adventure/rest.js";
25
+ import { answerFormAdventureSpec } from "../genres/adventure/answerForm.js";
26
+ import { answerFormChatSpec } from "../genres/chat/answerForm.js";
27
+ import { answerFormGuideSpec } from "../genres/guide/answerForm.js";
28
+ import { answerFormLairSpec } from "../genres/lair/answerForm.js";
29
+ import { lairCreateSpec } from "../genres/lair/create.js";
30
+ import { lairRespondSpec } from "../genres/lair/respond.js";
31
+ import { lairBuildRoomSpec } from "../genres/lair/buildRoom.js";
32
+ import { lairFileRoomSpec } from "../genres/lair/fileRoom.js";
33
+ import { lairNudgeSpec } from "../genres/lair/nudge.js";
34
+ import { lairRevealSpec } from "../genres/lair/reveal.js";
35
+ import { lairRoomAnswerSpec } from "../genres/lair/roomAnswer.js";
36
+ import { lairTrapSpec } from "../genres/lair/trap.js";
37
+ import { lairWhisperSpec } from "../genres/lair/whisper.js";
38
+ import { TURN_ORDER_BY_GENRE } from "../genres/index.js";
24
39
  /** A genre's turn-order spec, as a value (R27, R48). */
25
40
  const turnOrderFor = (genre) => TURN_ORDER_BY_GENRE.find((t) => t.genre === genre).build();
26
41
  /*