@serene-pub/sdk 0.6.0-pr-4 → 0.6.0-pr-6

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 (230) hide show
  1. package/README.md +23 -19
  2. package/dist/actions.d.ts +178 -69
  3. package/dist/actions.js +109 -40
  4. package/dist/annexFields.d.ts +12 -5
  5. package/dist/annexFields.js +6 -2
  6. package/dist/announce.d.ts +220 -30
  7. package/dist/announce.js +212 -7
  8. package/dist/attributes.d.ts +290 -11
  9. package/dist/attributes.js +317 -32
  10. package/dist/bands.d.ts +41 -6
  11. package/dist/bands.js +83 -33
  12. package/dist/bridges.d.ts +61 -0
  13. package/dist/bridges.js +112 -0
  14. package/dist/builder.d.ts +436 -106
  15. package/dist/builder.js +389 -46
  16. package/dist/cadences.d.ts +578 -0
  17. package/dist/cadences.js +1111 -0
  18. package/dist/candidates.d.ts +5 -3
  19. package/dist/candidates.js +3 -2
  20. package/dist/capabilities.d.ts +93 -15
  21. package/dist/capabilities.js +57 -6
  22. package/dist/checkMethods.d.ts +240 -0
  23. package/dist/checkMethods.js +362 -0
  24. package/dist/clauses.d.ts +2 -1
  25. package/dist/clauses.js +2 -1
  26. package/dist/component.d.ts +24 -7
  27. package/dist/component.js +16 -6
  28. package/dist/componentBuild.d.ts +16 -5
  29. package/dist/componentBuild.js +14 -5
  30. package/dist/componentClient.d.ts +61 -30
  31. package/dist/componentClient.js +11 -1
  32. package/dist/componentImports.d.ts +8 -5
  33. package/dist/componentImports.js +23 -4
  34. package/dist/componentModule.js +2 -1
  35. package/dist/componentWire.d.ts +2 -1
  36. package/dist/componentWire.js +34 -2
  37. package/dist/composerStates.d.ts +96 -0
  38. package/dist/composerStates.js +190 -0
  39. package/dist/conditions.d.ts +424 -0
  40. package/dist/conditions.js +521 -0
  41. package/dist/config.d.ts +69 -19
  42. package/dist/config.js +64 -26
  43. package/dist/connections.d.ts +9 -4
  44. package/dist/connections.js +7 -4
  45. package/dist/conversions.d.ts +41 -0
  46. package/dist/conversions.js +50 -0
  47. package/dist/declarations.d.ts +70 -18
  48. package/dist/declarations.js +194 -24
  49. package/dist/descriptors.d.ts +427 -100
  50. package/dist/descriptors.js +344 -59
  51. package/dist/dev.d.ts +6 -5
  52. package/dist/dev.js +6 -5
  53. package/dist/document.d.ts +121 -27
  54. package/dist/document.js +77 -24
  55. package/dist/dowry.d.ts +241 -0
  56. package/dist/dowry.js +315 -0
  57. package/dist/engines.d.ts +16 -7
  58. package/dist/engines.js +6 -4
  59. package/dist/entities.d.ts +156 -0
  60. package/dist/entities.js +259 -0
  61. package/dist/eventMapLaws.d.ts +19 -8
  62. package/dist/eventMapLaws.js +9 -6
  63. package/dist/events.d.ts +648 -40
  64. package/dist/events.js +451 -34
  65. package/dist/executor.d.ts +123 -41
  66. package/dist/executor.js +210 -103
  67. package/dist/exposure.d.ts +128 -0
  68. package/dist/exposure.js +168 -0
  69. package/dist/extension.d.ts +99 -35
  70. package/dist/extension.js +43 -9
  71. package/dist/facets.d.ts +2 -1
  72. package/dist/facets.js +4 -2
  73. package/dist/fit.d.ts +198 -0
  74. package/dist/fit.js +351 -0
  75. package/dist/foldedSections.d.ts +4 -2
  76. package/dist/foldedSections.js +2 -1
  77. package/dist/functions.d.ts +554 -0
  78. package/dist/functions.js +712 -0
  79. package/dist/genres.d.ts +408 -130
  80. package/dist/genres.js +412 -108
  81. package/dist/guardedConnection.d.ts +4 -3
  82. package/dist/guardedConnection.js +4 -3
  83. package/dist/handlebarsReach.d.ts +1 -1
  84. package/dist/handlebarsReach.js +1 -1
  85. package/dist/hash.d.ts +16 -5
  86. package/dist/hash.js +14 -4
  87. package/dist/hookGrants.d.ts +4 -3
  88. package/dist/hookGrants.js +7 -5
  89. package/dist/hooks.d.ts +42 -21
  90. package/dist/hooks.js +17 -12
  91. package/dist/hostElements.d.ts +47 -17
  92. package/dist/hostElements.js +62 -17
  93. package/dist/hostState.d.ts +110 -0
  94. package/dist/hostState.js +140 -0
  95. package/dist/i18n.d.ts +5 -3
  96. package/dist/i18n.js +5 -3
  97. package/dist/identity.d.ts +5 -4
  98. package/dist/identity.js +5 -4
  99. package/dist/index.d.ts +26 -0
  100. package/dist/index.js +55 -0
  101. package/dist/jsonSchema.d.ts +178 -0
  102. package/dist/jsonSchema.js +558 -0
  103. package/dist/layout.d.ts +36 -15
  104. package/dist/layout.js +2 -2
  105. package/dist/loadouts.d.ts +97 -0
  106. package/dist/loadouts.js +81 -0
  107. package/dist/media.d.ts +153 -16
  108. package/dist/media.js +47 -2
  109. package/dist/messageBlocks.d.ts +223 -37
  110. package/dist/messageBlocks.js +231 -24
  111. package/dist/migration.d.ts +16 -8
  112. package/dist/migration.js +14 -8
  113. package/dist/names.d.ts +2 -1
  114. package/dist/names.js +2 -1
  115. package/dist/nodeInput.d.ts +2 -1
  116. package/dist/nodeInput.js +2 -1
  117. package/dist/participants.d.ts +54 -24
  118. package/dist/participants.js +27 -14
  119. package/dist/personGate.d.ts +2 -1
  120. package/dist/personGate.js +2 -1
  121. package/dist/pluginHarness.d.ts +22 -35
  122. package/dist/pluginHarness.js +18 -143
  123. package/dist/pluginPermissions.d.ts +2 -1
  124. package/dist/pluginPermissions.js +13 -2
  125. package/dist/pluginRuleRef.d.ts +2 -2
  126. package/dist/pluginRuleRef.js +1 -1
  127. package/dist/predicates.d.ts +16 -11
  128. package/dist/predicates.js +7 -6
  129. package/dist/preview.d.ts +53 -7
  130. package/dist/preview.js +54 -13
  131. package/dist/primers.d.ts +177 -0
  132. package/dist/primers.js +265 -0
  133. package/dist/promptBlocks.d.ts +5 -3
  134. package/dist/promptBlocks.js +5 -3
  135. package/dist/rankingDecisions.d.ts +2 -1
  136. package/dist/rankingDecisions.js +2 -1
  137. package/dist/receipt.d.ts +76 -29
  138. package/dist/receipt.js +9 -4
  139. package/dist/receiverRules.js +3 -2
  140. package/dist/refs.d.ts +42 -9
  141. package/dist/refs.js +45 -13
  142. package/dist/registrations.d.ts +384 -0
  143. package/dist/registrations.js +625 -0
  144. package/dist/registry.d.ts +42 -23
  145. package/dist/registry.js +7 -5
  146. package/dist/repertoires.d.ts +502 -0
  147. package/dist/repertoires.js +666 -0
  148. package/dist/review.d.ts +16 -5
  149. package/dist/review.js +11 -4
  150. package/dist/rulesetDocument.d.ts +95 -0
  151. package/dist/rulesetDocument.js +190 -0
  152. package/dist/rulesetSections.d.ts +597 -0
  153. package/dist/rulesetSections.js +1249 -0
  154. package/dist/rulesetTemplates.d.ts +161 -0
  155. package/dist/rulesetTemplates.js +242 -0
  156. package/dist/rulesets.d.ts +899 -0
  157. package/dist/rulesets.js +1378 -0
  158. package/dist/sampling.d.ts +54 -0
  159. package/dist/sampling.js +95 -3
  160. package/dist/sceneSettings.d.ts +320 -0
  161. package/dist/sceneSettings.js +433 -0
  162. package/dist/scope.d.ts +50 -7
  163. package/dist/scope.js +22 -3
  164. package/dist/scripts.d.ts +112 -22
  165. package/dist/scripts.js +135 -19
  166. package/dist/sessionDossier.d.ts +638 -0
  167. package/dist/sessionDossier.js +33 -0
  168. package/dist/sessionLayout.d.ts +492 -55
  169. package/dist/sessionLayout.js +697 -90
  170. package/dist/sessionSettings.d.ts +32 -5
  171. package/dist/settings.d.ts +66 -20
  172. package/dist/settings.js +19 -12
  173. package/dist/settingsSlot.d.ts +11 -8
  174. package/dist/settingsSlot.js +11 -8
  175. package/dist/shapes.d.ts +139 -37
  176. package/dist/shapes.js +152 -38
  177. package/dist/sheets.d.ts +4 -2
  178. package/dist/sheets.js +6 -3
  179. package/dist/statShapes.d.ts +10 -2
  180. package/dist/statShapes.js +10 -2
  181. package/dist/status.d.ts +27 -9
  182. package/dist/status.js +20 -6
  183. package/dist/storage.d.ts +11 -67
  184. package/dist/storage.js +9 -13
  185. package/dist/storyTime.d.ts +13 -7
  186. package/dist/storyTime.js +11 -6
  187. package/dist/strokes.d.ts +176 -0
  188. package/dist/strokes.js +281 -0
  189. package/dist/surfaces.d.ts +54 -25
  190. package/dist/surfaces.js +3 -3
  191. package/dist/template.d.ts +9 -5
  192. package/dist/template.js +5 -3
  193. package/dist/templateCheck.d.ts +2 -2
  194. package/dist/templateCheck.js +2 -2
  195. package/dist/templateFit.d.ts +37 -8
  196. package/dist/templateFit.js +92 -8
  197. package/dist/templateIds.d.ts +3 -3
  198. package/dist/templateIds.js +3 -3
  199. package/dist/templateScopeAt.d.ts +22 -12
  200. package/dist/templateScopeAt.js +32 -19
  201. package/dist/testing.d.ts +11 -4
  202. package/dist/testing.js +13 -5
  203. package/dist/ties.d.ts +210 -0
  204. package/dist/ties.js +300 -0
  205. package/dist/tokenizers.d.ts +2 -2
  206. package/dist/tokenizers.js +2 -2
  207. package/dist/turnLock.d.ts +4 -2
  208. package/dist/turnLock.js +2 -1
  209. package/dist/turnOrder.d.ts +39 -22
  210. package/dist/turnOrder.js +30 -13
  211. package/dist/validate.d.ts +11 -8
  212. package/dist/validate.js +195 -29
  213. package/dist/values.d.ts +17 -8
  214. package/dist/values.js +11 -6
  215. package/dist/variables.d.ts +46 -7
  216. package/dist/variables.js +87 -6
  217. package/dist/verdicts.d.ts +20 -13
  218. package/dist/verdicts.js +17 -11
  219. package/dist/vocabularies.d.ts +192 -0
  220. package/dist/vocabularies.js +326 -0
  221. package/dist/widgetDecls.d.ts +20 -4
  222. package/dist/widgetDecls.js +6 -2
  223. package/dist/widgets.d.ts +1580 -111
  224. package/dist/widgets.js +113 -18
  225. package/dist/wire.d.ts +13 -6
  226. package/dist/wire.js +3 -3
  227. package/dist/worldinfo.d.ts +11 -6
  228. package/dist/worldinfo.js +8 -4
  229. package/host-elements.d.ts +101 -0
  230. package/package.json +1 -1
package/dist/actions.d.ts CHANGED
@@ -1,11 +1,9 @@
1
1
  /**
2
2
  * Actions — what a person (or an AI-portrayed participant) can invoke, and
3
- * where (plans/29 R-15 *venue* · *audience* · *quick* · *slash name*;
4
- * 09-AMENDMENTS-B B9, F40 — was F38 before the 2026-09-17 renumbering; ruled
5
- * 2026-09-15, built 2026-09-16 as U5c).
3
+ * where (built 2026-09-16).
6
4
  *
7
5
  * A spec contributes actions through `contributes.actions[]`. Core's own message verbs — the floors and the
8
- * built-ins of U5b — are described by the same shape in `CORE_ACTIONS`, so
6
+ * built-ins — are described by the same shape in `CORE_ACTIONS`, so
9
7
  * a client renders **one list** per venue and never hand-writes a verb button.
10
8
  *
11
9
  * ## The four declarations
@@ -22,16 +20,16 @@
22
20
  * - **quick** — the one prominence flag. Every venue is a **primary set**
23
21
  * (`quick: true`) plus an **overflow** that always lists every enabled
24
22
  * action; composer actions are always reachable through `/`. Placement is
25
- * presentation; availability is data (F40). A CSS pack may reposition the
23
+ * presentation; availability is data. A CSS pack may reposition the
26
24
  * primary set, never remove an action.
27
25
  * - **slash** — the stable ASCII id a composer action is called by. Core's
28
26
  * specs claim bare names (`advance`, `narrate`); a plugin's are
29
27
  * `<plugin>.<action>` (`acme.roll`), the plugin id being the spec's
30
28
  * namespace — so a collision across owners is impossible by construction,
31
29
  * and the palette autocompletes so nobody types the long form. Never
32
- * localised (R-20): the palette shows the localised `label` beside it.
30
+ * localised: the palette shows the localised `label` beside it.
33
31
  *
34
- * - **enabled-when** (U5e, built 2026-09-17) — whether the action is offered
32
+ * - **enabled-when** (built 2026-09-17) — whether the action is offered
35
33
  * *now*: a declared predicate over the session's **published values**, the
36
34
  * junction clause's shape (`{ on: 'state.world.location', truthy: true,
37
35
  * reason }`), never code. A list means all must hold. The genre supplies
@@ -44,60 +42,79 @@
44
42
  * ## What this is not
45
43
  *
46
44
  * Not a *pipeline* — an action *starts* one (`function` is the key routing
47
- * resolves, 19 §3). Not an *event* — those are core-owned occurrences. Not
45
+ * resolves). Not an *event* — those are core-owned occurrences. Not
48
46
  * *availability* — the genre's `messageVerbs` and the preset's included set
49
47
  * decide that; a declaration here says where and to whom an available action
50
48
  * is offered.
49
+ * @ruling plans/29 R-15 *venue* · *audience* · *quick* · *slash name*, 09-AMENDMENTS-B B9, F40 (was F38 before the 2026-09-17 renumbering; ruled 2026-09-15), U5c, U5b, R-20, U5e, 19 §3
51
50
  */
52
51
  import type { Audience } from './participants.js';
53
52
  import type { I18n } from './descriptors.js';
54
53
  import { type EnvoyDecl } from './genres.js';
55
54
  import { type EnabledWhen, type EnabledWhenDecl } from './predicates.js';
56
55
  import type { VerdictResult } from './verdicts.js';
56
+ import { type StoryTimeUnit } from './storyTime.js';
57
57
  export type { EnabledWhen, EnabledWhenDecl } from './predicates.js';
58
- /** The two sides of the effects line (R-15). `fiction` is the default. @experimental */
58
+ /**
59
+ * The two sides of the effects line. `fiction` is the default.
60
+ * @experimental
61
+ * @ruling R-15
62
+ */
59
63
  export declare const ACTION_EFFECTS: readonly ['fiction', 'world'];
60
64
  /** @experimental */
61
65
  export type ActionEffects = (typeof ACTION_EFFECTS)[number];
62
66
  /**
63
- * How much an action needs the text it **collects** (lair pass R3,
64
- * 2026-09-28): `required` — the press does not fire without some;
67
+ * How much an action needs the text it **collects**: `required` — the
68
+ * press does not fire without some;
65
69
  * `optional` — an empty submit fires too, and `CollectedText.ifEmpty` says
66
- * what that does. Was `COMPOSER_TEXT_MODES` (B10), when the text was read
70
+ * what that does. Was `COMPOSER_TEXT_MODES`, when the text was read
67
71
  * off the composer's draft.
68
72
  * @experimental
73
+ * @ruling lair pass R3 (2026-09-28), B10
69
74
  */
70
75
  export declare const TEXT_NEEDS: readonly ['required', 'optional'];
71
76
  /**
72
- * The text an action collects before it fires (lair pass R3, ruled
73
- * 2026-09-28: typing and then pressing an action is unintuitive). The press
74
- * opens the **collect modal**, or — S2 — a slash argument supplies it. It
77
+ * The text an action collects before it fires (typing and then pressing an
78
+ * action is unintuitive). The press
79
+ * opens the **collect modal**, or a slash argument supplies it. It
75
80
  * reaches the run as `input.text`, trimmed.
76
81
  * @experimental
82
+ * @ruling lair pass R3 (ruled 2026-09-28), S2
77
83
  */
78
84
  export interface CollectedText {
79
85
  need: (typeof TEXT_NEEDS)[number];
80
- /** The field's label — what the modal asks: "What do you whisper?". Display text (R-20). */
86
+ /**
87
+ * The field's label — what the modal asks: "What do you whisper?". Display text.
88
+ * @ruling R-20
89
+ */
81
90
  label: I18n;
82
- /** The empty field's placeholder. Display text (R-20). */
91
+ /**
92
+ * The empty field's placeholder. Display text.
93
+ * @ruling R-20
94
+ */
83
95
  placeholder?: I18n;
84
96
  /**
85
97
  * What an empty submit does, in one sentence — "The room decides."
86
98
  * **Required when `need` is `optional`**: an empty box must say what
87
- * pressing on will do. Display text (R-20).
99
+ * pressing on will do. Display text.
100
+ * @ruling R-20
88
101
  */
89
102
  ifEmpty?: I18n;
90
103
  }
91
104
  /**
92
- * The cast members an action collects before it fires (lair pass R3; the
93
- * whisper's use is R10): a multiselect over the session's **enabled cast
105
+ * The cast members an action collects before it fires: a multiselect over
106
+ * the session's **enabled cast
94
107
  * members**, each a `character:<id>` reference. They reach the run as
95
108
  * `input.recipients`, validated by the host: seated and enabled, no
96
109
  * duplicates, within `min` and `max`.
97
110
  * @experimental
111
+ * @ruling lair pass R3, R10
98
112
  */
99
113
  export interface CollectedRecipients {
100
- /** The list's label — "Who hears it". Display text (R-20). */
114
+ /**
115
+ * The list's label — "Who hears it". Display text.
116
+ * @ruling R-20
117
+ */
101
118
  label: I18n;
102
119
  /** The fewest that may be picked. Default 1; never below 1. */
103
120
  min?: number;
@@ -105,22 +122,58 @@ export interface CollectedRecipients {
105
122
  max?: number;
106
123
  /**
107
124
  * The per-cast slot this action writes on each recipient, replacing what
108
- * it held (lair re-plan R10, 2026-09-28) — the Lair's Whisper names
125
+ * it held — the Lair's Whisper names
109
126
  * `core:slot/whisper@1`. The collect modal shows each member's current
110
127
  * value beside their box, so an overwrite is visible before it happens.
111
128
  * Display only: what the run writes is the spec's.
129
+ * @ruling lair re-plan R10 (2026-09-28)
112
130
  */
113
131
  overwrites?: string;
114
132
  }
133
+ /**
134
+ * 🚧 A **clock step** an action collects before it fires: an amount of story
135
+ * time, forward or back, in one unit — the collect modal's stepper (a whole
136
+ * number, a unit, *Forward* / *Back*). It reaches the run as
137
+ * `input.clockStep: { by, unit }`, `by` signed (back is negative), validated
138
+ * by the host (a whole number other than zero, within `CLOCK_STEP_MAX`, a unit
139
+ * of `STORY_TIME_UNITS`). What the run does with it is the spec's — core's
140
+ * *Time passes…* wires it into `core:task/clock-step@1` and the *Advance story
141
+ * clock* outlet. ⚠ Not a turn's step and not the Chronicle's one-press step:
142
+ * the person picks the amount.
143
+ * @experimental
144
+ * @ruling PROPOSAL-live-scenes §6 (2026-10-13)
145
+ */
146
+ export interface CollectedClockStep {
147
+ /**
148
+ * The stepper's label — what the modal asks: "How much time passes?".
149
+ * Display text.
150
+ * @ruling R-20
151
+ */
152
+ label: I18n;
153
+ /** What the stepper opens at. Default `{ by: 1, unit: 'hours' }`; `by` above 0 (the modal's Back makes it negative). */
154
+ default?: {
155
+ by: number;
156
+ unit: StoryTimeUnit;
157
+ };
158
+ }
159
+ /** The largest step a press may collect, either way — a typo of 100000 years is refused, not stepped. @experimental */
160
+ export declare const CLOCK_STEP_MAX = 10000;
161
+ /**
162
+ * Why a collected clock step cannot ride, as a sentence — or null when it can:
163
+ * `{ by, unit }`, a whole `by` other than zero within ±`CLOCK_STEP_MAX`, a unit
164
+ * of `STORY_TIME_UNITS`. The host's door and the modal ask the same.
165
+ * @experimental
166
+ */
167
+ export declare function clockStepRefusal(raw: unknown): string | null;
115
168
  /**
116
169
  * The venues a `world` action may appear in: never a form, the extra tab or a
117
170
  * widget.
118
171
  *
119
- * ⚠ **`message` is on the owner's side since 2026-09-28** (lair re-plan R11,
120
- * *File as a room*). The line exists so that a character can never be asked
121
- * to answer an out-of-fiction question (29 R-15 *The line*), and a question
172
+ * ⚠ **`message` is on the owner's side since 2026-09-28**. The line exists
173
+ * so that a character can never be asked
174
+ * to answer an out-of-fiction question, and a question
122
175
  * put to someone lives in the **`form`** venue — split out of `message` the
123
- * day the line was built (U5d review, S1). The `message` venue is a message's
176
+ * day the line was built. The `message` venue is a message's
124
177
  * own ⋮ and quick row: a person's button, pressed by the person, on a row.
125
178
  * With `act` held to `owner` / `admin` (`WORLD_ACTION_ACTORS`), no block
126
179
  * naming it, and no fire made **as** a participant, a `world` action there
@@ -128,6 +181,7 @@ export interface CollectedRecipients {
128
181
  * with the row as its subject. `extra` and `widget` stay out: a widget can
129
182
  * invoke without a person's press.
130
183
  * @experimental
184
+ * @ruling lair re-plan R11 *File as a room*, 29 R-15 *The line*, U5d review, S1
131
185
  */
132
186
  export declare const WORLD_ACTION_VENUES: readonly VenueKind[];
133
187
  /** The references a `world` action's `act` audience may name: the owner, an administrator. @experimental */
@@ -139,7 +193,7 @@ export declare const effectsOf: (action: {
139
193
  /**
140
194
  * The closed set of places an action may appear. Core owns it; a plugin picks.
141
195
  *
142
- * `form` (U5d review, S1) is the one venue nothing lists: an action carried
196
+ * `form` is the one venue nothing lists: an action carried
143
197
  * by a **form** — a `choices` or `form` block in a message — and pressed
144
198
  * only from that block (the Adventure genre's *Answer*). A `form`-venue
145
199
  * action never appears in a message's overflow, the composer's More menu or
@@ -147,7 +201,7 @@ export declare const effectsOf: (action: {
147
201
  * it. A `world` action may not take it (`WORLD_ACTION_VENUES`): an
148
202
  * out-of-fiction effect is never a question a message carries.
149
203
  *
150
- * ⚠ **`form` stays fiction-only even after L1** (ruled 2026-09-17). A block
204
+ * ⚠ **`form` stays fiction-only** (ruled 2026-09-17). A block
151
205
  * addressed to the **owner** may name a `world` action — see
152
206
  * `worldBlockFunctions` — but a *venue* is declared and an *addressee* is
153
207
  * decided at run time, so this check cannot see one and would have to admit
@@ -156,6 +210,7 @@ export declare const effectsOf: (action: {
156
210
  * says where the declaration may be OFFERED, the addressee says who may press
157
211
  * this particular button, and the two answers stay separate.
158
212
  * @experimental
213
+ * @ruling U5d review, S1, L1
159
214
  */
160
215
  export declare const VENUE_KINDS: readonly ['composer', 'message', 'extra', 'widget', 'session-settings', 'pipelines', 'admin', 'review', 'form'];
161
216
  /** @experimental */
@@ -167,7 +222,10 @@ export type ListedVenueKind = (typeof LISTED_VENUE_KINDS)[number];
167
222
  /** Where an action appears, optionally on one channel only. @experimental */
168
223
  export interface Venue {
169
224
  kind: VenueKind;
170
- /** A channel slug (20 §7). Absent = every channel of the session. */
225
+ /**
226
+ * A channel slug. Absent = every channel of the session.
227
+ * @ruling 20 §7
228
+ */
171
229
  channel?: string;
172
230
  }
173
231
  /**
@@ -176,20 +234,22 @@ export interface Venue {
176
234
  * `key` is the action's own identity within the spec — what a widget's
177
235
  * `invoke(key)` names, what the *new* marker is kept against, and, joined to
178
236
  * the spec slug as `<spec>#<key>` (`ACTION_IDENTITY`), **the one key
179
- * everything routes and stores by** (plans/31 V2, ruled 2026-09-17): a
237
+ * everything routes and stores by**: a
180
238
  * binding's subject, a preset's included set, a session's enablement row, a
181
239
  * genre's enabled-when default, the fire, a block's `action`. There is no
182
240
  * second routing key: two specs declaring the same `key` are two actions, and
183
241
  * a person binds each on its own.
184
242
  * @experimental
243
+ * @ruling plans/31 V2 (2026-09-17)
185
244
  */
186
245
  export interface ActionDecl {
187
246
  key: string;
188
247
  /**
189
- * The genre this action serves — a genre id (24 §3). Required (U5c
190
- * review, W5): an action is offered *to a genre*, and one naming none
248
+ * The genre this action serves — a genre id. Required: an action is
249
+ * offered *to a genre*, and one naming none
191
250
  * would be offered to nobody while still claiming a slash name — so it is
192
251
  * refused at construction, in `validate()` and in `announce.build()`.
252
+ * @ruling 24 §3, U5c review, W5
193
253
  */
194
254
  genre: string;
195
255
  venue: Venue | Venue[];
@@ -197,30 +257,35 @@ export interface ActionDecl {
197
257
  quick?: boolean;
198
258
  /** The slash name. Composer actions without one are called by their `key`. */
199
259
  slash?: string;
200
- /** What the control reads — a string or a locale map with `en` (R-20); never the slash name. */
260
+ /**
261
+ * What the control reads — a string or a locale map with `en`; never the slash name.
262
+ * @ruling R-20
263
+ */
201
264
  label: I18n;
202
265
  /** A Lucide icon name, kebab-case. */
203
266
  icon?: string;
204
267
  /**
205
268
  * What the icon says when it stands alone — the accessible name of an
206
- * icon-only control (`aria-label`). Display text (R-20). Absent: the
269
+ * icon-only control (`aria-label`). Display text. Absent: the
207
270
  * `label`, which is right for nearly every action; give one only when the
208
271
  * icon-only control should read differently from the named one. Needs an
209
272
  * `icon`.
210
273
  * @experimental
274
+ * @ruling R-20
211
275
  */
212
276
  iconAlt?: I18n;
213
277
  /**
214
- * What the action does, in one plain sentence — display text (R-20).
278
+ * What the action does, in one plain sentence — display text.
215
279
  * **Required** (2026-09-28): the session's action legend lists every
216
280
  * action with it, and a control shows it as its tooltip, so a person can
217
281
  * learn what a button does before pressing it. Say the effect, not the
218
282
  * mechanism: "Roll the dice and post the result."
219
283
  * @experimental
284
+ * @ruling R-20
220
285
  */
221
286
  description: I18n;
222
287
  /**
223
- * When the action is offered (plans/29 R-15 *enabled-when*; U5e): a
288
+ * When the action is offered: a
224
289
  * predicate — or a list, all of which must hold — over the session's
225
290
  * published values, the junction clause's shape and never code. `on` is
226
291
  * a dotted path such as `state.world.location`, `session.generating` or
@@ -228,11 +293,12 @@ export interface ActionDecl {
228
293
  * outside a run. `reason` says why the control is grey. Absent: the
229
294
  * genre's default for this function, if it declares one, else always
230
295
  * enabled. See `predicates.ts`.
296
+ * @ruling plans/29 R-15 *enabled-when*, U5e
231
297
  */
232
298
  enabledWhen?: EnabledWhenDecl;
233
299
  /**
234
- * When the action is **present** at all (W-GATE D3, 2026-09-27): the
235
- * turn controls' present-when (B8), on a contributed action. The same
300
+ * When the action is **present** at all: the
301
+ * turn controls' present-when, on a contributed action. The same
236
302
  * predicate grammar as `enabledWhen`, over the same published values,
237
303
  * and the opposite answer when it fails — the action is **hidden**, not
238
304
  * grey: left out of every listing and refused at the door when pressed
@@ -244,53 +310,74 @@ export interface ActionDecl {
244
310
  * (`session.openForm.action`). An `item.*` predicate is refused: a
245
311
  * listing has no row to judge it on. Absent: always present.
246
312
  * @experimental
313
+ * @ruling W-GATE D3 (2026-09-27), B8
247
314
  */
248
315
  presentWhen?: EnabledWhenDecl;
249
316
  /**
250
- * What the action's result touches — **the effects line** (plans/29
251
- * R-15 *The line*; F41, was 09-B's F39; built 2026-09-17 as U5d).
317
+ * What the action's result touches — **the effects line** (built 2026-09-17).
252
318
  *
253
319
  * `fiction` (the default): the result stays inside the story — a
254
320
  * message, a state proposal, a narration, a branch (a copy of a session
255
321
  * is still the fiction). `world`: the result touches something outside
256
322
  * it — character cards, lorebook data, settings, permissions,
257
323
  * connections. A `world` action may appear only in the `composer`,
258
- * `message` (a row's own ⋮, since lair re-plan R11), `session-settings`,
324
+ * `message` (a row's own ⋮), `session-settings`,
259
325
  * `admin` or `review` venues (never `form`, `extra` or `widget`), its `act` audience is `owner` and/or `admin`
260
326
  * only, no block may name it **unless that block is addressed to the
261
- * owner** (`worldBlockFunctions`, `isOwnerAddressed`; L1, ruled
262
- * 2026-09-17), and the form-answer pipeline refuses to answer it — so a
327
+ * owner** (`worldBlockFunctions`, `isOwnerAddressed`), and the form-answer
328
+ * pipeline refuses to answer it — so a
263
329
  * character asking a question is fine, and a character granting another
264
330
  * character permission is impossible by construction. Refused at
265
331
  * construction, in `validate()`, in `announce.build()` and at the host's
266
332
  * publish.
333
+ * @ruling plans/29 R-15 *The line*, F41 (was 09-B's F39), U5d, lair re-plan R11, L1 (ruled 2026-09-17)
267
334
  */
268
335
  effects?: ActionEffects;
269
336
  /**
270
- * The speaker this action's results post as (plans/29 R-18 (1), R-21
271
- * (6); built 2026-09-16 as U5g) — a dice plugin's *Roll* reporting as
337
+ * The speaker this action's results post as (built 2026-09-16) — a dice
338
+ * plugin's *Roll* reporting as
272
339
  * "the Dice Master". Addressed as `envoy:<plugin>.<key>`
273
340
  * (`envoyIdentity({ action: { specId } }, key)`), a cast member with
274
341
  * `origin: action` once it has posted, and **`on-action` only**: it
275
342
  * speaks through this action's outputs and is never a turn-taking
276
343
  * candidate. `speaks` is stamped by `normalizeAction` and a declaration
277
344
  * saying `in-turn` is refused.
345
+ * @ruling plans/29 R-18 (1), R-21 (6), U5g
278
346
  */
279
347
  envoy?: EnvoyDecl;
280
348
  /**
281
- * What the action asks for before it fires (lair pass R3, 2026-09-28):
282
- * `text` (`CollectedText`) and/or `recipients` (`CollectedRecipients`).
349
+ * What the action asks for before it fires:
350
+ * `text` (`CollectedText`), `recipients` (`CollectedRecipients`) and/or
351
+ * 🚧 a `clockStep` (`CollectedClockStep`).
283
352
  * Every press of a collecting action — a chip, the palette, a message's
284
- * ⋮, a form's option — opens the **collect modal**; S2's slash argument
353
+ * ⋮, a form's option — opens the **collect modal**; a slash argument
285
354
  * supplies the text instead. What was collected reaches the run as
286
- * `input.text` and `input.recipients`. Absent: the action collects
355
+ * `input.text`, `input.recipients` and `input.clockStep`. Absent: the action collects
287
356
  * nothing, and its run's `input.text` is empty. Any venue. Was
288
357
  * `composerText`, when the text was read off the composer's draft.
289
358
  * @experimental
359
+ * @ruling lair pass R3 (2026-09-28), S2
290
360
  */
291
361
  collects?: {
292
362
  text?: CollectedText;
293
363
  recipients?: CollectedRecipients;
364
+ clockStep?: CollectedClockStep;
365
+ };
366
+ /**
367
+ * 🚧 A question asked before the action fires (2026-10-18, the 100-turn
368
+ * walk: _Reveal the planning notes_ cannot be taken back, and fired on
369
+ * one press). Every press — a chip, the palette, a widget's invoke —
370
+ * opens the host's confirmation (an `alertdialog`) with `question` as
371
+ * its title, `description` under it saying what goes and what stays,
372
+ * and a confirm button reading `confirmLabel` (absent: the action's
373
+ * `label`); Cancel fires nothing. A press that answers a form (a block)
374
+ * is not asked again: the form was the question. Display text, all of it.
375
+ * @experimental
376
+ */
377
+ confirm?: {
378
+ question: I18n;
379
+ description?: I18n;
380
+ confirmLabel?: I18n;
294
381
  };
295
382
  }
296
383
  /** A declaration after normalisation: venues and predicates always lists, no alias spellings, no `function`. @experimental */
@@ -311,7 +398,7 @@ export declare const BARE_SLASH: RegExp;
311
398
  /** A plugin's slash name is `<plugin>.<action>`; the plugin id is the spec's namespace. @experimental */
312
399
  export declare const NAMESPACED_SLASH: RegExp;
313
400
  /**
314
- * One venue's listing (F40 — every enabled action is reachable): the
401
+ * One venue's listing (every enabled action is reachable): the
315
402
  * **primary set**, the actions declaring `quick`, and the **overflow**, the
316
403
  * rest. Every action the venue holds is in exactly one of the two, so nothing
317
404
  * is reachable only by prominence and nothing is dropped. Placement is
@@ -319,6 +406,7 @@ export declare const NAMESPACED_SLASH: RegExp;
319
406
  * entry. The host's `SessionActionVenues` is this shape with its entries
320
407
  * decorated (audience, the *new* mark, enablement).
321
408
  * @experimental
409
+ * @ruling F40
322
410
  */
323
411
  export interface VenueListing<A> {
324
412
  primary: A[];
@@ -328,10 +416,10 @@ export interface VenueListing<A> {
328
416
  export type VenueListings<A> = Record<ListedVenueKind, VenueListing<A>>;
329
417
  /**
330
418
  * Place actions into their venues for one channel — the placement rule every
331
- * listing applies (F40; R-15 *quick*). `quick` → the primary set, else the
419
+ * listing applies. `quick` → the primary set, else the
332
420
  * overflow; a venue naming another channel's slug is skipped (a bare slug
333
- * means every lane of it, 20 §7); a `form` venue is listed nowhere — the
334
- * block alone reaches it (U5d review, S1).
421
+ * means every lane of it); a `form` venue is listed nowhere — the
422
+ * block alone reaches it.
335
423
  *
336
424
  * Availability is decided BEFORE this: the genre's verbs, the preset's
337
425
  * included set and enabled-when say which actions a session offers, and the
@@ -340,14 +428,15 @@ export type VenueListings<A> = Record<ListedVenueKind, VenueListing<A>>;
340
428
  * the conformance kit's `listActions` seam on it — the SDK's own host does
341
429
  * — and the kit itself never calls it: C19 judges the listing the HOST
342
430
  * returns, entry by entry, and a rule the kit applied for the host would be
343
- * a rule it could not see the host break (U7 review, C1).
431
+ * a rule it could not see the host break.
344
432
  * @experimental
433
+ * @ruling F40, R-15 *quick*, 20 §7, U5d review, S1, U7 review, C1
345
434
  */
346
435
  export declare function placeActions<A extends {
347
436
  venue: ReadonlyArray<Venue>;
348
437
  quick?: boolean;
349
438
  }>(actions: ReadonlyArray<A>, channel?: string): VenueListings<A>;
350
- /** The namespace of a spec id — `core:spec/chat-narrate` → `core`, `acme:spec/roll` → `acme`. @experimental */
439
+ /** The namespace of a spec id — `core:spec/story-narrate` → `core`, `acme:spec/roll` → `acme`. @experimental */
351
440
  export declare function specNamespace(specId: string): string;
352
441
  /** Is this namespace core's — the one whose actions take bare slash names? @experimental */
353
442
  export declare const isCoreNamespace: (ns: string) => boolean;
@@ -355,8 +444,9 @@ export declare const isCoreNamespace: (ns: string) => boolean;
355
444
  * The slash name an action is called by: the declared one, else derived from
356
445
  * the key by the same rule a declared name must obey — `key` for core,
357
446
  * `<plugin>.<key>` for a plugin. Always defined, so every composer action is
358
- * reachable by `/` (F40) whether or not its author named one.
447
+ * reachable by `/` whether or not its author named one.
359
448
  * @experimental
449
+ * @ruling F40
360
450
  */
361
451
  export declare function slashNameOf(action: {
362
452
  key: string;
@@ -366,12 +456,13 @@ export declare function slashNameOf(action: {
366
456
  * The law one action finding comes from. Nearly every fault in a declaration
367
457
  * is its shape — a venue core does not offer, a slash name outside the
368
458
  * spec's namespace, a missing label — and is **R-15**'s. The two that are
369
- * not are **the effects line** (F41; U7 review, W3): a `world` action in a
459
+ * not are **the effects line** (`F41`): a `world` action in a
370
460
  * venue where a character could be asked to press it, or one whose `act`
371
461
  * audience names someone other than the owner or an administrator. The
372
462
  * validator labels each finding with its law, so a kit can key on `F41`
373
463
  * rather than on a word in the sentence.
374
464
  * @experimental
465
+ * @ruling U7 review, W3
375
466
  */
376
467
  export interface ActionFinding {
377
468
  law: 'R-15' | 'F41';
@@ -398,7 +489,7 @@ export type EffectsLineDeclarationInput = {
398
489
  ref: unknown;
399
490
  };
400
491
  /**
401
- * The effects line at a declaration (R-15 *The line*; F41): a `world` action
492
+ * The effects line at a declaration: a `world` action
402
493
  * is owner-only and never in a form, extra or widget venue. Judged one venue or one
403
494
  * reference at a time, so the sentence names the venue or the reference
404
495
  * that crossed.
@@ -409,28 +500,38 @@ export type EffectsLineDeclarationInput = {
409
500
  * import graph and must not import it. The verdict calls this for a
410
501
  * `venue` or `actor` input; the door calls it directly and quotes it.
411
502
  * @experimental
503
+ * @ruling R-15 *The line*, F41
412
504
  */
413
505
  export declare function worldActionCrossing(input: EffectsLineDeclarationInput): VerdictResult;
414
506
  /**
415
- * Every fault in one `ActionDecl.collects` (lair pass R3), as sentences: an
507
+ * Every fault in one `ActionDecl.collects`, as sentences: an
416
508
  * unknown key, a missing label, an `optional` text with no `ifEmpty`, a
417
509
  * `min` below 1 or a `max` below `min`. `where` is the field's address
418
510
  * (`contributes.actions[nudge].collects`).
419
511
  * @experimental
512
+ * @ruling lair pass R3
420
513
  */
421
514
  export declare function collectsFindings(raw: unknown, where: string): string[];
422
515
  /**
423
516
  * Every fault in one action declaration, as sentences — the teaching-error
424
- * pattern (15 §1.3). Empty when the declaration is sound.
517
+ * pattern. Empty when the declaration is sound.
425
518
  *
426
519
  * `specId` decides which slash grammar applies: a `core:` spec may not claim a
427
520
  * dotted name and a plugin spec may not claim a bare one, or a name outside its
428
521
  * own namespace. That rule is the whole collision guarantee.
429
522
  * @experimental
523
+ * @ruling 15 §1.3
430
524
  */
431
525
  export declare function actionFindings(raw: unknown, specId: string, at?: string): string[];
432
526
  /** `actionFindings`, each sentence with the law it comes from (`ActionFinding`). @experimental */
433
- export declare function actionFindingsByLaw(raw: unknown, specId: string, at?: string): ActionFinding[];
527
+ export declare function actionFindingsByLaw(raw: unknown, specId: string, at?: string, opts?: {
528
+ /**
529
+ * 🚧 The spec is mounted by registrations, not locked (PLAN-layering
530
+ * D3): its actions carry no genre — a registration that includes one
531
+ * offers it to that genre.
532
+ */
533
+ unlocked?: boolean;
534
+ }): ActionFinding[];
434
535
  /** The slash-name grammar, applied to one name for one spec. @experimental */
435
536
  export declare function slashFindings(slash: string, specId: string, where?: string): string[];
436
537
  /**
@@ -461,16 +562,16 @@ export declare function actionsOf(doc: {
461
562
  export { ACTION_IDENTITY, ACTION_IDENTITY_MAX_LENGTH, CORE_ACTION_SPEC_ID, actionIdentity, isActionIdentity, parseActionIdentity, } from './identity.js';
462
563
  /**
463
564
  * A slash collision: two actions offered to one genre under one name. One
464
- * slash name means one action (plans/31 V2, ruled 2026-09-17): since the
565
+ * slash name means one action (ruled 2026-09-17): since the
465
566
  * identity `<spec>#<key>` is the only routing key, two specs claiming one
466
567
  * name are two actions a palette could not tell apart — a collision, not
467
- * alternatives. (Until V2 two specs sharing a *function* under one name were
568
+ * alternatives. (Until then two specs sharing a *function* under one name were
468
569
  * alternatives a binding selected among; the function is gone, and so is the
469
570
  * exemption.) A plugin's names are namespaced (`acme.roll`), so a plugin
470
571
  * declaring the same `key` as a core verb is a different identity under a
471
572
  * different name, and never shadows it.
472
573
  *
473
- * Core's verbs hold their names first (U5c review, S1): every genre the list
574
+ * Core's verbs hold their names first: every genre the list
474
575
  * touches is seeded with `CORE_ACTIONS` under `core`, so a core spec claiming
475
576
  * `/retry` collides with the verb rather than shadowing it in the palette. (A
476
577
  * plugin spec cannot claim a bare name at all — that is the grammar's job.)
@@ -479,6 +580,7 @@ export { ACTION_IDENTITY, ACTION_IDENTITY_MAX_LENGTH, CORE_ACTION_SPEC_ID, actio
479
580
  * document, `announce.build()` inside one package, and the host across every
480
581
  * published spec of an install (a boot-time refusal).
481
582
  * @experimental
583
+ * @ruling plans/31 V2, U5c review, S1
482
584
  */
483
585
  export declare function slashCollisions(actions: ReadonlyArray<NormalizedAction & {
484
586
  specId: string;
@@ -487,6 +589,8 @@ export declare function slashCollisions(actions: ReadonlyArray<NormalizedAction
487
589
  export declare function actionDocumentFindings(doc: {
488
590
  id: string;
489
591
  contributes?: unknown;
592
+ input?: unknown;
593
+ suits?: unknown;
490
594
  }): string[];
491
595
  /**
492
596
  * `actionDocumentFindings` with the law each sentence comes from — what
@@ -496,22 +600,24 @@ export declare function actionDocumentFindings(doc: {
496
600
  export declare function actionDocumentFindingsByLaw(doc: {
497
601
  id: string;
498
602
  contributes?: unknown;
603
+ input?: unknown;
604
+ suits?: unknown;
499
605
  }): ActionFinding[];
500
606
  /**
501
607
  * Who core's message verbs are for and where they live — the same shape a
502
608
  * contributed action has, so the client renders one list.
503
609
  *
504
- * Every entry is a **built-in** (U5b): its `key` is the verb the
610
+ * Every entry is a **built-in**: its `key` is the verb the
505
611
  * message-verb handlers know (`sessionMessages:*`), never something
506
612
  * `sessions:fireAction` routes; its identity is `core#<key>`
507
613
  * (`CORE_ACTION_SPEC_ID`), which is what a genre's enabled-when default
508
- * and a session's override name it by (plans/31 V2). `retry` also lives in the
614
+ * and a session's override name it by. `retry` also lives in the
509
615
  * composer's *extra* venue (the turn controls), where it acts on the newest
510
616
  * reply. Availability is the genre's (`messageVerbs`): a host lists an entry
511
617
  * only when the genre offers it; the floors are always offered.
512
618
  *
513
619
  * Four entries are not message verbs but **turn controls**
514
- * (`TURN_CONTROLS`, lair pass B7 + B8, R2): **`advance`**, the composer's
620
+ * (`TURN_CONTROLS`): **`advance`**, the composer's
515
621
  * Continue, which fires the turn order's head; **`pick`**, Pick who speaks;
516
622
  * and **`narrate`**, a narrator turn — all `sessions:fireTurn` — and
517
623
  * **`retake`**, Regenerate the last turn as a whole (`sessions:retakeTurn`).
@@ -519,15 +625,17 @@ export declare function actionDocumentFindingsByLaw(doc: {
519
625
  * `turnControls`, and they act on no row. ⚠ `advance` is not `extend` — the prefill verb that
520
626
  * extends one reply (`core#extend`, labelled Extend; renamed from
521
627
  * `continue` 2026-09-28 so Continue means one press).
628
+ * @ruling U5b, plans/31 V2, lair pass B7 + B8, R2
522
629
  */
523
630
  /**
524
- * A core verb is declared without a `genre` (U5c review, S-E): it is offered
631
+ * A core verb is declared without a `genre`: it is offered
525
632
  * in **every** genre — availability is the genre's `messageVerbs`, and the
526
633
  * floors are not even that — so a genre on the declaration would name one
527
634
  * and lie about the rest. `Omit` rather than a cast, so a verb missing a
528
635
  * required field is a compile error here and not a runtime surprise in the
529
636
  * host's list.
530
637
  * @experimental
638
+ * @ruling U5c review, S-E
531
639
  */
532
640
  export interface CoreActionDecl extends Omit<NormalizedAction, 'genre'> {
533
641
  /** stop · branch · edit — present in every genre. */
@@ -535,12 +643,13 @@ export interface CoreActionDecl extends Omit<NormalizedAction, 'genre'> {
535
643
  }
536
644
  /**
537
645
  * The sentences beside a grey core verb, as locale maps — the `reason` of
538
- * each verb's enabled-when below (U5e). One vocabulary: the host's chips,
646
+ * each verb's enabled-when below. One vocabulary: the host's chips,
539
647
  * menus and palette read these through the verdict, and a refusal at the
540
648
  * door says the same words. The two conditions that are NOT published
541
649
  * values — an edit in progress, the audience — keep their sentences on the
542
650
  * client (`messageVerbState.ts`).
543
651
  * @internal
652
+ * @ruling U5e
544
653
  */
545
654
  export declare const CORE_VERB_REASONS: Readonly<{
546
655
  readonly generating: {