@promptbook/remote-server 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 +128 -89
  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 +128 -89
  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/umd/index.umd.js CHANGED
@@ -50,7 +50,7 @@
50
50
  * @generated
51
51
  * @see https://github.com/webgptorg/promptbook
52
52
  */
53
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-31';
53
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-34';
54
54
  /**
55
55
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
56
56
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -1398,9 +1398,7 @@
1398
1398
  }
1399
1399
  });
1400
1400
  }
1401
- /**
1402
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
1403
- */
1401
+ /** 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 */
1404
1402
 
1405
1403
  /**
1406
1404
  * [🐱‍🚀]
@@ -1427,9 +1425,7 @@
1427
1425
  isVerbose: true,
1428
1426
  });
1429
1427
  }
1430
- /**
1431
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
1432
- */
1428
+ /** Note: [🟢] Code for Node server bootstrap [startAgentServer](src/remote-server/startAgentServer.ts) should never be published into packages that could be imported into browser environment */
1433
1429
 
1434
1430
  /**
1435
1431
  * Make error report URL for the given error
@@ -1942,10 +1938,8 @@
1942
1938
  return null;
1943
1939
  }
1944
1940
  }
1945
- /**
1946
- * TODO: [🧠][♿] Maybe export through `@promptbook/node`
1947
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
1948
- */
1941
+ /** 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 */
1942
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
1949
1943
 
1950
1944
  /**
1951
1945
  * Provides filesystem access (for example for Node.js-based scrapers)
@@ -1968,10 +1962,8 @@
1968
1962
  watch: promises.watch,
1969
1963
  };
1970
1964
  }
1971
- /**
1972
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
1973
- * TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
1974
- */
1965
+ /** 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 */
1966
+ /** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
1975
1967
 
1976
1968
  /**
1977
1969
  * Checks if the file is executable
@@ -2024,10 +2016,8 @@
2024
2016
  return null;
2025
2017
  }
2026
2018
  }
2027
- /**
2028
- * TODO: [🧠][♿] Maybe export through `@promptbook/node`
2029
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
2030
- */
2019
+ /** 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 */
2020
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
2031
2021
 
2032
2022
  /**
2033
2023
  * Attempts to locate the specified application on a Windows system by searching common installation directories.
@@ -2056,10 +2046,8 @@
2056
2046
  return null;
2057
2047
  }
2058
2048
  }
2059
- /**
2060
- * TODO: [🧠][♿] Maybe export through `@promptbook/node`
2061
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
2062
- */
2049
+ /** 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 */
2050
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
2063
2051
 
2064
2052
  /**
2065
2053
  * Locates an application on the system
@@ -2096,10 +2084,8 @@
2096
2084
  }
2097
2085
  }
2098
2086
  }
2099
- /**
2100
- * TODO: [🧠][♿] Maybe export through `@promptbook/node`
2101
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
2102
- */
2087
+ /** Note: [🟢] Code for Node executable locator [locateApp](src/executables/locateApp.ts) should never be published into packages that could be imported into browser environment */
2088
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` */
2103
2089
 
2104
2090
  /**
2105
2091
  * Locates the LibreOffice executable on the current system by searching platform-specific paths.
@@ -2115,10 +2101,8 @@
2115
2101
  macOsName: 'LibreOffice',
2116
2102
  });
2117
2103
  }
2118
- /**
2119
- * TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/legacy-documents`
2120
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
2121
- */
2104
+ /** 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 */
2105
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/legacy-documents` */
2122
2106
 
2123
2107
  /**
2124
2108
  * Locates the Pandoc executable on the current system by searching platform-specific paths.
@@ -2134,10 +2118,8 @@
2134
2118
  macOsName: 'Pandoc',
2135
2119
  });
2136
2120
  }
2137
- /**
2138
- * TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/documents`
2139
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
2140
- */
2121
+ /** 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 */
2122
+ /** TODO: [🧠][♿] Maybe export through `@promptbook/node` OR `@promptbook/documents` */
2141
2123
 
2142
2124
  /**
2143
2125
  * Provides paths to required executables (i.e. as Pandoc and LibreOffice) for Node.js environments.
@@ -2154,9 +2136,9 @@
2154
2136
  // <- TODO: [🧠] `null` vs `undefined`
2155
2137
  };
2156
2138
  }
2139
+ /** Note: [🟢] Code for Node executable locator [$provideExecutablesForNode](src/executables/$provideExecutablesForNode.ts) should never be published into packages that could be imported into browser environment */
2157
2140
  /**
2158
2141
  * TODO: [🧠] Allow to override the executables without need to call `locatePandoc` / `locateLibreoffice` in case of provided
2159
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
2160
2142
  * TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
2161
2143
  */
2162
2144
 
@@ -8089,10 +8071,8 @@
8089
8071
  }
8090
8072
  return scrapers;
8091
8073
  }
8092
- /**
8093
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
8094
- * TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
8095
- */
8074
+ /** 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 */
8075
+ /** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
8096
8076
 
8097
8077
  /**
8098
8078
  * Normalizes a given text to camelCase format.
@@ -10415,12 +10395,12 @@
10415
10395
  };
10416
10396
  return fileHandler;
10417
10397
  }
10398
+ /** 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 */
10418
10399
  /**
10419
10400
  * Note: Not using `FileCacheStorage` for two reasons:
10420
10401
  * 1) Need to store more than serialized JSONs
10421
10402
  * 2) Need to switch between a `rootDirname` and `cacheDirname` <- TODO: [😡]
10422
10403
  * TODO: [🐱‍🐉][🧠] Make some smart crop
10423
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
10424
10404
  */
10425
10405
 
10426
10406
  /**
@@ -10752,11 +10732,11 @@
10752
10732
  return knowledge;
10753
10733
  }
10754
10734
  }
10735
+ /** 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 */
10755
10736
  /**
10756
10737
  * TODO: [👣] Scraped website in .md can act as cache item - there is no need to run conversion each time
10757
10738
  * TODO: [🪂] Do it in parallel 11:11
10758
10739
  * Note: No need to aggregate usage here, it is done by intercepting the llmTools
10759
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
10760
10740
  */
10761
10741
 
10762
10742
  /**
@@ -10879,9 +10859,7 @@
10879
10859
  `);
10880
10860
  }
10881
10861
  }
10882
- /**
10883
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
10884
- */
10862
+ /** 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 */
10885
10863
 
10886
10864
  /**
10887
10865
  * Cached implementation of `run_browser` when it can be resolved.
@@ -15472,10 +15450,6 @@
15472
15450
  * Prefix used for TEAM tool names.
15473
15451
  */
15474
15452
  const TEAM_TOOL_PREFIX = 'team_chat_';
15475
- /**
15476
- * Length of URL hash suffix appended to TEAM tool names.
15477
- */
15478
- const TEAM_TOOL_HASH_LENGTH = 10;
15479
15453
  /**
15480
15454
  * Fallback normalized name when teammate label is empty.
15481
15455
  */
@@ -15492,20 +15466,19 @@
15492
15466
  return normalized || TEAM_TOOL_FALLBACK_NAME;
15493
15467
  }
15494
15468
  /**
15495
- * Builds a deterministic TEAM tool name from teammate identity.
15469
+ * Builds a deterministic TEAM tool name from the teammate label.
15496
15470
  *
15497
- * The readable part is based on teammate label while the hash suffix
15498
- * keeps uniqueness and stable mapping for the underlying teammate URL.
15471
+ * The tool name is derived solely from the human-readable label so that it
15472
+ * remains stable and predictable regardless of internal technical identifiers.
15499
15473
  *
15500
- * @param teammateUrl - Canonical teammate URL used at runtime.
15501
- * @param teammateLabel - Human-readable teammate label.
15502
- * @returns Deterministic TEAM tool name.
15474
+ * @param _teammateUrl - Canonical teammate URL (kept for API compatibility, not used).
15475
+ * @param teammateLabel - Human-readable teammate label used as the basis for the name.
15476
+ * @returns TEAM tool name derived from the label.
15503
15477
  * @private internal utility of TEAM commitments and chat UI mapping
15504
15478
  */
15505
- function createTeamToolName(teammateUrl, teammateLabel) {
15479
+ function createTeamToolName(_teammateUrl, teammateLabel) {
15506
15480
  const normalizedLabel = normalizeTeammateToolNamePart(teammateLabel);
15507
- const hash = computeHash(teammateUrl).substring(0, TEAM_TOOL_HASH_LENGTH);
15508
- return `${TEAM_TOOL_PREFIX}${normalizedLabel}_${hash}`;
15481
+ return `${TEAM_TOOL_PREFIX}${normalizedLabel}`;
15509
15482
  }
15510
15483
 
15511
15484
  const urlRegex = /https?:\/\/[^\s]+/gi;
@@ -15710,7 +15683,7 @@
15710
15683
  `);
15711
15684
  }
15712
15685
  applyToAgentModelRequirements(requirements, content) {
15713
- var _a, _b;
15686
+ var _a, _b, _c;
15714
15687
  const trimmedContent = content.trim();
15715
15688
  if (!trimmedContent) {
15716
15689
  return requirements;
@@ -15722,14 +15695,18 @@
15722
15695
  }
15723
15696
  const agentName = ((_a = requirements._metadata) === null || _a === void 0 ? void 0 : _a.agentName) || 'Agent';
15724
15697
  const existingTeammates = ((_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.teammates) || [];
15698
+ const preResolvedProfiles = (((_c = requirements._metadata) === null || _c === void 0 ? void 0 : _c.preResolvedTeammateProfiles) || {});
15725
15699
  const resolvedTeammates = resolveTeamTeammateLabels(trimmedContent, teammates);
15726
15700
  const teamEntries = resolvedTeammates.map((teammate) => {
15701
+ const profile = preResolvedProfiles[teammate.url];
15702
+ const resolvedLabel = (profile === null || profile === void 0 ? void 0 : profile.agentName) || teammate.label;
15727
15703
  const existingTeammate = existingTeammates.find((entry) => entry.url === teammate.url);
15728
15704
  return {
15729
15705
  toolName: ((existingTeammate === null || existingTeammate === void 0 ? void 0 : existingTeammate.toolName) ||
15730
- createTeamToolName(teammate.url, teammate.label)),
15731
- teammate,
15706
+ createTeamToolName(teammate.url, resolvedLabel)),
15707
+ teammate: { ...teammate, label: resolvedLabel },
15732
15708
  agentName,
15709
+ description: (profile === null || profile === void 0 ? void 0 : profile.personaDescription) || null,
15733
15710
  };
15734
15711
  });
15735
15712
  for (const entry of teamEntries) {
@@ -15741,9 +15718,12 @@
15741
15718
  if (updatedTools.some((tool) => tool.name === entry.toolName)) {
15742
15719
  continue;
15743
15720
  }
15721
+ const toolDescription = entry.description
15722
+ ? `Consult teammate ${entry.teammate.label}\n${entry.description}`
15723
+ : `Consult teammate ${entry.teammate.label}`;
15744
15724
  updatedTools.push({
15745
15725
  name: entry.toolName,
15746
- description: `Consult teammate ${entry.teammate.label}`,
15726
+ description: toolDescription,
15747
15727
  parameters: {
15748
15728
  type: 'object',
15749
15729
  properties: {
@@ -15772,8 +15752,7 @@
15772
15752
  toolName: entry.toolName,
15773
15753
  });
15774
15754
  }
15775
- const teamOverviewText = createTeamOverviewText(trimmedContent, teamEntries);
15776
- const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamOverviewText, teamEntries));
15755
+ const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamEntries));
15777
15756
  return this.appendToSystemMessage({
15778
15757
  ...requirements,
15779
15758
  tools: updatedTools,
@@ -15810,25 +15789,24 @@
15810
15789
  };
15811
15790
  });
15812
15791
  }
15813
- /**
15814
- * Rewrites TEAM commitment content into a URL-free teammate overview text.
15815
- */
15816
- function createTeamOverviewText(teamContent, teamEntries) {
15817
- let overviewText = teamContent;
15818
- for (const entry of teamEntries) {
15819
- overviewText = overviewText.split(entry.teammate.url).join(entry.teammate.label);
15820
- }
15821
- return overviewText.trim();
15822
- }
15823
15792
  /**
15824
15793
  * Builds the textual TEAM section body for the final system message.
15794
+ *
15795
+ * Each teammate is listed with its tool name and, when available, a one-line description.
15796
+ * Uses `spaceTrim` to ensure consistent whitespace and indentation.
15825
15797
  */
15826
- function buildTeamSystemMessageBody(teamOverviewText, teamEntries) {
15827
- const teammateLines = teamEntries.map((entry, index) => `${index + 1}) ${entry.teammate.label} tool \`${entry.toolName}\``);
15828
- if (!teamOverviewText) {
15829
- return teammateLines.join('\n');
15830
- }
15831
- return `${teamOverviewText}\n\n${teammateLines.join('\n')}`;
15798
+ function buildTeamSystemMessageBody(teamEntries) {
15799
+ const lines = teamEntries.map((entry, index) => {
15800
+ const toolLine = `${index + 1}) ${entry.teammate.label} tool \`${entry.toolName}\``;
15801
+ if (!entry.description) {
15802
+ return toolLine;
15803
+ }
15804
+ return _spaceTrim.spaceTrim(`
15805
+ ${toolLine}
15806
+ ${entry.description}
15807
+ `);
15808
+ });
15809
+ return lines.join('\n');
15832
15810
  }
15833
15811
  /**
15834
15812
  * Registers tool function and title for a teammate tool.
@@ -22652,10 +22630,8 @@
22652
22630
  // TODO: [🔱] Do here auto-installation
22653
22631
  return [new JavascriptExecutionTools({ ...options, functions: getAllCommitmentsToolFunctionsForNode() })];
22654
22632
  }
22655
- /**
22656
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
22657
- * TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming
22658
- */
22633
+ /** 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 */
22634
+ /** TODO: [🏓] Unite `xxxForServer` and `xxxForNode` naming */
22659
22635
 
22660
22636
  // TODO: [🥺] List running services from REMOTE_SERVER_URLS
22661
22637
  // TODO: [🥺] Import directly from YML
@@ -23861,8 +23837,8 @@
23861
23837
  },
23862
23838
  };
23863
23839
  }
23840
+ /** Note: [🟢] Code for Node server bootstrap [startRemoteServer](src/remote-server/startRemoteServer.ts) should never be published into packages that could be imported into browser environment */
23864
23841
  /**
23865
-
23866
23842
  * TODO: [🕋] Use here `aboutPromptbookInformation`
23867
23843
  * TODO: [🌡] Add CORS and security - probably via `helmet`
23868
23844
  * TODO: Split this file into multiple functions - handler for each request
@@ -23875,7 +23851,6 @@
23875
23851
  * TODO: [🃏] Pass here some security token to prevent malitious usage and/or DDoS
23876
23852
  * TODO: [0] Set unavailable models as undefined in `RemoteLlmExecutionTools` NOT throw error here
23877
23853
  * TODO: Allow to constrain anonymous mode for specific models / providers
23878
- * Note: [🟢] Code in this file should never be never released in packages that could be imported into browser environment
23879
23854
  */
23880
23855
 
23881
23856
  /**
@@ -24171,13 +24146,23 @@
24171
24146
  */
24172
24147
  function mergeToolCalls(existingToolCalls, incomingToolCalls) {
24173
24148
  if (!existingToolCalls || existingToolCalls.length === 0) {
24174
- return incomingToolCalls ? [...incomingToolCalls] : [];
24149
+ return incomingToolCalls ? deduplicatePreparationToolCalls([...incomingToolCalls]) : [];
24175
24150
  }
24176
24151
  if (!incomingToolCalls || incomingToolCalls.length === 0) {
24177
24152
  return [...existingToolCalls];
24178
24153
  }
24179
24154
  const mergedToolCalls = [...existingToolCalls];
24180
24155
  for (const incomingToolCall of incomingToolCalls) {
24156
+ if (isAssistantPreparationToolCall(incomingToolCall)) {
24157
+ // A new preparation phase always replaces any previous assistant_preparation tool
24158
+ // call, regardless of phase argument, so only one chip is ever shown at a time.
24159
+ const existingPreparationIndex = mergedToolCalls.findIndex(isAssistantPreparationToolCall);
24160
+ if (existingPreparationIndex !== -1) {
24161
+ mergedToolCalls.splice(existingPreparationIndex, 1);
24162
+ }
24163
+ mergedToolCalls.push(incomingToolCall);
24164
+ continue;
24165
+ }
24181
24166
  const incomingIdentity = getToolCallIdentity(incomingToolCall);
24182
24167
  const existingIndex = mergedToolCalls.findIndex((existingToolCall) => getToolCallIdentity(existingToolCall) === incomingIdentity);
24183
24168
  if (existingIndex === -1) {
@@ -24289,6 +24274,30 @@
24289
24274
  return String(value);
24290
24275
  }
24291
24276
  }
24277
+ /**
24278
+ * Ensures at most one `assistant_preparation` tool call survives in the list,
24279
+ * keeping the last occurrence so the most recent preparation phase is shown.
24280
+ *
24281
+ * @param toolCalls - Mutable list to deduplicate in-place.
24282
+ * @returns The same array after removing redundant preparation entries.
24283
+ * @private helper of `mergeToolCalls`
24284
+ */
24285
+ function deduplicatePreparationToolCalls(toolCalls) {
24286
+ let lastPreparationIndex = -1;
24287
+ for (let index = toolCalls.length - 1; index >= 0; index--) {
24288
+ if (!isAssistantPreparationToolCall(toolCalls[index])) {
24289
+ continue;
24290
+ }
24291
+ if (lastPreparationIndex === -1) {
24292
+ lastPreparationIndex = index;
24293
+ }
24294
+ else {
24295
+ // Remove earlier duplicate — keep only the last (most recent) one.
24296
+ toolCalls.splice(index, 1);
24297
+ }
24298
+ }
24299
+ return toolCalls;
24300
+ }
24292
24301
 
24293
24302
  /**
24294
24303
  * Computes SHA-256 hash of the agent source
@@ -25221,7 +25230,7 @@
25221
25230
  * @private @@@
25222
25231
  */
25223
25232
  async function createAgentModelRequirementsWithCommitments(agentSource, modelName, options) {
25224
- var _a;
25233
+ var _a, _b, _c;
25225
25234
  const agentReferenceResolver = options === null || options === void 0 ? void 0 : options.agentReferenceResolver;
25226
25235
  // Parse the agent source to extract commitments
25227
25236
  const parseResult = parseAgentSourceWithCommitments(agentSource);
@@ -25289,6 +25298,36 @@
25289
25298
  if (commitment.type === 'CLOSED' && i !== filteredCommitments.length - 1) {
25290
25299
  continue;
25291
25300
  }
25301
+ // For TEAM commitments, pre-resolve teammate profiles if a resolver is provided
25302
+ // and store them in metadata before the commitment is applied.
25303
+ 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;
25304
+ if (commitment.type === 'TEAM' && (profileResolver === null || profileResolver === void 0 ? void 0 : profileResolver.resolveTeammateProfile)) {
25305
+ try {
25306
+ const parsedTeammates = parseTeamCommitmentContent(commitmentContent, { strict: false });
25307
+ const preResolved = {
25308
+ ...(_b = requirements._metadata) === null || _b === void 0 ? void 0 : _b.preResolvedTeammateProfiles,
25309
+ };
25310
+ for (const teammate of parsedTeammates) {
25311
+ if (preResolved[teammate.url]) {
25312
+ continue;
25313
+ }
25314
+ const profile = await profileResolver.resolveTeammateProfile(teammate.url);
25315
+ if (profile) {
25316
+ preResolved[teammate.url] = profile;
25317
+ }
25318
+ }
25319
+ requirements = {
25320
+ ...requirements,
25321
+ _metadata: {
25322
+ ...requirements._metadata,
25323
+ preResolvedTeammateProfiles: preResolved,
25324
+ },
25325
+ };
25326
+ }
25327
+ catch (error) {
25328
+ console.warn('Failed to pre-resolve teammate profiles for TEAM commitment:', error);
25329
+ }
25330
+ }
25292
25331
  const definition = getCommitmentDefinition(commitment.type);
25293
25332
  if (definition) {
25294
25333
  try {
@@ -25384,7 +25423,7 @@
25384
25423
  // Add example interactions to the system message
25385
25424
  const examples = [];
25386
25425
  // 1. Initial message as an example agent response
25387
- const initialMessage = (_a = parseResult.commitments.find((c) => c.type === 'INITIAL MESSAGE')) === null || _a === void 0 ? void 0 : _a.content;
25426
+ const initialMessage = (_c = parseResult.commitments.find((c) => c.type === 'INITIAL MESSAGE')) === null || _c === void 0 ? void 0 : _c.content;
25388
25427
  if (initialMessage) {
25389
25428
  examples.push(`Agent: ${initialMessage}`);
25390
25429
  }