@promptbook/node 0.101.0-15 → 0.101.0-17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/esm/index.es.js +9 -8
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/components.index.d.ts +4 -0
  4. package/esm/typings/src/_packages/core.index.d.ts +2 -0
  5. package/esm/typings/src/_packages/types.index.d.ts +2 -0
  6. package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +3 -0
  7. package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +0 -20
  8. package/esm/typings/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.d.ts +1 -26
  9. package/esm/typings/src/book-2.0/commitments/MODEL/MODEL.d.ts +23 -2
  10. package/esm/typings/src/book-2.0/commitments/NOTE/NOTE.d.ts +14 -2
  11. package/esm/typings/src/book-2.0/commitments/index.d.ts +1 -1
  12. package/esm/typings/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +2 -2
  13. package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +5 -0
  14. package/esm/typings/src/book-components/BookEditor/BookEditorInner.d.ts +1 -0
  15. package/esm/typings/src/book-components/Chat/utils/parseMessageButtons.d.ts +22 -0
  16. package/esm/typings/src/formats/csv/CsvFormatError.d.ts +1 -1
  17. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  18. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +1 -1
  19. package/esm/typings/src/remote-server/openapi-types.d.ts +31 -31
  20. package/esm/typings/src/types/ModelRequirements.d.ts +2 -4
  21. package/esm/typings/src/utils/color/utils/colorSaturation.d.ts +1 -1
  22. package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +1 -1
  23. package/esm/typings/src/version.d.ts +1 -1
  24. package/package.json +2 -2
  25. package/umd/index.umd.js +9 -8
  26. package/umd/index.umd.js.map +1 -1
  27. package/esm/typings/src/book-2.0/utils/extractAgentMetadata.d.ts +0 -17
  28. package/esm/typings/src/book-2.0/utils/extractProfileImageFromSystemMessage.d.ts +0 -12
@@ -19,6 +19,8 @@ import { LlmChat } from '../book-components/Chat/LlmChat/LlmChat';
19
19
  import type { LlmChatProps } from '../book-components/Chat/LlmChat/LlmChatProps';
20
20
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
21
21
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
22
+ import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
23
+ import { parseMessageButtons } from '../book-components/Chat/utils/parseMessageButtons';
22
24
  import { renderMarkdown } from '../book-components/Chat/utils/renderMarkdown';
23
25
  import { isMarkdownContent } from '../book-components/Chat/utils/renderMarkdown';
24
26
  import { ArrowIcon } from '../book-components/icons/ArrowIcon';
@@ -46,6 +48,8 @@ export { LlmChat };
46
48
  export type { LlmChatProps };
47
49
  export type { ChatMessage };
48
50
  export type { ChatParticipant };
51
+ export type { MessageButton };
52
+ export { parseMessageButtons };
49
53
  export { renderMarkdown };
50
54
  export { isMarkdownContent };
51
55
  export { ArrowIcon };
@@ -1,5 +1,6 @@
1
1
  import { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION } from '../version';
2
2
  import { createAgentModelRequirements } from '../book-2.0/agent-source/createAgentModelRequirements';
3
+ import { createAgentModelRequirementsWithCommitments } from '../book-2.0/agent-source/createAgentModelRequirementsWithCommitments';
3
4
  import { parseAgentSource } from '../book-2.0/agent-source/parseAgentSource';
4
5
  import { parseParameters } from '../book-2.0/agent-source/parseParameters';
5
6
  import { isValidBook } from '../book-2.0/agent-source/string_book';
@@ -170,6 +171,7 @@ import { TaskTypes } from '../types/TaskType';
170
171
  import { REMOTE_SERVER_URLS } from '../../servers';
171
172
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
172
173
  export { createAgentModelRequirements };
174
+ export { createAgentModelRequirementsWithCommitments };
173
175
  export { parseAgentSource };
174
176
  export { parseParameters };
175
177
  export { isValidBook };
@@ -16,6 +16,7 @@ import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
16
16
  import type { LlmChatProps } from '../book-components/Chat/LlmChat/LlmChatProps';
17
17
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
18
18
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
19
+ import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
19
20
  import type { PipelineCollection } from '../collection/PipelineCollection';
20
21
  import type { Command } from '../commands/_common/types/Command';
21
22
  import type { CommandParser } from '../commands/_common/types/CommandParser';
@@ -342,6 +343,7 @@ export type { ChatProps };
342
343
  export type { LlmChatProps };
343
344
  export type { ChatMessage };
344
345
  export type { ChatParticipant };
346
+ export type { MessageButton };
345
347
  export type { PipelineCollection };
346
348
  export type { Command };
347
349
  export type { CommandParser };
@@ -35,3 +35,6 @@ export type AgentModelRequirements = {
35
35
  */
36
36
  readonly metadata?: Record<string, TODO_any>;
37
37
  };
38
+ /**
39
+ * TODO: [🐤] DRY `AgentModelRequirements` and `ModelRequirements`
40
+ */
@@ -5,7 +5,6 @@ import type { AgentModelRequirements } from './AgentModelRequirements';
5
5
  import type { string_book } from './string_book';
6
6
  /**
7
7
  * Creates model requirements for an agent based on its source
8
- * Results are cached to improve performance for repeated calls with the same agentSource and modelName
9
8
  *
10
9
  * There are 2 similar functions:
11
10
  * - `parseAgentSource` which is a lightweight parser for agent source, it parses basic information and its purpose is to be quick and synchronous. The commitments there are hardcoded.
@@ -14,25 +13,6 @@ import type { string_book } from './string_book';
14
13
  * @public exported from `@promptbook/core`
15
14
  */
16
15
  export declare function createAgentModelRequirements(agentSource: string_book, modelName?: string_model_name, availableModels?: readonly AvailableModel[], llmTools?: LlmExecutionTools): Promise<AgentModelRequirements>;
17
- /**
18
- * Clears the cache for createAgentModelRequirements
19
- * Useful when agent sources are updated and cached results should be invalidated
20
- *
21
- * @private
22
- */
23
- export declare function clearAgentModelRequirementsCache(): void;
24
- /**
25
- * Removes cache entries for a specific agent source (all model variants)
26
- * @param agentSource The agent source to remove from cache
27
- * @private
28
- */
29
- export declare function invalidateAgentModelRequirementsCache(agentSource: string_book): void;
30
- /**
31
- * Gets the current cache size (for debugging/monitoring)
32
- *
33
- * @private
34
- */
35
- export declare function getAgentModelRequirementsCacheSize(): number;
36
16
  /**
37
17
  * Extracts MCP servers from agent source
38
18
  *
@@ -6,31 +6,6 @@ import type { string_book } from './string_book';
6
6
  * This function uses a reduce-like pattern where each commitment applies its changes
7
7
  * to build the final requirements starting from a basic empty model
8
8
  *
9
- * @private - TODO: [🧠] Maybe should be public?
9
+ * @public exported from `@promptbook/core`
10
10
  */
11
11
  export declare function createAgentModelRequirementsWithCommitments(agentSource: string_book, modelName?: string_model_name): Promise<AgentModelRequirements>;
12
- /**
13
- * Cached version of createAgentModelRequirementsWithCommitments
14
- * This maintains the same caching behavior as the original function
15
- *
16
- * @private
17
- */
18
- export declare function createAgentModelRequirementsWithCommitmentsCached(agentSource: string_book, modelName?: string_model_name): Promise<AgentModelRequirements>;
19
- /**
20
- * Clears the cache for createAgentModelRequirementsWithCommitments
21
- *
22
- * @private
23
- */
24
- export declare function clearAgentModelRequirementsWithCommitmentsCache(): void;
25
- /**
26
- * Removes cache entries for a specific agent source
27
- *
28
- * @private
29
- */
30
- export declare function invalidateAgentModelRequirementsWithCommitmentsCache(agentSource: string_book): void;
31
- /**
32
- * Gets the current cache size
33
- *
34
- * @private
35
- */
36
- export declare function getAgentModelRequirementsWithCommitmentsCacheSize(): number;
@@ -4,16 +4,25 @@ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
4
4
  * MODEL commitment definition
5
5
  *
6
6
  * The MODEL commitment specifies which AI model to use and can also set
7
- * model-specific parameters like temperature, topP, and topK.
7
+ * model-specific parameters like temperature, topP, topK, and maxTokens.
8
8
  *
9
- * Example usage in agent source:
9
+ * Supports multiple syntax variations:
10
10
  *
11
+ * Single-line format:
11
12
  * ```book
12
13
  * MODEL gpt-4
13
14
  * MODEL claude-3-opus temperature=0.3
14
15
  * MODEL gpt-3.5-turbo temperature=0.8 topP=0.9
15
16
  * ```
16
17
  *
18
+ * Multi-line named parameter format:
19
+ * ```book
20
+ * MODEL NAME gpt-4
21
+ * MODEL TEMPERATURE 0.7
22
+ * MODEL TOP_P 0.9
23
+ * MODEL MAX_TOKENS 2048
24
+ * ```
25
+ *
17
26
  * @private [🪔] Maybe export the commitments through some package
18
27
  */
19
28
  export declare class ModelCommitmentDefinition extends BaseCommitmentDefinition<'MODEL' | 'MODELS'> {
@@ -27,6 +36,18 @@ export declare class ModelCommitmentDefinition extends BaseCommitmentDefinition<
27
36
  */
28
37
  get documentation(): string;
29
38
  applyToAgentModelRequirements(requirements: AgentModelRequirements, content: string): AgentModelRequirements;
39
+ /**
40
+ * Check if the first part is a known named parameter
41
+ */
42
+ private isNamedParameter;
43
+ /**
44
+ * Parse the new named parameter format: "MODEL TEMPERATURE 0.7"
45
+ */
46
+ private parseNamedParameter;
47
+ /**
48
+ * Parse the legacy format: "MODEL gpt-4 temperature=0.3 topP=0.9"
49
+ */
50
+ private parseLegacyFormat;
30
51
  }
31
52
  /**
32
53
  * Singleton instance of the MODEL commitment definition
@@ -26,8 +26,8 @@ import { BaseCommitmentDefinition } from '../_base/BaseCommitmentDefinition';
26
26
  *
27
27
  * @private [🪔] Maybe export the commitments through some package
28
28
  */
29
- export declare class NoteCommitmentDefinition extends BaseCommitmentDefinition<'NOTE' | 'NOTES'> {
30
- constructor(type?: 'NOTE' | 'NOTES');
29
+ export declare class NoteCommitmentDefinition extends BaseCommitmentDefinition<'NOTE' | 'NOTES' | 'COMMENT' | 'NONCE'> {
30
+ constructor(type?: 'NOTE' | 'NOTES' | 'COMMENT' | 'NONCE');
31
31
  /**
32
32
  * Short one-line description of NOTE.
33
33
  */
@@ -50,6 +50,18 @@ export declare const NoteCommitment: NoteCommitmentDefinition;
50
50
  * @private [🪔] Maybe export the commitments through some package
51
51
  */
52
52
  export declare const NotesCommitment: NoteCommitmentDefinition;
53
+ /**
54
+ * Singleton instance of the COMMENT commitment definition
55
+ *
56
+ * @private [🪔] Maybe export the commitments through some package
57
+ */
58
+ export declare const CommentCommitment: NoteCommitmentDefinition;
59
+ /**
60
+ * Singleton instance of the NONCE commitment definition
61
+ *
62
+ * @private [🪔] Maybe export the commitments through some package
63
+ */
64
+ export declare const NonceCommitment: NoteCommitmentDefinition;
53
65
  /**
54
66
  * [💞] Ignore a discrepancy between file name and entity name
55
67
  */
@@ -23,7 +23,7 @@ import { NotYetImplementedCommitmentDefinition } from './_base/NotYetImplemented
23
23
  *
24
24
  * @private Use functions to access commitments instead of this array directly
25
25
  */
26
- export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, MetaCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
26
+ export declare const COMMITMENT_REGISTRY: readonly [PersonaCommitmentDefinition, PersonaCommitmentDefinition, KnowledgeCommitmentDefinition, MemoryCommitmentDefinition, MemoryCommitmentDefinition, StyleCommitmentDefinition, StyleCommitmentDefinition, RuleCommitmentDefinition, RuleCommitmentDefinition, SampleCommitmentDefinition, SampleCommitmentDefinition, FormatCommitmentDefinition, FormatCommitmentDefinition, ModelCommitmentDefinition, ModelCommitmentDefinition, ActionCommitmentDefinition, ActionCommitmentDefinition, MetaCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, NoteCommitmentDefinition, GoalCommitmentDefinition, GoalCommitmentDefinition, MessageCommitmentDefinition, MessageCommitmentDefinition, ScenarioCommitmentDefinition, ScenarioCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, DeleteCommitmentDefinition, NotYetImplementedCommitmentDefinition<"EXPECT">, NotYetImplementedCommitmentDefinition<"BEHAVIOUR">, NotYetImplementedCommitmentDefinition<"BEHAVIOURS">, NotYetImplementedCommitmentDefinition<"AVOID">, NotYetImplementedCommitmentDefinition<"AVOIDANCE">, NotYetImplementedCommitmentDefinition<"CONTEXT">];
27
27
  /**
28
28
  * Gets a commitment definition by its type
29
29
  * @param type The commitment type to look up
@@ -9,7 +9,7 @@ export type AvatarChipProps = {
9
9
  /**
10
10
  * Avatar to be shown
11
11
  */
12
- readonly avatarBasicInformation: AgentBasicInformation;
12
+ readonly avatarBasicInformation: Omit<AgentBasicInformation, 'parameters'>;
13
13
  /**
14
14
  * Whether this chip is a template avatar
15
15
  */
@@ -21,7 +21,7 @@ export type AvatarChipProps = {
21
21
  /**
22
22
  * Called when chip is clicked
23
23
  */
24
- readonly onSelect?: (avatar: AgentBasicInformation) => void;
24
+ readonly onSelect?: (avatar: Omit<AgentBasicInformation, 'parameters'>) => void;
25
25
  /**
26
26
  * Whether this chip is selected
27
27
  */
@@ -41,6 +41,11 @@ export type BookEditorProps = {
41
41
  * If true, disables border radius making the editor have sharp corners
42
42
  */
43
43
  readonly isBorderRadiusDisabled?: boolean;
44
+ /**
45
+ * If true, shows the footer with book title and version information.
46
+ * By default, the footer is hidden.
47
+ */
48
+ readonly isFooterShown?: boolean;
44
49
  };
45
50
  /**
46
51
  * Renders a book editor
@@ -11,6 +11,7 @@ export type BookEditorInnerProps = {
11
11
  onFileUpload?(file: File): Promisable<string>;
12
12
  isVerbose?: boolean;
13
13
  isBorderRadiusDisabled?: boolean;
14
+ isFooterShown?: boolean;
14
15
  };
15
16
  /**
16
17
  * @private util of `<BookEditor />`
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Represents a parsed message button from markdown
3
+ *
4
+ * @public exported from `@promptbook/components`
5
+ */
6
+ export type MessageButton = {
7
+ text: string;
8
+ message: string;
9
+ };
10
+ /**
11
+ * Parses markdown buttons in the format [Button Text](?message=Message%20to%20send)
12
+ * Returns both the content without buttons and the extracted buttons
13
+ *
14
+ * @param content The markdown content that may contain buttons
15
+ * @returns Object with contentWithoutButtons and buttons array
16
+ *
17
+ * @public exported from `@promptbook/components`
18
+ */
19
+ export declare function parseMessageButtons(content: string): {
20
+ contentWithoutButtons: string;
21
+ buttons: MessageButton[];
22
+ };
@@ -1,4 +1,4 @@
1
- import { AbstractFormatError } from "../../errors/AbstractFormatError";
1
+ import { AbstractFormatError } from '../../errors/AbstractFormatError';
2
2
  /**
3
3
  * This error indicates problem with parsing of CSV
4
4
  *
@@ -16,4 +16,4 @@ import type { LlmToolsConfiguration } from './LlmToolsConfiguration';
16
16
  export declare function $provideLlmToolsConfigurationFromEnv(): Promise<LlmToolsConfiguration>;
17
17
  /**
18
18
  * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
19
- */
19
+ */
@@ -24,4 +24,4 @@ export {};
24
24
  * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
25
25
  * TODO: This should be maybe not under `_common` but under `utils-internal` / `utils/internal`
26
26
  * TODO: [®] DRY Register logi
27
- */
27
+ */
@@ -3,7 +3,7 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  export type paths = {
6
- readonly "/": {
6
+ readonly '/': {
7
7
  readonly parameters: {
8
8
  readonly query?: never;
9
9
  readonly header?: never;
@@ -29,7 +29,7 @@ export type paths = {
29
29
  readonly [name: string]: unknown;
30
30
  };
31
31
  content: {
32
- readonly "text/markdown": string;
32
+ readonly 'text/markdown': string;
33
33
  };
34
34
  };
35
35
  };
@@ -42,7 +42,7 @@ export type paths = {
42
42
  readonly patch?: never;
43
43
  readonly trace?: never;
44
44
  };
45
- readonly "/login": {
45
+ readonly '/login': {
46
46
  readonly parameters: {
47
47
  readonly query?: never;
48
48
  readonly header?: never;
@@ -64,7 +64,7 @@ export type paths = {
64
64
  };
65
65
  readonly requestBody: {
66
66
  readonly content: {
67
- readonly "application/json": {
67
+ readonly 'application/json': {
68
68
  readonly username?: string;
69
69
  readonly password?: string;
70
70
  readonly appId?: string;
@@ -78,7 +78,7 @@ export type paths = {
78
78
  readonly [name: string]: unknown;
79
79
  };
80
80
  content: {
81
- readonly "application/json": {
81
+ readonly 'application/json': {
82
82
  readonly isSuccess?: boolean;
83
83
  readonly message?: string;
84
84
  readonly error?: Record<string, never>;
@@ -92,7 +92,7 @@ export type paths = {
92
92
  readonly [name: string]: unknown;
93
93
  };
94
94
  content: {
95
- readonly "application/json": {
95
+ readonly 'application/json': {
96
96
  readonly error?: Record<string, never>;
97
97
  };
98
98
  };
@@ -103,7 +103,7 @@ export type paths = {
103
103
  readonly [name: string]: unknown;
104
104
  };
105
105
  content: {
106
- readonly "application/json": {
106
+ readonly 'application/json': {
107
107
  /** @enum {boolean} */
108
108
  readonly isSuccess?: false;
109
109
  readonly message?: string;
@@ -119,7 +119,7 @@ export type paths = {
119
119
  readonly patch?: never;
120
120
  readonly trace?: never;
121
121
  };
122
- readonly "/books": {
122
+ readonly '/books': {
123
123
  readonly parameters: {
124
124
  readonly query?: never;
125
125
  readonly header?: never;
@@ -145,7 +145,7 @@ export type paths = {
145
145
  readonly [name: string]: unknown;
146
146
  };
147
147
  content: {
148
- readonly "application/json": readonly string[];
148
+ readonly 'application/json': readonly string[];
149
149
  };
150
150
  };
151
151
  /** @description No collection available */
@@ -154,7 +154,7 @@ export type paths = {
154
154
  readonly [name: string]: unknown;
155
155
  };
156
156
  content: {
157
- readonly "text/plain": string;
157
+ readonly 'text/plain': string;
158
158
  };
159
159
  };
160
160
  };
@@ -167,7 +167,7 @@ export type paths = {
167
167
  readonly patch?: never;
168
168
  readonly trace?: never;
169
169
  };
170
- readonly "/books/{bookId}": {
170
+ readonly '/books/{bookId}': {
171
171
  readonly parameters: {
172
172
  readonly query?: never;
173
173
  readonly header?: never;
@@ -196,7 +196,7 @@ export type paths = {
196
196
  readonly [name: string]: unknown;
197
197
  };
198
198
  content: {
199
- readonly "text/markdown": string;
199
+ readonly 'text/markdown': string;
200
200
  };
201
201
  };
202
202
  /** @description Book not found. */
@@ -205,7 +205,7 @@ export type paths = {
205
205
  readonly [name: string]: unknown;
206
206
  };
207
207
  content: {
208
- readonly "application/json": {
208
+ readonly 'application/json': {
209
209
  readonly error?: Record<string, never>;
210
210
  };
211
211
  };
@@ -216,7 +216,7 @@ export type paths = {
216
216
  readonly [name: string]: unknown;
217
217
  };
218
218
  content: {
219
- readonly "text/plain": string;
219
+ readonly 'text/plain': string;
220
220
  };
221
221
  };
222
222
  };
@@ -229,7 +229,7 @@ export type paths = {
229
229
  readonly patch?: never;
230
230
  readonly trace?: never;
231
231
  };
232
- readonly "/executions": {
232
+ readonly '/executions': {
233
233
  readonly parameters: {
234
234
  readonly query?: never;
235
235
  readonly header?: never;
@@ -255,7 +255,7 @@ export type paths = {
255
255
  readonly [name: string]: unknown;
256
256
  };
257
257
  content: {
258
- readonly "application/json": readonly {
258
+ readonly 'application/json': readonly {
259
259
  readonly nonce?: string;
260
260
  readonly taskId?: string;
261
261
  readonly taskType?: string;
@@ -277,7 +277,7 @@ export type paths = {
277
277
  readonly patch?: never;
278
278
  readonly trace?: never;
279
279
  };
280
- readonly "/executions/last": {
280
+ readonly '/executions/last': {
281
281
  readonly parameters: {
282
282
  readonly query?: never;
283
283
  readonly header?: never;
@@ -303,7 +303,7 @@ export type paths = {
303
303
  readonly [name: string]: unknown;
304
304
  };
305
305
  content: {
306
- readonly "application/json": {
306
+ readonly 'application/json': {
307
307
  readonly nonce?: string;
308
308
  readonly taskId?: string;
309
309
  readonly taskType?: string;
@@ -324,7 +324,7 @@ export type paths = {
324
324
  readonly [name: string]: unknown;
325
325
  };
326
326
  content: {
327
- readonly "text/plain": string;
327
+ readonly 'text/plain': string;
328
328
  };
329
329
  };
330
330
  };
@@ -337,7 +337,7 @@ export type paths = {
337
337
  readonly patch?: never;
338
338
  readonly trace?: never;
339
339
  };
340
- readonly "/executions/{taskId}": {
340
+ readonly '/executions/{taskId}': {
341
341
  readonly parameters: {
342
342
  readonly query?: never;
343
343
  readonly header?: never;
@@ -366,7 +366,7 @@ export type paths = {
366
366
  readonly [name: string]: unknown;
367
367
  };
368
368
  content: {
369
- readonly "application/json": {
369
+ readonly 'application/json': {
370
370
  readonly nonce?: string;
371
371
  readonly taskId?: string;
372
372
  readonly taskType?: string;
@@ -387,7 +387,7 @@ export type paths = {
387
387
  readonly [name: string]: unknown;
388
388
  };
389
389
  content: {
390
- readonly "text/plain": string;
390
+ readonly 'text/plain': string;
391
391
  };
392
392
  };
393
393
  };
@@ -400,7 +400,7 @@ export type paths = {
400
400
  readonly patch?: never;
401
401
  readonly trace?: never;
402
402
  };
403
- readonly "/executions/new": {
403
+ readonly '/executions/new': {
404
404
  readonly parameters: {
405
405
  readonly query?: never;
406
406
  readonly header?: never;
@@ -422,7 +422,7 @@ export type paths = {
422
422
  };
423
423
  readonly requestBody: {
424
424
  readonly content: {
425
- readonly "application/json": {
425
+ readonly 'application/json': {
426
426
  /** @description URL of the pipeline to execute */
427
427
  readonly pipelineUrl?: string;
428
428
  /** @description Alternative field for pipelineUrl */
@@ -441,7 +441,7 @@ export type paths = {
441
441
  readonly [name: string]: unknown;
442
442
  };
443
443
  content: {
444
- readonly "application/json": Record<string, never>;
444
+ readonly 'application/json': Record<string, never>;
445
445
  };
446
446
  };
447
447
  /** @description Invalid input. */
@@ -450,7 +450,7 @@ export type paths = {
450
450
  readonly [name: string]: unknown;
451
451
  };
452
452
  content: {
453
- readonly "application/json": {
453
+ readonly 'application/json': {
454
454
  readonly error?: Record<string, never>;
455
455
  };
456
456
  };
@@ -461,7 +461,7 @@ export type paths = {
461
461
  readonly [name: string]: unknown;
462
462
  };
463
463
  content: {
464
- readonly "text/plain": string;
464
+ readonly 'text/plain': string;
465
465
  };
466
466
  };
467
467
  };
@@ -472,7 +472,7 @@ export type paths = {
472
472
  readonly patch?: never;
473
473
  readonly trace?: never;
474
474
  };
475
- readonly "/api-docs": {
475
+ readonly '/api-docs': {
476
476
  readonly parameters: {
477
477
  readonly query?: never;
478
478
  readonly header?: never;
@@ -509,7 +509,7 @@ export type paths = {
509
509
  readonly patch?: never;
510
510
  readonly trace?: never;
511
511
  };
512
- readonly "/swagger": {
512
+ readonly '/swagger': {
513
513
  readonly parameters: {
514
514
  readonly query?: never;
515
515
  readonly header?: never;
@@ -546,7 +546,7 @@ export type paths = {
546
546
  readonly patch?: never;
547
547
  readonly trace?: never;
548
548
  };
549
- readonly "/openapi": {
549
+ readonly '/openapi': {
550
550
  readonly parameters: {
551
551
  readonly query?: never;
552
552
  readonly header?: never;
@@ -572,7 +572,7 @@ export type paths = {
572
572
  readonly [name: string]: unknown;
573
573
  };
574
574
  content: {
575
- readonly "application/json": Record<string, never>;
575
+ readonly 'application/json': Record<string, never>;
576
576
  };
577
577
  };
578
578
  };
@@ -1,8 +1,5 @@
1
1
  import type { ModelVariant } from './ModelVariant';
2
- import type { number_model_temperature } from './typeAliases';
3
- import type { number_seed } from './typeAliases';
4
- import type { string_model_name } from './typeAliases';
5
- import type { string_system_message } from './typeAliases';
2
+ import type { number_model_temperature, number_seed, string_model_name, string_system_message } from './typeAliases';
6
3
  /**
7
4
  * Abstract way to specify the LLM.
8
5
  * It does not specify the LLM with concrete version itself, only the requirements for the LLM.
@@ -99,4 +96,5 @@ export type CommonModelRequirements = {
99
96
  * TODO: Add here more requirement options like max context size, max tokens, etc.
100
97
  * TODO: [💕][🧠] Just selecting gpt3 or gpt4 level of model
101
98
  * TODO: [🧄] Replace all "github.com/webgptorg/promptbook#xxx" with "ptbk.io/xxx"
99
+ * TODO: [🐤] DRY `AgentModelRequirements` and `ModelRequirements`
102
100
  */
@@ -1,4 +1,4 @@
1
- import { Color } from "../Color";
1
+ import { Color } from '../Color';
2
2
  /**
3
3
  * Calculates saturation of the color
4
4
  *
@@ -14,4 +14,4 @@ export {};
14
14
  /**
15
15
  * TODO: [🧠] What is the better solution - `- xxx`, - `- xxx` or preserve (see also next TODO)
16
16
  * TODO: When existing commands 1) as 2) number 3) list, add 4) new command as next number
17
- */
17
+ */
@@ -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.101.0-14`).
18
+ * It follows semantic versioning (e.g., `0.101.0-16`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/node",
3
- "version": "0.101.0-15",
3
+ "version": "0.101.0-17",
4
4
  "description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -93,7 +93,7 @@
93
93
  "module": "./esm/index.es.js",
94
94
  "typings": "./esm/typings/src/_packages/node.index.d.ts",
95
95
  "peerDependencies": {
96
- "@promptbook/core": "0.101.0-15"
96
+ "@promptbook/core": "0.101.0-17"
97
97
  },
98
98
  "dependencies": {
99
99
  "colors": "1.4.0",