@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.
- package/README.md +21 -1
- package/components/{sessions → genres/chat}/authors-note/AuthorsNote.svelte +1 -1
- package/components/{sessions → genres/chat}/authors-note/AuthorsNoteWidget.svelte +1 -1
- package/components/{sessions/world-state/WorldState.svelte → shared/actions/Actions.svelte} +5 -5
- package/components/shared/actions/ActionsWidget.svelte +118 -0
- package/components/shared/actions/actions.ts +11 -0
- package/components/shared/album/Album.svelte +24 -0
- package/components/shared/album/AlbumWidget.svelte +163 -0
- package/components/shared/album/album.ts +10 -0
- package/components/shared/annex/Annex.svelte +24 -0
- package/components/shared/annex/AnnexWidget.svelte +151 -0
- package/components/shared/annex/annex.ts +10 -0
- package/components/shared/attendance/Attendance.svelte +24 -0
- package/components/shared/attendance/AttendanceWidget.svelte +136 -0
- package/components/shared/attendance/attendance.ts +12 -0
- package/components/shared/backdrop/Backdrop.svelte +24 -0
- package/components/shared/backdrop/BackdropWidget.svelte +345 -0
- package/components/shared/backdrop/backdrop.ts +10 -0
- package/components/shared/chronicle/Chronicle.svelte +36 -0
- package/components/shared/chronicle/ChronicleWidget.svelte +569 -0
- package/components/shared/chronicle/chronicle.ts +11 -0
- package/components/{sessions → shared}/lore-entries/LoreEntries.svelte +1 -1
- package/components/{sessions → shared}/lore-entries/LoreEntriesWidget.svelte +3 -3
- package/components/shared/map-canvas/MapCanvas.svelte +171 -0
- package/components/shared/map-canvas/index.ts +390 -0
- package/components/{sessions → shared}/messages/MessageComposer.svelte +1 -1
- package/components/{sessions → shared}/messages/MessageControls.svelte +42 -0
- package/components/{sessions → shared}/messages/MessageStateLedger.svelte +19 -8
- package/components/{sessions → shared}/messages/Messages.svelte +1 -1
- package/components/{sessions → shared}/messages/MessagesWidget.svelte +126 -40
- package/components/{sessions → shared}/messages/NextCharacterBlock.svelte +17 -14
- package/components/shared/messages/SceneCueChip.svelte +82 -0
- package/components/shared/messages/SceneDivider.svelte +399 -0
- package/components/{sessions → shared}/messages/SessionComposer.svelte +33 -9
- package/components/shared/messages/SessionContainer.svelte +651 -0
- package/components/{sessions → shared}/messages/SessionMessage.svelte +52 -7
- package/components/shared/messages/TurnLine.svelte +254 -0
- package/components/{sessions → shared}/messages/conversation.svelte.ts +191 -2
- package/components/shared/messages/sceneMarks.ts +397 -0
- package/components/shared/places/Places.svelte +24 -0
- package/components/shared/places/PlacesWidget.svelte +290 -0
- package/components/shared/places/places.ts +11 -0
- package/components/{sessions → shared}/scene-portraits/ScenePortraits.svelte +1 -1
- package/components/shared/scene-portraits/ScenePortraitsWidget.svelte +404 -0
- package/components/{sessions → shared}/state/SlotControl.svelte +9 -1
- package/components/{sessions → shared}/stats/Stats.svelte +1 -1
- package/components/shared/stats/StatsWidget.svelte +350 -0
- package/components/{sessions → shared}/stats/stats.ts +3 -2
- package/components/shared/turn-order/TurnOrder.svelte +24 -0
- package/components/shared/turn-order/TurnOrderWidget.svelte +167 -0
- package/components/shared/turn-order/turn-order.ts +11 -0
- package/components/{sessions/shared → shared}/widgetRef.svelte.ts +9 -2
- package/components/shared/world-state/WorldState.svelte +33 -0
- package/components/shared/world-state/world-state.ts +10 -0
- package/components/tsconfig.json +2 -2
- package/dist/components/actions.js +294 -0
- package/dist/components/actions.source.json +1 -0
- package/dist/components/album.js +386 -0
- package/dist/components/album.source.json +1 -0
- package/dist/components/annex.js +457 -0
- package/dist/components/annex.source.json +1 -0
- package/dist/components/attendance.js +353 -0
- package/dist/components/attendance.source.json +1 -0
- package/dist/components/authors-note.js +5 -5
- package/dist/components/authors-note.source.json +1 -1
- package/dist/components/backdrop.js +561 -0
- package/dist/components/backdrop.source.json +1 -0
- package/dist/components/chronicle.js +1141 -0
- package/dist/components/chronicle.source.json +1 -0
- package/dist/components/core-ui.json +1 -1
- package/dist/components/lore-entries.js +5 -5
- package/dist/components/lore-entries.source.json +1 -1
- package/dist/components/messages.js +3014 -2489
- package/dist/components/messages.source.json +1 -1
- package/dist/components/places.js +1133 -0
- package/dist/components/places.source.json +1 -0
- package/dist/components/scene-portraits.js +514 -345
- package/dist/components/scene-portraits.source.json +1 -1
- package/dist/components/shared-3K7SOGH7.js +16 -0
- package/dist/components/shared-452PIS46.js +156 -0
- package/dist/components/shared-GEDAMORM.js +45 -0
- package/dist/components/{shared-TCQZXBE3.js → shared-GXTL5G2H.js} +4 -3
- package/dist/components/shared-ITSLBJB5.js +478 -0
- package/dist/components/shared-NK7QSVMU.js +400 -0
- package/dist/components/shared-TDWKI2QV.js +58 -0
- package/dist/components/{shared-UAQVMZZK.js → shared-XBPH6USH.js} +586 -18
- package/dist/components/{shared-AINANAIA.js → shared-XISPHAKY.js} +502 -98
- package/dist/components/stats.js +8 -208
- package/dist/components/stats.source.json +1 -1
- package/dist/components/turn-order.js +461 -0
- package/dist/components/turn-order.source.json +1 -0
- package/dist/components/world-state.js +14 -202
- package/dist/components/world-state.source.json +1 -1
- package/dist/{answerForm.d.ts → factories/answerForm.d.ts} +4 -30
- package/dist/{answerForm.js → factories/answerForm.js} +10 -39
- package/dist/factories/once.d.ts +7 -0
- package/dist/factories/once.js +9 -0
- package/dist/{turnOrder.d.ts → factories/turnOrder.d.ts} +0 -22
- package/dist/{turnOrder.js → factories/turnOrder.js} +4 -104
- package/dist/genres/adventure/advanceTime.d.ts +18 -0
- package/dist/genres/adventure/advanceTime.js +24 -0
- package/dist/genres/adventure/answer.d.ts +23 -0
- package/dist/genres/adventure/answer.js +59 -0
- package/dist/genres/adventure/answerForm.d.ts +9 -0
- package/dist/genres/adventure/answerForm.js +11 -0
- package/dist/genres/adventure/ask.d.ts +73 -0
- package/dist/genres/adventure/ask.js +157 -0
- package/dist/genres/adventure/create.d.ts +36 -0
- package/dist/genres/adventure/create.js +62 -0
- package/dist/genres/adventure/illustrateScene.d.ts +7 -0
- package/dist/genres/adventure/illustrateScene.js +19 -0
- package/dist/genres/adventure/index.d.ts +45 -0
- package/dist/genres/adventure/index.js +45 -0
- package/dist/genres/adventure/keeperAction.d.ts +43 -0
- package/dist/genres/adventure/keeperAction.js +217 -0
- package/dist/genres/adventure/look.d.ts +45 -0
- package/dist/genres/adventure/look.js +209 -0
- package/dist/{adventure.d.ts → genres/adventure/respond.d.ts} +74 -65
- package/dist/{adventure.js → genres/adventure/respond.js} +125 -65
- package/dist/genres/adventure/rest.d.ts +10 -0
- package/dist/genres/adventure/rest.js +16 -0
- package/dist/genres/adventure/summarizeScene.d.ts +7 -0
- package/dist/genres/adventure/summarizeScene.js +14 -0
- package/dist/genres/adventure/turnOrder.d.ts +10 -0
- package/dist/genres/adventure/turnOrder.js +27 -0
- package/dist/genres/chat/advanceTime.d.ts +7 -0
- package/dist/genres/chat/advanceTime.js +17 -0
- package/dist/genres/chat/answerForm.d.ts +9 -0
- package/dist/genres/chat/answerForm.js +11 -0
- package/dist/genres/chat/create.d.ts +7 -0
- package/dist/{createChat.js → genres/chat/create.js} +6 -6
- package/dist/genres/chat/generateImage.d.ts +7 -0
- package/dist/{generateImage.js → genres/chat/generateImage.js} +26 -22
- package/dist/genres/chat/illustrateScene.d.ts +8 -0
- package/dist/genres/chat/illustrateScene.js +19 -0
- package/dist/genres/chat/index.d.ts +18 -0
- package/dist/genres/chat/index.js +19 -0
- package/dist/{narrate.d.ts → genres/chat/narrate.d.ts} +3 -3
- package/dist/{narrate.js → genres/chat/narrate.js} +37 -12
- package/dist/{narrateCharacter.d.ts → genres/chat/narrateCharacter.d.ts} +2 -2
- package/dist/{narrateCharacter.js → genres/chat/narrateCharacter.js} +39 -17
- package/dist/genres/chat/respond.d.ts +25 -0
- package/dist/{respond.js → genres/chat/respond.js} +91 -23
- package/dist/genres/chat/summarizeScene.d.ts +7 -0
- package/dist/genres/chat/summarizeScene.js +14 -0
- package/dist/genres/chat/turnOrder.d.ts +9 -0
- package/dist/genres/chat/turnOrder.js +28 -0
- package/dist/{ui/sessions → genres/chat/ui}/authors-note/index.d.ts +1 -1
- package/dist/genres/guide/answerForm.d.ts +9 -0
- package/dist/genres/guide/answerForm.js +11 -0
- package/dist/genres/guide/create.d.ts +24 -0
- package/dist/genres/guide/create.js +58 -0
- package/dist/genres/guide/index.d.ts +10 -0
- package/dist/genres/guide/index.js +10 -0
- package/dist/{guide.d.ts → genres/guide/respond.d.ts} +1 -20
- package/dist/{guide.js → genres/guide/respond.js} +32 -61
- package/dist/genres/guide/summarizeScene.d.ts +7 -0
- package/dist/genres/guide/summarizeScene.js +14 -0
- package/dist/genres/guide/turnOrder.d.ts +10 -0
- package/dist/genres/guide/turnOrder.js +27 -0
- package/dist/genres/index.d.ts +14 -0
- package/dist/genres/index.js +41 -0
- package/dist/genres/lair/advanceTime.d.ts +7 -0
- package/dist/genres/lair/advanceTime.js +17 -0
- package/dist/genres/lair/answerForm.d.ts +17 -0
- package/dist/genres/lair/answerForm.js +19 -0
- package/dist/genres/lair/buildRoom.d.ts +64 -0
- package/dist/genres/lair/buildRoom.js +244 -0
- package/dist/genres/lair/castellanAction.d.ts +27 -0
- package/dist/genres/lair/castellanAction.js +177 -0
- package/dist/genres/lair/create.d.ts +28 -0
- package/dist/genres/lair/create.js +69 -0
- package/dist/genres/lair/fileRoom.d.ts +53 -0
- package/dist/genres/lair/fileRoom.js +288 -0
- package/dist/genres/lair/index.d.ts +62 -0
- package/dist/genres/lair/index.js +63 -0
- package/dist/genres/lair/nudge.d.ts +25 -0
- package/dist/genres/lair/nudge.js +78 -0
- package/dist/{lair.d.ts → genres/lair/respond.d.ts} +46 -59
- package/dist/{lair.js → genres/lair/respond.js} +55 -76
- package/dist/genres/lair/reveal.d.ts +10 -0
- package/dist/genres/lair/reveal.js +18 -0
- package/dist/genres/lair/roomAnswer.d.ts +86 -0
- package/dist/genres/lair/roomAnswer.js +378 -0
- package/dist/genres/lair/summarizeScene.d.ts +39 -0
- package/dist/genres/lair/summarizeScene.js +51 -0
- package/dist/genres/lair/trap.d.ts +11 -0
- package/dist/genres/lair/trap.js +24 -0
- package/dist/genres/lair/turnOrder.d.ts +9 -0
- package/dist/genres/lair/turnOrder.js +36 -0
- package/dist/genres/lair/whisper.d.ts +35 -0
- package/dist/genres/lair/whisper.js +90 -0
- package/dist/index.d.ts +52 -29
- package/dist/index.js +192 -86
- package/dist/loadouts.d.ts +37 -0
- package/dist/loadouts.js +105 -0
- package/dist/{entries.d.ts → registry/entries.d.ts} +1 -1
- package/dist/{genres.js → registry/genres.js} +40 -6
- package/dist/{ui/sessions → registry}/layouts.d.ts +41 -27
- package/dist/{ui/sessions → registry}/layouts.js +90 -49
- package/dist/{ui/sessions → registry}/widgets.d.ts +22 -0
- package/dist/registry/widgets.js +1294 -0
- package/dist/{presets.js → seed/presets.js} +28 -13
- package/dist/{prompts.d.ts → seed/prompts.d.ts} +10 -5
- package/dist/{prompts.js → seed/prompts.js} +225 -176
- package/dist/{annexField.d.ts → shared/annexField.d.ts} +12 -8
- package/dist/{annexField.js → shared/annexField.js} +16 -15
- package/dist/shared/builtins/branch.d.ts +8 -0
- package/dist/shared/builtins/branch.js +13 -0
- package/dist/{builtins.d.ts → shared/builtins/builtIn.d.ts} +16 -21
- package/dist/{builtins.js → shared/builtins/builtIn.js} +3 -37
- package/dist/shared/builtins/delete.d.ts +8 -0
- package/dist/shared/builtins/delete.js +13 -0
- package/dist/shared/builtins/edit.d.ts +8 -0
- package/dist/shared/builtins/edit.js +13 -0
- package/dist/shared/builtins/hide.d.ts +8 -0
- package/dist/shared/builtins/hide.js +13 -0
- package/dist/shared/builtins/index.d.ts +11 -0
- package/dist/shared/builtins/index.js +11 -0
- package/dist/shared/builtins/swipe.d.ts +8 -0
- package/dist/shared/builtins/swipe.js +17 -0
- package/dist/shared/describeLikeness.d.ts +14 -0
- package/dist/shared/describeLikeness.js +65 -0
- package/dist/shared/illustrateScene.d.ts +28 -0
- package/dist/shared/illustrateScene.js +181 -0
- package/dist/shared/portrait.d.ts +21 -0
- package/dist/shared/portrait.js +101 -0
- package/dist/shared/spriteFill.d.ts +14 -0
- package/dist/shared/spriteFill.js +107 -0
- package/dist/shared/sprites.d.ts +34 -0
- package/dist/shared/sprites.js +98 -0
- package/dist/shared/summarize/character.d.ts +9 -0
- package/dist/shared/summarize/character.js +10 -0
- package/dist/shared/summarize/history.d.ts +9 -0
- package/dist/shared/summarize/history.js +10 -0
- package/dist/shared/summarize/index.d.ts +12 -0
- package/dist/shared/summarize/index.js +12 -0
- package/dist/shared/summarize/scene.d.ts +38 -0
- package/dist/shared/summarize/scene.js +42 -0
- package/dist/shared/summarize/sceneIds.d.ts +17 -0
- package/dist/shared/summarize/sceneIds.js +17 -0
- package/dist/shared/summarize/summarizeScene.d.ts +113 -0
- package/dist/shared/summarize/summarizeScene.js +234 -0
- package/dist/shared/summarize/summarizeSpec.d.ts +54 -0
- package/dist/{summarize.js → shared/summarize/summarizeSpec.js} +23 -53
- package/dist/shared/summarize/world.d.ts +8 -0
- package/dist/shared/summarize/world.js +9 -0
- package/dist/shared/timePasses.d.ts +56 -0
- package/dist/shared/timePasses.js +86 -0
- package/dist/{toolLoop.d.ts → shared/toolLoop.d.ts} +25 -3
- package/dist/{toolLoop.js → shared/toolLoop.js} +70 -14
- package/dist/shared/ui/actions/index.d.ts +117 -0
- package/dist/shared/ui/actions/index.js +154 -0
- package/dist/shared/ui/album/index.d.ts +115 -0
- package/dist/shared/ui/album/index.js +178 -0
- package/dist/shared/ui/annex/index.d.ts +163 -0
- package/dist/shared/ui/annex/index.js +273 -0
- package/dist/shared/ui/attendance/index.d.ts +97 -0
- package/dist/shared/ui/attendance/index.js +89 -0
- package/dist/shared/ui/backdrop/index.d.ts +78 -0
- package/dist/shared/ui/backdrop/index.js +98 -0
- package/dist/shared/ui/chronicle/index.d.ts +230 -0
- package/dist/shared/ui/chronicle/index.js +249 -0
- package/dist/shared/ui/conversation/dossier.d.ts +33 -0
- package/dist/shared/ui/conversation/dossier.js +31 -0
- package/dist/{ui/sessions → shared/ui}/conversation/index.d.ts +2 -1
- package/dist/{ui/sessions → shared/ui}/conversation/index.js +3 -1
- package/dist/{ui/sessions → shared/ui}/conversation/messageVerbState.d.ts +1 -1
- package/dist/shared/ui/conversation/storyDays.d.ts +21 -0
- package/dist/shared/ui/conversation/storyDays.js +23 -0
- package/dist/{ui/sessions → shared/ui}/coreWidgetsEntry.d.ts +1 -1
- package/dist/{ui/sessions → shared/ui}/coreWidgetsEntry.js +1 -1
- package/dist/{ui/sessions → shared/ui}/lore-entries/index.d.ts +2 -2
- package/dist/shared/ui/places/index.d.ts +148 -0
- package/dist/shared/ui/places/index.js +249 -0
- package/dist/{ui/sessions → shared/ui}/scene-portraits/index.d.ts +1 -1
- package/dist/{ui/sessions → shared/ui}/scene-portraits/index.js +1 -1
- package/dist/shared/ui/scene-portraits/portraits.d.ts +191 -0
- package/dist/shared/ui/scene-portraits/portraits.js +223 -0
- package/dist/shared/ui/session-state/index.d.ts +16 -0
- package/dist/shared/ui/session-state/index.js +16 -0
- package/dist/{ui/sessions → shared/ui}/session-state/shapes.d.ts +2 -2
- package/dist/shared/ui/session-state/stateView.d.ts +249 -0
- package/dist/shared/ui/session-state/stateView.js +247 -0
- package/dist/shared/ui/turn-order/index.d.ts +146 -0
- package/dist/shared/ui/turn-order/index.js +257 -0
- package/dist/{ui/sessions → shared/ui}/widgetContext.d.ts +19 -10
- package/package.json +69 -30
- package/components/sessions/messages/SessionContainer.svelte +0 -459
- package/components/sessions/scene-portraits/ScenePortraitsWidget.svelte +0 -249
- package/components/sessions/stats/StatsWidget.svelte +0 -112
- package/components/sessions/world-state/WorldStateWidget.svelte +0 -112
- package/components/sessions/world-state/world-state.ts +0 -10
- package/dist/adventureActions.d.ts +0 -169
- package/dist/adventureActions.js +0 -599
- package/dist/createChat.d.ts +0 -7
- package/dist/generateImage.d.ts +0 -7
- package/dist/lairActions.d.ts +0 -296
- package/dist/lairActions.js +0 -1287
- package/dist/respond.d.ts +0 -24
- package/dist/sprites.d.ts +0 -24
- package/dist/sprites.js +0 -102
- package/dist/summarize.d.ts +0 -76
- package/dist/ui/sessions/conversation/dossier.d.ts +0 -328
- package/dist/ui/sessions/conversation/dossier.js +0 -31
- package/dist/ui/sessions/scene-portraits/portraits.d.ts +0 -95
- package/dist/ui/sessions/scene-portraits/portraits.js +0 -115
- package/dist/ui/sessions/session-state/index.d.ts +0 -15
- package/dist/ui/sessions/session-state/index.js +0 -15
- package/dist/ui/sessions/session-state/stateView.d.ts +0 -155
- package/dist/ui/sessions/session-state/stateView.js +0 -141
- package/dist/ui/sessions/widgets.js +0 -567
- package/components/{sessions → genres/chat}/authors-note/authors-note.ts +0 -0
- package/components/{sessions/shared → shared}/context.ts +0 -0
- package/components/{sessions → shared}/lore-entries/lore-entries.ts +0 -0
- package/components/{sessions → shared}/messages/MessageBlocksView.svelte +0 -0
- package/components/{sessions → shared}/messages/MessageMediaStrip.svelte +0 -0
- package/components/{sessions → shared}/messages/MessagePartsView.svelte +0 -0
- package/components/{sessions → shared}/messages/StateProposalList.svelte +0 -0
- package/components/{sessions → shared}/messages/mediaStrip.ts +0 -0
- package/components/{sessions → shared}/messages/messages.ts +0 -0
- package/components/{sessions → shared}/scene-portraits/StatBars.svelte +0 -0
- package/components/{sessions → shared}/scene-portraits/scene-portraits.ts +0 -0
- package/components/{sessions → shared}/state/entryFinder.ts +0 -0
- package/components/{sessions → shared}/state/slotWriter.svelte.ts +0 -0
- package/dist/components/{shared-RJDGOAVC.js → shared-FTRGUE7G.js} +78 -78
- /package/dist/{ui/sessions → genres/chat/ui}/authors-note/index.js +0 -0
- /package/dist/{entries.js → registry/entries.js} +0 -0
- /package/dist/{genres.d.ts → registry/genres.d.ts} +0 -0
- /package/dist/{slots.d.ts → registry/slots.d.ts} +0 -0
- /package/dist/{slots.js → registry/slots.js} +0 -0
- /package/dist/{statShapes.d.ts → registry/statShapes.d.ts} +0 -0
- /package/dist/{statShapes.js → registry/statShapes.js} +0 -0
- /package/dist/{guideMascotImage.d.ts → seed/guideMascotImage.d.ts} +0 -0
- /package/dist/{guideMascotImage.js → seed/guideMascotImage.js} +0 -0
- /package/dist/{presets.d.ts → seed/presets.d.ts} +0 -0
- /package/dist/{graphBuild.d.ts → shared/graphBuild.d.ts} +0 -0
- /package/dist/{graphBuild.js → shared/graphBuild.js} +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/actionsDisclosure.d.ts +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/actionsDisclosure.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/composerTray.d.ts +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/composerTray.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/formAnswer.d.ts +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/formAnswer.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/itemValues.d.ts +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/itemValues.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/messageOrder.d.ts +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/messageOrder.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/messageSpeaker.d.ts +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/messageSpeaker.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/messageVerbState.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/slashPalette.d.ts +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/slashPalette.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/text.d.ts +0 -0
- /package/dist/{ui/sessions → shared/ui}/conversation/text.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/lore-entries/index.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/session-state/barMath.d.ts +0 -0
- /package/dist/{ui/sessions → shared/ui}/session-state/barMath.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/session-state/shapes.js +0 -0
- /package/dist/{ui/sessions → shared/ui}/widgetContext.js +0 -0
|
@@ -49,14 +49,6 @@
|
|
|
49
49
|
import { S } from '@serene-pub/sdk';
|
|
50
50
|
import type { Descriptor, GenreDecl, SpecDocument } from '@serene-pub/sdk';
|
|
51
51
|
/** @experimental */
|
|
52
|
-
export declare const CHAT_TURN_ORDER_SPEC_ID = "core:spec/chat-turn-order";
|
|
53
|
-
/** @experimental */
|
|
54
|
-
export declare const GUIDE_TURN_ORDER_SPEC_ID = "core:spec/guide-turn-order";
|
|
55
|
-
/** @experimental */
|
|
56
|
-
export declare const ADVENTURE_TURN_ORDER_SPEC_ID = "core:spec/adventure-turn-order";
|
|
57
|
-
/** @experimental */
|
|
58
|
-
export declare const LAIR_TURN_ORDER_SPEC_ID = "core:spec/lair-turn-order";
|
|
59
|
-
/** @experimental */
|
|
60
52
|
export declare const TURN_ORDER_VERSION = "1.0.0";
|
|
61
53
|
/**
|
|
62
54
|
* The nine events a cast genre recomputes on (§4.5).
|
|
@@ -207,19 +199,5 @@ export interface TurnOrderHandle {
|
|
|
207
199
|
/** The node key the genre's Turn order control swaps — read this, never assume `strategy` (R26, M4). */
|
|
208
200
|
strategyNode: string;
|
|
209
201
|
}
|
|
210
|
-
/** Chat's turn order, by value — hand `build()` and `strategyNode` to `swaps` (R26). @experimental */
|
|
211
|
-
export declare const chatTurnOrder: TurnOrderHandle;
|
|
212
|
-
/** Guide's turn order, by value — hand `build()` and `strategyNode` to `swaps` (R26). @experimental */
|
|
213
|
-
export declare const guideTurnOrder: TurnOrderHandle;
|
|
214
|
-
/** Adventure's turn order, by value — hand `build()` and `strategyNode` to `swaps` (R26). @experimental */
|
|
215
|
-
export declare const adventureTurnOrder: TurnOrderHandle;
|
|
216
|
-
/** The Lair's turn order, by value — hand `build()` and `strategyNode` to `swaps` (R26). @experimental */
|
|
217
|
-
export declare const lairTurnOrder: TurnOrderHandle;
|
|
218
|
-
/**
|
|
219
|
-
* Core's four (§4.14's table): which genre gets which spec, on which events —
|
|
220
|
-
* what the presets bind and what `CORE_SPECS` publishes.
|
|
221
|
-
* @experimental
|
|
222
|
-
*/
|
|
223
|
-
export declare const TURN_ORDER_BY_GENRE: ReadonlyArray<TurnOrderHandle>;
|
|
224
202
|
export {};
|
|
225
203
|
//# sourceMappingURL=turnOrder.d.ts.map
|
|
@@ -48,16 +48,6 @@
|
|
|
48
48
|
*/
|
|
49
49
|
import { compile, slot, spec, sessionEvents } from '@serene-pub/sdk';
|
|
50
50
|
import * as C from '@serene-pub/contracts';
|
|
51
|
-
import { chatGenre, guideGenre } from './genres.js';
|
|
52
|
-
import { adventureGenre, lairGenre } from './genres.js';
|
|
53
|
-
/** @experimental */
|
|
54
|
-
export const CHAT_TURN_ORDER_SPEC_ID = 'core:spec/chat-turn-order';
|
|
55
|
-
/** @experimental */
|
|
56
|
-
export const GUIDE_TURN_ORDER_SPEC_ID = 'core:spec/guide-turn-order';
|
|
57
|
-
/** @experimental */
|
|
58
|
-
export const ADVENTURE_TURN_ORDER_SPEC_ID = 'core:spec/adventure-turn-order';
|
|
59
|
-
/** @experimental */
|
|
60
|
-
export const LAIR_TURN_ORDER_SPEC_ID = 'core:spec/lair-turn-order';
|
|
61
51
|
/** @experimental */
|
|
62
52
|
export const TURN_ORDER_VERSION = '1.0.0';
|
|
63
53
|
/**
|
|
@@ -148,9 +138,11 @@ export function turnOrderSpec(opts) {
|
|
|
148
138
|
* who has already spoken; the cast rides on the inlet in the settings
|
|
149
139
|
* document (§4.12), resolved after the write that caused this event.
|
|
150
140
|
* `pool` decides who may be seated at all; `mentioned` (R8) moves whoever
|
|
151
|
-
* was named to the front without changing who is in.
|
|
141
|
+
* was named to the front without changing who is in. `maintenance`
|
|
142
|
+
* because it is a background lane (ruled 2026-10-05): it runs after the
|
|
143
|
+
* turn, off its critical path, and carries no turn of its own.
|
|
152
144
|
*/
|
|
153
|
-
const upToMentioned = spec(id, { version, taxonomy: { role: '
|
|
145
|
+
const upToMentioned = spec(id, { version, taxonomy: { role: 'maintenance' } })
|
|
154
146
|
.inlet('event', C.sessionEvent.v1(), { genre, events: [...events] })
|
|
155
147
|
.query('history', ($) => C.sessionHistory.v1({ scope: $.event.sessionScope, params: slot.params() }))
|
|
156
148
|
.task('pool', ($) => C.turnPool.v1({ cast: $.event.cast, messages: $.history.main, params: slot.params() }), controls)
|
|
@@ -201,96 +193,4 @@ export function turnOrderSpec(opts) {
|
|
|
201
193
|
}
|
|
202
194
|
/** The key of the node a turn-order spec's Turn order control swaps (M4): `strategy`, or `decide.rules.strategy` with a model path. @experimental */
|
|
203
195
|
export const turnStrategyNode = (opts) => opts.advise ? 'decide.rules.strategy' : 'strategy';
|
|
204
|
-
/** Built once, on first use — a preset reads it at import, `CORE_SPECS` whenever it publishes. */
|
|
205
|
-
const once = (build) => {
|
|
206
|
-
let doc;
|
|
207
|
-
return () => (doc ??= build());
|
|
208
|
-
};
|
|
209
|
-
/** Every core turn strategy but round robin, in the order chat's control lists them. */
|
|
210
|
-
const CHAT_SWAPS = [C.turnUserSplit, C.turnRandom, C.turnScripted, C.turnManual, C.turnNarrator];
|
|
211
|
-
/** Guide: its one in-turn envoy is the whole order. */
|
|
212
|
-
const ENVOY_ONLY = { characters: 'none', envoys: 'in-turn' };
|
|
213
|
-
/** The planner genres: nobody is seated — the one entry is the pipeline's own voice. */
|
|
214
|
-
const NOBODY = { characters: 'none', envoys: 'none' };
|
|
215
|
-
/**
|
|
216
|
-
* 🚧 The Lair: its active delvers are seated (owner ruling 2026-09-30, "they
|
|
217
|
-
* are character turns"). The narrator strategy still seats nobody by rule;
|
|
218
|
-
* what the pool admits is who a standing turn plan may prepare a character
|
|
219
|
-
* turn for, since an entry naming somebody the pool did not admit is dropped
|
|
220
|
-
* at the write. Envoys stay out: the Castellan's turns are the null entry's.
|
|
221
|
-
*/
|
|
222
|
-
const PARTY = { characters: 'active', envoys: 'none' };
|
|
223
|
-
/** Chat's turn order, by value — hand `build()` and `strategyNode` to `swaps` (R26). @experimental */
|
|
224
|
-
export const chatTurnOrder = {
|
|
225
|
-
genre: chatGenre,
|
|
226
|
-
spec: CHAT_TURN_ORDER_SPEC_ID,
|
|
227
|
-
events: TURN_ORDER_EVENTS,
|
|
228
|
-
build: once(() => turnOrderSpec({
|
|
229
|
-
id: CHAT_TURN_ORDER_SPEC_ID,
|
|
230
|
-
genre: chatGenre,
|
|
231
|
-
events: TURN_ORDER_EVENTS,
|
|
232
|
-
strategy: C.turnRoundRobin,
|
|
233
|
-
swaps: CHAT_SWAPS,
|
|
234
|
-
// The optional model path (R41, M4): chat declares `turnMode`.
|
|
235
|
-
advise: C.turnAdvise,
|
|
236
|
-
})),
|
|
237
|
-
strategyNode: turnStrategyNode({ advise: C.turnAdvise }),
|
|
238
|
-
};
|
|
239
|
-
/** Guide's turn order, by value — hand `build()` and `strategyNode` to `swaps` (R26). @experimental */
|
|
240
|
-
export const guideTurnOrder = {
|
|
241
|
-
genre: guideGenre,
|
|
242
|
-
spec: GUIDE_TURN_ORDER_SPEC_ID,
|
|
243
|
-
events: TURN_ORDER_EVENTS,
|
|
244
|
-
build: once(() => turnOrderSpec({
|
|
245
|
-
id: GUIDE_TURN_ORDER_SPEC_ID,
|
|
246
|
-
genre: guideGenre,
|
|
247
|
-
events: TURN_ORDER_EVENTS,
|
|
248
|
-
strategy: C.turnRoundRobin,
|
|
249
|
-
pool: ENVOY_ONLY,
|
|
250
|
-
})),
|
|
251
|
-
strategyNode: turnStrategyNode({}),
|
|
252
|
-
};
|
|
253
|
-
/** Adventure's turn order, by value — hand `build()` and `strategyNode` to `swaps` (R26). @experimental */
|
|
254
|
-
export const adventureTurnOrder = {
|
|
255
|
-
genre: adventureGenre,
|
|
256
|
-
spec: ADVENTURE_TURN_ORDER_SPEC_ID,
|
|
257
|
-
events: TURN_ORDER_NARRATOR_EVENTS,
|
|
258
|
-
build: once(() => turnOrderSpec({
|
|
259
|
-
id: ADVENTURE_TURN_ORDER_SPEC_ID,
|
|
260
|
-
genre: adventureGenre,
|
|
261
|
-
events: TURN_ORDER_NARRATOR_EVENTS,
|
|
262
|
-
strategy: C.turnNarrator,
|
|
263
|
-
pool: NOBODY,
|
|
264
|
-
})),
|
|
265
|
-
strategyNode: turnStrategyNode({}),
|
|
266
|
-
};
|
|
267
|
-
/** The Lair's turn order, by value — hand `build()` and `strategyNode` to `swaps` (R26). @experimental */
|
|
268
|
-
export const lairTurnOrder = {
|
|
269
|
-
genre: lairGenre,
|
|
270
|
-
spec: LAIR_TURN_ORDER_SPEC_ID,
|
|
271
|
-
events: TURN_ORDER_NARRATOR_EVENTS,
|
|
272
|
-
build: once(() => turnOrderSpec({
|
|
273
|
-
id: LAIR_TURN_ORDER_SPEC_ID,
|
|
274
|
-
genre: lairGenre,
|
|
275
|
-
events: TURN_ORDER_NARRATOR_EVENTS,
|
|
276
|
-
strategy: C.turnNarrator,
|
|
277
|
-
// The delvers its plans name take character turns.
|
|
278
|
-
pool: PARTY,
|
|
279
|
-
// Every channel (R6): a line on the Sanctum prepares the
|
|
280
|
-
// Castellan's reply there, as a line on `main` prepares its turn.
|
|
281
|
-
historyChannel: '*',
|
|
282
|
-
})),
|
|
283
|
-
strategyNode: turnStrategyNode({}),
|
|
284
|
-
};
|
|
285
|
-
/**
|
|
286
|
-
* Core's four (§4.14's table): which genre gets which spec, on which events —
|
|
287
|
-
* what the presets bind and what `CORE_SPECS` publishes.
|
|
288
|
-
* @experimental
|
|
289
|
-
*/
|
|
290
|
-
export const TURN_ORDER_BY_GENRE = [
|
|
291
|
-
chatTurnOrder,
|
|
292
|
-
guideTurnOrder,
|
|
293
|
-
adventureTurnOrder,
|
|
294
|
-
lairTurnOrder,
|
|
295
|
-
];
|
|
296
196
|
//# sourceMappingURL=turnOrder.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adventure's **Time passes…** action. The genre's actions are introduced in
|
|
3
|
+
* `index.ts`.
|
|
4
|
+
*
|
|
5
|
+
* 🚧 Since live scenes §6 (2026-10-13) the press collects the amount on the
|
|
6
|
+
* stepper every genre's *Time passes…* shares (`TIME_PASSES_COLLECTS`), so
|
|
7
|
+
* how much time passes is the player's: the state-keeper still reports what
|
|
8
|
+
* the world does (the time of day, the weather), and then the session's story
|
|
9
|
+
* clock moves by the step (`keeperAction`'s `clock` option). Edited in place:
|
|
10
|
+
* the document changed, so its hash moves (`specHashes.test.ts`).
|
|
11
|
+
*/
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare const ADVENTURE_ADVANCE_TIME_SPEC_ID = "core:spec/adventure-advance-time";
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const ADVENTURE_ADVANCE_TIME_VERSION = "1.0.0";
|
|
16
|
+
/** Let time pass: the story clock moves by the player's amount, and the weather may turn with it. @internal */
|
|
17
|
+
export declare const adventureAdvanceTimeSpec: () => import("@serene-pub/sdk").SpecDocument;
|
|
18
|
+
//# sourceMappingURL=advanceTime.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adventure's **Time passes…** action. The genre's actions are introduced in
|
|
3
|
+
* `index.ts`.
|
|
4
|
+
*
|
|
5
|
+
* 🚧 Since live scenes §6 (2026-10-13) the press collects the amount on the
|
|
6
|
+
* stepper every genre's *Time passes…* shares (`TIME_PASSES_COLLECTS`), so
|
|
7
|
+
* how much time passes is the player's: the state-keeper still reports what
|
|
8
|
+
* the world does (the time of day, the weather), and then the session's story
|
|
9
|
+
* clock moves by the step (`keeperAction`'s `clock` option). Edited in place:
|
|
10
|
+
* the document changed, so its hash moves (`specHashes.test.ts`).
|
|
11
|
+
*/
|
|
12
|
+
import { keeperAction } from './keeperAction.js';
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const ADVENTURE_ADVANCE_TIME_SPEC_ID = 'core:spec/adventure-advance-time';
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ADVENTURE_ADVANCE_TIME_VERSION = '1.0.0';
|
|
17
|
+
/** Let time pass: the story clock moves by the player's amount, and the weather may turn with it. @internal */
|
|
18
|
+
export const adventureAdvanceTimeSpec = () => keeperAction(ADVENTURE_ADVANCE_TIME_SPEC_ID, ADVENTURE_ADVANCE_TIME_VERSION, {
|
|
19
|
+
key: 'advance-time',
|
|
20
|
+
icon: 'clock',
|
|
21
|
+
label: 'Time passes…',
|
|
22
|
+
description: 'Let an amount of time you choose pass in the world; the weather may change with it.',
|
|
23
|
+
}, { clock: true });
|
|
24
|
+
//# sourceMappingURL=advanceTime.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adventure's **Answer**: what an option of `ask.ts`'s question fires. The genre's
|
|
3
|
+
* actions are introduced in `index.ts`.
|
|
4
|
+
*/
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare const ADVENTURE_ANSWER_SPEC_ID = "core:spec/adventure-answer";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const ADVENTURE_ANSWER_VERSION = "1.0.0";
|
|
9
|
+
/**
|
|
10
|
+
* **Answer**: what a form's option fires — the addressee's line, as the
|
|
11
|
+
* addressee. `read-answer` takes the press apart (the chosen option's label,
|
|
12
|
+
* who answered and their character row) and `create-message` posts the
|
|
13
|
+
* label as that participant's message. A person portraying the addressee
|
|
14
|
+
* clicks and the row is theirs; the answer pipeline commits an oracle's
|
|
15
|
+
* choice and the row is the AI's — same spec, same row, either way, which
|
|
16
|
+
* is the whole of "exactly as a click would".
|
|
17
|
+
*
|
|
18
|
+
* Declared on its own spec rather than folded into `ask`: a spec has one
|
|
19
|
+
* inlet and one graph, and asking and answering are two graphs.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare const adventureAnswerSpec: () => import("@serene-pub/sdk").SpecDocument;
|
|
23
|
+
//# sourceMappingURL=answer.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adventure's **Answer**: what an option of `ask.ts`'s question fires. The genre's
|
|
3
|
+
* actions are introduced in `index.ts`.
|
|
4
|
+
*/
|
|
5
|
+
import { compile, spec, sessionEvents } from '@serene-pub/sdk';
|
|
6
|
+
import * as C from '@serene-pub/contracts';
|
|
7
|
+
import { adventureGenre } from '../../registry/genres.js';
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const ADVENTURE_ANSWER_SPEC_ID = 'core:spec/adventure-answer';
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ADVENTURE_ANSWER_VERSION = '1.0.0';
|
|
12
|
+
/**
|
|
13
|
+
* **Answer**: what a form's option fires — the addressee's line, as the
|
|
14
|
+
* addressee. `read-answer` takes the press apart (the chosen option's label,
|
|
15
|
+
* who answered and their character row) and `create-message` posts the
|
|
16
|
+
* label as that participant's message. A person portraying the addressee
|
|
17
|
+
* clicks and the row is theirs; the answer pipeline commits an oracle's
|
|
18
|
+
* choice and the row is the AI's — same spec, same row, either way, which
|
|
19
|
+
* is the whole of "exactly as a click would".
|
|
20
|
+
*
|
|
21
|
+
* Declared on its own spec rather than folded into `ask`: a spec has one
|
|
22
|
+
* inlet and one graph, and asking and answering are two graphs.
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export const adventureAnswerSpec = () => compile(spec(ADVENTURE_ANSWER_SPEC_ID, {
|
|
26
|
+
version: ADVENTURE_ANSWER_VERSION,
|
|
27
|
+
taxonomy: { role: 'action' },
|
|
28
|
+
contributes: {
|
|
29
|
+
actions: [
|
|
30
|
+
{
|
|
31
|
+
key: 'answer',
|
|
32
|
+
/**
|
|
33
|
+
* Carried by a block in a message and pressed from that
|
|
34
|
+
* block alone: the `form` venue (U5d review, S1) is the
|
|
35
|
+
* one no listing offers, so *Answer* is in no message's
|
|
36
|
+
* overflow and no composer menu — a question is answered
|
|
37
|
+
* where it was asked. The block's fire still resolves it.
|
|
38
|
+
*/
|
|
39
|
+
venue: { kind: 'form' },
|
|
40
|
+
audience: { see: ['participant'], act: ['participant'] },
|
|
41
|
+
icon: 'message-circle-reply',
|
|
42
|
+
label: { en: 'Answer' },
|
|
43
|
+
description: { en: 'Answer a question the narrator put to you.' },
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
47
|
+
})
|
|
48
|
+
.inlet('input', C.userMessage.v1(), {
|
|
49
|
+
genre: adventureGenre,
|
|
50
|
+
event: sessionEvents.sessionAction,
|
|
51
|
+
})
|
|
52
|
+
.task('answer', ($) => C.readAnswer.v1({ payload: $.input.payload, form: $.input.form }))
|
|
53
|
+
.outlet('save', ($) => C.createMessage.v1({
|
|
54
|
+
text: $.answer.label,
|
|
55
|
+
characterId: $.answer.characterId,
|
|
56
|
+
speaker: $.answer.addressee,
|
|
57
|
+
}))
|
|
58
|
+
.build());
|
|
59
|
+
//# sourceMappingURL=answer.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adventure's answer pipeline: `answerFormSpec` (`factories/answerForm.ts`),
|
|
3
|
+
* published for Adventure.
|
|
4
|
+
*/
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare const ADVENTURE_ANSWER_FORM_SPEC_ID = "core:spec/adventure-answer-form";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const answerFormAdventureSpec: () => import("@serene-pub/sdk").SpecDocument;
|
|
9
|
+
//# sourceMappingURL=answerForm.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adventure's answer pipeline: `answerFormSpec` (`factories/answerForm.ts`),
|
|
3
|
+
* published for Adventure.
|
|
4
|
+
*/
|
|
5
|
+
import { adventureGenre } from '../../registry/genres.js';
|
|
6
|
+
import { answerFormSpec } from '../../factories/answerForm.js';
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ADVENTURE_ANSWER_FORM_SPEC_ID = 'core:spec/adventure-answer-form';
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const answerFormAdventureSpec = () => answerFormSpec(ADVENTURE_ANSWER_FORM_SPEC_ID, adventureGenre);
|
|
11
|
+
//# sourceMappingURL=answerForm.js.map
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adventure's **Ask** action: the narrator asks, the cast answers (`answer.ts`).
|
|
3
|
+
* The genre's actions are introduced in `index.ts`.
|
|
4
|
+
*/
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare const ADVENTURE_ASK_SPEC_ID = "core:spec/adventure-ask";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const ADVENTURE_ASK_VERSION = "1.0.0";
|
|
9
|
+
/**
|
|
10
|
+
* What the narrator's question comes back as, from `generate-json@1`.
|
|
11
|
+
*
|
|
12
|
+
* The addressee is a **name** rather than a participant reference: the
|
|
13
|
+
* model reads names off the transcript, and `make-choices@1` resolves
|
|
14
|
+
* the name — against the cast first, then the members' presences, by
|
|
15
|
+
* name or nickname — into `character:<id>` at the write. A name that
|
|
16
|
+
* resolves to nobody leaves the block unaddressed; a press on an
|
|
17
|
+
* unaddressed block is answered as the presser (their presence when
|
|
18
|
+
* they hold one, else their own line).
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare const ADVENTURE_ASK_SCHEMA: {
|
|
22
|
+
readonly type: "object";
|
|
23
|
+
readonly properties: {
|
|
24
|
+
readonly addressee: {
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
};
|
|
27
|
+
readonly question: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
};
|
|
30
|
+
readonly options: {
|
|
31
|
+
readonly type: "array";
|
|
32
|
+
readonly minItems: 2;
|
|
33
|
+
readonly maxItems: 4;
|
|
34
|
+
readonly items: {
|
|
35
|
+
readonly type: "object";
|
|
36
|
+
readonly properties: {
|
|
37
|
+
readonly key: {
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
};
|
|
40
|
+
readonly label: {
|
|
41
|
+
readonly type: "string";
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
readonly required: readonly ["key", "label"];
|
|
45
|
+
readonly additionalProperties: false;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
readonly required: readonly ["addressee", "question", "options"];
|
|
50
|
+
readonly additionalProperties: false;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* **Ask**: the narrator puts a question with options to one of the cast.
|
|
54
|
+
*
|
|
55
|
+
* The worked form of R-15: the oracle writes `{ addressee, question, options }`,
|
|
56
|
+
* `make-choices` turns it into a `choices` block addressed to that cast
|
|
57
|
+
* member (`character:<id>`) whose options fire `answer`, and the narration
|
|
58
|
+
* row carries it. The host stamps the block with this spec's `answer` action
|
|
59
|
+
* and an id at the write; if the run's pinned portrayals say the AI portrays
|
|
60
|
+
* the addressee, it records `form-addressed` and the genre's answer pipeline
|
|
61
|
+
* (`core:spec/adventure-answer-form`) answers as them — else the block waits
|
|
62
|
+
* for the person portraying them to click. Either way the click, real or
|
|
63
|
+
* committed, runs `adventure-answer` below.
|
|
64
|
+
*
|
|
65
|
+
* Two actions on one spec, each its own thing to the venue model: `ask` is
|
|
66
|
+
* the composer's chip and `/ask`; `answer` is what the block's options fire,
|
|
67
|
+
* declared here so the block has an identity to be stamped with. `answer`
|
|
68
|
+
* is offered to any participant — the form's **addressee** is who may
|
|
69
|
+
* actually press it, decided per block at the fire.
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
export declare const adventureAskSpec: () => import("@serene-pub/sdk").SpecDocument;
|
|
73
|
+
//# sourceMappingURL=ask.d.ts.map
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adventure's **Ask** action: the narrator asks, the cast answers (`answer.ts`).
|
|
3
|
+
* The genre's actions are introduced in `index.ts`.
|
|
4
|
+
*/
|
|
5
|
+
import { compile, slot, spec, sessionEvents } from '@serene-pub/sdk';
|
|
6
|
+
import * as C from '@serene-pub/contracts';
|
|
7
|
+
import { adventureGenre } from '../../registry/genres.js';
|
|
8
|
+
import { ADVENTURE_ANSWER_SPEC_ID } from './answer.js';
|
|
9
|
+
/* ── ask / answer: the worked form (plans/29 R-15 *Forms*; 30 §U5d) ──────── */
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ADVENTURE_ASK_SPEC_ID = 'core:spec/adventure-ask';
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ADVENTURE_ASK_VERSION = '1.0.0';
|
|
14
|
+
/**
|
|
15
|
+
* What the narrator's question comes back as, from `generate-json@1`.
|
|
16
|
+
*
|
|
17
|
+
* The addressee is a **name** rather than a participant reference: the
|
|
18
|
+
* model reads names off the transcript, and `make-choices@1` resolves
|
|
19
|
+
* the name — against the cast first, then the members' presences, by
|
|
20
|
+
* name or nickname — into `character:<id>` at the write. A name that
|
|
21
|
+
* resolves to nobody leaves the block unaddressed; a press on an
|
|
22
|
+
* unaddressed block is answered as the presser (their presence when
|
|
23
|
+
* they hold one, else their own line).
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export const ADVENTURE_ASK_SCHEMA = {
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
addressee: { type: 'string' },
|
|
30
|
+
question: { type: 'string' },
|
|
31
|
+
options: {
|
|
32
|
+
type: 'array',
|
|
33
|
+
minItems: 2,
|
|
34
|
+
maxItems: 4,
|
|
35
|
+
items: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: { key: { type: 'string' }, label: { type: 'string' } },
|
|
38
|
+
required: ['key', 'label'],
|
|
39
|
+
additionalProperties: false,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
required: ['addressee', 'question', 'options'],
|
|
44
|
+
additionalProperties: false,
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* **Ask**: the narrator puts a question with options to one of the cast.
|
|
48
|
+
*
|
|
49
|
+
* The worked form of R-15: the oracle writes `{ addressee, question, options }`,
|
|
50
|
+
* `make-choices` turns it into a `choices` block addressed to that cast
|
|
51
|
+
* member (`character:<id>`) whose options fire `answer`, and the narration
|
|
52
|
+
* row carries it. The host stamps the block with this spec's `answer` action
|
|
53
|
+
* and an id at the write; if the run's pinned portrayals say the AI portrays
|
|
54
|
+
* the addressee, it records `form-addressed` and the genre's answer pipeline
|
|
55
|
+
* (`core:spec/adventure-answer-form`) answers as them — else the block waits
|
|
56
|
+
* for the person portraying them to click. Either way the click, real or
|
|
57
|
+
* committed, runs `adventure-answer` below.
|
|
58
|
+
*
|
|
59
|
+
* Two actions on one spec, each its own thing to the venue model: `ask` is
|
|
60
|
+
* the composer's chip and `/ask`; `answer` is what the block's options fire,
|
|
61
|
+
* declared here so the block has an identity to be stamped with. `answer`
|
|
62
|
+
* is offered to any participant — the form's **addressee** is who may
|
|
63
|
+
* actually press it, decided per block at the fire.
|
|
64
|
+
* @internal
|
|
65
|
+
*/
|
|
66
|
+
export const adventureAskSpec = () => compile(spec(ADVENTURE_ASK_SPEC_ID, {
|
|
67
|
+
version: ADVENTURE_ASK_VERSION,
|
|
68
|
+
taxonomy: { role: 'action' },
|
|
69
|
+
contributes: {
|
|
70
|
+
actions: [
|
|
71
|
+
{
|
|
72
|
+
key: 'ask',
|
|
73
|
+
venue: { kind: 'composer' },
|
|
74
|
+
quick: true,
|
|
75
|
+
icon: 'message-circle-question',
|
|
76
|
+
label: { en: 'Ask' },
|
|
77
|
+
description: { en: 'The narrator puts a question, with choices, to one of the cast.' },
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
})
|
|
82
|
+
.inlet('input', C.userMessage.v1(), {
|
|
83
|
+
genre: adventureGenre,
|
|
84
|
+
event: sessionEvents.sessionAction,
|
|
85
|
+
})
|
|
86
|
+
.gather('gather', { mode: 'parallel' }, (b) => b
|
|
87
|
+
.chain('history', (c) => c.query('read', ($) => C.sessionHistory.v1({
|
|
88
|
+
scope: $.input.sessionScope,
|
|
89
|
+
params: slot.params(),
|
|
90
|
+
})))
|
|
91
|
+
.chain('cast', (c) => c.query('read', ($) => C.sessionCast.v1({ scope: $.input.sessionScope }))))
|
|
92
|
+
.task('contextBudget', ($) => C.contextBudget.v1({
|
|
93
|
+
sampling: slot.samplingOf('write'),
|
|
94
|
+
connection: slot.connectionOf('write'),
|
|
95
|
+
params: slot.params(),
|
|
96
|
+
}))
|
|
97
|
+
.task('context', ($) => C.buildNarratorContext.v1({
|
|
98
|
+
cast: $.gather.cast.read.cast,
|
|
99
|
+
prompts: slot.prompts(),
|
|
100
|
+
variables: slot.variables(),
|
|
101
|
+
}))
|
|
102
|
+
/** Prose and no seed — a question is asked, not a turn taken (see the keeper actions). */
|
|
103
|
+
.task('lines', ($) => C.proseTranscript.v1({
|
|
104
|
+
messages: $.gather.history.read.messages,
|
|
105
|
+
cast: $.gather.cast.read.cast,
|
|
106
|
+
templateContext: $.context.templateContext,
|
|
107
|
+
}))
|
|
108
|
+
/**
|
|
109
|
+
* 🚧 **The transcript's files, placed** (attachments follow-ups, owner
|
|
110
|
+
* ruling 2026-10-03) — `respond`'s two steps: the files the rows show,
|
|
111
|
+
* then per line what `write` receives (an image it can read rides its
|
|
112
|
+
* own turn; otherwise its name). A transcript with no files passes
|
|
113
|
+
* through untouched, so the prompt is byte for byte what it was.
|
|
114
|
+
*/
|
|
115
|
+
.query('attachments', ($) => C.historyAttachments.v1({
|
|
116
|
+
messages: $.gather.history.read.messages,
|
|
117
|
+
params: slot.params(),
|
|
118
|
+
}))
|
|
119
|
+
.task('attached', ($) => C.placeAttachments.v1({
|
|
120
|
+
messages: $.lines.messages,
|
|
121
|
+
attachments: $.attachments.attachments,
|
|
122
|
+
connection: slot.connectionOf('write'),
|
|
123
|
+
params: slot.params(),
|
|
124
|
+
}))
|
|
125
|
+
.task('prompt', ($) => C.assemble.v2({
|
|
126
|
+
budget: $.contextBudget.available,
|
|
127
|
+
messages: $.attached.messages,
|
|
128
|
+
templateContext: $.context.templateContext,
|
|
129
|
+
template: slot.template(),
|
|
130
|
+
prompts: slot.prompts({ node: 'context' }),
|
|
131
|
+
variables: slot.variables(),
|
|
132
|
+
params: slot.params(),
|
|
133
|
+
connection: slot.connectionOf('write'),
|
|
134
|
+
}))
|
|
135
|
+
.oracle('write', ($) => C.generateJson.v1({
|
|
136
|
+
context: $.prompt.context,
|
|
137
|
+
schema: ADVENTURE_ASK_SCHEMA,
|
|
138
|
+
connection: slot.connection(),
|
|
139
|
+
sampling: slot.sampling(),
|
|
140
|
+
params: slot.params(),
|
|
141
|
+
}), { expose: { status: 'Posing a question' } })
|
|
142
|
+
.task('choices', ($) => C.makeChoices.v1({
|
|
143
|
+
json: $.write.json,
|
|
144
|
+
fn: 'answer',
|
|
145
|
+
// Answer is the other spec's declaration, named on purpose:
|
|
146
|
+
// the host holds the options to THAT action's audience —
|
|
147
|
+
// the block's addressee — and runs THAT spec on a press.
|
|
148
|
+
action: `${ADVENTURE_ANSWER_SPEC_ID}#answer`,
|
|
149
|
+
cast: $.gather.cast.read.cast,
|
|
150
|
+
}))
|
|
151
|
+
.outlet('save', ($) => C.createMessage.v1({
|
|
152
|
+
narration: true,
|
|
153
|
+
text: $.choices.text,
|
|
154
|
+
blocks: $.choices.blocks,
|
|
155
|
+
}))
|
|
156
|
+
.build());
|
|
157
|
+
//# sourceMappingURL=ask.js.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adventure's create pipeline: make the world (DESIGN-adventure-genre.md). The
|
|
3
|
+
* genre's turn, and the notes both share, are `respond.ts`'s.
|
|
4
|
+
*/
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare const ADVENTURE_CREATE_SPEC_ID = "core:spec/adventure-create";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const ADVENTURE_CREATE_VERSION = "1.0.0";
|
|
9
|
+
/**
|
|
10
|
+
* The genre's one required member: what happens when an Adventure session is
|
|
11
|
+
* created.
|
|
12
|
+
*
|
|
13
|
+
* ## Attaching the slots is writing nothing
|
|
14
|
+
*
|
|
15
|
+
* The design says creation "attaches the lorebook's world slots and each cast
|
|
16
|
+
* member's card config". Resolution already does that by READING: `valueOf`
|
|
17
|
+
* walks session → lorebook → card → declaration default, and absence means
|
|
18
|
+
* inherit. So attaching is materialising rows that say what the declaration
|
|
19
|
+
* already says, and the one thing a seed must never do is write a row nobody
|
|
20
|
+
* asked for — a stored 20 would stop tracking a card that later says 40.
|
|
21
|
+
*
|
|
22
|
+
* What makes the slots appear at all is the genre declaring them (`genreSlots`);
|
|
23
|
+
* this pipeline's job is the greetings, exactly as Chat's is.
|
|
24
|
+
*
|
|
25
|
+
* ## No opening narration, deliberately
|
|
26
|
+
*
|
|
27
|
+
* The design asks for the narrator to run once for the opening scene. It is not
|
|
28
|
+
* here, and the reason is what creating a session is: a synchronous action a
|
|
29
|
+
* person is waiting on. A model call inside it makes "New session" as slow as
|
|
30
|
+
* the slowest backend and fails the whole creation when no connection is set —
|
|
31
|
+
* on the one screen where a new user is most likely to have set none. The
|
|
32
|
+
* opening scene is `core:spec/adventure-look` instead, which is a button.
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare const adventureCreateSpec: () => import("@serene-pub/sdk").SpecDocument;
|
|
36
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Adventure's create pipeline: make the world (DESIGN-adventure-genre.md). The
|
|
3
|
+
* genre's turn, and the notes both share, are `respond.ts`'s.
|
|
4
|
+
*/
|
|
5
|
+
import { compile, spec, sessionEvents } from '@serene-pub/sdk';
|
|
6
|
+
import * as C from '@serene-pub/contracts';
|
|
7
|
+
import { adventureGenre } from '../../registry/genres.js';
|
|
8
|
+
/* ── create ─────────────────────────────────────────────────────────────── */
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const ADVENTURE_CREATE_SPEC_ID = 'core:spec/adventure-create';
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const ADVENTURE_CREATE_VERSION = '1.0.0';
|
|
13
|
+
/**
|
|
14
|
+
* The genre's one required member: what happens when an Adventure session is
|
|
15
|
+
* created.
|
|
16
|
+
*
|
|
17
|
+
* ## Attaching the slots is writing nothing
|
|
18
|
+
*
|
|
19
|
+
* The design says creation "attaches the lorebook's world slots and each cast
|
|
20
|
+
* member's card config". Resolution already does that by READING: `valueOf`
|
|
21
|
+
* walks session → lorebook → card → declaration default, and absence means
|
|
22
|
+
* inherit. So attaching is materialising rows that say what the declaration
|
|
23
|
+
* already says, and the one thing a seed must never do is write a row nobody
|
|
24
|
+
* asked for — a stored 20 would stop tracking a card that later says 40.
|
|
25
|
+
*
|
|
26
|
+
* What makes the slots appear at all is the genre declaring them (`genreSlots`);
|
|
27
|
+
* this pipeline's job is the greetings, exactly as Chat's is.
|
|
28
|
+
*
|
|
29
|
+
* ## No opening narration, deliberately
|
|
30
|
+
*
|
|
31
|
+
* The design asks for the narrator to run once for the opening scene. It is not
|
|
32
|
+
* here, and the reason is what creating a session is: a synchronous action a
|
|
33
|
+
* person is waiting on. A model call inside it makes "New session" as slow as
|
|
34
|
+
* the slowest backend and fails the whole creation when no connection is set —
|
|
35
|
+
* on the one screen where a new user is most likely to have set none. The
|
|
36
|
+
* opening scene is `core:spec/adventure-look` instead, which is a button.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export const adventureCreateSpec = () => compile(spec(ADVENTURE_CREATE_SPEC_ID, {
|
|
40
|
+
version: ADVENTURE_CREATE_VERSION,
|
|
41
|
+
taxonomy: {
|
|
42
|
+
role: 'create',
|
|
43
|
+
},
|
|
44
|
+
genre: {
|
|
45
|
+
name: adventureGenre.name,
|
|
46
|
+
family: adventureGenre.family,
|
|
47
|
+
description: adventureGenre.description,
|
|
48
|
+
shape: adventureGenre.shape,
|
|
49
|
+
events: adventureGenre.events,
|
|
50
|
+
},
|
|
51
|
+
})
|
|
52
|
+
.inlet('input', C.sessionCreated.v1(), {
|
|
53
|
+
genre: adventureGenre,
|
|
54
|
+
event: sessionEvents.sessionCreated,
|
|
55
|
+
})
|
|
56
|
+
.query('collect', ($) => C.sessionGreetings.v1({ scope: $.input.sessionScope }))
|
|
57
|
+
.outlet('seed', ($) => C.seedGreetings.v1({
|
|
58
|
+
greetings: $.collect.greetings,
|
|
59
|
+
channel: adventureGenre.shape?.greeting?.channel ?? 'main',
|
|
60
|
+
}))
|
|
61
|
+
.build());
|
|
62
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** @experimental */
|
|
2
|
+
export declare const ADVENTURE_ILLUSTRATE_SCENE_SPEC_ID = "core:spec/adventure-illustrate-scene";
|
|
3
|
+
/** @internal */
|
|
4
|
+
export declare const ADVENTURE_ILLUSTRATE_SCENE_VERSION = "1.0.0";
|
|
5
|
+
/** @experimental */
|
|
6
|
+
export declare const adventureIllustrateSceneSpec: () => import("@serene-pub/sdk").SpecDocument;
|
|
7
|
+
//# sourceMappingURL=illustrateScene.d.ts.map
|