@promptbook/javascript 0.114.0-2 → 0.114.0-21

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 (328) hide show
  1. package/README.md +8 -16
  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/agent-source/AgentSourceParseResult.d.ts +5 -0
  10. package/esm/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  11. package/esm/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  12. package/esm/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  13. package/esm/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  14. package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  15. package/esm/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  16. package/esm/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  17. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  18. package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  19. package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  20. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  21. package/esm/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  22. package/esm/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  23. package/esm/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
  24. package/esm/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  25. package/esm/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  26. package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  27. package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  28. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
  29. package/esm/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  30. package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
  31. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
  32. package/esm/src/cli/cli-commands/coder/ping.d.ts +2 -5
  33. package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
  34. package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  35. package/esm/src/cli/cli-commands/coder.d.ts +1 -1
  36. package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
  37. package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  38. package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -3
  39. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +3 -2
  40. package/esm/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +29 -0
  41. package/esm/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.d.ts → npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
  42. package/{umd/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts → esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  43. package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  44. package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  45. package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  46. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -2
  47. package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  48. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
  49. package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  50. package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  51. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  52. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  53. package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  54. package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  55. package/esm/src/cli/common/loadPromptsModule.d.ts +16 -0
  56. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  57. package/esm/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
  58. package/esm/src/commitments/META_ID/META_ID.d.ts +32 -0
  59. package/esm/src/commitments/index.d.ts +4 -12
  60. package/esm/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  61. package/esm/src/llm-providers/agent/Agent.d.ts +1 -1
  62. package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  63. package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
  64. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
  65. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +2 -2
  66. package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
  67. package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
  68. package/esm/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
  69. package/esm/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
  70. package/esm/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
  71. package/esm/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
  72. package/esm/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
  73. package/esm/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
  74. package/esm/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  75. package/esm/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  76. package/esm/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  77. package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  78. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  79. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  80. package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  81. package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  82. package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  83. package/esm/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
  84. package/esm/src/utils/misc/debounce.d.ts +4 -2
  85. package/esm/src/version.d.ts +1 -1
  86. package/package.json +2 -2
  87. package/umd/index.umd.js +1 -1
  88. package/umd/index.umd.js.map +1 -1
  89. package/umd/src/_packages/components.index.d.ts +4 -0
  90. package/umd/src/_packages/types.index.d.ts +4 -0
  91. package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  92. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  93. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
  94. package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
  95. package/umd/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  96. package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts +1 -0
  97. package/umd/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  98. package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
  99. package/umd/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  100. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  101. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
  102. package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  103. package/umd/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  104. package/umd/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  105. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  106. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  107. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
  108. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  109. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
  110. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  111. package/umd/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  112. package/umd/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  113. package/umd/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
  114. package/umd/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  115. package/umd/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
  116. package/umd/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  117. package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  118. package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  119. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
  120. package/umd/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  121. package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
  122. package/umd/src/cli/cli-commands/coder/boilerplateCount.test.d.ts +1 -0
  123. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
  124. package/umd/src/cli/cli-commands/coder/generate-boilerplates.test.d.ts +1 -0
  125. package/umd/src/cli/cli-commands/coder/ping.d.ts +2 -5
  126. package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
  127. package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  128. package/umd/src/cli/cli-commands/coder.d.ts +1 -1
  129. package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
  130. package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts +1 -0
  131. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  132. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
  133. package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -3
  134. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +3 -2
  135. package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +29 -0
  136. package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts +1 -0
  137. package/umd/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.d.ts → npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
  138. package/{esm/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts → umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  139. package/umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
  140. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  141. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
  142. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  143. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
  144. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  145. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
  146. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -2
  147. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  148. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
  149. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
  150. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
  151. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  152. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
  153. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  154. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
  155. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  156. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  157. package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  158. package/umd/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  159. package/umd/src/cli/common/loadPromptsModule.d.ts +16 -0
  160. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  161. package/umd/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
  162. package/umd/src/commitments/META_ID/META_ID.d.ts +32 -0
  163. package/umd/src/commitments/index.d.ts +4 -12
  164. package/umd/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  165. package/umd/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
  166. package/umd/src/llm-providers/agent/Agent.d.ts +1 -1
  167. package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  168. package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
  169. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
  170. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +2 -2
  171. package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
  172. package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
  173. package/umd/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
  174. package/umd/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
  175. package/umd/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
  176. package/umd/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
  177. package/umd/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
  178. package/umd/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
  179. package/umd/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  180. package/umd/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  181. package/umd/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  182. package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  183. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  184. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
  185. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  186. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
  187. package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  188. package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  189. package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  190. package/umd/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
  191. package/umd/src/utils/misc/debounce.d.ts +4 -2
  192. package/umd/src/utils/misc/debounce.test.d.ts +1 -0
  193. package/umd/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
  194. package/umd/src/version.d.ts +1 -1
  195. package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  196. package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  197. package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -48
  198. package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
  199. package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
  200. package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
  201. package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
  202. package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
  203. package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
  204. package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  205. package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
  206. package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
  207. package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
  208. package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
  209. package/esm/src/commitments/META/META.d.ts +0 -65
  210. package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
  211. package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
  212. package/esm/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
  213. package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
  214. package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
  215. package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
  216. package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
  217. package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
  218. package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
  219. package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
  220. package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
  221. package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
  222. package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
  223. package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
  224. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
  225. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
  226. package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
  227. package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
  228. package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
  229. package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
  230. package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  231. package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
  232. package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
  233. package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
  234. package/esm/src/commitments/WALLET/WALLET.d.ts +0 -21
  235. package/esm/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
  236. package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
  237. package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
  238. package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
  239. package/esm/src/commitments/WALLET/createWalletTools.d.ts +0 -7
  240. package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
  241. package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
  242. package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
  243. package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
  244. package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
  245. package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
  246. package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
  247. package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  248. package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  249. package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -48
  250. package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
  251. package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
  252. package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
  253. package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
  254. package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
  255. package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
  256. package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  257. package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
  258. package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
  259. package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
  260. package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
  261. package/umd/src/commitments/META/META.d.ts +0 -65
  262. package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
  263. package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
  264. package/umd/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
  265. package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
  266. package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
  267. package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
  268. package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
  269. package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
  270. package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
  271. package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
  272. package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
  273. package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
  274. package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
  275. package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
  276. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
  277. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
  278. package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
  279. package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
  280. package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
  281. package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
  282. package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  283. package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
  284. package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
  285. package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
  286. package/umd/src/commitments/WALLET/WALLET.d.ts +0 -21
  287. package/umd/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
  288. package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
  289. package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
  290. package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
  291. package/umd/src/commitments/WALLET/createWalletTools.d.ts +0 -7
  292. package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
  293. package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
  294. package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
  295. package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
  296. package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
  297. package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
  298. package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
  299. /package/esm/src/{book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
  300. /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
  301. /package/esm/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts} +0 -0
  302. /package/esm/src/{commitments/MEMORY/MEMORY.test.d.ts → book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts} +0 -0
  303. /package/esm/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → book-3.0/AgentPlannedMessagesSidecar.test.d.ts} +0 -0
  304. /package/esm/src/{commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts} +0 -0
  305. /package/esm/src/{commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts} +0 -0
  306. /package/esm/src/{commitments/USE_EMAIL/USE_EMAIL.test.d.ts → book-components/Chat/utils/agentProjectToolCall.test.d.ts} +0 -0
  307. /package/esm/src/{commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
  308. /package/esm/src/{commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
  309. /package/esm/src/{commitments/USE_SPAWN/USE_SPAWN.test.d.ts → cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts} +0 -0
  310. /package/esm/src/{commitments/USE_TIME/USE_TIME.test.d.ts → cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts} +0 -0
  311. /package/esm/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts} +0 -0
  312. /package/esm/src/{commitments/WALLET/WALLET.test.d.ts → cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts} +0 -0
  313. /package/{umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts} +0 -0
  314. /package/{umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts} +0 -0
  315. /package/{umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts} +0 -0
  316. /package/{umd/src/commitments/MEMORY/MEMORY.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts} +0 -0
  317. /package/{umd/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts} +0 -0
  318. /package/{umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts} +0 -0
  319. /package/{umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts} +0 -0
  320. /package/esm/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
  321. /package/{umd/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts → esm/src/executables/platforms/locateAppOnWindows.test.d.ts} +0 -0
  322. /package/{umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts} +0 -0
  323. /package/{umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts} +0 -0
  324. /package/{umd/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts → esm/src/utils/misc/debounce.test.d.ts} +0 -0
  325. /package/{umd/src/commitments/USE_TIME/USE_TIME.test.d.ts → esm/src/utils/random/$generateBookBoilerplate.test.d.ts} +0 -0
  326. /package/umd/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
  327. /package/umd/src/{commitments/WALLET/WALLET.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
  328. /package/umd/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
@@ -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
  */
@@ -26,21 +51,42 @@ export type MarkdownInlineReference = {
26
51
  */
27
52
  readonly href: string;
28
53
  /**
29
- * Markdown link destination prefixes that should render as this reference as well.
54
+ * Optional URL prefixes which also identify this reference in the authored markdown.
30
55
  *
31
- * This supports legacy links such as an Agents Server project file URL while keeping
32
- * `reference` as the canonical `[[project]]` token.
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.
33
60
  */
34
61
  readonly sourceHrefPrefixes?: ReadonlyArray<string>;
35
62
  /**
36
63
  * Optional hover title for the rendered reference.
37
64
  */
38
65
  readonly title?: string;
66
+ /**
67
+ * Optional favicon and text fallback rendered before the reference label.
68
+ */
69
+ readonly icon?: MarkdownInlineReferenceIcon;
39
70
  /**
40
71
  * Optional expandable menu shown when the reference chip is clicked.
41
72
  */
42
73
  readonly menu?: MarkdownInlineReferenceMenu;
43
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
+ };
44
90
  /**
45
91
  * Status displayed alongside an expandable markdown inline reference.
46
92
  *
@@ -74,6 +120,25 @@ export type MarkdownInlineReferenceMenuOption = {
74
120
  * Optional hover text for the option.
75
121
  */
76
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>;
77
142
  };
78
143
  /**
79
144
  * Expandable menu configuration for a markdown inline reference.
@@ -1,4 +1,22 @@
1
1
  import type { TODO_any } from '../../../utils/organization/TODO_any';
2
+ /**
3
+ * Tool name of one scheduled wake-up, used by every producer of timeout chips.
4
+ *
5
+ * @private internal timeout-chat constant
6
+ */
7
+ export declare const SET_TIMEOUT_TOOL_CALL_NAME = "set_timeout";
8
+ /**
9
+ * Tool name of one re-planned wake-up, used by every producer of timeout chips.
10
+ *
11
+ * @private internal timeout-chat constant
12
+ */
13
+ export declare const UPDATE_TIMEOUT_TOOL_CALL_NAME = "update_timeout";
14
+ /**
15
+ * Tool name of one cancelled wake-up, used by every producer of timeout chips.
16
+ *
17
+ * @private internal timeout-chat constant
18
+ */
19
+ export declare const CANCEL_TIMEOUT_TOOL_CALL_NAME = "cancel_timeout";
2
20
  /**
3
21
  * Action performed by timeout tools.
4
22
  *
@@ -140,4 +158,16 @@ export declare function buildTimeoutToolPrimarySentence(presentation: TimeoutToo
140
158
  * @private internal utility of `<Chat/>`
141
159
  */
142
160
  export declare function buildTimeoutToolScheduleSentence(presentation: TimeoutToolCallPresentation, translations?: TimeoutToolCallTranslations): string | null;
161
+ /**
162
+ * Converts timeout duration into natural language sentence fragments.
163
+ *
164
+ * Shared by every timeout surface: the chat chips, the goal-chat planned messages of the Agents
165
+ * Server, and the planned-message prompt section of the agent-folder runner.
166
+ *
167
+ * @param milliseconds - Duration or repeat interval in milliseconds.
168
+ * @returns Label such as `5 minutes` or `1 hour 30 minutes`.
169
+ *
170
+ * @private internal utility of `<Chat/>` and the Agents Server planned messages
171
+ */
172
+ export declare function formatTimeoutDurationHuman(milliseconds: number): string;
143
173
  export {};
@@ -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;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Supported values of the `--git-changes` option, which decides what happens with a dirty working tree.
3
+ *
4
+ * - `fail` — refuse to start while the working tree has uncommitted changes
5
+ * - `ignore` — start anyway and leave the uncommitted changes where they are
6
+ * - `continue` — resume the single prompt which was left in the middle of its implementation
7
+ *
8
+ * @private internal shared utility of `ptbk coder run`
9
+ */
10
+ export declare const GIT_CHANGES_MODE_VALUES: readonly ["fail", "ignore", "continue"];
11
+ /**
12
+ * Behavior requested for a working tree which has uncommitted changes.
13
+ *
14
+ * @private internal shared utility of `ptbk coder run`
15
+ */
16
+ export type GitChangesMode = (typeof GIT_CHANGES_MODE_VALUES)[number];
17
+ /**
18
+ * Mode applied when `--git-changes` is not used at all.
19
+ *
20
+ * @private internal shared utility of `ptbk coder run`
21
+ */
22
+ export declare const DEFAULT_GIT_CHANGES_MODE: GitChangesMode;
23
+ /**
24
+ * Checks whether a value is a supported `--git-changes` mode.
25
+ *
26
+ * @private internal shared utility of `ptbk coder run`
27
+ */
28
+ export declare function isGitChangesMode(value: string): value is GitChangesMode;
@@ -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>;
@@ -1,12 +1,9 @@
1
1
  import type { Command as Program } from 'commander';
2
2
  import type { $side_effect } from '../../../utils/organization/$side_effect';
3
3
  /**
4
- * Initializes `coder ping` command for Promptbook CLI utilities.
4
+ * Initializes `coder ping` command for Promptbook CLI utilities
5
5
  *
6
- * The command makes one small, isolated harness/model call, prints its result
7
- * and reports how long the harness/model turn took.
8
- *
9
- * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI.
6
+ * Note: `$` is used to indicate that this function is not a pure function - it registers a command in the CLI
10
7
  *
11
8
  * @private internal function of `promptbookCli`
12
9
  */
@@ -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
@@ -12,3 +12,15 @@ export declare const DEFAULT_WAIT_AFTER_ERROR_MS: number;
12
12
  * @private internal utility of `ptbk coder` wait handling
13
13
  */
14
14
  export declare function parseOptionalWaitDuration(value: string | undefined, defaultMs: number): number;
15
+ /**
16
+ * Parses an optional Commander period duration string and returns the resolved milliseconds.
17
+ *
18
+ * Returns `undefined` when the flag was not provided or was provided without a non-empty value,
19
+ * which means the command runs only once instead of repeating itself.
20
+ *
21
+ * @throws {NotAllowed} When the duration is not a positive one, because a non-positive period
22
+ * would repeat the command without ever pausing between two rounds
23
+ *
24
+ * @private internal utility of `ptbk coder` wait handling
25
+ */
26
+ export declare function parseOptionalPeriodDuration(optionName: string, value: string | undefined): number | undefined;
@@ -8,8 +8,8 @@ import type { $side_effect } from '../../utils/organization/$side_effect';
8
8
  * - add: Add one ready-to-run prompt file to the queue
9
9
  * - generate-boilerplates: Generate prompt boilerplate files
10
10
  * - find-refactor-candidates: Find files that need refactoring
11
- * - ping: Test one harness and model connection with a disposable task
12
11
  * - run: Run coding prompts with AI agents
12
+ * - ping: Test one harness and model with a tiny dummy prompt
13
13
  * - verify: Verify completed prompts
14
14
  * - find-fresh-emoji-tags: Find unused emoji tags
15
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,10 +1,10 @@
1
1
  import type { HarnessDefinition } from './HarnessDefinition';
2
2
  import type { HarnessInstallationStatus } from './HarnessInstallationStatus';
3
3
  /**
4
- * Detects whether one CLI coding harness is installed globally and whether it is up to date.
4
+ * Detects whether one CLI coding harness is installed globally and, when enabled, whether it is up to date.
5
5
  *
6
- * Note: `$` is used to indicate that this function is not a pure function - it runs the harness command and queries npm
6
+ * Note: `$` is used to indicate that this function is not a pure function - it runs the harness command and may query npm
7
7
  *
8
8
  * @private internal utility of `promptbookCli`
9
9
  */
10
- export declare function $checkHarnessInstallation(definition: HarnessDefinition): Promise<HarnessInstallationStatus>;
10
+ export declare function $checkHarnessInstallation(definition: HarnessDefinition, isHarnessUpdateCheckEnabled?: boolean): Promise<HarnessInstallationStatus>;
@@ -1,7 +1,7 @@
1
1
  import type { PromptRunnerHarnessName } from '../promptRunnerCliOptions';
2
2
  /**
3
- * Checks that every given CLI coding harness is installed globally and up to date and offers to
4
- * install or update the ones which are not.
3
+ * Checks that every given CLI coding harness is installed globally and, when enabled, up to date.
4
+ * Offers to install missing harnesses and update outdated ones.
5
5
  *
6
6
  * Harness names which are `undefined`, for example when no `--harness` is selected in a dry run,
7
7
  * are ignored so that every call site can pass its raw selection.
@@ -10,4 +10,4 @@ import type { PromptRunnerHarnessName } from '../promptRunnerCliOptions';
10
10
  *
11
11
  * @private internal utility of `promptbookCli`
12
12
  */
13
- export declare function $ensureHarnessInstallations(harnessNames: ReadonlyArray<PromptRunnerHarnessName | undefined>): Promise<void>;
13
+ export declare function $ensureHarnessInstallations(harnessNames: ReadonlyArray<PromptRunnerHarnessName | undefined>, isHarnessUpdateCheckEnabled?: boolean): Promise<void>;
@@ -5,11 +5,12 @@ import type { HarnessDefinition } from './HarnessDefinition';
5
5
  * - `up-to-date` the newest published version is installed
6
6
  * - `outdated` an older version is installed
7
7
  * - `not-installed` the harness command is not available globally
8
+ * - `installed` the harness is installed and automatic update checking was disabled
8
9
  * - `unknown` the harness is installed but the newest published version could not be resolved, for example when offline
9
10
  *
10
11
  * @private internal utility of `promptbookCli`
11
12
  */
12
- export type HarnessInstallationState = 'up-to-date' | 'outdated' | 'not-installed' | 'unknown';
13
+ export type HarnessInstallationState = 'up-to-date' | 'outdated' | 'not-installed' | 'installed' | 'unknown';
13
14
  /**
14
15
  * Installation state of one CLI coding harness on the current machine.
15
16
  *
@@ -21,7 +22,7 @@ export type HarnessInstallationStatus = {
21
22
  */
22
23
  readonly definition: HarnessDefinition;
23
24
  /**
24
- * Comparison of the installed version with the newest published one.
25
+ * Installation state, including whether the newest published version was checked.
25
26
  */
26
27
  readonly installationState: HarnessInstallationState;
27
28
  /**
@@ -0,0 +1,29 @@
1
+ import type { Command as Program } from 'commander';
2
+ /**
3
+ * Commander option bag for opting out of automatic coding-harness update checks.
4
+ *
5
+ * @private internal utility of `promptbookCli`
6
+ */
7
+ export type HarnessUpdateCliOptions = {
8
+ readonly harnessUpdate: boolean;
9
+ };
10
+ /**
11
+ * Normalized automatic coding-harness update-check option.
12
+ *
13
+ * @private internal utility of `promptbookCli`
14
+ */
15
+ export type NormalizedHarnessUpdateCliOptions = {
16
+ readonly isHarnessUpdateCheckEnabled: boolean;
17
+ };
18
+ /**
19
+ * Registers the shared `--no-harness-update` option on a `ptbk coder` command that uses a coding harness.
20
+ *
21
+ * @private internal utility of `promptbookCli`
22
+ */
23
+ export declare function addHarnessUpdateOption(command: Program): void;
24
+ /**
25
+ * Converts the Commander harness-update flag into the normalized harness-check option.
26
+ *
27
+ * @private internal utility of `promptbookCli`
28
+ */
29
+ export declare function normalizeHarnessUpdateCliOptions(cliOptions: HarnessUpdateCliOptions): NormalizedHarnessUpdateCliOptions;
@@ -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;
@@ -1,5 +1,6 @@
1
1
  import { Command as Program } from 'commander';
2
2
  import { PTBK_HARNESS_ENV, PTBK_MODEL_ENV, PTBK_THINKING_LEVEL_ENV } from '../../../book-3.0/cliAgentEnv';
3
+ import type { GitChangesMode } from '../coder/GitChangesMode';
3
4
  import type { ThinkingLevel } from '../coder/ThinkingLevel';
4
5
  export { PTBK_HARNESS_ENV, PTBK_MODEL_ENV, PTBK_THINKING_LEVEL_ENV };
5
6
  /**
@@ -25,7 +26,7 @@ export type PromptRunnerCliOptions = {
25
26
  readonly ui: boolean;
26
27
  readonly thinkingLevel?: ThinkingLevel;
27
28
  readonly commit: boolean;
28
- readonly ignoreGitChanges: boolean;
29
+ readonly gitChanges: GitChangesMode;
29
30
  readonly allowCredits: boolean;
30
31
  readonly normalizeLineEndings: boolean;
31
32
  readonly autoPush: boolean;
@@ -48,7 +49,7 @@ export type NormalizedPromptRunnerCliOptions = {
48
49
  readonly noUi: boolean;
49
50
  readonly thinkingLevel?: ThinkingLevel;
50
51
  readonly noCommit: boolean;
51
- readonly ignoreGitChanges: boolean;
52
+ readonly gitChanges: GitChangesMode;
52
53
  readonly allowCredits: boolean;
53
54
  readonly normalizeLineEndings: boolean;
54
55
  readonly autoPush: boolean;
@@ -78,6 +79,12 @@ export declare const PROMPT_RUNNER_HARNESS_OPTION_DESCRIPTION = "Select runner:
78
79
  * @private internal utility of `promptbookCli`
79
80
  */
80
81
  export declare const PROMPT_RUNNER_MODEL_OPTION_DESCRIPTION: string;
82
+ /**
83
+ * Commander description for the `--git-changes` option.
84
+ *
85
+ * @private internal utility of `promptbookCli`
86
+ */
87
+ export declare const GIT_CHANGES_OPTION_DESCRIPTION: string;
81
88
  /**
82
89
  * Registers runner selection flags on a command.
83
90
  *
@@ -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>>;
@@ -0,0 +1,10 @@
1
+ import type { PromptbookCliInstallationStatus } from './PromptbookCliInstallationStatus';
2
+ /**
3
+ * Updates one Promptbook CLI package in its existing local or global location.
4
+ *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it installs an npm package
6
+ *
7
+ * @returns `true` when the package update succeeds, `false` when it fails
8
+ * @private internal utility of `promptbookCli`
9
+ */
10
+ export declare function $updatePromptbookCliInstallation(status: PromptbookCliInstallationStatus): Promise<boolean>;