@promptbook/browser 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 +112 -64
  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 +112 -64
  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
@@ -29,7 +29,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
29
29
  * @generated
30
30
  * @see https://github.com/webgptorg/promptbook
31
31
  */
32
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-31';
32
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-34';
33
33
  /**
34
34
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
35
35
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -9900,10 +9900,6 @@ class StyleCommitmentDefinition extends BaseCommitmentDefinition {
9900
9900
  * Prefix used for TEAM tool names.
9901
9901
  */
9902
9902
  const TEAM_TOOL_PREFIX = 'team_chat_';
9903
- /**
9904
- * Length of URL hash suffix appended to TEAM tool names.
9905
- */
9906
- const TEAM_TOOL_HASH_LENGTH = 10;
9907
9903
  /**
9908
9904
  * Fallback normalized name when teammate label is empty.
9909
9905
  */
@@ -9920,20 +9916,19 @@ function normalizeTeammateToolNamePart(teammateLabel) {
9920
9916
  return normalized || TEAM_TOOL_FALLBACK_NAME;
9921
9917
  }
9922
9918
  /**
9923
- * Builds a deterministic TEAM tool name from teammate identity.
9919
+ * Builds a deterministic TEAM tool name from the teammate label.
9924
9920
  *
9925
- * The readable part is based on teammate label while the hash suffix
9926
- * keeps uniqueness and stable mapping for the underlying teammate URL.
9921
+ * The tool name is derived solely from the human-readable label so that it
9922
+ * remains stable and predictable regardless of internal technical identifiers.
9927
9923
  *
9928
- * @param teammateUrl - Canonical teammate URL used at runtime.
9929
- * @param teammateLabel - Human-readable teammate label.
9930
- * @returns Deterministic TEAM tool name.
9924
+ * @param _teammateUrl - Canonical teammate URL (kept for API compatibility, not used).
9925
+ * @param teammateLabel - Human-readable teammate label used as the basis for the name.
9926
+ * @returns TEAM tool name derived from the label.
9931
9927
  * @private internal utility of TEAM commitments and chat UI mapping
9932
9928
  */
9933
- function createTeamToolName(teammateUrl, teammateLabel) {
9929
+ function createTeamToolName(_teammateUrl, teammateLabel) {
9934
9930
  const normalizedLabel = normalizeTeammateToolNamePart(teammateLabel);
9935
- const hash = computeHash(teammateUrl).substring(0, TEAM_TOOL_HASH_LENGTH);
9936
- return `${TEAM_TOOL_PREFIX}${normalizedLabel}_${hash}`;
9931
+ return `${TEAM_TOOL_PREFIX}${normalizedLabel}`;
9937
9932
  }
9938
9933
 
9939
9934
  const urlRegex = /https?:\/\/[^\s]+/gi;
@@ -10138,7 +10133,7 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
10138
10133
  `);
10139
10134
  }
10140
10135
  applyToAgentModelRequirements(requirements, content) {
10141
- var _a, _b;
10136
+ var _a, _b, _c;
10142
10137
  const trimmedContent = content.trim();
10143
10138
  if (!trimmedContent) {
10144
10139
  return requirements;
@@ -10150,14 +10145,18 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
10150
10145
  }
10151
10146
  const agentName = ((_a = requirements._metadata) === null || _a === void 0 ? void 0 : _a.agentName) || 'Agent';
10152
10147
  const existingTeammates = ((_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.teammates) || [];
10148
+ const preResolvedProfiles = (((_c = requirements._metadata) === null || _c === void 0 ? void 0 : _c.preResolvedTeammateProfiles) || {});
10153
10149
  const resolvedTeammates = resolveTeamTeammateLabels(trimmedContent, teammates);
10154
10150
  const teamEntries = resolvedTeammates.map((teammate) => {
10151
+ const profile = preResolvedProfiles[teammate.url];
10152
+ const resolvedLabel = (profile === null || profile === void 0 ? void 0 : profile.agentName) || teammate.label;
10155
10153
  const existingTeammate = existingTeammates.find((entry) => entry.url === teammate.url);
10156
10154
  return {
10157
10155
  toolName: ((existingTeammate === null || existingTeammate === void 0 ? void 0 : existingTeammate.toolName) ||
10158
- createTeamToolName(teammate.url, teammate.label)),
10159
- teammate,
10156
+ createTeamToolName(teammate.url, resolvedLabel)),
10157
+ teammate: { ...teammate, label: resolvedLabel },
10160
10158
  agentName,
10159
+ description: (profile === null || profile === void 0 ? void 0 : profile.personaDescription) || null,
10161
10160
  };
10162
10161
  });
10163
10162
  for (const entry of teamEntries) {
@@ -10169,9 +10168,12 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
10169
10168
  if (updatedTools.some((tool) => tool.name === entry.toolName)) {
10170
10169
  continue;
10171
10170
  }
10171
+ const toolDescription = entry.description
10172
+ ? `Consult teammate ${entry.teammate.label}\n${entry.description}`
10173
+ : `Consult teammate ${entry.teammate.label}`;
10172
10174
  updatedTools.push({
10173
10175
  name: entry.toolName,
10174
- description: `Consult teammate ${entry.teammate.label}`,
10176
+ description: toolDescription,
10175
10177
  parameters: {
10176
10178
  type: 'object',
10177
10179
  properties: {
@@ -10200,8 +10202,7 @@ class TeamCommitmentDefinition extends BaseCommitmentDefinition {
10200
10202
  toolName: entry.toolName,
10201
10203
  });
10202
10204
  }
10203
- const teamOverviewText = createTeamOverviewText(trimmedContent, teamEntries);
10204
- const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamOverviewText, teamEntries));
10205
+ const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamEntries));
10205
10206
  return this.appendToSystemMessage({
10206
10207
  ...requirements,
10207
10208
  tools: updatedTools,
@@ -10238,25 +10239,24 @@ function resolveTeamTeammateLabels(teamContent, teammates) {
10238
10239
  };
10239
10240
  });
10240
10241
  }
10241
- /**
10242
- * Rewrites TEAM commitment content into a URL-free teammate overview text.
10243
- */
10244
- function createTeamOverviewText(teamContent, teamEntries) {
10245
- let overviewText = teamContent;
10246
- for (const entry of teamEntries) {
10247
- overviewText = overviewText.split(entry.teammate.url).join(entry.teammate.label);
10248
- }
10249
- return overviewText.trim();
10250
- }
10251
10242
  /**
10252
10243
  * Builds the textual TEAM section body for the final system message.
10244
+ *
10245
+ * Each teammate is listed with its tool name and, when available, a one-line description.
10246
+ * Uses `spaceTrim` to ensure consistent whitespace and indentation.
10253
10247
  */
10254
- function buildTeamSystemMessageBody(teamOverviewText, teamEntries) {
10255
- const teammateLines = teamEntries.map((entry, index) => `${index + 1}) ${entry.teammate.label} tool \`${entry.toolName}\``);
10256
- if (!teamOverviewText) {
10257
- return teammateLines.join('\n');
10258
- }
10259
- return `${teamOverviewText}\n\n${teammateLines.join('\n')}`;
10248
+ function buildTeamSystemMessageBody(teamEntries) {
10249
+ const lines = teamEntries.map((entry, index) => {
10250
+ const toolLine = `${index + 1}) ${entry.teammate.label} tool \`${entry.toolName}\``;
10251
+ if (!entry.description) {
10252
+ return toolLine;
10253
+ }
10254
+ return spaceTrim$1(`
10255
+ ${toolLine}
10256
+ ${entry.description}
10257
+ `);
10258
+ });
10259
+ return lines.join('\n');
10260
10260
  }
10261
10261
  /**
10262
10262
  * Registers tool function and title for a teammate tool.
@@ -16756,9 +16756,7 @@ class SimplePromptInterfaceTools {
16756
16756
  return answer;
16757
16757
  }
16758
16758
  }
16759
- /**
16760
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
16761
- */
16759
+ /** Note: [🔵] Code for browser dialog helper [SimplePromptInterfaceTools](src/dialogs/simple-prompt/SimplePromptInterfaceTools.ts) should never be published outside of `@promptbook/browser` */
16762
16760
 
16763
16761
  /**
16764
16762
  * Safely retrieves the global scope object (window in browser, global in Node.js)
@@ -16957,10 +16955,8 @@ class BrowserSpeechRecognition {
16957
16955
  }
16958
16956
  }
16959
16957
  }
16960
- /**
16961
- * TODO: !!!! Search ACRY for `window` and put -> [🔵]
16962
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
16963
- */
16958
+ /** Note: [🔵] Code for browser speech-recognition adapter [BrowserSpeechRecognition](src/speech-recognition/BrowserSpeechRecognition.ts) should never be published outside of `@promptbook/browser` */
16959
+ /** TODO: !!!! Search ACRY for `window` and put -> [🔵] */
16964
16960
 
16965
16961
  /**
16966
16962
  * Creates a PromptbookStorage backed by IndexedDB.
@@ -17037,9 +17033,7 @@ function getIndexedDbStorage(options) {
17037
17033
  indexedDbStorageCache.set(cacheKey, storage);
17038
17034
  return storage;
17039
17035
  }
17040
- /**
17041
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17042
- */
17036
+ /** Note: [🔵] Code for browser storage helper [getIndexedDbStorage](src/storage/local-storage/getIndexedDbStorage.ts) should never be published outside of `@promptbook/browser` */
17043
17037
 
17044
17038
  /**
17045
17039
  * Stringify the PipelineJson with proper formatting
@@ -17129,9 +17123,7 @@ function getLocalStorage() {
17129
17123
  promptbookLocalStorage = makePromptbookStorageFromWebStorage(localStorage);
17130
17124
  return promptbookLocalStorage;
17131
17125
  }
17132
- /**
17133
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17134
- */
17126
+ /** Note: [🔵] Code for browser storage helper [getLocalStorage](src/storage/local-storage/getLocalStorage.ts) should never be published outside of `@promptbook/browser` */
17135
17127
 
17136
17128
  /**
17137
17129
  * Cache storage
@@ -17154,9 +17146,7 @@ function getSessionStorage() {
17154
17146
  promptbookSessionStorage = makePromptbookStorageFromWebStorage(sessionStorage);
17155
17147
  return promptbookSessionStorage;
17156
17148
  }
17157
- /**
17158
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17159
- */
17149
+ /** Note: [🔵] Code for browser storage helper [getSessionStorage](src/storage/local-storage/getSessionStorage.ts) should never be published outside of `@promptbook/browser` */
17160
17150
 
17161
17151
  /**
17162
17152
  * Normalizes a domain-like string into a comparable hostname form.
@@ -17911,9 +17901,7 @@ class ObjectUrl extends Registration {
17911
17901
  return new URL(this.src);
17912
17902
  }
17913
17903
  }
17914
- /**
17915
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17916
- */
17904
+ /** Note: [🔵] Code for browser file helper [ObjectUrl](src/utils/files/ObjectUrl.ts) should never be published outside of `@promptbook/browser` */
17917
17905
 
17918
17906
  /**
17919
17907
  * Download a File in a browser
@@ -17933,9 +17921,7 @@ async function $induceFileDownload(fileOrBlobOrUrl) {
17933
17921
  link.click();
17934
17922
  await objectUrl.destroy();
17935
17923
  }
17936
- /**
17937
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17938
- */
17924
+ /** Note: [🔵] Code for browser file helper [$induceFileDownload](src/utils/files/$induceFileDownload.ts) should never be published outside of `@promptbook/browser` */
17939
17925
 
17940
17926
  /**
17941
17927
  * Download a Book in a browser
@@ -17954,9 +17940,7 @@ async function $induceBookDownload(book) {
17954
17940
  });
17955
17941
  return /* not await */ $induceFileDownload(bookFile);
17956
17942
  }
17957
- /**
17958
- * Note: [🔵] Code in this file should never be published outside of `@promptbook/browser`
17959
- */
17943
+ /** Note: [🔵] Code for browser file helper [$induceBookDownload](src/utils/files/$induceBookDownload.ts) should never be published outside of `@promptbook/browser` */
17960
17944
 
17961
17945
  /**
17962
17946
  * Keep-alive helpers used for streaming chat responses.
@@ -18282,13 +18266,23 @@ function getToolCallIdentity(toolCall) {
18282
18266
  */
18283
18267
  function mergeToolCalls(existingToolCalls, incomingToolCalls) {
18284
18268
  if (!existingToolCalls || existingToolCalls.length === 0) {
18285
- return incomingToolCalls ? [...incomingToolCalls] : [];
18269
+ return incomingToolCalls ? deduplicatePreparationToolCalls([...incomingToolCalls]) : [];
18286
18270
  }
18287
18271
  if (!incomingToolCalls || incomingToolCalls.length === 0) {
18288
18272
  return [...existingToolCalls];
18289
18273
  }
18290
18274
  const mergedToolCalls = [...existingToolCalls];
18291
18275
  for (const incomingToolCall of incomingToolCalls) {
18276
+ if (isAssistantPreparationToolCall(incomingToolCall)) {
18277
+ // A new preparation phase always replaces any previous assistant_preparation tool
18278
+ // call, regardless of phase argument, so only one chip is ever shown at a time.
18279
+ const existingPreparationIndex = mergedToolCalls.findIndex(isAssistantPreparationToolCall);
18280
+ if (existingPreparationIndex !== -1) {
18281
+ mergedToolCalls.splice(existingPreparationIndex, 1);
18282
+ }
18283
+ mergedToolCalls.push(incomingToolCall);
18284
+ continue;
18285
+ }
18292
18286
  const incomingIdentity = getToolCallIdentity(incomingToolCall);
18293
18287
  const existingIndex = mergedToolCalls.findIndex((existingToolCall) => getToolCallIdentity(existingToolCall) === incomingIdentity);
18294
18288
  if (existingIndex === -1) {
@@ -18400,6 +18394,30 @@ function serializeValueForMerge(value) {
18400
18394
  return String(value);
18401
18395
  }
18402
18396
  }
18397
+ /**
18398
+ * Ensures at most one `assistant_preparation` tool call survives in the list,
18399
+ * keeping the last occurrence so the most recent preparation phase is shown.
18400
+ *
18401
+ * @param toolCalls - Mutable list to deduplicate in-place.
18402
+ * @returns The same array after removing redundant preparation entries.
18403
+ * @private helper of `mergeToolCalls`
18404
+ */
18405
+ function deduplicatePreparationToolCalls(toolCalls) {
18406
+ let lastPreparationIndex = -1;
18407
+ for (let index = toolCalls.length - 1; index >= 0; index--) {
18408
+ if (!isAssistantPreparationToolCall(toolCalls[index])) {
18409
+ continue;
18410
+ }
18411
+ if (lastPreparationIndex === -1) {
18412
+ lastPreparationIndex = index;
18413
+ }
18414
+ else {
18415
+ // Remove earlier duplicate — keep only the last (most recent) one.
18416
+ toolCalls.splice(index, 1);
18417
+ }
18418
+ }
18419
+ return toolCalls;
18420
+ }
18403
18421
 
18404
18422
  /**
18405
18423
  * Gets all tool titles provided by all commitments
@@ -22655,7 +22673,7 @@ function getSafeReferenceCommitmentFallback(commitmentType, originalContent) {
22655
22673
  * @private @@@
22656
22674
  */
22657
22675
  async function createAgentModelRequirementsWithCommitments(agentSource, modelName, options) {
22658
- var _a;
22676
+ var _a, _b, _c;
22659
22677
  const agentReferenceResolver = options === null || options === void 0 ? void 0 : options.agentReferenceResolver;
22660
22678
  // Parse the agent source to extract commitments
22661
22679
  const parseResult = parseAgentSourceWithCommitments(agentSource);
@@ -22723,6 +22741,36 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
22723
22741
  if (commitment.type === 'CLOSED' && i !== filteredCommitments.length - 1) {
22724
22742
  continue;
22725
22743
  }
22744
+ // For TEAM commitments, pre-resolve teammate profiles if a resolver is provided
22745
+ // and store them in metadata before the commitment is applied.
22746
+ 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;
22747
+ if (commitment.type === 'TEAM' && (profileResolver === null || profileResolver === void 0 ? void 0 : profileResolver.resolveTeammateProfile)) {
22748
+ try {
22749
+ const parsedTeammates = parseTeamCommitmentContent(commitmentContent, { strict: false });
22750
+ const preResolved = {
22751
+ ...(_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.preResolvedTeammateProfiles,
22752
+ };
22753
+ for (const teammate of parsedTeammates) {
22754
+ if (preResolved[teammate.url]) {
22755
+ continue;
22756
+ }
22757
+ const profile = await profileResolver.resolveTeammateProfile(teammate.url);
22758
+ if (profile) {
22759
+ preResolved[teammate.url] = profile;
22760
+ }
22761
+ }
22762
+ requirements = {
22763
+ ...requirements,
22764
+ _metadata: {
22765
+ ...requirements._metadata,
22766
+ preResolvedTeammateProfiles: preResolved,
22767
+ },
22768
+ };
22769
+ }
22770
+ catch (error) {
22771
+ console.warn('Failed to pre-resolve teammate profiles for TEAM commitment:', error);
22772
+ }
22773
+ }
22726
22774
  const definition = getCommitmentDefinition(commitment.type);
22727
22775
  if (definition) {
22728
22776
  try {
@@ -22818,7 +22866,7 @@ async function createAgentModelRequirementsWithCommitments(agentSource, modelNam
22818
22866
  // Add example interactions to the system message
22819
22867
  const examples = [];
22820
22868
  // 1. Initial message as an example agent response
22821
- const initialMessage = (_a = parseResult.commitments.find((c) => c.type === 'INITIAL MESSAGE')) === null || _a === void 0 ? void 0 : _a.content;
22869
+ const initialMessage = (_c = parseResult.commitments.find((c) => c.type === 'INITIAL MESSAGE')) === null || _c === void 0 ? void 0 : _c.content;
22822
22870
  if (initialMessage) {
22823
22871
  examples.push(`Agent: ${initialMessage}`);
22824
22872
  }