@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/inlets.d.ts
CHANGED
|
@@ -153,6 +153,19 @@ export declare const userMessage: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
153
153
|
* change is about a message, never a value (one word, one meaning).
|
|
154
154
|
*/
|
|
155
155
|
sessionChanges: string;
|
|
156
|
+
/**
|
|
157
|
+
* ๐ง The **ruleset the session plays** (2026-10-17, PLAN-sheet
|
|
158
|
+
* ยง15 C): `{ id, rigour, settings }` โ the ruleset's id
|
|
159
|
+
* (`core:ruleset/freeform@1`), the rigour in force (`prose`,
|
|
160
|
+
* `mechanics`, `scripts`) and ๐ง (2026-10-18) its `settings`,
|
|
161
|
+
* every setting at the session's value or its default (Vis
|
|
162
|
+
* Itineris's `casting: 'points'`). Always supplied, for the reason
|
|
163
|
+
* `channel` is: a junction compares against it. A genre that
|
|
164
|
+
* recommends a ruleset branches here instead of assuming it โ
|
|
165
|
+
* the Dungeon Crawler's interview writes a kit as plain pieces
|
|
166
|
+
* under Freeform and as the library's rows under Vis Itineris.
|
|
167
|
+
*/
|
|
168
|
+
ruleset: string;
|
|
156
169
|
/**
|
|
157
170
|
* What an action's fire sent along
|
|
158
171
|
* (2026-09-17): a form's answer โ `{ choice }` for a choices
|
|
@@ -553,6 +566,84 @@ export declare const formAddressed: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
553
566
|
kind: 'inlet';
|
|
554
567
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
555
568
|
}>;
|
|
569
|
+
/**
|
|
570
|
+
* ๐ง A person sent a message: the save pipeline's trigger. **A person's
|
|
571
|
+
* message is always saved through the pipeline** โ the host checks the door
|
|
572
|
+
* (access, the genre, the persona, the length, the channel) and dispatches
|
|
573
|
+
* `core:event/message-offered@1`; the bound spec writes the row. Core's
|
|
574
|
+
* default, `core:spec/save-message`, is this inlet and one
|
|
575
|
+
* `create-message@1` with `role: 'user'`.
|
|
576
|
+
*
|
|
577
|
+
* The payload is `core:shape/message-offered@1`; the ports below are it
|
|
578
|
+
* taken apart. No shape and no lock here: core's default serves every genre,
|
|
579
|
+
* and a genre's own save declares its own `(genre, event)`.
|
|
580
|
+
* @experimental
|
|
581
|
+
*/
|
|
582
|
+
export declare const messageOffered: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
583
|
+
main: string;
|
|
584
|
+
sessionScope: string;
|
|
585
|
+
sessionId: string;
|
|
586
|
+
/** The session's **settings document**, as on every session inlet. */
|
|
587
|
+
session: string;
|
|
588
|
+
/** The message as written. */
|
|
589
|
+
text: string;
|
|
590
|
+
/** The person sending โ `user:<id>`, the run's owner. */
|
|
591
|
+
person: string;
|
|
592
|
+
/**
|
|
593
|
+
* Who the message speaks as: `character:<id>` (the person's
|
|
594
|
+
* persona), `player-seat:<id>` (their card-less seat), or null โ
|
|
595
|
+
* the person as themselves. Wired to `create-message@1`'s
|
|
596
|
+
* `speaker`.
|
|
597
|
+
*/
|
|
598
|
+
speaker: string;
|
|
599
|
+
/** The channel it was written on, canonical. */
|
|
600
|
+
channel: string;
|
|
601
|
+
/** The person's ready tray items, sent as its attachments โ `create-message@1`'s `trayItems`. */
|
|
602
|
+
trayItemIds: string;
|
|
603
|
+
/** The message it answers, when the composer named one; null otherwise. */
|
|
604
|
+
replyTo: string;
|
|
605
|
+
/** Why it fired (`EventCause`) โ a person's send, `{ kind: 'user', userId }`. */
|
|
606
|
+
cause: string;
|
|
607
|
+
}, import("@serene-pub/sdk").PortDecl, "core:inlet/message-offered@1"> & {
|
|
608
|
+
kind: 'inlet';
|
|
609
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
610
|
+
}>;
|
|
611
|
+
/**
|
|
612
|
+
* ๐ง A person asked for a message to be deleted: a **deletion pipeline**'s
|
|
613
|
+
* trigger (RF fix 5). Deletion requires a pipeline, so the genre manages it:
|
|
614
|
+
* the host checks the door (the message is the session's, the person may act
|
|
615
|
+
* on it) and dispatches `core:event/message-deletion-asked@1`; the pipeline
|
|
616
|
+
* registered there ends in `core:outlet/delete-message@1`, handed the
|
|
617
|
+
* deletion whole on its `asked` port
|
|
618
|
+
* (`C.deleteMessage.v1({ asked: $.input.main })`): it deletes THE message
|
|
619
|
+
* the event carried and takes back everything it changed โ and the pipeline
|
|
620
|
+
* may put steps of its own around it. Core ships no such pipeline: with none
|
|
621
|
+
* registered, no message offers Delete.
|
|
622
|
+
*
|
|
623
|
+
* The payload is `core:shape/deletion-asked@1`, published whole on `main`
|
|
624
|
+
* (the delete's `asked`); the ports beside it are it taken apart, for the
|
|
625
|
+
* steps around the delete. No lock: registrations mount a pipeline on its
|
|
626
|
+
* event.
|
|
627
|
+
* @experimental
|
|
628
|
+
*/
|
|
629
|
+
export declare const messageDeletionAsked: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
630
|
+
main: string;
|
|
631
|
+
sessionScope: string;
|
|
632
|
+
sessionId: string;
|
|
633
|
+
/** The session's **settings document**, as on every session inlet. */
|
|
634
|
+
session: string;
|
|
635
|
+
/** The message the person asked to delete (the delete itself reads it off `main`). */
|
|
636
|
+
messageId: string;
|
|
637
|
+
/** Its channel, canonical. */
|
|
638
|
+
channel: string;
|
|
639
|
+
/** Who asked โ `user:<id>`, the run's owner. */
|
|
640
|
+
person: string;
|
|
641
|
+
/** Why it fired (`EventCause`) โ a person's press, `{ kind: 'user', userId }`. */
|
|
642
|
+
cause: string;
|
|
643
|
+
}, import("@serene-pub/sdk").PortDecl, "core:inlet/message-deletion-asked@1"> & {
|
|
644
|
+
kind: 'inlet';
|
|
645
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
646
|
+
}>;
|
|
556
647
|
/** @internal */
|
|
557
648
|
export declare const summarizeRequest: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
558
649
|
main: string;
|
|
@@ -625,4 +716,96 @@ export declare const cardAction: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
625
716
|
kind: 'inlet';
|
|
626
717
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
627
718
|
}>;
|
|
719
|
+
/**
|
|
720
|
+
* ๐ง Where a **routine** enters โ a pipeline registered on a cadence
|
|
721
|
+
* (`register(everyNTurns({ n: 5 }), storySweep)`), run when the cadence says
|
|
722
|
+
* so. Nothing opinionated (R9): a routine's pipeline gets the session, the
|
|
723
|
+
* metadata of where the routine resides, and the parameters of the moment
|
|
724
|
+
* its cadence listened to โ and queries everything else through the SDK.
|
|
725
|
+
*
|
|
726
|
+
* ยท `session` / `sessionScope` / `sessionId` โ the session, always: routines
|
|
727
|
+
* live in sessions (R9).
|
|
728
|
+
* ยท `routine` โ `RoutineFiring`: the registration key, the preset, the
|
|
729
|
+
* cadence and its option values, the mode, the turn / round / scene it
|
|
730
|
+
* fired on, and room for a note (ยง11-5).
|
|
731
|
+
* ยท `cause` โ `RoutineCause`: what the moment carries, whole.
|
|
732
|
+
* ยท `ruleset` โ the ruleset the session plays, `{ id, rigour, settings }`,
|
|
733
|
+
* as the user-message inlet carries it (2026-10-20, lane 3): where the
|
|
734
|
+
* session resides, not what the moment carried โ a reckoning branches on
|
|
735
|
+
* `rigour` (`scripts` routes the deltas to the ruleset handler).
|
|
736
|
+
* ยท `message` ยท `speaker` ยท `actor` ยท `castMember` ยท `subject` ยท `user` ยท
|
|
737
|
+
* `slot` ยท `clock` ยท `scene` โ the same moment's entities, one port each,
|
|
738
|
+
* filled when the moment carries them. Ports are flat (a reference cannot
|
|
739
|
+
* reach into `cause`), so these are what fit reads: a routine whose steps
|
|
740
|
+
* read `subject` takes only a cadence whose moment carries one (R12).
|
|
741
|
+
* @experimental
|
|
742
|
+
* @ruling R9, R12, ยง11-5
|
|
743
|
+
*/
|
|
744
|
+
export declare const routine: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
745
|
+
main: string;
|
|
746
|
+
session: string;
|
|
747
|
+
sessionScope: string;
|
|
748
|
+
sessionId: string;
|
|
749
|
+
routine: string;
|
|
750
|
+
cause: string;
|
|
751
|
+
ruleset: string;
|
|
752
|
+
message: string;
|
|
753
|
+
speaker: string;
|
|
754
|
+
actor: string;
|
|
755
|
+
castMember: string;
|
|
756
|
+
subject: string;
|
|
757
|
+
user: string;
|
|
758
|
+
slot: string;
|
|
759
|
+
clock: string;
|
|
760
|
+
scene: string;
|
|
761
|
+
}, import("@serene-pub/sdk").PortDecl, "core:inlet/routine@1"> & {
|
|
762
|
+
kind: 'inlet';
|
|
763
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
764
|
+
}>;
|
|
765
|
+
/**
|
|
766
|
+
* ๐ง Where the one generic **rules-action** pipeline enters
|
|
767
|
+
* (`core:spec/rules-action`): a person invoked one of the functions the
|
|
768
|
+
* session's ruleset uses โ an **invokable** function, which the host offers
|
|
769
|
+
* as an action registration of that pipeline, its label and form the
|
|
770
|
+
* function header's (`jsonSchemaOf(fn, { part: 'invokable' })`).
|
|
771
|
+
*
|
|
772
|
+
* ยท `function` โ the function's key in the ruleset (`rest`, `draw`), as
|
|
773
|
+
* its reference names it;
|
|
774
|
+
* ยท `answer` โ what its form collected (null when it asks nothing);
|
|
775
|
+
* ยท `actor` โ who invokes it; `aimedAt` โ at whom, when anyone;
|
|
776
|
+
* ยท `mode` โ the action registration's mode in force: `full` applies what
|
|
777
|
+
* the function changes, `review` holds each change for the session's
|
|
778
|
+
* owner (absent: `full`);
|
|
779
|
+
* ยท `session` / `sessionScope` / `sessionId` / `ruleset` โ the session, as
|
|
780
|
+
* the routine inlet carries it;
|
|
781
|
+
* ยท `main` โ the payload whole (`{ session, actor, function, answer,
|
|
782
|
+
* aimedAt }`): what `ruleset-resolve`'s `actions` port takes to run the
|
|
783
|
+
* function with its answer.
|
|
784
|
+
*
|
|
785
|
+
* No lock and no shape: every genre's session may play a ruleset with
|
|
786
|
+
* actions, and the pipeline is the same for all of them.
|
|
787
|
+
* @experimental
|
|
788
|
+
* @ruling PLAN-rulesets-functions D6
|
|
789
|
+
*/
|
|
790
|
+
export declare const rulesAction: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
791
|
+
main: string;
|
|
792
|
+
session: string;
|
|
793
|
+
sessionScope: string;
|
|
794
|
+
sessionId: string;
|
|
795
|
+
/** The ruleset the session plays, `{ id, rigour, settings }`. */
|
|
796
|
+
ruleset: string;
|
|
797
|
+
/** Who invokes the function. */
|
|
798
|
+
actor: string;
|
|
799
|
+
/** The function's key in the session's ruleset. */
|
|
800
|
+
function: string;
|
|
801
|
+
/** What the function's form collected; null when it asks nothing. */
|
|
802
|
+
answer: string;
|
|
803
|
+
/** Whom it is aimed at, when anyone. */
|
|
804
|
+
aimedAt: string;
|
|
805
|
+
/** The action registration's mode: `full` or `review`. */
|
|
806
|
+
mode: string;
|
|
807
|
+
}, import("@serene-pub/sdk").PortDecl, "core:inlet/rules-action@1"> & {
|
|
808
|
+
kind: 'inlet';
|
|
809
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
810
|
+
}>;
|
|
628
811
|
//# sourceMappingURL=inlets.d.ts.map
|
package/dist/inlets.js
CHANGED
|
@@ -25,9 +25,10 @@ export const userMessage = pin(describeInletDefinition({
|
|
|
25
25
|
// Display only, both keys: stripped from the content hash, refreshed on
|
|
26
26
|
// existing rows by the boot sync โ so copyediting this is never a bump.
|
|
27
27
|
i18n: {
|
|
28
|
-
|
|
28
|
+
// ๐ง Was "Chat" until 2026-10-19 โ the word is the assistant genre's now (R1).
|
|
29
|
+
name: { en: 'User message' },
|
|
29
30
|
description: {
|
|
30
|
-
en: '
|
|
31
|
+
en: "A person's message in a session: what they wrote, who answers it, and everything the turn reads about the session.",
|
|
31
32
|
},
|
|
32
33
|
},
|
|
33
34
|
/**
|
|
@@ -69,6 +70,20 @@ export const userMessage = pin(describeInletDefinition({
|
|
|
69
70
|
description: 'Scripts over the message that triggered this turn โ expand shorthand, resolve dice notation โ as retrieval and the prompt will see it. The stored message is not changed.',
|
|
70
71
|
},
|
|
71
72
|
},
|
|
73
|
+
/**
|
|
74
|
+
* ๐ง What each port stands for โ fit (PLAN-layering D3, R4). Only the
|
|
75
|
+
* ports whose reads need the entity: an optional port is left out.
|
|
76
|
+
*/
|
|
77
|
+
entities: {
|
|
78
|
+
sessionScope: 'session',
|
|
79
|
+
sessionId: 'session',
|
|
80
|
+
session: 'session',
|
|
81
|
+
fields: 'session',
|
|
82
|
+
speaker: 'speaker',
|
|
83
|
+
characterId: 'speaker',
|
|
84
|
+
presser: 'actor',
|
|
85
|
+
recipients: 'cast-member',
|
|
86
|
+
},
|
|
72
87
|
ports: {
|
|
73
88
|
out: {
|
|
74
89
|
main: S.json,
|
|
@@ -206,6 +221,19 @@ export const userMessage = pin(describeInletDefinition({
|
|
|
206
221
|
* change is about a message, never a value (one word, one meaning).
|
|
207
222
|
*/
|
|
208
223
|
sessionChanges: S.json,
|
|
224
|
+
/**
|
|
225
|
+
* ๐ง The **ruleset the session plays** (2026-10-17, PLAN-sheet
|
|
226
|
+
* ยง15 C): `{ id, rigour, settings }` โ the ruleset's id
|
|
227
|
+
* (`core:ruleset/freeform@1`), the rigour in force (`prose`,
|
|
228
|
+
* `mechanics`, `scripts`) and ๐ง (2026-10-18) its `settings`,
|
|
229
|
+
* every setting at the session's value or its default (Vis
|
|
230
|
+
* Itineris's `casting: 'points'`). Always supplied, for the reason
|
|
231
|
+
* `channel` is: a junction compares against it. A genre that
|
|
232
|
+
* recommends a ruleset branches here instead of assuming it โ
|
|
233
|
+
* the Dungeon Crawler's interview writes a kit as plain pieces
|
|
234
|
+
* under Freeform and as the library's rows under Vis Itineris.
|
|
235
|
+
*/
|
|
236
|
+
ruleset: S.json,
|
|
209
237
|
/**
|
|
210
238
|
* What an action's fire sent along
|
|
211
239
|
* (2026-09-17): a form's answer โ `{ choice }` for a choices
|
|
@@ -289,6 +317,15 @@ export const userMessage = pin(describeInletDefinition({
|
|
|
289
317
|
*/
|
|
290
318
|
export const builtInRequest = pin(describeInletDefinition({
|
|
291
319
|
id: 'core:inlet/built-in-request@1',
|
|
320
|
+
/**
|
|
321
|
+
* ๐ง What each port stands for โ fit (PLAN-layering D3, R4). Only the
|
|
322
|
+
* ports whose reads need the entity: an optional port is left out.
|
|
323
|
+
*/
|
|
324
|
+
entities: {
|
|
325
|
+
sessionScope: 'session',
|
|
326
|
+
sessionId: 'session',
|
|
327
|
+
session: 'session',
|
|
328
|
+
},
|
|
292
329
|
ports: {
|
|
293
330
|
out: {
|
|
294
331
|
main: S.json,
|
|
@@ -353,6 +390,16 @@ export const sessionCreated = pin(describeInletDefinition({
|
|
|
353
390
|
en: 'Fires once, when a session of this genre is created โ the pipeline that answers it seeds greetings, channels and initial state.',
|
|
354
391
|
},
|
|
355
392
|
},
|
|
393
|
+
/**
|
|
394
|
+
* ๐ง What each port stands for โ fit (PLAN-layering D3, R4). Only the
|
|
395
|
+
* ports whose reads need the entity: an optional port is left out.
|
|
396
|
+
*/
|
|
397
|
+
entities: {
|
|
398
|
+
sessionScope: 'session',
|
|
399
|
+
sessionId: 'session',
|
|
400
|
+
session: 'session',
|
|
401
|
+
fields: 'session',
|
|
402
|
+
},
|
|
356
403
|
ports: {
|
|
357
404
|
out: {
|
|
358
405
|
main: S.json,
|
|
@@ -415,6 +462,16 @@ export const sessionEvent = pin(describeInletDefinition({
|
|
|
415
462
|
* payload is the envelope's `payload`.
|
|
416
463
|
*/
|
|
417
464
|
payloads: [S.sessionChange, S.castChange, S.annexChange, S.recordedEvent],
|
|
465
|
+
/**
|
|
466
|
+
* ๐ง What each port stands for โ fit (PLAN-layering D3, R4). Only the
|
|
467
|
+
* ports whose reads need the entity: an optional port is left out.
|
|
468
|
+
*/
|
|
469
|
+
entities: {
|
|
470
|
+
sessionId: 'session',
|
|
471
|
+
sessionScope: 'session',
|
|
472
|
+
session: 'session',
|
|
473
|
+
cast: 'session',
|
|
474
|
+
},
|
|
418
475
|
ports: {
|
|
419
476
|
out: {
|
|
420
477
|
/** The event id that fired โ `core:event/message-completed@1`. */
|
|
@@ -513,6 +570,18 @@ export const sideCharacterTurn = pin(describeInletDefinition({
|
|
|
513
570
|
description: 'Scripts over the instructions this turn was triggered with, as retrieval and the prompt will see them. The speaker rides along read-only โ including whether the lorebook already knows them, so a script can offer to add somebody new.',
|
|
514
571
|
},
|
|
515
572
|
},
|
|
573
|
+
/**
|
|
574
|
+
* ๐ง What each port stands for โ fit (PLAN-layering D3, R4). Only the
|
|
575
|
+
* ports whose reads need the entity: an optional port is left out.
|
|
576
|
+
*/
|
|
577
|
+
entities: {
|
|
578
|
+
sessionScope: 'session',
|
|
579
|
+
sessionId: 'session',
|
|
580
|
+
session: 'session',
|
|
581
|
+
fields: 'session',
|
|
582
|
+
speaker: 'speaker',
|
|
583
|
+
characterId: 'speaker',
|
|
584
|
+
},
|
|
516
585
|
ports: {
|
|
517
586
|
out: {
|
|
518
587
|
main: S.json,
|
|
@@ -616,6 +685,22 @@ export const formAddressed = pin(describeInletDefinition({
|
|
|
616
685
|
en: 'A question or form in a message was put to a participant the AI portrays this turn โ the pipeline that answers it reads the addressee\'s card and the conversation, and answers against the form\'s schema.',
|
|
617
686
|
},
|
|
618
687
|
},
|
|
688
|
+
/**
|
|
689
|
+
* ๐ง What each port stands for โ fit (PLAN-layering D3, R4). Only the
|
|
690
|
+
* ports whose reads need the entity: an optional port is left out.
|
|
691
|
+
*/
|
|
692
|
+
entities: {
|
|
693
|
+
sessionScope: 'session',
|
|
694
|
+
sessionId: 'session',
|
|
695
|
+
session: 'session',
|
|
696
|
+
fields: 'session',
|
|
697
|
+
messageId: 'message',
|
|
698
|
+
blockId: 'form',
|
|
699
|
+
form: 'form',
|
|
700
|
+
action: 'form',
|
|
701
|
+
addressee: 'cast-member',
|
|
702
|
+
characterId: 'cast-member',
|
|
703
|
+
},
|
|
619
704
|
ports: {
|
|
620
705
|
out: {
|
|
621
706
|
main: S.formAddressed,
|
|
@@ -650,6 +735,121 @@ export const formAddressed = pin(describeInletDefinition({
|
|
|
650
735
|
},
|
|
651
736
|
},
|
|
652
737
|
}));
|
|
738
|
+
// โโ A person's message (owner ruling 2026-10-15) โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
739
|
+
/**
|
|
740
|
+
* ๐ง A person sent a message: the save pipeline's trigger. **A person's
|
|
741
|
+
* message is always saved through the pipeline** โ the host checks the door
|
|
742
|
+
* (access, the genre, the persona, the length, the channel) and dispatches
|
|
743
|
+
* `core:event/message-offered@1`; the bound spec writes the row. Core's
|
|
744
|
+
* default, `core:spec/save-message`, is this inlet and one
|
|
745
|
+
* `create-message@1` with `role: 'user'`.
|
|
746
|
+
*
|
|
747
|
+
* The payload is `core:shape/message-offered@1`; the ports below are it
|
|
748
|
+
* taken apart. No shape and no lock here: core's default serves every genre,
|
|
749
|
+
* and a genre's own save declares its own `(genre, event)`.
|
|
750
|
+
* @experimental
|
|
751
|
+
*/
|
|
752
|
+
export const messageOffered = pin(describeInletDefinition({
|
|
753
|
+
id: 'core:inlet/message-offered@1',
|
|
754
|
+
i18n: {
|
|
755
|
+
name: { en: 'Message sent' },
|
|
756
|
+
description: {
|
|
757
|
+
en: 'A person sent a message. The pipeline that answers it saves the message โ or refuses it with a sentence, and the person keeps their text.',
|
|
758
|
+
},
|
|
759
|
+
},
|
|
760
|
+
/**
|
|
761
|
+
* ๐ง What each port stands for โ fit (PLAN-layering D3, R4). Only the
|
|
762
|
+
* ports whose reads need the entity: an optional port is left out.
|
|
763
|
+
*/
|
|
764
|
+
entities: {
|
|
765
|
+
sessionScope: 'session',
|
|
766
|
+
sessionId: 'session',
|
|
767
|
+
session: 'session',
|
|
768
|
+
person: 'actor',
|
|
769
|
+
speaker: 'speaker',
|
|
770
|
+
},
|
|
771
|
+
ports: {
|
|
772
|
+
out: {
|
|
773
|
+
main: S.messageOffered,
|
|
774
|
+
sessionScope: S.sessionScope,
|
|
775
|
+
sessionId: S.rowIds,
|
|
776
|
+
/** The session's **settings document**, as on every session inlet. */
|
|
777
|
+
session: S.sessionSettings,
|
|
778
|
+
/** The message as written. */
|
|
779
|
+
text: S.text,
|
|
780
|
+
/** The person sending โ `user:<id>`, the run's owner. */
|
|
781
|
+
person: S.participantRef,
|
|
782
|
+
/**
|
|
783
|
+
* Who the message speaks as: `character:<id>` (the person's
|
|
784
|
+
* persona), `player-seat:<id>` (their card-less seat), or null โ
|
|
785
|
+
* the person as themselves. Wired to `create-message@1`'s
|
|
786
|
+
* `speaker`.
|
|
787
|
+
*/
|
|
788
|
+
speaker: S.participantRef,
|
|
789
|
+
/** The channel it was written on, canonical. */
|
|
790
|
+
channel: S.text,
|
|
791
|
+
/** The person's ready tray items, sent as its attachments โ `create-message@1`'s `trayItems`. */
|
|
792
|
+
trayItemIds: S.json,
|
|
793
|
+
/** The message it answers, when the composer named one; null otherwise. */
|
|
794
|
+
replyTo: S.rowIds,
|
|
795
|
+
/** Why it fired (`EventCause`) โ a person's send, `{ kind: 'user', userId }`. */
|
|
796
|
+
cause: S.json,
|
|
797
|
+
},
|
|
798
|
+
},
|
|
799
|
+
}));
|
|
800
|
+
// โโ A deletion asked (owner ruling 2026-10-23) โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
801
|
+
/**
|
|
802
|
+
* ๐ง A person asked for a message to be deleted: a **deletion pipeline**'s
|
|
803
|
+
* trigger (RF fix 5). Deletion requires a pipeline, so the genre manages it:
|
|
804
|
+
* the host checks the door (the message is the session's, the person may act
|
|
805
|
+
* on it) and dispatches `core:event/message-deletion-asked@1`; the pipeline
|
|
806
|
+
* registered there ends in `core:outlet/delete-message@1`, handed the
|
|
807
|
+
* deletion whole on its `asked` port
|
|
808
|
+
* (`C.deleteMessage.v1({ asked: $.input.main })`): it deletes THE message
|
|
809
|
+
* the event carried and takes back everything it changed โ and the pipeline
|
|
810
|
+
* may put steps of its own around it. Core ships no such pipeline: with none
|
|
811
|
+
* registered, no message offers Delete.
|
|
812
|
+
*
|
|
813
|
+
* The payload is `core:shape/deletion-asked@1`, published whole on `main`
|
|
814
|
+
* (the delete's `asked`); the ports beside it are it taken apart, for the
|
|
815
|
+
* steps around the delete. No lock: registrations mount a pipeline on its
|
|
816
|
+
* event.
|
|
817
|
+
* @experimental
|
|
818
|
+
*/
|
|
819
|
+
export const messageDeletionAsked = pin(describeInletDefinition({
|
|
820
|
+
id: 'core:inlet/message-deletion-asked@1',
|
|
821
|
+
i18n: {
|
|
822
|
+
name: { en: 'Deletion asked' },
|
|
823
|
+
description: {
|
|
824
|
+
en: 'A person asked for a message to be deleted. The pipeline that answers it deletes the message, and what it changed goes with it.',
|
|
825
|
+
},
|
|
826
|
+
},
|
|
827
|
+
/** ๐ง What each port stands for โ fit (PLAN-layering D3, R4). */
|
|
828
|
+
entities: {
|
|
829
|
+
sessionScope: 'session',
|
|
830
|
+
sessionId: 'session',
|
|
831
|
+
session: 'session',
|
|
832
|
+
messageId: 'message',
|
|
833
|
+
person: 'actor',
|
|
834
|
+
},
|
|
835
|
+
ports: {
|
|
836
|
+
out: {
|
|
837
|
+
main: S.deletionAsked,
|
|
838
|
+
sessionScope: S.sessionScope,
|
|
839
|
+
sessionId: S.rowIds,
|
|
840
|
+
/** The session's **settings document**, as on every session inlet. */
|
|
841
|
+
session: S.sessionSettings,
|
|
842
|
+
/** The message the person asked to delete (the delete itself reads it off `main`). */
|
|
843
|
+
messageId: S.rowIds,
|
|
844
|
+
/** Its channel, canonical. */
|
|
845
|
+
channel: S.text,
|
|
846
|
+
/** Who asked โ `user:<id>`, the run's owner. */
|
|
847
|
+
person: S.participantRef,
|
|
848
|
+
/** Why it fired (`EventCause`) โ a person's press, `{ kind: 'user', userId }`. */
|
|
849
|
+
cause: S.json,
|
|
850
|
+
},
|
|
851
|
+
},
|
|
852
|
+
}));
|
|
653
853
|
// โโ Summarization โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
654
854
|
//
|
|
655
855
|
// Two phases, and the split is the whole design (see `utils/summarizer`):
|
|
@@ -667,6 +867,14 @@ export const formAddressed = pin(describeInletDefinition({
|
|
|
667
867
|
/** @internal */
|
|
668
868
|
export const summarizeRequest = pin(describeInletDefinition({
|
|
669
869
|
id: 'core:inlet/summarize-request@1',
|
|
870
|
+
/**
|
|
871
|
+
* ๐ง What each port stands for โ fit (PLAN-layering D3, R4). Only the
|
|
872
|
+
* ports whose reads need the entity: an optional port is left out.
|
|
873
|
+
*/
|
|
874
|
+
entities: {
|
|
875
|
+
scope: 'session',
|
|
876
|
+
session: 'session',
|
|
877
|
+
},
|
|
670
878
|
ports: {
|
|
671
879
|
out: {
|
|
672
880
|
main: S.summarizeRequest,
|
|
@@ -715,6 +923,13 @@ export const summarizeRequest = pin(describeInletDefinition({
|
|
|
715
923
|
*/
|
|
716
924
|
export const cardAction = pin(describeInletDefinition({
|
|
717
925
|
id: 'core:inlet/card-action@1',
|
|
926
|
+
/**
|
|
927
|
+
* ๐ง What each port stands for โ fit (PLAN-layering D3, R4). Only the
|
|
928
|
+
* ports whose reads need the entity: an optional port is left out.
|
|
929
|
+
*/
|
|
930
|
+
entities: {
|
|
931
|
+
characterId: 'subject',
|
|
932
|
+
},
|
|
718
933
|
ports: {
|
|
719
934
|
out: {
|
|
720
935
|
main: S.json,
|
|
@@ -741,4 +956,137 @@ export const cardAction = pin(describeInletDefinition({
|
|
|
741
956
|
},
|
|
742
957
|
},
|
|
743
958
|
}));
|
|
959
|
+
// โโ ๐ง Routines (PLAN-layering D2, R9; 2026-10-20) โโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
960
|
+
/**
|
|
961
|
+
* ๐ง Where a **routine** enters โ a pipeline registered on a cadence
|
|
962
|
+
* (`register(everyNTurns({ n: 5 }), storySweep)`), run when the cadence says
|
|
963
|
+
* so. Nothing opinionated (R9): a routine's pipeline gets the session, the
|
|
964
|
+
* metadata of where the routine resides, and the parameters of the moment
|
|
965
|
+
* its cadence listened to โ and queries everything else through the SDK.
|
|
966
|
+
*
|
|
967
|
+
* ยท `session` / `sessionScope` / `sessionId` โ the session, always: routines
|
|
968
|
+
* live in sessions (R9).
|
|
969
|
+
* ยท `routine` โ `RoutineFiring`: the registration key, the preset, the
|
|
970
|
+
* cadence and its option values, the mode, the turn / round / scene it
|
|
971
|
+
* fired on, and room for a note (ยง11-5).
|
|
972
|
+
* ยท `cause` โ `RoutineCause`: what the moment carries, whole.
|
|
973
|
+
* ยท `ruleset` โ the ruleset the session plays, `{ id, rigour, settings }`,
|
|
974
|
+
* as the user-message inlet carries it (2026-10-20, lane 3): where the
|
|
975
|
+
* session resides, not what the moment carried โ a reckoning branches on
|
|
976
|
+
* `rigour` (`scripts` routes the deltas to the ruleset handler).
|
|
977
|
+
* ยท `message` ยท `speaker` ยท `actor` ยท `castMember` ยท `subject` ยท `user` ยท
|
|
978
|
+
* `slot` ยท `clock` ยท `scene` โ the same moment's entities, one port each,
|
|
979
|
+
* filled when the moment carries them. Ports are flat (a reference cannot
|
|
980
|
+
* reach into `cause`), so these are what fit reads: a routine whose steps
|
|
981
|
+
* read `subject` takes only a cadence whose moment carries one (R12).
|
|
982
|
+
* @experimental
|
|
983
|
+
* @ruling R9, R12, ยง11-5
|
|
984
|
+
*/
|
|
985
|
+
export const routine = pin(describeInletDefinition({
|
|
986
|
+
id: 'core:inlet/routine@1',
|
|
987
|
+
i18n: {
|
|
988
|
+
name: { en: 'Routine' },
|
|
989
|
+
description: {
|
|
990
|
+
en: 'A routine came due โ every few turns, after a scene, on a schedule. The pipeline that runs reads the session and what the moment carried, and queries the rest.',
|
|
991
|
+
},
|
|
992
|
+
},
|
|
993
|
+
entities: {
|
|
994
|
+
session: 'session',
|
|
995
|
+
sessionScope: 'session',
|
|
996
|
+
sessionId: 'session',
|
|
997
|
+
ruleset: 'session',
|
|
998
|
+
message: 'message',
|
|
999
|
+
speaker: 'speaker',
|
|
1000
|
+
actor: 'actor',
|
|
1001
|
+
castMember: 'cast-member',
|
|
1002
|
+
subject: 'subject',
|
|
1003
|
+
user: 'user',
|
|
1004
|
+
slot: 'slot',
|
|
1005
|
+
clock: 'clock',
|
|
1006
|
+
scene: 'scene',
|
|
1007
|
+
},
|
|
1008
|
+
ports: {
|
|
1009
|
+
out: {
|
|
1010
|
+
main: S.json,
|
|
1011
|
+
session: S.sessionSettings,
|
|
1012
|
+
sessionScope: S.sessionScope,
|
|
1013
|
+
sessionId: S.rowIds,
|
|
1014
|
+
routine: S.json,
|
|
1015
|
+
cause: S.json,
|
|
1016
|
+
ruleset: S.json,
|
|
1017
|
+
message: S.rowIds,
|
|
1018
|
+
speaker: S.participantRef,
|
|
1019
|
+
actor: S.participantRef,
|
|
1020
|
+
castMember: S.participantRef,
|
|
1021
|
+
subject: S.participantRef,
|
|
1022
|
+
user: S.participantRef,
|
|
1023
|
+
slot: S.text,
|
|
1024
|
+
clock: S.json,
|
|
1025
|
+
scene: S.rowIds,
|
|
1026
|
+
},
|
|
1027
|
+
},
|
|
1028
|
+
}));
|
|
1029
|
+
// โโ ๐ง A ruleset's action (PLAN-rulesets-functions D6; 2026-10-23) โโโโโโโโโโ
|
|
1030
|
+
/**
|
|
1031
|
+
* ๐ง Where the one generic **rules-action** pipeline enters
|
|
1032
|
+
* (`core:spec/rules-action`): a person invoked one of the functions the
|
|
1033
|
+
* session's ruleset uses โ an **invokable** function, which the host offers
|
|
1034
|
+
* as an action registration of that pipeline, its label and form the
|
|
1035
|
+
* function header's (`jsonSchemaOf(fn, { part: 'invokable' })`).
|
|
1036
|
+
*
|
|
1037
|
+
* ยท `function` โ the function's key in the ruleset (`rest`, `draw`), as
|
|
1038
|
+
* its reference names it;
|
|
1039
|
+
* ยท `answer` โ what its form collected (null when it asks nothing);
|
|
1040
|
+
* ยท `actor` โ who invokes it; `aimedAt` โ at whom, when anyone;
|
|
1041
|
+
* ยท `mode` โ the action registration's mode in force: `full` applies what
|
|
1042
|
+
* the function changes, `review` holds each change for the session's
|
|
1043
|
+
* owner (absent: `full`);
|
|
1044
|
+
* ยท `session` / `sessionScope` / `sessionId` / `ruleset` โ the session, as
|
|
1045
|
+
* the routine inlet carries it;
|
|
1046
|
+
* ยท `main` โ the payload whole (`{ session, actor, function, answer,
|
|
1047
|
+
* aimedAt }`): what `ruleset-resolve`'s `actions` port takes to run the
|
|
1048
|
+
* function with its answer.
|
|
1049
|
+
*
|
|
1050
|
+
* No lock and no shape: every genre's session may play a ruleset with
|
|
1051
|
+
* actions, and the pipeline is the same for all of them.
|
|
1052
|
+
* @experimental
|
|
1053
|
+
* @ruling PLAN-rulesets-functions D6
|
|
1054
|
+
*/
|
|
1055
|
+
export const rulesAction = pin(describeInletDefinition({
|
|
1056
|
+
id: 'core:inlet/rules-action@1',
|
|
1057
|
+
i18n: {
|
|
1058
|
+
name: { en: 'A ruleset action' },
|
|
1059
|
+
description: {
|
|
1060
|
+
en: "Someone used one of the rules' actions โ rested, drew a card, gave a gift. The pipeline runs the rule with what they chose, then applies or proposes what it changed.",
|
|
1061
|
+
},
|
|
1062
|
+
},
|
|
1063
|
+
/** ๐ง What each port stands for โ fit (PLAN-layering D3, R4). Only the ports whose reads need the entity. */
|
|
1064
|
+
entities: {
|
|
1065
|
+
session: 'session',
|
|
1066
|
+
sessionScope: 'session',
|
|
1067
|
+
sessionId: 'session',
|
|
1068
|
+
ruleset: 'session',
|
|
1069
|
+
actor: 'actor',
|
|
1070
|
+
},
|
|
1071
|
+
ports: {
|
|
1072
|
+
out: {
|
|
1073
|
+
main: S.json,
|
|
1074
|
+
session: S.sessionSettings,
|
|
1075
|
+
sessionScope: S.sessionScope,
|
|
1076
|
+
sessionId: S.rowIds,
|
|
1077
|
+
/** The ruleset the session plays, `{ id, rigour, settings }`. */
|
|
1078
|
+
ruleset: S.json,
|
|
1079
|
+
/** Who invokes the function. */
|
|
1080
|
+
actor: S.participantRef,
|
|
1081
|
+
/** The function's key in the session's ruleset. */
|
|
1082
|
+
function: S.text,
|
|
1083
|
+
/** What the function's form collected; null when it asks nothing. */
|
|
1084
|
+
answer: S.json,
|
|
1085
|
+
/** Whom it is aimed at, when anyone. */
|
|
1086
|
+
aimedAt: S.participantRef,
|
|
1087
|
+
/** The action registration's mode: `full` or `review`. */
|
|
1088
|
+
mode: S.text,
|
|
1089
|
+
},
|
|
1090
|
+
},
|
|
1091
|
+
}));
|
|
744
1092
|
//# sourceMappingURL=inlets.js.map
|