@serene-pub/contracts 0.6.0-pr-5 โ 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/inlets.d.ts +183 -0
- package/dist/inlets.js +350 -2
- package/dist/oracles.d.ts +132 -0
- package/dist/oracles.js +137 -2
- package/dist/outlets.d.ts +389 -0
- package/dist/outlets.js +411 -6
- package/dist/queries.d.ts +70 -1
- package/dist/queries.js +82 -2
- package/dist/tasks.d.ts +509 -7
- package/dist/tasks.js +385 -7
- package/package.json +3 -3
package/dist/outlets.d.ts
CHANGED
|
@@ -206,6 +206,45 @@ 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?: {
|
|
@@ -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,14 +347,42 @@ 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;
|
|
@@ -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,
|
|
@@ -907,6 +1188,20 @@ export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
907
1188
|
* says more (2026-09-29). Absent on nearly every write, and an
|
|
908
1189
|
* empty list is the same as none. A link the list states twice, or one the
|
|
909
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).
|
|
910
1205
|
* @internal
|
|
911
1206
|
*/
|
|
912
1207
|
export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
@@ -920,6 +1215,25 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
920
1215
|
* note above on the live row. Names, entry ids, or `LoreLinkInput`s.
|
|
921
1216
|
*/
|
|
922
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;
|
|
923
1237
|
}, "core:outlet/create-lore-entry@1"> & {
|
|
924
1238
|
kind: 'outlet';
|
|
925
1239
|
slots?: {
|
|
@@ -939,6 +1253,52 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
939
1253
|
};
|
|
940
1254
|
} | undefined;
|
|
941
1255
|
}>;
|
|
1256
|
+
/**
|
|
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
|
+
}>;
|
|
942
1302
|
/**
|
|
943
1303
|
* Link two lore entries (2026-09-17).
|
|
944
1304
|
*
|
|
@@ -1035,6 +1395,12 @@ export declare const linkLoreEntries: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1035
1395
|
name: string;
|
|
1036
1396
|
/** Its description. Optional. */
|
|
1037
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;
|
|
1038
1404
|
}, "core:outlet/link-lore-entries@1"> & {
|
|
1039
1405
|
kind: 'outlet';
|
|
1040
1406
|
slots?: {
|
|
@@ -1062,6 +1428,23 @@ export declare const linkLoreEntries: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1062
1428
|
};
|
|
1063
1429
|
} | undefined;
|
|
1064
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
|
+
};
|
|
1065
1448
|
/**
|
|
1066
1449
|
* One lore link a spec asks for โ an element of
|
|
1067
1450
|
* `core:outlet/create-lore-entry@1`'s `links` (2026-09-29).
|
|
@@ -1133,6 +1516,12 @@ export declare const graphProposal: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
1133
1516
|
proposalId: string;
|
|
1134
1517
|
}, {
|
|
1135
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;
|
|
1136
1525
|
}, "core:outlet/graph-proposal@1"> & {
|
|
1137
1526
|
kind: 'outlet';
|
|
1138
1527
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|