@serene-pub/sdk 0.6.0-pr-7 β 0.6.0-pr-8
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 +26 -13
- package/dist/announce.js +31 -0
- 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 +23 -6
- package/dist/builder.js +57 -5
- package/dist/cadences.d.ts +11 -2
- 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/declarations.js +4 -0
- package/dist/descriptors.d.ts +68 -3
- package/dist/descriptors.js +23 -0
- package/dist/document.d.ts +8 -0
- package/dist/document.js +44 -1
- package/dist/events.d.ts +35 -4
- package/dist/events.js +7 -3
- package/dist/executor.js +26 -5
- package/dist/extension.d.ts +17 -0
- 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 +7 -0
- package/dist/genres.js +32 -1
- package/dist/hookGrants.js +10 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -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 +53 -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/registry.js +6 -3
- package/dist/sceneSettings.d.ts +4 -0
- package/dist/sceneSettings.js +7 -4
- package/dist/sessionDossier.d.ts +57 -0
- package/dist/sessionLayout.d.ts +296 -85
- package/dist/sessionLayout.js +397 -133
- package/dist/settings.d.ts +28 -1
- package/dist/settings.js +50 -2
- package/dist/shapes.d.ts +6 -1
- package/dist/shapes.js +6 -1
- package/dist/sheetLatitude.d.ts +148 -0
- package/dist/sheetLatitude.js +161 -0
- package/dist/storyTime.js +6 -4
- package/dist/surfaces.d.ts +11 -1
- package/dist/template.d.ts +26 -1
- package/dist/templateCheck.d.ts +24 -0
- package/dist/templateCheck.js +299 -7
- package/dist/templateFit.js +4 -0
- 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 +15 -11
- package/dist/variableLayouts.d.ts +141 -0
- package/dist/variableLayouts.js +183 -0
- package/dist/variables.d.ts +35 -7
- package/dist/variables.js +34 -1
- package/dist/widgetDecls.js +12 -0
- package/dist/widgets.d.ts +384 -41
- package/dist/widgets.js +23 -0
- package/package.json +1 -1
package/dist/promptBlocks.d.ts
CHANGED
|
@@ -60,10 +60,14 @@ export interface PromptBlockEntry {
|
|
|
60
60
|
* the one system-block value that changes on its own. Do not tidy it: every
|
|
61
61
|
* entry's position is a byte in every prompt on every install that has
|
|
62
62
|
* changed nothing.
|
|
63
|
+
*
|
|
64
|
+
* π§ `earlierScenes` sits after `history` and before the relationships, for
|
|
65
|
+
* comprehension: the compiled history, then the later scenes' summaries, then
|
|
66
|
+
* the lines.
|
|
63
67
|
* @internal
|
|
64
68
|
* @ruling B2 (2026-10-03)
|
|
65
69
|
*/
|
|
66
|
-
export declare const SHIPPED_PROMPT_BLOCK_IDS: readonly ['instructions', 'characters', 'personas', 'characterLore', 'scenario', 'worldLore', 'history', 'relationshipsPerspectives', 'relationshipsKnown', 'currentDate'];
|
|
70
|
+
export declare const SHIPPED_PROMPT_BLOCK_IDS: readonly ['instructions', 'characters', 'personas', 'characterLore', 'scenario', 'worldLore', 'history', 'earlierScenes', 'relationshipsPerspectives', 'relationshipsKnown', 'currentDate'];
|
|
67
71
|
/** @experimental */
|
|
68
72
|
export type ShippedPromptBlockId = (typeof SHIPPED_PROMPT_BLOCK_IDS)[number];
|
|
69
73
|
/**
|
package/dist/promptBlocks.js
CHANGED
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
* the one system-block value that changes on its own. Do not tidy it: every
|
|
45
45
|
* entry's position is a byte in every prompt on every install that has
|
|
46
46
|
* changed nothing.
|
|
47
|
+
*
|
|
48
|
+
* π§ `earlierScenes` sits after `history` and before the relationships, for
|
|
49
|
+
* comprehension: the compiled history, then the later scenes' summaries, then
|
|
50
|
+
* the lines.
|
|
47
51
|
* @internal
|
|
48
52
|
* @ruling B2 (2026-10-03)
|
|
49
53
|
*/
|
|
@@ -55,6 +59,7 @@ export const SHIPPED_PROMPT_BLOCK_IDS = [
|
|
|
55
59
|
'scenario',
|
|
56
60
|
'worldLore',
|
|
57
61
|
'history',
|
|
62
|
+
'earlierScenes',
|
|
58
63
|
'relationshipsPerspectives',
|
|
59
64
|
'relationshipsKnown',
|
|
60
65
|
'currentDate',
|
|
@@ -69,6 +74,7 @@ const BLOCK_LABELS = {
|
|
|
69
74
|
scenario: 'Scenario',
|
|
70
75
|
worldLore: 'World lore',
|
|
71
76
|
history: 'History',
|
|
77
|
+
earlierScenes: 'Earlier in the story',
|
|
72
78
|
relationshipsPerspectives: 'Relationships β their view',
|
|
73
79
|
relationshipsKnown: 'Relationships β how others see them',
|
|
74
80
|
};
|
|
@@ -122,6 +128,15 @@ export const PROMPT_BLOCKS_DECL = {
|
|
|
122
128
|
},
|
|
123
129
|
},
|
|
124
130
|
};
|
|
131
|
+
/**
|
|
132
|
+
* π§ The shipped ids as they were before `earlierScenes` was added. A stored
|
|
133
|
+
* list from before the block existed means "leave the template alone", so the
|
|
134
|
+
* shipped template renders the block in its place; a list a person reordered or
|
|
135
|
+
* switched a block off in is not "shipped" and does not get the block by itself
|
|
136
|
+
* (the docs say how to add it).
|
|
137
|
+
* @internal
|
|
138
|
+
*/
|
|
139
|
+
const PREVIOUS_SHIPPED_PROMPT_BLOCK_IDS = SHIPPED_PROMPT_BLOCK_IDS.filter((id) => id !== 'earlierScenes');
|
|
125
140
|
/**
|
|
126
141
|
* Is this value the shipped pack, entry for entry?
|
|
127
142
|
*
|
|
@@ -136,14 +151,14 @@ export const PROMPT_BLOCKS_DECL = {
|
|
|
136
151
|
export function isShippedPromptBlocks(value) {
|
|
137
152
|
if (!Array.isArray(value))
|
|
138
153
|
return false;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return false;
|
|
145
|
-
|
|
146
|
-
|
|
154
|
+
const matches = (ids) => value.length === ids.length &&
|
|
155
|
+
value.every((entry, i) => {
|
|
156
|
+
const e = entry;
|
|
157
|
+
if (!e || typeof e !== 'object')
|
|
158
|
+
return false;
|
|
159
|
+
return e.id === ids[i] && e.enabled !== false;
|
|
160
|
+
});
|
|
161
|
+
return matches(SHIPPED_PROMPT_BLOCK_IDS) || matches(PREVIOUS_SHIPPED_PROMPT_BLOCK_IDS);
|
|
147
162
|
}
|
|
148
163
|
/**
|
|
149
164
|
* The pack, applied to what a template actually produces.
|
package/dist/registry.js
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
* @ruling 13 Β§10c, 04 Β§2, F6
|
|
31
31
|
*/
|
|
32
32
|
import { pluginRuleRef } from './pluginRuleRef.js';
|
|
33
|
+
import { removedNodeDefinitionSentence } from './descriptors.js';
|
|
33
34
|
import { definitionPolicy, scriptPointsOf, } from './descriptors.js';
|
|
34
35
|
import { isScriptKindId } from './scripts.js';
|
|
35
36
|
import { settingsSlotFor } from './settingsSlot.js';
|
|
@@ -171,14 +172,16 @@ export function checkInstall(input) {
|
|
|
171
172
|
// 2. A pin that resolves to nothing.
|
|
172
173
|
if (!entry && !declared.has(pin)) {
|
|
173
174
|
const known = latest.get(n.definitionId);
|
|
175
|
+
const removed = removedNodeDefinitionSentence(n.definitionId);
|
|
174
176
|
findings.push({
|
|
175
177
|
severity: 'error',
|
|
176
178
|
code: 'E_UNKNOWN_TYPE',
|
|
177
179
|
where: `${doc.id} Β· ${n.key}`,
|
|
178
180
|
message: `pins ${pin}, which this pub does not have`,
|
|
179
|
-
fix:
|
|
180
|
-
|
|
181
|
-
|
|
181
|
+
fix: removed ??
|
|
182
|
+
(known
|
|
183
|
+
? `this pub has ${n.definitionId}@${known}. Pins are frozen on purpose, so the plugin has to be rebuilt against this release rather than silently re-pinned here.`
|
|
184
|
+
: `no version of ${n.definitionId} is registered. It comes from another plugin β install that one first, or the pipeline has a dependency its manifest does not declare.`),
|
|
182
185
|
});
|
|
183
186
|
continue;
|
|
184
187
|
}
|
package/dist/sceneSettings.d.ts
CHANGED
|
@@ -124,6 +124,10 @@ export interface SceneSettingsDecl {
|
|
|
124
124
|
summary?: SceneSummaryMode;
|
|
125
125
|
/** π§ The genre's alone (`ScenePlaceDecl`): refused on a session's override. */
|
|
126
126
|
place?: ScenePlaceDecl;
|
|
127
|
+
/** π§ The genre's alone (owner 2026-11-04, playtest item 2): a first scene opens at a new session's first story line β a cue under Suggested, a placement under Automatic, nothing under Manual. Absent = off (P1). */
|
|
128
|
+
first?: boolean;
|
|
129
|
+
/** π§ The genre's alone (owner 2026-11-04, playtest item 21): the open scene's cast follows its lines while it is open; the line names its cause; Scenes βΊ Manual stops it. Absent = off (P1). */
|
|
130
|
+
castRefresh?: boolean;
|
|
127
131
|
}
|
|
128
132
|
/** Scene settings resolved: every key stated. `length` and `pause` are null when off. @experimental */
|
|
129
133
|
export interface SceneSettings {
|
package/dist/sceneSettings.js
CHANGED
|
@@ -108,10 +108,13 @@ export function sceneSettingsFindings(raw, at = 'scenes', options = {}) {
|
|
|
108
108
|
];
|
|
109
109
|
const out = [];
|
|
110
110
|
for (const key of Object.keys(raw))
|
|
111
|
-
if (key === 'place' && layer === 'session')
|
|
112
|
-
out.push(`${at}
|
|
113
|
-
else if (key !== 'mode' && key !== 'triggers' && key !== 'summary' && key !== 'place')
|
|
114
|
-
out.push(`${at}.${key}: not a scene setting β the keys are mode, triggers, summary${layer === 'genre' ? ' and
|
|
111
|
+
if ((key === 'place' || key === 'first' || key === 'castRefresh') && layer === 'session')
|
|
112
|
+
out.push(`${at}.${key}: the ${key === 'place' ? 'place' : key} is the genre's to name (its shape.scenes.${key}) β a session cannot set it`);
|
|
113
|
+
else if (key !== 'mode' && key !== 'triggers' && key !== 'summary' && key !== 'place' && key !== 'first' && key !== 'castRefresh')
|
|
114
|
+
out.push(`${at}.${key}: not a scene setting β the keys are mode, triggers, summary${layer === 'genre' ? ', place, first and castRefresh' : ''}`);
|
|
115
|
+
for (const key of ['first', 'castRefresh'])
|
|
116
|
+
if (raw[key] !== undefined && typeof raw[key] !== 'boolean')
|
|
117
|
+
out.push(`${at}.${key}: true or false β not ${JSON.stringify(raw[key])}`);
|
|
115
118
|
if (raw.mode !== undefined && !SCENE_MODES.includes(raw.mode))
|
|
116
119
|
out.push(`${at}.mode: one of ${SCENE_MODES.join(', ')} β not ${JSON.stringify(raw.mode)}`);
|
|
117
120
|
if (raw.summary !== undefined && !SCENE_SUMMARY_MODES.includes(raw.summary))
|
package/dist/sessionDossier.d.ts
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
*/
|
|
32
32
|
import type { StoryCalendar, StoryTime } from './storyTime.js';
|
|
33
33
|
import type { SceneSummaryMode } from './sceneSettings.js';
|
|
34
|
+
import type { ParticipantRef } from './participants.js';
|
|
34
35
|
/** A participant as a line names them: display name, reference, face. @experimental */
|
|
35
36
|
export interface ConversationSpeakerV1 {
|
|
36
37
|
name: string;
|
|
@@ -146,6 +147,10 @@ export interface ConversationSceneV1 {
|
|
|
146
147
|
* back to who spoke in its loaded lines (lane E).
|
|
147
148
|
*/
|
|
148
149
|
cast?: ConversationSceneCastV1[];
|
|
150
|
+
/** π§ Why the scene began by itself, in its scene cue's words (`the day changed`); absent for a scene a person started. */
|
|
151
|
+
openedBecause?: string;
|
|
152
|
+
/** π§ While it is open and its genre keeps its cast up to date from its lines: what does it and how to stop it, as one sentence. Absent otherwise. */
|
|
153
|
+
castCause?: string;
|
|
149
154
|
}
|
|
150
155
|
/**
|
|
151
156
|
* π§ One member of a scene's cast, as a scene divider draws it.
|
|
@@ -182,14 +187,24 @@ export interface ConversationSceneCueV1 {
|
|
|
182
187
|
}
|
|
183
188
|
/** The cast, as far as answering a form needs it (`canAnswerForm`). @experimental */
|
|
184
189
|
export interface ConversationCastV1 {
|
|
190
|
+
/**
|
|
191
|
+
* Each row also carries π§ `ref` (the seat's participant reference, as the
|
|
192
|
+
* host fills it) and π§ `castMemberId` (the seat's cast member). Both
|
|
193
|
+
* host-filled, absent from a host that predates them.
|
|
194
|
+
*/
|
|
185
195
|
sessionPersonas: Array<{
|
|
186
196
|
personaId: number | null;
|
|
187
197
|
persona: {
|
|
188
198
|
userId: number | null;
|
|
189
199
|
} | null;
|
|
200
|
+
ref?: ParticipantRef;
|
|
201
|
+
castMemberId?: number | null;
|
|
190
202
|
}>;
|
|
203
|
+
/** Each row also carries π§ `ref` and π§ `castMemberId`, as `sessionPersonas` rows do. */
|
|
191
204
|
sessionCharacters: Array<{
|
|
192
205
|
characterId: number | null;
|
|
206
|
+
ref?: ParticipantRef;
|
|
207
|
+
castMemberId?: number | null;
|
|
193
208
|
}>;
|
|
194
209
|
}
|
|
195
210
|
/**
|
|
@@ -363,6 +378,14 @@ export interface SessionDossierV1 {
|
|
|
363
378
|
* @ruling pr-6 R-a, R-b; pass 13
|
|
364
379
|
*/
|
|
365
380
|
settledThrough?: number | null;
|
|
381
|
+
/**
|
|
382
|
+
* π§ The id of the newest loaded row the viewing user wrote; names only the viewer's own row.
|
|
383
|
+
* Null: the viewer has written none of the loaded rows. Absent: a host that predates it.
|
|
384
|
+
* A widget that holds its reader's place reads it to catch the reader up when they send
|
|
385
|
+
* (PLAN-visual-novel-layout Β§1.2). The Dialogue box jumps to it only when it is one of
|
|
386
|
+
* its own (main channel) rows.
|
|
387
|
+
*/
|
|
388
|
+
ownNewestMessageId?: number | null;
|
|
366
389
|
/**
|
|
367
390
|
* The session's mode is not installed: the log is read-only.
|
|
368
391
|
* @ruling 19 Β§6
|
|
@@ -391,6 +414,19 @@ export interface ConversationRewindV1 {
|
|
|
391
414
|
back: string | null;
|
|
392
415
|
/** Why Forward is refused now, or null when it may be pressed. */
|
|
393
416
|
forward: string | null;
|
|
417
|
+
/** π§ What Back would take now (playtest item 6): the rows besides the person's line, and the names on them, each once. Absent: the host did not say, or the count went stale. */
|
|
418
|
+
backTakes?: {
|
|
419
|
+
count: number;
|
|
420
|
+
names: string[];
|
|
421
|
+
/** π§ The person lines the turn holds; present only at a table (2 or more). */
|
|
422
|
+
personLines?: number;
|
|
423
|
+
/** π§ The one message Back takes, present only when the genre takes one message per press: its author, whether it is the owner's own line, and how many lines are filed on it. */
|
|
424
|
+
newestMessage?: {
|
|
425
|
+
author: string | null;
|
|
426
|
+
yours: boolean;
|
|
427
|
+
filed: number;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
394
430
|
}
|
|
395
431
|
/** One proposed change, described. @experimental */
|
|
396
432
|
export interface ConversationProposalV1 {
|
|
@@ -490,6 +526,27 @@ export interface ConversationComposerV1 {
|
|
|
490
526
|
playerLabel?: string;
|
|
491
527
|
/** A guest with no persona: the composer offers to add one instead. */
|
|
492
528
|
addPersona: boolean;
|
|
529
|
+
/**
|
|
530
|
+
* π§ The Messages copy this composer (or turn line) follows, resolved by the
|
|
531
|
+
* host (PLAN-session-layout-simplify D7): the nearest panel above in its
|
|
532
|
+
* zone whose open tab is a Messages copy, else the nearest in its zone, else
|
|
533
|
+
* the layout's first. Absent: the first writable channel. @experimental
|
|
534
|
+
*/
|
|
535
|
+
target?: {
|
|
536
|
+
instance: string;
|
|
537
|
+
channel: string;
|
|
538
|
+
label: string;
|
|
539
|
+
lineWidth?: 'column' | 'full' | 'comfortable';
|
|
540
|
+
presentation?: 'rows' | 'folio';
|
|
541
|
+
};
|
|
542
|
+
/**
|
|
543
|
+
* π§ Set while the target's panel shows a non-Messages tab: the composer
|
|
544
|
+
* keeps writing to this channel and says *Writing to βΉlabelβΊ*. @experimental
|
|
545
|
+
*/
|
|
546
|
+
writingTo?: {
|
|
547
|
+
channel: string;
|
|
548
|
+
label: string;
|
|
549
|
+
};
|
|
493
550
|
/**
|
|
494
551
|
* π§ A guest who plays, in a genre of player seats (one with a player
|
|
495
552
|
* label: the Lair), with no seat yet: the story's composer offers a
|