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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +24 -20
  2. package/dist/actions.d.ts +150 -68
  3. package/dist/actions.js +90 -36
  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 +195 -96
  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 +5 -4
  74. package/dist/identity.js +5 -4
  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 +103 -41
  136. package/dist/shapes.js +105 -40
  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/events.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The event registry (01 §8 / F8, 13 §7 and §7g).
2
+ * The event registry.
3
3
  *
4
4
  * No node emits: a write causes the event its outlet declares. Core's events are a
5
5
  * closed set; a package declares its own with `defineSessionEvent()` and records one
@@ -17,8 +17,9 @@
17
17
  * mappings, so it participates in the write → event → subscription cycle check.
18
18
  * An *action* event says someone asked — a click, a scheduler tick. It has no write
19
19
  * targets, so it drops out of the cycle graph instead of needing an exception.
20
- * Without the distinction, `ui-action` would either blur F8's "occurrences core
20
+ * Without the distinction, `ui-action` would either blur "occurrences core
21
21
  * observes" or need a special case in the CTE.
22
+ * @ruling 01 §8 / F8, 13 §7 and §7g
22
23
  */
23
24
  import { refuseUnlessIdentical } from './hash.js';
24
25
  import { S, getShape } from './shapes.js';
@@ -36,10 +37,10 @@ export function defineEvent(def) {
36
37
  const e = { ...def, id: existing?.id ?? nextId, ownerPluginId: null };
37
38
  if (existing)
38
39
  refuseUnlessIdentical(existing, e, `duplicate event slug '${def.slug}' — slugs are unique because they are the ` +
39
- `reference used to sync seeded rows across pubs (13 §7g)`);
40
+ `reference used to sync seeded rows across pubs`);
40
41
  if (def.family === 'action' && def.causedBy?.length) {
41
42
  throw new Error(`action event '${def.slug}' declares causedBy. Action events are requests, not ` +
42
- `consequences of a write — that is what keeps them out of the cycle graph (13 §7)`);
43
+ `consequences of a write — that is what keeps them out of the cycle graph`);
43
44
  }
44
45
  if (def.declaredRoot && def.causedBy?.length) {
45
46
  throw new Error(`event '${def.slug}' is a declared root and declares causedBy — a root starts outside ` +
@@ -78,25 +79,28 @@ export const notADeclaredEvent = (id) => `'${id}' is not a declared event — co
78
79
  /** @internal */
79
80
  export const allEvents = () => [...bySlug.values()];
80
81
  /**
81
- * `owner:event/name@N` — the grammar every event key wears since R-4: a
82
+ * `owner:event/name@N` — the grammar every event key wears: a
82
83
  * genre's event surface, a preset's `bindings` map and a spec's inlet lock
83
84
  * are keyed by this and nothing else. The owner segment matches the genre
84
85
  * id's (`core`, `acme.rp`); the name is lowercase-hyphenated; the version
85
86
  * is a whole number.
86
87
  * @experimental
88
+ * @ruling R-4
87
89
  */
88
90
  export const EVENT_ID = /^[a-z0-9]+(?:[.-][a-z0-9]+)*:event\/[a-z0-9]+(?:-[a-z0-9]+)*@\d+$/;
89
91
  /**
90
92
  * Is this string an event id? A bare name (`message-respond`) is not, and a
91
93
  * host that stored bare keys before the fold migrates them once — it never
92
- * accepts a new one (plans/30 §U3 review, W6).
94
+ * accepts a new one.
93
95
  * @internal
96
+ * @ruling plans/30 §U3 review, W6
94
97
  */
95
98
  export const isEventId = (id) => EVENT_ID.test(id);
96
99
  /**
97
- * The events the inter-spec cycle CTE reads (F9). Action events are excluded by
100
+ * The events the inter-spec cycle CTE reads. Action events are excluded by
98
101
  * construction rather than by an exception someone has to remember.
99
102
  * @experimental
103
+ * @ruling F9
100
104
  */
101
105
  export const cycleRelevantEvents = () => allEvents().filter((e) => e.family === 'data');
102
106
  /** @experimental */
@@ -112,7 +116,8 @@ const packageEventViews = new Map();
112
116
  export const RECORDED_EVENT_SHAPE = 'core:shape/recorded-event@1';
113
117
  /**
114
118
  * Declare an event your package's pipelines record. The id is under
115
- * your package's slug; the payload is a shape id, and a pipeline that records
119
+ * your package's slug; the payload is a shape id — one of core's, or one
120
+ * under your own slug (`defineShape`), which your manifest carries — and a pipeline that records
116
121
  * the event is checked against it at publish. Registered on declaration, so a
117
122
  * spec's inlet may lock on it: `.inlet('e', C.sessionEvent.v1(), { genre,
118
123
  * events: [guessed] })`.
@@ -131,11 +136,15 @@ export function defineSessionEvent(d) {
131
136
  const payloadId = typeof d.payload === 'string' ? d.payload : d.payload?.id;
132
137
  if (!payloadId || !getShape(payloadId))
133
138
  throw new Error(`event '${d.id}': payload '${String(payloadId)}' is not a registered shape — pass one of S.*`);
134
- // The declaration travels as data in the manifest and a package's own
135
- // shapes do not, so an instance could not re-declare the event.
136
- if (!payloadId.startsWith('core:'))
137
- throw new Error(`event '${d.id}': payload '${payloadId}' is your package's own shape, which an installed ` +
138
- `package cannot carry yet — use S.json and check the payload in the listener`);
139
+ // The declaration travels as data in the manifest, and so do the
140
+ // package's own shapes (`manifest.shapes`): an instance registers those
141
+ // first, then re-declares the event. Another package's shape travels in
142
+ // nobody's manifest here, so an instance without it could not.
143
+ const eventNs = d.id.slice(0, d.id.indexOf(':'));
144
+ if (!payloadId.startsWith('core:') && !payloadId.startsWith(`${eventNs}:shape/`))
145
+ throw new Error(`event '${d.id}': payload '${payloadId}' is another package's shape — an event's payload ` +
146
+ `is one of core's shapes (S.*) or your own ('${eventNs}:shape/<name>@<version>'), which ` +
147
+ `travels in your manifest`);
139
148
  const decl = Object.freeze({
140
149
  __decl: 'session-event',
141
150
  id: d.id,
@@ -226,9 +235,10 @@ export const CORE_EVENTS = {
226
235
  * A row was finished or rewritten by a pipeline's own write. A regenerate,
227
236
  * a swipe's fresh alternative and an extend are THIS event with `verb`
228
237
  * on the payload — `regenerate` · `swipe` · `extend` — rather than three
229
- * events of their own (R-15, 2026-09-16): each is the genre's pipeline
238
+ * events of their own: each is the genre's pipeline
230
239
  * producing text plus core's rewrite of the row, and the rewrite is one
231
240
  * outlet. A plain reply's finishing write carries no `verb`.
241
+ * @ruling R-15 (2026-09-16)
232
242
  */
233
243
  messageUpdated: defineEvent({
234
244
  slug: 'message-updated',
@@ -285,11 +295,12 @@ export const CORE_EVENTS = {
285
295
  description: 'A different alternative of a message was selected, or a new one recorded. The payload carries the alternative that was showing and the index now selected.',
286
296
  }),
287
297
  /**
288
- * A line's **shown sprite** changed (DESIGN-sprites §5.2): a sprite picker
298
+ * A line's **shown sprite** changed: a sprite picker
289
299
  * chose one after a reply, or a person changed it from the message menu.
290
300
  * The payload names the line, the speaker, the `{ set, label }` now shown
291
301
  * (null for none) and `source` — `picker` or `person`. What TTS line
292
302
  * direction and any face-driven widget listen for.
303
+ * @ruling DESIGN-sprites §5.2
293
304
  */
294
305
  spriteShown: defineEvent({
295
306
  slug: 'sprite-shown',
@@ -302,10 +313,11 @@ export const CORE_EVENTS = {
302
313
  description: "A line's sprite changed — chosen by a sprite picker after a reply, or by a person. The payload carries the set and label now shown and who chose it.",
303
314
  }),
304
315
  /**
305
- * Stop is not a write outlet: it is the run-level guarantee (R-17) —
316
+ * Stop is not a write outlet: it is the run-level guarantee —
306
317
  * core finalises the row a cancelled run was filling — so it has no
307
318
  * `causedBy`. Emitted by the host from that finalisation, and from the
308
319
  * message's own Stop when it releases the row first.
320
+ * @ruling R-17
309
321
  */
310
322
  messageStopped: defineEvent({
311
323
  slug: 'message-stopped',
@@ -380,7 +392,8 @@ export const CORE_EVENTS = {
380
392
  * on; it is therefore not a declared root, though a person's write also
381
393
  * starts it (as the auto-advance listener also causes `message-respond`).
382
394
  * ⚠ Never emitted by `writeTurnOrder`, which is raw SQL for exactly this
383
- * reason (§3).
395
+ * reason.
396
+ * @ruling §3
384
397
  */
385
398
  sessionUpdated: defineEvent({
386
399
  slug: 'session-updated',
@@ -428,13 +441,68 @@ export const CORE_EVENTS = {
428
441
  payload: S.annexChange,
429
442
  description: "A pipeline's own session state changed — its annex entry. The payload names the owner whose entry moved.",
430
443
  }),
444
+ /**
445
+ * 🚧 The session's **backdrop** changed: a pipeline set it through
446
+ * `core:outlet/set-backdrop@1`, or a person set or cleared it from the
447
+ * Backdrop widget. The payload carries the file now shown (null when
448
+ * cleared) and the one before. ⚠ Not the app background, not a message
449
+ * attachment.
450
+ * @ruling DESIGN-image-generation §6.4, §9.4
451
+ */
452
+ backdropSet: defineEvent({
453
+ slug: 'backdrop-set',
454
+ name: { en: 'Backdrop set' },
455
+ version: 1,
456
+ family: 'data',
457
+ affectsUser: true,
458
+ causedBy: ['core:outlet/set-backdrop'],
459
+ payload: S.sessionChange,
460
+ description: "The session's backdrop changed — set by a pipeline or by a person, or cleared. The payload carries the picture now shown and the one before.",
461
+ }),
462
+ /**
463
+ * 🚧 Pictures were filed as a card's **sprites** by
464
+ * `core:outlet/attach-sprite@1` (the Sprite set fill). About a CARD, not a session: no session row is written, and the
465
+ * payload names the character, the sprite set, each sprite label with the
466
+ * sprite row it gained (`attached: [{ label, spriteId }]`) and the labels
467
+ * that came back with no picture (`missing`).
468
+ * @ruling DESIGN-image-generation §6.3
469
+ */
470
+ spritesAttached: defineEvent({
471
+ slug: 'sprites-attached',
472
+ name: { en: 'Sprites attached' },
473
+ version: 1,
474
+ family: 'data',
475
+ affectsUser: true,
476
+ causedBy: ['core:outlet/attach-sprite'],
477
+ payload: S.json,
478
+ description: "Pictures were filed as a card's sprites. The payload carries the character, the sprite set, each sprite label with the sprite it gained, and the labels that came back empty.",
479
+ }),
480
+ /**
481
+ * 🚧 Pictures were offered to a card's **gallery** by
482
+ * `core:outlet/offer-media@1` (Portrait).
483
+ * About a CARD, not a session: no session row is written, and the payload
484
+ * names the character and each picture placed (`offered: [{ mediaId,
485
+ * key }]`). Nothing was chosen: the avatar and likeness are untouched.
486
+ * @ruling DESIGN-image-generation §6.2
487
+ */
488
+ mediaOffered: defineEvent({
489
+ slug: 'media-offered',
490
+ name: { en: 'Pictures offered' },
491
+ version: 1,
492
+ family: 'data',
493
+ affectsUser: true,
494
+ causedBy: ['core:outlet/offer-media'],
495
+ payload: S.json,
496
+ description: "Pictures were added to a card's gallery to choose from. The payload carries the character and each picture placed, with the series key it was drawn for.",
497
+ }),
431
498
  /**
432
499
  * Not a write's event: the marker the `sessionChanges` list ends with when
433
- * more than fifty changes waited between two replies (U5b review S1). The
500
+ * more than fifty changes waited between two replies. The
434
501
  * newest fifty are delivered and this one entry says how many older ones
435
502
  * were not, so a pipeline can tell a full list from a truncated one. Never
436
503
  * written to `session_changes` and never on a receipt's `emitted` — no
437
504
  * `causedBy`, because no outlet causes it.
505
+ * @ruling U5b review S1
438
506
  */
439
507
  sessionChangesTruncated: defineEvent({
440
508
  slug: 'session-changes-truncated',
@@ -447,13 +515,13 @@ export const CORE_EVENTS = {
447
515
  }),
448
516
  /**
449
517
  * A **form** — a `choices` or `form` block a message carries — was
450
- * addressed to a participant the AI portrays this turn (R-15 *Forms*;
451
- * R-21 (5); 30 §U5d). Caused by the write that carried the block, and
518
+ * addressed to a participant the AI portrays this turn. Caused by the write that carried the block, and
452
519
  * dispatched through the same path as the lifecycle events, so every
453
520
  * answer run is a child of the run that asked (`parentRunId`,
454
- * `rootRunId`, `depth`) and 01 §8's cycle caps hold: a form whose answer
521
+ * `rootRunId`, `depth`) and the run tree's cycle caps hold: a form whose answer
455
522
  * asks another form stops at the depth cap, receipted. A form addressed
456
523
  * to a person is no event: the block waits for the click.
524
+ * @ruling R-15 *Forms*, R-21 (5), 30 §U5d, 01 §8
457
525
  */
458
526
  formAddressed: defineEvent({
459
527
  slug: 'form-addressed',
@@ -482,12 +550,12 @@ export const CORE_EVENTS = {
482
550
  description: 'A question or form in a message was answered. The payload carries the answer, who answered as whom, and the action it fired.',
483
551
  }),
484
552
  /**
485
- * A form was **superseded** (plans/29 R-15 *Staleness and order*; 30
486
- * §U5f): the channel head moved past the turn it was issued at before it
553
+ * A form was **superseded**: the channel head moved past the turn it was issued at before it
487
554
  * was answered, and a press on it reached the door. Recorded ONCE per
488
555
  * block, the first time the door sees it stale, so the next reply's
489
556
  * inlet learns the question lapsed — not on every render, and never by a
490
557
  * render. No outlet causes it: the door does, like the truncation marker.
558
+ * @ruling plans/29 R-15 *Staleness and order*, 30 §U5f
491
559
  */
492
560
  formSuperseded: defineEvent({
493
561
  slug: 'form-superseded',
@@ -508,7 +576,7 @@ export const CORE_EVENTS = {
508
576
  description: 'A lorebook entry was written.',
509
577
  }),
510
578
  /**
511
- * Two lore entries were linked (L2, 2026-09-17) — a room's exit, who keeps
579
+ * Two lore entries were linked — a room's exit, who keeps
512
580
  * what, what stands near what.
513
581
  *
514
582
  * Its own event rather than `lore-entry-created`: a link is not an entry,
@@ -517,9 +585,9 @@ export const CORE_EVENTS = {
517
585
  *
518
586
  * ⚠ It declares no payload shape — it rides the run's receipt as caused by
519
587
  * the outlet, and the link itself (its name, its words both ways) is the
520
- * outlet's `linkId` row, read where it is needed (places plan B2,
521
- * 2026-09-29). An idempotent repeat that found the standing row wrote
588
+ * outlet's `linkId` row, read where it is needed. An idempotent repeat that found the standing row wrote
522
589
  * nothing, and causes no event (`written: false`).
590
+ * @ruling L2 (2026-09-17), places plan B2 (2026-09-29)
523
591
  */
524
592
  loreLinkCreated: defineEvent({
525
593
  slug: 'lore-link-created',
@@ -560,7 +628,10 @@ export const CORE_EVENTS = {
560
628
  affectsUser: true,
561
629
  description: 'A reply was asked for — the primary turn of a session.',
562
630
  }),
563
- /** Arbitrary buttons/triggers — the contributed functions surface (19 §3). */
631
+ /**
632
+ * Arbitrary buttons/triggers — the contributed functions surface.
633
+ * @ruling 19 §3
634
+ */
564
635
  sessionAction: defineEvent({
565
636
  slug: 'session-action',
566
637
  declaredRoot: true,
@@ -593,15 +664,16 @@ export const CORE_EVENTS = {
593
664
  description: 'A character, persona or envoy left a session; the payload carries which.',
594
665
  }),
595
666
  /**
596
- * A UI action asked for a run (13 §7). Carrying both users is what answers the
667
+ * A UI action asked for a run. Carrying both users is what answers the
597
668
  * budget-owner question without a separate rule: **budget and quota attach to the
598
669
  * owner; the receipt's attribution records the trigger.** Group sessions need no
599
670
  * special case.
600
671
  *
601
672
  * ⏳ Overlaps `session-action` since the fold (a contributed action IS a UI
602
- * action). Kept because ruling 49 (`UiActionPayload`, the owner/trigger
603
- * split) has no other home yet; nothing subscribes to it. Retire when the
604
- * action model (30 §U5) gives the payload one.
673
+ * action). Kept because the owner/trigger split (`UiActionPayload`) has
674
+ * no other home yet; nothing subscribes to it. Retire when the
675
+ * action model gives the payload one.
676
+ * @ruling 13 §7, ruling 49, 30 §U5
605
677
  */
606
678
  uiAction: defineEvent({
607
679
  slug: 'ui-action',
@@ -613,13 +685,14 @@ export const CORE_EVENTS = {
613
685
  'a re-roll. Payload: sessionId, ownerUserId, actorUserId, action, modeId, input.',
614
686
  }),
615
687
  /**
616
- * The path for scheduled model work (13 §7c). No callable may call an oracle
617
- * (F32), and lifecycle callbacks may not trigger pipelines, so nightly
688
+ * The path for scheduled model work. No callable may call an oracle,
689
+ * and lifecycle callbacks may not trigger pipelines, so nightly
618
690
  * summarization subscribes here instead — which also puts it on the consent
619
691
  * screen, where a lifecycle callback doing the same work would have been
620
692
  * invisible. Serene Pub emits it hourly (`cadence: 'hourly'`, `scheduledFor`
621
693
  * the ISO instant it was due, `scope: 'pub'`), only to subscribed,
622
694
  * granted listeners; `SCHEDULED_WORK_PATH` names it.
695
+ * @ruling 13 §7c, F32
623
696
  */
624
697
  scheduleTick: defineEvent({
625
698
  slug: 'schedule-tick',