@promptbook/browser 0.92.0-9 → 0.93.0
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/README.md +140 -88
- package/esm/index.es.js +134 -28
- 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 +26 -14
- package/esm/typings/src/_packages/types.index.d.ts +6 -2
- package/esm/typings/src/collection/PipelineCollection.d.ts +0 -2
- package/esm/typings/src/collection/SimplePipelineCollection.d.ts +1 -1
- package/esm/typings/src/commands/FOREACH/ForeachJson.d.ts +6 -6
- package/esm/typings/src/commands/FOREACH/foreachCommandParser.d.ts +0 -2
- package/esm/typings/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -1
- package/esm/typings/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -1
- package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -28
- package/esm/typings/src/config.d.ts +41 -11
- package/esm/typings/src/constants.d.ts +43 -2
- package/esm/typings/src/conversion/parsePipeline.d.ts +2 -2
- package/esm/typings/src/errors/0-BoilerplateError.d.ts +2 -2
- package/esm/typings/src/errors/CollectionError.d.ts +1 -1
- package/esm/typings/src/executables/$provideExecutablesForNode.d.ts +1 -1
- package/esm/typings/src/executables/apps/locateLibreoffice.d.ts +2 -1
- package/esm/typings/src/executables/apps/locatePandoc.d.ts +2 -1
- package/esm/typings/src/executables/locateApp.d.ts +2 -2
- package/esm/typings/src/executables/platforms/locateAppOnLinux.d.ts +2 -1
- package/esm/typings/src/executables/platforms/locateAppOnMacOs.d.ts +2 -1
- package/esm/typings/src/executables/platforms/locateAppOnWindows.d.ts +2 -1
- package/esm/typings/src/execution/AbstractTaskResult.d.ts +1 -1
- package/esm/typings/src/execution/CommonToolsOptions.d.ts +3 -3
- package/esm/typings/src/execution/ExecutionTask.d.ts +19 -1
- package/esm/typings/src/execution/LlmExecutionToolsConstructor.d.ts +2 -1
- package/esm/typings/src/execution/PipelineExecutorResult.d.ts +4 -2
- package/esm/typings/src/execution/PromptbookFetch.d.ts +1 -1
- package/esm/typings/src/execution/ScriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/$OngoingTaskResult.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +13 -10
- package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +15 -3
- package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +21 -15
- package/esm/typings/src/execution/createPipelineExecutor/computeCosineSimilarity.d.ts +13 -0
- package/esm/typings/src/execution/createPipelineExecutor/filterJustOutputParameters.d.ts +7 -6
- package/esm/typings/src/execution/createPipelineExecutor/getContextForTask.d.ts +5 -1
- package/esm/typings/src/execution/createPipelineExecutor/getExamplesForTask.d.ts +1 -1
- package/esm/typings/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +12 -9
- package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +18 -5
- package/esm/typings/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +9 -0
- package/esm/typings/src/execution/execution-report/ExecutionReportJson.d.ts +1 -1
- package/esm/typings/src/execution/execution-report/ExecutionReportString.d.ts +1 -1
- package/esm/typings/src/execution/translation/automatic-translate/automatic-translators/LindatAutomaticTranslator.d.ts +4 -4
- package/esm/typings/src/execution/utils/checkExpectations.d.ts +3 -3
- package/esm/typings/src/execution/utils/uncertainNumber.d.ts +3 -2
- package/esm/typings/src/execution/utils/usageToWorktime.d.ts +1 -1
- package/esm/typings/src/formats/_common/{FormatDefinition.d.ts → FormatParser.d.ts} +8 -6
- package/esm/typings/src/formats/_common/FormatSubvalueParser.d.ts +66 -0
- package/esm/typings/src/formats/csv/CsvFormatParser.d.ts +17 -0
- package/esm/typings/src/formats/csv/CsvSettings.d.ts +2 -2
- package/esm/typings/src/formats/csv/utils/csvParse.d.ts +12 -0
- package/esm/typings/src/formats/csv/utils/isValidCsvString.d.ts +1 -1
- package/esm/typings/src/formats/index.d.ts +2 -2
- package/esm/typings/src/formats/json/JsonFormatParser.d.ts +19 -0
- package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +1 -1
- package/esm/typings/src/formats/json/utils/jsonParse.d.ts +0 -3
- package/esm/typings/src/formats/text/{TextFormatDefinition.d.ts → TextFormatParser.d.ts} +7 -7
- package/esm/typings/src/formats/xml/XmlFormatParser.d.ts +19 -0
- package/esm/typings/src/formats/xml/utils/isValidXmlString.d.ts +1 -1
- package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +16 -7
- package/esm/typings/src/formfactors/_common/FormfactorDefinition.d.ts +3 -1
- package/esm/typings/src/formfactors/_common/string_formfactor_name.d.ts +2 -1
- package/esm/typings/src/formfactors/chatbot/ChatbotFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/completion/CompletionFormfactorDefinition.d.ts +29 -0
- package/esm/typings/src/formfactors/generator/GeneratorFormfactorDefinition.d.ts +2 -1
- package/esm/typings/src/formfactors/generic/GenericFormfactorDefinition.d.ts +2 -2
- package/esm/typings/src/formfactors/index.d.ts +33 -8
- package/esm/typings/src/formfactors/matcher/MatcherFormfactorDefinition.d.ts +4 -2
- package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/formfactors/translator/TranslatorFormfactorDefinition.d.ts +3 -2
- package/esm/typings/src/high-level-abstractions/index.d.ts +2 -2
- package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +4 -4
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +4 -3
- package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +18 -5
- package/esm/typings/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +11 -4
- package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +21 -42
- package/esm/typings/src/llm-providers/_common/register/LlmToolsOptions.d.ts +9 -2
- package/esm/typings/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +13 -4
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +10 -5
- package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +11 -3
- package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +3 -3
- package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +5 -5
- package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +6 -0
- package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +4 -4
- package/esm/typings/src/llm-providers/deepseek/deepseek-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
- package/esm/typings/src/llm-providers/openai/register-configuration.d.ts +2 -2
- package/esm/typings/src/llm-providers/openai/register-constructor.d.ts +2 -2
- package/esm/typings/src/migrations/migratePipeline.d.ts +9 -0
- package/esm/typings/src/other/templates/getBookTemplates.d.ts +2 -2
- package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +3 -3
- package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +5 -4
- package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineJson/CommonTaskJson.d.ts +10 -7
- package/esm/typings/src/pipeline/PipelineJson/ParameterJson.d.ts +1 -1
- package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +3 -2
- package/esm/typings/src/pipeline/PipelineString.d.ts +3 -1
- package/esm/typings/src/pipeline/book-notation.d.ts +2 -2
- package/esm/typings/src/postprocessing/utils/extractBlock.d.ts +1 -1
- package/esm/typings/src/postprocessing/utils/extractJsonBlock.d.ts +2 -2
- package/esm/typings/src/prepare/prepareTasks.d.ts +8 -5
- package/esm/typings/src/remote-server/openapi.d.ts +1 -1
- package/esm/typings/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +1 -1
- package/esm/typings/src/remote-server/startRemoteServer.d.ts +1 -1
- package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +7 -6
- package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +3 -3
- package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
- package/esm/typings/src/scrapers/_common/Converter.d.ts +3 -1
- package/esm/typings/src/scrapers/_common/Scraper.d.ts +4 -3
- package/esm/typings/src/scrapers/_common/ScraperIntermediateSource.d.ts +4 -2
- package/esm/typings/src/scrapers/_common/prepareKnowledgePieces.d.ts +2 -2
- package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -1
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +6 -3
- package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +3 -5
- package/esm/typings/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +3 -3
- package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +3 -2
- package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +8 -5
- package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +2 -1
- package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +6 -5
- package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +3 -1
- package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +2 -1
- package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +4 -1
- package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
- package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +2 -1
- package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +3 -4
- package/esm/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -1
- package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +5 -1
- package/esm/typings/src/scripting/javascript/utils/preserve.d.ts +1 -1
- package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +1 -1
- package/esm/typings/src/storage/file-cache-storage/FileCacheStorage.d.ts +12 -5
- package/esm/typings/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +4 -2
- package/esm/typings/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +2 -1
- package/esm/typings/src/storage/local-storage/getIndexedDbStorage.d.ts +11 -0
- package/esm/typings/src/storage/local-storage/utils/IndexedDbStorageOptions.d.ts +14 -0
- package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +8 -0
- package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +2 -1
- package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +2 -1
- package/esm/typings/src/types/ModelRequirements.d.ts +2 -2
- package/esm/typings/src/types/ModelVariant.d.ts +5 -5
- package/esm/typings/src/types/typeAliases.d.ts +22 -19
- package/esm/typings/src/utils/$Register.d.ts +8 -7
- package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +2 -2
- package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +4 -1
- package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +2 -1
- package/esm/typings/src/utils/editable/utils/stringifyPipelineJson.d.ts +1 -1
- package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -1
- package/esm/typings/src/utils/expectation-counters/index.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
- package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -2
- package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +4 -4
- package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +4 -4
- package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +3 -3
- package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +3 -3
- package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +4 -4
- package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +3 -3
- package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +3 -3
- package/esm/typings/src/utils/normalization/searchKeywords.d.ts +4 -1
- package/esm/typings/src/utils/normalization/titleToName.d.ts +4 -4
- package/esm/typings/src/utils/organization/TODO_USE.d.ts +1 -1
- package/esm/typings/src/utils/organization/empty_object.d.ts +2 -2
- package/esm/typings/src/utils/organization/just.d.ts +1 -1
- package/esm/typings/src/utils/organization/just_empty_object.d.ts +4 -4
- package/esm/typings/src/utils/organization/keepUnused.d.ts +1 -1
- package/esm/typings/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +7 -7
- package/esm/typings/src/utils/removeQuotes.d.ts +2 -2
- package/esm/typings/src/utils/serialization/clonePipeline.d.ts +4 -3
- package/esm/typings/src/utils/serialization/deepClone.d.ts +5 -1
- package/esm/typings/src/utils/trimCodeBlock.d.ts +1 -1
- package/esm/typings/src/utils/trimEndOfCodeBlock.d.ts +1 -1
- package/esm/typings/src/utils/unwrapResult.d.ts +2 -2
- package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +3 -3
- package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +5 -4
- package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +1 -1
- package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +1 -1
- package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +1 -1
- package/esm/typings/src/version.d.ts +2 -1
- package/esm/typings/src/wizzard/wizzard.d.ts +1 -1
- package/package.json +15 -3
- package/umd/index.umd.js +134 -27
- package/umd/index.umd.js.map +1 -1
- package/esm/typings/src/formats/_common/FormatSubvalueDefinition.d.ts +0 -31
- package/esm/typings/src/formats/csv/CsvFormatDefinition.d.ts +0 -17
- package/esm/typings/src/formats/json/JsonFormatDefinition.d.ts +0 -19
- package/esm/typings/src/formats/xml/XmlFormatDefinition.d.ts +0 -19
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/MultipleLlmExecutionTools.d.ts +0 -0
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/joinLlmExecutionTools.d.ts +0 -0
- /package/esm/typings/src/llm-providers/{multiple → _multiple}/playground/playground.d.ts +0 -0
|
@@ -68,6 +68,28 @@ export declare const DEFAULT_BOOK_OUTPUT_PARAMETER_NAME = "result";
|
|
|
68
68
|
* @public exported from `@promptbook/core`
|
|
69
69
|
*/
|
|
70
70
|
export declare const DEFAULT_MAX_FILE_SIZE: number;
|
|
71
|
+
/**
|
|
72
|
+
* Threshold value that determines when a dataset is considered "big"
|
|
73
|
+
* and may require special handling or optimizations
|
|
74
|
+
*
|
|
75
|
+
* For example, when error occurs in one item of the big dataset, it will not fail the whole pipeline
|
|
76
|
+
*
|
|
77
|
+
* @public exported from `@promptbook/core`
|
|
78
|
+
*/
|
|
79
|
+
export declare const BIG_DATASET_TRESHOLD = 50;
|
|
80
|
+
/**
|
|
81
|
+
* Placeholder text used to represent a placeholder value of failed operation
|
|
82
|
+
*
|
|
83
|
+
* @public exported from `@promptbook/core`
|
|
84
|
+
*/
|
|
85
|
+
export declare const FAILED_VALUE_PLACEHOLDER = "!?";
|
|
86
|
+
/**
|
|
87
|
+
* Placeholder text used to represent operations or values that are still in progress
|
|
88
|
+
* or awaiting completion in UI displays and logging
|
|
89
|
+
*
|
|
90
|
+
* @public exported from `@promptbook/core`
|
|
91
|
+
*/
|
|
92
|
+
export declare const PENDING_VALUE_PLACEHOLDER = "\u2026";
|
|
71
93
|
/**
|
|
72
94
|
* Warning message for the generated sections and files files
|
|
73
95
|
*
|
|
@@ -156,15 +178,15 @@ export declare const DEFAULT_MAX_PARALLEL_COUNT = 5;
|
|
|
156
178
|
*/
|
|
157
179
|
export declare const DEFAULT_MAX_EXECUTION_ATTEMPTS = 10;
|
|
158
180
|
/**
|
|
159
|
-
*
|
|
160
|
-
*
|
|
181
|
+
* The maximum depth to which knowledge sources will be scraped when building a knowledge base.
|
|
182
|
+
* This prevents infinite recursion and limits resource usage.
|
|
161
183
|
*
|
|
162
184
|
* @public exported from `@promptbook/core`
|
|
163
185
|
*/
|
|
164
186
|
export declare const DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3;
|
|
165
187
|
/**
|
|
166
|
-
*
|
|
167
|
-
*
|
|
188
|
+
* The maximum total number of knowledge sources that will be scraped in a single operation.
|
|
189
|
+
* This acts as a global limit to avoid excessive resource consumption.
|
|
168
190
|
*
|
|
169
191
|
* @public exported from `@promptbook/core`
|
|
170
192
|
*/
|
|
@@ -234,27 +256,27 @@ export declare const MOMENT_ARG_THRESHOLDS: {
|
|
|
234
256
|
*/
|
|
235
257
|
export declare const DEFAULT_REMOTE_SERVER_URL: string_promptbook_server_url;
|
|
236
258
|
/**
|
|
237
|
-
*
|
|
259
|
+
* Default settings for parsing and generating CSV files in Promptbook.
|
|
238
260
|
*
|
|
239
261
|
* @public exported from `@promptbook/core`
|
|
240
262
|
*/
|
|
241
263
|
export declare const DEFAULT_CSV_SETTINGS: CsvSettings;
|
|
242
264
|
/**
|
|
243
|
-
*
|
|
265
|
+
* Controls whether verbose logging is enabled by default throughout the application.
|
|
244
266
|
*
|
|
245
267
|
* @public exported from `@promptbook/core`
|
|
246
268
|
*/
|
|
247
269
|
export declare let DEFAULT_IS_VERBOSE: boolean;
|
|
248
270
|
/**
|
|
249
|
-
*
|
|
271
|
+
* Enables or disables verbose logging globally at runtime.
|
|
250
272
|
*
|
|
251
|
-
* Note: This is experimental feature
|
|
273
|
+
* Note: This is an experimental feature.
|
|
252
274
|
*
|
|
253
275
|
* @public exported from `@promptbook/core`
|
|
254
276
|
*/
|
|
255
277
|
export declare function SET_IS_VERBOSE(isVerbose: boolean): void;
|
|
256
278
|
/**
|
|
257
|
-
*
|
|
279
|
+
* Controls whether auto-installation of dependencies is enabled by default.
|
|
258
280
|
*
|
|
259
281
|
* @public exported from `@promptbook/core`
|
|
260
282
|
*/
|
|
@@ -266,13 +288,21 @@ export declare const DEFAULT_IS_AUTO_INSTALLED = false;
|
|
|
266
288
|
*/
|
|
267
289
|
export declare const DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME = "getPipelineCollection";
|
|
268
290
|
/**
|
|
269
|
-
*
|
|
291
|
+
* Default rate limits (requests per minute)
|
|
292
|
+
*
|
|
293
|
+
* Note: Adjust based on the provider tier you are have
|
|
294
|
+
*
|
|
295
|
+
* @public exported from `@promptbook/core`
|
|
296
|
+
*/
|
|
297
|
+
export declare const DEFAULT_MAX_REQUESTS_PER_MINUTE = 60;
|
|
298
|
+
/**
|
|
299
|
+
* Indicates whether pipeline logic validation is enabled. When true, the pipeline logic is checked for consistency.
|
|
270
300
|
*
|
|
271
301
|
* @private within the repository
|
|
272
302
|
*/
|
|
273
303
|
export declare const IS_PIPELINE_LOGIC_VALIDATED: boolean;
|
|
274
304
|
/**
|
|
275
|
-
*
|
|
305
|
+
* Indicates whether cost-prevention is enabled. When true, real API keys are prevented from being used in tests.
|
|
276
306
|
*
|
|
277
307
|
* @private within the repository
|
|
278
308
|
*/
|
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
import type { PipelineJson } from './pipeline/PipelineJson/PipelineJson';
|
|
2
2
|
import type { ExportJsonOptions } from './utils/serialization/exportJson';
|
|
3
|
+
/**
|
|
4
|
+
* How is the model provider trusted?
|
|
5
|
+
*
|
|
6
|
+
* @public exported from `@promptbook/core`
|
|
7
|
+
*/
|
|
8
|
+
export declare const MODEL_TRUST_LEVELS: {
|
|
9
|
+
readonly FULL: "Model is running on the local machine, training data and model weights are known, data are ethically sourced";
|
|
10
|
+
readonly OPEN: "Model is open source, training data and model weights are known";
|
|
11
|
+
readonly PARTIALLY_OPEN: "Model is open source, but training data and model weights are not (fully) known";
|
|
12
|
+
readonly CLOSED_LOCAL: "Model can be run locally, but it is not open source";
|
|
13
|
+
readonly CLOSED_FREE: "Model is behind API gateway but free to use";
|
|
14
|
+
readonly CLOSED_BUSINESS: "Model is behind API gateway and paid but has good SLA, TOS, privacy policy and in general is a good to use in business applications";
|
|
15
|
+
readonly CLOSED: "Model is behind API gateway and paid";
|
|
16
|
+
readonly UNTRUSTED: "Model has questions about the training data and ethics, but it is not known if it is a problem or not";
|
|
17
|
+
readonly VURNABLE: "Model has some known serious vulnerabilities, leaks, ethical problems, etc.";
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* How is the model provider important?
|
|
21
|
+
*
|
|
22
|
+
* @public exported from `@promptbook/core`
|
|
23
|
+
*/
|
|
24
|
+
export declare const MODEL_ORDERS: {
|
|
25
|
+
/**
|
|
26
|
+
* Top-tier models, e.g. OpenAI, Anthropic,...
|
|
27
|
+
*/
|
|
28
|
+
readonly TOP_TIER: 333;
|
|
29
|
+
/**
|
|
30
|
+
* Mid-tier models, e.g. Llama, Mistral, etc.
|
|
31
|
+
*/
|
|
32
|
+
readonly NORMAL: 100;
|
|
33
|
+
/**
|
|
34
|
+
* Low-tier models, e.g. Phi, Tiny, etc.
|
|
35
|
+
*/
|
|
36
|
+
readonly LOW_TIER: 0;
|
|
37
|
+
};
|
|
3
38
|
/**
|
|
4
39
|
* Order of keys in the pipeline JSON
|
|
5
40
|
*
|
|
@@ -13,13 +48,19 @@ export declare const ORDER_OF_PIPELINE_JSON: ExportJsonOptions<PipelineJson>['or
|
|
|
13
48
|
*/
|
|
14
49
|
export declare const REPLACING_NONCE = "ptbkauk42kV2dzao34faw7FudQUHYPtW";
|
|
15
50
|
/**
|
|
16
|
-
*
|
|
51
|
+
* Nonce which is used as string which is not occurring in normal text
|
|
52
|
+
*
|
|
53
|
+
* @private within the repository
|
|
54
|
+
*/
|
|
55
|
+
export declare const SALT_NONCE = "ptbkghhewbvruets21t54et5";
|
|
56
|
+
/**
|
|
57
|
+
* Placeholder value indicating a parameter is missing its value.
|
|
17
58
|
*
|
|
18
59
|
* @private within the repository
|
|
19
60
|
*/
|
|
20
61
|
export declare const RESERVED_PARAMETER_MISSING_VALUE: string;
|
|
21
62
|
/**
|
|
22
|
-
*
|
|
63
|
+
* Placeholder value indicating a parameter is restricted and cannot be used directly.
|
|
23
64
|
*
|
|
24
65
|
* @private within the repository
|
|
25
66
|
*/
|
|
@@ -4,7 +4,7 @@ import type { PipelineString } from '../pipeline/PipelineString';
|
|
|
4
4
|
* Compile pipeline from string (markdown) format to JSON format synchronously
|
|
5
5
|
*
|
|
6
6
|
* Note: There are 3 similar functions:
|
|
7
|
-
* - `compilePipeline` **(preferred)** - which
|
|
7
|
+
* - `compilePipeline` **(preferred)** - which properly compiles the promptbook and uses embedding for external knowledge
|
|
8
8
|
* - `parsePipeline` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
|
|
9
9
|
* - `preparePipeline` - just one step in the compilation process
|
|
10
10
|
*
|
|
@@ -24,7 +24,7 @@ export declare function parsePipeline(pipelineString: PipelineString): PipelineJ
|
|
|
24
24
|
* TODO: Use spaceTrim more effectively
|
|
25
25
|
* TODO: [🧠] Parameter flags - isInput, isOutput, isInternal
|
|
26
26
|
* TODO: [🥞] Not optimal parsing because `splitMarkdownIntoSections` is executed twice with same string, once through `flattenMarkdown` and second directly here
|
|
27
|
-
* TODO: [♈]
|
|
27
|
+
* TODO: [♈] Probably move expectations from tasks to parameters
|
|
28
28
|
* TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
|
|
29
29
|
* TODO: [🍙] Make some standard order of json properties
|
|
30
30
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This error indicates
|
|
2
|
+
* This error indicates @@
|
|
3
3
|
*
|
|
4
4
|
* @public exported from `@promptbook/core`
|
|
5
5
|
*/
|
|
@@ -8,5 +8,5 @@ export declare class BoilerplateError extends Error {
|
|
|
8
8
|
constructor(message: string);
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* TODO:
|
|
11
|
+
* TODO: @@ Do not forget to add the error into `0-index.ts` ERRORS
|
|
12
12
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Executables } from '../execution/Executables';
|
|
2
2
|
import type { PrepareAndScrapeOptions } from '../prepare/PrepareAndScrapeOptions';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Provides paths to required executables (i.e. as Pandoc and LibreOffice) for Node.js environments.
|
|
5
5
|
*
|
|
6
6
|
* @public exported from `@promptbook/node`
|
|
7
7
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { string_executable_path } from '../../types/typeAliases';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Locates the LibreOffice executable on the current system by searching platform-specific paths.
|
|
4
|
+
* Returns the path to the executable if found, or null otherwise.
|
|
4
5
|
*
|
|
5
6
|
* @private within the repository
|
|
6
7
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { string_executable_path } from '../../types/typeAliases';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Locates the Pandoc executable on the current system by searching platform-specific paths.
|
|
4
|
+
* Returns the path to the executable if found, or null otherwise.
|
|
4
5
|
*
|
|
5
6
|
* @private within the repository
|
|
6
7
|
*/
|
|
@@ -3,7 +3,7 @@ import type { string_executable_path } from '../types/typeAliases';
|
|
|
3
3
|
/**
|
|
4
4
|
* Options for locating any application
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type LocateAppOptions = {
|
|
7
7
|
/**
|
|
8
8
|
* Name of the application
|
|
9
9
|
*/
|
|
@@ -20,7 +20,7 @@ export interface LocateAppOptions {
|
|
|
20
20
|
* Name of the application on macOS
|
|
21
21
|
*/
|
|
22
22
|
macOsName?: string;
|
|
23
|
-
}
|
|
23
|
+
};
|
|
24
24
|
/**
|
|
25
25
|
* Locates an application on the system
|
|
26
26
|
*
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { string_executable_path } from '../../types/typeAliases';
|
|
2
2
|
import type { LocateAppOptions } from '../locateApp';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Attempts to locate the specified application on a Linux system using the 'which' command.
|
|
5
|
+
* Returns the path to the executable if found, or null otherwise.
|
|
5
6
|
*
|
|
6
7
|
* @private within the repository
|
|
7
8
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { string_executable_path } from '../../types/typeAliases';
|
|
2
2
|
import type { LocateAppOptions } from '../locateApp';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Attempts to locate the specified application on a macOS system by checking standard application paths and using mdfind.
|
|
5
|
+
* Returns the path to the executable if found, or null otherwise.
|
|
5
6
|
*
|
|
6
7
|
* @private within the repository
|
|
7
8
|
*/
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { string_executable_path } from '../../types/typeAliases';
|
|
2
2
|
import type { LocateAppOptions } from '../locateApp';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Attempts to locate the specified application on a Windows system by searching common installation directories.
|
|
5
|
+
* Returns the path to the executable if found, or null otherwise.
|
|
5
6
|
*
|
|
6
7
|
* @private within the repository
|
|
7
8
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { string_user_id } from '../types/typeAliases';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Common options shared across various execution tools.
|
|
4
4
|
*
|
|
5
5
|
* Note: Keep it public to allow people to make their own execution tools
|
|
6
6
|
*/
|
|
@@ -17,8 +17,8 @@ export type CommonToolsOptions = {
|
|
|
17
17
|
*/
|
|
18
18
|
readonly isVerbose?: boolean;
|
|
19
19
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
* Maximum number of requests per minute
|
|
21
|
+
*/
|
|
22
22
|
readonly maxRequestsPerMinute?: number;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
@@ -2,6 +2,7 @@ import type { Observable } from 'rxjs';
|
|
|
2
2
|
import { PartialDeep } from 'type-fest';
|
|
3
3
|
import type { task_id } from '../types/typeAliases';
|
|
4
4
|
import type { string_SCREAMING_CASE } from '../utils/normalization/normalizeTo_SCREAMING_CASE';
|
|
5
|
+
import type { string_promptbook_version } from '../version';
|
|
5
6
|
import type { AbstractTaskResult } from './AbstractTaskResult';
|
|
6
7
|
import type { PipelineExecutorResult } from './PipelineExecutorResult';
|
|
7
8
|
/**
|
|
@@ -12,12 +13,21 @@ type CreateTaskOptions<TTaskResult extends AbstractTaskResult> = {
|
|
|
12
13
|
* The type of task to create
|
|
13
14
|
*/
|
|
14
15
|
readonly taskType: AbstractTask<TTaskResult>['taskType'];
|
|
16
|
+
/**
|
|
17
|
+
* Human-readable title of the task - used for displaying in the UI
|
|
18
|
+
*/
|
|
19
|
+
readonly title: AbstractTask<TTaskResult>['title'];
|
|
15
20
|
/**
|
|
16
21
|
* Callback that processes the task and updates the ongoing result
|
|
17
22
|
* @param ongoingResult The partial result of the task processing
|
|
18
23
|
* @returns The final task result
|
|
19
24
|
*/
|
|
20
|
-
taskProcessCallback(updateOngoingResult: (newOngoingResult: PartialDeep<TTaskResult>
|
|
25
|
+
taskProcessCallback(updateOngoingResult: (newOngoingResult: PartialDeep<TTaskResult> & {
|
|
26
|
+
/**
|
|
27
|
+
* Optional update of the task title
|
|
28
|
+
*/
|
|
29
|
+
readonly title?: AbstractTask<TTaskResult>['title'];
|
|
30
|
+
}) => void): Promise<TTaskResult>;
|
|
21
31
|
};
|
|
22
32
|
/**
|
|
23
33
|
* Helper to create a new task
|
|
@@ -52,10 +62,18 @@ export type AbstractTask<TTaskResult extends AbstractTaskResult> = {
|
|
|
52
62
|
* Type of the task
|
|
53
63
|
*/
|
|
54
64
|
readonly taskType: string_SCREAMING_CASE;
|
|
65
|
+
/**
|
|
66
|
+
* Version of the promptbook used to run the task
|
|
67
|
+
*/
|
|
68
|
+
readonly promptbookVersion: string_promptbook_version;
|
|
55
69
|
/**
|
|
56
70
|
* Unique identifier for the task
|
|
57
71
|
*/
|
|
58
72
|
readonly taskId: task_id;
|
|
73
|
+
/**
|
|
74
|
+
* Human-readable title of the task - used for displaying in the UI
|
|
75
|
+
*/
|
|
76
|
+
readonly title: string;
|
|
59
77
|
/**
|
|
60
78
|
* Status of the task
|
|
61
79
|
*/
|
|
@@ -2,7 +2,8 @@ import type { Registered } from '../utils/$Register';
|
|
|
2
2
|
import type { TODO_any } from '../utils/organization/TODO_any';
|
|
3
3
|
import type { LlmExecutionTools } from './LlmExecutionTools';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Type representing a constructor for LLM execution tools, which are used to interact with language models.
|
|
6
|
+
* Combines registration metadata with a factory function for creating LLM tool instances.
|
|
6
7
|
*/
|
|
7
8
|
export type LlmExecutionToolsConstructor = Registered & ((options: TODO_any) => LlmExecutionTools);
|
|
8
9
|
/**
|
|
@@ -5,7 +5,7 @@ import type { AbstractTaskResult } from './AbstractTaskResult';
|
|
|
5
5
|
import type { ExecutionReportJson } from './execution-report/ExecutionReportJson';
|
|
6
6
|
import type { Usage } from './Usage';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* The result of executing a pipeline
|
|
9
9
|
*
|
|
10
10
|
* Note: [🚉] This is fully serializable as JSON
|
|
11
11
|
*/
|
|
@@ -22,8 +22,10 @@ export type PipelineExecutorResult = AbstractTaskResult & {
|
|
|
22
22
|
readonly usage: ReadonlyDeep<Usage>;
|
|
23
23
|
/**
|
|
24
24
|
* The report of the execution with all details
|
|
25
|
+
*
|
|
26
|
+
* Note: If the execution fails unexpectedly, this will be `null`
|
|
25
27
|
*/
|
|
26
|
-
readonly executionReport: ReadonlyDeep<ExecutionReportJson
|
|
28
|
+
readonly executionReport: ReadonlyDeep<ExecutionReportJson> | null;
|
|
27
29
|
/**
|
|
28
30
|
* The prepared pipeline that was used for the execution
|
|
29
31
|
*
|
|
@@ -5,7 +5,7 @@ import type { string_url } from '../types/typeAliases';
|
|
|
5
5
|
* In most cases it is just native `fetch` function with a lightweight error handling wrapper
|
|
6
6
|
* But it can be replaced with any other fetch function, polyfill, custom implementation, security layer, etc.
|
|
7
7
|
*
|
|
8
|
-
* It is used in
|
|
8
|
+
* It is used in these places:
|
|
9
9
|
* - Fetching knowledge sources
|
|
10
10
|
* - Callbacks from remote server
|
|
11
11
|
*/
|
|
@@ -19,7 +19,7 @@ export type ScriptExecutionToolsExecuteOptions = {
|
|
|
19
19
|
readonly scriptLanguage: ScriptLanguage;
|
|
20
20
|
/**
|
|
21
21
|
* Parameters for the script
|
|
22
|
-
*
|
|
22
|
+
* These parameters are passed to the script as variables
|
|
23
23
|
* For example: { "name": "John" } => const name = "John";
|
|
24
24
|
*/
|
|
25
25
|
readonly parameters: Parameters;
|
|
@@ -5,41 +5,44 @@ import type { CompletionPromptResult } from '../PromptResult';
|
|
|
5
5
|
import type { EmbeddingPromptResult } from '../PromptResult';
|
|
6
6
|
import type { PromptResult } from '../PromptResult';
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Represents the ongoing result of a pipeline task execution
|
|
9
|
+
*
|
|
10
|
+
* Used internally by the pipeline executor to track state during execution attempts
|
|
9
11
|
*
|
|
10
12
|
* @private internal utility of `createPipelineExecutor`
|
|
11
13
|
*/
|
|
12
14
|
export type $OngoingTaskResult = {
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* The prompt object used for the current execution attempt, if applicable.
|
|
15
17
|
*/
|
|
16
18
|
$prompt?: Prompt;
|
|
17
19
|
/**
|
|
18
|
-
*
|
|
20
|
+
* The result of a chat model execution, if applicable.
|
|
19
21
|
*/
|
|
20
22
|
$chatResult?: ChatPromptResult;
|
|
21
23
|
/**
|
|
22
|
-
*
|
|
24
|
+
* The result of a completion model execution, if applicable.
|
|
23
25
|
*/
|
|
24
26
|
$completionResult?: CompletionPromptResult;
|
|
25
27
|
/**
|
|
26
|
-
*
|
|
28
|
+
* The result of an embedding model execution, if applicable.
|
|
29
|
+
* Note: [🤖] Embedding results are less common in standard pipelines.
|
|
27
30
|
*/
|
|
28
31
|
$embeddingResult?: EmbeddingPromptResult;
|
|
29
32
|
/**
|
|
30
|
-
*
|
|
33
|
+
* The final result object for the task, or null if not yet available.
|
|
31
34
|
*/
|
|
32
35
|
$result: PromptResult | null;
|
|
33
36
|
/**
|
|
34
|
-
*
|
|
37
|
+
* The result string produced by the task, or null if not yet available.
|
|
35
38
|
*/
|
|
36
39
|
$resultString: string | null;
|
|
37
40
|
/**
|
|
38
|
-
*
|
|
41
|
+
* The last expectation error encountered, or null if none.
|
|
39
42
|
*/
|
|
40
43
|
$expectError: ExpectError | null;
|
|
41
44
|
/**
|
|
42
|
-
*
|
|
45
|
+
* List of errors encountered during script postprocessing or execution.
|
|
43
46
|
*/
|
|
44
47
|
$scriptPipelineExecutionErrors: Array<Error>;
|
|
45
48
|
};
|
|
@@ -4,40 +4,43 @@ import type { InputParameters } from '../../types/typeAliases';
|
|
|
4
4
|
import type { PipelineExecutorResult } from '../PipelineExecutorResult';
|
|
5
5
|
import type { CreatePipelineExecutorOptions } from './00-CreatePipelineExecutorOptions';
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Options for executing an entire pipeline, including input parameters, pipeline context, and progress callbacks.
|
|
8
8
|
*
|
|
9
9
|
* @private internal type of `executePipeline`
|
|
10
10
|
*/
|
|
11
11
|
type ExecutePipelineOptions = Required<CreatePipelineExecutorOptions> & {
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* The input parameters provided by the user for pipeline execution.
|
|
14
14
|
*/
|
|
15
15
|
readonly inputParameters: Readonly<InputParameters>;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Optional callback invoked with partial results as the pipeline execution progresses.
|
|
18
18
|
*/
|
|
19
19
|
onProgress?(newOngoingResult: PartialDeep<PipelineExecutorResult>): Promisable<void>;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* The pipeline definition to execute.
|
|
22
22
|
*/
|
|
23
23
|
readonly pipeline: PipelineJson;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* The prepared and validated pipeline, ready for execution.
|
|
26
26
|
*/
|
|
27
27
|
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Callback to update the prepared pipeline reference after preparation.
|
|
30
30
|
*/
|
|
31
|
-
|
|
31
|
+
setPreparedPipeline(preparedPipeline: ReadonlyDeep<PipelineJson>): void;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* String identifier for the pipeline, used in error messages and reporting.
|
|
34
34
|
*/
|
|
35
35
|
readonly pipelineIdentification: string;
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
* Executes an entire pipeline, resolving tasks in dependency order, handling errors, and reporting progress.
|
|
39
39
|
*
|
|
40
|
-
* Note: This is not a `PipelineExecutor` (which is
|
|
40
|
+
* Note: This is not a `PipelineExecutor` (which is bound to a single pipeline), but a utility function used by `createPipelineExecutor` to create a `PipelineExecutor`.
|
|
41
|
+
*
|
|
42
|
+
* @param options - Options for execution, including input parameters, pipeline, and callbacks.
|
|
43
|
+
* @returns The result of the pipeline execution, including output parameters, errors, and usage statistics.
|
|
41
44
|
*
|
|
42
45
|
* @private internal utility of `createPipelineExecutor`
|
|
43
46
|
*/
|
|
@@ -6,38 +6,41 @@ import type { ExecutionReportJson } from '../execution-report/ExecutionReportJso
|
|
|
6
6
|
import type { PipelineExecutorResult } from '../PipelineExecutorResult';
|
|
7
7
|
import type { CreatePipelineExecutorOptions } from './00-CreatePipelineExecutorOptions';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Options for executing a single pipeline task, including task details, pipeline context, parameters, and callbacks.
|
|
10
10
|
*
|
|
11
11
|
* @private internal type of `executeTask`
|
|
12
12
|
*/
|
|
13
13
|
type executeSingleTaskOptions = Required<CreatePipelineExecutorOptions> & {
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* The task to be executed.
|
|
16
16
|
*/
|
|
17
17
|
readonly currentTask: ReadonlyDeep<TaskJson>;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* The pipeline in which the task resides, fully prepared and validated.
|
|
20
20
|
*/
|
|
21
21
|
readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* The parameters to pass to the task execution.
|
|
24
24
|
*/
|
|
25
25
|
readonly parametersToPass: Readonly<Parameters>;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Callback invoked with partial results as the execution progresses.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
onProgress(newOngoingResult: PartialDeep<PipelineExecutorResult>): Promisable<void>;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Mutable execution report object for tracking execution details.
|
|
32
32
|
*/
|
|
33
33
|
readonly $executionReport: WritableDeep<ExecutionReportJson>;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* String identifier for the pipeline, used in error messages and reporting.
|
|
36
36
|
*/
|
|
37
37
|
readonly pipelineIdentification: string;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Executes a single task within a pipeline, handling parameter validation, error checking, and progress reporting.
|
|
41
|
+
*
|
|
42
|
+
* @param options - Options for execution, including the task, pipeline, parameters, and callbacks.
|
|
43
|
+
* @returns The output parameters produced by the task.
|
|
41
44
|
*
|
|
42
45
|
* @private internal utility of `createPipelineExecutor`
|
|
43
46
|
*/
|
|
@@ -1,13 +1,25 @@
|
|
|
1
|
+
import type { PartialDeep, Promisable } from 'type-fest';
|
|
1
2
|
import type { TODO_any } from '../../utils/organization/TODO_any';
|
|
3
|
+
import type { PipelineExecutorResult } from '../PipelineExecutorResult';
|
|
2
4
|
import type { ExecuteAttemptsOptions } from './40-executeAttempts';
|
|
3
5
|
/**
|
|
4
|
-
*
|
|
6
|
+
* Options for executing a pipeline task that involves formatting subvalues (e.g., iterating over CSV rows).
|
|
7
|
+
* Extends ExecuteAttemptsOptions with a progress callback.
|
|
5
8
|
*
|
|
6
9
|
* @private internal type of `executeFormatSubvalues`
|
|
7
10
|
*/
|
|
8
|
-
type ExecuteFormatCellsOptions = ExecuteAttemptsOptions
|
|
11
|
+
type ExecuteFormatCellsOptions = ExecuteAttemptsOptions & {
|
|
12
|
+
/**
|
|
13
|
+
* Callback invoked with partial results as the execution progresses.
|
|
14
|
+
*/
|
|
15
|
+
onProgress(newOngoingResult: PartialDeep<PipelineExecutorResult>): Promisable<void>;
|
|
16
|
+
};
|
|
9
17
|
/**
|
|
10
|
-
*
|
|
18
|
+
* Executes a pipeline task that requires mapping or iterating over subvalues of a parameter (such as rows in a CSV).
|
|
19
|
+
* Handles format and subformat resolution, error handling, and progress reporting.
|
|
20
|
+
*
|
|
21
|
+
* @param options - Options for execution, including task details and progress callback.
|
|
22
|
+
* @returns The result of the subvalue mapping or execution attempts.
|
|
11
23
|
*
|
|
12
24
|
* @private internal utility of `createPipelineExecutor`
|
|
13
25
|
*/
|