@promptbook/core 0.92.0-24 → 0.92.0-26

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 (72) hide show
  1. package/esm/index.es.js +78 -62
  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/commands/_common/types/CommandParser.d.ts +36 -28
  5. package/esm/typings/src/constants.d.ts +8 -2
  6. package/esm/typings/src/errors/0-BoilerplateError.d.ts +2 -2
  7. package/esm/typings/src/execution/CommonToolsOptions.d.ts +3 -3
  8. package/esm/typings/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +3 -3
  9. package/esm/typings/src/llm-providers/_common/register/$llmToolsRegister.d.ts +3 -3
  10. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +4 -4
  11. package/esm/typings/src/llm-providers/_common/utils/cache/CacheItem.d.ts +5 -5
  12. package/esm/typings/src/llm-providers/_common/utils/cache/CacheLlmToolsOptions.d.ts +5 -3
  13. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +5 -5
  14. package/esm/typings/src/other/templates/getBookTemplates.d.ts +2 -2
  15. package/esm/typings/src/pipeline/PipelineInterface/PipelineInterface.d.ts +3 -3
  16. package/esm/typings/src/pipeline/PipelineInterface/constants.d.ts +1 -1
  17. package/esm/typings/src/pipeline/PipelineInterface/getPipelineInterface.d.ts +1 -1
  18. package/esm/typings/src/pipeline/PipelineInterface/isPipelineImplementingInterface.d.ts +5 -4
  19. package/esm/typings/src/pipeline/PipelineInterface/isPipelineInterfacesEqual.d.ts +1 -1
  20. package/esm/typings/src/pipeline/PipelineJson/CommonTaskJson.d.ts +9 -6
  21. package/esm/typings/src/pipeline/PipelineJson/PipelineJson.d.ts +2 -2
  22. package/esm/typings/src/pipeline/PipelineString.d.ts +3 -1
  23. package/esm/typings/src/pipeline/book-notation.d.ts +2 -2
  24. package/esm/typings/src/prepare/prepareTasks.d.ts +7 -4
  25. package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +2 -1
  26. package/esm/typings/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +3 -3
  27. package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -1
  28. package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -1
  29. package/esm/typings/src/scrapers/_common/Converter.d.ts +3 -1
  30. package/esm/typings/src/scrapers/_common/Scraper.d.ts +4 -3
  31. package/esm/typings/src/scrapers/_common/ScraperIntermediateSource.d.ts +4 -2
  32. package/esm/typings/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -1
  33. package/esm/typings/src/scrapers/_common/register/$provideScrapersForBrowser.d.ts +6 -3
  34. package/esm/typings/src/scrapers/_common/register/$provideScrapersForNode.d.ts +3 -5
  35. package/esm/typings/src/scrapers/_common/register/$scrapersRegister.d.ts +3 -2
  36. package/esm/typings/src/scrapers/_common/register/ScraperAndConverterMetadata.d.ts +8 -5
  37. package/esm/typings/src/scrapers/_common/register/ScraperConstructor.d.ts +2 -1
  38. package/esm/typings/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +6 -5
  39. package/esm/typings/src/scrapers/_common/utils/makeKnowledgeSourceHandler.d.ts +3 -1
  40. package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -1
  41. package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +2 -1
  42. package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +4 -1
  43. package/esm/typings/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
  44. package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +2 -1
  45. package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +3 -4
  46. package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +5 -1
  47. package/esm/typings/src/storage/file-cache-storage/FileCacheStorage.d.ts +12 -5
  48. package/esm/typings/src/storage/file-cache-storage/FileCacheStorageOptions.d.ts +4 -2
  49. package/esm/typings/src/storage/file-cache-storage/utils/nameToSubfolderPath.d.ts +2 -1
  50. package/esm/typings/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +2 -1
  51. package/esm/typings/src/types/IntermediateFilesStrategy.d.ts +2 -1
  52. package/esm/typings/src/types/ModelVariant.d.ts +5 -5
  53. package/esm/typings/src/types/typeAliases.d.ts +8 -6
  54. package/esm/typings/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +2 -2
  55. package/esm/typings/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +4 -1
  56. package/esm/typings/src/utils/editable/utils/isFlatPipeline.d.ts +2 -1
  57. package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -1
  58. package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +4 -4
  59. package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +4 -4
  60. package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +3 -3
  61. package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +3 -3
  62. package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +4 -4
  63. package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +3 -3
  64. package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +3 -3
  65. package/esm/typings/src/utils/normalization/searchKeywords.d.ts +4 -1
  66. package/esm/typings/src/utils/normalization/titleToName.d.ts +4 -4
  67. package/esm/typings/src/utils/organization/empty_object.d.ts +2 -2
  68. package/esm/typings/src/utils/organization/just_empty_object.d.ts +4 -4
  69. package/esm/typings/src/version.d.ts +2 -1
  70. package/package.json +1 -1
  71. package/umd/index.umd.js +77 -62
  72. package/umd/index.umd.js.map +1 -1
package/esm/index.es.js CHANGED
@@ -27,7 +27,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
27
27
  * @generated
28
28
  * @see https://github.com/webgptorg/promptbook
29
29
  */
30
- const PROMPTBOOK_ENGINE_VERSION = '0.92.0-24';
30
+ const PROMPTBOOK_ENGINE_VERSION = '0.92.0-26';
31
31
  /**
32
32
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
33
33
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1126,13 +1126,13 @@ const ORDER_OF_PIPELINE_JSON = [
1126
1126
  */
1127
1127
  const REPLACING_NONCE = 'ptbkauk42kV2dzao34faw7FudQUHYPtW';
1128
1128
  /**
1129
- * @@@
1129
+ * Placeholder value indicating a parameter is missing its value.
1130
1130
  *
1131
1131
  * @private within the repository
1132
1132
  */
1133
1133
  const RESERVED_PARAMETER_MISSING_VALUE = 'MISSING-' + REPLACING_NONCE;
1134
1134
  /**
1135
- * @@@
1135
+ * Placeholder value indicating a parameter is restricted and cannot be used directly.
1136
1136
  *
1137
1137
  * @private within the repository
1138
1138
  */
@@ -1885,8 +1885,8 @@ class MissingToolsError extends Error {
1885
1885
  * @public exported from `@promptbook/core`
1886
1886
  */
1887
1887
  function isPipelinePrepared(pipeline) {
1888
- // Note: Ignoring `pipeline.preparations` @@@
1889
- // Note: Ignoring `pipeline.knowledgePieces` @@@
1888
+ // Note: Ignoring `pipeline.preparations`
1889
+ // Note: Ignoring `pipeline.knowledgePieces`
1890
1890
  if (pipeline.title === undefined || pipeline.title === '' || pipeline.title === DEFAULT_BOOK_TITLE) {
1891
1891
  // TODO: !!! Comment this out
1892
1892
  console.log('Pipeline is not prepared because title is undefined or empty', pipeline);
@@ -3106,7 +3106,7 @@ function mapAvailableToExpectedParameters(options) {
3106
3106
  else if (!availableParametersNames.has(parameterName) && expectedParameterNames.has(parameterName)) ;
3107
3107
  }
3108
3108
  if (expectedParameterNames.size === 0) {
3109
- // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent @@@
3109
+ // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent accidental modifications after mapping
3110
3110
  Object.freeze(mappedParameters);
3111
3111
  return mappedParameters;
3112
3112
  }
@@ -3137,7 +3137,7 @@ function mapAvailableToExpectedParameters(options) {
3137
3137
  for (let i = 0; i < expectedParameterNames.size; i++) {
3138
3138
  mappedParameters[expectedParameterNamesArray[i]] = availableParameters[availableParametersNamesArray[i]];
3139
3139
  }
3140
- // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent @@@
3140
+ // Note: [👨‍👨‍👧] Now we can freeze `mappedParameters` to prevent accidental modifications after mapping
3141
3141
  Object.freeze(mappedParameters);
3142
3142
  return mappedParameters;
3143
3143
  }
@@ -3888,10 +3888,10 @@ for (let i = 0; i < defaultDiacriticsRemovalMap.length; i++) {
3888
3888
  */
3889
3889
 
3890
3890
  /**
3891
- * @@@
3891
+ * Removes diacritic marks (accents) from characters in a string.
3892
3892
  *
3893
- * @param input @@@
3894
- * @returns @@@
3893
+ * @param input The string containing diacritics to be normalized.
3894
+ * @returns The string with diacritics removed or normalized.
3895
3895
  * @public exported from `@promptbook/utils`
3896
3896
  */
3897
3897
  function removeDiacritics(input) {
@@ -4401,11 +4401,10 @@ async function executeFormatSubvalues(options) {
4401
4401
  const highLevelError = new PipelineExecutionError(spaceTrim((block) => `
4402
4402
  ${error.message}
4403
4403
 
4404
- This is error in FOREACH command when mapping data
4404
+ This is error in FOREACH command when mapping ${formatDefinition.formatName} ${subvalueParser.subvalueName} data (${index + 1}/${length})
4405
4405
  You have probbably passed wrong data to pipeline or wrong data was generated which are processed by FOREACH command
4406
4406
 
4407
4407
  ${block(pipelineIdentification)}
4408
- Subparameter index: ${index}
4409
4408
  `));
4410
4409
  if (length > BIG_DATASET_TRESHOLD) {
4411
4410
  console.error(highLevelError);
@@ -4433,12 +4432,11 @@ async function executeFormatSubvalues(options) {
4433
4432
  catch (error) {
4434
4433
  if (length > BIG_DATASET_TRESHOLD) {
4435
4434
  console.error(spaceTrim((block) => `
4436
- Error in FOREACH command:
4435
+ ${error.message}
4437
4436
 
4438
- ${block(pipelineIdentification)}
4437
+ This is error in FOREACH command when processing ${formatDefinition.formatName} ${subvalueParser.subvalueName} data (${index + 1}/${length})
4439
4438
 
4440
4439
  ${block(pipelineIdentification)}
4441
- Subparameter index: ${index}
4442
4440
  `));
4443
4441
  return FAILED_VALUE_PLACEHOLDER;
4444
4442
  }
@@ -5291,10 +5289,10 @@ function $getGlobalScope() {
5291
5289
  }
5292
5290
 
5293
5291
  /**
5294
- * @@@
5292
+ * Normalizes a text string to SCREAMING_CASE (all uppercase with underscores).
5295
5293
  *
5296
- * @param text @@@
5297
- * @returns @@@
5294
+ * @param text The text string to be converted to SCREAMING_CASE format.
5295
+ * @returns The normalized text in SCREAMING_CASE format.
5298
5296
  * @example 'HELLO_WORLD'
5299
5297
  * @example 'I_LOVE_PROMPTBOOK'
5300
5298
  * @public exported from `@promptbook/utils`
@@ -5346,10 +5344,10 @@ function normalizeTo_SCREAMING_CASE(text) {
5346
5344
  */
5347
5345
 
5348
5346
  /**
5349
- * @@@
5347
+ * Normalizes a text string to snake_case format.
5350
5348
  *
5351
- * @param text @@@
5352
- * @returns @@@
5349
+ * @param text The text string to be converted to snake_case format.
5350
+ * @returns The normalized text in snake_case format.
5353
5351
  * @example 'hello_world'
5354
5352
  * @example 'i_love_promptbook'
5355
5353
  * @public exported from `@promptbook/utils`
@@ -5425,10 +5423,11 @@ const $scrapersMetadataRegister = new $Register('scrapers_metadata');
5425
5423
  */
5426
5424
 
5427
5425
  /**
5428
- * @@@
5426
+ * Registry for all available scrapers in the system.
5427
+ * Central point for registering and accessing different types of content scrapers.
5429
5428
  *
5430
5429
  * Note: `$` is used to indicate that this interacts with the global scope
5431
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
5430
+ * @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
5432
5431
  * @public exported from `@promptbook/core`
5433
5432
  */
5434
5433
  const $scrapersRegister = new $Register('scraper_constructors');
@@ -5524,10 +5523,10 @@ function $registeredScrapersMessage(availableScrapers) {
5524
5523
  */
5525
5524
 
5526
5525
  /**
5527
- * @@@
5526
+ * Converts a given text to kebab-case format.
5528
5527
  *
5529
- * @param text @@@
5530
- * @returns @@@
5528
+ * @param text The text to be converted.
5529
+ * @returns The kebab-case formatted string.
5531
5530
  * @example 'hello-world'
5532
5531
  * @example 'i-love-promptbook'
5533
5532
  * @public exported from `@promptbook/utils`
@@ -5596,7 +5595,8 @@ function knowledgeSourceContentToName(knowledgeSourceContent) {
5596
5595
  */
5597
5596
 
5598
5597
  /**
5599
- * @@@
5598
+ * Converts a name to a properly formatted subfolder path for cache storage.
5599
+ * Handles normalization and path formatting to create consistent cache directory structures.
5600
5600
  *
5601
5601
  * @private for `FileCacheStorage`
5602
5602
  */
@@ -5676,11 +5676,11 @@ function removeEmojis(text) {
5676
5676
  }
5677
5677
 
5678
5678
  /**
5679
- * @@@
5679
+ * Converts a title string into a normalized name.
5680
5680
  *
5681
- * @param value @@@
5682
- * @returns @@@
5683
- * @example @@@
5681
+ * @param value The title string to be converted to a name.
5682
+ * @returns A normalized name derived from the input title.
5683
+ * @example 'Hello World!' -> 'hello-world'
5684
5684
  * @public exported from `@promptbook/utils`
5685
5685
  */
5686
5686
  function titleToName(value) {
@@ -5731,7 +5731,9 @@ const promptbookFetch = async (urlOrRequest, init) => {
5731
5731
  */
5732
5732
 
5733
5733
  /**
5734
- * @@@
5734
+ * Factory function that creates a handler for processing knowledge sources.
5735
+ * Provides standardized processing of different types of knowledge sources
5736
+ * across various scraper implementations.
5735
5737
  *
5736
5738
  * @public exported from `@promptbook/core`
5737
5739
  */
@@ -5972,9 +5974,12 @@ TODO: [🧊] This is how it can look in future
5972
5974
  */
5973
5975
 
5974
5976
  /**
5975
- * @@@
5977
+ * Prepares tasks by adding knowledge to the prompt and ensuring all necessary parameters are included.
5976
5978
  *
5977
- * @public exported from `@promptbook/core`
5979
+ * @param tasks Sequence of tasks that are chained together to form a pipeline
5980
+ * @returns A promise that resolves to the prepared tasks.
5981
+ *
5982
+ * @private internal utility of `preparePipeline`
5978
5983
  */
5979
5984
  async function prepareTasks(pipeline, tools, options) {
5980
5985
  const { maxParallelCount = DEFAULT_MAX_PARALLEL_COUNT } = options;
@@ -6880,11 +6885,11 @@ const expectCommandParser = {
6880
6885
  };
6881
6886
 
6882
6887
  /**
6883
- * @@@
6888
+ * Normalizes a given text to camelCase format.
6884
6889
  *
6885
- * @param text @@@
6886
- * @param _isFirstLetterCapital @@@
6887
- * @returns @@@
6890
+ * @param text The text to be normalized.
6891
+ * @param _isFirstLetterCapital Whether the first letter should be capitalized.
6892
+ * @returns The camelCase formatted string.
6888
6893
  * @example 'helloWorld'
6889
6894
  * @example 'iLovePromptbook'
6890
6895
  * @public exported from `@promptbook/utils`
@@ -7372,7 +7377,7 @@ const GeneratorFormfactorDefinition = {
7372
7377
  };
7373
7378
 
7374
7379
  /**
7375
- * @@@
7380
+ * Pipeline interface which is equivalent to `any`
7376
7381
  *
7377
7382
  * @see https://github.com/webgptorg/promptbook/discussions/171
7378
7383
  *
@@ -7702,8 +7707,7 @@ const jokerCommandParser = {
7702
7707
  };
7703
7708
 
7704
7709
  /**
7705
- * @@@
7706
- *
7710
+ * @see {@link ModelVariant}
7707
7711
  * @public exported from `@promptbook/core`
7708
7712
  */
7709
7713
  const MODEL_VARIANTS = ['COMPLETION', 'CHAT', 'EMBEDDING' /* <- TODO [🏳] */ /* <- [🤖] */];
@@ -8676,7 +8680,7 @@ function parseCommandVariant(input) {
8676
8680
  }
8677
8681
 
8678
8682
  /**
8679
- * @@@
8683
+ * Extracts the interface (input and output parameters) from a pipeline.
8680
8684
  *
8681
8685
  * @deprecated https://github.com/webgptorg/promptbook/pull/186
8682
8686
  * @see https://github.com/webgptorg/promptbook/discussions/171
@@ -8709,7 +8713,7 @@ function getPipelineInterface(pipeline) {
8709
8713
  }
8710
8714
 
8711
8715
  /**
8712
- * @@@
8716
+ * Checks if two pipeline interfaces are structurally identical.
8713
8717
  *
8714
8718
  * @deprecated https://github.com/webgptorg/promptbook/pull/186
8715
8719
  * @see https://github.com/webgptorg/promptbook/discussions/171
@@ -8741,10 +8745,11 @@ function isPipelineInterfacesEqual(pipelineInterface1, pipelineInterface2) {
8741
8745
  }
8742
8746
 
8743
8747
  /**
8744
- * @@@
8748
+ * Checks if a given pipeline satisfies the requirements of a specified pipeline interface.
8745
8749
  *
8746
8750
  * @deprecated https://github.com/webgptorg/promptbook/pull/186
8747
8751
  * @see https://github.com/webgptorg/promptbook/discussions/171
8752
+ * @returns `true` if the pipeline implements the interface, `false` otherwise.
8748
8753
  *
8749
8754
  * @public exported from `@promptbook/core`
8750
8755
  */
@@ -8930,7 +8935,8 @@ function removeMarkdownComments(content) {
8930
8935
  }
8931
8936
 
8932
8937
  /**
8933
- * @@@
8938
+ * Utility to determine if a pipeline string is in flat format.
8939
+ * A flat pipeline is a simple text without proper structure (headers, blocks, etc).
8934
8940
  *
8935
8941
  * @public exported from `@promptbook/editable`
8936
8942
  */
@@ -8951,7 +8957,10 @@ function isFlatPipeline(pipelineString) {
8951
8957
  }
8952
8958
 
8953
8959
  /**
8954
- * @@@
8960
+ * Converts a pipeline structure to its string representation.
8961
+ *
8962
+ * Transforms a flat, simple pipeline into a properly formatted pipeline string
8963
+ * with sections for title, prompt, and return statement.
8955
8964
  *
8956
8965
  * @public exported from `@promptbook/editable`
8957
8966
  */
@@ -9008,7 +9017,7 @@ function deflatePipeline(pipelineString) {
9008
9017
  * Note: It can not work with html syntax and comments
9009
9018
  *
9010
9019
  * @param markdown any valid markdown
9011
- * @returns @@@
9020
+ * @returns An array of strings, each representing an individual list item found in the markdown
9012
9021
  * @public exported from `@promptbook/markdown-utils`
9013
9022
  */
9014
9023
  function extractAllListItemsFromMarkdown(markdown) {
@@ -9851,7 +9860,7 @@ class CallbackInterfaceTools {
9851
9860
  }
9852
9861
 
9853
9862
  /**
9854
- * This error indicates @@@
9863
+ * This error indicates @@
9855
9864
  *
9856
9865
  * @public exported from `@promptbook/core`
9857
9866
  */
@@ -9863,7 +9872,7 @@ class BoilerplateError extends Error {
9863
9872
  }
9864
9873
  }
9865
9874
  /**
9866
- * TODO: @@@ Do not forget to add the error into `0-index.ts` ERRORS
9875
+ * TODO: @@ Do not forget to add the error into `0-index.ts` ERRORS
9867
9876
  */
9868
9877
 
9869
9878
  /**
@@ -10319,10 +10328,10 @@ function filterModels(llmTools, modelFilter) {
10319
10328
  */
10320
10329
 
10321
10330
  /**
10322
- * @@@
10331
+ * Register for LLM tools metadata.
10323
10332
  *
10324
10333
  * Note: `$` is used to indicate that this interacts with the global scope
10325
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
10334
+ * @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
10326
10335
  * @public exported from `@promptbook/core`
10327
10336
  */
10328
10337
  const $llmToolsMetadataRegister = new $Register('llm_tools_metadata');
@@ -10331,10 +10340,10 @@ const $llmToolsMetadataRegister = new $Register('llm_tools_metadata');
10331
10340
  */
10332
10341
 
10333
10342
  /**
10334
- * @@@
10343
+ * Register for LLM tools.
10335
10344
  *
10336
10345
  * Note: `$` is used to indicate that this interacts with the global scope
10337
- * @singleton Only one instance of each register is created per build, but thare can be more @@@
10346
+ * @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
10338
10347
  * @public exported from `@promptbook/core`
10339
10348
  */
10340
10349
  const $llmToolsRegister = new $Register('llm_execution_tools_constructors');
@@ -10674,7 +10683,14 @@ function cacheLlmTools(llmTools, options = {}) {
10674
10683
  console.log('!!! Cache hit for key:', key);
10675
10684
  return cacheItem.promptResult;
10676
10685
  }
10677
- console.log('!!! Cache miss for key:', key);
10686
+ console.log('!!! Cache miss for key:', key, {
10687
+ prompt,
10688
+ 'prompt.title': prompt.title,
10689
+ MAX_FILENAME_LENGTH,
10690
+ parameters,
10691
+ content,
10692
+ modelRequirements,
10693
+ });
10678
10694
  let promptResult;
10679
10695
  variant: switch (prompt.modelRequirements.modelVariant) {
10680
10696
  case 'CHAT':
@@ -10727,7 +10743,7 @@ function cacheLlmTools(llmTools, options = {}) {
10727
10743
  */
10728
10744
 
10729
10745
  /**
10730
- * @@@
10746
+ * Wraps LlmExecutionTools to limit the total usage based on provided limits.
10731
10747
  *
10732
10748
  * @public exported from `@promptbook/core`
10733
10749
  */
@@ -11225,8 +11241,8 @@ function prompt(strings, ...values) {
11225
11241
  * 2) `promptTemplate` alias for `prompt`
11226
11242
  * 3) `book` for notating and validating entire books exported from `@promptbook/utils`
11227
11243
  *
11228
- * @param strings @@@
11229
- * @param values @@@
11244
+ * @param strings The static string parts of the template literal
11245
+ * @param values The dynamic values embedded within the template literal used as data
11230
11246
  * @returns the pipeline string
11231
11247
  * @public exported from `@promptbook/core`
11232
11248
  */
@@ -11293,14 +11309,14 @@ const boilerplateScraperMetadata = $deepFreeze({
11293
11309
  packageName: '@promptbook/boilerplate',
11294
11310
  className: 'BoilerplateScraper',
11295
11311
  mimeTypes: [
11296
- '@@@/@@@',
11297
- // <- TODO: @@@ Add compatible mime types with Boilerplate scraper
11312
+ '@@/@@',
11313
+ // <- TODO: @@ Add compatible mime types with Boilerplate scraper
11298
11314
  ],
11299
- documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@@',
11315
+ documentationUrl: 'https://github.com/webgptorg/promptbook/discussions/@@',
11300
11316
  isAvilableInBrowser: false,
11301
11317
  // <- Note: [🌏] Only `MarkdownScraper` makes sense to be available in the browser, for scraping non-markdown sources in the browser use a remote server
11302
11318
  requiredExecutables: [
11303
- /* @@@ 'Pandoc' */
11319
+ /* @@ 'Pandoc' */
11304
11320
  ],
11305
11321
  }); /* <- Note: [🤛] */
11306
11322
  /**
@@ -11572,5 +11588,5 @@ class PrefixStorage {
11572
11588
  }
11573
11589
  }
11574
11590
 
11575
- export { $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, ADMIN_EMAIL, ADMIN_GITHUB_NAME, AbstractFormatError, AuthenticationError, BIG_DATASET_TRESHOLD, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateError, BoilerplateFormfactorDefinition, CLAIM, CLI_APP_ID, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CompletionFormfactorDefinition, CsvFormatError, CsvFormatParser, DEFAULT_BOOKS_DIRNAME, DEFAULT_BOOK_OUTPUT_PARAMETER_NAME, DEFAULT_BOOK_TITLE, DEFAULT_CSV_SETTINGS, DEFAULT_DOWNLOAD_CACHE_DIRNAME, DEFAULT_EXECUTION_CACHE_DIRNAME, DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME, DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_AUTO_INSTALLED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_EXECUTION_ATTEMPTS, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, DEFAULT_MAX_PARALLEL_COUNT, DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME, DEFAULT_PROMPT_TASK_TITLE, DEFAULT_REMOTE_SERVER_URL, DEFAULT_RPM, DEFAULT_SCRAPE_CACHE_DIRNAME, DEFAULT_TASK_TITLE, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, FAILED_VALUE_PLACEHOLDER, FORMFACTOR_DEFINITIONS, GENERIC_PIPELINE_INTERFACE, GeneratorFormfactorDefinition, GenericFormfactorDefinition, ImageGeneratorFormfactorDefinition, KnowledgeScrapeError, LimitReachedError, MANDATORY_CSV_SETTINGS, MAX_FILENAME_LENGTH, MODEL_ORDER, MODEL_TRUST_LEVEL, MODEL_VARIANTS, MatcherFormfactorDefinition, MemoryStorage, MissingToolsError, MultipleLlmExecutionTools, NAME, NonTaskSectionTypes, NotFoundError, NotYetImplementedError, ORDER_OF_PIPELINE_JSON, PENDING_VALUE_PLACEHOLDER, PLAYGROUND_APP_ID, PROMPTBOOK_ENGINE_VERSION, PROMPTBOOK_ERRORS, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, PromptbookFetchError, REMOTE_SERVER_URLS, RESERVED_PARAMETER_NAMES, SET_IS_VERBOSE, SectionTypes, SheetsFormfactorDefinition, TaskTypes, TextFormatParser, TranslatorFormfactorDefinition, UNCERTAIN_USAGE, UNCERTAIN_ZERO_VALUE, UnexpectedError, WrappedError, ZERO_USAGE, ZERO_VALUE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _BoilerplateScraperMetadataRegistration, _DeepseekMetadataRegistration, _DocumentScraperMetadataRegistration, _GoogleMetadataRegistration, _LegacyDocumentScraperMetadataRegistration, _MarkdownScraperMetadataRegistration, _MarkitdownScraperMetadataRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiMetadataRegistration, _PdfScraperMetadataRegistration, _WebsiteScraperMetadataRegistration, addUsage, book, cacheLlmTools, collectionToJson, compilePipeline, computeCosineSimilarity, countUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, extractParameterNamesFromTask, filterModels, getPipelineInterface, identificationToPromptbookToken, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, isValidPipelineString, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, migratePipeline, parsePipeline, pipelineJsonToString, prepareKnowledgePieces, preparePersona, preparePipeline, prepareTasks, prettifyPipelineString, promptbookFetch, promptbookTokenToIdentification, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline, validatePipelineString };
11591
+ export { $llmToolsMetadataRegister, $llmToolsRegister, $scrapersMetadataRegister, $scrapersRegister, ADMIN_EMAIL, ADMIN_GITHUB_NAME, AbstractFormatError, AuthenticationError, BIG_DATASET_TRESHOLD, BOOK_LANGUAGE_VERSION, BlackholeStorage, BoilerplateError, BoilerplateFormfactorDefinition, CLAIM, CLI_APP_ID, CallbackInterfaceTools, ChatbotFormfactorDefinition, CollectionError, CompletionFormfactorDefinition, CsvFormatError, CsvFormatParser, DEFAULT_BOOKS_DIRNAME, DEFAULT_BOOK_OUTPUT_PARAMETER_NAME, DEFAULT_BOOK_TITLE, DEFAULT_CSV_SETTINGS, DEFAULT_DOWNLOAD_CACHE_DIRNAME, DEFAULT_EXECUTION_CACHE_DIRNAME, DEFAULT_GET_PIPELINE_COLLECTION_FUNCTION_NAME, DEFAULT_INTERMEDIATE_FILES_STRATEGY, DEFAULT_IS_AUTO_INSTALLED, DEFAULT_IS_VERBOSE, DEFAULT_MAX_EXECUTION_ATTEMPTS, DEFAULT_MAX_FILE_SIZE, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH, DEFAULT_MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL, DEFAULT_MAX_PARALLEL_COUNT, DEFAULT_PIPELINE_COLLECTION_BASE_FILENAME, DEFAULT_PROMPT_TASK_TITLE, DEFAULT_REMOTE_SERVER_URL, DEFAULT_RPM, DEFAULT_SCRAPE_CACHE_DIRNAME, DEFAULT_TASK_TITLE, EXPECTATION_UNITS, EnvironmentMismatchError, ExecutionReportStringOptionsDefaults, ExpectError, FAILED_VALUE_PLACEHOLDER, FORMFACTOR_DEFINITIONS, GENERIC_PIPELINE_INTERFACE, GeneratorFormfactorDefinition, GenericFormfactorDefinition, ImageGeneratorFormfactorDefinition, KnowledgeScrapeError, LimitReachedError, MANDATORY_CSV_SETTINGS, MAX_FILENAME_LENGTH, MODEL_ORDER, MODEL_TRUST_LEVEL, MODEL_VARIANTS, MatcherFormfactorDefinition, MemoryStorage, MissingToolsError, MultipleLlmExecutionTools, NAME, NonTaskSectionTypes, NotFoundError, NotYetImplementedError, ORDER_OF_PIPELINE_JSON, PENDING_VALUE_PLACEHOLDER, PLAYGROUND_APP_ID, PROMPTBOOK_ENGINE_VERSION, PROMPTBOOK_ERRORS, ParseError, PipelineExecutionError, PipelineLogicError, PipelineUrlError, PrefixStorage, PromptbookFetchError, REMOTE_SERVER_URLS, RESERVED_PARAMETER_NAMES, SET_IS_VERBOSE, SectionTypes, SheetsFormfactorDefinition, TaskTypes, TextFormatParser, TranslatorFormfactorDefinition, UNCERTAIN_USAGE, UNCERTAIN_ZERO_VALUE, UnexpectedError, WrappedError, ZERO_USAGE, ZERO_VALUE, _AnthropicClaudeMetadataRegistration, _AzureOpenAiMetadataRegistration, _BoilerplateScraperMetadataRegistration, _DeepseekMetadataRegistration, _DocumentScraperMetadataRegistration, _GoogleMetadataRegistration, _LegacyDocumentScraperMetadataRegistration, _MarkdownScraperMetadataRegistration, _MarkitdownScraperMetadataRegistration, _OpenAiAssistantMetadataRegistration, _OpenAiMetadataRegistration, _PdfScraperMetadataRegistration, _WebsiteScraperMetadataRegistration, addUsage, book, cacheLlmTools, collectionToJson, compilePipeline, computeCosineSimilarity, countUsage, createCollectionFromJson, createCollectionFromPromise, createCollectionFromUrl, createLlmToolsFromConfiguration, createPipelineExecutor, createSubcollection, embeddingVectorToString, executionReportJsonToString, extractParameterNamesFromTask, filterModels, getPipelineInterface, identificationToPromptbookToken, isPassingExpectations, isPipelineImplementingInterface, isPipelineInterfacesEqual, isPipelinePrepared, isValidPipelineString, joinLlmExecutionTools, limitTotalUsage, makeKnowledgeSourceHandler, migratePipeline, parsePipeline, pipelineJsonToString, prepareKnowledgePieces, preparePersona, preparePipeline, prettifyPipelineString, promptbookFetch, promptbookTokenToIdentification, unpreparePipeline, usageToHuman, usageToWorktime, validatePipeline, validatePipelineString };
11576
11592
  //# sourceMappingURL=index.es.js.map