@serene-pub/contracts 0.6.0-pr-6 → 0.6.0-pr-8
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 +16 -8
- package/dist/inlets.js +17 -8
- package/dist/oracles.d.ts +192 -5
- package/dist/oracles.js +106 -10
- package/dist/outlets.d.ts +413 -18
- package/dist/outlets.js +462 -21
- package/dist/queries.d.ts +429 -1
- package/dist/queries.js +435 -3
- package/dist/tasks.d.ts +257 -24
- package/dist/tasks.js +175 -15
- package/package.json +3 -3
package/dist/outlets.d.ts
CHANGED
|
@@ -433,13 +433,31 @@ export declare const setTurnOrder: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
433
433
|
* ruling, reversing the original "no causesEvent"): a package's state is the annex, and a
|
|
434
434
|
* genre that wants its turn order to answer that state binds the event in
|
|
435
435
|
* the open, where the event map draws it — not through a back door.
|
|
436
|
+
*
|
|
437
|
+
* 🚧 Every write that moves the document moves the owner's **annex document
|
|
438
|
+
* version** (a count, 0 before the first): `base` makes the write a
|
|
439
|
+
* compare-and-set on it, so a run that read the document before another run
|
|
440
|
+
* wrote it is refused rather than overwriting that run's write.
|
|
436
441
|
* @experimental
|
|
437
442
|
*/
|
|
438
443
|
export declare const setSessionAnnex: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
439
444
|
main: string;
|
|
445
|
+
/** The owner's document as written — or, when `base` was stale, as it stands now. Never core's runtime keys. */
|
|
440
446
|
annex: string;
|
|
447
|
+
/** 🚧 The owner's annex document version after this write (unchanged when nothing was written). */
|
|
448
|
+
version: string;
|
|
441
449
|
}, {
|
|
442
450
|
value: string;
|
|
451
|
+
/**
|
|
452
|
+
* 🚧 Compare-and-set (M2a a8): the owner's **annex document
|
|
453
|
+
* version** this run read — `session-annex`'s `version`. When the
|
|
454
|
+
* stored version is another, nothing is written: the write result
|
|
455
|
+
* says `stale: true` (`written: false`, with a receipt note), and
|
|
456
|
+
* `annex` and `version` carry the document as it stands now, to
|
|
457
|
+
* build on again. Absent, the write lands as it always did (the
|
|
458
|
+
* last writer's value wins).
|
|
459
|
+
*/
|
|
460
|
+
base: string;
|
|
443
461
|
}, "core:outlet/set-session-annex@1"> & {
|
|
444
462
|
kind: 'outlet';
|
|
445
463
|
slots?: {
|
|
@@ -522,6 +540,43 @@ export declare const setSeatName: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
522
540
|
kind: 'outlet';
|
|
523
541
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
524
542
|
}>;
|
|
543
|
+
/**
|
|
544
|
+
* 🚧 **Bench a seat, or bring it back** (owner ruling 2026-11-10: a seat's
|
|
545
|
+
* status is managed by the genre, never by core on its own). Benched, a seat
|
|
546
|
+
* stays in the session and leaves the turns; brought back, it takes its turns
|
|
547
|
+
* again.
|
|
548
|
+
*
|
|
549
|
+
* Opt-in: a genre declares `writes.seats: true` (absent is off). Without it
|
|
550
|
+
* the host refuses, in words.
|
|
551
|
+
*
|
|
552
|
+
* Tied to the turn: the bench is recorded against the run's turn message.
|
|
553
|
+
* Back and a retake put the seat back as it was, Forward does it again, and a
|
|
554
|
+
* person's later bench or drag wins (the undo only puts back a seat still as
|
|
555
|
+
* this port left it). With no turn message (a person's action) the write is
|
|
556
|
+
* not tied to a turn.
|
|
557
|
+
*
|
|
558
|
+
* A seat already in the asked state is a no-op. Envoys and removed seats are
|
|
559
|
+
* refused. `seat` / `seats` give the seat's reference, as `set-seat-name@1`
|
|
560
|
+
* does.
|
|
561
|
+
*
|
|
562
|
+
* `seat` is `seated-member:<id>`, `player-seat:<id>` or `character:<id>`, and
|
|
563
|
+
* `benched` is `true` to bench or `false` to bring back; both are JSON, as
|
|
564
|
+
* `setSeatName.retire` and `setComposerState.open` are. `@1` evolves in place.
|
|
565
|
+
* @experimental
|
|
566
|
+
*/
|
|
567
|
+
export declare const setSeatBench: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
568
|
+
main: string;
|
|
569
|
+
seat: string;
|
|
570
|
+
seats: string;
|
|
571
|
+
}, {
|
|
572
|
+
/** The seat: `seated-member:<id>`, `player-seat:<id>` or `character:<id>`. */
|
|
573
|
+
seat: string;
|
|
574
|
+
/** `true` benches the seat, `false` brings it back. */
|
|
575
|
+
benched: string;
|
|
576
|
+
}, "core:outlet/set-seat-bench@1"> & {
|
|
577
|
+
kind: 'outlet';
|
|
578
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
579
|
+
}>;
|
|
525
580
|
/**
|
|
526
581
|
* 🚧 **Open or close the composer** on a channel lane (owner ruling
|
|
527
582
|
* 2026-10-15): the genre's switch for whether a person may write there. The
|
|
@@ -596,6 +651,8 @@ export interface ProposedSceneCue {
|
|
|
596
651
|
* no longer hold or `at` is not one of its lines. Never held at the review gate: a cue's review
|
|
597
652
|
* is the chip.
|
|
598
653
|
*
|
|
654
|
+
* 🚧 An optional `trigger` in-port names the boundary trigger the scene cue is for (absent or blank: `judged`); the scenes routine passes the one that fired at `at`.
|
|
655
|
+
*
|
|
599
656
|
* ⚠ Not a scene write (a person's *Start scene here*) and not a state proposal.
|
|
600
657
|
* @experimental
|
|
601
658
|
* @ruling R-i (2026-10-24)
|
|
@@ -615,6 +672,12 @@ export declare const proposeSceneCue: import("@serene-pub/sdk").Pinned<import("@
|
|
|
615
672
|
channel: string;
|
|
616
673
|
/** Why, in the model's few words — the chip's reason ("the party left the inn"). */
|
|
617
674
|
reason: string;
|
|
675
|
+
/**
|
|
676
|
+
* 🚧 The boundary trigger the scene cue is for. Absent or blank: `judged` (the judged scene check's, as before).
|
|
677
|
+
* The scenes routine (`core:spec/scene-boundaries`) passes the boundary trigger that fired at `at`; a scene cue already at
|
|
678
|
+
* that line for that boundary trigger (a time action's marker) is the one offered or placed.
|
|
679
|
+
*/
|
|
680
|
+
trigger: string;
|
|
618
681
|
}, "core:outlet/propose-scene-cue@1"> & {
|
|
619
682
|
kind: 'outlet';
|
|
620
683
|
slots?: {
|
|
@@ -636,6 +699,64 @@ export declare const proposeSceneCue: import("@serene-pub/sdk").Pinned<import("@
|
|
|
636
699
|
};
|
|
637
700
|
} | undefined;
|
|
638
701
|
}>;
|
|
702
|
+
/**
|
|
703
|
+
* 🚧 **Summarize a finished scene** — the scene summaries routine's outlet
|
|
704
|
+
* (every name here is provisional): starts the session genre's **own** scene
|
|
705
|
+
* summarizer (its summarize-scene pipeline, never a second prompt) for one
|
|
706
|
+
* finished scene, in the background, and returns at once: the summary's model
|
|
707
|
+
* calls are never awaited by the routine's run.
|
|
708
|
+
*
|
|
709
|
+
* Under the routine's **Full** the result is saved by itself (the summary, and
|
|
710
|
+
* the model's name only while the scene still has its automatic name; the known
|
|
711
|
+
* cast stored at the scene's close is left as it is) and marked as saved by the
|
|
712
|
+
* routine; a summary saved this way never settles the story. Under **Review**
|
|
713
|
+
* it waits for a person in the review window, as a pressed *Summarize* does.
|
|
714
|
+
* Its model calls queue as a routine's, after people's replies. The host half
|
|
715
|
+
* is the app's.
|
|
716
|
+
*
|
|
717
|
+
* ⚠ Not `scenes:process` (a person's press) and not *Compile to Entry*.
|
|
718
|
+
* @experimental
|
|
719
|
+
*/
|
|
720
|
+
export declare const summarizeFinishedScene: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
721
|
+
main: string;
|
|
722
|
+
}, {
|
|
723
|
+
/** The scene to summarize: a scene id, as `core:query/scene-summary-due@1` names it. Absent or null: nothing is due, and nothing starts. */
|
|
724
|
+
scene: string;
|
|
725
|
+
/** The routine inlet's `routine` port (the firing): its `mode` decides what the summary becomes. */
|
|
726
|
+
routine: string;
|
|
727
|
+
}, "core:outlet/summarize-finished-scene@1"> & {
|
|
728
|
+
kind: 'outlet';
|
|
729
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
730
|
+
}>;
|
|
731
|
+
/**
|
|
732
|
+
* 🚧 **Note it in the scene** (★S4, owner 2026-11-10): adds a note to a scene — a fact that
|
|
733
|
+
* isn't a story line (a death, a treaty, a clock jump). Notes reach the scene's summary and
|
|
734
|
+
* Compile. Never writes history or messages. Refused when the genre writes no scenes, when the
|
|
735
|
+
* scene is another session's, or when no scene is open.
|
|
736
|
+
*
|
|
737
|
+
* Scenes first: a pipeline puts story events into scenes — this outlet, or a story line through
|
|
738
|
+
* `create-message@1` — and a person's Compile files a day's scenes under that day's one history
|
|
739
|
+
* entry. A history write through `create-lore-entry@1` is the second choice.
|
|
740
|
+
*
|
|
741
|
+
* `text` is required. `scene` names a scene by id; absent, the note goes to the run's lane's open
|
|
742
|
+
* scene. `sources` (optional) are the messages the note was written from, the shape the lore
|
|
743
|
+
* writes take. "The genre writes no scenes" is `writes.scenes: false`. The host half is the app's.
|
|
744
|
+
* @experimental
|
|
745
|
+
* @ruling ★S4 (2026-11-10)
|
|
746
|
+
*/
|
|
747
|
+
export declare const noteScene: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
748
|
+
main: string;
|
|
749
|
+
}, {
|
|
750
|
+
/** The note, a sentence or two. Required. */
|
|
751
|
+
text: string;
|
|
752
|
+
/** A scene id. Optional; absent, the run's lane's open scene. `json`, as `propose-scene-cue@1`'s `at` is. */
|
|
753
|
+
scene: string;
|
|
754
|
+
/** 🚧 The messages the note was written from — as the lore writes take them. Optional. */
|
|
755
|
+
sources: string;
|
|
756
|
+
}, "core:outlet/note-scene@1"> & {
|
|
757
|
+
kind: 'outlet';
|
|
758
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
759
|
+
}>;
|
|
639
760
|
/**
|
|
640
761
|
* 🚧 **Configure a stat** for one owner in this session (owner ruling
|
|
641
762
|
* 2026-10-15): the pipeline door to an owner's **stat configuration** — the
|
|
@@ -711,6 +832,65 @@ export declare const setAnnexField: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
711
832
|
kind: 'outlet';
|
|
712
833
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
713
834
|
}>;
|
|
835
|
+
/**
|
|
836
|
+
* 🚧 Write one owner's document into the **lorebook annex** (M0,
|
|
837
|
+
* SHAPES L9): the `set-session-annex` write at book scope. A write from a
|
|
838
|
+
* session is a change — anchored to the turn, filed as a `lore_imprints` row
|
|
839
|
+
* (subject `annex`), retractable, settled with the stretch — routed like
|
|
840
|
+
* every lore write; a write from a book-level run is lasting at once.
|
|
841
|
+
* @experimental
|
|
842
|
+
*/
|
|
843
|
+
export declare const setLorebookAnnex: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
844
|
+
main: string;
|
|
845
|
+
/** The owner's document as written — or, when `base` was stale, as it stands now. */
|
|
846
|
+
annex: string;
|
|
847
|
+
/** 🚧 (M2b) The owner's annex document version on the book after this write (unchanged when nothing was written). */
|
|
848
|
+
version: string;
|
|
849
|
+
}, {
|
|
850
|
+
value: string;
|
|
851
|
+
/**
|
|
852
|
+
* 🚧 Compare-and-set (M2b), as `set-session-annex`'s `base`: the
|
|
853
|
+
* owner's annex document version this run read — `lorebook-annex`'s
|
|
854
|
+
* `version`. Another stored version writes nothing (`written: false`,
|
|
855
|
+
* `stale: true`, a receipt note), and `annex` and `version` carry the
|
|
856
|
+
* document as it stands now. Absent, the last write wins.
|
|
857
|
+
*/
|
|
858
|
+
base: string;
|
|
859
|
+
}, "core:outlet/set-lorebook-annex@1"> & {
|
|
860
|
+
kind: 'outlet';
|
|
861
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
862
|
+
}>;
|
|
863
|
+
/**
|
|
864
|
+
* 🚧 Set one annex field declared `annexField({ scope: 'lorebook' })`
|
|
865
|
+
* (M0, SHAPES L9): the `set-annex-field` write at book scope, under the
|
|
866
|
+
* same rules as {@link setLorebookAnnex}.
|
|
867
|
+
* @experimental
|
|
868
|
+
*/
|
|
869
|
+
export declare const setLorebookAnnexField: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
870
|
+
main: string;
|
|
871
|
+
}, {
|
|
872
|
+
payload: string;
|
|
873
|
+
}, "core:outlet/set-lorebook-annex-field@1"> & {
|
|
874
|
+
kind: 'outlet';
|
|
875
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
876
|
+
}>;
|
|
877
|
+
/**
|
|
878
|
+
* 🚧 Move the session's rules to another version of their ruleset (M0,
|
|
879
|
+
* SHAPES L4 Conversion): built-in and owner-only, also the socket
|
|
880
|
+
* `sessions:convertRuleset`. Per session it re-keys renamed slots, retracts
|
|
881
|
+
* removed ones and inserts defaults for added ones — each an anchored change,
|
|
882
|
+
* retractable — then sets the session's ruleset version to `to`.
|
|
883
|
+
* @experimental
|
|
884
|
+
*/
|
|
885
|
+
export declare const convertRuleset: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
886
|
+
main: string;
|
|
887
|
+
}, {
|
|
888
|
+
/** The ruleset version to move to (semver). */
|
|
889
|
+
to: string;
|
|
890
|
+
}, "core:outlet/convert-ruleset@1"> & {
|
|
891
|
+
kind: 'outlet';
|
|
892
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
893
|
+
}>;
|
|
714
894
|
/**
|
|
715
895
|
* Record an event your package declared: something happened, and
|
|
716
896
|
* pipelines bound to it — plugin listeners, and widgets when the event is
|
|
@@ -909,6 +1089,12 @@ export declare const showSprite: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
909
1089
|
* it carries the card's visibility and stays out of the card's gallery like
|
|
910
1090
|
* every sprite. Refused unless the run's person owns the card or is an admin.
|
|
911
1091
|
*
|
|
1092
|
+
* On a run pressed on a **cast member** the host files the pictures as the
|
|
1093
|
+
* member's own sprites (the files become the member's lorebook owner's, the
|
|
1094
|
+
* lorebook as provenance) and ignores nothing silently: a wired `characterId`
|
|
1095
|
+
* must be empty on such a run. Refused unless the run's person may edit the
|
|
1096
|
+
* member's lorebook. The card rule above stays as written.
|
|
1097
|
+
*
|
|
912
1098
|
* Causes `core:event/sprites-attached@1` when at least one row was written.
|
|
913
1099
|
* About a card, not a session: it writes no session row.
|
|
914
1100
|
* @experimental
|
|
@@ -948,6 +1134,12 @@ export declare const attachSprite: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
948
1134
|
* key it was drawn for (`null` for surplus the host kept unkeyed). Refused
|
|
949
1135
|
* unless the run's person owns the card or is an admin.
|
|
950
1136
|
*
|
|
1137
|
+
* On a run pressed on a **cast member** the host files the pictures as the
|
|
1138
|
+
* member's own gallery pictures (the files become the member's lorebook
|
|
1139
|
+
* owner's, the lorebook as provenance) and ignores nothing silently: a wired
|
|
1140
|
+
* `characterId` must be empty on such a run. Refused unless the run's person
|
|
1141
|
+
* may edit the member's lorebook. The card rule above stays as written.
|
|
1142
|
+
*
|
|
951
1143
|
* Causes `core:event/media-offered@1` when at least one picture was placed.
|
|
952
1144
|
* About a card, not a session: it writes no session row.
|
|
953
1145
|
* @experimental
|
|
@@ -963,6 +1155,25 @@ export declare const offerMedia: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
963
1155
|
kind: 'outlet';
|
|
964
1156
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
965
1157
|
}>;
|
|
1158
|
+
/**
|
|
1159
|
+
* 🚧 **A clock target** — the value of `core:shape/clock-target@1`
|
|
1160
|
+
* (`S.clockTarget`; M0, SHAPES L3): an hour and, optionally, a minute
|
|
1161
|
+
* within a story day. `day` says which day: `next` (the default) — today when
|
|
1162
|
+
* the moment is still ahead, tomorrow when it is not ("sleep until 07:00");
|
|
1163
|
+
* `today` — refused when the moment is not ahead; `tomorrow`. A clock target
|
|
1164
|
+
* never moves the clock back. What `advance-story-clock@1` moves `to` and
|
|
1165
|
+
* (once ruled) the hour `cast-presences@1` reads. ⚠ Not a `StoryTime`: it names a moment of a
|
|
1166
|
+
* day, never a date.
|
|
1167
|
+
* @experimental
|
|
1168
|
+
*/
|
|
1169
|
+
export interface ClockTargetV1 {
|
|
1170
|
+
/** 0–23. */
|
|
1171
|
+
hour: number;
|
|
1172
|
+
/** 0–59; absent is 0. */
|
|
1173
|
+
minute?: number;
|
|
1174
|
+
/** Absent is `next`. */
|
|
1175
|
+
day?: 'today' | 'tomorrow' | 'next';
|
|
1176
|
+
}
|
|
966
1177
|
/**
|
|
967
1178
|
* Move a session's **story clock** — the session's own story now — by `by` of
|
|
968
1179
|
* `unit`, through its lorebook's calendar (`advanceStoryTime`): carried by a
|
|
@@ -1000,16 +1211,32 @@ export declare const advanceStoryClock: import("@serene-pub/sdk").Pinned<import(
|
|
|
1000
1211
|
skipped: string;
|
|
1001
1212
|
/** It spelled through the book's calendar. */
|
|
1002
1213
|
label: string;
|
|
1214
|
+
/**
|
|
1215
|
+
* 🚧 The minutes a `to` move moved the clock (M0, T1) — 0
|
|
1216
|
+
* when it stood where it was or was refused under `skip`, with
|
|
1217
|
+
* no ledger row. Absent on a `by` move.
|
|
1218
|
+
*/
|
|
1219
|
+
moved: string;
|
|
1003
1220
|
}, {
|
|
1004
1221
|
/** A whole number; wins over the `by` parameter when wired. */
|
|
1005
1222
|
by: string;
|
|
1006
1223
|
/** One of the units; wins over the `unit` parameter when wired. */
|
|
1007
1224
|
unit: string;
|
|
1225
|
+
/**
|
|
1226
|
+
* 🚧 **Where the clock moves to** (M0, SHAPES L3), a
|
|
1227
|
+
* `ClockTargetV1` — the second input shape: an absolute moment
|
|
1228
|
+
* within the day ("sleep until 07:00") instead of a relative
|
|
1229
|
+
* `by`. Exactly one of the `by` and `to` in-ports may be wired;
|
|
1230
|
+
* both is refused with a sentence naming both. Wired, the `by`
|
|
1231
|
+
* and `unit` parameters are not read. One ledger move either
|
|
1232
|
+
* way, retractable as every move is.
|
|
1233
|
+
*/
|
|
1234
|
+
to: string;
|
|
1008
1235
|
/**
|
|
1009
1236
|
* 🚧 **Why the clock moves** (live scenes §15 G4, 2026-10-13),
|
|
1010
1237
|
* a literal: `'action'` — a person's press (*Time passes…*);
|
|
1011
1238
|
* `'keeper'` — the state-keeper's move under Trust the
|
|
1012
|
-
* narrator; `'tick'` — a
|
|
1239
|
+
* narrator; `'tick'` — a fixed step, a round's. An action's and
|
|
1013
1240
|
* the keeper's move are **time actions** the boundary watcher
|
|
1014
1241
|
* may begin a new scene at; a tick never is. Unwired reads as
|
|
1015
1242
|
* `'action'`.
|
|
@@ -1133,15 +1360,42 @@ export declare const answerForm: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
1133
1360
|
kind: 'outlet';
|
|
1134
1361
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1135
1362
|
}>;
|
|
1136
|
-
/**
|
|
1363
|
+
/**
|
|
1364
|
+
* The audio twin of `attach-image` — same `target`, same commit, bound the same day.
|
|
1365
|
+
*
|
|
1366
|
+
* 🚧 Speech (seam S3, 2026-10-28): `meta` is the `SpokenMeta` record
|
|
1367
|
+
* `core:oracle/speak@1` publishes, kept in the line's metadata for the swipe
|
|
1368
|
+
* (`spoken`) beside the audio part; `replace` swaps the line's earlier spoken
|
|
1369
|
+
* audio rather than adding a second part — what re-speaking a line does.
|
|
1370
|
+
* @experimental
|
|
1371
|
+
*/
|
|
1137
1372
|
export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1138
1373
|
main: string;
|
|
1139
1374
|
}, {
|
|
1140
1375
|
target: string;
|
|
1141
1376
|
audio: string;
|
|
1377
|
+
/** 🚧 `SpokenMeta` — absent writes the audio part alone. */
|
|
1378
|
+
meta: string;
|
|
1142
1379
|
}, "core:outlet/attach-audio@1"> & {
|
|
1143
1380
|
kind: 'outlet';
|
|
1144
|
-
slots?:
|
|
1381
|
+
slots?: {
|
|
1382
|
+
readonly params: {
|
|
1383
|
+
readonly kind: "parameters";
|
|
1384
|
+
readonly facet: "behavior";
|
|
1385
|
+
readonly schema: {
|
|
1386
|
+
readonly replace: {
|
|
1387
|
+
readonly type: "boolean";
|
|
1388
|
+
readonly default: false;
|
|
1389
|
+
readonly label: {
|
|
1390
|
+
readonly en: "Replace earlier speech";
|
|
1391
|
+
};
|
|
1392
|
+
readonly description: {
|
|
1393
|
+
readonly en: "Swap the line's spoken audio for this one instead of adding a second part.";
|
|
1394
|
+
};
|
|
1395
|
+
};
|
|
1396
|
+
};
|
|
1397
|
+
};
|
|
1398
|
+
} | undefined;
|
|
1145
1399
|
}>;
|
|
1146
1400
|
/**
|
|
1147
1401
|
* Write the finished entry. Gate-eligible, so it publishes a write result.
|
|
@@ -1152,14 +1406,12 @@ export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
1152
1406
|
* written that *which kind of entry comes from the pipeline that ran*. It did
|
|
1153
1407
|
* not: it wrote world lore whatever ran, because nothing on this declaration
|
|
1154
1408
|
* could say otherwise. `entryType` is that sentence made true — a declared
|
|
1155
|
-
* entry type id (`core:entry/world-lore`, `core:entry/
|
|
1156
|
-
* `core:entry/location`), bare, the way `core:query/lorebook-entries@1` spells
|
|
1409
|
+
* entry type id (`core:entry/world-lore`, `core:entry/location`), bare, the way `core:query/lorebook-entries@1` spells
|
|
1157
1410
|
* them; the version is the row's own column.
|
|
1158
1411
|
*
|
|
1159
1412
|
* A **param** and not an in-port, because the kind of thing a pipeline writes
|
|
1160
|
-
* is a fact about the pipeline rather than about the turn — a
|
|
1161
|
-
* writes
|
|
1162
|
-
* time — and a param is what a preset can set per session without the spec
|
|
1413
|
+
* is a fact about the pipeline rather than about the turn — a room-builder
|
|
1414
|
+
* writes locations every time it runs — and a param is what a preset can set per session without the spec
|
|
1163
1415
|
* being rewired. An unknown id is refused at the commit with a sentence
|
|
1164
1416
|
* naming the declared types, never coerced to world lore: a typo that silently
|
|
1165
1417
|
* files rooms as world lore is the defect this replaces.
|
|
@@ -1167,6 +1419,14 @@ export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
1167
1419
|
* Default world lore, the agnostic shape, so every spec written before this
|
|
1168
1420
|
* keeps doing exactly what it did.
|
|
1169
1421
|
*
|
|
1422
|
+
* ## History is compiled, not written (2026-11-10)
|
|
1423
|
+
*
|
|
1424
|
+
* History is compiled, not written. Put events into scenes (`note-scene@1`, or a story line); a person's Compile files them under the day's one entry. A history write here is the second choice: it files onto its day's entry (the session's story day when no date is given), appending a paragraph. The packager warns `W_WRITES_HISTORY` on such a write; a `summarize-request@1` spec is exempt, its save being previewed.
|
|
1425
|
+
*
|
|
1426
|
+
* ## Where the write lands
|
|
1427
|
+
*
|
|
1428
|
+
* For a session whose scenes end by themselves (it runs the *Find where scenes begin* routine, not switched Off, and its scene mode is Automatic) a new entry, a room or a history day is written to the session's own book **whatever the lorebook's write mode (Full too)**, and the result carries `route: "own-book"` and the own book's `lorebookId`. A history write there files onto the day's one entry of the own book, merged onto the lorebook's day at Apply. Any other session writes as before: to the lorebook under Full, to its own book under Review changes, Off or a book someone else owns.
|
|
1429
|
+
*
|
|
1170
1430
|
* ## `links`, or a second write
|
|
1171
1431
|
*
|
|
1172
1432
|
* Linking a new entry takes one of two shapes, and both exist on purpose.
|
|
@@ -1224,7 +1484,7 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1224
1484
|
/**
|
|
1225
1485
|
* 🚧 The messages this write was written from. Pass it when the write is a
|
|
1226
1486
|
* 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.
|
|
1487
|
+
* session's settle line moves to the newest of them (not for a session whose scenes end by themselves: its write waits in the own book and Apply settles).
|
|
1228
1488
|
*/
|
|
1229
1489
|
sources: string;
|
|
1230
1490
|
/** 🚧 A `LoreMatch` — how to find the entry this would otherwise create. */
|
|
@@ -1247,7 +1507,7 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1247
1507
|
readonly label: {
|
|
1248
1508
|
readonly en: "Kind of entry";
|
|
1249
1509
|
};
|
|
1250
|
-
readonly description: "Which kind of lorebook entry this pipeline writes — world lore
|
|
1510
|
+
readonly description: "Which kind of lorebook entry this pipeline writes — world lore or a location. Leave it as world lore for anything that is simply about the world.";
|
|
1251
1511
|
};
|
|
1252
1512
|
};
|
|
1253
1513
|
};
|
|
@@ -1273,8 +1533,16 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1273
1533
|
*
|
|
1274
1534
|
* How the change lands is the host's: on the session's line, the way the
|
|
1275
1535
|
* lorebook's own editor writes an edit there (an amendment where the line
|
|
1276
|
-
* amends).
|
|
1536
|
+
* amends). A change to an entry of the lorebook the session reads is kept in the
|
|
1537
|
+
* session's own book as a held change whatever the lorebook's write mode (**Full**
|
|
1538
|
+
* too), and reaches the lorebook only when it is applied; a change to an entry of the own
|
|
1539
|
+
* book is written there, and the result of a session whose scenes end by themselves
|
|
1540
|
+
* carries `route: "own-book"` and the own book's `lorebookId`. `entry` names an entry the session reads, in the lorebook or
|
|
1541
|
+
* in its own book.
|
|
1542
|
+
* ⚠ It causes no event yet (🚧): `lore-entry-created` means a new
|
|
1277
1543
|
* row, and a subscriber that needs edits waits for one of its own.
|
|
1544
|
+
*
|
|
1545
|
+
* 🚧 A history entry's re-date (its `year`, `month` or `day` fields) is checked as a person's re-date is: refused, with a sentence, onto a date its line already has a history entry for, or onto a day the line shares with its parent (change that day as an amendment instead).
|
|
1278
1546
|
* @internal
|
|
1279
1547
|
*/
|
|
1280
1548
|
export declare const updateLoreEntry: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
@@ -1292,7 +1560,7 @@ export declare const updateLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1292
1560
|
/**
|
|
1293
1561
|
* 🚧 The messages this write was written from. Pass it when the write is a
|
|
1294
1562
|
* 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.
|
|
1563
|
+
* session's settle line moves to the newest of them (not for a session whose scenes end by themselves: its write waits in the own book and Apply settles).
|
|
1296
1564
|
*/
|
|
1297
1565
|
sources: string;
|
|
1298
1566
|
}, "core:outlet/update-lore-entry@1"> & {
|
|
@@ -1323,10 +1591,22 @@ export declare const updateLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1323
1591
|
* entries answer to — the second never picks one, because picking would link
|
|
1324
1592
|
* the wrong room silently and a duplicate name is the author's to resolve.
|
|
1325
1593
|
*
|
|
1326
|
-
* One lorebook, both ends
|
|
1327
|
-
* neither and the row carries one `lorebook_id`, so
|
|
1328
|
-
*
|
|
1329
|
-
*
|
|
1594
|
+
* One lorebook, both ends — except on the own-book route. An edge whose ends
|
|
1595
|
+
* live in two books belongs to neither and the row carries one `lorebook_id`, so
|
|
1596
|
+
* where the write lands in the lorebook the session reads (**Full** for a session
|
|
1597
|
+
* whose scenes do not end by themselves, or a session whose lorebook is its own book alone) a cross-book link is refused rather than
|
|
1598
|
+
* repaired — the same rule the socket handlers hold, held again here because a
|
|
1599
|
+
* pipeline does not come through them. A session that reads a lorebook it may not
|
|
1600
|
+
* write (**Review changes**, **Off**, or a book someone else owns), or whose scenes
|
|
1601
|
+
* end by themselves (the result then carries `route: "own-book"` and the own
|
|
1602
|
+
* book's `lorebookId`, whatever the write mode), keeps the row in
|
|
1603
|
+
* its own book, and an end may be an entry of the own book or an entry of the
|
|
1604
|
+
* lorebook as the session reads it (entries only, never a cast member): an id is
|
|
1605
|
+
* found in the own book, else in the lorebook; a name is looked up in the own book
|
|
1606
|
+
* first, and only when none answers there in the lorebook (two answers refuse
|
|
1607
|
+
* within one book, never across). A link either book already holds is not written
|
|
1608
|
+
* again (`written: false`); an id in neither book is refused. The row is the
|
|
1609
|
+
* session's own: it reaches no other session until applied.
|
|
1330
1610
|
*
|
|
1331
1611
|
* ## After a create
|
|
1332
1612
|
*
|
|
@@ -1398,7 +1678,7 @@ export declare const linkLoreEntries: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1398
1678
|
/**
|
|
1399
1679
|
* 🚧 The messages this write was written from. Pass it when the write is a
|
|
1400
1680
|
* 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.
|
|
1681
|
+
* session's settle line moves to the newest of them (not for a session whose scenes end by themselves: its write waits in the own book and Apply settles).
|
|
1402
1682
|
*/
|
|
1403
1683
|
sources: string;
|
|
1404
1684
|
}, "core:outlet/link-lore-entries@1"> & {
|
|
@@ -1435,6 +1715,11 @@ export declare const linkLoreEntries: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1435
1715
|
* more → REFUSED, the refusal naming every candidate (`'<name>' (entry <id>)`), retry with `entryId`.
|
|
1436
1716
|
* `name` and `key` match within this write's own `entryType` (R-h's `{ type, name }` is that pair);
|
|
1437
1717
|
* case and surrounding space ignored. `key` matches an entry whose trigger keys include it.
|
|
1718
|
+
* On the own-book route (a session that reads a lorebook it may not write, or whose scenes end
|
|
1719
|
+
* by themselves) the own book is
|
|
1720
|
+
* looked in first, and only with no hit there the lorebook's entries as the session reads
|
|
1721
|
+
* them; a hit there is a held change to that entry, not a duplicate. Two or more refuse
|
|
1722
|
+
* within one book, never across the two.
|
|
1438
1723
|
* ⚠ Not an entry's `matchMode` (how its keys are matched in retrieval).
|
|
1439
1724
|
* @experimental
|
|
1440
1725
|
*/
|
|
@@ -1519,11 +1804,121 @@ export declare const graphProposal: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
1519
1804
|
/**
|
|
1520
1805
|
* 🚧 The messages this write was written from. Pass it when the write is a
|
|
1521
1806
|
* 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.
|
|
1807
|
+
* session's settle line moves to the newest of them (not for a session whose scenes end by themselves: its write waits in the own book and Apply settles).
|
|
1523
1808
|
*/
|
|
1524
1809
|
sources: string;
|
|
1525
1810
|
}, "core:outlet/graph-proposal@1"> & {
|
|
1526
1811
|
kind: 'outlet';
|
|
1527
1812
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1528
1813
|
}>;
|
|
1814
|
+
/**
|
|
1815
|
+
* Make a character: write one character card into the acting person's library.
|
|
1816
|
+
*
|
|
1817
|
+
* Takes `card` — a V3 card `{ spec: 'chara_card_v3', data }`, its `data`, or a
|
|
1818
|
+
* plain `{ name, description, personality?, scenario?, first_mes?,
|
|
1819
|
+
* mes_example?, creator_notes?, tags? }`, exactly what the app's card reader
|
|
1820
|
+
* takes. Writes one character row (or, under the person's library write mode,
|
|
1821
|
+
* a proposal for it); `characterId` is the new row's id, or absent while the
|
|
1822
|
+
* write waits.
|
|
1823
|
+
*
|
|
1824
|
+
* ⚠ The app, not the pipeline, judges the write: it finds the person acting
|
|
1825
|
+
* for the run, and their **library write mode** decides whether the card lands
|
|
1826
|
+
* now (Full), waits for them to accept it in the session (Review, the
|
|
1827
|
+
* default), or is refused (Off). A genre must also declare
|
|
1828
|
+
* `writes.library.characters`, or the host refuses the write.
|
|
1829
|
+
* @internal
|
|
1830
|
+
*/
|
|
1831
|
+
export declare const createCharacter: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1832
|
+
main: string;
|
|
1833
|
+
characterId: string;
|
|
1834
|
+
}, {
|
|
1835
|
+
card: string;
|
|
1836
|
+
}, "core:outlet/create-character@1"> & {
|
|
1837
|
+
kind: 'outlet';
|
|
1838
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1839
|
+
}>;
|
|
1840
|
+
/**
|
|
1841
|
+
* Change a character: edit the text fields of a character the acting person
|
|
1842
|
+
* may write to.
|
|
1843
|
+
*
|
|
1844
|
+
* Takes `characterId` and `changes` — an object of character profile names:
|
|
1845
|
+
* `name`, `description`, `personality`, `scenario`, `greetings` (`{ text,
|
|
1846
|
+
* groupOnly? }[]` — the whole list, replacing the card's) and
|
|
1847
|
+
* `exampleDialogues` (`string[]`). The change writes the card's **current
|
|
1848
|
+
* version**, those fields and nothing else; the fields it replaced are kept so
|
|
1849
|
+
* Back can restore them. `first_mes` and `mes_example` are no longer accepted
|
|
1850
|
+
* (owner 2026-11-05: new names now, old removed); any other key is refused.
|
|
1851
|
+
* The app judges the person (write rights on the character) and their library
|
|
1852
|
+
* write mode (Full, Review or Off); a genre must declare
|
|
1853
|
+
* `writes.library.characters`.
|
|
1854
|
+
* @internal
|
|
1855
|
+
*/
|
|
1856
|
+
export declare const updateCharacter: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1857
|
+
main: string;
|
|
1858
|
+
characterId: string;
|
|
1859
|
+
}, {
|
|
1860
|
+
characterId: string;
|
|
1861
|
+
changes: string;
|
|
1862
|
+
}, "core:outlet/update-character@1"> & {
|
|
1863
|
+
kind: 'outlet';
|
|
1864
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1865
|
+
}>;
|
|
1866
|
+
/**
|
|
1867
|
+
* 🚧 Change a cast member of the session — one or more fields of their
|
|
1868
|
+
* character profile.
|
|
1869
|
+
*
|
|
1870
|
+
* `member` is `seated-member:<castMemberId>`, `player-seat:<seatId>` or a cast
|
|
1871
|
+
* member id, as `core:query/cast-member@1` takes it. `changes` is an object of
|
|
1872
|
+
* character profile fields (`CHARACTER_PROFILE_FIELDS`), each a new value in
|
|
1873
|
+
* the field's own shape or `{ follow: true }` (read that field from the
|
|
1874
|
+
* member's card again; refused for a card-less member). Other keys are
|
|
1875
|
+
* refused, never dropped.
|
|
1876
|
+
*
|
|
1877
|
+
* 🚧 `changes` may also carry `nodeState` — one of `CAST_STATE_WORDS` (`active`, `deceased`, `missing`, `departed`; SDK `ties.ts`) — and `nodeVisibility` — `normal`, `legendary` or `hidden` — beside the profile fields: the member's state and visibility on the graph. Checked against those words (another word is refused, never dropped), and dated at the session's story time and tied to the turn like the profile fields.
|
|
1878
|
+
*
|
|
1879
|
+
* How it lands is the host's: one story write — a cast version dated at the
|
|
1880
|
+
* session's story time and tied to the turn, so Back takes it with the turn; a
|
|
1881
|
+
* second change in the same turn and moment updates that version (coalesces).
|
|
1882
|
+
* The genre's `writes.lore` and the session's lore write mode decide where:
|
|
1883
|
+
* the book's line, or under Review / Off the session's own notes (an overlay
|
|
1884
|
+
* of the member).
|
|
1885
|
+
*
|
|
1886
|
+
* A genre must place it: the Dungeon Crawler places it to mark the fallen
|
|
1887
|
+
* deceased (2026-11-10). ⚠ It causes no event yet
|
|
1888
|
+
* (🚧). `castVersionId` is the cast version written.
|
|
1889
|
+
* @experimental
|
|
1890
|
+
*/
|
|
1891
|
+
export declare const updateCastMember: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1892
|
+
main: string;
|
|
1893
|
+
/** The cast version written. */
|
|
1894
|
+
castVersionId: string;
|
|
1895
|
+
}, {
|
|
1896
|
+
/** The member to change: `seated-member:<id>`, `player-seat:<id>`, or a cast member id. */
|
|
1897
|
+
member: string;
|
|
1898
|
+
/** `{ [profile field]: value | { follow: true } }`, plus `nodeState` / `nodeVisibility` (see above). */
|
|
1899
|
+
changes: string;
|
|
1900
|
+
}, "core:outlet/update-cast-member@1"> & {
|
|
1901
|
+
kind: 'outlet';
|
|
1902
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1903
|
+
}>;
|
|
1904
|
+
/**
|
|
1905
|
+
* Make a lorebook: write one lorebook into the acting person's library.
|
|
1906
|
+
*
|
|
1907
|
+
* Takes `lorebook` — a lorebook document as Lorebooks › Import reads it (a
|
|
1908
|
+
* SillyTavern world-info JSON is the safe shape: `{ name, description?,
|
|
1909
|
+
* entries }`). Writes a lorebook and its entries (or, under the person's
|
|
1910
|
+
* library write mode, a proposal for them); `lorebookId` is the new book's id.
|
|
1911
|
+
* The app judges the person and their library write mode (Full, Review or
|
|
1912
|
+
* Off); a genre must declare `writes.library.lorebooks`.
|
|
1913
|
+
* @internal
|
|
1914
|
+
*/
|
|
1915
|
+
export declare const createLorebook: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1916
|
+
main: string;
|
|
1917
|
+
lorebookId: string;
|
|
1918
|
+
}, {
|
|
1919
|
+
lorebook: string;
|
|
1920
|
+
}, "core:outlet/create-lorebook@1"> & {
|
|
1921
|
+
kind: 'outlet';
|
|
1922
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1923
|
+
}>;
|
|
1529
1924
|
//# sourceMappingURL=outlets.d.ts.map
|