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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +23 -19
  2. package/dist/actions.d.ts +149 -67
  3. package/dist/actions.js +89 -35
  4. package/dist/annexFields.d.ts +8 -4
  5. package/dist/annexFields.js +5 -2
  6. package/dist/announce.d.ts +78 -28
  7. package/dist/announce.js +14 -5
  8. package/dist/attributes.d.ts +9 -6
  9. package/dist/attributes.js +9 -5
  10. package/dist/bands.d.ts +41 -6
  11. package/dist/bands.js +83 -33
  12. package/dist/builder.d.ts +161 -58
  13. package/dist/builder.js +128 -22
  14. package/dist/candidates.d.ts +5 -3
  15. package/dist/candidates.js +3 -2
  16. package/dist/clauses.d.ts +2 -1
  17. package/dist/clauses.js +2 -1
  18. package/dist/component.d.ts +24 -7
  19. package/dist/component.js +16 -6
  20. package/dist/componentBuild.d.ts +16 -5
  21. package/dist/componentBuild.js +14 -5
  22. package/dist/componentClient.d.ts +61 -30
  23. package/dist/componentClient.js +11 -1
  24. package/dist/componentImports.d.ts +8 -5
  25. package/dist/componentImports.js +23 -4
  26. package/dist/componentModule.js +2 -1
  27. package/dist/componentWire.d.ts +2 -1
  28. package/dist/componentWire.js +34 -2
  29. package/dist/config.d.ts +28 -14
  30. package/dist/config.js +20 -10
  31. package/dist/connections.d.ts +9 -4
  32. package/dist/connections.js +7 -4
  33. package/dist/declarations.d.ts +46 -17
  34. package/dist/declarations.js +46 -15
  35. package/dist/descriptors.d.ts +242 -97
  36. package/dist/descriptors.js +145 -41
  37. package/dist/dev.d.ts +6 -5
  38. package/dist/dev.js +6 -5
  39. package/dist/document.d.ts +74 -25
  40. package/dist/document.js +32 -11
  41. package/dist/dowry.d.ts +241 -0
  42. package/dist/dowry.js +315 -0
  43. package/dist/engines.d.ts +16 -7
  44. package/dist/engines.js +6 -4
  45. package/dist/eventMapLaws.d.ts +19 -8
  46. package/dist/eventMapLaws.js +9 -6
  47. package/dist/events.d.ts +101 -39
  48. package/dist/events.js +106 -33
  49. package/dist/executor.d.ts +122 -41
  50. package/dist/executor.js +188 -95
  51. package/dist/extension.d.ts +99 -35
  52. package/dist/extension.js +43 -9
  53. package/dist/facets.d.ts +2 -1
  54. package/dist/facets.js +4 -2
  55. package/dist/foldedSections.d.ts +4 -2
  56. package/dist/foldedSections.js +2 -1
  57. package/dist/genres.d.ts +123 -41
  58. package/dist/genres.js +127 -22
  59. package/dist/guardedConnection.d.ts +4 -3
  60. package/dist/guardedConnection.js +4 -3
  61. package/dist/handlebarsReach.d.ts +1 -1
  62. package/dist/handlebarsReach.js +1 -1
  63. package/dist/hash.d.ts +16 -5
  64. package/dist/hash.js +14 -4
  65. package/dist/hookGrants.d.ts +3 -2
  66. package/dist/hookGrants.js +6 -4
  67. package/dist/hooks.d.ts +21 -16
  68. package/dist/hooks.js +12 -10
  69. package/dist/hostElements.d.ts +41 -17
  70. package/dist/hostElements.js +49 -17
  71. package/dist/i18n.d.ts +5 -3
  72. package/dist/i18n.js +5 -3
  73. package/dist/identity.d.ts +4 -3
  74. package/dist/identity.js +4 -3
  75. package/dist/index.d.ts +5 -0
  76. package/dist/index.js +15 -0
  77. package/dist/layout.d.ts +36 -15
  78. package/dist/layout.js +2 -2
  79. package/dist/loadouts.d.ts +97 -0
  80. package/dist/loadouts.js +81 -0
  81. package/dist/media.d.ts +26 -4
  82. package/dist/media.js +2 -1
  83. package/dist/messageBlocks.d.ts +44 -32
  84. package/dist/messageBlocks.js +23 -18
  85. package/dist/migration.d.ts +16 -8
  86. package/dist/migration.js +14 -8
  87. package/dist/names.d.ts +2 -1
  88. package/dist/names.js +2 -1
  89. package/dist/nodeInput.d.ts +2 -1
  90. package/dist/nodeInput.js +2 -1
  91. package/dist/participants.d.ts +22 -15
  92. package/dist/participants.js +14 -12
  93. package/dist/personGate.d.ts +2 -1
  94. package/dist/personGate.js +2 -1
  95. package/dist/pluginHarness.d.ts +8 -3
  96. package/dist/pluginHarness.js +4 -2
  97. package/dist/pluginPermissions.d.ts +2 -1
  98. package/dist/pluginPermissions.js +12 -1
  99. package/dist/pluginRuleRef.d.ts +2 -2
  100. package/dist/pluginRuleRef.js +1 -1
  101. package/dist/predicates.d.ts +16 -11
  102. package/dist/predicates.js +7 -6
  103. package/dist/preview.d.ts +8 -3
  104. package/dist/preview.js +2 -1
  105. package/dist/promptBlocks.d.ts +5 -3
  106. package/dist/promptBlocks.js +5 -3
  107. package/dist/rankingDecisions.d.ts +2 -1
  108. package/dist/rankingDecisions.js +2 -1
  109. package/dist/receipt.d.ts +65 -29
  110. package/dist/receipt.js +9 -4
  111. package/dist/receiverRules.js +3 -2
  112. package/dist/refs.d.ts +34 -9
  113. package/dist/refs.js +33 -13
  114. package/dist/registry.d.ts +42 -23
  115. package/dist/registry.js +7 -5
  116. package/dist/review.d.ts +16 -5
  117. package/dist/review.js +11 -4
  118. package/dist/sampling.d.ts +54 -0
  119. package/dist/sampling.js +95 -3
  120. package/dist/sceneSettings.d.ts +312 -0
  121. package/dist/sceneSettings.js +425 -0
  122. package/dist/scope.d.ts +6 -4
  123. package/dist/scope.js +4 -3
  124. package/dist/scripts.d.ts +81 -14
  125. package/dist/scripts.js +90 -11
  126. package/dist/sessionDossier.d.ts +521 -0
  127. package/dist/sessionDossier.js +33 -0
  128. package/dist/sessionLayout.d.ts +303 -19
  129. package/dist/sessionLayout.js +354 -40
  130. package/dist/sessionSettings.d.ts +8 -5
  131. package/dist/settings.d.ts +45 -20
  132. package/dist/settings.js +19 -12
  133. package/dist/settingsSlot.d.ts +11 -8
  134. package/dist/settingsSlot.js +11 -8
  135. package/dist/shapes.d.ts +99 -36
  136. package/dist/shapes.js +101 -35
  137. package/dist/sheets.d.ts +4 -2
  138. package/dist/sheets.js +6 -3
  139. package/dist/statShapes.d.ts +2 -1
  140. package/dist/statShapes.js +2 -1
  141. package/dist/status.d.ts +13 -9
  142. package/dist/status.js +8 -6
  143. package/dist/storage.d.ts +2 -1
  144. package/dist/storage.js +2 -1
  145. package/dist/storyTime.d.ts +13 -7
  146. package/dist/storyTime.js +11 -6
  147. package/dist/strokes.d.ts +176 -0
  148. package/dist/strokes.js +281 -0
  149. package/dist/surfaces.d.ts +54 -25
  150. package/dist/surfaces.js +3 -3
  151. package/dist/template.d.ts +9 -5
  152. package/dist/template.js +5 -3
  153. package/dist/templateCheck.d.ts +2 -2
  154. package/dist/templateCheck.js +2 -2
  155. package/dist/templateFit.d.ts +37 -8
  156. package/dist/templateFit.js +92 -8
  157. package/dist/templateIds.d.ts +3 -3
  158. package/dist/templateIds.js +3 -3
  159. package/dist/templateScopeAt.d.ts +21 -11
  160. package/dist/templateScopeAt.js +21 -11
  161. package/dist/testing.d.ts +11 -4
  162. package/dist/testing.js +13 -5
  163. package/dist/tokenizers.d.ts +2 -2
  164. package/dist/tokenizers.js +2 -2
  165. package/dist/turnLock.d.ts +4 -2
  166. package/dist/turnLock.js +2 -1
  167. package/dist/turnOrder.d.ts +17 -11
  168. package/dist/turnOrder.js +9 -5
  169. package/dist/validate.d.ts +11 -8
  170. package/dist/validate.js +81 -10
  171. package/dist/values.d.ts +17 -8
  172. package/dist/values.js +11 -6
  173. package/dist/variables.d.ts +46 -7
  174. package/dist/variables.js +87 -6
  175. package/dist/verdicts.d.ts +20 -13
  176. package/dist/verdicts.js +17 -11
  177. package/dist/widgetDecls.d.ts +8 -4
  178. package/dist/widgetDecls.js +4 -2
  179. package/dist/widgets.d.ts +987 -94
  180. package/dist/widgets.js +93 -18
  181. package/dist/wire.d.ts +13 -6
  182. package/dist/wire.js +3 -3
  183. package/dist/worldinfo.d.ts +11 -6
  184. package/dist/worldinfo.js +8 -4
  185. package/host-elements.d.ts +13 -0
  186. package/package.json +1 -1
package/dist/actions.js 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,10 +42,11 @@
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 { isParticipantRef, PARTICIPANT_ROLES } from './participants.js';
53
52
  import { DEFAULT_CHANNEL, parseChannel } from './channels.js';
@@ -56,30 +55,57 @@ import { enabledWhenFindings, i18nFindings, isEnabledWhenShaped, normalizeEnable
56
55
  import { i18nText } from './i18n.js';
57
56
  import { CORE_ACTION_SPEC_ID } from './identity.js';
58
57
  import { assertSlotId } from './attributes.js';
59
- /** The two sides of the effects line (R-15). `fiction` is the default. @experimental */
58
+ import { STORY_TIME_UNITS } from './storyTime.js';
59
+ /**
60
+ * The two sides of the effects line. `fiction` is the default.
61
+ * @experimental
62
+ * @ruling R-15
63
+ */
60
64
  export const ACTION_EFFECTS = ['fiction', 'world'];
61
65
  /**
62
- * How much an action needs the text it **collects** (lair pass R3,
63
- * 2026-09-28): `required` — the press does not fire without some;
66
+ * How much an action needs the text it **collects**: `required` — the
67
+ * press does not fire without some;
64
68
  * `optional` — an empty submit fires too, and `CollectedText.ifEmpty` says
65
- * what that does. Was `COMPOSER_TEXT_MODES` (B10), when the text was read
69
+ * what that does. Was `COMPOSER_TEXT_MODES`, when the text was read
66
70
  * off the composer's draft.
67
71
  * @experimental
72
+ * @ruling lair pass R3 (2026-09-28), B10
68
73
  */
69
74
  export const TEXT_NEEDS = ['required', 'optional'];
75
+ /** The largest step a press may collect, either way — a typo of 100000 years is refused, not stepped. @experimental */
76
+ export const CLOCK_STEP_MAX = 10_000;
77
+ /**
78
+ * Why a collected clock step cannot ride, as a sentence — or null when it can:
79
+ * `{ by, unit }`, a whole `by` other than zero within ±`CLOCK_STEP_MAX`, a unit
80
+ * of `STORY_TIME_UNITS`. The host's door and the modal ask the same.
81
+ * @experimental
82
+ */
83
+ export function clockStepRefusal(raw) {
84
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw))
85
+ return 'takes its time as { by, unit } — how many, and of what.';
86
+ const { by, unit } = raw;
87
+ if (typeof by !== 'number' || !Number.isInteger(by) || by === 0)
88
+ return 'takes a whole number of units other than zero.';
89
+ if (Math.abs(by) > CLOCK_STEP_MAX)
90
+ return `takes at most ${CLOCK_STEP_MAX} units at a time.`;
91
+ if (!STORY_TIME_UNITS.includes(unit))
92
+ return `counts in ${STORY_TIME_UNITS.join(', ')}.`;
93
+ return null;
94
+ }
70
95
  /** The keys `ActionDecl.collects` may carry, and each request's own keys. */
71
- const COLLECTS_KEYS = ['text', 'recipients'];
96
+ const COLLECTS_KEYS = ['text', 'recipients', 'clockStep'];
97
+ const COLLECTED_CLOCK_STEP_KEYS = ['label', 'default'];
72
98
  const COLLECTED_TEXT_KEYS = ['need', 'label', 'placeholder', 'ifEmpty'];
73
99
  const COLLECTED_RECIPIENTS_KEYS = ['label', 'min', 'max', 'overwrites'];
74
100
  /**
75
101
  * The venues a `world` action may appear in: never a form, the extra tab or a
76
102
  * widget.
77
103
  *
78
- * ⚠ **`message` is on the owner's side since 2026-09-28** (lair re-plan R11,
79
- * *File as a room*). The line exists so that a character can never be asked
80
- * to answer an out-of-fiction question (29 R-15 *The line*), and a question
104
+ * ⚠ **`message` is on the owner's side since 2026-09-28**. The line exists
105
+ * so that a character can never be asked
106
+ * to answer an out-of-fiction question, and a question
81
107
  * put to someone lives in the **`form`** venue — split out of `message` the
82
- * day the line was built (U5d review, S1). The `message` venue is a message's
108
+ * day the line was built. The `message` venue is a message's
83
109
  * own ⋮ and quick row: a person's button, pressed by the person, on a row.
84
110
  * With `act` held to `owner` / `admin` (`WORLD_ACTION_ACTORS`), no block
85
111
  * naming it, and no fire made **as** a participant, a `world` action there
@@ -87,6 +113,7 @@ const COLLECTED_RECIPIENTS_KEYS = ['label', 'min', 'max', 'overwrites'];
87
113
  * with the row as its subject. `extra` and `widget` stay out: a widget can
88
114
  * invoke without a person's press.
89
115
  * @experimental
116
+ * @ruling lair re-plan R11 *File as a room*, 29 R-15 *The line*, U5d review, S1
90
117
  */
91
118
  export const WORLD_ACTION_VENUES = ['composer', 'message', 'session-settings', 'admin', 'review'];
92
119
  /** The references a `world` action's `act` audience may name: the owner, an administrator. @experimental */
@@ -96,7 +123,7 @@ export const effectsOf = (action) => action.effects === 'world' ? 'world' : 'fic
96
123
  /**
97
124
  * The closed set of places an action may appear. Core owns it; a plugin picks.
98
125
  *
99
- * `form` (U5d review, S1) is the one venue nothing lists: an action carried
126
+ * `form` is the one venue nothing lists: an action carried
100
127
  * by a **form** — a `choices` or `form` block in a message — and pressed
101
128
  * only from that block (the Adventure genre's *Answer*). A `form`-venue
102
129
  * action never appears in a message's overflow, the composer's More menu or
@@ -104,7 +131,7 @@ export const effectsOf = (action) => action.effects === 'world' ? 'world' : 'fic
104
131
  * it. A `world` action may not take it (`WORLD_ACTION_VENUES`): an
105
132
  * out-of-fiction effect is never a question a message carries.
106
133
  *
107
- * ⚠ **`form` stays fiction-only even after L1** (ruled 2026-09-17). A block
134
+ * ⚠ **`form` stays fiction-only** (ruled 2026-09-17). A block
108
135
  * addressed to the **owner** may name a `world` action — see
109
136
  * `worldBlockFunctions` — but a *venue* is declared and an *addressee* is
110
137
  * decided at run time, so this check cannot see one and would have to admit
@@ -113,6 +140,7 @@ export const effectsOf = (action) => action.effects === 'world' ? 'world' : 'fic
113
140
  * says where the declaration may be OFFERED, the addressee says who may press
114
141
  * this particular button, and the two answers stay separate.
115
142
  * @experimental
143
+ * @ruling U5d review, S1, L1
116
144
  */
117
145
  export const VENUE_KINDS = [
118
146
  'composer',
@@ -143,10 +171,10 @@ export const BARE_SLASH = /^[a-z][a-z0-9-]*$/;
143
171
  export const NAMESPACED_SLASH = /^([a-z0-9]+(?:[.-][a-z0-9]+)*)\.([a-z][a-z0-9-]*)$/;
144
172
  /**
145
173
  * Place actions into their venues for one channel — the placement rule every
146
- * listing applies (F40; R-15 *quick*). `quick` → the primary set, else the
174
+ * listing applies. `quick` → the primary set, else the
147
175
  * overflow; a venue naming another channel's slug is skipped (a bare slug
148
- * means every lane of it, 20 §7); a `form` venue is listed nowhere — the
149
- * block alone reaches it (U5d review, S1).
176
+ * means every lane of it); a `form` venue is listed nowhere — the
177
+ * block alone reaches it.
150
178
  *
151
179
  * Availability is decided BEFORE this: the genre's verbs, the preset's
152
180
  * included set and enabled-when say which actions a session offers, and the
@@ -155,8 +183,9 @@ export const NAMESPACED_SLASH = /^([a-z0-9]+(?:[.-][a-z0-9]+)*)\.([a-z][a-z0-9-]
155
183
  * the conformance kit's `listActions` seam on it — the SDK's own host does
156
184
  * — and the kit itself never calls it: C19 judges the listing the HOST
157
185
  * returns, entry by entry, and a rule the kit applied for the host would be
158
- * a rule it could not see the host break (U7 review, C1).
186
+ * a rule it could not see the host break.
159
187
  * @experimental
188
+ * @ruling F40, R-15 *quick*, 20 §7, U5d review, S1, U7 review, C1
160
189
  */
161
190
  export function placeActions(actions, channel = DEFAULT_CHANNEL) {
162
191
  const listings = {};
@@ -185,8 +214,9 @@ export const isCoreNamespace = (ns) => ns === 'core';
185
214
  * The slash name an action is called by: the declared one, else derived from
186
215
  * the key by the same rule a declared name must obey — `key` for core,
187
216
  * `<plugin>.<key>` for a plugin. Always defined, so every composer action is
188
- * reachable by `/` (F40) whether or not its author named one.
217
+ * reachable by `/` whether or not its author named one.
189
218
  * @experimental
219
+ * @ruling F40
190
220
  */
191
221
  export function slashNameOf(action, specId) {
192
222
  if (action.slash)
@@ -200,7 +230,7 @@ const EFFECTS_LINE_FIX = `move the action to a venue on the owner's side of the
200
230
  `and keep audience.act to ${WORLD_ACTION_ACTORS.join(' and/or ')} — or declare effects: 'fiction' ` +
201
231
  `if its result stays inside the story`;
202
232
  /**
203
- * The effects line at a declaration (R-15 *The line*; F41): a `world` action
233
+ * The effects line at a declaration: a `world` action
204
234
  * is owner-only and never in a form, extra or widget venue. Judged one venue or one
205
235
  * reference at a time, so the sentence names the venue or the reference
206
236
  * that crossed.
@@ -211,6 +241,7 @@ const EFFECTS_LINE_FIX = `move the action to a venue on the owner's side of the
211
241
  * import graph and must not import it. The verdict calls this for a
212
242
  * `venue` or `actor` input; the door calls it directly and quotes it.
213
243
  * @experimental
244
+ * @ruling R-15 *The line*, F41
214
245
  */
215
246
  export function worldActionCrossing(input) {
216
247
  if (input.effects !== 'world')
@@ -239,11 +270,12 @@ export function worldActionCrossing(input) {
239
270
  };
240
271
  }
241
272
  /**
242
- * Every fault in one `ActionDecl.collects` (lair pass R3), as sentences: an
273
+ * Every fault in one `ActionDecl.collects`, as sentences: an
243
274
  * unknown key, a missing label, an `optional` text with no `ifEmpty`, a
244
275
  * `min` below 1 or a `max` below `min`. `where` is the field's address
245
276
  * (`contributes.actions[nudge].collects`).
246
277
  * @experimental
278
+ * @ruling lair pass R3
247
279
  */
248
280
  export function collectsFindings(raw, where) {
249
281
  const out = [];
@@ -253,7 +285,7 @@ export function collectsFindings(raw, where) {
253
285
  out.push(`${at}: '${k}' is not something an action collects here — one of ${known.join(', ')}`);
254
286
  };
255
287
  if (!raw || typeof raw !== 'object' || Array.isArray(raw))
256
- return [`${where} is { text?, recipients? } — what the press asks for before it fires`];
288
+ return [`${where} is { text?, recipients?, clockStep? } — what the press asks for before it fires`];
257
289
  const c = raw;
258
290
  unknownKeys(c, COLLECTS_KEYS, where);
259
291
  if (c.text !== undefined) {
@@ -304,18 +336,37 @@ export function collectsFindings(raw, where) {
304
336
  }
305
337
  }
306
338
  }
307
- if (c.text === undefined && c.recipients === undefined && !out.length)
308
- out.push(`${where} collects nothing — declare text, recipients, or leave collects out`);
339
+ if (c.clockStep !== undefined) {
340
+ const at = `${where}.clockStep`;
341
+ const k = c.clockStep;
342
+ if (!k || typeof k !== 'object' || Array.isArray(k))
343
+ out.push(`${at} is { label, default? } — the amount of story time the modal's stepper asks for`);
344
+ else {
345
+ unknownKeys(k, COLLECTED_CLOCK_STEP_KEYS, at);
346
+ out.push(...i18nFindings(k.label, `${at}.label`, { required: true }));
347
+ if (k.default !== undefined) {
348
+ const why = clockStepRefusal(k.default);
349
+ const by = k.default?.by;
350
+ if (why)
351
+ out.push(`${at}.default ${why}`);
352
+ else if (by < 0)
353
+ out.push(`${at}.default.by is above 0 — the stepper opens going forward; Back is the person's`);
354
+ }
355
+ }
356
+ }
357
+ if (c.text === undefined && c.recipients === undefined && c.clockStep === undefined && !out.length)
358
+ out.push(`${where} collects nothing — declare text, recipients, clockStep, or leave collects out`);
309
359
  return out;
310
360
  }
311
361
  /**
312
362
  * Every fault in one action declaration, as sentences — the teaching-error
313
- * pattern (15 §1.3). Empty when the declaration is sound.
363
+ * pattern. Empty when the declaration is sound.
314
364
  *
315
365
  * `specId` decides which slash grammar applies: a `core:` spec may not claim a
316
366
  * dotted name and a plugin spec may not claim a bare one, or a name outside its
317
367
  * own namespace. That rule is the whole collision guarantee.
318
368
  * @experimental
369
+ * @ruling 15 §1.3
319
370
  */
320
371
  export function actionFindings(raw, specId, at = 'contributes.actions') {
321
372
  return actionFindingsByLaw(raw, specId, at).map((f) => f.message);
@@ -543,16 +594,16 @@ export function actionsOf(doc) {
543
594
  export { ACTION_IDENTITY, ACTION_IDENTITY_MAX_LENGTH, CORE_ACTION_SPEC_ID, actionIdentity, isActionIdentity, parseActionIdentity, } from './identity.js';
544
595
  /**
545
596
  * A slash collision: two actions offered to one genre under one name. One
546
- * slash name means one action (plans/31 V2, ruled 2026-09-17): since the
597
+ * slash name means one action (ruled 2026-09-17): since the
547
598
  * identity `<spec>#<key>` is the only routing key, two specs claiming one
548
599
  * name are two actions a palette could not tell apart — a collision, not
549
- * alternatives. (Until V2 two specs sharing a *function* under one name were
600
+ * alternatives. (Until then two specs sharing a *function* under one name were
550
601
  * alternatives a binding selected among; the function is gone, and so is the
551
602
  * exemption.) A plugin's names are namespaced (`acme.roll`), so a plugin
552
603
  * declaring the same `key` as a core verb is a different identity under a
553
604
  * different name, and never shadows it.
554
605
  *
555
- * Core's verbs hold their names first (U5c review, S1): every genre the list
606
+ * Core's verbs hold their names first: every genre the list
556
607
  * touches is seeded with `CORE_ACTIONS` under `core`, so a core spec claiming
557
608
  * `/retry` collides with the verb rather than shadowing it in the palette. (A
558
609
  * plugin spec cannot claim a bare name at all — that is the grammar's job.)
@@ -561,6 +612,7 @@ export { ACTION_IDENTITY, ACTION_IDENTITY_MAX_LENGTH, CORE_ACTION_SPEC_ID, actio
561
612
  * document, `announce.build()` inside one package, and the host across every
562
613
  * published spec of an install (a boot-time refusal).
563
614
  * @experimental
615
+ * @ruling plans/31 V2, U5c review, S1
564
616
  */
565
617
  export function slashCollisions(actions) {
566
618
  const seen = new Map();
@@ -618,12 +670,13 @@ export function actionDocumentFindingsByLaw(doc) {
618
670
  }
619
671
  /**
620
672
  * The sentences beside a grey core verb, as locale maps — the `reason` of
621
- * each verb's enabled-when below (U5e). One vocabulary: the host's chips,
673
+ * each verb's enabled-when below. One vocabulary: the host's chips,
622
674
  * menus and palette read these through the verdict, and a refusal at the
623
675
  * door says the same words. The two conditions that are NOT published
624
676
  * values — an edit in progress, the audience — keep their sentences on the
625
677
  * client (`messageVerbState.ts`).
626
678
  * @internal
679
+ * @ruling U5e
627
680
  */
628
681
  export const CORE_VERB_REASONS = Object.freeze({
629
682
  generating: { en: 'wait for the reply to finish' },
@@ -645,8 +698,9 @@ const NEWEST = { on: 'item.isNewest', truthy: true, reason: CORE_VERB_REASONS.no
645
698
  /**
646
699
  * The row is a reply — retry, extend and swipe write a reply over the row,
647
700
  * so on the author's own line (`role: 'user'`) they would overwrite what the
648
- * author wrote with the narrator's prose (F1, every persona-less genre). Keyed
701
+ * author wrote with the narrator's prose (in every persona-less genre). Keyed
649
702
  * on the role, never on a persona: a persona-less author line has none.
703
+ * @ruling F1
650
704
  */
651
705
  const REPLY = { on: 'item.role', equals: 'assistant', reason: CORE_VERB_REASONS.ownLine };
652
706
  /** @internal */
@@ -41,12 +41,13 @@
41
41
  * declaration, so a field can only ever describe its own package's document.
42
42
  * Core's own keys are core-catalog's `CORE_ANNEX_FIELDS`, under `core`.
43
43
  *
44
- * Never credentials or personal data (R61): a shape holding a `secret`
44
+ * Never credentials or personal data: a shape holding a `secret`
45
45
  * anywhere is refused at the declaration.
46
46
  *
47
47
  * @experimental 🚧 provisional — the vocabulary (annex field, annex
48
48
  * declaration, settable, the `<owner>:annex#<key>` identity) is new with this
49
49
  * module.
50
+ * @ruling R61
50
51
  */
51
52
  import { type FieldDecl, type SettingsSchema } from './settings.js';
52
53
  import { type I18n } from './i18n.js';
@@ -69,9 +70,10 @@ export interface AnnexFieldDecl {
69
70
  /** What the value must be — the settings vocabulary's `FieldDecl`, checked by `checkValues`. */
70
71
  readonly shape: FieldDecl;
71
72
  /**
72
- * Who may SEE the stored value besides pipelines (R57) — a data
73
+ * Who may SEE the stored value besides pipelines — a data
73
74
  * audience (participant references). `[]` (the default) is
74
- * pipelines only (R59): a widget cannot read back a value nobody may see.
75
+ * pipelines only: a widget cannot read back a value nobody may see.
76
+ * @ruling R57, R59
75
77
  */
76
78
  readonly see: readonly string[];
77
79
  /**
@@ -165,7 +167,9 @@ export declare const isSettableAnnexField: (f: Pick<AnnexFieldDecl, 'act'>) => b
165
167
  * An owner's annex schema — key → declared shape — for a session of `genre`
166
168
  * (or every genre, with none). Undefined when the owner is unknown here; `{}`
167
169
  * when it declares nothing. What a typed template reads `annex.<owner>.<key>`
168
- * against (typed-templates §1b, P6). @experimental
170
+ * against.
171
+ * @experimental
172
+ * @ruling typed-templates §1b, P6
169
173
  */
170
174
  export declare function annexSchemaOf(owner: string, genre?: string): SettingsSchema | undefined;
171
175
  /**
@@ -41,12 +41,13 @@
41
41
  * declaration, so a field can only ever describe its own package's document.
42
42
  * Core's own keys are core-catalog's `CORE_ANNEX_FIELDS`, under `core`.
43
43
  *
44
- * Never credentials or personal data (R61): a shape holding a `secret`
44
+ * Never credentials or personal data: a shape holding a `secret`
45
45
  * anywhere is refused at the declaration.
46
46
  *
47
47
  * @experimental 🚧 provisional — the vocabulary (annex field, annex
48
48
  * declaration, settable, the `<owner>:annex#<key>` identity) is new with this
49
49
  * module.
50
+ * @ruling R61
50
51
  */
51
52
  import { dataAudienceFindings, isParticipantRef } from './participants.js';
52
53
  import { checkSchema, checkValues } from './settings.js';
@@ -257,7 +258,9 @@ export const isSettableAnnexField = (f) => !!f.act?.length;
257
258
  * An owner's annex schema — key → declared shape — for a session of `genre`
258
259
  * (or every genre, with none). Undefined when the owner is unknown here; `{}`
259
260
  * when it declares nothing. What a typed template reads `annex.<owner>.<key>`
260
- * against (typed-templates §1b, P6). @experimental
261
+ * against.
262
+ * @experimental
263
+ * @ruling typed-templates §1b, P6
261
264
  */
262
265
  export function annexSchemaOf(owner, genre) {
263
266
  const fields = declarations.get(owner);