@promptbook/markdown-utils 0.92.0-22 → 0.92.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 (26) hide show
  1. package/esm/index.es.js +94 -53
  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/commands/FOREACH/ForeachJson.d.ts +6 -6
  5. package/esm/typings/src/config.d.ts +29 -11
  6. package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +12 -9
  7. package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +11 -8
  8. package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +8 -3
  9. package/esm/typings/src/execution/createPipelineExecutor/getReservedParametersForTask.d.ts +10 -8
  10. package/esm/typings/src/formats/_common/FormatParser.d.ts +5 -3
  11. package/esm/typings/src/formats/_common/FormatSubvalueParser.d.ts +31 -6
  12. package/esm/typings/src/formats/csv/utils/isValidCsvString.d.ts +1 -1
  13. package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +1 -1
  14. package/esm/typings/src/formats/xml/utils/isValidXmlString.d.ts +1 -1
  15. package/esm/typings/src/llm-providers/_common/register/LlmToolsOptions.d.ts +4 -1
  16. package/esm/typings/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +3 -3
  17. package/esm/typings/src/types/typeAliases.d.ts +9 -7
  18. package/esm/typings/src/utils/$Register.d.ts +8 -7
  19. package/esm/typings/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +7 -7
  20. package/esm/typings/src/utils/serialization/clonePipeline.d.ts +4 -3
  21. package/esm/typings/src/utils/serialization/deepClone.d.ts +5 -1
  22. package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +3 -3
  23. package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +5 -4
  24. package/package.json +1 -1
  25. package/umd/index.umd.js +94 -53
  26. package/umd/index.umd.js.map +1 -1
@@ -13,6 +13,9 @@ import { DEFAULT_TASK_TITLE } from '../config';
13
13
  import { DEFAULT_PROMPT_TASK_TITLE } from '../config';
14
14
  import { DEFAULT_BOOK_OUTPUT_PARAMETER_NAME } from '../config';
15
15
  import { DEFAULT_MAX_FILE_SIZE } from '../config';
16
+ import { BIG_DATASET_TRESHOLD } from '../config';
17
+ import { FAILED_VALUE_PLACEHOLDER } from '../config';
18
+ import { PENDING_VALUE_PLACEHOLDER } from '../config';
16
19
  import { MAX_FILENAME_LENGTH } from '../config';
17
20
  import { DEFAULT_INTERMEDIATE_FILES_STRATEGY } from '../config';
18
21
  import { DEFAULT_MAX_PARALLEL_COUNT } from '../config';
@@ -158,6 +161,9 @@ export { DEFAULT_TASK_TITLE };
158
161
  export { DEFAULT_PROMPT_TASK_TITLE };
159
162
  export { DEFAULT_BOOK_OUTPUT_PARAMETER_NAME };
160
163
  export { DEFAULT_MAX_FILE_SIZE };
164
+ export { BIG_DATASET_TRESHOLD };
165
+ export { FAILED_VALUE_PLACEHOLDER };
166
+ export { PENDING_VALUE_PLACEHOLDER };
161
167
  export { MAX_FILENAME_LENGTH };
162
168
  export { DEFAULT_INTERMEDIATE_FILES_STRATEGY };
163
169
  export { DEFAULT_MAX_PARALLEL_COUNT };
@@ -1,27 +1,27 @@
1
1
  import type { string_parameter_name } from '../../types/typeAliases';
2
2
  import type { TODO_string } from '../../utils/organization/TODO_string';
3
3
  /**
4
- * @@@
4
+ * Information for the FOREACH command, describing how to iterate over a parameter's subvalues in a pipeline task.
5
5
  */
6
6
  export type ForeachJson = {
7
7
  /**
8
- * @@@
8
+ * The name of the format to use for parsing the parameter (e.g., 'CSV').
9
9
  */
10
10
  readonly formatName: TODO_string;
11
11
  /**
12
- * @@@
12
+ * The name of the subformat to use (e.g., CSV Rows).
13
13
  */
14
14
  readonly subformatName: TODO_string;
15
15
  /**
16
- * @@@
16
+ * The name of the parameter to iterate over.
17
17
  */
18
18
  readonly parameterName: string_parameter_name;
19
19
  /**
20
- * @@@
20
+ * The names of the subparameters (e.g., name of the CSV rows)
21
21
  */
22
22
  readonly inputSubparameterNames: Array<string_parameter_name>;
23
23
  /**
24
- * @@@
24
+ * The name of the subparameters (e.g., name of the CSV rows)
25
25
  */
26
26
  readonly outputSubparameterName: string_parameter_name;
27
27
  };
@@ -68,6 +68,24 @@ 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
+ * @@@
73
+ *
74
+ * @public exported from `@promptbook/core`
75
+ */
76
+ export declare const BIG_DATASET_TRESHOLD = 50;
77
+ /**
78
+ * @@@
79
+ *
80
+ * @public exported from `@promptbook/core`
81
+ */
82
+ export declare const FAILED_VALUE_PLACEHOLDER = "!";
83
+ /**
84
+ * @@@
85
+ *
86
+ * @public exported from `@promptbook/core`
87
+ */
88
+ export declare const PENDING_VALUE_PLACEHOLDER = "\u2026";
71
89
  /**
72
90
  * Warning message for the generated sections and files files
73
91
  *
@@ -156,15 +174,15 @@ export declare const DEFAULT_MAX_PARALLEL_COUNT = 5;
156
174
  */
157
175
  export declare const DEFAULT_MAX_EXECUTION_ATTEMPTS = 10;
158
176
  /**
159
- * @@@
160
- * TODO: [🐝][main] !!3 Use
177
+ * The maximum depth to which knowledge sources will be scraped when building a knowledge base.
178
+ * This prevents infinite recursion and limits resource usage.
161
179
  *
162
180
  * @public exported from `@promptbook/core`
163
181
  */
164
182
  export declare const DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3;
165
183
  /**
166
- * @@@
167
- * TODO: [🐝][main] !!3 Use
184
+ * The maximum total number of knowledge sources that will be scraped in a single operation.
185
+ * This acts as a global limit to avoid excessive resource consumption.
168
186
  *
169
187
  * @public exported from `@promptbook/core`
170
188
  */
@@ -234,27 +252,27 @@ export declare const MOMENT_ARG_THRESHOLDS: {
234
252
  */
235
253
  export declare const DEFAULT_REMOTE_SERVER_URL: string_promptbook_server_url;
236
254
  /**
237
- * @@@
255
+ * Default settings for parsing and generating CSV files in Promptbook.
238
256
  *
239
257
  * @public exported from `@promptbook/core`
240
258
  */
241
259
  export declare const DEFAULT_CSV_SETTINGS: CsvSettings;
242
260
  /**
243
- * @@@
261
+ * Controls whether verbose logging is enabled by default throughout the application.
244
262
  *
245
263
  * @public exported from `@promptbook/core`
246
264
  */
247
265
  export declare let DEFAULT_IS_VERBOSE: boolean;
248
266
  /**
249
- * @@@
267
+ * Enables or disables verbose logging globally at runtime.
250
268
  *
251
- * Note: This is experimental feature
269
+ * Note: This is an experimental feature.
252
270
  *
253
271
  * @public exported from `@promptbook/core`
254
272
  */
255
273
  export declare function SET_IS_VERBOSE(isVerbose: boolean): void;
256
274
  /**
257
- * @@@
275
+ * Controls whether auto-installation of dependencies is enabled by default.
258
276
  *
259
277
  * @public exported from `@promptbook/core`
260
278
  */
@@ -274,13 +292,13 @@ export declare const DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME = "getPipelin
274
292
  */
275
293
  export declare const DEFAULT_RPM = 60;
276
294
  /**
277
- * @@@
295
+ * Indicates whether pipeline logic validation is enabled. When true, the pipeline logic is checked for consistency.
278
296
  *
279
297
  * @private within the repository
280
298
  */
281
299
  export declare const IS_PIPELINE_LOGIC_VALIDATED: boolean;
282
300
  /**
283
- * @@@
301
+ * Indicates whether cost-prevention is enabled. When true, real API keys are prevented from being used in tests.
284
302
  *
285
303
  * @private within the repository
286
304
  */
@@ -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
  readonly 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 binded with one exact pipeline), but a utility function of `createPipelineExecutor` which creates `PipelineExecutor`
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
  readonly 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
  */
@@ -3,18 +3,23 @@ import type { TODO_any } from '../../utils/organization/TODO_any';
3
3
  import type { PipelineExecutorResult } from '../PipelineExecutorResult';
4
4
  import type { ExecuteAttemptsOptions } from './40-executeAttempts';
5
5
  /**
6
- * @@@
6
+ * Options for executing a pipeline task that involves formatting subvalues (e.g., iterating over CSV rows).
7
+ * Extends ExecuteAttemptsOptions with a progress callback.
7
8
  *
8
9
  * @private internal type of `executeFormatSubvalues`
9
10
  */
10
11
  type ExecuteFormatCellsOptions = ExecuteAttemptsOptions & {
11
12
  /**
12
- * @@@
13
+ * Callback invoked with partial results as the execution progresses.
13
14
  */
14
15
  readonly onProgress: (newOngoingResult: PartialDeep<PipelineExecutorResult>) => Promisable<void>;
15
16
  };
16
17
  /**
17
- * @@@
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.
18
23
  *
19
24
  * @private internal utility of `createPipelineExecutor`
20
25
  */
@@ -5,7 +5,7 @@ import type { Parameters } from '../../types/typeAliases';
5
5
  import type { ReservedParameters } from '../../types/typeAliases';
6
6
  import type { ExecutionTools } from '../ExecutionTools';
7
7
  /**
8
- * @@@
8
+ * Options for retrieving reserved parameters for a pipeline task, including context, pipeline, and identification.
9
9
  *
10
10
  * @private internal type of `getReservedParametersForTask`
11
11
  */
@@ -15,26 +15,28 @@ type GetReservedParametersForTaskOptions = {
15
15
  */
16
16
  readonly tools: ExecutionTools;
17
17
  /**
18
- * @@@
18
+ * The prepared and validated pipeline in which the task resides.
19
19
  */
20
20
  readonly preparedPipeline: ReadonlyDeep<PipelineJson>;
21
21
  /**
22
- * @@@
22
+ * The task for which reserved parameters are being retrieved.
23
23
  */
24
24
  readonly task: ReadonlyDeep<TaskJson>;
25
25
  /**
26
- * @@@
27
- *
28
- * Parameters to complete the content of the task for embedding
26
+ * Parameters to complete the content of the task for embedding and context.
29
27
  */
30
28
  readonly parameters: Readonly<Parameters>;
31
29
  /**
32
- * @@@
30
+ * String identifier for the pipeline, used in error messages and reporting.
33
31
  */
34
32
  readonly pipelineIdentification: string;
35
33
  };
36
34
  /**
37
- * @@@
35
+ * Retrieves all reserved parameters for a given pipeline task, including context, knowledge, examples, and metadata.
36
+ * Ensures all reserved parameters are defined and throws if any are missing.
37
+ *
38
+ * @param options - Options including tools, pipeline, task, and context.
39
+ * @returns An object containing all reserved parameters for the task.
38
40
  *
39
41
  * @private internal utility of `createPipelineExecutor`
40
42
  */
@@ -4,9 +4,11 @@ import type { string_SCREAMING_CASE } from '../../utils/normalization/normalizeT
4
4
  import type { empty_object } from '../../utils/organization/empty_object';
5
5
  import type { FormatSubvalueParser } from './FormatSubvalueParser';
6
6
  /**
7
- * A format definition is a set of functions that define how to validate, heal and convert response from LLM
7
+ * A format definition is a set of functions that define how to validate, heal and convert response from LLM.
8
8
  *
9
- * @@@ Describe setting vs schema
9
+ * @remarks
10
+ * - "settings" are runtime options that affect parsing (e.g., delimiter for CSV).
11
+ * - "schema" is a structural definition or contract for the data (e.g., expected fields in JSON).
10
12
  *
11
13
  * @see https://github.com/webgptorg/promptbook/discussions/36
12
14
  * @private still in development [🏢]
@@ -56,7 +58,7 @@ export type FormatParser<TValue extends TPartialValue, TPartialValue extends str
56
58
  */
57
59
  heal(value: string, settings?: TSettings, scheme?: TSchema): TValue;
58
60
  /**
59
- * @@@
61
+ * Parsers for extracting or mapping subvalues from the main value (e.g., rows from CSV, items from JSON array).
60
62
  */
61
63
  readonly subvalueParsers: ReadonlyArray<FormatSubvalueParser<TValue, TSettings>>;
62
64
  };
@@ -5,7 +5,8 @@ import type { string_parameter_name } from '../../types/typeAliases';
5
5
  import type { string_SCREAMING_CASE } from '../../utils/normalization/normalizeTo_SCREAMING_CASE';
6
6
  import type { empty_object } from '../../utils/organization/empty_object';
7
7
  /**
8
- * @@@
8
+ * Defines how to extract or map subvalues from a main value in a specific format (e.g., cells from CSV, items from JSON array).
9
+ * Used for iterating or transforming structured data in pipeline tasks.
9
10
  */
10
11
  export type FormatSubvalueParser<TValue extends string, TSettings extends empty_object> = {
11
12
  /**
@@ -19,21 +20,45 @@ export type FormatSubvalueParser<TValue extends string, TSettings extends empty_
19
20
  */
20
21
  readonly aliases?: ReadonlyArray<string_name & string_SCREAMING_CASE>;
21
22
  /**
22
- * Maps values
23
+ * Maps or transforms subvalues from the main value. For example, iterates over all CSV cells or JSON array items.
23
24
  *
24
- * For example, if you have a JSON object and you want to map all values to uppercase
25
- * Or iterate over all CSV cells @@@
25
+ * @param options - Options for mapping, including callbacks for progress and value transformation.
26
+ * @returns The final mapped string result.
26
27
  */
27
28
  mapValues(options: FormatSubvalueParserMapValuesOptions<TValue, TSettings>): Promise<string>;
28
29
  };
29
30
  /**
30
- * @@@
31
+ * Options for mapping or extracting subvalues from a main value using a FormatSubvalueParser.
31
32
  */
32
33
  export type FormatSubvalueParserMapValuesOptions<TValue extends string, TSettings extends empty_object> = {
34
+ /**
35
+ * @@@
36
+ */
33
37
  readonly value: TValue;
38
+ /**
39
+ * @@@
40
+ */
34
41
  readonly outputParameterName: string_parameter_name;
42
+ /**
43
+ * @@@
44
+ */
35
45
  readonly settings: TSettings;
36
- mapCallback: (subvalues: Parameters, index: number) => Promisable<TValue>;
46
+ /**
47
+ * @@@
48
+ *
49
+ * @param subvalues @@@
50
+ * @param index Current index of the subvalue which is being mapped
51
+ * @param length Full length of the subvalues
52
+ * @param number @@@
53
+ * @returns @@@
54
+ */
55
+ mapCallback(subvalues: Parameters, index: number, length: number): Promisable<TValue>;
56
+ /**
57
+ * @@@
58
+ *
59
+ * @param partialResultString @@@
60
+ * @returns @@@
61
+ */
37
62
  onProgress(partialResultString: TValue): Promisable<void>;
38
63
  };
39
64
  /**
@@ -2,7 +2,7 @@
2
2
  * Function to check if a string is valid CSV
3
3
  *
4
4
  * @param value The string to check
5
- * @returns True if the string is a valid CSV string, false otherwise
5
+ * @returns `true` if the string is a valid CSV string, false otherwise
6
6
  *
7
7
  * @public exported from `@promptbook/utils`
8
8
  */
@@ -2,7 +2,7 @@
2
2
  * Function isValidJsonString will tell you if the string is valid JSON or not
3
3
  *
4
4
  * @param value The string to check
5
- * @returns True if the string is a valid JSON string, false otherwise
5
+ * @returns `true` if the string is a valid JSON string, false otherwise
6
6
  *
7
7
  * @public exported from `@promptbook/utils`
8
8
  */
@@ -2,7 +2,7 @@
2
2
  * Function to check if a string is valid XML
3
3
  *
4
4
  * @param value
5
- * @returns True if the string is a valid XML string, false otherwise
5
+ * @returns `true` if the string is a valid XML string, false otherwise
6
6
  *
7
7
  * @public exported from `@promptbook/utils`
8
8
  */
@@ -1,6 +1,9 @@
1
1
  import type { TODO_object } from '../../../utils/organization/TODO_object';
2
2
  /**
3
- * @@@
3
+ * Options for configuring LLM (Large Language Model) tools.
4
+ *
5
+ * This type is used to pass provider-specific options to LLM execution tools.
6
+ *
4
7
  *
5
8
  * @@@ `LlmToolsMetadata` vs `LlmToolsConfiguration` vs `LlmToolsOptions` (vs `Registered`)
6
9
  */
@@ -1,10 +1,10 @@
1
1
  import { $Register } from '../../../utils/$Register';
2
2
  import type { ScraperAndConverterMetadata } from './ScraperAndConverterMetadata';
3
3
  /**
4
- * @@@
4
+ * Global registry for storing metadata about all available scrapers and converters.
5
5
  *
6
- * Note: `$` is used to indicate that this interacts with the global scope
7
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
6
+ * Note: `$` is used to indicate that this interacts with the global scope.
7
+ * @singleton Only one instance of each register is created per build, but there can be more in different contexts (e.g., tests).
8
8
  * @public exported from `@promptbook/core`
9
9
  */
10
10
  export declare const $scrapersMetadataRegister: $Register<ScraperAndConverterMetadata>;
@@ -123,7 +123,8 @@ export type InputParameters = Exclude<Record<string_parameter_name, really_unkno
123
123
  */
124
124
  export type string_reserved_parameter_name = TupleToUnion<typeof RESERVED_PARAMETER_NAMES>;
125
125
  /**
126
- * @@@
126
+ * Represents a mapping of reserved parameter names to their values.
127
+ * Reserved parameters are used internally by the pipeline and should not be set by users.
127
128
  *
128
129
  * Note: [🚉] This is fully serializable as JSON
129
130
  */
@@ -233,7 +234,9 @@ export type string_markdown_text = string;
233
234
  */
234
235
  export type string_markdown_codeblock_language = 'book' | 'markdown' | 'text' | 'javascript' | 'css' | 'json';
235
236
  /**
236
- * @@@
237
+ * A URL pointing to Promptbook documentation or a specific discussion.
238
+ *
239
+ * For example: `https://github.com/webgptorg/promptbook/discussions/123`
237
240
  */
238
241
  export type string_promptbook_documentation_url = `https://github.com/webgptorg/promptbook/discussions/${number | `@@${string}`}`;
239
242
  /**
@@ -448,15 +451,14 @@ export type string_uuid = string & {
448
451
  readonly _type: 'uuid';
449
452
  };
450
453
  /**
451
- * Application identifier
454
+ * Application identifier, used to distinguish different apps or clients.
452
455
  *
453
- * @@@
456
+ * For example: 'cli', 'playground', or a custom app id.
454
457
  */
455
458
  export type string_app_id = id | 'app';
456
459
  /**
457
- * End user identifier
458
- *
459
- * @@@
460
+ * End user identifier, can be a user id or email address.
461
+ * Used for tracking and abuse prevention.
460
462
  */
461
463
  export type string_user_id = id | string_email;
462
464
  /**
@@ -2,33 +2,34 @@ import { type IDestroyable } from 'destroyable';
2
2
  import type { string_name } from '../types/typeAliases';
3
3
  import type { TODO_string } from './organization/TODO_string';
4
4
  /**
5
- * @@@
5
+ * Represents an entity in a global registry.
6
+ * Contains identifying information about the package and class.
6
7
  */
7
8
  export type Registered = {
8
9
  /**
9
- * @@@
10
+ * The name of the package where the registered entity is defined.
10
11
  */
11
12
  readonly packageName: TODO_string;
12
13
  /**
13
- * @@@
14
+ * The name of the class being registered.
14
15
  */
15
16
  readonly className: TODO_string;
16
17
  };
17
18
  /**
18
- * @@@
19
+ * Represents a registration record, including destroyable interface and registry name.
19
20
  */
20
21
  export type Registration = Registered & IDestroyable & {
21
22
  /**
22
- * @@@
23
+ * The name of the register this entity is registered in.
23
24
  */
24
25
  readonly registerName: string_name;
25
26
  };
26
27
  /**
27
- * Register is @@@
28
+ * Global registry for storing and managing registered entities of a given type.
28
29
  *
29
30
  * Note: `$` is used to indicate that this function is not a pure function - it accesses and adds variables in global scope.
30
31
  *
31
- * @private internal utility, exported are only signleton instances of this class
32
+ * @private internal utility, exported are only singleton instances of this class
32
33
  */
33
34
  export declare class $Register<TRegistered extends Registered> {
34
35
  private readonly registerName;
@@ -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;