@promptbook/editable 0.81.0-21 → 0.81.0-23

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 (34) hide show
  1. package/README.md +4 -20
  2. package/esm/index.es.js +4 -4
  3. package/esm/typings/src/_packages/core.index.d.ts +2 -0
  4. package/esm/typings/src/_packages/types.index.d.ts +2 -0
  5. package/esm/typings/src/cli/cli-commands/make.d.ts +1 -1
  6. package/esm/typings/src/cli/cli-commands/run.d.ts +2 -2
  7. package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +11 -0
  8. package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +1 -1
  9. package/esm/typings/src/commands/index.d.ts +1 -1
  10. package/esm/typings/src/config.d.ts +2 -2
  11. package/esm/typings/src/conversion/parsePipeline.d.ts +1 -1
  12. package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +3 -3
  13. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +7 -7
  14. package/esm/typings/src/errors/utils/getErrorReportUrl.d.ts +1 -1
  15. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  16. package/esm/typings/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +2 -2
  17. package/esm/typings/src/llm-providers/anthropic-claude/playground/playground.d.ts +2 -2
  18. package/esm/typings/src/llm-providers/openai/playground/playground.d.ts +1 -1
  19. package/esm/typings/src/llm-providers/vercel/playground/playground.d.ts +1 -1
  20. package/esm/typings/src/other/templates/getBookTemplates.d.ts +1 -1
  21. package/esm/typings/src/personas/preparePersona.d.ts +4 -4
  22. package/esm/typings/src/pipeline/PipelineString.d.ts +0 -3
  23. package/esm/typings/src/pipeline/book-notation.d.ts +0 -1
  24. package/esm/typings/src/pipeline/isValidPipelineString.d.ts +3 -1
  25. package/esm/typings/src/pipeline/validatePipelineString.d.ts +14 -0
  26. package/esm/typings/src/prepare/isPipelinePrepared.d.ts +1 -1
  27. package/esm/typings/src/prepare/prepareTasks.d.ts +1 -1
  28. package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +1 -1
  29. package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +1 -1
  30. package/esm/typings/src/types/typeAliases.d.ts +8 -2
  31. package/esm/typings/src/utils/serialization/checkSerializableAsJson.d.ts +1 -1
  32. package/esm/typings/src/utils/serialization/isSerializableAsJson.d.ts +1 -1
  33. package/package.json +2 -2
  34. package/umd/index.umd.js +4 -4
package/README.md CHANGED
@@ -134,32 +134,25 @@ We also have a community of developers and users of **Promptbook**:
134
134
  - [Landing page `ptbk.io`](https://ptbk.io)
135
135
  - [Github discussions](https://github.com/webgptorg/promptbook/discussions)
136
136
  - [LinkedIn `Promptbook`](https://linkedin.com/company/promptbook)
137
- - [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
137
+ - [Facebook `Promptbook`](https://www.facebook.com/61560776453536)
138
138
 
139
139
  And **Promptbook.studio** branded socials:
140
140
 
141
-
142
-
143
141
  - [Instagram `@promptbook.studio`](https://www.instagram.com/promptbook.studio/)
144
142
 
145
-
146
-
147
143
  And **Promptujeme** sub-brand:
148
144
 
149
- */Subbrand for Czech clients/*
150
-
151
-
145
+ _/Subbrand for Czech clients/_
152
146
 
153
147
  - [Promptujeme.cz](https://www.promptujeme.cz/)
154
148
  - [Facebook `Promptujeme`](https://www.facebook.com/promptujeme/)
155
149
 
156
-
157
150
  And **Promptbook.city** branded socials:
158
151
 
159
- */Sub-brand for images and graphics generated via Promptbook prompting/*
152
+ _/Sub-brand for images and graphics generated via Promptbook prompting/_
160
153
 
161
154
  - [Instagram `@promptbook.city`](https://www.instagram.com/promptbook.city/)
162
- - [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
155
+ - [Facebook `Promptbook City`](https://www.facebook.com/61565718625569)
163
156
 
164
157
 
165
158
 
@@ -293,11 +286,6 @@ Or you can install them separately:
293
286
 
294
287
  ## 📚 Dictionary
295
288
 
296
-
297
-
298
-
299
-
300
-
301
289
  ### 📚 Dictionary
302
290
 
303
291
  The following glossary is used to clarify certain concepts:
@@ -313,8 +301,6 @@ The following glossary is used to clarify certain concepts:
313
301
  - **Retrieval-augmented generation** is a machine learning paradigm where a model generates text by retrieving relevant information from a large database of text. This approach combines the benefits of generative models and retrieval models.
314
302
  - **Longtail** refers to non-common or rare events, items, or entities that are not well-represented in the training data of machine learning models. Longtail items are often challenging for models to predict accurately.
315
303
 
316
-
317
-
318
304
  _Note: Thos section is not complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
319
305
 
320
306
  #### Promptbook core
@@ -375,8 +361,6 @@ _Note: Thos section is not complete dictionary, more list of general AI / LLM te
375
361
  - [👮 Agent adversary expectations](https://github.com/webgptorg/promptbook/discussions/39)
376
362
  - [view more](https://github.com/webgptorg/promptbook/discussions/categories/concepts)
377
363
 
378
-
379
-
380
364
  ### Terms specific to Promptbook TypeScript implementation
381
365
 
382
366
  - Anonymous mode
package/esm/index.es.js CHANGED
@@ -14,7 +14,7 @@ var BOOK_LANGUAGE_VERSION = '1.0.0';
14
14
  * @generated
15
15
  * @see https://github.com/webgptorg/promptbook
16
16
  */
17
- var PROMPTBOOK_ENGINE_VERSION = '0.81.0-20';
17
+ var PROMPTBOOK_ENGINE_VERSION = '0.81.0-22';
18
18
  /**
19
19
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
20
20
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -323,7 +323,7 @@ function $deepFreeze(objectValue) {
323
323
  /**
324
324
  * Make error report URL for the given error
325
325
  *
326
- * @private !!!!!!
326
+ * @private private within the repository
327
327
  */
328
328
  function getErrorReportUrl(error) {
329
329
  var report = {
@@ -474,7 +474,7 @@ function checkSerializableAsJson(options) {
474
474
  }
475
475
  /**
476
476
  * TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
477
- * TODO: [🧠][main] !!! In-memory cache of same values to prevent multiple checks
477
+ * TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
478
478
  * Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
479
479
  */
480
480
 
@@ -595,7 +595,7 @@ function isSerializableAsJson(value) {
595
595
  }
596
596
  }
597
597
  /**
598
- * TODO: [🧠][main] !!! In-memory cache of same values to prevent multiple checks
598
+ * TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
599
599
  * TODO: [🧠][💺] Can be done this on type-level?
600
600
  */
601
601
 
@@ -100,6 +100,7 @@ import { getPipelineInterface } from '../pipeline/PipelineInterface/getPipelineI
100
100
  import { isPipelineImplementingInterface } from '../pipeline/PipelineInterface/isPipelineImplementingInterface';
101
101
  import { isPipelineInterfacesEqual } from '../pipeline/PipelineInterface/isPipelineInterfacesEqual';
102
102
  import { EXPECTATION_UNITS } from '../pipeline/PipelineJson/Expectations';
103
+ import { validatePipelineString } from '../pipeline/validatePipelineString';
103
104
  import { isPipelinePrepared } from '../prepare/isPipelinePrepared';
104
105
  import { preparePipeline } from '../prepare/preparePipeline';
105
106
  import { prepareTasks } from '../prepare/prepareTasks';
@@ -222,6 +223,7 @@ export { getPipelineInterface };
222
223
  export { isPipelineImplementingInterface };
223
224
  export { isPipelineInterfacesEqual };
224
225
  export { EXPECTATION_UNITS };
226
+ export { validatePipelineString };
225
227
  export { isPipelinePrepared };
226
228
  export { preparePipeline };
227
229
  export { prepareTasks };
@@ -172,6 +172,7 @@ import type { string_css_value } from '../types/typeAliases';
172
172
  import type { string_css_selector } from '../types/typeAliases';
173
173
  import type { string_url } from '../types/typeAliases';
174
174
  import type { string_base_url } from '../types/typeAliases';
175
+ import type { string_pipeline_root_url } from '../types/typeAliases';
175
176
  import type { string_pipeline_url } from '../types/typeAliases';
176
177
  import type { string_pipeline_url_with_task_hash } from '../types/typeAliases';
177
178
  import type { string_data_url } from '../types/typeAliases';
@@ -437,6 +438,7 @@ export type { string_css_value };
437
438
  export type { string_css_selector };
438
439
  export type { string_url };
439
440
  export type { string_base_url };
441
+ export type { string_pipeline_root_url };
440
442
  export type { string_pipeline_url };
441
443
  export type { string_pipeline_url_with_task_hash };
442
444
  export type { string_data_url };
@@ -6,7 +6,7 @@ import type { Command as Program } from 'commander';
6
6
  */
7
7
  export declare function initializeMakeCommand(program: Program): void;
8
8
  /**
9
- * TODO: [🥃][main] !!! Allow `ptbk make` without configuring any llm tools
9
+ * TODO: [🥃][main] !!3 Allow `ptbk make` without configuring any llm tools
10
10
  * TODO: [0] DRY Javascript and typescript - Maybe make ONLY typescript and for javascript just remove types
11
11
  * Note: [💞] Ignore a discrepancy between file name and entity name
12
12
  * Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
@@ -6,9 +6,9 @@ import type { Command as Program } from 'commander';
6
6
  */
7
7
  export declare function initializeRunCommand(program: Program): void;
8
8
  /**
9
- * TODO: !!!!! Catch and wrap all errors from CLI
9
+ * TODO: !!5 Catch and wrap all errors from CLI
10
10
  * TODO: [🧠] Pass `maxExecutionAttempts`, `csvSettings`
11
- * TODO: [🥃][main] !!! Allow `ptbk run` without configuring any llm tools
11
+ * TODO: [🥃][main] !!3 Allow `ptbk run` without configuring any llm tools
12
12
  * Note: [💞] Ignore a discrepancy between file name and entity name
13
13
  * Note: [🟡] Code in this file should never be published outside of `@promptbook/cli`
14
14
  * TODO: [🖇] What about symlinks? Maybe flag --follow-symlinks
@@ -1,6 +1,7 @@
1
1
  import type { ExecutionTools } from '../../execution/ExecutionTools';
2
2
  import type { PrepareAndScrapeOptions } from '../../prepare/PrepareAndScrapeOptions';
3
3
  import type { string_dirname } from '../../types/typeAliases';
4
+ import type { string_pipeline_root_url } from '../../types/typeAliases';
4
5
  import type { PipelineCollection } from '../PipelineCollection';
5
6
  /**
6
7
  * Options for `createCollectionFromDirectory` function
@@ -21,6 +22,16 @@ type CreatePipelineCollectionFromDirectoryOptions = Omit<PrepareAndScrapeOptions
21
22
  * @default false
22
23
  */
23
24
  isVerbose?: boolean;
25
+ /**
26
+ * This will be used as a root URL for all pipelines in the collection
27
+ *
28
+ * It has 2 purposes:
29
+ * 1) Every pipeline in the collection is checked if it is a child of `rootUrl`
30
+ * 2) If the pipeline does not have a URL, it is created from the `rootUrl` and path to the pipeline
31
+ *
32
+ * @default false
33
+ */
34
+ rootUrl?: string_pipeline_root_url;
24
35
  /**
25
36
  * If true, directory will be scanned only when needed not during the construction
26
37
  *
@@ -25,5 +25,5 @@ type CreatePipelineCollectionFromUrlyOptions = {
25
25
  export declare function createCollectionFromUrl(url: string_url | URL, options: CreatePipelineCollectionFromUrlyOptions): Promise<PipelineCollection>;
26
26
  export {};
27
27
  /**
28
- * TODO: [main] !!!! [🧠] Library precompilation and do not mix markdown and json promptbooks
28
+ * TODO: [main] !!4 [🧠] Library precompilation and do not mix markdown and json promptbooks
29
29
  */
@@ -6,4 +6,4 @@
6
6
  export declare const COMMANDS: readonly [import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./SECTION/SectionCommand").SectionCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./EXPECT/ExpectCommand").ExpectCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./FORMAT/FormatCommand").FormatCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./JOKER/JokerCommand").JokerCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./MODEL/ModelCommand").ModelCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./PARAMETER/ParameterCommand").ParameterCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./POSTPROCESS/PostprocessCommand").PostprocessCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./BOOK_VERSION/BookVersionCommand").BookVersionCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./FORMFACTOR/FormfactorCommand").FormfactorCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./URL/UrlCommand").UrlCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./KNOWLEDGE/KnowledgeCommand").KnowledgeCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./X_ACTION/ActionCommand").ActionCommand>, import("./_common/types/CommandParser").PipelineHeadCommandParser<import("./X_INSTRUMENT/InstrumentCommand").InstrumentCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./PERSONA/PersonaCommand").PersonaCommand>, import("./_common/types/CommandParser").PipelineTaskCommandParser<import("./FOREACH/ForeachCommand").ForeachCommand>, import("./_common/types/CommandParser").PipelineBothCommandParser<import("./_BOILERPLATE/BoilerplateCommand").BoilerplateCommand>];
7
7
  /**
8
8
  * Note: [💞] Ignore a discrepancy between file name and entity name
9
- */
9
+ */
@@ -141,14 +141,14 @@ export declare const DEFAULT_MAX_PARALLEL_COUNT = 5;
141
141
  export declare const DEFAULT_MAX_EXECUTION_ATTEMPTS = 3;
142
142
  /**
143
143
  * @@@
144
- * TODO: [🐝][main] !!! Use
144
+ * TODO: [🐝][main] !!3 Use
145
145
  *
146
146
  * @public exported from `@promptbook/core`
147
147
  */
148
148
  export declare const DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3;
149
149
  /**
150
150
  * @@@
151
- * TODO: [🐝][main] !!! Use
151
+ * TODO: [🐝][main] !!3 Use
152
152
  *
153
153
  * @public exported from `@promptbook/core`
154
154
  */
@@ -19,7 +19,7 @@ import type { PipelineString } from '../pipeline/PipelineString';
19
19
  export declare function parsePipeline(pipelineString: PipelineString): PipelineJson;
20
20
  /**
21
21
  * TODO: [🧠] Maybe more things here can be refactored as high-level abstractions
22
- * TODO: [main] !!!! Warn if used only sync version
22
+ * TODO: [main] !!4 Warn if used only sync version
23
23
  * TODO: [🚞] Report here line/column of error
24
24
  * TODO: Use spaceTrim more effectively
25
25
  * TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
@@ -22,9 +22,9 @@ export type renderPipelineMermaidOptions = {
22
22
  */
23
23
  export declare function renderPromptbookMermaid(pipelineJson: PipelineJson, options?: renderPipelineMermaidOptions): string;
24
24
  /**
25
- * TODO: [🧠] !! FOREACH in mermaid graph
26
- * TODO: [🧠] !! Knowledge in mermaid graph
27
- * TODO: [🧠] !! Personas in mermaid graph
25
+ * TODO: [🧠] FOREACH in mermaid graph
26
+ * TODO: [🧠] Knowledge in mermaid graph
27
+ * TODO: [🧠] Personas in mermaid graph
28
28
  * TODO: Maybe use some Mermaid package instead of string templating
29
29
  * TODO: [🕌] When more than 2 functionalities, split into separate functions
30
30
  */
@@ -18,9 +18,9 @@ export declare function validatePipeline(pipeline: PipelineJson): PipelineJson;
18
18
  /**
19
19
  * @private internal function for `validatePipeline`
20
20
  */
21
- export declare function validatePipelineCore(pipeline: PipelineJson): void;
21
+ export declare function validatePipeline_InnerFunction(pipeline: PipelineJson): void;
22
22
  /**
23
- * TODO: !! [🧞‍♀️] Do not allow joker + foreach
23
+ * TODO: [🧞‍♀️] Do not allow joker + foreach
24
24
  * TODO: [🧠] Work with promptbookVersion
25
25
  * TODO: Use here some json-schema, Zod or something similar and change it to:
26
26
  * > /**
@@ -32,11 +32,11 @@ export declare function validatePipelineCore(pipeline: PipelineJson): void;
32
32
  * > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
33
33
  */
34
34
  /**
35
- * TODO: [🧳][main] !!!! Validate that all examples match expectations
36
- * TODO: [🧳][🐝][main] !!!! Validate that knowledge is valid (non-void)
37
- * TODO: [🧳][main] !!!! Validate that persona can be used only with CHAT variant
38
- * TODO: [🧳][main] !!!! Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
39
- * TODO: [🧳][main] !!!! Validate that reserved parameter is not used as joker
35
+ * TODO: [🧳][main] !!4 Validate that all examples match expectations
36
+ * TODO: [🧳][🐝][main] !!4 Validate that knowledge is valid (non-void)
37
+ * TODO: [🧳][main] !!4 Validate that persona can be used only with CHAT variant
38
+ * TODO: [🧳][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
39
+ * TODO: [🧳][main] !!4 Validate that reserved parameter is not used as joker
40
40
  * TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
41
41
  * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
42
42
  */
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Make error report URL for the given error
3
3
  *
4
- * @private !!!!!!
4
+ * @private private within the repository
5
5
  */
6
6
  export declare function getErrorReportUrl(error: Error): URL;
@@ -16,7 +16,7 @@ export declare const ANTHROPIC_CLAUDE_MODELS: ReadonlyArray<AvailableModel & {
16
16
  }>;
17
17
  /**
18
18
  * Note: [🤖] Add models of new variant
19
- * TODO: [🧠][main] !!! Add embedding models OR Anthropic has only chat+completion models?
19
+ * TODO: [🧠][main] !!3 Add embedding models OR Anthropic has only chat+completion models?
20
20
  * TODO: [🧠] Some mechanism to propagate unsureness
21
21
  * TODO: [🧠][👮‍♀️] Put here more info like description, isVision, trainingDateCutoff, languages, strengths ( Top-level performance, intelligence, fluency, and understanding), contextWindow,...
22
22
  * TODO: [🎰] Some mechanism to auto-update available models
@@ -11,8 +11,8 @@ export declare const createAnthropicClaudeExecutionTools: ((options: AnthropicCl
11
11
  className: string;
12
12
  };
13
13
  /**
14
- * TODO: [🧠][main] !!!! Make anonymous this with all LLM providers
15
- * TODO: [🧠][🧱][main] !!!! Maybe change all `new AnthropicClaudeExecutionTools` -> `createAnthropicClaudeExecutionTools` in manual
14
+ * TODO: [🧠][main] !!4 Make anonymous this with all LLM providers
15
+ * TODO: [🧠][🧱][main] !!4 Maybe change all `new AnthropicClaudeExecutionTools` -> `createAnthropicClaudeExecutionTools` in manual
16
16
  * TODO: [🧠] Maybe auto-detect usage in browser and determine default value of `isProxied`
17
17
  * TODO: [🦺] Is there some way how to put `packageName` and `className` on top and function definition on bottom?
18
18
  * TODO: [🎶] Naming "constructor" vs "creator" vs "factory"
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ts-node
2
2
  export {};
3
3
  /**
4
- * TODO: [main] !!! Playground with WebGPT / Promptbook.studio anonymous server
5
- * TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
4
+ * TODO: [main] !!3 Playground with WebGPT / Promptbook.studio anonymous server
5
+ * TODO: [main] !!3 Test here that `systemMessage`, `temperature` and `seed` are working correctly
6
6
  * Note: [⚫] Code in this file should never be published in any package
7
7
  */
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ts-node
2
2
  export {};
3
3
  /**
4
- * TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
4
+ * TODO: [main] !!3 Test here that `systemMessage`, `temperature` and `seed` are working correctly
5
5
  * Note: [⚫] Code in this file should never be published in any package
6
6
  */
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ts-node
2
2
  export {};
3
3
  /**
4
- * TODO: [main] !!! Test here that `systemMessage`, `temperature` and `seed` are working correctly
4
+ * TODO: [main] !!3 Test here that `systemMessage`, `temperature` and `seed` are working correctly
5
5
  * Note: [⚫] Code in this file should never be published in any package
6
6
  */
@@ -18,5 +18,5 @@ export declare function getBookTemplates(formfactorName?: string_formfactor_name
18
18
  /**
19
19
  * TODO: Unit test
20
20
  * TODO: [🧠] Which is the best place for this function
21
- * TODO: !!!!!! For GENERIC template ensure at least one pipeline is present for typescript in `getBookTemplates`
21
+ * TODO: !!6 For GENERIC template ensure at least one pipeline is present for typescript in `getBookTemplates`
22
22
  */
@@ -10,8 +10,8 @@ import type { string_persona_description } from '../types/typeAliases';
10
10
  */
11
11
  export declare function preparePersona(personaDescription: string_persona_description, tools: Pick<ExecutionTools, 'llm'>, options: PrepareAndScrapeOptions): Promise<PersonaPreparedJson['modelRequirements']>;
12
12
  /**
13
- * TODO: [🔃][main] !! If the persona was prepared with different version or different set of models, prepare it once again
14
- * TODO: [🏢] !! Check validity of `modelName` in pipeline
15
- * TODO: [🏢] !! Check validity of `systemMessage` in pipeline
16
- * TODO: [🏢] !! Check validity of `temperature` in pipeline
13
+ * TODO: [🔃][main] If the persona was prepared with different version or different set of models, prepare it once again
14
+ * TODO: [🏢] Check validity of `modelName` in pipeline
15
+ * TODO: [🏢] Check validity of `systemMessage` in pipeline
16
+ * TODO: [🏢] Check validity of `temperature` in pipeline
17
17
  */
@@ -7,6 +7,3 @@
7
7
  export type PipelineString = string & {
8
8
  readonly _type: 'Promptbook';
9
9
  };
10
- /**
11
- * TODO: [💩] Better validation (validatePipelineString) or remove branded type and make it just string
12
- */
@@ -9,7 +9,6 @@ import type { PipelineString } from './PipelineString';
9
9
  */
10
10
  export declare function book(strings: TemplateStringsArray, ...values: Array<string>): PipelineString;
11
11
  /**
12
- * TODO: Use ACRY book\`...\ notation instead of as PipelineString
13
12
  * TODO: [🧠][🈴] Where is the best location for this file
14
13
  * Note: [💞] Ignore a discrepancy between file name and entity name
15
14
  */
@@ -3,9 +3,11 @@ import type { PipelineString } from './PipelineString';
3
3
  * Function `isValidPipelineString` will validate the if the string is a valid pipeline string
4
4
  * It does not check if the string is fully logically correct, but if it is a string that can be a pipeline string or the string looks completely different.
5
5
  *
6
+ * @param {string} pipelineString the candidate for a pipeline string
7
+ * @returns {boolean} if the string is a valid pipeline string
6
8
  * @public exported from `@promptbook/core`
7
9
  */
8
- export declare function isValidPipelineString(value: string): value is PipelineString;
10
+ export declare function isValidPipelineString(pipelineString: string): pipelineString is PipelineString;
9
11
  /**
10
12
  * TODO: [🧠][🈴] Where is the best location for this file
11
13
  */
@@ -0,0 +1,14 @@
1
+ import type { PipelineString } from './PipelineString';
2
+ /**
3
+ * Function `validatePipelineString` will validate the if the string is a valid pipeline string
4
+ * It does not check if the string is fully logically correct, but if it is a string that can be a pipeline string or the string looks completely different.
5
+ *
6
+ * @param {string} pipelineString the candidate for a pipeline string
7
+ * @returns {PipelineString} the same string as input, but validated as valid
8
+ * @throws {ParseError} if the string is not a valid pipeline string
9
+ * @public exported from `@promptbook/core`
10
+ */
11
+ export declare function validatePipelineString(pipelineString: string): PipelineString;
12
+ /**
13
+ * TODO: [🧠][🈴] Where is the best location for this file
14
+ */
@@ -8,7 +8,7 @@ import type { PipelineJson } from '../pipeline/PipelineJson/PipelineJson';
8
8
  */
9
9
  export declare function isPipelinePrepared(pipeline: PipelineJson): boolean;
10
10
  /**
11
- * TODO: [🔃][main] !! If the pipeline was prepared with different version or different set of models, prepare it once again
11
+ * TODO: [🔃][main] If the pipeline was prepared with different version or different set of models, prepare it once again
12
12
  * TODO: [🐠] Maybe base this on `makeValidator`
13
13
  * TODO: [🧊] Pipeline can be partially prepared, this should return true ONLY if fully prepared
14
14
  * TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
@@ -25,7 +25,7 @@ export {};
25
25
  * TODO: [😂] Adding knowledge should be convert to async high-level abstractions, simmilar thing with expectations to sync high-level abstractions
26
26
  * TODO: [🧠] Add context to each task (if missing)
27
27
  * TODO: [🧠] What is better name `prepareTask` or `prepareTaskAndParameters`
28
- * TODO: [♨][main] !!! Prepare index the examples and maybe tasks
28
+ * TODO: [♨][main] !!3 Prepare index the examples and maybe tasks
29
29
  * TODO: Write tests for `preparePipeline`
30
30
  * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
31
31
  * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * TODO: !! Make shared test between JavascriptEvalExecutionTools and JavascriptExecutionTools to test the same functionality when implemented via vm2
3
+ * TODO: Make shared test between JavascriptEvalExecutionTools and JavascriptExecutionTools to test the same functionality when implemented via vm2
4
4
  */
@@ -10,5 +10,5 @@ import type { really_any } from '../../../utils/organization/really_any';
10
10
  export declare function preserve(func: (...params: ReadonlyArray<really_any>) => unknown): void;
11
11
  /**
12
12
  * TODO: Probbably remove in favour of `keepImported`
13
- * TODO: !! [1] This maybe does memory leak
13
+ * TODO: [1] This maybe does memory leak
14
14
  */
@@ -319,6 +319,12 @@ export type string_url = string;
319
319
  * For example `"https://collboard.com"`
320
320
  */
321
321
  export type string_base_url = string;
322
+ /**
323
+ * Semantic helper
324
+ *
325
+ * For example `"https://promptbook.studio/webgpt/"`
326
+ */
327
+ export type string_pipeline_root_url = string;
322
328
  /**
323
329
  * Semantic helper
324
330
  *
@@ -623,8 +629,8 @@ export type number_megabytes = number_positive;
623
629
  export type number_gigabytes = number_positive;
624
630
  export type number_terabytes = number_positive;
625
631
  /**.
626
- * TODO: [main] !!! Change "For example" to @example
627
- * TODO: !! Change to branded types
632
+ * TODO: [main] !!3 Change "For example" to @example
633
+ * TODO: Change to branded types
628
634
  * TODO: Delete type aliases that are not exported or used internally
629
635
  * Note: [💞] Ignore a discrepancy between file name and entity name
630
636
  */
@@ -40,6 +40,6 @@ export type CheckSerializableAsJsonOptions = {
40
40
  export declare function checkSerializableAsJson(options: CheckSerializableAsJsonOptions): void;
41
41
  /**
42
42
  * TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
43
- * TODO: [🧠][main] !!! In-memory cache of same values to prevent multiple checks
43
+ * TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
44
44
  * Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
45
45
  */
@@ -20,6 +20,6 @@ import type { JsonValue } from 'type-fest';
20
20
  */
21
21
  export declare function isSerializableAsJson(value: unknown): value is JsonValue;
22
22
  /**
23
- * TODO: [🧠][main] !!! In-memory cache of same values to prevent multiple checks
23
+ * TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
24
24
  * TODO: [🧠][💺] Can be done this on type-level?
25
25
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/editable",
3
- "version": "0.81.0-21",
3
+ "version": "0.81.0-23",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "--note-0": " <- [🐊]",
6
6
  "private": false,
@@ -54,7 +54,7 @@
54
54
  "module": "./esm/index.es.js",
55
55
  "typings": "./esm/typings/src/_packages/editable.index.d.ts",
56
56
  "peerDependencies": {
57
- "@promptbook/core": "0.81.0-21"
57
+ "@promptbook/core": "0.81.0-23"
58
58
  },
59
59
  "dependencies": {
60
60
  "spacetrim": "0.11.59",
package/umd/index.umd.js CHANGED
@@ -22,7 +22,7 @@
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- var PROMPTBOOK_ENGINE_VERSION = '0.81.0-20';
25
+ var PROMPTBOOK_ENGINE_VERSION = '0.81.0-22';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -331,7 +331,7 @@
331
331
  /**
332
332
  * Make error report URL for the given error
333
333
  *
334
- * @private !!!!!!
334
+ * @private private within the repository
335
335
  */
336
336
  function getErrorReportUrl(error) {
337
337
  var report = {
@@ -482,7 +482,7 @@
482
482
  }
483
483
  /**
484
484
  * TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
485
- * TODO: [🧠][main] !!! In-memory cache of same values to prevent multiple checks
485
+ * TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
486
486
  * Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
487
487
  */
488
488
 
@@ -603,7 +603,7 @@
603
603
  }
604
604
  }
605
605
  /**
606
- * TODO: [🧠][main] !!! In-memory cache of same values to prevent multiple checks
606
+ * TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
607
607
  * TODO: [🧠][💺] Can be done this on type-level?
608
608
  */
609
609