@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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/inlets.d.ts +295 -50
- package/dist/inlets.js +468 -55
- package/dist/oracles.d.ts +440 -19
- package/dist/oracles.js +425 -42
- package/dist/outlets.d.ts +583 -44
- package/dist/outlets.js +641 -60
- package/dist/queries.d.ts +323 -80
- package/dist/queries.js +330 -90
- package/dist/tasks.d.ts +1425 -179
- package/dist/tasks.js +1169 -148
- package/package.json +3 -3
package/dist/outlets.d.ts
CHANGED
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { WriteResult } from '@serene-pub/sdk';
|
|
9
9
|
/**
|
|
10
|
-
* An author defaulting review ON for their own consumer — and unable to forbid it
|
|
10
|
+
* An author defaulting review ON for their own consumer — and unable to forbid it.
|
|
11
11
|
*
|
|
12
|
-
* Bound 2026-09-17
|
|
12
|
+
* Bound 2026-09-17: the host's commit for it existed and no
|
|
13
13
|
* binding reached it. `target` is the row the part lands on — the same port
|
|
14
14
|
* `update-message` takes, fed from an earlier write in the document (the reply's
|
|
15
|
-
* placeholder
|
|
15
|
+
* placeholder) or from the inlet's `messageId`. An update whose target is
|
|
16
16
|
* an earlier write is the same row, so placing this after `create-message` is
|
|
17
|
-
* one live row, not two
|
|
17
|
+
* one live row, not two. The host reads the id off `target`, or off the
|
|
18
18
|
* media reference's own `messageId` where a caller outside the graph set one.
|
|
19
19
|
* @experimental
|
|
20
20
|
*/
|
|
@@ -28,7 +28,7 @@ export declare const attachImage: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
28
28
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
29
29
|
}>;
|
|
30
30
|
/**
|
|
31
|
-
* The create pipeline's write
|
|
31
|
+
* The create pipeline's write: seed the collected greetings as
|
|
32
32
|
* the session's first messages — one assistant message per entry, the full
|
|
33
33
|
* list as its swipe history, redirected to the genre's declared greeting
|
|
34
34
|
* channel when that is not `main`.
|
|
@@ -40,10 +40,10 @@ export declare const seedGreetings: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
40
40
|
}, {
|
|
41
41
|
greetings: string;
|
|
42
42
|
/**
|
|
43
|
-
* The channel the greetings land on
|
|
43
|
+
* The channel the greetings land on — the genre's
|
|
44
44
|
* declared greeting channel, written by the create specs as a
|
|
45
45
|
* literal (`createChat.ts`, `adventure.ts`). Absent is `main`.
|
|
46
|
-
* Declared 2026-09-16
|
|
46
|
+
* Declared 2026-09-16: the host read it off the
|
|
47
47
|
* payload while no declaration supplied it.
|
|
48
48
|
*/
|
|
49
49
|
channel: string;
|
|
@@ -52,22 +52,22 @@ export declare const seedGreetings: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
52
52
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
53
53
|
}>;
|
|
54
54
|
/**
|
|
55
|
-
* Write a message — complete, or as the run's **placeholder
|
|
55
|
+
* Write a message — complete, or as the run's **placeholder**.
|
|
56
56
|
*
|
|
57
57
|
* A pipeline that wants a message creates it itself. The reply specs put this
|
|
58
58
|
* node straight after the inlet with `generating: true`: the row it inserts is
|
|
59
59
|
* empty and generating, it is the run's live row (`liveRow` — an oracle's
|
|
60
60
|
* stream lands in it, and Stop finalises it), and the spec's last node is an
|
|
61
61
|
* `update-message` that fills it. That create → update pair on one row inside
|
|
62
|
-
* one run is the run's **one live row
|
|
62
|
+
* one run is the run's **one live row**. Without `generating` (or a
|
|
63
63
|
* claimed `row`) the message is complete, and an ordinary write — a pipeline
|
|
64
64
|
* may write as many as it likes, just never a second on the live row's
|
|
65
65
|
* channel. `message-created` fires on the create, which is now genuinely the
|
|
66
66
|
* moment the row exists.
|
|
67
67
|
*
|
|
68
68
|
* `reviewDefault: 'off'` — review of a reply, when an admin enables it, lands
|
|
69
|
-
* on the *update* of the primary row and never on this create by default
|
|
70
|
-
*
|
|
69
|
+
* on the *update* of the primary row and never on this create by default:
|
|
70
|
+
* a placeholder is a write, and an admin who gates this node gets
|
|
71
71
|
* a run that shows nothing until approved, which is honest and rarely wanted.
|
|
72
72
|
* Turning it on is still the admin's to do.
|
|
73
73
|
* @public
|
|
@@ -98,18 +98,18 @@ export declare const createMessage: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
98
98
|
* cast row — the side-character fact `{ name, characterId, known }`
|
|
99
99
|
* off `side-character-turn@1`'s `sideCharacter` port. Stored
|
|
100
100
|
* beside the message under `metadata.sideCharacter` (was
|
|
101
|
-
* `metadata.speaker` until
|
|
102
|
-
* participant reference now, on the row as on the inlet
|
|
101
|
+
* `metadata.speaker` until 2026-09-16 — that key is the
|
|
102
|
+
* participant reference now, on the row as on the inlet),
|
|
103
103
|
* where the run and the receipt read it from; it never writes a
|
|
104
104
|
* cast row and never enters the rotation.
|
|
105
105
|
*
|
|
106
106
|
* Was `speaker` until 2026-09-16 — the inlet's port of that
|
|
107
|
-
* name is a participant reference now
|
|
107
|
+
* name is a participant reference now.
|
|
108
108
|
*/
|
|
109
109
|
sideCharacter: string;
|
|
110
110
|
/**
|
|
111
|
-
* Who is speaking, as a **participant reference**
|
|
112
|
-
*
|
|
111
|
+
* Who is speaking, as a **participant reference**
|
|
112
|
+
* (2026-09-16) — `character:<id>` or `envoy:<slug>`, the
|
|
113
113
|
* inlet's `speaker`. Stored beside the message as
|
|
114
114
|
* `metadata.speaker`; it is the only identity an envoy's turn
|
|
115
115
|
* carries, since an envoy has no row for `characterId` to name.
|
|
@@ -148,10 +148,10 @@ export declare const createMessage: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
148
148
|
*/
|
|
149
149
|
instructions: string;
|
|
150
150
|
/**
|
|
151
|
-
* The channel the row lands on
|
|
151
|
+
* The channel the row lands on. Absent is `main`, so a
|
|
152
152
|
* pipeline that has never heard of channels writes where it
|
|
153
153
|
* always did; a channel the session's genre never declared is
|
|
154
|
-
* refused at the write. Declared 2026-09-16
|
|
154
|
+
* refused at the write. Declared 2026-09-16 for
|
|
155
155
|
* the same reason `seed-greetings` declares its own.
|
|
156
156
|
*/
|
|
157
157
|
channel: string;
|
|
@@ -164,8 +164,8 @@ export declare const createMessage: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
164
164
|
*/
|
|
165
165
|
row: string;
|
|
166
166
|
/**
|
|
167
|
-
* Message **blocks** to post with the row
|
|
168
|
-
*
|
|
167
|
+
* Message **blocks** to post with the row
|
|
168
|
+
* (2026-09-17): a list of `MessageBlock` — text,
|
|
169
169
|
* tables, meters, and the two interactive kinds, `choices` and
|
|
170
170
|
* `form`, which are **forms** when they carry an `addressee`.
|
|
171
171
|
* The host validates the tree (`checkMessageBlocks`), refuses
|
|
@@ -206,16 +206,55 @@ export declare const createMessage: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
206
206
|
* every row but a planner's.
|
|
207
207
|
*/
|
|
208
208
|
turnPlan: string;
|
|
209
|
+
/**
|
|
210
|
+
* 🚧 A folio line's **kind** (2026-10-17): one word stored as
|
|
211
|
+
* `metadata.kind` — the Dungeon Crawler's journal writes `did`
|
|
212
|
+
* · `found` · `met` · `changed` · `time` · `lead` — which a
|
|
213
|
+
* Messages copy filters on (`rowKinds`) and groups under. A
|
|
214
|
+
* literal in the node's config or a wired port; absent writes
|
|
215
|
+
* no kind, and a row with none always shows.
|
|
216
|
+
*/
|
|
217
|
+
kind: string;
|
|
218
|
+
/**
|
|
219
|
+
* 🚧 `'user'`: the row is a **person's own message** — the run
|
|
220
|
+
* owner's, through `speaker` (`character:<id>` their persona,
|
|
221
|
+
* `player-seat:<id>` their card-less seat, `user:<id>` or
|
|
222
|
+
* nothing for themselves). A literal, on `generating`'s terms;
|
|
223
|
+
* absent is a reply. The host writes a person's row only for the
|
|
224
|
+
* run's own person on a root run, refuses a persona or seat that
|
|
225
|
+
* is not theirs, and fires the row's `message-completed` under
|
|
226
|
+
* the person's cause, so turn order and auto-advance answer it
|
|
227
|
+
* as a send. `core:spec/save-message` sets it.
|
|
228
|
+
* @ruling owner 2026-10-15
|
|
229
|
+
*/
|
|
230
|
+
role: string;
|
|
231
|
+
/**
|
|
232
|
+
* 🚧 The person's ready **tray items** to post as the row's
|
|
233
|
+
* attachments (`core:image` / `core:file` parts), in one
|
|
234
|
+
* transaction with the row — or the write is refused whole and
|
|
235
|
+
* the tray stays. Only on a person's row (`role: 'user'`).
|
|
236
|
+
*/
|
|
237
|
+
trayItems: string;
|
|
238
|
+
/**
|
|
239
|
+
* 🚧 `true`: the row is a **table line** — the table's own
|
|
240
|
+
* line, said in no voice (a Dungeon Crawler roll line,
|
|
241
|
+
* 2026-10-15). A literal, on `generating`'s terms. Stored as
|
|
242
|
+
* `metadata.tableLine`; the log draws it without a speaker's
|
|
243
|
+
* face or name, and a history read that asks for no table lines
|
|
244
|
+
* (`session-history@1`'s `tableLines: false`) leaves it out, so
|
|
245
|
+
* a model never takes it for its own speech and imitates it.
|
|
246
|
+
*/
|
|
247
|
+
tableLine: string;
|
|
209
248
|
}, "core:outlet/create-message@1"> & {
|
|
210
249
|
kind: 'outlet';
|
|
211
250
|
slots?: {
|
|
212
251
|
/**
|
|
213
|
-
* The write hook
|
|
252
|
+
* The write hook: one chain rewrites the final output, the
|
|
214
253
|
* other decides where a streamed reply stops. Stop is a verdict —
|
|
215
254
|
* min-reduction across every attached script, and the connection's
|
|
216
|
-
* own guards join the same union at dispatch
|
|
255
|
+
* own guards join the same union at dispatch, which is why
|
|
217
256
|
* order never needs ruling. `speakerName` and `castNames` are
|
|
218
|
-
* extras: readable, never writable, by construction
|
|
257
|
+
* extras: readable, never writable, by construction.
|
|
219
258
|
*/
|
|
220
259
|
readonly scripts: {
|
|
221
260
|
readonly kind: "scripts";
|
|
@@ -231,7 +270,7 @@ export declare const createMessage: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
231
270
|
* Update an existing message — finish a placeholder, or edit a settled row.
|
|
232
271
|
*
|
|
233
272
|
* `target` takes `row-ids@1`, and a `write-result@1` from earlier in the same
|
|
234
|
-
* run is assignable to it
|
|
273
|
+
* run is assignable to it: the reply specs wire `$.placeholder.messageId`
|
|
235
274
|
* here, which is the create → update pair that makes the pipeline own its row.
|
|
236
275
|
* The other case is unchanged — the id comes from outside the run because the
|
|
237
276
|
* user clicked a message, so it is on the inlet.
|
|
@@ -242,7 +281,7 @@ export declare const createMessage: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
242
281
|
* target is edited and marked so. That is the row's own state, not a flag a
|
|
243
282
|
* spec could get wrong.
|
|
244
283
|
*
|
|
245
|
-
* Where review lands on a reply
|
|
284
|
+
* Where review lands on a reply: when an admin turns review on
|
|
246
285
|
* for a reply's message writes, it is THIS node that parks — the placeholder
|
|
247
286
|
* ships `reviewDefault: 'off'` and declares no default here either, so nothing
|
|
248
287
|
* gates by default and a reviewer who asks for one sees the content, not an
|
|
@@ -261,7 +300,7 @@ export declare const updateMessage: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
261
300
|
* the model produced one. Stored beside the message as the
|
|
262
301
|
* reasoning fold reads it; absent means none. Shown folded,
|
|
263
302
|
* and never re-sent to the model: the prompt transcript reads
|
|
264
|
-
* a row's text alone (
|
|
303
|
+
* a row's text alone (decided 2026-09-27).
|
|
265
304
|
*/
|
|
266
305
|
reasoning: string;
|
|
267
306
|
/**
|
|
@@ -281,6 +320,15 @@ export declare const updateMessage: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
281
320
|
* only when given. Like `reasoning`, never re-sent to the model.
|
|
282
321
|
*/
|
|
283
322
|
sections: string;
|
|
323
|
+
/**
|
|
324
|
+
* 🚧 The reply's PARTS, in order (O5, 2026-10-21; additive) —
|
|
325
|
+
* `generate-text@1`'s `parts`. Every media part (a spoken
|
|
326
|
+
* reply's audio, a drawn image) lands on the row as a message
|
|
327
|
+
* part in the order the model gave it, after the text. Text and
|
|
328
|
+
* reasoning parts are not written from here: `text` and
|
|
329
|
+
* `reasoning` carry them.
|
|
330
|
+
*/
|
|
331
|
+
parts: string;
|
|
284
332
|
}, "core:outlet/update-message@1"> & {
|
|
285
333
|
kind: 'outlet';
|
|
286
334
|
slots?: {
|
|
@@ -299,20 +347,48 @@ export declare const updateMessage: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
299
347
|
* Delete a message. Publishes `lost` — the content, role, speaker, channel
|
|
300
348
|
* and metadata the row held — beside the write result, so a listener (a
|
|
301
349
|
* plugin cleaning its rows, the next reply's inlet) knows what went.
|
|
350
|
+
*
|
|
351
|
+
* 🚧 **The deletion outlet** (RF fix 5, owner ruling 2026-10-23: deletion
|
|
352
|
+
* requires a pipeline, so the genre manages it). Placed by the built-in's
|
|
353
|
+
* own spec (⏳ retired as a person's verb), which names its row on `target`,
|
|
354
|
+
* and by a **deletion pipeline** — a document entered through
|
|
355
|
+
* `core:inlet/message-deletion-asked@1`, the only other place it may stand
|
|
356
|
+
* (`deletionPipelinePlaces`) — which hands it the deletion the event carried
|
|
357
|
+
* on `asked`, wired from the inlet's `main`
|
|
358
|
+
* (`C.deleteMessage.v1({ asked: $.input.main })`), and deletes that message
|
|
359
|
+
* and no other. One transaction: the row goes and everything the message
|
|
360
|
+
* changed goes with it by the one retraction rule (RF fix 4) — and `taken`
|
|
361
|
+
* says what that was.
|
|
302
362
|
* @experimental
|
|
303
363
|
*/
|
|
304
364
|
export declare const deleteMessage: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
305
365
|
main: string;
|
|
306
366
|
messageId: string;
|
|
307
367
|
lost: string;
|
|
368
|
+
/**
|
|
369
|
+
* 🚧 What went with it (RF fix 5): the one retraction rule's
|
|
370
|
+
* count of what the message changed and was taken back —
|
|
371
|
+
* values, configurations, proposals, zone snapshots, lore
|
|
372
|
+
* writes by what became of each, the notes' entries, and
|
|
373
|
+
* whether the clock moved back.
|
|
374
|
+
*/
|
|
375
|
+
taken: string;
|
|
308
376
|
}, {
|
|
377
|
+
/** The row to delete — the built-in's own spec's port. */
|
|
309
378
|
target: string;
|
|
379
|
+
/**
|
|
380
|
+
* 🚧 The deletion a person asked for, whole (RF fix 5): a
|
|
381
|
+
* deletion pipeline's port, wired from
|
|
382
|
+
* `core:inlet/message-deletion-asked@1.main` and nothing else
|
|
383
|
+
* (`validate()`). The message deleted is the one it names.
|
|
384
|
+
*/
|
|
385
|
+
asked: string;
|
|
310
386
|
}, "core:outlet/delete-message@1"> & {
|
|
311
387
|
kind: 'outlet';
|
|
312
388
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
313
389
|
}>;
|
|
314
390
|
/**
|
|
315
|
-
* Write the session's turn order
|
|
391
|
+
* Write the session's turn order — the ONE
|
|
316
392
|
* write path for `sessions.metadata.turnOrder`, and the only outlet that
|
|
317
393
|
* writes `metadata` at all.
|
|
318
394
|
*
|
|
@@ -347,14 +423,14 @@ export declare const setTurnOrder: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
347
423
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
348
424
|
}>;
|
|
349
425
|
/**
|
|
350
|
-
* Write one owner's document into the session's annex
|
|
426
|
+
* Write one owner's document into the session's annex.
|
|
351
427
|
*
|
|
352
428
|
* Merged into what is there by default — a spec that keeps one key does not
|
|
353
429
|
* have to carry the rest — and written under
|
|
354
430
|
* `pg_advisory_xact_lock(hashtext('annex'), sessionId)` through `jsonb_set`,
|
|
355
431
|
* so two specs writing two owners' documents at once cannot lose each
|
|
356
|
-
* other's. Causes `core:event/annex-changed@1` (
|
|
357
|
-
* reversing
|
|
432
|
+
* other's. Causes `core:event/annex-changed@1` (a later
|
|
433
|
+
* ruling, reversing the original "no causesEvent"): a package's state is the annex, and a
|
|
358
434
|
* genre that wants its turn order to answer that state binds the event in
|
|
359
435
|
* the open, where the event map draws it — not through a back door.
|
|
360
436
|
* @experimental
|
|
@@ -405,6 +481,211 @@ export declare const setSessionAnnex: import("@serene-pub/sdk").Pinned<import("@
|
|
|
405
481
|
};
|
|
406
482
|
} | undefined;
|
|
407
483
|
}>;
|
|
484
|
+
/**
|
|
485
|
+
* 🚧 Name a person's **player seat** in this session (Dungeon Crawler's
|
|
486
|
+
* interview, 2026-10-15): the pipeline door to the seat name a person sets
|
|
487
|
+
* by hand in session settings (`sessions:update` `seatName`). The seat is
|
|
488
|
+
* `user`'s — a `user:<id>` reference, the addressee of the form the name
|
|
489
|
+
* answered — their card-less seat first, else their first seat; with none,
|
|
490
|
+
* a name opens a card-less seat for them, as the hand-set name does. The
|
|
491
|
+
* host refuses a seat for somebody who is neither the owner nor a playing
|
|
492
|
+
* guest, and a blank name (this outlet never clears one).
|
|
493
|
+
*
|
|
494
|
+
* `seat` is the seat as a participant reference — `player-seat:<id>` for a
|
|
495
|
+
* card-less seat, `character:<id>` for a seat with a card — and `seats` the
|
|
496
|
+
* same as a one-item list, the shape `resolve-state-changes@1`'s `owners`
|
|
497
|
+
* takes, so the seat's own stats can be written in the same run.
|
|
498
|
+
*
|
|
499
|
+
* 🚧 `retire` (Dungeon Crawler's new character after a death, owner ruling
|
|
500
|
+
* 2026-10-18): one of `user`'s own seats, by reference. That seat leaves the
|
|
501
|
+
* table — its lines keep its name, its state stays where it was filed — and
|
|
502
|
+
* the name opens a NEW card-less seat for them, which `seat` then names. A
|
|
503
|
+
* seat that is not theirs, or not live, is refused. `@1` evolves in place.
|
|
504
|
+
* @experimental
|
|
505
|
+
*/
|
|
506
|
+
export declare const setSeatName: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
507
|
+
main: string;
|
|
508
|
+
seat: string;
|
|
509
|
+
seats: string;
|
|
510
|
+
}, {
|
|
511
|
+
/** Whose seat: `user:<id>`. */
|
|
512
|
+
user: string;
|
|
513
|
+
/** The character's name in this session. */
|
|
514
|
+
name: string;
|
|
515
|
+
/**
|
|
516
|
+
* 🚧 A seat of theirs this name replaces (`player-seat:<id>` or
|
|
517
|
+
* `character:<id>`): retired, and a new seat opened. JSON, so a
|
|
518
|
+
* script's part may name it (absent or null: none).
|
|
519
|
+
*/
|
|
520
|
+
retire: string;
|
|
521
|
+
}, "core:outlet/set-seat-name@1"> & {
|
|
522
|
+
kind: 'outlet';
|
|
523
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
524
|
+
}>;
|
|
525
|
+
/**
|
|
526
|
+
* 🚧 **Open or close the composer** on a channel lane (owner ruling
|
|
527
|
+
* 2026-10-15): the genre's switch for whether a person may write there. The
|
|
528
|
+
* state is the session row's (`sessions.composer_states`, SDK
|
|
529
|
+
* `ComposerStatesV1`); core opens and closes nothing on its own, so a
|
|
530
|
+
* composer a genre closed stays closed until a pipeline opens it.
|
|
531
|
+
*
|
|
532
|
+
* - `channel` — a slug, a canonical lane (`parley:2`; the bare slug is lane
|
|
533
|
+
* 1 alone), or `*` for every channel;
|
|
534
|
+
* - `open` — `true` to open, `false` to close;
|
|
535
|
+
* - `reason` — optional: what the composer is waiting on, as a sentence
|
|
536
|
+
* the person reads ("Make your character on the Planner tab first.").
|
|
537
|
+
* Shown in place of the placeholder and repeated in the refusal of a send
|
|
538
|
+
* the widget let through. Named `reason`, never `message`: a message is a
|
|
539
|
+
* session's row;
|
|
540
|
+
* - `person` — optional: whose composer, `user:<id>`; absent is everyone,
|
|
541
|
+
* the session's owner included.
|
|
542
|
+
*
|
|
543
|
+
* Opening for everyone clears the lane's every closure; opening for one
|
|
544
|
+
* person clears theirs, and never overrides a close for everyone. The send
|
|
545
|
+
* door (`sessionMessages:sendPersonaMessage`, and `message-offered`'s offer)
|
|
546
|
+
* refuses a line on a closed composer; turn controls (Continue) are the
|
|
547
|
+
* round's, not the composer's, and are not touched. Every member's page is
|
|
548
|
+
* told at once.
|
|
549
|
+
*
|
|
550
|
+
* `main` is the write; `states` the whole document after it.
|
|
551
|
+
* @experimental
|
|
552
|
+
*/
|
|
553
|
+
export declare const setComposerState: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
554
|
+
main: string;
|
|
555
|
+
states: string;
|
|
556
|
+
}, {
|
|
557
|
+
/** A slug, a canonical lane (`parley:2`), or `*`. */
|
|
558
|
+
channel: string;
|
|
559
|
+
/** `true` opens, `false` closes. */
|
|
560
|
+
open: string;
|
|
561
|
+
/** What the composer waits on — a sentence. Optional. */
|
|
562
|
+
reason: string;
|
|
563
|
+
/**
|
|
564
|
+
* Whose composer: `user:<id>`, a participant reference as text.
|
|
565
|
+
* Optional; absent is everyone. `json`, as `set-stat-config@1`'s
|
|
566
|
+
* `owner` is: a genre wires it from a script's text, and the
|
|
567
|
+
* host parses the reference (a typed port refused that wire,
|
|
568
|
+
* 2026-10-18).
|
|
569
|
+
*/
|
|
570
|
+
person: string;
|
|
571
|
+
}, "core:outlet/set-composer-state@1"> & {
|
|
572
|
+
kind: 'outlet';
|
|
573
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
574
|
+
}>;
|
|
575
|
+
/**
|
|
576
|
+
* 🚧 What `propose-scene-cue@1` did — its `cue` out-port, the host's commit's answer
|
|
577
|
+
* (`proposeJudgedSceneCue`, sprint 2, pass 7). @experimental
|
|
578
|
+
*/
|
|
579
|
+
export interface ProposedSceneCue {
|
|
580
|
+
/** `suggested` — waiting as the *New scene?* chip; `placed` — Automatic opened the scene; `refused` — refused, or Automatic could not place it and the cue waits; `skipped` — nothing recorded. */
|
|
581
|
+
outcome: 'suggested' | 'placed' | 'refused' | 'skipped';
|
|
582
|
+
/** The receipt's note for `refused` / `skipped`, a sentence. */
|
|
583
|
+
note?: string;
|
|
584
|
+
/** The `scene_cues` row, when one was written. */
|
|
585
|
+
cueId?: number;
|
|
586
|
+
openedSceneId?: number;
|
|
587
|
+
closedSceneId?: number;
|
|
588
|
+
}
|
|
589
|
+
/**
|
|
590
|
+
* 🚧 **Suggest a new scene** (pass 7, R-i, sprint 2, 2026-10-25): the judged scene check's
|
|
591
|
+
* answer — "the story moved on; the next scene begins at this line, because …" — recorded as a
|
|
592
|
+
* **scene cue** with trigger `judged` (`JUDGED_SCENE_TRIGGER`) and the model's words as its
|
|
593
|
+
* reason. From there the session's scene mode decides, as for any boundary trigger: Suggested —
|
|
594
|
+
* the *New scene?* chip; Automatic — the boundary is placed (unless `ask`); Manual — nothing.
|
|
595
|
+
* The host re-checks the judged check's conditions at commit and skips, with a note, when they
|
|
596
|
+
* no longer hold or `at` is not one of its lines. Never held at the review gate: a cue's review
|
|
597
|
+
* is the chip.
|
|
598
|
+
*
|
|
599
|
+
* ⚠ Not a scene write (a person's *Start scene here*) and not a state proposal.
|
|
600
|
+
* @experimental
|
|
601
|
+
* @ruling R-i (2026-10-24)
|
|
602
|
+
*/
|
|
603
|
+
export declare const proposeSceneCue: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
604
|
+
main: string;
|
|
605
|
+
/** A `ProposedSceneCue`. */
|
|
606
|
+
cue: string;
|
|
607
|
+
}, {
|
|
608
|
+
/**
|
|
609
|
+
* The line the next scene would open at — a message id, as the
|
|
610
|
+
* sweep's sort gives it. `json`, as `set-composer-state@1`'s
|
|
611
|
+
* `person` is: wired from a script's output.
|
|
612
|
+
*/
|
|
613
|
+
at: string;
|
|
614
|
+
/** The channel lane `at` is on, any spelling (canonicalised); absent or blank: `main`. */
|
|
615
|
+
channel: string;
|
|
616
|
+
/** Why, in the model's few words — the chip's reason ("the party left the inn"). */
|
|
617
|
+
reason: string;
|
|
618
|
+
}, "core:outlet/propose-scene-cue@1"> & {
|
|
619
|
+
kind: 'outlet';
|
|
620
|
+
slots?: {
|
|
621
|
+
readonly params: {
|
|
622
|
+
readonly kind: "parameters";
|
|
623
|
+
readonly facet: "behavior";
|
|
624
|
+
readonly schema: {
|
|
625
|
+
readonly ask: {
|
|
626
|
+
readonly type: "boolean";
|
|
627
|
+
readonly default: false;
|
|
628
|
+
readonly label: {
|
|
629
|
+
readonly en: "Always ask";
|
|
630
|
+
};
|
|
631
|
+
readonly description: {
|
|
632
|
+
readonly en: "Offer the new scene as a suggestion even when this session starts scenes on its own (Automatic). Off: the scene setting decides.";
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
};
|
|
637
|
+
} | undefined;
|
|
638
|
+
}>;
|
|
639
|
+
/**
|
|
640
|
+
* 🚧 **Configure a stat** for one owner in this session (owner ruling
|
|
641
|
+
* 2026-10-15): the pipeline door to an owner's **stat configuration** — the
|
|
642
|
+
* deviations from an attribute slot's own config that one owner carries,
|
|
643
|
+
* `{ max: 26 }` on a seat's health. Stored as an `attribute_configs` row
|
|
644
|
+
* through the same writer a person's `state:configure` takes, so the bar,
|
|
645
|
+
* the write's bound and every prompt read the same maximum.
|
|
646
|
+
*
|
|
647
|
+
* The three in-ports are one `StatConfigDocument` (SDK `attributes.ts`) —
|
|
648
|
+
* the format a card or session editor sends too:
|
|
649
|
+
*
|
|
650
|
+
* - `owner` — whose: `player-seat:<id>`, `character:<id>` (that card's
|
|
651
|
+
* session layer) or `world`;
|
|
652
|
+
* - `slot` — the attribute slot id, `core:slot/hp@1`;
|
|
653
|
+
* - `config` — only the keys the slot's stat shape bounds
|
|
654
|
+
* (`statConfigKeys`): a number's `min`/`max`, a choice's `of`, a list's
|
|
655
|
+
* `maxItems` and `of`/`maxLength`, a line's `maxLength`, and every
|
|
656
|
+
* slot's `descriptor`.
|
|
657
|
+
*
|
|
658
|
+
* Refused, halting the run with the sentence: a slot nothing declares or
|
|
659
|
+
* the session does not track, a key the shape does not bound or a value it
|
|
660
|
+
* cannot be, a `min` above the `max` once merged, an owner that is not this
|
|
661
|
+
* session's. Anchored like a value — the owner's open anchor, or `worldRow`
|
|
662
|
+
* for a seat or the world — so a retake or a swipe takes it back.
|
|
663
|
+
*
|
|
664
|
+
* `main` is `{ configId, owner, slot, before, config }`: the row, and the
|
|
665
|
+
* configuration in force before and after it.
|
|
666
|
+
* @experimental
|
|
667
|
+
*/
|
|
668
|
+
export declare const setStatConfig: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
669
|
+
main: string;
|
|
670
|
+
}, {
|
|
671
|
+
/** Whose: a participant reference, `world`, or `location:<id>` (a place's lore entry). */
|
|
672
|
+
owner: string;
|
|
673
|
+
/** The attribute slot: `core:slot/hp@1`. */
|
|
674
|
+
slot: string;
|
|
675
|
+
/**
|
|
676
|
+
* The deviations: `{ max: 26 }`. 🚧 One universal key
|
|
677
|
+
* (2026-10-17): `lock` — `none` · `people` (no hand edit; the
|
|
678
|
+
* dice and the session's owner still write) · `all` (nothing
|
|
679
|
+
* writes until unlocked). The host refuses a locked write with
|
|
680
|
+
* its own sentence; widgets draw the slot without edit controls.
|
|
681
|
+
*/
|
|
682
|
+
config: string;
|
|
683
|
+
/** The row a seat's or the world's configuration is filed at — `set-state@1`'s `worldRow`. Optional. */
|
|
684
|
+
worldRow: string;
|
|
685
|
+
}, "core:outlet/set-stat-config@1"> & {
|
|
686
|
+
kind: 'outlet';
|
|
687
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
688
|
+
}>;
|
|
408
689
|
/**
|
|
409
690
|
* Set one **annex field** (2026-09-26): the write behind every
|
|
410
691
|
* `annexField()` a package declares — core's one pipeline for them all,
|
|
@@ -530,6 +811,36 @@ export declare const branchSession: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
530
811
|
kind: 'outlet';
|
|
531
812
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
532
813
|
}>;
|
|
814
|
+
/**
|
|
815
|
+
* 🚧 Set the session's **backdrop**: `sessions.backdropMediaId`, the picture
|
|
816
|
+
* the Backdrop widget shows behind or beside the Stage — session state, a
|
|
817
|
+
* role pointer like a card's avatar, never a message part.
|
|
818
|
+
*
|
|
819
|
+
* `media` is a media list (what `core:oracle/generate-image@1` publishes);
|
|
820
|
+
* the host takes the FIRST image in it, keyed or not, and refuses a file
|
|
821
|
+
* that belongs to neither this session nor the user the run acts as (the
|
|
822
|
+
* rule `create-message`'s media keeps). A list with no image in it writes
|
|
823
|
+
* nothing, causes no event and publishes a null `mediaId` — it never
|
|
824
|
+
* clears: a person clears a backdrop, a pipeline replaces it. Runs in the
|
|
825
|
+
* session scope the run was started in.
|
|
826
|
+
*
|
|
827
|
+
* Causes `core:event/backdrop-set@1` when the pointer moved. Publishes the
|
|
828
|
+
* write result on `main` and the file id now set on `mediaId` (null when
|
|
829
|
+
* nothing was written).
|
|
830
|
+
*
|
|
831
|
+
* ⚠ Not the app background (`user_settings.background_media_id`), not a
|
|
832
|
+
* message attachment, and not the retired *scene image* pins.
|
|
833
|
+
* @experimental
|
|
834
|
+
*/
|
|
835
|
+
export declare const setBackdrop: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
836
|
+
main: string;
|
|
837
|
+
mediaId: string;
|
|
838
|
+
}, {
|
|
839
|
+
media: string;
|
|
840
|
+
}, "core:outlet/set-backdrop@1"> & {
|
|
841
|
+
kind: 'outlet';
|
|
842
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
843
|
+
}>;
|
|
533
844
|
/**
|
|
534
845
|
* Record a line's **shown sprite**. Writes it on the line's ACTIVE swipe
|
|
535
846
|
* (`metadata.swipes.spriteHistory[currentIdx]`, mirrored to
|
|
@@ -578,6 +889,80 @@ export declare const showSprite: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
578
889
|
kind: 'outlet';
|
|
579
890
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
580
891
|
}>;
|
|
892
|
+
/**
|
|
893
|
+
* 🚧 File pictures as a card's **sprites** — the end of the Sprite set fill.
|
|
894
|
+
*
|
|
895
|
+
* For every item of `media` that carries a series `key`: a `sprites` row in
|
|
896
|
+
* the set named `setName` (the card's default set when the name is blank or
|
|
897
|
+
* gone), under the sprite label that key was drawn for, with
|
|
898
|
+
* `source: 'generated'` and the picture as its file. The label comes from
|
|
899
|
+
* `series` (each item's `vars.label`); with no series the key is the label.
|
|
900
|
+
*
|
|
901
|
+
* - An **empty sprite** waiting under the label is filled first.
|
|
902
|
+
* - Otherwise the picture is added beside what is there — a **variant** —
|
|
903
|
+
* so a second picture under one key, or a run that redraws a label, never
|
|
904
|
+
* replaces a sprite.
|
|
905
|
+
* - An item with **no key** (surplus the host kept) is ignored.
|
|
906
|
+
* - A key in `series` that brought no picture is reported on `missing`.
|
|
907
|
+
*
|
|
908
|
+
* The picture becomes the card's file (provenance: `files.character_id`), so
|
|
909
|
+
* it carries the card's visibility and stays out of the card's gallery like
|
|
910
|
+
* every sprite. Refused unless the run's person owns the card or is an admin.
|
|
911
|
+
*
|
|
912
|
+
* Causes `core:event/sprites-attached@1` when at least one row was written.
|
|
913
|
+
* About a card, not a session: it writes no session row.
|
|
914
|
+
* @experimental
|
|
915
|
+
*/
|
|
916
|
+
export declare const attachSprite: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
917
|
+
main: string;
|
|
918
|
+
/** `[{ label, spriteId }]`, one per row written, in media order. */
|
|
919
|
+
attached: string;
|
|
920
|
+
/** Sprite labels the series asked for that came back with no picture. */
|
|
921
|
+
missing: string;
|
|
922
|
+
}, {
|
|
923
|
+
media: string;
|
|
924
|
+
characterId: string;
|
|
925
|
+
setName: string;
|
|
926
|
+
/** The series the pictures were drawn for — the key → sprite label map. */
|
|
927
|
+
series: string;
|
|
928
|
+
}, "core:outlet/attach-sprite@1"> & {
|
|
929
|
+
kind: 'outlet';
|
|
930
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
931
|
+
}>;
|
|
932
|
+
/**
|
|
933
|
+
* 🚧 **Offer** pictures to a card — put them in the card's **gallery** for a
|
|
934
|
+
* person to pick from (the end of Portrait).
|
|
935
|
+
*
|
|
936
|
+
* Each image in `media` becomes a picture of the card's gallery, after the
|
|
937
|
+
* pictures already there, in media order. Nothing is chosen for the person:
|
|
938
|
+
* the avatar and the likeness image are left as they are. *Use as avatar*
|
|
939
|
+
* and *Use as likeness image* on the gallery tile are the person's, later.
|
|
940
|
+
*
|
|
941
|
+
* - An item that is not an image is skipped.
|
|
942
|
+
* - A picture must be the run person's own file or already the card's — a
|
|
943
|
+
* media reference is an address anyone could type, and the gallery would
|
|
944
|
+
* re-publish whatever it names under the card's visibility.
|
|
945
|
+
* - A picture that is already one of the card's files stays where it is.
|
|
946
|
+
*
|
|
947
|
+
* `offered` is `[{ mediaId, key }]`, one per picture placed, with the series
|
|
948
|
+
* key it was drawn for (`null` for surplus the host kept unkeyed). Refused
|
|
949
|
+
* unless the run's person owns the card or is an admin.
|
|
950
|
+
*
|
|
951
|
+
* Causes `core:event/media-offered@1` when at least one picture was placed.
|
|
952
|
+
* About a card, not a session: it writes no session row.
|
|
953
|
+
* @experimental
|
|
954
|
+
*/
|
|
955
|
+
export declare const offerMedia: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
956
|
+
main: string;
|
|
957
|
+
/** `[{ mediaId, key }]`, one per picture placed, in media order. */
|
|
958
|
+
offered: string;
|
|
959
|
+
}, {
|
|
960
|
+
media: string;
|
|
961
|
+
characterId: string;
|
|
962
|
+
}, "core:outlet/offer-media@1"> & {
|
|
963
|
+
kind: 'outlet';
|
|
964
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
965
|
+
}>;
|
|
581
966
|
/**
|
|
582
967
|
* Move a session's **story clock** — the session's own story now — by `by` of
|
|
583
968
|
* `unit`, through its lorebook's calendar (`advanceStoryTime`): carried by a
|
|
@@ -586,20 +971,33 @@ export declare const showSprite: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
586
971
|
*
|
|
587
972
|
* Moves the session's clock only, never the book's or its line's present. A
|
|
588
973
|
* session with no clock of its own starts from its line's present. Refused
|
|
589
|
-
* with a sentence — the run halts
|
|
590
|
-
*
|
|
591
|
-
* the book's calendar; never
|
|
974
|
+
* with a sentence — the run halts, unless the spec says `onRefusal: 'skip'`
|
|
975
|
+
* — when the session has no lorebook, when there is no present to start
|
|
976
|
+
* from, and when the result does not land in the book's calendar; never
|
|
977
|
+
* clamped, never a silent no-op.
|
|
592
978
|
*
|
|
593
979
|
* `by` and `unit` in-ports, when wired, win over the parameters. To advance
|
|
594
980
|
* once per reply, place it in a spec bound to the reply's event, which runs
|
|
595
981
|
* after the reply is saved. (No ordering-only in-port: an unread port is a
|
|
596
982
|
* declared control no run consults — `declaredReads`.)
|
|
983
|
+
*
|
|
984
|
+
* 🚧 Every move it makes is written to the session's state ledger, anchored
|
|
985
|
+
* where the world's changes are (live scenes §15 G5, 2026-10-13): the person
|
|
986
|
+
* reads it under the message ("Time passes: 3 hours (… → …)"), and a delete,
|
|
987
|
+
* swipe or regenerate of that message takes it back as it takes values back.
|
|
988
|
+
* Why the clock moved is the spec's to say (`cause`), never inferred from
|
|
989
|
+
* the run's inlet.
|
|
597
990
|
* @experimental
|
|
598
991
|
*/
|
|
599
992
|
export declare const advanceStoryClock: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
600
993
|
main: string;
|
|
601
994
|
/** The session's story clock as it now stands: `{ year, month?, day?, hour?, minute? }`. */
|
|
602
995
|
clock: string;
|
|
996
|
+
/**
|
|
997
|
+
* 🚧 Why the clock did not move, under `onRefusal: 'skip'` —
|
|
998
|
+
* the sentence the person reads; empty when it moved.
|
|
999
|
+
*/
|
|
1000
|
+
skipped: string;
|
|
603
1001
|
/** It spelled through the book's calendar. */
|
|
604
1002
|
label: string;
|
|
605
1003
|
}, {
|
|
@@ -607,6 +1005,39 @@ export declare const advanceStoryClock: import("@serene-pub/sdk").Pinned<import(
|
|
|
607
1005
|
by: string;
|
|
608
1006
|
/** One of the units; wins over the `unit` parameter when wired. */
|
|
609
1007
|
unit: string;
|
|
1008
|
+
/**
|
|
1009
|
+
* 🚧 **Why the clock moves** (live scenes §15 G4, 2026-10-13),
|
|
1010
|
+
* a literal: `'action'` — a person's press (*Time passes…*);
|
|
1011
|
+
* `'keeper'` — the state-keeper's move under Trust the
|
|
1012
|
+
* narrator; `'tick'` — a reply's fixed tick. An action's and
|
|
1013
|
+
* the keeper's move are **time actions** the boundary watcher
|
|
1014
|
+
* may begin a new scene at; a tick never is. Unwired reads as
|
|
1015
|
+
* `'action'`.
|
|
1016
|
+
*
|
|
1017
|
+
* ## A port, not a parameter, and the call site is what decides
|
|
1018
|
+
*
|
|
1019
|
+
* As `show-sprite@1`'s `source`: a literal in the node's
|
|
1020
|
+
* config, because why a step moves the clock is a structural
|
|
1021
|
+
* fact of the document, not a knob for the panel. It was the
|
|
1022
|
+
* host's to infer from the run's inlet until 2026-10-13, and a
|
|
1023
|
+
* keeper's move on a reply turn was then never a time action.
|
|
1024
|
+
* It also decides what a swipe or a regenerate takes back: a
|
|
1025
|
+
* tick stands (the re-driven reply never ticks again), every
|
|
1026
|
+
* other move goes with the reply.
|
|
1027
|
+
*/
|
|
1028
|
+
cause: string;
|
|
1029
|
+
/**
|
|
1030
|
+
* 🚧 **What a refusal does** (live scenes §15 G7), a literal:
|
|
1031
|
+
* `'halt'` (unwired) stops the run with the sentence;
|
|
1032
|
+
* `'skip'` moves nothing, puts the sentence on `skipped` and
|
|
1033
|
+
* on the session's state ledger, and lets the run finish — for
|
|
1034
|
+
* a step that runs after other changes already landed, which
|
|
1035
|
+
* a halt would leave looking like a failed turn. Every core
|
|
1036
|
+
* spec's skips: Adventure's keeper steps and its *Time
|
|
1037
|
+
* passes…*, Chat's reply tick, and Chat's and the Lair's *Time
|
|
1038
|
+
* passes…* (live scenes §15 G12).
|
|
1039
|
+
*/
|
|
1040
|
+
onRefusal: string;
|
|
610
1041
|
}, "core:outlet/advance-story-clock@1"> & {
|
|
611
1042
|
kind: 'outlet';
|
|
612
1043
|
slots?: {
|
|
@@ -715,7 +1146,7 @@ export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
715
1146
|
/**
|
|
716
1147
|
* Write the finished entry. Gate-eligible, so it publishes a write result.
|
|
717
1148
|
*
|
|
718
|
-
* ## Which kind of entry — the pipeline's decision, at last (
|
|
1149
|
+
* ## Which kind of entry — the pipeline's decision, at last (2026-09-17)
|
|
719
1150
|
*
|
|
720
1151
|
* The host's commit case has said since the four summarize namespaces were
|
|
721
1152
|
* written that *which kind of entry comes from the pipeline that ran*. It did
|
|
@@ -739,7 +1170,7 @@ export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
739
1170
|
* ## `links`, or a second write
|
|
740
1171
|
*
|
|
741
1172
|
* Linking a new entry takes one of two shapes, and both exist on purpose.
|
|
742
|
-
* (A pipeline may write many times —
|
|
1173
|
+
* (A pipeline may write many times — only the live row is limited to one — so
|
|
743
1174
|
* `core:outlet/link-lore-entries@1` may also follow this outlet in the same
|
|
744
1175
|
* run, each its own transaction.)
|
|
745
1176
|
*
|
|
@@ -754,9 +1185,23 @@ export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
754
1185
|
*
|
|
755
1186
|
* Each entry of `links` is a name or an entry id, or a `LoreLinkInput` —
|
|
756
1187
|
* `{ to, linkType?, reverseLinkType?, name?, description? }` — for one that
|
|
757
|
-
* says more (
|
|
1188
|
+
* says more (2026-09-29). Absent on nearly every write, and an
|
|
758
1189
|
* empty list is the same as none. A link the list states twice, or one the
|
|
759
1190
|
* session already reads, is written once: see `linkLoreEntries` on idempotence.
|
|
1191
|
+
*
|
|
1192
|
+
* ## `fields` — the entry type's own half (🚧 2026-10-21, Lair rewrite D2)
|
|
1193
|
+
*
|
|
1194
|
+
* The typed fields the entry type declares (`EntryShape.fields` — a place's
|
|
1195
|
+
* category; a derived entry type's piece fields, a weapon's damage), as one
|
|
1196
|
+
* object keyed by field. Its title-role field is not among them: that is the
|
|
1197
|
+
* `name` port. Checked against the type named by `entryType` with the SDK's
|
|
1198
|
+
* one checker (`fieldsFindings`) at the review gate and again at the commit:
|
|
1199
|
+
* a misfit — an undeclared key, a value of the wrong kind, a required field
|
|
1200
|
+
* missing — is refused with the field named, never trimmed to fit. A pipeline
|
|
1201
|
+
* asks a model for them with `jsonSchemaOf(entryType)` into
|
|
1202
|
+
* `generate-json@1`'s `schema`, so what is asked and what is checked are one
|
|
1203
|
+
* declaration. Absent: the type's declared defaults, as before. `@1` evolves
|
|
1204
|
+
* in place (pre-release).
|
|
760
1205
|
* @internal
|
|
761
1206
|
*/
|
|
762
1207
|
export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
@@ -767,9 +1212,28 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
767
1212
|
content: string;
|
|
768
1213
|
/**
|
|
769
1214
|
* Links to write from this entry in the same commit — see the
|
|
770
|
-
* note above on
|
|
1215
|
+
* note above on the live row. Names, entry ids, or `LoreLinkInput`s.
|
|
771
1216
|
*/
|
|
772
1217
|
links: string;
|
|
1218
|
+
/**
|
|
1219
|
+
* 🚧 The entry type's typed fields, one object keyed by field
|
|
1220
|
+
* (the title's field excepted) — checked whole against the
|
|
1221
|
+
* type (`fieldsFindings`); see the note above.
|
|
1222
|
+
*/
|
|
1223
|
+
fields: string;
|
|
1224
|
+
/**
|
|
1225
|
+
* 🚧 The messages this write was written from. Pass it when the write is a
|
|
1226
|
+
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1227
|
+
* session's settle line moves to the newest of them.
|
|
1228
|
+
*/
|
|
1229
|
+
sources: string;
|
|
1230
|
+
/** 🚧 A `LoreMatch` — how to find the entry this would otherwise create. */
|
|
1231
|
+
match: string;
|
|
1232
|
+
/**
|
|
1233
|
+
* 🚧 The cast member this entry is filed under — a `character:<id>` reference, resolved to that
|
|
1234
|
+
* character's cast member in the book the entry lands in (the entry type's `anchor` role).
|
|
1235
|
+
*/
|
|
1236
|
+
bind: string;
|
|
773
1237
|
}, "core:outlet/create-lore-entry@1"> & {
|
|
774
1238
|
kind: 'outlet';
|
|
775
1239
|
slots?: {
|
|
@@ -790,7 +1254,53 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
790
1254
|
} | undefined;
|
|
791
1255
|
}>;
|
|
792
1256
|
/**
|
|
793
|
-
*
|
|
1257
|
+
* 🚧 Change an entry of the session's lorebook — its name, its content, its
|
|
1258
|
+
* typed fields (2026-10-21, Lair rewrite D2: *File as a room* on a room that
|
|
1259
|
+
* already exists, a draft's fields laid onto an entry a person wrote).
|
|
1260
|
+
*
|
|
1261
|
+
* `entry` names it as `link-lore-entries@1`'s `to` does: an entry id, the
|
|
1262
|
+
* write result of the write that made it, or a **name** resolved within the
|
|
1263
|
+
* session's own lorebook (case and surrounding space ignored; a name nothing
|
|
1264
|
+
* answers to, or two entries answer to, is refused with a sentence).
|
|
1265
|
+
*
|
|
1266
|
+
* Every in-port but `entry` is optional, and an absent one leaves that part
|
|
1267
|
+
* as it is. `fields` is a **patch**: the keys it names are laid over the
|
|
1268
|
+
* entry's stored fields and the rest kept, `null` clears one; it is checked
|
|
1269
|
+
* against the entry's own type as a patch (`fieldsFindings(type, fields,
|
|
1270
|
+
* { partial: true })`) at the review gate and at the commit, and a misfit is
|
|
1271
|
+
* refused with the field named. The type itself never changes — a room stays
|
|
1272
|
+
* a place.
|
|
1273
|
+
*
|
|
1274
|
+
* How the change lands is the host's: on the session's line, the way the
|
|
1275
|
+
* lorebook's own editor writes an edit there (an amendment where the line
|
|
1276
|
+
* amends). ⚠ It causes no event yet (🚧): `lore-entry-created` means a new
|
|
1277
|
+
* row, and a subscriber that needs edits waits for one of its own.
|
|
1278
|
+
* @internal
|
|
1279
|
+
*/
|
|
1280
|
+
export declare const updateLoreEntry: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1281
|
+
main: string;
|
|
1282
|
+
entryId: string;
|
|
1283
|
+
}, {
|
|
1284
|
+
/** The entry to change: an id, a write result, or a name in the session's lorebook. */
|
|
1285
|
+
entry: string;
|
|
1286
|
+
/** Its new name. Absent: kept. */
|
|
1287
|
+
name: string;
|
|
1288
|
+
/** Its new content. Absent: kept. */
|
|
1289
|
+
content: string;
|
|
1290
|
+
/** Typed fields laid over the stored ones, key by key; `null` clears one. Absent: kept. */
|
|
1291
|
+
fields: string;
|
|
1292
|
+
/**
|
|
1293
|
+
* 🚧 The messages this write was written from. Pass it when the write is a
|
|
1294
|
+
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1295
|
+
* session's settle line moves to the newest of them.
|
|
1296
|
+
*/
|
|
1297
|
+
sources: string;
|
|
1298
|
+
}, "core:outlet/update-lore-entry@1"> & {
|
|
1299
|
+
kind: 'outlet';
|
|
1300
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1301
|
+
}>;
|
|
1302
|
+
/**
|
|
1303
|
+
* Link two lore entries (2026-09-17).
|
|
794
1304
|
*
|
|
795
1305
|
* ## The gap it closes
|
|
796
1306
|
*
|
|
@@ -805,7 +1315,7 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
805
1315
|
* ## Both ends, and the one scope
|
|
806
1316
|
*
|
|
807
1317
|
* `from` is an entry id — or, straight off `create-lore-entry@1`, its
|
|
808
|
-
* `entryId` write result, which is assignable to `row-ids@1
|
|
1318
|
+
* `entryId` write result, which is assignable to `row-ids@1`. `to`
|
|
809
1319
|
* is an id **or a name**, resolved within the session's own lorebook, case
|
|
810
1320
|
* and surrounding space ignored. A name is the half that makes the law below
|
|
811
1321
|
* survivable, and it is also the half that can be wrong in two ways, so both
|
|
@@ -820,14 +1330,14 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
820
1330
|
*
|
|
821
1331
|
* ## After a create
|
|
822
1332
|
*
|
|
823
|
-
* It may follow `core:outlet/create-lore-entry@1` in the same run (
|
|
824
|
-
*
|
|
1333
|
+
* It may follow `core:outlet/create-lore-entry@1` in the same run (only the
|
|
1334
|
+
* live row is limited to one), linking by name what that write created — which is why
|
|
825
1335
|
* `to` takes one; a later run can do the same. Each write is its own
|
|
826
1336
|
* transaction, so a failed link leaves the entry behind. When the entry and
|
|
827
1337
|
* its links are one thought, `create-lore-entry`'s own `links` in-port writes
|
|
828
1338
|
* the edges in the row's transaction instead — the shape a room-builder wants.
|
|
829
1339
|
*
|
|
830
|
-
* ## What the link says (
|
|
1340
|
+
* ## What the link says (2026-09-29)
|
|
831
1341
|
*
|
|
832
1342
|
* The row is a **relationship**, and it carries the relationship's whole
|
|
833
1343
|
* descriptor — the same four words the lorebook's own link form edits:
|
|
@@ -885,6 +1395,12 @@ export declare const linkLoreEntries: import("@serene-pub/sdk").Pinned<import("@
|
|
|
885
1395
|
name: string;
|
|
886
1396
|
/** Its description. Optional. */
|
|
887
1397
|
description: string;
|
|
1398
|
+
/**
|
|
1399
|
+
* 🚧 The messages this write was written from. Pass it when the write is a
|
|
1400
|
+
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1401
|
+
* session's settle line moves to the newest of them.
|
|
1402
|
+
*/
|
|
1403
|
+
sources: string;
|
|
888
1404
|
}, "core:outlet/link-lore-entries@1"> & {
|
|
889
1405
|
kind: 'outlet';
|
|
890
1406
|
slots?: {
|
|
@@ -912,9 +1428,26 @@ export declare const linkLoreEntries: import("@serene-pub/sdk").Pinned<import("@
|
|
|
912
1428
|
};
|
|
913
1429
|
} | undefined;
|
|
914
1430
|
}>;
|
|
1431
|
+
/**
|
|
1432
|
+
* 🚧 How `create-lore-entry@1` finds the entry it would otherwise create (pass 8, R-h).
|
|
1433
|
+
* The host looks in the book it writes to, on the session's line, under the book's lock:
|
|
1434
|
+
* none → create; one → update it (as `update-lore-entry@1` would, fields as a patch); two or
|
|
1435
|
+
* more → REFUSED, the refusal naming every candidate (`'<name>' (entry <id>)`), retry with `entryId`.
|
|
1436
|
+
* `name` and `key` match within this write's own `entryType` (R-h's `{ type, name }` is that pair);
|
|
1437
|
+
* case and surrounding space ignored. `key` matches an entry whose trigger keys include it.
|
|
1438
|
+
* ⚠ Not an entry's `matchMode` (how its keys are matched in retrieval).
|
|
1439
|
+
* @experimental
|
|
1440
|
+
*/
|
|
1441
|
+
export type LoreMatch = {
|
|
1442
|
+
readonly entryId: number;
|
|
1443
|
+
} | {
|
|
1444
|
+
readonly name: string;
|
|
1445
|
+
} | {
|
|
1446
|
+
readonly key: string;
|
|
1447
|
+
};
|
|
915
1448
|
/**
|
|
916
1449
|
* One lore link a spec asks for — an element of
|
|
917
|
-
* `core:outlet/create-lore-entry@1`'s `links` (
|
|
1450
|
+
* `core:outlet/create-lore-entry@1`'s `links` (2026-09-29).
|
|
918
1451
|
*
|
|
919
1452
|
* The same four words as `core:outlet/link-lore-entries@1`'s ports and
|
|
920
1453
|
* parameters, and as the `LoreLinkRow` a listing reads back: what you write is
|
|
@@ -940,7 +1473,7 @@ export interface LoreLinkInput {
|
|
|
940
1473
|
}
|
|
941
1474
|
/**
|
|
942
1475
|
* One lore link on a `core:query/lorebook-entries@1` row, listed when the
|
|
943
|
-
* spec asks for `withLinks` (
|
|
1476
|
+
* spec asks for `withLinks` (2026-09-29).
|
|
944
1477
|
*
|
|
945
1478
|
* **Said from the listed entry**: `to` is the far end, whichever end of the
|
|
946
1479
|
* relationship the listed entry is. A relationship drawn from here reads by
|
|
@@ -983,6 +1516,12 @@ export declare const graphProposal: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
983
1516
|
proposalId: string;
|
|
984
1517
|
}, {
|
|
985
1518
|
proposal: string;
|
|
1519
|
+
/**
|
|
1520
|
+
* 🚧 The messages this write was written from. Pass it when the write is a
|
|
1521
|
+
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1522
|
+
* session's settle line moves to the newest of them.
|
|
1523
|
+
*/
|
|
1524
|
+
sources: string;
|
|
986
1525
|
}, "core:outlet/graph-proposal@1"> & {
|
|
987
1526
|
kind: 'outlet';
|
|
988
1527
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|