@promptbook/openai 0.62.1 → 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 +48 -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/package.json +2 -2
  167. package/umd/index.umd.js +48 -8
  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
@@ -4,6 +4,8 @@ import type { PipelineCollection } from './PipelineCollection';
4
4
  * Converts PipelineCollection to serialized JSON
5
5
  *
6
6
  * Note: Functions `collectionToJson` and `createCollectionFromJson` are complementary
7
+ *
8
+ * @public exported from `@promptbook/core`
7
9
  */
8
10
  export declare function collectionToJson(collection: PipelineCollection): Promise<Array<PipelineJson>>;
9
11
  /**
@@ -39,6 +39,7 @@ type CreatePipelineCollectionFromDirectoryOptions = PipelineStringToJsonOptions
39
39
  * @param path - path to the directory with pipelines
40
40
  * @param options - Misc options for the collection
41
41
  * @returns PipelineCollection
42
+ * @public exported from `@promptbook/node`
42
43
  */
43
44
  export declare function createCollectionFromDirectory(path: string_folder_path, options?: CreatePipelineCollectionFromDirectoryOptions): Promise<PipelineCollection>;
44
45
  export {};
@@ -8,5 +8,6 @@ import type { PipelineCollection } from '../PipelineCollection';
8
8
  *
9
9
  * @param promptbookSources
10
10
  * @returns PipelineCollection
11
+ * @public exported from `@promptbook/core`
11
12
  */
12
13
  export declare function createCollectionFromJson(...promptbooks: Array<PipelineJson>): PipelineCollection;
@@ -18,5 +18,6 @@ import type { PipelineCollection } from '../PipelineCollection';
18
18
  * @param promptbookSourcesPromiseOrFactory
19
19
  * @returns PipelineCollection
20
20
  * @deprecated Do not use, it will became internal tool for other constructor functions
21
+ * @public exported from `@promptbook/core`
21
22
  */
22
23
  export declare function createCollectionFromPromise(promptbookSourcesPromiseOrFactory: Promise<Array<PipelineJson>> | (() => Promise<Array<PipelineJson>>)): PipelineCollection;
@@ -19,8 +19,8 @@ type CreatePipelineCollectionFromUrlyOptions = {
19
19
  };
20
20
  /**
21
21
  * Constructs Promptbook from remote Promptbase URL
22
-
23
22
  * @returns PipelineCollection
23
+ * @public exported from `@promptbook/core`
24
24
  */
25
25
  export declare function createCollectionFromUrl(url: string_url | URL, options: CreatePipelineCollectionFromUrlyOptions): Promise<PipelineCollection>;
26
26
  export {};
@@ -8,5 +8,6 @@ import type { PipelineCollection } from '../PipelineCollection';
8
8
  *
9
9
  * @param promptbookSources
10
10
  * @returns PipelineCollection
11
+ * @public exported from `@promptbook/core`
11
12
  */
12
13
  export declare function createSubcollection(collection: PipelineCollection, predicate: (url: string_pipeline_url) => boolean): PipelineCollection;
@@ -3,11 +3,13 @@ import type { TupleToUnion } from 'type-fest';
3
3
  * Block type describes the way how the block is blockd
4
4
  *
5
5
  * @see https://github.com/webgptorg/promptbook#block-type
6
+ * @public exported from `@promptbook/core`
6
7
  */
7
8
  export type BlockType = TupleToUnion<typeof BlockTypes>;
8
9
  /**
9
10
  * Block type describes the way how the block is blockd
10
11
  *
11
12
  * @see https://github.com/webgptorg/promptbook#block-type
13
+ * @public exported from `@promptbook/core`
12
14
  */
13
15
  export declare const BlockTypes: readonly ["PROMPT_TEMPLATE", "SIMPLE_TEMPLATE", "SCRIPT", "PROMPT_DIALOG", "SAMPLE", "KNOWLEDGE", "INSTRUMENT", "ACTION"];
@@ -1,39 +1,57 @@
1
1
  /**
2
2
  * The maximum number of iterations for a loops
3
+ *
4
+ * @private within the repository - too low-level in comparison to other `MAX_...`
3
5
  */
4
6
  export declare const LOOP_LIMIT = 1000;
5
7
  /**
6
8
  * The maximum number of iterations for a loops which adds characters one by one
9
+ *
10
+ * @private within the repository - too low-level in comparison to other `MAX_...`
7
11
  */
8
12
  export declare const CHARACTER_LOOP_LIMIT = 100000;
9
13
  /**
10
14
  * The maximum number of (LLM) tasks running in parallel
15
+ *
16
+ * @public exported from `@promptbook/core`
11
17
  */
12
18
  export declare const MAX_PARALLEL_COUNT = 5;
13
19
  /**
14
20
  * The maximum number of attempts to execute LLM task before giving up
21
+ *
22
+ * @public exported from `@promptbook/core`
15
23
  */
16
24
  export declare const MAX_EXECUTION_ATTEMPTS = 3;
17
25
  /**
18
26
  * The maximum length of the (generated) filename
27
+ *
28
+ * @public exported from `@promptbook/core`
19
29
  */
20
30
  export declare const MAX_FILENAME_LENGTH = 30;
21
31
  /**
22
32
  * @@@
23
33
  * TODO: [🐝] !!! Use
34
+ *
35
+ * @public exported from `@promptbook/core`
24
36
  */
25
37
  export declare const MAX_KNOWLEDGE_SOURCES_SCRAPING_DEPTH = 3;
26
38
  /**
27
39
  * @@@
28
40
  * TODO: [🐝] !!! Use
41
+ *
42
+ * @public exported from `@promptbook/core`
29
43
  */
30
44
  export declare const MAX_KNOWLEDGE_SOURCES_SCRAPING_TOTAL = 200;
31
45
  /**
32
46
  * Where to store the cache of executions for promptbook CLI
47
+ *
48
+ * @public exported from `@promptbook/core`
33
49
  */
34
50
  export declare const EXECUTIONS_CACHE_DIRNAME = "/.promptbook/executions-cache";
35
51
  /**
36
52
  * The name of the builded pipeline collection made by CLI `ptbk make` and for lookup in `createCollectionFromDirectory`
53
+ *
54
+ * @public exported from `@promptbook/core`
37
55
  */
38
56
  export declare const PIPELINE_COLLECTION_BASE_FILENAME = "index";
39
57
  /**
@@ -42,20 +60,28 @@ export declare const PIPELINE_COLLECTION_BASE_FILENAME = "index";
42
60
  export declare const REPLACING_NONCE = "u$k42k%!V2zo34w7Fu#@QUHYPW";
43
61
  /**
44
62
  * The names of the parameters that are reserved for special purposes
63
+ *
64
+ * @public exported from `@promptbook/core`
45
65
  */
46
66
  export declare const RESERVED_PARAMETER_NAMES: readonly ["content", "context", "knowledge", "samples", "modelName", "currentDate"];
47
67
  /**
48
68
  * @@@
69
+ *
70
+ * @private within the repository
49
71
  */
50
72
  export declare const RESERVED_PARAMETER_MISSING_VALUE: string;
51
73
  /**
52
74
  * @@@
75
+ *
76
+ * @private within the repository
53
77
  */
54
78
  export declare const RESERVED_PARAMETER_RESTRICTED: string;
55
79
  /**
56
80
  * @@@
81
+ *
82
+ * @private within the repository
57
83
  */
58
84
  export declare const DEBUG_ALLOW_PAYED_TESTING: boolean;
59
85
  /**
60
- * TODO: [🔼] Export all to core
86
+ * TODO: !!!!!! Check that all @private contains some normalized explanation
61
87
  */
@@ -5,6 +5,7 @@ import type { PipelineString } from '../types/PipelineString';
5
5
  *
6
6
  * @param pipelineJson Promptbook in JSON format (.ptbk.json)
7
7
  * @returns Promptbook in string format (.ptbk.md)
8
+ * @public exported from `@promptbook/core`
8
9
  */
9
10
  export declare function pipelineJsonToString(pipelineJson: PipelineJson): PipelineString;
10
11
  /**
@@ -3,6 +3,8 @@ import type { PipelineJson } from '../types/PipelineJson/PipelineJson';
3
3
  import type { PipelineString } from '../types/PipelineString';
4
4
  /**
5
5
  * Options for `pipelineStringToJson`
6
+ *
7
+ * @public exported from `@promptbook/core`
6
8
  */
7
9
  export type PipelineStringToJsonOptions = {
8
10
  /**
@@ -20,13 +22,14 @@ export type PipelineStringToJsonOptions = {
20
22
  * - `pipelineStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
21
23
  * - `preparePipeline` - just one step in the compilation process
22
24
  *
25
+ * Note: This function does not validate logic of the pipeline only the syntax
26
+ * Note: This function acts as compilation process
27
+ *
23
28
  * @param pipelineString {Promptbook} in string markdown format (.ptbk.md)
24
29
  * @param options - Options and tools for the compilation
25
30
  * @returns {Promptbook} compiled in JSON format (.ptbk.json)
26
31
  * @throws {ParsingError} if the promptbook string is not valid
27
- *
28
- * Note: This function does not validate logic of the pipeline only the syntax
29
- * Note: This function acts as compilation process
32
+ * @public exported from `@promptbook/core`
30
33
  */
31
34
  export declare function pipelineStringToJson(pipelineString: PipelineString, options?: PipelineStringToJsonOptions): Promise<PipelineJson>;
32
35
  /**
@@ -8,12 +8,13 @@ import type { PipelineString } from '../types/PipelineString';
8
8
  * - `pipelineStringToJsonSync` - use only if you need to compile promptbook synchronously and it contains NO external knowledge
9
9
  * - `preparePipeline` - just one step in the compilation process
10
10
  *
11
+ * Note: This function does not validate logic of the pipeline only the syntax
12
+ * Note: This function acts as compilation process
13
+ *
11
14
  * @param pipelineString {Promptbook} in string markdown format (.ptbk.md)
12
15
  * @returns {Promptbook} compiled in JSON format (.ptbk.json)
13
16
  * @throws {ParsingError} if the promptbook string is not valid
14
- *
15
- * Note: This function does not validate logic of the pipeline only the syntax
16
- * Note: This function acts as compilation process
17
+ * @public exported from `@promptbook/core`
17
18
  */
18
19
  export declare function pipelineStringToJsonSync(pipelineString: PipelineString): PipelineJson;
19
20
  /**
@@ -2,6 +2,8 @@ import type { PipelineString } from '../../types/PipelineString';
2
2
  import type { PrettifyOptions } from './PrettifyOptions';
3
3
  /**
4
4
  * Prettyfies Promptbook string and adds Mermaid graph
5
+ *
6
+ * @public exported from `@promptbook/core`
5
7
  */
6
8
  export declare function prettifyPipelineString(pipelineString: PipelineString, options: PrettifyOptions): Promise<PipelineString>;
7
9
  /**
@@ -17,6 +17,8 @@ export type renderPipelineMermaidOptions = {
17
17
  * Creates a Mermaid graph based on the promptbook
18
18
  *
19
19
  * Note: The result is not wrapped in a Markdown code block
20
+ *
21
+ * @public exported from `@promptbook/utils`
20
22
  */
21
23
  export declare function renderPromptbookMermaid(pipelineJson: PipelineJson, options?: renderPipelineMermaidOptions): string;
22
24
  /**
@@ -6,6 +6,7 @@ import type { string_parameter_name } from '../../types/typeAliases';
6
6
  * @param promptTemplate the template with used parameters
7
7
  * @returns the set of parameter names
8
8
  * @throws {ParsingError} if the script is invalid
9
+ * @public exported from `@promptbook/utils`
9
10
  */
10
11
  export declare function extractParameterNamesFromPromptTemplate(promptTemplate: Pick<PromptTemplateJson, 'title' | 'description' | 'blockType' | 'content' | 'preparedContent' | 'jokerParameterNames'>): Set<string_parameter_name>;
11
12
  /**
@@ -6,6 +6,7 @@ import type { string_javascript_name } from '../../types/typeAliases';
6
6
  * @param script from which to extract the variables
7
7
  * @returns the list of variable names
8
8
  * @throws {ParsingError} if the script is invalid
9
+ * @public exported from `@promptbook/utils`
9
10
  */
10
11
  export declare function extractVariables(script: string_javascript): Set<string_javascript_name>;
11
12
  /**
@@ -20,6 +20,7 @@ type RenameParameterOptions = {
20
20
  * In other words, it will find all parameters that are not used in the prompt template itseld and all its dependencies
21
21
  *
22
22
  * @throws {PipelineLogicError} If the new parameter name is already used in the pipeline
23
+ * @public exported from `@promptbook/utils`
23
24
  */
24
25
  export declare function renameParameter(options: RenameParameterOptions): PipelineJson;
25
26
  export {};
@@ -4,6 +4,8 @@ import type { string_json } from '../../types/typeAliases';
4
4
  *
5
5
  * Note: [0] It can be used for more JSON types like whole collection of pipelines, single knowledge piece, etc.
6
6
  * Note: In contrast to JSON.stringify, this function ensures that **embedding index** is on single line
7
+ *
8
+ * @public exported from `@promptbook/core`
7
9
  */
8
10
  export declare function stringifyPipelineJson<TType>(pipeline: TType): string_json<TType>;
9
11
  /**
@@ -1,4 +1,9 @@
1
1
  /**
2
- * Function normalizes title to name which can be used as identifier
2
+ * @@@
3
+ *
4
+ * @param value @@@
5
+ * @returns @@@
6
+ * @example @@@
7
+ * @public exported from `@promptbook/utils`
3
8
  */
4
9
  export declare function titleToName(value: string): string;
@@ -12,6 +12,7 @@ import type { PipelineJson } from '../../types/PipelineJson/PipelineJson';
12
12
  * @param pipeline valid or invalid PipelineJson
13
13
  * @returns the same pipeline if it is logically valid
14
14
  * @throws {PipelineLogicError} on logical error in the pipeline
15
+ * @public exported from `@promptbook/core`
15
16
  */
16
17
  export declare function validatePipeline(pipeline: PipelineJson): PipelineJson;
17
18
  /**
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error indicates that the pipeline collection cannot be propperly loaded
3
+ *
4
+ * @public exported from `@promptbook/core`
3
5
  */
4
6
  export declare class CollectionError extends Error {
5
7
  readonly name = "CollectionError";
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error type indicates that you try to use a feature that is not available in the current environment
3
+ *
4
+ * @public exported from `@promptbook/core`
3
5
  */
4
6
  export declare class EnvironmentMismatchError extends Error {
5
7
  readonly name = "EnvironmentMismatchError";
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error type indicates that some limit was reached
3
+ *
4
+ * @public exported from `@promptbook/core`
3
5
  */
4
6
  export declare class LimitReachedError extends Error {
5
7
  readonly name = "LimitReachedError";
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error indicates that promptbook not found in the collection
3
+ *
4
+ * @public exported from `@promptbook/core`
3
5
  */
4
6
  export declare class NotFoundError extends Error {
5
7
  readonly name = "NotFoundError";
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error type indicates that some part of the code is not implemented yet
3
+ *
4
+ * @public exported from `@promptbook/core`
3
5
  */
4
6
  export declare class NotYetImplementedError extends Error {
5
7
  readonly name = "NotYetImplementedError";
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error indicates that the promptbook in a markdown format cannot be parsed into a valid promptbook object
3
+ *
4
+ * @public exported from `@promptbook/core`
3
5
  */
4
6
  export declare class ParsingError extends Error {
5
7
  readonly name = "ParsingError";
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error indicates errors during the execution of the pipeline
3
+ *
4
+ * @public exported from `@promptbook/core`
3
5
  */
4
6
  export declare class PipelineExecutionError extends Error {
5
7
  readonly name = "PipelineExecutionError";
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error indicates that the promptbook object has valid syntax but contains logical errors (like circular dependencies)
3
+ *
4
+ * @public exported from `@promptbook/core`
3
5
  */
4
6
  export declare class PipelineLogicError extends Error {
5
7
  readonly name = "PipelineLogicError";
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error indicates errors in referencing promptbooks between each other
3
+ *
4
+ * @public exported from `@promptbook/core`
3
5
  */
4
6
  export declare class ReferenceError extends Error {
5
7
  readonly name = "ReferenceError";
@@ -1,5 +1,7 @@
1
1
  /**
2
2
  * This error type indicates that the error should not happen and its last check before crashing with some other error
3
+ *
4
+ * @public exported from `@promptbook/core`
3
5
  */
4
6
  export declare class UnexpectedError extends Error {
5
7
  readonly name = "UnexpectedError";
@@ -1,6 +1,8 @@
1
1
  import type { string_semantic_version } from '../types/typeAliases';
2
2
  /**
3
3
  * This error type indicates that the version of the pipeline is not matching the expected version
4
+ *
5
+ * @public exported from `@promptbook/core`
4
6
  */
5
7
  export declare class VersionMismatchError extends Error {
6
8
  readonly name = "UnexpectedError";
@@ -4,6 +4,7 @@ import type { PipelineExecutor } from './PipelineExecutor';
4
4
  *
5
5
  * @param executionResult - The partial result of the promptnook execution
6
6
  * @throws {PipelineExecutionError} If the execution is not successful or if multiple errors occurred
7
+ * @public exported from `@promptbook/core`
7
8
  */
8
9
  export declare function assertsExecutionSuccessful(executionResult: Pick<Awaited<ReturnType<PipelineExecutor>>, 'isSuccessful' | 'errors'>): void;
9
10
  /**
@@ -53,6 +53,7 @@ interface CreatePipelineExecutorOptions {
53
53
  *
54
54
  * @returns The executor function
55
55
  * @throws {PipelineLogicError} on logical error in the pipeline
56
+ * @public exported from `@promptbook/core`
56
57
  */
57
58
  export declare function createPipelineExecutor(options: CreatePipelineExecutorOptions): PipelineExecutor;
58
59
  export {};
@@ -1,5 +1,7 @@
1
1
  import type { EmbeddingVector } from './EmbeddingVector';
2
2
  /**
3
3
  * Pretty print an embedding vector for logging
4
+ *
5
+ * @public exported from `@promptbook/core`
4
6
  */
5
7
  export declare function embeddingVectorToString(embeddingVector: EmbeddingVector): string;
@@ -2,7 +2,7 @@ import type { PromptResultUsage } from '../PromptResultUsage';
2
2
  /**
3
3
  * @@@
4
4
  *
5
- * TODO: [🔼] Export with addUsage
5
+ * @public exported from `@promptbook/core`
6
6
  */
7
7
  export declare const ZERO_USAGE: import("type-fest/source/readonly-deep").ReadonlyObjectDeep<{
8
8
  readonly price: {
@@ -59,5 +59,7 @@ export declare const ZERO_USAGE: import("type-fest/source/readonly-deep").Readon
59
59
  * Function `addUsage` will add multiple usages into one
60
60
  *
61
61
  * Note: If you provide 0 values, it returns ZERO_USAGE
62
+ *
63
+ * @public exported from `@promptbook/core`
62
64
  */
63
65
  export declare function addUsage(...usageItems: Array<PromptResultUsage>): PromptResultUsage;
@@ -8,6 +8,7 @@ import type { Expectations } from '../../types/PipelineJson/Expectations';
8
8
  *
9
9
  * @throws {ExpectError} if the expectations are not met
10
10
  * @returns {void} Nothing
11
+ * @public exported from `@promptbook/core`
11
12
  */
12
13
  export declare function checkExpectations(expectations: Expectations, value: string): void;
13
14
  /**
@@ -18,6 +19,7 @@ export declare function checkExpectations(expectations: Expectations, value: str
18
19
  * - `isPassingExpectations` which returns a boolean
19
20
  *
20
21
  * @returns {boolean} True if the expectations are met
22
+ * @public exported from `@promptbook/core`
21
23
  */
22
24
  export declare function isPassingExpectations(expectations: Expectations, value: string): boolean;
23
25
  /**
@@ -13,6 +13,7 @@ type ForEachAsyncOptions = {
13
13
  * @param array - Array to iterate over
14
14
  * @param options - Options for the function
15
15
  * @param callbackfunction - Function to call for each item
16
+ * @public exported from `@promptbook/utils`
16
17
  */
17
18
  export declare function forEachAsync<TItem>(array: Array<TItem>, options: ForEachAsyncOptions, callbackfunction: (value: TItem, index: number, array: Array<TItem>) => Promisable<void>): Promise<void>;
18
19
  export {};
@@ -2,6 +2,8 @@ import type { string_markdown } from '../../types/typeAliases';
2
2
  import type { PromptResultUsage } from '../PromptResultUsage';
3
3
  /**
4
4
  * Function `usageToHuman` will take usage and convert it to human readable report
5
+ *
6
+ * @public exported from `@promptbook/core`
5
7
  */
6
8
  export declare function usageToHuman(usage: PromptResultUsage): string_markdown;
7
9
  /**
@@ -6,5 +6,7 @@ import type { UncertainNumber } from '../UncertainNumber';
6
6
  * Note: This is an estimate based of theese sources:
7
7
  * - https://jecas.cz/doba-cteni
8
8
  * - https://www.originalnitonery.cz/blog/psani-vsemi-deseti-se-muzete-naucit-i-sami-doma
9
+ *
10
+ * @public exported from `@promptbook/core`
9
11
  */
10
12
  export declare function usageToWorktime(usage: PromptResultUsage): UncertainNumber;
@@ -4,6 +4,7 @@ import type { string_name } from '../../types/typeAliases';
4
4
  * A format definition is a set of functions that define how to validate, heal and convert response from LLM
5
5
  *
6
6
  * @see https://github.com/webgptorg/promptbook/discussions/36
7
+ * @private still an internal experimental
7
8
  */
8
9
  export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends string, TSchema extends object> = {
9
10
  /**
@@ -66,4 +67,4 @@ export type FormatDefinition<TValue extends TPartialValue, TPartialValue extends
66
67
  * TODO: [🍓][🧠] Should execution tools be aviable to heal, canBeValid and isValid?
67
68
  * TODO: [🍓][🧠] llm Provider Bindings
68
69
  * TODO: [🍓][🔼] Export via some package
69
- */
70
+ */
@@ -1,4 +1,6 @@
1
1
  /**
2
2
  * Function isValidJsonString will tell you if the string is valid JSON or not
3
+ *
4
+ * @public exported from `@promptbook/utils`
3
5
  */
4
6
  export declare function isValidJsonString(value: string): boolean;
@@ -4,6 +4,8 @@ import type { CallbackInterfaceToolsOptions } from './CallbackInterfaceToolsOpti
4
4
  /**
5
5
  * Delagates the user interaction to a async callback function
6
6
  * You need to provide your own implementation of this callback function and its bind to UI.
7
+ *
8
+ * @public exported from `@promptbook/core`
7
9
  */
8
10
  export declare class CallbackInterfaceTools implements UserInterfaceTools {
9
11
  private readonly options;
@@ -3,6 +3,8 @@ import type { CommonExecutionToolsOptions } from '../../../execution/CommonExecu
3
3
  import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/UserInterfaceTools';
4
4
  /**
5
5
  * Options for `CallbackInterfaceTools`
6
+ *
7
+ * @public exported from `@promptbook/core`
6
8
  */
7
9
  export type CallbackInterfaceToolsOptions = CommonExecutionToolsOptions & {
8
10
  /**
@@ -6,6 +6,8 @@ import type { UserInterfaceToolsPromptDialogOptions } from '../../../execution/U
6
6
  *
7
7
  * Warning: It is used for testing and mocking
8
8
  * **NOT intended to use in the production** due to its synchronous nature.
9
+ *
10
+ * @public exported from `@promptbook/core`
9
11
  */
10
12
  export declare class SimplePromptInterfaceTools implements UserInterfaceTools {
11
13
  private readonly options;
@@ -17,4 +19,4 @@ export declare class SimplePromptInterfaceTools implements UserInterfaceTools {
17
19
  }
18
20
  /**
19
21
  * Note: [🔵] This code should never be published outside of `@promptbook/browser`
20
- */
22
+ */
@@ -7,6 +7,11 @@ import type { string_mime_type } from '../../../types/typeAliases';
7
7
  import type { string_mime_type_with_wildcard } from '../../../types/typeAliases';
8
8
  import type { string_promptbook_documentation_url } from '../../../types/typeAliases';
9
9
  import type { really_unknown } from '../../../utils/organization/really_unknown';
10
+ /**
11
+ * @@@
12
+ *
13
+ * @private still an internal experimental
14
+ */
10
15
  export type Scraper = {
11
16
  readonly description: string_markdown_text;
12
17
  readonly documentationUrl: string_promptbook_documentation_url;
@@ -14,6 +19,11 @@ export type Scraper = {
14
19
  readonly mimeTypes: Array<string_mime_type_with_wildcard>;
15
20
  scrape(source: ScraperSourceOptions): Promisable<string_markdown>;
16
21
  };
22
+ /**
23
+ * @@@
24
+ *
25
+ * @private still an internal experimental
26
+ */
17
27
  export type ScraperSourceOptions = {
18
28
  readonly source: string_knowledge_source_link;
19
29
  readonly mimeType: string_mime_type;
@@ -5,10 +5,10 @@ import type { KnowledgeSourceJson } from '../../../types/PipelineJson/KnowledgeS
5
5
  * Prepares the knowle
6
6
  *
7
7
  * @see https://github.com/webgptorg/promptbook/discussions/41
8
+ * @public exported from `@promptbook/core`
8
9
  */
9
10
  export declare function prepareKnowledgePieces(knowledgeSources: Array<KnowledgeSourceJson>, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'preparationIds'>>>;
10
11
  /**
11
- * TODO: [🐝][🔼] !!! Export via `@promptbook/core`
12
12
  * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
13
13
  * Put `knowledgePieces` into `PrepareKnowledgeOptions`
14
14
  * TODO: [🪂] More than max things can run in parallel by acident [1,[2a,2b,_],[3a,3b,_]]
@@ -3,6 +3,8 @@ import type { KnowledgePiecePreparedJson } from '../../../types/PipelineJson/Kno
3
3
  import type { string_markdown } from '../../../types/typeAliases';
4
4
  /**
5
5
  * @@@
6
+ *
7
+ * @public exported from `@promptbook/core`
6
8
  */
7
9
  export declare function prepareKnowledgeFromMarkdown(knowledgeContent: string_markdown, options: PrepareOptions): Promise<Array<Omit<KnowledgePiecePreparedJson, 'sources' | 'preparationIds'>>>;
8
10
  /**
@@ -1,4 +1,7 @@
1
1
  import type { LlmExecutionTools } from '../../execution/LlmExecutionTools';
2
+ /**
3
+ * @privxxate <- TODO: !!!!!! Warn that not private or exported
4
+ */
2
5
  export type CreateLlmToolsFromEnvOptions = {
3
6
  /**
4
7
  * This will will be passed to the created `LlmExecutionTools`
@@ -19,11 +22,11 @@ export type CreateLlmToolsFromEnvOptions = {
19
22
  * - `process.env.ANTHROPIC_CLAUDE_API_KEY`
20
23
  *
21
24
  * @returns @@@
25
+ * @public exported from `@promptbook/node`
22
26
  */
23
27
  export declare function createLlmToolsFromEnv(options?: CreateLlmToolsFromEnvOptions): LlmExecutionTools;
24
28
  /**
25
29
  * TODO: [🍜] Use `createLlmToolsFromConfiguration`
26
- * TODO: [🔼] !!! Export via `@promptbook/node`
27
30
  * TODO: @@@ write discussion about this - wizzard
28
31
  * TODO: Add Azure
29
32
  * TODO: [🧠] Which name is better `createLlmToolsFromEnv` or `createLlmToolsFromEnvironment`?
@@ -7,10 +7,10 @@ import type { CacheLlmToolsOptions } from './CacheLlmToolsOptions';
7
7
  *
8
8
  * @param llmTools LLM tools to be intercepted with usage counting, it can contain extra methods like `totalUsage`
9
9
  * @returns LLM tools with same functionality with added total cost counting
10
+ * @public exported from `@promptbook/core`
10
11
  */
11
12
  export declare function cacheLlmTools<TLlmTools extends LlmExecutionTools>(llmTools: TLlmTools, options?: Partial<CacheLlmToolsOptions>): TLlmTools;
12
13
  /**
13
- * TODO: [🔼] !!! Export via `@promptbook/core`
14
14
  * TODO: [🧠][💸] Maybe make some common abstraction `interceptLlmTools` and use here (or use javascript Proxy?)
15
15
  * TODO: [🧠] Is there some meaningfull way how to test this util
16
16
  * TODO: [👷‍♂️] @@@ Manual about construction of llmTools
@@ -5,10 +5,10 @@ import type { LlmExecutionToolsWithTotalUsage } from './LlmExecutionToolsWithTot
5
5
  *
6
6
  * @param llmTools LLM tools to be intercepted with usage counting
7
7
  * @returns LLM tools with same functionality with added total cost counting
8
+ * @public exported from `@promptbook/core`
8
9
  */
9
10
  export declare function countTotalUsage(llmTools: LlmExecutionTools): LlmExecutionToolsWithTotalUsage;
10
11
  /**
11
- * TODO: [🔼] !!! Export via `@promptbookcore/`
12
12
  * TODO: [🧠][💸] Maybe make some common abstraction `interceptLlmTools` and use here (or use javascript Proxy?)
13
13
  * TODO: [🧠] Is there some meaningfull way how to test this util
14
14
  * TODO: [🧠][🌯] Maybe a way how to hide ability to `get totalUsage`