@promptbook/browser 0.112.0-32 → 0.112.0-35

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 (1518) hide show
  1. package/README.md +18 -0
  2. package/esm/index.es.js +607 -600
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/_packages/types.index.d.ts +94 -94
  5. package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -4
  6. package/esm/src/book-2.0/agent-source/AgentModelRequirements.d.ts +0 -4
  7. package/esm/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +7 -0
  8. package/esm/src/book-2.0/agent-source/createTeamToolName.d.ts +1 -0
  9. package/esm/src/book-2.0/agent-source/extractOpenTeacherInstructions.d.ts +1 -0
  10. package/esm/src/book-2.0/agent-source/padBook.d.ts +1 -4
  11. package/esm/src/book-2.0/agent-source/parseAgentSource.d.ts +0 -3
  12. package/esm/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +1 -0
  13. package/esm/src/book-2.0/agent-source/parseParameters.d.ts +1 -0
  14. package/esm/src/book-2.0/agent-source/parseTeamCommitment.d.ts +0 -3
  15. package/esm/src/book-2.0/agent-source/pseudoAgentReferences.d.ts +8 -3
  16. package/esm/src/book-2.0/agent-source/string_book.d.ts +1 -0
  17. package/esm/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +0 -3
  18. package/esm/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +0 -3
  19. package/esm/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +0 -3
  20. package/esm/src/book-components/AvatarProfile/AvatarProfile/AvatarProfileTooltip.d.ts +4 -0
  21. package/esm/src/book-components/BookEditor/BookEditor.d.ts +0 -3
  22. package/esm/src/book-components/BookEditor/BookEditorActionbar.d.ts +4 -0
  23. package/esm/src/book-components/BookEditor/BookEditorMonaco.d.ts +2 -0
  24. package/esm/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +3 -0
  25. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +1 -0
  26. package/esm/src/book-components/BookEditor/useBookEditorMonacoDecorations.d.ts +6 -0
  27. package/esm/src/book-components/BookEditor/useBookEditorMonacoDiagnostics.d.ts +9 -0
  28. package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +7 -0
  29. package/esm/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +3 -0
  30. package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +24 -0
  31. package/esm/src/book-components/Chat/AgentChat/AgentChat.d.ts +0 -3
  32. package/esm/src/book-components/Chat/AgentChip/AgentChip.d.ts +6 -5
  33. package/esm/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +38 -0
  34. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -14
  35. package/esm/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +32 -0
  36. package/esm/src/book-components/Chat/Chat/ChatMessageToolCallChips.d.ts +22 -0
  37. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +2 -3
  38. package/esm/src/book-components/Chat/Chat/ChatSelfLearningSummary.d.ts +0 -3
  39. package/esm/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +0 -3
  40. package/esm/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +34 -0
  41. package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +1 -0
  42. package/esm/src/book-components/Chat/Chat/chatCssClassNames.d.ts +1 -0
  43. package/esm/src/book-components/Chat/Chat/constants.d.ts +4 -3
  44. package/esm/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.d.ts +76 -0
  45. package/esm/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +16 -0
  46. package/esm/src/book-components/Chat/Chat/insertDictationChunk.d.ts +16 -0
  47. package/esm/src/book-components/Chat/Chat/learnDictationDictionary.d.ts +7 -0
  48. package/esm/src/book-components/Chat/Chat/refineFinalDictationChunk.d.ts +36 -0
  49. package/esm/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +3 -0
  50. package/esm/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +27 -0
  51. package/esm/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +32 -0
  52. package/esm/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +33 -0
  53. package/esm/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +32 -0
  54. package/esm/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +32 -0
  55. package/esm/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +39 -0
  56. package/esm/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +39 -0
  57. package/esm/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +47 -0
  58. package/esm/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +34 -0
  59. package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +3 -2
  60. package/esm/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +30 -0
  61. package/esm/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +27 -0
  62. package/esm/src/book-components/Chat/Chat/resolveSpeechRecognitionUiDescriptor.d.ts +30 -0
  63. package/esm/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +10 -0
  64. package/esm/src/book-components/Chat/Chat/useChatInputAreaAttachments.d.ts +32 -0
  65. package/esm/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +53 -0
  66. package/esm/src/book-components/Chat/Chat/useChatInputAreaDictationPersistence.d.ts +20 -0
  67. package/esm/src/book-components/Chat/Chat/useChatInputAreaDictationSupport.d.ts +29 -0
  68. package/esm/src/book-components/Chat/Chat/useChatMessageAvatarTooltip.d.ts +31 -0
  69. package/esm/src/book-components/Chat/Chat/useChatMessageSpeechPlayback.d.ts +29 -0
  70. package/esm/src/book-components/Chat/LlmChat/defaults.d.ts +0 -3
  71. package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +3 -3
  72. package/esm/src/book-components/Chat/MockedChat/constants.d.ts +0 -3
  73. package/esm/src/book-components/Chat/SourceChip/SourceChip.d.ts +4 -3
  74. package/esm/src/book-components/Chat/effects/components/ConfettiEffect.d.ts +3 -0
  75. package/esm/src/book-components/Chat/effects/components/HeartsEffect.d.ts +3 -0
  76. package/esm/src/book-components/Chat/effects/index.d.ts +0 -4
  77. package/esm/src/book-components/Chat/effects/utils/detectEffects.d.ts +1 -0
  78. package/esm/src/book-components/Chat/hooks/useSendMessageToLlmChat.d.ts +4 -4
  79. package/esm/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +1 -0
  80. package/esm/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +0 -3
  81. package/esm/src/book-components/Chat/save/index.d.ts +0 -3
  82. package/esm/src/book-components/Chat/save/pdf/buildChatPdf.d.ts +1 -0
  83. package/esm/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +0 -4
  84. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +3 -5
  85. package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +0 -3
  86. package/esm/src/book-components/Chat/utils/ExportFormat.d.ts +2 -0
  87. package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +4 -3
  88. package/esm/src/book-components/Chat/utils/collectTeamToolCallSummary.d.ts +1 -0
  89. package/esm/src/book-components/Chat/utils/createCitationFootnoteRenderModel.d.ts +1 -0
  90. package/esm/src/book-components/Chat/utils/exportChatHistory.d.ts +0 -3
  91. package/esm/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +2 -1
  92. package/esm/src/book-components/Chat/utils/loadAgentProfile.d.ts +12 -0
  93. package/esm/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +0 -3
  94. package/esm/src/book-components/Chat/utils/parseImagePrompts.d.ts +1 -3
  95. package/esm/src/book-components/Chat/utils/sanitizeStreamingMessageContent.d.ts +14 -0
  96. package/esm/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +3 -0
  97. package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +0 -3
  98. package/esm/src/book-components/Chat/utils/toolCallParsing/extractSearchResults.d.ts +1 -0
  99. package/esm/src/book-components/Chat/utils/toolCallParsing/getToolCallResultDate.d.ts +1 -0
  100. package/esm/src/book-components/Chat/utils/toolCallParsing/getToolCallTimestamp.d.ts +1 -0
  101. package/esm/src/book-components/Chat/utils/toolCallParsing/parseRunBrowserToolResult.d.ts +1 -0
  102. package/esm/src/book-components/Chat/utils/toolCallParsing/parseTeamToolResult.d.ts +1 -0
  103. package/esm/src/book-components/Chat/utils/toolCallParsing/parseToolCallArguments.d.ts +1 -0
  104. package/esm/src/book-components/Chat/utils/toolCallParsing/parseToolCallResult.d.ts +1 -0
  105. package/esm/src/book-components/Chat/utils/toolCallParsing/resolveRunBrowserArtifactUrl.d.ts +1 -0
  106. package/esm/src/book-components/Chat/utils/walletCredentialToolCall.d.ts +3 -3
  107. package/esm/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +3 -5
  108. package/esm/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +3 -5
  109. package/esm/src/book-components/Qr/BrandedQrCode.d.ts +5 -0
  110. package/esm/src/book-components/Qr/GenericQrCode.d.ts +5 -0
  111. package/esm/src/book-components/Qr/PromptbookQrCode.d.ts +5 -0
  112. package/esm/src/book-components/Qr/useQrCode.d.ts +4 -1
  113. package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +4 -0
  114. package/esm/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +4 -0
  115. package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +3 -3
  116. package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -3
  117. package/esm/src/book-components/_common/Tooltip/Tooltip.d.ts +3 -0
  118. package/esm/src/book-components/icons/AboutIcon.d.ts +1 -0
  119. package/esm/src/book-components/icons/AttachmentIcon.d.ts +4 -0
  120. package/esm/src/book-components/icons/CameraIcon.d.ts +4 -0
  121. package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -0
  122. package/esm/src/book-components/icons/EmailIcon.d.ts +1 -0
  123. package/esm/src/book-components/icons/MenuIcon.d.ts +1 -3
  124. package/esm/src/book-components/icons/SaveIcon.d.ts +1 -0
  125. package/esm/src/book-components/icons/SendIcon.d.ts +0 -3
  126. package/esm/src/book-components/icons/TeacherIcon.d.ts +1 -0
  127. package/esm/src/cli/$runPromptbookCli.d.ts +0 -3
  128. package/esm/src/cli/cli-commands/_boilerplate.d.ts +0 -4
  129. package/esm/src/cli/cli-commands/about.d.ts +0 -6
  130. package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +18 -0
  131. package/esm/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +0 -4
  132. package/esm/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +0 -4
  133. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +0 -4
  134. package/esm/src/cli/cli-commands/coder/init.d.ts +0 -4
  135. package/esm/src/cli/cli-commands/coder/run.d.ts +1 -5
  136. package/esm/src/cli/cli-commands/coder/run.test.d.ts +1 -0
  137. package/esm/src/cli/cli-commands/coder/verify.d.ts +0 -4
  138. package/esm/src/cli/cli-commands/coder.d.ts +0 -4
  139. package/esm/src/cli/cli-commands/common/handleActionErrors.d.ts +4 -0
  140. package/esm/src/cli/cli-commands/hello.d.ts +0 -5
  141. package/esm/src/cli/cli-commands/list-models.d.ts +0 -4
  142. package/esm/src/cli/cli-commands/list-scrapers.d.ts +0 -4
  143. package/esm/src/cli/cli-commands/login.d.ts +0 -5
  144. package/esm/src/cli/cli-commands/make.d.ts +1 -1
  145. package/esm/src/cli/cli-commands/prettify.d.ts +0 -6
  146. package/esm/src/cli/cli-commands/run.d.ts +0 -8
  147. package/esm/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -5
  148. package/esm/src/cli/cli-commands/start-agents-server.d.ts +0 -4
  149. package/esm/src/cli/cli-commands/start-pipelines-server.d.ts +0 -5
  150. package/esm/src/cli/cli-commands/test-command.d.ts +0 -7
  151. package/esm/src/cli/common/$provideLlmToolsForCli.d.ts +5 -0
  152. package/esm/src/cli/main.d.ts +0 -4
  153. package/esm/src/cli/promptbookCli.d.ts +0 -7
  154. package/esm/src/collection/agent-collection/AgentCollection.d.ts +0 -3
  155. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +2 -6
  156. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +3 -0
  157. package/esm/src/collection/pipeline-collection/SimplePipelineCollection.d.ts +2 -1
  158. package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts +2 -5
  159. package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +1 -0
  160. package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts +4 -3
  161. package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts +2 -3
  162. package/esm/src/collection/pipeline-collection/constructors/createPipelineSubcollection.d.ts +1 -0
  163. package/esm/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +0 -3
  164. package/esm/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -0
  165. package/esm/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +1 -0
  166. package/esm/src/commands/EXPECT/ExpectCommand.d.ts +0 -3
  167. package/esm/src/commands/EXPECT/expectCommandParser.d.ts +3 -2
  168. package/esm/src/commands/FOREACH/ForeachCommand.d.ts +1 -0
  169. package/esm/src/commands/FOREACH/foreachCommandParser.d.ts +1 -3
  170. package/esm/src/commands/FORMAT/formatCommandParser.d.ts +1 -0
  171. package/esm/src/commands/FORMFACTOR/FormfactorCommand.d.ts +1 -0
  172. package/esm/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -0
  173. package/esm/src/commands/JOKER/JokerCommand.d.ts +1 -0
  174. package/esm/src/commands/JOKER/jokerCommandParser.d.ts +1 -0
  175. package/esm/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +1 -0
  176. package/esm/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -3
  177. package/esm/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts +0 -3
  178. package/esm/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.test.d.ts +0 -3
  179. package/esm/src/commands/MODEL/ModelCommand.d.ts +1 -0
  180. package/esm/src/commands/MODEL/modelCommandParser.d.ts +1 -0
  181. package/esm/src/commands/PARAMETER/ParameterCommand.d.ts +1 -0
  182. package/esm/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -0
  183. package/esm/src/commands/PERSONA/PersonaCommand.d.ts +1 -0
  184. package/esm/src/commands/PERSONA/personaCommandParser.d.ts +1 -0
  185. package/esm/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -0
  186. package/esm/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -0
  187. package/esm/src/commands/SECTION/SectionCommand.d.ts +1 -0
  188. package/esm/src/commands/SECTION/sectionCommandParser.d.ts +1 -0
  189. package/esm/src/commands/URL/UrlCommand.d.ts +1 -0
  190. package/esm/src/commands/URL/urlCommandParser.d.ts +1 -0
  191. package/esm/src/commands/X_ACTION/ActionCommand.d.ts +1 -0
  192. package/esm/src/commands/X_ACTION/actionCommandParser.d.ts +1 -3
  193. package/esm/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +1 -0
  194. package/esm/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -3
  195. package/esm/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +1 -0
  196. package/esm/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -0
  197. package/esm/src/commands/_common/stringifyCommand.d.ts +1 -1
  198. package/esm/src/commands/_common/types/CommandParser.d.ts +0 -4
  199. package/esm/src/commands/index.d.ts +0 -3
  200. package/esm/src/commitments/ACTION/ACTION.d.ts +0 -3
  201. package/esm/src/commitments/CLOSED/CLOSED.d.ts +0 -3
  202. package/esm/src/commitments/CLOSED/CLOSED.test.d.ts +0 -3
  203. package/esm/src/commitments/COMPONENT/COMPONENT.d.ts +0 -3
  204. package/esm/src/commitments/DELETE/DELETE.d.ts +0 -3
  205. package/esm/src/commitments/DICTIONARY/DICTIONARY.d.ts +0 -3
  206. package/esm/src/commitments/FORMAT/FORMAT.d.ts +0 -3
  207. package/esm/src/commitments/FROM/FROM.d.ts +0 -3
  208. package/esm/src/commitments/GOAL/GOAL.d.ts +0 -3
  209. package/esm/src/commitments/IMPORT/IMPORT.d.ts +0 -3
  210. package/esm/src/commitments/LANGUAGE/LANGUAGE.d.ts +0 -3
  211. package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -3
  212. package/esm/src/commitments/MESSAGE/MESSAGE.d.ts +0 -3
  213. package/esm/src/commitments/MESSAGE_SUFFIX/MESSAGE_SUFFIX.d.ts +0 -3
  214. package/esm/src/commitments/META/META.d.ts +0 -3
  215. package/esm/src/commitments/META/META_DESCRIPTION.d.ts +0 -3
  216. package/esm/src/commitments/META_COLOR/META_COLOR.d.ts +0 -3
  217. package/esm/src/commitments/META_DISCLAIMER/META_DISCLAIMER.d.ts +0 -3
  218. package/esm/src/commitments/META_DOMAIN/META_DOMAIN.d.ts +0 -3
  219. package/esm/src/commitments/META_FONT/META_FONT.d.ts +0 -3
  220. package/esm/src/commitments/META_IMAGE/META_IMAGE.d.ts +0 -3
  221. package/esm/src/commitments/META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER.d.ts +0 -3
  222. package/esm/src/commitments/META_LINK/META_LINK.d.ts +0 -3
  223. package/esm/src/commitments/META_VOICE/META_VOICE.d.ts +0 -3
  224. package/esm/src/commitments/MODEL/MODEL.d.ts +0 -3
  225. package/esm/src/commitments/OPEN/OPEN.d.ts +0 -3
  226. package/esm/src/commitments/PERSONA/PERSONA.d.ts +0 -3
  227. package/esm/src/commitments/RULE/RULE.d.ts +0 -3
  228. package/esm/src/commitments/SAMPLE/SAMPLE.d.ts +0 -3
  229. package/esm/src/commitments/SCENARIO/SCENARIO.d.ts +0 -3
  230. package/esm/src/commitments/TEAM/TEAM.d.ts +0 -3
  231. package/esm/src/commitments/TEMPLATE/TEMPLATE.d.ts +0 -3
  232. package/esm/src/commitments/USE/USE.d.ts +0 -3
  233. package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +2 -0
  234. package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -3
  235. package/esm/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +4 -7
  236. package/esm/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +0 -3
  237. package/esm/src/commitments/USE_CALENDAR/calendarReference.d.ts +0 -3
  238. package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -3
  239. package/esm/src/commitments/USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR.d.ts +0 -3
  240. package/esm/src/commitments/USE_MCP/USE_MCP.d.ts +0 -3
  241. package/esm/src/commitments/USE_POPUP/USE_POPUP.d.ts +0 -3
  242. package/esm/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +0 -3
  243. package/esm/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +0 -3
  244. package/esm/src/commitments/USE_PROJECT/projectReference.d.ts +0 -3
  245. package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -3
  246. package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -3
  247. package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -3
  248. package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -3
  249. package/esm/src/commitments/USE_USER_LOCATION/USE_USER_LOCATION.d.ts +0 -3
  250. package/esm/src/commitments/WALLET/WALLET.d.ts +0 -3
  251. package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +0 -3
  252. package/esm/src/commitments/WRITING_SAMPLE/WRITING_SAMPLE.d.ts +0 -3
  253. package/esm/src/commitments/_base/createEmptyAgentModelRequirements.d.ts +0 -3
  254. package/esm/src/commitments/_common/commitmentToolFunctions.d.ts +2 -3
  255. package/esm/src/commitments/_common/createWritingCommitmentSections.d.ts +2 -3
  256. package/esm/src/commitments/_common/getAllCommitmentDefinitions.d.ts +1 -0
  257. package/esm/src/commitments/_common/getAllCommitmentTypes.d.ts +1 -0
  258. package/esm/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +0 -4
  259. package/esm/src/commitments/_common/getCommitmentDefinition.d.ts +1 -0
  260. package/esm/src/commitments/_common/isCommitmentSupported.d.ts +1 -0
  261. package/esm/src/commitments/_common/toolExecutionEnvelope.d.ts +0 -3
  262. package/esm/src/commitments/_common/toolRuntimeContext.d.ts +3 -3
  263. package/esm/src/commitments/index.d.ts +0 -4
  264. package/esm/src/config.test.d.ts +0 -3
  265. package/esm/src/constants/streaming.d.ts +0 -3
  266. package/esm/src/constants.d.ts +0 -3
  267. package/esm/src/conversion/archive/loadArchive.d.ts +0 -3
  268. package/esm/src/conversion/archive/saveArchive.d.ts +0 -5
  269. package/esm/src/conversion/compilePipeline.d.ts +2 -7
  270. package/esm/src/conversion/compilePipelineOnRemoteServer.d.ts +2 -5
  271. package/esm/src/conversion/parsePipeline.d.ts +1 -11
  272. package/esm/src/conversion/pipelineJsonToString.d.ts +1 -7
  273. package/esm/src/conversion/prettify/prettifyPipelineString.d.ts +0 -4
  274. package/esm/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +0 -7
  275. package/esm/src/conversion/utils/extractParameterNamesFromTask.d.ts +1 -3
  276. package/esm/src/conversion/validation/_importPipeline.d.ts +6 -4
  277. package/esm/src/conversion/validation/pipelineStringToJson-parseErrors.test.d.ts +0 -3
  278. package/esm/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +0 -3
  279. package/esm/src/conversion/validation/validatePipeline.d.ts +3 -9
  280. package/esm/src/conversion/validation/validatePipeline.test.d.ts +0 -3
  281. package/esm/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -4
  282. package/esm/src/errors/0-BoilerplateError.d.ts +0 -3
  283. package/esm/src/errors/0-index.d.ts +0 -3
  284. package/esm/src/errors/DatabaseError.d.ts +0 -3
  285. package/esm/src/errors/ExpectError.d.ts +2 -1
  286. package/esm/src/errors/ParseError.d.ts +0 -3
  287. package/esm/src/errors/PipelineExecutionError.d.ts +0 -3
  288. package/esm/src/executables/$provideExecutablesForNode.d.ts +0 -5
  289. package/esm/src/executables/apps/locateLibreoffice.d.ts +0 -4
  290. package/esm/src/executables/apps/locatePandoc.d.ts +0 -4
  291. package/esm/src/executables/browsers/locateBrowser.d.ts +0 -1
  292. package/esm/src/executables/browsers/locateDefaultSystemBrowser.d.ts +0 -1
  293. package/esm/src/executables/locateApp.d.ts +0 -4
  294. package/esm/src/executables/platforms/locateAppOnLinux.d.ts +0 -4
  295. package/esm/src/executables/platforms/locateAppOnMacOs.d.ts +0 -4
  296. package/esm/src/executables/platforms/locateAppOnWindows.d.ts +0 -4
  297. package/esm/src/execution/AbstractTaskResult.d.ts +0 -4
  298. package/esm/src/execution/AvailableModel.d.ts +0 -4
  299. package/esm/src/execution/CommonToolsOptions.d.ts +0 -5
  300. package/esm/src/execution/ExecutionTask.d.ts +4 -4
  301. package/esm/src/execution/FilesystemTools.d.ts +0 -3
  302. package/esm/src/execution/LlmExecutionTools.d.ts +3 -9
  303. package/esm/src/execution/LlmExecutionToolsConstructor.d.ts +0 -3
  304. package/esm/src/execution/PipelineExecutor.d.ts +0 -3
  305. package/esm/src/execution/PipelineExecutorResult.d.ts +0 -3
  306. package/esm/src/execution/PromptResult.d.ts +1 -9
  307. package/esm/src/execution/PromptbookFetch.test-type.d.ts +0 -4
  308. package/esm/src/execution/ScriptExecutionTools.d.ts +0 -4
  309. package/esm/src/execution/Usage.d.ts +0 -3
  310. package/esm/src/execution/UserInterfaceTools.d.ts +3 -0
  311. package/esm/src/execution/assertsTaskSuccessful.d.ts +1 -3
  312. package/esm/src/execution/createPipelineExecutor/00-createPipelineExecutor.d.ts +1 -0
  313. package/esm/src/execution/createPipelineExecutor/20-executeTask.d.ts +0 -3
  314. package/esm/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -3
  315. package/esm/src/execution/createPipelineExecutor/getContextForTask.d.ts +1 -0
  316. package/esm/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +0 -4
  317. package/esm/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +0 -1
  318. package/esm/src/execution/execution-report/ExecutionReportJson.d.ts +1 -0
  319. package/esm/src/execution/execution-report/ExecutionReportString.d.ts +0 -3
  320. package/esm/src/execution/execution-report/executionReportJsonToString.d.ts +0 -5
  321. package/esm/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +3 -1
  322. package/esm/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +3 -1
  323. package/esm/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +3 -1
  324. package/esm/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +2 -0
  325. package/esm/src/execution/translation/automatic-translate/translateMessages.d.ts +3 -5
  326. package/esm/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -6
  327. package/esm/src/execution/utils/checkExpectations.d.ts +2 -5
  328. package/esm/src/execution/utils/forEachAsync.d.ts +5 -1
  329. package/esm/src/execution/utils/usage-constants.d.ts +0 -3
  330. package/esm/src/execution/utils/usageToHuman.d.ts +0 -8
  331. package/esm/src/execution/utils/validatePromptResult.d.ts +1 -0
  332. package/esm/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +1 -0
  333. package/esm/src/formats/_common/FormatParser.d.ts +2 -9
  334. package/esm/src/formats/_common/FormatSubvalueParser.d.ts +0 -3
  335. package/esm/src/formats/csv/CsvFormatParser.d.ts +2 -8
  336. package/esm/src/formats/index.d.ts +0 -3
  337. package/esm/src/formats/json/JsonFormatParser.d.ts +0 -11
  338. package/esm/src/formats/text/TextFormatParser.d.ts +0 -9
  339. package/esm/src/formats/xml/XmlFormatParser.d.ts +0 -11
  340. package/esm/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +1 -3
  341. package/esm/src/formfactors/_common/FormfactorDefinition.d.ts +1 -0
  342. package/esm/src/formfactors/index.d.ts +0 -3
  343. package/esm/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +0 -5
  344. package/esm/src/high-level-abstractions/index.d.ts +0 -4
  345. package/esm/src/high-level-abstractions/quick-chatbot/QuickChatbotHla.d.ts +0 -3
  346. package/esm/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +2 -3
  347. package/esm/src/llm-providers/_common/register/$llmToolsRegister.d.ts +2 -3
  348. package/esm/src/llm-providers/_common/register/$provideEnvFilename.d.ts +0 -3
  349. package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -3
  350. package/esm/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +3 -6
  351. package/esm/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +3 -7
  352. package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -18
  353. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +0 -4
  354. package/esm/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +0 -5
  355. package/esm/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +0 -6
  356. package/esm/src/llm-providers/_common/register/LlmToolsOptions.d.ts +0 -4
  357. package/esm/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +1 -0
  358. package/esm/src/llm-providers/_common/utils/assertUniqueModels.d.ts +0 -3
  359. package/esm/src/llm-providers/_common/utils/cache/CacheItem.d.ts +0 -3
  360. package/esm/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -0
  361. package/esm/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +0 -4
  362. package/esm/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -0
  363. package/esm/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +0 -7
  364. package/esm/src/llm-providers/_common/utils/removeUnsupportedModelRequirements.d.ts +4 -0
  365. package/esm/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +1 -0
  366. package/esm/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +0 -4
  367. package/esm/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +3 -7
  368. package/esm/src/llm-providers/_multiple/playground/playground.d.ts +0 -3
  369. package/esm/src/llm-providers/agent/Agent.d.ts +0 -3
  370. package/esm/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +0 -4
  371. package/esm/src/llm-providers/agent/RemoteAgent.d.ts +0 -4
  372. package/esm/src/llm-providers/agent/playground/playground.d.ts +0 -6
  373. package/esm/src/llm-providers/agent/register-configuration.d.ts +0 -5
  374. package/esm/src/llm-providers/agent/register-constructor.d.ts +0 -4
  375. package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -10
  376. package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +3 -3
  377. package/esm/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -8
  378. package/esm/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +1 -3
  379. package/esm/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.test.d.ts +0 -3
  380. package/esm/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +0 -7
  381. package/esm/src/llm-providers/anthropic-claude/playground/playground.d.ts +0 -5
  382. package/esm/src/llm-providers/anthropic-claude/register-configuration.d.ts +0 -3
  383. package/esm/src/llm-providers/anthropic-claude/register-constructor.d.ts +0 -5
  384. package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -6
  385. package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
  386. package/esm/src/llm-providers/azure-openai/createAzureOpenAiExecutionTools.d.ts +0 -4
  387. package/esm/src/llm-providers/azure-openai/playground/playground.d.ts +0 -4
  388. package/esm/src/llm-providers/azure-openai/register-configuration.d.ts +0 -3
  389. package/esm/src/llm-providers/azure-openai/register-constructor.d.ts +0 -4
  390. package/esm/src/llm-providers/deepseek/DeepseekExecutionToolsOptions.d.ts +1 -0
  391. package/esm/src/llm-providers/deepseek/createDeepseekExecutionTools.d.ts +0 -3
  392. package/esm/src/llm-providers/deepseek/deepseek-models.d.ts +1 -6
  393. package/esm/src/llm-providers/deepseek/register-configuration.d.ts +0 -3
  394. package/esm/src/llm-providers/deepseek/register-constructor.d.ts +0 -4
  395. package/esm/src/llm-providers/google/GoogleExecutionToolsOptions.d.ts +1 -0
  396. package/esm/src/llm-providers/google/createGoogleExecutionTools.d.ts +0 -4
  397. package/esm/src/llm-providers/google/google-models.d.ts +1 -6
  398. package/esm/src/llm-providers/google/register-configuration.d.ts +0 -3
  399. package/esm/src/llm-providers/google/register-constructor.d.ts +0 -4
  400. package/esm/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -5
  401. package/esm/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +0 -4
  402. package/esm/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +0 -3
  403. package/esm/src/llm-providers/mocked/test/joker.test.d.ts +0 -3
  404. package/esm/src/llm-providers/mocked/test/mocked-chat.test.d.ts +0 -4
  405. package/esm/src/llm-providers/mocked/test/mocked-completion.test.d.ts +0 -3
  406. package/esm/src/llm-providers/ollama/OllamaExecutionTools.d.ts +0 -3
  407. package/esm/src/llm-providers/ollama/OllamaExecutionToolsOptions.d.ts +1 -0
  408. package/esm/src/llm-providers/ollama/ollama-models.d.ts +1 -4
  409. package/esm/src/llm-providers/ollama/playground/playground.d.ts +0 -4
  410. package/esm/src/llm-providers/ollama/register-configuration.d.ts +0 -3
  411. package/esm/src/llm-providers/ollama/register-constructor.d.ts +0 -4
  412. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +10 -0
  413. package/esm/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -8
  414. package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +0 -7
  415. package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionToolsOptions.d.ts +2 -0
  416. package/esm/src/llm-providers/openai/computeOpenAiUsage.d.ts +1 -3
  417. package/esm/src/llm-providers/openai/computeOpenAiUsage.test.d.ts +0 -3
  418. package/esm/src/llm-providers/openai/createOpenAiAssistantExecutionTools.d.ts +0 -4
  419. package/esm/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +0 -4
  420. package/esm/src/llm-providers/openai/createOpenAiExecutionTools.d.ts +0 -4
  421. package/esm/src/llm-providers/openai/openai-models.d.ts +1 -0
  422. package/esm/src/llm-providers/openai/openai-models.test.d.ts +0 -3
  423. package/esm/src/llm-providers/openai/playground/playground.d.ts +0 -4
  424. package/esm/src/llm-providers/openai/register-configuration.d.ts +0 -3
  425. package/esm/src/llm-providers/openai/register-constructor.d.ts +0 -4
  426. package/esm/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -9
  427. package/esm/src/llm-providers/remote/playground/playground.d.ts +0 -3
  428. package/esm/src/llm-providers/vercel/playground/playground.d.ts +0 -4
  429. package/esm/src/other/templates/getBookTemplates.d.ts +2 -5
  430. package/esm/src/personas/preparePersona.d.ts +1 -7
  431. package/esm/src/pipeline/PipelineInterface/PipelineInterface.d.ts +1 -0
  432. package/esm/src/pipeline/PipelineInterface/constants.d.ts +0 -3
  433. package/esm/src/pipeline/PipelineJson/CommonTaskJson.d.ts +0 -4
  434. package/esm/src/pipeline/PipelineJson/DialogTaskJson.d.ts +1 -3
  435. package/esm/src/pipeline/PipelineJson/Expectations.d.ts +4 -3
  436. package/esm/src/pipeline/PipelineJson/KnowledgePieceJson.d.ts +0 -4
  437. package/esm/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +0 -3
  438. package/esm/src/pipeline/PipelineJson/PersonaJson.d.ts +0 -3
  439. package/esm/src/pipeline/PipelineJson/PreparationJson.d.ts +3 -5
  440. package/esm/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +1 -4
  441. package/esm/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +1 -3
  442. package/esm/src/pipeline/book-notation.d.ts +1 -4
  443. package/esm/src/pipeline/isValidPipelineString.d.ts +1 -3
  444. package/esm/src/pipeline/isValidPipelineString.test.d.ts +0 -3
  445. package/esm/src/pipeline/prompt-notation/helpers/ParameterEscaping.d.ts +5 -0
  446. package/esm/src/pipeline/prompt-notation/helpers/ParameterNaming.d.ts +1 -0
  447. package/esm/src/pipeline/prompt-notation/helpers/ParameterSection.d.ts +2 -0
  448. package/esm/src/pipeline/prompt-notation.d.ts +2 -5
  449. package/esm/src/pipeline/prompt-notation.test.d.ts +0 -3
  450. package/esm/src/pipeline/validatePipelineString.d.ts +1 -3
  451. package/esm/src/playground/permanent/_boilerplate.d.ts +0 -3
  452. package/esm/src/playground/permanent/agent-with-browser-playground.d.ts +0 -3
  453. package/esm/src/playground/permanent/error-handling-playground.d.ts +0 -3
  454. package/esm/src/playground/playground.d.ts +0 -4
  455. package/esm/src/postprocessing/utils/extractBlock.d.ts +2 -1
  456. package/esm/src/postprocessing/utils/extractJsonBlock.d.ts +2 -5
  457. package/esm/src/prepare/PrepareAndScrapeOptions.d.ts +0 -4
  458. package/esm/src/prepare/preparePipeline.d.ts +3 -2
  459. package/esm/src/prepare/preparePipelineOnRemoteServer.d.ts +2 -5
  460. package/esm/src/prepare/prepareTasks.d.ts +6 -10
  461. package/esm/src/prepare/unpreparePipeline.d.ts +1 -5
  462. package/esm/src/remote-server/RemoteServer.d.ts +3 -0
  463. package/esm/src/remote-server/openapi.d.ts +3 -4
  464. package/esm/src/remote-server/socket-types/_subtypes/Identification.d.ts +1 -5
  465. package/esm/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Request.d.ts +0 -3
  466. package/esm/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +0 -3
  467. package/esm/src/remote-server/startAgentServer.d.ts +6 -4
  468. package/esm/src/remote-server/startRemoteServer.d.ts +1 -16
  469. package/esm/src/remote-server/types/RemoteClientOptions.d.ts +0 -5
  470. package/esm/src/remote-server/types/RemoteServerOptions.d.ts +10 -4
  471. package/esm/src/remote-server/ui/ServerApp.d.ts +1 -0
  472. package/esm/src/remote-server/ui/types.d.ts +3 -0
  473. package/esm/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +1 -6
  474. package/esm/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +0 -3
  475. package/esm/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +0 -3
  476. package/esm/src/scrapers/_boilerplate/register-constructor.d.ts +0 -4
  477. package/esm/src/scrapers/_boilerplate/register-metadata.d.ts +0 -3
  478. package/esm/src/scrapers/_common/Scraper.d.ts +0 -5
  479. package/esm/src/scrapers/_common/ScraperIntermediateSource.d.ts +0 -3
  480. package/esm/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -0
  481. package/esm/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +0 -4
  482. package/esm/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -4
  483. package/esm/src/scrapers/_common/register/$provideScriptingForNode.d.ts +0 -4
  484. package/esm/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +0 -3
  485. package/esm/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +2 -3
  486. package/esm/src/scrapers/_common/register/$scrapersRegister.d.ts +2 -3
  487. package/esm/src/scrapers/_common/register/ScraperConstructor.d.ts +0 -3
  488. package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +0 -7
  489. package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.test.d.ts +0 -3
  490. package/esm/src/scrapers/_common/utils/promptbookFetch.d.ts +0 -3
  491. package/esm/src/scrapers/document/DocumentScraper.d.ts +1 -6
  492. package/esm/src/scrapers/document/DocumentScraper.test.d.ts +0 -3
  493. package/esm/src/scrapers/document/createDocumentScraper.d.ts +0 -3
  494. package/esm/src/scrapers/document/playground/document-scraper-playground.d.ts +0 -3
  495. package/esm/src/scrapers/document/register-constructor.d.ts +0 -4
  496. package/esm/src/scrapers/document/register-metadata.d.ts +0 -3
  497. package/esm/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -6
  498. package/esm/src/scrapers/document-legacy/LegacyDocumentScraper.test.d.ts +0 -3
  499. package/esm/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +0 -3
  500. package/esm/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +0 -3
  501. package/esm/src/scrapers/document-legacy/register-constructor.d.ts +0 -4
  502. package/esm/src/scrapers/document-legacy/register-metadata.d.ts +0 -3
  503. package/esm/src/scrapers/markdown/MarkdownScraper.d.ts +1 -4
  504. package/esm/src/scrapers/markdown/MarkdownScraper.test.d.ts +0 -3
  505. package/esm/src/scrapers/markdown/createMarkdownScraper.d.ts +0 -3
  506. package/esm/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +0 -3
  507. package/esm/src/scrapers/markdown/register-constructor.d.ts +0 -4
  508. package/esm/src/scrapers/markdown/register-metadata.d.ts +0 -3
  509. package/esm/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -7
  510. package/esm/src/scrapers/markitdown/createMarkitdownScraper.d.ts +0 -4
  511. package/esm/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +0 -3
  512. package/esm/src/scrapers/markitdown/register-constructor.d.ts +0 -5
  513. package/esm/src/scrapers/markitdown/register-metadata.d.ts +0 -3
  514. package/esm/src/scrapers/pdf/PdfScraper.d.ts +1 -6
  515. package/esm/src/scrapers/pdf/createPdfScraper.d.ts +0 -3
  516. package/esm/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +0 -3
  517. package/esm/src/scrapers/pdf/register-constructor.d.ts +0 -4
  518. package/esm/src/scrapers/pdf/register-metadata.d.ts +0 -3
  519. package/esm/src/scrapers/website/WebsiteScraper.d.ts +1 -6
  520. package/esm/src/scrapers/website/createWebsiteScraper.d.ts +0 -3
  521. package/esm/src/scrapers/website/playground/website-scraper-playground.d.ts +0 -3
  522. package/esm/src/scrapers/website/register-constructor.d.ts +0 -4
  523. package/esm/src/scrapers/website/register-metadata.d.ts +0 -3
  524. package/esm/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +1 -5
  525. package/esm/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -3
  526. package/esm/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
  527. package/esm/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +0 -3
  528. package/esm/src/scripting/javascript/postprocessing-functions.d.ts +0 -4
  529. package/esm/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +1 -3
  530. package/esm/src/search-engines/SearchEngine.d.ts +3 -0
  531. package/esm/src/speech-recognition/BrowserSpeechRecognition.d.ts +0 -4
  532. package/esm/src/speech-recognition/OpenAiSpeechRecognition.d.ts +2 -2
  533. package/esm/src/storage/_common/PromptbookStorage.d.ts +0 -4
  534. package/esm/src/storage/_common/PromptbookStorage.test-type.d.ts +0 -4
  535. package/esm/src/storage/env-storage/$EnvStorage.d.ts +0 -3
  536. package/esm/src/storage/file-cache-storage/FileCacheStorage.d.ts +0 -4
  537. package/esm/src/storage/local-storage/getIndexedDbStorage.d.ts +0 -3
  538. package/esm/src/storage/local-storage/getLocalStorage.d.ts +0 -3
  539. package/esm/src/storage/local-storage/getSessionStorage.d.ts +0 -3
  540. package/esm/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +1 -0
  541. package/esm/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +0 -4
  542. package/esm/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +1 -3
  543. package/esm/src/transpilers/formatted-book-in-markdown/register.d.ts +2 -5
  544. package/esm/src/transpilers/openai-sdk/playground/playground.d.ts +0 -3
  545. package/esm/src/transpilers/openai-sdk/register.d.ts +2 -5
  546. package/esm/src/types/Arrayable.d.ts +1 -0
  547. package/esm/src/types/InputParameters_private.d.ts +13 -0
  548. package/esm/src/types/IntermediateFilesStrategy.d.ts +0 -3
  549. package/esm/src/types/LlmCall.d.ts +0 -3
  550. package/esm/src/types/ModelRequirements.d.ts +1 -0
  551. package/esm/src/types/ModelVariant.d.ts +3 -0
  552. package/esm/src/types/Parameters.d.ts +31 -0
  553. package/esm/src/types/Parameters_private.d.ts +18 -0
  554. package/esm/src/types/Prompt.d.ts +1 -6
  555. package/esm/src/types/ReservedParameters_private.d.ts +11 -0
  556. package/esm/src/types/ToolCall.d.ts +0 -2
  557. package/esm/src/types/Updatable.d.ts +1 -3
  558. package/esm/src/types/number_bytes.d.ts +21 -0
  559. package/esm/src/types/number_id.d.ts +13 -0
  560. package/esm/src/types/number_likeness.d.ts +8 -0
  561. package/esm/src/types/number_milliseconds.d.ts +33 -0
  562. package/esm/src/types/number_percent.d.ts +18 -0
  563. package/esm/src/types/number_positive.d.ts +16 -0
  564. package/esm/src/types/number_usd.d.ts +6 -106
  565. package/esm/src/types/string_agent_hash_private.d.ts +9 -0
  566. package/esm/src/types/string_agent_name.d.ts +32 -0
  567. package/esm/src/types/string_agent_name_in_book_private.d.ts +8 -0
  568. package/esm/src/types/string_agent_name_private.d.ts +10 -0
  569. package/esm/src/types/string_agent_permanent_id_private.d.ts +11 -0
  570. package/esm/src/types/string_base64_private.d.ts +17 -0
  571. package/esm/src/types/string_business_category_name.d.ts +5 -0
  572. package/esm/src/types/string_business_category_name_private.d.ts +6 -0
  573. package/esm/src/types/string_char_private.d.ts +8 -0
  574. package/esm/src/types/string_chat_prompt_private.d.ts +9 -0
  575. package/esm/src/types/string_completion_prompt_private.d.ts +9 -0
  576. package/esm/src/types/string_email_private.d.ts +16 -0
  577. package/esm/src/types/string_host_private.d.ts +55 -0
  578. package/esm/src/types/string_markdown.d.ts +0 -1
  579. package/esm/src/types/string_mime_type_private.d.ts +18 -0
  580. package/esm/src/types/string_model_description_private.d.ts +8 -0
  581. package/esm/src/types/string_model_name.d.ts +7 -0
  582. package/esm/src/types/string_model_name_private.d.ts +8 -0
  583. package/esm/src/types/string_name.d.ts +31 -0
  584. package/esm/src/types/string_name_private.d.ts +9 -0
  585. package/esm/src/types/string_page.d.ts +15 -0
  586. package/esm/src/types/string_page_private.d.ts +9 -0
  587. package/esm/src/types/string_parameter_name.d.ts +11 -167
  588. package/esm/src/types/string_parameter_value_private.d.ts +9 -0
  589. package/esm/src/types/string_persona_description.d.ts +14 -0
  590. package/esm/src/types/string_persona_description_private.d.ts +8 -0
  591. package/esm/src/types/string_prompt.d.ts +49 -0
  592. package/esm/src/types/string_prompt_image_private.d.ts +8 -0
  593. package/esm/src/types/string_prompt_private.d.ts +8 -0
  594. package/esm/src/types/string_reserved_parameter_name_private.d.ts +11 -0
  595. package/esm/src/types/string_sha256.d.ts +2 -2
  596. package/esm/src/types/string_system_message_private.d.ts +9 -0
  597. package/esm/src/types/string_template_private.d.ts +8 -0
  598. package/esm/src/types/string_text_prompt_private.d.ts +9 -0
  599. package/esm/src/types/string_title.d.ts +8 -0
  600. package/esm/src/types/string_title_private.d.ts +9 -0
  601. package/esm/src/types/string_url.d.ts +50 -46
  602. package/esm/src/types/string_url_private.d.ts +88 -0
  603. package/esm/src/types/typeAliasEmoji.d.ts +0 -3
  604. package/esm/src/types/typeAliases.d.ts +7 -7
  605. package/esm/src/utils/DEFAULT_THINKING_MESSAGES.d.ts +5 -1
  606. package/esm/src/utils/chat/chatAttachments/appendChatAttachmentContext.d.ts +1 -0
  607. package/esm/src/utils/chat/chatAttachments/appendChatAttachmentContextWithContent.d.ts +1 -0
  608. package/esm/src/utils/chat/chatAttachments/formatChatAttachmentContentContext.d.ts +1 -0
  609. package/esm/src/utils/chat/chatAttachments/formatChatAttachmentContext.d.ts +1 -0
  610. package/esm/src/utils/chat/chatAttachments/normalizeChatAttachments.d.ts +1 -0
  611. package/esm/src/utils/chat/chatAttachments/resolveChatAttachmentContent.d.ts +1 -0
  612. package/esm/src/utils/chat/chatAttachments/resolveChatAttachmentContents.d.ts +1 -0
  613. package/esm/src/utils/chat/chatAttachments.d.ts +0 -3
  614. package/esm/src/utils/chat/constants.d.ts +0 -3
  615. package/esm/src/utils/clientVersion.d.ts +0 -3
  616. package/esm/src/utils/color/$randomColor.d.ts +0 -5
  617. package/esm/src/utils/color/css-colors.d.ts +0 -3
  618. package/esm/src/utils/color/internal-utils/hslToRgb.d.ts +0 -3
  619. package/esm/src/utils/color/internal-utils/rgbToHsl.d.ts +0 -3
  620. package/esm/src/utils/color/operators/ColorTransformer.d.ts +2 -0
  621. package/esm/src/utils/color/operators/lighten.d.ts +0 -3
  622. package/esm/src/utils/color/operators/saturate.d.ts +0 -3
  623. package/esm/src/utils/color/utils/areColorsEqual.d.ts +0 -3
  624. package/esm/src/utils/color/utils/colorDistance.d.ts +2 -2
  625. package/esm/src/utils/color/utils/colorHue.d.ts +0 -1
  626. package/esm/src/utils/color/utils/colorHueDistance.d.ts +0 -1
  627. package/esm/src/utils/color/utils/colorToDataUrl.d.ts +0 -3
  628. package/esm/src/utils/database/uniqueConstraint.d.ts +1 -3
  629. package/esm/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +3 -4
  630. package/esm/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +0 -3
  631. package/esm/src/utils/editable/types/PipelineEditableSerialized.d.ts +2 -2
  632. package/esm/src/utils/editable/utils/renamePipelineParameter.d.ts +4 -3
  633. package/esm/src/utils/editable/utils/stringifyPipelineJson.d.ts +0 -6
  634. package/esm/src/utils/environment/$detectRuntimeEnvironment.d.ts +0 -3
  635. package/esm/src/utils/environment/$getGlobalScope.d.ts +1 -1
  636. package/esm/src/utils/environment/$isRunningInBrowser.d.ts +0 -3
  637. package/esm/src/utils/environment/$isRunningInJest.d.ts +0 -3
  638. package/esm/src/utils/environment/$isRunningInNode.d.ts +0 -3
  639. package/esm/src/utils/environment/$isRunningInWebWorker.d.ts +0 -3
  640. package/esm/src/utils/execCommand/$execCommand.d.ts +0 -4
  641. package/esm/src/utils/execCommand/$execCommands.d.ts +0 -3
  642. package/esm/src/utils/execCommand/ExecCommandOptions.d.ts +3 -4
  643. package/esm/src/utils/expectation-counters/constants.d.ts +0 -4
  644. package/esm/src/utils/expectation-counters/countCharacters.d.ts +0 -4
  645. package/esm/src/utils/expectation-counters/countLines.d.ts +0 -4
  646. package/esm/src/utils/expectation-counters/countPages.d.ts +0 -4
  647. package/esm/src/utils/expectation-counters/countParagraphs.d.ts +0 -4
  648. package/esm/src/utils/expectation-counters/countSentences.d.ts +0 -4
  649. package/esm/src/utils/expectation-counters/countWords.d.ts +0 -5
  650. package/esm/src/utils/expectation-counters/index.d.ts +0 -4
  651. package/esm/src/utils/files/$induceBookDownload.d.ts +0 -3
  652. package/esm/src/utils/files/$induceFileDownload.d.ts +0 -3
  653. package/esm/src/utils/files/ObjectUrl.d.ts +0 -3
  654. package/esm/src/utils/files/isDirectoryExisting.d.ts +0 -6
  655. package/esm/src/utils/files/isExecutable.d.ts +0 -4
  656. package/esm/src/utils/files/isFileExisting.d.ts +0 -5
  657. package/esm/src/utils/files/listAllFiles.d.ts +1 -5
  658. package/esm/src/utils/files/readResponseBytes.d.ts +1 -0
  659. package/esm/src/utils/knowledge/inlineKnowledgeSource.d.ts +11 -6
  660. package/esm/src/utils/knowledge/simplifyKnowledgeLabel.d.ts +2 -0
  661. package/esm/src/utils/linguistic-hash/linguisticHash.d.ts +2 -1
  662. package/esm/src/utils/linguistic-hash/linguisticHashTypes.d.ts +0 -3
  663. package/esm/src/utils/linguistic-hash/linguisticHashWords.cs.d.ts +0 -3
  664. package/esm/src/utils/linguistic-hash/linguisticHashWords.en.d.ts +0 -3
  665. package/esm/src/utils/markdown/addAutoGeneratedSection.d.ts +0 -3
  666. package/esm/src/utils/markdown/createMarkdownTable.d.ts +0 -3
  667. package/esm/src/utils/markdown/escapeMarkdownBlock.d.ts +0 -3
  668. package/esm/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -3
  669. package/esm/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -0
  670. package/esm/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -4
  671. package/esm/src/utils/markdown/humanizeAiText.d.ts +0 -3
  672. package/esm/src/utils/markdown/humanizeAiTextEllipsis.d.ts +0 -3
  673. package/esm/src/utils/markdown/humanizeAiTextEmdashed.d.ts +0 -3
  674. package/esm/src/utils/markdown/humanizeAiTextQuotes.d.ts +0 -3
  675. package/esm/src/utils/markdown/humanizeAiTextSources.d.ts +0 -3
  676. package/esm/src/utils/markdown/humanizeAiTextWhitespace.d.ts +0 -3
  677. package/esm/src/utils/markdown/prettifyMarkdown.d.ts +4 -2
  678. package/esm/src/utils/markdown/promptbookifyAiText.d.ts +0 -3
  679. package/esm/src/utils/markdown/removeMarkdownComments.d.ts +1 -0
  680. package/esm/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
  681. package/esm/src/utils/markdown/removeMarkdownLinks.d.ts +1 -0
  682. package/esm/src/utils/markdown/trimCodeBlock.d.ts +1 -1
  683. package/esm/src/utils/markdown/trimEndOfCodeBlock.d.ts +1 -1
  684. package/esm/src/utils/misc/$getCurrentDate.d.ts +1 -0
  685. package/esm/src/utils/misc/aboutPromptbookInformation.d.ts +3 -3
  686. package/esm/src/utils/misc/computeHash.d.ts +0 -3
  687. package/esm/src/utils/misc/debounce.d.ts +2 -0
  688. package/esm/src/utils/misc/emojis.d.ts +3 -8
  689. package/esm/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +7 -2
  690. package/esm/src/utils/misc/parseNumber.d.ts +0 -4
  691. package/esm/src/utils/misc/xAboutPromptbookInformation.d.ts +3 -4
  692. package/esm/src/utils/normalization/IKeywords.d.ts +0 -3
  693. package/esm/src/utils/normalization/nameToUriPart.d.ts +1 -0
  694. package/esm/src/utils/normalization/nameToUriParts.d.ts +1 -0
  695. package/esm/src/utils/normalization/normalize-to-kebab-case.d.ts +2 -3
  696. package/esm/src/utils/normalization/normalizeTo_PascalCase.d.ts +2 -0
  697. package/esm/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +2 -0
  698. package/esm/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -3
  699. package/esm/src/utils/normalization/normalizeTo_snake_case.d.ts +1 -0
  700. package/esm/src/utils/normalization/orderJson.d.ts +1 -0
  701. package/esm/src/utils/normalization/orderJson.test.d.ts +0 -3
  702. package/esm/src/utils/normalization/parseKeywords.d.ts +1 -4
  703. package/esm/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
  704. package/esm/src/utils/normalization/removeDiacritics.d.ts +1 -3
  705. package/esm/src/utils/normalization/removeEmojis.d.ts +1 -0
  706. package/esm/src/utils/normalization/removeQuotes.d.ts +1 -0
  707. package/esm/src/utils/normalization/searchKeywords.d.ts +1 -3
  708. package/esm/src/utils/normalization/titleToName.d.ts +1 -0
  709. package/esm/src/utils/normalization/unwrapResult.d.ts +1 -3
  710. package/esm/src/utils/organization/$sideEffect.d.ts +1 -0
  711. package/esm/src/utils/organization/TODO_USE.d.ts +1 -0
  712. package/esm/src/utils/organization/just.d.ts +1 -0
  713. package/esm/src/utils/organization/keepImported.d.ts +1 -0
  714. package/esm/src/utils/organization/keepTypeImported.d.ts +1 -0
  715. package/esm/src/utils/organization/keepUnused.d.ts +1 -0
  716. package/esm/src/utils/organization/preserve.d.ts +1 -3
  717. package/esm/src/utils/organization/really_any.d.ts +1 -0
  718. package/esm/src/utils/organization/spaceTrim.d.ts +3 -2
  719. package/esm/src/utils/parameters/extractParameterNames.d.ts +1 -0
  720. package/esm/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +1 -0
  721. package/esm/src/utils/parameters/templateParameters.d.ts +2 -1
  722. package/esm/src/utils/parameters/valueToString.d.ts +2 -2
  723. package/esm/src/utils/random/$generateBookBoilerplate.d.ts +3 -3
  724. package/esm/src/utils/random/$randomAgentPersona.d.ts +1 -3
  725. package/esm/src/utils/random/$randomAgentRule.d.ts +1 -3
  726. package/esm/src/utils/random/$randomFullnameWithColor.d.ts +4 -3
  727. package/esm/src/utils/random/$randomItem.d.ts +0 -3
  728. package/esm/src/utils/random/$randomSeed.d.ts +0 -3
  729. package/esm/src/utils/random/$randomToken.d.ts +2 -5
  730. package/esm/src/utils/random/EnglishNamePool.d.ts +1 -0
  731. package/esm/src/utils/serialization/$deepFreeze.d.ts +1 -3
  732. package/esm/src/utils/serialization/checkSerializableAsJson.d.ts +1 -5
  733. package/esm/src/utils/serialization/clonePipeline.d.ts +1 -3
  734. package/esm/src/utils/serialization/deepClone.d.ts +1 -3
  735. package/esm/src/utils/serialization/exportJson.d.ts +1 -3
  736. package/esm/src/utils/serialization/isSerializableAsJson.d.ts +0 -5
  737. package/esm/src/utils/serialization/jsonStringsToJsons.d.ts +1 -4
  738. package/esm/src/utils/serialization/serializeToPromptbookJavascript.d.ts +3 -3
  739. package/esm/src/utils/sets/difference.d.ts +1 -3
  740. package/esm/src/utils/sets/intersection.d.ts +1 -0
  741. package/esm/src/utils/sets/union.d.ts +1 -0
  742. package/esm/src/utils/take/classes/TakeChain.d.ts +4 -1
  743. package/esm/src/utils/take/interfaces/ITakeChain.d.ts +5 -1
  744. package/esm/src/utils/take/interfaces/Takeable.d.ts +2 -1
  745. package/esm/src/utils/take/take.d.ts +1 -1
  746. package/esm/src/utils/validators/filePath/isRootPath.d.ts +1 -3
  747. package/esm/src/utils/validators/filePath/isRootPath.test.d.ts +0 -3
  748. package/esm/src/utils/validators/filePath/isValidFilePath.d.ts +1 -3
  749. package/esm/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +1 -0
  750. package/esm/src/utils/validators/parameterName/validateParameterName.d.ts +1 -0
  751. package/esm/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -1
  752. package/esm/src/utils/validators/url/extractUrlsFromText.d.ts +1 -0
  753. package/esm/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
  754. package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +0 -3
  755. package/esm/src/utils/validators/url/isValidPipelineUrl.d.ts +0 -3
  756. package/esm/src/utils/validators/url/normalizeDomainForMatching.d.ts +1 -0
  757. package/esm/src/version.d.ts +1 -1
  758. package/esm/src/wizard/$getCompiledBook.d.ts +0 -4
  759. package/esm/src/wizard/wizard.d.ts +1 -4
  760. package/package.json +2 -2
  761. package/umd/index.umd.js +607 -600
  762. package/umd/index.umd.js.map +1 -1
  763. package/umd/src/_packages/types.index.d.ts +94 -94
  764. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -4
  765. package/umd/src/book-2.0/agent-source/AgentModelRequirements.d.ts +0 -4
  766. package/umd/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +7 -0
  767. package/umd/src/book-2.0/agent-source/createTeamToolName.d.ts +1 -0
  768. package/umd/src/book-2.0/agent-source/extractOpenTeacherInstructions.d.ts +1 -0
  769. package/umd/src/book-2.0/agent-source/padBook.d.ts +1 -4
  770. package/umd/src/book-2.0/agent-source/parseAgentSource.d.ts +0 -3
  771. package/umd/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +1 -0
  772. package/umd/src/book-2.0/agent-source/parseParameters.d.ts +1 -0
  773. package/umd/src/book-2.0/agent-source/parseTeamCommitment.d.ts +0 -3
  774. package/umd/src/book-2.0/agent-source/pseudoAgentReferences.d.ts +8 -3
  775. package/umd/src/book-2.0/agent-source/string_book.d.ts +1 -0
  776. package/umd/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +0 -3
  777. package/umd/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +0 -3
  778. package/umd/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +0 -3
  779. package/umd/src/book-components/AvatarProfile/AvatarProfile/AvatarProfileTooltip.d.ts +4 -0
  780. package/umd/src/book-components/BookEditor/BookEditor.d.ts +0 -3
  781. package/umd/src/book-components/BookEditor/BookEditorActionbar.d.ts +4 -0
  782. package/umd/src/book-components/BookEditor/BookEditorMonaco.d.ts +2 -0
  783. package/umd/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +3 -0
  784. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +1 -0
  785. package/umd/src/book-components/BookEditor/useBookEditorMonacoDecorations.d.ts +6 -0
  786. package/umd/src/book-components/BookEditor/useBookEditorMonacoDiagnostics.d.ts +9 -0
  787. package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +7 -0
  788. package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +3 -0
  789. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +24 -0
  790. package/umd/src/book-components/Chat/AgentChat/AgentChat.d.ts +0 -3
  791. package/umd/src/book-components/Chat/AgentChip/AgentChip.d.ts +6 -5
  792. package/umd/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +38 -0
  793. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -14
  794. package/umd/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +32 -0
  795. package/umd/src/book-components/Chat/Chat/ChatMessageToolCallChips.d.ts +22 -0
  796. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +2 -3
  797. package/umd/src/book-components/Chat/Chat/ChatSelfLearningSummary.d.ts +0 -3
  798. package/umd/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +0 -3
  799. package/umd/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +34 -0
  800. package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +1 -0
  801. package/umd/src/book-components/Chat/Chat/chatCssClassNames.d.ts +1 -0
  802. package/umd/src/book-components/Chat/Chat/constants.d.ts +4 -3
  803. package/umd/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.d.ts +76 -0
  804. package/umd/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +16 -0
  805. package/umd/src/book-components/Chat/Chat/insertDictationChunk.d.ts +16 -0
  806. package/umd/src/book-components/Chat/Chat/learnDictationDictionary.d.ts +7 -0
  807. package/umd/src/book-components/Chat/Chat/refineFinalDictationChunk.d.ts +36 -0
  808. package/umd/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +3 -0
  809. package/umd/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +27 -0
  810. package/umd/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +32 -0
  811. package/umd/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +33 -0
  812. package/umd/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +32 -0
  813. package/umd/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +32 -0
  814. package/umd/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +39 -0
  815. package/umd/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +39 -0
  816. package/umd/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +47 -0
  817. package/umd/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +34 -0
  818. package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +3 -2
  819. package/umd/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +30 -0
  820. package/umd/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +27 -0
  821. package/umd/src/book-components/Chat/Chat/resolveSpeechRecognitionUiDescriptor.d.ts +30 -0
  822. package/umd/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +10 -0
  823. package/umd/src/book-components/Chat/Chat/useChatInputAreaAttachments.d.ts +32 -0
  824. package/umd/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +53 -0
  825. package/umd/src/book-components/Chat/Chat/useChatInputAreaDictationPersistence.d.ts +20 -0
  826. package/umd/src/book-components/Chat/Chat/useChatInputAreaDictationSupport.d.ts +29 -0
  827. package/umd/src/book-components/Chat/Chat/useChatMessageAvatarTooltip.d.ts +31 -0
  828. package/umd/src/book-components/Chat/Chat/useChatMessageSpeechPlayback.d.ts +29 -0
  829. package/umd/src/book-components/Chat/LlmChat/defaults.d.ts +0 -3
  830. package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +3 -3
  831. package/umd/src/book-components/Chat/MockedChat/constants.d.ts +0 -3
  832. package/umd/src/book-components/Chat/SourceChip/SourceChip.d.ts +4 -3
  833. package/umd/src/book-components/Chat/effects/components/ConfettiEffect.d.ts +3 -0
  834. package/umd/src/book-components/Chat/effects/components/HeartsEffect.d.ts +3 -0
  835. package/umd/src/book-components/Chat/effects/index.d.ts +0 -4
  836. package/umd/src/book-components/Chat/effects/utils/detectEffects.d.ts +1 -0
  837. package/umd/src/book-components/Chat/hooks/useSendMessageToLlmChat.d.ts +4 -4
  838. package/umd/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +1 -0
  839. package/umd/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +0 -3
  840. package/umd/src/book-components/Chat/save/index.d.ts +0 -3
  841. package/umd/src/book-components/Chat/save/pdf/buildChatPdf.d.ts +1 -0
  842. package/umd/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +0 -4
  843. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +3 -5
  844. package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +0 -3
  845. package/umd/src/book-components/Chat/utils/ExportFormat.d.ts +2 -0
  846. package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +4 -3
  847. package/umd/src/book-components/Chat/utils/collectTeamToolCallSummary.d.ts +1 -0
  848. package/umd/src/book-components/Chat/utils/createCitationFootnoteRenderModel.d.ts +1 -0
  849. package/umd/src/book-components/Chat/utils/exportChatHistory.d.ts +0 -3
  850. package/umd/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +2 -1
  851. package/umd/src/book-components/Chat/utils/loadAgentProfile.d.ts +12 -0
  852. package/umd/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +0 -3
  853. package/umd/src/book-components/Chat/utils/parseImagePrompts.d.ts +1 -3
  854. package/umd/src/book-components/Chat/utils/sanitizeStreamingMessageContent.d.ts +14 -0
  855. package/umd/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +3 -0
  856. package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +0 -3
  857. package/umd/src/book-components/Chat/utils/toolCallParsing/extractSearchResults.d.ts +1 -0
  858. package/umd/src/book-components/Chat/utils/toolCallParsing/getToolCallResultDate.d.ts +1 -0
  859. package/umd/src/book-components/Chat/utils/toolCallParsing/getToolCallTimestamp.d.ts +1 -0
  860. package/umd/src/book-components/Chat/utils/toolCallParsing/parseRunBrowserToolResult.d.ts +1 -0
  861. package/umd/src/book-components/Chat/utils/toolCallParsing/parseTeamToolResult.d.ts +1 -0
  862. package/umd/src/book-components/Chat/utils/toolCallParsing/parseToolCallArguments.d.ts +1 -0
  863. package/umd/src/book-components/Chat/utils/toolCallParsing/parseToolCallResult.d.ts +1 -0
  864. package/umd/src/book-components/Chat/utils/toolCallParsing/resolveRunBrowserArtifactUrl.d.ts +1 -0
  865. package/umd/src/book-components/Chat/utils/walletCredentialToolCall.d.ts +3 -3
  866. package/umd/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +3 -5
  867. package/umd/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +3 -5
  868. package/umd/src/book-components/Qr/BrandedQrCode.d.ts +5 -0
  869. package/umd/src/book-components/Qr/GenericQrCode.d.ts +5 -0
  870. package/umd/src/book-components/Qr/PromptbookQrCode.d.ts +5 -0
  871. package/umd/src/book-components/Qr/useQrCode.d.ts +4 -1
  872. package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +4 -0
  873. package/umd/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +4 -0
  874. package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +3 -3
  875. package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -3
  876. package/umd/src/book-components/_common/Tooltip/Tooltip.d.ts +3 -0
  877. package/umd/src/book-components/icons/AboutIcon.d.ts +1 -0
  878. package/umd/src/book-components/icons/AttachmentIcon.d.ts +4 -0
  879. package/umd/src/book-components/icons/CameraIcon.d.ts +4 -0
  880. package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -0
  881. package/umd/src/book-components/icons/EmailIcon.d.ts +1 -0
  882. package/umd/src/book-components/icons/MenuIcon.d.ts +1 -3
  883. package/umd/src/book-components/icons/SaveIcon.d.ts +1 -0
  884. package/umd/src/book-components/icons/SendIcon.d.ts +0 -3
  885. package/umd/src/book-components/icons/TeacherIcon.d.ts +1 -0
  886. package/umd/src/cli/$runPromptbookCli.d.ts +0 -3
  887. package/umd/src/cli/cli-commands/_boilerplate.d.ts +0 -4
  888. package/umd/src/cli/cli-commands/about.d.ts +0 -6
  889. package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +18 -0
  890. package/umd/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +0 -4
  891. package/umd/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +0 -4
  892. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +0 -4
  893. package/umd/src/cli/cli-commands/coder/init.d.ts +0 -4
  894. package/umd/src/cli/cli-commands/coder/run.d.ts +1 -5
  895. package/umd/src/cli/cli-commands/coder/run.test.d.ts +1 -0
  896. package/umd/src/cli/cli-commands/coder/verify.d.ts +0 -4
  897. package/umd/src/cli/cli-commands/coder.d.ts +0 -4
  898. package/umd/src/cli/cli-commands/common/handleActionErrors.d.ts +4 -0
  899. package/umd/src/cli/cli-commands/hello.d.ts +0 -5
  900. package/umd/src/cli/cli-commands/list-models.d.ts +0 -4
  901. package/umd/src/cli/cli-commands/list-scrapers.d.ts +0 -4
  902. package/umd/src/cli/cli-commands/login.d.ts +0 -5
  903. package/umd/src/cli/cli-commands/make.d.ts +1 -1
  904. package/umd/src/cli/cli-commands/prettify.d.ts +0 -6
  905. package/umd/src/cli/cli-commands/run.d.ts +0 -8
  906. package/umd/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -5
  907. package/umd/src/cli/cli-commands/start-agents-server.d.ts +0 -4
  908. package/umd/src/cli/cli-commands/start-pipelines-server.d.ts +0 -5
  909. package/umd/src/cli/cli-commands/test-command.d.ts +0 -7
  910. package/umd/src/cli/common/$provideLlmToolsForCli.d.ts +5 -0
  911. package/umd/src/cli/main.d.ts +0 -4
  912. package/umd/src/cli/promptbookCli.d.ts +0 -7
  913. package/umd/src/collection/agent-collection/AgentCollection.d.ts +0 -3
  914. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +2 -6
  915. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +3 -0
  916. package/umd/src/collection/pipeline-collection/SimplePipelineCollection.d.ts +2 -1
  917. package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts +2 -5
  918. package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +1 -0
  919. package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts +4 -3
  920. package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts +2 -3
  921. package/umd/src/collection/pipeline-collection/constructors/createPipelineSubcollection.d.ts +1 -0
  922. package/umd/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +0 -3
  923. package/umd/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -0
  924. package/umd/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +1 -0
  925. package/umd/src/commands/EXPECT/ExpectCommand.d.ts +0 -3
  926. package/umd/src/commands/EXPECT/expectCommandParser.d.ts +3 -2
  927. package/umd/src/commands/FOREACH/ForeachCommand.d.ts +1 -0
  928. package/umd/src/commands/FOREACH/foreachCommandParser.d.ts +1 -3
  929. package/umd/src/commands/FORMAT/formatCommandParser.d.ts +1 -0
  930. package/umd/src/commands/FORMFACTOR/FormfactorCommand.d.ts +1 -0
  931. package/umd/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -0
  932. package/umd/src/commands/JOKER/JokerCommand.d.ts +1 -0
  933. package/umd/src/commands/JOKER/jokerCommandParser.d.ts +1 -0
  934. package/umd/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +1 -0
  935. package/umd/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -3
  936. package/umd/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts +0 -3
  937. package/umd/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.test.d.ts +0 -3
  938. package/umd/src/commands/MODEL/ModelCommand.d.ts +1 -0
  939. package/umd/src/commands/MODEL/modelCommandParser.d.ts +1 -0
  940. package/umd/src/commands/PARAMETER/ParameterCommand.d.ts +1 -0
  941. package/umd/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -0
  942. package/umd/src/commands/PERSONA/PersonaCommand.d.ts +1 -0
  943. package/umd/src/commands/PERSONA/personaCommandParser.d.ts +1 -0
  944. package/umd/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -0
  945. package/umd/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -0
  946. package/umd/src/commands/SECTION/SectionCommand.d.ts +1 -0
  947. package/umd/src/commands/SECTION/sectionCommandParser.d.ts +1 -0
  948. package/umd/src/commands/URL/UrlCommand.d.ts +1 -0
  949. package/umd/src/commands/URL/urlCommandParser.d.ts +1 -0
  950. package/umd/src/commands/X_ACTION/ActionCommand.d.ts +1 -0
  951. package/umd/src/commands/X_ACTION/actionCommandParser.d.ts +1 -3
  952. package/umd/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +1 -0
  953. package/umd/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -3
  954. package/umd/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +1 -0
  955. package/umd/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -0
  956. package/umd/src/commands/_common/stringifyCommand.d.ts +1 -1
  957. package/umd/src/commands/_common/types/CommandParser.d.ts +0 -4
  958. package/umd/src/commands/index.d.ts +0 -3
  959. package/umd/src/commitments/ACTION/ACTION.d.ts +0 -3
  960. package/umd/src/commitments/CLOSED/CLOSED.d.ts +0 -3
  961. package/umd/src/commitments/CLOSED/CLOSED.test.d.ts +0 -3
  962. package/umd/src/commitments/COMPONENT/COMPONENT.d.ts +0 -3
  963. package/umd/src/commitments/DELETE/DELETE.d.ts +0 -3
  964. package/umd/src/commitments/DICTIONARY/DICTIONARY.d.ts +0 -3
  965. package/umd/src/commitments/FORMAT/FORMAT.d.ts +0 -3
  966. package/umd/src/commitments/FROM/FROM.d.ts +0 -3
  967. package/umd/src/commitments/GOAL/GOAL.d.ts +0 -3
  968. package/umd/src/commitments/IMPORT/IMPORT.d.ts +0 -3
  969. package/umd/src/commitments/LANGUAGE/LANGUAGE.d.ts +0 -3
  970. package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -3
  971. package/umd/src/commitments/MESSAGE/MESSAGE.d.ts +0 -3
  972. package/umd/src/commitments/MESSAGE_SUFFIX/MESSAGE_SUFFIX.d.ts +0 -3
  973. package/umd/src/commitments/META/META.d.ts +0 -3
  974. package/umd/src/commitments/META/META_DESCRIPTION.d.ts +0 -3
  975. package/umd/src/commitments/META_COLOR/META_COLOR.d.ts +0 -3
  976. package/umd/src/commitments/META_DISCLAIMER/META_DISCLAIMER.d.ts +0 -3
  977. package/umd/src/commitments/META_DOMAIN/META_DOMAIN.d.ts +0 -3
  978. package/umd/src/commitments/META_FONT/META_FONT.d.ts +0 -3
  979. package/umd/src/commitments/META_IMAGE/META_IMAGE.d.ts +0 -3
  980. package/umd/src/commitments/META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER.d.ts +0 -3
  981. package/umd/src/commitments/META_LINK/META_LINK.d.ts +0 -3
  982. package/umd/src/commitments/META_VOICE/META_VOICE.d.ts +0 -3
  983. package/umd/src/commitments/MODEL/MODEL.d.ts +0 -3
  984. package/umd/src/commitments/OPEN/OPEN.d.ts +0 -3
  985. package/umd/src/commitments/PERSONA/PERSONA.d.ts +0 -3
  986. package/umd/src/commitments/RULE/RULE.d.ts +0 -3
  987. package/umd/src/commitments/SAMPLE/SAMPLE.d.ts +0 -3
  988. package/umd/src/commitments/SCENARIO/SCENARIO.d.ts +0 -3
  989. package/umd/src/commitments/TEAM/TEAM.d.ts +0 -3
  990. package/umd/src/commitments/TEMPLATE/TEMPLATE.d.ts +0 -3
  991. package/umd/src/commitments/USE/USE.d.ts +0 -3
  992. package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +2 -0
  993. package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -3
  994. package/umd/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +4 -7
  995. package/umd/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +0 -3
  996. package/umd/src/commitments/USE_CALENDAR/calendarReference.d.ts +0 -3
  997. package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -3
  998. package/umd/src/commitments/USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR.d.ts +0 -3
  999. package/umd/src/commitments/USE_MCP/USE_MCP.d.ts +0 -3
  1000. package/umd/src/commitments/USE_POPUP/USE_POPUP.d.ts +0 -3
  1001. package/umd/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +0 -3
  1002. package/umd/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +0 -3
  1003. package/umd/src/commitments/USE_PROJECT/projectReference.d.ts +0 -3
  1004. package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -3
  1005. package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -3
  1006. package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -3
  1007. package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -3
  1008. package/umd/src/commitments/USE_USER_LOCATION/USE_USER_LOCATION.d.ts +0 -3
  1009. package/umd/src/commitments/WALLET/WALLET.d.ts +0 -3
  1010. package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +0 -3
  1011. package/umd/src/commitments/WRITING_SAMPLE/WRITING_SAMPLE.d.ts +0 -3
  1012. package/umd/src/commitments/_base/createEmptyAgentModelRequirements.d.ts +0 -3
  1013. package/umd/src/commitments/_common/commitmentToolFunctions.d.ts +2 -3
  1014. package/umd/src/commitments/_common/createWritingCommitmentSections.d.ts +2 -3
  1015. package/umd/src/commitments/_common/getAllCommitmentDefinitions.d.ts +1 -0
  1016. package/umd/src/commitments/_common/getAllCommitmentTypes.d.ts +1 -0
  1017. package/umd/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +0 -4
  1018. package/umd/src/commitments/_common/getCommitmentDefinition.d.ts +1 -0
  1019. package/umd/src/commitments/_common/isCommitmentSupported.d.ts +1 -0
  1020. package/umd/src/commitments/_common/toolExecutionEnvelope.d.ts +0 -3
  1021. package/umd/src/commitments/_common/toolRuntimeContext.d.ts +3 -3
  1022. package/umd/src/commitments/index.d.ts +0 -4
  1023. package/umd/src/config.test.d.ts +0 -3
  1024. package/umd/src/constants/streaming.d.ts +0 -3
  1025. package/umd/src/constants.d.ts +0 -3
  1026. package/umd/src/conversion/archive/loadArchive.d.ts +0 -3
  1027. package/umd/src/conversion/archive/saveArchive.d.ts +0 -5
  1028. package/umd/src/conversion/compilePipeline.d.ts +2 -7
  1029. package/umd/src/conversion/compilePipelineOnRemoteServer.d.ts +2 -5
  1030. package/umd/src/conversion/parsePipeline.d.ts +1 -11
  1031. package/umd/src/conversion/pipelineJsonToString.d.ts +1 -7
  1032. package/umd/src/conversion/prettify/prettifyPipelineString.d.ts +0 -4
  1033. package/umd/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +0 -7
  1034. package/umd/src/conversion/utils/extractParameterNamesFromTask.d.ts +1 -3
  1035. package/umd/src/conversion/validation/_importPipeline.d.ts +6 -4
  1036. package/umd/src/conversion/validation/pipelineStringToJson-parseErrors.test.d.ts +0 -3
  1037. package/umd/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +0 -3
  1038. package/umd/src/conversion/validation/validatePipeline.d.ts +3 -9
  1039. package/umd/src/conversion/validation/validatePipeline.test.d.ts +0 -3
  1040. package/umd/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -4
  1041. package/umd/src/errors/0-BoilerplateError.d.ts +0 -3
  1042. package/umd/src/errors/0-index.d.ts +0 -3
  1043. package/umd/src/errors/DatabaseError.d.ts +0 -3
  1044. package/umd/src/errors/ExpectError.d.ts +2 -1
  1045. package/umd/src/errors/ParseError.d.ts +0 -3
  1046. package/umd/src/errors/PipelineExecutionError.d.ts +0 -3
  1047. package/umd/src/executables/$provideExecutablesForNode.d.ts +0 -5
  1048. package/umd/src/executables/apps/locateLibreoffice.d.ts +0 -4
  1049. package/umd/src/executables/apps/locatePandoc.d.ts +0 -4
  1050. package/umd/src/executables/browsers/locateBrowser.d.ts +0 -1
  1051. package/umd/src/executables/browsers/locateDefaultSystemBrowser.d.ts +0 -1
  1052. package/umd/src/executables/locateApp.d.ts +0 -4
  1053. package/umd/src/executables/platforms/locateAppOnLinux.d.ts +0 -4
  1054. package/umd/src/executables/platforms/locateAppOnMacOs.d.ts +0 -4
  1055. package/umd/src/executables/platforms/locateAppOnWindows.d.ts +0 -4
  1056. package/umd/src/execution/AbstractTaskResult.d.ts +0 -4
  1057. package/umd/src/execution/AvailableModel.d.ts +0 -4
  1058. package/umd/src/execution/CommonToolsOptions.d.ts +0 -5
  1059. package/umd/src/execution/ExecutionTask.d.ts +4 -4
  1060. package/umd/src/execution/FilesystemTools.d.ts +0 -3
  1061. package/umd/src/execution/LlmExecutionTools.d.ts +3 -9
  1062. package/umd/src/execution/LlmExecutionToolsConstructor.d.ts +0 -3
  1063. package/umd/src/execution/PipelineExecutor.d.ts +0 -3
  1064. package/umd/src/execution/PipelineExecutorResult.d.ts +0 -3
  1065. package/umd/src/execution/PromptResult.d.ts +1 -9
  1066. package/umd/src/execution/PromptbookFetch.test-type.d.ts +0 -4
  1067. package/umd/src/execution/ScriptExecutionTools.d.ts +0 -4
  1068. package/umd/src/execution/Usage.d.ts +0 -3
  1069. package/umd/src/execution/UserInterfaceTools.d.ts +3 -0
  1070. package/umd/src/execution/assertsTaskSuccessful.d.ts +1 -3
  1071. package/umd/src/execution/createPipelineExecutor/00-createPipelineExecutor.d.ts +1 -0
  1072. package/umd/src/execution/createPipelineExecutor/20-executeTask.d.ts +0 -3
  1073. package/umd/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -3
  1074. package/umd/src/execution/createPipelineExecutor/getContextForTask.d.ts +1 -0
  1075. package/umd/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +0 -4
  1076. package/umd/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +0 -1
  1077. package/umd/src/execution/execution-report/ExecutionReportJson.d.ts +1 -0
  1078. package/umd/src/execution/execution-report/ExecutionReportString.d.ts +0 -3
  1079. package/umd/src/execution/execution-report/executionReportJsonToString.d.ts +0 -5
  1080. package/umd/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +3 -1
  1081. package/umd/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +3 -1
  1082. package/umd/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +3 -1
  1083. package/umd/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +2 -0
  1084. package/umd/src/execution/translation/automatic-translate/translateMessages.d.ts +3 -5
  1085. package/umd/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -6
  1086. package/umd/src/execution/utils/checkExpectations.d.ts +2 -5
  1087. package/umd/src/execution/utils/forEachAsync.d.ts +5 -1
  1088. package/umd/src/execution/utils/usage-constants.d.ts +0 -3
  1089. package/umd/src/execution/utils/usageToHuman.d.ts +0 -8
  1090. package/umd/src/execution/utils/validatePromptResult.d.ts +1 -0
  1091. package/umd/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +1 -0
  1092. package/umd/src/formats/_common/FormatParser.d.ts +2 -9
  1093. package/umd/src/formats/_common/FormatSubvalueParser.d.ts +0 -3
  1094. package/umd/src/formats/csv/CsvFormatParser.d.ts +2 -8
  1095. package/umd/src/formats/index.d.ts +0 -3
  1096. package/umd/src/formats/json/JsonFormatParser.d.ts +0 -11
  1097. package/umd/src/formats/text/TextFormatParser.d.ts +0 -9
  1098. package/umd/src/formats/xml/XmlFormatParser.d.ts +0 -11
  1099. package/umd/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +1 -3
  1100. package/umd/src/formfactors/_common/FormfactorDefinition.d.ts +1 -0
  1101. package/umd/src/formfactors/index.d.ts +0 -3
  1102. package/umd/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +0 -5
  1103. package/umd/src/high-level-abstractions/index.d.ts +0 -4
  1104. package/umd/src/high-level-abstractions/quick-chatbot/QuickChatbotHla.d.ts +0 -3
  1105. package/umd/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +2 -3
  1106. package/umd/src/llm-providers/_common/register/$llmToolsRegister.d.ts +2 -3
  1107. package/umd/src/llm-providers/_common/register/$provideEnvFilename.d.ts +0 -3
  1108. package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -3
  1109. package/umd/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +3 -6
  1110. package/umd/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +3 -7
  1111. package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -18
  1112. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +0 -4
  1113. package/umd/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +0 -5
  1114. package/umd/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +0 -6
  1115. package/umd/src/llm-providers/_common/register/LlmToolsOptions.d.ts +0 -4
  1116. package/umd/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +1 -0
  1117. package/umd/src/llm-providers/_common/utils/assertUniqueModels.d.ts +0 -3
  1118. package/umd/src/llm-providers/_common/utils/cache/CacheItem.d.ts +0 -3
  1119. package/umd/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -0
  1120. package/umd/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +0 -4
  1121. package/umd/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -0
  1122. package/umd/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +0 -7
  1123. package/umd/src/llm-providers/_common/utils/removeUnsupportedModelRequirements.d.ts +4 -0
  1124. package/umd/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +1 -0
  1125. package/umd/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +0 -4
  1126. package/umd/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +3 -7
  1127. package/umd/src/llm-providers/_multiple/playground/playground.d.ts +0 -3
  1128. package/umd/src/llm-providers/agent/Agent.d.ts +0 -3
  1129. package/umd/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +0 -4
  1130. package/umd/src/llm-providers/agent/RemoteAgent.d.ts +0 -4
  1131. package/umd/src/llm-providers/agent/playground/playground.d.ts +0 -6
  1132. package/umd/src/llm-providers/agent/register-configuration.d.ts +0 -5
  1133. package/umd/src/llm-providers/agent/register-constructor.d.ts +0 -4
  1134. package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -10
  1135. package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +3 -3
  1136. package/umd/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -8
  1137. package/umd/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +1 -3
  1138. package/umd/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.test.d.ts +0 -3
  1139. package/umd/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +0 -7
  1140. package/umd/src/llm-providers/anthropic-claude/playground/playground.d.ts +0 -5
  1141. package/umd/src/llm-providers/anthropic-claude/register-configuration.d.ts +0 -3
  1142. package/umd/src/llm-providers/anthropic-claude/register-constructor.d.ts +0 -5
  1143. package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -6
  1144. package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
  1145. package/umd/src/llm-providers/azure-openai/createAzureOpenAiExecutionTools.d.ts +0 -4
  1146. package/umd/src/llm-providers/azure-openai/playground/playground.d.ts +0 -4
  1147. package/umd/src/llm-providers/azure-openai/register-configuration.d.ts +0 -3
  1148. package/umd/src/llm-providers/azure-openai/register-constructor.d.ts +0 -4
  1149. package/umd/src/llm-providers/deepseek/DeepseekExecutionToolsOptions.d.ts +1 -0
  1150. package/umd/src/llm-providers/deepseek/createDeepseekExecutionTools.d.ts +0 -3
  1151. package/umd/src/llm-providers/deepseek/deepseek-models.d.ts +1 -6
  1152. package/umd/src/llm-providers/deepseek/register-configuration.d.ts +0 -3
  1153. package/umd/src/llm-providers/deepseek/register-constructor.d.ts +0 -4
  1154. package/umd/src/llm-providers/google/GoogleExecutionToolsOptions.d.ts +1 -0
  1155. package/umd/src/llm-providers/google/createGoogleExecutionTools.d.ts +0 -4
  1156. package/umd/src/llm-providers/google/google-models.d.ts +1 -6
  1157. package/umd/src/llm-providers/google/register-configuration.d.ts +0 -3
  1158. package/umd/src/llm-providers/google/register-constructor.d.ts +0 -4
  1159. package/umd/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -5
  1160. package/umd/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +0 -4
  1161. package/umd/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +0 -3
  1162. package/umd/src/llm-providers/mocked/test/joker.test.d.ts +0 -3
  1163. package/umd/src/llm-providers/mocked/test/mocked-chat.test.d.ts +0 -4
  1164. package/umd/src/llm-providers/mocked/test/mocked-completion.test.d.ts +0 -3
  1165. package/umd/src/llm-providers/ollama/OllamaExecutionTools.d.ts +0 -3
  1166. package/umd/src/llm-providers/ollama/OllamaExecutionToolsOptions.d.ts +1 -0
  1167. package/umd/src/llm-providers/ollama/ollama-models.d.ts +1 -4
  1168. package/umd/src/llm-providers/ollama/playground/playground.d.ts +0 -4
  1169. package/umd/src/llm-providers/ollama/register-configuration.d.ts +0 -3
  1170. package/umd/src/llm-providers/ollama/register-constructor.d.ts +0 -4
  1171. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +10 -0
  1172. package/umd/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -8
  1173. package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +0 -7
  1174. package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionToolsOptions.d.ts +2 -0
  1175. package/umd/src/llm-providers/openai/computeOpenAiUsage.d.ts +1 -3
  1176. package/umd/src/llm-providers/openai/computeOpenAiUsage.test.d.ts +0 -3
  1177. package/umd/src/llm-providers/openai/createOpenAiAssistantExecutionTools.d.ts +0 -4
  1178. package/umd/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +0 -4
  1179. package/umd/src/llm-providers/openai/createOpenAiExecutionTools.d.ts +0 -4
  1180. package/umd/src/llm-providers/openai/openai-models.d.ts +1 -0
  1181. package/umd/src/llm-providers/openai/openai-models.test.d.ts +0 -3
  1182. package/umd/src/llm-providers/openai/playground/playground.d.ts +0 -4
  1183. package/umd/src/llm-providers/openai/register-configuration.d.ts +0 -3
  1184. package/umd/src/llm-providers/openai/register-constructor.d.ts +0 -4
  1185. package/umd/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -9
  1186. package/umd/src/llm-providers/remote/playground/playground.d.ts +0 -3
  1187. package/umd/src/llm-providers/vercel/playground/playground.d.ts +0 -4
  1188. package/umd/src/other/templates/getBookTemplates.d.ts +2 -5
  1189. package/umd/src/personas/preparePersona.d.ts +1 -7
  1190. package/umd/src/pipeline/PipelineInterface/PipelineInterface.d.ts +1 -0
  1191. package/umd/src/pipeline/PipelineInterface/constants.d.ts +0 -3
  1192. package/umd/src/pipeline/PipelineJson/CommonTaskJson.d.ts +0 -4
  1193. package/umd/src/pipeline/PipelineJson/DialogTaskJson.d.ts +1 -3
  1194. package/umd/src/pipeline/PipelineJson/Expectations.d.ts +4 -3
  1195. package/umd/src/pipeline/PipelineJson/KnowledgePieceJson.d.ts +0 -4
  1196. package/umd/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +0 -3
  1197. package/umd/src/pipeline/PipelineJson/PersonaJson.d.ts +0 -3
  1198. package/umd/src/pipeline/PipelineJson/PreparationJson.d.ts +3 -5
  1199. package/umd/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +1 -4
  1200. package/umd/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +1 -3
  1201. package/umd/src/pipeline/book-notation.d.ts +1 -4
  1202. package/umd/src/pipeline/isValidPipelineString.d.ts +1 -3
  1203. package/umd/src/pipeline/isValidPipelineString.test.d.ts +0 -3
  1204. package/umd/src/pipeline/prompt-notation/helpers/ParameterEscaping.d.ts +5 -0
  1205. package/umd/src/pipeline/prompt-notation/helpers/ParameterNaming.d.ts +1 -0
  1206. package/umd/src/pipeline/prompt-notation/helpers/ParameterSection.d.ts +2 -0
  1207. package/umd/src/pipeline/prompt-notation.d.ts +2 -5
  1208. package/umd/src/pipeline/prompt-notation.test.d.ts +0 -3
  1209. package/umd/src/pipeline/validatePipelineString.d.ts +1 -3
  1210. package/umd/src/playground/permanent/_boilerplate.d.ts +0 -3
  1211. package/umd/src/playground/permanent/agent-with-browser-playground.d.ts +0 -3
  1212. package/umd/src/playground/permanent/error-handling-playground.d.ts +0 -3
  1213. package/umd/src/playground/playground.d.ts +0 -4
  1214. package/umd/src/postprocessing/utils/extractBlock.d.ts +2 -1
  1215. package/umd/src/postprocessing/utils/extractJsonBlock.d.ts +2 -5
  1216. package/umd/src/prepare/PrepareAndScrapeOptions.d.ts +0 -4
  1217. package/umd/src/prepare/preparePipeline.d.ts +3 -2
  1218. package/umd/src/prepare/preparePipelineOnRemoteServer.d.ts +2 -5
  1219. package/umd/src/prepare/prepareTasks.d.ts +6 -10
  1220. package/umd/src/prepare/unpreparePipeline.d.ts +1 -5
  1221. package/umd/src/remote-server/RemoteServer.d.ts +3 -0
  1222. package/umd/src/remote-server/openapi.d.ts +3 -4
  1223. package/umd/src/remote-server/socket-types/_subtypes/Identification.d.ts +1 -5
  1224. package/umd/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Request.d.ts +0 -3
  1225. package/umd/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +0 -3
  1226. package/umd/src/remote-server/startAgentServer.d.ts +6 -4
  1227. package/umd/src/remote-server/startRemoteServer.d.ts +1 -16
  1228. package/umd/src/remote-server/types/RemoteClientOptions.d.ts +0 -5
  1229. package/umd/src/remote-server/types/RemoteServerOptions.d.ts +10 -4
  1230. package/umd/src/remote-server/ui/ServerApp.d.ts +1 -0
  1231. package/umd/src/remote-server/ui/types.d.ts +3 -0
  1232. package/umd/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +1 -6
  1233. package/umd/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +0 -3
  1234. package/umd/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +0 -3
  1235. package/umd/src/scrapers/_boilerplate/register-constructor.d.ts +0 -4
  1236. package/umd/src/scrapers/_boilerplate/register-metadata.d.ts +0 -3
  1237. package/umd/src/scrapers/_common/Scraper.d.ts +0 -5
  1238. package/umd/src/scrapers/_common/ScraperIntermediateSource.d.ts +0 -3
  1239. package/umd/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -0
  1240. package/umd/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +0 -4
  1241. package/umd/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -4
  1242. package/umd/src/scrapers/_common/register/$provideScriptingForNode.d.ts +0 -4
  1243. package/umd/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +0 -3
  1244. package/umd/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +2 -3
  1245. package/umd/src/scrapers/_common/register/$scrapersRegister.d.ts +2 -3
  1246. package/umd/src/scrapers/_common/register/ScraperConstructor.d.ts +0 -3
  1247. package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +0 -7
  1248. package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.test.d.ts +0 -3
  1249. package/umd/src/scrapers/_common/utils/promptbookFetch.d.ts +0 -3
  1250. package/umd/src/scrapers/document/DocumentScraper.d.ts +1 -6
  1251. package/umd/src/scrapers/document/DocumentScraper.test.d.ts +0 -3
  1252. package/umd/src/scrapers/document/createDocumentScraper.d.ts +0 -3
  1253. package/umd/src/scrapers/document/playground/document-scraper-playground.d.ts +0 -3
  1254. package/umd/src/scrapers/document/register-constructor.d.ts +0 -4
  1255. package/umd/src/scrapers/document/register-metadata.d.ts +0 -3
  1256. package/umd/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -6
  1257. package/umd/src/scrapers/document-legacy/LegacyDocumentScraper.test.d.ts +0 -3
  1258. package/umd/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +0 -3
  1259. package/umd/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +0 -3
  1260. package/umd/src/scrapers/document-legacy/register-constructor.d.ts +0 -4
  1261. package/umd/src/scrapers/document-legacy/register-metadata.d.ts +0 -3
  1262. package/umd/src/scrapers/markdown/MarkdownScraper.d.ts +1 -4
  1263. package/umd/src/scrapers/markdown/MarkdownScraper.test.d.ts +0 -3
  1264. package/umd/src/scrapers/markdown/createMarkdownScraper.d.ts +0 -3
  1265. package/umd/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +0 -3
  1266. package/umd/src/scrapers/markdown/register-constructor.d.ts +0 -4
  1267. package/umd/src/scrapers/markdown/register-metadata.d.ts +0 -3
  1268. package/umd/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -7
  1269. package/umd/src/scrapers/markitdown/createMarkitdownScraper.d.ts +0 -4
  1270. package/umd/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +0 -3
  1271. package/umd/src/scrapers/markitdown/register-constructor.d.ts +0 -5
  1272. package/umd/src/scrapers/markitdown/register-metadata.d.ts +0 -3
  1273. package/umd/src/scrapers/pdf/PdfScraper.d.ts +1 -6
  1274. package/umd/src/scrapers/pdf/createPdfScraper.d.ts +0 -3
  1275. package/umd/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +0 -3
  1276. package/umd/src/scrapers/pdf/register-constructor.d.ts +0 -4
  1277. package/umd/src/scrapers/pdf/register-metadata.d.ts +0 -3
  1278. package/umd/src/scrapers/website/WebsiteScraper.d.ts +1 -6
  1279. package/umd/src/scrapers/website/createWebsiteScraper.d.ts +0 -3
  1280. package/umd/src/scrapers/website/playground/website-scraper-playground.d.ts +0 -3
  1281. package/umd/src/scrapers/website/register-constructor.d.ts +0 -4
  1282. package/umd/src/scrapers/website/register-metadata.d.ts +0 -3
  1283. package/umd/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +1 -5
  1284. package/umd/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -3
  1285. package/umd/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
  1286. package/umd/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +0 -3
  1287. package/umd/src/scripting/javascript/postprocessing-functions.d.ts +0 -4
  1288. package/umd/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +1 -3
  1289. package/umd/src/search-engines/SearchEngine.d.ts +3 -0
  1290. package/umd/src/speech-recognition/BrowserSpeechRecognition.d.ts +0 -4
  1291. package/umd/src/speech-recognition/OpenAiSpeechRecognition.d.ts +2 -2
  1292. package/umd/src/storage/_common/PromptbookStorage.d.ts +0 -4
  1293. package/umd/src/storage/_common/PromptbookStorage.test-type.d.ts +0 -4
  1294. package/umd/src/storage/env-storage/$EnvStorage.d.ts +0 -3
  1295. package/umd/src/storage/file-cache-storage/FileCacheStorage.d.ts +0 -4
  1296. package/umd/src/storage/local-storage/getIndexedDbStorage.d.ts +0 -3
  1297. package/umd/src/storage/local-storage/getLocalStorage.d.ts +0 -3
  1298. package/umd/src/storage/local-storage/getSessionStorage.d.ts +0 -3
  1299. package/umd/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +1 -0
  1300. package/umd/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +0 -4
  1301. package/umd/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +1 -3
  1302. package/umd/src/transpilers/formatted-book-in-markdown/register.d.ts +2 -5
  1303. package/umd/src/transpilers/openai-sdk/playground/playground.d.ts +0 -3
  1304. package/umd/src/transpilers/openai-sdk/register.d.ts +2 -5
  1305. package/umd/src/types/Arrayable.d.ts +1 -0
  1306. package/umd/src/types/InputParameters_private.d.ts +13 -0
  1307. package/umd/src/types/IntermediateFilesStrategy.d.ts +0 -3
  1308. package/umd/src/types/LlmCall.d.ts +0 -3
  1309. package/umd/src/types/ModelRequirements.d.ts +1 -0
  1310. package/umd/src/types/ModelVariant.d.ts +3 -0
  1311. package/umd/src/types/Parameters.d.ts +31 -0
  1312. package/umd/src/types/Parameters_private.d.ts +18 -0
  1313. package/umd/src/types/Prompt.d.ts +1 -6
  1314. package/umd/src/types/ReservedParameters_private.d.ts +11 -0
  1315. package/umd/src/types/ToolCall.d.ts +0 -2
  1316. package/umd/src/types/Updatable.d.ts +1 -3
  1317. package/umd/src/types/number_bytes.d.ts +21 -0
  1318. package/umd/src/types/number_id.d.ts +13 -0
  1319. package/umd/src/types/number_likeness.d.ts +8 -0
  1320. package/umd/src/types/number_milliseconds.d.ts +33 -0
  1321. package/umd/src/types/number_percent.d.ts +18 -0
  1322. package/umd/src/types/number_positive.d.ts +16 -0
  1323. package/umd/src/types/number_usd.d.ts +6 -106
  1324. package/umd/src/types/string_agent_hash_private.d.ts +9 -0
  1325. package/umd/src/types/string_agent_name.d.ts +32 -0
  1326. package/umd/src/types/string_agent_name_in_book_private.d.ts +8 -0
  1327. package/umd/src/types/string_agent_name_private.d.ts +10 -0
  1328. package/umd/src/types/string_agent_permanent_id_private.d.ts +11 -0
  1329. package/umd/src/types/string_base64_private.d.ts +17 -0
  1330. package/umd/src/types/string_business_category_name.d.ts +5 -0
  1331. package/umd/src/types/string_business_category_name_private.d.ts +6 -0
  1332. package/umd/src/types/string_char_private.d.ts +8 -0
  1333. package/umd/src/types/string_chat_prompt_private.d.ts +9 -0
  1334. package/umd/src/types/string_completion_prompt_private.d.ts +9 -0
  1335. package/umd/src/types/string_email_private.d.ts +16 -0
  1336. package/umd/src/types/string_host_private.d.ts +55 -0
  1337. package/umd/src/types/string_markdown.d.ts +0 -1
  1338. package/umd/src/types/string_mime_type_private.d.ts +18 -0
  1339. package/umd/src/types/string_model_description_private.d.ts +8 -0
  1340. package/umd/src/types/string_model_name.d.ts +7 -0
  1341. package/umd/src/types/string_model_name_private.d.ts +8 -0
  1342. package/umd/src/types/string_name.d.ts +31 -0
  1343. package/umd/src/types/string_name_private.d.ts +9 -0
  1344. package/umd/src/types/string_page.d.ts +15 -0
  1345. package/umd/src/types/string_page_private.d.ts +9 -0
  1346. package/umd/src/types/string_parameter_name.d.ts +11 -167
  1347. package/umd/src/types/string_parameter_value_private.d.ts +9 -0
  1348. package/umd/src/types/string_persona_description.d.ts +14 -0
  1349. package/umd/src/types/string_persona_description_private.d.ts +8 -0
  1350. package/umd/src/types/string_prompt.d.ts +49 -0
  1351. package/umd/src/types/string_prompt_image_private.d.ts +8 -0
  1352. package/umd/src/types/string_prompt_private.d.ts +8 -0
  1353. package/umd/src/types/string_reserved_parameter_name_private.d.ts +11 -0
  1354. package/umd/src/types/string_sha256.d.ts +2 -2
  1355. package/umd/src/types/string_system_message_private.d.ts +9 -0
  1356. package/umd/src/types/string_template_private.d.ts +8 -0
  1357. package/umd/src/types/string_text_prompt_private.d.ts +9 -0
  1358. package/umd/src/types/string_title.d.ts +8 -0
  1359. package/umd/src/types/string_title_private.d.ts +9 -0
  1360. package/umd/src/types/string_url.d.ts +50 -46
  1361. package/umd/src/types/string_url_private.d.ts +88 -0
  1362. package/umd/src/types/typeAliasEmoji.d.ts +0 -3
  1363. package/umd/src/types/typeAliases.d.ts +7 -7
  1364. package/umd/src/utils/DEFAULT_THINKING_MESSAGES.d.ts +5 -1
  1365. package/umd/src/utils/chat/chatAttachments/appendChatAttachmentContext.d.ts +1 -0
  1366. package/umd/src/utils/chat/chatAttachments/appendChatAttachmentContextWithContent.d.ts +1 -0
  1367. package/umd/src/utils/chat/chatAttachments/formatChatAttachmentContentContext.d.ts +1 -0
  1368. package/umd/src/utils/chat/chatAttachments/formatChatAttachmentContext.d.ts +1 -0
  1369. package/umd/src/utils/chat/chatAttachments/normalizeChatAttachments.d.ts +1 -0
  1370. package/umd/src/utils/chat/chatAttachments/resolveChatAttachmentContent.d.ts +1 -0
  1371. package/umd/src/utils/chat/chatAttachments/resolveChatAttachmentContents.d.ts +1 -0
  1372. package/umd/src/utils/chat/chatAttachments.d.ts +0 -3
  1373. package/umd/src/utils/chat/constants.d.ts +0 -3
  1374. package/umd/src/utils/clientVersion.d.ts +0 -3
  1375. package/umd/src/utils/color/$randomColor.d.ts +0 -5
  1376. package/umd/src/utils/color/css-colors.d.ts +0 -3
  1377. package/umd/src/utils/color/internal-utils/hslToRgb.d.ts +0 -3
  1378. package/umd/src/utils/color/internal-utils/rgbToHsl.d.ts +0 -3
  1379. package/umd/src/utils/color/operators/ColorTransformer.d.ts +2 -0
  1380. package/umd/src/utils/color/operators/lighten.d.ts +0 -3
  1381. package/umd/src/utils/color/operators/saturate.d.ts +0 -3
  1382. package/umd/src/utils/color/utils/areColorsEqual.d.ts +0 -3
  1383. package/umd/src/utils/color/utils/colorDistance.d.ts +2 -2
  1384. package/umd/src/utils/color/utils/colorHue.d.ts +0 -1
  1385. package/umd/src/utils/color/utils/colorHueDistance.d.ts +0 -1
  1386. package/umd/src/utils/color/utils/colorToDataUrl.d.ts +0 -3
  1387. package/umd/src/utils/database/uniqueConstraint.d.ts +1 -3
  1388. package/umd/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +3 -4
  1389. package/umd/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +0 -3
  1390. package/umd/src/utils/editable/types/PipelineEditableSerialized.d.ts +2 -2
  1391. package/umd/src/utils/editable/utils/renamePipelineParameter.d.ts +4 -3
  1392. package/umd/src/utils/editable/utils/stringifyPipelineJson.d.ts +0 -6
  1393. package/umd/src/utils/environment/$detectRuntimeEnvironment.d.ts +0 -3
  1394. package/umd/src/utils/environment/$getGlobalScope.d.ts +1 -1
  1395. package/umd/src/utils/environment/$isRunningInBrowser.d.ts +0 -3
  1396. package/umd/src/utils/environment/$isRunningInJest.d.ts +0 -3
  1397. package/umd/src/utils/environment/$isRunningInNode.d.ts +0 -3
  1398. package/umd/src/utils/environment/$isRunningInWebWorker.d.ts +0 -3
  1399. package/umd/src/utils/execCommand/$execCommand.d.ts +0 -4
  1400. package/umd/src/utils/execCommand/$execCommands.d.ts +0 -3
  1401. package/umd/src/utils/execCommand/ExecCommandOptions.d.ts +3 -4
  1402. package/umd/src/utils/expectation-counters/constants.d.ts +0 -4
  1403. package/umd/src/utils/expectation-counters/countCharacters.d.ts +0 -4
  1404. package/umd/src/utils/expectation-counters/countLines.d.ts +0 -4
  1405. package/umd/src/utils/expectation-counters/countPages.d.ts +0 -4
  1406. package/umd/src/utils/expectation-counters/countParagraphs.d.ts +0 -4
  1407. package/umd/src/utils/expectation-counters/countSentences.d.ts +0 -4
  1408. package/umd/src/utils/expectation-counters/countWords.d.ts +0 -5
  1409. package/umd/src/utils/expectation-counters/index.d.ts +0 -4
  1410. package/umd/src/utils/files/$induceBookDownload.d.ts +0 -3
  1411. package/umd/src/utils/files/$induceFileDownload.d.ts +0 -3
  1412. package/umd/src/utils/files/ObjectUrl.d.ts +0 -3
  1413. package/umd/src/utils/files/isDirectoryExisting.d.ts +0 -6
  1414. package/umd/src/utils/files/isExecutable.d.ts +0 -4
  1415. package/umd/src/utils/files/isFileExisting.d.ts +0 -5
  1416. package/umd/src/utils/files/listAllFiles.d.ts +1 -5
  1417. package/umd/src/utils/files/readResponseBytes.d.ts +1 -0
  1418. package/umd/src/utils/knowledge/inlineKnowledgeSource.d.ts +11 -6
  1419. package/umd/src/utils/knowledge/simplifyKnowledgeLabel.d.ts +2 -0
  1420. package/umd/src/utils/linguistic-hash/linguisticHash.d.ts +2 -1
  1421. package/umd/src/utils/linguistic-hash/linguisticHashTypes.d.ts +0 -3
  1422. package/umd/src/utils/linguistic-hash/linguisticHashWords.cs.d.ts +0 -3
  1423. package/umd/src/utils/linguistic-hash/linguisticHashWords.en.d.ts +0 -3
  1424. package/umd/src/utils/markdown/addAutoGeneratedSection.d.ts +0 -3
  1425. package/umd/src/utils/markdown/createMarkdownTable.d.ts +0 -3
  1426. package/umd/src/utils/markdown/escapeMarkdownBlock.d.ts +0 -3
  1427. package/umd/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -3
  1428. package/umd/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -0
  1429. package/umd/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -4
  1430. package/umd/src/utils/markdown/humanizeAiText.d.ts +0 -3
  1431. package/umd/src/utils/markdown/humanizeAiTextEllipsis.d.ts +0 -3
  1432. package/umd/src/utils/markdown/humanizeAiTextEmdashed.d.ts +0 -3
  1433. package/umd/src/utils/markdown/humanizeAiTextQuotes.d.ts +0 -3
  1434. package/umd/src/utils/markdown/humanizeAiTextSources.d.ts +0 -3
  1435. package/umd/src/utils/markdown/humanizeAiTextWhitespace.d.ts +0 -3
  1436. package/umd/src/utils/markdown/prettifyMarkdown.d.ts +4 -2
  1437. package/umd/src/utils/markdown/promptbookifyAiText.d.ts +0 -3
  1438. package/umd/src/utils/markdown/removeMarkdownComments.d.ts +1 -0
  1439. package/umd/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
  1440. package/umd/src/utils/markdown/removeMarkdownLinks.d.ts +1 -0
  1441. package/umd/src/utils/markdown/trimCodeBlock.d.ts +1 -1
  1442. package/umd/src/utils/markdown/trimEndOfCodeBlock.d.ts +1 -1
  1443. package/umd/src/utils/misc/$getCurrentDate.d.ts +1 -0
  1444. package/umd/src/utils/misc/aboutPromptbookInformation.d.ts +3 -3
  1445. package/umd/src/utils/misc/computeHash.d.ts +0 -3
  1446. package/umd/src/utils/misc/debounce.d.ts +2 -0
  1447. package/umd/src/utils/misc/emojis.d.ts +3 -8
  1448. package/umd/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +7 -2
  1449. package/umd/src/utils/misc/parseNumber.d.ts +0 -4
  1450. package/umd/src/utils/misc/xAboutPromptbookInformation.d.ts +3 -4
  1451. package/umd/src/utils/normalization/IKeywords.d.ts +0 -3
  1452. package/umd/src/utils/normalization/nameToUriPart.d.ts +1 -0
  1453. package/umd/src/utils/normalization/nameToUriParts.d.ts +1 -0
  1454. package/umd/src/utils/normalization/normalize-to-kebab-case.d.ts +2 -3
  1455. package/umd/src/utils/normalization/normalizeTo_PascalCase.d.ts +2 -0
  1456. package/umd/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +2 -0
  1457. package/umd/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -3
  1458. package/umd/src/utils/normalization/normalizeTo_snake_case.d.ts +1 -0
  1459. package/umd/src/utils/normalization/orderJson.d.ts +1 -0
  1460. package/umd/src/utils/normalization/orderJson.test.d.ts +0 -3
  1461. package/umd/src/utils/normalization/parseKeywords.d.ts +1 -4
  1462. package/umd/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
  1463. package/umd/src/utils/normalization/removeDiacritics.d.ts +1 -3
  1464. package/umd/src/utils/normalization/removeEmojis.d.ts +1 -0
  1465. package/umd/src/utils/normalization/removeQuotes.d.ts +1 -0
  1466. package/umd/src/utils/normalization/searchKeywords.d.ts +1 -3
  1467. package/umd/src/utils/normalization/titleToName.d.ts +1 -0
  1468. package/umd/src/utils/normalization/unwrapResult.d.ts +1 -3
  1469. package/umd/src/utils/organization/$sideEffect.d.ts +1 -0
  1470. package/umd/src/utils/organization/TODO_USE.d.ts +1 -0
  1471. package/umd/src/utils/organization/just.d.ts +1 -0
  1472. package/umd/src/utils/organization/keepImported.d.ts +1 -0
  1473. package/umd/src/utils/organization/keepTypeImported.d.ts +1 -0
  1474. package/umd/src/utils/organization/keepUnused.d.ts +1 -0
  1475. package/umd/src/utils/organization/preserve.d.ts +1 -3
  1476. package/umd/src/utils/organization/really_any.d.ts +1 -0
  1477. package/umd/src/utils/organization/spaceTrim.d.ts +3 -2
  1478. package/umd/src/utils/parameters/extractParameterNames.d.ts +1 -0
  1479. package/umd/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +1 -0
  1480. package/umd/src/utils/parameters/templateParameters.d.ts +2 -1
  1481. package/umd/src/utils/parameters/valueToString.d.ts +2 -2
  1482. package/umd/src/utils/random/$generateBookBoilerplate.d.ts +3 -3
  1483. package/umd/src/utils/random/$randomAgentPersona.d.ts +1 -3
  1484. package/umd/src/utils/random/$randomAgentRule.d.ts +1 -3
  1485. package/umd/src/utils/random/$randomFullnameWithColor.d.ts +4 -3
  1486. package/umd/src/utils/random/$randomItem.d.ts +0 -3
  1487. package/umd/src/utils/random/$randomSeed.d.ts +0 -3
  1488. package/umd/src/utils/random/$randomToken.d.ts +2 -5
  1489. package/umd/src/utils/random/EnglishNamePool.d.ts +1 -0
  1490. package/umd/src/utils/serialization/$deepFreeze.d.ts +1 -3
  1491. package/umd/src/utils/serialization/checkSerializableAsJson.d.ts +1 -5
  1492. package/umd/src/utils/serialization/clonePipeline.d.ts +1 -3
  1493. package/umd/src/utils/serialization/deepClone.d.ts +1 -3
  1494. package/umd/src/utils/serialization/exportJson.d.ts +1 -3
  1495. package/umd/src/utils/serialization/isSerializableAsJson.d.ts +0 -5
  1496. package/umd/src/utils/serialization/jsonStringsToJsons.d.ts +1 -4
  1497. package/umd/src/utils/serialization/serializeToPromptbookJavascript.d.ts +3 -3
  1498. package/umd/src/utils/sets/difference.d.ts +1 -3
  1499. package/umd/src/utils/sets/intersection.d.ts +1 -0
  1500. package/umd/src/utils/sets/union.d.ts +1 -0
  1501. package/umd/src/utils/take/classes/TakeChain.d.ts +4 -1
  1502. package/umd/src/utils/take/interfaces/ITakeChain.d.ts +5 -1
  1503. package/umd/src/utils/take/interfaces/Takeable.d.ts +2 -1
  1504. package/umd/src/utils/take/take.d.ts +1 -1
  1505. package/umd/src/utils/validators/filePath/isRootPath.d.ts +1 -3
  1506. package/umd/src/utils/validators/filePath/isRootPath.test.d.ts +0 -3
  1507. package/umd/src/utils/validators/filePath/isValidFilePath.d.ts +1 -3
  1508. package/umd/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +1 -0
  1509. package/umd/src/utils/validators/parameterName/validateParameterName.d.ts +1 -0
  1510. package/umd/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -1
  1511. package/umd/src/utils/validators/url/extractUrlsFromText.d.ts +1 -0
  1512. package/umd/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
  1513. package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +0 -3
  1514. package/umd/src/utils/validators/url/isValidPipelineUrl.d.ts +0 -3
  1515. package/umd/src/utils/validators/url/normalizeDomainForMatching.d.ts +1 -0
  1516. package/umd/src/version.d.ts +1 -1
  1517. package/umd/src/wizard/$getCompiledBook.d.ts +0 -4
  1518. package/umd/src/wizard/wizard.d.ts +1 -4
package/umd/index.umd.js CHANGED
@@ -27,7 +27,7 @@
27
27
  * @generated
28
28
  * @see https://github.com/webgptorg/promptbook
29
29
  */
30
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-32';
30
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-35';
31
31
  /**
32
32
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
33
33
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -37,16 +37,20 @@
37
37
  * Trims string from all 4 sides
38
38
  *
39
39
  * Note: This is a re-exported function from the `spacetrim` package which is
40
- * Developed by same author @hejny as this package
40
+ * Developed by same author @hejny as this package
41
41
  *
42
- * @public exported from `@promptbook/utils`
43
42
  * @see https://github.com/hejny/spacetrim#usage
43
+ *
44
+ * @public exported from `@promptbook/utils`
44
45
  */
45
46
  const spaceTrim = spacetrim.spaceTrim;
46
47
 
47
48
  /**
48
- * @private util of `@promptbook/color`
49
+ * Class implementing take chain.
50
+ *
49
51
  * @de
52
+ *
53
+ * @private util of `@promptbook/color`
50
54
  */
51
55
  class TakeChain {
52
56
  constructor(value) {
@@ -63,9 +67,9 @@
63
67
  *
64
68
  * @param {*} initialValue - The initial value.
65
69
  * @returns {Proxy<WithTake<TValue>>} - A proxy object with a `take` method.
70
+ * @deprecated [🤡] Use some better functional library instead of `TakeChain`
66
71
  *
67
72
  * @private util of `@promptbook/color`
68
- * @deprecated [🤡] Use some better functional library instead of `TakeChain`
69
73
  */
70
74
  function take(initialValue) {
71
75
  if (initialValue instanceof TakeChain) {
@@ -243,9 +247,7 @@
243
247
  yellow: '#ffff00',
244
248
  yellowgreen: '#9acd32',
245
249
  };
246
- /**
247
- * Note: [💞] Ignore a discrepancy between file name and entity name
248
- */
250
+ // Note: [💞] Ignore a discrepancy between file name and entity name
249
251
 
250
252
  /**
251
253
  * Validates that a channel value is a valid number within the range of 0 to 255.
@@ -275,7 +277,13 @@
275
277
  }
276
278
  }
277
279
 
280
+ /**
281
+ * Constant for short hex lengths.
282
+ */
278
283
  const SHORT_HEX_LENGTHS = new Set([3, 4]);
284
+ /**
285
+ * Constant for long hex lengths.
286
+ */
279
287
  const LONG_HEX_LENGTHS = new Set([6, 8]);
280
288
  /**
281
289
  * Parses a hex string into RGBA channel values.
@@ -308,6 +316,9 @@
308
316
  }
309
317
  return throwInvalidHex();
310
318
  }
319
+ /**
320
+ * Parses short hex channel.
321
+ */
311
322
  function parseShortHexChannel(char, onError) {
312
323
  if (!char) {
313
324
  return onError();
@@ -318,6 +329,9 @@
318
329
  }
319
330
  return parsed * 16;
320
331
  }
332
+ /**
333
+ * Parses long hex channel.
334
+ */
321
335
  function parseLongHexChannel(hex, start, onError) {
322
336
  const segment = hex.substr(start, 2);
323
337
  if (segment.length < 2) {
@@ -330,6 +344,9 @@
330
344
  return parsed;
331
345
  }
332
346
 
347
+ /**
348
+ * Pattern matching hsl.
349
+ */
333
350
  const HSL_REGEX = /^hsl\(\s*([0-9.]+)\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/;
334
351
  /**
335
352
  * Parses an HSL string into RGBA channel values.
@@ -355,6 +372,9 @@
355
372
  alpha: 255,
356
373
  };
357
374
  }
375
+ /**
376
+ * Handles convert hsl to Rgb.
377
+ */
358
378
  function convertHslToRgb(h, s, l) {
359
379
  const c = (1 - Math.abs(2 * l - 1)) * s;
360
380
  const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
@@ -393,7 +413,13 @@
393
413
  };
394
414
  }
395
415
 
416
+ /**
417
+ * Pattern matching RGB.
418
+ */
396
419
  const RGB_REGEX = /^rgb\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
420
+ /**
421
+ * Pattern matching rgba.
422
+ */
397
423
  const RGBA_REGEX = /^rgba\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
398
424
  /**
399
425
  * Parses an RGB string into RGBA channel values.
@@ -435,6 +461,9 @@
435
461
  alpha: parseAlphaValue(match[4]),
436
462
  };
437
463
  }
464
+ /**
465
+ * Parses channel value.
466
+ */
438
467
  function parseChannelValue(value) {
439
468
  if (value.endsWith('%')) {
440
469
  const percent = parseFloat(value);
@@ -442,6 +471,9 @@
442
471
  }
443
472
  return Math.round(parseFloat(value));
444
473
  }
474
+ /**
475
+ * Parses alpha value.
476
+ */
445
477
  function parseAlphaValue(value) {
446
478
  if (value.endsWith('%')) {
447
479
  const percent = parseFloat(value);
@@ -454,8 +486,17 @@
454
486
  return Math.round(parsed);
455
487
  }
456
488
 
489
+ /**
490
+ * Pattern matching hsl regex.
491
+ */
457
492
  const HSL_REGEX_PATTERN = /^hsl\(\s*([0-9.]+)\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/;
493
+ /**
494
+ * Pattern matching RGB regex.
495
+ */
458
496
  const RGB_REGEX_PATTERN = /^rgb\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
497
+ /**
498
+ * Pattern matching rgba regex.
499
+ */
459
500
  const RGBA_REGEX_PATTERN = /^rgba\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
460
501
  /**
461
502
  * Color object represents an RGB color with alpha channel
@@ -821,9 +862,7 @@
821
862
  }
822
863
  return [Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255)];
823
864
  }
824
- /**
825
- * TODO: Properly name all used internal variables
826
- */
865
+ // TODO: Properly name all used internal variables
827
866
 
828
867
  /**
829
868
  * Converts RGB values to HSL values
@@ -869,9 +908,7 @@
869
908
  }
870
909
  return [hue, saturation, lightness];
871
910
  }
872
- /**
873
- * TODO: Properly name all used internal variables
874
- */
911
+ // TODO: Properly name all used internal variables
875
912
 
876
913
  /**
877
914
  * Makes color transformer which lighten the given color
@@ -889,9 +926,7 @@
889
926
  return Color.fromValues(r, g, b, alpha);
890
927
  };
891
928
  }
892
- /**
893
- * TODO: Maybe implement by mix+hsl
894
- */
929
+ // TODO: Maybe implement by mix+hsl
895
930
 
896
931
  /**
897
932
  * Makes color transformer which saturate the given color
@@ -909,9 +944,7 @@
909
944
  return Color.fromValues(r, g, b, alpha);
910
945
  };
911
946
  }
912
- /**
913
- * TODO: Maybe implement by mix+hsl
914
- */
947
+ // TODO: Maybe implement by mix+hsl
915
948
 
916
949
  /**
917
950
  * Returns the same value that is passed as argument.
@@ -924,6 +957,7 @@
924
957
  *
925
958
  * @param value any values
926
959
  * @returns the same values
960
+ *
927
961
  * @private within the repository
928
962
  */
929
963
  function just(value) {
@@ -1490,9 +1524,7 @@
1490
1524
  return this.appendToSystemMessage(requirements, actionSection, '\n\n');
1491
1525
  }
1492
1526
  }
1493
- /**
1494
- * Note: [💞] Ignore a discrepancy between file name and entity name
1495
- */
1527
+ // Note: [💞] Ignore a discrepancy between file name and entity name
1496
1528
 
1497
1529
  /**
1498
1530
  * Just says that the variable is not used but should be kept
@@ -1506,6 +1538,7 @@
1506
1538
  *
1507
1539
  * @param value any values
1508
1540
  * @returns void
1541
+ *
1509
1542
  * @private within the repository
1510
1543
  */
1511
1544
  function keepUnused(...valuesToKeep) {
@@ -1575,9 +1608,7 @@
1575
1608
  };
1576
1609
  }
1577
1610
  }
1578
- /**
1579
- * Note: [💞] Ignore a discrepancy between file name and entity name
1580
- */
1611
+ // Note: [💞] Ignore a discrepancy between file name and entity name
1581
1612
 
1582
1613
  /**
1583
1614
  * COMPONENT commitment definition
@@ -1636,9 +1667,7 @@
1636
1667
  return this.appendToSystemMessage(requirements, componentSection, '\n\n');
1637
1668
  }
1638
1669
  }
1639
- /**
1640
- * Note: [💞] Ignore a discrepancy between file name and entity name
1641
- */
1670
+ // Note: [💞] Ignore a discrepancy between file name and entity name
1642
1671
 
1643
1672
  /**
1644
1673
  * DELETE commitment definition
@@ -1760,9 +1789,7 @@
1760
1789
  return this.appendToSystemMessage(requirements, deleteSection, '\n\n');
1761
1790
  }
1762
1791
  }
1763
- /**
1764
- * Note: [💞] Ignore a discrepancy between file name and entity name
1765
- */
1792
+ // Note: [💞] Ignore a discrepancy between file name and entity name
1766
1793
 
1767
1794
  /**
1768
1795
  * DICTIONARY commitment definition
@@ -1866,9 +1893,7 @@
1866
1893
  };
1867
1894
  }
1868
1895
  }
1869
- /**
1870
- * Note: [💞] Ignore a discrepancy between file name and entity name
1871
- */
1896
+ // Note: [💞] Ignore a discrepancy between file name and entity name
1872
1897
 
1873
1898
  /**
1874
1899
  * FORMAT commitment definition
@@ -1947,14 +1972,13 @@
1947
1972
  return this.appendToSystemMessage(requirements, formatSection, '\n\n');
1948
1973
  }
1949
1974
  }
1950
- /**
1951
- * Note: [💞] Ignore a discrepancy between file name and entity name
1952
- */
1975
+ // Note: [💞] Ignore a discrepancy between file name and entity name
1953
1976
 
1954
1977
  /**
1955
1978
  * Orders JSON object by keys
1956
1979
  *
1957
1980
  * @returns The same type of object as the input re-ordered
1981
+ *
1958
1982
  * @public exported from `@promptbook/utils`
1959
1983
  */
1960
1984
  function orderJson(options) {
@@ -1973,6 +1997,7 @@
1973
1997
  * Note: This function mutates the object and returns the original (but mutated-deep-freezed) object
1974
1998
  *
1975
1999
  * @returns The same object as the input, but deeply frozen
2000
+ *
1976
2001
  * @public exported from `@promptbook/utils`
1977
2002
  */
1978
2003
  function $deepFreeze(objectValue) {
@@ -1989,9 +2014,7 @@
1989
2014
  Object.freeze(objectValue);
1990
2015
  return objectValue;
1991
2016
  }
1992
- /**
1993
- * TODO: [🧠] Is there a way how to meaningfully test this utility
1994
- */
2017
+ // TODO: [🧠] Is there a way how to meaningfully test this utility
1995
2018
 
1996
2019
  /**
1997
2020
  * This error type indicates that somewhere in the code non-Error object was thrown and it was wrapped into the `WrappedError`
@@ -2059,6 +2082,7 @@
2059
2082
  * - And much more...
2060
2083
  *
2061
2084
  * @throws UnexpectedError if the value is not serializable as JSON
2085
+ *
2062
2086
  * @public exported from `@promptbook/utils`
2063
2087
  */
2064
2088
  function checkSerializableAsJson(options) {
@@ -2173,11 +2197,9 @@
2173
2197
  `));
2174
2198
  }
2175
2199
  }
2176
- /**
2177
- * TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
2178
- * TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
2179
- * Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
2180
- */
2200
+ // TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
2201
+ // TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
2202
+ // Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
2181
2203
 
2182
2204
  /**
2183
2205
  * Creates a deep clone of the given object
@@ -2187,6 +2209,7 @@
2187
2209
  *
2188
2210
  * @param objectValue The object to clone.
2189
2211
  * @returns A deep, writable clone of the input object.
2212
+ *
2190
2213
  * @public exported from `@promptbook/utils`
2191
2214
  */
2192
2215
  function deepClone(objectValue) {
@@ -2203,9 +2226,7 @@
2203
2226
  > return Object.assign({}, objectValue);
2204
2227
  */
2205
2228
  }
2206
- /**
2207
- * TODO: [🧠] Is there a way how to meaningfully test this utility
2208
- */
2229
+ // TODO: [🧠] Is there a way how to meaningfully test this utility
2209
2230
 
2210
2231
  /**
2211
2232
  * Utility to export a JSON object from a function
@@ -2218,6 +2239,7 @@
2218
2239
  * Note: This function does not mutates the given object
2219
2240
  *
2220
2241
  * @returns The same type of object as the input but read-only and re-ordered
2242
+ *
2221
2243
  * @public exported from `@promptbook/utils`
2222
2244
  */
2223
2245
  function exportJson(options) {
@@ -2237,9 +2259,7 @@
2237
2259
  $deepFreeze(orderedValue);
2238
2260
  return orderedValue;
2239
2261
  }
2240
- /**
2241
- * TODO: [🧠] Is there a way how to meaningfully test this utility
2242
- */
2262
+ // TODO: [🧠] Is there a way how to meaningfully test this utility
2243
2263
 
2244
2264
  /**
2245
2265
  * Order of keys in the pipeline JSON
@@ -2350,9 +2370,7 @@
2350
2370
  */
2351
2371
  SHORT_NAME_LENGTH: 6,
2352
2372
  };
2353
- /**
2354
- * Note: [💞] Ignore a discrepancy between file name and entity name
2355
- */
2373
+ // Note: [💞] Ignore a discrepancy between file name and entity name
2356
2374
 
2357
2375
  /**
2358
2376
  * Normalizes a given text to camelCase format.
@@ -2364,6 +2382,7 @@
2364
2382
  * @returns The camelCase formatted string.
2365
2383
  * @example 'helloWorld'
2366
2384
  * @example 'iLovePromptbook'
2385
+ *
2367
2386
  * @public exported from `@promptbook/utils`
2368
2387
  */
2369
2388
  function normalizeTo_camelCase(text, _isFirstLetterCapital = false) {
@@ -2404,14 +2423,13 @@
2404
2423
  }
2405
2424
  return normalizedName;
2406
2425
  }
2407
- /**
2408
- * TODO: [🌺] Use some intermediate util splitWords
2409
- */
2426
+ // TODO: [🌺] Use some intermediate util splitWords
2410
2427
 
2411
2428
  /**
2412
2429
  * Tests if given string is valid file path.
2413
2430
  *
2414
2431
  * Note: This does not check if the file exists only if the path is valid
2432
+ *
2415
2433
  * @public exported from `@promptbook/utils`
2416
2434
  */
2417
2435
  function isValidFilePath(filename) {
@@ -2460,9 +2478,7 @@
2460
2478
  }
2461
2479
  return false;
2462
2480
  }
2463
- /**
2464
- * TODO: [🍏] Implement for MacOs
2465
- */
2481
+ // TODO: [🍏] Implement for MacOs
2466
2482
 
2467
2483
  /**
2468
2484
  * Tests if given string is valid URL.
@@ -2495,6 +2511,9 @@
2495
2511
  }
2496
2512
  }
2497
2513
 
2514
+ /**
2515
+ * Collection of default diacritics removal map.
2516
+ */
2498
2517
  const defaultDiacriticsRemovalMap = [
2499
2518
  {
2500
2519
  base: 'A',
@@ -2746,6 +2765,7 @@
2746
2765
  *
2747
2766
  * @param input The string containing diacritics to be normalized.
2748
2767
  * @returns The string with diacritics removed or normalized.
2768
+ *
2749
2769
  * @public exported from `@promptbook/utils`
2750
2770
  */
2751
2771
  function removeDiacritics(input) {
@@ -2754,9 +2774,7 @@
2754
2774
  return DIACRITIC_VARIANTS_LETTERS[character] || character;
2755
2775
  });
2756
2776
  }
2757
- /**
2758
- * TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
2759
- */
2777
+ // TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
2760
2778
 
2761
2779
  /**
2762
2780
  * Converts a given text to kebab-case format.
@@ -2767,6 +2785,7 @@
2767
2785
  * @returns The kebab-case formatted string.
2768
2786
  * @example 'hello-world'
2769
2787
  * @example 'i-love-promptbook'
2788
+ *
2770
2789
  * @public exported from `@promptbook/utils`
2771
2790
  */
2772
2791
  function normalizeToKebabCase(text) {
@@ -2807,9 +2826,7 @@
2807
2826
  normalizedName = normalizedName.replace(/-$/, '');
2808
2827
  return normalizedName;
2809
2828
  }
2810
- /**
2811
- * Note: [💞] Ignore a discrepancy between file name and entity name
2812
- */
2829
+ // Note: [💞] Ignore a discrepancy between file name and entity name
2813
2830
 
2814
2831
  /**
2815
2832
  * Removes emojis from a string and fix whitespaces
@@ -2818,6 +2835,7 @@
2818
2835
  *
2819
2836
  * @param text with emojis
2820
2837
  * @returns text without emojis
2838
+ *
2821
2839
  * @public exported from `@promptbook/utils`
2822
2840
  */
2823
2841
  function removeEmojis(text) {
@@ -2837,6 +2855,7 @@
2837
2855
  * @param value The title string to be converted to a name.
2838
2856
  * @returns A normalized name derived from the input title.
2839
2857
  * @example 'Hello World!' -> 'hello-world'
2858
+ *
2840
2859
  * @public exported from `@promptbook/utils`
2841
2860
  */
2842
2861
  function titleToName(value) {
@@ -2936,9 +2955,7 @@
2936
2955
  Object.setPrototypeOf(this, DatabaseError.prototype);
2937
2956
  }
2938
2957
  }
2939
- /**
2940
- * TODO: [🐱‍🚀] Explain that NotFoundError ([🐱‍🚀] and other specific errors) has priority over DatabaseError in some contexts
2941
- */
2958
+ // TODO: [🐱‍🚀] Explain that NotFoundError ([🐱‍🚀] and other specific errors) has priority over DatabaseError in some contexts
2942
2959
 
2943
2960
  /**
2944
2961
  * This error type indicates that you try to use a feature that is not available in the current environment
@@ -2956,10 +2973,11 @@
2956
2973
  /**
2957
2974
  * This error occurs when some expectation is not met in the execution of the pipeline
2958
2975
  *
2959
- * @public exported from `@promptbook/core`
2960
2976
  * Note: Do not throw this error, its reserved for `checkExpectations` and `createPipelineExecutor` and public ONLY to be serializable through remote server
2961
2977
  * Note: Always thrown in `checkExpectations` and catched in `createPipelineExecutor` and rethrown as `PipelineExecutionError`
2962
2978
  * Note: This is a kindof subtype of PipelineExecutionError
2979
+ *
2980
+ * @public exported from `@promptbook/core`
2963
2981
  */
2964
2982
  class ExpectError extends Error {
2965
2983
  constructor(message) {
@@ -3074,9 +3092,7 @@
3074
3092
  Object.setPrototypeOf(this, ParseError.prototype);
3075
3093
  }
3076
3094
  }
3077
- /**
3078
- * TODO: Maybe split `ParseError` and `ApplyError`
3079
- */
3095
+ // TODO: Maybe split `ParseError` and `ApplyError`
3080
3096
 
3081
3097
  /**
3082
3098
  * Generates random token
@@ -3084,16 +3100,15 @@
3084
3100
  * Note: `$` is used to indicate that this function is not a pure function - it is not deterministic
3085
3101
  * Note: This function is cryptographically secure (it uses crypto.randomBytes internally)
3086
3102
  *
3087
- * @private internal helper function
3088
3103
  * @returns secure random token
3104
+ *
3105
+ * @private internal helper function
3089
3106
  */
3090
3107
  function $randomToken(randomness) {
3091
3108
  return crypto.randomBytes(randomness).toString('hex');
3092
3109
  }
3093
- /**
3094
- * TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
3095
- * TODO: Maybe use nanoid instead https://github.com/ai/nanoid
3096
- */
3110
+ // TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
3111
+ // TODO: Maybe use nanoid instead https://github.com/ai/nanoid
3097
3112
 
3098
3113
  /**
3099
3114
  * This error indicates errors during the execution of the pipeline
@@ -3110,9 +3125,7 @@
3110
3125
  Object.setPrototypeOf(this, PipelineExecutionError.prototype);
3111
3126
  }
3112
3127
  }
3113
- /**
3114
- * TODO: [🧠][🌂] Add id to all errors
3115
- */
3128
+ // TODO: [🧠][🌂] Add id to all errors
3116
3129
 
3117
3130
  /**
3118
3131
  * This error indicates that the promptbook object has valid syntax (=can be parsed) but contains logical errors (like circular dependencies)
@@ -3214,9 +3227,7 @@
3214
3227
  ...PROMPTBOOK_ERRORS,
3215
3228
  ...COMMON_JAVASCRIPT_ERRORS,
3216
3229
  };
3217
- /**
3218
- * Note: [💞] Ignore a discrepancy between file name and entity name
3219
- */
3230
+ // Note: [💞] Ignore a discrepancy between file name and entity name
3220
3231
 
3221
3232
  /**
3222
3233
  * Deserializes the error object
@@ -3279,8 +3290,9 @@
3279
3290
  * @param array - Array to iterate over
3280
3291
  * @param options - Options for the function
3281
3292
  * @param callbackfunction - Function to call for each item
3282
- * @public exported from `@promptbook/utils`
3283
3293
  * @deprecated [🪂] Use queues instead
3294
+ *
3295
+ * @public exported from `@promptbook/utils`
3284
3296
  */
3285
3297
  async function forEachAsync(array, options, callbackfunction) {
3286
3298
  const { maxParallelCount = Infinity } = options;
@@ -3439,8 +3451,8 @@
3439
3451
  * This is useful and used in the `templateParameters` function
3440
3452
  *
3441
3453
  * Note: This function is not just calling `toString` method
3442
- * It's more complex and can handle this conversion specifically for LLM models
3443
- * See `VALUE_STRINGS`
3454
+ * It's more complex and can handle this conversion specifically for LLM models
3455
+ * See `VALUE_STRINGS`
3444
3456
  *
3445
3457
  * Note: There are 2 similar functions
3446
3458
  * - `valueToString` converts value to string for LLM models as human-readable string
@@ -3491,12 +3503,13 @@
3491
3503
  * Replaces parameters in template with values from parameters object
3492
3504
  *
3493
3505
  * Note: This function is not places strings into string,
3494
- * It's more complex and can handle this operation specifically for LLM models
3506
+ * It's more complex and can handle this operation specifically for LLM models
3495
3507
  *
3496
3508
  * @param template the template with parameters in {curly} braces
3497
3509
  * @param parameters the object with parameters
3498
3510
  * @returns the template with replaced parameters
3499
3511
  * @throws {PipelineExecutionError} if parameter is not defined, not closed, or not opened
3512
+ *
3500
3513
  * @public exported from `@promptbook/utils`
3501
3514
  */
3502
3515
  function templateParameters(template, parameters) {
@@ -3580,6 +3593,7 @@
3580
3593
  * Normalizes a JSON string so it can be safely rendered without double escaping.
3581
3594
  *
3582
3595
  * @param value Candidate JSON string.
3596
+ *
3583
3597
  * @private function of ParameterEscaping
3584
3598
  */
3585
3599
  function normalizeJsonString(value) {
@@ -3594,6 +3608,7 @@
3594
3608
  * Hides brackets in a string to avoid confusion with template parameters.
3595
3609
  *
3596
3610
  * @param value Input string with literal brackets.
3611
+ *
3597
3612
  * @private function of ParameterEscaping
3598
3613
  */
3599
3614
  function hideBrackets(value) {
@@ -3603,6 +3618,7 @@
3603
3618
  * Restores hidden brackets.
3604
3619
  *
3605
3620
  * @param value String with hidden brackets.
3621
+ *
3606
3622
  * @private function of ParameterEscaping
3607
3623
  */
3608
3624
  function restoreBrackets(value) {
@@ -3612,6 +3628,7 @@
3612
3628
  * Decides whether a parameter can be inlined safely.
3613
3629
  *
3614
3630
  * @param value Parameter rendered as string.
3631
+ *
3615
3632
  * @private function of ParameterEscaping
3616
3633
  */
3617
3634
  function shouldInlineParameterValue(value) {
@@ -3625,6 +3642,7 @@
3625
3642
  *
3626
3643
  * @param value Parameter value to escape.
3627
3644
  * @param options Escape options for additional characters.
3645
+ *
3628
3646
  * @private function of ParameterEscaping
3629
3647
  */
3630
3648
  function escapePromptParameterValue(value, options) {
@@ -3650,6 +3668,7 @@
3650
3668
  * Builds numeric parameter names (1, 2, ...).
3651
3669
  *
3652
3670
  * @param index Zero-based parameter index.
3671
+ *
3653
3672
  * @private function of ParameterNaming
3654
3673
  */
3655
3674
  function buildNumericParameterName(index) {
@@ -3659,6 +3678,7 @@
3659
3678
  * Builds alphabetic parameter names (a, b, ..., aa).
3660
3679
  *
3661
3680
  * @param index Zero-based parameter index.
3681
+ *
3662
3682
  * @private function of ParameterNaming
3663
3683
  */
3664
3684
  function buildAlphabeticParameterName(index) {
@@ -3675,6 +3695,7 @@
3675
3695
  * Converts a positive integer into a Roman numeral string.
3676
3696
  *
3677
3697
  * @param value Positive integer value.
3698
+ *
3678
3699
  * @private function of ParameterNaming
3679
3700
  */
3680
3701
  function toRomanNumeral(value) {
@@ -3707,6 +3728,7 @@
3707
3728
  * Builds Roman numeral parameter names (I, II, ...).
3708
3729
  *
3709
3730
  * @param index Zero-based parameter index.
3731
+ *
3710
3732
  * @private function of ParameterNaming
3711
3733
  */
3712
3734
  function buildRomanParameterName(index) {
@@ -3717,6 +3739,7 @@
3717
3739
  *
3718
3740
  * @param prefix Prefix string.
3719
3741
  * @param builder Base builder function.
3742
+ *
3720
3743
  * @private function of ParameterNaming
3721
3744
  */
3722
3745
  function buildPrefixedParameterName(prefix, builder) {
@@ -3738,6 +3761,7 @@
3738
3761
  * Collects bracketed tokens from parameter values to avoid placeholder collisions.
3739
3762
  *
3740
3763
  * @param values Parameter values to scan.
3764
+ *
3741
3765
  * @private function of ParameterNaming
3742
3766
  */
3743
3767
  function collectBracketedParameterTokens(values) {
@@ -3758,6 +3782,7 @@
3758
3782
  * Builds placeholder names while avoiding collisions with parameter content.
3759
3783
  *
3760
3784
  * @param values Parameter values to scan for conflicting tokens.
3785
+ *
3761
3786
  * @private function of ParameterNaming
3762
3787
  */
3763
3788
  function buildParameterNames(values) {
@@ -3788,6 +3813,7 @@
3788
3813
  * Formats the placeholder used in the prompt body for a parameter.
3789
3814
  *
3790
3815
  * @param name Parameter placeholder name.
3816
+ *
3791
3817
  * @private function of ParameterSection
3792
3818
  */
3793
3819
  function formatParameterPlaceholder(name) {
@@ -3797,6 +3823,7 @@
3797
3823
  * Formats a single line entry for structured parameters.
3798
3824
  *
3799
3825
  * @param item Parameter entry data.
3826
+ *
3800
3827
  * @private function of ParameterSection
3801
3828
  */
3802
3829
  function formatParameterListItem(item) {
@@ -3808,6 +3835,7 @@
3808
3835
  * Builds the structured parameters section appended to the prompt.
3809
3836
  *
3810
3837
  * @param items Parameter entries to include.
3838
+ *
3811
3839
  * @private function of ParameterSection
3812
3840
  */
3813
3841
  function buildParametersSection(items) {
@@ -3883,6 +3911,7 @@
3883
3911
  * @param strings
3884
3912
  * @param values
3885
3913
  * @returns prompt content wrapped as a PromptString
3914
+ *
3886
3915
  * @public exported from `@promptbook/utils`
3887
3916
  */
3888
3917
  function prompt(strings, ...values) {
@@ -3967,11 +3996,9 @@
3967
3996
  }
3968
3997
  return new PromptString(pipelineString);
3969
3998
  }
3970
- /**
3971
- * TODO: Maybe split into multiple files
3972
- * TODO: [🧠][🈴] Where is the best location for this file
3973
- * Note: [💞] Ignore a discrepancy between file name and entity name
3974
- */
3999
+ // TODO: Maybe split into multiple files
4000
+ // TODO: [🧠][🈴] Where is the best location for this file
4001
+ // Note: [💞] Ignore a discrepancy between file name and entity name
3975
4002
 
3976
4003
  /**
3977
4004
  * @@@
@@ -4008,9 +4035,7 @@
4008
4035
  [CLIENT_VERSION_HEADER]: CLIENT_LATEST_VERSION,
4009
4036
  };
4010
4037
  }
4011
- /**
4012
- * Note: [💞] Ignore a discrepancy between file name and entity name
4013
- */
4038
+ // Note: [💞] Ignore a discrepancy between file name and entity name
4014
4039
 
4015
4040
  /**
4016
4041
  * Detects if the code is running in a browser environment in main thread (Not in a web worker)
@@ -4027,9 +4052,7 @@
4027
4052
  return false;
4028
4053
  }
4029
4054
  }
4030
- /**
4031
- * TODO: [🎺]
4032
- */
4055
+ // TODO: [🎺]
4033
4056
 
4034
4057
  /**
4035
4058
  * Detects if the code is running in a web worker
@@ -4049,9 +4072,7 @@
4049
4072
  return false;
4050
4073
  }
4051
4074
  }
4052
- /**
4053
- * TODO: [🎺]
4054
- */
4075
+ // TODO: [🎺]
4055
4076
 
4056
4077
  /**
4057
4078
  * Number of characters per standard line with 11pt Arial font size.
@@ -4065,10 +4086,8 @@
4065
4086
  * @public exported from `@promptbook/utils`
4066
4087
  */
4067
4088
  const LINES_PER_STANDARD_PAGE = 44;
4068
- /**
4069
- * TODO: [🧠] Should be this `constants.ts` or `config.ts`?
4070
- * Note: [💞] Ignore a discrepancy between file name and entity name
4071
- */
4089
+ // TODO: [🧠] Should be this `constants.ts` or `config.ts`?
4090
+ // Note: [💞] Ignore a discrepancy between file name and entity name
4072
4091
 
4073
4092
  /**
4074
4093
  * Counts number of characters in the text
@@ -4084,10 +4103,8 @@
4084
4103
  text = text.replace(/\p{Extended_Pictographic}(\u{200D}\p{Extended_Pictographic})*/gu, '-');
4085
4104
  return text.length;
4086
4105
  }
4087
- /**
4088
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4089
- * TODO: [🧠][✌️] Make some Promptbook-native token system
4090
- */
4106
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4107
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
4091
4108
 
4092
4109
  /**
4093
4110
  * Counts number of lines in the text
@@ -4105,10 +4122,8 @@
4105
4122
  const lines = text.split(/\r?\n/);
4106
4123
  return lines.reduce((count, line) => count + Math.max(Math.ceil(line.length / CHARACTERS_PER_STANDARD_LINE), 1), 0);
4107
4124
  }
4108
- /**
4109
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4110
- * TODO: [🧠][✌️] Make some Promptbook-native token system
4111
- */
4125
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4126
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
4112
4127
 
4113
4128
  /**
4114
4129
  * Counts number of pages in the text
@@ -4120,10 +4135,8 @@
4120
4135
  function countPages(text) {
4121
4136
  return Math.ceil(countLines(text) / LINES_PER_STANDARD_PAGE);
4122
4137
  }
4123
- /**
4124
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4125
- * TODO: [🧠][✌️] Make some Promptbook-native token system
4126
- */
4138
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4139
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
4127
4140
 
4128
4141
  /**
4129
4142
  * Counts number of paragraphs in the text
@@ -4133,10 +4146,8 @@
4133
4146
  function countParagraphs(text) {
4134
4147
  return text.split(/\n\s*\n/).filter((paragraph) => paragraph.trim() !== '').length;
4135
4148
  }
4136
- /**
4137
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4138
- * TODO: [🧠][✌️] Make some Promptbook-native token system
4139
- */
4149
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4150
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
4140
4151
 
4141
4152
  /**
4142
4153
  * Split text into sentences
@@ -4154,10 +4165,8 @@
4154
4165
  function countSentences(text) {
4155
4166
  return splitIntoSentences(text).length;
4156
4167
  }
4157
- /**
4158
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4159
- * TODO: [🧠][✌️] Make some Promptbook-native token system
4160
- */
4168
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4169
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
4161
4170
 
4162
4171
  /**
4163
4172
  * Counts number of words in the text
@@ -4171,11 +4180,9 @@
4171
4180
  text = text.replace(/([a-z])([A-Z])/g, '$1 $2');
4172
4181
  return text.split(/[^a-zа-я0-9]+/i).filter((word) => word.length > 0).length;
4173
4182
  }
4174
- /**
4175
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4176
- * TODO: [🧠][✌️] Make some Promptbook-native token system
4177
- * TODO: [✌️] `countWords` should be just `splitWords(...).length`, and all other counters should use this pattern as well
4178
- */
4183
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
4184
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
4185
+ // TODO: [✌️] `countWords` should be just `splitWords(...).length`, and all other counters should use this pattern as well
4179
4186
 
4180
4187
  /**
4181
4188
  * Index of all counter functions
@@ -4190,10 +4197,8 @@
4190
4197
  LINES: countLines,
4191
4198
  PAGES: countPages,
4192
4199
  };
4193
- /**
4194
- * TODO: [🧠][🤠] This should be probably as part of `TextFormatParser`
4195
- * Note: [💞] Ignore a discrepancy between file name and entity name
4196
- */
4200
+ // TODO: [🧠][🤠] This should be probably as part of `TextFormatParser`
4201
+ // Note: [💞] Ignore a discrepancy between file name and entity name
4197
4202
 
4198
4203
  /**
4199
4204
  * Computes SHA-256 hash of the given object
@@ -4203,9 +4208,7 @@
4203
4208
  function computeHash(value) {
4204
4209
  return cryptoJs.SHA256(hexEncoder__default["default"].parse(spacetrim.spaceTrim(valueToString(value)))).toString( /* hex */);
4205
4210
  }
4206
- /**
4207
- * TODO: [🥬][🥬] Use this ACRY
4208
- */
4211
+ // TODO: [🥬][🥬] Use this ACRY
4209
4212
 
4210
4213
  /**
4211
4214
  * Makes first letter of a string uppercase
@@ -4382,6 +4385,9 @@
4382
4385
  'prvotní',
4383
4386
  'hbitý',
4384
4387
  ];
4388
+ /**
4389
+ * Collection of nouns.
4390
+ */
4385
4391
  const NOUNS$1 = [
4386
4392
  'jablko',
4387
4393
  'nebe',
@@ -4595,6 +4601,9 @@
4595
4601
  'okno',
4596
4602
  'chodba',
4597
4603
  ];
4604
+ /**
4605
+ * Collection of verbs.
4606
+ */
4598
4607
  const VERBS$1 = [
4599
4608
  'skáče',
4600
4609
  'tančí',
@@ -4767,9 +4776,7 @@
4767
4776
  noun: NOUNS$1,
4768
4777
  verb: VERBS$1,
4769
4778
  };
4770
- /**
4771
- * Note: [💞] Ignore a discrepancy between file name and entity name
4772
- */
4779
+ // Note: [💞] Ignore a discrepancy between file name and entity name
4773
4780
 
4774
4781
  /**
4775
4782
  * @@@
@@ -5025,6 +5032,9 @@
5025
5032
  'macro',
5026
5033
  'mini',
5027
5034
  ];
5035
+ /**
5036
+ * Collection of nouns.
5037
+ */
5028
5038
  const NOUNS = [
5029
5039
  'apple',
5030
5040
  'sky',
@@ -5264,6 +5274,9 @@
5264
5274
  'roof',
5265
5275
  'floor',
5266
5276
  ];
5277
+ /**
5278
+ * Collection of verbs.
5279
+ */
5267
5280
  const VERBS = [
5268
5281
  'jumping',
5269
5282
  'dancing',
@@ -5459,9 +5472,7 @@
5459
5472
  noun: NOUNS,
5460
5473
  verb: VERBS,
5461
5474
  };
5462
- /**
5463
- * Note: [💞] Ignore a discrepancy between file name and entity name
5464
- */
5475
+ // Note: [💞] Ignore a discrepancy between file name and entity name
5465
5476
 
5466
5477
  /**
5467
5478
  * Default language used for linguistic hashes.
@@ -5636,8 +5647,9 @@
5636
5647
  /**
5637
5648
  * Creates a human-readable hash as a short, story-like phrase.
5638
5649
  *
5639
- * @param wordCount how many words to include (defaults to {@link DEFAULT_LINGUISTIC_HASH_WORD_COUNT}, clamped to
5640
5650
  * {@link MIN_LINGUISTIC_HASH_WORD_COUNT}..{@link MAX_LINGUISTIC_HASH_WORD_COUNT})
5651
+ *
5652
+ * @param wordCount how many words to include (defaults to {@link DEFAULT_LINGUISTIC_HASH_WORD_COUNT}, clamped to
5641
5653
  * @param language optional language code (defaults to {@link DEFAULT_LINGUISTIC_HASH_LANGUAGE})
5642
5654
  *
5643
5655
  * @public exported from `@promptbook/utils`
@@ -5656,6 +5668,7 @@
5656
5668
  * Note: `$` is used to indicate that this function is not a pure function - it is not deterministic because it depends on the current time
5657
5669
  *
5658
5670
  * @returns string_date branded type
5671
+ *
5659
5672
  * @public exported from `@promptbook/utils`
5660
5673
  */
5661
5674
  function $getCurrentDate() {
@@ -5671,6 +5684,7 @@
5671
5684
  * @returns The normalized text in SCREAMING_CASE format.
5672
5685
  * @example 'HELLO_WORLD'
5673
5686
  * @example 'I_LOVE_PROMPTBOOK'
5687
+ *
5674
5688
  * @public exported from `@promptbook/utils`
5675
5689
  */
5676
5690
  function normalizeTo_SCREAMING_CASE(text) {
@@ -5740,6 +5754,7 @@
5740
5754
  * @returns The normalized text in snake_case format.
5741
5755
  * @example 'hello_world'
5742
5756
  * @example 'i_love_promptbook'
5757
+ *
5743
5758
  * @public exported from `@promptbook/utils`
5744
5759
  */
5745
5760
  function normalizeTo_snake_case(text) {
@@ -5768,6 +5783,7 @@
5768
5783
  *
5769
5784
  * @param text optionally quoted text
5770
5785
  * @returns text without quotes
5786
+ *
5771
5787
  * @public exported from `@promptbook/utils`
5772
5788
  */
5773
5789
  function unwrapResult(text, options) {
@@ -5842,15 +5858,14 @@
5842
5858
  return processedText;
5843
5859
  }
5844
5860
  }
5845
- /**
5846
- * TODO: [🧠] Should this also unwrap the (parenthesis)
5847
- */
5861
+ // TODO: [🧠] Should this also unwrap the (parenthesis)
5848
5862
 
5849
5863
  /**
5850
5864
  * Parses the task and returns the list of all parameter names
5851
5865
  *
5852
5866
  * @param template the string template with parameters in {curly} braces
5853
5867
  * @returns the list of parameter names
5868
+ *
5854
5869
  * @public exported from `@promptbook/utils`
5855
5870
  */
5856
5871
  function extractParameterNames(template) {
@@ -5880,7 +5895,6 @@
5880
5895
  * - `Symbol` objects are not serializable
5881
5896
  * - And much more...
5882
5897
  *
5883
- *
5884
5898
  * @public exported from `@promptbook/utils`
5885
5899
  */
5886
5900
  function isSerializableAsJson(value) {
@@ -5892,14 +5906,12 @@
5892
5906
  return false;
5893
5907
  }
5894
5908
  }
5895
- /**
5896
- * TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
5897
- * TODO: [🧠][💺] Can be done this on type-level?
5898
- */
5909
+ // TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
5910
+ // TODO: [🧠][💺] Can be done this on type-level?
5899
5911
 
5900
5912
  /**
5901
5913
  * Recursively converts JSON strings to JSON objects
5902
-
5914
+ *
5903
5915
  * @public exported from `@promptbook/utils`
5904
5916
  */
5905
5917
  function jsonStringsToJsons(object) {
@@ -5923,14 +5935,13 @@
5923
5935
  }
5924
5936
  return newObject;
5925
5937
  }
5926
- /**
5927
- * TODO: Type the return type correctly
5928
- */
5938
+ // TODO: Type the return type correctly
5929
5939
 
5930
5940
  /**
5931
5941
  * Create difference set of two sets.
5932
5942
  *
5933
5943
  * @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
5944
+ *
5934
5945
  * @public exported from `@promptbook/utils`
5935
5946
  */
5936
5947
  function difference(a, b, isEqual = (a, b) => a === b) {
@@ -5942,14 +5953,13 @@
5942
5953
  }
5943
5954
  return diff;
5944
5955
  }
5945
- /**
5946
- * TODO: [🧠][💯] Maybe also implement symmetricDifference
5947
- */
5956
+ // TODO: [🧠][💯] Maybe also implement symmetricDifference
5948
5957
 
5949
5958
  /**
5950
5959
  * Creates a new set with all elements that are present in either set
5951
5960
  *
5952
5961
  * @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
5962
+ *
5953
5963
  * @public exported from `@promptbook/utils`
5954
5964
  */
5955
5965
  function union(...sets) {
@@ -6000,12 +6010,13 @@
6000
6010
  * Tests if given string is valid promptbook version
6001
6011
  * It looks into list of known promptbook versions.
6002
6012
  *
6003
- * @see https://www.npmjs.com/package/promptbook?activeTab=versions
6004
6013
  * Note: When you are using for example promptbook 2.0.0 and there already is promptbook 3.0.0 it don`t know about it.
6005
6014
  * Note: There are two similar functions:
6006
6015
  * - `isValidSemanticVersion` which tests any semantic version
6007
6016
  * - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
6008
6017
  *
6018
+ * @see https://www.npmjs.com/package/promptbook?activeTab=versions
6019
+ *
6009
6020
  * @public exported from `@promptbook/utils`
6010
6021
  */
6011
6022
  function isValidPromptbookVersion(version) {
@@ -6063,6 +6074,7 @@
6063
6074
  * @param {string} url - The URL to check.
6064
6075
  * @param {IsUrlOnPrivateNetworkOptions} options - Options for the check.
6065
6076
  * @returns {boolean} Returns true if the IP address is reserved for private networks or localhost, otherwise false.
6077
+ *
6066
6078
  * @public exported from `@promptbook/utils`
6067
6079
  */
6068
6080
  function isUrlOnPrivateNetwork(url, options = {}) {
@@ -6101,9 +6113,7 @@
6101
6113
  */
6102
6114
  return true;
6103
6115
  }
6104
- /**
6105
- * TODO: [🐠] Maybe more info why the URL is invalid
6106
- */
6116
+ // TODO: [🐠] Maybe more info why the URL is invalid
6107
6117
 
6108
6118
  /**
6109
6119
  * Tests if given string is valid pipeline URL URL.
@@ -6134,10 +6144,11 @@
6134
6144
  */
6135
6145
  return true;
6136
6146
  }
6147
+ // TODO: [🐠] Maybe more info why the URL is invalid
6148
+
6137
6149
  /**
6138
- * TODO: [🐠] Maybe more info why the URL is invalid
6150
+ * Collection of firstnames.
6139
6151
  */
6140
-
6141
6152
  const FIRSTNAMES = [
6142
6153
  'Paul',
6143
6154
  'George',
@@ -6174,6 +6185,9 @@
6174
6185
  'Anthony',
6175
6186
  'Christopher',
6176
6187
  ];
6188
+ /**
6189
+ * Collection of lastnames with colors.
6190
+ */
6177
6191
  const LASTNAMES_WITH_COLORS = [
6178
6192
  { lastname: 'Green', color: '#008000' },
6179
6193
  { lastname: 'Brown', color: '#A52A2A' },
@@ -6201,6 +6215,7 @@
6201
6215
  *
6202
6216
  * @param seed - Input seed used to derive a stable pseudonym.
6203
6217
  * @returns Deterministic English full name with color metadata.
6218
+ *
6204
6219
  * @private internal helper for deterministic pseudonym generation
6205
6220
  */
6206
6221
  function generateDeterministicEnglishName(seed) {
@@ -6242,6 +6257,9 @@
6242
6257
  * Legacy aliases that historically behaved like `FROM VOID`.
6243
6258
  */
6244
6259
  const LEGACY_VOID_ALIASES = new Set(VOID_PSEUDO_AGENT_ALIAS_KEYS);
6260
+ /**
6261
+ * Constant for void alias entries.
6262
+ */
6245
6263
  const VOID_ALIAS_ENTRIES = VOID_PSEUDO_AGENT_ALIAS_KEYS.map((alias) => [
6246
6264
  alias,
6247
6265
  'VOID',
@@ -6290,6 +6308,7 @@
6290
6308
  *
6291
6309
  * @param rawReference - Raw reference token or payload.
6292
6310
  * @returns Pseudo-agent kind or `null` when the reference is not pseudo.
6311
+ *
6293
6312
  * @private internal utility of pseudo-agent resolution
6294
6313
  */
6295
6314
  function resolvePseudoAgentKindFromReference(rawReference) {
@@ -6304,6 +6323,7 @@
6304
6323
  *
6305
6324
  * @param agentUrl - URL to inspect.
6306
6325
  * @returns Pseudo-agent kind or `null` when the URL is not pseudo.
6326
+ *
6307
6327
  * @private internal utility of pseudo-agent resolution
6308
6328
  */
6309
6329
  function resolvePseudoAgentKindFromUrl(agentUrl) {
@@ -6324,6 +6344,7 @@
6324
6344
  *
6325
6345
  * @param teamCommitmentContent - TEAM commitment content after reference resolution.
6326
6346
  * @returns Deterministic English full name representing pseudo-user in that TEAM context.
6347
+ *
6327
6348
  * @private internal utility of TEAM commitment rendering
6328
6349
  */
6329
6350
  function createPseudoUserTeammateLabel(teamCommitmentContent) {
@@ -6339,6 +6360,7 @@
6339
6360
  *
6340
6361
  * @param rawReference - Raw reference content.
6341
6362
  * @returns True when the reference maps to void.
6363
+ *
6342
6364
  * @private internal utility of pseudo-agent resolution
6343
6365
  */
6344
6366
  function isVoidPseudoAgentReference(rawReference) {
@@ -6352,9 +6374,7 @@
6352
6374
  const normalizedReference = normalizePseudoReferenceKey(rawReference);
6353
6375
  return LEGACY_VOID_ALIASES.has(normalizedReference);
6354
6376
  }
6355
- /**
6356
- * Note: [💞] Ignore a discrepancy between file name and entity name
6357
- */
6377
+ // Note: [💞] Ignore a discrepancy between file name and entity name
6358
6378
 
6359
6379
  /**
6360
6380
  * FROM commitment definition
@@ -6433,9 +6453,7 @@
6433
6453
  };
6434
6454
  }
6435
6455
  }
6436
- /**
6437
- * Note: [💞] Ignore a discrepancy between file name and entity name
6438
- */
6456
+ // Note: [💞] Ignore a discrepancy between file name and entity name
6439
6457
 
6440
6458
  /**
6441
6459
  * GOAL commitment definition
@@ -6533,9 +6551,7 @@
6533
6551
  return this.appendToPromptSuffix(requirementsWithGoal, goalSection);
6534
6552
  }
6535
6553
  }
6536
- /**
6537
- * Note: [💞] Ignore a discrepancy between file name and entity name
6538
- */
6554
+ // Note: [💞] Ignore a discrepancy between file name and entity name
6539
6555
 
6540
6556
  /**
6541
6557
  * IMPORT commitment definition
@@ -6614,19 +6630,26 @@
6614
6630
  `));
6615
6631
  }
6616
6632
  }
6633
+ // Note: [💞] Ignore a discrepancy between file name and entity name
6634
+
6617
6635
  /**
6618
- * Note: [💞] Ignore a discrepancy between file name and entity name
6636
+ * Matches URL-like candidates inside arbitrary text.
6637
+ *
6638
+ * @private
6619
6639
  */
6620
-
6621
- /** @private Matches URL-like candidates inside arbitrary text. */
6622
6640
  const URL_CANDIDATE_PATTERN = /https?:\/\/[^\s<>"'`]+/g;
6623
- /** @private Trims punctuation that commonly trails URLs in prose. */
6641
+ /**
6642
+ * Trims punctuation that commonly trails URLs in prose.
6643
+ *
6644
+ * @private
6645
+ */
6624
6646
  const TRAILING_PUNCTUATION_PATTERN = /[.,!?;:'"`]+$/;
6625
6647
  /**
6626
6648
  * Extracts all valid URLs from arbitrary text while removing common trailing punctuation.
6627
6649
  *
6628
6650
  * @param text - Input text that may contain one or more URLs.
6629
6651
  * @returns Unique URLs in their first-seen order.
6652
+ *
6630
6653
  * @private utility of KNOWLEDGE parsing
6631
6654
  */
6632
6655
  function extractUrlsFromText(text) {
@@ -6656,7 +6679,9 @@
6656
6679
  return urls;
6657
6680
  }
6658
6681
  /**
6659
- * @private Normalizes one extracted URL candidate by stripping trailing punctuation and unmatched closing wrappers.
6682
+ * Normalizes one extracted URL candidate by stripping trailing punctuation and unmatched closing wrappers.
6683
+ *
6684
+ * @private
6660
6685
  */
6661
6686
  function normalizeUrlCandidate(candidate) {
6662
6687
  let normalized = candidate.trim();
@@ -6676,7 +6701,9 @@
6676
6701
  return normalized;
6677
6702
  }
6678
6703
  /**
6679
- * @private Removes trailing closing wrappers when they are unmatched in the candidate.
6704
+ * Removes trailing closing wrappers when they are unmatched in the candidate.
6705
+ *
6706
+ * @private
6680
6707
  */
6681
6708
  function stripTrailingUnmatchedClosing(candidate, openingChar, closingChar) {
6682
6709
  let normalized = candidate;
@@ -6691,7 +6718,9 @@
6691
6718
  return normalized;
6692
6719
  }
6693
6720
  /**
6694
- * @private Counts character occurrences in a string.
6721
+ * Counts character occurrences in a string.
6722
+ *
6723
+ * @private
6695
6724
  */
6696
6725
  function countOccurrences(value, searchedChar) {
6697
6726
  let count = 0;
@@ -6703,14 +6732,28 @@
6703
6732
  return count;
6704
6733
  }
6705
6734
 
6706
- /** @private The default base name for inline knowledge files when the content lacks identifying text */
6735
+ /**
6736
+ * The default base name for inline knowledge files when the content lacks identifying text.
6737
+ *
6738
+ * @private
6739
+ */
6707
6740
  const INLINE_KNOWLEDGE_BASE_NAME = 'inline-knowledge';
6708
- /** @private The default file extension used for inline knowledge uploads */
6741
+ /**
6742
+ * The default file extension used for inline knowledge uploads.
6743
+ *
6744
+ * @private
6745
+ */
6709
6746
  const INLINE_KNOWLEDGE_EXTENSION = '.txt';
6710
- /** @private Prefix that identifies base64 data URLs */
6747
+ /**
6748
+ * Prefix that identifies base64 data URLs.
6749
+ *
6750
+ * @private
6751
+ */
6711
6752
  const DATA_URL_PREFIX = 'data:';
6712
6753
  /**
6713
- * @private Retrieves the first meaningful line from the inline content.
6754
+ * Retrieves the first meaningful line from the inline content.
6755
+ *
6756
+ * @private
6714
6757
  */
6715
6758
  function getFirstNonEmptyLine(content) {
6716
6759
  const lines = content.split(/\r?\n/);
@@ -6723,7 +6766,9 @@
6723
6766
  return null;
6724
6767
  }
6725
6768
  /**
6726
- * @private Determines the base file name by normalizing the first non-empty line.
6769
+ * Determines the base file name by normalizing the first non-empty line.
6770
+ *
6771
+ * @private
6727
6772
  */
6728
6773
  function deriveBaseFilename(content) {
6729
6774
  const firstLine = getFirstNonEmptyLine(content);
@@ -6734,7 +6779,9 @@
6734
6779
  return normalized || INLINE_KNOWLEDGE_BASE_NAME;
6735
6780
  }
6736
6781
  /**
6737
- * @private Converts inline knowledge into the internal metadata form used for uploads.
6782
+ * Converts inline knowledge into the internal metadata form used for uploads.
6783
+ *
6784
+ * @private
6738
6785
  */
6739
6786
  function createInlineKnowledgeSourceFile(content) {
6740
6787
  const trimmedContent = content.trim();
@@ -6757,7 +6804,9 @@
6757
6804
  return typeof source === 'string' && source.startsWith(DATA_URL_PREFIX);
6758
6805
  }
6759
6806
  /**
6760
- * @private Converts a stored inline knowledge file into a data URL for backwards compatibility.
6807
+ * Converts a stored inline knowledge file into a data URL for backwards compatibility.
6808
+ *
6809
+ * @private
6761
6810
  */
6762
6811
  function inlineKnowledgeSourceToDataUrl(source) {
6763
6812
  const base64 = source.buffer.toString('base64');
@@ -6817,9 +6866,7 @@
6817
6866
  return null;
6818
6867
  }
6819
6868
  }
6820
- /**
6821
- * Note: [💞] Ignore a discrepancy between file name and entity name
6822
- */
6869
+ // Note: [💞] Ignore a discrepancy between file name and entity name
6823
6870
 
6824
6871
  /**
6825
6872
  * KNOWLEDGE commitment definition
@@ -7023,9 +7070,7 @@
7023
7070
  return this.appendToSystemMessage(requirements, languageSection, '\n\n');
7024
7071
  }
7025
7072
  }
7026
- /**
7027
- * Note: [💞] Ignore a discrepancy between file name and entity name
7028
- */
7073
+ // Note: [💞] Ignore a discrepancy between file name and entity name
7029
7074
 
7030
7075
  /**
7031
7076
  * @@@
@@ -7291,6 +7336,7 @@
7291
7336
  *
7292
7337
  * @param listener - Listener notified about tool progress.
7293
7338
  * @returns Hidden token used to route progress updates.
7339
+ *
7294
7340
  * @private internal runtime wiring for commitment tools
7295
7341
  */
7296
7342
  function registerToolCallProgressListener(listener) {
@@ -7303,14 +7349,13 @@
7303
7349
  * Unregisters one in-memory progress listener.
7304
7350
  *
7305
7351
  * @param token - Token previously created by `registerToolCallProgressListener`.
7352
+ *
7306
7353
  * @private internal runtime wiring for commitment tools
7307
7354
  */
7308
7355
  function unregisterToolCallProgressListener(token) {
7309
7356
  toolCallProgressListeners.delete(token);
7310
7357
  }
7311
- /**
7312
- * Note: [💞] Ignore a discrepancy between file name and entity name
7313
- */
7358
+ // Note: [💞] Ignore a discrepancy between file name and entity name
7314
7359
 
7315
7360
  /**
7316
7361
  * Resolves runtime context from hidden tool arguments.
@@ -7671,9 +7716,7 @@
7671
7716
  return createMemoryToolFunctions();
7672
7717
  }
7673
7718
  }
7674
- /**
7675
- * Note: [💞] Ignore a discrepancy between file name and entity name
7676
- */
7719
+ // Note: [💞] Ignore a discrepancy between file name and entity name
7677
7720
 
7678
7721
  /**
7679
7722
  * AGENT MESSAGE commitment definition
@@ -8003,9 +8046,7 @@
8003
8046
  return this.appendToSystemMessage(requirements, messageSection, '\n\n');
8004
8047
  }
8005
8048
  }
8006
- /**
8007
- * Note: [💞] Ignore a discrepancy between file name and entity name
8008
- */
8049
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8009
8050
 
8010
8051
  /**
8011
8052
  * USER MESSAGE commitment definition
@@ -8136,9 +8177,7 @@
8136
8177
  return requirements;
8137
8178
  }
8138
8179
  }
8139
- /**
8140
- * Note: [💞] Ignore a discrepancy between file name and entity name
8141
- */
8180
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8142
8181
 
8143
8182
  /**
8144
8183
  * META commitment definition
@@ -8285,9 +8324,7 @@
8285
8324
  return knownTypes.includes(metaType.toUpperCase());
8286
8325
  }
8287
8326
  }
8288
- /**
8289
- * Note: [💞] Ignore a discrepancy between file name and entity name
8290
- */
8327
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8291
8328
 
8292
8329
  /**
8293
8330
  * META COLOR commitment definition
@@ -8383,9 +8420,7 @@
8383
8420
  return trimmedContent || null;
8384
8421
  }
8385
8422
  }
8386
- /**
8387
- * Note: [💞] Ignore a discrepancy between file name and entity name
8388
- */
8423
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8389
8424
 
8390
8425
  /**
8391
8426
  * META DOMAIN commitment definition
@@ -8450,9 +8485,7 @@
8450
8485
  return trimmedContent || null;
8451
8486
  }
8452
8487
  }
8453
- /**
8454
- * Note: [💞] Ignore a discrepancy between file name and entity name
8455
- */
8488
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8456
8489
 
8457
8490
  /**
8458
8491
  * META DISCLAIMER commitment definition
@@ -8520,9 +8553,7 @@
8520
8553
  return requirements;
8521
8554
  }
8522
8555
  }
8523
- /**
8524
- * Note: [💞] Ignore a discrepancy between file name and entity name
8525
- */
8556
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8526
8557
 
8527
8558
  /**
8528
8559
  * META FONT commitment definition
@@ -8605,9 +8636,7 @@
8605
8636
  return trimmedContent || null;
8606
8637
  }
8607
8638
  }
8608
- /**
8609
- * Note: [💞] Ignore a discrepancy between file name and entity name
8610
- */
8639
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8611
8640
 
8612
8641
  /**
8613
8642
  * META IMAGE commitment definition
@@ -8692,9 +8721,7 @@
8692
8721
  return trimmedContent || null;
8693
8722
  }
8694
8723
  }
8695
- /**
8696
- * Note: [💞] Ignore a discrepancy between file name and entity name
8697
- */
8724
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8698
8725
 
8699
8726
  /**
8700
8727
  * META INPUT PLACEHOLDER commitment definition.
@@ -8757,9 +8784,7 @@
8757
8784
  return trimmedContent || null;
8758
8785
  }
8759
8786
  }
8760
- /**
8761
- * Note: [💞] Ignore a discrepancy between file name and entity name
8762
- */
8787
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8763
8788
 
8764
8789
  /**
8765
8790
  * META LINK commitment definition
@@ -8866,9 +8891,7 @@
8866
8891
  }
8867
8892
  }
8868
8893
  }
8869
- /**
8870
- * Note: [💞] Ignore a discrepancy between file name and entity name
8871
- */
8894
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8872
8895
 
8873
8896
  /**
8874
8897
  * META VOICE commitment definition
@@ -8937,9 +8960,7 @@
8937
8960
  return trimmedContent || null;
8938
8961
  }
8939
8962
  }
8940
- /**
8941
- * Note: [💞] Ignore a discrepancy between file name and entity name
8942
- */
8963
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8943
8964
 
8944
8965
  /**
8945
8966
  * MODEL commitment definition
@@ -9177,9 +9198,7 @@
9177
9198
  return result;
9178
9199
  }
9179
9200
  }
9180
- /**
9181
- * Note: [💞] Ignore a discrepancy between file name and entity name
9182
- */
9201
+ // Note: [💞] Ignore a discrepancy between file name and entity name
9183
9202
 
9184
9203
  /**
9185
9204
  * NOTE commitment definition
@@ -9341,9 +9360,7 @@
9341
9360
  };
9342
9361
  }
9343
9362
  }
9344
- /**
9345
- * Note: [💞] Ignore a discrepancy between file name and entity name
9346
- */
9363
+ // Note: [💞] Ignore a discrepancy between file name and entity name
9347
9364
 
9348
9365
  /**
9349
9366
  * PERSONA commitment definition
@@ -9482,9 +9499,7 @@
9482
9499
  };
9483
9500
  }
9484
9501
  }
9485
- /**
9486
- * Note: [💞] Ignore a discrepancy between file name and entity name
9487
- */
9502
+ // Note: [💞] Ignore a discrepancy between file name and entity name
9488
9503
 
9489
9504
  /**
9490
9505
  * RULE commitment definition
@@ -9565,15 +9580,14 @@
9565
9580
  return this.appendToPromptSuffix(requirementsWithRule, ruleSection);
9566
9581
  }
9567
9582
  }
9568
- /**
9569
- * Note: [💞] Ignore a discrepancy between file name and entity name
9570
- */
9583
+ // Note: [💞] Ignore a discrepancy between file name and entity name
9571
9584
 
9572
9585
  /**
9573
9586
  * Creates the canonical system-message body for one writing-sample commitment.
9574
9587
  *
9575
9588
  * @param content - Explicit 1:1 sample text.
9576
9589
  * @returns Writing-sample guidance ready for one system-message section.
9590
+ *
9577
9591
  * @private internal utility of writing commitments
9578
9592
  */
9579
9593
  function createWritingSampleSection(content) {
@@ -9591,6 +9605,7 @@
9591
9605
  *
9592
9606
  * @param content - Writing-only instructions.
9593
9607
  * @returns Writing-rules guidance ready for one system-message section.
9608
+ *
9594
9609
  * @private internal utility of writing commitments
9595
9610
  */
9596
9611
  function createWritingRulesSection(content) {
@@ -9603,9 +9618,7 @@
9603
9618
  ${content}
9604
9619
  `);
9605
9620
  }
9606
- /**
9607
- * Note: [💞] Ignore a discrepancy between file name and entity name
9608
- */
9621
+ // Note: [💞] Ignore a discrepancy between file name and entity name
9609
9622
 
9610
9623
  /**
9611
9624
  * Legacy `SAMPLE` / `EXAMPLE` commitment definition.
@@ -9684,9 +9697,7 @@
9684
9697
  return this.appendToSystemMessage(requirements, this.createSystemMessageSection('Writing sample', createWritingSampleSection(trimmedContent)), '\n\n');
9685
9698
  }
9686
9699
  }
9687
- /**
9688
- * Note: [💞] Ignore a discrepancy between file name and entity name
9689
- */
9700
+ // Note: [💞] Ignore a discrepancy between file name and entity name
9690
9701
 
9691
9702
  /**
9692
9703
  * SCENARIO commitment definition
@@ -9808,9 +9819,7 @@
9808
9819
  return this.appendToSystemMessage(requirements, scenarioSection, '\n\n');
9809
9820
  }
9810
9821
  }
9811
- /**
9812
- * Note: [💞] Ignore a discrepancy between file name and entity name
9813
- */
9822
+ // Note: [💞] Ignore a discrepancy between file name and entity name
9814
9823
 
9815
9824
  /**
9816
9825
  * STYLE commitment definition
@@ -9907,6 +9916,7 @@
9907
9916
  *
9908
9917
  * @param teammateLabel - Human-readable teammate label.
9909
9918
  * @returns Normalized teammate identifier for TEAM tool names.
9919
+ *
9910
9920
  * @private internal helper of TEAM tool-name generation
9911
9921
  */
9912
9922
  function normalizeTeammateToolNamePart(teammateLabel) {
@@ -9922,6 +9932,7 @@
9922
9932
  * @param _teammateUrl - Canonical teammate URL (kept for API compatibility, not used).
9923
9933
  * @param teammateLabel - Human-readable teammate label used as the basis for the name.
9924
9934
  * @returns TEAM tool name derived from the label.
9935
+ *
9925
9936
  * @private internal utility of TEAM commitments and chat UI mapping
9926
9937
  */
9927
9938
  function createTeamToolName(_teammateUrl, teammateLabel) {
@@ -9929,9 +9940,21 @@
9929
9940
  return `${TEAM_TOOL_PREFIX}${normalizedLabel}`;
9930
9941
  }
9931
9942
 
9943
+ /**
9944
+ * Pattern matching agent URLs inside TEAM commitment content.
9945
+ */
9932
9946
  const urlRegex = /https?:\/\/[^\s]+/gi;
9947
+ /**
9948
+ * Pattern matching punctuation that often trails teammate URLs in prose.
9949
+ */
9933
9950
  const trailingPunctuationRegex = /[),.;!?]+$/;
9951
+ /**
9952
+ * Clause separators used while splitting TEAM instruction context.
9953
+ */
9934
9954
  const clauseSeparators = ['.', '?', '!', ';', ','];
9955
+ /**
9956
+ * Conjunction separators used while splitting TEAM instruction context.
9957
+ */
9935
9958
  const conjunctionSeparators = [' and ', ' or '];
9936
9959
  /**
9937
9960
  * Parses TEAM commitment content into teammates with instructions.
@@ -9979,6 +10002,9 @@
9979
10002
  }
9980
10003
  return teammates;
9981
10004
  }
10005
+ /**
10006
+ * Extracts the instruction fragment associated with one teammate URL.
10007
+ */
9982
10008
  function extractInstructionContext(line, matches, matchIndex) {
9983
10009
  var _a;
9984
10010
  const match = matches[matchIndex];
@@ -10004,6 +10030,9 @@
10004
10030
  }
10005
10031
  return `${prefix} ${suffix}`.trim();
10006
10032
  }
10033
+ /**
10034
+ * Trims content after the last detected clause delimiter.
10035
+ */
10007
10036
  function trimAfterLastDelimiter(text) {
10008
10037
  const match = findLastDelimiter(text);
10009
10038
  if (!match) {
@@ -10011,6 +10040,9 @@
10011
10040
  }
10012
10041
  return text.slice(match.index + match.length);
10013
10042
  }
10043
+ /**
10044
+ * Trims content before the last detected clause delimiter.
10045
+ */
10014
10046
  function trimBeforeLastDelimiter(text) {
10015
10047
  const cleaned = text.replace(/^[,;:]\s*/g, '');
10016
10048
  const match = findLastDelimiter(cleaned);
@@ -10019,6 +10051,9 @@
10019
10051
  }
10020
10052
  return cleaned.slice(0, match.index);
10021
10053
  }
10054
+ /**
10055
+ * Finds the last clause or conjunction delimiter in a string.
10056
+ */
10022
10057
  function findLastDelimiter(text) {
10023
10058
  let bestIndex = -1;
10024
10059
  let bestLength = 0;
@@ -10042,6 +10077,9 @@
10042
10077
  }
10043
10078
  return { index: bestIndex, length: bestLength };
10044
10079
  }
10080
+ /**
10081
+ * Normalizes teammate instruction text after URL extraction.
10082
+ */
10045
10083
  function normalizeInstructionText(text) {
10046
10084
  if (!text) {
10047
10085
  return '';
@@ -10055,6 +10093,9 @@
10055
10093
  normalized = normalizeWhitespaces(normalized).trim();
10056
10094
  return normalized;
10057
10095
  }
10096
+ /**
10097
+ * Creates a readable teammate label from an agent URL.
10098
+ */
10058
10099
  function createTeammateLabel(url) {
10059
10100
  try {
10060
10101
  const parsed = new URL(url);
@@ -10074,12 +10115,19 @@
10074
10115
  return url;
10075
10116
  }
10076
10117
  }
10118
+ // Note: [💞] Ignore a discrepancy between file name and entity name
10119
+
10077
10120
  /**
10078
- * Note: [💞] Ignore a discrepancy between file name and entity name
10121
+ * Map of team tool functions.
10079
10122
  */
10080
-
10081
10123
  const teamToolFunctions = {};
10124
+ /**
10125
+ * Map of team tool titles.
10126
+ */
10082
10127
  const teamToolTitles = {};
10128
+ /**
10129
+ * Constant for remote agents by Url.
10130
+ */
10083
10131
  const remoteAgentsByUrl = new Map();
10084
10132
  /**
10085
10133
  * TEAM commitment definition
@@ -10443,9 +10491,7 @@
10443
10491
  return JSON.stringify(result);
10444
10492
  };
10445
10493
  }
10446
- /**
10447
- * Note: [💞] Ignore a discrepancy between file name and entity name
10448
- */
10494
+ // Note: [💞] Ignore a discrepancy between file name and entity name
10449
10495
 
10450
10496
  /**
10451
10497
  * TEMPLATE commitment definition
@@ -10566,9 +10612,7 @@
10566
10612
  };
10567
10613
  }
10568
10614
  }
10569
- /**
10570
- * Note: [💞] Ignore a discrepancy between file name and entity name
10571
- */
10615
+ // Note: [💞] Ignore a discrepancy between file name and entity name
10572
10616
 
10573
10617
  /**
10574
10618
  * USE commitment definition
@@ -10680,9 +10724,7 @@
10680
10724
  return knownTypes.includes(useType.toUpperCase());
10681
10725
  }
10682
10726
  }
10683
- /**
10684
- * Note: [💞] Ignore a discrepancy between file name and entity name
10685
- */
10727
+ // Note: [💞] Ignore a discrepancy between file name and entity name
10686
10728
 
10687
10729
  /**
10688
10730
  * All `USE` commitment types currently participating in final system-message aggregation.
@@ -10705,6 +10747,7 @@
10705
10747
  *
10706
10748
  * @param type - Commitment type to check.
10707
10749
  * @returns `true` when the commitment participates in `USE` system-message aggregation.
10750
+ *
10708
10751
  * @private internal utility of `aggregateUseCommitmentSystemMessages`
10709
10752
  */
10710
10753
  function isAggregatedUseCommitmentType(type) {
@@ -10715,6 +10758,7 @@
10715
10758
  *
10716
10759
  * @param type - Aggregated `USE` commitment type.
10717
10760
  * @returns Single-line placeholder comment stored in the interim system message.
10761
+ *
10718
10762
  * @private internal utility of `appendAggregatedUseCommitmentPlaceholder`
10719
10763
  */
10720
10764
  function getAggregatedUseCommitmentPlaceholder(type) {
@@ -10725,6 +10769,7 @@
10725
10769
  *
10726
10770
  * @param additionalInstructions - Deduplicated instruction blocks collected from the agent source.
10727
10771
  * @returns Combined instruction text ready for `formatOptionalInstructionBlock`.
10772
+ *
10728
10773
  * @private internal utility of `createAggregatedUseCommitmentSystemMessage`
10729
10774
  */
10730
10775
  function combineAdditionalInstructions(additionalInstructions) {
@@ -10736,6 +10781,7 @@
10736
10781
  * @param type - Aggregated `USE` commitment type.
10737
10782
  * @param additionalInstructions - Distinct additional instructions in source order.
10738
10783
  * @returns Final system-message block for the commitment type.
10784
+ *
10739
10785
  * @private internal utility of `aggregateUseCommitmentSystemMessages`
10740
10786
  */
10741
10787
  function createAggregatedUseCommitmentSystemMessage(type, additionalInstructions) {
@@ -10774,6 +10820,7 @@
10774
10820
  * @param requirements - Current model requirements.
10775
10821
  * @param type - Aggregated `USE` commitment type being applied.
10776
10822
  * @returns Requirements with the placeholder inserted when it was not already present.
10823
+ *
10777
10824
  * @private internal utility of `USE` commitments
10778
10825
  */
10779
10826
  function appendAggregatedUseCommitmentPlaceholder(requirements, type) {
@@ -10797,6 +10844,7 @@
10797
10844
  * @param requirements - Model requirements produced by commitment-by-commitment application.
10798
10845
  * @param commitments - Filtered commitments in their original source order.
10799
10846
  * @returns Requirements with aggregated `USE` system-message sections.
10847
+ *
10800
10848
  * @private internal utility of `createAgentModelRequirementsWithCommitments`
10801
10849
  */
10802
10850
  function aggregateUseCommitmentSystemMessages(requirements, commitments) {
@@ -11089,9 +11137,7 @@
11089
11137
  };
11090
11138
  }
11091
11139
  }
11092
- /**
11093
- * Note: [💞] Ignore a discrepancy between file name and entity name
11094
- */
11140
+ // Note: [💞] Ignore a discrepancy between file name and entity name
11095
11141
 
11096
11142
  /**
11097
11143
  * Base Google Calendar API URL.
@@ -11362,9 +11408,7 @@
11362
11408
  const filteredTokens = tokens.filter((lineToken) => lineToken.replace(/[),.;:!?]+$/g, '') !== token);
11363
11409
  return filteredTokens.join(' ').trim();
11364
11410
  }
11365
- /**
11366
- * Note: [💞] Ignore a discrepancy between file name and entity name
11367
- */
11411
+ // Note: [💞] Ignore a discrepancy between file name and entity name
11368
11412
 
11369
11413
  /**
11370
11414
  * Wallet metadata used by USE CALENDAR when resolving Google Calendar credentials.
@@ -12315,9 +12359,7 @@
12315
12359
  ...(calendarReference.tokenRef ? { tokenRef: calendarReference.tokenRef } : {}),
12316
12360
  });
12317
12361
  }
12318
- /**
12319
- * Note: [💞] Ignore a discrepancy between file name and entity name
12320
- */
12362
+ // Note: [💞] Ignore a discrepancy between file name and entity name
12321
12363
 
12322
12364
  /**
12323
12365
  * Lightweight email token matcher used for `USE EMAIL` first-line parsing.
@@ -12583,9 +12625,7 @@
12583
12625
  },
12584
12626
  ];
12585
12627
  }
12586
- /**
12587
- * Note: [💞] Ignore a discrepancy between file name and entity name
12588
- */
12628
+ // Note: [💞] Ignore a discrepancy between file name and entity name
12589
12629
 
12590
12630
  /**
12591
12631
  * USE IMAGE GENERATOR commitment definition
@@ -12676,9 +12716,7 @@
12676
12716
  `));
12677
12717
  }
12678
12718
  }
12679
- /**
12680
- * Note: [💞] Ignore a discrepancy between file name and entity name
12681
- */
12719
+ // Note: [💞] Ignore a discrepancy between file name and entity name
12682
12720
 
12683
12721
  /**
12684
12722
  * USE MCP commitment definition
@@ -12753,9 +12791,7 @@
12753
12791
  };
12754
12792
  }
12755
12793
  }
12756
- /**
12757
- * Note: [💞] Ignore a discrepancy between file name and entity name
12758
- */
12794
+ // Note: [💞] Ignore a discrepancy between file name and entity name
12759
12795
 
12760
12796
  /**
12761
12797
  * USE POPUP commitment definition
@@ -12891,9 +12927,7 @@
12891
12927
  };
12892
12928
  }
12893
12929
  }
12894
- /**
12895
- * Note: [💞] Ignore a discrepancy between file name and entity name
12896
- */
12930
+ // Note: [💞] Ignore a discrepancy between file name and entity name
12897
12931
 
12898
12932
  /**
12899
12933
  * Tool name used by the USE PRIVACY commitment.
@@ -13065,9 +13099,7 @@
13065
13099
  };
13066
13100
  }
13067
13101
  }
13068
- /**
13069
- * Note: [💞] Ignore a discrepancy between file name and entity name
13070
- */
13102
+ // Note: [💞] Ignore a discrepancy between file name and entity name
13071
13103
 
13072
13104
  /* eslint-disable no-magic-numbers */
13073
13105
  /**
@@ -13874,9 +13906,7 @@
13874
13906
  defaultBranch,
13875
13907
  };
13876
13908
  }
13877
- /**
13878
- * Note: [💞] Ignore a discrepancy between file name and entity name
13879
- */
13909
+ // Note: [💞] Ignore a discrepancy between file name and entity name
13880
13910
 
13881
13911
  /**
13882
13912
  * Wallet metadata used by USE PROJECT when resolving GitHub credentials.
@@ -14735,9 +14765,7 @@
14735
14765
  defaultBranch: repositoryReference.defaultBranch,
14736
14766
  });
14737
14767
  }
14738
- /**
14739
- * Note: [💞] Ignore a discrepancy between file name and entity name
14740
- */
14768
+ // Note: [💞] Ignore a discrepancy between file name and entity name
14741
14769
 
14742
14770
  /**
14743
14771
  * A search engine implementation that uses the SerpApi to fetch Google search results.
@@ -14948,9 +14976,7 @@
14948
14976
  };
14949
14977
  }
14950
14978
  }
14951
- /**
14952
- * Note: [💞] Ignore a discrepancy between file name and entity name
14953
- */
14979
+ // Note: [💞] Ignore a discrepancy between file name and entity name
14954
14980
 
14955
14981
  /**
14956
14982
  * Maximum allowed source length for create-agent payloads.
@@ -15147,9 +15173,7 @@
15147
15173
  };
15148
15174
  }
15149
15175
  }
15150
- /**
15151
- * Note: [💞] Ignore a discrepancy between file name and entity name
15152
- */
15176
+ // Note: [💞] Ignore a discrepancy between file name and entity name
15153
15177
 
15154
15178
  /**
15155
15179
  * Creates system-message instructions for `USE TIMEOUT`.
@@ -15214,9 +15238,7 @@
15214
15238
  return null;
15215
15239
  }
15216
15240
  }
15217
- /**
15218
- * Note: [💞] Ignore a discrepancy between file name and entity name
15219
- */
15241
+ // Note: [💞] Ignore a discrepancy between file name and entity name
15220
15242
 
15221
15243
  /**
15222
15244
  * Builds a disabled timeout-tool payload.
@@ -15950,9 +15972,7 @@
15950
15972
  return createTimeoutToolFunctions();
15951
15973
  }
15952
15974
  }
15953
- /**
15954
- * Note: [💞] Ignore a discrepancy between file name and entity name
15955
- */
15975
+ // Note: [💞] Ignore a discrepancy between file name and entity name
15956
15976
 
15957
15977
  /**
15958
15978
  * USE TIME commitment definition
@@ -16099,9 +16119,7 @@
16099
16119
  };
16100
16120
  }
16101
16121
  }
16102
- /**
16103
- * Note: [💞] Ignore a discrepancy between file name and entity name
16104
- */
16122
+ // Note: [💞] Ignore a discrepancy between file name and entity name
16105
16123
 
16106
16124
  /**
16107
16125
  * Tool name used by the USE USER LOCATION commitment.
@@ -16314,9 +16332,7 @@
16314
16332
  };
16315
16333
  }
16316
16334
  }
16317
- /**
16318
- * Note: [💞] Ignore a discrepancy between file name and entity name
16319
- */
16335
+ // Note: [💞] Ignore a discrepancy between file name and entity name
16320
16336
 
16321
16337
  /**
16322
16338
  * `WRITING RULES` commitment definition.
@@ -16392,9 +16408,7 @@
16392
16408
  return this.appendToSystemMessage(requirements, this.createSystemMessageSection('Writing rules', createWritingRulesSection(trimmedContent)), '\n\n');
16393
16409
  }
16394
16410
  }
16395
- /**
16396
- * Note: [💞] Ignore a discrepancy between file name and entity name
16397
- */
16411
+ // Note: [💞] Ignore a discrepancy between file name and entity name
16398
16412
 
16399
16413
  /**
16400
16414
  * `WRITING SAMPLE` commitment definition.
@@ -16464,9 +16478,7 @@
16464
16478
  return this.appendToSystemMessage(requirements, this.createSystemMessageSection('Writing sample', createWritingSampleSection(trimmedContent)), '\n\n');
16465
16479
  }
16466
16480
  }
16467
- /**
16468
- * Note: [💞] Ignore a discrepancy between file name and entity name
16469
- */
16481
+ // Note: [💞] Ignore a discrepancy between file name and entity name
16470
16482
 
16471
16483
  /**
16472
16484
  * Placeholder commitment definition for commitments that are not yet implemented
@@ -16627,14 +16639,13 @@
16627
16639
  new NotYetImplementedCommitmentDefinition('AVOIDANCE'),
16628
16640
  new NotYetImplementedCommitmentDefinition('CONTEXT'),
16629
16641
  // <- TODO: Prompt: Leverage aliases instead of duplicating commitment definitions
16630
- ];
16631
- /**
16632
- * TODO: [🧠] Maybe create through standardized $register
16633
- * Note: [💞] Ignore a discrepancy between file name and entity name
16634
- */
16642
+ ];
16643
+ // TODO: [🧠] Maybe create through standardized $register
16644
+ // Note: [💞] Ignore a discrepancy between file name and entity name
16635
16645
 
16636
16646
  /**
16637
16647
  * Gets all available commitment definitions
16648
+ *
16638
16649
  * @returns Array of all commitment definitions
16639
16650
  *
16640
16651
  * @public exported from `@promptbook/core`
@@ -16647,6 +16658,7 @@
16647
16658
  * Collects tool functions from all commitment definitions.
16648
16659
  *
16649
16660
  * @returns Map of tool function implementations.
16661
+ *
16650
16662
  * @private internal helper for commitment tool registry
16651
16663
  */
16652
16664
  function collectCommitmentToolFunctions() {
@@ -16668,6 +16680,7 @@
16668
16680
  *
16669
16681
  * @param getFunctions - Provider of current tool functions.
16670
16682
  * @returns Proxy exposing tool functions as properties.
16683
+ *
16671
16684
  * @private internal helper for commitment tool registry
16672
16685
  */
16673
16686
  function createToolFunctionsProxy(getFunctions) {
@@ -16705,10 +16718,11 @@
16705
16718
  },
16706
16719
  });
16707
16720
  }
16721
+ // Note: [💞] Ignore a discrepancy between file name and entity name
16722
+
16708
16723
  /**
16709
- * Note: [💞] Ignore a discrepancy between file name and entity name
16724
+ * Constant for commitment tool functions proxy.
16710
16725
  */
16711
-
16712
16726
  const commitmentToolFunctionsProxy = createToolFunctionsProxy(collectCommitmentToolFunctions);
16713
16727
  /**
16714
16728
  * Gets all function implementations provided by all commitments
@@ -16725,7 +16739,7 @@
16725
16739
  * Wrapper around `window.prompt` synchronous function that interacts with the user via browser prompt
16726
16740
  *
16727
16741
  * Warning: It is used for testing and mocking
16728
- * **NOT intended to use in the production** due to its synchronous nature.
16742
+ * **NOT intended to use in the production** due to its synchronous nature.
16729
16743
  *
16730
16744
  * @public exported from `@promptbook/browser`
16731
16745
  */
@@ -16754,9 +16768,7 @@
16754
16768
  return answer;
16755
16769
  }
16756
16770
  }
16757
- /**
16758
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
16759
- */
16771
+ // Note: [🔵] Code for browser dialog helper [SimplePromptInterfaceTools](src/dialogs/simple-prompt/SimplePromptInterfaceTools.ts) should never be published outside of `@promptbook/browser`
16760
16772
 
16761
16773
  /**
16762
16774
  * Safely retrieves the global scope object (window in browser, global in Node.js)
@@ -16764,7 +16776,7 @@
16764
16776
  *
16765
16777
  * Note: `$` is used to indicate that this function is not a pure function - it access global scope
16766
16778
  *
16767
- * @private internal function of `$Register`
16779
+ * @private internal function of `$Register`
16768
16780
  */
16769
16781
  function $getGlobalScope() {
16770
16782
  return Function('return this')();
@@ -16823,13 +16835,13 @@
16823
16835
  * Central point for registering and accessing different types of content scrapers.
16824
16836
  *
16825
16837
  * Note: `$` is used to indicate that this interacts with the global scope
16838
+ *
16826
16839
  * @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
16840
+ *
16827
16841
  * @public exported from `@promptbook/core`
16828
16842
  */
16829
16843
  const $scrapersRegister = new $Register('scraper_constructors');
16830
- /**
16831
- * TODO: [®] DRY Register logic
16832
- */
16844
+ // TODO: [®] DRY Register logic
16833
16845
 
16834
16846
  /**
16835
16847
  * Provides a collection of scrapers optimized for browser environments.
@@ -16955,14 +16967,13 @@
16955
16967
  }
16956
16968
  }
16957
16969
  }
16958
- /**
16959
- * TODO: !!!! Search ACRY for `window` and put -> [🔵]
16960
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
16961
- */
16970
+ // Note: [🔵] Code for browser speech-recognition adapter [BrowserSpeechRecognition](src/speech-recognition/BrowserSpeechRecognition.ts) should never be published outside of `@promptbook/browser`
16971
+ // TODO: !!!! Search ACRY for `window` and put -> [🔵]
16962
16972
 
16963
16973
  /**
16964
16974
  * Creates a PromptbookStorage backed by IndexedDB.
16965
16975
  * Uses a single object store named 'promptbook'.
16976
+ *
16966
16977
  * @private for `getIndexedDbStorage`
16967
16978
  */
16968
16979
  function makePromptbookStorageFromIndexedDb(options) {
@@ -17035,9 +17046,7 @@
17035
17046
  indexedDbStorageCache.set(cacheKey, storage);
17036
17047
  return storage;
17037
17048
  }
17038
- /**
17039
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17040
- */
17049
+ // Note: [🔵] Code for browser storage helper [getIndexedDbStorage](src/storage/local-storage/getIndexedDbStorage.ts) should never be published outside of `@promptbook/browser`
17041
17050
 
17042
17051
  /**
17043
17052
  * Stringify the PipelineJson with proper formatting
@@ -17065,12 +17074,10 @@
17065
17074
  pipelineJsonStringified += '\n';
17066
17075
  return pipelineJsonStringified;
17067
17076
  }
17068
- /**
17069
- * TODO: [🐝] Not Working properly @see https://promptbook.studio/examples/mixed-knowledge.book
17070
- * TODO: [🧠][0] Maybe rename to `stringifyPipelineJson`, `stringifyIndexedJson`,...
17071
- * TODO: [🧠] Maybe more elegant solution than replacing via regex
17072
- * TODO: [🍙] Make some standard order of json properties
17073
- */
17077
+ // TODO: [🐝] Not Working properly @see https://promptbook.studio/examples/mixed-knowledge.book
17078
+ // TODO: [🧠][0] Maybe rename to `stringifyPipelineJson`, `stringifyIndexedJson`,...
17079
+ // TODO: [🧠] Maybe more elegant solution than replacing via regex
17080
+ // TODO: [🍙] Make some standard order of json properties
17074
17081
 
17075
17082
  /**
17076
17083
  * Creates a Promptbook storage interface from a web storage object.
@@ -17101,10 +17108,8 @@
17101
17108
  },
17102
17109
  };
17103
17110
  }
17104
- /**
17105
- * TODO: [🧠] Should this be named `makePromptbookStorageFromWebStorage` vs `createPromptbookStorageFromWebStorage`
17106
- * TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values
17107
- */
17111
+ // TODO: [🧠] Should this be named `makePromptbookStorageFromWebStorage` vs `createPromptbookStorageFromWebStorage`
17112
+ // TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values
17108
17113
 
17109
17114
  /**
17110
17115
  * Cache storage
@@ -17127,9 +17132,7 @@
17127
17132
  promptbookLocalStorage = makePromptbookStorageFromWebStorage(localStorage);
17128
17133
  return promptbookLocalStorage;
17129
17134
  }
17130
- /**
17131
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17132
- */
17135
+ // Note: [🔵] Code for browser storage helper [getLocalStorage](src/storage/local-storage/getLocalStorage.ts) should never be published outside of `@promptbook/browser`
17133
17136
 
17134
17137
  /**
17135
17138
  * Cache storage
@@ -17152,9 +17155,7 @@
17152
17155
  promptbookSessionStorage = makePromptbookStorageFromWebStorage(sessionStorage);
17153
17156
  return promptbookSessionStorage;
17154
17157
  }
17155
- /**
17156
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17157
- */
17158
+ // Note: [🔵] Code for browser storage helper [getSessionStorage](src/storage/local-storage/getSessionStorage.ts) should never be published outside of `@promptbook/browser`
17158
17159
 
17159
17160
  /**
17160
17161
  * Normalizes a domain-like string into a comparable hostname form.
@@ -17164,6 +17165,7 @@
17164
17165
  *
17165
17166
  * @param rawDomain - Raw domain value (for example `my-agent.com` or `https://my-agent.com/path`).
17166
17167
  * @returns Normalized hostname or `null` when the value cannot be normalized.
17168
+ *
17167
17169
  * @private utility for host/domain matching
17168
17170
  */
17169
17171
  function normalizeDomainForMatching(rawDomain) {
@@ -17186,6 +17188,7 @@
17186
17188
  *
17187
17189
  * @param value - Raw value to inspect.
17188
17190
  * @returns True when the value starts with `http://` or `https://`.
17191
+ *
17189
17192
  * @private utility for host/domain matching
17190
17193
  */
17191
17194
  function hasHttpProtocol(value) {
@@ -17231,6 +17234,7 @@
17231
17234
  *
17232
17235
  * @param agentSource - Raw agent source.
17233
17236
  * @returns Parsed prelude with shared line metadata.
17237
+ *
17234
17238
  * @private internal utility of book agent-source parsing
17235
17239
  */
17236
17240
  function parseAgentSourcePrelude(agentSource) {
@@ -17406,6 +17410,7 @@
17406
17410
  *
17407
17411
  * @param text - Text to extract parameters from
17408
17412
  * @returns Array of parsed parameters with unified representation
17413
+ *
17409
17414
  * @public exported from `@promptbook/core`
17410
17415
  */
17411
17416
  function parseParameters(text) {
@@ -17834,9 +17839,7 @@
17834
17839
  const trimmed = spacetrim.spaceTrim(content);
17835
17840
  return normalizeDomainForMatching(trimmed) || trimmed.toLowerCase();
17836
17841
  }
17837
- /**
17838
- * TODO: [🕛] Unite `AgentBasicInformation`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
17839
- */
17842
+ // TODO: [🕛] Unite `AgentBasicInformation`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
17840
17843
 
17841
17844
  /**
17842
17845
  * Converts Blob, File or MediaSource to url using URL.createObjectURL
@@ -17909,9 +17912,7 @@
17909
17912
  return new URL(this.src);
17910
17913
  }
17911
17914
  }
17912
- /**
17913
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17914
- */
17915
+ // Note: [🔵] Code for browser file helper [ObjectUrl](src/utils/files/ObjectUrl.ts) should never be published outside of `@promptbook/browser`
17915
17916
 
17916
17917
  /**
17917
17918
  * Download a File in a browser
@@ -17931,9 +17932,7 @@
17931
17932
  link.click();
17932
17933
  await objectUrl.destroy();
17933
17934
  }
17934
- /**
17935
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17936
- */
17935
+ // Note: [🔵] Code for browser file helper [$induceFileDownload](src/utils/files/$induceFileDownload.ts) should never be published outside of `@promptbook/browser`
17937
17936
 
17938
17937
  /**
17939
17938
  * Download a Book in a browser
@@ -17952,9 +17951,7 @@
17952
17951
  });
17953
17952
  return /* not await */ $induceFileDownload(bookFile);
17954
17953
  }
17955
- /**
17956
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17957
- */
17954
+ // Note: [🔵] Code for browser file helper [$induceBookDownload](src/utils/files/$induceBookDownload.ts) should never be published outside of `@promptbook/browser`
17958
17955
 
17959
17956
  /**
17960
17957
  * Keep-alive helpers used for streaming chat responses.
@@ -17966,12 +17963,10 @@
17966
17963
  * @private internal streaming helper for Promptbook chat connections
17967
17964
  */
17968
17965
  const CHAT_STREAM_KEEP_ALIVE_TOKEN = 'STREAM_KEEP_ALIVE';
17969
- /**
17970
- * Note: [💞] Ignore a discrepancy between file name and entity name
17971
- */
17966
+ // Note: [💞] Ignore a discrepancy between file name and entity name
17972
17967
 
17973
17968
  /**
17974
- * Number of padding lines to add at the end of the book content
17969
+ * Number of padding lines to add at the end of the book content
17975
17970
  *
17976
17971
  * @public exported from `@promptbook/core`
17977
17972
  */
@@ -18008,9 +18003,7 @@
18008
18003
  const linesToAdd = PADDING_LINES - trailingEmptyLines;
18009
18004
  return (content + '\n'.repeat(linesToAdd));
18010
18005
  }
18011
- /**
18012
- * TODO: [🧠] Maybe export
18013
- */
18006
+ // TODO: [🧠] Maybe export
18014
18007
 
18015
18008
  /**
18016
18009
  * Type guard to check if a string is a valid agent source
@@ -18040,6 +18033,7 @@
18040
18033
  * Default book
18041
18034
  *
18042
18035
  * @deprecated Use `$generateBookBoilerplate` instead
18036
+ *
18043
18037
  * @public exported from `@promptbook/core`
18044
18038
  */
18045
18039
  padBook(validateBook(spacetrim.spaceTrim(`
@@ -18061,6 +18055,7 @@
18061
18055
  * @param {string} pipelineString the candidate for a pipeline string
18062
18056
  * @returns {PipelineString} the same string as input, but validated as valid
18063
18057
  * @throws {ParseError} if the string is not a valid pipeline string
18058
+ *
18064
18059
  * @public exported from `@promptbook/core`
18065
18060
  */
18066
18061
  function validatePipelineString(pipelineString) {
@@ -18079,9 +18074,7 @@
18079
18074
  // <- TODO: Implement the validation + add tests when the pipeline logic considered as invalid
18080
18075
  return pipelineString;
18081
18076
  }
18082
- /**
18083
- * TODO: [🧠][🈴] Where is the best location for this file
18084
- */
18077
+ // TODO: [🧠][🈴] Where is the best location for this file
18085
18078
 
18086
18079
  /**
18087
18080
  * Function `isValidPipelineString` will validate the if the string is a valid pipeline string
@@ -18089,6 +18082,7 @@
18089
18082
  *
18090
18083
  * @param {string} pipelineString the candidate for a pipeline string
18091
18084
  * @returns {boolean} if the string is a valid pipeline string
18085
+ *
18092
18086
  * @public exported from `@promptbook/core`
18093
18087
  */
18094
18088
  function isValidPipelineString(pipelineString) {
@@ -18101,9 +18095,7 @@
18101
18095
  return false;
18102
18096
  }
18103
18097
  }
18104
- /**
18105
- * TODO: [🧠][🈴] Where is the best location for this file
18106
- */
18098
+ // TODO: [🧠][🈴] Where is the best location for this file
18107
18099
 
18108
18100
  /**
18109
18101
  * Tag function for notating a pipeline with a book\`...\ notation as template literal
@@ -18116,6 +18108,7 @@
18116
18108
  * @param strings The static string parts of the template literal
18117
18109
  * @param values The dynamic values embedded within the template literal used as data
18118
18110
  * @returns the pipeline string
18111
+ *
18119
18112
  * @public exported from `@promptbook/core`
18120
18113
  */
18121
18114
  function book(strings, ...values) {
@@ -18142,10 +18135,8 @@
18142
18135
  }
18143
18136
  return padBook(bookString);
18144
18137
  }
18145
- /**
18146
- * TODO: [🧠][🈴] Where is the best location for this file
18147
- * Note: [💞] Ignore a discrepancy between file name and entity name
18148
- */
18138
+ // TODO: [🧠][🈴] Where is the best location for this file
18139
+ // Note: [💞] Ignore a discrepancy between file name and entity name
18149
18140
 
18150
18141
  /**
18151
18142
  * Tool call name emitted while preparing a GPT assistant for an agent.
@@ -18190,9 +18181,7 @@
18190
18181
  { token: CHAT_STREAM_WHITESPACE_TOKEN_TAB, value: '\t' },
18191
18182
  { token: CHAT_STREAM_WHITESPACE_TOKEN_SPACE, value: ' ' },
18192
18183
  ];
18193
- /**
18194
- * Note: [💞] Ignore a discrepancy between file name and entity name
18195
- */
18184
+ // Note: [💞] Ignore a discrepancy between file name and entity name
18196
18185
 
18197
18186
  /**
18198
18187
  * Converts encoded whitespace markers back into real whitespace so the UI can render the message
@@ -18210,6 +18199,9 @@
18210
18199
  }, content);
18211
18200
  }
18212
18201
 
18202
+ /**
18203
+ * Constant for raw tool call ID fields.
18204
+ */
18213
18205
  const RAW_TOOL_CALL_ID_FIELDS = ['callId', 'call_id', 'id'];
18214
18206
  /**
18215
18207
  * Builds a deterministic idempotency key for tool calls so the UI can track updates.
@@ -18240,6 +18232,9 @@
18240
18232
  }
18241
18233
  return `fallback:${toolCall.name}`;
18242
18234
  }
18235
+ /**
18236
+ * Gets arguments key.
18237
+ */
18243
18238
  function getArgumentsKey(value) {
18244
18239
  if (typeof value === 'string') {
18245
18240
  return value;
@@ -18313,6 +18308,7 @@
18313
18308
  * @param existingToolCall - Previous snapshot.
18314
18309
  * @param incomingToolCall - New snapshot.
18315
18310
  * @returns One merged snapshot.
18311
+ *
18316
18312
  * @private helper of `mergeToolCalls`
18317
18313
  */
18318
18314
  function mergeToolCallSnapshot(existingToolCall, incomingToolCall) {
@@ -18335,6 +18331,7 @@
18335
18331
  * @param existingToolCall - Previous snapshot.
18336
18332
  * @param incomingToolCall - New snapshot.
18337
18333
  * @returns Resolved lifecycle state or `undefined` when neither snapshot provides enough data.
18334
+ *
18338
18335
  * @private helper of `mergeToolCalls`
18339
18336
  */
18340
18337
  function resolveMergedToolCallState(existingToolCall, incomingToolCall) {
@@ -18348,6 +18345,7 @@
18348
18345
  *
18349
18346
  * @param toolCall - Tool call snapshot to inspect.
18350
18347
  * @returns Inferred lifecycle state or `undefined`.
18348
+ *
18351
18349
  * @private helper of `mergeToolCalls`
18352
18350
  */
18353
18351
  function inferToolCallState(toolCall) {
@@ -18371,6 +18369,7 @@
18371
18369
  * @param existingValues - Previous list.
18372
18370
  * @param incomingValues - Incoming list.
18373
18371
  * @returns Deduplicated merged list or `undefined`.
18372
+ *
18374
18373
  * @private helper of `mergeToolCalls`
18375
18374
  */
18376
18375
  function mergeUnknownLists(existingValues, incomingValues) {
@@ -18397,6 +18396,7 @@
18397
18396
  *
18398
18397
  * @param value - Value to serialize.
18399
18398
  * @returns String signature.
18399
+ *
18400
18400
  * @private helper of `mergeToolCalls`
18401
18401
  */
18402
18402
  function serializeValueForMerge(value) {
@@ -18414,6 +18414,7 @@
18414
18414
  *
18415
18415
  * @param toolCalls - Mutable list to deduplicate in-place.
18416
18416
  * @returns The same array after removing redundant preparation entries.
18417
+ *
18417
18418
  * @private helper of `mergeToolCalls`
18418
18419
  */
18419
18420
  function deduplicatePreparationToolCalls(toolCalls) {
@@ -18457,6 +18458,7 @@
18457
18458
  * Restricts an Updatable to a (2) BehaviorSubject variant
18458
18459
  *
18459
18460
  * @see Updatable
18461
+ *
18460
18462
  * @private internal utility <- TODO: [🧠] Maybe export from `@promptbook/types`
18461
18463
  */
18462
18464
  function asUpdatableSubject(value) {
@@ -18481,9 +18483,7 @@
18481
18483
  return new rxjs.BehaviorSubject(value);
18482
18484
  }
18483
18485
  }
18484
- /**
18485
- * TODO: [🧠] Maybe `BehaviorSubject` is too heavy for this use case, maybe just tuple `[value,setValue]` is enough
18486
- */
18486
+ // TODO: [🧠] Maybe `BehaviorSubject` is too heavy for this use case, maybe just tuple `[value,setValue]` is enough
18487
18487
 
18488
18488
  /**
18489
18489
  * Takes an item or an array of items and returns an array of items
@@ -18516,6 +18516,7 @@
18516
18516
  * Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
18517
18517
  *
18518
18518
  * Note: Internal utility of `joinLlmExecutionTools` but exposed type
18519
+ *
18519
18520
  * @public exported from `@promptbook/core`
18520
18521
  */
18521
18522
  class MultipleLlmExecutionTools {
@@ -18678,16 +18679,16 @@
18678
18679
  * `MultipleLlmExecutionTools` object. It provides failover and aggregation logic:
18679
18680
  *
18680
18681
  * 1. **Failover**: When a model call is made, it tries providers in the order they were provided.
18681
- * If the first provider doesn't support the requested model or fails, it tries the next one.
18682
+ * If the first provider doesn't support the requested model or fails, it tries the next one.
18682
18683
  * 2. **Aggregation**: `listModels` returns a combined list of all models available from all providers.
18683
18684
  * 3. **Empty case**: If no tools are provided, it logs a warning (as Promptbook requires LLMs to function).
18684
18685
  *
18686
+ * Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
18687
+ *
18685
18688
  * @param title - A descriptive title for this collection of joined tools
18686
18689
  * @param llmExecutionTools - An array of execution tools to be joined
18687
18690
  * @returns A single unified execution tool wrapper
18688
18691
  *
18689
- * Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
18690
- *
18691
18692
  * @public exported from `@promptbook/core`
18692
18693
  */
18693
18694
  function joinLlmExecutionTools(title, ...llmExecutionTools) {
@@ -18724,10 +18725,8 @@
18724
18725
  }
18725
18726
  return new MultipleLlmExecutionTools(title || 'Multiple LLM Providers joined by `joinLlmExecutionTools`', ...llmExecutionTools);
18726
18727
  }
18727
- /**
18728
- * TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
18729
- * TODO: [👷‍♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
18730
- */
18728
+ // TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
18729
+ // TODO: [👷‍♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
18731
18730
 
18732
18731
  /**
18733
18732
  * Just returns the given `LlmExecutionTools` or joins multiple into one
@@ -18741,10 +18740,8 @@
18741
18740
  : joinLlmExecutionTools('Multiple LLM Providers joined by `getSingleLlmExecutionTools`', ..._llms);
18742
18741
  return llmTools;
18743
18742
  }
18744
- /**
18745
- * TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
18746
- * TODO: [👷‍♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
18747
- */
18743
+ // TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
18744
+ // TODO: [👷‍♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
18748
18745
 
18749
18746
  var PipelineCollection = [{title:"Prepare Knowledge from Markdown",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.book",formfactorName:"GENERIC",parameters:[{name:"knowledgeContent",description:"Markdown document content",isInput:true,isOutput:false},{name:"knowledgePieces",description:"The knowledge JSON object",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}",resultingParameterName:"knowledgePieces",dependentParameterNames:["knowledgeContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Knowledge from Markdown\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-from-markdown.book`\n- INPUT PARAMETER `{knowledgeContent}` Markdown document content\n- OUTPUT PARAMETER `{knowledgePieces}` The knowledge JSON object\n\n## Knowledge\n\n<!-- TODO: [🍆] -FORMAT JSON -->\n\n```markdown\nYou are experienced data researcher, extract the important knowledge from the document.\n\n# Rules\n\n- Make pieces of information concise, clear, and easy to understand\n- One piece of information should be approximately 1 paragraph\n- Divide the paragraphs by markdown horizontal lines ---\n- Omit irrelevant information\n- Group redundant information\n- Write just extracted information, nothing else\n\n# The document\n\nTake information from this document:\n\n> {knowledgeContent}\n```\n\n`-> {knowledgePieces}`\n"}],sourceFile:"./books/prepare-knowledge-from-markdown.book"},{title:"Prepare Keywords",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-keywords.book",formfactorName:"GENERIC",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"keywords",description:"Keywords separated by comma",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}",resultingParameterName:"keywords",dependentParameterNames:["knowledgePieceContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Keywords\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-keywords.book`\n- INPUT PARAMETER `{knowledgePieceContent}` The content\n- OUTPUT PARAMETER `{keywords}` Keywords separated by comma\n\n## Knowledge\n\n<!-- TODO: [🍆] -FORMAT JSON -->\n\n```markdown\nYou are experienced data researcher, detect the important keywords in the document.\n\n# Rules\n\n- Write just keywords separated by comma\n\n# The document\n\nTake information from this document:\n\n> {knowledgePieceContent}\n```\n\n`-> {keywords}`\n"}],sourceFile:"./books/prepare-knowledge-keywords.book"},{title:"Prepare Knowledge-piece Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-knowledge-title.book",formfactorName:"GENERIC",parameters:[{name:"knowledgePieceContent",description:"The content",isInput:true,isOutput:false},{name:"title",description:"The title of the document",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"knowledge",title:"Knowledge",content:"You are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}",resultingParameterName:"title",expectations:{words:{min:1,max:8}},dependentParameterNames:["knowledgePieceContent"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Knowledge-piece Title\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-knowledge-title.book`\n- INPUT PARAMETER `{knowledgePieceContent}` The content\n- OUTPUT PARAMETER `{title}` The title of the document\n\n## Knowledge\n\n- EXPECT MIN 1 WORD\n- EXPECT MAX 8 WORDS\n\n```markdown\nYou are experienced content creator, write best title for the document.\n\n# Rules\n\n- Write just title, nothing else\n- Write maximum 5 words for the title\n\n# The document\n\n> {knowledgePieceContent}\n```\n\n`-> {title}`\n"}],sourceFile:"./books/prepare-knowledge-title.book"},{title:"Prepare Persona",pipelineUrl:"https://promptbook.studio/promptbook/prepare-persona.book",formfactorName:"GENERIC",parameters:[{name:"availableModels",description:"List of available model names together with their descriptions as JSON",isInput:true,isOutput:false},{name:"personaDescription",description:"Description of the persona",isInput:true,isOutput:false},{name:"modelsRequirements",description:"Specific requirements for the model",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"make-model-requirements",title:"Make modelRequirements",content:"You are an experienced AI engineer, you need to find the best models for virtual assistants:\n\n## Example\n\n```json\n[\n {\n \"modelName\": \"gpt-4o\",\n \"systemMessage\": \"You are experienced AI engineer and helpful assistant.\",\n \"temperature\": 0.7\n },\n {\n \"modelName\": \"claude-3-5-sonnet\",\n \"systemMessage\": \"You are a friendly and knowledgeable chatbot.\",\n \"temperature\": 0.5\n }\n]\n```\n\n## Instructions\n\n- Your output format is JSON array\n- Sort best-fitting models first\n- Omit any models that are not suitable\n- Write just the JSON, no other text should be present\n- Array contain items with following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nHere are the available models:\n\n```json\n{availableModels}\n```\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}",resultingParameterName:"modelsRequirements",format:"JSON",dependentParameterNames:["availableModels","personaDescription"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Persona\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-persona.book`\n- INPUT PARAMETER `{availableModels}` List of available model names together with their descriptions as JSON\n- INPUT PARAMETER `{personaDescription}` Description of the persona\n- OUTPUT PARAMETER `{modelsRequirements}` Specific requirements for the model\n\n## Make modelRequirements\n\n- FORMAT JSON\n\n```markdown\nYou are an experienced AI engineer, you need to find the best models for virtual assistants:\n\n## Example\n\n\\`\\`\\`json\n[\n {\n \"modelName\": \"gpt-4o\",\n \"systemMessage\": \"You are experienced AI engineer and helpful assistant.\",\n \"temperature\": 0.7\n },\n {\n \"modelName\": \"claude-3-5-sonnet\",\n \"systemMessage\": \"You are a friendly and knowledgeable chatbot.\",\n \"temperature\": 0.5\n }\n]\n\\`\\`\\`\n\n## Instructions\n\n- Your output format is JSON array\n- Sort best-fitting models first\n- Omit any models that are not suitable\n- Write just the JSON, no other text should be present\n- Array contain items with following keys:\n - `modelName`: The name of the model to use\n - `systemMessage`: The system message to provide context to the model\n - `temperature`: The sampling temperature to use\n\n### Key `modelName`\n\nHere are the available models:\n\n\\`\\`\\`json\n{availableModels}\n\\`\\`\\`\n\n### Key `systemMessage`\n\nThe system message is used to communicate instructions or provide context to the model at the beginning of a conversation. It is displayed in a different format compared to user messages, helping the model understand its role in the conversation. The system message typically guides the model's behavior, sets the tone, or specifies desired output from the model. By utilizing the system message effectively, users can steer the model towards generating more accurate and relevant responses.\n\nFor example:\n\n> You are an experienced AI engineer and helpful assistant.\n\n> You are a friendly and knowledgeable chatbot.\n\n### Key `temperature`\n\nThe sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. If set to 0, the model will use log probability to automatically increase the temperature until certain thresholds are hit.\n\nYou can pick a value between 0 and 2. For example:\n\n- `0.1`: Low temperature, extremely conservative and deterministic\n- `0.5`: Medium temperature, balanced between conservative and creative\n- `1.0`: High temperature, creative and bit random\n- `1.5`: Very high temperature, extremely creative and often chaotic and unpredictable\n- `2.0`: Maximum temperature, completely random and unpredictable, for some extreme creative use cases\n\n# The assistant\n\nTake this description of the persona:\n\n> {personaDescription}\n```\n\n`-> {modelsRequirements}`\n"}],sourceFile:"./books/prepare-persona.book"},{title:"Prepare Title",pipelineUrl:"https://promptbook.studio/promptbook/prepare-title.book",formfactorName:"GENERIC",parameters:[{name:"book",description:"The book to prepare the title for",isInput:true,isOutput:false},{name:"title",description:"Best title for the book",isInput:false,isOutput:true}],tasks:[{taskType:"PROMPT_TASK",name:"make-title",title:"Make title",content:"Make best title for given text which describes the workflow:\n\n## Rules\n\n- Write just title, nothing else\n- Title should be concise and clear - Write maximum ideally 2 words, maximum 5 words\n- Title starts with emoticon\n- Title should not mention the input and output of the workflow but the main purpose of the workflow\n _For example, not \"✍ Convert Knowledge-piece to title\" but \"✍ Title\"_\n\n## The workflow\n\n> {book}",resultingParameterName:"title",expectations:{words:{min:1,max:8},lines:{min:1,max:1}},dependentParameterNames:["book"]}],personas:[],preparations:[],knowledgeSources:[],knowledgePieces:[],sources:[{type:"BOOK",path:null,content:"# Prepare Title\n\n- PIPELINE URL `https://promptbook.studio/promptbook/prepare-title.book`\n- INPUT PARAMETER `{book}` The book to prepare the title for\n- OUTPUT PARAMETER `{title}` Best title for the book\n\n## Make title\n\n- EXPECT MIN 1 Word\n- EXPECT MAX 8 Words\n- EXPECT EXACTLY 1 Line\n\n```markdown\nMake best title for given text which describes the workflow:\n\n## Rules\n\n- Write just title, nothing else\n- Title should be concise and clear - Write maximum ideally 2 words, maximum 5 words\n- Title starts with emoticon\n- Title should not mention the input and output of the workflow but the main purpose of the workflow\n _For example, not \"✍ Convert Knowledge-piece to title\" but \"✍ Title\"_\n\n## The workflow\n\n> {book}\n```\n\n`-> {title}`\n"}],sourceFile:"./books/prepare-title.book"}];
18750
18747
 
@@ -18753,8 +18750,9 @@
18753
18750
  *
18754
18751
  * @param content raw html code
18755
18752
  * @returns formatted html code
18756
- * @private withing the package because of HUGE size of prettier dependency
18757
18753
  * @deprecated Prettier removed from Promptbook due to package size
18754
+ *
18755
+ * @private withing the package because of HUGE size of prettier dependency
18758
18756
  */
18759
18757
  function prettifyMarkdown(content) {
18760
18758
  return (content + `\n\n<!-- Note: Prettier removed from Promptbook -->`);
@@ -18766,6 +18764,7 @@
18766
18764
  * @deprecated TODO: [🥍][🧠] Backup original files in `PipelineJson` same as in Promptbook.studio
18767
18765
  * @param pipelineJson Promptbook in JSON format (.bookc)
18768
18766
  * @returns Promptbook in string format (.book.md)
18767
+ *
18769
18768
  * @public exported from `@promptbook/core`
18770
18769
  */
18771
18770
  function pipelineJsonToString(pipelineJson) {
@@ -18882,6 +18881,8 @@
18882
18881
  return validatePipelineString(pipelineString);
18883
18882
  }
18884
18883
  /**
18884
+ * Handles task parameter Json to string.
18885
+ *
18885
18886
  * @private internal utility of `pipelineJsonToString`
18886
18887
  */
18887
18888
  function taskParameterJsonToString(taskParameterJson) {
@@ -18892,13 +18893,11 @@
18892
18893
  }
18893
18894
  return parameterString;
18894
18895
  }
18895
- /**
18896
- * TODO: [🛋] Implement new features and commands into `pipelineJsonToString` + `taskParameterJsonToString` , use `stringifyCommand`
18897
- * TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
18898
- * TODO: [🏛] Maybe make some markdown builder
18899
- * TODO: [🏛] Escape all
18900
- * TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
18901
- */
18896
+ // TODO: [🛋] Implement new features and commands into `pipelineJsonToString` + `taskParameterJsonToString` , use `stringifyCommand`
18897
+ // TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
18898
+ // TODO: [🏛] Maybe make some markdown builder
18899
+ // TODO: [🏛] Escape all
18900
+ // TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
18902
18901
 
18903
18902
  /**
18904
18903
  * Validates PipelineJson if it is logically valid
@@ -18915,6 +18914,7 @@
18915
18914
  * @param pipeline valid or invalid PipelineJson
18916
18915
  * @returns the same pipeline if it is logically valid
18917
18916
  * @throws {PipelineLogicError} on logical error in the pipeline
18917
+ *
18918
18918
  * @public exported from `@promptbook/core`
18919
18919
  */
18920
18920
  function validatePipeline(pipeline) {
@@ -18939,6 +18939,8 @@
18939
18939
  return pipeline;
18940
18940
  }
18941
18941
  /**
18942
+ * Validates pipeline inner function.
18943
+ *
18942
18944
  * @private internal function for `validatePipeline`
18943
18945
  */
18944
18946
  function validatePipeline_InnerFunction(pipeline) {
@@ -19183,20 +19185,19 @@
19183
19185
  * > * - ...
19184
19186
  * > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
19185
19187
  */
19186
- /**
19187
- * TODO: [🧳][main] !!4 Validate that all examples match expectations
19188
- * TODO: [🧳][🐝][main] !!4 Validate that knowledge is valid (non-void)
19189
- * TODO: [🧳][main] !!4 Validate that persona can be used only with CHAT variant
19190
- * TODO: [🧳][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
19191
- * TODO: [🧳][main] !!4 Validate that reserved parameter is not used as joker
19192
- * TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
19193
- * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
19194
- */
19188
+ // TODO: [🧳][main] !!4 Validate that all examples match expectations
19189
+ // TODO: [🧳][🐝][main] !!4 Validate that knowledge is valid (non-void)
19190
+ // TODO: [🧳][main] !!4 Validate that persona can be used only with CHAT variant
19191
+ // TODO: [🧳][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
19192
+ // TODO: [🧳][main] !!4 Validate that reserved parameter is not used as joker
19193
+ // TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
19194
+ // TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
19195
19195
 
19196
19196
  /**
19197
19197
  * Unprepare just strips the preparation data of the pipeline
19198
19198
  *
19199
19199
  * @deprecated In future version this function will be removed or deprecated
19200
+ *
19200
19201
  * @public exported from `@promptbook/core`
19201
19202
  */
19202
19203
  function unpreparePipeline(pipeline) {
@@ -19225,18 +19226,17 @@
19225
19226
  },
19226
19227
  });
19227
19228
  }
19228
- /**
19229
- * TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
19230
- * TODO: Write tests for `preparePipeline`
19231
- * TODO: [🍙] Make some standard order of json properties
19232
- */
19229
+ // TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
19230
+ // TODO: Write tests for `preparePipeline`
19231
+ // TODO: [🍙] Make some standard order of json properties
19233
19232
 
19234
19233
  /**
19235
19234
  * Library of pipelines that groups together pipelines for an application.
19236
19235
  * This implementation is a very thin wrapper around the Array / Map of pipelines.
19237
19236
  *
19238
- * @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
19239
19237
  * @see https://github.com/webgptorg/pipeline#pipeline-collection
19238
+ *
19239
+ * @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
19240
19240
  */
19241
19241
  class SimplePipelineCollection {
19242
19242
  /**
@@ -19340,6 +19340,7 @@
19340
19340
  *
19341
19341
  * @param promptbookSources
19342
19342
  * @returns PipelineCollection
19343
+ *
19343
19344
  * @public exported from `@promptbook/core`
19344
19345
  */
19345
19346
  function createPipelineCollectionFromJson(...promptbooks) {
@@ -19393,6 +19394,7 @@
19393
19394
  *
19394
19395
  * @param executionResult - The partial result of the Promptbook execution
19395
19396
  * @throws {PipelineExecutionError} If the execution is not successful or if multiple errors occurred
19397
+ *
19396
19398
  * @private internal helper function of `asPromise` method of `ExecutionTask`
19397
19399
  */
19398
19400
  function assertsTaskSuccessful(executionResult) {
@@ -19423,9 +19425,7 @@
19423
19425
  `));
19424
19426
  }
19425
19427
  }
19426
- /**
19427
- * TODO: [🧠] Can this return type be better typed than void
19428
- */
19428
+ // TODO: [🧠] Can this return type be better typed than void
19429
19429
 
19430
19430
  /**
19431
19431
  * Helper to create a new task
@@ -19616,10 +19616,8 @@
19616
19616
  },
19617
19617
  };
19618
19618
  }
19619
- /**
19620
- * TODO: Maybe allow to terminate the task and add getter `isFinished` or `status`
19621
- * TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
19622
- */
19619
+ // TODO: Maybe allow to terminate the task and add getter `isFinished` or `status`
19620
+ // TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
19623
19621
 
19624
19622
  /**
19625
19623
  * Represents the uncertain value
@@ -19687,9 +19685,7 @@
19687
19685
  pagesCount: UNCERTAIN_ZERO_VALUE,
19688
19686
  },
19689
19687
  });
19690
- /**
19691
- * Note: [💞] Ignore a discrepancy between file name and entity name
19692
- */
19688
+ // Note: [💞] Ignore a discrepancy between file name and entity name
19693
19689
 
19694
19690
  /**
19695
19691
  * Function `addUsage` will add multiple usages into one
@@ -19754,6 +19750,7 @@
19754
19750
  *
19755
19751
  * @param llmTools - The LLM tools to be intercepted and tracked
19756
19752
  * @returns Full proxy of the tools with added usage tracking capabilities
19753
+ *
19757
19754
  * @public exported from `@promptbook/core`
19758
19755
  */
19759
19756
  function countUsage(llmTools) {
@@ -19851,13 +19848,13 @@
19851
19848
  * Global registry for storing metadata about all available scrapers and converters.
19852
19849
  *
19853
19850
  * Note: `$` is used to indicate that this interacts with the global scope.
19851
+ *
19854
19852
  * @singleton Only one instance of each register is created per build, but there can be more in different contexts (e.g., tests).
19853
+ *
19855
19854
  * @public exported from `@promptbook/core`
19856
19855
  */
19857
19856
  const $scrapersMetadataRegister = new $Register('scrapers_metadata');
19858
- /**
19859
- * TODO: [®] DRY Register logic
19860
- */
19857
+ // TODO: [®] DRY Register logic
19861
19858
 
19862
19859
  /**
19863
19860
  * Creates a message with all registered scrapers
@@ -19942,9 +19939,7 @@
19942
19939
 
19943
19940
  `);
19944
19941
  }
19945
- /**
19946
- * TODO: [®] DRY Register logic
19947
- */
19942
+ // TODO: [®] DRY Register logic
19948
19943
 
19949
19944
  /**
19950
19945
  * Creates unique name for the source
@@ -19963,9 +19958,7 @@
19963
19958
  // <- TODO: Use MAX_FILENAME_LENGTH
19964
19959
  return name;
19965
19960
  }
19966
- /**
19967
- * TODO: [🐱‍🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
19968
- */
19961
+ // TODO: [🐱‍🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
19969
19962
 
19970
19963
  /**
19971
19964
  * Converts a name to a properly formatted subfolder path for cache storage.
@@ -19996,11 +19989,9 @@
19996
19989
  .catch(() => false);
19997
19990
  return isFile;
19998
19991
  }
19999
- /**
20000
- * Note: Not [~🟢~] because it is not directly dependent on `fs
20001
- * TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
20002
- * TODO: [🖇] What about symlinks?
20003
- */
19992
+ // Note: Not [~🟢~] because it is not directly dependent on `fs
19993
+ // TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
19994
+ // TODO: [🖇] What about symlinks?
20004
19995
 
20005
19996
  /**
20006
19997
  * Convert mime type to file extension
@@ -20040,9 +20031,7 @@
20040
20031
  `));
20041
20032
  }
20042
20033
  };
20043
- /**
20044
- * TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
20045
- */
20034
+ // TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
20046
20035
 
20047
20036
  /**
20048
20037
  * Factory function that creates a handler for processing knowledge sources.
@@ -20262,6 +20251,7 @@
20262
20251
  * Prepares the knowledge pieces
20263
20252
  *
20264
20253
  * @see https://github.com/webgptorg/promptbook/discussions/41
20254
+ *
20265
20255
  * @public exported from `@promptbook/core`
20266
20256
  */
20267
20257
  async function prepareKnowledgePieces(knowledgeSources, tools, options) {
@@ -20403,25 +20393,24 @@
20403
20393
  });
20404
20394
  return { tasksPrepared };
20405
20395
  }
20406
- /**
20407
- * TODO: [😂] Adding knowledge should be convert to async high-level abstractions, similar thing with expectations to sync high-level abstractions
20408
- * TODO: [🧠] Add context to each task (if missing)
20409
- * TODO: [🧠] What is better name `prepareTask` or `prepareTaskAndParameters`
20410
- * TODO: [♨][main] !!3 Prepare index the examples and maybe tasks
20411
- * TODO: Write tests for `preparePipeline`
20412
- * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
20413
- * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
20414
- * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
20415
- */
20396
+ // TODO: [😂] Adding knowledge should be convert to async high-level abstractions, similar thing with expectations to sync high-level abstractions
20397
+ // TODO: [🧠] Add context to each task (if missing)
20398
+ // TODO: [🧠] What is better name `prepareTask` or `prepareTaskAndParameters`
20399
+ // TODO: [][main] !!3 Prepare index the examples and maybe tasks
20400
+ // TODO: Write tests for `preparePipeline`
20401
+ // TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
20402
+ // TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
20403
+ // TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
20416
20404
 
20417
20405
  /**
20418
20406
  * Prepare pipeline locally
20419
20407
  *
20420
- * @see https://github.com/webgptorg/promptbook/discussions/196
20421
- *
20422
20408
  * Note: This function does not validate logic of the pipeline
20423
20409
  * Note: This function acts as part of compilation process
20424
20410
  * Note: When the pipeline is already prepared, it returns the same pipeline
20411
+ *
20412
+ * @see https://github.com/webgptorg/promptbook/discussions/196
20413
+ *
20425
20414
  * @public exported from `@promptbook/core`
20426
20415
  */
20427
20416
  async function preparePipeline(pipeline, tools, options) {
@@ -20565,6 +20554,7 @@
20565
20554
  * @param script from which to extract the variables
20566
20555
  * @returns the list of variable names
20567
20556
  * @throws {ParseError} if the script is invalid
20557
+ *
20568
20558
  * @public exported from `@promptbook/javascript`
20569
20559
  */
20570
20560
  function extractVariablesFromJavascript(script) {
@@ -20630,9 +20620,7 @@
20630
20620
  }
20631
20621
  return variables;
20632
20622
  }
20633
- /**
20634
- * TODO: [🔣] Support for multiple languages - python, java,...
20635
- */
20623
+ // TODO: [🔣] Support for multiple languages - python, java,...
20636
20624
 
20637
20625
  /**
20638
20626
  * Parses the task and returns the set of all used parameters
@@ -20640,6 +20628,7 @@
20640
20628
  * @param task the task with used parameters
20641
20629
  * @returns the set of parameter names
20642
20630
  * @throws {ParseError} if the script is invalid
20631
+ *
20643
20632
  * @public exported from `@promptbook/core` <- Note: [👖] This utility is so tightly interconnected with the Promptbook that it is not exported as util but in core
20644
20633
  */
20645
20634
  function extractParameterNamesFromTask(task) {
@@ -20680,9 +20669,7 @@
20680
20669
  }
20681
20670
  return parameterNames;
20682
20671
  }
20683
- /**
20684
- * TODO: [🔣] If script require contentLanguage
20685
- */
20672
+ // TODO: [🔣] If script require contentLanguage
20686
20673
 
20687
20674
  /**
20688
20675
  * Contains configuration options for parsing and generating CSV files, such as delimiters and quoting rules.
@@ -20715,8 +20702,9 @@
20715
20702
  /**
20716
20703
  * Definition for CSV spreadsheet
20717
20704
  *
20705
+ * TODO: [🏢] Export from package `@promptbook/csv`
20706
+ *
20718
20707
  * @public exported from `@promptbook/core`
20719
- * <- TODO: [🏢] Export from package `@promptbook/csv`
20720
20708
  */
20721
20709
  const CsvFormatParser = {
20722
20710
  formatName: 'CSV',
@@ -20806,13 +20794,11 @@
20806
20794
  },
20807
20795
  ],
20808
20796
  };
20809
- /**
20810
- * TODO: [🍓] In `CsvFormatParser` implement simple `isValid`
20811
- * TODO: [🍓] In `CsvFormatParser` implement partial `canBeValid`
20812
- * TODO: [🍓] In `CsvFormatParser` implement `heal
20813
- * TODO: [🍓] In `CsvFormatParser` implement `subvalueParsers`
20814
- * TODO: [🏢] Allow to expect something inside CSV objects and other formats
20815
- */
20797
+ // TODO: [🍓] In `CsvFormatParser` implement simple `isValid`
20798
+ // TODO: [🍓] In `CsvFormatParser` implement partial `canBeValid`
20799
+ // TODO: [🍓] In `CsvFormatParser` implement `heal
20800
+ // TODO: [🍓] In `CsvFormatParser` implement `subvalueParsers`
20801
+ // TODO: [🏢] Allow to expect something inside CSV objects and other formats
20816
20802
 
20817
20803
  /**
20818
20804
  * Definition for JSON format
@@ -20833,17 +20819,15 @@
20833
20819
  },
20834
20820
  subvalueParsers: [],
20835
20821
  };
20836
- /**
20837
- * TODO: [🧠] Maybe proper instance of object
20838
- * TODO: [0] Make string_serialized_json
20839
- * TODO: [1] Make type for JSON Settings and Schema
20840
- * TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
20841
- * TODO: [🍓] In `JsonFormatParser` implement simple `isValid`
20842
- * TODO: [🍓] In `JsonFormatParser` implement partial `canBeValid`
20843
- * TODO: [🍓] In `JsonFormatParser` implement `heal
20844
- * TODO: [🍓] In `JsonFormatParser` implement `subvalueParsers`
20845
- * TODO: [🏢] Allow to expect something inside JSON objects and other formats
20846
- */
20822
+ // TODO: [🧠] Maybe proper instance of object
20823
+ // TODO: [0] Make string_serialized_json
20824
+ // TODO: [1] Make type for JSON Settings and Schema
20825
+ // TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
20826
+ // TODO: [🍓] In `JsonFormatParser` implement simple `isValid`
20827
+ // TODO: [🍓] In `JsonFormatParser` implement partial `canBeValid`
20828
+ // TODO: [🍓] In `JsonFormatParser` implement `heal
20829
+ // TODO: [🍓] In `JsonFormatParser` implement `subvalueParsers`
20830
+ // TODO: [🏢] Allow to expect something inside JSON objects and other formats
20847
20831
 
20848
20832
  /**
20849
20833
  * Definition for any text - this will be always valid
@@ -20881,15 +20865,13 @@
20881
20865
  // <- TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
20882
20866
  ],
20883
20867
  };
20884
- /**
20885
- * TODO: [1] Make type for XML Text and Schema
20886
- * TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
20887
- * TODO: [🍓] In `TextFormatParser` implement simple `isValid`
20888
- * TODO: [🍓] In `TextFormatParser` implement partial `canBeValid`
20889
- * TODO: [🍓] In `TextFormatParser` implement `heal
20890
- * TODO: [🍓] In `TextFormatParser` implement `subvalueParsers`
20891
- * TODO: [🏢] Allow to expect something inside each item of list and other formats
20892
- */
20868
+ // TODO: [1] Make type for XML Text and Schema
20869
+ // TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
20870
+ // TODO: [🍓] In `TextFormatParser` implement simple `isValid`
20871
+ // TODO: [🍓] In `TextFormatParser` implement partial `canBeValid`
20872
+ // TODO: [🍓] In `TextFormatParser` implement `heal
20873
+ // TODO: [🍓] In `TextFormatParser` implement `subvalueParsers`
20874
+ // TODO: [🏢] Allow to expect something inside each item of list and other formats
20893
20875
 
20894
20876
  /**
20895
20877
  * Definition for XML format
@@ -20910,17 +20892,15 @@
20910
20892
  },
20911
20893
  subvalueParsers: [],
20912
20894
  };
20913
- /**
20914
- * TODO: [🧠] Maybe proper instance of object
20915
- * TODO: [0] Make string_serialized_xml
20916
- * TODO: [1] Make type for XML Settings and Schema
20917
- * TODO: [🧠] What to use for validating XMLs - XSD,...
20918
- * TODO: [🍓] In `XmlFormatParser` implement simple `isValid`
20919
- * TODO: [🍓] In `XmlFormatParser` implement partial `canBeValid`
20920
- * TODO: [🍓] In `XmlFormatParser` implement `heal
20921
- * TODO: [🍓] In `XmlFormatParser` implement `subvalueParsers`
20922
- * TODO: [🏢] Allow to expect something inside XML and other formats
20923
- */
20895
+ // TODO: [🧠] Maybe proper instance of object
20896
+ // TODO: [0] Make string_serialized_xml
20897
+ // TODO: [1] Make type for XML Settings and Schema
20898
+ // TODO: [🧠] What to use for validating XMLs - XSD,...
20899
+ // TODO: [🍓] In `XmlFormatParser` implement simple `isValid`
20900
+ // TODO: [🍓] In `XmlFormatParser` implement partial `canBeValid`
20901
+ // TODO: [🍓] In `XmlFormatParser` implement `heal
20902
+ // TODO: [🍓] In `XmlFormatParser` implement `subvalueParsers`
20903
+ // TODO: [🏢] Allow to expect something inside XML and other formats
20924
20904
 
20925
20905
  /**
20926
20906
  * Definitions for all formats supported by Promptbook
@@ -20928,9 +20908,7 @@
20928
20908
  * @private internal index of `...` <- TODO [🏢]
20929
20909
  */
20930
20910
  const FORMAT_DEFINITIONS = [JsonFormatParser, XmlFormatParser, TextFormatParser, CsvFormatParser];
20931
- /**
20932
- * Note: [💞] Ignore a discrepancy between file name and entity name
20933
- */
20911
+ // Note: [💞] Ignore a discrepancy between file name and entity name
20934
20912
 
20935
20913
  /**
20936
20914
  * Maps available parameters to expected parameters for a pipeline task.
@@ -20940,6 +20918,7 @@
20940
20918
  * 2) Then, if there are unmatched expected and available parameters, map them by order.
20941
20919
  *
20942
20920
  * @throws {PipelineExecutionError} If the number of unmatched expected and available parameters does not match, or mapping is ambiguous.
20921
+ *
20943
20922
  * @private within the repository used in `createPipelineExecutor`
20944
20923
  */
20945
20924
  function mapAvailableToExpectedParameters(options) {
@@ -21010,6 +20989,7 @@
21010
20989
  * @param markdown any valid markdown
21011
20990
  * @returns code blocks with language and content
21012
20991
  * @throws {ParseError} if block is not closed properly
20992
+ *
21013
20993
  * @public exported from `@promptbook/markdown-utils`
21014
20994
  */
21015
20995
  function extractAllBlocksFromMarkdown(markdown) {
@@ -21060,9 +21040,7 @@
21060
21040
  }
21061
21041
  return codeBlocks;
21062
21042
  }
21063
- /**
21064
- * TODO: Maybe name for `blockNotation` instead of '```' and '>'
21065
- */
21043
+ // TODO: Maybe name for `blockNotation` instead of '```' and '>'
21066
21044
 
21067
21045
  /**
21068
21046
  * Extracts extracts exactly one valid JSON code block
@@ -21078,8 +21056,9 @@
21078
21056
  * - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
21079
21057
  * - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
21080
21058
  *
21081
- * @public exported from `@promptbook/markdown-utils`
21082
21059
  * @throws {ParseError} if there is no valid JSON block in the markdown
21060
+ *
21061
+ * @public exported from `@promptbook/markdown-utils`
21083
21062
  */
21084
21063
  function extractJsonBlock(markdown) {
21085
21064
  if (isValidJsonString(markdown)) {
@@ -21095,10 +21074,8 @@
21095
21074
  }
21096
21075
  return jsonBlocks[0].content;
21097
21076
  }
21098
- /**
21099
- * TODO: Add some auto-healing logic + extract YAML, JSON5, TOML, etc.
21100
- * TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
21101
- */
21077
+ // TODO: Add some auto-healing logic + extract YAML, JSON5, TOML, etc.
21078
+ // TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
21102
21079
 
21103
21080
  /**
21104
21081
  * Function checkExpectations will check if the expectations on given value are met
@@ -21109,6 +21086,7 @@
21109
21086
  *
21110
21087
  * @throws {ExpectError} if the expectations are not met
21111
21088
  * @returns {void} Nothing
21089
+ *
21112
21090
  * @private internal function of `createPipelineExecutor`
21113
21091
  */
21114
21092
  function checkExpectations(expectations, value) {
@@ -21122,11 +21100,9 @@
21122
21100
  }
21123
21101
  }
21124
21102
  }
21125
- /**
21126
- * TODO: [💝] Unite object for expecting amount and format
21127
- * TODO: [🧠][🤠] This should be part of `TextFormatParser`
21128
- * Note: [💝] and [🤠] are interconnected together
21129
- */
21103
+ // TODO: [💝] Unite object for expecting amount and format
21104
+ // TODO: [🧠][🤠] This should be part of `TextFormatParser`
21105
+ // Note: [💝] and [🤠] are interconnected together
21130
21106
 
21131
21107
  /**
21132
21108
  * Validates a prompt result against expectations and format requirements.
@@ -21137,6 +21113,7 @@
21137
21113
  *
21138
21114
  * @param options - The validation options including result string, expectations, and format
21139
21115
  * @returns Validation result with processed string and validity status
21116
+ *
21140
21117
  * @private internal function of `createPipelineExecutor` and `cacheLlmTools`
21141
21118
  */
21142
21119
  function validatePromptResult(options) {
@@ -21199,6 +21176,7 @@
21199
21176
  *
21200
21177
  * @param options - The options for execution, including task, parameters, pipeline, and configuration.
21201
21178
  * @returns The result string of the executed task.
21179
+ *
21202
21180
  * @private internal utility of `createPipelineExecutor`
21203
21181
  */
21204
21182
  async function executeAttempts(options) {
@@ -21522,9 +21500,7 @@
21522
21500
  }
21523
21501
  return $ongoingTaskResult.$resultString;
21524
21502
  }
21525
- /**
21526
- * TODO: Break into smaller functions
21527
- */
21503
+ // TODO: Break into smaller functions
21528
21504
 
21529
21505
  /**
21530
21506
  * Executes a pipeline task that requires mapping or iterating over subvalues of a parameter (such as rows in a CSV).
@@ -21667,6 +21643,7 @@
21667
21643
  *
21668
21644
  * @param task - The task for which the context is being generated. This should be a deeply immutable TaskJson object.
21669
21645
  * @returns The context as a string, formatted as markdown and parameter value.
21646
+ *
21670
21647
  * @private internal utility of `createPipelineExecutor`
21671
21648
  */
21672
21649
  async function getContextForTask(task) {
@@ -21704,7 +21681,6 @@
21704
21681
  }
21705
21682
 
21706
21683
  /**
21707
- *
21708
21684
  * @param knowledgePieces
21709
21685
  * @returns
21710
21686
  *
@@ -21785,10 +21761,8 @@
21785
21761
  return knowledgePiecesToString(preparedPipeline.knowledgePieces);
21786
21762
  }
21787
21763
  }
21788
- /**
21789
- * TODO: [♨] Implement Better - use keyword search
21790
- * TODO: [♨] Examples of values
21791
- */
21764
+ // TODO: [♨] Implement Better - use keyword search
21765
+ // TODO: [♨] Examples of values
21792
21766
 
21793
21767
  /**
21794
21768
  * Retrieves all reserved parameters for a given pipeline task, including context, knowledge, examples, and metadata.
@@ -21941,9 +21915,7 @@
21941
21915
  resultString,
21942
21916
  });
21943
21917
  }
21944
- /**
21945
- * TODO: [🤹‍♂️]
21946
- */
21918
+ // TODO: [🤹‍♂️]
21947
21919
 
21948
21920
  /**
21949
21921
  * Filters and returns only the output parameters from the provided pipeline execution options.
@@ -22273,6 +22245,7 @@
22273
22245
  *
22274
22246
  * @returns The executor function
22275
22247
  * @throws {PipelineLogicError} on logical error in the pipeline
22248
+ *
22276
22249
  * @public exported from `@promptbook/core`
22277
22250
  */
22278
22251
  function createPipelineExecutor(options) {
@@ -22426,6 +22399,7 @@
22426
22399
  * Prepares the persona for the pipeline
22427
22400
  *
22428
22401
  * @see https://github.com/webgptorg/promptbook/discussions/22
22402
+ *
22429
22403
  * @public exported from `@promptbook/core`
22430
22404
  */
22431
22405
  async function preparePersona(personaDescription, tools, options) {
@@ -22482,13 +22456,11 @@
22482
22456
  modelsRequirements,
22483
22457
  };
22484
22458
  }
22485
- /**
22486
- * TODO: [😩] DRY `preparePersona` and `selectBestModelFromAvailable`
22487
- * TODO: [🔃][main] If the persona was prepared with different version or different set of models, prepare it once again
22488
- * TODO: [🏢] Check validity of `modelName` in pipeline
22489
- * TODO: [🏢] Check validity of `systemMessage` in pipeline
22490
- * TODO: [🏢] Check validity of `temperature` in pipeline
22491
- */
22459
+ // TODO: [😩] DRY `preparePersona` and `selectBestModelFromAvailable`
22460
+ // TODO: [🔃][main] If the persona was prepared with different version or different set of models, prepare it once again
22461
+ // TODO: [🏢] Check validity of `modelName` in pipeline
22462
+ // TODO: [🏢] Check validity of `systemMessage` in pipeline
22463
+ // TODO: [🏢] Check validity of `temperature` in pipeline
22492
22464
 
22493
22465
  /**
22494
22466
  * Creates an empty/basic agent model requirements object
@@ -22523,12 +22495,11 @@
22523
22495
  systemMessage: `You are ${agentName || 'AI Agent'}`,
22524
22496
  };
22525
22497
  }
22526
- /**
22527
- * TODO: [🐤] Deduplicate `AgentModelRequirements` and `ModelRequirements` model requirements
22528
- */
22498
+ // TODO: [🐤] Deduplicate `AgentModelRequirements` and `ModelRequirements` model requirements
22529
22499
 
22530
22500
  /**
22531
22501
  * Gets a commitment definition by its type
22502
+ *
22532
22503
  * @param type The commitment type to look up
22533
22504
  * @returns The commitment definition or null if not found
22534
22505
  *
@@ -22907,7 +22878,9 @@
22907
22878
  };
22908
22879
  }
22909
22880
  /**
22910
- * @private Attempts to upload inline knowledge entries, falling back to legacy data URLs when the upload fails or is not configured.
22881
+ * Attempts to upload inline knowledge entries, falling back to legacy data URLs when the upload fails or is not configured.
22882
+ *
22883
+ * @private
22911
22884
  */
22912
22885
  async function applyPendingInlineKnowledgeSources(requirements, uploader) {
22913
22886
  var _a;
@@ -22928,6 +22901,9 @@
22928
22901
  _metadata: stripInlineKnowledgeMetadata(requirements._metadata),
22929
22902
  };
22930
22903
  }
22904
+ /**
22905
+ * Handles upload inline knowledge source with fallback.
22906
+ */
22931
22907
  async function uploadInlineKnowledgeSourceWithFallback(inlineSource, uploader) {
22932
22908
  try {
22933
22909
  return await uploader(inlineSource);
@@ -22940,6 +22916,9 @@
22940
22916
  return inlineKnowledgeSourceToDataUrl(inlineSource);
22941
22917
  }
22942
22918
  }
22919
+ /**
22920
+ * Extracts inline knowledge sources.
22921
+ */
22943
22922
  function extractInlineKnowledgeSources(metadata) {
22944
22923
  if (!metadata) {
22945
22924
  return [];
@@ -22947,6 +22926,9 @@
22947
22926
  const value = metadata.inlineKnowledgeSources;
22948
22927
  return Array.isArray(value) ? value : [];
22949
22928
  }
22929
+ /**
22930
+ * Strips inline knowledge metadata.
22931
+ */
22950
22932
  function stripInlineKnowledgeMetadata(metadata) {
22951
22933
  if (!metadata || !Object.prototype.hasOwnProperty.call(metadata, 'inlineKnowledgeSources')) {
22952
22934
  return metadata;
@@ -22997,6 +22979,7 @@
22997
22979
  * @param availableModels - Models that could fulfill the agent.
22998
22980
  * @param llmTools - Execution tools used when selecting a best model.
22999
22981
  * @param options - Optional hooks such as the agent reference resolver.
22982
+ *
23000
22983
  * @public exported from `@promptbook/core`
23001
22984
  */
23002
22985
  async function createAgentModelRequirements(agentSource, modelName, availableModels, llmTools, options) {
@@ -23016,6 +22999,7 @@
23016
22999
  * @param agentSource The agent source to derive persona description from
23017
23000
  * @param llmTools LLM tools for preparing persona
23018
23001
  * @returns The name of the best selected model
23002
+ *
23019
23003
  * @private function of `createAgentModelRequirements`
23020
23004
  */
23021
23005
  async function selectBestModelUsingPersona(agentSource, llmTools) {
@@ -23151,6 +23135,7 @@
23151
23135
  *
23152
23136
  * @param {unknown} rawAttachments - The raw attachments to normalize.
23153
23137
  * @returns {Array<ChatAttachment>} The normalized attachments.
23138
+ *
23154
23139
  * @public exported from `@promptbook/core`
23155
23140
  */
23156
23141
  function normalizeChatAttachments(rawAttachments) {
@@ -23195,6 +23180,7 @@
23195
23180
  *
23196
23181
  * @param {ReadonlyArray<ChatAttachment>} attachments - The attachments to format.
23197
23182
  * @returns {string} The formatted context.
23183
+ *
23198
23184
  * @public exported from `@promptbook/core`
23199
23185
  */
23200
23186
  function formatChatAttachmentContext(attachments) {
@@ -23215,6 +23201,7 @@
23215
23201
  * @param {number} maxBytes - Maximum number of bytes to capture.
23216
23202
  * @param {{ captureOverflowByte?: boolean }} [options] - Optional capture behavior.
23217
23203
  * @returns {Promise<{ bytes: Uint8Array }>} Captured bytes, optionally including one overflow byte.
23204
+ *
23218
23205
  * @private internal utility for bounded response reads
23219
23206
  */
23220
23207
  async function readResponseBytes(response, maxBytes, options = {}) {
@@ -23311,6 +23298,7 @@
23311
23298
  * @param {number} maxInlineCharacters - Maximum number of characters to inline.
23312
23299
  * @param {ResolveChatAttachmentOptions} options - Options for resolution.
23313
23300
  * @returns {Promise<ResolvedChatAttachmentContent>} The resolved content.
23301
+ *
23314
23302
  * @private function of resolveChatAttachmentContents
23315
23303
  */
23316
23304
  async function resolveChatAttachmentContent(attachment, maxInlineCharacters, options = {}) {
@@ -23402,6 +23390,7 @@
23402
23390
  * @param {ReadonlyArray<ChatAttachment>} attachments - The attachments to resolve.
23403
23391
  * @param {ResolveChatAttachmentOptions} options - Options for resolution.
23404
23392
  * @returns {Promise<Array<ResolvedChatAttachmentContent>>} The resolved contents.
23393
+ *
23405
23394
  * @public exported from `@promptbook/core`
23406
23395
  */
23407
23396
  async function resolveChatAttachmentContents(attachments, options = {}) {
@@ -23467,6 +23456,7 @@
23467
23456
  *
23468
23457
  * @param {ReadonlyArray<ResolvedChatAttachmentContent>} resolvedContents - The resolved contents to format.
23469
23458
  * @returns {string} The formatted context.
23459
+ *
23470
23460
  * @public exported from `@promptbook/core`
23471
23461
  */
23472
23462
  function formatChatAttachmentContentContext(resolvedContents) {
@@ -23507,6 +23497,7 @@
23507
23497
  * @param {ReadonlyArray<ChatAttachment>} attachments - The attachments to append.
23508
23498
  * @param {ResolveChatAttachmentOptions} options - Options for resolution.
23509
23499
  * @returns {Promise<string>} The updated message content.
23500
+ *
23510
23501
  * @public exported from `@promptbook/core`
23511
23502
  */
23512
23503
  async function appendChatAttachmentContextWithContent(messageContent, attachments, options = {}) {
@@ -23535,9 +23526,7 @@
23535
23526
  function humanizeAiTextEllipsis(aiText) {
23536
23527
  return aiText.replace(/[…⋯]/g, '...').replace(/\.\s+\.\s+\./g, '...');
23537
23528
  }
23538
- /**
23539
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23540
- */
23529
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23541
23530
 
23542
23531
  /**
23543
23532
  * Change dash-like characters to regular dashes `—` -> `-` and remove soft hyphens
@@ -23550,9 +23539,7 @@
23550
23539
  function humanizeAiTextEmdashed(aiText) {
23551
23540
  return aiText.replace(/\u00AD/g, '').replace(/[‐‑‒–—―−⁃﹣-]/g, '-');
23552
23541
  }
23553
- /**
23554
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23555
- */
23542
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23556
23543
 
23557
23544
  /**
23558
23545
  * Change smart quotes to regular quotes
@@ -23565,9 +23552,7 @@
23565
23552
  function humanizeAiTextQuotes(aiText) {
23566
23553
  return aiText.replace(/[“”„‟«»❝❞〝〞〟"]/g, '"').replace(/[‚‘’‛‹›❛❜'ʼ]/g, "'");
23567
23554
  }
23568
- /**
23569
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23570
- */
23555
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23571
23556
 
23572
23557
  /**
23573
23558
  * Remove bracketed source citation artifacts like `\u30105:1\u2020source\u3011`.
@@ -23580,9 +23565,7 @@
23580
23565
  function humanizeAiTextSources(aiText) {
23581
23566
  return aiText.replace(/[ \t]*\u3010\s*\d+(?:\s*:\s*\d+)?\s*\u2020source\s*\u3011/g, '');
23582
23567
  }
23583
- /**
23584
- * Note: [??] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23585
- */
23568
+ // Note: [??] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23586
23569
 
23587
23570
  /**
23588
23571
  * Change unprintable hard spaces to regular spaces and drop zero-width spaces
@@ -23595,9 +23578,7 @@
23595
23578
  function humanizeAiTextWhitespace(aiText) {
23596
23579
  return aiText.replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g, ' ').replace(/[\u200B\uFEFF\u2060]/g, '');
23597
23580
  }
23598
- /**
23599
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23600
- */
23581
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23601
23582
 
23602
23583
  /**
23603
23584
  * Function `humanizeAiText` will remove traces of AI text generation artifacts
@@ -23616,11 +23597,11 @@
23616
23597
  cleanedText = humanizeAiTextWhitespace(cleanedText);
23617
23598
  return cleanedText;
23618
23599
  }
23619
- /**
23620
- * TODO: [🧠] Maybe this should be exported from `@promptbook/utils` not `@promptbook/markdown-utils`
23621
- */
23600
+ // TODO: [🧠] Maybe this should be exported from `@promptbook/utils` not `@promptbook/markdown-utils`
23622
23601
 
23623
23602
  /**
23603
+ * Map of promptbook pseudotoken substitution.
23604
+ *
23624
23605
  * @private
23625
23606
  */
23626
23607
  const PROMPTBOOK_PSEUDOTOKEN_SUBSTITUTION = {
@@ -23668,9 +23649,7 @@
23668
23649
  }
23669
23650
  return promptbookifiedTextTokens.join('');
23670
23651
  }
23671
- /**
23672
- * TODO: [🧠][✌️] Make some Promptbook-native token system
23673
- */
23652
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
23674
23653
 
23675
23654
  /**
23676
23655
  * Make UncertainNumber
@@ -23726,6 +23705,7 @@
23726
23705
  *
23727
23706
  * @see https://platform.openai.com/docs/models/
23728
23707
  * @see https://openai.com/api/pricing/
23708
+ *
23729
23709
  * @public exported from `@promptbook/openai`
23730
23710
  */
23731
23711
  const OPENAI_MODELS = exportJson({
@@ -24402,6 +24382,7 @@
24402
24382
  * @param rawResponse The raw response from OpenAI API
24403
24383
  * @param duration The duration of the execution
24404
24384
  * @throws {PipelineExecutionError} If the usage is not defined in the response from OpenAI
24385
+ *
24405
24386
  * @private internal utility of `OpenAiExecutionTools`
24406
24387
  */
24407
24388
  function computeOpenAiUsage(promptContent, // <- Note: Intentionally using [] to access type properties to bring jsdoc from Prompt/PromptResult to consumer
@@ -24444,15 +24425,14 @@
24444
24425
  },
24445
24426
  };
24446
24427
  }
24447
- /**
24448
- * TODO: [🤝] DRY Maybe some common abstraction between `computeOpenAiUsage` and `computeAnthropicClaudeUsage`
24449
- */
24428
+ // TODO: [🤝] DRY Maybe some common abstraction between `computeOpenAiUsage` and `computeAnthropicClaudeUsage`
24450
24429
 
24451
24430
  /**
24452
24431
  * Parses an OpenAI error message to identify which parameter is unsupported
24453
24432
  *
24454
24433
  * @param errorMessage The error message from OpenAI API
24455
24434
  * @returns The parameter name that is unsupported, or null if not an unsupported parameter error
24435
+ *
24456
24436
  * @private utility of LLM Tools
24457
24437
  */
24458
24438
  function parseUnsupportedParameterError(errorMessage) {
@@ -24474,6 +24454,7 @@
24474
24454
  * @param modelRequirements Original model requirements
24475
24455
  * @param unsupportedParameter The parameter to remove
24476
24456
  * @returns New model requirements without the unsupported parameter
24457
+ *
24477
24458
  * @private utility of LLM Tools
24478
24459
  */
24479
24460
  function removeUnsupportedModelRequirement(modelRequirements, unsupportedParameter) {
@@ -24493,8 +24474,10 @@
24493
24474
  }
24494
24475
  /**
24495
24476
  * Checks if an error is an "Unsupported value" error from OpenAI
24477
+ *
24496
24478
  * @param error The error to check
24497
24479
  * @returns true if this is an unsupported parameter error
24480
+ *
24498
24481
  * @private utility of LLM Tools
24499
24482
  */
24500
24483
  function isUnsupportedParameterError(error) {
@@ -25600,13 +25583,11 @@
25600
25583
  return false;
25601
25584
  }
25602
25585
  }
25603
- /**
25604
- * TODO: [🛄] Some way how to re-wrap the errors from `OpenAiCompatibleExecutionTools`
25605
- * TODO: [🛄] Maybe make custom `OpenAiCompatibleError`
25606
- * TODO: [🧠][🈁] Maybe use `isDeterministic` from options
25607
- * TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
25608
- * TODO: [🧠][🦢] Make reverse adapter from LlmExecutionTools to OpenAI-compatible:
25609
- */
25586
+ // TODO: [🛄] Some way how to re-wrap the errors from `OpenAiCompatibleExecutionTools`
25587
+ // TODO: [🛄] Maybe make custom `OpenAiCompatibleError`
25588
+ // TODO: [🧠][🈁] Maybe use `isDeterministic` from options
25589
+ // TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
25590
+ // TODO: [🧠][🦢] Make reverse adapter from LlmExecutionTools to OpenAI-compatible:
25610
25591
 
25611
25592
  /**
25612
25593
  * Profile for OpenAI provider
@@ -25674,9 +25655,21 @@
25674
25655
  }
25675
25656
  }
25676
25657
 
25658
+ /**
25659
+ * Constant for default knowledge source download timeout ms.
25660
+ */
25677
25661
  const DEFAULT_KNOWLEDGE_SOURCE_DOWNLOAD_TIMEOUT_MS = 30000;
25662
+ /**
25663
+ * Constant for default knowledge source upload timeout ms.
25664
+ */
25678
25665
  const DEFAULT_KNOWLEDGE_SOURCE_UPLOAD_TIMEOUT_MS = 900000;
25666
+ /**
25667
+ * Constant for vector store progress log interval min ms.
25668
+ */
25679
25669
  const VECTOR_STORE_PROGRESS_LOG_INTERVAL_MIN_MS = 15000;
25670
+ /**
25671
+ * Constant for vector store stall log threshold ms.
25672
+ */
25680
25673
  const VECTOR_STORE_STALL_LOG_THRESHOLD_MS = 30000;
25681
25674
  /**
25682
25675
  * Base class for OpenAI execution tools that need hosted vector stores.
@@ -26443,6 +26436,9 @@
26443
26436
  }
26444
26437
  }
26445
26438
 
26439
+ /**
26440
+ * Constant for default agent kit model name.
26441
+ */
26446
26442
  const DEFAULT_AGENT_KIT_MODEL_NAME = 'gpt-5.4-nano';
26447
26443
  /**
26448
26444
  * Creates one structured log entry for streamed tool-call updates.
@@ -26486,6 +26482,9 @@
26486
26482
  }
26487
26483
  return 'COMPLETE';
26488
26484
  }
26485
+ /**
26486
+ * Constant for default JSON schema name.
26487
+ */
26489
26488
  const DEFAULT_JSON_SCHEMA_NAME = 'StructuredOutput';
26490
26489
  /**
26491
26490
  * File extensions considered image inputs when MIME type is missing or generic.
@@ -26641,6 +26640,7 @@
26641
26640
  *
26642
26641
  * @param responseFormat - The OpenAI `response_format` payload from the user request.
26643
26642
  * @returns An Agent output type compatible with the requested schema or `undefined` when no impact is required.
26643
+ *
26644
26644
  * @private utility of Open AI
26645
26645
  */
26646
26646
  function mapResponseFormatToAgentOutputType(responseFormat) {
@@ -27399,6 +27399,7 @@
27399
27399
  * - `RemoteAgent` - which is an `Agent` that connects to a Promptbook Agents Server
27400
27400
  *
27401
27401
  * @deprecated Use `OpenAiAgentKitExecutionTools` instead.
27402
+ *
27402
27403
  * @public exported from `@promptbook/openai`
27403
27404
  */
27404
27405
  class OpenAiAssistantExecutionTools extends OpenAiVectorStoreHandler {
@@ -28090,14 +28091,12 @@
28090
28091
  * @private const of `OpenAiAssistantExecutionTools`
28091
28092
  */
28092
28093
  const DISCRIMINANT = 'OPEN_AI_ASSISTANT_V1';
28093
- /**
28094
- * TODO: !!!!! [✨🥚] Knowledge should work both with and without scrapers
28095
- * TODO: [🙎] In `OpenAiAssistantExecutionTools` Allow to create abstract assistants with `isCreatingNewAssistantsAllowed`
28096
- * TODO: [🧠][🧙‍♂️] Maybe there can be some wizard for those who want to use just OpenAI
28097
- * TODO: Maybe make custom OpenAiError
28098
- * TODO: [🧠][🈁] Maybe use `isDeterministic` from options
28099
- * TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
28100
- */
28094
+ // TODO: !!!!! [✨🥚] Knowledge should work both with and without scrapers
28095
+ // TODO: [🙎] In `OpenAiAssistantExecutionTools` Allow to create abstract assistants with `isCreatingNewAssistantsAllowed`
28096
+ // TODO: [🧠][🧙‍♂️] Maybe there can be some wizard for those who want to use just OpenAI
28097
+ // TODO: Maybe make custom OpenAiError
28098
+ // TODO: [🧠][🈁] Maybe use `isDeterministic` from options
28099
+ // TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
28101
28100
 
28102
28101
  /**
28103
28102
  * Emits a progress update to signal assistant preparation before long setup work.
@@ -28574,10 +28573,8 @@
28574
28573
  * Cache of OpenAI vector stores to avoid creating duplicates
28575
28574
  */
28576
28575
  AgentLlmExecutionTools.vectorStoreCache = new Map();
28577
- /**
28578
- * TODO: [🍚] Implement Destroyable pattern to free resources
28579
- * TODO: [🧠] Adding parameter substitution support (here or should be responsibility of the underlying LLM Tools)
28580
- */
28576
+ // TODO: [🍚] Implement Destroyable pattern to free resources
28577
+ // TODO: [🧠] Adding parameter substitution support (here or should be responsibility of the underlying LLM Tools)
28581
28578
 
28582
28579
  /**
28583
28580
  * Extracts the teacher-focused instructions from the latest `OPEN` commitment in the book.
@@ -28587,6 +28584,7 @@
28587
28584
  *
28588
28585
  * @param agentSource - The raw agent book source
28589
28586
  * @returns The trimmed instructions or `null` when no instructive `OPEN` commitment exists.
28587
+ *
28590
28588
  * @private Internal helper shared between self-learning and related features.
28591
28589
  */
28592
28590
  function extractOpenTeacherInstructions(agentSource) {
@@ -28794,6 +28792,7 @@
28794
28792
  *
28795
28793
  * @param section Raw fragment from self-learning workflow.
28796
28794
  * @returns Trimmed fragment, or empty string when nothing remains.
28795
+ *
28797
28796
  * @private function of Agent
28798
28797
  */
28799
28798
  function normalizeBookSection(section) {
@@ -28805,6 +28804,7 @@
28805
28804
  * @param agentSource Current source.
28806
28805
  * @param normalizedSection Candidate fragment expected to be normalized first.
28807
28806
  * @returns True when appending would duplicate an existing fragment.
28807
+ *
28808
28808
  * @private function of Agent
28809
28809
  */
28810
28810
  function containsNormalizedBookSection(agentSource, normalizedSection) {
@@ -28819,6 +28819,7 @@
28819
28819
  *
28820
28820
  * @param responseFormat Prompt response format requirements
28821
28821
  * @returns True when JSON schema mode is active
28822
+ *
28822
28823
  * @private function of Agent
28823
28824
  */
28824
28825
  function isJsonSchemaResponseFormat(responseFormat) {
@@ -28830,6 +28831,7 @@
28830
28831
  * @param content Original agent answer content
28831
28832
  * @param isJsonMode Whether the interaction requested JSON schema output
28832
28833
  * @returns Agent answer, wrapped in a formatted JSON code block when possible
28834
+ *
28833
28835
  * @private function of Agent
28834
28836
  */
28835
28837
  function formatAgentMessageForJsonMode(content, isJsonMode) {
@@ -28855,6 +28857,7 @@
28855
28857
  *
28856
28858
  * @param content Text to parse as JSON
28857
28859
  * @returns Parsed JSON value or null when parsing fails
28860
+ *
28858
28861
  * @private function of Agent
28859
28862
  */
28860
28863
  function tryParseJson(content) {
@@ -28870,6 +28873,7 @@
28870
28873
  *
28871
28874
  * @param options - Normalized sample parts.
28872
28875
  * @returns Book-language sample section ready to append into agent source.
28876
+ *
28873
28877
  * @private function of Agent
28874
28878
  */
28875
28879
  function formatSelfLearningSample(options) {
@@ -28891,6 +28895,7 @@
28891
28895
  *
28892
28896
  * @param internalMessage Internal trace payload.
28893
28897
  * @returns Book-language INTERNAL MESSAGE block.
28898
+ *
28894
28899
  * @private function of Agent
28895
28900
  */
28896
28901
  function formatInternalLearningMessage(internalMessage) {
@@ -28904,6 +28909,7 @@
28904
28909
  *
28905
28910
  * @param result Final chat result used in self-learning.
28906
28911
  * @returns Internal payloads that capture request/response/tool-call context.
28912
+ *
28907
28913
  * @private function of Agent
28908
28914
  */
28909
28915
  function buildInternalLearningMessages(result) {
@@ -28933,6 +28939,7 @@
28933
28939
  *
28934
28940
  * @param toolCall Tool call produced during execution.
28935
28941
  * @returns Sanitized and serializable tool-call payload.
28942
+ *
28936
28943
  * @private function of Agent
28937
28944
  */
28938
28945
  function sanitizeToolCallForLearning(toolCall) {
@@ -28952,6 +28959,7 @@
28952
28959
  *
28953
28960
  * @param payload Internal payload to serialize.
28954
28961
  * @returns Pretty JSON string that can be embedded in BOOK.
28962
+ *
28955
28963
  * @private function of Agent
28956
28964
  */
28957
28965
  function stringifyInternalLearningPayload(payload) {
@@ -29001,6 +29009,7 @@
29001
29009
  * Normalizes teacher commitments into trimmed, display-ready lines.
29002
29010
  *
29003
29011
  * @param commitments Raw teacher output
29012
+ *
29004
29013
  * @private function of Agent
29005
29014
  */
29006
29015
  function getTeacherCommitmentLines(commitments) {
@@ -29013,6 +29022,7 @@
29013
29022
  * Summarizes teacher commitment lines into user-friendly counts for self-learning.
29014
29023
  *
29015
29024
  * @param lines Parsed teacher commitment lines
29025
+ *
29016
29026
  * @private function of Agent
29017
29027
  */
29018
29028
  function summarizeTeacherCommitmentLines(lines) {
@@ -29045,6 +29055,7 @@
29045
29055
  * @param commitments Raw teacher commitments
29046
29056
  * @param used Whether the teacher was invoked
29047
29057
  * @returns Summary of learned commitments
29058
+ *
29048
29059
  * @private function of Agent
29049
29060
  */
29050
29061
  function buildTeacherSummary(commitments, used) {
@@ -29281,9 +29292,7 @@
29281
29292
  return finalResult;
29282
29293
  }
29283
29294
  }
29284
- /**
29285
- * TODO: [🧠][😰]Agent is not working with the parameters, should it be?
29286
- */
29295
+ // TODO: [🧠][😰]Agent is not working with the parameters, should it be?
29287
29296
 
29288
29297
  /**
29289
29298
  * Parses one failed remote agent response into a structured error.
@@ -29749,10 +29758,8 @@
29749
29758
  return agentResult;
29750
29759
  }
29751
29760
  }
29752
- /**
29753
- * TODO: [🧠][😰]Agent is not working with the parameters, should it be?
29754
- * TODO: !!! Agent on remote server
29755
- */
29761
+ // TODO: [🧠][😰]Agent is not working with the parameters, should it be?
29762
+ // TODO: !!! Agent on remote server
29756
29763
 
29757
29764
  var RemoteAgent$1 = /*#__PURE__*/Object.freeze({
29758
29765
  __proto__: null,