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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (360) 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/world-state/WorldState.svelte → shared/actions/Actions.svelte} +5 -5
  5. package/components/shared/actions/ActionsWidget.svelte +118 -0
  6. package/components/shared/actions/actions.ts +11 -0
  7. package/components/shared/album/Album.svelte +24 -0
  8. package/components/shared/album/AlbumWidget.svelte +163 -0
  9. package/components/shared/album/album.ts +10 -0
  10. package/components/shared/annex/Annex.svelte +24 -0
  11. package/components/shared/annex/AnnexWidget.svelte +151 -0
  12. package/components/shared/annex/annex.ts +10 -0
  13. package/components/shared/attendance/Attendance.svelte +24 -0
  14. package/components/shared/attendance/AttendanceWidget.svelte +136 -0
  15. package/components/shared/attendance/attendance.ts +12 -0
  16. package/components/shared/backdrop/Backdrop.svelte +24 -0
  17. package/components/shared/backdrop/BackdropWidget.svelte +345 -0
  18. package/components/shared/backdrop/backdrop.ts +10 -0
  19. package/components/shared/chronicle/Chronicle.svelte +36 -0
  20. package/components/shared/chronicle/ChronicleWidget.svelte +569 -0
  21. package/components/shared/chronicle/chronicle.ts +11 -0
  22. package/components/{sessions → shared}/lore-entries/LoreEntries.svelte +1 -1
  23. package/components/{sessions → shared}/lore-entries/LoreEntriesWidget.svelte +3 -3
  24. package/components/shared/map-canvas/MapCanvas.svelte +171 -0
  25. package/components/shared/map-canvas/index.ts +390 -0
  26. package/components/{sessions → shared}/messages/MessageComposer.svelte +1 -1
  27. package/components/{sessions → shared}/messages/MessageControls.svelte +42 -0
  28. package/components/{sessions → shared}/messages/MessageStateLedger.svelte +19 -8
  29. package/components/{sessions → shared}/messages/Messages.svelte +1 -1
  30. package/components/{sessions → shared}/messages/MessagesWidget.svelte +126 -40
  31. package/components/{sessions → shared}/messages/NextCharacterBlock.svelte +17 -14
  32. package/components/shared/messages/SceneCueChip.svelte +82 -0
  33. package/components/shared/messages/SceneDivider.svelte +399 -0
  34. package/components/{sessions → shared}/messages/SessionComposer.svelte +33 -9
  35. package/components/shared/messages/SessionContainer.svelte +651 -0
  36. package/components/{sessions → shared}/messages/SessionMessage.svelte +52 -7
  37. package/components/shared/messages/TurnLine.svelte +254 -0
  38. package/components/{sessions → shared}/messages/conversation.svelte.ts +191 -2
  39. package/components/shared/messages/sceneMarks.ts +397 -0
  40. package/components/shared/places/Places.svelte +24 -0
  41. package/components/shared/places/PlacesWidget.svelte +290 -0
  42. package/components/shared/places/places.ts +11 -0
  43. package/components/{sessions → shared}/scene-portraits/ScenePortraits.svelte +1 -1
  44. package/components/shared/scene-portraits/ScenePortraitsWidget.svelte +404 -0
  45. package/components/{sessions → shared}/state/SlotControl.svelte +9 -1
  46. package/components/{sessions → shared}/stats/Stats.svelte +1 -1
  47. package/components/shared/stats/StatsWidget.svelte +350 -0
  48. package/components/{sessions → shared}/stats/stats.ts +3 -2
  49. package/components/shared/turn-order/TurnOrder.svelte +24 -0
  50. package/components/shared/turn-order/TurnOrderWidget.svelte +167 -0
  51. package/components/shared/turn-order/turn-order.ts +11 -0
  52. package/components/{sessions/shared → shared}/widgetRef.svelte.ts +9 -2
  53. package/components/shared/world-state/WorldState.svelte +33 -0
  54. package/components/shared/world-state/world-state.ts +10 -0
  55. package/components/tsconfig.json +2 -2
  56. package/dist/components/actions.js +294 -0
  57. package/dist/components/actions.source.json +1 -0
  58. package/dist/components/album.js +386 -0
  59. package/dist/components/album.source.json +1 -0
  60. package/dist/components/annex.js +457 -0
  61. package/dist/components/annex.source.json +1 -0
  62. package/dist/components/attendance.js +353 -0
  63. package/dist/components/attendance.source.json +1 -0
  64. package/dist/components/authors-note.js +5 -5
  65. package/dist/components/authors-note.source.json +1 -1
  66. package/dist/components/backdrop.js +561 -0
  67. package/dist/components/backdrop.source.json +1 -0
  68. package/dist/components/chronicle.js +1141 -0
  69. package/dist/components/chronicle.source.json +1 -0
  70. package/dist/components/core-ui.json +1 -1
  71. package/dist/components/lore-entries.js +5 -5
  72. package/dist/components/lore-entries.source.json +1 -1
  73. package/dist/components/messages.js +3014 -2489
  74. package/dist/components/messages.source.json +1 -1
  75. package/dist/components/places.js +1133 -0
  76. package/dist/components/places.source.json +1 -0
  77. package/dist/components/scene-portraits.js +514 -345
  78. package/dist/components/scene-portraits.source.json +1 -1
  79. package/dist/components/shared-3K7SOGH7.js +16 -0
  80. package/dist/components/shared-452PIS46.js +156 -0
  81. package/dist/components/shared-GEDAMORM.js +45 -0
  82. package/dist/components/{shared-TCQZXBE3.js → shared-GXTL5G2H.js} +4 -3
  83. package/dist/components/shared-ITSLBJB5.js +478 -0
  84. package/dist/components/shared-NK7QSVMU.js +400 -0
  85. package/dist/components/shared-TDWKI2QV.js +58 -0
  86. package/dist/components/{shared-UAQVMZZK.js → shared-XBPH6USH.js} +586 -18
  87. package/dist/components/{shared-AINANAIA.js → shared-XISPHAKY.js} +502 -98
  88. package/dist/components/stats.js +8 -208
  89. package/dist/components/stats.source.json +1 -1
  90. package/dist/components/turn-order.js +461 -0
  91. package/dist/components/turn-order.source.json +1 -0
  92. package/dist/components/world-state.js +14 -202
  93. package/dist/components/world-state.source.json +1 -1
  94. package/dist/{answerForm.d.ts → factories/answerForm.d.ts} +4 -30
  95. package/dist/{answerForm.js → factories/answerForm.js} +10 -39
  96. package/dist/factories/once.d.ts +7 -0
  97. package/dist/factories/once.js +9 -0
  98. package/dist/{turnOrder.d.ts → factories/turnOrder.d.ts} +0 -22
  99. package/dist/{turnOrder.js → factories/turnOrder.js} +4 -104
  100. package/dist/genres/adventure/advanceTime.d.ts +18 -0
  101. package/dist/genres/adventure/advanceTime.js +24 -0
  102. package/dist/genres/adventure/answer.d.ts +23 -0
  103. package/dist/genres/adventure/answer.js +59 -0
  104. package/dist/genres/adventure/answerForm.d.ts +9 -0
  105. package/dist/genres/adventure/answerForm.js +11 -0
  106. package/dist/genres/adventure/ask.d.ts +73 -0
  107. package/dist/genres/adventure/ask.js +157 -0
  108. package/dist/genres/adventure/create.d.ts +36 -0
  109. package/dist/genres/adventure/create.js +62 -0
  110. package/dist/genres/adventure/illustrateScene.d.ts +7 -0
  111. package/dist/genres/adventure/illustrateScene.js +19 -0
  112. package/dist/genres/adventure/index.d.ts +45 -0
  113. package/dist/genres/adventure/index.js +45 -0
  114. package/dist/genres/adventure/keeperAction.d.ts +43 -0
  115. package/dist/genres/adventure/keeperAction.js +217 -0
  116. package/dist/genres/adventure/look.d.ts +45 -0
  117. package/dist/genres/adventure/look.js +209 -0
  118. package/dist/{adventure.d.ts → genres/adventure/respond.d.ts} +74 -65
  119. package/dist/{adventure.js → genres/adventure/respond.js} +125 -65
  120. package/dist/genres/adventure/rest.d.ts +10 -0
  121. package/dist/genres/adventure/rest.js +16 -0
  122. package/dist/genres/adventure/summarizeScene.d.ts +7 -0
  123. package/dist/genres/adventure/summarizeScene.js +14 -0
  124. package/dist/genres/adventure/turnOrder.d.ts +10 -0
  125. package/dist/genres/adventure/turnOrder.js +27 -0
  126. package/dist/genres/chat/advanceTime.d.ts +7 -0
  127. package/dist/genres/chat/advanceTime.js +17 -0
  128. package/dist/genres/chat/answerForm.d.ts +9 -0
  129. package/dist/genres/chat/answerForm.js +11 -0
  130. package/dist/genres/chat/create.d.ts +7 -0
  131. package/dist/{createChat.js → genres/chat/create.js} +6 -6
  132. package/dist/genres/chat/generateImage.d.ts +7 -0
  133. package/dist/{generateImage.js → genres/chat/generateImage.js} +26 -22
  134. package/dist/genres/chat/illustrateScene.d.ts +8 -0
  135. package/dist/genres/chat/illustrateScene.js +19 -0
  136. package/dist/genres/chat/index.d.ts +18 -0
  137. package/dist/genres/chat/index.js +19 -0
  138. package/dist/{narrate.d.ts → genres/chat/narrate.d.ts} +3 -3
  139. package/dist/{narrate.js → genres/chat/narrate.js} +37 -12
  140. package/dist/{narrateCharacter.d.ts → genres/chat/narrateCharacter.d.ts} +2 -2
  141. package/dist/{narrateCharacter.js → genres/chat/narrateCharacter.js} +39 -17
  142. package/dist/genres/chat/respond.d.ts +25 -0
  143. package/dist/{respond.js → genres/chat/respond.js} +91 -23
  144. package/dist/genres/chat/summarizeScene.d.ts +7 -0
  145. package/dist/genres/chat/summarizeScene.js +14 -0
  146. package/dist/genres/chat/turnOrder.d.ts +9 -0
  147. package/dist/genres/chat/turnOrder.js +28 -0
  148. package/dist/{ui/sessions → genres/chat/ui}/authors-note/index.d.ts +1 -1
  149. package/dist/genres/guide/answerForm.d.ts +9 -0
  150. package/dist/genres/guide/answerForm.js +11 -0
  151. package/dist/genres/guide/create.d.ts +24 -0
  152. package/dist/genres/guide/create.js +58 -0
  153. package/dist/genres/guide/index.d.ts +10 -0
  154. package/dist/genres/guide/index.js +10 -0
  155. package/dist/{guide.d.ts → genres/guide/respond.d.ts} +1 -20
  156. package/dist/{guide.js → genres/guide/respond.js} +32 -61
  157. package/dist/genres/guide/summarizeScene.d.ts +7 -0
  158. package/dist/genres/guide/summarizeScene.js +14 -0
  159. package/dist/genres/guide/turnOrder.d.ts +10 -0
  160. package/dist/genres/guide/turnOrder.js +27 -0
  161. package/dist/genres/index.d.ts +14 -0
  162. package/dist/genres/index.js +41 -0
  163. package/dist/genres/lair/advanceTime.d.ts +7 -0
  164. package/dist/genres/lair/advanceTime.js +17 -0
  165. package/dist/genres/lair/answerForm.d.ts +17 -0
  166. package/dist/genres/lair/answerForm.js +19 -0
  167. package/dist/genres/lair/buildRoom.d.ts +64 -0
  168. package/dist/genres/lair/buildRoom.js +244 -0
  169. package/dist/genres/lair/castellanAction.d.ts +27 -0
  170. package/dist/genres/lair/castellanAction.js +177 -0
  171. package/dist/genres/lair/create.d.ts +28 -0
  172. package/dist/genres/lair/create.js +69 -0
  173. package/dist/genres/lair/fileRoom.d.ts +53 -0
  174. package/dist/genres/lair/fileRoom.js +288 -0
  175. package/dist/genres/lair/index.d.ts +62 -0
  176. package/dist/genres/lair/index.js +63 -0
  177. package/dist/genres/lair/nudge.d.ts +25 -0
  178. package/dist/genres/lair/nudge.js +78 -0
  179. package/dist/{lair.d.ts → genres/lair/respond.d.ts} +46 -59
  180. package/dist/{lair.js → genres/lair/respond.js} +55 -76
  181. package/dist/genres/lair/reveal.d.ts +10 -0
  182. package/dist/genres/lair/reveal.js +18 -0
  183. package/dist/genres/lair/roomAnswer.d.ts +86 -0
  184. package/dist/genres/lair/roomAnswer.js +378 -0
  185. package/dist/genres/lair/summarizeScene.d.ts +39 -0
  186. package/dist/genres/lair/summarizeScene.js +51 -0
  187. package/dist/genres/lair/trap.d.ts +11 -0
  188. package/dist/genres/lair/trap.js +24 -0
  189. package/dist/genres/lair/turnOrder.d.ts +9 -0
  190. package/dist/genres/lair/turnOrder.js +36 -0
  191. package/dist/genres/lair/whisper.d.ts +35 -0
  192. package/dist/genres/lair/whisper.js +90 -0
  193. package/dist/index.d.ts +52 -29
  194. package/dist/index.js +192 -86
  195. package/dist/loadouts.d.ts +37 -0
  196. package/dist/loadouts.js +105 -0
  197. package/dist/{entries.d.ts → registry/entries.d.ts} +1 -1
  198. package/dist/{genres.js → registry/genres.js} +40 -6
  199. package/dist/{ui/sessions → registry}/layouts.d.ts +41 -27
  200. package/dist/{ui/sessions → registry}/layouts.js +90 -49
  201. package/dist/{ui/sessions → registry}/widgets.d.ts +22 -0
  202. package/dist/registry/widgets.js +1294 -0
  203. package/dist/{presets.js → seed/presets.js} +28 -13
  204. package/dist/{prompts.d.ts → seed/prompts.d.ts} +10 -5
  205. package/dist/{prompts.js → seed/prompts.js} +225 -176
  206. package/dist/{annexField.d.ts → shared/annexField.d.ts} +12 -8
  207. package/dist/{annexField.js → shared/annexField.js} +16 -15
  208. package/dist/shared/builtins/branch.d.ts +8 -0
  209. package/dist/shared/builtins/branch.js +13 -0
  210. package/dist/{builtins.d.ts → shared/builtins/builtIn.d.ts} +16 -21
  211. package/dist/{builtins.js → shared/builtins/builtIn.js} +3 -37
  212. package/dist/shared/builtins/delete.d.ts +8 -0
  213. package/dist/shared/builtins/delete.js +13 -0
  214. package/dist/shared/builtins/edit.d.ts +8 -0
  215. package/dist/shared/builtins/edit.js +13 -0
  216. package/dist/shared/builtins/hide.d.ts +8 -0
  217. package/dist/shared/builtins/hide.js +13 -0
  218. package/dist/shared/builtins/index.d.ts +11 -0
  219. package/dist/shared/builtins/index.js +11 -0
  220. package/dist/shared/builtins/swipe.d.ts +8 -0
  221. package/dist/shared/builtins/swipe.js +17 -0
  222. package/dist/shared/describeLikeness.d.ts +14 -0
  223. package/dist/shared/describeLikeness.js +65 -0
  224. package/dist/shared/illustrateScene.d.ts +28 -0
  225. package/dist/shared/illustrateScene.js +181 -0
  226. package/dist/shared/portrait.d.ts +21 -0
  227. package/dist/shared/portrait.js +101 -0
  228. package/dist/shared/spriteFill.d.ts +14 -0
  229. package/dist/shared/spriteFill.js +107 -0
  230. package/dist/shared/sprites.d.ts +34 -0
  231. package/dist/shared/sprites.js +98 -0
  232. package/dist/shared/summarize/character.d.ts +9 -0
  233. package/dist/shared/summarize/character.js +10 -0
  234. package/dist/shared/summarize/history.d.ts +9 -0
  235. package/dist/shared/summarize/history.js +10 -0
  236. package/dist/shared/summarize/index.d.ts +12 -0
  237. package/dist/shared/summarize/index.js +12 -0
  238. package/dist/shared/summarize/scene.d.ts +38 -0
  239. package/dist/shared/summarize/scene.js +42 -0
  240. package/dist/shared/summarize/sceneIds.d.ts +17 -0
  241. package/dist/shared/summarize/sceneIds.js +17 -0
  242. package/dist/shared/summarize/summarizeScene.d.ts +113 -0
  243. package/dist/shared/summarize/summarizeScene.js +234 -0
  244. package/dist/shared/summarize/summarizeSpec.d.ts +54 -0
  245. package/dist/{summarize.js → shared/summarize/summarizeSpec.js} +23 -53
  246. package/dist/shared/summarize/world.d.ts +8 -0
  247. package/dist/shared/summarize/world.js +9 -0
  248. package/dist/shared/timePasses.d.ts +56 -0
  249. package/dist/shared/timePasses.js +86 -0
  250. package/dist/{toolLoop.d.ts → shared/toolLoop.d.ts} +25 -3
  251. package/dist/{toolLoop.js → shared/toolLoop.js} +70 -14
  252. package/dist/shared/ui/actions/index.d.ts +117 -0
  253. package/dist/shared/ui/actions/index.js +154 -0
  254. package/dist/shared/ui/album/index.d.ts +115 -0
  255. package/dist/shared/ui/album/index.js +178 -0
  256. package/dist/shared/ui/annex/index.d.ts +163 -0
  257. package/dist/shared/ui/annex/index.js +273 -0
  258. package/dist/shared/ui/attendance/index.d.ts +97 -0
  259. package/dist/shared/ui/attendance/index.js +89 -0
  260. package/dist/shared/ui/backdrop/index.d.ts +78 -0
  261. package/dist/shared/ui/backdrop/index.js +98 -0
  262. package/dist/shared/ui/chronicle/index.d.ts +230 -0
  263. package/dist/shared/ui/chronicle/index.js +249 -0
  264. package/dist/shared/ui/conversation/dossier.d.ts +33 -0
  265. package/dist/shared/ui/conversation/dossier.js +31 -0
  266. package/dist/{ui/sessions → shared/ui}/conversation/index.d.ts +2 -1
  267. package/dist/{ui/sessions → shared/ui}/conversation/index.js +3 -1
  268. package/dist/{ui/sessions → shared/ui}/conversation/messageVerbState.d.ts +1 -1
  269. package/dist/shared/ui/conversation/storyDays.d.ts +21 -0
  270. package/dist/shared/ui/conversation/storyDays.js +23 -0
  271. package/dist/{ui/sessions → shared/ui}/coreWidgetsEntry.d.ts +1 -1
  272. package/dist/{ui/sessions → shared/ui}/coreWidgetsEntry.js +1 -1
  273. package/dist/{ui/sessions → shared/ui}/lore-entries/index.d.ts +2 -2
  274. package/dist/shared/ui/places/index.d.ts +148 -0
  275. package/dist/shared/ui/places/index.js +249 -0
  276. package/dist/{ui/sessions → shared/ui}/scene-portraits/index.d.ts +1 -1
  277. package/dist/{ui/sessions → shared/ui}/scene-portraits/index.js +1 -1
  278. package/dist/shared/ui/scene-portraits/portraits.d.ts +191 -0
  279. package/dist/shared/ui/scene-portraits/portraits.js +223 -0
  280. package/dist/shared/ui/session-state/index.d.ts +16 -0
  281. package/dist/shared/ui/session-state/index.js +16 -0
  282. package/dist/{ui/sessions → shared/ui}/session-state/shapes.d.ts +2 -2
  283. package/dist/shared/ui/session-state/stateView.d.ts +249 -0
  284. package/dist/shared/ui/session-state/stateView.js +247 -0
  285. package/dist/shared/ui/turn-order/index.d.ts +146 -0
  286. package/dist/shared/ui/turn-order/index.js +257 -0
  287. package/dist/{ui/sessions → shared/ui}/widgetContext.d.ts +19 -10
  288. package/package.json +69 -30
  289. package/components/sessions/messages/SessionContainer.svelte +0 -459
  290. package/components/sessions/scene-portraits/ScenePortraitsWidget.svelte +0 -249
  291. package/components/sessions/stats/StatsWidget.svelte +0 -112
  292. package/components/sessions/world-state/WorldStateWidget.svelte +0 -112
  293. package/components/sessions/world-state/world-state.ts +0 -10
  294. package/dist/adventureActions.d.ts +0 -169
  295. package/dist/adventureActions.js +0 -599
  296. package/dist/createChat.d.ts +0 -7
  297. package/dist/generateImage.d.ts +0 -7
  298. package/dist/lairActions.d.ts +0 -296
  299. package/dist/lairActions.js +0 -1287
  300. package/dist/respond.d.ts +0 -24
  301. package/dist/sprites.d.ts +0 -24
  302. package/dist/sprites.js +0 -102
  303. package/dist/summarize.d.ts +0 -76
  304. package/dist/ui/sessions/conversation/dossier.d.ts +0 -328
  305. package/dist/ui/sessions/conversation/dossier.js +0 -31
  306. package/dist/ui/sessions/scene-portraits/portraits.d.ts +0 -95
  307. package/dist/ui/sessions/scene-portraits/portraits.js +0 -115
  308. package/dist/ui/sessions/session-state/index.d.ts +0 -15
  309. package/dist/ui/sessions/session-state/index.js +0 -15
  310. package/dist/ui/sessions/session-state/stateView.d.ts +0 -155
  311. package/dist/ui/sessions/session-state/stateView.js +0 -141
  312. package/dist/ui/sessions/widgets.js +0 -567
  313. package/components/{sessions → genres/chat}/authors-note/authors-note.ts +0 -0
  314. package/components/{sessions/shared → shared}/context.ts +0 -0
  315. package/components/{sessions → shared}/lore-entries/lore-entries.ts +0 -0
  316. package/components/{sessions → shared}/messages/MessageBlocksView.svelte +0 -0
  317. package/components/{sessions → shared}/messages/MessageMediaStrip.svelte +0 -0
  318. package/components/{sessions → shared}/messages/MessagePartsView.svelte +0 -0
  319. package/components/{sessions → shared}/messages/StateProposalList.svelte +0 -0
  320. package/components/{sessions → shared}/messages/mediaStrip.ts +0 -0
  321. package/components/{sessions → shared}/messages/messages.ts +0 -0
  322. package/components/{sessions → shared}/scene-portraits/StatBars.svelte +0 -0
  323. package/components/{sessions → shared}/scene-portraits/scene-portraits.ts +0 -0
  324. package/components/{sessions → shared}/state/entryFinder.ts +0 -0
  325. package/components/{sessions → shared}/state/slotWriter.svelte.ts +0 -0
  326. package/dist/components/{shared-RJDGOAVC.js → shared-FTRGUE7G.js} +78 -78
  327. /package/dist/{ui/sessions → genres/chat/ui}/authors-note/index.js +0 -0
  328. /package/dist/{entries.js → registry/entries.js} +0 -0
  329. /package/dist/{genres.d.ts → registry/genres.d.ts} +0 -0
  330. /package/dist/{slots.d.ts → registry/slots.d.ts} +0 -0
  331. /package/dist/{slots.js → registry/slots.js} +0 -0
  332. /package/dist/{statShapes.d.ts → registry/statShapes.d.ts} +0 -0
  333. /package/dist/{statShapes.js → registry/statShapes.js} +0 -0
  334. /package/dist/{guideMascotImage.d.ts → seed/guideMascotImage.d.ts} +0 -0
  335. /package/dist/{guideMascotImage.js → seed/guideMascotImage.js} +0 -0
  336. /package/dist/{presets.d.ts → seed/presets.d.ts} +0 -0
  337. /package/dist/{graphBuild.d.ts → shared/graphBuild.d.ts} +0 -0
  338. /package/dist/{graphBuild.js → shared/graphBuild.js} +0 -0
  339. /package/dist/{ui/sessions → shared/ui}/conversation/actionsDisclosure.d.ts +0 -0
  340. /package/dist/{ui/sessions → shared/ui}/conversation/actionsDisclosure.js +0 -0
  341. /package/dist/{ui/sessions → shared/ui}/conversation/composerTray.d.ts +0 -0
  342. /package/dist/{ui/sessions → shared/ui}/conversation/composerTray.js +0 -0
  343. /package/dist/{ui/sessions → shared/ui}/conversation/formAnswer.d.ts +0 -0
  344. /package/dist/{ui/sessions → shared/ui}/conversation/formAnswer.js +0 -0
  345. /package/dist/{ui/sessions → shared/ui}/conversation/itemValues.d.ts +0 -0
  346. /package/dist/{ui/sessions → shared/ui}/conversation/itemValues.js +0 -0
  347. /package/dist/{ui/sessions → shared/ui}/conversation/messageOrder.d.ts +0 -0
  348. /package/dist/{ui/sessions → shared/ui}/conversation/messageOrder.js +0 -0
  349. /package/dist/{ui/sessions → shared/ui}/conversation/messageSpeaker.d.ts +0 -0
  350. /package/dist/{ui/sessions → shared/ui}/conversation/messageSpeaker.js +0 -0
  351. /package/dist/{ui/sessions → shared/ui}/conversation/messageVerbState.js +0 -0
  352. /package/dist/{ui/sessions → shared/ui}/conversation/slashPalette.d.ts +0 -0
  353. /package/dist/{ui/sessions → shared/ui}/conversation/slashPalette.js +0 -0
  354. /package/dist/{ui/sessions → shared/ui}/conversation/text.d.ts +0 -0
  355. /package/dist/{ui/sessions → shared/ui}/conversation/text.js +0 -0
  356. /package/dist/{ui/sessions → shared/ui}/lore-entries/index.js +0 -0
  357. /package/dist/{ui/sessions → shared/ui}/session-state/barMath.d.ts +0 -0
  358. /package/dist/{ui/sessions → shared/ui}/session-state/barMath.js +0 -0
  359. /package/dist/{ui/sessions → shared/ui}/session-state/shapes.js +0 -0
  360. /package/dist/{ui/sessions → shared/ui}/widgetContext.js +0 -0
@@ -0,0 +1,244 @@
1
+ /**
2
+ * The Lair's **Build room** action. The genre's actions are introduced in
3
+ * `index.ts`.
4
+ */
5
+ import { compile, slot, spec, sessionEvents } from '@serene-pub/sdk';
6
+ import * as C from '@serene-pub/contracts';
7
+ import { lairGenre } from '../../registry/genres.js';
8
+ /* ── Build room ─────────────────────────────────────────────────────────── */
9
+ /** @internal */
10
+ export const LAIR_BUILD_ROOM_SPEC_ID = 'core:spec/lair-build-room';
11
+ // ⚠ Every Lair action that ranks (build room, answer the door, file as a
12
+ // room, and the Castellan's whisper/trap/reveal builder), edited in place
13
+ // (lorebooks C2, 2026-10-02): a `presences` read and an `eligible` step
14
+ // (`core:task/eligibility@1`) between `lore` and `rank`; and Build room,
15
+ // Answer the door and File as a room, which show the party's room under
16
+ // `{{locationEntry}}`, take the room rule — a `place` step wired into `rank`
17
+ // as `shownElsewhere`. Content-addressed; `specHashes.test.ts` records the
18
+ // moves.
19
+ /** @internal */
20
+ export const LAIR_BUILD_ROOM_VERSION = '1.0.0';
21
+ /**
22
+ * The layout a drafted room's body takes — its `Exits:` line among it — and
23
+ * why that line is still prose beside the graph.
24
+ *
25
+ * **The ways between rooms are relationships now** (places plan, 2026-09-29):
26
+ * one `narrative_relationships` row per way, read both ways when it has a
27
+ * reverse wording, drawn on the Places lens or in a place's own Links, and
28
+ * written by a pipeline through `core:outlet/link-lore-entries@1`. The Lair's
29
+ * rooms listing asks for them (`withLinks`), so `{{locationEntry}}` says a
30
+ * room's ways out under its body as "From here:" — that, not this line, is
31
+ * what the planner reads the ways on from. *Answer the door* links the room it
32
+ * writes to the room the party stand in (B6).
33
+ *
34
+ * ⚠ **The drafted `Exits:` line stays** (plan §11; how the map should grow is
35
+ * the owner's open Q4). A draft names ways out to rooms that may not exist
36
+ * yet, and nothing in the bound catalogue turns a line of prose into a list
37
+ * of names; parsing it at write time, with stub rooms for the names nothing
38
+ * answers, would change what a knock means. So the line is the room's own
39
+ * words — a reader still reads it, and an older room has only it — and the
40
+ * master turns it into links by hand, or with the place editor's *Read links
41
+ * from the Exits line* (B7). It stays a fixed line so a parser can take it
42
+ * apart.
43
+ * @internal
44
+ */
45
+ export const LAIR_ROOM_CONTENT_SHAPE = [
46
+ 'Exits: <direction> → <room>, <direction> → <room>',
47
+ 'Contents: …',
48
+ 'Hazards: …',
49
+ 'Occupants: …',
50
+ ].join('\n');
51
+ /**
52
+ * **Build room**: the master writes a room into the dungeon.
53
+ *
54
+ * The collected text (R3) is the room's **name** — the one thing a person always
55
+ * knows when they press this — and the model writes the body against the lore,
56
+ * the party's position and the fixed layout above. The name reaches the draft
57
+ * as `{{turnDirection}}`, and every room the dungeon already has as
58
+ * `{{knownLocations}}` (the rooms listing, plan A28) — the prompt's "name only
59
+ * rooms this dungeon already has" with the rooms in front of it. The world
60
+ * lore it reads carries no private entries. The write then parks at the
61
+ * review gate: `core:outlet/create-lore-entry@1` declares
62
+ * `review: { fields: ['name', 'content'] }`, and the preset below turns the
63
+ * gate ON — without that line `resolvePosition` defaults an undeclared position
64
+ * to `off` and this docblock's promise would be false, which it was until
65
+ * 2026-09-17. The gate IS the Build room form, with the name and the whole body
66
+ * editable before anything lands.
67
+ *
68
+ * **The entry is a location** (L3, contracts batch 2, 2026-09-17): the preset
69
+ * sets `entryType: 'core:entry/location'`, so a room files as a place rather
70
+ * than as world lore whose content happens to be laid out, and "which rows are
71
+ * the map" becomes a question a reader can ask. It is written with no links:
72
+ * a room built ahead of the party stands nowhere yet, and its drafted `Exits:`
73
+ * line is prose the master links by hand — see `LAIR_ROOM_CONTENT_SHAPE`.
74
+ *
75
+ * ⚠ **`effects: 'world'`** (R-15 *The line*): the result is lorebook data, so
76
+ * this action is the owner's, lives in the composer, and no message block may
77
+ * name it. That last rule is why the knock's form cannot save a room itself.
78
+ * @internal
79
+ */
80
+ export const lairBuildRoomSpec = () => compile(spec(LAIR_BUILD_ROOM_SPEC_ID, {
81
+ version: LAIR_BUILD_ROOM_VERSION,
82
+ taxonomy: { role: 'action' },
83
+ contributes: {
84
+ actions: [
85
+ {
86
+ key: 'build-room',
87
+ venue: { kind: 'composer' },
88
+ quick: true,
89
+ icon: 'hammer',
90
+ /** The room's name is the whole instruction (R3): nothing to do without it. */
91
+ collects: { text: { need: 'required', label: { en: 'Room name' } } },
92
+ effects: 'world',
93
+ /** The owner's, and stated rather than inherited — see the note above. */
94
+ audience: { see: ['participant'], act: ['owner'] },
95
+ label: { en: 'Build room' },
96
+ description: {
97
+ en: "Write a room into the dungeon. Name it, and edit what the narrator drafts before it's saved.",
98
+ },
99
+ },
100
+ ],
101
+ },
102
+ })
103
+ .inlet('input', C.userMessage.v1(), {
104
+ genre: lairGenre,
105
+ event: sessionEvents.sessionAction,
106
+ })
107
+ .gather('gather', { mode: 'parallel' }, (b) => b
108
+ .chain('history', (c) => c.query('read', ($) => C.sessionHistory.v1({
109
+ scope: $.input.sessionScope,
110
+ params: slot.params(),
111
+ })))
112
+ /** The world as the lore tells it, ranked against the conversation. */
113
+ .chain('lore', (c) => c.query('read', ($) => C.worldLore.v1({
114
+ scope: $.input.sessionScope,
115
+ params: slot.params(),
116
+ })))
117
+ .chain('cast', (c) => c.query('read', ($) => C.sessionCast.v1({ scope: $.input.sessionScope })))
118
+ .chain('state', (c) => c.query('read', ($) => C.sessionState.v1({ scope: $.input.sessionScope })))
119
+ /**
120
+ * Every room the dungeon holds (location entries, the
121
+ * preset), by listing rather than by rank — what this room
122
+ * has to join onto, named to the draft whatever the
123
+ * ranker admitted.
124
+ */
125
+ .chain('rooms', (c) => c.query('read', ($) => C.lorebookEntries.v1({
126
+ scope: $.input.sessionScope,
127
+ params: slot.params(),
128
+ }))))
129
+ .task('contextBudget', ($) => C.contextBudget.v1({
130
+ sampling: slot.samplingOf('write'),
131
+ connection: slot.connectionOf('write'),
132
+ params: slot.params(),
133
+ }))
134
+ .task('lore', ($) => C.concatCandidates.v1({
135
+ sources: [$.gather.history.read.band, $.gather.lore.read.main],
136
+ }))
137
+ // The room `{{locationEntry}}` shows (the room rule, 2026-10-02):
138
+ // the world's location at `world.location` (the preset's `path`),
139
+ // by the one room rule; the ranker leaves it out of the lore.
140
+ .task('place', ($) => C.undescribedName.v1({
141
+ name: $.gather.state.read.state,
142
+ locationEntries: $.gather.rooms.read.entries,
143
+ params: slot.params(),
144
+ }), { expose: { label: 'The current place' } })
145
+ // Who is in the world at the session's moment (R4), for `eligible`.
146
+ .query('presences', ($) => C.castPresences.v1({ scope: $.input.sessionScope }))
147
+ // The hard gates before the ranker (C2; R2, R4): selective-logic
148
+ // exclusions from the keyword lanes, and the presence gate.
149
+ .task('eligible', ($) => C.eligibility.v1({
150
+ candidates: $.lore.candidates,
151
+ exclusions: $.gather.lore.read.exclusions,
152
+ presences: $.presences.main,
153
+ at: $.presences.at,
154
+ }))
155
+ .task('rank', ($) => C.rankHybrid.v1({
156
+ candidates: $.eligible.candidates,
157
+ budget: $.contextBudget.available,
158
+ shownElsewhere: $.place.entryId,
159
+ params: slot.params(),
160
+ }))
161
+ .task('context', ($) => C.buildTemplateContext.v1({
162
+ cast: $.gather.cast.read.cast,
163
+ state: $.gather.state.read.state,
164
+ locationEntries: $.gather.rooms.read.entries,
165
+ // The room's name, as the master typed it.
166
+ turnDirection: $.input.text,
167
+ prompts: slot.prompts(),
168
+ variables: slot.variables(),
169
+ }))
170
+ /** Prose and no seed: a room is drafted, not spoken. */
171
+ .task('lines', ($) => C.proseTranscript.v1({
172
+ messages: $.gather.history.read.messages,
173
+ cast: $.gather.cast.read.cast,
174
+ templateContext: $.context.templateContext,
175
+ }))
176
+ /**
177
+ * 🚧 **The transcript's files, placed** (attachments follow-ups, owner
178
+ * ruling 2026-10-03) — `respond`'s two steps: the files the rows show,
179
+ * then per line what `write` receives (an image it can read rides its
180
+ * own turn; otherwise its name). A transcript with no files passes
181
+ * through untouched, so the prompt is byte for byte what it was.
182
+ */
183
+ .query('attachments', ($) => C.historyAttachments.v1({
184
+ messages: $.gather.history.read.messages,
185
+ params: slot.params(),
186
+ }))
187
+ .task('attached', ($) => C.placeAttachments.v1({
188
+ messages: $.lines.messages,
189
+ attachments: $.attachments.attachments,
190
+ connection: slot.connectionOf('write'),
191
+ params: slot.params(),
192
+ }))
193
+ .task('prompt', ($) => C.assemble.v2({
194
+ candidates: $.rank.candidates,
195
+ decisions: $.rank.decisions,
196
+ groups: $.rank.groups,
197
+ budget: $.contextBudget.available,
198
+ messages: $.attached.messages,
199
+ templateContext: $.context.templateContext,
200
+ template: slot.template(),
201
+ prompts: slot.prompts({ node: 'context' }),
202
+ variables: slot.variables(),
203
+ params: slot.params(),
204
+ connection: slot.connectionOf('write'),
205
+ }))
206
+ .oracle('write', ($) => C.generateText.v1({
207
+ context: $.prompt.context,
208
+ connection: slot.connection(),
209
+ sampling: slot.sampling(),
210
+ params: slot.params(),
211
+ }), { expose: { status: 'Building the room' } })
212
+ /**
213
+ * The name is what the master typed, never what the model wrote: a
214
+ * room the person named is a room they can find again, and the gate
215
+ * lets them fix it if the composer was empty.
216
+ */
217
+ .outlet('save', ($) => C.createLoreEntry.v1({
218
+ name: $.input.text,
219
+ content: $.write.text,
220
+ // Named so the entry-kind setting is live rather than
221
+ // rendered and unread (L3); the preset below sets it to a
222
+ // location. `links` is left unwired: a room built ahead of
223
+ // the party joins nothing yet, and its drafted exits are
224
+ // prose the master links (see `LAIR_ROOM_CONTENT_SHAPE`).
225
+ params: slot.params(),
226
+ }))
227
+ /**
228
+ * ⚠ **The gate is the point, not a precaution** — and this preset is
229
+ * what makes it true. `resolvePosition` defaults an undeclared review
230
+ * position to `off`, so until this line the drafted room landed unseen
231
+ * while the docblock above promised a form. *Answer the door* has
232
+ * carried the same two lines since L1; this is the pair.
233
+ */
234
+ .preset('lair', { label: 'Lair', default: true }, (p) => p
235
+ .settings('save', { review: 'on' })
236
+ // A room is a place (L3) — bare id, the way a listing spells
237
+ // them; the version is the row's own column.
238
+ .params('save', { entryType: 'core:entry/location' })
239
+ // The rooms the draft is shown: the dungeon's places.
240
+ .params('gather.rooms.read', { entryTypes: ['core:entry/location'] })
241
+ // The room the place slot shows (the room rule).
242
+ .params('place', { path: 'world.location' }))
243
+ .build());
244
+ //# sourceMappingURL=buildRoom.js.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * The Castellan's turn as an action, which Trigger trap and Reveal share
3
+ * (`trap.ts`, `reveal.ts`).
4
+ */
5
+ /**
6
+ * Trigger trap and Reveal are one graph with two sets of instructions, and
7
+ * saying so in a builder is more honest than writing it twice — Adventure's
8
+ * `keeperAction` makes the same call for the same reason.
9
+ *
10
+ * Both are Adventure's *Look*: the Castellan describes something from the lore
11
+ * and the world state, changes nothing, and writes one message. They are
12
+ * separate SPECS rather than one spec with a parameter because a shipped
13
+ * prompt is resolved per (pool, spec) — two specs is what gives the trap its
14
+ * own instructions and the reveal its own, in the same pool, each editable
15
+ * without touching the other.
16
+ */
17
+ export declare const castellanAction: (id: string, version: string, trigger: {
18
+ key: string;
19
+ icon: string;
20
+ label: string;
21
+ description: string;
22
+ /** What the row says while the Castellan writes (B18 step status). */
23
+ status: string;
24
+ /** The collect modal's question (R3): what the master may say the thing is. */
25
+ ask: string;
26
+ }) => import("@serene-pub/sdk").SpecDocument;
27
+ //# sourceMappingURL=castellanAction.d.ts.map
@@ -0,0 +1,177 @@
1
+ /**
2
+ * The Castellan's turn as an action, which Trigger trap and Reveal share
3
+ * (`trap.ts`, `reveal.ts`).
4
+ */
5
+ import { compile, slot, spec, sessionEvents } from '@serene-pub/sdk';
6
+ import * as C from '@serene-pub/contracts';
7
+ import { LAIR_CASTELLAN_KEY, POST_HISTORY_TOKEN_TRIGGER, lairGenre } from '../../registry/genres.js';
8
+ /* ── The Castellan's two turns ──────────────────────────────────────────── */
9
+ /**
10
+ * Trigger trap and Reveal are one graph with two sets of instructions, and
11
+ * saying so in a builder is more honest than writing it twice — Adventure's
12
+ * `keeperAction` makes the same call for the same reason.
13
+ *
14
+ * Both are Adventure's *Look*: the Castellan describes something from the lore
15
+ * and the world state, changes nothing, and writes one message. They are
16
+ * separate SPECS rather than one spec with a parameter because a shipped
17
+ * prompt is resolved per (pool, spec) — two specs is what gives the trap its
18
+ * own instructions and the reveal its own, in the same pool, each editable
19
+ * without touching the other.
20
+ */
21
+ export const castellanAction = (id, version, trigger) => compile(spec(id, {
22
+ version,
23
+ taxonomy: { role: 'action' },
24
+ contributes: {
25
+ actions: [
26
+ {
27
+ key: trigger.key,
28
+ venue: { kind: 'composer' },
29
+ quick: true,
30
+ icon: trigger.icon,
31
+ /** What the master says rides as the turn's instructions — or nothing, and the room decides (R3). */
32
+ collects: {
33
+ text: { need: 'optional', label: { en: trigger.ask }, ifEmpty: { en: 'The room decides.' } },
34
+ },
35
+ label: { en: trigger.label },
36
+ description: { en: trigger.description },
37
+ },
38
+ ],
39
+ },
40
+ })
41
+ .inlet('input', C.userMessage.v1(), {
42
+ genre: lairGenre,
43
+ event: sessionEvents.sessionAction,
44
+ })
45
+ /**
46
+ * The row, opened before anything is read — the Castellan's, by
47
+ * name (R8, owner F2 2026-09-28: Trap and Reveal are the
48
+ * Castellan's). Not `narration`: a trap is the Castellan taking a
49
+ * turn, not a side note beside one. It streams while `write` runs
50
+ * (`expose.stream`) and `save` finishes it. What the master typed
51
+ * is stored beside it as the turn's instructions — never as its
52
+ * text.
53
+ */
54
+ .outlet('placeholder', ($) => C.createMessage.v1({
55
+ generating: true,
56
+ speaker: `envoy:${LAIR_CASTELLAN_KEY}`,
57
+ instructions: $.input.text,
58
+ }))
59
+ // Before the reads (history window, 2026-10-03): the history read
60
+ // is sized by this budget, so it is computed first. It reads only
61
+ // config, never a step, so moving it changes no value.
62
+ .task('contextBudget', ($) => C.contextBudget.v1({
63
+ sampling: slot.samplingOf('write'),
64
+ connection: slot.connectionOf('write'),
65
+ params: slot.params(),
66
+ }))
67
+ .gather('gather', { mode: 'parallel' }, (b) => b
68
+ .chain('history', (c) => c.query('read', ($) => C.sessionHistory.v1({
69
+ scope: $.input.sessionScope,
70
+ // Sized by the window (history window, 2026-10-03).
71
+ budget: $.contextBudget.available,
72
+ params: slot.params(),
73
+ })))
74
+ .chain('lore', (c) => c.query('read', ($) => C.lorebookTriggers.v1({
75
+ scope: $.input.sessionScope,
76
+ params: slot.params(),
77
+ })))
78
+ .chain('cast', (c) => c.query('read', ($) => C.sessionCast.v1({ scope: $.input.sessionScope })))
79
+ .chain('state', (c) => c.query('read', ($) => C.sessionState.v1({ scope: $.input.sessionScope }))))
80
+ .task('lore', ($) => C.concatCandidates.v1({
81
+ sources: [$.gather.history.read.band, $.gather.lore.read.main],
82
+ }))
83
+ // Who is in the world at the session's moment (R4), for `eligible`.
84
+ .query('presences', ($) => C.castPresences.v1({ scope: $.input.sessionScope }))
85
+ // The hard gates before the ranker (C2; R2, R4): selective-logic
86
+ // exclusions from the keyword lanes, and the presence gate.
87
+ .task('eligible', ($) => C.eligibility.v1({
88
+ candidates: $.lore.candidates,
89
+ exclusions: $.gather.lore.read.exclusions,
90
+ presences: $.presences.main,
91
+ at: $.presences.at,
92
+ }))
93
+ .task('rank', ($) => C.rankHybrid.v1({
94
+ candidates: $.eligible.candidates,
95
+ budget: $.contextBudget.available,
96
+ params: slot.params(),
97
+ }))
98
+ /**
99
+ * `build-template-context@1` rather than the narrator builder,
100
+ * builder, for the one port that decides it: `state`. A trap that
101
+ * did not know which floor the party is on, and a reveal that did
102
+ * not know where they are standing, would be describing a dungeon
103
+ * in general.
104
+ */
105
+ .task('context', ($) => C.buildTemplateContext.v1({
106
+ cast: $.gather.cast.read.cast,
107
+ state: $.gather.state.read.state,
108
+ /**
109
+ * What the master typed — *"the floor gives way"* — as
110
+ * what to spring or reveal (B17). The prompt renders it as
111
+ * `{{turnDirection}}`; blank, the room decides.
112
+ */
113
+ turnDirection: $.input.text,
114
+ prompts: slot.prompts(),
115
+ variables: slot.variables(),
116
+ }))
117
+ .task('lines', ($) => C.processMessages.v1({
118
+ messages: $.gather.history.read.messages,
119
+ cast: $.gather.cast.read.cast,
120
+ templateContext: $.context.templateContext,
121
+ seedName: $.context.seedName,
122
+ }))
123
+ /**
124
+ * 🚧 **The transcript's files, placed** (attachments follow-ups, owner
125
+ * ruling 2026-10-03) — `respond`'s two steps: the files the rows show,
126
+ * then per line what `write` receives (an image it can read rides its
127
+ * own turn; otherwise its name). A transcript with no files passes
128
+ * through untouched, so the prompt is byte for byte what it was.
129
+ */
130
+ .query('attachments', ($) => C.historyAttachments.v1({
131
+ messages: $.gather.history.read.messages,
132
+ params: slot.params(),
133
+ }))
134
+ .task('attached', ($) => C.placeAttachments.v1({
135
+ messages: $.lines.messages,
136
+ attachments: $.attachments.attachments,
137
+ connection: slot.connectionOf('write'),
138
+ params: slot.params(),
139
+ }))
140
+ .task('prompt', ($) => C.assemble.v2({
141
+ candidates: $.rank.candidates,
142
+ decisions: $.rank.decisions,
143
+ groups: $.rank.groups,
144
+ budget: $.contextBudget.available,
145
+ messages: $.attached.messages,
146
+ templateContext: $.context.templateContext,
147
+ template: slot.template(),
148
+ prompts: slot.prompts({ node: 'context' }),
149
+ variables: slot.variables(),
150
+ params: slot.params(),
151
+ connection: slot.connectionOf('write'),
152
+ }))
153
+ .oracle('write', ($) => C.generateText.v1({
154
+ context: $.prompt.context,
155
+ connection: slot.connection(),
156
+ sampling: slot.sampling(),
157
+ params: slot.params(),
158
+ }), { expose: { stream: true, status: trigger.status } })
159
+ /**
160
+ * The placeholder, finished: the prose, and the Castellan's
161
+ * reasoning folded as the row's Reasoning (the B5 pattern — absent
162
+ * when the model gave none, and the port is skipped).
163
+ */
164
+ .outlet('save', ($) => C.updateMessage.v1({
165
+ target: $.placeholder.messageId,
166
+ text: $.write.text,
167
+ reasoning: $.write.reasoning,
168
+ }))
169
+ /**
170
+ * What this step ships with: the post-history reminder's trigger
171
+ * (`POST_HISTORY_TOKEN_TRIGGER`), because the prompt renders the
172
+ * session's growing history and the reminder only earns its place
173
+ * once there is enough of it to drift from.
174
+ */
175
+ .preset('default', { label: 'Default', default: true }, (p) => p.params('prompt', { postHistoryTokenTrigger: POST_HISTORY_TOKEN_TRIGGER }))
176
+ .build());
177
+ //# sourceMappingURL=castellanAction.js.map
@@ -0,0 +1,28 @@
1
+ /**
2
+ * The Lair's create pipeline: make a dungeon. The genre's turn, and the notes
3
+ * both share, are `respond.ts`'s.
4
+ */
5
+ /** @internal */
6
+ export declare const LAIR_CREATE_SPEC_ID = "core:spec/lair-create";
7
+ /** @internal */
8
+ export declare const LAIR_CREATE_VERSION = "1.0.0";
9
+ /**
10
+ * The genre's required member (24 §3): what happens when a Lair session is
11
+ * created.
12
+ *
13
+ * **The dungeon welcomes nobody, but its steward welcomes its master** (R6,
14
+ * owner F1 2026-09-28). The cards' greetings are off — the party are delvers
15
+ * who have not arrived yet — so `collect` and `seed` still write nothing,
16
+ * as the guide's do. Then the Castellan's declared greeting
17
+ * (`EnvoyDecl.greeting`), read through `core:query/envoy-greeting@1` and
18
+ * interpolated for this session, is written on the Sanctum under its name —
19
+ * only when it has text, which it lacks when the Castellan is not seated.
20
+ *
21
+ * No model call, deliberately: creation is a synchronous action a person is
22
+ * waiting on (see `adventure-create` for the argument at length). The
23
+ * welcome is declared, so it is instant, translatable and reviewable; the
24
+ * Castellan's first *reply* is where it tailors itself to the dungeon.
25
+ * @internal
26
+ */
27
+ export declare const lairCreateSpec: () => import("@serene-pub/sdk").SpecDocument;
28
+ //# sourceMappingURL=create.d.ts.map
@@ -0,0 +1,69 @@
1
+ /**
2
+ * The Lair's create pipeline: make a dungeon. The genre's turn, and the notes
3
+ * both share, are `respond.ts`'s.
4
+ */
5
+ import { compile, slot, spec, sessionEvents } from '@serene-pub/sdk';
6
+ import * as C from '@serene-pub/contracts';
7
+ import { LAIR_CASTELLAN_KEY, lairGenre } from '../../registry/genres.js';
8
+ /* ── create ─────────────────────────────────────────────────────────────── */
9
+ /** @internal */
10
+ export const LAIR_CREATE_SPEC_ID = 'core:spec/lair-create';
11
+ /** @internal */
12
+ export const LAIR_CREATE_VERSION = '1.0.0';
13
+ /** Where the Castellan's greeting lands — its declaration's channel, read at build like the cards' greeting channel. */
14
+ const CASTELLAN_GREETING_CHANNEL = lairGenre.envoys?.find((e) => e.key === LAIR_CASTELLAN_KEY)?.greeting?.channel ?? 'main';
15
+ /**
16
+ * The genre's required member (24 §3): what happens when a Lair session is
17
+ * created.
18
+ *
19
+ * **The dungeon welcomes nobody, but its steward welcomes its master** (R6,
20
+ * owner F1 2026-09-28). The cards' greetings are off — the party are delvers
21
+ * who have not arrived yet — so `collect` and `seed` still write nothing,
22
+ * as the guide's do. Then the Castellan's declared greeting
23
+ * (`EnvoyDecl.greeting`), read through `core:query/envoy-greeting@1` and
24
+ * interpolated for this session, is written on the Sanctum under its name —
25
+ * only when it has text, which it lacks when the Castellan is not seated.
26
+ *
27
+ * No model call, deliberately: creation is a synchronous action a person is
28
+ * waiting on (see `adventure-create` for the argument at length). The
29
+ * welcome is declared, so it is instant, translatable and reviewable; the
30
+ * Castellan's first *reply* is where it tailors itself to the dungeon.
31
+ * @internal
32
+ */
33
+ export const lairCreateSpec = () => compile(spec(LAIR_CREATE_SPEC_ID, {
34
+ version: LAIR_CREATE_VERSION,
35
+ taxonomy: {
36
+ role: 'create',
37
+ },
38
+ genre: {
39
+ name: lairGenre.name,
40
+ family: lairGenre.family,
41
+ description: lairGenre.description,
42
+ shape: lairGenre.shape,
43
+ events: lairGenre.events,
44
+ // R4: the host names the person's lines off this row.
45
+ playerLabel: lairGenre.playerLabel,
46
+ // R6: the Castellan — which speakers this genre brings is
47
+ // read off this row, as the writing room's scribe is.
48
+ envoys: lairGenre.envoys,
49
+ },
50
+ })
51
+ .inlet('input', C.sessionCreated.v1(), {
52
+ genre: lairGenre,
53
+ event: sessionEvents.sessionCreated,
54
+ })
55
+ .query('collect', ($) => C.sessionGreetings.v1({ scope: $.input.sessionScope }))
56
+ .outlet('seed', ($) => C.seedGreetings.v1({
57
+ greetings: $.collect.greetings,
58
+ channel: lairGenre.shape?.greeting?.channel ?? 'main',
59
+ }))
60
+ /** The Castellan's greeting, interpolated — empty when it is not seated. */
61
+ .query('welcome', ($) => C.envoyGreeting.v1({ scope: $.input.sessionScope, params: slot.params() }))
62
+ .junction('greet', { on: ($) => $.welcome.text }, (g) => g.when('greets', { truthy: true }, (c) => c.outlet('write', ($) => C.createMessage.v1({
63
+ text: $.welcome.text,
64
+ channel: CASTELLAN_GREETING_CHANNEL,
65
+ speaker: `envoy:${LAIR_CASTELLAN_KEY}`,
66
+ }))))
67
+ .preset('lair', { label: 'Lair', default: true }, (p) => p.params('welcome', { envoy: LAIR_CASTELLAN_KEY }))
68
+ .build());
69
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The Lair's **File as a room** action, on a message's ⋮. The genre's actions
3
+ * are introduced in `index.ts`.
4
+ */
5
+ /** @internal */
6
+ export declare const LAIR_FILE_ROOM_SPEC_ID = "core:spec/lair-file-room";
7
+ /** @internal */
8
+ export declare const LAIR_FILE_ROOM_VERSION = "1.0.0";
9
+ /**
10
+ * **File as a room** — a room described in a message reaches the lorebook
11
+ * (lair re-plan R11, 2026-09-28; owner ruling 1: the Sanctum is where the map
12
+ * is laid out ahead of time, and a planned room reaches the lorebook only
13
+ * through a review-gated write).
14
+ *
15
+ * The rooms worth filing are written in prose first: the master narrates the
16
+ * party into one on `main` (the person is the narrator, F2), plans one with the
17
+ * Castellan in the Sanctum, or the Castellan narrates one when it is fired. So
18
+ * this lives on the **message** — a row's ⋮ — and acts on that row: its text is
19
+ * read by id (`session-history@1`'s `messageId`, the inlet's), never sent by
20
+ * the client.
21
+ *
22
+ * **Whose rows.** The person's and the Castellan's — any row that is not a
23
+ * character's line (`item.characterLine equals false`, the grammar's one
24
+ * condition: *the person's or the Castellan's* is exactly *not a delver's*). A
25
+ * delver naming a door is not the dungeon's plan, which is the same rule the
26
+ * room check applies to prose (`undescribed-name@1`, R7). Greyed there with
27
+ * the sentence, and refused at the door with the same one.
28
+ *
29
+ * **The name is collected** (R3's collect modal): required, because it is what
30
+ * the person can find the room by again (*Build room*'s rule), because a
31
+ * message may describe more than one room and the name says which, and
32
+ * because it is what the duplicate check runs on — before any model call, so
33
+ * a room already in the book costs nothing. It stays editable at the review
34
+ * gate, where the draft is.
35
+ *
36
+ * **Then, R9's drafted path.** A room already in the book by the SDK's name
37
+ * rule (`undescribed-name@1` over the location entries, then the whole book;
38
+ * no prose read — the row itself is prose) is not filed twice: the Castellan
39
+ * says so on the Sanctum, and nothing is written. Otherwise the Castellan
40
+ * drafts the entry from that one row in *Build room*'s layout
41
+ * (`LAIR_ROOM_CONTENT_SHAPE`, `Exits:` when the message names them) and
42
+ * `create-lore-entry`'s **review gate** holds it — even from the person's own
43
+ * row, because the row may say more than the room. Approved, it lands as a
44
+ * **location**; rejected, nothing is written.
45
+ *
46
+ * ⚠ **`effects: 'world'` in the `message` venue.** A row's ⋮ is the owner's
47
+ * side of the effects line since this action (`WORLD_ACTION_VENUES`, R11):
48
+ * the owner's own press, the row its subject. `act` stays `owner`; no block
49
+ * names it; no answer pipeline presses it.
50
+ * @internal
51
+ */
52
+ export declare const lairFileRoomSpec: () => import("@serene-pub/sdk").SpecDocument;
53
+ //# sourceMappingURL=fileRoom.d.ts.map