@promptbook/types 0.112.0-46 → 0.112.0-48

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 (66) hide show
  1. package/README.md +16 -16
  2. package/esm/src/avatars/AvatarOrImage.d.ts +49 -0
  3. package/esm/src/avatars/avatarInteractionUtils.d.ts +81 -0
  4. package/esm/src/avatars/avatarInteractionUtils.test.d.ts +1 -0
  5. package/esm/src/avatars/avatarPointerTracking.d.ts +17 -0
  6. package/esm/src/avatars/avatarRenderingUtils.d.ts +3 -2
  7. package/esm/src/avatars/avatarRenderingUtils.test.d.ts +1 -0
  8. package/esm/src/avatars/index.d.ts +2 -1
  9. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +41 -1
  10. package/esm/src/avatars/visuals/asciiOctopusAvatarVisual.d.ts +7 -0
  11. package/esm/src/avatars/visuals/octopus3AvatarVisual.d.ts +7 -0
  12. package/esm/src/avatars/visuals/octopusAvatarVisualShared.d.ts +159 -0
  13. package/esm/src/avatars/visuals/octopusAvatarVisualShared.test.d.ts +1 -0
  14. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -1
  15. package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +1 -1
  16. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +1 -1
  17. package/esm/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +8 -2
  18. package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.test.d.ts +2 -0
  19. package/esm/src/book-components/Chat/hooks/useChatCompleteNotification.d.ts +2 -0
  20. package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +10 -0
  21. package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
  22. package/esm/src/commitments/USE/USE.d.ts +1 -0
  23. package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +1 -1
  24. package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +47 -0
  25. package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts +1 -0
  26. package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +12 -0
  27. package/esm/src/commitments/index.d.ts +2 -1
  28. package/esm/src/config.d.ts +2 -2
  29. package/esm/src/llm-providers/agent/RemoteAgent.d.ts +3 -0
  30. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.test.d.ts +1 -0
  31. package/esm/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +49 -5
  32. package/esm/src/utils/agents/resolveAgentAvatarImageUrl.test.d.ts +1 -0
  33. package/esm/src/version.d.ts +1 -1
  34. package/package.json +3 -3
  35. package/umd/src/avatars/AvatarOrImage.d.ts +49 -0
  36. package/umd/src/avatars/avatarInteractionUtils.d.ts +81 -0
  37. package/umd/src/avatars/avatarInteractionUtils.test.d.ts +1 -0
  38. package/umd/src/avatars/avatarPointerTracking.d.ts +17 -0
  39. package/umd/src/avatars/avatarRenderingUtils.d.ts +3 -2
  40. package/umd/src/avatars/avatarRenderingUtils.test.d.ts +1 -0
  41. package/umd/src/avatars/index.d.ts +2 -1
  42. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +41 -1
  43. package/umd/src/avatars/visuals/asciiOctopusAvatarVisual.d.ts +7 -0
  44. package/umd/src/avatars/visuals/octopus3AvatarVisual.d.ts +7 -0
  45. package/umd/src/avatars/visuals/octopusAvatarVisualShared.d.ts +159 -0
  46. package/umd/src/avatars/visuals/octopusAvatarVisualShared.test.d.ts +1 -0
  47. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -1
  48. package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +1 -1
  49. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +1 -1
  50. package/umd/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +8 -2
  51. package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.test.d.ts +2 -0
  52. package/umd/src/book-components/Chat/hooks/useChatCompleteNotification.d.ts +2 -0
  53. package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +10 -0
  54. package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +1 -1
  55. package/umd/src/commitments/USE/USE.d.ts +1 -0
  56. package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +1 -1
  57. package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +47 -0
  58. package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts +1 -0
  59. package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +12 -0
  60. package/umd/src/commitments/index.d.ts +2 -1
  61. package/umd/src/config.d.ts +2 -2
  62. package/umd/src/llm-providers/agent/RemoteAgent.d.ts +3 -0
  63. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.test.d.ts +1 -0
  64. package/umd/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +49 -5
  65. package/umd/src/utils/agents/resolveAgentAvatarImageUrl.test.d.ts +1 -0
  66. package/umd/src/version.d.ts +1 -1
@@ -0,0 +1,159 @@
1
+ import type { AvatarInteractionState } from '../types/AvatarVisualDefinition';
2
+ /**
3
+ * One 2D point used by the shared organic octopus geometry helpers.
4
+ *
5
+ * @private helper of octopus avatar visuals
6
+ */
7
+ type Point = {
8
+ readonly x: number;
9
+ readonly y: number;
10
+ };
11
+ /**
12
+ * Shape parameters for the smooth octopus silhouette generator.
13
+ *
14
+ * @private helper of octopus avatar visuals
15
+ */
16
+ type CreateOrganicOctopusBodyPointsOptions = {
17
+ readonly centerX: number;
18
+ readonly centerY: number;
19
+ readonly bodyRadius: number;
20
+ readonly horizontalStretch: number;
21
+ readonly verticalStretch: number;
22
+ readonly mantleLift: number;
23
+ readonly lowerDrop: number;
24
+ readonly tentacleDepth: number;
25
+ readonly wobbleAmplitude: number;
26
+ readonly lobeCount: number;
27
+ readonly shapePhase: number;
28
+ readonly timeMs: number;
29
+ readonly pointCount?: number;
30
+ };
31
+ /**
32
+ * One deterministic ribbon tentacle attached to an organic octopus mantle.
33
+ *
34
+ * @private shared geometry helper of `octopus3AvatarVisual` and `asciiOctopusAvatarVisual`
35
+ */
36
+ export type OrganicTentacleShape = {
37
+ readonly startPoint: Point;
38
+ readonly controlPointOne: Point;
39
+ readonly controlPointTwo: Point;
40
+ readonly endPoint: Point;
41
+ readonly baseWidth: number;
42
+ readonly tipWidth: number;
43
+ readonly colorBias: number;
44
+ readonly highlightBias: number;
45
+ readonly sampleCount: number;
46
+ };
47
+ /**
48
+ * Options for generating deterministic organic octopus tentacles.
49
+ *
50
+ * @private shared geometry helper of `octopus3AvatarVisual` and `asciiOctopusAvatarVisual`
51
+ */
52
+ type CreateOrganicOctopusTentacleShapesOptions = {
53
+ readonly size: number;
54
+ readonly centerX: number;
55
+ readonly centerY: number;
56
+ readonly bodyRadius: number;
57
+ readonly horizontalStretch: number;
58
+ readonly tentacleCount: number;
59
+ readonly shapePhase: number;
60
+ readonly createRandom: (salt: string) => () => number;
61
+ readonly timeMs: number;
62
+ readonly saltPrefix: string;
63
+ readonly bodyPoints?: ReadonlyArray<Point>;
64
+ };
65
+ /**
66
+ * One sampled ribbon point on an organic octopus tentacle.
67
+ *
68
+ * @private shared geometry helper of `octopus3AvatarVisual` and `asciiOctopusAvatarVisual`
69
+ */
70
+ export type OrganicTentacleRibbonPoint = {
71
+ readonly x: number;
72
+ readonly y: number;
73
+ readonly normalX: number;
74
+ readonly normalY: number;
75
+ readonly width: number;
76
+ readonly progress: number;
77
+ };
78
+ /**
79
+ * One resolved eye-motion sample shared by the octopus-family renderers.
80
+ *
81
+ * @private shared geometry helper of octopus avatar visuals
82
+ */
83
+ export type OrganicEyeMotion = {
84
+ readonly pupilOffsetX: number;
85
+ readonly pupilOffsetY: number;
86
+ };
87
+ /**
88
+ * Minimal interaction subset needed to steer octopus-eye pupils.
89
+ *
90
+ * @private shared geometry helper of octopus avatar visuals
91
+ */
92
+ type OrganicEyeInteraction = Pick<AvatarInteractionState, 'gazeX' | 'gazeY' | 'intensity'>;
93
+ /**
94
+ * Builds a smoothly morphing octopus-like silhouette from deterministic parameters.
95
+ *
96
+ * @param options Shape construction options.
97
+ * @returns Closed-loop body points.
98
+ *
99
+ * @private shared geometry helper of `octopus2AvatarVisual` and `octopus3AvatarVisual`
100
+ */
101
+ export declare function createOrganicOctopusBodyPoints(options: CreateOrganicOctopusBodyPointsOptions): Array<Point>;
102
+ /**
103
+ * Traces a smooth closed path through the provided points.
104
+ *
105
+ * @param context Canvas 2D context.
106
+ * @param points Closed-loop points.
107
+ *
108
+ * @private shared geometry helper of `octopus2AvatarVisual` and `octopus3AvatarVisual`
109
+ */
110
+ export declare function traceSmoothClosedPath(context: CanvasRenderingContext2D, points: ReadonlyArray<Point>): void;
111
+ /**
112
+ * Creates deterministic ribbon tentacles for the organic octopus visuals.
113
+ *
114
+ * @param options Tentacle construction options.
115
+ * @returns Tentacle descriptors.
116
+ *
117
+ * @private shared geometry helper of `octopus3AvatarVisual` and `asciiOctopusAvatarVisual`
118
+ */
119
+ export declare function createOrganicOctopusTentacleShapes(options: CreateOrganicOctopusTentacleShapesOptions): Array<OrganicTentacleShape>;
120
+ /**
121
+ * Samples the cubic tentacle centerline and offsets normals to build a filled ribbon.
122
+ *
123
+ * @param tentacleShape Deterministic tentacle descriptor.
124
+ * @returns Sampled ribbon points.
125
+ *
126
+ * @private shared geometry helper of `octopus3AvatarVisual` and `asciiOctopusAvatarVisual`
127
+ */
128
+ export declare function sampleOrganicTentacleRibbonPoints(tentacleShape: OrganicTentacleShape): Array<OrganicTentacleRibbonPoint>;
129
+ /**
130
+ * Resolves smooth pupil offsets that blend autonomous idle drift with live viewer tracking.
131
+ *
132
+ * @param options Eye motion options.
133
+ * @returns Resolved pupil offsets.
134
+ *
135
+ * @private shared geometry helper of octopus avatar visuals
136
+ */
137
+ export declare function resolveOrganicEyeMotion(options: {
138
+ readonly radiusX: number;
139
+ readonly radiusY: number;
140
+ readonly timeMs: number;
141
+ readonly phase: number;
142
+ readonly interaction: OrganicEyeInteraction;
143
+ readonly autonomousDriftRatioX?: number;
144
+ readonly autonomousDriftRatioY?: number;
145
+ }): OrganicEyeMotion;
146
+ /**
147
+ * Samples one point on a cubic Bezier curve.
148
+ *
149
+ * @param startPoint Curve start point.
150
+ * @param controlPointOne First control point.
151
+ * @param controlPointTwo Second control point.
152
+ * @param endPoint Curve end point.
153
+ * @param progress Sampling progress in the range `[0, 1]`.
154
+ * @returns Sampled point.
155
+ *
156
+ * @private shared geometry helper of `octopus3AvatarVisual`
157
+ */
158
+ export declare function getCubicBezierPoint(startPoint: Point, controlPointOne: Point, controlPointTwo: Point, endPoint: Point, progress: number): Point;
159
+ export {};
@@ -75,7 +75,7 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'on
75
75
  /**
76
76
  * Controls whether assistant replies render as bubbles or article blocks.
77
77
  */
78
- CHAT_VISUAL_MODE?: ChatProps['CHAT_VISUAL_MODE'];
78
+ visualMode?: ChatProps['visualMode'];
79
79
  /**
80
80
  * Called when a tool call chiplet is clicked.
81
81
  */
@@ -46,7 +46,7 @@ export type ChatMessageListProps = {
46
46
  toolTitles?: Record<string, string>;
47
47
  teammates?: ChatProps['teammates'];
48
48
  teamAgentProfiles?: ChatProps['teamAgentProfiles'];
49
- CHAT_VISUAL_MODE?: ChatProps['CHAT_VISUAL_MODE'];
49
+ visualMode?: ChatProps['visualMode'];
50
50
  onToolCallClick?: (toolCall: NonNullable<ChatMessage['toolCalls']>[number]) => void;
51
51
  onCitationClick?: (citation: ParsedCitation) => void;
52
52
  soundSystem?: ChatProps['soundSystem'];
@@ -747,7 +747,7 @@ export type ChatProps = {
747
747
  *
748
748
  * @default 'ARTICLE_MODE'
749
749
  */
750
- readonly CHAT_VISUAL_MODE?: ChatVisualMode;
750
+ readonly visualMode?: ChatVisualMode;
751
751
  /**
752
752
  * Visual style of the chat component
753
753
  */
@@ -1,4 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
+ import type { AvatarDefinition } from '../../../avatars/types/AvatarDefinition';
3
+ import type { AvatarVisualId } from '../../../avatars/types/AvatarVisualDefinition';
2
4
  /**
3
5
  * Props for a team modal header profile badge.
4
6
  *
@@ -7,6 +9,8 @@ import { type ReactNode } from 'react';
7
9
  export type TeamHeaderProfileProps = {
8
10
  label: string;
9
11
  avatarSrc?: string | null;
12
+ avatarDefinition?: AvatarDefinition;
13
+ avatarVisualId?: AvatarVisualId;
10
14
  href?: string;
11
15
  fallbackColor?: string;
12
16
  };
@@ -15,7 +19,7 @@ export type TeamHeaderProfileProps = {
15
19
  *
16
20
  * @private component of `<Chat/>`
17
21
  */
18
- export declare function TeamHeaderProfile({ label, avatarSrc, href, fallbackColor }: TeamHeaderProfileProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function TeamHeaderProfile({ label, avatarSrc, avatarDefinition, avatarVisualId, href, fallbackColor, }: TeamHeaderProfileProps): import("react/jsx-runtime").JSX.Element;
19
23
  /**
20
24
  * Props for a self-learning modal avatar.
21
25
  *
@@ -24,6 +28,8 @@ export declare function TeamHeaderProfile({ label, avatarSrc, href, fallbackColo
24
28
  export type SelfLearningAvatarProps = {
25
29
  label: string;
26
30
  avatarSrc?: string | null;
31
+ avatarDefinition?: AvatarDefinition;
32
+ avatarVisualId?: AvatarVisualId;
27
33
  fallbackColor?: string;
28
34
  className?: string;
29
35
  children?: ReactNode;
@@ -33,4 +39,4 @@ export type SelfLearningAvatarProps = {
33
39
  *
34
40
  * @private component of `<Chat/>`
35
41
  */
36
- export declare function SelfLearningAvatar({ label, avatarSrc, fallbackColor, className, children, }: SelfLearningAvatarProps): import("react/jsx-runtime").JSX.Element;
42
+ export declare function SelfLearningAvatar({ label, avatarSrc, avatarDefinition, avatarVisualId, fallbackColor, className, children, }: SelfLearningAvatarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ /** @jest-environment jsdom */
2
+ export {};
@@ -8,6 +8,8 @@ import type { ChatMessage } from '../types/ChatMessage';
8
8
  * - Every streaming chunk / intermediate content update
9
9
  * - `message_typing` lifecycle events before the message is finalized
10
10
  * - Re-renders of an already-notified completed message (idempotent)
11
+ * - Initial mount hydration with preloaded completed chat history
12
+ * - Switching to another chat thread that already contains completed history
11
13
  * - User-originated messages
12
14
  *
13
15
  * @param messages - Current list of chat messages
@@ -1,6 +1,8 @@
1
1
  import type { string_book } from '../../../book-2.0/agent-source/string_book';
2
2
  import type { id, string_color, string_person_fullname, string_url_image } from '../../../types/typeAliases';
3
3
  import { Color } from '../../../utils/color/Color';
4
+ import type { AvatarDefinition } from '../../../avatars/types/AvatarDefinition';
5
+ import type { AvatarVisualId } from '../../../avatars/types/AvatarVisualDefinition';
4
6
  /**
5
7
  * A participant in the chat
6
8
  *
@@ -23,6 +25,14 @@ export type ChatParticipant = {
23
25
  * Profile picture
24
26
  */
25
27
  avatarSrc?: string_url_image;
28
+ /**
29
+ * Deterministic avatar definition used when no static image should be shown.
30
+ */
31
+ avatarDefinition?: AvatarDefinition;
32
+ /**
33
+ * Built-in avatar visual id used with `avatarDefinition`.
34
+ */
35
+ avatarVisualId?: AvatarVisualId;
26
36
  /**
27
37
  * Color associated with the participant
28
38
  */
@@ -1,6 +1,6 @@
1
1
  import type { InitializationStatus } from './boilerplateTemplates';
2
2
  /**
3
- * Ensures `.gitignore` contains the standalone Promptbook coder cache entry.
3
+ * Ensures `.gitignore` contains the standalone Promptbook coder temp and cache entries.
4
4
  *
5
5
  * @private function of `initializeCoderProjectConfiguration`
6
6
  */
@@ -9,6 +9,7 @@ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
9
9
  * Supported USE types:
10
10
  * - USE BROWSER: Enables the agent to use a web browser tool
11
11
  * - USE SEARCH ENGINE (future): Enables search engine access
12
+ * - USE DEEPSEARCH: Enables deeper research-oriented search access
12
13
  * - USE FILE SYSTEM (future): Enables file system operations
13
14
  * - USE MCP (future): Enables MCP server connections
14
15
  *
@@ -6,7 +6,7 @@ import type { ParsedCommitment } from '../_base/ParsedCommitment';
6
6
  *
7
7
  * @private internal utility of `createAgentModelRequirementsWithCommitments`
8
8
  */
9
- type AggregatedUseCommitmentType = 'USE BROWSER' | 'USE SEARCH ENGINE' | 'USE TIME';
9
+ type AggregatedUseCommitmentType = 'USE BROWSER' | 'USE DEEPSEARCH' | 'USE SEARCH ENGINE' | 'USE TIME';
10
10
  /**
11
11
  * Adds the placeholder for an aggregated `USE` system-message section only once, preserving the section position from the first occurrence.
12
12
  *
@@ -0,0 +1,47 @@
1
+ import { string_javascript_name } from '../../_packages/types.index';
2
+ import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
3
+ import { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
4
+ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
5
+ /**
6
+ * USE DEEPSEARCH commitment definition
7
+ *
8
+ * The `USE DEEPSEARCH` commitment indicates that the agent should use a deeper research-oriented
9
+ * search workflow instead of lightweight web search when it needs fresh information from the internet.
10
+ *
11
+ * The content following `USE DEEPSEARCH` is an arbitrary text that the agent should know
12
+ * (e.g. search scope or research instructions).
13
+ *
14
+ * Example usage in agent source:
15
+ *
16
+ * ```book
17
+ * USE DEEPSEARCH
18
+ * USE DEEPSEARCH Compare official vendor documentation with independent benchmarks.
19
+ * ```
20
+ *
21
+ * @private [🪔] Maybe export the commitments through some package
22
+ */
23
+ export declare class UseDeepSearchCommitmentDefinition extends BaseCommitmentDefinition<'USE DEEPSEARCH'> {
24
+ constructor();
25
+ get requiresContent(): boolean;
26
+ /**
27
+ * Short one-line description of USE DEEPSEARCH.
28
+ */
29
+ get description(): string;
30
+ /**
31
+ * Icon for this commitment.
32
+ */
33
+ get icon(): string;
34
+ /**
35
+ * Markdown documentation for USE DEEPSEARCH commitment.
36
+ */
37
+ get documentation(): string;
38
+ applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
39
+ /**
40
+ * Gets human-readable titles for tool functions provided by this commitment.
41
+ */
42
+ getToolTitles(): Record<string_javascript_name, string>;
43
+ /**
44
+ * Gets the local fallback implementation for the `deep_search` tool.
45
+ */
46
+ getToolFunctions(): Record<string_javascript_name, ToolFunction>;
47
+ }
@@ -0,0 +1,12 @@
1
+ import { string_javascript_name } from '../../_packages/types.index';
2
+ import type { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
3
+ /**
4
+ * Creates one SERP-backed tool function used as a local fallback for search-like commitments.
5
+ *
6
+ * @param toolName - Technical tool name used for validation messages.
7
+ * @param resultLabel - Human-readable label used in formatted results.
8
+ * @returns Async tool function compatible with commitment tool registration.
9
+ *
10
+ * @private internal helper for search-like commitments
11
+ */
12
+ export declare function createSerpSearchToolFunction(toolName: string_javascript_name, resultLabel: string): ToolFunction;
@@ -38,6 +38,7 @@ import { TemplateCommitmentDefinition } from './TEMPLATE/TEMPLATE';
38
38
  import { UseCommitmentDefinition } from './USE/USE';
39
39
  import { UseBrowserCommitmentDefinition } from './USE_BROWSER/USE_BROWSER';
40
40
  import { UseCalendarCommitmentDefinition } from './USE_CALENDAR/USE_CALENDAR';
41
+ import { UseDeepSearchCommitmentDefinition } from './USE_DEEPSEARCH/USE_DEEPSEARCH';
41
42
  import { UseEmailCommitmentDefinition } from './USE_EMAIL/USE_EMAIL';
42
43
  import { UseImageGeneratorCommitmentDefinition } from './USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR';
43
44
  import { UseMcpCommitmentDefinition } from './USE_MCP/USE_MCP';
@@ -59,4 +60,4 @@ import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplemented
59
60
  *
60
61
  * @private Use functions to access commitments instead of this array directly
61
62
  */
62
- export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, LanguageCommitmentDefinition, LanguageCommitmentDefinition, WritingSampleCommitmentDefinition, WritingRulesCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, TemplateCommitmentDefinition, TemplateCommitmentDefinition, FromCommitmentDefinition, ImportCommitmentDefinition, ImportCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, ComponentCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaFontCommitmentDefinition, MetaLinkCommitmentDefinition, MetaDomainCommitmentDefinition, MetaDisclaimerCommitmentDefinition, MetaInputPlaceholderCommitmentDefinition, MetaCommitmentDefinition, MetaVoiceCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, InternalMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageSuffixCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DictionaryCommitmentDefinition, OpenCommitmentDefinition, ClosedCommitmentDefinition, TeamCommitmentDefinition, UseBrowserCommitmentDefinition, UseSearchEngineCommitmentDefinition, UseSpawnCommitmentDefinition, UseTimeoutCommitmentDefinition, UseTimeCommitmentDefinition, UseUserLocationCommitmentDefinition, UseCalendarCommitmentDefinition, UseEmailCommitmentDefinition, UsePopupCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseMcpCommitmentDefinition, UsePrivacyCommitmentDefinition, UseProjectCommitmentDefinition, UseCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
63
+ export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, LanguageCommitmentDefinition, LanguageCommitmentDefinition, WritingSampleCommitmentDefinition, WritingRulesCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, TemplateCommitmentDefinition, TemplateCommitmentDefinition, FromCommitmentDefinition, ImportCommitmentDefinition, ImportCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, ComponentCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaFontCommitmentDefinition, MetaLinkCommitmentDefinition, MetaDomainCommitmentDefinition, MetaDisclaimerCommitmentDefinition, MetaInputPlaceholderCommitmentDefinition, MetaCommitmentDefinition, MetaVoiceCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, InternalMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageSuffixCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DictionaryCommitmentDefinition, OpenCommitmentDefinition, ClosedCommitmentDefinition, TeamCommitmentDefinition, UseBrowserCommitmentDefinition, UseDeepSearchCommitmentDefinition, UseSearchEngineCommitmentDefinition, UseSpawnCommitmentDefinition, UseTimeoutCommitmentDefinition, UseTimeCommitmentDefinition, UseUserLocationCommitmentDefinition, UseCalendarCommitmentDefinition, UseEmailCommitmentDefinition, UsePopupCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseMcpCommitmentDefinition, UsePrivacyCommitmentDefinition, UseProjectCommitmentDefinition, UseCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
@@ -41,7 +41,7 @@ export declare const ADMIN_GITHUB_NAME: string_name;
41
41
  *
42
42
  * @public exported from `@promptbook/core`
43
43
  */
44
- export declare const CLAIM = "Turn your company's scattered knowledge into AI ready books";
44
+ export declare const CLAIM = "Create persistent AI agents that turn your company's scattered knowledge into action";
45
45
  /**
46
46
  * Color of the Promptbook
47
47
  *
@@ -89,7 +89,7 @@ export declare const USER_CHAT_COLOR: import("./utils/take/interfaces/ITakeChain
89
89
  *
90
90
  * @public exported from `@promptbook/core`
91
91
  */
92
- export declare const DEFAULT_BOOK_TITLE = "\u2728 Untitled Book";
92
+ export declare const DEFAULT_BOOK_TITLE = "\uD83D\uDC19 Untitled agent";
93
93
  /**
94
94
  * When the title of task is not provided, the default title is used
95
95
  *
@@ -2,6 +2,7 @@ import type { CallChatModelStreamOptions } from '../../execution/LlmExecutionToo
2
2
  import type { ChatPromptResult } from '../../execution/PromptResult';
3
3
  import type { Prompt } from '../../types/Prompt';
4
4
  import type { string_agent_hash, string_agent_name } from '../../types/typeAliases';
5
+ import type { AvatarVisualId } from '../../avatars/types/AvatarVisualDefinition';
5
6
  import { Agent } from './Agent';
6
7
  import type { RemoteAgentOptions } from './RemoteAgentOptions';
7
8
  /**
@@ -28,6 +29,8 @@ export declare class RemoteAgent extends Agent {
28
29
  toolTitles: Record<string, string>;
29
30
  private _isVoiceCallingEnabled;
30
31
  private _isVoiceTtsSttEnabled;
32
+ isMetaImageExplicit: boolean;
33
+ avatarVisualId: AvatarVisualId | undefined;
31
34
  /**
32
35
  * Indicates whether the remote server allows text-to-speech and speech-to-text.
33
36
  *
@@ -1,3 +1,5 @@
1
+ import type { AvatarDefinition } from '../../avatars/types/AvatarDefinition';
2
+ import type { AvatarVisualId } from '../../avatars/types/AvatarVisualDefinition';
1
3
  import type { AgentBasicInformation } from '../../book-2.0/agent-source/AgentBasicInformation';
2
4
  import type { string_url, string_url_image } from '../../types/typeAliases';
3
5
  /**
@@ -5,25 +7,67 @@ import type { string_url, string_url_image } from '../../types/typeAliases';
5
7
  *
6
8
  * @private utility of `<Chat/>`
7
9
  */
8
- export type ResolveAgentAvatarImageUrlOptions = {
10
+ export type ResolveAgentAvatarOptions = {
9
11
  /**
10
12
  * Agent metadata used for avatar resolution.
11
13
  */
12
- readonly agent: Pick<AgentBasicInformation, 'agentName' | 'permanentId' | 'meta'>;
14
+ readonly agent: Pick<AgentBasicInformation, 'agentName' | 'agentHash' | 'permanentId' | 'meta'> & {
15
+ /**
16
+ * Optional explicit marker coming from remote profile payloads.
17
+ * When `false`, `meta.image` is treated as the generated static fallback rather than a user-defined `META IMAGE`.
18
+ */
19
+ readonly isMetaImageExplicit?: boolean;
20
+ /**
21
+ * Optional preferred avatar visual id coming from remote profile payloads.
22
+ */
23
+ readonly avatarVisualId?: AvatarVisualId;
24
+ };
13
25
  /**
14
26
  * Optional base URL used to resolve relative meta images and placeholders.
15
27
  */
16
28
  readonly baseUrl?: string_url;
17
29
  };
30
+ /**
31
+ * Backward-compatible alias kept for callers that only need image URLs.
32
+ *
33
+ * @private utility of `<Chat/>`
34
+ */
35
+ export type ResolveAgentAvatarImageUrlOptions = ResolveAgentAvatarOptions;
36
+ /**
37
+ * Default built-in avatar visual used when an agent does not define `META IMAGE`.
38
+ *
39
+ * @private shared avatar contract
40
+ */
41
+ export declare const DEFAULT_AGENT_AVATAR_VISUAL_ID: AvatarVisualId;
42
+ /**
43
+ * Resolved avatar descriptor used by interactive UIs to pick either an image or a live canvas visual.
44
+ *
45
+ * @private shared avatar contract
46
+ */
47
+ export type ResolvedAgentAvatar = {
48
+ readonly type: 'image';
49
+ readonly imageUrl: string_url_image;
50
+ } | {
51
+ readonly type: 'visual';
52
+ readonly avatarDefinition: AvatarDefinition;
53
+ readonly visualId: AvatarVisualId;
54
+ };
18
55
  /**
19
56
  * Resolve the fallback avatar URL for an agent.
20
57
  *
21
58
  * @private utility of `<Chat/>`
22
59
  */
23
- export declare function resolveAgentAvatarFallbackUrl(options: ResolveAgentAvatarImageUrlOptions): string_url_image | null;
60
+ export declare function resolveAgentAvatarFallbackUrl(options: ResolveAgentAvatarOptions): string_url_image | null;
61
+ /**
62
+ * Resolve the best avatar representation for an agent, preferring explicit `META IMAGE`
63
+ * and otherwise returning the default deterministic canvas visual.
64
+ *
65
+ * @private utility of `<Chat/>`
66
+ */
67
+ export declare function resolveAgentAvatar(options: ResolveAgentAvatarOptions): ResolvedAgentAvatar | null;
24
68
  /**
25
- * Resolve the best avatar URL for an agent, preferring META IMAGE and falling back to placeholders.
69
+ * Resolve the best avatar URL for an agent, preferring `META IMAGE` and falling back to the static placeholder route.
26
70
  *
27
71
  * @private utility of `<Chat/>`
28
72
  */
29
- export declare function resolveAgentAvatarImageUrl(options: ResolveAgentAvatarImageUrlOptions): string_url_image | null;
73
+ export declare function resolveAgentAvatarImageUrl(options: ResolveAgentAvatarOptions): string_url_image | null;
@@ -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-45`).
18
+ * It follows semantic versioning (e.g., `0.112.0-47`).
19
19
  *
20
20
  * @generated
21
21
  */