@promptbook/pdf 0.112.0-47 → 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.
- package/esm/index.es.js +1 -1
- package/esm/src/avatars/AvatarOrImage.d.ts +5 -1
- package/esm/src/avatars/avatarInteractionUtils.d.ts +81 -0
- package/esm/src/avatars/avatarInteractionUtils.test.d.ts +1 -0
- package/esm/src/avatars/avatarPointerTracking.d.ts +17 -0
- package/esm/src/avatars/avatarRenderingUtils.d.ts +3 -2
- package/esm/src/avatars/avatarRenderingUtils.test.d.ts +1 -0
- package/esm/src/avatars/index.d.ts +1 -1
- package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +35 -0
- package/esm/src/avatars/visuals/octopusAvatarVisualShared.d.ts +34 -0
- package/esm/src/avatars/visuals/octopusAvatarVisualShared.test.d.ts +1 -0
- package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.test.d.ts +2 -0
- package/esm/src/commitments/USE/USE.d.ts +1 -0
- package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +1 -1
- package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +47 -0
- package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts +1 -0
- package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +12 -0
- package/esm/src/commitments/index.d.ts +2 -1
- package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.test.d.ts +1 -0
- package/esm/src/version.d.ts +1 -1
- package/package.json +2 -2
- package/umd/index.umd.js +1 -1
- package/umd/src/avatars/AvatarOrImage.d.ts +5 -1
- package/umd/src/avatars/avatarInteractionUtils.d.ts +81 -0
- package/umd/src/avatars/avatarInteractionUtils.test.d.ts +1 -0
- package/umd/src/avatars/avatarPointerTracking.d.ts +17 -0
- package/umd/src/avatars/avatarRenderingUtils.d.ts +3 -2
- package/umd/src/avatars/avatarRenderingUtils.test.d.ts +1 -0
- package/umd/src/avatars/index.d.ts +1 -1
- package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +35 -0
- package/umd/src/avatars/visuals/octopusAvatarVisualShared.d.ts +34 -0
- package/umd/src/avatars/visuals/octopusAvatarVisualShared.test.d.ts +1 -0
- package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.test.d.ts +2 -0
- package/umd/src/commitments/USE/USE.d.ts +1 -0
- package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +1 -1
- package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +47 -0
- package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts +1 -0
- package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +12 -0
- package/umd/src/commitments/index.d.ts +2 -1
- package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.test.d.ts +1 -0
- package/umd/src/version.d.ts +1 -1
package/esm/index.es.js
CHANGED
|
@@ -24,7 +24,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
|
|
|
24
24
|
* @generated
|
|
25
25
|
* @see https://github.com/webgptorg/promptbook
|
|
26
26
|
*/
|
|
27
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
27
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-48';
|
|
28
28
|
/**
|
|
29
29
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
30
30
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { string_css_class, string_url_image } from '../types/typeAliases';
|
|
3
3
|
import type { AvatarDefinition } from './types/AvatarDefinition';
|
|
4
|
-
import type { AvatarVisualId } from './types/AvatarVisualDefinition';
|
|
4
|
+
import type { AvatarSurfaceStyle, AvatarVisualId } from './types/AvatarVisualDefinition';
|
|
5
5
|
/**
|
|
6
6
|
* Shared avatar-rendering props for places that may receive either an image URL or a deterministic avatar visual.
|
|
7
7
|
*
|
|
@@ -20,6 +20,10 @@ export type AvatarOrImageProps = {
|
|
|
20
20
|
* Selected built-in visual id used with `avatarDefinition`.
|
|
21
21
|
*/
|
|
22
22
|
readonly visualId?: AvatarVisualId | null;
|
|
23
|
+
/**
|
|
24
|
+
* Surface used to composite a built-in visual in its parent shell.
|
|
25
|
+
*/
|
|
26
|
+
readonly surface?: AvatarSurfaceStyle;
|
|
23
27
|
/**
|
|
24
28
|
* Output size in CSS pixels.
|
|
25
29
|
*/
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { AvatarDefinition } from './types/AvatarDefinition';
|
|
2
|
+
import type { AvatarInteractionState, AvatarPointerType } from './types/AvatarVisualDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* Internal interaction state kept between animation frames.
|
|
5
|
+
*
|
|
6
|
+
* @private utility of the avatar rendering system
|
|
7
|
+
*/
|
|
8
|
+
export type AvatarInteractionRuntimeState = AvatarInteractionState & {
|
|
9
|
+
readonly lastFrameMs: number | null;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Raw shared pointer sample used to derive one avatar-local gaze target.
|
|
13
|
+
*
|
|
14
|
+
* @private utility of the avatar rendering system
|
|
15
|
+
*/
|
|
16
|
+
export type AvatarPointerSnapshot = {
|
|
17
|
+
readonly clientX: number;
|
|
18
|
+
readonly clientY: number;
|
|
19
|
+
readonly isPointerActive: boolean;
|
|
20
|
+
readonly pointerType: Exclude<AvatarPointerType, 'idle'>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Avatar-local pointer target resolved from viewport coordinates.
|
|
24
|
+
*
|
|
25
|
+
* @private utility of the avatar rendering system
|
|
26
|
+
*/
|
|
27
|
+
export type AvatarPointerTarget = {
|
|
28
|
+
readonly gazeX: number;
|
|
29
|
+
readonly gazeY: number;
|
|
30
|
+
readonly bodyOffsetX: number;
|
|
31
|
+
readonly bodyOffsetY: number;
|
|
32
|
+
readonly intensity: number;
|
|
33
|
+
readonly isPointerActive: boolean;
|
|
34
|
+
readonly pointerType: AvatarPointerType;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Creates one stable cache key from the meaningful avatar-definition fields.
|
|
38
|
+
*
|
|
39
|
+
* @param avatarDefinition Normalized or raw avatar definition.
|
|
40
|
+
* @returns Stable cache key that ignores object identity churn.
|
|
41
|
+
*
|
|
42
|
+
* @private utility of the avatar rendering system
|
|
43
|
+
*/
|
|
44
|
+
export declare function createAvatarDefinitionKey(avatarDefinition: AvatarDefinition): string;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the neutral interaction state used by static/server-side renders.
|
|
47
|
+
*
|
|
48
|
+
* @returns Zeroed interaction state.
|
|
49
|
+
*
|
|
50
|
+
* @private utility of the avatar rendering system
|
|
51
|
+
*/
|
|
52
|
+
export declare function createIdleAvatarInteractionState(): AvatarInteractionState;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a fresh runtime state for the interactive animation loop.
|
|
55
|
+
*
|
|
56
|
+
* @returns Runtime interaction state with neutral values.
|
|
57
|
+
*
|
|
58
|
+
* @private utility of the avatar rendering system
|
|
59
|
+
*/
|
|
60
|
+
export declare function createAvatarInteractionRuntimeState(): AvatarInteractionRuntimeState;
|
|
61
|
+
/**
|
|
62
|
+
* Converts the shared viewport pointer state into one avatar-local gaze target.
|
|
63
|
+
*
|
|
64
|
+
* @param avatarBounds Canvas bounds in viewport coordinates.
|
|
65
|
+
* @param pointerSnapshot Latest shared pointer sample.
|
|
66
|
+
* @returns Local target used to steer eyes and subtle body lean.
|
|
67
|
+
*
|
|
68
|
+
* @private utility of the avatar rendering system
|
|
69
|
+
*/
|
|
70
|
+
export declare function resolveAvatarPointerTarget(avatarBounds: Pick<DOMRectReadOnly, 'left' | 'top' | 'width' | 'height'>, pointerSnapshot: AvatarPointerSnapshot | null): AvatarPointerTarget;
|
|
71
|
+
/**
|
|
72
|
+
* Advances the smoothed interaction state toward the latest pointer target.
|
|
73
|
+
*
|
|
74
|
+
* @param runtimeState Previous animation-frame state.
|
|
75
|
+
* @param pointerTarget Latest local pointer target.
|
|
76
|
+
* @param nowMs Current animation-frame timestamp.
|
|
77
|
+
* @returns Next runtime state to keep in the animation loop.
|
|
78
|
+
*
|
|
79
|
+
* @private utility of the avatar rendering system
|
|
80
|
+
*/
|
|
81
|
+
export declare function stepAvatarInteractionRuntimeState(runtimeState: AvatarInteractionRuntimeState, pointerTarget: AvatarPointerTarget, nowMs: number): AvatarInteractionRuntimeState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AvatarPointerSnapshot } from './avatarInteractionUtils';
|
|
2
|
+
/**
|
|
3
|
+
* Starts the shared pointer tracker and returns a disposer for the caller.
|
|
4
|
+
*
|
|
5
|
+
* @returns Cleanup function that releases one consumer.
|
|
6
|
+
*
|
|
7
|
+
* @private utility of the avatar rendering system
|
|
8
|
+
*/
|
|
9
|
+
export declare function retainAvatarPointerTracking(): () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the latest shared viewport pointer sample when available.
|
|
12
|
+
*
|
|
13
|
+
* @returns Shared pointer snapshot or `null`.
|
|
14
|
+
*
|
|
15
|
+
* @private utility of the avatar rendering system
|
|
16
|
+
*/
|
|
17
|
+
export declare function getAvatarPointerSnapshot(): AvatarPointerSnapshot | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AgentBasicInformation } from '../book-2.0/agent-source/AgentBasicInformation';
|
|
2
2
|
import type { string_color } from '../types/typeAliases';
|
|
3
3
|
import type { AvatarDefinition } from './types/AvatarDefinition';
|
|
4
|
-
import type { AvatarPalette } from './types/AvatarVisualDefinition';
|
|
4
|
+
import type { AvatarPalette, AvatarSurfaceStyle } from './types/AvatarVisualDefinition';
|
|
5
5
|
/**
|
|
6
6
|
* Default square size used by avatar renderers.
|
|
7
7
|
*
|
|
@@ -48,11 +48,12 @@ export declare function createAvatarDefinitionFromAgentBasicInformation(agentBas
|
|
|
48
48
|
* Creates the shared derived palette used by every avatar visual.
|
|
49
49
|
*
|
|
50
50
|
* @param avatarDefinition Stable avatar definition.
|
|
51
|
+
* @param surface Surface style used by the parent UI.
|
|
51
52
|
* @returns Derived palette.
|
|
52
53
|
*
|
|
53
54
|
* @private utility of the avatar rendering system
|
|
54
55
|
*/
|
|
55
|
-
export declare function createAvatarPalette(avatarDefinition: AvatarDefinition): AvatarPalette;
|
|
56
|
+
export declare function createAvatarPalette(avatarDefinition: AvatarDefinition, surface?: AvatarSurfaceStyle): AvatarPalette;
|
|
56
57
|
/**
|
|
57
58
|
* Draws the common rounded background frame used by most visuals.
|
|
58
59
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,4 +4,4 @@ export { renderAvatarVisual } from './renderAvatarVisual';
|
|
|
4
4
|
export { createAvatarDefinitionFromAgentBasicInformation } from './avatarRenderingUtils';
|
|
5
5
|
export { AVATAR_VISUALS, getAvatarVisualById } from './visuals/avatarVisualRegistry';
|
|
6
6
|
export type { AvatarDefinition } from './types/AvatarDefinition';
|
|
7
|
-
export type { AvatarPalette, AvatarProps, AvatarVisual, AvatarVisualDefinition, AvatarVisualId, AvatarVisualRenderContext, RenderAvatarVisualOptions, } from './types/AvatarVisualDefinition';
|
|
7
|
+
export type { AvatarInteractionState, AvatarPalette, AvatarPointerType, AvatarProps, AvatarVisual, AvatarVisualDefinition, AvatarVisualId, AvatarVisualRenderContext, RenderAvatarVisualOptions, } from './types/AvatarVisualDefinition';
|
|
@@ -22,6 +22,32 @@ export type AvatarPalette = {
|
|
|
22
22
|
readonly shadow: string_color;
|
|
23
23
|
readonly ink: string_color;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Surface style used when placing the avatar into different UI shells.
|
|
27
|
+
*
|
|
28
|
+
* @private shared contract for the avatar rendering system
|
|
29
|
+
*/
|
|
30
|
+
export type AvatarSurfaceStyle = 'framed' | 'transparent';
|
|
31
|
+
/**
|
|
32
|
+
* Pointer source currently driving avatar interaction.
|
|
33
|
+
*
|
|
34
|
+
* @private shared contract for the avatar rendering system
|
|
35
|
+
*/
|
|
36
|
+
export type AvatarPointerType = 'idle' | 'mouse' | 'touch' | 'pen';
|
|
37
|
+
/**
|
|
38
|
+
* Smoothed interaction state forwarded to animated avatar visuals.
|
|
39
|
+
*
|
|
40
|
+
* @private shared contract for the avatar rendering system
|
|
41
|
+
*/
|
|
42
|
+
export type AvatarInteractionState = {
|
|
43
|
+
readonly gazeX: number;
|
|
44
|
+
readonly gazeY: number;
|
|
45
|
+
readonly bodyOffsetX: number;
|
|
46
|
+
readonly bodyOffsetY: number;
|
|
47
|
+
readonly intensity: number;
|
|
48
|
+
readonly isPointerActive: boolean;
|
|
49
|
+
readonly pointerType: AvatarPointerType;
|
|
50
|
+
};
|
|
25
51
|
/**
|
|
26
52
|
* Rendering context forwarded to a single avatar visual.
|
|
27
53
|
*
|
|
@@ -36,6 +62,8 @@ export type AvatarVisualRenderContext = {
|
|
|
36
62
|
readonly avatarDefinition: AvatarDefinition;
|
|
37
63
|
readonly palette: AvatarPalette;
|
|
38
64
|
readonly createRandom: (salt: string) => () => number;
|
|
65
|
+
readonly surface: AvatarSurfaceStyle;
|
|
66
|
+
readonly interaction: AvatarInteractionState;
|
|
39
67
|
};
|
|
40
68
|
/**
|
|
41
69
|
* Signature of one canvas-based avatar visual renderer.
|
|
@@ -53,6 +81,7 @@ export type AvatarVisualDefinition = {
|
|
|
53
81
|
readonly title: string;
|
|
54
82
|
readonly description: string;
|
|
55
83
|
readonly isAnimated: boolean;
|
|
84
|
+
readonly supportsPointerTracking?: boolean;
|
|
56
85
|
readonly render: AvatarVisual;
|
|
57
86
|
};
|
|
58
87
|
/**
|
|
@@ -69,6 +98,10 @@ export type AvatarProps = {
|
|
|
69
98
|
* Selected visual style.
|
|
70
99
|
*/
|
|
71
100
|
readonly visualId: AvatarVisualId;
|
|
101
|
+
/**
|
|
102
|
+
* Surface used to composite the avatar in its parent UI.
|
|
103
|
+
*/
|
|
104
|
+
readonly surface?: AvatarSurfaceStyle;
|
|
72
105
|
/**
|
|
73
106
|
* Output size in CSS pixels.
|
|
74
107
|
*/
|
|
@@ -95,7 +128,9 @@ export type RenderAvatarVisualOptions = {
|
|
|
95
128
|
readonly canvas: HTMLCanvasElement;
|
|
96
129
|
readonly avatarDefinition: AvatarDefinition;
|
|
97
130
|
readonly visualId: AvatarVisualId;
|
|
131
|
+
readonly surface?: AvatarSurfaceStyle;
|
|
98
132
|
readonly size: number;
|
|
99
133
|
readonly timeMs: number;
|
|
100
134
|
readonly devicePixelRatio?: number;
|
|
135
|
+
readonly interaction?: AvatarInteractionState;
|
|
101
136
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AvatarInteractionState } from '../types/AvatarVisualDefinition';
|
|
1
2
|
/**
|
|
2
3
|
* One 2D point used by the shared organic octopus geometry helpers.
|
|
3
4
|
*
|
|
@@ -59,6 +60,7 @@ type CreateOrganicOctopusTentacleShapesOptions = {
|
|
|
59
60
|
readonly createRandom: (salt: string) => () => number;
|
|
60
61
|
readonly timeMs: number;
|
|
61
62
|
readonly saltPrefix: string;
|
|
63
|
+
readonly bodyPoints?: ReadonlyArray<Point>;
|
|
62
64
|
};
|
|
63
65
|
/**
|
|
64
66
|
* One sampled ribbon point on an organic octopus tentacle.
|
|
@@ -73,6 +75,21 @@ export type OrganicTentacleRibbonPoint = {
|
|
|
73
75
|
readonly width: number;
|
|
74
76
|
readonly progress: number;
|
|
75
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'>;
|
|
76
93
|
/**
|
|
77
94
|
* Builds a smoothly morphing octopus-like silhouette from deterministic parameters.
|
|
78
95
|
*
|
|
@@ -109,6 +126,23 @@ export declare function createOrganicOctopusTentacleShapes(options: CreateOrgani
|
|
|
109
126
|
* @private shared geometry helper of `octopus3AvatarVisual` and `asciiOctopusAvatarVisual`
|
|
110
127
|
*/
|
|
111
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;
|
|
112
146
|
/**
|
|
113
147
|
* Samples one point on a cubic Bezier curve.
|
|
114
148
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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">];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/esm/src/version.d.ts
CHANGED
|
@@ -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-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-47`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/pdf",
|
|
3
|
-
"version": "0.112.0-
|
|
3
|
+
"version": "0.112.0-48",
|
|
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,
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"types": "./esm/src/_packages/pdf.index.d.ts",
|
|
99
99
|
"typings": "./esm/src/_packages/pdf.index.d.ts",
|
|
100
100
|
"peerDependencies": {
|
|
101
|
-
"@promptbook/core": "0.112.0-
|
|
101
|
+
"@promptbook/core": "0.112.0-48"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
104
|
"crypto": "1.0.1",
|
package/umd/index.umd.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* @generated
|
|
24
24
|
* @see https://github.com/webgptorg/promptbook
|
|
25
25
|
*/
|
|
26
|
-
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-
|
|
26
|
+
const PROMPTBOOK_ENGINE_VERSION = '0.112.0-48';
|
|
27
27
|
/**
|
|
28
28
|
* TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
|
|
29
29
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
2
|
import type { string_css_class, string_url_image } from '../types/typeAliases';
|
|
3
3
|
import type { AvatarDefinition } from './types/AvatarDefinition';
|
|
4
|
-
import type { AvatarVisualId } from './types/AvatarVisualDefinition';
|
|
4
|
+
import type { AvatarSurfaceStyle, AvatarVisualId } from './types/AvatarVisualDefinition';
|
|
5
5
|
/**
|
|
6
6
|
* Shared avatar-rendering props for places that may receive either an image URL or a deterministic avatar visual.
|
|
7
7
|
*
|
|
@@ -20,6 +20,10 @@ export type AvatarOrImageProps = {
|
|
|
20
20
|
* Selected built-in visual id used with `avatarDefinition`.
|
|
21
21
|
*/
|
|
22
22
|
readonly visualId?: AvatarVisualId | null;
|
|
23
|
+
/**
|
|
24
|
+
* Surface used to composite a built-in visual in its parent shell.
|
|
25
|
+
*/
|
|
26
|
+
readonly surface?: AvatarSurfaceStyle;
|
|
23
27
|
/**
|
|
24
28
|
* Output size in CSS pixels.
|
|
25
29
|
*/
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { AvatarDefinition } from './types/AvatarDefinition';
|
|
2
|
+
import type { AvatarInteractionState, AvatarPointerType } from './types/AvatarVisualDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* Internal interaction state kept between animation frames.
|
|
5
|
+
*
|
|
6
|
+
* @private utility of the avatar rendering system
|
|
7
|
+
*/
|
|
8
|
+
export type AvatarInteractionRuntimeState = AvatarInteractionState & {
|
|
9
|
+
readonly lastFrameMs: number | null;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Raw shared pointer sample used to derive one avatar-local gaze target.
|
|
13
|
+
*
|
|
14
|
+
* @private utility of the avatar rendering system
|
|
15
|
+
*/
|
|
16
|
+
export type AvatarPointerSnapshot = {
|
|
17
|
+
readonly clientX: number;
|
|
18
|
+
readonly clientY: number;
|
|
19
|
+
readonly isPointerActive: boolean;
|
|
20
|
+
readonly pointerType: Exclude<AvatarPointerType, 'idle'>;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Avatar-local pointer target resolved from viewport coordinates.
|
|
24
|
+
*
|
|
25
|
+
* @private utility of the avatar rendering system
|
|
26
|
+
*/
|
|
27
|
+
export type AvatarPointerTarget = {
|
|
28
|
+
readonly gazeX: number;
|
|
29
|
+
readonly gazeY: number;
|
|
30
|
+
readonly bodyOffsetX: number;
|
|
31
|
+
readonly bodyOffsetY: number;
|
|
32
|
+
readonly intensity: number;
|
|
33
|
+
readonly isPointerActive: boolean;
|
|
34
|
+
readonly pointerType: AvatarPointerType;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Creates one stable cache key from the meaningful avatar-definition fields.
|
|
38
|
+
*
|
|
39
|
+
* @param avatarDefinition Normalized or raw avatar definition.
|
|
40
|
+
* @returns Stable cache key that ignores object identity churn.
|
|
41
|
+
*
|
|
42
|
+
* @private utility of the avatar rendering system
|
|
43
|
+
*/
|
|
44
|
+
export declare function createAvatarDefinitionKey(avatarDefinition: AvatarDefinition): string;
|
|
45
|
+
/**
|
|
46
|
+
* Returns the neutral interaction state used by static/server-side renders.
|
|
47
|
+
*
|
|
48
|
+
* @returns Zeroed interaction state.
|
|
49
|
+
*
|
|
50
|
+
* @private utility of the avatar rendering system
|
|
51
|
+
*/
|
|
52
|
+
export declare function createIdleAvatarInteractionState(): AvatarInteractionState;
|
|
53
|
+
/**
|
|
54
|
+
* Creates a fresh runtime state for the interactive animation loop.
|
|
55
|
+
*
|
|
56
|
+
* @returns Runtime interaction state with neutral values.
|
|
57
|
+
*
|
|
58
|
+
* @private utility of the avatar rendering system
|
|
59
|
+
*/
|
|
60
|
+
export declare function createAvatarInteractionRuntimeState(): AvatarInteractionRuntimeState;
|
|
61
|
+
/**
|
|
62
|
+
* Converts the shared viewport pointer state into one avatar-local gaze target.
|
|
63
|
+
*
|
|
64
|
+
* @param avatarBounds Canvas bounds in viewport coordinates.
|
|
65
|
+
* @param pointerSnapshot Latest shared pointer sample.
|
|
66
|
+
* @returns Local target used to steer eyes and subtle body lean.
|
|
67
|
+
*
|
|
68
|
+
* @private utility of the avatar rendering system
|
|
69
|
+
*/
|
|
70
|
+
export declare function resolveAvatarPointerTarget(avatarBounds: Pick<DOMRectReadOnly, 'left' | 'top' | 'width' | 'height'>, pointerSnapshot: AvatarPointerSnapshot | null): AvatarPointerTarget;
|
|
71
|
+
/**
|
|
72
|
+
* Advances the smoothed interaction state toward the latest pointer target.
|
|
73
|
+
*
|
|
74
|
+
* @param runtimeState Previous animation-frame state.
|
|
75
|
+
* @param pointerTarget Latest local pointer target.
|
|
76
|
+
* @param nowMs Current animation-frame timestamp.
|
|
77
|
+
* @returns Next runtime state to keep in the animation loop.
|
|
78
|
+
*
|
|
79
|
+
* @private utility of the avatar rendering system
|
|
80
|
+
*/
|
|
81
|
+
export declare function stepAvatarInteractionRuntimeState(runtimeState: AvatarInteractionRuntimeState, pointerTarget: AvatarPointerTarget, nowMs: number): AvatarInteractionRuntimeState;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AvatarPointerSnapshot } from './avatarInteractionUtils';
|
|
2
|
+
/**
|
|
3
|
+
* Starts the shared pointer tracker and returns a disposer for the caller.
|
|
4
|
+
*
|
|
5
|
+
* @returns Cleanup function that releases one consumer.
|
|
6
|
+
*
|
|
7
|
+
* @private utility of the avatar rendering system
|
|
8
|
+
*/
|
|
9
|
+
export declare function retainAvatarPointerTracking(): () => void;
|
|
10
|
+
/**
|
|
11
|
+
* Returns the latest shared viewport pointer sample when available.
|
|
12
|
+
*
|
|
13
|
+
* @returns Shared pointer snapshot or `null`.
|
|
14
|
+
*
|
|
15
|
+
* @private utility of the avatar rendering system
|
|
16
|
+
*/
|
|
17
|
+
export declare function getAvatarPointerSnapshot(): AvatarPointerSnapshot | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AgentBasicInformation } from '../book-2.0/agent-source/AgentBasicInformation';
|
|
2
2
|
import type { string_color } from '../types/typeAliases';
|
|
3
3
|
import type { AvatarDefinition } from './types/AvatarDefinition';
|
|
4
|
-
import type { AvatarPalette } from './types/AvatarVisualDefinition';
|
|
4
|
+
import type { AvatarPalette, AvatarSurfaceStyle } from './types/AvatarVisualDefinition';
|
|
5
5
|
/**
|
|
6
6
|
* Default square size used by avatar renderers.
|
|
7
7
|
*
|
|
@@ -48,11 +48,12 @@ export declare function createAvatarDefinitionFromAgentBasicInformation(agentBas
|
|
|
48
48
|
* Creates the shared derived palette used by every avatar visual.
|
|
49
49
|
*
|
|
50
50
|
* @param avatarDefinition Stable avatar definition.
|
|
51
|
+
* @param surface Surface style used by the parent UI.
|
|
51
52
|
* @returns Derived palette.
|
|
52
53
|
*
|
|
53
54
|
* @private utility of the avatar rendering system
|
|
54
55
|
*/
|
|
55
|
-
export declare function createAvatarPalette(avatarDefinition: AvatarDefinition): AvatarPalette;
|
|
56
|
+
export declare function createAvatarPalette(avatarDefinition: AvatarDefinition, surface?: AvatarSurfaceStyle): AvatarPalette;
|
|
56
57
|
/**
|
|
57
58
|
* Draws the common rounded background frame used by most visuals.
|
|
58
59
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,4 +4,4 @@ export { renderAvatarVisual } from './renderAvatarVisual';
|
|
|
4
4
|
export { createAvatarDefinitionFromAgentBasicInformation } from './avatarRenderingUtils';
|
|
5
5
|
export { AVATAR_VISUALS, getAvatarVisualById } from './visuals/avatarVisualRegistry';
|
|
6
6
|
export type { AvatarDefinition } from './types/AvatarDefinition';
|
|
7
|
-
export type { AvatarPalette, AvatarProps, AvatarVisual, AvatarVisualDefinition, AvatarVisualId, AvatarVisualRenderContext, RenderAvatarVisualOptions, } from './types/AvatarVisualDefinition';
|
|
7
|
+
export type { AvatarInteractionState, AvatarPalette, AvatarPointerType, AvatarProps, AvatarVisual, AvatarVisualDefinition, AvatarVisualId, AvatarVisualRenderContext, RenderAvatarVisualOptions, } from './types/AvatarVisualDefinition';
|
|
@@ -22,6 +22,32 @@ export type AvatarPalette = {
|
|
|
22
22
|
readonly shadow: string_color;
|
|
23
23
|
readonly ink: string_color;
|
|
24
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Surface style used when placing the avatar into different UI shells.
|
|
27
|
+
*
|
|
28
|
+
* @private shared contract for the avatar rendering system
|
|
29
|
+
*/
|
|
30
|
+
export type AvatarSurfaceStyle = 'framed' | 'transparent';
|
|
31
|
+
/**
|
|
32
|
+
* Pointer source currently driving avatar interaction.
|
|
33
|
+
*
|
|
34
|
+
* @private shared contract for the avatar rendering system
|
|
35
|
+
*/
|
|
36
|
+
export type AvatarPointerType = 'idle' | 'mouse' | 'touch' | 'pen';
|
|
37
|
+
/**
|
|
38
|
+
* Smoothed interaction state forwarded to animated avatar visuals.
|
|
39
|
+
*
|
|
40
|
+
* @private shared contract for the avatar rendering system
|
|
41
|
+
*/
|
|
42
|
+
export type AvatarInteractionState = {
|
|
43
|
+
readonly gazeX: number;
|
|
44
|
+
readonly gazeY: number;
|
|
45
|
+
readonly bodyOffsetX: number;
|
|
46
|
+
readonly bodyOffsetY: number;
|
|
47
|
+
readonly intensity: number;
|
|
48
|
+
readonly isPointerActive: boolean;
|
|
49
|
+
readonly pointerType: AvatarPointerType;
|
|
50
|
+
};
|
|
25
51
|
/**
|
|
26
52
|
* Rendering context forwarded to a single avatar visual.
|
|
27
53
|
*
|
|
@@ -36,6 +62,8 @@ export type AvatarVisualRenderContext = {
|
|
|
36
62
|
readonly avatarDefinition: AvatarDefinition;
|
|
37
63
|
readonly palette: AvatarPalette;
|
|
38
64
|
readonly createRandom: (salt: string) => () => number;
|
|
65
|
+
readonly surface: AvatarSurfaceStyle;
|
|
66
|
+
readonly interaction: AvatarInteractionState;
|
|
39
67
|
};
|
|
40
68
|
/**
|
|
41
69
|
* Signature of one canvas-based avatar visual renderer.
|
|
@@ -53,6 +81,7 @@ export type AvatarVisualDefinition = {
|
|
|
53
81
|
readonly title: string;
|
|
54
82
|
readonly description: string;
|
|
55
83
|
readonly isAnimated: boolean;
|
|
84
|
+
readonly supportsPointerTracking?: boolean;
|
|
56
85
|
readonly render: AvatarVisual;
|
|
57
86
|
};
|
|
58
87
|
/**
|
|
@@ -69,6 +98,10 @@ export type AvatarProps = {
|
|
|
69
98
|
* Selected visual style.
|
|
70
99
|
*/
|
|
71
100
|
readonly visualId: AvatarVisualId;
|
|
101
|
+
/**
|
|
102
|
+
* Surface used to composite the avatar in its parent UI.
|
|
103
|
+
*/
|
|
104
|
+
readonly surface?: AvatarSurfaceStyle;
|
|
72
105
|
/**
|
|
73
106
|
* Output size in CSS pixels.
|
|
74
107
|
*/
|
|
@@ -95,7 +128,9 @@ export type RenderAvatarVisualOptions = {
|
|
|
95
128
|
readonly canvas: HTMLCanvasElement;
|
|
96
129
|
readonly avatarDefinition: AvatarDefinition;
|
|
97
130
|
readonly visualId: AvatarVisualId;
|
|
131
|
+
readonly surface?: AvatarSurfaceStyle;
|
|
98
132
|
readonly size: number;
|
|
99
133
|
readonly timeMs: number;
|
|
100
134
|
readonly devicePixelRatio?: number;
|
|
135
|
+
readonly interaction?: AvatarInteractionState;
|
|
101
136
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AvatarInteractionState } from '../types/AvatarVisualDefinition';
|
|
1
2
|
/**
|
|
2
3
|
* One 2D point used by the shared organic octopus geometry helpers.
|
|
3
4
|
*
|
|
@@ -59,6 +60,7 @@ type CreateOrganicOctopusTentacleShapesOptions = {
|
|
|
59
60
|
readonly createRandom: (salt: string) => () => number;
|
|
60
61
|
readonly timeMs: number;
|
|
61
62
|
readonly saltPrefix: string;
|
|
63
|
+
readonly bodyPoints?: ReadonlyArray<Point>;
|
|
62
64
|
};
|
|
63
65
|
/**
|
|
64
66
|
* One sampled ribbon point on an organic octopus tentacle.
|
|
@@ -73,6 +75,21 @@ export type OrganicTentacleRibbonPoint = {
|
|
|
73
75
|
readonly width: number;
|
|
74
76
|
readonly progress: number;
|
|
75
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'>;
|
|
76
93
|
/**
|
|
77
94
|
* Builds a smoothly morphing octopus-like silhouette from deterministic parameters.
|
|
78
95
|
*
|
|
@@ -109,6 +126,23 @@ export declare function createOrganicOctopusTentacleShapes(options: CreateOrgani
|
|
|
109
126
|
* @private shared geometry helper of `octopus3AvatarVisual` and `asciiOctopusAvatarVisual`
|
|
110
127
|
*/
|
|
111
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;
|
|
112
146
|
/**
|
|
113
147
|
* Samples one point on a cubic Bezier curve.
|
|
114
148
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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">];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/umd/src/version.d.ts
CHANGED
|
@@ -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-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.112.0-47`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|