@promptbook/cli 0.112.0-99 → 0.113.0-0

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 (850) hide show
  1. package/README.md +76 -44
  2. package/agents/default/developer.book +24 -0
  3. package/apps/agents-server/README.md +19 -2
  4. package/apps/agents-server/env-manual/GITHUB_APP.md +1 -1
  5. package/apps/agents-server/next.config.ts +41 -1
  6. package/apps/agents-server/package.json +1 -1
  7. package/apps/agents-server/playwright.config.ts +3 -0
  8. package/apps/agents-server/public/promptbook-logo-blue.png +0 -0
  9. package/apps/agents-server/public/promptbook-logo-white.png +0 -0
  10. package/apps/agents-server/scripts/prerender-homepage.js +76 -1
  11. package/apps/agents-server/src/app/AddAgentButton.tsx +0 -5
  12. package/apps/agents-server/src/app/[agentName]/layout.tsx +1 -0
  13. package/apps/agents-server/src/app/actions.ts +70 -9
  14. package/apps/agents-server/src/app/admin/about/page.tsx +1 -1
  15. package/apps/agents-server/src/app/admin/api-tokens/ApiTokensClient.tsx +4 -1
  16. package/apps/agents-server/src/app/admin/chat-feedback/ChatFeedbackClient.tsx +3 -0
  17. package/apps/agents-server/src/app/admin/chat-feedback/ChatFeedbackTable.tsx +13 -8
  18. package/apps/agents-server/src/app/admin/chat-feedback/page.tsx +2 -4
  19. package/apps/agents-server/src/app/admin/chat-history/ChatHistoryClient.tsx +3 -0
  20. package/apps/agents-server/src/app/admin/chat-history/ChatHistoryTable.tsx +13 -8
  21. package/apps/agents-server/src/app/admin/chat-history/page.tsx +2 -4
  22. package/apps/agents-server/src/app/admin/cli-access/CliAccessClient.tsx +1 -3
  23. package/apps/agents-server/src/app/admin/code-runners/CodeRunnersClient.tsx +19 -11
  24. package/apps/agents-server/src/app/admin/custom-css/CustomCssClient.tsx +4 -0
  25. package/apps/agents-server/src/app/admin/custom-css/CustomCssEditorPanel.tsx +7 -1
  26. package/apps/agents-server/src/app/admin/custom-css/CustomCssFilesPanel.tsx +7 -1
  27. package/apps/agents-server/src/app/admin/custom-js/CustomJsClient.tsx +11 -0
  28. package/apps/agents-server/src/app/admin/custom-js/CustomJsEditorPanel.tsx +7 -1
  29. package/apps/agents-server/src/app/admin/custom-js/CustomJsFilesPanel.tsx +7 -1
  30. package/apps/agents-server/src/app/admin/files/FilesGalleryClient.tsx +4 -0
  31. package/apps/agents-server/src/app/admin/files/FilesGalleryGrid.tsx +9 -11
  32. package/apps/agents-server/src/app/admin/files/FilesGalleryTable.tsx +9 -8
  33. package/apps/agents-server/src/app/admin/image-generator-test/ImageAttachmentsEditor.tsx +30 -9
  34. package/apps/agents-server/src/app/admin/images/ImagesGalleryClient.tsx +4 -0
  35. package/apps/agents-server/src/app/admin/images/ImagesGalleryGrid.tsx +16 -11
  36. package/apps/agents-server/src/app/admin/images/ImagesGalleryTable.tsx +18 -9
  37. package/apps/agents-server/src/app/admin/limits/LimitsClient.tsx +11 -12
  38. package/apps/agents-server/src/app/admin/login-methods/shibboleth/page.tsx +355 -0
  39. package/apps/agents-server/src/app/admin/logs/LogsClient.tsx +9 -3
  40. package/apps/agents-server/src/app/admin/messages/MessagesClient.tsx +7 -6
  41. package/apps/agents-server/src/app/admin/metadata/MetadataClient.tsx +671 -45
  42. package/apps/agents-server/src/app/admin/servers/CreateServerDialog.tsx +22 -1
  43. package/apps/agents-server/src/app/admin/servers/ServersRegistryTable.tsx +14 -13
  44. package/apps/agents-server/src/app/admin/servers/useCreateServerWizard.ts +57 -20
  45. package/apps/agents-server/src/app/admin/task-manager/TaskManagerClient.tsx +4 -2
  46. package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +14 -15
  47. package/apps/agents-server/src/app/admin/task-manager/TaskManagerTasksCard.tsx +4 -1
  48. package/apps/agents-server/src/app/admin/task-manager/useTaskManagerState.ts +6 -9
  49. package/apps/agents-server/src/app/admin/update/CustomCommitPicker.tsx +258 -0
  50. package/apps/agents-server/src/app/admin/update/UpdateClient.tsx +627 -137
  51. package/apps/agents-server/src/app/admin/usage/UsageClient.tsx +4 -2
  52. package/apps/agents-server/src/app/admin/usage/UsageClientAnalyticsPanels.tsx +6 -4
  53. package/apps/agents-server/src/app/admin/usage/UsageClientFormatting.ts +6 -12
  54. package/apps/agents-server/src/app/admin/usage/UsageClientTimelineChart.tsx +7 -4
  55. package/apps/agents-server/src/app/admin/usage/useUsageClientState.ts +12 -4
  56. package/apps/agents-server/src/app/admin/users/[userId]/UserDetailClient.tsx +27 -15
  57. package/apps/agents-server/src/app/agents/[agentName]/ActiveAgentBreadcrumbBinder.tsx +30 -0
  58. package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +13 -2
  59. package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +20 -25
  60. package/apps/agents-server/src/app/agents/[agentName]/_utils.ts +7 -5
  61. package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +2 -0
  62. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/messages/route.ts +4 -11
  63. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/stream/route.ts +85 -56
  64. package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorWrapper.tsx +7 -1
  65. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorHistory.ts +9 -2
  66. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistoryPayloadState.ts +38 -4
  67. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistorySyncOperations.ts +4 -1
  68. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatPageLayout.tsx +2 -2
  69. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatSidebarDefault.tsx +19 -13
  70. package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +30 -16
  71. package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatHistoryClientState.ts +2 -15
  72. package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatHistorySyncEffects.ts +7 -13
  73. package/apps/agents-server/src/app/agents/[agentName]/chat/useCanonicalAgentChatPanelState.ts +58 -7
  74. package/apps/agents-server/src/app/agents/[agentName]/history/page.tsx +6 -1
  75. package/apps/agents-server/src/app/agents/[agentName]/images/default-avatar.png/route.ts +6 -2
  76. package/apps/agents-server/src/app/agents/[agentName]/integration/CalendarIntegrationSection.tsx +23 -5
  77. package/apps/agents-server/src/app/agents/[agentName]/layout.tsx +47 -1
  78. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsClient.tsx +4 -2
  79. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsFiltersCard.tsx +9 -4
  80. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableCard.tsx +4 -1
  81. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableRow.tsx +10 -3
  82. package/apps/agents-server/src/app/api/admin/cli-access/route.ts +27 -123
  83. package/apps/agents-server/src/app/api/admin/code-runners/authentication/route.ts +33 -125
  84. package/apps/agents-server/src/app/api/admin/code-runners/route.ts +1 -1
  85. package/apps/agents-server/src/app/api/admin/servers/route.ts +5 -0
  86. package/apps/agents-server/src/app/api/admin/update/commits/route.ts +35 -0
  87. package/apps/agents-server/src/app/api/admin/update/log/route.ts +42 -0
  88. package/apps/agents-server/src/app/api/admin/update/route.ts +10 -2
  89. package/apps/agents-server/src/app/api/agent-folders/[folderId]/visibility/route.ts +19 -7
  90. package/apps/agents-server/src/app/api/agents/[agentName]/route.ts +39 -25
  91. package/apps/agents-server/src/app/api/agents/export/route.ts +67 -0
  92. package/apps/agents-server/src/app/api/agents/import/route.ts +168 -0
  93. package/apps/agents-server/src/app/api/auth/change-password/route.ts +53 -6
  94. package/apps/agents-server/src/app/api/auth/login/route.ts +17 -16
  95. package/apps/agents-server/src/app/api/auth/logout/route.ts +2 -10
  96. package/apps/agents-server/src/app/api/auth/shibboleth/acs/route.ts +112 -0
  97. package/apps/agents-server/src/app/api/auth/shibboleth/login/route.ts +70 -0
  98. package/apps/agents-server/src/app/api/auth/shibboleth/metadata/route.ts +15 -0
  99. package/apps/agents-server/src/app/api/auth/shibboleth/status/route.ts +17 -0
  100. package/apps/agents-server/src/app/api/chat/citation-label/route.ts +133 -0
  101. package/apps/agents-server/src/app/api/chat/export/pdf/route.ts +167 -2
  102. package/apps/agents-server/src/app/api/chat/route.ts +29 -7
  103. package/apps/agents-server/src/app/api/chat-feedback/export/route.ts +2 -2
  104. package/apps/agents-server/src/app/api/chat-feedback/route.ts +3 -3
  105. package/apps/agents-server/src/app/api/chat-history/[id]/route.ts +2 -2
  106. package/apps/agents-server/src/app/api/chat-history/export/route.ts +2 -2
  107. package/apps/agents-server/src/app/api/chat-history/route.ts +3 -3
  108. package/apps/agents-server/src/app/api/chat-streaming/route.ts +29 -0
  109. package/apps/agents-server/src/app/api/elevenlabs/tts/route.ts +60 -2
  110. package/apps/agents-server/src/app/api/emails/incoming/sendgrid/route.ts +24 -2
  111. package/apps/agents-server/src/app/api/federated-agents/route.ts +1 -1
  112. package/apps/agents-server/src/app/api/health/route.ts +18 -0
  113. package/apps/agents-server/src/app/api/images/[filename]/route.ts +108 -2
  114. package/apps/agents-server/src/app/api/internal/agent-runner-limits/route.ts +52 -0
  115. package/apps/agents-server/src/app/api/internal/user-chat-jobs/run/route.ts +17 -4
  116. package/apps/agents-server/src/app/api/metadata/export/route.ts +34 -0
  117. package/apps/agents-server/src/app/api/metadata/import/route.ts +47 -0
  118. package/apps/agents-server/src/app/api/metadata/route.ts +4 -0
  119. package/apps/agents-server/src/app/api/openai/v1/audio/transcriptions/route.ts +111 -2
  120. package/apps/agents-server/src/app/api/page-preview/check/route.ts +49 -0
  121. package/apps/agents-server/src/app/api/page-preview/screenshot/route.ts +64 -0
  122. package/apps/agents-server/src/app/api/scrape/route.ts +18 -0
  123. package/apps/agents-server/src/app/api/team-agent-profile/route.ts +20 -0
  124. package/apps/agents-server/src/app/api/upload/route.ts +204 -220
  125. package/apps/agents-server/src/app/api/users/[username]/route.ts +3 -2
  126. package/apps/agents-server/src/app/api/users/route.ts +8 -7
  127. package/apps/agents-server/src/app/api/v1/agents/[agentId]/route.ts +17 -8
  128. package/apps/agents-server/src/app/api/v1/agents/route.ts +2 -0
  129. package/apps/agents-server/src/app/dashboard/page.tsx +12 -17
  130. package/apps/agents-server/src/app/docs/[docId]/page.tsx +1 -1
  131. package/apps/agents-server/src/app/docs/page.tsx +1 -1
  132. package/apps/agents-server/src/app/globals.css +179 -0
  133. package/apps/agents-server/src/app/layout.tsx +33 -4
  134. package/apps/agents-server/src/app/recycle-bin/actions.ts +3 -0
  135. package/apps/agents-server/src/app/recycle-bin/page.tsx +1 -1
  136. package/apps/agents-server/src/app/s3/[first]/[second]/[hash]/[filename]/route.ts +52 -0
  137. package/apps/agents-server/src/app/swagger/SwaggerApiKeysPanel.tsx +4 -1
  138. package/apps/agents-server/src/app/system/settings/KeybindingsSettingsClient.tsx +13 -7
  139. package/apps/agents-server/src/app/system/user-memory/UserMemoryClient.tsx +4 -2
  140. package/apps/agents-server/src/app/system/user-wallet/UserWalletClient.tsx +3 -0
  141. package/apps/agents-server/src/app/system/user-wallet/UserWalletRecordsTable.tsx +5 -1
  142. package/apps/agents-server/src/app/system/utilities/mocked-chats/MockedChatsEditorClient.tsx +3 -0
  143. package/apps/agents-server/src/app/system/utilities/mocked-chats/MockedChatsEditorSidebar.tsx +7 -8
  144. package/apps/agents-server/src/components/AdminTerminal/AdminTerminalCard.tsx +13 -70
  145. package/apps/agents-server/src/components/AdminTerminal/AdminXtermTerminal.tsx +330 -0
  146. package/apps/agents-server/src/components/AdminTerminal/useAdminTerminalSession.ts +45 -5
  147. package/apps/agents-server/src/components/AgentContextMenu/useAgentContextMenuItems.ts +27 -19
  148. package/apps/agents-server/src/components/AgentProfile/AgentCapabilityChips.tsx +39 -5
  149. package/apps/agents-server/src/components/AgentProfile/AgentProfile.tsx +4 -7
  150. package/apps/agents-server/src/components/AgentProfile/AgentProfileImage.tsx +8 -2
  151. package/apps/agents-server/src/components/ApplicationErrorPage/ApplicationErrorPage.tsx +118 -12
  152. package/apps/agents-server/src/components/DocsToolbar/DocsToolbar.tsx +4 -4
  153. package/apps/agents-server/src/components/DocumentationContent/DocumentationContent.tsx +9 -9
  154. package/apps/agents-server/src/components/FileUploadAvailability/FileUploadAvailabilityContext.tsx +50 -0
  155. package/apps/agents-server/src/components/FileUploadAvailability/FileUploadUnavailableNotice.tsx +45 -0
  156. package/apps/agents-server/src/components/Footer/Footer.tsx +10 -9
  157. package/apps/agents-server/src/components/Footer/getCommitFooterEmoji.ts +112 -0
  158. package/apps/agents-server/src/components/Header/ActiveAgentBreadcrumbContext.tsx +82 -0
  159. package/apps/agents-server/src/components/Header/Header.tsx +24 -15
  160. package/apps/agents-server/src/components/Header/HeaderTypes.ts +6 -0
  161. package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +51 -1
  162. package/apps/agents-server/src/components/Header/useHeaderActiveAgent.ts +26 -7
  163. package/apps/agents-server/src/components/Header/useHeaderAgentMenus.tsx +0 -5
  164. package/apps/agents-server/src/components/Homepage/AgentCard.tsx +7 -1
  165. package/apps/agents-server/src/components/Homepage/AgentsList.tsx +22 -1
  166. package/apps/agents-server/src/components/Homepage/AgentsListHeader.tsx +85 -1
  167. package/apps/agents-server/src/components/Homepage/AgentsListListView.tsx +6 -0
  168. package/apps/agents-server/src/components/Homepage/AgentsListViewContent.tsx +6 -0
  169. package/apps/agents-server/src/components/Homepage/Card.tsx +1 -1
  170. package/apps/agents-server/src/components/Homepage/Section.tsx +3 -1
  171. package/apps/agents-server/src/components/Homepage/SortableFolderCard.tsx +7 -1
  172. package/apps/agents-server/src/components/Homepage/hiddenFolders.ts +104 -0
  173. package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +525 -0
  174. package/apps/agents-server/src/components/Homepage/useAgentsListQueryState.ts +35 -0
  175. package/apps/agents-server/src/components/Homepage/useAgentsListState.ts +38 -4
  176. package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +93 -70
  177. package/apps/agents-server/src/components/LoginForm/LoginForm.tsx +52 -12
  178. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/ManGoNewAgentWizard.tsx +151 -0
  179. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/ManGoOnboardingNavigation.tsx +50 -0
  180. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/BookLanguagePanel.tsx +125 -0
  181. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/DropZone.tsx +83 -0
  182. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/EmailTestRun.tsx +216 -0
  183. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/KnowledgeList.tsx +79 -0
  184. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/Logo.tsx +20 -0
  185. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/MarkdownBookEditor.tsx +154 -0
  186. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/MarkdownPreview.tsx +188 -0
  187. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/RailStepper.tsx +115 -0
  188. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/StepFrame.tsx +47 -0
  189. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/TestChat.tsx +159 -0
  190. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/WizardShell.tsx +114 -0
  191. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/brand/RailArtwork.tsx +60 -0
  192. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/BookStep.tsx +135 -0
  193. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/DoneStep.tsx +215 -0
  194. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/KnowledgeStep.tsx +152 -0
  195. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/TestStep.tsx +262 -0
  196. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/steps/ZadaniStep.tsx +64 -0
  197. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Badge.tsx +41 -0
  198. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Banner.tsx +69 -0
  199. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Button.tsx +77 -0
  200. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Card.tsx +33 -0
  201. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Field.tsx +103 -0
  202. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/IconButton.tsx +40 -0
  203. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/Spinner.tsx +14 -0
  204. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/components/ui/tokens.ts +37 -0
  205. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/config/bookSections.ts +62 -0
  206. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/config/emailScenarios.ts +22 -0
  207. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/config/steps.ts +46 -0
  208. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/index.ts +11 -0
  209. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/lib/cn.ts +4 -0
  210. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/lib/format.ts +9 -0
  211. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/lib/id.ts +11 -0
  212. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/agentEvalService.ts +30 -0
  213. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/agentTestService.ts +69 -0
  214. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/bookService.ts +21 -0
  215. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/createManGoAgentSource.ts +107 -0
  216. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/draftService.ts +45 -0
  217. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/services/uploadService.ts +27 -0
  218. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/state/OnboardingProvider.tsx +121 -0
  219. package/apps/agents-server/src/components/NewAgentDialog/ManGoNewAgentWizard/types.ts +52 -0
  220. package/apps/agents-server/src/components/NewAgentDialog/NewAgentDialog.tsx +7 -3
  221. package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardKnowledgeStep.tsx +6 -0
  222. package/apps/agents-server/src/components/NewAgentDialog/createNewAgentWizardSource.ts +1 -1
  223. package/apps/agents-server/src/components/NewAgentDialog/trackNewAgentCreationEvent.ts +1 -1
  224. package/apps/agents-server/src/components/NewAgentDialog/useNewAgentDialog.tsx +113 -14
  225. package/apps/agents-server/src/components/NewAgentDialog/useNewAgentWizardKnowledgeState.ts +8 -1
  226. package/apps/agents-server/src/components/PrintHeader/PrintHeader.tsx +4 -2
  227. package/apps/agents-server/src/components/Skeleton/ConsolePageLoadingSkeleton.tsx +1 -1
  228. package/apps/agents-server/src/components/Skeleton/DocumentationRouteLoadingSkeleton.tsx +1 -1
  229. package/apps/agents-server/src/components/Skeleton/HomepageLoadingSkeleton.tsx +1 -1
  230. package/apps/agents-server/src/components/UsersList/UsersList.tsx +24 -6
  231. package/apps/agents-server/src/components/UsersList/useUsersAdmin.ts +2 -7
  232. package/apps/agents-server/src/constants/defaultAgentAvatarVisual.ts +1 -1
  233. package/apps/agents-server/src/constants/newAgentWizard.ts +17 -8
  234. package/apps/agents-server/src/constants/serverLimits.ts +41 -2
  235. package/apps/agents-server/src/constants/shibbolethAuth.ts +139 -0
  236. package/apps/agents-server/src/database/$provideClientSql.ts +37 -0
  237. package/apps/agents-server/src/database/$provideSupabaseForServer.ts +41 -0
  238. package/apps/agents-server/src/database/customJavascript.ts +62 -1
  239. package/apps/agents-server/src/database/customStylesheet.ts +60 -1
  240. package/apps/agents-server/src/database/getMetadata.ts +121 -4
  241. package/apps/agents-server/src/database/loadAgentsServerEnvFile.ts +29 -0
  242. package/apps/agents-server/src/database/metadataDefaults.ts +85 -31
  243. package/apps/agents-server/src/database/migrate.ts +8 -2
  244. package/apps/agents-server/src/database/migrations/2026-06-0100-shibboleth-auth.sql +136 -0
  245. package/apps/agents-server/src/database/migrations/2026-06-0200-default-agent-avatar-visual-octopus3d3.sql +16 -0
  246. package/apps/agents-server/src/database/migrations/2026-06-1300-user-chat-active-read-indexes.sql +7 -0
  247. package/apps/agents-server/src/database/migrations/2026-06-2200-new-agent-wizard-metadata-key.sql +27 -0
  248. package/apps/agents-server/src/database/migrations/2026-06-2201-new-agent-wizard-mango-default.sql +11 -0
  249. package/apps/agents-server/src/database/migrations/2026-06-2600-agent-directory-performance-indexes.sql +14 -0
  250. package/apps/agents-server/src/database/migrations/2026-06-2700-default-agent-avatar-visual-octopus3d4.sql +16 -0
  251. package/apps/agents-server/src/database/seedCoreAgents.ts +234 -0
  252. package/apps/agents-server/src/database/seedDefaultAgents.ts +223 -0
  253. package/apps/agents-server/src/database/sqlite/$provideLocalSqliteSupabase.ts +234 -41
  254. package/apps/agents-server/src/generated/reservedPaths.ts +3 -0
  255. package/apps/agents-server/src/instrumentation-client.ts +28 -0
  256. package/apps/agents-server/src/instrumentation.ts +19 -0
  257. package/apps/agents-server/src/languages/ServerTranslationKeys.ts +4 -0
  258. package/apps/agents-server/src/languages/translations/czech.yaml +5 -1
  259. package/apps/agents-server/src/languages/translations/english.yaml +5 -1
  260. package/apps/agents-server/src/message-providers/email/sendgrid/verifySendgridInboundParseWebhook.ts +345 -0
  261. package/apps/agents-server/src/middleware/applyEmbeddingHeader.ts +4 -2
  262. package/apps/agents-server/src/middleware/contentSecurityPolicy.ts +97 -0
  263. package/apps/agents-server/src/middleware/resolveAccessControlResponse.ts +3 -2
  264. package/apps/agents-server/src/middleware/resolveMiddlewareResponse.ts +8 -3
  265. package/apps/agents-server/src/middleware.ts +15 -32
  266. package/apps/agents-server/src/search/createDefaultServerSearchProviders/createFederatedAgentsSearchProvider.ts +1 -1
  267. package/apps/agents-server/src/sentry.edge.config.ts +18 -0
  268. package/apps/agents-server/src/sentry.server.config.ts +19 -0
  269. package/apps/agents-server/src/tools/$provideAgentCollectionForServer.ts +2 -9
  270. package/apps/agents-server/src/tools/$provideCdnForServer.ts +187 -15
  271. package/apps/agents-server/src/tools/BrowserConnectionProvider.ts +2 -19
  272. package/apps/agents-server/src/tools/agent_progress.ts +4 -10
  273. package/apps/agents-server/src/tools/createAgentProgressTools.ts +8 -4
  274. package/apps/agents-server/src/tools/createChatAttachmentToolFunctions.ts +8 -4
  275. package/apps/agents-server/src/tools/createServerChromiumLaunchOptions.ts +44 -0
  276. package/apps/agents-server/src/utils/agentOwnership.ts +54 -5
  277. package/apps/agents-server/src/utils/agentRouting/resolveAgentRouteTarget.ts +101 -19
  278. package/apps/agents-server/src/utils/agentVisibility.ts +25 -62
  279. package/apps/agents-server/src/utils/agentsTransfer/createAgentsExportZipStream.ts +81 -0
  280. package/apps/agents-server/src/utils/agentsTransfer/importAgentsFromFiles.ts +852 -0
  281. package/apps/agents-server/src/utils/assertSafeUrl.ts +136 -0
  282. package/apps/agents-server/src/utils/authenticateUser.ts +112 -4
  283. package/apps/agents-server/src/utils/authenticationAttemptRateLimit.ts +504 -0
  284. package/apps/agents-server/src/utils/backup/createBooksBackupZipStream.ts +91 -7
  285. package/apps/agents-server/src/utils/cdn/classes/DigitalOceanSpaces.ts +48 -4
  286. package/apps/agents-server/src/utils/cdn/classes/TrackedFilesStorage.ts +6 -5
  287. package/apps/agents-server/src/utils/cdn/interfaces/IFilesStorage.ts +5 -0
  288. package/apps/agents-server/src/utils/cdn/utils/getUserFileCdnKey.ts +10 -3
  289. package/apps/agents-server/src/utils/chat/resolveAgentsServerCitationLabel.ts +130 -0
  290. package/apps/agents-server/src/utils/chat/resolveCitationSourceLabel.ts +436 -0
  291. package/apps/agents-server/src/utils/chatExport/renderHtmlToPdfOnServer.ts +66 -17
  292. package/apps/agents-server/src/utils/chatExport/sanitizeChatPdfExportHtml.ts +193 -0
  293. package/apps/agents-server/src/utils/codeRunnerConfiguration.ts +1 -1
  294. package/apps/agents-server/src/utils/createAdminTerminalRouteHandlers.ts +264 -0
  295. package/apps/agents-server/src/utils/createAgentWithDefaultVisibility.ts +3 -1
  296. package/apps/agents-server/src/utils/currentUserIdentity.ts +22 -9
  297. package/apps/agents-server/src/utils/defaultAgents/loadDefaultAgentBooks.ts +145 -0
  298. package/apps/agents-server/src/utils/errorReporting/agentsServerSentryContext.ts +203 -0
  299. package/apps/agents-server/src/utils/errorReporting/applicationErrorHandling.ts +45 -0
  300. package/apps/agents-server/src/utils/errorReporting/refreshApplicationDocument.ts +10 -0
  301. package/apps/agents-server/src/utils/errorReporting/registerServerErrorSentryLogging.ts +381 -0
  302. package/apps/agents-server/src/utils/errorReporting/sendApplicationErrorReportToSentry.ts +43 -152
  303. package/apps/agents-server/src/utils/errorReporting/sentrySdkConfig.ts +237 -0
  304. package/apps/agents-server/src/utils/errorReporting/sentryStore.ts +187 -0
  305. package/apps/agents-server/src/utils/externalChatRunner/createExternalAgentRepositoryFiles.ts +2 -2
  306. package/apps/agents-server/src/utils/externalChatRunner/processExternalUserChatJob.ts +15 -8
  307. package/apps/agents-server/src/utils/findAgentForCallerWriteAccess.ts +36 -0
  308. package/apps/agents-server/src/utils/getCurrentUser.ts +2 -1
  309. package/apps/agents-server/src/utils/getFederatedServers.ts +3 -74
  310. package/apps/agents-server/src/utils/getUserById.ts +19 -5
  311. package/apps/agents-server/src/utils/getWellKnownAgentUrl.ts +10 -4
  312. package/apps/agents-server/src/utils/iframe/checkIfUrlCanBeEmbedded.ts +68 -0
  313. package/apps/agents-server/src/utils/interactiveTerminalSession.ts +9 -4
  314. package/apps/agents-server/src/utils/isAdminPasswordEqual.ts +28 -0
  315. package/apps/agents-server/src/utils/isUserGlobalAdmin.ts +3 -1
  316. package/apps/agents-server/src/utils/knowledge/createInlineKnowledgeSourceUploader.ts +24 -5
  317. package/apps/agents-server/src/utils/knowledge/resolveWebsiteKnowledgeSourcesForServer.ts +10 -1
  318. package/apps/agents-server/src/utils/localChatRunner/LocalUserChatJobMetadata.ts +15 -5
  319. package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +24 -18
  320. package/apps/agents-server/src/utils/localization/formatServerLanguageHumanReadableDate.ts +70 -0
  321. package/apps/agents-server/src/utils/localization/getRequestServerLanguage.ts +32 -0
  322. package/apps/agents-server/src/utils/metadataConfigurationTransfer.ts +442 -0
  323. package/apps/agents-server/src/utils/paidApiRequestGuard.ts +241 -0
  324. package/apps/agents-server/src/utils/publicUser.ts +59 -0
  325. package/apps/agents-server/src/utils/serverLimits.ts +28 -1
  326. package/apps/agents-server/src/utils/serverManagement/createManagedServer/bootstrapManagedServer.ts +5 -6
  327. package/apps/agents-server/src/utils/serverManagement/createManagedServer/normalizeCreateServerInput.ts +6 -0
  328. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerCoreAgents.ts +162 -0
  329. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +7 -87
  330. package/apps/agents-server/src/utils/serverManagement/createManagedServer.ts +5 -0
  331. package/apps/agents-server/src/utils/session.ts +72 -30
  332. package/apps/agents-server/src/utils/shareTargetPayloads.ts +37 -66
  333. package/apps/agents-server/src/utils/shibbolethAuthentication.ts +957 -0
  334. package/apps/agents-server/src/utils/transpilers/resolveTranspiledTeamExport.ts +10 -10
  335. package/apps/agents-server/src/utils/upload/createBookEditorUploadHandler.ts +19 -28
  336. package/apps/agents-server/src/utils/upload/fileUploadAvailability.ts +91 -0
  337. package/apps/agents-server/src/utils/upload/uploadFileToServer.ts +157 -0
  338. package/apps/agents-server/src/utils/userChat/createImmediateUserChatAnswerModelRequirements.ts +26 -12
  339. package/apps/agents-server/src/utils/userChat/createRunUserChatJobExecutionContext.ts +45 -0
  340. package/apps/agents-server/src/utils/userChat/createRunUserChatJobPersistenceController.ts +17 -11
  341. package/apps/agents-server/src/utils/userChat/createUserChatDetailPayload.ts +33 -18
  342. package/apps/agents-server/src/utils/userChat/createUserChatHarnessProgressCard.ts +93 -0
  343. package/apps/agents-server/src/utils/userChat/createUserChatRunnerProgressCard.ts +57 -0
  344. package/apps/agents-server/src/utils/userChat/hasPotentiallyPendingAssistantMessages.ts +26 -0
  345. package/apps/agents-server/src/utils/userChat/listUserChats.ts +117 -6
  346. package/apps/agents-server/src/utils/userChat/persistUserChatJobProgressCard.ts +40 -0
  347. package/apps/agents-server/src/utils/userChat/resolveUserChatProgressToolHighlights.ts +100 -0
  348. package/apps/agents-server/src/utils/userChat/resolveUserChatWorkerInternalToken.ts +63 -9
  349. package/apps/agents-server/src/utils/userChat/runImmediateUserChatAnswer.ts +1 -1
  350. package/apps/agents-server/src/utils/userChat/runUserChatJob.ts +30 -0
  351. package/apps/agents-server/src/utils/userChat/triggerUserChatJobWorker.ts +54 -19
  352. package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +69 -1
  353. package/apps/agents-server/src/utils/userChat/userChatProgressCard.ts +360 -0
  354. package/apps/agents-server/src/utils/validateApiKey.ts +7 -3
  355. package/apps/agents-server/src/utils/vpsConfiguration.ts +8 -1
  356. package/apps/agents-server/src/utils/vpsSelfUpdate.ts +935 -64
  357. package/esm/apps/agents-server/src/constants/federatedAgentImport.d.ts +42 -0
  358. package/esm/apps/agents-server/src/constants/serverLimits.d.ts +224 -0
  359. package/esm/apps/agents-server/src/constants/toolUsageLimits.d.ts +55 -0
  360. package/esm/index.es.js +24308 -18655
  361. package/esm/index.es.js.map +1 -1
  362. package/esm/scripts/run-agent-chat/executeAgentChatTurn.d.ts +28 -0
  363. package/esm/scripts/run-agent-chat/runAgentChat.d.ts +5 -0
  364. package/esm/scripts/run-agent-chat/runAgentExec.d.ts +11 -0
  365. package/esm/scripts/run-agent-messages/main/AgentMessageFailureTracker.d.ts +27 -0
  366. package/esm/scripts/run-agent-messages/main/handleAgentWatchError.d.ts +4 -0
  367. package/esm/scripts/run-agent-messages/main/runAgentMessages.d.ts +1 -0
  368. package/esm/scripts/run-agent-messages/main/runMultipleAgentMessages.d.ts +1 -0
  369. package/esm/scripts/run-agent-messages/main/tickAgentMessages.d.ts +1 -0
  370. package/esm/scripts/run-agent-messages/messages/createAgentRunnerSystemMessage.d.ts +10 -0
  371. package/esm/scripts/run-agent-messages/messages/moveAgentMessageToFailed.d.ts +17 -0
  372. package/esm/scripts/run-codex-prompts/common/buildCoderRunProgressSnapshot.d.ts +5 -1
  373. package/esm/scripts/run-codex-prompts/common/cliProgressDisplay.d.ts +7 -0
  374. package/esm/scripts/run-codex-prompts/common/coderRunEstimateCache.d.ts +31 -0
  375. package/esm/scripts/run-codex-prompts/common/parseDuration.d.ts +19 -0
  376. package/esm/scripts/run-codex-prompts/common/progressFormatting.d.ts +2 -0
  377. package/esm/scripts/run-codex-prompts/common/resolveAgentSystemMessage.d.ts +6 -0
  378. package/esm/scripts/run-codex-prompts/common/resolveInlineOrFileText.d.ts +14 -0
  379. package/esm/scripts/run-codex-prompts/common/runGoScript/printLiveScriptChunk.d.ts +4 -0
  380. package/esm/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +27 -0
  381. package/esm/scripts/run-codex-prompts/common/waitForPause.d.ts +12 -0
  382. package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +3 -1
  383. package/esm/scripts/run-codex-prompts/main/findUnwrittenPrompts.d.ts +19 -0
  384. package/esm/scripts/run-codex-prompts/main/runCodexPromptsServer.d.ts +27 -0
  385. package/esm/scripts/run-codex-prompts/main/runPromptRound.d.ts +5 -3
  386. package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +3 -1
  387. package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +50 -0
  388. package/esm/scripts/run-codex-prompts/server/buildCoderServerRunState.d.ts +23 -0
  389. package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +9 -0
  390. package/esm/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +35 -0
  391. package/esm/scripts/run-codex-prompts/server/updatePromptSection.d.ts +9 -0
  392. package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +8 -0
  393. package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +1 -0
  394. package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +5 -1
  395. package/esm/scripts/run-codex-prompts/ui/renderCoderRunUi.d.ts +1 -0
  396. package/esm/src/_packages/components.index.d.ts +4 -0
  397. package/esm/src/_packages/core.index.d.ts +22 -2
  398. package/esm/src/_packages/node.index.d.ts +40 -0
  399. package/esm/src/_packages/types.index.d.ts +20 -0
  400. package/esm/src/avatars/avatarAnimationScheduler.d.ts +4 -0
  401. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  402. package/esm/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
  403. package/esm/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
  404. package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -0
  405. package/esm/src/book-2.0/agent-source/agentSourceVisibility.d.ts +97 -0
  406. package/esm/src/book-2.0/agent-source/agentSourceVisibility.test.d.ts +1 -0
  407. package/esm/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
  408. package/esm/src/book-3.0/CliAgent.d.ts +66 -0
  409. package/esm/src/book-3.0/CliAgent.test.d.ts +1 -0
  410. package/esm/src/book-3.0/LiteAgent.d.ts +68 -0
  411. package/esm/src/book-3.0/LiteAgent.test.d.ts +1 -0
  412. package/esm/src/book-3.0/agentFolderPaths.d.ts +30 -0
  413. package/esm/src/book-3.0/cliAgentEnv.d.ts +33 -0
  414. package/esm/src/book-components/BookEditor/BookEditor.d.ts +6 -5
  415. package/esm/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
  416. package/esm/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
  417. package/esm/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
  418. package/esm/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +2 -0
  419. package/esm/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
  420. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
  421. package/esm/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
  422. package/esm/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
  423. package/esm/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
  424. package/esm/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
  425. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
  426. package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
  427. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
  428. package/esm/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
  429. package/esm/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
  430. package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
  431. package/esm/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
  432. package/esm/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
  433. package/esm/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
  434. package/esm/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
  435. package/esm/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
  436. package/esm/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
  437. package/esm/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
  438. package/esm/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
  439. package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
  440. package/esm/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
  441. package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
  442. package/esm/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
  443. package/esm/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
  444. package/esm/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
  445. package/esm/src/book-components/_common/Modal/Modal.d.ts +1 -1
  446. package/esm/src/book-components/icons/AboutIcon.d.ts +1 -1
  447. package/esm/src/book-components/icons/DownloadIcon.d.ts +1 -1
  448. package/esm/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
  449. package/esm/src/book-components/icons/FullscreenIcon.d.ts +1 -1
  450. package/esm/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
  451. package/esm/src/cli/cli-commands/agent/chat.d.ts +10 -0
  452. package/esm/src/cli/cli-commands/agent/exec.d.ts +10 -0
  453. package/esm/src/cli/cli-commands/agent/run.test.d.ts +1 -0
  454. package/esm/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
  455. package/esm/src/cli/cli-commands/agent.d.ts +14 -0
  456. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +23 -1
  457. package/esm/src/cli/cli-commands/agents-server/run.d.ts +6 -0
  458. package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
  459. package/esm/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
  460. package/esm/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
  461. package/esm/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
  462. package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
  463. package/esm/src/cli/cli-commands/coder/server.d.ts +13 -0
  464. package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
  465. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
  466. package/esm/src/collection/agent-collection/CreateAgentInput.d.ts +2 -1
  467. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
  468. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +21 -1
  469. package/esm/src/commitments/META_VISIBILITY/META_VISIBILITY.d.ts +27 -0
  470. package/esm/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
  471. package/esm/src/commitments/index.d.ts +2 -1
  472. package/esm/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  473. package/esm/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
  474. package/esm/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
  475. package/esm/src/utils/isTimingSafeEqualString.d.ts +25 -0
  476. package/esm/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
  477. package/esm/src/version.d.ts +1 -1
  478. package/package.json +6 -1
  479. package/servers.ts +1 -16
  480. package/src/_packages/components.index.ts +4 -0
  481. package/src/_packages/core.index.ts +22 -2
  482. package/src/_packages/node.index.ts +40 -0
  483. package/src/_packages/types.index.ts +20 -0
  484. package/src/avatars/avatarAnimationScheduler.ts +76 -4
  485. package/src/avatars/types/AvatarVisualDefinition.ts +2 -0
  486. package/src/avatars/visuals/avatarVisualRegistry.ts +4 -0
  487. package/src/avatars/visuals/fractalAvatarVisual.ts +5 -4
  488. package/src/avatars/visuals/minecraft2AvatarVisual.ts +16 -11
  489. package/src/avatars/visuals/minecraftAvatarVisual.ts +21 -7
  490. package/src/avatars/visuals/octopus3d2AvatarVisual.ts +175 -38
  491. package/src/avatars/visuals/octopus3d3AvatarVisual.ts +1068 -0
  492. package/src/avatars/visuals/octopus3d4AvatarVisual.ts +1295 -0
  493. package/src/avatars/visuals/octopus3dAvatarVisual.ts +69 -17
  494. package/src/book-2.0/agent-source/AgentBasicInformation.ts +2 -0
  495. package/src/book-2.0/agent-source/agentSourceVisibility.ts +214 -0
  496. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.ts +18 -2
  497. package/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.ts +17 -0
  498. package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +1 -0
  499. package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +7 -1
  500. package/src/book-3.0/Book.ts +3 -1
  501. package/src/book-3.0/BookNodeAgentSource.ts +135 -0
  502. package/src/book-3.0/CliAgent.ts +252 -0
  503. package/src/book-3.0/LiteAgent.ts +468 -0
  504. package/src/book-3.0/agentFolderPaths.ts +38 -0
  505. package/src/book-3.0/cliAgentEnv.ts +46 -0
  506. package/src/book-components/BookEditor/BookEditor.module.css +61 -0
  507. package/src/book-components/BookEditor/BookEditor.tsx +16 -13
  508. package/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.tsx +72 -0
  509. package/src/book-components/BookEditor/BookEditorActionbar.tsx +35 -5
  510. package/src/book-components/BookEditor/BookEditorBrowserConfig.ts +11 -0
  511. package/src/book-components/BookEditor/BookEditorForClient.tsx +33 -0
  512. package/src/book-components/BookEditor/BookEditorMonaco.tsx +4 -2
  513. package/src/book-components/BookEditor/BookEditorMonacoTokenization.ts +89 -27
  514. package/src/book-components/BookEditor/BookEditorTheme.ts +32 -0
  515. package/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.ts +11 -0
  516. package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +62 -92
  517. package/src/book-components/BookEditor/useBookEditorMonacoLifecycle.ts +1 -5
  518. package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +3 -2
  519. package/src/book-components/BookEditor/useBookEditorMonacoUploads.ts +1 -1
  520. package/src/book-components/Chat/Chat/Chat.module.css +50 -0
  521. package/src/book-components/Chat/Chat/Chat.tsx +4 -0
  522. package/src/book-components/Chat/Chat/ChatCitationModal.tsx +19 -5
  523. package/src/book-components/Chat/Chat/ChatMessageItem.tsx +22 -2
  524. package/src/book-components/Chat/Chat/ChatMessageList.tsx +6 -0
  525. package/src/book-components/Chat/Chat/ChatProps.tsx +6 -0
  526. package/src/book-components/Chat/Chat/ChatToolCallModal.tsx +4 -0
  527. package/src/book-components/Chat/Chat/ChatToolCallModalContent.tsx +4 -0
  528. package/src/book-components/Chat/Chat/CitationIframePreview.tsx +78 -0
  529. package/src/book-components/Chat/Chat/TeamToolCallModalContent.tsx +16 -3
  530. package/src/book-components/Chat/Chat/createChatMessageToolCallRenderModel.ts +2 -9
  531. package/src/book-components/Chat/Chat/useChatPostprocessedMessages.ts +13 -2
  532. package/src/book-components/Chat/MarkdownContent/MarkdownContent.tsx +63 -4
  533. package/src/book-components/Chat/SourceChip/SourceChip.module.css +8 -0
  534. package/src/book-components/Chat/SourceChip/SourceChip.tsx +19 -5
  535. package/src/book-components/Chat/hooks/useResolvedCitationLabel.ts +65 -0
  536. package/src/book-components/Chat/save/html/htmlSaveFormatDefinition.ts +315 -88
  537. package/src/book-components/Chat/save/react/reactSaveFormatDefinition.ts +7 -1
  538. package/src/book-components/Chat/types/ChatMessage.ts +5 -0
  539. package/src/book-components/Chat/types/ChatParticipant.ts +1 -1
  540. package/src/book-components/Chat/types/CitationLabelResolver.ts +9 -0
  541. package/src/book-components/Chat/utils/citationHelpers.ts +90 -2
  542. package/src/book-components/Chat/utils/createCitationFootnoteRenderModel.ts +3 -0
  543. package/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.ts +178 -0
  544. package/src/book-components/Chat/utils/isVisibleChatToolCall.ts +23 -0
  545. package/src/book-components/Chat/utils/parseCitationsFromContent.ts +6 -0
  546. package/src/book-components/Chat/utils/renderMarkdown.ts +3 -2
  547. package/src/book-components/_common/Dropdown/Dropdown.tsx +1 -1
  548. package/src/book-components/_common/MenuHoisting/MenuHoistingContext.tsx +1 -1
  549. package/src/book-components/_common/Modal/Modal.tsx +1 -1
  550. package/src/book-components/icons/AboutIcon.tsx +1 -1
  551. package/src/book-components/icons/DownloadIcon.tsx +1 -1
  552. package/src/book-components/icons/ExitFullscreenIcon.tsx +1 -1
  553. package/src/book-components/icons/FullscreenIcon.tsx +1 -1
  554. package/src/cli/cli-commands/agent/agentCliOptions.ts +92 -0
  555. package/src/cli/cli-commands/agent/chat.ts +54 -0
  556. package/src/cli/cli-commands/agent/exec.ts +60 -0
  557. package/src/cli/cli-commands/agent-folder/agentProjectPaths.ts +15 -28
  558. package/src/cli/cli-commands/agent.ts +44 -0
  559. package/src/cli/cli-commands/agents-server/buildAgentsServer.ts +325 -33
  560. package/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.ts +15 -2
  561. package/src/cli/cli-commands/agents-server/run.ts +103 -31
  562. package/src/cli/cli-commands/agents-server/startAgentsServer.ts +270 -41
  563. package/src/cli/cli-commands/agents-server.ts +7 -1
  564. package/src/cli/cli-commands/coder/ThinkingLevel.ts +3 -1
  565. package/src/cli/cli-commands/coder/agentCodingFile.ts +1 -1
  566. package/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.ts +79 -0
  567. package/src/cli/cli-commands/coder/find-unwritten.ts +58 -0
  568. package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +2 -2
  569. package/src/cli/cli-commands/coder/init.ts +6 -1
  570. package/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.ts +10 -0
  571. package/src/cli/cli-commands/coder/printInitializationSummary.ts +3 -0
  572. package/src/cli/cli-commands/coder/run.ts +108 -13
  573. package/src/cli/cli-commands/coder/server.ts +259 -0
  574. package/src/cli/cli-commands/coder/waitOptions.ts +24 -0
  575. package/src/cli/cli-commands/coder.ts +6 -0
  576. package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +33 -49
  577. package/src/cli/common/$deprecateCliCommand.ts +10 -1
  578. package/src/cli/promptbookCli.ts +2 -0
  579. package/src/collection/agent-collection/CreateAgentInput.ts +10 -5
  580. package/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.ts +98 -17
  581. package/src/collection/agent-collection/constructors/agent-collection-in-supabase/createAgentPersistenceRecords.ts +7 -4
  582. package/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.ts +44 -8
  583. package/src/commands/KNOWLEDGE/utils/knowledgeSourceContentToName.ts +2 -2
  584. package/src/commitments/GOAL/GOAL.ts +7 -2
  585. package/src/commitments/LANGUAGE/LANGUAGE.ts +7 -2
  586. package/src/commitments/META_VISIBILITY/META_VISIBILITY.ts +78 -0
  587. package/src/commitments/TEAM/TEAM.ts +12 -1
  588. package/src/commitments/USE_PROJECT/createUseProjectToolFunctions.ts +8 -1
  589. package/src/commitments/_common/teamInternalAgentAccess.ts +14 -8
  590. package/src/commitments/index.ts +2 -0
  591. package/src/execution/createPipelineExecutor/getKnowledgeForTask.ts +1 -1
  592. package/src/formats/csv/CsvFormatParser.ts +4 -4
  593. package/src/formats/csv/utils/csvParse.ts +2 -2
  594. package/src/import-plugins/JsonFileImportPlugin.ts +15 -2
  595. package/src/import-plugins/TextFileImportPlugin.ts +8 -1
  596. package/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.ts +1 -1
  597. package/src/llm-providers/_common/register/$provideLlmToolsFromEnv.ts +1 -1
  598. package/src/llm-providers/_common/register/$registeredLlmToolsMessage.ts +6 -1
  599. package/src/llm-providers/agent/AgentLlmExecutionTools.ts +2 -2
  600. package/src/llm-providers/agent/AgentLlmExecutionToolsAgentKitRunner.ts +2 -2
  601. package/src/llm-providers/agent/AgentLlmExecutionToolsOpenAiAssistantRunner.ts +2 -2
  602. package/src/llm-providers/anthropic-claude/register-configuration.ts +6 -3
  603. package/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.ts +3 -1
  604. package/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.ts +1 -1
  605. package/src/llm-providers/openai/OpenAiVectorStoreKnowledgeSourcePreparer.ts +1 -1
  606. package/src/other/templates/getTemplatesPipelineCollection.ts +817 -702
  607. package/src/scrapers/_common/utils/getScraperIntermediateSource.ts +2 -2
  608. package/src/scrapers/website/WebsiteScraper.ts +1 -1
  609. package/src/scrapers/website/utils/createShowdownConverter.ts +2 -2
  610. package/src/scripting/javascript/JavascriptEvalExecutionTools.ts +1 -1
  611. package/src/utils/agents/resolveAgentAvatarImageUrl.ts +1 -1
  612. package/src/utils/chat/chatAttachments/resolveChatAttachmentContent.ts +8 -1
  613. package/src/utils/isTimingSafeEqualString.ts +43 -0
  614. package/src/utils/misc/computeHash.ts +2 -2
  615. package/src/utils/random/$randomToken.ts +2 -2
  616. package/src/utils/validators/url/isValidAgentUrl.ts +5 -7
  617. package/src/version.ts +2 -2
  618. package/src/versions.txt +33 -0
  619. package/umd/apps/agents-server/src/constants/federatedAgentImport.d.ts +42 -0
  620. package/umd/apps/agents-server/src/constants/serverLimits.d.ts +224 -0
  621. package/umd/apps/agents-server/src/constants/toolUsageLimits.d.ts +55 -0
  622. package/umd/index.umd.js +24336 -18681
  623. package/umd/index.umd.js.map +1 -1
  624. package/umd/scripts/run-agent-chat/executeAgentChatTurn.d.ts +28 -0
  625. package/umd/scripts/run-agent-chat/runAgentChat.d.ts +5 -0
  626. package/umd/scripts/run-agent-chat/runAgentExec.d.ts +11 -0
  627. package/umd/scripts/run-agent-messages/main/AgentMessageFailureTracker.d.ts +27 -0
  628. package/umd/scripts/run-agent-messages/main/handleAgentWatchError.d.ts +4 -0
  629. package/umd/scripts/run-agent-messages/main/runAgentMessages.d.ts +1 -0
  630. package/umd/scripts/run-agent-messages/main/runMultipleAgentMessages.d.ts +1 -0
  631. package/umd/scripts/run-agent-messages/main/tickAgentMessages.d.ts +1 -0
  632. package/umd/scripts/run-agent-messages/messages/createAgentRunnerSystemMessage.d.ts +10 -0
  633. package/umd/scripts/run-agent-messages/messages/moveAgentMessageToFailed.d.ts +17 -0
  634. package/umd/scripts/run-codex-prompts/common/buildCoderRunProgressSnapshot.d.ts +5 -1
  635. package/umd/scripts/run-codex-prompts/common/cliProgressDisplay.d.ts +7 -0
  636. package/umd/scripts/run-codex-prompts/common/coderRunEstimateCache.d.ts +31 -0
  637. package/umd/scripts/run-codex-prompts/common/parseDuration.d.ts +19 -0
  638. package/umd/scripts/run-codex-prompts/common/progressFormatting.d.ts +2 -0
  639. package/umd/scripts/run-codex-prompts/common/resolveAgentSystemMessage.d.ts +6 -0
  640. package/umd/scripts/run-codex-prompts/common/resolveInlineOrFileText.d.ts +14 -0
  641. package/umd/scripts/run-codex-prompts/common/runGoScript/printLiveScriptChunk.d.ts +4 -0
  642. package/umd/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +27 -0
  643. package/umd/scripts/run-codex-prompts/common/waitForPause.d.ts +12 -0
  644. package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +3 -1
  645. package/umd/scripts/run-codex-prompts/main/findUnwrittenPrompts.d.ts +19 -0
  646. package/umd/scripts/run-codex-prompts/main/runCodexPromptsServer.d.ts +27 -0
  647. package/umd/scripts/run-codex-prompts/main/runPromptRound.d.ts +5 -3
  648. package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +3 -1
  649. package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +50 -0
  650. package/umd/scripts/run-codex-prompts/server/buildCoderServerRunState.d.ts +23 -0
  651. package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +9 -0
  652. package/umd/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +35 -0
  653. package/umd/scripts/run-codex-prompts/server/updatePromptSection.d.ts +9 -0
  654. package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +8 -0
  655. package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +1 -0
  656. package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +5 -1
  657. package/umd/scripts/run-codex-prompts/ui/renderCoderRunUi.d.ts +1 -0
  658. package/umd/src/_packages/components.index.d.ts +4 -0
  659. package/umd/src/_packages/core.index.d.ts +22 -2
  660. package/umd/src/_packages/node.index.d.ts +40 -0
  661. package/umd/src/_packages/types.index.d.ts +20 -0
  662. package/umd/src/avatars/avatarAnimationScheduler.d.ts +4 -0
  663. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +1 -1
  664. package/umd/src/avatars/visuals/octopus3d3AvatarVisual.d.ts +7 -0
  665. package/umd/src/avatars/visuals/octopus3d4AvatarVisual.d.ts +7 -0
  666. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +2 -0
  667. package/umd/src/book-2.0/agent-source/agentSourceVisibility.d.ts +97 -0
  668. package/umd/src/book-2.0/agent-source/agentSourceVisibility.test.d.ts +1 -0
  669. package/umd/src/book-3.0/BookNodeAgentSource.d.ts +38 -0
  670. package/umd/src/book-3.0/CliAgent.d.ts +66 -0
  671. package/umd/src/book-3.0/CliAgent.test.d.ts +1 -0
  672. package/umd/src/book-3.0/LiteAgent.d.ts +68 -0
  673. package/umd/src/book-3.0/LiteAgent.test.d.ts +1 -0
  674. package/umd/src/book-3.0/agentFolderPaths.d.ts +30 -0
  675. package/umd/src/book-3.0/cliAgentEnv.d.ts +33 -0
  676. package/umd/src/book-components/BookEditor/BookEditor.d.ts +6 -5
  677. package/umd/src/book-components/BookEditor/BookEditorAboutPromptbookInformation.d.ts +12 -0
  678. package/umd/src/book-components/BookEditor/BookEditorBrowserConfig.d.ts +2 -0
  679. package/umd/src/book-components/BookEditor/BookEditorForClient.d.ts +7 -0
  680. package/umd/src/book-components/BookEditor/BookEditorMonacoTokenization.d.ts +2 -0
  681. package/umd/src/book-components/BookEditor/BookEditorTheme.d.ts +24 -0
  682. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +9 -0
  683. package/umd/src/book-components/BookEditor/useBookEditorMonacoLanguage.d.ts +1 -6
  684. package/umd/src/book-components/BookEditor/useBookEditorMonacoLifecycle.d.ts +1 -4
  685. package/umd/src/book-components/BookEditor/useBookEditorMonacoStyles.d.ts +2 -1
  686. package/umd/src/book-components/Chat/Chat/ChatCitationModal.d.ts +2 -0
  687. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +4 -0
  688. package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +4 -0
  689. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +5 -0
  690. package/umd/src/book-components/Chat/Chat/ChatToolCallModal.d.ts +2 -0
  691. package/umd/src/book-components/Chat/Chat/ChatToolCallModalContent.d.ts +3 -1
  692. package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +20 -0
  693. package/umd/src/book-components/Chat/Chat/TeamToolCallModalContent.d.ts +2 -0
  694. package/umd/src/book-components/Chat/MarkdownContent/MarkdownContent.d.ts +1 -0
  695. package/umd/src/book-components/Chat/SourceChip/SourceChip.d.ts +6 -1
  696. package/umd/src/book-components/Chat/hooks/useResolvedCitationLabel.d.ts +12 -0
  697. package/umd/src/book-components/Chat/types/ChatMessage.d.ts +4 -0
  698. package/umd/src/book-components/Chat/types/ChatParticipant.d.ts +1 -1
  699. package/umd/src/book-components/Chat/types/CitationLabelResolver.d.ts +8 -0
  700. package/umd/src/book-components/Chat/utils/citationHelpers.d.ts +9 -0
  701. package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.d.ts +14 -0
  702. package/umd/src/book-components/Chat/utils/decodeJsonUnicodeEscapesInMarkdownText.test.d.ts +1 -0
  703. package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +10 -0
  704. package/umd/src/book-components/Chat/utils/parseCitationsFromContent.d.ts +4 -0
  705. package/umd/src/book-components/_common/Dropdown/Dropdown.d.ts +1 -1
  706. package/umd/src/book-components/_common/MenuHoisting/MenuHoistingContext.d.ts +1 -1
  707. package/umd/src/book-components/_common/Modal/Modal.d.ts +1 -1
  708. package/umd/src/book-components/icons/AboutIcon.d.ts +1 -1
  709. package/umd/src/book-components/icons/DownloadIcon.d.ts +1 -1
  710. package/umd/src/book-components/icons/ExitFullscreenIcon.d.ts +1 -1
  711. package/umd/src/book-components/icons/FullscreenIcon.d.ts +1 -1
  712. package/umd/src/cli/cli-commands/agent/agentCliOptions.d.ts +38 -0
  713. package/umd/src/cli/cli-commands/agent/chat.d.ts +10 -0
  714. package/umd/src/cli/cli-commands/agent/exec.d.ts +10 -0
  715. package/umd/src/cli/cli-commands/agent/run.test.d.ts +1 -0
  716. package/umd/src/cli/cli-commands/agent-folder/agentProjectPaths.d.ts +2 -24
  717. package/umd/src/cli/cli-commands/agent.d.ts +14 -0
  718. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +23 -1
  719. package/umd/src/cli/cli-commands/agents-server/run.d.ts +6 -0
  720. package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +9 -2
  721. package/umd/src/cli/cli-commands/coder/ThinkingLevel.d.ts +1 -1
  722. package/umd/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.d.ts +25 -0
  723. package/umd/src/cli/cli-commands/coder/find-unwritten.d.ts +10 -0
  724. package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +2 -0
  725. package/umd/src/cli/cli-commands/coder/server.d.ts +13 -0
  726. package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +14 -0
  727. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -25
  728. package/umd/src/collection/agent-collection/CreateAgentInput.d.ts +2 -1
  729. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +22 -0
  730. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +21 -1
  731. package/umd/src/commitments/META_VISIBILITY/META_VISIBILITY.d.ts +27 -0
  732. package/umd/src/commitments/_common/teamInternalAgentAccess.d.ts +9 -1
  733. package/umd/src/commitments/index.d.ts +2 -1
  734. package/umd/src/llm-providers/_common/register/$provideLlmToolsConfigurationFromEnv.d.ts +1 -1
  735. package/umd/src/llm-providers/_common/register/$provideLlmToolsFromEnv.d.ts +1 -1
  736. package/umd/src/scrapers/website/utils/createShowdownConverter.d.ts +2 -2
  737. package/umd/src/utils/isTimingSafeEqualString.d.ts +25 -0
  738. package/umd/src/utils/validators/url/isValidAgentUrl.d.ts +5 -0
  739. package/umd/src/version.d.ts +1 -1
  740. package/apps/agents-server/src/app/api/long-streaming/route.ts +0 -23
  741. package/apps/agents-server/src/message-providers/email/_common/utils/parseEmailAddress.test.ts.todo +0 -108
  742. package/apps/agents-server/src/message-providers/email/_common/utils/parseEmailAddresses.test.ts.todo +0 -117
  743. package/apps/agents-server/src/message-providers/email/_common/utils/stringifyEmailAddress.test.ts.todo +0 -119
  744. package/apps/agents-server/src/message-providers/email/_common/utils/stringifyEmailAddresses.test.ts.todo +0 -74
  745. package/apps/agents-server/src/utils/defaultFederatedAgents/DefaultFederatedAgentsSyncOptions.ts +0 -9
  746. package/apps/agents-server/src/utils/defaultFederatedAgents/ensureDefaultFederatedAgentExists.ts +0 -277
  747. package/apps/agents-server/src/utils/defaultFederatedAgents/fetchCoreOrganizationPayload.ts +0 -39
  748. package/apps/agents-server/src/utils/defaultFederatedAgents/fetchFederatedAgentBook.ts +0 -43
  749. package/apps/agents-server/src/utils/defaultFederatedAgents/fetchWithDefaultFederatedAgentTimeout.ts +0 -28
  750. package/apps/agents-server/src/utils/defaultFederatedAgents/getDefaultFederatedAgentSyncPool.ts +0 -38
  751. package/apps/agents-server/src/utils/defaultFederatedAgents/loadActiveLocalAgentIdsByNormalizedName.ts +0 -41
  752. package/apps/agents-server/src/utils/defaultFederatedAgents/loadDefaultFederatedAgentSyncMetadata.ts +0 -76
  753. package/apps/agents-server/src/utils/defaultFederatedAgents/quoteIdentifier.ts +0 -11
  754. package/apps/agents-server/src/utils/defaultFederatedAgents/scheduleDefaultFederatedAgentsSync.ts +0 -88
  755. package/apps/agents-server/src/utils/defaultFederatedAgents/selectDefaultFederatedAgentsFromOrganizationPayload.ts +0 -181
  756. package/apps/agents-server/src/utils/defaultFederatedAgents/synchronizeDefaultFederatedAgents.ts +0 -77
  757. package/apps/agents-server/src/utils/shibboleth/createShibbolethAuthenticationLogPayload.ts +0 -173
  758. package/apps/agents-server/src/utils/shibboleth/writeShibbolethAuthenticationLog.ts +0 -27
  759. package/apps/agents-server/tests/e2e/authentication-and-navigation.spec.ts.todo +0 -178
  760. package/src/_packages/browser.index.ts +0 -31
  761. package/src/_packages/browser.readme.md +0 -43
  762. package/src/book-2.0/agent-source/parseAgentSourceWithCommitments.test.ts.todo +0 -265
  763. package/src/book-components/BookEditor/BookEditorMonaco.test.tsx.todo +0 -115
  764. package/src/book-components/Chat/utils/renderMarkdown.test.ts.tmp +0 -199
  765. package/src/collection/agent-collection/constructors/agent-collection-in-directory/AgentCollectionInDirectory.test.ts.todo +0 -131
  766. package/src/commands/_common/parseCommand.test.ts.todo +0 -48
  767. package/src/commitments/META_LINK/META_LINK.test.ts.todo +0 -75
  768. package/src/conversion/validation/pipelineStringToJson-errors.test.ts.todo +0 -33
  769. package/src/dialogs/simple-prompt/SimplePromptInterfaceTools.ts +0 -51
  770. package/src/executables/browsers/locateSafari.test.ts.tmp +0 -15
  771. package/src/execution/PromptbookFetch.test-type.ts +0 -14
  772. package/src/execution/createPipelineExecutor/00-createPipelineExecutor.test.ts.todo +0 -0
  773. package/src/execution/execution-report/executionReportJsonToString.test.ts.todo +0 -83
  774. package/src/execution/utils/usageToHuman.test.ts.todo +0 -80
  775. package/src/llm-providers/_common/register/$provideLlmToolsForTestingAndScriptsAndPlayground.ts +0 -76
  776. package/src/llm-providers/_common/utils/assertUniqueModels.ts +0 -27
  777. package/src/llm-providers/_multiple/playground/playground.ts +0 -141
  778. package/src/llm-providers/_multiple/playground/tsconfig.json +0 -19
  779. package/src/llm-providers/agent/playground/playground.ts +0 -190
  780. package/src/llm-providers/agent/playground/tsconfig.json +0 -19
  781. package/src/llm-providers/anthropic-claude/playground/playground.ts +0 -99
  782. package/src/llm-providers/anthropic-claude/playground/tsconfig.json +0 -19
  783. package/src/llm-providers/azure-openai/playground/playground.ts +0 -101
  784. package/src/llm-providers/azure-openai/playground/tsconfig.json +0 -19
  785. package/src/llm-providers/ollama/playground/playground.ts +0 -120
  786. package/src/llm-providers/ollama/playground/tsconfig.json +0 -19
  787. package/src/llm-providers/openai/playground/playground.ts +0 -406
  788. package/src/llm-providers/openai/playground/tsconfig.json +0 -19
  789. package/src/llm-providers/remote/playground/playground.ts +0 -144
  790. package/src/llm-providers/remote/playground/tsconfig.json +0 -19
  791. package/src/llm-providers/vercel/playground/playground.ts +0 -133
  792. package/src/llm-providers/vercel/playground/tsconfig.json +0 -19
  793. package/src/personas/preparePersona.test.ts.todo +0 -126
  794. package/src/playground/backup/_playground-boilerplate.ts.txt +0 -37
  795. package/src/playground/backup/playground-agent-os.txt +0 -62
  796. package/src/playground/backup/playground-brj-app.ts.txt +0 -302
  797. package/src/playground/backup/playground-browser-playwright.txt +0 -110
  798. package/src/playground/backup/playground-claude-mcp.txt +0 -43
  799. package/src/playground/backup/playground-document-conversion.txt +0 -84
  800. package/src/playground/backup/playground-glob.ts.txt +0 -42
  801. package/src/playground/backup/playground-mcp-server.txt +0 -1
  802. package/src/playground/backup/playground-openai-agent-kit.txt +0 -73
  803. package/src/playground/backup/playground-openai-function-calling.txt +0 -131
  804. package/src/playground/backup/playground-openai-streaming.ts.txt +0 -68
  805. package/src/playground/backup/playground-scrape-knowledge.txt +0 -65
  806. package/src/playground/backup/playground-scraperFetch.ts.txt +0 -44
  807. package/src/playground/backup/playground-using-openai-compatible-route-on-agents-server.ts.txt +0 -49
  808. package/src/playground/backup/playground-write-pavolhejny-bio.txt +0 -120
  809. package/src/playground/permanent/_boilerplate.ts +0 -54
  810. package/src/playground/permanent/agent-with-browser-playground.ts +0 -92
  811. package/src/playground/permanent/error-handling-playground.ts +0 -103
  812. package/src/playground/playground.ts +0 -36
  813. package/src/playground/tsconfig.json +0 -19
  814. package/src/scrapers/_boilerplate/BoilerplateScraper.test.ts.todo +0 -73
  815. package/src/scrapers/_boilerplate/playground/boilerplate-scraper-playground.ts +0 -79
  816. package/src/scrapers/_boilerplate/playground/tsconfig.json +0 -19
  817. package/src/scrapers/_common/utils/files/blobToDataurl.test.ts.todo +0 -17
  818. package/src/scrapers/_common/utils/files/dataurlToBlob.test.ts.todo +0 -52
  819. package/src/scrapers/_common/utils/files/isValidDataurl.test.ts.todo +0 -42
  820. package/src/scrapers/_common/utils/files/shorten.test.ts.todo +0 -13
  821. package/src/scrapers/document/playground/document-scraper-playground.ts +0 -80
  822. package/src/scrapers/document/playground/tsconfig.json +0 -19
  823. package/src/scrapers/document-legacy/playground/legacy-document-scraper-playground.ts +0 -80
  824. package/src/scrapers/document-legacy/playground/tsconfig.json +0 -19
  825. package/src/scrapers/markdown/playground/markdown-scraper-playground.ts +0 -74
  826. package/src/scrapers/markdown/playground/tsconfig.json +0 -19
  827. package/src/scrapers/markitdown/MarkitdownScraper.test.ts.todo +0 -132
  828. package/src/scrapers/markitdown/playground/markitdown-scraper-playground.ts +0 -91
  829. package/src/scrapers/markitdown/playground/tsconfig.json +0 -19
  830. package/src/scrapers/pdf/PdfScraper.test.ts.todo +0 -52
  831. package/src/scrapers/pdf/playground/pdf-scraper-playground.ts +0 -75
  832. package/src/scrapers/pdf/playground/tsconfig.json +0 -19
  833. package/src/scrapers/website/playground/tsconfig.json +0 -19
  834. package/src/scrapers/website/playground/website-scraper-playground.ts +0 -82
  835. package/src/storage/_common/PromptbookStorage.test-type.ts +0 -14
  836. package/src/storage/local-storage/getIndexedDbStorage.ts +0 -36
  837. package/src/storage/local-storage/getLocalStorage.ts +0 -33
  838. package/src/storage/local-storage/getSessionStorage.ts +0 -33
  839. package/src/storage/local-storage/utils/IndexedDbStorageOptions.ts +0 -16
  840. package/src/storage/local-storage/utils/makePromptbookStorageFromIndexedDb.ts +0 -58
  841. package/src/storage/local-storage/utils/makePromptbookStorageFromWebStorage.ts +0 -45
  842. package/src/transpilers/formatted-book-in-markdown/FormattedBookInMarkdownTranspiler.test.ts.todo +0 -35
  843. package/src/transpilers/openai-sdk/playground/playground.ts +0 -85
  844. package/src/transpilers/openai-sdk/playground/tmp/chatbot-openaisdk-1.js +0 -194
  845. package/src/transpilers/openai-sdk/playground/tmp/package.json +0 -3
  846. package/src/transpilers/openai-sdk/playground/tsconfig.json +0 -18
  847. package/src/utils/editable/utils/findUsableParameters.test.ts.todo +0 -43
  848. package/src/utils/editable/utils/stringifyPipelineJson.test.ts.todo +0 -38
  849. package/src/utils/markdown/prettifyMarkdown.test.ts.tmp +0 -42
  850. package/src/utils/serialization/serializeToPromptbookJavascript.test.ts.todo +0 -116
package/README.md CHANGED
@@ -27,6 +27,25 @@ Create persistent AI agents that turn your company's scattered knowledge into ac
27
27
 
28
28
 
29
29
 
30
+ ### Standalone VPS
31
+
32
+ Run the standalone VPS installer only on a fresh server. Interactive mode asks for the installation values:
33
+
34
+ ```bash
35
+ sudo curl -fsSL https://raw.githubusercontent.com/webgptorg/promptbook/refs/heads/main/other/vps/install.sh | bash
36
+ ```
37
+
38
+ Non-interactive mode takes defaults from command-line options. When `--openai-api-key` is provided with the default OpenAI Codex runner, the installer installs and configures Codex automatically; other runner authentication can be configured later from the UI or SSH:
39
+
40
+ ```bash
41
+ sudo curl -fsSL https://raw.githubusercontent.com/webgptorg/promptbook/refs/heads/main/other/vps/install.sh | bash -s -- \
42
+ --non-interactive \
43
+ --yes-i-understand-that-script-should-be-run-on-fresh-server \
44
+ --domain my-server.com \
45
+ --openai-api-key sk-proj-xxx \
46
+ --admin-password xxx
47
+ ```
48
+
30
49
 
31
50
 
32
51
  <blockquote style="color: #ff8811">
@@ -183,7 +202,7 @@ Rest of the documentation is common for **entire promptbook ecosystem**:
183
202
 
184
203
  Promptbook lets you create **persistent AI agents** that work on real goals for your company. The [**Agents Server**](https://gallery.ptbk.io/) is the heart of the project - a place where your AI agents live, remember context, collaborate in teams, and get things done.
185
204
 
186
- Nowadays, the biggest challenge for most business applications isn't the raw capabilities of AI models. Large language models such as GPT-5.2 and Claude-4.5 are incredibly capable.
205
+ Nowadays, the biggest challenge for most business applications isn't the raw capabilities of AI models. Large language models such as Claude Mythos, GPT-5.6 or Kimi K2.7 are incredibly capable.
187
206
 
188
207
  The main challenge lies in **managing the context**, providing rules and knowledge, and narrowing the personality.
189
208
 
@@ -191,17 +210,20 @@ In Promptbook, you define your agents **using simple Books** - a human-readable
191
210
 
192
211
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
193
212
 
194
- **<ins>Paul Smith</ins>**<br/>
213
+ **<ins>Lawyer</ins>**<br/>
195
214
  <br/>
196
- **PERSONA** You are a company lawyer.<br/>
215
+ GOAL You are a company lawyer.<br/>
197
216
  Your job is to provide legal advice and support to the company and its employees.<br/>
198
- **GOAL** Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
217
+ Respond to incoming legal inquiries via email and keep the company website updated with the latest legal policies.<br/>
218
+ <br/>
199
219
  **RULE** You are knowledgeable, professional, and detail-oriented.<br/>
200
220
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
201
221
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
202
- **USE EMAIL**<br/>
203
- **USE BROWSER**<br/>
204
- **TEAM** You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.<br/>
222
+ <br/>
223
+ USE EMAIL<br/>
224
+ USE BROWSER<br/>
225
+ <br/>
226
+ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.<br/>
205
227
 
206
228
  </td></tr></table>
207
229
 
@@ -234,12 +256,12 @@ Goals define what the agent should actively work toward. Unlike a chatbot that o
234
256
 
235
257
  <table style="border: 1px solid #777; border-radius: 10px;"><tr><td>
236
258
 
237
- **<ins>Paul Smith & Associés</ins>**<br/>
259
+ **<ins>Company Lawyer</ins>**<br/>
238
260
  <br/>
239
- **PERSONA** You are a company lawyer.<br/>
261
+ GOAL<br/>
240
262
  Your job is to provide legal advice and support to the company and its employees.<br/>
241
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
242
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
263
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
264
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
243
265
 
244
266
  </td></tr></table>
245
267
 
@@ -257,8 +279,8 @@ Promptbook Engine will automatically enforce this knowledge during interactions.
257
279
  <br/>
258
280
  **PERSONA** You are a company lawyer.<br/>
259
281
  Your job is to provide legal advice and support to the company and its employees.<br/>
260
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
261
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
282
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
283
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
262
284
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
263
285
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
264
286
 
@@ -276,8 +298,8 @@ Depending on rule strictness, Promptbook will either propagate it to the prompt
276
298
  <br/>
277
299
  **PERSONA** You are a company lawyer.<br/>
278
300
  Your job is to provide legal advice and support to the company and its employees.<br/>
279
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
280
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
301
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
302
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
281
303
  **RULE** Always ensure compliance with local laws and regulations.<br/>
282
304
  **RULE** Never provide legal advice outside your area of expertise.<br/>
283
305
  **RULE** Never provide legal advice about criminal law.<br/>
@@ -298,16 +320,16 @@ These are what turn a chatbot into a persistent agent that actually does work.
298
320
  <br/>
299
321
  **PERSONA** You are a company lawyer.<br/>
300
322
  Your job is to provide legal advice and support to the company and its employees.<br/>
301
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
302
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
323
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
324
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
303
325
  **RULE** Always ensure compliance with local laws and regulations.<br/>
304
326
  **RULE** Never provide legal advice outside your area of expertise.<br/>
305
327
  **RULE** Never provide legal advice about criminal law.<br/>
306
328
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
307
329
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
308
- **USE EMAIL**<br/>
309
- **USE BROWSER**<br/>
310
- **USE SEARCH ENGINE**<br/>
330
+ USE EMAIL<br/>
331
+ USE BROWSER<br/>
332
+ USE SEARCH ENGINE<br/>
311
333
 
312
334
  </td></tr></table>
313
335
 
@@ -321,20 +343,22 @@ Team commitment allows you to define the team structure and advisory fellow memb
321
343
  <br/>
322
344
  **PERSONA** You are a company lawyer.<br/>
323
345
  Your job is to provide legal advice and support to the company and its employees.<br/>
324
- **GOAL** Respond to incoming legal inquiries via email within 24 hours.<br/>
325
- **GOAL** Keep the company website updated with the latest legal policies and compliance information.<br/>
346
+ GOAL Respond to incoming legal inquiries via email within 24 hours.<br/>
347
+ GOAL Keep the company website updated with the latest legal policies and compliance information.<br/>
326
348
  **RULE** Always ensure compliance with local laws and regulations.<br/>
327
349
  **RULE** Never provide legal advice outside your area of expertise.<br/>
328
350
  **RULE** Never provide legal advice about criminal law.<br/>
329
351
  **KNOWLEDGE** https://company.com/company-policies.pdf<br/>
330
352
  **KNOWLEDGE** https://company.com/internal-documents/employee-handbook.docx<br/>
331
- **USE EMAIL**<br/>
332
- **USE BROWSER**<br/>
333
- **USE SEARCH ENGINE**<br/>
334
- **TEAM** You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.<br/>
353
+ USE EMAIL<br/>
354
+ USE BROWSER<br/>
355
+ USE SEARCH ENGINE<br/>
356
+ TEAM You are part of the legal team of Paul Smith & Associés, you discuss with {Emily White}, the head of the compliance department. {George Brown} is expert in corporate law and {Sophia Black} is expert in labor law.<br/>
335
357
 
336
358
  </td></tr></table>
337
359
 
360
+
361
+
338
362
  ### Promptbook Ecosystem
339
363
 
340
364
  Promptbook is an ecosystem of tools centered around the **Agents Server** - a production-ready platform for running persistent AI agents.
@@ -357,6 +381,8 @@ The [Promptbook Engine](https://github.com/webgptorg/promptbook) is the open-sou
357
381
 
358
382
 
359
383
 
384
+
385
+
360
386
  ## 💜 The Promptbook Project
361
387
 
362
388
  Promptbook project is an ecosystem centered around the **Agents Server** - a platform for creating, deploying, and running persistent AI agents. Following is a list of the most important pieces of the project:
@@ -394,6 +420,8 @@ Promptbook project is an ecosystem centered around the **Agents Server** - a pla
394
420
  </tbody>
395
421
  </table>
396
422
 
423
+
424
+
397
425
  ### 🌐 Community & Social Media
398
426
 
399
427
  Join our growing community of developers and users:
@@ -450,6 +478,8 @@ Join our growing community of developers and users:
450
478
 
451
479
 
452
480
 
481
+
482
+
453
483
  ## 📚 Documentation
454
484
 
455
485
  See detailed guides and API reference in the [docs](https://github.com/webgptorg/promptbook/discussions/categories/concepts) or [online](https://discord.gg/x3QWNaa89N).
@@ -541,9 +571,9 @@ Prompts marked with `[-]` are not ready yet, prompts containing `@@@` are treate
541
571
  #### Features
542
572
 
543
573
  - **Multi-runner execution:** `openai-codex`, `github-copilot`, `cline`, `claude-code`, `opencode`, `gemini`
544
- - **Context injection:** `--context AGENTS.md` or inline extra instructions
574
+ - **Context injection:** `--agent agents/coding/developer.book --context AGENTS.md` or inline extra instructions
545
575
  - **Reasoning control:** `--thinking-level low|medium|high|xhigh` for supported runners
546
- - **Interactive or unattended runs:** default wait mode, or `--no-wait` for batch execution
576
+ - **Unattended or interactive runs:** default auto mode, or `--no-auto` to wait for user confirmation before each prompt
547
577
  - **Git safety:** clean working tree check by default, optional `--ignore-git-changes`
548
578
  - **Opt-in remote pushes:** commits stay local unless you explicitly pass `--auto-push`
549
579
  - **Prompt triage:** `--priority` to process only more important tasks first
@@ -561,11 +591,11 @@ npx ts-node ./src/cli/test/ptbk.ts coder generate-boilerplates --template prompt
561
591
 
562
592
  npx ts-node ./src/cli/test/ptbk.ts coder generate-boilerplates --template prompts/templates/agents-server.md
563
593
 
564
- npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md
594
+ npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md
565
595
 
566
- npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --auto-push
596
+ npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --auto-push
567
597
 
568
- npx ts-node ./src/cli/test/ptbk.ts coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --ignore-git-changes --no-wait
598
+ npx ts-node ./src/cli/test/ptbk.ts coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --ignore-git-changes
569
599
 
570
600
  npx ts-node ./src/cli/test/ptbk.ts coder find-refactor-candidates
571
601
 
@@ -587,11 +617,11 @@ ptbk coder generate-boilerplates
587
617
 
588
618
  ptbk coder generate-boilerplates --template prompts/templates/common.md
589
619
 
590
- ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --test npm run test
620
+ ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --test npm run test
591
621
 
592
- ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --auto-push
622
+ ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --auto-push
593
623
 
594
- ptbk coder run --agent github-copilot --model gpt-5.4 --thinking-level xhigh --context AGENTS.md --test npm run test --ignore-git-changes --no-wait
624
+ ptbk coder run --harness github-copilot --model gpt-5.4 --thinking-level xhigh --agent agents/coding/developer.book --context AGENTS.md --test npm run test --ignore-git-changes
595
625
 
596
626
  ptbk coder find-refactor-candidates
597
627
 
@@ -604,24 +634,24 @@ ptbk coder verify
604
634
 
605
635
  #### What each command does
606
636
 
607
- | Command | What it does |
608
- | ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------ | ---- | ----- | ------------------------------------------------------------------------ |
637
+ | Command | What it does |
638
+ | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------ | ---- | ----- | ------------------------------------------------------------------------ |
609
639
  | `ptbk coder init` | Creates `prompts/`, `prompts/done/`, the project-generic template files materialized in `prompts/templates/` (currently `common.md`), and a starter `AGENTS.md`; ensures `.env` contains `CODING_AGENT_GIT_NAME`, `CODING_AGENT_GIT_EMAIL`, and `CODING_AGENT_GIT_SIGNING_KEY`; adds helper coder scripts to `package.json`; ensures `.gitignore` contains `/.promptbook`; and configures `.vscode/settings.json` to save pasted prompt images into `prompts/screenshots/`. |
610
- | `ptbk coder generate-boilerplates` | Creates new prompt markdown files with fresh emoji tags so you can quickly fill in coding tasks; `--template` accepts either a built-in alias or a markdown file path relative to the project root. |
611
- | `ptbk coder run` | Picks the next ready prompt, appends optional context, runs it through the selected coding agent, can optionally verify each attempt with a shell test command and feed failing output back for retries, then marks success or failure, commits the result, and pushes only when `--auto-push` is enabled. |
612
- | `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors; `--level <xlow | low | medium | high | xhigh | extreme>` ranges from a very benevolent scan to a very aggressive sweep. |
613
- | `ptbk coder verify` | Walks through completed prompts, archives truly finished work, and adds follow-up repair prompts for unfinished results. |
640
+ | `ptbk coder generate-boilerplates` | Creates new prompt markdown files with fresh emoji tags so you can quickly fill in coding tasks; `--template` accepts either a built-in alias or a markdown file path relative to the project root. |
641
+ | `ptbk coder run` | Picks the next ready prompt, appends optional context, runs it through the selected coding agent, can optionally verify each attempt with a shell test command and feed failing output back for retries, then marks success or failure, commits the result, and pushes only when `--auto-push` is enabled. |
642
+ | `ptbk coder find-refactor-candidates` | Scans the repository for oversized or overpacked files and writes prompt files for likely refactors; `--level <xlow | low | medium | high | xhigh | extreme>` ranges from a very benevolent scan to a very aggressive sweep. |
643
+ | `ptbk coder verify` | Walks through completed prompts, archives truly finished work, and adds follow-up repair prompts for unfinished results. |
614
644
 
615
645
  #### Most useful `ptbk coder run` flags
616
646
 
617
647
  | Flag | Purpose |
618
648
  | -------------------------- | -------------------------------------------------------------------------------------------------- |
619
- | `--agent <name>` | Selects the coding backend. |
649
+ | `--harness <name>` | Selects the coding harness. |
620
650
  | `--model <model>` | Chooses the runner model; required for `openai-codex` and `gemini`, optional for `github-copilot`. |
621
651
  | `--context <text-or-file>` | Appends extra instructions inline or from a file like `AGENTS.md`. |
622
652
  | `--test <command>` | Runs a verification command after each prompt attempt and feeds failing output back for retries. |
623
653
  | `--thinking-level <level>` | Sets reasoning effort for supported runners. |
624
- | `--no-wait` | Skips interactive pauses between prompts for unattended execution. |
654
+ | `--no-auto` | Waits for user confirmation before each prompt instead of running automatically through the queue. |
625
655
  | `--ignore-git-changes` | Disables the clean-working-tree guard. |
626
656
  | `--priority <n>` | Runs only prompts at or above the given priority. |
627
657
  | `--dry-run` | Prints which prompts are ready instead of executing them. |
@@ -633,8 +663,8 @@ ptbk coder verify
633
663
 
634
664
  1. Initialize once with `ptbk coder init`.
635
665
  2. Customize `prompts/templates/*.md` if needed, then create or write prompt files in `prompts/`.
636
- 3. Customize the starter `AGENTS.md` with repository-specific instructions, then pass `--context AGENTS.md`.
637
- 4. Run one prompt at a time interactively, or use `--no-wait` for unattended batches.
666
+ 3. Customize the starter `AGENTS.md` with repository-specific instructions, then pass `--agent agents/coding/developer.book --context AGENTS.md`.
667
+ 4. Run unattended batches by default, or pass `--no-auto` to confirm each prompt interactively.
638
668
  5. Finish with `ptbk coder verify` so resolved prompts are archived and broken ones get explicit repair follow-ups.
639
669
 
640
670
 
@@ -657,6 +687,8 @@ The following glossary is used to clarify certain concepts:
657
687
 
658
688
  _Note: This section is not a complete dictionary, more list of general AI / LLM terms that has connection with Promptbook_
659
689
 
690
+
691
+
660
692
  ### 💯 Core concepts
661
693
 
662
694
  - [📚 Collection of pipelines](https://github.com/webgptorg/promptbook/discussions/65)
@@ -0,0 +1,24 @@
1
+ Developer
2
+ META VISIBILITY PRIVATE
3
+
4
+ RULE
5
+ Keep in mind the DRY _(don't repeat yourself)_ principle.
6
+
7
+ RULE
8
+ Keep in mind the SOLID principles.
9
+
10
+ RULE
11
+ Do a proper analysis of the current functionality before you start implementing.
12
+
13
+ RULE
14
+ Keep small responsibilities of functions and classes, avoid creating big functions or classes that do many things.
15
+
16
+ RULE
17
+ Constants should always be `UPPER_SNAKE_CASE`.
18
+
19
+ RULE
20
+ Boolean variables should always be prefixed with `is`, for example `isUserChatJobLeaseExpired` or `IS_DEBUG_MODE`.
21
+
22
+ RULE
23
+ Do not use abbreviations, for example use `isExpired` instead of `isExp`, `translateMessage` instead of `t`, etc.
24
+ It is fine to use well-known abbreviations, for example `id`, `url`, `html`, etc.
@@ -9,7 +9,7 @@ The installed CLI can initialize a local Agents Server project before it starts
9
9
  ```bash
10
10
  npm install ptbk
11
11
  ptbk agents-server init
12
- ptbk agents-server start --agent github-copilot --model gpt-5.4 --thinking-level xhigh
12
+ ptbk agents-server start --harness github-copilot --model gpt-5.4 --thinking-level xhigh
13
13
  ```
14
14
 
15
15
  `ptbk agents-server init` adds missing placeholders to `.env` and local runtime exclusions to `.gitignore` without deleting existing configuration. Use `PTBK_AGENTS_SERVER_DATABASE=supabase` for a Supabase-backed server or `PTBK_AGENTS_SERVER_DATABASE=sqlite` for a standalone local database in `.promptbook`. When using Supabase, fill the initialized values from your project before starting the server. The Supabase project URL and API keys are available in the [Supabase project API settings](https://supabase.com/docs/guides/api/api-keys), and the PostgreSQL connection string is available from the [Supabase database connection guide](https://supabase.com/docs/guides/database/connecting-to-postgres).
@@ -41,6 +41,24 @@ ptbk agents-server start --agent github-copilot --model gpt-5.4 --thinking-level
41
41
  <a id="agents-server-env-admin-password"></a>
42
42
  - `ADMIN_PASSWORD`: Password for the built-in `admin` login on a self-hosted Agents Server. Choose a private value before using the admin UI.
43
43
 
44
+ <a id="agents-server-env-session-secret"></a>
45
+ - `SESSION_SECRET`: HMAC signing key used to sign the session cookie. Must be set explicitly in production — the server refuses to start session signing when missing instead of falling back to a hardcoded default. Use a long random string, for example the output of `openssl rand -hex 32`. Keep it separate from `ADMIN_PASSWORD` so a leak of either credential cannot forge the other.
46
+
47
+ <a id="agents-server-env-ptbk-agents-server-user-chat-worker-token"></a>
48
+ - `PTBK_AGENTS_SERVER_USER_CHAT_WORKER_TOKEN`: Shared internal token used to authorize background worker routes (`/api/internal/user-chat-jobs/run`, `/api/internal/user-chat-timeouts/run`, and `/api/internal/agent-runner-limits`). Must be set explicitly in production — the server refuses to resolve the worker token when missing instead of falling back to `ADMIN_PASSWORD`, `SUPABASE_SERVICE_ROLE_KEY`, or a hardcoded constant. Use a long random string, for example the output of `openssl rand -hex 32`. The CLI launcher (`ptbk agents-server start`) generates a per-process value automatically when the variable is empty so local development works without configuration.
49
+
50
+ <a id="agents-server-env-promptbook-team-agent-access-token"></a>
51
+ - `PROMPTBOOK_TEAM_AGENT_ACCESS_TOKEN`: Dedicated secret used by same-server `TEAM` calls to authorize access to private teammate agents. Must be a dedicated random string — falling back to `ADMIN_PASSWORD` or `SUPABASE_SERVICE_ROLE_KEY` would let a leak of one credential compromise both authentication boundaries. When not configured, same-server team access stays disabled (the integration fails closed) so leaving the variable empty is safe but disables the feature. Use a long random string, for example the output of `openssl rand -hex 32`.
52
+
53
+ <a id="agents-server-env-sendgrid-inbound-parse-public-key"></a>
54
+ - `SENDGRID_INBOUND_PARSE_PUBLIC_KEY`: Public verification key from SendGrid Signed Webhook settings for `/api/emails/incoming/sendgrid`. The route verifies `X-Twilio-Email-Event-Webhook-Signature` over the raw multipart body before parsing or inserting an inbound `EMAIL` message. Configure either this public key or `SENDGRID_INBOUND_PARSE_WEBHOOK_SECRET`; the SendGrid public-key flow is preferred.
55
+
56
+ <a id="agents-server-env-sendgrid-inbound-parse-webhook-secret"></a>
57
+ - `SENDGRID_INBOUND_PARSE_WEBHOOK_SECRET`: Shared secret for deployments that sign SendGrid Inbound Parse callbacks with HMAC instead of SendGrid's public-key signature flow. Leave empty when `SENDGRID_INBOUND_PARSE_PUBLIC_KEY` is configured. Use a dedicated random string and keep it separate from `SENDGRID_API_KEY`, `ADMIN_PASSWORD`, and other server secrets.
58
+
59
+ <a id="agents-server-env-sendgrid-inbound-parse-hosts"></a>
60
+ - `SENDGRID_INBOUND_PARSE_HOSTS`: Comma-separated list of public hostnames allowed to receive SendGrid Inbound Parse callbacks, for example `mail.example.com,parse.example.com`. The route rejects signed requests delivered through any other `Host` / `X-Forwarded-Host`, so point SendGrid only at the hostnames that are also protected by your reverse-proxy or platform IP allowlisting.
61
+
44
62
  ## Creating servers
45
63
 
46
64
  When creating new Agents server, search across the repository for [☁]
@@ -54,4 +72,3 @@ When creating new Agents server, search across the repository for [☁]
54
72
  - [☁] If using `USE PROJECT` auto-auth, configure [GitHub App integration](./GITHUB_APP.md)
55
73
  - [☁] Add the server to [the list of our servers](https://docs.google.com/spreadsheets/d/1X26iMQqubsxftqD1EJNSlzPYFS94QjCFPXyKdHHDeVs/edit?gid=848307752#gid=848307752)
56
74
  - [☁] Run migration script _(run new instance)_
57
- - [☁] For testing servers, look at the server and change the `CORE_SERVER` to `https://core-test.ptbk.io/`
@@ -32,7 +32,7 @@ GitHub App configuration now lives in **Metadata** so you can customize it per s
32
32
  - **GITHUB_APP_ID** – numeric GitHub App ID from the app settings.
33
33
  - **GITHUB_APP_SLUG** – slug used in `https://github.com/apps/<slug>`.
34
34
  - **GITHUB_APP_PRIVATE_KEY** – PEM-encoded private key. Replace literal newlines with `\n` when editing through the UI and keep the `BEGIN/END` markers.
35
- - **GITHUB_APP_STATE_SECRET** (optional, recommended) – random string used to sign OAuth/connect state. If unset, `ADMIN_PASSWORD` will be used as a fallback.
35
+ - **GITHUB_APP_STATE_SECRET** (optional, recommended) – random string used to sign OAuth/connect state.
36
36
 
37
37
  The values stored in Metadata override any legacy `.env` entries and can differ per server host.
38
38
 
@@ -1,6 +1,8 @@
1
+ import { withSentryConfig } from '@sentry/nextjs';
1
2
  import type { NextConfig } from 'next';
2
3
  import { readdirSync } from 'fs';
3
4
  import path from 'path';
5
+ import { SENTRY_ORGANIZATION, SENTRY_PROJECT } from './src/utils/errorReporting/sentrySdkConfig';
4
6
 
5
7
  /**
6
8
  * Next.js build output directory.
@@ -20,6 +22,18 @@ const agentsServerNodeModulesPath = process.env.PTBK_AGENTS_SERVER_NODE_MODULES_
20
22
  */
21
23
  const isNextValidationIgnored = process.env.PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION === 'true';
22
24
 
25
+ /**
26
+ * Optional worker count override for CLI-owned production builds on memory-constrained VPS hosts.
27
+ */
28
+ const AGENTS_SERVER_BUILD_WORKER_COUNT = parseAgentsServerBuildWorkerCount(
29
+ process.env.PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT,
30
+ );
31
+
32
+ /**
33
+ * Whether Sentry source maps can be uploaded during production builds.
34
+ */
35
+ const IS_SENTRY_SOURCE_MAP_UPLOAD_ENABLED = Boolean(process.env.SENTRY_AUTH_TOKEN);
36
+
23
37
  /**
24
38
  * Exact aliases for local generated Promptbook package entrypoints.
25
39
  */
@@ -50,6 +64,7 @@ const nextConfig: NextConfig = {
50
64
 
51
65
  experimental: {
52
66
  externalDir: true,
67
+ ...(AGENTS_SERVER_BUILD_WORKER_COUNT ? { cpus: AGENTS_SERVER_BUILD_WORKER_COUNT } : {}),
53
68
  },
54
69
 
55
70
  turbopack: {
@@ -122,7 +137,19 @@ const nextConfig: NextConfig = {
122
137
  },
123
138
  };
124
139
 
125
- export default nextConfig;
140
+ export default withSentryConfig(nextConfig, {
141
+ org: SENTRY_ORGANIZATION,
142
+ project: SENTRY_PROJECT,
143
+ silent: true,
144
+ sourcemaps: {
145
+ disable: !IS_SENTRY_SOURCE_MAP_UPLOAD_ENABLED,
146
+ },
147
+ webpack: {
148
+ treeshake: {
149
+ removeDebugLogging: true,
150
+ },
151
+ },
152
+ });
126
153
 
127
154
  /**
128
155
  * Creates webpack/Turbopack aliases from imports like `@promptbook-local/core` to generated local sources.
@@ -143,3 +170,16 @@ function createPromptbookLocalPackageAliases(): Record<string, string> {
143
170
  return {};
144
171
  }
145
172
  }
173
+
174
+ /**
175
+ * Parses a positive integer worker count from the CLI build environment.
176
+ */
177
+ function parseAgentsServerBuildWorkerCount(rawValue: string | undefined): number | undefined {
178
+ const parsedValue = Number(rawValue);
179
+
180
+ if (!Number.isFinite(parsedValue) || parsedValue < 1) {
181
+ return undefined;
182
+ }
183
+
184
+ return Math.floor(parsedValue);
185
+ }
@@ -7,7 +7,7 @@
7
7
  "dev": "next dev -p 4440",
8
8
  "test": "npm run lint && npm run test-build && npm run test-e2e",
9
9
  "test-e2e": "playwright test",
10
- "pretest-build": "npx kill-port 4021",
10
+ "pretest-build": "npx kill-port 4021 4440 || exit 0",
11
11
  "test-build": "node -r ./scripts/ignore-kill-eperm.js ../../node_modules/next/dist/bin/next build && node ./scripts/prerender-homepage.js",
12
12
  "build": "node -r ./scripts/ignore-kill-eperm.js ../../node_modules/next/dist/bin/next build && node ./scripts/prerender-homepage.js",
13
13
  "start": "next start -p 4440",
@@ -26,6 +26,9 @@ const APP_URL = `http://127.0.0.1:${APP_PORT}`;
26
26
  */
27
27
  const APP_E2E_ENV = {
28
28
  ADMIN_PASSWORD: 'e2e-admin-password',
29
+ SESSION_SECRET: 'e2e-session-secret-must-differ-from-admin-password',
30
+ PTBK_AGENTS_SERVER_USER_CHAT_WORKER_TOKEN: 'e2e-user-chat-worker-token-must-differ-from-admin-password',
31
+ PROMPTBOOK_TEAM_AGENT_ACCESS_TOKEN: 'e2e-team-agent-access-token-must-differ-from-admin-password',
29
32
  NEXT_DIST_DIR: '.next-e2e',
30
33
  NEXT_PUBLIC_SITE_URL: APP_URL,
31
34
  PTBK_AGENTS_SERVER_DATABASE: 'supabase',
@@ -45,6 +45,10 @@ const WAIT_TIMEOUT_MS = 15000;
45
45
  * Timeout for the final homepage download once the server is confirmed ready.
46
46
  */
47
47
  const HOME_REQUEST_TIMEOUT_MS = 30000;
48
+ /**
49
+ * Timeout for stopping the temporary production server before escalating cleanup.
50
+ */
51
+ const STOP_SERVER_TIMEOUT_MS = 10000;
48
52
  /**
49
53
  * When enabled, homepage prerender failures abort the whole build.
50
54
  */
@@ -136,6 +140,65 @@ function waitForServerReady(serverProcess) {
136
140
  });
137
141
  }
138
142
 
143
+ /**
144
+ * Waits briefly for the temporary production server to exit after cleanup starts.
145
+ *
146
+ * @param serverProcess - Spawned `next start` child process.
147
+ * @param gracefulExit - Promise resolved by the child `exit` event.
148
+ * @returns Whether the child exited within the timeout window.
149
+ */
150
+ async function waitForServerStop(serverProcess, gracefulExit) {
151
+ if (serverProcess.exitCode !== null || serverProcess.signalCode !== null) {
152
+ return true;
153
+ }
154
+
155
+ return await Promise.race([
156
+ gracefulExit.then(() => true),
157
+ new Promise((resolve) => setTimeout(() => resolve(false), STOP_SERVER_TIMEOUT_MS)),
158
+ ]);
159
+ }
160
+
161
+ /**
162
+ * Force-stops the temporary production server when normal shutdown does not finish in time.
163
+ *
164
+ * Windows can leave `next start` alive after an `EPERM` kill attempt, so use `taskkill`
165
+ * against the exact PID before giving up on cleanup.
166
+ *
167
+ * @param serverProcess - Spawned `next start` child process.
168
+ */
169
+ async function forceStopServer(serverProcess) {
170
+ if (serverProcess.exitCode !== null || serverProcess.signalCode !== null) {
171
+ return;
172
+ }
173
+
174
+ if (process.platform !== 'win32') {
175
+ try {
176
+ serverProcess.kill('SIGKILL');
177
+ } catch (error) {
178
+ if (!isIgnorableStopServerError(error)) {
179
+ throw error;
180
+ }
181
+ }
182
+ return;
183
+ }
184
+
185
+ await new Promise((resolve, reject) => {
186
+ const taskKillProcess = spawn('taskkill', ['/PID', String(serverProcess.pid), '/T', '/F'], {
187
+ stdio: 'ignore',
188
+ });
189
+
190
+ taskKillProcess.on('error', reject);
191
+ taskKillProcess.on('exit', (code) => {
192
+ if (code === 0 || serverProcess.exitCode !== null || serverProcess.signalCode !== null) {
193
+ resolve();
194
+ return;
195
+ }
196
+
197
+ reject(new Error(`Failed to stop temporary production server process ${serverProcess.pid} with taskkill.`));
198
+ });
199
+ });
200
+ }
201
+
139
202
  /**
140
203
  * Runs the production server for the built app, captures `/`, and keeps the HTML.
141
204
  */
@@ -196,7 +259,19 @@ async function prerenderHomePage() {
196
259
  } finally {
197
260
  detachStopServerHandlers();
198
261
  stopServer();
199
- await gracefulExit;
262
+
263
+ if (!(await waitForServerStop(serverProcess, gracefulExit))) {
264
+ console.warn(
265
+ `Timed out waiting ${STOP_SERVER_TIMEOUT_MS}ms for the temporary production server to stop. Trying a forceful shutdown.`,
266
+ );
267
+ await forceStopServer(serverProcess);
268
+
269
+ if (!(await waitForServerStop(serverProcess, gracefulExit))) {
270
+ console.warn(
271
+ `Timed out waiting ${STOP_SERVER_TIMEOUT_MS}ms for the temporary production server after forceful shutdown.`,
272
+ );
273
+ }
274
+ }
200
275
  }
201
276
  }
202
277
 
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import { useRouter } from 'next/navigation';
4
3
  import { FileCard } from '../components/Homepage/FileCard';
5
4
  import { useAgentNaming } from '../components/AgentNaming/AgentNamingContext';
6
5
  import { showAlert } from '../components/AsyncDialogs/asyncDialogs';
@@ -21,15 +20,11 @@ type AddAgentButtonProps = {
21
20
  * Renders the add-agent card and creation dialog workflow.
22
21
  */
23
22
  export function AddAgentButton({ currentFolderId }: AddAgentButtonProps) {
24
- const router = useRouter();
25
23
  const { formatText } = useAgentNaming();
26
24
  const { t } = useServerLanguage();
27
25
  const addButtonLabel = formatText(t('agentCreation.addButtonLabel'));
28
26
 
29
27
  const { isPreparingDialog, openNewAgentDialog, dialog } = useNewAgentDialog({
30
- onCreated: ({ targetPath }) => {
31
- router.push(targetPath);
32
- },
33
28
  onCreateFailed: async (error) => {
34
29
  console.error('Failed to create agent:', error);
35
30
  await showAlert({
@@ -0,0 +1 @@
1
+ export { default, generateMetadata } from '../agents/[agentName]/layout';