@serene-pub/sdk 0.6.0-pr-7 → 0.6.0-pr-9
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/dist/annexFields.d.ts +14 -0
- package/dist/annexFields.js +7 -0
- package/dist/announce.d.ts +62 -16
- package/dist/announce.js +90 -4
- package/dist/appletCard.d.ts +17 -0
- package/dist/appletCard.js +60 -0
- package/dist/attributes.d.ts +3 -3
- package/dist/attributes.js +1 -1
- package/dist/builder.d.ts +28 -13
- package/dist/builder.js +57 -5
- package/dist/cadences.d.ts +8 -1
- package/dist/cadences.js +27 -2
- package/dist/characterProfile.d.ts +137 -0
- package/dist/characterProfile.js +24 -0
- package/dist/component.d.ts +1 -1
- package/dist/componentImports.d.ts +1 -1
- package/dist/componentImports.js +2 -0
- package/dist/componentWire.js +28 -0
- package/dist/conditions.d.ts +5 -1
- package/dist/conditions.js +7 -0
- package/dist/declarations.d.ts +63 -1
- package/dist/declarations.js +176 -7
- package/dist/descriptors.d.ts +145 -6
- package/dist/descriptors.js +106 -5
- package/dist/document.d.ts +9 -1
- package/dist/document.js +44 -1
- package/dist/events.d.ts +82 -8
- package/dist/events.js +42 -5
- package/dist/executor.d.ts +27 -0
- package/dist/executor.js +32 -8
- package/dist/exposure.d.ts +35 -1
- package/dist/exposure.js +64 -2
- package/dist/extension.d.ts +30 -2
- package/dist/extension.js +3 -1
- package/dist/fit.d.ts +4 -1
- package/dist/fit.js +43 -1
- package/dist/functions.d.ts +7 -1
- package/dist/functions.js +3 -1
- package/dist/genres.d.ts +67 -2
- package/dist/genres.js +160 -8
- package/dist/hookGrants.js +10 -0
- package/dist/hostElements.d.ts +3 -3
- package/dist/hostElements.js +12 -4
- package/dist/index.d.ts +5 -0
- package/dist/index.js +10 -0
- package/dist/layout.d.ts +18 -0
- package/dist/libraryDraft.d.ts +2 -0
- package/dist/libraryDraft.js +5 -1
- package/dist/lorebookFile.d.ts +8 -0
- package/dist/lorebookFile.js +21 -0
- package/dist/participants.d.ts +83 -8
- package/dist/participants.js +9 -5
- package/dist/pluginPermissions.js +1 -1
- package/dist/promptBlocks.d.ts +5 -1
- package/dist/promptBlocks.js +23 -8
- package/dist/provisos.d.ts +92 -0
- package/dist/provisos.js +273 -0
- package/dist/receiverRules.js +1 -1
- package/dist/registrations.d.ts +154 -14
- package/dist/registrations.js +293 -23
- package/dist/registry.js +6 -3
- package/dist/repertoires.d.ts +13 -1
- package/dist/repertoires.js +5 -1
- package/dist/rulesetDocument.d.ts +11 -0
- package/dist/rulesetDocument.js +17 -0
- package/dist/rulesetSections.d.ts +12 -0
- package/dist/rulesetSections.js +8 -0
- package/dist/rulesets.js +6 -0
- package/dist/sceneSettings.d.ts +7 -1
- package/dist/sceneSettings.js +10 -5
- package/dist/sessionDossier.d.ts +159 -2
- package/dist/sessionLayout.d.ts +296 -85
- package/dist/sessionLayout.js +397 -133
- package/dist/sessionSettings.d.ts +18 -0
- package/dist/settings.d.ts +28 -1
- package/dist/settings.js +50 -2
- package/dist/shapes.d.ts +15 -1
- package/dist/shapes.js +15 -1
- package/dist/sheetLatitude.d.ts +148 -0
- package/dist/sheetLatitude.js +161 -0
- package/dist/speech.d.ts +14 -3
- package/dist/storyTime.d.ts +77 -1
- package/dist/storyTime.js +117 -8
- package/dist/surfaces.d.ts +49 -2
- package/dist/surfaces.js +3 -0
- package/dist/template.d.ts +38 -1
- package/dist/templateCheck.d.ts +24 -0
- package/dist/templateCheck.js +465 -10
- package/dist/templateFit.js +8 -1
- package/dist/templateIds.d.ts +6 -0
- package/dist/templateIds.js +9 -0
- package/dist/turnLock.d.ts +10 -1
- package/dist/turnLock.js +6 -1
- package/dist/turnOrder.d.ts +37 -4
- package/dist/turnOrder.js +49 -11
- package/dist/validate.d.ts +4 -2
- package/dist/validate.js +84 -11
- package/dist/variableLayouts.d.ts +160 -0
- package/dist/variableLayouts.js +202 -0
- package/dist/variables.d.ts +237 -20
- package/dist/variables.js +292 -33
- package/dist/widgetDecls.js +12 -0
- package/dist/widgets.d.ts +449 -47
- package/dist/widgets.js +31 -0
- package/host-elements.d.ts +4 -2
- package/package.json +1 -1
package/dist/widgets.d.ts
CHANGED
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
*/
|
|
43
43
|
import type { TurnOrderV1 } from './turnOrder.js';
|
|
44
44
|
import type { SessionDossierV1 } from './sessionDossier.js';
|
|
45
|
+
import type { ParticipantRef } from './participants.js';
|
|
45
46
|
import type { SlotAppliesTo, SlotType, SlotValue } from './attributes.js';
|
|
46
47
|
import type { FieldDecl } from './settings.js';
|
|
47
48
|
import type { StatusText, WidgetActionReason } from './status.js';
|
|
@@ -110,9 +111,14 @@ export interface LayoutV1 {
|
|
|
110
111
|
};
|
|
111
112
|
/** The width class of this widget's own box. */
|
|
112
113
|
tier: WidgetTier;
|
|
113
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* ⏳ Always true since panels v2 (2026-11-05): every panel is open. Kept on
|
|
116
|
+
* the wire until 0.7.
|
|
117
|
+
*/
|
|
114
118
|
pinned: boolean;
|
|
119
|
+
/** ⏳ Always false since panels v2 (2026-11-05); kept on the wire until 0.7. */
|
|
115
120
|
collapsed: boolean;
|
|
121
|
+
/** ⏳ Always false since panels v2 (2026-11-05); kept on the wire until 0.7. */
|
|
116
122
|
drawered: boolean;
|
|
117
123
|
/**
|
|
118
124
|
* Decoration the HOST is painting, so the widget suppresses its own and
|
|
@@ -124,15 +130,15 @@ export interface LayoutV1 {
|
|
|
124
130
|
titleBar: boolean;
|
|
125
131
|
padding: boolean;
|
|
126
132
|
/**
|
|
127
|
-
* @experimental Is the host drawing
|
|
128
|
-
*
|
|
133
|
+
* @experimental Is the host drawing a **backing** behind this widget's
|
|
134
|
+
* panel — is the panel's backing not `none`?
|
|
129
135
|
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
+
* The backing is drawn on the panel, once, whatever it holds (the
|
|
137
|
+
* layout's look, `PanelLayoutV2.backing`); there is no per-widget
|
|
138
|
+
* card setting any more (`hostCard` is retired). A widget opened over
|
|
139
|
+
* the session — a pop-over, a flyout, the phone's panel sheet — keeps
|
|
140
|
+
* the host card. When it is on, `background` and `wrapper` are true
|
|
141
|
+
* as well.
|
|
136
142
|
*
|
|
137
143
|
* The page also marks the widget's box `data-sp-card="on"` or `"off"`,
|
|
138
144
|
* so a stylesheet can key off the same fact without reading this.
|
|
@@ -266,6 +272,14 @@ export interface MessageV1 {
|
|
|
266
272
|
characterId?: number | null;
|
|
267
273
|
/** The speaking persona, when one spoke. */
|
|
268
274
|
personaId?: number | null;
|
|
275
|
+
/**
|
|
276
|
+
* 🚧 The speaker's **cast member** (the host's `cast_member_id`): the
|
|
277
|
+
* member behind `characterId` / `personaId`. Host-filled; absent from a
|
|
278
|
+
* host that predates it, null on a row no cast member spoke. A reader
|
|
279
|
+
* resolves the speaker's `ref` through the `characters.v1` entry whose
|
|
280
|
+
* `castMemberId` matches, falling back to the card.
|
|
281
|
+
*/
|
|
282
|
+
castMemberId?: number | null;
|
|
269
283
|
/** True for a narrator turn: no character, no persona, `role: assistant`. */
|
|
270
284
|
isNarratorResponse?: boolean;
|
|
271
285
|
/** The row's kind, where a host distinguishes several. */
|
|
@@ -288,7 +302,8 @@ export interface MessageV1 {
|
|
|
288
302
|
* the row was written (its own clock, else its line's present), as the
|
|
289
303
|
* five stored columns. All null or absent on a row written before stamps,
|
|
290
304
|
* or in a session with no dated story. What the conversation's **day
|
|
291
|
-
* marks** read
|
|
305
|
+
* marks** read, and the row's time: a stamped row shows its story time, an
|
|
306
|
+
* unstamped one its real time.
|
|
292
307
|
* @ruling PROPOSAL-live-scenes §6, §8
|
|
293
308
|
*/
|
|
294
309
|
storyClockYear?: number | null;
|
|
@@ -470,6 +485,17 @@ export interface MessageMetadataV1 {
|
|
|
470
485
|
* speaker's face or name.
|
|
471
486
|
*/
|
|
472
487
|
tableLine?: boolean;
|
|
488
|
+
/**
|
|
489
|
+
* 🚧 Why the line was written without anyone asking (★T-1, 2026-11-04):
|
|
490
|
+
* the narrator's own turn, which the session's *Narrator's turn* setting
|
|
491
|
+
* gives it every `every` rounds. Stamped by the host at the write, never
|
|
492
|
+
* by a pipeline; absent on every other line. Drawn as the
|
|
493
|
+
* `messages.message-badge-cause` badge.
|
|
494
|
+
*/
|
|
495
|
+
turnCause?: {
|
|
496
|
+
via: 'unprompted';
|
|
497
|
+
every: number;
|
|
498
|
+
};
|
|
473
499
|
[k: string]: unknown;
|
|
474
500
|
}
|
|
475
501
|
/** @experimental A row's alternative replies (`metadata.swipes`). */
|
|
@@ -494,6 +520,8 @@ export interface ViewerV1 {
|
|
|
494
520
|
isAdmin: boolean;
|
|
495
521
|
/** A guest seat: may read, may not write. */
|
|
496
522
|
isGuest: boolean;
|
|
523
|
+
/** 🚧 The viewer's own advanced controls switch (a preference, never a permission). Absent means shown. */
|
|
524
|
+
advancedControls?: boolean;
|
|
497
525
|
}
|
|
498
526
|
/**
|
|
499
527
|
* One person in the session's **attendance**: the session's owner or
|
|
@@ -512,11 +540,12 @@ export interface AttendeeV1 {
|
|
|
512
540
|
/** The session's owner, or a guest the owner added. */
|
|
513
541
|
role: 'owner' | 'guest';
|
|
514
542
|
/**
|
|
515
|
-
* The personas this person writes as in this session — `
|
|
516
|
-
*
|
|
517
|
-
*
|
|
543
|
+
* The personas this person writes as in this session — each seat's `ref`
|
|
544
|
+
* as `characters.v1` carries it, so a widget granted `characters` finds
|
|
545
|
+
* their faces. Empty when they write as none. Widened to
|
|
546
|
+
* `ParticipantRef[]` (seat-cast S3): match on it, never parse an id out.
|
|
518
547
|
*/
|
|
519
|
-
personaRefs:
|
|
548
|
+
personaRefs: ParticipantRef[];
|
|
520
549
|
/** One of their personas pinged *typing* within the last few seconds. */
|
|
521
550
|
typing: boolean;
|
|
522
551
|
/**
|
|
@@ -731,7 +760,13 @@ export interface SessionStateOfferV1 {
|
|
|
731
760
|
export interface SessionResolvedStateV1 {
|
|
732
761
|
/** The world's values. */
|
|
733
762
|
world: Record<string, unknown>;
|
|
734
|
-
/**
|
|
763
|
+
/**
|
|
764
|
+
* Each cast member's values — a player seat's too — by owner key
|
|
765
|
+
* (`SessionStateOwnerV1.key`, opaque: `player_seat:<id>`, 🚧
|
|
766
|
+
* `seated_member:<id>` from the flip, ⏳ the card id before it). Look an
|
|
767
|
+
* entry up through its owner (its `key`, found by `ref` or `castMemberId`),
|
|
768
|
+
* never by building or parsing a key.
|
|
769
|
+
*/
|
|
735
770
|
cast: Record<string, Record<string, unknown>>;
|
|
736
771
|
/**
|
|
737
772
|
* 🚧 Each location's values, by owner key (`SessionStateOwnerV1.key`, a
|
|
@@ -834,18 +869,38 @@ export interface SessionStateSlotV1 {
|
|
|
834
869
|
}
|
|
835
870
|
/**
|
|
836
871
|
* An owner a session's values belong to — the world (`kind: 'session'`), a
|
|
837
|
-
* cast member (`
|
|
838
|
-
*
|
|
839
|
-
*
|
|
840
|
-
*
|
|
872
|
+
* cast member's character seat (🚧 `seated_member`, whose `id` is the cast
|
|
873
|
+
* member id; ⏳ `session_cast`, whose `id` is the card, only before the flip
|
|
874
|
+
* and removed in S5), 🚧 a player seat, carded or not, from the flip
|
|
875
|
+
* (`player_seat`, whose `id` is the seat — participant reference
|
|
876
|
+
* `player-seat:<id>`; e.g. a person voicing card 12 from seat 3 owns
|
|
877
|
+
* `{ kind: 'player_seat', id: 3 }`, not card 12's values) or 🚧 a location (`session_location`, whose `id` is the location's lore
|
|
841
878
|
* entry) — keyed exactly as `resolved` keys it. `key` is the lookup; `kind`
|
|
842
|
-
* and `id` are what `set-attribute-value` names.
|
|
879
|
+
* and `id` are what `set-attribute-value` names. The `key` is **opaque**
|
|
880
|
+
* (`player_seat:<id>`, 🚧 `seated_member:<id>` from the flip, ⏳ the card id
|
|
881
|
+
* before it): find an owner by its host-filled `ref` or `castMemberId`, or
|
|
882
|
+
* read its `key` off the owner — never build or parse a key.
|
|
843
883
|
* @experimental
|
|
844
884
|
*/
|
|
845
885
|
export interface SessionStateOwnerV1 extends OwnerRefV1 {
|
|
846
|
-
/**
|
|
886
|
+
/**
|
|
887
|
+
* `world`, the cast member's or player seat's key in `resolved.cast`, or
|
|
888
|
+
* the location's in `resolved.locations`. Opaque: read it off the owner,
|
|
889
|
+
* never build or parse it (it changes form at the flip).
|
|
890
|
+
*/
|
|
847
891
|
key: string;
|
|
848
892
|
label: string;
|
|
893
|
+
/**
|
|
894
|
+
* 🚧 A cast owner's seat reference, as the host fills it: match on it,
|
|
895
|
+
* never build it. Absent on the world and a place, and from a host that
|
|
896
|
+
* predates it.
|
|
897
|
+
*/
|
|
898
|
+
ref?: ParticipantRef;
|
|
899
|
+
/**
|
|
900
|
+
* 🚧 A cast owner's cast member (`lorebook_bindings.id`); null or absent
|
|
901
|
+
* for the world and a place. Host-filled.
|
|
902
|
+
*/
|
|
903
|
+
castMemberId?: number | null;
|
|
849
904
|
/**
|
|
850
905
|
* 🚧 Whether the viewer may write this owner's values. `false` on a
|
|
851
906
|
* player seat that is not the viewer's (only its player and the
|
|
@@ -862,6 +917,13 @@ export interface SessionStateOwnerV1 extends OwnerRefV1 {
|
|
|
862
917
|
* the host's. Absent on every other owner. @experimental
|
|
863
918
|
*/
|
|
864
919
|
mine?: boolean;
|
|
920
|
+
/**
|
|
921
|
+
* 🚧 Present only on an AI character seat the viewer seated: `true` while
|
|
922
|
+
* the viewer is showing that seat's hidden stats (`show-hidden-stats`),
|
|
923
|
+
* `false` while they may. Absent everywhere else, and from a host that
|
|
924
|
+
* predates it. @experimental
|
|
925
|
+
*/
|
|
926
|
+
showingHiddenStats?: boolean;
|
|
865
927
|
/**
|
|
866
928
|
* 🚧 True on an owner that is a **player seat** (2026-10-18): a card-less
|
|
867
929
|
* one (`player_seat`), or a card seated as one (a persona played as a
|
|
@@ -897,6 +959,16 @@ export interface SessionStateOwnerV1 extends OwnerRefV1 {
|
|
|
897
959
|
* edit controls, and the host refuses a write with its own sentence.
|
|
898
960
|
*/
|
|
899
961
|
configs: Record<string, Record<string, unknown>>;
|
|
962
|
+
/**
|
|
963
|
+
* 🚧 **Hand-locked stats** (owner ruling 2026-11-05, plan §25 ★1): per slot id, the sentence the
|
|
964
|
+
* viewer reads for why they may not change that value by hand here — the cause shown (P1). A
|
|
965
|
+
* widget draws a slot listed here without edit controls and shows the sentence. Worked out by the
|
|
966
|
+
* host with `sheetLatitudeAllows`. ⚠ Not the slot lock (`configs[slot].lock`, which says what the
|
|
967
|
+
* owner set) and not `editable` (the whole owner). Absent: nothing is hand-locked for the viewer,
|
|
968
|
+
* or a host that predates it.
|
|
969
|
+
* @experimental
|
|
970
|
+
*/
|
|
971
|
+
handLocked?: Record<string, string>;
|
|
900
972
|
/**
|
|
901
973
|
* 🚧 Each repertoire a list stat of this owner holds (`config.repertoire`),
|
|
902
974
|
* by address — its name and its piece shape, so a widget labels a piece's
|
|
@@ -1028,13 +1100,15 @@ export interface SessionStateDerivedV1 {
|
|
|
1028
1100
|
* 🚧 **An owner, named** — the one shape every widget request that names
|
|
1029
1101
|
* whose stats uses (`set-attribute-value`, `stat-trail`, `set-owner-face`):
|
|
1030
1102
|
* the session itself (the world), a cast member, a player seat or a place,
|
|
1031
|
-
* by the row's own id. The same
|
|
1032
|
-
* by, so a widget hands back exactly what it was given.
|
|
1103
|
+
* by the row's own id. The same kinds the state read keys its owners
|
|
1104
|
+
* by, so a widget hands back exactly what it was given. 🚧 `seated_member`
|
|
1105
|
+
* is a cast member, its `id` the cast member id (`lorebook_bindings.id`);
|
|
1106
|
+
* ⏳ `session_cast` (its `id` the card) is removed in S5. One shape, not a
|
|
1033
1107
|
* union repeated per request (2026-10-17).
|
|
1034
1108
|
* @experimental
|
|
1035
1109
|
*/
|
|
1036
1110
|
export interface OwnerRefV1 {
|
|
1037
|
-
kind: 'session' | 'session_cast' | 'player_seat' | 'session_location';
|
|
1111
|
+
kind: 'session' | 'session_cast' | 'seated_member' | 'player_seat' | 'session_location';
|
|
1038
1112
|
id: number;
|
|
1039
1113
|
}
|
|
1040
1114
|
/**
|
|
@@ -1062,6 +1136,13 @@ export interface SessionCharactersV1 {
|
|
|
1062
1136
|
* @ruling W6 (2026-10-11)
|
|
1063
1137
|
*/
|
|
1064
1138
|
members: SessionCharacterV1[];
|
|
1139
|
+
/**
|
|
1140
|
+
* 🚧 Who wrote the line the page shows — the line a reading widget's reader is on
|
|
1141
|
+
* (`show-line`), or the newest visible line when none is shown: that member's `ref`.
|
|
1142
|
+
* Null when the line is nobody's in `members` (narration, a person with no persona) or
|
|
1143
|
+
* there is none. Absent: a host that predates it. Scene Portraits' speaker focus reads it.
|
|
1144
|
+
*/
|
|
1145
|
+
speakerRef?: string | null;
|
|
1065
1146
|
/**
|
|
1066
1147
|
* ⏳ The portraits pinned beside the conversation, one per side; null for
|
|
1067
1148
|
* an empty side. The composer's **Pinned images** pane that set them is
|
|
@@ -1080,8 +1161,8 @@ export interface SessionCharactersV1 {
|
|
|
1080
1161
|
/**
|
|
1081
1162
|
* One cast member, **cascaded cast over card**: the character card's
|
|
1082
1163
|
* fields overlaid by the cast member's, and **the cast member wins wherever
|
|
1083
|
-
* both speak** — its name, its face, its sprite set. The card owns the art
|
|
1084
|
-
* the cast member picks the set. The host merges; a widget reads the merged
|
|
1164
|
+
* both speak** — its name, its face, its sprite set. The card owns the art
|
|
1165
|
+
* unless the member carries its own; the cast member picks the set. The host merges; a widget reads the merged
|
|
1085
1166
|
* value and never resolves the cascade itself.
|
|
1086
1167
|
*
|
|
1087
1168
|
* The host also resolves every URL and the current sprite, so a widget draws
|
|
@@ -1091,12 +1172,26 @@ export interface SessionCharactersV1 {
|
|
|
1091
1172
|
*/
|
|
1092
1173
|
export interface SessionCharacterV1 {
|
|
1093
1174
|
/**
|
|
1094
|
-
*
|
|
1095
|
-
*
|
|
1096
|
-
* (`
|
|
1175
|
+
* The seat's reference, as the host fills it: today `character:<cardId>`
|
|
1176
|
+
* ⏳, 🚧 `seated-member:<castMemberId>` once the flip lands. A persona's
|
|
1177
|
+
* too: a persona is a character row (`isPersona` says which), so its
|
|
1178
|
+
* reference is the same grammar (`TurnCandidateV1.ref` reads it the same
|
|
1179
|
+
* way). A widget matches on it and never builds it.
|
|
1097
1180
|
*/
|
|
1098
|
-
ref:
|
|
1181
|
+
ref: ParticipantRef;
|
|
1182
|
+
/** ⏳ Removed in S5 — read `cardId` / `castMemberId`. */
|
|
1099
1183
|
characterId: number;
|
|
1184
|
+
/**
|
|
1185
|
+
* 🚧 The seat's cast member (`lorebook_bindings.id`). Host-filled; absent
|
|
1186
|
+
* from a host that predates it.
|
|
1187
|
+
*/
|
|
1188
|
+
castMemberId?: number | null;
|
|
1189
|
+
/**
|
|
1190
|
+
* 🚧 The member's active card on the timeline (the dated card at the
|
|
1191
|
+
* session's reading); null when the member is card-less. Host-filled;
|
|
1192
|
+
* absent from a host that predates it.
|
|
1193
|
+
*/
|
|
1194
|
+
cardId?: number | null;
|
|
1100
1195
|
/** A persona — a person's own character — rather than one of the cast. */
|
|
1101
1196
|
isPersona: boolean;
|
|
1102
1197
|
/**
|
|
@@ -1110,8 +1205,9 @@ export interface SessionCharacterV1 {
|
|
|
1110
1205
|
/** The member's avatar, resolved (a same-origin media URL); null when there is none. */
|
|
1111
1206
|
face: string | null;
|
|
1112
1207
|
/**
|
|
1113
|
-
* The member's CURRENT sprite — the one on the newest line it spoke
|
|
1114
|
-
*
|
|
1208
|
+
* The member's CURRENT sprite — the one on the newest line it spoke (🚧 at or
|
|
1209
|
+
* before the line the page shows, when a widget holds its reader's place:
|
|
1210
|
+
* `show-line`), in `spriteSet` — resolved; null when the card has no sprites.
|
|
1115
1211
|
*/
|
|
1116
1212
|
sprite: string | null;
|
|
1117
1213
|
/** The card's sprite sets, by name, in the card's order. */
|
|
@@ -1135,7 +1231,9 @@ export interface SessionCharacterV1 {
|
|
|
1135
1231
|
canChangeSpriteSet: boolean;
|
|
1136
1232
|
/**
|
|
1137
1233
|
* 🚧 When this member last spoke (ms since the epoch): its newest visible
|
|
1138
|
-
* line on the session's line
|
|
1234
|
+
* line on the session's line — while a widget holds its reader's place behind
|
|
1235
|
+
* the newest row (`show-line`), its newest at or before the line shown, as
|
|
1236
|
+
* `sprite` follows it; null when it has spoken none. What a
|
|
1139
1237
|
* widget ranks "who spoke last" by without reading the log.
|
|
1140
1238
|
* Optional (additive): absent reads as null.
|
|
1141
1239
|
* @ruling W6
|
|
@@ -1184,7 +1282,7 @@ export interface SessionSceneImageV1 {
|
|
|
1184
1282
|
* image, so it is matched by face; null for an image pinned from anywhere
|
|
1185
1283
|
* else.
|
|
1186
1284
|
*/
|
|
1187
|
-
ref:
|
|
1285
|
+
ref: ParticipantRef | null;
|
|
1188
1286
|
}
|
|
1189
1287
|
/**
|
|
1190
1288
|
* 🚧 M0 (L9): the `lore` section — the lore grant marker, plus the lorebook annex as THIS viewer may see it: per owner, the values whose
|
|
@@ -1431,6 +1529,14 @@ export type FileSaveAnswer = string | {
|
|
|
1431
1529
|
name?: string;
|
|
1432
1530
|
mime?: string;
|
|
1433
1531
|
};
|
|
1532
|
+
/** 🚧 (M3b) The longest `persona.name` a `create-session` request may carry, in characters after trimming; the host refuses longer in words.
|
|
1533
|
+
* @experimental
|
|
1534
|
+
*/
|
|
1535
|
+
export declare const CREATE_SESSION_PERSONA_NAME_MAX = 80;
|
|
1536
|
+
/** 🚧 (M3b) The longest `persona.description` a `create-session` request may carry, in characters after trimming; the host refuses longer in words.
|
|
1537
|
+
* @experimental
|
|
1538
|
+
*/
|
|
1539
|
+
export declare const CREATE_SESSION_PERSONA_DESCRIPTION_MAX = 2000;
|
|
1434
1540
|
/**
|
|
1435
1541
|
* 🚧 What a widget may ASK the host for — by kind, with its params and
|
|
1436
1542
|
* what comes back. A request is not a grant: the host may decline, and the
|
|
@@ -1456,6 +1562,28 @@ export interface WidgetRequests {
|
|
|
1456
1562
|
};
|
|
1457
1563
|
result: RoutineLogV1;
|
|
1458
1564
|
};
|
|
1565
|
+
/**
|
|
1566
|
+
* 🚧 **Runs** (owner 2026-11-06): this session's pipeline runs, newest
|
|
1567
|
+
* first — for administrators only; the host refuses anyone else (the
|
|
1568
|
+
* request is not a grant). `limit` is a wish the host clamps (1–100, 25
|
|
1569
|
+
* by default).
|
|
1570
|
+
*/
|
|
1571
|
+
'session-runs': {
|
|
1572
|
+
params: {
|
|
1573
|
+
limit?: number;
|
|
1574
|
+
};
|
|
1575
|
+
result: SessionRunsV1;
|
|
1576
|
+
};
|
|
1577
|
+
/**
|
|
1578
|
+
* 🚧 The steps of one of the session's runs, in order — administrators'
|
|
1579
|
+
* only, like `session-runs`; the host refuses anyone else.
|
|
1580
|
+
*/
|
|
1581
|
+
'session-run-steps': {
|
|
1582
|
+
params: {
|
|
1583
|
+
runId: string;
|
|
1584
|
+
};
|
|
1585
|
+
result: SessionRunStepsV1;
|
|
1586
|
+
};
|
|
1459
1587
|
/**
|
|
1460
1588
|
* One page of the session's lines, for this widget's own window — never
|
|
1461
1589
|
* the conversation's, so two paging widgets never take each other's
|
|
@@ -1748,6 +1876,17 @@ export interface WidgetRequests {
|
|
|
1748
1876
|
};
|
|
1749
1877
|
result: void;
|
|
1750
1878
|
};
|
|
1879
|
+
/**
|
|
1880
|
+
* 🚧 Core's composer: write as another of the viewer's seats, by its
|
|
1881
|
+
* participant reference (`ConversationComposerV1.seats[].seatRef`). The
|
|
1882
|
+
* page judges it: a seat not among the viewer's own in play is refused.
|
|
1883
|
+
*/
|
|
1884
|
+
'write-as': {
|
|
1885
|
+
params: {
|
|
1886
|
+
seatRef: string;
|
|
1887
|
+
};
|
|
1888
|
+
result: void;
|
|
1889
|
+
};
|
|
1751
1890
|
/** 🚧 Core's composer: the host's "add your persona" flow, for a guest with none. */
|
|
1752
1891
|
'add-persona': {
|
|
1753
1892
|
params: Record<string, never>;
|
|
@@ -1778,6 +1917,18 @@ export interface WidgetRequests {
|
|
|
1778
1917
|
};
|
|
1779
1918
|
result: void;
|
|
1780
1919
|
};
|
|
1920
|
+
/**
|
|
1921
|
+
* 🚧 Core's conversation: **Stop** on a background run the turn line lists — the run
|
|
1922
|
+
* `id` names (an id from `SessionDossierV1.runsInProgress`). A refusal resolves quietly;
|
|
1923
|
+
* the list only offers Stop where the viewer may.
|
|
1924
|
+
* @experimental
|
|
1925
|
+
*/
|
|
1926
|
+
'stop-run': {
|
|
1927
|
+
params: {
|
|
1928
|
+
id: string;
|
|
1929
|
+
};
|
|
1930
|
+
result: void;
|
|
1931
|
+
};
|
|
1781
1932
|
/**
|
|
1782
1933
|
* 🚧 Core's conversation: **Back** — take the newest turn of the story out
|
|
1783
1934
|
* of the history, onto the session's forward stack (RF fix 5, owner ruling
|
|
@@ -1906,7 +2057,7 @@ export interface WidgetRequests {
|
|
|
1906
2057
|
* 🚧 One line the table hears when this write lands (2026-10-18,
|
|
1907
2058
|
* the 100-turn walk #35: _Give to…_ moved a potion in silence) —
|
|
1908
2059
|
* "Wren gives Potion of healing to Rook." In a session whose genre
|
|
1909
|
-
* keeps a **table channel** (`
|
|
2060
|
+
* keeps a **table channel** (a channel declared `table: true`; `tableChannelOf`), the host writes it
|
|
1910
2061
|
* there, under the story's newest line, voiceless; elsewhere it is
|
|
1911
2062
|
* not written. Plain words, at most 200 characters.
|
|
1912
2063
|
* @experimental
|
|
@@ -1947,7 +2098,8 @@ export interface WidgetRequests {
|
|
|
1947
2098
|
/**
|
|
1948
2099
|
* 🚧 Core's Scene Portraits: a page of one
|
|
1949
2100
|
* session member's **gallery** — the character's own images, in the
|
|
1950
|
-
* gallery's order, sprites left out
|
|
2101
|
+
* gallery's order, sprites left out (a card-less member's gallery is the
|
|
2102
|
+
* member's own pictures) — each by `ref` (the image's stable
|
|
1951
2103
|
* id, what a **chosen image** stores) with its `src` resolved by the
|
|
1952
2104
|
* host. `cursor` is the last page's `nextCursor`; none is the first page,
|
|
1953
2105
|
* and no `nextCursor` is the last. Only a member of `characters.v1` may be
|
|
@@ -1957,7 +2109,19 @@ export interface WidgetRequests {
|
|
|
1957
2109
|
*/
|
|
1958
2110
|
'character-images': {
|
|
1959
2111
|
params: {
|
|
1960
|
-
|
|
2112
|
+
/**
|
|
2113
|
+
* The member's card (`SessionCharacterV1.cardId`) when it has one;
|
|
2114
|
+
* else name it by `castMemberId`. Exactly one of the two — the host
|
|
2115
|
+
* refuses both or neither in words ("Name a character or a cast
|
|
2116
|
+
* member, not both.").
|
|
2117
|
+
*/
|
|
2118
|
+
characterId?: number | null;
|
|
2119
|
+
/**
|
|
2120
|
+
* 🚧 The member by its cast member id (host-filled on
|
|
2121
|
+
* `SessionCharactersV1.members`) when it has no card; exactly one
|
|
2122
|
+
* of this and `characterId`.
|
|
2123
|
+
*/
|
|
2124
|
+
castMemberId?: number | null;
|
|
1961
2125
|
cursor?: string;
|
|
1962
2126
|
};
|
|
1963
2127
|
result: {
|
|
@@ -2055,6 +2219,68 @@ export interface WidgetRequests {
|
|
|
2055
2219
|
};
|
|
2056
2220
|
result: AuthorsNoteV1;
|
|
2057
2221
|
};
|
|
2222
|
+
/**
|
|
2223
|
+
* 🚧 Core's Author's note widget (PLAN-session-layout-simplify D13,
|
|
2224
|
+
* 2026-11-05): the session's **scenario** as it reads now, and whether the
|
|
2225
|
+
* viewer may change it (the session's owner). Asked whether or not the
|
|
2226
|
+
* genre offers an author's note: every session has a scenario. The page
|
|
2227
|
+
* names its own session.
|
|
2228
|
+
*/
|
|
2229
|
+
'session-scenario': {
|
|
2230
|
+
params: Record<string, never>;
|
|
2231
|
+
result: {
|
|
2232
|
+
scenario: string;
|
|
2233
|
+
canEdit: boolean;
|
|
2234
|
+
};
|
|
2235
|
+
};
|
|
2236
|
+
/**
|
|
2237
|
+
* 🚧 Core's Author's note widget: save the session's scenario, whole. The
|
|
2238
|
+
* session's owner only — the server judges it, through the session's own
|
|
2239
|
+
* update. Resolves with the scenario as it now reads.
|
|
2240
|
+
*/
|
|
2241
|
+
'set-session-scenario': {
|
|
2242
|
+
params: {
|
|
2243
|
+
scenario: string;
|
|
2244
|
+
};
|
|
2245
|
+
result: {
|
|
2246
|
+
scenario: string;
|
|
2247
|
+
canEdit: boolean;
|
|
2248
|
+
};
|
|
2249
|
+
};
|
|
2250
|
+
/**
|
|
2251
|
+
* 🚧 Core's Messages widget tells its host which channel it shows
|
|
2252
|
+
* (PLAN-session-layout-simplify D7, 2026-11-05): sent on mount and on
|
|
2253
|
+
* every change of the shown channel tab — the lane, in its canonical form
|
|
2254
|
+
* (`main`, `sanctum`, `parley:2`). The host keeps it per instance, so a
|
|
2255
|
+
* Composer and a Turn line in the same zone write to and speak about the
|
|
2256
|
+
* channel this copy shows, and keep the last one while another panel tab
|
|
2257
|
+
* is shown. Core's only.
|
|
2258
|
+
*/
|
|
2259
|
+
'show-channel': {
|
|
2260
|
+
params: {
|
|
2261
|
+
channel: string;
|
|
2262
|
+
};
|
|
2263
|
+
result: void;
|
|
2264
|
+
};
|
|
2265
|
+
/**
|
|
2266
|
+
* 🚧 A core widget that holds its reader's place (the **Dialogue box**) tells
|
|
2267
|
+
* its host which line the reader is on (PLAN-visual-novel-layout §1.2): sent
|
|
2268
|
+
* when its **reading place** changes — the place's message id while lines
|
|
2269
|
+
* wait behind it, `null` once the reader is at the newest row. The widget
|
|
2270
|
+
* also sends its first value when it mounts; nothing is sent when it
|
|
2271
|
+
* unmounts, so the page drops the line itself once its layout holds no
|
|
2272
|
+
* such widget. Never per streamed chunk; the same value is never
|
|
2273
|
+
* sent twice in a row. The page keeps it as client-only state, and the scene
|
|
2274
|
+
* follows it (`SessionCharactersV1.speakerRef`, the
|
|
2275
|
+
* current sprites). Core's only. (Owner 2026-11-11: that widget is a widget
|
|
2276
|
+
* of its own, not Messages.)
|
|
2277
|
+
*/
|
|
2278
|
+
'show-line': {
|
|
2279
|
+
params: {
|
|
2280
|
+
messageId: number | null;
|
|
2281
|
+
};
|
|
2282
|
+
result: void;
|
|
2283
|
+
};
|
|
2058
2284
|
/**
|
|
2059
2285
|
* 🚧 Core's Chronicle: where the
|
|
2060
2286
|
* session stands in its story and what its lorebook has recorded of it —
|
|
@@ -2132,6 +2358,24 @@ export interface WidgetRequests {
|
|
|
2132
2358
|
started: number;
|
|
2133
2359
|
};
|
|
2134
2360
|
};
|
|
2361
|
+
/**
|
|
2362
|
+
* 🚧 Core's Chronicle: compile the session's line's scenes not yet
|
|
2363
|
+
* compiled of one day (`date`; null is *Undated*, the scenes opened
|
|
2364
|
+
* with no story clock) into the history entry of that date, which the
|
|
2365
|
+
* host makes when the line has none — the lorebook's *Not yet
|
|
2366
|
+
* compiled* **Compile**, with no window: the run and its review arrive
|
|
2367
|
+
* in the activity list as any compile's do. Takes every scene of that
|
|
2368
|
+
* day on the line that no entry holds, other sessions' too. The
|
|
2369
|
+
* lorebook's owner only. Resolves once the compile has started;
|
|
2370
|
+
* refused in words.
|
|
2371
|
+
* @ruling ★S6-1 (owner, 2026-11-04)
|
|
2372
|
+
*/
|
|
2373
|
+
'compile-history-entry': {
|
|
2374
|
+
params: {
|
|
2375
|
+
date: StoryTime | null;
|
|
2376
|
+
};
|
|
2377
|
+
result: void;
|
|
2378
|
+
};
|
|
2135
2379
|
/**
|
|
2136
2380
|
* 🚧 Decide a **scene cue** — Suggested mode's *New scene?* chip at a
|
|
2137
2381
|
* line (`SessionDossierV1.sceneCues`). `accept` opens a scene at the
|
|
@@ -2204,17 +2448,22 @@ export interface WidgetRequests {
|
|
|
2204
2448
|
};
|
|
2205
2449
|
/**
|
|
2206
2450
|
* 🚧 Core's Scene Portraits: set the
|
|
2207
|
-
* **chosen image** this widget shows for one member
|
|
2208
|
-
*
|
|
2451
|
+
* **chosen image** this widget shows for one member, by its image ref
|
|
2452
|
+
* (what `character-images` answered as `ref`); `null`
|
|
2209
2453
|
* takes it away, so the face falls back to the avatar. Written into the
|
|
2210
2454
|
* asking widget's own settings (`chosenImages`), as the viewer's own
|
|
2211
2455
|
* values; the new settings arrive as the widget's `settings` section,
|
|
2212
2456
|
* never in the reply. Only a member of `characters.v1` may be named.
|
|
2457
|
+
* 🚧 `memberRef` names the member by its cast member
|
|
2458
|
+
* (`seated-member:<castMemberId>`, ★S3-8); ⏳ `characterRef`
|
|
2459
|
+
* (`character:<id>`) is accepted until S5. Name one of the two; both
|
|
2460
|
+
* optional only while the old name lives (S5 makes `memberRef` required).
|
|
2213
2461
|
* @ruling F2 (2026-10-11), W6 ruling 1
|
|
2214
2462
|
*/
|
|
2215
2463
|
'set-chosen-image': {
|
|
2216
2464
|
params: {
|
|
2217
|
-
|
|
2465
|
+
memberRef?: `seated-member:${string}`;
|
|
2466
|
+
characterRef?: string;
|
|
2218
2467
|
mediaRef: string | null;
|
|
2219
2468
|
};
|
|
2220
2469
|
result: void;
|
|
@@ -2249,6 +2498,21 @@ export interface WidgetRequests {
|
|
|
2249
2498
|
};
|
|
2250
2499
|
result: void;
|
|
2251
2500
|
};
|
|
2501
|
+
/**
|
|
2502
|
+
* 🚧 Core's Stats (*Show hidden stats*): switch on or off the viewer showing the hidden stats of
|
|
2503
|
+
* an AI character seat they seated. Off by default
|
|
2504
|
+
* and not kept across visits; it changes only this viewer's view — the AI
|
|
2505
|
+
* still plays the seat. The host re-reads the session's state; the values
|
|
2506
|
+
* arrive on the next `session_state` push. Refused for an owner the viewer
|
|
2507
|
+
* did not seat.
|
|
2508
|
+
*/
|
|
2509
|
+
'show-hidden-stats': {
|
|
2510
|
+
params: {
|
|
2511
|
+
owner: OwnerRefV1;
|
|
2512
|
+
on: boolean;
|
|
2513
|
+
};
|
|
2514
|
+
result: void;
|
|
2515
|
+
};
|
|
2252
2516
|
/**
|
|
2253
2517
|
* 🚧 Core's Backdrop widget's *From this session*: a page of the
|
|
2254
2518
|
* pictures generated in this session — the Album's `generated` source
|
|
@@ -2341,12 +2605,22 @@ export interface WidgetRequests {
|
|
|
2341
2605
|
};
|
|
2342
2606
|
result: void;
|
|
2343
2607
|
};
|
|
2344
|
-
/**
|
|
2608
|
+
/**
|
|
2609
|
+
* 🚧 Open the app's start form for one of the package's own genres, prefilled with `fields`; the person presses Start.
|
|
2610
|
+
*
|
|
2611
|
+
* `persona` 🚧 (M3b) is the player the start form offers as a NEW persona — the person may pick an existing one instead.
|
|
2612
|
+
* Serene Pub creates the card on the person's Start, as their own; nothing is created without that press. `name` is at
|
|
2613
|
+
* most `CREATE_SESSION_PERSONA_NAME_MAX` and `description` at most `CREATE_SESSION_PERSONA_DESCRIPTION_MAX` characters.
|
|
2614
|
+
*/
|
|
2345
2615
|
'create-session': {
|
|
2346
2616
|
params: {
|
|
2347
2617
|
genre: string;
|
|
2348
2618
|
fields?: Record<string, unknown>;
|
|
2349
2619
|
lorebookId?: number;
|
|
2620
|
+
persona?: {
|
|
2621
|
+
name: string;
|
|
2622
|
+
description?: string;
|
|
2623
|
+
};
|
|
2350
2624
|
};
|
|
2351
2625
|
result: void;
|
|
2352
2626
|
};
|
|
@@ -2550,6 +2824,8 @@ export interface ChannelLaneV1 {
|
|
|
2550
2824
|
role: string;
|
|
2551
2825
|
characterId?: number | null;
|
|
2552
2826
|
personaId?: number | null;
|
|
2827
|
+
/** 🚧 The speaker's cast member, as {@link MessageV1.castMemberId}. Host-filled. */
|
|
2828
|
+
castMemberId?: number | null;
|
|
2553
2829
|
};
|
|
2554
2830
|
}
|
|
2555
2831
|
/**
|
|
@@ -2648,6 +2924,8 @@ export interface StoryClockV1 {
|
|
|
2648
2924
|
linePresentLabel: string;
|
|
2649
2925
|
/** The session's own clock stands before its line's present: it reads an earlier moment. */
|
|
2650
2926
|
behind: boolean;
|
|
2927
|
+
/** 🚧 The book's calendar month names, in order; absent when the book has no calendar. */
|
|
2928
|
+
months?: string[];
|
|
2651
2929
|
}
|
|
2652
2930
|
/**
|
|
2653
2931
|
* 🚧 One history entry as Chronicle reads it. A history entry is dated,
|
|
@@ -2769,11 +3047,42 @@ export interface HistoryEntriesV1 {
|
|
|
2769
3047
|
/**
|
|
2770
3048
|
* 🚧 When this session's scenes are summarized (its scene settings):
|
|
2771
3049
|
* `onClose`, `onRequest` or `never` — under `never`, no *Summarize* is
|
|
2772
|
-
* offered. Absent reads as `onRequest`.
|
|
3050
|
+
* offered. Absent reads as `onRequest`. A session running the *Summarize
|
|
3051
|
+
* finished scenes* routine (`core:spec/scene-summaries`) reads `onRequest`
|
|
3052
|
+
* whatever is declared or stored.
|
|
2773
3053
|
*/
|
|
2774
3054
|
summaryMode?: SceneSummaryMode;
|
|
2775
3055
|
/** 🚧 This session's closed scenes whose summary has not run, or failed — **Summarize all (N)**. */
|
|
2776
3056
|
unsummarizedScenes?: number;
|
|
3057
|
+
/**
|
|
3058
|
+
* 🚧 ★S2-1b (owner, 2026-11-04): this session's scenes on its line that no
|
|
3059
|
+
* history entry holds yet — **Not yet compiled** — by day in story order,
|
|
3060
|
+
* *Undated* last: the lorebook History lens's own grouping, read for this
|
|
3061
|
+
* session. Absent on a host that predates it; empty when none wait.
|
|
3062
|
+
* ⚠ Not `ungraphedScenes` (a count of scenes the graph has not read) and
|
|
3063
|
+
* not `scenes` (the ones filed under `current`). With `timeline` false it
|
|
3064
|
+
* holds every scene of this session instead (see there).
|
|
3065
|
+
*/
|
|
3066
|
+
unfiledDays?: Array<{
|
|
3067
|
+
/** The day; null = the scenes opened with no story clock (*Undated*). */
|
|
3068
|
+
date: StoryTime | null;
|
|
3069
|
+
/** The day as the page spells it through the book's calendar; empty when undated. */
|
|
3070
|
+
label: string;
|
|
3071
|
+
/** This session's scenes of that day not yet compiled, in id order. */
|
|
3072
|
+
scenes: HistorySceneV1[];
|
|
3073
|
+
}>;
|
|
3074
|
+
/**
|
|
3075
|
+
* 🚧 Whether the lorebook this session reads keeps a timeline. False: the
|
|
3076
|
+
* answer carries no time. `clock` has no present, `current` is null,
|
|
3077
|
+
* `scenes` and `earlier` are empty, `earlierTotal` is 0 and the open
|
|
3078
|
+
* scene's `since` is empty; `unfiledDays` is one group (`date` null,
|
|
3079
|
+
* `label` empty) holding every scene of this session on its line, filed or
|
|
3080
|
+
* not, in played order. Absent or true reads as a timeline (a host that
|
|
3081
|
+
* predates it).
|
|
3082
|
+
* @experimental
|
|
3083
|
+
* @ruling owner 2026-11-15 (★T-C6)
|
|
3084
|
+
*/
|
|
3085
|
+
readonly timeline?: boolean;
|
|
2777
3086
|
}
|
|
2778
3087
|
/**
|
|
2779
3088
|
* 🚧 The session's author's note, as stored (2026-10-02, AN1) — the value of
|
|
@@ -2842,9 +3151,10 @@ export interface SessionEntryV1 {
|
|
|
2842
3151
|
}
|
|
2843
3152
|
/**
|
|
2844
3153
|
* 🚧 One line of **While you were away** (PLAN-layering A7, R23): a
|
|
2845
|
-
* routine's run,
|
|
2846
|
-
* log keeps it. `wrote` is what
|
|
2847
|
-
* why one was skipped, paused,
|
|
3154
|
+
* routine's run, a firing of it that did not run, or a note the pub wrote
|
|
3155
|
+
* into the routine log, as the host's routine log keeps it. `wrote` is what
|
|
3156
|
+
* the run left (its artifacts); `reason` says why one was skipped, paused,
|
|
3157
|
+
* failed or stopped, or is a note's words, in a sentence.
|
|
2848
3158
|
* @experimental
|
|
2849
3159
|
*/
|
|
2850
3160
|
export interface RoutineLogEntryV1 {
|
|
@@ -2855,7 +3165,13 @@ export interface RoutineLogEntryV1 {
|
|
|
2855
3165
|
pipeline: string;
|
|
2856
3166
|
/** What the routine is called — its pipeline's name. */
|
|
2857
3167
|
name: string;
|
|
2858
|
-
|
|
3168
|
+
/**
|
|
3169
|
+
* What the line is. `remarked` is a line that is not a run and not a
|
|
3170
|
+
* refusal: a note the pub wrote into the routine log, its words in
|
|
3171
|
+
* `reason`. A widget that does not know a kind shows the line's text
|
|
3172
|
+
* (`reason`).
|
|
3173
|
+
*/
|
|
3174
|
+
kind: 'ran' | 'skipped' | 'paused' | 'failed' | 'stopped' | 'remarked';
|
|
2859
3175
|
reason?: string;
|
|
2860
3176
|
/** Epoch ms. */
|
|
2861
3177
|
startedAt: number;
|
|
@@ -2877,6 +3193,75 @@ export interface RoutineLogV1 {
|
|
|
2877
3193
|
lastInteractionAt: number | null;
|
|
2878
3194
|
entries: RoutineLogEntryV1[];
|
|
2879
3195
|
}
|
|
3196
|
+
/**
|
|
3197
|
+
* 🚧 One run of a pipeline in this session, as the Runs widget lists it
|
|
3198
|
+
* (owner 2026-11-06).
|
|
3199
|
+
* @experimental
|
|
3200
|
+
*/
|
|
3201
|
+
export interface SessionRunV1 {
|
|
3202
|
+
runId: string;
|
|
3203
|
+
/** The pipeline's slug. */
|
|
3204
|
+
pipeline: string;
|
|
3205
|
+
outcome: 'ok' | 'halt' | 'err' | 'cancelled';
|
|
3206
|
+
/** Which family of registration started it — `event` · `action` · `routine`; null when none did. */
|
|
3207
|
+
triggerFamily: string | null;
|
|
3208
|
+
/** That registration's derived key (`message-respond→story-respond`); null when none. */
|
|
3209
|
+
registrationKey: string | null;
|
|
3210
|
+
/** The receipt's trigger source: `input` · `event` · `hook` · `ui` · `schedule`. */
|
|
3211
|
+
triggerSource: string;
|
|
3212
|
+
/** Whose run it is (an administrator sees every user's runs). */
|
|
3213
|
+
userId: number | null;
|
|
3214
|
+
username: string | null;
|
|
3215
|
+
/** Epoch ms. */
|
|
3216
|
+
startedAt: number;
|
|
3217
|
+
endedAt: number;
|
|
3218
|
+
elapsedMs: number;
|
|
3219
|
+
tokens: number;
|
|
3220
|
+
/** Where it stopped, when it did not finish. */
|
|
3221
|
+
haltNodeKey: string | null;
|
|
3222
|
+
haltReason: string | null;
|
|
3223
|
+
/**
|
|
3224
|
+
* 🚧 Set when the row is a routine-log line that is not a run: a routine
|
|
3225
|
+
* firing that was skipped or paused, or a note the pub wrote (RGN9). Its
|
|
3226
|
+
* words are `haltReason`, already a sentence. Absent on a run.
|
|
3227
|
+
*/
|
|
3228
|
+
routineKind?: Extract<RoutineLogEntryV1['kind'], 'skipped' | 'paused' | 'remarked'>;
|
|
3229
|
+
isPreview: boolean;
|
|
3230
|
+
/** The run that started this one, and how deep below the first it stands (0 = a run nothing else started). */
|
|
3231
|
+
parentRunId: string | null;
|
|
3232
|
+
depth: number;
|
|
3233
|
+
/** The line whose prompt the Prompt door opens — set only when the host can show it (context debugging on, the line loaded, its prompt recorded); else null and no Prompt button. */
|
|
3234
|
+
promptMessageId: number | null;
|
|
3235
|
+
}
|
|
3236
|
+
/**
|
|
3237
|
+
* 🚧 What `session-runs` answers: the session's runs, newest first.
|
|
3238
|
+
* @experimental
|
|
3239
|
+
*/
|
|
3240
|
+
export interface SessionRunsV1 {
|
|
3241
|
+
runs: SessionRunV1[];
|
|
3242
|
+
}
|
|
3243
|
+
/**
|
|
3244
|
+
* 🚧 One step of a run, as `session-run-steps` answers it.
|
|
3245
|
+
* @experimental
|
|
3246
|
+
*/
|
|
3247
|
+
export interface SessionRunStepV1 {
|
|
3248
|
+
seq: number;
|
|
3249
|
+
/** The step's node key (`generate`, or `lore [2]` for a loop's iteration). */
|
|
3250
|
+
key: string;
|
|
3251
|
+
kind: string;
|
|
3252
|
+
/** The receipt's word for how the step ended (`ok`, `halt`, `skip`, `error`…). */
|
|
3253
|
+
result: string;
|
|
3254
|
+
reason: string | null;
|
|
3255
|
+
elapsedMs: number;
|
|
3256
|
+
tokens: number | null;
|
|
3257
|
+
}
|
|
3258
|
+
/**
|
|
3259
|
+
* 🚧 What `session-run-steps` answers.
|
|
3260
|
+
* @experimental
|
|
3261
|
+
*/
|
|
3262
|
+
export interface SessionRunStepsV1 {
|
|
3263
|
+
steps: SessionRunStepV1[];
|
|
3264
|
+
}
|
|
2880
3265
|
/**
|
|
2881
3266
|
* 🚧 Who a host answers a request kind for — its **askers**:
|
|
2882
3267
|
*
|
|
@@ -2971,9 +3356,11 @@ export declare const WIDGET_REQUEST_APIS: Readonly<{
|
|
|
2971
3356
|
readonly 'remove-attachment': 'session';
|
|
2972
3357
|
readonly draft: 'session';
|
|
2973
3358
|
readonly 'switch-persona': 'session';
|
|
3359
|
+
readonly 'write-as': 'session';
|
|
2974
3360
|
readonly 'add-persona': 'session';
|
|
2975
3361
|
readonly 'take-seat': 'session';
|
|
2976
3362
|
readonly 'fire-turn': 'session';
|
|
3363
|
+
readonly 'stop-run': 'session';
|
|
2977
3364
|
readonly 'rewind-turn': 'session';
|
|
2978
3365
|
readonly 'forward-turn': 'session';
|
|
2979
3366
|
readonly 'decide-proposal': 'session';
|
|
@@ -2989,11 +3376,16 @@ export declare const WIDGET_REQUEST_APIS: Readonly<{
|
|
|
2989
3376
|
readonly 'set-entry-marks': 'session';
|
|
2990
3377
|
readonly 'authors-note': 'session';
|
|
2991
3378
|
readonly 'set-authors-note': 'session';
|
|
3379
|
+
readonly 'session-scenario': 'session';
|
|
3380
|
+
readonly 'set-session-scenario': 'session';
|
|
3381
|
+
readonly 'show-channel': 'session';
|
|
3382
|
+
readonly 'show-line': 'session';
|
|
2992
3383
|
readonly 'history-entries': 'session';
|
|
2993
3384
|
readonly 'set-story-clock': 'session';
|
|
2994
3385
|
readonly 'start-history-entry': 'session';
|
|
2995
3386
|
readonly 'extend-graph': 'session';
|
|
2996
3387
|
readonly 'summarize-scenes': 'session';
|
|
3388
|
+
readonly 'compile-history-entry': 'session';
|
|
2997
3389
|
readonly 'decide-scene-cue': 'session';
|
|
2998
3390
|
readonly 'session-places': 'session';
|
|
2999
3391
|
readonly 'channel-lanes': 'session';
|
|
@@ -3001,8 +3393,11 @@ export declare const WIDGET_REQUEST_APIS: Readonly<{
|
|
|
3001
3393
|
readonly 'set-chosen-image': 'session';
|
|
3002
3394
|
readonly 'set-backdrop': 'session';
|
|
3003
3395
|
readonly 'set-owner-face': 'session';
|
|
3396
|
+
readonly 'show-hidden-stats': 'session';
|
|
3004
3397
|
readonly 'session-images': 'session';
|
|
3005
3398
|
readonly 'routine-log': 'session';
|
|
3399
|
+
readonly 'session-runs': 'session';
|
|
3400
|
+
readonly 'session-run-steps': 'session';
|
|
3006
3401
|
readonly 'file-pick': 'ui';
|
|
3007
3402
|
readonly 'file-save': 'ui';
|
|
3008
3403
|
readonly 'session-fullscreen': 'ui';
|
|
@@ -3126,7 +3521,14 @@ export interface WidgetInvokeArgs {
|
|
|
3126
3521
|
* to an action that collects text, as if the collect modal had — and
|
|
3127
3522
|
* refuses the press, firing nothing, when the action collects none. An
|
|
3128
3523
|
* action that also collects recipients still opens its modal, prefilled.
|
|
3129
|
-
*
|
|
3524
|
+
*
|
|
3525
|
+
* An EMPTY string is a command typed in full with nothing after it
|
|
3526
|
+
* (`/narrator`): the press names the action and offers no text, so the
|
|
3527
|
+
* host fires an action whose text is optional (or that collects none)
|
|
3528
|
+
* at once, and opens the collect modal only for one that requires text.
|
|
3529
|
+
* Absent, the press came from a chip or a menu and a collecting action
|
|
3530
|
+
* opens its modal as before.
|
|
3531
|
+
* @ruling lair pass S2; slash presses fire (owner, 2026-11-04)
|
|
3130
3532
|
*/
|
|
3131
3533
|
text?: string;
|
|
3132
3534
|
}
|