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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Every entry is a descriptor plus a pinned constructor. Note that the LLM, TTS and
5
5
  * image-gen providers are structurally identical: `params` is declared per type, so
6
- * nothing anywhere switches on modality (17 §1).
6
+ * nothing anywhere switches on modality.
7
7
  *
8
8
  * Split by node kind (2026-10-05): `inlets.ts`, `queries.ts`, `tasks.ts`,
9
9
  * `oracles.ts` and `outlets.ts`, each holding its kind's definitions and the
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Every entry is a descriptor plus a pinned constructor. Note that the LLM, TTS and
5
5
  * image-gen providers are structurally identical: `params` is declared per type, so
6
- * nothing anywhere switches on modality (17 §1).
6
+ * nothing anywhere switches on modality.
7
7
  *
8
8
  * Split by node kind (2026-10-05): `inlets.ts`, `queries.ts`, `tasks.ts`,
9
9
  * `oracles.ts` and `outlets.ts`, each holding its kind's definitions and the
package/dist/inlets.d.ts CHANGED
@@ -23,13 +23,13 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
23
23
  sessionScope: string;
24
24
  sessionId: string;
25
25
  /**
26
- * Whose turn it is, as a **participant reference** (R-18 (3)):
26
+ * Whose turn it is, as a **participant reference**:
27
27
  * `character:<id>` for a library character, `envoy:<slug>` for
28
28
  * a speaker the genre brings with it. Null on a narrator turn —
29
29
  * nobody in particular is speaking. One port answers "who is
30
30
  * speaking" for both kinds, so nothing downstream branches on
31
31
  * which it received; who *portrays* them this turn is the
32
- * host's resolver's answer, pinned on the receipt (R-21 (4)).
32
+ * host's resolver's answer, pinned on the receipt.
33
33
  */
34
34
  speaker: string;
35
35
  /**
@@ -42,7 +42,7 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
42
42
  characterId: string;
43
43
  /**
44
44
  * Who **pressed** — the reference of whoever sent the message
45
- * or fired the action this run answers (G9, 2026-09-17).
45
+ * or fired the action this run answers (2026-09-17).
46
46
  *
47
47
  * `user:<id>` for a person with no presence in the session,
48
48
  * `character:<id>` when they hold a persona here — their
@@ -61,7 +61,7 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
61
61
  * the path (`speaker: 'user:<id>'` writes a user-role row) and
62
62
  * no inlet carried the reference to put in it, so a plugin that
63
63
  * wanted the player's own line had to ride it on the model's
64
- * reply as a block (Battleship, plan §12).
64
+ * reply as a block (as the Battleship plugin did).
65
65
  *
66
66
  * Never null on a turn or a fire: a run has an owner, and the
67
67
  * owner is a person. Absent only where the inlet is resolved
@@ -69,8 +69,8 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
69
69
  */
70
70
  presser: string;
71
71
  /**
72
- * The cast members a press collected (lair pass R3,
73
- * 2026-09-28): `character:<id>` references, for an action
72
+ * The cast members a press collected
73
+ * (2026-09-28): `character:<id>` references, for an action
74
74
  * declaring `collects.recipients` — picked in the collect
75
75
  * modal, and validated by the host (seated and enabled, no
76
76
  * duplicates, within the declared `min` and `max`) before
@@ -79,7 +79,18 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
79
79
  */
80
80
  recipients: string;
81
81
  /**
82
- * Values for the mode's declared `fields` (19 §1), filtered to
82
+ * 🚧 The **clock step** a press collected (2026-10-13):
83
+ * `{ by, unit }` — a whole number other than zero, signed
84
+ * (back is negative), and one of the story-time units — for
85
+ * an action declaring `collects.clockStep`, picked on the
86
+ * collect modal's stepper and checked by the host before the
87
+ * run starts. Absent on a turn and on every press of an
88
+ * action that collects none. Core's *Time passes…* hands it
89
+ * to `core:task/clock-step@1`.
90
+ */
91
+ clockStep: string;
92
+ /**
93
+ * Values for the mode's declared `fields`, filtered to
83
94
  * the declared schema keys — the supply side of the round
84
95
  * trip: declaration → chat settings → chat row → this port →
85
96
  * every downstream node.
@@ -87,7 +98,7 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
87
98
  fields: string;
88
99
  /**
89
100
  * Text an in-progress reply has already produced, when this turn
90
- * is an **extend** (ruling 2026-09-08, D-2; the verb was `continue`
101
+ * is an **extend** (ruling 2026-09-08; the verb was `continue`
91
102
  * until 2026-09-28).
92
103
  *
93
104
  * Empty on every other turn, which is nearly all of them. It is
@@ -110,7 +121,7 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
110
121
  * swipe or an extend of a message that already exists. Null on
111
122
  * a fresh turn, which is nearly all of them.
112
123
  *
113
- * The pipeline owns its reply row (R-17): a fresh turn's row is
124
+ * The pipeline owns its reply row: a fresh turn's row is
114
125
  * created by the spec's own placeholder outlet, and a verb that
115
126
  * re-drives an existing message hands that message to the same
116
127
  * outlet through this port — so the outlet claims it as the
@@ -121,7 +132,7 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
121
132
  messageId: string;
122
133
  /**
123
134
  * What the built-ins did to this session since the last reply
124
- * (R-15, 2026-09-16): a list of session changes — `[{ event:
135
+ * (2026-09-16): a list of session changes — `[{ event:
125
136
  * 'core:event/message-deleted@1', messageId, at, lost }, …]`,
126
137
  * oldest first, capped at the newest fifty — so a pipeline
127
138
  * knows the history it is about to read has moved: a line
@@ -136,15 +147,15 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
136
147
  * 'core:event/session-changes-truncated@1', dropped }` says
137
148
  * how many older ones did not.
138
149
  *
139
- * Was `changes` until 2026-09-16 (U5b review S4): that word is
150
+ * Was `changes` until 2026-09-16: that word is
140
151
  * the state ledger's on `resolve-state-changes@1` and
141
152
  * `set-state@1` — a list of value changes — and a session
142
- * change is about a message, never a value (R1).
153
+ * change is about a message, never a value (one word, one meaning).
143
154
  */
144
155
  sessionChanges: string;
145
156
  /**
146
- * What an action's fire sent along (R-15 *Forms*; U5d,
147
- * 2026-09-17): a form's answer — `{ choice }` for a choices
157
+ * What an action's fire sent along
158
+ * (2026-09-17): a form's answer — `{ choice }` for a choices
148
159
  * block, the entered values for a form block — or a widget's
149
160
  * `invoke(key, args)` arguments. Absent on a turn and on a
150
161
  * bare press. A press on an **addressed** block arrives with
@@ -164,7 +175,7 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
164
175
  form: string;
165
176
  /**
166
177
  * Which channel the message that triggered this turn is on
167
- * (R-C, 2026-09-17) — the stored string, lane included:
178
+ * (2026-09-17) — the stored string, lane included:
168
179
  * `main`, `manuscript`, `phone:3`.
169
180
  *
170
181
  * `main` when the trigger named none, which is every session
@@ -183,10 +194,10 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
183
194
  * what a port carries.
184
195
  */
185
196
  /**
186
- * The session's **settings document** (PLAN-turn-order §4.12,
187
- * R13): every setting a person can see in session settings,
197
+ * The session's **settings document**:
198
+ * every setting a person can see in session settings,
188
199
  * resolved once per run by the host and handed in here —
189
- * title, guests, genre fields (cascade applied, §4.13),
200
+ * title, guests, genre fields (cascade applied),
190
201
  * scenario, lorebook, tags, channels, the cast with its
191
202
  * envoys, the session-scope rebinds and param overrides per
192
203
  * bound spec, the turn-order state, `metadata` (read-only)
@@ -196,7 +207,7 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
196
207
  session: string;
197
208
  channel: string;
198
209
  /**
199
- * **How this turn was reached** (lair pass R8, 2026-09-28) —
210
+ * **How this turn was reached** (2026-09-28) —
200
211
  * the fired turn entry's `via`: `strategy`, `script` or
201
212
  * `voice` for a prepared turn, `pick` for one a person chose,
202
213
  * and **`narrate`** when the press was the `core#narrate` turn
@@ -212,7 +223,7 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
212
223
  kind: 'inlet';
213
224
  slots?: {
214
225
  /**
215
- * The input hook (18 §4a): user chains over the triggering text,
226
+ * The input hook: user chains over the triggering text,
216
227
  * phase `after` on what this node publishes — which is what
217
228
  * lorebook scanning and the prompt's seed see. The stored user
218
229
  * message was written before the turn began and stays untouched
@@ -229,7 +240,7 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
229
240
  } | undefined;
230
241
  }>;
231
242
  /**
232
- * A built-in write's request (R-15, 2026-09-16) — what a person asked core to
243
+ * A built-in write's request (2026-09-16) — what a person asked core to
233
244
  * do to a message or a session: delete, hide, edit, swipe, branch.
234
245
  *
235
246
  * Core implements every state-altering write and runs each as its own
@@ -255,10 +266,10 @@ export declare const builtInRequest: import("@serene-pub/sdk").Pinned<import("@s
255
266
  /** A branch's fork point — the last message the copy keeps. */
256
267
  fromMessage: string;
257
268
  /**
258
- * The session's **settings document** (PLAN-turn-order §4.12,
259
- * R13): every setting a person can see in session settings,
269
+ * The session's **settings document**:
270
+ * every setting a person can see in session settings,
260
271
  * resolved once per run by the host and handed in here —
261
- * title, guests, genre fields (cascade applied, §4.13),
272
+ * title, guests, genre fields (cascade applied),
262
273
  * scenario, lorebook, tags, channels, the cast with its
263
274
  * envoys, the session-scope rebinds and param overrides per
264
275
  * bound spec, the turn-order state, `metadata` (read-only)
@@ -270,7 +281,7 @@ export declare const builtInRequest: import("@serene-pub/sdk").Pinned<import("@s
270
281
  title: string;
271
282
  /**
272
283
  * A person's sprite for the line: `{ set, label }`, or null to
273
- * clear it (DESIGN-sprites §6) — a `sprite-pick@1`, the shape a
284
+ * clear it — a `sprite-pick@1`, the shape a
274
285
  * picker publishes, so `core:outlet/show-sprite@1` takes one
275
286
  * shape from both. Read by `core:spec/show-sprite`.
276
287
  */
@@ -280,7 +291,7 @@ export declare const builtInRequest: import("@serene-pub/sdk").Pinned<import("@s
280
291
  slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
281
292
  }>;
282
293
  /**
283
- * A session was just created — the create pipeline's trigger (24 §5, §12).
294
+ * A session was just created — the create pipeline's trigger.
284
295
  *
285
296
  * The genre's one required pipeline answers this event and seeds the
286
297
  * session's initial data: greetings per the genre's shape, initial channels,
@@ -289,7 +300,7 @@ export declare const builtInRequest: import("@serene-pub/sdk").Pinned<import("@s
289
300
  * create pipeline does is *finish* what the request began.
290
301
  *
291
302
  * Not `user-message`: reusing the turn input here welded creation to the
292
- * chat turn's shape and was wrong (24 §12). A create run has no triggering
303
+ * chat turn's shape and was wrong. A create run has no triggering
293
304
  * text and no speaker; it has a request.
294
305
  * @public
295
306
  */
@@ -304,10 +315,10 @@ export declare const sessionCreated: import("@serene-pub/sdk").Pinned<import("@s
304
315
  */
305
316
  request: string;
306
317
  /**
307
- * The session's **settings document** (PLAN-turn-order §4.12,
308
- * R13): every setting a person can see in session settings,
318
+ * The session's **settings document**:
319
+ * every setting a person can see in session settings,
309
320
  * resolved once per run by the host and handed in here —
310
- * title, guests, genre fields (cascade applied, §4.13),
321
+ * title, guests, genre fields (cascade applied),
311
322
  * scenario, lorebook, tags, channels, the cast with its
312
323
  * envoys, the session-scope rebinds and param overrides per
313
324
  * bound spec, the turn-order state, `metadata` (read-only)
@@ -322,7 +333,7 @@ export declare const sessionCreated: import("@serene-pub/sdk").Pinned<import("@s
322
333
  slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
323
334
  }>;
324
335
  /**
325
- * A session event happened (PLAN-turn-order §4.1/§4.4, R1): the inlet every
336
+ * A session event happened: the inlet every
326
337
  * event-driven spec enters through, and the one core's turn-order spec
327
338
  * uses.
328
339
  *
@@ -335,7 +346,7 @@ export declare const sessionCreated: import("@serene-pub/sdk").Pinned<import("@s
335
346
  * `cause` is why it fired (`EventCause`: user · run · edit · settings ·
336
347
  * system), and it is load-bearing beyond this node — the write this spec
337
348
  * ends in carries it into `turn-order-changed`, where the auto-advance
338
- * listener reads it to decide whether to fire the head turn (§4.6). A spec
349
+ * listener reads it to decide whether to fire the head turn. A spec
339
350
  * that drops it makes every recompute look like a system event.
340
351
  * @experimental
341
352
  */
@@ -351,20 +362,20 @@ export declare const sessionEvent: import("@serene-pub/sdk").Pinned<import("@ser
351
362
  at: string;
352
363
  sessionScope: string;
353
364
  /**
354
- * The session's **settings document** (§4.12, R13), resolved
365
+ * The session's **settings document**, resolved
355
366
  * once per run by the host after the write that caused this
356
367
  * event — so the cast below is the cast as it is now, and no
357
368
  * node needs a cast read of its own.
358
369
  */
359
370
  session: string;
360
371
  /**
361
- * The settings document's **cast**, on its own port (PLAN
362
- * §8 (17)): what `core:query/session-cast@1` publishes,
372
+ * The settings document's **cast**, on its own port:
373
+ * what `core:query/session-cast@1` publishes,
363
374
  * envoys included, projected from `session` by the host.
364
375
  *
365
376
  * A port rather than a path, because an edge is `{ node,
366
377
  * port }` and nothing in the graph addresses a field inside
367
- * a port's value. §4.5 wires the pool's `cast` from the
378
+ * a port's value. Core's turn-order spec wires the pool's `cast` from the
368
379
  * document; this is that wire, with the shape the pool's
369
380
  * in-port declares.
370
381
  */
@@ -411,7 +422,7 @@ export declare const sideCharacterTurn: import("@serene-pub/sdk").Pinned<import(
411
422
  sessionScope: string;
412
423
  sessionId: string;
413
424
  /**
414
- * Who is speaking, as a **participant reference** (R-18 (3)):
425
+ * Who is speaking, as a **participant reference**:
415
426
  * `character:<id>` when the pick was a library character, null
416
427
  * for a free-form name — a name is not a participant reference,
417
428
  * and the fact below is where the name lives. On the same
@@ -440,15 +451,15 @@ export declare const sideCharacterTurn: import("@serene-pub/sdk").Pinned<import(
440
451
  * run afterwards rather than from the trigger that started it.
441
452
  *
442
453
  * Was `speaker` until 2026-09-16: that name is the participant
443
- * reference now (R-18 (3), one word one meaning), and a fact
454
+ * reference now (one word, one meaning), and a fact
444
455
  * carrying a free-form name is not a reference to anybody.
445
456
  */
446
457
  sideCharacter: string;
447
458
  /**
448
- * The session's **settings document** (PLAN-turn-order §4.12,
449
- * R13): every setting a person can see in session settings,
459
+ * The session's **settings document**:
460
+ * every setting a person can see in session settings,
450
461
  * resolved once per run by the host and handed in here —
451
- * title, guests, genre fields (cascade applied, §4.13),
462
+ * title, guests, genre fields (cascade applied),
452
463
  * scenario, lorebook, tags, channels, the cast with its
453
464
  * envoys, the session-scope rebinds and param overrides per
454
465
  * bound spec, the turn-order state, `metadata` (read-only)
@@ -470,20 +481,20 @@ export declare const sideCharacterTurn: import("@serene-pub/sdk").Pinned<import(
470
481
  /**
471
482
  * The built-ins' session changes since the last reply, on the
472
483
  * same terms as `user-message@1`'s port of this name (was
473
- * `changes` until 2026-09-16, U5b review S4).
484
+ * `changes` until 2026-09-16).
474
485
  */
475
486
  sessionChanges: string;
476
487
  }, import("@serene-pub/sdk").PortDecl, "core:inlet/side-character-turn@1"> & {
477
488
  kind: 'inlet';
478
489
  slots?: {
479
490
  /**
480
- * The input hook (18 §4a), on the same terms as `user-message@1`:
491
+ * The input hook, on the same terms as `user-message@1`:
481
492
  * user chains over the triggering text, phase `after` on what this
482
493
  * node publishes, which is what retrieval and the prompt see.
483
494
  *
484
495
  * ⚠ `extras` is what makes this the **new-name hook**. The three
485
496
  * names below are read-only context supplied by the host at the
486
- * hook (18 §6a) and are part of the fixed choice set the script
497
+ * hook and are part of the fixed choice set the script
487
498
  * editor offers — so "this name is new" is a declared read rather
488
499
  * than a name typed on faith. `speakerIsKnown` is `false` exactly
489
500
  * when a free-form name matched nothing in the session's lorebook.
@@ -513,10 +524,10 @@ export declare const formAddressed: import("@serene-pub/sdk").Pinned<import("@se
513
524
  sessionScope: string;
514
525
  sessionId: string;
515
526
  /**
516
- * The session's **settings document** (PLAN-turn-order §4.12,
517
- * R13): every setting a person can see in session settings,
527
+ * The session's **settings document**:
528
+ * every setting a person can see in session settings,
518
529
  * resolved once per run by the host and handed in here —
519
- * title, guests, genre fields (cascade applied, §4.13),
530
+ * title, guests, genre fields (cascade applied),
520
531
  * scenario, lorebook, tags, channels, the cast with its
521
532
  * envoys, the session-scope rebinds and param overrides per
522
533
  * bound spec, the turn-order state, `metadata` (read-only)
@@ -547,10 +558,10 @@ export declare const summarizeRequest: import("@serene-pub/sdk").Pinned<import("
547
558
  main: string;
548
559
  scope: string;
549
560
  /**
550
- * The session's **settings document** (PLAN-turn-order §4.12,
551
- * R13): every setting a person can see in session settings,
561
+ * The session's **settings document**:
562
+ * every setting a person can see in session settings,
552
563
  * resolved once per run by the host and handed in here —
553
- * title, guests, genre fields (cascade applied, §4.13),
564
+ * title, guests, genre fields (cascade applied),
554
565
  * scenario, lorebook, tags, channels, the cast with its
555
566
  * envoys, the session-scope rebinds and param overrides per
556
567
  * bound spec, the turn-order state, `metadata` (read-only)
@@ -563,4 +574,55 @@ export declare const summarizeRequest: import("@serene-pub/sdk").Pinned<import("
563
574
  kind: 'inlet';
564
575
  slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
565
576
  }>;
577
+ /**
578
+ * 🚧 A person pressed an action on a **card** — the Characters view, not a
579
+ * session: *Fill empty sprites* on the
580
+ * Sprites tab, and *Generate portrait* on the Gallery tab (`count`, widened
581
+ * in place 2026-10-12).
582
+ *
583
+ * ## No session
584
+ *
585
+ * A card action runs with no session in scope: nothing here is a session's,
586
+ * no live row is filled, no session event is written. The host checks the
587
+ * person may act on the card (its owner, or an admin) before the run starts,
588
+ * and resolves the card ONCE, here — its likeness as text and as the
589
+ * reference image — so no node re-reads the character for a setting.
590
+ *
591
+ * ## The form's answers
592
+ *
593
+ * `fields` is the whole of what the action's form collected. The fields a
594
+ * core action asks are also their own ports (`setName`, `labels`) because a
595
+ * data edge addresses a port, never a field inside one; another card action
596
+ * widens this in place with its own, every one optional.
597
+ *
598
+ * No lock and no shape: a card action is not a session mode, and no genre
599
+ * owns a card.
600
+ * @experimental
601
+ */
602
+ export declare const cardAction: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
603
+ main: string;
604
+ /** The card the action was pressed on. */
605
+ characterId: string;
606
+ /** The card's likeness prompt — its look as a tag line; empty when unset. */
607
+ likeness: string;
608
+ /** The card's likeness negative; empty when unset. */
609
+ likenessNegative: string;
610
+ /**
611
+ * The likeness image as a one-item media list (the likeness
612
+ * image, else the avatar); empty when the card has neither.
613
+ * What a picture step's `references` port takes.
614
+ */
615
+ likenessImage: string;
616
+ /** The form's answers, whole. */
617
+ fields: string;
618
+ /** Sprite set fill: the sprite set to fill, by name. */
619
+ setName: string;
620
+ /** Sprite set fill: the sprite labels to draw. */
621
+ labels: string;
622
+ /** 🚧 Portrait: how many pictures to offer (a whole number, 1–4 on the form). */
623
+ count: string;
624
+ }, import("@serene-pub/sdk").PortDecl, "core:inlet/card-action@1"> & {
625
+ kind: 'inlet';
626
+ slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
627
+ }>;
566
628
  //# sourceMappingURL=inlets.d.ts.map