@promptbook/cli 0.114.0-5 → 0.114.0-50

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 (1342) hide show
  1. package/README.md +65 -31
  2. package/agents/default/.core/adam.book +33 -0
  3. package/agents/default/copywriter.book +15 -0
  4. package/agents/default/developer.book +16 -18
  5. package/agents/default/lawyer.book +14 -0
  6. package/agents/default/planner.book +16 -0
  7. package/apps/agents-server/README.md +1 -1
  8. package/apps/agents-server/next.config.ts +28 -0
  9. package/apps/agents-server/package.json +7 -7
  10. package/apps/agents-server/scripts/build-agents-server.js +47 -7
  11. package/apps/agents-server/scripts/build-e2e.js +12 -2
  12. package/apps/agents-server/scripts/generate-reserved-paths/generate-reserved-paths.ts +30 -16
  13. package/apps/agents-server/scripts/kill-port.js +163 -0
  14. package/apps/agents-server/scripts/run-e2e-tests.js +21 -8
  15. package/apps/agents-server/scripts/run-npm.js +81 -5
  16. package/apps/agents-server/src/app/admin/_components/AdminFilterFields.tsx +84 -0
  17. package/apps/agents-server/src/app/admin/_components/AdminMetricCard.tsx +36 -0
  18. package/apps/agents-server/src/app/admin/_components/AdminTaskManagerTabs.tsx +97 -0
  19. package/apps/agents-server/src/app/admin/about/page.tsx +1 -1
  20. package/apps/agents-server/src/app/admin/email-server/page.tsx +17 -18
  21. package/apps/agents-server/src/app/admin/messages/MessageParticipants.tsx +84 -0
  22. package/apps/agents-server/src/app/admin/messages/MessageStatus.tsx +96 -0
  23. package/apps/agents-server/src/app/admin/messages/MessagesClient.tsx +29 -33
  24. package/apps/agents-server/src/app/admin/messages/messageAdminPresentation.ts +289 -0
  25. package/apps/agents-server/src/app/admin/messages/send-email/SendEmailClient.tsx +193 -63
  26. package/apps/agents-server/src/app/admin/messages/send-email/actions.ts +25 -28
  27. package/apps/agents-server/src/app/admin/messages/send-email/emailTesting.ts +153 -0
  28. package/apps/agents-server/src/app/admin/messages/send-email/emailTestingAccess.ts +30 -0
  29. package/apps/agents-server/src/app/admin/messages/send-email/page.tsx +18 -5
  30. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerClient.tsx +103 -0
  31. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerEditDialog.tsx +232 -0
  32. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerFiltersCard.tsx +195 -0
  33. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerRow.tsx +189 -0
  34. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerSummaryMetrics.tsx +60 -0
  35. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerTableCard.tsx +147 -0
  36. package/apps/agents-server/src/app/admin/planned-messages/page.tsx +17 -0
  37. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageEditForm.ts +186 -0
  38. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageManagerDialogs.ts +46 -0
  39. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageManagerPresentation.tsx +188 -0
  40. package/apps/agents-server/src/app/admin/planned-messages/resolvePlannedMessageSortValue.ts +115 -0
  41. package/apps/agents-server/src/app/admin/planned-messages/usePlannedMessageManagerData.ts +116 -0
  42. package/apps/agents-server/src/app/admin/planned-messages/usePlannedMessageManagerState.ts +289 -0
  43. package/apps/agents-server/src/app/admin/task-manager/TaskManagerClient.tsx +7 -2
  44. package/apps/agents-server/src/app/admin/task-manager/TaskManagerFiltersCard.tsx +7 -73
  45. package/apps/agents-server/src/app/admin/task-manager/TaskManagerSummaryMetrics.tsx +5 -30
  46. package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +2 -0
  47. package/apps/agents-server/src/app/admin/task-manager/[taskId]/TaskManagerTaskDetailClient.tsx +3 -1
  48. package/apps/agents-server/src/app/admin/task-manager/taskManagerTaskPresentation.tsx +23 -0
  49. package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +8 -9
  50. package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +5 -9
  51. package/apps/agents-server/src/app/agents/[agentName]/api/book/reference-diagnostics/route.ts +30 -7
  52. package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +9 -0
  53. package/apps/agents-server/src/app/agents/[agentName]/api/book/test.http +3 -3
  54. package/apps/agents-server/src/app/agents/[agentName]/api/chat/resolveAgentChatRouteContext.ts +3 -4
  55. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/[timeoutId]/route.ts +10 -153
  56. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/route.ts +9 -4
  57. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/route.ts +3 -0
  58. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/stream/route.ts +2 -0
  59. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/resolveUserChatScope.ts +8 -1
  60. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/route.ts +15 -7
  61. package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorMissingReferences.tsx +106 -12
  62. package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorWrapper.tsx +3 -0
  63. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorDiagnostics.ts +12 -0
  64. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorSaving.ts +18 -28
  65. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorWrapper.tsx +2 -0
  66. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistoryClient.tsx +19 -1
  67. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatSidebarDefault.tsx +17 -5
  68. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatNotice.tsx +23 -0
  69. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatPlannedMessages.tsx +226 -0
  70. package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatPanel.tsx +6 -0
  71. package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +32 -12
  72. package/apps/agents-server/src/app/agents/[agentName]/chat/ExternalUserChatAdminActions.tsx +51 -3
  73. package/apps/agents-server/src/app/agents/[agentName]/chat/TeamMemberFrozenChatPrimaryAgentLink.tsx +31 -0
  74. package/apps/agents-server/src/app/agents/[agentName]/chat/page.tsx +2 -20
  75. package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatSidebarState.ts +26 -2
  76. package/apps/agents-server/src/app/agents/[agentName]/goal/page.tsx +35 -0
  77. package/apps/agents-server/src/app/agents/[agentName]/page.tsx +2 -1
  78. package/apps/agents-server/src/app/agents/[agentName]/projectReferenceActions.ts +61 -0
  79. package/apps/agents-server/src/app/agents/[agentName]/projectRuntimeActions.ts +97 -0
  80. package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/actions.ts +5 -50
  81. package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/page.tsx +2 -2
  82. package/apps/agents-server/src/app/api/admin/default-agents/reinstate/route.ts +5 -1
  83. package/apps/agents-server/src/app/api/admin/dns-records/cloudflare/route.ts +26 -16
  84. package/apps/agents-server/src/app/api/admin/planned-messages/[timeoutId]/route.ts +80 -0
  85. package/apps/agents-server/src/app/api/admin/planned-messages/route.ts +19 -0
  86. package/apps/agents-server/src/app/api/emails/incoming/stalwart/route.ts +9 -2
  87. package/apps/agents-server/src/app/api/internal/agent-goal-chat-planned-messages/route.ts +201 -0
  88. package/apps/agents-server/src/app/globals.css +15 -0
  89. package/apps/agents-server/src/app/page.tsx +1 -1
  90. package/apps/agents-server/src/app/superadmin/servers/ServersRegistryTable.tsx +31 -39
  91. package/apps/agents-server/src/app/swagger/SwaggerPageClient.tsx +35 -19
  92. package/apps/agents-server/src/components/AgentNaming/legacyAgentTextTranslations.cs.yaml +7 -0
  93. package/apps/agents-server/src/components/AgentProfile/AgentProfile.tsx +10 -3
  94. package/apps/agents-server/src/components/AgentProjects/AgentProjectIcon.tsx +137 -0
  95. package/apps/agents-server/src/components/AgentProjects/AgentProjectItem.tsx +26 -10
  96. package/apps/agents-server/src/components/AgentProjects/resolveLatestCompletedAgentMessageKey.ts +32 -0
  97. package/apps/agents-server/src/components/AgentProjects/useAgentProjectMarkdownReferences.ts +306 -0
  98. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsApiTokenImportStep.tsx +5 -6
  99. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsCheckStep.tsx +6 -5
  100. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsManualStep.tsx +10 -14
  101. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsWizard.tsx +11 -20
  102. package/apps/agents-server/src/components/CloudflareDnsWizard/useCloudflareDnsRecordImport.ts +5 -6
  103. package/apps/agents-server/src/components/ContextMenu/ContextMenuPanel.tsx +1 -11
  104. package/apps/agents-server/src/components/DefaultAgents/ReinstateBundledAgentsButton.tsx +7 -0
  105. package/apps/agents-server/src/components/DefaultAgents/coreAgentsAdminRoute.ts +6 -0
  106. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsInstructions.tsx +91 -57
  107. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionPanel.tsx +63 -0
  108. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionVariantTabs.tsx +67 -0
  109. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsTable.tsx +40 -0
  110. package/apps/agents-server/src/components/Header/buildActiveAgentViewItems.ts +5 -4
  111. package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +7 -0
  112. package/apps/agents-server/src/components/Header/createAgentViewLabel.tsx +4 -4
  113. package/apps/agents-server/src/components/Header/resolveActiveAgentNavigation.ts +2 -2
  114. package/apps/agents-server/src/components/Homepage/DefaultAgentsStatusNotice.tsx +1 -7
  115. package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +22 -10
  116. package/apps/agents-server/src/components/_utils/generateMetaTxt.ts +1 -1
  117. package/apps/agents-server/src/constants/federatedAgentImport.ts +7 -0
  118. package/apps/agents-server/src/database/migratePrefix.ts +13 -12
  119. package/apps/agents-server/src/database/migrations/2026-08-0100-agent-goal-chat-source.sql +10 -0
  120. package/apps/agents-server/src/database/migrations/2026-08-1800-user-chat-timeout-schedule.sql +11 -0
  121. package/apps/agents-server/src/generated/reservedPaths.ts +42 -42
  122. package/apps/agents-server/src/instrumentation-node.ts +18 -0
  123. package/apps/agents-server/src/languages/ServerTranslationKeys.ts +16 -1
  124. package/apps/agents-server/src/languages/translations/czech.yaml +16 -1
  125. package/apps/agents-server/src/languages/translations/english.yaml +16 -1
  126. package/apps/agents-server/src/message-providers/email/stalwart/StalwartMessageProvider.ts +59 -19
  127. package/apps/agents-server/src/message-providers/email/stalwart/parseInboundStalwartEmail.ts +17 -2
  128. package/apps/agents-server/src/middleware/createMiddlewareRequestContext/loadRegisteredServers.ts +8 -0
  129. package/apps/agents-server/src/tools/$provideServer.ts +2 -1
  130. package/apps/agents-server/src/tools/agentGoalChatTimeoutToolFunctions.ts +249 -0
  131. package/apps/agents-server/src/tools/agentGoalChatTimeoutTools.ts +147 -0
  132. package/apps/agents-server/src/tools/createServerChatRuntimeTools.ts +20 -0
  133. package/apps/agents-server/src/tools/getAllToolFunctionsForServer.ts +2 -0
  134. package/apps/agents-server/src/tools/mapRegisteredServerContexts.ts +1 -1
  135. package/apps/agents-server/src/types/swagger-ui-dist.d.ts +5 -0
  136. package/apps/agents-server/src/utils/adminEntityLookups/loadAgentNamesByPermanentId.ts +45 -0
  137. package/apps/agents-server/src/utils/adminEntityLookups/loadUsernamesByUserId.ts +36 -0
  138. package/apps/agents-server/src/utils/adminEntityLookups.ts +2 -0
  139. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatConstants.ts +14 -0
  140. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatIdentity.ts +28 -0
  141. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatPlannedMessageActions.ts +583 -0
  142. package/apps/agents-server/src/utils/agentGoalChat/appendAgentGoalChatNote.ts +43 -0
  143. package/apps/agents-server/src/utils/agentGoalChat/canAccessAgentGoalChat.ts +14 -0
  144. package/apps/agents-server/src/utils/agentGoalChat/createAgentGoalChatNoteContent.ts +129 -0
  145. package/apps/agents-server/src/utils/agentGoalChat/enqueueAgentGoalChatTurn.ts +167 -0
  146. package/apps/agents-server/src/utils/agentGoalChat/ensureAgentGoalChat.ts +66 -0
  147. package/apps/agents-server/src/utils/agentGoalChat/prependAgentGoalChatSummarySeed.ts +40 -0
  148. package/apps/agents-server/src/utils/agentGoalChat/recordAgentGoalChatLifecycleNote.ts +53 -0
  149. package/apps/agents-server/src/utils/agentGoalChat/resolveAgentGoalChatOwnerUserId.ts +104 -0
  150. package/apps/agents-server/src/utils/agentGoalChat/resolveEffectiveAgentGoal.ts +29 -0
  151. package/apps/agents-server/src/utils/agentGoalChat/scheduleAgentGoalChatModifiedNote.ts +85 -0
  152. package/apps/agents-server/src/utils/agentGoalChat.ts +25 -0
  153. package/apps/agents-server/src/utils/agentProjects/AgentProjectInfo.ts +10 -1
  154. package/apps/agents-server/src/utils/agentProjects/AgentProjectReferenceInfo.ts +5 -2
  155. package/apps/agents-server/src/utils/agentProjects/AgentProjectRuntimeActionResult.ts +14 -0
  156. package/apps/agents-server/src/utils/agentProjects/agentProjectFileNames.ts +21 -0
  157. package/apps/agents-server/src/utils/agentProjects/agentProjectHrefs.ts +20 -11
  158. package/apps/agents-server/src/utils/agentProjects/agentProjectIdentity.ts +46 -0
  159. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeAutostartScheduler.ts +162 -0
  160. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDesiredState.ts +252 -0
  161. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDisplay.ts +6 -3
  162. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDomains.ts +2 -44
  163. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePaths.ts +25 -0
  164. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePm2.ts +60 -13
  165. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeRegistry.ts +77 -24
  166. package/apps/agents-server/src/utils/agentProjects/agentProjectStateMutationQueue.ts +58 -0
  167. package/apps/agents-server/src/utils/agentProjects/agentProjectsPaths.ts +15 -5
  168. package/apps/agents-server/src/utils/agentProjects/createAgentProjectInitials.ts +36 -0
  169. package/apps/agents-server/src/utils/agentProjects/createAgentProjectMarkdownReferences.ts +124 -19
  170. package/apps/agents-server/src/utils/agentProjects/createAgentProjectsDnsRecordsSection.ts +113 -0
  171. package/apps/agents-server/src/utils/agentProjects/createStaticAgentProjectServer.ts +2 -6
  172. package/apps/agents-server/src/utils/agentProjects/humanizeAgentProjectName.ts +25 -0
  173. package/apps/agents-server/src/utils/agentProjects/listAgentProjectChatReferences.ts +10 -3
  174. package/apps/agents-server/src/utils/agentProjects/listAgentProjectNames.ts +35 -0
  175. package/apps/agents-server/src/utils/agentProjects/listAgentProjects.ts +6 -23
  176. package/apps/agents-server/src/utils/agentProjects/listAllAgentProjectSummaries.ts +2 -1
  177. package/apps/agents-server/src/utils/agentProjects/listAllLocalAgentProjectIdentities.ts +48 -0
  178. package/apps/agents-server/src/utils/agentProjects/parseAgentProjectIndexHtml.ts +167 -0
  179. package/apps/agents-server/src/utils/agentProjects/readAgentProjectIndexHtmlProfile.ts +24 -0
  180. package/apps/agents-server/src/utils/agentProjects/readAgentProjectReadme.ts +3 -53
  181. package/apps/agents-server/src/utils/agentProjects/readAgentProjectRootTextFile.ts +73 -0
  182. package/apps/agents-server/src/utils/agentProjects/resolveAgentChatProjectReferences.ts +25 -0
  183. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectFaviconRelativePath.ts +108 -0
  184. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectInfo.ts +12 -3
  185. package/apps/agents-server/src/utils/agentProjects/{resolveAgentProjectReadmeProfile.ts → resolveAgentProjectProfile.ts} +33 -33
  186. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectPublicUrls.ts +34 -0
  187. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectRuntimeEnvironmentFlag.ts +23 -0
  188. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectRuntimeStatus.ts +73 -0
  189. package/apps/agents-server/src/utils/agentProjects/startDefaultAgentProjectRuntimes.ts +110 -0
  190. package/apps/agents-server/src/utils/agentReferenceResolver/AgentReferenceResolutionIssue.ts +1 -69
  191. package/apps/agents-server/src/utils/agentReferenceResolver/MissingCoreAgentRecovery.ts +19 -0
  192. package/apps/agents-server/src/utils/agentReferenceResolver/bookScopedAgentReferences.ts +7 -0
  193. package/apps/agents-server/src/utils/agentReferenceResolver/createAgentInheritanceDiagnostics.ts +457 -0
  194. package/apps/agents-server/src/utils/agentReferenceResolver/createUnresolvedAgentReferenceDiagnostics.ts +27 -0
  195. package/apps/agents-server/src/utils/agentReferenceResolver/extractAgentReferenceTokens.ts +1 -61
  196. package/apps/agents-server/src/utils/agentReferenceResolver/resolveCoreAgentAwareMissingReferences.ts +156 -0
  197. package/apps/agents-server/src/utils/applicationFonts.ts +4 -25
  198. package/apps/agents-server/src/utils/bookLanguageDocumentation/createBookLanguageDocumentationPdfResponse.ts +19 -17
  199. package/apps/agents-server/src/utils/chatMessageChips/createAnsweredMessageChipToolCalls.ts +49 -0
  200. package/apps/agents-server/src/utils/chatMessageChips/createPlannedMessageChipToolCalls.ts +44 -0
  201. package/apps/agents-server/src/utils/chatMessageChips/createTouchedExternalSourceChipToolCalls.ts +39 -0
  202. package/apps/agents-server/src/utils/chatMessageChips/createTouchedProjectChipResult.ts +45 -0
  203. package/apps/agents-server/src/utils/chatMessageChips/createTouchedProjectChipToolCalls.ts +109 -0
  204. package/apps/agents-server/src/utils/chatTasksAdmin.ts +9 -0
  205. package/apps/agents-server/src/utils/createAgentWithDefaultVisibility.ts +8 -0
  206. package/apps/agents-server/src/utils/createWellKnownAgentUrl.ts +17 -0
  207. package/apps/agents-server/src/utils/cronExpression/CronExpression.ts +63 -0
  208. package/apps/agents-server/src/utils/cronExpression/normalizeCronExpression.ts +34 -0
  209. package/apps/agents-server/src/utils/cronExpression/normalizeCronExpressionWhitespace.ts +11 -0
  210. package/apps/agents-server/src/utils/cronExpression/parseCronExpression.ts +41 -0
  211. package/apps/agents-server/src/utils/cronExpression/parseCronExpressionField.ts +140 -0
  212. package/apps/agents-server/src/utils/cronExpression/resolveNextCronRun.ts +100 -0
  213. package/apps/agents-server/src/utils/cronExpression/throwInvalidCronExpressionField.ts +20 -0
  214. package/apps/agents-server/src/utils/cronExpression.ts +10 -0
  215. package/apps/agents-server/src/utils/currentServerRegistryContext.ts +2 -1
  216. package/apps/agents-server/src/utils/customDomainRouting.ts +143 -10
  217. package/apps/agents-server/src/utils/dnsRecords/DnsRecordInstruction.ts +20 -0
  218. package/apps/agents-server/src/utils/dnsRecords/DnsRecordsSection.ts +77 -0
  219. package/apps/agents-server/src/utils/dnsRecords/createServerDnsRecordsSections.ts +58 -0
  220. package/apps/agents-server/src/utils/dnsRecords/createServerDomainDnsRecordsSection.ts +48 -0
  221. package/apps/agents-server/src/utils/dnsRecords/dnsRecordGroups.ts +52 -0
  222. package/apps/agents-server/src/utils/dnsRecords/resolveDnsRecordBatchPlan.ts +47 -1
  223. package/apps/agents-server/src/utils/email/agentEmailAddress.ts +14 -0
  224. package/apps/agents-server/src/utils/email/sendEmailThroughStalwart.ts +2 -1
  225. package/apps/agents-server/src/utils/explicitFromCommitment.ts +1 -0
  226. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlQuery.ts +41 -36
  227. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/loadAdminChatTaskFallbackData.ts +3 -77
  228. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskFallbackRows.ts +3 -0
  229. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskSqlRows.ts +2 -0
  230. package/apps/agents-server/src/utils/getFederatedServers.ts +5 -15
  231. package/apps/agents-server/src/utils/getWellKnownAgentUrl.ts +2 -3
  232. package/apps/agents-server/src/utils/handleChatCompletion/createHandleChatCompletionPromptContext.ts +3 -1
  233. package/apps/agents-server/src/utils/localChatRunner/applyLocalAgentPlannedMessageCommands.ts +261 -0
  234. package/apps/agents-server/src/utils/localChatRunner/parseLocalTeamConversations.ts +281 -0
  235. package/apps/agents-server/src/utils/localChatRunner/persistLocalTeamConversations.ts +71 -0
  236. package/apps/agents-server/src/utils/localChatRunner/prepareLocalAgentPlannedMessagesSidecar.ts +74 -0
  237. package/apps/agents-server/src/utils/localChatRunner/prepareLocalTeamConversationWorkspace.ts +233 -0
  238. package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +154 -27
  239. package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentBooks.ts +5 -11
  240. package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentRuntime.ts +2 -2
  241. package/apps/agents-server/src/utils/managementApi/managementApiSchemas.ts +2 -2
  242. package/apps/agents-server/src/utils/parseFederatedServers.ts +14 -0
  243. package/apps/agents-server/src/utils/plannedMessageManager/cancelManagedPlannedMessage.ts +35 -0
  244. package/apps/agents-server/src/utils/plannedMessageManager/collectPlannedMessageAgentOptions.ts +56 -0
  245. package/apps/agents-server/src/utils/plannedMessageManager/createPlannedMessageManagerCounters.ts +104 -0
  246. package/apps/agents-server/src/utils/plannedMessageManager/filterPlannedMessages.ts +191 -0
  247. package/apps/agents-server/src/utils/plannedMessageManager/getPlannedMessageManagerResponse.ts +55 -0
  248. package/apps/agents-server/src/utils/plannedMessageManager/isPlannedMessageStillPlanned.ts +18 -0
  249. package/apps/agents-server/src/utils/plannedMessageManager/loadPlannedMessageManagerRecord.ts +32 -0
  250. package/apps/agents-server/src/utils/plannedMessageManager/mapPlannedMessageManagerRecord.ts +73 -0
  251. package/apps/agents-server/src/utils/plannedMessageManager/parsePlannedMessageManagerUpdateRequest.ts +76 -0
  252. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageEndReason.ts +59 -0
  253. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageLifecycle.ts +99 -0
  254. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageRecurrenceKind.ts +40 -0
  255. package/apps/agents-server/src/utils/plannedMessageManager/updateManagedPlannedMessage.ts +121 -0
  256. package/apps/agents-server/src/utils/plannedMessagesAdmin.ts +200 -0
  257. package/apps/agents-server/src/utils/resolveInheritedAgentSource.ts +33 -799
  258. package/apps/agents-server/src/utils/serverManagement/createManagedServer/insertManagedServerRegistryRow.ts +2 -2
  259. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerCoreAgents.ts +7 -6
  260. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +5 -4
  261. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerMetadata.ts +3 -2
  262. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerUsers.ts +3 -2
  263. package/apps/agents-server/src/utils/serverManagement/deleteManagedServer.ts +2 -2
  264. package/apps/agents-server/src/utils/serverManagement/getManagedServerById.ts +1 -1
  265. package/apps/agents-server/src/utils/serverManagement/listManagedServers.ts +1 -1
  266. package/apps/agents-server/src/utils/serverRegistry.ts +0 -24
  267. package/apps/agents-server/src/utils/serverRegistryNode.ts +27 -0
  268. package/apps/agents-server/src/utils/stalwart/createEmailDnsRecordsSection.ts +53 -0
  269. package/apps/agents-server/src/utils/userChat/UserChatRecord.ts +13 -0
  270. package/apps/agents-server/src/utils/userChat/UserChatSource.ts +14 -0
  271. package/apps/agents-server/src/utils/userChat/appendQueuedUserChatTurn.ts +9 -2
  272. package/apps/agents-server/src/utils/userChat/createImmediateUserChatAnswerModelRequirements.ts +1 -0
  273. package/apps/agents-server/src/utils/userChat/createRunUserChatJobExecutionContext.ts +2 -5
  274. package/apps/agents-server/src/utils/userChat/createUserChatSummary.ts +10 -2
  275. package/apps/agents-server/src/utils/userChat/finalizeUserChatJob.ts +3 -2
  276. package/apps/agents-server/src/utils/userChat/getUserChat.ts +16 -1
  277. package/apps/agents-server/src/utils/userChat/getUserChatForJobRunner.ts +31 -0
  278. package/apps/agents-server/src/utils/userChat/listUserChats.ts +113 -110
  279. package/apps/agents-server/src/utils/userChat/persistFrozenUserChat.ts +21 -6
  280. package/apps/agents-server/src/utils/userChat/persistUserChatJobTerminalState.ts +5 -0
  281. package/apps/agents-server/src/utils/userChat/resolveUserChatWorkerInternalToken.ts +5 -4
  282. package/apps/agents-server/src/utils/userChat/runImmediateUserChatAnswer.ts +2 -6
  283. package/apps/agents-server/src/utils/userChat/runUserChatJob.ts +2 -6
  284. package/apps/agents-server/src/utils/userChat/teamMemberUserChatContext.ts +63 -0
  285. package/apps/agents-server/src/utils/userChat/userChatJobRunReport.ts +30 -0
  286. package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +6 -1
  287. package/apps/agents-server/src/utils/userChat.ts +5 -1
  288. package/apps/agents-server/src/utils/userChatClient/cancelAgentUserTimeout.ts +2 -2
  289. package/apps/agents-server/src/utils/userChatClient/fetchAgentUserTimeouts.ts +2 -2
  290. package/apps/agents-server/src/utils/userChatClient.ts +13 -31
  291. package/apps/agents-server/src/utils/userChatTimeout/UserChatTimeoutRecord.ts +47 -3
  292. package/apps/agents-server/src/utils/userChatTimeout/agentScopedTimeoutBulkActions.ts +11 -17
  293. package/apps/agents-server/src/utils/userChatTimeout/createTimeoutWakeUpMessage.ts +38 -6
  294. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/PlannedMessageSchedule.ts +52 -0
  295. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/hasPlannedMessageRecurrence.ts +13 -0
  296. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/isPlannedMessageScheduleFinished.ts +30 -0
  297. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/normalizePlannedMessageScheduleValues.ts +62 -0
  298. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/parsePlannedMessageSchedule.ts +202 -0
  299. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/resolvePlannedMessageDueAt.ts +121 -0
  300. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule.ts +12 -0
  301. package/apps/agents-server/src/utils/userChatTimeout/setAgentScopedUserChatTimeoutPausedState.ts +66 -0
  302. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/claimNextDueUserChatTimeout.ts +28 -25
  303. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/createUserChatTimeout.ts +76 -5
  304. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/getAgentScopedUserChatTimeout.ts +8 -4
  305. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAgentUserChatTimeouts.ts +4 -1
  306. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAllUserChatTimeouts.ts +37 -0
  307. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/mapUserChatTimeoutRow.ts +9 -0
  308. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/recoverExpiredRunningUserChatTimeouts.ts +3 -2
  309. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/repeatFiredUserChatTimeout.ts +84 -0
  310. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/updateAgentScopedUserChatTimeout.ts +39 -6
  311. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore.ts +2 -0
  312. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutWorker.ts +220 -57
  313. package/apps/agents-server/src/utils/userChatTimeout.ts +16 -0
  314. package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateCron.ts +23 -316
  315. package/apps/agents-server/tests/e2e/mockSupabaseServer.cjs +79 -2
  316. package/apps/agents-server/tests/e2e/support/AgentManagementApi.ts +3 -3
  317. package/apps/agents-server/tests/e2e/support/ChatHistoryNavigationSupport.ts +12 -2
  318. package/apps/agents-server/tests/e2e/support/auth.ts +6 -0
  319. package/esm/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
  320. package/esm/index.es.js +48587 -33692
  321. package/esm/index.es.js.map +1 -1
  322. package/esm/scripts/find-fresh-emoji-tags/find-fresh-emoji-tags.d.ts +1 -1
  323. package/esm/scripts/find-refactor-candidates/find-refactor-candidates.d.ts +2 -0
  324. package/esm/scripts/find-refactor-candidates/resolveRefactorCandidateProject.d.ts +3 -1
  325. package/esm/scripts/run-agent-messages/git/commitAgentProjectChanges.d.ts +15 -0
  326. package/esm/scripts/run-agent-messages/git/commitAnsweredMessageProjectChanges.d.ts +24 -0
  327. package/esm/scripts/run-agent-messages/git/ensureAgentProjectGitRepository.d.ts +20 -0
  328. package/esm/scripts/run-agent-messages/git/readAgentProjectCommitChange.d.ts +11 -0
  329. package/esm/scripts/run-agent-messages/git/runAgentProjectGitCommand.d.ts +29 -0
  330. package/esm/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
  331. package/esm/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
  332. package/esm/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
  333. package/esm/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
  334. package/esm/scripts/run-agent-messages/messages/createAgentRunnerSystemMessage.d.ts +2 -1
  335. package/esm/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
  336. package/esm/scripts/run-agent-messages/messages/listAgentProjectDirectoryNames.d.ts +7 -0
  337. package/esm/scripts/run-agent-messages/messages/loadAgentPlannedMessagesSidecar.d.ts +10 -0
  338. package/esm/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
  339. package/esm/scripts/run-agent-messages/messages/resolveAnsweredMessageTouches.d.ts +29 -0
  340. package/esm/scripts/run-codex-prompts/checks/CheckBeforeMode.d.ts +20 -0
  341. package/esm/scripts/run-codex-prompts/checks/CoderCheckExecutionError.d.ts +6 -0
  342. package/esm/scripts/run-codex-prompts/checks/CoderCheckFailedError.d.ts +6 -0
  343. package/esm/scripts/run-codex-prompts/checks/buildCheckBeforeScriptPath.d.ts +2 -0
  344. package/esm/scripts/run-codex-prompts/checks/checkRepairInstructions.d.ts +4 -0
  345. package/esm/scripts/run-codex-prompts/checks/createCheckBeforeRepairPrompt.d.ts +11 -0
  346. package/esm/scripts/run-codex-prompts/checks/limitCheckOutput.d.ts +4 -0
  347. package/esm/scripts/run-codex-prompts/checks/projectCheck.d.ts +26 -0
  348. package/esm/scripts/run-codex-prompts/checks/projectScriptReferences.d.ts +7 -0
  349. package/esm/scripts/run-codex-prompts/checks/runCheckBefore.d.ts +31 -0
  350. package/esm/scripts/run-codex-prompts/checks/runCoderCheck.d.ts +17 -0
  351. package/esm/scripts/run-codex-prompts/checks/runCoderCheckRepair.d.ts +40 -0
  352. package/esm/scripts/run-codex-prompts/checks/runPromptCheckCommand.d.ts +16 -0
  353. package/esm/scripts/run-codex-prompts/{testing/runPromptWithTestFeedback.d.ts → checks/runPromptWithCheckFeedback.d.ts} +14 -9
  354. package/esm/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +54 -0
  355. package/esm/scripts/run-codex-prompts/common/applyCoderRunControlKey.d.ts +14 -0
  356. package/esm/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +7 -0
  357. package/esm/scripts/run-codex-prompts/common/createFreeDiskSpaceGuard.d.ts +28 -0
  358. package/esm/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
  359. package/esm/scripts/run-codex-prompts/common/formatUnknownErrorDetails.d.ts +4 -0
  360. package/esm/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +18 -0
  361. package/esm/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
  362. package/esm/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +44 -5
  363. package/esm/scripts/run-codex-prompts/common/resolveCoderContext.d.ts +1 -1
  364. package/esm/scripts/run-codex-prompts/common/resolveCoderProjectContext.d.ts +19 -0
  365. package/esm/scripts/run-codex-prompts/common/resolveInlineOrFileText.d.ts +2 -0
  366. package/esm/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +29 -0
  367. package/esm/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
  368. package/esm/scripts/run-codex-prompts/common/runGoScript/buildCoderExecutionArtifactPaths.d.ts +2 -0
  369. package/esm/scripts/run-codex-prompts/common/runGoScript/captureLiveScriptOutput.d.ts +9 -0
  370. package/esm/scripts/run-codex-prompts/common/runGoScript/createScriptOutputLineReader.d.ts +26 -0
  371. package/esm/scripts/run-codex-prompts/common/runGoScript/quoteBashArgument.d.ts +2 -0
  372. package/esm/scripts/run-codex-prompts/common/runGoScript/resolveShellHereDocumentDelimiter.d.ts +2 -0
  373. package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +7 -1
  374. package/esm/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +2 -0
  375. package/esm/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
  376. package/esm/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +16 -0
  377. package/esm/scripts/run-codex-prompts/common/withCoderWorkspaceLock.d.ts +9 -0
  378. package/esm/scripts/run-codex-prompts/git/CoderGitOperationError.d.ts +9 -0
  379. package/esm/scripts/run-codex-prompts/git/CoderPhasePersistence.d.ts +105 -0
  380. package/esm/scripts/run-codex-prompts/git/CoderPhaseRecovery.d.ts +43 -0
  381. package/esm/scripts/run-codex-prompts/git/buildCoderCheckCommitMessage.d.ts +11 -0
  382. package/esm/scripts/run-codex-prompts/git/coderCommitScope.d.ts +47 -0
  383. package/esm/scripts/run-codex-prompts/git/coderFinalizationFiles.d.ts +14 -0
  384. package/esm/scripts/run-codex-prompts/git/coderGitSync.d.ts +20 -2
  385. package/esm/scripts/run-codex-prompts/git/coderIndexLease.d.ts +11 -0
  386. package/esm/scripts/run-codex-prompts/git/coderRepositoryFiles.d.ts +6 -0
  387. package/esm/scripts/run-codex-prompts/git/coderRepositorySnapshot.d.ts +62 -0
  388. package/esm/scripts/run-codex-prompts/git/coderRepositoryView.d.ts +30 -0
  389. package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +43 -4
  390. package/esm/scripts/run-codex-prompts/git/commitInitializedAgentBooks.d.ts +6 -0
  391. package/esm/scripts/run-codex-prompts/git/ensureWorkingTreeClean.d.ts +1 -1
  392. package/esm/scripts/run-codex-prompts/git/gitLongPathsSupport.d.ts +1 -1
  393. package/esm/scripts/run-codex-prompts/git/pullLatestChanges.d.ts +3 -1
  394. package/esm/scripts/run-codex-prompts/git/quoteGitArgument.d.ts +5 -0
  395. package/esm/scripts/run-codex-prompts/git/runGitCommand.d.ts +4 -0
  396. package/esm/scripts/run-codex-prompts/git/runWorkspaceGitWithIndexReadRetry.d.ts +7 -0
  397. package/esm/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
  398. package/esm/scripts/run-codex-prompts/isolation/coderIsolationArtifacts.d.ts +16 -0
  399. package/esm/scripts/run-codex-prompts/isolation/coderIsolationIgnoredFiles.d.ts +18 -0
  400. package/esm/scripts/run-codex-prompts/isolation/copyCoderIsolationEnvironment.d.ts +1 -1
  401. package/esm/scripts/run-codex-prompts/isolation/createCoderIsolationWorktree.d.ts +3 -2
  402. package/esm/scripts/run-codex-prompts/isolation/mapProjectReferenceToWorktree.d.ts +5 -0
  403. package/esm/scripts/run-codex-prompts/isolation/mergeCoderIsolationWorktree.d.ts +5 -5
  404. package/esm/scripts/run-codex-prompts/isolation/preserveCoderIsolationRecovery.d.ts +3 -0
  405. package/esm/scripts/run-codex-prompts/isolation/runIsolatedPromptRound.d.ts +2 -2
  406. package/esm/scripts/run-codex-prompts/main/findUnwrittenPrompts.d.ts +2 -0
  407. package/esm/scripts/run-codex-prompts/main/listCoderPrompts.d.ts +22 -0
  408. package/esm/scripts/run-codex-prompts/main/prepareCoderPromptExecution.d.ts +18 -0
  409. package/esm/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +16 -8
  410. package/esm/scripts/run-codex-prompts/main/runCoderFix.d.ts +24 -0
  411. package/esm/scripts/run-codex-prompts/main/runPromptRound.d.ts +16 -6
  412. package/esm/scripts/run-codex-prompts/ping/pingCoderHarnessPeriodically.d.ts +22 -0
  413. package/esm/scripts/run-codex-prompts/prompts/buildPromptLabel.d.ts +6 -0
  414. package/esm/scripts/run-codex-prompts/prompts/buildPromptLabelForDisplay.d.ts +1 -1
  415. package/esm/scripts/run-codex-prompts/prompts/buildPromptRunTraceContent.d.ts +70 -0
  416. package/esm/scripts/run-codex-prompts/prompts/buildPromptRunTracePath.d.ts +10 -0
  417. package/esm/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +9 -13
  418. package/esm/scripts/run-codex-prompts/prompts/findFirstNonEmptyLineIndex.d.ts +6 -0
  419. package/esm/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +2 -2
  420. package/esm/scripts/run-codex-prompts/prompts/formatRunnerSignature.d.ts +14 -1
  421. package/esm/scripts/run-codex-prompts/prompts/isPromptCompatibleWithRunner.d.ts +11 -6
  422. package/esm/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
  423. package/esm/scripts/run-codex-prompts/prompts/listUpcomingTasks.d.ts +1 -1
  424. package/esm/scripts/run-codex-prompts/prompts/loadPromptFiles.d.ts +10 -2
  425. package/esm/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
  426. package/esm/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +28 -1
  427. package/esm/scripts/run-codex-prompts/prompts/printPromptsToBeWritten.d.ts +1 -1
  428. package/esm/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +30 -0
  429. package/esm/scripts/run-codex-prompts/prompts/refreshPromptSelection.d.ts +6 -0
  430. package/esm/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
  431. package/esm/scripts/run-codex-prompts/prompts/writePromptErrorLog.d.ts +4 -0
  432. package/esm/scripts/run-codex-prompts/prompts/writePromptFile.d.ts +2 -0
  433. package/esm/scripts/run-codex-prompts/prompts/writePromptRunTrace.d.ts +21 -0
  434. package/esm/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +3 -2
  435. package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +27 -0
  436. package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +3 -0
  437. package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeSubscriptionUsage.d.ts +11 -0
  438. package/esm/scripts/run-codex-prompts/runners/cline/ClineRunner.d.ts +2 -0
  439. package/esm/scripts/run-codex-prompts/runners/common/buildHarnessAuthenticationError.d.ts +20 -0
  440. package/esm/scripts/run-codex-prompts/runners/common/createAuthenticationAwarePromptRunner.d.ts +11 -0
  441. package/esm/scripts/run-codex-prompts/runners/common/estimateUsageFromTextLength.d.ts +33 -0
  442. package/esm/scripts/run-codex-prompts/runners/common/extractHarnessAuthenticationFailureReason.d.ts +9 -0
  443. package/esm/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
  444. package/esm/scripts/run-codex-prompts/runners/gemini/GeminiRunner.d.ts +3 -1
  445. package/esm/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
  446. package/esm/scripts/run-codex-prompts/runners/github-copilot/GitHubCopilotRunner.d.ts +2 -0
  447. package/esm/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +10 -0
  448. package/esm/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
  449. package/esm/scripts/run-codex-prompts/runners/openai-codex/getCodexSubscriptionUsage.d.ts +19 -0
  450. package/esm/scripts/run-codex-prompts/runners/opencode/OpencodeRunner.d.ts +2 -0
  451. package/esm/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +25 -0
  452. package/esm/scripts/run-codex-prompts/runners/qwen-code/buildQwenCodeScript.d.ts +8 -0
  453. package/esm/scripts/run-codex-prompts/runners/qwen-code/parseQwenCodeUsageFromOutput.d.ts +9 -0
  454. package/esm/scripts/run-codex-prompts/runners/qwen-code/qwen-code-pricing.d.ts +30 -0
  455. package/esm/scripts/run-codex-prompts/runners/types/HarnessSubscriptionUsage.d.ts +43 -0
  456. package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +3 -1
  457. package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
  458. package/esm/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +3 -0
  459. package/esm/scripts/run-codex-prompts/team/CoderTeamRuntime.d.ts +87 -0
  460. package/esm/scripts/run-codex-prompts/team/coderTeamProtocol.d.ts +6 -0
  461. package/esm/scripts/run-codex-prompts/team/compileCoderTeamAgent.d.ts +4 -0
  462. package/esm/scripts/run-codex-prompts/team/createCoderTeamPromptRunner.d.ts +9 -0
  463. package/esm/scripts/run-codex-prompts/team/startCoderTeamBridge.d.ts +14 -0
  464. package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +39 -4
  465. package/esm/scripts/run-codex-prompts/ui/buildCoderCheckRepairUiFrame.d.ts +3 -0
  466. package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
  467. package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +17 -1
  468. package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
  469. package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiViewport.d.ts +5 -0
  470. package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +15 -1
  471. package/esm/scripts/run-codex-prompts/ui/buildSubscriptionUsageSessionRows.d.ts +11 -0
  472. package/esm/scripts/run-codex-prompts/ui/coderRunUiText.d.ts +4 -0
  473. package/esm/scripts/run-codex-prompts/ui/output/CoderOutputEvent.d.ts +20 -0
  474. package/esm/scripts/run-codex-prompts/ui/output/CoderRunOutput.d.ts +48 -0
  475. package/esm/scripts/run-codex-prompts/ui/output/buildCoderOutputLines.d.ts +18 -0
  476. package/esm/scripts/run-codex-prompts/ui/output/normalizeCoderOutputRecord.d.ts +10 -0
  477. package/esm/scripts/run-codex-prompts/ui/refreshCoderRunUiSubscriptionUsage.d.ts +14 -0
  478. package/esm/scripts/run-codex-prompts/ui/renderCoderRunUi.d.ts +4 -0
  479. package/esm/scripts/run-codex-prompts/ui/startCoderRunUiSubscriptionUsageRefresh.d.ts +37 -0
  480. package/esm/scripts/utils/emojiTags/scanEmojiTagUsage.d.ts +2 -0
  481. package/esm/scripts/utils/emojiTags/validSinglePictogramEmojis.d.ts +17 -0
  482. package/esm/scripts/utils/prompts/isPromptDocumentationFile.d.ts +5 -0
  483. package/esm/scripts/utils/prompts/promptEmojiTags.d.ts +2 -0
  484. package/esm/scripts/verify-prompts/verify-prompts.d.ts +3 -0
  485. package/esm/src/_packages/components.index.d.ts +4 -0
  486. package/esm/src/_packages/types.index.d.ts +4 -0
  487. package/esm/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  488. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  489. package/esm/src/book-2.0/agent-source/AgentReferenceResolutionIssue.d.ts +45 -0
  490. package/esm/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
  491. package/esm/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +2 -0
  492. package/esm/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  493. package/esm/src/book-2.0/agent-source/deduplicateSystemMessage.d.ts +14 -0
  494. package/esm/src/book-2.0/agent-source/explicitFromCommitment.d.ts +62 -0
  495. package/esm/src/book-2.0/agent-source/extractAgentReferenceTokens.d.ts +32 -0
  496. package/esm/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  497. package/esm/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
  498. package/esm/src/book-2.0/agent-source/resolveInheritedAgentSource.d.ts +73 -0
  499. package/esm/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +1 -1
  500. package/esm/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  501. package/esm/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  502. package/esm/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
  503. package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  504. package/esm/src/book-3.0/cliAgentEnv.d.ts +3 -3
  505. package/esm/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  506. package/esm/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  507. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  508. package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  509. package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
  510. package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  511. package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
  512. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  513. package/esm/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  514. package/esm/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  515. package/esm/src/book-components/Chat/MockedChat/MockedChat.test.d.ts +2 -0
  516. package/esm/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  517. package/esm/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
  518. package/esm/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  519. package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  520. package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  521. package/esm/src/cli/$initializePromptbookCliProgram.d.ts +8 -0
  522. package/esm/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +10 -0
  523. package/esm/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.test.d.ts +1 -0
  524. package/esm/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  525. package/esm/src/cli/cli-commands/coder/add.d.ts +22 -1
  526. package/esm/src/cli/cli-commands/coder/agentCliOptions.d.ts +27 -0
  527. package/esm/src/cli/cli-commands/coder/augmentCoderAgentTeam.d.ts +7 -0
  528. package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +1 -1
  529. package/esm/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +8 -21
  530. package/esm/src/cli/cli-commands/coder/coderAgentRole.d.ts +21 -0
  531. package/esm/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +34 -0
  532. package/esm/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.d.ts +8 -0
  533. package/esm/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.test.d.ts +1 -0
  534. package/esm/src/cli/cli-commands/coder/ensureCoderGitattributesFile.d.ts +13 -0
  535. package/esm/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +14 -1
  536. package/esm/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +5 -2
  537. package/esm/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.test.d.ts +1 -0
  538. package/esm/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.d.ts +12 -0
  539. package/esm/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +2 -0
  540. package/esm/src/cli/cli-commands/coder/ensureDirectory.d.ts +6 -0
  541. package/esm/src/cli/cli-commands/coder/findLegacyCoderCheckCallers.d.ts +5 -0
  542. package/esm/src/cli/cli-commands/coder/fix.d.ts +7 -0
  543. package/esm/src/cli/cli-commands/coder/fix.test.d.ts +1 -0
  544. package/esm/src/cli/cli-commands/coder/fixWorkflow.test.d.ts +1 -0
  545. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +2 -2
  546. package/esm/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.d.ts +9 -0
  547. package/esm/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
  548. package/esm/src/cli/cli-commands/coder/init.test.d.ts +1 -0
  549. package/esm/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +18 -6
  550. package/esm/src/cli/cli-commands/coder/list.d.ts +10 -0
  551. package/esm/src/cli/cli-commands/coder/list.test.d.ts +1 -0
  552. package/esm/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +21 -1
  553. package/esm/src/cli/cli-commands/coder/plan.d.ts +7 -0
  554. package/esm/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.d.ts +6 -0
  555. package/esm/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.d.ts +7 -0
  556. package/esm/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.d.ts +6 -0
  557. package/esm/src/cli/cli-commands/coder/planning/createPlanningTerminal.d.ts +8 -0
  558. package/esm/src/cli/cli-commands/coder/planning/createPlanningTerminal.test.d.ts +1 -0
  559. package/esm/src/cli/cli-commands/coder/planning/createPlanningWorkspace.d.ts +11 -0
  560. package/esm/src/cli/cli-commands/coder/planning/discussPlanningTurn.d.ts +15 -0
  561. package/esm/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.d.ts +5 -0
  562. package/esm/src/cli/cli-commands/coder/planning/planningGitSync.test.d.ts +1 -0
  563. package/esm/src/cli/cli-commands/coder/planning/planningPackagedCli.test.d.ts +1 -0
  564. package/esm/src/cli/cli-commands/coder/planning/planningProtocol.d.ts +152 -0
  565. package/esm/src/cli/cli-commands/coder/planning/planningTeam.test.d.ts +1 -0
  566. package/esm/src/cli/cli-commands/coder/planning/preparePlanningChanges.d.ts +16 -0
  567. package/esm/src/cli/cli-commands/coder/planning/readPlanningContext.d.ts +6 -0
  568. package/esm/src/cli/cli-commands/coder/planning/resolvePlanningPath.d.ts +7 -0
  569. package/esm/src/cli/cli-commands/coder/planning/runPlanningHarness.d.ts +30 -0
  570. package/esm/src/cli/cli-commands/coder/planning/runPlanningHarness.test.d.ts +1 -0
  571. package/esm/src/cli/cli-commands/coder/planning/runPlanningSession.d.ts +24 -0
  572. package/esm/src/cli/cli-commands/coder/planning/runPlanningSession.test.d.ts +1 -0
  573. package/esm/src/cli/cli-commands/coder/planning/savePlanningChanges.d.ts +7 -0
  574. package/esm/src/cli/cli-commands/coder/prepareCoderPackageJsonScripts.d.ts +12 -0
  575. package/esm/src/cli/cli-commands/coder/printCoderRunFailure.d.ts +6 -0
  576. package/esm/src/cli/cli-commands/coder/printInitializationSummary.d.ts +2 -1
  577. package/esm/src/cli/cli-commands/coder/promptsReadmeTemplate.d.ts +13 -0
  578. package/esm/src/cli/cli-commands/coder/promptsReadmeTemplate.test.d.ts +1 -0
  579. package/esm/src/cli/cli-commands/coder/readCoderAgentBook.d.ts +8 -0
  580. package/esm/src/cli/cli-commands/coder/server.test.d.ts +1 -0
  581. package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  582. package/esm/src/cli/cli-commands/coder/workspacePreflight.test.d.ts +1 -0
  583. package/esm/src/cli/cli-commands/coder.d.ts +3 -0
  584. package/esm/src/cli/cli-commands/common/$askForConfirmation.d.ts +11 -0
  585. package/esm/src/cli/cli-commands/common/$askForConfirmation.test.d.ts +1 -0
  586. package/esm/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +48 -0
  587. package/esm/src/cli/cli-commands/common/coderCheckCliOptions.d.ts +21 -0
  588. package/esm/src/cli/cli-commands/common/coderCheckCliOptions.test.d.ts +1 -0
  589. package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +1 -1
  590. package/esm/src/cli/cli-commands/common/createLocalAgentReferenceResolver.d.ts +8 -0
  591. package/esm/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.d.ts +12 -0
  592. package/esm/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.test.d.ts +1 -0
  593. package/esm/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.d.ts +11 -0
  594. package/esm/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.test.d.ts +1 -0
  595. package/esm/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.d.ts +33 -0
  596. package/esm/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.d.ts +6 -0
  597. package/esm/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.test.d.ts +1 -0
  598. package/esm/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.d.ts +10 -0
  599. package/esm/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.d.ts +28 -0
  600. package/esm/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.d.ts +7 -0
  601. package/esm/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.test.d.ts +1 -0
  602. package/esm/src/cli/cli-commands/common/ensureAdamAgentBook.d.ts +12 -0
  603. package/esm/src/cli/cli-commands/common/ensureProjectTextFile.d.ts +7 -0
  604. package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +3 -2
  605. package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  606. package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
  607. package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +6 -3
  608. package/esm/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
  609. package/esm/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
  610. package/esm/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
  611. package/esm/src/cli/cli-commands/common/harness/HARNESS_DEFAULT_MODELS.d.ts +25 -0
  612. package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +62 -0
  613. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
  614. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
  615. package/esm/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
  616. package/esm/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
  617. package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
  618. package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
  619. package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
  620. package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
  621. package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
  622. package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
  623. package/esm/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts +11 -0
  624. package/esm/src/cli/cli-commands/common/{harness/$resolveLatestHarnessVersion.d.ts → npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  625. package/esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
  626. package/esm/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
  627. package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  628. package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
  629. package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  630. package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
  631. package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  632. package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
  633. package/esm/src/cli/cli-commands/common/projectCliOptions.d.ts +30 -0
  634. package/esm/src/cli/cli-commands/common/projectCliOptions.test.d.ts +1 -0
  635. package/esm/src/cli/cli-commands/common/projectInitialization.d.ts +6 -0
  636. package/esm/src/cli/cli-commands/common/promptPriorityCliOptions.d.ts +7 -0
  637. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
  638. package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  639. package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
  640. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +15 -0
  641. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
  642. package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  643. package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
  644. package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  645. package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
  646. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  647. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  648. package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  649. package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  650. package/esm/src/cli/cli-commands/common/questionsCliOptions.d.ts +45 -0
  651. package/esm/src/cli/cli-commands/common/questionsCliOptions.test.d.ts +1 -0
  652. package/esm/src/cli/cli-commands/common/resolveBundledAgentBookPath.d.ts +6 -0
  653. package/esm/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +26 -0
  654. package/esm/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +6 -0
  655. package/esm/src/cli/cli-commands/common/workspaceRepository.d.ts +48 -0
  656. package/esm/src/cli/cli-commands/common/workspaceRepository.test.d.ts +1 -0
  657. package/esm/src/cli/cli-commands/common/workspaceRepositoryCliOptions.d.ts +11 -0
  658. package/esm/src/cli/common/$deprecateCliCommand.d.ts +3 -0
  659. package/esm/src/cli/common/$hideCliCommandFromHelp.d.ts +11 -0
  660. package/esm/src/cli/common/$hideCliCommandFromHelp.test.d.ts +1 -0
  661. package/esm/src/cli/common/$requireCliSubcommand.d.ts +18 -0
  662. package/esm/src/cli/common/$requireCliSubcommand.test.d.ts +1 -0
  663. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  664. package/esm/src/commitments/TEAM/TEAM.test.d.ts +1 -0
  665. package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
  666. package/esm/src/commitments/index.d.ts +1 -1
  667. package/esm/src/conversion/archive/loadJsZipModule.d.ts +10 -0
  668. package/esm/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  669. package/esm/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
  670. package/esm/src/llm-providers/vercel/VercelExecutionToolsOptions.d.ts +5 -2
  671. package/esm/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  672. package/esm/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  673. package/esm/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  674. package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  675. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  676. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
  677. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  678. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
  679. package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  680. package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  681. package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  682. package/esm/src/utils/files/findFilesByGlob.d.ts +28 -0
  683. package/esm/src/utils/misc/debounce.d.ts +4 -2
  684. package/esm/src/utils/misc/debounce.test.d.ts +1 -0
  685. package/esm/src/utils/misc/emojis.d.ts +3 -2
  686. package/esm/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
  687. package/esm/src/version.d.ts +1 -1
  688. package/package.json +20 -25
  689. package/src/_packages/cli.readme.md +15 -0
  690. package/src/_packages/components.index.ts +4 -0
  691. package/src/_packages/types.index.ts +4 -0
  692. package/src/avatars/renderAvatarVisualTerminalText.ts +249 -0
  693. package/src/avatars/types/AvatarVisualDefinition.ts +60 -0
  694. package/src/avatars/visuals/asciiOctopusAvatarVisual.ts +144 -22
  695. package/src/book-2.0/agent-source/AgentReferenceResolutionIssue.ts +75 -0
  696. package/src/book-2.0/agent-source/AgentSourceParseResult.ts +6 -0
  697. package/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.ts +2 -0
  698. package/src/book-2.0/agent-source/ParsedUnknownCommitment.ts +29 -0
  699. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/applyCommitmentsToAgentModelRequirements.ts +8 -3
  700. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.ts +38 -1
  701. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.ts +9 -2
  702. package/src/book-2.0/agent-source/deduplicateSystemMessage.ts +327 -0
  703. package/src/book-2.0/agent-source/explicitFromCommitment.ts +132 -0
  704. package/src/book-2.0/agent-source/extractAgentReferenceTokens.ts +65 -0
  705. package/src/book-2.0/agent-source/getBookCommitmentLineType.ts +36 -0
  706. package/src/book-2.0/agent-source/parseAgentSourceWithCommitments.ts +128 -61
  707. package/src/book-2.0/agent-source/resolveInheritedAgentSource.ts +841 -0
  708. package/src/book-2.0/agent-source/string_book.ts +1 -1
  709. package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +5 -4
  710. package/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.ts +6 -1
  711. package/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.ts +6 -1
  712. package/src/book-2.0/book-language-documentation/getSafeCodeBlock.ts +1 -1
  713. package/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.ts +1 -4
  714. package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +4 -17
  715. package/src/book-3.0/AgentMessageRunReport.ts +135 -0
  716. package/src/book-3.0/AgentPlannedMessagesSidecar.ts +284 -0
  717. package/src/book-3.0/AgentTeamConversationWorkspace.ts +170 -0
  718. package/src/book-3.0/cliAgentEnv.ts +3 -2
  719. package/src/book-3.0/createAgentMessageSidecarBaseName.ts +20 -0
  720. package/src/book-3.0/describeAgentPlannedMessageSchedule.ts +94 -0
  721. package/src/book-components/BookEditor/BookEditorMonaco.tsx +8 -1
  722. package/src/book-components/BookEditor/BookEditorMonacoTokenization.ts +3 -1
  723. package/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.ts +3 -11
  724. package/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.ts +71 -0
  725. package/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.ts +50 -0
  726. package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +56 -55
  727. package/src/book-components/Chat/Chat/Chat.module.css +172 -27
  728. package/src/book-components/Chat/Chat/ChatMessageMap.tsx +7 -4
  729. package/src/book-components/Chat/Chat/ChatProps.tsx +3 -2
  730. package/src/book-components/Chat/Chat/renderAgentProjectDiff.tsx +85 -0
  731. package/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.tsx +206 -0
  732. package/src/book-components/Chat/Chat/renderToolCallDetails.tsx +9 -12
  733. package/src/book-components/Chat/MarkdownContent/MarkdownContent.module.css +85 -17
  734. package/src/book-components/Chat/MarkdownContent/MarkdownContent.tsx +115 -2
  735. package/src/book-components/Chat/MockedChat/MockedChat.tsx +25 -1
  736. package/src/book-components/Chat/save/react/exports/chat-preview-2025-10-13 (1).jsx +95 -5
  737. package/src/book-components/Chat/utils/agentProjectToolCall.ts +151 -0
  738. package/src/book-components/Chat/utils/externalSourceToolCall.ts +65 -0
  739. package/src/book-components/Chat/utils/getToolCallChipletInfo.ts +64 -0
  740. package/src/book-components/Chat/utils/renderMarkdown.ts +658 -96
  741. package/src/book-components/Chat/utils/timeoutToolCallPresentation.ts +34 -3
  742. package/src/cli/$initializePromptbookCliProgram.ts +89 -0
  743. package/src/cli/cli-commands/agent/chat.ts +11 -2
  744. package/src/cli/cli-commands/agent/exec.ts +11 -2
  745. package/src/cli/cli-commands/agent-folder/init.ts +6 -2
  746. package/src/cli/cli-commands/agent-folder/initializeAgentRunnerCommand.ts +9 -2
  747. package/src/cli/cli-commands/agent-folder.ts +2 -6
  748. package/src/cli/cli-commands/agent.ts +2 -6
  749. package/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.ts +1 -1
  750. package/src/cli/cli-commands/agents-server.ts +2 -6
  751. package/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.ts +54 -0
  752. package/src/cli/cli-commands/coder/GitChangesMode.ts +35 -0
  753. package/src/cli/cli-commands/coder/add.ts +97 -19
  754. package/src/cli/cli-commands/coder/agentCliOptions.ts +48 -0
  755. package/src/cli/cli-commands/coder/augmentCoderAgentTeam.ts +152 -0
  756. package/src/cli/cli-commands/coder/boilerplateCount.ts +1 -1
  757. package/src/cli/cli-commands/coder/boilerplateTemplates.ts +20 -59
  758. package/src/cli/cli-commands/coder/coderAgentRole.ts +28 -0
  759. package/src/cli/cli-commands/coder/coderReferencedArtifacts.ts +103 -0
  760. package/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.ts +90 -0
  761. package/src/cli/cli-commands/coder/ensureCoderDeveloperAgentFile.ts +2 -47
  762. package/src/cli/cli-commands/coder/ensureCoderGitattributesFile.ts +25 -0
  763. package/src/cli/cli-commands/coder/ensureCoderGitignoreFile.ts +37 -3
  764. package/src/cli/cli-commands/coder/ensureCoderMarkdownFile.ts +2 -20
  765. package/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.ts +24 -3
  766. package/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.ts +36 -0
  767. package/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.ts +5 -1
  768. package/src/cli/cli-commands/coder/ensureDirectory.ts +27 -1
  769. package/src/cli/cli-commands/coder/find-fresh-emoji-tags.ts +14 -2
  770. package/src/cli/cli-commands/coder/find-refactor-candidates.ts +13 -1
  771. package/src/cli/cli-commands/coder/find-unwritten.ts +13 -1
  772. package/src/cli/cli-commands/coder/findLegacyCoderCheckCallers.ts +87 -0
  773. package/src/cli/cli-commands/coder/fix.ts +166 -0
  774. package/src/cli/cli-commands/coder/fixtures/fix.cjs +29 -0
  775. package/src/cli/cli-commands/coder/fixtures/healthyDisk.cjs +4 -0
  776. package/src/cli/cli-commands/coder/generate-boilerplates.ts +41 -29
  777. package/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.ts +44 -0
  778. package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +103 -9
  779. package/src/cli/cli-commands/coder/init.ts +116 -26
  780. package/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.ts +93 -32
  781. package/src/cli/cli-commands/coder/list.ts +102 -0
  782. package/src/cli/cli-commands/coder/mergeStringRecordJsonFile.ts +42 -8
  783. package/src/cli/cli-commands/coder/ping.ts +73 -19
  784. package/src/cli/cli-commands/coder/plan.ts +139 -0
  785. package/src/cli/cli-commands/coder/planning/README.md +39 -0
  786. package/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.ts +23 -0
  787. package/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.ts +57 -0
  788. package/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.ts +34 -0
  789. package/src/cli/cli-commands/coder/planning/createPlanningTerminal.ts +57 -0
  790. package/src/cli/cli-commands/coder/planning/createPlanningWorkspace.ts +36 -0
  791. package/src/cli/cli-commands/coder/planning/discussPlanningTurn.ts +61 -0
  792. package/src/cli/cli-commands/coder/planning/fixtures/codex.cjs +54 -0
  793. package/src/cli/cli-commands/coder/planning/fixtures/coding.cjs +26 -0
  794. package/src/cli/cli-commands/coder/planning/fixtures/conversation.json +70 -0
  795. package/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.ts +17 -0
  796. package/src/cli/cli-commands/coder/planning/fixtures/terminal.cjs +26 -0
  797. package/src/cli/cli-commands/coder/planning/planningProtocol.ts +132 -0
  798. package/src/cli/cli-commands/coder/planning/preparePlanningChanges.ts +178 -0
  799. package/src/cli/cli-commands/coder/planning/readPlanningContext.ts +108 -0
  800. package/src/cli/cli-commands/coder/planning/resolvePlanningPath.ts +72 -0
  801. package/src/cli/cli-commands/coder/planning/runPlanningHarness.ts +249 -0
  802. package/src/cli/cli-commands/coder/planning/runPlanningSession.ts +254 -0
  803. package/src/cli/cli-commands/coder/planning/savePlanningChanges.ts +105 -0
  804. package/src/cli/cli-commands/coder/prepareCoderPackageJsonScripts.ts +304 -0
  805. package/src/cli/cli-commands/coder/printCoderRunFailure.ts +14 -0
  806. package/src/cli/cli-commands/coder/printInitializationSummary.ts +61 -19
  807. package/src/cli/cli-commands/coder/promptsReadmeTemplate.ts +400 -0
  808. package/src/cli/cli-commands/coder/readCoderAgentBook.ts +62 -0
  809. package/src/cli/cli-commands/coder/run.ts +109 -90
  810. package/src/cli/cli-commands/coder/server.ts +87 -71
  811. package/src/cli/cli-commands/coder/verify.ts +21 -1
  812. package/src/cli/cli-commands/coder/waitOptions.ts +33 -0
  813. package/src/cli/cli-commands/coder.ts +17 -6
  814. package/src/cli/cli-commands/common/$askForConfirmation.ts +41 -0
  815. package/src/cli/cli-commands/common/LocalAgentBookCollection.ts +258 -0
  816. package/src/cli/cli-commands/common/coderCheckCliOptions.ts +108 -0
  817. package/src/cli/cli-commands/common/coderGitSyncCliOptions.ts +7 -3
  818. package/src/cli/cli-commands/common/createLocalAgentReferenceResolver.ts +69 -0
  819. package/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.ts +35 -0
  820. package/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.ts +37 -0
  821. package/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.ts +39 -0
  822. package/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.ts +26 -0
  823. package/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.ts +33 -0
  824. package/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.ts +33 -0
  825. package/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.ts +21 -0
  826. package/src/cli/cli-commands/common/ensureAdamAgentBook.ts +40 -0
  827. package/src/cli/cli-commands/common/ensureProjectTextFile.ts +35 -0
  828. package/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.ts +79 -11
  829. package/src/cli/cli-commands/common/harness/$checkHarnessInstallation.ts +32 -9
  830. package/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.ts +25 -4
  831. package/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.ts +46 -0
  832. package/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.ts +36 -0
  833. package/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.ts +2 -2
  834. package/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.ts +100 -0
  835. package/src/cli/cli-commands/common/harness/HARNESS_DEFAULT_MODELS.ts +37 -0
  836. package/src/cli/cli-commands/common/harness/HarnessDefinition.ts +101 -0
  837. package/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.ts +44 -0
  838. package/src/cli/cli-commands/common/harness/HarnessInstallationStatus.ts +9 -2
  839. package/src/cli/cli-commands/common/harness/HarnessUpdatePlan.ts +27 -0
  840. package/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.ts +6 -2
  841. package/src/cli/cli-commands/common/harness/formatHarnessInstallationWarning.ts +28 -6
  842. package/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.ts +41 -0
  843. package/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.ts +111 -0
  844. package/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.ts +47 -0
  845. package/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.ts +20 -0
  846. package/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.ts +49 -0
  847. package/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.ts +51 -0
  848. package/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.ts +28 -0
  849. package/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.ts +25 -0
  850. package/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.ts +165 -0
  851. package/src/cli/cli-commands/common/projectCliOptions.ts +78 -0
  852. package/src/cli/cli-commands/common/projectInitialization.ts +35 -3
  853. package/src/cli/cli-commands/common/promptPriorityCliOptions.ts +30 -0
  854. package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +51 -17
  855. package/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.ts +71 -0
  856. package/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.ts +129 -0
  857. package/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.ts +263 -0
  858. package/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.ts +58 -0
  859. package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.ts +76 -0
  860. package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.ts +32 -0
  861. package/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.ts +13 -0
  862. package/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.ts +45 -0
  863. package/src/cli/cli-commands/common/questionsCliOptions.ts +89 -0
  864. package/src/cli/cli-commands/common/resolveBundledAgentBookPath.ts +38 -0
  865. package/src/cli/cli-commands/common/resolveLocalAgentSource.ts +147 -0
  866. package/src/cli/cli-commands/common/validateCoderRunOptions.ts +113 -0
  867. package/src/cli/cli-commands/common/workspaceRepository.md +46 -0
  868. package/src/cli/cli-commands/common/workspaceRepository.ts +301 -0
  869. package/src/cli/cli-commands/common/workspaceRepositoryCliOptions.ts +31 -0
  870. package/src/cli/cli-commands/prettify.ts +2 -2
  871. package/src/cli/cli-commands/run.ts +3 -1
  872. package/src/cli/cli-commands/test-command.ts +2 -2
  873. package/src/cli/common/$deprecateCliCommand.ts +5 -0
  874. package/src/cli/common/$hideCliCommandFromHelp.ts +27 -0
  875. package/src/cli/common/$requireCliSubcommand.ts +35 -0
  876. package/src/cli/promptbookCli.ts +6 -87
  877. package/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.ts +47 -3
  878. package/src/commands/FORMAT/formatCommandParser.ts +4 -2
  879. package/src/commitments/FROM/FROM.ts +13 -0
  880. package/src/commitments/TEAM/TEAM.ts +26 -4
  881. package/src/commitments/WRITING_RULES/WRITING_RULES.ts +16 -8
  882. package/src/commitments/index.ts +2 -1
  883. package/src/conversion/archive/loadJsZipModule.ts +3 -1
  884. package/src/executables/platforms/locateAppOnWindows.ts +12 -9
  885. package/src/execution/translation/automatic-translate/translateMessages.ts +2 -2
  886. package/src/llm-providers/openai/utils/buildToolInvocationScript.ts +21 -18
  887. package/src/llm-providers/vercel/VercelExecutionToolsOptions.ts +7 -2
  888. package/src/llm-providers/vercel/createExecutionToolsFromVercelProvider.ts +18 -17
  889. package/src/other/templates/getTemplatesPipelineCollection.ts +2156 -950
  890. package/src/utils/agent-message-runtime/AgentMessageProjectChange.ts +183 -0
  891. package/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.ts +80 -0
  892. package/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.ts +108 -0
  893. package/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.ts +78 -75
  894. package/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.ts +341 -0
  895. package/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.ts +147 -0
  896. package/src/utils/agents/terminalAgentAvatarVisual.ts +31 -3
  897. package/src/utils/ascii-art/convertImageDataToAsciiArt.ts +9 -109
  898. package/src/utils/ascii-art/createAnsiColorCode.ts +132 -0
  899. package/src/utils/execCommand/$execCommand.ts +2 -1
  900. package/src/utils/files/findFilesByGlob.ts +46 -0
  901. package/src/utils/misc/debounce.ts +26 -5
  902. package/src/utils/misc/emojis.ts +3 -3
  903. package/src/utils/random/$generateBookBoilerplate.ts +1 -1
  904. package/src/version.ts +2 -2
  905. package/src/versions.txt +42 -0
  906. package/umd/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
  907. package/umd/index.umd.js +48038 -33148
  908. package/umd/index.umd.js.map +1 -1
  909. package/umd/scripts/find-fresh-emoji-tags/find-fresh-emoji-tags.d.ts +1 -1
  910. package/umd/scripts/find-refactor-candidates/find-refactor-candidates.d.ts +2 -0
  911. package/umd/scripts/find-refactor-candidates/resolveRefactorCandidateProject.d.ts +3 -1
  912. package/umd/scripts/run-agent-messages/git/commitAgentProjectChanges.d.ts +15 -0
  913. package/umd/scripts/run-agent-messages/git/commitAnsweredMessageProjectChanges.d.ts +24 -0
  914. package/umd/scripts/run-agent-messages/git/ensureAgentProjectGitRepository.d.ts +20 -0
  915. package/umd/scripts/run-agent-messages/git/readAgentProjectCommitChange.d.ts +11 -0
  916. package/umd/scripts/run-agent-messages/git/runAgentProjectGitCommand.d.ts +29 -0
  917. package/umd/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
  918. package/umd/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
  919. package/umd/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
  920. package/umd/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
  921. package/umd/scripts/run-agent-messages/messages/createAgentRunnerSystemMessage.d.ts +2 -1
  922. package/umd/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
  923. package/umd/scripts/run-agent-messages/messages/listAgentProjectDirectoryNames.d.ts +7 -0
  924. package/umd/scripts/run-agent-messages/messages/loadAgentPlannedMessagesSidecar.d.ts +10 -0
  925. package/umd/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
  926. package/umd/scripts/run-agent-messages/messages/resolveAnsweredMessageTouches.d.ts +29 -0
  927. package/umd/scripts/run-codex-prompts/checks/CheckBeforeMode.d.ts +20 -0
  928. package/umd/scripts/run-codex-prompts/checks/CoderCheckExecutionError.d.ts +6 -0
  929. package/umd/scripts/run-codex-prompts/checks/CoderCheckFailedError.d.ts +6 -0
  930. package/umd/scripts/run-codex-prompts/checks/buildCheckBeforeScriptPath.d.ts +2 -0
  931. package/umd/scripts/run-codex-prompts/checks/checkRepairInstructions.d.ts +4 -0
  932. package/umd/scripts/run-codex-prompts/checks/createCheckBeforeRepairPrompt.d.ts +11 -0
  933. package/umd/scripts/run-codex-prompts/checks/limitCheckOutput.d.ts +4 -0
  934. package/umd/scripts/run-codex-prompts/checks/projectCheck.d.ts +26 -0
  935. package/umd/scripts/run-codex-prompts/checks/projectScriptReferences.d.ts +7 -0
  936. package/umd/scripts/run-codex-prompts/checks/runCheckBefore.d.ts +31 -0
  937. package/umd/scripts/run-codex-prompts/checks/runCoderCheck.d.ts +17 -0
  938. package/umd/scripts/run-codex-prompts/checks/runCoderCheckRepair.d.ts +40 -0
  939. package/umd/scripts/run-codex-prompts/checks/runPromptCheckCommand.d.ts +16 -0
  940. package/umd/scripts/run-codex-prompts/{testing/runPromptWithTestFeedback.d.ts → checks/runPromptWithCheckFeedback.d.ts} +14 -9
  941. package/umd/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +54 -0
  942. package/umd/scripts/run-codex-prompts/common/applyCoderRunControlKey.d.ts +14 -0
  943. package/umd/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +7 -0
  944. package/umd/scripts/run-codex-prompts/common/createFreeDiskSpaceGuard.d.ts +28 -0
  945. package/umd/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
  946. package/umd/scripts/run-codex-prompts/common/formatUnknownErrorDetails.d.ts +4 -0
  947. package/umd/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +18 -0
  948. package/umd/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
  949. package/umd/scripts/run-codex-prompts/common/resolveCoderAgent.d.ts +44 -5
  950. package/umd/scripts/run-codex-prompts/common/resolveCoderContext.d.ts +1 -1
  951. package/umd/scripts/run-codex-prompts/common/resolveCoderProjectContext.d.ts +19 -0
  952. package/umd/scripts/run-codex-prompts/common/resolveInlineOrFileText.d.ts +2 -0
  953. package/umd/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +29 -0
  954. package/umd/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
  955. package/umd/scripts/run-codex-prompts/common/runGoScript/buildCoderExecutionArtifactPaths.d.ts +2 -0
  956. package/umd/scripts/run-codex-prompts/common/runGoScript/captureLiveScriptOutput.d.ts +9 -0
  957. package/umd/scripts/run-codex-prompts/common/runGoScript/createScriptOutputLineReader.d.ts +26 -0
  958. package/umd/scripts/run-codex-prompts/common/runGoScript/quoteBashArgument.d.ts +2 -0
  959. package/umd/scripts/run-codex-prompts/common/runGoScript/resolveShellHereDocumentDelimiter.d.ts +2 -0
  960. package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +7 -1
  961. package/umd/scripts/run-codex-prompts/common/sleepWithCountdown.d.ts +2 -0
  962. package/umd/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
  963. package/umd/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +16 -0
  964. package/umd/scripts/run-codex-prompts/common/withCoderWorkspaceLock.d.ts +9 -0
  965. package/umd/scripts/run-codex-prompts/git/CoderGitOperationError.d.ts +9 -0
  966. package/umd/scripts/run-codex-prompts/git/CoderPhasePersistence.d.ts +105 -0
  967. package/umd/scripts/run-codex-prompts/git/CoderPhaseRecovery.d.ts +43 -0
  968. package/umd/scripts/run-codex-prompts/git/buildCoderCheckCommitMessage.d.ts +11 -0
  969. package/umd/scripts/run-codex-prompts/git/coderCommitScope.d.ts +47 -0
  970. package/umd/scripts/run-codex-prompts/git/coderFinalizationFiles.d.ts +14 -0
  971. package/umd/scripts/run-codex-prompts/git/coderGitSync.d.ts +20 -2
  972. package/umd/scripts/run-codex-prompts/git/coderIndexLease.d.ts +11 -0
  973. package/umd/scripts/run-codex-prompts/git/coderRepositoryFiles.d.ts +6 -0
  974. package/umd/scripts/run-codex-prompts/git/coderRepositorySnapshot.d.ts +62 -0
  975. package/umd/scripts/run-codex-prompts/git/coderRepositoryView.d.ts +30 -0
  976. package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +43 -4
  977. package/umd/scripts/run-codex-prompts/git/commitInitializedAgentBooks.d.ts +6 -0
  978. package/umd/scripts/run-codex-prompts/git/ensureWorkingTreeClean.d.ts +1 -1
  979. package/umd/scripts/run-codex-prompts/git/gitLongPathsSupport.d.ts +1 -1
  980. package/umd/scripts/run-codex-prompts/git/pullLatestChanges.d.ts +3 -1
  981. package/umd/scripts/run-codex-prompts/git/quoteGitArgument.d.ts +5 -0
  982. package/umd/scripts/run-codex-prompts/git/runGitCommand.d.ts +4 -0
  983. package/umd/scripts/run-codex-prompts/git/runWorkspaceGitWithIndexReadRetry.d.ts +7 -0
  984. package/umd/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
  985. package/umd/scripts/run-codex-prompts/isolation/coderIsolationArtifacts.d.ts +16 -0
  986. package/umd/scripts/run-codex-prompts/isolation/coderIsolationIgnoredFiles.d.ts +18 -0
  987. package/umd/scripts/run-codex-prompts/isolation/copyCoderIsolationEnvironment.d.ts +1 -1
  988. package/umd/scripts/run-codex-prompts/isolation/createCoderIsolationWorktree.d.ts +3 -2
  989. package/umd/scripts/run-codex-prompts/isolation/mapProjectReferenceToWorktree.d.ts +5 -0
  990. package/umd/scripts/run-codex-prompts/isolation/mergeCoderIsolationWorktree.d.ts +5 -5
  991. package/umd/scripts/run-codex-prompts/isolation/preserveCoderIsolationRecovery.d.ts +3 -0
  992. package/umd/scripts/run-codex-prompts/isolation/runIsolatedPromptRound.d.ts +2 -2
  993. package/umd/scripts/run-codex-prompts/main/findUnwrittenPrompts.d.ts +2 -0
  994. package/umd/scripts/run-codex-prompts/main/listCoderPrompts.d.ts +22 -0
  995. package/umd/scripts/run-codex-prompts/main/prepareCoderPromptExecution.d.ts +18 -0
  996. package/umd/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +16 -8
  997. package/umd/scripts/run-codex-prompts/main/runCoderFix.d.ts +24 -0
  998. package/umd/scripts/run-codex-prompts/main/runPromptRound.d.ts +16 -6
  999. package/umd/scripts/run-codex-prompts/ping/pingCoderHarnessPeriodically.d.ts +22 -0
  1000. package/umd/scripts/run-codex-prompts/prompts/buildPromptLabel.d.ts +6 -0
  1001. package/umd/scripts/run-codex-prompts/prompts/buildPromptLabelForDisplay.d.ts +1 -1
  1002. package/umd/scripts/run-codex-prompts/prompts/buildPromptRunTraceContent.d.ts +70 -0
  1003. package/umd/scripts/run-codex-prompts/prompts/buildPromptRunTracePath.d.ts +10 -0
  1004. package/umd/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +9 -13
  1005. package/umd/scripts/run-codex-prompts/prompts/findFirstNonEmptyLineIndex.d.ts +6 -0
  1006. package/umd/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +2 -2
  1007. package/umd/scripts/run-codex-prompts/prompts/formatRunnerSignature.d.ts +14 -1
  1008. package/umd/scripts/run-codex-prompts/prompts/isPromptCompatibleWithRunner.d.ts +11 -6
  1009. package/umd/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
  1010. package/umd/scripts/run-codex-prompts/prompts/listUpcomingTasks.d.ts +1 -1
  1011. package/umd/scripts/run-codex-prompts/prompts/loadPromptFiles.d.ts +10 -2
  1012. package/umd/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
  1013. package/umd/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +28 -1
  1014. package/umd/scripts/run-codex-prompts/prompts/printPromptsToBeWritten.d.ts +1 -1
  1015. package/umd/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +30 -0
  1016. package/umd/scripts/run-codex-prompts/prompts/refreshPromptSelection.d.ts +6 -0
  1017. package/umd/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
  1018. package/umd/scripts/run-codex-prompts/prompts/writePromptErrorLog.d.ts +4 -0
  1019. package/umd/scripts/run-codex-prompts/prompts/writePromptFile.d.ts +2 -0
  1020. package/umd/scripts/run-codex-prompts/prompts/writePromptRunTrace.d.ts +21 -0
  1021. package/umd/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +3 -2
  1022. package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +27 -0
  1023. package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +3 -0
  1024. package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeSubscriptionUsage.d.ts +11 -0
  1025. package/umd/scripts/run-codex-prompts/runners/cline/ClineRunner.d.ts +2 -0
  1026. package/umd/scripts/run-codex-prompts/runners/common/buildHarnessAuthenticationError.d.ts +20 -0
  1027. package/umd/scripts/run-codex-prompts/runners/common/createAuthenticationAwarePromptRunner.d.ts +11 -0
  1028. package/umd/scripts/run-codex-prompts/runners/common/estimateUsageFromTextLength.d.ts +33 -0
  1029. package/umd/scripts/run-codex-prompts/runners/common/extractHarnessAuthenticationFailureReason.d.ts +9 -0
  1030. package/umd/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
  1031. package/umd/scripts/run-codex-prompts/runners/gemini/GeminiRunner.d.ts +3 -1
  1032. package/umd/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
  1033. package/umd/scripts/run-codex-prompts/runners/github-copilot/GitHubCopilotRunner.d.ts +2 -0
  1034. package/umd/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +10 -0
  1035. package/umd/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
  1036. package/umd/scripts/run-codex-prompts/runners/openai-codex/getCodexSubscriptionUsage.d.ts +19 -0
  1037. package/umd/scripts/run-codex-prompts/runners/opencode/OpencodeRunner.d.ts +2 -0
  1038. package/umd/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +25 -0
  1039. package/umd/scripts/run-codex-prompts/runners/qwen-code/buildQwenCodeScript.d.ts +8 -0
  1040. package/umd/scripts/run-codex-prompts/runners/qwen-code/parseQwenCodeUsageFromOutput.d.ts +9 -0
  1041. package/umd/scripts/run-codex-prompts/runners/qwen-code/qwen-code-pricing.d.ts +30 -0
  1042. package/umd/scripts/run-codex-prompts/runners/types/HarnessSubscriptionUsage.d.ts +43 -0
  1043. package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +3 -1
  1044. package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
  1045. package/umd/scripts/run-codex-prompts/server/runCoderHttpServer.d.ts +3 -0
  1046. package/umd/scripts/run-codex-prompts/team/CoderTeamRuntime.d.ts +87 -0
  1047. package/umd/scripts/run-codex-prompts/team/coderTeamProtocol.d.ts +6 -0
  1048. package/umd/scripts/run-codex-prompts/team/compileCoderTeamAgent.d.ts +4 -0
  1049. package/umd/scripts/run-codex-prompts/team/createCoderTeamPromptRunner.d.ts +9 -0
  1050. package/umd/scripts/run-codex-prompts/team/startCoderTeamBridge.d.ts +14 -0
  1051. package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +39 -4
  1052. package/umd/scripts/run-codex-prompts/ui/buildCoderCheckRepairUiFrame.d.ts +3 -0
  1053. package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
  1054. package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +17 -1
  1055. package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
  1056. package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiViewport.d.ts +5 -0
  1057. package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +15 -1
  1058. package/umd/scripts/run-codex-prompts/ui/buildSubscriptionUsageSessionRows.d.ts +11 -0
  1059. package/umd/scripts/run-codex-prompts/ui/coderRunUiText.d.ts +4 -0
  1060. package/umd/scripts/run-codex-prompts/ui/output/CoderOutputEvent.d.ts +20 -0
  1061. package/umd/scripts/run-codex-prompts/ui/output/CoderRunOutput.d.ts +48 -0
  1062. package/umd/scripts/run-codex-prompts/ui/output/buildCoderOutputLines.d.ts +18 -0
  1063. package/umd/scripts/run-codex-prompts/ui/output/normalizeCoderOutputRecord.d.ts +10 -0
  1064. package/umd/scripts/run-codex-prompts/ui/refreshCoderRunUiSubscriptionUsage.d.ts +14 -0
  1065. package/umd/scripts/run-codex-prompts/ui/renderCoderRunUi.d.ts +4 -0
  1066. package/umd/scripts/run-codex-prompts/ui/startCoderRunUiSubscriptionUsageRefresh.d.ts +37 -0
  1067. package/umd/scripts/utils/emojiTags/scanEmojiTagUsage.d.ts +2 -0
  1068. package/umd/scripts/utils/emojiTags/validSinglePictogramEmojis.d.ts +17 -0
  1069. package/umd/scripts/utils/prompts/isPromptDocumentationFile.d.ts +5 -0
  1070. package/umd/scripts/utils/prompts/promptEmojiTags.d.ts +2 -0
  1071. package/umd/scripts/verify-prompts/verify-prompts.d.ts +3 -0
  1072. package/umd/src/_packages/components.index.d.ts +4 -0
  1073. package/umd/src/_packages/types.index.d.ts +4 -0
  1074. package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  1075. package/umd/src/avatars/renderAvatarVisualTerminalText.test.d.ts +1 -0
  1076. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  1077. package/umd/src/book-2.0/agent-source/AgentReferenceResolutionIssue.d.ts +45 -0
  1078. package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
  1079. package/umd/src/book-2.0/agent-source/CreateAgentModelRequirementsOptions.d.ts +2 -0
  1080. package/umd/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  1081. package/umd/src/book-2.0/agent-source/createAgentModelRequirements.deduplication.test.d.ts +1 -0
  1082. package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts +1 -0
  1083. package/umd/src/book-2.0/agent-source/deduplicateSystemMessage.d.ts +14 -0
  1084. package/umd/src/book-2.0/agent-source/deduplicateSystemMessage.test.d.ts +1 -0
  1085. package/umd/src/book-2.0/agent-source/explicitFromCommitment.d.ts +62 -0
  1086. package/umd/src/book-2.0/agent-source/extractAgentReferenceTokens.d.ts +32 -0
  1087. package/umd/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  1088. package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
  1089. package/umd/src/book-2.0/agent-source/resolveInheritedAgentSource.d.ts +73 -0
  1090. package/umd/src/book-2.0/book-language-documentation/getSafeCodeBlock.d.ts +1 -1
  1091. package/umd/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  1092. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  1093. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
  1094. package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  1095. package/umd/src/book-3.0/cliAgentEnv.d.ts +3 -3
  1096. package/umd/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  1097. package/umd/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  1098. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  1099. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  1100. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
  1101. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  1102. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
  1103. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  1104. package/umd/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  1105. package/umd/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  1106. package/umd/src/book-components/Chat/MockedChat/MockedChat.test.d.ts +2 -0
  1107. package/umd/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  1108. package/umd/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
  1109. package/umd/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  1110. package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  1111. package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  1112. package/umd/src/cli/$initializePromptbookCliProgram.d.ts +8 -0
  1113. package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.d.ts +10 -0
  1114. package/umd/src/cli/cli-commands/coder/$ensureCoderHarnessGitignoreRules.test.d.ts +1 -0
  1115. package/umd/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  1116. package/umd/src/cli/cli-commands/coder/add.d.ts +22 -1
  1117. package/umd/src/cli/cli-commands/coder/agentCliOptions.d.ts +27 -0
  1118. package/umd/src/cli/cli-commands/coder/augmentCoderAgentTeam.d.ts +7 -0
  1119. package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +1 -1
  1120. package/umd/src/cli/cli-commands/coder/boilerplateTemplates.d.ts +8 -21
  1121. package/umd/src/cli/cli-commands/coder/coderAgentRole.d.ts +21 -0
  1122. package/umd/src/cli/cli-commands/coder/coderReferencedArtifacts.d.ts +34 -0
  1123. package/umd/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.d.ts +8 -0
  1124. package/umd/src/cli/cli-commands/coder/ensureCoderDefaultAgentFiles.test.d.ts +1 -0
  1125. package/umd/src/cli/cli-commands/coder/ensureCoderGitattributesFile.d.ts +13 -0
  1126. package/umd/src/cli/cli-commands/coder/ensureCoderGitignoreFile.d.ts +14 -1
  1127. package/umd/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.d.ts +5 -2
  1128. package/umd/src/cli/cli-commands/coder/ensureCoderPackageJsonFile.test.d.ts +1 -0
  1129. package/umd/src/cli/cli-commands/coder/ensureCoderRoleAgentFile.d.ts +12 -0
  1130. package/umd/src/cli/cli-commands/coder/ensureCoderVscodeSettingsFile.d.ts +2 -0
  1131. package/umd/src/cli/cli-commands/coder/ensureDirectory.d.ts +6 -0
  1132. package/umd/src/cli/cli-commands/coder/findLegacyCoderCheckCallers.d.ts +5 -0
  1133. package/umd/src/cli/cli-commands/coder/fix.d.ts +7 -0
  1134. package/umd/src/cli/cli-commands/coder/fix.test.d.ts +1 -0
  1135. package/umd/src/cli/cli-commands/coder/fixWorkflow.test.d.ts +1 -0
  1136. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +2 -2
  1137. package/umd/src/cli/cli-commands/coder/getCoderInitializationCommitPaths.d.ts +9 -0
  1138. package/umd/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.d.ts +6 -0
  1139. package/umd/src/cli/cli-commands/coder/init.test.d.ts +1 -0
  1140. package/umd/src/cli/cli-commands/coder/initializeCoderProjectConfiguration.d.ts +18 -6
  1141. package/umd/src/cli/cli-commands/coder/list.d.ts +10 -0
  1142. package/umd/src/cli/cli-commands/coder/list.test.d.ts +1 -0
  1143. package/umd/src/cli/cli-commands/coder/mergeStringRecordJsonFile.d.ts +21 -1
  1144. package/umd/src/cli/cli-commands/coder/plan.d.ts +7 -0
  1145. package/umd/src/cli/cli-commands/coder/planning/assertPlanningCommitSafe.d.ts +6 -0
  1146. package/umd/src/cli/cli-commands/coder/planning/assertPlanningPrdCommitScope.d.ts +7 -0
  1147. package/umd/src/cli/cli-commands/coder/planning/assertPlanningRuntimePath.d.ts +6 -0
  1148. package/umd/src/cli/cli-commands/coder/planning/createPlanningTerminal.d.ts +8 -0
  1149. package/umd/src/cli/cli-commands/coder/planning/createPlanningTerminal.test.d.ts +1 -0
  1150. package/umd/src/cli/cli-commands/coder/planning/createPlanningWorkspace.d.ts +11 -0
  1151. package/umd/src/cli/cli-commands/coder/planning/discussPlanningTurn.d.ts +15 -0
  1152. package/umd/src/cli/cli-commands/coder/planning/fixtures/snapshotPlanningProject.d.ts +5 -0
  1153. package/umd/src/cli/cli-commands/coder/planning/planningGitSync.test.d.ts +1 -0
  1154. package/umd/src/cli/cli-commands/coder/planning/planningPackagedCli.test.d.ts +1 -0
  1155. package/umd/src/cli/cli-commands/coder/planning/planningProtocol.d.ts +152 -0
  1156. package/umd/src/cli/cli-commands/coder/planning/planningTeam.test.d.ts +1 -0
  1157. package/umd/src/cli/cli-commands/coder/planning/preparePlanningChanges.d.ts +16 -0
  1158. package/umd/src/cli/cli-commands/coder/planning/readPlanningContext.d.ts +6 -0
  1159. package/umd/src/cli/cli-commands/coder/planning/resolvePlanningPath.d.ts +7 -0
  1160. package/umd/src/cli/cli-commands/coder/planning/runPlanningHarness.d.ts +30 -0
  1161. package/umd/src/cli/cli-commands/coder/planning/runPlanningHarness.test.d.ts +1 -0
  1162. package/umd/src/cli/cli-commands/coder/planning/runPlanningSession.d.ts +24 -0
  1163. package/umd/src/cli/cli-commands/coder/planning/runPlanningSession.test.d.ts +1 -0
  1164. package/umd/src/cli/cli-commands/coder/planning/savePlanningChanges.d.ts +7 -0
  1165. package/umd/src/cli/cli-commands/coder/prepareCoderPackageJsonScripts.d.ts +12 -0
  1166. package/umd/src/cli/cli-commands/coder/printCoderRunFailure.d.ts +6 -0
  1167. package/umd/src/cli/cli-commands/coder/printInitializationSummary.d.ts +2 -1
  1168. package/umd/src/cli/cli-commands/coder/promptsReadmeTemplate.d.ts +13 -0
  1169. package/umd/src/cli/cli-commands/coder/promptsReadmeTemplate.test.d.ts +1 -0
  1170. package/umd/src/cli/cli-commands/coder/readCoderAgentBook.d.ts +8 -0
  1171. package/umd/src/cli/cli-commands/coder/server.test.d.ts +1 -0
  1172. package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  1173. package/umd/src/cli/cli-commands/coder/workspacePreflight.test.d.ts +1 -0
  1174. package/umd/src/cli/cli-commands/coder.d.ts +3 -0
  1175. package/umd/src/cli/cli-commands/common/$askForConfirmation.d.ts +11 -0
  1176. package/umd/src/cli/cli-commands/common/$askForConfirmation.test.d.ts +1 -0
  1177. package/umd/src/cli/cli-commands/common/LocalAgentBookCollection.d.ts +48 -0
  1178. package/umd/src/cli/cli-commands/common/coderCheckCliOptions.d.ts +21 -0
  1179. package/umd/src/cli/cli-commands/common/coderCheckCliOptions.test.d.ts +1 -0
  1180. package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +1 -1
  1181. package/umd/src/cli/cli-commands/common/createLocalAgentReferenceResolver.d.ts +8 -0
  1182. package/umd/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.d.ts +12 -0
  1183. package/umd/src/cli/cli-commands/common/disk-space/$assertSufficientFreeDiskSpace.test.d.ts +1 -0
  1184. package/umd/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.d.ts +11 -0
  1185. package/umd/src/cli/cli-commands/common/disk-space/$readFreeDiskSpaceStatus.test.d.ts +1 -0
  1186. package/umd/src/cli/cli-commands/common/disk-space/FreeDiskSpaceStatus.d.ts +33 -0
  1187. package/umd/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.d.ts +6 -0
  1188. package/umd/src/cli/cli-commands/common/disk-space/formatFreeDiskSpaceBytes.test.d.ts +1 -0
  1189. package/umd/src/cli/cli-commands/common/disk-space/formatLowFreeDiskSpaceWarning.d.ts +10 -0
  1190. package/umd/src/cli/cli-commands/common/disk-space/freeDiskSpaceConstants.d.ts +28 -0
  1191. package/umd/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.d.ts +7 -0
  1192. package/umd/src/cli/cli-commands/common/disk-space/resolveFreeDiskSpaceLevel.test.d.ts +1 -0
  1193. package/umd/src/cli/cli-commands/common/ensureAdamAgentBook.d.ts +12 -0
  1194. package/umd/src/cli/cli-commands/common/ensureProjectTextFile.d.ts +7 -0
  1195. package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +3 -2
  1196. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  1197. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
  1198. package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +6 -3
  1199. package/umd/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
  1200. package/umd/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
  1201. package/umd/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
  1202. package/umd/src/cli/cli-commands/common/harness/HARNESS_DEFAULT_MODELS.d.ts +25 -0
  1203. package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +62 -0
  1204. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
  1205. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
  1206. package/umd/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
  1207. package/umd/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
  1208. package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
  1209. package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
  1210. package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
  1211. package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
  1212. package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
  1213. package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
  1214. package/umd/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts +11 -0
  1215. package/umd/src/cli/cli-commands/common/{harness/$resolveLatestHarnessVersion.d.ts → npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  1216. package/umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
  1217. package/umd/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
  1218. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  1219. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
  1220. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  1221. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
  1222. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  1223. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
  1224. package/umd/src/cli/cli-commands/common/projectCliOptions.d.ts +30 -0
  1225. package/umd/src/cli/cli-commands/common/projectCliOptions.test.d.ts +1 -0
  1226. package/umd/src/cli/cli-commands/common/projectInitialization.d.ts +6 -0
  1227. package/umd/src/cli/cli-commands/common/promptPriorityCliOptions.d.ts +7 -0
  1228. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
  1229. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  1230. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
  1231. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +15 -0
  1232. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
  1233. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  1234. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
  1235. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  1236. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
  1237. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  1238. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  1239. package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  1240. package/umd/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  1241. package/umd/src/cli/cli-commands/common/questionsCliOptions.d.ts +45 -0
  1242. package/umd/src/cli/cli-commands/common/questionsCliOptions.test.d.ts +1 -0
  1243. package/umd/src/cli/cli-commands/common/resolveBundledAgentBookPath.d.ts +6 -0
  1244. package/umd/src/cli/cli-commands/common/resolveLocalAgentSource.d.ts +26 -0
  1245. package/umd/src/cli/cli-commands/common/validateCoderRunOptions.d.ts +6 -0
  1246. package/umd/src/cli/cli-commands/common/workspaceRepository.d.ts +48 -0
  1247. package/umd/src/cli/cli-commands/common/workspaceRepository.test.d.ts +1 -0
  1248. package/umd/src/cli/cli-commands/common/workspaceRepositoryCliOptions.d.ts +11 -0
  1249. package/umd/src/cli/common/$deprecateCliCommand.d.ts +3 -0
  1250. package/umd/src/cli/common/$hideCliCommandFromHelp.d.ts +11 -0
  1251. package/umd/src/cli/common/$hideCliCommandFromHelp.test.d.ts +1 -0
  1252. package/umd/src/cli/common/$requireCliSubcommand.d.ts +18 -0
  1253. package/umd/src/cli/common/$requireCliSubcommand.test.d.ts +1 -0
  1254. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  1255. package/umd/src/commitments/TEAM/TEAM.test.d.ts +1 -0
  1256. package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
  1257. package/umd/src/commitments/index.d.ts +1 -1
  1258. package/umd/src/conversion/archive/loadJsZipModule.d.ts +10 -0
  1259. package/umd/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  1260. package/umd/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
  1261. package/umd/src/llm-providers/vercel/VercelExecutionToolsOptions.d.ts +5 -2
  1262. package/umd/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  1263. package/umd/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  1264. package/umd/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  1265. package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  1266. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  1267. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
  1268. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  1269. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
  1270. package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  1271. package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  1272. package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  1273. package/umd/src/utils/files/findFilesByGlob.d.ts +28 -0
  1274. package/umd/src/utils/misc/debounce.d.ts +4 -2
  1275. package/umd/src/utils/misc/debounce.test.d.ts +1 -0
  1276. package/umd/src/utils/misc/emojis.d.ts +3 -2
  1277. package/umd/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
  1278. package/umd/src/version.d.ts +1 -1
  1279. package/apps/agents-server/scripts/ignore-kill-eperm.js +0 -31
  1280. package/apps/agents-server/src/app/admin/task-manager/TaskManagerScopeTabs.tsx +0 -74
  1281. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/actions/route.ts +0 -103
  1282. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsClient.tsx +0 -43
  1283. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsEditDialog.tsx +0 -98
  1284. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsFiltersCard.tsx +0 -75
  1285. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsHeader.tsx +0 -53
  1286. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsSummaryMetrics.tsx +0 -70
  1287. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableCard.tsx +0 -58
  1288. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableRow.tsx +0 -242
  1289. package/apps/agents-server/src/app/agents/[agentName]/timeouts/loading.tsx +0 -15
  1290. package/apps/agents-server/src/app/agents/[agentName]/timeouts/page.tsx +0 -28
  1291. package/apps/agents-server/src/app/agents/[agentName]/timeouts/useAgentTimeoutsClientState.ts +0 -769
  1292. package/apps/agents-server/src/components/AgentProjectDnsInstructions/AgentProjectDnsInstructions.tsx +0 -182
  1293. package/apps/agents-server/src/utils/userChatClient/runAgentUserTimeoutBulkAction.ts +0 -24
  1294. package/apps/agents-server/src/utils/userChatClient/updateAgentUserTimeout.ts +0 -25
  1295. package/esm/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +0 -69
  1296. package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +0 -7
  1297. package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +0 -30
  1298. package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +0 -76
  1299. package/esm/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +0 -4
  1300. package/esm/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +0 -28
  1301. package/esm/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +0 -110
  1302. package/esm/scripts/find-fresh-emoji-tags/utils/emojis.d.ts +0 -16
  1303. package/esm/scripts/run-codex-prompts/testing/TestBeforeMode.d.ts +0 -16
  1304. package/esm/scripts/run-codex-prompts/testing/createTestBeforeRepairPrompt.d.ts +0 -9
  1305. package/esm/scripts/run-codex-prompts/testing/limitTestOutput.d.ts +0 -4
  1306. package/esm/scripts/run-codex-prompts/testing/runPromptTestCommand.d.ts +0 -14
  1307. package/esm/scripts/run-codex-prompts/testing/runTestBefore.d.ts +0 -24
  1308. package/esm/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
  1309. package/esm/src/cli/cli-commands/coder/agentCodingFile.d.ts +0 -13
  1310. package/esm/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +0 -9
  1311. package/esm/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
  1312. package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  1313. package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  1314. package/src/cli/cli-commands/coder/agentCodingFile.ts +0 -25
  1315. package/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.ts +0 -31
  1316. package/src/cli/cli-commands/common/harness/$installHarness.ts +0 -56
  1317. package/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.ts +0 -34
  1318. package/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.ts +0 -28
  1319. package/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.ts +0 -39
  1320. package/umd/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +0 -69
  1321. package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +0 -7
  1322. package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +0 -30
  1323. package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +0 -76
  1324. package/umd/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +0 -4
  1325. package/umd/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +0 -28
  1326. package/umd/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +0 -110
  1327. package/umd/scripts/find-fresh-emoji-tags/utils/emojis.d.ts +0 -16
  1328. package/umd/scripts/run-codex-prompts/testing/TestBeforeMode.d.ts +0 -16
  1329. package/umd/scripts/run-codex-prompts/testing/createTestBeforeRepairPrompt.d.ts +0 -9
  1330. package/umd/scripts/run-codex-prompts/testing/limitTestOutput.d.ts +0 -4
  1331. package/umd/scripts/run-codex-prompts/testing/runPromptTestCommand.d.ts +0 -14
  1332. package/umd/scripts/run-codex-prompts/testing/runTestBefore.d.ts +0 -24
  1333. package/umd/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
  1334. package/umd/src/cli/cli-commands/coder/agentCodingFile.d.ts +0 -13
  1335. package/umd/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts +0 -9
  1336. package/umd/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
  1337. package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  1338. package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  1339. /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
  1340. /package/esm/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.deduplication.test.d.ts} +0 -0
  1341. /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
  1342. /package/{umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → esm/src/book-2.0/agent-source/deduplicateSystemMessage.test.d.ts} +0 -0
@@ -1,8 +1,10 @@
1
+ import type { WorkspaceRepositoryContext } from '../common/workspaceRepository';
1
2
  import colors from 'colors';
2
- import { AGENT_CODING_FILE_PATH } from './agentCodingFile';
3
- import { AGENTS_FILE_PATH } from './agentsFile';
3
+ import { ADAM_AGENT_BOOK_RELATIVE_PATH } from '../common/ensureAdamAgentBook';
4
+ import { CODER_AGENTS_DIRECTORY_PATH } from './ensureCoderDeveloperAgentFile';
5
+ import { CODER_GITATTRIBUTES_FILE_PATH } from './ensureCoderGitattributesFile';
4
6
  import type { InitializationStatus } from './boilerplateTemplates';
5
- import { CODER_DEVELOPER_AGENT_FILE_PATH } from './ensureCoderDeveloperAgentFile';
7
+ import type { CoderReferencedArtifactStatus } from './coderReferencedArtifacts';
6
8
  import { formatDisplayPath } from './formatDisplayPath';
7
9
  import type { CoderInitializationSummary } from './initializeCoderProjectConfiguration';
8
10
 
@@ -11,39 +13,65 @@ import type { CoderInitializationSummary } from './initializeCoderProjectConfigu
11
13
  *
12
14
  * @private function of `coder init` command
13
15
  */
14
- export function printInitializationSummary(summary: CoderInitializationSummary): void {
15
- console.info(colors.green('Promptbook coder configuration initialized.'));
16
+ export function printInitializationSummary(
17
+ summary: CoderInitializationSummary,
18
+ workspace?: WorkspaceRepositoryContext,
19
+ ): void {
20
+ const isUnresolved =
21
+ summary.adamAgentFileStatus === 'unresolved' ||
22
+ !summary.isCheckConfigured ||
23
+ summary.migrationInstructions.length > 0 ||
24
+ summary.referencedArtifactStatuses.some(({ status }) => status === 'unresolved');
25
+ console.info(
26
+ isUnresolved
27
+ ? colors.yellow('Promptbook coder configuration setup: additional setup is required.')
28
+ : colors.green('Promptbook coder configuration setup:'),
29
+ );
30
+ if (workspace)
31
+ console.info(colors.gray(`✔ Git repository: ${workspace.repositoryStatus} (${workspace.repositoryRoot})`));
16
32
  printInitializationStatusLine('prompts/', summary.promptsDirectoryStatus);
33
+ printInitializationStatusLine('prompts/README.md', summary.promptsReadmeFileStatus);
17
34
  printInitializationStatusLine('prompts/done/', summary.promptsDoneDirectoryStatus);
18
35
  printInitializationStatusLine('prompts/templates/', summary.promptsTemplatesDirectoryStatus);
19
-
20
- for (const templateFileStatus of summary.promptTemplateFileStatuses) {
21
- printInitializationStatusLine(
22
- formatDisplayPath(templateFileStatus.relativeFilePath),
23
- templateFileStatus.status,
24
- );
25
- }
26
-
27
36
  printInitializationStatusLine('agents/', summary.agentsDirectoryStatus);
28
- printInitializationStatusLine(CODER_DEVELOPER_AGENT_FILE_PATH, summary.developerAgentFileStatus);
29
- printInitializationStatusLine(AGENTS_FILE_PATH, summary.agentsFileStatus);
30
- printInitializationStatusLine(AGENT_CODING_FILE_PATH, summary.agentCodingFileStatus);
37
+ printInitializationStatusLine(
38
+ `${CODER_AGENTS_DIRECTORY_PATH}/${ADAM_AGENT_BOOK_RELATIVE_PATH}`,
39
+ summary.adamAgentFileStatus,
40
+ summary.adamAgentFileDiagnostic,
41
+ );
31
42
  printInitializationStatusLine('.env', summary.envFileStatus);
32
43
  printInitializationStatusLine('.gitignore', summary.gitignoreFileStatus);
44
+ printInitializationStatusLine(CODER_GITATTRIBUTES_FILE_PATH, summary.gitattributesFileStatus);
33
45
  printInitializationStatusLine('package.json', summary.packageJsonFileStatus);
34
46
  printInitializationStatusLine('.vscode/settings.json', summary.vscodeSettingsFileStatus);
35
47
 
48
+ for (const referencedArtifactStatus of summary.referencedArtifactStatuses) {
49
+ printInitializationStatusLine(
50
+ formatDisplayPath(referencedArtifactStatus.relativeFilePath),
51
+ referencedArtifactStatus.status,
52
+ referencedArtifactStatus.diagnostic,
53
+ );
54
+ }
55
+
56
+ if (summary.addedPackageJsonScriptNames.length > 0) {
57
+ printInitializationNote(`Added npm scripts: ${summary.addedPackageJsonScriptNames.join(', ')}`, colors.cyan);
58
+ } else {
59
+ printInitializationNote('All Promptbook coder npm scripts are already present.', colors.gray);
60
+ }
61
+
36
62
  if (summary.initializedEnvVariableNames.length > 0) {
37
63
  printInitializationNote(`Added env variables: ${summary.initializedEnvVariableNames.join(', ')}`, colors.cyan);
38
64
  } else {
39
65
  printInitializationNote('Required coder env variables are already present.', colors.gray);
40
66
  }
67
+ console.info((summary.isCheckConfigured ? colors.cyan : colors.yellow)(summary.checkScriptSummary));
68
+ for (const instruction of summary.migrationInstructions) console.info(colors.yellow(`! ${instruction}`));
41
69
  }
42
70
 
43
71
  /**
44
72
  * Formats one initialization status into a human-readable label.
45
73
  */
46
- function formatInitializationStatus(status: InitializationStatus): string {
74
+ function formatInitializationStatus(status: InitializationStatus | CoderReferencedArtifactStatus): string {
47
75
  if (status === 'created') {
48
76
  return 'created';
49
77
  }
@@ -52,14 +80,28 @@ function formatInitializationStatus(status: InitializationStatus): string {
52
80
  return 'updated';
53
81
  }
54
82
 
83
+ if (status === 'augmented' || status === 'unresolved') return status;
84
+
85
+ if (status === 'not-referenced') {
86
+ return 'not referenced by the added scripts, kept as is';
87
+ }
88
+
55
89
  return 'unchanged';
56
90
  }
57
91
 
58
92
  /**
59
93
  * Prints one checked initialization-status line.
60
94
  */
61
- function printInitializationStatusLine(relativePath: string, status: InitializationStatus): void {
62
- console.info(colors.gray(`✔ ${relativePath}: ${formatInitializationStatus(status)}`));
95
+ function printInitializationStatusLine(
96
+ relativePath: string,
97
+ status: InitializationStatus | CoderReferencedArtifactStatus,
98
+ diagnostic?: string,
99
+ ): void {
100
+ const colorize = status === 'unresolved' ? colors.yellow : colors.gray;
101
+ console.info(
102
+ colorize(`${status === 'unresolved' ? '!' : '✔'} ${relativePath}: ${formatInitializationStatus(status)}`),
103
+ );
104
+ if (diagnostic) console.info(colorize(` ${diagnostic}`));
63
105
  }
64
106
 
65
107
  /**
@@ -0,0 +1,400 @@
1
+ import { join } from 'path';
2
+ import { spaceTrim } from 'spacetrim';
3
+ import { PROMPTS_DIRECTORY_PATH } from './boilerplateTemplates';
4
+
5
+ /**
6
+ * Project-relative location of the offline guide, reserved from prompt discovery.
7
+ *
8
+ * @private internal constant of `coder init`
9
+ */
10
+ export const PROMPTS_README_FILE_PATH = join(PROMPTS_DIRECTORY_PATH, 'README.md');
11
+
12
+ /**
13
+ * Maintained project-independent guide, bundled as text in the published CLI.
14
+ * Keep examples executable against the parser and command registry in the accompanying tests.
15
+ *
16
+ * @private internal template of `coder init`
17
+ */
18
+ export const PROMPTS_README_TEMPLATE = spaceTrim(`
19
+ # PRDs and the implementation queue
20
+
21
+ This directory holds version-controlled implementation specifications, often called **PRDs** (Product
22
+ Requirements Documents), and a work queue. A PRD describes an intended change: its presence does not mean the
23
+ feature already exists. Read the status, implementation evidence, and current code before relying on it.
24
+
25
+ The same Markdown can be implemented by a person or handed to another coding assistant. Promptbook Coder
26
+ automates selection, execution, checks, and status recording; it is not required to understand or use these
27
+ files. The manual workflow below needs only an editor, Git, and this project's normal development tools. No
28
+ Promptbook installation, account, or monorepo checkout is required.
29
+
30
+ ## What belongs here
31
+
32
+ The default layout, relative to the project root, is:
33
+
34
+ \`\`\`text
35
+ prompts/
36
+ README.md This guide, excluded from the queue
37
+ YYYY-MM-NNNN-short-title.md PRDs, including pending tasks and drafts
38
+ done/ Reviewed, archived task history
39
+ templates/
40
+ common.md Reusable authoring instructions
41
+ traces/ Execution traces, created when tasks run
42
+ \`\`\`
43
+
44
+ \`init\` creates the directory, \`done/\`, and \`templates/\`. New default npm scripts also initialize the
45
+ project-owned \`templates/common.md\`. Existing scripts and their custom template choices are preserved. A
46
+ fresh, empty directory receives numbered boilerplates with \`[-]\` and \`@@@\` placeholders; they need authoring
47
+ before use. Repeating init fills missing configuration and creates this README if missing, preserving an
48
+ existing README without appending to it. It does not replenish boilerplates in a nonempty directory.
49
+
50
+ Only Markdown files directly in \`prompts/\` enter the queue. \`README.md\` is excluded case-insensitively, even
51
+ if customized or filled with sample statuses. Subdirectories such as \`done/\`, \`templates/\`, and \`traces/\` are
52
+ not scanned for runnable tasks. A file containing the exact comment \`<!--ptbk-coder-ignore-->\` is also
53
+ excluded from queue loading.
54
+
55
+ - **Specifications:** top-level PRDs are the requirements and status of work. Commit them with the project
56
+ so reviewers can connect intent with code.
57
+ - **Templates:** reusable instructions, not tasks. Adapt \`templates/common.md\` to this repository's
58
+ conventions and actual check commands before copying it into new PRDs.
59
+ - **History:** \`done/\` holds archived PRDs. An archive records what was reviewed at the time; it does not
60
+ guarantee today's code still has that behavior.
61
+ - **Diagnostics:** \`traces/\` contains per-task Markdown run traces, with section suffixes for files
62
+ containing multiple tasks. Failures may also leave a neighboring \`.error.log\`; temporary harness logs may
63
+ be retained after failure or with \`--preserve-logs\`. Planning keeps runtime state under the project root's
64
+ \`.promptbook/\`. These artifacts explain what a run did, rather than specify new work. Inspect them before
65
+ sharing and follow the project's retention policy.
66
+
67
+ ## Names, titles, and sections
68
+
69
+ Coder-generated filenames use \`YYYY-MM-NNNN-short-title.md\`: year/month, a sequence starting at \`0000\` and
70
+ normally increasing by 10, and a descriptive slug. Number allocation also considers numbered Markdown files
71
+ below the directory, including archived PRDs, to avoid reusing their numbers. The number is a naming/order
72
+ convention, not a deadline, dependency, or priority. Handwritten names such as \`fix-search.md\` are valid; no
73
+ date prefix is required.
74
+
75
+ Put the status on the **first nonempty line of each task section**, then a blank line, a short title, and the
76
+ requirements. A leading title tag such as \`[✨🔎]\` is a searchable reference used to connect related work and
77
+ code. Generated tasks receive emoji tags; a tag is not a status or a scheduling rule. Headings and the wording
78
+ of titles are conventions, not required syntax. The runner removes the status line and a leading bracketed
79
+ title tag from the task text it sends for implementation.
80
+
81
+ One file can contain several independent, multiline task sections. A line whose trimmed content is exactly
82
+ \`---\` starts another section, each with its own status and priority. The parser splits on that line even
83
+ inside a code fence: avoid YAML front matter and decorative \`---\` rules in PRDs. Ordinary headings, lists, and
84
+ acceptance checkboxes inside a section do not create more tasks. Do not put a heading or a comment before the
85
+ section's status: an unmarked first line defaults to pending at priority zero.
86
+
87
+ Repository references supply context; they do not automatically include the referenced file's contents. Tell
88
+ the implementer what to inspect and why. Paths written as code, such as \`src/search/filterItems.ts\`, should be
89
+ identified as project-root-relative. Markdown links in a top-level PRD need \`../\` to reach that root, for
90
+ example \`[project instructions](../AGENTS.md)\`. Adapt links when moving files deeper into \`done/\` (often
91
+ \`../../\`), or retain explicit project-root-relative paths in the text.
92
+
93
+ ## A small PRD to adapt
94
+
95
+ Copy this block into a new file such as \`prompts/YYYY-MM-0010-trim-search-query.md\`, replacing the date/number
96
+ and every example path, command, and assumption with ones that exist in your repository. Read the referenced
97
+ code first. Keep \`[-]\` instead of \`[ ]\` while requirements or acceptance checks remain undecided. The sample
98
+ is illustrative, not a claim that this project contains these files.
99
+
100
+ \`\`\`markdown
101
+ [ ] !
102
+
103
+ [✨🔎] Ignore outer whitespace in the item search
104
+
105
+ ## Goal
106
+
107
+ People pasting a query should get the same results as people typing it.
108
+
109
+ ## Repository context
110
+
111
+ Paths below are relative to the project root:
112
+
113
+ - Read \`src/search/filterItems.ts\` for the current matching behavior.
114
+ - Extend \`src/search/filterItems.test.ts\` using its existing test style.
115
+ - Read \`AGENTS.md\` and the root \`README.md\` for development instructions.
116
+
117
+ ## Requirements
118
+
119
+ - Trim leading and trailing whitespace from the query before matching.
120
+ - An empty or whitespace-only query returns all items, as an empty query does today.
121
+ - Preserve internal spaces, case matching, result order, and the input array.
122
+
123
+ ## Scope
124
+
125
+ Change the search helper and its tests. Do not change the UI, dependencies, persistence, or unrelated matching
126
+ rules.
127
+
128
+ ## Acceptance criteria
129
+
130
+ - Add cases for an empty query, only spaces, and a padded matching query.
131
+ - Keep an existing case proving that internal spaces retain their meaning.
132
+ - Run \`npm test -- --runInBand src/search/filterItems.test.ts\` and record the result.
133
+ - Review the diff for unchanged sorting and no input mutation.
134
+ \`\`\`
135
+
136
+ Acceptance criteria should be observable, with commands suitable for your actual test runner and any required
137
+ manual checks. Small bounded tasks are easier to review. Add another section only when it has enough context
138
+ to be implemented independently; section order alone does not enforce dependencies.
139
+
140
+ ## Status and scheduling reference
141
+
142
+ The following status lines are recognized at the start of a section. The state names describe parser behavior;
143
+ they are not proof that a check passed.
144
+
145
+ | Status line | Parsed state | Priority | Meaning |
146
+ | -------------------------------------------- | ------------ | -------- | ----------------------------------------------------------------------------- |
147
+ | \`[ ]\` | todo | 0 | Pending, eligible after authoring and selection filters. |
148
+ | \`[ ] !!!\` | todo | 3 | Pending with higher scheduling priority. |
149
+ | \`[^]\` | in-progress | 0 | Started, not finished; not selected as a fresh task. |
150
+ | \`[x]\` | done | 0 | Completion recorded; inspect evidence and review before archiving. |
151
+ | \`[X]\` | done | 0 | Uppercase X is also accepted. |
152
+ | \`[!]\` | failed | 0 | Failed work; inspect the recorded reason before retrying. |
153
+ | \`[-]\` | not-ready | 0 | Draft or deliberately held work, excluded from execution. |
154
+ | \`[.]\` | not-ready | 0 | Alternative spelling of the same draft state. |
155
+ | \`[-] !!\` | not-ready | 0 | Exclamation marks do not make a draft runnable. |
156
+ | \`[.] !\` | not-ready | 0 | The alternative draft spelling also accepts whitespace and exclamation marks. |
157
+ | \`[^] implementation started\` | in-progress | 0 | Trailing progress information is accepted. |
158
+ | \`[x] by a developer; results below\` | done | 0 | Trailing completion information is accepted. |
159
+ | \`[X] reviewed; results below\` | done | 0 | Uppercase completion also accepts trailing information. |
160
+ | \`[!] acceptance check failed; details below\` | failed | 0 | Trailing failure information is accepted. |
161
+
162
+ Only \`x\` has an accepted letter-case variant. Surrounding whitespace is trimmed. Clean \`[-]\` / \`[.]\` lines
163
+ accept whitespace and \`!\` after the marker; put draft explanations on the following lines. \`[x]\`, \`[X]\`,
164
+ \`[^]\`, and \`[!]\` accept arbitrary trailing metadata. Keep a pending line to whitespace, priority marks, and
165
+ any intended targeting annotations below. Ordinary trailing prose without a backtick target (for example
166
+ \`[ ] implement search\`) makes that recognized status line not-ready, rather than providing a task title.
167
+ Unsupported prefixes such as \`[?]\` are ordinary content and can therefore become pending tasks: **do not use
168
+ \`[?]\` to skip work**.
169
+
170
+ Every \`!\` after a valid pending marker contributes one priority point, including marks before or after
171
+ targeting tokens. Higher priorities run first; \`!\` in the task body has no scheduling effect. Equal priorities
172
+ retain filename order from directory loading, then section order. Date numbers and emoji tags do not override
173
+ priority. \`--min-priority\` and \`--max-priority\` set inclusive bounds; \`--priority\` is an alias for the
174
+ minimum, not an exact-priority selector.
175
+
176
+ Backtick-delimited tokens on the pending status line target the selected harness, model, or Book agent. For
177
+ example, these are four separate task sections:
178
+
179
+ \`\`\`markdown
180
+ [ ] !! use \`gpt\`
181
+
182
+ Review search edge cases with a matching model family. Keep the current matching rules and document uncovered
183
+ cases.
184
+
185
+ ---
186
+
187
+ [ ] use \`openai-codex\` !!!
188
+
189
+ Add the agreed search regression tests with this harness. Run the project's focused search checks.
190
+
191
+ ---
192
+
193
+ [ ] use \`developer\`
194
+
195
+ Implement the reviewed search requirement with the Developer Book. Read the repository instructions before
196
+ changing the helper.
197
+
198
+ ---
199
+
200
+ [ ] use \`agents/developer.book\` or \`claude-code\` !
201
+
202
+ Review the search helper's test coverage. Report any missing cases without expanding the feature scope.
203
+ \`\`\`
204
+
205
+ Tokens are normalized and matched as substrings of the selected harness name, model name, or the Book's
206
+ path/name/title aliases. Multiple tokens are **alternatives** (any match), not an AND condition; words such as
207
+ \`use\`, \`model\`, and \`or\` are explanatory text. A token does not launch a different runner, switch models, or
208
+ select a Book for you. Omit targets to allow any runner. With no selection flags or runner environment
209
+ settings, \`ptbk coder list\` applies no runner/agent filter; a filtered list can differ from it.
210
+
211
+ Status, priority, and targeting affect scheduling and are removed from the implementation prompt. The body,
212
+ referenced context, and selected Book supply implementation instructions. Normal selection chooses pending,
213
+ fully authored, compatible sections. In-progress tasks need deliberate recovery; Coder's
214
+ \`--git-changes continue\` supports resuming a single interrupted task. Review failures before resetting them to
215
+ \`[ ]\`.
216
+
217
+ ### Drafts and completion evidence
218
+
219
+ The literal placeholder \`@@@\` anywhere in the task text keeps a pending section out of the runnable queue.
220
+ Boilerplates and repair templates use it for missing requirements. Ordinary prose such as “TODO” or “needs
221
+ discussion” is not a skip mechanism. Use \`[-]\` or \`[.]\`, retain placeholders while writing, then review all
222
+ requirements, replace every placeholder, and change the first line to \`[ ]\` only when the task is ready.
223
+ \`ptbk coder find-unwritten\` helps locate pending sections with placeholders; inspect not-ready drafts
224
+ separately.
225
+
226
+ Runner-written completion lines may attribute implementation to a harness and model, include
227
+ reasoning/authentication labels, attempts or interrupted/continued history, and report implementation,
228
+ checking, fixing, or total cost/time information. Those are observed run metadata, not instructions, budgets,
229
+ or a frozen list of supported models. A completed status alone does not prove checks ran: direct runs only
230
+ execute the project check command when configured. Preserve actual measurements and record unknown
231
+ results or checks that were not run honestly. Manual users must not invent cost/time figures, copy another
232
+ run's attribution, or mark unverified work as verified. The textual metadata rows above demonstrate syntax
233
+ only; use them only when the described events actually happened.
234
+
235
+ ## From discussion to a reviewed change
236
+
237
+ 1. **Discuss and write:** establish the goal, repository context, scope, requirements, and acceptance checks.
238
+ Write a draft directly, use a template, or discuss it with a person or assistant. Keep unresolved tasks
239
+ not-ready.
240
+ 2. **Review the PRD:** confirm assumptions against the code, settle open questions, and identify dependencies.
241
+ Leave dependent tasks not-ready until their prerequisites exist; filename or section order is not
242
+ dependency management.
243
+ 3. **Make it runnable:** remove placeholders, set \`[ ]\`, and choose a priority or target only when needed.
244
+ Commit/review the specification according to the project's process.
245
+ 4. **Select and implement:** inspect the ready queue, read repository instructions and referenced files, mark
246
+ the chosen section \`[^]\`, and implement only its scoped changes.
247
+ 5. **Verify and record:** run the acceptance checks and inspect behavior. Record commands, results,
248
+ limitations, and accurate attribution. Mark successful, checked work \`[x]\`; record a failed attempt as
249
+ \`[!]\`, or hold unresolved requirements with \`[-]\` and explain why below it.
250
+ 6. **Review and commit:** inspect source, tests, and PRD changes together. Review completed files before
251
+ archiving them into \`done/\`; keep pending or blocked sections in the active directory or move them into a
252
+ separate PRD first. Commit the intended changes under the project's normal review process.
253
+
254
+ ### Using Promptbook Coder
255
+
256
+ Run commands from the project root. The examples assume \`ptbk\` is already available; see the optional links
257
+ below for installation. Harness execution needs that harness's installation and authentication. Reading,
258
+ editing, and manually implementing PRDs does not.
259
+
260
+ Every workspace command checks the enclosing Git working tree, including a parent monorepo, linked
261
+ worktree, or submodule. The selected project directory still owns its Books, prompts and configuration.
262
+ An unborn branch (a repository with no commits) and a local repository with no remote are valid.
263
+ \`ptbk init\` and \`ptbk coder init\` create missing Git metadata automatically, even with
264
+ \`--no-questions\`, and reuse existing Git without changing history, remotes, hooks, configuration or index.
265
+ They never stage pre-existing files or create an initial commit by default.
266
+
267
+ Other potentially mutating commands show the resolved target and ask once before \`git init\`; accepting
268
+ resumes the original command. Declining or cancelling stops it before setup, file writes or harness execution.
269
+ With \`--no-questions\` or noninteractive input, a missing repository fails immediately: run
270
+ \`ptbk init --no-questions\`, \`ptbk coder init --no-questions\`, or \`git init\` in the target directory,
271
+ then retry. Disabling commits does not disable this prerequisite. Listing and true \`--dry-run\` previews
272
+ only warn about missing Git and create no setup files. Missing Git itself, bare repositories, corrupt
273
+ metadata, ownership errors and permission failures require repair; they never trigger automatic initialization.
274
+ Remote pull/push options still require your configured remote and identity. Git creation finishes before
275
+ initialization-time synchronization; partial setup failures report completed steps and require review.
276
+
277
+ | Command | What it does |
278
+ | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
279
+ | \`ptbk init\` / \`ptbk coder init\` | Initializes missing Git, then creates missing configuration, local Books, this guide, and fresh-directory boilerplates; preserves project-owned content. \`--no-questions\` skips installation questions/checks. |
280
+ | \`ptbk coder add "Describe the reviewed change"\` | Creates one numbered, tagged pending PRD. Accepts a description argument, stdin, or interactive input; \`--priority\` and \`--template\` are available. It does not discuss or implement the task. Review the generated requirements before running. |
281
+ | \`ptbk coder plan --harness openai-codex\` | Interactive planning with the local Developer. Review proposals; \`/save\` writes pending PRDs, \`/draft\` writes not-ready drafts, \`/discard\` drops proposals, \`/exit\` ends. It changes PRD Markdown only and never implements or starts the queue. Currently this planning command supports the Codex harness in a compatible interactive terminal. |
282
+ | \`ptbk coder list\` | Displays fully authored pending tasks grouped by descending priority without execution or file changes. Optional harness/model/agent and priority filters narrow the list. |
283
+ | \`ptbk coder run --harness openai-codex --limit 1 --no-commit --no-auto --check "npm run check"\` | Confirms and implements one selected task, then runs the specified project check. Replace the check command as needed. Without \`--limit\`, execution proceeds through the eligible queue; without \`--no-commit\`, run stages and commits its changes. |
284
+ | \`ptbk coder fix --harness openai-codex\` | Always runs project checks first (default \`npm run check\`), repairs genuine failures with one PRD, verifies and commits eligible changes, then exits. Never selects ordinary queued PRDs. A passing project launches no harness or repair. |
285
+ | \`ptbk coder verify\` | Human review helper: shows completion claims, offers archival or a repair section, and can also ask about pending tasks. It does not run acceptance tests itself. Archival moves the whole file to \`done/\`, so inspect every section before agreeing. There is no separate archive command. |
286
+ | \`ptbk coder find-unwritten\` | Lists pending sections still containing authoring placeholders; not-ready drafts are not included. |
287
+ | \`ptbk coder generate-boilerplates\` | Adds not-ready starter sections using reusable templates; author and review them before making them pending. |
288
+
289
+ For a review-before-commit run, first review and commit or stash existing work: the default run mode refuses a
290
+ dirty working tree. Use the \`--no-commit --no-auto --limit 1\` example, inspect the result, and commit it
291
+ yourself. Here \`--no-auto\` requests interactive confirmation and makes the no-commit mode valid without
292
+ ignoring existing changes. Init/add/plan/verify Git synchronization is opt-in with \`--commit\`; pushing and
293
+ pulling require the corresponding explicit options. Consult \`ptbk coder --help\` and the relevant subcommand's
294
+ \`--help\` for the installed version's full options.
295
+
296
+ The initialized \`npm run coder:run\` script selects the Codex harness and uses
297
+ \`--check "npm run check" --check-before yes-and-fix\`. Developer, the current project directory, and its
298
+ \`AGENTS.md\` are shared CLI defaults. A **check** covers the project's chosen tests, linting, typechecking,
299
+ builds, generated-code consistency, and other validation. Tests remain one kind of check.
300
+ Init preserves an existing \`scripts.check\` exactly, or composes applicable existing validation scripts and
301
+ reports the selected scope. If none are usable, it creates a failing setup placeholder: configure real
302
+ validation before running Coder. Missing checks or setup placeholders stop with setup guidance, without model repairs.
303
+ Direct \`ptbk coder run\` defaults to \`--check-before no\`; checks after prompts remain opt-in. Enabled
304
+ preflight without an explicit command uses \`npm run check\`, including during repair verification.
305
+
306
+ \`ptbk coder fix\` reuses run's check-and-repair phase and stops as soon as that phase finishes. Use
307
+ \`ptbk coder fix --harness openai-codex --check "npm run lint && npm run build && npm test"\` to select
308
+ the project's explicit validation scope. No extra validation command is added. Check failures produce one
309
+ repair PRD under \`prompts/\`; feedback retries update that same task, with at most three repair verification attempts.
310
+ The repair may correct a defective check while preserving its intended validation, but must never weaken
311
+ assertions, lint rules, builds, or thresholds to get a pass. Ordinary PRDs and their statuses are left alone,
312
+ including interrupted tasks. An absent prompts directory is created only when a repair needs its artifact.
313
+ Default Book compilation and harness preparation happen only after a failed check actually needs repair.
314
+ Configure a missing Developer with \`ptbk coder init\` or select a custom Book; an already healthy project
315
+ requires neither a Book nor an installed harness. Explicit Books/context overrides are validated up front.
316
+ Passing formatters/generators commit only their eligible files, with no empty commit and no fabricated PRD.
317
+ Repair checks run after scoped line-ending normalization, verifying the content that will be committed.
318
+ Use \`--no-normalize-line-endings\` for projects that intentionally require other line endings.
319
+ Existing unrelated staged/unstaged files remain outside scoped commits. \`--git-changes ignore\` explicitly
320
+ permits a dirty tree; \`--no-commit\` also requires that option. Pull/push remain explicit \`--auto-pull\` /
321
+ \`--auto-push\` opt-ins. A rejected push leaves the local verified commit available and starts no new repair.
322
+ \`--dry-run\` describes the job without checking, creating tasks, installing tools, calling models or committing.
323
+ \`--no-ui\`, \`--no-questions\` and \`--preserve-logs\` apply to this finite job. Cancellation preserves work
324
+ and diagnostics. \`fix\` rejects \`--git-changes continue\`: inspect/recover the specific saved repair before
325
+ retrying instead of resuming an arbitrary backlog task. Run/server/fix share an exclusive workspace mutation
326
+ lease; inspect a stopped worker's work before explicitly removing a stale lease reported in its diagnostic.
327
+
328
+ Replace retired \`--test\` / \`--test-before\` with \`--check\` / \`--check-before\`. Init migrates recognized
329
+ generated scripts and preserves custom legacy validation in \`check\`. Conflicting definitions or custom callers
330
+ are preserved with manual migration instructions; review them before removing a legacy script.
331
+
332
+ ### Book agent, harness, and model
333
+
334
+ A **Book agent** is an editable \`.book\` file supplying a role, persona, instructions, identity, and routing
335
+ aliases. A **harness** is the tool that operates on the repository, such as Codex or Claude Code. A **model**
336
+ is the underlying model used by that harness. \`--agent\`, \`--harness\`, and \`--model\` select these
337
+ independently.
338
+
339
+ Init creates local Developer and Planner Books in \`agents/developer.book\` and \`agents/planner.book\`, their
340
+ Lawyer and Copywriter TEAM advisers, and shared \`agents/.core/adam.book\` instructions. Books can
341
+ inherit/import instructions; TEAM entries expose advisers for relevant consultations, not an obligation to
342
+ invoke everyone. \`run\`, \`fix\`, \`server\` and \`plan\` default to Developer.
343
+ \`--agent ./agents/planner.book\` selects Planner explicitly; another Book path also works. \`list\` has no
344
+ default Book filter. Every Book used in \`plan\`, including Developer, still permits planning only.
345
+
346
+ Project commands default to the current directory captured when invoked. \`--path\` selects another existing
347
+ directory, relative to that invocation or absolute; an enclosing Git repository never relocates the project's
348
+ Books, PRDs or context. Additional context defaults to the actual UTF-8 contents of that project's \`AGENTS.md\`.
349
+ A missing implicit file warns and continues; an unreadable file fails. \`--context\` replaces the default with
350
+ inline instructions or a file resolved relative to the selected project; \`--context ""\` disables it.
351
+ Invalid explicit Books and missing/unreadable explicit context files fail without falling back.
352
+ Thus \`ptbk coder run --harness openai-codex\` and
353
+ \`ptbk coder run --harness openai-codex --agent ./agents/developer.book --path . --context ./AGENTS.md\` select
354
+ the same inputs. New npm scripts rely on these defaults; init still creates missing Books and AGENTS.md even
355
+ when every script already exists, preserving existing custom scripts, settings and context.
356
+
357
+ Edit local Books to reflect this project's rules; repeat init preserves customizations and adds missing
358
+ defaults/helper references. An invalid explicit Book selection fails rather than silently changing roles.
359
+ Execution uses the current default model for the chosen harness unless \`--model\` or environment configuration
360
+ overrides it; no model version needs to be written into every PRD.
361
+
362
+ ## Working manually or with another assistant
363
+
364
+ 1. Choose one top-level PRD section that is pending, has no \`@@@\`, and has no unresolved prerequisites.
365
+ Respect any deliberate targeting constraints or discuss changing them. Treat this README, templates,
366
+ history, and traces as context, never as queued tasks.
367
+ 2. Read the whole selected section, the root \`README.md\`, \`AGENTS.md\` if present, and each relevant
368
+ source/test file. Confirm the request still makes sense. If requirements are incomplete, set \`[-]\` and
369
+ record the missing decisions instead of guessing.
370
+ 3. Hand that section and its repository context to your preferred assistant, or implement it yourself. Ask for
371
+ only the stated scope, actual acceptance checks, and an honest result report. Mark the task \`[^]\` so
372
+ collaborators can see it is being worked on.
373
+ 4. Implement, run the project's required tests and the PRD's specific acceptance checks, and inspect any
374
+ required UI or behavioral results. Record what ran and what passed or failed in a result paragraph inside
375
+ the same section. Do not insert a \`---\` before that paragraph: it would create another task.
376
+ 5. Use \`[x]\` after the scoped work and checks succeed. Use \`[!]\` for an unsuccessful attempt, or \`[-]\` for a
377
+ task waiting on decisions; keep the explanation in the body. If stopping mid-implementation, retain \`[^]\`
378
+ and describe remaining work. Leave unavailable checks explicitly unverified and do not claim verified
379
+ completion.
380
+ 6. Run \`git status\` and \`git diff\` from the root. Review the implementation, tests, status, and evidence;
381
+ inspect untracked files too. Archive only fully reviewed files with no work that should remain active,
382
+ adjust relative links as needed, and stage the specific intended paths. Inspect \`git diff --cached\` before
383
+ committing. Follow the repository's normal pull-request/review process.
384
+
385
+ These steps work offline with ordinary repository tools; no Promptbook-specific state needs to be
386
+ reconstructed to understand the task.
387
+
388
+ ## Optional further reading
389
+
390
+ - [Promptbook Coder website](https://coder.ptbk.io)
391
+ - [Promptbook repository](https://github.com/webgptorg/promptbook)
392
+ - [Coder workflow and command documentation](https://github.com/webgptorg/promptbook/blob/main/scripts/run-codex-prompts/README.md)
393
+ - [Planning workflow documentation](https://github.com/webgptorg/promptbook/blob/main/src/cli/cli-commands/coder/planning/README.md)
394
+
395
+ The links add background; the requirements, annotations, and manual workflow needed to use this directory are
396
+ explained above.
397
+ `);
398
+
399
+ // Note: [🟡] Coder documentation must never be published outside of `@promptbook/cli`.
400
+ // Note: [💞] Ignore a discrepancy between file name and entity name.
@@ -0,0 +1,62 @@
1
+ import { lstat, readFile } from 'fs/promises';
2
+ import { spaceTrim } from 'spacetrim';
3
+ import { parseAgentSourceWithCommitments } from '../../../book-2.0/agent-source/parseAgentSourceWithCommitments';
4
+ import type { string_book } from '../../../book-2.0/agent-source/string_book';
5
+ import { getCommitmentDefinition } from '../../../commitments/_common/getCommitmentDefinition';
6
+ import { ParseError } from '../../../errors/ParseError';
7
+
8
+ /**
9
+ * Reads a project-owned Book before initialization, refusing unsafe edits while preserving its original bytes.
10
+ * Unknown commitments remain supported, as in the normal Book parser.
11
+ *
12
+ * @private internal utility of `coder init`
13
+ */
14
+ export async function readCoderAgentBook(filePath: string): Promise<string_book> {
15
+ const entry = await lstat(filePath);
16
+ if (!entry.isFile()) {
17
+ throw new ParseError(
18
+ spaceTrim(
19
+ `Expected a regular Book file at \`${filePath}\`; directories and symbolic links are left untouched.`,
20
+ ),
21
+ );
22
+ }
23
+
24
+ const bytes = await readFile(filePath);
25
+ const source = bytes.toString('utf-8') as string_book;
26
+ if (!Buffer.from(source, 'utf-8').equals(bytes) || source.includes('\0')) {
27
+ throw new ParseError(spaceTrim(`Book \`${filePath}\` is not valid UTF-8 text.`));
28
+ }
29
+
30
+ const parsed = parseAgentSourceWithCommitments(source);
31
+ if (!parsed.agentName) {
32
+ throw new ParseError(spaceTrim(`Book \`${filePath}\` is empty or has no agent name.`));
33
+ }
34
+
35
+ let isInsideCodeBlock = false;
36
+ for (const line of source.split(/\r?\n/).slice(parsed.agentNameLineNumber)) {
37
+ if (line.trim().startsWith('```')) {
38
+ isInsideCodeBlock = !isInsideCodeBlock;
39
+ } else if (!isInsideCodeBlock && /^(?:<{7}|={7}|>{7})(?:\s|$)/.test(line)) {
40
+ throw new ParseError(spaceTrim(`Book \`${filePath}\` contains unresolved merge markers.`));
41
+ }
42
+ }
43
+ if (isInsideCodeBlock) {
44
+ throw new ParseError(spaceTrim(`Book \`${filePath}\` contains an unclosed code block.`));
45
+ }
46
+
47
+ for (const commitment of parsed.commitments) {
48
+ // FROM may disable inheritance, and OPEN is valid without its optional teacher instructions.
49
+ if (
50
+ !['FROM', 'OPEN'].includes(commitment.type) &&
51
+ !commitment.content &&
52
+ !getCommitmentDefinition(commitment.type)?.createRegex().test(commitment.type)
53
+ ) {
54
+ throw new ParseError(
55
+ spaceTrim(
56
+ `Book \`${filePath}\` has an empty \`${commitment.type}\` commitment on line ${commitment.lineNumber}.`,
57
+ ),
58
+ );
59
+ }
60
+ }
61
+ return source;
62
+ }