@promptbook/javascript 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,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/javascript",
|
|
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,
|
|
@@ -94,12 +94,10 @@
|
|
|
94
94
|
"module": "./esm/index.es.js",
|
|
95
95
|
"typings": "./esm/typings/src/_packages/javascript.index.d.ts",
|
|
96
96
|
"peerDependencies": {
|
|
97
|
-
"@promptbook/core": "0.105.0-
|
|
97
|
+
"@promptbook/core": "0.105.0-26"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"crypto": "1.0.1",
|
|
101
|
-
"crypto-js": "4.2.0",
|
|
102
|
-
"moment": "2.30.1",
|
|
103
101
|
"spacetrim": "0.11.60"
|
|
104
102
|
}
|
|
105
103
|
}
|