@serene-pub/contracts 0.6.0-pr-4 → 0.6.0-pr-5
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/inlets.d.ts +112 -50
- package/dist/inlets.js +118 -53
- package/dist/oracles.d.ts +308 -19
- package/dist/oracles.js +288 -40
- package/dist/outlets.d.ts +194 -44
- package/dist/outlets.js +231 -55
- package/dist/queries.d.ts +253 -79
- package/dist/queries.js +248 -88
- package/dist/tasks.d.ts +920 -176
- package/dist/tasks.js +788 -145
- package/package.json +3 -3
package/dist/tasks.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const contextBudget: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
16
16
|
* Where the window comes from.
|
|
17
17
|
*
|
|
18
18
|
* The context window belongs to the sampling config, never to a knob
|
|
19
|
-
* on a node
|
|
19
|
+
* on a node — and the executor resolves a `sampling` slot to
|
|
20
20
|
* the config's switched-on *values*, so this stays a pure Task reading
|
|
21
21
|
* data it was handed rather than a Query looking one up.
|
|
22
22
|
*
|
|
@@ -30,14 +30,14 @@ export declare const contextBudget: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
30
30
|
};
|
|
31
31
|
/**
|
|
32
32
|
* The connection the reply is sent on — for the model's own
|
|
33
|
-
* context window
|
|
33
|
+
* context window, which caps the sampling config's when
|
|
34
34
|
* the model states one.
|
|
35
35
|
*
|
|
36
36
|
* Shared with the generating step in every shipped spec
|
|
37
37
|
* (`slot.connectionOf('generate')`), on the same terms as
|
|
38
38
|
* `sampling` above: the budget has to be sized to the window the
|
|
39
39
|
* request is actually sent against, and the ONE computation of
|
|
40
|
-
* that window
|
|
40
|
+
* that window reads both halves off the same resolved pair.
|
|
41
41
|
*/
|
|
42
42
|
readonly connection: {
|
|
43
43
|
readonly kind: "connection";
|
|
@@ -131,7 +131,7 @@ export declare const concatCandidates: import("@serene-pub/sdk").Pinned<import("
|
|
|
131
131
|
}>;
|
|
132
132
|
/**
|
|
133
133
|
* **Eligibility** — the hard gates between the mechanisms and the ranker
|
|
134
|
-
* (
|
|
134
|
+
* (owner rulings of 2026-09-30; built 2026-10-02).
|
|
135
135
|
*
|
|
136
136
|
* Scoring and eligibility are separate on purpose: a hard rule must not compete
|
|
137
137
|
* numerically with a soft one and lose. This node scores nothing. It takes the
|
|
@@ -149,7 +149,7 @@ export declare const concatCandidates: import("@serene-pub/sdk").Pinned<import("
|
|
|
149
149
|
* 2. **Secrecy.** A `relationships` candidate that is somebody's secret
|
|
150
150
|
* (`payload.secretOf`, the holder's participant reference) is ineligible for
|
|
151
151
|
* any other `speaker`. Unwired or null, the producers' own scope decided.
|
|
152
|
-
* 3. **Presence
|
|
152
|
+
* 3. **Presence.** A candidate about a cast member (`payload.lorebookBindingId`)
|
|
153
153
|
* whose member has presences on the line and none holding at `at` — the
|
|
154
154
|
* member is not in the world then. A member with no presences is always
|
|
155
155
|
* present.
|
|
@@ -193,9 +193,9 @@ export declare const rankHybrid: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
193
193
|
* A declared out-port rather than an implementation detail, because it is
|
|
194
194
|
* what Assemble allocates from — and because a ranker swapped in by a
|
|
195
195
|
* plugin has to produce it too, or the budget panel goes blank the moment
|
|
196
|
-
* anyone changes rankers
|
|
196
|
+
* anyone changes rankers.
|
|
197
197
|
*
|
|
198
|
-
* Shape `S.decisions
|
|
198
|
+
* Shape `S.decisions`: a node publishing it is recorded in the
|
|
199
199
|
* ranking store automatically — a plugin's ranker included.
|
|
200
200
|
*/
|
|
201
201
|
decisions: string;
|
|
@@ -212,8 +212,8 @@ export declare const rankHybrid: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
212
212
|
* while the numbers sat one node upstream.
|
|
213
213
|
*
|
|
214
214
|
* Spread onto this type alone rather than into `rankPorts` —
|
|
215
|
-
* the same reason the `scripts` hook above is, one construct up
|
|
216
|
-
*
|
|
215
|
+
* the same reason the `scripts` hook above is, one construct up.
|
|
216
|
+
* The `rank-recall` example computes no per-band usage;
|
|
217
217
|
* giving it a port it cannot fill would move a hash to declare
|
|
218
218
|
* a promise it does not keep.
|
|
219
219
|
*
|
|
@@ -385,8 +385,8 @@ export declare const rankHybrid: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
385
385
|
* by construction, so the first question scores every present character's
|
|
386
386
|
* private lore alike and distinguishes nothing.
|
|
387
387
|
*
|
|
388
|
-
* ⚠ **The world-lore half is graded now, and this weight moved with it
|
|
389
|
-
*
|
|
388
|
+
* ⚠ **The world-lore half is graded now, and this weight moved with it**.
|
|
389
|
+
* It used to be a binary substring
|
|
390
390
|
* test — does the entry's title or keys contain a cast name, `Al` firing on
|
|
391
391
|
* `Alchemy` — worth exactly `{0, 0.2}`. It is now the rarity-weighted,
|
|
392
392
|
* word-boundary, two-sided overlap the admission gate already used: what the
|
|
@@ -1100,10 +1100,10 @@ export declare const rankHybrid: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
1100
1100
|
};
|
|
1101
1101
|
};
|
|
1102
1102
|
/**
|
|
1103
|
-
* The post-retrieval hook
|
|
1103
|
+
* The post-retrieval hook: user chains over the candidate
|
|
1104
1104
|
* pool before ranking sees it. Spread onto this type alone rather
|
|
1105
1105
|
* than into `rankSlots` — widening a sibling's accepted set is a
|
|
1106
|
-
* hash change on a type nobody meant to touch
|
|
1106
|
+
* hash change on a type nobody meant to touch.
|
|
1107
1107
|
*/
|
|
1108
1108
|
readonly scripts: {
|
|
1109
1109
|
readonly kind: "scripts";
|
|
@@ -1124,8 +1124,8 @@ export declare const rankHybrid: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
1124
1124
|
* first.
|
|
1125
1125
|
*
|
|
1126
1126
|
* And it carries the **semantic mechanism's one switch**, `searchByMeaning`,
|
|
1127
|
-
* because it is the first node of the mechanism's chain (2026-09-29
|
|
1128
|
-
*
|
|
1127
|
+
* because it is the first node of the mechanism's chain (2026-09-29) —
|
|
1128
|
+
* `auto | on | off`, shipping `auto`, which searches whenever an
|
|
1129
1129
|
* embedding model is set up, wherever it runs (owner, 2026-09-30).
|
|
1130
1130
|
* @experimental
|
|
1131
1131
|
*/
|
|
@@ -1208,7 +1208,7 @@ export declare const queryWindows: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
1208
1208
|
* per turn in API mode. `maxEntries` is a ceiling now, and
|
|
1209
1209
|
* ships non-zero so that turning this on does something.
|
|
1210
1210
|
* It was then a boolean defaulting to off for one day
|
|
1211
|
-
* (
|
|
1211
|
+
* (2026-09-29), which spent nothing and searched nothing.
|
|
1212
1212
|
*/
|
|
1213
1213
|
readonly searchByMeaning: {
|
|
1214
1214
|
readonly type: "enum";
|
|
@@ -1273,7 +1273,7 @@ export declare const queryWindows: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
1273
1273
|
* to replace. The Query retrieves and computes similarity; this decides.
|
|
1274
1274
|
*
|
|
1275
1275
|
* `similarity` is a port because MMR needs to compare candidates to each other
|
|
1276
|
-
* and a Task cannot ask the host for anything
|
|
1276
|
+
* and a Task cannot ask the host for anything. It is a matrix of cosines,
|
|
1277
1277
|
* not the embeddings — derived, bounded, and not reversible into the vectors.
|
|
1278
1278
|
* @experimental
|
|
1279
1279
|
*/
|
|
@@ -1298,7 +1298,7 @@ export declare const rankSemantic: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
1298
1298
|
readonly schema: {
|
|
1299
1299
|
/**
|
|
1300
1300
|
* ⚠ No `currentWindow` / `recentWindow` here, and there
|
|
1301
|
-
* were (culled 2026-09-16
|
|
1301
|
+
* were (culled 2026-09-16). They size the two query
|
|
1302
1302
|
* windows — how many messages form the 'current' and the
|
|
1303
1303
|
* 'recent' question — which `core:task/query-windows@1`
|
|
1304
1304
|
* cuts and declares as its own params. Declared here too,
|
|
@@ -1415,7 +1415,7 @@ export declare const rankSemantic: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
1415
1415
|
} | undefined;
|
|
1416
1416
|
}>;
|
|
1417
1417
|
/**
|
|
1418
|
-
* A plugin's ranker — same kind, same shape, so the swap list offers it
|
|
1418
|
+
* A plugin's ranker — same kind, same shape, so the swap list offers it.
|
|
1419
1419
|
*
|
|
1420
1420
|
* Named `rankRecall`, not `rankSemantic`: binding names derive from the id's
|
|
1421
1421
|
* name segment and ignore the namespace, so this and `core:task/rank-semantic@1`
|
|
@@ -1434,9 +1434,9 @@ export declare const rankRecall: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
1434
1434
|
* A declared out-port rather than an implementation detail, because it is
|
|
1435
1435
|
* what Assemble allocates from — and because a ranker swapped in by a
|
|
1436
1436
|
* plugin has to produce it too, or the budget panel goes blank the moment
|
|
1437
|
-
* anyone changes rankers
|
|
1437
|
+
* anyone changes rankers.
|
|
1438
1438
|
*
|
|
1439
|
-
* Shape `S.decisions
|
|
1439
|
+
* Shape `S.decisions`: a node publishing it is recorded in the
|
|
1440
1440
|
* ranking store automatically — a plugin's ranker included.
|
|
1441
1441
|
*/
|
|
1442
1442
|
decisions: string;
|
|
@@ -1469,7 +1469,7 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
1469
1469
|
* shape on this edge got no finding, and a plugin ASSEMBLER had
|
|
1470
1470
|
* nothing to read to learn the port existed.
|
|
1471
1471
|
*
|
|
1472
|
-
* `S.decisions`, matching `rankPorts.out.decisions`
|
|
1472
|
+
* `S.decisions`, matching `rankPorts.out.decisions` — a
|
|
1473
1473
|
* decision is a candidate with its arithmetic attached, and the
|
|
1474
1474
|
* panel reads the same objects the allocator does. Typed, so a
|
|
1475
1475
|
* plugin ranker wired here publishes the shape the ranking store
|
|
@@ -1514,15 +1514,15 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
1514
1514
|
groups: string;
|
|
1515
1515
|
/**
|
|
1516
1516
|
* The annex a template may read, as `annex.<owner>.<key>`
|
|
1517
|
-
* (typed templates
|
|
1517
|
+
* (typed templates, edited in place by owner ruling).
|
|
1518
1518
|
*
|
|
1519
1519
|
* Fed ONLY by `core:query/session-annex@1` with `view:
|
|
1520
1520
|
* 'template'`: every DECLARED key of every owner in scope —
|
|
1521
1521
|
* core, the enabled plugins — for the session's genre, keyed by
|
|
1522
1522
|
* owner. A key no declaration covers never arrives, and a
|
|
1523
|
-
* declaration refuses secrets at write time
|
|
1523
|
+
* declaration refuses secrets at write time, so what
|
|
1524
1524
|
* reaches a template is what an owner said may be kept there
|
|
1525
|
-
* (owner ruling
|
|
1525
|
+
* (owner ruling: "nothing dangerous should ever be stored
|
|
1526
1526
|
* there"). Law T2 refuses anything else wired here, and a
|
|
1527
1527
|
* template-view read wired anywhere else.
|
|
1528
1528
|
*
|
|
@@ -1541,8 +1541,8 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
1541
1541
|
/**
|
|
1542
1542
|
* Assemble's own names — what `render()` writes onto the context
|
|
1543
1543
|
* AFTER spreading the prompts and the builder's context, so these
|
|
1544
|
-
* are the last word (typed templates
|
|
1545
|
-
* ruling
|
|
1544
|
+
* are the last word (typed templates, edited in place by owner
|
|
1545
|
+
* ruling).
|
|
1546
1546
|
*
|
|
1547
1547
|
* Corrected 2026-09-27: this declared `blocks`, `budget` as two
|
|
1548
1548
|
* bare names and `prompts` — `blocks` is a param that reorders the
|
|
@@ -1592,8 +1592,7 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
1592
1592
|
readonly optional: true;
|
|
1593
1593
|
};
|
|
1594
1594
|
/**
|
|
1595
|
-
* 🚧 The line's files, placed
|
|
1596
|
-
* §3.5): media markers, inlined text files and placeholders,
|
|
1595
|
+
* 🚧 The line's files, placed: media markers, inlined text files and placeholders,
|
|
1597
1596
|
* from `core:task/place-attachments@1`. Absent on a line
|
|
1598
1597
|
* with no files, and on every line of a spec with no
|
|
1599
1598
|
* placement step.
|
|
@@ -1665,7 +1664,7 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
1665
1664
|
};
|
|
1666
1665
|
};
|
|
1667
1666
|
/**
|
|
1668
|
-
* 🚧 The session's **author's note**, placed (2026-10-02
|
|
1667
|
+
* 🚧 The session's **author's note**, placed (2026-10-02) — the
|
|
1669
1668
|
* person's own steering text for this session, at its own depth, with no
|
|
1670
1669
|
* token trigger. Not the post-history reminder: that one is the pipeline's
|
|
1671
1670
|
* and the card's "how to respond"; this is the person's "what is true now".
|
|
@@ -1727,7 +1726,7 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
1727
1726
|
readonly currentDate: "core:var/current-date@1";
|
|
1728
1727
|
};
|
|
1729
1728
|
/**
|
|
1730
|
-
* Open (typed templates
|
|
1729
|
+
* Open (typed templates, edited in place by owner ruling):
|
|
1731
1730
|
* every band declared upstream of `candidates` is rendered too,
|
|
1732
1731
|
* under its key and through its variable's layout — a plugin's
|
|
1733
1732
|
* source adds its band here by declaring it.
|
|
@@ -1775,16 +1774,16 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
1775
1774
|
* ⚠ No `truncation` here, and there was one — an enum of
|
|
1776
1775
|
* `oldest-first | lowest-weight`, "what gets dropped first
|
|
1777
1776
|
* when the context is over budget" — declared, rendered,
|
|
1778
|
-
* and read by nothing (culled 2026-09-16
|
|
1777
|
+
* and read by nothing (culled 2026-09-16). What LORE
|
|
1779
1778
|
* fits is decided upstream by the ranker's `select`, per
|
|
1780
1779
|
* band, against `share`, `maxEntries`, `minEntries` and
|
|
1781
1780
|
* `scoreLedAllocation` on `core:task/rank-hybrid@1`, and
|
|
1782
1781
|
* this node renders the decisions it is handed. A second
|
|
1783
1782
|
* drop rule for lore here would be a second owner of one
|
|
1784
|
-
* decision.
|
|
1783
|
+
* decision.
|
|
1785
1784
|
*
|
|
1786
1785
|
* ⚠ The TRANSCRIPT is the exception, because nobody else
|
|
1787
|
-
* owns it (
|
|
1786
|
+
* owns it (2026-10-03): no shipped spec ranks a message
|
|
1788
1787
|
* candidate, so the conversation's rows were never fitted
|
|
1789
1788
|
* at all and a long session went out larger than the
|
|
1790
1789
|
* window. The host's binding measures what it rendered and,
|
|
@@ -1853,7 +1852,7 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
1853
1852
|
}>;
|
|
1854
1853
|
/**
|
|
1855
1854
|
* What a context builder's `templateContext` carries, in the template type
|
|
1856
|
-
* language (typed templates
|
|
1855
|
+
* language (typed templates, 2026-09-27) — so a template editor offers
|
|
1857
1856
|
* `{{{characters}}}` with a type, and `templateScopeAt` puts these keys in
|
|
1858
1857
|
* the scope of whatever template renders the builder's output.
|
|
1859
1858
|
*
|
|
@@ -1901,6 +1900,11 @@ export declare const TEMPLATE_CONTEXT_SCHEMA: {
|
|
|
1901
1900
|
readonly type: 'string';
|
|
1902
1901
|
readonly description: '“A, B, and C” — every persona’s name.';
|
|
1903
1902
|
};
|
|
1903
|
+
/** 🚧 `core:var/likenesses@1` — everyone on stage's likeness prompt, laid out. */
|
|
1904
|
+
readonly likenesses: {
|
|
1905
|
+
readonly type: 'string';
|
|
1906
|
+
readonly description: 'Everyone on stage’s likeness prompt, by name, laid out (JSON by default).';
|
|
1907
|
+
};
|
|
1904
1908
|
readonly exampleDialogue: {
|
|
1905
1909
|
readonly type: 'string';
|
|
1906
1910
|
readonly description: 'The speaker’s example dialogue.';
|
|
@@ -2038,7 +2042,7 @@ export declare const TEMPLATE_CONTEXT_SCHEMA: {
|
|
|
2038
2042
|
*
|
|
2039
2043
|
* A type is the unit that declares a configurable surface — it is how a plugin
|
|
2040
2044
|
* declares one, and `RegistryEntry.slots` carries the declaration precisely so
|
|
2041
|
-
* core can render a form without executing the plugin that owns it
|
|
2045
|
+
* core can render a form without executing the plugin that owns it.
|
|
2042
2046
|
* Narrowing per-spec instead would have meant the row said one thing and the
|
|
2043
2047
|
* running pipeline another, which is the defect widening that column fixed.
|
|
2044
2048
|
*
|
|
@@ -2086,7 +2090,7 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2086
2090
|
* narrate spec never supplies these because graph context
|
|
2087
2091
|
* needs a speaker's perspective and a narrator has none — so
|
|
2088
2092
|
* widening the shared map would give it two ports it must
|
|
2089
|
-
* leave empty forever, and move its hash to say so
|
|
2093
|
+
* leave empty forever, and move its hash to say so.
|
|
2090
2094
|
*/
|
|
2091
2095
|
relationshipsPerspectives: string;
|
|
2092
2096
|
relationshipsKnown: string;
|
|
@@ -2116,8 +2120,8 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2116
2120
|
speakerName: string;
|
|
2117
2121
|
speakerCharacter: string;
|
|
2118
2122
|
/**
|
|
2119
|
-
* Who is speaking, as a participant reference (
|
|
2120
|
-
*
|
|
2123
|
+
* Who is speaking, as a participant reference (2026-09-16)
|
|
2124
|
+
* — the turn strategy's `speaker`. Read for one
|
|
2121
2125
|
* thing: an **envoy** (`envoy:<slug>`) has no character row, so
|
|
2122
2126
|
* its card — name and description, off the genre's declaration
|
|
2123
2127
|
* the cast read carries — is compiled here where a cast
|
|
@@ -2149,23 +2153,22 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2149
2153
|
state: string;
|
|
2150
2154
|
/**
|
|
2151
2155
|
* What the person typed with the press, for an action that
|
|
2152
|
-
* reads its composer text as **direction** (
|
|
2153
|
-
*
|
|
2154
|
-
*
|
|
2155
|
-
* uplift C2, 2026-09-29). Rendered as
|
|
2156
|
+
* reads its composer text as **direction** (2026-09-27): the
|
|
2157
|
+
* Lair's Trigger trap and Reveal, and Whodunit's Search — what
|
|
2158
|
+
* the detective is looking for (2026-09-29). Rendered as
|
|
2156
2159
|
* `{{turnDirection}}` — the same name, and the same meaning,
|
|
2157
|
-
* `build-scene-context@1` gives the Lair's reply
|
|
2160
|
+
* `build-scene-context@1` gives the Lair's reply. Absent
|
|
2158
2161
|
* when blank, so a prompt writes `{{#if turnDirection}}…{{/if}}`
|
|
2159
2162
|
* and a press with nothing typed leaves it to the prompt.
|
|
2160
2163
|
* Declared here rather than in `contextPorts`, like `state`
|
|
2161
2164
|
* above; the narrator and side-character builders declare
|
|
2162
|
-
* their own
|
|
2165
|
+
* their own. Unwired on every spec whose composer text is
|
|
2163
2166
|
* a line somebody said.
|
|
2164
2167
|
*/
|
|
2165
2168
|
turnDirection: string;
|
|
2166
2169
|
/**
|
|
2167
2170
|
* The places the lorebook holds, for an envoy that talks about
|
|
2168
|
-
* the world from outside it (
|
|
2171
|
+
* the world from outside it (2026-09-28): the
|
|
2169
2172
|
* Lair's Castellan in the Sanctum. A
|
|
2170
2173
|
* `core:query/lorebook-entries@1` listing, rendered exactly as
|
|
2171
2174
|
* the planner's and the scene's port of this name is —
|
|
@@ -2176,7 +2179,7 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2176
2179
|
locationEntries: string;
|
|
2177
2180
|
/**
|
|
2178
2181
|
* The story's newest rows, for a speaker who talks ABOUT the
|
|
2179
|
-
* story from another channel
|
|
2182
|
+
* story from another channel: the Castellan
|
|
2180
2183
|
* in the Sanctum reads `main`'s last few rows. Transcript rows
|
|
2181
2184
|
* (a `session-history@1` read), rendered as prose — one
|
|
2182
2185
|
* `Name: line` per row, named as the transcript names them, no
|
|
@@ -2186,8 +2189,8 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2186
2189
|
*/
|
|
2187
2190
|
recentStory: string;
|
|
2188
2191
|
/**
|
|
2189
|
-
* The session's genre fields, by their own names (
|
|
2190
|
-
*
|
|
2192
|
+
* The session's genre fields, by their own names (2026-09-28):
|
|
2193
|
+
* `{{sanctumSteers}}` for the Castellan in
|
|
2191
2194
|
* the Sanctum, whose instructions say whether its talk shapes
|
|
2192
2195
|
* the next turn. The planner's and the scene's `fields`, on the
|
|
2193
2196
|
* same terms. Declared on THIS type alone, like `state`;
|
|
@@ -2195,7 +2198,7 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2195
2198
|
*/
|
|
2196
2199
|
fields: string;
|
|
2197
2200
|
/**
|
|
2198
|
-
* The speaker's own running notes (
|
|
2201
|
+
* The speaker's own running notes (owner ruling of
|
|
2199
2202
|
* 2026-09-28): the Castellan's **scratchpad**, the Lair's annex
|
|
2200
2203
|
* field `castellan-scratchpad`, read for it alone
|
|
2201
2204
|
* (`session-annex@1`'s AI view, with its own reference as the
|
|
@@ -2232,6 +2235,8 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2232
2235
|
readonly postHistoryInstructions: 'core:var/post-history-instructions@1';
|
|
2233
2236
|
readonly characterNames: 'core:var/character-names@1';
|
|
2234
2237
|
readonly personaNames: 'core:var/persona-names@1';
|
|
2238
|
+
/** 🚧 Everyone on stage's likeness prompt. */
|
|
2239
|
+
readonly likenesses: 'core:var/likenesses@1';
|
|
2235
2240
|
/** From the speaking character's card. */
|
|
2236
2241
|
readonly exampleDialogue: "core:var/example-dialogue@1";
|
|
2237
2242
|
/**
|
|
@@ -2248,7 +2253,7 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2248
2253
|
};
|
|
2249
2254
|
};
|
|
2250
2255
|
/**
|
|
2251
|
-
* The pre-assemble context hook
|
|
2256
|
+
* The pre-assemble context hook: user chains over the
|
|
2252
2257
|
* finished template context — conditional style guides, seeded
|
|
2253
2258
|
* event tables — after this node resolves it and before anything
|
|
2254
2259
|
* renders it.
|
|
@@ -2258,7 +2263,7 @@ export declare const buildTemplateContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2258
2263
|
* template-context *data* (`context.injections`, resolved to
|
|
2259
2264
|
* `injectionsByIndex` beside `postHistory.targetIndex`), rendered
|
|
2260
2265
|
* by the template's own message loop. Splicing them into the list
|
|
2261
|
-
* behind the template's back would
|
|
2266
|
+
* behind the template's back would repeat an old defect one
|
|
2262
2267
|
* layer down: a position the template cannot express, an author
|
|
2263
2268
|
* cannot see, and a corpus cannot check.
|
|
2264
2269
|
*/
|
|
@@ -2308,12 +2313,12 @@ export declare const buildNarratorContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2308
2313
|
cast: string;
|
|
2309
2314
|
currentCharacterId: string;
|
|
2310
2315
|
/**
|
|
2311
|
-
* What the person asked this narration to do (
|
|
2312
|
-
*
|
|
2316
|
+
* What the person asked this narration to do (2026-09-29):
|
|
2317
|
+
* the narrator modal's text or `/narrate
|
|
2313
2318
|
* <text>` — the turn's triggering text, `$.input.text`.
|
|
2314
2319
|
* Rendered as `{{turnDirection}}`, the name and the meaning
|
|
2315
2320
|
* `build-template-context@1` and `build-scene-context@1` give
|
|
2316
|
-
* it
|
|
2321
|
+
* it; absent when blank, so a row writes
|
|
2317
2322
|
* `{{#if turnDirection}}…{{/if}}` and an undirected narration
|
|
2318
2323
|
* renders exactly what it did before.
|
|
2319
2324
|
*
|
|
@@ -2355,6 +2360,8 @@ export declare const buildNarratorContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2355
2360
|
readonly postHistoryInstructions: 'core:var/post-history-instructions@1';
|
|
2356
2361
|
readonly characterNames: 'core:var/character-names@1';
|
|
2357
2362
|
readonly personaNames: 'core:var/persona-names@1';
|
|
2363
|
+
/** 🚧 Everyone on stage's likeness prompt. */
|
|
2364
|
+
readonly likenesses: 'core:var/likenesses@1';
|
|
2358
2365
|
};
|
|
2359
2366
|
};
|
|
2360
2367
|
/** The same hook as `build-template-context` — see it for the terms. */
|
|
@@ -2407,7 +2414,7 @@ export declare const buildNarratorContext: import("@serene-pub/sdk").Pinned<impo
|
|
|
2407
2414
|
* the card; the id stays where the host can act on it.
|
|
2408
2415
|
*
|
|
2409
2416
|
* ⚠ **The OUT-port `speaker` is the other half of that sentence** (added
|
|
2410
|
-
* 2026-09-17
|
|
2417
|
+
* 2026-09-17). The half-working control was a speaker id that changed the
|
|
2411
2418
|
* prompt's voice and not the lore; the repair is not an in-port but a lane
|
|
2412
2419
|
* inside the same clause reading the answer this node already computed —
|
|
2413
2420
|
* `core:query/character-lore@1` takes `speaker`, so the voice and its private
|
|
@@ -2422,7 +2429,7 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
|
|
|
2422
2429
|
* Who this voice is, as a **participant reference** — the row
|
|
2423
2430
|
* the fact named (`characterId` or `ref`), else
|
|
2424
2431
|
* `character:<id>` for a name the cast holds, else null for a
|
|
2425
|
-
* free-form one. Additive, 2026-09-17
|
|
2432
|
+
* free-form one. Additive, 2026-09-17. A lore read wired
|
|
2426
2433
|
* to it takes null as unwired, so the run's scope decides for
|
|
2427
2434
|
* a free-form voice.
|
|
2428
2435
|
*
|
|
@@ -2452,8 +2459,8 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
|
|
|
2452
2459
|
* because a typed name is all there is.
|
|
2453
2460
|
*
|
|
2454
2461
|
* `characterId` (a row id) or `ref` (a participant reference,
|
|
2455
|
-
* `character:<id>` — what a pressed option carries
|
|
2456
|
-
*
|
|
2462
|
+
* `character:<id>` — what a pressed option carries) names the
|
|
2463
|
+
* speaker BY ROW, and then the row is who
|
|
2457
2464
|
* speaks: the name is a label, never a second lookup, so two
|
|
2458
2465
|
* people sharing a name stay two people and a row the cast does
|
|
2459
2466
|
* not seat is still the person it names. A fact with neither
|
|
@@ -2482,7 +2489,7 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
|
|
|
2482
2489
|
plan: string;
|
|
2483
2490
|
/**
|
|
2484
2491
|
* The rooms, listed (`core:query/lorebook-entries@1`), as the
|
|
2485
|
-
* planner and the scene get them (
|
|
2492
|
+
* planner and the scene get them (2026-09-28):
|
|
2486
2493
|
* `{{knownLocations}}` and the one the party stand in as
|
|
2487
2494
|
* `{{locationEntry}}`, so a voice can name the room it is in
|
|
2488
2495
|
* now that nobody narrates it first. Unwired, neither renders.
|
|
@@ -2490,7 +2497,7 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
|
|
|
2490
2497
|
locationEntries: string;
|
|
2491
2498
|
/**
|
|
2492
2499
|
* A place described only in prose, as `{{locationPassage}}`
|
|
2493
|
-
* (
|
|
2500
|
+
* (2026-09-28): the paragraph
|
|
2494
2501
|
* `core:task/undescribed-name@1` found describing the room the
|
|
2495
2502
|
* party are about to walk into (its `passage`), when no entry
|
|
2496
2503
|
* describes it — that room's text for this turn. Blank or
|
|
@@ -2499,7 +2506,7 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
|
|
|
2499
2506
|
locationPassage: string;
|
|
2500
2507
|
/**
|
|
2501
2508
|
* What the person asked this side character's turn to do
|
|
2502
|
-
* (
|
|
2509
|
+
* (2026-09-29) — the narrator modal's text,
|
|
2503
2510
|
* which feeds both of its halves. `{{turnDirection}}`, on the
|
|
2504
2511
|
* terms `build-narrator-context@1` states; wired by
|
|
2505
2512
|
* `core:spec/chat-side-character` alone, so a genre's voices
|
|
@@ -2536,6 +2543,8 @@ export declare const buildSideCharacterContext: import("@serene-pub/sdk").Pinned
|
|
|
2536
2543
|
readonly postHistoryInstructions: 'core:var/post-history-instructions@1';
|
|
2537
2544
|
readonly characterNames: 'core:var/character-names@1';
|
|
2538
2545
|
readonly personaNames: 'core:var/persona-names@1';
|
|
2546
|
+
/** 🚧 Everyone on stage's likeness prompt. */
|
|
2547
|
+
readonly likenesses: 'core:var/likenesses@1';
|
|
2539
2548
|
};
|
|
2540
2549
|
};
|
|
2541
2550
|
/** The same hook as the other two builders — see them for the terms. */
|
|
@@ -2590,22 +2599,22 @@ export declare const buildPlannerContext: import("@serene-pub/sdk").Pinned<impor
|
|
|
2590
2599
|
fields: string;
|
|
2591
2600
|
/**
|
|
2592
2601
|
* What the person just sent, when the genre reads it as
|
|
2593
|
-
* **direction** rather than as a line somebody said
|
|
2594
|
-
*
|
|
2602
|
+
* **direction** rather than as a line somebody said
|
|
2603
|
+
* (2026-09-27) — the Lair's composer. On the template
|
|
2595
2604
|
* context and in the prompt as `{{turnDirection}}`; empty or
|
|
2596
2605
|
* absent on a turn nobody directed (a Continue), so a prompt
|
|
2597
2606
|
* writes `{{#if turnDirection}}…{{/if}}`. A genre whose composer
|
|
2598
2607
|
* text is a participant's line leaves it unwired: that line is
|
|
2599
2608
|
* already in the transcript. *Turn* direction, never bare
|
|
2600
2609
|
* `direction`: that word is the Lair's standing-note state slot
|
|
2601
|
-
* (`core:slot/direction@1`), a different fact (
|
|
2602
|
-
* 2026-09-27).
|
|
2610
|
+
* (`core:slot/direction@1`), a different fact (one word, one
|
|
2611
|
+
* meaning; renamed 2026-09-27).
|
|
2603
2612
|
*/
|
|
2604
2613
|
turnDirection: string;
|
|
2605
2614
|
/**
|
|
2606
2615
|
* The places the lorebook holds — a
|
|
2607
2616
|
* `core:query/lorebook-entries@1` listing of location entries
|
|
2608
|
-
* (
|
|
2617
|
+
* (2026-09-27). On the template context as
|
|
2609
2618
|
* `{{knownLocations}}` (their names, one line) and
|
|
2610
2619
|
* `{{locationEntry}}` (the entry whose name is the world's
|
|
2611
2620
|
* `location` slot — where the party are, its exits included),
|
|
@@ -2615,7 +2624,7 @@ export declare const buildPlannerContext: import("@serene-pub/sdk").Pinned<impor
|
|
|
2615
2624
|
*/
|
|
2616
2625
|
locationEntries: string;
|
|
2617
2626
|
/**
|
|
2618
|
-
* **Side talk** (
|
|
2627
|
+
* **Side talk** (2026-09-28): what was said on
|
|
2619
2628
|
* another channel since the story's last line — the Lair's
|
|
2620
2629
|
* Sanctum talk, read by `session-history@1` with
|
|
2621
2630
|
* `unplayedOnly`. Transcript rows, rendered as prose into
|
|
@@ -2627,15 +2636,15 @@ export declare const buildPlannerContext: import("@serene-pub/sdk").Pinned<impor
|
|
|
2627
2636
|
*/
|
|
2628
2637
|
sideTalk: string;
|
|
2629
2638
|
/**
|
|
2630
|
-
* The planner's own running notes (
|
|
2639
|
+
* The planner's own running notes (owner ruling of
|
|
2631
2640
|
* 2026-09-28): the Castellan's **scratchpad**, rendered as
|
|
2632
2641
|
* `{{scratchpad}}`. Absent when unwired or blank; the Lair
|
|
2633
2642
|
* wires it beside `sideTalk`.
|
|
2634
2643
|
*/
|
|
2635
2644
|
scratchpad: string;
|
|
2636
2645
|
/**
|
|
2637
|
-
* **How the cast stand with each other** (
|
|
2638
|
-
*
|
|
2646
|
+
* **How the cast stand with each other** (2026-09-29): the
|
|
2647
|
+
* ranker's allocated candidates, of which the
|
|
2639
2648
|
* builder reads the `relationships` band's `castRelationships`
|
|
2640
2649
|
* lane — `core:query/relationship-search@1` read with nobody
|
|
2641
2650
|
* speaking. Rendered as `{{castRelationships}}`: JSON keyed by
|
|
@@ -2674,6 +2683,7 @@ export declare const buildPlannerContext: import("@serene-pub/sdk").Pinned<impor
|
|
|
2674
2683
|
postHistoryInstructions: 'core:var/post-history-instructions@1';
|
|
2675
2684
|
characterNames: 'core:var/character-names@1';
|
|
2676
2685
|
personaNames: 'core:var/persona-names@1';
|
|
2686
|
+
likenesses: 'core:var/likenesses@1';
|
|
2677
2687
|
};
|
|
2678
2688
|
};
|
|
2679
2689
|
/** The same pre-assemble hook the other three builders carry. */
|
|
@@ -2738,22 +2748,22 @@ export declare const buildSceneContext: import("@serene-pub/sdk").Pinned<import(
|
|
|
2738
2748
|
fields: string;
|
|
2739
2749
|
/**
|
|
2740
2750
|
* What the person just sent, when the genre reads it as
|
|
2741
|
-
* **direction** rather than as a line somebody said
|
|
2742
|
-
*
|
|
2751
|
+
* **direction** rather than as a line somebody said
|
|
2752
|
+
* (2026-09-27) — the Lair's composer. On the template
|
|
2743
2753
|
* context and in the prompt as `{{turnDirection}}`; empty or
|
|
2744
2754
|
* absent on a turn nobody directed (a Continue), so a prompt
|
|
2745
2755
|
* writes `{{#if turnDirection}}…{{/if}}`. A genre whose composer
|
|
2746
2756
|
* text is a participant's line leaves it unwired: that line is
|
|
2747
2757
|
* already in the transcript. *Turn* direction, never bare
|
|
2748
2758
|
* `direction`: that word is the Lair's standing-note state slot
|
|
2749
|
-
* (`core:slot/direction@1`), a different fact (
|
|
2750
|
-
* 2026-09-27).
|
|
2759
|
+
* (`core:slot/direction@1`), a different fact (one word, one
|
|
2760
|
+
* meaning; renamed 2026-09-27).
|
|
2751
2761
|
*/
|
|
2752
2762
|
turnDirection: string;
|
|
2753
2763
|
/**
|
|
2754
2764
|
* The places the lorebook holds — a
|
|
2755
2765
|
* `core:query/lorebook-entries@1` listing of location entries
|
|
2756
|
-
* (
|
|
2766
|
+
* (2026-09-27). On the template context as
|
|
2757
2767
|
* `{{knownLocations}}` (their names, one line) and
|
|
2758
2768
|
* `{{locationEntry}}` (the room the world's `location` names,
|
|
2759
2769
|
* else the planner's location hint — where the party are, its
|
|
@@ -2764,7 +2774,7 @@ export declare const buildSceneContext: import("@serene-pub/sdk").Pinned<import(
|
|
|
2764
2774
|
*/
|
|
2765
2775
|
locationEntries: string;
|
|
2766
2776
|
/**
|
|
2767
|
-
* **Side talk** (
|
|
2777
|
+
* **Side talk** (2026-09-28), on the
|
|
2768
2778
|
* planner's terms: the Lair's Sanctum talk since the story's
|
|
2769
2779
|
* last line, rendered as prose into `{{sideTalk}}` — for the
|
|
2770
2780
|
* Castellan's narration, wired while the session's _Sanctum
|
|
@@ -2774,7 +2784,7 @@ export declare const buildSceneContext: import("@serene-pub/sdk").Pinned<import(
|
|
|
2774
2784
|
sideTalk: string;
|
|
2775
2785
|
/**
|
|
2776
2786
|
* How the cast stand with each other, on the narrator's terms
|
|
2777
|
-
* — the same port as the planner's (
|
|
2787
|
+
* — the same port as the planner's (2026-09-29), rendered
|
|
2778
2788
|
* as `{{castRelationships}}`. See `buildPlannerContext`.
|
|
2779
2789
|
*/
|
|
2780
2790
|
castRelationships: string;
|
|
@@ -2831,6 +2841,7 @@ export declare const buildSceneContext: import("@serene-pub/sdk").Pinned<import(
|
|
|
2831
2841
|
postHistoryInstructions: 'core:var/post-history-instructions@1';
|
|
2832
2842
|
characterNames: 'core:var/character-names@1';
|
|
2833
2843
|
personaNames: 'core:var/persona-names@1';
|
|
2844
|
+
likenesses: 'core:var/likenesses@1';
|
|
2834
2845
|
};
|
|
2835
2846
|
};
|
|
2836
2847
|
/** The same pre-assemble hook the other three builders carry. */
|
|
@@ -2914,6 +2925,16 @@ export declare const buildKeeperContext: import("@serene-pub/sdk").Pinned<import
|
|
|
2914
2925
|
* prompt naming `{{tone}}` rendered a blank.
|
|
2915
2926
|
*/
|
|
2916
2927
|
fields: string;
|
|
2928
|
+
/**
|
|
2929
|
+
* 🚧 **How much time the player chose** (live scenes §15 G6,
|
|
2930
|
+
* 2026-10-13): a collected clock step, `{ by, unit }` — the
|
|
2931
|
+
* inlet's `clockStep` on a *Time passes…* press. Spelled on the
|
|
2932
|
+
* template context as `{{clockStep}}` (`3 hours`, `1 day`,
|
|
2933
|
+
* `2 hours back`), so the keeper describes what the world does
|
|
2934
|
+
* over the span the player picked rather than one notch of
|
|
2935
|
+
* the time of day. Absent when unwired or not a step.
|
|
2936
|
+
*/
|
|
2937
|
+
clockStep: string;
|
|
2917
2938
|
}, "core:task/build-keeper-context@1"> & {
|
|
2918
2939
|
kind: 'task';
|
|
2919
2940
|
slots?: {
|
|
@@ -2938,6 +2959,7 @@ export declare const buildKeeperContext: import("@serene-pub/sdk").Pinned<import
|
|
|
2938
2959
|
postHistoryInstructions: 'core:var/post-history-instructions@1';
|
|
2939
2960
|
characterNames: 'core:var/character-names@1';
|
|
2940
2961
|
personaNames: 'core:var/persona-names@1';
|
|
2962
|
+
likenesses: 'core:var/likenesses@1';
|
|
2941
2963
|
};
|
|
2942
2964
|
};
|
|
2943
2965
|
/** The same pre-assemble hook the other three builders carry. */
|
|
@@ -2969,8 +2991,7 @@ export declare const processMessages: import("@serene-pub/sdk").Pinned<import("@
|
|
|
2969
2991
|
seedName: string;
|
|
2970
2992
|
/**
|
|
2971
2993
|
* Text the model is being asked to CONTINUE — the seed line's
|
|
2972
|
-
* body rather than a message of its own (ruling 2026-09-08
|
|
2973
|
-
* D-2).
|
|
2994
|
+
* body rather than a message of its own (ruling 2026-09-08).
|
|
2974
2995
|
*
|
|
2975
2996
|
* ⚠ **Absent on an ordinary turn, and that is the normal case.**
|
|
2976
2997
|
* There is no `optional` marker for a port: a port nothing wires
|
|
@@ -2997,11 +3018,11 @@ export declare const processMessages: import("@serene-pub/sdk").Pinned<import("@
|
|
|
2997
3018
|
kind: 'task';
|
|
2998
3019
|
slots?: {
|
|
2999
3020
|
/**
|
|
3000
|
-
* The message-rewrite hook
|
|
3021
|
+
* The message-rewrite hook, on the *processed* list —
|
|
3001
3022
|
* names resolved, per-message interpolation done. `transform` only:
|
|
3002
3023
|
* `messages/inject` deliberately does **not** live here. Injection
|
|
3003
3024
|
* is a statement about *position in the rendered conversation*, and
|
|
3004
|
-
* position belongs to the template (
|
|
3025
|
+
* position belongs to the template (ruling of 2026-08-23) —
|
|
3005
3026
|
* inject chains attach on the context builders, land as
|
|
3006
3027
|
* `context.injections`, and the template's own loop renders them.
|
|
3007
3028
|
* Splicing rows into this list would be a position the template
|
|
@@ -3052,8 +3073,7 @@ export declare const proseTranscript: import("@serene-pub/sdk").Pinned<import("@
|
|
|
3052
3073
|
slots?: Record<string, SlotDecl> | undefined;
|
|
3053
3074
|
}>;
|
|
3054
3075
|
/**
|
|
3055
|
-
* 🚧 **Where each line's attachments go** (
|
|
3056
|
-
* D2/D3, 2026-10-02).
|
|
3076
|
+
* 🚧 **Where each line's attachments go** (owner rulings of 2026-10-02).
|
|
3057
3077
|
*
|
|
3058
3078
|
* Pure. Takes the processed lines and the attachments by message, and gives
|
|
3059
3079
|
* each line an `attachments` string the template renders after the line's text
|
|
@@ -3129,7 +3149,7 @@ export declare const placeAttachments: import("@serene-pub/sdk").Pinned<import("
|
|
|
3129
3149
|
* in candidate order. A character spoke when a non-hidden, non-narrator row
|
|
3130
3150
|
* after the last user row carries its id; an envoy when `metadata.speaker`
|
|
3131
3151
|
* carries its reference; a persona when a user row carries its `personaId`
|
|
3132
|
-
* — which is how a session knows it is the person's turn
|
|
3152
|
+
* — which is how a session knows it is the person's turn.
|
|
3133
3153
|
* @experimental
|
|
3134
3154
|
*/
|
|
3135
3155
|
export declare const turnRoundRobin: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
@@ -3155,7 +3175,7 @@ export declare const turnRoundRobin: import("@serene-pub/sdk").Pinned<import("@s
|
|
|
3155
3175
|
* A seeded uniform pick over the not-yet-spoken candidates — one entry.
|
|
3156
3176
|
* `declaresRandomness`, so a replayed run re-rolls identically; an
|
|
3157
3177
|
* unrelated recompute may roll differently, which is documented rather than
|
|
3158
|
-
* prevented
|
|
3178
|
+
* prevented.
|
|
3159
3179
|
* @experimental
|
|
3160
3180
|
*/
|
|
3161
3181
|
export declare const turnRandom: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
@@ -3277,7 +3297,7 @@ export declare const turnNarrator: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
3277
3297
|
slots?: Record<string, SlotDecl> | undefined;
|
|
3278
3298
|
}>;
|
|
3279
3299
|
/**
|
|
3280
|
-
* The pool
|
|
3300
|
+
* The pool: who *may* be seated this recompute, from the settings
|
|
3281
3301
|
* document's cast and the history.
|
|
3282
3302
|
*
|
|
3283
3303
|
* Its four params are the whole of a genre's or a session's say over
|
|
@@ -3295,7 +3315,7 @@ export declare const turnNarrator: import("@serene-pub/sdk").Pinned<import("@ser
|
|
|
3295
3315
|
export declare const turnPool: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
3296
3316
|
main: string;
|
|
3297
3317
|
}, {
|
|
3298
|
-
/** The settings document's cast, envoys included
|
|
3318
|
+
/** The settings document's cast, envoys included. */
|
|
3299
3319
|
cast: string;
|
|
3300
3320
|
/** The session's visible history, ascending. */
|
|
3301
3321
|
messages: string;
|
|
@@ -3429,7 +3449,7 @@ export declare const turnPool: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
3429
3449
|
} | undefined;
|
|
3430
3450
|
}>;
|
|
3431
3451
|
/**
|
|
3432
|
-
* The first orderer
|
|
3452
|
+
* The first orderer: mentioned candidates sort to the front.
|
|
3433
3453
|
*
|
|
3434
3454
|
* A composable node rather than a seventh strategy, because "who was named"
|
|
3435
3455
|
* and "whose turn it is" are two questions — a session can have the
|
|
@@ -3471,7 +3491,61 @@ export declare const turnMentioned: import("@serene-pub/sdk").Pinned<import("@se
|
|
|
3471
3491
|
} | undefined;
|
|
3472
3492
|
}>;
|
|
3473
3493
|
/**
|
|
3474
|
-
*
|
|
3494
|
+
* Card strokes — marks each keyword stroke fired or not against the recent
|
|
3495
|
+
* transcript; never ranks, never budgets.
|
|
3496
|
+
*
|
|
3497
|
+
* A card painted in strokes (`strokes.ts`) carries keyword strokes: prose that
|
|
3498
|
+
* belongs in the prompt only when one of its keys was said. Unrun, every
|
|
3499
|
+
* enabled stroke is in — the card's cached `description`/`personality` — and
|
|
3500
|
+
* nothing is lost but room. Placed before the context builder, this stamps
|
|
3501
|
+
* `fired` on every stroke of every cast member (`resolveStrokes`), and the
|
|
3502
|
+
* builder then compiles `always` + fired ones only and puts the resolved list
|
|
3503
|
+
* on the card (`core:var/characters@1`'s optional `strokes`).
|
|
3504
|
+
*
|
|
3505
|
+
* The host answers each keyword condition with the lore keyword **matcher**
|
|
3506
|
+
* — the same match modes and regex time limit, one matcher at the seam — but
|
|
3507
|
+
* a stroke is not a lorebook entry: it never reaches the ranker, the lore
|
|
3508
|
+
* budget or `select`, and never competes with lore for room.
|
|
3509
|
+
*
|
|
3510
|
+
* `cast` in, `cast` out, so it slots between the cast read and the builder
|
|
3511
|
+
* without either changing; a card with no strokes passes through as it came.
|
|
3512
|
+
* The window is the last `scanDepth` rows of `messages`, defaulting to the
|
|
3513
|
+
* lore scan's 10 for the reason given there: a round grows with the cast.
|
|
3514
|
+
* Pure — the explicit step "no magic in core" asks for, placed in a spec.
|
|
3515
|
+
*
|
|
3516
|
+
* ⏸ Paused 2026-10-11 (owner): no core spec places this step and the app hides strokes behind `STROKES_ENABLED`; kept so stored documents and the registry hash stay stable.
|
|
3517
|
+
* @experimental
|
|
3518
|
+
*/
|
|
3519
|
+
export declare const cardStrokes: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
3520
|
+
main: string;
|
|
3521
|
+
cast: string;
|
|
3522
|
+
}, {
|
|
3523
|
+
cast: string;
|
|
3524
|
+
messages: string;
|
|
3525
|
+
}, "core:task/card-strokes@1"> & {
|
|
3526
|
+
kind: 'task';
|
|
3527
|
+
slots?: {
|
|
3528
|
+
readonly params: {
|
|
3529
|
+
readonly kind: "parameters";
|
|
3530
|
+
readonly facet: "behavior";
|
|
3531
|
+
readonly schema: {
|
|
3532
|
+
readonly scanDepth: {
|
|
3533
|
+
readonly type: "integer";
|
|
3534
|
+
readonly default: 10;
|
|
3535
|
+
readonly min: 1;
|
|
3536
|
+
readonly label: {
|
|
3537
|
+
readonly en: "Messages scanned for stroke keywords";
|
|
3538
|
+
};
|
|
3539
|
+
readonly description: {
|
|
3540
|
+
readonly en: "How many recent messages are read for a keyword stroke's keys.";
|
|
3541
|
+
};
|
|
3542
|
+
};
|
|
3543
|
+
};
|
|
3544
|
+
};
|
|
3545
|
+
} | undefined;
|
|
3546
|
+
}>;
|
|
3547
|
+
/**
|
|
3548
|
+
* Tool calling's two pure halves. A *tool* is any same-shaped
|
|
3475
3549
|
* provider — a sandboxed plugin hook canonically — and these tasks only
|
|
3476
3550
|
* decide how the model learns about it and how its answer is read back.
|
|
3477
3551
|
* Between them sits the ordinary generate step; around them sits the loop
|
|
@@ -3573,7 +3647,7 @@ export declare const joinText: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
3573
3647
|
}>;
|
|
3574
3648
|
/**
|
|
3575
3649
|
* A document's lists, as one **folded section** a reply carries collapsed
|
|
3576
|
-
* (
|
|
3650
|
+
* (2026-09-27).
|
|
3577
3651
|
*
|
|
3578
3652
|
* The producer the message outlets' `sections` in-port was built for: a
|
|
3579
3653
|
* planner's document is structure, and the person reading the reply wants its
|
|
@@ -3593,7 +3667,7 @@ export declare const listSection: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
3593
3667
|
sections: string;
|
|
3594
3668
|
/**
|
|
3595
3669
|
* The same lines as a markdown list, one `- ` item per line
|
|
3596
|
-
* (
|
|
3670
|
+
* (2026-09-28) — for a message whose BODY is the
|
|
3597
3671
|
* list: the Lair's beats row in the Sanctum. Empty when
|
|
3598
3672
|
* nothing was listed.
|
|
3599
3673
|
*/
|
|
@@ -3626,8 +3700,8 @@ export declare const listSection: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
3626
3700
|
} | undefined;
|
|
3627
3701
|
}>;
|
|
3628
3702
|
/**
|
|
3629
|
-
* A list, split into its **first** item and the **rest**, in order
|
|
3630
|
-
*
|
|
3703
|
+
* A list, split into its **first** item and the **rest**, in order
|
|
3704
|
+
* (2026-09-28).
|
|
3631
3705
|
*
|
|
3632
3706
|
* A data reference is `{node, port}` with no sub-path, and `parse-json@1`'s
|
|
3633
3707
|
* `path` selects a key or an index but never a tail — so a spec that treats
|
|
@@ -3833,14 +3907,14 @@ export declare const makeChoices: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
3833
3907
|
/**
|
|
3834
3908
|
* What the question is about, by name — stamped on the block
|
|
3835
3909
|
* as its `referent` and handed back by `read-answer@1` to the
|
|
3836
|
-
* run the press fires (
|
|
3910
|
+
* run the press fires (2026-09-27: the room the
|
|
3837
3911
|
* party knocked at). Blank or absent writes none.
|
|
3838
3912
|
*/
|
|
3839
3913
|
referent: string;
|
|
3840
3914
|
/**
|
|
3841
3915
|
* Where the question was asked **from**, by name — stamped on
|
|
3842
3916
|
* the block as its `vantage` and handed back by
|
|
3843
|
-
* `read-answer@1`, beside `referent` (
|
|
3917
|
+
* `read-answer@1`, beside `referent` (2026-09-30:
|
|
3844
3918
|
* the room the Lair's planner said the party stood in as
|
|
3845
3919
|
* they knocked). JSON because it is usually read off a
|
|
3846
3920
|
* model's document (`parse-json@1`'s `value`); anything but
|
|
@@ -3872,7 +3946,7 @@ export declare const readAnswer: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
3872
3946
|
question: string;
|
|
3873
3947
|
/**
|
|
3874
3948
|
* What the question was about, by name — the block's
|
|
3875
|
-
* `referent`, as the asking run stamped it
|
|
3949
|
+
* `referent`, as the asking run stamped it;
|
|
3876
3950
|
* empty when it named nothing, never null, so a write wired
|
|
3877
3951
|
* to it still offers the field at its review gate (a review
|
|
3878
3952
|
* form shows only the fields a payload carries).
|
|
@@ -3880,7 +3954,7 @@ export declare const readAnswer: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
3880
3954
|
referent: string;
|
|
3881
3955
|
/**
|
|
3882
3956
|
* Where the question was asked from, by name — the block's
|
|
3883
|
-
* `vantage`, as the asking run stamped it
|
|
3957
|
+
* `vantage`, as the asking run stamped it; null
|
|
3884
3958
|
* when it named nowhere.
|
|
3885
3959
|
*/
|
|
3886
3960
|
vantage: string;
|
|
@@ -3894,82 +3968,361 @@ export declare const readAnswer: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
3894
3968
|
slots?: Record<string, SlotDecl> | undefined;
|
|
3895
3969
|
}>;
|
|
3896
3970
|
/**
|
|
3897
|
-
*
|
|
3971
|
+
* 🚧 Lay a scene's messages out as text, one **transcript unit** per message
|
|
3972
|
+
* — the genre's own words for what a line and an aside look like (live
|
|
3973
|
+
* scenes §12.1, §14, 2026-10-13).
|
|
3898
3974
|
*
|
|
3899
|
-
*
|
|
3900
|
-
*
|
|
3901
|
-
*
|
|
3902
|
-
*
|
|
3975
|
+
* ## Why a template, and why it is the spec's
|
|
3976
|
+
*
|
|
3977
|
+
* A summary of the Lair has to say the Sanctum is talk the party never hear;
|
|
3978
|
+
* a summary of Chat has nothing to say about it. That difference is
|
|
3979
|
+
* presentation, so it is a template on this node's `template` slot, and the
|
|
3980
|
+
* shipped template is the summarize-scene spec's Default — a genre ships its
|
|
3981
|
+
* own by building its spec with `summarizeScene(…, { transcript })`, and an
|
|
3982
|
+
* admin edits it in the Pipelines view like any other template.
|
|
3983
|
+
*
|
|
3984
|
+
* ## The outlet
|
|
3985
|
+
*
|
|
3986
|
+
* `preamble` — the rendered `preamble` section, once. `units` — every
|
|
3987
|
+
* story line and aside in reading order (each aside after the story line it
|
|
3988
|
+
* is attached to), `{ messageId, text, tokens }`: the batch cut needs the
|
|
3989
|
+
* count, and the message id is what makes a draft traceable to its rows.
|
|
3990
|
+
* Pure: no model, no write. An empty span renders an empty `units`.
|
|
3991
|
+
* @experimental
|
|
3903
3992
|
*/
|
|
3904
|
-
export declare const
|
|
3993
|
+
export declare const renderTranscript: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
3905
3994
|
main: string;
|
|
3906
|
-
|
|
3995
|
+
preamble: string;
|
|
3996
|
+
units: string;
|
|
3907
3997
|
}, {
|
|
3998
|
+
/** The story's rows (`summarize-source@2`'s `messages`). */
|
|
3908
3999
|
messages: string;
|
|
4000
|
+
/** The aside rows (`summarize-source@2`'s `asides`). */
|
|
4001
|
+
asides: string;
|
|
4002
|
+
/**
|
|
4003
|
+
* The files by message, from `core:query/history-attachments@1`
|
|
4004
|
+
* over the story rows — `batch-messages@1`'s port, for its
|
|
4005
|
+
* reason: a message that is only a picture still reaches the
|
|
4006
|
+
* draft as something. Each story line's files are named into
|
|
4007
|
+
* the `line` section's `attachments`. Unwired, or a message
|
|
4008
|
+
* with no files, and the line renders as it would without.
|
|
4009
|
+
*/
|
|
3909
4010
|
attachments: string;
|
|
3910
|
-
|
|
4011
|
+
/**
|
|
4012
|
+
* 🚧 The aside rows' files by message, from a second
|
|
4013
|
+
* `core:query/history-attachments@1` over the asides (lane
|
|
4014
|
+
* E): each aside's files are named into the `aside`
|
|
4015
|
+
* section's `attachments`. Unwired, an aside renders as it
|
|
4016
|
+
* would without.
|
|
4017
|
+
*/
|
|
4018
|
+
asideAttachments: string;
|
|
4019
|
+
/** Who was present — the session's cast read. */
|
|
4020
|
+
cast: string;
|
|
4021
|
+
/**
|
|
4022
|
+
* The scene being summarized: its name, place and date where the
|
|
4023
|
+
* host knows them. Wired to the summarize request in the shipped
|
|
4024
|
+
* specs; the binding reads the request's `scene` field.
|
|
4025
|
+
*/
|
|
4026
|
+
scene: string;
|
|
4027
|
+
}, "core:task/render-transcript@1"> & {
|
|
3911
4028
|
kind: 'task';
|
|
3912
4029
|
slots?: {
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
readonly kind: "parameters";
|
|
3936
|
-
readonly facet: "weights";
|
|
3937
|
-
readonly schema: {
|
|
3938
|
-
/**
|
|
3939
|
-
* The chat half of a batch prompt, and only that half — the
|
|
3940
|
-
* template around it and the room the draft is written back
|
|
3941
|
-
* into are a reserve the binding adds on top, which is why
|
|
3942
|
-
* this can be raised right up to the window minus that
|
|
3943
|
-
* reserve and no further.
|
|
3944
|
-
*
|
|
3945
|
-
* ⚠ Bigger is not better. Long-context models degrade in the
|
|
3946
|
-
* middle, so this is a QUALITY point rather than a fraction
|
|
3947
|
-
* of whatever window happens to be available: nothing scales
|
|
3948
|
-
* it up to fill a large one, and the window is only ever a
|
|
3949
|
-
* ceiling on what an admin asks for.
|
|
3950
|
-
*
|
|
3951
|
-
* 2560 is 0.5's effective batch (`4096 - 1500`) at a round
|
|
3952
|
-
* 2.5 Ki, so arriving here re-tunes nobody.
|
|
3953
|
-
*/
|
|
3954
|
-
readonly batchTokens: {
|
|
3955
|
-
readonly type: "integer";
|
|
3956
|
-
readonly default: 2560;
|
|
3957
|
-
readonly label: {
|
|
3958
|
-
readonly en: "How much chat each batch holds";
|
|
4030
|
+
readonly template: {
|
|
4031
|
+
readonly kind: "template";
|
|
4032
|
+
readonly acceptedEngines: readonly [string];
|
|
4033
|
+
readonly facet: "templates";
|
|
4034
|
+
readonly variables: {
|
|
4035
|
+
readonly scene: {
|
|
4036
|
+
readonly type: 'object';
|
|
4037
|
+
readonly optional: true;
|
|
4038
|
+
readonly description: 'The scene, in `preamble`: its name, place and date when the host knows them.';
|
|
4039
|
+
readonly fields: {
|
|
4040
|
+
readonly name: {
|
|
4041
|
+
readonly type: 'string';
|
|
4042
|
+
readonly optional: true;
|
|
4043
|
+
};
|
|
4044
|
+
readonly place: {
|
|
4045
|
+
readonly type: 'string';
|
|
4046
|
+
readonly optional: true;
|
|
4047
|
+
};
|
|
4048
|
+
readonly date: {
|
|
4049
|
+
readonly type: 'string';
|
|
4050
|
+
readonly optional: true;
|
|
4051
|
+
};
|
|
3959
4052
|
};
|
|
3960
|
-
|
|
3961
|
-
|
|
4053
|
+
};
|
|
4054
|
+
readonly cast: {
|
|
4055
|
+
readonly type: 'list';
|
|
4056
|
+
readonly description: 'Who was present, in `preamble`, by name.';
|
|
4057
|
+
readonly of: {
|
|
4058
|
+
readonly type: 'object';
|
|
4059
|
+
readonly fields: {
|
|
4060
|
+
readonly name: {
|
|
4061
|
+
readonly type: 'string';
|
|
4062
|
+
};
|
|
4063
|
+
};
|
|
3962
4064
|
};
|
|
3963
4065
|
};
|
|
3964
|
-
readonly
|
|
3965
|
-
readonly type:
|
|
3966
|
-
readonly
|
|
3967
|
-
|
|
4066
|
+
readonly messageId: {
|
|
4067
|
+
readonly type: 'number';
|
|
4068
|
+
readonly description: 'In `line` and `aside`: the message this unit renders.';
|
|
4069
|
+
};
|
|
4070
|
+
readonly name: {
|
|
4071
|
+
readonly type: 'string';
|
|
4072
|
+
readonly description: 'In `line` and `aside`: who wrote the line, as the session names them.';
|
|
4073
|
+
};
|
|
4074
|
+
readonly role: {
|
|
4075
|
+
readonly type: 'string';
|
|
4076
|
+
readonly description: "In `line` and `aside`: 'user', 'assistant' or 'system'.";
|
|
4077
|
+
};
|
|
4078
|
+
readonly text: {
|
|
4079
|
+
readonly type: 'string';
|
|
4080
|
+
readonly description: "In `line` and `aside`: the message's text.";
|
|
4081
|
+
};
|
|
4082
|
+
readonly attachments: {
|
|
4083
|
+
readonly type: 'string';
|
|
4084
|
+
readonly description: "In `line` and `aside`: the files the message shows, each named on a line of its own — `[image: cat.png — a grey cat]`, `[file: notes.txt]` — carrying its own leading line break when the message has text, so it renders straight after `{{{text}}}`, as `place-attachments@1`'s does. Empty when the message shows none. A summary is drafted from text, so a file reaches it as its name.";
|
|
4085
|
+
};
|
|
4086
|
+
readonly channel: {
|
|
4087
|
+
readonly type: 'string';
|
|
4088
|
+
readonly description: 'In `aside`: the channel the row was written on — `sanctum`, `sanctum:2`.';
|
|
3968
4089
|
};
|
|
3969
4090
|
};
|
|
4091
|
+
readonly description: "How the transcript a summary is drafted from reads: three sections — the preamble, a story line, and an aside. Leave empty to use the built-in layout.";
|
|
3970
4092
|
};
|
|
3971
4093
|
} | undefined;
|
|
3972
4094
|
}>;
|
|
4095
|
+
/**
|
|
4096
|
+
* Cut a summary's material into batches — both pins on one export (04 §4b):
|
|
4097
|
+
* `C.batchMessages.v1(…)` cuts message rows, `C.batchMessages.v2(…)` cuts a
|
|
4098
|
+
* rendered transcript. `id` and `descriptor` stay `@1`'s; `@2`'s descriptor
|
|
4099
|
+
* rides its constructor (`typeof C.batchMessages.v2` types a binding).
|
|
4100
|
+
* @internal
|
|
4101
|
+
*/
|
|
4102
|
+
export declare const batchMessages: {
|
|
4103
|
+
id: "core:task/batch-messages@1";
|
|
4104
|
+
descriptor: import("@serene-pub/sdk").Descriptor<{
|
|
4105
|
+
main: string;
|
|
4106
|
+
batches: string;
|
|
4107
|
+
}, {
|
|
4108
|
+
messages: string;
|
|
4109
|
+
attachments: string;
|
|
4110
|
+
}, "core:task/batch-messages@1"> & {
|
|
4111
|
+
kind: 'task';
|
|
4112
|
+
slots?: {
|
|
4113
|
+
/**
|
|
4114
|
+
* The window the cut is clamped to — the same slot, by reference,
|
|
4115
|
+
* that the drafting step generates against.
|
|
4116
|
+
*
|
|
4117
|
+
* The context window belongs to the sampling config, never to a knob
|
|
4118
|
+
* on a node, and the executor resolves a `sampling` slot to
|
|
4119
|
+
* the config's switched-on *values* — so this stays a pure Task
|
|
4120
|
+
* reading data it was handed rather than a Query looking one up. Same
|
|
4121
|
+
* shape and same reason as `core:task/context-budget@1`.
|
|
4122
|
+
*
|
|
4123
|
+
* ⚠ Wire it as a REFERENCE to the drafting oracle's sampling slot
|
|
4124
|
+
* (`slot.samplingOf(...)`), not as a picker of its own. A batch cut
|
|
4125
|
+
* against one window and drafted against another is wrong in the
|
|
4126
|
+
* direction that overflows, silently — and unlike the assembled
|
|
4127
|
+
* context there is no truncation on this path to catch it, because
|
|
4128
|
+
* the batch prompt is injected whole.
|
|
4129
|
+
*/
|
|
4130
|
+
readonly sampling: {
|
|
4131
|
+
readonly kind: "sampling";
|
|
4132
|
+
readonly quick: true;
|
|
4133
|
+
};
|
|
4134
|
+
readonly params: {
|
|
4135
|
+
readonly kind: "parameters";
|
|
4136
|
+
readonly facet: "weights";
|
|
4137
|
+
readonly schema: {
|
|
4138
|
+
/**
|
|
4139
|
+
* The chat half of a batch prompt, and only that half — the
|
|
4140
|
+
* template around it and the room the draft is written back
|
|
4141
|
+
* into are a reserve the binding adds on top, which is why
|
|
4142
|
+
* this can be raised right up to the window minus that
|
|
4143
|
+
* reserve and no further.
|
|
4144
|
+
*
|
|
4145
|
+
* ⚠ Bigger is not better. Long-context models degrade in the
|
|
4146
|
+
* middle, so this is a QUALITY point rather than a fraction
|
|
4147
|
+
* of whatever window happens to be available: nothing scales
|
|
4148
|
+
* it up to fill a large one, and the window is only ever a
|
|
4149
|
+
* ceiling on what an admin asks for.
|
|
4150
|
+
*
|
|
4151
|
+
* 2560 is 0.5's effective batch (`4096 - 1500`) at a round
|
|
4152
|
+
* 2.5 Ki, so arriving here re-tunes nobody.
|
|
4153
|
+
*/
|
|
4154
|
+
readonly batchTokens: {
|
|
4155
|
+
readonly type: "integer";
|
|
4156
|
+
readonly default: 2560;
|
|
4157
|
+
readonly label: {
|
|
4158
|
+
readonly en: "How much chat each batch holds";
|
|
4159
|
+
};
|
|
4160
|
+
readonly description: {
|
|
4161
|
+
readonly en: "Tokens of chat one summary draft is written from. Capped by the drafting step’s Context Tokens, less room for the prompt and the draft itself.";
|
|
4162
|
+
};
|
|
4163
|
+
};
|
|
4164
|
+
readonly minBatchMessages: {
|
|
4165
|
+
readonly type: "integer";
|
|
4166
|
+
readonly default: 1;
|
|
4167
|
+
readonly description: "Never cut a batch smaller than this many messages.";
|
|
4168
|
+
};
|
|
4169
|
+
};
|
|
4170
|
+
};
|
|
4171
|
+
} | undefined;
|
|
4172
|
+
};
|
|
4173
|
+
v2: import("@serene-pub/sdk").NodeCtor<import("@serene-pub/sdk").Descriptor<{
|
|
4174
|
+
main: string;
|
|
4175
|
+
batches: string;
|
|
4176
|
+
}, {
|
|
4177
|
+
preamble: string;
|
|
4178
|
+
units: string;
|
|
4179
|
+
}, "core:task/batch-messages@2"> & {
|
|
4180
|
+
kind: 'task';
|
|
4181
|
+
slots?: {
|
|
4182
|
+
/**
|
|
4183
|
+
* The window the cut is clamped to — wired by REFERENCE to the
|
|
4184
|
+
* drafting step's sampling, for `@1`'s reason: a batch cut against
|
|
4185
|
+
* one window and drafted against another overflows silently.
|
|
4186
|
+
*/
|
|
4187
|
+
readonly sampling: {
|
|
4188
|
+
readonly kind: "sampling";
|
|
4189
|
+
readonly quick: true;
|
|
4190
|
+
};
|
|
4191
|
+
readonly params: {
|
|
4192
|
+
readonly kind: "parameters";
|
|
4193
|
+
readonly facet: "weights";
|
|
4194
|
+
readonly schema: {
|
|
4195
|
+
readonly batchTokens: {
|
|
4196
|
+
readonly type: "integer";
|
|
4197
|
+
readonly default: 2560;
|
|
4198
|
+
readonly label: {
|
|
4199
|
+
readonly en: "How much chat each batch holds";
|
|
4200
|
+
};
|
|
4201
|
+
readonly description: {
|
|
4202
|
+
readonly en: "Tokens of transcript one summary draft is written from. Capped by the drafting step’s Context Tokens, less room for the prompt and the draft itself.";
|
|
4203
|
+
};
|
|
4204
|
+
};
|
|
4205
|
+
readonly minBatchMessages: {
|
|
4206
|
+
readonly type: "integer";
|
|
4207
|
+
readonly default: 1;
|
|
4208
|
+
readonly description: "Never cut a batch smaller than this many messages.";
|
|
4209
|
+
};
|
|
4210
|
+
};
|
|
4211
|
+
};
|
|
4212
|
+
} | undefined;
|
|
4213
|
+
}> & {
|
|
4214
|
+
descriptor: import("@serene-pub/sdk").Descriptor<{
|
|
4215
|
+
main: string;
|
|
4216
|
+
batches: string;
|
|
4217
|
+
}, {
|
|
4218
|
+
preamble: string;
|
|
4219
|
+
units: string;
|
|
4220
|
+
}, "core:task/batch-messages@2"> & {
|
|
4221
|
+
kind: 'task';
|
|
4222
|
+
slots?: {
|
|
4223
|
+
/**
|
|
4224
|
+
* The window the cut is clamped to — wired by REFERENCE to the
|
|
4225
|
+
* drafting step's sampling, for `@1`'s reason: a batch cut against
|
|
4226
|
+
* one window and drafted against another overflows silently.
|
|
4227
|
+
*/
|
|
4228
|
+
readonly sampling: {
|
|
4229
|
+
readonly kind: "sampling";
|
|
4230
|
+
readonly quick: true;
|
|
4231
|
+
};
|
|
4232
|
+
readonly params: {
|
|
4233
|
+
readonly kind: "parameters";
|
|
4234
|
+
readonly facet: "weights";
|
|
4235
|
+
readonly schema: {
|
|
4236
|
+
readonly batchTokens: {
|
|
4237
|
+
readonly type: "integer";
|
|
4238
|
+
readonly default: 2560;
|
|
4239
|
+
readonly label: {
|
|
4240
|
+
readonly en: "How much chat each batch holds";
|
|
4241
|
+
};
|
|
4242
|
+
readonly description: {
|
|
4243
|
+
readonly en: "Tokens of transcript one summary draft is written from. Capped by the drafting step’s Context Tokens, less room for the prompt and the draft itself.";
|
|
4244
|
+
};
|
|
4245
|
+
};
|
|
4246
|
+
readonly minBatchMessages: {
|
|
4247
|
+
readonly type: "integer";
|
|
4248
|
+
readonly default: 1;
|
|
4249
|
+
readonly description: "Never cut a batch smaller than this many messages.";
|
|
4250
|
+
};
|
|
4251
|
+
};
|
|
4252
|
+
};
|
|
4253
|
+
} | undefined;
|
|
4254
|
+
};
|
|
4255
|
+
};
|
|
4256
|
+
v1: import("@serene-pub/sdk").NodeCtor<import("@serene-pub/sdk").Descriptor<{
|
|
4257
|
+
main: string;
|
|
4258
|
+
batches: string;
|
|
4259
|
+
}, {
|
|
4260
|
+
messages: string;
|
|
4261
|
+
attachments: string;
|
|
4262
|
+
}, "core:task/batch-messages@1"> & {
|
|
4263
|
+
kind: 'task';
|
|
4264
|
+
slots?: {
|
|
4265
|
+
/**
|
|
4266
|
+
* The window the cut is clamped to — the same slot, by reference,
|
|
4267
|
+
* that the drafting step generates against.
|
|
4268
|
+
*
|
|
4269
|
+
* The context window belongs to the sampling config, never to a knob
|
|
4270
|
+
* on a node, and the executor resolves a `sampling` slot to
|
|
4271
|
+
* the config's switched-on *values* — so this stays a pure Task
|
|
4272
|
+
* reading data it was handed rather than a Query looking one up. Same
|
|
4273
|
+
* shape and same reason as `core:task/context-budget@1`.
|
|
4274
|
+
*
|
|
4275
|
+
* ⚠ Wire it as a REFERENCE to the drafting oracle's sampling slot
|
|
4276
|
+
* (`slot.samplingOf(...)`), not as a picker of its own. A batch cut
|
|
4277
|
+
* against one window and drafted against another is wrong in the
|
|
4278
|
+
* direction that overflows, silently — and unlike the assembled
|
|
4279
|
+
* context there is no truncation on this path to catch it, because
|
|
4280
|
+
* the batch prompt is injected whole.
|
|
4281
|
+
*/
|
|
4282
|
+
readonly sampling: {
|
|
4283
|
+
readonly kind: "sampling";
|
|
4284
|
+
readonly quick: true;
|
|
4285
|
+
};
|
|
4286
|
+
readonly params: {
|
|
4287
|
+
readonly kind: "parameters";
|
|
4288
|
+
readonly facet: "weights";
|
|
4289
|
+
readonly schema: {
|
|
4290
|
+
/**
|
|
4291
|
+
* The chat half of a batch prompt, and only that half — the
|
|
4292
|
+
* template around it and the room the draft is written back
|
|
4293
|
+
* into are a reserve the binding adds on top, which is why
|
|
4294
|
+
* this can be raised right up to the window minus that
|
|
4295
|
+
* reserve and no further.
|
|
4296
|
+
*
|
|
4297
|
+
* ⚠ Bigger is not better. Long-context models degrade in the
|
|
4298
|
+
* middle, so this is a QUALITY point rather than a fraction
|
|
4299
|
+
* of whatever window happens to be available: nothing scales
|
|
4300
|
+
* it up to fill a large one, and the window is only ever a
|
|
4301
|
+
* ceiling on what an admin asks for.
|
|
4302
|
+
*
|
|
4303
|
+
* 2560 is 0.5's effective batch (`4096 - 1500`) at a round
|
|
4304
|
+
* 2.5 Ki, so arriving here re-tunes nobody.
|
|
4305
|
+
*/
|
|
4306
|
+
readonly batchTokens: {
|
|
4307
|
+
readonly type: "integer";
|
|
4308
|
+
readonly default: 2560;
|
|
4309
|
+
readonly label: {
|
|
4310
|
+
readonly en: "How much chat each batch holds";
|
|
4311
|
+
};
|
|
4312
|
+
readonly description: {
|
|
4313
|
+
readonly en: "Tokens of chat one summary draft is written from. Capped by the drafting step’s Context Tokens, less room for the prompt and the draft itself.";
|
|
4314
|
+
};
|
|
4315
|
+
};
|
|
4316
|
+
readonly minBatchMessages: {
|
|
4317
|
+
readonly type: "integer";
|
|
4318
|
+
readonly default: 1;
|
|
4319
|
+
readonly description: "Never cut a batch smaller than this many messages.";
|
|
4320
|
+
};
|
|
4321
|
+
};
|
|
4322
|
+
};
|
|
4323
|
+
} | undefined;
|
|
4324
|
+
}>;
|
|
4325
|
+
};
|
|
3973
4326
|
/** @experimental */
|
|
3974
4327
|
export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
3975
4328
|
main: string;
|
|
@@ -3980,8 +4333,8 @@ export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
3980
4333
|
changes: string;
|
|
3981
4334
|
scope: string;
|
|
3982
4335
|
/**
|
|
3983
|
-
* The **state version** the changes are deltas against
|
|
3984
|
-
*
|
|
4336
|
+
* The **state version** the changes are deltas against — the
|
|
4337
|
+
* session-state query's
|
|
3985
4338
|
* `version`, for every change that does not carry its own
|
|
3986
4339
|
* `base`. In `apply` mode a base behind the current version is
|
|
3987
4340
|
* **rebased**: a change whose slot is untouched since the base
|
|
@@ -3994,8 +4347,8 @@ export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
3994
4347
|
*/
|
|
3995
4348
|
base: string;
|
|
3996
4349
|
/**
|
|
3997
|
-
* **The row the WORLD's changes are filed at** (
|
|
3998
|
-
*
|
|
4350
|
+
* **The row the WORLD's changes are filed at** (2026-09-28): a
|
|
4351
|
+
* message this run wrote earlier, as that
|
|
3999
4352
|
* write's result. Optional, and only for world-owned changes
|
|
4000
4353
|
* (the session and its places); a cast member's change still
|
|
4001
4354
|
* files at that member's own latest line (the turn lock).
|
|
@@ -4042,12 +4395,12 @@ export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
4042
4395
|
} | undefined;
|
|
4043
4396
|
}>;
|
|
4044
4397
|
/**
|
|
4045
|
-
* A room name, unless something already describes it (
|
|
4046
|
-
*
|
|
4398
|
+
* A room name, unless something already describes it (2026-09-28; replaced
|
|
4399
|
+
* `core:task/unlisted-name@1`).
|
|
4047
4400
|
*
|
|
4048
4401
|
* The Lair's planner names the room the party are about to walk into when it
|
|
4049
4402
|
* thinks nobody has built it, and the turn stops to ask the dungeon's master
|
|
4050
|
-
* to describe it (owner ruling
|
|
4403
|
+
* to describe it (owner ruling, 2026-09-28: *ask, unless it is already
|
|
4051
4404
|
* described in prose or the lorebook*). This is the deterministic check after
|
|
4052
4405
|
* the planner's judgement. Lookups, in order; the first hit wins:
|
|
4053
4406
|
*
|
|
@@ -4076,7 +4429,7 @@ export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
4076
4429
|
* hard-codes a genre's slug: a spec that wants a side channel's prose to count
|
|
4077
4430
|
* reads it and names it here.
|
|
4078
4431
|
*
|
|
4079
|
-
* ## Which room is this one (
|
|
4432
|
+
* ## Which room is this one (2026-09-29)
|
|
4080
4433
|
*
|
|
4081
4434
|
* The same lookup answers the Lair's other question: *which room do the party
|
|
4082
4435
|
* stand in?* — the world's `location` stat, resolved against the rooms, so
|
|
@@ -4092,7 +4445,7 @@ export declare const setState: import("@serene-pub/sdk").Pinned<import("@serene-
|
|
|
4092
4445
|
* find a namesake. So a value with an `entryId` is answered by the listed
|
|
4093
4446
|
* entry with that id (`describedBy` `entry`), and by nothing when no
|
|
4094
4447
|
* listing holds it — archived, or hidden from this read.
|
|
4095
|
-
* - **`fallbackName`** (
|
|
4448
|
+
* - **`fallbackName`** (2026-09-30): what to look for when `name`
|
|
4096
4449
|
* (at `path`) names nothing — for the Lair, the room its planner said the
|
|
4097
4450
|
* party stood in as they knocked (the knock's `vantage`). The world's
|
|
4098
4451
|
* value wins and the hint stands in only while it names nothing: the
|
|
@@ -4119,7 +4472,7 @@ export declare const undescribedName: import("@serene-pub/sdk").Pinned<import("@
|
|
|
4119
4472
|
* `value`), or a document holding it at `path`; anything but a
|
|
4120
4473
|
* string is no name, and nothing is undescribed — save a lore
|
|
4121
4474
|
* reference (`{ entryId }`), which is the listed entry it
|
|
4122
|
-
* references
|
|
4475
|
+
* references.
|
|
4123
4476
|
*/
|
|
4124
4477
|
name: string;
|
|
4125
4478
|
/**
|
|
@@ -4187,8 +4540,8 @@ export declare const undescribedName: import("@serene-pub/sdk").Pinned<import("@
|
|
|
4187
4540
|
};
|
|
4188
4541
|
};
|
|
4189
4542
|
/**
|
|
4190
|
-
* Where the name is inside `name`, as a dotted path
|
|
4191
|
-
*
|
|
4543
|
+
* Where the name is inside `name`, as a dotted path — the
|
|
4544
|
+
* Lair reads `world.location` off a
|
|
4192
4545
|
* session-state document. Empty reads `name` itself.
|
|
4193
4546
|
*/
|
|
4194
4547
|
readonly path: {
|
|
@@ -4243,8 +4596,9 @@ export declare const undescribedName: import("@serene-pub/sdk").Pinned<import("@
|
|
|
4243
4596
|
*
|
|
4244
4597
|
* A spec wires `$.input.sessionScope` (or a literal) — something durable. The
|
|
4245
4598
|
* run's seed is a different string every turn and a pick keyed on it would
|
|
4246
|
-
* move between two questions. It is `scopeKey` and not `key` (
|
|
4247
|
-
* 2026-09-17, before anything shipped):
|
|
4599
|
+
* move between two questions. It is `scopeKey` and not `key` (a qualified
|
|
4600
|
+
* name, never the bare noun; named 2026-09-17, before anything shipped):
|
|
4601
|
+
* *key* alone is the option key on a
|
|
4248
4602
|
* choice, the identity a candidate is scored under, and a settings field's
|
|
4249
4603
|
* name, and this port is none of them — it is the scope the pick is made
|
|
4250
4604
|
* within.
|
|
@@ -4264,7 +4618,7 @@ export declare const pickByHash: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
4264
4618
|
/**
|
|
4265
4619
|
* Where it sat in the list **as handed in**, not among the
|
|
4266
4620
|
* identifiable entries. `pickIndex` rather than `index`
|
|
4267
|
-
* (
|
|
4621
|
+
* (qualified, never the bare noun): a bare *index* is a database index, a message's
|
|
4268
4622
|
* position and a list offset all at once.
|
|
4269
4623
|
*/
|
|
4270
4624
|
pickIndex: string;
|
|
@@ -4343,7 +4697,7 @@ export declare const pickByHash: import("@serene-pub/sdk").Pinned<import("@seren
|
|
|
4343
4697
|
*
|
|
4344
4698
|
* ## The key is a participant reference
|
|
4345
4699
|
*
|
|
4346
|
-
* `character:<id>`, the reference vocabulary
|
|
4700
|
+
* `character:<id>`, the reference vocabulary — not a name, which
|
|
4347
4701
|
* two cast members can share and an author can edit, and not a bare id, which
|
|
4348
4702
|
* says nothing about what it identifies. It survives the round trip: the key
|
|
4349
4703
|
* lands on the pressed option, `core:task/read-answer@1` publishes it as
|
|
@@ -4408,7 +4762,7 @@ export declare const castChoices: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
4408
4762
|
/**
|
|
4409
4763
|
* Which half of the room to leave out.
|
|
4410
4764
|
*
|
|
4411
|
-
* A persona is a character the player voices
|
|
4765
|
+
* A persona is a character the player voices, so
|
|
4412
4766
|
* both halves are cast members and which one a question
|
|
4413
4767
|
* is about depends entirely on the question: *who do you
|
|
4414
4768
|
* accuse* is asked about the suspects and must not offer
|
|
@@ -4457,7 +4811,7 @@ export declare const castChoices: import("@serene-pub/sdk").Pinned<import("@sere
|
|
|
4457
4811
|
* ## The gap it closes
|
|
4458
4812
|
*
|
|
4459
4813
|
* A junction branches on **one** port, and `equalsPath` compares two paths of
|
|
4460
|
-
* **one** document
|
|
4814
|
+
* **one** document. So the grammar can ask *is the accused the culprit?*
|
|
4461
4815
|
* only once something has put the accused and the culprit in the same
|
|
4462
4816
|
* document, and nothing in core did: no task merged two json ports, and the
|
|
4463
4817
|
* obvious repair — a second in-port on the junction — is not a repair, it is a
|
|
@@ -4541,4 +4895,394 @@ export declare const pair: import("@serene-pub/sdk").Pinned<import("@serene-pub/
|
|
|
4541
4895
|
};
|
|
4542
4896
|
} | undefined;
|
|
4543
4897
|
}>;
|
|
4898
|
+
/**
|
|
4899
|
+
* 🚧 Each picture, with its background removed — a **cut-out**.
|
|
4900
|
+
*
|
|
4901
|
+
* The step after `core:oracle/generate-image@1` when the pair could not draw a
|
|
4902
|
+
* transparent background itself (`cutOut: native-or-task`). The host runs a
|
|
4903
|
+
* local matting model (BiRefNet-lite, ONNX) over each picture and stores the
|
|
4904
|
+
* result as a new PNG with an alpha channel; the source picture is left as it
|
|
4905
|
+
* was.
|
|
4906
|
+
*
|
|
4907
|
+
* ## Same list in, same list out
|
|
4908
|
+
*
|
|
4909
|
+
* One item out per item in, in order. An item that was cut out is replaced by
|
|
4910
|
+
* a reference to its cut-out; every other field the item carried — its series
|
|
4911
|
+
* `key` included — travels across unchanged, so a keyed outlet downstream
|
|
4912
|
+
* files each cut-out under the label it was drawn for. An item that is not an
|
|
4913
|
+
* image passes through untouched.
|
|
4914
|
+
*
|
|
4915
|
+
* ## `mode`
|
|
4916
|
+
*
|
|
4917
|
+
* - `auto` (default) skips a picture that already has a transparent
|
|
4918
|
+
* background: its media meta says `transparent: 'native'` (the pair drew
|
|
4919
|
+
* it), it is itself a cut-out (`cutOutOf`), or its pixels already carry
|
|
4920
|
+
* transparency.
|
|
4921
|
+
* - `always` cuts every picture out, whatever it says about itself.
|
|
4922
|
+
* - `off` hands the list on unchanged — the switch a spec author flips to see
|
|
4923
|
+
* the raw pictures without rewiring.
|
|
4924
|
+
*
|
|
4925
|
+
* Pure given its input: the same pictures make the same cut-outs (the media
|
|
4926
|
+
* store dedupes identical bytes). The first run on a machine downloads the
|
|
4927
|
+
* matting model once, which is why the timeout is idle rather than wall.
|
|
4928
|
+
* @experimental
|
|
4929
|
+
*/
|
|
4930
|
+
export declare const cutOut: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
4931
|
+
main: string;
|
|
4932
|
+
media: string;
|
|
4933
|
+
}, {
|
|
4934
|
+
media: string;
|
|
4935
|
+
}, "core:task/cut-out@1"> & {
|
|
4936
|
+
kind: 'task';
|
|
4937
|
+
slots?: {
|
|
4938
|
+
readonly params: {
|
|
4939
|
+
readonly kind: "parameters";
|
|
4940
|
+
readonly schema: {
|
|
4941
|
+
readonly mode: {
|
|
4942
|
+
readonly type: "enum";
|
|
4943
|
+
readonly of: readonly ["auto", "always", "off"];
|
|
4944
|
+
readonly members: readonly [{
|
|
4945
|
+
readonly key: "auto";
|
|
4946
|
+
readonly label: {
|
|
4947
|
+
readonly en: "When needed";
|
|
4948
|
+
};
|
|
4949
|
+
readonly description: {
|
|
4950
|
+
readonly en: "Skips pictures that already have a transparent background.";
|
|
4951
|
+
};
|
|
4952
|
+
}, {
|
|
4953
|
+
readonly key: "always";
|
|
4954
|
+
readonly label: {
|
|
4955
|
+
readonly en: "Always";
|
|
4956
|
+
};
|
|
4957
|
+
readonly description: {
|
|
4958
|
+
readonly en: "Cuts every picture out, even one that is already transparent.";
|
|
4959
|
+
};
|
|
4960
|
+
}, {
|
|
4961
|
+
readonly key: "off";
|
|
4962
|
+
readonly label: {
|
|
4963
|
+
readonly en: "Off";
|
|
4964
|
+
};
|
|
4965
|
+
readonly description: {
|
|
4966
|
+
readonly en: "Hands the pictures on unchanged.";
|
|
4967
|
+
};
|
|
4968
|
+
}];
|
|
4969
|
+
readonly default: "auto";
|
|
4970
|
+
readonly quick: true;
|
|
4971
|
+
readonly description: "Which pictures get their background removed.";
|
|
4972
|
+
};
|
|
4973
|
+
};
|
|
4974
|
+
};
|
|
4975
|
+
} | undefined;
|
|
4976
|
+
}>;
|
|
4977
|
+
/**
|
|
4978
|
+
* 🚧 The pictures a **Sprite set fill** asks for — one image series item per
|
|
4979
|
+
* sprite label.
|
|
4980
|
+
*
|
|
4981
|
+
* Each item is `{ key, vars }`:
|
|
4982
|
+
*
|
|
4983
|
+
* - `key` is the label made filename-safe (trimmed, case-folded, spaces to
|
|
4984
|
+
* `-`, anything else dropped, collisions suffixed `joy`, `joy-2`). A key
|
|
4985
|
+
* is an address, never prose: the picture's description comes from
|
|
4986
|
+
* `vars.labelPhrase`, never from the key.
|
|
4987
|
+
* - `vars.label` is the sprite label as the card spells it, which is what
|
|
4988
|
+
* `core:outlet/attach-sprite@1` files the picture under.
|
|
4989
|
+
* - `vars.labelPhrase` is the label's **sprite label phrase** — the
|
|
4990
|
+
* `phrases` prompt field, one `label: phrase` per line (*Sprite label
|
|
4991
|
+
* phrases*, editable like any prompt row). A label with no line falls back
|
|
4992
|
+
* to the label word itself.
|
|
4993
|
+
* - `vars.likeness` / `vars.likenessNegative` carry the card's likeness, so
|
|
4994
|
+
* the picture step's prompt rows can say `{{likeness}}` per item.
|
|
4995
|
+
*
|
|
4996
|
+
* The phrases and the sprite picker's labels stay two vocabularies, never
|
|
4997
|
+
* merged: the picker never reads a phrase. Pure given its input — no read, no call.
|
|
4998
|
+
* @experimental
|
|
4999
|
+
*/
|
|
5000
|
+
export declare const buildSpriteSeries: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5001
|
+
main: string;
|
|
5002
|
+
series: string;
|
|
5003
|
+
/** The labels kept, in order — blanks and repeats dropped. */
|
|
5004
|
+
labels: string;
|
|
5005
|
+
}, {
|
|
5006
|
+
/** The sprite labels to draw, as the card spells them. */
|
|
5007
|
+
labels: string;
|
|
5008
|
+
likeness: string;
|
|
5009
|
+
likenessNegative: string;
|
|
5010
|
+
}, "core:task/build-sprite-series@1"> & {
|
|
5011
|
+
kind: 'task';
|
|
5012
|
+
slots?: {
|
|
5013
|
+
readonly prompts: {
|
|
5014
|
+
readonly kind: "prompts";
|
|
5015
|
+
readonly quick: true;
|
|
5016
|
+
readonly facet: "prompts";
|
|
5017
|
+
readonly description: "How each sprite label is described to the picture model: one \"label: phrase\" per line.";
|
|
5018
|
+
readonly fields: {
|
|
5019
|
+
readonly phrases: {
|
|
5020
|
+
readonly type: "text";
|
|
5021
|
+
};
|
|
5022
|
+
};
|
|
5023
|
+
};
|
|
5024
|
+
} | undefined;
|
|
5025
|
+
}>;
|
|
5026
|
+
/**
|
|
5027
|
+
* 🚧 **Proofs** — *n* identical pictures to choose from, as an image
|
|
5028
|
+
* series. A photographer's proof prints: the
|
|
5029
|
+
* same shot several times, one kept. Not a retrieval **candidate**, which is
|
|
5030
|
+
* something that might reach a prompt.
|
|
5031
|
+
*
|
|
5032
|
+
* Each item is `{ key, vars: {} }` with keys `"1"` … `"n"`: the same picture
|
|
5033
|
+
* asked for *n* times, so every item renders the same prompt. That sameness
|
|
5034
|
+
* is what lets the host pack the series as ONE batch call on a pair whose
|
|
5035
|
+
* drawing sheet takes `perCall ≥ n` (a hosted API's `n`, a ComfyUI graph's
|
|
5036
|
+
* batch size); a pair that draws one picture per call loops. The spec never
|
|
5037
|
+
* knows which.
|
|
5038
|
+
*
|
|
5039
|
+
* `count` is read as a whole number and clamped to 1–8 (the default
|
|
5040
|
+
* `seriesMax`); anything that is not a number is 1. The Portrait form offers
|
|
5041
|
+
* 1–4. Pure given its input — no read, no call.
|
|
5042
|
+
* @experimental
|
|
5043
|
+
*/
|
|
5044
|
+
export declare const buildProofs: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5045
|
+
main: string;
|
|
5046
|
+
series: string;
|
|
5047
|
+
}, {
|
|
5048
|
+
/** How many pictures: a whole number, clamped to 1–8. */
|
|
5049
|
+
count: string;
|
|
5050
|
+
}, "core:task/build-proofs@1"> & {
|
|
5051
|
+
kind: 'task';
|
|
5052
|
+
slots?: Record<string, SlotDecl> | undefined;
|
|
5053
|
+
}>;
|
|
5054
|
+
/**
|
|
5055
|
+
* 🚧 A model's reply, cleaned into a picture prompt — the step between the
|
|
5056
|
+
* Scene action's **scene prompt** (a quiet text call asked for a tag list)
|
|
5057
|
+
* and the picture step.
|
|
5058
|
+
*
|
|
5059
|
+
* A text model asked for "a comma-separated tag list and nothing else"
|
|
5060
|
+
* still answers with a fence, a `Prompt:` label, quotes round the whole
|
|
5061
|
+
* line or a list one tag per line. Each is undone here: fences and the
|
|
5062
|
+
* label dropped, wrapping quotes stripped, line breaks and bullets turned
|
|
5063
|
+
* into commas, empty tags and repeated commas and spaces collapsed, a
|
|
5064
|
+
* trailing full stop removed. Prose survives as prose — only its line
|
|
5065
|
+
* breaks become commas. Pure: no read, no model.
|
|
5066
|
+
*
|
|
5067
|
+
* An empty result halts: a picture of nothing is not a picture.
|
|
5068
|
+
* @experimental
|
|
5069
|
+
*/
|
|
5070
|
+
export declare const cleanImagePrompt: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5071
|
+
main: string;
|
|
5072
|
+
prompt: string;
|
|
5073
|
+
}, {
|
|
5074
|
+
text: string;
|
|
5075
|
+
}, "core:task/clean-image-prompt@1"> & {
|
|
5076
|
+
kind: 'task';
|
|
5077
|
+
slots?: Record<string, SlotDecl> | undefined;
|
|
5078
|
+
}>;
|
|
5079
|
+
/**
|
|
5080
|
+
* 🚧 Where the Scene action's picture goes — its **placement**: posted as a
|
|
5081
|
+
* message, set as the session's backdrop, or both.
|
|
5082
|
+
*
|
|
5083
|
+
* The `placement` parameter is the admin's (Admin › Pipelines, the Scene
|
|
5084
|
+
* pipeline's config); a press may name its own in its payload
|
|
5085
|
+
* (`{ placement: 'backdrop' }` — the Backdrop widget's *Illustrate*), and a
|
|
5086
|
+
* named one wins. Published as two flags, `message` and `backdrop`, because
|
|
5087
|
+
* a junction branch reads one truthy value: each outlet sits behind its own.
|
|
5088
|
+
* Pure: no read, no model.
|
|
5089
|
+
* @experimental
|
|
5090
|
+
*/
|
|
5091
|
+
export declare const picturePlacement: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5092
|
+
main: string;
|
|
5093
|
+
/** `message`, `backdrop` or `both` — what was decided. */
|
|
5094
|
+
placement: string;
|
|
5095
|
+
/** True when the picture is posted as a message. */
|
|
5096
|
+
message: string;
|
|
5097
|
+
/** True when the picture is set as the backdrop. */
|
|
5098
|
+
backdrop: string;
|
|
5099
|
+
}, {
|
|
5100
|
+
/** The press's payload; its `placement`, when one of the three, wins. */
|
|
5101
|
+
payload: string;
|
|
5102
|
+
}, "core:task/picture-placement@1"> & {
|
|
5103
|
+
kind: 'task';
|
|
5104
|
+
slots?: {
|
|
5105
|
+
readonly params: {
|
|
5106
|
+
readonly kind: "parameters";
|
|
5107
|
+
readonly facet: "behavior";
|
|
5108
|
+
readonly schema: {
|
|
5109
|
+
readonly placement: {
|
|
5110
|
+
readonly type: "enum";
|
|
5111
|
+
readonly of: readonly ["message", "backdrop", "both"];
|
|
5112
|
+
readonly members: readonly [{
|
|
5113
|
+
readonly key: "message";
|
|
5114
|
+
readonly label: {
|
|
5115
|
+
readonly en: "Post it";
|
|
5116
|
+
};
|
|
5117
|
+
readonly description: {
|
|
5118
|
+
readonly en: "Posts the picture in the session as a message.";
|
|
5119
|
+
};
|
|
5120
|
+
}, {
|
|
5121
|
+
readonly key: "backdrop";
|
|
5122
|
+
readonly label: {
|
|
5123
|
+
readonly en: "Backdrop";
|
|
5124
|
+
};
|
|
5125
|
+
readonly description: {
|
|
5126
|
+
readonly en: "Sets the picture as the session's backdrop, and posts nothing.";
|
|
5127
|
+
};
|
|
5128
|
+
}, {
|
|
5129
|
+
readonly key: "both";
|
|
5130
|
+
readonly label: {
|
|
5131
|
+
readonly en: "Both";
|
|
5132
|
+
};
|
|
5133
|
+
readonly description: {
|
|
5134
|
+
readonly en: "Posts the picture and sets it as the backdrop.";
|
|
5135
|
+
};
|
|
5136
|
+
}];
|
|
5137
|
+
readonly default: "both";
|
|
5138
|
+
readonly label: {
|
|
5139
|
+
readonly en: "Placement";
|
|
5140
|
+
};
|
|
5141
|
+
readonly description: "Where the picture goes. A press that names its own placement uses that.";
|
|
5142
|
+
};
|
|
5143
|
+
};
|
|
5144
|
+
};
|
|
5145
|
+
} | undefined;
|
|
5146
|
+
}>;
|
|
5147
|
+
/**
|
|
5148
|
+
* 🚧 A **clock step**: how far the story clock moves, decided — `{ by, unit }`
|
|
5149
|
+
* and whether it moves at all (2026-10-13, PROPOSAL-live-scenes §6).
|
|
5150
|
+
*
|
|
5151
|
+
* Two uses, one shape. *Time passes…* hands it the press's collected
|
|
5152
|
+
* `step` (`input.clockStep`), which wins. Chat's reply hands it nothing and
|
|
5153
|
+
* reads its own parameters — **By** (0, the default, is off) and **Unit** —
|
|
5154
|
+
* exposed as the session setting *Each reply advances the clock by …*. Either
|
|
5155
|
+
* way the step publishes `moves` (true when `by` is a whole number other than
|
|
5156
|
+
* zero), and the *Advance story clock* outlet sits behind a junction on it,
|
|
5157
|
+
* so a step of nothing is never written and never refused. Pure: no read, no
|
|
5158
|
+
* model, never the clock itself.
|
|
5159
|
+
* @experimental
|
|
5160
|
+
*/
|
|
5161
|
+
export declare const clockStep: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5162
|
+
main: string;
|
|
5163
|
+
/** True when the clock moves: `by` is a whole number other than zero. */
|
|
5164
|
+
moves: string;
|
|
5165
|
+
/** The signed amount — what *Advance story clock* takes on its `by` port. */
|
|
5166
|
+
by: string;
|
|
5167
|
+
/** The unit — what *Advance story clock* takes on its `unit` port. */
|
|
5168
|
+
unit: string;
|
|
5169
|
+
}, {
|
|
5170
|
+
/** A collected step, `{ by, unit }` — wins over the parameters when it reads. */
|
|
5171
|
+
step: string;
|
|
5172
|
+
/**
|
|
5173
|
+
* When truthy, the clock does not move (`moves` false). Chat's
|
|
5174
|
+
* reply wires the row it re-drives (`input.messageId`), so a
|
|
5175
|
+
* regenerate, a swipe or an extend never ticks the clock twice.
|
|
5176
|
+
*/
|
|
5177
|
+
unless: string;
|
|
5178
|
+
}, "core:task/clock-step@1"> & {
|
|
5179
|
+
kind: 'task';
|
|
5180
|
+
slots?: {
|
|
5181
|
+
readonly params: {
|
|
5182
|
+
readonly kind: "parameters";
|
|
5183
|
+
readonly facet: "behavior";
|
|
5184
|
+
readonly schema: {
|
|
5185
|
+
readonly by: {
|
|
5186
|
+
readonly type: "integer";
|
|
5187
|
+
readonly default: 0;
|
|
5188
|
+
readonly label: {
|
|
5189
|
+
readonly en: "By";
|
|
5190
|
+
};
|
|
5191
|
+
readonly description: {
|
|
5192
|
+
readonly en: "How many units the clock moves. 0 moves nothing; negative goes back.";
|
|
5193
|
+
};
|
|
5194
|
+
};
|
|
5195
|
+
readonly unit: {
|
|
5196
|
+
readonly type: "enum";
|
|
5197
|
+
readonly of: readonly ["minutes", "hours", "days", "months", "years"];
|
|
5198
|
+
readonly members: readonly [{
|
|
5199
|
+
readonly key: "minutes";
|
|
5200
|
+
readonly label: {
|
|
5201
|
+
readonly en: "Minutes";
|
|
5202
|
+
};
|
|
5203
|
+
}, {
|
|
5204
|
+
readonly key: "hours";
|
|
5205
|
+
readonly label: {
|
|
5206
|
+
readonly en: "Hours";
|
|
5207
|
+
};
|
|
5208
|
+
}, {
|
|
5209
|
+
readonly key: "days";
|
|
5210
|
+
readonly label: {
|
|
5211
|
+
readonly en: "Days";
|
|
5212
|
+
};
|
|
5213
|
+
}, {
|
|
5214
|
+
readonly key: "months";
|
|
5215
|
+
readonly label: {
|
|
5216
|
+
readonly en: "Months";
|
|
5217
|
+
};
|
|
5218
|
+
}, {
|
|
5219
|
+
readonly key: "years";
|
|
5220
|
+
readonly label: {
|
|
5221
|
+
readonly en: "Years";
|
|
5222
|
+
};
|
|
5223
|
+
}];
|
|
5224
|
+
readonly default: "minutes";
|
|
5225
|
+
readonly label: {
|
|
5226
|
+
readonly en: "Unit";
|
|
5227
|
+
};
|
|
5228
|
+
readonly description: {
|
|
5229
|
+
readonly en: "What to count.";
|
|
5230
|
+
};
|
|
5231
|
+
};
|
|
5232
|
+
};
|
|
5233
|
+
};
|
|
5234
|
+
} | undefined;
|
|
5235
|
+
}>;
|
|
5236
|
+
/**
|
|
5237
|
+
* **Run a script** — the script step (2026-10-12).
|
|
5238
|
+
*
|
|
5239
|
+
* The node itself does nothing: it passes its input through to `main`, and
|
|
5240
|
+
* the `core:script:data/transform@1` scripts attached after `main` transform
|
|
5241
|
+
* it in order, each handed the value the one before returned. That is what
|
|
5242
|
+
* lets an admin write a custom task in-app without a plugin — the body is a
|
|
5243
|
+
* sandboxed script, the contract is JSON in, JSON out.
|
|
5244
|
+
* @experimental
|
|
5245
|
+
*/
|
|
5246
|
+
export declare const runScript: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
|
|
5247
|
+
main: string;
|
|
5248
|
+
}, {
|
|
5249
|
+
input: string;
|
|
5250
|
+
}, "core:task/run-script@1"> & {
|
|
5251
|
+
kind: 'task';
|
|
5252
|
+
slots?: {
|
|
5253
|
+
readonly scripts: {
|
|
5254
|
+
readonly kind: "scripts";
|
|
5255
|
+
readonly accepts: ["core:script:data/transform@1"];
|
|
5256
|
+
readonly port: "main";
|
|
5257
|
+
readonly phase: "after";
|
|
5258
|
+
readonly description: "The script, or scripts, this step runs over its input. Each is handed the value the one before returned.";
|
|
5259
|
+
};
|
|
5260
|
+
/**
|
|
5261
|
+
* The time each script in the chain may take.
|
|
5262
|
+
* Read by the HOST's script applier off the scope chain, not by the
|
|
5263
|
+
* binding — the binding never sees the chain. A script past it is
|
|
5264
|
+
* stopped and recorded `err` with the time in its reason, and the
|
|
5265
|
+
* value it was handed goes on. Unset, the seam default applies (the
|
|
5266
|
+
* same 250 ms).
|
|
5267
|
+
*/
|
|
5268
|
+
readonly params: {
|
|
5269
|
+
readonly kind: "parameters";
|
|
5270
|
+
readonly facet: "weights";
|
|
5271
|
+
readonly schema: {
|
|
5272
|
+
readonly budgetMs: {
|
|
5273
|
+
readonly type: "integer";
|
|
5274
|
+
readonly min: 1;
|
|
5275
|
+
readonly max: 1000;
|
|
5276
|
+
readonly default: 250;
|
|
5277
|
+
readonly label: {
|
|
5278
|
+
readonly en: "Script time limit (ms)";
|
|
5279
|
+
};
|
|
5280
|
+
readonly description: {
|
|
5281
|
+
readonly en: "How long each script in this step may run. A script that runs longer is stopped, and the value it was handed goes on unchanged.";
|
|
5282
|
+
};
|
|
5283
|
+
};
|
|
5284
|
+
};
|
|
5285
|
+
};
|
|
5286
|
+
} | undefined;
|
|
5287
|
+
}>;
|
|
4544
5288
|
//# sourceMappingURL=tasks.d.ts.map
|