@promptbook/javascript 0.114.0-1 → 0.114.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 (256) hide show
  1. package/README.md +20 -27
  2. package/esm/index.es.js +1 -1
  3. package/esm/index.es.js.map +1 -1
  4. package/esm/src/_packages/components.index.d.ts +4 -0
  5. package/esm/src/_packages/types.index.d.ts +4 -0
  6. package/esm/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  7. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  8. package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
  9. package/esm/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +1 -15
  10. package/esm/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +1 -1
  11. package/esm/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +0 -4
  12. package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  13. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  14. package/esm/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
  15. package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +72 -0
  16. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
  17. package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +2 -3
  18. package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
  19. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
  20. package/esm/src/cli/cli-commands/coder/ping.d.ts +10 -0
  21. package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
  22. package/esm/src/cli/cli-commands/coder.d.ts +1 -0
  23. package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
  24. package/esm/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.d.ts → npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
  25. package/{umd/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts → esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  26. package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  27. package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  28. package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  29. package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  30. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
  31. package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  32. package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  33. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  34. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  35. package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  36. package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  37. package/esm/src/cli/common/loadPromptsModule.d.ts +16 -0
  38. package/esm/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
  39. package/esm/src/commitments/META_ID/META_ID.d.ts +32 -0
  40. package/esm/src/commitments/index.d.ts +4 -12
  41. package/esm/src/llm-providers/agent/Agent.d.ts +1 -1
  42. package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  43. package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
  44. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
  45. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +2 -2
  46. package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
  47. package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
  48. package/esm/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
  49. package/esm/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
  50. package/esm/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
  51. package/esm/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
  52. package/esm/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
  53. package/esm/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
  54. package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  55. package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  56. package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  57. package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  58. package/esm/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
  59. package/esm/src/utils/misc/debounce.d.ts +4 -2
  60. package/esm/src/version.d.ts +1 -1
  61. package/package.json +2 -2
  62. package/umd/index.umd.js +1 -1
  63. package/umd/index.umd.js.map +1 -1
  64. package/umd/src/_packages/components.index.d.ts +4 -0
  65. package/umd/src/_packages/types.index.d.ts +4 -0
  66. package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  67. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  68. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
  69. package/umd/src/book-2.0/book-language-documentation/BookLanguageManualDictionary.d.ts +1 -15
  70. package/umd/src/book-2.0/book-language-documentation/getBookLanguageManualCommitmentGroups.d.ts +1 -1
  71. package/umd/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.d.ts +0 -4
  72. package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  73. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  74. package/umd/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
  75. package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +72 -0
  76. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
  77. package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +2 -3
  78. package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
  79. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
  80. package/umd/src/cli/cli-commands/coder/ping.d.ts +10 -0
  81. package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
  82. package/umd/src/cli/cli-commands/coder.d.ts +1 -0
  83. package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
  84. package/umd/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.d.ts → npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
  85. package/{esm/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts → umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  86. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  87. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  88. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  89. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  90. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
  91. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  92. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  93. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
  94. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  95. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  96. package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  97. package/umd/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  98. package/umd/src/cli/common/loadPromptsModule.d.ts +16 -0
  99. package/umd/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
  100. package/umd/src/commitments/META_ID/META_ID.d.ts +32 -0
  101. package/umd/src/commitments/index.d.ts +4 -12
  102. package/umd/src/llm-providers/agent/Agent.d.ts +1 -1
  103. package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  104. package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
  105. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
  106. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +2 -2
  107. package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
  108. package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
  109. package/umd/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
  110. package/umd/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
  111. package/umd/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
  112. package/umd/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
  113. package/umd/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
  114. package/umd/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
  115. package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  116. package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  117. package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  118. package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  119. package/umd/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
  120. package/umd/src/utils/misc/debounce.d.ts +4 -2
  121. package/umd/src/utils/misc/debounce.test.d.ts +1 -0
  122. package/umd/src/version.d.ts +1 -1
  123. package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  124. package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  125. package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -48
  126. package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
  127. package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
  128. package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
  129. package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
  130. package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
  131. package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
  132. package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  133. package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
  134. package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
  135. package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
  136. package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
  137. package/esm/src/commitments/META/META.d.ts +0 -65
  138. package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
  139. package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
  140. package/esm/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
  141. package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
  142. package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
  143. package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
  144. package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
  145. package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
  146. package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
  147. package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
  148. package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
  149. package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
  150. package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
  151. package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
  152. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
  153. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
  154. package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
  155. package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
  156. package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
  157. package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
  158. package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  159. package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
  160. package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
  161. package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
  162. package/esm/src/commitments/WALLET/WALLET.d.ts +0 -21
  163. package/esm/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
  164. package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
  165. package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
  166. package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
  167. package/esm/src/commitments/WALLET/createWalletTools.d.ts +0 -7
  168. package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
  169. package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
  170. package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
  171. package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
  172. package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
  173. package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
  174. package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
  175. package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  176. package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  177. package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -48
  178. package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
  179. package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
  180. package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
  181. package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
  182. package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
  183. package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
  184. package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  185. package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
  186. package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
  187. package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
  188. package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
  189. package/umd/src/commitments/META/META.d.ts +0 -65
  190. package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
  191. package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
  192. package/umd/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
  193. package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
  194. package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
  195. package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
  196. package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
  197. package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
  198. package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
  199. package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
  200. package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
  201. package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
  202. package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
  203. package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
  204. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
  205. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
  206. package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
  207. package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
  208. package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
  209. package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
  210. package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  211. package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
  212. package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
  213. package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
  214. package/umd/src/commitments/WALLET/WALLET.d.ts +0 -21
  215. package/umd/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
  216. package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
  217. package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
  218. package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
  219. package/umd/src/commitments/WALLET/createWalletTools.d.ts +0 -7
  220. package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
  221. package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
  222. package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
  223. package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
  224. package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
  225. package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
  226. package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
  227. /package/esm/src/{book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
  228. /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
  229. /package/esm/src/cli/cli-commands/{common/harness/isHarnessVersionOutdated.test.d.ts → coder/boilerplateCount.test.d.ts} +0 -0
  230. /package/esm/src/{commitments/MEMORY/MEMORY.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
  231. /package/esm/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → cli/cli-commands/coder/ping.test.d.ts} +0 -0
  232. /package/esm/src/{commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts} +0 -0
  233. /package/esm/src/{commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts} +0 -0
  234. /package/esm/src/{commitments/USE_EMAIL/USE_EMAIL.test.d.ts → cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts} +0 -0
  235. /package/esm/src/{commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts} +0 -0
  236. /package/esm/src/{commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts} +0 -0
  237. /package/esm/src/{commitments/USE_SPAWN/USE_SPAWN.test.d.ts → cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts} +0 -0
  238. /package/esm/src/{commitments/USE_TIME/USE_TIME.test.d.ts → cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts} +0 -0
  239. /package/esm/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts} +0 -0
  240. /package/esm/src/{commitments/WALLET/WALLET.test.d.ts → cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts} +0 -0
  241. /package/esm/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
  242. /package/{umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → esm/src/utils/misc/debounce.test.d.ts} +0 -0
  243. /package/umd/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
  244. /package/umd/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
  245. /package/umd/src/{commitments/MEMORY/MEMORY.test.d.ts → cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
  246. /package/umd/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
  247. /package/umd/src/{commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → cli/cli-commands/coder/ping.test.d.ts} +0 -0
  248. /package/umd/src/{commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts} +0 -0
  249. /package/umd/src/{commitments/USE_EMAIL/USE_EMAIL.test.d.ts → cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts} +0 -0
  250. /package/umd/src/{commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts} +0 -0
  251. /package/umd/src/{commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts} +0 -0
  252. /package/umd/src/{commitments/USE_SPAWN/USE_SPAWN.test.d.ts → cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts} +0 -0
  253. /package/umd/src/{commitments/USE_TIME/USE_TIME.test.d.ts → cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts} +0 -0
  254. /package/umd/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts} +0 -0
  255. /package/umd/src/{commitments/WALLET/WALLET.test.d.ts → cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts} +0 -0
  256. /package/umd/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
@@ -72,6 +72,52 @@ export type AvatarVisualRenderContext = {
72
72
  * @private shared contract for the avatar rendering system
73
73
  */
74
74
  export type AvatarVisual = (context: AvatarVisualRenderContext) => void;
75
+ /**
76
+ * One painted character cell of a terminal-text avatar frame.
77
+ *
78
+ * @private shared contract for the avatar rendering system
79
+ */
80
+ export type AvatarVisualTerminalTextCell = {
81
+ /**
82
+ * Single character painted in the cell.
83
+ */
84
+ readonly character: string;
85
+ /**
86
+ * Color of the character as a CSS color string, optionally with an alpha channel.
87
+ */
88
+ readonly color: string_color;
89
+ };
90
+ /**
91
+ * One rendered terminal-text avatar frame as a grid of character cells.
92
+ *
93
+ * Rows are ordered top to bottom, cells left to right, and `null` leaves the terminal background visible.
94
+ *
95
+ * @private shared contract for the avatar rendering system
96
+ */
97
+ export type AvatarVisualTerminalTextGrid = ReadonlyArray<ReadonlyArray<AvatarVisualTerminalTextCell | null>>;
98
+ /**
99
+ * Rendering context forwarded to a terminal-text avatar visual.
100
+ *
101
+ * Unlike `AvatarVisualRenderContext` this carries no canvas, because the visual paints
102
+ * character cells of a fixed terminal grid instead of pixels.
103
+ *
104
+ * @private shared contract for the avatar rendering system
105
+ */
106
+ export type AvatarVisualTerminalTextRenderContext = {
107
+ readonly columns: number;
108
+ readonly rows: number;
109
+ readonly timeMs: number;
110
+ readonly avatarDefinition: AvatarDefinition;
111
+ readonly palette: AvatarPalette;
112
+ readonly createRandom: (salt: string) => () => number;
113
+ readonly interaction: AvatarInteractionState;
114
+ };
115
+ /**
116
+ * Signature of one terminal-text avatar visual renderer.
117
+ *
118
+ * @private shared contract for the avatar rendering system
119
+ */
120
+ export type AvatarVisualTerminalText = (context: AvatarVisualTerminalTextRenderContext) => AvatarVisualTerminalTextGrid;
75
121
  /**
76
122
  * Metadata and renderer for one built-in avatar visual.
77
123
  *
@@ -84,6 +130,14 @@ export type AvatarVisualDefinition = {
84
130
  readonly isAnimated: boolean;
85
131
  readonly supportsPointerTracking?: boolean;
86
132
  readonly render: AvatarVisual;
133
+ /**
134
+ * Optional native terminal renderer of visuals which are themselves made of characters.
135
+ *
136
+ * Character-based visuals lose their identity when they are rasterized onto a canvas and
137
+ * converted back into half-block ASCII art, so they paint the terminal character grid directly.
138
+ * Visuals without this renderer are rasterized through `renderAvatarVisualAsciiArt` instead.
139
+ */
140
+ readonly renderTerminalText?: AvatarVisualTerminalText;
87
141
  };
88
142
  /**
89
143
  * Props of the shared `<Avatar/>` component.
@@ -31,13 +31,13 @@ export type BookParameter = {
31
31
  };
32
32
  /**
33
33
  * Capability of the agent
34
- * This is parsed from commitments like USE BROWSER, USE SEARCH ENGINE, KNOWLEDGE, etc.
34
+ * This is parsed from commitments like USE CALENDAR, USE PROJECT, KNOWLEDGE, etc.
35
35
  */
36
36
  export type AgentCapability = {
37
37
  /**
38
38
  * The type of the capability
39
39
  */
40
- type: 'browser' | 'search-engine' | 'knowledge' | 'timeout' | 'time' | 'user-location' | 'inheritance' | 'import' | 'image-generator' | 'team' | 'email' | 'popup' | 'privacy' | 'project' | 'calendar' | 'wallet';
40
+ type: 'knowledge' | 'user-location' | 'inheritance' | 'import' | 'image-generator' | 'team' | 'popup' | 'privacy' | 'project' | 'calendar';
41
41
  /**
42
42
  * The label to display for this capability
43
43
  */
@@ -122,7 +122,7 @@ export type AgentBasicInformation = {
122
122
  parameters: Array<BookParameter>;
123
123
  /**
124
124
  * Capabilities of the agent
125
- * This is parsed from commitments like USE BROWSER, USE SEARCH ENGINE, KNOWLEDGE, etc.
125
+ * This is parsed from commitments like USE CALENDAR, USE PROJECT, KNOWLEDGE, etc.
126
126
  */
127
127
  capabilities: Array<AgentCapability>;
128
128
  /**
@@ -86,9 +86,7 @@ export type BookLanguageManualDictionary = {
86
86
  readonly metadataLabels: {
87
87
  readonly bookLanguageVersion: string;
88
88
  readonly generatedAt: string;
89
- readonly commitmentGroups: string;
90
- readonly implementedCommitments: string;
91
- readonly placeholderCommitments: string;
89
+ readonly commitmentCount: string;
92
90
  };
93
91
  /**
94
92
  * Heading of the table of contents.
@@ -128,7 +126,6 @@ export type BookLanguageManualDictionary = {
128
126
  readonly primitivesSections: {
129
127
  readonly coreSyntax: BookLanguageManualChapter;
130
128
  readonly references: BookLanguageManualChapter;
131
- readonly keywordsTitle: string;
132
129
  };
133
130
  /**
134
131
  * Suffixes distinguishing a server-specific catalog from the portable one.
@@ -141,18 +138,7 @@ export type BookLanguageManualDictionary = {
141
138
  * Labels used in every commitment catalog entry.
142
139
  */
143
140
  readonly commitmentLabels: {
144
- readonly status: string;
145
141
  readonly aliases: string;
146
- readonly semantics: string;
147
- readonly typeSchema: string;
148
- readonly blockSchema: string;
149
- readonly lowLevelNotice: string;
150
- readonly usage: string;
151
- readonly usageOccurrence: string;
152
- readonly usageOccurrences: string;
153
- readonly statusImplemented: string;
154
- readonly statusPlaceholder: string;
155
- readonly noAliases: string;
156
142
  };
157
143
  /**
158
144
  * Labels used by end-to-end example sections.
@@ -16,7 +16,7 @@ export type BookLanguageManualCommitmentGroups = {
16
16
  */
17
17
  readonly documented: ReadonlyArray<BookLanguageManualCommitmentGroup>;
18
18
  /**
19
- * Low-level and unfinished commitments documented in their own closing chapter.
19
+ * Low-level commitments documented in their own closing chapter.
20
20
  */
21
21
  readonly lowLevel: ReadonlyArray<BookLanguageManualCommitmentGroup>;
22
22
  };
@@ -10,10 +10,6 @@ export type RenderCommitmentCatalogSectionOptions = {
10
10
  * Grouped commitment definition with aliases.
11
11
  */
12
12
  readonly groupedCommitment: BookLanguageManualCommitmentGroup;
13
- /**
14
- * Number of uses across the selected server agents.
15
- */
16
- readonly usageCount: number;
17
13
  /**
18
14
  * Translated labels of the manual.
19
15
  */
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Relative directory for an active TEAM conversation workspace.
3
+ *
4
+ * @private internal convention shared by the Agents Server and agent-folder runner
5
+ */
6
+ export declare const AGENT_TEAM_CONVERSATIONS_DIRECTORY_PATH: string;
7
+ /**
8
+ * Relative directory where completed TEAM conversation transcripts are retained.
9
+ *
10
+ * @private internal convention shared by the Agents Server and agent-folder runner
11
+ */
12
+ export declare const AGENT_FINISHED_TEAM_CONVERSATIONS_DIRECTORY_PATH: string;
13
+ /**
14
+ * Name of the JSON manifest that describes one TEAM conversation workspace.
15
+ *
16
+ * @private internal convention shared by the Agents Server and agent-folder runner
17
+ */
18
+ export declare const AGENT_TEAM_CONVERSATION_MANIFEST_FILE_NAME = "team.json";
19
+ /**
20
+ * Name of the read-only teammate-source directory inside one TEAM workspace.
21
+ *
22
+ * @private internal convention shared by the Agents Server and agent-folder runner
23
+ */
24
+ export declare const AGENT_TEAMMATE_SOURCES_DIRECTORY_NAME = "teammates";
25
+ /**
26
+ * One primary agent represented in a TEAM workspace manifest.
27
+ *
28
+ * @private internal convention shared by the Agents Server and agent-folder runner
29
+ */
30
+ export type AgentTeamConversationPrimaryAgent = {
31
+ readonly permanentId: string;
32
+ readonly agentName: string;
33
+ };
34
+ /**
35
+ * One local teammate made available to the coding harness for a single user turn.
36
+ *
37
+ * @private internal convention shared by the Agents Server and agent-folder runner
38
+ */
39
+ export type AgentTeamConversationTeammate = {
40
+ readonly permanentId: string;
41
+ readonly agentName: string;
42
+ readonly url: string;
43
+ readonly instructions: string;
44
+ readonly sourceFileName: string;
45
+ };
46
+ /**
47
+ * Persisted roster snapshot for the optional TEAM workspace of one queued message.
48
+ *
49
+ * @private internal convention shared by the Agents Server and agent-folder runner
50
+ */
51
+ export type AgentTeamConversationWorkspaceManifest = {
52
+ readonly version: 1;
53
+ readonly primaryAgent: AgentTeamConversationPrimaryAgent;
54
+ readonly teammates: ReadonlyArray<AgentTeamConversationTeammate>;
55
+ };
56
+ /**
57
+ * Creates the stable directory name that belongs to one queued `.book` message.
58
+ *
59
+ * @private internal convention shared by the Agents Server and agent-folder runner
60
+ */
61
+ export declare function createAgentTeamConversationWorkspaceDirectoryName(messageFileName: string): string;
62
+ /**
63
+ * Creates the relative active workspace path for one queued message.
64
+ *
65
+ * @private internal convention shared by the Agents Server and agent-folder runner
66
+ */
67
+ export declare function createAgentTeamConversationWorkspacePath(messageFileName: string): string;
68
+ /**
69
+ * Creates the relative completed-workspace path for one queued message.
70
+ *
71
+ * @private internal convention shared by the Agents Server and agent-folder runner
72
+ */
73
+ export declare function createFinishedAgentTeamConversationWorkspacePath(messageFileName: string): string;
74
+ /**
75
+ * Creates the source-snapshot file name for one teammate.
76
+ *
77
+ * @private internal convention shared by the Agents Server and agent-folder runner
78
+ */
79
+ export declare function createAgentTeamTeammateSourceFileName(teammatePermanentId: string): string;
80
+ /**
81
+ * Checks whether unknown JSON has the minimum shape required for a TEAM workspace manifest.
82
+ *
83
+ * @private internal convention shared by the Agents Server and agent-folder runner
84
+ */
85
+ export declare function isAgentTeamConversationWorkspaceManifest(value: unknown): value is AgentTeamConversationWorkspaceManifest;
@@ -591,8 +591,9 @@ export type ChatProps = {
591
591
  progress?: number;
592
592
  }>;
593
593
  /**
594
- * Content to be shown inside the chat bar in head
595
- * If not provided, the chat bar will not be rendered
594
+ * Optional content displayed in the chat header above the message list.
595
+ *
596
+ * If not provided, the header row is not rendered.
596
597
  */
597
598
  readonly children?: ReactNode;
598
599
  /**
@@ -0,0 +1,11 @@
1
+ import type { WindowLike as DomWindowLike } from 'dompurify';
2
+ /**
3
+ * Provides a DOM `window` for runtimes which do not have one, for example Node.js during server-side rendering
4
+ *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it creates and caches one shared DOM window
6
+ *
7
+ * @returns DOM window which can back a DOM-dependent library like `DOMPurify`
8
+ * @throws {EnvironmentMismatchError} When the current runtime can not create a DOM window
9
+ * @private utility of `renderMarkdown`
10
+ */
11
+ export declare function $provideServerDomWindow(): DomWindowLike;
@@ -1,4 +1,22 @@
1
1
  import type { string_html, string_markdown } from '../../../types/string_markdown';
2
+ /**
3
+ * Attribute marking a client action generated for an inline-reference menu.
4
+ *
5
+ * @private utility shared with `MarkdownContent`
6
+ */
7
+ export declare const MARKDOWN_INLINE_REFERENCE_MENU_ACTION_ATTRIBUTE = "data-promptbook-inline-reference-menu-action";
8
+ /**
9
+ * Attribute identifying the inline reference which owns a client menu action.
10
+ *
11
+ * @private utility shared with `MarkdownContent`
12
+ */
13
+ export declare const MARKDOWN_INLINE_REFERENCE_MENU_ACTION_REFERENCE_ATTRIBUTE = "data-promptbook-inline-reference-menu-action-reference";
14
+ /**
15
+ * Attribute marking a favicon rendered inside an inline-reference chip.
16
+ *
17
+ * @private utility shared with `MarkdownContent`
18
+ */
19
+ export declare const MARKDOWN_INLINE_REFERENCE_ICON_ATTRIBUTE = "data-promptbook-inline-reference-icon";
2
20
  /**
3
21
  * Options for markdown rendering.
4
22
  */
@@ -17,6 +35,13 @@ export type MarkdownInlineReference = {
17
35
  * Raw reference text between `[[` and `]]`.
18
36
  */
19
37
  readonly reference: string;
38
+ /**
39
+ * Optional text aliases which should render as this reference when an agent mentions them in markdown.
40
+ *
41
+ * They are also accepted inside a `[[reference]]` token. This lets application code use a stable
42
+ * technical reference while recognizing a human-facing name in older messages.
43
+ */
44
+ readonly sourceTextAliases?: ReadonlyArray<string>;
20
45
  /**
21
46
  * Human-readable label rendered inside the link chip.
22
47
  */
@@ -25,15 +50,43 @@ export type MarkdownInlineReference = {
25
50
  * Link target for the rendered reference.
26
51
  */
27
52
  readonly href: string;
53
+ /**
54
+ * Optional URL prefixes which also identify this reference in the authored markdown.
55
+ *
56
+ * A markdown link or a bare URL pointing to one of these prefixes is rendered as the same chip
57
+ * as the `[[reference]]` token. Both absolute URLs (for example `https://project.example.com`)
58
+ * and application paths (for example `/agents/agent/projects/website`) are supported; a path
59
+ * prefix matches on any host so that both relative and absolute links are recognized.
60
+ */
61
+ readonly sourceHrefPrefixes?: ReadonlyArray<string>;
28
62
  /**
29
63
  * Optional hover title for the rendered reference.
30
64
  */
31
65
  readonly title?: string;
66
+ /**
67
+ * Optional favicon and text fallback rendered before the reference label.
68
+ */
69
+ readonly icon?: MarkdownInlineReferenceIcon;
32
70
  /**
33
71
  * Optional expandable menu shown when the reference chip is clicked.
34
72
  */
35
73
  readonly menu?: MarkdownInlineReferenceMenu;
36
74
  };
75
+ /**
76
+ * Visual identity rendered inside one markdown inline-reference chip.
77
+ *
78
+ * @public exported from `@promptbook/components`
79
+ */
80
+ export type MarkdownInlineReferenceIcon = {
81
+ /**
82
+ * Optional image URL. The fallback remains visible when the image is unavailable.
83
+ */
84
+ readonly src?: string | null;
85
+ /**
86
+ * Short text rendered when the image is missing or broken.
87
+ */
88
+ readonly fallbackText: string;
89
+ };
37
90
  /**
38
91
  * Status displayed alongside an expandable markdown inline reference.
39
92
  *
@@ -67,6 +120,25 @@ export type MarkdownInlineReferenceMenuOption = {
67
120
  * Optional hover text for the option.
68
121
  */
69
122
  readonly title?: string;
123
+ /**
124
+ * Optional client action rendered as a button instead of a link.
125
+ */
126
+ readonly action?: MarkdownInlineReferenceMenuAction;
127
+ };
128
+ /**
129
+ * Client-side action exposed by an expandable markdown inline-reference menu.
130
+ *
131
+ * @public exported from `@promptbook/components`
132
+ */
133
+ export type MarkdownInlineReferenceMenuAction = {
134
+ /**
135
+ * Stable identifier unique within the owning reference menu.
136
+ */
137
+ readonly id: string;
138
+ /**
139
+ * Callback invoked when the menu button is selected.
140
+ */
141
+ readonly onSelect: () => void | Promise<void>;
70
142
  };
71
143
  /**
72
144
  * Expandable menu configuration for a markdown inline reference.
@@ -18,6 +18,12 @@ export declare const PTBK_AGENTS_SERVER_BUILD_WORKER_COUNT_ENV = "PTBK_AGENTS_SE
18
18
  * @private internal constant of `buildAgentsServer`
19
19
  */
20
20
  export declare const PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV = "PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION";
21
+ /**
22
+ * Environment variable that disables throwaway webpack filesystem caches for CLI-owned production builds.
23
+ *
24
+ * @private internal constant of `buildAgentsServer`
25
+ */
26
+ export declare const PTBK_AGENTS_SERVER_DISABLE_WEBPACK_FILESYSTEM_CACHE_ENV = "PTBK_AGENTS_SERVER_DISABLE_WEBPACK_FILESYSTEM_CACHE";
21
27
  /**
22
28
  * Adds dependency-resolution environment required by the materialized Agents Server runtime.
23
29
  *
@@ -25,4 +31,5 @@ export declare const PTBK_AGENTS_SERVER_IGNORE_NEXT_VALIDATION_ENV = "PTBK_AGENT
25
31
  */
26
32
  export declare function createAgentsServerRuntimeEnvironment(environment: NodeJS.ProcessEnv, nodeModulesPath: string, options?: {
27
33
  readonly isNextValidationIgnored?: boolean;
34
+ readonly isWebpackFilesystemCacheDisabled?: boolean;
28
35
  }): NodeJS.ProcessEnv;
@@ -1,3 +1,4 @@
1
+ import { string_markdown } from '../../../types/typeAliases';
1
2
  /**
2
3
  * Relative path to the Promptbook Coder quick-reference file initialized in project roots.
3
4
  *
@@ -9,6 +10,4 @@ export declare const AGENT_CODING_FILE_PATH = "AGENT_CODING.md";
9
10
  *
10
11
  * @private internal utility of `ptbk coder`
11
12
  */
12
- export declare function getDefaultCoderAgentCodingFileContent({ packageJsonScripts, }: {
13
- readonly packageJsonScripts: Readonly<Record<string, string>>;
14
- }): string;
13
+ export declare function getDefaultCoderAgentCodingFileContent(): string_markdown;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * How many prompt boilerplate files are generated and how many prompts each of them contains.
3
+ *
4
+ * @private internal utility of `ptbk coder`
5
+ */
6
+ export type BoilerplateCount = {
7
+ /**
8
+ * Number of generated prompt boilerplate files.
9
+ */
10
+ readonly filesCount: number;
11
+ /**
12
+ * Number of prompts written into each generated file.
13
+ *
14
+ * Note: More than one prompt per file is an advanced option - each prompt is one separate
15
+ * coding task separated by `---`, with all prompts in the file sharing its fresh emoji tag.
16
+ */
17
+ readonly promptsPerFileCount: number;
18
+ };
19
+ /**
20
+ * Number of prompt boilerplate files and prompts per file used when `--count` is not provided.
21
+ *
22
+ * @private internal utility of `ptbk coder`
23
+ */
24
+ export declare const DEFAULT_BOILERPLATE_COUNT: BoilerplateCount;
25
+ /**
26
+ * Formats one boilerplate count back into the `N*M` notation of the `--count` option.
27
+ *
28
+ * @private internal utility of `ptbk coder`
29
+ */
30
+ export declare function formatBoilerplateCount({ filesCount, promptsPerFileCount }: BoilerplateCount): string;
31
+ /**
32
+ * Default value of the `--count` option rendered in the `N*M` notation, for example `5*1`.
33
+ *
34
+ * @private internal utility of `ptbk coder`
35
+ */
36
+ export declare const DEFAULT_BOILERPLATE_COUNT_OPTION_VALUE: string;
37
+ /**
38
+ * Description of the `--count` option shared by all commands which generate prompt boilerplates.
39
+ *
40
+ * @private internal utility of `ptbk coder`
41
+ */
42
+ export declare const BOILERPLATE_COUNT_OPTION_DESCRIPTION: string;
43
+ /**
44
+ * Parses the `--count` option value into the number of files and the number of prompts in each of them.
45
+ *
46
+ * Both notations are supported:
47
+ * - `N` and `N*1` => N files with one prompt each
48
+ * - `N*M` => N files with M prompts each
49
+ *
50
+ * @private internal utility of `ptbk coder`
51
+ */
52
+ export declare function parseBoilerplateCount(countOption: string): BoilerplateCount;
@@ -1,5 +1,6 @@
1
1
  import type { Command as Program } from 'commander';
2
2
  import type { $side_effect } from '../../../utils/organization/$side_effect';
3
+ import type { BoilerplateCount } from './boilerplateCount';
3
4
  /**
4
5
  * Initializes `coder generate-boilerplates` command for Promptbook CLI utilities
5
6
  *
@@ -9,12 +10,12 @@ import type { $side_effect } from '../../../utils/organization/$side_effect';
9
10
  */
10
11
  export declare function $initializeCoderGenerateBoilerplatesCommand(program: Program): $side_effect;
11
12
  /**
12
- * Generates boilerplate prompt files with unique emoji tags.
13
+ * Generates boilerplate prompt files with one unique emoji tag per file.
13
14
  *
14
15
  * @private internal function of `generatePromptBoilerplate` command
15
16
  */
16
- export declare function generatePromptBoilerplate({ projectPath, filesCount, templateOption, }: {
17
+ export declare function generatePromptBoilerplate({ projectPath, boilerplateCount, templateOption, }: {
17
18
  readonly projectPath: string;
18
- readonly filesCount: number;
19
+ readonly boilerplateCount: BoilerplateCount;
19
20
  readonly templateOption?: string;
20
21
  }): Promise<void>;
@@ -0,0 +1,10 @@
1
+ import type { Command as Program } from 'commander';
2
+ import type { $side_effect } from '../../../utils/organization/$side_effect';
3
+ /**
4
+ * Initializes `coder ping` command for Promptbook CLI utilities
5
+ *
6
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
7
+ *
8
+ * @private internal function of `promptbookCli`
9
+ */
10
+ export declare function $initializeCoderPingCommand(program: Program): $side_effect;
@@ -1,4 +1,4 @@
1
- import type { Command as Program } from 'commander';
1
+ import { Command as Program } from 'commander';
2
2
  import type { $side_effect } from '../../../utils/organization/$side_effect';
3
3
  /**
4
4
  * Initializes `coder verify` command for Promptbook CLI utilities
@@ -9,6 +9,7 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
9
9
  * - generate-boilerplates: Generate prompt boilerplate files
10
10
  * - find-refactor-candidates: Find files that need refactoring
11
11
  * - run: Run coding prompts with AI agents
12
+ * - ping: Test one harness and model with a tiny dummy prompt
12
13
  * - verify: Verify completed prompts
13
14
  * - find-fresh-emoji-tags: Find unused emoji tags
14
15
  *
@@ -0,0 +1,34 @@
1
+ import type { Command as Program } from 'commander';
2
+ import type { CoderGitSyncOptions } from '../../../../scripts/run-codex-prompts/git/coderGitSync';
3
+ export type { CoderGitSyncOptions };
4
+ /**
5
+ * Commander option bag for the shared `ptbk coder` git synchronization flags.
6
+ *
7
+ * @private internal utility of `promptbookCli`
8
+ */
9
+ export type CoderGitSyncCliOptions = {
10
+ readonly commit: boolean;
11
+ readonly autoPush: boolean;
12
+ readonly autoPull: boolean;
13
+ };
14
+ /**
15
+ * Description block shared by the `ptbk coder` commands which can synchronize their changes with git.
16
+ *
17
+ * @private internal utility of `promptbookCli`
18
+ */
19
+ export declare const CODER_GIT_SYNC_DESCRIPTION: string;
20
+ /**
21
+ * Registers the shared `--commit`, `--auto-push` and `--auto-pull` flags on a `ptbk coder` command.
22
+ *
23
+ * Note: Unlike `ptbk coder run`, which commits by default and opts out through `--no-commit`,
24
+ * these commands never touch git unless the flags are used explicitly.
25
+ *
26
+ * @private internal utility of `promptbookCli`
27
+ */
28
+ export declare function addCoderGitSyncOptions(command: Program): void;
29
+ /**
30
+ * Converts the Commander git synchronization flags into normalized git synchronization options.
31
+ *
32
+ * @private internal utility of `promptbookCli`
33
+ */
34
+ export declare function normalizeCoderGitSyncCliOptions(cliOptions: CoderGitSyncCliOptions): CoderGitSyncOptions;
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Asks the user in the terminal whether the harness should be installed or updated right now.
2
+ * Asks the user in the terminal whether an npm package should be installed or updated now.
3
3
  *
4
4
  * Note: `$` is used to indicate that this function is not a pure function - it reads the answer from stdin
5
5
  *
6
6
  * @returns `true` when the user confirms, `false` when the user declines or the terminal is not interactive
7
7
  * @private internal utility of `promptbookCli`
8
8
  */
9
- export declare function $askForHarnessInstallationApproval(question: string): Promise<boolean>;
9
+ export declare function $askForNpmPackageInstallationApproval(question: string): Promise<boolean>;
@@ -1,10 +1,9 @@
1
- import type { HarnessDefinition } from './HarnessDefinition';
2
1
  /**
3
- * Reads the newest version of the harness published to npm.
2
+ * Reads the newest version of one npm package.
4
3
  *
5
4
  * Note: `$` is used to indicate that this function is not a pure function - it queries the npm registry
6
5
  *
7
6
  * @returns The newest published version or `null` when the registry could not be reached
8
7
  * @private internal utility of `promptbookCli`
9
8
  */
10
- export declare function $resolveLatestHarnessVersion(definition: HarnessDefinition): Promise<string | null>;
9
+ export declare function $resolveLatestNpmPackageVersion(npmPackageName: string): Promise<string | null>;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Place where an npm package should be installed or updated.
3
+ *
4
+ * @private internal utility of `promptbookCli`
5
+ */
6
+ export type NpmPackageInstallationLocation = 'local-dependency' | 'local-development-dependency' | 'global';
7
+ /**
8
+ * Builds an npm command which installs or updates a package in the requested existing location.
9
+ *
10
+ * @private internal utility of `promptbookCli`
11
+ */
12
+ export declare function buildNpmPackageInstallCommand(npmPackageName: string, installationLocation: NpmPackageInstallationLocation): string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Extracts an npm package version from raw command output.
3
+ *
4
+ * Both npm and CLI commands may emit unrelated warnings before the version. CLI commands use the first matching token;
5
+ * npm registry commands can opt into the last matching token because npm warnings commonly precede their output.
6
+ *
7
+ * @returns The parsed version or `null` when the output contains no version
8
+ * @private internal utility of `promptbookCli`
9
+ */
10
+ export declare function extractNpmPackageVersionFromOutput(output: string, { isLastMatchPreferred }?: {
11
+ readonly isLastMatchPreferred?: boolean;
12
+ }): string | null;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Compares an installed npm package version with the newest published version.
3
+ *
4
+ * Release and prerelease identifiers follow semantic-version precedence while build metadata is ignored. Harnesses can
5
+ * preserve their historical behavior by setting `isPrereleaseIgnored`, because some harness commands report a build
6
+ * suffix which does not correspond to npm release precedence.
7
+ *
8
+ * @private internal utility of `promptbookCli`
9
+ */
10
+ export declare function isNpmPackageVersionOutdated(installedVersion: string, latestVersion: string, { isPrereleaseIgnored }?: {
11
+ readonly isPrereleaseIgnored?: boolean;
12
+ }): boolean;
@@ -0,0 +1,9 @@
1
+ import type { PromptbookCliInstallationStatus } from './PromptbookCliInstallationStatus';
2
+ /**
3
+ * Checks every local and global Promptbook CLI installation against the newest npm version.
4
+ *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it reads installed packages and queries npm
6
+ *
7
+ * @private internal utility of `promptbookCli`
8
+ */
9
+ export declare function $checkPromptbookCliInstallations(): Promise<ReadonlyArray<PromptbookCliInstallationStatus>>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Checks local and global Promptbook CLI installations before an interactive coder run and offers to update them.
3
+ *
4
+ * Once an update succeeds, the caller must stop the current run and let the user start a fresh process. A local npm
5
+ * update can modify `package.json` and a lockfile, which would make the coder's clean-working-tree preflight fail;
6
+ * the current Node.js process has also already loaded the old CLI implementation.
7
+ *
8
+ * Note: `$` is used to indicate that this function is not a pure function - it reads package manifests, queries npm,
9
+ * asks the user, and may install npm packages
10
+ *
11
+ * @returns `true` when at least one installation was updated and the current coder run should stop
12
+ * @private internal utility of `promptbookCli`
13
+ */
14
+ export declare function $ensurePromptbookCliInstallations(): Promise<boolean>;
@@ -0,0 +1,12 @@
1
+ import { type PromptbookCliInstallation } from './PromptbookCliInstallation';
2
+ /**
3
+ * Finds every directly declared local or directly installed global Promptbook CLI package which can be updated.
4
+ *
5
+ * Transitive packages are deliberately ignored because this command must update the dependency chosen by the current
6
+ * project or global npm installation, not mutate a dependency owned by another package.
7
+ *
8
+ * Note: `$` is used to indicate that this function is not a pure function - it reads package manifests and runs npm
9
+ *
10
+ * @private internal utility of `promptbookCli`
11
+ */
12
+ export declare function $resolvePromptbookCliInstallations(): Promise<ReadonlyArray<PromptbookCliInstallation>>;