@serene-pub/contracts 0.6.0-pr-5 → 0.6.0-pr-7
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 +317 -4
- package/dist/oracles.js +235 -10
- package/dist/outlets.d.ts +618 -2
- package/dist/outlets.js +667 -11
- package/dist/queries.d.ts +278 -1
- package/dist/queries.js +301 -4
- package/dist/tasks.d.ts +736 -7
- package/dist/tasks.js +527 -7
- package/package.json +3 -3
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
|
|
@@ -1321,8 +1352,18 @@ export declare const castPresences: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
1321
1352
|
main: string;
|
|
1322
1353
|
/** The story date the session reads at, or null for the head. */
|
|
1323
1354
|
at: string;
|
|
1355
|
+
/**
|
|
1356
|
+
* 🚧 `{ bindingId: number; where: string }[]` — where each cast member is at `atHour`, read
|
|
1357
|
+
* from the first `schedule` field on an entry they hold; a member with none is left out.
|
|
1358
|
+
*/
|
|
1359
|
+
placements: string;
|
|
1324
1360
|
}, {
|
|
1325
1361
|
scope: string;
|
|
1362
|
+
/**
|
|
1363
|
+
* 🚧 The hour to place the cast at (M0, SHAPES L3): a clock target. Unwired,
|
|
1364
|
+
* the clock's present hour, today.
|
|
1365
|
+
*/
|
|
1366
|
+
atHour: string;
|
|
1326
1367
|
}, "core:query/cast-presences@1"> & {
|
|
1327
1368
|
kind: 'query';
|
|
1328
1369
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
@@ -2335,6 +2376,15 @@ export declare const availableTools: import("@serene-pub/sdk").Pinned<import("@s
|
|
|
2335
2376
|
tools: string;
|
|
2336
2377
|
}, {
|
|
2337
2378
|
scope: string;
|
|
2379
|
+
/**
|
|
2380
|
+
* 🚧 Which **kinds** of tool to offer (2026-10-19, the Chat
|
|
2381
|
+
* genre's `tools` field): `web`, `lore`, `lorebook-write`,
|
|
2382
|
+
* `image`, `clock`, `calculator`, `history` — the host maps
|
|
2383
|
+
* each kind onto the tools that serve it. Unwired, every tool
|
|
2384
|
+
* the session has (as before); an empty list, none. Added in
|
|
2385
|
+
* place (`@1` evolves until 0.7).
|
|
2386
|
+
*/
|
|
2387
|
+
kinds: string;
|
|
2338
2388
|
}, "core:query/available-tools@1"> & {
|
|
2339
2389
|
kind: 'query';
|
|
2340
2390
|
slots?: {
|
|
@@ -2476,6 +2526,14 @@ export declare const turnPlan: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
2476
2526
|
*/
|
|
2477
2527
|
export declare const sessionAnnex: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
2478
2528
|
main: string;
|
|
2529
|
+
/**
|
|
2530
|
+
* 🚧 The owner's **annex document version** (M2a a8): a count the
|
|
2531
|
+
* host moves with every write of that document, 0 before the
|
|
2532
|
+
* first. Wire it into `set-session-annex`'s `base` to make the
|
|
2533
|
+
* write a compare-and-set. Absent for `view: 'template'` (many
|
|
2534
|
+
* owners, no one version).
|
|
2535
|
+
*/
|
|
2536
|
+
version: string;
|
|
2479
2537
|
}, {
|
|
2480
2538
|
scope: string;
|
|
2481
2539
|
/**
|
|
@@ -2525,6 +2583,59 @@ export declare const sessionAnnex: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
2525
2583
|
};
|
|
2526
2584
|
} | undefined;
|
|
2527
2585
|
}>;
|
|
2586
|
+
/**
|
|
2587
|
+
* 🚧 The **lorebook annex** (M0, SHAPES L9): read one owner's document
|
|
2588
|
+
* out of the annex of the book the session reads — the session annex's model
|
|
2589
|
+
* at book scope, for world-level engine state that is neither an attribute nor
|
|
2590
|
+
* prose. Like `session-annex@1`, the owner defaults to the running spec's own
|
|
2591
|
+
* namespace, and reading another's takes `sharedAnnex`.
|
|
2592
|
+
*
|
|
2593
|
+
* âš Not an entry, and not a save: typed world facts stay attributes, and a
|
|
2594
|
+
* session is the save.
|
|
2595
|
+
* @experimental
|
|
2596
|
+
*/
|
|
2597
|
+
export declare const lorebookAnnex: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
2598
|
+
main: string;
|
|
2599
|
+
/**
|
|
2600
|
+
* 🚧 (M2b) The owner's annex document version on the book a
|
|
2601
|
+
* `set-lorebook-annex` from this run would write (0 before the first
|
|
2602
|
+
* write) — wire it into that step's `base` for a compare-and-set.
|
|
2603
|
+
* Absent when the run has no book to write.
|
|
2604
|
+
*/
|
|
2605
|
+
version: string;
|
|
2606
|
+
}, {
|
|
2607
|
+
scope: string;
|
|
2608
|
+
}, "core:query/lorebook-annex@1"> & {
|
|
2609
|
+
kind: 'query';
|
|
2610
|
+
slots?: {
|
|
2611
|
+
readonly params: {
|
|
2612
|
+
readonly kind: "parameters";
|
|
2613
|
+
readonly facet: "behavior";
|
|
2614
|
+
readonly schema: {
|
|
2615
|
+
readonly owner: {
|
|
2616
|
+
readonly type: "string";
|
|
2617
|
+
readonly default: "";
|
|
2618
|
+
readonly label: {
|
|
2619
|
+
readonly en: "Owner";
|
|
2620
|
+
};
|
|
2621
|
+
readonly description: {
|
|
2622
|
+
readonly en: "Whose document to read. Blank means this pipeline's own.";
|
|
2623
|
+
};
|
|
2624
|
+
};
|
|
2625
|
+
readonly sharedAnnex: {
|
|
2626
|
+
readonly type: "boolean";
|
|
2627
|
+
readonly default: false;
|
|
2628
|
+
readonly label: {
|
|
2629
|
+
readonly en: "Read another owner";
|
|
2630
|
+
};
|
|
2631
|
+
readonly description: {
|
|
2632
|
+
readonly en: "Allow reading a document this pipeline does not own. Off refuses, with a note on the receipt.";
|
|
2633
|
+
};
|
|
2634
|
+
};
|
|
2635
|
+
};
|
|
2636
|
+
};
|
|
2637
|
+
} | undefined;
|
|
2638
|
+
}>;
|
|
2528
2639
|
/**
|
|
2529
2640
|
* The messages a summary is drawn from — both pins on one export, the way a
|
|
2530
2641
|
* pinned constructor carries its version at the call site (04 §4b):
|
|
@@ -2805,8 +2916,12 @@ export declare const graphScenes: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
2805
2916
|
* The session's stats and states, resolved — an inventory is one, the
|
|
2806
2917
|
* `inventory` list stat (phase 3b retired possessions as edges).
|
|
2807
2918
|
*
|
|
2808
|
-
* `{ world, cast, slots, who, version }` — the same object `stateFor(sessionId)`
|
|
2919
|
+
* `{ world, cast, slots, configs, who, version }` — the same object `stateFor(sessionId)`
|
|
2809
2920
|
* returns and the shape `state` on `core:task/build-template-context@1` takes.
|
|
2921
|
+
* 🚧 `configs` is each owner's **stat configuration** in force — `world`
|
|
2922
|
+
* and every `cast.byId` key, then the slot id: `configs['player_seat:4']
|
|
2923
|
+
* ['core:slot/hp@1'].max` is that seat's full health, the bar's own number
|
|
2924
|
+
* (`core:outlet/set-stat-config@1` writes it).
|
|
2810
2925
|
* Every value is already resolved down session → lorebook → card →
|
|
2811
2926
|
* declaration default, with absence meaning **inherit** rather than zero, and
|
|
2812
2927
|
* derived slots computed rather than read.
|
|
@@ -2964,6 +3079,31 @@ export declare const lorebookState: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
2964
3079
|
};
|
|
2965
3080
|
} | undefined;
|
|
2966
3081
|
}>;
|
|
3082
|
+
/**
|
|
3083
|
+
* 🚧 **A person's channel lane** (owner ruling 2026-10-17): on a channel the
|
|
3084
|
+
* genre declares `lanes: 'personal'`, the lane that is this person's —
|
|
3085
|
+
* allocated by core on first ask, filed in the session's lane register,
|
|
3086
|
+
* and sent by the host to that person and the session's owner alone. The
|
|
3087
|
+
* same ask twice is the same lane; a shared channel is refused (its lanes
|
|
3088
|
+
* are the genre's to allocate). Replaces a genre's own user→lane map and
|
|
3089
|
+
* client-side hiding.
|
|
3090
|
+
* @experimental
|
|
3091
|
+
*/
|
|
3092
|
+
export declare const channelLane: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
3093
|
+
/** The canonical channel string of the lane: `parley` for lane 1, `parley:2` after. */
|
|
3094
|
+
lane: string;
|
|
3095
|
+
/** Whether this ask opened the lane. */
|
|
3096
|
+
opened: string;
|
|
3097
|
+
}, {
|
|
3098
|
+
scope: string;
|
|
3099
|
+
/** The channel's slug, declared with personal lanes. */
|
|
3100
|
+
channel: string;
|
|
3101
|
+
/** Whose lane: `user:<id>` — a participant reference as text (wired from a script's words; the host parses it). */
|
|
3102
|
+
person: string;
|
|
3103
|
+
}, "core:query/channel-lane@1"> & {
|
|
3104
|
+
kind: 'query';
|
|
3105
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
3106
|
+
}>;
|
|
2967
3107
|
/**
|
|
2968
3108
|
* 🚧 The **stat trail**: one stat's values over time, for one owner — the
|
|
2969
3109
|
* world, a cast member or a place (owner-confirmed 2026-09-27: "stats over
|
|
@@ -3489,4 +3629,141 @@ export declare const likenessImages: import("@serene-pub/sdk").Pinned<import("@s
|
|
|
3489
3629
|
kind: 'query';
|
|
3490
3630
|
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
3491
3631
|
}>;
|
|
3632
|
+
/**
|
|
3633
|
+
* 🚧 **One message as a line to speak**: its words, whose line it is and the
|
|
3634
|
+
* inflection it was recorded with — what `core:task/cue-lines@1` takes, read
|
|
3635
|
+
* off ONE stored row by id. The manual *Read aloud* / *Say it as…* verbs'
|
|
3636
|
+
* read (`core:spec/speak-message`): the history read's rows are opaque
|
|
3637
|
+
* (`messages@1`), so nothing else can hand cue-lines a stored line's speaker
|
|
3638
|
+
* or inflection.
|
|
3639
|
+
*
|
|
3640
|
+
* - `text` — the row's words; **empty** when the row is not this session's,
|
|
3641
|
+
* is hidden, or is still being written (the history read's rule), so a
|
|
3642
|
+
* spec junctions on it and nothing is spoken.
|
|
3643
|
+
* - `speaker` — the participant reference the row was voiced by: an envoy's
|
|
3644
|
+
* `envoy:<slug>`, a persona's or character's `character:<id>`; absent for
|
|
3645
|
+
* narration and for a person's own line with no persona.
|
|
3646
|
+
* - `inflection` — the line's recorded inflection: the label of the sprite
|
|
3647
|
+
* shown on its active swipe (a sprite pick is an inflection). Absent when
|
|
3648
|
+
* no sprite was shown.
|
|
3649
|
+
*
|
|
3650
|
+
* `say` overrides the recorded inflection with what a person asked for (the
|
|
3651
|
+
* *Say it as…* press's collected text): a word the host's marker table knows
|
|
3652
|
+
* (`sighs`, `angrily`, `joy`) becomes that label; any other words are kept as
|
|
3653
|
+
* the label as written, which a prose-taking model reads as direction and a
|
|
3654
|
+
* tag-taking model drops. Blank `say` keeps the recorded one.
|
|
3655
|
+
*
|
|
3656
|
+
* No writes, no model: a read.
|
|
3657
|
+
* @experimental
|
|
3658
|
+
*/
|
|
3659
|
+
export declare const messageLine: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
3660
|
+
main: string;
|
|
3661
|
+
/** The row's words; empty when the row is hidden, still written, or not this session's. */
|
|
3662
|
+
text: string;
|
|
3663
|
+
/** Whose line it is; absent for narration. */
|
|
3664
|
+
speaker: string;
|
|
3665
|
+
/** How it is spoken: `say` when given, else the recorded sprite label; absent when neither. */
|
|
3666
|
+
inflection: string;
|
|
3667
|
+
}, {
|
|
3668
|
+
scope: string;
|
|
3669
|
+
/** The row — the inlet's `messageId`, the message a press on a message's ⋮ was made on. */
|
|
3670
|
+
messageId: string;
|
|
3671
|
+
/** How it should sound, in a person's words; blank keeps the recorded inflection. */
|
|
3672
|
+
say: string;
|
|
3673
|
+
}, "core:query/message-line@1"> & {
|
|
3674
|
+
kind: 'query';
|
|
3675
|
+
slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
|
|
3676
|
+
}>;
|
|
3677
|
+
/**
|
|
3678
|
+
* The largest file `core:query/plugin-storage@1` will read: 4 MiB. A bigger
|
|
3679
|
+
* file is refused with a sentence naming both sizes. (M2a)
|
|
3680
|
+
* @experimental
|
|
3681
|
+
*/
|
|
3682
|
+
export declare const PLUGIN_STORAGE_QUERY_MAX_BYTES: number;
|
|
3683
|
+
/**
|
|
3684
|
+
* 🚧 (M2a) **A file from the running plugin's own storage** — read-only, size
|
|
3685
|
+
* capped, one file per read. Say a plugin's genre has a create pipeline that
|
|
3686
|
+
* loads a custom world the person imported: the world sits in the plugin's
|
|
3687
|
+
* storage, and this reads it into the run.
|
|
3688
|
+
*
|
|
3689
|
+
* Why a query and not a task: tasks are pure (F11) — the same inputs give the
|
|
3690
|
+
* same output — and a file on disk is state outside the graph, so it enters
|
|
3691
|
+
* the way every other outside state does, through a query.
|
|
3692
|
+
*
|
|
3693
|
+
* Whose storage: only the plugin that owns the running pipeline. A core or
|
|
3694
|
+
* person-authored pipeline is refused ("plugin-storage reads only a plugin's
|
|
3695
|
+
* own pipeline's storage"). `scope: 'pub'` reads the plugin's shared files and
|
|
3696
|
+
* needs its `storage` grant in force; `scope: 'me'` reads the acting person's
|
|
3697
|
+
* own folder and needs `storage-per-user` in force and a person on the run.
|
|
3698
|
+
* The path is relative, with no `..`, and stays inside the folder. No write,
|
|
3699
|
+
* no listing. A missing file answers `found: false`, not a halt.
|
|
3700
|
+
* @experimental
|
|
3701
|
+
*/
|
|
3702
|
+
export declare const pluginStorage: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
3703
|
+
/** The parsed JSON, or the text; null when the file is missing. */
|
|
3704
|
+
main: string;
|
|
3705
|
+
/** Whether the file was there. */
|
|
3706
|
+
found: string;
|
|
3707
|
+
}, {
|
|
3708
|
+
/** The file, relative to the folder: `worlds/atlas.json`. */
|
|
3709
|
+
path: string;
|
|
3710
|
+
}, "core:query/plugin-storage@1"> & {
|
|
3711
|
+
kind: 'query';
|
|
3712
|
+
slots?: {
|
|
3713
|
+
readonly params: {
|
|
3714
|
+
readonly kind: "parameters";
|
|
3715
|
+
readonly facet: "behavior";
|
|
3716
|
+
readonly schema: {
|
|
3717
|
+
readonly scope: {
|
|
3718
|
+
readonly type: "enum";
|
|
3719
|
+
readonly default: "pub";
|
|
3720
|
+
readonly label: {
|
|
3721
|
+
readonly en: "Whose files";
|
|
3722
|
+
};
|
|
3723
|
+
readonly members: readonly [{
|
|
3724
|
+
readonly key: "pub";
|
|
3725
|
+
readonly label: {
|
|
3726
|
+
readonly en: "The plugin";
|
|
3727
|
+
};
|
|
3728
|
+
readonly description: {
|
|
3729
|
+
readonly en: "The plugin's shared files.";
|
|
3730
|
+
};
|
|
3731
|
+
}, {
|
|
3732
|
+
readonly key: "me";
|
|
3733
|
+
readonly label: {
|
|
3734
|
+
readonly en: "The person";
|
|
3735
|
+
};
|
|
3736
|
+
readonly description: {
|
|
3737
|
+
readonly en: "The acting person's own files for this plugin.";
|
|
3738
|
+
};
|
|
3739
|
+
}];
|
|
3740
|
+
};
|
|
3741
|
+
readonly as: {
|
|
3742
|
+
readonly type: "enum";
|
|
3743
|
+
readonly default: "json";
|
|
3744
|
+
readonly label: {
|
|
3745
|
+
readonly en: "Read as";
|
|
3746
|
+
};
|
|
3747
|
+
readonly members: readonly [{
|
|
3748
|
+
readonly key: "json";
|
|
3749
|
+
readonly label: {
|
|
3750
|
+
readonly en: "JSON";
|
|
3751
|
+
};
|
|
3752
|
+
readonly description: {
|
|
3753
|
+
readonly en: "Parse the file and give the value.";
|
|
3754
|
+
};
|
|
3755
|
+
}, {
|
|
3756
|
+
readonly key: "text";
|
|
3757
|
+
readonly label: {
|
|
3758
|
+
readonly en: "Text";
|
|
3759
|
+
};
|
|
3760
|
+
readonly description: {
|
|
3761
|
+
readonly en: "Give the file as text.";
|
|
3762
|
+
};
|
|
3763
|
+
}];
|
|
3764
|
+
};
|
|
3765
|
+
};
|
|
3766
|
+
};
|
|
3767
|
+
} | undefined;
|
|
3768
|
+
}>;
|
|
3492
3769
|
//# sourceMappingURL=queries.d.ts.map
|