@serene-pub/contracts 0.6.0-pr-6 โ†’ 0.6.0-pr-7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/queries.js CHANGED
@@ -1144,12 +1144,24 @@ export const castPresences = pin(describeQueryDefinition({
1144
1144
  /** A session with no book, or a book that dates nobody, reads nothing โ€” a normal state. */
1145
1145
  optional: true,
1146
1146
  ports: {
1147
- in: { scope: S.sessionScope },
1147
+ in: {
1148
+ scope: S.sessionScope,
1149
+ /**
1150
+ * ๐Ÿšง The hour to place the cast at (M0, SHAPES L3): a clock target. Unwired,
1151
+ * the clock's present hour, today.
1152
+ */
1153
+ atHour: S.clockTarget,
1154
+ },
1148
1155
  out: {
1149
1156
  /** `{ bindingId, from, until, position }[]`, on the session's line. */
1150
1157
  main: S.json,
1151
1158
  /** The story date the session reads at, or null for the head. */
1152
1159
  at: S.json,
1160
+ /**
1161
+ * ๐Ÿšง `{ bindingId: number; where: string }[]` โ€” where each cast member is at `atHour`, read
1162
+ * from the first `schedule` field on an entry they hold; a member with none is left out.
1163
+ */
1164
+ placements: S.json,
1153
1165
  },
1154
1166
  },
1155
1167
  }));
@@ -2364,7 +2376,70 @@ export const sessionAnnex = pin(describeQueryDefinition({
2364
2376
  /** Whose prompt, for `view: 'ai'` โ€” a `character:` or `envoy:` reference. */
2365
2377
  speaker: S.participantRef,
2366
2378
  },
2367
- out: { main: S.json },
2379
+ out: {
2380
+ main: S.json,
2381
+ /**
2382
+ * ๐Ÿšง The owner's **annex document version** (M2a a8): a count the
2383
+ * host moves with every write of that document, 0 before the
2384
+ * first. Wire it into `set-session-annex`'s `base` to make the
2385
+ * write a compare-and-set. Absent for `view: 'template'` (many
2386
+ * owners, no one version).
2387
+ */
2388
+ version: S.json,
2389
+ },
2390
+ },
2391
+ }));
2392
+ /**
2393
+ * ๐Ÿšง The **lorebook annex** (M0, SHAPES L9): read one owner's document
2394
+ * out of the annex of the book the session reads โ€” the session annex's model
2395
+ * at book scope, for world-level engine state that is neither an attribute nor
2396
+ * prose. Like `session-annex@1`, the owner defaults to the running spec's own
2397
+ * namespace, and reading another's takes `sharedAnnex`.
2398
+ *
2399
+ * โš  Not an entry, and not a save: typed world facts stay attributes, and a
2400
+ * session is the save.
2401
+ * @experimental
2402
+ */
2403
+ export const lorebookAnnex = pin(describeQueryDefinition({
2404
+ id: 'core:query/lorebook-annex@1',
2405
+ i18n: { name: { en: 'Lorebook annex' } },
2406
+ timeoutMs: 1000,
2407
+ slots: {
2408
+ params: {
2409
+ kind: 'parameters',
2410
+ facet: 'behavior',
2411
+ schema: {
2412
+ owner: {
2413
+ type: 'string',
2414
+ default: '',
2415
+ label: { en: 'Owner' },
2416
+ description: {
2417
+ en: "Whose document to read. Blank means this pipeline's own.",
2418
+ },
2419
+ },
2420
+ sharedAnnex: {
2421
+ type: 'boolean',
2422
+ default: false,
2423
+ label: { en: 'Read another owner' },
2424
+ description: {
2425
+ en: "Allow reading a document this pipeline does not own. Off refuses, with a note on the receipt.",
2426
+ },
2427
+ },
2428
+ },
2429
+ },
2430
+ },
2431
+ ports: {
2432
+ in: { scope: S.sessionScope },
2433
+ out: {
2434
+ main: S.json,
2435
+ /**
2436
+ * ๐Ÿšง (M2b) The owner's annex document version on the book a
2437
+ * `set-lorebook-annex` from this run would write (0 before the first
2438
+ * write) โ€” wire it into that step's `base` for a compare-and-set.
2439
+ * Absent when the run has no book to write.
2440
+ */
2441
+ version: S.json,
2442
+ },
2368
2443
  },
2369
2444
  }));
2370
2445
  // โ”€โ”€ Summarization โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
@@ -3412,4 +3487,146 @@ export const likenessImages = pin(describeQueryDefinition({
3412
3487
  out: { main: S.mediaList, references: S.mediaList },
3413
3488
  },
3414
3489
  }));
3490
+ // โ”€โ”€ ๐Ÿšง core:query/message-line@1 (speech lane D follow-up, โ˜…1, 2026-10-28) โ”€โ”€
3491
+ /**
3492
+ * ๐Ÿšง **One message as a line to speak**: its words, whose line it is and the
3493
+ * inflection it was recorded with โ€” what `core:task/cue-lines@1` takes, read
3494
+ * off ONE stored row by id. The manual *Read aloud* / *Say it asโ€ฆ* verbs'
3495
+ * read (`core:spec/speak-message`): the history read's rows are opaque
3496
+ * (`messages@1`), so nothing else can hand cue-lines a stored line's speaker
3497
+ * or inflection.
3498
+ *
3499
+ * - `text` โ€” the row's words; **empty** when the row is not this session's,
3500
+ * is hidden, or is still being written (the history read's rule), so a
3501
+ * spec junctions on it and nothing is spoken.
3502
+ * - `speaker` โ€” the participant reference the row was voiced by: an envoy's
3503
+ * `envoy:<slug>`, a persona's or character's `character:<id>`; absent for
3504
+ * narration and for a person's own line with no persona.
3505
+ * - `inflection` โ€” the line's recorded inflection: the label of the sprite
3506
+ * shown on its active swipe (a sprite pick is an inflection). Absent when
3507
+ * no sprite was shown.
3508
+ *
3509
+ * `say` overrides the recorded inflection with what a person asked for (the
3510
+ * *Say it asโ€ฆ* press's collected text): a word the host's marker table knows
3511
+ * (`sighs`, `angrily`, `joy`) becomes that label; any other words are kept as
3512
+ * the label as written, which a prose-taking model reads as direction and a
3513
+ * tag-taking model drops. Blank `say` keeps the recorded one.
3514
+ *
3515
+ * No writes, no model: a read.
3516
+ * @experimental
3517
+ */
3518
+ export const messageLine = pin(describeQueryDefinition({
3519
+ id: 'core:query/message-line@1',
3520
+ i18n: {
3521
+ name: { en: 'Message line' },
3522
+ description: {
3523
+ en: "One message's words, who said it, and how it was said โ€” for reading it aloud.",
3524
+ },
3525
+ },
3526
+ timeoutMs: 2000,
3527
+ ports: {
3528
+ in: {
3529
+ scope: S.sessionScope,
3530
+ /** The row โ€” the inlet's `messageId`, the message a press on a message's โ‹ฎ was made on. */
3531
+ messageId: S.rowIds,
3532
+ /** How it should sound, in a person's words; blank keeps the recorded inflection. */
3533
+ say: S.text,
3534
+ },
3535
+ out: {
3536
+ main: S.text,
3537
+ /** The row's words; empty when the row is hidden, still written, or not this session's. */
3538
+ text: S.text,
3539
+ /** Whose line it is; absent for narration. */
3540
+ speaker: S.participantRef,
3541
+ /** How it is spoken: `say` when given, else the recorded sprite label; absent when neither. */
3542
+ inflection: S.inflection,
3543
+ },
3544
+ },
3545
+ }));
3546
+ /**
3547
+ * The largest file `core:query/plugin-storage@1` will read: 4 MiB. A bigger
3548
+ * file is refused with a sentence naming both sizes. (M2a)
3549
+ * @experimental
3550
+ */
3551
+ export const PLUGIN_STORAGE_QUERY_MAX_BYTES = 4 * 1024 * 1024;
3552
+ /**
3553
+ * ๐Ÿšง (M2a) **A file from the running plugin's own storage** โ€” read-only, size
3554
+ * capped, one file per read. Say a plugin's genre has a create pipeline that
3555
+ * loads a custom world the person imported: the world sits in the plugin's
3556
+ * storage, and this reads it into the run.
3557
+ *
3558
+ * Why a query and not a task: tasks are pure (F11) โ€” the same inputs give the
3559
+ * same output โ€” and a file on disk is state outside the graph, so it enters
3560
+ * the way every other outside state does, through a query.
3561
+ *
3562
+ * Whose storage: only the plugin that owns the running pipeline. A core or
3563
+ * person-authored pipeline is refused ("plugin-storage reads only a plugin's
3564
+ * own pipeline's storage"). `scope: 'pub'` reads the plugin's shared files and
3565
+ * needs its `storage` grant in force; `scope: 'me'` reads the acting person's
3566
+ * own folder and needs `storage-per-user` in force and a person on the run.
3567
+ * The path is relative, with no `..`, and stays inside the folder. No write,
3568
+ * no listing. A missing file answers `found: false`, not a halt.
3569
+ * @experimental
3570
+ */
3571
+ export const pluginStorage = pin(describeQueryDefinition({
3572
+ id: 'core:query/plugin-storage@1',
3573
+ i18n: { name: { en: 'Plugin storage' } },
3574
+ timeoutMs: 2000,
3575
+ slots: {
3576
+ params: {
3577
+ kind: 'parameters',
3578
+ facet: 'behavior',
3579
+ schema: {
3580
+ scope: {
3581
+ type: 'enum',
3582
+ default: 'pub',
3583
+ label: { en: 'Whose files' },
3584
+ members: [
3585
+ {
3586
+ key: 'pub',
3587
+ label: { en: 'The plugin' },
3588
+ description: { en: "The plugin's shared files." },
3589
+ },
3590
+ {
3591
+ key: 'me',
3592
+ label: { en: 'The person' },
3593
+ description: {
3594
+ en: "The acting person's own files for this plugin.",
3595
+ },
3596
+ },
3597
+ ],
3598
+ },
3599
+ as: {
3600
+ type: 'enum',
3601
+ default: 'json',
3602
+ label: { en: 'Read as' },
3603
+ members: [
3604
+ {
3605
+ key: 'json',
3606
+ label: { en: 'JSON' },
3607
+ description: { en: 'Parse the file and give the value.' },
3608
+ },
3609
+ {
3610
+ key: 'text',
3611
+ label: { en: 'Text' },
3612
+ description: { en: 'Give the file as text.' },
3613
+ },
3614
+ ],
3615
+ },
3616
+ },
3617
+ },
3618
+ },
3619
+ ports: {
3620
+ in: {
3621
+ /** The file, relative to the folder: `worlds/atlas.json`. */
3622
+ path: S.text,
3623
+ },
3624
+ out: {
3625
+ /** The parsed JSON, or the text; null when the file is missing. */
3626
+ main: S.json,
3627
+ /** Whether the file was there. */
3628
+ found: S.json,
3629
+ },
3630
+ },
3631
+ }));
3415
3632
  //# sourceMappingURL=queries.js.map
package/dist/tasks.d.ts CHANGED
@@ -5787,4 +5787,231 @@ export type JudgedSceneCheck = {
5787
5787
  readonly due: false;
5788
5788
  readonly why: string;
5789
5789
  };
5790
+ /**
5791
+ * ๐Ÿšง **Cue a line** โ€” turn a line's text into the script it is spoken from
5792
+ * (`Cue[]`, PLAN-speech-connections-and-timbre ยง11.1). Pure and deterministic:
5793
+ * regex and locale tables, the same text giving the same cues, no model.
5794
+ *
5795
+ * - a quote opens **dialogue** (`quoteStyles`); `*โ€ฆ*` / `_โ€ฆ_` are **action**
5796
+ * (`asterisks`); `(โ€ฆ)` is an **aside**; the rest is **narration**;
5797
+ * - `Name:` at the start of a run, where the name is one of `cast`, switches
5798
+ * the cue's `speaker` (multi-voice lines);
5799
+ * - inline expression markers the model wrote โ€” `[angry]`, `<laugh>`,
5800
+ * `*sighs*`, `(((word)))` โ€” are lifted off the text into `markers`, never
5801
+ * spoken; a marker the shipped marker table knows sets that cue's
5802
+ * inflection, else the line's `inflection` label does (ยง11.2);
5803
+ * - `voices` maps each kind to a voice; code blocks are dropped.
5804
+ *
5805
+ * `inflection` takes a sprite pick as it is (`sprite-pick@1` is assignable to
5806
+ * `inflection@1`): the sprite a line was given is the inflection it is spoken with.
5807
+ * @experimental
5808
+ */
5809
+ export declare const cueLines: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
5810
+ main: string;
5811
+ cues: string;
5812
+ }, {
5813
+ /** The line's text, as written. */
5814
+ text: string;
5815
+ /** Whose line it is โ€” the voice `speaker` cues take. */
5816
+ speaker: string;
5817
+ /** The line's recorded inflection โ€” a sprite pick wires in as it is. */
5818
+ inflection: string;
5819
+ /** `string[]` โ€” the cast's names, which `Name:` may switch to. */
5820
+ cast: string;
5821
+ }, "core:task/cue-lines@1"> & {
5822
+ kind: 'task';
5823
+ slots?: {
5824
+ readonly params: {
5825
+ readonly kind: "parameters";
5826
+ readonly facet: "behavior";
5827
+ readonly schema: {
5828
+ readonly quoteStyles: {
5829
+ readonly type: "list";
5830
+ readonly item: {
5831
+ readonly type: "string";
5832
+ };
5833
+ readonly default: readonly string[];
5834
+ readonly label: {
5835
+ readonly en: "Quote marks";
5836
+ };
5837
+ readonly description: {
5838
+ readonly en: "The marks that open and close dialogue โ€” each entry is the opening mark then the closing one.";
5839
+ };
5840
+ };
5841
+ readonly asterisks: {
5842
+ readonly type: "enum";
5843
+ readonly of: readonly ["action", "emphasis", "ignore"];
5844
+ readonly default: "action";
5845
+ readonly members: readonly [{
5846
+ readonly key: "action";
5847
+ readonly label: {
5848
+ readonly en: "Action";
5849
+ };
5850
+ readonly description: {
5851
+ readonly en: "*waves* is something done, read in the narrator's voice.";
5852
+ };
5853
+ }, {
5854
+ readonly key: "emphasis";
5855
+ readonly label: {
5856
+ readonly en: "Emphasis";
5857
+ };
5858
+ readonly description: {
5859
+ readonly en: "*really* is a stressed word, read in the line's own voice.";
5860
+ };
5861
+ }, {
5862
+ readonly key: "ignore";
5863
+ readonly label: {
5864
+ readonly en: "Ignore";
5865
+ };
5866
+ readonly description: {
5867
+ readonly en: "Asterisks are dropped and the words read as they stand.";
5868
+ };
5869
+ }];
5870
+ readonly label: {
5871
+ readonly en: "Text between asterisks";
5872
+ };
5873
+ };
5874
+ readonly voices: {
5875
+ readonly type: "object";
5876
+ readonly label: {
5877
+ readonly en: "Who speaks what";
5878
+ };
5879
+ readonly description: {
5880
+ readonly en: "Which voice reads dialogue, narration, actions and asides.";
5881
+ };
5882
+ readonly default: Readonly<Record<"action" | "aside" | "dialogue" | "narration", "narrator" | "silent" | "speaker">>;
5883
+ readonly fields: {
5884
+ readonly dialogue: {
5885
+ readonly type: "enum";
5886
+ readonly of: readonly ["speaker", "narrator", "silent"];
5887
+ readonly default: "narrator" | "silent" | "speaker";
5888
+ readonly members: readonly [{
5889
+ readonly key: 'speaker';
5890
+ readonly label: {
5891
+ readonly en: "The speaker's voice";
5892
+ };
5893
+ }, {
5894
+ readonly key: 'narrator';
5895
+ readonly label: {
5896
+ readonly en: "The narrator's voice";
5897
+ };
5898
+ }, {
5899
+ readonly key: 'silent';
5900
+ readonly label: {
5901
+ readonly en: 'Not spoken';
5902
+ };
5903
+ }];
5904
+ readonly label: {
5905
+ readonly en: "Dialogue";
5906
+ };
5907
+ };
5908
+ readonly narration: {
5909
+ readonly type: "enum";
5910
+ readonly of: readonly ["speaker", "narrator", "silent"];
5911
+ readonly default: "narrator" | "silent" | "speaker";
5912
+ readonly members: readonly [{
5913
+ readonly key: 'speaker';
5914
+ readonly label: {
5915
+ readonly en: "The speaker's voice";
5916
+ };
5917
+ }, {
5918
+ readonly key: 'narrator';
5919
+ readonly label: {
5920
+ readonly en: "The narrator's voice";
5921
+ };
5922
+ }, {
5923
+ readonly key: 'silent';
5924
+ readonly label: {
5925
+ readonly en: 'Not spoken';
5926
+ };
5927
+ }];
5928
+ readonly label: {
5929
+ readonly en: "Narration";
5930
+ };
5931
+ };
5932
+ readonly action: {
5933
+ readonly type: "enum";
5934
+ readonly of: readonly ["speaker", "narrator", "silent"];
5935
+ readonly default: "narrator" | "silent" | "speaker";
5936
+ readonly members: readonly [{
5937
+ readonly key: 'speaker';
5938
+ readonly label: {
5939
+ readonly en: "The speaker's voice";
5940
+ };
5941
+ }, {
5942
+ readonly key: 'narrator';
5943
+ readonly label: {
5944
+ readonly en: "The narrator's voice";
5945
+ };
5946
+ }, {
5947
+ readonly key: 'silent';
5948
+ readonly label: {
5949
+ readonly en: 'Not spoken';
5950
+ };
5951
+ }];
5952
+ readonly label: {
5953
+ readonly en: "Actions";
5954
+ };
5955
+ };
5956
+ readonly aside: {
5957
+ readonly type: "enum";
5958
+ readonly of: readonly ["speaker", "narrator", "silent"];
5959
+ readonly default: "narrator" | "silent" | "speaker";
5960
+ readonly members: readonly [{
5961
+ readonly key: 'speaker';
5962
+ readonly label: {
5963
+ readonly en: "The speaker's voice";
5964
+ };
5965
+ }, {
5966
+ readonly key: 'narrator';
5967
+ readonly label: {
5968
+ readonly en: "The narrator's voice";
5969
+ };
5970
+ }, {
5971
+ readonly key: 'silent';
5972
+ readonly label: {
5973
+ readonly en: 'Not spoken';
5974
+ };
5975
+ }];
5976
+ readonly label: {
5977
+ readonly en: "Asides";
5978
+ };
5979
+ };
5980
+ };
5981
+ };
5982
+ readonly language: {
5983
+ readonly type: "string";
5984
+ readonly default: "";
5985
+ readonly label: {
5986
+ readonly en: "Language";
5987
+ };
5988
+ readonly description: {
5989
+ readonly en: "ISO 639-1 code whose quote and number rules apply. Blank reads the line's own script.";
5990
+ };
5991
+ };
5992
+ };
5993
+ };
5994
+ } | undefined;
5995
+ }>;
5996
+ /**
5997
+ * ๐Ÿšง **Read a drafted card or book** (M2c path B, owner ruling 2026-10-31): a reply that drafts a character card or
5998
+ * a lorebook ends with one hidden block โ€” `<!--draft:character {โ€ฆ}-->` or `<!--draft:lorebook {โ€ฆ}-->`, an HTML
5999
+ * comment the message renderer never shows, even while the reply streams. This step takes every such block out of
6000
+ * the reply (`text`, what is saved) and reads the last one: `make` is `'character'`, `'lorebook'` or `''`, and
6001
+ * `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
6003
+ * read as JSON) and not `parse-tool-call@1`.
6004
+ * @experimental
6005
+ */
6006
+ export declare const readLibraryDraft: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
6007
+ main: string;
6008
+ text: string;
6009
+ make: string;
6010
+ draft: string;
6011
+ }, {
6012
+ text: string;
6013
+ }, "core:task/read-library-draft@1"> & {
6014
+ kind: 'task';
6015
+ slots?: Record<string, SlotDecl> | undefined;
6016
+ }>;
5790
6017
  //# sourceMappingURL=tasks.d.ts.map
package/dist/tasks.js CHANGED
@@ -8,6 +8,7 @@ import { S, tf, IoKinds } from '@serene-pub/sdk';
8
8
  import { handlebars, liquid } from '@serene-pub/sdk';
9
9
  import { describeTaskDefinition, pin } from '@serene-pub/sdk';
10
10
  import { PROMPT_BLOCKS_DECL } from '@serene-pub/sdk';
11
+ import { ASTERISK_READINGS, CUE_VOICES, DEFAULT_CUE_VOICES, DEFAULT_QUOTE_STYLES } from '@serene-pub/sdk';
11
12
  // โ”€โ”€ Tasks โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
12
13
  /** @public */
13
14
  export const contextBudget = pin(describeTaskDefinition({
@@ -5029,4 +5030,145 @@ export const sweepDuties = pin(describeTaskDefinition({
5029
5030
  },
5030
5031
  },
5031
5032
  }));
5033
+ // โ”€โ”€ ๐Ÿšง Speech (PLAN-speech-build S3, 2026-10-28) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
5034
+ /** The three voices a cue may take, as the picker shows them. */
5035
+ const CUE_VOICE_MEMBERS = [
5036
+ { key: 'speaker', label: { en: "The speaker's voice" } },
5037
+ { key: 'narrator', label: { en: "The narrator's voice" } },
5038
+ { key: 'silent', label: { en: 'Not spoken' } },
5039
+ ];
5040
+ /**
5041
+ * ๐Ÿšง **Cue a line** โ€” turn a line's text into the script it is spoken from
5042
+ * (`Cue[]`, PLAN-speech-connections-and-timbre ยง11.1). Pure and deterministic:
5043
+ * regex and locale tables, the same text giving the same cues, no model.
5044
+ *
5045
+ * - a quote opens **dialogue** (`quoteStyles`); `*โ€ฆ*` / `_โ€ฆ_` are **action**
5046
+ * (`asterisks`); `(โ€ฆ)` is an **aside**; the rest is **narration**;
5047
+ * - `Name:` at the start of a run, where the name is one of `cast`, switches
5048
+ * the cue's `speaker` (multi-voice lines);
5049
+ * - inline expression markers the model wrote โ€” `[angry]`, `<laugh>`,
5050
+ * `*sighs*`, `(((word)))` โ€” are lifted off the text into `markers`, never
5051
+ * spoken; a marker the shipped marker table knows sets that cue's
5052
+ * inflection, else the line's `inflection` label does (ยง11.2);
5053
+ * - `voices` maps each kind to a voice; code blocks are dropped.
5054
+ *
5055
+ * `inflection` takes a sprite pick as it is (`sprite-pick@1` is assignable to
5056
+ * `inflection@1`): the sprite a line was given is the inflection it is spoken with.
5057
+ * @experimental
5058
+ */
5059
+ export const cueLines = pin(describeTaskDefinition({
5060
+ id: 'core:task/cue-lines@1',
5061
+ i18n: { name: { en: 'Cue a line' } },
5062
+ effects: 'none',
5063
+ timeoutMs: 1000,
5064
+ slots: {
5065
+ params: {
5066
+ kind: 'parameters',
5067
+ facet: 'behavior',
5068
+ schema: {
5069
+ quoteStyles: {
5070
+ type: 'list',
5071
+ item: { type: 'string' },
5072
+ default: DEFAULT_QUOTE_STYLES,
5073
+ label: { en: 'Quote marks' },
5074
+ description: {
5075
+ en: 'The marks that open and close dialogue โ€” each entry is the opening mark then the closing one.',
5076
+ },
5077
+ },
5078
+ asterisks: {
5079
+ type: 'enum',
5080
+ of: ASTERISK_READINGS,
5081
+ default: 'action',
5082
+ members: [
5083
+ { key: 'action', label: { en: 'Action' }, description: { en: '*waves* is something done, read in the narrator\'s voice.' } },
5084
+ { key: 'emphasis', label: { en: 'Emphasis' }, description: { en: '*really* is a stressed word, read in the line\'s own voice.' } },
5085
+ { key: 'ignore', label: { en: 'Ignore' }, description: { en: 'Asterisks are dropped and the words read as they stand.' } },
5086
+ ],
5087
+ label: { en: 'Text between asterisks' },
5088
+ },
5089
+ voices: {
5090
+ type: 'object',
5091
+ label: { en: 'Who speaks what' },
5092
+ description: {
5093
+ en: 'Which voice reads dialogue, narration, actions and asides.',
5094
+ },
5095
+ default: DEFAULT_CUE_VOICES,
5096
+ fields: {
5097
+ dialogue: {
5098
+ type: 'enum',
5099
+ of: CUE_VOICES,
5100
+ default: DEFAULT_CUE_VOICES.dialogue,
5101
+ members: CUE_VOICE_MEMBERS,
5102
+ label: { en: 'Dialogue' },
5103
+ },
5104
+ narration: {
5105
+ type: 'enum',
5106
+ of: CUE_VOICES,
5107
+ default: DEFAULT_CUE_VOICES.narration,
5108
+ members: CUE_VOICE_MEMBERS,
5109
+ label: { en: 'Narration' },
5110
+ },
5111
+ action: {
5112
+ type: 'enum',
5113
+ of: CUE_VOICES,
5114
+ default: DEFAULT_CUE_VOICES.action,
5115
+ members: CUE_VOICE_MEMBERS,
5116
+ label: { en: 'Actions' },
5117
+ },
5118
+ aside: {
5119
+ type: 'enum',
5120
+ of: CUE_VOICES,
5121
+ default: DEFAULT_CUE_VOICES.aside,
5122
+ members: CUE_VOICE_MEMBERS,
5123
+ label: { en: 'Asides' },
5124
+ },
5125
+ },
5126
+ },
5127
+ language: {
5128
+ type: 'string',
5129
+ default: '',
5130
+ label: { en: 'Language' },
5131
+ description: {
5132
+ en: "ISO 639-1 code whose quote and number rules apply. Blank reads the line's own script.",
5133
+ },
5134
+ },
5135
+ },
5136
+ },
5137
+ },
5138
+ ports: {
5139
+ in: {
5140
+ /** The line's text, as written. */
5141
+ text: S.text,
5142
+ /** Whose line it is โ€” the voice `speaker` cues take. */
5143
+ speaker: S.participantRef,
5144
+ /** The line's recorded inflection โ€” a sprite pick wires in as it is. */
5145
+ inflection: S.inflection,
5146
+ /** `string[]` โ€” the cast's names, which `Name:` may switch to. */
5147
+ cast: S.json,
5148
+ },
5149
+ out: {
5150
+ main: S.cues,
5151
+ cues: S.cues,
5152
+ },
5153
+ },
5154
+ }));
5155
+ /**
5156
+ * ๐Ÿšง **Read a drafted card or book** (M2c path B, owner ruling 2026-10-31): a reply that drafts a character card or
5157
+ * a lorebook ends with one hidden block โ€” `<!--draft:character {โ€ฆ}-->` or `<!--draft:lorebook {โ€ฆ}-->`, an HTML
5158
+ * comment the message renderer never shows, even while the reply streams. This step takes every such block out of
5159
+ * the reply (`text`, what is saved) and reads the last one: `make` is `'character'`, `'lorebook'` or `''`, and
5160
+ * `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
5162
+ * read as JSON) and not `parse-tool-call@1`.
5163
+ * @experimental
5164
+ */
5165
+ export const readLibraryDraft = pin(describeTaskDefinition({
5166
+ id: 'core:task/read-library-draft@1',
5167
+ i18n: { name: { en: 'Read a drafted card or book' } },
5168
+ timeoutMs: 500,
5169
+ ports: {
5170
+ in: { text: S.text },
5171
+ out: { main: S.json, text: S.text, make: S.text, draft: S.json },
5172
+ },
5173
+ }));
5032
5174
  //# sourceMappingURL=tasks.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serene-pub/contracts",
3
- "version": "0.6.0-pr-6",
3
+ "version": "0.6.0-pr-7",
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-6"
43
+ "@serene-pub/sdk": "^0.6.0-pr-7"
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-6"
49
+ "@serene-pub/sdk": "0.6.0-pr-7"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public",