@serene-pub/contracts 0.6.0-pr-7 → 0.6.0-pr-9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tasks.d.ts CHANGED
@@ -1480,6 +1480,15 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1480
1480
  * records.
1481
1481
  */
1482
1482
  decisions: string;
1483
+ /**
1484
+ * 🚧 Optional: the summaries of earlier scenes, fed only by
1485
+ * `core:query/earlier-scenes@1`'s `main`. Unwired, the block is
1486
+ * empty and the prompt is what it was. The binding renders into
1487
+ * `earlierScenes` only the scenes whose first line is older than
1488
+ * the first line the prompt keeps, newest first under
1489
+ * `maxTokens`, and its transcript fit counts the block.
1490
+ */
1491
+ earlierScenes: string;
1483
1492
  /**
1484
1493
  * The finished chat lines, from `core:task/process-messages@1`.
1485
1494
  *
@@ -1571,11 +1580,21 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1571
1580
  readonly optional: true;
1572
1581
  readonly description: 'History entries that fit the budget, laid out.';
1573
1582
  };
1583
+ readonly earlierScenes: {
1584
+ readonly type: 'string';
1585
+ readonly optional: true;
1586
+ readonly description: 'The summaries of earlier scenes whose lines are no longer in the prompt, laid out.';
1587
+ };
1574
1588
  readonly currentDate: {
1575
1589
  readonly type: 'string';
1576
1590
  readonly optional: true;
1577
1591
  readonly description: 'The story’s current date, laid out.';
1578
1592
  };
1593
+ readonly storyCalendar: {
1594
+ readonly type: 'string';
1595
+ readonly optional: true;
1596
+ readonly description: 'The lorebook’s calendar, laid out — absent for a free-form book.';
1597
+ };
1579
1598
  readonly sessionMessages: {
1580
1599
  readonly type: 'list';
1581
1600
  readonly description: 'The transcript, oldest first, ending with the seed line.';
@@ -1727,7 +1746,9 @@ export declare const assemble: import("@serene-pub/sdk").Pinned<import("@serene-
1727
1746
  readonly worldLore: "core:var/world-lore@1";
1728
1747
  readonly characterLore: "core:var/character-lore@1";
1729
1748
  readonly history: "core:var/history@1";
1749
+ readonly earlierScenes: "core:var/earlier-scenes@1";
1730
1750
  readonly currentDate: "core:var/current-date@1";
1751
+ readonly storyCalendar: "core:var/story-calendar@1";
1731
1752
  };
1732
1753
  /**
1733
1754
  * Open (typed templates, edited in place by owner ruling):
@@ -3319,7 +3340,8 @@ export declare const turnNarrator: import("@serene-pub/sdk").Pinned<import("@ser
3319
3340
  * genre's narrate action; a plain narrator reply when unset), unless a
3320
3341
  * narration already landed since the person's line.
3321
3342
  *
3322
- * `modes` is `{ 'side-cast': …, 'narrator-interjections': … }` — `full` or
3343
+ * `modes` is `{ 'side-cast': …, 'narrator-interjections': … }` (plus `narrator-every`,
3344
+ * 1–3: the narrator's cadence in rounds; absent = every round) — `full` or
3323
3345
  * `off` each, the genre's voices settings as the turn-order spec reads them
3324
3346
  * (`core:script/unprompted-modes`, 2026-10-20; was the retired background
3325
3347
  * tasks' modes); a key absent or `off` adds nothing, so the order passes
@@ -3407,7 +3429,7 @@ export declare const turnPool: import("@serene-pub/sdk").Pinned<import("@serene-
3407
3429
  readonly en: "All";
3408
3430
  };
3409
3431
  readonly description: {
3410
- readonly en: "Ones switched off in the cast too.";
3432
+ readonly en: "The same as Active today, kept so presets that name it still load. A benched character never takes a turn.";
3411
3433
  };
3412
3434
  }, {
3413
3435
  readonly key: "none";
@@ -3420,7 +3442,7 @@ export declare const turnPool: import("@serene-pub/sdk").Pinned<import("@serene-
3420
3442
  readonly en: "Characters";
3421
3443
  };
3422
3444
  readonly description: {
3423
- readonly en: "Which of the session's characters may take a turn. 'All' admits ones switched off in the cast; a removed character never is.";
3445
+ readonly en: "Which of the session's characters may take a turn. A benched or removed character never does, whichever is picked; 'All' is the same as 'Active'.";
3424
3446
  };
3425
3447
  };
3426
3448
  readonly personas: {
@@ -5213,12 +5235,12 @@ export declare const picturePlacement: import("@serene-pub/sdk").Pinned<import("
5213
5235
  * and whether it moves at all (2026-10-13, PROPOSAL-live-scenes §6).
5214
5236
  *
5215
5237
  * Two uses, one shape. *Time passes…* hands it the press's collected
5216
- * `step` (`input.clockStep`), which wins. Chat's reply hands it nothing and
5217
- * reads its own parameters — **By** (0, the default, is off) and **Unit** —
5218
- * exposed as the session setting *Each reply advances the clock by …*. Either
5219
- * way the step publishes `moves` (true when `by` is a whole number other than
5220
- * zero), and the *Advance story clock* outlet sits behind a junction on it,
5221
- * so a step of nothing is never written and never refused. Pure: no read, no
5238
+ * `step` (`input.clockStep`), which wins. The round tick and the Lair's
5239
+ * keeper hand it the round worth's `step` (`core:query/round-worth@1`). Its
5240
+ * own **By** (0, the default, is off) and **Unit** answer when nothing is
5241
+ * handed. Either way the step publishes `moves` (true when `by` is a whole
5242
+ * number other than zero), and the *Advance story clock* outlet sits behind a
5243
+ * junction on it, so a step of nothing is never written and never refused. Pure: no read, no
5222
5244
  * model, never the clock itself.
5223
5245
  * @experimental
5224
5246
  */
@@ -5234,9 +5256,10 @@ export declare const clockStep: import("@serene-pub/sdk").Pinned<import("@serene
5234
5256
  /** A collected step, `{ by, unit }` — wins over the parameters when it reads. */
5235
5257
  step: string;
5236
5258
  /**
5237
- * When truthy, the clock does not move (`moves` false). Chat's
5238
- * reply wires the row it re-drives (`input.messageId`), so a
5239
- * regenerate, a swipe or an extend never ticks the clock twice.
5259
+ * When truthy, the clock does not move (`moves` false). Nothing in
5260
+ * core wires it since 2026-11-11; a pipeline that re-drives a row
5261
+ * wires it (`input.messageId`) so a regenerate never moves the
5262
+ * clock twice.
5240
5263
  */
5241
5264
  unless: string;
5242
5265
  }, "core:task/clock-step@1"> & {
@@ -5639,7 +5662,7 @@ export declare const reckoningDuties: import("@serene-pub/sdk").Pinned<import("@
5639
5662
  * JSON call every few turns that looks back over the story and files what is
5640
5663
  * worth keeping. Each duty is a switch; the routine's mode decides whether
5641
5664
  * what it files is written (`full`) or held for review (`review`). Publishes
5642
- * `modes` keyed `summary`, `lore`, `cast`, `relationships`, `world-state`,
5665
+ * `modes` keyed `lore`, `cast`, `relationships`, `world-state`,
5643
5666
  * `scenes`, `goals`, `goal-reached`, `scene-moved-on` — the keys the sweep's scripts and
5644
5667
  * junctions read — and `any`. Duties that write a lorebook read Off in a
5645
5668
  * session with none. *Mark goals reached* (`goal-reached`) is read by the
@@ -5668,17 +5691,6 @@ export declare const sweepDuties: import("@serene-pub/sdk").Pinned<import("@sere
5668
5691
  readonly kind: "parameters";
5669
5692
  readonly facet: "behavior";
5670
5693
  readonly schema: {
5671
- summary: {
5672
- type: 'boolean';
5673
- default: boolean;
5674
- reach: 'owner';
5675
- label: {
5676
- en: string;
5677
- };
5678
- description: {
5679
- en: string;
5680
- };
5681
- };
5682
5694
  lore: {
5683
5695
  type: 'boolean';
5684
5696
  default: boolean;
@@ -5999,7 +6011,7 @@ export declare const cueLines: import("@serene-pub/sdk").Pinned<import("@serene-
5999
6011
  * comment the message renderer never shows, even while the reply streams. This step takes every such block out of
6000
6012
  * the reply (`text`, what is saved) and reads the last one: `make` is `'character'`, `'lorebook'` or `''`, and
6001
6013
  * `draft` its JSON, for `create-character@1` / `create-lorebook@1` behind a junction on `make`. One model call per
6002
- * turn — the reply's own — and no tool loop. Pure (the SDK's `readLibraryDraft`). ⚠ Not `parse-json@1` (a whole reply
6014
+ * turn — the reply's own — and no tool loop. Also turns a plain `See: /docs/<path>` line into a markdown link. Pure (the SDK's `readLibraryDraft`). ⚠ Not `parse-json@1` (a whole reply
6003
6015
  * read as JSON) and not `parse-tool-call@1`.
6004
6016
  * @experimental
6005
6017
  */
package/dist/tasks.js CHANGED
@@ -1155,7 +1155,17 @@ const ASSEMBLE_TEMPLATE_SCOPE = {
1155
1155
  description: 'Lore bound to a cast member that fit the budget, laid out — only what this speaker may see.',
1156
1156
  },
1157
1157
  history: { type: 'string', optional: true, description: 'History entries that fit the budget, laid out.' },
1158
+ earlierScenes: {
1159
+ type: 'string',
1160
+ optional: true,
1161
+ description: 'The summaries of earlier scenes whose lines are no longer in the prompt, laid out.',
1162
+ },
1158
1163
  currentDate: { type: 'string', optional: true, description: 'The story’s current date, laid out.' },
1164
+ storyCalendar: {
1165
+ type: 'string',
1166
+ optional: true,
1167
+ description: 'The lorebook’s calendar, laid out — absent for a free-form book.',
1168
+ },
1159
1169
  sessionMessages: {
1160
1170
  type: 'list',
1161
1171
  description: 'The transcript, oldest first, ending with the seed line.',
@@ -1285,7 +1295,9 @@ export const assemble = pin(describeTaskDefinition({
1285
1295
  worldLore: 'core:var/world-lore@1',
1286
1296
  characterLore: 'core:var/character-lore@1',
1287
1297
  history: 'core:var/history@1',
1298
+ earlierScenes: 'core:var/earlier-scenes@1',
1288
1299
  currentDate: 'core:var/current-date@1',
1300
+ storyCalendar: 'core:var/story-calendar@1',
1289
1301
  },
1290
1302
  /**
1291
1303
  * Open (typed templates, edited in place by owner ruling):
@@ -1435,6 +1447,15 @@ export const assemble = pin(describeTaskDefinition({
1435
1447
  * records.
1436
1448
  */
1437
1449
  decisions: S.decisions,
1450
+ /**
1451
+ * 🚧 Optional: the summaries of earlier scenes, fed only by
1452
+ * `core:query/earlier-scenes@1`'s `main`. Unwired, the block is
1453
+ * empty and the prompt is what it was. The binding renders into
1454
+ * `earlierScenes` only the scenes whose first line is older than
1455
+ * the first line the prompt keeps, newest first under
1456
+ * `maxTokens`, and its transcript fit counts the block.
1457
+ */
1458
+ earlierScenes: S.json,
1438
1459
  /**
1439
1460
  * The finished chat lines, from `core:task/process-messages@1`.
1440
1461
  *
@@ -2786,7 +2807,8 @@ export const turnNarrator = pin(turnStrategy('core:task/turn-narrator@1', 'Narra
2786
2807
  * genre's narrate action; a plain narrator reply when unset), unless a
2787
2808
  * narration already landed since the person's line.
2788
2809
  *
2789
- * `modes` is `{ 'side-cast': …, 'narrator-interjections': … }` — `full` or
2810
+ * `modes` is `{ 'side-cast': …, 'narrator-interjections': … }` (plus `narrator-every`,
2811
+ * 1–3: the narrator's cadence in rounds; absent = every round) — `full` or
2790
2812
  * `off` each, the genre's voices settings as the turn-order spec reads them
2791
2813
  * (`core:script/unprompted-modes`, 2026-10-20; was the retired background
2792
2814
  * tasks' modes); a key absent or `off` adds nothing, so the order passes
@@ -2865,14 +2887,16 @@ export const turnPool = pin(describeTaskDefinition({
2865
2887
  {
2866
2888
  key: 'all',
2867
2889
  label: { en: 'All' },
2868
- description: { en: 'Ones switched off in the cast too.' },
2890
+ description: {
2891
+ en: 'The same as Active today, kept so presets that name it still load. A benched character never takes a turn.',
2892
+ },
2869
2893
  },
2870
2894
  { key: 'none', label: { en: 'None' } },
2871
2895
  ],
2872
2896
  default: 'active',
2873
2897
  label: { en: 'Characters' },
2874
2898
  description: {
2875
- en: "Which of the session's characters may take a turn. 'All' admits ones switched off in the cast; a removed character never is.",
2899
+ en: "Which of the session's characters may take a turn. A benched or removed character never does, whichever is picked; 'All' is the same as 'Active'.",
2876
2900
  },
2877
2901
  },
2878
2902
  personas: {
@@ -4619,12 +4643,12 @@ export const picturePlacement = pin(describeTaskDefinition({
4619
4643
  * and whether it moves at all (2026-10-13, PROPOSAL-live-scenes §6).
4620
4644
  *
4621
4645
  * Two uses, one shape. *Time passes…* hands it the press's collected
4622
- * `step` (`input.clockStep`), which wins. Chat's reply hands it nothing and
4623
- * reads its own parameters — **By** (0, the default, is off) and **Unit** —
4624
- * exposed as the session setting *Each reply advances the clock by …*. Either
4625
- * way the step publishes `moves` (true when `by` is a whole number other than
4626
- * zero), and the *Advance story clock* outlet sits behind a junction on it,
4627
- * so a step of nothing is never written and never refused. Pure: no read, no
4646
+ * `step` (`input.clockStep`), which wins. The round tick and the Lair's
4647
+ * keeper hand it the round worth's `step` (`core:query/round-worth@1`). Its
4648
+ * own **By** (0, the default, is off) and **Unit** answer when nothing is
4649
+ * handed. Either way the step publishes `moves` (true when `by` is a whole
4650
+ * number other than zero), and the *Advance story clock* outlet sits behind a
4651
+ * junction on it, so a step of nothing is never written and never refused. Pure: no read, no
4628
4652
  * model, never the clock itself.
4629
4653
  * @experimental
4630
4654
  */
@@ -4668,9 +4692,10 @@ export const clockStep = pin(describeTaskDefinition({
4668
4692
  /** A collected step, `{ by, unit }` — wins over the parameters when it reads. */
4669
4693
  step: S.json,
4670
4694
  /**
4671
- * When truthy, the clock does not move (`moves` false). Chat's
4672
- * reply wires the row it re-drives (`input.messageId`), so a
4673
- * regenerate, a swipe or an extend never ticks the clock twice.
4695
+ * When truthy, the clock does not move (`moves` false). Nothing in
4696
+ * core wires it since 2026-11-11; a pipeline that re-drives a row
4697
+ * wires it (`input.messageId`) so a regenerate never moves the
4698
+ * clock twice.
4674
4699
  */
4675
4700
  unless: S.json,
4676
4701
  },
@@ -4988,7 +5013,7 @@ export const reckoningDuties = pin(describeTaskDefinition({
4988
5013
  * JSON call every few turns that looks back over the story and files what is
4989
5014
  * worth keeping. Each duty is a switch; the routine's mode decides whether
4990
5015
  * what it files is written (`full`) or held for review (`review`). Publishes
4991
- * `modes` keyed `summary`, `lore`, `cast`, `relationships`, `world-state`,
5016
+ * `modes` keyed `lore`, `cast`, `relationships`, `world-state`,
4992
5017
  * `scenes`, `goals`, `goal-reached`, `scene-moved-on` — the keys the sweep's scripts and
4993
5018
  * junctions read — and `any`. Duties that write a lorebook read Off in a
4994
5019
  * session with none. *Mark goals reached* (`goal-reached`) is read by the
@@ -5000,7 +5025,7 @@ export const sweepDuties = pin(describeTaskDefinition({
5000
5025
  i18n: {
5001
5026
  name: { en: 'Look back over the story' },
5002
5027
  description: {
5003
- en: 'Switches for what is filed every few turns: a summary, lore, people, how they stand, the world, places, goals. How it lands is the routine’s mode.',
5028
+ en: 'Switches for what is filed every few turns: lore, people, how they stand, the world, places, goals. How it lands is the routine’s mode.',
5004
5029
  },
5005
5030
  },
5006
5031
  timeoutMs: 500,
@@ -5009,7 +5034,6 @@ export const sweepDuties = pin(describeTaskDefinition({
5009
5034
  kind: 'parameters',
5010
5035
  facet: 'behavior',
5011
5036
  schema: {
5012
- summary: duty('Summarize the story', 'Files a summary of what happened in the lorebook’s history.', true),
5013
5037
  lore: duty('Add to the lore', 'Files new facts the story established as lorebook entries.', true),
5014
5038
  cast: duty('Note new people', 'Files the people the story introduced as lorebook entries.', true),
5015
5039
  relationships: duty('Track relationships', 'Proposes how the characters now stand with each other, for you to look over.', false),
@@ -5158,7 +5182,7 @@ export const cueLines = pin(describeTaskDefinition({
5158
5182
  * comment the message renderer never shows, even while the reply streams. This step takes every such block out of
5159
5183
  * the reply (`text`, what is saved) and reads the last one: `make` is `'character'`, `'lorebook'` or `''`, and
5160
5184
  * `draft` its JSON, for `create-character@1` / `create-lorebook@1` behind a junction on `make`. One model call per
5161
- * turn — the reply's own — and no tool loop. Pure (the SDK's `readLibraryDraft`). ⚠ Not `parse-json@1` (a whole reply
5185
+ * turn — the reply's own — and no tool loop. Also turns a plain `See: /docs/<path>` line into a markdown link. Pure (the SDK's `readLibraryDraft`). ⚠ Not `parse-json@1` (a whole reply
5162
5186
  * read as JSON) and not `parse-tool-call@1`.
5163
5187
  * @experimental
5164
5188
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serene-pub/contracts",
3
- "version": "0.6.0-pr-7",
3
+ "version": "0.6.0-pr-9",
4
4
  "description": "Generated, frozen type declarations for one Serene Pub release: @serene-pub/contracts@0.6.x compiles against Serene Pub 0.6.x.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/SerenePub/serene-pub-sdk/tree/main/contracts#readme",
@@ -40,13 +40,13 @@
40
40
  "./package.json": "./package.json"
41
41
  },
42
42
  "peerDependencies": {
43
- "@serene-pub/sdk": "^0.6.0-pr-7"
43
+ "@serene-pub/sdk": "^0.6.0-pr-9"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "tsc -p tsconfig.build.json"
47
47
  },
48
48
  "devDependencies": {
49
- "@serene-pub/sdk": "0.6.0-pr-7"
49
+ "@serene-pub/sdk": "0.6.0-pr-9"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public",