@promptbook/fake-llm 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/index.es.js +121 -4731
- package/esm/index.es.js.map +1 -1
- 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 -4
- package/umd/index.umd.js +123 -4734
- package/umd/index.umd.js.map +1 -1
|
@@ -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/fake-llm",
|
|
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,
|
|
@@ -96,13 +96,11 @@
|
|
|
96
96
|
"module": "./esm/index.es.js",
|
|
97
97
|
"typings": "./esm/typings/src/_packages/fake-llm.index.d.ts",
|
|
98
98
|
"peerDependencies": {
|
|
99
|
-
"@promptbook/core": "0.105.0-
|
|
99
|
+
"@promptbook/core": "0.105.0-26"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
102
|
"crypto": "1.0.1",
|
|
103
|
-
"crypto-js": "4.2.0",
|
|
104
103
|
"lorem-ipsum": "2.0.8",
|
|
105
|
-
"moment": "2.30.1",
|
|
106
104
|
"spacetrim": "0.11.60",
|
|
107
105
|
"waitasecond": "1.11.160"
|
|
108
106
|
}
|