@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.
- package/README.md +24 -20
- package/dist/actions.d.ts +150 -68
- package/dist/actions.js +90 -36
- package/dist/annexFields.d.ts +8 -4
- package/dist/annexFields.js +5 -2
- package/dist/announce.d.ts +78 -28
- package/dist/announce.js +14 -5
- package/dist/attributes.d.ts +9 -6
- package/dist/attributes.js +9 -5
- package/dist/bands.d.ts +41 -6
- package/dist/bands.js +83 -33
- package/dist/builder.d.ts +161 -58
- package/dist/builder.js +128 -22
- package/dist/candidates.d.ts +5 -3
- package/dist/candidates.js +3 -2
- package/dist/clauses.d.ts +2 -1
- package/dist/clauses.js +2 -1
- package/dist/component.d.ts +24 -7
- package/dist/component.js +16 -6
- package/dist/componentBuild.d.ts +16 -5
- package/dist/componentBuild.js +14 -5
- package/dist/componentClient.d.ts +61 -30
- package/dist/componentClient.js +11 -1
- package/dist/componentImports.d.ts +8 -5
- package/dist/componentImports.js +23 -4
- package/dist/componentModule.js +2 -1
- package/dist/componentWire.d.ts +2 -1
- package/dist/componentWire.js +34 -2
- package/dist/config.d.ts +28 -14
- package/dist/config.js +20 -10
- package/dist/connections.d.ts +9 -4
- package/dist/connections.js +7 -4
- package/dist/declarations.d.ts +46 -17
- package/dist/declarations.js +46 -15
- package/dist/descriptors.d.ts +242 -97
- package/dist/descriptors.js +145 -41
- package/dist/dev.d.ts +6 -5
- package/dist/dev.js +6 -5
- package/dist/document.d.ts +74 -25
- package/dist/document.js +32 -11
- package/dist/dowry.d.ts +241 -0
- package/dist/dowry.js +315 -0
- package/dist/engines.d.ts +16 -7
- package/dist/engines.js +6 -4
- package/dist/eventMapLaws.d.ts +19 -8
- package/dist/eventMapLaws.js +9 -6
- package/dist/events.d.ts +101 -39
- package/dist/events.js +106 -33
- package/dist/executor.d.ts +122 -41
- package/dist/executor.js +195 -96
- package/dist/extension.d.ts +99 -35
- package/dist/extension.js +43 -9
- package/dist/facets.d.ts +2 -1
- package/dist/facets.js +4 -2
- package/dist/foldedSections.d.ts +4 -2
- package/dist/foldedSections.js +2 -1
- package/dist/genres.d.ts +123 -41
- package/dist/genres.js +127 -22
- package/dist/guardedConnection.d.ts +4 -3
- package/dist/guardedConnection.js +4 -3
- package/dist/handlebarsReach.d.ts +1 -1
- package/dist/handlebarsReach.js +1 -1
- package/dist/hash.d.ts +16 -5
- package/dist/hash.js +14 -4
- package/dist/hookGrants.d.ts +3 -2
- package/dist/hookGrants.js +6 -4
- package/dist/hooks.d.ts +21 -16
- package/dist/hooks.js +12 -10
- package/dist/hostElements.d.ts +41 -17
- package/dist/hostElements.js +49 -17
- package/dist/i18n.d.ts +5 -3
- package/dist/i18n.js +5 -3
- package/dist/identity.d.ts +5 -4
- package/dist/identity.js +5 -4
- package/dist/index.d.ts +5 -0
- package/dist/index.js +15 -0
- package/dist/layout.d.ts +36 -15
- package/dist/layout.js +2 -2
- package/dist/loadouts.d.ts +97 -0
- package/dist/loadouts.js +81 -0
- package/dist/media.d.ts +26 -4
- package/dist/media.js +2 -1
- package/dist/messageBlocks.d.ts +44 -32
- package/dist/messageBlocks.js +23 -18
- package/dist/migration.d.ts +16 -8
- package/dist/migration.js +14 -8
- package/dist/names.d.ts +2 -1
- package/dist/names.js +2 -1
- package/dist/nodeInput.d.ts +2 -1
- package/dist/nodeInput.js +2 -1
- package/dist/participants.d.ts +22 -15
- package/dist/participants.js +14 -12
- package/dist/personGate.d.ts +2 -1
- package/dist/personGate.js +2 -1
- package/dist/pluginHarness.d.ts +8 -3
- package/dist/pluginHarness.js +4 -2
- package/dist/pluginPermissions.d.ts +2 -1
- package/dist/pluginPermissions.js +12 -1
- package/dist/pluginRuleRef.d.ts +2 -2
- package/dist/pluginRuleRef.js +1 -1
- package/dist/predicates.d.ts +16 -11
- package/dist/predicates.js +7 -6
- package/dist/preview.d.ts +8 -3
- package/dist/preview.js +2 -1
- package/dist/promptBlocks.d.ts +5 -3
- package/dist/promptBlocks.js +5 -3
- package/dist/rankingDecisions.d.ts +2 -1
- package/dist/rankingDecisions.js +2 -1
- package/dist/receipt.d.ts +65 -29
- package/dist/receipt.js +9 -4
- package/dist/receiverRules.js +3 -2
- package/dist/refs.d.ts +34 -9
- package/dist/refs.js +33 -13
- package/dist/registry.d.ts +42 -23
- package/dist/registry.js +7 -5
- package/dist/review.d.ts +16 -5
- package/dist/review.js +11 -4
- package/dist/sampling.d.ts +54 -0
- package/dist/sampling.js +95 -3
- package/dist/sceneSettings.d.ts +312 -0
- package/dist/sceneSettings.js +425 -0
- package/dist/scope.d.ts +6 -4
- package/dist/scope.js +4 -3
- package/dist/scripts.d.ts +81 -14
- package/dist/scripts.js +90 -11
- package/dist/sessionDossier.d.ts +521 -0
- package/dist/sessionDossier.js +33 -0
- package/dist/sessionLayout.d.ts +303 -19
- package/dist/sessionLayout.js +354 -40
- package/dist/sessionSettings.d.ts +8 -5
- package/dist/settings.d.ts +45 -20
- package/dist/settings.js +19 -12
- package/dist/settingsSlot.d.ts +11 -8
- package/dist/settingsSlot.js +11 -8
- package/dist/shapes.d.ts +103 -41
- package/dist/shapes.js +105 -40
- package/dist/sheets.d.ts +4 -2
- package/dist/sheets.js +6 -3
- package/dist/statShapes.d.ts +2 -1
- package/dist/statShapes.js +2 -1
- package/dist/status.d.ts +13 -9
- package/dist/status.js +8 -6
- package/dist/storage.d.ts +2 -1
- package/dist/storage.js +2 -1
- package/dist/storyTime.d.ts +13 -7
- package/dist/storyTime.js +11 -6
- package/dist/strokes.d.ts +176 -0
- package/dist/strokes.js +281 -0
- package/dist/surfaces.d.ts +54 -25
- package/dist/surfaces.js +3 -3
- package/dist/template.d.ts +9 -5
- package/dist/template.js +5 -3
- package/dist/templateCheck.d.ts +2 -2
- package/dist/templateCheck.js +2 -2
- package/dist/templateFit.d.ts +37 -8
- package/dist/templateFit.js +92 -8
- package/dist/templateIds.d.ts +3 -3
- package/dist/templateIds.js +3 -3
- package/dist/templateScopeAt.d.ts +21 -11
- package/dist/templateScopeAt.js +21 -11
- package/dist/testing.d.ts +11 -4
- package/dist/testing.js +13 -5
- package/dist/tokenizers.d.ts +2 -2
- package/dist/tokenizers.js +2 -2
- package/dist/turnLock.d.ts +4 -2
- package/dist/turnLock.js +2 -1
- package/dist/turnOrder.d.ts +17 -11
- package/dist/turnOrder.js +9 -5
- package/dist/validate.d.ts +11 -8
- package/dist/validate.js +81 -10
- package/dist/values.d.ts +17 -8
- package/dist/values.js +11 -6
- package/dist/variables.d.ts +46 -7
- package/dist/variables.js +87 -6
- package/dist/verdicts.d.ts +20 -13
- package/dist/verdicts.js +17 -11
- package/dist/widgetDecls.d.ts +8 -4
- package/dist/widgetDecls.js +4 -2
- package/dist/widgets.d.ts +987 -94
- package/dist/widgets.js +93 -18
- package/dist/wire.d.ts +13 -6
- package/dist/wire.js +3 -3
- package/dist/worldinfo.d.ts +11 -6
- package/dist/worldinfo.js +8 -4
- package/host-elements.d.ts +13 -0
- package/package.json +1 -1
package/dist/events.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The event registry
|
|
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
|
|
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 type { ShapeId } from './shapes.js';
|
|
24
25
|
import type { RunLineage } from './executor.js';
|
|
@@ -30,31 +31,39 @@ export type EventFamily = 'data' | 'action';
|
|
|
30
31
|
export interface EventDef {
|
|
31
32
|
/** Autoincrement in core; opaque here. Never the reference used to sync. */
|
|
32
33
|
id: number;
|
|
33
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Unique, PK-agnostic, stable across instances and upgrades.
|
|
36
|
+
* @ruling 13 §7g
|
|
37
|
+
*/
|
|
34
38
|
slug: string;
|
|
35
39
|
version: number;
|
|
36
40
|
family: EventFamily;
|
|
37
|
-
/**
|
|
41
|
+
/**
|
|
42
|
+
* Does firing this touch a user's account or assets? Drives consent.
|
|
43
|
+
* @ruling 11 §4
|
|
44
|
+
*/
|
|
38
45
|
affectsUser: boolean;
|
|
39
46
|
/** Data events only: the consumer targets whose writes cause this event. */
|
|
40
47
|
causedBy?: string[];
|
|
41
48
|
/**
|
|
42
|
-
* A **declared root
|
|
49
|
+
* A **declared root**: the event starts from
|
|
43
50
|
* outside every pipeline — a person or the host does it — so it needs no
|
|
44
51
|
* `causedBy`. A genre may list an event only if it is caused or a declared
|
|
45
52
|
* root. Distinct from the event map's computed `root` (no `causes` edge
|
|
46
53
|
* in): `message-respond` is a declared root the auto-advance listener
|
|
47
54
|
* also causes.
|
|
55
|
+
* @ruling PLAN-turn-order §B3, C28
|
|
48
56
|
*/
|
|
49
57
|
declaredRoot?: true;
|
|
50
58
|
/**
|
|
51
|
-
* The shape of what a listener receives
|
|
59
|
+
* The shape of what a listener receives. A shape id,
|
|
52
60
|
* on the same terms as a port's: `pipeline_event_registry.payload_shape`
|
|
53
61
|
* projects it, and the field-by-field account lives on the payload
|
|
54
62
|
* interface the id names (`SessionChangePayload` for
|
|
55
63
|
* `core:shape/session-change@1`). Optional so an event whose payload is
|
|
56
64
|
* still the description's prose (`ui-action`, `schedule-tick`) registers
|
|
57
65
|
* as it always did.
|
|
66
|
+
* @ruling R-15 (2026-09-16)
|
|
58
67
|
*/
|
|
59
68
|
payload?: ShapeId;
|
|
60
69
|
/**
|
|
@@ -94,25 +103,28 @@ export declare const notADeclaredEvent: (id: string) => string;
|
|
|
94
103
|
/** @internal */
|
|
95
104
|
export declare const allEvents: () => EventDef[];
|
|
96
105
|
/**
|
|
97
|
-
* `owner:event/name@N` — the grammar every event key wears
|
|
106
|
+
* `owner:event/name@N` — the grammar every event key wears: a
|
|
98
107
|
* genre's event surface, a preset's `bindings` map and a spec's inlet lock
|
|
99
108
|
* are keyed by this and nothing else. The owner segment matches the genre
|
|
100
109
|
* id's (`core`, `acme.rp`); the name is lowercase-hyphenated; the version
|
|
101
110
|
* is a whole number.
|
|
102
111
|
* @experimental
|
|
112
|
+
* @ruling R-4
|
|
103
113
|
*/
|
|
104
114
|
export declare const EVENT_ID: RegExp;
|
|
105
115
|
/**
|
|
106
116
|
* Is this string an event id? A bare name (`message-respond`) is not, and a
|
|
107
117
|
* host that stored bare keys before the fold migrates them once — it never
|
|
108
|
-
* accepts a new one
|
|
118
|
+
* accepts a new one.
|
|
109
119
|
* @internal
|
|
120
|
+
* @ruling plans/30 §U3 review, W6
|
|
110
121
|
*/
|
|
111
122
|
export declare const isEventId: (id: string) => boolean;
|
|
112
123
|
/**
|
|
113
|
-
* The events the inter-spec cycle CTE reads
|
|
124
|
+
* The events the inter-spec cycle CTE reads. Action events are excluded by
|
|
114
125
|
* construction rather than by an exception someone has to remember.
|
|
115
126
|
* @experimental
|
|
127
|
+
* @ruling F9
|
|
116
128
|
*/
|
|
117
129
|
export declare const cycleRelevantEvents: () => EventDef[];
|
|
118
130
|
/** @experimental */
|
|
@@ -121,13 +133,14 @@ export declare function _clearEvents(): void;
|
|
|
121
133
|
* An event a package declares: something that happened, recorded by a
|
|
122
134
|
* pipeline's `record-event` write and heard by anything in its scope — for a
|
|
123
135
|
* session event, the session's bound pipelines, plugin listeners and widgets
|
|
124
|
-
*
|
|
136
|
+
* Declared once, globally, and passed by value wherever it is recorded
|
|
125
137
|
* or heard. Who may record it is the package entry's to say:
|
|
126
138
|
* `defineExtension({ events })`.
|
|
127
139
|
*
|
|
128
140
|
* ⚠ An event is a happening, never a secret: everything in the session hears
|
|
129
141
|
* its payload. Keep a secret in state, in a part whose audience is empty.
|
|
130
142
|
* @experimental
|
|
143
|
+
* @ruling R56
|
|
131
144
|
*/
|
|
132
145
|
export interface SessionEventDecl<Payload = unknown> {
|
|
133
146
|
readonly __decl: 'session-event';
|
|
@@ -156,7 +169,8 @@ export interface RecordedEventPayload<P = unknown> {
|
|
|
156
169
|
}
|
|
157
170
|
/**
|
|
158
171
|
* Declare an event your package's pipelines record. The id is under
|
|
159
|
-
* your package's slug; the payload is a shape id
|
|
172
|
+
* your package's slug; the payload is a shape id — one of core's, or one
|
|
173
|
+
* under your own slug (`defineShape`), which your manifest carries — and a pipeline that records
|
|
160
174
|
* the event is checked against it at publish. Registered on declaration, so a
|
|
161
175
|
* spec's inlet may lock on it: `.inlet('e', C.sessionEvent.v1(), { genre,
|
|
162
176
|
* events: [guessed] })`.
|
|
@@ -197,9 +211,10 @@ export declare const CORE_EVENTS: {
|
|
|
197
211
|
* A row was finished or rewritten by a pipeline's own write. A regenerate,
|
|
198
212
|
* a swipe's fresh alternative and an extend are THIS event with `verb`
|
|
199
213
|
* on the payload — `regenerate` · `swipe` · `extend` — rather than three
|
|
200
|
-
* events of their own
|
|
214
|
+
* events of their own: each is the genre's pipeline
|
|
201
215
|
* producing text plus core's rewrite of the row, and the rewrite is one
|
|
202
216
|
* outlet. A plain reply's finishing write carries no `verb`.
|
|
217
|
+
* @ruling R-15 (2026-09-16)
|
|
203
218
|
*/
|
|
204
219
|
readonly messageUpdated: EventDef;
|
|
205
220
|
readonly messageDeleted: EventDef;
|
|
@@ -207,18 +222,20 @@ export declare const CORE_EVENTS: {
|
|
|
207
222
|
readonly messageEdited: EventDef;
|
|
208
223
|
readonly messageSwiped: EventDef;
|
|
209
224
|
/**
|
|
210
|
-
* A line's **shown sprite** changed
|
|
225
|
+
* A line's **shown sprite** changed: a sprite picker
|
|
211
226
|
* chose one after a reply, or a person changed it from the message menu.
|
|
212
227
|
* The payload names the line, the speaker, the `{ set, label }` now shown
|
|
213
228
|
* (null for none) and `source` — `picker` or `person`. What TTS line
|
|
214
229
|
* direction and any face-driven widget listen for.
|
|
230
|
+
* @ruling DESIGN-sprites §5.2
|
|
215
231
|
*/
|
|
216
232
|
readonly spriteShown: EventDef;
|
|
217
233
|
/**
|
|
218
|
-
* Stop is not a write outlet: it is the run-level guarantee
|
|
234
|
+
* Stop is not a write outlet: it is the run-level guarantee —
|
|
219
235
|
* core finalises the row a cancelled run was filling — so it has no
|
|
220
236
|
* `causedBy`. Emitted by the host from that finalisation, and from the
|
|
221
237
|
* message's own Stop when it releases the row first.
|
|
238
|
+
* @ruling R-17
|
|
222
239
|
*/
|
|
223
240
|
readonly messageStopped: EventDef;
|
|
224
241
|
readonly sessionBranched: EventDef;
|
|
@@ -250,7 +267,8 @@ export declare const CORE_EVENTS: {
|
|
|
250
267
|
* on; it is therefore not a declared root, though a person's write also
|
|
251
268
|
* starts it (as the auto-advance listener also causes `message-respond`).
|
|
252
269
|
* ⚠ Never emitted by `writeTurnOrder`, which is raw SQL for exactly this
|
|
253
|
-
* reason
|
|
270
|
+
* reason.
|
|
271
|
+
* @ruling §3
|
|
254
272
|
*/
|
|
255
273
|
readonly sessionUpdated: EventDef;
|
|
256
274
|
/**
|
|
@@ -271,24 +289,52 @@ export declare const CORE_EVENTS: {
|
|
|
271
289
|
* rest.
|
|
272
290
|
*/
|
|
273
291
|
readonly annexChanged: EventDef;
|
|
292
|
+
/**
|
|
293
|
+
* 🚧 The session's **backdrop** changed: a pipeline set it through
|
|
294
|
+
* `core:outlet/set-backdrop@1`, or a person set or cleared it from the
|
|
295
|
+
* Backdrop widget. The payload carries the file now shown (null when
|
|
296
|
+
* cleared) and the one before. ⚠ Not the app background, not a message
|
|
297
|
+
* attachment.
|
|
298
|
+
* @ruling DESIGN-image-generation §6.4, §9.4
|
|
299
|
+
*/
|
|
300
|
+
readonly backdropSet: EventDef;
|
|
301
|
+
/**
|
|
302
|
+
* 🚧 Pictures were filed as a card's **sprites** by
|
|
303
|
+
* `core:outlet/attach-sprite@1` (the Sprite set fill). About a CARD, not a session: no session row is written, and the
|
|
304
|
+
* payload names the character, the sprite set, each sprite label with the
|
|
305
|
+
* sprite row it gained (`attached: [{ label, spriteId }]`) and the labels
|
|
306
|
+
* that came back with no picture (`missing`).
|
|
307
|
+
* @ruling DESIGN-image-generation §6.3
|
|
308
|
+
*/
|
|
309
|
+
readonly spritesAttached: EventDef;
|
|
310
|
+
/**
|
|
311
|
+
* 🚧 Pictures were offered to a card's **gallery** by
|
|
312
|
+
* `core:outlet/offer-media@1` (Portrait).
|
|
313
|
+
* About a CARD, not a session: no session row is written, and the payload
|
|
314
|
+
* names the character and each picture placed (`offered: [{ mediaId,
|
|
315
|
+
* key }]`). Nothing was chosen: the avatar and likeness are untouched.
|
|
316
|
+
* @ruling DESIGN-image-generation §6.2
|
|
317
|
+
*/
|
|
318
|
+
readonly mediaOffered: EventDef;
|
|
274
319
|
/**
|
|
275
320
|
* Not a write's event: the marker the `sessionChanges` list ends with when
|
|
276
|
-
* more than fifty changes waited between two replies
|
|
321
|
+
* more than fifty changes waited between two replies. The
|
|
277
322
|
* newest fifty are delivered and this one entry says how many older ones
|
|
278
323
|
* were not, so a pipeline can tell a full list from a truncated one. Never
|
|
279
324
|
* written to `session_changes` and never on a receipt's `emitted` — no
|
|
280
325
|
* `causedBy`, because no outlet causes it.
|
|
326
|
+
* @ruling U5b review S1
|
|
281
327
|
*/
|
|
282
328
|
readonly sessionChangesTruncated: EventDef;
|
|
283
329
|
/**
|
|
284
330
|
* A **form** — a `choices` or `form` block a message carries — was
|
|
285
|
-
* addressed to a participant the AI portrays this turn
|
|
286
|
-
* R-21 (5); 30 §U5d). Caused by the write that carried the block, and
|
|
331
|
+
* addressed to a participant the AI portrays this turn. Caused by the write that carried the block, and
|
|
287
332
|
* dispatched through the same path as the lifecycle events, so every
|
|
288
333
|
* answer run is a child of the run that asked (`parentRunId`,
|
|
289
|
-
* `rootRunId`, `depth`) and
|
|
334
|
+
* `rootRunId`, `depth`) and the run tree's cycle caps hold: a form whose answer
|
|
290
335
|
* asks another form stops at the depth cap, receipted. A form addressed
|
|
291
336
|
* to a person is no event: the block waits for the click.
|
|
337
|
+
* @ruling R-15 *Forms*, R-21 (5), 30 §U5d, 01 §8
|
|
292
338
|
*/
|
|
293
339
|
readonly formAddressed: EventDef;
|
|
294
340
|
/**
|
|
@@ -299,17 +345,17 @@ export declare const CORE_EVENTS: {
|
|
|
299
345
|
*/
|
|
300
346
|
readonly formAnswered: EventDef;
|
|
301
347
|
/**
|
|
302
|
-
* A form was **superseded
|
|
303
|
-
* §U5f): the channel head moved past the turn it was issued at before it
|
|
348
|
+
* A form was **superseded**: the channel head moved past the turn it was issued at before it
|
|
304
349
|
* was answered, and a press on it reached the door. Recorded ONCE per
|
|
305
350
|
* block, the first time the door sees it stale, so the next reply's
|
|
306
351
|
* inlet learns the question lapsed — not on every render, and never by a
|
|
307
352
|
* render. No outlet causes it: the door does, like the truncation marker.
|
|
353
|
+
* @ruling plans/29 R-15 *Staleness and order*, 30 §U5f
|
|
308
354
|
*/
|
|
309
355
|
readonly formSuperseded: EventDef;
|
|
310
356
|
readonly loreEntryCreated: EventDef;
|
|
311
357
|
/**
|
|
312
|
-
* Two lore entries were linked
|
|
358
|
+
* Two lore entries were linked — a room's exit, who keeps
|
|
313
359
|
* what, what stands near what.
|
|
314
360
|
*
|
|
315
361
|
* Its own event rather than `lore-entry-created`: a link is not an entry,
|
|
@@ -318,9 +364,9 @@ export declare const CORE_EVENTS: {
|
|
|
318
364
|
*
|
|
319
365
|
* ⚠ It declares no payload shape — it rides the run's receipt as caused by
|
|
320
366
|
* the outlet, and the link itself (its name, its words both ways) is the
|
|
321
|
-
* outlet's `linkId` row, read where it is needed
|
|
322
|
-
* 2026-09-29). An idempotent repeat that found the standing row wrote
|
|
367
|
+
* outlet's `linkId` row, read where it is needed. An idempotent repeat that found the standing row wrote
|
|
323
368
|
* nothing, and causes no event (`written: false`).
|
|
369
|
+
* @ruling L2 (2026-09-17), places plan B2 (2026-09-29)
|
|
324
370
|
*/
|
|
325
371
|
readonly loreLinkCreated: EventDef;
|
|
326
372
|
readonly graphProposalCreated: EventDef;
|
|
@@ -328,37 +374,42 @@ export declare const CORE_EVENTS: {
|
|
|
328
374
|
readonly sessionCreated: EventDef;
|
|
329
375
|
/** The primary turn. A swipe is this pipeline re-run, not a new event. */
|
|
330
376
|
readonly messageRespond: EventDef;
|
|
331
|
-
/**
|
|
377
|
+
/**
|
|
378
|
+
* Arbitrary buttons/triggers — the contributed functions surface.
|
|
379
|
+
* @ruling 19 §3
|
|
380
|
+
*/
|
|
332
381
|
readonly sessionAction: EventDef;
|
|
333
382
|
readonly memberAdded: EventDef;
|
|
334
383
|
readonly memberRemoved: EventDef;
|
|
335
384
|
/**
|
|
336
|
-
* A UI action asked for a run
|
|
385
|
+
* A UI action asked for a run. Carrying both users is what answers the
|
|
337
386
|
* budget-owner question without a separate rule: **budget and quota attach to the
|
|
338
387
|
* owner; the receipt's attribution records the trigger.** Group sessions need no
|
|
339
388
|
* special case.
|
|
340
389
|
*
|
|
341
390
|
* ⏳ Overlaps `session-action` since the fold (a contributed action IS a UI
|
|
342
|
-
* action). Kept because
|
|
343
|
-
*
|
|
344
|
-
* action model
|
|
391
|
+
* action). Kept because the owner/trigger split (`UiActionPayload`) has
|
|
392
|
+
* no other home yet; nothing subscribes to it. Retire when the
|
|
393
|
+
* action model gives the payload one.
|
|
394
|
+
* @ruling 13 §7, ruling 49, 30 §U5
|
|
345
395
|
*/
|
|
346
396
|
readonly uiAction: EventDef;
|
|
347
397
|
/**
|
|
348
|
-
* The path for scheduled model work
|
|
349
|
-
*
|
|
398
|
+
* The path for scheduled model work. No callable may call an oracle,
|
|
399
|
+
* and lifecycle callbacks may not trigger pipelines, so nightly
|
|
350
400
|
* summarization subscribes here instead — which also puts it on the consent
|
|
351
401
|
* screen, where a lifecycle callback doing the same work would have been
|
|
352
402
|
* invisible. Serene Pub emits it hourly (`cadence: 'hourly'`, `scheduledFor`
|
|
353
403
|
* the ISO instant it was due, `scope: 'pub'`), only to subscribed,
|
|
354
404
|
* granted listeners; `SCHEDULED_WORK_PATH` names it.
|
|
405
|
+
* @ruling 13 §7c, F32
|
|
355
406
|
*/
|
|
356
407
|
readonly scheduleTick: EventDef;
|
|
357
408
|
};
|
|
358
409
|
/**
|
|
359
410
|
* One **session change** — the payload of every built-in write's event
|
|
360
411
|
* (`core:shape/session-change@1`), and one entry of the `sessionChanges`
|
|
361
|
-
* list the next reply's inlet publishes
|
|
412
|
+
* list the next reply's inlet publishes. The fields past `at` are per
|
|
362
413
|
* event; every one is additive and a reader keys on `event` before reaching
|
|
363
414
|
* for them.
|
|
364
415
|
*
|
|
@@ -375,9 +426,10 @@ export declare const CORE_EVENTS: {
|
|
|
375
426
|
* the event, the ids and the rest of the payload, so the ledger still says a
|
|
376
427
|
* line was deleted without holding the line indefinitely. A run's receipt
|
|
377
428
|
* keeps what the outlet published under the receipt's own retention.
|
|
429
|
+
* @ruling R-15
|
|
378
430
|
*/
|
|
379
431
|
/**
|
|
380
|
-
* Why a session event fired
|
|
432
|
+
* Why a session event fired — on every session
|
|
381
433
|
* event's payload since 2026-09-21. The auto-advance listener keys on it:
|
|
382
434
|
* a `user` cause may fire the head turn, an auto `run` cause may fire the
|
|
383
435
|
* next, and `edit` / `settings` / `system` never fire anything. An open
|
|
@@ -390,6 +442,7 @@ export declare const CORE_EVENTS: {
|
|
|
390
442
|
* userId }`; settings and cast toggles → `{ kind: 'settings', userId }`;
|
|
391
443
|
* boot, migration and the importer → `{ kind: 'system' }`.
|
|
392
444
|
* @experimental
|
|
445
|
+
* @ruling PLAN-turn-order §4.1
|
|
393
446
|
*/
|
|
394
447
|
export interface EventCause {
|
|
395
448
|
/** Open string; core values: user | run | edit | settings | system. */
|
|
@@ -420,8 +473,9 @@ export interface SessionChangePayload {
|
|
|
420
473
|
/**
|
|
421
474
|
* `message-edited` and `message-swiped`: what was showing before; on
|
|
422
475
|
* `message-updated` with `verb: regenerate`, the reply the regenerate
|
|
423
|
-
* replaced
|
|
476
|
+
* replaced. `content` is nulled on the stored row once
|
|
424
477
|
* consumed.
|
|
478
|
+
* @ruling U5b review W3
|
|
425
479
|
*/
|
|
426
480
|
previous?: {
|
|
427
481
|
content: string | null;
|
|
@@ -435,6 +489,12 @@ export interface SessionChangePayload {
|
|
|
435
489
|
verb?: 'regenerate' | 'swipe' | 'extend';
|
|
436
490
|
/** `session-changes-truncated`: how many older changes the list did not carry. */
|
|
437
491
|
dropped?: number;
|
|
492
|
+
/**
|
|
493
|
+
* 🚧 `backdrop-set`: the session's backdrop now, as its file id — null
|
|
494
|
+
* when it was cleared — and the one it replaced.
|
|
495
|
+
*/
|
|
496
|
+
backdropMediaId?: number | null;
|
|
497
|
+
previousBackdropMediaId?: number | null;
|
|
438
498
|
/** `message-stopped`: how much of the reply had arrived. */
|
|
439
499
|
textLength?: number;
|
|
440
500
|
/**
|
|
@@ -470,12 +530,13 @@ export interface SessionChangePayload {
|
|
|
470
530
|
* (`character:<id>` · `persona:<id>` · `envoy:<slug>`); `change` says which
|
|
471
531
|
* column, open so a host may name one this release does not. `'enabled'` is
|
|
472
532
|
* the seat switched on or off (`value` is the new boolean; renamed from
|
|
473
|
-
* `'active'` 2026-09-28
|
|
533
|
+
* `'active'` 2026-09-28).
|
|
474
534
|
*
|
|
475
|
-
* `member-added` / `member-removed` carry the same payload
|
|
476
|
-
*
|
|
535
|
+
* `member-added` / `member-removed` carry the same payload:
|
|
536
|
+
* `change: 'added' | 'removed'`, so one inlet reads every seat
|
|
477
537
|
* change — an envoy's included — the same way.
|
|
478
538
|
* @experimental
|
|
539
|
+
* @ruling NOMENCLATURE §25, R31
|
|
479
540
|
*/
|
|
480
541
|
export interface CastChangePayload {
|
|
481
542
|
event: string;
|
|
@@ -489,11 +550,12 @@ export interface CastChangePayload {
|
|
|
489
550
|
value?: unknown;
|
|
490
551
|
}
|
|
491
552
|
/**
|
|
492
|
-
* The payload of `core:event/annex-changed@1` (`core:shape/annex-change@1
|
|
493
|
-
*
|
|
553
|
+
* The payload of `core:event/annex-changed@1` (`core:shape/annex-change@1`):
|
|
554
|
+
* which owner's annex entry changed. The value itself is not carried —
|
|
494
555
|
* a spec reads it through `core:query/session-annex@1`, so the event stays
|
|
495
556
|
* small and never races the row.
|
|
496
557
|
* @experimental
|
|
558
|
+
* @ruling R30
|
|
497
559
|
*/
|
|
498
560
|
export interface AnnexChangePayload {
|
|
499
561
|
event: string;
|