@promptbook/types 0.105.0-21 → 0.105.0-26
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/typings/src/_packages/browser.index.d.ts +2 -0
- package/esm/typings/src/_packages/core.index.d.ts +9 -13
- package/esm/typings/src/_packages/node.index.d.ts +2 -0
- package/esm/typings/src/_packages/types.index.d.ts +12 -2
- package/esm/typings/src/_packages/utils.index.d.ts +2 -0
- package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +1 -1
- package/esm/typings/src/book-components/Chat/AgentChip/AgentChip.d.ts +67 -0
- package/esm/typings/src/book-components/Chat/AgentChip/index.d.ts +2 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatMessageItem.d.ts +23 -0
- package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +10 -0
- package/esm/typings/src/book-components/Chat/LlmChat/FriendlyErrorMessage.d.ts +20 -0
- package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +8 -0
- package/esm/typings/src/book-components/Chat/SourceChip/SourceChip.d.ts +35 -0
- package/esm/typings/src/book-components/Chat/SourceChip/index.d.ts +2 -0
- package/esm/typings/src/book-components/Chat/types/ChatMessage.d.ts +21 -0
- package/esm/typings/src/book-components/Chat/utils/createTeamToolNameFromUrl.d.ts +12 -0
- package/esm/typings/src/book-components/Chat/utils/getToolCallChipletText.d.ts +21 -0
- package/esm/typings/src/book-components/Chat/utils/loadAgentProfile.d.ts +69 -0
- package/esm/typings/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +53 -0
- package/esm/typings/src/book-components/icons/EmailIcon.d.ts +15 -0
- package/esm/typings/src/commitments/TEMPLATE/TEMPLATE.d.ts +44 -0
- package/esm/typings/src/commitments/TEMPLATE/TEMPLATE.test.d.ts +1 -0
- package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +16 -2
- package/esm/typings/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +22 -0
- package/esm/typings/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +13 -0
- package/esm/typings/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +48 -0
- package/esm/typings/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +11 -0
- package/esm/typings/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +18 -0
- package/esm/typings/src/commitments/_common/commitmentToolFunctions.d.ts +26 -0
- package/esm/typings/src/commitments/_common/getAllCommitmentDefinitions.d.ts +8 -0
- package/esm/typings/src/commitments/_common/getAllCommitmentTypes.d.ts +8 -0
- package/esm/typings/src/commitments/_common/getAllCommitmentsToolFunctionsForBrowser.d.ts +9 -0
- package/esm/typings/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +13 -0
- package/esm/typings/src/commitments/_common/getAllCommitmentsToolTitles.d.ts +7 -0
- package/esm/typings/src/commitments/_common/getCommitmentDefinition.d.ts +10 -0
- package/esm/typings/src/commitments/_common/getGroupedCommitmentDefinitions.d.ts +17 -0
- package/esm/typings/src/commitments/_common/isCommitmentSupported.d.ts +9 -0
- package/esm/typings/src/commitments/index.d.ts +3 -64
- package/esm/typings/src/constants.d.ts +4 -0
- package/esm/typings/src/executables/$provideExecutablesForNode.d.ts +1 -0
- package/esm/typings/src/execution/utils/$provideExecutionToolsForNode.d.ts +1 -0
- package/esm/typings/src/pipeline/prompt-notation.d.ts +27 -2
- package/esm/typings/src/pipeline/prompt-notation.test.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +1 -0
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -0
- package/esm/typings/src/scrapers/_common/register/$provideScriptingForNode.d.ts +1 -0
- package/esm/typings/src/version.d.ts +1 -1
- package/esm/typings/src/wizard/wizard.d.ts +1 -4
- package/package.json +2 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
|
+
import { getAllCommitmentsToolFunctionsForBrowser } from '../commitments/_common/getAllCommitmentsToolFunctionsForBrowser';
|
|
2
3
|
import { SimplePromptInterfaceTools } from '../dialogs/simple-prompt/SimplePromptInterfaceTools';
|
|
3
4
|
import { $provideScrapersForBrowser } from '../scrapers/_common/register/$provideScrapersForBrowser';
|
|
4
5
|
import { BrowserSpeechRecognition } from '../speech-recognition/BrowserSpeechRecognition';
|
|
@@ -9,6 +10,7 @@ import { $induceBookDownload } from '../utils/files/$induceBookDownload';
|
|
|
9
10
|
import { $induceFileDownload } from '../utils/files/$induceFileDownload';
|
|
10
11
|
import { ObjectUrl } from '../utils/files/ObjectUrl';
|
|
11
12
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
13
|
+
export { getAllCommitmentsToolFunctionsForBrowser };
|
|
12
14
|
export { SimplePromptInterfaceTools };
|
|
13
15
|
export { $provideScrapersForBrowser };
|
|
14
16
|
export { BrowserSpeechRecognition };
|
|
@@ -21,14 +21,12 @@ import { pipelineCollectionToJson } from '../collection/pipeline-collection/pipe
|
|
|
21
21
|
import { createEmptyAgentModelRequirements } from '../commitments/_base/createEmptyAgentModelRequirements';
|
|
22
22
|
import { createBasicAgentModelRequirements } from '../commitments/_base/createEmptyAgentModelRequirements';
|
|
23
23
|
import { NotYetImplementedCommitmentDefinition } from '../commitments/_base/NotYetImplementedCommitmentDefinition';
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import { getAllCommitmentTypes } from '../commitments/
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import {
|
|
30
|
-
import { getAllCommitmentsToolFunctions } from '../commitments/index';
|
|
31
|
-
import { getAllCommitmentsToolTitles } from '../commitments/index';
|
|
24
|
+
import { getAllCommitmentDefinitions } from '../commitments/_common/getAllCommitmentDefinitions';
|
|
25
|
+
import { getAllCommitmentsToolTitles } from '../commitments/_common/getAllCommitmentsToolTitles';
|
|
26
|
+
import { getAllCommitmentTypes } from '../commitments/_common/getAllCommitmentTypes';
|
|
27
|
+
import { getCommitmentDefinition } from '../commitments/_common/getCommitmentDefinition';
|
|
28
|
+
import { getGroupedCommitmentDefinitions } from '../commitments/_common/getGroupedCommitmentDefinitions';
|
|
29
|
+
import { isCommitmentSupported } from '../commitments/_common/isCommitmentSupported';
|
|
32
30
|
import { NAME } from '../config';
|
|
33
31
|
import { ADMIN_EMAIL } from '../config';
|
|
34
32
|
import { PROMPTBOOK_LEGAL_ENTITY } from '../config';
|
|
@@ -226,14 +224,12 @@ export { pipelineCollectionToJson };
|
|
|
226
224
|
export { createEmptyAgentModelRequirements };
|
|
227
225
|
export { createBasicAgentModelRequirements };
|
|
228
226
|
export { NotYetImplementedCommitmentDefinition };
|
|
229
|
-
export { getCommitmentDefinition };
|
|
230
227
|
export { getAllCommitmentDefinitions };
|
|
228
|
+
export { getAllCommitmentsToolTitles };
|
|
231
229
|
export { getAllCommitmentTypes };
|
|
232
|
-
export {
|
|
233
|
-
export type { GroupedCommitmentDefinition };
|
|
230
|
+
export { getCommitmentDefinition };
|
|
234
231
|
export { getGroupedCommitmentDefinitions };
|
|
235
|
-
export {
|
|
236
|
-
export { getAllCommitmentsToolTitles };
|
|
232
|
+
export { isCommitmentSupported };
|
|
237
233
|
export { NAME };
|
|
238
234
|
export { ADMIN_EMAIL };
|
|
239
235
|
export { PROMPTBOOK_LEGAL_ENTITY };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
|
|
2
2
|
import { createPipelineCollectionFromDirectory } from '../collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory';
|
|
3
|
+
import { getAllCommitmentsToolFunctionsForNode } from '../commitments/_common/getAllCommitmentsToolFunctionsForNode';
|
|
3
4
|
import { $provideExecutablesForNode } from '../executables/$provideExecutablesForNode';
|
|
4
5
|
import { $provideExecutionToolsForNode } from '../execution/utils/$provideExecutionToolsForNode';
|
|
5
6
|
import { $provideLlmToolsConfigurationFromEnv } from '../llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv';
|
|
@@ -12,6 +13,7 @@ import { $execCommand } from '../utils/execCommand/$execCommand';
|
|
|
12
13
|
import { $execCommands } from '../utils/execCommand/$execCommands';
|
|
13
14
|
export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
|
|
14
15
|
export { createPipelineCollectionFromDirectory };
|
|
16
|
+
export { getAllCommitmentsToolFunctionsForNode };
|
|
15
17
|
export { $provideExecutablesForNode };
|
|
16
18
|
export { $provideExecutionToolsForNode };
|
|
17
19
|
export { $provideLlmToolsConfigurationFromEnv };
|
|
@@ -9,6 +9,8 @@ import type { AvatarProfileProps } from '../book-components/AvatarProfile/Avatar
|
|
|
9
9
|
import type { AvatarProfileFromSourceProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
|
|
10
10
|
import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
|
|
11
11
|
import type { AgentChatProps } from '../book-components/Chat/AgentChat/AgentChatProps';
|
|
12
|
+
import type { AgentChipData } from '../book-components/Chat/AgentChip/AgentChip';
|
|
13
|
+
import type { AgentChipProps } from '../book-components/Chat/AgentChip/AgentChip';
|
|
12
14
|
import type { ChatSoundSystem } from '../book-components/Chat/Chat/ChatProps';
|
|
13
15
|
import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
|
|
14
16
|
import type { ChatSoundToggleProps } from '../book-components/Chat/Chat/ChatSoundToggle';
|
|
@@ -18,14 +20,18 @@ import type { ChatEffectsSystemProps } from '../book-components/Chat/effects/typ
|
|
|
18
20
|
import type { ChatEffectType } from '../book-components/Chat/effects/types/ChatEffectType';
|
|
19
21
|
import type { ChatAutoScrollConfig } from '../book-components/Chat/hooks/useChatAutoScroll';
|
|
20
22
|
import type { SendMessageToLlmChatFunction } from '../book-components/Chat/hooks/useSendMessageToLlmChat';
|
|
23
|
+
import type { FriendlyErrorMessage } from '../book-components/Chat/LlmChat/FriendlyErrorMessage';
|
|
21
24
|
import type { LlmChatProps } from '../book-components/Chat/LlmChat/LlmChatProps';
|
|
22
25
|
import type { MockedChatDelayConfig } from '../book-components/Chat/MockedChat/MockedChat';
|
|
23
26
|
import type { MockedChatProps } from '../book-components/Chat/MockedChat/MockedChat';
|
|
24
27
|
import type { ChatSaveFormatDefinition } from '../book-components/Chat/save/_common/ChatSaveFormatDefinition';
|
|
25
28
|
import type { string_chat_format_name } from '../book-components/Chat/save/_common/string_chat_format_name';
|
|
29
|
+
import type { SourceChipProps } from '../book-components/Chat/SourceChip/SourceChip';
|
|
26
30
|
import type { ChatToolCall } from '../book-components/Chat/types/ChatMessage';
|
|
27
31
|
import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
|
|
28
32
|
import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
|
|
33
|
+
import type { ToolCallChipletInfo } from '../book-components/Chat/utils/getToolCallChipletText';
|
|
34
|
+
import type { ParsedCitation } from '../book-components/Chat/utils/parseCitationsFromContent';
|
|
29
35
|
import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
|
|
30
36
|
import type { TeamToolResult } from '../book-components/Chat/utils/toolCallParsing';
|
|
31
37
|
import type { QrCodeOptions } from '../book-components/Qr/useQrCode';
|
|
@@ -66,7 +72,6 @@ import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentComma
|
|
|
66
72
|
import type { BookCommitment } from '../commitments/_base/BookCommitment';
|
|
67
73
|
import type { CommitmentDefinition } from '../commitments/_base/CommitmentDefinition';
|
|
68
74
|
import type { ParsedCommitment } from '../commitments/_base/ParsedCommitment';
|
|
69
|
-
import type { GroupedCommitmentDefinition } from '../commitments/index';
|
|
70
75
|
import type { PrettifyOptions } from '../conversion/prettify/PrettifyOptions';
|
|
71
76
|
import type { renderPipelineMermaidOptions } from '../conversion/prettify/renderPipelineMermaidOptions';
|
|
72
77
|
import type { CallbackInterfaceToolsOptions } from '../dialogs/callback/CallbackInterfaceToolsOptions';
|
|
@@ -398,6 +403,8 @@ export type { AvatarProfileProps };
|
|
|
398
403
|
export type { AvatarProfileFromSourceProps };
|
|
399
404
|
export type { BookEditorProps };
|
|
400
405
|
export type { AgentChatProps };
|
|
406
|
+
export type { AgentChipData };
|
|
407
|
+
export type { AgentChipProps };
|
|
401
408
|
export type { ChatSoundSystem };
|
|
402
409
|
export type { ChatProps };
|
|
403
410
|
export type { ChatSoundToggleProps };
|
|
@@ -407,14 +414,18 @@ export type { ChatEffectsSystemProps };
|
|
|
407
414
|
export type { ChatEffectType };
|
|
408
415
|
export type { ChatAutoScrollConfig };
|
|
409
416
|
export type { SendMessageToLlmChatFunction };
|
|
417
|
+
export type { FriendlyErrorMessage };
|
|
410
418
|
export type { LlmChatProps };
|
|
411
419
|
export type { MockedChatDelayConfig };
|
|
412
420
|
export type { MockedChatProps };
|
|
413
421
|
export type { ChatSaveFormatDefinition };
|
|
414
422
|
export type { string_chat_format_name };
|
|
423
|
+
export type { SourceChipProps };
|
|
415
424
|
export type { ChatToolCall };
|
|
416
425
|
export type { ChatMessage };
|
|
417
426
|
export type { ChatParticipant };
|
|
427
|
+
export type { ToolCallChipletInfo };
|
|
428
|
+
export type { ParsedCitation };
|
|
418
429
|
export type { MessageButton };
|
|
419
430
|
export type { TeamToolResult };
|
|
420
431
|
export type { QrCodeOptions };
|
|
@@ -455,7 +466,6 @@ export type { InstrumentCommand };
|
|
|
455
466
|
export type { BookCommitment };
|
|
456
467
|
export type { CommitmentDefinition };
|
|
457
468
|
export type { ParsedCommitment };
|
|
458
|
-
export type { GroupedCommitmentDefinition };
|
|
459
469
|
export type { PrettifyOptions };
|
|
460
470
|
export type { renderPipelineMermaidOptions };
|
|
461
471
|
export type { CallbackInterfaceToolsOptions };
|
|
@@ -9,6 +9,7 @@ import { isValidCsvString } from '../formats/csv/utils/isValidCsvString';
|
|
|
9
9
|
import { isValidJsonString } from '../formats/json/utils/isValidJsonString';
|
|
10
10
|
import { jsonParse } from '../formats/json/utils/jsonParse';
|
|
11
11
|
import { isValidXmlString } from '../formats/xml/utils/isValidXmlString';
|
|
12
|
+
import { PromptString } from '../pipeline/prompt-notation';
|
|
12
13
|
import { prompt } from '../pipeline/prompt-notation';
|
|
13
14
|
import { promptTemplate } from '../pipeline/prompt-notation';
|
|
14
15
|
import { $detectRuntimeEnvironment } from '../utils/environment/$detectRuntimeEnvironment';
|
|
@@ -99,6 +100,7 @@ export { isValidCsvString };
|
|
|
99
100
|
export { isValidJsonString };
|
|
100
101
|
export { jsonParse };
|
|
101
102
|
export { isValidXmlString };
|
|
103
|
+
export { PromptString };
|
|
102
104
|
export { prompt };
|
|
103
105
|
export { promptTemplate };
|
|
104
106
|
export { $detectRuntimeEnvironment };
|
|
@@ -31,7 +31,7 @@ export type AgentCapability = {
|
|
|
31
31
|
/**
|
|
32
32
|
* The type of the capability
|
|
33
33
|
*/
|
|
34
|
-
type: 'browser' | 'search-engine' | 'knowledge' | 'time' | 'inheritance' | 'import' | 'image-generator' | 'team';
|
|
34
|
+
type: 'browser' | 'search-engine' | 'knowledge' | 'time' | 'inheritance' | 'import' | 'image-generator' | 'team' | 'email';
|
|
35
35
|
/**
|
|
36
36
|
* The label to display for this capability
|
|
37
37
|
*/
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { string_url } from '../../../types/typeAliases';
|
|
3
|
+
/**
|
|
4
|
+
* Agent profile information for chip display
|
|
5
|
+
*/
|
|
6
|
+
export type AgentChipData = {
|
|
7
|
+
/**
|
|
8
|
+
* Agent URL (required)
|
|
9
|
+
*/
|
|
10
|
+
url: string_url;
|
|
11
|
+
/**
|
|
12
|
+
* Agent display name/label
|
|
13
|
+
*/
|
|
14
|
+
label?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Agent profile image URL
|
|
17
|
+
*/
|
|
18
|
+
imageUrl?: string_url;
|
|
19
|
+
/**
|
|
20
|
+
* Public URL of the agents server (for generating placeholder images)
|
|
21
|
+
*/
|
|
22
|
+
publicUrl?: string_url;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Props for AgentChip component
|
|
26
|
+
*/
|
|
27
|
+
export type AgentChipProps = {
|
|
28
|
+
/**
|
|
29
|
+
* Agent data to display
|
|
30
|
+
*/
|
|
31
|
+
agent: AgentChipData;
|
|
32
|
+
/**
|
|
33
|
+
* Whether this is an ongoing interaction (shows spinner)
|
|
34
|
+
*/
|
|
35
|
+
isOngoing?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Whether this is clickable (completed state)
|
|
38
|
+
*/
|
|
39
|
+
isClickable?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Click handler
|
|
42
|
+
*/
|
|
43
|
+
onClick?: (event?: React.MouseEvent) => void;
|
|
44
|
+
/**
|
|
45
|
+
* Additional CSS class name
|
|
46
|
+
*/
|
|
47
|
+
className?: string;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* AgentChip component - displays a chip with agent avatar and name
|
|
51
|
+
*
|
|
52
|
+
* This component is used to display agent interactions in chat messages.
|
|
53
|
+
* It fetches the agent profile if needed and displays the agent's avatar and name.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* <AgentChip
|
|
58
|
+
* agent={{ url: 'https://agents.example.com/joe', label: 'Joe' }}
|
|
59
|
+
* isOngoing={false}
|
|
60
|
+
* isClickable={true}
|
|
61
|
+
* onClick={() => console.log('clicked')}
|
|
62
|
+
* />
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @private utility of `ChatMessageItem` component
|
|
66
|
+
*/
|
|
67
|
+
export declare function AgentChip({ agent, isOngoing, isClickable, onClick, className }: AgentChipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { id } from '../../../types/typeAliases';
|
|
3
3
|
import type { ChatMessage } from '../types/ChatMessage';
|
|
4
4
|
import type { ChatParticipant } from '../types/ChatParticipant';
|
|
5
|
+
import { type ParsedCitation } from '../utils/parseCitationsFromContent';
|
|
5
6
|
import type { ChatProps } from './ChatProps';
|
|
6
7
|
/**
|
|
7
8
|
* Props for the `ChatMessageItem` component
|
|
@@ -38,11 +39,33 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'participants'> & {
|
|
|
38
39
|
* e.g., { "web_search": "Searching the web..." }
|
|
39
40
|
*/
|
|
40
41
|
toolTitles?: Record<string, string>;
|
|
42
|
+
/**
|
|
43
|
+
* Optional metadata about teammates for team tool calls
|
|
44
|
+
* Maps tool name to agent information
|
|
45
|
+
*/
|
|
46
|
+
teammates?: TeammatesMap;
|
|
41
47
|
/**
|
|
42
48
|
* Called when a tool call chiplet is clicked.
|
|
43
49
|
*/
|
|
44
50
|
onToolCallClick?: (toolCall: NonNullable<ChatMessage['toolCalls']>[number]) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Called when a source citation chip is clicked.
|
|
53
|
+
*/
|
|
54
|
+
onCitationClick?: (citation: ParsedCitation) => void;
|
|
45
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Metadata for a teammate agent tool.
|
|
58
|
+
*/
|
|
59
|
+
type TeammateMetadata = {
|
|
60
|
+
url: string;
|
|
61
|
+
label?: string;
|
|
62
|
+
instructions?: string;
|
|
63
|
+
toolName: string;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Lookup map of teammate metadata by tool name.
|
|
67
|
+
*/
|
|
68
|
+
type TeammatesMap = Record<string, TeammateMetadata>;
|
|
46
69
|
/**
|
|
47
70
|
* Renders a single chat message item with avatar, content, buttons, and rating.
|
|
48
71
|
*
|
|
@@ -169,6 +169,16 @@ export type ChatProps = {
|
|
|
169
169
|
* e.g., { "web_search": "Searching the web..." }
|
|
170
170
|
*/
|
|
171
171
|
readonly toolTitles?: Record<string, string>;
|
|
172
|
+
/**
|
|
173
|
+
* Optional metadata about teammates for team tool calls
|
|
174
|
+
* Maps tool name to agent information
|
|
175
|
+
*/
|
|
176
|
+
readonly teammates?: Record<string, {
|
|
177
|
+
url: string;
|
|
178
|
+
label?: string;
|
|
179
|
+
instructions?: string;
|
|
180
|
+
toolName: string;
|
|
181
|
+
}>;
|
|
172
182
|
/**
|
|
173
183
|
* Optional callback to create a new agent from the template.
|
|
174
184
|
* If provided, renders the [Create Agent] button for book code blocks.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error types for LlmChat component
|
|
3
|
+
*
|
|
4
|
+
* This is a minimal type definition for use in the Promptbook Engine component.
|
|
5
|
+
* The full implementation is in the Agent Server.
|
|
6
|
+
*/
|
|
7
|
+
export type FriendlyErrorMessage = {
|
|
8
|
+
/**
|
|
9
|
+
* @@@
|
|
10
|
+
*/
|
|
11
|
+
title: string;
|
|
12
|
+
/**
|
|
13
|
+
* @@@
|
|
14
|
+
*/
|
|
15
|
+
message: string;
|
|
16
|
+
/**
|
|
17
|
+
* @@@
|
|
18
|
+
*/
|
|
19
|
+
canRetry: boolean;
|
|
20
|
+
};
|
|
@@ -62,4 +62,12 @@ export type LlmChatProps = Omit<ChatProps, 'messages' | 'onMessage' | 'onChange'
|
|
|
62
62
|
* e.g., { "web_search": "Searching the web..." }
|
|
63
63
|
*/
|
|
64
64
|
readonly toolTitles?: Record<string, string>;
|
|
65
|
+
/**
|
|
66
|
+
* Optional custom error handler that will be called when an error occurs during chat.
|
|
67
|
+
* If not provided, errors will be displayed as messages in the chat.
|
|
68
|
+
*
|
|
69
|
+
* @param error - The error that occurred
|
|
70
|
+
* @param retry - Function to retry the last failed message
|
|
71
|
+
*/
|
|
72
|
+
onError?(error: unknown, retry: () => void): void;
|
|
65
73
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ParsedCitation } from '../utils/parseCitationsFromContent';
|
|
2
|
+
/**
|
|
3
|
+
* Props for SourceChip component
|
|
4
|
+
*/
|
|
5
|
+
export type SourceChipProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Citation data to display
|
|
8
|
+
*/
|
|
9
|
+
citation: ParsedCitation;
|
|
10
|
+
/**
|
|
11
|
+
* Click handler
|
|
12
|
+
*/
|
|
13
|
+
onClick?: (citation: ParsedCitation) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Additional CSS class name
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* SourceChip component - displays a chip with source document information
|
|
21
|
+
*
|
|
22
|
+
* This component is used to display RAG source citations in chat messages.
|
|
23
|
+
* It displays the source document name and citation ID.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* <SourceChip
|
|
28
|
+
* citation={{ id: '5:13', source: 'document.pdf' }}
|
|
29
|
+
* onClick={(citation) => console.log('clicked', citation)}
|
|
30
|
+
* />
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @private utility of `ChatMessageItem` component
|
|
34
|
+
*/
|
|
35
|
+
export declare function SourceChip({ citation, onClick, className }: SourceChipProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -66,6 +66,27 @@ export type ChatMessage = Omit<Message<id>, 'direction' | 'recipients' | 'thread
|
|
|
66
66
|
*/
|
|
67
67
|
url: string;
|
|
68
68
|
}>;
|
|
69
|
+
/**
|
|
70
|
+
* Optional source citations/annotations (from RAG systems like OpenAI Assistants)
|
|
71
|
+
*/
|
|
72
|
+
readonly citations?: ReadonlyArray<{
|
|
73
|
+
/**
|
|
74
|
+
* The unique identifier for the citation (e.g., "5:13")
|
|
75
|
+
*/
|
|
76
|
+
id: string;
|
|
77
|
+
/**
|
|
78
|
+
* The source document name (e.g., "document.pdf")
|
|
79
|
+
*/
|
|
80
|
+
source: string;
|
|
81
|
+
/**
|
|
82
|
+
* Optional URL to the source document
|
|
83
|
+
*/
|
|
84
|
+
url?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Optional preview/excerpt from the source
|
|
87
|
+
*/
|
|
88
|
+
excerpt?: string;
|
|
89
|
+
}>;
|
|
69
90
|
};
|
|
70
91
|
/**
|
|
71
92
|
* TODO: Make all fields readonly
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Builds a TEAM tool name from a teammate agent URL.
|
|
3
|
+
*
|
|
4
|
+
* @private utility of chat components
|
|
5
|
+
*/
|
|
6
|
+
export declare function createTeamToolNameFromUrl(url: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Checks whether a tool name belongs to a TEAM tool.
|
|
9
|
+
*
|
|
10
|
+
* @private utility of chat components
|
|
11
|
+
*/
|
|
12
|
+
export declare function isTeamToolName(name: string): boolean;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import type { ToolCall } from '../../../types/ToolCall';
|
|
2
|
+
import type { AgentChipData } from '../AgentChip';
|
|
2
3
|
/**
|
|
3
4
|
* Utility to format tool call information for user-friendly display.
|
|
4
5
|
*/
|
|
6
|
+
/**
|
|
7
|
+
* Tool call chiplet information including agent data for team tools
|
|
8
|
+
*/
|
|
9
|
+
export type ToolCallChipletInfo = {
|
|
10
|
+
/**
|
|
11
|
+
* Display text for the chiplet
|
|
12
|
+
*/
|
|
13
|
+
text: string;
|
|
14
|
+
/**
|
|
15
|
+
* Agent data for team tools (if applicable)
|
|
16
|
+
*/
|
|
17
|
+
agentData?: AgentChipData;
|
|
18
|
+
};
|
|
5
19
|
/**
|
|
6
20
|
* Technical to user-friendly tool names and emojis
|
|
7
21
|
*
|
|
@@ -14,6 +28,13 @@ export declare const TOOL_TITLES: Record<string, {
|
|
|
14
28
|
/**
|
|
15
29
|
* Gets the user-friendly text for a tool call chiplet.
|
|
16
30
|
*
|
|
31
|
+
* @deprecated Use getToolCallChipletInfo instead which returns both text and agent data
|
|
17
32
|
* @private [🧠] Maybe public?
|
|
18
33
|
*/
|
|
19
34
|
export declare function getToolCallChipletText(toolCall: ToolCall): string;
|
|
35
|
+
/**
|
|
36
|
+
* Gets the chiplet information including text and agent data (for team tools).
|
|
37
|
+
*
|
|
38
|
+
* @private [🧠] Maybe public?
|
|
39
|
+
*/
|
|
40
|
+
export declare function getToolCallChipletInfo(toolCall: ToolCall): ToolCallChipletInfo;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { string_url, string_url_image } from '../../../types/typeAliases';
|
|
2
|
+
/**
|
|
3
|
+
* Input data for resolving agent profiles.
|
|
4
|
+
* @private
|
|
5
|
+
*/
|
|
6
|
+
export type AgentProfileInput = {
|
|
7
|
+
url: string_url;
|
|
8
|
+
label?: string;
|
|
9
|
+
imageUrl?: string_url_image;
|
|
10
|
+
publicUrl?: string_url;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Resolved agent profile data for UI usage.
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
export type AgentProfileData = {
|
|
17
|
+
label: string;
|
|
18
|
+
imageUrl: string_url_image | null;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Extracts agent name from URL.
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
export declare function extractAgentNameFromUrl(url: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Determines whether a label looks like an autogenerated identifier.
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
29
|
+
export declare function isLikelyGeneratedId(label: string): boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Resolves the initial label for an agent without exposing generated IDs.
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveInitialAgentLabel(agent: AgentProfileInput): string;
|
|
35
|
+
/**
|
|
36
|
+
* Picks the best available label from profile data without exposing IDs.
|
|
37
|
+
* @private
|
|
38
|
+
*/
|
|
39
|
+
export declare function resolvePreferredAgentLabel(candidates: Array<string | undefined>, fallback: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Resolves the agents server base URL from the agent URL or provided public URL.
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
export declare function resolveAgentsServerUrl(agentUrl: string, publicUrl?: string_url): string | null;
|
|
45
|
+
/**
|
|
46
|
+
* Resolves the profile image URL, handling relative URLs when needed.
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveProfileImageUrl(profileImageUrl: string_url_image | undefined, agentUrl: string_url, publicUrl?: string_url): string_url_image | null;
|
|
50
|
+
/**
|
|
51
|
+
* Builds a placeholder image URL for the agent when no profile image is available.
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolvePlaceholderImageUrl(agent: AgentProfileInput): string_url_image | null;
|
|
55
|
+
/**
|
|
56
|
+
* Returns true when a profile fetch would likely improve the label or image.
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
export declare function shouldFetchAgentProfile(agent: AgentProfileInput): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Resolves fallback profile data without fetching remote metadata.
|
|
62
|
+
* @private
|
|
63
|
+
*/
|
|
64
|
+
export declare function resolveAgentProfileFallback(agent: AgentProfileInput): AgentProfileData;
|
|
65
|
+
/**
|
|
66
|
+
* Loads agent profile data from the agent profile endpoint when needed.
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
export declare function loadAgentProfile(agent: AgentProfileInput): Promise<AgentProfileData>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { ChatMessage } from '../types/ChatMessage';
|
|
2
|
+
/**
|
|
3
|
+
* Type representing a parsed citation from RAG sources
|
|
4
|
+
*/
|
|
5
|
+
export type ParsedCitation = {
|
|
6
|
+
/**
|
|
7
|
+
* The unique identifier for the citation (e.g., "5:13")
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* The source document name (e.g., "document.pdf")
|
|
12
|
+
*/
|
|
13
|
+
source: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional URL to the source document
|
|
16
|
+
*/
|
|
17
|
+
url?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional preview/excerpt from the source
|
|
20
|
+
*/
|
|
21
|
+
excerpt?: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Parses OpenAI Assistant-style citations from message content
|
|
25
|
+
* Matches patterns like: 【5:13†document.pdf】
|
|
26
|
+
*
|
|
27
|
+
* @param content - The markdown content that may contain citations
|
|
28
|
+
* @returns Array of parsed citations
|
|
29
|
+
*
|
|
30
|
+
* @private utility for internal use
|
|
31
|
+
*/
|
|
32
|
+
export declare function parseCitationsFromContent(content: string): ParsedCitation[];
|
|
33
|
+
/**
|
|
34
|
+
* Removes citation markers from content and returns clean text
|
|
35
|
+
*
|
|
36
|
+
* @param content - The markdown content with citations
|
|
37
|
+
* @returns Content with citation markers removed
|
|
38
|
+
*
|
|
39
|
+
* @private utility for internal use
|
|
40
|
+
*/
|
|
41
|
+
export declare function stripCitationsFromContent(content: string): string;
|
|
42
|
+
/**
|
|
43
|
+
* Extracts citations from a chat message if not already present
|
|
44
|
+
*
|
|
45
|
+
* @param message - The chat message to extract citations from
|
|
46
|
+
* @returns The message with citations array populated
|
|
47
|
+
*
|
|
48
|
+
* @private utility for internal use
|
|
49
|
+
*/
|
|
50
|
+
export declare function extractCitationsFromMessage(message: ChatMessage): ChatMessage;
|
|
51
|
+
/**
|
|
52
|
+
* TODO: Maybe spread into multiple files
|
|
53
|
+
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the EmailIcon component.
|
|
3
|
+
*/
|
|
4
|
+
type EmailIconProps = {
|
|
5
|
+
size?: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Renders an email/envelope icon.
|
|
10
|
+
*
|
|
11
|
+
* @param props - SVG properties augmented with an optional `size`
|
|
12
|
+
* @private internal subcomponent used by various components
|
|
13
|
+
*/
|
|
14
|
+
export declare function EmailIcon({ size, color }: EmailIconProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
2
|
+
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* TEMPLATE commitment definition
|
|
5
|
+
*
|
|
6
|
+
* The TEMPLATE commitment enforces a specific response structure or template
|
|
7
|
+
* that the agent must follow when generating responses. This helps ensure
|
|
8
|
+
* consistent message formatting across all agent interactions.
|
|
9
|
+
*
|
|
10
|
+
* Example usage in agent source:
|
|
11
|
+
*
|
|
12
|
+
* ```book
|
|
13
|
+
* TEMPLATE Always structure your response with: 1) Summary, 2) Details, 3) Next steps
|
|
14
|
+
* TEMPLATE Use the following format: **Question:** [user question] | **Answer:** [your answer]
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* When used without content, it enables template mode which instructs the agent
|
|
18
|
+
* to follow any template patterns defined in other commitments or context.
|
|
19
|
+
*
|
|
20
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
21
|
+
*/
|
|
22
|
+
export declare class TemplateCommitmentDefinition extends BaseCommitmentDefinition<'TEMPLATE' | 'TEMPLATES'> {
|
|
23
|
+
constructor(type?: 'TEMPLATE' | 'TEMPLATES');
|
|
24
|
+
/**
|
|
25
|
+
* Short one-line description of TEMPLATE.
|
|
26
|
+
*/
|
|
27
|
+
get description(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Icon for this commitment.
|
|
30
|
+
*/
|
|
31
|
+
get icon(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Markdown documentation for TEMPLATE commitment.
|
|
34
|
+
*/
|
|
35
|
+
get documentation(): string;
|
|
36
|
+
/**
|
|
37
|
+
* TEMPLATE can be used with or without content.
|
|
38
|
+
*/
|
|
39
|
+
get requiresContent(): boolean;
|
|
40
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
44
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
+
import { string_javascript_name } from '../../_packages/types.index';
|
|
1
2
|
import type { AgentModelRequirements } from '../../book-2.0/agent-source/AgentModelRequirements';
|
|
3
|
+
import { ToolFunction } from '../../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
2
4
|
import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
|
|
3
5
|
/**
|
|
4
6
|
* USE BROWSER commitment definition
|
|
5
7
|
*
|
|
6
|
-
* The `USE BROWSER` commitment indicates that the agent should utilize
|
|
8
|
+
* The `USE BROWSER` commitment indicates that the agent should utilize browser tools
|
|
7
9
|
* to access and retrieve up-to-date information from the internet when necessary.
|
|
8
10
|
*
|
|
11
|
+
* This commitment provides two levels of browser access:
|
|
12
|
+
* 1. One-shot URL fetching: Simple function to fetch and scrape URL content
|
|
13
|
+
* 2. Running browser: For complex tasks like scrolling, clicking, etc. (prepared but not active yet)
|
|
14
|
+
*
|
|
9
15
|
* The content following `USE BROWSER` is ignored (similar to NOTE).
|
|
10
16
|
*
|
|
11
17
|
* Example usage in agent source:
|
|
@@ -38,8 +44,16 @@ export declare class UseBrowserCommitmentDefinition extends BaseCommitmentDefini
|
|
|
38
44
|
/**
|
|
39
45
|
* Gets human-readable titles for tool functions provided by this commitment.
|
|
40
46
|
*/
|
|
41
|
-
getToolTitles(): Record<
|
|
47
|
+
getToolTitles(): Record<string_javascript_name, string>;
|
|
42
48
|
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
49
|
+
/**
|
|
50
|
+
* Gets the browser tool function implementations.
|
|
51
|
+
*
|
|
52
|
+
* This method automatically detects the environment and uses:
|
|
53
|
+
* - Server-side: Direct scraping via fetchUrlContent (Node.js)
|
|
54
|
+
* - Browser: Proxy through Agents Server API via fetchUrlContentViaBrowser
|
|
55
|
+
*/
|
|
56
|
+
getToolFunctions(): Record<string_javascript_name, ToolFunction>;
|
|
43
57
|
}
|
|
44
58
|
/**
|
|
45
59
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fetches and scrapes content from a URL (SERVER-SIDE ONLY)
|
|
3
|
+
*
|
|
4
|
+
* This function:
|
|
5
|
+
* 1. Fetches the URL content using promptbookFetch
|
|
6
|
+
* 2. Determines the content type (HTML, PDF, etc.)
|
|
7
|
+
* 3. Uses the appropriate scraper to convert to markdown
|
|
8
|
+
* 4. Returns the scraped markdown content
|
|
9
|
+
*
|
|
10
|
+
* @param url The URL to fetch and scrape
|
|
11
|
+
* @returns Markdown content from the URL
|
|
12
|
+
*
|
|
13
|
+
* @private internal utility for USE BROWSER commitment
|
|
14
|
+
*
|
|
15
|
+
* WARNING: This function should NOT be used directly in browser environments.
|
|
16
|
+
* For browser environments, use fetchUrlContentViaBrowser which proxies through
|
|
17
|
+
* the Agents Server API endpoint at /api/scrape
|
|
18
|
+
*/
|
|
19
|
+
export declare function fetchUrlContent(url: string): Promise<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
22
|
+
*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side safe wrapper for fetching URL content
|
|
3
|
+
*
|
|
4
|
+
* This function proxies requests to the Agents Server API endpoint for scraping,
|
|
5
|
+
* making it safe to use in browser environments.
|
|
6
|
+
*
|
|
7
|
+
* @param url The URL to fetch and scrape
|
|
8
|
+
* @param agentsServerUrl The base URL of the agents server (defaults to current origin)
|
|
9
|
+
* @returns Markdown content from the URL
|
|
10
|
+
*
|
|
11
|
+
* @private internal utility for USE BROWSER commitment
|
|
12
|
+
*/
|
|
13
|
+
export declare function fetchUrlContentViaBrowser(url: string, agentsServerUrl?: string): Promise<string>;
|
|
@@ -0,0 +1,48 @@
|
|
|
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 EMAIL commitment definition
|
|
7
|
+
*
|
|
8
|
+
* The `USE EMAIL` commitment enables the agent to send emails.
|
|
9
|
+
*
|
|
10
|
+
* Example usage in agent source:
|
|
11
|
+
*
|
|
12
|
+
* ```book
|
|
13
|
+
* USE EMAIL
|
|
14
|
+
* USE EMAIL Write always formal and polite emails, always greet.
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* @private [🪔] Maybe export the commitments through some package
|
|
18
|
+
*/
|
|
19
|
+
export declare class UseEmailCommitmentDefinition extends BaseCommitmentDefinition<'USE EMAIL'> {
|
|
20
|
+
constructor();
|
|
21
|
+
get requiresContent(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Short one-line description of USE EMAIL.
|
|
24
|
+
*/
|
|
25
|
+
get description(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Icon for this commitment.
|
|
28
|
+
*/
|
|
29
|
+
get icon(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Markdown documentation for USE EMAIL commitment.
|
|
32
|
+
*/
|
|
33
|
+
get documentation(): string;
|
|
34
|
+
applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
|
|
35
|
+
/**
|
|
36
|
+
* Gets human-readable titles for tool functions provided by this commitment.
|
|
37
|
+
*/
|
|
38
|
+
getToolTitles(): Record<string_javascript_name, string>;
|
|
39
|
+
/**
|
|
40
|
+
* Gets the `send_email` tool function implementation.
|
|
41
|
+
*
|
|
42
|
+
* Note: [??] This function has implementation both for browser and node, this is the proxied one for browser.
|
|
43
|
+
*/
|
|
44
|
+
getToolFunctions(): Record<string_javascript_name, ToolFunction>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
48
|
+
*/
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ToolFunction } from '../../_packages/types.index';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the server-side implementation of the send_email tool for Node.js environments.
|
|
4
|
+
*
|
|
5
|
+
* This uses a lazy require so the core package can still load even if the Agents Server
|
|
6
|
+
* module is unavailable. When the server tool cannot be resolved, a fallback implementation
|
|
7
|
+
* throws a helpful error message.
|
|
8
|
+
*
|
|
9
|
+
* @private internal utility for USE EMAIL commitment
|
|
10
|
+
*/
|
|
11
|
+
export declare function resolveSendEmailToolForNode(): ToolFunction;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Client-side safe wrapper for sending emails.
|
|
3
|
+
*
|
|
4
|
+
* This function proxies requests to the Agents Server API endpoint for email queuing,
|
|
5
|
+
* making it safe to use in browser environments.
|
|
6
|
+
*
|
|
7
|
+
* @param args Email payload containing recipients, subject, and body
|
|
8
|
+
* @param agentsServerUrl The base URL of the agents server (defaults to current origin)
|
|
9
|
+
* @returns Result string from the server-side send_email tool
|
|
10
|
+
*
|
|
11
|
+
* @private internal utility for USE EMAIL commitment
|
|
12
|
+
*/
|
|
13
|
+
export declare function sendEmailViaBrowser(args: {
|
|
14
|
+
to: string[];
|
|
15
|
+
cc?: string[];
|
|
16
|
+
subject: string;
|
|
17
|
+
body: string;
|
|
18
|
+
}, agentsServerUrl?: string): Promise<string>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ToolFunction } from '../../_packages/types.index';
|
|
2
|
+
import { string_javascript_name } from '../../types/typeAliases';
|
|
3
|
+
/**
|
|
4
|
+
* Map of tool functions keyed by function name.
|
|
5
|
+
*
|
|
6
|
+
* @private internal helper for commitment tool registry
|
|
7
|
+
*/
|
|
8
|
+
export type CommitmentToolFunctions = Record<string_javascript_name, ToolFunction>;
|
|
9
|
+
/**
|
|
10
|
+
* Collects tool functions from all commitment definitions.
|
|
11
|
+
*
|
|
12
|
+
* @returns Map of tool function implementations.
|
|
13
|
+
* @private internal helper for commitment tool registry
|
|
14
|
+
*/
|
|
15
|
+
export declare function collectCommitmentToolFunctions(): CommitmentToolFunctions;
|
|
16
|
+
/**
|
|
17
|
+
* Creates a proxy that resolves tool functions on demand.
|
|
18
|
+
*
|
|
19
|
+
* @param getFunctions - Provider of current tool functions.
|
|
20
|
+
* @returns Proxy exposing tool functions as properties.
|
|
21
|
+
* @private internal helper for commitment tool registry
|
|
22
|
+
*/
|
|
23
|
+
export declare function createToolFunctionsProxy(getFunctions: () => CommitmentToolFunctions): CommitmentToolFunctions;
|
|
24
|
+
/**
|
|
25
|
+
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
26
|
+
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommitmentDefinition } from '../_base/CommitmentDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Gets all available commitment definitions
|
|
4
|
+
* @returns Array of all commitment definitions
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/core`
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAllCommitmentDefinitions(): ReadonlyArray<CommitmentDefinition>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BookCommitment } from '../_base/BookCommitment';
|
|
2
|
+
/**
|
|
3
|
+
* Gets all available commitment types
|
|
4
|
+
* @returns Array of all commitment types
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/core`
|
|
7
|
+
*/
|
|
8
|
+
export declare function getAllCommitmentTypes(): ReadonlyArray<BookCommitment>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CommitmentToolFunctions } from './commitmentToolFunctions';
|
|
2
|
+
/**
|
|
3
|
+
* Gets all function implementations provided by all commitments
|
|
4
|
+
*
|
|
5
|
+
* Note: This function is intended for browser use, there is also equivalent `getAllCommitmentsToolFunctionsForNode` for server use
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/browser`
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAllCommitmentsToolFunctionsForBrowser(): CommitmentToolFunctions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type CommitmentToolFunctions } from './commitmentToolFunctions';
|
|
2
|
+
/**
|
|
3
|
+
* Gets all function implementations provided by all commitments
|
|
4
|
+
*
|
|
5
|
+
* Note: This function is intended for server use, there is also equivalent `getAllCommitmentsToolFunctionsForBrowser` for browser use
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/node`
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAllCommitmentsToolFunctionsForNode(): CommitmentToolFunctions;
|
|
10
|
+
/**
|
|
11
|
+
* Note: [??] Code in this file should never be never released in packages that could be imported into browser environment
|
|
12
|
+
* TODO: [??] Unite `xxxForServer` and `xxxForNode` naming
|
|
13
|
+
*/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { string_javascript_name } from '../../types/typeAliases';
|
|
2
|
+
/**
|
|
3
|
+
* Gets all tool titles provided by all commitments
|
|
4
|
+
*
|
|
5
|
+
* @public exported from `@promptbook/core`
|
|
6
|
+
*/
|
|
7
|
+
export declare function getAllCommitmentsToolTitles(): Record<string_javascript_name, string>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BookCommitment } from '../_base/BookCommitment';
|
|
2
|
+
import type { CommitmentDefinition } from '../_base/CommitmentDefinition';
|
|
3
|
+
/**
|
|
4
|
+
* Gets a commitment definition by its type
|
|
5
|
+
* @param type The commitment type to look up
|
|
6
|
+
* @returns The commitment definition or null if not found
|
|
7
|
+
*
|
|
8
|
+
* @public exported from `@promptbook/core`
|
|
9
|
+
*/
|
|
10
|
+
export declare function getCommitmentDefinition(type: BookCommitment): CommitmentDefinition | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CommitmentDefinition } from '../_base/CommitmentDefinition';
|
|
2
|
+
/**
|
|
3
|
+
* Grouped commitment definition
|
|
4
|
+
*/
|
|
5
|
+
type GroupedCommitmentDefinition = {
|
|
6
|
+
primary: CommitmentDefinition;
|
|
7
|
+
aliases: string[];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Gets all commitment definitions grouped by their aliases
|
|
11
|
+
*
|
|
12
|
+
* @returns Array of grouped commitment definitions
|
|
13
|
+
*
|
|
14
|
+
* @public exported from `@promptbook/core`
|
|
15
|
+
*/
|
|
16
|
+
export declare function getGroupedCommitmentDefinitions(): ReadonlyArray<GroupedCommitmentDefinition>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BookCommitment } from '../_base/BookCommitment';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if a commitment type is supported
|
|
4
|
+
* @param type The commitment type to check
|
|
5
|
+
* @returns True if the commitment type is supported
|
|
6
|
+
*
|
|
7
|
+
* @public exported from `@promptbook/core`
|
|
8
|
+
*/
|
|
9
|
+
export declare function isCommitmentSupported(type: BookCommitment): boolean;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import type { BookCommitment } from './_base/BookCommitment';
|
|
2
|
-
import type { CommitmentDefinition } from './_base/CommitmentDefinition';
|
|
3
|
-
import { ToolFunction } from '../scripting/javascript/JavascriptExecutionToolsOptions';
|
|
4
|
-
import { string_javascript_name } from '../types/typeAliases';
|
|
5
1
|
import { ActionCommitmentDefinition } from './ACTION/ACTION';
|
|
6
2
|
import { ClosedCommitmentDefinition } from './CLOSED/CLOSED';
|
|
7
3
|
import { ComponentCommitmentDefinition } from './COMPONENT/COMPONENT';
|
|
@@ -32,8 +28,10 @@ import { SampleCommitmentDefinition } from './SAMPLE/SAMPLE';
|
|
|
32
28
|
import { ScenarioCommitmentDefinition } from './SCENARIO/SCENARIO';
|
|
33
29
|
import { StyleCommitmentDefinition } from './STYLE/STYLE';
|
|
34
30
|
import { TeamCommitmentDefinition } from './TEAM/TEAM';
|
|
31
|
+
import { TemplateCommitmentDefinition } from './TEMPLATE/TEMPLATE';
|
|
35
32
|
import { UseCommitmentDefinition } from './USE/USE';
|
|
36
33
|
import { UseBrowserCommitmentDefinition } from './USE_BROWSER/USE_BROWSER';
|
|
34
|
+
import { UseEmailCommitmentDefinition } from './USE_EMAIL/USE_EMAIL';
|
|
37
35
|
import { UseImageGeneratorCommitmentDefinition } from './USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR';
|
|
38
36
|
import { UseMcpCommitmentDefinition } from './USE_MCP/USE_MCP';
|
|
39
37
|
import { UseSearchEngineCommitmentDefinition } from './USE_SEARCH_ENGINE/USE_SEARCH_ENGINE';
|
|
@@ -46,66 +44,7 @@ import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplemented
|
|
|
46
44
|
*
|
|
47
45
|
* @private Use functions to access commitments instead of this array directly
|
|
48
46
|
*/
|
|
49
|
-
export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, LanguageCommitmentDefinition, LanguageCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, FromCommitmentDefinition, ImportCommitmentDefinition, ImportCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, ComponentCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaFontCommitmentDefinition, MetaLinkCommitmentDefinition, MetaCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DictionaryCommitmentDefinition, OpenCommitmentDefinition, ClosedCommitmentDefinition, TeamCommitmentDefinition, UseBrowserCommitmentDefinition, UseSearchEngineCommitmentDefinition, UseTimeCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseMcpCommitmentDefinition, UseCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
|
|
50
|
-
/**
|
|
51
|
-
* Gets a commitment definition by its type
|
|
52
|
-
* @param type The commitment type to look up
|
|
53
|
-
* @returns The commitment definition or null if not found
|
|
54
|
-
*
|
|
55
|
-
* @public exported from `@promptbook/core`
|
|
56
|
-
*/
|
|
57
|
-
export declare function getCommitmentDefinition(type: BookCommitment): CommitmentDefinition | null;
|
|
58
|
-
/**
|
|
59
|
-
* Gets all available commitment definitions
|
|
60
|
-
* @returns Array of all commitment definitions
|
|
61
|
-
*
|
|
62
|
-
* @public exported from `@promptbook/core`
|
|
63
|
-
*/
|
|
64
|
-
export declare function getAllCommitmentDefinitions(): ReadonlyArray<CommitmentDefinition>;
|
|
65
|
-
/**
|
|
66
|
-
* Gets all available commitment types
|
|
67
|
-
* @returns Array of all commitment types
|
|
68
|
-
*
|
|
69
|
-
* @public exported from `@promptbook/core`
|
|
70
|
-
*/
|
|
71
|
-
export declare function getAllCommitmentTypes(): ReadonlyArray<BookCommitment>;
|
|
72
|
-
/**
|
|
73
|
-
* Checks if a commitment type is supported
|
|
74
|
-
* @param type The commitment type to check
|
|
75
|
-
* @returns True if the commitment type is supported
|
|
76
|
-
*
|
|
77
|
-
* @public exported from `@promptbook/core`
|
|
78
|
-
*/
|
|
79
|
-
export declare function isCommitmentSupported(type: BookCommitment): boolean;
|
|
80
|
-
/**
|
|
81
|
-
* Grouped commitment definition
|
|
82
|
-
*
|
|
83
|
-
* @public exported from `@promptbook/core`
|
|
84
|
-
*/
|
|
85
|
-
export type GroupedCommitmentDefinition = {
|
|
86
|
-
primary: CommitmentDefinition;
|
|
87
|
-
aliases: string[];
|
|
88
|
-
};
|
|
89
|
-
/**
|
|
90
|
-
* Gets all commitment definitions grouped by their aliases
|
|
91
|
-
*
|
|
92
|
-
* @returns Array of grouped commitment definitions
|
|
93
|
-
*
|
|
94
|
-
* @public exported from `@promptbook/core`
|
|
95
|
-
*/
|
|
96
|
-
export declare function getGroupedCommitmentDefinitions(): ReadonlyArray<GroupedCommitmentDefinition>;
|
|
97
|
-
/**
|
|
98
|
-
* Gets all function implementations provided by all commitments
|
|
99
|
-
*
|
|
100
|
-
* @public exported from `@promptbook/core`
|
|
101
|
-
*/
|
|
102
|
-
export declare function getAllCommitmentsToolFunctions(): Record<string_javascript_name, ToolFunction>;
|
|
103
|
-
/**
|
|
104
|
-
* Gets all tool titles provided by all commitments
|
|
105
|
-
*
|
|
106
|
-
* @public exported from `@promptbook/core`
|
|
107
|
-
*/
|
|
108
|
-
export declare function getAllCommitmentsToolTitles(): Record<string_javascript_name, string>;
|
|
47
|
+
export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, LanguageCommitmentDefinition, LanguageCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, TemplateCommitmentDefinition, TemplateCommitmentDefinition, FromCommitmentDefinition, ImportCommitmentDefinition, ImportCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, ComponentCommitmentDefinition, MetaImageCommitmentDefinition, MetaColorCommitmentDefinition, MetaFontCommitmentDefinition, MetaLinkCommitmentDefinition, MetaCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, InitialMessageCommitmentDefinition, UserMessageCommitmentDefinition, AgentMessageCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DictionaryCommitmentDefinition, OpenCommitmentDefinition, ClosedCommitmentDefinition, TeamCommitmentDefinition, UseBrowserCommitmentDefinition, UseSearchEngineCommitmentDefinition, UseTimeCommitmentDefinition, UseEmailCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseImageGeneratorCommitmentDefinition, UseMcpCommitmentDefinition, UseCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
|
|
109
48
|
/**
|
|
110
49
|
* TODO: [🧠] Maybe create through standardized $register
|
|
111
50
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
@@ -116,6 +116,10 @@ export declare const LIMITS: {
|
|
|
116
116
|
* @public exported from `@promptbook/core`
|
|
117
117
|
*/
|
|
118
118
|
export declare const TIME_INTERVALS: {
|
|
119
|
+
/**
|
|
120
|
+
* Hundred milliseconds
|
|
121
|
+
*/
|
|
122
|
+
readonly HUNDRED_MILLISECONDS: 100;
|
|
119
123
|
/**
|
|
120
124
|
* One second in milliseconds
|
|
121
125
|
*/
|
|
@@ -9,4 +9,5 @@ export declare function $provideExecutablesForNode(options?: PrepareAndScrapeOpt
|
|
|
9
9
|
/**
|
|
10
10
|
* TODO: [🧠] Allow to override the executables without need to call `locatePandoc` / `locateLibreoffice` in case of provided
|
|
11
11
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
12
|
+
* TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
|
|
12
13
|
*/
|
|
@@ -10,4 +10,5 @@ import type { ExecutionTools } from '../ExecutionTools';
|
|
|
10
10
|
export declare function $provideExecutionToolsForNode(options?: PrepareAndScrapeOptions): Promise<ExecutionTools>;
|
|
11
11
|
/**
|
|
12
12
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
13
|
+
* TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
|
|
13
14
|
*/
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import type { string_prompt } from '../types/typeAliases';
|
|
2
|
+
import type { really_unknown } from '../utils/organization/really_unknown';
|
|
3
|
+
/**
|
|
4
|
+
* Prompt string wrapper to retain prompt context across interpolations.
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/utils`
|
|
7
|
+
*/
|
|
8
|
+
export declare class PromptString extends String {
|
|
9
|
+
/**
|
|
10
|
+
* @param value Prompt content.
|
|
11
|
+
*/
|
|
12
|
+
constructor(value: string_prompt);
|
|
13
|
+
/**
|
|
14
|
+
* Returns the prompt as a primitive string.
|
|
15
|
+
*/
|
|
16
|
+
toString(): string_prompt;
|
|
17
|
+
/**
|
|
18
|
+
* Returns the prompt as a primitive string for implicit coercion.
|
|
19
|
+
*/
|
|
20
|
+
valueOf(): string_prompt;
|
|
21
|
+
/**
|
|
22
|
+
* Ensures template literal coercion returns the raw string.
|
|
23
|
+
*/
|
|
24
|
+
[Symbol.toPrimitive](): string_prompt;
|
|
25
|
+
}
|
|
2
26
|
/**
|
|
3
27
|
* Tag function for notating a prompt as template literal
|
|
4
28
|
*
|
|
@@ -9,10 +33,10 @@ import type { string_prompt } from '../types/typeAliases';
|
|
|
9
33
|
*
|
|
10
34
|
* @param strings
|
|
11
35
|
* @param values
|
|
12
|
-
* @returns
|
|
36
|
+
* @returns prompt content wrapped as a PromptString
|
|
13
37
|
* @public exported from `@promptbook/utils`
|
|
14
38
|
*/
|
|
15
|
-
export declare function prompt(strings: TemplateStringsArray, ...values: Array<
|
|
39
|
+
export declare function prompt(strings: TemplateStringsArray, ...values: Array<really_unknown>): PromptString;
|
|
16
40
|
/**
|
|
17
41
|
* Tag function for notating a prompt as template literal
|
|
18
42
|
*
|
|
@@ -26,6 +50,7 @@ export declare function prompt(strings: TemplateStringsArray, ...values: Array<s
|
|
|
26
50
|
*/
|
|
27
51
|
export declare const promptTemplate: typeof prompt;
|
|
28
52
|
/**
|
|
53
|
+
* TODO: Maybe split into multiple files
|
|
29
54
|
* TODO: [🧠][🈴] Where is the best location for this file
|
|
30
55
|
* Note: [💞] Ignore a discrepancy between file name and entity name
|
|
31
56
|
*/
|
|
@@ -9,4 +9,5 @@ import type { PrepareAndScrapeOptions } from '../../../prepare/PrepareAndScrapeO
|
|
|
9
9
|
export declare function $provideFilesystemForNode(options?: Pick<PrepareAndScrapeOptions, 'isVerbose'>): FilesystemTools;
|
|
10
10
|
/**
|
|
11
11
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
12
|
+
* TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
|
|
12
13
|
*/
|
|
@@ -10,4 +10,5 @@ import type { Scraper } from '../Scraper';
|
|
|
10
10
|
export declare function $provideScrapersForNode(tools: Pick<ExecutionTools, 'fs' | 'llm' | 'executables'>, options?: PrepareAndScrapeOptions): Promise<ReadonlyArray<Scraper>>;
|
|
11
11
|
/**
|
|
12
12
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
13
|
+
* TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
|
|
13
14
|
*/
|
|
@@ -8,4 +8,5 @@ import type { PrepareAndScrapeOptions } from '../../../prepare/PrepareAndScrapeO
|
|
|
8
8
|
export declare function $provideScriptingForNode(options?: PrepareAndScrapeOptions): Promise<ReadonlyArray<ScriptExecutionTools>>;
|
|
9
9
|
/**
|
|
10
10
|
* Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
|
|
11
|
+
* TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
|
|
11
12
|
*/
|
|
@@ -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.105.0-
|
|
18
|
+
* It follows semantic versioning (e.g., `0.105.0-25`).
|
|
19
19
|
*
|
|
20
20
|
* @generated
|
|
21
21
|
*/
|
|
@@ -2,10 +2,7 @@ import type { ExecutionTools } from '../execution/ExecutionTools';
|
|
|
2
2
|
import type { PipelineExecutorResult } from '../execution/PipelineExecutorResult';
|
|
3
3
|
import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';
|
|
4
4
|
import type { PipelineString } from '../pipeline/PipelineString';
|
|
5
|
-
import type { InputParameters } from '../types/typeAliases';
|
|
6
|
-
import type { string_filename } from '../types/typeAliases';
|
|
7
|
-
import type { string_parameter_value } from '../types/typeAliases';
|
|
8
|
-
import type { string_pipeline_url } from '../types/typeAliases';
|
|
5
|
+
import type { InputParameters, string_filename, string_parameter_value, string_pipeline_url } from '../types/typeAliases';
|
|
9
6
|
/**
|
|
10
7
|
* Options for wizard methods
|
|
11
8
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@promptbook/types",
|
|
3
|
-
"version": "0.105.0-
|
|
3
|
+
"version": "0.105.0-26",
|
|
4
4
|
"description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -92,6 +92,6 @@
|
|
|
92
92
|
},
|
|
93
93
|
"typings": "./esm/typings/src/_packages/types.index.d.ts",
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@promptbook/core": "0.105.0-
|
|
95
|
+
"@promptbook/core": "0.105.0-26"
|
|
96
96
|
}
|
|
97
97
|
}
|