@promptbook/documents 0.92.0-22 โ†’ 0.92.0-24

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 (35) hide show
  1. package/esm/index.es.js +115 -55
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/core.index.d.ts +6 -0
  4. package/esm/typings/src/collection/PipelineCollection.d.ts +0 -2
  5. package/esm/typings/src/collection/SimplePipelineCollection.d.ts +1 -1
  6. package/esm/typings/src/commands/FOREACH/ForeachJson.d.ts +6 -6
  7. package/esm/typings/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -1
  8. package/esm/typings/src/config.d.ts +33 -11
  9. package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +12 -9
  10. package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +11 -8
  11. package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +8 -3
  12. package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +10 -8
  13. package/esm/typings/src/formats/_common/FormatParser.d.ts +5 -3
  14. package/esm/typings/src/formats/_common/FormatSubvalueParser.d.ts +31 -6
  15. package/esm/typings/src/formats/csv/utils/isValidCsvString.d.ts +1 -1
  16. package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +1 -1
  17. package/esm/typings/src/formats/xml/utils/isValidXmlString.d.ts +1 -1
  18. package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +3 -2
  19. package/esm/typings/src/formfactors/_common/string_formfactor_name.d.ts +2 -1
  20. package/esm/typings/src/formfactors/index.d.ts +1 -1
  21. package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +3 -2
  22. package/esm/typings/src/llm-providers/_common/register/LlmToolsOptions.d.ts +4 -1
  23. package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +3 -3
  24. package/esm/typings/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +3 -3
  25. package/esm/typings/src/types/typeAliases.d.ts +9 -7
  26. package/esm/typings/src/utils/$Register.d.ts +8 -7
  27. package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -1
  28. package/esm/typings/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +7 -7
  29. package/esm/typings/src/utils/serialization/clonePipeline.d.ts +4 -3
  30. package/esm/typings/src/utils/serialization/deepClone.d.ts +5 -1
  31. package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +3 -3
  32. package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +5 -4
  33. package/package.json +2 -2
  34. package/umd/index.umd.js +115 -55
  35. package/umd/index.umd.js.map +1 -1
@@ -1,6 +1,7 @@
1
1
  import type { really_any } from '../organization/really_any';
2
2
  /**
3
- * @@@
3
+ * Safely retrieves the global scope object (window in browser, global in Node.js)
4
+ * regardless of the JavaScript environment in which the code is running
4
5
  *
5
6
  * Note: `$` is used to indicate that this function is not a pure function - it access global scope
6
7
  *
@@ -1,26 +1,26 @@
1
1
  import type { string_parameter_name } from '../../types/typeAliases';
2
2
  import type { string_parameter_value } from '../../types/typeAliases';
3
3
  /**
4
- * @@@
4
+ * Options for mapping available parameters to expected parameters in a pipeline task.
5
5
  */
6
6
  type MakeapAvailableToExpectedParametersOptions = {
7
7
  /**
8
- * @@@
8
+ * The set of expected parameter names (keys) for the task, all values are null.
9
9
  */
10
10
  readonly expectedParameters: Readonly<Record<string_parameter_name, null>>;
11
11
  /**
12
- * @@@
12
+ * The set of available parameters (name-value pairs) to map to the expected parameters.
13
13
  */
14
14
  readonly availableParameters: Readonly<Record<string_parameter_name, string_parameter_value>>;
15
15
  };
16
16
  /**
17
- * Maps available parameters to expected parameters
17
+ * Maps available parameters to expected parameters for a pipeline task.
18
18
  *
19
19
  * The strategy is:
20
- * 1) @@@
21
- * 2) @@@
20
+ * 1) First, match parameters by name where both available and expected.
21
+ * 2) Then, if there are unmatched expected and available parameters, map them by order.
22
22
  *
23
- * @throws {PipelineExecutionError} @@@
23
+ * @throws {PipelineExecutionError} If the number of unmatched expected and available parameters does not match, or mapping is ambiguous.
24
24
  * @private within the repository used in `createPipelineExecutor`
25
25
  */
26
26
  export declare function mapAvailableToExpectedParameters(options: MakeapAvailableToExpectedParametersOptions): Readonly<Record<string_parameter_name, string_parameter_value>>;
@@ -1,10 +1,11 @@
1
1
  import type { PipelineJson } from '../../pipeline/PipelineJson/PipelineJson';
2
2
  /**
3
- * @@@
3
+ * Creates a deep clone of a PipelineJson object, copying all properties explicitly.
4
4
  *
5
- * Note: It is usefull @@@
5
+ * Note: It is useful for ensuring that modifications to the returned pipeline do not affect the original.
6
6
  *
7
- * @param pipeline
7
+ * @param pipeline The pipeline to clone.
8
+ * @returns A new PipelineJson object with the same properties as the input.
8
9
  * @public exported from `@promptbook/utils`
9
10
  */
10
11
  export declare function clonePipeline(pipeline: PipelineJson): PipelineJson;
@@ -1,7 +1,11 @@
1
1
  import type { WritableDeep } from 'type-fest';
2
2
  /**
3
- * @@@
3
+ * Creates a deep clone of the given object
4
4
  *
5
+ * Note: This method only works for objects that are fully serializable to JSON and do not contain functions, Dates, or special types.
6
+ *
7
+ * @param objectValue The object to clone.
8
+ * @returns A deep, writable clone of the input object.
5
9
  * @public exported from `@promptbook/utils`
6
10
  */
7
11
  export declare function deepClone<TObject>(objectValue: TObject): WritableDeep<TObject>;
@@ -1,10 +1,10 @@
1
1
  import type { string_javascript_name } from '../../../types/typeAliases';
2
2
  import type { really_unknown } from '../../organization/really_unknown';
3
3
  /**
4
- * @@@
4
+ * Checks if the given value is a valid JavaScript identifier name.
5
5
  *
6
- * @param javascriptName @@@
7
- * @returns @@@
6
+ * @param javascriptName The value to check for JavaScript identifier validity.
7
+ * @returns `true` if the value is a valid JavaScript name, false otherwise.
8
8
  * @public exported from `@promptbook/utils`
9
9
  */
10
10
  export declare function isValidJavascriptName(javascriptName: really_unknown): javascriptName is string_javascript_name;
@@ -1,10 +1,11 @@
1
1
  import type { string_parameter_name } from '../../../types/typeAliases';
2
2
  /**
3
- * Function `validateParameterName` will @@@
3
+ * Function `validateParameterName` will normalize and validate a parameter name for use in pipelines.
4
+ * It removes diacritics, emojis, and quotes, normalizes to camelCase, and checks for reserved names and invalid characters.
4
5
  *
5
- * @param parameterName @@@
6
- * @returns @@@
7
- * @throws {ParseError} @@@
6
+ * @param parameterName The parameter name to validate and normalize.
7
+ * @returns The validated and normalized parameter name.
8
+ * @throws {ParseError} If the parameter name is empty, reserved, or contains invalid characters.
8
9
  * @private within the repository
9
10
  */
10
11
  export declare function validateParameterName(parameterName: string): string_parameter_name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/documents",
3
- "version": "0.92.0-22",
3
+ "version": "0.92.0-24",
4
4
  "description": "It's time for a paradigm shift. The future of software in plain English, French or Latin",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -51,7 +51,7 @@
51
51
  "module": "./esm/index.es.js",
52
52
  "typings": "./esm/typings/src/_packages/documents.index.d.ts",
53
53
  "peerDependencies": {
54
- "@promptbook/core": "0.92.0-22"
54
+ "@promptbook/core": "0.92.0-24"
55
55
  },
56
56
  "dependencies": {
57
57
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -26,7 +26,7 @@
26
26
  * @generated
27
27
  * @see https://github.com/webgptorg/promptbook
28
28
  */
29
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-22';
29
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-24';
30
30
  /**
31
31
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
32
32
  * Note: [๐Ÿ’ž] Ignore a discrepancy between file name and entity name
@@ -102,6 +102,21 @@
102
102
  * @public exported from `@promptbook/core`
103
103
  */
104
104
  const DEFAULT_MAX_FILE_SIZE = 100 * 1024 * 1024; // 100MB
105
+ /**
106
+ * Threshold value that determines when a dataset is considered "big"
107
+ * and may require special handling or optimizations
108
+ *
109
+ * For example, when error occurs in one item of the big dataset, it will not fail the whole pipeline
110
+ *
111
+ * @public exported from `@promptbook/core`
112
+ */
113
+ const BIG_DATASET_TRESHOLD = 50;
114
+ /**
115
+ * Placeholder text used to represent a placeholder value of failed operation
116
+ *
117
+ * @public exported from `@promptbook/core`
118
+ */
119
+ const FAILED_VALUE_PLACEHOLDER = '!?';
105
120
  // <- TODO: [๐Ÿง ] Better system for generator warnings - not always "code" and "by `@promptbook/cli`"
106
121
  /**
107
122
  * The maximum number of iterations for a loops
@@ -181,7 +196,7 @@
181
196
  const DEFAULT_SCRAPE_CACHE_DIRNAME = './.promptbook/scrape-cache';
182
197
  // <- TODO: [๐Ÿงœโ€โ™‚๏ธ]
183
198
  /**
184
- * @@@
199
+ * Default settings for parsing and generating CSV files in Promptbook.
185
200
  *
186
201
  * @public exported from `@promptbook/core`
187
202
  */
@@ -192,19 +207,19 @@
192
207
  skipEmptyLines: true,
193
208
  });
194
209
  /**
195
- * @@@
210
+ * Controls whether verbose logging is enabled by default throughout the application.
196
211
  *
197
212
  * @public exported from `@promptbook/core`
198
213
  */
199
214
  let DEFAULT_IS_VERBOSE = false;
200
215
  /**
201
- * @@@
216
+ * Controls whether auto-installation of dependencies is enabled by default.
202
217
  *
203
218
  * @public exported from `@promptbook/core`
204
219
  */
205
220
  const DEFAULT_IS_AUTO_INSTALLED = false;
206
221
  /**
207
- * @@@
222
+ * Indicates whether pipeline logic validation is enabled. When true, the pipeline logic is checked for consistency.
208
223
  *
209
224
  * @private within the repository
210
225
  */
@@ -1122,7 +1137,7 @@
1122
1137
  * Function isValidJsonString will tell you if the string is valid JSON or not
1123
1138
  *
1124
1139
  * @param value The string to check
1125
- * @returns True if the string is a valid JSON string, false otherwise
1140
+ * @returns `true` if the string is a valid JSON string, false otherwise
1126
1141
  *
1127
1142
  * @public exported from `@promptbook/utils`
1128
1143
  */
@@ -1533,8 +1548,12 @@
1533
1548
  */
1534
1549
 
1535
1550
  /**
1536
- * @@@
1551
+ * Creates a deep clone of the given object
1552
+ *
1553
+ * Note: This method only works for objects that are fully serializable to JSON and do not contain functions, Dates, or special types.
1537
1554
  *
1555
+ * @param objectValue The object to clone.
1556
+ * @returns A deep, writable clone of the input object.
1538
1557
  * @public exported from `@promptbook/utils`
1539
1558
  */
1540
1559
  function deepClone(objectValue) {
@@ -2121,7 +2140,7 @@
2121
2140
  /**
2122
2141
  * Constructs a pipeline collection from pipelines
2123
2142
  *
2124
- * @param pipelines @@@
2143
+ * @param pipelines Array of pipeline JSON objects to include in the collection
2125
2144
  *
2126
2145
  * Note: During the construction logic of all pipelines are validated
2127
2146
  * Note: It is not recommended to use this constructor directly, use `createCollectionFromJson` *(or other variant)* instead
@@ -3240,7 +3259,8 @@
3240
3259
  */
3241
3260
 
3242
3261
  /**
3243
- * @@@
3262
+ * Safely retrieves the global scope object (window in browser, global in Node.js)
3263
+ * regardless of the JavaScript environment in which the code is running
3244
3264
  *
3245
3265
  * Note: `$` is used to indicate that this function is not a pure function - it access global scope
3246
3266
  *
@@ -3319,11 +3339,11 @@
3319
3339
  }
3320
3340
 
3321
3341
  /**
3322
- * Register is @@@
3342
+ * Global registry for storing and managing registered entities of a given type.
3323
3343
  *
3324
3344
  * Note: `$` is used to indicate that this function is not a pure function - it accesses and adds variables in global scope.
3325
3345
  *
3326
- * @private internal utility, exported are only signleton instances of this class
3346
+ * @private internal utility, exported are only singleton instances of this class
3327
3347
  */
3328
3348
  class $Register {
3329
3349
  constructor(registerName) {
@@ -3367,10 +3387,10 @@
3367
3387
  }
3368
3388
 
3369
3389
  /**
3370
- * @@@
3390
+ * Global registry for storing metadata about all available scrapers and converters.
3371
3391
  *
3372
- * Note: `$` is used to indicate that this interacts with the global scope
3373
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
3392
+ * Note: `$` is used to indicate that this interacts with the global scope.
3393
+ * @singleton Only one instance of each register is created per build, but there can be more in different contexts (e.g., tests).
3374
3394
  * @public exported from `@promptbook/core`
3375
3395
  */
3376
3396
  const $scrapersMetadataRegister = new $Register('scrapers_metadata');
@@ -4261,7 +4281,7 @@
4261
4281
  * Function to check if a string is valid CSV
4262
4282
  *
4263
4283
  * @param value The string to check
4264
- * @returns True if the string is a valid CSV string, false otherwise
4284
+ * @returns `true` if the string is a valid CSV string, false otherwise
4265
4285
  *
4266
4286
  * @public exported from `@promptbook/utils`
4267
4287
  */
@@ -4318,18 +4338,28 @@
4318
4338
  `));
4319
4339
  }
4320
4340
  const mappedData = [];
4321
- for (let index = 0; index < csv.data.length; index++) {
4341
+ const length = csv.data.length;
4342
+ for (let index = 0; index < length; index++) {
4322
4343
  const row = csv.data[index];
4323
4344
  if (row[outputParameterName]) {
4324
4345
  throw new CsvFormatError(`Can not overwrite existing column "${outputParameterName}" in CSV row`);
4325
4346
  }
4326
4347
  const mappedRow = {
4327
4348
  ...row,
4328
- [outputParameterName]: await mapCallback(row, index),
4349
+ [outputParameterName]: await mapCallback(row, index, length),
4329
4350
  };
4330
4351
  mappedData.push(mappedRow);
4331
4352
  if (onProgress) {
4332
4353
  // Note: Report the CSV with all rows mapped so far
4354
+ /*
4355
+ !!!!
4356
+ // Report progress with updated value
4357
+ const progressData = mappedData.map((row, i) =>
4358
+ i > index ? { ...row, [outputParameterName]: PENDING_VALUE_PLACEHOLDER } : row,
4359
+ );
4360
+
4361
+
4362
+ */
4333
4363
  await onProgress(papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
4334
4364
  }
4335
4365
  }
@@ -4356,9 +4386,9 @@
4356
4386
  `));
4357
4387
  }
4358
4388
  const mappedData = await Promise.all(csv.data.map(async (row, rowIndex) => {
4359
- return /* not await */ Promise.all(Object.entries(row).map(async ([key, value], columnIndex) => {
4389
+ return /* not await */ Promise.all(Object.entries(row).map(async ([key, value], columnIndex, array) => {
4360
4390
  const index = rowIndex * Object.keys(row).length + columnIndex;
4361
- return /* not await */ mapCallback({ [key]: value }, index);
4391
+ return /* not await */ mapCallback({ [key]: value }, index, array.length);
4362
4392
  }));
4363
4393
  }));
4364
4394
  return papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS });
@@ -4429,12 +4459,12 @@
4429
4459
  async mapValues(options) {
4430
4460
  const { value, mapCallback, onProgress } = options;
4431
4461
  const lines = value.split('\n');
4432
- const mappedLines = await Promise.all(lines.map((lineContent, lineNumber) =>
4462
+ const mappedLines = await Promise.all(lines.map((lineContent, lineNumber, array) =>
4433
4463
  // TODO: [๐Ÿง ] Maybe option to skip empty line
4434
4464
  /* not await */ mapCallback({
4435
4465
  lineContent,
4436
4466
  // TODO: [๐Ÿง ] Maybe also put here `lineNumber`
4437
- }, lineNumber)));
4467
+ }, lineNumber, array.length)));
4438
4468
  return mappedLines.join('\n');
4439
4469
  },
4440
4470
  },
@@ -4455,7 +4485,7 @@
4455
4485
  * Function to check if a string is valid XML
4456
4486
  *
4457
4487
  * @param value
4458
- * @returns True if the string is a valid XML string, false otherwise
4488
+ * @returns `true` if the string is a valid XML string, false otherwise
4459
4489
  *
4460
4490
  * @public exported from `@promptbook/utils`
4461
4491
  */
@@ -4517,13 +4547,13 @@
4517
4547
  */
4518
4548
 
4519
4549
  /**
4520
- * Maps available parameters to expected parameters
4550
+ * Maps available parameters to expected parameters for a pipeline task.
4521
4551
  *
4522
4552
  * The strategy is:
4523
- * 1) @@@
4524
- * 2) @@@
4553
+ * 1) First, match parameters by name where both available and expected.
4554
+ * 2) Then, if there are unmatched expected and available parameters, map them by order.
4525
4555
  *
4526
- * @throws {PipelineExecutionError} @@@
4556
+ * @throws {PipelineExecutionError} If the number of unmatched expected and available parameters does not match, or mapping is ambiguous.
4527
4557
  * @private within the repository used in `createPipelineExecutor`
4528
4558
  */
4529
4559
  function mapAvailableToExpectedParameters(options) {
@@ -5243,7 +5273,11 @@
5243
5273
  */
5244
5274
 
5245
5275
  /**
5246
- * @@@
5276
+ * Executes a pipeline task that requires mapping or iterating over subvalues of a parameter (such as rows in a CSV).
5277
+ * Handles format and subformat resolution, error handling, and progress reporting.
5278
+ *
5279
+ * @param options - Options for execution, including task details and progress callback.
5280
+ * @returns The result of the subvalue mapping or execution attempts.
5247
5281
  *
5248
5282
  * @private internal utility of `createPipelineExecutor`
5249
5283
  */
@@ -5308,15 +5342,11 @@
5308
5342
  settings: formatSettings,
5309
5343
  onProgress(partialResultString) {
5310
5344
  return onProgress(Object.freeze({
5311
- [task.resultingParameterName]:
5312
- // <- Note: [๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘ง] No need to detect parameter collision here because pipeline checks logic consistency during construction
5313
- partialResultString,
5345
+ [task.resultingParameterName]: partialResultString,
5314
5346
  }));
5315
5347
  },
5316
- async mapCallback(subparameters, index) {
5348
+ async mapCallback(subparameters, index, length) {
5317
5349
  let mappedParameters;
5318
- // TODO: [๐Ÿคนโ€โ™‚๏ธ][๐Ÿช‚] Limit to N concurrent executions
5319
- // TODO: When done [๐Ÿš] Report progress also for each subvalue here
5320
5350
  try {
5321
5351
  mappedParameters = mapAvailableToExpectedParameters({
5322
5352
  expectedParameters: Object.fromEntries(task.foreach.inputSubparameterNames.map((subparameterName) => [subparameterName, null])),
@@ -5327,32 +5357,52 @@
5327
5357
  if (!(error instanceof PipelineExecutionError)) {
5328
5358
  throw error;
5329
5359
  }
5330
- throw new PipelineExecutionError(spaceTrim__default["default"]((block) => `
5331
- ${error.message}
5360
+ const highLevelError = new PipelineExecutionError(spaceTrim__default["default"]((block) => `
5361
+ ${error.message}
5332
5362
 
5333
- This is error in FOREACH command
5334
- You have probbably passed wrong data to pipeline or wrong data was generated which are processed by FOREACH command
5363
+ This is error in FOREACH command when mapping data
5364
+ You have probbably passed wrong data to pipeline or wrong data was generated which are processed by FOREACH command
5335
5365
 
5336
- ${block(pipelineIdentification)}
5337
- Subparameter index: ${index}
5338
- `));
5366
+ ${block(pipelineIdentification)}
5367
+ Subparameter index: ${index}
5368
+ `));
5369
+ if (length > BIG_DATASET_TRESHOLD) {
5370
+ console.error(highLevelError);
5371
+ return FAILED_VALUE_PLACEHOLDER;
5372
+ }
5373
+ throw highLevelError;
5339
5374
  }
5340
5375
  const allSubparameters = {
5341
5376
  ...parameters,
5342
5377
  ...mappedParameters,
5343
5378
  };
5344
- // Note: [๐Ÿ‘จโ€๐Ÿ‘จโ€๐Ÿ‘ง] Now we can freeze `subparameters` because we are sure that all and only used parameters are defined and are not going to be changed
5345
5379
  Object.freeze(allSubparameters);
5346
- const subresultString = await executeAttempts({
5347
- ...options,
5348
- priority: priority + index,
5349
- parameters: allSubparameters,
5350
- pipelineIdentification: spaceTrim__default["default"]((block) => `
5351
- ${block(pipelineIdentification)}
5352
- Subparameter index: ${index}
5353
- `),
5354
- });
5355
- return subresultString;
5380
+ try {
5381
+ const subresultString = await executeAttempts({
5382
+ ...options,
5383
+ priority: priority + index,
5384
+ parameters: allSubparameters,
5385
+ pipelineIdentification: spaceTrim__default["default"]((block) => `
5386
+ ${block(pipelineIdentification)}
5387
+ Subparameter index: ${index}
5388
+ `),
5389
+ });
5390
+ return subresultString;
5391
+ }
5392
+ catch (error) {
5393
+ if (length > BIG_DATASET_TRESHOLD) {
5394
+ console.error(spaceTrim__default["default"]((block) => `
5395
+ Error in FOREACH command:
5396
+
5397
+ ${block(pipelineIdentification)}
5398
+
5399
+ ${block(pipelineIdentification)}
5400
+ Subparameter index: ${index}
5401
+ `));
5402
+ return FAILED_VALUE_PLACEHOLDER;
5403
+ }
5404
+ throw error;
5405
+ }
5356
5406
  },
5357
5407
  });
5358
5408
  return resultString;
@@ -5487,7 +5537,11 @@
5487
5537
  */
5488
5538
 
5489
5539
  /**
5490
- * @@@
5540
+ * Retrieves all reserved parameters for a given pipeline task, including context, knowledge, examples, and metadata.
5541
+ * Ensures all reserved parameters are defined and throws if any are missing.
5542
+ *
5543
+ * @param options - Options including tools, pipeline, task, and context.
5544
+ * @returns An object containing all reserved parameters for the task.
5491
5545
  *
5492
5546
  * @private internal utility of `createPipelineExecutor`
5493
5547
  */
@@ -5520,7 +5574,10 @@
5520
5574
  }
5521
5575
 
5522
5576
  /**
5523
- * @@@
5577
+ * Executes a single task within a pipeline, handling parameter validation, error checking, and progress reporting.
5578
+ *
5579
+ * @param options - Options for execution, including the task, pipeline, parameters, and callbacks.
5580
+ * @returns The output parameters produced by the task.
5524
5581
  *
5525
5582
  * @private internal utility of `createPipelineExecutor`
5526
5583
  */
@@ -5654,9 +5711,12 @@
5654
5711
  }
5655
5712
 
5656
5713
  /**
5657
- * @@@
5714
+ * Executes an entire pipeline, resolving tasks in dependency order, handling errors, and reporting progress.
5715
+ *
5716
+ * Note: This is not a `PipelineExecutor` (which is bound to a single pipeline), but a utility function used by `createPipelineExecutor` to create a `PipelineExecutor`.
5658
5717
  *
5659
- * Note: This is not a `PipelineExecutor` (which is binded with one exact pipeline), but a utility function of `createPipelineExecutor` which creates `PipelineExecutor`
5718
+ * @param options - Options for execution, including input parameters, pipeline, and callbacks.
5719
+ * @returns The result of the pipeline execution, including output parameters, errors, and usage statistics.
5660
5720
  *
5661
5721
  * @private internal utility of `createPipelineExecutor`
5662
5722
  */