@serene-pub/contracts 0.6.0-pr-7 β 0.6.0-pr-9
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 +18 -2
- package/dist/oracles.js +18 -2
- package/dist/outlets.d.ts +358 -44
- package/dist/outlets.js +376 -47
- package/dist/queries.d.ts +906 -2
- package/dist/queries.js +697 -6
- package/dist/tasks.d.ts +37 -25
- package/dist/tasks.js +40 -16
- package/package.json +3 -3
package/dist/outlets.d.ts
CHANGED
|
@@ -540,6 +540,43 @@ export declare const setSeatName: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
540
540
|
kind: 'outlet';
|
|
541
541
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
542
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
|
+
}>;
|
|
543
580
|
/**
|
|
544
581
|
* π§ **Open or close the composer** on a channel lane (owner ruling
|
|
545
582
|
* 2026-10-15): the genre's switch for whether a person may write there. The
|
|
@@ -614,6 +651,8 @@ export interface ProposedSceneCue {
|
|
|
614
651
|
* no longer hold or `at` is not one of its lines. Never held at the review gate: a cue's review
|
|
615
652
|
* is the chip.
|
|
616
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
|
+
*
|
|
617
656
|
* β Not a scene write (a person's *Start scene here*) and not a state proposal.
|
|
618
657
|
* @experimental
|
|
619
658
|
* @ruling R-i (2026-10-24)
|
|
@@ -629,10 +668,16 @@ export declare const proposeSceneCue: import("@serene-pub/sdk").Pinned<import("@
|
|
|
629
668
|
* `person` is: wired from a script's output.
|
|
630
669
|
*/
|
|
631
670
|
at: string;
|
|
632
|
-
/** The channel lane `at` is on, any spelling (canonicalised); absent or blank: `
|
|
671
|
+
/** The channel lane `at` is on, any spelling (canonicalised); absent or blank: the lane the line `at` is on. */
|
|
633
672
|
channel: string;
|
|
634
673
|
/** Why, in the model's few words β the chip's reason ("the party left the inn"). */
|
|
635
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;
|
|
636
681
|
}, "core:outlet/propose-scene-cue@1"> & {
|
|
637
682
|
kind: 'outlet';
|
|
638
683
|
slots?: {
|
|
@@ -654,6 +699,64 @@ export declare const proposeSceneCue: import("@serene-pub/sdk").Pinned<import("@
|
|
|
654
699
|
};
|
|
655
700
|
} | undefined;
|
|
656
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
|
+
}>;
|
|
657
760
|
/**
|
|
658
761
|
* π§ **Configure a stat** for one owner in this session (owner ruling
|
|
659
762
|
* 2026-10-15): the pipeline door to an owner's **stat configuration** β the
|
|
@@ -986,6 +1089,12 @@ export declare const showSprite: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
986
1089
|
* it carries the card's visibility and stays out of the card's gallery like
|
|
987
1090
|
* every sprite. Refused unless the run's person owns the card or is an admin.
|
|
988
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
|
+
*
|
|
989
1098
|
* Causes `core:event/sprites-attached@1` when at least one row was written.
|
|
990
1099
|
* About a card, not a session: it writes no session row.
|
|
991
1100
|
* @experimental
|
|
@@ -1025,6 +1134,12 @@ export declare const attachSprite: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
1025
1134
|
* key it was drawn for (`null` for surplus the host kept unkeyed). Refused
|
|
1026
1135
|
* unless the run's person owns the card or is an admin.
|
|
1027
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
|
+
*
|
|
1028
1143
|
* Causes `core:event/media-offered@1` when at least one picture was placed.
|
|
1029
1144
|
* About a card, not a session: it writes no session row.
|
|
1030
1145
|
* @experimental
|
|
@@ -1121,7 +1236,7 @@ export declare const advanceStoryClock: import("@serene-pub/sdk").Pinned<import(
|
|
|
1121
1236
|
* π§ **Why the clock moves** (live scenes Β§15 G4, 2026-10-13),
|
|
1122
1237
|
* a literal: `'action'` β a person's press (*Time passesβ¦*);
|
|
1123
1238
|
* `'keeper'` β the state-keeper's move under Trust the
|
|
1124
|
-
* narrator; `'tick'` β a
|
|
1239
|
+
* narrator; `'tick'` β a fixed step, a round's. An action's and
|
|
1125
1240
|
* the keeper's move are **time actions** the boundary watcher
|
|
1126
1241
|
* may begin a new scene at; a tick never is. Unwired reads as
|
|
1127
1242
|
* `'action'`.
|
|
@@ -1251,7 +1366,8 @@ export declare const answerForm: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
1251
1366
|
* π§ Speech (seam S3, 2026-10-28): `meta` is the `SpokenMeta` record
|
|
1252
1367
|
* `core:oracle/speak@1` publishes, kept in the line's metadata for the swipe
|
|
1253
1368
|
* (`spoken`) beside the audio part; `replace` swaps the line's earlier spoken
|
|
1254
|
-
*
|
|
1369
|
+
* files for the whole new list rather than adding to them β what re-speaking
|
|
1370
|
+
* a line does.
|
|
1255
1371
|
* @experimental
|
|
1256
1372
|
*/
|
|
1257
1373
|
export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
@@ -1259,6 +1375,12 @@ export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
1259
1375
|
}, {
|
|
1260
1376
|
target: string;
|
|
1261
1377
|
audio: string;
|
|
1378
|
+
/**
|
|
1379
|
+
* π§ The line's spoken files, in play order β one take. Non-empty,
|
|
1380
|
+
* it is the take and `audio` is ignored; absent or empty, `audio`
|
|
1381
|
+
* alone is a one-file take.
|
|
1382
|
+
*/
|
|
1383
|
+
media: string;
|
|
1262
1384
|
/** π§ `SpokenMeta` β absent writes the audio part alone. */
|
|
1263
1385
|
meta: string;
|
|
1264
1386
|
}, "core:outlet/attach-audio@1"> & {
|
|
@@ -1291,14 +1413,12 @@ export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
1291
1413
|
* written that *which kind of entry comes from the pipeline that ran*. It did
|
|
1292
1414
|
* not: it wrote world lore whatever ran, because nothing on this declaration
|
|
1293
1415
|
* could say otherwise. `entryType` is that sentence made true β a declared
|
|
1294
|
-
* entry type id (`core:entry/world-lore`, `core:entry/
|
|
1295
|
-
* `core:entry/location`), bare, the way `core:query/lorebook-entries@1` spells
|
|
1416
|
+
* entry type id (`core:entry/world-lore`, `core:entry/location`), bare, the way `core:query/lorebook-entries@1` spells
|
|
1296
1417
|
* them; the version is the row's own column.
|
|
1297
1418
|
*
|
|
1298
1419
|
* A **param** and not an in-port, because the kind of thing a pipeline writes
|
|
1299
|
-
* is a fact about the pipeline rather than about the turn β a
|
|
1300
|
-
* writes
|
|
1301
|
-
* time β and a param is what a preset can set per session without the spec
|
|
1420
|
+
* is a fact about the pipeline rather than about the turn β a room-builder
|
|
1421
|
+
* writes locations every time it runs β and a param is what a preset can set per session without the spec
|
|
1302
1422
|
* being rewired. An unknown id is refused at the commit with a sentence
|
|
1303
1423
|
* naming the declared types, never coerced to world lore: a typo that silently
|
|
1304
1424
|
* files rooms as world lore is the defect this replaces.
|
|
@@ -1306,6 +1426,22 @@ export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
1306
1426
|
* Default world lore, the agnostic shape, so every spec written before this
|
|
1307
1427
|
* keeps doing exactly what it did.
|
|
1308
1428
|
*
|
|
1429
|
+
* ## History is compiled, not written (2026-11-10)
|
|
1430
|
+
*
|
|
1431
|
+
* 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.
|
|
1432
|
+
*
|
|
1433
|
+
* ## Where the write lands
|
|
1434
|
+
*
|
|
1435
|
+
* Under **Full** on the owner's own lorebook the write lands in the lorebook (a change to an existing entry as the version at the session's date when it reads at one), whether or not the session's scenes end by themselves. Under Review changes, Off or on a book someone else owns it lands in the session's own book, and the result then carries `route: "own-book"` and the own book's `lorebookId`. A history write on the own-book route files onto the day's one entry of the own book, merged onto the lorebook's day at Apply.
|
|
1436
|
+
*
|
|
1437
|
+
* ## Beginning and Decay of a new entry (π§)
|
|
1438
|
+
*
|
|
1439
|
+
* `defaultBeginning` (`perpetual` or `began`) and `defaultDecayRate` (0 to 1) are **params**, never ports, so a model's output cannot reach them; a preset may set them. The layers are the entry type's default (`EntryShape.defaultBeginning`, `defaultDecayRate`) β these params. They apply only when the write **creates** an entry (never a match, an update or a history day). The Beginning is set only when the session reads at a story date on a lorebook whose timeline is on; the Decay always. Absent, the layer below decides.
|
|
1440
|
+
*
|
|
1441
|
+
* ## Updating what exists
|
|
1442
|
+
*
|
|
1443
|
+
* A write with `match: { name }` and `shown` (the ids `core:query/entries-named@1` returned) rewrites the entry the model was shown under that name, with this write's whole content. A name matching one entry it was not shown adds this write's content to that entry as a new paragraph; a key alone, or no entry, writes a new entry; two entries of the name write nothing.
|
|
1444
|
+
*
|
|
1309
1445
|
* ## `links`, or a second write
|
|
1310
1446
|
*
|
|
1311
1447
|
* Linking a new entry takes one of two shapes, and both exist on purpose.
|
|
@@ -1363,11 +1499,24 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1363
1499
|
/**
|
|
1364
1500
|
* π§ The messages this write was written from. Pass it when the write is a
|
|
1365
1501
|
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1366
|
-
* session's settle line moves to the newest of them.
|
|
1502
|
+
* 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).
|
|
1367
1503
|
*/
|
|
1368
1504
|
sources: string;
|
|
1369
1505
|
/** π§ A `LoreMatch` β how to find the entry this would otherwise create. */
|
|
1370
1506
|
match: string;
|
|
1507
|
+
/**
|
|
1508
|
+
* π§ The entries the model that wrote this was shown, by id
|
|
1509
|
+
* (`core:query/entries-named@1`'s `ids`). Read only with `match: { name }`: one entry it was shown, found by its
|
|
1510
|
+
* name, is rewritten β its content replaced by this write's, its own name kept; one entry of that name it was not
|
|
1511
|
+
* shown keeps what it says and gets this write's content as a new paragraph; an entry met only by one of its keys is
|
|
1512
|
+
* not a match β a new entry is written and the result notes the entry whose key it met; two or more entries of that
|
|
1513
|
+
* name change nothing for this write (`written: false`) and the result notes them; content equal to what the entry
|
|
1514
|
+
* says changes nothing. A change to an entry of the lorebook is written there under **Full** on the owner's own
|
|
1515
|
+
* lorebook (as the version at the session's date when it reads at one), and otherwise kept in the session's own book
|
|
1516
|
+
* as a held change until applied; the result is `matched: true, written: false`, so no
|
|
1517
|
+
* `core:event/lore-entry-created@1`. Absent: `match` behaves as described on `LoreMatch`.
|
|
1518
|
+
*/
|
|
1519
|
+
shown: string;
|
|
1371
1520
|
/**
|
|
1372
1521
|
* π§ The cast member this entry is filed under β a `character:<id>` reference, resolved to that
|
|
1373
1522
|
* character's cast member in the book the entry lands in (the entry type's `anchor` role).
|
|
@@ -1386,7 +1535,41 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1386
1535
|
readonly label: {
|
|
1387
1536
|
readonly en: "Kind of entry";
|
|
1388
1537
|
};
|
|
1389
|
-
readonly description: "Which kind of lorebook entry this pipeline writes β world lore
|
|
1538
|
+
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.";
|
|
1539
|
+
};
|
|
1540
|
+
/** π§ Absent: the layer below decides (the entry type's default). @experimental */
|
|
1541
|
+
readonly defaultBeginning: {
|
|
1542
|
+
readonly type: "enum";
|
|
1543
|
+
readonly of: readonly ["perpetual", "began"];
|
|
1544
|
+
readonly members: readonly [{
|
|
1545
|
+
readonly key: "perpetual";
|
|
1546
|
+
readonly label: {
|
|
1547
|
+
readonly en: "Perpetual";
|
|
1548
|
+
};
|
|
1549
|
+
}, {
|
|
1550
|
+
readonly key: "began";
|
|
1551
|
+
readonly label: {
|
|
1552
|
+
readonly en: "Began at";
|
|
1553
|
+
};
|
|
1554
|
+
}];
|
|
1555
|
+
readonly label: {
|
|
1556
|
+
readonly en: "New entry's beginning";
|
|
1557
|
+
};
|
|
1558
|
+
readonly description: {
|
|
1559
|
+
readonly en: "Whether an entry this step creates begins at the session's story date (Began at) or has always been true (Perpetual). Left empty, the entry type's own default applies.";
|
|
1560
|
+
};
|
|
1561
|
+
};
|
|
1562
|
+
/** π§ Absent: the layer below decides (the entry type's default). @experimental */
|
|
1563
|
+
readonly defaultDecayRate: {
|
|
1564
|
+
readonly type: "number";
|
|
1565
|
+
readonly min: 0;
|
|
1566
|
+
readonly max: 1;
|
|
1567
|
+
readonly label: {
|
|
1568
|
+
readonly en: "New entry's decay";
|
|
1569
|
+
};
|
|
1570
|
+
readonly description: {
|
|
1571
|
+
readonly en: "The Decay rate an entry this step creates starts with: 0 is a fact, above 0 up to 1 a living entry. Left empty, the entry type's own default applies.";
|
|
1572
|
+
};
|
|
1390
1573
|
};
|
|
1391
1574
|
};
|
|
1392
1575
|
};
|
|
@@ -1412,8 +1595,16 @@ export declare const createLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1412
1595
|
*
|
|
1413
1596
|
* How the change lands is the host's: on the session's line, the way the
|
|
1414
1597
|
* lorebook's own editor writes an edit there (an amendment where the line
|
|
1415
|
-
* amends).
|
|
1598
|
+
* amends). A change to an entry of the lorebook is written there under **Full** on
|
|
1599
|
+
* the owner's own lorebook (as the version at the session's date when it reads at one), and otherwise kept in the
|
|
1600
|
+
* session's own book as a held change until applied; a change to an entry of the own
|
|
1601
|
+
* book is written there, and the result of a session on the own-book route
|
|
1602
|
+
* carries `route: "own-book"` and the own book's `lorebookId`. `entry` names an entry the session reads, in the lorebook or
|
|
1603
|
+
* in its own book.
|
|
1604
|
+
* β It causes no event yet (π§): `lore-entry-created` means a new
|
|
1416
1605
|
* row, and a subscriber that needs edits waits for one of its own.
|
|
1606
|
+
*
|
|
1607
|
+
* π§ 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).
|
|
1417
1608
|
* @internal
|
|
1418
1609
|
*/
|
|
1419
1610
|
export declare const updateLoreEntry: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
@@ -1431,7 +1622,7 @@ export declare const updateLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1431
1622
|
/**
|
|
1432
1623
|
* π§ The messages this write was written from. Pass it when the write is a
|
|
1433
1624
|
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1434
|
-
* session's settle line moves to the newest of them.
|
|
1625
|
+
* 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).
|
|
1435
1626
|
*/
|
|
1436
1627
|
sources: string;
|
|
1437
1628
|
}, "core:outlet/update-lore-entry@1"> & {
|
|
@@ -1462,10 +1653,22 @@ export declare const updateLoreEntry: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1462
1653
|
* entries answer to β the second never picks one, because picking would link
|
|
1463
1654
|
* the wrong room silently and a duplicate name is the author's to resolve.
|
|
1464
1655
|
*
|
|
1465
|
-
* One lorebook, both ends
|
|
1466
|
-
* neither and the row carries one `lorebook_id`, so
|
|
1467
|
-
*
|
|
1468
|
-
*
|
|
1656
|
+
* One lorebook, both ends β except on the own-book route. An edge whose ends
|
|
1657
|
+
* live in two books belongs to neither and the row carries one `lorebook_id`, so
|
|
1658
|
+
* where the write lands in the lorebook the session reads (**Full** for a session
|
|
1659
|
+
* 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
|
|
1660
|
+
* repaired β the same rule the socket handlers hold, held again here because a
|
|
1661
|
+
* pipeline does not come through them. A session that reads a lorebook it may not
|
|
1662
|
+
* write (**Review changes**, **Off**, or a book someone else owns), or whose scenes
|
|
1663
|
+
* end by themselves (the result then carries `route: "own-book"` and the own
|
|
1664
|
+
* book's `lorebookId`, whatever the write mode), keeps the row in
|
|
1665
|
+
* its own book, and an end may be an entry of the own book or an entry of the
|
|
1666
|
+
* lorebook as the session reads it (entries only, never a cast member): an id is
|
|
1667
|
+
* found in the own book, else in the lorebook; a name is looked up in the own book
|
|
1668
|
+
* first, and only when none answers there in the lorebook (two answers refuse
|
|
1669
|
+
* within one book, never across). A link either book already holds is not written
|
|
1670
|
+
* again (`written: false`); an id in neither book is refused. The row is the
|
|
1671
|
+
* session's own: it reaches no other session until applied.
|
|
1469
1672
|
*
|
|
1470
1673
|
* ## After a create
|
|
1471
1674
|
*
|
|
@@ -1537,7 +1740,7 @@ export declare const linkLoreEntries: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1537
1740
|
/**
|
|
1538
1741
|
* π§ The messages this write was written from. Pass it when the write is a
|
|
1539
1742
|
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1540
|
-
* session's settle line moves to the newest of them.
|
|
1743
|
+
* 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).
|
|
1541
1744
|
*/
|
|
1542
1745
|
sources: string;
|
|
1543
1746
|
}, "core:outlet/link-lore-entries@1"> & {
|
|
@@ -1574,6 +1777,13 @@ export declare const linkLoreEntries: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1574
1777
|
* more β REFUSED, the refusal naming every candidate (`'<name>' (entry <id>)`), retry with `entryId`.
|
|
1575
1778
|
* `name` and `key` match within this write's own `entryType` (R-h's `{ type, name }` is that pair);
|
|
1576
1779
|
* case and surrounding space ignored. `key` matches an entry whose trigger keys include it.
|
|
1780
|
+
* On the own-book route (a session that reads a lorebook it may not write, or whose scenes end
|
|
1781
|
+
* by themselves) the own book is
|
|
1782
|
+
* looked in first, and only with no hit there the lorebook's entries as the session reads
|
|
1783
|
+
* them; a hit there is a held change to that entry, not a duplicate. Two or more refuse
|
|
1784
|
+
* within one book, never across the two.
|
|
1785
|
+
* With `name`, the write's `shown` in-port (the entries the model was shown) decides whether a
|
|
1786
|
+
* match is rewritten or appended to: see `create-lore-entry@1`'s `shown`.
|
|
1577
1787
|
* β Not an entry's `matchMode` (how its keys are matched in retrieval).
|
|
1578
1788
|
* @experimental
|
|
1579
1789
|
*/
|
|
@@ -1658,7 +1868,7 @@ export declare const graphProposal: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
1658
1868
|
/**
|
|
1659
1869
|
* π§ The messages this write was written from. Pass it when the write is a
|
|
1660
1870
|
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1661
|
-
* session's settle line moves to the newest of them.
|
|
1871
|
+
* 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).
|
|
1662
1872
|
*/
|
|
1663
1873
|
sources: string;
|
|
1664
1874
|
}, "core:outlet/graph-proposal@1"> & {
|
|
@@ -1695,12 +1905,16 @@ export declare const createCharacter: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1695
1905
|
* Change a character: edit the text fields of a character the acting person
|
|
1696
1906
|
* may write to.
|
|
1697
1907
|
*
|
|
1698
|
-
* Takes `characterId` and `changes` β an object of
|
|
1699
|
-
*
|
|
1700
|
-
*
|
|
1701
|
-
*
|
|
1702
|
-
*
|
|
1703
|
-
*
|
|
1908
|
+
* Takes `characterId` and `changes` β an object of character profile names:
|
|
1909
|
+
* `name`, `description`, `personality`, `scenario`, `greetings` (`{ text,
|
|
1910
|
+
* groupOnly? }[]` β the whole list, replacing the card's) and
|
|
1911
|
+
* `exampleDialogues` (`string[]`). The change writes the card's **current
|
|
1912
|
+
* version**, those fields and nothing else; the fields it replaced are kept so
|
|
1913
|
+
* Back can restore them. `first_mes` and `mes_example` are no longer accepted
|
|
1914
|
+
* (owner 2026-11-05: new names now, old removed); any other key is refused.
|
|
1915
|
+
* The app judges the person (write rights on the character) and their library
|
|
1916
|
+
* write mode (Full, Review or Off); a genre must declare
|
|
1917
|
+
* `writes.library.characters`.
|
|
1704
1918
|
* @internal
|
|
1705
1919
|
*/
|
|
1706
1920
|
export declare const updateCharacter: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
@@ -1713,6 +1927,126 @@ export declare const updateCharacter: import("@serene-pub/sdk").Pinned<import("@
|
|
|
1713
1927
|
kind: 'outlet';
|
|
1714
1928
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1715
1929
|
}>;
|
|
1930
|
+
/**
|
|
1931
|
+
* π§ Change a cast member of the session β one or more fields of their
|
|
1932
|
+
* character profile.
|
|
1933
|
+
*
|
|
1934
|
+
* `member` is `seated-member:<castMemberId>`, `player-seat:<seatId>` or a cast
|
|
1935
|
+
* member id, as `core:query/cast-member@1` takes it. `changes` is an object of
|
|
1936
|
+
* character profile fields (`CHARACTER_PROFILE_FIELDS`), each a new value in
|
|
1937
|
+
* the field's own shape or `{ follow: true }` (read that field from the
|
|
1938
|
+
* member's card again; refused for a card-less member). Other keys are
|
|
1939
|
+
* refused, never dropped.
|
|
1940
|
+
*
|
|
1941
|
+
* π§ `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.
|
|
1942
|
+
*
|
|
1943
|
+
* How it lands is the host's: one story write β a cast version dated at the
|
|
1944
|
+
* session's story time and tied to the turn, so Back takes it with the turn; a
|
|
1945
|
+
* second change in the same turn and moment updates that version (coalesces).
|
|
1946
|
+
* The genre's `writes.lore` and the session's lore write mode decide where:
|
|
1947
|
+
* the book's line, or under Review / Off the session's own notes (an overlay
|
|
1948
|
+
* of the member).
|
|
1949
|
+
*
|
|
1950
|
+
* A genre must place it: the Dungeon Crawler places it to mark the fallen
|
|
1951
|
+
* deceased (2026-11-10). β It causes no event yet
|
|
1952
|
+
* (π§). `castVersionId` is the cast version written.
|
|
1953
|
+
* @experimental
|
|
1954
|
+
*/
|
|
1955
|
+
export declare const updateCastMember: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1956
|
+
main: string;
|
|
1957
|
+
/** The cast version written. */
|
|
1958
|
+
castVersionId: string;
|
|
1959
|
+
}, {
|
|
1960
|
+
/** The member to change: `seated-member:<id>`, `player-seat:<id>`, or a cast member id. */
|
|
1961
|
+
member: string;
|
|
1962
|
+
/** `{ [profile field]: value | { follow: true } }`, plus `nodeState` / `nodeVisibility` (see above). */
|
|
1963
|
+
changes: string;
|
|
1964
|
+
}, "core:outlet/update-cast-member@1"> & {
|
|
1965
|
+
kind: 'outlet';
|
|
1966
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1967
|
+
}>;
|
|
1968
|
+
/**
|
|
1969
|
+
* π§ **Note who knows an entry** (kn-4b, 2026-11-16; owner 2026-11-15: "lets add SDK api for it as
|
|
1970
|
+
* well, though we won't plug it in anywhere"): a step states that **one cast member came to know one
|
|
1971
|
+
* lorebook entry** in play, or no longer does. It writes a **knowledge tie** of one of play's two
|
|
1972
|
+
* kinds: `was_told` or `has_been_there`. No shipped genre or preset places it.
|
|
1973
|
+
*
|
|
1974
|
+
* `member` is `character:<cardId>`, `seated-member:<castMemberId>`, `player-seat:<seatId>` or a cast
|
|
1975
|
+
* member id, of this session. `entry` is an entry id, a write result, or a name in the session's
|
|
1976
|
+
* lorebook, resolved as `link-lore-entries@1`'s `to` is (a name nothing answers to, or two entries
|
|
1977
|
+
* answer to, is refused). One member and one entry per write: to note many, place it inside an
|
|
1978
|
+
* `each` clause (its `max` is mandatory).
|
|
1979
|
+
*
|
|
1980
|
+
* - **Play's kinds only.** It never writes the hand kinds `knows` / `kept_from`, and never ends or
|
|
1981
|
+
* changes a tie a person set. When an active hand tie (`knows` or `kept_from`) already exists for
|
|
1982
|
+
* the pair, nothing is written (`written: false`) and the receipt names it.
|
|
1983
|
+
* - **Once.** A pair that already has a live tie of the same kind is not written again
|
|
1984
|
+
* (`written: false`).
|
|
1985
|
+
* - **`end: true`** ends play's live ties for the pair (both kinds); a hand tie stays.
|
|
1986
|
+
* - **Where it lands.** On a lorebook the session's owner owns, with the lore write mode on
|
|
1987
|
+
* **Full**: in the lorebook, on the session's line, dated at the session's story date. Otherwise
|
|
1988
|
+
* (Review changes, Off, a lorebook someone else owns, no lorebook): in the session's notes, as the
|
|
1989
|
+
* session's own tie, offered in Apply (a tie on an entry made in the notes goes with that entry).
|
|
1990
|
+
* Back and a swipe take it back with the reply that wrote it, until it is applied.
|
|
1991
|
+
* - **Refused** for a genre whose lorebook is a reference (`writes.lore`), for a member or entry
|
|
1992
|
+
* outside the books the session reads, and without a session.
|
|
1993
|
+
*
|
|
1994
|
+
* β It does not set or clear an entry's **not common knowledge** mark: that is the lorebook owner's
|
|
1995
|
+
* own choice, and no outlet writes it. β Not
|
|
1996
|
+
* `link-lore-entries@1` (a link between two entries). It causes no event.
|
|
1997
|
+
* @experimental
|
|
1998
|
+
*/
|
|
1999
|
+
export declare const noteEntryKnowledge: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
2000
|
+
main: string;
|
|
2001
|
+
/** The knowledge tie written, or the one that already stood. */
|
|
2002
|
+
tieId: string;
|
|
2003
|
+
}, {
|
|
2004
|
+
/** The cast member: `character:<id>`, `seated-member:<id>`, `player-seat:<id>`, or a cast member id. */
|
|
2005
|
+
member: string;
|
|
2006
|
+
/** The entry: an id, a write result, or a name in the session's lorebook. */
|
|
2007
|
+
entry: string;
|
|
2008
|
+
}, "core:outlet/note-entry-knowledge@1"> & {
|
|
2009
|
+
kind: 'outlet';
|
|
2010
|
+
slots?: {
|
|
2011
|
+
readonly params: {
|
|
2012
|
+
readonly kind: "parameters";
|
|
2013
|
+
readonly schema: {
|
|
2014
|
+
readonly knowledgeKind: {
|
|
2015
|
+
readonly type: "enum";
|
|
2016
|
+
readonly of: readonly ["was_told", "has_been_there"];
|
|
2017
|
+
readonly members: readonly [{
|
|
2018
|
+
readonly key: "was_told";
|
|
2019
|
+
readonly label: {
|
|
2020
|
+
readonly en: "Was told";
|
|
2021
|
+
};
|
|
2022
|
+
}, {
|
|
2023
|
+
readonly key: "has_been_there";
|
|
2024
|
+
readonly label: {
|
|
2025
|
+
readonly en: "Has been there";
|
|
2026
|
+
};
|
|
2027
|
+
}];
|
|
2028
|
+
readonly default: "was_told";
|
|
2029
|
+
readonly label: {
|
|
2030
|
+
readonly en: "How they came to know it";
|
|
2031
|
+
};
|
|
2032
|
+
readonly description: {
|
|
2033
|
+
readonly en: "Was told: someone said it in front of them. Has been there: they were at the place.";
|
|
2034
|
+
};
|
|
2035
|
+
};
|
|
2036
|
+
readonly end: {
|
|
2037
|
+
readonly type: "boolean";
|
|
2038
|
+
readonly default: false;
|
|
2039
|
+
readonly label: {
|
|
2040
|
+
readonly en: "No longer knows it";
|
|
2041
|
+
};
|
|
2042
|
+
readonly description: {
|
|
2043
|
+
readonly en: "Ends what play noted for this member and entry instead of noting it. A tie the lorebookβs owner set stays.";
|
|
2044
|
+
};
|
|
2045
|
+
};
|
|
2046
|
+
};
|
|
2047
|
+
};
|
|
2048
|
+
} | undefined;
|
|
2049
|
+
}>;
|
|
1716
2050
|
/**
|
|
1717
2051
|
* Make a lorebook: write one lorebook into the acting person's library.
|
|
1718
2052
|
*
|
|
@@ -1733,24 +2067,4 @@ export declare const createLorebook: import("@serene-pub/sdk").Pinned<import("@s
|
|
|
1733
2067
|
kind: 'outlet';
|
|
1734
2068
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1735
2069
|
}>;
|
|
1736
|
-
/**
|
|
1737
|
-
* Read a lorebook into a session: attach an existing lorebook to a session.
|
|
1738
|
-
*
|
|
1739
|
-
* Takes `lorebookId` and, optionally, `sessionId` (absent: the run's own
|
|
1740
|
-
* session). Writes the session's lorebook; what it replaced is kept so Back
|
|
1741
|
-
* can restore it. The app judges the person (read rights on the book and write
|
|
1742
|
-
* rights on the session) and their library write mode (Full, Review or Off).
|
|
1743
|
-
* A genre must declare `writes.library.lorebooks`, and
|
|
1744
|
-
* `writes.library.sessions` to name a session other than the run's.
|
|
1745
|
-
* @internal
|
|
1746
|
-
*/
|
|
1747
|
-
export declare const attachLorebook: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
1748
|
-
main: string;
|
|
1749
|
-
}, {
|
|
1750
|
-
lorebookId: string;
|
|
1751
|
-
sessionId: string;
|
|
1752
|
-
}, "core:outlet/attach-lorebook@1"> & {
|
|
1753
|
-
kind: 'outlet';
|
|
1754
|
-
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
1755
|
-
}>;
|
|
1756
2070
|
//# sourceMappingURL=outlets.d.ts.map
|