@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/genres.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Session genres
|
|
2
|
+
* Session genres — first-class declared objects with their own ids.
|
|
3
3
|
*
|
|
4
4
|
* A genre is what kind of session something is: `core:genre/chat`. It owns
|
|
5
|
-
* its id; the create pipeline is its **required member**, not its identity
|
|
6
|
-
*
|
|
5
|
+
* its id; the create pipeline is its **required member**, not its identity.
|
|
6
|
+
* The genre object declares everything a surface asks about
|
|
7
7
|
* for the life of a session — display name, family, standing shape — plus
|
|
8
8
|
* its **event surface**: which session events exist for this genre and which
|
|
9
9
|
* are required. Presets validate against that surface; dispatch keys on
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* Pipelines reference the genre object directly (`input(…, { genre: chat,
|
|
13
13
|
* event: events.messageRespond })`) — a typed reference the compiler checks,
|
|
14
14
|
* never a string retyped per spec. In the document it serializes to the id.
|
|
15
|
+
* @ruling 24 §3, 23 §7
|
|
15
16
|
*/
|
|
16
17
|
import type { WidgetDecl } from './layout.js';
|
|
17
18
|
import { type GenreLayoutDecl } from './widgetDecls.js';
|
|
@@ -23,30 +24,35 @@ import { type EnabledWhen, type EnabledWhenDecl } from './predicates.js';
|
|
|
23
24
|
/** @experimental */
|
|
24
25
|
export declare function assertGenreId(id: string): void;
|
|
25
26
|
/**
|
|
26
|
-
* The core session events
|
|
27
|
+
* The core session events, as **event ids** — `core:event/<name>@1`.
|
|
27
28
|
*
|
|
28
|
-
* Constants so the core vocabulary is typo-proof. Since
|
|
29
|
-
*
|
|
29
|
+
* Constants so the core vocabulary is typo-proof. Since 2026-09-16
|
|
30
|
+
* these ARE `CORE_EVENTS` entries (`events.ts`): one
|
|
30
31
|
* registry, and a genre's event surface, a preset's `bindings` map and a spec's
|
|
31
32
|
* inlet lock are all keyed by these ids. The bare names (`session-created`)
|
|
32
33
|
* were the keys until the fold; a host migrates its stored keys once.
|
|
33
34
|
* @public
|
|
35
|
+
* @ruling 24 §5, R-4 (ruled 2026-09-15)
|
|
34
36
|
*/
|
|
35
37
|
export declare const sessionEvents: Readonly<{
|
|
36
38
|
/** The create slot — required; exactly one pipeline per genre declares it. */
|
|
37
39
|
readonly sessionCreated: 'core:event/session-created@1';
|
|
38
40
|
/** The primary turn. A swipe is this pipeline re-run, not a new event. */
|
|
39
41
|
readonly messageRespond: 'core:event/message-respond@1';
|
|
40
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Arbitrary buttons/triggers — the existing functions surface.
|
|
44
|
+
* @ruling 19 §3
|
|
45
|
+
*/
|
|
41
46
|
readonly sessionAction: 'core:event/session-action@1';
|
|
42
47
|
/** A character or persona joined; payload carries the kind. */
|
|
43
48
|
readonly memberAdded: 'core:event/member-added@1';
|
|
44
49
|
/** A character or persona left; payload carries the kind. */
|
|
45
50
|
readonly memberRemoved: 'core:event/member-removed@1';
|
|
46
51
|
/**
|
|
47
|
-
* A form in a message was addressed to a participant the AI portrays
|
|
48
|
-
*
|
|
52
|
+
* A form in a message was addressed to a participant the AI portrays.
|
|
53
|
+
* Optional in every genre's surface: a genre that
|
|
49
54
|
* binds nothing leaves such a form waiting, as it would for a person.
|
|
55
|
+
* @ruling R-15 *Forms*, U5d
|
|
50
56
|
*/
|
|
51
57
|
readonly formAddressed: 'core:event/form-addressed@1';
|
|
52
58
|
/** A row that is not generating landed — a send, a greeting, a finished or stopped reply. */
|
|
@@ -57,7 +63,10 @@ export declare const sessionEvents: Readonly<{
|
|
|
57
63
|
readonly messageDeleted: 'core:event/message-deleted@1';
|
|
58
64
|
/** A message was hidden from the prompt, or shown again. */
|
|
59
65
|
readonly messageHidden: 'core:event/message-hidden@1';
|
|
60
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* A line's shown sprite changed — a picker's choice or a person's.
|
|
68
|
+
* @ruling DESIGN-sprites
|
|
69
|
+
*/
|
|
61
70
|
readonly spriteShown: 'core:event/sprite-shown@1';
|
|
62
71
|
/** A seated participant's row changed — active, position, visibility or portrayal. */
|
|
63
72
|
readonly castChanged: 'core:event/cast-changed@1';
|
|
@@ -70,6 +79,12 @@ export declare const sessionEvents: Readonly<{
|
|
|
70
79
|
* `core:outlet/set-session-annex@1`; the payload names the owner.
|
|
71
80
|
*/
|
|
72
81
|
readonly annexChanged: 'core:event/annex-changed@1';
|
|
82
|
+
/**
|
|
83
|
+
* 🚧 The session's backdrop was set or cleared — by
|
|
84
|
+
* `core:outlet/set-backdrop@1` or by a person.
|
|
85
|
+
* @ruling DESIGN-image-generation §6.4
|
|
86
|
+
*/
|
|
87
|
+
readonly backdropSet: 'core:event/backdrop-set@1';
|
|
73
88
|
/**
|
|
74
89
|
* `metadata.turnOrder` was written. **For typing only**: core-internal,
|
|
75
90
|
* read by the auto-advance listener and the `sessions:turnOrder` push;
|
|
@@ -80,10 +95,11 @@ export declare const sessionEvents: Readonly<{
|
|
|
80
95
|
/** @experimental */
|
|
81
96
|
export type SessionEvent = (typeof sessionEvents)[keyof typeof sessionEvents];
|
|
82
97
|
/**
|
|
83
|
-
* Why no genre may list, and no spec may lock, `turn-order-changed
|
|
84
|
-
*
|
|
98
|
+
* Why no genre may list, and no spec may lock, `turn-order-changed`:
|
|
99
|
+
* the turn-order write's own event is core-internal.
|
|
85
100
|
* One sentence for `genre()`, the builder's `.inlet()` and the package pass.
|
|
86
101
|
* @experimental
|
|
102
|
+
* @ruling PLAN-turn-order §4.1
|
|
87
103
|
*/
|
|
88
104
|
export declare const TURN_ORDER_CHANGED_IS_INTERNAL: string;
|
|
89
105
|
/** One entry of a genre's event surface. @experimental */
|
|
@@ -99,12 +115,18 @@ export interface GenreEventDecl {
|
|
|
99
115
|
/** @public */
|
|
100
116
|
export interface GenreDecl {
|
|
101
117
|
readonly id: string;
|
|
102
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* The picker card's title — a string or a locale map with `en`.
|
|
120
|
+
* @ruling R-20
|
|
121
|
+
*/
|
|
103
122
|
readonly name: I18n;
|
|
104
123
|
readonly family: string;
|
|
105
124
|
/** The picker card's subtitle. */
|
|
106
125
|
readonly description?: I18n;
|
|
107
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* The standing SessionShape every surface asks about.
|
|
128
|
+
* @ruling 19 §1
|
|
129
|
+
*/
|
|
108
130
|
readonly shape?: SessionShape;
|
|
109
131
|
/**
|
|
110
132
|
* The event surface: which events exist for this genre, and which are
|
|
@@ -153,26 +175,26 @@ export interface GenreDecl {
|
|
|
153
175
|
*/
|
|
154
176
|
readonly customAttributes?: CustomAttributes;
|
|
155
177
|
/**
|
|
156
|
-
* The **envoys** this genre brings with it (
|
|
157
|
-
*
|
|
178
|
+
* The **envoys** this genre brings with it (built 2026-09-16) — speakers
|
|
179
|
+
* that exist nowhere in
|
|
158
180
|
* the library: Serene Pub's guide, a dungeon's narrator-in-residence. An
|
|
159
181
|
* array, so a genre may offer several; the session or its preset's
|
|
160
182
|
* defaults seat one or more, and `default: true` seats one with no choice.
|
|
161
183
|
*
|
|
162
184
|
* Normalised at declaration: every entry carries `speaks` (`in-turn`
|
|
163
185
|
* unless stated), keys are unique, at most one is the default, and every
|
|
164
|
-
* `name` is display text with `en` — a string or a locale map
|
|
186
|
+
* `name` is display text with `en` — a string or a locale map. Part
|
|
165
187
|
* of the declaration's hash, so a changed envoy is a changed genre.
|
|
188
|
+
* @ruling plans/29 R-18 (2026-09-15), U5g, R-20
|
|
166
189
|
*/
|
|
167
190
|
readonly envoys?: readonly EnvoyDecl[];
|
|
168
191
|
/**
|
|
169
|
-
* 🚧 What a person's **persona-less line** is called in this genre
|
|
170
|
-
* (lair re-plan R4, owner ruling 3, 2026-09-28) — the Lair's
|
|
192
|
+
* 🚧 What a person's **persona-less line** is called in this genre — the Lair's
|
|
171
193
|
* "Dungeon Master". The counterpart to envoys: an envoy names a speaker
|
|
172
194
|
* the genre brings, this names the person at the keyboard when no persona
|
|
173
195
|
* speaks for them.
|
|
174
196
|
*
|
|
175
|
-
* Display text
|
|
197
|
+
* Display text, normalised to a locale map at the declaration.
|
|
176
198
|
* Read at render and at prompt time — the log's author name, the
|
|
177
199
|
* transcript label, `{{playerLabel}}` in every context builder — and
|
|
178
200
|
* **never stamped on a row**: it is a role, not an identity, so a rename
|
|
@@ -182,24 +204,25 @@ export interface GenreDecl {
|
|
|
182
204
|
* Refused on a genre whose `shape.personas.min` is 1 or more: a persona
|
|
183
205
|
* always names the person's line there, so nothing would ever carry it.
|
|
184
206
|
* Absent when unstated, so a genre that says nothing hashes as it did.
|
|
207
|
+
* @ruling lair re-plan R4, owner ruling 3 (2026-09-28), R-20
|
|
185
208
|
*/
|
|
186
209
|
readonly playerLabel?: LocaleMap;
|
|
187
210
|
/**
|
|
188
|
-
* The genre's **enabled-when defaults** (
|
|
211
|
+
* The genre's **enabled-when defaults** (built
|
|
189
212
|
* 2026-09-17), keyed by action **identity** — `<spec>#<key>`, and
|
|
190
|
-
* `core#<verb>` for one of core's message verbs (
|
|
191
|
-
* 2026-09-17
|
|
213
|
+
* `core#<verb>` for one of core's message verbs (it was the function key
|
|
214
|
+
* until 2026-09-17). A genre's defaults
|
|
192
215
|
* name its own actions and core's verbs; a key that is not an identity
|
|
193
216
|
* is refused at the declaration. An action that declares its own
|
|
194
217
|
* `enabledWhen` beats this; a session's binding override beats both. Each entry is the junction clause's predicate
|
|
195
218
|
* shape over the session's published values (`predicates.ts`), stored
|
|
196
219
|
* in list form with `reason` a locale map; refused at the declaration
|
|
197
220
|
* on the same terms as the envoys.
|
|
221
|
+
* @ruling plans/29 R-15, U5e, plans/31 V2 (2026-09-17)
|
|
198
222
|
*/
|
|
199
223
|
readonly enabledWhen?: Readonly<Record<string, readonly EnabledWhen[]>>;
|
|
200
224
|
/**
|
|
201
|
-
* The genre's **pinned settings**
|
|
202
|
-
* 2026-09-21) — the genre layer of the settings cascade, keyed by
|
|
225
|
+
* The genre's **pinned settings** — the genre layer of the settings cascade, keyed by
|
|
203
226
|
* setting key: `session > genre > core`.
|
|
204
227
|
*
|
|
205
228
|
* A genre that declares the field (`shape.fields[key]`) **and** pins a
|
|
@@ -208,20 +231,50 @@ export interface GenreDecl {
|
|
|
208
231
|
* declares no field renders no control, stores nothing on the session,
|
|
209
232
|
* and the pinned value is what every run reads — the replacement for a
|
|
210
233
|
* `hidden` flag. A pinned value is never stored per session.
|
|
234
|
+
* @ruling PLAN-turn-order §4.13, R14 (2026-09-21)
|
|
211
235
|
*/
|
|
212
236
|
readonly settings?: Readonly<Record<string, unknown>>;
|
|
213
237
|
/**
|
|
214
|
-
* Widgets this genre's sessions do not offer
|
|
238
|
+
* Widgets this genre's sessions do not offer — any package's, core's
|
|
215
239
|
* included, by the id the page knows them by (`widgetRef`). Declared by
|
|
216
240
|
* value (`omitWidgets: [coreWidgets.stats]`).
|
|
241
|
+
* @ruling R71
|
|
217
242
|
*/
|
|
218
243
|
readonly omitWidgets?: readonly string[];
|
|
219
|
-
/**
|
|
244
|
+
/**
|
|
245
|
+
* The layouts this genre ships; the first is its default.
|
|
246
|
+
* @ruling R71
|
|
247
|
+
*/
|
|
220
248
|
readonly layouts?: readonly GenreLayoutDecl[];
|
|
249
|
+
/**
|
|
250
|
+
* 🚧 The **summarize pipelines this genre owns** (live scenes §13,
|
|
251
|
+
* 2026-10-13): `scene` is the spec id a scene of this genre's sessions is
|
|
252
|
+
* summarized with — `core:spec/lair-summarize-scene`,
|
|
253
|
+
* `acme.phone:spec/summarize-scene`. Absent, core's default
|
|
254
|
+
* (`core:spec/summarize-scene`) runs, so a new genre summarizes on day one
|
|
255
|
+
* with nothing written.
|
|
256
|
+
*
|
|
257
|
+
* Resolution is this field, never a search: the host asks the session's
|
|
258
|
+
* genre for `summarize.scene` and runs that spec. Which channels are the
|
|
259
|
+
* story and which are asides is the SPEC's business (its source step's
|
|
260
|
+
* params), not the genre's. Absent when unstated, so a genre that says
|
|
261
|
+
* nothing hashes as it did.
|
|
262
|
+
*/
|
|
263
|
+
readonly summarize?: {
|
|
264
|
+
/**
|
|
265
|
+
* The spec a scene is summarized with — `owner:spec/<name>`. Only
|
|
266
|
+
* `scene` is read today; world, character and history summaries
|
|
267
|
+
* stay on the shared specs.
|
|
268
|
+
*/
|
|
269
|
+
readonly scene?: string;
|
|
270
|
+
};
|
|
221
271
|
}
|
|
222
272
|
/** @experimental */
|
|
223
273
|
export interface GenreProps {
|
|
224
|
-
/**
|
|
274
|
+
/**
|
|
275
|
+
* The picker card's title — a string or a locale map with `en`.
|
|
276
|
+
* @ruling R-20
|
|
277
|
+
*/
|
|
225
278
|
name: I18n;
|
|
226
279
|
family: string;
|
|
227
280
|
description?: I18n;
|
|
@@ -238,17 +291,24 @@ export interface GenreProps {
|
|
|
238
291
|
enabledWhen?: Readonly<Record<string, EnabledWhenDecl>>;
|
|
239
292
|
/** Pinned setting values — the genre layer of the cascade; see `GenreDecl.settings`. */
|
|
240
293
|
settings?: Readonly<Record<string, unknown>>;
|
|
241
|
-
/**
|
|
294
|
+
/**
|
|
295
|
+
* Widgets this genre's sessions do not offer, by value.
|
|
296
|
+
* @ruling R71
|
|
297
|
+
*/
|
|
242
298
|
omitWidgets?: readonly WidgetDecl[];
|
|
243
299
|
/** The layouts this genre ships (`layout()`); the first is its default. */
|
|
244
300
|
layouts?: readonly GenreLayoutDecl[];
|
|
301
|
+
/** 🚧 The summarize pipelines this genre owns, by spec id — see `GenreDecl.summarize`. */
|
|
302
|
+
summarize?: {
|
|
303
|
+
scene?: string;
|
|
304
|
+
};
|
|
245
305
|
}
|
|
246
306
|
/** 🚧 Whether a genre's sessions may track attributes beyond its baseline (`GenreDecl.customAttributes`). @experimental */
|
|
247
307
|
export type CustomAttributes = 'allow' | 'deny';
|
|
248
308
|
/** Does this genre let its sessions track attributes beyond its own? Unstated is `'deny'`. @experimental */
|
|
249
309
|
export declare const genreAllowsCustomAttributes: (g: GenreDecl | string) => boolean;
|
|
250
310
|
/**
|
|
251
|
-
* When an envoy speaks
|
|
311
|
+
* When an envoy speaks.
|
|
252
312
|
*
|
|
253
313
|
* · `in-turn` — a turn-taking candidate like any cast character: the turn
|
|
254
314
|
* strategies may pick it, the composer's reply may be its. The default for
|
|
@@ -257,10 +317,11 @@ export declare const genreAllowsCustomAttributes: (g: GenreDecl | string) => boo
|
|
|
257
317
|
* plugin's *Roll* reports as its envoy, and no strategy ever picks it. The
|
|
258
318
|
* only value an action's envoy may carry (`ActionDecl.envoy`).
|
|
259
319
|
* @experimental
|
|
320
|
+
* @ruling plans/29 R-21 (6)
|
|
260
321
|
*/
|
|
261
322
|
export type EnvoySpeaks = 'in-turn' | 'on-action';
|
|
262
323
|
/**
|
|
263
|
-
* A speaker a genre or a contributed action brings with it
|
|
324
|
+
* A speaker a genre or a contributed action brings with it.
|
|
264
325
|
*
|
|
265
326
|
* Declared in one of exactly two places — `GenreDecl.envoys[]` or
|
|
266
327
|
* `ActionDecl.envoy` — and nowhere else: there is no API to add an envoy to
|
|
@@ -269,18 +330,22 @@ export type EnvoySpeaks = 'in-turn' | 'on-action';
|
|
|
269
330
|
* `key`; an action's is `<plugin>.<key>`, namespaced like a slash name so it
|
|
270
331
|
* cannot collide with a genre's (`envoyIdentity`).
|
|
271
332
|
*
|
|
272
|
-
* Its data is **configuration
|
|
333
|
+
* Its data is **configuration**: `prompts`, `description` and
|
|
273
334
|
* `image` are the genre's declared defaults, read by a pipeline node through
|
|
274
335
|
* `slot.prompts({ envoy })` and tuned in the Pipelines panel with deviation
|
|
275
336
|
* semantics like any other setting — no second schema.
|
|
276
337
|
*
|
|
277
338
|
* ⚠ Not a *character* (a library row) and not a *persona* (the user's own).
|
|
278
339
|
* @experimental
|
|
340
|
+
* @ruling plans/29 R-18, R-18 (2)
|
|
279
341
|
*/
|
|
280
342
|
export interface EnvoyDecl {
|
|
281
343
|
/** The genre-local key — lowercase kebab, no dots (a dot marks an action's namespace). */
|
|
282
344
|
key: string;
|
|
283
|
-
/**
|
|
345
|
+
/**
|
|
346
|
+
* Display text: a string or a locale map with `en` — `'Guide'` is `{ en: 'Guide' }`.
|
|
347
|
+
* @ruling R-20
|
|
348
|
+
*/
|
|
284
349
|
name: I18n;
|
|
285
350
|
/**
|
|
286
351
|
* ⏳ An `http(s)://` URL or a `data:image/…` URI (`ENVOY_IMAGE`) — refused
|
|
@@ -321,8 +386,8 @@ export interface EnvoyDecl {
|
|
|
321
386
|
/** See `EnvoySpeaks`. A genre's default is `in-turn`; an action's envoy is always `on-action`. */
|
|
322
387
|
speaks?: EnvoySpeaks;
|
|
323
388
|
/**
|
|
324
|
-
* The line this envoy opens a new session with
|
|
325
|
-
*
|
|
389
|
+
* The line this envoy opens a new session with: the Lair's Castellan
|
|
390
|
+
* introduces the game and invites the
|
|
326
391
|
* person to start. **Declared, not generated** — a create run is a
|
|
327
392
|
* person waiting, so it calls no model; the text is interpolated
|
|
328
393
|
* (`{{char}}` is the envoy, `{{playerLabel}}`, `{{characterNames}}`)
|
|
@@ -333,23 +398,28 @@ export interface EnvoyDecl {
|
|
|
333
398
|
* A **genre's** envoy only: an action's envoy speaks for its action.
|
|
334
399
|
*
|
|
335
400
|
* ⚠ Not `SessionShape.greeting`, which is the CARDS' greetings.
|
|
401
|
+
* @ruling lair re-plan R6 (2026-09-28)
|
|
336
402
|
*/
|
|
337
403
|
greeting?: EnvoyGreeting;
|
|
338
404
|
}
|
|
339
405
|
/** An envoy's opening line and where it lands — see `EnvoyDecl.greeting`. @experimental */
|
|
340
406
|
export interface EnvoyGreeting {
|
|
341
|
-
/**
|
|
407
|
+
/**
|
|
408
|
+
* The line, interpolated at create. Display text.
|
|
409
|
+
* @ruling R-20
|
|
410
|
+
*/
|
|
342
411
|
text: I18n;
|
|
343
412
|
/** A channel the genre declares. Default `main`. */
|
|
344
413
|
channel?: string;
|
|
345
414
|
}
|
|
346
415
|
/**
|
|
347
416
|
* The name a line nobody claims is shown and prompted under when its genre
|
|
348
|
-
* declares no fallback envoy (`EnvoyDecl.fallback`) — display text
|
|
417
|
+
* declares no fallback envoy (`EnvoyDecl.fallback`) — display text, read
|
|
349
418
|
* in the viewer's language. The host's last resort, so no line is ever
|
|
350
419
|
* attributed to "Unknown" (ruled 2026-09-26). The same word the host already
|
|
351
420
|
* gives narration with no narrator name.
|
|
352
421
|
* @experimental
|
|
422
|
+
* @ruling R-20
|
|
353
423
|
*/
|
|
354
424
|
export declare const UNCLAIMED_LINE_NAME: LocaleMap;
|
|
355
425
|
/** An envoy's key: a lowercase kebab token. Dots are reserved for an action's namespace. @experimental */
|
|
@@ -358,17 +428,19 @@ export declare const ENVOY_KEY: RegExp;
|
|
|
358
428
|
export declare const ENVOY_IMAGE: RegExp;
|
|
359
429
|
/**
|
|
360
430
|
* Every fault in one envoy declaration, as sentences (the teaching-error
|
|
361
|
-
* pattern
|
|
431
|
+
* pattern). Empty when it is sound. `owner` says which of the two
|
|
362
432
|
* declaring places this is, because an action's envoy has one rule of its own:
|
|
363
433
|
* it may only be `on-action`.
|
|
364
434
|
* @internal
|
|
435
|
+
* @ruling 15 §1.3
|
|
365
436
|
*/
|
|
366
437
|
export declare function envoyFindings(raw: unknown, at: string, owner?: 'genre' | 'action'): string[];
|
|
367
438
|
/**
|
|
368
439
|
* The findings on a genre's whole list: each entry's, plus unique keys, at
|
|
369
440
|
* most one default, and — given the genre's `channels` (slugs, `main`
|
|
370
|
-
* included
|
|
441
|
+
* included) — a greeting on a channel the genre does not declare.
|
|
371
442
|
* @internal
|
|
443
|
+
* @ruling R6
|
|
372
444
|
*/
|
|
373
445
|
export declare function envoysFindings(raw: unknown, at?: string, channels?: readonly string[]): string[];
|
|
374
446
|
/** One envoy in its document form: `speaks` stated, nothing else added. @experimental */
|
|
@@ -381,17 +453,26 @@ export declare function normalizeEnvoy(raw: EnvoyDecl, speaks: EnvoySpeaks): Env
|
|
|
381
453
|
*/
|
|
382
454
|
export declare function genreEnabledWhenFindings(raw: unknown, at?: string): string[];
|
|
383
455
|
/**
|
|
384
|
-
* Every display string a genre carries
|
|
456
|
+
* Every display string a genre carries: `name` (required) and
|
|
385
457
|
* `description`; the shape's `fields` schema and its `panels[]` titles; and
|
|
386
458
|
* the `label` / `description` of every slot and sheet it brings. The slots and
|
|
387
459
|
* sheets passed their own doors already; they are read again here because a
|
|
388
460
|
* genre is the declaration a session is created under, and a picker card that
|
|
389
461
|
* lists a slot with no label is this genre's defect to hear about.
|
|
390
462
|
* @experimental
|
|
463
|
+
* @ruling R-20
|
|
391
464
|
*/
|
|
392
465
|
export declare function genreDisplayTextFindings(props: GenreProps, at: string): string[];
|
|
393
466
|
/** Core's conversation widget — the primary widget a genre must replace if it withholds it. @internal */
|
|
394
467
|
export declare const CONVERSATION_WIDGET_ID = "messages";
|
|
468
|
+
/**
|
|
469
|
+
* 🚧 What is wrong with a genre's `summarize` declaration — one sentence per
|
|
470
|
+
* problem, empty when it is sound. Each entry is a spec id with an owner
|
|
471
|
+
* (`core:spec/lair-summarize-scene`): a bare slug is a hand-imported
|
|
472
|
+
* document's, which no genre can be sure an install holds.
|
|
473
|
+
* @experimental
|
|
474
|
+
*/
|
|
475
|
+
export declare function genreSummarizeFindings(raw: unknown, at?: string): string[];
|
|
395
476
|
/**
|
|
396
477
|
* Declare a genre. The id is stated in full, under your plugin's slug
|
|
397
478
|
* (`acme.dice:genre/table`), and the genre value is what everything else
|
|
@@ -485,7 +566,7 @@ export declare const genreIdOf: (g: GenreDecl | {
|
|
|
485
566
|
readonly id: string;
|
|
486
567
|
} | string) => string;
|
|
487
568
|
/**
|
|
488
|
-
* The configurable surface of one envoy, as a slot declaration
|
|
569
|
+
* The configurable surface of one envoy, as a slot declaration.
|
|
489
570
|
*
|
|
490
571
|
* An envoy is not a node and has no registry row to carry a declaration —
|
|
491
572
|
* so the SDK declares its slot from the two facts the genre does carry, its
|
|
@@ -502,6 +583,7 @@ export declare const genreIdOf: (g: GenreDecl | {
|
|
|
502
583
|
* is the name the reading node's own slot has and the name `slot.prompts({
|
|
503
584
|
* envoy })` resolves at; the fields are that node's fields.
|
|
504
585
|
* @internal
|
|
586
|
+
* @ruling R-18 (2)
|
|
505
587
|
*/
|
|
506
588
|
export declare function envoyPromptsSlotFor(envoy: EnvoyDecl): SlotDecl;
|
|
507
589
|
//# sourceMappingURL=genres.d.ts.map
|