@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.js
CHANGED
|
@@ -238,6 +238,45 @@ export const createMessage = pin(describeOutletDefinition({
|
|
|
238
238
|
* every row but a planner's.
|
|
239
239
|
*/
|
|
240
240
|
turnPlan: S.json,
|
|
241
|
+
/**
|
|
242
|
+
* π§ A folio line's **kind** (2026-10-17): one word stored as
|
|
243
|
+
* `metadata.kind` β the Dungeon Crawler's journal writes `did`
|
|
244
|
+
* Β· `found` Β· `met` Β· `changed` Β· `time` Β· `lead` β which a
|
|
245
|
+
* Messages copy filters on (`rowKinds`) and groups under. A
|
|
246
|
+
* literal in the node's config or a wired port; absent writes
|
|
247
|
+
* no kind, and a row with none always shows.
|
|
248
|
+
*/
|
|
249
|
+
kind: S.text,
|
|
250
|
+
/**
|
|
251
|
+
* π§ `'user'`: the row is a **person's own message** β the run
|
|
252
|
+
* owner's, through `speaker` (`character:<id>` their persona,
|
|
253
|
+
* `player-seat:<id>` their card-less seat, `user:<id>` or
|
|
254
|
+
* nothing for themselves). A literal, on `generating`'s terms;
|
|
255
|
+
* absent is a reply. The host writes a person's row only for the
|
|
256
|
+
* run's own person on a root run, refuses a persona or seat that
|
|
257
|
+
* is not theirs, and fires the row's `message-completed` under
|
|
258
|
+
* the person's cause, so turn order and auto-advance answer it
|
|
259
|
+
* as a send. `core:spec/save-message` sets it.
|
|
260
|
+
* @ruling owner 2026-10-15
|
|
261
|
+
*/
|
|
262
|
+
role: S.json,
|
|
263
|
+
/**
|
|
264
|
+
* π§ The person's ready **tray items** to post as the row's
|
|
265
|
+
* attachments (`core:image` / `core:file` parts), in one
|
|
266
|
+
* transaction with the row β or the write is refused whole and
|
|
267
|
+
* the tray stays. Only on a person's row (`role: 'user'`).
|
|
268
|
+
*/
|
|
269
|
+
trayItems: S.json,
|
|
270
|
+
/**
|
|
271
|
+
* π§ `true`: the row is a **table line** β the table's own
|
|
272
|
+
* line, said in no voice (a Dungeon Crawler roll line,
|
|
273
|
+
* 2026-10-15). A literal, on `generating`'s terms. Stored as
|
|
274
|
+
* `metadata.tableLine`; the log draws it without a speaker's
|
|
275
|
+
* face or name, and a history read that asks for no table lines
|
|
276
|
+
* (`session-history@1`'s `tableLines: false`) leaves it out, so
|
|
277
|
+
* a model never takes it for its own speech and imitates it.
|
|
278
|
+
*/
|
|
279
|
+
tableLine: S.json,
|
|
241
280
|
},
|
|
242
281
|
out: { main: S.writeResult, messageId: S.writeResult },
|
|
243
282
|
},
|
|
@@ -312,6 +351,15 @@ export const updateMessage = pin(describeOutletDefinition({
|
|
|
312
351
|
* only when given. Like `reasoning`, never re-sent to the model.
|
|
313
352
|
*/
|
|
314
353
|
sections: S.foldedSections,
|
|
354
|
+
/**
|
|
355
|
+
* π§ The reply's PARTS, in order (O5, 2026-10-21; additive) β
|
|
356
|
+
* `generate-text@1`'s `parts`. Every media part (a spoken
|
|
357
|
+
* reply's audio, a drawn image) lands on the row as a message
|
|
358
|
+
* part in the order the model gave it, after the text. Text and
|
|
359
|
+
* reasoning parts are not written from here: `text` and
|
|
360
|
+
* `reasoning` carry them.
|
|
361
|
+
*/
|
|
362
|
+
parts: S.partStream,
|
|
315
363
|
},
|
|
316
364
|
out: { main: S.writeResult, messageId: S.writeResult },
|
|
317
365
|
},
|
|
@@ -342,6 +390,18 @@ export const updateMessage = pin(describeOutletDefinition({
|
|
|
342
390
|
* Delete a message. Publishes `lost` β the content, role, speaker, channel
|
|
343
391
|
* and metadata the row held β beside the write result, so a listener (a
|
|
344
392
|
* plugin cleaning its rows, the next reply's inlet) knows what went.
|
|
393
|
+
*
|
|
394
|
+
* π§ **The deletion outlet** (RF fix 5, owner ruling 2026-10-23: deletion
|
|
395
|
+
* requires a pipeline, so the genre manages it). Placed by the built-in's
|
|
396
|
+
* own spec (β³ retired as a person's verb), which names its row on `target`,
|
|
397
|
+
* and by a **deletion pipeline** β a document entered through
|
|
398
|
+
* `core:inlet/message-deletion-asked@1`, the only other place it may stand
|
|
399
|
+
* (`deletionPipelinePlaces`) β which hands it the deletion the event carried
|
|
400
|
+
* on `asked`, wired from the inlet's `main`
|
|
401
|
+
* (`C.deleteMessage.v1({ asked: $.input.main })`), and deletes that message
|
|
402
|
+
* and no other. One transaction: the row goes and everything the message
|
|
403
|
+
* changed goes with it by the one retraction rule (RF fix 4) β and `taken`
|
|
404
|
+
* says what that was.
|
|
345
405
|
* @experimental
|
|
346
406
|
*/
|
|
347
407
|
export const deleteMessage = pin(describeOutletDefinition({
|
|
@@ -356,8 +416,30 @@ export const deleteMessage = pin(describeOutletDefinition({
|
|
|
356
416
|
timeoutMs: 5000,
|
|
357
417
|
causesEvent: 'core:event/message-deleted@1',
|
|
358
418
|
ports: {
|
|
359
|
-
in: {
|
|
360
|
-
|
|
419
|
+
in: {
|
|
420
|
+
/** The row to delete β the built-in's own spec's port. */
|
|
421
|
+
target: S.rowIds,
|
|
422
|
+
/**
|
|
423
|
+
* π§ The deletion a person asked for, whole (RF fix 5): a
|
|
424
|
+
* deletion pipeline's port, wired from
|
|
425
|
+
* `core:inlet/message-deletion-asked@1.main` and nothing else
|
|
426
|
+
* (`validate()`). The message deleted is the one it names.
|
|
427
|
+
*/
|
|
428
|
+
asked: S.deletionAsked,
|
|
429
|
+
},
|
|
430
|
+
out: {
|
|
431
|
+
main: S.writeResult,
|
|
432
|
+
messageId: S.writeResult,
|
|
433
|
+
lost: S.json,
|
|
434
|
+
/**
|
|
435
|
+
* π§ What went with it (RF fix 5): the one retraction rule's
|
|
436
|
+
* count of what the message changed and was taken back β
|
|
437
|
+
* values, configurations, proposals, zone snapshots, lore
|
|
438
|
+
* writes by what became of each, the notes' entries, and
|
|
439
|
+
* whether the clock moved back.
|
|
440
|
+
*/
|
|
441
|
+
taken: S.json,
|
|
442
|
+
},
|
|
361
443
|
},
|
|
362
444
|
}));
|
|
363
445
|
/**
|
|
@@ -477,6 +559,226 @@ export const setSessionAnnex = pin(describeOutletDefinition({
|
|
|
477
559
|
out: { main: S.writeResult, annex: S.json },
|
|
478
560
|
},
|
|
479
561
|
}));
|
|
562
|
+
/**
|
|
563
|
+
* π§ Name a person's **player seat** in this session (Dungeon Crawler's
|
|
564
|
+
* interview, 2026-10-15): the pipeline door to the seat name a person sets
|
|
565
|
+
* by hand in session settings (`sessions:update` `seatName`). The seat is
|
|
566
|
+
* `user`'s β a `user:<id>` reference, the addressee of the form the name
|
|
567
|
+
* answered β their card-less seat first, else their first seat; with none,
|
|
568
|
+
* a name opens a card-less seat for them, as the hand-set name does. The
|
|
569
|
+
* host refuses a seat for somebody who is neither the owner nor a playing
|
|
570
|
+
* guest, and a blank name (this outlet never clears one).
|
|
571
|
+
*
|
|
572
|
+
* `seat` is the seat as a participant reference β `player-seat:<id>` for a
|
|
573
|
+
* card-less seat, `character:<id>` for a seat with a card β and `seats` the
|
|
574
|
+
* same as a one-item list, the shape `resolve-state-changes@1`'s `owners`
|
|
575
|
+
* takes, so the seat's own stats can be written in the same run.
|
|
576
|
+
*
|
|
577
|
+
* π§ `retire` (Dungeon Crawler's new character after a death, owner ruling
|
|
578
|
+
* 2026-10-18): one of `user`'s own seats, by reference. That seat leaves the
|
|
579
|
+
* table β its lines keep its name, its state stays where it was filed β and
|
|
580
|
+
* the name opens a NEW card-less seat for them, which `seat` then names. A
|
|
581
|
+
* seat that is not theirs, or not live, is refused. `@1` evolves in place.
|
|
582
|
+
* @experimental
|
|
583
|
+
*/
|
|
584
|
+
export const setSeatName = pin(describeOutletDefinition({
|
|
585
|
+
id: 'core:outlet/set-seat-name@1',
|
|
586
|
+
i18n: { name: { en: 'Name a player seat' } },
|
|
587
|
+
effects: 'write',
|
|
588
|
+
reviewDefault: 'off',
|
|
589
|
+
review: { fields: ['name'] },
|
|
590
|
+
timeoutMs: 2000,
|
|
591
|
+
ports: {
|
|
592
|
+
in: {
|
|
593
|
+
/** Whose seat: `user:<id>`. */
|
|
594
|
+
user: S.participantRef,
|
|
595
|
+
/** The character's name in this session. */
|
|
596
|
+
name: S.text,
|
|
597
|
+
/**
|
|
598
|
+
* π§ A seat of theirs this name replaces (`player-seat:<id>` or
|
|
599
|
+
* `character:<id>`): retired, and a new seat opened. JSON, so a
|
|
600
|
+
* script's part may name it (absent or null: none).
|
|
601
|
+
*/
|
|
602
|
+
retire: S.json,
|
|
603
|
+
},
|
|
604
|
+
out: {
|
|
605
|
+
main: S.writeResult,
|
|
606
|
+
seat: S.participantRef,
|
|
607
|
+
seats: S.participantRefs,
|
|
608
|
+
},
|
|
609
|
+
},
|
|
610
|
+
}));
|
|
611
|
+
/**
|
|
612
|
+
* π§ **Open or close the composer** on a channel lane (owner ruling
|
|
613
|
+
* 2026-10-15): the genre's switch for whether a person may write there. The
|
|
614
|
+
* state is the session row's (`sessions.composer_states`, SDK
|
|
615
|
+
* `ComposerStatesV1`); core opens and closes nothing on its own, so a
|
|
616
|
+
* composer a genre closed stays closed until a pipeline opens it.
|
|
617
|
+
*
|
|
618
|
+
* - `channel` β a slug, a canonical lane (`parley:2`; the bare slug is lane
|
|
619
|
+
* 1 alone), or `*` for every channel;
|
|
620
|
+
* - `open` β `true` to open, `false` to close;
|
|
621
|
+
* - `reason` β optional: what the composer is waiting on, as a sentence
|
|
622
|
+
* the person reads ("Make your character on the Planner tab first.").
|
|
623
|
+
* Shown in place of the placeholder and repeated in the refusal of a send
|
|
624
|
+
* the widget let through. Named `reason`, never `message`: a message is a
|
|
625
|
+
* session's row;
|
|
626
|
+
* - `person` β optional: whose composer, `user:<id>`; absent is everyone,
|
|
627
|
+
* the session's owner included.
|
|
628
|
+
*
|
|
629
|
+
* Opening for everyone clears the lane's every closure; opening for one
|
|
630
|
+
* person clears theirs, and never overrides a close for everyone. The send
|
|
631
|
+
* door (`sessionMessages:sendPersonaMessage`, and `message-offered`'s offer)
|
|
632
|
+
* refuses a line on a closed composer; turn controls (Continue) are the
|
|
633
|
+
* round's, not the composer's, and are not touched. Every member's page is
|
|
634
|
+
* told at once.
|
|
635
|
+
*
|
|
636
|
+
* `main` is the write; `states` the whole document after it.
|
|
637
|
+
* @experimental
|
|
638
|
+
*/
|
|
639
|
+
export const setComposerState = pin(describeOutletDefinition({
|
|
640
|
+
id: 'core:outlet/set-composer-state@1',
|
|
641
|
+
i18n: { name: { en: 'Open or close the composer' } },
|
|
642
|
+
effects: 'write',
|
|
643
|
+
reviewDefault: 'off',
|
|
644
|
+
review: { fields: ['reason'] },
|
|
645
|
+
timeoutMs: 2000,
|
|
646
|
+
ports: {
|
|
647
|
+
in: {
|
|
648
|
+
/** A slug, a canonical lane (`parley:2`), or `*`. */
|
|
649
|
+
channel: S.text,
|
|
650
|
+
/** `true` opens, `false` closes. */
|
|
651
|
+
open: S.json,
|
|
652
|
+
/** What the composer waits on β a sentence. Optional. */
|
|
653
|
+
reason: S.text,
|
|
654
|
+
/**
|
|
655
|
+
* Whose composer: `user:<id>`, a participant reference as text.
|
|
656
|
+
* Optional; absent is everyone. `json`, as `set-stat-config@1`'s
|
|
657
|
+
* `owner` is: a genre wires it from a script's text, and the
|
|
658
|
+
* host parses the reference (a typed port refused that wire,
|
|
659
|
+
* 2026-10-18).
|
|
660
|
+
*/
|
|
661
|
+
person: S.json,
|
|
662
|
+
},
|
|
663
|
+
out: {
|
|
664
|
+
main: S.writeResult,
|
|
665
|
+
states: S.json,
|
|
666
|
+
},
|
|
667
|
+
},
|
|
668
|
+
}));
|
|
669
|
+
/**
|
|
670
|
+
* π§ **Suggest a new scene** (pass 7, R-i, sprint 2, 2026-10-25): the judged scene check's
|
|
671
|
+
* answer β "the story moved on; the next scene begins at this line, because β¦" β recorded as a
|
|
672
|
+
* **scene cue** with trigger `judged` (`JUDGED_SCENE_TRIGGER`) and the model's words as its
|
|
673
|
+
* reason. From there the session's scene mode decides, as for any boundary trigger: Suggested β
|
|
674
|
+
* the *New scene?* chip; Automatic β the boundary is placed (unless `ask`); Manual β nothing.
|
|
675
|
+
* The host re-checks the judged check's conditions at commit and skips, with a note, when they
|
|
676
|
+
* no longer hold or `at` is not one of its lines. Never held at the review gate: a cue's review
|
|
677
|
+
* is the chip.
|
|
678
|
+
*
|
|
679
|
+
* β Not a scene write (a person's *Start scene here*) and not a state proposal.
|
|
680
|
+
* @experimental
|
|
681
|
+
* @ruling R-i (2026-10-24)
|
|
682
|
+
*/
|
|
683
|
+
export const proposeSceneCue = pin(describeOutletDefinition({
|
|
684
|
+
id: 'core:outlet/propose-scene-cue@1',
|
|
685
|
+
i18n: { name: { en: 'Suggest a new scene' } },
|
|
686
|
+
effects: 'write',
|
|
687
|
+
reviewDefault: 'off',
|
|
688
|
+
review: { fields: ['reason'] },
|
|
689
|
+
timeoutMs: 2000,
|
|
690
|
+
slots: {
|
|
691
|
+
params: {
|
|
692
|
+
kind: 'parameters',
|
|
693
|
+
facet: 'behavior',
|
|
694
|
+
schema: {
|
|
695
|
+
ask: {
|
|
696
|
+
type: 'boolean',
|
|
697
|
+
default: false,
|
|
698
|
+
label: { en: 'Always ask' },
|
|
699
|
+
description: {
|
|
700
|
+
en: 'Offer the new scene as a suggestion even when this session starts scenes on its own (Automatic). Off: the scene setting decides.',
|
|
701
|
+
},
|
|
702
|
+
},
|
|
703
|
+
},
|
|
704
|
+
},
|
|
705
|
+
},
|
|
706
|
+
ports: {
|
|
707
|
+
in: {
|
|
708
|
+
/**
|
|
709
|
+
* The line the next scene would open at β a message id, as the
|
|
710
|
+
* sweep's sort gives it. `json`, as `set-composer-state@1`'s
|
|
711
|
+
* `person` is: wired from a script's output.
|
|
712
|
+
*/
|
|
713
|
+
at: S.json,
|
|
714
|
+
/** The channel lane `at` is on, any spelling (canonicalised); absent or blank: `main`. */
|
|
715
|
+
channel: S.text,
|
|
716
|
+
/** Why, in the model's few words β the chip's reason ("the party left the inn"). */
|
|
717
|
+
reason: S.text,
|
|
718
|
+
},
|
|
719
|
+
out: {
|
|
720
|
+
main: S.writeResult,
|
|
721
|
+
/** A `ProposedSceneCue`. */
|
|
722
|
+
cue: S.json,
|
|
723
|
+
},
|
|
724
|
+
},
|
|
725
|
+
}));
|
|
726
|
+
/**
|
|
727
|
+
* π§ **Configure a stat** for one owner in this session (owner ruling
|
|
728
|
+
* 2026-10-15): the pipeline door to an owner's **stat configuration** β the
|
|
729
|
+
* deviations from an attribute slot's own config that one owner carries,
|
|
730
|
+
* `{ max: 26 }` on a seat's health. Stored as an `attribute_configs` row
|
|
731
|
+
* through the same writer a person's `state:configure` takes, so the bar,
|
|
732
|
+
* the write's bound and every prompt read the same maximum.
|
|
733
|
+
*
|
|
734
|
+
* The three in-ports are one `StatConfigDocument` (SDK `attributes.ts`) β
|
|
735
|
+
* the format a card or session editor sends too:
|
|
736
|
+
*
|
|
737
|
+
* - `owner` β whose: `player-seat:<id>`, `character:<id>` (that card's
|
|
738
|
+
* session layer) or `world`;
|
|
739
|
+
* - `slot` β the attribute slot id, `core:slot/hp@1`;
|
|
740
|
+
* - `config` β only the keys the slot's stat shape bounds
|
|
741
|
+
* (`statConfigKeys`): a number's `min`/`max`, a choice's `of`, a list's
|
|
742
|
+
* `maxItems` and `of`/`maxLength`, a line's `maxLength`, and every
|
|
743
|
+
* slot's `descriptor`.
|
|
744
|
+
*
|
|
745
|
+
* Refused, halting the run with the sentence: a slot nothing declares or
|
|
746
|
+
* the session does not track, a key the shape does not bound or a value it
|
|
747
|
+
* cannot be, a `min` above the `max` once merged, an owner that is not this
|
|
748
|
+
* session's. Anchored like a value β the owner's open anchor, or `worldRow`
|
|
749
|
+
* for a seat or the world β so a retake or a swipe takes it back.
|
|
750
|
+
*
|
|
751
|
+
* `main` is `{ configId, owner, slot, before, config }`: the row, and the
|
|
752
|
+
* configuration in force before and after it.
|
|
753
|
+
* @experimental
|
|
754
|
+
*/
|
|
755
|
+
export const setStatConfig = pin(describeOutletDefinition({
|
|
756
|
+
id: 'core:outlet/set-stat-config@1',
|
|
757
|
+
i18n: { name: { en: 'Configure a stat' } },
|
|
758
|
+
effects: 'write',
|
|
759
|
+
reviewDefault: 'off',
|
|
760
|
+
review: { fields: ['config'] },
|
|
761
|
+
timeoutMs: 2000,
|
|
762
|
+
ports: {
|
|
763
|
+
in: {
|
|
764
|
+
/** Whose: a participant reference, `world`, or `location:<id>` (a place's lore entry). */
|
|
765
|
+
owner: S.json,
|
|
766
|
+
/** The attribute slot: `core:slot/hp@1`. */
|
|
767
|
+
slot: S.text,
|
|
768
|
+
/**
|
|
769
|
+
* The deviations: `{ max: 26 }`. π§ One universal key
|
|
770
|
+
* (2026-10-17): `lock` β `none` Β· `people` (no hand edit; the
|
|
771
|
+
* dice and the session's owner still write) Β· `all` (nothing
|
|
772
|
+
* writes until unlocked). The host refuses a locked write with
|
|
773
|
+
* its own sentence; widgets draw the slot without edit controls.
|
|
774
|
+
*/
|
|
775
|
+
config: S.json,
|
|
776
|
+
/** The row a seat's or the world's configuration is filed at β `set-state@1`'s `worldRow`. Optional. */
|
|
777
|
+
worldRow: S.writeResult,
|
|
778
|
+
},
|
|
779
|
+
out: { main: S.json },
|
|
780
|
+
},
|
|
781
|
+
}));
|
|
480
782
|
/**
|
|
481
783
|
* Set one **annex field** (2026-09-26): the write behind every
|
|
482
784
|
* `annexField()` a package declares β core's one pipeline for them all,
|
|
@@ -1055,6 +1357,20 @@ export const attachAudio = pin(describeOutletDefinition({
|
|
|
1055
1357
|
* says more (2026-09-29). Absent on nearly every write, and an
|
|
1056
1358
|
* empty list is the same as none. A link the list states twice, or one the
|
|
1057
1359
|
* session already reads, is written once: see `linkLoreEntries` on idempotence.
|
|
1360
|
+
*
|
|
1361
|
+
* ## `fields` β the entry type's own half (π§ 2026-10-21, Lair rewrite D2)
|
|
1362
|
+
*
|
|
1363
|
+
* The typed fields the entry type declares (`EntryShape.fields` β a place's
|
|
1364
|
+
* category; a derived entry type's piece fields, a weapon's damage), as one
|
|
1365
|
+
* object keyed by field. Its title-role field is not among them: that is the
|
|
1366
|
+
* `name` port. Checked against the type named by `entryType` with the SDK's
|
|
1367
|
+
* one checker (`fieldsFindings`) at the review gate and again at the commit:
|
|
1368
|
+
* a misfit β an undeclared key, a value of the wrong kind, a required field
|
|
1369
|
+
* missing β is refused with the field named, never trimmed to fit. A pipeline
|
|
1370
|
+
* asks a model for them with `jsonSchemaOf(entryType)` into
|
|
1371
|
+
* `generate-json@1`'s `schema`, so what is asked and what is checked are one
|
|
1372
|
+
* declaration. Absent: the type's declared defaults, as before. `@1` evolves
|
|
1373
|
+
* in place (pre-release).
|
|
1058
1374
|
* @internal
|
|
1059
1375
|
*/
|
|
1060
1376
|
export const createLoreEntry = pin(describeOutletDefinition({
|
|
@@ -1062,13 +1378,15 @@ export const createLoreEntry = pin(describeOutletDefinition({
|
|
|
1062
1378
|
i18n: { name: { en: 'Save the lore entry' } },
|
|
1063
1379
|
effects: 'write',
|
|
1064
1380
|
/**
|
|
1065
|
-
*
|
|
1066
|
-
|
|
1381
|
+
* The name, the content and (π§ D2) the typed fields may be edited
|
|
1382
|
+
* before the entry lands β the fields are values a reader can retype
|
|
1383
|
+
* (a room's terrain), and an edit that no longer fits the type is
|
|
1384
|
+
* refused at the gate. `links` is deliberately not among them: the
|
|
1067
1385
|
* gate's form edits values a reader can retype, and a list of
|
|
1068
1386
|
* references is not one β a reviewer who disagrees with a room's exits
|
|
1069
1387
|
* refuses the write.
|
|
1070
1388
|
*/
|
|
1071
|
-
review: { fields: ['name', 'content'] },
|
|
1389
|
+
review: { fields: ['name', 'content', 'fields'] },
|
|
1072
1390
|
timeoutMs: 10000,
|
|
1073
1391
|
causesEvent: 'core:event/lore-entry-created@1',
|
|
1074
1392
|
slots: {
|
|
@@ -1094,6 +1412,79 @@ export const createLoreEntry = pin(describeOutletDefinition({
|
|
|
1094
1412
|
* note above on the live row. Names, entry ids, or `LoreLinkInput`s.
|
|
1095
1413
|
*/
|
|
1096
1414
|
links: S.json,
|
|
1415
|
+
/**
|
|
1416
|
+
* π§ The entry type's typed fields, one object keyed by field
|
|
1417
|
+
* (the title's field excepted) β checked whole against the
|
|
1418
|
+
* type (`fieldsFindings`); see the note above.
|
|
1419
|
+
*/
|
|
1420
|
+
fields: S.json,
|
|
1421
|
+
/**
|
|
1422
|
+
* π§ The messages this write was written from. Pass it when the write is a
|
|
1423
|
+
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1424
|
+
* session's settle line moves to the newest of them.
|
|
1425
|
+
*/
|
|
1426
|
+
sources: S.loreSources,
|
|
1427
|
+
/** π§ A `LoreMatch` β how to find the entry this would otherwise create. */
|
|
1428
|
+
match: S.json,
|
|
1429
|
+
/**
|
|
1430
|
+
* π§ The cast member this entry is filed under β a `character:<id>` reference, resolved to that
|
|
1431
|
+
* character's cast member in the book the entry lands in (the entry type's `anchor` role).
|
|
1432
|
+
*/
|
|
1433
|
+
bind: S.participantRef,
|
|
1434
|
+
},
|
|
1435
|
+
out: { main: S.writeResult, entryId: S.writeResult },
|
|
1436
|
+
},
|
|
1437
|
+
}));
|
|
1438
|
+
/**
|
|
1439
|
+
* π§ Change an entry of the session's lorebook β its name, its content, its
|
|
1440
|
+
* typed fields (2026-10-21, Lair rewrite D2: *File as a room* on a room that
|
|
1441
|
+
* already exists, a draft's fields laid onto an entry a person wrote).
|
|
1442
|
+
*
|
|
1443
|
+
* `entry` names it as `link-lore-entries@1`'s `to` does: an entry id, the
|
|
1444
|
+
* write result of the write that made it, or a **name** resolved within the
|
|
1445
|
+
* session's own lorebook (case and surrounding space ignored; a name nothing
|
|
1446
|
+
* answers to, or two entries answer to, is refused with a sentence).
|
|
1447
|
+
*
|
|
1448
|
+
* Every in-port but `entry` is optional, and an absent one leaves that part
|
|
1449
|
+
* as it is. `fields` is a **patch**: the keys it names are laid over the
|
|
1450
|
+
* entry's stored fields and the rest kept, `null` clears one; it is checked
|
|
1451
|
+
* against the entry's own type as a patch (`fieldsFindings(type, fields,
|
|
1452
|
+
* { partial: true })`) at the review gate and at the commit, and a misfit is
|
|
1453
|
+
* refused with the field named. The type itself never changes β a room stays
|
|
1454
|
+
* a place.
|
|
1455
|
+
*
|
|
1456
|
+
* How the change lands is the host's: on the session's line, the way the
|
|
1457
|
+
* lorebook's own editor writes an edit there (an amendment where the line
|
|
1458
|
+
* amends). β It causes no event yet (π§): `lore-entry-created` means a new
|
|
1459
|
+
* row, and a subscriber that needs edits waits for one of its own.
|
|
1460
|
+
* @internal
|
|
1461
|
+
*/
|
|
1462
|
+
export const updateLoreEntry = pin(describeOutletDefinition({
|
|
1463
|
+
id: 'core:outlet/update-lore-entry@1',
|
|
1464
|
+
i18n: { name: { en: 'Change the lore entry' } },
|
|
1465
|
+
effects: 'write',
|
|
1466
|
+
/**
|
|
1467
|
+
* What the change says may be retyped; which entry it changes may not
|
|
1468
|
+
* β that is the run's identity, the rule `delete-message@1` states.
|
|
1469
|
+
*/
|
|
1470
|
+
review: { fields: ['name', 'content', 'fields'] },
|
|
1471
|
+
timeoutMs: 10000,
|
|
1472
|
+
ports: {
|
|
1473
|
+
in: {
|
|
1474
|
+
/** The entry to change: an id, a write result, or a name in the session's lorebook. */
|
|
1475
|
+
entry: S.json,
|
|
1476
|
+
/** Its new name. Absent: kept. */
|
|
1477
|
+
name: S.text,
|
|
1478
|
+
/** Its new content. Absent: kept. */
|
|
1479
|
+
content: S.text,
|
|
1480
|
+
/** Typed fields laid over the stored ones, key by key; `null` clears one. Absent: kept. */
|
|
1481
|
+
fields: S.json,
|
|
1482
|
+
/**
|
|
1483
|
+
* π§ The messages this write was written from. Pass it when the write is a
|
|
1484
|
+
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1485
|
+
* session's settle line moves to the newest of them.
|
|
1486
|
+
*/
|
|
1487
|
+
sources: S.loreSources,
|
|
1097
1488
|
},
|
|
1098
1489
|
out: { main: S.writeResult, entryId: S.writeResult },
|
|
1099
1490
|
},
|
|
@@ -1231,6 +1622,12 @@ export const linkLoreEntries = pin(describeOutletDefinition({
|
|
|
1231
1622
|
name: S.text,
|
|
1232
1623
|
/** Its description. Optional. */
|
|
1233
1624
|
description: S.text,
|
|
1625
|
+
/**
|
|
1626
|
+
* π§ The messages this write was written from. Pass it when the write is a
|
|
1627
|
+
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1628
|
+
* session's settle line moves to the newest of them.
|
|
1629
|
+
*/
|
|
1630
|
+
sources: S.loreSources,
|
|
1234
1631
|
},
|
|
1235
1632
|
out: { main: S.writeResult, linkId: S.writeResult },
|
|
1236
1633
|
},
|
|
@@ -1254,7 +1651,15 @@ export const graphProposal = pin(describeOutletDefinition({
|
|
|
1254
1651
|
timeoutMs: 10000,
|
|
1255
1652
|
causesEvent: 'core:event/graph-proposal-created@1',
|
|
1256
1653
|
ports: {
|
|
1257
|
-
in: {
|
|
1654
|
+
in: {
|
|
1655
|
+
proposal: S.json,
|
|
1656
|
+
/**
|
|
1657
|
+
* π§ The messages this write was written from. Pass it when the write is a
|
|
1658
|
+
* summary of the story; leave it off when it is a change in it (pass 6). Present, the write is committed: the
|
|
1659
|
+
* session's settle line moves to the newest of them.
|
|
1660
|
+
*/
|
|
1661
|
+
sources: S.loreSources,
|
|
1662
|
+
},
|
|
1258
1663
|
out: { main: S.writeResult, proposalId: S.writeResult },
|
|
1259
1664
|
},
|
|
1260
1665
|
}));
|
package/dist/queries.d.ts
CHANGED
|
@@ -65,6 +65,20 @@ export declare const sessionHistory: import("@serene-pub/sdk").Pinned<import("@s
|
|
|
65
65
|
* carries the id, never the text, so the row is read here.
|
|
66
66
|
*/
|
|
67
67
|
messageId: string;
|
|
68
|
+
/**
|
|
69
|
+
* π§ **One channel lane, chosen at run time** (2026-10-15):
|
|
70
|
+
* wired β `$.input.channel`, the channel lane the turn was
|
|
71
|
+
* fired on β the read is exactly that channel lane, in place
|
|
72
|
+
* of the `channel` parameter. A bare slug here is its lane 1,
|
|
73
|
+
* never the whole channel: the run names the channel lane a
|
|
74
|
+
* row is on, and a channel lane is one conversation (`parley` is the owner's lane with the
|
|
75
|
+
* Planner, `parley:2` another player's β reading the slug
|
|
76
|
+
* would hand one player's private talk to another's reply).
|
|
77
|
+
* `limit`, `budget`, `unplayedOnly` and `talkOnly` apply as
|
|
78
|
+
* they would to the parameter. Unwired, the parameter is read.
|
|
79
|
+
* The Dungeon Crawler's Planner reads its player's lane so.
|
|
80
|
+
*/
|
|
81
|
+
channelLane: string;
|
|
68
82
|
}, "core:query/session-history@1"> & {
|
|
69
83
|
kind: 'query';
|
|
70
84
|
slots?: {
|
|
@@ -179,6 +193,23 @@ export declare const sessionHistory: import("@serene-pub/sdk").Pinned<import("@s
|
|
|
179
193
|
readonly en: "On every channel but 'main', read only what was said there: people's lines and the replies to them β never a greeting or a turn's notes.";
|
|
180
194
|
};
|
|
181
195
|
};
|
|
196
|
+
/**
|
|
197
|
+
* π§ **Table lines** (2026-10-15): the rows written as the
|
|
198
|
+
* table's own (`create-message@1`'s `tableLine` β a Dungeon
|
|
199
|
+
* Crawler roll line). On by default, so every spec reads
|
|
200
|
+
* what it always read; a spec whose brief already carries
|
|
201
|
+
* what those lines say turns them off, and says so here.
|
|
202
|
+
*/
|
|
203
|
+
readonly tableLines: {
|
|
204
|
+
readonly type: "boolean";
|
|
205
|
+
readonly default: true;
|
|
206
|
+
readonly label: {
|
|
207
|
+
readonly en: "Read the table lines";
|
|
208
|
+
};
|
|
209
|
+
readonly description: {
|
|
210
|
+
readonly en: "Include the table's own lines β roll lines and the like β in what this history reads. Off: only what was said.";
|
|
211
|
+
};
|
|
212
|
+
};
|
|
182
213
|
/**
|
|
183
214
|
* The transcript's intent, on the node that produces the
|
|
184
215
|
* transcript (built 2026-09-16 β see
|
|
@@ -2335,6 +2366,15 @@ export declare const availableTools: import("@serene-pub/sdk").Pinned<import("@s
|
|
|
2335
2366
|
tools: string;
|
|
2336
2367
|
}, {
|
|
2337
2368
|
scope: string;
|
|
2369
|
+
/**
|
|
2370
|
+
* π§ Which **kinds** of tool to offer (2026-10-19, the Chat
|
|
2371
|
+
* genre's `tools` field): `web`, `lore`, `lorebook-write`,
|
|
2372
|
+
* `image`, `clock`, `calculator`, `history` β the host maps
|
|
2373
|
+
* each kind onto the tools that serve it. Unwired, every tool
|
|
2374
|
+
* the session has (as before); an empty list, none. Added in
|
|
2375
|
+
* place (`@1` evolves until 0.7).
|
|
2376
|
+
*/
|
|
2377
|
+
kinds: string;
|
|
2338
2378
|
}, "core:query/available-tools@1"> & {
|
|
2339
2379
|
kind: 'query';
|
|
2340
2380
|
slots?: {
|
|
@@ -2805,8 +2845,12 @@ export declare const graphScenes: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
2805
2845
|
* The session's stats and states, resolved β an inventory is one, the
|
|
2806
2846
|
* `inventory` list stat (phase 3b retired possessions as edges).
|
|
2807
2847
|
*
|
|
2808
|
-
* `{ world, cast, slots, who, version }` β the same object `stateFor(sessionId)`
|
|
2848
|
+
* `{ world, cast, slots, configs, who, version }` β the same object `stateFor(sessionId)`
|
|
2809
2849
|
* returns and the shape `state` on `core:task/build-template-context@1` takes.
|
|
2850
|
+
* π§ `configs` is each owner's **stat configuration** in force β `world`
|
|
2851
|
+
* and every `cast.byId` key, then the slot id: `configs['player_seat:4']
|
|
2852
|
+
* ['core:slot/hp@1'].max` is that seat's full health, the bar's own number
|
|
2853
|
+
* (`core:outlet/set-stat-config@1` writes it).
|
|
2810
2854
|
* Every value is already resolved down session β lorebook β card β
|
|
2811
2855
|
* declaration default, with absence meaning **inherit** rather than zero, and
|
|
2812
2856
|
* derived slots computed rather than read.
|
|
@@ -2964,6 +3008,31 @@ export declare const lorebookState: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
2964
3008
|
};
|
|
2965
3009
|
} | undefined;
|
|
2966
3010
|
}>;
|
|
3011
|
+
/**
|
|
3012
|
+
* π§ **A person's channel lane** (owner ruling 2026-10-17): on a channel the
|
|
3013
|
+
* genre declares `lanes: 'personal'`, the lane that is this person's β
|
|
3014
|
+
* allocated by core on first ask, filed in the session's lane register,
|
|
3015
|
+
* and sent by the host to that person and the session's owner alone. The
|
|
3016
|
+
* same ask twice is the same lane; a shared channel is refused (its lanes
|
|
3017
|
+
* are the genre's to allocate). Replaces a genre's own userβlane map and
|
|
3018
|
+
* client-side hiding.
|
|
3019
|
+
* @experimental
|
|
3020
|
+
*/
|
|
3021
|
+
export declare const channelLane: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
3022
|
+
/** The canonical channel string of the lane: `parley` for lane 1, `parley:2` after. */
|
|
3023
|
+
lane: string;
|
|
3024
|
+
/** Whether this ask opened the lane. */
|
|
3025
|
+
opened: string;
|
|
3026
|
+
}, {
|
|
3027
|
+
scope: string;
|
|
3028
|
+
/** The channel's slug, declared with personal lanes. */
|
|
3029
|
+
channel: string;
|
|
3030
|
+
/** Whose lane: `user:<id>` β a participant reference as text (wired from a script's words; the host parses it). */
|
|
3031
|
+
person: string;
|
|
3032
|
+
}, "core:query/channel-lane@1"> & {
|
|
3033
|
+
kind: 'query';
|
|
3034
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
3035
|
+
}>;
|
|
2967
3036
|
/**
|
|
2968
3037
|
* π§ The **stat trail**: one stat's values over time, for one owner β the
|
|
2969
3038
|
* world, a cast member or a place (owner-confirmed 2026-09-27: "stats over
|