@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/queries.js CHANGED
@@ -77,7 +77,7 @@ export const sessionHistory = pin(describeQueryDefinition({
77
77
  *
78
78
  * ⚠ **Not read when `budget` is wired** (history window,
79
79
  * 2026-10-03): that read is sized by the context window,
80
- * which belongs to the sampling config (17 §1a) — a count
80
+ * which belongs to the sampling config — a count
81
81
  * of rows beside it is the same number entered twice, and
82
82
  * the count is what moved the prompt's first line on every
83
83
  * turn once a session passed it. Every shipped reply wires
@@ -91,7 +91,7 @@ export const sessionHistory = pin(describeQueryDefinition({
91
91
  description: 'How many recent messages are read. Not used where the read is sized by the context window — every shipped reply — which reads as much as the window could hold twice over and lets the prompt decide where the conversation starts.',
92
92
  },
93
93
  /**
94
- * The channel this history reads (20 §7). A session's
94
+ * The channel this history reads. A session's
95
95
  * lanes are the mode's declaration; a pipeline chooses
96
96
  * which one builds its context — the map narrator reads
97
97
  * `map`, the chat pipeline reads `main`, and a custom
@@ -103,7 +103,7 @@ export const sessionHistory = pin(describeQueryDefinition({
103
103
  description: "Which of the session's channels this history reads. The chat log is 'main'.",
104
104
  },
105
105
  /**
106
- * **Only the unplayed talk** (lair re-plan R13, 2026-09-28):
106
+ * **Only the unplayed talk** (2026-09-28):
107
107
  * the rows of a side channel written since the story's
108
108
  * newest generated line — the newest visible `main` row
109
109
  * whose role is not `user`. Of those it keeps a person's own
@@ -125,8 +125,7 @@ export const sessionHistory = pin(describeQueryDefinition({
125
125
  },
126
126
  },
127
127
  /**
128
- * **Side channels as talk** (lair re-plan R10's fold-in of
129
- * the R9 follow-up, 2026-09-28): on every channel but
128
+ * **Side channels as talk** (2026-09-28): on every channel but
130
129
  * `main`, keep only the talk — a person's own lines and the
131
130
  * replies a run fired ON that channel wrote there — by the
132
131
  * rule `unplayedOnly` uses, without its bound. A row a
@@ -148,16 +147,31 @@ export const sessionHistory = pin(describeQueryDefinition({
148
147
  en: "On every channel but 'main', read only what was said there: people's lines and the replies to them — never a greeting or a turn's notes.",
149
148
  },
150
149
  },
150
+ /**
151
+ * 🚧 **Table lines** (2026-10-15): the rows written as the
152
+ * table's own (`create-message@1`'s `tableLine` — a Dungeon
153
+ * Crawler roll line). On by default, so every spec reads
154
+ * what it always read; a spec whose brief already carries
155
+ * what those lines say turns them off, and says so here.
156
+ */
157
+ tableLines: {
158
+ type: 'boolean',
159
+ default: true,
160
+ label: { en: 'Read the table lines' },
161
+ description: {
162
+ en: "Include the table's own lines — roll lines and the like — in what this history reads. Off: only what was said.",
163
+ },
164
+ },
151
165
  /**
152
166
  * The transcript's intent, on the node that produces the
153
- * transcript (R-7 P5, built 2026-09-16 — see
167
+ * transcript (built 2026-09-16 — see
154
168
  * `bandIntentFields`). `weight: 0.4` and `minInclude: 6`
155
169
  * were here once, moved to the ranker's per-source map as
156
170
  * `share.messages` and `minEntries.messages`, and are back
157
- * where 16 §5a always said they belonged, at the numbers
171
+ * on the source, where a source's intent belongs, at the numbers
158
172
  * the map held: half the window is `MESSAGE_FILL_FRACTION`,
159
173
  * and six is the minimum the map carried for the one band
160
- * R6 allows one.
174
+ * allowed a minimum (recent conversation; lore has none).
161
175
  *
162
176
  * ⚠ **No shipped spec ranks a message candidate** —
163
177
  * `main` carries the transcript rows for
@@ -166,7 +180,7 @@ export const sessionHistory = pin(describeQueryDefinition({
166
180
  * keep it so: `entity-search`'s past lines publish on
167
181
  * their own `recalledLines` band, and `vector-search`
168
182
  * asks the index for lorebook entries only (the app's
169
- * binding names them; plan A1). Its intent
183
+ * binding names them). Its intent
170
184
  * still reaches the ranker, on the `band` out-port a spec
171
185
  * concatenates in with the lore, and its `share` is what
172
186
  * halves the pool the lore sources divide: the
@@ -209,7 +223,7 @@ export const sessionHistory = pin(describeQueryDefinition({
209
223
  },
210
224
  },
211
225
  /**
212
- * Read, at last (R-7 P5; it was declared and read by nothing
226
+ * Read, at last (it was declared and read by nothing
213
227
  * from the day it was written, allow-listed in the
214
228
  * declared-reads guard until this landed). `normal` is no
215
229
  * ordering at all; see `BAND_PRIORITIES` in the SDK for
@@ -248,12 +262,12 @@ export const sessionHistory = pin(describeQueryDefinition({
248
262
  *
249
263
  * Not read with `unplayedOnly` (the talk keeps its `limit`)
250
264
  * or a wired `messageId` (one row). There was a `budget`
251
- * in-port once (culled 2026-09-16, R-12): declared and read by
265
+ * in-port once (culled 2026-09-16): declared and read by
252
266
  * nothing. This one has a reader.
253
267
  */
254
268
  budget: S.budget,
255
269
  /**
256
- * **One row, by id** (lair re-plan R11, 2026-09-28): wired —
270
+ * **One row, by id** (2026-09-28): wired —
257
271
  * `$.input.messageId`, the message a press on a message's ⋮
258
272
  * was made on — the read is exactly that row, whatever its
259
273
  * channel, as a one-row transcript; `limit`, `budget`,
@@ -265,14 +279,28 @@ export const sessionHistory = pin(describeQueryDefinition({
265
279
  * carries the id, never the text, so the row is read here.
266
280
  */
267
281
  messageId: S.rowIds,
282
+ /**
283
+ * 🚧 **One channel lane, chosen at run time** (2026-10-15):
284
+ * wired — `$.input.channel`, the channel lane the turn was
285
+ * fired on — the read is exactly that channel lane, in place
286
+ * of the `channel` parameter. A bare slug here is its lane 1,
287
+ * never the whole channel: the run names the channel lane a
288
+ * row is on, and a channel lane is one conversation (`parley` is the owner's lane with the
289
+ * Planner, `parley:2` another player's — reading the slug
290
+ * would hand one player's private talk to another's reply).
291
+ * `limit`, `budget`, `unplayedOnly` and `talkOnly` apply as
292
+ * they would to the parameter. Unwired, the parameter is read.
293
+ * The Dungeon Crawler's Planner reads its player's lane so.
294
+ */
295
+ channelLane: S.text,
268
296
  },
269
297
  out: {
270
298
  /**
271
299
  * Transcript rows, on both — `messages@1` (was
272
- * `context-candidates@1` until 2026-09-17, U5d review W9: the
300
+ * `context-candidates@1` until 2026-09-17: the
273
301
  * value had always been rows, for `process-messages` and
274
302
  * `prose-transcript`, and the intent rides `band` alone).
275
- * Neither is a candidates list (R-a, the same day): a spec that
303
+ * Neither is a candidates list (ruled the same day): a spec that
276
304
  * wires either into a merge, a concat or `assemble`'s
277
305
  * `candidates` gets a `validate()` warning naming `band` — the
278
306
  * host drops rows handed as candidates rather than ranking them.
@@ -470,12 +498,12 @@ const ADMIT_THRESHOLD = {
470
498
  },
471
499
  };
472
500
  /**
473
- * Where a source's intent lives: **on the source** (16 §5a; R-7 P5, ruled
474
- * 2026-09-15, built 2026-09-16 — plans/30 U3b).
501
+ * Where a source's intent lives: **on the source** (ruled
502
+ * 2026-09-15, built 2026-09-16).
475
503
  *
476
504
  * `share`, `maxEntries`, `minEntries` and `priority` used to be five-band maps
477
- * on `core:task/rank-hybrid@1`. That was the design 16 §5a rejected and said
478
- * why: a per-source map on the ranker has to be kept in step by hand with
505
+ * on `core:task/rank-hybrid@1`. That design was rejected, and for this
506
+ * reason: a per-source map on the ranker has to be kept in step by hand with
479
507
  * whichever sources exist, goes silently stale when one is added, and a
480
508
  * plugin's retrieval definition cannot take part at all without somebody
481
509
  * editing the ranker. So each of the five retrieval definitions declares its
@@ -490,11 +518,11 @@ const ADMIT_THRESHOLD = {
490
518
  * that tuned nothing selects exactly what it selected before: `messages` 0.5
491
519
  * (which is `MESSAGE_FILL_FRACTION`), the three lore bands 0.1667 / 0.1667 /
492
520
  * 0.1666, relationships 0; ceilings 50 / 20 / 15 / 10 and none; a minimum of 6
493
- * on the conversation alone (R6). Migration 0135 moves every stored value to
521
+ * on the conversation alone. Migration 0135 moves every stored value to
494
522
  * the node that owns it now.
495
523
  *
496
- * ⚠ **`minEntries` is declared on `session-history` alone.** R6 (retrieval
497
- * plan §7): *per-source minimums are removed everywhere except recent
524
+ * ⚠ **`minEntries` is declared on `session-history` alone.** The ruling:
525
+ * *per-source minimums are removed everywhere except recent
498
526
  * conversation*. A minimum is a promise to spend budget on a source whether or
499
527
  * not it scored, and the one way an entry the ranker turned down could come
500
528
  * back in; declaring one on a lore lane would reopen exactly that door, so
@@ -594,7 +622,7 @@ export const lorebookTriggers = pin(describeQueryDefinition({
594
622
  timeoutMs: 2000,
595
623
  /**
596
624
  * All three lore lanes through one port, so all three bands — each a
597
- * top-level template name with its variable (typed templates P2).
625
+ * top-level template name with its variable.
598
626
  * Policy, not contract: the candidates are the same either side of it.
599
627
  */
600
628
  bands: { worldLore: varWorldLore, characterLore: varCharacterLore, history: varHistory },
@@ -606,7 +634,7 @@ export const lorebookTriggers = pin(describeQueryDefinition({
606
634
  * Nothing read it and nothing seeded a row for it, so it rendered as
607
635
  * an empty picker. A source template belongs on the node whose job
608
636
  * is the rendering — a `render-entries` task, when one is bound
609
- * (culled unbound, plans/29 R-2); two declarations of one idea, one
637
+ * (culled: declared, never bound); two declarations of one idea, one
610
638
  * of them inert, is how they drift.
611
639
  */
612
640
  params: {
@@ -614,8 +642,8 @@ export const lorebookTriggers = pin(describeQueryDefinition({
614
642
  facet: 'weights',
615
643
  schema: {
616
644
  /**
617
- * The three bands' intents, first, as on the lanes (R-7
618
- * P5; U3b review W1, 2026-09-16). This node produces world
645
+ * The three bands' intents, first, as on the lanes
646
+ * (2026-09-16). This node produces world
619
647
  * lore, character lore AND history through one port, so it
620
648
  * declares all three — namespaced, `worldLoreShare` … —
621
649
  * and publishes three band intents at the head of its
@@ -744,7 +772,7 @@ export const lorebookTriggers = pin(describeQueryDefinition({
744
772
  ports: {
745
773
  /**
746
774
  * ⚠ No `text` in-port, and this and the three lore lanes had one
747
- * (culled 2026-09-16, R-12). It was filled by no spec and read by
775
+ * (culled 2026-09-16). It was filled by no spec and read by
748
776
  * no handler — the scan derives its window from `scope`, which is
749
777
  * where it actually comes from — and each of the four carried a
750
778
  * standing excuse in `wiring.test.ts` saying so.
@@ -753,7 +781,7 @@ export const lorebookTriggers = pin(describeQueryDefinition({
753
781
  scope: S.sessionScope,
754
782
  /**
755
783
  * **Whose private lore this read is for** — a participant
756
- * reference (`character:<id>`), additive, 2026-09-17 (W1).
784
+ * reference (`character:<id>`), additive, 2026-09-17.
757
785
  *
758
786
  * Character-lore visibility is decided at the host read against
759
787
  * ONE subject, and until this port existed that subject was the
@@ -782,7 +810,7 @@ export const lorebookTriggers = pin(describeQueryDefinition({
782
810
  /**
783
811
  * The entries this scan **found and then excluded** — an
784
812
  * entry's own selective logic said *not here* — as verdicts
785
- * `{ source, id, reason }` (C2, 2026-10-02). A copy of one that
813
+ * `{ source, id, reason }` (2026-10-02). A copy of one that
786
814
  * another mechanism brings in (by meaning, by name) is the
787
815
  * same entry the author ruled out, and
788
816
  * `core:task/eligibility@1` marks it ineligible with this
@@ -799,7 +827,7 @@ export const lorebookTriggers = pin(describeQueryDefinition({
799
827
  * time they shared a weight, a minimum and a share of the window there. They
800
828
  * are not alike: character lore is bound to whoever is speaking and world
801
829
  * lore is not, and an install that wants a lot of one and little of the
802
- * other had no way to say so. (Since U3b's review it can on either shape:
830
+ * other had no way to say so. (Since 2026-09-16 it can on either shape:
803
831
  * that node declares one intent per band it produces, namespaced —
804
832
  * `bandIntentFieldsOf` — from the same `LORE_BANDS` table these read.)
805
833
  *
@@ -858,14 +886,14 @@ export const lorebookTriggers = pin(describeQueryDefinition({
858
886
  */
859
887
  /**
860
888
  * The seven lore knobs, declared once and worn by all three lore lanes —
861
- * every one of them **`shared`** (R-7 P2, ruled 2026-09-15; the marker
889
+ * every one of them **`shared`** (ruled 2026-09-15; the marker
862
890
  * 2026-09-16, see `FieldDecl.shared`): a spec wires the three lanes' `params`
863
891
  * to ONE node — core's `respond` puts them on `gather.worldLore.read` and the
864
892
  * other two lanes read that slot through `slot.params({ node })` — so a person
865
893
  * tuning them tunes them once, for world lore, character lore and history
866
894
  * together. The wording below says so: it is the owner's label a panel shows,
867
895
  * and an owner labelled "world lore" while governing three sources was the
868
- * lie the U3 review found.
896
+ * lie a review found.
869
897
  *
870
898
  * The lane's own intent (`bandIntentFields` above) sits beside them in the
871
899
  * same slot, UNMARKED: through the same reference a lane's share is the
@@ -908,7 +936,7 @@ const loreScanFields = () => ({
908
936
  description: 'A ceiling on how far entries may trigger further entries via keywords found in their text, however deep an individual entry asks to go. It never follows links between entries.',
909
937
  },
910
938
  /**
911
- * Declared on all three lanes, held by one: since R-7 P2 a spec
939
+ * Declared on all three lanes, held by one: since 2026-09-15 a spec
912
940
  * names ONE owner for the seven knobs and the other lanes read the
913
941
  * owner's slot, so this is one row governing world lore, character
914
942
  * lore and history alike — not one row per lane. World lore
@@ -945,7 +973,7 @@ const loreSlots = (band, defaults) => ({
945
973
  /** @experimental */
946
974
  export const worldLore = pin(describeQueryDefinition({
947
975
  id: 'core:query/world-lore@1',
948
- /** The band this lane publishes — a top-level template name (typed templates P2). */
976
+ /** The band this lane publishes — a top-level template name. */
949
977
  bands: { worldLore: varWorldLore },
950
978
  i18n: { name: { en: 'World lore' } },
951
979
  timeoutMs: 2000,
@@ -969,7 +997,7 @@ export const worldLore = pin(describeQueryDefinition({
969
997
  /**
970
998
  * The entries this scan **found and then excluded** — an
971
999
  * entry's own selective logic said *not here* — as verdicts
972
- * `{ source, id, reason }` (C2, 2026-10-02). A copy of one that
1000
+ * `{ source, id, reason }` (2026-10-02). A copy of one that
973
1001
  * another mechanism brings in (by meaning, by name) is the
974
1002
  * same entry the author ruled out, and
975
1003
  * `core:task/eligibility@1` marks it ineligible with this
@@ -982,7 +1010,7 @@ export const worldLore = pin(describeQueryDefinition({
982
1010
  /** @experimental */
983
1011
  export const characterLore = pin(describeQueryDefinition({
984
1012
  id: 'core:query/character-lore@1',
985
- /** The band this lane publishes — a top-level template name (typed templates P2). */
1013
+ /** The band this lane publishes — a top-level template name. */
986
1014
  bands: { characterLore: varCharacterLore },
987
1015
  i18n: { name: { en: 'Character lore' } },
988
1016
  timeoutMs: 2000,
@@ -996,7 +1024,7 @@ export const characterLore = pin(describeQueryDefinition({
996
1024
  scope: S.sessionScope,
997
1025
  /**
998
1026
  * **Whose private lore this read is for** — a participant
999
- * reference (`character:<id>`), additive, 2026-09-17 (W1).
1027
+ * reference (`character:<id>`), additive, 2026-09-17.
1000
1028
  *
1001
1029
  * Character-lore visibility is decided at the host read against
1002
1030
  * ONE subject, and until this port existed that subject was the
@@ -1025,7 +1053,7 @@ export const characterLore = pin(describeQueryDefinition({
1025
1053
  /**
1026
1054
  * The entries this scan **found and then excluded** — an
1027
1055
  * entry's own selective logic said *not here* — as verdicts
1028
- * `{ source, id, reason }` (C2, 2026-10-02). A copy of one that
1056
+ * `{ source, id, reason }` (2026-10-02). A copy of one that
1029
1057
  * another mechanism brings in (by meaning, by name) is the
1030
1058
  * same entry the author ruled out, and
1031
1059
  * `core:task/eligibility@1` marks it ineligible with this
@@ -1057,7 +1085,7 @@ export const characterLore = pin(describeQueryDefinition({
1057
1085
  */
1058
1086
  export const historyEntries = pin(describeQueryDefinition({
1059
1087
  id: 'core:query/history-entries@1',
1060
- /** The band this lane publishes — a top-level template name (typed templates P2). */
1088
+ /** The band this lane publishes — a top-level template name. */
1061
1089
  bands: { history: varHistory },
1062
1090
  i18n: { name: { en: 'History entries' } },
1063
1091
  timeoutMs: 2000,
@@ -1077,7 +1105,7 @@ export const historyEntries = pin(describeQueryDefinition({
1077
1105
  /**
1078
1106
  * The entries this scan **found and then excluded** — an
1079
1107
  * entry's own selective logic said *not here* — as verdicts
1080
- * `{ source, id, reason }` (C2, 2026-10-02). A copy of one that
1108
+ * `{ source, id, reason }` (2026-10-02). A copy of one that
1081
1109
  * another mechanism brings in (by meaning, by name) is the
1082
1110
  * same entry the author ruled out, and
1083
1111
  * `core:task/eligibility@1` marks it ineligible with this
@@ -1089,7 +1117,7 @@ export const historyEntries = pin(describeQueryDefinition({
1089
1117
  }));
1090
1118
  /**
1091
1119
  * **Who is in the world, and when** — the cast's presences, as the session's
1092
- * reading sees them (E-2, R4; built 2026-10-02).
1120
+ * reading sees them (built 2026-10-02).
1093
1121
  *
1094
1122
  * A presence says *this member, at this point of their own life, is here from
1095
1123
  * this date until that one* (`cast_presences`). The host reads the scope
@@ -1106,7 +1134,7 @@ export const historyEntries = pin(describeQueryDefinition({
1106
1134
  *
1107
1135
  * What it is for: `core:task/eligibility@1`'s presence rule, which gates the
1108
1136
  * lore of a member who is not in the world at `at`. A custom retrieval reads it
1109
- * the same way (plan E-11).
1137
+ * the same way.
1110
1138
  * @experimental
1111
1139
  */
1112
1140
  export const castPresences = pin(describeQueryDefinition({
@@ -1251,7 +1279,7 @@ export const vectorSearch = pin(describeQueryDefinition({
1251
1279
  in: {
1252
1280
  /**
1253
1281
  * Several query vectors, one ranked list each — a list, so
1254
- * `json@1` (was `vector@1` until 2026-09-17, U5d review W9):
1282
+ * `json@1` (was `vector@1` until 2026-09-17):
1255
1283
  * what `embed-text@1`'s `vectors` publishes and what the
1256
1284
  * host's search reads.
1257
1285
  */
@@ -1260,7 +1288,7 @@ export const vectorSearch = pin(describeQueryDefinition({
1260
1288
  /**
1261
1289
  * **Whose private lore this search may return** — a participant
1262
1290
  * reference, with `core:query/character-lore@1`'s exact
1263
- * semantics (C3, 2026-10-02): unwired, `null` or empty, the
1291
+ * semantics (2026-10-02): unwired, `null` or empty, the
1264
1292
  * scope decides as it always did; a `character:<id>` reads
1265
1293
  * that character's own private lore and nobody else's; any
1266
1294
  * other reference reads none. The leak guard for a search
@@ -1338,7 +1366,7 @@ export const entitySearch = pin(describeQueryDefinition({
1338
1366
  facet: 'weights',
1339
1367
  schema: {
1340
1368
  /**
1341
- * **On by default — 5** (R5, ruled 2026-09-30: all supported
1369
+ * **On by default — 5** (ruled 2026-09-30: all supported
1342
1370
  * retrieval is on by default; built 2026-10-02). It was 0,
1343
1371
  * the `maxRecursionDepth` / `admitThreshold` convention of
1344
1372
  * "turned on rather than arrived at"; the ruling replaced
@@ -1366,8 +1394,8 @@ export const entitySearch = pin(describeQueryDefinition({
1366
1394
  description: "How many earlier messages this may return, as recalled lines, for naming what the scene is naming. They reach the prompt only where a pipeline ranks them and its context template places {{{recalledLines}}}. 0 turns this half off.",
1367
1395
  },
1368
1396
  /**
1369
- * The recalled lines' **share** — a band-namespaced field
1370
- * (§7), because this definition publishes lore on `main`
1397
+ * The recalled lines' **share** — a band-namespaced field,
1398
+ * because this definition publishes lore on `main`
1371
1399
  * and its own band on `messages`. Published as the band's
1372
1400
  * intent at the head of `messages` whenever `maxMessages`
1373
1401
  * turns the half on; the cap is `maxMessages`, which
@@ -1419,7 +1447,7 @@ export const entitySearch = pin(describeQueryDefinition({
1419
1447
  * nothing filled and nothing read — `loreFor` derives its window
1420
1448
  * from `scope` — and this declaration refused to ship a fifth with
1421
1449
  * the same standing excuse written for it. Theirs are culled now
1422
- * (2026-09-16, R-12); the window comes from `scope`, which is where
1450
+ * (2026-09-16); the window comes from `scope`, which is where
1423
1451
  * it actually comes from.
1424
1452
  */
1425
1453
  in: {
@@ -1427,7 +1455,7 @@ export const entitySearch = pin(describeQueryDefinition({
1427
1455
  /**
1428
1456
  * **Whose private lore this search may return** — a participant
1429
1457
  * reference, with `core:query/character-lore@1`'s exact
1430
- * semantics (C3, 2026-10-02): unwired, `null` or empty, the
1458
+ * semantics (2026-10-02): unwired, `null` or empty, the
1431
1459
  * scope decides as it always did; a `character:<id>` reads
1432
1460
  * that character's own private lore and nobody else's; any
1433
1461
  * other reference reads none. The leak guard for a search
@@ -1455,8 +1483,8 @@ export const entitySearch = pin(describeQueryDefinition({
1455
1483
  },
1456
1484
  }));
1457
1485
  /**
1458
- * Documentation search — the guide genre's one retrieval mechanism (plans/29
1459
- * R-18; built 2026-09-16 as U5g).
1486
+ * Documentation search — the guide genre's one retrieval mechanism (built
1487
+ * 2026-09-16).
1460
1488
  *
1461
1489
  * The app compiles its docs — its own guides and the SDK's — into a section
1462
1490
  * index at build time (title, anchor, body text per heading). This reads the
@@ -1485,7 +1513,7 @@ export const docsSearch = pin(describeQueryDefinition({
1485
1513
  en: "Finds the documentation sections that answer the person's latest question, so the guide can ground its answer in them — and finds none when the docs do not cover it.",
1486
1514
  },
1487
1515
  },
1488
- /** Its own band, a top-level template name (typed templates P2). */
1516
+ /** Its own band, a top-level template name. */
1489
1517
  bands: { docsExcerpts: varDocsExcerpts },
1490
1518
  timeoutMs: 2000,
1491
1519
  optional: true,
@@ -1547,7 +1575,7 @@ export const mentionSpans = pin(describeQueryDefinition({
1547
1575
  facet: 'weights',
1548
1576
  schema: {
1549
1577
  /**
1550
- * **On by default — 8** (R5, ruled 2026-09-30: all supported
1578
+ * **On by default — 8** (ruled 2026-09-30: all supported
1551
1579
  * retrieval is on by default; built 2026-10-02). It was 0.
1552
1580
  * Still the mechanism's one switch: 0 turns it off.
1553
1581
  *
@@ -1695,7 +1723,7 @@ export const entityLink = pin(describeQueryDefinition({
1695
1723
  /**
1696
1724
  * **Whose private lore this search may return** — a participant
1697
1725
  * reference, with `core:query/character-lore@1`'s exact
1698
- * semantics (C3, 2026-10-02): unwired, `null` or empty, the
1726
+ * semantics (2026-10-02): unwired, `null` or empty, the
1699
1727
  * scope decides as it always did; a `character:<id>` reads
1700
1728
  * that character's own private lore and nobody else's; any
1701
1729
  * other reference reads none. The leak guard for a search
@@ -1724,7 +1752,7 @@ export const network = pin(describeQueryDefinition({
1724
1752
  * A Task, not a Query, even though it reads the cast: what it *is* is the
1725
1753
  * resolution — which characters appear, which get named, which scenario wins —
1726
1754
  * and that is a decision anyone should be able to replace. The read reaches the
1727
- * host like any other (F11 keeps the services out of the Task itself).
1755
+ * host like any other (a Task never holds host services itself).
1728
1756
  *
1729
1757
  * Separate from Assemble on purpose. Assemble allocates a budget and renders;
1730
1758
  * this decides what there is to render. A plugin that wants different character
@@ -1741,8 +1769,8 @@ export const sessionCast = pin(describeQueryDefinition({
1741
1769
  main: S.sessionCast,
1742
1770
  cast: S.sessionCast,
1743
1771
  /**
1744
- * The seated envoys on their own (PLAN-turn-order §4.4,
1745
- * additive 2026-09-21): `{ slug, key, origin, name, speaks,
1772
+ * The seated envoys on their own (additive
1773
+ * 2026-09-21): `{ slug, key, origin, name, speaks,
1746
1774
  * default, position, removedAt }` per seat, live and departed,
1747
1775
  * in seat order — the rows `main` already carries under
1748
1776
  * `envoys`, offered as a port so a pool or a strategy can be
@@ -1754,7 +1782,7 @@ export const sessionCast = pin(describeQueryDefinition({
1754
1782
  },
1755
1783
  }));
1756
1784
  /**
1757
- * The session's settings document, re-read (PLAN-turn-order §4.12, R13).
1785
+ * The session's settings document, re-read.
1758
1786
  *
1759
1787
  * Every core inlet that takes a session already publishes the document on
1760
1788
  * its `session` port, resolved once by the host at run start. This node is
@@ -1911,14 +1939,14 @@ export const relationshipsKnown = pin(describeQueryDefinition({
1911
1939
  },
1912
1940
  }));
1913
1941
  /**
1914
- * The narrative graph as a retrieval **mechanism** (ruling 2026-09-10, Q1).
1942
+ * The narrative graph as a retrieval **mechanism** (ruling 2026-09-10).
1915
1943
  *
1916
1944
  * ⚠ The ruling calls this an *arm*, and the id deliberately does not. Two
1917
- * reasons, and the second is the stronger: NOMENCLATURE §22 retires *arm* in
1945
+ * reasons, and the second is the stronger: the project's vocabulary retires *arm* in
1918
1946
  * favour of **mechanism**, and every sibling in this package is named for what
1919
1947
  * it retrieves rather than for the machinery — `entity-search`,
1920
1948
  * `vector-search`, `world-lore`. The word survives in the *descriptions* on
1921
- * those siblings, which is prose a user reads (§23.6); an id is a frozen
1949
+ * those siblings, which is prose a user reads; an id is a frozen
1922
1950
  * contract, which is the one place a retired word should not land.
1923
1951
  *
1924
1952
  * The two nodes above are a *dump*: they hand the whole graph section to the
@@ -1956,7 +1984,7 @@ export const relationshipsKnown = pin(describeQueryDefinition({
1956
1984
  * means exactly what it means on the two nodes above: on/off plus a ceiling,
1957
1985
  * with an absent value uncapped and 0 leaving it out altogether.
1958
1986
  *
1959
- * ## Nobody speaking: the cast-wide read (genre plan F6(a), 2026-09-29)
1987
+ * ## Nobody speaking: the cast-wide read (2026-09-29)
1960
1988
  *
1961
1989
  * The three sections are claims about a SPEAKER, and a scope whose
1962
1990
  * `currentCharacterId` is null has none — an Adventure turn is the narrator's
@@ -1990,7 +2018,7 @@ export const relationshipSearch = pin(describeQueryDefinition({
1990
2018
  ...relationshipSlots('graph relationships').params,
1991
2019
  schema: {
1992
2020
  /**
1993
- * The band's intent (R-7 P5), on the one relationship read
2021
+ * The band's intent, on the one relationship read
1994
2022
  * that ranks. `share` is 0, which is what the ranker's map
1995
2023
  * held: the band ships inert and the share is its switch —
1996
2024
  * every candidate leaves as `excluded_group_disabled` with
@@ -2015,12 +2043,12 @@ export const relationshipSearch = pin(describeQueryDefinition({
2015
2043
  /**
2016
2044
  * The lore-link hop: relationships one edge from an entry
2017
2045
  * this turn's keyword scan chose, with an entry at an end
2018
- * (NOMENCLATURE §17 *lore link*).
2046
+ * (a *lore link*).
2019
2047
  *
2020
2048
  * `true` is what every run before it did, so the default
2021
2049
  * moves nothing. Off, the hop is not walked at all — no
2022
2050
  * link read, no second scan — and the band holds cast ties
2023
- * only. Adventure's preset turns it off (F6(a)): a place
2051
+ * only. Adventure's preset turns it off: a place
2024
2052
  * link belongs to the place ("From here:"), and a hop would
2025
2053
  * spend the band on a door no section renders.
2026
2054
  */
@@ -2067,7 +2095,7 @@ export const relationshipSearch = pin(describeQueryDefinition({
2067
2095
  },
2068
2096
  }));
2069
2097
  /**
2070
- * 🚧 **A transcript's attachments** (PLAN-composer-attachments §3.5, 2026-10-02).
2098
+ * 🚧 **A transcript's attachments** (2026-10-02).
2071
2099
  *
2072
2100
  * Takes the history read's rows and publishes, per message id, the files its
2073
2101
  * active revision shows — `core:image` and `core:file` parts, in part order —
@@ -2141,22 +2169,36 @@ export const availableTools = pin(describeQueryDefinition({
2141
2169
  },
2142
2170
  },
2143
2171
  },
2144
- ports: { in: { scope: S.sessionScope }, out: { main: S.json, tools: S.json } },
2172
+ ports: {
2173
+ in: {
2174
+ scope: S.sessionScope,
2175
+ /**
2176
+ * 🚧 Which **kinds** of tool to offer (2026-10-19, the Chat
2177
+ * genre's `tools` field): `web`, `lore`, `lorebook-write`,
2178
+ * `image`, `clock`, `calculator`, `history` — the host maps
2179
+ * each kind onto the tools that serve it. Unwired, every tool
2180
+ * the session has (as before); an empty list, none. Added in
2181
+ * place (`@1` evolves until 0.7).
2182
+ */
2183
+ kinds: S.json,
2184
+ },
2185
+ out: { main: S.json, tools: S.json },
2186
+ },
2145
2187
  }));
2146
2188
  // ── Consumers ───────────────────────────────────────────────────────────────
2147
2189
  /**
2148
2190
  * Create a message.
2149
2191
  *
2150
2192
  * Split from the old `commitMessage`, which decided new-vs-update from whether an id
2151
- * happened to be present (13 §10b). That was an implicit branch, and F25 exists because
2193
+ * happened to be present. That was an implicit branch, and specs may not branch because
2152
2194
  * implicit branches are unreadable: two specs that did different things looked identical,
2153
2195
  * and the receipt could not tell you which had happened. Two ids, two names, no inference.
2154
2196
  *
2155
- * Gate-eligible, so it publishes the discriminated write result rather than raw ids
2156
- * (13 §7j-b). Under async review this is a proposal a reviewer may still reject.
2197
+ * Gate-eligible, so it publishes the discriminated write result rather than raw ids.
2198
+ * Under async review this is a proposal a reviewer may still reject.
2157
2199
  */
2158
2200
  /**
2159
- * The create pipeline's read (24 §12, T8): what the session's cast wants to
2201
+ * The create pipeline's read: what the session's cast wants to
2160
2202
  * say first — one entry per character in position order, each carrying the
2161
2203
  * full greeting history (the first text seeds the message, the rest become
2162
2204
  * swipes), interpolated against the session's first persona.
@@ -2176,8 +2218,8 @@ export const sessionGreetings = pin(describeQueryDefinition({
2176
2218
  },
2177
2219
  }));
2178
2220
  /**
2179
- * A seated envoy's **declared greeting**, interpolated (lair re-plan R6,
2180
- * 2026-09-28) — the line an envoy opens a new session with
2221
+ * A seated envoy's **declared greeting**, interpolated
2222
+ * (2026-09-28) — the line an envoy opens a new session with
2181
2223
  * (`EnvoyDecl.greeting`): the Lair's Castellan introduces the game.
2182
2224
  *
2183
2225
  * The create pipeline's read, beside `session-greetings@1`, which stays the
@@ -2261,7 +2303,7 @@ export const turnPlan = pin(describeQueryDefinition({
2261
2303
  },
2262
2304
  }));
2263
2305
  /**
2264
- * The session's **annex** (PLAN-turn-order §4.3, R6): read one owner's
2306
+ * The session's **annex**: read one owner's
2265
2307
  * document out of `sessions.annex`.
2266
2308
  *
2267
2309
  * The annex is the pipeline layer's free field, namespaced by owner key — a
@@ -2306,12 +2348,12 @@ export const sessionAnnex = pin(describeQueryDefinition({
2306
2348
  in: {
2307
2349
  scope: S.sessionScope,
2308
2350
  /**
2309
- * `'ai'` for the prompt-safe view (R57): only the values the
2351
+ * `'ai'` for the prompt-safe view: only the values the
2310
2352
  * model's context may carry — those whose audience holds `ai`,
2311
2353
  * `participant`, or the `speaker` below. Absent is everything,
2312
2354
  * as a pipeline reads it. A literal.
2313
2355
  *
2314
- * `'template'` (typed templates P6) reads what a template may
2356
+ * `'template'` reads what a template may
2315
2357
  * reference: every DECLARED key of every owner in scope — core
2316
2358
  * and the enabled plugins, for the session's genre — as
2317
2359
  * `{ <owner>: { <key>: value } }`. `owner` and `sharedAnnex`
@@ -2326,8 +2368,8 @@ export const sessionAnnex = pin(describeQueryDefinition({
2326
2368
  },
2327
2369
  }));
2328
2370
  // ── Summarization ───────────────────────────────────────────────────────────
2329
- /** The messages a summary is drawn from, already scoped and ordered. @internal */
2330
- export const summarizeSource = pin(describeQueryDefinition({
2371
+ /** The messages a summary is drawn from, already scoped and ordered (`@1`). */
2372
+ const summarizeSourceAt1 = pin(describeQueryDefinition({
2331
2373
  id: 'core:query/summarize-source@1',
2332
2374
  i18n: { name: { en: 'Messages to summarize' } },
2333
2375
  timeoutMs: 5000,
@@ -2336,6 +2378,107 @@ export const summarizeSource = pin(describeQueryDefinition({
2336
2378
  out: { main: S.messages, messages: S.messages },
2337
2379
  },
2338
2380
  }));
2381
+ /**
2382
+ * 🚧 A **scene's** messages, by range and lane — the source a genre-owned
2383
+ * summarize-scene spec reads (live scenes §13–§14, 2026-10-13).
2384
+ *
2385
+ * ## Why a second version, not a widened first
2386
+ *
2387
+ * `@1` hands on one flat list of the rows a request named. A scene is a
2388
+ * RANGE on one lane (`openedAt` … `closedAt`, message ids), and what the
2389
+ * genre counts as story and as aside differs by genre: the Lair's Sanctum is
2390
+ * talk the party never hear, which a summary should read as context and never
2391
+ * as events. So this version splits its output — `messages` (the story) and
2392
+ * `asides` (each side-channel row, attached by the host to the story line
2393
+ * before it) — and that is a different contract, not a wider one. `@1`
2394
+ * stays for the shared summarize specs that resolve against it.
2395
+ *
2396
+ * ## Who decides which channels
2397
+ *
2398
+ * The SPEC, through `params` (`channel`, `asides`) — the builder writes its
2399
+ * genre's choice onto its Default preset, exactly as `session-history@1`'s
2400
+ * `channel` already works. A request may name `channel` / `asides` too (the
2401
+ * scene row's own lane, say), and a value the request carries wins over the
2402
+ * param, because it is the narrower statement.
2403
+ *
2404
+ * ## The request
2405
+ *
2406
+ * `{ sceneId?, messageIds?, channel?, asides?: string[], openedAt?,
2407
+ * closedAt?, limit? }` on the `summarize-request@1` payload. `openedAt` /
2408
+ * `closedAt` are message ids bounding the range, inclusive; `closedAt` absent
2409
+ * reads to the newest row (an open scene). `messageIds` is the transition
2410
+ * path (`scenes:create`'s ticked rows) and wins when present. An empty span
2411
+ * is not an error: the source hands on two empty lists and the drafting map
2412
+ * runs zero times. A channel the session has never written is the same — an
2413
+ * aside on a lane with no rows contributes nothing, never a refusal.
2414
+ *
2415
+ * ## The rows
2416
+ *
2417
+ * `@1`'s `summarize_source` row shape — `id`, `role`, `senderName` (the
2418
+ * sender as the session names them), `content` — plus `channel` on every
2419
+ * row, so the transcript template's `aside` section can say where a line was
2420
+ * written. `render-transcript@1` reads these and nothing else.
2421
+ * @experimental
2422
+ */
2423
+ const summarizeSourceAt2 = pin(describeQueryDefinition({
2424
+ id: 'core:query/summarize-source@2',
2425
+ i18n: { name: { en: 'Scene to summarize' } },
2426
+ timeoutMs: 5000,
2427
+ slots: {
2428
+ params: {
2429
+ kind: 'parameters',
2430
+ facet: 'behavior',
2431
+ schema: {
2432
+ /** The story's lane — `main` for every core genre. */
2433
+ channel: {
2434
+ type: 'string',
2435
+ default: 'main',
2436
+ label: { en: 'Story channel' },
2437
+ description: {
2438
+ en: "Which of the session's channels holds the story. The chat log is 'main'.",
2439
+ },
2440
+ },
2441
+ /**
2442
+ * Channels read as asides: rows matched by prefix
2443
+ * (`sanctum` matches `sanctum:2`), each attached to the
2444
+ * story line before it. Empty reads the story alone.
2445
+ */
2446
+ asides: {
2447
+ type: 'list',
2448
+ item: { type: 'text' },
2449
+ label: { en: 'Aside channels' },
2450
+ description: {
2451
+ en: "Side channels whose lines the summary reads as context, not as events — the Lair's 'sanctum'. Leave it empty to read the story alone.",
2452
+ },
2453
+ },
2454
+ },
2455
+ },
2456
+ },
2457
+ ports: {
2458
+ in: { scope: S.sessionScope, request: S.summarizeRequest },
2459
+ out: {
2460
+ main: S.messages,
2461
+ /** The story's rows on the story channel, oldest first. */
2462
+ messages: S.messages,
2463
+ /** The aside rows inside the range, oldest first, each carrying its channel. */
2464
+ asides: S.messages,
2465
+ },
2466
+ },
2467
+ }));
2468
+ /**
2469
+ * The messages a summary is drawn from — both pins on one export, the way a
2470
+ * pinned constructor carries its version at the call site (04 §4b):
2471
+ * `C.summarizeSource.v1(…)` for the shared summarize specs,
2472
+ * `C.summarizeSource.v2(…)` for a genre's summarize-scene. `id` and
2473
+ * `descriptor` stay `@1`'s, so nothing that held this export changes
2474
+ * meaning; `@2`'s descriptor rides its constructor
2475
+ * (`typeof C.summarizeSource.v2` types a binding).
2476
+ * @internal
2477
+ */
2478
+ export const summarizeSource = {
2479
+ ...summarizeSourceAt1,
2480
+ v2: Object.assign(summarizeSourceAt2.v2, { descriptor: summarizeSourceAt2.descriptor }),
2481
+ };
2339
2482
  /**
2340
2483
  * The keywords an entry is proposed to be found by — **without a model**.
2341
2484
  *
@@ -2518,8 +2661,12 @@ export const graphScenes = pin(describeQueryDefinition({
2518
2661
  * The session's stats and states, resolved — an inventory is one, the
2519
2662
  * `inventory` list stat (phase 3b retired possessions as edges).
2520
2663
  *
2521
- * `{ world, cast, slots, who, version }` — the same object `stateFor(sessionId)`
2664
+ * `{ world, cast, slots, configs, who, version }` — the same object `stateFor(sessionId)`
2522
2665
  * returns and the shape `state` on `core:task/build-template-context@1` takes.
2666
+ * 🚧 `configs` is each owner's **stat configuration** in force — `world`
2667
+ * and every `cast.byId` key, then the slot id: `configs['player_seat:4']
2668
+ * ['core:slot/hp@1'].max` is that seat's full health, the bar's own number
2669
+ * (`core:outlet/set-stat-config@1` writes it).
2523
2670
  * Every value is already resolved down session → lorebook → card →
2524
2671
  * declaration default, with absence meaning **inherit** rather than zero, and
2525
2672
  * derived slots computed rather than read.
@@ -2528,8 +2675,7 @@ export const graphScenes = pin(describeQueryDefinition({
2528
2675
  * — this is the `current` view, and the temporal registry that would give the
2529
2676
  * other one is not built (see docs/stats-and-states.md).
2530
2677
  *
2531
- * `version` is the session's **state version** (plans/29 R-15 *Staleness and
2532
- * order*; 30 §U5f): a counter every applied change moves, in turn order,
2678
+ * `version` is the session's **state version**: a counter every applied change moves, in turn order,
2533
2679
  * under a lock. A run that reads state here and later asks to change it
2534
2680
  * hands the version back as `base` on `resolve-state-changes@1` /
2535
2681
  * `set-state@1`, so a change proposed against a state that has since moved
@@ -2680,6 +2826,39 @@ export const lorebookState = pin(describeQueryDefinition({
2680
2826
  out: { main: S.json, state: S.json },
2681
2827
  },
2682
2828
  }));
2829
+ /**
2830
+ * 🚧 **A person's channel lane** (owner ruling 2026-10-17): on a channel the
2831
+ * genre declares `lanes: 'personal'`, the lane that is this person's —
2832
+ * allocated by core on first ask, filed in the session's lane register,
2833
+ * and sent by the host to that person and the session's owner alone. The
2834
+ * same ask twice is the same lane; a shared channel is refused (its lanes
2835
+ * are the genre's to allocate). Replaces a genre's own user→lane map and
2836
+ * client-side hiding.
2837
+ * @experimental
2838
+ */
2839
+ export const channelLane = pin(describeQueryDefinition({
2840
+ id: 'core:query/channel-lane@1',
2841
+ i18n: {
2842
+ name: { en: 'A person’s channel lane' },
2843
+ description: { en: 'Finds, or opens, the lane one person has on a channel of personal lanes.' },
2844
+ },
2845
+ timeoutMs: 2000,
2846
+ ports: {
2847
+ in: {
2848
+ scope: S.sessionScope,
2849
+ /** The channel's slug, declared with personal lanes. */
2850
+ channel: S.text,
2851
+ /** Whose lane: `user:<id>` — a participant reference as text (wired from a script's words; the host parses it). */
2852
+ person: S.json,
2853
+ },
2854
+ out: {
2855
+ /** The canonical channel string of the lane: `parley` for lane 1, `parley:2` after. */
2856
+ lane: S.text,
2857
+ /** Whether this ask opened the lane. */
2858
+ opened: S.json,
2859
+ },
2860
+ },
2861
+ }));
2683
2862
  /**
2684
2863
  * 🚧 The **stat trail**: one stat's values over time, for one owner — the
2685
2864
  * world, a cast member or a place (owner-confirmed 2026-09-27: "stats over
@@ -2807,7 +2986,7 @@ export const statTrail = pin(describeQueryDefinition({
2807
2986
  *
2808
2987
  * ## Why `propose` is the default
2809
2988
  *
2810
- * The three writers do not have equal authority (`DESIGN-stats-and-states.md`).
2989
+ * The three writers do not have equal authority.
2811
2990
  * A person editing a bar is authoritative; a genre's own script rolling damage
2812
2991
  * is authoritative because the genre author wrote the arithmetic; a **model**
2813
2992
  * is neither, and a model that could set a number silently is a model that can
@@ -2819,7 +2998,7 @@ export const statTrail = pin(describeQueryDefinition({
2819
2998
  * ## Why it is a Task
2820
2999
  *
2821
3000
  * It writes, which a Task is not otherwise supposed to do, and the alternative
2822
- * is worse: F7 allows a spec **one** write-class Consumer and that one is the
3001
+ * is worse: the one-live-row rule allows a spec **one** write-class Consumer and that one is the
2823
3002
  * message. A damage roll that also saves a reply would be unspecifiable. What
2824
3003
  * makes it defensible rather than a hole is that these rows are not the run's
2825
3004
  * primary artifact — every one of them is anchored to a message and retracted
@@ -2832,6 +3011,14 @@ export const statTrail = pin(describeQueryDefinition({
2832
3011
  * item line survives on `resolve-state-changes@1`, which turns it into this). One
2833
3012
  * port because one turn's changes are one ordered list, and splitting them
2834
3013
  * would let a spec apply half of them.
3014
+ *
3015
+ * 🚧 A **clock line** `{ kind: 'clock', by, unit }` (live scenes §6, ★3) is
3016
+ * the state-keeper asking to move the session's story clock forward. `propose`
3017
+ * holds it as a **clock proposal** (`state_proposals.kind` `clock`), whose
3018
+ * Accept advances the clock; `apply` passes it over — neither applied nor
3019
+ * refused — because a moved clock is announced through a host seam a task does
3020
+ * not have: a spec that applies the keeper's clock wires *Advance story clock*
3021
+ * from `resolve-state-changes@1`'s `clock` out-port (Adventure's trusted arm).
2835
3022
  */
2836
3023
  /**
2837
3024
  * Changes a model NAMED, turned into changes `set-state` can write.
@@ -2840,7 +3027,7 @@ export const statTrail = pin(describeQueryDefinition({
2840
3027
  *
2841
3028
  * "Verity" becomes a cast row by looking her up in this session's cast, which
2842
3029
  * is a read of the host and therefore a Query's job — a Task is handed no
2843
- * services (F11). That also buys the scoping refusal for free: the cast it
3030
+ * services. That also buys the scoping refusal for free: the cast it
2844
3031
  * matches against is the cast of the session on the `scope` port and no other.
2845
3032
  *
2846
3033
  * ## Why this is a node and not a leniency inside `set-state`
@@ -2889,7 +3076,7 @@ export const resolveStateChanges = pin(describeQueryDefinition({
2889
3076
  changes: S.json,
2890
3077
  /**
2891
3078
  * Who a change that names no `owner` is for, as participant
2892
- * references (lair re-plan R10, 2026-09-28): each such change
3079
+ * references (2026-09-28): each such change
2893
3080
  * is made once per reference, the same slot and value on each —
2894
3081
  * the Lair's Whisper writes its one line on every recipient the
2895
3082
  * press collected (`core:inlet/user-message@1.recipients`). A
@@ -2933,7 +3120,27 @@ export const resolveStateChanges = pin(describeQueryDefinition({
2933
3120
  */
2934
3121
  plan: S.json,
2935
3122
  /**
2936
- * The **state version** this turn read (U5f): the session-state
3123
+ * 🚧 **A clock proposal** (live scenes §6, ★3, 2026-10-13): the
3124
+ * keeper's answer, whose `clock` list (`[{ by, unit }]`, empty
3125
+ * on the ordinary turn) is how much story time the scene took.
3126
+ * The whole answer for `plan`'s reason — a reference has no
3127
+ * sub-path — and a bare `{ by, unit }` reads the same. The
3128
+ * first entry resolves onto `changes` as `{ kind: 'clock', by,
3129
+ * unit }` (what `set-state` proposes) and onto the `clock`
3130
+ * out-port; forward only — a whole `by` above zero, within
3131
+ * `CLOCK_STEP_MAX`, in one of `STORY_TIME_UNITS` — and only
3132
+ * when the session's clock could move by it. Anything else is
3133
+ * a sentence on `refused`. 🚧 A well-formed ask the story
3134
+ * cannot take (no clock yet, a date the calendar cannot place)
3135
+ * also rides `changes` as `{ kind: 'clock', by, unit, skipped
3136
+ * }`, `skipped` saying why, for `set-state` to write to the
3137
+ * ledger (live scenes §15 G16) — never onto `clock`.
3138
+ * Optional: unwired, no clock move.
3139
+ * ⚠ Not the planner's `timeOfDay` hint, which is a world stat.
3140
+ */
3141
+ clock: S.json,
3142
+ /**
3143
+ * The **state version** this turn read: the session-state
2937
3144
  * query's `version`. Passed through onto every resolved change
2938
3145
  * as `base`, so `set-state` can tell a delta against the state
2939
3146
  * the model saw from one against a state that has since moved.
@@ -2958,6 +3165,14 @@ export const resolveStateChanges = pin(describeQueryDefinition({
2958
3165
  changes: S.json,
2959
3166
  /** One sentence per change that named something not here. */
2960
3167
  refused: S.json,
3168
+ /**
3169
+ * 🚧 The clock move the `clock` port resolved, `{ by, unit }` —
3170
+ * absent when there is none. What `core:task/clock-step@1`'s
3171
+ * `step` takes, so a spec that applies the keeper's clock
3172
+ * (Trust the narrator) moves it through *Advance story
3173
+ * clock*; the same move rides `changes` for `propose`.
3174
+ */
3175
+ clock: S.json,
2961
3176
  },
2962
3177
  },
2963
3178
  }));
@@ -2979,8 +3194,7 @@ export const resolveStateChanges = pin(describeQueryDefinition({
2979
3194
  * all to a genre that needs to see the book: on a **create** run there is no
2980
3195
  * conversation to scan, so the window is empty and only always-on entries are
2981
3196
  * admitted — and a genre asking *is there a room called the Cellar?*, *pick one
2982
- * of these as the secret*, or *who are the suspects?* had no door at all
2983
- * (plans/genres §10 G13/G14, §11 L4).
3197
+ * of these as the secret*, or *who are the suspects?* had no door at all.
2984
3198
  *
2985
3199
  * This is that door, and it is deliberately dull: **no mechanism runs, nothing
2986
3200
  * is scored, nothing is ranked.** `main` and `entries` carry one bare list of
@@ -2998,7 +3212,7 @@ export const resolveStateChanges = pin(describeQueryDefinition({
2998
3212
  * `fingerprint`, and history's `year` / `month` / `day`. That is the contract
2999
3213
  * worth having: a task written against a retrieved entry reads a listed one
3000
3214
  * without a second shape to learn, and there is no second projection to keep in
3001
- * step (R5 — the vocabularies are reconciled at the host's read, not merged).
3215
+ * step (the vocabularies are reconciled at the host's read, not merged).
3002
3216
  * The one addition is asked for: `withLinks` puts each row's lore links on it
3003
3217
  * as `links` (`LoreLinkRow[]`), said from that row.
3004
3218
  *
@@ -3064,7 +3278,7 @@ export const lorebookEntries = pin(describeQueryDefinition({
3064
3278
  *
3065
3279
  * Empty or absent lists every entry type.
3066
3280
  *
3067
- * Named `entryTypes` rather than `types` (R3): *type* alone
3281
+ * Named `entryTypes` rather than `types`: *type* alone
3068
3282
  * is the word four other vocabularies use — a node type, a
3069
3283
  * session type, a part type — and a parameter may not take
3070
3284
  * the bare noun.
@@ -3119,7 +3333,7 @@ export const lorebookEntries = pin(describeQueryDefinition({
3119
3333
  },
3120
3334
  /**
3121
3335
  * Each row's **lore links**, on the row as `links`
3122
- * (`LoreLinkRow[]`) — places plan B2, 2026-09-29. Drizzle's
3336
+ * (`LoreLinkRow[]`) — 2026-09-29. Drizzle's
3123
3337
  * `with: { … }` in spirit: the listing stays a listing, and a
3124
3338
  * reader that wants a room's ways out says so.
3125
3339
  *
@@ -3172,4 +3386,30 @@ export const lorebookEntries = pin(describeQueryDefinition({
3172
3386
  },
3173
3387
  }));
3174
3388
  // ── core:query/lorebook-entries@1 ───────────────────────────────── end ──────
3389
+ // ── core:query/likeness-images@1 (DESIGN-image-generation §5, §6.4) ──────────
3390
+ /**
3391
+ * 🚧 The **likeness images** of everyone on stage, as one media list — the
3392
+ * Scene action's references.
3393
+ *
3394
+ * Stage order: the switched-on cast in seat order, then the personas in
3395
+ * theirs — the order `core:var/likenesses@1` lays the tag lines out in, so
3396
+ * the n-th picture and the n-th tag line are the same person. Each one's
3397
+ * likeness image, else their avatar (`likenessOf`); someone with neither,
3398
+ * or whose file is gone or is not an image, is skipped. Not capped here:
3399
+ * the picture step's host caps references at the drawing sheet's maximum
3400
+ * and says so.
3401
+ * @experimental
3402
+ */
3403
+ export const likenessImages = pin(describeQueryDefinition({
3404
+ id: 'core:query/likeness-images@1',
3405
+ i18n: {
3406
+ name: { en: 'Likeness images' },
3407
+ description: { en: "Everyone on stage's likeness image, in stage order." },
3408
+ },
3409
+ timeoutMs: 2000,
3410
+ ports: {
3411
+ in: { scope: S.sessionScope },
3412
+ out: { main: S.mediaList, references: S.mediaList },
3413
+ },
3414
+ }));
3175
3415
  //# sourceMappingURL=queries.js.map