@promptbook/node 0.112.0-31 → 0.112.0-34

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 (351) hide show
  1. package/esm/index.es.js +135 -107
  2. package/esm/index.es.js.map +1 -1
  3. package/esm/src/_packages/components.index.d.ts +6 -0
  4. package/esm/src/_packages/types.index.d.ts +55 -49
  5. package/esm/src/book-2.0/agent-source/AgentReferenceResolver.d.ts +11 -0
  6. package/esm/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +8 -0
  7. package/esm/src/book-2.0/agent-source/TeammateProfileResolver.d.ts +33 -0
  8. package/esm/src/book-2.0/agent-source/createTeamToolName.d.ts +7 -7
  9. package/esm/src/book-components/Chat/Chat/ChatActionsBar.d.ts +5 -0
  10. package/esm/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +42 -0
  11. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +18 -15
  12. package/esm/src/book-components/Chat/Chat/ChatMessageItem.test.d.ts +1 -1
  13. package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +14 -0
  14. package/esm/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +32 -0
  15. package/esm/src/book-components/Chat/Chat/ChatMessageToolCallChips.d.ts +22 -0
  16. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +290 -0
  17. package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +16 -0
  18. package/esm/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +33 -0
  19. package/esm/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.d.ts +76 -0
  20. package/esm/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +16 -0
  21. package/esm/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +4 -0
  22. package/esm/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +26 -0
  23. package/esm/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +31 -0
  24. package/esm/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +32 -0
  25. package/esm/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +31 -0
  26. package/esm/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +31 -0
  27. package/esm/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +38 -0
  28. package/esm/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +38 -0
  29. package/esm/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +46 -0
  30. package/esm/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +33 -0
  31. package/esm/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +10 -1
  32. package/esm/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +29 -0
  33. package/esm/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +26 -0
  34. package/esm/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +9 -0
  35. package/esm/src/book-components/Chat/Chat/useChatInputAreaAttachments.d.ts +32 -0
  36. package/esm/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +76 -0
  37. package/esm/src/book-components/Chat/Chat/useChatMessageAvatarTooltip.d.ts +31 -0
  38. package/esm/src/book-components/Chat/Chat/useChatMessageSpeechPlayback.d.ts +29 -0
  39. package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +2 -1
  40. package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.test.d.ts +2 -0
  41. package/esm/src/book-components/Chat/hooks/useChatCompleteNotification.d.ts +18 -0
  42. package/esm/src/book-components/Chat/hooks/useChatCompleteNotification.test.d.ts +2 -0
  43. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +77 -1
  44. package/esm/src/book-components/Chat/utils/formatToolCallDateTime.d.ts +37 -0
  45. package/esm/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +11 -0
  46. package/esm/src/book-components/Chat/utils/formatToolCallTranslationTemplate.d.ts +10 -0
  47. package/esm/src/book-components/Chat/utils/getChatMessageTimingDisplay.d.ts +5 -1
  48. package/esm/src/book-components/Chat/utils/getToolCallChipletInfo.d.ts +26 -1
  49. package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +26 -3
  50. package/esm/src/cli/$runPromptbookCli.d.ts +1 -3
  51. package/esm/src/cli/cli-commands/_boilerplate.d.ts +2 -4
  52. package/esm/src/cli/cli-commands/about.d.ts +1 -1
  53. package/esm/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +2 -4
  54. package/esm/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +2 -4
  55. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +2 -4
  56. package/esm/src/cli/cli-commands/coder/init.d.ts +2 -4
  57. package/esm/src/cli/cli-commands/coder/run.d.ts +2 -4
  58. package/esm/src/cli/cli-commands/coder/verify.d.ts +2 -4
  59. package/esm/src/cli/cli-commands/coder.d.ts +2 -4
  60. package/esm/src/cli/cli-commands/hello.d.ts +1 -1
  61. package/esm/src/cli/cli-commands/list-models.d.ts +2 -4
  62. package/esm/src/cli/cli-commands/list-scrapers.d.ts +2 -4
  63. package/esm/src/cli/cli-commands/login.d.ts +1 -1
  64. package/esm/src/cli/cli-commands/make.d.ts +1 -1
  65. package/esm/src/cli/cli-commands/prettify.d.ts +1 -1
  66. package/esm/src/cli/cli-commands/run.d.ts +1 -1
  67. package/esm/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -1
  68. package/esm/src/cli/cli-commands/start-agents-server.d.ts +2 -4
  69. package/esm/src/cli/cli-commands/start-pipelines-server.d.ts +1 -1
  70. package/esm/src/cli/cli-commands/test-command.d.ts +1 -1
  71. package/esm/src/cli/main.d.ts +2 -4
  72. package/esm/src/cli/promptbookCli.d.ts +1 -1
  73. package/esm/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +1 -3
  74. package/esm/src/conversion/archive/loadArchive.d.ts +1 -3
  75. package/esm/src/conversion/archive/saveArchive.d.ts +1 -1
  76. package/esm/src/conversion/validation/_importPipeline.d.ts +2 -4
  77. package/esm/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -3
  78. package/esm/src/executables/$provideExecutablesForNode.d.ts +1 -1
  79. package/esm/src/executables/apps/locateLibreoffice.d.ts +2 -4
  80. package/esm/src/executables/apps/locatePandoc.d.ts +2 -4
  81. package/esm/src/executables/locateApp.d.ts +2 -4
  82. package/esm/src/executables/platforms/locateAppOnLinux.d.ts +2 -4
  83. package/esm/src/executables/platforms/locateAppOnMacOs.d.ts +2 -4
  84. package/esm/src/executables/platforms/locateAppOnWindows.d.ts +2 -4
  85. package/esm/src/execution/translation/automatic-translate/translateMessages.d.ts +2 -4
  86. package/esm/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -4
  87. package/esm/src/llm-providers/_common/register/$provideEnvFilename.d.ts +1 -3
  88. package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -3
  89. package/esm/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +1 -1
  90. package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -3
  91. package/esm/src/llm-providers/_multiple/playground/playground.d.ts +1 -3
  92. package/esm/src/llm-providers/agent/playground/playground.d.ts +1 -1
  93. package/esm/src/llm-providers/anthropic-claude/playground/playground.d.ts +1 -1
  94. package/esm/src/llm-providers/azure-openai/playground/playground.d.ts +2 -4
  95. package/esm/src/llm-providers/ollama/playground/playground.d.ts +2 -4
  96. package/esm/src/llm-providers/openai/playground/playground.d.ts +2 -4
  97. package/esm/src/llm-providers/remote/playground/playground.d.ts +1 -3
  98. package/esm/src/llm-providers/vercel/playground/playground.d.ts +2 -4
  99. package/esm/src/playground/permanent/_boilerplate.d.ts +1 -3
  100. package/esm/src/playground/permanent/agent-with-browser-playground.d.ts +1 -3
  101. package/esm/src/playground/permanent/error-handling-playground.d.ts +1 -3
  102. package/esm/src/playground/playground.d.ts +2 -4
  103. package/esm/src/remote-server/startAgentServer.d.ts +1 -3
  104. package/esm/src/remote-server/startRemoteServer.d.ts +1 -2
  105. package/esm/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +4 -6
  106. package/esm/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +1 -3
  107. package/esm/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -4
  108. package/esm/src/scrapers/_common/register/$provideScrapersForNode.d.ts +2 -4
  109. package/esm/src/scrapers/_common/register/$provideScriptingForNode.d.ts +2 -4
  110. package/esm/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +1 -1
  111. package/esm/src/scrapers/document/DocumentScraper.d.ts +1 -1
  112. package/esm/src/scrapers/document/playground/document-scraper-playground.d.ts +1 -3
  113. package/esm/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -1
  114. package/esm/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +1 -3
  115. package/esm/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +1 -3
  116. package/esm/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
  117. package/esm/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +1 -3
  118. package/esm/src/scrapers/pdf/PdfScraper.d.ts +1 -1
  119. package/esm/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +1 -3
  120. package/esm/src/scrapers/website/WebsiteScraper.d.ts +1 -1
  121. package/esm/src/scrapers/website/playground/website-scraper-playground.d.ts +1 -3
  122. package/esm/src/speech-recognition/BrowserSpeechRecognition.d.ts +2 -4
  123. package/esm/src/storage/file-cache-storage/FileCacheStorage.d.ts +2 -4
  124. package/esm/src/storage/local-storage/getIndexedDbStorage.d.ts +1 -3
  125. package/esm/src/storage/local-storage/getLocalStorage.d.ts +1 -3
  126. package/esm/src/storage/local-storage/getSessionStorage.d.ts +1 -3
  127. package/esm/src/transpilers/openai-sdk/playground/playground.d.ts +1 -3
  128. package/esm/src/types/InputParameters_private.d.ts +11 -0
  129. package/esm/src/types/Parameters_private.d.ts +16 -0
  130. package/esm/src/types/ReservedParameters_private.d.ts +10 -0
  131. package/esm/src/types/number_bytes.d.ts +21 -0
  132. package/esm/src/types/number_id.d.ts +13 -0
  133. package/esm/src/types/number_likeness.d.ts +8 -0
  134. package/esm/src/types/number_milliseconds.d.ts +33 -0
  135. package/esm/src/types/number_percent.d.ts +18 -0
  136. package/esm/src/types/number_positive.d.ts +16 -0
  137. package/esm/src/types/number_usd.d.ts +6 -106
  138. package/esm/src/types/string_agent_hash_private.d.ts +9 -0
  139. package/esm/src/types/string_agent_name_in_book_private.d.ts +8 -0
  140. package/esm/src/types/string_agent_name_private.d.ts +9 -0
  141. package/esm/src/types/string_agent_permanent_id_private.d.ts +10 -0
  142. package/esm/src/types/string_base64_private.d.ts +17 -0
  143. package/esm/src/types/string_business_category_name_private.d.ts +6 -0
  144. package/esm/src/types/string_char_private.d.ts +8 -0
  145. package/esm/src/types/string_chat_prompt_private.d.ts +9 -0
  146. package/esm/src/types/string_completion_prompt_private.d.ts +9 -0
  147. package/esm/src/types/string_email_private.d.ts +16 -0
  148. package/esm/src/types/string_host_private.d.ts +55 -0
  149. package/esm/src/types/string_mime_type_private.d.ts +17 -0
  150. package/esm/src/types/string_model_description_private.d.ts +8 -0
  151. package/esm/src/types/string_model_name_private.d.ts +8 -0
  152. package/esm/src/types/string_name_private.d.ts +9 -0
  153. package/esm/src/types/string_page_private.d.ts +9 -0
  154. package/esm/src/types/string_parameter_name.d.ts +74 -31
  155. package/esm/src/types/string_parameter_value_private.d.ts +9 -0
  156. package/esm/src/types/string_persona_description_private.d.ts +8 -0
  157. package/esm/src/types/string_prompt_image_private.d.ts +8 -0
  158. package/esm/src/types/string_prompt_private.d.ts +8 -0
  159. package/esm/src/types/string_reserved_parameter_name_private.d.ts +11 -0
  160. package/esm/src/types/string_system_message_private.d.ts +9 -0
  161. package/esm/src/types/string_template_private.d.ts +8 -0
  162. package/esm/src/types/string_text_prompt_private.d.ts +9 -0
  163. package/esm/src/types/string_title_private.d.ts +9 -0
  164. package/esm/src/types/string_url.d.ts +50 -46
  165. package/esm/src/types/string_url_private.d.ts +88 -0
  166. package/esm/src/types/typeAliases.d.ts +7 -1
  167. package/esm/src/utils/execCommand/$execCommand.d.ts +1 -3
  168. package/esm/src/utils/execCommand/$execCommands.d.ts +1 -3
  169. package/esm/src/utils/files/$induceBookDownload.d.ts +1 -3
  170. package/esm/src/utils/files/$induceFileDownload.d.ts +1 -3
  171. package/esm/src/utils/files/ObjectUrl.d.ts +1 -3
  172. package/esm/src/utils/toolCalls/mergeToolCalls.d.ts +1 -1
  173. package/esm/src/version.d.ts +1 -1
  174. package/esm/src/wizard/$getCompiledBook.d.ts +2 -4
  175. package/esm/src/wizard/wizard.d.ts +2 -4
  176. package/package.json +2 -2
  177. package/umd/index.umd.js +135 -107
  178. package/umd/index.umd.js.map +1 -1
  179. package/umd/src/_packages/components.index.d.ts +6 -0
  180. package/umd/src/_packages/types.index.d.ts +55 -49
  181. package/umd/src/book-2.0/agent-source/AgentReferenceResolver.d.ts +11 -0
  182. package/umd/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +8 -0
  183. package/umd/src/book-2.0/agent-source/TeammateProfileResolver.d.ts +33 -0
  184. package/umd/src/book-2.0/agent-source/createTeamToolName.d.ts +7 -7
  185. package/umd/src/book-components/Chat/Chat/ChatActionsBar.d.ts +5 -0
  186. package/umd/src/book-components/Chat/Chat/ChatInputAreaDictationPanel.d.ts +42 -0
  187. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +18 -15
  188. package/umd/src/book-components/Chat/Chat/ChatMessageItem.test.d.ts +1 -1
  189. package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +14 -0
  190. package/umd/src/book-components/Chat/Chat/ChatMessageRichContent.d.ts +32 -0
  191. package/umd/src/book-components/Chat/Chat/ChatMessageToolCallChips.d.ts +22 -0
  192. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +290 -0
  193. package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +16 -0
  194. package/umd/src/book-components/Chat/Chat/StreamingFeaturePlaceholder.d.ts +33 -0
  195. package/umd/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.d.ts +76 -0
  196. package/umd/src/book-components/Chat/Chat/createProgressCardChecklistMarkdown.d.ts +16 -0
  197. package/umd/src/book-components/Chat/Chat/renderAdvancedToolCallDetails.d.ts +4 -0
  198. package/umd/src/book-components/Chat/Chat/renderEmailToolCallDetails.d.ts +26 -0
  199. package/umd/src/book-components/Chat/Chat/renderMemoryToolCallDetails.d.ts +31 -0
  200. package/umd/src/book-components/Chat/Chat/renderPopupToolCallDetails.d.ts +32 -0
  201. package/umd/src/book-components/Chat/Chat/renderRunBrowserToolCallDetails.d.ts +31 -0
  202. package/umd/src/book-components/Chat/Chat/renderSearchToolCallDetails.d.ts +31 -0
  203. package/umd/src/book-components/Chat/Chat/renderSelfLearningToolCallDetails.d.ts +38 -0
  204. package/umd/src/book-components/Chat/Chat/renderTimeToolCallDetails.d.ts +38 -0
  205. package/umd/src/book-components/Chat/Chat/renderTimeoutToolCallDetails.d.ts +46 -0
  206. package/umd/src/book-components/Chat/Chat/renderToolCallClockPanel.d.ts +33 -0
  207. package/umd/src/book-components/Chat/Chat/renderToolCallDetails.d.ts +10 -1
  208. package/umd/src/book-components/Chat/Chat/renderToolCallProgressPlaceholder.d.ts +29 -0
  209. package/umd/src/book-components/Chat/Chat/renderWalletCredentialToolCallDetails.d.ts +26 -0
  210. package/umd/src/book-components/Chat/Chat/resolveToolCallProgressMessage.d.ts +9 -0
  211. package/umd/src/book-components/Chat/Chat/useChatInputAreaAttachments.d.ts +32 -0
  212. package/umd/src/book-components/Chat/Chat/useChatInputAreaDictation.d.ts +76 -0
  213. package/umd/src/book-components/Chat/Chat/useChatMessageAvatarTooltip.d.ts +31 -0
  214. package/umd/src/book-components/Chat/Chat/useChatMessageSpeechPlayback.d.ts +29 -0
  215. package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +2 -1
  216. package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.test.d.ts +2 -0
  217. package/umd/src/book-components/Chat/hooks/useChatCompleteNotification.d.ts +18 -0
  218. package/umd/src/book-components/Chat/hooks/useChatCompleteNotification.test.d.ts +2 -0
  219. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +77 -1
  220. package/umd/src/book-components/Chat/utils/formatToolCallDateTime.d.ts +37 -0
  221. package/umd/src/book-components/Chat/utils/formatToolCallLocalTime.d.ts +11 -0
  222. package/umd/src/book-components/Chat/utils/formatToolCallTranslationTemplate.d.ts +10 -0
  223. package/umd/src/book-components/Chat/utils/getChatMessageTimingDisplay.d.ts +5 -1
  224. package/umd/src/book-components/Chat/utils/getToolCallChipletInfo.d.ts +26 -1
  225. package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +26 -3
  226. package/umd/src/cli/$runPromptbookCli.d.ts +1 -3
  227. package/umd/src/cli/cli-commands/_boilerplate.d.ts +2 -4
  228. package/umd/src/cli/cli-commands/about.d.ts +1 -1
  229. package/umd/src/cli/cli-commands/coder/find-fresh-emoji-tags.d.ts +2 -4
  230. package/umd/src/cli/cli-commands/coder/find-refactor-candidates.d.ts +2 -4
  231. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +2 -4
  232. package/umd/src/cli/cli-commands/coder/init.d.ts +2 -4
  233. package/umd/src/cli/cli-commands/coder/run.d.ts +2 -4
  234. package/umd/src/cli/cli-commands/coder/verify.d.ts +2 -4
  235. package/umd/src/cli/cli-commands/coder.d.ts +2 -4
  236. package/umd/src/cli/cli-commands/hello.d.ts +1 -1
  237. package/umd/src/cli/cli-commands/list-models.d.ts +2 -4
  238. package/umd/src/cli/cli-commands/list-scrapers.d.ts +2 -4
  239. package/umd/src/cli/cli-commands/login.d.ts +1 -1
  240. package/umd/src/cli/cli-commands/make.d.ts +1 -1
  241. package/umd/src/cli/cli-commands/prettify.d.ts +1 -1
  242. package/umd/src/cli/cli-commands/run.d.ts +1 -1
  243. package/umd/src/cli/cli-commands/runInteractiveChatbot.d.ts +1 -1
  244. package/umd/src/cli/cli-commands/start-agents-server.d.ts +2 -4
  245. package/umd/src/cli/cli-commands/start-pipelines-server.d.ts +1 -1
  246. package/umd/src/cli/cli-commands/test-command.d.ts +1 -1
  247. package/umd/src/cli/main.d.ts +2 -4
  248. package/umd/src/cli/promptbookCli.d.ts +1 -1
  249. package/umd/src/commitments/USE_BROWSER/fetchUrlContent.d.ts +1 -3
  250. package/umd/src/conversion/archive/loadArchive.d.ts +1 -3
  251. package/umd/src/conversion/archive/saveArchive.d.ts +1 -1
  252. package/umd/src/conversion/validation/_importPipeline.d.ts +2 -4
  253. package/umd/src/dialogs/simple-prompt/SimplePromptInterfaceTools.d.ts +1 -3
  254. package/umd/src/executables/$provideExecutablesForNode.d.ts +1 -1
  255. package/umd/src/executables/apps/locateLibreoffice.d.ts +2 -4
  256. package/umd/src/executables/apps/locatePandoc.d.ts +2 -4
  257. package/umd/src/executables/locateApp.d.ts +2 -4
  258. package/umd/src/executables/platforms/locateAppOnLinux.d.ts +2 -4
  259. package/umd/src/executables/platforms/locateAppOnMacOs.d.ts +2 -4
  260. package/umd/src/executables/platforms/locateAppOnWindows.d.ts +2 -4
  261. package/umd/src/execution/translation/automatic-translate/translateMessages.d.ts +2 -4
  262. package/umd/src/execution/utils/$provideExecutionToolsForNode.d.ts +2 -4
  263. package/umd/src/llm-providers/_common/register/$provideEnvFilename.d.ts +1 -3
  264. package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -3
  265. package/umd/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +1 -1
  266. package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -3
  267. package/umd/src/llm-providers/_multiple/playground/playground.d.ts +1 -3
  268. package/umd/src/llm-providers/agent/playground/playground.d.ts +1 -1
  269. package/umd/src/llm-providers/anthropic-claude/playground/playground.d.ts +1 -1
  270. package/umd/src/llm-providers/azure-openai/playground/playground.d.ts +2 -4
  271. package/umd/src/llm-providers/ollama/playground/playground.d.ts +2 -4
  272. package/umd/src/llm-providers/openai/playground/playground.d.ts +2 -4
  273. package/umd/src/llm-providers/remote/playground/playground.d.ts +1 -3
  274. package/umd/src/llm-providers/vercel/playground/playground.d.ts +2 -4
  275. package/umd/src/playground/permanent/_boilerplate.d.ts +1 -3
  276. package/umd/src/playground/permanent/agent-with-browser-playground.d.ts +1 -3
  277. package/umd/src/playground/permanent/error-handling-playground.d.ts +1 -3
  278. package/umd/src/playground/playground.d.ts +2 -4
  279. package/umd/src/remote-server/startAgentServer.d.ts +1 -3
  280. package/umd/src/remote-server/startRemoteServer.d.ts +1 -2
  281. package/umd/src/scrapers/_boilerplate/BoilerplateScraper.d.ts +4 -6
  282. package/umd/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.d.ts +1 -3
  283. package/umd/src/scrapers/_common/register/$provideFilesystemForNode.d.ts +2 -4
  284. package/umd/src/scrapers/_common/register/$provideScrapersForNode.d.ts +2 -4
  285. package/umd/src/scrapers/_common/register/$provideScriptingForNode.d.ts +2 -4
  286. package/umd/src/scrapers/_common/utils/getScraperIntermediateSource.d.ts +1 -1
  287. package/umd/src/scrapers/document/DocumentScraper.d.ts +1 -1
  288. package/umd/src/scrapers/document/playground/document-scraper-playground.d.ts +1 -3
  289. package/umd/src/scrapers/document-legacy/LegacyDocumentScraper.d.ts +1 -1
  290. package/umd/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.d.ts +1 -3
  291. package/umd/src/scrapers/markdown/playground/markdown-scraper-playground.d.ts +1 -3
  292. package/umd/src/scrapers/markitdown/MarkitdownScraper.d.ts +1 -1
  293. package/umd/src/scrapers/markitdown/playground/markitdown-scraper-playground.d.ts +1 -3
  294. package/umd/src/scrapers/pdf/PdfScraper.d.ts +1 -1
  295. package/umd/src/scrapers/pdf/playground/pdf-scraper-playground.d.ts +1 -3
  296. package/umd/src/scrapers/website/WebsiteScraper.d.ts +1 -1
  297. package/umd/src/scrapers/website/playground/website-scraper-playground.d.ts +1 -3
  298. package/umd/src/speech-recognition/BrowserSpeechRecognition.d.ts +2 -4
  299. package/umd/src/storage/file-cache-storage/FileCacheStorage.d.ts +2 -4
  300. package/umd/src/storage/local-storage/getIndexedDbStorage.d.ts +1 -3
  301. package/umd/src/storage/local-storage/getLocalStorage.d.ts +1 -3
  302. package/umd/src/storage/local-storage/getSessionStorage.d.ts +1 -3
  303. package/umd/src/transpilers/openai-sdk/playground/playground.d.ts +1 -3
  304. package/umd/src/types/InputParameters_private.d.ts +11 -0
  305. package/umd/src/types/Parameters_private.d.ts +16 -0
  306. package/umd/src/types/ReservedParameters_private.d.ts +10 -0
  307. package/umd/src/types/number_bytes.d.ts +21 -0
  308. package/umd/src/types/number_id.d.ts +13 -0
  309. package/umd/src/types/number_likeness.d.ts +8 -0
  310. package/umd/src/types/number_milliseconds.d.ts +33 -0
  311. package/umd/src/types/number_percent.d.ts +18 -0
  312. package/umd/src/types/number_positive.d.ts +16 -0
  313. package/umd/src/types/number_usd.d.ts +6 -106
  314. package/umd/src/types/string_agent_hash_private.d.ts +9 -0
  315. package/umd/src/types/string_agent_name_in_book_private.d.ts +8 -0
  316. package/umd/src/types/string_agent_name_private.d.ts +9 -0
  317. package/umd/src/types/string_agent_permanent_id_private.d.ts +10 -0
  318. package/umd/src/types/string_base64_private.d.ts +17 -0
  319. package/umd/src/types/string_business_category_name_private.d.ts +6 -0
  320. package/umd/src/types/string_char_private.d.ts +8 -0
  321. package/umd/src/types/string_chat_prompt_private.d.ts +9 -0
  322. package/umd/src/types/string_completion_prompt_private.d.ts +9 -0
  323. package/umd/src/types/string_email_private.d.ts +16 -0
  324. package/umd/src/types/string_host_private.d.ts +55 -0
  325. package/umd/src/types/string_mime_type_private.d.ts +17 -0
  326. package/umd/src/types/string_model_description_private.d.ts +8 -0
  327. package/umd/src/types/string_model_name_private.d.ts +8 -0
  328. package/umd/src/types/string_name_private.d.ts +9 -0
  329. package/umd/src/types/string_page_private.d.ts +9 -0
  330. package/umd/src/types/string_parameter_name.d.ts +74 -31
  331. package/umd/src/types/string_parameter_value_private.d.ts +9 -0
  332. package/umd/src/types/string_persona_description_private.d.ts +8 -0
  333. package/umd/src/types/string_prompt_image_private.d.ts +8 -0
  334. package/umd/src/types/string_prompt_private.d.ts +8 -0
  335. package/umd/src/types/string_reserved_parameter_name_private.d.ts +11 -0
  336. package/umd/src/types/string_system_message_private.d.ts +9 -0
  337. package/umd/src/types/string_template_private.d.ts +8 -0
  338. package/umd/src/types/string_text_prompt_private.d.ts +9 -0
  339. package/umd/src/types/string_title_private.d.ts +9 -0
  340. package/umd/src/types/string_url.d.ts +50 -46
  341. package/umd/src/types/string_url_private.d.ts +88 -0
  342. package/umd/src/types/typeAliases.d.ts +7 -1
  343. package/umd/src/utils/execCommand/$execCommand.d.ts +1 -3
  344. package/umd/src/utils/execCommand/$execCommands.d.ts +1 -3
  345. package/umd/src/utils/files/$induceBookDownload.d.ts +1 -3
  346. package/umd/src/utils/files/$induceFileDownload.d.ts +1 -3
  347. package/umd/src/utils/files/ObjectUrl.d.ts +1 -3
  348. package/umd/src/utils/toolCalls/mergeToolCalls.d.ts +1 -1
  349. package/umd/src/version.d.ts +1 -1
  350. package/umd/src/wizard/$getCompiledBook.d.ts +2 -4
  351. package/umd/src/wizard/wizard.d.ts +2 -4
package/esm/index.es.js CHANGED
@@ -35,7 +35,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
35
35
  * @generated
36
36
  * @see https://github.com/webgptorg/promptbook
37
37
  */
38
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-31';
38
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-34';
39
39
  /**
40
40
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
41
41
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -2165,9 +2165,7 @@ async function loadArchive(filePath, fs) {
2165
2165
  }
2166
2166
  return collectionJson;
2167
2167
  }
2168
- /**
2169
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
2170
- */
2168
+ /** Note: [🟢] Code for Node archive helper [loadArchive](src/conversion/archive/loadArchive.ts) should never be published into packages that could be imported into browser environment */
2171
2169
 
2172
2170
  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"}];
2173
2171
 
@@ -13273,10 +13271,8 @@ function $provideFilesystemForNode(options) {
13273
13271
  watch,
13274
13272
  };
13275
13273
  }
13276
- /**
13277
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
13278
- * TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
13279
- */
13274
+ /** 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 */
13275
+ /** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
13280
13276
 
13281
13277
  /**
13282
13278
  * Retrieves an intermediate source for a scraper based on the knowledge source.
@@ -13340,12 +13336,12 @@ async function getScraperIntermediateSource(source, options) {
13340
13336
  };
13341
13337
  return fileHandler;
13342
13338
  }
13339
+ /** 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 */
13343
13340
  /**
13344
13341
  * Note: Not using `FileCacheStorage` for two reasons:
13345
13342
  * 1) Need to store more than serialized JSONs
13346
13343
  * 2) Need to switch between a `rootDirname` and `cacheDirname` <- TODO: [😡]
13347
13344
  * TODO: [🐱‍🐉][🧠] Make some smart crop
13348
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
13349
13345
  */
13350
13346
 
13351
13347
  /**
@@ -13677,11 +13673,11 @@ class WebsiteScraper {
13677
13673
  return knowledge;
13678
13674
  }
13679
13675
  }
13676
+ /** 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 */
13680
13677
  /**
13681
13678
  * TODO: [👣] Scraped website in .md can act as cache item - there is no need to run conversion each time
13682
13679
  * TODO: [🪂] Do it in parallel 11:11
13683
13680
  * Note: No need to aggregate usage here, it is done by intercepting the llmTools
13684
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
13685
13681
  */
13686
13682
 
13687
13683
  /**
@@ -13804,9 +13800,7 @@ async function fetchUrlContent(url) {
13804
13800
  `);
13805
13801
  }
13806
13802
  }
13807
- /**
13808
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
13809
- */
13803
+ /** 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 */
13810
13804
 
13811
13805
  /**
13812
13806
  * Cached implementation of `run_browser` when it can be resolved.
@@ -18397,10 +18391,6 @@ class StyleCommitmentDefinition extends BaseCommitmentDefinition {
18397
18391
  * Prefix used for TEAM tool names.
18398
18392
  */
18399
18393
  const TEAM_TOOL_PREFIX = 'team_chat_';
18400
- /**
18401
- * Length of URL hash suffix appended to TEAM tool names.
18402
- */
18403
- const TEAM_TOOL_HASH_LENGTH = 10;
18404
18394
  /**
18405
18395
  * Fallback normalized name when teammate label is empty.
18406
18396
  */
@@ -18417,20 +18407,19 @@ function normalizeTeammateToolNamePart(teammateLabel) {
18417
18407
  return normalized || TEAM_TOOL_FALLBACK_NAME;
18418
18408
  }
18419
18409
  /**
18420
- * Builds a deterministic TEAM tool name from teammate identity.
18410
+ * Builds a deterministic TEAM tool name from the teammate label.
18421
18411
  *
18422
- * The readable part is based on teammate label while the hash suffix
18423
- * keeps uniqueness and stable mapping for the underlying teammate URL.
18412
+ * The tool name is derived solely from the human-readable label so that it
18413
+ * remains stable and predictable regardless of internal technical identifiers.
18424
18414
  *
18425
- * @param teammateUrl - Canonical teammate URL used at runtime.
18426
- * @param teammateLabel - Human-readable teammate label.
18427
- * @returns Deterministic TEAM tool name.
18415
+ * @param _teammateUrl - Canonical teammate URL (kept for API compatibility, not used).
18416
+ * @param teammateLabel - Human-readable teammate label used as the basis for the name.
18417
+ * @returns TEAM tool name derived from the label.
18428
18418
  * @private internal utility of TEAM commitments and chat UI mapping
18429
18419
  */
18430
- function createTeamToolName(teammateUrl, teammateLabel) {
18420
+ function createTeamToolName(_teammateUrl, teammateLabel) {
18431
18421
  const normalizedLabel = normalizeTeammateToolNamePart(teammateLabel);
18432
- const hash = computeHash(teammateUrl).substring(0, TEAM_TOOL_HASH_LENGTH);
18433
- return `${TEAM_TOOL_PREFIX}${normalizedLabel}_${hash}`;
18422
+ return `${TEAM_TOOL_PREFIX}${normalizedLabel}`;
18434
18423
  }
18435
18424
 
18436
18425
  const urlRegex = /https?:\/\/[^\s]+/gi;
@@ -18635,7 +18624,7 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
18635
18624
  `);
18636
18625
  }
18637
18626
  applyToAgentModelRequirements(requirements, content) {
18638
- var _a, _b;
18627
+ var _a, _b, _c;
18639
18628
  const trimmedContent = content.trim();
18640
18629
  if (!trimmedContent) {
18641
18630
  return requirements;
@@ -18647,14 +18636,18 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
18647
18636
  }
18648
18637
  const agentName = ((_a = requirements._metadata) === null || _a === void 0 ? void 0 : _a.agentName) || 'Agent';
18649
18638
  const existingTeammates = ((_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.teammates) || [];
18639
+ const preResolvedProfiles = (((_c = requirements._metadata) === null || _c === void 0 ? void 0 : _c.preResolvedTeammateProfiles) || {});
18650
18640
  const resolvedTeammates = resolveTeamTeammateLabels(trimmedContent, teammates);
18651
18641
  const teamEntries = resolvedTeammates.map((teammate) => {
18642
+ const profile = preResolvedProfiles[teammate.url];
18643
+ const resolvedLabel = (profile === null || profile === void 0 ? void 0 : profile.agentName) || teammate.label;
18652
18644
  const existingTeammate = existingTeammates.find((entry) => entry.url === teammate.url);
18653
18645
  return {
18654
18646
  toolName: ((existingTeammate === null || existingTeammate === void 0 ? void 0 : existingTeammate.toolName) ||
18655
- createTeamToolName(teammate.url, teammate.label)),
18656
- teammate,
18647
+ createTeamToolName(teammate.url, resolvedLabel)),
18648
+ teammate: { ...teammate, label: resolvedLabel },
18657
18649
  agentName,
18650
+ description: (profile === null || profile === void 0 ? void 0 : profile.personaDescription) || null,
18658
18651
  };
18659
18652
  });
18660
18653
  for (const entry of teamEntries) {
@@ -18666,9 +18659,12 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
18666
18659
  if (updatedTools.some((tool) => tool.name === entry.toolName)) {
18667
18660
  continue;
18668
18661
  }
18662
+ const toolDescription = entry.description
18663
+ ? `Consult teammate ${entry.teammate.label}\n${entry.description}`
18664
+ : `Consult teammate ${entry.teammate.label}`;
18669
18665
  updatedTools.push({
18670
18666
  name: entry.toolName,
18671
- description: `Consult teammate ${entry.teammate.label}`,
18667
+ description: toolDescription,
18672
18668
  parameters: {
18673
18669
  type: 'object',
18674
18670
  properties: {
@@ -18697,8 +18693,7 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
18697
18693
  toolName: entry.toolName,
18698
18694
  });
18699
18695
  }
18700
- const teamOverviewText = createTeamOverviewText(trimmedContent, teamEntries);
18701
- const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamOverviewText, teamEntries));
18696
+ const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamEntries));
18702
18697
  return this.appendToSystemMessage({
18703
18698
  ...requirements,
18704
18699
  tools: updatedTools,
@@ -18735,25 +18730,24 @@ function resolveTeamTeammateLabels(teamContent, teammates) {
18735
18730
  };
18736
18731
  });
18737
18732
  }
18738
- /**
18739
- * Rewrites TEAM commitment content into a URL-free teammate overview text.
18740
- */
18741
- function createTeamOverviewText(teamContent, teamEntries) {
18742
- let overviewText = teamContent;
18743
- for (const entry of teamEntries) {
18744
- overviewText = overviewText.split(entry.teammate.url).join(entry.teammate.label);
18745
- }
18746
- return overviewText.trim();
18747
- }
18748
18733
  /**
18749
18734
  * Builds the textual TEAM section body for the final system message.
18735
+ *
18736
+ * Each teammate is listed with its tool name and, when available, a one-line description.
18737
+ * Uses `spaceTrim` to ensure consistent whitespace and indentation.
18750
18738
  */
18751
- function buildTeamSystemMessageBody(teamOverviewText, teamEntries) {
18752
- const teammateLines = teamEntries.map((entry, index) => `${index + 1}) ${entry.teammate.label} tool \`${entry.toolName}\``);
18753
- if (!teamOverviewText) {
18754
- return teammateLines.join('\n');
18755
- }
18756
- return `${teamOverviewText}\n\n${teammateLines.join('\n')}`;
18739
+ function buildTeamSystemMessageBody(teamEntries) {
18740
+ const lines = teamEntries.map((entry, index) => {
18741
+ const toolLine = `${index + 1}) ${entry.teammate.label} tool \`${entry.toolName}\``;
18742
+ if (!entry.description) {
18743
+ return toolLine;
18744
+ }
18745
+ return spaceTrim$1(`
18746
+ ${toolLine}
18747
+ ${entry.description}
18748
+ `);
18749
+ });
18750
+ return lines.join('\n');
18757
18751
  }
18758
18752
  /**
18759
18753
  * Registers tool function and title for a teammate tool.
@@ -25413,9 +25407,7 @@ function $execCommand(options) {
25413
25407
  }
25414
25408
  });
25415
25409
  }
25416
- /**
25417
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25418
- */
25410
+ /** 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 */
25419
25411
 
25420
25412
  /**
25421
25413
  * Attempts to locate the specified application on a Linux system using the 'which' command.
@@ -25433,10 +25425,8 @@ async function locateAppOnLinux({ linuxWhich, }) {
25433
25425
  return null;
25434
25426
  }
25435
25427
  }
25436
- /**
25437
- * TODO: [🧠][♿] Maybe export through `@promptbook/node`
25438
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25439
- */
25428
+ /** 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 */
25429
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
25440
25430
 
25441
25431
  /**
25442
25432
  * Checks if the file is executable
@@ -25489,10 +25479,8 @@ async function locateAppOnMacOs({ macOsName, }) {
25489
25479
  return null;
25490
25480
  }
25491
25481
  }
25492
- /**
25493
- * TODO: [🧠][♿] Maybe export through `@promptbook/node`
25494
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25495
- */
25482
+ /** 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 */
25483
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
25496
25484
 
25497
25485
  /**
25498
25486
  * Attempts to locate the specified application on a Windows system by searching common installation directories.
@@ -25521,10 +25509,8 @@ async function locateAppOnWindows({ appName, windowsSuffix, }) {
25521
25509
  return null;
25522
25510
  }
25523
25511
  }
25524
- /**
25525
- * TODO: [🧠][♿] Maybe export through `@promptbook/node`
25526
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25527
- */
25512
+ /** 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 */
25513
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
25528
25514
 
25529
25515
  /**
25530
25516
  * Locates an application on the system
@@ -25561,10 +25547,8 @@ function locateApp(options) {
25561
25547
  }
25562
25548
  }
25563
25549
  }
25564
- /**
25565
- * TODO: [🧠][♿] Maybe export through `@promptbook/node`
25566
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25567
- */
25550
+ /** Note: [🟢] Code for Node executable locator [locateApp](src/executables/locateApp.ts) should never be published into packages that could be imported into browser environment */
25551
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
25568
25552
 
25569
25553
  /**
25570
25554
  * Locates the LibreOffice executable on the current system by searching platform-specific paths.
@@ -25580,10 +25564,8 @@ function locateLibreoffice() {
25580
25564
  macOsName: 'LibreOffice',
25581
25565
  });
25582
25566
  }
25583
- /**
25584
- * TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/legacy-documents`
25585
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25586
- */
25567
+ /** 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 */
25568
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/legacy-documents` */
25587
25569
 
25588
25570
  /**
25589
25571
  * Locates the Pandoc executable on the current system by searching platform-specific paths.
@@ -25599,10 +25581,8 @@ function locatePandoc() {
25599
25581
  macOsName: 'Pandoc',
25600
25582
  });
25601
25583
  }
25602
- /**
25603
- * TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/documents`
25604
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25605
- */
25584
+ /** 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 */
25585
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/documents` */
25606
25586
 
25607
25587
  /**
25608
25588
  * Provides paths to required executables (i.e. as Pandoc and LibreOffice) for Node.js environments.
@@ -25619,9 +25599,9 @@ async function $provideExecutablesForNode(options) {
25619
25599
  // <- TODO: [🧠] `null` vs `undefined`
25620
25600
  };
25621
25601
  }
25602
+ /** Note: [🟢] Code for Node executable locator [$provideExecutablesForNode](src/executables/$provideExecutablesForNode.ts) should never be published into packages that could be imported into browser environment */
25622
25603
  /**
25623
25604
  * TODO: [🧠] Allow to override the executables without need to call `locatePandoc` / `locateLibreoffice` in case of provided
25624
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25625
25605
  * TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
25626
25606
  */
25627
25607
 
@@ -25829,9 +25809,7 @@ async function $provideEnvFilename() {
25829
25809
  }
25830
25810
  return null;
25831
25811
  }
25832
- /**
25833
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25834
- */
25812
+ /** Note: [🟢] Code for Node environment helper [$provideEnvFilename](src/llm-providers/_common/register/$provideEnvFilename.ts) should never be published into packages that could be imported into browser environment */
25835
25813
 
25836
25814
  /**
25837
25815
  * Provides LLM tools configuration by reading environment variables.
@@ -25861,9 +25839,7 @@ async function $provideLlmToolsConfigurationFromEnv() {
25861
25839
  .filter((configuration) => configuration !== null);
25862
25840
  return llmToolsConfiguration;
25863
25841
  }
25864
- /**
25865
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25866
- */
25842
+ /** Note: [🟢] Code for Node environment helper [$provideLlmToolsConfigurationFromEnv](src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.ts) should never be published into packages that could be imported into browser environment */
25867
25843
 
25868
25844
  /**
25869
25845
  * Creates LLM execution tools from provided configuration objects
@@ -25969,20 +25945,18 @@ async function $provideLlmToolsFromEnv(options = {}) {
25969
25945
  }
25970
25946
  return createLlmToolsFromConfiguration(configuration, options);
25971
25947
  }
25948
+ /** Note: [🟢] Code for Node environment helper [$provideLlmToolsFromEnv](src/llm-providers/_common/register/$provideLlmToolsFromEnv.ts) should never be published into packages that could be imported into browser environment */
25972
25949
  /**
25973
25950
  * TODO: The architecture for LLM tools configuration consists of three key functions:
25974
25951
  * 1. `$provideLlmToolsFromEnv` - High-level function that detects available providers from env vars and returns ready-to-use LLM tools
25975
25952
  * 2. `$provideLlmToolsConfigurationFromEnv` - Middle layer that extracts configuration objects from environment variables
25976
25953
  * 3. `createLlmToolsFromConfiguration` - Low-level function that instantiates LLM tools from explicit configuration
25977
- *
25978
25954
  * This layered approach allows flexibility in how tools are configured:
25979
25955
  * - Use $provideLlmToolsFromEnv for automatic detection and setup in Node.js environments
25980
25956
  * - Use $provideLlmToolsConfigurationFromEnv to extract config objects for modification before instantiation
25981
25957
  * - Use createLlmToolsFromConfiguration for explicit control over tool configurations
25982
- *
25983
25958
  * TODO: [🧠][🍛] Which name is better `$provideLlmToolsFromEnv` or `$provideLlmToolsFromEnvironment`?
25984
25959
  * TODO: [🧠] Is there some meaningfull way how to test this util
25985
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
25986
25960
  * TODO: [🥃] Allow `ptbk make` without llm tools
25987
25961
  * TODO: This should be maybe not under `_common` but under `utils`
25988
25962
  * TODO: [®] DRY Register logic
@@ -26011,10 +25985,8 @@ async function $provideScrapersForNode(tools, options) {
26011
25985
  }
26012
25986
  return scrapers;
26013
25987
  }
26014
- /**
26015
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
26016
- * TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
26017
- */
25988
+ /** 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 */
25989
+ /** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
26018
25990
 
26019
25991
  /**
26020
25992
  * Extracts code block from markdown.
@@ -26330,10 +26302,8 @@ async function $provideExecutionToolsForNode(options) {
26330
26302
  };
26331
26303
  return tools;
26332
26304
  }
26333
- /**
26334
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
26335
- * TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
26336
- */
26305
+ /** Note: [🟢] Code for Node execution helper [$provideExecutionToolsForNode](src/execution/utils/$provideExecutionToolsForNode.ts) should never be published into packages that could be imported into browser environment */
26306
+ /** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
26337
26307
 
26338
26308
  /**
26339
26309
  * Checks if the directory exists
@@ -26656,10 +26626,8 @@ async function $provideScriptingForNode(options) {
26656
26626
  // TODO: [🔱] Do here auto-installation
26657
26627
  return [new JavascriptExecutionTools({ ...options, functions: getAllCommitmentsToolFunctionsForNode() })];
26658
26628
  }
26659
- /**
26660
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
26661
- * TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
26662
- */
26629
+ /** 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 */
26630
+ /** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
26663
26631
 
26664
26632
  /**
26665
26633
  * Stringify the PipelineJson with proper formatting
@@ -26782,10 +26750,8 @@ class FileCacheStorage {
26782
26750
  // [0] When `setItem` and `removeItem` called, the state of the file system should be the same
26783
26751
  }
26784
26752
  }
26785
- /**
26786
- * TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values
26787
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
26788
- */
26753
+ /** Note: [🟢] Code for Node file-cache storage [FileCacheStorage](src/storage/file-cache-storage/FileCacheStorage.ts) should never be published into packages that could be imported into browser environment */
26754
+ /** TODO: [🌗] Maybe some checkers, not all valid JSONs are desired and valid values */
26789
26755
 
26790
26756
  /**
26791
26757
  * Run multiple commands in a shell in sequence
@@ -26802,9 +26768,7 @@ async function $execCommands({ commands, cwd, crashOnError, }) {
26802
26768
  await $execCommand({ command, cwd, crashOnError });
26803
26769
  }
26804
26770
  }
26805
- /**
26806
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
26807
- */
26771
+ /** Note: [🟢] Code for Node command-execution helper [$execCommands](src/utils/execCommand/$execCommands.ts) should never be published into packages that could be imported into browser environment */
26808
26772
 
26809
26773
  /**
26810
26774
  * Keep-alive helpers used for streaming chat responses.
@@ -27057,13 +27021,23 @@ function getToolCallIdentity(toolCall) {
27057
27021
  */
27058
27022
  function mergeToolCalls(existingToolCalls, incomingToolCalls) {
27059
27023
  if (!existingToolCalls || existingToolCalls.length === 0) {
27060
- return incomingToolCalls ? [...incomingToolCalls] : [];
27024
+ return incomingToolCalls ? deduplicatePreparationToolCalls([...incomingToolCalls]) : [];
27061
27025
  }
27062
27026
  if (!incomingToolCalls || incomingToolCalls.length === 0) {
27063
27027
  return [...existingToolCalls];
27064
27028
  }
27065
27029
  const mergedToolCalls = [...existingToolCalls];
27066
27030
  for (const incomingToolCall of incomingToolCalls) {
27031
+ if (isAssistantPreparationToolCall(incomingToolCall)) {
27032
+ // A new preparation phase always replaces any previous assistant_preparation tool
27033
+ // call, regardless of phase argument, so only one chip is ever shown at a time.
27034
+ const existingPreparationIndex = mergedToolCalls.findIndex(isAssistantPreparationToolCall);
27035
+ if (existingPreparationIndex !== -1) {
27036
+ mergedToolCalls.splice(existingPreparationIndex, 1);
27037
+ }
27038
+ mergedToolCalls.push(incomingToolCall);
27039
+ continue;
27040
+ }
27067
27041
  const incomingIdentity = getToolCallIdentity(incomingToolCall);
27068
27042
  const existingIndex = mergedToolCalls.findIndex((existingToolCall) => getToolCallIdentity(existingToolCall) === incomingIdentity);
27069
27043
  if (existingIndex === -1) {
@@ -27175,6 +27149,30 @@ function serializeValueForMerge(value) {
27175
27149
  return String(value);
27176
27150
  }
27177
27151
  }
27152
+ /**
27153
+ * Ensures at most one `assistant_preparation` tool call survives in the list,
27154
+ * keeping the last occurrence so the most recent preparation phase is shown.
27155
+ *
27156
+ * @param toolCalls - Mutable list to deduplicate in-place.
27157
+ * @returns The same array after removing redundant preparation entries.
27158
+ * @private helper of `mergeToolCalls`
27159
+ */
27160
+ function deduplicatePreparationToolCalls(toolCalls) {
27161
+ let lastPreparationIndex = -1;
27162
+ for (let index = toolCalls.length - 1; index >= 0; index--) {
27163
+ if (!isAssistantPreparationToolCall(toolCalls[index])) {
27164
+ continue;
27165
+ }
27166
+ if (lastPreparationIndex === -1) {
27167
+ lastPreparationIndex = index;
27168
+ }
27169
+ else {
27170
+ // Remove earlier duplicate — keep only the last (most recent) one.
27171
+ toolCalls.splice(index, 1);
27172
+ }
27173
+ }
27174
+ return toolCalls;
27175
+ }
27178
27176
 
27179
27177
  /**
27180
27178
  * Computes SHA-256 hash of the agent source
@@ -28107,7 +28105,7 @@ function getSafeReferenceCommitmentFallback(commitmentType, originalContent) {
28107
28105
  * @private @@@
28108
28106
  */
28109
28107
  async function createAgentModelRequirementsWithCommitments(agentSource, modelName, options) {
28110
- var _a;
28108
+ var _a, _b, _c;
28111
28109
  const agentReferenceResolver = options === null || options === void 0 ? void 0 : options.agentReferenceResolver;
28112
28110
  // Parse the agent source to extract commitments
28113
28111
  const parseResult = parseAgentSourceWithCommitments(agentSource);
@@ -28175,6 +28173,36 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
28175
28173
  if (commitment.type === 'CLOSED' && i !== filteredCommitments.length - 1) {
28176
28174
  continue;
28177
28175
  }
28176
+ // For TEAM commitments, pre-resolve teammate profiles if a resolver is provided
28177
+ // and store them in metadata before the commitment is applied.
28178
+ const profileResolver = (_a = options === null || options === void 0 ? void 0 : options.teammateProfileResolver) !== null && _a !== void 0 ? _a : options === null || options === void 0 ? void 0 : options.agentReferenceResolver;
28179
+ if (commitment.type === 'TEAM' && (profileResolver === null || profileResolver === void 0 ? void 0 : profileResolver.resolveTeammateProfile)) {
28180
+ try {
28181
+ const parsedTeammates = parseTeamCommitmentContent(commitmentContent, { strict: false });
28182
+ const preResolved = {
28183
+ ...(_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.preResolvedTeammateProfiles,
28184
+ };
28185
+ for (const teammate of parsedTeammates) {
28186
+ if (preResolved[teammate.url]) {
28187
+ continue;
28188
+ }
28189
+ const profile = await profileResolver.resolveTeammateProfile(teammate.url);
28190
+ if (profile) {
28191
+ preResolved[teammate.url] = profile;
28192
+ }
28193
+ }
28194
+ requirements = {
28195
+ ...requirements,
28196
+ _metadata: {
28197
+ ...requirements._metadata,
28198
+ preResolvedTeammateProfiles: preResolved,
28199
+ },
28200
+ };
28201
+ }
28202
+ catch (error) {
28203
+ console.warn('Failed to pre-resolve teammate profiles for TEAM commitment:', error);
28204
+ }
28205
+ }
28178
28206
  const definition = getCommitmentDefinition(commitment.type);
28179
28207
  if (definition) {
28180
28208
  try {
@@ -28270,7 +28298,7 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
28270
28298
  // Add example interactions to the system message
28271
28299
  const examples = [];
28272
28300
  // 1. Initial message as an example agent response
28273
- const initialMessage = (_a = parseResult.commitments.find((c) => c.type === 'INITIAL MESSAGE')) === null || _a === void 0 ? void 0 : _a.content;
28301
+ const initialMessage = (_c = parseResult.commitments.find((c) => c.type === 'INITIAL MESSAGE')) === null || _c === void 0 ? void 0 : _c.content;
28274
28302
  if (initialMessage) {
28275
28303
  examples.push(`Agent: ${initialMessage}`);
28276
28304
  }