@promptbook/components 0.114.0-4 → 0.114.0-40

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 (324) hide show
  1. package/README.md +9 -9
  2. package/esm/index.es.js +1794 -289
  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/AgentReferenceResolutionIssue.d.ts +45 -0
  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/deduplicateSystemMessage.d.ts +14 -0
  12. package/esm/src/book-2.0/agent-source/explicitFromCommitment.d.ts +62 -0
  13. package/esm/src/book-2.0/agent-source/extractAgentReferenceTokens.d.ts +32 -0
  14. package/esm/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  15. package/esm/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
  16. package/esm/src/book-2.0/agent-source/resolveInheritedAgentSource.d.ts +73 -0
  17. package/esm/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +1 -1
  18. package/esm/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  19. package/esm/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  20. package/esm/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
  21. package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  22. package/esm/src/book-3.0/cliAgentEnv.d.ts +3 -3
  23. package/esm/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  24. package/esm/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  25. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  26. package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  27. package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
  28. package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  29. package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
  30. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  31. package/esm/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  32. package/esm/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  33. package/esm/src/book-components/Chat/MockedChat/MockedChat.test.d.ts +2 -0
  34. package/esm/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  35. package/esm/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
  36. package/esm/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  37. package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  38. package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  39. package/esm/src/cli/$initializePromptbookCliProgram.d.ts +8 -0
  40. package/esm/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +10 -0
  41. package/esm/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.test.d.ts +1 -0
  42. package/esm/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  43. package/esm/src/cli/cli-commands/coder/agentCliOptions.d.ts +21 -0
  44. package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +1 -1
  45. package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +8 -21
  46. package/esm/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +33 -0
  47. package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +14 -1
  48. package/esm/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +4 -2
  49. package/esm/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +2 -0
  50. package/esm/src/cli/cli-commands/coder/ensureDirectory.d.ts +6 -0
  51. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +1 -1
  52. package/esm/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
  53. package/esm/src/cli/cli-commands/coder/init.test.d.ts +1 -0
  54. package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +8 -5
  55. package/esm/src/cli/cli-commands/coder/list.d.ts +10 -0
  56. package/esm/src/cli/cli-commands/coder/list.test.d.ts +1 -0
  57. package/esm/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +19 -1
  58. package/esm/src/cli/cli-commands/coder/printCoderRunFailure.d.ts +6 -0
  59. package/esm/src/cli/cli-commands/coder/server.test.d.ts +1 -0
  60. package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
  61. package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  62. package/esm/src/cli/cli-commands/coder.d.ts +1 -0
  63. package/esm/src/cli/cli-commands/common/$askForConfirmation.d.ts +11 -0
  64. package/esm/src/cli/cli-commands/common/$askForConfirmation.test.d.ts +1 -0
  65. package/esm/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +46 -0
  66. package/esm/src/cli/cli-commands/common/createLocalAgentReferenceResolver.d.ts +8 -0
  67. package/esm/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.d.ts +12 -0
  68. package/esm/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.test.d.ts +1 -0
  69. package/esm/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.d.ts +11 -0
  70. package/esm/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.test.d.ts +1 -0
  71. package/esm/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.d.ts +33 -0
  72. package/esm/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.d.ts +6 -0
  73. package/esm/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.test.d.ts +1 -0
  74. package/esm/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.d.ts +10 -0
  75. package/esm/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.d.ts +28 -0
  76. package/esm/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.d.ts +7 -0
  77. package/esm/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.test.d.ts +1 -0
  78. package/esm/src/cli/cli-commands/common/ensureAdamAgentBook.d.ts +12 -0
  79. package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +3 -2
  80. package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  81. package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
  82. package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +4 -3
  83. package/esm/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
  84. package/esm/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
  85. package/esm/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
  86. package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +62 -0
  87. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
  88. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
  89. package/esm/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
  90. package/esm/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
  91. package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
  92. package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
  93. package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
  94. package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
  95. package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
  96. package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
  97. package/esm/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts +11 -0
  98. package/{umd/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts → esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  99. package/esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
  100. package/esm/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
  101. package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  102. package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
  103. package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  104. package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
  105. package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  106. package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
  107. package/esm/src/cli/cli-commands/common/projectInitialization.d.ts +6 -0
  108. package/esm/src/cli/cli-commands/common/promptPriorityCliOptions.d.ts +7 -0
  109. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
  110. package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  111. package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
  112. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +15 -0
  113. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
  114. package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  115. package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
  116. package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  117. package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
  118. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  119. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  120. package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  121. package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  122. package/esm/src/cli/cli-commands/common/questionsCliOptions.d.ts +45 -0
  123. package/esm/src/cli/cli-commands/common/questionsCliOptions.test.d.ts +1 -0
  124. package/esm/src/cli/cli-commands/common/resolveBundledAgentBookPath.d.ts +6 -0
  125. package/esm/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +19 -0
  126. package/esm/src/cli/common/$deprecateCliCommand.d.ts +3 -0
  127. package/esm/src/cli/common/$hideCliCommandFromHelp.d.ts +11 -0
  128. package/esm/src/cli/common/$hideCliCommandFromHelp.test.d.ts +1 -0
  129. package/esm/src/cli/common/$requireCliSubcommand.d.ts +18 -0
  130. package/esm/src/cli/common/$requireCliSubcommand.test.d.ts +1 -0
  131. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  132. package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
  133. package/esm/src/commitments/index.d.ts +1 -1
  134. package/esm/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  135. package/esm/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
  136. package/esm/src/llm-providers/vercel/VercelExecutionToolsOptions.d.ts +5 -2
  137. package/esm/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  138. package/esm/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  139. package/esm/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  140. package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  141. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  142. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
  143. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  144. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
  145. package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  146. package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  147. package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  148. package/esm/src/utils/files/findFilesByGlob.d.ts +28 -0
  149. package/esm/src/utils/misc/debounce.d.ts +4 -2
  150. package/esm/src/utils/misc/debounce.test.d.ts +1 -0
  151. package/esm/src/utils/misc/emojis.d.ts +3 -2
  152. package/esm/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
  153. package/esm/src/version.d.ts +1 -1
  154. package/package.json +3 -7
  155. package/umd/index.umd.js +1794 -289
  156. package/umd/index.umd.js.map +1 -1
  157. package/umd/src/_packages/components.index.d.ts +4 -0
  158. package/umd/src/_packages/types.index.d.ts +4 -0
  159. package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  160. package/umd/src/avatars/renderAvatarVisualTerminalText.test.d.ts +1 -0
  161. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  162. package/umd/src/book-2.0/agent-source/AgentReferenceResolutionIssue.d.ts +45 -0
  163. package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
  164. package/umd/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  165. package/umd/src/book-2.0/agent-source/createAgentModelRequirements.deduplication.test.d.ts +1 -0
  166. package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts +1 -0
  167. package/umd/src/book-2.0/agent-source/deduplicateSystemMessage.d.ts +14 -0
  168. package/umd/src/book-2.0/agent-source/deduplicateSystemMessage.test.d.ts +1 -0
  169. package/umd/src/book-2.0/agent-source/explicitFromCommitment.d.ts +62 -0
  170. package/umd/src/book-2.0/agent-source/extractAgentReferenceTokens.d.ts +32 -0
  171. package/umd/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  172. package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
  173. package/umd/src/book-2.0/agent-source/resolveInheritedAgentSource.d.ts +73 -0
  174. package/umd/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +1 -1
  175. package/umd/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  176. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  177. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
  178. package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  179. package/umd/src/book-3.0/cliAgentEnv.d.ts +3 -3
  180. package/umd/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  181. package/umd/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  182. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  183. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  184. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
  185. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  186. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
  187. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  188. package/umd/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  189. package/umd/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  190. package/umd/src/book-components/Chat/MockedChat/MockedChat.test.d.ts +2 -0
  191. package/umd/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  192. package/umd/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
  193. package/umd/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  194. package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  195. package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  196. package/umd/src/cli/$initializePromptbookCliProgram.d.ts +8 -0
  197. package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +10 -0
  198. package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.test.d.ts +1 -0
  199. package/umd/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  200. package/umd/src/cli/cli-commands/coder/agentCliOptions.d.ts +21 -0
  201. package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +1 -1
  202. package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +8 -21
  203. package/umd/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +33 -0
  204. package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +14 -1
  205. package/umd/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +4 -2
  206. package/umd/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +2 -0
  207. package/umd/src/cli/cli-commands/coder/ensureDirectory.d.ts +6 -0
  208. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +1 -1
  209. package/umd/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
  210. package/umd/src/cli/cli-commands/coder/init.test.d.ts +1 -0
  211. package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +8 -5
  212. package/umd/src/cli/cli-commands/coder/list.d.ts +10 -0
  213. package/umd/src/cli/cli-commands/coder/list.test.d.ts +1 -0
  214. package/umd/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +19 -1
  215. package/umd/src/cli/cli-commands/coder/printCoderRunFailure.d.ts +6 -0
  216. package/umd/src/cli/cli-commands/coder/server.test.d.ts +1 -0
  217. package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
  218. package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  219. package/umd/src/cli/cli-commands/coder.d.ts +1 -0
  220. package/umd/src/cli/cli-commands/common/$askForConfirmation.d.ts +11 -0
  221. package/umd/src/cli/cli-commands/common/$askForConfirmation.test.d.ts +1 -0
  222. package/umd/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +46 -0
  223. package/umd/src/cli/cli-commands/common/createLocalAgentReferenceResolver.d.ts +8 -0
  224. package/umd/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.d.ts +12 -0
  225. package/umd/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.test.d.ts +1 -0
  226. package/umd/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.d.ts +11 -0
  227. package/umd/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.test.d.ts +1 -0
  228. package/umd/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.d.ts +33 -0
  229. package/umd/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.d.ts +6 -0
  230. package/umd/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.test.d.ts +1 -0
  231. package/umd/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.d.ts +10 -0
  232. package/umd/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.d.ts +28 -0
  233. package/umd/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.d.ts +7 -0
  234. package/umd/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.test.d.ts +1 -0
  235. package/umd/src/cli/cli-commands/common/ensureAdamAgentBook.d.ts +12 -0
  236. package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +3 -2
  237. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  238. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
  239. package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +4 -3
  240. package/umd/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
  241. package/umd/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
  242. package/umd/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
  243. package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +62 -0
  244. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
  245. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
  246. package/umd/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
  247. package/umd/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
  248. package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
  249. package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
  250. package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
  251. package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
  252. package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
  253. package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
  254. package/umd/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts +11 -0
  255. package/{esm/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts → umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  256. package/umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
  257. package/umd/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
  258. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  259. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
  260. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  261. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
  262. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  263. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
  264. package/umd/src/cli/cli-commands/common/projectInitialization.d.ts +6 -0
  265. package/umd/src/cli/cli-commands/common/promptPriorityCliOptions.d.ts +7 -0
  266. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
  267. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  268. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
  269. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +15 -0
  270. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
  271. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  272. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
  273. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  274. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
  275. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  276. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  277. package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  278. package/umd/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  279. package/umd/src/cli/cli-commands/common/questionsCliOptions.d.ts +45 -0
  280. package/umd/src/cli/cli-commands/common/questionsCliOptions.test.d.ts +1 -0
  281. package/umd/src/cli/cli-commands/common/resolveBundledAgentBookPath.d.ts +6 -0
  282. package/umd/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +19 -0
  283. package/umd/src/cli/common/$deprecateCliCommand.d.ts +3 -0
  284. package/umd/src/cli/common/$hideCliCommandFromHelp.d.ts +11 -0
  285. package/umd/src/cli/common/$hideCliCommandFromHelp.test.d.ts +1 -0
  286. package/umd/src/cli/common/$requireCliSubcommand.d.ts +18 -0
  287. package/umd/src/cli/common/$requireCliSubcommand.test.d.ts +1 -0
  288. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  289. package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
  290. package/umd/src/commitments/index.d.ts +1 -1
  291. package/umd/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  292. package/umd/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
  293. package/umd/src/llm-providers/vercel/VercelExecutionToolsOptions.d.ts +5 -2
  294. package/umd/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  295. package/umd/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  296. package/umd/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  297. package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  298. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  299. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
  300. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  301. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
  302. package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  303. package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  304. package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  305. package/umd/src/utils/files/findFilesByGlob.d.ts +28 -0
  306. package/umd/src/utils/misc/debounce.d.ts +4 -2
  307. package/umd/src/utils/misc/debounce.test.d.ts +1 -0
  308. package/umd/src/utils/misc/emojis.d.ts +3 -2
  309. package/umd/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
  310. package/umd/src/version.d.ts +1 -1
  311. package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +0 -13
  312. package/esm/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +0 -9
  313. package/esm/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
  314. package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  315. package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  316. package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +0 -13
  317. package/umd/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +0 -9
  318. package/umd/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
  319. package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  320. package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  321. /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
  322. /package/esm/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.deduplication.test.d.ts} +0 -0
  323. /package/{umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → esm/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts} +0 -0
  324. /package/{umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → esm/src/book-2.0/agent-source/deduplicateSystemMessage.test.d.ts} +0 -0
@@ -1,9 +1,10 @@
1
+ import type { NormalizedQuestionsCliOptions } from '../questionsCliOptions';
1
2
  import type { HarnessInstallationStatus } from './HarnessInstallationStatus';
2
3
  /**
3
4
  * Reports one detected harness installation status and offers to install or update the harness.
4
5
  *
5
- * Note: `$` is used to indicate that this function is not a pure function - it asks the user and installs npm packages
6
+ * Note: `$` is used to indicate that this function is not a pure function - it asks the user and installs software
6
7
  *
7
8
  * @private internal utility of `promptbookCli`
8
9
  */
9
- export declare function $applyHarnessInstallationStatus(status: HarnessInstallationStatus): Promise<void>;
10
+ export declare function $applyHarnessInstallationStatus(status: HarnessInstallationStatus, questionsOptions: NormalizedQuestionsCliOptions): Promise<void>;
@@ -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,8 @@
1
1
  import type { PromptRunnerHarnessName } from '../promptRunnerCliOptions';
2
+ import type { NormalizedQuestionsCliOptions } from '../questionsCliOptions';
2
3
  /**
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.
4
+ * Checks that every given CLI coding harness is installed globally and, when the questions are enabled, up to date.
5
+ * Offers to install missing harnesses and update outdated ones.
5
6
  *
6
7
  * Harness names which are `undefined`, for example when no `--harness` is selected in a dry run,
7
8
  * are ignored so that every call site can pass its raw selection.
@@ -10,4 +11,4 @@ import type { PromptRunnerHarnessName } from '../promptRunnerCliOptions';
10
11
  *
11
12
  * @private internal utility of `promptbookCli`
12
13
  */
13
- export declare function $ensureHarnessInstallations(harnessNames: ReadonlyArray<PromptRunnerHarnessName | undefined>): Promise<void>;
14
+ export declare function $ensureHarnessInstallations(harnessNames: ReadonlyArray<PromptRunnerHarnessName | undefined>, questionsOptions: NormalizedQuestionsCliOptions): Promise<void>;
@@ -0,0 +1,14 @@
1
+ import type { HarnessDefinition } from './HarnessDefinition';
2
+ /**
3
+ * Finds out which file is really executed when the harness command runs.
4
+ *
5
+ * The lookup deliberately uses the very same `PATH` which runs the harness, so it reports the copy of the
6
+ * harness which Promptbook itself would use. Symbolic links are followed, because installers like the
7
+ * standalone OpenAI Codex installer only link their package into a directory on `PATH`.
8
+ *
9
+ * Note: `$` is used to indicate that this function is not a pure function - it runs a command in a shell
10
+ *
11
+ * @returns Resolved path of the harness command or `null` when the command is not available
12
+ * @private internal utility of `promptbookCli`
13
+ */
14
+ export declare function $resolveHarnessCommandPath(definition: HarnessDefinition): Promise<string | null>;
@@ -0,0 +1,10 @@
1
+ import type { HarnessDefinition } from './HarnessDefinition';
2
+ import type { HarnessInstallationOrigin } from './HarnessInstallationOrigin';
3
+ /**
4
+ * Finds out where one CLI coding harness is really installed and which tool manages it.
5
+ *
6
+ * Note: `$` is used to indicate that this function is not a pure function - it runs shell commands
7
+ *
8
+ * @private internal utility of `promptbookCli`
9
+ */
10
+ export declare function $resolveHarnessInstallationOrigin(definition: HarnessDefinition): Promise<HarnessInstallationOrigin>;
@@ -0,0 +1,43 @@
1
+ import type { HarnessDefinition } from './HarnessDefinition';
2
+ /**
3
+ * What one harness installation command does with the harness.
4
+ *
5
+ * @private internal utility of `promptbookCli`
6
+ */
7
+ export type HarnessInstallationOperation = 'install' | 'update';
8
+ /**
9
+ * Options of one command which installs or updates a CLI coding harness.
10
+ *
11
+ * @private internal utility of `$runHarnessInstallationCommand`
12
+ */
13
+ type HarnessInstallationCommandOptions = {
14
+ /**
15
+ * Harness which is installed or updated.
16
+ */
17
+ readonly definition: HarnessDefinition;
18
+ /**
19
+ * What the command does with the harness.
20
+ */
21
+ readonly operation: HarnessInstallationOperation;
22
+ /**
23
+ * Shell command which does it.
24
+ */
25
+ readonly command: string;
26
+ /**
27
+ * Extra environment variables required by the command.
28
+ */
29
+ readonly environment?: Readonly<Record<string, string>>;
30
+ };
31
+ /**
32
+ * Runs one command which installs or updates a CLI coding harness.
33
+ *
34
+ * A failed installation is reported but never aborts the running command, because the harness check
35
+ * is only an assistant - the command itself may still work with a manually managed harness.
36
+ *
37
+ * Note: `$` is used to indicate that this function is not a pure function - it installs software
38
+ *
39
+ * @returns `true` when the command succeeded, `false` when it failed
40
+ * @private internal utility of `promptbookCli`
41
+ */
42
+ export declare function $runHarnessInstallationCommand(options: HarnessInstallationCommandOptions): Promise<boolean>;
43
+ export {};
@@ -1,4 +1,46 @@
1
1
  import type { PromptRunnerHarnessName } from '../promptRunnerCliOptions';
2
+ /**
3
+ * Description of a standalone *(self-managed)* installation of one CLI coding harness.
4
+ *
5
+ * Some harnesses are also distributed by their own installer which puts the harness outside of npm and
6
+ * updates it in place. Such an installation must never be updated with `npm install -g`, because that
7
+ * installs a second copy of the harness instead of updating the one which is really used.
8
+ *
9
+ * @private internal utility of `promptbookCli`
10
+ */
11
+ export type HarnessStandaloneInstallation = {
12
+ /**
13
+ * Directory names which appear in the resolved path of a standalone installation of the harness,
14
+ * for example `.codex` in `~/.codex/packages/standalone/current/bin/codex`.
15
+ */
16
+ readonly directoryNames: ReadonlyArray<string>;
17
+ /**
18
+ * Command which updates the standalone installation in place.
19
+ */
20
+ readonly updateCommand: string;
21
+ };
22
+ /**
23
+ * Description of how the user signs in to one CLI coding harness again.
24
+ *
25
+ * Every harness refuses to work once its login is missing or its session has expired, and each of them is
26
+ * signed in differently - some have a dedicated login command, others sign in from their own interactive UI.
27
+ *
28
+ * @private internal utility of `promptbookCli`
29
+ */
30
+ export type HarnessAuthenticationMethod = {
31
+ /**
32
+ * Command which starts the sign-in flow of the harness.
33
+ */
34
+ readonly command: string;
35
+ /**
36
+ * Step which finishes the sign-in inside the started command.
37
+ *
38
+ * Harnesses which sign in from their own interactive user interface leave the user in that interface, so
39
+ * naming just the command would not be enough to get them signed in. Harnesses with a dedicated login
40
+ * command leave this undefined.
41
+ */
42
+ readonly interactiveStep?: string;
43
+ };
2
44
  /**
3
45
  * Static description of one supported CLI coding harness.
4
46
  *
@@ -25,6 +67,20 @@ export type HarnessDefinition = {
25
67
  * Extra environment variables required by the global npm installation of this harness.
26
68
  */
27
69
  readonly npmInstallEnvironment?: Readonly<Record<string, string>>;
70
+ /**
71
+ * Project-local files or directories which this harness can create and which should not be committed.
72
+ */
73
+ readonly projectGitignoreRules: ReadonlyArray<string>;
74
+ /**
75
+ * How the user signs in to this harness again after its login is missing or has expired.
76
+ */
77
+ readonly authenticationMethod: HarnessAuthenticationMethod;
78
+ /**
79
+ * How a standalone installation of this harness is recognized and updated.
80
+ *
81
+ * Harnesses which are distributed only through npm leave this undefined.
82
+ */
83
+ readonly standaloneInstallation?: HarnessStandaloneInstallation;
28
84
  };
29
85
  /**
30
86
  * Single source of truth about how each supported CLI coding harness is installed and detected.
@@ -38,3 +94,9 @@ export declare const HARNESS_DEFINITIONS: Readonly<Record<PromptRunnerHarnessNam
38
94
  * @private internal utility of `promptbookCli`
39
95
  */
40
96
  export declare function getHarnessDefinition(harnessName: PromptRunnerHarnessName): HarnessDefinition;
97
+ /**
98
+ * Lists the unique project ignore rules required by the selected harnesses, in selection order.
99
+ *
100
+ * @private internal utility of `promptbookCli`
101
+ */
102
+ export declare function getHarnessProjectGitignoreRules(harnessNames: ReadonlyArray<PromptRunnerHarnessName>): ReadonlyArray<string>;
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Way in which the globally available harness command got onto the current machine.
3
+ *
4
+ * - `npm-global` the command comes from a global npm installation, so `npm install -g` really updates it
5
+ * - `standalone` the command was installed by the own installer of the harness and updates itself in place
6
+ * - `homebrew` the command is managed by Homebrew, so only `brew` may update it
7
+ * - `unknown` the command lives somewhere else or could not be located at all
8
+ *
9
+ * @private internal utility of `promptbookCli`
10
+ */
11
+ export type HarnessInstallationMethod = 'npm-global' | 'standalone' | 'homebrew' | 'unknown';
12
+ /**
13
+ * Place where the harness command really lives together with the way it was installed there.
14
+ *
15
+ * Knowing the origin is what keeps an update from installing a **second** copy of a harness which is
16
+ * managed outside of npm, for example the standalone installation of OpenAI Codex.
17
+ *
18
+ * @private internal utility of `promptbookCli`
19
+ */
20
+ export type HarnessInstallationOrigin = {
21
+ /**
22
+ * Resolved path of the harness command with every symbolic link followed
23
+ * or `null` when the command could not be located.
24
+ */
25
+ readonly commandPath: string | null;
26
+ /**
27
+ * Way in which the harness command was installed.
28
+ */
29
+ readonly installationMethod: HarnessInstallationMethod;
30
+ };
31
+ /**
32
+ * Origin used when the harness command was not looked up at all, for example when the update check is disabled.
33
+ *
34
+ * @private internal utility of `promptbookCli`
35
+ */
36
+ export declare const UNKNOWN_HARNESS_INSTALLATION_ORIGIN: HarnessInstallationOrigin;
@@ -1,15 +1,17 @@
1
1
  import type { HarnessDefinition } from './HarnessDefinition';
2
+ import type { HarnessInstallationOrigin } from './HarnessInstallationOrigin';
2
3
  /**
3
4
  * Result of comparing the globally installed harness version with the newest published one.
4
5
  *
5
6
  * - `up-to-date` the newest published version is installed
6
7
  * - `outdated` an older version is installed
7
8
  * - `not-installed` the harness command is not available globally
9
+ * - `installed` the harness is installed and automatic update checking was disabled
8
10
  * - `unknown` the harness is installed but the newest published version could not be resolved, for example when offline
9
11
  *
10
12
  * @private internal utility of `promptbookCli`
11
13
  */
12
- export type HarnessInstallationState = 'up-to-date' | 'outdated' | 'not-installed' | 'unknown';
14
+ export type HarnessInstallationState = 'up-to-date' | 'outdated' | 'not-installed' | 'installed' | 'unknown';
13
15
  /**
14
16
  * Installation state of one CLI coding harness on the current machine.
15
17
  *
@@ -21,7 +23,7 @@ export type HarnessInstallationStatus = {
21
23
  */
22
24
  readonly definition: HarnessDefinition;
23
25
  /**
24
- * Comparison of the installed version with the newest published one.
26
+ * Installation state, including whether the newest published version was checked.
25
27
  */
26
28
  readonly installationState: HarnessInstallationState;
27
29
  /**
@@ -32,4 +34,8 @@ export type HarnessInstallationStatus = {
32
34
  * Newest version published to npm or `null` when it could not be resolved.
33
35
  */
34
36
  readonly latestVersion: string | null;
37
+ /**
38
+ * Place where the harness command lives together with the way it was installed there.
39
+ */
40
+ readonly installationOrigin: HarnessInstallationOrigin;
35
41
  };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * How an outdated CLI coding harness can be brought up to date where it is really installed.
3
+ *
4
+ * @private internal utility of `promptbookCli`
5
+ */
6
+ export type HarnessUpdatePlan = {
7
+ /**
8
+ * Command which updates the harness in place
9
+ * or `null` when the installation is not understood well enough to name one.
10
+ */
11
+ readonly command: string | null;
12
+ /**
13
+ * Whether Promptbook may run the command itself instead of only printing it.
14
+ *
15
+ * Only installations which Promptbook can update without any side effect are updated automatically,
16
+ * everything else is left to the user together with the instructions.
17
+ */
18
+ readonly isRunnableByPromptbook: boolean;
19
+ /**
20
+ * Extra environment variables required by the update command.
21
+ */
22
+ readonly environment?: Readonly<Record<string, string>>;
23
+ };
@@ -2,9 +2,12 @@ import type { HarnessDefinition } from './HarnessDefinition';
2
2
  /**
3
3
  * Builds the shell command which installs or updates one CLI coding harness globally.
4
4
  *
5
- * The very same command is executed by `$installHarness` and printed as the manual fallback,
5
+ * The very same command is executed by `$runHarnessInstallationCommand` and printed as the manual fallback,
6
6
  * so the user always sees exactly what Promptbook would run.
7
7
  *
8
+ * Note: This command installs the harness through npm, so it may only update a harness which npm really owns,
9
+ * see `resolveHarnessUpdatePlan`.
10
+ *
8
11
  * @private internal utility of `promptbookCli`
9
12
  */
10
13
  export declare function buildHarnessInstallCommand(definition: HarnessDefinition): string;
@@ -0,0 +1,8 @@
1
+ import type { HarnessInstallationStatus } from './HarnessInstallationStatus';
2
+ import type { HarnessUpdatePlan } from './HarnessUpdatePlan';
3
+ /**
4
+ * Formats the instruction shown when an outdated harness must be updated by the user.
5
+ *
6
+ * @private internal utility of `promptbookCli`
7
+ */
8
+ export declare function formatHarnessManualUpdateInstruction(status: HarnessInstallationStatus, updatePlan: HarnessUpdatePlan): string;
@@ -0,0 +1,31 @@
1
+ import type { HarnessDefinition } from './HarnessDefinition';
2
+ import type { HarnessInstallationMethod } from './HarnessInstallationOrigin';
3
+ /**
4
+ * Options describing where the harness command was found.
5
+ *
6
+ * @private internal utility of `resolveHarnessInstallationMethodFromPaths`
7
+ */
8
+ type HarnessInstallationPaths = {
9
+ /**
10
+ * Harness whose command was located.
11
+ */
12
+ readonly definition: HarnessDefinition;
13
+ /**
14
+ * Resolved path of the harness command with every symbolic link followed.
15
+ */
16
+ readonly commandPath: string;
17
+ /**
18
+ * Root directory of global npm installations or `null` when npm could not be asked for it.
19
+ */
20
+ readonly npmGlobalPrefixPath: string | null;
21
+ };
22
+ /**
23
+ * Decides how a harness command was installed from the place where it really lives.
24
+ *
25
+ * Only a command which npm owns may be updated with `npm install -g`, every other command has to be
26
+ * updated where it is installed, otherwise the update silently adds a second copy of the harness.
27
+ *
28
+ * @private internal utility of `promptbookCli`
29
+ */
30
+ export declare function resolveHarnessInstallationMethodFromPaths(paths: HarnessInstallationPaths): HarnessInstallationMethod;
31
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { HarnessDefinition } from './HarnessDefinition';
2
+ import type { HarnessInstallationMethod } from './HarnessInstallationOrigin';
3
+ import type { HarnessUpdatePlan } from './HarnessUpdatePlan';
4
+ /**
5
+ * Decides how one outdated CLI coding harness should be updated.
6
+ *
7
+ * The plan follows the way the harness was installed, because `npm install -g` updates only a harness
8
+ * which npm owns and installs a **second** copy of every other one.
9
+ *
10
+ * @private internal utility of `promptbookCli`
11
+ */
12
+ export declare function resolveHarnessUpdatePlan(definition: HarnessDefinition, installationMethod: HarnessInstallationMethod): HarnessUpdatePlan;
@@ -0,0 +1,11 @@
1
+ import type { NormalizedQuestionsCliOptions } from '../questionsCliOptions';
2
+ /**
3
+ * Asks the user in the terminal whether an npm package should be installed or updated now.
4
+ *
5
+ * Note: `$` is used to indicate that this function is not a pure function - it reads the answer from stdin
6
+ *
7
+ * @returns `true` when the user confirms, `false` when the user declines, the terminal is not interactive
8
+ * or the questions are disabled by `--no-questions`
9
+ * @private internal utility of `promptbookCli`
10
+ */
11
+ export declare function $askForNpmPackageInstallationApproval(question: string, questionsOptions: NormalizedQuestionsCliOptions): 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,9 @@
1
+ /**
2
+ * Reads the root directory under which npm installs global packages.
3
+ *
4
+ * Note: `$` is used to indicate that this function is not a pure function - it runs npm
5
+ *
6
+ * @returns The global npm prefix or `null` when npm could not be asked for it
7
+ * @private internal utility of `promptbookCli`
8
+ */
9
+ export declare function $resolveNpmGlobalPrefixPath(): 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;
@@ -50,6 +50,12 @@ export declare function ensureProjectEnvFile<TEnvVariable extends ProjectEnvVari
50
50
  * @private internal utility of Promptbook CLI project initialization
51
51
  */
52
52
  export declare function ensureProjectGitignoreFile({ projectPath, blockHeader, rules, }: EnsureProjectGitignoreFileOptions): Promise<ProjectInitializationStatus>;
53
+ /**
54
+ * Lists the ignore rules which are not yet present in a project's `.gitignore` file.
55
+ *
56
+ * @private internal utility of Promptbook CLI project initialization
57
+ */
58
+ export declare function getMissingProjectGitignoreRules(projectPath: string, rules: ReadonlyArray<string>): Promise<ReadonlyArray<string>>;
53
59
  /**
54
60
  * Reads one text file when it exists, otherwise returns `undefined`.
55
61
  *
@@ -0,0 +1,7 @@
1
+ import type { Command as Program } from 'commander';
2
+ /**
3
+ * Registers the shared prompt-priority filter options on a queue-based `ptbk coder` command.
4
+ *
5
+ * @private internal utility of `promptbookCli`
6
+ */
7
+ export declare function addPromptPriorityOptions(command: Program): void;
@@ -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
  /**
@@ -7,7 +8,7 @@ export { PTBK_HARNESS_ENV, PTBK_MODEL_ENV, PTBK_THINKING_LEVEL_ENV };
7
8
  *
8
9
  * @private internal utility of `promptbookCli`
9
10
  */
10
- export declare const PROMPT_RUNNER_HARNESS_NAMES: readonly ["openai-codex", "github-copilot", "cline", "claude-code", "opencode", "gemini"];
11
+ export declare const PROMPT_RUNNER_HARNESS_NAMES: readonly ["openai-codex", "github-copilot", "cline", "claude-code", "opencode", "gemini", "qwen-code"];
11
12
  /**
12
13
  * Runner identifier supported by Promptbook CLI agent orchestration commands.
13
14
  *
@@ -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;
@@ -71,13 +72,25 @@ export declare const PROMPT_RUNNER_DESCRIPTION: string;
71
72
  *
72
73
  * @private internal utility of `promptbookCli`
73
74
  */
74
- export declare const PROMPT_RUNNER_HARNESS_OPTION_DESCRIPTION = "Select runner: openai-codex, github-copilot, cline, claude-code, opencode, gemini (required for non-dry-run)";
75
+ export declare const PROMPT_RUNNER_HARNESS_OPTION_DESCRIPTION: string;
76
+ /**
77
+ * Runner harness names listed as alternatives of the `--harness` option in error messages.
78
+ *
79
+ * @private internal utility of `promptbookCli`
80
+ */
81
+ export declare const PROMPT_RUNNER_HARNESS_OPTION_HINT: string;
75
82
  /**
76
83
  * Commander description for the `--model` option.
77
84
  *
78
85
  * @private internal utility of `promptbookCli`
79
86
  */
80
87
  export declare const PROMPT_RUNNER_MODEL_OPTION_DESCRIPTION: string;
88
+ /**
89
+ * Commander description for the `--git-changes` option.
90
+ *
91
+ * @private internal utility of `promptbookCli`
92
+ */
93
+ export declare const GIT_CHANGES_OPTION_DESCRIPTION: string;
81
94
  /**
82
95
  * Registers runner selection flags on a command.
83
96
  *
@@ -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,15 @@
1
+ import type { NormalizedQuestionsCliOptions } from '../questionsCliOptions';
2
+ /**
3
+ * Checks local and global Promptbook CLI installations before an interactive coder run and offers to update them.
4
+ *
5
+ * Once an update succeeds, the caller must stop the current run and let the user start a fresh process. A local npm
6
+ * update can modify `package.json` and a lockfile, which would make the coder's clean-working-tree preflight fail;
7
+ * the current Node.js process has also already loaded the old CLI implementation.
8
+ *
9
+ * Note: `$` is used to indicate that this function is not a pure function - it reads package manifests, queries npm,
10
+ * asks the user, and may install npm packages
11
+ *
12
+ * @returns `true` when at least one installation was updated and the current coder run should stop
13
+ * @private internal utility of `promptbookCli`
14
+ */
15
+ export declare function $ensurePromptbookCliInstallations(questionsOptions: NormalizedQuestionsCliOptions): 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>;