@promptbook/vercel 0.113.0-0 → 0.113.0-10

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 (242) hide show
  1. package/README.md +1 -17
  2. package/esm/index.es.js +122 -122
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/_packages/types.index.d.ts +2 -2
  5. package/esm/src/avatars/renderAvatarVisualAsciiArt.d.ts +98 -0
  6. package/esm/src/avatars/visuals/octopus3dAvatarVisualShared.d.ts +1 -1
  7. package/esm/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +1 -1
  8. package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.d.ts +120 -0
  9. package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/clearScheduledTimer.d.ts +6 -0
  10. package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/enqueueFilesForUpload.d.ts +26 -0
  11. package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadEditorSync.d.ts +23 -0
  12. package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadItemsState.d.ts +21 -0
  13. package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadProgressQueue.d.ts +12 -0
  14. package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.d.ts +27 -0
  15. package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads/useCompletedUploadsAutoClear.d.ts +12 -0
  16. package/esm/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +5 -58
  17. package/esm/src/book-components/Chat/Chat/ChatImageAttachmentModal.d.ts +25 -0
  18. package/esm/src/book-components/Chat/Chat/ChatInputArea.d.ts +3 -0
  19. package/esm/src/book-components/Chat/Chat/ChatMessageAttachments.d.ts +27 -0
  20. package/esm/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -1
  21. package/esm/src/book-components/Chat/Chat/ChatMessageList.d.ts +1 -0
  22. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +8 -0
  23. package/esm/src/book-components/Chat/Chat/CitationIframePreview.d.ts +2 -2
  24. package/esm/src/book-components/Chat/Chat/CitationIframePreview.test.d.ts +2 -0
  25. package/esm/src/book-components/Chat/Chat/insertDictationChunk.d.ts +1 -1
  26. package/esm/src/book-components/Chat/Chat/insertDictationChunk.test.d.ts +1 -0
  27. package/esm/src/book-components/Chat/Chat/learnDictationDictionary.test.d.ts +1 -0
  28. package/esm/src/book-components/Chat/Chat/refineFinalDictationChunk.test.d.ts +1 -0
  29. package/esm/src/book-components/Chat/Chat/useChatInputAreaComposer.d.ts +12 -0
  30. package/esm/src/book-components/Chat/Chat/useChatInputAreaComposer.draftMessage.test.d.ts +2 -0
  31. package/esm/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +1 -1
  32. package/esm/src/book-components/Chat/utils/parseMessageButtons.d.ts +16 -2
  33. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_FILENAME.d.ts +6 -0
  34. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_VERSION.d.ts +6 -0
  35. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_NEXT_BUILD_ID_FILENAME.d.ts +6 -0
  36. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCache.d.ts +10 -0
  37. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCacheOptions.d.ts +10 -0
  38. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/NODE_MODULES_DIRECTORY_NAME.d.ts +6 -0
  39. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/PreparedAgentsServerRuntime.d.ts +18 -0
  40. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.d.ts +6 -0
  41. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +28 -0
  42. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.d.ts +19 -0
  43. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/getAgentsServerBuildInputRelativePaths.d.ts +11 -0
  44. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPath.d.ts +6 -0
  45. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPathMaterialized.d.ts +6 -0
  46. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildCacheCurrent.d.ts +7 -0
  47. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildInputTestFile.d.ts +6 -0
  48. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputDirectoryName.d.ts +6 -0
  49. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputPath.d.ts +6 -0
  50. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerRuntimeSourcePath.d.ts +6 -0
  51. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isFile.d.ts +6 -0
  52. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/isPathInsideNodeModules.d.ts +6 -0
  53. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/normalizeAgentsServerBuildInputPath.d.ts +6 -0
  54. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/prepareAgentsServerRuntime.d.ts +9 -0
  55. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/readAgentsServerBuildCache.d.ts +8 -0
  56. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerAppPath.d.ts +6 -0
  57. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildAppPath.d.ts +9 -0
  58. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildOutputPath.d.ts +7 -0
  59. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNextCliPath.d.ts +6 -0
  60. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNodeModulesPath.d.ts +6 -0
  61. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.d.ts +12 -0
  62. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/shouldCopyAgentsServerRuntimePath.d.ts +6 -0
  63. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/synchronizeMaterializedAgentsServerRuntime.d.ts +11 -0
  64. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/writeAgentsServerBuildCache.d.ts +7 -0
  65. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +8 -109
  66. package/esm/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.d.ts +1 -1
  67. package/esm/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.d.ts +1 -1
  68. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.d.ts +16 -0
  69. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerLogStreams.d.ts +30 -0
  70. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.d.ts +19 -0
  71. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.d.ts +37 -0
  72. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/LocalAgentRunnerLimits.d.ts +9 -0
  73. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.d.ts +13 -0
  74. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.d.ts +24 -0
  75. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.d.ts +6 -0
  76. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.d.ts +9 -0
  77. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.d.ts +13 -0
  78. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/loadAgentsServerProjectEnvironment.d.ts +6 -0
  79. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.d.ts +18 -0
  80. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/readInternalRouteErrorDetails.d.ts +6 -0
  81. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/resolveAgentsServerChildHostname.d.ts +7 -0
  82. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.d.ts +20 -0
  83. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts +15 -0
  84. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/stopChildProcess.d.ts +8 -0
  85. package/esm/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.d.ts +16 -0
  86. package/esm/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +3 -30
  87. package/esm/src/cli/cli-commands/common/createPositiveIntegerOptionParser.d.ts +10 -0
  88. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +1 -1
  89. package/esm/src/collection/agent-collection/CreateAgentInput.d.ts +1 -1
  90. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +1 -1
  91. package/esm/src/commitments/META/META.d.ts +2 -2
  92. package/esm/src/commitments/META_AVATAR/META_AVATAR.d.ts +9 -4
  93. package/esm/src/commitments/index.d.ts +1 -1
  94. package/esm/src/conversion/validation/validatePipeline/createPipelineValidationContext.d.ts +16 -0
  95. package/esm/src/conversion/validation/validatePipeline/validatePipelineCollectionsStructure.d.ts +7 -0
  96. package/esm/src/conversion/validation/validatePipeline/validatePipelineDependencyResolution.d.ts +7 -0
  97. package/esm/src/conversion/validation/validatePipeline/validatePipelineMetadata.d.ts +7 -0
  98. package/esm/src/conversion/validation/validatePipeline/validatePipelineParameters.d.ts +7 -0
  99. package/esm/src/conversion/validation/validatePipeline/validatePipelineTasks.d.ts +7 -0
  100. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/RegisteredLlmToolsMessageContext.d.ts +46 -0
  101. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/USED_ENV_FILENAME.d.ts +11 -0
  102. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.d.ts +7 -0
  103. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolEntryKey.d.ts +7 -0
  104. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolInstallationStatusMessage.d.ts +7 -0
  105. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolStatus.d.ts +14 -0
  106. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolsMessageContext.d.ts +7 -0
  107. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/getAvailableRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
  108. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/getRegisteredLlmToolRegisters.d.ts +7 -0
  109. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/hasRegisteredLlmToolEntry.d.ts +7 -0
  110. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolEntries.d.ts +9 -0
  111. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolStatuses.d.ts +7 -0
  112. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.d.ts +7 -0
  113. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderNoRegisteredLlmToolsMessage.d.ts +7 -0
  114. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRegisteredLlmToolsMessage.d.ts +8 -0
  115. package/esm/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
  116. package/esm/src/utils/agent-message-runtime/agentMessageRuntimePaths.d.ts +24 -0
  117. package/esm/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +2 -2
  118. package/esm/src/utils/ascii-art/$detectTerminalAnsiColorDepth.d.ts +15 -0
  119. package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +80 -0
  120. package/esm/src/utils/color/Color.d.ts +1 -1
  121. package/esm/src/version.d.ts +1 -1
  122. package/package.json +2 -2
  123. package/umd/index.umd.js +122 -122
  124. package/umd/index.umd.js.map +1 -1
  125. package/umd/src/_packages/types.index.d.ts +2 -2
  126. package/umd/src/avatars/renderAvatarVisualAsciiArt.d.ts +98 -0
  127. package/umd/src/avatars/visuals/octopus3dAvatarVisualShared.d.ts +1 -1
  128. package/umd/src/book-components/BookEditor/BookEditorMonacoUploadPanel.d.ts +1 -1
  129. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/bookEditorMonacoUploadTypes.d.ts +120 -0
  130. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/clearScheduledTimer.d.ts +6 -0
  131. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/enqueueFilesForUpload.d.ts +26 -0
  132. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadEditorSync.d.ts +23 -0
  133. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadItemsState.d.ts +21 -0
  134. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadProgressQueue.d.ts +12 -0
  135. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useBookEditorMonacoUploadQueue.d.ts +27 -0
  136. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads/useCompletedUploadsAutoClear.d.ts +12 -0
  137. package/umd/src/book-components/BookEditor/useBookEditorMonacoUploads.d.ts +5 -58
  138. package/umd/src/book-components/Chat/Chat/ChatImageAttachmentModal.d.ts +25 -0
  139. package/umd/src/book-components/Chat/Chat/ChatInputArea.d.ts +3 -0
  140. package/umd/src/book-components/Chat/Chat/ChatMessageAttachments.d.ts +27 -0
  141. package/umd/src/book-components/Chat/Chat/ChatMessageItem.d.ts +1 -1
  142. package/umd/src/book-components/Chat/Chat/ChatMessageList.d.ts +1 -0
  143. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +8 -0
  144. package/umd/src/book-components/Chat/Chat/CitationIframePreview.d.ts +2 -2
  145. package/umd/src/book-components/Chat/Chat/CitationIframePreview.test.d.ts +2 -0
  146. package/umd/src/book-components/Chat/Chat/insertDictationChunk.d.ts +1 -1
  147. package/umd/src/book-components/Chat/Chat/insertDictationChunk.test.d.ts +1 -0
  148. package/umd/src/book-components/Chat/Chat/learnDictationDictionary.test.d.ts +1 -0
  149. package/umd/src/book-components/Chat/Chat/refineFinalDictationChunk.test.d.ts +1 -0
  150. package/umd/src/book-components/Chat/Chat/useChatInputAreaComposer.d.ts +12 -0
  151. package/umd/src/book-components/Chat/Chat/useChatInputAreaComposer.draftMessage.test.d.ts +2 -0
  152. package/umd/src/book-components/Chat/utils/isVisibleChatToolCall.d.ts +1 -1
  153. package/umd/src/book-components/Chat/utils/parseMessageButtons.d.ts +16 -2
  154. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_FILENAME.d.ts +6 -0
  155. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_BUILD_CACHE_VERSION.d.ts +6 -0
  156. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AGENTS_SERVER_NEXT_BUILD_ID_FILENAME.d.ts +6 -0
  157. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCache.d.ts +10 -0
  158. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/AgentsServerBuildCacheOptions.d.ts +10 -0
  159. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/NODE_MODULES_DIRECTORY_NAME.d.ts +6 -0
  160. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/PreparedAgentsServerRuntime.d.ts +18 -0
  161. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerBuildSourceFingerprint.d.ts +6 -0
  162. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +28 -0
  163. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.d.ts +19 -0
  164. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/getAgentsServerBuildInputRelativePaths.d.ts +11 -0
  165. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPath.d.ts +6 -0
  166. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerAppPathMaterialized.d.ts +6 -0
  167. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildCacheCurrent.d.ts +7 -0
  168. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isAgentsServerBuildInputTestFile.d.ts +6 -0
  169. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputDirectoryName.d.ts +6 -0
  170. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerBuildInputPath.d.ts +6 -0
  171. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isExcludedAgentsServerRuntimeSourcePath.d.ts +6 -0
  172. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isFile.d.ts +6 -0
  173. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/isPathInsideNodeModules.d.ts +6 -0
  174. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/normalizeAgentsServerBuildInputPath.d.ts +6 -0
  175. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/prepareAgentsServerRuntime.d.ts +9 -0
  176. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/readAgentsServerBuildCache.d.ts +8 -0
  177. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerAppPath.d.ts +6 -0
  178. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildAppPath.d.ts +9 -0
  179. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveAgentsServerBuildOutputPath.d.ts +7 -0
  180. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNextCliPath.d.ts +6 -0
  181. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/resolveNodeModulesPath.d.ts +6 -0
  182. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/runNextBuild.d.ts +12 -0
  183. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/shouldCopyAgentsServerRuntimePath.d.ts +6 -0
  184. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/synchronizeMaterializedAgentsServerRuntime.d.ts +11 -0
  185. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/writeAgentsServerBuildCache.d.ts +7 -0
  186. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer.d.ts +8 -109
  187. package/umd/src/cli/cli-commands/agents-server/ensureAgentsServerEnvFile.d.ts +1 -1
  188. package/umd/src/cli/cli-commands/agents-server/ensureAgentsServerGitignoreFile.d.ts +1 -1
  189. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerChildEnvironment.d.ts +16 -0
  190. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerLogStreams.d.ts +30 -0
  191. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerRuntimePaths.d.ts +19 -0
  192. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/AgentsServerSupervisorState.d.ts +37 -0
  193. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/LocalAgentRunnerLimits.d.ts +9 -0
  194. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/PreparedAgentsServerLaunch.d.ts +13 -0
  195. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/StartAgentsServerOptions.d.ts +24 -0
  196. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/createInternalRouteErrorMessage.d.ts +6 -0
  197. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.d.ts +9 -0
  198. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/forwardChildOutput.d.ts +13 -0
  199. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/loadAgentsServerProjectEnvironment.d.ts +6 -0
  200. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/prepareAgentsServerLaunch.d.ts +18 -0
  201. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/readInternalRouteErrorDetails.d.ts +6 -0
  202. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/resolveAgentsServerChildHostname.d.ts +7 -0
  203. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/startNextServer.d.ts +20 -0
  204. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/startUserChatJobWorkerPump.d.ts +15 -0
  205. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/stopChildProcess.d.ts +8 -0
  206. package/umd/src/cli/cli-commands/agents-server/startAgentsServer/waitForLocalAgentRunnerLimits.d.ts +16 -0
  207. package/umd/src/cli/cli-commands/agents-server/startAgentsServer.d.ts +3 -30
  208. package/umd/src/cli/cli-commands/common/createPositiveIntegerOptionParser.d.ts +10 -0
  209. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +1 -1
  210. package/umd/src/collection/agent-collection/CreateAgentInput.d.ts +1 -1
  211. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/prepareAgentSourceForPersistence.d.ts +1 -1
  212. package/umd/src/commitments/META/META.d.ts +2 -2
  213. package/umd/src/commitments/META_AVATAR/META_AVATAR.d.ts +9 -4
  214. package/umd/src/commitments/index.d.ts +1 -1
  215. package/umd/src/conversion/validation/validatePipeline/createPipelineValidationContext.d.ts +16 -0
  216. package/umd/src/conversion/validation/validatePipeline/validatePipelineCollectionsStructure.d.ts +7 -0
  217. package/umd/src/conversion/validation/validatePipeline/validatePipelineDependencyResolution.d.ts +7 -0
  218. package/umd/src/conversion/validation/validatePipeline/validatePipelineMetadata.d.ts +7 -0
  219. package/umd/src/conversion/validation/validatePipeline/validatePipelineParameters.d.ts +7 -0
  220. package/umd/src/conversion/validation/validatePipeline/validatePipelineTasks.d.ts +7 -0
  221. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/RegisteredLlmToolsMessageContext.d.ts +46 -0
  222. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/USED_ENV_FILENAME.d.ts +11 -0
  223. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolConfigurationStatusMessage.d.ts +7 -0
  224. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolEntryKey.d.ts +7 -0
  225. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolInstallationStatusMessage.d.ts +7 -0
  226. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolStatus.d.ts +14 -0
  227. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/createRegisteredLlmToolsMessageContext.d.ts +7 -0
  228. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/getAvailableRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
  229. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/getRegisteredLlmToolRegisters.d.ts +7 -0
  230. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/hasRegisteredLlmToolEntry.d.ts +7 -0
  231. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolEntries.d.ts +9 -0
  232. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/listRegisteredLlmToolStatuses.d.ts +7 -0
  233. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderAvailableRegisteredLlmTools.d.ts +7 -0
  234. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderNoRegisteredLlmToolsMessage.d.ts +7 -0
  235. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRegisteredLlmToolsMessage.d.ts +8 -0
  236. package/umd/src/llm-providers/_common/register/$registeredLlmToolsMessage/renderRelevantRegisteredLlmToolsEnvironmentVariables.d.ts +7 -0
  237. package/umd/src/utils/agent-message-runtime/agentMessageRuntimePaths.d.ts +24 -0
  238. package/umd/src/utils/agents/resolveAgentAvatarImageUrl.d.ts +2 -2
  239. package/umd/src/utils/ascii-art/$detectTerminalAnsiColorDepth.d.ts +15 -0
  240. package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +80 -0
  241. package/umd/src/utils/color/Color.d.ts +1 -1
  242. package/umd/src/version.d.ts +1 -1
@@ -0,0 +1,12 @@
1
+ import type { SetUploadItems, UploadDecorationIdsRef, UploadFilesRef, UploadItem } from './bookEditorMonacoUploadTypes';
2
+ /**
3
+ * Clears upload UI state shortly after all uploads finish.
4
+ *
5
+ * @private function of BookEditorMonaco
6
+ */
7
+ export declare function useCompletedUploadsAutoClear({ uploadItems, uploadFilesRef, uploadDecorationIdsRef, setUploadItems, }: {
8
+ readonly uploadItems: ReadonlyArray<UploadItem>;
9
+ readonly uploadFilesRef: UploadFilesRef;
10
+ readonly uploadDecorationIdsRef: UploadDecorationIdsRef;
11
+ readonly setUploadItems: SetUploadItems;
12
+ }): void;
@@ -1,62 +1,10 @@
1
1
  import type { editor } from 'monaco-editor';
2
- import type { Promisable } from 'type-fest';
2
+ import type { BookEditorMonacoOnFileUpload } from './useBookEditorMonacoUploads/bookEditorMonacoUploadTypes';
3
+ export type { UploadItem, UploadStats } from './useBookEditorMonacoUploads/bookEditorMonacoUploadTypes';
3
4
  /**
4
5
  * Type describing monaco editor.
5
6
  */
6
7
  type MonacoEditor = typeof import('monaco-editor');
7
- /**
8
- * Type describing upload status.
9
- */
10
- type UploadStatus = 'queued' | 'uploading' | 'paused' | 'completed' | 'failed';
11
- /**
12
- * Type describing upload item.
13
- */
14
- export type UploadItem = {
15
- readonly id: string;
16
- readonly fileName: string;
17
- readonly fileSize: number;
18
- readonly status: UploadStatus;
19
- readonly progress: number;
20
- readonly loadedBytes: number;
21
- readonly totalBytes: number;
22
- readonly startedAt: number | null;
23
- readonly completedAt: number | null;
24
- readonly errorMessage?: string;
25
- };
26
- /**
27
- * Type describing upload stats.
28
- */
29
- export type UploadStats = {
30
- readonly totalFiles: number;
31
- readonly queuedFiles: number;
32
- readonly uploadingFiles: number;
33
- readonly pausedFiles: number;
34
- readonly failedFiles: number;
35
- readonly completedFiles: number;
36
- readonly totalBytes: number;
37
- readonly uploadedBytes: number;
38
- readonly progress: number;
39
- readonly elapsedMs: number;
40
- readonly speedBytesPerSecond: number;
41
- };
42
- /**
43
- * Type describing book editor monaco upload progress callback.
44
- */
45
- type BookEditorMonacoUploadProgressCallback = (progress: number, stats?: {
46
- loadedBytes: number;
47
- totalBytes: number;
48
- }) => void;
49
- /**
50
- * Options for book editor monaco upload.
51
- */
52
- type BookEditorMonacoUploadOptions = {
53
- readonly onProgress?: BookEditorMonacoUploadProgressCallback;
54
- readonly abortSignal?: AbortSignal;
55
- };
56
- /**
57
- * Type describing book editor monaco on file upload.
58
- */
59
- type BookEditorMonacoOnFileUpload = (file: File, options?: BookEditorMonacoUploadOptions | BookEditorMonacoUploadProgressCallback) => Promisable<string>;
60
8
  /**
61
9
  * Props for use book editor monaco uploads.
62
10
  */
@@ -71,11 +19,10 @@ type UseBookEditorMonacoUploadsProps = {
71
19
  * @private function of BookEditorMonaco
72
20
  */
73
21
  export declare function useBookEditorMonacoUploads({ editor, monaco, onFileUpload }: UseBookEditorMonacoUploadsProps): {
74
- activeUploadItems: UploadItem[];
75
- uploadItems: UploadItem[];
76
- uploadStats: UploadStats;
22
+ activeUploadItems: import("./useBookEditorMonacoUploads/bookEditorMonacoUploadTypes").UploadItem[];
23
+ uploadItems: import("./useBookEditorMonacoUploads/bookEditorMonacoUploadTypes").UploadItem[];
24
+ uploadStats: import("./useBookEditorMonacoUploads/bookEditorMonacoUploadTypes").UploadStats;
77
25
  handleFiles: (files: File[]) => Promise<void>;
78
26
  pauseUpload: (uploadId: string) => void;
79
27
  resumeUpload: (uploadId: string) => void;
80
28
  };
81
- export {};
@@ -0,0 +1,25 @@
1
+ /// <reference types="react" />
2
+ import type { ChatMessage } from '../types/ChatMessage';
3
+ /**
4
+ * One attachment payload displayed by the chat image preview modal.
5
+ *
6
+ * @private type of `<ChatImageAttachmentModal/>`
7
+ */
8
+ type ChatImageAttachment = NonNullable<ChatMessage['attachments']>[number];
9
+ /**
10
+ * Props for the chat image attachment preview modal.
11
+ *
12
+ * @private props of `<ChatImageAttachmentModal/>`
13
+ */
14
+ type ChatImageAttachmentModalProps = {
15
+ readonly attachment: ChatImageAttachment | null;
16
+ readonly mode?: 'LIGHT' | 'DARK';
17
+ readonly onClose: () => void;
18
+ };
19
+ /**
20
+ * Modal that previews an image attachment without leaving the chat surface.
21
+ *
22
+ * @private component of `<Chat/>`
23
+ */
24
+ export declare function ChatImageAttachmentModal({ attachment, mode, onClose }: ChatImageAttachmentModalProps): import("react").ReactPortal | null;
25
+ export {};
@@ -4,6 +4,7 @@ import type { WithTake } from '../../../utils/take/interfaces/ITakeChain';
4
4
  import type { ChatMessage } from '../types/ChatMessage';
5
5
  import type { ChatParticipant } from '../types/ChatParticipant';
6
6
  import type { ChatProps, ChatSoundSystem } from './ChatProps';
7
+ import type { ChatComposerDraft } from './useChatInputAreaComposer';
7
8
  /**
8
9
  * Wrapper for consistent button-click sound handling.
9
10
  *
@@ -22,6 +23,7 @@ export type ChatInputAreaProps = {
22
23
  speechRecognition?: ChatProps['speechRecognition'];
23
24
  speechRecognitionLanguage?: ChatProps['speechRecognitionLanguage'];
24
25
  defaultMessage?: string;
26
+ draftMessage?: ChatComposerDraft;
25
27
  replyingToMessage?: ChatMessage | null;
26
28
  onCancelReply?: ChatProps['onCancelReply'];
27
29
  enterBehavior?: ChatProps['enterBehavior'];
@@ -36,6 +38,7 @@ export type ChatInputAreaProps = {
36
38
  onButtonClick: ChatInputButtonClickHandler;
37
39
  chatInputClassName?: string;
38
40
  chatUiTranslations?: ChatProps['chatUiTranslations'];
41
+ mode?: 'LIGHT' | 'DARK';
39
42
  };
40
43
  /**
41
44
  * Renders the chat input area with text, file upload, and voice controls.
@@ -0,0 +1,27 @@
1
+ import { type CSSProperties } from 'react';
2
+ import type { ChatMessage } from '../types/ChatMessage';
3
+ /**
4
+ * One uploaded file attached to a chat message.
5
+ *
6
+ * @private type of `<Chat/>`
7
+ */
8
+ export type ChatMessageAttachment = NonNullable<ChatMessage['attachments']>[number];
9
+ /**
10
+ * Props accepted by the shared attachment chip list.
11
+ *
12
+ * @private props of `<Chat/>`
13
+ */
14
+ type ChatMessageAttachmentsProps = {
15
+ readonly attachments: ReadonlyArray<ChatMessageAttachment>;
16
+ readonly mode: 'LIGHT' | 'DARK';
17
+ readonly className?: string;
18
+ readonly style?: CSSProperties;
19
+ readonly onRemoveAttachment?: (attachment: ChatMessageAttachment, attachmentIndex: number) => void;
20
+ };
21
+ /**
22
+ * Renders chat attachment chips and the shared image preview modal.
23
+ *
24
+ * @private component of `<Chat/>`
25
+ */
26
+ export declare function ChatMessageAttachments({ attachments, mode, className, style, onRemoveAttachment, }: ChatMessageAttachmentsProps): import("react/jsx-runtime").JSX.Element | null;
27
+ export {};
@@ -9,7 +9,7 @@ import type { ChatProps } from './ChatProps';
9
9
  *
10
10
  * @private props for internal subcomponent
11
11
  */
12
- type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'onQuickMessageButton' | 'participants'> & {
12
+ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'onQuickMessageButton' | 'onQuickMessageDraftButton' | 'participants'> & {
13
13
  message: ChatMessage;
14
14
  participant: ChatParticipant | undefined;
15
15
  isLastMessage: boolean;
@@ -44,6 +44,7 @@ export type ChatMessageListProps = {
44
44
  onMessage?: (messageContent: string) => Promisable<void>;
45
45
  onActionButton?: ChatProps['onActionButton'];
46
46
  onQuickMessageButton?: ChatProps['onQuickMessageButton'];
47
+ onQuickMessageDraftButton?: ChatProps['onQuickMessageDraftButton'];
47
48
  onReplyToMessage?: ChatProps['onReplyToMessage'];
48
49
  canReplyToMessage?: ChatProps['canReplyToMessage'];
49
50
  onCreateAgent?: (bookContent: string) => void;
@@ -474,6 +474,14 @@ export type ChatProps = {
474
474
  * When not provided, quick message buttons fall back to `onMessage`.
475
475
  */
476
476
  onQuickMessageButton?(messageContent: string): Promisable<void>;
477
+ /**
478
+ * Called when user clicks a quick draft-message button parsed from message markdown.
479
+ *
480
+ * Unlike `onQuickMessageButton`, this prefills the composer with an editable draft
481
+ * instead of sending the message. When not provided, `<Chat/>` prefills its own
482
+ * composer so the draft can be edited before sending.
483
+ */
484
+ onQuickMessageDraftButton?(messageDraftContent: string): Promisable<void>;
477
485
  /**
478
486
  * Optional callback fired when the user starts replying to one existing message.
479
487
  */
@@ -9,8 +9,8 @@ export type CitationIframePreviewProps = {
9
9
  };
10
10
  /**
11
11
  * Renders a citation URL preview as an iframe when the target page allows embedding,
12
- * or falls back to a server-side screenshot with an "Open in new tab" link when it
13
- * does not (e.g. X-Frame-Options: DENY / SAMEORIGIN).
12
+ * or falls back to a live server-side browser stream with an "Open in new tab" link
13
+ * when it does not (e.g. X-Frame-Options: DENY / SAMEORIGIN).
14
14
  *
15
15
  * Embedding capability is determined by `GET /api/page-preview/check?url=<url>`.
16
16
  * If that endpoint is unavailable the component falls back to the iframe directly.
@@ -0,0 +1,2 @@
1
+ /** @jest-environment jsdom */
2
+ export {};
@@ -8,7 +8,7 @@ export declare function insertDictationChunk(params: {
8
8
  readonly dictatedText: string;
9
9
  readonly selectionStart: number;
10
10
  readonly selectionEnd: number;
11
- readonly shouldReplaceSelection: boolean;
11
+ readonly isReplacingSelection: boolean;
12
12
  }): {
13
13
  nextValue: string;
14
14
  start: number;
@@ -2,6 +2,17 @@ import { type ChangeEvent, type KeyboardEvent as ReactKeyboardEvent, type Mutabl
2
2
  import type { ChatMessage } from '../types/ChatMessage';
3
3
  import type { ChatInputUploadedFile } from './ChatInputUploadedFile';
4
4
  import type { ChatProps, ChatSoundSystem } from './ChatProps';
5
+ /**
6
+ * One programmatic request to replace the composer content with an editable draft.
7
+ *
8
+ * A fresh object identity is used for every request so repeated draft insertions
9
+ * (even with identical text) re-apply to the composer.
10
+ *
11
+ * @private function of `<ChatInputArea/>`
12
+ */
13
+ export type ChatComposerDraft = {
14
+ readonly content: string;
15
+ };
5
16
  /**
6
17
  * Props for `useChatInputAreaComposer`.
7
18
  *
@@ -11,6 +22,7 @@ type UseChatInputAreaComposerProps = {
11
22
  readonly onMessage?: ChatProps['onMessage'];
12
23
  readonly onChange?: ChatProps['onChange'];
13
24
  readonly defaultMessage?: string;
25
+ readonly draftMessage?: ChatComposerDraft;
14
26
  readonly enterBehavior?: ChatProps['enterBehavior'];
15
27
  readonly resolveEnterBehavior?: ChatProps['resolveEnterBehavior'];
16
28
  readonly isFocusedOnLoad?: boolean;
@@ -0,0 +1,2 @@
1
+ /** @jest-environment jsdom */
2
+ export {};
@@ -1,4 +1,4 @@
1
- import { type ToolCall } from '../../../types/ToolCall';
1
+ import type { ToolCall } from '../../../types/ToolCall';
2
2
  /**
3
3
  * Returns true when one tool call represents a user-facing action.
4
4
  *
@@ -8,6 +8,19 @@ export type MessageQuickButton = {
8
8
  text: string;
9
9
  message: string;
10
10
  };
11
+ /**
12
+ * Represents a quick draft-message button parsed from chat markdown.
13
+ *
14
+ * Unlike `MessageQuickButton`, clicking this button prefills the composer with an
15
+ * editable draft instead of sending the message immediately.
16
+ *
17
+ * @private internal helper type of `MessageButton`
18
+ */
19
+ export type MessageDraftQuickButton = {
20
+ type: 'messageDraft';
21
+ text: string;
22
+ messageDraft: string;
23
+ };
11
24
  /**
12
25
  * Represents a quick action button parsed from chat markdown.
13
26
  *
@@ -23,9 +36,10 @@ export type ActionQuickButton = {
23
36
  *
24
37
  * @public exported from `@promptbook/components`
25
38
  */
26
- export type MessageButton = MessageQuickButton | ActionQuickButton;
39
+ export type MessageButton = MessageQuickButton | MessageDraftQuickButton | ActionQuickButton;
27
40
  /**
28
- * Parses markdown quick buttons in the format `[Button Text](?message=...)` or `[Button Text](?action=...)`.
41
+ * Parses markdown quick buttons in the format `[Button Text](?message=...)`, `[Button Text](?messageDraft=...)`
42
+ * or `[Button Text](?action=...)`.
29
43
  * Returns both the content without supported quick buttons and the extracted button definitions.
30
44
  *
31
45
  * @param content The markdown content that may contain buttons
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Metadata file stored beside the production Next build output.
3
+ *
4
+ * @private internal constant of `buildAgentsServer`
5
+ */
6
+ export declare const AGENTS_SERVER_BUILD_CACHE_FILENAME = ".ptbk-agents-server-build-cache.json";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Version of the CLI-owned Agents Server build cache metadata.
3
+ *
4
+ * @private internal constant of `buildAgentsServer`
5
+ */
6
+ export declare const AGENTS_SERVER_BUILD_CACHE_VERSION = 1;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Next production build marker required before a cached build is reused.
3
+ *
4
+ * @private internal constant of `buildAgentsServer`
5
+ */
6
+ export declare const AGENTS_SERVER_NEXT_BUILD_ID_FILENAME = "BUILD_ID";
@@ -0,0 +1,10 @@
1
+ import { AGENTS_SERVER_BUILD_CACHE_VERSION } from './AGENTS_SERVER_BUILD_CACHE_VERSION';
2
+ /**
3
+ * Metadata persisted after one successful Agents Server production build.
4
+ *
5
+ * @private internal type of `buildAgentsServer`
6
+ */
7
+ export type AgentsServerBuildCache = {
8
+ readonly version: typeof AGENTS_SERVER_BUILD_CACHE_VERSION;
9
+ readonly sourceFingerprint: string;
10
+ };
@@ -0,0 +1,10 @@
1
+ /// <reference types="node" />
2
+ /**
3
+ * Input paths required to validate or update the cached Agents Server build.
4
+ *
5
+ * @private internal type of `buildAgentsServer`
6
+ */
7
+ export type AgentsServerBuildCacheOptions = {
8
+ readonly appPath: string;
9
+ readonly environment?: NodeJS.ProcessEnv;
10
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Directory segment used for Node package installs.
3
+ *
4
+ * @private internal constant of `buildAgentsServer`
5
+ */
6
+ export declare const NODE_MODULES_DIRECTORY_NAME = "node_modules";
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Paths needed after the Agents Server production build is ready.
3
+ *
4
+ * @private internal type of `buildAgentsServer`
5
+ */
6
+ export type AgentsServerBuildArtifacts = {
7
+ readonly appPath: string;
8
+ readonly nodeModulesPath: string;
9
+ readonly nextCliPath: string;
10
+ };
11
+ /**
12
+ * Runtime paths resolved for Agents Server commands before choosing build or dev execution.
13
+ *
14
+ * @private internal type of `buildAgentsServer`
15
+ */
16
+ export type PreparedAgentsServerRuntime = AgentsServerBuildArtifacts & {
17
+ readonly isAppPathMaterialized: boolean;
18
+ };
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Fingerprints all runtime source paths that can affect the local Agents Server build.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function createAgentsServerBuildSourceFingerprint(appPath: string): Promise<string>;
@@ -0,0 +1,28 @@
1
+ /// <reference types="node" />
2
+ /**
3
+ * Environment variable passed to the bundled Next app so webpack can resolve dependencies
4
+ * installed beside `ptbk` even when the app sources are materialized into a project cache.
5
+ *
6
+ * @private internal constant of `buildAgentsServer`
7
+ */
8
+ export declare const PTBK_AGENTS_SERVER_NODE_MODULES_PATH_ENV = "PTBK_AGENTS_SERVER_NODE_MODULES_PATH";
9
+ /**
10
+ * Environment variable consumed by `apps/agents-server/next.config.ts` to throttle build workers.
11
+ *
12
+ * @private internal constant of `buildAgentsServer`
13
+ */
14
+ export declare const PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT_ENV = "PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT";
15
+ /**
16
+ * Environment variable used only by the CLI-owned production build.
17
+ *
18
+ * @private internal constant of `buildAgentsServer`
19
+ */
20
+ export declare const PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV = "PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION";
21
+ /**
22
+ * Adds dependency-resolution environment required by the materialized Agents Server runtime.
23
+ *
24
+ * @private internal utility of `buildAgentsServer`
25
+ */
26
+ export declare function createAgentsServerRuntimeEnvironment(environment: NodeJS.ProcessEnv, nodeModulesPath: string, options?: {
27
+ readonly isNextValidationIgnored?: boolean;
28
+ }): NodeJS.ProcessEnv;
@@ -0,0 +1,19 @@
1
+ /// <reference types="node" />
2
+ import type { PreparedAgentsServerRuntime } from './PreparedAgentsServerRuntime';
3
+ /**
4
+ * Inputs controlling one cached Agents Server production build.
5
+ */
6
+ type EnsureAgentsServerBuildOptions = {
7
+ readonly appPath?: string;
8
+ readonly environment?: NodeJS.ProcessEnv;
9
+ readonly isBuildForced?: boolean;
10
+ readonly onBuildEvent?: (event: string) => void;
11
+ readonly onBuildOutput?: (chunk: string) => void;
12
+ };
13
+ /**
14
+ * Ensures that the local Agents Server production build exists and matches its source fingerprint.
15
+ *
16
+ * @private internal utility of `buildAgentsServer`
17
+ */
18
+ export declare function ensureAgentsServerBuild(options?: EnsureAgentsServerBuildOptions): Promise<PreparedAgentsServerRuntime>;
19
+ export {};
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Runtime paths copied into the CLI package and used by the Agents Server production build.
3
+ */
4
+ declare const AGENTS_SERVER_BUILD_INPUT_RELATIVE_PATHS: readonly ["apps/agents-server", "apps/_common", "src", "books", "package.json", "package-lock.json", "security.config.ts", "servers.ts", "tsconfig.json"];
5
+ /**
6
+ * Returns runtime input paths that can affect the materialized runtime and build fingerprint.
7
+ *
8
+ * @private internal utility of `buildAgentsServer`
9
+ */
10
+ export declare function getAgentsServerBuildInputRelativePaths(): typeof AGENTS_SERVER_BUILD_INPUT_RELATIVE_PATHS;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns true when one folder contains the Next Agents Server app marker files.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function isAgentsServerAppPath(candidate: string): Promise<boolean>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns true when the app path points at the project-local materialized runtime.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function isAgentsServerAppPathMaterialized(appPath: string): boolean;
@@ -0,0 +1,7 @@
1
+ import type { AgentsServerBuildCacheOptions } from './AgentsServerBuildCacheOptions';
2
+ /**
3
+ * Returns true when the production build marker and source fingerprint still match.
4
+ *
5
+ * @private internal utility of `buildAgentsServer`
6
+ */
7
+ export declare function isAgentsServerBuildCacheCurrent(options: AgentsServerBuildCacheOptions): Promise<boolean>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns true for test files that should not affect packaged Agents Server builds.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function isAgentsServerBuildInputTestFile(inputBasename: string): boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns true when a directory segment should not affect Agents Server production builds.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function isExcludedAgentsServerBuildInputDirectoryName(directoryName: string): boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns true for non-build files and folders inside shared runtime source paths.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function isExcludedAgentsServerBuildInputPath(inputPath: string, runtimeRootPath: string): boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns true for runtime source files and folders that are not needed by the Agents Server build.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function isExcludedAgentsServerRuntimeSourcePath(sourceRuntimeRelativePath: string): boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns true when one path exists as a regular file.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function isFile(path: string): Promise<boolean>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns true when one path is nested below a `node_modules` segment.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function isPathInsideNodeModules(path: string): boolean;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Normalizes one absolute runtime path so cache fingerprints are stable across platforms.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function normalizeAgentsServerBuildInputPath(runtimeRootPath: string, inputPath: string): string;
@@ -0,0 +1,9 @@
1
+ import type { PreparedAgentsServerRuntime } from './PreparedAgentsServerRuntime';
2
+ /**
3
+ * Resolves the runtime app and dependency paths shared by Agents Server start and dev commands.
4
+ *
5
+ * @private internal utility of `buildAgentsServer`
6
+ */
7
+ export declare function prepareAgentsServerRuntime(options?: {
8
+ readonly appPath?: string;
9
+ }): Promise<PreparedAgentsServerRuntime>;
@@ -0,0 +1,8 @@
1
+ import type { AgentsServerBuildCache } from './AgentsServerBuildCache';
2
+ import type { AgentsServerBuildCacheOptions } from './AgentsServerBuildCacheOptions';
3
+ /**
4
+ * Reads and validates cached build metadata.
5
+ *
6
+ * @private internal utility of `buildAgentsServer`
7
+ */
8
+ export declare function readAgentsServerBuildCache(options: AgentsServerBuildCacheOptions): Promise<AgentsServerBuildCache | undefined>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Finds the Agents Server app in a source checkout or generated CLI package.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function resolveAgentsServerAppPath(): Promise<string>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Uses the source checkout app directly, but copies npm-packaged app sources out of `node_modules`.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function resolveAgentsServerBuildAppPath(options: {
7
+ readonly nodeModulesPath: string;
8
+ readonly sourceAppPath: string;
9
+ }): Promise<string>;
@@ -0,0 +1,7 @@
1
+ import type { AgentsServerBuildCacheOptions } from './AgentsServerBuildCacheOptions';
2
+ /**
3
+ * Resolves the Next output directory used by a particular build environment.
4
+ *
5
+ * @private internal utility of `buildAgentsServer`
6
+ */
7
+ export declare function resolveAgentsServerBuildOutputPath(options: AgentsServerBuildCacheOptions): string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Resolves the Next CLI module installed alongside the Promptbook CLI.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function resolveNextCliPath(): string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Resolves the dependency root that contains the installed Next CLI.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function resolveNodeModulesPath(nextCliPath: string): string;
@@ -0,0 +1,12 @@
1
+ /// <reference types="node" />
2
+ /**
3
+ * Runs the finite Next production build used by local Agents Server commands.
4
+ *
5
+ * @private internal utility of `buildAgentsServer`
6
+ */
7
+ export declare function runNextBuild(options: {
8
+ readonly appPath: string;
9
+ readonly environment: NodeJS.ProcessEnv;
10
+ readonly nextCliPath: string;
11
+ readonly onBuildOutput?: (chunk: string) => void;
12
+ }): Promise<void>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Excludes build artifacts, dependency folders, private env files, and test sources.
3
+ *
4
+ * @private internal utility of `buildAgentsServer`
5
+ */
6
+ export declare function shouldCopyAgentsServerRuntimePath(sourcePath: string, sourceRootPath: string): boolean;