@promptbook/browser 0.112.0-34 → 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 (1476) hide show
  1. package/README.md +18 -0
  2. package/esm/index.es.js +608 -585
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/_packages/types.index.d.ts +45 -45
  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 +4 -8
  34. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +2 -3
  35. package/esm/src/book-components/Chat/Chat/ChatSelfLearningSummary.d.ts +0 -3
  36. package/esm/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +0 -3
  37. package/esm/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +1 -0
  38. package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +1 -0
  39. package/esm/src/book-components/Chat/Chat/chatCssClassNames.d.ts +1 -0
  40. package/esm/src/book-components/Chat/Chat/constants.d.ts +4 -3
  41. package/esm/src/book-components/Chat/Chat/insertDictationChunk.d.ts +16 -0
  42. package/esm/src/book-components/Chat/Chat/learnDictationDictionary.d.ts +7 -0
  43. package/esm/src/book-components/Chat/Chat/refineFinalDictationChunk.d.ts +36 -0
  44. package/esm/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +3 -0
  45. package/esm/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +1 -0
  46. package/esm/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +1 -0
  47. package/esm/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +1 -0
  48. package/esm/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +1 -0
  49. package/esm/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +1 -0
  50. package/esm/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +1 -0
  51. package/esm/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +1 -0
  52. package/esm/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +1 -0
  53. package/esm/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +1 -0
  54. package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +1 -0
  55. package/esm/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +1 -0
  56. package/esm/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +1 -0
  57. package/esm/src/book-components/Chat/Chat/resolveSpeechRecognitionUiDescriptor.d.ts +30 -0
  58. package/esm/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +1 -0
  59. package/esm/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +7 -30
  60. package/esm/src/book-components/Chat/Chat/useChatInputAreaDictationPersistence.d.ts +20 -0
  61. package/esm/src/book-components/Chat/Chat/useChatInputAreaDictationSupport.d.ts +29 -0
  62. package/esm/src/book-components/Chat/LlmChat/defaults.d.ts +0 -3
  63. package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +3 -3
  64. package/esm/src/book-components/Chat/MockedChat/constants.d.ts +0 -3
  65. package/esm/src/book-components/Chat/SourceChip/SourceChip.d.ts +4 -3
  66. package/esm/src/book-components/Chat/effects/components/ConfettiEffect.d.ts +3 -0
  67. package/esm/src/book-components/Chat/effects/components/HeartsEffect.d.ts +3 -0
  68. package/esm/src/book-components/Chat/effects/index.d.ts +0 -4
  69. package/esm/src/book-components/Chat/effects/utils/detectEffects.d.ts +1 -0
  70. package/esm/src/book-components/Chat/hooks/useSendMessageToLlmChat.d.ts +4 -4
  71. package/esm/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +1 -0
  72. package/esm/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +0 -3
  73. package/esm/src/book-components/Chat/save/index.d.ts +0 -3
  74. package/esm/src/book-components/Chat/save/pdf/buildChatPdf.d.ts +1 -0
  75. package/esm/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +0 -4
  76. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +3 -5
  77. package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +0 -3
  78. package/esm/src/book-components/Chat/utils/ExportFormat.d.ts +2 -0
  79. package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +4 -3
  80. package/esm/src/book-components/Chat/utils/collectTeamToolCallSummary.d.ts +1 -0
  81. package/esm/src/book-components/Chat/utils/createCitationFootnoteRenderModel.d.ts +1 -0
  82. package/esm/src/book-components/Chat/utils/exportChatHistory.d.ts +0 -3
  83. package/esm/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +2 -1
  84. package/esm/src/book-components/Chat/utils/loadAgentProfile.d.ts +12 -0
  85. package/esm/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +0 -3
  86. package/esm/src/book-components/Chat/utils/parseImagePrompts.d.ts +1 -3
  87. package/esm/src/book-components/Chat/utils/sanitizeStreamingMessageContent.d.ts +14 -0
  88. package/esm/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +3 -0
  89. package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +0 -3
  90. package/esm/src/book-components/Chat/utils/toolCallParsing/extractSearchResults.d.ts +1 -0
  91. package/esm/src/book-components/Chat/utils/toolCallParsing/getToolCallResultDate.d.ts +1 -0
  92. package/esm/src/book-components/Chat/utils/toolCallParsing/getToolCallTimestamp.d.ts +1 -0
  93. package/esm/src/book-components/Chat/utils/toolCallParsing/parseRunBrowserToolResult.d.ts +1 -0
  94. package/esm/src/book-components/Chat/utils/toolCallParsing/parseTeamToolResult.d.ts +1 -0
  95. package/esm/src/book-components/Chat/utils/toolCallParsing/parseToolCallArguments.d.ts +1 -0
  96. package/esm/src/book-components/Chat/utils/toolCallParsing/parseToolCallResult.d.ts +1 -0
  97. package/esm/src/book-components/Chat/utils/toolCallParsing/resolveRunBrowserArtifactUrl.d.ts +1 -0
  98. package/esm/src/book-components/Chat/utils/walletCredentialToolCall.d.ts +3 -3
  99. package/esm/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +3 -5
  100. package/esm/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +3 -5
  101. package/esm/src/book-components/Qr/BrandedQrCode.d.ts +5 -0
  102. package/esm/src/book-components/Qr/GenericQrCode.d.ts +5 -0
  103. package/esm/src/book-components/Qr/PromptbookQrCode.d.ts +5 -0
  104. package/esm/src/book-components/Qr/useQrCode.d.ts +4 -1
  105. package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +4 -0
  106. package/esm/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +4 -0
  107. package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +3 -3
  108. package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -3
  109. package/esm/src/book-components/_common/Tooltip/Tooltip.d.ts +3 -0
  110. package/esm/src/book-components/icons/AboutIcon.d.ts +1 -0
  111. package/esm/src/book-components/icons/AttachmentIcon.d.ts +4 -0
  112. package/esm/src/book-components/icons/CameraIcon.d.ts +4 -0
  113. package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -0
  114. package/esm/src/book-components/icons/EmailIcon.d.ts +1 -0
  115. package/esm/src/book-components/icons/MenuIcon.d.ts +1 -3
  116. package/esm/src/book-components/icons/SaveIcon.d.ts +1 -0
  117. package/esm/src/book-components/icons/SendIcon.d.ts +0 -3
  118. package/esm/src/book-components/icons/TeacherIcon.d.ts +1 -0
  119. package/esm/src/cli/$runPromptbookCli.d.ts +0 -1
  120. package/esm/src/cli/cli-commands/_boilerplate.d.ts +0 -2
  121. package/esm/src/cli/cli-commands/about.d.ts +0 -6
  122. package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +18 -0
  123. package/esm/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +0 -2
  124. package/esm/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +0 -2
  125. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +0 -2
  126. package/esm/src/cli/cli-commands/coder/init.d.ts +0 -2
  127. package/esm/src/cli/cli-commands/coder/run.d.ts +1 -3
  128. package/esm/src/cli/cli-commands/coder/run.test.d.ts +1 -0
  129. package/esm/src/cli/cli-commands/coder/verify.d.ts +0 -2
  130. package/esm/src/cli/cli-commands/coder.d.ts +0 -2
  131. package/esm/src/cli/cli-commands/common/handleActionErrors.d.ts +4 -0
  132. package/esm/src/cli/cli-commands/hello.d.ts +0 -5
  133. package/esm/src/cli/cli-commands/list-models.d.ts +0 -2
  134. package/esm/src/cli/cli-commands/list-scrapers.d.ts +0 -2
  135. package/esm/src/cli/cli-commands/login.d.ts +0 -5
  136. package/esm/src/cli/cli-commands/prettify.d.ts +0 -6
  137. package/esm/src/cli/cli-commands/run.d.ts +0 -8
  138. package/esm/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -5
  139. package/esm/src/cli/cli-commands/start-agents-server.d.ts +0 -2
  140. package/esm/src/cli/cli-commands/start-pipelines-server.d.ts +0 -5
  141. package/esm/src/cli/cli-commands/test-command.d.ts +0 -7
  142. package/esm/src/cli/common/$provideLlmToolsForCli.d.ts +5 -0
  143. package/esm/src/cli/main.d.ts +0 -2
  144. package/esm/src/cli/promptbookCli.d.ts +0 -7
  145. package/esm/src/collection/agent-collection/AgentCollection.d.ts +0 -3
  146. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +2 -6
  147. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +3 -0
  148. package/esm/src/collection/pipeline-collection/SimplePipelineCollection.d.ts +2 -1
  149. package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts +2 -5
  150. package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +1 -0
  151. package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts +4 -3
  152. package/esm/src/collection/pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts +2 -3
  153. package/esm/src/collection/pipeline-collection/constructors/createPipelineSubcollection.d.ts +1 -0
  154. package/esm/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +0 -3
  155. package/esm/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -0
  156. package/esm/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +1 -0
  157. package/esm/src/commands/EXPECT/ExpectCommand.d.ts +0 -3
  158. package/esm/src/commands/EXPECT/expectCommandParser.d.ts +3 -2
  159. package/esm/src/commands/FOREACH/ForeachCommand.d.ts +1 -0
  160. package/esm/src/commands/FOREACH/foreachCommandParser.d.ts +1 -3
  161. package/esm/src/commands/FORMAT/formatCommandParser.d.ts +1 -0
  162. package/esm/src/commands/FORMFACTOR/FormfactorCommand.d.ts +1 -0
  163. package/esm/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -0
  164. package/esm/src/commands/JOKER/JokerCommand.d.ts +1 -0
  165. package/esm/src/commands/JOKER/jokerCommandParser.d.ts +1 -0
  166. package/esm/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +1 -0
  167. package/esm/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -3
  168. package/esm/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts +0 -3
  169. package/esm/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.test.d.ts +0 -3
  170. package/esm/src/commands/MODEL/ModelCommand.d.ts +1 -0
  171. package/esm/src/commands/MODEL/modelCommandParser.d.ts +1 -0
  172. package/esm/src/commands/PARAMETER/ParameterCommand.d.ts +1 -0
  173. package/esm/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -0
  174. package/esm/src/commands/PERSONA/PersonaCommand.d.ts +1 -0
  175. package/esm/src/commands/PERSONA/personaCommandParser.d.ts +1 -0
  176. package/esm/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -0
  177. package/esm/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -0
  178. package/esm/src/commands/SECTION/SectionCommand.d.ts +1 -0
  179. package/esm/src/commands/SECTION/sectionCommandParser.d.ts +1 -0
  180. package/esm/src/commands/URL/UrlCommand.d.ts +1 -0
  181. package/esm/src/commands/URL/urlCommandParser.d.ts +1 -0
  182. package/esm/src/commands/X_ACTION/ActionCommand.d.ts +1 -0
  183. package/esm/src/commands/X_ACTION/actionCommandParser.d.ts +1 -3
  184. package/esm/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +1 -0
  185. package/esm/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -3
  186. package/esm/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +1 -0
  187. package/esm/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -0
  188. package/esm/src/commands/_common/stringifyCommand.d.ts +1 -1
  189. package/esm/src/commands/_common/types/CommandParser.d.ts +0 -4
  190. package/esm/src/commands/index.d.ts +0 -3
  191. package/esm/src/commitments/ACTION/ACTION.d.ts +0 -3
  192. package/esm/src/commitments/CLOSED/CLOSED.d.ts +0 -3
  193. package/esm/src/commitments/CLOSED/CLOSED.test.d.ts +0 -3
  194. package/esm/src/commitments/COMPONENT/COMPONENT.d.ts +0 -3
  195. package/esm/src/commitments/DELETE/DELETE.d.ts +0 -3
  196. package/esm/src/commitments/DICTIONARY/DICTIONARY.d.ts +0 -3
  197. package/esm/src/commitments/FORMAT/FORMAT.d.ts +0 -3
  198. package/esm/src/commitments/FROM/FROM.d.ts +0 -3
  199. package/esm/src/commitments/GOAL/GOAL.d.ts +0 -3
  200. package/esm/src/commitments/IMPORT/IMPORT.d.ts +0 -3
  201. package/esm/src/commitments/LANGUAGE/LANGUAGE.d.ts +0 -3
  202. package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -3
  203. package/esm/src/commitments/MESSAGE/MESSAGE.d.ts +0 -3
  204. package/esm/src/commitments/MESSAGE_SUFFIX/MESSAGE_SUFFIX.d.ts +0 -3
  205. package/esm/src/commitments/META/META.d.ts +0 -3
  206. package/esm/src/commitments/META/META_DESCRIPTION.d.ts +0 -3
  207. package/esm/src/commitments/META_COLOR/META_COLOR.d.ts +0 -3
  208. package/esm/src/commitments/META_DISCLAIMER/META_DISCLAIMER.d.ts +0 -3
  209. package/esm/src/commitments/META_DOMAIN/META_DOMAIN.d.ts +0 -3
  210. package/esm/src/commitments/META_FONT/META_FONT.d.ts +0 -3
  211. package/esm/src/commitments/META_IMAGE/META_IMAGE.d.ts +0 -3
  212. package/esm/src/commitments/META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER.d.ts +0 -3
  213. package/esm/src/commitments/META_LINK/META_LINK.d.ts +0 -3
  214. package/esm/src/commitments/META_VOICE/META_VOICE.d.ts +0 -3
  215. package/esm/src/commitments/MODEL/MODEL.d.ts +0 -3
  216. package/esm/src/commitments/OPEN/OPEN.d.ts +0 -3
  217. package/esm/src/commitments/PERSONA/PERSONA.d.ts +0 -3
  218. package/esm/src/commitments/RULE/RULE.d.ts +0 -3
  219. package/esm/src/commitments/SAMPLE/SAMPLE.d.ts +0 -3
  220. package/esm/src/commitments/SCENARIO/SCENARIO.d.ts +0 -3
  221. package/esm/src/commitments/TEAM/TEAM.d.ts +0 -3
  222. package/esm/src/commitments/TEMPLATE/TEMPLATE.d.ts +0 -3
  223. package/esm/src/commitments/USE/USE.d.ts +0 -3
  224. package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +2 -0
  225. package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -3
  226. package/esm/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +4 -5
  227. package/esm/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +0 -3
  228. package/esm/src/commitments/USE_CALENDAR/calendarReference.d.ts +0 -3
  229. package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -3
  230. package/esm/src/commitments/USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR.d.ts +0 -3
  231. package/esm/src/commitments/USE_MCP/USE_MCP.d.ts +0 -3
  232. package/esm/src/commitments/USE_POPUP/USE_POPUP.d.ts +0 -3
  233. package/esm/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +0 -3
  234. package/esm/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +0 -3
  235. package/esm/src/commitments/USE_PROJECT/projectReference.d.ts +0 -3
  236. package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -3
  237. package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -3
  238. package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -3
  239. package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -3
  240. package/esm/src/commitments/USE_USER_LOCATION/USE_USER_LOCATION.d.ts +0 -3
  241. package/esm/src/commitments/WALLET/WALLET.d.ts +0 -3
  242. package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +0 -3
  243. package/esm/src/commitments/WRITING_SAMPLE/WRITING_SAMPLE.d.ts +0 -3
  244. package/esm/src/commitments/_base/createEmptyAgentModelRequirements.d.ts +0 -3
  245. package/esm/src/commitments/_common/commitmentToolFunctions.d.ts +2 -3
  246. package/esm/src/commitments/_common/createWritingCommitmentSections.d.ts +2 -3
  247. package/esm/src/commitments/_common/getAllCommitmentDefinitions.d.ts +1 -0
  248. package/esm/src/commitments/_common/getAllCommitmentTypes.d.ts +1 -0
  249. package/esm/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +0 -4
  250. package/esm/src/commitments/_common/getCommitmentDefinition.d.ts +1 -0
  251. package/esm/src/commitments/_common/isCommitmentSupported.d.ts +1 -0
  252. package/esm/src/commitments/_common/toolExecutionEnvelope.d.ts +0 -3
  253. package/esm/src/commitments/_common/toolRuntimeContext.d.ts +3 -3
  254. package/esm/src/commitments/index.d.ts +0 -4
  255. package/esm/src/config.test.d.ts +0 -3
  256. package/esm/src/constants/streaming.d.ts +0 -3
  257. package/esm/src/constants.d.ts +0 -3
  258. package/esm/src/conversion/archive/loadArchive.d.ts +0 -1
  259. package/esm/src/conversion/archive/saveArchive.d.ts +0 -5
  260. package/esm/src/conversion/compilePipeline.d.ts +2 -7
  261. package/esm/src/conversion/compilePipelineOnRemoteServer.d.ts +2 -5
  262. package/esm/src/conversion/parsePipeline.d.ts +1 -11
  263. package/esm/src/conversion/pipelineJsonToString.d.ts +1 -7
  264. package/esm/src/conversion/prettify/prettifyPipelineString.d.ts +0 -4
  265. package/esm/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +0 -7
  266. package/esm/src/conversion/utils/extractParameterNamesFromTask.d.ts +1 -3
  267. package/esm/src/conversion/validation/_importPipeline.d.ts +6 -2
  268. package/esm/src/conversion/validation/pipelineStringToJson-parseErrors.test.d.ts +0 -3
  269. package/esm/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +0 -3
  270. package/esm/src/conversion/validation/validatePipeline.d.ts +3 -9
  271. package/esm/src/conversion/validation/validatePipeline.test.d.ts +0 -3
  272. package/esm/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -2
  273. package/esm/src/errors/0-BoilerplateError.d.ts +0 -3
  274. package/esm/src/errors/0-index.d.ts +0 -3
  275. package/esm/src/errors/DatabaseError.d.ts +0 -3
  276. package/esm/src/errors/ExpectError.d.ts +2 -1
  277. package/esm/src/errors/ParseError.d.ts +0 -3
  278. package/esm/src/errors/PipelineExecutionError.d.ts +0 -3
  279. package/esm/src/executables/$provideExecutablesForNode.d.ts +0 -5
  280. package/esm/src/executables/apps/locateLibreoffice.d.ts +0 -2
  281. package/esm/src/executables/apps/locatePandoc.d.ts +0 -2
  282. package/esm/src/executables/browsers/locateBrowser.d.ts +0 -1
  283. package/esm/src/executables/browsers/locateDefaultSystemBrowser.d.ts +0 -1
  284. package/esm/src/executables/locateApp.d.ts +0 -2
  285. package/esm/src/executables/platforms/locateAppOnLinux.d.ts +0 -2
  286. package/esm/src/executables/platforms/locateAppOnMacOs.d.ts +0 -2
  287. package/esm/src/executables/platforms/locateAppOnWindows.d.ts +0 -2
  288. package/esm/src/execution/AbstractTaskResult.d.ts +0 -4
  289. package/esm/src/execution/AvailableModel.d.ts +0 -4
  290. package/esm/src/execution/CommonToolsOptions.d.ts +0 -5
  291. package/esm/src/execution/ExecutionTask.d.ts +4 -4
  292. package/esm/src/execution/FilesystemTools.d.ts +0 -3
  293. package/esm/src/execution/LlmExecutionTools.d.ts +3 -9
  294. package/esm/src/execution/LlmExecutionToolsConstructor.d.ts +0 -3
  295. package/esm/src/execution/PipelineExecutor.d.ts +0 -3
  296. package/esm/src/execution/PipelineExecutorResult.d.ts +0 -3
  297. package/esm/src/execution/PromptResult.d.ts +1 -9
  298. package/esm/src/execution/PromptbookFetch.test-type.d.ts +0 -4
  299. package/esm/src/execution/ScriptExecutionTools.d.ts +0 -4
  300. package/esm/src/execution/Usage.d.ts +0 -3
  301. package/esm/src/execution/UserInterfaceTools.d.ts +3 -0
  302. package/esm/src/execution/assertsTaskSuccessful.d.ts +1 -3
  303. package/esm/src/execution/createPipelineExecutor/00-createPipelineExecutor.d.ts +1 -0
  304. package/esm/src/execution/createPipelineExecutor/20-executeTask.d.ts +0 -3
  305. package/esm/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -3
  306. package/esm/src/execution/createPipelineExecutor/getContextForTask.d.ts +1 -0
  307. package/esm/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +0 -4
  308. package/esm/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +0 -1
  309. package/esm/src/execution/execution-report/ExecutionReportJson.d.ts +1 -0
  310. package/esm/src/execution/execution-report/ExecutionReportString.d.ts +0 -3
  311. package/esm/src/execution/execution-report/executionReportJsonToString.d.ts +0 -5
  312. package/esm/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +3 -1
  313. package/esm/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +3 -1
  314. package/esm/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +3 -1
  315. package/esm/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +2 -0
  316. package/esm/src/execution/translation/automatic-translate/translateMessages.d.ts +3 -3
  317. package/esm/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -4
  318. package/esm/src/execution/utils/checkExpectations.d.ts +2 -5
  319. package/esm/src/execution/utils/forEachAsync.d.ts +5 -1
  320. package/esm/src/execution/utils/usage-constants.d.ts +0 -3
  321. package/esm/src/execution/utils/usageToHuman.d.ts +0 -8
  322. package/esm/src/execution/utils/validatePromptResult.d.ts +1 -0
  323. package/esm/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +1 -0
  324. package/esm/src/formats/_common/FormatParser.d.ts +2 -9
  325. package/esm/src/formats/_common/FormatSubvalueParser.d.ts +0 -3
  326. package/esm/src/formats/csv/CsvFormatParser.d.ts +2 -8
  327. package/esm/src/formats/index.d.ts +0 -3
  328. package/esm/src/formats/json/JsonFormatParser.d.ts +0 -11
  329. package/esm/src/formats/text/TextFormatParser.d.ts +0 -9
  330. package/esm/src/formats/xml/XmlFormatParser.d.ts +0 -11
  331. package/esm/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +1 -3
  332. package/esm/src/formfactors/_common/FormfactorDefinition.d.ts +1 -0
  333. package/esm/src/formfactors/index.d.ts +0 -3
  334. package/esm/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +0 -5
  335. package/esm/src/high-level-abstractions/index.d.ts +0 -4
  336. package/esm/src/high-level-abstractions/quick-chatbot/QuickChatbotHla.d.ts +0 -3
  337. package/esm/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +2 -3
  338. package/esm/src/llm-providers/_common/register/$llmToolsRegister.d.ts +2 -3
  339. package/esm/src/llm-providers/_common/register/$provideEnvFilename.d.ts +0 -1
  340. package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  341. package/esm/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +3 -6
  342. package/esm/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +3 -7
  343. package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -16
  344. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +0 -4
  345. package/esm/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +0 -5
  346. package/esm/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +0 -6
  347. package/esm/src/llm-providers/_common/register/LlmToolsOptions.d.ts +0 -4
  348. package/esm/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +1 -0
  349. package/esm/src/llm-providers/_common/utils/assertUniqueModels.d.ts +0 -3
  350. package/esm/src/llm-providers/_common/utils/cache/CacheItem.d.ts +0 -3
  351. package/esm/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -0
  352. package/esm/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +0 -4
  353. package/esm/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -0
  354. package/esm/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +0 -7
  355. package/esm/src/llm-providers/_common/utils/removeUnsupportedModelRequirements.d.ts +4 -0
  356. package/esm/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +1 -0
  357. package/esm/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +0 -4
  358. package/esm/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +3 -7
  359. package/esm/src/llm-providers/_multiple/playground/playground.d.ts +0 -1
  360. package/esm/src/llm-providers/agent/Agent.d.ts +0 -3
  361. package/esm/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +0 -4
  362. package/esm/src/llm-providers/agent/RemoteAgent.d.ts +0 -4
  363. package/esm/src/llm-providers/agent/playground/playground.d.ts +0 -6
  364. package/esm/src/llm-providers/agent/register-configuration.d.ts +0 -5
  365. package/esm/src/llm-providers/agent/register-constructor.d.ts +0 -4
  366. package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -10
  367. package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +3 -3
  368. package/esm/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -8
  369. package/esm/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +1 -3
  370. package/esm/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.test.d.ts +0 -3
  371. package/esm/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +0 -7
  372. package/esm/src/llm-providers/anthropic-claude/playground/playground.d.ts +0 -5
  373. package/esm/src/llm-providers/anthropic-claude/register-configuration.d.ts +0 -3
  374. package/esm/src/llm-providers/anthropic-claude/register-constructor.d.ts +0 -5
  375. package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -6
  376. package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
  377. package/esm/src/llm-providers/azure-openai/createAzureOpenAiExecutionTools.d.ts +0 -4
  378. package/esm/src/llm-providers/azure-openai/playground/playground.d.ts +0 -2
  379. package/esm/src/llm-providers/azure-openai/register-configuration.d.ts +0 -3
  380. package/esm/src/llm-providers/azure-openai/register-constructor.d.ts +0 -4
  381. package/esm/src/llm-providers/deepseek/DeepseekExecutionToolsOptions.d.ts +1 -0
  382. package/esm/src/llm-providers/deepseek/createDeepseekExecutionTools.d.ts +0 -3
  383. package/esm/src/llm-providers/deepseek/deepseek-models.d.ts +1 -6
  384. package/esm/src/llm-providers/deepseek/register-configuration.d.ts +0 -3
  385. package/esm/src/llm-providers/deepseek/register-constructor.d.ts +0 -4
  386. package/esm/src/llm-providers/google/GoogleExecutionToolsOptions.d.ts +1 -0
  387. package/esm/src/llm-providers/google/createGoogleExecutionTools.d.ts +0 -4
  388. package/esm/src/llm-providers/google/google-models.d.ts +1 -6
  389. package/esm/src/llm-providers/google/register-configuration.d.ts +0 -3
  390. package/esm/src/llm-providers/google/register-constructor.d.ts +0 -4
  391. package/esm/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -5
  392. package/esm/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +0 -4
  393. package/esm/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +0 -3
  394. package/esm/src/llm-providers/mocked/test/joker.test.d.ts +0 -3
  395. package/esm/src/llm-providers/mocked/test/mocked-chat.test.d.ts +0 -4
  396. package/esm/src/llm-providers/mocked/test/mocked-completion.test.d.ts +0 -3
  397. package/esm/src/llm-providers/ollama/OllamaExecutionTools.d.ts +0 -3
  398. package/esm/src/llm-providers/ollama/OllamaExecutionToolsOptions.d.ts +1 -0
  399. package/esm/src/llm-providers/ollama/ollama-models.d.ts +1 -4
  400. package/esm/src/llm-providers/ollama/playground/playground.d.ts +0 -2
  401. package/esm/src/llm-providers/ollama/register-configuration.d.ts +0 -3
  402. package/esm/src/llm-providers/ollama/register-constructor.d.ts +0 -4
  403. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +10 -0
  404. package/esm/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -8
  405. package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +0 -7
  406. package/esm/src/llm-providers/openai/OpenAiCompatibleExecutionToolsOptions.d.ts +2 -0
  407. package/esm/src/llm-providers/openai/computeOpenAiUsage.d.ts +1 -3
  408. package/esm/src/llm-providers/openai/computeOpenAiUsage.test.d.ts +0 -3
  409. package/esm/src/llm-providers/openai/createOpenAiAssistantExecutionTools.d.ts +0 -4
  410. package/esm/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +0 -4
  411. package/esm/src/llm-providers/openai/createOpenAiExecutionTools.d.ts +0 -4
  412. package/esm/src/llm-providers/openai/openai-models.d.ts +1 -0
  413. package/esm/src/llm-providers/openai/openai-models.test.d.ts +0 -3
  414. package/esm/src/llm-providers/openai/playground/playground.d.ts +0 -2
  415. package/esm/src/llm-providers/openai/register-configuration.d.ts +0 -3
  416. package/esm/src/llm-providers/openai/register-constructor.d.ts +0 -4
  417. package/esm/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -9
  418. package/esm/src/llm-providers/remote/playground/playground.d.ts +0 -1
  419. package/esm/src/llm-providers/vercel/playground/playground.d.ts +0 -2
  420. package/esm/src/other/templates/getBookTemplates.d.ts +2 -5
  421. package/esm/src/personas/preparePersona.d.ts +1 -7
  422. package/esm/src/pipeline/PipelineInterface/PipelineInterface.d.ts +1 -0
  423. package/esm/src/pipeline/PipelineInterface/constants.d.ts +0 -3
  424. package/esm/src/pipeline/PipelineJson/CommonTaskJson.d.ts +0 -4
  425. package/esm/src/pipeline/PipelineJson/DialogTaskJson.d.ts +1 -3
  426. package/esm/src/pipeline/PipelineJson/Expectations.d.ts +4 -3
  427. package/esm/src/pipeline/PipelineJson/KnowledgePieceJson.d.ts +0 -4
  428. package/esm/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +0 -3
  429. package/esm/src/pipeline/PipelineJson/PersonaJson.d.ts +0 -3
  430. package/esm/src/pipeline/PipelineJson/PreparationJson.d.ts +3 -5
  431. package/esm/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +1 -4
  432. package/esm/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +1 -3
  433. package/esm/src/pipeline/book-notation.d.ts +1 -4
  434. package/esm/src/pipeline/isValidPipelineString.d.ts +1 -3
  435. package/esm/src/pipeline/isValidPipelineString.test.d.ts +0 -3
  436. package/esm/src/pipeline/prompt-notation/helpers/ParameterEscaping.d.ts +5 -0
  437. package/esm/src/pipeline/prompt-notation/helpers/ParameterNaming.d.ts +1 -0
  438. package/esm/src/pipeline/prompt-notation/helpers/ParameterSection.d.ts +2 -0
  439. package/esm/src/pipeline/prompt-notation.d.ts +2 -5
  440. package/esm/src/pipeline/prompt-notation.test.d.ts +0 -3
  441. package/esm/src/pipeline/validatePipelineString.d.ts +1 -3
  442. package/esm/src/playground/permanent/_boilerplate.d.ts +0 -1
  443. package/esm/src/playground/permanent/agent-with-browser-playground.d.ts +0 -1
  444. package/esm/src/playground/permanent/error-handling-playground.d.ts +0 -1
  445. package/esm/src/playground/playground.d.ts +0 -2
  446. package/esm/src/postprocessing/utils/extractBlock.d.ts +2 -1
  447. package/esm/src/postprocessing/utils/extractJsonBlock.d.ts +2 -5
  448. package/esm/src/prepare/PrepareAndScrapeOptions.d.ts +0 -4
  449. package/esm/src/prepare/preparePipeline.d.ts +3 -2
  450. package/esm/src/prepare/preparePipelineOnRemoteServer.d.ts +2 -5
  451. package/esm/src/prepare/prepareTasks.d.ts +6 -10
  452. package/esm/src/prepare/unpreparePipeline.d.ts +1 -5
  453. package/esm/src/remote-server/RemoteServer.d.ts +3 -0
  454. package/esm/src/remote-server/openapi.d.ts +3 -4
  455. package/esm/src/remote-server/socket-types/_subtypes/Identification.d.ts +1 -5
  456. package/esm/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Request.d.ts +0 -3
  457. package/esm/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +0 -3
  458. package/esm/src/remote-server/startAgentServer.d.ts +6 -2
  459. package/esm/src/remote-server/startRemoteServer.d.ts +1 -15
  460. package/esm/src/remote-server/types/RemoteClientOptions.d.ts +0 -5
  461. package/esm/src/remote-server/types/RemoteServerOptions.d.ts +10 -4
  462. package/esm/src/remote-server/ui/ServerApp.d.ts +1 -0
  463. package/esm/src/remote-server/ui/types.d.ts +3 -0
  464. package/esm/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +1 -4
  465. package/esm/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +0 -3
  466. package/esm/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +0 -1
  467. package/esm/src/scrapers/_boilerplate/register-constructor.d.ts +0 -4
  468. package/esm/src/scrapers/_boilerplate/register-metadata.d.ts +0 -3
  469. package/esm/src/scrapers/_common/Scraper.d.ts +0 -5
  470. package/esm/src/scrapers/_common/ScraperIntermediateSource.d.ts +0 -3
  471. package/esm/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -0
  472. package/esm/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +0 -2
  473. package/esm/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -2
  474. package/esm/src/scrapers/_common/register/$provideScriptingForNode.d.ts +0 -2
  475. package/esm/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +0 -3
  476. package/esm/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +2 -3
  477. package/esm/src/scrapers/_common/register/$scrapersRegister.d.ts +2 -3
  478. package/esm/src/scrapers/_common/register/ScraperConstructor.d.ts +0 -3
  479. package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +0 -7
  480. package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.test.d.ts +0 -3
  481. package/esm/src/scrapers/_common/utils/promptbookFetch.d.ts +0 -3
  482. package/esm/src/scrapers/document/DocumentScraper.d.ts +1 -6
  483. package/esm/src/scrapers/document/DocumentScraper.test.d.ts +0 -3
  484. package/esm/src/scrapers/document/createDocumentScraper.d.ts +0 -3
  485. package/esm/src/scrapers/document/playground/document-scraper-playground.d.ts +0 -1
  486. package/esm/src/scrapers/document/register-constructor.d.ts +0 -4
  487. package/esm/src/scrapers/document/register-metadata.d.ts +0 -3
  488. package/esm/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -6
  489. package/esm/src/scrapers/document-legacy/LegacyDocumentScraper.test.d.ts +0 -3
  490. package/esm/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +0 -3
  491. package/esm/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +0 -1
  492. package/esm/src/scrapers/document-legacy/register-constructor.d.ts +0 -4
  493. package/esm/src/scrapers/document-legacy/register-metadata.d.ts +0 -3
  494. package/esm/src/scrapers/markdown/MarkdownScraper.d.ts +1 -4
  495. package/esm/src/scrapers/markdown/MarkdownScraper.test.d.ts +0 -3
  496. package/esm/src/scrapers/markdown/createMarkdownScraper.d.ts +0 -3
  497. package/esm/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +0 -1
  498. package/esm/src/scrapers/markdown/register-constructor.d.ts +0 -4
  499. package/esm/src/scrapers/markdown/register-metadata.d.ts +0 -3
  500. package/esm/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -7
  501. package/esm/src/scrapers/markitdown/createMarkitdownScraper.d.ts +0 -4
  502. package/esm/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +0 -1
  503. package/esm/src/scrapers/markitdown/register-constructor.d.ts +0 -5
  504. package/esm/src/scrapers/markitdown/register-metadata.d.ts +0 -3
  505. package/esm/src/scrapers/pdf/PdfScraper.d.ts +1 -6
  506. package/esm/src/scrapers/pdf/createPdfScraper.d.ts +0 -3
  507. package/esm/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +0 -1
  508. package/esm/src/scrapers/pdf/register-constructor.d.ts +0 -4
  509. package/esm/src/scrapers/pdf/register-metadata.d.ts +0 -3
  510. package/esm/src/scrapers/website/WebsiteScraper.d.ts +1 -6
  511. package/esm/src/scrapers/website/createWebsiteScraper.d.ts +0 -3
  512. package/esm/src/scrapers/website/playground/website-scraper-playground.d.ts +0 -1
  513. package/esm/src/scrapers/website/register-constructor.d.ts +0 -4
  514. package/esm/src/scrapers/website/register-metadata.d.ts +0 -3
  515. package/esm/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +1 -5
  516. package/esm/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -3
  517. package/esm/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
  518. package/esm/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +0 -3
  519. package/esm/src/scripting/javascript/postprocessing-functions.d.ts +0 -4
  520. package/esm/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +1 -3
  521. package/esm/src/search-engines/SearchEngine.d.ts +3 -0
  522. package/esm/src/speech-recognition/BrowserSpeechRecognition.d.ts +0 -2
  523. package/esm/src/speech-recognition/OpenAiSpeechRecognition.d.ts +2 -2
  524. package/esm/src/storage/_common/PromptbookStorage.d.ts +0 -4
  525. package/esm/src/storage/_common/PromptbookStorage.test-type.d.ts +0 -4
  526. package/esm/src/storage/env-storage/$EnvStorage.d.ts +0 -3
  527. package/esm/src/storage/file-cache-storage/FileCacheStorage.d.ts +0 -2
  528. package/esm/src/storage/local-storage/getIndexedDbStorage.d.ts +0 -1
  529. package/esm/src/storage/local-storage/getLocalStorage.d.ts +0 -1
  530. package/esm/src/storage/local-storage/getSessionStorage.d.ts +0 -1
  531. package/esm/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +1 -0
  532. package/esm/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +0 -4
  533. package/esm/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +1 -3
  534. package/esm/src/transpilers/formatted-book-in-markdown/register.d.ts +2 -5
  535. package/esm/src/transpilers/openai-sdk/playground/playground.d.ts +0 -1
  536. package/esm/src/transpilers/openai-sdk/register.d.ts +2 -5
  537. package/esm/src/types/Arrayable.d.ts +1 -0
  538. package/esm/src/types/InputParameters_private.d.ts +4 -2
  539. package/esm/src/types/IntermediateFilesStrategy.d.ts +0 -3
  540. package/esm/src/types/LlmCall.d.ts +0 -3
  541. package/esm/src/types/ModelRequirements.d.ts +1 -0
  542. package/esm/src/types/ModelVariant.d.ts +3 -0
  543. package/esm/src/types/Parameters.d.ts +31 -0
  544. package/esm/src/types/Parameters_private.d.ts +4 -2
  545. package/esm/src/types/Prompt.d.ts +1 -6
  546. package/esm/src/types/ReservedParameters_private.d.ts +2 -1
  547. package/esm/src/types/ToolCall.d.ts +0 -2
  548. package/esm/src/types/Updatable.d.ts +1 -3
  549. package/esm/src/types/string_agent_hash_private.d.ts +1 -1
  550. package/esm/src/types/string_agent_name.d.ts +32 -0
  551. package/esm/src/types/string_agent_name_in_book_private.d.ts +1 -1
  552. package/esm/src/types/string_agent_name_private.d.ts +2 -1
  553. package/esm/src/types/string_agent_permanent_id_private.d.ts +2 -1
  554. package/esm/src/types/string_business_category_name.d.ts +5 -0
  555. package/esm/src/types/string_business_category_name_private.d.ts +1 -1
  556. package/esm/src/types/string_char_private.d.ts +1 -1
  557. package/esm/src/types/string_chat_prompt_private.d.ts +1 -1
  558. package/esm/src/types/string_completion_prompt_private.d.ts +1 -1
  559. package/esm/src/types/string_markdown.d.ts +0 -1
  560. package/esm/src/types/string_mime_type_private.d.ts +1 -0
  561. package/esm/src/types/string_model_description_private.d.ts +1 -1
  562. package/esm/src/types/string_model_name.d.ts +7 -0
  563. package/esm/src/types/string_model_name_private.d.ts +1 -1
  564. package/esm/src/types/string_name.d.ts +31 -0
  565. package/esm/src/types/string_name_private.d.ts +1 -1
  566. package/esm/src/types/string_page.d.ts +15 -0
  567. package/esm/src/types/string_page_private.d.ts +1 -1
  568. package/esm/src/types/string_parameter_name.d.ts +11 -210
  569. package/esm/src/types/string_parameter_value_private.d.ts +1 -1
  570. package/esm/src/types/string_persona_description.d.ts +14 -0
  571. package/esm/src/types/string_persona_description_private.d.ts +1 -1
  572. package/esm/src/types/string_prompt.d.ts +49 -0
  573. package/esm/src/types/string_prompt_image_private.d.ts +1 -1
  574. package/esm/src/types/string_prompt_private.d.ts +1 -1
  575. package/esm/src/types/string_reserved_parameter_name_private.d.ts +1 -1
  576. package/esm/src/types/string_sha256.d.ts +2 -2
  577. package/esm/src/types/string_system_message_private.d.ts +1 -1
  578. package/esm/src/types/string_template_private.d.ts +1 -1
  579. package/esm/src/types/string_text_prompt_private.d.ts +1 -1
  580. package/esm/src/types/string_title.d.ts +8 -0
  581. package/esm/src/types/string_title_private.d.ts +1 -1
  582. package/esm/src/types/typeAliasEmoji.d.ts +0 -3
  583. package/esm/src/types/typeAliases.d.ts +0 -6
  584. package/esm/src/utils/DEFAULT_THINKING_MESSAGES.d.ts +5 -1
  585. package/esm/src/utils/chat/chatAttachments/appendChatAttachmentContext.d.ts +1 -0
  586. package/esm/src/utils/chat/chatAttachments/appendChatAttachmentContextWithContent.d.ts +1 -0
  587. package/esm/src/utils/chat/chatAttachments/formatChatAttachmentContentContext.d.ts +1 -0
  588. package/esm/src/utils/chat/chatAttachments/formatChatAttachmentContext.d.ts +1 -0
  589. package/esm/src/utils/chat/chatAttachments/normalizeChatAttachments.d.ts +1 -0
  590. package/esm/src/utils/chat/chatAttachments/resolveChatAttachmentContent.d.ts +1 -0
  591. package/esm/src/utils/chat/chatAttachments/resolveChatAttachmentContents.d.ts +1 -0
  592. package/esm/src/utils/chat/chatAttachments.d.ts +0 -3
  593. package/esm/src/utils/chat/constants.d.ts +0 -3
  594. package/esm/src/utils/clientVersion.d.ts +0 -3
  595. package/esm/src/utils/color/$randomColor.d.ts +0 -5
  596. package/esm/src/utils/color/css-colors.d.ts +0 -3
  597. package/esm/src/utils/color/internal-utils/hslToRgb.d.ts +0 -3
  598. package/esm/src/utils/color/internal-utils/rgbToHsl.d.ts +0 -3
  599. package/esm/src/utils/color/operators/ColorTransformer.d.ts +2 -0
  600. package/esm/src/utils/color/operators/lighten.d.ts +0 -3
  601. package/esm/src/utils/color/operators/saturate.d.ts +0 -3
  602. package/esm/src/utils/color/utils/areColorsEqual.d.ts +0 -3
  603. package/esm/src/utils/color/utils/colorDistance.d.ts +2 -2
  604. package/esm/src/utils/color/utils/colorHue.d.ts +0 -1
  605. package/esm/src/utils/color/utils/colorHueDistance.d.ts +0 -1
  606. package/esm/src/utils/color/utils/colorToDataUrl.d.ts +0 -3
  607. package/esm/src/utils/database/uniqueConstraint.d.ts +1 -3
  608. package/esm/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +3 -4
  609. package/esm/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +0 -3
  610. package/esm/src/utils/editable/types/PipelineEditableSerialized.d.ts +2 -2
  611. package/esm/src/utils/editable/utils/renamePipelineParameter.d.ts +4 -3
  612. package/esm/src/utils/editable/utils/stringifyPipelineJson.d.ts +0 -6
  613. package/esm/src/utils/environment/$detectRuntimeEnvironment.d.ts +0 -3
  614. package/esm/src/utils/environment/$getGlobalScope.d.ts +1 -1
  615. package/esm/src/utils/environment/$isRunningInBrowser.d.ts +0 -3
  616. package/esm/src/utils/environment/$isRunningInJest.d.ts +0 -3
  617. package/esm/src/utils/environment/$isRunningInNode.d.ts +0 -3
  618. package/esm/src/utils/environment/$isRunningInWebWorker.d.ts +0 -3
  619. package/esm/src/utils/execCommand/$execCommand.d.ts +0 -2
  620. package/esm/src/utils/execCommand/$execCommands.d.ts +0 -1
  621. package/esm/src/utils/execCommand/ExecCommandOptions.d.ts +3 -4
  622. package/esm/src/utils/expectation-counters/constants.d.ts +0 -4
  623. package/esm/src/utils/expectation-counters/countCharacters.d.ts +0 -4
  624. package/esm/src/utils/expectation-counters/countLines.d.ts +0 -4
  625. package/esm/src/utils/expectation-counters/countPages.d.ts +0 -4
  626. package/esm/src/utils/expectation-counters/countParagraphs.d.ts +0 -4
  627. package/esm/src/utils/expectation-counters/countSentences.d.ts +0 -4
  628. package/esm/src/utils/expectation-counters/countWords.d.ts +0 -5
  629. package/esm/src/utils/expectation-counters/index.d.ts +0 -4
  630. package/esm/src/utils/files/$induceBookDownload.d.ts +0 -1
  631. package/esm/src/utils/files/$induceFileDownload.d.ts +0 -1
  632. package/esm/src/utils/files/ObjectUrl.d.ts +0 -1
  633. package/esm/src/utils/files/isDirectoryExisting.d.ts +0 -6
  634. package/esm/src/utils/files/isExecutable.d.ts +0 -4
  635. package/esm/src/utils/files/isFileExisting.d.ts +0 -5
  636. package/esm/src/utils/files/listAllFiles.d.ts +1 -5
  637. package/esm/src/utils/files/readResponseBytes.d.ts +1 -0
  638. package/esm/src/utils/knowledge/inlineKnowledgeSource.d.ts +11 -6
  639. package/esm/src/utils/knowledge/simplifyKnowledgeLabel.d.ts +2 -0
  640. package/esm/src/utils/linguistic-hash/linguisticHash.d.ts +2 -1
  641. package/esm/src/utils/linguistic-hash/linguisticHashTypes.d.ts +0 -3
  642. package/esm/src/utils/linguistic-hash/linguisticHashWords.cs.d.ts +0 -3
  643. package/esm/src/utils/linguistic-hash/linguisticHashWords.en.d.ts +0 -3
  644. package/esm/src/utils/markdown/addAutoGeneratedSection.d.ts +0 -3
  645. package/esm/src/utils/markdown/createMarkdownTable.d.ts +0 -3
  646. package/esm/src/utils/markdown/escapeMarkdownBlock.d.ts +0 -3
  647. package/esm/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -3
  648. package/esm/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -0
  649. package/esm/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -4
  650. package/esm/src/utils/markdown/humanizeAiText.d.ts +0 -3
  651. package/esm/src/utils/markdown/humanizeAiTextEllipsis.d.ts +0 -3
  652. package/esm/src/utils/markdown/humanizeAiTextEmdashed.d.ts +0 -3
  653. package/esm/src/utils/markdown/humanizeAiTextQuotes.d.ts +0 -3
  654. package/esm/src/utils/markdown/humanizeAiTextSources.d.ts +0 -3
  655. package/esm/src/utils/markdown/humanizeAiTextWhitespace.d.ts +0 -3
  656. package/esm/src/utils/markdown/prettifyMarkdown.d.ts +4 -2
  657. package/esm/src/utils/markdown/promptbookifyAiText.d.ts +0 -3
  658. package/esm/src/utils/markdown/removeMarkdownComments.d.ts +1 -0
  659. package/esm/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
  660. package/esm/src/utils/markdown/removeMarkdownLinks.d.ts +1 -0
  661. package/esm/src/utils/markdown/trimCodeBlock.d.ts +1 -1
  662. package/esm/src/utils/markdown/trimEndOfCodeBlock.d.ts +1 -1
  663. package/esm/src/utils/misc/$getCurrentDate.d.ts +1 -0
  664. package/esm/src/utils/misc/aboutPromptbookInformation.d.ts +3 -3
  665. package/esm/src/utils/misc/computeHash.d.ts +0 -3
  666. package/esm/src/utils/misc/debounce.d.ts +2 -0
  667. package/esm/src/utils/misc/emojis.d.ts +3 -8
  668. package/esm/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +7 -2
  669. package/esm/src/utils/misc/parseNumber.d.ts +0 -4
  670. package/esm/src/utils/misc/xAboutPromptbookInformation.d.ts +3 -4
  671. package/esm/src/utils/normalization/IKeywords.d.ts +0 -3
  672. package/esm/src/utils/normalization/nameToUriPart.d.ts +1 -0
  673. package/esm/src/utils/normalization/nameToUriParts.d.ts +1 -0
  674. package/esm/src/utils/normalization/normalize-to-kebab-case.d.ts +2 -3
  675. package/esm/src/utils/normalization/normalizeTo_PascalCase.d.ts +2 -0
  676. package/esm/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +2 -0
  677. package/esm/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -3
  678. package/esm/src/utils/normalization/normalizeTo_snake_case.d.ts +1 -0
  679. package/esm/src/utils/normalization/orderJson.d.ts +1 -0
  680. package/esm/src/utils/normalization/orderJson.test.d.ts +0 -3
  681. package/esm/src/utils/normalization/parseKeywords.d.ts +1 -4
  682. package/esm/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
  683. package/esm/src/utils/normalization/removeDiacritics.d.ts +1 -3
  684. package/esm/src/utils/normalization/removeEmojis.d.ts +1 -0
  685. package/esm/src/utils/normalization/removeQuotes.d.ts +1 -0
  686. package/esm/src/utils/normalization/searchKeywords.d.ts +1 -3
  687. package/esm/src/utils/normalization/titleToName.d.ts +1 -0
  688. package/esm/src/utils/normalization/unwrapResult.d.ts +1 -3
  689. package/esm/src/utils/organization/$sideEffect.d.ts +1 -0
  690. package/esm/src/utils/organization/TODO_USE.d.ts +1 -0
  691. package/esm/src/utils/organization/just.d.ts +1 -0
  692. package/esm/src/utils/organization/keepImported.d.ts +1 -0
  693. package/esm/src/utils/organization/keepTypeImported.d.ts +1 -0
  694. package/esm/src/utils/organization/keepUnused.d.ts +1 -0
  695. package/esm/src/utils/organization/preserve.d.ts +1 -3
  696. package/esm/src/utils/organization/really_any.d.ts +1 -0
  697. package/esm/src/utils/organization/spaceTrim.d.ts +3 -2
  698. package/esm/src/utils/parameters/extractParameterNames.d.ts +1 -0
  699. package/esm/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +1 -0
  700. package/esm/src/utils/parameters/templateParameters.d.ts +2 -1
  701. package/esm/src/utils/parameters/valueToString.d.ts +2 -2
  702. package/esm/src/utils/random/$generateBookBoilerplate.d.ts +3 -3
  703. package/esm/src/utils/random/$randomAgentPersona.d.ts +1 -3
  704. package/esm/src/utils/random/$randomAgentRule.d.ts +1 -3
  705. package/esm/src/utils/random/$randomFullnameWithColor.d.ts +4 -3
  706. package/esm/src/utils/random/$randomItem.d.ts +0 -3
  707. package/esm/src/utils/random/$randomSeed.d.ts +0 -3
  708. package/esm/src/utils/random/$randomToken.d.ts +2 -5
  709. package/esm/src/utils/random/EnglishNamePool.d.ts +1 -0
  710. package/esm/src/utils/serialization/$deepFreeze.d.ts +1 -3
  711. package/esm/src/utils/serialization/checkSerializableAsJson.d.ts +1 -5
  712. package/esm/src/utils/serialization/clonePipeline.d.ts +1 -3
  713. package/esm/src/utils/serialization/deepClone.d.ts +1 -3
  714. package/esm/src/utils/serialization/exportJson.d.ts +1 -3
  715. package/esm/src/utils/serialization/isSerializableAsJson.d.ts +0 -5
  716. package/esm/src/utils/serialization/jsonStringsToJsons.d.ts +1 -4
  717. package/esm/src/utils/serialization/serializeToPromptbookJavascript.d.ts +3 -3
  718. package/esm/src/utils/sets/difference.d.ts +1 -3
  719. package/esm/src/utils/sets/intersection.d.ts +1 -0
  720. package/esm/src/utils/sets/union.d.ts +1 -0
  721. package/esm/src/utils/take/classes/TakeChain.d.ts +4 -1
  722. package/esm/src/utils/take/interfaces/ITakeChain.d.ts +5 -1
  723. package/esm/src/utils/take/interfaces/Takeable.d.ts +2 -1
  724. package/esm/src/utils/take/take.d.ts +1 -1
  725. package/esm/src/utils/validators/filePath/isRootPath.d.ts +1 -3
  726. package/esm/src/utils/validators/filePath/isRootPath.test.d.ts +0 -3
  727. package/esm/src/utils/validators/filePath/isValidFilePath.d.ts +1 -3
  728. package/esm/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +1 -0
  729. package/esm/src/utils/validators/parameterName/validateParameterName.d.ts +1 -0
  730. package/esm/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -1
  731. package/esm/src/utils/validators/url/extractUrlsFromText.d.ts +1 -0
  732. package/esm/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
  733. package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +0 -3
  734. package/esm/src/utils/validators/url/isValidPipelineUrl.d.ts +0 -3
  735. package/esm/src/utils/validators/url/normalizeDomainForMatching.d.ts +1 -0
  736. package/esm/src/version.d.ts +1 -1
  737. package/esm/src/wizard/$getCompiledBook.d.ts +0 -2
  738. package/esm/src/wizard/wizard.d.ts +1 -2
  739. package/package.json +2 -2
  740. package/umd/index.umd.js +608 -585
  741. package/umd/index.umd.js.map +1 -1
  742. package/umd/src/_packages/types.index.d.ts +45 -45
  743. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -4
  744. package/umd/src/book-2.0/agent-source/AgentModelRequirements.d.ts +0 -4
  745. package/umd/src/book-2.0/agent-source/createAgentModelRequirements.d.ts +7 -0
  746. package/umd/src/book-2.0/agent-source/createTeamToolName.d.ts +1 -0
  747. package/umd/src/book-2.0/agent-source/extractOpenTeacherInstructions.d.ts +1 -0
  748. package/umd/src/book-2.0/agent-source/padBook.d.ts +1 -4
  749. package/umd/src/book-2.0/agent-source/parseAgentSource.d.ts +0 -3
  750. package/umd/src/book-2.0/agent-source/parseAgentSourcePrelude.d.ts +1 -0
  751. package/umd/src/book-2.0/agent-source/parseParameters.d.ts +1 -0
  752. package/umd/src/book-2.0/agent-source/parseTeamCommitment.d.ts +0 -3
  753. package/umd/src/book-2.0/agent-source/pseudoAgentReferences.d.ts +8 -3
  754. package/umd/src/book-2.0/agent-source/string_book.d.ts +1 -0
  755. package/umd/src/book-2.0/utils/generatePlaceholderAgentProfileImageUrl.d.ts +0 -3
  756. package/umd/src/book-components/AvatarProfile/AvatarChip/AvatarChip.d.ts +0 -3
  757. package/umd/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +0 -3
  758. package/umd/src/book-components/AvatarProfile/AvatarProfile/AvatarProfileTooltip.d.ts +4 -0
  759. package/umd/src/book-components/BookEditor/BookEditor.d.ts +0 -3
  760. package/umd/src/book-components/BookEditor/BookEditorActionbar.d.ts +4 -0
  761. package/umd/src/book-components/BookEditor/BookEditorMonaco.d.ts +2 -0
  762. package/umd/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +3 -0
  763. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.d.ts +1 -0
  764. package/umd/src/book-components/BookEditor/useBookEditorMonacoDecorations.d.ts +6 -0
  765. package/umd/src/book-components/BookEditor/useBookEditorMonacoDiagnostics.d.ts +9 -0
  766. package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +7 -0
  767. package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +3 -0
  768. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +24 -0
  769. package/umd/src/book-components/Chat/AgentChat/AgentChat.d.ts +0 -3
  770. package/umd/src/book-components/Chat/AgentChip/AgentChip.d.ts +6 -5
  771. package/umd/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +4 -8
  772. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +2 -3
  773. package/umd/src/book-components/Chat/Chat/ChatSelfLearningSummary.d.ts +0 -3
  774. package/umd/src/book-components/Chat/Chat/ChatToolCallModalComponents.d.ts +0 -3
  775. package/umd/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +1 -0
  776. package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +1 -0
  777. package/umd/src/book-components/Chat/Chat/chatCssClassNames.d.ts +1 -0
  778. package/umd/src/book-components/Chat/Chat/constants.d.ts +4 -3
  779. package/umd/src/book-components/Chat/Chat/insertDictationChunk.d.ts +16 -0
  780. package/umd/src/book-components/Chat/Chat/learnDictationDictionary.d.ts +7 -0
  781. package/umd/src/book-components/Chat/Chat/refineFinalDictationChunk.d.ts +36 -0
  782. package/umd/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +3 -0
  783. package/umd/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +1 -0
  784. package/umd/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +1 -0
  785. package/umd/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +1 -0
  786. package/umd/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +1 -0
  787. package/umd/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +1 -0
  788. package/umd/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +1 -0
  789. package/umd/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +1 -0
  790. package/umd/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +1 -0
  791. package/umd/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +1 -0
  792. package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +1 -0
  793. package/umd/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +1 -0
  794. package/umd/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +1 -0
  795. package/umd/src/book-components/Chat/Chat/resolveSpeechRecognitionUiDescriptor.d.ts +30 -0
  796. package/umd/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +1 -0
  797. package/umd/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +7 -30
  798. package/umd/src/book-components/Chat/Chat/useChatInputAreaDictationPersistence.d.ts +20 -0
  799. package/umd/src/book-components/Chat/Chat/useChatInputAreaDictationSupport.d.ts +29 -0
  800. package/umd/src/book-components/Chat/LlmChat/defaults.d.ts +0 -3
  801. package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +3 -3
  802. package/umd/src/book-components/Chat/MockedChat/constants.d.ts +0 -3
  803. package/umd/src/book-components/Chat/SourceChip/SourceChip.d.ts +4 -3
  804. package/umd/src/book-components/Chat/effects/components/ConfettiEffect.d.ts +3 -0
  805. package/umd/src/book-components/Chat/effects/components/HeartsEffect.d.ts +3 -0
  806. package/umd/src/book-components/Chat/effects/index.d.ts +0 -4
  807. package/umd/src/book-components/Chat/effects/utils/detectEffects.d.ts +1 -0
  808. package/umd/src/book-components/Chat/hooks/useSendMessageToLlmChat.d.ts +4 -4
  809. package/umd/src/book-components/Chat/save/_common/string_chat_format_name.d.ts +1 -0
  810. package/umd/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +0 -3
  811. package/umd/src/book-components/Chat/save/index.d.ts +0 -3
  812. package/umd/src/book-components/Chat/save/pdf/buildChatPdf.d.ts +1 -0
  813. package/umd/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +0 -4
  814. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +3 -5
  815. package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +0 -3
  816. package/umd/src/book-components/Chat/utils/ExportFormat.d.ts +2 -0
  817. package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +4 -3
  818. package/umd/src/book-components/Chat/utils/collectTeamToolCallSummary.d.ts +1 -0
  819. package/umd/src/book-components/Chat/utils/createCitationFootnoteRenderModel.d.ts +1 -0
  820. package/umd/src/book-components/Chat/utils/exportChatHistory.d.ts +0 -3
  821. package/umd/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +2 -1
  822. package/umd/src/book-components/Chat/utils/loadAgentProfile.d.ts +12 -0
  823. package/umd/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +0 -3
  824. package/umd/src/book-components/Chat/utils/parseImagePrompts.d.ts +1 -3
  825. package/umd/src/book-components/Chat/utils/sanitizeStreamingMessageContent.d.ts +14 -0
  826. package/umd/src/book-components/Chat/utils/thinkingMessageVariants.d.ts +3 -0
  827. package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +0 -3
  828. package/umd/src/book-components/Chat/utils/toolCallParsing/extractSearchResults.d.ts +1 -0
  829. package/umd/src/book-components/Chat/utils/toolCallParsing/getToolCallResultDate.d.ts +1 -0
  830. package/umd/src/book-components/Chat/utils/toolCallParsing/getToolCallTimestamp.d.ts +1 -0
  831. package/umd/src/book-components/Chat/utils/toolCallParsing/parseRunBrowserToolResult.d.ts +1 -0
  832. package/umd/src/book-components/Chat/utils/toolCallParsing/parseTeamToolResult.d.ts +1 -0
  833. package/umd/src/book-components/Chat/utils/toolCallParsing/parseToolCallArguments.d.ts +1 -0
  834. package/umd/src/book-components/Chat/utils/toolCallParsing/parseToolCallResult.d.ts +1 -0
  835. package/umd/src/book-components/Chat/utils/toolCallParsing/resolveRunBrowserArtifactUrl.d.ts +1 -0
  836. package/umd/src/book-components/Chat/utils/walletCredentialToolCall.d.ts +3 -3
  837. package/umd/src/book-components/PromptbookAgent/PromptbookAgentIntegration.d.ts +3 -5
  838. package/umd/src/book-components/PromptbookAgent/PromptbookAgentSeamlessIntegration.d.ts +3 -5
  839. package/umd/src/book-components/Qr/BrandedQrCode.d.ts +5 -0
  840. package/umd/src/book-components/Qr/GenericQrCode.d.ts +5 -0
  841. package/umd/src/book-components/Qr/PromptbookQrCode.d.ts +5 -0
  842. package/umd/src/book-components/Qr/useQrCode.d.ts +4 -1
  843. package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +4 -0
  844. package/umd/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +4 -0
  845. package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +3 -3
  846. package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -3
  847. package/umd/src/book-components/_common/Tooltip/Tooltip.d.ts +3 -0
  848. package/umd/src/book-components/icons/AboutIcon.d.ts +1 -0
  849. package/umd/src/book-components/icons/AttachmentIcon.d.ts +4 -0
  850. package/umd/src/book-components/icons/CameraIcon.d.ts +4 -0
  851. package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -0
  852. package/umd/src/book-components/icons/EmailIcon.d.ts +1 -0
  853. package/umd/src/book-components/icons/MenuIcon.d.ts +1 -3
  854. package/umd/src/book-components/icons/SaveIcon.d.ts +1 -0
  855. package/umd/src/book-components/icons/SendIcon.d.ts +0 -3
  856. package/umd/src/book-components/icons/TeacherIcon.d.ts +1 -0
  857. package/umd/src/cli/$runPromptbookCli.d.ts +0 -1
  858. package/umd/src/cli/cli-commands/_boilerplate.d.ts +0 -2
  859. package/umd/src/cli/cli-commands/about.d.ts +0 -6
  860. package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +18 -0
  861. package/umd/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +0 -2
  862. package/umd/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +0 -2
  863. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +0 -2
  864. package/umd/src/cli/cli-commands/coder/init.d.ts +0 -2
  865. package/umd/src/cli/cli-commands/coder/run.d.ts +1 -3
  866. package/umd/src/cli/cli-commands/coder/run.test.d.ts +1 -0
  867. package/umd/src/cli/cli-commands/coder/verify.d.ts +0 -2
  868. package/umd/src/cli/cli-commands/coder.d.ts +0 -2
  869. package/umd/src/cli/cli-commands/common/handleActionErrors.d.ts +4 -0
  870. package/umd/src/cli/cli-commands/hello.d.ts +0 -5
  871. package/umd/src/cli/cli-commands/list-models.d.ts +0 -2
  872. package/umd/src/cli/cli-commands/list-scrapers.d.ts +0 -2
  873. package/umd/src/cli/cli-commands/login.d.ts +0 -5
  874. package/umd/src/cli/cli-commands/prettify.d.ts +0 -6
  875. package/umd/src/cli/cli-commands/run.d.ts +0 -8
  876. package/umd/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -5
  877. package/umd/src/cli/cli-commands/start-agents-server.d.ts +0 -2
  878. package/umd/src/cli/cli-commands/start-pipelines-server.d.ts +0 -5
  879. package/umd/src/cli/cli-commands/test-command.d.ts +0 -7
  880. package/umd/src/cli/common/$provideLlmToolsForCli.d.ts +5 -0
  881. package/umd/src/cli/main.d.ts +0 -2
  882. package/umd/src/cli/promptbookCli.d.ts +0 -7
  883. package/umd/src/collection/agent-collection/AgentCollection.d.ts +0 -3
  884. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +2 -6
  885. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +3 -0
  886. package/umd/src/collection/pipeline-collection/SimplePipelineCollection.d.ts +2 -1
  887. package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts +2 -5
  888. package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +1 -0
  889. package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts +4 -3
  890. package/umd/src/collection/pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts +2 -3
  891. package/umd/src/collection/pipeline-collection/constructors/createPipelineSubcollection.d.ts +1 -0
  892. package/umd/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +0 -3
  893. package/umd/src/commands/BOOK_VERSION/BookVersionCommand.d.ts +1 -0
  894. package/umd/src/commands/BOOK_VERSION/bookVersionCommandParser.d.ts +1 -0
  895. package/umd/src/commands/EXPECT/ExpectCommand.d.ts +0 -3
  896. package/umd/src/commands/EXPECT/expectCommandParser.d.ts +3 -2
  897. package/umd/src/commands/FOREACH/ForeachCommand.d.ts +1 -0
  898. package/umd/src/commands/FOREACH/foreachCommandParser.d.ts +1 -3
  899. package/umd/src/commands/FORMAT/formatCommandParser.d.ts +1 -0
  900. package/umd/src/commands/FORMFACTOR/FormfactorCommand.d.ts +1 -0
  901. package/umd/src/commands/FORMFACTOR/formfactorCommandParser.d.ts +1 -0
  902. package/umd/src/commands/JOKER/JokerCommand.d.ts +1 -0
  903. package/umd/src/commands/JOKER/jokerCommandParser.d.ts +1 -0
  904. package/umd/src/commands/KNOWLEDGE/KnowledgeCommand.d.ts +1 -0
  905. package/umd/src/commands/KNOWLEDGE/knowledgeCommandParser.d.ts +1 -3
  906. package/umd/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.d.ts +0 -3
  907. package/umd/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.test.d.ts +0 -3
  908. package/umd/src/commands/MODEL/ModelCommand.d.ts +1 -0
  909. package/umd/src/commands/MODEL/modelCommandParser.d.ts +1 -0
  910. package/umd/src/commands/PARAMETER/ParameterCommand.d.ts +1 -0
  911. package/umd/src/commands/PARAMETER/parameterCommandParser.d.ts +1 -0
  912. package/umd/src/commands/PERSONA/PersonaCommand.d.ts +1 -0
  913. package/umd/src/commands/PERSONA/personaCommandParser.d.ts +1 -0
  914. package/umd/src/commands/POSTPROCESS/PostprocessCommand.d.ts +1 -0
  915. package/umd/src/commands/POSTPROCESS/postprocessCommandParser.d.ts +1 -0
  916. package/umd/src/commands/SECTION/SectionCommand.d.ts +1 -0
  917. package/umd/src/commands/SECTION/sectionCommandParser.d.ts +1 -0
  918. package/umd/src/commands/URL/UrlCommand.d.ts +1 -0
  919. package/umd/src/commands/URL/urlCommandParser.d.ts +1 -0
  920. package/umd/src/commands/X_ACTION/ActionCommand.d.ts +1 -0
  921. package/umd/src/commands/X_ACTION/actionCommandParser.d.ts +1 -3
  922. package/umd/src/commands/X_INSTRUMENT/InstrumentCommand.d.ts +1 -0
  923. package/umd/src/commands/X_INSTRUMENT/instrumentCommandParser.d.ts +1 -3
  924. package/umd/src/commands/_BOILERPLATE/BoilerplateCommand.d.ts +1 -0
  925. package/umd/src/commands/_BOILERPLATE/boilerplateCommandParser.d.ts +1 -0
  926. package/umd/src/commands/_common/stringifyCommand.d.ts +1 -1
  927. package/umd/src/commands/_common/types/CommandParser.d.ts +0 -4
  928. package/umd/src/commands/index.d.ts +0 -3
  929. package/umd/src/commitments/ACTION/ACTION.d.ts +0 -3
  930. package/umd/src/commitments/CLOSED/CLOSED.d.ts +0 -3
  931. package/umd/src/commitments/CLOSED/CLOSED.test.d.ts +0 -3
  932. package/umd/src/commitments/COMPONENT/COMPONENT.d.ts +0 -3
  933. package/umd/src/commitments/DELETE/DELETE.d.ts +0 -3
  934. package/umd/src/commitments/DICTIONARY/DICTIONARY.d.ts +0 -3
  935. package/umd/src/commitments/FORMAT/FORMAT.d.ts +0 -3
  936. package/umd/src/commitments/FROM/FROM.d.ts +0 -3
  937. package/umd/src/commitments/GOAL/GOAL.d.ts +0 -3
  938. package/umd/src/commitments/IMPORT/IMPORT.d.ts +0 -3
  939. package/umd/src/commitments/LANGUAGE/LANGUAGE.d.ts +0 -3
  940. package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -3
  941. package/umd/src/commitments/MESSAGE/MESSAGE.d.ts +0 -3
  942. package/umd/src/commitments/MESSAGE_SUFFIX/MESSAGE_SUFFIX.d.ts +0 -3
  943. package/umd/src/commitments/META/META.d.ts +0 -3
  944. package/umd/src/commitments/META/META_DESCRIPTION.d.ts +0 -3
  945. package/umd/src/commitments/META_COLOR/META_COLOR.d.ts +0 -3
  946. package/umd/src/commitments/META_DISCLAIMER/META_DISCLAIMER.d.ts +0 -3
  947. package/umd/src/commitments/META_DOMAIN/META_DOMAIN.d.ts +0 -3
  948. package/umd/src/commitments/META_FONT/META_FONT.d.ts +0 -3
  949. package/umd/src/commitments/META_IMAGE/META_IMAGE.d.ts +0 -3
  950. package/umd/src/commitments/META_INPUT_PLACEHOLDER/META_INPUT_PLACEHOLDER.d.ts +0 -3
  951. package/umd/src/commitments/META_LINK/META_LINK.d.ts +0 -3
  952. package/umd/src/commitments/META_VOICE/META_VOICE.d.ts +0 -3
  953. package/umd/src/commitments/MODEL/MODEL.d.ts +0 -3
  954. package/umd/src/commitments/OPEN/OPEN.d.ts +0 -3
  955. package/umd/src/commitments/PERSONA/PERSONA.d.ts +0 -3
  956. package/umd/src/commitments/RULE/RULE.d.ts +0 -3
  957. package/umd/src/commitments/SAMPLE/SAMPLE.d.ts +0 -3
  958. package/umd/src/commitments/SCENARIO/SCENARIO.d.ts +0 -3
  959. package/umd/src/commitments/TEAM/TEAM.d.ts +0 -3
  960. package/umd/src/commitments/TEMPLATE/TEMPLATE.d.ts +0 -3
  961. package/umd/src/commitments/USE/USE.d.ts +0 -3
  962. package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +2 -0
  963. package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -3
  964. package/umd/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +4 -5
  965. package/umd/src/commitments/USE_CALENDAR/USE_CALENDAR.d.ts +0 -3
  966. package/umd/src/commitments/USE_CALENDAR/calendarReference.d.ts +0 -3
  967. package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -3
  968. package/umd/src/commitments/USE_IMAGE_GENERATOR/USE_IMAGE_GENERATOR.d.ts +0 -3
  969. package/umd/src/commitments/USE_MCP/USE_MCP.d.ts +0 -3
  970. package/umd/src/commitments/USE_POPUP/USE_POPUP.d.ts +0 -3
  971. package/umd/src/commitments/USE_PRIVACY/USE_PRIVACY.d.ts +0 -3
  972. package/umd/src/commitments/USE_PROJECT/USE_PROJECT.d.ts +0 -3
  973. package/umd/src/commitments/USE_PROJECT/projectReference.d.ts +0 -3
  974. package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -3
  975. package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -3
  976. package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -3
  977. package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -3
  978. package/umd/src/commitments/USE_USER_LOCATION/USE_USER_LOCATION.d.ts +0 -3
  979. package/umd/src/commitments/WALLET/WALLET.d.ts +0 -3
  980. package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +0 -3
  981. package/umd/src/commitments/WRITING_SAMPLE/WRITING_SAMPLE.d.ts +0 -3
  982. package/umd/src/commitments/_base/createEmptyAgentModelRequirements.d.ts +0 -3
  983. package/umd/src/commitments/_common/commitmentToolFunctions.d.ts +2 -3
  984. package/umd/src/commitments/_common/createWritingCommitmentSections.d.ts +2 -3
  985. package/umd/src/commitments/_common/getAllCommitmentDefinitions.d.ts +1 -0
  986. package/umd/src/commitments/_common/getAllCommitmentTypes.d.ts +1 -0
  987. package/umd/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.d.ts +0 -4
  988. package/umd/src/commitments/_common/getCommitmentDefinition.d.ts +1 -0
  989. package/umd/src/commitments/_common/isCommitmentSupported.d.ts +1 -0
  990. package/umd/src/commitments/_common/toolExecutionEnvelope.d.ts +0 -3
  991. package/umd/src/commitments/_common/toolRuntimeContext.d.ts +3 -3
  992. package/umd/src/commitments/index.d.ts +0 -4
  993. package/umd/src/config.test.d.ts +0 -3
  994. package/umd/src/constants/streaming.d.ts +0 -3
  995. package/umd/src/constants.d.ts +0 -3
  996. package/umd/src/conversion/archive/loadArchive.d.ts +0 -1
  997. package/umd/src/conversion/archive/saveArchive.d.ts +0 -5
  998. package/umd/src/conversion/compilePipeline.d.ts +2 -7
  999. package/umd/src/conversion/compilePipelineOnRemoteServer.d.ts +2 -5
  1000. package/umd/src/conversion/parsePipeline.d.ts +1 -11
  1001. package/umd/src/conversion/pipelineJsonToString.d.ts +1 -7
  1002. package/umd/src/conversion/prettify/prettifyPipelineString.d.ts +0 -4
  1003. package/umd/src/conversion/prettify/renderPipelineMermaidOptions.d.ts +0 -7
  1004. package/umd/src/conversion/utils/extractParameterNamesFromTask.d.ts +1 -3
  1005. package/umd/src/conversion/validation/_importPipeline.d.ts +6 -2
  1006. package/umd/src/conversion/validation/pipelineStringToJson-parseErrors.test.d.ts +0 -3
  1007. package/umd/src/conversion/validation/validatePipeline-logicErrors.test.d.ts +0 -3
  1008. package/umd/src/conversion/validation/validatePipeline.d.ts +3 -9
  1009. package/umd/src/conversion/validation/validatePipeline.test.d.ts +0 -3
  1010. package/umd/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -2
  1011. package/umd/src/errors/0-BoilerplateError.d.ts +0 -3
  1012. package/umd/src/errors/0-index.d.ts +0 -3
  1013. package/umd/src/errors/DatabaseError.d.ts +0 -3
  1014. package/umd/src/errors/ExpectError.d.ts +2 -1
  1015. package/umd/src/errors/ParseError.d.ts +0 -3
  1016. package/umd/src/errors/PipelineExecutionError.d.ts +0 -3
  1017. package/umd/src/executables/$provideExecutablesForNode.d.ts +0 -5
  1018. package/umd/src/executables/apps/locateLibreoffice.d.ts +0 -2
  1019. package/umd/src/executables/apps/locatePandoc.d.ts +0 -2
  1020. package/umd/src/executables/browsers/locateBrowser.d.ts +0 -1
  1021. package/umd/src/executables/browsers/locateDefaultSystemBrowser.d.ts +0 -1
  1022. package/umd/src/executables/locateApp.d.ts +0 -2
  1023. package/umd/src/executables/platforms/locateAppOnLinux.d.ts +0 -2
  1024. package/umd/src/executables/platforms/locateAppOnMacOs.d.ts +0 -2
  1025. package/umd/src/executables/platforms/locateAppOnWindows.d.ts +0 -2
  1026. package/umd/src/execution/AbstractTaskResult.d.ts +0 -4
  1027. package/umd/src/execution/AvailableModel.d.ts +0 -4
  1028. package/umd/src/execution/CommonToolsOptions.d.ts +0 -5
  1029. package/umd/src/execution/ExecutionTask.d.ts +4 -4
  1030. package/umd/src/execution/FilesystemTools.d.ts +0 -3
  1031. package/umd/src/execution/LlmExecutionTools.d.ts +3 -9
  1032. package/umd/src/execution/LlmExecutionToolsConstructor.d.ts +0 -3
  1033. package/umd/src/execution/PipelineExecutor.d.ts +0 -3
  1034. package/umd/src/execution/PipelineExecutorResult.d.ts +0 -3
  1035. package/umd/src/execution/PromptResult.d.ts +1 -9
  1036. package/umd/src/execution/PromptbookFetch.test-type.d.ts +0 -4
  1037. package/umd/src/execution/ScriptExecutionTools.d.ts +0 -4
  1038. package/umd/src/execution/Usage.d.ts +0 -3
  1039. package/umd/src/execution/UserInterfaceTools.d.ts +3 -0
  1040. package/umd/src/execution/assertsTaskSuccessful.d.ts +1 -3
  1041. package/umd/src/execution/createPipelineExecutor/00-createPipelineExecutor.d.ts +1 -0
  1042. package/umd/src/execution/createPipelineExecutor/20-executeTask.d.ts +0 -3
  1043. package/umd/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +1 -3
  1044. package/umd/src/execution/createPipelineExecutor/getContextForTask.d.ts +1 -0
  1045. package/umd/src/execution/createPipelineExecutor/getKnowledgeForTask.d.ts +0 -4
  1046. package/umd/src/execution/createPipelineExecutor/knowledgePiecesToString.d.ts +0 -1
  1047. package/umd/src/execution/execution-report/ExecutionReportJson.d.ts +1 -0
  1048. package/umd/src/execution/execution-report/ExecutionReportString.d.ts +0 -3
  1049. package/umd/src/execution/execution-report/executionReportJsonToString.d.ts +0 -5
  1050. package/umd/src/execution/translation/automatic-translate/automatic-translators/AutomaticTranslator.d.ts +3 -1
  1051. package/umd/src/execution/translation/automatic-translate/automatic-translators/FakeAutomaticTranslator.d.ts +3 -1
  1052. package/umd/src/execution/translation/automatic-translate/automatic-translators/TranslatorOptions.d.ts +3 -1
  1053. package/umd/src/execution/translation/automatic-translate/automatic-translators/utils/extractMultiplicatedOccurrence.d.ts +2 -0
  1054. package/umd/src/execution/translation/automatic-translate/translateMessages.d.ts +3 -3
  1055. package/umd/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -4
  1056. package/umd/src/execution/utils/checkExpectations.d.ts +2 -5
  1057. package/umd/src/execution/utils/forEachAsync.d.ts +5 -1
  1058. package/umd/src/execution/utils/usage-constants.d.ts +0 -3
  1059. package/umd/src/execution/utils/usageToHuman.d.ts +0 -8
  1060. package/umd/src/execution/utils/validatePromptResult.d.ts +1 -0
  1061. package/umd/src/file-security-checkers/virustotal/VirusTotalFileSecurityChecker.d.ts +1 -0
  1062. package/umd/src/formats/_common/FormatParser.d.ts +2 -9
  1063. package/umd/src/formats/_common/FormatSubvalueParser.d.ts +0 -3
  1064. package/umd/src/formats/csv/CsvFormatParser.d.ts +2 -8
  1065. package/umd/src/formats/index.d.ts +0 -3
  1066. package/umd/src/formats/json/JsonFormatParser.d.ts +0 -11
  1067. package/umd/src/formats/text/TextFormatParser.d.ts +0 -9
  1068. package/umd/src/formats/xml/XmlFormatParser.d.ts +0 -11
  1069. package/umd/src/formfactors/_common/AbstractFormfactorDefinition.d.ts +1 -3
  1070. package/umd/src/formfactors/_common/FormfactorDefinition.d.ts +1 -0
  1071. package/umd/src/formfactors/index.d.ts +0 -3
  1072. package/umd/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +0 -5
  1073. package/umd/src/high-level-abstractions/index.d.ts +0 -4
  1074. package/umd/src/high-level-abstractions/quick-chatbot/QuickChatbotHla.d.ts +0 -3
  1075. package/umd/src/llm-providers/_common/register/$llmToolsMetadataRegister.d.ts +2 -3
  1076. package/umd/src/llm-providers/_common/register/$llmToolsRegister.d.ts +2 -3
  1077. package/umd/src/llm-providers/_common/register/$provideEnvFilename.d.ts +0 -1
  1078. package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  1079. package/umd/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.d.ts +3 -6
  1080. package/umd/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +3 -7
  1081. package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -16
  1082. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +0 -4
  1083. package/umd/src/llm-providers/_common/register/LlmToolsConfiguration.d.ts +0 -5
  1084. package/umd/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +0 -6
  1085. package/umd/src/llm-providers/_common/register/LlmToolsOptions.d.ts +0 -4
  1086. package/umd/src/llm-providers/_common/register/createLlmToolsFromConfiguration.d.ts +1 -0
  1087. package/umd/src/llm-providers/_common/utils/assertUniqueModels.d.ts +0 -3
  1088. package/umd/src/llm-providers/_common/utils/cache/CacheItem.d.ts +0 -3
  1089. package/umd/src/llm-providers/_common/utils/cache/cacheLlmTools.d.ts +1 -0
  1090. package/umd/src/llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage.d.ts +0 -4
  1091. package/umd/src/llm-providers/_common/utils/count-total-usage/countUsage.d.ts +1 -0
  1092. package/umd/src/llm-providers/_common/utils/count-total-usage/limitTotalUsage.d.ts +0 -7
  1093. package/umd/src/llm-providers/_common/utils/removeUnsupportedModelRequirements.d.ts +4 -0
  1094. package/umd/src/llm-providers/_multiple/MultipleLlmExecutionTools.d.ts +1 -0
  1095. package/umd/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +0 -4
  1096. package/umd/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +3 -7
  1097. package/umd/src/llm-providers/_multiple/playground/playground.d.ts +0 -1
  1098. package/umd/src/llm-providers/agent/Agent.d.ts +0 -3
  1099. package/umd/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +0 -4
  1100. package/umd/src/llm-providers/agent/RemoteAgent.d.ts +0 -4
  1101. package/umd/src/llm-providers/agent/playground/playground.d.ts +0 -6
  1102. package/umd/src/llm-providers/agent/register-configuration.d.ts +0 -5
  1103. package/umd/src/llm-providers/agent/register-constructor.d.ts +0 -4
  1104. package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +2 -10
  1105. package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions.d.ts +3 -3
  1106. package/umd/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -8
  1107. package/umd/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.d.ts +1 -3
  1108. package/umd/src/llm-providers/anthropic-claude/computeAnthropicClaudeUsage.test.d.ts +0 -3
  1109. package/umd/src/llm-providers/anthropic-claude/createAnthropicClaudeExecutionTools.d.ts +0 -7
  1110. package/umd/src/llm-providers/anthropic-claude/playground/playground.d.ts +0 -5
  1111. package/umd/src/llm-providers/anthropic-claude/register-configuration.d.ts +0 -3
  1112. package/umd/src/llm-providers/anthropic-claude/register-constructor.d.ts +0 -5
  1113. package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +0 -6
  1114. package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionToolsOptions.d.ts +1 -0
  1115. package/umd/src/llm-providers/azure-openai/createAzureOpenAiExecutionTools.d.ts +0 -4
  1116. package/umd/src/llm-providers/azure-openai/playground/playground.d.ts +0 -2
  1117. package/umd/src/llm-providers/azure-openai/register-configuration.d.ts +0 -3
  1118. package/umd/src/llm-providers/azure-openai/register-constructor.d.ts +0 -4
  1119. package/umd/src/llm-providers/deepseek/DeepseekExecutionToolsOptions.d.ts +1 -0
  1120. package/umd/src/llm-providers/deepseek/createDeepseekExecutionTools.d.ts +0 -3
  1121. package/umd/src/llm-providers/deepseek/deepseek-models.d.ts +1 -6
  1122. package/umd/src/llm-providers/deepseek/register-configuration.d.ts +0 -3
  1123. package/umd/src/llm-providers/deepseek/register-constructor.d.ts +0 -4
  1124. package/umd/src/llm-providers/google/GoogleExecutionToolsOptions.d.ts +1 -0
  1125. package/umd/src/llm-providers/google/createGoogleExecutionTools.d.ts +0 -4
  1126. package/umd/src/llm-providers/google/google-models.d.ts +1 -6
  1127. package/umd/src/llm-providers/google/register-configuration.d.ts +0 -3
  1128. package/umd/src/llm-providers/google/register-constructor.d.ts +0 -4
  1129. package/umd/src/llm-providers/mocked/$fakeTextToExpectations.d.ts +1 -5
  1130. package/umd/src/llm-providers/mocked/MockedEchoLlmExecutionTools.d.ts +0 -4
  1131. package/umd/src/llm-providers/mocked/MockedFackedLlmExecutionTools.d.ts +0 -3
  1132. package/umd/src/llm-providers/mocked/test/joker.test.d.ts +0 -3
  1133. package/umd/src/llm-providers/mocked/test/mocked-chat.test.d.ts +0 -4
  1134. package/umd/src/llm-providers/mocked/test/mocked-completion.test.d.ts +0 -3
  1135. package/umd/src/llm-providers/ollama/OllamaExecutionTools.d.ts +0 -3
  1136. package/umd/src/llm-providers/ollama/OllamaExecutionToolsOptions.d.ts +1 -0
  1137. package/umd/src/llm-providers/ollama/ollama-models.d.ts +1 -4
  1138. package/umd/src/llm-providers/ollama/playground/playground.d.ts +0 -2
  1139. package/umd/src/llm-providers/ollama/register-configuration.d.ts +0 -3
  1140. package/umd/src/llm-providers/ollama/register-constructor.d.ts +0 -4
  1141. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +10 -0
  1142. package/umd/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +1 -8
  1143. package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionTools.d.ts +0 -7
  1144. package/umd/src/llm-providers/openai/OpenAiCompatibleExecutionToolsOptions.d.ts +2 -0
  1145. package/umd/src/llm-providers/openai/computeOpenAiUsage.d.ts +1 -3
  1146. package/umd/src/llm-providers/openai/computeOpenAiUsage.test.d.ts +0 -3
  1147. package/umd/src/llm-providers/openai/createOpenAiAssistantExecutionTools.d.ts +0 -4
  1148. package/umd/src/llm-providers/openai/createOpenAiCompatibleExecutionTools.d.ts +0 -4
  1149. package/umd/src/llm-providers/openai/createOpenAiExecutionTools.d.ts +0 -4
  1150. package/umd/src/llm-providers/openai/openai-models.d.ts +1 -0
  1151. package/umd/src/llm-providers/openai/openai-models.test.d.ts +0 -3
  1152. package/umd/src/llm-providers/openai/playground/playground.d.ts +0 -2
  1153. package/umd/src/llm-providers/openai/register-configuration.d.ts +0 -3
  1154. package/umd/src/llm-providers/openai/register-constructor.d.ts +0 -4
  1155. package/umd/src/llm-providers/remote/RemoteLlmExecutionTools.d.ts +1 -9
  1156. package/umd/src/llm-providers/remote/playground/playground.d.ts +0 -1
  1157. package/umd/src/llm-providers/vercel/playground/playground.d.ts +0 -2
  1158. package/umd/src/other/templates/getBookTemplates.d.ts +2 -5
  1159. package/umd/src/personas/preparePersona.d.ts +1 -7
  1160. package/umd/src/pipeline/PipelineInterface/PipelineInterface.d.ts +1 -0
  1161. package/umd/src/pipeline/PipelineInterface/constants.d.ts +0 -3
  1162. package/umd/src/pipeline/PipelineJson/CommonTaskJson.d.ts +0 -4
  1163. package/umd/src/pipeline/PipelineJson/DialogTaskJson.d.ts +1 -3
  1164. package/umd/src/pipeline/PipelineJson/Expectations.d.ts +4 -3
  1165. package/umd/src/pipeline/PipelineJson/KnowledgePieceJson.d.ts +0 -4
  1166. package/umd/src/pipeline/PipelineJson/KnowledgeSourceJson.d.ts +0 -3
  1167. package/umd/src/pipeline/PipelineJson/PersonaJson.d.ts +0 -3
  1168. package/umd/src/pipeline/PipelineJson/PreparationJson.d.ts +3 -5
  1169. package/umd/src/pipeline/PipelineJson/ScriptTaskJson.d.ts +1 -4
  1170. package/umd/src/pipeline/PipelineJson/SimpleTaskJson.d.ts +1 -3
  1171. package/umd/src/pipeline/book-notation.d.ts +1 -4
  1172. package/umd/src/pipeline/isValidPipelineString.d.ts +1 -3
  1173. package/umd/src/pipeline/isValidPipelineString.test.d.ts +0 -3
  1174. package/umd/src/pipeline/prompt-notation/helpers/ParameterEscaping.d.ts +5 -0
  1175. package/umd/src/pipeline/prompt-notation/helpers/ParameterNaming.d.ts +1 -0
  1176. package/umd/src/pipeline/prompt-notation/helpers/ParameterSection.d.ts +2 -0
  1177. package/umd/src/pipeline/prompt-notation.d.ts +2 -5
  1178. package/umd/src/pipeline/prompt-notation.test.d.ts +0 -3
  1179. package/umd/src/pipeline/validatePipelineString.d.ts +1 -3
  1180. package/umd/src/playground/permanent/_boilerplate.d.ts +0 -1
  1181. package/umd/src/playground/permanent/agent-with-browser-playground.d.ts +0 -1
  1182. package/umd/src/playground/permanent/error-handling-playground.d.ts +0 -1
  1183. package/umd/src/playground/playground.d.ts +0 -2
  1184. package/umd/src/postprocessing/utils/extractBlock.d.ts +2 -1
  1185. package/umd/src/postprocessing/utils/extractJsonBlock.d.ts +2 -5
  1186. package/umd/src/prepare/PrepareAndScrapeOptions.d.ts +0 -4
  1187. package/umd/src/prepare/preparePipeline.d.ts +3 -2
  1188. package/umd/src/prepare/preparePipelineOnRemoteServer.d.ts +2 -5
  1189. package/umd/src/prepare/prepareTasks.d.ts +6 -10
  1190. package/umd/src/prepare/unpreparePipeline.d.ts +1 -5
  1191. package/umd/src/remote-server/RemoteServer.d.ts +3 -0
  1192. package/umd/src/remote-server/openapi.d.ts +3 -4
  1193. package/umd/src/remote-server/socket-types/_subtypes/Identification.d.ts +1 -5
  1194. package/umd/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Request.d.ts +0 -3
  1195. package/umd/src/remote-server/socket-types/listModels/PromptbookServer_ListModels_Response.d.ts +0 -3
  1196. package/umd/src/remote-server/startAgentServer.d.ts +6 -2
  1197. package/umd/src/remote-server/startRemoteServer.d.ts +1 -15
  1198. package/umd/src/remote-server/types/RemoteClientOptions.d.ts +0 -5
  1199. package/umd/src/remote-server/types/RemoteServerOptions.d.ts +10 -4
  1200. package/umd/src/remote-server/ui/ServerApp.d.ts +1 -0
  1201. package/umd/src/remote-server/ui/types.d.ts +3 -0
  1202. package/umd/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +1 -4
  1203. package/umd/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +0 -3
  1204. package/umd/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +0 -1
  1205. package/umd/src/scrapers/_boilerplate/register-constructor.d.ts +0 -4
  1206. package/umd/src/scrapers/_boilerplate/register-metadata.d.ts +0 -3
  1207. package/umd/src/scrapers/_common/Scraper.d.ts +0 -5
  1208. package/umd/src/scrapers/_common/ScraperIntermediateSource.d.ts +0 -3
  1209. package/umd/src/scrapers/_common/prepareKnowledgePieces.d.ts +1 -0
  1210. package/umd/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +0 -2
  1211. package/umd/src/scrapers/_common/register/$provideScrapersForNode.d.ts +1 -2
  1212. package/umd/src/scrapers/_common/register/$provideScriptingForNode.d.ts +0 -2
  1213. package/umd/src/scrapers/_common/register/$registeredScrapersMessage.d.ts +0 -3
  1214. package/umd/src/scrapers/_common/register/$scrapersMetadataRegister.d.ts +2 -3
  1215. package/umd/src/scrapers/_common/register/$scrapersRegister.d.ts +2 -3
  1216. package/umd/src/scrapers/_common/register/ScraperConstructor.d.ts +0 -3
  1217. package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +0 -7
  1218. package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.test.d.ts +0 -3
  1219. package/umd/src/scrapers/_common/utils/promptbookFetch.d.ts +0 -3
  1220. package/umd/src/scrapers/document/DocumentScraper.d.ts +1 -6
  1221. package/umd/src/scrapers/document/DocumentScraper.test.d.ts +0 -3
  1222. package/umd/src/scrapers/document/createDocumentScraper.d.ts +0 -3
  1223. package/umd/src/scrapers/document/playground/document-scraper-playground.d.ts +0 -1
  1224. package/umd/src/scrapers/document/register-constructor.d.ts +0 -4
  1225. package/umd/src/scrapers/document/register-metadata.d.ts +0 -3
  1226. package/umd/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -6
  1227. package/umd/src/scrapers/document-legacy/LegacyDocumentScraper.test.d.ts +0 -3
  1228. package/umd/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +0 -3
  1229. package/umd/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +0 -1
  1230. package/umd/src/scrapers/document-legacy/register-constructor.d.ts +0 -4
  1231. package/umd/src/scrapers/document-legacy/register-metadata.d.ts +0 -3
  1232. package/umd/src/scrapers/markdown/MarkdownScraper.d.ts +1 -4
  1233. package/umd/src/scrapers/markdown/MarkdownScraper.test.d.ts +0 -3
  1234. package/umd/src/scrapers/markdown/createMarkdownScraper.d.ts +0 -3
  1235. package/umd/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +0 -1
  1236. package/umd/src/scrapers/markdown/register-constructor.d.ts +0 -4
  1237. package/umd/src/scrapers/markdown/register-metadata.d.ts +0 -3
  1238. package/umd/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -7
  1239. package/umd/src/scrapers/markitdown/createMarkitdownScraper.d.ts +0 -4
  1240. package/umd/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +0 -1
  1241. package/umd/src/scrapers/markitdown/register-constructor.d.ts +0 -5
  1242. package/umd/src/scrapers/markitdown/register-metadata.d.ts +0 -3
  1243. package/umd/src/scrapers/pdf/PdfScraper.d.ts +1 -6
  1244. package/umd/src/scrapers/pdf/createPdfScraper.d.ts +0 -3
  1245. package/umd/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +0 -1
  1246. package/umd/src/scrapers/pdf/register-constructor.d.ts +0 -4
  1247. package/umd/src/scrapers/pdf/register-metadata.d.ts +0 -3
  1248. package/umd/src/scrapers/website/WebsiteScraper.d.ts +1 -6
  1249. package/umd/src/scrapers/website/createWebsiteScraper.d.ts +0 -3
  1250. package/umd/src/scrapers/website/playground/website-scraper-playground.d.ts +0 -1
  1251. package/umd/src/scrapers/website/register-constructor.d.ts +0 -4
  1252. package/umd/src/scrapers/website/register-metadata.d.ts +0 -3
  1253. package/umd/src/scripting/javascript/JavascriptEvalExecutionTools.d.ts +1 -5
  1254. package/umd/src/scripting/javascript/JavascriptEvalExecutionTools.test.d.ts +0 -3
  1255. package/umd/src/scripting/javascript/JavascriptExecutionTools.d.ts +1 -0
  1256. package/umd/src/scripting/javascript/JavascriptExecutionToolsOptions.d.ts +0 -3
  1257. package/umd/src/scripting/javascript/postprocessing-functions.d.ts +0 -4
  1258. package/umd/src/scripting/javascript/utils/extractVariablesFromJavascript.d.ts +1 -3
  1259. package/umd/src/search-engines/SearchEngine.d.ts +3 -0
  1260. package/umd/src/speech-recognition/BrowserSpeechRecognition.d.ts +0 -2
  1261. package/umd/src/speech-recognition/OpenAiSpeechRecognition.d.ts +2 -2
  1262. package/umd/src/storage/_common/PromptbookStorage.d.ts +0 -4
  1263. package/umd/src/storage/_common/PromptbookStorage.test-type.d.ts +0 -4
  1264. package/umd/src/storage/env-storage/$EnvStorage.d.ts +0 -3
  1265. package/umd/src/storage/file-cache-storage/FileCacheStorage.d.ts +0 -2
  1266. package/umd/src/storage/local-storage/getIndexedDbStorage.d.ts +0 -1
  1267. package/umd/src/storage/local-storage/getLocalStorage.d.ts +0 -1
  1268. package/umd/src/storage/local-storage/getSessionStorage.d.ts +0 -1
  1269. package/umd/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.d.ts +1 -0
  1270. package/umd/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.d.ts +0 -4
  1271. package/umd/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +1 -3
  1272. package/umd/src/transpilers/formatted-book-in-markdown/register.d.ts +2 -5
  1273. package/umd/src/transpilers/openai-sdk/playground/playground.d.ts +0 -1
  1274. package/umd/src/transpilers/openai-sdk/register.d.ts +2 -5
  1275. package/umd/src/types/Arrayable.d.ts +1 -0
  1276. package/umd/src/types/InputParameters_private.d.ts +4 -2
  1277. package/umd/src/types/IntermediateFilesStrategy.d.ts +0 -3
  1278. package/umd/src/types/LlmCall.d.ts +0 -3
  1279. package/umd/src/types/ModelRequirements.d.ts +1 -0
  1280. package/umd/src/types/ModelVariant.d.ts +3 -0
  1281. package/umd/src/types/Parameters.d.ts +31 -0
  1282. package/umd/src/types/Parameters_private.d.ts +4 -2
  1283. package/umd/src/types/Prompt.d.ts +1 -6
  1284. package/umd/src/types/ReservedParameters_private.d.ts +2 -1
  1285. package/umd/src/types/ToolCall.d.ts +0 -2
  1286. package/umd/src/types/Updatable.d.ts +1 -3
  1287. package/umd/src/types/string_agent_hash_private.d.ts +1 -1
  1288. package/umd/src/types/string_agent_name.d.ts +32 -0
  1289. package/umd/src/types/string_agent_name_in_book_private.d.ts +1 -1
  1290. package/umd/src/types/string_agent_name_private.d.ts +2 -1
  1291. package/umd/src/types/string_agent_permanent_id_private.d.ts +2 -1
  1292. package/umd/src/types/string_business_category_name.d.ts +5 -0
  1293. package/umd/src/types/string_business_category_name_private.d.ts +1 -1
  1294. package/umd/src/types/string_char_private.d.ts +1 -1
  1295. package/umd/src/types/string_chat_prompt_private.d.ts +1 -1
  1296. package/umd/src/types/string_completion_prompt_private.d.ts +1 -1
  1297. package/umd/src/types/string_markdown.d.ts +0 -1
  1298. package/umd/src/types/string_mime_type_private.d.ts +1 -0
  1299. package/umd/src/types/string_model_description_private.d.ts +1 -1
  1300. package/umd/src/types/string_model_name.d.ts +7 -0
  1301. package/umd/src/types/string_model_name_private.d.ts +1 -1
  1302. package/umd/src/types/string_name.d.ts +31 -0
  1303. package/umd/src/types/string_name_private.d.ts +1 -1
  1304. package/umd/src/types/string_page.d.ts +15 -0
  1305. package/umd/src/types/string_page_private.d.ts +1 -1
  1306. package/umd/src/types/string_parameter_name.d.ts +11 -210
  1307. package/umd/src/types/string_parameter_value_private.d.ts +1 -1
  1308. package/umd/src/types/string_persona_description.d.ts +14 -0
  1309. package/umd/src/types/string_persona_description_private.d.ts +1 -1
  1310. package/umd/src/types/string_prompt.d.ts +49 -0
  1311. package/umd/src/types/string_prompt_image_private.d.ts +1 -1
  1312. package/umd/src/types/string_prompt_private.d.ts +1 -1
  1313. package/umd/src/types/string_reserved_parameter_name_private.d.ts +1 -1
  1314. package/umd/src/types/string_sha256.d.ts +2 -2
  1315. package/umd/src/types/string_system_message_private.d.ts +1 -1
  1316. package/umd/src/types/string_template_private.d.ts +1 -1
  1317. package/umd/src/types/string_text_prompt_private.d.ts +1 -1
  1318. package/umd/src/types/string_title.d.ts +8 -0
  1319. package/umd/src/types/string_title_private.d.ts +1 -1
  1320. package/umd/src/types/typeAliasEmoji.d.ts +0 -3
  1321. package/umd/src/types/typeAliases.d.ts +0 -6
  1322. package/umd/src/utils/DEFAULT_THINKING_MESSAGES.d.ts +5 -1
  1323. package/umd/src/utils/chat/chatAttachments/appendChatAttachmentContext.d.ts +1 -0
  1324. package/umd/src/utils/chat/chatAttachments/appendChatAttachmentContextWithContent.d.ts +1 -0
  1325. package/umd/src/utils/chat/chatAttachments/formatChatAttachmentContentContext.d.ts +1 -0
  1326. package/umd/src/utils/chat/chatAttachments/formatChatAttachmentContext.d.ts +1 -0
  1327. package/umd/src/utils/chat/chatAttachments/normalizeChatAttachments.d.ts +1 -0
  1328. package/umd/src/utils/chat/chatAttachments/resolveChatAttachmentContent.d.ts +1 -0
  1329. package/umd/src/utils/chat/chatAttachments/resolveChatAttachmentContents.d.ts +1 -0
  1330. package/umd/src/utils/chat/chatAttachments.d.ts +0 -3
  1331. package/umd/src/utils/chat/constants.d.ts +0 -3
  1332. package/umd/src/utils/clientVersion.d.ts +0 -3
  1333. package/umd/src/utils/color/$randomColor.d.ts +0 -5
  1334. package/umd/src/utils/color/css-colors.d.ts +0 -3
  1335. package/umd/src/utils/color/internal-utils/hslToRgb.d.ts +0 -3
  1336. package/umd/src/utils/color/internal-utils/rgbToHsl.d.ts +0 -3
  1337. package/umd/src/utils/color/operators/ColorTransformer.d.ts +2 -0
  1338. package/umd/src/utils/color/operators/lighten.d.ts +0 -3
  1339. package/umd/src/utils/color/operators/saturate.d.ts +0 -3
  1340. package/umd/src/utils/color/utils/areColorsEqual.d.ts +0 -3
  1341. package/umd/src/utils/color/utils/colorDistance.d.ts +2 -2
  1342. package/umd/src/utils/color/utils/colorHue.d.ts +0 -1
  1343. package/umd/src/utils/color/utils/colorHueDistance.d.ts +0 -1
  1344. package/umd/src/utils/color/utils/colorToDataUrl.d.ts +0 -3
  1345. package/umd/src/utils/database/uniqueConstraint.d.ts +1 -3
  1346. package/umd/src/utils/editable/edit-pipeline-string/addPipelineCommand.d.ts +3 -4
  1347. package/umd/src/utils/editable/edit-pipeline-string/deflatePipeline.d.ts +0 -3
  1348. package/umd/src/utils/editable/types/PipelineEditableSerialized.d.ts +2 -2
  1349. package/umd/src/utils/editable/utils/renamePipelineParameter.d.ts +4 -3
  1350. package/umd/src/utils/editable/utils/stringifyPipelineJson.d.ts +0 -6
  1351. package/umd/src/utils/environment/$detectRuntimeEnvironment.d.ts +0 -3
  1352. package/umd/src/utils/environment/$getGlobalScope.d.ts +1 -1
  1353. package/umd/src/utils/environment/$isRunningInBrowser.d.ts +0 -3
  1354. package/umd/src/utils/environment/$isRunningInJest.d.ts +0 -3
  1355. package/umd/src/utils/environment/$isRunningInNode.d.ts +0 -3
  1356. package/umd/src/utils/environment/$isRunningInWebWorker.d.ts +0 -3
  1357. package/umd/src/utils/execCommand/$execCommand.d.ts +0 -2
  1358. package/umd/src/utils/execCommand/$execCommands.d.ts +0 -1
  1359. package/umd/src/utils/execCommand/ExecCommandOptions.d.ts +3 -4
  1360. package/umd/src/utils/expectation-counters/constants.d.ts +0 -4
  1361. package/umd/src/utils/expectation-counters/countCharacters.d.ts +0 -4
  1362. package/umd/src/utils/expectation-counters/countLines.d.ts +0 -4
  1363. package/umd/src/utils/expectation-counters/countPages.d.ts +0 -4
  1364. package/umd/src/utils/expectation-counters/countParagraphs.d.ts +0 -4
  1365. package/umd/src/utils/expectation-counters/countSentences.d.ts +0 -4
  1366. package/umd/src/utils/expectation-counters/countWords.d.ts +0 -5
  1367. package/umd/src/utils/expectation-counters/index.d.ts +0 -4
  1368. package/umd/src/utils/files/$induceBookDownload.d.ts +0 -1
  1369. package/umd/src/utils/files/$induceFileDownload.d.ts +0 -1
  1370. package/umd/src/utils/files/ObjectUrl.d.ts +0 -1
  1371. package/umd/src/utils/files/isDirectoryExisting.d.ts +0 -6
  1372. package/umd/src/utils/files/isExecutable.d.ts +0 -4
  1373. package/umd/src/utils/files/isFileExisting.d.ts +0 -5
  1374. package/umd/src/utils/files/listAllFiles.d.ts +1 -5
  1375. package/umd/src/utils/files/readResponseBytes.d.ts +1 -0
  1376. package/umd/src/utils/knowledge/inlineKnowledgeSource.d.ts +11 -6
  1377. package/umd/src/utils/knowledge/simplifyKnowledgeLabel.d.ts +2 -0
  1378. package/umd/src/utils/linguistic-hash/linguisticHash.d.ts +2 -1
  1379. package/umd/src/utils/linguistic-hash/linguisticHashTypes.d.ts +0 -3
  1380. package/umd/src/utils/linguistic-hash/linguisticHashWords.cs.d.ts +0 -3
  1381. package/umd/src/utils/linguistic-hash/linguisticHashWords.en.d.ts +0 -3
  1382. package/umd/src/utils/markdown/addAutoGeneratedSection.d.ts +0 -3
  1383. package/umd/src/utils/markdown/createMarkdownTable.d.ts +0 -3
  1384. package/umd/src/utils/markdown/escapeMarkdownBlock.d.ts +0 -3
  1385. package/umd/src/utils/markdown/extractAllBlocksFromMarkdown.d.ts +1 -3
  1386. package/umd/src/utils/markdown/extractAllListItemsFromMarkdown.d.ts +1 -0
  1387. package/umd/src/utils/markdown/extractOneBlockFromMarkdown.d.ts +2 -4
  1388. package/umd/src/utils/markdown/humanizeAiText.d.ts +0 -3
  1389. package/umd/src/utils/markdown/humanizeAiTextEllipsis.d.ts +0 -3
  1390. package/umd/src/utils/markdown/humanizeAiTextEmdashed.d.ts +0 -3
  1391. package/umd/src/utils/markdown/humanizeAiTextQuotes.d.ts +0 -3
  1392. package/umd/src/utils/markdown/humanizeAiTextSources.d.ts +0 -3
  1393. package/umd/src/utils/markdown/humanizeAiTextWhitespace.d.ts +0 -3
  1394. package/umd/src/utils/markdown/prettifyMarkdown.d.ts +4 -2
  1395. package/umd/src/utils/markdown/promptbookifyAiText.d.ts +0 -3
  1396. package/umd/src/utils/markdown/removeMarkdownComments.d.ts +1 -0
  1397. package/umd/src/utils/markdown/removeMarkdownFormatting.d.ts +1 -0
  1398. package/umd/src/utils/markdown/removeMarkdownLinks.d.ts +1 -0
  1399. package/umd/src/utils/markdown/trimCodeBlock.d.ts +1 -1
  1400. package/umd/src/utils/markdown/trimEndOfCodeBlock.d.ts +1 -1
  1401. package/umd/src/utils/misc/$getCurrentDate.d.ts +1 -0
  1402. package/umd/src/utils/misc/aboutPromptbookInformation.d.ts +3 -3
  1403. package/umd/src/utils/misc/computeHash.d.ts +0 -3
  1404. package/umd/src/utils/misc/debounce.d.ts +2 -0
  1405. package/umd/src/utils/misc/emojis.d.ts +3 -8
  1406. package/umd/src/utils/misc/injectCssModuleIntoShadowRoot.d.ts +7 -2
  1407. package/umd/src/utils/misc/parseNumber.d.ts +0 -4
  1408. package/umd/src/utils/misc/xAboutPromptbookInformation.d.ts +3 -4
  1409. package/umd/src/utils/normalization/IKeywords.d.ts +0 -3
  1410. package/umd/src/utils/normalization/nameToUriPart.d.ts +1 -0
  1411. package/umd/src/utils/normalization/nameToUriParts.d.ts +1 -0
  1412. package/umd/src/utils/normalization/normalize-to-kebab-case.d.ts +2 -3
  1413. package/umd/src/utils/normalization/normalizeTo_PascalCase.d.ts +2 -0
  1414. package/umd/src/utils/normalization/normalizeTo_SCREAMING_CASE.d.ts +2 -0
  1415. package/umd/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -3
  1416. package/umd/src/utils/normalization/normalizeTo_snake_case.d.ts +1 -0
  1417. package/umd/src/utils/normalization/orderJson.d.ts +1 -0
  1418. package/umd/src/utils/normalization/orderJson.test.d.ts +0 -3
  1419. package/umd/src/utils/normalization/parseKeywords.d.ts +1 -4
  1420. package/umd/src/utils/normalization/parseKeywordsFromString.d.ts +1 -0
  1421. package/umd/src/utils/normalization/removeDiacritics.d.ts +1 -3
  1422. package/umd/src/utils/normalization/removeEmojis.d.ts +1 -0
  1423. package/umd/src/utils/normalization/removeQuotes.d.ts +1 -0
  1424. package/umd/src/utils/normalization/searchKeywords.d.ts +1 -3
  1425. package/umd/src/utils/normalization/titleToName.d.ts +1 -0
  1426. package/umd/src/utils/normalization/unwrapResult.d.ts +1 -3
  1427. package/umd/src/utils/organization/$sideEffect.d.ts +1 -0
  1428. package/umd/src/utils/organization/TODO_USE.d.ts +1 -0
  1429. package/umd/src/utils/organization/just.d.ts +1 -0
  1430. package/umd/src/utils/organization/keepImported.d.ts +1 -0
  1431. package/umd/src/utils/organization/keepTypeImported.d.ts +1 -0
  1432. package/umd/src/utils/organization/keepUnused.d.ts +1 -0
  1433. package/umd/src/utils/organization/preserve.d.ts +1 -3
  1434. package/umd/src/utils/organization/really_any.d.ts +1 -0
  1435. package/umd/src/utils/organization/spaceTrim.d.ts +3 -2
  1436. package/umd/src/utils/parameters/extractParameterNames.d.ts +1 -0
  1437. package/umd/src/utils/parameters/mapAvailableToExpectedParameters.d.ts +1 -0
  1438. package/umd/src/utils/parameters/templateParameters.d.ts +2 -1
  1439. package/umd/src/utils/parameters/valueToString.d.ts +2 -2
  1440. package/umd/src/utils/random/$generateBookBoilerplate.d.ts +3 -3
  1441. package/umd/src/utils/random/$randomAgentPersona.d.ts +1 -3
  1442. package/umd/src/utils/random/$randomAgentRule.d.ts +1 -3
  1443. package/umd/src/utils/random/$randomFullnameWithColor.d.ts +4 -3
  1444. package/umd/src/utils/random/$randomItem.d.ts +0 -3
  1445. package/umd/src/utils/random/$randomSeed.d.ts +0 -3
  1446. package/umd/src/utils/random/$randomToken.d.ts +2 -5
  1447. package/umd/src/utils/random/EnglishNamePool.d.ts +1 -0
  1448. package/umd/src/utils/serialization/$deepFreeze.d.ts +1 -3
  1449. package/umd/src/utils/serialization/checkSerializableAsJson.d.ts +1 -5
  1450. package/umd/src/utils/serialization/clonePipeline.d.ts +1 -3
  1451. package/umd/src/utils/serialization/deepClone.d.ts +1 -3
  1452. package/umd/src/utils/serialization/exportJson.d.ts +1 -3
  1453. package/umd/src/utils/serialization/isSerializableAsJson.d.ts +0 -5
  1454. package/umd/src/utils/serialization/jsonStringsToJsons.d.ts +1 -4
  1455. package/umd/src/utils/serialization/serializeToPromptbookJavascript.d.ts +3 -3
  1456. package/umd/src/utils/sets/difference.d.ts +1 -3
  1457. package/umd/src/utils/sets/intersection.d.ts +1 -0
  1458. package/umd/src/utils/sets/union.d.ts +1 -0
  1459. package/umd/src/utils/take/classes/TakeChain.d.ts +4 -1
  1460. package/umd/src/utils/take/interfaces/ITakeChain.d.ts +5 -1
  1461. package/umd/src/utils/take/interfaces/Takeable.d.ts +2 -1
  1462. package/umd/src/utils/take/take.d.ts +1 -1
  1463. package/umd/src/utils/validators/filePath/isRootPath.d.ts +1 -3
  1464. package/umd/src/utils/validators/filePath/isRootPath.test.d.ts +0 -3
  1465. package/umd/src/utils/validators/filePath/isValidFilePath.d.ts +1 -3
  1466. package/umd/src/utils/validators/javascriptName/isValidJavascriptName.d.ts +1 -0
  1467. package/umd/src/utils/validators/parameterName/validateParameterName.d.ts +1 -0
  1468. package/umd/src/utils/validators/semanticVersion/isValidPromptbookVersion.d.ts +2 -1
  1469. package/umd/src/utils/validators/url/extractUrlsFromText.d.ts +1 -0
  1470. package/umd/src/utils/validators/url/isUrlOnPrivateNetwork.d.ts +1 -0
  1471. package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +0 -3
  1472. package/umd/src/utils/validators/url/isValidPipelineUrl.d.ts +0 -3
  1473. package/umd/src/utils/validators/url/normalizeDomainForMatching.d.ts +1 -0
  1474. package/umd/src/version.d.ts +1 -1
  1475. package/umd/src/wizard/$getCompiledBook.d.ts +0 -2
  1476. package/umd/src/wizard/wizard.d.ts +1 -2
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-34';
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.
@@ -15948,11 +15970,9 @@
15948
15970
  */
15949
15971
  getToolFunctions() {
15950
15972
  return createTimeoutToolFunctions();
15951
- }
15952
- }
15953
- /**
15954
- * Note: [💞] Ignore a discrepancy between file name and entity name
15955
- */
15973
+ }
15974
+ }
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
@@ -16628,13 +16640,12 @@
16628
16640
  new NotYetImplementedCommitmentDefinition('CONTEXT'),
16629
16641
  // <- TODO: Prompt: Leverage aliases instead of duplicating commitment definitions
16630
16642
  ];
16631
- /**
16632
- * TODO: [🧠] Maybe create through standardized $register
16633
- * Note: [💞] Ignore a discrepancy between file name and entity name
16634
- */
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,7 +16768,7 @@
16754
16768
  return answer;
16755
16769
  }
16756
16770
  }
16757
- /** Note: [🔵] Code for browser dialog helper [SimplePromptInterfaceTools](src/dialogs/simple-prompt/SimplePromptInterfaceTools.ts) should never be published outside of `@promptbook/browser` */
16771
+ // Note: [🔵] Code for browser dialog helper [SimplePromptInterfaceTools](src/dialogs/simple-prompt/SimplePromptInterfaceTools.ts) should never be published outside of `@promptbook/browser`
16758
16772
 
16759
16773
  /**
16760
16774
  * Safely retrieves the global scope object (window in browser, global in Node.js)
@@ -16762,7 +16776,7 @@
16762
16776
  *
16763
16777
  * Note: `$` is used to indicate that this function is not a pure function - it access global scope
16764
16778
  *
16765
- * @private internal function of `$Register`
16779
+ * @private internal function of `$Register`
16766
16780
  */
16767
16781
  function $getGlobalScope() {
16768
16782
  return Function('return this')();
@@ -16821,13 +16835,13 @@
16821
16835
  * Central point for registering and accessing different types of content scrapers.
16822
16836
  *
16823
16837
  * Note: `$` is used to indicate that this interacts with the global scope
16838
+ *
16824
16839
  * @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
16840
+ *
16825
16841
  * @public exported from `@promptbook/core`
16826
16842
  */
16827
16843
  const $scrapersRegister = new $Register('scraper_constructors');
16828
- /**
16829
- * TODO: [®] DRY Register logic
16830
- */
16844
+ // TODO: [®] DRY Register logic
16831
16845
 
16832
16846
  /**
16833
16847
  * Provides a collection of scrapers optimized for browser environments.
@@ -16953,12 +16967,13 @@
16953
16967
  }
16954
16968
  }
16955
16969
  }
16956
- /** Note: [🔵] Code for browser speech-recognition adapter [BrowserSpeechRecognition](src/speech-recognition/BrowserSpeechRecognition.ts) should never be published outside of `@promptbook/browser` */
16957
- /** TODO: !!!! Search ACRY for `window` and put -> [🔵] */
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 -> [🔵]
16958
16972
 
16959
16973
  /**
16960
16974
  * Creates a PromptbookStorage backed by IndexedDB.
16961
16975
  * Uses a single object store named 'promptbook'.
16976
+ *
16962
16977
  * @private for `getIndexedDbStorage`
16963
16978
  */
16964
16979
  function makePromptbookStorageFromIndexedDb(options) {
@@ -17031,7 +17046,7 @@
17031
17046
  indexedDbStorageCache.set(cacheKey, storage);
17032
17047
  return storage;
17033
17048
  }
17034
- /** Note: [🔵] Code for browser storage helper [getIndexedDbStorage](src/storage/local-storage/getIndexedDbStorage.ts) should never be published outside of `@promptbook/browser` */
17049
+ // Note: [🔵] Code for browser storage helper [getIndexedDbStorage](src/storage/local-storage/getIndexedDbStorage.ts) should never be published outside of `@promptbook/browser`
17035
17050
 
17036
17051
  /**
17037
17052
  * Stringify the PipelineJson with proper formatting
@@ -17059,12 +17074,10 @@
17059
17074
  pipelineJsonStringified += '\n';
17060
17075
  return pipelineJsonStringified;
17061
17076
  }
17062
- /**
17063
- * TODO: [🐝] Not Working properly @see https://promptbook.studio/examples/mixed-knowledge.book
17064
- * TODO: [🧠][0] Maybe rename to `stringifyPipelineJson`, `stringifyIndexedJson`,...
17065
- * TODO: [🧠] Maybe more elegant solution than replacing via regex
17066
- * TODO: [🍙] Make some standard order of json properties
17067
- */
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
17068
17081
 
17069
17082
  /**
17070
17083
  * Creates a Promptbook storage interface from a web storage object.
@@ -17095,10 +17108,8 @@
17095
17108
  },
17096
17109
  };
17097
17110
  }
17098
- /**
17099
- * TODO: [🧠] Should this be named `makePromptbookStorageFromWebStorage` vs `createPromptbookStorageFromWebStorage`
17100
- * TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values
17101
- */
17111
+ // TODO: [🧠] Should this be named `makePromptbookStorageFromWebStorage` vs `createPromptbookStorageFromWebStorage`
17112
+ // TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values
17102
17113
 
17103
17114
  /**
17104
17115
  * Cache storage
@@ -17121,7 +17132,7 @@
17121
17132
  promptbookLocalStorage = makePromptbookStorageFromWebStorage(localStorage);
17122
17133
  return promptbookLocalStorage;
17123
17134
  }
17124
- /** Note: [🔵] Code for browser storage helper [getLocalStorage](src/storage/local-storage/getLocalStorage.ts) should never be published outside of `@promptbook/browser` */
17135
+ // Note: [🔵] Code for browser storage helper [getLocalStorage](src/storage/local-storage/getLocalStorage.ts) should never be published outside of `@promptbook/browser`
17125
17136
 
17126
17137
  /**
17127
17138
  * Cache storage
@@ -17144,7 +17155,7 @@
17144
17155
  promptbookSessionStorage = makePromptbookStorageFromWebStorage(sessionStorage);
17145
17156
  return promptbookSessionStorage;
17146
17157
  }
17147
- /** Note: [🔵] Code for browser storage helper [getSessionStorage](src/storage/local-storage/getSessionStorage.ts) should never be published outside of `@promptbook/browser` */
17158
+ // Note: [🔵] Code for browser storage helper [getSessionStorage](src/storage/local-storage/getSessionStorage.ts) should never be published outside of `@promptbook/browser`
17148
17159
 
17149
17160
  /**
17150
17161
  * Normalizes a domain-like string into a comparable hostname form.
@@ -17154,6 +17165,7 @@
17154
17165
  *
17155
17166
  * @param rawDomain - Raw domain value (for example `my-agent.com` or `https://my-agent.com/path`).
17156
17167
  * @returns Normalized hostname or `null` when the value cannot be normalized.
17168
+ *
17157
17169
  * @private utility for host/domain matching
17158
17170
  */
17159
17171
  function normalizeDomainForMatching(rawDomain) {
@@ -17176,6 +17188,7 @@
17176
17188
  *
17177
17189
  * @param value - Raw value to inspect.
17178
17190
  * @returns True when the value starts with `http://` or `https://`.
17191
+ *
17179
17192
  * @private utility for host/domain matching
17180
17193
  */
17181
17194
  function hasHttpProtocol(value) {
@@ -17221,6 +17234,7 @@
17221
17234
  *
17222
17235
  * @param agentSource - Raw agent source.
17223
17236
  * @returns Parsed prelude with shared line metadata.
17237
+ *
17224
17238
  * @private internal utility of book agent-source parsing
17225
17239
  */
17226
17240
  function parseAgentSourcePrelude(agentSource) {
@@ -17396,6 +17410,7 @@
17396
17410
  *
17397
17411
  * @param text - Text to extract parameters from
17398
17412
  * @returns Array of parsed parameters with unified representation
17413
+ *
17399
17414
  * @public exported from `@promptbook/core`
17400
17415
  */
17401
17416
  function parseParameters(text) {
@@ -17824,9 +17839,7 @@
17824
17839
  const trimmed = spacetrim.spaceTrim(content);
17825
17840
  return normalizeDomainForMatching(trimmed) || trimmed.toLowerCase();
17826
17841
  }
17827
- /**
17828
- * TODO: [🕛] Unite `AgentBasicInformation`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
17829
- */
17842
+ // TODO: [🕛] Unite `AgentBasicInformation`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
17830
17843
 
17831
17844
  /**
17832
17845
  * Converts Blob, File or MediaSource to url using URL.createObjectURL
@@ -17899,7 +17912,7 @@
17899
17912
  return new URL(this.src);
17900
17913
  }
17901
17914
  }
17902
- /** Note: [🔵] Code for browser file helper [ObjectUrl](src/utils/files/ObjectUrl.ts) should never be published outside of `@promptbook/browser` */
17915
+ // Note: [🔵] Code for browser file helper [ObjectUrl](src/utils/files/ObjectUrl.ts) should never be published outside of `@promptbook/browser`
17903
17916
 
17904
17917
  /**
17905
17918
  * Download a File in a browser
@@ -17919,7 +17932,7 @@
17919
17932
  link.click();
17920
17933
  await objectUrl.destroy();
17921
17934
  }
17922
- /** Note: [🔵] Code for browser file helper [$induceFileDownload](src/utils/files/$induceFileDownload.ts) should never be published outside of `@promptbook/browser` */
17935
+ // Note: [🔵] Code for browser file helper [$induceFileDownload](src/utils/files/$induceFileDownload.ts) should never be published outside of `@promptbook/browser`
17923
17936
 
17924
17937
  /**
17925
17938
  * Download a Book in a browser
@@ -17938,7 +17951,7 @@
17938
17951
  });
17939
17952
  return /* not await */ $induceFileDownload(bookFile);
17940
17953
  }
17941
- /** Note: [🔵] Code for browser file helper [$induceBookDownload](src/utils/files/$induceBookDownload.ts) should never be published outside of `@promptbook/browser` */
17954
+ // Note: [🔵] Code for browser file helper [$induceBookDownload](src/utils/files/$induceBookDownload.ts) should never be published outside of `@promptbook/browser`
17942
17955
 
17943
17956
  /**
17944
17957
  * Keep-alive helpers used for streaming chat responses.
@@ -17950,12 +17963,10 @@
17950
17963
  * @private internal streaming helper for Promptbook chat connections
17951
17964
  */
17952
17965
  const CHAT_STREAM_KEEP_ALIVE_TOKEN = 'STREAM_KEEP_ALIVE';
17953
- /**
17954
- * Note: [💞] Ignore a discrepancy between file name and entity name
17955
- */
17966
+ // Note: [💞] Ignore a discrepancy between file name and entity name
17956
17967
 
17957
17968
  /**
17958
- * 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
17959
17970
  *
17960
17971
  * @public exported from `@promptbook/core`
17961
17972
  */
@@ -17992,9 +18003,7 @@
17992
18003
  const linesToAdd = PADDING_LINES - trailingEmptyLines;
17993
18004
  return (content + '\n'.repeat(linesToAdd));
17994
18005
  }
17995
- /**
17996
- * TODO: [🧠] Maybe export
17997
- */
18006
+ // TODO: [🧠] Maybe export
17998
18007
 
17999
18008
  /**
18000
18009
  * Type guard to check if a string is a valid agent source
@@ -18024,6 +18033,7 @@
18024
18033
  * Default book
18025
18034
  *
18026
18035
  * @deprecated Use `$generateBookBoilerplate` instead
18036
+ *
18027
18037
  * @public exported from `@promptbook/core`
18028
18038
  */
18029
18039
  padBook(validateBook(spacetrim.spaceTrim(`
@@ -18045,6 +18055,7 @@
18045
18055
  * @param {string} pipelineString the candidate for a pipeline string
18046
18056
  * @returns {PipelineString} the same string as input, but validated as valid
18047
18057
  * @throws {ParseError} if the string is not a valid pipeline string
18058
+ *
18048
18059
  * @public exported from `@promptbook/core`
18049
18060
  */
18050
18061
  function validatePipelineString(pipelineString) {
@@ -18063,9 +18074,7 @@
18063
18074
  // <- TODO: Implement the validation + add tests when the pipeline logic considered as invalid
18064
18075
  return pipelineString;
18065
18076
  }
18066
- /**
18067
- * TODO: [🧠][🈴] Where is the best location for this file
18068
- */
18077
+ // TODO: [🧠][🈴] Where is the best location for this file
18069
18078
 
18070
18079
  /**
18071
18080
  * Function `isValidPipelineString` will validate the if the string is a valid pipeline string
@@ -18073,6 +18082,7 @@
18073
18082
  *
18074
18083
  * @param {string} pipelineString the candidate for a pipeline string
18075
18084
  * @returns {boolean} if the string is a valid pipeline string
18085
+ *
18076
18086
  * @public exported from `@promptbook/core`
18077
18087
  */
18078
18088
  function isValidPipelineString(pipelineString) {
@@ -18085,9 +18095,7 @@
18085
18095
  return false;
18086
18096
  }
18087
18097
  }
18088
- /**
18089
- * TODO: [🧠][🈴] Where is the best location for this file
18090
- */
18098
+ // TODO: [🧠][🈴] Where is the best location for this file
18091
18099
 
18092
18100
  /**
18093
18101
  * Tag function for notating a pipeline with a book\`...\ notation as template literal
@@ -18100,6 +18108,7 @@
18100
18108
  * @param strings The static string parts of the template literal
18101
18109
  * @param values The dynamic values embedded within the template literal used as data
18102
18110
  * @returns the pipeline string
18111
+ *
18103
18112
  * @public exported from `@promptbook/core`
18104
18113
  */
18105
18114
  function book(strings, ...values) {
@@ -18126,10 +18135,8 @@
18126
18135
  }
18127
18136
  return padBook(bookString);
18128
18137
  }
18129
- /**
18130
- * TODO: [🧠][🈴] Where is the best location for this file
18131
- * Note: [💞] Ignore a discrepancy between file name and entity name
18132
- */
18138
+ // TODO: [🧠][🈴] Where is the best location for this file
18139
+ // Note: [💞] Ignore a discrepancy between file name and entity name
18133
18140
 
18134
18141
  /**
18135
18142
  * Tool call name emitted while preparing a GPT assistant for an agent.
@@ -18174,9 +18181,7 @@
18174
18181
  { token: CHAT_STREAM_WHITESPACE_TOKEN_TAB, value: '\t' },
18175
18182
  { token: CHAT_STREAM_WHITESPACE_TOKEN_SPACE, value: ' ' },
18176
18183
  ];
18177
- /**
18178
- * Note: [💞] Ignore a discrepancy between file name and entity name
18179
- */
18184
+ // Note: [💞] Ignore a discrepancy between file name and entity name
18180
18185
 
18181
18186
  /**
18182
18187
  * Converts encoded whitespace markers back into real whitespace so the UI can render the message
@@ -18194,6 +18199,9 @@
18194
18199
  }, content);
18195
18200
  }
18196
18201
 
18202
+ /**
18203
+ * Constant for raw tool call ID fields.
18204
+ */
18197
18205
  const RAW_TOOL_CALL_ID_FIELDS = ['callId', 'call_id', 'id'];
18198
18206
  /**
18199
18207
  * Builds a deterministic idempotency key for tool calls so the UI can track updates.
@@ -18224,6 +18232,9 @@
18224
18232
  }
18225
18233
  return `fallback:${toolCall.name}`;
18226
18234
  }
18235
+ /**
18236
+ * Gets arguments key.
18237
+ */
18227
18238
  function getArgumentsKey(value) {
18228
18239
  if (typeof value === 'string') {
18229
18240
  return value;
@@ -18297,6 +18308,7 @@
18297
18308
  * @param existingToolCall - Previous snapshot.
18298
18309
  * @param incomingToolCall - New snapshot.
18299
18310
  * @returns One merged snapshot.
18311
+ *
18300
18312
  * @private helper of `mergeToolCalls`
18301
18313
  */
18302
18314
  function mergeToolCallSnapshot(existingToolCall, incomingToolCall) {
@@ -18319,6 +18331,7 @@
18319
18331
  * @param existingToolCall - Previous snapshot.
18320
18332
  * @param incomingToolCall - New snapshot.
18321
18333
  * @returns Resolved lifecycle state or `undefined` when neither snapshot provides enough data.
18334
+ *
18322
18335
  * @private helper of `mergeToolCalls`
18323
18336
  */
18324
18337
  function resolveMergedToolCallState(existingToolCall, incomingToolCall) {
@@ -18332,6 +18345,7 @@
18332
18345
  *
18333
18346
  * @param toolCall - Tool call snapshot to inspect.
18334
18347
  * @returns Inferred lifecycle state or `undefined`.
18348
+ *
18335
18349
  * @private helper of `mergeToolCalls`
18336
18350
  */
18337
18351
  function inferToolCallState(toolCall) {
@@ -18355,6 +18369,7 @@
18355
18369
  * @param existingValues - Previous list.
18356
18370
  * @param incomingValues - Incoming list.
18357
18371
  * @returns Deduplicated merged list or `undefined`.
18372
+ *
18358
18373
  * @private helper of `mergeToolCalls`
18359
18374
  */
18360
18375
  function mergeUnknownLists(existingValues, incomingValues) {
@@ -18381,6 +18396,7 @@
18381
18396
  *
18382
18397
  * @param value - Value to serialize.
18383
18398
  * @returns String signature.
18399
+ *
18384
18400
  * @private helper of `mergeToolCalls`
18385
18401
  */
18386
18402
  function serializeValueForMerge(value) {
@@ -18398,6 +18414,7 @@
18398
18414
  *
18399
18415
  * @param toolCalls - Mutable list to deduplicate in-place.
18400
18416
  * @returns The same array after removing redundant preparation entries.
18417
+ *
18401
18418
  * @private helper of `mergeToolCalls`
18402
18419
  */
18403
18420
  function deduplicatePreparationToolCalls(toolCalls) {
@@ -18441,6 +18458,7 @@
18441
18458
  * Restricts an Updatable to a (2) BehaviorSubject variant
18442
18459
  *
18443
18460
  * @see Updatable
18461
+ *
18444
18462
  * @private internal utility <- TODO: [🧠] Maybe export from `@promptbook/types`
18445
18463
  */
18446
18464
  function asUpdatableSubject(value) {
@@ -18465,9 +18483,7 @@
18465
18483
  return new rxjs.BehaviorSubject(value);
18466
18484
  }
18467
18485
  }
18468
- /**
18469
- * TODO: [🧠] Maybe `BehaviorSubject` is too heavy for this use case, maybe just tuple `[value,setValue]` is enough
18470
- */
18486
+ // TODO: [🧠] Maybe `BehaviorSubject` is too heavy for this use case, maybe just tuple `[value,setValue]` is enough
18471
18487
 
18472
18488
  /**
18473
18489
  * Takes an item or an array of items and returns an array of items
@@ -18500,6 +18516,7 @@
18500
18516
  * Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
18501
18517
  *
18502
18518
  * Note: Internal utility of `joinLlmExecutionTools` but exposed type
18519
+ *
18503
18520
  * @public exported from `@promptbook/core`
18504
18521
  */
18505
18522
  class MultipleLlmExecutionTools {
@@ -18662,16 +18679,16 @@
18662
18679
  * `MultipleLlmExecutionTools` object. It provides failover and aggregation logic:
18663
18680
  *
18664
18681
  * 1. **Failover**: When a model call is made, it tries providers in the order they were provided.
18665
- * 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.
18666
18683
  * 2. **Aggregation**: `listModels` returns a combined list of all models available from all providers.
18667
18684
  * 3. **Empty case**: If no tools are provided, it logs a warning (as Promptbook requires LLMs to function).
18668
18685
  *
18686
+ * Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
18687
+ *
18669
18688
  * @param title - A descriptive title for this collection of joined tools
18670
18689
  * @param llmExecutionTools - An array of execution tools to be joined
18671
18690
  * @returns A single unified execution tool wrapper
18672
18691
  *
18673
- * Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
18674
- *
18675
18692
  * @public exported from `@promptbook/core`
18676
18693
  */
18677
18694
  function joinLlmExecutionTools(title, ...llmExecutionTools) {
@@ -18708,10 +18725,8 @@
18708
18725
  }
18709
18726
  return new MultipleLlmExecutionTools(title || 'Multiple LLM Providers joined by `joinLlmExecutionTools`', ...llmExecutionTools);
18710
18727
  }
18711
- /**
18712
- * TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
18713
- * TODO: [👷‍♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
18714
- */
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
18715
18730
 
18716
18731
  /**
18717
18732
  * Just returns the given `LlmExecutionTools` or joins multiple into one
@@ -18725,10 +18740,8 @@
18725
18740
  : joinLlmExecutionTools('Multiple LLM Providers joined by `getSingleLlmExecutionTools`', ..._llms);
18726
18741
  return llmTools;
18727
18742
  }
18728
- /**
18729
- * TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
18730
- * TODO: [👷‍♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
18731
- */
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
18732
18745
 
18733
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"}];
18734
18747
 
@@ -18737,8 +18750,9 @@
18737
18750
  *
18738
18751
  * @param content raw html code
18739
18752
  * @returns formatted html code
18740
- * @private withing the package because of HUGE size of prettier dependency
18741
18753
  * @deprecated Prettier removed from Promptbook due to package size
18754
+ *
18755
+ * @private withing the package because of HUGE size of prettier dependency
18742
18756
  */
18743
18757
  function prettifyMarkdown(content) {
18744
18758
  return (content + `\n\n<!-- Note: Prettier removed from Promptbook -->`);
@@ -18750,6 +18764,7 @@
18750
18764
  * @deprecated TODO: [🥍][🧠] Backup original files in `PipelineJson` same as in Promptbook.studio
18751
18765
  * @param pipelineJson Promptbook in JSON format (.bookc)
18752
18766
  * @returns Promptbook in string format (.book.md)
18767
+ *
18753
18768
  * @public exported from `@promptbook/core`
18754
18769
  */
18755
18770
  function pipelineJsonToString(pipelineJson) {
@@ -18866,6 +18881,8 @@
18866
18881
  return validatePipelineString(pipelineString);
18867
18882
  }
18868
18883
  /**
18884
+ * Handles task parameter Json to string.
18885
+ *
18869
18886
  * @private internal utility of `pipelineJsonToString`
18870
18887
  */
18871
18888
  function taskParameterJsonToString(taskParameterJson) {
@@ -18876,13 +18893,11 @@
18876
18893
  }
18877
18894
  return parameterString;
18878
18895
  }
18879
- /**
18880
- * TODO: [🛋] Implement new features and commands into `pipelineJsonToString` + `taskParameterJsonToString` , use `stringifyCommand`
18881
- * TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
18882
- * TODO: [🏛] Maybe make some markdown builder
18883
- * TODO: [🏛] Escape all
18884
- * TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
18885
- */
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
18886
18901
 
18887
18902
  /**
18888
18903
  * Validates PipelineJson if it is logically valid
@@ -18899,6 +18914,7 @@
18899
18914
  * @param pipeline valid or invalid PipelineJson
18900
18915
  * @returns the same pipeline if it is logically valid
18901
18916
  * @throws {PipelineLogicError} on logical error in the pipeline
18917
+ *
18902
18918
  * @public exported from `@promptbook/core`
18903
18919
  */
18904
18920
  function validatePipeline(pipeline) {
@@ -18923,6 +18939,8 @@
18923
18939
  return pipeline;
18924
18940
  }
18925
18941
  /**
18942
+ * Validates pipeline inner function.
18943
+ *
18926
18944
  * @private internal function for `validatePipeline`
18927
18945
  */
18928
18946
  function validatePipeline_InnerFunction(pipeline) {
@@ -19167,20 +19185,19 @@
19167
19185
  * > * - ...
19168
19186
  * > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
19169
19187
  */
19170
- /**
19171
- * TODO: [🧳][main] !!4 Validate that all examples match expectations
19172
- * TODO: [🧳][🐝][main] !!4 Validate that knowledge is valid (non-void)
19173
- * TODO: [🧳][main] !!4 Validate that persona can be used only with CHAT variant
19174
- * TODO: [🧳][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
19175
- * TODO: [🧳][main] !!4 Validate that reserved parameter is not used as joker
19176
- * TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
19177
- * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
19178
- */
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
19179
19195
 
19180
19196
  /**
19181
19197
  * Unprepare just strips the preparation data of the pipeline
19182
19198
  *
19183
19199
  * @deprecated In future version this function will be removed or deprecated
19200
+ *
19184
19201
  * @public exported from `@promptbook/core`
19185
19202
  */
19186
19203
  function unpreparePipeline(pipeline) {
@@ -19209,18 +19226,17 @@
19209
19226
  },
19210
19227
  });
19211
19228
  }
19212
- /**
19213
- * TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
19214
- * TODO: Write tests for `preparePipeline`
19215
- * TODO: [🍙] Make some standard order of json properties
19216
- */
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
19217
19232
 
19218
19233
  /**
19219
19234
  * Library of pipelines that groups together pipelines for an application.
19220
19235
  * This implementation is a very thin wrapper around the Array / Map of pipelines.
19221
19236
  *
19222
- * @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
19223
19237
  * @see https://github.com/webgptorg/pipeline#pipeline-collection
19238
+ *
19239
+ * @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
19224
19240
  */
19225
19241
  class SimplePipelineCollection {
19226
19242
  /**
@@ -19324,6 +19340,7 @@
19324
19340
  *
19325
19341
  * @param promptbookSources
19326
19342
  * @returns PipelineCollection
19343
+ *
19327
19344
  * @public exported from `@promptbook/core`
19328
19345
  */
19329
19346
  function createPipelineCollectionFromJson(...promptbooks) {
@@ -19377,6 +19394,7 @@
19377
19394
  *
19378
19395
  * @param executionResult - The partial result of the Promptbook execution
19379
19396
  * @throws {PipelineExecutionError} If the execution is not successful or if multiple errors occurred
19397
+ *
19380
19398
  * @private internal helper function of `asPromise` method of `ExecutionTask`
19381
19399
  */
19382
19400
  function assertsTaskSuccessful(executionResult) {
@@ -19407,9 +19425,7 @@
19407
19425
  `));
19408
19426
  }
19409
19427
  }
19410
- /**
19411
- * TODO: [🧠] Can this return type be better typed than void
19412
- */
19428
+ // TODO: [🧠] Can this return type be better typed than void
19413
19429
 
19414
19430
  /**
19415
19431
  * Helper to create a new task
@@ -19600,10 +19616,8 @@
19600
19616
  },
19601
19617
  };
19602
19618
  }
19603
- /**
19604
- * TODO: Maybe allow to terminate the task and add getter `isFinished` or `status`
19605
- * TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
19606
- */
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
19607
19621
 
19608
19622
  /**
19609
19623
  * Represents the uncertain value
@@ -19671,9 +19685,7 @@
19671
19685
  pagesCount: UNCERTAIN_ZERO_VALUE,
19672
19686
  },
19673
19687
  });
19674
- /**
19675
- * Note: [💞] Ignore a discrepancy between file name and entity name
19676
- */
19688
+ // Note: [💞] Ignore a discrepancy between file name and entity name
19677
19689
 
19678
19690
  /**
19679
19691
  * Function `addUsage` will add multiple usages into one
@@ -19738,6 +19750,7 @@
19738
19750
  *
19739
19751
  * @param llmTools - The LLM tools to be intercepted and tracked
19740
19752
  * @returns Full proxy of the tools with added usage tracking capabilities
19753
+ *
19741
19754
  * @public exported from `@promptbook/core`
19742
19755
  */
19743
19756
  function countUsage(llmTools) {
@@ -19835,13 +19848,13 @@
19835
19848
  * Global registry for storing metadata about all available scrapers and converters.
19836
19849
  *
19837
19850
  * Note: `$` is used to indicate that this interacts with the global scope.
19851
+ *
19838
19852
  * @singleton Only one instance of each register is created per build, but there can be more in different contexts (e.g., tests).
19853
+ *
19839
19854
  * @public exported from `@promptbook/core`
19840
19855
  */
19841
19856
  const $scrapersMetadataRegister = new $Register('scrapers_metadata');
19842
- /**
19843
- * TODO: [®] DRY Register logic
19844
- */
19857
+ // TODO: [®] DRY Register logic
19845
19858
 
19846
19859
  /**
19847
19860
  * Creates a message with all registered scrapers
@@ -19926,9 +19939,7 @@
19926
19939
 
19927
19940
  `);
19928
19941
  }
19929
- /**
19930
- * TODO: [®] DRY Register logic
19931
- */
19942
+ // TODO: [®] DRY Register logic
19932
19943
 
19933
19944
  /**
19934
19945
  * Creates unique name for the source
@@ -19947,9 +19958,7 @@
19947
19958
  // <- TODO: Use MAX_FILENAME_LENGTH
19948
19959
  return name;
19949
19960
  }
19950
- /**
19951
- * TODO: [🐱‍🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
19952
- */
19961
+ // TODO: [🐱‍🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
19953
19962
 
19954
19963
  /**
19955
19964
  * Converts a name to a properly formatted subfolder path for cache storage.
@@ -19980,11 +19989,9 @@
19980
19989
  .catch(() => false);
19981
19990
  return isFile;
19982
19991
  }
19983
- /**
19984
- * Note: Not [~🟢~] because it is not directly dependent on `fs
19985
- * TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
19986
- * TODO: [🖇] What about symlinks?
19987
- */
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?
19988
19995
 
19989
19996
  /**
19990
19997
  * Convert mime type to file extension
@@ -20024,9 +20031,7 @@
20024
20031
  `));
20025
20032
  }
20026
20033
  };
20027
- /**
20028
- * TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
20029
- */
20034
+ // TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
20030
20035
 
20031
20036
  /**
20032
20037
  * Factory function that creates a handler for processing knowledge sources.
@@ -20246,6 +20251,7 @@
20246
20251
  * Prepares the knowledge pieces
20247
20252
  *
20248
20253
  * @see https://github.com/webgptorg/promptbook/discussions/41
20254
+ *
20249
20255
  * @public exported from `@promptbook/core`
20250
20256
  */
20251
20257
  async function prepareKnowledgePieces(knowledgeSources, tools, options) {
@@ -20387,25 +20393,24 @@
20387
20393
  });
20388
20394
  return { tasksPrepared };
20389
20395
  }
20390
- /**
20391
- * TODO: [😂] Adding knowledge should be convert to async high-level abstractions, similar thing with expectations to sync high-level abstractions
20392
- * TODO: [🧠] Add context to each task (if missing)
20393
- * TODO: [🧠] What is better name `prepareTask` or `prepareTaskAndParameters`
20394
- * TODO: [♨][main] !!3 Prepare index the examples and maybe tasks
20395
- * TODO: Write tests for `preparePipeline`
20396
- * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
20397
- * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
20398
- * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
20399
- */
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
20400
20404
 
20401
20405
  /**
20402
20406
  * Prepare pipeline locally
20403
20407
  *
20404
- * @see https://github.com/webgptorg/promptbook/discussions/196
20405
- *
20406
20408
  * Note: This function does not validate logic of the pipeline
20407
20409
  * Note: This function acts as part of compilation process
20408
20410
  * Note: When the pipeline is already prepared, it returns the same pipeline
20411
+ *
20412
+ * @see https://github.com/webgptorg/promptbook/discussions/196
20413
+ *
20409
20414
  * @public exported from `@promptbook/core`
20410
20415
  */
20411
20416
  async function preparePipeline(pipeline, tools, options) {
@@ -20549,6 +20554,7 @@
20549
20554
  * @param script from which to extract the variables
20550
20555
  * @returns the list of variable names
20551
20556
  * @throws {ParseError} if the script is invalid
20557
+ *
20552
20558
  * @public exported from `@promptbook/javascript`
20553
20559
  */
20554
20560
  function extractVariablesFromJavascript(script) {
@@ -20614,9 +20620,7 @@
20614
20620
  }
20615
20621
  return variables;
20616
20622
  }
20617
- /**
20618
- * TODO: [🔣] Support for multiple languages - python, java,...
20619
- */
20623
+ // TODO: [🔣] Support for multiple languages - python, java,...
20620
20624
 
20621
20625
  /**
20622
20626
  * Parses the task and returns the set of all used parameters
@@ -20624,6 +20628,7 @@
20624
20628
  * @param task the task with used parameters
20625
20629
  * @returns the set of parameter names
20626
20630
  * @throws {ParseError} if the script is invalid
20631
+ *
20627
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
20628
20633
  */
20629
20634
  function extractParameterNamesFromTask(task) {
@@ -20664,9 +20669,7 @@
20664
20669
  }
20665
20670
  return parameterNames;
20666
20671
  }
20667
- /**
20668
- * TODO: [🔣] If script require contentLanguage
20669
- */
20672
+ // TODO: [🔣] If script require contentLanguage
20670
20673
 
20671
20674
  /**
20672
20675
  * Contains configuration options for parsing and generating CSV files, such as delimiters and quoting rules.
@@ -20699,8 +20702,9 @@
20699
20702
  /**
20700
20703
  * Definition for CSV spreadsheet
20701
20704
  *
20705
+ * TODO: [🏢] Export from package `@promptbook/csv`
20706
+ *
20702
20707
  * @public exported from `@promptbook/core`
20703
- * <- TODO: [🏢] Export from package `@promptbook/csv`
20704
20708
  */
20705
20709
  const CsvFormatParser = {
20706
20710
  formatName: 'CSV',
@@ -20790,13 +20794,11 @@
20790
20794
  },
20791
20795
  ],
20792
20796
  };
20793
- /**
20794
- * TODO: [🍓] In `CsvFormatParser` implement simple `isValid`
20795
- * TODO: [🍓] In `CsvFormatParser` implement partial `canBeValid`
20796
- * TODO: [🍓] In `CsvFormatParser` implement `heal
20797
- * TODO: [🍓] In `CsvFormatParser` implement `subvalueParsers`
20798
- * TODO: [🏢] Allow to expect something inside CSV objects and other formats
20799
- */
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
20800
20802
 
20801
20803
  /**
20802
20804
  * Definition for JSON format
@@ -20817,17 +20819,15 @@
20817
20819
  },
20818
20820
  subvalueParsers: [],
20819
20821
  };
20820
- /**
20821
- * TODO: [🧠] Maybe proper instance of object
20822
- * TODO: [0] Make string_serialized_json
20823
- * TODO: [1] Make type for JSON Settings and Schema
20824
- * TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
20825
- * TODO: [🍓] In `JsonFormatParser` implement simple `isValid`
20826
- * TODO: [🍓] In `JsonFormatParser` implement partial `canBeValid`
20827
- * TODO: [🍓] In `JsonFormatParser` implement `heal
20828
- * TODO: [🍓] In `JsonFormatParser` implement `subvalueParsers`
20829
- * TODO: [🏢] Allow to expect something inside JSON objects and other formats
20830
- */
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
20831
20831
 
20832
20832
  /**
20833
20833
  * Definition for any text - this will be always valid
@@ -20865,15 +20865,13 @@
20865
20865
  // <- TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
20866
20866
  ],
20867
20867
  };
20868
- /**
20869
- * TODO: [1] Make type for XML Text and Schema
20870
- * TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
20871
- * TODO: [🍓] In `TextFormatParser` implement simple `isValid`
20872
- * TODO: [🍓] In `TextFormatParser` implement partial `canBeValid`
20873
- * TODO: [🍓] In `TextFormatParser` implement `heal
20874
- * TODO: [🍓] In `TextFormatParser` implement `subvalueParsers`
20875
- * TODO: [🏢] Allow to expect something inside each item of list and other formats
20876
- */
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
20877
20875
 
20878
20876
  /**
20879
20877
  * Definition for XML format
@@ -20894,17 +20892,15 @@
20894
20892
  },
20895
20893
  subvalueParsers: [],
20896
20894
  };
20897
- /**
20898
- * TODO: [🧠] Maybe proper instance of object
20899
- * TODO: [0] Make string_serialized_xml
20900
- * TODO: [1] Make type for XML Settings and Schema
20901
- * TODO: [🧠] What to use for validating XMLs - XSD,...
20902
- * TODO: [🍓] In `XmlFormatParser` implement simple `isValid`
20903
- * TODO: [🍓] In `XmlFormatParser` implement partial `canBeValid`
20904
- * TODO: [🍓] In `XmlFormatParser` implement `heal
20905
- * TODO: [🍓] In `XmlFormatParser` implement `subvalueParsers`
20906
- * TODO: [🏢] Allow to expect something inside XML and other formats
20907
- */
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
20908
20904
 
20909
20905
  /**
20910
20906
  * Definitions for all formats supported by Promptbook
@@ -20912,9 +20908,7 @@
20912
20908
  * @private internal index of `...` <- TODO [🏢]
20913
20909
  */
20914
20910
  const FORMAT_DEFINITIONS = [JsonFormatParser, XmlFormatParser, TextFormatParser, CsvFormatParser];
20915
- /**
20916
- * Note: [💞] Ignore a discrepancy between file name and entity name
20917
- */
20911
+ // Note: [💞] Ignore a discrepancy between file name and entity name
20918
20912
 
20919
20913
  /**
20920
20914
  * Maps available parameters to expected parameters for a pipeline task.
@@ -20924,6 +20918,7 @@
20924
20918
  * 2) Then, if there are unmatched expected and available parameters, map them by order.
20925
20919
  *
20926
20920
  * @throws {PipelineExecutionError} If the number of unmatched expected and available parameters does not match, or mapping is ambiguous.
20921
+ *
20927
20922
  * @private within the repository used in `createPipelineExecutor`
20928
20923
  */
20929
20924
  function mapAvailableToExpectedParameters(options) {
@@ -20994,6 +20989,7 @@
20994
20989
  * @param markdown any valid markdown
20995
20990
  * @returns code blocks with language and content
20996
20991
  * @throws {ParseError} if block is not closed properly
20992
+ *
20997
20993
  * @public exported from `@promptbook/markdown-utils`
20998
20994
  */
20999
20995
  function extractAllBlocksFromMarkdown(markdown) {
@@ -21044,9 +21040,7 @@
21044
21040
  }
21045
21041
  return codeBlocks;
21046
21042
  }
21047
- /**
21048
- * TODO: Maybe name for `blockNotation` instead of '```' and '>'
21049
- */
21043
+ // TODO: Maybe name for `blockNotation` instead of '```' and '>'
21050
21044
 
21051
21045
  /**
21052
21046
  * Extracts extracts exactly one valid JSON code block
@@ -21062,8 +21056,9 @@
21062
21056
  * - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
21063
21057
  * - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
21064
21058
  *
21065
- * @public exported from `@promptbook/markdown-utils`
21066
21059
  * @throws {ParseError} if there is no valid JSON block in the markdown
21060
+ *
21061
+ * @public exported from `@promptbook/markdown-utils`
21067
21062
  */
21068
21063
  function extractJsonBlock(markdown) {
21069
21064
  if (isValidJsonString(markdown)) {
@@ -21079,10 +21074,8 @@
21079
21074
  }
21080
21075
  return jsonBlocks[0].content;
21081
21076
  }
21082
- /**
21083
- * TODO: Add some auto-healing logic + extract YAML, JSON5, TOML, etc.
21084
- * TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
21085
- */
21077
+ // TODO: Add some auto-healing logic + extract YAML, JSON5, TOML, etc.
21078
+ // TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
21086
21079
 
21087
21080
  /**
21088
21081
  * Function checkExpectations will check if the expectations on given value are met
@@ -21093,6 +21086,7 @@
21093
21086
  *
21094
21087
  * @throws {ExpectError} if the expectations are not met
21095
21088
  * @returns {void} Nothing
21089
+ *
21096
21090
  * @private internal function of `createPipelineExecutor`
21097
21091
  */
21098
21092
  function checkExpectations(expectations, value) {
@@ -21106,11 +21100,9 @@
21106
21100
  }
21107
21101
  }
21108
21102
  }
21109
- /**
21110
- * TODO: [💝] Unite object for expecting amount and format
21111
- * TODO: [🧠][🤠] This should be part of `TextFormatParser`
21112
- * Note: [💝] and [🤠] are interconnected together
21113
- */
21103
+ // TODO: [💝] Unite object for expecting amount and format
21104
+ // TODO: [🧠][🤠] This should be part of `TextFormatParser`
21105
+ // Note: [💝] and [🤠] are interconnected together
21114
21106
 
21115
21107
  /**
21116
21108
  * Validates a prompt result against expectations and format requirements.
@@ -21121,6 +21113,7 @@
21121
21113
  *
21122
21114
  * @param options - The validation options including result string, expectations, and format
21123
21115
  * @returns Validation result with processed string and validity status
21116
+ *
21124
21117
  * @private internal function of `createPipelineExecutor` and `cacheLlmTools`
21125
21118
  */
21126
21119
  function validatePromptResult(options) {
@@ -21183,6 +21176,7 @@
21183
21176
  *
21184
21177
  * @param options - The options for execution, including task, parameters, pipeline, and configuration.
21185
21178
  * @returns The result string of the executed task.
21179
+ *
21186
21180
  * @private internal utility of `createPipelineExecutor`
21187
21181
  */
21188
21182
  async function executeAttempts(options) {
@@ -21506,9 +21500,7 @@
21506
21500
  }
21507
21501
  return $ongoingTaskResult.$resultString;
21508
21502
  }
21509
- /**
21510
- * TODO: Break into smaller functions
21511
- */
21503
+ // TODO: Break into smaller functions
21512
21504
 
21513
21505
  /**
21514
21506
  * Executes a pipeline task that requires mapping or iterating over subvalues of a parameter (such as rows in a CSV).
@@ -21651,6 +21643,7 @@
21651
21643
  *
21652
21644
  * @param task - The task for which the context is being generated. This should be a deeply immutable TaskJson object.
21653
21645
  * @returns The context as a string, formatted as markdown and parameter value.
21646
+ *
21654
21647
  * @private internal utility of `createPipelineExecutor`
21655
21648
  */
21656
21649
  async function getContextForTask(task) {
@@ -21688,7 +21681,6 @@
21688
21681
  }
21689
21682
 
21690
21683
  /**
21691
- *
21692
21684
  * @param knowledgePieces
21693
21685
  * @returns
21694
21686
  *
@@ -21769,10 +21761,8 @@
21769
21761
  return knowledgePiecesToString(preparedPipeline.knowledgePieces);
21770
21762
  }
21771
21763
  }
21772
- /**
21773
- * TODO: [♨] Implement Better - use keyword search
21774
- * TODO: [♨] Examples of values
21775
- */
21764
+ // TODO: [♨] Implement Better - use keyword search
21765
+ // TODO: [♨] Examples of values
21776
21766
 
21777
21767
  /**
21778
21768
  * Retrieves all reserved parameters for a given pipeline task, including context, knowledge, examples, and metadata.
@@ -21925,9 +21915,7 @@
21925
21915
  resultString,
21926
21916
  });
21927
21917
  }
21928
- /**
21929
- * TODO: [🤹‍♂️]
21930
- */
21918
+ // TODO: [🤹‍♂️]
21931
21919
 
21932
21920
  /**
21933
21921
  * Filters and returns only the output parameters from the provided pipeline execution options.
@@ -22257,6 +22245,7 @@
22257
22245
  *
22258
22246
  * @returns The executor function
22259
22247
  * @throws {PipelineLogicError} on logical error in the pipeline
22248
+ *
22260
22249
  * @public exported from `@promptbook/core`
22261
22250
  */
22262
22251
  function createPipelineExecutor(options) {
@@ -22410,6 +22399,7 @@
22410
22399
  * Prepares the persona for the pipeline
22411
22400
  *
22412
22401
  * @see https://github.com/webgptorg/promptbook/discussions/22
22402
+ *
22413
22403
  * @public exported from `@promptbook/core`
22414
22404
  */
22415
22405
  async function preparePersona(personaDescription, tools, options) {
@@ -22466,13 +22456,11 @@
22466
22456
  modelsRequirements,
22467
22457
  };
22468
22458
  }
22469
- /**
22470
- * TODO: [😩] DRY `preparePersona` and `selectBestModelFromAvailable`
22471
- * TODO: [🔃][main] If the persona was prepared with different version or different set of models, prepare it once again
22472
- * TODO: [🏢] Check validity of `modelName` in pipeline
22473
- * TODO: [🏢] Check validity of `systemMessage` in pipeline
22474
- * TODO: [🏢] Check validity of `temperature` in pipeline
22475
- */
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
22476
22464
 
22477
22465
  /**
22478
22466
  * Creates an empty/basic agent model requirements object
@@ -22507,12 +22495,11 @@
22507
22495
  systemMessage: `You are ${agentName || 'AI Agent'}`,
22508
22496
  };
22509
22497
  }
22510
- /**
22511
- * TODO: [🐤] Deduplicate `AgentModelRequirements` and `ModelRequirements` model requirements
22512
- */
22498
+ // TODO: [🐤] Deduplicate `AgentModelRequirements` and `ModelRequirements` model requirements
22513
22499
 
22514
22500
  /**
22515
22501
  * Gets a commitment definition by its type
22502
+ *
22516
22503
  * @param type The commitment type to look up
22517
22504
  * @returns The commitment definition or null if not found
22518
22505
  *
@@ -22891,7 +22878,9 @@
22891
22878
  };
22892
22879
  }
22893
22880
  /**
22894
- * @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
22895
22884
  */
22896
22885
  async function applyPendingInlineKnowledgeSources(requirements, uploader) {
22897
22886
  var _a;
@@ -22912,6 +22901,9 @@
22912
22901
  _metadata: stripInlineKnowledgeMetadata(requirements._metadata),
22913
22902
  };
22914
22903
  }
22904
+ /**
22905
+ * Handles upload inline knowledge source with fallback.
22906
+ */
22915
22907
  async function uploadInlineKnowledgeSourceWithFallback(inlineSource, uploader) {
22916
22908
  try {
22917
22909
  return await uploader(inlineSource);
@@ -22924,6 +22916,9 @@
22924
22916
  return inlineKnowledgeSourceToDataUrl(inlineSource);
22925
22917
  }
22926
22918
  }
22919
+ /**
22920
+ * Extracts inline knowledge sources.
22921
+ */
22927
22922
  function extractInlineKnowledgeSources(metadata) {
22928
22923
  if (!metadata) {
22929
22924
  return [];
@@ -22931,6 +22926,9 @@
22931
22926
  const value = metadata.inlineKnowledgeSources;
22932
22927
  return Array.isArray(value) ? value : [];
22933
22928
  }
22929
+ /**
22930
+ * Strips inline knowledge metadata.
22931
+ */
22934
22932
  function stripInlineKnowledgeMetadata(metadata) {
22935
22933
  if (!metadata || !Object.prototype.hasOwnProperty.call(metadata, 'inlineKnowledgeSources')) {
22936
22934
  return metadata;
@@ -22981,6 +22979,7 @@
22981
22979
  * @param availableModels - Models that could fulfill the agent.
22982
22980
  * @param llmTools - Execution tools used when selecting a best model.
22983
22981
  * @param options - Optional hooks such as the agent reference resolver.
22982
+ *
22984
22983
  * @public exported from `@promptbook/core`
22985
22984
  */
22986
22985
  async function createAgentModelRequirements(agentSource, modelName, availableModels, llmTools, options) {
@@ -23000,6 +22999,7 @@
23000
22999
  * @param agentSource The agent source to derive persona description from
23001
23000
  * @param llmTools LLM tools for preparing persona
23002
23001
  * @returns The name of the best selected model
23002
+ *
23003
23003
  * @private function of `createAgentModelRequirements`
23004
23004
  */
23005
23005
  async function selectBestModelUsingPersona(agentSource, llmTools) {
@@ -23135,6 +23135,7 @@
23135
23135
  *
23136
23136
  * @param {unknown} rawAttachments - The raw attachments to normalize.
23137
23137
  * @returns {Array<ChatAttachment>} The normalized attachments.
23138
+ *
23138
23139
  * @public exported from `@promptbook/core`
23139
23140
  */
23140
23141
  function normalizeChatAttachments(rawAttachments) {
@@ -23179,6 +23180,7 @@
23179
23180
  *
23180
23181
  * @param {ReadonlyArray<ChatAttachment>} attachments - The attachments to format.
23181
23182
  * @returns {string} The formatted context.
23183
+ *
23182
23184
  * @public exported from `@promptbook/core`
23183
23185
  */
23184
23186
  function formatChatAttachmentContext(attachments) {
@@ -23199,6 +23201,7 @@
23199
23201
  * @param {number} maxBytes - Maximum number of bytes to capture.
23200
23202
  * @param {{ captureOverflowByte?: boolean }} [options] - Optional capture behavior.
23201
23203
  * @returns {Promise<{ bytes: Uint8Array }>} Captured bytes, optionally including one overflow byte.
23204
+ *
23202
23205
  * @private internal utility for bounded response reads
23203
23206
  */
23204
23207
  async function readResponseBytes(response, maxBytes, options = {}) {
@@ -23295,6 +23298,7 @@
23295
23298
  * @param {number} maxInlineCharacters - Maximum number of characters to inline.
23296
23299
  * @param {ResolveChatAttachmentOptions} options - Options for resolution.
23297
23300
  * @returns {Promise<ResolvedChatAttachmentContent>} The resolved content.
23301
+ *
23298
23302
  * @private function of resolveChatAttachmentContents
23299
23303
  */
23300
23304
  async function resolveChatAttachmentContent(attachment, maxInlineCharacters, options = {}) {
@@ -23386,6 +23390,7 @@
23386
23390
  * @param {ReadonlyArray<ChatAttachment>} attachments - The attachments to resolve.
23387
23391
  * @param {ResolveChatAttachmentOptions} options - Options for resolution.
23388
23392
  * @returns {Promise<Array<ResolvedChatAttachmentContent>>} The resolved contents.
23393
+ *
23389
23394
  * @public exported from `@promptbook/core`
23390
23395
  */
23391
23396
  async function resolveChatAttachmentContents(attachments, options = {}) {
@@ -23451,6 +23456,7 @@
23451
23456
  *
23452
23457
  * @param {ReadonlyArray<ResolvedChatAttachmentContent>} resolvedContents - The resolved contents to format.
23453
23458
  * @returns {string} The formatted context.
23459
+ *
23454
23460
  * @public exported from `@promptbook/core`
23455
23461
  */
23456
23462
  function formatChatAttachmentContentContext(resolvedContents) {
@@ -23491,6 +23497,7 @@
23491
23497
  * @param {ReadonlyArray<ChatAttachment>} attachments - The attachments to append.
23492
23498
  * @param {ResolveChatAttachmentOptions} options - Options for resolution.
23493
23499
  * @returns {Promise<string>} The updated message content.
23500
+ *
23494
23501
  * @public exported from `@promptbook/core`
23495
23502
  */
23496
23503
  async function appendChatAttachmentContextWithContent(messageContent, attachments, options = {}) {
@@ -23519,9 +23526,7 @@
23519
23526
  function humanizeAiTextEllipsis(aiText) {
23520
23527
  return aiText.replace(/[…⋯]/g, '...').replace(/\.\s+\.\s+\./g, '...');
23521
23528
  }
23522
- /**
23523
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23524
- */
23529
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23525
23530
 
23526
23531
  /**
23527
23532
  * Change dash-like characters to regular dashes `—` -> `-` and remove soft hyphens
@@ -23534,9 +23539,7 @@
23534
23539
  function humanizeAiTextEmdashed(aiText) {
23535
23540
  return aiText.replace(/\u00AD/g, '').replace(/[‐‑‒–—―−⁃﹣-]/g, '-');
23536
23541
  }
23537
- /**
23538
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23539
- */
23542
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23540
23543
 
23541
23544
  /**
23542
23545
  * Change smart quotes to regular quotes
@@ -23549,9 +23552,7 @@
23549
23552
  function humanizeAiTextQuotes(aiText) {
23550
23553
  return aiText.replace(/[“”„‟«»❝❞〝〞〟"]/g, '"').replace(/[‚‘’‛‹›❛❜'ʼ]/g, "'");
23551
23554
  }
23552
- /**
23553
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23554
- */
23555
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23555
23556
 
23556
23557
  /**
23557
23558
  * Remove bracketed source citation artifacts like `\u30105:1\u2020source\u3011`.
@@ -23564,9 +23565,7 @@
23564
23565
  function humanizeAiTextSources(aiText) {
23565
23566
  return aiText.replace(/[ \t]*\u3010\s*\d+(?:\s*:\s*\d+)?\s*\u2020source\s*\u3011/g, '');
23566
23567
  }
23567
- /**
23568
- * Note: [??] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23569
- */
23568
+ // Note: [??] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23570
23569
 
23571
23570
  /**
23572
23571
  * Change unprintable hard spaces to regular spaces and drop zero-width spaces
@@ -23579,9 +23578,7 @@
23579
23578
  function humanizeAiTextWhitespace(aiText) {
23580
23579
  return aiText.replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g, ' ').replace(/[\u200B\uFEFF\u2060]/g, '');
23581
23580
  }
23582
- /**
23583
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23584
- */
23581
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
23585
23582
 
23586
23583
  /**
23587
23584
  * Function `humanizeAiText` will remove traces of AI text generation artifacts
@@ -23600,11 +23597,11 @@
23600
23597
  cleanedText = humanizeAiTextWhitespace(cleanedText);
23601
23598
  return cleanedText;
23602
23599
  }
23603
- /**
23604
- * TODO: [🧠] Maybe this should be exported from `@promptbook/utils` not `@promptbook/markdown-utils`
23605
- */
23600
+ // TODO: [🧠] Maybe this should be exported from `@promptbook/utils` not `@promptbook/markdown-utils`
23606
23601
 
23607
23602
  /**
23603
+ * Map of promptbook pseudotoken substitution.
23604
+ *
23608
23605
  * @private
23609
23606
  */
23610
23607
  const PROMPTBOOK_PSEUDOTOKEN_SUBSTITUTION = {
@@ -23652,9 +23649,7 @@
23652
23649
  }
23653
23650
  return promptbookifiedTextTokens.join('');
23654
23651
  }
23655
- /**
23656
- * TODO: [🧠][✌️] Make some Promptbook-native token system
23657
- */
23652
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
23658
23653
 
23659
23654
  /**
23660
23655
  * Make UncertainNumber
@@ -23710,6 +23705,7 @@
23710
23705
  *
23711
23706
  * @see https://platform.openai.com/docs/models/
23712
23707
  * @see https://openai.com/api/pricing/
23708
+ *
23713
23709
  * @public exported from `@promptbook/openai`
23714
23710
  */
23715
23711
  const OPENAI_MODELS = exportJson({
@@ -24386,6 +24382,7 @@
24386
24382
  * @param rawResponse The raw response from OpenAI API
24387
24383
  * @param duration The duration of the execution
24388
24384
  * @throws {PipelineExecutionError} If the usage is not defined in the response from OpenAI
24385
+ *
24389
24386
  * @private internal utility of `OpenAiExecutionTools`
24390
24387
  */
24391
24388
  function computeOpenAiUsage(promptContent, // <- Note: Intentionally using [] to access type properties to bring jsdoc from Prompt/PromptResult to consumer
@@ -24428,15 +24425,14 @@
24428
24425
  },
24429
24426
  };
24430
24427
  }
24431
- /**
24432
- * TODO: [🤝] DRY Maybe some common abstraction between `computeOpenAiUsage` and `computeAnthropicClaudeUsage`
24433
- */
24428
+ // TODO: [🤝] DRY Maybe some common abstraction between `computeOpenAiUsage` and `computeAnthropicClaudeUsage`
24434
24429
 
24435
24430
  /**
24436
24431
  * Parses an OpenAI error message to identify which parameter is unsupported
24437
24432
  *
24438
24433
  * @param errorMessage The error message from OpenAI API
24439
24434
  * @returns The parameter name that is unsupported, or null if not an unsupported parameter error
24435
+ *
24440
24436
  * @private utility of LLM Tools
24441
24437
  */
24442
24438
  function parseUnsupportedParameterError(errorMessage) {
@@ -24458,6 +24454,7 @@
24458
24454
  * @param modelRequirements Original model requirements
24459
24455
  * @param unsupportedParameter The parameter to remove
24460
24456
  * @returns New model requirements without the unsupported parameter
24457
+ *
24461
24458
  * @private utility of LLM Tools
24462
24459
  */
24463
24460
  function removeUnsupportedModelRequirement(modelRequirements, unsupportedParameter) {
@@ -24477,8 +24474,10 @@
24477
24474
  }
24478
24475
  /**
24479
24476
  * Checks if an error is an "Unsupported value" error from OpenAI
24477
+ *
24480
24478
  * @param error The error to check
24481
24479
  * @returns true if this is an unsupported parameter error
24480
+ *
24482
24481
  * @private utility of LLM Tools
24483
24482
  */
24484
24483
  function isUnsupportedParameterError(error) {
@@ -25584,13 +25583,11 @@
25584
25583
  return false;
25585
25584
  }
25586
25585
  }
25587
- /**
25588
- * TODO: [🛄] Some way how to re-wrap the errors from `OpenAiCompatibleExecutionTools`
25589
- * TODO: [🛄] Maybe make custom `OpenAiCompatibleError`
25590
- * TODO: [🧠][🈁] Maybe use `isDeterministic` from options
25591
- * TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
25592
- * TODO: [🧠][🦢] Make reverse adapter from LlmExecutionTools to OpenAI-compatible:
25593
- */
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:
25594
25591
 
25595
25592
  /**
25596
25593
  * Profile for OpenAI provider
@@ -25658,9 +25655,21 @@
25658
25655
  }
25659
25656
  }
25660
25657
 
25658
+ /**
25659
+ * Constant for default knowledge source download timeout ms.
25660
+ */
25661
25661
  const DEFAULT_KNOWLEDGE_SOURCE_DOWNLOAD_TIMEOUT_MS = 30000;
25662
+ /**
25663
+ * Constant for default knowledge source upload timeout ms.
25664
+ */
25662
25665
  const DEFAULT_KNOWLEDGE_SOURCE_UPLOAD_TIMEOUT_MS = 900000;
25666
+ /**
25667
+ * Constant for vector store progress log interval min ms.
25668
+ */
25663
25669
  const VECTOR_STORE_PROGRESS_LOG_INTERVAL_MIN_MS = 15000;
25670
+ /**
25671
+ * Constant for vector store stall log threshold ms.
25672
+ */
25664
25673
  const VECTOR_STORE_STALL_LOG_THRESHOLD_MS = 30000;
25665
25674
  /**
25666
25675
  * Base class for OpenAI execution tools that need hosted vector stores.
@@ -26427,6 +26436,9 @@
26427
26436
  }
26428
26437
  }
26429
26438
 
26439
+ /**
26440
+ * Constant for default agent kit model name.
26441
+ */
26430
26442
  const DEFAULT_AGENT_KIT_MODEL_NAME = 'gpt-5.4-nano';
26431
26443
  /**
26432
26444
  * Creates one structured log entry for streamed tool-call updates.
@@ -26470,6 +26482,9 @@
26470
26482
  }
26471
26483
  return 'COMPLETE';
26472
26484
  }
26485
+ /**
26486
+ * Constant for default JSON schema name.
26487
+ */
26473
26488
  const DEFAULT_JSON_SCHEMA_NAME = 'StructuredOutput';
26474
26489
  /**
26475
26490
  * File extensions considered image inputs when MIME type is missing or generic.
@@ -26625,6 +26640,7 @@
26625
26640
  *
26626
26641
  * @param responseFormat - The OpenAI `response_format` payload from the user request.
26627
26642
  * @returns An Agent output type compatible with the requested schema or `undefined` when no impact is required.
26643
+ *
26628
26644
  * @private utility of Open AI
26629
26645
  */
26630
26646
  function mapResponseFormatToAgentOutputType(responseFormat) {
@@ -27383,6 +27399,7 @@
27383
27399
  * - `RemoteAgent` - which is an `Agent` that connects to a Promptbook Agents Server
27384
27400
  *
27385
27401
  * @deprecated Use `OpenAiAgentKitExecutionTools` instead.
27402
+ *
27386
27403
  * @public exported from `@promptbook/openai`
27387
27404
  */
27388
27405
  class OpenAiAssistantExecutionTools extends OpenAiVectorStoreHandler {
@@ -28074,14 +28091,12 @@
28074
28091
  * @private const of `OpenAiAssistantExecutionTools`
28075
28092
  */
28076
28093
  const DISCRIMINANT = 'OPEN_AI_ASSISTANT_V1';
28077
- /**
28078
- * TODO: !!!!! [✨🥚] Knowledge should work both with and without scrapers
28079
- * TODO: [🙎] In `OpenAiAssistantExecutionTools` Allow to create abstract assistants with `isCreatingNewAssistantsAllowed`
28080
- * TODO: [🧠][🧙‍♂️] Maybe there can be some wizard for those who want to use just OpenAI
28081
- * TODO: Maybe make custom OpenAiError
28082
- * TODO: [🧠][🈁] Maybe use `isDeterministic` from options
28083
- * TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
28084
- */
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
28085
28100
 
28086
28101
  /**
28087
28102
  * Emits a progress update to signal assistant preparation before long setup work.
@@ -28558,10 +28573,8 @@
28558
28573
  * Cache of OpenAI vector stores to avoid creating duplicates
28559
28574
  */
28560
28575
  AgentLlmExecutionTools.vectorStoreCache = new Map();
28561
- /**
28562
- * TODO: [🍚] Implement Destroyable pattern to free resources
28563
- * TODO: [🧠] Adding parameter substitution support (here or should be responsibility of the underlying LLM Tools)
28564
- */
28576
+ // TODO: [🍚] Implement Destroyable pattern to free resources
28577
+ // TODO: [🧠] Adding parameter substitution support (here or should be responsibility of the underlying LLM Tools)
28565
28578
 
28566
28579
  /**
28567
28580
  * Extracts the teacher-focused instructions from the latest `OPEN` commitment in the book.
@@ -28571,6 +28584,7 @@
28571
28584
  *
28572
28585
  * @param agentSource - The raw agent book source
28573
28586
  * @returns The trimmed instructions or `null` when no instructive `OPEN` commitment exists.
28587
+ *
28574
28588
  * @private Internal helper shared between self-learning and related features.
28575
28589
  */
28576
28590
  function extractOpenTeacherInstructions(agentSource) {
@@ -28778,6 +28792,7 @@
28778
28792
  *
28779
28793
  * @param section Raw fragment from self-learning workflow.
28780
28794
  * @returns Trimmed fragment, or empty string when nothing remains.
28795
+ *
28781
28796
  * @private function of Agent
28782
28797
  */
28783
28798
  function normalizeBookSection(section) {
@@ -28789,6 +28804,7 @@
28789
28804
  * @param agentSource Current source.
28790
28805
  * @param normalizedSection Candidate fragment expected to be normalized first.
28791
28806
  * @returns True when appending would duplicate an existing fragment.
28807
+ *
28792
28808
  * @private function of Agent
28793
28809
  */
28794
28810
  function containsNormalizedBookSection(agentSource, normalizedSection) {
@@ -28803,6 +28819,7 @@
28803
28819
  *
28804
28820
  * @param responseFormat Prompt response format requirements
28805
28821
  * @returns True when JSON schema mode is active
28822
+ *
28806
28823
  * @private function of Agent
28807
28824
  */
28808
28825
  function isJsonSchemaResponseFormat(responseFormat) {
@@ -28814,6 +28831,7 @@
28814
28831
  * @param content Original agent answer content
28815
28832
  * @param isJsonMode Whether the interaction requested JSON schema output
28816
28833
  * @returns Agent answer, wrapped in a formatted JSON code block when possible
28834
+ *
28817
28835
  * @private function of Agent
28818
28836
  */
28819
28837
  function formatAgentMessageForJsonMode(content, isJsonMode) {
@@ -28839,6 +28857,7 @@
28839
28857
  *
28840
28858
  * @param content Text to parse as JSON
28841
28859
  * @returns Parsed JSON value or null when parsing fails
28860
+ *
28842
28861
  * @private function of Agent
28843
28862
  */
28844
28863
  function tryParseJson(content) {
@@ -28854,6 +28873,7 @@
28854
28873
  *
28855
28874
  * @param options - Normalized sample parts.
28856
28875
  * @returns Book-language sample section ready to append into agent source.
28876
+ *
28857
28877
  * @private function of Agent
28858
28878
  */
28859
28879
  function formatSelfLearningSample(options) {
@@ -28875,6 +28895,7 @@
28875
28895
  *
28876
28896
  * @param internalMessage Internal trace payload.
28877
28897
  * @returns Book-language INTERNAL MESSAGE block.
28898
+ *
28878
28899
  * @private function of Agent
28879
28900
  */
28880
28901
  function formatInternalLearningMessage(internalMessage) {
@@ -28888,6 +28909,7 @@
28888
28909
  *
28889
28910
  * @param result Final chat result used in self-learning.
28890
28911
  * @returns Internal payloads that capture request/response/tool-call context.
28912
+ *
28891
28913
  * @private function of Agent
28892
28914
  */
28893
28915
  function buildInternalLearningMessages(result) {
@@ -28917,6 +28939,7 @@
28917
28939
  *
28918
28940
  * @param toolCall Tool call produced during execution.
28919
28941
  * @returns Sanitized and serializable tool-call payload.
28942
+ *
28920
28943
  * @private function of Agent
28921
28944
  */
28922
28945
  function sanitizeToolCallForLearning(toolCall) {
@@ -28936,6 +28959,7 @@
28936
28959
  *
28937
28960
  * @param payload Internal payload to serialize.
28938
28961
  * @returns Pretty JSON string that can be embedded in BOOK.
28962
+ *
28939
28963
  * @private function of Agent
28940
28964
  */
28941
28965
  function stringifyInternalLearningPayload(payload) {
@@ -28985,6 +29009,7 @@
28985
29009
  * Normalizes teacher commitments into trimmed, display-ready lines.
28986
29010
  *
28987
29011
  * @param commitments Raw teacher output
29012
+ *
28988
29013
  * @private function of Agent
28989
29014
  */
28990
29015
  function getTeacherCommitmentLines(commitments) {
@@ -28997,6 +29022,7 @@
28997
29022
  * Summarizes teacher commitment lines into user-friendly counts for self-learning.
28998
29023
  *
28999
29024
  * @param lines Parsed teacher commitment lines
29025
+ *
29000
29026
  * @private function of Agent
29001
29027
  */
29002
29028
  function summarizeTeacherCommitmentLines(lines) {
@@ -29029,6 +29055,7 @@
29029
29055
  * @param commitments Raw teacher commitments
29030
29056
  * @param used Whether the teacher was invoked
29031
29057
  * @returns Summary of learned commitments
29058
+ *
29032
29059
  * @private function of Agent
29033
29060
  */
29034
29061
  function buildTeacherSummary(commitments, used) {
@@ -29265,9 +29292,7 @@
29265
29292
  return finalResult;
29266
29293
  }
29267
29294
  }
29268
- /**
29269
- * TODO: [🧠][😰]Agent is not working with the parameters, should it be?
29270
- */
29295
+ // TODO: [🧠][😰]Agent is not working with the parameters, should it be?
29271
29296
 
29272
29297
  /**
29273
29298
  * Parses one failed remote agent response into a structured error.
@@ -29733,10 +29758,8 @@
29733
29758
  return agentResult;
29734
29759
  }
29735
29760
  }
29736
- /**
29737
- * TODO: [🧠][😰]Agent is not working with the parameters, should it be?
29738
- * TODO: !!! Agent on remote server
29739
- */
29761
+ // TODO: [🧠][😰]Agent is not working with the parameters, should it be?
29762
+ // TODO: !!! Agent on remote server
29740
29763
 
29741
29764
  var RemoteAgent$1 = /*#__PURE__*/Object.freeze({
29742
29765
  __proto__: null,