@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/oracles.d.ts CHANGED
@@ -651,11 +651,44 @@ export declare const generateJson: import("@serene-pub/sdk").Pinned<import("@ser
651
651
  };
652
652
  } | undefined;
653
653
  }>;
654
- /** @experimental */
654
+ /**
655
+ * 🚧 **Speak** β€” a line's script in, its audio out (PLAN-speech-connections-
656
+ * and-timbre Β§10–§11; seam S3, evolved in place and bound 2026-10-28).
657
+ *
658
+ * Reads `cues` (`core:task/cue-lines@1`'s script), groups consecutive cues
659
+ * that share a voice and an inflection, renders each group through the line
660
+ * `template`, and makes one call per group β€” `speaker` cues in the speaker's
661
+ * voice, `narrator` cues in the session's narrator voice, `silent` cues never
662
+ * sent β€” joining the audio with a fixed `gapMs` gap. Publishes the audio, the
663
+ * `cueMap` (where each cue sits in it), `spokenAs` (voice, model, applied,
664
+ * ignored) and `meta`, the three assembled as the `SpokenMeta` record
665
+ * `core:outlet/attach-audio@1` keeps on the line. Deterministic: the same line,
666
+ * label and templates make the same requests, byte for byte.
667
+ *
668
+ * Never picks a connection: unset, the `loadout` is the `text->audio`
669
+ * default β€” the **Narration** loadout, the one global speaking pair (ruled
670
+ * 2026-10-28). `skipCodeBlocks` left with the cue task, which drops code.
671
+ * @experimental
672
+ */
655
673
  export declare const speak: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
656
674
  main: string;
657
675
  audio: string;
676
+ cueMap: string;
677
+ spokenAs: string;
678
+ /** 🚧 `SpokenMeta` β€” the record attach-audio keeps on the line. */
679
+ meta: string;
658
680
  }, {
681
+ /** 🚧 The script β€” `Cue[]` from `core:task/cue-lines@1`. */
682
+ cues: string;
683
+ /** Whose line it is: `speaker` cues speak in this participant's voice. */
684
+ speaker: string;
685
+ /** ISO 639-1. Absent: the voice's timbre language, then the session's, then the pub's. */
686
+ language: string;
687
+ /**
688
+ * ⏳ The one-release alias: a bare text, read as one cue in the
689
+ * speaker's voice when `cues` is not wired. Expires the release
690
+ * after speech ships.
691
+ */
659
692
  text: string;
660
693
  }, "core:oracle/speak@1"> & {
661
694
  kind: 'oracle';
@@ -675,18 +708,166 @@ export declare const speak: import("@serene-pub/sdk").Pinned<import("@serene-pub
675
708
  readonly quick: true;
676
709
  readonly shape: string;
677
710
  };
711
+ /**
712
+ * 🚧 The written **direction** β€” the timbre description, the
713
+ * inflection sentence (`{{ inflectionSentence }}`), the genre's tone
714
+ * line. Rendered only for a model that takes a written direction
715
+ * (`controls.instruction`); any other reports `direction` ignored.
716
+ */
717
+ readonly prompts: {
718
+ readonly kind: "prompts";
719
+ readonly facet: "prompts";
720
+ readonly description: "How the voice is directed β€” sent only to a voice model that takes written direction.";
721
+ readonly fields: {
722
+ readonly direction: {
723
+ readonly type: "text";
724
+ };
725
+ };
726
+ };
727
+ /** 🚧 The **line template**: renders one group of cues into the text of one call. */
678
728
  readonly template: {
679
729
  readonly kind: "template";
680
730
  readonly engine: string;
681
731
  readonly facet: "templates";
732
+ readonly variables: {
733
+ readonly cues: {
734
+ readonly type: 'list';
735
+ readonly description: 'The cues of this group, in order β€” each { text, kind, voice, speaker?, inflection?, markers?, emphasis? }.';
736
+ readonly of: {
737
+ readonly type: 'object';
738
+ readonly fields: {
739
+ readonly text: {
740
+ readonly type: 'string';
741
+ };
742
+ readonly kind: {
743
+ readonly type: 'string';
744
+ readonly description: 'dialogue, narration, action or aside.';
745
+ };
746
+ readonly voice: {
747
+ readonly type: 'string';
748
+ readonly description: 'speaker, narrator or silent.';
749
+ };
750
+ readonly speaker: {
751
+ readonly type: 'string';
752
+ readonly optional: true;
753
+ };
754
+ readonly inflection: {
755
+ readonly type: 'string';
756
+ readonly optional: true;
757
+ };
758
+ readonly markers: {
759
+ readonly type: 'list';
760
+ readonly of: {
761
+ readonly type: 'string';
762
+ };
763
+ readonly optional: true;
764
+ };
765
+ readonly emphasis: {
766
+ readonly type: 'string';
767
+ readonly optional: true;
768
+ };
769
+ };
770
+ };
771
+ };
772
+ readonly speaker: {
773
+ readonly type: 'object';
774
+ readonly description: 'Who the line belongs to.';
775
+ readonly fields: {
776
+ readonly ref: {
777
+ readonly type: 'string';
778
+ readonly description: 'The participant ref β€” character:12, user:3, narrator.';
779
+ };
780
+ readonly name: {
781
+ readonly type: 'string';
782
+ readonly optional: true;
783
+ };
784
+ };
785
+ };
786
+ readonly voice: {
787
+ readonly type: 'string';
788
+ readonly description: "This group's voice β€” speaker or narrator. Never a service's voice id.";
789
+ };
790
+ readonly controls: {
791
+ readonly type: 'object';
792
+ readonly description: 'What the resolved model takes: prose instruction, inline tags, several speakers.';
793
+ readonly fields: {
794
+ readonly instruction: {
795
+ readonly type: 'string';
796
+ readonly optional: true;
797
+ readonly description: "'prose' when the model takes a written direction.";
798
+ };
799
+ readonly tags: {
800
+ readonly type: 'object';
801
+ readonly optional: true;
802
+ readonly description: 'Present when the model takes inline tags.';
803
+ readonly fields: {
804
+ readonly syntax: {
805
+ readonly type: 'string';
806
+ };
807
+ readonly vocabulary: {
808
+ readonly type: 'list';
809
+ readonly of: {
810
+ readonly type: 'string';
811
+ };
812
+ readonly optional: true;
813
+ readonly description: 'Absent when any tag is taken.';
814
+ };
815
+ };
816
+ };
817
+ readonly multiSpeaker: {
818
+ readonly type: 'boolean';
819
+ readonly optional: true;
820
+ };
821
+ readonly language: {
822
+ readonly type: 'list';
823
+ readonly of: {
824
+ readonly type: 'string';
825
+ };
826
+ readonly optional: true;
827
+ };
828
+ };
829
+ };
830
+ };
831
+ readonly description: "Which parts of a line are spoken, and how each one reads. Whole line, Dialogue only and Narration only ship.";
832
+ };
833
+ /** 🚧 How an inflection reads as a direction and as an inline tag (§11.3). */
834
+ readonly variables: {
835
+ readonly kind: "variables";
836
+ readonly facet: "variables";
837
+ readonly description: "How an inflection reads β€” as a sentence directing the voice, and as an inline tag.";
838
+ readonly renders: {
839
+ readonly inflectionSentence: "core:var/inflection-sentence@1";
840
+ readonly inflectionTag: "core:var/inflection-tag@1";
841
+ };
682
842
  };
843
+ /**
844
+ * No `facet`, like the image step's: both decide how the audio is
845
+ * made and joined, not what the voice is asked for.
846
+ */
683
847
  readonly params: {
684
848
  readonly kind: "parameters";
685
- readonly facet: "weights";
686
849
  readonly schema: {
687
- readonly skipCodeBlocks: {
850
+ readonly streaming: {
688
851
  readonly type: "boolean";
689
- readonly default: true;
852
+ readonly default: false;
853
+ readonly label: {
854
+ readonly en: "Stream speech";
855
+ };
856
+ readonly description: {
857
+ readonly en: "Hand each part of the line on as it is made, where the voice model can (audio_streaming). Off makes the whole line first.";
858
+ };
859
+ };
860
+ readonly gapMs: {
861
+ readonly type: "number";
862
+ readonly default: 200;
863
+ readonly min: 0;
864
+ readonly max: 2000;
865
+ readonly label: {
866
+ readonly en: "Pause between parts (ms)";
867
+ };
868
+ readonly description: {
869
+ readonly en: "The silence put between two parts of a line spoken in separate calls β€” a change of voice or of inflection.";
870
+ };
690
871
  };
691
872
  };
692
873
  };
package/dist/oracles.js CHANGED
@@ -7,6 +7,7 @@
7
7
  */
8
8
  import { S, tf, IoKinds } from '@serene-pub/sdk';
9
9
  import { jinja2 } from '@serene-pub/sdk';
10
+ import { SPOKEN_LINE_TEMPLATE_SCOPE } from '@serene-pub/sdk';
10
11
  import { describeOracleDefinition, pin } from '@serene-pub/sdk';
11
12
  /**
12
13
  * How a provider node wants its request sent.
@@ -848,17 +849,34 @@ export const generateJson = pin(describeOracleDefinition({
848
849
  },
849
850
  },
850
851
  }));
851
- /** @experimental */
852
+ /**
853
+ * 🚧 **Speak** β€” a line's script in, its audio out (PLAN-speech-connections-
854
+ * and-timbre Β§10–§11; seam S3, evolved in place and bound 2026-10-28).
855
+ *
856
+ * Reads `cues` (`core:task/cue-lines@1`'s script), groups consecutive cues
857
+ * that share a voice and an inflection, renders each group through the line
858
+ * `template`, and makes one call per group β€” `speaker` cues in the speaker's
859
+ * voice, `narrator` cues in the session's narrator voice, `silent` cues never
860
+ * sent β€” joining the audio with a fixed `gapMs` gap. Publishes the audio, the
861
+ * `cueMap` (where each cue sits in it), `spokenAs` (voice, model, applied,
862
+ * ignored) and `meta`, the three assembled as the `SpokenMeta` record
863
+ * `core:outlet/attach-audio@1` keeps on the line. Deterministic: the same line,
864
+ * label and templates make the same requests, byte for byte.
865
+ *
866
+ * Never picks a connection: unset, the `loadout` is the `text->audio`
867
+ * default β€” the **Narration** loadout, the one global speaking pair (ruled
868
+ * 2026-10-28). `skipCodeBlocks` left with the cue task, which drops code.
869
+ * @experimental
870
+ */
852
871
  export const speak = pin(describeOracleDefinition({
853
872
  id: 'core:oracle/speak@1',
854
873
  i18n: { name: { en: 'Speak' } },
855
874
  shape: S.tts,
856
875
  effects: 'external',
857
- /** Declared, not bound β€” no handler exists for it yet. */
858
- provisional: true,
859
- /** The words to be spoken may be corrected before the call. */
860
- review: { fields: ['text'] },
861
- timeoutMs: 60000,
876
+ /** The script may be corrected before the call; `text` is the one-release alias. */
877
+ review: { fields: ['cues', 'text'] },
878
+ /** Several group calls on a local TTS server; 60 s was the unbound default. */
879
+ timeoutMs: 180000,
862
880
  slots: {
863
881
  loadout: LOADOUT_SLOT,
864
882
  connection: {
@@ -868,18 +886,90 @@ export const speak = pin(describeOracleDefinition({
868
886
  requires: [tf({ in: [IoKinds.text], out: [IoKinds.audio] })],
869
887
  },
870
888
  sampling: { kind: 'sampling', quick: true, shape: S.tts },
889
+ /**
890
+ * 🚧 The written **direction** β€” the timbre description, the
891
+ * inflection sentence (`{{ inflectionSentence }}`), the genre's tone
892
+ * line. Rendered only for a model that takes a written direction
893
+ * (`controls.instruction`); any other reports `direction` ignored.
894
+ */
895
+ prompts: {
896
+ kind: 'prompts',
897
+ facet: 'prompts',
898
+ description: 'How the voice is directed β€” sent only to a voice model that takes written direction.',
899
+ fields: {
900
+ direction: { type: 'text' },
901
+ },
902
+ },
903
+ /** 🚧 The **line template**: renders one group of cues into the text of one call. */
871
904
  template: {
872
905
  kind: 'template',
873
906
  engine: jinja2.id,
874
907
  facet: 'templates',
908
+ variables: SPOKEN_LINE_TEMPLATE_SCOPE,
909
+ description: 'Which parts of a line are spoken, and how each one reads. Whole line, Dialogue only and Narration only ship.',
910
+ },
911
+ /** 🚧 How an inflection reads as a direction and as an inline tag (§11.3). */
912
+ variables: {
913
+ kind: 'variables',
914
+ facet: 'variables',
915
+ description: 'How an inflection reads β€” as a sentence directing the voice, and as an inline tag.',
916
+ renders: {
917
+ inflectionSentence: 'core:var/inflection-sentence@1',
918
+ inflectionTag: 'core:var/inflection-tag@1',
919
+ },
875
920
  },
921
+ /**
922
+ * No `facet`, like the image step's: both decide how the audio is
923
+ * made and joined, not what the voice is asked for.
924
+ */
876
925
  params: {
877
926
  kind: 'parameters',
878
- facet: 'weights',
879
- schema: { skipCodeBlocks: { type: 'boolean', default: true } },
927
+ schema: {
928
+ streaming: {
929
+ type: 'boolean',
930
+ default: false,
931
+ label: { en: 'Stream speech' },
932
+ description: {
933
+ en: 'Hand each part of the line on as it is made, where the voice model can (audio_streaming). Off makes the whole line first.',
934
+ },
935
+ },
936
+ gapMs: {
937
+ type: 'number',
938
+ default: 200,
939
+ min: 0,
940
+ max: 2000,
941
+ label: { en: 'Pause between parts (ms)' },
942
+ description: {
943
+ en: 'The silence put between two parts of a line spoken in separate calls β€” a change of voice or of inflection.',
944
+ },
945
+ },
946
+ },
947
+ },
948
+ },
949
+ ports: {
950
+ in: {
951
+ /** 🚧 The script β€” `Cue[]` from `core:task/cue-lines@1`. */
952
+ cues: S.cues,
953
+ /** Whose line it is: `speaker` cues speak in this participant's voice. */
954
+ speaker: S.participantRef,
955
+ /** ISO 639-1. Absent: the voice's timbre language, then the session's, then the pub's. */
956
+ language: S.text,
957
+ /**
958
+ * ⏳ The one-release alias: a bare text, read as one cue in the
959
+ * speaker's voice when `cues` is not wired. Expires the release
960
+ * after speech ships.
961
+ */
962
+ text: S.text,
963
+ },
964
+ out: {
965
+ main: S.audio,
966
+ audio: S.audio,
967
+ cueMap: S.cueMap,
968
+ spokenAs: S.spokenAs,
969
+ /** 🚧 `SpokenMeta` β€” the record attach-audio keeps on the line. */
970
+ meta: S.spokenMeta,
880
971
  },
881
972
  },
882
- ports: { in: { text: S.text }, out: { main: S.audio, audio: S.audio } },
883
973
  }));
884
974
  /**
885
975
  * 🚧 **Transcribe audio** (O9, 2026-10-21) β€” the explicit step that turns a
package/dist/outlets.d.ts CHANGED
@@ -433,13 +433,31 @@ export declare const setTurnOrder: import("@serene-pub/sdk").Pinned<import("@ser
433
433
  * ruling, reversing the original "no causesEvent"): a package's state is the annex, and a
434
434
  * genre that wants its turn order to answer that state binds the event in
435
435
  * the open, where the event map draws it β€” not through a back door.
436
+ *
437
+ * 🚧 Every write that moves the document moves the owner's **annex document
438
+ * version** (a count, 0 before the first): `base` makes the write a
439
+ * compare-and-set on it, so a run that read the document before another run
440
+ * wrote it is refused rather than overwriting that run's write.
436
441
  * @experimental
437
442
  */
438
443
  export declare const setSessionAnnex: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
439
444
  main: string;
445
+ /** The owner's document as written β€” or, when `base` was stale, as it stands now. Never core's runtime keys. */
440
446
  annex: string;
447
+ /** 🚧 The owner's annex document version after this write (unchanged when nothing was written). */
448
+ version: string;
441
449
  }, {
442
450
  value: string;
451
+ /**
452
+ * 🚧 Compare-and-set (M2a a8): the owner's **annex document
453
+ * version** this run read β€” `session-annex`'s `version`. When the
454
+ * stored version is another, nothing is written: the write result
455
+ * says `stale: true` (`written: false`, with a receipt note), and
456
+ * `annex` and `version` carry the document as it stands now, to
457
+ * build on again. Absent, the write lands as it always did (the
458
+ * last writer's value wins).
459
+ */
460
+ base: string;
443
461
  }, "core:outlet/set-session-annex@1"> & {
444
462
  kind: 'outlet';
445
463
  slots?: {
@@ -711,6 +729,65 @@ export declare const setAnnexField: import("@serene-pub/sdk").Pinned<import("@se
711
729
  kind: 'outlet';
712
730
  slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
713
731
  }>;
732
+ /**
733
+ * 🚧 Write one owner's document into the **lorebook annex** (M0,
734
+ * SHAPES L9): the `set-session-annex` write at book scope. A write from a
735
+ * session is a change β€” anchored to the turn, filed as a `lore_imprints` row
736
+ * (subject `annex`), retractable, settled with the stretch β€” routed like
737
+ * every lore write; a write from a book-level run is lasting at once.
738
+ * @experimental
739
+ */
740
+ export declare const setLorebookAnnex: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
741
+ main: string;
742
+ /** The owner's document as written β€” or, when `base` was stale, as it stands now. */
743
+ annex: string;
744
+ /** 🚧 (M2b) The owner's annex document version on the book after this write (unchanged when nothing was written). */
745
+ version: string;
746
+ }, {
747
+ value: string;
748
+ /**
749
+ * 🚧 Compare-and-set (M2b), as `set-session-annex`'s `base`: the
750
+ * owner's annex document version this run read β€” `lorebook-annex`'s
751
+ * `version`. Another stored version writes nothing (`written: false`,
752
+ * `stale: true`, a receipt note), and `annex` and `version` carry the
753
+ * document as it stands now. Absent, the last write wins.
754
+ */
755
+ base: string;
756
+ }, "core:outlet/set-lorebook-annex@1"> & {
757
+ kind: 'outlet';
758
+ slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
759
+ }>;
760
+ /**
761
+ * 🚧 Set one annex field declared `annexField({ scope: 'lorebook' })`
762
+ * (M0, SHAPES L9): the `set-annex-field` write at book scope, under the
763
+ * same rules as {@link setLorebookAnnex}.
764
+ * @experimental
765
+ */
766
+ export declare const setLorebookAnnexField: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
767
+ main: string;
768
+ }, {
769
+ payload: string;
770
+ }, "core:outlet/set-lorebook-annex-field@1"> & {
771
+ kind: 'outlet';
772
+ slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
773
+ }>;
774
+ /**
775
+ * 🚧 Move the session's rules to another version of their ruleset (M0,
776
+ * SHAPES L4 Conversion): built-in and owner-only, also the socket
777
+ * `sessions:convertRuleset`. Per session it re-keys renamed slots, retracts
778
+ * removed ones and inserts defaults for added ones β€” each an anchored change,
779
+ * retractable β€” then sets the session's ruleset version to `to`.
780
+ * @experimental
781
+ */
782
+ export declare const convertRuleset: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
783
+ main: string;
784
+ }, {
785
+ /** The ruleset version to move to (semver). */
786
+ to: string;
787
+ }, "core:outlet/convert-ruleset@1"> & {
788
+ kind: 'outlet';
789
+ slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
790
+ }>;
714
791
  /**
715
792
  * Record an event your package declared: something happened, and
716
793
  * pipelines bound to it β€” plugin listeners, and widgets when the event is
@@ -963,6 +1040,25 @@ export declare const offerMedia: import("@serene-pub/sdk").Pinned<import("@seren
963
1040
  kind: 'outlet';
964
1041
  slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
965
1042
  }>;
1043
+ /**
1044
+ * 🚧 **A clock target** β€” the value of `core:shape/clock-target@1`
1045
+ * (`S.clockTarget`; M0, SHAPES L3): an hour and, optionally, a minute
1046
+ * within a story day. `day` says which day: `next` (the default) β€” today when
1047
+ * the moment is still ahead, tomorrow when it is not ("sleep until 07:00");
1048
+ * `today` β€” refused when the moment is not ahead; `tomorrow`. A clock target
1049
+ * never moves the clock back. What `advance-story-clock@1` moves `to` and
1050
+ * (once ruled) the hour `cast-presences@1` reads. ⚠ Not a `StoryTime`: it names a moment of a
1051
+ * day, never a date.
1052
+ * @experimental
1053
+ */
1054
+ export interface ClockTargetV1 {
1055
+ /** 0–23. */
1056
+ hour: number;
1057
+ /** 0–59; absent is 0. */
1058
+ minute?: number;
1059
+ /** Absent is `next`. */
1060
+ day?: 'today' | 'tomorrow' | 'next';
1061
+ }
966
1062
  /**
967
1063
  * Move a session's **story clock** β€” the session's own story now β€” by `by` of
968
1064
  * `unit`, through its lorebook's calendar (`advanceStoryTime`): carried by a
@@ -1000,11 +1096,27 @@ export declare const advanceStoryClock: import("@serene-pub/sdk").Pinned<import(
1000
1096
  skipped: string;
1001
1097
  /** It spelled through the book's calendar. */
1002
1098
  label: string;
1099
+ /**
1100
+ * 🚧 The minutes a `to` move moved the clock (M0, T1) β€” 0
1101
+ * when it stood where it was or was refused under `skip`, with
1102
+ * no ledger row. Absent on a `by` move.
1103
+ */
1104
+ moved: string;
1003
1105
  }, {
1004
1106
  /** A whole number; wins over the `by` parameter when wired. */
1005
1107
  by: string;
1006
1108
  /** One of the units; wins over the `unit` parameter when wired. */
1007
1109
  unit: string;
1110
+ /**
1111
+ * 🚧 **Where the clock moves to** (M0, SHAPES L3), a
1112
+ * `ClockTargetV1` β€” the second input shape: an absolute moment
1113
+ * within the day ("sleep until 07:00") instead of a relative
1114
+ * `by`. Exactly one of the `by` and `to` in-ports may be wired;
1115
+ * both is refused with a sentence naming both. Wired, the `by`
1116
+ * and `unit` parameters are not read. One ledger move either
1117
+ * way, retractable as every move is.
1118
+ */
1119
+ to: string;
1008
1120
  /**
1009
1121
  * 🚧 **Why the clock moves** (live scenes Β§15 G4, 2026-10-13),
1010
1122
  * a literal: `'action'` β€” a person's press (*Time passes…*);
@@ -1133,15 +1245,42 @@ export declare const answerForm: import("@serene-pub/sdk").Pinned<import("@seren
1133
1245
  kind: 'outlet';
1134
1246
  slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
1135
1247
  }>;
1136
- /** The audio twin of `attach-image` β€” same `target`, same commit, bound the same day. @experimental */
1248
+ /**
1249
+ * The audio twin of `attach-image` β€” same `target`, same commit, bound the same day.
1250
+ *
1251
+ * 🚧 Speech (seam S3, 2026-10-28): `meta` is the `SpokenMeta` record
1252
+ * `core:oracle/speak@1` publishes, kept in the line's metadata for the swipe
1253
+ * (`spoken`) beside the audio part; `replace` swaps the line's earlier spoken
1254
+ * audio rather than adding a second part β€” what re-speaking a line does.
1255
+ * @experimental
1256
+ */
1137
1257
  export declare const attachAudio: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
1138
1258
  main: string;
1139
1259
  }, {
1140
1260
  target: string;
1141
1261
  audio: string;
1262
+ /** 🚧 `SpokenMeta` β€” absent writes the audio part alone. */
1263
+ meta: string;
1142
1264
  }, "core:outlet/attach-audio@1"> & {
1143
1265
  kind: 'outlet';
1144
- slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
1266
+ slots?: {
1267
+ readonly params: {
1268
+ readonly kind: "parameters";
1269
+ readonly facet: "behavior";
1270
+ readonly schema: {
1271
+ readonly replace: {
1272
+ readonly type: "boolean";
1273
+ readonly default: false;
1274
+ readonly label: {
1275
+ readonly en: "Replace earlier speech";
1276
+ };
1277
+ readonly description: {
1278
+ readonly en: "Swap the line's spoken audio for this one instead of adding a second part.";
1279
+ };
1280
+ };
1281
+ };
1282
+ };
1283
+ } | undefined;
1145
1284
  }>;
1146
1285
  /**
1147
1286
  * Write the finished entry. Gate-eligible, so it publishes a write result.
@@ -1526,4 +1665,92 @@ export declare const graphProposal: import("@serene-pub/sdk").Pinned<import("@se
1526
1665
  kind: 'outlet';
1527
1666
  slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
1528
1667
  }>;
1668
+ /**
1669
+ * Make a character: write one character card into the acting person's library.
1670
+ *
1671
+ * Takes `card` β€” a V3 card `{ spec: 'chara_card_v3', data }`, its `data`, or a
1672
+ * plain `{ name, description, personality?, scenario?, first_mes?,
1673
+ * mes_example?, creator_notes?, tags? }`, exactly what the app's card reader
1674
+ * takes. Writes one character row (or, under the person's library write mode,
1675
+ * a proposal for it); `characterId` is the new row's id, or absent while the
1676
+ * write waits.
1677
+ *
1678
+ * ⚠ The app, not the pipeline, judges the write: it finds the person acting
1679
+ * for the run, and their **library write mode** decides whether the card lands
1680
+ * now (Full), waits for them to accept it in the session (Review, the
1681
+ * default), or is refused (Off). A genre must also declare
1682
+ * `writes.library.characters`, or the host refuses the write.
1683
+ * @internal
1684
+ */
1685
+ export declare const createCharacter: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
1686
+ main: string;
1687
+ characterId: string;
1688
+ }, {
1689
+ card: string;
1690
+ }, "core:outlet/create-character@1"> & {
1691
+ kind: 'outlet';
1692
+ slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
1693
+ }>;
1694
+ /**
1695
+ * Change a character: edit the text fields of a character the acting person
1696
+ * may write to.
1697
+ *
1698
+ * Takes `characterId` and `changes` β€” an object of the card's text fields
1699
+ * (name, description, personality, scenario, first_mes, mes_example). Writes
1700
+ * those fields on that character, and nothing else; the fields it replaced are
1701
+ * kept so Back can restore them. The app judges the person (write rights on
1702
+ * the character) and their library write mode (Full, Review or Off); a genre
1703
+ * must declare `writes.library.characters`.
1704
+ * @internal
1705
+ */
1706
+ export declare const updateCharacter: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
1707
+ main: string;
1708
+ characterId: string;
1709
+ }, {
1710
+ characterId: string;
1711
+ changes: string;
1712
+ }, "core:outlet/update-character@1"> & {
1713
+ kind: 'outlet';
1714
+ slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
1715
+ }>;
1716
+ /**
1717
+ * Make a lorebook: write one lorebook into the acting person's library.
1718
+ *
1719
+ * Takes `lorebook` β€” a lorebook document as Lorebooks β€Ί Import reads it (a
1720
+ * SillyTavern world-info JSON is the safe shape: `{ name, description?,
1721
+ * entries }`). Writes a lorebook and its entries (or, under the person's
1722
+ * library write mode, a proposal for them); `lorebookId` is the new book's id.
1723
+ * The app judges the person and their library write mode (Full, Review or
1724
+ * Off); a genre must declare `writes.library.lorebooks`.
1725
+ * @internal
1726
+ */
1727
+ export declare const createLorebook: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
1728
+ main: string;
1729
+ lorebookId: string;
1730
+ }, {
1731
+ lorebook: string;
1732
+ }, "core:outlet/create-lorebook@1"> & {
1733
+ kind: 'outlet';
1734
+ slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
1735
+ }>;
1736
+ /**
1737
+ * Read a lorebook into a session: attach an existing lorebook to a session.
1738
+ *
1739
+ * Takes `lorebookId` and, optionally, `sessionId` (absent: the run's own
1740
+ * session). Writes the session's lorebook; what it replaced is kept so Back
1741
+ * can restore it. The app judges the person (read rights on the book and write
1742
+ * rights on the session) and their library write mode (Full, Review or Off).
1743
+ * A genre must declare `writes.library.lorebooks`, and
1744
+ * `writes.library.sessions` to name a session other than the run's.
1745
+ * @internal
1746
+ */
1747
+ export declare const attachLorebook: import("@serene-pub/sdk").Pinned<import("@serene-pub/sdk").Descriptor<{
1748
+ main: string;
1749
+ }, {
1750
+ lorebookId: string;
1751
+ sessionId: string;
1752
+ }, "core:outlet/attach-lorebook@1"> & {
1753
+ kind: 'outlet';
1754
+ slots?: Record<string, import("@serene-pub/sdk").SlotDecl> | undefined;
1755
+ }>;
1529
1756
  //# sourceMappingURL=outlets.d.ts.map