@promptbook/remote-server 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 +710 -668
  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 +710 -668
  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/esm/index.es.js CHANGED
@@ -40,7 +40,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
40
40
  * @generated
41
41
  * @see https://github.com/webgptorg/promptbook
42
42
  */
43
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-34';
43
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-35';
44
44
  /**
45
45
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
46
46
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -50,16 +50,20 @@ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-34';
50
50
  * Trims string from all 4 sides
51
51
  *
52
52
  * Note: This is a re-exported function from the `spacetrim` package which is
53
- * Developed by same author @hejny as this package
53
+ * Developed by same author @hejny as this package
54
54
  *
55
- * @public exported from `@promptbook/utils`
56
55
  * @see https://github.com/hejny/spacetrim#usage
56
+ *
57
+ * @public exported from `@promptbook/utils`
57
58
  */
58
59
  const spaceTrim = spaceTrim$1;
59
60
 
60
61
  /**
61
- * @private util of `@promptbook/color`
62
+ * Class implementing take chain.
63
+ *
62
64
  * @de
65
+ *
66
+ * @private util of `@promptbook/color`
63
67
  */
64
68
  class TakeChain {
65
69
  constructor(value) {
@@ -76,9 +80,9 @@ class TakeChain {
76
80
  *
77
81
  * @param {*} initialValue - The initial value.
78
82
  * @returns {Proxy<WithTake<TValue>>} - A proxy object with a `take` method.
83
+ * @deprecated [🤡] Use some better functional library instead of `TakeChain`
79
84
  *
80
85
  * @private util of `@promptbook/color`
81
- * @deprecated [🤡] Use some better functional library instead of `TakeChain`
82
86
  */
83
87
  function take(initialValue) {
84
88
  if (initialValue instanceof TakeChain) {
@@ -256,9 +260,7 @@ const CSS_COLORS = {
256
260
  yellow: '#ffff00',
257
261
  yellowgreen: '#9acd32',
258
262
  };
259
- /**
260
- * Note: [💞] Ignore a discrepancy between file name and entity name
261
- */
263
+ // Note: [💞] Ignore a discrepancy between file name and entity name
262
264
 
263
265
  /**
264
266
  * Validates that a channel value is a valid number within the range of 0 to 255.
@@ -288,7 +290,13 @@ function checkChannelValue(channelName, value) {
288
290
  }
289
291
  }
290
292
 
293
+ /**
294
+ * Constant for short hex lengths.
295
+ */
291
296
  const SHORT_HEX_LENGTHS = new Set([3, 4]);
297
+ /**
298
+ * Constant for long hex lengths.
299
+ */
292
300
  const LONG_HEX_LENGTHS = new Set([6, 8]);
293
301
  /**
294
302
  * Parses a hex string into RGBA channel values.
@@ -321,6 +329,9 @@ function parseHexColor(hex) {
321
329
  }
322
330
  return throwInvalidHex();
323
331
  }
332
+ /**
333
+ * Parses short hex channel.
334
+ */
324
335
  function parseShortHexChannel(char, onError) {
325
336
  if (!char) {
326
337
  return onError();
@@ -331,6 +342,9 @@ function parseShortHexChannel(char, onError) {
331
342
  }
332
343
  return parsed * 16;
333
344
  }
345
+ /**
346
+ * Parses long hex channel.
347
+ */
334
348
  function parseLongHexChannel(hex, start, onError) {
335
349
  const segment = hex.substr(start, 2);
336
350
  if (segment.length < 2) {
@@ -343,6 +357,9 @@ function parseLongHexChannel(hex, start, onError) {
343
357
  return parsed;
344
358
  }
345
359
 
360
+ /**
361
+ * Pattern matching hsl.
362
+ */
346
363
  const HSL_REGEX = /^hsl\(\s*([0-9.]+)\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/;
347
364
  /**
348
365
  * Parses an HSL string into RGBA channel values.
@@ -368,6 +385,9 @@ function parseHslColor(hsl) {
368
385
  alpha: 255,
369
386
  };
370
387
  }
388
+ /**
389
+ * Handles convert hsl to Rgb.
390
+ */
371
391
  function convertHslToRgb(h, s, l) {
372
392
  const c = (1 - Math.abs(2 * l - 1)) * s;
373
393
  const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
@@ -406,7 +426,13 @@ function convertHslToRgb(h, s, l) {
406
426
  };
407
427
  }
408
428
 
429
+ /**
430
+ * Pattern matching RGB.
431
+ */
409
432
  const RGB_REGEX = /^rgb\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
433
+ /**
434
+ * Pattern matching rgba.
435
+ */
410
436
  const RGBA_REGEX = /^rgba\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
411
437
  /**
412
438
  * Parses an RGB string into RGBA channel values.
@@ -448,6 +474,9 @@ function parseRgbaColor(rgba) {
448
474
  alpha: parseAlphaValue(match[4]),
449
475
  };
450
476
  }
477
+ /**
478
+ * Parses channel value.
479
+ */
451
480
  function parseChannelValue(value) {
452
481
  if (value.endsWith('%')) {
453
482
  const percent = parseFloat(value);
@@ -455,6 +484,9 @@ function parseChannelValue(value) {
455
484
  }
456
485
  return Math.round(parseFloat(value));
457
486
  }
487
+ /**
488
+ * Parses alpha value.
489
+ */
458
490
  function parseAlphaValue(value) {
459
491
  if (value.endsWith('%')) {
460
492
  const percent = parseFloat(value);
@@ -467,8 +499,17 @@ function parseAlphaValue(value) {
467
499
  return Math.round(parsed);
468
500
  }
469
501
 
502
+ /**
503
+ * Pattern matching hsl regex.
504
+ */
470
505
  const HSL_REGEX_PATTERN = /^hsl\(\s*([0-9.]+)\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/;
506
+ /**
507
+ * Pattern matching RGB regex.
508
+ */
471
509
  const RGB_REGEX_PATTERN = /^rgb\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
510
+ /**
511
+ * Pattern matching rgba regex.
512
+ */
472
513
  const RGBA_REGEX_PATTERN = /^rgba\(\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*,\s*([0-9.%-]+)\s*\)$/;
473
514
  /**
474
515
  * Color object represents an RGB color with alpha channel
@@ -834,9 +875,7 @@ function hslToRgb(hue, saturation, lightness) {
834
875
  }
835
876
  return [Math.round(red * 255), Math.round(green * 255), Math.round(blue * 255)];
836
877
  }
837
- /**
838
- * TODO: Properly name all used internal variables
839
- */
878
+ // TODO: Properly name all used internal variables
840
879
 
841
880
  /**
842
881
  * Converts RGB values to HSL values
@@ -882,9 +921,7 @@ function rgbToHsl(red, green, blue) {
882
921
  }
883
922
  return [hue, saturation, lightness];
884
923
  }
885
- /**
886
- * TODO: Properly name all used internal variables
887
- */
924
+ // TODO: Properly name all used internal variables
888
925
 
889
926
  /**
890
927
  * Makes color transformer which lighten the given color
@@ -902,9 +939,7 @@ function lighten(amount) {
902
939
  return Color.fromValues(r, g, b, alpha);
903
940
  };
904
941
  }
905
- /**
906
- * TODO: Maybe implement by mix+hsl
907
- */
942
+ // TODO: Maybe implement by mix+hsl
908
943
 
909
944
  /**
910
945
  * Makes color transformer which saturate the given color
@@ -922,9 +957,7 @@ function saturate(amount) {
922
957
  return Color.fromValues(r, g, b, alpha);
923
958
  };
924
959
  }
925
- /**
926
- * TODO: Maybe implement by mix+hsl
927
- */
960
+ // TODO: Maybe implement by mix+hsl
928
961
 
929
962
  /**
930
963
  * Returns the same value that is passed as argument.
@@ -937,6 +970,7 @@ function saturate(amount) {
937
970
  *
938
971
  * @param value any values
939
972
  * @returns the same values
973
+ *
940
974
  * @private within the repository
941
975
  */
942
976
  function just(value) {
@@ -1219,9 +1253,7 @@ function $isRunningInNode() {
1219
1253
  return false;
1220
1254
  }
1221
1255
  }
1222
- /**
1223
- * TODO: [🎺]
1224
- */
1256
+ // TODO: [🎺]
1225
1257
 
1226
1258
  /**
1227
1259
  * Normalize options for `execCommand` and `execCommands`
@@ -1289,7 +1321,6 @@ function $execCommandNormalizeOptions(options) {
1289
1321
  /**
1290
1322
  * Run one command in a shell
1291
1323
  *
1292
- *
1293
1324
  * Note: There are 2 similar functions in the codebase:
1294
1325
  * - `$execCommand` which runs a single command
1295
1326
  * - `$execCommands` which runs multiple commands
@@ -1388,7 +1419,7 @@ function $execCommand(options) {
1388
1419
  }
1389
1420
  });
1390
1421
  }
1391
- /** Note: [🟢] Code for Node command-execution helper [$execCommand](src/utils/execCommand/$execCommand.ts) should never be published into packages that could be imported into browser environment */
1422
+ // Note: [🟢] Code for Node command-execution helper [$execCommand](src/utils/execCommand/$execCommand.ts) should never be published into packages that could be imported into browser environment
1392
1423
 
1393
1424
  /**
1394
1425
  * [🐱‍🚀]
@@ -1397,9 +1428,11 @@ function $execCommand(options) {
1397
1428
  * You can simply use `RemoteExecutionTools` on client-side javascript and connect to your remote server.
1398
1429
  * This is useful to make all logic on browser side but not expose your API keys or no need to use customer's GPU.
1399
1430
  *
1431
+ * TODO: [🐱‍🚀] Change to `@promptbook/agent-server`
1432
+ *
1400
1433
  * @see https://github.com/webgptorg/promptbook#remote-server
1434
+ *
1401
1435
  * @public exported from `@promptbook/remote-server`
1402
- * <- TODO: [🐱‍🚀] Change to `@promptbook/agent-server`
1403
1436
  */
1404
1437
  async function startAgentServer(options) {
1405
1438
  const { port = 4440 } = options;
@@ -1415,7 +1448,7 @@ async function startAgentServer(options) {
1415
1448
  isVerbose: true,
1416
1449
  });
1417
1450
  }
1418
- /** Note: [🟢] Code for Node server bootstrap [startAgentServer](src/remote-server/startAgentServer.ts) should never be published into packages that could be imported into browser environment */
1451
+ // Note: [🟢] Code for Node server bootstrap [startAgentServer](src/remote-server/startAgentServer.ts) should never be published into packages that could be imported into browser environment
1419
1452
 
1420
1453
  /**
1421
1454
  * Make error report URL for the given error
@@ -1552,16 +1585,15 @@ class AuthenticationError extends Error {
1552
1585
  * Note: `$` is used to indicate that this function is not a pure function - it is not deterministic
1553
1586
  * Note: This function is cryptographically secure (it uses crypto.randomBytes internally)
1554
1587
  *
1555
- * @private internal helper function
1556
1588
  * @returns secure random token
1589
+ *
1590
+ * @private internal helper function
1557
1591
  */
1558
1592
  function $randomToken(randomness) {
1559
1593
  return randomBytes(randomness).toString('hex');
1560
1594
  }
1561
- /**
1562
- * TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
1563
- * TODO: Maybe use nanoid instead https://github.com/ai/nanoid
1564
- */
1595
+ // TODO: [🤶] Maybe export through `@promptbook/utils` or `@promptbook/random` package
1596
+ // TODO: Maybe use nanoid instead https://github.com/ai/nanoid
1565
1597
 
1566
1598
  /**
1567
1599
  * This error indicates errors during the execution of the pipeline
@@ -1578,9 +1610,7 @@ class PipelineExecutionError extends Error {
1578
1610
  Object.setPrototypeOf(this, PipelineExecutionError.prototype);
1579
1611
  }
1580
1612
  }
1581
- /**
1582
- * TODO: [🧠][🌂] Add id to all errors
1583
- */
1613
+ // TODO: [🧠][🌂] Add id to all errors
1584
1614
 
1585
1615
  /**
1586
1616
  * This error indicates problems parsing the format value
@@ -1650,17 +1680,16 @@ class DatabaseError extends Error {
1650
1680
  Object.setPrototypeOf(this, DatabaseError.prototype);
1651
1681
  }
1652
1682
  }
1653
- /**
1654
- * TODO: [🐱‍🚀] Explain that NotFoundError ([🐱‍🚀] and other specific errors) has priority over DatabaseError in some contexts
1655
- */
1683
+ // TODO: [🐱‍🚀] Explain that NotFoundError ([🐱‍🚀] and other specific errors) has priority over DatabaseError in some contexts
1656
1684
 
1657
1685
  /**
1658
1686
  * This error occurs when some expectation is not met in the execution of the pipeline
1659
1687
  *
1660
- * @public exported from `@promptbook/core`
1661
1688
  * Note: Do not throw this error, its reserved for `checkExpectations` and `createPipelineExecutor` and public ONLY to be serializable through remote server
1662
1689
  * Note: Always thrown in `checkExpectations` and catched in `createPipelineExecutor` and rethrown as `PipelineExecutionError`
1663
1690
  * Note: This is a kindof subtype of PipelineExecutionError
1691
+ *
1692
+ * @public exported from `@promptbook/core`
1664
1693
  */
1665
1694
  class ExpectError extends Error {
1666
1695
  constructor(message) {
@@ -1775,9 +1804,7 @@ class ParseError extends Error {
1775
1804
  Object.setPrototypeOf(this, ParseError.prototype);
1776
1805
  }
1777
1806
  }
1778
- /**
1779
- * TODO: Maybe split `ParseError` and `ApplyError`
1780
- */
1807
+ // TODO: Maybe split `ParseError` and `ApplyError`
1781
1808
 
1782
1809
  /**
1783
1810
  * This error indicates that the promptbook object has valid syntax (=can be parsed) but contains logical errors (like circular dependencies)
@@ -1879,9 +1906,7 @@ const ALL_ERRORS = {
1879
1906
  ...PROMPTBOOK_ERRORS,
1880
1907
  ...COMMON_JAVASCRIPT_ERRORS,
1881
1908
  };
1882
- /**
1883
- * Note: [💞] Ignore a discrepancy between file name and entity name
1884
- */
1909
+ // Note: [💞] Ignore a discrepancy between file name and entity name
1885
1910
 
1886
1911
  /**
1887
1912
  * Serializes an error into a [🚉] JSON-serializable object
@@ -1928,8 +1953,8 @@ async function locateAppOnLinux({ linuxWhich, }) {
1928
1953
  return null;
1929
1954
  }
1930
1955
  }
1931
- /** Note: [🟢] Code for Node executable locator [locateAppOnLinux](src/executables/platforms/locateAppOnLinux.ts) should never be published into packages that could be imported into browser environment */
1932
- /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
1956
+ // Note: [🟢] Code for Node executable locator [locateAppOnLinux](src/executables/platforms/locateAppOnLinux.ts) should never be published into packages that could be imported into browser environment
1957
+ // TODO: [🧠][♿] Maybe export through `@promptbook/node`
1933
1958
 
1934
1959
  /**
1935
1960
  * Provides filesystem access (for example for Node.js-based scrapers)
@@ -1952,8 +1977,8 @@ function $provideFilesystemForNode(options) {
1952
1977
  watch,
1953
1978
  };
1954
1979
  }
1955
- /** Note: [🟢] Code for Node scraper registration helper [$provideFilesystemForNode](src/scrapers/_common/register/$provideFilesystemForNode.ts) should never be published into packages that could be imported into browser environment */
1956
- /** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
1980
+ // Note: [🟢] Code for Node scraper registration helper [$provideFilesystemForNode](src/scrapers/_common/register/$provideFilesystemForNode.ts) should never be published into packages that could be imported into browser environment
1981
+ // TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
1957
1982
 
1958
1983
  /**
1959
1984
  * Checks if the file is executable
@@ -1969,15 +1994,15 @@ async function isExecutable(path, fs) {
1969
1994
  return false;
1970
1995
  }
1971
1996
  }
1972
- /**
1973
- * Note: Not [~🟢~] because it is not directly dependent on `fs
1974
- * TODO: [🖇] What about symlinks?
1975
- */
1997
+ // Note: Not [~🟢~] because it is not directly dependent on `fs
1998
+ // TODO: [🖇] What about symlinks?
1976
1999
 
1977
2000
  // Note: Module `userhome` has no types available, so it is imported using `require`
1978
2001
  // @see https://stackoverflow.com/questions/37000981/how-to-import-node-module-in-typescript-without-type-definitions
1979
- // eslint-disable-next-line @typescript-eslint/no-var-requires
1980
- const userhome = require('userhome');
2002
+ /**
2003
+ * Constant for userhome.
2004
+ */
2005
+ const userhome = require('userhome'); // eslint-disable-line @typescript-eslint/no-var-requires
1981
2006
  /**
1982
2007
  * Attempts to locate the specified application on a macOS system by checking standard application paths and using mdfind.
1983
2008
  * Returns the path to the executable if found, or null otherwise.
@@ -2006,8 +2031,8 @@ async function locateAppOnMacOs({ macOsName, }) {
2006
2031
  return null;
2007
2032
  }
2008
2033
  }
2009
- /** Note: [🟢] Code for Node executable locator [locateAppOnMacOs](src/executables/platforms/locateAppOnMacOs.ts) should never be published into packages that could be imported into browser environment */
2010
- /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
2034
+ // Note: [🟢] Code for Node executable locator [locateAppOnMacOs](src/executables/platforms/locateAppOnMacOs.ts) should never be published into packages that could be imported into browser environment
2035
+ // TODO: [🧠][♿] Maybe export through `@promptbook/node`
2011
2036
 
2012
2037
  /**
2013
2038
  * Attempts to locate the specified application on a Windows system by searching common installation directories.
@@ -2036,8 +2061,8 @@ async function locateAppOnWindows({ appName, windowsSuffix, }) {
2036
2061
  return null;
2037
2062
  }
2038
2063
  }
2039
- /** Note: [🟢] Code for Node executable locator [locateAppOnWindows](src/executables/platforms/locateAppOnWindows.ts) should never be published into packages that could be imported into browser environment */
2040
- /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
2064
+ // Note: [🟢] Code for Node executable locator [locateAppOnWindows](src/executables/platforms/locateAppOnWindows.ts) should never be published into packages that could be imported into browser environment
2065
+ // TODO: [🧠][♿] Maybe export through `@promptbook/node`
2041
2066
 
2042
2067
  /**
2043
2068
  * Locates an application on the system
@@ -2074,8 +2099,8 @@ function locateApp(options) {
2074
2099
  }
2075
2100
  }
2076
2101
  }
2077
- /** Note: [🟢] Code for Node executable locator [locateApp](src/executables/locateApp.ts) should never be published into packages that could be imported into browser environment */
2078
- /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
2102
+ // Note: [🟢] Code for Node executable locator [locateApp](src/executables/locateApp.ts) should never be published into packages that could be imported into browser environment
2103
+ // TODO: [🧠][♿] Maybe export through `@promptbook/node`
2079
2104
 
2080
2105
  /**
2081
2106
  * Locates the LibreOffice executable on the current system by searching platform-specific paths.
@@ -2091,8 +2116,8 @@ function locateLibreoffice() {
2091
2116
  macOsName: 'LibreOffice',
2092
2117
  });
2093
2118
  }
2094
- /** Note: [🟢] Code for Node executable locator [locateLibreoffice](src/executables/apps/locateLibreoffice.ts) should never be published into packages that could be imported into browser environment */
2095
- /** TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/legacy-documents` */
2119
+ // Note: [🟢] Code for Node executable locator [locateLibreoffice](src/executables/apps/locateLibreoffice.ts) should never be published into packages that could be imported into browser environment
2120
+ // TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/legacy-documents`
2096
2121
 
2097
2122
  /**
2098
2123
  * Locates the Pandoc executable on the current system by searching platform-specific paths.
@@ -2108,8 +2133,8 @@ function locatePandoc() {
2108
2133
  macOsName: 'Pandoc',
2109
2134
  });
2110
2135
  }
2111
- /** Note: [🟢] Code for Node executable locator [locatePandoc](src/executables/apps/locatePandoc.ts) should never be published into packages that could be imported into browser environment */
2112
- /** TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/documents` */
2136
+ // Note: [🟢] Code for Node executable locator [locatePandoc](src/executables/apps/locatePandoc.ts) should never be published into packages that could be imported into browser environment
2137
+ // TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/documents`
2113
2138
 
2114
2139
  /**
2115
2140
  * Provides paths to required executables (i.e. as Pandoc and LibreOffice) for Node.js environments.
@@ -2126,16 +2151,15 @@ async function $provideExecutablesForNode(options) {
2126
2151
  // <- TODO: [🧠] `null` vs `undefined`
2127
2152
  };
2128
2153
  }
2129
- /** Note: [🟢] Code for Node executable locator [$provideExecutablesForNode](src/executables/$provideExecutablesForNode.ts) should never be published into packages that could be imported into browser environment */
2130
- /**
2131
- * TODO: [🧠] Allow to override the executables without need to call `locatePandoc` / `locateLibreoffice` in case of provided
2132
- * TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
2133
- */
2154
+ // Note: [🟢] Code for Node executable locator [$provideExecutablesForNode](src/executables/$provideExecutablesForNode.ts) should never be published into packages that could be imported into browser environment
2155
+ // TODO: [🧠] Allow to override the executables without need to call `locatePandoc` / `locateLibreoffice` in case of provided
2156
+ // TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
2134
2157
 
2135
2158
  /**
2136
2159
  * Orders JSON object by keys
2137
2160
  *
2138
2161
  * @returns The same type of object as the input re-ordered
2162
+ *
2139
2163
  * @public exported from `@promptbook/utils`
2140
2164
  */
2141
2165
  function orderJson(options) {
@@ -2154,6 +2178,7 @@ function orderJson(options) {
2154
2178
  * Note: This function mutates the object and returns the original (but mutated-deep-freezed) object
2155
2179
  *
2156
2180
  * @returns The same object as the input, but deeply frozen
2181
+ *
2157
2182
  * @public exported from `@promptbook/utils`
2158
2183
  */
2159
2184
  function $deepFreeze(objectValue) {
@@ -2170,9 +2195,7 @@ function $deepFreeze(objectValue) {
2170
2195
  Object.freeze(objectValue);
2171
2196
  return objectValue;
2172
2197
  }
2173
- /**
2174
- * TODO: [🧠] Is there a way how to meaningfully test this utility
2175
- */
2198
+ // TODO: [🧠] Is there a way how to meaningfully test this utility
2176
2199
 
2177
2200
  /**
2178
2201
  * Checks if the value is [🚉] serializable as JSON
@@ -2192,6 +2215,7 @@ function $deepFreeze(objectValue) {
2192
2215
  * - And much more...
2193
2216
  *
2194
2217
  * @throws UnexpectedError if the value is not serializable as JSON
2218
+ *
2195
2219
  * @public exported from `@promptbook/utils`
2196
2220
  */
2197
2221
  function checkSerializableAsJson(options) {
@@ -2306,11 +2330,9 @@ function checkSerializableAsJson(options) {
2306
2330
  `));
2307
2331
  }
2308
2332
  }
2309
- /**
2310
- * TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
2311
- * TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
2312
- * Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
2313
- */
2333
+ // TODO: Can be return type more type-safe? like `asserts options.value is JsonValue`
2334
+ // TODO: [🧠][main] !!3 In-memory cache of same values to prevent multiple checks
2335
+ // Note: [🐠] This is how `checkSerializableAsJson` + `isSerializableAsJson` together can just retun true/false or rich error message
2314
2336
 
2315
2337
  /**
2316
2338
  * Creates a deep clone of the given object
@@ -2320,6 +2342,7 @@ function checkSerializableAsJson(options) {
2320
2342
  *
2321
2343
  * @param objectValue The object to clone.
2322
2344
  * @returns A deep, writable clone of the input object.
2345
+ *
2323
2346
  * @public exported from `@promptbook/utils`
2324
2347
  */
2325
2348
  function deepClone(objectValue) {
@@ -2336,9 +2359,7 @@ function deepClone(objectValue) {
2336
2359
  > return Object.assign({}, objectValue);
2337
2360
  */
2338
2361
  }
2339
- /**
2340
- * TODO: [🧠] Is there a way how to meaningfully test this utility
2341
- */
2362
+ // TODO: [🧠] Is there a way how to meaningfully test this utility
2342
2363
 
2343
2364
  /**
2344
2365
  * Utility to export a JSON object from a function
@@ -2351,6 +2372,7 @@ function deepClone(objectValue) {
2351
2372
  * Note: This function does not mutates the given object
2352
2373
  *
2353
2374
  * @returns The same type of object as the input but read-only and re-ordered
2375
+ *
2354
2376
  * @public exported from `@promptbook/utils`
2355
2377
  */
2356
2378
  function exportJson(options) {
@@ -2370,9 +2392,7 @@ function exportJson(options) {
2370
2392
  $deepFreeze(orderedValue);
2371
2393
  return orderedValue;
2372
2394
  }
2373
- /**
2374
- * TODO: [🧠] Is there a way how to meaningfully test this utility
2375
- */
2395
+ // TODO: [🧠] Is there a way how to meaningfully test this utility
2376
2396
 
2377
2397
  /**
2378
2398
  * Order of keys in the pipeline JSON
@@ -2483,9 +2503,7 @@ const LIMITS = {
2483
2503
  */
2484
2504
  SHORT_NAME_LENGTH: 6,
2485
2505
  };
2486
- /**
2487
- * Note: [💞] Ignore a discrepancy between file name and entity name
2488
- */
2506
+ // Note: [💞] Ignore a discrepancy between file name and entity name
2489
2507
 
2490
2508
  /**
2491
2509
  * Tests if given string is valid semantic version
@@ -2510,12 +2528,13 @@ function isValidSemanticVersion(version) {
2510
2528
  * Tests if given string is valid promptbook version
2511
2529
  * It looks into list of known promptbook versions.
2512
2530
  *
2513
- * @see https://www.npmjs.com/package/promptbook?activeTab=versions
2514
2531
  * 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.
2515
2532
  * Note: There are two similar functions:
2516
2533
  * - `isValidSemanticVersion` which tests any semantic version
2517
2534
  * - `isValidPromptbookVersion` *(this one)* which tests just Promptbook versions
2518
2535
  *
2536
+ * @see https://www.npmjs.com/package/promptbook?activeTab=versions
2537
+ *
2519
2538
  * @public exported from `@promptbook/utils`
2520
2539
  */
2521
2540
  function isValidPromptbookVersion(version) {
@@ -2589,9 +2608,7 @@ function isValidPipelineUrl(url) {
2589
2608
  */
2590
2609
  return true;
2591
2610
  }
2592
- /**
2593
- * TODO: [🐠] Maybe more info why the URL is invalid
2594
- */
2611
+ // TODO: [🐠] Maybe more info why the URL is invalid
2595
2612
 
2596
2613
  /**
2597
2614
  * Validates PipelineJson if it is logically valid
@@ -2608,6 +2625,7 @@ function isValidPipelineUrl(url) {
2608
2625
  * @param pipeline valid or invalid PipelineJson
2609
2626
  * @returns the same pipeline if it is logically valid
2610
2627
  * @throws {PipelineLogicError} on logical error in the pipeline
2628
+ *
2611
2629
  * @public exported from `@promptbook/core`
2612
2630
  */
2613
2631
  function validatePipeline(pipeline) {
@@ -2632,6 +2650,8 @@ function validatePipeline(pipeline) {
2632
2650
  return pipeline;
2633
2651
  }
2634
2652
  /**
2653
+ * Validates pipeline inner function.
2654
+ *
2635
2655
  * @private internal function for `validatePipeline`
2636
2656
  */
2637
2657
  function validatePipeline_InnerFunction(pipeline) {
@@ -2876,15 +2896,13 @@ function validatePipeline_InnerFunction(pipeline) {
2876
2896
  * > * - ...
2877
2897
  * > ex port function validatePipeline(promptbook: really_unknown): asserts promptbook is PipelineJson {
2878
2898
  */
2879
- /**
2880
- * TODO: [🧳][main] !!4 Validate that all examples match expectations
2881
- * TODO: [🧳][🐝][main] !!4 Validate that knowledge is valid (non-void)
2882
- * TODO: [🧳][main] !!4 Validate that persona can be used only with CHAT variant
2883
- * TODO: [🧳][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
2884
- * TODO: [🧳][main] !!4 Validate that reserved parameter is not used as joker
2885
- * TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
2886
- * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
2887
- */
2899
+ // TODO: [🧳][main] !!4 Validate that all examples match expectations
2900
+ // TODO: [🧳][🐝][main] !!4 Validate that knowledge is valid (non-void)
2901
+ // TODO: [🧳][main] !!4 Validate that persona can be used only with CHAT variant
2902
+ // TODO: [🧳][main] !!4 Validate that parameter with reserved name not used RESERVED_PARAMETER_NAMES
2903
+ // TODO: [🧳][main] !!4 Validate that reserved parameter is not used as joker
2904
+ // TODO: [🧠] Validation not only logic itself but imports around - files and websites and rerefenced pipelines exists
2905
+ // TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
2888
2906
 
2889
2907
  /**
2890
2908
  * Determine if the pipeline is fully prepared
@@ -2986,7 +3004,7 @@ function jsonParse(value) {
2986
3004
 
2987
3005
  /**
2988
3006
  * Recursively converts JSON strings to JSON objects
2989
-
3007
+ *
2990
3008
  * @public exported from `@promptbook/utils`
2991
3009
  */
2992
3010
  function jsonStringsToJsons(object) {
@@ -3010,9 +3028,7 @@ function jsonStringsToJsons(object) {
3010
3028
  }
3011
3029
  return newObject;
3012
3030
  }
3013
- /**
3014
- * TODO: Type the return type correctly
3015
- */
3031
+ // TODO: Type the return type correctly
3016
3032
 
3017
3033
  /**
3018
3034
  * Deserializes the error object
@@ -3047,6 +3063,7 @@ function deserializeError(error, isStackAddedToMessage = true) {
3047
3063
  *
3048
3064
  * @param executionResult - The partial result of the Promptbook execution
3049
3065
  * @throws {PipelineExecutionError} If the execution is not successful or if multiple errors occurred
3066
+ *
3050
3067
  * @private internal helper function of `asPromise` method of `ExecutionTask`
3051
3068
  */
3052
3069
  function assertsTaskSuccessful(executionResult) {
@@ -3077,9 +3094,7 @@ function assertsTaskSuccessful(executionResult) {
3077
3094
  `));
3078
3095
  }
3079
3096
  }
3080
- /**
3081
- * TODO: [🧠] Can this return type be better typed than void
3082
- */
3097
+ // TODO: [🧠] Can this return type be better typed than void
3083
3098
 
3084
3099
  /**
3085
3100
  * Helper to create a new task
@@ -3270,10 +3285,8 @@ function createTask(options) {
3270
3285
  },
3271
3286
  };
3272
3287
  }
3273
- /**
3274
- * TODO: Maybe allow to terminate the task and add getter `isFinished` or `status`
3275
- * TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
3276
- */
3288
+ // TODO: Maybe allow to terminate the task and add getter `isFinished` or `status`
3289
+ // TODO: [🐚] Split into more files and make `PrepareTask` & `RemoteTask` + split the function
3277
3290
 
3278
3291
  /**
3279
3292
  * Represents the uncertain value
@@ -3341,9 +3354,7 @@ const UNCERTAIN_USAGE = $deepFreeze({
3341
3354
  pagesCount: UNCERTAIN_ZERO_VALUE,
3342
3355
  },
3343
3356
  });
3344
- /**
3345
- * Note: [💞] Ignore a discrepancy between file name and entity name
3346
- */
3357
+ // Note: [💞] Ignore a discrepancy between file name and entity name
3347
3358
 
3348
3359
  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"}];
3349
3360
 
@@ -3366,6 +3377,7 @@ function isValidEmail(email) {
3366
3377
  * Tests if given string is valid file path.
3367
3378
  *
3368
3379
  * Note: This does not check if the file exists only if the path is valid
3380
+ *
3369
3381
  * @public exported from `@promptbook/utils`
3370
3382
  */
3371
3383
  function isValidFilePath(filename) {
@@ -3414,9 +3426,7 @@ function isValidFilePath(filename) {
3414
3426
  }
3415
3427
  return false;
3416
3428
  }
3417
- /**
3418
- * TODO: [🍏] Implement for MacOs
3419
- */
3429
+ // TODO: [🍏] Implement for MacOs
3420
3430
 
3421
3431
  /**
3422
3432
  * Function `validatePipelineString` will validate the if the string is a valid pipeline string
@@ -3427,6 +3437,7 @@ function isValidFilePath(filename) {
3427
3437
  * @param {string} pipelineString the candidate for a pipeline string
3428
3438
  * @returns {PipelineString} the same string as input, but validated as valid
3429
3439
  * @throws {ParseError} if the string is not a valid pipeline string
3440
+ *
3430
3441
  * @public exported from `@promptbook/core`
3431
3442
  */
3432
3443
  function validatePipelineString(pipelineString) {
@@ -3445,17 +3456,16 @@ function validatePipelineString(pipelineString) {
3445
3456
  // <- TODO: Implement the validation + add tests when the pipeline logic considered as invalid
3446
3457
  return pipelineString;
3447
3458
  }
3448
- /**
3449
- * TODO: [🧠][🈴] Where is the best location for this file
3450
- */
3459
+ // TODO: [🧠][🈴] Where is the best location for this file
3451
3460
 
3452
3461
  /**
3453
3462
  * Prettify the html code
3454
3463
  *
3455
3464
  * @param content raw html code
3456
3465
  * @returns formatted html code
3457
- * @private withing the package because of HUGE size of prettier dependency
3458
3466
  * @deprecated Prettier removed from Promptbook due to package size
3467
+ *
3468
+ * @private withing the package because of HUGE size of prettier dependency
3459
3469
  */
3460
3470
  function prettifyMarkdown(content) {
3461
3471
  return (content + `\n\n<!-- Note: Prettier removed from Promptbook -->`);
@@ -3478,6 +3488,7 @@ function capitalize(word) {
3478
3488
  * @deprecated TODO: [🥍][🧠] Backup original files in `PipelineJson` same as in Promptbook.studio
3479
3489
  * @param pipelineJson Promptbook in JSON format (.bookc)
3480
3490
  * @returns Promptbook in string format (.book.md)
3491
+ *
3481
3492
  * @public exported from `@promptbook/core`
3482
3493
  */
3483
3494
  function pipelineJsonToString(pipelineJson) {
@@ -3594,6 +3605,8 @@ function pipelineJsonToString(pipelineJson) {
3594
3605
  return validatePipelineString(pipelineString);
3595
3606
  }
3596
3607
  /**
3608
+ * Handles task parameter Json to string.
3609
+ *
3597
3610
  * @private internal utility of `pipelineJsonToString`
3598
3611
  */
3599
3612
  function taskParameterJsonToString(taskParameterJson) {
@@ -3604,19 +3617,18 @@ function taskParameterJsonToString(taskParameterJson) {
3604
3617
  }
3605
3618
  return parameterString;
3606
3619
  }
3607
- /**
3608
- * TODO: [🛋] Implement new features and commands into `pipelineJsonToString` + `taskParameterJsonToString` , use `stringifyCommand`
3609
- * TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
3610
- * TODO: [🏛] Maybe make some markdown builder
3611
- * TODO: [🏛] Escape all
3612
- * TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
3613
- */
3620
+ // TODO: [🛋] Implement new features and commands into `pipelineJsonToString` + `taskParameterJsonToString` , use `stringifyCommand`
3621
+ // TODO: [🧠] Is there a way to auto-detect missing features in pipelineJsonToString
3622
+ // TODO: [🏛] Maybe make some markdown builder
3623
+ // TODO: [🏛] Escape all
3624
+ // TODO: [🧠] Should be in generated .book.md file GENERATOR_WARNING
3614
3625
 
3615
3626
  /**
3616
3627
  * Parses the task and returns the list of all parameter names
3617
3628
  *
3618
3629
  * @param template the string template with parameters in {curly} braces
3619
3630
  * @returns the list of parameter names
3631
+ *
3620
3632
  * @public exported from `@promptbook/utils`
3621
3633
  */
3622
3634
  function extractParameterNames(template) {
@@ -3633,6 +3645,7 @@ function extractParameterNames(template) {
3633
3645
  * Unprepare just strips the preparation data of the pipeline
3634
3646
  *
3635
3647
  * @deprecated In future version this function will be removed or deprecated
3648
+ *
3636
3649
  * @public exported from `@promptbook/core`
3637
3650
  */
3638
3651
  function unpreparePipeline(pipeline) {
@@ -3661,18 +3674,17 @@ function unpreparePipeline(pipeline) {
3661
3674
  },
3662
3675
  });
3663
3676
  }
3664
- /**
3665
- * TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
3666
- * TODO: Write tests for `preparePipeline`
3667
- * TODO: [🍙] Make some standard order of json properties
3668
- */
3677
+ // TODO: [🧿] Maybe do same process with same granularity and subfinctions as `preparePipeline`
3678
+ // TODO: Write tests for `preparePipeline`
3679
+ // TODO: [🍙] Make some standard order of json properties
3669
3680
 
3670
3681
  /**
3671
3682
  * Library of pipelines that groups together pipelines for an application.
3672
3683
  * This implementation is a very thin wrapper around the Array / Map of pipelines.
3673
3684
  *
3674
- * @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
3675
3685
  * @see https://github.com/webgptorg/pipeline#pipeline-collection
3686
+ *
3687
+ * @private internal function of `createPipelineCollectionFromJson`, use `createPipelineCollectionFromJson` instead
3676
3688
  */
3677
3689
  class SimplePipelineCollection {
3678
3690
  /**
@@ -3776,6 +3788,7 @@ class SimplePipelineCollection {
3776
3788
  *
3777
3789
  * @param promptbookSources
3778
3790
  * @returns PipelineCollection
3791
+ *
3779
3792
  * @public exported from `@promptbook/core`
3780
3793
  */
3781
3794
  function createPipelineCollectionFromJson(...promptbooks) {
@@ -3788,8 +3801,9 @@ function createPipelineCollectionFromJson(...promptbooks) {
3788
3801
  * @param array - Array to iterate over
3789
3802
  * @param options - Options for the function
3790
3803
  * @param callbackfunction - Function to call for each item
3791
- * @public exported from `@promptbook/utils`
3792
3804
  * @deprecated [🪂] Use queues instead
3805
+ *
3806
+ * @public exported from `@promptbook/utils`
3793
3807
  */
3794
3808
  async function forEachAsync(array, options, callbackfunction) {
3795
3809
  const { maxParallelCount = Infinity } = options;
@@ -3874,6 +3888,7 @@ function addUsage(...usageItems) {
3874
3888
  *
3875
3889
  * @param llmTools - The LLM tools to be intercepted and tracked
3876
3890
  * @returns Full proxy of the tools with added usage tracking capabilities
3891
+ *
3877
3892
  * @public exported from `@promptbook/core`
3878
3893
  */
3879
3894
  function countUsage(llmTools) {
@@ -3998,6 +4013,7 @@ const MULTIPLE_PROVIDER_PROFILE = {
3998
4013
  * Multiple LLM Execution Tools is a proxy server that uses multiple execution tools internally and exposes the executor interface externally.
3999
4014
  *
4000
4015
  * Note: Internal utility of `joinLlmExecutionTools` but exposed type
4016
+ *
4001
4017
  * @public exported from `@promptbook/core`
4002
4018
  */
4003
4019
  class MultipleLlmExecutionTools {
@@ -4160,16 +4176,16 @@ class MultipleLlmExecutionTools {
4160
4176
  * `MultipleLlmExecutionTools` object. It provides failover and aggregation logic:
4161
4177
  *
4162
4178
  * 1. **Failover**: When a model call is made, it tries providers in the order they were provided.
4163
- * If the first provider doesn't support the requested model or fails, it tries the next one.
4179
+ * If the first provider doesn't support the requested model or fails, it tries the next one.
4164
4180
  * 2. **Aggregation**: `listModels` returns a combined list of all models available from all providers.
4165
4181
  * 3. **Empty case**: If no tools are provided, it logs a warning (as Promptbook requires LLMs to function).
4166
4182
  *
4183
+ * Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
4184
+ *
4167
4185
  * @param title - A descriptive title for this collection of joined tools
4168
4186
  * @param llmExecutionTools - An array of execution tools to be joined
4169
4187
  * @returns A single unified execution tool wrapper
4170
4188
  *
4171
- * Tip: You don't have to use this function directly, just pass an array of LlmExecutionTools to the `ExecutionTools`.
4172
- *
4173
4189
  * @public exported from `@promptbook/core`
4174
4190
  */
4175
4191
  function joinLlmExecutionTools(title, ...llmExecutionTools) {
@@ -4206,10 +4222,8 @@ function joinLlmExecutionTools(title, ...llmExecutionTools) {
4206
4222
  }
4207
4223
  return new MultipleLlmExecutionTools(title || 'Multiple LLM Providers joined by `joinLlmExecutionTools`', ...llmExecutionTools);
4208
4224
  }
4209
- /**
4210
- * TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
4211
- * TODO: [👷‍♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
4212
- */
4225
+ // TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
4226
+ // TODO: [👷‍♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
4213
4227
 
4214
4228
  /**
4215
4229
  * Just returns the given `LlmExecutionTools` or joins multiple into one
@@ -4223,15 +4237,14 @@ function getSingleLlmExecutionTools(oneOrMoreLlmExecutionTools) {
4223
4237
  : joinLlmExecutionTools('Multiple LLM Providers joined by `getSingleLlmExecutionTools`', ..._llms);
4224
4238
  return llmTools;
4225
4239
  }
4226
- /**
4227
- * TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
4228
- * TODO: [👷‍♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
4229
- */
4240
+ // TODO: [🙆] `getSingleLlmExecutionTools` vs `joinLlmExecutionTools` - explain difference or pick one
4241
+ // TODO: [👷‍♂️] Write a comprehensive manual about how to construct and use LLM execution tools in Promptbook
4230
4242
 
4231
4243
  /**
4232
4244
  * Prepares the persona for the pipeline
4233
4245
  *
4234
4246
  * @see https://github.com/webgptorg/promptbook/discussions/22
4247
+ *
4235
4248
  * @public exported from `@promptbook/core`
4236
4249
  */
4237
4250
  async function preparePersona(personaDescription, tools, options) {
@@ -4288,13 +4301,11 @@ async function preparePersona(personaDescription, tools, options) {
4288
4301
  modelsRequirements,
4289
4302
  };
4290
4303
  }
4291
- /**
4292
- * TODO: [😩] DRY `preparePersona` and `selectBestModelFromAvailable`
4293
- * TODO: [🔃][main] If the persona was prepared with different version or different set of models, prepare it once again
4294
- * TODO: [🏢] Check validity of `modelName` in pipeline
4295
- * TODO: [🏢] Check validity of `systemMessage` in pipeline
4296
- * TODO: [🏢] Check validity of `temperature` in pipeline
4297
- */
4304
+ // TODO: [😩] DRY `preparePersona` and `selectBestModelFromAvailable`
4305
+ // TODO: [🔃][main] If the persona was prepared with different version or different set of models, prepare it once again
4306
+ // TODO: [🏢] Check validity of `modelName` in pipeline
4307
+ // TODO: [🏢] Check validity of `systemMessage` in pipeline
4308
+ // TODO: [🏢] Check validity of `temperature` in pipeline
4298
4309
 
4299
4310
  /**
4300
4311
  * Safely retrieves the global scope object (window in browser, global in Node.js)
@@ -4302,7 +4313,7 @@ async function preparePersona(personaDescription, tools, options) {
4302
4313
  *
4303
4314
  * Note: `$` is used to indicate that this function is not a pure function - it access global scope
4304
4315
  *
4305
- * @private internal function of `$Register`
4316
+ * @private internal function of `$Register`
4306
4317
  */
4307
4318
  function $getGlobalScope() {
4308
4319
  return Function('return this')();
@@ -4317,6 +4328,7 @@ function $getGlobalScope() {
4317
4328
  * @returns The normalized text in SCREAMING_CASE format.
4318
4329
  * @example 'HELLO_WORLD'
4319
4330
  * @example 'I_LOVE_PROMPTBOOK'
4331
+ *
4320
4332
  * @public exported from `@promptbook/utils`
4321
4333
  */
4322
4334
  function normalizeTo_SCREAMING_CASE(text) {
@@ -4374,6 +4386,7 @@ function normalizeTo_SCREAMING_CASE(text) {
4374
4386
  * @returns The normalized text in snake_case format.
4375
4387
  * @example 'hello_world'
4376
4388
  * @example 'i_love_promptbook'
4389
+ *
4377
4390
  * @public exported from `@promptbook/utils`
4378
4391
  */
4379
4392
  function normalizeTo_snake_case(text) {
@@ -4432,26 +4445,26 @@ class $Register {
4432
4445
  * Global registry for storing metadata about all available scrapers and converters.
4433
4446
  *
4434
4447
  * Note: `$` is used to indicate that this interacts with the global scope.
4448
+ *
4435
4449
  * @singleton Only one instance of each register is created per build, but there can be more in different contexts (e.g., tests).
4450
+ *
4436
4451
  * @public exported from `@promptbook/core`
4437
4452
  */
4438
4453
  const $scrapersMetadataRegister = new $Register('scrapers_metadata');
4439
- /**
4440
- * TODO: [®] DRY Register logic
4441
- */
4454
+ // TODO: [®] DRY Register logic
4442
4455
 
4443
4456
  /**
4444
4457
  * Registry for all available scrapers in the system.
4445
4458
  * Central point for registering and accessing different types of content scrapers.
4446
4459
  *
4447
4460
  * Note: `$` is used to indicate that this interacts with the global scope
4461
+ *
4448
4462
  * @singleton Only one instance of each register is created per build, but there can be more than one in different build modules
4463
+ *
4449
4464
  * @public exported from `@promptbook/core`
4450
4465
  */
4451
4466
  const $scrapersRegister = new $Register('scraper_constructors');
4452
- /**
4453
- * TODO: [®] DRY Register logic
4454
- */
4467
+ // TODO: [®] DRY Register logic
4455
4468
 
4456
4469
  /**
4457
4470
  * Creates a message with all registered scrapers
@@ -4536,10 +4549,11 @@ function $registeredScrapersMessage(availableScrapers) {
4536
4549
 
4537
4550
  `);
4538
4551
  }
4552
+ // TODO: [®] DRY Register logic
4553
+
4539
4554
  /**
4540
- * TODO: [®] DRY Register logic
4555
+ * Collection of default diacritics removal map.
4541
4556
  */
4542
-
4543
4557
  const defaultDiacriticsRemovalMap = [
4544
4558
  {
4545
4559
  base: 'A',
@@ -4791,6 +4805,7 @@ for (let i = 0; i < defaultDiacriticsRemovalMap.length; i++) {
4791
4805
  *
4792
4806
  * @param input The string containing diacritics to be normalized.
4793
4807
  * @returns The string with diacritics removed or normalized.
4808
+ *
4794
4809
  * @public exported from `@promptbook/utils`
4795
4810
  */
4796
4811
  function removeDiacritics(input) {
@@ -4799,9 +4814,7 @@ function removeDiacritics(input) {
4799
4814
  return DIACRITIC_VARIANTS_LETTERS[character] || character;
4800
4815
  });
4801
4816
  }
4802
- /**
4803
- * TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
4804
- */
4817
+ // TODO: [Ж] Variant for cyrillic (and in general non-latin) letters
4805
4818
 
4806
4819
  /**
4807
4820
  * Converts a given text to kebab-case format.
@@ -4812,6 +4825,7 @@ function removeDiacritics(input) {
4812
4825
  * @returns The kebab-case formatted string.
4813
4826
  * @example 'hello-world'
4814
4827
  * @example 'i-love-promptbook'
4828
+ *
4815
4829
  * @public exported from `@promptbook/utils`
4816
4830
  */
4817
4831
  function normalizeToKebabCase(text) {
@@ -4852,9 +4866,7 @@ function normalizeToKebabCase(text) {
4852
4866
  normalizedName = normalizedName.replace(/-$/, '');
4853
4867
  return normalizedName;
4854
4868
  }
4855
- /**
4856
- * Note: [💞] Ignore a discrepancy between file name and entity name
4857
- */
4869
+ // Note: [💞] Ignore a discrepancy between file name and entity name
4858
4870
 
4859
4871
  /**
4860
4872
  * Creates unique name for the source
@@ -4873,9 +4885,7 @@ function knowledgeSourceContentToName(knowledgeSourceContent) {
4873
4885
  // <- TODO: Use MAX_FILENAME_LENGTH
4874
4886
  return name;
4875
4887
  }
4876
- /**
4877
- * TODO: [🐱‍🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
4878
- */
4888
+ // TODO: [🐱‍🐉][🧠] Make some smart crop NOT source-i-m-pavol-a-develop-... BUT source-i-m-pavol-a-developer-...
4879
4889
 
4880
4890
  /**
4881
4891
  * Converts a name to a properly formatted subfolder path for cache storage.
@@ -4925,11 +4935,9 @@ async function isFileExisting(filename, fs) {
4925
4935
  .catch(() => false);
4926
4936
  return isFile;
4927
4937
  }
4928
- /**
4929
- * Note: Not [~🟢~] because it is not directly dependent on `fs
4930
- * TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
4931
- * TODO: [🖇] What about symlinks?
4932
- */
4938
+ // Note: Not [~🟢~] because it is not directly dependent on `fs
4939
+ // TODO: [🐠] This can be a validator - with variants that return true/false and variants that throw errors with meaningless messages
4940
+ // TODO: [🖇] What about symlinks?
4933
4941
 
4934
4942
  /**
4935
4943
  * Convert mime type to file extension
@@ -4949,6 +4957,7 @@ function mimeTypeToExtension(value) {
4949
4957
  *
4950
4958
  * @param text with emojis
4951
4959
  * @returns text without emojis
4960
+ *
4952
4961
  * @public exported from `@promptbook/utils`
4953
4962
  */
4954
4963
  function removeEmojis(text) {
@@ -4968,6 +4977,7 @@ function removeEmojis(text) {
4968
4977
  * @param value The title string to be converted to a name.
4969
4978
  * @returns A normalized name derived from the input title.
4970
4979
  * @example 'Hello World!' -> 'hello-world'
4980
+ *
4971
4981
  * @public exported from `@promptbook/utils`
4972
4982
  */
4973
4983
  function titleToName(value) {
@@ -5013,9 +5023,7 @@ const promptbookFetch = async (urlOrRequest, init) => {
5013
5023
  `));
5014
5024
  }
5015
5025
  };
5016
- /**
5017
- * TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
5018
- */
5026
+ // TODO: [🧠] Maybe rename because it is not used only for scrapers but also in `$getCompiledBook`
5019
5027
 
5020
5028
  /**
5021
5029
  * Factory function that creates a handler for processing knowledge sources.
@@ -5235,6 +5243,7 @@ async function makeKnowledgeSourceHandler(knowledgeSource, tools, options) {
5235
5243
  * Prepares the knowledge pieces
5236
5244
  *
5237
5245
  * @see https://github.com/webgptorg/promptbook/discussions/41
5246
+ *
5238
5247
  * @public exported from `@promptbook/core`
5239
5248
  */
5240
5249
  async function prepareKnowledgePieces(knowledgeSources, tools, options) {
@@ -5376,25 +5385,24 @@ async function prepareTasks(pipeline, tools, options) {
5376
5385
  });
5377
5386
  return { tasksPrepared };
5378
5387
  }
5379
- /**
5380
- * TODO: [😂] Adding knowledge should be convert to async high-level abstractions, similar thing with expectations to sync high-level abstractions
5381
- * TODO: [🧠] Add context to each task (if missing)
5382
- * TODO: [🧠] What is better name `prepareTask` or `prepareTaskAndParameters`
5383
- * TODO: [♨][main] !!3 Prepare index the examples and maybe tasks
5384
- * TODO: Write tests for `preparePipeline`
5385
- * TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
5386
- * TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
5387
- * TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
5388
- */
5388
+ // TODO: [😂] Adding knowledge should be convert to async high-level abstractions, similar thing with expectations to sync high-level abstractions
5389
+ // TODO: [🧠] Add context to each task (if missing)
5390
+ // TODO: [🧠] What is better name `prepareTask` or `prepareTaskAndParameters`
5391
+ // TODO: [][main] !!3 Prepare index the examples and maybe tasks
5392
+ // TODO: Write tests for `preparePipeline`
5393
+ // TODO: [🏏] Leverage the batch API and build queues @see https://platform.openai.com/docs/guides/batch
5394
+ // TODO: [🧊] In future one preparation can take data from previous preparation and save tokens and time
5395
+ // TODO: [🛠] Actions, instruments (and maybe knowledge) => Functions and tools
5389
5396
 
5390
5397
  /**
5391
5398
  * Prepare pipeline locally
5392
5399
  *
5393
- * @see https://github.com/webgptorg/promptbook/discussions/196
5394
- *
5395
5400
  * Note: This function does not validate logic of the pipeline
5396
5401
  * Note: This function acts as part of compilation process
5397
5402
  * Note: When the pipeline is already prepared, it returns the same pipeline
5403
+ *
5404
+ * @see https://github.com/webgptorg/promptbook/discussions/196
5405
+ *
5398
5406
  * @public exported from `@promptbook/core`
5399
5407
  */
5400
5408
  async function preparePipeline(pipeline, tools, options) {
@@ -5565,8 +5573,8 @@ function numberToString(value) {
5565
5573
  * This is useful and used in the `templateParameters` function
5566
5574
  *
5567
5575
  * Note: This function is not just calling `toString` method
5568
- * It's more complex and can handle this conversion specifically for LLM models
5569
- * See `VALUE_STRINGS`
5576
+ * It's more complex and can handle this conversion specifically for LLM models
5577
+ * See `VALUE_STRINGS`
5570
5578
  *
5571
5579
  * Note: There are 2 similar functions
5572
5580
  * - `valueToString` converts value to string for LLM models as human-readable string
@@ -5619,6 +5627,7 @@ function valueToString(value) {
5619
5627
  * @param script from which to extract the variables
5620
5628
  * @returns the list of variable names
5621
5629
  * @throws {ParseError} if the script is invalid
5630
+ *
5622
5631
  * @public exported from `@promptbook/javascript`
5623
5632
  */
5624
5633
  function extractVariablesFromJavascript(script) {
@@ -5684,9 +5693,7 @@ function extractVariablesFromJavascript(script) {
5684
5693
  }
5685
5694
  return variables;
5686
5695
  }
5687
- /**
5688
- * TODO: [🔣] Support for multiple languages - python, java,...
5689
- */
5696
+ // TODO: [🔣] Support for multiple languages - python, java,...
5690
5697
 
5691
5698
  /**
5692
5699
  * Parses the task and returns the set of all used parameters
@@ -5694,6 +5701,7 @@ function extractVariablesFromJavascript(script) {
5694
5701
  * @param task the task with used parameters
5695
5702
  * @returns the set of parameter names
5696
5703
  * @throws {ParseError} if the script is invalid
5704
+ *
5697
5705
  * @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
5698
5706
  */
5699
5707
  function extractParameterNamesFromTask(task) {
@@ -5734,14 +5742,13 @@ function extractParameterNamesFromTask(task) {
5734
5742
  }
5735
5743
  return parameterNames;
5736
5744
  }
5737
- /**
5738
- * TODO: [🔣] If script require contentLanguage
5739
- */
5745
+ // TODO: [🔣] If script require contentLanguage
5740
5746
 
5741
5747
  /**
5742
5748
  * Create difference set of two sets.
5743
5749
  *
5744
5750
  * @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
5751
+ *
5745
5752
  * @public exported from `@promptbook/utils`
5746
5753
  */
5747
5754
  function difference(a, b, isEqual = (a, b) => a === b) {
@@ -5753,14 +5760,13 @@ function difference(a, b, isEqual = (a, b) => a === b) {
5753
5760
  }
5754
5761
  return diff;
5755
5762
  }
5756
- /**
5757
- * TODO: [🧠][💯] Maybe also implement symmetricDifference
5758
- */
5763
+ // TODO: [🧠][💯] Maybe also implement symmetricDifference
5759
5764
 
5760
5765
  /**
5761
5766
  * Creates a new set with all elements that are present in either set
5762
5767
  *
5763
5768
  * @deprecated use new javascript set methods instead @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
5769
+ *
5764
5770
  * @public exported from `@promptbook/utils`
5765
5771
  */
5766
5772
  function union(...sets) {
@@ -5826,8 +5832,9 @@ function isValidCsvString(value) {
5826
5832
  /**
5827
5833
  * Definition for CSV spreadsheet
5828
5834
  *
5835
+ * TODO: [🏢] Export from package `@promptbook/csv`
5836
+ *
5829
5837
  * @public exported from `@promptbook/core`
5830
- * <- TODO: [🏢] Export from package `@promptbook/csv`
5831
5838
  */
5832
5839
  const CsvFormatParser = {
5833
5840
  formatName: 'CSV',
@@ -5917,13 +5924,11 @@ const CsvFormatParser = {
5917
5924
  },
5918
5925
  ],
5919
5926
  };
5920
- /**
5921
- * TODO: [🍓] In `CsvFormatParser` implement simple `isValid`
5922
- * TODO: [🍓] In `CsvFormatParser` implement partial `canBeValid`
5923
- * TODO: [🍓] In `CsvFormatParser` implement `heal
5924
- * TODO: [🍓] In `CsvFormatParser` implement `subvalueParsers`
5925
- * TODO: [🏢] Allow to expect something inside CSV objects and other formats
5926
- */
5927
+ // TODO: [🍓] In `CsvFormatParser` implement simple `isValid`
5928
+ // TODO: [🍓] In `CsvFormatParser` implement partial `canBeValid`
5929
+ // TODO: [🍓] In `CsvFormatParser` implement `heal
5930
+ // TODO: [🍓] In `CsvFormatParser` implement `subvalueParsers`
5931
+ // TODO: [🏢] Allow to expect something inside CSV objects and other formats
5927
5932
 
5928
5933
  /**
5929
5934
  * Definition for JSON format
@@ -5944,17 +5949,15 @@ const JsonFormatParser = {
5944
5949
  },
5945
5950
  subvalueParsers: [],
5946
5951
  };
5947
- /**
5948
- * TODO: [🧠] Maybe proper instance of object
5949
- * TODO: [0] Make string_serialized_json
5950
- * TODO: [1] Make type for JSON Settings and Schema
5951
- * TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
5952
- * TODO: [🍓] In `JsonFormatParser` implement simple `isValid`
5953
- * TODO: [🍓] In `JsonFormatParser` implement partial `canBeValid`
5954
- * TODO: [🍓] In `JsonFormatParser` implement `heal
5955
- * TODO: [🍓] In `JsonFormatParser` implement `subvalueParsers`
5956
- * TODO: [🏢] Allow to expect something inside JSON objects and other formats
5957
- */
5952
+ // TODO: [🧠] Maybe proper instance of object
5953
+ // TODO: [0] Make string_serialized_json
5954
+ // TODO: [1] Make type for JSON Settings and Schema
5955
+ // TODO: [🧠] What to use for validating JSONs - JSON Schema, ZoD, typescript types/interfaces,...?
5956
+ // TODO: [🍓] In `JsonFormatParser` implement simple `isValid`
5957
+ // TODO: [🍓] In `JsonFormatParser` implement partial `canBeValid`
5958
+ // TODO: [🍓] In `JsonFormatParser` implement `heal
5959
+ // TODO: [🍓] In `JsonFormatParser` implement `subvalueParsers`
5960
+ // TODO: [🏢] Allow to expect something inside JSON objects and other formats
5958
5961
 
5959
5962
  /**
5960
5963
  * Definition for any text - this will be always valid
@@ -5992,15 +5995,13 @@ const TextFormatParser = {
5992
5995
  // <- TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
5993
5996
  ],
5994
5997
  };
5995
- /**
5996
- * TODO: [1] Make type for XML Text and Schema
5997
- * TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
5998
- * TODO: [🍓] In `TextFormatParser` implement simple `isValid`
5999
- * TODO: [🍓] In `TextFormatParser` implement partial `canBeValid`
6000
- * TODO: [🍓] In `TextFormatParser` implement `heal
6001
- * TODO: [🍓] In `TextFormatParser` implement `subvalueParsers`
6002
- * TODO: [🏢] Allow to expect something inside each item of list and other formats
6003
- */
5998
+ // TODO: [1] Make type for XML Text and Schema
5999
+ // TODO: [🧠][🤠] Here should be all words, characters, lines, paragraphs, pages available as subvalues
6000
+ // TODO: [🍓] In `TextFormatParser` implement simple `isValid`
6001
+ // TODO: [🍓] In `TextFormatParser` implement partial `canBeValid`
6002
+ // TODO: [🍓] In `TextFormatParser` implement `heal
6003
+ // TODO: [🍓] In `TextFormatParser` implement `subvalueParsers`
6004
+ // TODO: [🏢] Allow to expect something inside each item of list and other formats
6004
6005
 
6005
6006
  /**
6006
6007
  * Function to check if a string is valid XML
@@ -6045,17 +6046,15 @@ const XmlFormatParser = {
6045
6046
  },
6046
6047
  subvalueParsers: [],
6047
6048
  };
6048
- /**
6049
- * TODO: [🧠] Maybe proper instance of object
6050
- * TODO: [0] Make string_serialized_xml
6051
- * TODO: [1] Make type for XML Settings and Schema
6052
- * TODO: [🧠] What to use for validating XMLs - XSD,...
6053
- * TODO: [🍓] In `XmlFormatParser` implement simple `isValid`
6054
- * TODO: [🍓] In `XmlFormatParser` implement partial `canBeValid`
6055
- * TODO: [🍓] In `XmlFormatParser` implement `heal
6056
- * TODO: [🍓] In `XmlFormatParser` implement `subvalueParsers`
6057
- * TODO: [🏢] Allow to expect something inside XML and other formats
6058
- */
6049
+ // TODO: [🧠] Maybe proper instance of object
6050
+ // TODO: [0] Make string_serialized_xml
6051
+ // TODO: [1] Make type for XML Settings and Schema
6052
+ // TODO: [🧠] What to use for validating XMLs - XSD,...
6053
+ // TODO: [🍓] In `XmlFormatParser` implement simple `isValid`
6054
+ // TODO: [🍓] In `XmlFormatParser` implement partial `canBeValid`
6055
+ // TODO: [🍓] In `XmlFormatParser` implement `heal
6056
+ // TODO: [🍓] In `XmlFormatParser` implement `subvalueParsers`
6057
+ // TODO: [🏢] Allow to expect something inside XML and other formats
6059
6058
 
6060
6059
  /**
6061
6060
  * Definitions for all formats supported by Promptbook
@@ -6063,9 +6062,7 @@ const XmlFormatParser = {
6063
6062
  * @private internal index of `...` <- TODO [🏢]
6064
6063
  */
6065
6064
  const FORMAT_DEFINITIONS = [JsonFormatParser, XmlFormatParser, TextFormatParser, CsvFormatParser];
6066
- /**
6067
- * Note: [💞] Ignore a discrepancy between file name and entity name
6068
- */
6065
+ // Note: [💞] Ignore a discrepancy between file name and entity name
6069
6066
 
6070
6067
  /**
6071
6068
  * Maps available parameters to expected parameters for a pipeline task.
@@ -6075,6 +6072,7 @@ const FORMAT_DEFINITIONS = [JsonFormatParser, XmlFormatParser, TextFormatParser,
6075
6072
  * 2) Then, if there are unmatched expected and available parameters, map them by order.
6076
6073
  *
6077
6074
  * @throws {PipelineExecutionError} If the number of unmatched expected and available parameters does not match, or mapping is ambiguous.
6075
+ *
6078
6076
  * @private within the repository used in `createPipelineExecutor`
6079
6077
  */
6080
6078
  function mapAvailableToExpectedParameters(options) {
@@ -6145,6 +6143,7 @@ function mapAvailableToExpectedParameters(options) {
6145
6143
  *
6146
6144
  * @param value any values
6147
6145
  * @returns void
6146
+ *
6148
6147
  * @private within the repository
6149
6148
  */
6150
6149
  function keepUnused(...valuesToKeep) {
@@ -6154,12 +6153,13 @@ function keepUnused(...valuesToKeep) {
6154
6153
  * Replaces parameters in template with values from parameters object
6155
6154
  *
6156
6155
  * Note: This function is not places strings into string,
6157
- * It's more complex and can handle this operation specifically for LLM models
6156
+ * It's more complex and can handle this operation specifically for LLM models
6158
6157
  *
6159
6158
  * @param template the template with parameters in {curly} braces
6160
6159
  * @param parameters the object with parameters
6161
6160
  * @returns the template with replaced parameters
6162
6161
  * @throws {PipelineExecutionError} if parameter is not defined, not closed, or not opened
6162
+ *
6163
6163
  * @public exported from `@promptbook/utils`
6164
6164
  */
6165
6165
  function templateParameters(template, parameters) {
@@ -6233,6 +6233,7 @@ function templateParameters(template, parameters) {
6233
6233
  * @param markdown any valid markdown
6234
6234
  * @returns code blocks with language and content
6235
6235
  * @throws {ParseError} if block is not closed properly
6236
+ *
6236
6237
  * @public exported from `@promptbook/markdown-utils`
6237
6238
  */
6238
6239
  function extractAllBlocksFromMarkdown(markdown) {
@@ -6283,9 +6284,7 @@ function extractAllBlocksFromMarkdown(markdown) {
6283
6284
  }
6284
6285
  return codeBlocks;
6285
6286
  }
6286
- /**
6287
- * TODO: Maybe name for `blockNotation` instead of '```' and '>'
6288
- */
6287
+ // TODO: Maybe name for `blockNotation` instead of '```' and '>'
6289
6288
 
6290
6289
  /**
6291
6290
  * Extracts extracts exactly one valid JSON code block
@@ -6301,8 +6300,9 @@ function extractAllBlocksFromMarkdown(markdown) {
6301
6300
  * - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
6302
6301
  * - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
6303
6302
  *
6304
- * @public exported from `@promptbook/markdown-utils`
6305
6303
  * @throws {ParseError} if there is no valid JSON block in the markdown
6304
+ *
6305
+ * @public exported from `@promptbook/markdown-utils`
6306
6306
  */
6307
6307
  function extractJsonBlock(markdown) {
6308
6308
  if (isValidJsonString(markdown)) {
@@ -6318,10 +6318,8 @@ function extractJsonBlock(markdown) {
6318
6318
  }
6319
6319
  return jsonBlocks[0].content;
6320
6320
  }
6321
- /**
6322
- * TODO: Add some auto-healing logic + extract YAML, JSON5, TOML, etc.
6323
- * TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
6324
- */
6321
+ // TODO: Add some auto-healing logic + extract YAML, JSON5, TOML, etc.
6322
+ // TODO: [🏢] Make this logic part of `JsonFormatParser` or `isValidJsonString`
6325
6323
 
6326
6324
  /**
6327
6325
  * Counts number of characters in the text
@@ -6337,10 +6335,8 @@ function countCharacters(text) {
6337
6335
  text = text.replace(/\p{Extended_Pictographic}(\u{200D}\p{Extended_Pictographic})*/gu, '-');
6338
6336
  return text.length;
6339
6337
  }
6340
- /**
6341
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6342
- * TODO: [🧠][✌️] Make some Promptbook-native token system
6343
- */
6338
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6339
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
6344
6340
 
6345
6341
  /**
6346
6342
  * Number of characters per standard line with 11pt Arial font size.
@@ -6354,10 +6350,8 @@ const CHARACTERS_PER_STANDARD_LINE = 63;
6354
6350
  * @public exported from `@promptbook/utils`
6355
6351
  */
6356
6352
  const LINES_PER_STANDARD_PAGE = 44;
6357
- /**
6358
- * TODO: [🧠] Should be this `constants.ts` or `config.ts`?
6359
- * Note: [💞] Ignore a discrepancy between file name and entity name
6360
- */
6353
+ // TODO: [🧠] Should be this `constants.ts` or `config.ts`?
6354
+ // Note: [💞] Ignore a discrepancy between file name and entity name
6361
6355
 
6362
6356
  /**
6363
6357
  * Counts number of lines in the text
@@ -6375,10 +6369,8 @@ function countLines(text) {
6375
6369
  const lines = text.split(/\r?\n/);
6376
6370
  return lines.reduce((count, line) => count + Math.max(Math.ceil(line.length / CHARACTERS_PER_STANDARD_LINE), 1), 0);
6377
6371
  }
6378
- /**
6379
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6380
- * TODO: [🧠][✌️] Make some Promptbook-native token system
6381
- */
6372
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6373
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
6382
6374
 
6383
6375
  /**
6384
6376
  * Counts number of pages in the text
@@ -6390,10 +6382,8 @@ function countLines(text) {
6390
6382
  function countPages(text) {
6391
6383
  return Math.ceil(countLines(text) / LINES_PER_STANDARD_PAGE);
6392
6384
  }
6393
- /**
6394
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6395
- * TODO: [🧠][✌️] Make some Promptbook-native token system
6396
- */
6385
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6386
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
6397
6387
 
6398
6388
  /**
6399
6389
  * Counts number of paragraphs in the text
@@ -6403,10 +6393,8 @@ function countPages(text) {
6403
6393
  function countParagraphs(text) {
6404
6394
  return text.split(/\n\s*\n/).filter((paragraph) => paragraph.trim() !== '').length;
6405
6395
  }
6406
- /**
6407
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6408
- * TODO: [🧠][✌️] Make some Promptbook-native token system
6409
- */
6396
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6397
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
6410
6398
 
6411
6399
  /**
6412
6400
  * Split text into sentences
@@ -6424,10 +6412,8 @@ function splitIntoSentences(text) {
6424
6412
  function countSentences(text) {
6425
6413
  return splitIntoSentences(text).length;
6426
6414
  }
6427
- /**
6428
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6429
- * TODO: [🧠][✌️] Make some Promptbook-native token system
6430
- */
6415
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6416
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
6431
6417
 
6432
6418
  /**
6433
6419
  * Counts number of words in the text
@@ -6441,11 +6427,9 @@ function countWords(text) {
6441
6427
  text = text.replace(/([a-z])([A-Z])/g, '$1 $2');
6442
6428
  return text.split(/[^a-zа-я0-9]+/i).filter((word) => word.length > 0).length;
6443
6429
  }
6444
- /**
6445
- * TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6446
- * TODO: [🧠][✌️] Make some Promptbook-native token system
6447
- * TODO: [✌️] `countWords` should be just `splitWords(...).length`, and all other counters should use this pattern as well
6448
- */
6430
+ // TODO: [🥴] Implement counting in formats - like JSON, CSV, XML,...
6431
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
6432
+ // TODO: [✌️] `countWords` should be just `splitWords(...).length`, and all other counters should use this pattern as well
6449
6433
 
6450
6434
  /**
6451
6435
  * Index of all counter functions
@@ -6460,10 +6444,8 @@ const CountUtils = {
6460
6444
  LINES: countLines,
6461
6445
  PAGES: countPages,
6462
6446
  };
6463
- /**
6464
- * TODO: [🧠][🤠] This should be probably as part of `TextFormatParser`
6465
- * Note: [💞] Ignore a discrepancy between file name and entity name
6466
- */
6447
+ // TODO: [🧠][🤠] This should be probably as part of `TextFormatParser`
6448
+ // Note: [💞] Ignore a discrepancy between file name and entity name
6467
6449
 
6468
6450
  /**
6469
6451
  * Function checkExpectations will check if the expectations on given value are met
@@ -6474,6 +6456,7 @@ const CountUtils = {
6474
6456
  *
6475
6457
  * @throws {ExpectError} if the expectations are not met
6476
6458
  * @returns {void} Nothing
6459
+ *
6477
6460
  * @private internal function of `createPipelineExecutor`
6478
6461
  */
6479
6462
  function checkExpectations(expectations, value) {
@@ -6487,11 +6470,9 @@ function checkExpectations(expectations, value) {
6487
6470
  }
6488
6471
  }
6489
6472
  }
6490
- /**
6491
- * TODO: [💝] Unite object for expecting amount and format
6492
- * TODO: [🧠][🤠] This should be part of `TextFormatParser`
6493
- * Note: [💝] and [🤠] are interconnected together
6494
- */
6473
+ // TODO: [💝] Unite object for expecting amount and format
6474
+ // TODO: [🧠][🤠] This should be part of `TextFormatParser`
6475
+ // Note: [💝] and [🤠] are interconnected together
6495
6476
 
6496
6477
  /**
6497
6478
  * Validates a prompt result against expectations and format requirements.
@@ -6502,6 +6483,7 @@ function checkExpectations(expectations, value) {
6502
6483
  *
6503
6484
  * @param options - The validation options including result string, expectations, and format
6504
6485
  * @returns Validation result with processed string and validity status
6486
+ *
6505
6487
  * @private internal function of `createPipelineExecutor` and `cacheLlmTools`
6506
6488
  */
6507
6489
  function validatePromptResult(options) {
@@ -6564,6 +6546,7 @@ function validatePromptResult(options) {
6564
6546
  *
6565
6547
  * @param options - The options for execution, including task, parameters, pipeline, and configuration.
6566
6548
  * @returns The result string of the executed task.
6549
+ *
6567
6550
  * @private internal utility of `createPipelineExecutor`
6568
6551
  */
6569
6552
  async function executeAttempts(options) {
@@ -6887,9 +6870,7 @@ async function executeAttempts(options) {
6887
6870
  }
6888
6871
  return $ongoingTaskResult.$resultString;
6889
6872
  }
6890
- /**
6891
- * TODO: Break into smaller functions
6892
- */
6873
+ // TODO: Break into smaller functions
6893
6874
 
6894
6875
  /**
6895
6876
  * Executes a pipeline task that requires mapping or iterating over subvalues of a parameter (such as rows in a CSV).
@@ -7032,6 +7013,7 @@ async function executeFormatSubvalues(options) {
7032
7013
  *
7033
7014
  * @param task - The task for which the context is being generated. This should be a deeply immutable TaskJson object.
7034
7015
  * @returns The context as a string, formatted as markdown and parameter value.
7016
+ *
7035
7017
  * @private internal utility of `createPipelineExecutor`
7036
7018
  */
7037
7019
  async function getContextForTask(task) {
@@ -7069,7 +7051,6 @@ function computeCosineSimilarity(embeddingVector1, embeddingVector2) {
7069
7051
  }
7070
7052
 
7071
7053
  /**
7072
- *
7073
7054
  * @param knowledgePieces
7074
7055
  * @returns
7075
7056
  *
@@ -7150,10 +7131,8 @@ async function getKnowledgeForTask(options) {
7150
7131
  return knowledgePiecesToString(preparedPipeline.knowledgePieces);
7151
7132
  }
7152
7133
  }
7153
- /**
7154
- * TODO: [♨] Implement Better - use keyword search
7155
- * TODO: [♨] Examples of values
7156
- */
7134
+ // TODO: [♨] Implement Better - use keyword search
7135
+ // TODO: [♨] Examples of values
7157
7136
 
7158
7137
  /**
7159
7138
  * Retrieves all reserved parameters for a given pipeline task, including context, knowledge, examples, and metadata.
@@ -7306,9 +7285,7 @@ async function executeTask(options) {
7306
7285
  resultString,
7307
7286
  });
7308
7287
  }
7309
- /**
7310
- * TODO: [🤹‍♂️]
7311
- */
7288
+ // TODO: [🤹‍♂️]
7312
7289
 
7313
7290
  /**
7314
7291
  * Filters and returns only the output parameters from the provided pipeline execution options.
@@ -7638,6 +7615,7 @@ async function executePipeline(options) {
7638
7615
  *
7639
7616
  * @returns The executor function
7640
7617
  * @throws {PipelineLogicError} on logical error in the pipeline
7618
+ *
7641
7619
  * @public exported from `@promptbook/core`
7642
7620
  */
7643
7621
  function createPipelineExecutor(options) {
@@ -7802,9 +7780,7 @@ function $isRunningInBrowser() {
7802
7780
  return false;
7803
7781
  }
7804
7782
  }
7805
- /**
7806
- * TODO: [🎺]
7807
- */
7783
+ // TODO: [🎺]
7808
7784
 
7809
7785
  /**
7810
7786
  * Detects if the code is running in a web worker
@@ -7824,33 +7800,31 @@ function $isRunningInWebWorker() {
7824
7800
  return false;
7825
7801
  }
7826
7802
  }
7827
- /**
7828
- * TODO: [🎺]
7829
- */
7803
+ // TODO: [🎺]
7830
7804
 
7831
7805
  /**
7832
7806
  * Register for LLM tools.
7833
7807
  *
7834
7808
  * Note: `$` is used to indicate that this interacts with the global scope
7809
+ *
7835
7810
  * @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
7811
+ *
7836
7812
  * @public exported from `@promptbook/core`
7837
7813
  */
7838
7814
  const $llmToolsRegister = new $Register('llm_execution_tools_constructors');
7839
- /**
7840
- * TODO: [®] DRY Register logic
7841
- */
7815
+ // TODO: [®] DRY Register logic
7842
7816
 
7843
7817
  /**
7844
7818
  * Register for LLM tools metadata.
7845
7819
  *
7846
7820
  * Note: `$` is used to indicate that this interacts with the global scope
7821
+ *
7847
7822
  * @singleton Only one instance of each register is created per build, but there can be more instances across different builds or environments.
7823
+ *
7848
7824
  * @public exported from `@promptbook/core`
7849
7825
  */
7850
7826
  const $llmToolsMetadataRegister = new $Register('llm_tools_metadata');
7851
- /**
7852
- * TODO: [®] DRY Register logic
7853
- */
7827
+ // TODO: [®] DRY Register logic
7854
7828
 
7855
7829
  /**
7856
7830
  * Creates a message with all registered LLM tools
@@ -7971,10 +7945,8 @@ function $registeredLlmToolsMessage() {
7971
7945
  .join('\n'))}
7972
7946
  `);
7973
7947
  }
7974
- /**
7975
- * TODO: [®] DRY Register logic
7976
- * TODO: [🧠][⚛] Maybe pass env as argument
7977
- */
7948
+ // TODO: [®] DRY Register logic
7949
+ // TODO: [🧠][⚛] Maybe pass env as argument
7978
7950
 
7979
7951
  /**
7980
7952
  * Creates LLM execution tools from provided configuration objects
@@ -7987,6 +7959,7 @@ function $registeredLlmToolsMessage() {
7987
7959
  * @param configuration Array of LLM tool configurations to instantiate
7988
7960
  * @param options Additional options for configuring the LLM tools
7989
7961
  * @returns A unified interface combining all successfully instantiated LLM tools
7962
+ *
7990
7963
  * @public exported from `@promptbook/core`
7991
7964
  */
7992
7965
  function createLlmToolsFromConfiguration(configuration, options = {}) {
@@ -8042,6 +8015,7 @@ function createLlmToolsFromConfiguration(configuration, options = {}) {
8042
8015
  * Provides a collection of scrapers optimized for Node.js environment.
8043
8016
  * 1) `provideScrapersForNode` use as default
8044
8017
  * 2) `provideScrapersForBrowser` use in limited browser environment *
8018
+ *
8045
8019
  * @public exported from `@promptbook/node`
8046
8020
  */
8047
8021
  async function $provideScrapersForNode(tools, options) {
@@ -8061,8 +8035,8 @@ async function $provideScrapersForNode(tools, options) {
8061
8035
  }
8062
8036
  return scrapers;
8063
8037
  }
8064
- /** Note: [🟢] Code for Node scraper registration helper [$provideScrapersForNode](src/scrapers/_common/register/$provideScrapersForNode.ts) should never be published into packages that could be imported into browser environment */
8065
- /** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
8038
+ // Note: [🟢] Code for Node scraper registration helper [$provideScrapersForNode](src/scrapers/_common/register/$provideScrapersForNode.ts) should never be published into packages that could be imported into browser environment
8039
+ // TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
8066
8040
 
8067
8041
  /**
8068
8042
  * Normalizes a given text to camelCase format.
@@ -8074,6 +8048,7 @@ async function $provideScrapersForNode(tools, options) {
8074
8048
  * @returns The camelCase formatted string.
8075
8049
  * @example 'helloWorld'
8076
8050
  * @example 'iLovePromptbook'
8051
+ *
8077
8052
  * @public exported from `@promptbook/utils`
8078
8053
  */
8079
8054
  function normalizeTo_camelCase(text, _isFirstLetterCapital = false) {
@@ -8114,9 +8089,7 @@ function normalizeTo_camelCase(text, _isFirstLetterCapital = false) {
8114
8089
  }
8115
8090
  return normalizedName;
8116
8091
  }
8117
- /**
8118
- * TODO: [🌺] Use some intermediate util splitWords
8119
- */
8092
+ // TODO: [🌺] Use some intermediate util splitWords
8120
8093
 
8121
8094
  /**
8122
8095
  * Unsafe characters that prevent an inline parameter.
@@ -8140,6 +8113,7 @@ const PROMPT_PARAMETER_ESCAPE_WITH_BRACES_PATTERN = /[{}$`]/g;
8140
8113
  * Normalizes a JSON string so it can be safely rendered without double escaping.
8141
8114
  *
8142
8115
  * @param value Candidate JSON string.
8116
+ *
8143
8117
  * @private function of ParameterEscaping
8144
8118
  */
8145
8119
  function normalizeJsonString(value) {
@@ -8154,6 +8128,7 @@ function normalizeJsonString(value) {
8154
8128
  * Hides brackets in a string to avoid confusion with template parameters.
8155
8129
  *
8156
8130
  * @param value Input string with literal brackets.
8131
+ *
8157
8132
  * @private function of ParameterEscaping
8158
8133
  */
8159
8134
  function hideBrackets(value) {
@@ -8163,6 +8138,7 @@ function hideBrackets(value) {
8163
8138
  * Restores hidden brackets.
8164
8139
  *
8165
8140
  * @param value String with hidden brackets.
8141
+ *
8166
8142
  * @private function of ParameterEscaping
8167
8143
  */
8168
8144
  function restoreBrackets(value) {
@@ -8172,6 +8148,7 @@ function restoreBrackets(value) {
8172
8148
  * Decides whether a parameter can be inlined safely.
8173
8149
  *
8174
8150
  * @param value Parameter rendered as string.
8151
+ *
8175
8152
  * @private function of ParameterEscaping
8176
8153
  */
8177
8154
  function shouldInlineParameterValue(value) {
@@ -8185,6 +8162,7 @@ function shouldInlineParameterValue(value) {
8185
8162
  *
8186
8163
  * @param value Parameter value to escape.
8187
8164
  * @param options Escape options for additional characters.
8165
+ *
8188
8166
  * @private function of ParameterEscaping
8189
8167
  */
8190
8168
  function escapePromptParameterValue(value, options) {
@@ -8210,6 +8188,7 @@ const ParameterEscaping = {
8210
8188
  * Builds numeric parameter names (1, 2, ...).
8211
8189
  *
8212
8190
  * @param index Zero-based parameter index.
8191
+ *
8213
8192
  * @private function of ParameterNaming
8214
8193
  */
8215
8194
  function buildNumericParameterName(index) {
@@ -8219,6 +8198,7 @@ function buildNumericParameterName(index) {
8219
8198
  * Builds alphabetic parameter names (a, b, ..., aa).
8220
8199
  *
8221
8200
  * @param index Zero-based parameter index.
8201
+ *
8222
8202
  * @private function of ParameterNaming
8223
8203
  */
8224
8204
  function buildAlphabeticParameterName(index) {
@@ -8235,6 +8215,7 @@ function buildAlphabeticParameterName(index) {
8235
8215
  * Converts a positive integer into a Roman numeral string.
8236
8216
  *
8237
8217
  * @param value Positive integer value.
8218
+ *
8238
8219
  * @private function of ParameterNaming
8239
8220
  */
8240
8221
  function toRomanNumeral(value) {
@@ -8267,6 +8248,7 @@ function toRomanNumeral(value) {
8267
8248
  * Builds Roman numeral parameter names (I, II, ...).
8268
8249
  *
8269
8250
  * @param index Zero-based parameter index.
8251
+ *
8270
8252
  * @private function of ParameterNaming
8271
8253
  */
8272
8254
  function buildRomanParameterName(index) {
@@ -8277,6 +8259,7 @@ function buildRomanParameterName(index) {
8277
8259
  *
8278
8260
  * @param prefix Prefix string.
8279
8261
  * @param builder Base builder function.
8262
+ *
8280
8263
  * @private function of ParameterNaming
8281
8264
  */
8282
8265
  function buildPrefixedParameterName(prefix, builder) {
@@ -8298,6 +8281,7 @@ const PARAMETER_NAME_STRATEGIES = [
8298
8281
  * Collects bracketed tokens from parameter values to avoid placeholder collisions.
8299
8282
  *
8300
8283
  * @param values Parameter values to scan.
8284
+ *
8301
8285
  * @private function of ParameterNaming
8302
8286
  */
8303
8287
  function collectBracketedParameterTokens(values) {
@@ -8318,6 +8302,7 @@ function collectBracketedParameterTokens(values) {
8318
8302
  * Builds placeholder names while avoiding collisions with parameter content.
8319
8303
  *
8320
8304
  * @param values Parameter values to scan for conflicting tokens.
8305
+ *
8321
8306
  * @private function of ParameterNaming
8322
8307
  */
8323
8308
  function buildParameterNames(values) {
@@ -8348,6 +8333,7 @@ const ParameterNaming = {
8348
8333
  * Formats the placeholder used in the prompt body for a parameter.
8349
8334
  *
8350
8335
  * @param name Parameter placeholder name.
8336
+ *
8351
8337
  * @private function of ParameterSection
8352
8338
  */
8353
8339
  function formatParameterPlaceholder(name) {
@@ -8357,6 +8343,7 @@ function formatParameterPlaceholder(name) {
8357
8343
  * Formats a single line entry for structured parameters.
8358
8344
  *
8359
8345
  * @param item Parameter entry data.
8346
+ *
8360
8347
  * @private function of ParameterSection
8361
8348
  */
8362
8349
  function formatParameterListItem(item) {
@@ -8368,6 +8355,7 @@ function formatParameterListItem(item) {
8368
8355
  * Builds the structured parameters section appended to the prompt.
8369
8356
  *
8370
8357
  * @param items Parameter entries to include.
8358
+ *
8371
8359
  * @private function of ParameterSection
8372
8360
  */
8373
8361
  function buildParametersSection(items) {
@@ -8443,6 +8431,7 @@ function isPromptString(value) {
8443
8431
  * @param strings
8444
8432
  * @param values
8445
8433
  * @returns prompt content wrapped as a PromptString
8434
+ *
8446
8435
  * @public exported from `@promptbook/utils`
8447
8436
  */
8448
8437
  function prompt(strings, ...values) {
@@ -8527,11 +8516,9 @@ function prompt(strings, ...values) {
8527
8516
  }
8528
8517
  return new PromptString(pipelineString);
8529
8518
  }
8530
- /**
8531
- * TODO: Maybe split into multiple files
8532
- * TODO: [🧠][🈴] Where is the best location for this file
8533
- * Note: [💞] Ignore a discrepancy between file name and entity name
8534
- */
8519
+ // TODO: Maybe split into multiple files
8520
+ // TODO: [🧠][🈴] Where is the best location for this file
8521
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8535
8522
 
8536
8523
  /**
8537
8524
  * @@@
@@ -8568,9 +8555,7 @@ function attachClientVersionHeader(headers) {
8568
8555
  [CLIENT_VERSION_HEADER]: CLIENT_LATEST_VERSION,
8569
8556
  };
8570
8557
  }
8571
- /**
8572
- * Note: [💞] Ignore a discrepancy between file name and entity name
8573
- */
8558
+ // Note: [💞] Ignore a discrepancy between file name and entity name
8574
8559
 
8575
8560
  /**
8576
8561
  * Computes SHA-256 hash of the given object
@@ -8580,9 +8565,7 @@ function attachClientVersionHeader(headers) {
8580
8565
  function computeHash(value) {
8581
8566
  return SHA256(hexEncoder.parse(spaceTrim$1(valueToString(value)))).toString( /* hex */);
8582
8567
  }
8583
- /**
8584
- * TODO: [🥬][🥬] Use this ACRY
8585
- */
8568
+ // TODO: [🥬][🥬] Use this ACRY
8586
8569
 
8587
8570
  // spell-checker: disable
8588
8571
  /**
@@ -8748,6 +8731,9 @@ const ADJECTIVES$1 = [
8748
8731
  'prvotní',
8749
8732
  'hbitý',
8750
8733
  ];
8734
+ /**
8735
+ * Collection of nouns.
8736
+ */
8751
8737
  const NOUNS$1 = [
8752
8738
  'jablko',
8753
8739
  'nebe',
@@ -8961,6 +8947,9 @@ const NOUNS$1 = [
8961
8947
  'okno',
8962
8948
  'chodba',
8963
8949
  ];
8950
+ /**
8951
+ * Collection of verbs.
8952
+ */
8964
8953
  const VERBS$1 = [
8965
8954
  'skáče',
8966
8955
  'tančí',
@@ -9133,9 +9122,7 @@ const LINGUISTIC_HASH_WORD_LISTS_CS = {
9133
9122
  noun: NOUNS$1,
9134
9123
  verb: VERBS$1,
9135
9124
  };
9136
- /**
9137
- * Note: [💞] Ignore a discrepancy between file name and entity name
9138
- */
9125
+ // Note: [💞] Ignore a discrepancy between file name and entity name
9139
9126
 
9140
9127
  /**
9141
9128
  * @@@
@@ -9391,6 +9378,9 @@ const ADJECTIVES = [
9391
9378
  'macro',
9392
9379
  'mini',
9393
9380
  ];
9381
+ /**
9382
+ * Collection of nouns.
9383
+ */
9394
9384
  const NOUNS = [
9395
9385
  'apple',
9396
9386
  'sky',
@@ -9630,6 +9620,9 @@ const NOUNS = [
9630
9620
  'roof',
9631
9621
  'floor',
9632
9622
  ];
9623
+ /**
9624
+ * Collection of verbs.
9625
+ */
9633
9626
  const VERBS = [
9634
9627
  'jumping',
9635
9628
  'dancing',
@@ -9825,9 +9818,7 @@ const LINGUISTIC_HASH_WORD_LISTS_EN = {
9825
9818
  noun: NOUNS,
9826
9819
  verb: VERBS,
9827
9820
  };
9828
- /**
9829
- * Note: [💞] Ignore a discrepancy between file name and entity name
9830
- */
9821
+ // Note: [💞] Ignore a discrepancy between file name and entity name
9831
9822
 
9832
9823
  /**
9833
9824
  * Default language used for linguistic hashes.
@@ -10002,8 +9993,9 @@ function normalizeLinguisticHashWordCount(wordCount) {
10002
9993
  /**
10003
9994
  * Creates a human-readable hash as a short, story-like phrase.
10004
9995
  *
10005
- * @param wordCount how many words to include (defaults to {@link DEFAULT_LINGUISTIC_HASH_WORD_COUNT}, clamped to
10006
9996
  * {@link MIN_LINGUISTIC_HASH_WORD_COUNT}..{@link MAX_LINGUISTIC_HASH_WORD_COUNT})
9997
+ *
9998
+ * @param wordCount how many words to include (defaults to {@link DEFAULT_LINGUISTIC_HASH_WORD_COUNT}, clamped to
10007
9999
  * @param language optional language code (defaults to {@link DEFAULT_LINGUISTIC_HASH_LANGUAGE})
10008
10000
  *
10009
10001
  * @public exported from `@promptbook/utils`
@@ -10022,6 +10014,7 @@ async function linguisticHash(input, wordCount, language) {
10022
10014
  * Note: `$` is used to indicate that this function is not a pure function - it is not deterministic because it depends on the current time
10023
10015
  *
10024
10016
  * @returns string_date branded type
10017
+ *
10025
10018
  * @public exported from `@promptbook/utils`
10026
10019
  */
10027
10020
  function $getCurrentDate() {
@@ -10044,6 +10037,7 @@ function decapitalize(word) {
10044
10037
  *
10045
10038
  * @param {string} input
10046
10039
  * @returns {Set} of keywords without diacritics in lowercase
10040
+ *
10047
10041
  * @public exported from `@promptbook/utils`
10048
10042
  */
10049
10043
  function parseKeywordsFromString(input) {
@@ -10060,6 +10054,7 @@ function parseKeywordsFromString(input) {
10060
10054
  * @param name The string to be converted to a URI-compatible format.
10061
10055
  * @returns A URI-compatible string derived from the input name.
10062
10056
  * @example 'Hello World' -> 'hello-world'
10057
+ *
10063
10058
  * @public exported from `@promptbook/utils`
10064
10059
  */
10065
10060
  function nameToUriPart(name) {
@@ -10078,6 +10073,7 @@ function nameToUriPart(name) {
10078
10073
  * @param name The name to be converted into URI parts.
10079
10074
  * @returns An array of URI-compatible parts derived from the name.
10080
10075
  * @example 'Example Name' -> ['example', 'name']
10076
+ *
10081
10077
  * @public exported from `@promptbook/utils`
10082
10078
  */
10083
10079
  function nameToUriParts(name) {
@@ -10107,6 +10103,7 @@ function normalizeMessageText(text) {
10107
10103
  * @returns
10108
10104
  * @example 'HelloWorld'
10109
10105
  * @example 'ILovePromptbook'
10106
+ *
10110
10107
  * @public exported from `@promptbook/utils`
10111
10108
  */
10112
10109
  function normalizeTo_PascalCase(text) {
@@ -10136,6 +10133,7 @@ function normalizeWhitespaces(sentence) {
10136
10133
  *
10137
10134
  * @param text optionally quoted text
10138
10135
  * @returns text without quotes
10136
+ *
10139
10137
  * @public exported from `@promptbook/utils`
10140
10138
  */
10141
10139
  function removeQuotes(text) {
@@ -10159,6 +10157,7 @@ function removeQuotes(text) {
10159
10157
  *
10160
10158
  * @param text optionally quoted text
10161
10159
  * @returns text without quotes
10160
+ *
10162
10161
  * @public exported from `@promptbook/utils`
10163
10162
  */
10164
10163
  function unwrapResult(text, options) {
@@ -10233,9 +10232,7 @@ function unwrapResult(text, options) {
10233
10232
  return processedText;
10234
10233
  }
10235
10234
  }
10236
- /**
10237
- * TODO: [🧠] Should this also unwrap the (parenthesis)
10238
- */
10235
+ // TODO: [🧠] Should this also unwrap the (parenthesis)
10239
10236
 
10240
10237
  /**
10241
10238
  * Checks if an URL is reserved for private networks or localhost.
@@ -10281,6 +10278,7 @@ function isHostnameOnPrivateNetwork(hostname, options = {}) {
10281
10278
  * @param {string} url - The URL to check.
10282
10279
  * @param {IsUrlOnPrivateNetworkOptions} options - Options for the check.
10283
10280
  * @returns {boolean} Returns true if the IP address is reserved for private networks or localhost, otherwise false.
10281
+ *
10284
10282
  * @public exported from `@promptbook/utils`
10285
10283
  */
10286
10284
  function isUrlOnPrivateNetwork(url, options = {}) {
@@ -10319,9 +10317,7 @@ function isValidAgentUrl(url) {
10319
10317
  */
10320
10318
  return true;
10321
10319
  }
10322
- /**
10323
- * TODO: [🐠] Maybe more info why the URL is invalid
10324
- */
10320
+ // TODO: [🐠] Maybe more info why the URL is invalid
10325
10321
 
10326
10322
  /**
10327
10323
  * Retrieves an intermediate source for a scraper based on the knowledge source.
@@ -10385,13 +10381,11 @@ async function getScraperIntermediateSource(source, options) {
10385
10381
  };
10386
10382
  return fileHandler;
10387
10383
  }
10388
- /** Note: [🟢] Code for Node scraper helper [getScraperIntermediateSource](src/scrapers/_common/utils/getScraperIntermediateSource.ts) should never be published into packages that could be imported into browser environment */
10389
- /**
10390
- * Note: Not using `FileCacheStorage` for two reasons:
10391
- * 1) Need to store more than serialized JSONs
10392
- * 2) Need to switch between a `rootDirname` and `cacheDirname` <- TODO: [😡]
10393
- * TODO: [🐱‍🐉][🧠] Make some smart crop
10394
- */
10384
+ // Note: [🟢] Code for Node scraper helper [getScraperIntermediateSource](src/scrapers/_common/utils/getScraperIntermediateSource.ts) should never be published into packages that could be imported into browser environment
10385
+ // Note: Not using `FileCacheStorage` for two reasons:
10386
+ // 1. Need to store more than serialized JSONs.
10387
+ // 2. Need to switch between a `rootDirname` and `cacheDirname` <- TODO: [😡]
10388
+ // TODO: [🐱‍🐉][🧠] Make some smart crop
10395
10389
 
10396
10390
  /**
10397
10391
  * Metadata of the scraper
@@ -10418,14 +10412,13 @@ const markdownScraperMetadata = $deepFreeze({
10418
10412
  * @public exported from `@promptbook/cli`
10419
10413
  */
10420
10414
  $scrapersMetadataRegister.register(markdownScraperMetadata);
10421
- /**
10422
- * Note: [💞] Ignore a discrepancy between file name and entity name
10423
- */
10415
+ // Note: [💞] Ignore a discrepancy between file name and entity name
10424
10416
 
10425
10417
  /**
10426
10418
  * Scraper for markdown files
10427
10419
  *
10428
10420
  * @see `documentationUrl` for more details
10421
+ *
10429
10422
  * @public exported from `@promptbook/markdown-utils`
10430
10423
  */
10431
10424
  class MarkdownScraper {
@@ -10558,10 +10551,8 @@ class MarkdownScraper {
10558
10551
  return knowledge;
10559
10552
  }
10560
10553
  }
10561
- /**
10562
- * TODO: [🪂] Do it in parallel 11:11
10563
- * Note: No need to aggregate usage here, it is done by intercepting the llmTools
10564
- */
10554
+ // TODO: [🪂] Do it in parallel 11:11
10555
+ // Note: No need to aggregate usage here, it is done by intercepting the llmTools
10565
10556
 
10566
10557
  /**
10567
10558
  * Metadata of the scraper
@@ -10588,9 +10579,7 @@ const websiteScraperMetadata = $deepFreeze({
10588
10579
  * @public exported from `@promptbook/cli`
10589
10580
  */
10590
10581
  $scrapersMetadataRegister.register(websiteScraperMetadata);
10591
- /**
10592
- * Note: [💞] Ignore a discrepancy between file name and entity name
10593
- */
10582
+ // Note: [💞] Ignore a discrepancy between file name and entity name
10594
10583
 
10595
10584
  /**
10596
10585
  * Create a new showdown converter instance
@@ -10619,6 +10608,7 @@ function createShowdownConverter() {
10619
10608
  * Scraper for websites
10620
10609
  *
10621
10610
  * @see `documentationUrl` for more details
10611
+ *
10622
10612
  * @public exported from `@promptbook/website-crawler`
10623
10613
  */
10624
10614
  class WebsiteScraper {
@@ -10722,12 +10712,10 @@ class WebsiteScraper {
10722
10712
  return knowledge;
10723
10713
  }
10724
10714
  }
10725
- /** Note: [🟢] Code for Node scraper implementation [WebsiteScraper](src/scrapers/website/WebsiteScraper.ts) should never be published into packages that could be imported into browser environment */
10726
- /**
10727
- * TODO: [👣] Scraped website in .md can act as cache item - there is no need to run conversion each time
10728
- * TODO: [🪂] Do it in parallel 11:11
10729
- * Note: No need to aggregate usage here, it is done by intercepting the llmTools
10730
- */
10715
+ // Note: [🟢] Code for Node scraper implementation [WebsiteScraper](src/scrapers/website/WebsiteScraper.ts) should never be published into packages that could be imported into browser environment
10716
+ // TODO: [👣] Scraped website in .md can act as cache item - there is no need to run conversion each time
10717
+ // TODO: [🪂] Do it in parallel 11:11
10718
+ // Note: No need to aggregate usage here, it is done by intercepting the llmTools
10731
10719
 
10732
10720
  /**
10733
10721
  * Fetches and scrapes content from a URL (SERVER-SIDE ONLY)
@@ -10738,14 +10726,14 @@ class WebsiteScraper {
10738
10726
  * 3. Uses the appropriate scraper to convert to markdown
10739
10727
  * 4. Returns the scraped markdown content
10740
10728
  *
10729
+ * WARNING: This function should NOT be used directly in browser environments.
10730
+ * For browser environments, use fetchUrlContentViaBrowser which proxies through
10731
+ * the Agents Server API endpoint at /api/scrape
10732
+ *
10741
10733
  * @param url The URL to fetch and scrape
10742
10734
  * @returns Markdown content from the URL
10743
10735
  *
10744
10736
  * @private internal utility for USE BROWSER commitment
10745
- *
10746
- * WARNING: This function should NOT be used directly in browser environments.
10747
- * For browser environments, use fetchUrlContentViaBrowser which proxies through
10748
- * the Agents Server API endpoint at /api/scrape
10749
10737
  */
10750
10738
  async function fetchUrlContent(url) {
10751
10739
  try {
@@ -10849,7 +10837,7 @@ async function fetchUrlContent(url) {
10849
10837
  `);
10850
10838
  }
10851
10839
  }
10852
- /** Note: [🟢] Code for Node browser-fetch helper [fetchUrlContent](src/commitments/USE_BROWSER/fetchUrlContent.ts) should never be published into packages that could be imported into browser environment */
10840
+ // Note: [🟢] Code for Node browser-fetch helper [fetchUrlContent](src/commitments/USE_BROWSER/fetchUrlContent.ts) should never be published into packages that could be imported into browser environment
10853
10841
 
10854
10842
  /**
10855
10843
  * Cached implementation of `run_browser` when it can be resolved.
@@ -10867,6 +10855,7 @@ let cachedRunBrowserToolError = null;
10867
10855
  * Attempts to load the server-side `run_browser` tool lazily.
10868
10856
  *
10869
10857
  * @returns Loaded `run_browser` implementation
10858
+ *
10870
10859
  * @private internal utility for USE BROWSER commitment
10871
10860
  */
10872
10861
  function loadRunBrowserToolForNode() {
@@ -11236,9 +11225,7 @@ class ActionCommitmentDefinition extends BaseCommitmentDefinition {
11236
11225
  return this.appendToSystemMessage(requirements, actionSection, '\n\n');
11237
11226
  }
11238
11227
  }
11239
- /**
11240
- * Note: [💞] Ignore a discrepancy between file name and entity name
11241
- */
11228
+ // Note: [💞] Ignore a discrepancy between file name and entity name
11242
11229
 
11243
11230
  /**
11244
11231
  * CLOSED commitment definition
@@ -11304,9 +11291,7 @@ class ClosedCommitmentDefinition extends BaseCommitmentDefinition {
11304
11291
  };
11305
11292
  }
11306
11293
  }
11307
- /**
11308
- * Note: [💞] Ignore a discrepancy between file name and entity name
11309
- */
11294
+ // Note: [💞] Ignore a discrepancy between file name and entity name
11310
11295
 
11311
11296
  /**
11312
11297
  * COMPONENT commitment definition
@@ -11365,9 +11350,7 @@ class ComponentCommitmentDefinition extends BaseCommitmentDefinition {
11365
11350
  return this.appendToSystemMessage(requirements, componentSection, '\n\n');
11366
11351
  }
11367
11352
  }
11368
- /**
11369
- * Note: [💞] Ignore a discrepancy between file name and entity name
11370
- */
11353
+ // Note: [💞] Ignore a discrepancy between file name and entity name
11371
11354
 
11372
11355
  /**
11373
11356
  * DELETE commitment definition
@@ -11489,9 +11472,7 @@ class DeleteCommitmentDefinition extends BaseCommitmentDefinition {
11489
11472
  return this.appendToSystemMessage(requirements, deleteSection, '\n\n');
11490
11473
  }
11491
11474
  }
11492
- /**
11493
- * Note: [💞] Ignore a discrepancy between file name and entity name
11494
- */
11475
+ // Note: [💞] Ignore a discrepancy between file name and entity name
11495
11476
 
11496
11477
  /**
11497
11478
  * DICTIONARY commitment definition
@@ -11595,9 +11576,7 @@ class DictionaryCommitmentDefinition extends BaseCommitmentDefinition {
11595
11576
  };
11596
11577
  }
11597
11578
  }
11598
- /**
11599
- * Note: [💞] Ignore a discrepancy between file name and entity name
11600
- */
11579
+ // Note: [💞] Ignore a discrepancy between file name and entity name
11601
11580
 
11602
11581
  /**
11603
11582
  * FORMAT commitment definition
@@ -11676,10 +11655,11 @@ class FormatCommitmentDefinition extends BaseCommitmentDefinition {
11676
11655
  return this.appendToSystemMessage(requirements, formatSection, '\n\n');
11677
11656
  }
11678
11657
  }
11658
+ // Note: [💞] Ignore a discrepancy between file name and entity name
11659
+
11679
11660
  /**
11680
- * Note: [💞] Ignore a discrepancy between file name and entity name
11661
+ * Collection of firstnames.
11681
11662
  */
11682
-
11683
11663
  const FIRSTNAMES = [
11684
11664
  'Paul',
11685
11665
  'George',
@@ -11716,6 +11696,9 @@ const FIRSTNAMES = [
11716
11696
  'Anthony',
11717
11697
  'Christopher',
11718
11698
  ];
11699
+ /**
11700
+ * Collection of lastnames with colors.
11701
+ */
11719
11702
  const LASTNAMES_WITH_COLORS = [
11720
11703
  { lastname: 'Green', color: '#008000' },
11721
11704
  { lastname: 'Brown', color: '#A52A2A' },
@@ -11743,6 +11726,7 @@ function pickDeterministicItem(hash, startIndex, list) {
11743
11726
  *
11744
11727
  * @param seed - Input seed used to derive a stable pseudonym.
11745
11728
  * @returns Deterministic English full name with color metadata.
11729
+ *
11746
11730
  * @private internal helper for deterministic pseudonym generation
11747
11731
  */
11748
11732
  function generateDeterministicEnglishName(seed) {
@@ -11784,6 +11768,9 @@ const VOID_PSEUDO_AGENT_ALIAS_KEYS = ['void', 'null', 'none', 'nil'];
11784
11768
  * Legacy aliases that historically behaved like `FROM VOID`.
11785
11769
  */
11786
11770
  const LEGACY_VOID_ALIASES = new Set(VOID_PSEUDO_AGENT_ALIAS_KEYS);
11771
+ /**
11772
+ * Constant for void alias entries.
11773
+ */
11787
11774
  const VOID_ALIAS_ENTRIES = VOID_PSEUDO_AGENT_ALIAS_KEYS.map((alias) => [
11788
11775
  alias,
11789
11776
  'VOID',
@@ -11832,6 +11819,7 @@ function normalizePseudoReferenceKey(rawReference) {
11832
11819
  *
11833
11820
  * @param rawReference - Raw reference token or payload.
11834
11821
  * @returns Pseudo-agent kind or `null` when the reference is not pseudo.
11822
+ *
11835
11823
  * @private internal utility of pseudo-agent resolution
11836
11824
  */
11837
11825
  function resolvePseudoAgentKindFromReference(rawReference) {
@@ -11846,6 +11834,7 @@ function resolvePseudoAgentKindFromReference(rawReference) {
11846
11834
  *
11847
11835
  * @param agentUrl - URL to inspect.
11848
11836
  * @returns Pseudo-agent kind or `null` when the URL is not pseudo.
11837
+ *
11849
11838
  * @private internal utility of pseudo-agent resolution
11850
11839
  */
11851
11840
  function resolvePseudoAgentKindFromUrl(agentUrl) {
@@ -11866,6 +11855,7 @@ function resolvePseudoAgentKindFromUrl(agentUrl) {
11866
11855
  *
11867
11856
  * @param teamCommitmentContent - TEAM commitment content after reference resolution.
11868
11857
  * @returns Deterministic English full name representing pseudo-user in that TEAM context.
11858
+ *
11869
11859
  * @private internal utility of TEAM commitment rendering
11870
11860
  */
11871
11861
  function createPseudoUserTeammateLabel(teamCommitmentContent) {
@@ -11881,6 +11871,7 @@ function createPseudoUserTeammateLabel(teamCommitmentContent) {
11881
11871
  *
11882
11872
  * @param rawReference - Raw reference content.
11883
11873
  * @returns True when the reference maps to void.
11874
+ *
11884
11875
  * @private internal utility of pseudo-agent resolution
11885
11876
  */
11886
11877
  function isVoidPseudoAgentReference(rawReference) {
@@ -11894,9 +11885,7 @@ function isVoidPseudoAgentReference(rawReference) {
11894
11885
  const normalizedReference = normalizePseudoReferenceKey(rawReference);
11895
11886
  return LEGACY_VOID_ALIASES.has(normalizedReference);
11896
11887
  }
11897
- /**
11898
- * Note: [💞] Ignore a discrepancy between file name and entity name
11899
- */
11888
+ // Note: [💞] Ignore a discrepancy between file name and entity name
11900
11889
 
11901
11890
  /**
11902
11891
  * FROM commitment definition
@@ -11975,9 +11964,7 @@ class FromCommitmentDefinition extends BaseCommitmentDefinition {
11975
11964
  };
11976
11965
  }
11977
11966
  }
11978
- /**
11979
- * Note: [💞] Ignore a discrepancy between file name and entity name
11980
- */
11967
+ // Note: [💞] Ignore a discrepancy between file name and entity name
11981
11968
 
11982
11969
  /**
11983
11970
  * GOAL commitment definition
@@ -12075,9 +12062,7 @@ class GoalCommitmentDefinition extends BaseCommitmentDefinition {
12075
12062
  return this.appendToPromptSuffix(requirementsWithGoal, goalSection);
12076
12063
  }
12077
12064
  }
12078
- /**
12079
- * Note: [💞] Ignore a discrepancy between file name and entity name
12080
- */
12065
+ // Note: [💞] Ignore a discrepancy between file name and entity name
12081
12066
 
12082
12067
  /**
12083
12068
  * IMPORT commitment definition
@@ -12156,19 +12141,26 @@ class ImportCommitmentDefinition extends BaseCommitmentDefinition {
12156
12141
  `));
12157
12142
  }
12158
12143
  }
12144
+ // Note: [💞] Ignore a discrepancy between file name and entity name
12145
+
12159
12146
  /**
12160
- * Note: [💞] Ignore a discrepancy between file name and entity name
12147
+ * Matches URL-like candidates inside arbitrary text.
12148
+ *
12149
+ * @private
12161
12150
  */
12162
-
12163
- /** @private Matches URL-like candidates inside arbitrary text. */
12164
12151
  const URL_CANDIDATE_PATTERN = /https?:\/\/[^\s<>"'`]+/g;
12165
- /** @private Trims punctuation that commonly trails URLs in prose. */
12152
+ /**
12153
+ * Trims punctuation that commonly trails URLs in prose.
12154
+ *
12155
+ * @private
12156
+ */
12166
12157
  const TRAILING_PUNCTUATION_PATTERN = /[.,!?;:'"`]+$/;
12167
12158
  /**
12168
12159
  * Extracts all valid URLs from arbitrary text while removing common trailing punctuation.
12169
12160
  *
12170
12161
  * @param text - Input text that may contain one or more URLs.
12171
12162
  * @returns Unique URLs in their first-seen order.
12163
+ *
12172
12164
  * @private utility of KNOWLEDGE parsing
12173
12165
  */
12174
12166
  function extractUrlsFromText(text) {
@@ -12198,7 +12190,9 @@ function extractUrlsFromText(text) {
12198
12190
  return urls;
12199
12191
  }
12200
12192
  /**
12201
- * @private Normalizes one extracted URL candidate by stripping trailing punctuation and unmatched closing wrappers.
12193
+ * Normalizes one extracted URL candidate by stripping trailing punctuation and unmatched closing wrappers.
12194
+ *
12195
+ * @private
12202
12196
  */
12203
12197
  function normalizeUrlCandidate(candidate) {
12204
12198
  let normalized = candidate.trim();
@@ -12218,7 +12212,9 @@ function normalizeUrlCandidate(candidate) {
12218
12212
  return normalized;
12219
12213
  }
12220
12214
  /**
12221
- * @private Removes trailing closing wrappers when they are unmatched in the candidate.
12215
+ * Removes trailing closing wrappers when they are unmatched in the candidate.
12216
+ *
12217
+ * @private
12222
12218
  */
12223
12219
  function stripTrailingUnmatchedClosing(candidate, openingChar, closingChar) {
12224
12220
  let normalized = candidate;
@@ -12233,7 +12229,9 @@ function stripTrailingUnmatchedClosing(candidate, openingChar, closingChar) {
12233
12229
  return normalized;
12234
12230
  }
12235
12231
  /**
12236
- * @private Counts character occurrences in a string.
12232
+ * Counts character occurrences in a string.
12233
+ *
12234
+ * @private
12237
12235
  */
12238
12236
  function countOccurrences(value, searchedChar) {
12239
12237
  let count = 0;
@@ -12245,14 +12243,28 @@ function countOccurrences(value, searchedChar) {
12245
12243
  return count;
12246
12244
  }
12247
12245
 
12248
- /** @private The default base name for inline knowledge files when the content lacks identifying text */
12246
+ /**
12247
+ * The default base name for inline knowledge files when the content lacks identifying text.
12248
+ *
12249
+ * @private
12250
+ */
12249
12251
  const INLINE_KNOWLEDGE_BASE_NAME = 'inline-knowledge';
12250
- /** @private The default file extension used for inline knowledge uploads */
12252
+ /**
12253
+ * The default file extension used for inline knowledge uploads.
12254
+ *
12255
+ * @private
12256
+ */
12251
12257
  const INLINE_KNOWLEDGE_EXTENSION = '.txt';
12252
- /** @private Prefix that identifies base64 data URLs */
12258
+ /**
12259
+ * Prefix that identifies base64 data URLs.
12260
+ *
12261
+ * @private
12262
+ */
12253
12263
  const DATA_URL_PREFIX = 'data:';
12254
12264
  /**
12255
- * @private Retrieves the first meaningful line from the inline content.
12265
+ * Retrieves the first meaningful line from the inline content.
12266
+ *
12267
+ * @private
12256
12268
  */
12257
12269
  function getFirstNonEmptyLine(content) {
12258
12270
  const lines = content.split(/\r?\n/);
@@ -12265,7 +12277,9 @@ function getFirstNonEmptyLine(content) {
12265
12277
  return null;
12266
12278
  }
12267
12279
  /**
12268
- * @private Determines the base file name by normalizing the first non-empty line.
12280
+ * Determines the base file name by normalizing the first non-empty line.
12281
+ *
12282
+ * @private
12269
12283
  */
12270
12284
  function deriveBaseFilename(content) {
12271
12285
  const firstLine = getFirstNonEmptyLine(content);
@@ -12276,7 +12290,9 @@ function deriveBaseFilename(content) {
12276
12290
  return normalized || INLINE_KNOWLEDGE_BASE_NAME;
12277
12291
  }
12278
12292
  /**
12279
- * @private Converts inline knowledge into the internal metadata form used for uploads.
12293
+ * Converts inline knowledge into the internal metadata form used for uploads.
12294
+ *
12295
+ * @private
12280
12296
  */
12281
12297
  function createInlineKnowledgeSourceFile(content) {
12282
12298
  const trimmedContent = content.trim();
@@ -12299,7 +12315,9 @@ function isDataUrlKnowledgeSource(source) {
12299
12315
  return typeof source === 'string' && source.startsWith(DATA_URL_PREFIX);
12300
12316
  }
12301
12317
  /**
12302
- * @private Converts a stored inline knowledge file into a data URL for backwards compatibility.
12318
+ * Converts a stored inline knowledge file into a data URL for backwards compatibility.
12319
+ *
12320
+ * @private
12303
12321
  */
12304
12322
  function inlineKnowledgeSourceToDataUrl(source) {
12305
12323
  const base64 = source.buffer.toString('base64');
@@ -12359,9 +12377,7 @@ function parseDataUrlKnowledgeSource(source) {
12359
12377
  return null;
12360
12378
  }
12361
12379
  }
12362
- /**
12363
- * Note: [💞] Ignore a discrepancy between file name and entity name
12364
- */
12380
+ // Note: [💞] Ignore a discrepancy between file name and entity name
12365
12381
 
12366
12382
  /**
12367
12383
  * KNOWLEDGE commitment definition
@@ -12565,9 +12581,7 @@ class LanguageCommitmentDefinition extends BaseCommitmentDefinition {
12565
12581
  return this.appendToSystemMessage(requirements, languageSection, '\n\n');
12566
12582
  }
12567
12583
  }
12568
- /**
12569
- * Note: [💞] Ignore a discrepancy between file name and entity name
12570
- */
12584
+ // Note: [💞] Ignore a discrepancy between file name and entity name
12571
12585
 
12572
12586
  /**
12573
12587
  * @@@
@@ -12833,6 +12847,7 @@ function serializeToolRuntimeContext(context) {
12833
12847
  *
12834
12848
  * @param listener - Listener notified about tool progress.
12835
12849
  * @returns Hidden token used to route progress updates.
12850
+ *
12836
12851
  * @private internal runtime wiring for commitment tools
12837
12852
  */
12838
12853
  function registerToolCallProgressListener(listener) {
@@ -12845,14 +12860,13 @@ function registerToolCallProgressListener(listener) {
12845
12860
  * Unregisters one in-memory progress listener.
12846
12861
  *
12847
12862
  * @param token - Token previously created by `registerToolCallProgressListener`.
12863
+ *
12848
12864
  * @private internal runtime wiring for commitment tools
12849
12865
  */
12850
12866
  function unregisterToolCallProgressListener(token) {
12851
12867
  toolCallProgressListeners.delete(token);
12852
12868
  }
12853
- /**
12854
- * Note: [💞] Ignore a discrepancy between file name and entity name
12855
- */
12869
+ // Note: [💞] Ignore a discrepancy between file name and entity name
12856
12870
 
12857
12871
  /**
12858
12872
  * Resolves runtime context from hidden tool arguments.
@@ -13213,9 +13227,7 @@ class MemoryCommitmentDefinition extends BaseCommitmentDefinition {
13213
13227
  return createMemoryToolFunctions();
13214
13228
  }
13215
13229
  }
13216
- /**
13217
- * Note: [💞] Ignore a discrepancy between file name and entity name
13218
- */
13230
+ // Note: [💞] Ignore a discrepancy between file name and entity name
13219
13231
 
13220
13232
  /**
13221
13233
  * AGENT MESSAGE commitment definition
@@ -13545,9 +13557,7 @@ class MessageCommitmentDefinition extends BaseCommitmentDefinition {
13545
13557
  return this.appendToSystemMessage(requirements, messageSection, '\n\n');
13546
13558
  }
13547
13559
  }
13548
- /**
13549
- * Note: [💞] Ignore a discrepancy between file name and entity name
13550
- */
13560
+ // Note: [💞] Ignore a discrepancy between file name and entity name
13551
13561
 
13552
13562
  /**
13553
13563
  * USER MESSAGE commitment definition
@@ -13678,9 +13688,7 @@ class MessageSuffixCommitmentDefinition extends BaseCommitmentDefinition {
13678
13688
  return requirements;
13679
13689
  }
13680
13690
  }
13681
- /**
13682
- * Note: [💞] Ignore a discrepancy between file name and entity name
13683
- */
13691
+ // Note: [💞] Ignore a discrepancy between file name and entity name
13684
13692
 
13685
13693
  /**
13686
13694
  * META commitment definition
@@ -13827,9 +13835,7 @@ class MetaCommitmentDefinition extends BaseCommitmentDefinition {
13827
13835
  return knownTypes.includes(metaType.toUpperCase());
13828
13836
  }
13829
13837
  }
13830
- /**
13831
- * Note: [💞] Ignore a discrepancy between file name and entity name
13832
- */
13838
+ // Note: [💞] Ignore a discrepancy between file name and entity name
13833
13839
 
13834
13840
  /**
13835
13841
  * META COLOR commitment definition
@@ -13925,9 +13931,7 @@ class MetaColorCommitmentDefinition extends BaseCommitmentDefinition {
13925
13931
  return trimmedContent || null;
13926
13932
  }
13927
13933
  }
13928
- /**
13929
- * Note: [💞] Ignore a discrepancy between file name and entity name
13930
- */
13934
+ // Note: [💞] Ignore a discrepancy between file name and entity name
13931
13935
 
13932
13936
  /**
13933
13937
  * META DOMAIN commitment definition
@@ -13992,9 +13996,7 @@ class MetaDomainCommitmentDefinition extends BaseCommitmentDefinition {
13992
13996
  return trimmedContent || null;
13993
13997
  }
13994
13998
  }
13995
- /**
13996
- * Note: [💞] Ignore a discrepancy between file name and entity name
13997
- */
13999
+ // Note: [💞] Ignore a discrepancy between file name and entity name
13998
14000
 
13999
14001
  /**
14000
14002
  * META DISCLAIMER commitment definition
@@ -14062,9 +14064,7 @@ class MetaDisclaimerCommitmentDefinition extends BaseCommitmentDefinition {
14062
14064
  return requirements;
14063
14065
  }
14064
14066
  }
14065
- /**
14066
- * Note: [💞] Ignore a discrepancy between file name and entity name
14067
- */
14067
+ // Note: [💞] Ignore a discrepancy between file name and entity name
14068
14068
 
14069
14069
  /**
14070
14070
  * META FONT commitment definition
@@ -14147,9 +14147,7 @@ class MetaFontCommitmentDefinition extends BaseCommitmentDefinition {
14147
14147
  return trimmedContent || null;
14148
14148
  }
14149
14149
  }
14150
- /**
14151
- * Note: [💞] Ignore a discrepancy between file name and entity name
14152
- */
14150
+ // Note: [💞] Ignore a discrepancy between file name and entity name
14153
14151
 
14154
14152
  /**
14155
14153
  * META IMAGE commitment definition
@@ -14234,9 +14232,7 @@ class MetaImageCommitmentDefinition extends BaseCommitmentDefinition {
14234
14232
  return trimmedContent || null;
14235
14233
  }
14236
14234
  }
14237
- /**
14238
- * Note: [💞] Ignore a discrepancy between file name and entity name
14239
- */
14235
+ // Note: [💞] Ignore a discrepancy between file name and entity name
14240
14236
 
14241
14237
  /**
14242
14238
  * META INPUT PLACEHOLDER commitment definition.
@@ -14299,9 +14295,7 @@ class MetaInputPlaceholderCommitmentDefinition extends BaseCommitmentDefinition
14299
14295
  return trimmedContent || null;
14300
14296
  }
14301
14297
  }
14302
- /**
14303
- * Note: [💞] Ignore a discrepancy between file name and entity name
14304
- */
14298
+ // Note: [💞] Ignore a discrepancy between file name and entity name
14305
14299
 
14306
14300
  /**
14307
14301
  * META LINK commitment definition
@@ -14408,9 +14402,7 @@ class MetaLinkCommitmentDefinition extends BaseCommitmentDefinition {
14408
14402
  }
14409
14403
  }
14410
14404
  }
14411
- /**
14412
- * Note: [💞] Ignore a discrepancy between file name and entity name
14413
- */
14405
+ // Note: [💞] Ignore a discrepancy between file name and entity name
14414
14406
 
14415
14407
  /**
14416
14408
  * META VOICE commitment definition
@@ -14479,9 +14471,7 @@ class MetaVoiceCommitmentDefinition extends BaseCommitmentDefinition {
14479
14471
  return trimmedContent || null;
14480
14472
  }
14481
14473
  }
14482
- /**
14483
- * Note: [💞] Ignore a discrepancy between file name and entity name
14484
- */
14474
+ // Note: [💞] Ignore a discrepancy between file name and entity name
14485
14475
 
14486
14476
  /**
14487
14477
  * MODEL commitment definition
@@ -14719,9 +14709,7 @@ class ModelCommitmentDefinition extends BaseCommitmentDefinition {
14719
14709
  return result;
14720
14710
  }
14721
14711
  }
14722
- /**
14723
- * Note: [💞] Ignore a discrepancy between file name and entity name
14724
- */
14712
+ // Note: [💞] Ignore a discrepancy between file name and entity name
14725
14713
 
14726
14714
  /**
14727
14715
  * NOTE commitment definition
@@ -14883,9 +14871,7 @@ class OpenCommitmentDefinition extends BaseCommitmentDefinition {
14883
14871
  };
14884
14872
  }
14885
14873
  }
14886
- /**
14887
- * Note: [💞] Ignore a discrepancy between file name and entity name
14888
- */
14874
+ // Note: [💞] Ignore a discrepancy between file name and entity name
14889
14875
 
14890
14876
  /**
14891
14877
  * PERSONA commitment definition
@@ -15024,9 +15010,7 @@ class PersonaCommitmentDefinition extends BaseCommitmentDefinition {
15024
15010
  };
15025
15011
  }
15026
15012
  }
15027
- /**
15028
- * Note: [💞] Ignore a discrepancy between file name and entity name
15029
- */
15013
+ // Note: [💞] Ignore a discrepancy between file name and entity name
15030
15014
 
15031
15015
  /**
15032
15016
  * RULE commitment definition
@@ -15107,15 +15091,14 @@ class RuleCommitmentDefinition extends BaseCommitmentDefinition {
15107
15091
  return this.appendToPromptSuffix(requirementsWithRule, ruleSection);
15108
15092
  }
15109
15093
  }
15110
- /**
15111
- * Note: [💞] Ignore a discrepancy between file name and entity name
15112
- */
15094
+ // Note: [💞] Ignore a discrepancy between file name and entity name
15113
15095
 
15114
15096
  /**
15115
15097
  * Creates the canonical system-message body for one writing-sample commitment.
15116
15098
  *
15117
15099
  * @param content - Explicit 1:1 sample text.
15118
15100
  * @returns Writing-sample guidance ready for one system-message section.
15101
+ *
15119
15102
  * @private internal utility of writing commitments
15120
15103
  */
15121
15104
  function createWritingSampleSection(content) {
@@ -15133,6 +15116,7 @@ function createWritingSampleSection(content) {
15133
15116
  *
15134
15117
  * @param content - Writing-only instructions.
15135
15118
  * @returns Writing-rules guidance ready for one system-message section.
15119
+ *
15136
15120
  * @private internal utility of writing commitments
15137
15121
  */
15138
15122
  function createWritingRulesSection(content) {
@@ -15145,9 +15129,7 @@ function createWritingRulesSection(content) {
15145
15129
  ${content}
15146
15130
  `);
15147
15131
  }
15148
- /**
15149
- * Note: [💞] Ignore a discrepancy between file name and entity name
15150
- */
15132
+ // Note: [💞] Ignore a discrepancy between file name and entity name
15151
15133
 
15152
15134
  /**
15153
15135
  * Legacy `SAMPLE` / `EXAMPLE` commitment definition.
@@ -15226,9 +15208,7 @@ class SampleCommitmentDefinition extends BaseCommitmentDefinition {
15226
15208
  return this.appendToSystemMessage(requirements, this.createSystemMessageSection('Writing sample', createWritingSampleSection(trimmedContent)), '\n\n');
15227
15209
  }
15228
15210
  }
15229
- /**
15230
- * Note: [💞] Ignore a discrepancy between file name and entity name
15231
- */
15211
+ // Note: [💞] Ignore a discrepancy between file name and entity name
15232
15212
 
15233
15213
  /**
15234
15214
  * SCENARIO commitment definition
@@ -15350,9 +15330,7 @@ class ScenarioCommitmentDefinition extends BaseCommitmentDefinition {
15350
15330
  return this.appendToSystemMessage(requirements, scenarioSection, '\n\n');
15351
15331
  }
15352
15332
  }
15353
- /**
15354
- * Note: [💞] Ignore a discrepancy between file name and entity name
15355
- */
15333
+ // Note: [💞] Ignore a discrepancy between file name and entity name
15356
15334
 
15357
15335
  /**
15358
15336
  * STYLE commitment definition
@@ -15449,6 +15427,7 @@ const TEAM_TOOL_FALLBACK_NAME = 'teammate';
15449
15427
  *
15450
15428
  * @param teammateLabel - Human-readable teammate label.
15451
15429
  * @returns Normalized teammate identifier for TEAM tool names.
15430
+ *
15452
15431
  * @private internal helper of TEAM tool-name generation
15453
15432
  */
15454
15433
  function normalizeTeammateToolNamePart(teammateLabel) {
@@ -15464,6 +15443,7 @@ function normalizeTeammateToolNamePart(teammateLabel) {
15464
15443
  * @param _teammateUrl - Canonical teammate URL (kept for API compatibility, not used).
15465
15444
  * @param teammateLabel - Human-readable teammate label used as the basis for the name.
15466
15445
  * @returns TEAM tool name derived from the label.
15446
+ *
15467
15447
  * @private internal utility of TEAM commitments and chat UI mapping
15468
15448
  */
15469
15449
  function createTeamToolName(_teammateUrl, teammateLabel) {
@@ -15471,9 +15451,21 @@ function createTeamToolName(_teammateUrl, teammateLabel) {
15471
15451
  return `${TEAM_TOOL_PREFIX}${normalizedLabel}`;
15472
15452
  }
15473
15453
 
15454
+ /**
15455
+ * Pattern matching agent URLs inside TEAM commitment content.
15456
+ */
15474
15457
  const urlRegex = /https?:\/\/[^\s]+/gi;
15458
+ /**
15459
+ * Pattern matching punctuation that often trails teammate URLs in prose.
15460
+ */
15475
15461
  const trailingPunctuationRegex = /[),.;!?]+$/;
15462
+ /**
15463
+ * Clause separators used while splitting TEAM instruction context.
15464
+ */
15476
15465
  const clauseSeparators = ['.', '?', '!', ';', ','];
15466
+ /**
15467
+ * Conjunction separators used while splitting TEAM instruction context.
15468
+ */
15477
15469
  const conjunctionSeparators = [' and ', ' or '];
15478
15470
  /**
15479
15471
  * Parses TEAM commitment content into teammates with instructions.
@@ -15521,6 +15513,9 @@ function parseTeamCommitmentContent(content, options = {}) {
15521
15513
  }
15522
15514
  return teammates;
15523
15515
  }
15516
+ /**
15517
+ * Extracts the instruction fragment associated with one teammate URL.
15518
+ */
15524
15519
  function extractInstructionContext(line, matches, matchIndex) {
15525
15520
  var _a;
15526
15521
  const match = matches[matchIndex];
@@ -15546,6 +15541,9 @@ function extractInstructionContext(line, matches, matchIndex) {
15546
15541
  }
15547
15542
  return `${prefix} ${suffix}`.trim();
15548
15543
  }
15544
+ /**
15545
+ * Trims content after the last detected clause delimiter.
15546
+ */
15549
15547
  function trimAfterLastDelimiter(text) {
15550
15548
  const match = findLastDelimiter(text);
15551
15549
  if (!match) {
@@ -15553,6 +15551,9 @@ function trimAfterLastDelimiter(text) {
15553
15551
  }
15554
15552
  return text.slice(match.index + match.length);
15555
15553
  }
15554
+ /**
15555
+ * Trims content before the last detected clause delimiter.
15556
+ */
15556
15557
  function trimBeforeLastDelimiter(text) {
15557
15558
  const cleaned = text.replace(/^[,;:]\s*/g, '');
15558
15559
  const match = findLastDelimiter(cleaned);
@@ -15561,6 +15562,9 @@ function trimBeforeLastDelimiter(text) {
15561
15562
  }
15562
15563
  return cleaned.slice(0, match.index);
15563
15564
  }
15565
+ /**
15566
+ * Finds the last clause or conjunction delimiter in a string.
15567
+ */
15564
15568
  function findLastDelimiter(text) {
15565
15569
  let bestIndex = -1;
15566
15570
  let bestLength = 0;
@@ -15584,6 +15588,9 @@ function findLastDelimiter(text) {
15584
15588
  }
15585
15589
  return { index: bestIndex, length: bestLength };
15586
15590
  }
15591
+ /**
15592
+ * Normalizes teammate instruction text after URL extraction.
15593
+ */
15587
15594
  function normalizeInstructionText(text) {
15588
15595
  if (!text) {
15589
15596
  return '';
@@ -15597,6 +15604,9 @@ function normalizeInstructionText(text) {
15597
15604
  normalized = normalizeWhitespaces(normalized).trim();
15598
15605
  return normalized;
15599
15606
  }
15607
+ /**
15608
+ * Creates a readable teammate label from an agent URL.
15609
+ */
15600
15610
  function createTeammateLabel(url) {
15601
15611
  try {
15602
15612
  const parsed = new URL(url);
@@ -15616,12 +15626,19 @@ function createTeammateLabel(url) {
15616
15626
  return url;
15617
15627
  }
15618
15628
  }
15629
+ // Note: [💞] Ignore a discrepancy between file name and entity name
15630
+
15619
15631
  /**
15620
- * Note: [💞] Ignore a discrepancy between file name and entity name
15632
+ * Map of team tool functions.
15621
15633
  */
15622
-
15623
15634
  const teamToolFunctions = {};
15635
+ /**
15636
+ * Map of team tool titles.
15637
+ */
15624
15638
  const teamToolTitles = {};
15639
+ /**
15640
+ * Constant for remote agents by Url.
15641
+ */
15625
15642
  const remoteAgentsByUrl = new Map();
15626
15643
  /**
15627
15644
  * TEAM commitment definition
@@ -15985,9 +16002,7 @@ function createTeamToolFunction(entry) {
15985
16002
  return JSON.stringify(result);
15986
16003
  };
15987
16004
  }
15988
- /**
15989
- * Note: [💞] Ignore a discrepancy between file name and entity name
15990
- */
16005
+ // Note: [💞] Ignore a discrepancy between file name and entity name
15991
16006
 
15992
16007
  /**
15993
16008
  * TEMPLATE commitment definition
@@ -16108,9 +16123,7 @@ class TemplateCommitmentDefinition extends BaseCommitmentDefinition {
16108
16123
  };
16109
16124
  }
16110
16125
  }
16111
- /**
16112
- * Note: [💞] Ignore a discrepancy between file name and entity name
16113
- */
16126
+ // Note: [💞] Ignore a discrepancy between file name and entity name
16114
16127
 
16115
16128
  /**
16116
16129
  * USE commitment definition
@@ -16222,9 +16235,7 @@ class UseCommitmentDefinition extends BaseCommitmentDefinition {
16222
16235
  return knownTypes.includes(useType.toUpperCase());
16223
16236
  }
16224
16237
  }
16225
- /**
16226
- * Note: [💞] Ignore a discrepancy between file name and entity name
16227
- */
16238
+ // Note: [💞] Ignore a discrepancy between file name and entity name
16228
16239
 
16229
16240
  /**
16230
16241
  * All `USE` commitment types currently participating in final system-message aggregation.
@@ -16247,6 +16258,7 @@ const AGGREGATED_USE_COMMITMENT_PLACEHOLDER_PREFIX = '# AGGREGATED USE COMMITMEN
16247
16258
  *
16248
16259
  * @param type - Commitment type to check.
16249
16260
  * @returns `true` when the commitment participates in `USE` system-message aggregation.
16261
+ *
16250
16262
  * @private internal utility of `aggregateUseCommitmentSystemMessages`
16251
16263
  */
16252
16264
  function isAggregatedUseCommitmentType(type) {
@@ -16257,6 +16269,7 @@ function isAggregatedUseCommitmentType(type) {
16257
16269
  *
16258
16270
  * @param type - Aggregated `USE` commitment type.
16259
16271
  * @returns Single-line placeholder comment stored in the interim system message.
16272
+ *
16260
16273
  * @private internal utility of `appendAggregatedUseCommitmentPlaceholder`
16261
16274
  */
16262
16275
  function getAggregatedUseCommitmentPlaceholder(type) {
@@ -16267,6 +16280,7 @@ function getAggregatedUseCommitmentPlaceholder(type) {
16267
16280
  *
16268
16281
  * @param additionalInstructions - Deduplicated instruction blocks collected from the agent source.
16269
16282
  * @returns Combined instruction text ready for `formatOptionalInstructionBlock`.
16283
+ *
16270
16284
  * @private internal utility of `createAggregatedUseCommitmentSystemMessage`
16271
16285
  */
16272
16286
  function combineAdditionalInstructions(additionalInstructions) {
@@ -16278,6 +16292,7 @@ function combineAdditionalInstructions(additionalInstructions) {
16278
16292
  * @param type - Aggregated `USE` commitment type.
16279
16293
  * @param additionalInstructions - Distinct additional instructions in source order.
16280
16294
  * @returns Final system-message block for the commitment type.
16295
+ *
16281
16296
  * @private internal utility of `aggregateUseCommitmentSystemMessages`
16282
16297
  */
16283
16298
  function createAggregatedUseCommitmentSystemMessage(type, additionalInstructions) {
@@ -16316,6 +16331,7 @@ function createAggregatedUseCommitmentSystemMessage(type, additionalInstructions
16316
16331
  * @param requirements - Current model requirements.
16317
16332
  * @param type - Aggregated `USE` commitment type being applied.
16318
16333
  * @returns Requirements with the placeholder inserted when it was not already present.
16334
+ *
16319
16335
  * @private internal utility of `USE` commitments
16320
16336
  */
16321
16337
  function appendAggregatedUseCommitmentPlaceholder(requirements, type) {
@@ -16339,6 +16355,7 @@ function appendAggregatedUseCommitmentPlaceholder(requirements, type) {
16339
16355
  * @param requirements - Model requirements produced by commitment-by-commitment application.
16340
16356
  * @param commitments - Filtered commitments in their original source order.
16341
16357
  * @returns Requirements with aggregated `USE` system-message sections.
16358
+ *
16342
16359
  * @private internal utility of `createAgentModelRequirementsWithCommitments`
16343
16360
  */
16344
16361
  function aggregateUseCommitmentSystemMessages(requirements, commitments) {
@@ -16631,9 +16648,7 @@ class UseBrowserCommitmentDefinition extends BaseCommitmentDefinition {
16631
16648
  };
16632
16649
  }
16633
16650
  }
16634
- /**
16635
- * Note: [💞] Ignore a discrepancy between file name and entity name
16636
- */
16651
+ // Note: [💞] Ignore a discrepancy between file name and entity name
16637
16652
 
16638
16653
  /**
16639
16654
  * Base Google Calendar API URL.
@@ -16904,9 +16919,7 @@ function removeTokenFromLine(line, token) {
16904
16919
  const filteredTokens = tokens.filter((lineToken) => lineToken.replace(/[),.;:!?]+$/g, '') !== token);
16905
16920
  return filteredTokens.join(' ').trim();
16906
16921
  }
16907
- /**
16908
- * Note: [💞] Ignore a discrepancy between file name and entity name
16909
- */
16922
+ // Note: [💞] Ignore a discrepancy between file name and entity name
16910
16923
 
16911
16924
  /**
16912
16925
  * Wallet metadata used by USE CALENDAR when resolving Google Calendar credentials.
@@ -17857,9 +17870,7 @@ function addConfiguredCalendarIfMissing(configuredCalendars, calendarReference)
17857
17870
  ...(calendarReference.tokenRef ? { tokenRef: calendarReference.tokenRef } : {}),
17858
17871
  });
17859
17872
  }
17860
- /**
17861
- * Note: [💞] Ignore a discrepancy between file name and entity name
17862
- */
17873
+ // Note: [💞] Ignore a discrepancy between file name and entity name
17863
17874
 
17864
17875
  /**
17865
17876
  * Lightweight email token matcher used for `USE EMAIL` first-line parsing.
@@ -18125,9 +18136,7 @@ function addUseEmailTools(existingTools) {
18125
18136
  },
18126
18137
  ];
18127
18138
  }
18128
- /**
18129
- * Note: [💞] Ignore a discrepancy between file name and entity name
18130
- */
18139
+ // Note: [💞] Ignore a discrepancy between file name and entity name
18131
18140
 
18132
18141
  /**
18133
18142
  * USE IMAGE GENERATOR commitment definition
@@ -18218,9 +18227,7 @@ class UseImageGeneratorCommitmentDefinition extends BaseCommitmentDefinition {
18218
18227
  `));
18219
18228
  }
18220
18229
  }
18221
- /**
18222
- * Note: [💞] Ignore a discrepancy between file name and entity name
18223
- */
18230
+ // Note: [💞] Ignore a discrepancy between file name and entity name
18224
18231
 
18225
18232
  /**
18226
18233
  * USE MCP commitment definition
@@ -18295,9 +18302,7 @@ class UseMcpCommitmentDefinition extends BaseCommitmentDefinition {
18295
18302
  };
18296
18303
  }
18297
18304
  }
18298
- /**
18299
- * Note: [💞] Ignore a discrepancy between file name and entity name
18300
- */
18305
+ // Note: [💞] Ignore a discrepancy between file name and entity name
18301
18306
 
18302
18307
  /**
18303
18308
  * USE POPUP commitment definition
@@ -18433,9 +18438,7 @@ class UsePopupCommitmentDefinition extends BaseCommitmentDefinition {
18433
18438
  };
18434
18439
  }
18435
18440
  }
18436
- /**
18437
- * Note: [💞] Ignore a discrepancy between file name and entity name
18438
- */
18441
+ // Note: [💞] Ignore a discrepancy between file name and entity name
18439
18442
 
18440
18443
  /**
18441
18444
  * Tool name used by the USE PRIVACY commitment.
@@ -18607,9 +18610,7 @@ class UsePrivacyCommitmentDefinition extends BaseCommitmentDefinition {
18607
18610
  };
18608
18611
  }
18609
18612
  }
18610
- /**
18611
- * Note: [💞] Ignore a discrepancy between file name and entity name
18612
- */
18613
+ // Note: [💞] Ignore a discrepancy between file name and entity name
18613
18614
 
18614
18615
  /* eslint-disable no-magic-numbers */
18615
18616
  /**
@@ -19397,9 +19398,7 @@ function createGitHubRepositoryReference(owner, repository, defaultBranch) {
19397
19398
  defaultBranch,
19398
19399
  };
19399
19400
  }
19400
- /**
19401
- * Note: [💞] Ignore a discrepancy between file name and entity name
19402
- */
19401
+ // Note: [💞] Ignore a discrepancy between file name and entity name
19403
19402
 
19404
19403
  /**
19405
19404
  * Wallet metadata used by USE PROJECT when resolving GitHub credentials.
@@ -20258,9 +20257,7 @@ function addConfiguredProjectIfMissing(configuredProjects, repositoryReference)
20258
20257
  defaultBranch: repositoryReference.defaultBranch,
20259
20258
  });
20260
20259
  }
20261
- /**
20262
- * Note: [💞] Ignore a discrepancy between file name and entity name
20263
- */
20260
+ // Note: [💞] Ignore a discrepancy between file name and entity name
20264
20261
 
20265
20262
  /**
20266
20263
  * A search engine implementation that uses the SerpApi to fetch Google search results.
@@ -20471,9 +20468,7 @@ class UseSearchEngineCommitmentDefinition extends BaseCommitmentDefinition {
20471
20468
  };
20472
20469
  }
20473
20470
  }
20474
- /**
20475
- * Note: [💞] Ignore a discrepancy between file name and entity name
20476
- */
20471
+ // Note: [💞] Ignore a discrepancy between file name and entity name
20477
20472
 
20478
20473
  /**
20479
20474
  * Maximum allowed source length for create-agent payloads.
@@ -20670,9 +20665,7 @@ class UseSpawnCommitmentDefinition extends BaseCommitmentDefinition {
20670
20665
  };
20671
20666
  }
20672
20667
  }
20673
- /**
20674
- * Note: [💞] Ignore a discrepancy between file name and entity name
20675
- */
20668
+ // Note: [💞] Ignore a discrepancy between file name and entity name
20676
20669
 
20677
20670
  /**
20678
20671
  * Creates system-message instructions for `USE TIMEOUT`.
@@ -20737,9 +20730,7 @@ function parseToolExecutionEnvelope(rawValue) {
20737
20730
  return null;
20738
20731
  }
20739
20732
  }
20740
- /**
20741
- * Note: [💞] Ignore a discrepancy between file name and entity name
20742
- */
20733
+ // Note: [💞] Ignore a discrepancy between file name and entity name
20743
20734
 
20744
20735
  /**
20745
20736
  * Builds a disabled timeout-tool payload.
@@ -21473,9 +21464,7 @@ class UseTimeoutCommitmentDefinition extends BaseCommitmentDefinition {
21473
21464
  return createTimeoutToolFunctions();
21474
21465
  }
21475
21466
  }
21476
- /**
21477
- * Note: [💞] Ignore a discrepancy between file name and entity name
21478
- */
21467
+ // Note: [💞] Ignore a discrepancy between file name and entity name
21479
21468
 
21480
21469
  /**
21481
21470
  * USE TIME commitment definition
@@ -21622,9 +21611,7 @@ class UseTimeCommitmentDefinition extends BaseCommitmentDefinition {
21622
21611
  };
21623
21612
  }
21624
21613
  }
21625
- /**
21626
- * Note: [💞] Ignore a discrepancy between file name and entity name
21627
- */
21614
+ // Note: [💞] Ignore a discrepancy between file name and entity name
21628
21615
 
21629
21616
  /**
21630
21617
  * Tool name used by the USE USER LOCATION commitment.
@@ -21837,9 +21824,7 @@ class UseUserLocationCommitmentDefinition extends BaseCommitmentDefinition {
21837
21824
  };
21838
21825
  }
21839
21826
  }
21840
- /**
21841
- * Note: [💞] Ignore a discrepancy between file name and entity name
21842
- */
21827
+ // Note: [💞] Ignore a discrepancy between file name and entity name
21843
21828
 
21844
21829
  /**
21845
21830
  * `WRITING RULES` commitment definition.
@@ -21915,9 +21900,7 @@ class WritingRulesCommitmentDefinition extends BaseCommitmentDefinition {
21915
21900
  return this.appendToSystemMessage(requirements, this.createSystemMessageSection('Writing rules', createWritingRulesSection(trimmedContent)), '\n\n');
21916
21901
  }
21917
21902
  }
21918
- /**
21919
- * Note: [💞] Ignore a discrepancy between file name and entity name
21920
- */
21903
+ // Note: [💞] Ignore a discrepancy between file name and entity name
21921
21904
 
21922
21905
  /**
21923
21906
  * `WRITING SAMPLE` commitment definition.
@@ -21987,9 +21970,7 @@ class WritingSampleCommitmentDefinition extends BaseCommitmentDefinition {
21987
21970
  return this.appendToSystemMessage(requirements, this.createSystemMessageSection('Writing sample', createWritingSampleSection(trimmedContent)), '\n\n');
21988
21971
  }
21989
21972
  }
21990
- /**
21991
- * Note: [💞] Ignore a discrepancy between file name and entity name
21992
- */
21973
+ // Note: [💞] Ignore a discrepancy between file name and entity name
21993
21974
 
21994
21975
  /**
21995
21976
  * Placeholder commitment definition for commitments that are not yet implemented
@@ -22151,13 +22132,12 @@ const COMMITMENT_REGISTRY = [
22151
22132
  new NotYetImplementedCommitmentDefinition('CONTEXT'),
22152
22133
  // <- TODO: Prompt: Leverage aliases instead of duplicating commitment definitions
22153
22134
  ];
22154
- /**
22155
- * TODO: [🧠] Maybe create through standardized $register
22156
- * Note: [💞] Ignore a discrepancy between file name and entity name
22157
- */
22135
+ // TODO: [🧠] Maybe create through standardized $register
22136
+ // Note: [💞] Ignore a discrepancy between file name and entity name
22158
22137
 
22159
22138
  /**
22160
22139
  * Gets all available commitment definitions
22140
+ *
22161
22141
  * @returns Array of all commitment definitions
22162
22142
  *
22163
22143
  * @public exported from `@promptbook/core`
@@ -22170,6 +22150,7 @@ function getAllCommitmentDefinitions() {
22170
22150
  * Collects tool functions from all commitment definitions.
22171
22151
  *
22172
22152
  * @returns Map of tool function implementations.
22153
+ *
22173
22154
  * @private internal helper for commitment tool registry
22174
22155
  */
22175
22156
  function collectCommitmentToolFunctions() {
@@ -22191,6 +22172,7 @@ function collectCommitmentToolFunctions() {
22191
22172
  *
22192
22173
  * @param getFunctions - Provider of current tool functions.
22193
22174
  * @returns Proxy exposing tool functions as properties.
22175
+ *
22194
22176
  * @private internal helper for commitment tool registry
22195
22177
  */
22196
22178
  function createToolFunctionsProxy(getFunctions) {
@@ -22228,10 +22210,11 @@ function createToolFunctionsProxy(getFunctions) {
22228
22210
  },
22229
22211
  });
22230
22212
  }
22213
+ // Note: [💞] Ignore a discrepancy between file name and entity name
22214
+
22231
22215
  /**
22232
- * Note: [💞] Ignore a discrepancy between file name and entity name
22216
+ * Map of node tool functions.
22233
22217
  */
22234
-
22235
22218
  const nodeToolFunctions = {
22236
22219
  /**
22237
22220
  * @@@
@@ -22263,6 +22246,9 @@ const nodeToolFunctions = {
22263
22246
  spawn_agent: resolveSpawnAgentToolForNode(),
22264
22247
  // TODO: !!!! Unhardcode, make proper server function register from definitions
22265
22248
  };
22249
+ /**
22250
+ * Constant for node tool functions proxy.
22251
+ */
22266
22252
  const nodeToolFunctionsProxy = createToolFunctionsProxy(() => ({
22267
22253
  ...collectCommitmentToolFunctions(),
22268
22254
  ...nodeToolFunctions,
@@ -22286,10 +22272,8 @@ function getAllCommitmentsToolFunctionsForNode() {
22286
22272
  }
22287
22273
  return nodeToolFunctionsProxy;
22288
22274
  }
22289
- /**
22290
- * Note: [??] Code in this file should never be never released in packages that could be imported into browser environment
22291
- * TODO: [??] Unite `xxxForServer` and `xxxForNode` naming
22292
- */
22275
+ // Note: [??] Code in this file should never be never released in packages that could be imported into browser environment
22276
+ // TODO: [??] Unite `xxxForServer` and `xxxForNode` naming
22293
22277
 
22294
22278
  /**
22295
22279
  * Extracts exactly ONE code block from markdown.
@@ -22304,8 +22288,9 @@ function getAllCommitmentsToolFunctionsForNode() {
22304
22288
  *
22305
22289
  * @param markdown any valid markdown
22306
22290
  * @returns code block with language and content
22307
- * @public exported from `@promptbook/markdown-utils`
22308
22291
  * @throws {ParseError} if there is not exactly one code block in the markdown
22292
+ *
22293
+ * @public exported from `@promptbook/markdown-utils`
22309
22294
  */
22310
22295
  function extractOneBlockFromMarkdown(markdown) {
22311
22296
  const codeBlocks = extractAllBlocksFromMarkdown(markdown);
@@ -22318,9 +22303,7 @@ function extractOneBlockFromMarkdown(markdown) {
22318
22303
  }
22319
22304
  return codeBlocks[0];
22320
22305
  }
22321
- /***
22322
- * TODO: [🍓][🌻] Decide of this is internal utility, external util OR validator/postprocessor
22323
- */
22306
+ // TODO: [🍓][🌻] Decide of this is internal utility, external util OR validator/postprocessor
22324
22307
 
22325
22308
  /**
22326
22309
  * Extracts code block from markdown.
@@ -22333,8 +22316,9 @@ function extractOneBlockFromMarkdown(markdown) {
22333
22316
  * - `extractOneBlockFromMarkdown` extracts exactly one code block with language of the code block
22334
22317
  * - `extractAllBlocksFromMarkdown` extracts all code blocks with language of the code block
22335
22318
  *
22336
- * @public exported from `@promptbook/markdown-utils`
22337
22319
  * @throws {ParseError} if there is not exactly one code block in the markdown
22320
+ *
22321
+ * @public exported from `@promptbook/markdown-utils`
22338
22322
  */
22339
22323
  function extractBlock(markdown) {
22340
22324
  const { content } = extractOneBlockFromMarkdown(markdown);
@@ -22346,7 +22330,7 @@ function extractBlock(markdown) {
22346
22330
  *
22347
22331
  * Note: [🔂] This function is idempotent.
22348
22332
  * Note: This is useful for post-processing of the result of the chat LLM model
22349
- * when the model wraps the result in the (markdown) code block.
22333
+ * when the model wraps the result in the (markdown) code block.
22350
22334
  *
22351
22335
  * @public exported from `@promptbook/markdown-utils`
22352
22336
  */
@@ -22365,7 +22349,7 @@ function trimCodeBlock(value) {
22365
22349
  * Function trimEndOfCodeBlock will remove ending code block from the string if it is present.
22366
22350
  *
22367
22351
  * Note: This is useful for post-processing of the result of the completion LLM model
22368
- * if you want to start code block in the prompt but you don't want to end it in the result.
22352
+ * if you want to start code block in the prompt but you don't want to end it in the result.
22369
22353
  *
22370
22354
  * @public exported from `@promptbook/markdown-utils`
22371
22355
  */
@@ -22377,6 +22361,8 @@ function trimEndOfCodeBlock(value) {
22377
22361
  }
22378
22362
 
22379
22363
  /**
22364
+ * Collection of preserved.
22365
+ *
22380
22366
  * @private internal for `preserve`
22381
22367
  */
22382
22368
  const _preserved = [];
@@ -22386,21 +22372,20 @@ const _preserved = [];
22386
22372
  *
22387
22373
  * @param value any function to preserve
22388
22374
  * @returns nothing
22375
+ *
22389
22376
  * @private within the repository
22390
22377
  */
22391
22378
  function $preserve(...value) {
22392
22379
  _preserved.push(...value);
22393
22380
  }
22394
- /**
22395
- * Note: [💞] Ignore a discrepancy between file name and entity name
22396
- */
22381
+ // Note: [💞] Ignore a discrepancy between file name and entity name
22397
22382
 
22398
22383
  // Note: [💎]
22399
22384
  /**
22400
22385
  * ScriptExecutionTools for JavaScript implemented via eval
22401
22386
  *
22402
22387
  * Warning: It is used for testing and mocking
22403
- * **NOT intended to use in the production** due to its unsafe nature, use `JavascriptExecutionTools` instead.
22388
+ * **NOT intended to use in the production** due to its unsafe nature, use `JavascriptExecutionTools` instead.
22404
22389
  *
22405
22390
  * @public exported from `@promptbook/javascript`
22406
22391
  */
@@ -22595,15 +22580,14 @@ class JavascriptEvalExecutionTools {
22595
22580
  return result;
22596
22581
  }
22597
22582
  }
22598
- /**
22599
- * TODO: Put predefined functions (like removeQuotes, spaceTrim, etc.) into annotation OR pass into constructor
22600
- * TODO: [🧠][💙] Distinct between options passed into ExecutionTools and to ExecutionTools.execute
22601
- */
22583
+ // TODO: Put predefined functions (like removeQuotes, spaceTrim, etc.) into annotation OR pass into constructor
22584
+ // TODO: [🧠][💙] Distinct between options passed into ExecutionTools and to ExecutionTools.execute
22602
22585
 
22603
22586
  /**
22604
22587
  * Placeholder for better implementation of JavascriptExecutionTools - some proper sandboxing
22605
22588
  *
22606
22589
  * @alias JavascriptExecutionTools
22590
+ *
22607
22591
  * @public exported from `@promptbook/javascript`
22608
22592
  */
22609
22593
  const JavascriptExecutionTools = JavascriptEvalExecutionTools;
@@ -22620,13 +22604,15 @@ async function $provideScriptingForNode(options) {
22620
22604
  // TODO: [🔱] Do here auto-installation
22621
22605
  return [new JavascriptExecutionTools({ ...options, functions: getAllCommitmentsToolFunctionsForNode() })];
22622
22606
  }
22623
- /** Note: [🟢] Code for Node scraper registration helper [$provideScriptingForNode](src/scrapers/_common/register/$provideScriptingForNode.ts) should never be published into packages that could be imported into browser environment */
22624
- /** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
22607
+ // Note: [🟢] Code for Node scraper registration helper [$provideScriptingForNode](src/scrapers/_common/register/$provideScriptingForNode.ts) should never be published into packages that could be imported into browser environment
22608
+ // TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
22625
22609
 
22626
22610
  // TODO: [🥺] List running services from REMOTE_SERVER_URLS
22627
22611
  // TODO: [🥺] Import directly from YML
22628
22612
  /**
22629
- * @private [🥺] Decide how to expose this
22613
+ * [🥺] Decide how to expose this.
22614
+ *
22615
+ * @private
22630
22616
  */
22631
22617
  const openapiJson = {
22632
22618
  openapi: '3.0.0',
@@ -23217,23 +23203,36 @@ const openapiJson = {
23217
23203
  },
23218
23204
  ],
23219
23205
  };
23206
+ // Note: [💞] Ignore a discrepancy between file name and entity name
23207
+
23220
23208
  /**
23221
- * Note: [💞] Ignore a discrepancy between file name and entity name
23209
+ * Constant for h.
23222
23210
  */
23223
-
23224
23211
  const h = createElement;
23212
+ /**
23213
+ * Handles key val.
23214
+ */
23225
23215
  function KeyVal(props) {
23226
23216
  return h('div', { className: 'flex items-start gap-2' }, h('div', { className: 'font-semibold min-w-[14rem]' }, props.label), h('div', { className: 'text-gray-800' }, props.value));
23227
23217
  }
23218
+ /**
23219
+ * Handles list.
23220
+ */
23228
23221
  function List(props) {
23229
23222
  var _a;
23230
23223
  if (!((_a = props.items) === null || _a === void 0 ? void 0 : _a.length))
23231
23224
  return h('span', { className: 'text-gray-500' }, 'none');
23232
23225
  return h('ul', { className: 'list-disc ml-6' }, ...props.items.map((item, i) => h('li', { key: String(i), className: 'break-all' }, item)));
23233
23226
  }
23227
+ /**
23228
+ * Handles section.
23229
+ */
23234
23230
  function Section(props) {
23235
23231
  return h('section', { className: 'mt-8' }, h('h2', { className: 'text-xl font-semibold mb-2' }, props.title), props.children);
23236
23232
  }
23233
+ /**
23234
+ * Handles server body.
23235
+ */
23237
23236
  function ServerBody({ info }) {
23238
23237
  var _a;
23239
23238
  return h('div', { className: 'max-w-4xl mx-auto p-6' }, h('h1', { className: 'text-3xl font-bold mb-4' }, 'Promptbook Server'), h('div', { className: 'space-y-2' }, h(KeyVal, { label: 'Book language version:', value: info.bookLanguageVersion }), h(KeyVal, { label: 'Promptbook engine version:', value: info.promptbookEngineVersion }), h(KeyVal, { label: 'Node.js version:', value: info.nodeVersion }), h(KeyVal, { label: 'Server port:', value: String((_a = info.port) !== null && _a !== void 0 ? _a : '') }), h(KeyVal, { label: 'Startup date:', value: info.startupDate }), h(KeyVal, {
@@ -23247,6 +23246,9 @@ function ServerBody({ info }) {
23247
23246
  className: 'text-blue-600 underline',
23248
23247
  }, 'https://www.npmjs.com/package/@promptbook/remote-client')), h('li', null, 'OpenAI compatible client ', h('span', { className: 'text-gray-500' }, '(Not working yet)')), h('li', null, 'REST API')), h('p', { className: 'mt-2' }, 'For more information look at: ', h('a', { href: 'https://github.com/webgptorg/promptbook', className: 'text-blue-600 underline' }, 'https://github.com/webgptorg/promptbook'))));
23249
23248
  }
23249
+ /**
23250
+ * Handles Html doc.
23251
+ */
23250
23252
  function HtmlDoc({ info }) {
23251
23253
  return h('html', { lang: 'en' }, h('head', null, h('meta', { charSet: 'UTF-8' }), h('meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0' }), h('title', null, 'Promptbook Server'), h('link', {
23252
23254
  href: 'https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css',
@@ -23270,6 +23272,7 @@ function renderServerIndexHtml(info) {
23270
23272
  * This is useful to make all logic on browser side but not expose your API keys or no need to use customer's GPU.
23271
23273
  *
23272
23274
  * @see https://github.com/webgptorg/promptbook#remote-server
23275
+ *
23273
23276
  * @public exported from `@promptbook/remote-server`
23274
23277
  */
23275
23278
  function startRemoteServer(options) {
@@ -23827,21 +23830,19 @@ function startRemoteServer(options) {
23827
23830
  },
23828
23831
  };
23829
23832
  }
23830
- /** Note: [🟢] Code for Node server bootstrap [startRemoteServer](src/remote-server/startRemoteServer.ts) should never be published into packages that could be imported into browser environment */
23831
- /**
23832
- * TODO: [🕋] Use here `aboutPromptbookInformation`
23833
- * TODO: [🌡] Add CORS and security - probably via `helmet`
23834
- * TODO: Split this file into multiple functions - handler for each request
23835
- * TODO: Maybe use `$exportJson`
23836
- * TODO: [🧠][🛍] Maybe not `isAnonymous: boolean` BUT `mode: 'ANONYMOUS'|'COLLECTION'`
23837
- * TODO: [⚖] Expose the collection to be able to connect to same collection via createPipelineCollectionFromUrl
23838
- * TODO: Handle progress - support streaming
23839
- * TODO: [🗯] Do not hang up immediately but wait until client closes OR timeout
23840
- * TODO: [🗯] Timeout on chat to free up resources
23841
- * TODO: [🃏] Pass here some security token to prevent malitious usage and/or DDoS
23842
- * TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here
23843
- * TODO: Allow to constrain anonymous mode for specific models / providers
23844
- */
23833
+ // Note: [🟢] Code for Node server bootstrap [startRemoteServer](src/remote-server/startRemoteServer.ts) should never be published into packages that could be imported into browser environment
23834
+ // TODO: [🕋] Use here `aboutPromptbookInformation`
23835
+ // TODO: [🌡] Add CORS and security - probably via `helmet`
23836
+ // TODO: Split this file into multiple functions - handler for each request
23837
+ // TODO: Maybe use `$exportJson`
23838
+ // TODO: [🧠][🛍] Maybe not `isAnonymous: boolean` BUT `mode: 'ANONYMOUS'|'COLLECTION'`
23839
+ // TODO: [] Expose the collection to be able to connect to same collection via createPipelineCollectionFromUrl
23840
+ // TODO: Handle progress - support streaming
23841
+ // TODO: [🗯] Do not hang up immediately but wait until client closes OR timeout
23842
+ // TODO: [🗯] Timeout on chat to free up resources
23843
+ // TODO: [🃏] Pass here some security token to prevent malitious usage and/or DDoS
23844
+ // TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here
23845
+ // TODO: Allow to constrain anonymous mode for specific models / providers
23845
23846
 
23846
23847
  /**
23847
23848
  * Keep-alive helpers used for streaming chat responses.
@@ -23853,12 +23854,10 @@ function startRemoteServer(options) {
23853
23854
  * @private internal streaming helper for Promptbook chat connections
23854
23855
  */
23855
23856
  const CHAT_STREAM_KEEP_ALIVE_TOKEN = 'STREAM_KEEP_ALIVE';
23856
- /**
23857
- * Note: [💞] Ignore a discrepancy between file name and entity name
23858
- */
23857
+ // Note: [💞] Ignore a discrepancy between file name and entity name
23859
23858
 
23860
23859
  /**
23861
- * Number of padding lines to add at the end of the book content
23860
+ * Number of padding lines to add at the end of the book content
23862
23861
  *
23863
23862
  * @public exported from `@promptbook/core`
23864
23863
  */
@@ -23895,9 +23894,7 @@ function padBook(content) {
23895
23894
  const linesToAdd = PADDING_LINES - trailingEmptyLines;
23896
23895
  return (content + '\n'.repeat(linesToAdd));
23897
23896
  }
23898
- /**
23899
- * TODO: [🧠] Maybe export
23900
- */
23897
+ // TODO: [🧠] Maybe export
23901
23898
 
23902
23899
  /**
23903
23900
  * Type guard to check if a string is a valid agent source
@@ -23927,6 +23924,7 @@ function validateBook(source) {
23927
23924
  * Default book
23928
23925
  *
23929
23926
  * @deprecated Use `$generateBookBoilerplate` instead
23927
+ *
23930
23928
  * @public exported from `@promptbook/core`
23931
23929
  */
23932
23930
  padBook(validateBook(spaceTrim$1(`
@@ -23945,6 +23943,7 @@ padBook(validateBook(spaceTrim$1(`
23945
23943
  *
23946
23944
  * @param {string} pipelineString the candidate for a pipeline string
23947
23945
  * @returns {boolean} if the string is a valid pipeline string
23946
+ *
23948
23947
  * @public exported from `@promptbook/core`
23949
23948
  */
23950
23949
  function isValidPipelineString(pipelineString) {
@@ -23957,9 +23956,7 @@ function isValidPipelineString(pipelineString) {
23957
23956
  return false;
23958
23957
  }
23959
23958
  }
23960
- /**
23961
- * TODO: [🧠][🈴] Where is the best location for this file
23962
- */
23959
+ // TODO: [🧠][🈴] Where is the best location for this file
23963
23960
 
23964
23961
  /**
23965
23962
  * Tag function for notating a pipeline with a book\`...\ notation as template literal
@@ -23972,6 +23969,7 @@ function isValidPipelineString(pipelineString) {
23972
23969
  * @param strings The static string parts of the template literal
23973
23970
  * @param values The dynamic values embedded within the template literal used as data
23974
23971
  * @returns the pipeline string
23972
+ *
23975
23973
  * @public exported from `@promptbook/core`
23976
23974
  */
23977
23975
  function book(strings, ...values) {
@@ -23998,10 +23996,8 @@ function book(strings, ...values) {
23998
23996
  }
23999
23997
  return padBook(bookString);
24000
23998
  }
24001
- /**
24002
- * TODO: [🧠][🈴] Where is the best location for this file
24003
- * Note: [💞] Ignore a discrepancy between file name and entity name
24004
- */
23999
+ // TODO: [🧠][🈴] Where is the best location for this file
24000
+ // Note: [💞] Ignore a discrepancy between file name and entity name
24005
24001
 
24006
24002
  /**
24007
24003
  * Tool call name emitted while preparing a GPT assistant for an agent.
@@ -24046,9 +24042,7 @@ const CHAT_STREAM_WHITESPACE_DECODERS = [
24046
24042
  { token: CHAT_STREAM_WHITESPACE_TOKEN_TAB, value: '\t' },
24047
24043
  { token: CHAT_STREAM_WHITESPACE_TOKEN_SPACE, value: ' ' },
24048
24044
  ];
24049
- /**
24050
- * Note: [💞] Ignore a discrepancy between file name and entity name
24051
- */
24045
+ // Note: [💞] Ignore a discrepancy between file name and entity name
24052
24046
 
24053
24047
  /**
24054
24048
  * Converts encoded whitespace markers back into real whitespace so the UI can render the message
@@ -24066,6 +24060,9 @@ function decodeChatStreamWhitespaceFromTransport(content) {
24066
24060
  }, content);
24067
24061
  }
24068
24062
 
24063
+ /**
24064
+ * Constant for raw tool call ID fields.
24065
+ */
24069
24066
  const RAW_TOOL_CALL_ID_FIELDS = ['callId', 'call_id', 'id'];
24070
24067
  /**
24071
24068
  * Builds a deterministic idempotency key for tool calls so the UI can track updates.
@@ -24096,6 +24093,9 @@ function resolveToolCallIdempotencyKey(toolCall) {
24096
24093
  }
24097
24094
  return `fallback:${toolCall.name}`;
24098
24095
  }
24096
+ /**
24097
+ * Gets arguments key.
24098
+ */
24099
24099
  function getArgumentsKey(value) {
24100
24100
  if (typeof value === 'string') {
24101
24101
  return value;
@@ -24169,6 +24169,7 @@ function mergeToolCalls(existingToolCalls, incomingToolCalls) {
24169
24169
  * @param existingToolCall - Previous snapshot.
24170
24170
  * @param incomingToolCall - New snapshot.
24171
24171
  * @returns One merged snapshot.
24172
+ *
24172
24173
  * @private helper of `mergeToolCalls`
24173
24174
  */
24174
24175
  function mergeToolCallSnapshot(existingToolCall, incomingToolCall) {
@@ -24191,6 +24192,7 @@ function mergeToolCallSnapshot(existingToolCall, incomingToolCall) {
24191
24192
  * @param existingToolCall - Previous snapshot.
24192
24193
  * @param incomingToolCall - New snapshot.
24193
24194
  * @returns Resolved lifecycle state or `undefined` when neither snapshot provides enough data.
24195
+ *
24194
24196
  * @private helper of `mergeToolCalls`
24195
24197
  */
24196
24198
  function resolveMergedToolCallState(existingToolCall, incomingToolCall) {
@@ -24204,6 +24206,7 @@ function resolveMergedToolCallState(existingToolCall, incomingToolCall) {
24204
24206
  *
24205
24207
  * @param toolCall - Tool call snapshot to inspect.
24206
24208
  * @returns Inferred lifecycle state or `undefined`.
24209
+ *
24207
24210
  * @private helper of `mergeToolCalls`
24208
24211
  */
24209
24212
  function inferToolCallState(toolCall) {
@@ -24227,6 +24230,7 @@ function inferToolCallState(toolCall) {
24227
24230
  * @param existingValues - Previous list.
24228
24231
  * @param incomingValues - Incoming list.
24229
24232
  * @returns Deduplicated merged list or `undefined`.
24233
+ *
24230
24234
  * @private helper of `mergeToolCalls`
24231
24235
  */
24232
24236
  function mergeUnknownLists(existingValues, incomingValues) {
@@ -24253,6 +24257,7 @@ function mergeUnknownLists(existingValues, incomingValues) {
24253
24257
  *
24254
24258
  * @param value - Value to serialize.
24255
24259
  * @returns String signature.
24260
+ *
24256
24261
  * @private helper of `mergeToolCalls`
24257
24262
  */
24258
24263
  function serializeValueForMerge(value) {
@@ -24270,6 +24275,7 @@ function serializeValueForMerge(value) {
24270
24275
  *
24271
24276
  * @param toolCalls - Mutable list to deduplicate in-place.
24272
24277
  * @returns The same array after removing redundant preparation entries.
24278
+ *
24273
24279
  * @private helper of `mergeToolCalls`
24274
24280
  */
24275
24281
  function deduplicatePreparationToolCalls(toolCalls) {
@@ -24327,6 +24333,7 @@ function createDefaultAgentName(agentSource) {
24327
24333
  *
24328
24334
  * @param rawDomain - Raw domain value (for example `my-agent.com` or `https://my-agent.com/path`).
24329
24335
  * @returns Normalized hostname or `null` when the value cannot be normalized.
24336
+ *
24330
24337
  * @private utility for host/domain matching
24331
24338
  */
24332
24339
  function normalizeDomainForMatching(rawDomain) {
@@ -24349,6 +24356,7 @@ function normalizeDomainForMatching(rawDomain) {
24349
24356
  *
24350
24357
  * @param value - Raw value to inspect.
24351
24358
  * @returns True when the value starts with `http://` or `https://`.
24359
+ *
24352
24360
  * @private utility for host/domain matching
24353
24361
  */
24354
24362
  function hasHttpProtocol(value) {
@@ -24364,6 +24372,7 @@ function hasHttpProtocol(value) {
24364
24372
  *
24365
24373
  * @param agentSource - Raw agent source.
24366
24374
  * @returns Parsed prelude with shared line metadata.
24375
+ *
24367
24376
  * @private internal utility of book agent-source parsing
24368
24377
  */
24369
24378
  function parseAgentSourcePrelude(agentSource) {
@@ -24539,6 +24548,7 @@ function parseAgentSourceWithCommitments(agentSource) {
24539
24548
  *
24540
24549
  * @param text - Text to extract parameters from
24541
24550
  * @returns Array of parsed parameters with unified representation
24551
+ *
24542
24552
  * @public exported from `@promptbook/core`
24543
24553
  */
24544
24554
  function parseParameters(text) {
@@ -24967,9 +24977,7 @@ function normalizeMetaDomain(content) {
24967
24977
  const trimmed = spaceTrim$1(content);
24968
24978
  return normalizeDomainForMatching(trimmed) || trimmed.toLowerCase();
24969
24979
  }
24970
- /**
24971
- * TODO: [🕛] Unite `AgentBasicInformation`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
24972
- */
24980
+ // TODO: [🕛] Unite `AgentBasicInformation`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
24973
24981
 
24974
24982
  /**
24975
24983
  * Gets all tool titles provided by all commitments
@@ -24995,6 +25003,7 @@ function getAllCommitmentsToolTitles() {
24995
25003
  * Restricts an Updatable to a (2) BehaviorSubject variant
24996
25004
  *
24997
25005
  * @see Updatable
25006
+ *
24998
25007
  * @private internal utility <- TODO: [🧠] Maybe export from `@promptbook/types`
24999
25008
  */
25000
25009
  function asUpdatableSubject(value) {
@@ -25019,9 +25028,7 @@ function asUpdatableSubject(value) {
25019
25028
  return new BehaviorSubject(value);
25020
25029
  }
25021
25030
  }
25022
- /**
25023
- * TODO: [🧠] Maybe `BehaviorSubject` is too heavy for this use case, maybe just tuple `[value,setValue]` is enough
25024
- */
25031
+ // TODO: [🧠] Maybe `BehaviorSubject` is too heavy for this use case, maybe just tuple `[value,setValue]` is enough
25025
25032
 
25026
25033
  /**
25027
25034
  * Creates an empty/basic agent model requirements object
@@ -25056,12 +25063,11 @@ function createBasicAgentModelRequirements(agentName) {
25056
25063
  systemMessage: `You are ${agentName || 'AI Agent'}`,
25057
25064
  };
25058
25065
  }
25059
- /**
25060
- * TODO: [🐤] Deduplicate `AgentModelRequirements` and `ModelRequirements` model requirements
25061
- */
25066
+ // TODO: [🐤] Deduplicate `AgentModelRequirements` and `ModelRequirements` model requirements
25062
25067
 
25063
25068
  /**
25064
25069
  * Gets a commitment definition by its type
25070
+ *
25065
25071
  * @param type The commitment type to look up
25066
25072
  * @returns The commitment definition or null if not found
25067
25073
  *
@@ -25440,7 +25446,9 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
25440
25446
  };
25441
25447
  }
25442
25448
  /**
25443
- * @private Attempts to upload inline knowledge entries, falling back to legacy data URLs when the upload fails or is not configured.
25449
+ * Attempts to upload inline knowledge entries, falling back to legacy data URLs when the upload fails or is not configured.
25450
+ *
25451
+ * @private
25444
25452
  */
25445
25453
  async function applyPendingInlineKnowledgeSources(requirements, uploader) {
25446
25454
  var _a;
@@ -25461,6 +25469,9 @@ async function applyPendingInlineKnowledgeSources(requirements, uploader) {
25461
25469
  _metadata: stripInlineKnowledgeMetadata(requirements._metadata),
25462
25470
  };
25463
25471
  }
25472
+ /**
25473
+ * Handles upload inline knowledge source with fallback.
25474
+ */
25464
25475
  async function uploadInlineKnowledgeSourceWithFallback(inlineSource, uploader) {
25465
25476
  try {
25466
25477
  return await uploader(inlineSource);
@@ -25473,6 +25484,9 @@ async function uploadInlineKnowledgeSourceWithFallback(inlineSource, uploader) {
25473
25484
  return inlineKnowledgeSourceToDataUrl(inlineSource);
25474
25485
  }
25475
25486
  }
25487
+ /**
25488
+ * Extracts inline knowledge sources.
25489
+ */
25476
25490
  function extractInlineKnowledgeSources(metadata) {
25477
25491
  if (!metadata) {
25478
25492
  return [];
@@ -25480,6 +25494,9 @@ function extractInlineKnowledgeSources(metadata) {
25480
25494
  const value = metadata.inlineKnowledgeSources;
25481
25495
  return Array.isArray(value) ? value : [];
25482
25496
  }
25497
+ /**
25498
+ * Strips inline knowledge metadata.
25499
+ */
25483
25500
  function stripInlineKnowledgeMetadata(metadata) {
25484
25501
  if (!metadata || !Object.prototype.hasOwnProperty.call(metadata, 'inlineKnowledgeSources')) {
25485
25502
  return metadata;
@@ -25530,6 +25547,7 @@ function isBinaryMimeType(mimeType) {
25530
25547
  * @param availableModels - Models that could fulfill the agent.
25531
25548
  * @param llmTools - Execution tools used when selecting a best model.
25532
25549
  * @param options - Optional hooks such as the agent reference resolver.
25550
+ *
25533
25551
  * @public exported from `@promptbook/core`
25534
25552
  */
25535
25553
  async function createAgentModelRequirements(agentSource, modelName, availableModels, llmTools, options) {
@@ -25549,6 +25567,7 @@ async function createAgentModelRequirements(agentSource, modelName, availableMod
25549
25567
  * @param agentSource The agent source to derive persona description from
25550
25568
  * @param llmTools LLM tools for preparing persona
25551
25569
  * @returns The name of the best selected model
25570
+ *
25552
25571
  * @private function of `createAgentModelRequirements`
25553
25572
  */
25554
25573
  async function selectBestModelUsingPersona(agentSource, llmTools) {
@@ -25684,6 +25703,7 @@ function normalizeChatAttachment(rawAttachment) {
25684
25703
  *
25685
25704
  * @param {unknown} rawAttachments - The raw attachments to normalize.
25686
25705
  * @returns {Array<ChatAttachment>} The normalized attachments.
25706
+ *
25687
25707
  * @public exported from `@promptbook/core`
25688
25708
  */
25689
25709
  function normalizeChatAttachments(rawAttachments) {
@@ -25728,6 +25748,7 @@ function formatChatAttachmentLine(attachment) {
25728
25748
  *
25729
25749
  * @param {ReadonlyArray<ChatAttachment>} attachments - The attachments to format.
25730
25750
  * @returns {string} The formatted context.
25751
+ *
25731
25752
  * @public exported from `@promptbook/core`
25732
25753
  */
25733
25754
  function formatChatAttachmentContext(attachments) {
@@ -25748,6 +25769,7 @@ function formatChatAttachmentContext(attachments) {
25748
25769
  * @param {number} maxBytes - Maximum number of bytes to capture.
25749
25770
  * @param {{ captureOverflowByte?: boolean }} [options] - Optional capture behavior.
25750
25771
  * @returns {Promise<{ bytes: Uint8Array }>} Captured bytes, optionally including one overflow byte.
25772
+ *
25751
25773
  * @private internal utility for bounded response reads
25752
25774
  */
25753
25775
  async function readResponseBytes(response, maxBytes, options = {}) {
@@ -25844,6 +25866,7 @@ function createAttachmentContentFailure(attachment, reason, options = {}) {
25844
25866
  * @param {number} maxInlineCharacters - Maximum number of characters to inline.
25845
25867
  * @param {ResolveChatAttachmentOptions} options - Options for resolution.
25846
25868
  * @returns {Promise<ResolvedChatAttachmentContent>} The resolved content.
25869
+ *
25847
25870
  * @private function of resolveChatAttachmentContents
25848
25871
  */
25849
25872
  async function resolveChatAttachmentContent(attachment, maxInlineCharacters, options = {}) {
@@ -25935,6 +25958,7 @@ const CHAT_ATTACHMENT_MAX_INLINE_CHARACTERS_TOTAL = 24000;
25935
25958
  * @param {ReadonlyArray<ChatAttachment>} attachments - The attachments to resolve.
25936
25959
  * @param {ResolveChatAttachmentOptions} options - Options for resolution.
25937
25960
  * @returns {Promise<Array<ResolvedChatAttachmentContent>>} The resolved contents.
25961
+ *
25938
25962
  * @public exported from `@promptbook/core`
25939
25963
  */
25940
25964
  async function resolveChatAttachmentContents(attachments, options = {}) {
@@ -26000,6 +26024,7 @@ function formatResolvedChatAttachmentContent(contentResolution) {
26000
26024
  *
26001
26025
  * @param {ReadonlyArray<ResolvedChatAttachmentContent>} resolvedContents - The resolved contents to format.
26002
26026
  * @returns {string} The formatted context.
26027
+ *
26003
26028
  * @public exported from `@promptbook/core`
26004
26029
  */
26005
26030
  function formatChatAttachmentContentContext(resolvedContents) {
@@ -26040,6 +26065,7 @@ function appendChatContextSections(messageContent, contextSections) {
26040
26065
  * @param {ReadonlyArray<ChatAttachment>} attachments - The attachments to append.
26041
26066
  * @param {ResolveChatAttachmentOptions} options - Options for resolution.
26042
26067
  * @returns {Promise<string>} The updated message content.
26068
+ *
26043
26069
  * @public exported from `@promptbook/core`
26044
26070
  */
26045
26071
  async function appendChatAttachmentContextWithContent(messageContent, attachments, options = {}) {
@@ -26068,9 +26094,7 @@ async function appendChatAttachmentContextWithContent(messageContent, attachment
26068
26094
  function humanizeAiTextEllipsis(aiText) {
26069
26095
  return aiText.replace(/[…⋯]/g, '...').replace(/\.\s+\.\s+\./g, '...');
26070
26096
  }
26071
- /**
26072
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
26073
- */
26097
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
26074
26098
 
26075
26099
  /**
26076
26100
  * Change dash-like characters to regular dashes `—` -> `-` and remove soft hyphens
@@ -26083,9 +26107,7 @@ function humanizeAiTextEllipsis(aiText) {
26083
26107
  function humanizeAiTextEmdashed(aiText) {
26084
26108
  return aiText.replace(/\u00AD/g, '').replace(/[‐‑‒–—―−⁃﹣-]/g, '-');
26085
26109
  }
26086
- /**
26087
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
26088
- */
26110
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
26089
26111
 
26090
26112
  /**
26091
26113
  * Change smart quotes to regular quotes
@@ -26098,9 +26120,7 @@ function humanizeAiTextEmdashed(aiText) {
26098
26120
  function humanizeAiTextQuotes(aiText) {
26099
26121
  return aiText.replace(/[“”„‟«»❝❞〝〞〟"]/g, '"').replace(/[‚‘’‛‹›❛❜'ʼ]/g, "'");
26100
26122
  }
26101
- /**
26102
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
26103
- */
26123
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
26104
26124
 
26105
26125
  /**
26106
26126
  * Remove bracketed source citation artifacts like `\u30105:1\u2020source\u3011`.
@@ -26113,9 +26133,7 @@ function humanizeAiTextQuotes(aiText) {
26113
26133
  function humanizeAiTextSources(aiText) {
26114
26134
  return aiText.replace(/[ \t]*\u3010\s*\d+(?:\s*:\s*\d+)?\s*\u2020source\s*\u3011/g, '');
26115
26135
  }
26116
- /**
26117
- * Note: [??] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
26118
- */
26136
+ // Note: [??] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
26119
26137
 
26120
26138
  /**
26121
26139
  * Change unprintable hard spaces to regular spaces and drop zero-width spaces
@@ -26128,9 +26146,7 @@ function humanizeAiTextSources(aiText) {
26128
26146
  function humanizeAiTextWhitespace(aiText) {
26129
26147
  return aiText.replace(/[\u00A0\u1680\u2000-\u200A\u202F\u205F\u3000]/g, ' ').replace(/[\u200B\uFEFF\u2060]/g, '');
26130
26148
  }
26131
- /**
26132
- * Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
26133
- */
26149
+ // Note: [🏂] This function is not tested by itself but together with other cleanup functions with `humanizeAiText`
26134
26150
 
26135
26151
  /**
26136
26152
  * Function `humanizeAiText` will remove traces of AI text generation artifacts
@@ -26149,11 +26165,11 @@ function humanizeAiText(aiText) {
26149
26165
  cleanedText = humanizeAiTextWhitespace(cleanedText);
26150
26166
  return cleanedText;
26151
26167
  }
26152
- /**
26153
- * TODO: [🧠] Maybe this should be exported from `@promptbook/utils` not `@promptbook/markdown-utils`
26154
- */
26168
+ // TODO: [🧠] Maybe this should be exported from `@promptbook/utils` not `@promptbook/markdown-utils`
26155
26169
 
26156
26170
  /**
26171
+ * Map of promptbook pseudotoken substitution.
26172
+ *
26157
26173
  * @private
26158
26174
  */
26159
26175
  const PROMPTBOOK_PSEUDOTOKEN_SUBSTITUTION = {
@@ -26201,9 +26217,7 @@ function promptbookifyAiText(text) {
26201
26217
  }
26202
26218
  return promptbookifiedTextTokens.join('');
26203
26219
  }
26204
- /**
26205
- * TODO: [🧠][✌️] Make some Promptbook-native token system
26206
- */
26220
+ // TODO: [🧠][✌️] Make some Promptbook-native token system
26207
26221
 
26208
26222
  /**
26209
26223
  * Make UncertainNumber
@@ -26259,6 +26273,7 @@ function pricing(value) {
26259
26273
  *
26260
26274
  * @see https://platform.openai.com/docs/models/
26261
26275
  * @see https://openai.com/api/pricing/
26276
+ *
26262
26277
  * @public exported from `@promptbook/openai`
26263
26278
  */
26264
26279
  const OPENAI_MODELS = exportJson({
@@ -26935,6 +26950,7 @@ const OPENAI_MODELS = exportJson({
26935
26950
  * @param rawResponse The raw response from OpenAI API
26936
26951
  * @param duration The duration of the execution
26937
26952
  * @throws {PipelineExecutionError} If the usage is not defined in the response from OpenAI
26953
+ *
26938
26954
  * @private internal utility of `OpenAiExecutionTools`
26939
26955
  */
26940
26956
  function computeOpenAiUsage(promptContent, // <- Note: Intentionally using [] to access type properties to bring jsdoc from Prompt/PromptResult to consumer
@@ -26977,15 +26993,14 @@ resultContent, rawResponse, duration = ZERO_VALUE) {
26977
26993
  },
26978
26994
  };
26979
26995
  }
26980
- /**
26981
- * TODO: [🤝] DRY Maybe some common abstraction between `computeOpenAiUsage` and `computeAnthropicClaudeUsage`
26982
- */
26996
+ // TODO: [🤝] DRY Maybe some common abstraction between `computeOpenAiUsage` and `computeAnthropicClaudeUsage`
26983
26997
 
26984
26998
  /**
26985
26999
  * Parses an OpenAI error message to identify which parameter is unsupported
26986
27000
  *
26987
27001
  * @param errorMessage The error message from OpenAI API
26988
27002
  * @returns The parameter name that is unsupported, or null if not an unsupported parameter error
27003
+ *
26989
27004
  * @private utility of LLM Tools
26990
27005
  */
26991
27006
  function parseUnsupportedParameterError(errorMessage) {
@@ -27007,6 +27022,7 @@ function parseUnsupportedParameterError(errorMessage) {
27007
27022
  * @param modelRequirements Original model requirements
27008
27023
  * @param unsupportedParameter The parameter to remove
27009
27024
  * @returns New model requirements without the unsupported parameter
27025
+ *
27010
27026
  * @private utility of LLM Tools
27011
27027
  */
27012
27028
  function removeUnsupportedModelRequirement(modelRequirements, unsupportedParameter) {
@@ -27026,8 +27042,10 @@ function removeUnsupportedModelRequirement(modelRequirements, unsupportedParamet
27026
27042
  }
27027
27043
  /**
27028
27044
  * Checks if an error is an "Unsupported value" error from OpenAI
27045
+ *
27029
27046
  * @param error The error to check
27030
27047
  * @returns true if this is an unsupported parameter error
27048
+ *
27031
27049
  * @private utility of LLM Tools
27032
27050
  */
27033
27051
  function isUnsupportedParameterError(error) {
@@ -28133,13 +28151,11 @@ class OpenAiCompatibleExecutionTools {
28133
28151
  return false;
28134
28152
  }
28135
28153
  }
28136
- /**
28137
- * TODO: [🛄] Some way how to re-wrap the errors from `OpenAiCompatibleExecutionTools`
28138
- * TODO: [🛄] Maybe make custom `OpenAiCompatibleError`
28139
- * TODO: [🧠][🈁] Maybe use `isDeterministic` from options
28140
- * TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
28141
- * TODO: [🧠][🦢] Make reverse adapter from LlmExecutionTools to OpenAI-compatible:
28142
- */
28154
+ // TODO: [🛄] Some way how to re-wrap the errors from `OpenAiCompatibleExecutionTools`
28155
+ // TODO: [🛄] Maybe make custom `OpenAiCompatibleError`
28156
+ // TODO: [🧠][🈁] Maybe use `isDeterministic` from options
28157
+ // TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
28158
+ // TODO: [🧠][🦢] Make reverse adapter from LlmExecutionTools to OpenAI-compatible:
28143
28159
 
28144
28160
  /**
28145
28161
  * Profile for OpenAI provider
@@ -28207,9 +28223,21 @@ class OpenAiExecutionTools extends OpenAiCompatibleExecutionTools {
28207
28223
  }
28208
28224
  }
28209
28225
 
28226
+ /**
28227
+ * Constant for default knowledge source download timeout ms.
28228
+ */
28210
28229
  const DEFAULT_KNOWLEDGE_SOURCE_DOWNLOAD_TIMEOUT_MS = 30000;
28230
+ /**
28231
+ * Constant for default knowledge source upload timeout ms.
28232
+ */
28211
28233
  const DEFAULT_KNOWLEDGE_SOURCE_UPLOAD_TIMEOUT_MS = 900000;
28234
+ /**
28235
+ * Constant for vector store progress log interval min ms.
28236
+ */
28212
28237
  const VECTOR_STORE_PROGRESS_LOG_INTERVAL_MIN_MS = 15000;
28238
+ /**
28239
+ * Constant for vector store stall log threshold ms.
28240
+ */
28213
28241
  const VECTOR_STORE_STALL_LOG_THRESHOLD_MS = 30000;
28214
28242
  /**
28215
28243
  * Base class for OpenAI execution tools that need hosted vector stores.
@@ -28976,6 +29004,9 @@ class OpenAiVectorStoreHandler extends OpenAiExecutionTools {
28976
29004
  }
28977
29005
  }
28978
29006
 
29007
+ /**
29008
+ * Constant for default agent kit model name.
29009
+ */
28979
29010
  const DEFAULT_AGENT_KIT_MODEL_NAME = 'gpt-5.4-nano';
28980
29011
  /**
28981
29012
  * Creates one structured log entry for streamed tool-call updates.
@@ -29019,6 +29050,9 @@ function resolveFinalToolCallState$1(options) {
29019
29050
  }
29020
29051
  return 'COMPLETE';
29021
29052
  }
29053
+ /**
29054
+ * Constant for default JSON schema name.
29055
+ */
29022
29056
  const DEFAULT_JSON_SCHEMA_NAME = 'StructuredOutput';
29023
29057
  /**
29024
29058
  * File extensions considered image inputs when MIME type is missing or generic.
@@ -29174,6 +29208,7 @@ function buildJsonSchemaDefinition(jsonSchema) {
29174
29208
  *
29175
29209
  * @param responseFormat - The OpenAI `response_format` payload from the user request.
29176
29210
  * @returns An Agent output type compatible with the requested schema or `undefined` when no impact is required.
29211
+ *
29177
29212
  * @private utility of Open AI
29178
29213
  */
29179
29214
  function mapResponseFormatToAgentOutputType(responseFormat) {
@@ -29932,6 +29967,7 @@ function resolveFinalToolCallState(options) {
29932
29967
  * - `RemoteAgent` - which is an `Agent` that connects to a Promptbook Agents Server
29933
29968
  *
29934
29969
  * @deprecated Use `OpenAiAgentKitExecutionTools` instead.
29970
+ *
29935
29971
  * @public exported from `@promptbook/openai`
29936
29972
  */
29937
29973
  class OpenAiAssistantExecutionTools extends OpenAiVectorStoreHandler {
@@ -30623,14 +30659,12 @@ class OpenAiAssistantExecutionTools extends OpenAiVectorStoreHandler {
30623
30659
  * @private const of `OpenAiAssistantExecutionTools`
30624
30660
  */
30625
30661
  const DISCRIMINANT = 'OPEN_AI_ASSISTANT_V1';
30626
- /**
30627
- * TODO: !!!!! [✨🥚] Knowledge should work both with and without scrapers
30628
- * TODO: [🙎] In `OpenAiAssistantExecutionTools` Allow to create abstract assistants with `isCreatingNewAssistantsAllowed`
30629
- * TODO: [🧠][🧙‍♂️] Maybe there can be some wizard for those who want to use just OpenAI
30630
- * TODO: Maybe make custom OpenAiError
30631
- * TODO: [🧠][🈁] Maybe use `isDeterministic` from options
30632
- * TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
30633
- */
30662
+ // TODO: !!!!! [✨🥚] Knowledge should work both with and without scrapers
30663
+ // TODO: [🙎] In `OpenAiAssistantExecutionTools` Allow to create abstract assistants with `isCreatingNewAssistantsAllowed`
30664
+ // TODO: [🧠][🧙‍♂️] Maybe there can be some wizard for those who want to use just OpenAI
30665
+ // TODO: Maybe make custom OpenAiError
30666
+ // TODO: [🧠][🈁] Maybe use `isDeterministic` from options
30667
+ // TODO: [🧠][🌰] Allow to pass `title` for tracking purposes
30634
30668
 
30635
30669
  /**
30636
30670
  * Emits a progress update to signal assistant preparation before long setup work.
@@ -31107,10 +31141,8 @@ AgentLlmExecutionTools.assistantCache = new Map();
31107
31141
  * Cache of OpenAI vector stores to avoid creating duplicates
31108
31142
  */
31109
31143
  AgentLlmExecutionTools.vectorStoreCache = new Map();
31110
- /**
31111
- * TODO: [🍚] Implement Destroyable pattern to free resources
31112
- * TODO: [🧠] Adding parameter substitution support (here or should be responsibility of the underlying LLM Tools)
31113
- */
31144
+ // TODO: [🍚] Implement Destroyable pattern to free resources
31145
+ // TODO: [🧠] Adding parameter substitution support (here or should be responsibility of the underlying LLM Tools)
31114
31146
 
31115
31147
  /**
31116
31148
  * Extracts the teacher-focused instructions from the latest `OPEN` commitment in the book.
@@ -31120,6 +31152,7 @@ AgentLlmExecutionTools.vectorStoreCache = new Map();
31120
31152
  *
31121
31153
  * @param agentSource - The raw agent book source
31122
31154
  * @returns The trimmed instructions or `null` when no instructive `OPEN` commitment exists.
31155
+ *
31123
31156
  * @private Internal helper shared between self-learning and related features.
31124
31157
  */
31125
31158
  function extractOpenTeacherInstructions(agentSource) {
@@ -31327,6 +31360,7 @@ class SelfLearningManager {
31327
31360
  *
31328
31361
  * @param section Raw fragment from self-learning workflow.
31329
31362
  * @returns Trimmed fragment, or empty string when nothing remains.
31363
+ *
31330
31364
  * @private function of Agent
31331
31365
  */
31332
31366
  function normalizeBookSection(section) {
@@ -31338,6 +31372,7 @@ function normalizeBookSection(section) {
31338
31372
  * @param agentSource Current source.
31339
31373
  * @param normalizedSection Candidate fragment expected to be normalized first.
31340
31374
  * @returns True when appending would duplicate an existing fragment.
31375
+ *
31341
31376
  * @private function of Agent
31342
31377
  */
31343
31378
  function containsNormalizedBookSection(agentSource, normalizedSection) {
@@ -31352,6 +31387,7 @@ function containsNormalizedBookSection(agentSource, normalizedSection) {
31352
31387
  *
31353
31388
  * @param responseFormat Prompt response format requirements
31354
31389
  * @returns True when JSON schema mode is active
31390
+ *
31355
31391
  * @private function of Agent
31356
31392
  */
31357
31393
  function isJsonSchemaResponseFormat(responseFormat) {
@@ -31363,6 +31399,7 @@ function isJsonSchemaResponseFormat(responseFormat) {
31363
31399
  * @param content Original agent answer content
31364
31400
  * @param isJsonMode Whether the interaction requested JSON schema output
31365
31401
  * @returns Agent answer, wrapped in a formatted JSON code block when possible
31402
+ *
31366
31403
  * @private function of Agent
31367
31404
  */
31368
31405
  function formatAgentMessageForJsonMode(content, isJsonMode) {
@@ -31388,6 +31425,7 @@ function formatAgentMessageForJsonMode(content, isJsonMode) {
31388
31425
  *
31389
31426
  * @param content Text to parse as JSON
31390
31427
  * @returns Parsed JSON value or null when parsing fails
31428
+ *
31391
31429
  * @private function of Agent
31392
31430
  */
31393
31431
  function tryParseJson(content) {
@@ -31403,6 +31441,7 @@ function tryParseJson(content) {
31403
31441
  *
31404
31442
  * @param options - Normalized sample parts.
31405
31443
  * @returns Book-language sample section ready to append into agent source.
31444
+ *
31406
31445
  * @private function of Agent
31407
31446
  */
31408
31447
  function formatSelfLearningSample(options) {
@@ -31424,6 +31463,7 @@ function formatSelfLearningSample(options) {
31424
31463
  *
31425
31464
  * @param internalMessage Internal trace payload.
31426
31465
  * @returns Book-language INTERNAL MESSAGE block.
31466
+ *
31427
31467
  * @private function of Agent
31428
31468
  */
31429
31469
  function formatInternalLearningMessage(internalMessage) {
@@ -31437,6 +31477,7 @@ function formatInternalLearningMessage(internalMessage) {
31437
31477
  *
31438
31478
  * @param result Final chat result used in self-learning.
31439
31479
  * @returns Internal payloads that capture request/response/tool-call context.
31480
+ *
31440
31481
  * @private function of Agent
31441
31482
  */
31442
31483
  function buildInternalLearningMessages(result) {
@@ -31466,6 +31507,7 @@ function buildInternalLearningMessages(result) {
31466
31507
  *
31467
31508
  * @param toolCall Tool call produced during execution.
31468
31509
  * @returns Sanitized and serializable tool-call payload.
31510
+ *
31469
31511
  * @private function of Agent
31470
31512
  */
31471
31513
  function sanitizeToolCallForLearning(toolCall) {
@@ -31485,6 +31527,7 @@ function sanitizeToolCallForLearning(toolCall) {
31485
31527
  *
31486
31528
  * @param payload Internal payload to serialize.
31487
31529
  * @returns Pretty JSON string that can be embedded in BOOK.
31530
+ *
31488
31531
  * @private function of Agent
31489
31532
  */
31490
31533
  function stringifyInternalLearningPayload(payload) {
@@ -31534,6 +31577,7 @@ function createEmptySelfLearningCommitmentCounts() {
31534
31577
  * Normalizes teacher commitments into trimmed, display-ready lines.
31535
31578
  *
31536
31579
  * @param commitments Raw teacher output
31580
+ *
31537
31581
  * @private function of Agent
31538
31582
  */
31539
31583
  function getTeacherCommitmentLines(commitments) {
@@ -31546,6 +31590,7 @@ function getTeacherCommitmentLines(commitments) {
31546
31590
  * Summarizes teacher commitment lines into user-friendly counts for self-learning.
31547
31591
  *
31548
31592
  * @param lines Parsed teacher commitment lines
31593
+ *
31549
31594
  * @private function of Agent
31550
31595
  */
31551
31596
  function summarizeTeacherCommitmentLines(lines) {
@@ -31578,6 +31623,7 @@ function summarizeTeacherCommitmentLines(lines) {
31578
31623
  * @param commitments Raw teacher commitments
31579
31624
  * @param used Whether the teacher was invoked
31580
31625
  * @returns Summary of learned commitments
31626
+ *
31581
31627
  * @private function of Agent
31582
31628
  */
31583
31629
  function buildTeacherSummary(commitments, used) {
@@ -31814,9 +31860,7 @@ class Agent extends AgentLlmExecutionTools {
31814
31860
  return finalResult;
31815
31861
  }
31816
31862
  }
31817
- /**
31818
- * TODO: [🧠][😰]Agent is not working with the parameters, should it be?
31819
- */
31863
+ // TODO: [🧠][😰]Agent is not working with the parameters, should it be?
31820
31864
 
31821
31865
  /**
31822
31866
  * Parses one failed remote agent response into a structured error.
@@ -32282,10 +32326,8 @@ class RemoteAgent extends Agent {
32282
32326
  return agentResult;
32283
32327
  }
32284
32328
  }
32285
- /**
32286
- * TODO: [🧠][😰]Agent is not working with the parameters, should it be?
32287
- * TODO: !!! Agent on remote server
32288
- */
32329
+ // TODO: [🧠][😰]Agent is not working with the parameters, should it be?
32330
+ // TODO: !!! Agent on remote server
32289
32331
 
32290
32332
  var RemoteAgent$1 = /*#__PURE__*/Object.freeze({
32291
32333
  __proto__: null,