@promptbook/remote-server 0.92.0-23 → 0.92.0-25

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 (83) hide show
  1. package/esm/index.es.js +84 -61
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/core.index.d.ts +0 -2
  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/FORMFACTOR/formfactorCommandParser.d.ts +1 -1
  7. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +36 -28
  8. package/esm/typings/src/config.d.ts +8 -4
  9. package/esm/typings/src/constants.d.ts +2 -2
  10. package/esm/typings/src/errors/0-BoilerplateError.d.ts +2 -2
  11. package/esm/typings/src/execution/CommonToolsOptions.d.ts +3 -3
  12. package/esm/typings/src/formats/_common/FormatSubvalueParser.d.ts +10 -10
  13. package/esm/typings/src/formfactors/_boilerplate/BoilerplateFormfactorDefinition.d.ts +3 -2
  14. package/esm/typings/src/formfactors/_common/string_formfactor_name.d.ts +2 -1
  15. package/esm/typings/src/formfactors/index.d.ts +1 -1
  16. package/esm/typings/src/formfactors/sheets/SheetsFormfactorDefinition.d.ts +3 -2
  17. package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +3 -3
  18. package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +3 -3
  19. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +4 -4
  20. package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +5 -5
  21. package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +5 -3
  22. package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +3 -3
  23. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +5 -5
  24. package/esm/typings/src/other/templates/getBookTemplates.d.ts +2 -2
  25. package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +3 -3
  26. package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +1 -1
  27. package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -1
  28. package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +5 -4
  29. package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -1
  30. package/esm/typings/src/pipeline/PipelineJson/CommonTaskJson.d.ts +9 -6
  31. package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +2 -2
  32. package/esm/typings/src/pipeline/PipelineString.d.ts +3 -1
  33. package/esm/typings/src/pipeline/book-notation.d.ts +2 -2
  34. package/esm/typings/src/prepare/prepareTasks.d.ts +7 -4
  35. package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +2 -1
  36. package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +3 -3
  37. package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
  38. package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
  39. package/esm/typings/src/scrapers/_common/Converter.d.ts +3 -1
  40. package/esm/typings/src/scrapers/_common/Scraper.d.ts +4 -3
  41. package/esm/typings/src/scrapers/_common/ScraperIntermediateSource.d.ts +4 -2
  42. package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -1
  43. package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +6 -3
  44. package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +3 -5
  45. package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +3 -2
  46. package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +8 -5
  47. package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +2 -1
  48. package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +6 -5
  49. package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +3 -1
  50. package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
  51. package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +2 -1
  52. package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +4 -1
  53. package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
  54. package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +2 -1
  55. package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +3 -4
  56. package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +5 -1
  57. package/esm/typings/src/storage/file-cache-storage/FileCacheStorage.d.ts +12 -5
  58. package/esm/typings/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +4 -2
  59. package/esm/typings/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +2 -1
  60. package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +2 -1
  61. package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +2 -1
  62. package/esm/typings/src/types/ModelVariant.d.ts +5 -5
  63. package/esm/typings/src/types/typeAliases.d.ts +8 -6
  64. package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +2 -2
  65. package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +4 -1
  66. package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +2 -1
  67. package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -1
  68. package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
  69. package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +4 -4
  70. package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +4 -4
  71. package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +3 -3
  72. package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +3 -3
  73. package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +4 -4
  74. package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +3 -3
  75. package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +3 -3
  76. package/esm/typings/src/utils/normalization/searchKeywords.d.ts +4 -1
  77. package/esm/typings/src/utils/normalization/titleToName.d.ts +4 -4
  78. package/esm/typings/src/utils/organization/empty_object.d.ts +2 -2
  79. package/esm/typings/src/utils/organization/just_empty_object.d.ts +4 -4
  80. package/esm/typings/src/version.d.ts +2 -1
  81. package/package.json +2 -2
  82. package/umd/index.umd.js +84 -61
  83. package/umd/index.umd.js.map +1 -1
@@ -149,27 +149,29 @@ export type string_persona_description = string;
149
149
  */
150
150
  export type string_model_description = string;
151
151
  /**
152
- * Source of one knowledge
152
+ * Source of one knowledge piece.
153
153
  *
154
- * It can be a link, a relative path to file or direct text
154
+ * It can be a link, a relative path to file or direct text content.
155
155
  *
156
156
  * For example `"https://pavolhejny.com/"`
157
157
  * For example `"./pavol-hejny-cv.pdf"`
158
158
  * For example `"Pavol Hejný has web https://pavolhejny.com/"`
159
159
  * For example `"Pavol Hejný is web developer and creator of Promptbook and Collboard"`
160
160
  *
161
- * @@@ string_knowledge_source vs string_knowledge_source_link
161
+ * Note: Distinguishes between `string_knowledge_source_content` and `string_knowledge_source_link`:
162
+ * `string_knowledge_source_content` refers to the actual content or source of knowledge
163
+ * `string_knowledge_source_link` refers to a reference or link to the knowledge source
162
164
  */
163
165
  export type string_knowledge_source_content = string_knowledge_source_link | string_markdown;
164
166
  /**
165
- * One link to knowledge source
167
+ * One link to a knowledge source.
166
168
  *
167
- * It can be a link or relative path
169
+ * It can be a URL or relative path.
168
170
  *
169
171
  * For example `"https://pavolhejny.com/"`
170
172
  * For example `"./pavol-hejny-cv.pdf"`
171
173
  *
172
- * @@@ string_knowledge_source vs string_knowledge_source_link
174
+ * Note: string_knowledge_source_link refers to a reference or link to the knowledge source, while string_knowledge_source_content can be the link or the actual content.
173
175
  */
174
176
  export type string_knowledge_source_link = string_url | string_filename;
175
177
  /**
@@ -5,7 +5,7 @@ type AddPipelineCommandOptions = {
5
5
  pipelineString: PipelineString;
6
6
  };
7
7
  /**
8
- * @@@
8
+ * Adds a new command to a pipeline string in the correct format.
9
9
  *
10
10
  * @public exported from `@promptbook/editable`
11
11
  */
@@ -14,4 +14,4 @@ export {};
14
14
  /**
15
15
  * TODO: [🧠] What is the better solution - `- xxx`, - `- xxx` or preserve (see also next TODO)
16
16
  * TODO: When existing commands 1) as 2) number 3) list, add 4) new command as next number
17
- */
17
+ */
@@ -1,6 +1,9 @@
1
1
  import type { PipelineString } from '../../../pipeline/PipelineString';
2
2
  /**
3
- * @@@
3
+ * Converts a pipeline structure to its string representation.
4
+ *
5
+ * Transforms a flat, simple pipeline into a properly formatted pipeline string
6
+ * with sections for title, prompt, and return statement.
4
7
  *
5
8
  * @public exported from `@promptbook/editable`
6
9
  */
@@ -1,6 +1,7 @@
1
1
  import type { PipelineString } from '../../../pipeline/PipelineString';
2
2
  /**
3
- * @@@
3
+ * Utility to determine if a pipeline string is in flat format.
4
+ * A flat pipeline is a simple text without proper structure (headers, blocks, etc).
4
5
  *
5
6
  * @public exported from `@promptbook/editable`
6
7
  */
@@ -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
  *
@@ -9,7 +9,7 @@ import type { string_markdown_text } from '../../types/typeAliases';
9
9
  * Note: It can not work with html syntax and comments
10
10
  *
11
11
  * @param markdown any valid markdown
12
- * @returns @@@
12
+ * @returns An array of strings, each representing an individual list item found in the markdown
13
13
  * @public exported from `@promptbook/markdown-utils`
14
14
  */
15
15
  export declare function extractAllListItemsFromMarkdown(markdown: string_markdown): string_markdown_text[];
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @@@
2
+ * Converts a name string into a URI-compatible format.
3
3
  *
4
- * @param name @@@
5
- * @returns @@@
6
- * @example @@@
4
+ * @param name The string to be converted to a URI-compatible format.
5
+ * @returns A URI-compatible string derived from the input name.
6
+ * @example 'Hello World' -> 'hello-world'
7
7
  * @public exported from `@promptbook/utils`
8
8
  */
9
9
  export declare function nameToUriPart(name: string): string;
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @@@
2
+ * Converts a given name into URI-compatible parts.
3
3
  *
4
- * @param name @@@
5
- * @returns @@@
6
- * @example @@@
4
+ * @param name The name to be converted into URI parts.
5
+ * @returns An array of URI-compatible parts derived from the name.
6
+ * @example 'Example Name' -> ['example', 'name']
7
7
  * @public exported from `@promptbook/utils`
8
8
  */
9
9
  export declare function nameToUriParts(name: string): string[];
@@ -7,10 +7,10 @@
7
7
  */
8
8
  export type string_kebab_case = string;
9
9
  /**
10
- * @@@
10
+ * Converts a given text to kebab-case format.
11
11
  *
12
- * @param text @@@
13
- * @returns @@@
12
+ * @param text The text to be converted.
13
+ * @returns The kebab-case formatted string.
14
14
  * @example 'hello-world'
15
15
  * @example 'i-love-promptbook'
16
16
  * @public exported from `@promptbook/utils`
@@ -7,10 +7,10 @@
7
7
  */
8
8
  export type string_SCREAMING_CASE = string;
9
9
  /**
10
- * @@@
10
+ * Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
11
11
  *
12
- * @param text @@@
13
- * @returns @@@
12
+ * @param text The text string to be converted to SCREAMING_CASE format.
13
+ * @returns The normalized text in SCREAMING_CASE format.
14
14
  * @example 'HELLO_WORLD'
15
15
  * @example 'I_LOVE_PROMPTBOOK'
16
16
  * @public exported from `@promptbook/utils`
@@ -7,11 +7,11 @@
7
7
  */
8
8
  export type string_camelCase = string;
9
9
  /**
10
- * @@@
10
+ * Normalizes a given text to camelCase format.
11
11
  *
12
- * @param text @@@
13
- * @param _isFirstLetterCapital @@@
14
- * @returns @@@
12
+ * @param text The text to be normalized.
13
+ * @param _isFirstLetterCapital Whether the first letter should be capitalized.
14
+ * @returns The camelCase formatted string.
15
15
  * @example 'helloWorld'
16
16
  * @example 'iLovePromptbook'
17
17
  * @public exported from `@promptbook/utils`
@@ -6,10 +6,10 @@
6
6
  */
7
7
  export type string_snake_case = string;
8
8
  /**
9
- * @@@
9
+ * Normalizes a text string to snake_case format.
10
10
  *
11
- * @param text @@@
12
- * @returns @@@
11
+ * @param text The text string to be converted to snake_case format.
12
+ * @returns The normalized text in snake_case format.
13
13
  * @example 'hello_world'
14
14
  * @example 'i_love_promptbook'
15
15
  * @public exported from `@promptbook/utils`
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @@@
2
+ * Removes diacritic marks (accents) from characters in a string.
3
3
  *
4
- * @param input @@@
5
- * @returns @@@
4
+ * @param input The string containing diacritics to be normalized.
5
+ * @returns The string with diacritics removed or normalized.
6
6
  * @public exported from `@promptbook/utils`
7
7
  */
8
8
  export declare function removeDiacritics(input: string): string;
@@ -1,6 +1,6 @@
1
1
  import type { Keywords } from './IKeywords';
2
2
  /**
3
- * @@@
3
+ * Searches set of keywords for a specific keyword
4
4
  *
5
5
  * @param haystack
6
6
  * @param needle
@@ -8,3 +8,6 @@ import type { Keywords } from './IKeywords';
8
8
  * @public exported from `@promptbook/utils`
9
9
  */
10
10
  export declare function searchKeywords(haystack: Keywords, needle: Keywords): boolean;
11
+ /**
12
+ * TODO: Rename to `isKeywordInKeywords`
13
+ */
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @@@
2
+ * Converts a title string into a normalized name.
3
3
  *
4
- * @param value @@@
5
- * @returns @@@
6
- * @example @@@
4
+ * @param value The title string to be converted to a name.
5
+ * @returns A normalized name derived from the input title.
6
+ * @example 'Hello World!' -> 'hello-world'
7
7
  * @public exported from `@promptbook/utils`
8
8
  */
9
9
  export declare function titleToName(value: string): string;
@@ -2,8 +2,8 @@
2
2
  * Organizational helper to better mark the place where to really use empty object `{}`
3
3
  *
4
4
  * Note: There are 2 similar types>
5
- * - `empty_object` @@@
6
- * - `just_empty_object` @@@
5
+ * - `empty_object` Type used for empty data objects allowing for potential future extensions
6
+ * - `just_empty_object` Type used when an object must remain permanently empty
7
7
  *
8
8
  * @private within the repository
9
9
  */
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Organizational helper to better @@@@
2
+ * Organizational helper to better distinguish different empty object use cases.
3
3
  *
4
- * Note: There are 2 similar types>
5
- * - `empty_object` @@@
6
- * - `just_empty_object` @@@
4
+ * Note: There are 2 similar types:
5
+ * - `empty_object` Type used for empty data objects with potential extensions
6
+ * - `just_empty_object` Type used specifically for objects that must remain empty
7
7
  *
8
8
  * Note: In most cases, you should use `empty_object`
9
9
  *
@@ -14,7 +14,8 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
14
14
  */
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
- * @@@
17
+ * Represents the version string of the Promptbook engine.
18
+ * It follows semantic versioning (e.g., `0.92.0-24`).
18
19
  *
19
20
  * @generated
20
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/remote-server",
3
- "version": "0.92.0-23",
3
+ "version": "0.92.0-25",
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/remote-server.index.d.ts",
53
53
  "peerDependencies": {
54
- "@promptbook/core": "0.92.0-23"
54
+ "@promptbook/core": "0.92.0-25"
55
55
  },
56
56
  "dependencies": {
57
57
  "colors": "1.4.0",
package/umd/index.umd.js CHANGED
@@ -48,7 +48,7 @@
48
48
  * @generated
49
49
  * @see https://github.com/webgptorg/promptbook
50
50
  */
51
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-23';
51
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-25';
52
52
  /**
53
53
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
54
54
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -116,11 +116,20 @@
116
116
  */
117
117
  const DEFAULT_MAX_FILE_SIZE = 100 * 1024 * 1024; // 100MB
118
118
  /**
119
- * @@@
119
+ * Threshold value that determines when a dataset is considered "big"
120
+ * and may require special handling or optimizations
121
+ *
122
+ * For example, when error occurs in one item of the big dataset, it will not fail the whole pipeline
120
123
  *
121
124
  * @public exported from `@promptbook/core`
122
125
  */
123
126
  const BIG_DATASET_TRESHOLD = 50;
127
+ /**
128
+ * Placeholder text used to represent a placeholder value of failed operation
129
+ *
130
+ * @public exported from `@promptbook/core`
131
+ */
132
+ const FAILED_VALUE_PLACEHOLDER = '!?';
124
133
  // <- TODO: [🧠] Better system for generator warnings - not always "code" and "by `@promptbook/cli`"
125
134
  /**
126
135
  * The maximum number of iterations for a loops
@@ -898,7 +907,8 @@
898
907
  */
899
908
 
900
909
  /**
901
- * @@@
910
+ * Provides filesystem access (for example for Node.js-based scrapers)
911
+ * Creates a standardized filesystem interface that scrapers can use for file operations.
902
912
  *
903
913
  * @public exported from `@promptbook/node`
904
914
  */
@@ -1370,13 +1380,13 @@
1370
1380
  */
1371
1381
  const REPLACING_NONCE = 'ptbkauk42kV2dzao34faw7FudQUHYPtW';
1372
1382
  /**
1373
- * @@@
1383
+ * Placeholder value indicating a parameter is missing its value.
1374
1384
  *
1375
1385
  * @private within the repository
1376
1386
  */
1377
1387
  const RESERVED_PARAMETER_MISSING_VALUE = 'MISSING-' + REPLACING_NONCE;
1378
1388
  /**
1379
- * @@@
1389
+ * Placeholder value indicating a parameter is restricted and cannot be used directly.
1380
1390
  *
1381
1391
  * @private within the repository
1382
1392
  */
@@ -1807,8 +1817,8 @@
1807
1817
  * @public exported from `@promptbook/core`
1808
1818
  */
1809
1819
  function isPipelinePrepared(pipeline) {
1810
- // Note: Ignoring `pipeline.preparations` @@@
1811
- // Note: Ignoring `pipeline.knowledgePieces` @@@
1820
+ // Note: Ignoring `pipeline.preparations`
1821
+ // Note: Ignoring `pipeline.knowledgePieces`
1812
1822
  if (pipeline.title === undefined || pipeline.title === '' || pipeline.title === DEFAULT_BOOK_TITLE) {
1813
1823
  // TODO: !!! Comment this out
1814
1824
  console.log('Pipeline is not prepared because title is undefined or empty', pipeline);
@@ -2507,7 +2517,7 @@
2507
2517
  /**
2508
2518
  * Constructs a pipeline collection from pipelines
2509
2519
  *
2510
- * @param pipelines @@@
2520
+ * @param pipelines Array of pipeline JSON objects to include in the collection
2511
2521
  *
2512
2522
  * Note: During the construction logic of all pipelines are validated
2513
2523
  * Note: It is not recommended to use this constructor directly, use `createCollectionFromJson` *(or other variant)* instead
@@ -3038,7 +3048,8 @@
3038
3048
  */
3039
3049
 
3040
3050
  /**
3041
- * @@@
3051
+ * Safely retrieves the global scope object (window in browser, global in Node.js)
3052
+ * regardless of the JavaScript environment in which the code is running
3042
3053
  *
3043
3054
  * Note: `$` is used to indicate that this function is not a pure function - it access global scope
3044
3055
  *
@@ -3049,10 +3060,10 @@
3049
3060
  }
3050
3061
 
3051
3062
  /**
3052
- * @@@
3063
+ * Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
3053
3064
  *
3054
- * @param text @@@
3055
- * @returns @@@
3065
+ * @param text The text string to be converted to SCREAMING_CASE format.
3066
+ * @returns The normalized text in SCREAMING_CASE format.
3056
3067
  * @example 'HELLO_WORLD'
3057
3068
  * @example 'I_LOVE_PROMPTBOOK'
3058
3069
  * @public exported from `@promptbook/utils`
@@ -3104,10 +3115,10 @@
3104
3115
  */
3105
3116
 
3106
3117
  /**
3107
- * @@@
3118
+ * Normalizes a text string to snake_case format.
3108
3119
  *
3109
- * @param text @@@
3110
- * @returns @@@
3120
+ * @param text The text string to be converted to snake_case format.
3121
+ * @returns The normalized text in snake_case format.
3111
3122
  * @example 'hello_world'
3112
3123
  * @example 'i_love_promptbook'
3113
3124
  * @public exported from `@promptbook/utils`
@@ -3177,10 +3188,11 @@
3177
3188
  */
3178
3189
 
3179
3190
  /**
3180
- * @@@
3191
+ * Registry for all available scrapers in the system.
3192
+ * Central point for registering and accessing different types of content scrapers.
3181
3193
  *
3182
3194
  * Note: `$` is used to indicate that this interacts with the global scope
3183
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
3195
+ * @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
3184
3196
  * @public exported from `@promptbook/core`
3185
3197
  */
3186
3198
  const $scrapersRegister = new $Register('scraper_constructors');
@@ -3520,10 +3532,10 @@
3520
3532
  */
3521
3533
 
3522
3534
  /**
3523
- * @@@
3535
+ * Removes diacritic marks (accents) from characters in a string.
3524
3536
  *
3525
- * @param input @@@
3526
- * @returns @@@
3537
+ * @param input The string containing diacritics to be normalized.
3538
+ * @returns The string with diacritics removed or normalized.
3527
3539
  * @public exported from `@promptbook/utils`
3528
3540
  */
3529
3541
  function removeDiacritics(input) {
@@ -3537,10 +3549,10 @@
3537
3549
  */
3538
3550
 
3539
3551
  /**
3540
- * @@@
3552
+ * Converts a given text to kebab-case format.
3541
3553
  *
3542
- * @param text @@@
3543
- * @returns @@@
3554
+ * @param text The text to be converted.
3555
+ * @returns The kebab-case formatted string.
3544
3556
  * @example 'hello-world'
3545
3557
  * @example 'i-love-promptbook'
3546
3558
  * @public exported from `@promptbook/utils`
@@ -3609,7 +3621,8 @@
3609
3621
  */
3610
3622
 
3611
3623
  /**
3612
- * @@@
3624
+ * Converts a name to a properly formatted subfolder path for cache storage.
3625
+ * Handles normalization and path formatting to create consistent cache directory structures.
3613
3626
  *
3614
3627
  * @private for `FileCacheStorage`
3615
3628
  */
@@ -3689,11 +3702,11 @@
3689
3702
  }
3690
3703
 
3691
3704
  /**
3692
- * @@@
3705
+ * Converts a title string into a normalized name.
3693
3706
  *
3694
- * @param value @@@
3695
- * @returns @@@
3696
- * @example @@@
3707
+ * @param value The title string to be converted to a name.
3708
+ * @returns A normalized name derived from the input title.
3709
+ * @example 'Hello World!' -> 'hello-world'
3697
3710
  * @public exported from `@promptbook/utils`
3698
3711
  */
3699
3712
  function titleToName(value) {
@@ -3744,7 +3757,9 @@
3744
3757
  */
3745
3758
 
3746
3759
  /**
3747
- * @@@
3760
+ * Factory function that creates a handler for processing knowledge sources.
3761
+ * Provides standardized processing of different types of knowledge sources
3762
+ * across various scraper implementations.
3748
3763
  *
3749
3764
  * @public exported from `@promptbook/core`
3750
3765
  */
@@ -3985,9 +4000,12 @@
3985
4000
  */
3986
4001
 
3987
4002
  /**
3988
- * @@@
4003
+ * Prepares tasks by adding knowledge to the prompt and ensuring all necessary parameters are included.
3989
4004
  *
3990
- * @public exported from `@promptbook/core`
4005
+ * @param tasks Sequence of tasks that are chained together to form a pipeline
4006
+ * @returns A promise that resolves to the prepared tasks.
4007
+ *
4008
+ * @private internal utility of `preparePipeline`
3991
4009
  */
3992
4010
  async function prepareTasks(pipeline, tools, options) {
3993
4011
  const { maxParallelCount = DEFAULT_MAX_PARALLEL_COUNT } = options;
@@ -4525,6 +4543,15 @@
4525
4543
  mappedData.push(mappedRow);
4526
4544
  if (onProgress) {
4527
4545
  // Note: Report the CSV with all rows mapped so far
4546
+ /*
4547
+ !!!!
4548
+ // Report progress with updated value
4549
+ const progressData = mappedData.map((row, i) =>
4550
+ i > index ? { ...row, [outputParameterName]: PENDING_VALUE_PLACEHOLDER } : row,
4551
+ );
4552
+
4553
+
4554
+ */
4528
4555
  await onProgress(papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
4529
4556
  }
4530
4557
  }
@@ -4741,7 +4768,7 @@
4741
4768
  else if (!availableParametersNames.has(parameterName) && expectedParameterNames.has(parameterName)) ;
4742
4769
  }
4743
4770
  if (expectedParameterNames.size === 0) {
4744
- // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent @@@
4771
+ // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent accidental modifications after mapping
4745
4772
  Object.freeze(mappedParameters);
4746
4773
  return mappedParameters;
4747
4774
  }
@@ -4772,7 +4799,7 @@
4772
4799
  for (let i = 0; i < expectedParameterNames.size; i++) {
4773
4800
  mappedParameters[expectedParameterNamesArray[i]] = availableParameters[availableParametersNamesArray[i]];
4774
4801
  }
4775
- // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent @@@
4802
+ // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent accidental modifications after mapping
4776
4803
  Object.freeze(mappedParameters);
4777
4804
  return mappedParameters;
4778
4805
  }
@@ -5542,15 +5569,14 @@
5542
5569
  const highLevelError = new PipelineExecutionError(spaceTrim__default["default"]((block) => `
5543
5570
  ${error.message}
5544
5571
 
5545
- This is error in FOREACH command when mapping data
5572
+ This is error in FOREACH command when mapping ${formatDefinition.formatName} ${subvalueParser.subvalueName} data (${index + 1}/${length})
5546
5573
  You have probbably passed wrong data to pipeline or wrong data was generated which are processed by FOREACH command
5547
5574
 
5548
5575
  ${block(pipelineIdentification)}
5549
- Subparameter index: ${index}
5550
5576
  `));
5551
5577
  if (length > BIG_DATASET_TRESHOLD) {
5552
5578
  console.error(highLevelError);
5553
- return '~';
5579
+ return FAILED_VALUE_PLACEHOLDER;
5554
5580
  }
5555
5581
  throw highLevelError;
5556
5582
  }
@@ -5574,14 +5600,13 @@
5574
5600
  catch (error) {
5575
5601
  if (length > BIG_DATASET_TRESHOLD) {
5576
5602
  console.error(spaceTrim__default["default"]((block) => `
5577
- Error in FOREACH command:
5603
+ ${error.message}
5578
5604
 
5579
- ${block(pipelineIdentification)}
5605
+ This is error in FOREACH command when processing ${formatDefinition.formatName} ${subvalueParser.subvalueName} data (${index + 1}/${length})
5580
5606
 
5581
5607
  ${block(pipelineIdentification)}
5582
- Subparameter index: ${index}
5583
5608
  `));
5584
- return '~';
5609
+ return FAILED_VALUE_PLACEHOLDER;
5585
5610
  }
5586
5611
  throw error;
5587
5612
  }
@@ -6252,10 +6277,10 @@
6252
6277
  }
6253
6278
 
6254
6279
  /**
6255
- * @@@
6280
+ * Register for LLM tools.
6256
6281
  *
6257
6282
  * Note: `$` is used to indicate that this interacts with the global scope
6258
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
6283
+ * @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
6259
6284
  * @public exported from `@promptbook/core`
6260
6285
  */
6261
6286
  const $llmToolsRegister = new $Register('llm_execution_tools_constructors');
@@ -6264,10 +6289,10 @@
6264
6289
  */
6265
6290
 
6266
6291
  /**
6267
- * @@@
6292
+ * Register for LLM tools metadata.
6268
6293
  *
6269
6294
  * Note: `$` is used to indicate that this interacts with the global scope
6270
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
6295
+ * @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
6271
6296
  * @public exported from `@promptbook/core`
6272
6297
  */
6273
6298
  const $llmToolsMetadataRegister = new $Register('llm_tools_metadata');
@@ -6451,11 +6476,9 @@
6451
6476
  */
6452
6477
 
6453
6478
  /**
6454
- * @@@
6455
- *
6456
- * 1) @@@
6457
- * 2) @@@
6458
- *
6479
+ * Provides a collection of scrapers optimized for Node.js environment.
6480
+ * 1) `provideScrapersForNode` use as default
6481
+ * 2) `provideScrapersForBrowser` use in limited browser environment *
6459
6482
  * @public exported from `@promptbook/node`
6460
6483
  */
6461
6484
  async function $provideScrapersForNode(tools, options) {
@@ -6480,11 +6503,11 @@
6480
6503
  */
6481
6504
 
6482
6505
  /**
6483
- * @@@
6506
+ * Normalizes a given text to camelCase format.
6484
6507
  *
6485
- * @param text @@@
6486
- * @param _isFirstLetterCapital @@@
6487
- * @returns @@@
6508
+ * @param text The text to be normalized.
6509
+ * @param _isFirstLetterCapital Whether the first letter should be capitalized.
6510
+ * @returns The camelCase formatted string.
6488
6511
  * @example 'helloWorld'
6489
6512
  * @example 'iLovePromptbook'
6490
6513
  * @public exported from `@promptbook/utils`
@@ -6614,11 +6637,11 @@
6614
6637
  }
6615
6638
 
6616
6639
  /**
6617
- * @@@
6640
+ * Converts a name string into a URI-compatible format.
6618
6641
  *
6619
- * @param name @@@
6620
- * @returns @@@
6621
- * @example @@@
6642
+ * @param name The string to be converted to a URI-compatible format.
6643
+ * @returns A URI-compatible string derived from the input name.
6644
+ * @example 'Hello World' -> 'hello-world'
6622
6645
  * @public exported from `@promptbook/utils`
6623
6646
  */
6624
6647
  function nameToUriPart(name) {
@@ -6632,11 +6655,11 @@
6632
6655
  }
6633
6656
 
6634
6657
  /**
6635
- * @@@
6658
+ * Converts a given name into URI-compatible parts.
6636
6659
  *
6637
- * @param name @@@
6638
- * @returns @@@
6639
- * @example @@@
6660
+ * @param name The name to be converted into URI parts.
6661
+ * @returns An array of URI-compatible parts derived from the name.
6662
+ * @example 'Example Name' -> ['example', 'name']
6640
6663
  * @public exported from `@promptbook/utils`
6641
6664
  */
6642
6665
  function nameToUriParts(name) {