@promptbook/node 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 +117 -82
  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 +117 -82
  83. package/umd/index.umd.js.map +1 -1
package/umd/index.umd.js CHANGED
@@ -46,7 +46,7 @@
46
46
  * @generated
47
47
  * @see https://github.com/webgptorg/promptbook
48
48
  */
49
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-23';
49
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-25';
50
50
  /**
51
51
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
52
52
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -118,11 +118,20 @@
118
118
  */
119
119
  const DEFAULT_MAX_FILE_SIZE = 100 * 1024 * 1024; // 100MB
120
120
  /**
121
- * @@@
121
+ * Threshold value that determines when a dataset is considered "big"
122
+ * and may require special handling or optimizations
123
+ *
124
+ * For example, when error occurs in one item of the big dataset, it will not fail the whole pipeline
122
125
  *
123
126
  * @public exported from `@promptbook/core`
124
127
  */
125
128
  const BIG_DATASET_TRESHOLD = 50;
129
+ /**
130
+ * Placeholder text used to represent a placeholder value of failed operation
131
+ *
132
+ * @public exported from `@promptbook/core`
133
+ */
134
+ const FAILED_VALUE_PLACEHOLDER = '!?';
126
135
  // <- TODO: [🧠] Better system for generator warnings - not always "code" and "by `@promptbook/cli`"
127
136
  /**
128
137
  * The maximum number of iterations for a loops
@@ -673,13 +682,13 @@
673
682
  */
674
683
  const REPLACING_NONCE = 'ptbkauk42kV2dzao34faw7FudQUHYPtW';
675
684
  /**
676
- * @@@
685
+ * Placeholder value indicating a parameter is missing its value.
677
686
  *
678
687
  * @private within the repository
679
688
  */
680
689
  const RESERVED_PARAMETER_MISSING_VALUE = 'MISSING-' + REPLACING_NONCE;
681
690
  /**
682
- * @@@
691
+ * Placeholder value indicating a parameter is restricted and cannot be used directly.
683
692
  *
684
693
  * @private within the repository
685
694
  */
@@ -1552,7 +1561,7 @@
1552
1561
  /**
1553
1562
  * Constructs a pipeline collection from pipelines
1554
1563
  *
1555
- * @param pipelines @@@
1564
+ * @param pipelines Array of pipeline JSON objects to include in the collection
1556
1565
  *
1557
1566
  * Note: During the construction logic of all pipelines are validated
1558
1567
  * Note: It is not recommended to use this constructor directly, use `createCollectionFromJson` *(or other variant)* instead
@@ -1682,8 +1691,8 @@
1682
1691
  * @public exported from `@promptbook/core`
1683
1692
  */
1684
1693
  function isPipelinePrepared(pipeline) {
1685
- // Note: Ignoring `pipeline.preparations` @@@
1686
- // Note: Ignoring `pipeline.knowledgePieces` @@@
1694
+ // Note: Ignoring `pipeline.preparations`
1695
+ // Note: Ignoring `pipeline.knowledgePieces`
1687
1696
  if (pipeline.title === undefined || pipeline.title === '' || pipeline.title === DEFAULT_BOOK_TITLE) {
1688
1697
  // TODO: !!! Comment this out
1689
1698
  console.log('Pipeline is not prepared because title is undefined or empty', pipeline);
@@ -2642,6 +2651,15 @@
2642
2651
  mappedData.push(mappedRow);
2643
2652
  if (onProgress) {
2644
2653
  // Note: Report the CSV with all rows mapped so far
2654
+ /*
2655
+ !!!!
2656
+ // Report progress with updated value
2657
+ const progressData = mappedData.map((row, i) =>
2658
+ i > index ? { ...row, [outputParameterName]: PENDING_VALUE_PLACEHOLDER } : row,
2659
+ );
2660
+
2661
+
2662
+ */
2645
2663
  await onProgress(papaparse.unparse(mappedData, { ...settings, ...MANDATORY_CSV_SETTINGS }));
2646
2664
  }
2647
2665
  }
@@ -2858,7 +2876,7 @@
2858
2876
  else if (!availableParametersNames.has(parameterName) && expectedParameterNames.has(parameterName)) ;
2859
2877
  }
2860
2878
  if (expectedParameterNames.size === 0) {
2861
- // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent @@@
2879
+ // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent accidental modifications after mapping
2862
2880
  Object.freeze(mappedParameters);
2863
2881
  return mappedParameters;
2864
2882
  }
@@ -2889,7 +2907,7 @@
2889
2907
  for (let i = 0; i < expectedParameterNames.size; i++) {
2890
2908
  mappedParameters[expectedParameterNamesArray[i]] = availableParameters[availableParametersNamesArray[i]];
2891
2909
  }
2892
- // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent @@@
2910
+ // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent accidental modifications after mapping
2893
2911
  Object.freeze(mappedParameters);
2894
2912
  return mappedParameters;
2895
2913
  }
@@ -3640,10 +3658,10 @@
3640
3658
  */
3641
3659
 
3642
3660
  /**
3643
- * @@@
3661
+ * Removes diacritic marks (accents) from characters in a string.
3644
3662
  *
3645
- * @param input @@@
3646
- * @returns @@@
3663
+ * @param input The string containing diacritics to be normalized.
3664
+ * @returns The string with diacritics removed or normalized.
3647
3665
  * @public exported from `@promptbook/utils`
3648
3666
  */
3649
3667
  function removeDiacritics(input) {
@@ -4131,15 +4149,14 @@
4131
4149
  const highLevelError = new PipelineExecutionError(spaceTrim__default["default"]((block) => `
4132
4150
  ${error.message}
4133
4151
 
4134
- This is error in FOREACH command when mapping data
4152
+ This is error in FOREACH command when mapping ${formatDefinition.formatName} ${subvalueParser.subvalueName} data (${index + 1}/${length})
4135
4153
  You have probbably passed wrong data to pipeline or wrong data was generated which are processed by FOREACH command
4136
4154
 
4137
4155
  ${block(pipelineIdentification)}
4138
- Subparameter index: ${index}
4139
4156
  `));
4140
4157
  if (length > BIG_DATASET_TRESHOLD) {
4141
4158
  console.error(highLevelError);
4142
- return '~';
4159
+ return FAILED_VALUE_PLACEHOLDER;
4143
4160
  }
4144
4161
  throw highLevelError;
4145
4162
  }
@@ -4163,14 +4180,13 @@
4163
4180
  catch (error) {
4164
4181
  if (length > BIG_DATASET_TRESHOLD) {
4165
4182
  console.error(spaceTrim__default["default"]((block) => `
4166
- Error in FOREACH command:
4183
+ ${error.message}
4167
4184
 
4168
- ${block(pipelineIdentification)}
4185
+ This is error in FOREACH command when processing ${formatDefinition.formatName} ${subvalueParser.subvalueName} data (${index + 1}/${length})
4169
4186
 
4170
4187
  ${block(pipelineIdentification)}
4171
- Subparameter index: ${index}
4172
4188
  `));
4173
- return '~';
4189
+ return FAILED_VALUE_PLACEHOLDER;
4174
4190
  }
4175
4191
  throw error;
4176
4192
  }
@@ -5009,7 +5025,8 @@
5009
5025
  */
5010
5026
 
5011
5027
  /**
5012
- * @@@
5028
+ * Safely retrieves the global scope object (window in browser, global in Node.js)
5029
+ * regardless of the JavaScript environment in which the code is running
5013
5030
  *
5014
5031
  * Note: `$` is used to indicate that this function is not a pure function - it access global scope
5015
5032
  *
@@ -5020,10 +5037,10 @@
5020
5037
  }
5021
5038
 
5022
5039
  /**
5023
- * @@@
5040
+ * Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
5024
5041
  *
5025
- * @param text @@@
5026
- * @returns @@@
5042
+ * @param text The text string to be converted to SCREAMING_CASE format.
5043
+ * @returns The normalized text in SCREAMING_CASE format.
5027
5044
  * @example 'HELLO_WORLD'
5028
5045
  * @example 'I_LOVE_PROMPTBOOK'
5029
5046
  * @public exported from `@promptbook/utils`
@@ -5075,10 +5092,10 @@
5075
5092
  */
5076
5093
 
5077
5094
  /**
5078
- * @@@
5095
+ * Normalizes a text string to snake_case format.
5079
5096
  *
5080
- * @param text @@@
5081
- * @returns @@@
5097
+ * @param text The text string to be converted to snake_case format.
5098
+ * @returns The normalized text in snake_case format.
5082
5099
  * @example 'hello_world'
5083
5100
  * @example 'i_love_promptbook'
5084
5101
  * @public exported from `@promptbook/utils`
@@ -5148,10 +5165,11 @@
5148
5165
  */
5149
5166
 
5150
5167
  /**
5151
- * @@@
5168
+ * Registry for all available scrapers in the system.
5169
+ * Central point for registering and accessing different types of content scrapers.
5152
5170
  *
5153
5171
  * Note: `$` is used to indicate that this interacts with the global scope
5154
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
5172
+ * @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
5155
5173
  * @public exported from `@promptbook/core`
5156
5174
  */
5157
5175
  const $scrapersRegister = new $Register('scraper_constructors');
@@ -5247,10 +5265,10 @@
5247
5265
  */
5248
5266
 
5249
5267
  /**
5250
- * @@@
5268
+ * Converts a given text to kebab-case format.
5251
5269
  *
5252
- * @param text @@@
5253
- * @returns @@@
5270
+ * @param text The text to be converted.
5271
+ * @returns The kebab-case formatted string.
5254
5272
  * @example 'hello-world'
5255
5273
  * @example 'i-love-promptbook'
5256
5274
  * @public exported from `@promptbook/utils`
@@ -5319,7 +5337,8 @@
5319
5337
  */
5320
5338
 
5321
5339
  /**
5322
- * @@@
5340
+ * Converts a name to a properly formatted subfolder path for cache storage.
5341
+ * Handles normalization and path formatting to create consistent cache directory structures.
5323
5342
  *
5324
5343
  * @private for `FileCacheStorage`
5325
5344
  */
@@ -5399,11 +5418,11 @@
5399
5418
  }
5400
5419
 
5401
5420
  /**
5402
- * @@@
5421
+ * Converts a title string into a normalized name.
5403
5422
  *
5404
- * @param value @@@
5405
- * @returns @@@
5406
- * @example @@@
5423
+ * @param value The title string to be converted to a name.
5424
+ * @returns A normalized name derived from the input title.
5425
+ * @example 'Hello World!' -> 'hello-world'
5407
5426
  * @public exported from `@promptbook/utils`
5408
5427
  */
5409
5428
  function titleToName(value) {
@@ -5454,7 +5473,9 @@
5454
5473
  */
5455
5474
 
5456
5475
  /**
5457
- * @@@
5476
+ * Factory function that creates a handler for processing knowledge sources.
5477
+ * Provides standardized processing of different types of knowledge sources
5478
+ * across various scraper implementations.
5458
5479
  *
5459
5480
  * @public exported from `@promptbook/core`
5460
5481
  */
@@ -5695,9 +5716,12 @@
5695
5716
  */
5696
5717
 
5697
5718
  /**
5698
- * @@@
5719
+ * Prepares tasks by adding knowledge to the prompt and ensuring all necessary parameters are included.
5699
5720
  *
5700
- * @public exported from `@promptbook/core`
5721
+ * @param tasks Sequence of tasks that are chained together to form a pipeline
5722
+ * @returns A promise that resolves to the prepared tasks.
5723
+ *
5724
+ * @private internal utility of `preparePipeline`
5701
5725
  */
5702
5726
  async function prepareTasks(pipeline, tools, options) {
5703
5727
  const { maxParallelCount = DEFAULT_MAX_PARALLEL_COUNT } = options;
@@ -6603,11 +6627,11 @@
6603
6627
  };
6604
6628
 
6605
6629
  /**
6606
- * @@@
6630
+ * Normalizes a given text to camelCase format.
6607
6631
  *
6608
- * @param text @@@
6609
- * @param _isFirstLetterCapital @@@
6610
- * @returns @@@
6632
+ * @param text The text to be normalized.
6633
+ * @param _isFirstLetterCapital Whether the first letter should be capitalized.
6634
+ * @returns The camelCase formatted string.
6611
6635
  * @example 'helloWorld'
6612
6636
  * @example 'iLovePromptbook'
6613
6637
  * @public exported from `@promptbook/utils`
@@ -7095,7 +7119,7 @@
7095
7119
  };
7096
7120
 
7097
7121
  /**
7098
- * @@@
7122
+ * Pipeline interface which is equivalent to `any`
7099
7123
  *
7100
7124
  * @see https://github.com/webgptorg/promptbook/discussions/171
7101
7125
  *
@@ -7176,14 +7200,15 @@
7176
7200
  };
7177
7201
 
7178
7202
  /**
7179
- * Sheets is form of app that @@@
7203
+ * Sheets is form of app that processes tabular data in CSV format, allowing transformation
7204
+ * and analysis of structured data through AI-powered operations
7180
7205
  *
7181
7206
  * @public exported from `@promptbook/core`
7182
7207
  */
7183
7208
  const SheetsFormfactorDefinition = {
7184
7209
  name: 'SHEETS',
7185
7210
  aliasNames: ['SHEETS', 'SHEET'],
7186
- description: `@@@`,
7211
+ description: `A formfactor for processing spreadsheet-like data in CSV format, enabling AI transformations on tabular data`,
7187
7212
  documentationUrl: `https://github.com/webgptorg/promptbook/discussions/176`,
7188
7213
  pipelineInterface: {
7189
7214
  inputParameters: [
@@ -7259,7 +7284,7 @@
7259
7284
  /**
7260
7285
  * Parses the formfactor command
7261
7286
  *
7262
- * Note: @@@ This command is used as formfactor for new commands - it should NOT be used in any `.book` file
7287
+ * Note: This command is used as a formfactor for new commands and defines the app type format - it should NOT be used in any `.book` file
7263
7288
  *
7264
7289
  * @see `documentationUrl` for more details
7265
7290
  * @public exported from `@promptbook/editable`
@@ -7281,7 +7306,7 @@
7281
7306
  /**
7282
7307
  * Description of the FORMFACTOR command
7283
7308
  */
7284
- description: `@@`,
7309
+ description: `Specifies the application type and interface requirements that this promptbook should conform to`,
7285
7310
  /**
7286
7311
  * Link to documentation
7287
7312
  */
@@ -7424,8 +7449,7 @@
7424
7449
  };
7425
7450
 
7426
7451
  /**
7427
- * @@@
7428
- *
7452
+ * @see {@link ModelVariant}
7429
7453
  * @public exported from `@promptbook/core`
7430
7454
  */
7431
7455
  const MODEL_VARIANTS = ['COMPLETION', 'CHAT', 'EMBEDDING' /* <- TODO [🏳] */ /* <- [🤖] */];
@@ -8398,7 +8422,7 @@
8398
8422
  }
8399
8423
 
8400
8424
  /**
8401
- * @@@
8425
+ * Extracts the interface (input and output parameters) from a pipeline.
8402
8426
  *
8403
8427
  * @deprecated https://github.com/webgptorg/promptbook/pull/186
8404
8428
  * @see https://github.com/webgptorg/promptbook/discussions/171
@@ -8431,7 +8455,7 @@
8431
8455
  }
8432
8456
 
8433
8457
  /**
8434
- * @@@
8458
+ * Checks if two pipeline interfaces are structurally identical.
8435
8459
  *
8436
8460
  * @deprecated https://github.com/webgptorg/promptbook/pull/186
8437
8461
  * @see https://github.com/webgptorg/promptbook/discussions/171
@@ -8463,10 +8487,11 @@
8463
8487
  }
8464
8488
 
8465
8489
  /**
8466
- * @@@
8490
+ * Checks if a given pipeline satisfies the requirements of a specified pipeline interface.
8467
8491
  *
8468
8492
  * @deprecated https://github.com/webgptorg/promptbook/pull/186
8469
8493
  * @see https://github.com/webgptorg/promptbook/discussions/171
8494
+ * @returns `true` if the pipeline implements the interface, `false` otherwise.
8470
8495
  *
8471
8496
  * @public exported from `@promptbook/core`
8472
8497
  */
@@ -8652,7 +8677,8 @@
8652
8677
  }
8653
8678
 
8654
8679
  /**
8655
- * @@@
8680
+ * Utility to determine if a pipeline string is in flat format.
8681
+ * A flat pipeline is a simple text without proper structure (headers, blocks, etc).
8656
8682
  *
8657
8683
  * @public exported from `@promptbook/editable`
8658
8684
  */
@@ -8673,7 +8699,10 @@
8673
8699
  }
8674
8700
 
8675
8701
  /**
8676
- * @@@
8702
+ * Converts a pipeline structure to its string representation.
8703
+ *
8704
+ * Transforms a flat, simple pipeline into a properly formatted pipeline string
8705
+ * with sections for title, prompt, and return statement.
8677
8706
  *
8678
8707
  * @public exported from `@promptbook/editable`
8679
8708
  */
@@ -8730,7 +8759,7 @@
8730
8759
  * Note: It can not work with html syntax and comments
8731
8760
  *
8732
8761
  * @param markdown any valid markdown
8733
- * @returns @@@
8762
+ * @returns An array of strings, each representing an individual list item found in the markdown
8734
8763
  * @public exported from `@promptbook/markdown-utils`
8735
8764
  */
8736
8765
  function extractAllListItemsFromMarkdown(markdown) {
@@ -9585,7 +9614,8 @@
9585
9614
  */
9586
9615
 
9587
9616
  /**
9588
- * @@@
9617
+ * Provides filesystem access (for example for Node.js-based scrapers)
9618
+ * Creates a standardized filesystem interface that scrapers can use for file operations.
9589
9619
  *
9590
9620
  * @public exported from `@promptbook/node`
9591
9621
  */
@@ -9790,10 +9820,10 @@
9790
9820
  */
9791
9821
 
9792
9822
  /**
9793
- * @@@
9823
+ * Register for LLM tools metadata.
9794
9824
  *
9795
9825
  * Note: `$` is used to indicate that this interacts with the global scope
9796
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
9826
+ * @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
9797
9827
  * @public exported from `@promptbook/core`
9798
9828
  */
9799
9829
  const $llmToolsMetadataRegister = new $Register('llm_tools_metadata');
@@ -9821,10 +9851,10 @@
9821
9851
  */
9822
9852
 
9823
9853
  /**
9824
- * @@@
9854
+ * Register for LLM tools.
9825
9855
  *
9826
9856
  * Note: `$` is used to indicate that this interacts with the global scope
9827
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
9857
+ * @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
9828
9858
  * @public exported from `@promptbook/core`
9829
9859
  */
9830
9860
  const $llmToolsRegister = new $Register('llm_execution_tools_constructors');
@@ -10017,9 +10047,8 @@
10017
10047
  */
10018
10048
 
10019
10049
  /**
10020
- * @@@
10050
+ * Provides LLM tools configuration by reading environment variables.
10021
10051
  *
10022
- * @@@ .env
10023
10052
  * Note: `$` is used to indicate that this function is not a pure function - it uses filesystem to access `.env` file
10024
10053
  *
10025
10054
  * It looks for environment variables:
@@ -10027,7 +10056,8 @@
10027
10056
  * - `process.env.ANTHROPIC_CLAUDE_API_KEY`
10028
10057
  * - ...
10029
10058
  *
10030
- * @returns @@@
10059
+ * @see Environment variables documentation or .env file for required variables.
10060
+ * @returns A promise that resolves to the LLM tools configuration, or null if configuration is incomplete or missing.
10031
10061
  * @public exported from `@promptbook/node`
10032
10062
  */
10033
10063
  async function $provideLlmToolsConfigurationFromEnv() {
@@ -10148,11 +10178,9 @@
10148
10178
  */
10149
10179
 
10150
10180
  /**
10151
- * @@@
10152
- *
10153
- * 1) @@@
10154
- * 2) @@@
10155
- *
10181
+ * Provides a collection of scrapers optimized for Node.js environment.
10182
+ * 1) `provideScrapersForNode` use as default
10183
+ * 2) `provideScrapersForBrowser` use in limited browser environment *
10156
10184
  * @public exported from `@promptbook/node`
10157
10185
  */
10158
10186
  async function $provideScrapersForNode(tools, options) {
@@ -10259,11 +10287,11 @@
10259
10287
  }
10260
10288
 
10261
10289
  /**
10262
- * @@@
10290
+ * Converts a name string into a URI-compatible format.
10263
10291
  *
10264
- * @param name @@@
10265
- * @returns @@@
10266
- * @example @@@
10292
+ * @param name The string to be converted to a URI-compatible format.
10293
+ * @returns A URI-compatible string derived from the input name.
10294
+ * @example 'Hello World' -> 'hello-world'
10267
10295
  * @public exported from `@promptbook/utils`
10268
10296
  */
10269
10297
  function nameToUriPart(name) {
@@ -10277,11 +10305,11 @@
10277
10305
  }
10278
10306
 
10279
10307
  /**
10280
- * @@@
10308
+ * Converts a given name into URI-compatible parts.
10281
10309
  *
10282
- * @param name @@@
10283
- * @returns @@@
10284
- * @example @@@
10310
+ * @param name The name to be converted into URI parts.
10311
+ * @returns An array of URI-compatible parts derived from the name.
10312
+ * @example 'Example Name' -> ['example', 'name']
10285
10313
  * @public exported from `@promptbook/utils`
10286
10314
  */
10287
10315
  function nameToUriParts(name) {
@@ -11088,7 +11116,10 @@
11088
11116
  */
11089
11117
 
11090
11118
  /**
11091
- * @@@
11119
+ * A storage implementation that caches data in files organized in a directory structure.
11120
+ * Provides methods for retrieving, storing, and managing cached data on the filesystem.
11121
+ *
11122
+ * This class implements the PromptbookStorage interface for filesystem-based caching.
11092
11123
  *
11093
11124
  * @public exported from `@promptbook/node`
11094
11125
  */
@@ -11101,7 +11132,8 @@
11101
11132
  }
11102
11133
  }
11103
11134
  /**
11104
- * @@@
11135
+ * Converts a storage key to a filesystem path where the data should be stored.
11136
+ * Creates a consistent, deterministic file path based on the key string.
11105
11137
  */
11106
11138
  getFilenameForKey(key) {
11107
11139
  // TODO: [👬] DRY
@@ -11113,7 +11145,8 @@
11113
11145
  ...nameToSubfolderPath(hash /* <- TODO: [🎎] Maybe add some SHA256 prefix */), `${name.substring(0, MAX_FILENAME_LENGTH)}.json`);
11114
11146
  }
11115
11147
  /**
11116
- * @@@ Returns the current value associated with the given key, or null if the given key does not exist in the list associated with the object.
11148
+ * Returns the current value associated with the given key, or null if the given key does not exist.
11149
+ * Retrieves the cached data from the file system storage.
11117
11150
  */
11118
11151
  async getItem(key) {
11119
11152
  const filename = this.getFilenameForKey(key);
@@ -11126,7 +11159,8 @@
11126
11159
  return value;
11127
11160
  }
11128
11161
  /**
11129
- * @@@ Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
11162
+ * Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.
11163
+ * Persists data to the file system, creating necessary directory structure if it doesn't exist.
11130
11164
  */
11131
11165
  async setItem(key, value) {
11132
11166
  const filename = this.getFilenameForKey(key);
@@ -11138,7 +11172,8 @@
11138
11172
  await promises.writeFile(filename, fileContent, 'utf-8');
11139
11173
  }
11140
11174
  /**
11141
- * @@@ Removes the key/value pair with the given key from the list associated with the object, if a key/value pair with the given key exists.
11175
+ * Removes the key/value pair with the given key from the storage, if a key/value pair with the given key exists.
11176
+ * Deletes the corresponding file from the filesystem.
11142
11177
  */
11143
11178
  async removeItem(key) {
11144
11179
  const filename = this.getFilenameForKey(key);