@promptbook/cli 0.114.0-4 → 0.114.0-41

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 (1027) hide show
  1. package/README.md +9 -9
  2. package/agents/default/.core/adam.book +33 -0
  3. package/agents/default/developer.book +14 -19
  4. package/apps/agents-server/README.md +1 -1
  5. package/apps/agents-server/next.config.ts +28 -0
  6. package/apps/agents-server/package.json +7 -7
  7. package/apps/agents-server/scripts/build-agents-server.js +47 -7
  8. package/apps/agents-server/scripts/build-e2e.js +12 -2
  9. package/apps/agents-server/scripts/generate-reserved-paths/generate-reserved-paths.ts +30 -16
  10. package/apps/agents-server/scripts/kill-port.js +163 -0
  11. package/apps/agents-server/scripts/run-e2e-tests.js +21 -8
  12. package/apps/agents-server/scripts/run-npm.js +81 -5
  13. package/apps/agents-server/src/app/admin/_components/AdminFilterFields.tsx +84 -0
  14. package/apps/agents-server/src/app/admin/_components/AdminMetricCard.tsx +36 -0
  15. package/apps/agents-server/src/app/admin/_components/AdminTaskManagerTabs.tsx +97 -0
  16. package/apps/agents-server/src/app/admin/about/page.tsx +1 -1
  17. package/apps/agents-server/src/app/admin/email-server/page.tsx +17 -18
  18. package/apps/agents-server/src/app/admin/messages/MessageParticipants.tsx +84 -0
  19. package/apps/agents-server/src/app/admin/messages/MessageStatus.tsx +96 -0
  20. package/apps/agents-server/src/app/admin/messages/MessagesClient.tsx +29 -33
  21. package/apps/agents-server/src/app/admin/messages/messageAdminPresentation.ts +289 -0
  22. package/apps/agents-server/src/app/admin/messages/send-email/SendEmailClient.tsx +193 -63
  23. package/apps/agents-server/src/app/admin/messages/send-email/actions.ts +25 -28
  24. package/apps/agents-server/src/app/admin/messages/send-email/emailTesting.ts +153 -0
  25. package/apps/agents-server/src/app/admin/messages/send-email/emailTestingAccess.ts +30 -0
  26. package/apps/agents-server/src/app/admin/messages/send-email/page.tsx +18 -5
  27. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerClient.tsx +103 -0
  28. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerEditDialog.tsx +232 -0
  29. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerFiltersCard.tsx +195 -0
  30. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerRow.tsx +189 -0
  31. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerSummaryMetrics.tsx +60 -0
  32. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerTableCard.tsx +147 -0
  33. package/apps/agents-server/src/app/admin/planned-messages/page.tsx +17 -0
  34. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageEditForm.ts +186 -0
  35. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageManagerDialogs.ts +46 -0
  36. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageManagerPresentation.tsx +188 -0
  37. package/apps/agents-server/src/app/admin/planned-messages/resolvePlannedMessageSortValue.ts +115 -0
  38. package/apps/agents-server/src/app/admin/planned-messages/usePlannedMessageManagerData.ts +116 -0
  39. package/apps/agents-server/src/app/admin/planned-messages/usePlannedMessageManagerState.ts +289 -0
  40. package/apps/agents-server/src/app/admin/task-manager/TaskManagerClient.tsx +7 -2
  41. package/apps/agents-server/src/app/admin/task-manager/TaskManagerFiltersCard.tsx +7 -73
  42. package/apps/agents-server/src/app/admin/task-manager/TaskManagerSummaryMetrics.tsx +5 -30
  43. package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +2 -0
  44. package/apps/agents-server/src/app/admin/task-manager/[taskId]/TaskManagerTaskDetailClient.tsx +3 -1
  45. package/apps/agents-server/src/app/admin/task-manager/taskManagerTaskPresentation.tsx +23 -0
  46. package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +8 -9
  47. package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +5 -9
  48. package/apps/agents-server/src/app/agents/[agentName]/api/book/reference-diagnostics/route.ts +30 -7
  49. package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +9 -0
  50. package/apps/agents-server/src/app/agents/[agentName]/api/book/test.http +3 -3
  51. package/apps/agents-server/src/app/agents/[agentName]/api/chat/resolveAgentChatRouteContext.ts +3 -4
  52. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/[timeoutId]/route.ts +10 -153
  53. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/route.ts +9 -4
  54. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/route.ts +3 -0
  55. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/stream/route.ts +2 -0
  56. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/resolveUserChatScope.ts +8 -1
  57. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/route.ts +15 -7
  58. package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorMissingReferences.tsx +106 -12
  59. package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorWrapper.tsx +3 -0
  60. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorDiagnostics.ts +12 -0
  61. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorSaving.ts +18 -28
  62. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorWrapper.tsx +2 -0
  63. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistoryClient.tsx +19 -1
  64. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatSidebarDefault.tsx +17 -5
  65. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatNotice.tsx +23 -0
  66. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatPlannedMessages.tsx +226 -0
  67. package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatPanel.tsx +6 -0
  68. package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +32 -12
  69. package/apps/agents-server/src/app/agents/[agentName]/chat/ExternalUserChatAdminActions.tsx +51 -3
  70. package/apps/agents-server/src/app/agents/[agentName]/chat/TeamMemberFrozenChatPrimaryAgentLink.tsx +31 -0
  71. package/apps/agents-server/src/app/agents/[agentName]/chat/page.tsx +2 -20
  72. package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatSidebarState.ts +26 -2
  73. package/apps/agents-server/src/app/agents/[agentName]/goal/page.tsx +35 -0
  74. package/apps/agents-server/src/app/agents/[agentName]/page.tsx +2 -1
  75. package/apps/agents-server/src/app/agents/[agentName]/projectReferenceActions.ts +61 -0
  76. package/apps/agents-server/src/app/agents/[agentName]/projectRuntimeActions.ts +97 -0
  77. package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/actions.ts +5 -50
  78. package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/page.tsx +2 -2
  79. package/apps/agents-server/src/app/api/admin/default-agents/reinstate/route.ts +5 -1
  80. package/apps/agents-server/src/app/api/admin/dns-records/cloudflare/route.ts +26 -16
  81. package/apps/agents-server/src/app/api/admin/planned-messages/[timeoutId]/route.ts +80 -0
  82. package/apps/agents-server/src/app/api/admin/planned-messages/route.ts +19 -0
  83. package/apps/agents-server/src/app/api/emails/incoming/stalwart/route.ts +9 -2
  84. package/apps/agents-server/src/app/api/internal/agent-goal-chat-planned-messages/route.ts +201 -0
  85. package/apps/agents-server/src/app/page.tsx +1 -1
  86. package/apps/agents-server/src/app/superadmin/servers/ServersRegistryTable.tsx +31 -39
  87. package/apps/agents-server/src/app/swagger/SwaggerPageClient.tsx +35 -19
  88. package/apps/agents-server/src/components/AgentNaming/legacyAgentTextTranslations.cs.yaml +7 -0
  89. package/apps/agents-server/src/components/AgentProfile/AgentProfile.tsx +10 -3
  90. package/apps/agents-server/src/components/AgentProjects/AgentProjectIcon.tsx +137 -0
  91. package/apps/agents-server/src/components/AgentProjects/AgentProjectItem.tsx +26 -10
  92. package/apps/agents-server/src/components/AgentProjects/resolveLatestCompletedAgentMessageKey.ts +32 -0
  93. package/apps/agents-server/src/components/AgentProjects/useAgentProjectMarkdownReferences.ts +306 -0
  94. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsApiTokenImportStep.tsx +5 -6
  95. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsCheckStep.tsx +6 -5
  96. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsManualStep.tsx +10 -14
  97. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsWizard.tsx +11 -20
  98. package/apps/agents-server/src/components/CloudflareDnsWizard/useCloudflareDnsRecordImport.ts +5 -6
  99. package/apps/agents-server/src/components/DefaultAgents/ReinstateBundledAgentsButton.tsx +7 -0
  100. package/apps/agents-server/src/components/DefaultAgents/coreAgentsAdminRoute.ts +6 -0
  101. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsInstructions.tsx +91 -57
  102. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionPanel.tsx +63 -0
  103. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionVariantTabs.tsx +67 -0
  104. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsTable.tsx +40 -0
  105. package/apps/agents-server/src/components/Header/buildActiveAgentViewItems.ts +5 -4
  106. package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +7 -0
  107. package/apps/agents-server/src/components/Header/createAgentViewLabel.tsx +4 -4
  108. package/apps/agents-server/src/components/Header/resolveActiveAgentNavigation.ts +2 -2
  109. package/apps/agents-server/src/components/Homepage/DefaultAgentsStatusNotice.tsx +1 -7
  110. package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +22 -10
  111. package/apps/agents-server/src/components/_utils/generateMetaTxt.ts +1 -1
  112. package/apps/agents-server/src/constants/federatedAgentImport.ts +7 -0
  113. package/apps/agents-server/src/database/migratePrefix.ts +13 -12
  114. package/apps/agents-server/src/database/migrations/2026-08-0100-agent-goal-chat-source.sql +10 -0
  115. package/apps/agents-server/src/database/migrations/2026-08-1800-user-chat-timeout-schedule.sql +11 -0
  116. package/apps/agents-server/src/generated/reservedPaths.ts +42 -42
  117. package/apps/agents-server/src/instrumentation-node.ts +18 -0
  118. package/apps/agents-server/src/languages/ServerTranslationKeys.ts +16 -1
  119. package/apps/agents-server/src/languages/translations/czech.yaml +16 -1
  120. package/apps/agents-server/src/languages/translations/english.yaml +16 -1
  121. package/apps/agents-server/src/message-providers/email/stalwart/StalwartMessageProvider.ts +59 -19
  122. package/apps/agents-server/src/message-providers/email/stalwart/parseInboundStalwartEmail.ts +17 -2
  123. package/apps/agents-server/src/middleware/createMiddlewareRequestContext/loadRegisteredServers.ts +8 -0
  124. package/apps/agents-server/src/tools/$provideServer.ts +2 -1
  125. package/apps/agents-server/src/tools/agentGoalChatTimeoutToolFunctions.ts +249 -0
  126. package/apps/agents-server/src/tools/agentGoalChatTimeoutTools.ts +147 -0
  127. package/apps/agents-server/src/tools/createServerChatRuntimeTools.ts +20 -0
  128. package/apps/agents-server/src/tools/getAllToolFunctionsForServer.ts +2 -0
  129. package/apps/agents-server/src/tools/mapRegisteredServerContexts.ts +1 -1
  130. package/apps/agents-server/src/types/swagger-ui-dist.d.ts +5 -0
  131. package/apps/agents-server/src/utils/adminEntityLookups/loadAgentNamesByPermanentId.ts +45 -0
  132. package/apps/agents-server/src/utils/adminEntityLookups/loadUsernamesByUserId.ts +36 -0
  133. package/apps/agents-server/src/utils/adminEntityLookups.ts +2 -0
  134. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatConstants.ts +14 -0
  135. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatIdentity.ts +28 -0
  136. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatPlannedMessageActions.ts +583 -0
  137. package/apps/agents-server/src/utils/agentGoalChat/appendAgentGoalChatNote.ts +43 -0
  138. package/apps/agents-server/src/utils/agentGoalChat/canAccessAgentGoalChat.ts +14 -0
  139. package/apps/agents-server/src/utils/agentGoalChat/createAgentGoalChatNoteContent.ts +129 -0
  140. package/apps/agents-server/src/utils/agentGoalChat/enqueueAgentGoalChatTurn.ts +167 -0
  141. package/apps/agents-server/src/utils/agentGoalChat/ensureAgentGoalChat.ts +66 -0
  142. package/apps/agents-server/src/utils/agentGoalChat/prependAgentGoalChatSummarySeed.ts +40 -0
  143. package/apps/agents-server/src/utils/agentGoalChat/recordAgentGoalChatLifecycleNote.ts +53 -0
  144. package/apps/agents-server/src/utils/agentGoalChat/resolveAgentGoalChatOwnerUserId.ts +104 -0
  145. package/apps/agents-server/src/utils/agentGoalChat/resolveEffectiveAgentGoal.ts +29 -0
  146. package/apps/agents-server/src/utils/agentGoalChat/scheduleAgentGoalChatModifiedNote.ts +85 -0
  147. package/apps/agents-server/src/utils/agentGoalChat.ts +25 -0
  148. package/apps/agents-server/src/utils/agentProjects/AgentProjectInfo.ts +10 -1
  149. package/apps/agents-server/src/utils/agentProjects/AgentProjectReferenceInfo.ts +5 -2
  150. package/apps/agents-server/src/utils/agentProjects/AgentProjectRuntimeActionResult.ts +14 -0
  151. package/apps/agents-server/src/utils/agentProjects/agentProjectFileNames.ts +21 -0
  152. package/apps/agents-server/src/utils/agentProjects/agentProjectHrefs.ts +20 -11
  153. package/apps/agents-server/src/utils/agentProjects/agentProjectIdentity.ts +46 -0
  154. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeAutostartScheduler.ts +162 -0
  155. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDesiredState.ts +252 -0
  156. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDisplay.ts +6 -3
  157. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDomains.ts +2 -44
  158. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePaths.ts +25 -0
  159. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePm2.ts +60 -13
  160. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeRegistry.ts +77 -24
  161. package/apps/agents-server/src/utils/agentProjects/agentProjectStateMutationQueue.ts +58 -0
  162. package/apps/agents-server/src/utils/agentProjects/agentProjectsPaths.ts +15 -5
  163. package/apps/agents-server/src/utils/agentProjects/createAgentProjectInitials.ts +36 -0
  164. package/apps/agents-server/src/utils/agentProjects/createAgentProjectMarkdownReferences.ts +124 -19
  165. package/apps/agents-server/src/utils/agentProjects/createAgentProjectsDnsRecordsSection.ts +113 -0
  166. package/apps/agents-server/src/utils/agentProjects/createStaticAgentProjectServer.ts +2 -6
  167. package/apps/agents-server/src/utils/agentProjects/humanizeAgentProjectName.ts +25 -0
  168. package/apps/agents-server/src/utils/agentProjects/listAgentProjectChatReferences.ts +10 -3
  169. package/apps/agents-server/src/utils/agentProjects/listAgentProjectNames.ts +35 -0
  170. package/apps/agents-server/src/utils/agentProjects/listAgentProjects.ts +6 -23
  171. package/apps/agents-server/src/utils/agentProjects/listAllAgentProjectSummaries.ts +2 -1
  172. package/apps/agents-server/src/utils/agentProjects/listAllLocalAgentProjectIdentities.ts +48 -0
  173. package/apps/agents-server/src/utils/agentProjects/parseAgentProjectIndexHtml.ts +167 -0
  174. package/apps/agents-server/src/utils/agentProjects/readAgentProjectIndexHtmlProfile.ts +24 -0
  175. package/apps/agents-server/src/utils/agentProjects/readAgentProjectReadme.ts +3 -53
  176. package/apps/agents-server/src/utils/agentProjects/readAgentProjectRootTextFile.ts +73 -0
  177. package/apps/agents-server/src/utils/agentProjects/resolveAgentChatProjectReferences.ts +25 -0
  178. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectFaviconRelativePath.ts +108 -0
  179. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectInfo.ts +12 -3
  180. package/apps/agents-server/src/utils/agentProjects/{resolveAgentProjectReadmeProfile.ts → resolveAgentProjectProfile.ts} +33 -33
  181. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectPublicUrls.ts +34 -0
  182. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectRuntimeEnvironmentFlag.ts +23 -0
  183. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectRuntimeStatus.ts +73 -0
  184. package/apps/agents-server/src/utils/agentProjects/startDefaultAgentProjectRuntimes.ts +110 -0
  185. package/apps/agents-server/src/utils/agentReferenceResolver/AgentReferenceResolutionIssue.ts +1 -69
  186. package/apps/agents-server/src/utils/agentReferenceResolver/MissingCoreAgentRecovery.ts +19 -0
  187. package/apps/agents-server/src/utils/agentReferenceResolver/bookScopedAgentReferences.ts +7 -0
  188. package/apps/agents-server/src/utils/agentReferenceResolver/createAgentInheritanceDiagnostics.ts +457 -0
  189. package/apps/agents-server/src/utils/agentReferenceResolver/createUnresolvedAgentReferenceDiagnostics.ts +27 -0
  190. package/apps/agents-server/src/utils/agentReferenceResolver/extractAgentReferenceTokens.ts +1 -61
  191. package/apps/agents-server/src/utils/agentReferenceResolver/resolveCoreAgentAwareMissingReferences.ts +156 -0
  192. package/apps/agents-server/src/utils/bookLanguageDocumentation/createBookLanguageDocumentationPdfResponse.ts +19 -17
  193. package/apps/agents-server/src/utils/chatMessageChips/createAnsweredMessageChipToolCalls.ts +49 -0
  194. package/apps/agents-server/src/utils/chatMessageChips/createPlannedMessageChipToolCalls.ts +44 -0
  195. package/apps/agents-server/src/utils/chatMessageChips/createTouchedExternalSourceChipToolCalls.ts +39 -0
  196. package/apps/agents-server/src/utils/chatMessageChips/createTouchedProjectChipResult.ts +45 -0
  197. package/apps/agents-server/src/utils/chatMessageChips/createTouchedProjectChipToolCalls.ts +109 -0
  198. package/apps/agents-server/src/utils/chatTasksAdmin.ts +9 -0
  199. package/apps/agents-server/src/utils/createAgentWithDefaultVisibility.ts +8 -0
  200. package/apps/agents-server/src/utils/createWellKnownAgentUrl.ts +17 -0
  201. package/apps/agents-server/src/utils/cronExpression/CronExpression.ts +63 -0
  202. package/apps/agents-server/src/utils/cronExpression/normalizeCronExpression.ts +34 -0
  203. package/apps/agents-server/src/utils/cronExpression/normalizeCronExpressionWhitespace.ts +11 -0
  204. package/apps/agents-server/src/utils/cronExpression/parseCronExpression.ts +41 -0
  205. package/apps/agents-server/src/utils/cronExpression/parseCronExpressionField.ts +140 -0
  206. package/apps/agents-server/src/utils/cronExpression/resolveNextCronRun.ts +100 -0
  207. package/apps/agents-server/src/utils/cronExpression/throwInvalidCronExpressionField.ts +20 -0
  208. package/apps/agents-server/src/utils/cronExpression.ts +10 -0
  209. package/apps/agents-server/src/utils/currentServerRegistryContext.ts +2 -1
  210. package/apps/agents-server/src/utils/customDomainRouting.ts +143 -10
  211. package/apps/agents-server/src/utils/dnsRecords/DnsRecordInstruction.ts +20 -0
  212. package/apps/agents-server/src/utils/dnsRecords/DnsRecordsSection.ts +77 -0
  213. package/apps/agents-server/src/utils/dnsRecords/createServerDnsRecordsSections.ts +58 -0
  214. package/apps/agents-server/src/utils/dnsRecords/createServerDomainDnsRecordsSection.ts +48 -0
  215. package/apps/agents-server/src/utils/dnsRecords/dnsRecordGroups.ts +52 -0
  216. package/apps/agents-server/src/utils/dnsRecords/resolveDnsRecordBatchPlan.ts +47 -1
  217. package/apps/agents-server/src/utils/email/agentEmailAddress.ts +14 -0
  218. package/apps/agents-server/src/utils/email/sendEmailThroughStalwart.ts +2 -1
  219. package/apps/agents-server/src/utils/explicitFromCommitment.ts +1 -0
  220. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlQuery.ts +41 -36
  221. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/loadAdminChatTaskFallbackData.ts +3 -77
  222. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskFallbackRows.ts +3 -0
  223. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskSqlRows.ts +2 -0
  224. package/apps/agents-server/src/utils/getFederatedServers.ts +5 -15
  225. package/apps/agents-server/src/utils/getWellKnownAgentUrl.ts +2 -3
  226. package/apps/agents-server/src/utils/handleChatCompletion/createHandleChatCompletionPromptContext.ts +3 -1
  227. package/apps/agents-server/src/utils/localChatRunner/applyLocalAgentPlannedMessageCommands.ts +261 -0
  228. package/apps/agents-server/src/utils/localChatRunner/parseLocalTeamConversations.ts +281 -0
  229. package/apps/agents-server/src/utils/localChatRunner/persistLocalTeamConversations.ts +71 -0
  230. package/apps/agents-server/src/utils/localChatRunner/prepareLocalAgentPlannedMessagesSidecar.ts +74 -0
  231. package/apps/agents-server/src/utils/localChatRunner/prepareLocalTeamConversationWorkspace.ts +233 -0
  232. package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +154 -27
  233. package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentBooks.ts +5 -11
  234. package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentRuntime.ts +2 -2
  235. package/apps/agents-server/src/utils/managementApi/managementApiSchemas.ts +2 -2
  236. package/apps/agents-server/src/utils/parseFederatedServers.ts +14 -0
  237. package/apps/agents-server/src/utils/plannedMessageManager/cancelManagedPlannedMessage.ts +35 -0
  238. package/apps/agents-server/src/utils/plannedMessageManager/collectPlannedMessageAgentOptions.ts +56 -0
  239. package/apps/agents-server/src/utils/plannedMessageManager/createPlannedMessageManagerCounters.ts +104 -0
  240. package/apps/agents-server/src/utils/plannedMessageManager/filterPlannedMessages.ts +191 -0
  241. package/apps/agents-server/src/utils/plannedMessageManager/getPlannedMessageManagerResponse.ts +55 -0
  242. package/apps/agents-server/src/utils/plannedMessageManager/isPlannedMessageStillPlanned.ts +18 -0
  243. package/apps/agents-server/src/utils/plannedMessageManager/loadPlannedMessageManagerRecord.ts +32 -0
  244. package/apps/agents-server/src/utils/plannedMessageManager/mapPlannedMessageManagerRecord.ts +73 -0
  245. package/apps/agents-server/src/utils/plannedMessageManager/parsePlannedMessageManagerUpdateRequest.ts +76 -0
  246. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageEndReason.ts +59 -0
  247. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageLifecycle.ts +99 -0
  248. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageRecurrenceKind.ts +40 -0
  249. package/apps/agents-server/src/utils/plannedMessageManager/updateManagedPlannedMessage.ts +121 -0
  250. package/apps/agents-server/src/utils/plannedMessagesAdmin.ts +200 -0
  251. package/apps/agents-server/src/utils/resolveInheritedAgentSource.ts +33 -799
  252. package/apps/agents-server/src/utils/serverManagement/createManagedServer/insertManagedServerRegistryRow.ts +2 -2
  253. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerCoreAgents.ts +7 -6
  254. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +5 -4
  255. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerMetadata.ts +3 -2
  256. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerUsers.ts +3 -2
  257. package/apps/agents-server/src/utils/serverManagement/deleteManagedServer.ts +2 -2
  258. package/apps/agents-server/src/utils/serverManagement/getManagedServerById.ts +1 -1
  259. package/apps/agents-server/src/utils/serverManagement/listManagedServers.ts +1 -1
  260. package/apps/agents-server/src/utils/serverRegistry.ts +0 -24
  261. package/apps/agents-server/src/utils/serverRegistryNode.ts +27 -0
  262. package/apps/agents-server/src/utils/stalwart/createEmailDnsRecordsSection.ts +53 -0
  263. package/apps/agents-server/src/utils/userChat/UserChatRecord.ts +13 -0
  264. package/apps/agents-server/src/utils/userChat/UserChatSource.ts +14 -0
  265. package/apps/agents-server/src/utils/userChat/appendQueuedUserChatTurn.ts +9 -2
  266. package/apps/agents-server/src/utils/userChat/createImmediateUserChatAnswerModelRequirements.ts +1 -0
  267. package/apps/agents-server/src/utils/userChat/createRunUserChatJobExecutionContext.ts +2 -5
  268. package/apps/agents-server/src/utils/userChat/createUserChatSummary.ts +10 -2
  269. package/apps/agents-server/src/utils/userChat/finalizeUserChatJob.ts +3 -2
  270. package/apps/agents-server/src/utils/userChat/getUserChat.ts +16 -1
  271. package/apps/agents-server/src/utils/userChat/getUserChatForJobRunner.ts +31 -0
  272. package/apps/agents-server/src/utils/userChat/listUserChats.ts +113 -110
  273. package/apps/agents-server/src/utils/userChat/persistFrozenUserChat.ts +21 -6
  274. package/apps/agents-server/src/utils/userChat/persistUserChatJobTerminalState.ts +5 -0
  275. package/apps/agents-server/src/utils/userChat/resolveUserChatWorkerInternalToken.ts +5 -4
  276. package/apps/agents-server/src/utils/userChat/runImmediateUserChatAnswer.ts +2 -6
  277. package/apps/agents-server/src/utils/userChat/runUserChatJob.ts +2 -6
  278. package/apps/agents-server/src/utils/userChat/teamMemberUserChatContext.ts +63 -0
  279. package/apps/agents-server/src/utils/userChat/userChatJobRunReport.ts +30 -0
  280. package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +6 -1
  281. package/apps/agents-server/src/utils/userChat.ts +5 -1
  282. package/apps/agents-server/src/utils/userChatClient/cancelAgentUserTimeout.ts +2 -2
  283. package/apps/agents-server/src/utils/userChatClient/fetchAgentUserTimeouts.ts +2 -2
  284. package/apps/agents-server/src/utils/userChatClient.ts +13 -31
  285. package/apps/agents-server/src/utils/userChatTimeout/UserChatTimeoutRecord.ts +47 -3
  286. package/apps/agents-server/src/utils/userChatTimeout/agentScopedTimeoutBulkActions.ts +11 -17
  287. package/apps/agents-server/src/utils/userChatTimeout/createTimeoutWakeUpMessage.ts +38 -6
  288. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/PlannedMessageSchedule.ts +52 -0
  289. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/hasPlannedMessageRecurrence.ts +13 -0
  290. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/isPlannedMessageScheduleFinished.ts +30 -0
  291. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/normalizePlannedMessageScheduleValues.ts +62 -0
  292. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/parsePlannedMessageSchedule.ts +202 -0
  293. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/resolvePlannedMessageDueAt.ts +121 -0
  294. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule.ts +12 -0
  295. package/apps/agents-server/src/utils/userChatTimeout/setAgentScopedUserChatTimeoutPausedState.ts +66 -0
  296. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/claimNextDueUserChatTimeout.ts +28 -25
  297. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/createUserChatTimeout.ts +76 -5
  298. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/getAgentScopedUserChatTimeout.ts +8 -4
  299. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAgentUserChatTimeouts.ts +4 -1
  300. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAllUserChatTimeouts.ts +37 -0
  301. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/mapUserChatTimeoutRow.ts +9 -0
  302. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/recoverExpiredRunningUserChatTimeouts.ts +3 -2
  303. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/repeatFiredUserChatTimeout.ts +84 -0
  304. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/updateAgentScopedUserChatTimeout.ts +39 -6
  305. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore.ts +2 -0
  306. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutWorker.ts +220 -57
  307. package/apps/agents-server/src/utils/userChatTimeout.ts +16 -0
  308. package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateCron.ts +23 -316
  309. package/apps/agents-server/tests/e2e/support/AgentManagementApi.ts +3 -3
  310. package/esm/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
  311. package/esm/index.es.js +14405 -7058
  312. package/esm/index.es.js.map +1 -1
  313. package/esm/scripts/run-agent-messages/git/commitAgentProjectChanges.d.ts +15 -0
  314. package/esm/scripts/run-agent-messages/git/commitAnsweredMessageProjectChanges.d.ts +24 -0
  315. package/esm/scripts/run-agent-messages/git/ensureAgentProjectGitRepository.d.ts +20 -0
  316. package/esm/scripts/run-agent-messages/git/readAgentProjectCommitChange.d.ts +11 -0
  317. package/esm/scripts/run-agent-messages/git/runAgentProjectGitCommand.d.ts +29 -0
  318. package/esm/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
  319. package/esm/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
  320. package/esm/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
  321. package/esm/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
  322. package/esm/scripts/run-agent-messages/messages/createAgentRunnerSystemMessage.d.ts +2 -1
  323. package/esm/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
  324. package/esm/scripts/run-agent-messages/messages/listAgentProjectDirectoryNames.d.ts +7 -0
  325. package/esm/scripts/run-agent-messages/messages/loadAgentPlannedMessagesSidecar.d.ts +10 -0
  326. package/esm/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
  327. package/esm/scripts/run-agent-messages/messages/resolveAnsweredMessageTouches.d.ts +29 -0
  328. package/esm/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +54 -0
  329. package/esm/scripts/run-codex-prompts/common/applyCoderRunControlKey.d.ts +14 -0
  330. package/esm/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +7 -0
  331. package/esm/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
  332. package/esm/scripts/run-codex-prompts/common/createFreeDiskSpaceGuard.d.ts +25 -0
  333. package/esm/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
  334. package/esm/scripts/run-codex-prompts/common/formatUnknownErrorDetails.d.ts +4 -0
  335. package/esm/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +17 -0
  336. package/esm/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
  337. package/esm/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +32 -3
  338. package/esm/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +25 -0
  339. package/esm/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
  340. package/esm/scripts/run-codex-prompts/common/runGoScript/createScriptOutputLineReader.d.ts +22 -0
  341. package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +4 -0
  342. package/esm/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
  343. package/esm/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +15 -0
  344. package/esm/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
  345. package/esm/scripts/run-codex-prompts/git/coderGitSync.d.ts +15 -2
  346. package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +9 -3
  347. package/esm/scripts/run-codex-prompts/git/commitInitializedAgentBooks.d.ts +5 -0
  348. package/esm/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
  349. package/esm/scripts/run-codex-prompts/main/listCoderPrompts.d.ts +20 -0
  350. package/esm/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +5 -8
  351. package/esm/scripts/run-codex-prompts/main/runPromptRound.d.ts +2 -4
  352. package/esm/scripts/run-codex-prompts/ping/pingCoderHarnessPeriodically.d.ts +22 -0
  353. package/esm/scripts/run-codex-prompts/prompts/buildPromptLabel.d.ts +6 -0
  354. package/esm/scripts/run-codex-prompts/prompts/buildPromptRunTraceContent.d.ts +65 -0
  355. package/esm/scripts/run-codex-prompts/prompts/buildPromptRunTracePath.d.ts +10 -0
  356. package/esm/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +39 -0
  357. package/esm/scripts/run-codex-prompts/prompts/findFirstNonEmptyLineIndex.d.ts +6 -0
  358. package/esm/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
  359. package/esm/scripts/run-codex-prompts/prompts/formatRunnerSignature.d.ts +14 -1
  360. package/esm/scripts/run-codex-prompts/prompts/isPromptCompatibleWithRunner.d.ts +11 -6
  361. package/esm/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
  362. package/esm/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
  363. package/esm/scripts/run-codex-prompts/prompts/loadPromptFiles.d.ts +1 -1
  364. package/esm/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
  365. package/esm/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +28 -1
  366. package/esm/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
  367. package/esm/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +30 -0
  368. package/esm/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
  369. package/esm/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
  370. package/esm/scripts/run-codex-prompts/prompts/writePromptRunTrace.d.ts +19 -0
  371. package/esm/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +10 -0
  372. package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +25 -0
  373. package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +3 -0
  374. package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeSubscriptionUsage.d.ts +11 -0
  375. package/esm/scripts/run-codex-prompts/runners/common/buildHarnessAuthenticationError.d.ts +20 -0
  376. package/esm/scripts/run-codex-prompts/runners/common/createAuthenticationAwarePromptRunner.d.ts +11 -0
  377. package/esm/scripts/run-codex-prompts/runners/common/estimateUsageFromTextLength.d.ts +33 -0
  378. package/esm/scripts/run-codex-prompts/runners/common/extractHarnessAuthenticationFailureReason.d.ts +9 -0
  379. package/esm/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
  380. package/esm/scripts/run-codex-prompts/runners/gemini/GeminiRunner.d.ts +1 -1
  381. package/esm/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
  382. package/esm/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +8 -0
  383. package/esm/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
  384. package/esm/scripts/run-codex-prompts/runners/openai-codex/getCodexSubscriptionUsage.d.ts +19 -0
  385. package/esm/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +23 -0
  386. package/esm/scripts/run-codex-prompts/runners/qwen-code/buildQwenCodeScript.d.ts +8 -0
  387. package/esm/scripts/run-codex-prompts/runners/qwen-code/parseQwenCodeUsageFromOutput.d.ts +9 -0
  388. package/esm/scripts/run-codex-prompts/runners/qwen-code/qwen-code-pricing.d.ts +30 -0
  389. package/esm/scripts/run-codex-prompts/runners/types/HarnessSubscriptionUsage.d.ts +43 -0
  390. package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
  391. package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
  392. package/esm/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
  393. package/esm/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
  394. package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +21 -1
  395. package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
  396. package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +11 -1
  397. package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
  398. package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +11 -0
  399. package/esm/scripts/run-codex-prompts/ui/buildSubscriptionUsageSessionRows.d.ts +11 -0
  400. package/esm/scripts/run-codex-prompts/ui/refreshCoderRunUiSubscriptionUsage.d.ts +14 -0
  401. package/esm/scripts/run-codex-prompts/ui/startCoderRunUiSubscriptionUsageRefresh.d.ts +37 -0
  402. package/esm/scripts/utils/emojiTags/validSinglePictogramEmojis.d.ts +17 -0
  403. package/esm/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
  404. package/esm/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
  405. package/esm/scripts/verify-prompts/verify-prompts.d.ts +3 -2
  406. package/esm/src/_packages/components.index.d.ts +4 -0
  407. package/esm/src/_packages/types.index.d.ts +4 -0
  408. package/esm/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  409. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  410. package/esm/src/book-2.0/agent-source/AgentReferenceResolutionIssue.d.ts +45 -0
  411. package/esm/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
  412. package/esm/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  413. package/esm/src/book-2.0/agent-source/deduplicateSystemMessage.d.ts +14 -0
  414. package/esm/src/book-2.0/agent-source/explicitFromCommitment.d.ts +62 -0
  415. package/esm/src/book-2.0/agent-source/extractAgentReferenceTokens.d.ts +32 -0
  416. package/esm/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  417. package/esm/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
  418. package/esm/src/book-2.0/agent-source/resolveInheritedAgentSource.d.ts +73 -0
  419. package/esm/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +1 -1
  420. package/esm/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  421. package/esm/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  422. package/esm/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
  423. package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  424. package/esm/src/book-3.0/cliAgentEnv.d.ts +3 -3
  425. package/esm/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  426. package/esm/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  427. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  428. package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  429. package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
  430. package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  431. package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
  432. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  433. package/esm/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  434. package/esm/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  435. package/esm/src/book-components/Chat/MockedChat/MockedChat.test.d.ts +2 -0
  436. package/esm/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  437. package/esm/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
  438. package/esm/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  439. package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  440. package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  441. package/esm/src/cli/$initializePromptbookCliProgram.d.ts +8 -0
  442. package/esm/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +10 -0
  443. package/esm/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.test.d.ts +1 -0
  444. package/esm/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  445. package/esm/src/cli/cli-commands/coder/agentCliOptions.d.ts +21 -0
  446. package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +1 -1
  447. package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +8 -21
  448. package/esm/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +33 -0
  449. package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +14 -1
  450. package/esm/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +4 -2
  451. package/esm/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +2 -0
  452. package/esm/src/cli/cli-commands/coder/ensureDirectory.d.ts +6 -0
  453. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +1 -1
  454. package/esm/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
  455. package/esm/src/cli/cli-commands/coder/init.test.d.ts +1 -0
  456. package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +8 -5
  457. package/esm/src/cli/cli-commands/coder/list.d.ts +10 -0
  458. package/esm/src/cli/cli-commands/coder/list.test.d.ts +1 -0
  459. package/esm/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +19 -1
  460. package/esm/src/cli/cli-commands/coder/printCoderRunFailure.d.ts +6 -0
  461. package/esm/src/cli/cli-commands/coder/server.test.d.ts +1 -0
  462. package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
  463. package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  464. package/esm/src/cli/cli-commands/coder.d.ts +1 -0
  465. package/esm/src/cli/cli-commands/common/$askForConfirmation.d.ts +11 -0
  466. package/esm/src/cli/cli-commands/common/$askForConfirmation.test.d.ts +1 -0
  467. package/esm/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +46 -0
  468. package/esm/src/cli/cli-commands/common/createLocalAgentReferenceResolver.d.ts +8 -0
  469. package/esm/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.d.ts +12 -0
  470. package/esm/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.test.d.ts +1 -0
  471. package/esm/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.d.ts +11 -0
  472. package/esm/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.test.d.ts +1 -0
  473. package/esm/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.d.ts +33 -0
  474. package/esm/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.d.ts +6 -0
  475. package/esm/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.test.d.ts +1 -0
  476. package/esm/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.d.ts +10 -0
  477. package/esm/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.d.ts +28 -0
  478. package/esm/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.d.ts +7 -0
  479. package/esm/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.test.d.ts +1 -0
  480. package/esm/src/cli/cli-commands/common/ensureAdamAgentBook.d.ts +12 -0
  481. package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +3 -2
  482. package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  483. package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
  484. package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +4 -3
  485. package/esm/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
  486. package/esm/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
  487. package/esm/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
  488. package/esm/src/cli/cli-commands/common/harness/HARNESS_DEFAULT_MODELS.d.ts +25 -0
  489. package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +62 -0
  490. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
  491. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
  492. package/esm/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
  493. package/esm/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
  494. package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
  495. package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
  496. package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
  497. package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
  498. package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
  499. package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
  500. package/esm/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts +11 -0
  501. package/{umd/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts → esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  502. package/esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
  503. package/esm/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
  504. package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  505. package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
  506. package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  507. package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
  508. package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  509. package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
  510. package/esm/src/cli/cli-commands/common/projectInitialization.d.ts +6 -0
  511. package/esm/src/cli/cli-commands/common/promptPriorityCliOptions.d.ts +7 -0
  512. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
  513. package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  514. package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
  515. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +15 -0
  516. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
  517. package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  518. package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
  519. package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  520. package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
  521. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  522. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  523. package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  524. package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  525. package/esm/src/cli/cli-commands/common/questionsCliOptions.d.ts +45 -0
  526. package/esm/src/cli/cli-commands/common/questionsCliOptions.test.d.ts +1 -0
  527. package/esm/src/cli/cli-commands/common/resolveBundledAgentBookPath.d.ts +6 -0
  528. package/esm/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +19 -0
  529. package/esm/src/cli/common/$deprecateCliCommand.d.ts +3 -0
  530. package/esm/src/cli/common/$hideCliCommandFromHelp.d.ts +11 -0
  531. package/esm/src/cli/common/$hideCliCommandFromHelp.test.d.ts +1 -0
  532. package/esm/src/cli/common/$requireCliSubcommand.d.ts +18 -0
  533. package/esm/src/cli/common/$requireCliSubcommand.test.d.ts +1 -0
  534. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  535. package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
  536. package/esm/src/commitments/index.d.ts +1 -1
  537. package/esm/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  538. package/esm/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
  539. package/esm/src/llm-providers/vercel/VercelExecutionToolsOptions.d.ts +5 -2
  540. package/esm/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  541. package/esm/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  542. package/esm/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  543. package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  544. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  545. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
  546. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  547. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
  548. package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  549. package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  550. package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  551. package/esm/src/utils/files/findFilesByGlob.d.ts +28 -0
  552. package/esm/src/utils/misc/debounce.d.ts +4 -2
  553. package/esm/src/utils/misc/debounce.test.d.ts +1 -0
  554. package/esm/src/utils/misc/emojis.d.ts +3 -2
  555. package/esm/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
  556. package/esm/src/version.d.ts +1 -1
  557. package/package.json +21 -27
  558. package/src/_packages/components.index.ts +4 -0
  559. package/src/_packages/types.index.ts +4 -0
  560. package/src/avatars/renderAvatarVisualTerminalText.ts +249 -0
  561. package/src/avatars/types/AvatarVisualDefinition.ts +60 -0
  562. package/src/avatars/visuals/asciiOctopusAvatarVisual.ts +144 -22
  563. package/src/book-2.0/agent-source/AgentReferenceResolutionIssue.ts +75 -0
  564. package/src/book-2.0/agent-source/AgentSourceParseResult.ts +6 -0
  565. package/src/book-2.0/agent-source/ParsedUnknownCommitment.ts +29 -0
  566. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.ts +38 -1
  567. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.ts +3 -2
  568. package/src/book-2.0/agent-source/deduplicateSystemMessage.ts +327 -0
  569. package/src/book-2.0/agent-source/explicitFromCommitment.ts +132 -0
  570. package/src/book-2.0/agent-source/extractAgentReferenceTokens.ts +65 -0
  571. package/src/book-2.0/agent-source/getBookCommitmentLineType.ts +36 -0
  572. package/src/book-2.0/agent-source/parseAgentSourceWithCommitments.ts +128 -61
  573. package/src/book-2.0/agent-source/resolveInheritedAgentSource.ts +841 -0
  574. package/src/book-2.0/agent-source/string_book.ts +1 -1
  575. package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +5 -4
  576. package/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.ts +6 -1
  577. package/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.ts +6 -1
  578. package/src/book-2.0/book-language-documentation/getSafeCodeBlock.ts +1 -1
  579. package/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.ts +1 -4
  580. package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +4 -17
  581. package/src/book-3.0/AgentMessageRunReport.ts +135 -0
  582. package/src/book-3.0/AgentPlannedMessagesSidecar.ts +284 -0
  583. package/src/book-3.0/AgentTeamConversationWorkspace.ts +170 -0
  584. package/src/book-3.0/cliAgentEnv.ts +3 -2
  585. package/src/book-3.0/createAgentMessageSidecarBaseName.ts +20 -0
  586. package/src/book-3.0/describeAgentPlannedMessageSchedule.ts +94 -0
  587. package/src/book-components/BookEditor/BookEditorMonaco.tsx +8 -1
  588. package/src/book-components/BookEditor/BookEditorMonacoTokenization.ts +3 -1
  589. package/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.ts +3 -11
  590. package/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.ts +71 -0
  591. package/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.ts +50 -0
  592. package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +56 -55
  593. package/src/book-components/Chat/Chat/Chat.module.css +172 -27
  594. package/src/book-components/Chat/Chat/ChatMessageMap.tsx +7 -4
  595. package/src/book-components/Chat/Chat/ChatProps.tsx +3 -2
  596. package/src/book-components/Chat/Chat/renderAgentProjectDiff.tsx +85 -0
  597. package/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.tsx +206 -0
  598. package/src/book-components/Chat/Chat/renderToolCallDetails.tsx +9 -12
  599. package/src/book-components/Chat/MarkdownContent/MarkdownContent.module.css +85 -17
  600. package/src/book-components/Chat/MarkdownContent/MarkdownContent.tsx +115 -2
  601. package/src/book-components/Chat/MockedChat/MockedChat.tsx +25 -1
  602. package/src/book-components/Chat/save/react/exports/chat-preview-2025-10-13 (1).jsx +95 -5
  603. package/src/book-components/Chat/utils/agentProjectToolCall.ts +151 -0
  604. package/src/book-components/Chat/utils/externalSourceToolCall.ts +65 -0
  605. package/src/book-components/Chat/utils/getToolCallChipletInfo.ts +64 -0
  606. package/src/book-components/Chat/utils/renderMarkdown.ts +658 -96
  607. package/src/book-components/Chat/utils/timeoutToolCallPresentation.ts +34 -3
  608. package/src/cli/$initializePromptbookCliProgram.ts +87 -0
  609. package/src/cli/cli-commands/agent-folder.ts +2 -6
  610. package/src/cli/cli-commands/agent.ts +2 -6
  611. package/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.ts +1 -1
  612. package/src/cli/cli-commands/agents-server.ts +2 -6
  613. package/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.ts +54 -0
  614. package/src/cli/cli-commands/coder/GitChangesMode.ts +35 -0
  615. package/src/cli/cli-commands/coder/add.ts +30 -5
  616. package/src/cli/cli-commands/coder/agentCliOptions.ts +32 -0
  617. package/src/cli/cli-commands/coder/boilerplateCount.ts +1 -1
  618. package/src/cli/cli-commands/coder/boilerplateTemplates.ts +20 -59
  619. package/src/cli/cli-commands/coder/coderReferencedArtifacts.ts +106 -0
  620. package/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.ts +2 -28
  621. package/src/cli/cli-commands/coder/ensureCoderGitignoreFile.ts +37 -3
  622. package/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.ts +4 -2
  623. package/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.ts +5 -1
  624. package/src/cli/cli-commands/coder/ensureDirectory.ts +27 -1
  625. package/src/cli/cli-commands/coder/generate-boilerplates.ts +27 -27
  626. package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +99 -9
  627. package/src/cli/cli-commands/coder/init.ts +31 -11
  628. package/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.ts +23 -27
  629. package/src/cli/cli-commands/coder/list.ts +91 -0
  630. package/src/cli/cli-commands/coder/mergeStringRecordJsonFile.ts +31 -7
  631. package/src/cli/cli-commands/coder/ping.ts +60 -19
  632. package/src/cli/cli-commands/coder/printCoderRunFailure.ts +14 -0
  633. package/src/cli/cli-commands/coder/printInitializationSummary.ts +29 -16
  634. package/src/cli/cli-commands/coder/run.ts +53 -31
  635. package/src/cli/cli-commands/coder/server.ts +49 -39
  636. package/src/cli/cli-commands/coder/verify.ts +29 -5
  637. package/src/cli/cli-commands/coder/waitOptions.ts +33 -0
  638. package/src/cli/cli-commands/coder.ts +6 -6
  639. package/src/cli/cli-commands/common/$askForConfirmation.ts +41 -0
  640. package/src/cli/cli-commands/common/LocalAgentBookCollection.ts +220 -0
  641. package/src/cli/cli-commands/common/coderGitSyncCliOptions.ts +6 -2
  642. package/src/cli/cli-commands/common/createLocalAgentReferenceResolver.ts +62 -0
  643. package/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.ts +35 -0
  644. package/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.ts +37 -0
  645. package/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.ts +39 -0
  646. package/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.ts +26 -0
  647. package/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.ts +33 -0
  648. package/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.ts +33 -0
  649. package/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.ts +21 -0
  650. package/src/cli/cli-commands/common/ensureAdamAgentBook.ts +40 -0
  651. package/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.ts +79 -11
  652. package/src/cli/cli-commands/common/harness/$checkHarnessInstallation.ts +32 -9
  653. package/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.ts +12 -4
  654. package/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.ts +46 -0
  655. package/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.ts +36 -0
  656. package/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.ts +2 -2
  657. package/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.ts +100 -0
  658. package/src/cli/cli-commands/common/harness/HARNESS_DEFAULT_MODELS.ts +37 -0
  659. package/src/cli/cli-commands/common/harness/HarnessDefinition.ts +101 -0
  660. package/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.ts +44 -0
  661. package/src/cli/cli-commands/common/harness/HarnessInstallationStatus.ts +9 -2
  662. package/src/cli/cli-commands/common/harness/HarnessUpdatePlan.ts +27 -0
  663. package/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.ts +6 -2
  664. package/src/cli/cli-commands/common/harness/formatHarnessInstallationWarning.ts +28 -6
  665. package/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.ts +41 -0
  666. package/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.ts +111 -0
  667. package/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.ts +47 -0
  668. package/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.ts +20 -0
  669. package/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.ts +49 -0
  670. package/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.ts +51 -0
  671. package/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.ts +28 -0
  672. package/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.ts +25 -0
  673. package/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.ts +165 -0
  674. package/src/cli/cli-commands/common/projectInitialization.ts +35 -3
  675. package/src/cli/cli-commands/common/promptPriorityCliOptions.ts +30 -0
  676. package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +51 -17
  677. package/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.ts +69 -0
  678. package/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.ts +128 -0
  679. package/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.ts +259 -0
  680. package/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.ts +55 -0
  681. package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.ts +76 -0
  682. package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.ts +32 -0
  683. package/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.ts +13 -0
  684. package/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.ts +45 -0
  685. package/src/cli/cli-commands/common/questionsCliOptions.ts +89 -0
  686. package/src/cli/cli-commands/common/resolveBundledAgentBookPath.ts +38 -0
  687. package/src/cli/cli-commands/common/resolveLocalAgentSource.ts +127 -0
  688. package/src/cli/cli-commands/prettify.ts +2 -2
  689. package/src/cli/cli-commands/run.ts +3 -1
  690. package/src/cli/cli-commands/test-command.ts +2 -2
  691. package/src/cli/common/$deprecateCliCommand.ts +5 -0
  692. package/src/cli/common/$hideCliCommandFromHelp.ts +27 -0
  693. package/src/cli/common/$requireCliSubcommand.ts +35 -0
  694. package/src/cli/promptbookCli.ts +6 -87
  695. package/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.ts +47 -3
  696. package/src/commands/FORMAT/formatCommandParser.ts +4 -2
  697. package/src/commitments/FROM/FROM.ts +13 -0
  698. package/src/commitments/WRITING_RULES/WRITING_RULES.ts +16 -8
  699. package/src/commitments/index.ts +2 -1
  700. package/src/executables/platforms/locateAppOnWindows.ts +12 -9
  701. package/src/execution/translation/automatic-translate/translateMessages.ts +4 -2
  702. package/src/llm-providers/openai/utils/buildToolInvocationScript.ts +21 -18
  703. package/src/llm-providers/vercel/VercelExecutionToolsOptions.ts +7 -2
  704. package/src/llm-providers/vercel/createExecutionToolsFromVercelProvider.ts +18 -17
  705. package/src/other/templates/getTemplatesPipelineCollection.ts +820 -723
  706. package/src/utils/agent-message-runtime/AgentMessageProjectChange.ts +183 -0
  707. package/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.ts +80 -0
  708. package/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.ts +108 -0
  709. package/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.ts +78 -75
  710. package/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.ts +341 -0
  711. package/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.ts +147 -0
  712. package/src/utils/agents/terminalAgentAvatarVisual.ts +31 -3
  713. package/src/utils/ascii-art/convertImageDataToAsciiArt.ts +9 -109
  714. package/src/utils/ascii-art/createAnsiColorCode.ts +132 -0
  715. package/src/utils/files/findFilesByGlob.ts +46 -0
  716. package/src/utils/misc/debounce.ts +26 -5
  717. package/src/utils/misc/emojis.ts +3 -3
  718. package/src/utils/random/$generateBookBoilerplate.ts +1 -1
  719. package/src/version.ts +2 -2
  720. package/src/versions.txt +35 -0
  721. package/umd/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
  722. package/umd/index.umd.js +14401 -7055
  723. package/umd/index.umd.js.map +1 -1
  724. package/umd/scripts/run-agent-messages/git/commitAgentProjectChanges.d.ts +15 -0
  725. package/umd/scripts/run-agent-messages/git/commitAnsweredMessageProjectChanges.d.ts +24 -0
  726. package/umd/scripts/run-agent-messages/git/ensureAgentProjectGitRepository.d.ts +20 -0
  727. package/umd/scripts/run-agent-messages/git/readAgentProjectCommitChange.d.ts +11 -0
  728. package/umd/scripts/run-agent-messages/git/runAgentProjectGitCommand.d.ts +29 -0
  729. package/umd/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
  730. package/umd/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
  731. package/umd/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
  732. package/umd/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
  733. package/umd/scripts/run-agent-messages/messages/createAgentRunnerSystemMessage.d.ts +2 -1
  734. package/umd/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
  735. package/umd/scripts/run-agent-messages/messages/listAgentProjectDirectoryNames.d.ts +7 -0
  736. package/umd/scripts/run-agent-messages/messages/loadAgentPlannedMessagesSidecar.d.ts +10 -0
  737. package/umd/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
  738. package/umd/scripts/run-agent-messages/messages/resolveAnsweredMessageTouches.d.ts +29 -0
  739. package/umd/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +54 -0
  740. package/umd/scripts/run-codex-prompts/common/applyCoderRunControlKey.d.ts +14 -0
  741. package/umd/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +7 -0
  742. package/umd/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
  743. package/umd/scripts/run-codex-prompts/common/createFreeDiskSpaceGuard.d.ts +25 -0
  744. package/umd/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
  745. package/umd/scripts/run-codex-prompts/common/formatUnknownErrorDetails.d.ts +4 -0
  746. package/umd/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +17 -0
  747. package/umd/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
  748. package/umd/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +32 -3
  749. package/umd/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +25 -0
  750. package/umd/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
  751. package/umd/scripts/run-codex-prompts/common/runGoScript/createScriptOutputLineReader.d.ts +22 -0
  752. package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +4 -0
  753. package/umd/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
  754. package/umd/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +15 -0
  755. package/umd/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
  756. package/umd/scripts/run-codex-prompts/git/coderGitSync.d.ts +15 -2
  757. package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +9 -3
  758. package/umd/scripts/run-codex-prompts/git/commitInitializedAgentBooks.d.ts +5 -0
  759. package/umd/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
  760. package/umd/scripts/run-codex-prompts/main/listCoderPrompts.d.ts +20 -0
  761. package/umd/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +5 -8
  762. package/umd/scripts/run-codex-prompts/main/runPromptRound.d.ts +2 -4
  763. package/umd/scripts/run-codex-prompts/ping/pingCoderHarnessPeriodically.d.ts +22 -0
  764. package/umd/scripts/run-codex-prompts/prompts/buildPromptLabel.d.ts +6 -0
  765. package/umd/scripts/run-codex-prompts/prompts/buildPromptRunTraceContent.d.ts +65 -0
  766. package/umd/scripts/run-codex-prompts/prompts/buildPromptRunTracePath.d.ts +10 -0
  767. package/umd/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +39 -0
  768. package/umd/scripts/run-codex-prompts/prompts/findFirstNonEmptyLineIndex.d.ts +6 -0
  769. package/umd/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
  770. package/umd/scripts/run-codex-prompts/prompts/formatRunnerSignature.d.ts +14 -1
  771. package/umd/scripts/run-codex-prompts/prompts/isPromptCompatibleWithRunner.d.ts +11 -6
  772. package/umd/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
  773. package/umd/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
  774. package/umd/scripts/run-codex-prompts/prompts/loadPromptFiles.d.ts +1 -1
  775. package/umd/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
  776. package/umd/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +28 -1
  777. package/umd/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
  778. package/umd/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +30 -0
  779. package/umd/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
  780. package/umd/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
  781. package/umd/scripts/run-codex-prompts/prompts/writePromptRunTrace.d.ts +19 -0
  782. package/umd/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +10 -0
  783. package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +25 -0
  784. package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +3 -0
  785. package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeSubscriptionUsage.d.ts +11 -0
  786. package/umd/scripts/run-codex-prompts/runners/common/buildHarnessAuthenticationError.d.ts +20 -0
  787. package/umd/scripts/run-codex-prompts/runners/common/createAuthenticationAwarePromptRunner.d.ts +11 -0
  788. package/umd/scripts/run-codex-prompts/runners/common/estimateUsageFromTextLength.d.ts +33 -0
  789. package/umd/scripts/run-codex-prompts/runners/common/extractHarnessAuthenticationFailureReason.d.ts +9 -0
  790. package/umd/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
  791. package/umd/scripts/run-codex-prompts/runners/gemini/GeminiRunner.d.ts +1 -1
  792. package/umd/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
  793. package/umd/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +8 -0
  794. package/umd/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
  795. package/umd/scripts/run-codex-prompts/runners/openai-codex/getCodexSubscriptionUsage.d.ts +19 -0
  796. package/umd/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +23 -0
  797. package/umd/scripts/run-codex-prompts/runners/qwen-code/buildQwenCodeScript.d.ts +8 -0
  798. package/umd/scripts/run-codex-prompts/runners/qwen-code/parseQwenCodeUsageFromOutput.d.ts +9 -0
  799. package/umd/scripts/run-codex-prompts/runners/qwen-code/qwen-code-pricing.d.ts +30 -0
  800. package/umd/scripts/run-codex-prompts/runners/types/HarnessSubscriptionUsage.d.ts +43 -0
  801. package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
  802. package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
  803. package/umd/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
  804. package/umd/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
  805. package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +21 -1
  806. package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
  807. package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +11 -1
  808. package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
  809. package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +11 -0
  810. package/umd/scripts/run-codex-prompts/ui/buildSubscriptionUsageSessionRows.d.ts +11 -0
  811. package/umd/scripts/run-codex-prompts/ui/refreshCoderRunUiSubscriptionUsage.d.ts +14 -0
  812. package/umd/scripts/run-codex-prompts/ui/startCoderRunUiSubscriptionUsageRefresh.d.ts +37 -0
  813. package/umd/scripts/utils/emojiTags/validSinglePictogramEmojis.d.ts +17 -0
  814. package/umd/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
  815. package/umd/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
  816. package/umd/scripts/verify-prompts/verify-prompts.d.ts +3 -2
  817. package/umd/src/_packages/components.index.d.ts +4 -0
  818. package/umd/src/_packages/types.index.d.ts +4 -0
  819. package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  820. package/umd/src/avatars/renderAvatarVisualTerminalText.test.d.ts +1 -0
  821. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  822. package/umd/src/book-2.0/agent-source/AgentReferenceResolutionIssue.d.ts +45 -0
  823. package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
  824. package/umd/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  825. package/umd/src/book-2.0/agent-source/createAgentModelRequirements.deduplication.test.d.ts +1 -0
  826. package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts +1 -0
  827. package/umd/src/book-2.0/agent-source/deduplicateSystemMessage.d.ts +14 -0
  828. package/umd/src/book-2.0/agent-source/deduplicateSystemMessage.test.d.ts +1 -0
  829. package/umd/src/book-2.0/agent-source/explicitFromCommitment.d.ts +62 -0
  830. package/umd/src/book-2.0/agent-source/extractAgentReferenceTokens.d.ts +32 -0
  831. package/umd/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  832. package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
  833. package/umd/src/book-2.0/agent-source/resolveInheritedAgentSource.d.ts +73 -0
  834. package/umd/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +1 -1
  835. package/umd/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  836. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  837. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
  838. package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  839. package/umd/src/book-3.0/cliAgentEnv.d.ts +3 -3
  840. package/umd/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  841. package/umd/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  842. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  843. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  844. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
  845. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  846. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
  847. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  848. package/umd/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  849. package/umd/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  850. package/umd/src/book-components/Chat/MockedChat/MockedChat.test.d.ts +2 -0
  851. package/umd/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  852. package/umd/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
  853. package/umd/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  854. package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  855. package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  856. package/umd/src/cli/$initializePromptbookCliProgram.d.ts +8 -0
  857. package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +10 -0
  858. package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.test.d.ts +1 -0
  859. package/umd/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  860. package/umd/src/cli/cli-commands/coder/agentCliOptions.d.ts +21 -0
  861. package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +1 -1
  862. package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +8 -21
  863. package/umd/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +33 -0
  864. package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +14 -1
  865. package/umd/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +4 -2
  866. package/umd/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +2 -0
  867. package/umd/src/cli/cli-commands/coder/ensureDirectory.d.ts +6 -0
  868. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +1 -1
  869. package/umd/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
  870. package/umd/src/cli/cli-commands/coder/init.test.d.ts +1 -0
  871. package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +8 -5
  872. package/umd/src/cli/cli-commands/coder/list.d.ts +10 -0
  873. package/umd/src/cli/cli-commands/coder/list.test.d.ts +1 -0
  874. package/umd/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +19 -1
  875. package/umd/src/cli/cli-commands/coder/printCoderRunFailure.d.ts +6 -0
  876. package/umd/src/cli/cli-commands/coder/server.test.d.ts +1 -0
  877. package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
  878. package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  879. package/umd/src/cli/cli-commands/coder.d.ts +1 -0
  880. package/umd/src/cli/cli-commands/common/$askForConfirmation.d.ts +11 -0
  881. package/umd/src/cli/cli-commands/common/$askForConfirmation.test.d.ts +1 -0
  882. package/umd/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +46 -0
  883. package/umd/src/cli/cli-commands/common/createLocalAgentReferenceResolver.d.ts +8 -0
  884. package/umd/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.d.ts +12 -0
  885. package/umd/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.test.d.ts +1 -0
  886. package/umd/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.d.ts +11 -0
  887. package/umd/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.test.d.ts +1 -0
  888. package/umd/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.d.ts +33 -0
  889. package/umd/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.d.ts +6 -0
  890. package/umd/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.test.d.ts +1 -0
  891. package/umd/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.d.ts +10 -0
  892. package/umd/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.d.ts +28 -0
  893. package/umd/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.d.ts +7 -0
  894. package/umd/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.test.d.ts +1 -0
  895. package/umd/src/cli/cli-commands/common/ensureAdamAgentBook.d.ts +12 -0
  896. package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +3 -2
  897. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  898. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
  899. package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +4 -3
  900. package/umd/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
  901. package/umd/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
  902. package/umd/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
  903. package/umd/src/cli/cli-commands/common/harness/HARNESS_DEFAULT_MODELS.d.ts +25 -0
  904. package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +62 -0
  905. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
  906. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
  907. package/umd/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
  908. package/umd/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
  909. package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
  910. package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
  911. package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
  912. package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
  913. package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
  914. package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
  915. package/umd/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts +11 -0
  916. package/{esm/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.d.ts → umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  917. package/umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
  918. package/umd/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
  919. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  920. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
  921. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  922. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
  923. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  924. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
  925. package/umd/src/cli/cli-commands/common/projectInitialization.d.ts +6 -0
  926. package/umd/src/cli/cli-commands/common/promptPriorityCliOptions.d.ts +7 -0
  927. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
  928. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  929. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
  930. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +15 -0
  931. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
  932. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  933. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
  934. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  935. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
  936. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  937. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  938. package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  939. package/umd/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  940. package/umd/src/cli/cli-commands/common/questionsCliOptions.d.ts +45 -0
  941. package/umd/src/cli/cli-commands/common/questionsCliOptions.test.d.ts +1 -0
  942. package/umd/src/cli/cli-commands/common/resolveBundledAgentBookPath.d.ts +6 -0
  943. package/umd/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +19 -0
  944. package/umd/src/cli/common/$deprecateCliCommand.d.ts +3 -0
  945. package/umd/src/cli/common/$hideCliCommandFromHelp.d.ts +11 -0
  946. package/umd/src/cli/common/$hideCliCommandFromHelp.test.d.ts +1 -0
  947. package/umd/src/cli/common/$requireCliSubcommand.d.ts +18 -0
  948. package/umd/src/cli/common/$requireCliSubcommand.test.d.ts +1 -0
  949. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  950. package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
  951. package/umd/src/commitments/index.d.ts +1 -1
  952. package/umd/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  953. package/umd/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
  954. package/umd/src/llm-providers/vercel/VercelExecutionToolsOptions.d.ts +5 -2
  955. package/umd/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  956. package/umd/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  957. package/umd/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  958. package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  959. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  960. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
  961. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  962. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
  963. package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  964. package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  965. package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  966. package/umd/src/utils/files/findFilesByGlob.d.ts +28 -0
  967. package/umd/src/utils/misc/debounce.d.ts +4 -2
  968. package/umd/src/utils/misc/debounce.test.d.ts +1 -0
  969. package/umd/src/utils/misc/emojis.d.ts +3 -2
  970. package/umd/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
  971. package/umd/src/version.d.ts +1 -1
  972. package/apps/agents-server/scripts/ignore-kill-eperm.js +0 -31
  973. package/apps/agents-server/src/app/admin/task-manager/TaskManagerScopeTabs.tsx +0 -74
  974. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/actions/route.ts +0 -103
  975. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsClient.tsx +0 -43
  976. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsEditDialog.tsx +0 -98
  977. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsFiltersCard.tsx +0 -75
  978. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsHeader.tsx +0 -53
  979. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsSummaryMetrics.tsx +0 -70
  980. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableCard.tsx +0 -58
  981. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableRow.tsx +0 -242
  982. package/apps/agents-server/src/app/agents/[agentName]/timeouts/loading.tsx +0 -15
  983. package/apps/agents-server/src/app/agents/[agentName]/timeouts/page.tsx +0 -28
  984. package/apps/agents-server/src/app/agents/[agentName]/timeouts/useAgentTimeoutsClientState.ts +0 -769
  985. package/apps/agents-server/src/components/AgentProjectDnsInstructions/AgentProjectDnsInstructions.tsx +0 -182
  986. package/apps/agents-server/src/utils/userChatClient/runAgentUserTimeoutBulkAction.ts +0 -24
  987. package/apps/agents-server/src/utils/userChatClient/updateAgentUserTimeout.ts +0 -25
  988. package/esm/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +0 -69
  989. package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +0 -7
  990. package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +0 -30
  991. package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +0 -76
  992. package/esm/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +0 -4
  993. package/esm/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +0 -28
  994. package/esm/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +0 -110
  995. package/esm/scripts/find-fresh-emoji-tags/utils/emojis.d.ts +0 -16
  996. package/esm/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
  997. package/esm/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
  998. package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +0 -13
  999. package/esm/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +0 -9
  1000. package/esm/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
  1001. package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  1002. package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  1003. package/src/cli/cli-commands/coder/agentCodingFile.ts +0 -25
  1004. package/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.ts +0 -31
  1005. package/src/cli/cli-commands/common/harness/$installHarness.ts +0 -56
  1006. package/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.ts +0 -34
  1007. package/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.ts +0 -28
  1008. package/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.ts +0 -39
  1009. package/umd/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +0 -69
  1010. package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +0 -7
  1011. package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +0 -30
  1012. package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +0 -76
  1013. package/umd/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +0 -4
  1014. package/umd/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +0 -28
  1015. package/umd/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +0 -110
  1016. package/umd/scripts/find-fresh-emoji-tags/utils/emojis.d.ts +0 -16
  1017. package/umd/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
  1018. package/umd/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
  1019. package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +0 -13
  1020. package/umd/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +0 -9
  1021. package/umd/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
  1022. package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  1023. package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  1024. /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
  1025. /package/esm/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.deduplication.test.d.ts} +0 -0
  1026. /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
  1027. /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
@@ -0,0 +1,15 @@
1
+ import { type WorldTimeDeadlineTick } from './waitUntilWorldTimeDeadline';
2
+ /**
3
+ * Waits until one wall-clock deadline has passed, or until the user skips the wait with the `S` control.
4
+ *
5
+ * This is the single way `ptbk coder` waits for a deadline the user is allowed to cut short, so every
6
+ * wait which shows the `S Skip current waiting` control really reacts to it: the pacing waits between
7
+ * prompts, the cool-down after an error, the harness session-limit waits and the server keep-alive poll.
8
+ *
9
+ * @private internal utility of `ptbk coder` wait handling
10
+ */
11
+ export declare function waitForSkippableWorldTimeDeadline(options: {
12
+ readonly deadlineTimeMs: number;
13
+ readonly pollIntervalMs: number;
14
+ readonly onTick?: WorldTimeDeadlineTick;
15
+ }): Promise<void>;
@@ -0,0 +1,31 @@
1
+ import type { WorkingTreeChangesSnapshot } from './workingTreeChanges';
2
+ /**
3
+ * Working tree state captured right before one `ptbk coder` operation starts changing the project.
4
+ *
5
+ * Note: This is the single mechanism which every `ptbk coder` command uses to commit only the files relevant
6
+ * for the operation it has just performed, instead of everything which happens to be changed in the project.
7
+ */
8
+ export type CoderCommitScope = {
9
+ /**
10
+ * Project the operation runs in.
11
+ */
12
+ readonly projectPath: string;
13
+ /**
14
+ * Files which were already changed before the operation started.
15
+ */
16
+ readonly snapshotBeforeOperation: WorkingTreeChangesSnapshot;
17
+ };
18
+ /**
19
+ * Captures the working tree state before one `ptbk coder` operation changes anything.
20
+ *
21
+ * The captured scope is passed to the commit of the very same operation, which then commits exactly the files
22
+ * this operation has created, changed, moved or deleted.
23
+ */
24
+ export declare function captureCoderCommitScope(projectPath: string): Promise<CoderCommitScope>;
25
+ /**
26
+ * Resolves the repository-relative paths which one `ptbk coder` operation has really changed.
27
+ *
28
+ * Files which were already changed before the operation started and which the operation did not touch are
29
+ * never part of the result, so they stay in the working tree instead of being swept into the commit.
30
+ */
31
+ export declare function resolveCoderCommitScopePaths(scope: CoderCommitScope): Promise<ReadonlyArray<string>>;
@@ -1,3 +1,4 @@
1
+ import type { CoderCommitScope } from './coderCommitScope';
1
2
  /**
2
3
  * Automatic git synchronization of the project changes made by one `ptbk coder` command.
3
4
  *
@@ -24,6 +25,17 @@ export type CoderGitSyncOptions = {
24
25
  * Note: This is the default for every command and helper which supports the git synchronization.
25
26
  */
26
27
  export declare const DISABLED_CODER_GIT_SYNC_OPTIONS: CoderGitSyncOptions;
28
+ /**
29
+ * Pulls the latest repository changes and captures the working tree state before a `ptbk coder` command
30
+ * changes the project.
31
+ *
32
+ * The returned scope is handed over to `$commitCoderChanges` of the very same command, which then commits
33
+ * exactly the files this command has changed.
34
+ */
35
+ export declare function $startCoderGitSync(options: {
36
+ readonly gitSync: CoderGitSyncOptions;
37
+ readonly projectPath?: string;
38
+ }): Promise<CoderCommitScope>;
27
39
  /**
28
40
  * Pulls the latest repository changes before a `ptbk coder` command changes the project.
29
41
  */
@@ -34,10 +46,11 @@ export declare function $pullCoderChanges(options: {
34
46
  /**
35
47
  * Commits - and when requested also pushes - the changes one `ptbk coder` command has just made.
36
48
  *
37
- * Note: A repository without any change is left alone instead of creating an empty commit.
49
+ * Note: Only the files this very command has changed are committed, everything else is left in the working tree.
50
+ * Note: A command which changed nothing is left alone instead of creating an empty commit.
38
51
  */
39
52
  export declare function $commitCoderChanges(options: {
40
53
  readonly gitSync: CoderGitSyncOptions;
41
54
  readonly commitMessage: string;
42
- readonly projectPath?: string;
55
+ readonly commitScope: CoderCommitScope;
43
56
  }): Promise<void>;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Commits staged changes with the provided message using the dedicated coding-agent identity when configured,
3
3
  * otherwise falls back to the default Git configuration. Remote pushing is opt-in via `options.autoPush`,
4
- * `options.includePaths` can restrict staging, `options.onlyPaths` can restrict the commit pathspec,
4
+ * `options.relevantPaths` restricts both the staging and the commit to the files of the current operation,
5
5
  * `options.excludePaths` can keep temporary artifacts out of the created commit and
6
6
  * `options.isEmptyCommitAllowed` keeps a round without any file change from failing.
7
7
  *
@@ -10,8 +10,14 @@
10
10
  */
11
11
  export declare function commitChanges(message: string, options?: {
12
12
  autoPush?: boolean;
13
- includePaths?: ReadonlyArray<string>;
14
- onlyPaths?: ReadonlyArray<string>;
13
+ /**
14
+ * Repository-relative paths which are relevant for the current operation.
15
+ *
16
+ * Only these paths are staged and only they end up in the created commit, so unrelated changes of the
17
+ * project are left in the working tree. Everything is committed when the paths are not provided at all,
18
+ * while an empty list commits nothing but the file changes already staged before.
19
+ */
20
+ relevantPaths?: ReadonlyArray<string>;
15
21
  excludePaths?: ReadonlyArray<string>;
16
22
  projectPath?: string;
17
23
  isEmptyCommitAllowed?: boolean;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Commits newly initialized, non-ignored agent books before the coder's clean-tree checkpoint.
3
+ * Only books created by this run are eligible; existing books and unrelated changes remain outside the commit.
4
+ */
5
+ export declare function commitInitializedAgentBooks(projectPath: string, createdAgentBookPaths: ReadonlyArray<string>): Promise<void>;
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Snapshot of file hashes for files that were already dirty before one operation started.
3
+ *
4
+ * Note: This is the single source of truth about which files one `ptbk coder` operation has really changed,
5
+ * used both for normalizing line endings and for committing only the relevant files.
6
+ */
7
+ export type WorkingTreeChangesSnapshot = {
8
+ /**
9
+ * Hash of every dirty file at the moment the snapshot was taken.
10
+ *
11
+ * A file which was dirty but could not be hashed (a deleted file or a non-regular file) is stored as `null`,
12
+ * so it can be told apart from a file which was not dirty at all.
13
+ */
14
+ readonly changedFileHashes: ReadonlyMap<string, string | null>;
15
+ };
16
+ /**
17
+ * Captures hashes for files that are dirty before one operation starts.
18
+ */
19
+ export declare function captureWorkingTreeChangesSnapshot(projectPath: string): Promise<WorkingTreeChangesSnapshot>;
20
+ /**
21
+ * Lists the repository-relative paths which really changed since the snapshot was taken.
22
+ *
23
+ * A file which was already dirty before and was not touched afterwards is not listed, so the result contains
24
+ * exactly the files changed by the operation which the snapshot wraps.
25
+ */
26
+ export declare function listFilesChangedSinceSnapshot(projectPath: string, snapshot: WorkingTreeChangesSnapshot): Promise<ReadonlyArray<string>>;
27
+ /**
28
+ * Lists dirty tracked files and untracked files in the working tree.
29
+ */
30
+ export declare function listWorkingTreeChangedFiles(projectPath: string): Promise<ReadonlyArray<string>>;
31
+ /**
32
+ * Reads the content hash of one repository-relative working tree file.
33
+ *
34
+ * @returns Hash of a regular file, otherwise `null` for a deleted or non-regular file.
35
+ */
36
+ export declare function readWorkingTreeFileHash(projectPath: string, relativePath: string): Promise<string | null>;
37
+ /**
38
+ * Normalizes Git output paths for internal matching.
39
+ */
40
+ export declare function normalizeGitFilePath(filePath: string): string;
@@ -0,0 +1,20 @@
1
+ import { type PriorityFilterInput } from '../prompts/priorityFilter';
2
+ import type { PromptRunnerIdentity } from '../prompts/isPromptCompatibleWithRunner';
3
+ /**
4
+ * Options which select the ready prompts listed by `ptbk coder list`.
5
+ *
6
+ * @public exported from `@promptbook/cli`
7
+ */
8
+ export type ListCoderPromptsOptions = PriorityFilterInput & {
9
+ /**
10
+ * Optional harness, model and Book-agent selection used to omit prompts routed to other runners.
11
+ */
12
+ readonly promptRunnerIdentity?: PromptRunnerIdentity;
13
+ };
14
+ /**
15
+ * Lists ready, fully authored coding prompts in descending priority groups without starting a coding harness.
16
+ *
17
+ * @returns The number of prompts printed.
18
+ * @public exported from `@promptbook/cli`
19
+ */
20
+ export declare function listCoderPrompts(options?: ListCoderPromptsOptions): Promise<number>;
@@ -1,12 +1,6 @@
1
1
  import type { RunOptions } from '../cli/RunOptions';
2
+ import type { PromptRunnerMetadata } from '../common/PromptRunnerMetadata';
2
3
  import type { PromptRunner } from '../runners/types/PromptRunner';
3
- /**
4
- * Runner metadata used in prompt status lines.
5
- */
6
- type RunnerMetadata = {
7
- runnerName: string;
8
- modelName?: string;
9
- };
10
4
  /**
11
5
  * Subset of `RunOptions` which decides which prompt runner is created and how it is labeled.
12
6
  *
@@ -20,7 +14,10 @@ export type PromptRunnerSelectionOptions = Pick<RunOptions, 'agentName' | 'model
20
14
  type PromptRunnerResolution = {
21
15
  runner: PromptRunner;
22
16
  actualRunnerModel?: string;
23
- runnerMetadata: RunnerMetadata;
17
+ /**
18
+ * Harness half of the run metadata; the optional Book agent is added by the caller which resolves it.
19
+ */
20
+ runnerMetadata: PromptRunnerMetadata;
24
21
  };
25
22
  /**
26
23
  * Resolves the configured prompt runner together with status-line metadata.
@@ -1,6 +1,7 @@
1
1
  import type { RunOptions } from '../cli/RunOptions';
2
2
  import type { CliProgressDisplay } from '../common/cliProgressDisplay';
3
3
  import type { WaitForCoderRunPauseCheckpoint } from '../common/CoderRunPauseCheckpoint';
4
+ import type { PromptRunnerMetadata } from '../common/PromptRunnerMetadata';
4
5
  import type { PromptSelection } from '../prompts/types/PromptSelection';
5
6
  import type { PromptRunner } from '../runners/types/PromptRunner';
6
7
  import type { CoderRunUiHandle } from '../ui/renderCoderRunUi';
@@ -10,10 +11,7 @@ import type { CoderRunUiHandle } from '../ui/renderCoderRunUi';
10
11
  export type RunPromptRoundOptions = {
11
12
  options: RunOptions;
12
13
  runner: PromptRunner;
13
- runnerMetadata: {
14
- runnerName: string;
15
- modelName?: string;
16
- };
14
+ runnerMetadata: PromptRunnerMetadata;
17
15
  nextPrompt: PromptSelection;
18
16
  promptLabel: string;
19
17
  resolvedCoderContext?: string;
@@ -0,0 +1,22 @@
1
+ import type { PingCoderHarnessOptions } from './pingCoderHarness';
2
+ /**
3
+ * Options for the endless `ptbk coder ping --period <duration>` loop.
4
+ */
5
+ export type PingCoderHarnessPeriodicallyOptions = PingCoderHarnessOptions & {
6
+ /**
7
+ * How long one ping period lasts, in milliseconds.
8
+ *
9
+ * The period is measured from the start of one ping to the start of the next one, so the pings
10
+ * really happen once per period instead of once per period plus the duration of the ping itself.
11
+ */
12
+ readonly periodMs: number;
13
+ };
14
+ /**
15
+ * Pings the selected harness and model once per period until the process is stopped.
16
+ *
17
+ * This keeps the quota window of the harness refreshing without any real work, so the window is
18
+ * always open by the time you need it. The loop never ends on its own — it is stopped with `CTRL+C`
19
+ * or by killing the process — therefore a failing ping is reported and the next period is started
20
+ * instead of tearing the whole loop down.
21
+ */
22
+ export declare function pingCoderHarnessPeriodically(options: PingCoderHarnessPeriodicallyOptions): Promise<never>;
@@ -0,0 +1,6 @@
1
+ import type { PromptFile } from './types/PromptFile';
2
+ import type { PromptSection } from './types/PromptSection';
3
+ /**
4
+ * Builds a label that identifies the prompt section by index.
5
+ */
6
+ export declare function buildPromptLabel(file: PromptFile, section: PromptSection): string;
@@ -0,0 +1,65 @@
1
+ import moment from 'moment';
2
+ import { type CodexLoginMethod } from '../../../src/book-3.0/codexLoginMethod';
3
+ import type { CoderRunStep } from '../common/CoderRunStep';
4
+ import { type FormatRunnerSignatureOptions } from './formatRunnerSignature';
5
+ import type { PromptFile } from './types/PromptFile';
6
+ import type { PromptSection } from './types/PromptSection';
7
+ /**
8
+ * How one prompt round the trace describes has ended.
9
+ *
10
+ * A successful round reports the steps it is made of, a failed round reports the error which ended it.
11
+ */
12
+ export type PromptRunTraceOutcome = {
13
+ readonly kind: 'succeeded';
14
+ /**
15
+ * Ordered steps of the round, each with its own price and duration.
16
+ */
17
+ readonly steps: ReadonlyArray<CoderRunStep>;
18
+ /**
19
+ * Authentication method the harness reported, when it could be determined.
20
+ */
21
+ readonly loginMethod?: CodexLoginMethod;
22
+ } | {
23
+ readonly kind: 'failed';
24
+ /**
25
+ * Error which ended the round after its last retry.
26
+ */
27
+ readonly error: unknown;
28
+ };
29
+ /**
30
+ * Everything one run trace says about the prompt round it describes.
31
+ */
32
+ export type BuildPromptRunTraceContentOptions = FormatRunnerSignatureOptions & {
33
+ readonly file: PromptFile;
34
+ readonly section: PromptSection;
35
+ /**
36
+ * Verification command the round ran after each coding attempt, when one is configured.
37
+ */
38
+ readonly testCommand?: string;
39
+ /**
40
+ * How many coding attempts the round has taken.
41
+ */
42
+ readonly attemptCount: number;
43
+ /**
44
+ * Moment the round started at.
45
+ */
46
+ readonly startedDate: moment.Moment;
47
+ /**
48
+ * Moment the round was recorded as finished or failed at.
49
+ */
50
+ readonly finishedDate: moment.Moment;
51
+ readonly outcome: PromptRunTraceOutcome;
52
+ /**
53
+ * Raw runtime log of the round, holding the generated shell scripts and everything the harness and the
54
+ * verification command have written. Empty when the round produced no readable runtime log.
55
+ */
56
+ readonly runtimeLog: string;
57
+ };
58
+ /**
59
+ * Renders the markdown run trace of one finished or failed prompt round.
60
+ *
61
+ * The trace pairs the metadata of the round - which agent, harness, model and thinking level ran it, how long
62
+ * each of its steps took and what it cost - with the untouched runtime log, so a finished round can still be
63
+ * analyzed after its temporary artifacts are cleaned up.
64
+ */
65
+ export declare function buildPromptRunTraceContent(options: BuildPromptRunTraceContentOptions): string;
@@ -0,0 +1,10 @@
1
+ import type { PromptFile } from './types/PromptFile';
2
+ import type { PromptSection } from './types/PromptSection';
3
+ /**
4
+ * Builds the path of the run trace which belongs to one prompt section.
5
+ *
6
+ * The trace is stored in the `traces` directory of the very same prompts directory the prompt itself lives in,
7
+ * and it carries the name of its prompt file. A prompt file holding more than one section appends the section
8
+ * suffix, exactly like the temporary scripts and the isolation worktrees of the same section do.
9
+ */
10
+ export declare function buildPromptRunTracePath(file: PromptFile, section: PromptSection): string;
@@ -0,0 +1,39 @@
1
+ import { type CodexLoginMethod } from '../../../src/book-3.0/codexLoginMethod';
2
+ import type { CoderRunStep, CoderRunStepKind } from '../common/CoderRunStep';
3
+ import { type FormatRunnerSignatureOptions } from './formatRunnerSignature';
4
+ import { type PromptRunnerAttribution } from './promptRunnerAttribution';
5
+ /**
6
+ * Everything one prompt status line says after its checklist marker.
7
+ */
8
+ export type BuildPromptStatusDetailsOptions = FormatRunnerSignatureOptions & {
9
+ /**
10
+ * Steps of the prompt round which have already finished, each with its own price and duration.
11
+ */
12
+ readonly steps: ReadonlyArray<CoderRunStep>;
13
+ /**
14
+ * Step which has already started but has not finished yet, reported as `Implementation in progress`.
15
+ */
16
+ readonly inProgressStepKind?: CoderRunStepKind;
17
+ /**
18
+ * Chronological runner report read from a prompt left in the middle of its implementation.
19
+ *
20
+ * Present only for a prompt resumed through `--git-changes continue`, so each status rewrite preserves every
21
+ * preceding harness and appends the harness which is currently continuing the work.
22
+ */
23
+ readonly previousRunnerSignatures?: PromptRunnerAttribution;
24
+ /**
25
+ * How many coding attempts the prompt has taken so far.
26
+ */
27
+ readonly attemptCount: number;
28
+ /**
29
+ * Authentication method the harness reported, when it is already known.
30
+ */
31
+ readonly loginMethod?: CodexLoginMethod;
32
+ };
33
+ /**
34
+ * Builds the shared body of a prompt status line, used by both the in-progress `[^]` and the done `[x]` status.
35
+ *
36
+ * Produces details such as
37
+ * ``by Developer on OpenAI Codex `gpt-5.6-luna` thinking `max` (ChatGPT account) - Implementation ~$0.2036 10 minutes``.
38
+ */
39
+ export declare function buildPromptStatusDetails(options: BuildPromptStatusDetailsOptions): string;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Finds the first non-empty line within the inclusive bounds.
3
+ *
4
+ * @private internal utility of prompt parsing and status writing
5
+ */
6
+ export declare function findFirstNonEmptyLineIndex(lines: readonly string[], startLine: number, endLine: number): number | undefined;
@@ -1,9 +1,12 @@
1
- import type { CoderRunStep } from '../common/CoderRunStep';
1
+ import type { CoderRunStep, CoderRunStepKind } from '../common/CoderRunStep';
2
2
  /**
3
- * Formats the per-step usage breakdown recorded for one finished prompt.
3
+ * Formats the per-step usage breakdown recorded for one prompt.
4
4
  *
5
5
  * Produces a `; `-separated summary such as
6
6
  * `Implementation $8.01 6 hours; Testing 1 hour; Fixing $3.14 2 hours` where each coding step carries its
7
7
  * price and duration and each verification step carries only its duration.
8
+ *
9
+ * @param steps - Steps which have already finished
10
+ * @param inProgressStepKind - Step which has started but has not finished yet, appended as `Testing in progress`
8
11
  */
9
- export declare function formatCoderRunSteps(steps: ReadonlyArray<CoderRunStep>): string;
12
+ export declare function formatCoderRunSteps(steps: ReadonlyArray<CoderRunStep>, inProgressStepKind?: CoderRunStepKind): string;
@@ -1,5 +1,18 @@
1
1
  import type { ThinkingLevel } from '../../../src/cli/cli-commands/coder/ThinkingLevel';
2
+ import type { PromptRunnerMetadata } from '../common/PromptRunnerMetadata';
3
+ /**
4
+ * Everything one runner signature can name, as far as it is known when the signature is formatted.
5
+ */
6
+ export type FormatRunnerSignatureOptions = Partial<PromptRunnerMetadata> & {
7
+ /**
8
+ * Reasoning effort the harness runs the prompt with.
9
+ */
10
+ readonly thinkingLevel?: ThinkingLevel;
11
+ };
2
12
  /**
3
13
  * Formats runner details for prompt status lines.
14
+ *
15
+ * Produces `` OpenAI Codex `gpt-5.6-luna` thinking `max` `` for a plain run and
16
+ * `` Developer on OpenAI Codex `gpt-5.6-luna` thinking `max` `` for a run personalized with `--agent`.
4
17
  */
5
- export declare function formatRunnerSignature(runnerName: string | undefined, modelName: string | undefined, thinkingLevel?: ThinkingLevel): string;
18
+ export declare function formatRunnerSignature(options: FormatRunnerSignatureOptions): string;
@@ -1,7 +1,7 @@
1
1
  import type { PromptFile } from './types/PromptFile';
2
2
  import type { PromptSection } from './types/PromptSection';
3
3
  /**
4
- * Names of the harness and model currently selected for a coder run.
4
+ * Names of the harness, model and Book agent currently selected for a coder run.
5
5
  */
6
6
  export type PromptRunnerIdentity = {
7
7
  /**
@@ -12,16 +12,21 @@ export type PromptRunnerIdentity = {
12
12
  * Effective model identifier, for example `gpt-5.5`.
13
13
  */
14
14
  readonly modelName?: string;
15
+ /**
16
+ * Equivalent agent path and name references, including the Book title from its first line.
17
+ */
18
+ readonly agentReferences?: ReadonlyArray<string>;
15
19
  };
16
20
  /**
17
- * Checks whether a prompt is unrestricted or matches the selected harness/model.
21
+ * Checks whether a prompt is unrestricted or matches the selected harness, model or Book agent.
18
22
  *
19
- * A prompt status line can contain one or more backtick-delimited model or harness
20
- * names. Matching is intentionally based on normalized substrings so a token such as
21
- * `gpt` selects any `gpt-*` model and `opus` selects a `claude-opus-*` model.
23
+ * A prompt status line can contain one or more backtick-delimited model, harness or agent
24
+ * references. Matching is intentionally based on normalized substrings so a token such as
25
+ * `gpt` selects any `gpt-*` model, `developer` selects an agent Book named `developer.book`,
26
+ * and `opus` selects a `claude-opus-*` model.
22
27
  */
23
28
  export declare function isPromptCompatibleWithRunner(file: PromptFile, section: PromptSection, promptRunnerIdentity?: PromptRunnerIdentity): boolean;
24
29
  /**
25
- * Extracts model and harness tokens from a prompt status line.
30
+ * Extracts model, harness and Book-agent tokens from a prompt status line.
26
31
  */
27
32
  export declare function extractPromptRunnerTokens(statusLine: string): string[];
@@ -0,0 +1,8 @@
1
+ import type { PromptSection } from './types/PromptSection';
2
+ /**
3
+ * Checks whether one prompt section still has open coding work.
4
+ *
5
+ * A `[ ]` prompt has not been started at all and a `[^]` prompt was left in the middle of its
6
+ * implementation, so a file containing either of them is not finished yet.
7
+ */
8
+ export declare function isPromptSectionUnfinished(section: PromptSection): boolean;
@@ -0,0 +1,7 @@
1
+ import type { PromptFile } from './types/PromptFile';
2
+ import type { PromptSelection } from './types/PromptSelection';
3
+ import type { PromptStatus } from './types/PromptStatus';
4
+ /**
5
+ * Lists prompts in one checklist status across all files.
6
+ */
7
+ export declare function listPromptsByStatus(files: PromptFile[], status: PromptStatus): PromptSelection[];
@@ -1,5 +1,5 @@
1
1
  import type { PromptFile } from './types/PromptFile';
2
2
  /**
3
- * Loads and parses prompt files from the prompts directory.
3
+ * Loads and parses prompt files from the prompts directory, excluding files marked for `ptbk coder` to ignore.
4
4
  */
5
5
  export declare function loadPromptFiles(promptsDir: string): Promise<PromptFile[]>;
@@ -1,9 +1,20 @@
1
- import { type CodexLoginMethod } from '../../../src/book-3.0/codexLoginMethod';
2
- import type { ThinkingLevel } from '../../../src/cli/cli-commands/coder/ThinkingLevel';
3
- import type { CoderRunStep } from '../common/CoderRunStep';
1
+ import { type BuildPromptStatusDetailsOptions } from './buildPromptStatusDetails';
4
2
  import type { PromptFile } from './types/PromptFile';
5
3
  import type { PromptSection } from './types/PromptSection';
4
+ /**
5
+ * Input for marking one prompt section as implemented, verified and committed.
6
+ */
7
+ export type MarkPromptDoneOptions = BuildPromptStatusDetailsOptions & {
8
+ /**
9
+ * Prompt file the marked section belongs to.
10
+ */
11
+ readonly file: PromptFile;
12
+ /**
13
+ * Section which has just been finished.
14
+ */
15
+ readonly section: PromptSection;
16
+ };
6
17
  /**
7
18
  * Marks a prompt section as done and records the per-step usage pricing and runner details.
8
19
  */
9
- export declare function markPromptDone(file: PromptFile, section: PromptSection, steps: ReadonlyArray<CoderRunStep>, runnerName: string | undefined, modelName: string | undefined, attemptCount?: number, loginMethod?: CodexLoginMethod, thinkingLevel?: ThinkingLevel): void;
20
+ export declare function markPromptDone(options: MarkPromptDoneOptions): void;
@@ -1,7 +1,34 @@
1
1
  import moment from 'moment';
2
+ import { type FormatRunnerSignatureOptions } from './formatRunnerSignature';
3
+ import { type PromptRunnerAttribution } from './promptRunnerAttribution';
2
4
  import type { PromptFile } from './types/PromptFile';
3
5
  import type { PromptSection } from './types/PromptSection';
6
+ /**
7
+ * Input for marking one prompt section as failed.
8
+ */
9
+ export type MarkPromptFailedOptions = FormatRunnerSignatureOptions & {
10
+ /**
11
+ * Prompt file the marked section belongs to.
12
+ */
13
+ readonly file: PromptFile;
14
+ /**
15
+ * Section which could not be implemented.
16
+ */
17
+ readonly section: PromptSection;
18
+ /**
19
+ * Chronological runner report read from a prompt left in the middle of its implementation.
20
+ */
21
+ readonly previousRunnerSignatures?: PromptRunnerAttribution;
22
+ /**
23
+ * Moment the failed prompt round started, used to report how long the attempt took.
24
+ */
25
+ readonly promptExecutionStartedDate: moment.Moment;
26
+ /**
27
+ * How many coding attempts the prompt has taken before it was given up on.
28
+ */
29
+ readonly attemptCount: number;
30
+ };
4
31
  /**
5
32
  * Marks a prompt section as failed and records runner details.
6
33
  */
7
- export declare function markPromptFailed(file: PromptFile, section: PromptSection, runnerName: string | undefined, modelName: string | undefined, promptExecutionStartedDate: moment.Moment, attemptCount?: number): void;
34
+ export declare function markPromptFailed(options: MarkPromptFailedOptions): void;
@@ -0,0 +1,27 @@
1
+ import { type BuildPromptStatusDetailsOptions } from './buildPromptStatusDetails';
2
+ import type { PromptFile } from './types/PromptFile';
3
+ import type { PromptSection } from './types/PromptSection';
4
+ /**
5
+ * Input for marking one prompt section as being implemented right now.
6
+ */
7
+ export type MarkPromptInProgressOptions = BuildPromptStatusDetailsOptions & {
8
+ /**
9
+ * Prompt file the marked section belongs to.
10
+ */
11
+ readonly file: PromptFile;
12
+ /**
13
+ * Section which is being implemented right now.
14
+ */
15
+ readonly section: PromptSection;
16
+ /**
17
+ * Step which has just started, always present because a prompt is only in progress while a step runs.
18
+ */
19
+ readonly inProgressStepKind: NonNullable<BuildPromptStatusDetailsOptions['inProgressStepKind']>;
20
+ };
21
+ /**
22
+ * Marks a prompt section as being implemented right now and records the steps finished so far.
23
+ *
24
+ * The `[^]` status is deliberately never reverted: when the coder is killed or crashes, the status stays
25
+ * in the prompt file as the signal that this task was left in the middle of its implementation.
26
+ */
27
+ export declare function markPromptInProgress(options: MarkPromptInProgressOptions): void;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Ordered runner signatures recorded in a prompt status line.
3
+ *
4
+ * The first signature started the work and every following signature continued an interrupted run.
5
+ */
6
+ export type PromptRunnerAttribution = ReadonlyArray<string>;
7
+ /**
8
+ * Formats who worked on one prompt for its status line.
9
+ *
10
+ * Produces `` by Claude Code `claude-opus-5` `` for a prompt implemented by a single harness and
11
+ * `` by OpenAI Codex `gpt-5.6-luna`, interrupted, continued by Claude Code `claude-opus-5` `` for a
12
+ * prompt which one harness started and another one continued through `--git-changes continue`.
13
+ */
14
+ export declare function formatPromptRunnerAttribution(options: {
15
+ /**
16
+ * Harness which runs the prompt right now, already formatted as a runner signature.
17
+ */
18
+ readonly currentRunnerSignature: string;
19
+ /**
20
+ * Chronological runner report read from the interrupted prompt before its status line is rewritten.
21
+ */
22
+ readonly previousRunnerSignatures?: PromptRunnerAttribution;
23
+ }): string;
24
+ /**
25
+ * Reads the chronological harness report recorded on one prompt status line.
26
+ *
27
+ * A line written by a single harness produces one signature. A line which has already been continued produces
28
+ * every signature in the order in which it worked on the prompt, so another continuation can append to it.
29
+ */
30
+ export declare function parsePromptRunnerAttribution(statusLine: string): PromptRunnerAttribution | undefined;
@@ -0,0 +1,9 @@
1
+ import type { PromptFile } from './types/PromptFile';
2
+ import type { PromptSelection } from './types/PromptSelection';
3
+ /**
4
+ * Resolves the one prompt which `--git-changes continue` resumes.
5
+ *
6
+ * A coder which was killed or crashed leaves exactly one prompt behind in the in-progress `[^]` status,
7
+ * so anything else means the working tree changes cannot be attributed to a single interrupted prompt.
8
+ */
9
+ export declare function resolveInterruptedPrompt(files: PromptFile[]): PromptSelection;
@@ -0,0 +1,19 @@
1
+ import type { PromptFile } from './types/PromptFile';
2
+ import type { PromptSection } from './types/PromptSection';
3
+ /**
4
+ * Status line of one prompt section together with the index it lives on.
5
+ */
6
+ export type ResolvedPromptStatusLine = {
7
+ /**
8
+ * Index of the status line within `file.lines`.
9
+ */
10
+ readonly statusLineIndex: number;
11
+ /**
12
+ * Current content of the status line, including its indentation and checklist marker.
13
+ */
14
+ readonly line: string;
15
+ };
16
+ /**
17
+ * Resolves the status line of one prompt section so it can be rewritten.
18
+ */
19
+ export declare function resolvePromptStatusLine(file: PromptFile, section: PromptSection): ResolvedPromptStatusLine;