@serene-pub/contracts 0.6.0-pr-4 → 0.6.0-pr-6

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/tasks.d.ts CHANGED
@@ -9,14 +9,18 @@ import type { SlotDecl } from '@serene-pub/sdk';
9
9
  export declare const contextBudget: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
10
10
  main: string;
11
11
  available: string;
12
- }, import("@serene-pub/sdk").PortDecl, "core:task/context-budget@1"> & {
12
+ fittedBlocks: string;
13
+ reads: string;
14
+ }, {
15
+ blocks: string;
16
+ }, "core:task/context-budget@1"> & {
13
17
  kind: 'task';
14
18
  slots?: {
15
19
  /**
16
20
  * Where the window comes from.
17
21
  *
18
22
  * The context window belongs to the sampling config, never to a knob
19
- * on a node (17 §1a) — and the executor resolves a `sampling` slot to
23
+ * on a node — and the executor resolves a `sampling` slot to
20
24
  * the config's switched-on *values*, so this stays a pure Task reading
21
25
  * data it was handed rather than a Query looking one up.
22
26
  *
@@ -30,14 +34,14 @@ export declare const contextBudget: import("@serene-pub/sdk").Pinned<import("@se
30
34
  };
31
35
  /**
32
36
  * The connection the reply is sent on — for the model's own
33
- * context window (0114), which caps the sampling config's when
37
+ * context window, which caps the sampling config's when
34
38
  * the model states one.
35
39
  *
36
40
  * Shared with the generating step in every shipped spec
37
41
  * (`slot.connectionOf('generate')`), on the same terms as
38
42
  * `sampling` above: the budget has to be sized to the window the
39
43
  * request is actually sent against, and the ONE computation of
40
- * that window (R-8) reads both halves off the same resolved pair.
44
+ * that window reads both halves off the same resolved pair.
41
45
  */
42
46
  readonly connection: {
43
47
  readonly kind: "connection";
@@ -131,7 +135,7 @@ export declare const concatCandidates: import("@serene-pub/sdk").Pinned<import("
131
135
  }>;
132
136
  /**
133
137
  * **Eligibility** — the hard gates between the mechanisms and the ranker
134
- * (C2; owner rulings R2 and R4, 2026-09-30; built 2026-10-02).
138
+ * (owner rulings of 2026-09-30; built 2026-10-02).
135
139
  *
136
140
  * Scoring and eligibility are separate on purpose: a hard rule must not compete
137
141
  * numerically with a soft one and lose. This node scores nothing. It takes the
@@ -149,7 +153,7 @@ export declare const concatCandidates: import("@serene-pub/sdk").Pinned<import("
149
153
  * 2. **Secrecy.** A `relationships` candidate that is somebody's secret
150
154
  * (`payload.secretOf`, the holder's participant reference) is ineligible for
151
155
  * any other `speaker`. Unwired or null, the producers' own scope decided.
152
- * 3. **Presence** (R4). A candidate about a cast member (`payload.lorebookBindingId`)
156
+ * 3. **Presence.** A candidate about a cast member (`payload.lorebookBindingId`)
153
157
  * whose member has presences on the line and none holding at `at` — the
154
158
  * member is not in the world then. A member with no presences is always
155
159
  * present.
@@ -193,9 +197,9 @@ export declare const rankHybrid: import("@serene-pub/sdk").Pinned<import("@seren
193
197
  * A declared out-port rather than an implementation detail, because it is
194
198
  * what Assemble allocates from — and because a ranker swapped in by a
195
199
  * plugin has to produce it too, or the budget panel goes blank the moment
196
- * anyone changes rankers (16 §5c).
200
+ * anyone changes rankers.
197
201
  *
198
- * Shape `S.decisions` (R64): a node publishing it is recorded in the
202
+ * Shape `S.decisions`: a node publishing it is recorded in the
199
203
  * ranking store automatically — a plugin's ranker included.
200
204
  */
201
205
  decisions: string;
@@ -212,8 +216,8 @@ export declare const rankHybrid: import("@serene-pub/sdk").Pinned<import("@seren
212
216
  * while the numbers sat one node upstream.
213
217
  *
214
218
  * Spread onto this type alone rather than into `rankPorts` —
215
- * the same reason the `scripts` hook above is, one construct up
216
- * (S3). The `rank-recall` example computes no per-band usage;
219
+ * the same reason the `scripts` hook above is, one construct up.
220
+ * The `rank-recall` example computes no per-band usage;
217
221
  * giving it a port it cannot fill would move a hash to declare
218
222
  * a promise it does not keep.
219
223
  *
@@ -385,8 +389,8 @@ export declare const rankHybrid: import("@serene-pub/sdk").Pinned<import("@seren
385
389
  * by construction, so the first question scores every present character's
386
390
  * private lore alike and distinguishes nothing.
387
391
  *
388
- * ⚠ **The world-lore half is graded now, and this weight moved with it**
389
- * (design §13.10, retrieval plan phase 3). It used to be a binary substring
392
+ * ⚠ **The world-lore half is graded now, and this weight moved with it**.
393
+ * It used to be a binary substring
390
394
  * test — does the entry's title or keys contain a cast name, `Al` firing on
391
395
  * `Alchemy` — worth exactly `{0, 0.2}`. It is now the rarity-weighted,
392
396
  * word-boundary, two-sided overlap the admission gate already used: what the
@@ -1100,10 +1104,10 @@ export declare const rankHybrid: import("@serene-pub/sdk").Pinned<import("@seren
1100
1104
  };
1101
1105
  };
1102
1106
  /**
1103
- * The post-retrieval hook (18 §4a): user chains over the candidate
1107
+ * The post-retrieval hook: user chains over the candidate
1104
1108
  * pool before ranking sees it. Spread onto this type alone rather
1105
1109
  * than into `rankSlots` — widening a sibling's accepted set is a
1106
- * hash change on a type nobody meant to touch (S3).
1110
+ * hash change on a type nobody meant to touch.
1107
1111
  */
1108
1112
  readonly scripts: {
1109
1113
  readonly kind: "scripts";
@@ -1124,8 +1128,8 @@ export declare const rankHybrid: import("@serene-pub/sdk").Pinned<import("@seren
1124
1128
  * first.
1125
1129
  *
1126
1130
  * And it carries the **semantic mechanism's one switch**, `searchByMeaning`,
1127
- * because it is the first node of the mechanism's chain (2026-09-29, genre
1128
- * uplift C3) — `auto | on | off`, shipping `auto`, which searches whenever an
1131
+ * because it is the first node of the mechanism's chain (2026-09-29) —
1132
+ * `auto | on | off`, shipping `auto`, which searches whenever an
1129
1133
  * embedding model is set up, wherever it runs (owner, 2026-09-30).
1130
1134
  * @experimental
1131
1135
  */
@@ -1208,7 +1212,7 @@ export declare const queryWindows: import("@serene-pub/sdk").Pinned<import("@ser
1208
1212
  * per turn in API mode. `maxEntries` is a ceiling now, and
1209
1213
  * ships non-zero so that turning this on does something.
1210
1214
  * It was then a boolean defaulting to off for one day
1211
- * (C3), which spent nothing and searched nothing.
1215
+ * (2026-09-29), which spent nothing and searched nothing.
1212
1216
  */
1213
1217
  readonly searchByMeaning: {
1214
1218
  readonly type: "enum";
@@ -1273,7 +1277,7 @@ export declare const queryWindows: import("@serene-pub/sdk").Pinned<import("@ser
1273
1277
  * to replace. The Query retrieves and computes similarity; this decides.
1274
1278
  *
1275
1279
  * `similarity` is a port because MMR needs to compare candidates to each other
1276
- * and a Task cannot ask the host for anything (F11). It is a matrix of cosines,
1280
+ * and a Task cannot ask the host for anything. It is a matrix of cosines,
1277
1281
  * not the embeddings — derived, bounded, and not reversible into the vectors.
1278
1282
  * @experimental
1279
1283
  */
@@ -1298,7 +1302,7 @@ export declare const rankSemantic: import("@serene-pub/sdk").Pinned<import("@ser
1298
1302
  readonly schema: {
1299
1303
  /**
1300
1304
  * ⚠ No `currentWindow` / `recentWindow` here, and there
1301
- * were (culled 2026-09-16, R-12). They size the two query
1305
+ * were (culled 2026-09-16). They size the two query
1302
1306
  * windows — how many messages form the 'current' and the
1303
1307
  * 'recent' question — which `core:task/query-windows@1`
1304
1308
  * cuts and declares as its own params. Declared here too,
@@ -1415,7 +1419,7 @@ export declare const rankSemantic: import("@serene-pub/sdk").Pinned<import("@ser
1415
1419
  } | undefined;
1416
1420
  }>;
1417
1421
  /**
1418
- * A plugin's ranker — same kind, same shape, so the swap list offers it (16 §5c).
1422
+ * A plugin's ranker — same kind, same shape, so the swap list offers it.
1419
1423
  *
1420
1424
  * Named `rankRecall`, not `rankSemantic`: binding names derive from the id's
1421
1425
  * name segment and ignore the namespace, so this and `core:task/rank-semantic@1`
@@ -1434,9 +1438,9 @@ export declare const rankRecall: import("@serene-pub/sdk").Pinned<import("@seren
1434
1438
  * A declared out-port rather than an implementation detail, because it is
1435
1439
  * what Assemble allocates from — and because a ranker swapped in by a
1436
1440
  * plugin has to produce it too, or the budget panel goes blank the moment
1437
- * anyone changes rankers (16 §5c).
1441
+ * anyone changes rankers.
1438
1442
  *
1439
- * Shape `S.decisions` (R64): a node publishing it is recorded in the
1443
+ * Shape `S.decisions`: a node publishing it is recorded in the
1440
1444
  * ranking store automatically — a plugin's ranker included.
1441
1445
  */
1442
1446
  decisions: string;
@@ -1469,7 +1473,7 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1469
1473
  * shape on this edge got no finding, and a plugin ASSEMBLER had
1470
1474
  * nothing to read to learn the port existed.
1471
1475
  *
1472
- * `S.decisions`, matching `rankPorts.out.decisions` (R64) — a
1476
+ * `S.decisions`, matching `rankPorts.out.decisions` — a
1473
1477
  * decision is a candidate with its arithmetic attached, and the
1474
1478
  * panel reads the same objects the allocator does. Typed, so a
1475
1479
  * plugin ranker wired here publishes the shape the ranking store
@@ -1514,15 +1518,15 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1514
1518
  groups: string;
1515
1519
  /**
1516
1520
  * The annex a template may read, as `annex.<owner>.<key>`
1517
- * (typed templates P6, edited in place — owner ruling Q4).
1521
+ * (typed templates, edited in place by owner ruling).
1518
1522
  *
1519
1523
  * Fed ONLY by `core:query/session-annex@1` with `view:
1520
1524
  * 'template'`: every DECLARED key of every owner in scope —
1521
1525
  * core, the enabled plugins — for the session's genre, keyed by
1522
1526
  * owner. A key no declaration covers never arrives, and a
1523
- * declaration refuses secrets at write time (R61), so what
1527
+ * declaration refuses secrets at write time, so what
1524
1528
  * reaches a template is what an owner said may be kept there
1525
- * (owner ruling Q1: "nothing dangerous should ever be stored
1529
+ * (owner ruling: "nothing dangerous should ever be stored
1526
1530
  * there"). Law T2 refuses anything else wired here, and a
1527
1531
  * template-view read wired anywhere else.
1528
1532
  *
@@ -1541,8 +1545,8 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1541
1545
  /**
1542
1546
  * Assemble's own names — what `render()` writes onto the context
1543
1547
  * AFTER spreading the prompts and the builder's context, so these
1544
- * are the last word (typed templates P3, edited in place — owner
1545
- * ruling Q4).
1548
+ * are the last word (typed templates, edited in place by owner
1549
+ * ruling).
1546
1550
  *
1547
1551
  * Corrected 2026-09-27: this declared `blocks`, `budget` as two
1548
1552
  * bare names and `prompts` — `blocks` is a param that reorders the
@@ -1592,8 +1596,7 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1592
1596
  readonly optional: true;
1593
1597
  };
1594
1598
  /**
1595
- * 🚧 The line's files, placed (PLAN-composer-attachments
1596
- * §3.5): media markers, inlined text files and placeholders,
1599
+ * 🚧 The line's files, placed: media markers, inlined text files and placeholders,
1597
1600
  * from `core:task/place-attachments@1`. Absent on a line
1598
1601
  * with no files, and on every line of a spec with no
1599
1602
  * placement step.
@@ -1665,7 +1668,7 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1665
1668
  };
1666
1669
  };
1667
1670
  /**
1668
- * 🚧 The session's **author's note**, placed (2026-10-02, AN1) — the
1671
+ * 🚧 The session's **author's note**, placed (2026-10-02) — the
1669
1672
  * person's own steering text for this session, at its own depth, with no
1670
1673
  * token trigger. Not the post-history reminder: that one is the pipeline's
1671
1674
  * and the card's "how to respond"; this is the person's "what is true now".
@@ -1727,7 +1730,7 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1727
1730
  readonly currentDate: "core:var/current-date@1";
1728
1731
  };
1729
1732
  /**
1730
- * Open (typed templates P2, edited in place — owner ruling Q4):
1733
+ * Open (typed templates, edited in place by owner ruling):
1731
1734
  * every band declared upstream of `candidates` is rendered too,
1732
1735
  * under its key and through its variable's layout — a plugin's
1733
1736
  * source adds its band here by declaring it.
@@ -1775,16 +1778,16 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1775
1778
  * ⚠ No `truncation` here, and there was one — an enum of
1776
1779
  * `oldest-first | lowest-weight`, "what gets dropped first
1777
1780
  * when the context is over budget" — declared, rendered,
1778
- * and read by nothing (culled 2026-09-16, R-12). What LORE
1781
+ * and read by nothing (culled 2026-09-16). What LORE
1779
1782
  * fits is decided upstream by the ranker's `select`, per
1780
1783
  * band, against `share`, `maxEntries`, `minEntries` and
1781
1784
  * `scoreLedAllocation` on `core:task/rank-hybrid@1`, and
1782
1785
  * this node renders the decisions it is handed. A second
1783
1786
  * drop rule for lore here would be a second owner of one
1784
- * decision. NOMENCLATURE §25 records the cull.
1787
+ * decision.
1785
1788
  *
1786
1789
  * ⚠ The TRANSCRIPT is the exception, because nobody else
1787
- * owns it (B2, 2026-10-03): no shipped spec ranks a message
1790
+ * owns it (2026-10-03): no shipped spec ranks a message
1788
1791
  * candidate, so the conversation's rows were never fitted
1789
1792
  * at all and a long session went out larger than the
1790
1793
  * window. The host's binding measures what it rendered and,
@@ -1853,7 +1856,7 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1853
1856
  }>;
1854
1857
  /**
1855
1858
  * What a context builder's `templateContext` carries, in the template type
1856
- * language (typed templates P3, 2026-09-27) — so a template editor offers
1859
+ * language (typed templates, 2026-09-27) — so a template editor offers
1857
1860
  * `{{{characters}}}` with a type, and `templateScopeAt` puts these keys in
1858
1861
  * the scope of whatever template renders the builder's output.
1859
1862
  *
@@ -1901,6 +1904,11 @@ export declare const TEMPLATE_CONTEXT_SCHEMA: {
1901
1904
  readonly type: 'string';
1902
1905
  readonly description: '“A, B, and C” — every persona’s name.';
1903
1906
  };
1907
+ /** 🚧 `core:var/likenesses@1` — everyone on stage's likeness prompt, laid out. */
1908
+ readonly likenesses: {
1909
+ readonly type: 'string';
1910
+ readonly description: 'Everyone on stage’s likeness prompt, by name, laid out (JSON by default).';
1911
+ };
1904
1912
  readonly exampleDialogue: {
1905
1913
  readonly type: 'string';
1906
1914
  readonly description: 'The speaker’s example dialogue.';
@@ -2038,7 +2046,7 @@ export declare const TEMPLATE_CONTEXT_SCHEMA: {
2038
2046
  *
2039
2047
  * A type is the unit that declares a configurable surface — it is how a plugin
2040
2048
  * declares one, and `RegistryEntry.slots` carries the declaration precisely so
2041
- * core can render a form without executing the plugin that owns it (12 §2, F6).
2049
+ * core can render a form without executing the plugin that owns it.
2042
2050
  * Narrowing per-spec instead would have meant the row said one thing and the
2043
2051
  * running pipeline another, which is the defect widening that column fixed.
2044
2052
  *
@@ -2086,7 +2094,7 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
2086
2094
  * narrate spec never supplies these because graph context
2087
2095
  * needs a speaker's perspective and a narrator has none — so
2088
2096
  * widening the shared map would give it two ports it must
2089
- * leave empty forever, and move its hash to say so (S3).
2097
+ * leave empty forever, and move its hash to say so.
2090
2098
  */
2091
2099
  relationshipsPerspectives: string;
2092
2100
  relationshipsKnown: string;
@@ -2116,8 +2124,8 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
2116
2124
  speakerName: string;
2117
2125
  speakerCharacter: string;
2118
2126
  /**
2119
- * Who is speaking, as a participant reference (R-18 (3); U5g,
2120
- * 2026-09-16) — the turn strategy's `speaker`. Read for one
2127
+ * Who is speaking, as a participant reference (2026-09-16)
2128
+ * — the turn strategy's `speaker`. Read for one
2121
2129
  * thing: an **envoy** (`envoy:<slug>`) has no character row, so
2122
2130
  * its card — name and description, off the genre's declaration
2123
2131
  * the cast read carries — is compiled here where a cast
@@ -2149,23 +2157,22 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
2149
2157
  state: string;
2150
2158
  /**
2151
2159
  * What the person typed with the press, for an action that
2152
- * reads its composer text as **direction** (lair pass B17,
2153
- * 2026-09-27): the Lair's Trigger trap and Reveal, and
2154
- * Whodunit's Search — what the detective is looking for (genre
2155
- * uplift C2, 2026-09-29). Rendered as
2160
+ * reads its composer text as **direction** (2026-09-27): the
2161
+ * Lair's Trigger trap and Reveal, and Whodunit's Search — what
2162
+ * the detective is looking for (2026-09-29). Rendered as
2156
2163
  * `{{turnDirection}}` — the same name, and the same meaning,
2157
- * `build-scene-context@1` gives the Lair's reply (B11). Absent
2164
+ * `build-scene-context@1` gives the Lair's reply. Absent
2158
2165
  * when blank, so a prompt writes `{{#if turnDirection}}…{{/if}}`
2159
2166
  * and a press with nothing typed leaves it to the prompt.
2160
2167
  * Declared here rather than in `contextPorts`, like `state`
2161
2168
  * above; the narrator and side-character builders declare
2162
- * their own (C2). Unwired on every spec whose composer text is
2169
+ * their own. Unwired on every spec whose composer text is
2163
2170
  * a line somebody said.
2164
2171
  */
2165
2172
  turnDirection: string;
2166
2173
  /**
2167
2174
  * The places the lorebook holds, for an envoy that talks about
2168
- * the world from outside it (lair re-plan R6, 2026-09-28): the
2175
+ * the world from outside it (2026-09-28): the
2169
2176
  * Lair's Castellan in the Sanctum. A
2170
2177
  * `core:query/lorebook-entries@1` listing, rendered exactly as
2171
2178
  * the planner's and the scene's port of this name is —
@@ -2176,7 +2183,7 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
2176
2183
  locationEntries: string;
2177
2184
  /**
2178
2185
  * The story's newest rows, for a speaker who talks ABOUT the
2179
- * story from another channel (lair re-plan R6): the Castellan
2186
+ * story from another channel: the Castellan
2180
2187
  * in the Sanctum reads `main`'s last few rows. Transcript rows
2181
2188
  * (a `session-history@1` read), rendered as prose — one
2182
2189
  * `Name: line` per row, named as the transcript names them, no
@@ -2186,8 +2193,8 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
2186
2193
  */
2187
2194
  recentStory: string;
2188
2195
  /**
2189
- * The session's genre fields, by their own names (lair re-plan
2190
- * R13, 2026-09-28): `{{sanctumSteers}}` for the Castellan in
2196
+ * The session's genre fields, by their own names (2026-09-28):
2197
+ * `{{sanctumSteers}}` for the Castellan in
2191
2198
  * the Sanctum, whose instructions say whether its talk shapes
2192
2199
  * the next turn. The planner's and the scene's `fields`, on the
2193
2200
  * same terms. Declared on THIS type alone, like `state`;
@@ -2195,7 +2202,7 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
2195
2202
  */
2196
2203
  fields: string;
2197
2204
  /**
2198
- * The speaker's own running notes (lair re-plan R13, owner
2205
+ * The speaker's own running notes (owner ruling of
2199
2206
  * 2026-09-28): the Castellan's **scratchpad**, the Lair's annex
2200
2207
  * field `castellan-scratchpad`, read for it alone
2201
2208
  * (`session-annex@1`'s AI view, with its own reference as the
@@ -2232,6 +2239,8 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
2232
2239
  readonly postHistoryInstructions: 'core:var/post-history-instructions@1';
2233
2240
  readonly characterNames: 'core:var/character-names@1';
2234
2241
  readonly personaNames: 'core:var/persona-names@1';
2242
+ /** 🚧 Everyone on stage's likeness prompt. */
2243
+ readonly likenesses: 'core:var/likenesses@1';
2235
2244
  /** From the speaking character's card. */
2236
2245
  readonly exampleDialogue: "core:var/example-dialogue@1";
2237
2246
  /**
@@ -2248,7 +2257,7 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
2248
2257
  };
2249
2258
  };
2250
2259
  /**
2251
- * The pre-assemble context hook (18 §4a): user chains over the
2260
+ * The pre-assemble context hook: user chains over the
2252
2261
  * finished template context — conditional style guides, seeded
2253
2262
  * event tables — after this node resolves it and before anything
2254
2263
  * renders it.
@@ -2258,7 +2267,7 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
2258
2267
  * template-context *data* (`context.injections`, resolved to
2259
2268
  * `injectionsByIndex` beside `postHistory.targetIndex`), rendered
2260
2269
  * by the template's own message loop. Splicing them into the list
2261
- * behind the template's back would be the §20 defect again, one
2270
+ * behind the template's back would repeat an old defect one
2262
2271
  * layer down: a position the template cannot express, an author
2263
2272
  * cannot see, and a corpus cannot check.
2264
2273
  */
@@ -2308,12 +2317,12 @@ export declare const buildNarratorContext: import("@serene-pub/sdk").Pinned<impo
2308
2317
  cast: string;
2309
2318
  currentCharacterId: string;
2310
2319
  /**
2311
- * What the person asked this narration to do (genre uplift
2312
- * C2, 2026-09-29): the narrator modal's text or `/narrate
2320
+ * What the person asked this narration to do (2026-09-29):
2321
+ * the narrator modal's text or `/narrate
2313
2322
  * <text>` — the turn's triggering text, `$.input.text`.
2314
2323
  * Rendered as `{{turnDirection}}`, the name and the meaning
2315
2324
  * `build-template-context@1` and `build-scene-context@1` give
2316
- * it (B11); absent when blank, so a row writes
2325
+ * it; absent when blank, so a row writes
2317
2326
  * `{{#if turnDirection}}…{{/if}}` and an undirected narration
2318
2327
  * renders exactly what it did before.
2319
2328
  *
@@ -2355,6 +2364,8 @@ export declare const buildNarratorContext: import("@serene-pub/sdk").Pinned<impo
2355
2364
  readonly postHistoryInstructions: 'core:var/post-history-instructions@1';
2356
2365
  readonly characterNames: 'core:var/character-names@1';
2357
2366
  readonly personaNames: 'core:var/persona-names@1';
2367
+ /** 🚧 Everyone on stage's likeness prompt. */
2368
+ readonly likenesses: 'core:var/likenesses@1';
2358
2369
  };
2359
2370
  };
2360
2371
  /** The same hook as `build-template-context` — see it for the terms. */
@@ -2407,7 +2418,7 @@ export declare const buildNarratorContext: import("@serene-pub/sdk").Pinned<impo
2407
2418
  * the card; the id stays where the host can act on it.
2408
2419
  *
2409
2420
  * ⚠ **The OUT-port `speaker` is the other half of that sentence** (added
2410
- * 2026-09-17, W1). The half-working control was a speaker id that changed the
2421
+ * 2026-09-17). The half-working control was a speaker id that changed the
2411
2422
  * prompt's voice and not the lore; the repair is not an in-port but a lane
2412
2423
  * inside the same clause reading the answer this node already computed —
2413
2424
  * `core:query/character-lore@1` takes `speaker`, so the voice and its private
@@ -2422,7 +2433,7 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
2422
2433
  * Who this voice is, as a **participant reference** — the row
2423
2434
  * the fact named (`characterId` or `ref`), else
2424
2435
  * `character:<id>` for a name the cast holds, else null for a
2425
- * free-form one. Additive, 2026-09-17 (W1). A lore read wired
2436
+ * free-form one. Additive, 2026-09-17. A lore read wired
2426
2437
  * to it takes null as unwired, so the run's scope decides for
2427
2438
  * a free-form voice.
2428
2439
  *
@@ -2452,8 +2463,8 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
2452
2463
  * because a typed name is all there is.
2453
2464
  *
2454
2465
  * `characterId` (a row id) or `ref` (a participant reference,
2455
- * `character:<id>` — what a pressed option carries, plan A28
2456
- * review) names the speaker BY ROW, and then the row is who
2466
+ * `character:<id>` — what a pressed option carries) names the
2467
+ * speaker BY ROW, and then the row is who
2457
2468
  * speaks: the name is a label, never a second lookup, so two
2458
2469
  * people sharing a name stay two people and a row the cast does
2459
2470
  * not seat is still the person it names. A fact with neither
@@ -2482,7 +2493,7 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
2482
2493
  plan: string;
2483
2494
  /**
2484
2495
  * The rooms, listed (`core:query/lorebook-entries@1`), as the
2485
- * planner and the scene get them (lair pass R8, 2026-09-28):
2496
+ * planner and the scene get them (2026-09-28):
2486
2497
  * `{{knownLocations}}` and the one the party stand in as
2487
2498
  * `{{locationEntry}}`, so a voice can name the room it is in
2488
2499
  * now that nobody narrates it first. Unwired, neither renders.
@@ -2490,7 +2501,7 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
2490
2501
  locationEntries: string;
2491
2502
  /**
2492
2503
  * A place described only in prose, as `{{locationPassage}}`
2493
- * (lair pass R9, 2026-09-28): the paragraph
2504
+ * (2026-09-28): the paragraph
2494
2505
  * `core:task/undescribed-name@1` found describing the room the
2495
2506
  * party are about to walk into (its `passage`), when no entry
2496
2507
  * describes it — that room's text for this turn. Blank or
@@ -2499,10 +2510,10 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
2499
2510
  locationPassage: string;
2500
2511
  /**
2501
2512
  * What the person asked this side character's turn to do
2502
- * (genre uplift C2, 2026-09-29) — the narrator modal's text,
2513
+ * (2026-09-29) — the narrator modal's text,
2503
2514
  * which feeds both of its halves. `{{turnDirection}}`, on the
2504
2515
  * terms `build-narrator-context@1` states; wired by
2505
- * `core:spec/chat-side-character` alone, so a genre's voices
2516
+ * `core:spec/story-side-character` alone, so a genre's voices
2506
2517
  * (whose composer text is a line somebody said) render
2507
2518
  * nothing new.
2508
2519
  */
@@ -2536,6 +2547,8 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
2536
2547
  readonly postHistoryInstructions: 'core:var/post-history-instructions@1';
2537
2548
  readonly characterNames: 'core:var/character-names@1';
2538
2549
  readonly personaNames: 'core:var/persona-names@1';
2550
+ /** 🚧 Everyone on stage's likeness prompt. */
2551
+ readonly likenesses: 'core:var/likenesses@1';
2539
2552
  };
2540
2553
  };
2541
2554
  /** The same hook as the other two builders — see them for the terms. */
@@ -2590,22 +2603,22 @@ export declare const buildPlannerContext: import("@serene-pub/sdk").Pinned<impor
2590
2603
  fields: string;
2591
2604
  /**
2592
2605
  * What the person just sent, when the genre reads it as
2593
- * **direction** rather than as a line somebody said (lair pass
2594
- * B11, 2026-09-27) — the Lair's composer. On the template
2606
+ * **direction** rather than as a line somebody said
2607
+ * (2026-09-27) — the Lair's composer. On the template
2595
2608
  * context and in the prompt as `{{turnDirection}}`; empty or
2596
2609
  * absent on a turn nobody directed (a Continue), so a prompt
2597
2610
  * writes `{{#if turnDirection}}…{{/if}}`. A genre whose composer
2598
2611
  * text is a participant's line leaves it unwired: that line is
2599
2612
  * already in the transcript. *Turn* direction, never bare
2600
2613
  * `direction`: that word is the Lair's standing-note state slot
2601
- * (`core:slot/direction@1`), a different fact (R1, renamed
2602
- * 2026-09-27).
2614
+ * (`core:slot/direction@1`), a different fact (one word, one
2615
+ * meaning; renamed 2026-09-27).
2603
2616
  */
2604
2617
  turnDirection: string;
2605
2618
  /**
2606
2619
  * The places the lorebook holds — a
2607
2620
  * `core:query/lorebook-entries@1` listing of location entries
2608
- * (lair pass B13, 2026-09-27). On the template context as
2621
+ * (2026-09-27). On the template context as
2609
2622
  * `{{knownLocations}}` (their names, one line) and
2610
2623
  * `{{locationEntry}}` (the entry whose name is the world's
2611
2624
  * `location` slot — where the party are, its exits included),
@@ -2615,7 +2628,7 @@ export declare const buildPlannerContext: import("@serene-pub/sdk").Pinned<impor
2615
2628
  */
2616
2629
  locationEntries: string;
2617
2630
  /**
2618
- * **Side talk** (lair re-plan R13, 2026-09-28): what was said on
2631
+ * **Side talk** (2026-09-28): what was said on
2619
2632
  * another channel since the story's last line — the Lair's
2620
2633
  * Sanctum talk, read by `session-history@1` with
2621
2634
  * `unplayedOnly`. Transcript rows, rendered as prose into
@@ -2627,15 +2640,15 @@ export declare const buildPlannerContext: import("@serene-pub/sdk").Pinned<impor
2627
2640
  */
2628
2641
  sideTalk: string;
2629
2642
  /**
2630
- * The planner's own running notes (lair re-plan R13, owner
2643
+ * The planner's own running notes (owner ruling of
2631
2644
  * 2026-09-28): the Castellan's **scratchpad**, rendered as
2632
2645
  * `{{scratchpad}}`. Absent when unwired or blank; the Lair
2633
2646
  * wires it beside `sideTalk`.
2634
2647
  */
2635
2648
  scratchpad: string;
2636
2649
  /**
2637
- * **How the cast stand with each other** (genre plan F6(a),
2638
- * 2026-09-29): the ranker's allocated candidates, of which the
2650
+ * **How the cast stand with each other** (2026-09-29): the
2651
+ * ranker's allocated candidates, of which the
2639
2652
  * builder reads the `relationships` band's `castRelationships`
2640
2653
  * lane — `core:query/relationship-search@1` read with nobody
2641
2654
  * speaking. Rendered as `{{castRelationships}}`: JSON keyed by
@@ -2674,6 +2687,7 @@ export declare const buildPlannerContext: import("@serene-pub/sdk").Pinned<impor
2674
2687
  postHistoryInstructions: 'core:var/post-history-instructions@1';
2675
2688
  characterNames: 'core:var/character-names@1';
2676
2689
  personaNames: 'core:var/persona-names@1';
2690
+ likenesses: 'core:var/likenesses@1';
2677
2691
  };
2678
2692
  };
2679
2693
  /** The same pre-assemble hook the other three builders carry. */
@@ -2738,22 +2752,22 @@ export declare const buildSceneContext: import("@serene-pub/sdk").Pinned<import(
2738
2752
  fields: string;
2739
2753
  /**
2740
2754
  * What the person just sent, when the genre reads it as
2741
- * **direction** rather than as a line somebody said (lair pass
2742
- * B11, 2026-09-27) — the Lair's composer. On the template
2755
+ * **direction** rather than as a line somebody said
2756
+ * (2026-09-27) — the Lair's composer. On the template
2743
2757
  * context and in the prompt as `{{turnDirection}}`; empty or
2744
2758
  * absent on a turn nobody directed (a Continue), so a prompt
2745
2759
  * writes `{{#if turnDirection}}…{{/if}}`. A genre whose composer
2746
2760
  * text is a participant's line leaves it unwired: that line is
2747
2761
  * already in the transcript. *Turn* direction, never bare
2748
2762
  * `direction`: that word is the Lair's standing-note state slot
2749
- * (`core:slot/direction@1`), a different fact (R1, renamed
2750
- * 2026-09-27).
2763
+ * (`core:slot/direction@1`), a different fact (one word, one
2764
+ * meaning; renamed 2026-09-27).
2751
2765
  */
2752
2766
  turnDirection: string;
2753
2767
  /**
2754
2768
  * The places the lorebook holds — a
2755
2769
  * `core:query/lorebook-entries@1` listing of location entries
2756
- * (lair pass B13, 2026-09-27). On the template context as
2770
+ * (2026-09-27). On the template context as
2757
2771
  * `{{knownLocations}}` (their names, one line) and
2758
2772
  * `{{locationEntry}}` (the room the world's `location` names,
2759
2773
  * else the planner's location hint — where the party are, its
@@ -2764,7 +2778,7 @@ export declare const buildSceneContext: import("@serene-pub/sdk").Pinned<import(
2764
2778
  */
2765
2779
  locationEntries: string;
2766
2780
  /**
2767
- * **Side talk** (lair re-plan R13, 2026-09-28), on the
2781
+ * **Side talk** (2026-09-28), on the
2768
2782
  * planner's terms: the Lair's Sanctum talk since the story's
2769
2783
  * last line, rendered as prose into `{{sideTalk}}` — for the
2770
2784
  * Castellan's narration, wired while the session's _Sanctum
@@ -2774,7 +2788,7 @@ export declare const buildSceneContext: import("@serene-pub/sdk").Pinned<import(
2774
2788
  sideTalk: string;
2775
2789
  /**
2776
2790
  * How the cast stand with each other, on the narrator's terms
2777
- * — the same port as the planner's (F6(a), 2026-09-29), rendered
2791
+ * — the same port as the planner's (2026-09-29), rendered
2778
2792
  * as `{{castRelationships}}`. See `buildPlannerContext`.
2779
2793
  */
2780
2794
  castRelationships: string;
@@ -2831,6 +2845,7 @@ export declare const buildSceneContext: import("@serene-pub/sdk").Pinned<import(
2831
2845
  postHistoryInstructions: 'core:var/post-history-instructions@1';
2832
2846
  characterNames: 'core:var/character-names@1';
2833
2847
  personaNames: 'core:var/persona-names@1';
2848
+ likenesses: 'core:var/likenesses@1';
2834
2849
  };
2835
2850
  };
2836
2851
  /** The same pre-assemble hook the other three builders carry. */
@@ -2914,6 +2929,16 @@ export declare const buildKeeperContext: import("@serene-pub/sdk").Pinned<import
2914
2929
  * prompt naming `{{tone}}` rendered a blank.
2915
2930
  */
2916
2931
  fields: string;
2932
+ /**
2933
+ * 🚧 **How much time the player chose** (live scenes §15 G6,
2934
+ * 2026-10-13): a collected clock step, `{ by, unit }` — the
2935
+ * inlet's `clockStep` on a *Time passes…* press. Spelled on the
2936
+ * template context as `{{clockStep}}` (`3 hours`, `1 day`,
2937
+ * `2 hours back`), so the keeper describes what the world does
2938
+ * over the span the player picked rather than one notch of
2939
+ * the time of day. Absent when unwired or not a step.
2940
+ */
2941
+ clockStep: string;
2917
2942
  }, "core:task/build-keeper-context@1"> & {
2918
2943
  kind: 'task';
2919
2944
  slots?: {
@@ -2938,6 +2963,7 @@ export declare const buildKeeperContext: import("@serene-pub/sdk").Pinned<import
2938
2963
  postHistoryInstructions: 'core:var/post-history-instructions@1';
2939
2964
  characterNames: 'core:var/character-names@1';
2940
2965
  personaNames: 'core:var/persona-names@1';
2966
+ likenesses: 'core:var/likenesses@1';
2941
2967
  };
2942
2968
  };
2943
2969
  /** The same pre-assemble hook the other three builders carry. */
@@ -2969,8 +2995,7 @@ export declare const processMessages: import("@serene-pub/sdk").Pinned<import("@
2969
2995
  seedName: string;
2970
2996
  /**
2971
2997
  * Text the model is being asked to CONTINUE — the seed line's
2972
- * body rather than a message of its own (ruling 2026-09-08,
2973
- * D-2).
2998
+ * body rather than a message of its own (ruling 2026-09-08).
2974
2999
  *
2975
3000
  * ⚠ **Absent on an ordinary turn, and that is the normal case.**
2976
3001
  * There is no `optional` marker for a port: a port nothing wires
@@ -2997,11 +3022,11 @@ export declare const processMessages: import("@serene-pub/sdk").Pinned<import("@
2997
3022
  kind: 'task';
2998
3023
  slots?: {
2999
3024
  /**
3000
- * The message-rewrite hook (18 §4a), on the *processed* list —
3025
+ * The message-rewrite hook, on the *processed* list —
3001
3026
  * names resolved, per-message interpolation done. `transform` only:
3002
3027
  * `messages/inject` deliberately does **not** live here. Injection
3003
3028
  * is a statement about *position in the rendered conversation*, and
3004
- * position belongs to the template (§20, ruling of 2026-08-23) —
3029
+ * position belongs to the template (ruling of 2026-08-23) —
3005
3030
  * inject chains attach on the context builders, land as
3006
3031
  * `context.injections`, and the template's own loop renders them.
3007
3032
  * Splicing rows into this list would be a position the template
@@ -3052,8 +3077,7 @@ export declare const proseTranscript: import("@serene-pub/sdk").Pinned<import("@
3052
3077
  slots?: Record<string, SlotDecl> | undefined;
3053
3078
  }>;
3054
3079
  /**
3055
- * 🚧 **Where each line's attachments go** (PLAN-composer-attachments §3.5; owner
3056
- * D2/D3, 2026-10-02).
3080
+ * 🚧 **Where each line's attachments go** (owner rulings of 2026-10-02).
3057
3081
  *
3058
3082
  * Pure. Takes the processed lines and the attachments by message, and gives
3059
3083
  * each line an `attachments` string the template renders after the line's text
@@ -3129,7 +3153,7 @@ export declare const placeAttachments: import("@serene-pub/sdk").Pinned<import("
3129
3153
  * in candidate order. A character spoke when a non-hidden, non-narrator row
3130
3154
  * after the last user row carries its id; an envoy when `metadata.speaker`
3131
3155
  * carries its reference; a persona when a user row carries its `personaId`
3132
- * — which is how a session knows it is the person's turn (R15).
3156
+ * — which is how a session knows it is the person's turn.
3133
3157
  * @experimental
3134
3158
  */
3135
3159
  export declare const turnRoundRobin: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
@@ -3155,7 +3179,7 @@ export declare const turnRoundRobin: import("@serene-pub/sdk").Pinned<import("@s
3155
3179
  * A seeded uniform pick over the not-yet-spoken candidates — one entry.
3156
3180
  * `declaresRandomness`, so a replayed run re-rolls identically; an
3157
3181
  * unrelated recompute may roll differently, which is documented rather than
3158
- * prevented (§4.4).
3182
+ * prevented.
3159
3183
  * @experimental
3160
3184
  */
3161
3185
  export declare const turnRandom: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
@@ -3277,7 +3301,67 @@ export declare const turnNarrator: import("@serene-pub/sdk").Pinned<import("@ser
3277
3301
  slots?: Record<string, SlotDecl> | undefined;
3278
3302
  }>;
3279
3303
  /**
3280
- * The pool (§4.4): who *may* be seated this recompute, from the settings
3304
+ * 🚧 **Unprompted turns** (PLAN-genre-restructure §4, the voices group; lane
3305
+ * 2, 2026-10-19): what a genre's background tasks add to the order a
3306
+ * strategy prepared, after the round. Canon A9 holds — who speaks is state,
3307
+ * written by the turn-order spec and fired by auto-advance; nothing reads the
3308
+ * history to decide a reply elsewhere.
3309
+ *
3310
+ * Only when the round has ended (no AI entry still to fire) and somebody has
3311
+ * answered the person since their line, it puts ONE entry at the head, at
3312
+ * most once per round each:
3313
+ *
3314
+ * · `side-cast` on — a seated character who did not speak last speaks up
3315
+ * again (`{ ref: 'character:<id>', via: 'unprompted' }`); once any
3316
+ * character has spoken twice since the person's line, it is done;
3317
+ * · `narrator-interjections` on — the narrator adds a line
3318
+ * (`{ ref: null, via: 'unprompted', subject: <params.narrate> }`, the
3319
+ * genre's narrate action; a plain narrator reply when unset), unless a
3320
+ * narration already landed since the person's line.
3321
+ *
3322
+ * `modes` is `{ 'side-cast': …, 'narrator-interjections': … }` — `full` or
3323
+ * `off` each, the genre's voices settings as the turn-order spec reads them
3324
+ * (`core:script/unprompted-modes`, 2026-10-20; was the retired background
3325
+ * tasks' modes); a key absent or `off` adds nothing, so the order passes
3326
+ * through untouched — a session with neither on gets exactly its strategy's
3327
+ * order. Pure.
3328
+ * @experimental
3329
+ */
3330
+ export declare const turnUnprompted: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
3331
+ main: string;
3332
+ order: string;
3333
+ }, {
3334
+ /** What the strategy prepared. */
3335
+ order: string;
3336
+ /** Who may be seated — the pool's output. */
3337
+ candidates: string;
3338
+ /** The session's visible history, ascending. */
3339
+ messages: string;
3340
+ /** `{ 'side-cast', 'narrator-interjections' }` → `full` | `off`: the genre's voices settings. */
3341
+ modes: string;
3342
+ }, "core:task/turn-unprompted@1"> & {
3343
+ kind: 'task';
3344
+ slots?: {
3345
+ readonly params: {
3346
+ readonly kind: "parameters";
3347
+ readonly facet: "behavior";
3348
+ readonly schema: {
3349
+ readonly narrate: {
3350
+ readonly type: "string";
3351
+ readonly default: "";
3352
+ readonly label: {
3353
+ readonly en: "Narrator action";
3354
+ };
3355
+ readonly description: {
3356
+ readonly en: "The action a narrator's own line fires, as '<spec>#<key>'. Empty: an ordinary reply in the narrator's voice.";
3357
+ };
3358
+ };
3359
+ };
3360
+ };
3361
+ } | undefined;
3362
+ }>;
3363
+ /**
3364
+ * The pool: who *may* be seated this recompute, from the settings
3281
3365
  * document's cast and the history.
3282
3366
  *
3283
3367
  * Its four params are the whole of a genre's or a session's say over
@@ -3295,7 +3379,7 @@ export declare const turnNarrator: import("@serene-pub/sdk").Pinned<import("@ser
3295
3379
  export declare const turnPool: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
3296
3380
  main: string;
3297
3381
  }, {
3298
- /** The settings document's cast, envoys included (§4.12). */
3382
+ /** The settings document's cast, envoys included. */
3299
3383
  cast: string;
3300
3384
  /** The session's visible history, ascending. */
3301
3385
  messages: string;
@@ -3429,7 +3513,7 @@ export declare const turnPool: import("@serene-pub/sdk").Pinned<import("@serene-
3429
3513
  } | undefined;
3430
3514
  }>;
3431
3515
  /**
3432
- * The first orderer (R8): mentioned candidates sort to the front.
3516
+ * The first orderer: mentioned candidates sort to the front.
3433
3517
  *
3434
3518
  * A composable node rather than a seventh strategy, because "who was named"
3435
3519
  * and "whose turn it is" are two questions — a session can have the
@@ -3471,7 +3555,61 @@ export declare const turnMentioned: import("@serene-pub/sdk").Pinned<import("@se
3471
3555
  } | undefined;
3472
3556
  }>;
3473
3557
  /**
3474
- * Tool calling's two pure halves (20 §9). A *tool* is any same-shaped
3558
+ * Card strokes — marks each keyword stroke fired or not against the recent
3559
+ * transcript; never ranks, never budgets.
3560
+ *
3561
+ * A card painted in strokes (`strokes.ts`) carries keyword strokes: prose that
3562
+ * belongs in the prompt only when one of its keys was said. Unrun, every
3563
+ * enabled stroke is in — the card's cached `description`/`personality` — and
3564
+ * nothing is lost but room. Placed before the context builder, this stamps
3565
+ * `fired` on every stroke of every cast member (`resolveStrokes`), and the
3566
+ * builder then compiles `always` + fired ones only and puts the resolved list
3567
+ * on the card (`core:var/characters@1`'s optional `strokes`).
3568
+ *
3569
+ * The host answers each keyword condition with the lore keyword **matcher**
3570
+ * — the same match modes and regex time limit, one matcher at the seam — but
3571
+ * a stroke is not a lorebook entry: it never reaches the ranker, the lore
3572
+ * budget or `select`, and never competes with lore for room.
3573
+ *
3574
+ * `cast` in, `cast` out, so it slots between the cast read and the builder
3575
+ * without either changing; a card with no strokes passes through as it came.
3576
+ * The window is the last `scanDepth` rows of `messages`, defaulting to the
3577
+ * lore scan's 10 for the reason given there: a round grows with the cast.
3578
+ * Pure — the explicit step "no magic in core" asks for, placed in a spec.
3579
+ *
3580
+ * ⏸ Paused 2026-10-11 (owner): no core spec places this step and the app hides strokes behind `STROKES_ENABLED`; kept so stored documents and the registry hash stay stable.
3581
+ * @experimental
3582
+ */
3583
+ export declare const cardStrokes: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
3584
+ main: string;
3585
+ cast: string;
3586
+ }, {
3587
+ cast: string;
3588
+ messages: string;
3589
+ }, "core:task/card-strokes@1"> & {
3590
+ kind: 'task';
3591
+ slots?: {
3592
+ readonly params: {
3593
+ readonly kind: "parameters";
3594
+ readonly facet: "behavior";
3595
+ readonly schema: {
3596
+ readonly scanDepth: {
3597
+ readonly type: "integer";
3598
+ readonly default: 10;
3599
+ readonly min: 1;
3600
+ readonly label: {
3601
+ readonly en: "Messages scanned for stroke keywords";
3602
+ };
3603
+ readonly description: {
3604
+ readonly en: "How many recent messages are read for a keyword stroke's keys.";
3605
+ };
3606
+ };
3607
+ };
3608
+ };
3609
+ } | undefined;
3610
+ }>;
3611
+ /**
3612
+ * Tool calling's two pure halves. A *tool* is any same-shaped
3475
3613
  * provider — a sandboxed plugin hook canonically — and these tasks only
3476
3614
  * decide how the model learns about it and how its answer is read back.
3477
3615
  * Between them sits the ordinary generate step; around them sits the loop
@@ -3573,7 +3711,7 @@ export declare const joinText: import("@serene-pub/sdk").Pinned<import("@serene-
3573
3711
  }>;
3574
3712
  /**
3575
3713
  * A document's lists, as one **folded section** a reply carries collapsed
3576
- * (lair pass B5, decision D5, 2026-09-27).
3714
+ * (2026-09-27).
3577
3715
  *
3578
3716
  * The producer the message outlets' `sections` in-port was built for: a
3579
3717
  * planner's document is structure, and the person reading the reply wants its
@@ -3593,7 +3731,7 @@ export declare const listSection: import("@serene-pub/sdk").Pinned<import("@sere
3593
3731
  sections: string;
3594
3732
  /**
3595
3733
  * The same lines as a markdown list, one `- ` item per line
3596
- * (lair pass R8, 2026-09-28) — for a message whose BODY is the
3734
+ * (2026-09-28) — for a message whose BODY is the
3597
3735
  * list: the Lair's beats row in the Sanctum. Empty when
3598
3736
  * nothing was listed.
3599
3737
  */
@@ -3626,8 +3764,8 @@ export declare const listSection: import("@serene-pub/sdk").Pinned<import("@sere
3626
3764
  } | undefined;
3627
3765
  }>;
3628
3766
  /**
3629
- * A list, split into its **first** item and the **rest**, in order (lair pass
3630
- * R8, 2026-09-28).
3767
+ * A list, split into its **first** item and the **rest**, in order
3768
+ * (2026-09-28).
3631
3769
  *
3632
3770
  * A data reference is `{node, port}` with no sub-path, and `parse-json@1`'s
3633
3771
  * `path` selects a key or an index but never a tail — so a spec that treats
@@ -3821,7 +3959,7 @@ export declare const makeChoices: import("@serene-pub/sdk").Pinned<import("@sere
3821
3959
  fn: string;
3822
3960
  /**
3823
3961
  * The identity of the declaration the options fire, when it is
3824
- * another spec's (`core:spec/adventure-answer#answer`). Absent,
3962
+ * another spec's (`core:spec/story-answer#answer`). Absent,
3825
3963
  * the host stamps this spec's own declaration for `fn` at the
3826
3964
  * write.
3827
3965
  */
@@ -3833,14 +3971,14 @@ export declare const makeChoices: import("@serene-pub/sdk").Pinned<import("@sere
3833
3971
  /**
3834
3972
  * What the question is about, by name — stamped on the block
3835
3973
  * as its `referent` and handed back by `read-answer@1` to the
3836
- * run the press fires (lair pass B12, 2026-09-27: the room the
3974
+ * run the press fires (2026-09-27: the room the
3837
3975
  * party knocked at). Blank or absent writes none.
3838
3976
  */
3839
3977
  referent: string;
3840
3978
  /**
3841
3979
  * Where the question was asked **from**, by name — stamped on
3842
3980
  * the block as its `vantage` and handed back by
3843
- * `read-answer@1`, beside `referent` (plan A27, 2026-09-30:
3981
+ * `read-answer@1`, beside `referent` (2026-09-30:
3844
3982
  * the room the Lair's planner said the party stood in as
3845
3983
  * they knocked). JSON because it is usually read off a
3846
3984
  * model's document (`parse-json@1`'s `value`); anything but
@@ -3872,7 +4010,7 @@ export declare const readAnswer: import("@serene-pub/sdk").Pinned<import("@seren
3872
4010
  question: string;
3873
4011
  /**
3874
4012
  * What the question was about, by name — the block's
3875
- * `referent`, as the asking run stamped it (lair pass B12);
4013
+ * `referent`, as the asking run stamped it;
3876
4014
  * empty when it named nothing, never null, so a write wired
3877
4015
  * to it still offers the field at its review gate (a review
3878
4016
  * form shows only the fields a payload carries).
@@ -3880,7 +4018,7 @@ export declare const readAnswer: import("@serene-pub/sdk").Pinned<import("@seren
3880
4018
  referent: string;
3881
4019
  /**
3882
4020
  * Where the question was asked from, by name — the block's
3883
- * `vantage`, as the asking run stamped it (plan A27); null
4021
+ * `vantage`, as the asking run stamped it; null
3884
4022
  * when it named nowhere.
3885
4023
  */
3886
4024
  vantage: string;
@@ -3894,82 +4032,361 @@ export declare const readAnswer: import("@serene-pub/sdk").Pinned<import("@seren
3894
4032
  slots?: Record<string, SlotDecl> | undefined;
3895
4033
  }>;
3896
4034
  /**
3897
- * Cut the messages into batches a model can hold.
4035
+ * 🚧 Lay a scene's messages out as text, one **transcript unit** per message
4036
+ * — the genre's own words for what a line and an aside look like (live
4037
+ * scenes §12.1, §14, 2026-10-13).
3898
4038
  *
3899
- * A Task, not a Query: the cut is a *decision* — how many tokens per batch, and
3900
- * therefore how much context each draft is written against — and it is the
3901
- * first parameter a user with long posts reaches for.
3902
- * @internal
4039
+ * ## Why a template, and why it is the spec's
4040
+ *
4041
+ * A summary of the Lair has to say the Sanctum is talk the party never hear;
4042
+ * a summary of Chat has nothing to say about it. That difference is
4043
+ * presentation, so it is a template on this node's `template` slot, and the
4044
+ * shipped template is the summarize-scene spec's Default — a genre ships its
4045
+ * own by building its spec with `summarizeScene(…, { transcript })`, and an
4046
+ * admin edits it in the Pipelines view like any other template.
4047
+ *
4048
+ * ## The outlet
4049
+ *
4050
+ * `preamble` — the rendered `preamble` section, once. `units` — every
4051
+ * story line and aside in reading order (each aside after the story line it
4052
+ * is attached to), `{ messageId, text, tokens }`: the batch cut needs the
4053
+ * count, and the message id is what makes a draft traceable to its rows.
4054
+ * Pure: no model, no write. An empty span renders an empty `units`.
4055
+ * @experimental
3903
4056
  */
3904
- export declare const batchMessages: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
4057
+ export declare const renderTranscript: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
3905
4058
  main: string;
3906
- batches: string;
4059
+ preamble: string;
4060
+ units: string;
3907
4061
  }, {
4062
+ /** The story's rows (`summarize-source@2`'s `messages`). */
3908
4063
  messages: string;
4064
+ /** The aside rows (`summarize-source@2`'s `asides`). */
4065
+ asides: string;
4066
+ /**
4067
+ * The files by message, from `core:query/history-attachments@1`
4068
+ * over the story rows — `batch-messages@1`'s port, for its
4069
+ * reason: a message that is only a picture still reaches the
4070
+ * draft as something. Each story line's files are named into
4071
+ * the `line` section's `attachments`. Unwired, or a message
4072
+ * with no files, and the line renders as it would without.
4073
+ */
3909
4074
  attachments: string;
3910
- }, "core:task/batch-messages@1"> & {
4075
+ /**
4076
+ * 🚧 The aside rows' files by message, from a second
4077
+ * `core:query/history-attachments@1` over the asides (lane
4078
+ * E): each aside's files are named into the `aside`
4079
+ * section's `attachments`. Unwired, an aside renders as it
4080
+ * would without.
4081
+ */
4082
+ asideAttachments: string;
4083
+ /** Who was present — the session's cast read. */
4084
+ cast: string;
4085
+ /**
4086
+ * The scene being summarized: its name, place and date where the
4087
+ * host knows them. Wired to the summarize request in the shipped
4088
+ * specs; the binding reads the request's `scene` field.
4089
+ */
4090
+ scene: string;
4091
+ }, "core:task/render-transcript@1"> & {
3911
4092
  kind: 'task';
3912
4093
  slots?: {
3913
- /**
3914
- * The window the cut is clamped to — the same slot, by reference,
3915
- * that the drafting step generates against.
3916
- *
3917
- * The context window belongs to the sampling config, never to a knob
3918
- * on a node (17 §1a), and the executor resolves a `sampling` slot to
3919
- * the config's switched-on *values* — so this stays a pure Task
3920
- * reading data it was handed rather than a Query looking one up. Same
3921
- * shape and same reason as `core:task/context-budget@1`.
3922
- *
3923
- * ⚠ Wire it as a REFERENCE to the drafting oracle's sampling slot
3924
- * (`slot.samplingOf(...)`), not as a picker of its own. A batch cut
3925
- * against one window and drafted against another is wrong in the
3926
- * direction that overflows, silently — and unlike the assembled
3927
- * context there is no truncation on this path to catch it, because
3928
- * the batch prompt is injected whole.
3929
- */
3930
- readonly sampling: {
3931
- readonly kind: "sampling";
3932
- readonly quick: true;
3933
- };
3934
- readonly params: {
3935
- readonly kind: "parameters";
3936
- readonly facet: "weights";
3937
- readonly schema: {
3938
- /**
3939
- * The chat half of a batch prompt, and only that half — the
3940
- * template around it and the room the draft is written back
3941
- * into are a reserve the binding adds on top, which is why
3942
- * this can be raised right up to the window minus that
3943
- * reserve and no further.
3944
- *
3945
- * ⚠ Bigger is not better. Long-context models degrade in the
3946
- * middle, so this is a QUALITY point rather than a fraction
3947
- * of whatever window happens to be available: nothing scales
3948
- * it up to fill a large one, and the window is only ever a
3949
- * ceiling on what an admin asks for.
3950
- *
3951
- * 2560 is 0.5's effective batch (`4096 - 1500`) at a round
3952
- * 2.5 Ki, so arriving here re-tunes nobody.
3953
- */
3954
- readonly batchTokens: {
3955
- readonly type: "integer";
3956
- readonly default: 2560;
3957
- readonly label: {
3958
- readonly en: "How much chat each batch holds";
4094
+ readonly template: {
4095
+ readonly kind: "template";
4096
+ readonly acceptedEngines: readonly [string];
4097
+ readonly facet: "templates";
4098
+ readonly variables: {
4099
+ readonly scene: {
4100
+ readonly type: 'object';
4101
+ readonly optional: true;
4102
+ readonly description: 'The scene, in `preamble`: its name, place and date when the host knows them.';
4103
+ readonly fields: {
4104
+ readonly name: {
4105
+ readonly type: 'string';
4106
+ readonly optional: true;
4107
+ };
4108
+ readonly place: {
4109
+ readonly type: 'string';
4110
+ readonly optional: true;
4111
+ };
4112
+ readonly date: {
4113
+ readonly type: 'string';
4114
+ readonly optional: true;
4115
+ };
3959
4116
  };
3960
- readonly description: {
3961
- readonly en: "Tokens of chat one summary draft is written from. Capped by the drafting step’s Context Tokens, less room for the prompt and the draft itself.";
4117
+ };
4118
+ readonly cast: {
4119
+ readonly type: 'list';
4120
+ readonly description: 'Who was present, in `preamble`, by name.';
4121
+ readonly of: {
4122
+ readonly type: 'object';
4123
+ readonly fields: {
4124
+ readonly name: {
4125
+ readonly type: 'string';
4126
+ };
4127
+ };
3962
4128
  };
3963
4129
  };
3964
- readonly minBatchMessages: {
3965
- readonly type: "integer";
3966
- readonly default: 1;
3967
- readonly description: "Never cut a batch smaller than this many messages.";
4130
+ readonly messageId: {
4131
+ readonly type: 'number';
4132
+ readonly description: 'In `line` and `aside`: the message this unit renders.';
4133
+ };
4134
+ readonly name: {
4135
+ readonly type: 'string';
4136
+ readonly description: 'In `line` and `aside`: who wrote the line, as the session names them.';
4137
+ };
4138
+ readonly role: {
4139
+ readonly type: 'string';
4140
+ readonly description: "In `line` and `aside`: 'user', 'assistant' or 'system'.";
4141
+ };
4142
+ readonly text: {
4143
+ readonly type: 'string';
4144
+ readonly description: "In `line` and `aside`: the message's text.";
4145
+ };
4146
+ readonly attachments: {
4147
+ readonly type: 'string';
4148
+ readonly description: "In `line` and `aside`: the files the message shows, each named on a line of its own — `[image: cat.png — a grey cat]`, `[file: notes.txt]` — carrying its own leading line break when the message has text, so it renders straight after `{{{text}}}`, as `place-attachments@1`'s does. Empty when the message shows none. A summary is drafted from text, so a file reaches it as its name.";
4149
+ };
4150
+ readonly channel: {
4151
+ readonly type: 'string';
4152
+ readonly description: 'In `aside`: the channel the row was written on — `sanctum`, `sanctum:2`.';
3968
4153
  };
3969
4154
  };
4155
+ readonly description: "How the transcript a summary is drafted from reads: three sections — the preamble, a story line, and an aside. Leave empty to use the built-in layout.";
3970
4156
  };
3971
4157
  } | undefined;
3972
4158
  }>;
4159
+ /**
4160
+ * Cut a summary's material into batches — both pins on one export (04 §4b):
4161
+ * `C.batchMessages.v1(…)` cuts message rows, `C.batchMessages.v2(…)` cuts a
4162
+ * rendered transcript. `id` and `descriptor` stay `@1`'s; `@2`'s descriptor
4163
+ * rides its constructor (`typeof C.batchMessages.v2` types a binding).
4164
+ * @internal
4165
+ */
4166
+ export declare const batchMessages: {
4167
+ id: "core:task/batch-messages@1";
4168
+ descriptor: import("@serene-pub/sdk").Descriptor<{
4169
+ main: string;
4170
+ batches: string;
4171
+ }, {
4172
+ messages: string;
4173
+ attachments: string;
4174
+ }, "core:task/batch-messages@1"> & {
4175
+ kind: 'task';
4176
+ slots?: {
4177
+ /**
4178
+ * The window the cut is clamped to — the same slot, by reference,
4179
+ * that the drafting step generates against.
4180
+ *
4181
+ * The context window belongs to the sampling config, never to a knob
4182
+ * on a node, and the executor resolves a `sampling` slot to
4183
+ * the config's switched-on *values* — so this stays a pure Task
4184
+ * reading data it was handed rather than a Query looking one up. Same
4185
+ * shape and same reason as `core:task/context-budget@1`.
4186
+ *
4187
+ * ⚠ Wire it as a REFERENCE to the drafting oracle's sampling slot
4188
+ * (`slot.samplingOf(...)`), not as a picker of its own. A batch cut
4189
+ * against one window and drafted against another is wrong in the
4190
+ * direction that overflows, silently — and unlike the assembled
4191
+ * context there is no truncation on this path to catch it, because
4192
+ * the batch prompt is injected whole.
4193
+ */
4194
+ readonly sampling: {
4195
+ readonly kind: "sampling";
4196
+ readonly quick: true;
4197
+ };
4198
+ readonly params: {
4199
+ readonly kind: "parameters";
4200
+ readonly facet: "weights";
4201
+ readonly schema: {
4202
+ /**
4203
+ * The chat half of a batch prompt, and only that half — the
4204
+ * template around it and the room the draft is written back
4205
+ * into are a reserve the binding adds on top, which is why
4206
+ * this can be raised right up to the window minus that
4207
+ * reserve and no further.
4208
+ *
4209
+ * ⚠ Bigger is not better. Long-context models degrade in the
4210
+ * middle, so this is a QUALITY point rather than a fraction
4211
+ * of whatever window happens to be available: nothing scales
4212
+ * it up to fill a large one, and the window is only ever a
4213
+ * ceiling on what an admin asks for.
4214
+ *
4215
+ * 2560 is 0.5's effective batch (`4096 - 1500`) at a round
4216
+ * 2.5 Ki, so arriving here re-tunes nobody.
4217
+ */
4218
+ readonly batchTokens: {
4219
+ readonly type: "integer";
4220
+ readonly default: 2560;
4221
+ readonly label: {
4222
+ readonly en: "How much chat each batch holds";
4223
+ };
4224
+ readonly description: {
4225
+ readonly en: "Tokens of chat one summary draft is written from. Capped by the drafting step’s Context Tokens, less room for the prompt and the draft itself.";
4226
+ };
4227
+ };
4228
+ readonly minBatchMessages: {
4229
+ readonly type: "integer";
4230
+ readonly default: 1;
4231
+ readonly description: "Never cut a batch smaller than this many messages.";
4232
+ };
4233
+ };
4234
+ };
4235
+ } | undefined;
4236
+ };
4237
+ v2: import("@serene-pub/sdk").NodeCtor<import("@serene-pub/sdk").Descriptor<{
4238
+ main: string;
4239
+ batches: string;
4240
+ }, {
4241
+ preamble: string;
4242
+ units: string;
4243
+ }, "core:task/batch-messages@2"> & {
4244
+ kind: 'task';
4245
+ slots?: {
4246
+ /**
4247
+ * The window the cut is clamped to — wired by REFERENCE to the
4248
+ * drafting step's sampling, for `@1`'s reason: a batch cut against
4249
+ * one window and drafted against another overflows silently.
4250
+ */
4251
+ readonly sampling: {
4252
+ readonly kind: "sampling";
4253
+ readonly quick: true;
4254
+ };
4255
+ readonly params: {
4256
+ readonly kind: "parameters";
4257
+ readonly facet: "weights";
4258
+ readonly schema: {
4259
+ readonly batchTokens: {
4260
+ readonly type: "integer";
4261
+ readonly default: 2560;
4262
+ readonly label: {
4263
+ readonly en: "How much chat each batch holds";
4264
+ };
4265
+ readonly description: {
4266
+ readonly en: "Tokens of transcript one summary draft is written from. Capped by the drafting step’s Context Tokens, less room for the prompt and the draft itself.";
4267
+ };
4268
+ };
4269
+ readonly minBatchMessages: {
4270
+ readonly type: "integer";
4271
+ readonly default: 1;
4272
+ readonly description: "Never cut a batch smaller than this many messages.";
4273
+ };
4274
+ };
4275
+ };
4276
+ } | undefined;
4277
+ }> & {
4278
+ descriptor: import("@serene-pub/sdk").Descriptor<{
4279
+ main: string;
4280
+ batches: string;
4281
+ }, {
4282
+ preamble: string;
4283
+ units: string;
4284
+ }, "core:task/batch-messages@2"> & {
4285
+ kind: 'task';
4286
+ slots?: {
4287
+ /**
4288
+ * The window the cut is clamped to — wired by REFERENCE to the
4289
+ * drafting step's sampling, for `@1`'s reason: a batch cut against
4290
+ * one window and drafted against another overflows silently.
4291
+ */
4292
+ readonly sampling: {
4293
+ readonly kind: "sampling";
4294
+ readonly quick: true;
4295
+ };
4296
+ readonly params: {
4297
+ readonly kind: "parameters";
4298
+ readonly facet: "weights";
4299
+ readonly schema: {
4300
+ readonly batchTokens: {
4301
+ readonly type: "integer";
4302
+ readonly default: 2560;
4303
+ readonly label: {
4304
+ readonly en: "How much chat each batch holds";
4305
+ };
4306
+ readonly description: {
4307
+ readonly en: "Tokens of transcript one summary draft is written from. Capped by the drafting step’s Context Tokens, less room for the prompt and the draft itself.";
4308
+ };
4309
+ };
4310
+ readonly minBatchMessages: {
4311
+ readonly type: "integer";
4312
+ readonly default: 1;
4313
+ readonly description: "Never cut a batch smaller than this many messages.";
4314
+ };
4315
+ };
4316
+ };
4317
+ } | undefined;
4318
+ };
4319
+ };
4320
+ v1: import("@serene-pub/sdk").NodeCtor<import("@serene-pub/sdk").Descriptor<{
4321
+ main: string;
4322
+ batches: string;
4323
+ }, {
4324
+ messages: string;
4325
+ attachments: string;
4326
+ }, "core:task/batch-messages@1"> & {
4327
+ kind: 'task';
4328
+ slots?: {
4329
+ /**
4330
+ * The window the cut is clamped to — the same slot, by reference,
4331
+ * that the drafting step generates against.
4332
+ *
4333
+ * The context window belongs to the sampling config, never to a knob
4334
+ * on a node, and the executor resolves a `sampling` slot to
4335
+ * the config's switched-on *values* — so this stays a pure Task
4336
+ * reading data it was handed rather than a Query looking one up. Same
4337
+ * shape and same reason as `core:task/context-budget@1`.
4338
+ *
4339
+ * ⚠ Wire it as a REFERENCE to the drafting oracle's sampling slot
4340
+ * (`slot.samplingOf(...)`), not as a picker of its own. A batch cut
4341
+ * against one window and drafted against another is wrong in the
4342
+ * direction that overflows, silently — and unlike the assembled
4343
+ * context there is no truncation on this path to catch it, because
4344
+ * the batch prompt is injected whole.
4345
+ */
4346
+ readonly sampling: {
4347
+ readonly kind: "sampling";
4348
+ readonly quick: true;
4349
+ };
4350
+ readonly params: {
4351
+ readonly kind: "parameters";
4352
+ readonly facet: "weights";
4353
+ readonly schema: {
4354
+ /**
4355
+ * The chat half of a batch prompt, and only that half — the
4356
+ * template around it and the room the draft is written back
4357
+ * into are a reserve the binding adds on top, which is why
4358
+ * this can be raised right up to the window minus that
4359
+ * reserve and no further.
4360
+ *
4361
+ * ⚠ Bigger is not better. Long-context models degrade in the
4362
+ * middle, so this is a QUALITY point rather than a fraction
4363
+ * of whatever window happens to be available: nothing scales
4364
+ * it up to fill a large one, and the window is only ever a
4365
+ * ceiling on what an admin asks for.
4366
+ *
4367
+ * 2560 is 0.5's effective batch (`4096 - 1500`) at a round
4368
+ * 2.5 Ki, so arriving here re-tunes nobody.
4369
+ */
4370
+ readonly batchTokens: {
4371
+ readonly type: "integer";
4372
+ readonly default: 2560;
4373
+ readonly label: {
4374
+ readonly en: "How much chat each batch holds";
4375
+ };
4376
+ readonly description: {
4377
+ readonly en: "Tokens of chat one summary draft is written from. Capped by the drafting step’s Context Tokens, less room for the prompt and the draft itself.";
4378
+ };
4379
+ };
4380
+ readonly minBatchMessages: {
4381
+ readonly type: "integer";
4382
+ readonly default: 1;
4383
+ readonly description: "Never cut a batch smaller than this many messages.";
4384
+ };
4385
+ };
4386
+ };
4387
+ } | undefined;
4388
+ }>;
4389
+ };
3973
4390
  /** @experimental */
3974
4391
  export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
3975
4392
  main: string;
@@ -3980,8 +4397,8 @@ export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-
3980
4397
  changes: string;
3981
4398
  scope: string;
3982
4399
  /**
3983
- * The **state version** the changes are deltas against (plans/29
3984
- * R-15 *Staleness and order*; U5f) — the session-state query's
4400
+ * The **state version** the changes are deltas against — the
4401
+ * session-state query's
3985
4402
  * `version`, for every change that does not carry its own
3986
4403
  * `base`. In `apply` mode a base behind the current version is
3987
4404
  * **rebased**: a change whose slot is untouched since the base
@@ -3994,8 +4411,8 @@ export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-
3994
4411
  */
3995
4412
  base: string;
3996
4413
  /**
3997
- * **The row the WORLD's changes are filed at** (lair pass R8,
3998
- * 2026-09-28): a message this run wrote earlier, as that
4414
+ * **The row the WORLD's changes are filed at** (2026-09-28): a
4415
+ * message this run wrote earlier, as that
3999
4416
  * write's result. Optional, and only for world-owned changes
4000
4417
  * (the session and its places); a cast member's change still
4001
4418
  * files at that member's own latest line (the turn lock).
@@ -4042,12 +4459,12 @@ export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-
4042
4459
  } | undefined;
4043
4460
  }>;
4044
4461
  /**
4045
- * A room name, unless something already describes it (lair pass R7,
4046
- * 2026-09-28; replaced `core:task/unlisted-name@1`).
4462
+ * A room name, unless something already describes it (2026-09-28; replaced
4463
+ * `core:task/unlisted-name@1`).
4047
4464
  *
4048
4465
  * The Lair's planner names the room the party are about to walk into when it
4049
4466
  * thinks nobody has built it, and the turn stops to ask the dungeon's master
4050
- * to describe it (owner ruling 2, 2026-09-28: *ask, unless it is already
4467
+ * to describe it (owner ruling, 2026-09-28: *ask, unless it is already
4051
4468
  * described in prose or the lorebook*). This is the deterministic check after
4052
4469
  * the planner's judgement. Lookups, in order; the first hit wins:
4053
4470
  *
@@ -4076,7 +4493,7 @@ export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-
4076
4493
  * hard-codes a genre's slug: a spec that wants a side channel's prose to count
4077
4494
  * reads it and names it here.
4078
4495
  *
4079
- * ## Which room is this one (places plan B6, 2026-09-29)
4496
+ * ## Which room is this one (2026-09-29)
4080
4497
  *
4081
4498
  * The same lookup answers the Lair's other question: *which room do the party
4082
4499
  * stand in?* — the world's `location` stat, resolved against the rooms, so
@@ -4092,7 +4509,7 @@ export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-
4092
4509
  * find a namesake. So a value with an `entryId` is answered by the listed
4093
4510
  * entry with that id (`describedBy` `entry`), and by nothing when no
4094
4511
  * listing holds it — archived, or hidden from this read.
4095
- * - **`fallbackName`** (plan A27, 2026-09-30): what to look for when `name`
4512
+ * - **`fallbackName`** (2026-09-30): what to look for when `name`
4096
4513
  * (at `path`) names nothing — for the Lair, the room its planner said the
4097
4514
  * party stood in as they knocked (the knock's `vantage`). The world's
4098
4515
  * value wins and the hint stands in only while it names nothing: the
@@ -4119,7 +4536,7 @@ export declare const undescribedName: import("@serene-pub/sdk").Pinned<import("@
4119
4536
  * `value`), or a document holding it at `path`; anything but a
4120
4537
  * string is no name, and nothing is undescribed — save a lore
4121
4538
  * reference (`{ entryId }`), which is the listed entry it
4122
- * references (B6).
4539
+ * references.
4123
4540
  */
4124
4541
  name: string;
4125
4542
  /**
@@ -4187,8 +4604,8 @@ export declare const undescribedName: import("@serene-pub/sdk").Pinned<import("@
4187
4604
  };
4188
4605
  };
4189
4606
  /**
4190
- * Where the name is inside `name`, as a dotted path (places
4191
- * plan B6) — the Lair reads `world.location` off a
4607
+ * Where the name is inside `name`, as a dotted path — the
4608
+ * Lair reads `world.location` off a
4192
4609
  * session-state document. Empty reads `name` itself.
4193
4610
  */
4194
4611
  readonly path: {
@@ -4243,8 +4660,9 @@ export declare const undescribedName: import("@serene-pub/sdk").Pinned<import("@
4243
4660
  *
4244
4661
  * A spec wires `$.input.sessionScope` (or a literal) — something durable. The
4245
4662
  * run's seed is a different string every turn and a pick keyed on it would
4246
- * move between two questions. It is `scopeKey` and not `key` (R3, named
4247
- * 2026-09-17, before anything shipped): *key* alone is the option key on a
4663
+ * move between two questions. It is `scopeKey` and not `key` (a qualified
4664
+ * name, never the bare noun; named 2026-09-17, before anything shipped):
4665
+ * *key* alone is the option key on a
4248
4666
  * choice, the identity a candidate is scored under, and a settings field's
4249
4667
  * name, and this port is none of them — it is the scope the pick is made
4250
4668
  * within.
@@ -4264,7 +4682,7 @@ export declare const pickByHash: import("@serene-pub/sdk").Pinned<import("@seren
4264
4682
  /**
4265
4683
  * Where it sat in the list **as handed in**, not among the
4266
4684
  * identifiable entries. `pickIndex` rather than `index`
4267
- * (R3): a bare *index* is a database index, a message's
4685
+ * (qualified, never the bare noun): a bare *index* is a database index, a message's
4268
4686
  * position and a list offset all at once.
4269
4687
  */
4270
4688
  pickIndex: string;
@@ -4343,7 +4761,7 @@ export declare const pickByHash: import("@serene-pub/sdk").Pinned<import("@seren
4343
4761
  *
4344
4762
  * ## The key is a participant reference
4345
4763
  *
4346
- * `character:<id>`, the reference vocabulary (R-18 (3)) — not a name, which
4764
+ * `character:<id>`, the reference vocabulary — not a name, which
4347
4765
  * two cast members can share and an author can edit, and not a bare id, which
4348
4766
  * says nothing about what it identifies. It survives the round trip: the key
4349
4767
  * lands on the pressed option, `core:task/read-answer@1` publishes it as
@@ -4408,7 +4826,7 @@ export declare const castChoices: import("@serene-pub/sdk").Pinned<import("@sere
4408
4826
  /**
4409
4827
  * Which half of the room to leave out.
4410
4828
  *
4411
- * A persona is a character the player voices (0132), so
4829
+ * A persona is a character the player voices, so
4412
4830
  * both halves are cast members and which one a question
4413
4831
  * is about depends entirely on the question: *who do you
4414
4832
  * accuse* is asked about the suspects and must not offer
@@ -4457,7 +4875,7 @@ export declare const castChoices: import("@serene-pub/sdk").Pinned<import("@sere
4457
4875
  * ## The gap it closes
4458
4876
  *
4459
4877
  * A junction branches on **one** port, and `equalsPath` compares two paths of
4460
- * **one** document (D-4a). So the grammar can ask *is the accused the culprit?*
4878
+ * **one** document. So the grammar can ask *is the accused the culprit?*
4461
4879
  * only once something has put the accused and the culprit in the same
4462
4880
  * document, and nothing in core did: no task merged two json ports, and the
4463
4881
  * obvious repair — a second in-port on the junction — is not a repair, it is a
@@ -4541,4 +4959,832 @@ export declare const pair: import("@serene-pub/sdk").Pinned<import("@serene-pub/
4541
4959
  };
4542
4960
  } | undefined;
4543
4961
  }>;
4962
+ /**
4963
+ * 🚧 Each picture, with its background removed — a **cut-out**.
4964
+ *
4965
+ * The step after `core:oracle/generate-image@1` when the pair could not draw a
4966
+ * transparent background itself (`cutOut: native-or-task`). The host runs a
4967
+ * local matting model (BiRefNet-lite, ONNX) over each picture and stores the
4968
+ * result as a new PNG with an alpha channel; the source picture is left as it
4969
+ * was.
4970
+ *
4971
+ * ## Same list in, same list out
4972
+ *
4973
+ * One item out per item in, in order. An item that was cut out is replaced by
4974
+ * a reference to its cut-out; every other field the item carried — its series
4975
+ * `key` included — travels across unchanged, so a keyed outlet downstream
4976
+ * files each cut-out under the label it was drawn for. An item that is not an
4977
+ * image passes through untouched.
4978
+ *
4979
+ * ## `mode`
4980
+ *
4981
+ * - `auto` (default) skips a picture that already has a transparent
4982
+ * background: its media meta says `transparent: 'native'` (the pair drew
4983
+ * it), it is itself a cut-out (`cutOutOf`), or its pixels already carry
4984
+ * transparency.
4985
+ * - `always` cuts every picture out, whatever it says about itself.
4986
+ * - `off` hands the list on unchanged — the switch a spec author flips to see
4987
+ * the raw pictures without rewiring.
4988
+ *
4989
+ * Pure given its input: the same pictures make the same cut-outs (the media
4990
+ * store dedupes identical bytes). The first run on a machine downloads the
4991
+ * matting model once, which is why the timeout is idle rather than wall.
4992
+ * @experimental
4993
+ */
4994
+ export declare const cutOut: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
4995
+ main: string;
4996
+ media: string;
4997
+ }, {
4998
+ media: string;
4999
+ }, "core:task/cut-out@1"> & {
5000
+ kind: 'task';
5001
+ slots?: {
5002
+ readonly params: {
5003
+ readonly kind: "parameters";
5004
+ readonly schema: {
5005
+ readonly mode: {
5006
+ readonly type: "enum";
5007
+ readonly of: readonly ["auto", "always", "off"];
5008
+ readonly members: readonly [{
5009
+ readonly key: "auto";
5010
+ readonly label: {
5011
+ readonly en: "When needed";
5012
+ };
5013
+ readonly description: {
5014
+ readonly en: "Skips pictures that already have a transparent background.";
5015
+ };
5016
+ }, {
5017
+ readonly key: "always";
5018
+ readonly label: {
5019
+ readonly en: "Always";
5020
+ };
5021
+ readonly description: {
5022
+ readonly en: "Cuts every picture out, even one that is already transparent.";
5023
+ };
5024
+ }, {
5025
+ readonly key: "off";
5026
+ readonly label: {
5027
+ readonly en: "Off";
5028
+ };
5029
+ readonly description: {
5030
+ readonly en: "Hands the pictures on unchanged.";
5031
+ };
5032
+ }];
5033
+ readonly default: "auto";
5034
+ readonly quick: true;
5035
+ readonly description: "Which pictures get their background removed.";
5036
+ };
5037
+ };
5038
+ };
5039
+ } | undefined;
5040
+ }>;
5041
+ /**
5042
+ * 🚧 The pictures a **Sprite set fill** asks for — one image series item per
5043
+ * sprite label.
5044
+ *
5045
+ * Each item is `{ key, vars }`:
5046
+ *
5047
+ * - `key` is the label made filename-safe (trimmed, case-folded, spaces to
5048
+ * `-`, anything else dropped, collisions suffixed `joy`, `joy-2`). A key
5049
+ * is an address, never prose: the picture's description comes from
5050
+ * `vars.labelPhrase`, never from the key.
5051
+ * - `vars.label` is the sprite label as the card spells it, which is what
5052
+ * `core:outlet/attach-sprite@1` files the picture under.
5053
+ * - `vars.labelPhrase` is the label's **sprite label phrase** — the
5054
+ * `phrases` prompt field, one `label: phrase` per line (*Sprite label
5055
+ * phrases*, editable like any prompt row). A label with no line falls back
5056
+ * to the label word itself.
5057
+ * - `vars.likeness` / `vars.likenessNegative` carry the card's likeness, so
5058
+ * the picture step's prompt rows can say `{{likeness}}` per item.
5059
+ *
5060
+ * The phrases and the sprite picker's labels stay two vocabularies, never
5061
+ * merged: the picker never reads a phrase. Pure given its input — no read, no call.
5062
+ * @experimental
5063
+ */
5064
+ export declare const buildSpriteSeries: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5065
+ main: string;
5066
+ series: string;
5067
+ /** The labels kept, in order — blanks and repeats dropped. */
5068
+ labels: string;
5069
+ }, {
5070
+ /** The sprite labels to draw, as the card spells them. */
5071
+ labels: string;
5072
+ likeness: string;
5073
+ likenessNegative: string;
5074
+ }, "core:task/build-sprite-series@1"> & {
5075
+ kind: 'task';
5076
+ slots?: {
5077
+ readonly prompts: {
5078
+ readonly kind: "prompts";
5079
+ readonly quick: true;
5080
+ readonly facet: "prompts";
5081
+ readonly description: "How each sprite label is described to the picture model: one \"label: phrase\" per line.";
5082
+ readonly fields: {
5083
+ readonly phrases: {
5084
+ readonly type: "text";
5085
+ };
5086
+ };
5087
+ };
5088
+ } | undefined;
5089
+ }>;
5090
+ /**
5091
+ * 🚧 **Proofs** — *n* identical pictures to choose from, as an image
5092
+ * series. A photographer's proof prints: the
5093
+ * same shot several times, one kept. Not a retrieval **candidate**, which is
5094
+ * something that might reach a prompt.
5095
+ *
5096
+ * Each item is `{ key, vars: {} }` with keys `"1"` … `"n"`: the same picture
5097
+ * asked for *n* times, so every item renders the same prompt. That sameness
5098
+ * is what lets the host pack the series as ONE batch call on a pair whose
5099
+ * drawing sheet takes `perCall ≥ n` (a hosted API's `n`, a ComfyUI graph's
5100
+ * batch size); a pair that draws one picture per call loops. The spec never
5101
+ * knows which.
5102
+ *
5103
+ * `count` is read as a whole number and clamped to 1–8 (the default
5104
+ * `seriesMax`); anything that is not a number is 1. The Portrait form offers
5105
+ * 1–4. Pure given its input — no read, no call.
5106
+ * @experimental
5107
+ */
5108
+ export declare const buildProofs: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5109
+ main: string;
5110
+ series: string;
5111
+ }, {
5112
+ /** How many pictures: a whole number, clamped to 1–8. */
5113
+ count: string;
5114
+ }, "core:task/build-proofs@1"> & {
5115
+ kind: 'task';
5116
+ slots?: Record<string, SlotDecl> | undefined;
5117
+ }>;
5118
+ /**
5119
+ * 🚧 A model's reply, cleaned into a picture prompt — the step between the
5120
+ * Scene action's **scene prompt** (a quiet text call asked for a tag list)
5121
+ * and the picture step.
5122
+ *
5123
+ * A text model asked for "a comma-separated tag list and nothing else"
5124
+ * still answers with a fence, a `Prompt:` label, quotes round the whole
5125
+ * line or a list one tag per line. Each is undone here: fences and the
5126
+ * label dropped, wrapping quotes stripped, line breaks and bullets turned
5127
+ * into commas, empty tags and repeated commas and spaces collapsed, a
5128
+ * trailing full stop removed. Prose survives as prose — only its line
5129
+ * breaks become commas. Pure: no read, no model.
5130
+ *
5131
+ * An empty result halts: a picture of nothing is not a picture.
5132
+ * @experimental
5133
+ */
5134
+ export declare const cleanImagePrompt: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5135
+ main: string;
5136
+ prompt: string;
5137
+ }, {
5138
+ text: string;
5139
+ }, "core:task/clean-image-prompt@1"> & {
5140
+ kind: 'task';
5141
+ slots?: Record<string, SlotDecl> | undefined;
5142
+ }>;
5143
+ /**
5144
+ * 🚧 Where the Scene action's picture goes — its **placement**: posted as a
5145
+ * message, set as the session's backdrop, or both.
5146
+ *
5147
+ * The `placement` parameter is the admin's (Admin › Pipelines, the Scene
5148
+ * pipeline's config); a press may name its own in its payload
5149
+ * (`{ placement: 'backdrop' }` — the Backdrop widget's *Illustrate*), and a
5150
+ * named one wins. Published as two flags, `message` and `backdrop`, because
5151
+ * a junction branch reads one truthy value: each outlet sits behind its own.
5152
+ * Pure: no read, no model.
5153
+ * @experimental
5154
+ */
5155
+ export declare const picturePlacement: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5156
+ main: string;
5157
+ /** `message`, `backdrop` or `both` — what was decided. */
5158
+ placement: string;
5159
+ /** True when the picture is posted as a message. */
5160
+ message: string;
5161
+ /** True when the picture is set as the backdrop. */
5162
+ backdrop: string;
5163
+ }, {
5164
+ /** The press's payload; its `placement`, when one of the three, wins. */
5165
+ payload: string;
5166
+ }, "core:task/picture-placement@1"> & {
5167
+ kind: 'task';
5168
+ slots?: {
5169
+ readonly params: {
5170
+ readonly kind: "parameters";
5171
+ readonly facet: "behavior";
5172
+ readonly schema: {
5173
+ readonly placement: {
5174
+ readonly type: "enum";
5175
+ readonly of: readonly ["message", "backdrop", "both"];
5176
+ readonly members: readonly [{
5177
+ readonly key: "message";
5178
+ readonly label: {
5179
+ readonly en: "Post it";
5180
+ };
5181
+ readonly description: {
5182
+ readonly en: "Posts the picture in the session as a message.";
5183
+ };
5184
+ }, {
5185
+ readonly key: "backdrop";
5186
+ readonly label: {
5187
+ readonly en: "Backdrop";
5188
+ };
5189
+ readonly description: {
5190
+ readonly en: "Sets the picture as the session's backdrop, and posts nothing.";
5191
+ };
5192
+ }, {
5193
+ readonly key: "both";
5194
+ readonly label: {
5195
+ readonly en: "Both";
5196
+ };
5197
+ readonly description: {
5198
+ readonly en: "Posts the picture and sets it as the backdrop.";
5199
+ };
5200
+ }];
5201
+ readonly default: "both";
5202
+ readonly label: {
5203
+ readonly en: "Placement";
5204
+ };
5205
+ readonly description: "Where the picture goes. A press that names its own placement uses that.";
5206
+ };
5207
+ };
5208
+ };
5209
+ } | undefined;
5210
+ }>;
5211
+ /**
5212
+ * 🚧 A **clock step**: how far the story clock moves, decided — `{ by, unit }`
5213
+ * and whether it moves at all (2026-10-13, PROPOSAL-live-scenes §6).
5214
+ *
5215
+ * Two uses, one shape. *Time passes…* hands it the press's collected
5216
+ * `step` (`input.clockStep`), which wins. Chat's reply hands it nothing and
5217
+ * reads its own parameters — **By** (0, the default, is off) and **Unit** —
5218
+ * exposed as the session setting *Each reply advances the clock by …*. Either
5219
+ * way the step publishes `moves` (true when `by` is a whole number other than
5220
+ * zero), and the *Advance story clock* outlet sits behind a junction on it,
5221
+ * so a step of nothing is never written and never refused. Pure: no read, no
5222
+ * model, never the clock itself.
5223
+ * @experimental
5224
+ */
5225
+ export declare const clockStep: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5226
+ main: string;
5227
+ /** True when the clock moves: `by` is a whole number other than zero. */
5228
+ moves: string;
5229
+ /** The signed amount — what *Advance story clock* takes on its `by` port. */
5230
+ by: string;
5231
+ /** The unit — what *Advance story clock* takes on its `unit` port. */
5232
+ unit: string;
5233
+ }, {
5234
+ /** A collected step, `{ by, unit }` — wins over the parameters when it reads. */
5235
+ step: string;
5236
+ /**
5237
+ * When truthy, the clock does not move (`moves` false). Chat's
5238
+ * reply wires the row it re-drives (`input.messageId`), so a
5239
+ * regenerate, a swipe or an extend never ticks the clock twice.
5240
+ */
5241
+ unless: string;
5242
+ }, "core:task/clock-step@1"> & {
5243
+ kind: 'task';
5244
+ slots?: {
5245
+ readonly params: {
5246
+ readonly kind: "parameters";
5247
+ readonly facet: "behavior";
5248
+ readonly schema: {
5249
+ readonly by: {
5250
+ readonly type: "integer";
5251
+ readonly default: 0;
5252
+ readonly label: {
5253
+ readonly en: "By";
5254
+ };
5255
+ readonly description: {
5256
+ readonly en: "How many units the clock moves. 0 moves nothing; negative goes back.";
5257
+ };
5258
+ };
5259
+ readonly unit: {
5260
+ readonly type: "enum";
5261
+ readonly of: readonly ["minutes", "hours", "days", "months", "years"];
5262
+ readonly members: readonly [{
5263
+ readonly key: "minutes";
5264
+ readonly label: {
5265
+ readonly en: "Minutes";
5266
+ };
5267
+ }, {
5268
+ readonly key: "hours";
5269
+ readonly label: {
5270
+ readonly en: "Hours";
5271
+ };
5272
+ }, {
5273
+ readonly key: "days";
5274
+ readonly label: {
5275
+ readonly en: "Days";
5276
+ };
5277
+ }, {
5278
+ readonly key: "months";
5279
+ readonly label: {
5280
+ readonly en: "Months";
5281
+ };
5282
+ }, {
5283
+ readonly key: "years";
5284
+ readonly label: {
5285
+ readonly en: "Years";
5286
+ };
5287
+ }];
5288
+ readonly default: "minutes";
5289
+ readonly label: {
5290
+ readonly en: "Unit";
5291
+ };
5292
+ readonly description: {
5293
+ readonly en: "What to count.";
5294
+ };
5295
+ };
5296
+ };
5297
+ };
5298
+ } | undefined;
5299
+ }>;
5300
+ /**
5301
+ * **Run a script** — the script step (2026-10-12).
5302
+ *
5303
+ * The node itself does nothing: it passes its input through to `main`, and
5304
+ * the `core:script:data/transform@1` scripts attached after `main` transform
5305
+ * it in order, each handed the value the one before returned. That is what
5306
+ * lets an admin write a custom task in-app without a plugin — the body is a
5307
+ * sandboxed script, the contract is JSON in, JSON out.
5308
+ * @experimental
5309
+ */
5310
+ export declare const runScript: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5311
+ main: string;
5312
+ }, {
5313
+ input: string;
5314
+ }, "core:task/run-script@1"> & {
5315
+ kind: 'task';
5316
+ slots?: {
5317
+ readonly scripts: {
5318
+ readonly kind: "scripts";
5319
+ readonly accepts: ["core:script:data/transform@1"];
5320
+ readonly port: "main";
5321
+ readonly phase: "after";
5322
+ readonly description: "The script, or scripts, this step runs over its input. Each is handed the value the one before returned.";
5323
+ };
5324
+ /**
5325
+ * The time each script in the chain may take.
5326
+ * Read by the HOST's script applier off the scope chain, not by the
5327
+ * binding — the binding never sees the chain. A script past it is
5328
+ * stopped and recorded `err` with the time in its reason, and 🚧 the
5329
+ * step HALTS with that reason (2026-10-19): a script step's answer
5330
+ * is its script's, and handing its own input on as that answer
5331
+ * reached the next step as nonsense. Unset, the seam default
5332
+ * applies (the same 250 ms).
5333
+ */
5334
+ readonly params: {
5335
+ readonly kind: "parameters";
5336
+ readonly facet: "weights";
5337
+ readonly schema: {
5338
+ readonly budgetMs: {
5339
+ readonly type: "integer";
5340
+ readonly min: 1;
5341
+ readonly max: 1000;
5342
+ readonly default: 250;
5343
+ readonly label: {
5344
+ readonly en: "Script time limit (ms)";
5345
+ };
5346
+ readonly description: {
5347
+ readonly en: "How long each script in this step may run. A script that runs longer is stopped, and the step stops with it.";
5348
+ };
5349
+ };
5350
+ };
5351
+ };
5352
+ } | undefined;
5353
+ }>;
5354
+ /**
5355
+ * 🚧 **Resolve a ruleset** — the one handler every genre calls to read and
5356
+ * apply a session's ruleset (rulesets programme, P1 contract stub).
5357
+ *
5358
+ * Ruleset-agnostic: it reads whichever ruleset the session has from the
5359
+ * registry (`defineRuleset`), at the rigour it is handed, in a fixed phase
5360
+ * order (base → piece effects → derived → bridges → prose render). A genre's
5361
+ * spec supplies only the moment:
5362
+ *
5363
+ * · `resolve` — before a model call: labelled prompt blocks and the facts a
5364
+ * step may need. No dice.
5365
+ * · `apply` — after the model proposes: validates the `deltas`, rolls what
5366
+ * must be rolled (seeded — hence `declaresRandomness`), and returns the
5367
+ * outcomes, the explain trace and the deltas it refused.
5368
+ * · `advance` — `apply` with no deltas and an `elapsed` amount (a rest, a
5369
+ * journey, a scene break).
5370
+ *
5371
+ * `blocks` is a record of labelled variables — `voice`, `sheet`, `pieces`,
5372
+ * `ties`, `outcomes`, `custom` — which a context template places by name;
5373
+ * the handler never writes into a prompt itself. `explain` is for receipts
5374
+ * and ledgers, never a prompt. Bound by the app since 2026-10-17 (no longer
5375
+ * provisional — the Dungeon Crawler create spec seeds it).
5376
+ * @experimental
5377
+ */
5378
+ export declare const rulesetResolve: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5379
+ /** Labelled variables: `voice`, `sheet`, `pieces`, `ties`, `outcomes`, `custom`. */
5380
+ blocks: string;
5381
+ /** What a step may need: targets, what is equipped, what is allowed this turn. */
5382
+ facts: string;
5383
+ /** `apply` / `advance`: rolls, degrees and totals, each with its origins. */
5384
+ outcomes: string;
5385
+ /** How each number was reached — for receipts and ledgers, never a prompt. */
5386
+ explain: string;
5387
+ /** Proposed changes the mechanics refused, with why — review items, never silent corrections. */
5388
+ rejected: string;
5389
+ /**
5390
+ * 🚧 D7 (2026-10-23): the JSON Schema a reply that carries changes
5391
+ * answers against — `{ message, changes }`, built from the
5392
+ * session's ruleset (`facts.replySchema`) — when the step's
5393
+ * `actions` asked for it (`{ replyShape: true }`); else null.
5394
+ */
5395
+ replySchema: string;
5396
+ }, {
5397
+ /**
5398
+ * The session the call reads — its ruleset, setting values and
5399
+ * owners when `owners` names none. Added 2026-10-16 (W3-S) so a
5400
+ * call that is not handed owners still knows its session; `@1`
5401
+ * evolves in place.
5402
+ */
5403
+ scope: string;
5404
+ /** The owners resolved this turn — the acting cast, the scene's place. */
5405
+ owners: string;
5406
+ /** `prose`, `mechanics` or `scripts`; else the session's rigour. */
5407
+ rigour: string;
5408
+ /**
5409
+ * `resolve`, `apply` or `advance` — or 🚧 `propose` (lane 2,
5410
+ * 2026-10-19): `apply` whose every change is filed for review
5411
+ * (`state_proposals`) rather than applied, for a task on Review.
5412
+ */
5413
+ mode: string;
5414
+ /** The turn's declared actions — what selects the pieces in play. */
5415
+ actions: string;
5416
+ /** `apply`: the changes the model proposed, to validate. */
5417
+ deltas: string;
5418
+ /** `advance` (or `apply`): story time passed, in the ruleset's unit. */
5419
+ elapsed: string;
5420
+ /**
5421
+ * 🚧 **Whose eyes** the blocks are for (2026-10-17): a participant
5422
+ * reference, or `gm` for the game-master-facing step. Decides
5423
+ * what a repertoire's `earshot` and `gmOnly` let into `blocks` —
5424
+ * a holder's own pieces into their voice, the creatures a
5425
+ * player never reads into the Narrator's. Unwired: everyone's
5426
+ * view, which carries nothing marked for the holder or the GM.
5427
+ */
5428
+ viewer: string;
5429
+ /**
5430
+ * 🚧 D3 (2026-10-23): the event that woke the step — `{ id,
5431
+ * payload }` — when a registration or routine runs it on one;
5432
+ * what a function's handler reads as `ctx.event`. Unwired: none.
5433
+ */
5434
+ event: string;
5435
+ }, "core:task/ruleset-resolve@1"> & {
5436
+ kind: 'task';
5437
+ slots?: {
5438
+ readonly params: {
5439
+ readonly kind: "parameters";
5440
+ readonly facet: "behavior";
5441
+ readonly schema: {
5442
+ /**
5443
+ * 🚧 D3 (2026-10-23): whether the events this step's
5444
+ * functions raise are emitted after the run's receipt. Off:
5445
+ * they are reported on `facts` and never emitted. The
5446
+ * pipeline's own switch (`SpecDocument.functionEvents`)
5447
+ * turns off every step's at once.
5448
+ */
5449
+ readonly emits: {
5450
+ readonly type: "boolean";
5451
+ readonly default: true;
5452
+ readonly label: {
5453
+ readonly en: "Emit what its functions raise";
5454
+ };
5455
+ readonly description: {
5456
+ readonly en: "The events the ruleset's functions raise in this step are emitted once the run is saved. Off: they are only reported.";
5457
+ };
5458
+ };
5459
+ };
5460
+ };
5461
+ } | undefined;
5462
+ }>;
5463
+ /**
5464
+ * 🚧 **What a reply reads** (PLAN-layering §4, R1, A6; 2026-10-20) — the
5465
+ * reply's own duties, a switch each, read where the reply branches: *Read the
5466
+ * lorebook* gates what retrieval hands the ranker, *Read the scene* gates
5467
+ * what the context builder is told about where the story is. Neither costs a
5468
+ * call. 🚧 *Replies carry changes* (PLAN-rulesets-functions D7, R7;
5469
+ * 2026-10-23; off): the reply is one JSON object — its words and what the
5470
+ * scene changed of the rules' attributes and entries — and the rules apply
5471
+ * the changes (owner ruling 2026-10-23: no review of a reply's changes; how
5472
+ * strict the rules are and the lore write modes decide what lands, and a
5473
+ * replaced reply's changes go with it). Publishes `modes` keyed `lore-retrieval`,
5474
+ * `scene-reading` and `reply-changes` (each `full` or `off`). Pure; no
5475
+ * model call.
5476
+ *
5477
+ * Was the reply group of the retired background tasks (`resolve-tasks@1`):
5478
+ * a reply's settings belong to the reply (A6), so a preset that swaps the
5479
+ * reply for another shows that one's settings instead (§5).
5480
+ * @experimental
5481
+ */
5482
+ export declare const replyDuties: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5483
+ main: string;
5484
+ /** `{ [duty key]: 'full' | 'review' | 'off' }`, keyed as the steps that read them name them. */
5485
+ modes: string;
5486
+ /** True when any duty is on — the routine has something to do. */
5487
+ any: string;
5488
+ }, {
5489
+ /**
5490
+ * The routine's firing (`core:inlet/routine@1`'s `routine` port) — its
5491
+ * `mode` is what an on duty runs at: `full` applies, `review` holds
5492
+ * each write for the owner. Unwired (a reply's duties): `full`.
5493
+ */
5494
+ routine: string;
5495
+ }, "core:task/reply-duties@1"> & {
5496
+ kind: 'task';
5497
+ slots?: {
5498
+ readonly params: {
5499
+ readonly kind: "parameters";
5500
+ readonly facet: "behavior";
5501
+ readonly schema: {
5502
+ lore: {
5503
+ type: 'boolean';
5504
+ default: boolean;
5505
+ reach: 'owner';
5506
+ label: {
5507
+ en: string;
5508
+ };
5509
+ description: {
5510
+ en: string;
5511
+ };
5512
+ };
5513
+ scene: {
5514
+ type: 'boolean';
5515
+ default: boolean;
5516
+ reach: 'owner';
5517
+ label: {
5518
+ en: string;
5519
+ };
5520
+ description: {
5521
+ en: string;
5522
+ };
5523
+ };
5524
+ changes: {
5525
+ type: 'boolean';
5526
+ default: boolean;
5527
+ reach: 'owner';
5528
+ label: {
5529
+ en: string;
5530
+ };
5531
+ description: {
5532
+ en: string;
5533
+ };
5534
+ };
5535
+ };
5536
+ };
5537
+ } | undefined;
5538
+ }>;
5539
+ /**
5540
+ * 🚧 **Note what changed** (PLAN-layering §4, R5, R37; 2026-10-20; titled by
5541
+ * the routine's name since 2026-10-23, PLAN-genres-seams S7 — was *What the
5542
+ * reckoning keeps*) — the duties of a reckoning routine (Story's
5543
+ * `core:spec/story-reckoning`; the Lair's keeper titles its own card):
5544
+ * one JSON call after a turn or a round that notes what the story made true.
5545
+ * Each duty is a switch; the routine's mode decides whether what an on duty
5546
+ * finds is applied (`full`) or held for review (`review`). Publishes `modes`
5547
+ * keyed `attributes`, `conditions`, `time`, `places-on-move`, `timed-expiry`
5548
+ * — the keys the reckoning's scripts and junctions read — and `any`.
5549
+ *
5550
+ * *End what runs out* (`timed-expiry`) and *Track conditions* are also what
5551
+ * the ruleset handler's expiry reads (the host, lane 6). A duty that writes
5552
+ * a lorebook (*Describe new places*) reads Off in a session with none.
5553
+ * Pure; no model call.
5554
+ * @experimental
5555
+ */
5556
+ export declare const reckoningDuties: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5557
+ main: string;
5558
+ /** `{ [duty key]: 'full' | 'review' | 'off' }`, keyed as the steps that read them name them. */
5559
+ modes: string;
5560
+ /** True when any duty is on — the routine has something to do. */
5561
+ any: string;
5562
+ }, {
5563
+ /**
5564
+ * The routine's firing (`core:inlet/routine@1`'s `routine` port) — its
5565
+ * `mode` is what an on duty runs at: `full` applies, `review` holds
5566
+ * each write for the owner. Unwired (a reply's duties): `full`.
5567
+ */
5568
+ routine: string;
5569
+ }, "core:task/reckoning-duties@1"> & {
5570
+ kind: 'task';
5571
+ slots?: {
5572
+ readonly params: {
5573
+ readonly kind: "parameters";
5574
+ readonly facet: "behavior";
5575
+ readonly schema: {
5576
+ attributes: {
5577
+ type: 'boolean';
5578
+ default: boolean;
5579
+ reach: 'owner';
5580
+ label: {
5581
+ en: string;
5582
+ };
5583
+ description: {
5584
+ en: string;
5585
+ };
5586
+ };
5587
+ conditions: {
5588
+ type: 'boolean';
5589
+ default: boolean;
5590
+ reach: 'owner';
5591
+ label: {
5592
+ en: string;
5593
+ };
5594
+ description: {
5595
+ en: string;
5596
+ };
5597
+ };
5598
+ time: {
5599
+ type: 'boolean';
5600
+ default: boolean;
5601
+ reach: 'owner';
5602
+ label: {
5603
+ en: string;
5604
+ };
5605
+ description: {
5606
+ en: string;
5607
+ };
5608
+ };
5609
+ placesOnMove: {
5610
+ type: 'boolean';
5611
+ default: boolean;
5612
+ reach: 'owner';
5613
+ label: {
5614
+ en: string;
5615
+ };
5616
+ description: {
5617
+ en: string;
5618
+ };
5619
+ };
5620
+ timedExpiry: {
5621
+ type: 'boolean';
5622
+ default: boolean;
5623
+ reach: 'owner';
5624
+ label: {
5625
+ en: string;
5626
+ };
5627
+ description: {
5628
+ en: string;
5629
+ };
5630
+ };
5631
+ };
5632
+ };
5633
+ } | undefined;
5634
+ }>;
5635
+ /**
5636
+ * 🚧 **Look back over the story** (PLAN-layering §4, R5, R37; 2026-10-20;
5637
+ * titled by the routine's name since 2026-10-23, S7 — was *What the sweep
5638
+ * files*) — the duties of a sweep routine (Story's `core:spec/story-sweep`): ONE batched
5639
+ * JSON call every few turns that looks back over the story and files what is
5640
+ * worth keeping. Each duty is a switch; the routine's mode decides whether
5641
+ * what it files is written (`full`) or held for review (`review`). Publishes
5642
+ * `modes` keyed `summary`, `lore`, `cast`, `relationships`, `world-state`,
5643
+ * `scenes`, `goals`, `goal-reached`, `scene-moved-on` — the keys the sweep's scripts and
5644
+ * junctions read — and `any`. Duties that write a lorebook read Off in a
5645
+ * session with none. *Mark goals reached* (`goal-reached`) is read by the
5646
+ * host when the goals note moves (lane 6). Pure; no model call.
5647
+ * @experimental
5648
+ */
5649
+ export declare const sweepDuties: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5650
+ main: string;
5651
+ /** `{ [duty key]: 'full' | 'review' | 'off' }`, keyed as the steps that read them name them. */
5652
+ modes: string;
5653
+ /** True when any duty is on — the routine has something to do. */
5654
+ any: string;
5655
+ /** 🚧 A \`JudgedSceneCheck\` (pass 7, R-i): what *Notice when the scene moves on* may judge this run — not due when the duty is Off or the host's conditions do not hold. */
5656
+ sceneCheck: string;
5657
+ }, {
5658
+ /**
5659
+ * The routine's firing (`core:inlet/routine@1`'s `routine` port) — its
5660
+ * `mode` is what an on duty runs at: `full` applies, `review` holds
5661
+ * each write for the owner. Unwired (a reply's duties): `full`.
5662
+ */
5663
+ routine: string;
5664
+ }, "core:task/sweep-duties@1"> & {
5665
+ kind: 'task';
5666
+ slots?: {
5667
+ readonly params: {
5668
+ readonly kind: "parameters";
5669
+ readonly facet: "behavior";
5670
+ readonly schema: {
5671
+ summary: {
5672
+ type: 'boolean';
5673
+ default: boolean;
5674
+ reach: 'owner';
5675
+ label: {
5676
+ en: string;
5677
+ };
5678
+ description: {
5679
+ en: string;
5680
+ };
5681
+ };
5682
+ lore: {
5683
+ type: 'boolean';
5684
+ default: boolean;
5685
+ reach: 'owner';
5686
+ label: {
5687
+ en: string;
5688
+ };
5689
+ description: {
5690
+ en: string;
5691
+ };
5692
+ };
5693
+ cast: {
5694
+ type: 'boolean';
5695
+ default: boolean;
5696
+ reach: 'owner';
5697
+ label: {
5698
+ en: string;
5699
+ };
5700
+ description: {
5701
+ en: string;
5702
+ };
5703
+ };
5704
+ relationships: {
5705
+ type: 'boolean';
5706
+ default: boolean;
5707
+ reach: 'owner';
5708
+ label: {
5709
+ en: string;
5710
+ };
5711
+ description: {
5712
+ en: string;
5713
+ };
5714
+ };
5715
+ worldState: {
5716
+ type: 'boolean';
5717
+ default: boolean;
5718
+ reach: 'owner';
5719
+ label: {
5720
+ en: string;
5721
+ };
5722
+ description: {
5723
+ en: string;
5724
+ };
5725
+ };
5726
+ scenes: {
5727
+ type: 'boolean';
5728
+ default: boolean;
5729
+ reach: 'owner';
5730
+ label: {
5731
+ en: string;
5732
+ };
5733
+ description: {
5734
+ en: string;
5735
+ };
5736
+ };
5737
+ goals: {
5738
+ type: 'boolean';
5739
+ default: boolean;
5740
+ reach: 'owner';
5741
+ label: {
5742
+ en: string;
5743
+ };
5744
+ description: {
5745
+ en: string;
5746
+ };
5747
+ };
5748
+ goalReached: {
5749
+ type: 'boolean';
5750
+ default: boolean;
5751
+ reach: 'owner';
5752
+ label: {
5753
+ en: string;
5754
+ };
5755
+ description: {
5756
+ en: string;
5757
+ };
5758
+ };
5759
+ sceneMovedOn: {
5760
+ type: 'boolean';
5761
+ default: boolean;
5762
+ reach: 'owner';
5763
+ label: {
5764
+ en: string;
5765
+ };
5766
+ description: {
5767
+ en: string;
5768
+ };
5769
+ };
5770
+ };
5771
+ };
5772
+ } | undefined;
5773
+ }>;
5774
+ /**
5775
+ * 🚧 What the **judged scene check** may judge this run (pass 7, R-i, sprint 2) — the sweep
5776
+ * duties step's `sceneCheck`, the host's answer: due, with the lane and the lines since the last
5777
+ * look (oldest first, each a message id the new scene may begin at, at most 20); or not due,
5778
+ * with why (a receipt note). Not due → *Notice when the scene moves on* reads Off for the run.
5779
+ * @experimental
5780
+ * @ruling R-i (2026-10-24)
5781
+ */
5782
+ export type JudgedSceneCheck = {
5783
+ readonly due: true;
5784
+ readonly channel: string;
5785
+ readonly lines: readonly number[];
5786
+ } | {
5787
+ readonly due: false;
5788
+ readonly why: string;
5789
+ };
4544
5790
  //# sourceMappingURL=tasks.d.ts.map