@promptbook/utils 0.62.0 → 0.63.0-1

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 (331) hide show
  1. package/esm/index.es.js +266 -68
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/typings/src/_packages/anthropic-claude.index.d.ts +3 -2
  4. package/esm/typings/src/_packages/azure-openai.index.d.ts +4 -2
  5. package/esm/typings/src/_packages/browser.index.d.ts +6 -0
  6. package/esm/typings/src/_packages/cli.index.d.ts +1 -7
  7. package/esm/typings/src/_packages/core.index.d.ts +87 -13
  8. package/esm/typings/src/_packages/execute-javascript.index.d.ts +5 -45
  9. package/esm/typings/src/_packages/fake-llm.index.d.ts +4 -5
  10. package/esm/typings/src/_packages/langtail.index.d.ts +4 -2
  11. package/esm/typings/src/_packages/markdown-utils.index.d.ts +23 -4
  12. package/esm/typings/src/_packages/node.index.d.ts +5 -2
  13. package/esm/typings/src/_packages/openai.index.d.ts +5 -2
  14. package/esm/typings/src/_packages/remote-client.index.d.ts +5 -2
  15. package/esm/typings/src/_packages/remote-server.index.d.ts +4 -2
  16. package/esm/typings/src/_packages/types.index.d.ts +441 -21
  17. package/esm/typings/src/_packages/utils.index.d.ts +84 -31
  18. package/esm/typings/src/cli/main.d.ts +12 -0
  19. package/esm/typings/src/collection/collectionToJson.d.ts +2 -0
  20. package/esm/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -0
  21. package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +1 -0
  22. package/esm/typings/src/collection/constructors/createCollectionFromPromise.d.ts +1 -0
  23. package/esm/typings/src/collection/constructors/createCollectionFromUrl.d.ts +1 -1
  24. package/esm/typings/src/collection/constructors/createSubcollection.d.ts +1 -0
  25. package/esm/typings/src/commands/BLOCK/BlockTypes.d.ts +2 -0
  26. package/esm/typings/src/config.d.ts +27 -1
  27. package/esm/typings/src/conversion/pipelineJsonToString.d.ts +1 -0
  28. package/esm/typings/src/conversion/pipelineStringToJson.d.ts +6 -3
  29. package/esm/typings/src/conversion/pipelineStringToJsonSync.d.ts +4 -3
  30. package/esm/typings/src/conversion/prettify/prettifyPipelineString.d.ts +2 -0
  31. package/esm/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +2 -0
  32. package/esm/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.d.ts +1 -0
  33. package/esm/typings/src/conversion/utils/extractVariables.d.ts +1 -0
  34. package/esm/typings/src/conversion/utils/renameParameter.d.ts +1 -0
  35. package/esm/typings/src/conversion/utils/stringifyPipelineJson.d.ts +2 -0
  36. package/esm/typings/src/conversion/utils/titleToName.d.ts +6 -1
  37. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +1 -0
  38. package/esm/typings/src/errors/CollectionError.d.ts +2 -0
  39. package/esm/typings/src/errors/EnvironmentMismatchError.d.ts +2 -0
  40. package/esm/typings/src/errors/LimitReachedError.d.ts +2 -0
  41. package/esm/typings/src/errors/NotFoundError.d.ts +2 -0
  42. package/esm/typings/src/errors/NotYetImplementedError.d.ts +2 -0
  43. package/esm/typings/src/errors/ParsingError.d.ts +2 -0
  44. package/esm/typings/src/errors/PipelineExecutionError.d.ts +2 -0
  45. package/esm/typings/src/errors/PipelineLogicError.d.ts +2 -0
  46. package/esm/typings/src/errors/ReferenceError.d.ts +2 -0
  47. package/esm/typings/src/errors/UnexpectedError.d.ts +2 -0
  48. package/esm/typings/src/errors/VersionMismatchError.d.ts +2 -0
  49. package/esm/typings/src/execution/assertsExecutionSuccessful.d.ts +1 -0
  50. package/esm/typings/src/execution/createPipelineExecutor.d.ts +1 -0
  51. package/esm/typings/src/execution/embeddingVectorToString.d.ts +2 -0
  52. package/esm/typings/src/execution/utils/addUsage.d.ts +3 -1
  53. package/esm/typings/src/execution/utils/checkExpectations.d.ts +2 -0
  54. package/esm/typings/src/execution/utils/forEachAsync.d.ts +1 -0
  55. package/esm/typings/src/execution/utils/usageToHuman.d.ts +2 -0
  56. package/esm/typings/src/execution/utils/usageToWorktime.d.ts +2 -0
  57. package/esm/typings/src/formats/_common/FormatDefinition.d.ts +2 -1
  58. package/esm/typings/src/formats/json/utils/isValidJsonString.d.ts +2 -0
  59. package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +2 -0
  60. package/esm/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +2 -0
  61. package/esm/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -1
  62. package/esm/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +10 -0
  63. package/esm/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +1 -1
  64. package/esm/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +2 -0
  65. package/esm/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +4 -1
  66. package/esm/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -1
  67. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/countTotalUsage.d.ts +1 -1
  68. package/esm/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +2 -1
  69. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -0
  70. package/esm/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +2 -1
  71. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +2 -0
  72. package/esm/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
  73. package/esm/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +2 -0
  74. package/esm/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +2 -0
  75. package/esm/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -0
  76. package/esm/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +2 -0
  77. package/esm/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +2 -0
  78. package/esm/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +2 -0
  79. package/esm/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +2 -0
  80. package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -0
  81. package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -0
  82. package/esm/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -0
  83. package/esm/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +7 -1
  84. package/esm/typings/src/llm-providers/remote/startRemoteServer.d.ts +1 -0
  85. package/esm/typings/src/personas/preparePersona.d.ts +1 -1
  86. package/esm/typings/src/postprocessing/utils/extractBlock.d.ts +5 -0
  87. package/esm/typings/src/prepare/isPipelinePrepared.d.ts +2 -1
  88. package/esm/typings/src/prepare/preparePipeline.d.ts +1 -1
  89. package/esm/typings/src/prepare/prepareTemplates.d.ts +2 -1
  90. package/esm/typings/src/prepare/unpreparePipeline.d.ts +2 -1
  91. package/esm/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +2 -0
  92. package/esm/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
  93. package/esm/typings/src/scripting/javascript/postprocessing-functions.d.ts +51 -0
  94. package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +0 -1
  95. package/esm/typings/src/storage/files-storage/FilesStorage.d.ts +2 -1
  96. package/esm/typings/src/storage/files-storage/FilesStorageOptions.d.ts +0 -3
  97. package/esm/typings/src/storage/local-storage/getLocalStorage.d.ts +2 -1
  98. package/esm/typings/src/storage/local-storage/getSessionStorage.d.ts +2 -1
  99. package/esm/typings/src/storage/memory/MemoryStorage.d.ts +2 -3
  100. package/esm/typings/src/storage/utils/PrefixStorage.d.ts +2 -3
  101. package/esm/typings/src/types/ModelRequirements.d.ts +0 -1
  102. package/esm/typings/src/types/Prompt.d.ts +0 -1
  103. package/esm/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +4 -0
  104. package/esm/typings/src/types/execution-report/executionReportJsonToString.d.ts +2 -0
  105. package/esm/typings/src/types/typeAliases.d.ts +9 -2
  106. package/esm/typings/src/utils/currentDate.d.ts +1 -0
  107. package/esm/typings/src/utils/deepClone.d.ts +2 -1
  108. package/esm/typings/src/utils/deepFreeze.d.ts +1 -1
  109. package/esm/typings/src/utils/expectation-counters/countCharacters.d.ts +2 -0
  110. package/esm/typings/src/utils/expectation-counters/countLines.d.ts +2 -0
  111. package/esm/typings/src/utils/expectation-counters/countPages.d.ts +2 -0
  112. package/esm/typings/src/utils/expectation-counters/countParagraphs.d.ts +2 -0
  113. package/esm/typings/src/utils/expectation-counters/countSentences.d.ts +4 -0
  114. package/esm/typings/src/utils/expectation-counters/countWords.d.ts +2 -0
  115. package/esm/typings/src/utils/expectation-counters/index.d.ts +2 -0
  116. package/esm/typings/src/utils/extractParameterNames.d.ts +1 -0
  117. package/esm/typings/src/utils/isRunningInWhatever.d.ts +6 -3
  118. package/esm/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +4 -1
  119. package/esm/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
  120. package/esm/typings/src/utils/markdown/createMarkdownTable.d.ts +4 -1
  121. package/esm/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +5 -0
  122. package/esm/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
  123. package/esm/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
  124. package/esm/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -0
  125. package/esm/typings/src/utils/markdown/flattenMarkdown.d.ts +3 -0
  126. package/esm/typings/src/utils/markdown/parseMarkdownSection.d.ts +4 -0
  127. package/esm/typings/src/utils/markdown/removeContentComments.d.ts +1 -0
  128. package/esm/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
  129. package/esm/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +3 -0
  130. package/esm/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +2 -0
  131. package/esm/typings/src/utils/normalization/IKeywords.d.ts +3 -0
  132. package/esm/typings/src/utils/normalization/capitalize.d.ts +1 -0
  133. package/esm/typings/src/utils/normalization/decapitalize.d.ts +1 -0
  134. package/esm/typings/src/utils/normalization/isValidKeyword.d.ts +2 -0
  135. package/esm/typings/src/utils/normalization/nameToUriPart.d.ts +8 -0
  136. package/esm/typings/src/utils/normalization/nameToUriParts.d.ts +8 -0
  137. package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +10 -0
  138. package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +9 -0
  139. package/esm/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +10 -0
  140. package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +11 -0
  141. package/esm/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +9 -0
  142. package/esm/typings/src/utils/normalization/parseKeywords.d.ts +1 -0
  143. package/esm/typings/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
  144. package/esm/typings/src/utils/normalization/removeDiacritics.d.ts +7 -0
  145. package/esm/typings/src/utils/normalization/searchKeywords.d.ts +5 -0
  146. package/esm/typings/src/utils/parseNumber.d.ts +2 -1
  147. package/esm/typings/src/utils/random/randomSeed.d.ts +1 -0
  148. package/esm/typings/src/utils/removeEmojis.d.ts +1 -0
  149. package/esm/typings/src/utils/removeQuotes.d.ts +1 -0
  150. package/esm/typings/src/utils/replaceParameters.d.ts +1 -0
  151. package/esm/typings/src/utils/sets/difference.d.ts +1 -0
  152. package/esm/typings/src/utils/sets/intersection.d.ts +1 -0
  153. package/esm/typings/src/utils/sets/union.d.ts +1 -0
  154. package/esm/typings/src/utils/trimCodeBlock.d.ts +1 -0
  155. package/esm/typings/src/utils/trimEndOfCodeBlock.d.ts +2 -0
  156. package/esm/typings/src/utils/unwrapResult.d.ts +1 -0
  157. package/esm/typings/src/utils/validators/filePath/isValidFilePath.d.ts +1 -0
  158. package/esm/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +7 -0
  159. package/esm/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -0
  160. package/esm/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +2 -0
  161. package/esm/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +2 -0
  162. package/esm/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
  163. package/esm/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +2 -0
  164. package/esm/typings/src/utils/validators/url/isValidUrl.d.ts +2 -0
  165. package/esm/typings/src/utils/validators/uuid/isValidUuid.d.ts +2 -0
  166. package/package.json +1 -1
  167. package/umd/index.umd.js +270 -72
  168. package/umd/index.umd.js.map +1 -1
  169. package/umd/typings/src/_packages/anthropic-claude.index.d.ts +3 -2
  170. package/umd/typings/src/_packages/azure-openai.index.d.ts +4 -2
  171. package/umd/typings/src/_packages/browser.index.d.ts +6 -0
  172. package/umd/typings/src/_packages/cli.index.d.ts +1 -7
  173. package/umd/typings/src/_packages/core.index.d.ts +87 -13
  174. package/umd/typings/src/_packages/execute-javascript.index.d.ts +5 -45
  175. package/umd/typings/src/_packages/fake-llm.index.d.ts +4 -5
  176. package/umd/typings/src/_packages/langtail.index.d.ts +4 -2
  177. package/umd/typings/src/_packages/markdown-utils.index.d.ts +23 -4
  178. package/umd/typings/src/_packages/node.index.d.ts +5 -2
  179. package/umd/typings/src/_packages/openai.index.d.ts +5 -2
  180. package/umd/typings/src/_packages/remote-client.index.d.ts +5 -2
  181. package/umd/typings/src/_packages/remote-server.index.d.ts +4 -2
  182. package/umd/typings/src/_packages/types.index.d.ts +441 -21
  183. package/umd/typings/src/_packages/utils.index.d.ts +84 -31
  184. package/umd/typings/src/cli/main.d.ts +12 -0
  185. package/umd/typings/src/collection/collectionToJson.d.ts +2 -0
  186. package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -0
  187. package/umd/typings/src/collection/constructors/createCollectionFromJson.d.ts +1 -0
  188. package/umd/typings/src/collection/constructors/createCollectionFromPromise.d.ts +1 -0
  189. package/umd/typings/src/collection/constructors/createCollectionFromUrl.d.ts +1 -1
  190. package/umd/typings/src/collection/constructors/createSubcollection.d.ts +1 -0
  191. package/umd/typings/src/commands/BLOCK/BlockTypes.d.ts +2 -0
  192. package/umd/typings/src/config.d.ts +27 -1
  193. package/umd/typings/src/conversion/pipelineJsonToString.d.ts +1 -0
  194. package/umd/typings/src/conversion/pipelineStringToJson.d.ts +6 -3
  195. package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +4 -3
  196. package/umd/typings/src/conversion/prettify/prettifyPipelineString.d.ts +2 -0
  197. package/umd/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +2 -0
  198. package/umd/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.d.ts +1 -0
  199. package/umd/typings/src/conversion/utils/extractVariables.d.ts +1 -0
  200. package/umd/typings/src/conversion/utils/renameParameter.d.ts +1 -0
  201. package/umd/typings/src/conversion/utils/stringifyPipelineJson.d.ts +2 -0
  202. package/umd/typings/src/conversion/utils/titleToName.d.ts +6 -1
  203. package/umd/typings/src/conversion/validation/validatePipeline.d.ts +1 -0
  204. package/umd/typings/src/errors/CollectionError.d.ts +2 -0
  205. package/umd/typings/src/errors/EnvironmentMismatchError.d.ts +2 -0
  206. package/umd/typings/src/errors/LimitReachedError.d.ts +2 -0
  207. package/umd/typings/src/errors/NotFoundError.d.ts +2 -0
  208. package/umd/typings/src/errors/NotYetImplementedError.d.ts +2 -0
  209. package/umd/typings/src/errors/ParsingError.d.ts +2 -0
  210. package/umd/typings/src/errors/PipelineExecutionError.d.ts +2 -0
  211. package/umd/typings/src/errors/PipelineLogicError.d.ts +2 -0
  212. package/umd/typings/src/errors/ReferenceError.d.ts +2 -0
  213. package/umd/typings/src/errors/UnexpectedError.d.ts +2 -0
  214. package/umd/typings/src/errors/VersionMismatchError.d.ts +2 -0
  215. package/umd/typings/src/execution/assertsExecutionSuccessful.d.ts +1 -0
  216. package/umd/typings/src/execution/createPipelineExecutor.d.ts +1 -0
  217. package/umd/typings/src/execution/embeddingVectorToString.d.ts +2 -0
  218. package/umd/typings/src/execution/utils/addUsage.d.ts +3 -1
  219. package/umd/typings/src/execution/utils/checkExpectations.d.ts +2 -0
  220. package/umd/typings/src/execution/utils/forEachAsync.d.ts +1 -0
  221. package/umd/typings/src/execution/utils/usageToHuman.d.ts +2 -0
  222. package/umd/typings/src/execution/utils/usageToWorktime.d.ts +2 -0
  223. package/umd/typings/src/formats/_common/FormatDefinition.d.ts +2 -1
  224. package/umd/typings/src/formats/json/utils/isValidJsonString.d.ts +2 -0
  225. package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +2 -0
  226. package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +2 -0
  227. package/umd/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -1
  228. package/umd/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +10 -0
  229. package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +1 -1
  230. package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +2 -0
  231. package/umd/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +4 -1
  232. package/umd/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -1
  233. package/umd/typings/src/llm-providers/_common/utils/count-total-usage/countTotalUsage.d.ts +1 -1
  234. package/umd/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +2 -1
  235. package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -0
  236. package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +2 -1
  237. package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +2 -0
  238. package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
  239. package/umd/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +2 -0
  240. package/umd/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +2 -0
  241. package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -0
  242. package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +2 -0
  243. package/umd/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +2 -0
  244. package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +2 -0
  245. package/umd/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +2 -0
  246. package/umd/typings/src/llm-providers/openai/openai-models.d.ts +1 -0
  247. package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -0
  248. package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -0
  249. package/umd/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +7 -1
  250. package/umd/typings/src/llm-providers/remote/startRemoteServer.d.ts +1 -0
  251. package/umd/typings/src/personas/preparePersona.d.ts +1 -1
  252. package/umd/typings/src/postprocessing/utils/extractBlock.d.ts +5 -0
  253. package/umd/typings/src/prepare/isPipelinePrepared.d.ts +2 -1
  254. package/umd/typings/src/prepare/preparePipeline.d.ts +1 -1
  255. package/umd/typings/src/prepare/prepareTemplates.d.ts +2 -1
  256. package/umd/typings/src/prepare/unpreparePipeline.d.ts +2 -1
  257. package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +2 -0
  258. package/umd/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
  259. package/umd/typings/src/scripting/javascript/postprocessing-functions.d.ts +51 -0
  260. package/umd/typings/src/storage/_common/PromptbookStorage.d.ts +0 -1
  261. package/umd/typings/src/storage/files-storage/FilesStorage.d.ts +2 -1
  262. package/umd/typings/src/storage/files-storage/FilesStorageOptions.d.ts +0 -3
  263. package/umd/typings/src/storage/local-storage/getLocalStorage.d.ts +2 -1
  264. package/umd/typings/src/storage/local-storage/getSessionStorage.d.ts +2 -1
  265. package/umd/typings/src/storage/memory/MemoryStorage.d.ts +2 -3
  266. package/umd/typings/src/storage/utils/PrefixStorage.d.ts +2 -3
  267. package/umd/typings/src/types/ModelRequirements.d.ts +0 -1
  268. package/umd/typings/src/types/Prompt.d.ts +0 -1
  269. package/umd/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +4 -0
  270. package/umd/typings/src/types/execution-report/executionReportJsonToString.d.ts +2 -0
  271. package/umd/typings/src/types/typeAliases.d.ts +9 -2
  272. package/umd/typings/src/utils/currentDate.d.ts +1 -0
  273. package/umd/typings/src/utils/deepClone.d.ts +2 -1
  274. package/umd/typings/src/utils/deepFreeze.d.ts +1 -1
  275. package/umd/typings/src/utils/expectation-counters/countCharacters.d.ts +2 -0
  276. package/umd/typings/src/utils/expectation-counters/countLines.d.ts +2 -0
  277. package/umd/typings/src/utils/expectation-counters/countPages.d.ts +2 -0
  278. package/umd/typings/src/utils/expectation-counters/countParagraphs.d.ts +2 -0
  279. package/umd/typings/src/utils/expectation-counters/countSentences.d.ts +4 -0
  280. package/umd/typings/src/utils/expectation-counters/countWords.d.ts +2 -0
  281. package/umd/typings/src/utils/expectation-counters/index.d.ts +2 -0
  282. package/umd/typings/src/utils/extractParameterNames.d.ts +1 -0
  283. package/umd/typings/src/utils/isRunningInWhatever.d.ts +6 -3
  284. package/umd/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +4 -1
  285. package/umd/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
  286. package/umd/typings/src/utils/markdown/createMarkdownTable.d.ts +4 -1
  287. package/umd/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +5 -0
  288. package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
  289. package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
  290. package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -0
  291. package/umd/typings/src/utils/markdown/flattenMarkdown.d.ts +3 -0
  292. package/umd/typings/src/utils/markdown/parseMarkdownSection.d.ts +4 -0
  293. package/umd/typings/src/utils/markdown/removeContentComments.d.ts +1 -0
  294. package/umd/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
  295. package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +3 -0
  296. package/umd/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +2 -0
  297. package/umd/typings/src/utils/normalization/IKeywords.d.ts +3 -0
  298. package/umd/typings/src/utils/normalization/capitalize.d.ts +1 -0
  299. package/umd/typings/src/utils/normalization/decapitalize.d.ts +1 -0
  300. package/umd/typings/src/utils/normalization/isValidKeyword.d.ts +2 -0
  301. package/umd/typings/src/utils/normalization/nameToUriPart.d.ts +8 -0
  302. package/umd/typings/src/utils/normalization/nameToUriParts.d.ts +8 -0
  303. package/umd/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +10 -0
  304. package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +9 -0
  305. package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +10 -0
  306. package/umd/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +11 -0
  307. package/umd/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +9 -0
  308. package/umd/typings/src/utils/normalization/parseKeywords.d.ts +1 -0
  309. package/umd/typings/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
  310. package/umd/typings/src/utils/normalization/removeDiacritics.d.ts +7 -0
  311. package/umd/typings/src/utils/normalization/searchKeywords.d.ts +5 -0
  312. package/umd/typings/src/utils/parseNumber.d.ts +2 -1
  313. package/umd/typings/src/utils/random/randomSeed.d.ts +1 -0
  314. package/umd/typings/src/utils/removeEmojis.d.ts +1 -0
  315. package/umd/typings/src/utils/removeQuotes.d.ts +1 -0
  316. package/umd/typings/src/utils/replaceParameters.d.ts +1 -0
  317. package/umd/typings/src/utils/sets/difference.d.ts +1 -0
  318. package/umd/typings/src/utils/sets/intersection.d.ts +1 -0
  319. package/umd/typings/src/utils/sets/union.d.ts +1 -0
  320. package/umd/typings/src/utils/trimCodeBlock.d.ts +1 -0
  321. package/umd/typings/src/utils/trimEndOfCodeBlock.d.ts +2 -0
  322. package/umd/typings/src/utils/unwrapResult.d.ts +1 -0
  323. package/umd/typings/src/utils/validators/filePath/isValidFilePath.d.ts +1 -0
  324. package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +7 -0
  325. package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -0
  326. package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +2 -0
  327. package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +2 -0
  328. package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
  329. package/umd/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +2 -0
  330. package/umd/typings/src/utils/validators/url/isValidUrl.d.ts +2 -0
  331. package/umd/typings/src/utils/validators/uuid/isValidUuid.d.ts +2 -0
@@ -1,6 +1,8 @@
1
1
  import type { number_percent } from '../typeAliases';
2
2
  /**
3
3
  * Options for `executionReportJsonToString`
4
+ *
5
+ * @public exported from `@promptbook/core`
4
6
  */
5
7
  export type ExecutionReportStringOptions = {
6
8
  /**
@@ -14,6 +16,8 @@ export type ExecutionReportStringOptions = {
14
16
  };
15
17
  /**
16
18
  * Default options for generating an execution report string
19
+ *
20
+ * @public exported from `@promptbook/core`
17
21
  */
18
22
  export declare const ExecutionReportStringOptionsDefaults: {
19
23
  taxRate: number;
@@ -3,6 +3,8 @@ import type { ExecutionReportString } from './ExecutionReportString';
3
3
  import type { ExecutionReportStringOptions } from './ExecutionReportStringOptions';
4
4
  /**
5
5
  * Converts execution report from JSON to string format
6
+ *
7
+ * @public exported from `@promptbook/core`
6
8
  */
7
9
  export declare function executionReportJsonToString(executionReportJson: ExecutionReportJson, options?: Partial<ExecutionReportStringOptions>): ExecutionReportString;
8
10
  /**
@@ -172,12 +172,16 @@ export type string_xml = string;
172
172
  * Semantic helper
173
173
  *
174
174
  * For example `"**Hello** World!"`
175
+ *
176
+ * @public exported from `@promptbook/markdown-utils`
175
177
  */
176
178
  export type string_markdown = string;
177
179
  /**
178
180
  * Semantic helper
179
181
  *
180
182
  * Markdown text with exactly ONE heading on first line NO less NO more
183
+ *
184
+ * @public exported from `@promptbook/markdown-utils`
181
185
  */
182
186
  export type string_markdown_section = string;
183
187
  /**
@@ -185,6 +189,8 @@ export type string_markdown_section = string;
185
189
  *
186
190
  * Markdown without any headings like h1, h2
187
191
  * BUT with formatting, lists, blockquotes, blocks, etc. is allowed
192
+ *
193
+ * @public exported from `@promptbook/markdown-utils`
188
194
  */
189
195
  export type string_markdown_section_content = string;
190
196
  /**
@@ -194,6 +200,8 @@ export type string_markdown_section_content = string;
194
200
  * BUT with bold, italic, etc. is allowed
195
201
  *
196
202
  * For example `"**Hello** World!"`
203
+ *
204
+ * @public exported from `@promptbook/markdown-utils`
197
205
  */
198
206
  export type string_markdown_text = string;
199
207
  /**
@@ -573,7 +581,6 @@ export type number_gigabytes = number_positive;
573
581
  export type number_terabytes = number_positive;
574
582
  /**.
575
583
  * TODO: !!! Change "For example" to @example
576
- * TODO: !! Cleanup
577
584
  * TODO: !! Change to branded types
578
- * TODO: [📂] Export all this file through `@promptbook/types`
585
+ * TODO: Delete type aliases that are not exported or used internally
579
586
  */
@@ -3,5 +3,6 @@ import type { string_date_iso8601 } from '../types/typeAliases';
3
3
  * Simple wrapper `new Date().toISOString()`
4
4
  *
5
5
  * @returns string_date branded type
6
+ * @public exported from `@promptbook/utils`
6
7
  */
7
8
  export declare function $currentDate(): string_date_iso8601;
@@ -1,9 +1,10 @@
1
1
  import type { WritableDeep } from 'type-fest';
2
2
  /**
3
3
  * @@@
4
+ *
5
+ * @public exported from `@promptbook/utils`
4
6
  */
5
7
  export declare function deepClone<TObject>(objectValue: TObject): WritableDeep<TObject>;
6
8
  /**
7
- * TODO: [🔼] Export from `@promptbook/utils`
8
9
  * TODO: [🧠] Is there a way how to meaningfully test this utility
9
10
  */
@@ -12,11 +12,11 @@ export declare function deepFreeze<TObject>(objectValue: TObject): ReadonlyDeep<
12
12
  * @@@
13
13
  *
14
14
  * @returns The same object as the input, but deeply frozen
15
+ * @public exported from `@promptbook/utils`
15
16
  *
16
17
  * Note: This function mutates the object and returns the original (but mutated-deep-freezed) object
17
18
  */
18
19
  export declare function deepFreezeWithSameType<TObject>(objectValue: TObject): TObject;
19
20
  /**
20
- * TODO: [🔼] Export from `@promptbook/utils`
21
21
  * TODO: [🧠] Is there a way how to meaningfully test this utility
22
22
  */
@@ -1,5 +1,7 @@
1
1
  import type { ExpectationAmount } from '../../types/PipelineJson/Expectations';
2
2
  /**
3
3
  * Counts number of characters in the text
4
+ *
5
+ * @public exported from `@promptbook/utils`
4
6
  */
5
7
  export declare function countCharacters(text: string): ExpectationAmount;
@@ -1,5 +1,7 @@
1
1
  import type { ExpectationAmount } from '../../types/PipelineJson/Expectations';
2
2
  /**
3
3
  * Counts number of lines in the text
4
+ *
5
+ * @public exported from `@promptbook/utils`
4
6
  */
5
7
  export declare function countLines(text: string): ExpectationAmount;
@@ -1,5 +1,7 @@
1
1
  import type { ExpectationAmount } from '../../types/PipelineJson/Expectations';
2
2
  /**
3
3
  * Counts number of pages in the text
4
+ *
5
+ * @public exported from `@promptbook/utils`
4
6
  */
5
7
  export declare function countPages(text: string): ExpectationAmount;
@@ -1,5 +1,7 @@
1
1
  import type { ExpectationAmount } from '../../types/PipelineJson/Expectations';
2
2
  /**
3
3
  * Counts number of paragraphs in the text
4
+ *
5
+ * @public exported from `@promptbook/utils`
4
6
  */
5
7
  export declare function countParagraphs(text: string): ExpectationAmount;
@@ -1,9 +1,13 @@
1
1
  import type { ExpectationAmount } from '../../types/PipelineJson/Expectations';
2
2
  /**
3
3
  * Split text into sentences
4
+ *
5
+ * @public exported from `@promptbook/utils`
4
6
  */
5
7
  export declare function splitIntoSentences(text: string): Array<string>;
6
8
  /**
7
9
  * Counts number of sentences in the text
10
+ *
11
+ * @public exported from `@promptbook/utils`
8
12
  */
9
13
  export declare function countSentences(text: string): ExpectationAmount;
@@ -1,5 +1,7 @@
1
1
  import type { ExpectationAmount } from '../../types/PipelineJson/Expectations';
2
2
  /**
3
3
  * Counts number of words in the text
4
+ *
5
+ * @public exported from `@promptbook/utils`
4
6
  */
5
7
  export declare function countWords(text: string): ExpectationAmount;
@@ -2,5 +2,7 @@ import type { ExpectationAmount } from '../../types/PipelineJson/Expectations';
2
2
  import type { ExpectationUnit } from '../../types/PipelineJson/Expectations';
3
3
  /**
4
4
  * Index of all counter functions
5
+ *
6
+ * @public exported from `@promptbook/utils`
5
7
  */
6
8
  export declare const CountUtils: Record<ExpectationUnit, (text: string) => ExpectationAmount>;
@@ -5,5 +5,6 @@ import type { string_template } from '../types/typeAliases';
5
5
  *
6
6
  * @param template the template with parameters in {curly} braces
7
7
  * @returns the list of parameter names
8
+ * @public exported from `@promptbook/utils`
8
9
  */
9
10
  export declare function extractParameterNames(template: string_template): Set<string_parameter_name>;
@@ -1,15 +1,18 @@
1
1
  /**
2
2
  * Detects if the code is running in a browser environment in main thread (Not in a web worker)
3
+ *
4
+ * @public exported from `@promptbook/utils`
3
5
  */
4
6
  export declare const isRunningInBrowser: Function;
5
7
  /**
6
8
  * Detects if the code is running in a Node.js environment
9
+ *
10
+ * @public exported from `@promptbook/utils`
7
11
  */
8
12
  export declare const isRunningInNode: Function;
9
13
  /**
10
14
  * Detects if the code is running in a web worker
15
+ *
16
+ * @public exported from `@promptbook/utils`
11
17
  */
12
18
  export declare const isRunningInWebWorker: Function;
13
- /**
14
- * TODO: [🔼] !!! Export via `@promptbook/utils`
15
- */
@@ -3,9 +3,12 @@ import type { string_name } from '../../types/typeAliases';
3
3
  /**
4
4
  * Add or modify an auto-generated section in a markdown file
5
5
  *
6
- * @private within the repository
6
+ * @public exported from `@promptbook/markdown-utils`
7
7
  */
8
8
  export declare function addAutoGeneratedSection(content: string_markdown, options: {
9
9
  readonly sectionName: string_name;
10
10
  readonly sectionContent: string_markdown;
11
11
  }): string_markdown;
12
+ /**
13
+ * TODO: [🏛] This can be part of markdown builder
14
+ */
@@ -28,7 +28,7 @@ type CreateMarkdownChartOptions = {
28
28
  /**
29
29
  * Function createMarkdownChart will draw a chart in markdown from ⬛+🟦 tiles
30
30
  *
31
- * @private within the repository
31
+ * @public exported from `@promptbook/markdown-utils`
32
32
  */
33
33
  export declare function createMarkdownChart(options: CreateMarkdownChartOptions): string_markdown;
34
34
  export {};
@@ -3,6 +3,9 @@ import type { string_markdown_text } from '../../types/typeAliases';
3
3
  /**
4
4
  * Create a markdown table from a 2D array of strings
5
5
  *
6
- * @private within the repository
6
+ * @public exported from `@promptbook/markdown-utils`
7
7
  */
8
8
  export declare function createMarkdownTable(table: Array<Array<string_markdown_text>>): string_markdown;
9
+ /**
10
+ * TODO: [🏛] This can be part of markdown builder
11
+ */
@@ -2,5 +2,10 @@ import type { string_markdown_text } from '../../types/typeAliases';
2
2
  /**
3
3
  * Function escapeMarkdownBlock will escape markdown block if needed
4
4
  * It is useful when you want have block in block
5
+ *
6
+ * @public exported from `@promptbook/markdown-utils`
5
7
  */
6
8
  export declare function escapeMarkdownBlock(value: string_markdown_text): string_markdown_text;
9
+ /**
10
+ * TODO: [🏛] This can be part of markdown builder
11
+ */
@@ -26,7 +26,7 @@ export type CodeBlock = {
26
26
  *
27
27
  * @param markdown any valid markdown
28
28
  * @returns code blocks with language and content
29
- *
29
+ * @public exported from `@promptbook/markdown-utils`
30
30
  */
31
31
  export declare function extractAllBlocksFromMarkdown(markdown: string_markdown): Array<CodeBlock>;
32
32
  /**
@@ -9,6 +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 @@@
13
+ * @public exported from `@promptbook/markdown-utils`
13
14
  */
14
15
  export declare function extractAllListItemsFromMarkdown(markdown: string_markdown): string_markdown_text[];
@@ -12,6 +12,7 @@ import type { CodeBlock } from './extractAllBlocksFromMarkdown';
12
12
  *
13
13
  * @param markdown any valid markdown
14
14
  * @returns code block with language and content
15
+ * @public exported from `@promptbook/markdown-utils`
15
16
  */
16
17
  export declare function extractOneBlockFromMarkdown(markdown: string_markdown): CodeBlock;
17
18
  /***
@@ -4,9 +4,12 @@ import type { string_markdown } from '../../types/typeAliases';
4
4
  *
5
5
  * - It always have h1 - if there is no h1 in the markdown, it will be added "# Untitled"
6
6
  * - All other headings are normalized to h2
7
+ *
8
+ * @public exported from `@promptbook/markdown-utils`
7
9
  */
8
10
  export declare function flattenMarkdown<TContent extends string_markdown>(markdown: TContent): TContent;
9
11
  /**
12
+ * TODO: [🏛] This can be part of markdown builder
10
13
  * Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more
11
14
  * sophisticated implementation of this function through parsing markdown into JSON structure
12
15
  * and flattening the actual structure
@@ -3,6 +3,8 @@ import type { string_markdown_section_content } from '../../types/typeAliases';
3
3
  import type { string_markdown_text } from '../../types/typeAliases';
4
4
  /**
5
5
  * Parsed markdown section
6
+ *
7
+ * @public exported from `@promptbook/markdown-utils`
6
8
  */
7
9
  export type MarkdownSection = {
8
10
  /**
@@ -20,6 +22,8 @@ export type MarkdownSection = {
20
22
  };
21
23
  /**
22
24
  * Parses markdown section to title its level and content
25
+ *
26
+ * @public exported from `@promptbook/markdown-utils`
23
27
  */
24
28
  export declare function parseMarkdownSection(value: string_markdown_section): MarkdownSection;
25
29
  /**
@@ -5,5 +5,6 @@ import type { string_markdown } from '../../types/typeAliases';
5
5
  *
6
6
  * @param {string} content - The string to remove comments from.
7
7
  * @returns {string} The input string with all comments removed.
8
+ * @public exported from `@promptbook/markdown-utils`
8
9
  */
9
10
  export declare function removeContentComments<TContent extends string_html | string_markdown>(content: TContent): TContent;
@@ -4,5 +4,6 @@ import type { string_markdown_text } from '../../types/typeAliases';
4
4
  *
5
5
  * @param {string} str - The string to remove Markdown tags from.
6
6
  * @returns {string} The input string with all Markdown tags removed.
7
+ * @public exported from `@promptbook/markdown-utils`
7
8
  */
8
9
  export declare function removeMarkdownFormatting(str: string_markdown_text): string;
@@ -2,9 +2,12 @@ import type { string_markdown } from '../../types/typeAliases';
2
2
  import type { string_markdown_section } from '../../types/typeAliases';
3
3
  /**
4
4
  * Splits the markdown into sections by headings
5
+ *
6
+ * @public exported from `@promptbook/markdown-utils`
5
7
  */
6
8
  export declare function splitMarkdownIntoSections(markdown: string_markdown): Array<string_markdown_section>;
7
9
  /**
10
+ * TODO: [🏛] This can be part of markdown builder
8
11
  * Note: [🕞] In past (commit 42086e1603cbed506482997c00a8ee979af0a247) there was much more
9
12
  * sophisticated implementation of this function through parsing markdown into JSON structure
10
13
  * and flattening the actual structure
@@ -6,5 +6,7 @@
6
6
  * > "ě" => "e"
7
7
  * > "Ă" => "A"
8
8
  * > ...
9
+ *
10
+ * @public exported from `@promptbook/utils`
9
11
  */
10
12
  export declare const DIACRITIC_VARIANTS_LETTERS: Record<string, string>;
@@ -5,12 +5,15 @@
5
5
  * Words are splitted between multiple keywords @see IKeywords
6
6
  *
7
7
  * For example `"keyword"`
8
+ *
9
+ * @public exported from `@promptbook/utils`
8
10
  */
9
11
  export type string_keyword = string;
10
12
  /**
11
13
  * Semantic helper
12
14
  * Set of keywords @see string_keyword
13
15
  *
16
+ * @public exported from `@promptbook/utils`
14
17
  */
15
18
  export type IKeywords = Set<string_keyword>;
16
19
  /**
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Makes first letter of a string uppercase
3
3
  *
4
+ * @public exported from `@promptbook/utils`
4
5
  */
5
6
  export declare function capitalize(word: string): string;
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Makes first letter of a string uppercase
3
3
  *
4
+ * @public exported from `@promptbook/utils`
4
5
  */
5
6
  export declare function decapitalize(word: string): string;
@@ -4,5 +4,7 @@ import type { string_keyword } from './IKeywords';
4
4
  *
5
5
  * @param keyword to test
6
6
  * @returns if keyword is valid or not
7
+ *
8
+ * @public exported from `@promptbook/utils`
7
9
  */
8
10
  export declare function isValidKeyword(keyword: string): keyword is string_keyword;
@@ -1 +1,9 @@
1
+ /**
2
+ * @@@
3
+ *
4
+ * @param name @@@
5
+ * @returns @@@
6
+ * @example @@@
7
+ * @public exported from `@promptbook/utils`
8
+ */
1
9
  export declare function nameToUriPart(name: string): string;
@@ -1 +1,9 @@
1
+ /**
2
+ * @@@
3
+ *
4
+ * @param name @@@
5
+ * @returns @@@
6
+ * @example @@@
7
+ * @public exported from `@promptbook/utils`
8
+ */
1
9
  export declare function nameToUriParts(name: string): string[];
@@ -3,6 +3,16 @@
3
3
  *
4
4
  * @example 'hello-world'
5
5
  * @example 'i-love-promptbook'
6
+ * @public exported from `@promptbook/utils`
6
7
  */
7
8
  export type string_kebab_case = string;
9
+ /**
10
+ * @@@
11
+ *
12
+ * @param text @@@
13
+ * @returns @@@
14
+ * @example 'hello-world'
15
+ * @example 'i-love-promptbook'
16
+ * @public exported from `@promptbook/utils`
17
+ */
8
18
  export declare function normalizeToKebabCase(text: string): string_kebab_case;
@@ -3,6 +3,15 @@
3
3
  *
4
4
  * @example 'HelloWorld'
5
5
  * @example 'ILovePromptbook'
6
+ * @public exported from `@promptbook/utils`
6
7
  */
7
8
  export type string_PascalCase = string;
9
+ /**
10
+ *
11
+ * @param text @public exported from `@promptbook/utils`
12
+ * @returns
13
+ * @example 'HelloWorld'
14
+ * @example 'ILovePromptbook'
15
+ * @public exported from `@promptbook/utils`
16
+ */
8
17
  export declare function normalizeTo_PascalCase(text: string): string_PascalCase;
@@ -3,8 +3,18 @@
3
3
  *
4
4
  * @example 'HELLO_WORLD'
5
5
  * @example 'I_LOVE_PROMPTBOOK'
6
+ * @public exported from `@promptbook/utils`
6
7
  */
7
8
  export type string_SCREAMING_CASE = string;
9
+ /**
10
+ * @@@
11
+ *
12
+ * @param text @@@
13
+ * @returns @@@
14
+ * @example 'HELLO_WORLD'
15
+ * @example 'I_LOVE_PROMPTBOOK'
16
+ * @public exported from `@promptbook/utils`
17
+ */
8
18
  export declare function normalizeTo_SCREAMING_CASE(text: string): string_SCREAMING_CASE;
9
19
  /**
10
20
  * TODO: Tests
@@ -3,8 +3,19 @@
3
3
  *
4
4
  * @example 'helloWorld'
5
5
  * @example 'iLovePromptbook'
6
+ * @public exported from `@promptbook/utils`
6
7
  */
7
8
  export type string_camelCase = string;
9
+ /**
10
+ * @@@
11
+ *
12
+ * @param text @@@
13
+ * @param _isFirstLetterCapital @@@
14
+ * @returns @@@
15
+ * @example 'helloWorld'
16
+ * @example 'iLovePromptbook'
17
+ * @public exported from `@promptbook/utils`
18
+ */
8
19
  export declare function normalizeTo_camelCase(text: string, _isFirstLetterCapital?: boolean): string_camelCase;
9
20
  /**
10
21
  * TODO: [🌺] Use some intermediate util splitWords
@@ -5,4 +5,13 @@
5
5
  * @example 'i_love_promptbook'
6
6
  */
7
7
  export type string_snake_case = string;
8
+ /**
9
+ * @@@
10
+ *
11
+ * @param text @@@
12
+ * @returns @@@
13
+ * @example 'hello_world'
14
+ * @example 'i_love_promptbook'
15
+ * @public exported from `@promptbook/utils`
16
+ */
8
17
  export declare function normalizeTo_snake_case(text: string): string_snake_case;
@@ -7,6 +7,7 @@ import type { IKeywords } from './IKeywords';
7
7
  *
8
8
  * @param input of any kind
9
9
  * @returns {Set} of keywords without diacritics in lowercase
10
+ * @public exported from `@promptbook/utils`
10
11
  */
11
12
  export declare function parseKeywords(input: really_unknown): IKeywords;
12
13
  /**
@@ -4,5 +4,6 @@ import type { IKeywords } from './IKeywords';
4
4
  *
5
5
  * @param {string} input
6
6
  * @returns {Set} of keywords without diacritics in lowercase
7
+ * @public exported from `@promptbook/utils`
7
8
  */
8
9
  export declare function parseKeywordsFromString(input: string): IKeywords;
@@ -1,4 +1,11 @@
1
1
  /**
2
+ * @@@
2
3
  *
4
+ * @param input @@@
5
+ * @returns @@@
6
+ * @public exported from `@promptbook/utils`
3
7
  */
4
8
  export declare function removeDiacritics(input: string): string;
9
+ /**
10
+ * TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
11
+ */
@@ -1,5 +1,10 @@
1
1
  import type { IKeywords } from './IKeywords';
2
2
  /**
3
+ * @@@
3
4
  *
5
+ * @param haystack
6
+ * @param needle
7
+ * @returns
8
+ * @public exported from `@promptbook/utils`
4
9
  */
5
10
  export declare function searchKeywords(haystack: IKeywords, needle: IKeywords): boolean;
@@ -7,9 +7,10 @@
7
7
  * @returns parsed number
8
8
  * @throws {ParsingError} if the value is not a number
9
9
  *
10
- * @private within the parseCommand
10
+ * @public exported from `@promptbook/utils`
11
11
  */
12
12
  export declare function parseNumber(value: string | number): number;
13
13
  /**
14
14
  * TODO: Maybe use sth. like safe-eval in fraction/calculation case @see https://www.npmjs.com/package/safe-eval
15
+ * TODO: [🧠][🌻] Maybe export through `@promptbook/markdown-utils` not `@promptbook/utils`
15
16
  */
@@ -3,5 +3,6 @@ import type { number_seed } from '../../types/typeAliases';
3
3
  * Generates random seed
4
4
  *
5
5
  * Warning: This function is not cryptographically secure (it uses Math.random internally)
6
+ * @public exported from `@promptbook/utils`
6
7
  */
7
8
  export declare function $randomSeed(): number_seed;
@@ -3,5 +3,6 @@
3
3
  *
4
4
  * @param text with emojis
5
5
  * @returns text without emojis
6
+ * @public exported from `@promptbook/utils`
6
7
  */
7
8
  export declare function removeEmojis(text: string): string;
@@ -9,5 +9,6 @@
9
9
  *
10
10
  * @param text optionally quoted text
11
11
  * @returns text without quotes
12
+ * @public exported from `@promptbook/utils`
12
13
  */
13
14
  export declare function removeQuotes(text: string): string;
@@ -7,5 +7,6 @@ import type { string_template } from '../types/typeAliases';
7
7
  * @param parameters the object with parameters
8
8
  * @returns the template with replaced parameters
9
9
  * @throws {PipelineExecutionError} if parameter is not defined, not closed, or not opened
10
+ * @public exported from `@promptbook/utils`
10
11
  */
11
12
  export declare function replaceParameters(template: string_template, parameters: Parameters): string;
@@ -2,6 +2,7 @@
2
2
  * Create difference set of two sets.
3
3
  *
4
4
  * @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
5
+ * @public exported from `@promptbook/utils`
5
6
  */
6
7
  export declare function difference<TItem>(a: Set<TItem>, b: Set<TItem>, isEqual?: (a: TItem, b: TItem) => boolean): Set<TItem>;
7
8
  /**
@@ -2,5 +2,6 @@
2
2
  * Creates a new set with all elements that are present in all sets
3
3
  *
4
4
  * @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
5
+ * @public exported from `@promptbook/utils`
5
6
  */
6
7
  export declare function intersection<TItem>(...sets: Array<Set<TItem>>): Set<TItem>;
@@ -2,5 +2,6 @@
2
2
  * Creates a new set with all elements that are present in either set
3
3
  *
4
4
  * @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
5
+ * @public exported from `@promptbook/utils`
5
6
  */
6
7
  export declare function union<TItem>(...sets: Array<Set<TItem>>): Set<TItem>;
@@ -4,5 +4,6 @@
4
4
  * Note: This is usefull for post-processing of the result of the chat LLM model
5
5
  * when the model wraps the result in the (markdown) code block.
6
6
  *
7
+ * @public exported from `@promptbook/utils`
7
8
  */
8
9
  export declare function trimCodeBlock(value: string): string;
@@ -3,5 +3,7 @@
3
3
  *
4
4
  * Note: This is usefull for post-processing of the result of the completion LLM model
5
5
  * if you want to start code block in the prompt but you don't want to end it in the result.
6
+ *
7
+ * @public exported from `@promptbook/utils`
6
8
  */
7
9
  export declare function trimEndOfCodeBlock(value: string): string;