@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/messageBlocks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Message blocks
|
|
2
|
+
* Message blocks — custom message content as **data, not code**.
|
|
3
3
|
*
|
|
4
4
|
* A plugin's message part carries a block tree in `data.blocks`; core renders
|
|
5
5
|
* it with its own components. Nothing to sanitize (no HTML crosses the
|
|
@@ -11,17 +11,18 @@
|
|
|
11
11
|
* The validator is the write-time gate: a hostile or malformed tree is refused
|
|
12
12
|
* with the block path named, and the caps make "render whatever a sandboxed
|
|
13
13
|
* hook produced" a bounded promise. Findings carry a `fix` like every finding
|
|
14
|
-
* in this SDK
|
|
14
|
+
* in this SDK.
|
|
15
|
+
* @ruling 20 §6, 15 §1.3
|
|
15
16
|
*/
|
|
16
17
|
import type { SettingsSchema } from './settings.js';
|
|
17
18
|
import { type EffectsLineDeclarationInput } from './actions.js';
|
|
18
19
|
import { type ParticipantRef } from './participants.js';
|
|
19
20
|
/**
|
|
20
|
-
* What a `choices` button or a `form` submit fires
|
|
21
|
+
* What a `choices` button or a `form` submit fires.
|
|
21
22
|
*
|
|
22
23
|
* `fn` is the action's **key** — the second half of its identity, the word
|
|
23
|
-
* a spec's own block names one of its actions by (
|
|
24
|
-
* routing *function
|
|
24
|
+
* a spec's own block names one of its actions by (it was once the
|
|
25
|
+
* routing *function*, and the key of every action core ships was
|
|
25
26
|
* already that word). `action` is the
|
|
26
27
|
* **identity** of the declaration the press is held to, `<spec slug>#<key>`
|
|
27
28
|
* (`ACTION_IDENTITY`): the server checks THAT action's audience and
|
|
@@ -33,13 +34,14 @@ import { type ParticipantRef } from './participants.js';
|
|
|
33
34
|
* whose spec declares no action for `fn` — is fired as the legacy shape and
|
|
34
35
|
* gets the narrowest reading: the owner floor.
|
|
35
36
|
* @experimental
|
|
37
|
+
* @ruling U5c review, W-E, plans/31 V2
|
|
36
38
|
*/
|
|
37
39
|
export interface BlockActionRef {
|
|
38
40
|
fn: string;
|
|
39
41
|
action?: string;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
|
-
* A **form**
|
|
44
|
+
* A **form** is an
|
|
43
45
|
* action still awaiting its answer, addressed to an audience and carried in
|
|
44
46
|
* a message: a `choices` block (one question, several options) or a `form`
|
|
45
47
|
* block (fields to fill). The two fields below are what make a block a form
|
|
@@ -58,8 +60,7 @@ export interface BlockActionRef {
|
|
|
58
60
|
* host at the write (`assignBlockIds`) so a fire, a `form-addressed`
|
|
59
61
|
* event and a `form-answered` change can all name it. Never written by a
|
|
60
62
|
* spec; one it wrote is kept.
|
|
61
|
-
* - **`head`** — the **channel head** the form was issued at
|
|
62
|
-
* R-15 *Staleness and order*; 30 §U5f, 2026-09-17): the greatest message
|
|
63
|
+
* - **`head`** — the **channel head** the form was issued at: the greatest message
|
|
63
64
|
* id on the row's channel at the write, stamped by the host
|
|
64
65
|
* (`assignBlockHead`) — for a fresh write, the row itself. The head
|
|
65
66
|
* moving past it **stales** the form: unanswered, and a newer message
|
|
@@ -78,13 +79,15 @@ export interface BlockActionRef {
|
|
|
78
79
|
* enum of these keys). Options of an addressed block must each carry one,
|
|
79
80
|
* distinct — a question with options must be answerable by key.
|
|
80
81
|
* @experimental
|
|
82
|
+
* @ruling plans/29 R-15 *Forms*, 30 §U5d (2026-09-17), plans/29 R-15 *Staleness and order*, 30 §U5f (2026-09-17)
|
|
81
83
|
*/
|
|
82
84
|
export interface FormBlockFields {
|
|
83
85
|
id?: string;
|
|
84
86
|
/**
|
|
85
|
-
* The channel head at issue
|
|
87
|
+
* The channel head at issue — a positive message id, the host's
|
|
86
88
|
* stamp. See the module note: staleness is `!answered && head != null &&
|
|
87
89
|
* headNow > head`, computed by whoever holds the channel.
|
|
90
|
+
* @ruling U5f
|
|
88
91
|
*/
|
|
89
92
|
head?: number;
|
|
90
93
|
addressee?: ParticipantRef;
|
|
@@ -97,8 +100,8 @@ export interface FormBlockFields {
|
|
|
97
100
|
question?: string;
|
|
98
101
|
/**
|
|
99
102
|
* What the question is **about**, by name — the thing an answer acts on,
|
|
100
|
-
* carried from the run that asked to the run the press fires
|
|
101
|
-
*
|
|
103
|
+
* carried from the run that asked to the run the press fires.
|
|
104
|
+
* The Lair's knock asks *is there a room here?*; the
|
|
102
105
|
* room is its `referent`, and *Answer the door* reads it off the form
|
|
103
106
|
* (`read-answer@1`'s `referent`) to name the room it writes. Plain text,
|
|
104
107
|
* never an id: it is shown to nobody and trusted for nothing — a press
|
|
@@ -108,22 +111,25 @@ export interface FormBlockFields {
|
|
|
108
111
|
* Neither the question (prose a person reads) nor an option's `choice`
|
|
109
112
|
* (a key a junction compares): those two could not carry a name without
|
|
110
113
|
* breaking what they are for.
|
|
114
|
+
* @ruling lair pass B12 (2026-09-27)
|
|
111
115
|
*/
|
|
112
116
|
referent?: string;
|
|
113
117
|
/**
|
|
114
118
|
* Where the question was asked **from**, by name — carried beside
|
|
115
|
-
* `referent` from the run that asked to the run the press fires
|
|
116
|
-
*
|
|
119
|
+
* `referent` from the run that asked to the run the press fires.
|
|
120
|
+
* The Lair's knock stamps the room its planner said the
|
|
117
121
|
* party stood in, and *Answer the door* links the new room to it when the
|
|
118
122
|
* world's `location` names nowhere. Plain text, shown to nobody and
|
|
119
123
|
* trusted for nothing, like `referent`; absent on most questions.
|
|
124
|
+
* @ruling plan A27 (2026-09-30)
|
|
120
125
|
*/
|
|
121
126
|
vantage?: string;
|
|
122
127
|
/**
|
|
123
|
-
* The answer, once given
|
|
128
|
+
* The answer, once given — stamped on the stored block
|
|
124
129
|
* by the host when the action's run landed, never written by a spec. A
|
|
125
130
|
* form is answered **once**: a second press is refused naming who
|
|
126
131
|
* answered, and a client greys the block and shows the answer.
|
|
132
|
+
* @ruling U5d review, W7
|
|
127
133
|
*/
|
|
128
134
|
answered?: FormAnswered;
|
|
129
135
|
}
|
|
@@ -228,22 +234,23 @@ export declare const BLOCK_ID_MAX_LENGTH = 64;
|
|
|
228
234
|
export declare function checkMessageBlocks(value: unknown): MessageBlockFinding[];
|
|
229
235
|
/**
|
|
230
236
|
* Stamp each `choices` button and `form` in a tree with the identity of the
|
|
231
|
-
* declaration it fires — the outlet's half of
|
|
237
|
+
* declaration it fires — the outlet's half of the action's identity, called where a block part
|
|
232
238
|
* is written with the run's spec in hand. That is the host's seam, not the
|
|
233
239
|
* SDK's: in Serene Pub the executor's host scope carries the running
|
|
234
240
|
* document's slug (`runtime/host.ts`, `HostScope.specId`) and its message
|
|
235
|
-
* outlet is where the stamp lands; the `blocks` port
|
|
241
|
+
* outlet is where the stamp lands; the `blocks` port is built on
|
|
236
242
|
* this call. The SDK declares no `HostScope` — a host wired by hand passes
|
|
237
243
|
* `{ id, contributes }` from wherever it keeps the running spec.
|
|
238
244
|
*
|
|
239
245
|
* The identity is `<spec id>#<key>` for the action of `spec` whose `key`
|
|
240
|
-
* is the block's `fn` (
|
|
246
|
+
* is the block's `fn` (the key is the identity's second half,
|
|
241
247
|
* so `fn` names at most one). A block whose `fn` the spec declares no
|
|
242
248
|
* action for is left unstamped — it fires as legacy and gets the
|
|
243
249
|
* owner floor — rather than guessed; and a block that already carries an
|
|
244
250
|
* `action` keeps it, so a spec may name a declaration of another spec's on
|
|
245
251
|
* purpose. Returns a copy; the input is never mutated.
|
|
246
252
|
* @internal
|
|
253
|
+
* @ruling W-E, U5d, plans/31 V2
|
|
247
254
|
*/
|
|
248
255
|
export declare function stampBlockActions(blocks: MessageBlock[], spec: {
|
|
249
256
|
id: string;
|
|
@@ -298,24 +305,24 @@ export declare function foreignBlockActions(blocks: MessageBlock[], spec: {
|
|
|
298
305
|
contributes?: unknown;
|
|
299
306
|
}): string[];
|
|
300
307
|
/**
|
|
301
|
-
* **The one addressee a `world` action may be named to
|
|
302
|
-
* 2026-09-17): the session's owner, and nobody else.
|
|
308
|
+
* **The one addressee a `world` action may be named to**: the session's owner, and nobody else.
|
|
303
309
|
*
|
|
304
310
|
* `owner` the role, never `user:<id>` — this half of the law is pure and
|
|
305
311
|
* holds no session, so it cannot know which person owns one; a reference that
|
|
306
312
|
* happens to name the owner is resolved at the press, where the host can ask.
|
|
307
313
|
* @experimental
|
|
314
|
+
* @ruling L1 (2026-09-17)
|
|
308
315
|
*/
|
|
309
316
|
export declare const isOwnerAddressed: (addressee: unknown) => boolean;
|
|
310
317
|
/**
|
|
311
|
-
* The effects line
|
|
318
|
+
* The effects line: a block naming a
|
|
312
319
|
* `world` action — one whose result touches cards, lorebooks, settings,
|
|
313
320
|
* permissions, connections — is refused. Such an action lives in the
|
|
314
321
|
* composer or the review gate and is owner-only; a message carrying it would
|
|
315
322
|
* put an out-of-fiction effect where a character could be asked to answer
|
|
316
323
|
* it. Returns the functions of the offending actions.
|
|
317
324
|
*
|
|
318
|
-
* ## The one exception: a block addressed to the **owner**
|
|
325
|
+
* ## The one exception: a block addressed to the **owner**
|
|
319
326
|
*
|
|
320
327
|
* A `choices` or `form` block whose `addressee` is `owner` may name a `world`
|
|
321
328
|
* action. The reasoning is the line's own: the rule exists so that an
|
|
@@ -327,20 +334,21 @@ export declare const isOwnerAddressed: (addressee: unknown) => boolean;
|
|
|
327
334
|
* a user by id, or none at all (“nobody in particular”, which anyone the
|
|
328
335
|
* audience admits may press) — keeps the refusal.
|
|
329
336
|
*
|
|
330
|
-
* ⚠ The **venue** half of
|
|
337
|
+
* ⚠ The **venue** half of the effects line is untouched: an action declaring
|
|
331
338
|
* `venue: { kind: 'form' }` still may not be `world`, because a venue is
|
|
332
339
|
* declared and an addressee is decided at run time, so the construction-time
|
|
333
340
|
* check cannot see one. An owner-addressed block therefore names a
|
|
334
341
|
* `composer`-venue world action — the Lair genre's knock does exactly this
|
|
335
342
|
* — and `form` stays fiction-only.
|
|
336
343
|
* @experimental
|
|
344
|
+
* @ruling plans/29 R-15 *The line*, 09-B F39, L1 (2026-09-17), F41
|
|
337
345
|
*/
|
|
338
346
|
export declare function worldBlockFunctions(blocks: MessageBlock[], spec: {
|
|
339
347
|
id: string;
|
|
340
348
|
contributes?: unknown;
|
|
341
349
|
}): string[];
|
|
342
350
|
/**
|
|
343
|
-
* Every shape the effects line is heard in
|
|
351
|
+
* Every shape the effects line is heard in, one verdict:
|
|
344
352
|
*
|
|
345
353
|
* - `venue` / `actor` — a declaration: a `world` action's declared venue,
|
|
346
354
|
* or a reference its `act` audience names (`worldActionCrossing`).
|
|
@@ -352,6 +360,7 @@ export declare function worldBlockFunctions(blocks: MessageBlock[], spec: {
|
|
|
352
360
|
* - `press` — the fire: a `world` action pressed from a block, or answered
|
|
353
361
|
* **as** a participant by the answer pipeline.
|
|
354
362
|
* @experimental
|
|
363
|
+
* @ruling F41
|
|
355
364
|
*/
|
|
356
365
|
export type EffectsLineInput = EffectsLineDeclarationInput | {
|
|
357
366
|
kind: 'block';
|
|
@@ -377,19 +386,20 @@ export type EffectsLineInput = EffectsLineDeclarationInput | {
|
|
|
377
386
|
blockAddressee: unknown;
|
|
378
387
|
};
|
|
379
388
|
/**
|
|
380
|
-
* The effects line
|
|
389
|
+
* The effects line, as one verdict: an
|
|
381
390
|
* out-of-fiction effect — cards, lore, settings, permissions — is the
|
|
382
391
|
* owner's (or an administrator's), from the composer or the review gate, and
|
|
383
392
|
* never a question a character could be asked. Heard at the declaration
|
|
384
393
|
* (`actionFindingsByLaw`: the builder, `validate()`, the packager, a host's
|
|
385
394
|
* publish), at the write (`worldBlockFunctions`, the host's block gate) and
|
|
386
|
-
* at the fire (the host's `fireAction`). The one exception
|
|
395
|
+
* at the fire (the host's `fireAction`). The one exception: a block
|
|
387
396
|
* addressed to the **owner** may carry it, because the owner is already the
|
|
388
397
|
* whole of such an action's `act` audience and pressing the button is the
|
|
389
398
|
* owner acting. A fire made **as** a participant has no exception — that is
|
|
390
399
|
* the answer pipeline answering for someone, and an oracle granting a
|
|
391
400
|
* permission is the thing the line exists to make impossible.
|
|
392
401
|
* @internal
|
|
402
|
+
* @ruling plans/29 R-15 *The line*, F41, L1
|
|
393
403
|
*/
|
|
394
404
|
export declare const effectsLineVerdict: import("./verdicts.js").VerdictDecl<EffectsLineInput>;
|
|
395
405
|
/**
|
|
@@ -402,19 +412,18 @@ export declare function assignBlockIds(blocks: MessageBlock[], makeId: () => str
|
|
|
402
412
|
/** A channel head as a block carries it: a positive integer message id. @experimental */
|
|
403
413
|
export declare const isChannelHead: (v: unknown) => v is number;
|
|
404
414
|
/**
|
|
405
|
-
* Stamp the **channel head** on every `choices` and `form` block
|
|
406
|
-
* R-15 *Staleness and order*; 30 §U5f) — the host's half, at the write,
|
|
415
|
+
* Stamp the **channel head** on every `choices` and `form` block — the host's half, at the write,
|
|
407
416
|
* with the head it read off the channel. Unlike `assignBlockIds`, a value
|
|
408
417
|
* the block already carries is **replaced**: the head is a fact about the
|
|
409
418
|
* channel at the write, and only the host holds the channel. Returns a
|
|
410
419
|
* copy; the input is never mutated.
|
|
411
420
|
* @internal
|
|
421
|
+
* @ruling plans/29 R-15 *Staleness and order*, 30 §U5f
|
|
412
422
|
*/
|
|
413
423
|
export declare function assignBlockHead(blocks: MessageBlock[], head: number): MessageBlock[];
|
|
414
424
|
/**
|
|
415
425
|
* Is this form **stale** — issued at a channel head the channel has since
|
|
416
|
-
* moved past, and still unanswered? The one rule
|
|
417
|
-
* order*), written once so the host's door and a client's render agree:
|
|
426
|
+
* moved past, and still unanswered? The one rule, written once so the host's door and a client's render agree:
|
|
418
427
|
*
|
|
419
428
|
* !answered && head != null && headNow > head
|
|
420
429
|
*
|
|
@@ -425,17 +434,19 @@ export declare function assignBlockHead(blocks: MessageBlock[], head: number): M
|
|
|
425
434
|
* stale everywhere: a form answered before the head moved stays answered.
|
|
426
435
|
* A block with no `head` is never stale.
|
|
427
436
|
* @experimental
|
|
437
|
+
* @ruling R-15 *Staleness and order*
|
|
428
438
|
*/
|
|
429
439
|
export declare function isFormStale(block: {
|
|
430
440
|
head?: unknown;
|
|
431
441
|
answered?: unknown;
|
|
432
442
|
}, headNow: number | null | undefined): boolean;
|
|
433
443
|
/**
|
|
434
|
-
* Staleness as a verdict
|
|
444
|
+
* Staleness as a verdict: `isFormStale`
|
|
435
445
|
* is the judge, and the sentence is the one the host's fire refuses a press
|
|
436
446
|
* with and a dispatched answer is receipted with. The client draws a stale
|
|
437
447
|
* form collapsed as *superseded* from the same verdict, over the head it
|
|
438
448
|
* holds — the `list` door, an affordance; the fire refuses regardless.
|
|
449
|
+
* @ruling R-15 *Staleness and order*, U5f
|
|
439
450
|
*/
|
|
440
451
|
/** Input to `stalenessVerdict`'s judge. @experimental */
|
|
441
452
|
export interface StalenessInput {
|
|
@@ -449,8 +460,8 @@ export interface StalenessInput {
|
|
|
449
460
|
/** @internal */
|
|
450
461
|
export declare const stalenessVerdict: import("./verdicts.js").VerdictDecl<StalenessInput>;
|
|
451
462
|
/**
|
|
452
|
-
* The JSON Schema an oracle answers a form against
|
|
453
|
-
* `json` capability answers against the form's schema
|
|
463
|
+
* The JSON Schema an oracle answers a form against: an oracle with
|
|
464
|
+
* `json` capability answers against the form's schema.
|
|
454
465
|
*
|
|
455
466
|
* - `choices` → `{ choice: <enum of the option keys> }`, required.
|
|
456
467
|
* - `form` → the field schema, mapped field by field (`fieldsToJsonSchema`).
|
|
@@ -458,6 +469,7 @@ export declare const stalenessVerdict: import("./verdicts.js").VerdictDecl<Stale
|
|
|
458
469
|
* A `choices` block whose options carry no keys yields an empty enum, which
|
|
459
470
|
* is what the validator refuses on an addressed block before it is written.
|
|
460
471
|
* @internal
|
|
472
|
+
* @ruling R-15
|
|
461
473
|
*/
|
|
462
474
|
export declare function formAnswerSchema(block: FormBlock): Record<string, unknown>;
|
|
463
475
|
/**
|
package/dist/messageBlocks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Message blocks
|
|
2
|
+
* Message blocks — custom message content as **data, not code**.
|
|
3
3
|
*
|
|
4
4
|
* A plugin's message part carries a block tree in `data.blocks`; core renders
|
|
5
5
|
* it with its own components. Nothing to sanitize (no HTML crosses the
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
* The validator is the write-time gate: a hostile or malformed tree is refused
|
|
12
12
|
* with the block path named, and the caps make "render whatever a sandboxed
|
|
13
13
|
* hook produced" a bounded promise. Findings carry a `fix` like every finding
|
|
14
|
-
* in this SDK
|
|
14
|
+
* in this SDK.
|
|
15
|
+
* @ruling 20 §6, 15 §1.3
|
|
15
16
|
*/
|
|
16
17
|
import { checkSchema } from './settings.js';
|
|
17
18
|
import { ACTION_IDENTITY, ACTION_IDENTITY_MAX_LENGTH, actionsOf, effectsOf, worldActionCrossing, } from './actions.js';
|
|
@@ -195,22 +196,23 @@ export function checkMessageBlocks(value) {
|
|
|
195
196
|
}
|
|
196
197
|
/**
|
|
197
198
|
* Stamp each `choices` button and `form` in a tree with the identity of the
|
|
198
|
-
* declaration it fires — the outlet's half of
|
|
199
|
+
* declaration it fires — the outlet's half of the action's identity, called where a block part
|
|
199
200
|
* is written with the run's spec in hand. That is the host's seam, not the
|
|
200
201
|
* SDK's: in Serene Pub the executor's host scope carries the running
|
|
201
202
|
* document's slug (`runtime/host.ts`, `HostScope.specId`) and its message
|
|
202
|
-
* outlet is where the stamp lands; the `blocks` port
|
|
203
|
+
* outlet is where the stamp lands; the `blocks` port is built on
|
|
203
204
|
* this call. The SDK declares no `HostScope` — a host wired by hand passes
|
|
204
205
|
* `{ id, contributes }` from wherever it keeps the running spec.
|
|
205
206
|
*
|
|
206
207
|
* The identity is `<spec id>#<key>` for the action of `spec` whose `key`
|
|
207
|
-
* is the block's `fn` (
|
|
208
|
+
* is the block's `fn` (the key is the identity's second half,
|
|
208
209
|
* so `fn` names at most one). A block whose `fn` the spec declares no
|
|
209
210
|
* action for is left unstamped — it fires as legacy and gets the
|
|
210
211
|
* owner floor — rather than guessed; and a block that already carries an
|
|
211
212
|
* `action` keeps it, so a spec may name a declaration of another spec's on
|
|
212
213
|
* purpose. Returns a copy; the input is never mutated.
|
|
213
214
|
* @internal
|
|
215
|
+
* @ruling W-E, U5d, plans/31 V2
|
|
214
216
|
*/
|
|
215
217
|
export function stampBlockActions(blocks, spec) {
|
|
216
218
|
const byKey = new Map();
|
|
@@ -332,24 +334,24 @@ export function foreignBlockActions(blocks, spec) {
|
|
|
332
334
|
return [...out];
|
|
333
335
|
}
|
|
334
336
|
/**
|
|
335
|
-
* **The one addressee a `world` action may be named to
|
|
336
|
-
* 2026-09-17): the session's owner, and nobody else.
|
|
337
|
+
* **The one addressee a `world` action may be named to**: the session's owner, and nobody else.
|
|
337
338
|
*
|
|
338
339
|
* `owner` the role, never `user:<id>` — this half of the law is pure and
|
|
339
340
|
* holds no session, so it cannot know which person owns one; a reference that
|
|
340
341
|
* happens to name the owner is resolved at the press, where the host can ask.
|
|
341
342
|
* @experimental
|
|
343
|
+
* @ruling L1 (2026-09-17)
|
|
342
344
|
*/
|
|
343
345
|
export const isOwnerAddressed = (addressee) => addressee === 'owner';
|
|
344
346
|
/**
|
|
345
|
-
* The effects line
|
|
347
|
+
* The effects line: a block naming a
|
|
346
348
|
* `world` action — one whose result touches cards, lorebooks, settings,
|
|
347
349
|
* permissions, connections — is refused. Such an action lives in the
|
|
348
350
|
* composer or the review gate and is owner-only; a message carrying it would
|
|
349
351
|
* put an out-of-fiction effect where a character could be asked to answer
|
|
350
352
|
* it. Returns the functions of the offending actions.
|
|
351
353
|
*
|
|
352
|
-
* ## The one exception: a block addressed to the **owner**
|
|
354
|
+
* ## The one exception: a block addressed to the **owner**
|
|
353
355
|
*
|
|
354
356
|
* A `choices` or `form` block whose `addressee` is `owner` may name a `world`
|
|
355
357
|
* action. The reasoning is the line's own: the rule exists so that an
|
|
@@ -361,13 +363,14 @@ export const isOwnerAddressed = (addressee) => addressee === 'owner';
|
|
|
361
363
|
* a user by id, or none at all (“nobody in particular”, which anyone the
|
|
362
364
|
* audience admits may press) — keeps the refusal.
|
|
363
365
|
*
|
|
364
|
-
* ⚠ The **venue** half of
|
|
366
|
+
* ⚠ The **venue** half of the effects line is untouched: an action declaring
|
|
365
367
|
* `venue: { kind: 'form' }` still may not be `world`, because a venue is
|
|
366
368
|
* declared and an addressee is decided at run time, so the construction-time
|
|
367
369
|
* check cannot see one. An owner-addressed block therefore names a
|
|
368
370
|
* `composer`-venue world action — the Lair genre's knock does exactly this
|
|
369
371
|
* — and `form` stays fiction-only.
|
|
370
372
|
* @experimental
|
|
373
|
+
* @ruling plans/29 R-15 *The line*, 09-B F39, L1 (2026-09-17), F41
|
|
371
374
|
*/
|
|
372
375
|
export function worldBlockFunctions(blocks, spec) {
|
|
373
376
|
const world = new Set(actionsOf(spec)
|
|
@@ -392,19 +395,20 @@ const worldBlockSentence = (named) => `the blocks name ${named}, whose action ch
|
|
|
392
395
|
`Such an action is the owner's, from the composer or the review gate — the one block that may ` +
|
|
393
396
|
`carry it is one addressed to 'owner' (the effects line, R-15)`;
|
|
394
397
|
/**
|
|
395
|
-
* The effects line
|
|
398
|
+
* The effects line, as one verdict: an
|
|
396
399
|
* out-of-fiction effect — cards, lore, settings, permissions — is the
|
|
397
400
|
* owner's (or an administrator's), from the composer or the review gate, and
|
|
398
401
|
* never a question a character could be asked. Heard at the declaration
|
|
399
402
|
* (`actionFindingsByLaw`: the builder, `validate()`, the packager, a host's
|
|
400
403
|
* publish), at the write (`worldBlockFunctions`, the host's block gate) and
|
|
401
|
-
* at the fire (the host's `fireAction`). The one exception
|
|
404
|
+
* at the fire (the host's `fireAction`). The one exception: a block
|
|
402
405
|
* addressed to the **owner** may carry it, because the owner is already the
|
|
403
406
|
* whole of such an action's `act` audience and pressing the button is the
|
|
404
407
|
* owner acting. A fire made **as** a participant has no exception — that is
|
|
405
408
|
* the answer pipeline answering for someone, and an oracle granting a
|
|
406
409
|
* permission is the thing the line exists to make impossible.
|
|
407
410
|
* @internal
|
|
411
|
+
* @ruling plans/29 R-15 *The line*, F41, L1
|
|
408
412
|
*/
|
|
409
413
|
export const effectsLineVerdict = defineVerdict({
|
|
410
414
|
id: 'core:verdict/effects-line',
|
|
@@ -502,13 +506,13 @@ export function assignBlockIds(blocks, makeId) {
|
|
|
502
506
|
/** A channel head as a block carries it: a positive integer message id. @experimental */
|
|
503
507
|
export const isChannelHead = (v) => typeof v === 'number' && Number.isInteger(v) && v > 0;
|
|
504
508
|
/**
|
|
505
|
-
* Stamp the **channel head** on every `choices` and `form` block
|
|
506
|
-
* R-15 *Staleness and order*; 30 §U5f) — the host's half, at the write,
|
|
509
|
+
* Stamp the **channel head** on every `choices` and `form` block — the host's half, at the write,
|
|
507
510
|
* with the head it read off the channel. Unlike `assignBlockIds`, a value
|
|
508
511
|
* the block already carries is **replaced**: the head is a fact about the
|
|
509
512
|
* channel at the write, and only the host holds the channel. Returns a
|
|
510
513
|
* copy; the input is never mutated.
|
|
511
514
|
* @internal
|
|
515
|
+
* @ruling plans/29 R-15 *Staleness and order*, 30 §U5f
|
|
512
516
|
*/
|
|
513
517
|
export function assignBlockHead(blocks, head) {
|
|
514
518
|
const walk = (list) => list.map((b) => {
|
|
@@ -526,8 +530,7 @@ export function assignBlockHead(blocks, head) {
|
|
|
526
530
|
}
|
|
527
531
|
/**
|
|
528
532
|
* Is this form **stale** — issued at a channel head the channel has since
|
|
529
|
-
* moved past, and still unanswered? The one rule
|
|
530
|
-
* order*), written once so the host's door and a client's render agree:
|
|
533
|
+
* moved past, and still unanswered? The one rule, written once so the host's door and a client's render agree:
|
|
531
534
|
*
|
|
532
535
|
* !answered && head != null && headNow > head
|
|
533
536
|
*
|
|
@@ -538,6 +541,7 @@ export function assignBlockHead(blocks, head) {
|
|
|
538
541
|
* stale everywhere: a form answered before the head moved stays answered.
|
|
539
542
|
* A block with no `head` is never stale.
|
|
540
543
|
* @experimental
|
|
544
|
+
* @ruling R-15 *Staleness and order*
|
|
541
545
|
*/
|
|
542
546
|
export function isFormStale(block, headNow) {
|
|
543
547
|
if (block.answered)
|
|
@@ -564,8 +568,8 @@ export const stalenessVerdict = defineVerdict({
|
|
|
564
568
|
failing: () => ({ block: { head: 3 }, headNow: 4 }),
|
|
565
569
|
});
|
|
566
570
|
/**
|
|
567
|
-
* The JSON Schema an oracle answers a form against
|
|
568
|
-
* `json` capability answers against the form's schema
|
|
571
|
+
* The JSON Schema an oracle answers a form against: an oracle with
|
|
572
|
+
* `json` capability answers against the form's schema.
|
|
569
573
|
*
|
|
570
574
|
* - `choices` → `{ choice: <enum of the option keys> }`, required.
|
|
571
575
|
* - `form` → the field schema, mapped field by field (`fieldsToJsonSchema`).
|
|
@@ -573,6 +577,7 @@ export const stalenessVerdict = defineVerdict({
|
|
|
573
577
|
* A `choices` block whose options carry no keys yields an empty enum, which
|
|
574
578
|
* is what the validator refuses on an addressed block before it is written.
|
|
575
579
|
* @internal
|
|
580
|
+
* @ruling R-15
|
|
576
581
|
*/
|
|
577
582
|
export function formAnswerSchema(block) {
|
|
578
583
|
if (block.kind === 'choices')
|
package/dist/migration.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Migration harness — converting an existing workflow into a pipeline without users
|
|
3
|
-
* losing what they customised
|
|
3
|
+
* losing what they customised.
|
|
4
4
|
*
|
|
5
5
|
* The failure this exists to prevent is specific and it is not "the migration crashed."
|
|
6
6
|
* A migration that runs cleanly and quietly changes what the model receives is far worse
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* That is checkable because a preview run already produces the exact payload that would
|
|
16
16
|
* be sent, from the same formatter and the same tokenizer as a real run (src/preview.ts).
|
|
17
17
|
* The parity test is the preview, not a second renderer written for the occasion.
|
|
18
|
+
* @ruling 08 §5, U25
|
|
18
19
|
*/
|
|
19
20
|
import type { ScopeKind } from './config.js';
|
|
20
21
|
import type { Receipt } from './receipt.js';
|
|
@@ -23,9 +24,10 @@ import type { SpecDocument } from './document.js';
|
|
|
23
24
|
* A migrated row's slug is derived from where it came from, not generated.
|
|
24
25
|
*
|
|
25
26
|
* This is what makes a migration **idempotent**: re-running after a bug fix matches the
|
|
26
|
-
* existing row by slug and replaces it, instead of creating a second copy beside it
|
|
27
|
-
*
|
|
27
|
+
* existing row by slug and replaces it, instead of creating a second copy beside it.
|
|
28
|
+
* A migration that cannot be safely re-run is a migration nobody dares fix.
|
|
28
29
|
* @experimental
|
|
30
|
+
* @ruling 12 §3b
|
|
29
31
|
*/
|
|
30
32
|
export declare function migratedSlug(sourceTable: string, sourceId: string | number): string;
|
|
31
33
|
/** @experimental */
|
|
@@ -41,7 +43,10 @@ export interface MigrationEntry {
|
|
|
41
43
|
/** Where the value landed: the scope it was written at, and what it became. */
|
|
42
44
|
target?: {
|
|
43
45
|
slug: string;
|
|
44
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* A `ScopeKind` (config.ts): `session · config · defaults · author`.
|
|
48
|
+
* @ruling R-10
|
|
49
|
+
*/
|
|
45
50
|
scopeKind: ScopeKind;
|
|
46
51
|
nodeKey?: string;
|
|
47
52
|
slot?: string;
|
|
@@ -66,9 +71,10 @@ export declare function summarize(r: MigrationReport): {
|
|
|
66
71
|
};
|
|
67
72
|
/**
|
|
68
73
|
* Everything that did not migrate cleanly must say why, and must remain visible —
|
|
69
|
-
* `spec_diagnostics` in core, the same place an orphaned slot lands after a node swap
|
|
70
|
-
*
|
|
74
|
+
* `spec_diagnostics` in core, the same place an orphaned slot lands after a node swap.
|
|
75
|
+
* Same principle as export: nothing is dropped silently.
|
|
71
76
|
* @experimental
|
|
77
|
+
* @ruling 12 §5, 12 §7a
|
|
72
78
|
*/
|
|
73
79
|
export declare function unmappedEntries(r: MigrationReport): MigrationEntry[];
|
|
74
80
|
/** @experimental */
|
|
@@ -90,10 +96,11 @@ export interface ParityResult {
|
|
|
90
96
|
/** @internal */
|
|
91
97
|
export declare function checkParity(fixture: string, legacyPrompt: string, preview: Receipt, count?: (v: unknown) => number): ParityResult;
|
|
92
98
|
/**
|
|
93
|
-
* The gate on dropping an old code path
|
|
99
|
+
* The gate on dropping an old code path. Deliberately strict: an empty corpus
|
|
94
100
|
* passes nothing, because "no failures" and "nothing was checked" look identical in a
|
|
95
101
|
* summary and only one of them is safe.
|
|
96
102
|
* @internal
|
|
103
|
+
* @ruling 08 §5
|
|
97
104
|
*/
|
|
98
105
|
export declare function parityGate(results: ParityResult[], minimumCorpus?: number): {
|
|
99
106
|
pass: boolean;
|
|
@@ -114,8 +121,9 @@ export declare function renderParity(r: ParityResult): string;
|
|
|
114
121
|
*
|
|
115
122
|
* So the rule is: an id wired in (by edge or by config) means update; nothing wired
|
|
116
123
|
* means create; **anything else is reported unmapped rather than decided**. `unmapped`
|
|
117
|
-
* is already the shape
|
|
124
|
+
* is already the shape used for "a human has to look at this."
|
|
118
125
|
* @experimental
|
|
126
|
+
* @ruling 08 §5b
|
|
119
127
|
*/
|
|
120
128
|
export declare const LEGACY_COMMIT_MESSAGE = "core:outlet/commit-message";
|
|
121
129
|
/** @experimental */
|
package/dist/migration.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Migration harness — converting an existing workflow into a pipeline without users
|
|
3
|
-
* losing what they customised
|
|
3
|
+
* losing what they customised.
|
|
4
4
|
*
|
|
5
5
|
* The failure this exists to prevent is specific and it is not "the migration crashed."
|
|
6
6
|
* A migration that runs cleanly and quietly changes what the model receives is far worse
|
|
@@ -15,15 +15,17 @@
|
|
|
15
15
|
* That is checkable because a preview run already produces the exact payload that would
|
|
16
16
|
* be sent, from the same formatter and the same tokenizer as a real run (src/preview.ts).
|
|
17
17
|
* The parity test is the preview, not a second renderer written for the occasion.
|
|
18
|
+
* @ruling 08 §5, U25
|
|
18
19
|
*/
|
|
19
20
|
// ── Deterministic identity, so a migration can be re-run ────────────────────
|
|
20
21
|
/**
|
|
21
22
|
* A migrated row's slug is derived from where it came from, not generated.
|
|
22
23
|
*
|
|
23
24
|
* This is what makes a migration **idempotent**: re-running after a bug fix matches the
|
|
24
|
-
* existing row by slug and replaces it, instead of creating a second copy beside it
|
|
25
|
-
*
|
|
25
|
+
* existing row by slug and replaces it, instead of creating a second copy beside it.
|
|
26
|
+
* A migration that cannot be safely re-run is a migration nobody dares fix.
|
|
26
27
|
* @experimental
|
|
28
|
+
* @ruling 12 §3b
|
|
27
29
|
*/
|
|
28
30
|
export function migratedSlug(sourceTable, sourceId) {
|
|
29
31
|
const clean = String(sourceId)
|
|
@@ -45,9 +47,10 @@ export function summarize(r) {
|
|
|
45
47
|
}
|
|
46
48
|
/**
|
|
47
49
|
* Everything that did not migrate cleanly must say why, and must remain visible —
|
|
48
|
-
* `spec_diagnostics` in core, the same place an orphaned slot lands after a node swap
|
|
49
|
-
*
|
|
50
|
+
* `spec_diagnostics` in core, the same place an orphaned slot lands after a node swap.
|
|
51
|
+
* Same principle as export: nothing is dropped silently.
|
|
50
52
|
* @experimental
|
|
53
|
+
* @ruling 12 §5, 12 §7a
|
|
51
54
|
*/
|
|
52
55
|
export function unmappedEntries(r) {
|
|
53
56
|
return r.entries.filter((e) => e.outcome !== 'migrated');
|
|
@@ -76,7 +79,7 @@ const EXCERPT = 60;
|
|
|
76
79
|
* Three shapes reach here. A Provider with a `wire` slot puts a formed payload on
|
|
77
80
|
* the port, and that may already be a string. Core's Assemble puts an **allocated
|
|
78
81
|
* context** there — blocks plus the rendered string, because the budget panel needs
|
|
79
|
-
* the blocks
|
|
82
|
+
* the blocks — so the prompt is one level in. A split-chat connection has
|
|
80
83
|
* `messages` instead of `rendered`, and its comparable form is the role-tagged text.
|
|
81
84
|
*
|
|
82
85
|
* Unwrapping matters more than it looks: the first version compared
|
|
@@ -84,6 +87,7 @@ const EXCERPT = 60;
|
|
|
84
87
|
* "diverges at character 0" on every fixture forever — a harness that can never go
|
|
85
88
|
* green is indistinguishable from one whose subject is broken, and it costs a day
|
|
86
89
|
* to tell them apart.
|
|
90
|
+
* @ruling 16 §7
|
|
87
91
|
*/
|
|
88
92
|
function renderedText(value) {
|
|
89
93
|
if (typeof value === 'string')
|
|
@@ -131,10 +135,11 @@ export function checkParity(fixture, legacyPrompt, preview, count) {
|
|
|
131
135
|
};
|
|
132
136
|
}
|
|
133
137
|
/**
|
|
134
|
-
* The gate on dropping an old code path
|
|
138
|
+
* The gate on dropping an old code path. Deliberately strict: an empty corpus
|
|
135
139
|
* passes nothing, because "no failures" and "nothing was checked" look identical in a
|
|
136
140
|
* summary and only one of them is safe.
|
|
137
141
|
* @internal
|
|
142
|
+
* @ruling 08 §5
|
|
138
143
|
*/
|
|
139
144
|
export function parityGate(results, minimumCorpus = 1) {
|
|
140
145
|
if (results.length < minimumCorpus) {
|
|
@@ -176,8 +181,9 @@ export function renderParity(r) {
|
|
|
176
181
|
*
|
|
177
182
|
* So the rule is: an id wired in (by edge or by config) means update; nothing wired
|
|
178
183
|
* means create; **anything else is reported unmapped rather than decided**. `unmapped`
|
|
179
|
-
* is already the shape
|
|
184
|
+
* is already the shape used for "a human has to look at this."
|
|
180
185
|
* @experimental
|
|
186
|
+
* @ruling 08 §5b
|
|
181
187
|
*/
|
|
182
188
|
export const LEGACY_COMMIT_MESSAGE = 'core:outlet/commit-message';
|
|
183
189
|
/** @experimental */
|
package/dist/names.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Names, compared the one way every reader agrees on
|
|
2
|
+
* Names, compared the one way every reader agrees on.
|
|
3
3
|
*
|
|
4
4
|
* `core:task/undescribed-name@1` asks whether a room the planner named is
|
|
5
5
|
* already described: by a lorebook entry whose name or keys answer to it, or
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
* ⚠ Hyphens separate words, so "well-lit" counts as two words toward
|
|
38
38
|
* `minWords`. That is consistent on both sides, which is what matters.
|
|
39
39
|
* @experimental
|
|
40
|
+
* @ruling lair pass R7 (2026-09-28)
|
|
40
41
|
*/
|
|
41
42
|
/** The articles one strip removes from the front of a name. @experimental */
|
|
42
43
|
export declare const LEADING_ARTICLES: readonly string[];
|
package/dist/names.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Names, compared the one way every reader agrees on
|
|
2
|
+
* Names, compared the one way every reader agrees on.
|
|
3
3
|
*
|
|
4
4
|
* `core:task/undescribed-name@1` asks whether a room the planner named is
|
|
5
5
|
* already described: by a lorebook entry whose name or keys answer to it, or
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
* ⚠ Hyphens separate words, so "well-lit" counts as two words toward
|
|
38
38
|
* `minWords`. That is consistent on both sides, which is what matters.
|
|
39
39
|
* @experimental
|
|
40
|
+
* @ruling lair pass R7 (2026-09-28)
|
|
40
41
|
*/
|
|
41
42
|
/** The articles one strip removes from the front of a name. @experimental */
|
|
42
43
|
export const LEADING_ARTICLES = ['the', 'a', 'an'];
|
package/dist/nodeInput.d.ts
CHANGED
|
@@ -336,7 +336,7 @@ export interface TypedReads<P> {
|
|
|
336
336
|
paramTypes?: Partial<Record<ReadableParams<P>, FieldType>>;
|
|
337
337
|
}
|
|
338
338
|
/**
|
|
339
|
-
* Attach a read declaration a contract has checked
|
|
339
|
+
* Attach a read declaration a contract has checked.
|
|
340
340
|
*
|
|
341
341
|
* ```ts
|
|
342
342
|
* reads<typeof C.sessionHistory>(
|
|
@@ -371,6 +371,7 @@ export interface TypedReads<P> {
|
|
|
371
371
|
* when the two pins read differently, and declare the intersection when they
|
|
372
372
|
* do not. An identical redeclaration is a no-op, on the registry's own terms.
|
|
373
373
|
* @experimental
|
|
374
|
+
* @ruling R-12 (2026-09-15)
|
|
374
375
|
*/
|
|
375
376
|
export declare function reads<P>(hook: Hook, requires: TypedReads<P>): DeclaredHook<Hook>;
|
|
376
377
|
/** Does this hook carry a read declaration? @internal */
|