@serene-pub/sdk 0.6.0-pr-8 β 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/announce.d.ts +36 -3
- package/dist/announce.js +59 -4
- package/dist/builder.d.ts +5 -7
- package/dist/cadences.d.ts +1 -3
- 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 +172 -7
- package/dist/descriptors.d.ts +86 -12
- package/dist/descriptors.js +83 -5
- package/dist/document.d.ts +1 -1
- package/dist/events.d.ts +68 -25
- package/dist/events.js +35 -2
- package/dist/executor.d.ts +27 -0
- package/dist/executor.js +6 -3
- package/dist/exposure.d.ts +35 -1
- package/dist/exposure.js +64 -2
- package/dist/extension.d.ts +13 -2
- package/dist/extension.js +3 -1
- package/dist/genres.d.ts +61 -3
- package/dist/genres.js +131 -10
- package/dist/hostElements.d.ts +3 -3
- package/dist/hostElements.js +12 -4
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/participants.d.ts +30 -0
- 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/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 +3 -1
- package/dist/sceneSettings.js +3 -1
- package/dist/sessionDossier.d.ts +102 -2
- package/dist/sessionSettings.d.ts +18 -0
- package/dist/shapes.d.ts +9 -0
- package/dist/shapes.js +9 -0
- package/dist/speech.d.ts +14 -3
- package/dist/storyTime.d.ts +77 -1
- package/dist/storyTime.js +111 -4
- package/dist/surfaces.d.ts +38 -1
- package/dist/surfaces.js +3 -0
- package/dist/template.d.ts +13 -1
- package/dist/templateCheck.js +175 -12
- package/dist/templateFit.js +4 -1
- package/dist/validate.js +69 -0
- package/dist/variableLayouts.d.ts +19 -0
- package/dist/variableLayouts.js +19 -0
- package/dist/variables.d.ts +202 -13
- package/dist/variables.js +258 -32
- package/dist/widgets.d.ts +68 -9
- package/dist/widgets.js +10 -2
- package/host-elements.d.ts +4 -2
- package/package.json +1 -1
package/dist/widgets.d.ts
CHANGED
|
@@ -1529,9 +1529,13 @@ export type FileSaveAnswer = string | {
|
|
|
1529
1529
|
name?: string;
|
|
1530
1530
|
mime?: string;
|
|
1531
1531
|
};
|
|
1532
|
-
/** π§ (M3b) The longest `persona.name` a `create-session` request may carry, in characters after trimming; the host refuses longer in words.
|
|
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
|
+
*/
|
|
1533
1535
|
export declare const CREATE_SESSION_PERSONA_NAME_MAX = 80;
|
|
1534
|
-
/** π§ (M3b) The longest `persona.description` a `create-session` request may carry, in characters after trimming; the host refuses longer in words.
|
|
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
|
+
*/
|
|
1535
1539
|
export declare const CREATE_SESSION_PERSONA_DESCRIPTION_MAX = 2000;
|
|
1536
1540
|
/**
|
|
1537
1541
|
* π§ What a widget may ASK the host for β by kind, with its params and
|
|
@@ -1872,6 +1876,17 @@ export interface WidgetRequests {
|
|
|
1872
1876
|
};
|
|
1873
1877
|
result: void;
|
|
1874
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
|
+
};
|
|
1875
1890
|
/** π§ Core's composer: the host's "add your persona" flow, for a guest with none. */
|
|
1876
1891
|
'add-persona': {
|
|
1877
1892
|
params: Record<string, never>;
|
|
@@ -1902,6 +1917,18 @@ export interface WidgetRequests {
|
|
|
1902
1917
|
};
|
|
1903
1918
|
result: void;
|
|
1904
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
|
+
};
|
|
1905
1932
|
/**
|
|
1906
1933
|
* π§ Core's conversation: **Back** β take the newest turn of the story out
|
|
1907
1934
|
* of the history, onto the session's forward stack (RF fix 5, owner ruling
|
|
@@ -2030,7 +2057,7 @@ export interface WidgetRequests {
|
|
|
2030
2057
|
* π§ One line the table hears when this write lands (2026-10-18,
|
|
2031
2058
|
* the 100-turn walk #35: _Give toβ¦_ moved a potion in silence) β
|
|
2032
2059
|
* "Wren gives Potion of healing to Rook." In a session whose genre
|
|
2033
|
-
* keeps a **table channel** (`
|
|
2060
|
+
* keeps a **table channel** (a channel declared `table: true`; `tableChannelOf`), the host writes it
|
|
2034
2061
|
* there, under the story's newest line, voiceless; elsewhere it is
|
|
2035
2062
|
* not written. Plain words, at most 200 characters.
|
|
2036
2063
|
* @experimental
|
|
@@ -2897,6 +2924,8 @@ export interface StoryClockV1 {
|
|
|
2897
2924
|
linePresentLabel: string;
|
|
2898
2925
|
/** The session's own clock stands before its line's present: it reads an earlier moment. */
|
|
2899
2926
|
behind: boolean;
|
|
2927
|
+
/** π§ The book's calendar month names, in order; absent when the book has no calendar. */
|
|
2928
|
+
months?: string[];
|
|
2900
2929
|
}
|
|
2901
2930
|
/**
|
|
2902
2931
|
* π§ One history entry as Chronicle reads it. A history entry is dated,
|
|
@@ -3018,7 +3047,9 @@ export interface HistoryEntriesV1 {
|
|
|
3018
3047
|
/**
|
|
3019
3048
|
* π§ When this session's scenes are summarized (its scene settings):
|
|
3020
3049
|
* `onClose`, `onRequest` or `never` β under `never`, no *Summarize* is
|
|
3021
|
-
* 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.
|
|
3022
3053
|
*/
|
|
3023
3054
|
summaryMode?: SceneSummaryMode;
|
|
3024
3055
|
/** π§ This session's closed scenes whose summary has not run, or failed β **Summarize all (N)**. */
|
|
@@ -3029,7 +3060,8 @@ export interface HistoryEntriesV1 {
|
|
|
3029
3060
|
* *Undated* last: the lorebook History lens's own grouping, read for this
|
|
3030
3061
|
* session. Absent on a host that predates it; empty when none wait.
|
|
3031
3062
|
* β Not `ungraphedScenes` (a count of scenes the graph has not read) and
|
|
3032
|
-
* not `scenes` (the ones filed under `current`).
|
|
3063
|
+
* not `scenes` (the ones filed under `current`). With `timeline` false it
|
|
3064
|
+
* holds every scene of this session instead (see there).
|
|
3033
3065
|
*/
|
|
3034
3066
|
unfiledDays?: Array<{
|
|
3035
3067
|
/** The day; null = the scenes opened with no story clock (*Undated*). */
|
|
@@ -3039,6 +3071,18 @@ export interface HistoryEntriesV1 {
|
|
|
3039
3071
|
/** This session's scenes of that day not yet compiled, in id order. */
|
|
3040
3072
|
scenes: HistorySceneV1[];
|
|
3041
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;
|
|
3042
3086
|
}
|
|
3043
3087
|
/**
|
|
3044
3088
|
* π§ The session's author's note, as stored (2026-10-02, AN1) β the value of
|
|
@@ -3107,9 +3151,10 @@ export interface SessionEntryV1 {
|
|
|
3107
3151
|
}
|
|
3108
3152
|
/**
|
|
3109
3153
|
* π§ One line of **While you were away** (PLAN-layering A7, R23): a
|
|
3110
|
-
* routine's run,
|
|
3111
|
-
* log keeps it. `wrote` is what
|
|
3112
|
-
* 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.
|
|
3113
3158
|
* @experimental
|
|
3114
3159
|
*/
|
|
3115
3160
|
export interface RoutineLogEntryV1 {
|
|
@@ -3120,7 +3165,13 @@ export interface RoutineLogEntryV1 {
|
|
|
3120
3165
|
pipeline: string;
|
|
3121
3166
|
/** What the routine is called β its pipeline's name. */
|
|
3122
3167
|
name: string;
|
|
3123
|
-
|
|
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';
|
|
3124
3175
|
reason?: string;
|
|
3125
3176
|
/** Epoch ms. */
|
|
3126
3177
|
startedAt: number;
|
|
@@ -3169,6 +3220,12 @@ export interface SessionRunV1 {
|
|
|
3169
3220
|
/** Where it stopped, when it did not finish. */
|
|
3170
3221
|
haltNodeKey: string | null;
|
|
3171
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'>;
|
|
3172
3229
|
isPreview: boolean;
|
|
3173
3230
|
/** The run that started this one, and how deep below the first it stands (0 = a run nothing else started). */
|
|
3174
3231
|
parentRunId: string | null;
|
|
@@ -3299,9 +3356,11 @@ export declare const WIDGET_REQUEST_APIS: Readonly<{
|
|
|
3299
3356
|
readonly 'remove-attachment': 'session';
|
|
3300
3357
|
readonly draft: 'session';
|
|
3301
3358
|
readonly 'switch-persona': 'session';
|
|
3359
|
+
readonly 'write-as': 'session';
|
|
3302
3360
|
readonly 'add-persona': 'session';
|
|
3303
3361
|
readonly 'take-seat': 'session';
|
|
3304
3362
|
readonly 'fire-turn': 'session';
|
|
3363
|
+
readonly 'stop-run': 'session';
|
|
3305
3364
|
readonly 'rewind-turn': 'session';
|
|
3306
3365
|
readonly 'forward-turn': 'session';
|
|
3307
3366
|
readonly 'decide-proposal': 'session';
|
package/dist/widgets.js
CHANGED
|
@@ -124,9 +124,13 @@ const BASE_SECTIONS = {
|
|
|
124
124
|
* @ruling R75
|
|
125
125
|
*/
|
|
126
126
|
export const WIDGET_BASE_SECTIONS = Object.freeze(Object.keys(BASE_SECTIONS));
|
|
127
|
-
/** π§ (M3b) The longest `persona.name` a `create-session` request may carry, in characters after trimming; the host refuses longer in words.
|
|
127
|
+
/** π§ (M3b) The longest `persona.name` a `create-session` request may carry, in characters after trimming; the host refuses longer in words.
|
|
128
|
+
* @experimental
|
|
129
|
+
*/
|
|
128
130
|
export const CREATE_SESSION_PERSONA_NAME_MAX = 80;
|
|
129
|
-
/** π§ (M3b) The longest `persona.description` a `create-session` request may carry, in characters after trimming; the host refuses longer in words.
|
|
131
|
+
/** π§ (M3b) The longest `persona.description` a `create-session` request may carry, in characters after trimming; the host refuses longer in words.
|
|
132
|
+
* @experimental
|
|
133
|
+
*/
|
|
130
134
|
export const CREATE_SESSION_PERSONA_DESCRIPTION_MAX = 2000;
|
|
131
135
|
/**
|
|
132
136
|
* The askers of every request kind β the marking a host enforces
|
|
@@ -162,10 +166,12 @@ export const WIDGET_REQUEST_ASKERS = Object.freeze({
|
|
|
162
166
|
// π§ The gentler send: prefill the composer, on a channel the widget may write.
|
|
163
167
|
draft: Object.freeze({ scope: 'channel', write: true }),
|
|
164
168
|
'switch-persona': 'core',
|
|
169
|
+
'write-as': 'core',
|
|
165
170
|
'add-persona': 'core',
|
|
166
171
|
// π§ A guest's seat, opened by name (Lair rewrite D5) β core's composer only.
|
|
167
172
|
'take-seat': 'core',
|
|
168
173
|
'fire-turn': 'core',
|
|
174
|
+
'stop-run': 'core',
|
|
169
175
|
// π§ Back Β· Forward (RF fix 5): the session's history β core's conversation only.
|
|
170
176
|
'rewind-turn': 'core',
|
|
171
177
|
'forward-turn': 'core',
|
|
@@ -275,9 +281,11 @@ export const WIDGET_REQUEST_APIS = Object.freeze({
|
|
|
275
281
|
'remove-attachment': 'session',
|
|
276
282
|
draft: 'session',
|
|
277
283
|
'switch-persona': 'session',
|
|
284
|
+
'write-as': 'session',
|
|
278
285
|
'add-persona': 'session',
|
|
279
286
|
'take-seat': 'session',
|
|
280
287
|
'fire-turn': 'session',
|
|
288
|
+
'stop-run': 'session',
|
|
281
289
|
'rewind-turn': 'session',
|
|
282
290
|
'forward-turn': 'session',
|
|
283
291
|
'decide-proposal': 'session',
|
package/host-elements.d.ts
CHANGED
|
@@ -620,7 +620,7 @@ export interface SpHostElements {
|
|
|
620
620
|
slot?: string
|
|
621
621
|
}
|
|
622
622
|
/**
|
|
623
|
-
* π§ A sound player (1.3, O11). `src` is an app media URL (`/media/β¦`) β never another host, as `img`; `controls` draws the browser's own; `preload` is `none` Β· `metadata` Β· `auto`. Name it (`aria-label`). `error` (nothing carried) is the file failing to load. π§ `autoplay` (core's alone; speech build 2026-10-28) plays it once it loads, as far as the browser allows β the newest spoken line under Read aloud: Make and play. π§ `loadedmetadata`, `play`, `pause`, `ended` and `timeupdate` (1.7; speech polish 2026-10-29) carry `{ currentTime, duration, paused }` β seconds, seconds (0 until known), and whether it is paused; `timeupdate` arrives about four times a second. π§ `playing` (1.8; heading audio control 2026-10-29; core's alone) β present, the page plays it; absent after present, the page pauses it. An element that lands without it is left alone, so `autoplay` still plays. A play the browser refuses is answered with a `pause` event. The page plays one sound at a time: another player starting pauses this one, and its `pause` arrives. The element's own `play` / `pause` / `ended` events stay the truth; to start over, draw a fresh element.
|
|
623
|
+
* π§ A sound player (1.3, O11). `src` is an app media URL (`/media/β¦`) β never another host, as `img`; `controls` draws the browser's own; `preload` is `none` Β· `metadata` Β· `auto`. Name it (`aria-label`). `error` (nothing carried) is the file failing to load. π§ `autoplay` (core's alone; speech build 2026-10-28) plays it once it loads, as far as the browser allows β the newest spoken line under Read aloud: Make and play. π§ `loadedmetadata`, `play`, `pause`, `ended` and `timeupdate` (1.7; speech polish 2026-10-29) carry `{ currentTime, duration, paused }` β seconds, seconds (0 until known), and whether it is paused; `timeupdate` arrives about four times a second. π§ `playing` (1.8; heading audio control 2026-10-29; core's alone) β present, the page plays it; absent after present, the page pauses it. An element that lands without it is left alone, so `autoplay` still plays. A play the browser refuses is answered with a `pause` event. The page plays one sound at a time: another player starting pauses this one, and its `pause` arrives. The element's own `play` / `pause` / `ended` events stay the truth; to start over, draw a fresh element. π§ `playlist` (1.10, spoken audio as an ordered list of files) β space-separated app media URLs, each judged as `src`; with it the PAGE owns `src`: it plays the files in order on the same element, moving to the next in its own `ended` handler, skipping one that fails to load, and putting the first back after the last. On a playlist element the events' detail adds `playlistIndex` (0-based) and `playlistLength`, and `pause` Β· `ended` Β· `timeupdate` Β· `loadedmetadata` of a move between files are not delivered, so `ended` arrives once, after the last file; `error` carries `{ playlistIndex, playlistLength }` for the file that failed.
|
|
624
624
|
* Events: `error`, `play`, `pause`, `ended`, `timeupdate`, `loadedmetadata`.
|
|
625
625
|
*/
|
|
626
626
|
'audio': {
|
|
@@ -638,6 +638,7 @@ export interface SpHostElements {
|
|
|
638
638
|
'preload'?: SpAttr
|
|
639
639
|
'autoplay'?: SpAttr
|
|
640
640
|
'playing'?: SpAttr
|
|
641
|
+
'playlist'?: SpAttr
|
|
641
642
|
'class'?: SpAttr
|
|
642
643
|
slot?: string
|
|
643
644
|
}
|
|
@@ -859,7 +860,7 @@ export interface SpHostElements {
|
|
|
859
860
|
slot?: string
|
|
860
861
|
}
|
|
861
862
|
/**
|
|
862
|
-
* A host-owned searchable select. `input` carries `{ query }` as the person types; `change` carries `{ value }`.
|
|
863
|
+
* A host-owned searchable select. `input` carries `{ query }` as the person types; `change` carries `{ value }`. `trigger-label` names the button that opens the list for a screen reader (absent: "Show options for βΉlabelβΊ" when `label` is set).
|
|
863
864
|
* Children: `<sp-option>`.
|
|
864
865
|
* Parts: `.sp-combobox`.
|
|
865
866
|
* Events: `input`, `change`.
|
|
@@ -869,6 +870,7 @@ export interface SpHostElements {
|
|
|
869
870
|
'placeholder'?: SpAttr
|
|
870
871
|
'disabled'?: SpAttr
|
|
871
872
|
'label'?: SpAttr
|
|
873
|
+
'trigger-label'?: SpAttr
|
|
872
874
|
'class'?: SpAttr
|
|
873
875
|
slot?: string
|
|
874
876
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serene-pub/sdk",
|
|
3
|
-
"version": "0.6.0-pr-
|
|
3
|
+
"version": "0.6.0-pr-9",
|
|
4
4
|
"description": "Author Serene Pub pipelines and plugins: nodes, specs, the executor, and the author-side test harness.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/SerenePub/serene-pub-sdk/tree/main/sdk#readme",
|