@promptbook/cli 0.103.0-10 → 0.103.0-100

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 (452) hide show
  1. package/README.md +59 -35
  2. package/apps/agents-server/README.md +3 -0
  3. package/apps/agents-server/TODO.txt +7 -0
  4. package/apps/agents-server/config.ts +128 -0
  5. package/apps/agents-server/next.config.ts +45 -0
  6. package/apps/agents-server/package-lock.json +1163 -0
  7. package/apps/agents-server/package.json +18 -0
  8. package/apps/agents-server/postcss.config.mjs +8 -0
  9. package/apps/agents-server/public/.gitkeep +0 -0
  10. package/apps/agents-server/public/favicon.ico +0 -0
  11. package/apps/agents-server/public/fonts/OpenMoji-black-glyf.woff2 +0 -0
  12. package/apps/agents-server/public/fonts/download-font.js +22 -0
  13. package/apps/agents-server/public/logo-blue-white-256.png +0 -0
  14. package/apps/agents-server/public/sw.js +16 -0
  15. package/apps/agents-server/src/app/AddAgentButton.tsx +41 -0
  16. package/apps/agents-server/src/app/[agentName]/[...rest]/page.tsx +11 -0
  17. package/apps/agents-server/src/app/[agentName]/page.tsx +1 -0
  18. package/apps/agents-server/src/app/actions.ts +51 -0
  19. package/apps/agents-server/src/app/admin/api-tokens/ApiTokensClient.tsx +186 -0
  20. package/apps/agents-server/src/app/admin/api-tokens/page.tsx +13 -0
  21. package/apps/agents-server/src/app/admin/chat-feedback/ChatFeedbackClient.tsx +614 -0
  22. package/apps/agents-server/src/app/admin/chat-feedback/page.tsx +22 -0
  23. package/apps/agents-server/src/app/admin/chat-history/ChatHistoryClient.tsx +634 -0
  24. package/apps/agents-server/src/app/admin/chat-history/page.tsx +21 -0
  25. package/apps/agents-server/src/app/admin/metadata/MetadataClient.tsx +477 -0
  26. package/apps/agents-server/src/app/admin/metadata/page.tsx +13 -0
  27. package/apps/agents-server/src/app/admin/models/page.tsx +22 -0
  28. package/apps/agents-server/src/app/admin/users/[userId]/UserDetailClient.tsx +131 -0
  29. package/apps/agents-server/src/app/admin/users/[userId]/page.tsx +21 -0
  30. package/apps/agents-server/src/app/admin/users/page.tsx +18 -0
  31. package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +78 -0
  32. package/apps/agents-server/src/app/agents/[agentName]/AgentOptionsMenu.tsx +216 -0
  33. package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +78 -0
  34. package/apps/agents-server/src/app/agents/[agentName]/AgentProfileView.tsx +233 -0
  35. package/apps/agents-server/src/app/agents/[agentName]/AgentQrCode.tsx +55 -0
  36. package/apps/agents-server/src/app/agents/[agentName]/AgentUrlCopy.tsx +40 -0
  37. package/apps/agents-server/src/app/agents/[agentName]/ClearAgentChatFeedbackButton.tsx +63 -0
  38. package/apps/agents-server/src/app/agents/[agentName]/ClearAgentChatHistoryButton.tsx +63 -0
  39. package/apps/agents-server/src/app/agents/[agentName]/CloneAgentButton.tsx +41 -0
  40. package/apps/agents-server/src/app/agents/[agentName]/CopyField.tsx +44 -0
  41. package/apps/agents-server/src/app/agents/[agentName]/InstallPwaButton.tsx +74 -0
  42. package/apps/agents-server/src/app/agents/[agentName]/QrCodeModal.tsx +90 -0
  43. package/apps/agents-server/src/app/agents/[agentName]/ServiceWorkerRegister.tsx +24 -0
  44. package/apps/agents-server/src/app/agents/[agentName]/TODO.txt +1 -0
  45. package/apps/agents-server/src/app/agents/[agentName]/_utils.ts +19 -0
  46. package/apps/agents-server/src/app/agents/[agentName]/agentLinks.tsx +80 -0
  47. package/apps/agents-server/src/app/agents/[agentName]/api/agents/route.ts +67 -0
  48. package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +88 -0
  49. package/apps/agents-server/src/app/agents/[agentName]/api/book/test.http +37 -0
  50. package/apps/agents-server/src/app/agents/[agentName]/api/chat/route.ts +174 -0
  51. package/apps/agents-server/src/app/agents/[agentName]/api/feedback/route.ts +54 -0
  52. package/apps/agents-server/src/app/agents/[agentName]/api/mcp/route.ts +203 -0
  53. package/apps/agents-server/src/app/agents/[agentName]/api/modelRequirements/TODO.txt +1 -0
  54. package/apps/agents-server/src/app/agents/[agentName]/api/modelRequirements/route.ts +55 -0
  55. package/apps/agents-server/src/app/agents/[agentName]/api/modelRequirements/systemMessage/route.ts +47 -0
  56. package/apps/agents-server/src/app/agents/[agentName]/api/openai/chat/completions/route.ts +10 -0
  57. package/apps/agents-server/src/app/agents/[agentName]/api/openai/models/route.ts +93 -0
  58. package/apps/agents-server/src/app/agents/[agentName]/api/openai/v1/chat/completions/route.ts +10 -0
  59. package/apps/agents-server/src/app/agents/[agentName]/api/openai/v1/models/route.ts +93 -0
  60. package/apps/agents-server/src/app/agents/[agentName]/api/openrouter/chat/completions/route.ts +10 -0
  61. package/apps/agents-server/src/app/agents/[agentName]/api/profile/route.ts +76 -0
  62. package/apps/agents-server/src/app/agents/[agentName]/api/voice/route.ts +181 -0
  63. package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorWrapper.tsx +139 -0
  64. package/apps/agents-server/src/app/agents/[agentName]/book/page.tsx +35 -0
  65. package/apps/agents-server/src/app/agents/[agentName]/book+chat/AgentBookAndChat.tsx +75 -0
  66. package/apps/agents-server/src/app/agents/[agentName]/book+chat/AgentBookAndChatComponent.tsx.todo +160 -0
  67. package/apps/agents-server/src/app/agents/[agentName]/book+chat/page.tsx +32 -0
  68. package/apps/agents-server/src/app/agents/[agentName]/book+chat/page.tsx.todo +21 -0
  69. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatWrapper.tsx +68 -0
  70. package/apps/agents-server/src/app/agents/[agentName]/chat/page.tsx +33 -0
  71. package/apps/agents-server/src/app/agents/[agentName]/generateAgentMetadata.ts +42 -0
  72. package/apps/agents-server/src/app/agents/[agentName]/history/RestoreVersionButton.tsx +46 -0
  73. package/apps/agents-server/src/app/agents/[agentName]/history/actions.ts +12 -0
  74. package/apps/agents-server/src/app/agents/[agentName]/history/page.tsx +62 -0
  75. package/apps/agents-server/src/app/agents/[agentName]/images/icon-256.png/route.tsx +80 -0
  76. package/apps/agents-server/src/app/agents/[agentName]/images/screenshot-fullhd.png/route.tsx +92 -0
  77. package/apps/agents-server/src/app/agents/[agentName]/images/screenshot-phone.png/route.tsx +92 -0
  78. package/apps/agents-server/src/app/agents/[agentName]/integration/SdkCodeTabs.tsx +31 -0
  79. package/apps/agents-server/src/app/agents/[agentName]/integration/page.tsx +302 -0
  80. package/apps/agents-server/src/app/agents/[agentName]/links/page.tsx +182 -0
  81. package/apps/agents-server/src/app/agents/[agentName]/opengraph-image.tsx +102 -0
  82. package/apps/agents-server/src/app/agents/[agentName]/page.tsx +159 -0
  83. package/apps/agents-server/src/app/agents/[agentName]/website-integration/page.tsx +61 -0
  84. package/apps/agents-server/src/app/agents/page.tsx +11 -0
  85. package/apps/agents-server/src/app/api/agents/[agentName]/clone/route.ts +47 -0
  86. package/apps/agents-server/src/app/api/agents/[agentName]/route.ts +19 -0
  87. package/apps/agents-server/src/app/api/agents/route.ts +43 -0
  88. package/apps/agents-server/src/app/api/api-tokens/route.ts +76 -0
  89. package/apps/agents-server/src/app/api/auth/change-password/route.ts +75 -0
  90. package/apps/agents-server/src/app/api/auth/login/route.ts +27 -0
  91. package/apps/agents-server/src/app/api/auth/logout/route.ts +7 -0
  92. package/apps/agents-server/src/app/api/chat/route.ts +32 -0
  93. package/apps/agents-server/src/app/api/chat-feedback/[id]/route.ts +38 -0
  94. package/apps/agents-server/src/app/api/chat-feedback/export/route.ts +55 -0
  95. package/apps/agents-server/src/app/api/chat-feedback/route.ts +157 -0
  96. package/apps/agents-server/src/app/api/chat-history/[id]/route.ts +37 -0
  97. package/apps/agents-server/src/app/api/chat-history/export/route.ts +55 -0
  98. package/apps/agents-server/src/app/api/chat-history/route.ts +147 -0
  99. package/apps/agents-server/src/app/api/chat-streaming/route.ts +48 -0
  100. package/apps/agents-server/src/app/api/embed.js/route.ts +93 -0
  101. package/apps/agents-server/src/app/api/federated-agents/route.ts +17 -0
  102. package/apps/agents-server/src/app/api/long-running-task/route.ts +7 -0
  103. package/apps/agents-server/src/app/api/long-streaming/route.ts +20 -0
  104. package/apps/agents-server/src/app/api/metadata/route.ts +116 -0
  105. package/apps/agents-server/src/app/api/openai/v1/chat/completions/route.ts +6 -0
  106. package/apps/agents-server/src/app/api/openai/v1/models/route.ts +65 -0
  107. package/apps/agents-server/src/app/api/upload/route.ts +83 -0
  108. package/apps/agents-server/src/app/api/users/[username]/route.ts +75 -0
  109. package/apps/agents-server/src/app/api/users/route.ts +71 -0
  110. package/apps/agents-server/src/app/docs/[docId]/page.tsx +43 -0
  111. package/apps/agents-server/src/app/docs/page.tsx +59 -0
  112. package/apps/agents-server/src/app/embed/page.tsx +24 -0
  113. package/apps/agents-server/src/app/globals.css +276 -0
  114. package/apps/agents-server/src/app/layout.tsx +124 -0
  115. package/apps/agents-server/src/app/manifest.ts +109 -0
  116. package/apps/agents-server/src/app/not-found.tsx +5 -0
  117. package/apps/agents-server/src/app/page.tsx +96 -0
  118. package/apps/agents-server/src/app/recycle-bin/RestoreAgentButton.tsx +40 -0
  119. package/apps/agents-server/src/app/recycle-bin/actions.ts +27 -0
  120. package/apps/agents-server/src/app/recycle-bin/page.tsx +58 -0
  121. package/apps/agents-server/src/app/restricted/page.tsx +33 -0
  122. package/apps/agents-server/src/app/test/og-image/README.md +1 -0
  123. package/apps/agents-server/src/app/test/og-image/opengraph-image.tsx +37 -0
  124. package/apps/agents-server/src/app/test/og-image/page.tsx +22 -0
  125. package/apps/agents-server/src/components/Auth/AuthControls.tsx +123 -0
  126. package/apps/agents-server/src/components/ChangePasswordDialog/ChangePasswordDialog.tsx +41 -0
  127. package/apps/agents-server/src/components/ChangePasswordForm/ChangePasswordForm.tsx +159 -0
  128. package/apps/agents-server/src/components/DocumentationContent/DocumentationContent.tsx +87 -0
  129. package/apps/agents-server/src/components/ErrorPage/ErrorPage.tsx +33 -0
  130. package/apps/agents-server/src/components/Footer/Footer.tsx +175 -0
  131. package/apps/agents-server/src/components/ForbiddenPage/ForbiddenPage.tsx +15 -0
  132. package/apps/agents-server/src/components/Header/Header.tsx +593 -0
  133. package/apps/agents-server/src/components/Homepage/AgentCard.tsx +60 -0
  134. package/apps/agents-server/src/components/Homepage/AgentsList.tsx +58 -0
  135. package/apps/agents-server/src/components/Homepage/Card.tsx +18 -0
  136. package/apps/agents-server/src/components/Homepage/ExternalAgentsSection.tsx +21 -0
  137. package/apps/agents-server/src/components/Homepage/ExternalAgentsSectionClient.tsx +183 -0
  138. package/apps/agents-server/src/components/Homepage/ModelCard.tsx +29 -0
  139. package/apps/agents-server/src/components/Homepage/ModelsSection.tsx +75 -0
  140. package/apps/agents-server/src/components/Homepage/Section.tsx +17 -0
  141. package/apps/agents-server/src/components/Homepage/TechInfoCard.tsx +20 -0
  142. package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +53 -0
  143. package/apps/agents-server/src/components/LoginDialog/LoginDialog.tsx +41 -0
  144. package/apps/agents-server/src/components/LoginForm/LoginForm.tsx +109 -0
  145. package/apps/agents-server/src/components/NotFoundPage/NotFoundPage.tsx +17 -0
  146. package/apps/agents-server/src/components/OpenMojiIcon/OpenMojiIcon.tsx +20 -0
  147. package/apps/agents-server/src/components/Portal/Portal.tsx +38 -0
  148. package/apps/agents-server/src/components/PrintButton/PrintButton.tsx +18 -0
  149. package/apps/agents-server/src/components/PrintHeader/PrintHeader.tsx +18 -0
  150. package/apps/agents-server/src/components/UsersList/UsersList.tsx +141 -0
  151. package/apps/agents-server/src/components/UsersList/useUsersAdmin.ts +139 -0
  152. package/apps/agents-server/src/components/VercelDeploymentCard/VercelDeploymentCard.tsx +55 -0
  153. package/apps/agents-server/src/database/$getTableName.ts +18 -0
  154. package/apps/agents-server/src/database/$provideSupabase.ts +29 -0
  155. package/apps/agents-server/src/database/$provideSupabaseForBrowser.ts +41 -0
  156. package/apps/agents-server/src/database/$provideSupabaseForServer.ts +48 -0
  157. package/apps/agents-server/src/database/$provideSupabaseForWorker.ts +43 -0
  158. package/apps/agents-server/src/database/getMetadata.ts +31 -0
  159. package/apps/agents-server/src/database/metadataDefaults.ts +69 -0
  160. package/apps/agents-server/src/database/migrate.ts +131 -0
  161. package/apps/agents-server/src/database/migrations/2025-11-0001-initial-schema.sql +163 -0
  162. package/apps/agents-server/src/database/migrations/2025-11-0002-metadata-table.sql +16 -0
  163. package/apps/agents-server/src/database/migrations/2025-12-0010-llm-cache.sql +12 -0
  164. package/apps/agents-server/src/database/migrations/2025-12-0060-api-tokens.sql +13 -0
  165. package/apps/agents-server/src/database/migrations/2025-12-0070-chat-history-source.sql +2 -0
  166. package/apps/agents-server/src/database/schema.ts +308 -0
  167. package/apps/agents-server/src/deamons/longRunningTask.ts +37 -0
  168. package/apps/agents-server/src/middleware.ts +301 -0
  169. package/apps/agents-server/src/tools/$provideAgentCollectionForServer.ts +54 -0
  170. package/apps/agents-server/src/tools/$provideCdnForServer.ts +24 -0
  171. package/apps/agents-server/src/tools/$provideExecutionToolsForServer.ts +117 -0
  172. package/apps/agents-server/src/tools/$provideOpenAiAssistantExecutionToolsForServer.ts +35 -0
  173. package/apps/agents-server/src/tools/$provideServer.ts +39 -0
  174. package/apps/agents-server/src/utils/auth.ts +33 -0
  175. package/apps/agents-server/src/utils/authenticateUser.ts +42 -0
  176. package/apps/agents-server/src/utils/cache/SupabaseCacheStorage.ts +55 -0
  177. package/apps/agents-server/src/utils/cdn/classes/VercelBlobStorage.ts +63 -0
  178. package/apps/agents-server/src/utils/cdn/interfaces/IFilesStorage.ts +32 -0
  179. package/apps/agents-server/src/utils/cdn/interfaces/IStorage.ts +14 -0
  180. package/apps/agents-server/src/utils/cdn/utils/getUserFileCdnKey.ts +28 -0
  181. package/apps/agents-server/src/utils/cdn/utils/nameToSubfolderPath.ts +9 -0
  182. package/apps/agents-server/src/utils/cdn/utils/nextRequestToNodeRequest.ts +27 -0
  183. package/apps/agents-server/src/utils/chatFeedbackAdmin.ts +96 -0
  184. package/apps/agents-server/src/utils/chatHistoryAdmin.ts +96 -0
  185. package/apps/agents-server/src/utils/convertToCsv.ts +31 -0
  186. package/apps/agents-server/src/utils/getCurrentUser.ts +32 -0
  187. package/apps/agents-server/src/utils/getEffectiveFederatedServers.ts +22 -0
  188. package/apps/agents-server/src/utils/getFederatedAgents.ts +89 -0
  189. package/apps/agents-server/src/utils/getFederatedServersFromMetadata.ts +10 -0
  190. package/apps/agents-server/src/utils/getVisibleCommitmentDefinitions.ts +12 -0
  191. package/apps/agents-server/src/utils/handleChatCompletion.ts +355 -0
  192. package/apps/agents-server/src/utils/isIpAllowed.ts +101 -0
  193. package/apps/agents-server/src/utils/isUserAdmin.ts +31 -0
  194. package/apps/agents-server/src/utils/resolveInheritedAgentSource.ts +100 -0
  195. package/apps/agents-server/src/utils/session.ts +50 -0
  196. package/apps/agents-server/src/utils/validateApiKey.ts +128 -0
  197. package/apps/agents-server/src/utils/validators/validateMimeType.ts +24 -0
  198. package/apps/agents-server/tailwind.config.ts +26 -0
  199. package/apps/agents-server/tsconfig.json +29 -0
  200. package/apps/agents-server/vercel.json +7 -0
  201. package/esm/index.es.js +5114 -383
  202. package/esm/index.es.js.map +1 -1
  203. package/esm/typings/books/index.d.ts +0 -81
  204. package/esm/typings/servers.d.ts +9 -7
  205. package/esm/typings/src/_packages/browser.index.d.ts +6 -0
  206. package/esm/typings/src/_packages/cli.index.d.ts +4 -0
  207. package/esm/typings/src/_packages/components.index.d.ts +20 -8
  208. package/esm/typings/src/_packages/core.index.d.ts +58 -18
  209. package/esm/typings/src/_packages/node.index.d.ts +2 -2
  210. package/esm/typings/src/_packages/remote-server.index.d.ts +2 -0
  211. package/esm/typings/src/_packages/types.index.d.ts +58 -8
  212. package/esm/typings/src/_packages/utils.index.d.ts +6 -0
  213. package/esm/typings/src/_packages/wizard.index.d.ts +4 -0
  214. package/esm/typings/src/book-2.0/agent-source/AgentBasicInformation.d.ts +19 -5
  215. package/esm/typings/src/book-2.0/agent-source/AgentModelRequirements.d.ts +17 -1
  216. package/esm/typings/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +3 -2
  217. package/esm/typings/src/book-2.0/agent-source/computeAgentHash.d.ts +8 -0
  218. package/esm/typings/src/book-2.0/agent-source/createCommitmentRegex.d.ts +3 -3
  219. package/esm/typings/src/book-2.0/agent-source/createDefaultAgentName.d.ts +8 -0
  220. package/esm/typings/src/book-2.0/agent-source/normalizeAgentName.d.ts +9 -0
  221. package/esm/typings/src/book-2.0/agent-source/padBook.d.ts +18 -0
  222. package/esm/typings/src/book-2.0/agent-source/parseAgentSourceWithCommitments.d.ts +1 -1
  223. package/esm/typings/src/book-2.0/agent-source/string_book.d.ts +3 -0
  224. package/esm/typings/src/book-components/AvatarProfile/AvatarProfile/AvatarProfile.d.ts +6 -1
  225. package/esm/typings/src/book-components/BookEditor/BookEditor.d.ts +77 -7
  226. package/esm/typings/src/book-components/BookEditor/BookEditorActionbar.d.ts +14 -0
  227. package/esm/typings/src/book-components/Chat/AgentChat/AgentChat.d.ts +14 -0
  228. package/esm/typings/src/book-components/Chat/AgentChat/AgentChatProps.d.ts +13 -0
  229. package/esm/typings/src/book-components/Chat/Chat/ChatProps.d.ts +10 -0
  230. package/esm/typings/src/book-components/Chat/LlmChat/LlmChatProps.d.ts +5 -0
  231. package/esm/typings/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +15 -0
  232. package/esm/typings/src/book-components/Chat/MockedChat/MockedChat.d.ts +5 -0
  233. package/esm/typings/src/book-components/Chat/save/_common/ChatSaveFormatDefinition.d.ts +1 -1
  234. package/esm/typings/src/book-components/Chat/save/html/htmlSaveFormatDefinition.d.ts +1 -0
  235. package/esm/typings/src/book-components/Chat/save/pdf/pdfSaveFormatDefinition.d.ts +4 -0
  236. package/esm/typings/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
  237. package/esm/typings/src/book-components/PromptbookAgent/PromptbookAgent.d.ts +29 -0
  238. package/esm/typings/src/book-components/Qr/BrandedQrCode.d.ts +18 -0
  239. package/esm/typings/src/book-components/Qr/GenericQrCode.d.ts +10 -0
  240. package/esm/typings/src/book-components/Qr/PromptbookQrCode.d.ts +18 -0
  241. package/esm/typings/src/book-components/Qr/useQrCode.d.ts +15 -0
  242. package/esm/typings/src/book-components/_common/Dropdown/Dropdown.d.ts +15 -0
  243. package/esm/typings/src/book-components/_common/HamburgerMenu/HamburgerMenu.d.ts +12 -0
  244. package/esm/typings/src/book-components/_common/Modal/Modal.d.ts +2 -2
  245. package/esm/typings/src/book-components/_common/Tooltip/Tooltip.d.ts +47 -0
  246. package/esm/typings/src/book-components/icons/AboutIcon.d.ts +9 -0
  247. package/esm/typings/src/book-components/icons/CloseIcon.d.ts +4 -8
  248. package/esm/typings/src/book-components/icons/DownloadIcon.d.ts +9 -0
  249. package/esm/typings/src/book-components/icons/ExitFullscreenIcon.d.ts +7 -0
  250. package/esm/typings/src/book-components/icons/FullscreenIcon.d.ts +7 -0
  251. package/esm/typings/src/book-components/icons/MenuIcon.d.ts +12 -0
  252. package/esm/typings/src/book-components/icons/MicIcon.d.ts +8 -0
  253. package/esm/typings/src/cli/cli-commands/_boilerplate.d.ts +2 -1
  254. package/esm/typings/src/cli/cli-commands/about.d.ts +3 -1
  255. package/esm/typings/src/cli/cli-commands/hello.d.ts +2 -1
  256. package/esm/typings/src/cli/cli-commands/list-models.d.ts +2 -1
  257. package/esm/typings/src/cli/cli-commands/list-scrapers.d.ts +2 -1
  258. package/esm/typings/src/cli/cli-commands/login.d.ts +2 -1
  259. package/esm/typings/src/cli/cli-commands/make.d.ts +2 -1
  260. package/esm/typings/src/cli/cli-commands/prettify.d.ts +2 -1
  261. package/esm/typings/src/cli/cli-commands/run.d.ts +2 -1
  262. package/esm/typings/src/cli/cli-commands/{start-server.d.ts → start-agents-server.d.ts} +3 -2
  263. package/esm/typings/src/cli/cli-commands/start-pipelines-server.d.ts +15 -0
  264. package/esm/typings/src/cli/cli-commands/test-command.d.ts +2 -1
  265. package/esm/typings/src/cli/common/$addGlobalOptionsToCommand.d.ts +2 -1
  266. package/esm/typings/src/collection/agent-collection/AgentCollection.d.ts +12 -0
  267. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +75 -0
  268. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions.d.ts +10 -0
  269. package/esm/typings/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema.d.ts +154 -0
  270. package/esm/typings/src/collection/{PipelineCollection.d.ts → pipeline-collection/PipelineCollection.d.ts} +7 -3
  271. package/esm/typings/src/collection/{SimplePipelineCollection.d.ts → pipeline-collection/SimplePipelineCollection.d.ts} +5 -5
  272. package/esm/typings/src/collection/{constructors/createCollectionFromDirectory.d.ts → pipeline-collection/constructors/createPipelineCollectionFromDirectory.d.ts} +8 -11
  273. package/esm/typings/src/collection/pipeline-collection/constructors/createPipelineCollectionFromJson.d.ts +13 -0
  274. package/esm/typings/src/collection/{constructors/createCollectionFromPromise.d.ts → pipeline-collection/constructors/createPipelineCollectionFromPromise.d.ts} +6 -5
  275. package/esm/typings/src/collection/pipeline-collection/constructors/createPipelineCollectionFromPromise.test.d.ts +1 -0
  276. package/esm/typings/src/collection/{constructors/createCollectionFromUrl.d.ts → pipeline-collection/constructors/createPipelineCollectionFromUrl.d.ts} +3 -3
  277. package/esm/typings/src/collection/{constructors/createSubcollection.d.ts → pipeline-collection/constructors/createPipelineSubcollection.d.ts} +3 -3
  278. package/esm/typings/src/collection/pipeline-collection/pipelineCollectionToJson.d.ts +13 -0
  279. package/esm/typings/src/commands/_common/types/CommandParser.d.ts +4 -5
  280. package/esm/typings/src/{book-2.0/commitments → commitments}/ACTION/ACTION.d.ts +5 -1
  281. package/esm/typings/src/commitments/CLOSED/CLOSED.d.ts +35 -0
  282. package/esm/typings/src/commitments/COMPONENT/COMPONENT.d.ts +28 -0
  283. package/esm/typings/src/{book-2.0/commitments → commitments}/DELETE/DELETE.d.ts +5 -1
  284. package/esm/typings/src/{book-2.0/commitments → commitments}/FORMAT/FORMAT.d.ts +5 -1
  285. package/esm/typings/src/commitments/FROM/FROM.d.ts +34 -0
  286. package/esm/typings/src/{book-2.0/commitments → commitments}/GOAL/GOAL.d.ts +5 -1
  287. package/esm/typings/src/{book-2.0/commitments → commitments}/KNOWLEDGE/KNOWLEDGE.d.ts +5 -5
  288. package/esm/typings/src/commitments/LANGUAGE/LANGUAGE.d.ts +35 -0
  289. package/esm/typings/src/{book-2.0/commitments → commitments}/MEMORY/MEMORY.d.ts +5 -1
  290. package/esm/typings/src/commitments/MESSAGE/AgentMessageCommitmentDefinition.d.ts +32 -0
  291. package/esm/typings/src/commitments/MESSAGE/InitialMessageCommitmentDefinition.d.ts +32 -0
  292. package/esm/typings/src/{book-2.0/commitments → commitments}/MESSAGE/MESSAGE.d.ts +5 -1
  293. package/esm/typings/src/commitments/MESSAGE/UserMessageCommitmentDefinition.d.ts +32 -0
  294. package/esm/typings/src/{book-2.0/commitments → commitments}/META/META.d.ts +5 -1
  295. package/esm/typings/src/commitments/META_COLOR/META_COLOR.d.ts +48 -0
  296. package/esm/typings/src/commitments/META_FONT/META_FONT.d.ts +42 -0
  297. package/esm/typings/src/{book-2.0/commitments → commitments}/META_IMAGE/META_IMAGE.d.ts +5 -1
  298. package/esm/typings/src/{book-2.0/commitments → commitments}/META_LINK/META_LINK.d.ts +5 -1
  299. package/esm/typings/src/{book-2.0/commitments → commitments}/MODEL/MODEL.d.ts +5 -1
  300. package/esm/typings/src/{book-2.0/commitments → commitments}/NOTE/NOTE.d.ts +5 -1
  301. package/esm/typings/src/commitments/OPEN/OPEN.d.ts +35 -0
  302. package/esm/typings/src/{book-2.0/commitments → commitments}/PERSONA/PERSONA.d.ts +5 -1
  303. package/esm/typings/src/{book-2.0/commitments → commitments}/RULE/RULE.d.ts +5 -1
  304. package/esm/typings/src/{book-2.0/commitments → commitments}/SAMPLE/SAMPLE.d.ts +5 -1
  305. package/esm/typings/src/{book-2.0/commitments → commitments}/SCENARIO/SCENARIO.d.ts +5 -1
  306. package/esm/typings/src/{book-2.0/commitments → commitments}/STYLE/STYLE.d.ts +5 -1
  307. package/esm/typings/src/commitments/USE/USE.d.ts +53 -0
  308. package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +38 -0
  309. package/esm/typings/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts +1 -0
  310. package/esm/typings/src/commitments/USE_MCP/USE_MCP.d.ts +37 -0
  311. package/esm/typings/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +38 -0
  312. package/esm/typings/src/{book-2.0/commitments → commitments}/_base/BaseCommitmentDefinition.d.ts +8 -2
  313. package/esm/typings/src/{book-2.0/commitments → commitments}/_base/CommitmentDefinition.d.ts +6 -1
  314. package/esm/typings/src/{book-2.0/commitments → commitments}/_base/NotYetImplementedCommitmentDefinition.d.ts +5 -1
  315. package/esm/typings/src/{book-2.0/commitments → commitments}/_base/createEmptyAgentModelRequirements.d.ts +1 -1
  316. package/esm/typings/src/commitments/index.d.ts +93 -0
  317. package/esm/typings/src/config.d.ts +24 -3
  318. package/esm/typings/src/conversion/validation/validatePipeline.d.ts +2 -0
  319. package/esm/typings/src/errors/0-index.d.ts +6 -0
  320. package/esm/typings/src/errors/DatabaseError.d.ts +12 -0
  321. package/esm/typings/src/errors/NotAllowed.d.ts +9 -0
  322. package/esm/typings/src/errors/WrappedError.d.ts +2 -2
  323. package/esm/typings/src/execution/AvailableModel.d.ts +1 -0
  324. package/esm/typings/src/execution/Executables.d.ts +3 -0
  325. package/esm/typings/src/execution/ExecutionTask.d.ts +12 -3
  326. package/esm/typings/src/execution/ExecutionTools.d.ts +5 -0
  327. package/esm/typings/src/execution/FilesystemTools.d.ts +1 -1
  328. package/esm/typings/src/execution/LlmExecutionTools.d.ts +21 -1
  329. package/esm/typings/src/execution/createPipelineExecutor/10-executePipeline.d.ts +5 -0
  330. package/esm/typings/src/execution/createPipelineExecutor/20-executeTask.d.ts +5 -0
  331. package/esm/typings/src/execution/createPipelineExecutor/30-executeFormatSubvalues.d.ts +5 -0
  332. package/esm/typings/src/execution/createPipelineExecutor/40-executeAttempts.d.ts +5 -0
  333. package/esm/typings/src/execution/utils/usage-constants.d.ts +4 -124
  334. package/esm/typings/src/execution/utils/validatePromptResult.d.ts +2 -0
  335. package/esm/typings/src/high-level-abstractions/_common/HighLevelAbstraction.d.ts +2 -1
  336. package/esm/typings/src/llm-providers/_common/register/$provideLlmToolsForWizardOrCli.d.ts +2 -2
  337. package/esm/typings/src/llm-providers/_common/register/$registeredLlmToolsMessage.d.ts +2 -1
  338. package/esm/typings/src/llm-providers/_common/register/LlmToolsMetadata.d.ts +1 -1
  339. package/esm/typings/src/llm-providers/_common/utils/assertUniqueModels.d.ts +12 -0
  340. package/esm/typings/src/llm-providers/_multiple/getSingleLlmExecutionTools.d.ts +1 -0
  341. package/esm/typings/src/llm-providers/_multiple/joinLlmExecutionTools.d.ts +1 -0
  342. package/esm/typings/src/llm-providers/agent/Agent.d.ts +70 -0
  343. package/esm/typings/src/llm-providers/agent/AgentLlmExecutionTools.d.ts +26 -4
  344. package/esm/typings/src/llm-providers/agent/AgentOptions.d.ts +19 -0
  345. package/esm/typings/src/llm-providers/agent/CreateAgentLlmExecutionToolsOptions.d.ts +17 -0
  346. package/esm/typings/src/llm-providers/agent/RemoteAgent.d.ts +50 -0
  347. package/esm/typings/src/llm-providers/agent/RemoteAgentOptions.d.ts +11 -0
  348. package/esm/typings/src/llm-providers/agent/createAgentLlmExecutionTools.d.ts +1 -19
  349. package/esm/typings/src/llm-providers/anthropic-claude/anthropic-claude-models.d.ts +1 -1
  350. package/esm/typings/src/llm-providers/google/google-models.d.ts +1 -1
  351. package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionTools.d.ts +60 -2
  352. package/esm/typings/src/llm-providers/openai/OpenAiAssistantExecutionToolsOptions.d.ts +7 -1
  353. package/esm/typings/src/llm-providers/openai/openai-models.d.ts +1 -1
  354. package/esm/typings/src/llm-providers/openai/openai-models.test.d.ts +4 -0
  355. package/esm/typings/src/other/templates/getTemplatesPipelineCollection.d.ts +1 -1
  356. package/esm/typings/src/pipeline/validatePipelineString.d.ts +2 -0
  357. package/esm/typings/src/playground/permanent/_boilerplate.d.ts +5 -0
  358. package/esm/typings/src/playground/permanent/agent-with-browser-playground.d.ts +5 -0
  359. package/esm/typings/src/prepare/PrepareAndScrapeOptions.d.ts +1 -0
  360. package/esm/typings/src/remote-server/startAgentServer.d.ts +26 -0
  361. package/esm/typings/src/remote-server/startRemoteServer.d.ts +4 -1
  362. package/esm/typings/src/remote-server/types/RemoteServerOptions.d.ts +3 -8
  363. package/esm/typings/src/scrapers/_boilerplate/createBoilerplateScraper.d.ts +1 -12
  364. package/esm/typings/src/scrapers/_boilerplate/register-metadata.d.ts +1 -9
  365. package/esm/typings/src/scrapers/document/createDocumentScraper.d.ts +1 -12
  366. package/esm/typings/src/scrapers/document/register-metadata.d.ts +1 -9
  367. package/esm/typings/src/scrapers/document-legacy/createLegacyDocumentScraper.d.ts +1 -12
  368. package/esm/typings/src/scrapers/document-legacy/register-metadata.d.ts +1 -9
  369. package/esm/typings/src/scrapers/markdown/createMarkdownScraper.d.ts +1 -12
  370. package/esm/typings/src/scrapers/markdown/register-metadata.d.ts +1 -9
  371. package/esm/typings/src/scrapers/markitdown/createMarkitdownScraper.d.ts +1 -12
  372. package/esm/typings/src/scrapers/markitdown/register-metadata.d.ts +1 -9
  373. package/esm/typings/src/scrapers/pdf/createPdfScraper.d.ts +1 -12
  374. package/esm/typings/src/scrapers/pdf/register-metadata.d.ts +1 -9
  375. package/esm/typings/src/scrapers/website/createWebsiteScraper.d.ts +1 -12
  376. package/esm/typings/src/scrapers/website/register-metadata.d.ts +1 -9
  377. package/esm/typings/src/storage/_common/PromptbookStorage.d.ts +1 -0
  378. package/esm/typings/src/storage/env-storage/$EnvStorage.d.ts +2 -1
  379. package/esm/typings/src/transpilers/_common/BookTranspiler.d.ts +33 -0
  380. package/esm/typings/src/transpilers/_common/BookTranspilerOptions.d.ts +18 -0
  381. package/esm/typings/src/transpilers/_common/register/$bookTranspilersRegister.d.ts +15 -0
  382. package/esm/typings/src/transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler.d.ts +16 -0
  383. package/esm/typings/src/transpilers/formatted-book-in-markdown/register.d.ts +15 -0
  384. package/esm/typings/src/transpilers/openai-sdk/OpenAiSdkTranspiler.d.ts +16 -0
  385. package/esm/typings/src/transpilers/openai-sdk/OpenAiSdkTranspiler.test.d.ts +1 -0
  386. package/esm/typings/src/transpilers/openai-sdk/playground/playground.d.ts +5 -0
  387. package/esm/typings/src/transpilers/openai-sdk/register.d.ts +15 -0
  388. package/esm/typings/src/types/LlmCall.d.ts +20 -0
  389. package/esm/typings/src/types/Updatable.d.ts +19 -0
  390. package/esm/typings/src/types/typeAliases.d.ts +32 -2
  391. package/esm/typings/src/utils/color/$randomColor.d.ts +1 -0
  392. package/esm/typings/src/utils/color/Color.d.ts +15 -0
  393. package/esm/typings/src/utils/color/Color.test.d.ts +1 -0
  394. package/esm/typings/src/utils/color/css-colors.d.ts +1 -0
  395. package/esm/typings/src/utils/color/internal-utils/checkChannelValue.d.ts +0 -3
  396. package/esm/typings/src/utils/color/operators/darken.d.ts +1 -1
  397. package/esm/typings/src/utils/color/operators/grayscale.d.ts +1 -1
  398. package/esm/typings/src/utils/color/operators/lighten.d.ts +1 -1
  399. package/esm/typings/src/utils/color/operators/mixWithColor.d.ts +1 -1
  400. package/esm/typings/src/utils/color/operators/saturate.d.ts +1 -1
  401. package/esm/typings/src/utils/environment/$detectRuntimeEnvironment.d.ts +16 -0
  402. package/esm/typings/src/utils/environment/$getGlobalScope.d.ts +2 -2
  403. package/esm/typings/src/utils/execCommand/$execCommand.d.ts +2 -1
  404. package/esm/typings/src/utils/execCommand/$execCommands.d.ts +2 -1
  405. package/esm/typings/src/utils/files/$induceBookDownload.d.ts +13 -0
  406. package/esm/typings/src/utils/files/$induceFileDownload.d.ts +13 -0
  407. package/esm/typings/src/utils/files/ObjectUrl.d.ts +46 -0
  408. package/esm/typings/src/utils/files/listAllFiles.d.ts +2 -3
  409. package/esm/typings/src/utils/misc/aboutPromptbookInformation.d.ts +27 -0
  410. package/esm/typings/src/utils/misc/computeHash.d.ts +11 -0
  411. package/esm/typings/src/utils/misc/computeHash.test.d.ts +1 -0
  412. package/esm/typings/src/utils/misc/xAboutPromptbookInformation.d.ts +13 -0
  413. package/esm/typings/src/utils/normalization/normalize-to-kebab-case.d.ts +2 -0
  414. package/esm/typings/src/utils/normalization/normalizeMessageText.d.ts +9 -0
  415. package/esm/typings/src/utils/normalization/normalizeMessageText.test.d.ts +1 -0
  416. package/esm/typings/src/utils/normalization/normalizeTo_PascalCase.d.ts +3 -0
  417. package/esm/typings/src/utils/normalization/normalizeTo_camelCase.d.ts +2 -0
  418. package/esm/typings/src/utils/normalization/titleToName.d.ts +2 -0
  419. package/esm/typings/src/utils/organization/$sideEffect.d.ts +2 -2
  420. package/esm/typings/src/utils/organization/$side_effect.d.ts +7 -0
  421. package/esm/typings/src/utils/organization/TODO_USE.d.ts +2 -2
  422. package/esm/typings/src/utils/organization/keepUnused.d.ts +2 -2
  423. package/esm/typings/src/utils/organization/preserve.d.ts +3 -3
  424. package/esm/typings/src/utils/organization/really_any.d.ts +7 -0
  425. package/esm/typings/src/utils/random/$generateBookBoilerplate.d.ts +25 -0
  426. package/esm/typings/src/utils/random/$randomAgentPersona.d.ts +9 -0
  427. package/esm/typings/src/utils/random/$randomFullnameWithColor.d.ts +13 -0
  428. package/esm/typings/src/utils/random/$randomItem.d.ts +9 -0
  429. package/esm/typings/src/utils/random/$randomSeed.d.ts +3 -0
  430. package/esm/typings/src/utils/random/$randomToken.d.ts +2 -0
  431. package/esm/typings/src/utils/serialization/$deepFreeze.d.ts +2 -1
  432. package/esm/typings/src/utils/serialization/asSerializable.d.ts +2 -2
  433. package/esm/typings/src/utils/serialization/serializeToPromptbookJavascript.d.ts +2 -2
  434. package/esm/typings/src/utils/validators/parameterName/validateParameterName.d.ts +2 -0
  435. package/esm/typings/src/version.d.ts +1 -1
  436. package/esm/typings/src/wizard/$getCompiledBook.d.ts +1 -2
  437. package/package.json +15 -15
  438. package/umd/index.umd.js +5089 -356
  439. package/umd/index.umd.js.map +1 -1
  440. package/esm/typings/src/book-2.0/commitments/index.d.ts +0 -60
  441. package/esm/typings/src/book-components/BookEditor/config.d.ts +0 -11
  442. package/esm/typings/src/book-components/Chat/utils/renderMarkdown.d.ts +0 -21
  443. package/esm/typings/src/collection/collectionToJson.d.ts +0 -13
  444. package/esm/typings/src/collection/constructors/createCollectionFromJson.d.ts +0 -13
  445. /package/esm/typings/src/{book-components/Chat/utils/renderMarkdown.test.d.ts → book-2.0/agent-source/computeAgentHash.test.d.ts} +0 -0
  446. /package/esm/typings/src/{collection/constructors/createCollectionFromDirectory.test.d.ts → book-2.0/agent-source/normalizeAgentName.test.d.ts} +0 -0
  447. /package/esm/typings/src/{collection/constructors/createCollectionFromJson.test.d.ts → book-components/Chat/AgentChat/AgentChat.test.d.ts} +0 -0
  448. /package/esm/typings/src/collection/{constructors/createCollectionFromPromise.test.d.ts → pipeline-collection/constructors/createPipelineCollectionFromDirectory.test.d.ts} +0 -0
  449. /package/esm/typings/src/{commands/_common/parseCommand.test.d.ts → collection/pipeline-collection/constructors/createPipelineCollectionFromJson.test.d.ts} +0 -0
  450. /package/esm/typings/src/collection/{collectionToJson.test.d.ts → pipeline-collection/pipelineCollectionToJson.test.d.ts} +0 -0
  451. /package/esm/typings/src/{book-2.0/commitments → commitments}/_base/BookCommitment.d.ts +0 -0
  452. /package/esm/typings/src/{book-2.0/commitments → commitments}/_base/ParsedCommitment.d.ts +0 -0
@@ -2,14 +2,12 @@ import type { BookParameter } from '../book-2.0/agent-source/AgentBasicInformati
2
2
  import type { AgentBasicInformation } from '../book-2.0/agent-source/AgentBasicInformation';
3
3
  import type { AgentModelRequirements } from '../book-2.0/agent-source/AgentModelRequirements';
4
4
  import type { string_book } from '../book-2.0/agent-source/string_book';
5
- import type { BookCommitment } from '../book-2.0/commitments/_base/BookCommitment';
6
- import type { CommitmentDefinition } from '../book-2.0/commitments/_base/CommitmentDefinition';
7
- import type { ParsedCommitment } from '../book-2.0/commitments/_base/ParsedCommitment';
8
5
  import type { AvatarChipProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChip';
9
6
  import type { AvatarChipFromSourceProps } from '../book-components/AvatarProfile/AvatarChip/AvatarChipFromSource';
10
7
  import type { AvatarProfileProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfile';
11
8
  import type { AvatarProfileFromSourceProps } from '../book-components/AvatarProfile/AvatarProfile/AvatarProfileFromSource';
12
9
  import type { BookEditorProps } from '../book-components/BookEditor/BookEditor';
10
+ import type { AgentChatProps } from '../book-components/Chat/AgentChat/AgentChatProps';
13
11
  import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
14
12
  import type { ChatAutoScrollConfig } from '../book-components/Chat/hooks/useChatAutoScroll';
15
13
  import type { SendMessageToLlmChatFunction } from '../book-components/Chat/hooks/useSendMessageToLlmChat';
@@ -21,7 +19,17 @@ import type { string_chat_format_name } from '../book-components/Chat/save/_comm
21
19
  import type { ChatMessage } from '../book-components/Chat/types/ChatMessage';
22
20
  import type { ChatParticipant } from '../book-components/Chat/types/ChatParticipant';
23
21
  import type { MessageButton } from '../book-components/Chat/utils/parseMessageButtons';
24
- import type { PipelineCollection } from '../collection/PipelineCollection';
22
+ import type { QrCodeOptions } from '../book-components/Qr/useQrCode';
23
+ import type { AgentCollection } from '../collection/agent-collection/AgentCollection';
24
+ import type { AgentCollectionInSupabaseOptions } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabaseOptions';
25
+ import type { Json } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
26
+ import type { AgentsDatabaseSchema } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
27
+ import type { Tables } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
28
+ import type { TablesInsert } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
29
+ import type { TablesUpdate } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
30
+ import type { Enums } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
31
+ import type { CompositeTypes } from '../collection/agent-collection/constructors/agent-collection-in-supabase/AgentsDatabaseSchema';
32
+ import type { PipelineCollection } from '../collection/pipeline-collection/PipelineCollection';
25
33
  import type { Command } from '../commands/_common/types/Command';
26
34
  import type { CommandParser } from '../commands/_common/types/CommandParser';
27
35
  import type { PipelineBothCommandParser } from '../commands/_common/types/CommandParser';
@@ -46,6 +54,10 @@ import type { SectionCommand } from '../commands/SECTION/SectionCommand';
46
54
  import type { UrlCommand } from '../commands/URL/UrlCommand';
47
55
  import type { ActionCommand } from '../commands/X_ACTION/ActionCommand';
48
56
  import type { InstrumentCommand } from '../commands/X_INSTRUMENT/InstrumentCommand';
57
+ import type { BookCommitment } from '../commitments/_base/BookCommitment';
58
+ import type { CommitmentDefinition } from '../commitments/_base/CommitmentDefinition';
59
+ import type { ParsedCommitment } from '../commitments/_base/ParsedCommitment';
60
+ import type { GroupedCommitmentDefinition } from '../commitments/index';
49
61
  import type { PrettifyOptions } from '../conversion/prettify/PrettifyOptions';
50
62
  import type { renderPipelineMermaidOptions } from '../conversion/prettify/renderPipelineMermaidOptions';
51
63
  import type { CallbackInterfaceToolsOptions } from '../dialogs/callback/CallbackInterfaceToolsOptions';
@@ -98,7 +110,9 @@ import type { LlmToolsOptions } from '../llm-providers/_common/register/LlmTools
98
110
  import type { CacheItem } from '../llm-providers/_common/utils/cache/CacheItem';
99
111
  import type { CacheLlmToolsOptions } from '../llm-providers/_common/utils/cache/CacheLlmToolsOptions';
100
112
  import type { LlmExecutionToolsWithTotalUsage } from '../llm-providers/_common/utils/count-total-usage/LlmExecutionToolsWithTotalUsage';
101
- import type { CreateAgentLlmExecutionToolsOptions } from '../llm-providers/agent/createAgentLlmExecutionTools';
113
+ import type { AgentOptions } from '../llm-providers/agent/AgentOptions';
114
+ import type { CreateAgentLlmExecutionToolsOptions } from '../llm-providers/agent/CreateAgentLlmExecutionToolsOptions';
115
+ import type { RemoteAgentOptions } from '../llm-providers/agent/RemoteAgentOptions';
102
116
  import type { AnthropicClaudeExecutionToolsOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
103
117
  import type { AnthropicClaudeExecutionToolsNonProxiedOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
104
118
  import type { AnthropicClaudeExecutionToolsProxiedOptions } from '../llm-providers/anthropic-claude/AnthropicClaudeExecutionToolsOptions';
@@ -166,7 +180,10 @@ import type { PostprocessingFunction } from '../scripting/javascript/JavascriptE
166
180
  import type { PromptbookStorage } from '../storage/_common/PromptbookStorage';
167
181
  import type { FileCacheStorageOptions } from '../storage/file-cache-storage/FileCacheStorageOptions';
168
182
  import type { IndexedDbStorageOptions } from '../storage/local-storage/utils/IndexedDbStorageOptions';
183
+ import type { BookTranspiler } from '../transpilers/_common/BookTranspiler';
184
+ import type { BookTranspilerOptions } from '../transpilers/_common/BookTranspilerOptions';
169
185
  import type { IntermediateFilesStrategy } from '../types/IntermediateFilesStrategy';
186
+ import type { LlmCall } from '../types/LlmCall';
170
187
  import type { ModelRequirements } from '../types/ModelRequirements';
171
188
  import type { CompletionModelRequirements } from '../types/ModelRequirements';
172
189
  import type { ChatModelRequirements } from '../types/ModelRequirements';
@@ -203,6 +220,8 @@ import type { string_reserved_parameter_name } from '../types/typeAliases';
203
220
  import type { ReservedParameters } from '../types/typeAliases';
204
221
  import type { string_title } from '../types/typeAliases';
205
222
  import type { string_agent_name } from '../types/typeAliases';
223
+ import type { string_agent_name_in_book } from '../types/typeAliases';
224
+ import type { string_agent_hash } from '../types/typeAliases';
206
225
  import type { string_persona_description } from '../types/typeAliases';
207
226
  import type { string_model_description } from '../types/typeAliases';
208
227
  import type { string_knowledge_source_content } from '../types/typeAliases';
@@ -232,6 +251,7 @@ import type { string_url } from '../types/typeAliases';
232
251
  import type { string_promptbook_server_url } from '../types/typeAliases';
233
252
  import type { string_base_url } from '../types/typeAliases';
234
253
  import type { string_pipeline_root_url } from '../types/typeAliases';
254
+ import type { string_agent_url } from '../types/typeAliases';
235
255
  import type { string_pipeline_url } from '../types/typeAliases';
236
256
  import type { string_pipeline_url_with_task_hash } from '../types/typeAliases';
237
257
  import type { string_data_url } from '../types/typeAliases';
@@ -261,6 +281,8 @@ import type { string_absolute_dirname } from '../types/typeAliases';
261
281
  import type { string_relative_dirname } from '../types/typeAliases';
262
282
  import type { string_dirname } from '../types/typeAliases';
263
283
  import type { string_person_fullname } from '../types/typeAliases';
284
+ import type { string_person_firstname } from '../types/typeAliases';
285
+ import type { string_person_lastname } from '../types/typeAliases';
264
286
  import type { string_person_profile } from '../types/typeAliases';
265
287
  import type { string_license } from '../types/typeAliases';
266
288
  import type { string_legal_entity } from '../types/typeAliases';
@@ -306,6 +328,7 @@ import type { number_kilobytes } from '../types/typeAliases';
306
328
  import type { number_megabytes } from '../types/typeAliases';
307
329
  import type { number_gigabytes } from '../types/typeAliases';
308
330
  import type { number_terabytes } from '../types/typeAliases';
331
+ import type { Updatable } from '../types/Updatable';
309
332
  import type { ColorTransformer } from '../utils/color/operators/ColorTransformer';
310
333
  import type { PipelineEditableSerialized } from '../utils/editable/types/PipelineEditableSerialized';
311
334
  import type { ExecCommandOptions } from '../utils/execCommand/ExecCommandOptions';
@@ -314,6 +337,7 @@ import type { CodeBlock } from '../utils/markdown/extractAllBlocksFromMarkdown';
314
337
  import type { MarkdownSection } from '../utils/markdown/parseMarkdownSection';
315
338
  import type { Registered } from '../utils/misc/$Register';
316
339
  import type { Registration } from '../utils/misc/$Register';
340
+ import type { AboutPromptbookInformationOptions } from '../utils/misc/aboutPromptbookInformation';
317
341
  import type { FromtoItems } from '../utils/misc/FromtoItems';
318
342
  import type { InjectCssModuleIntoShadowRootOptions } from '../utils/misc/injectCssModuleIntoShadowRoot';
319
343
  import type { string_keyword } from '../utils/normalization/IKeywords';
@@ -327,6 +351,7 @@ import type { OrderJsonOptions } from '../utils/normalization/orderJson';
327
351
  import type { empty_object } from '../utils/organization/empty_object';
328
352
  import type { really_any } from '../utils/organization/really_any';
329
353
  import type { TODO_any } from '../utils/organization/TODO_any';
354
+ import type { RandomFullnameWithColorResult } from '../utils/random/$randomFullnameWithColor';
330
355
  import type { CheckSerializableAsJsonOptions } from '../utils/serialization/checkSerializableAsJson';
331
356
  import type { ExportJsonOptions } from '../utils/serialization/exportJson';
332
357
  import type { ITakeChain } from '../utils/take/interfaces/ITakeChain';
@@ -335,14 +360,12 @@ export type { BookParameter };
335
360
  export type { AgentBasicInformation };
336
361
  export type { AgentModelRequirements };
337
362
  export type { string_book };
338
- export type { BookCommitment };
339
- export type { CommitmentDefinition };
340
- export type { ParsedCommitment };
341
363
  export type { AvatarChipProps };
342
364
  export type { AvatarChipFromSourceProps };
343
365
  export type { AvatarProfileProps };
344
366
  export type { AvatarProfileFromSourceProps };
345
367
  export type { BookEditorProps };
368
+ export type { AgentChatProps };
346
369
  export type { ChatProps };
347
370
  export type { ChatAutoScrollConfig };
348
371
  export type { SendMessageToLlmChatFunction };
@@ -354,6 +377,16 @@ export type { string_chat_format_name };
354
377
  export type { ChatMessage };
355
378
  export type { ChatParticipant };
356
379
  export type { MessageButton };
380
+ export type { QrCodeOptions };
381
+ export type { AgentCollection };
382
+ export type { AgentCollectionInSupabaseOptions };
383
+ export type { Json };
384
+ export type { AgentsDatabaseSchema };
385
+ export type { Tables };
386
+ export type { TablesInsert };
387
+ export type { TablesUpdate };
388
+ export type { Enums };
389
+ export type { CompositeTypes };
357
390
  export type { PipelineCollection };
358
391
  export type { Command };
359
392
  export type { CommandParser };
@@ -379,6 +412,10 @@ export type { SectionCommand };
379
412
  export type { UrlCommand };
380
413
  export type { ActionCommand };
381
414
  export type { InstrumentCommand };
415
+ export type { BookCommitment };
416
+ export type { CommitmentDefinition };
417
+ export type { ParsedCommitment };
418
+ export type { GroupedCommitmentDefinition };
382
419
  export type { PrettifyOptions };
383
420
  export type { renderPipelineMermaidOptions };
384
421
  export type { CallbackInterfaceToolsOptions };
@@ -431,7 +468,9 @@ export type { LlmToolsOptions };
431
468
  export type { CacheItem };
432
469
  export type { CacheLlmToolsOptions };
433
470
  export type { LlmExecutionToolsWithTotalUsage };
471
+ export type { AgentOptions };
434
472
  export type { CreateAgentLlmExecutionToolsOptions };
473
+ export type { RemoteAgentOptions };
435
474
  export type { AnthropicClaudeExecutionToolsOptions };
436
475
  export type { AnthropicClaudeExecutionToolsNonProxiedOptions };
437
476
  export type { AnthropicClaudeExecutionToolsProxiedOptions };
@@ -499,7 +538,10 @@ export type { PostprocessingFunction };
499
538
  export type { PromptbookStorage };
500
539
  export type { FileCacheStorageOptions };
501
540
  export type { IndexedDbStorageOptions };
541
+ export type { BookTranspiler };
542
+ export type { BookTranspilerOptions };
502
543
  export type { IntermediateFilesStrategy };
544
+ export type { LlmCall };
503
545
  export type { ModelRequirements };
504
546
  export type { CompletionModelRequirements };
505
547
  export type { ChatModelRequirements };
@@ -536,6 +578,8 @@ export type { string_reserved_parameter_name };
536
578
  export type { ReservedParameters };
537
579
  export type { string_title };
538
580
  export type { string_agent_name };
581
+ export type { string_agent_name_in_book };
582
+ export type { string_agent_hash };
539
583
  export type { string_persona_description };
540
584
  export type { string_model_description };
541
585
  export type { string_knowledge_source_content };
@@ -565,6 +609,7 @@ export type { string_url };
565
609
  export type { string_promptbook_server_url };
566
610
  export type { string_base_url };
567
611
  export type { string_pipeline_root_url };
612
+ export type { string_agent_url };
568
613
  export type { string_pipeline_url };
569
614
  export type { string_pipeline_url_with_task_hash };
570
615
  export type { string_data_url };
@@ -594,6 +639,8 @@ export type { string_absolute_dirname };
594
639
  export type { string_relative_dirname };
595
640
  export type { string_dirname };
596
641
  export type { string_person_fullname };
642
+ export type { string_person_firstname };
643
+ export type { string_person_lastname };
597
644
  export type { string_person_profile };
598
645
  export type { string_license };
599
646
  export type { string_legal_entity };
@@ -639,6 +686,7 @@ export type { number_kilobytes };
639
686
  export type { number_megabytes };
640
687
  export type { number_gigabytes };
641
688
  export type { number_terabytes };
689
+ export type { Updatable };
642
690
  export type { ColorTransformer };
643
691
  export type { PipelineEditableSerialized };
644
692
  export type { ExecCommandOptions };
@@ -647,6 +695,7 @@ export type { CodeBlock };
647
695
  export type { MarkdownSection };
648
696
  export type { Registered };
649
697
  export type { Registration };
698
+ export type { AboutPromptbookInformationOptions };
650
699
  export type { FromtoItems };
651
700
  export type { InjectCssModuleIntoShadowRootOptions };
652
701
  export type { string_keyword };
@@ -660,6 +709,7 @@ export type { OrderJsonOptions };
660
709
  export type { empty_object };
661
710
  export type { really_any };
662
711
  export type { TODO_any };
712
+ export type { RandomFullnameWithColorResult };
663
713
  export type { CheckSerializableAsJsonOptions };
664
714
  export type { ExportJsonOptions };
665
715
  export type { ITakeChain };
@@ -11,6 +11,7 @@ import { jsonParse } from '../formats/json/utils/jsonParse';
11
11
  import { isValidXmlString } from '../formats/xml/utils/isValidXmlString';
12
12
  import { prompt } from '../pipeline/prompt-notation';
13
13
  import { promptTemplate } from '../pipeline/prompt-notation';
14
+ import { $detectRuntimeEnvironment } from '../utils/environment/$detectRuntimeEnvironment';
14
15
  import { $isRunningInBrowser } from '../utils/environment/$isRunningInBrowser';
15
16
  import { $isRunningInJest } from '../utils/environment/$isRunningInJest';
16
17
  import { $isRunningInNode } from '../utils/environment/$isRunningInNode';
@@ -26,6 +27,7 @@ import { countSentences } from '../utils/expectation-counters/countSentences';
26
27
  import { countWords } from '../utils/expectation-counters/countWords';
27
28
  import { CountUtils } from '../utils/expectation-counters/index';
28
29
  import { $getCurrentDate } from '../utils/misc/$getCurrentDate';
30
+ import { computeHash } from '../utils/misc/computeHash';
29
31
  import { debounce } from '../utils/misc/debounce';
30
32
  import { parseNumber } from '../utils/misc/parseNumber';
31
33
  import { capitalize } from '../utils/normalization/capitalize';
@@ -38,6 +40,7 @@ import { nameToUriPart } from '../utils/normalization/nameToUriPart';
38
40
  import { nameToUriParts } from '../utils/normalization/nameToUriParts';
39
41
  import type { string_kebab_case } from '../utils/normalization/normalize-to-kebab-case';
40
42
  import { normalizeToKebabCase } from '../utils/normalization/normalize-to-kebab-case';
43
+ import { normalizeMessageText } from '../utils/normalization/normalizeMessageText';
41
44
  import type { string_camelCase } from '../utils/normalization/normalizeTo_camelCase';
42
45
  import { normalizeTo_camelCase } from '../utils/normalization/normalizeTo_camelCase';
43
46
  import type { string_PascalCase } from '../utils/normalization/normalizeTo_PascalCase';
@@ -96,6 +99,7 @@ export { jsonParse };
96
99
  export { isValidXmlString };
97
100
  export { prompt };
98
101
  export { promptTemplate };
102
+ export { $detectRuntimeEnvironment };
99
103
  export { $isRunningInBrowser };
100
104
  export { $isRunningInJest };
101
105
  export { $isRunningInNode };
@@ -111,6 +115,7 @@ export { countSentences };
111
115
  export { countWords };
112
116
  export { CountUtils };
113
117
  export { $getCurrentDate };
118
+ export { computeHash };
114
119
  export { debounce };
115
120
  export { parseNumber };
116
121
  export { capitalize };
@@ -123,6 +128,7 @@ export { nameToUriPart };
123
128
  export { nameToUriParts };
124
129
  export type { string_kebab_case };
125
130
  export { normalizeToKebabCase };
131
+ export { normalizeMessageText };
126
132
  export type { string_camelCase };
127
133
  export { normalizeTo_camelCase };
128
134
  export type { string_PascalCase };
@@ -29,6 +29,8 @@ import { _PdfScraperRegistration } from '../scrapers/pdf/register-constructor';
29
29
  import { _PdfScraperMetadataRegistration } from '../scrapers/pdf/register-metadata';
30
30
  import { _WebsiteScraperRegistration } from '../scrapers/website/register-constructor';
31
31
  import { _WebsiteScraperMetadataRegistration } from '../scrapers/website/register-metadata';
32
+ import { _FormattedBookInMarkdownTranspilerRegistration } from '../transpilers/formatted-book-in-markdown/register';
33
+ import { _OpenAiSdkTranspilerRegistration } from '../transpilers/openai-sdk/register';
32
34
  import { wizard } from '../wizard/wizard';
33
35
  export { BOOK_LANGUAGE_VERSION, PROMPTBOOK_ENGINE_VERSION };
34
36
  export { _AnthropicClaudeMetadataRegistration };
@@ -61,4 +63,6 @@ export { _PdfScraperRegistration };
61
63
  export { _PdfScraperMetadataRegistration };
62
64
  export { _WebsiteScraperRegistration };
63
65
  export { _WebsiteScraperMetadataRegistration };
66
+ export { _FormattedBookInMarkdownTranspilerRegistration };
67
+ export { _OpenAiSdkTranspilerRegistration };
64
68
  export { wizard };
@@ -1,4 +1,4 @@
1
- import type { string_agent_name, string_url_image } from '../../types/typeAliases';
1
+ import type { string_agent_hash, string_agent_name, string_agent_url, string_color, string_url_image } from '../../types/typeAliases';
2
2
  /**
3
3
  * Unified parameter representation that supports two different notations:
4
4
  * 1. @Parameter - single word parameter starting with @
@@ -28,24 +28,37 @@ export type AgentBasicInformation = {
28
28
  * Name of the agent
29
29
  * This is the first line of the agent source
30
30
  */
31
- agentName: string_agent_name | null;
31
+ agentName: string_agent_name;
32
+ /**
33
+ * Hash of the agent source for integrity verification
34
+ */
35
+ agentHash: string_agent_hash;
32
36
  /**
33
37
  * Optional description of the agent
34
38
  * This is the line starting with "PERSONA"
35
39
  */
36
40
  personaDescription: string | null;
41
+ /**
42
+ * The initial message shown to the user when the chat starts
43
+ * This is the line starting with "INITIAL MESSAGE"
44
+ */
45
+ initialMessage: string | null;
37
46
  /**
38
47
  * Metadata commitments parsed from META lines
39
48
  * Each META commitment has the format "META TYPE content"
40
49
  * When there are multiple meta commitments of the same type, later overrides earlier
41
50
  */
42
51
  meta: {
52
+ fullname?: string;
43
53
  image?: string_url_image;
44
- link?: string;
45
- title?: string;
46
- description?: string;
54
+ color?: string_color;
47
55
  [key: string]: string | undefined;
48
56
  };
57
+ /**
58
+ * Links found in the agent source
59
+ * This corresponds to META LINK commitments
60
+ */
61
+ links: Array<string_agent_url>;
49
62
  /**
50
63
  * Parameters found in the agent source
51
64
  * Supports two different notations for the same syntax feature:
@@ -55,5 +68,6 @@ export type AgentBasicInformation = {
55
68
  parameters: BookParameter[];
56
69
  };
57
70
  /**
71
+ * TODO: [🐱‍🚀] Make all properties of `AgentBasicInformation` readonly
58
72
  * TODO: [🕛] Unite `AgentBasicInformation`, `ChatParticipant`, `LlmExecutionTools` + `LlmToolsMetadata`
59
73
  */
@@ -1,3 +1,4 @@
1
+ import type { string_knowledge_source_link } from '../../types/typeAliases';
1
2
  import type { TODO_any } from '../../utils/organization/TODO_any';
2
3
  /**
3
4
  * Model requirements for an agent
@@ -16,7 +17,22 @@ export type AgentModelRequirements = {
16
17
  /**
17
18
  * Optional list of MCP servers that the agent can connect to
18
19
  */
19
- readonly mcpServers?: string[];
20
+ readonly mcpServers?: ReadonlyArray<string>;
21
+ /**
22
+ * Optional link to the parent agent from which this agent inherits
23
+ */
24
+ readonly parentAgentUrl?: string_knowledge_source_link;
25
+ /**
26
+ * Optional list of knowledge source links that the agent can use
27
+ */
28
+ readonly knowledgeSources?: ReadonlyArray<string_knowledge_source_link>;
29
+ /**
30
+ * List of sample conversations (question/answer pairs)
31
+ */
32
+ readonly samples?: ReadonlyArray<{
33
+ question: string;
34
+ answer: string;
35
+ }>;
20
36
  /**
21
37
  * Temperature for the agent's responses, controlling randomness
22
38
  */
@@ -1,4 +1,5 @@
1
- import type { ParsedCommitment } from '../commitments/_base/ParsedCommitment';
1
+ import type { ParsedCommitment } from '../../commitments/_base/ParsedCommitment';
2
+ import { string_agent_name } from '../../types/typeAliases';
2
3
  /**
3
4
  * Result of parsing agent source for commitments
4
5
  *
@@ -8,7 +9,7 @@ export type AgentSourceParseResult = {
8
9
  /**
9
10
  * The agent name (first line)
10
11
  */
11
- agentName: string | null;
12
+ agentName: string_agent_name | null;
12
13
  /**
13
14
  * All parsed commitments
14
15
  */
@@ -0,0 +1,8 @@
1
+ import { string_agent_hash } from '../../types/typeAliases';
2
+ import { string_book } from './string_book';
3
+ /**
4
+ * Computes SHA-256 hash of the agent source
5
+ *
6
+ * @public exported from `@promptbook/core`
7
+ */
8
+ export declare function computeAgentHash(agentSource: string_book): string_agent_hash;
@@ -1,4 +1,4 @@
1
- import type { BookCommitment } from '../commitments/_base/BookCommitment';
1
+ import type { BookCommitment } from '../../commitments/_base/BookCommitment';
2
2
  /**
3
3
  * Generates a regex pattern to match a specific commitment
4
4
  *
@@ -7,7 +7,7 @@ import type { BookCommitment } from '../commitments/_base/BookCommitment';
7
7
  *
8
8
  * @private - TODO: [🧠] Maybe should be public?
9
9
  */
10
- export declare function createCommitmentRegex(commitment: BookCommitment): RegExp;
10
+ export declare function createCommitmentRegex(commitment: BookCommitment, aliases?: BookCommitment[]): RegExp;
11
11
  /**
12
12
  * Generates a regex pattern to match a specific commitment type
13
13
  *
@@ -17,4 +17,4 @@ export declare function createCommitmentRegex(commitment: BookCommitment): RegEx
17
17
  *
18
18
  * @private
19
19
  */
20
- export declare function createCommitmentTypeRegex(commitment: BookCommitment): RegExp;
20
+ export declare function createCommitmentTypeRegex(commitment: BookCommitment, aliases?: BookCommitment[]): RegExp;
@@ -0,0 +1,8 @@
1
+ import { string_agent_name } from '../../types/typeAliases';
2
+ import { string_book } from './string_book';
3
+ /**
4
+ * Creates temporary default agent name based on agent source hash
5
+ *
6
+ * @public exported from `@promptbook/core`
7
+ */
8
+ export declare function createDefaultAgentName(agentSource: string_book): string_agent_name;
@@ -0,0 +1,9 @@
1
+ import { string_agent_name } from '../../types/typeAliases';
2
+ /**
3
+ * Normalizes agent name from arbitrary string to valid agent name
4
+ *
5
+ * Note: [🔂] This function is idempotent.
6
+ *
7
+ * @public exported from `@promptbook/core`
8
+ */
9
+ export declare function normalizeAgentName(rawAgentName: string): string_agent_name;
@@ -0,0 +1,18 @@
1
+ import type { string_book } from './string_book';
2
+ /**
3
+ * Number of padding lines to add at the end of the book content
4
+ *
5
+ * @public exported from `@promptbook/core`
6
+ */
7
+ export declare const PADDING_LINES = 11;
8
+ /**
9
+ * A function that adds padding to the book content
10
+ *
11
+ * Note: [🔂] This function is idempotent.
12
+ *
13
+ * @public exported from `@promptbook/core`
14
+ */
15
+ export declare function padBook(content: string_book): string_book;
16
+ /**
17
+ * TODO: [🧠] Maybe export
18
+ */
@@ -6,4 +6,4 @@ import type { string_book } from './string_book';
6
6
  *
7
7
  * @private internal utility of `parseAgentSource`
8
8
  */
9
- export declare function parseAgentSourceWithCommitments(agentSource: string_book): AgentSourceParseResult;
9
+ export declare function parseAgentSourceWithCommitments(agentSource: string_book): Omit<AgentSourceParseResult, 'agentHash'>;
@@ -15,12 +15,15 @@ export declare function isValidBook(value: string): value is string_book;
15
15
  * This function should be used when you have a string that you know represents agent source
16
16
  * but need to convert it to the branded type for type safety
17
17
  *
18
+ * Note: [🔂] This function is idempotent.
19
+ *
18
20
  * @public exported from `@promptbook/core`
19
21
  */
20
22
  export declare function validateBook(source: string): string_book;
21
23
  /**
22
24
  * Default book
23
25
  *
26
+ * @deprecated Use `$generateBookBoilerplate` instead
24
27
  * @public exported from `@promptbook/core`
25
28
  */
26
29
  export declare const DEFAULT_BOOK: string_book;
@@ -1,3 +1,4 @@
1
+ import { CSSProperties } from 'react';
1
2
  import type { AgentBasicInformation } from '../../../book-2.0/agent-source/AgentBasicInformation';
2
3
  import type { string_book } from '../../../book-2.0/agent-source/string_book';
3
4
  import type { string_css_class } from '../../../types/typeAliases';
@@ -14,11 +15,15 @@ export type AvatarProfileProps = {
14
15
  /**
15
16
  * The source of the agent, which will be displayed in the BookEditor.
16
17
  */
17
- readonly agentSource: string_book;
18
+ readonly agentSource?: string_book;
18
19
  /**
19
20
  * Optional CSS class name which will be added to root <div> element
20
21
  */
21
22
  readonly className?: string_css_class;
23
+ /**
24
+ * Optional CSS style which will be added to root <div/> element
25
+ */
26
+ readonly style?: CSSProperties;
22
27
  };
23
28
  /**
24
29
  * Shows a box with user avatar, name and description
@@ -1,7 +1,15 @@
1
- import type { CSSProperties } from 'react';
1
+ import { CSSProperties } from 'react';
2
2
  import type { Promisable } from 'type-fest';
3
3
  import type { string_book } from '../../book-2.0/agent-source/string_book';
4
- import type { string_knowledge_source_content } from '../../types/typeAliases';
4
+ import type { number_percent, number_positive, string_css_value, string_knowledge_source_content } from '../../types/typeAliases';
5
+ /**
6
+ * Default height of the book editor
7
+ *
8
+ * Note: This height is computed based on the number of lines in the default book + padding multiplied by an estimated line height.
9
+ *
10
+ * @public exported from `@promptbook/components`
11
+ */
12
+ export declare const DEFAULT_BOOK_EDITOR_HEIGHT: number;
5
13
  /**
6
14
  * Props of `BookEditor`
7
15
  *
@@ -20,6 +28,22 @@ export type BookEditorProps = {
20
28
  * Optional CSS style which will be added to root <div/> element
21
29
  */
22
30
  readonly style?: CSSProperties;
31
+ /**
32
+ * Height of the `BookEditor` component
33
+ *
34
+ * - You can use any valid CSS value, e.g., `500px`, `100%`, `50vh`, etc.
35
+ * - If not set, the default height is `DEFAULT_BOOK_EDITOR_HEIGHT`.
36
+ * - If set to `null`, the height should be controlled entirely via `className` or `style`, otherwise the editor will have zero height.
37
+ *
38
+ * @default `DEFAULT_BOOK_EDITOR_HEIGHT`
39
+ */
40
+ readonly height?: string_css_value | null;
41
+ /**
42
+ * Zoom level of the editor
43
+ *
44
+ * @default 1 (100%)
45
+ */
46
+ readonly zoom?: number_percent & number_positive;
23
47
  /**
24
48
  * The book which is being edited.
25
49
  */
@@ -40,17 +64,63 @@ export type BookEditorProps = {
40
64
  * If true, disables border radius making the editor have sharp corners
41
65
  */
42
66
  readonly isBorderRadiusDisabled?: boolean;
43
- /**
44
- * If true, shows the footer with book title and version information.
45
- * By default, the footer is hidden.
46
- */
47
- readonly isFooterShown?: boolean;
48
67
  /**
49
68
  * If true, the editor is in read-only mode
50
69
  *
51
70
  * @default false
52
71
  */
53
72
  readonly isReadonly?: boolean;
73
+ /**
74
+ * Optional translations for the component
75
+ */
76
+ readonly translations?: {
77
+ /**
78
+ * Message to show when trying to edit a readonly editor
79
+ *
80
+ * @default "You cannot edit this book"
81
+ */
82
+ readonly readonlyMessage?: string;
83
+ };
84
+ /**
85
+ * If true, shows the download button in the action bar.
86
+ * By default, the download button is shown.
87
+ */
88
+ readonly isDownloadButtonShown?: boolean;
89
+ /**
90
+ * If true, shows the about button in the action bar.
91
+ * By default, the about button is shown.
92
+ */
93
+ readonly isAboutButtonShown?: boolean;
94
+ /**
95
+ * If true, shows the fullscreen button in the action bar.
96
+ * By default, the fullscreen button is shown.
97
+ */
98
+ readonly isFullscreenButtonShown?: boolean;
99
+ /**
100
+ * Callback function to handle fullscreen button click.
101
+ * Note: This is for internal use between BookEditor and BookEditorMonaco
102
+ * @private
103
+ */
104
+ onFullscreenClick?(): void;
105
+ /**
106
+ * If true, the editor is in fullscreen mode.
107
+ * Note: This is for internal use between BookEditor and BookEditorMonaco
108
+ * @private
109
+ */
110
+ readonly isFullscreen?: boolean;
111
+ /**
112
+ * If defined, the editor will be synced with other editors with the same sync configuration.
113
+ */
114
+ readonly sync?: {
115
+ /**
116
+ * The URL of the y-websocket server.
117
+ */
118
+ readonly serverUrl: string;
119
+ /**
120
+ * The name of the room to join.
121
+ */
122
+ readonly roomName: string;
123
+ };
54
124
  };
55
125
  /**
56
126
  * Renders a book editor
@@ -0,0 +1,14 @@
1
+ type BookEditorActionbarProps = {
2
+ value: string | undefined;
3
+ isDownloadButtonShown?: boolean;
4
+ isAboutButtonShown?: boolean;
5
+ isFullscreenButtonShown?: boolean;
6
+ onFullscreenClick?: () => void;
7
+ isFullscreen?: boolean;
8
+ };
9
+ /**
10
+ *
11
+ * @private Internal component used by `BookEditor`
12
+ */
13
+ export declare function BookEditorActionbar(props: BookEditorActionbarProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { AgentChatProps } from './AgentChatProps';
2
+ /**
3
+ * AgentChat component that provides chat functionality with LLM integration
4
+ *
5
+ * This component internally manages messages, participants, and task progress,
6
+ * and uses the provided LLM tools to generate responses via `LlmExecutionTools.callChatModel`.
7
+ *
8
+ * Note: There are multiple chat components:
9
+ * - `<Chat/>` renders chat as it is without any logic
10
+ * - `<AgentChat/>` connected to LLM Execution Tools of Promptbook
11
+ *
12
+ * @public exported from `@promptbook/components`
13
+ */
14
+ export declare function AgentChat(props: AgentChatProps): import("react/jsx-runtime").JSX.Element;