@promptbook/openai 0.62.0 → 0.63.0-0

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 (333) hide show
  1. package/esm/index.es.js +50 -8
  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/esm/typings/src/version.d.ts +2 -0
  167. package/package.json +2 -2
  168. package/umd/index.umd.js +50 -8
  169. package/umd/index.umd.js.map +1 -1
  170. package/umd/typings/src/_packages/anthropic-claude.index.d.ts +3 -2
  171. package/umd/typings/src/_packages/azure-openai.index.d.ts +4 -2
  172. package/umd/typings/src/_packages/browser.index.d.ts +6 -0
  173. package/umd/typings/src/_packages/cli.index.d.ts +1 -7
  174. package/umd/typings/src/_packages/core.index.d.ts +87 -13
  175. package/umd/typings/src/_packages/execute-javascript.index.d.ts +5 -45
  176. package/umd/typings/src/_packages/fake-llm.index.d.ts +4 -5
  177. package/umd/typings/src/_packages/langtail.index.d.ts +4 -2
  178. package/umd/typings/src/_packages/markdown-utils.index.d.ts +23 -4
  179. package/umd/typings/src/_packages/node.index.d.ts +5 -2
  180. package/umd/typings/src/_packages/openai.index.d.ts +5 -2
  181. package/umd/typings/src/_packages/remote-client.index.d.ts +5 -2
  182. package/umd/typings/src/_packages/remote-server.index.d.ts +4 -2
  183. package/umd/typings/src/_packages/types.index.d.ts +441 -21
  184. package/umd/typings/src/_packages/utils.index.d.ts +84 -31
  185. package/umd/typings/src/cli/main.d.ts +12 -0
  186. package/umd/typings/src/collection/collectionToJson.d.ts +2 -0
  187. package/umd/typings/src/collection/constructors/createCollectionFromDirectory.d.ts +1 -0
  188. package/umd/typings/src/collection/constructors/createCollectionFromJson.d.ts +1 -0
  189. package/umd/typings/src/collection/constructors/createCollectionFromPromise.d.ts +1 -0
  190. package/umd/typings/src/collection/constructors/createCollectionFromUrl.d.ts +1 -1
  191. package/umd/typings/src/collection/constructors/createSubcollection.d.ts +1 -0
  192. package/umd/typings/src/commands/BLOCK/BlockTypes.d.ts +2 -0
  193. package/umd/typings/src/config.d.ts +27 -1
  194. package/umd/typings/src/conversion/pipelineJsonToString.d.ts +1 -0
  195. package/umd/typings/src/conversion/pipelineStringToJson.d.ts +6 -3
  196. package/umd/typings/src/conversion/pipelineStringToJsonSync.d.ts +4 -3
  197. package/umd/typings/src/conversion/prettify/prettifyPipelineString.d.ts +2 -0
  198. package/umd/typings/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +2 -0
  199. package/umd/typings/src/conversion/utils/extractParameterNamesFromPromptTemplate.d.ts +1 -0
  200. package/umd/typings/src/conversion/utils/extractVariables.d.ts +1 -0
  201. package/umd/typings/src/conversion/utils/renameParameter.d.ts +1 -0
  202. package/umd/typings/src/conversion/utils/stringifyPipelineJson.d.ts +2 -0
  203. package/umd/typings/src/conversion/utils/titleToName.d.ts +6 -1
  204. package/umd/typings/src/conversion/validation/validatePipeline.d.ts +1 -0
  205. package/umd/typings/src/errors/CollectionError.d.ts +2 -0
  206. package/umd/typings/src/errors/EnvironmentMismatchError.d.ts +2 -0
  207. package/umd/typings/src/errors/LimitReachedError.d.ts +2 -0
  208. package/umd/typings/src/errors/NotFoundError.d.ts +2 -0
  209. package/umd/typings/src/errors/NotYetImplementedError.d.ts +2 -0
  210. package/umd/typings/src/errors/ParsingError.d.ts +2 -0
  211. package/umd/typings/src/errors/PipelineExecutionError.d.ts +2 -0
  212. package/umd/typings/src/errors/PipelineLogicError.d.ts +2 -0
  213. package/umd/typings/src/errors/ReferenceError.d.ts +2 -0
  214. package/umd/typings/src/errors/UnexpectedError.d.ts +2 -0
  215. package/umd/typings/src/errors/VersionMismatchError.d.ts +2 -0
  216. package/umd/typings/src/execution/assertsExecutionSuccessful.d.ts +1 -0
  217. package/umd/typings/src/execution/createPipelineExecutor.d.ts +1 -0
  218. package/umd/typings/src/execution/embeddingVectorToString.d.ts +2 -0
  219. package/umd/typings/src/execution/utils/addUsage.d.ts +3 -1
  220. package/umd/typings/src/execution/utils/checkExpectations.d.ts +2 -0
  221. package/umd/typings/src/execution/utils/forEachAsync.d.ts +1 -0
  222. package/umd/typings/src/execution/utils/usageToHuman.d.ts +2 -0
  223. package/umd/typings/src/execution/utils/usageToWorktime.d.ts +2 -0
  224. package/umd/typings/src/formats/_common/FormatDefinition.d.ts +2 -1
  225. package/umd/typings/src/formats/json/utils/isValidJsonString.d.ts +2 -0
  226. package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceTools.d.ts +2 -0
  227. package/umd/typings/src/knowledge/dialogs/callback/CallbackInterfaceToolsOptions.d.ts +2 -0
  228. package/umd/typings/src/knowledge/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +3 -1
  229. package/umd/typings/src/knowledge/prepare-knowledge/_common/Scraper.d.ts +10 -0
  230. package/umd/typings/src/knowledge/prepare-knowledge/_common/prepareKnowledgePieces.d.ts +1 -1
  231. package/umd/typings/src/knowledge/prepare-knowledge/markdown/prepareKnowledgeFromMarkdown.d.ts +2 -0
  232. package/umd/typings/src/llm-providers/_common/createLlmToolsFromEnv.d.ts +4 -1
  233. package/umd/typings/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -1
  234. package/umd/typings/src/llm-providers/_common/utils/count-total-usage/countTotalUsage.d.ts +1 -1
  235. package/umd/typings/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +2 -1
  236. package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -0
  237. package/umd/typings/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +2 -1
  238. package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +2 -0
  239. package/umd/typings/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
  240. package/umd/typings/src/llm-providers/langtail/LangtailExecutionTools.d.ts +2 -0
  241. package/umd/typings/src/llm-providers/langtail/LangtailExecutionToolsOptions.d.ts +2 -0
  242. package/umd/typings/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +2 -0
  243. package/umd/typings/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +2 -0
  244. package/umd/typings/src/llm-providers/multiple/joinLlmExecutionTools.d.ts +2 -0
  245. package/umd/typings/src/llm-providers/openai/OpenAiExecutionTools.d.ts +2 -0
  246. package/umd/typings/src/llm-providers/openai/OpenAiExecutionToolsOptions.d.ts +2 -0
  247. package/umd/typings/src/llm-providers/openai/openai-models.d.ts +1 -0
  248. package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -0
  249. package/umd/typings/src/llm-providers/remote/RemoteLlmExecutionToolsOptions.d.ts +2 -0
  250. package/umd/typings/src/llm-providers/remote/interfaces/RemoteServerOptions.d.ts +7 -1
  251. package/umd/typings/src/llm-providers/remote/startRemoteServer.d.ts +1 -0
  252. package/umd/typings/src/personas/preparePersona.d.ts +1 -1
  253. package/umd/typings/src/postprocessing/utils/extractBlock.d.ts +5 -0
  254. package/umd/typings/src/prepare/isPipelinePrepared.d.ts +2 -1
  255. package/umd/typings/src/prepare/preparePipeline.d.ts +1 -1
  256. package/umd/typings/src/prepare/prepareTemplates.d.ts +2 -1
  257. package/umd/typings/src/prepare/unpreparePipeline.d.ts +2 -1
  258. package/umd/typings/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +2 -0
  259. package/umd/typings/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
  260. package/umd/typings/src/scripting/javascript/postprocessing-functions.d.ts +51 -0
  261. package/umd/typings/src/storage/_common/PromptbookStorage.d.ts +0 -1
  262. package/umd/typings/src/storage/files-storage/FilesStorage.d.ts +2 -1
  263. package/umd/typings/src/storage/files-storage/FilesStorageOptions.d.ts +0 -3
  264. package/umd/typings/src/storage/local-storage/getLocalStorage.d.ts +2 -1
  265. package/umd/typings/src/storage/local-storage/getSessionStorage.d.ts +2 -1
  266. package/umd/typings/src/storage/memory/MemoryStorage.d.ts +2 -3
  267. package/umd/typings/src/storage/utils/PrefixStorage.d.ts +2 -3
  268. package/umd/typings/src/types/ModelRequirements.d.ts +0 -1
  269. package/umd/typings/src/types/Prompt.d.ts +0 -1
  270. package/umd/typings/src/types/execution-report/ExecutionReportStringOptions.d.ts +4 -0
  271. package/umd/typings/src/types/execution-report/executionReportJsonToString.d.ts +2 -0
  272. package/umd/typings/src/types/typeAliases.d.ts +9 -2
  273. package/umd/typings/src/utils/currentDate.d.ts +1 -0
  274. package/umd/typings/src/utils/deepClone.d.ts +2 -1
  275. package/umd/typings/src/utils/deepFreeze.d.ts +1 -1
  276. package/umd/typings/src/utils/expectation-counters/countCharacters.d.ts +2 -0
  277. package/umd/typings/src/utils/expectation-counters/countLines.d.ts +2 -0
  278. package/umd/typings/src/utils/expectation-counters/countPages.d.ts +2 -0
  279. package/umd/typings/src/utils/expectation-counters/countParagraphs.d.ts +2 -0
  280. package/umd/typings/src/utils/expectation-counters/countSentences.d.ts +4 -0
  281. package/umd/typings/src/utils/expectation-counters/countWords.d.ts +2 -0
  282. package/umd/typings/src/utils/expectation-counters/index.d.ts +2 -0
  283. package/umd/typings/src/utils/extractParameterNames.d.ts +1 -0
  284. package/umd/typings/src/utils/isRunningInWhatever.d.ts +6 -3
  285. package/umd/typings/src/utils/markdown/addAutoGeneratedSection.d.ts +4 -1
  286. package/umd/typings/src/utils/markdown/createMarkdownChart.d.ts +1 -1
  287. package/umd/typings/src/utils/markdown/createMarkdownTable.d.ts +4 -1
  288. package/umd/typings/src/utils/markdown/escapeMarkdownBlock.d.ts +5 -0
  289. package/umd/typings/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -1
  290. package/umd/typings/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +2 -1
  291. package/umd/typings/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +1 -0
  292. package/umd/typings/src/utils/markdown/flattenMarkdown.d.ts +3 -0
  293. package/umd/typings/src/utils/markdown/parseMarkdownSection.d.ts +4 -0
  294. package/umd/typings/src/utils/markdown/removeContentComments.d.ts +1 -0
  295. package/umd/typings/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
  296. package/umd/typings/src/utils/markdown/splitMarkdownIntoSections.d.ts +3 -0
  297. package/umd/typings/src/utils/normalization/DIACRITIC_VARIANTS_LETTERS.d.ts +2 -0
  298. package/umd/typings/src/utils/normalization/IKeywords.d.ts +3 -0
  299. package/umd/typings/src/utils/normalization/capitalize.d.ts +1 -0
  300. package/umd/typings/src/utils/normalization/decapitalize.d.ts +1 -0
  301. package/umd/typings/src/utils/normalization/isValidKeyword.d.ts +2 -0
  302. package/umd/typings/src/utils/normalization/nameToUriPart.d.ts +8 -0
  303. package/umd/typings/src/utils/normalization/nameToUriParts.d.ts +8 -0
  304. package/umd/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +10 -0
  305. package/umd/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +9 -0
  306. package/umd/typings/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +10 -0
  307. package/umd/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +11 -0
  308. package/umd/typings/src/utils/normalization/normalizeTo_snake_case.d.ts +9 -0
  309. package/umd/typings/src/utils/normalization/parseKeywords.d.ts +1 -0
  310. package/umd/typings/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
  311. package/umd/typings/src/utils/normalization/removeDiacritics.d.ts +7 -0
  312. package/umd/typings/src/utils/normalization/searchKeywords.d.ts +5 -0
  313. package/umd/typings/src/utils/parseNumber.d.ts +2 -1
  314. package/umd/typings/src/utils/random/randomSeed.d.ts +1 -0
  315. package/umd/typings/src/utils/removeEmojis.d.ts +1 -0
  316. package/umd/typings/src/utils/removeQuotes.d.ts +1 -0
  317. package/umd/typings/src/utils/replaceParameters.d.ts +1 -0
  318. package/umd/typings/src/utils/sets/difference.d.ts +1 -0
  319. package/umd/typings/src/utils/sets/intersection.d.ts +1 -0
  320. package/umd/typings/src/utils/sets/union.d.ts +1 -0
  321. package/umd/typings/src/utils/trimCodeBlock.d.ts +1 -0
  322. package/umd/typings/src/utils/trimEndOfCodeBlock.d.ts +2 -0
  323. package/umd/typings/src/utils/unwrapResult.d.ts +1 -0
  324. package/umd/typings/src/utils/validators/filePath/isValidFilePath.d.ts +1 -0
  325. package/umd/typings/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +7 -0
  326. package/umd/typings/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -0
  327. package/umd/typings/src/utils/validators/semanticVersion/isValidSemanticVersion.d.ts +2 -0
  328. package/umd/typings/src/utils/validators/url/isHostnameOnPrivateNetwork.d.ts +2 -0
  329. package/umd/typings/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
  330. package/umd/typings/src/utils/validators/url/isValidPipelineUrl.d.ts +2 -0
  331. package/umd/typings/src/utils/validators/url/isValidUrl.d.ts +2 -0
  332. package/umd/typings/src/utils/validators/uuid/isValidUuid.d.ts +2 -0
  333. package/umd/typings/src/version.d.ts +2 -0
@@ -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;
@@ -28,6 +28,7 @@ interface UnwrapResultOptions {
28
28
  *
29
29
  * @param text optionally quoted text
30
30
  * @returns text without quotes
31
+ * @public exported from `@promptbook/utils`
31
32
  */
32
33
  export declare function unwrapResult(text: string, options?: UnwrapResultOptions): string;
33
34
  export {};
@@ -4,5 +4,6 @@ import type { really_unknown } from '../../organization/really_unknown';
4
4
  * Tests if given string is valid URL.
5
5
  *
6
6
  * Note: This does not check if the file exists only if the path is valid
7
+ * @public exported from `@promptbook/utils`
7
8
  */
8
9
  export declare function isValidFilePath(filePath: really_unknown): filePath is string_file_path;
@@ -1,3 +1,10 @@
1
1
  import type { string_javascript_name } from '../../../types/typeAliases';
2
2
  import type { really_unknown } from '../../organization/really_unknown';
3
+ /**
4
+ * @@@
5
+ *
6
+ * @param javascriptName @@@
7
+ * @returns @@@
8
+ * @public exported from `@promptbook/utils`
9
+ */
3
10
  export declare function isValidJavascriptName(javascriptName: really_unknown): javascriptName is string_javascript_name;
@@ -9,5 +9,7 @@ import type { really_unknown } from '../../organization/really_unknown';
9
9
  * Note: There are two simmilar functions:
10
10
  * - `isValidSemanticVersion` which tests any semantic version
11
11
  * - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
12
+ *
13
+ * @public exported from `@promptbook/utils`
12
14
  */
13
15
  export declare function isValidPromptbookVersion(version: really_unknown): version is string_promptbook_version;
@@ -6,5 +6,7 @@ import type { really_unknown } from '../../organization/really_unknown';
6
6
  * Note: There are two simmilar functions:
7
7
  * - `isValidSemanticVersion` which tests any semantic version
8
8
  * - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
9
+ *
10
+ * @public exported from `@promptbook/utils`
9
11
  */
10
12
  export declare function isValidSemanticVersion(version: really_unknown): version is string_semantic_version;
@@ -5,5 +5,7 @@ import type { string_hostname } from '../../../types/typeAliases';
5
5
  * Note: There are two simmilar functions:
6
6
  * - `isUrlOnPrivateNetwork` which tests full URL
7
7
  * - `isHostnameOnPrivateNetwork` *(this one)* which tests just hostname
8
+ *
9
+ * @public exported from `@promptbook/utils`
8
10
  */
9
11
  export declare function isHostnameOnPrivateNetwork(hostname: string_hostname): boolean;
@@ -8,5 +8,6 @@ import type { string_url } from '../../../types/typeAliases';
8
8
  *
9
9
  * @param {string} ipAddress - The IP address to check.
10
10
  * @returns {boolean} Returns true if the IP address is reserved for private networks or localhost, otherwise false.
11
+ * @public exported from `@promptbook/utils`
11
12
  */
12
13
  export declare function isUrlOnPrivateNetwork(url: URL | string_url): boolean;
@@ -6,6 +6,8 @@ import type { really_unknown } from '../../organization/really_unknown';
6
6
  * Note: There are two simmilar functions:
7
7
  * - `isValidUrl` which tests any URL
8
8
  * - `isValidPipelineUrl` *(this one)* which tests just pipeline URL
9
+ *
10
+ * @public exported from `@promptbook/utils`
9
11
  */
10
12
  export declare function isValidPipelineUrl(url: really_unknown): url is string_pipeline_url;
11
13
  /**
@@ -7,5 +7,7 @@ import type { really_unknown } from '../../organization/really_unknown';
7
7
  * Note: There are two simmilar functions:
8
8
  * - `isValidUrl` which tests any URL
9
9
  * - `isValidPipelineUrl` *(this one)* which tests just promptbook URL
10
+ *
11
+ * @public exported from `@promptbook/utils`
10
12
  */
11
13
  export declare function isValidUrl(url: really_unknown): url is string_url;
@@ -2,5 +2,7 @@ import type { string_uuid } from '../../../types/typeAliases';
2
2
  import type { really_unknown } from '../../organization/really_unknown';
3
3
  /**
4
4
  * Checks if value is valid uuid
5
+ *
6
+ * @public exported from `@promptbook/utils`
5
7
  */
6
8
  export declare function isValidUuid(value: really_unknown): value is string_uuid;
@@ -1,6 +1,8 @@
1
1
  import type { string_semantic_version } from './types/typeAliases';
2
2
  /**
3
3
  * The version of the Promptbook library
4
+ *
5
+ * @public exported from all packages
4
6
  */
5
7
  export declare const PROMPTBOOK_VERSION: string_promptbook_version;
6
8
  export type string_promptbook_version = string_semantic_version;