@promptbook/editable 0.112.0-49 → 0.112.0-50

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.
Files changed (35) hide show
  1. package/esm/index.es.js +1 -1
  2. package/esm/src/avatars/visuals/octopus3AvatarVisual.d.ts +72 -0
  3. package/esm/src/avatars/visuals/octopus3AvatarVisual.test.d.ts +1 -0
  4. package/esm/src/avatars/visuals/octopusAvatarVisualShared.d.ts +16 -0
  5. package/esm/src/book-components/BookEditor/BookEditor.d.ts +9 -0
  6. package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +10 -2
  7. package/esm/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
  8. package/esm/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +4 -0
  9. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +9 -0
  10. package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +1 -0
  11. package/esm/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +2 -1
  12. package/esm/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +4 -0
  13. package/esm/src/book-components/Chat/CodeBlock/CodeBlock.d.ts +2 -1
  14. package/esm/src/speech-recognition/OpenAiSpeechRecognition.d.ts +24 -2
  15. package/esm/src/speech-recognition/OpenAiSpeechRecognition.test.d.ts +1 -0
  16. package/esm/src/types/SpeechRecognition.d.ts +4 -0
  17. package/esm/src/version.d.ts +1 -1
  18. package/package.json +2 -2
  19. package/umd/index.umd.js +1 -1
  20. package/umd/src/avatars/visuals/octopus3AvatarVisual.d.ts +72 -0
  21. package/umd/src/avatars/visuals/octopus3AvatarVisual.test.d.ts +1 -0
  22. package/umd/src/avatars/visuals/octopusAvatarVisualShared.d.ts +16 -0
  23. package/umd/src/book-components/BookEditor/BookEditor.d.ts +9 -0
  24. package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +10 -2
  25. package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
  26. package/umd/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +4 -0
  27. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +9 -0
  28. package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +1 -0
  29. package/umd/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +2 -1
  30. package/umd/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +4 -0
  31. package/umd/src/book-components/Chat/CodeBlock/CodeBlock.d.ts +2 -1
  32. package/umd/src/speech-recognition/OpenAiSpeechRecognition.d.ts +24 -2
  33. package/umd/src/speech-recognition/OpenAiSpeechRecognition.test.d.ts +1 -0
  34. package/umd/src/types/SpeechRecognition.d.ts +4 -0
  35. package/umd/src/version.d.ts +1 -1
package/esm/index.es.js CHANGED
@@ -17,7 +17,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
17
17
  * @generated
18
18
  * @see https://github.com/webgptorg/promptbook
19
19
  */
20
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-49';
20
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-50';
21
21
  /**
22
22
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
23
23
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1,4 +1,76 @@
1
1
  import type { AvatarVisualDefinition } from '../types/AvatarVisualDefinition';
2
+ /**
3
+ * Deterministic morphology knobs that keep `Octopus3` recognizable while widening seeded body, face, and tentacle variety.
4
+ *
5
+ * @private helper of `octopus3AvatarVisual`
6
+ */
7
+ export type Octopus3MorphologyProfile = {
8
+ readonly bodyFamily: 'lantern' | 'drifter' | 'rounded';
9
+ readonly faceFamily: 'watchful' | 'sleepy' | 'mischief';
10
+ readonly body: {
11
+ readonly centerXJitterRatio: number;
12
+ readonly centerYRatio: number;
13
+ readonly bodyRadiusRatio: number;
14
+ readonly horizontalStretch: number;
15
+ readonly verticalStretch: number;
16
+ readonly mantleLiftRatio: number;
17
+ readonly lowerDropRatio: number;
18
+ readonly tentacleDepthRatio: number;
19
+ readonly wobbleAmplitudeRatio: number;
20
+ readonly lobeCount: number;
21
+ readonly pointCount: number;
22
+ readonly shadowWidthRatio: number;
23
+ readonly shadowHeightRatio: number;
24
+ readonly crownHighlightWidthRatio: number;
25
+ readonly crownHighlightHeightRatio: number;
26
+ readonly crownHighlightYOffsetRatio: number;
27
+ };
28
+ readonly tentacles: {
29
+ readonly count: number;
30
+ readonly flowLengthScale: number;
31
+ readonly lateralReachScale: number;
32
+ readonly tipReachScale: number;
33
+ readonly baseWidthScale: number;
34
+ readonly tipWidthScale: number;
35
+ readonly rootSpreadScale: number;
36
+ readonly startYOffsetScale: number;
37
+ readonly swayScale: number;
38
+ };
39
+ readonly face: {
40
+ readonly eyeSpacingRatio: number;
41
+ readonly eyeCenterYOffsetRatio: number;
42
+ readonly eyeRadiusXRatio: number;
43
+ readonly eyeHeightRatio: number;
44
+ readonly eyeRotationRange: number;
45
+ readonly eyeTiltBias: number;
46
+ readonly mouthWidthRatio: number;
47
+ readonly mouthYOffsetRatio: number;
48
+ readonly mouthCurveDepthRatio: number;
49
+ readonly mouthCenterOffsetRatio: number;
50
+ readonly mouthCornerTiltRatio: number;
51
+ readonly eyeStyle: {
52
+ readonly irisScale: number;
53
+ readonly pupilWidthScale: number;
54
+ readonly pupilHeightScale: number;
55
+ readonly upperLidArchRatio: number;
56
+ readonly upperLidInsetRatio: number;
57
+ readonly lowerLidOpacity: number;
58
+ };
59
+ };
60
+ readonly details: {
61
+ readonly mantleCurrentCount: number;
62
+ readonly mantleNodeCount: number;
63
+ };
64
+ };
65
+ /**
66
+ * Builds one deterministic morphology profile for `Octopus3`.
67
+ *
68
+ * @param createRandom Seeded random factory scoped to the current avatar.
69
+ * @returns Stable morphology profile.
70
+ *
71
+ * @private helper of `octopus3AvatarVisual`
72
+ */
73
+ export declare function createOctopus3MorphologyProfile(createRandom: (salt: string) => () => number): Octopus3MorphologyProfile;
2
74
  /**
3
75
  * Octopus3 avatar visual.
4
76
  *
@@ -61,6 +61,22 @@ type CreateOrganicOctopusTentacleShapesOptions = {
61
61
  readonly timeMs: number;
62
62
  readonly saltPrefix: string;
63
63
  readonly bodyPoints?: ReadonlyArray<Point>;
64
+ readonly variation?: OrganicTentacleVariationOptions;
65
+ };
66
+ /**
67
+ * Opt-in shape multipliers that let one visual broaden or tighten the shared tentacle generator.
68
+ *
69
+ * @private shared geometry helper of `octopus3AvatarVisual` and `asciiOctopusAvatarVisual`
70
+ */
71
+ type OrganicTentacleVariationOptions = {
72
+ readonly flowLengthScale?: number;
73
+ readonly lateralReachScale?: number;
74
+ readonly tipReachScale?: number;
75
+ readonly baseWidthScale?: number;
76
+ readonly tipWidthScale?: number;
77
+ readonly rootSpreadScale?: number;
78
+ readonly startYOffsetScale?: number;
79
+ readonly swayScale?: number;
64
80
  };
65
81
  /**
66
82
  * One sampled ribbon point on an organic octopus tentacle.
@@ -90,6 +90,15 @@ export type BookEditorProps = {
90
90
  * Optional CSS style which will be added to root <div/> element
91
91
  */
92
92
  readonly style?: CSSProperties;
93
+ /**
94
+ * Resolved visual theme used for the editor wrapper and Monaco instance.
95
+ *
96
+ * Host applications should pass the final light/dark theme instead of relying on
97
+ * browser media-query inference inside `<BookEditor/>`.
98
+ *
99
+ * @default 'LIGHT'
100
+ */
101
+ readonly theme?: 'LIGHT' | 'DARK';
93
102
  /**
94
103
  * Height of the `BookEditor` component
95
104
  *
@@ -3,11 +3,18 @@ import type { editor } from 'monaco-editor';
3
3
  * Type describing monaco editor.
4
4
  */
5
5
  type MonacoEditor = typeof import('monaco-editor');
6
+ /**
7
+ * Resolved visual theme supported by the Book editor.
8
+ *
9
+ * @private function of BookEditorMonaco
10
+ */
11
+ type BookEditorTheme = 'LIGHT' | 'DARK';
6
12
  /**
7
13
  * Props for use book editor monaco language.
8
14
  */
9
15
  type UseBookEditorMonacoLanguageProps = {
10
16
  readonly monaco: MonacoEditor | null;
17
+ readonly theme: BookEditorTheme;
11
18
  };
12
19
  /**
13
20
  * Ensures the BookEditor Monaco language, tokenizer, links and completion providers are
@@ -15,7 +22,7 @@ type UseBookEditorMonacoLanguageProps = {
15
22
  *
16
23
  * @private function of BookEditorMonaco
17
24
  */
18
- export declare function ensureBookEditorMonacoLanguage(monaco: MonacoEditor): void;
25
+ export declare function ensureBookEditorMonacoLanguage(monaco: MonacoEditor, theme?: BookEditorTheme): void;
19
26
  /**
20
27
  * Props required to enforce Book Monaco language/theme on one mounted editor.
21
28
  *
@@ -24,6 +31,7 @@ export declare function ensureBookEditorMonacoLanguage(monaco: MonacoEditor): vo
24
31
  type EnsureBookEditorMonacoLanguageForEditorProps = {
25
32
  readonly monaco: MonacoEditor;
26
33
  readonly monacoEditor: editor.IStandaloneCodeEditor;
34
+ readonly theme?: BookEditorTheme;
27
35
  };
28
36
  /**
29
37
  * Ensures the mounted Monaco editor model uses Book language and Book theme.
@@ -41,5 +49,5 @@ export declare function ensureBookEditorMonacoLanguageForEditor(props: EnsureBoo
41
49
  *
42
50
  * @private function of BookEditorMonaco
43
51
  */
44
- export declare function useBookEditorMonacoLanguage({ monaco }: UseBookEditorMonacoLanguageProps): void;
52
+ export declare function useBookEditorMonacoLanguage({ monaco, theme }: UseBookEditorMonacoLanguageProps): void;
45
53
  export {};
@@ -7,11 +7,12 @@ type UseBookEditorMonacoStylesProps = {
7
7
  readonly scaledContentPaddingLeft: number;
8
8
  readonly scaledVerticalLineLeft: number;
9
9
  readonly zoomLevel: number;
10
+ readonly theme: 'LIGHT' | 'DARK';
10
11
  };
11
12
  /**
12
13
  * Injects notebook-inspired styling that is unique per `BookEditorMonaco` instance.
13
14
  *
14
15
  * @private function of BookEditorMonaco
15
16
  */
16
- export declare function useBookEditorMonacoStyles({ instanceClass, scaledLineHeight, scaledContentPaddingLeft, scaledVerticalLineLeft, zoomLevel, }: UseBookEditorMonacoStylesProps): void;
17
+ export declare function useBookEditorMonacoStyles({ instanceClass, scaledLineHeight, scaledContentPaddingLeft, scaledVerticalLineLeft, zoomLevel, theme, }: UseBookEditorMonacoStylesProps): void;
17
18
  export {};
@@ -23,6 +23,10 @@ export type ChatMessageRichContentProps = {
23
23
  * Optional callback for creating a new agent from a book code block.
24
24
  */
25
25
  readonly onCreateAgent?: (bookContent: string) => void;
26
+ /**
27
+ * Resolved theme used by nested code blocks and editors.
28
+ */
29
+ readonly mode: 'LIGHT' | 'DARK';
26
30
  };
27
31
  /**
28
32
  * Renders markdown, code blocks, maps, and generated-image placeholders for one message.
@@ -748,6 +748,15 @@ export type ChatProps = {
748
748
  * @default 'ARTICLE_MODE'
749
749
  */
750
750
  readonly visualMode?: ChatVisualMode;
751
+ /**
752
+ * Resolved visual theme used for chat surfaces, modals, and embedded Monaco viewers.
753
+ *
754
+ * Host applications should pass the final light/dark theme here instead of leaving
755
+ * `<Chat/>` to infer anything from the document.
756
+ *
757
+ * @default 'LIGHT'
758
+ */
759
+ readonly theme?: 'LIGHT' | 'DARK';
751
760
  /**
752
761
  * Layout of the chat component
753
762
  */
@@ -11,6 +11,7 @@ import type { ChatParticipant } from '../types/ChatParticipant';
11
11
  export type ChatToolCallModalProps = {
12
12
  isOpen: boolean;
13
13
  toolCall: NonNullable<ChatMessage['toolCalls']>[number] | null;
14
+ mode?: 'LIGHT' | 'DARK';
14
15
  /**
15
16
  * Stable identity of the selected tool call.
16
17
  *
@@ -26,6 +26,7 @@ type ChatToolCallModalContentProps = {
26
26
  readonly focusedToolCall: ToolCallModalToolCall;
27
27
  readonly isAdvancedView: boolean;
28
28
  readonly locale?: string;
29
+ readonly mode: 'LIGHT' | 'DARK';
29
30
  readonly onClearSelectedTeamToolCall: () => void;
30
31
  readonly onRequestAdvancedView: () => void;
31
32
  readonly onSelectTeamToolCall: (toolCall: TransitiveToolCall) => void;
@@ -42,5 +43,5 @@ type ChatToolCallModalContentProps = {
42
43
  *
43
44
  * @private component of `ChatToolCallModal`
44
45
  */
45
- export declare function ChatToolCallModalContent({ agentParticipant, availableTools, buttonColor, chatUiTranslations, focusedToolCall, isAdvancedView, locale, onClearSelectedTeamToolCall, onRequestAdvancedView, onSelectTeamToolCall, selectedTeamToolCall, teamProfiles, teamResult, teamToolCallSummary, toolCall, toolCallDate, toolTitles, }: ChatToolCallModalContentProps): ReactElement;
46
+ export declare function ChatToolCallModalContent({ agentParticipant, availableTools, buttonColor, chatUiTranslations, focusedToolCall, isAdvancedView, locale, mode, onClearSelectedTeamToolCall, onRequestAdvancedView, onSelectTeamToolCall, selectedTeamToolCall, teamProfiles, teamResult, teamToolCallSummary, toolCall, toolCallDate, toolTitles, }: ChatToolCallModalContentProps): ReactElement;
46
47
  export {};
@@ -18,6 +18,10 @@ type AdvancedToolCallDetailsOptions = {
18
18
  * Optional list of tools that were available to the model during the turn that produced this tool call.
19
19
  */
20
20
  availableTools?: ChatMessage['availableTools'];
21
+ /**
22
+ * Resolved theme used by embedded Monaco viewers in the advanced modal.
23
+ */
24
+ mode?: 'LIGHT' | 'DARK';
21
25
  };
22
26
  /**
23
27
  * Renders a technical view with raw tool input/output payloads.
@@ -8,11 +8,12 @@ type CodeBlockProps = {
8
8
  language?: string;
9
9
  className?: string;
10
10
  onCreateAgent?: (bookContent: string) => void;
11
+ theme?: 'LIGHT' | 'DARK';
11
12
  };
12
13
  /**
13
14
  * Component to render a code block with syntax highlighting, copy, download, and create agent options.
14
15
  *
15
16
  * @private Internal utility of `<ChatMessage />` component
16
17
  */
17
- export declare function CodeBlock({ code, language, className, onCreateAgent }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function CodeBlock({ code, language, className, onCreateAgent, theme }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
18
19
  export {};
@@ -10,7 +10,7 @@ export type OpenAiSpeechRecognitionOptions = {
10
10
  readonly baseUrl?: string;
11
11
  };
12
12
  /**
13
- * Speech recognition using OpenAI Whisper API to transcribe audio into text
13
+ * Speech recognition using the OpenAI transcription API to transcribe audio into text
14
14
  *
15
15
  * Note: This implementation uses a server-side proxy to avoid exposing the OpenAI API key on the client.
16
16
  *
@@ -34,6 +34,7 @@ export declare class OpenAiSpeechRecognition implements SpeechRecognition {
34
34
  private ambientNoiseLevel;
35
35
  private voiceLevelMultiplier;
36
36
  private silenceAutoStopDelayMs;
37
+ private recordingMimeType;
37
38
  get state(): SpeechRecognitionState;
38
39
  constructor(options?: OpenAiSpeechRecognitionOptions);
39
40
  $start(options?: SpeechRecognitionStartOptions): Promise<void>;
@@ -42,7 +43,7 @@ export declare class OpenAiSpeechRecognition implements SpeechRecognition {
42
43
  /**
43
44
  * Handles `MediaRecorder.onstop` by releasing audio resources and forwarding the clip to transcription.
44
45
  *
45
- * @param language Optional language hint for Whisper.
46
+ * @param language Optional language hint for OpenAI transcription.
46
47
  */
47
48
  private handleRecorderStop;
48
49
  /**
@@ -81,3 +82,24 @@ export declare class OpenAiSpeechRecognition implements SpeechRecognition {
81
82
  subscribe(callback: (event: SpeechRecognitionEvent) => void): () => void;
82
83
  private emit;
83
84
  }
85
+ /**
86
+ * Resolves the preferred recorder output format supported by the current browser.
87
+ *
88
+ * @private internal utility of `OpenAiSpeechRecognition`
89
+ */
90
+ export declare function resolveOpenAiSpeechRecognitionPreferredRecordingFormat(): {
91
+ readonly mimeType: string;
92
+ readonly fileExtension: string;
93
+ } | undefined;
94
+ /**
95
+ * Resolves the MIME type and filename for one recorded audio upload.
96
+ *
97
+ * @private internal utility of `OpenAiSpeechRecognition`
98
+ */
99
+ export declare function resolveOpenAiSpeechRecognitionAudioFileDescriptor(options: {
100
+ readonly recorderMimeType?: string;
101
+ readonly audioChunks: ReadonlyArray<Blob>;
102
+ }): {
103
+ readonly mimeType: string;
104
+ readonly fileName: string;
105
+ };
@@ -44,6 +44,10 @@ export type SpeechRecognitionStartOptions = {
44
44
  * Enables a more sensitive profile for quiet speech.
45
45
  */
46
46
  readonly whisperMode?: boolean;
47
+ /**
48
+ * Optional text prompt used to preserve continuity across multiple transcription chunks.
49
+ */
50
+ readonly transcriptionPrompt?: string;
47
51
  };
48
52
  /**
49
53
  * Current state of the speech recognition
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.112.0-48`).
18
+ * It follows semantic versioning (e.g., `0.112.0-49`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/editable",
3
- "version": "0.112.0-49",
3
+ "version": "0.112.0-50",
4
4
  "description": "Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -99,7 +99,7 @@
99
99
  "types": "./esm/src/_packages/editable.index.d.ts",
100
100
  "typings": "./esm/src/_packages/editable.index.d.ts",
101
101
  "peerDependencies": {
102
- "@promptbook/core": "0.112.0-49"
102
+ "@promptbook/core": "0.112.0-50"
103
103
  },
104
104
  "dependencies": {
105
105
  "crypto-js": "4.2.0",
package/umd/index.umd.js CHANGED
@@ -22,7 +22,7 @@
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-49';
25
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-50';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1,4 +1,76 @@
1
1
  import type { AvatarVisualDefinition } from '../types/AvatarVisualDefinition';
2
+ /**
3
+ * Deterministic morphology knobs that keep `Octopus3` recognizable while widening seeded body, face, and tentacle variety.
4
+ *
5
+ * @private helper of `octopus3AvatarVisual`
6
+ */
7
+ export type Octopus3MorphologyProfile = {
8
+ readonly bodyFamily: 'lantern' | 'drifter' | 'rounded';
9
+ readonly faceFamily: 'watchful' | 'sleepy' | 'mischief';
10
+ readonly body: {
11
+ readonly centerXJitterRatio: number;
12
+ readonly centerYRatio: number;
13
+ readonly bodyRadiusRatio: number;
14
+ readonly horizontalStretch: number;
15
+ readonly verticalStretch: number;
16
+ readonly mantleLiftRatio: number;
17
+ readonly lowerDropRatio: number;
18
+ readonly tentacleDepthRatio: number;
19
+ readonly wobbleAmplitudeRatio: number;
20
+ readonly lobeCount: number;
21
+ readonly pointCount: number;
22
+ readonly shadowWidthRatio: number;
23
+ readonly shadowHeightRatio: number;
24
+ readonly crownHighlightWidthRatio: number;
25
+ readonly crownHighlightHeightRatio: number;
26
+ readonly crownHighlightYOffsetRatio: number;
27
+ };
28
+ readonly tentacles: {
29
+ readonly count: number;
30
+ readonly flowLengthScale: number;
31
+ readonly lateralReachScale: number;
32
+ readonly tipReachScale: number;
33
+ readonly baseWidthScale: number;
34
+ readonly tipWidthScale: number;
35
+ readonly rootSpreadScale: number;
36
+ readonly startYOffsetScale: number;
37
+ readonly swayScale: number;
38
+ };
39
+ readonly face: {
40
+ readonly eyeSpacingRatio: number;
41
+ readonly eyeCenterYOffsetRatio: number;
42
+ readonly eyeRadiusXRatio: number;
43
+ readonly eyeHeightRatio: number;
44
+ readonly eyeRotationRange: number;
45
+ readonly eyeTiltBias: number;
46
+ readonly mouthWidthRatio: number;
47
+ readonly mouthYOffsetRatio: number;
48
+ readonly mouthCurveDepthRatio: number;
49
+ readonly mouthCenterOffsetRatio: number;
50
+ readonly mouthCornerTiltRatio: number;
51
+ readonly eyeStyle: {
52
+ readonly irisScale: number;
53
+ readonly pupilWidthScale: number;
54
+ readonly pupilHeightScale: number;
55
+ readonly upperLidArchRatio: number;
56
+ readonly upperLidInsetRatio: number;
57
+ readonly lowerLidOpacity: number;
58
+ };
59
+ };
60
+ readonly details: {
61
+ readonly mantleCurrentCount: number;
62
+ readonly mantleNodeCount: number;
63
+ };
64
+ };
65
+ /**
66
+ * Builds one deterministic morphology profile for `Octopus3`.
67
+ *
68
+ * @param createRandom Seeded random factory scoped to the current avatar.
69
+ * @returns Stable morphology profile.
70
+ *
71
+ * @private helper of `octopus3AvatarVisual`
72
+ */
73
+ export declare function createOctopus3MorphologyProfile(createRandom: (salt: string) => () => number): Octopus3MorphologyProfile;
2
74
  /**
3
75
  * Octopus3 avatar visual.
4
76
  *
@@ -61,6 +61,22 @@ type CreateOrganicOctopusTentacleShapesOptions = {
61
61
  readonly timeMs: number;
62
62
  readonly saltPrefix: string;
63
63
  readonly bodyPoints?: ReadonlyArray<Point>;
64
+ readonly variation?: OrganicTentacleVariationOptions;
65
+ };
66
+ /**
67
+ * Opt-in shape multipliers that let one visual broaden or tighten the shared tentacle generator.
68
+ *
69
+ * @private shared geometry helper of `octopus3AvatarVisual` and `asciiOctopusAvatarVisual`
70
+ */
71
+ type OrganicTentacleVariationOptions = {
72
+ readonly flowLengthScale?: number;
73
+ readonly lateralReachScale?: number;
74
+ readonly tipReachScale?: number;
75
+ readonly baseWidthScale?: number;
76
+ readonly tipWidthScale?: number;
77
+ readonly rootSpreadScale?: number;
78
+ readonly startYOffsetScale?: number;
79
+ readonly swayScale?: number;
64
80
  };
65
81
  /**
66
82
  * One sampled ribbon point on an organic octopus tentacle.
@@ -90,6 +90,15 @@ export type BookEditorProps = {
90
90
  * Optional CSS style which will be added to root <div/> element
91
91
  */
92
92
  readonly style?: CSSProperties;
93
+ /**
94
+ * Resolved visual theme used for the editor wrapper and Monaco instance.
95
+ *
96
+ * Host applications should pass the final light/dark theme instead of relying on
97
+ * browser media-query inference inside `<BookEditor/>`.
98
+ *
99
+ * @default 'LIGHT'
100
+ */
101
+ readonly theme?: 'LIGHT' | 'DARK';
93
102
  /**
94
103
  * Height of the `BookEditor` component
95
104
  *
@@ -3,11 +3,18 @@ import type { editor } from 'monaco-editor';
3
3
  * Type describing monaco editor.
4
4
  */
5
5
  type MonacoEditor = typeof import('monaco-editor');
6
+ /**
7
+ * Resolved visual theme supported by the Book editor.
8
+ *
9
+ * @private function of BookEditorMonaco
10
+ */
11
+ type BookEditorTheme = 'LIGHT' | 'DARK';
6
12
  /**
7
13
  * Props for use book editor monaco language.
8
14
  */
9
15
  type UseBookEditorMonacoLanguageProps = {
10
16
  readonly monaco: MonacoEditor | null;
17
+ readonly theme: BookEditorTheme;
11
18
  };
12
19
  /**
13
20
  * Ensures the BookEditor Monaco language, tokenizer, links and completion providers are
@@ -15,7 +22,7 @@ type UseBookEditorMonacoLanguageProps = {
15
22
  *
16
23
  * @private function of BookEditorMonaco
17
24
  */
18
- export declare function ensureBookEditorMonacoLanguage(monaco: MonacoEditor): void;
25
+ export declare function ensureBookEditorMonacoLanguage(monaco: MonacoEditor, theme?: BookEditorTheme): void;
19
26
  /**
20
27
  * Props required to enforce Book Monaco language/theme on one mounted editor.
21
28
  *
@@ -24,6 +31,7 @@ export declare function ensureBookEditorMonacoLanguage(monaco: MonacoEditor): vo
24
31
  type EnsureBookEditorMonacoLanguageForEditorProps = {
25
32
  readonly monaco: MonacoEditor;
26
33
  readonly monacoEditor: editor.IStandaloneCodeEditor;
34
+ readonly theme?: BookEditorTheme;
27
35
  };
28
36
  /**
29
37
  * Ensures the mounted Monaco editor model uses Book language and Book theme.
@@ -41,5 +49,5 @@ export declare function ensureBookEditorMonacoLanguageForEditor(props: EnsureBoo
41
49
  *
42
50
  * @private function of BookEditorMonaco
43
51
  */
44
- export declare function useBookEditorMonacoLanguage({ monaco }: UseBookEditorMonacoLanguageProps): void;
52
+ export declare function useBookEditorMonacoLanguage({ monaco, theme }: UseBookEditorMonacoLanguageProps): void;
45
53
  export {};
@@ -7,11 +7,12 @@ type UseBookEditorMonacoStylesProps = {
7
7
  readonly scaledContentPaddingLeft: number;
8
8
  readonly scaledVerticalLineLeft: number;
9
9
  readonly zoomLevel: number;
10
+ readonly theme: 'LIGHT' | 'DARK';
10
11
  };
11
12
  /**
12
13
  * Injects notebook-inspired styling that is unique per `BookEditorMonaco` instance.
13
14
  *
14
15
  * @private function of BookEditorMonaco
15
16
  */
16
- export declare function useBookEditorMonacoStyles({ instanceClass, scaledLineHeight, scaledContentPaddingLeft, scaledVerticalLineLeft, zoomLevel, }: UseBookEditorMonacoStylesProps): void;
17
+ export declare function useBookEditorMonacoStyles({ instanceClass, scaledLineHeight, scaledContentPaddingLeft, scaledVerticalLineLeft, zoomLevel, theme, }: UseBookEditorMonacoStylesProps): void;
17
18
  export {};
@@ -23,6 +23,10 @@ export type ChatMessageRichContentProps = {
23
23
  * Optional callback for creating a new agent from a book code block.
24
24
  */
25
25
  readonly onCreateAgent?: (bookContent: string) => void;
26
+ /**
27
+ * Resolved theme used by nested code blocks and editors.
28
+ */
29
+ readonly mode: 'LIGHT' | 'DARK';
26
30
  };
27
31
  /**
28
32
  * Renders markdown, code blocks, maps, and generated-image placeholders for one message.
@@ -748,6 +748,15 @@ export type ChatProps = {
748
748
  * @default 'ARTICLE_MODE'
749
749
  */
750
750
  readonly visualMode?: ChatVisualMode;
751
+ /**
752
+ * Resolved visual theme used for chat surfaces, modals, and embedded Monaco viewers.
753
+ *
754
+ * Host applications should pass the final light/dark theme here instead of leaving
755
+ * `<Chat/>` to infer anything from the document.
756
+ *
757
+ * @default 'LIGHT'
758
+ */
759
+ readonly theme?: 'LIGHT' | 'DARK';
751
760
  /**
752
761
  * Layout of the chat component
753
762
  */
@@ -11,6 +11,7 @@ import type { ChatParticipant } from '../types/ChatParticipant';
11
11
  export type ChatToolCallModalProps = {
12
12
  isOpen: boolean;
13
13
  toolCall: NonNullable<ChatMessage['toolCalls']>[number] | null;
14
+ mode?: 'LIGHT' | 'DARK';
14
15
  /**
15
16
  * Stable identity of the selected tool call.
16
17
  *
@@ -26,6 +26,7 @@ type ChatToolCallModalContentProps = {
26
26
  readonly focusedToolCall: ToolCallModalToolCall;
27
27
  readonly isAdvancedView: boolean;
28
28
  readonly locale?: string;
29
+ readonly mode: 'LIGHT' | 'DARK';
29
30
  readonly onClearSelectedTeamToolCall: () => void;
30
31
  readonly onRequestAdvancedView: () => void;
31
32
  readonly onSelectTeamToolCall: (toolCall: TransitiveToolCall) => void;
@@ -42,5 +43,5 @@ type ChatToolCallModalContentProps = {
42
43
  *
43
44
  * @private component of `ChatToolCallModal`
44
45
  */
45
- export declare function ChatToolCallModalContent({ agentParticipant, availableTools, buttonColor, chatUiTranslations, focusedToolCall, isAdvancedView, locale, onClearSelectedTeamToolCall, onRequestAdvancedView, onSelectTeamToolCall, selectedTeamToolCall, teamProfiles, teamResult, teamToolCallSummary, toolCall, toolCallDate, toolTitles, }: ChatToolCallModalContentProps): ReactElement;
46
+ export declare function ChatToolCallModalContent({ agentParticipant, availableTools, buttonColor, chatUiTranslations, focusedToolCall, isAdvancedView, locale, mode, onClearSelectedTeamToolCall, onRequestAdvancedView, onSelectTeamToolCall, selectedTeamToolCall, teamProfiles, teamResult, teamToolCallSummary, toolCall, toolCallDate, toolTitles, }: ChatToolCallModalContentProps): ReactElement;
46
47
  export {};
@@ -18,6 +18,10 @@ type AdvancedToolCallDetailsOptions = {
18
18
  * Optional list of tools that were available to the model during the turn that produced this tool call.
19
19
  */
20
20
  availableTools?: ChatMessage['availableTools'];
21
+ /**
22
+ * Resolved theme used by embedded Monaco viewers in the advanced modal.
23
+ */
24
+ mode?: 'LIGHT' | 'DARK';
21
25
  };
22
26
  /**
23
27
  * Renders a technical view with raw tool input/output payloads.
@@ -8,11 +8,12 @@ type CodeBlockProps = {
8
8
  language?: string;
9
9
  className?: string;
10
10
  onCreateAgent?: (bookContent: string) => void;
11
+ theme?: 'LIGHT' | 'DARK';
11
12
  };
12
13
  /**
13
14
  * Component to render a code block with syntax highlighting, copy, download, and create agent options.
14
15
  *
15
16
  * @private Internal utility of `<ChatMessage />` component
16
17
  */
17
- export declare function CodeBlock({ code, language, className, onCreateAgent }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function CodeBlock({ code, language, className, onCreateAgent, theme }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
18
19
  export {};
@@ -10,7 +10,7 @@ export type OpenAiSpeechRecognitionOptions = {
10
10
  readonly baseUrl?: string;
11
11
  };
12
12
  /**
13
- * Speech recognition using OpenAI Whisper API to transcribe audio into text
13
+ * Speech recognition using the OpenAI transcription API to transcribe audio into text
14
14
  *
15
15
  * Note: This implementation uses a server-side proxy to avoid exposing the OpenAI API key on the client.
16
16
  *
@@ -34,6 +34,7 @@ export declare class OpenAiSpeechRecognition implements SpeechRecognition {
34
34
  private ambientNoiseLevel;
35
35
  private voiceLevelMultiplier;
36
36
  private silenceAutoStopDelayMs;
37
+ private recordingMimeType;
37
38
  get state(): SpeechRecognitionState;
38
39
  constructor(options?: OpenAiSpeechRecognitionOptions);
39
40
  $start(options?: SpeechRecognitionStartOptions): Promise<void>;
@@ -42,7 +43,7 @@ export declare class OpenAiSpeechRecognition implements SpeechRecognition {
42
43
  /**
43
44
  * Handles `MediaRecorder.onstop` by releasing audio resources and forwarding the clip to transcription.
44
45
  *
45
- * @param language Optional language hint for Whisper.
46
+ * @param language Optional language hint for OpenAI transcription.
46
47
  */
47
48
  private handleRecorderStop;
48
49
  /**
@@ -81,3 +82,24 @@ export declare class OpenAiSpeechRecognition implements SpeechRecognition {
81
82
  subscribe(callback: (event: SpeechRecognitionEvent) => void): () => void;
82
83
  private emit;
83
84
  }
85
+ /**
86
+ * Resolves the preferred recorder output format supported by the current browser.
87
+ *
88
+ * @private internal utility of `OpenAiSpeechRecognition`
89
+ */
90
+ export declare function resolveOpenAiSpeechRecognitionPreferredRecordingFormat(): {
91
+ readonly mimeType: string;
92
+ readonly fileExtension: string;
93
+ } | undefined;
94
+ /**
95
+ * Resolves the MIME type and filename for one recorded audio upload.
96
+ *
97
+ * @private internal utility of `OpenAiSpeechRecognition`
98
+ */
99
+ export declare function resolveOpenAiSpeechRecognitionAudioFileDescriptor(options: {
100
+ readonly recorderMimeType?: string;
101
+ readonly audioChunks: ReadonlyArray<Blob>;
102
+ }): {
103
+ readonly mimeType: string;
104
+ readonly fileName: string;
105
+ };
@@ -44,6 +44,10 @@ export type SpeechRecognitionStartOptions = {
44
44
  * Enables a more sensitive profile for quiet speech.
45
45
  */
46
46
  readonly whisperMode?: boolean;
47
+ /**
48
+ * Optional text prompt used to preserve continuity across multiple transcription chunks.
49
+ */
50
+ readonly transcriptionPrompt?: string;
47
51
  };
48
52
  /**
49
53
  * Current state of the speech recognition
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.112.0-48`).
18
+ * It follows semantic versioning (e.g., `0.112.0-49`).
19
19
  *
20
20
  * @generated
21
21
  */