@promptbook/cli 0.114.0-3 → 0.114.0-30

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 (1032) hide show
  1. package/README.md +10 -18
  2. package/agents/default/developer.book +1 -0
  3. package/apps/agents-server/README.md +1 -1
  4. package/apps/agents-server/{USE_TIMEOUT_CHIP_QA.md → TIMEOUT_CHIP_QA.md} +1 -1
  5. package/apps/agents-server/next.config.ts +28 -0
  6. package/apps/agents-server/package.json +6 -6
  7. package/apps/agents-server/scripts/build-agents-server.js +43 -7
  8. package/apps/agents-server/scripts/build-e2e.js +12 -2
  9. package/apps/agents-server/scripts/generate-reserved-paths/generate-reserved-paths.ts +30 -16
  10. package/apps/agents-server/scripts/kill-port.js +163 -0
  11. package/apps/agents-server/scripts/run-e2e-tests.js +21 -8
  12. package/apps/agents-server/scripts/run-npm.js +81 -5
  13. package/apps/agents-server/src/app/admin/_components/AdminFilterFields.tsx +84 -0
  14. package/apps/agents-server/src/app/admin/_components/AdminMetricCard.tsx +36 -0
  15. package/apps/agents-server/src/app/admin/_components/AdminTaskManagerTabs.tsx +97 -0
  16. package/apps/agents-server/src/app/admin/about/page.tsx +1 -1
  17. package/apps/agents-server/src/app/admin/email-server/page.tsx +17 -18
  18. package/apps/agents-server/src/app/admin/messages/MessageParticipants.tsx +84 -0
  19. package/apps/agents-server/src/app/admin/messages/MessageStatus.tsx +96 -0
  20. package/apps/agents-server/src/app/admin/messages/MessagesClient.tsx +29 -33
  21. package/apps/agents-server/src/app/admin/messages/messageAdminPresentation.ts +289 -0
  22. package/apps/agents-server/src/app/admin/messages/send-email/SendEmailClient.tsx +193 -63
  23. package/apps/agents-server/src/app/admin/messages/send-email/actions.ts +25 -28
  24. package/apps/agents-server/src/app/admin/messages/send-email/emailTesting.ts +153 -0
  25. package/apps/agents-server/src/app/admin/messages/send-email/emailTestingAccess.ts +30 -0
  26. package/apps/agents-server/src/app/admin/messages/send-email/page.tsx +18 -5
  27. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerClient.tsx +103 -0
  28. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerEditDialog.tsx +232 -0
  29. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerFiltersCard.tsx +195 -0
  30. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerRow.tsx +189 -0
  31. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerSummaryMetrics.tsx +60 -0
  32. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerTableCard.tsx +147 -0
  33. package/apps/agents-server/src/app/admin/planned-messages/page.tsx +17 -0
  34. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageEditForm.ts +186 -0
  35. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageManagerDialogs.ts +46 -0
  36. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageManagerPresentation.tsx +188 -0
  37. package/apps/agents-server/src/app/admin/planned-messages/resolvePlannedMessageSortValue.ts +115 -0
  38. package/apps/agents-server/src/app/admin/planned-messages/usePlannedMessageManagerData.ts +116 -0
  39. package/apps/agents-server/src/app/admin/planned-messages/usePlannedMessageManagerState.ts +289 -0
  40. package/apps/agents-server/src/app/admin/task-manager/TaskManagerClient.tsx +7 -2
  41. package/apps/agents-server/src/app/admin/task-manager/TaskManagerFiltersCard.tsx +7 -73
  42. package/apps/agents-server/src/app/admin/task-manager/TaskManagerSummaryMetrics.tsx +5 -30
  43. package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +2 -0
  44. package/apps/agents-server/src/app/admin/task-manager/[taskId]/TaskManagerTaskDetailClient.tsx +3 -1
  45. package/apps/agents-server/src/app/admin/task-manager/taskManagerTaskPresentation.tsx +23 -0
  46. package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +8 -9
  47. package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +5 -9
  48. package/apps/agents-server/src/app/agents/[agentName]/api/book/reference-diagnostics/route.ts +30 -7
  49. package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +9 -0
  50. package/apps/agents-server/src/app/agents/[agentName]/api/book/test.http +3 -3
  51. package/apps/agents-server/src/app/agents/[agentName]/api/chat/resolveAgentChatRouteContext.ts +8 -16
  52. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/[timeoutId]/route.ts +10 -153
  53. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/route.ts +9 -4
  54. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/route.ts +3 -0
  55. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/stream/route.ts +2 -0
  56. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/resolveUserChatScope.ts +8 -1
  57. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/route.ts +15 -7
  58. package/apps/agents-server/src/app/agents/[agentName]/api/voice/route.ts +4 -9
  59. package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorMissingReferences.tsx +106 -12
  60. package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorWrapper.tsx +3 -0
  61. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorDiagnostics.ts +12 -0
  62. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorSaving.ts +18 -28
  63. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorWrapper.tsx +2 -0
  64. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistoryClient.tsx +19 -1
  65. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatSidebarDefault.tsx +17 -5
  66. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatNotice.tsx +23 -0
  67. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatPlannedMessages.tsx +226 -0
  68. package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatPanel.tsx +6 -0
  69. package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +32 -12
  70. package/apps/agents-server/src/app/agents/[agentName]/chat/ExternalUserChatAdminActions.tsx +51 -3
  71. package/apps/agents-server/src/app/agents/[agentName]/chat/TeamMemberFrozenChatPrimaryAgentLink.tsx +31 -0
  72. package/apps/agents-server/src/app/agents/[agentName]/chat/page.tsx +2 -20
  73. package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatSidebarState.ts +26 -2
  74. package/apps/agents-server/src/app/agents/[agentName]/goal/page.tsx +35 -0
  75. package/apps/agents-server/src/app/agents/[agentName]/page.tsx +2 -1
  76. package/apps/agents-server/src/app/agents/[agentName]/projectReferenceActions.ts +61 -0
  77. package/apps/agents-server/src/app/agents/[agentName]/projectRuntimeActions.ts +97 -0
  78. package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/actions.ts +5 -50
  79. package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/page.tsx +2 -2
  80. package/apps/agents-server/src/app/api/admin/default-agents/reinstate/route.ts +5 -1
  81. package/apps/agents-server/src/app/api/admin/dns-records/cloudflare/route.ts +26 -16
  82. package/apps/agents-server/src/app/api/admin/planned-messages/[timeoutId]/route.ts +80 -0
  83. package/apps/agents-server/src/app/api/admin/planned-messages/route.ts +19 -0
  84. package/apps/agents-server/src/app/api/emails/incoming/stalwart/route.ts +9 -2
  85. package/apps/agents-server/src/app/api/internal/agent-goal-chat-planned-messages/route.ts +201 -0
  86. package/apps/agents-server/src/app/api/scrape/route.ts +1 -1
  87. package/apps/agents-server/src/app/layout.tsx +25 -0
  88. package/apps/agents-server/src/app/page.tsx +1 -1
  89. package/apps/agents-server/src/app/superadmin/servers/ServersRegistryTable.tsx +31 -39
  90. package/apps/agents-server/src/app/system/user-wallet/UserWalletDraft.ts +2 -2
  91. package/apps/agents-server/src/components/AgentNaming/legacyAgentTextTranslations.cs.yaml +7 -0
  92. package/apps/agents-server/src/components/AgentProfile/AgentCapabilityChips.tsx +1 -24
  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/DefaultAgents/ReinstateBundledAgentsButton.tsx +7 -0
  104. package/apps/agents-server/src/components/DefaultAgents/coreAgentsAdminRoute.ts +6 -0
  105. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsInstructions.tsx +91 -57
  106. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionPanel.tsx +63 -0
  107. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionVariantTabs.tsx +67 -0
  108. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsTable.tsx +40 -0
  109. package/apps/agents-server/src/components/Header/Header.tsx +8 -0
  110. package/apps/agents-server/src/components/Header/HeaderTypes.ts +5 -0
  111. package/apps/agents-server/src/components/Header/buildActiveAgentViewItems.ts +5 -4
  112. package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +125 -30
  113. package/apps/agents-server/src/components/Header/createAgentViewLabel.tsx +4 -4
  114. package/apps/agents-server/src/components/Header/resolveActiveAgentNavigation.ts +2 -2
  115. package/apps/agents-server/src/components/Header/resolveHeaderSystemActivities.ts +86 -0
  116. package/apps/agents-server/src/components/Homepage/AgentCard.tsx +0 -3
  117. package/apps/agents-server/src/components/Homepage/DefaultAgentsStatusNotice.tsx +1 -7
  118. package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +22 -10
  119. package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +8 -0
  120. package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardState.ts +0 -12
  121. package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardUseSetupStep.tsx +0 -58
  122. package/apps/agents-server/src/components/NewAgentDialog/newAgentWizardPresets.ts +0 -56
  123. package/apps/agents-server/src/components/WalletRecordDialog/useWalletRecordDialogState.ts +1 -1
  124. package/apps/agents-server/src/components/_utils/generateMetaTxt.ts +1 -1
  125. package/apps/agents-server/src/constants/federatedAgentImport.ts +7 -0
  126. package/apps/agents-server/src/database/migratePrefix.ts +13 -12
  127. package/apps/agents-server/src/database/migrations/2026-08-0100-agent-goal-chat-source.sql +10 -0
  128. package/apps/agents-server/src/database/migrations/2026-08-1800-user-chat-timeout-schedule.sql +11 -0
  129. package/apps/agents-server/src/generated/reservedPaths.ts +42 -42
  130. package/apps/agents-server/src/instrumentation-node.ts +18 -0
  131. package/apps/agents-server/src/languages/ServerTranslationKeys.ts +16 -11
  132. package/apps/agents-server/src/languages/translations/czech.yaml +16 -11
  133. package/apps/agents-server/src/languages/translations/english.yaml +16 -11
  134. package/apps/agents-server/src/message-providers/email/smtp/SmtpMessageProvider.ts +1 -1
  135. package/apps/agents-server/src/message-providers/email/stalwart/StalwartMessageProvider.ts +59 -19
  136. package/apps/agents-server/src/message-providers/email/stalwart/parseInboundStalwartEmail.ts +17 -2
  137. package/apps/agents-server/src/middleware/createMiddlewareRequestContext/loadRegisteredServers.ts +8 -0
  138. package/apps/agents-server/src/tools/$provideOpenAiAgentKitExecutionToolsForServer.ts +0 -191
  139. package/apps/agents-server/src/tools/$provideOpenAiAssistantExecutionToolsForServer.ts +0 -3
  140. package/apps/agents-server/src/tools/$provideServer.ts +2 -1
  141. package/apps/agents-server/src/tools/agentGoalChatTimeoutToolFunctions.ts +249 -0
  142. package/apps/agents-server/src/tools/agentGoalChatTimeoutTools.ts +147 -0
  143. package/apps/agents-server/src/tools/createServerChatRuntimeTools.ts +20 -0
  144. package/apps/agents-server/src/tools/getAllToolFunctionsForServer.ts +2 -0
  145. package/apps/agents-server/src/tools/mapRegisteredServerContexts.ts +1 -1
  146. package/apps/agents-server/src/tools/run_browser.ts +1 -1
  147. package/apps/agents-server/src/tools/send_email.ts +3 -3
  148. package/apps/agents-server/src/utils/adminEntityLookups/loadAgentNamesByPermanentId.ts +45 -0
  149. package/apps/agents-server/src/utils/adminEntityLookups/loadUsernamesByUserId.ts +36 -0
  150. package/apps/agents-server/src/utils/adminEntityLookups.ts +2 -0
  151. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatConstants.ts +14 -0
  152. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatIdentity.ts +28 -0
  153. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatPlannedMessageActions.ts +583 -0
  154. package/apps/agents-server/src/utils/agentGoalChat/appendAgentGoalChatNote.ts +43 -0
  155. package/apps/agents-server/src/utils/agentGoalChat/canAccessAgentGoalChat.ts +14 -0
  156. package/apps/agents-server/src/utils/agentGoalChat/createAgentGoalChatNoteContent.ts +129 -0
  157. package/apps/agents-server/src/utils/agentGoalChat/enqueueAgentGoalChatTurn.ts +167 -0
  158. package/apps/agents-server/src/utils/agentGoalChat/ensureAgentGoalChat.ts +66 -0
  159. package/apps/agents-server/src/utils/agentGoalChat/prependAgentGoalChatSummarySeed.ts +40 -0
  160. package/apps/agents-server/src/utils/agentGoalChat/recordAgentGoalChatLifecycleNote.ts +53 -0
  161. package/apps/agents-server/src/utils/agentGoalChat/resolveAgentGoalChatOwnerUserId.ts +104 -0
  162. package/apps/agents-server/src/utils/agentGoalChat/resolveEffectiveAgentGoal.ts +29 -0
  163. package/apps/agents-server/src/utils/agentGoalChat/scheduleAgentGoalChatModifiedNote.ts +85 -0
  164. package/apps/agents-server/src/utils/agentGoalChat.ts +25 -0
  165. package/apps/agents-server/src/utils/agentProjects/AgentProjectInfo.ts +10 -1
  166. package/apps/agents-server/src/utils/agentProjects/AgentProjectReferenceInfo.ts +5 -2
  167. package/apps/agents-server/src/utils/agentProjects/AgentProjectRuntimeActionResult.ts +14 -0
  168. package/apps/agents-server/src/utils/agentProjects/agentProjectFileNames.ts +21 -0
  169. package/apps/agents-server/src/utils/agentProjects/agentProjectHrefs.ts +20 -11
  170. package/apps/agents-server/src/utils/agentProjects/agentProjectIdentity.ts +46 -0
  171. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeAutostartScheduler.ts +162 -0
  172. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDesiredState.ts +252 -0
  173. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDisplay.ts +6 -3
  174. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDomains.ts +2 -44
  175. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePaths.ts +25 -0
  176. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePm2.ts +60 -13
  177. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeRegistry.ts +77 -24
  178. package/apps/agents-server/src/utils/agentProjects/agentProjectStateMutationQueue.ts +58 -0
  179. package/apps/agents-server/src/utils/agentProjects/agentProjectsPaths.ts +15 -5
  180. package/apps/agents-server/src/utils/agentProjects/createAgentProjectInitials.ts +36 -0
  181. package/apps/agents-server/src/utils/agentProjects/createAgentProjectMarkdownReferences.ts +124 -19
  182. package/apps/agents-server/src/utils/agentProjects/createAgentProjectsDnsRecordsSection.ts +113 -0
  183. package/apps/agents-server/src/utils/agentProjects/createStaticAgentProjectServer.ts +2 -6
  184. package/apps/agents-server/src/utils/agentProjects/humanizeAgentProjectName.ts +25 -0
  185. package/apps/agents-server/src/utils/agentProjects/listAgentProjectChatReferences.ts +10 -3
  186. package/apps/agents-server/src/utils/agentProjects/listAgentProjectNames.ts +35 -0
  187. package/apps/agents-server/src/utils/agentProjects/listAgentProjects.ts +6 -23
  188. package/apps/agents-server/src/utils/agentProjects/listAllAgentProjectSummaries.ts +2 -1
  189. package/apps/agents-server/src/utils/agentProjects/listAllLocalAgentProjectIdentities.ts +48 -0
  190. package/apps/agents-server/src/utils/agentProjects/parseAgentProjectIndexHtml.ts +167 -0
  191. package/apps/agents-server/src/utils/agentProjects/readAgentProjectIndexHtmlProfile.ts +24 -0
  192. package/apps/agents-server/src/utils/agentProjects/readAgentProjectReadme.ts +3 -53
  193. package/apps/agents-server/src/utils/agentProjects/readAgentProjectRootTextFile.ts +73 -0
  194. package/apps/agents-server/src/utils/agentProjects/resolveAgentChatProjectReferences.ts +25 -0
  195. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectFaviconRelativePath.ts +108 -0
  196. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectInfo.ts +12 -3
  197. package/apps/agents-server/src/utils/agentProjects/{resolveAgentProjectReadmeProfile.ts → resolveAgentProjectProfile.ts} +33 -33
  198. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectPublicUrls.ts +34 -0
  199. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectRuntimeEnvironmentFlag.ts +23 -0
  200. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectRuntimeStatus.ts +73 -0
  201. package/apps/agents-server/src/utils/agentProjects/startDefaultAgentProjectRuntimes.ts +110 -0
  202. package/apps/agents-server/src/utils/agentReferenceResolver/MissingCoreAgentRecovery.ts +19 -0
  203. package/apps/agents-server/src/utils/agentReferenceResolver/bookScopedAgentReferences.ts +7 -0
  204. package/apps/agents-server/src/utils/agentReferenceResolver/createAgentInheritanceDiagnostics.ts +457 -0
  205. package/apps/agents-server/src/utils/agentReferenceResolver/createUnresolvedAgentReferenceDiagnostics.ts +27 -0
  206. package/apps/agents-server/src/utils/agentReferenceResolver/resolveCoreAgentAwareMissingReferences.ts +156 -0
  207. package/apps/agents-server/src/utils/bookLanguageDocumentation/createBookLanguageDocumentationPdfResponse.ts +19 -17
  208. package/apps/agents-server/src/utils/chatMessageChips/createAnsweredMessageChipToolCalls.ts +49 -0
  209. package/apps/agents-server/src/utils/chatMessageChips/createPlannedMessageChipToolCalls.ts +44 -0
  210. package/apps/agents-server/src/utils/chatMessageChips/createTouchedExternalSourceChipToolCalls.ts +39 -0
  211. package/apps/agents-server/src/utils/chatMessageChips/createTouchedProjectChipResult.ts +45 -0
  212. package/apps/agents-server/src/utils/chatMessageChips/createTouchedProjectChipToolCalls.ts +109 -0
  213. package/apps/agents-server/src/utils/chatTasksAdmin.ts +9 -0
  214. package/apps/agents-server/src/utils/createAgentWithDefaultVisibility.ts +8 -0
  215. package/apps/agents-server/src/utils/createWellKnownAgentUrl.ts +17 -0
  216. package/apps/agents-server/src/utils/cronExpression/CronExpression.ts +63 -0
  217. package/apps/agents-server/src/utils/cronExpression/normalizeCronExpression.ts +34 -0
  218. package/apps/agents-server/src/utils/cronExpression/normalizeCronExpressionWhitespace.ts +11 -0
  219. package/apps/agents-server/src/utils/cronExpression/parseCronExpression.ts +41 -0
  220. package/apps/agents-server/src/utils/cronExpression/parseCronExpressionField.ts +140 -0
  221. package/apps/agents-server/src/utils/cronExpression/resolveNextCronRun.ts +100 -0
  222. package/apps/agents-server/src/utils/cronExpression/throwInvalidCronExpressionField.ts +20 -0
  223. package/apps/agents-server/src/utils/cronExpression.ts +10 -0
  224. package/apps/agents-server/src/utils/currentServerRegistryContext.ts +2 -1
  225. package/apps/agents-server/src/utils/customDomainRouting.ts +143 -10
  226. package/apps/agents-server/src/utils/dnsRecords/DnsRecordInstruction.ts +20 -0
  227. package/apps/agents-server/src/utils/dnsRecords/DnsRecordsSection.ts +77 -0
  228. package/apps/agents-server/src/utils/dnsRecords/createServerDnsRecordsSections.ts +58 -0
  229. package/apps/agents-server/src/utils/dnsRecords/createServerDomainDnsRecordsSection.ts +48 -0
  230. package/apps/agents-server/src/utils/dnsRecords/dnsRecordGroups.ts +52 -0
  231. package/apps/agents-server/src/utils/dnsRecords/resolveDnsRecordBatchPlan.ts +47 -1
  232. package/apps/agents-server/src/utils/email/agentEmailAddress.ts +14 -0
  233. package/apps/agents-server/src/utils/email/sendEmailThroughStalwart.ts +2 -1
  234. package/apps/agents-server/src/utils/explicitFromCommitment.ts +130 -0
  235. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlQuery.ts +41 -36
  236. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/loadAdminChatTaskFallbackData.ts +3 -77
  237. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskFallbackRows.ts +3 -0
  238. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskSqlRows.ts +2 -0
  239. package/apps/agents-server/src/utils/getFederatedServers.ts +5 -15
  240. package/apps/agents-server/src/utils/getWellKnownAgentUrl.ts +2 -3
  241. package/apps/agents-server/src/utils/handleChatCompletion/createHandleChatCompletionPromptContext.ts +3 -2
  242. package/apps/agents-server/src/utils/handleChatCompletion/resolveHandleChatCompletionRuntime.ts +4 -12
  243. package/apps/agents-server/src/utils/localChatRunner/applyLocalAgentPlannedMessageCommands.ts +261 -0
  244. package/apps/agents-server/src/utils/localChatRunner/parseLocalTeamConversations.ts +281 -0
  245. package/apps/agents-server/src/utils/localChatRunner/persistLocalTeamConversations.ts +71 -0
  246. package/apps/agents-server/src/utils/localChatRunner/prepareLocalAgentPlannedMessagesSidecar.ts +74 -0
  247. package/apps/agents-server/src/utils/localChatRunner/prepareLocalTeamConversationWorkspace.ts +233 -0
  248. package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +154 -27
  249. package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentBooks.ts +5 -12
  250. package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentRuntime.ts +2 -2
  251. package/apps/agents-server/src/utils/managementApi/managementApiSchemas.ts +2 -2
  252. package/apps/agents-server/src/utils/messages/parseUseEmailSmtpCredential.ts +1 -1
  253. package/apps/agents-server/src/utils/parseFederatedServers.ts +14 -0
  254. package/apps/agents-server/src/utils/plannedMessageManager/cancelManagedPlannedMessage.ts +35 -0
  255. package/apps/agents-server/src/utils/plannedMessageManager/collectPlannedMessageAgentOptions.ts +56 -0
  256. package/apps/agents-server/src/utils/plannedMessageManager/createPlannedMessageManagerCounters.ts +104 -0
  257. package/apps/agents-server/src/utils/plannedMessageManager/filterPlannedMessages.ts +191 -0
  258. package/apps/agents-server/src/utils/plannedMessageManager/getPlannedMessageManagerResponse.ts +55 -0
  259. package/apps/agents-server/src/utils/plannedMessageManager/isPlannedMessageStillPlanned.ts +18 -0
  260. package/apps/agents-server/src/utils/plannedMessageManager/loadPlannedMessageManagerRecord.ts +32 -0
  261. package/apps/agents-server/src/utils/plannedMessageManager/mapPlannedMessageManagerRecord.ts +73 -0
  262. package/apps/agents-server/src/utils/plannedMessageManager/parsePlannedMessageManagerUpdateRequest.ts +76 -0
  263. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageEndReason.ts +59 -0
  264. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageLifecycle.ts +99 -0
  265. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageRecurrenceKind.ts +40 -0
  266. package/apps/agents-server/src/utils/plannedMessageManager/updateManagedPlannedMessage.ts +121 -0
  267. package/apps/agents-server/src/utils/plannedMessagesAdmin.ts +200 -0
  268. package/apps/agents-server/src/utils/resolveInheritedAgentSource.ts +114 -95
  269. package/apps/agents-server/src/utils/resolveUseEmailSmtpCredential.ts +1 -1
  270. package/apps/agents-server/src/utils/serverManagement/createManagedServer/insertManagedServerRegistryRow.ts +2 -2
  271. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerCoreAgents.ts +7 -6
  272. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +5 -4
  273. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerMetadata.ts +3 -2
  274. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerUsers.ts +3 -2
  275. package/apps/agents-server/src/utils/serverManagement/deleteManagedServer.ts +2 -2
  276. package/apps/agents-server/src/utils/serverManagement/getManagedServerById.ts +1 -1
  277. package/apps/agents-server/src/utils/serverManagement/listManagedServers.ts +1 -1
  278. package/apps/agents-server/src/utils/serverRegistry.ts +0 -24
  279. package/apps/agents-server/src/utils/serverRegistryNode.ts +27 -0
  280. package/apps/agents-server/src/utils/stalwart/createEmailDnsRecordsSection.ts +53 -0
  281. package/apps/agents-server/src/utils/useEmailSmtpWalletConstants.ts +5 -5
  282. package/apps/agents-server/src/utils/userChat/UserChatRecord.ts +13 -0
  283. package/apps/agents-server/src/utils/userChat/UserChatSource.ts +14 -0
  284. package/apps/agents-server/src/utils/userChat/appendQueuedUserChatTurn.ts +9 -2
  285. package/apps/agents-server/src/utils/userChat/createImmediateUserChatAnswerModelRequirements.ts +1 -0
  286. package/apps/agents-server/src/utils/userChat/createRunUserChatJobExecutionContext.ts +7 -17
  287. package/apps/agents-server/src/utils/userChat/createUserChatSummary.ts +10 -2
  288. package/apps/agents-server/src/utils/userChat/finalizeUserChatJob.ts +3 -2
  289. package/apps/agents-server/src/utils/userChat/getUserChat.ts +16 -1
  290. package/apps/agents-server/src/utils/userChat/getUserChatForJobRunner.ts +31 -0
  291. package/apps/agents-server/src/utils/userChat/listUserChats.ts +113 -110
  292. package/apps/agents-server/src/utils/userChat/persistFrozenUserChat.ts +21 -6
  293. package/apps/agents-server/src/utils/userChat/persistUserChatJobTerminalState.ts +5 -0
  294. package/apps/agents-server/src/utils/userChat/resolveUserChatWorkerInternalToken.ts +5 -4
  295. package/apps/agents-server/src/utils/userChat/runImmediateUserChatAnswer.ts +2 -6
  296. package/apps/agents-server/src/utils/userChat/runUserChatJob.ts +2 -6
  297. package/apps/agents-server/src/utils/userChat/teamMemberUserChatContext.ts +63 -0
  298. package/apps/agents-server/src/utils/userChat/userChatJobRunReport.ts +30 -0
  299. package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +6 -1
  300. package/apps/agents-server/src/utils/userChat.ts +5 -1
  301. package/apps/agents-server/src/utils/userChatClient/cancelAgentUserTimeout.ts +2 -2
  302. package/apps/agents-server/src/utils/userChatClient/fetchAgentUserTimeouts.ts +2 -2
  303. package/apps/agents-server/src/utils/userChatClient.ts +13 -31
  304. package/apps/agents-server/src/utils/userChatTimeout/UserChatTimeoutRecord.ts +47 -3
  305. package/apps/agents-server/src/utils/userChatTimeout/agentScopedTimeoutBulkActions.ts +11 -17
  306. package/apps/agents-server/src/utils/userChatTimeout/createTimeoutWakeUpMessage.ts +38 -6
  307. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/PlannedMessageSchedule.ts +52 -0
  308. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/hasPlannedMessageRecurrence.ts +13 -0
  309. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/isPlannedMessageScheduleFinished.ts +30 -0
  310. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/normalizePlannedMessageScheduleValues.ts +62 -0
  311. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/parsePlannedMessageSchedule.ts +202 -0
  312. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/resolvePlannedMessageDueAt.ts +121 -0
  313. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule.ts +12 -0
  314. package/apps/agents-server/src/utils/userChatTimeout/setAgentScopedUserChatTimeoutPausedState.ts +66 -0
  315. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/claimNextDueUserChatTimeout.ts +28 -25
  316. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/createUserChatTimeout.ts +76 -5
  317. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/getAgentScopedUserChatTimeout.ts +8 -4
  318. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAgentUserChatTimeouts.ts +4 -1
  319. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAllUserChatTimeouts.ts +37 -0
  320. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/mapUserChatTimeoutRow.ts +9 -0
  321. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/recoverExpiredRunningUserChatTimeouts.ts +3 -2
  322. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/repeatFiredUserChatTimeout.ts +84 -0
  323. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/updateAgentScopedUserChatTimeout.ts +39 -6
  324. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore.ts +2 -0
  325. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutWorker.ts +220 -57
  326. package/apps/agents-server/src/utils/userChatTimeout.ts +16 -0
  327. package/apps/agents-server/src/utils/userWallet/UserWalletRecord.ts +1 -1
  328. package/apps/agents-server/src/utils/userWallet/resolveUseEmailSmtpCredentialFromWallet.ts +1 -1
  329. package/apps/agents-server/src/utils/vpsSelfUpdate/deleteVpsSelfUpdateInstalledVersion.ts +2 -1
  330. package/apps/agents-server/src/utils/vpsSelfUpdate/isVpsSelfUpdateJobRunning.ts +16 -0
  331. package/apps/agents-server/src/utils/vpsSelfUpdate/startVpsSelfUpdate.ts +2 -1
  332. package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateCron.ts +23 -316
  333. package/apps/agents-server/src/utils/vpsSelfUpdate.ts +1 -0
  334. package/apps/agents-server/tests/e2e/support/AgentManagementApi.ts +3 -3
  335. package/esm/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
  336. package/esm/index.es.js +9409 -8271
  337. package/esm/index.es.js.map +1 -1
  338. package/esm/scripts/run-agent-messages/git/commitAgentProjectChanges.d.ts +15 -0
  339. package/esm/scripts/run-agent-messages/git/commitAnsweredMessageProjectChanges.d.ts +24 -0
  340. package/esm/scripts/run-agent-messages/git/ensureAgentProjectGitRepository.d.ts +20 -0
  341. package/esm/scripts/run-agent-messages/git/readAgentProjectCommitChange.d.ts +11 -0
  342. package/esm/scripts/run-agent-messages/git/runAgentProjectGitCommand.d.ts +29 -0
  343. package/esm/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
  344. package/esm/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
  345. package/esm/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
  346. package/esm/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
  347. package/esm/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
  348. package/esm/scripts/run-agent-messages/messages/listAgentProjectDirectoryNames.d.ts +7 -0
  349. package/esm/scripts/run-agent-messages/messages/loadAgentPlannedMessagesSidecar.d.ts +10 -0
  350. package/esm/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
  351. package/esm/scripts/run-agent-messages/messages/resolveAnsweredMessageTouches.d.ts +29 -0
  352. package/esm/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +54 -0
  353. package/esm/scripts/run-codex-prompts/common/applyCoderRunControlKey.d.ts +14 -0
  354. package/esm/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +7 -0
  355. package/esm/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
  356. package/esm/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
  357. package/esm/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +17 -0
  358. package/esm/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
  359. package/esm/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +25 -0
  360. package/esm/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
  361. package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +4 -0
  362. package/esm/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
  363. package/esm/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +15 -0
  364. package/esm/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
  365. package/esm/scripts/run-codex-prompts/git/coderGitSync.d.ts +15 -2
  366. package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +9 -3
  367. package/esm/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
  368. package/esm/scripts/run-codex-prompts/ping/pingCoderHarnessPeriodically.d.ts +22 -0
  369. package/esm/scripts/run-codex-prompts/prompts/buildPromptLabel.d.ts +6 -0
  370. package/esm/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +51 -0
  371. package/esm/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
  372. package/esm/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
  373. package/esm/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
  374. package/esm/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
  375. package/esm/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +35 -1
  376. package/esm/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
  377. package/esm/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +30 -0
  378. package/esm/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
  379. package/esm/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
  380. package/esm/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
  381. package/esm/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +15 -0
  382. package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +3 -0
  383. package/esm/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeSubscriptionUsage.d.ts +11 -0
  384. package/esm/scripts/run-codex-prompts/runners/common/estimateUsageFromTextLength.d.ts +33 -0
  385. package/esm/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
  386. package/esm/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
  387. package/esm/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +8 -0
  388. package/esm/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
  389. package/esm/scripts/run-codex-prompts/runners/openai-codex/getCodexSubscriptionUsage.d.ts +19 -0
  390. package/esm/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +23 -0
  391. package/esm/scripts/run-codex-prompts/runners/qwen-code/buildQwenCodeScript.d.ts +8 -0
  392. package/esm/scripts/run-codex-prompts/runners/qwen-code/parseQwenCodeUsageFromOutput.d.ts +9 -0
  393. package/esm/scripts/run-codex-prompts/runners/qwen-code/qwen-code-pricing.d.ts +30 -0
  394. package/esm/scripts/run-codex-prompts/runners/types/HarnessSubscriptionUsage.d.ts +43 -0
  395. package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
  396. package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
  397. package/esm/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
  398. package/esm/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
  399. package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +21 -1
  400. package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
  401. package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +8 -1
  402. package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
  403. package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +11 -0
  404. package/esm/scripts/run-codex-prompts/ui/buildSubscriptionUsageSessionRows.d.ts +11 -0
  405. package/esm/scripts/run-codex-prompts/ui/refreshCoderRunUiSubscriptionUsage.d.ts +14 -0
  406. package/esm/scripts/utils/emojiTags/validSinglePictogramEmojis.d.ts +17 -0
  407. package/esm/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
  408. package/esm/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
  409. package/esm/scripts/verify-prompts/verify-prompts.d.ts +3 -2
  410. package/esm/src/_packages/components.index.d.ts +4 -0
  411. package/esm/src/_packages/types.index.d.ts +4 -0
  412. package/esm/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  413. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  414. package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
  415. package/esm/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
  416. package/esm/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  417. package/esm/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  418. package/esm/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  419. package/esm/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  420. package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  421. package/esm/src/book-3.0/cliAgentEnv.d.ts +3 -3
  422. package/esm/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  423. package/esm/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  424. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  425. package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  426. package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  427. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  428. package/esm/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  429. package/esm/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  430. package/esm/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  431. package/esm/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  432. package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  433. package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  434. package/esm/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  435. package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
  436. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
  437. package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
  438. package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  439. package/esm/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +1 -1
  440. package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  441. package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -3
  442. package/esm/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
  443. package/esm/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
  444. package/esm/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
  445. package/esm/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +26 -0
  446. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
  447. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
  448. package/esm/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
  449. package/esm/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
  450. package/esm/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
  451. package/esm/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
  452. package/esm/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
  453. package/esm/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +29 -0
  454. package/esm/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.d.ts → npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
  455. package/esm/src/cli/cli-commands/common/{harness/$resolveLatestHarnessVersion.d.ts → npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  456. package/esm/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
  457. package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  458. package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  459. package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  460. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
  461. package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  462. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
  463. package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  464. package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  465. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  466. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  467. package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  468. package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  469. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  470. package/esm/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
  471. package/esm/src/commitments/META_ID/META_ID.d.ts +32 -0
  472. package/esm/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
  473. package/esm/src/commitments/index.d.ts +4 -12
  474. package/esm/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  475. package/esm/src/llm-providers/agent/Agent.d.ts +1 -1
  476. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
  477. package/esm/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
  478. package/esm/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  479. package/esm/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  480. package/esm/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  481. package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  482. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  483. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  484. package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  485. package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  486. package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  487. package/esm/src/utils/misc/debounce.d.ts +4 -2
  488. package/esm/src/utils/misc/emojis.d.ts +3 -2
  489. package/esm/src/version.d.ts +1 -1
  490. package/package.json +2 -2
  491. package/src/_packages/components.index.ts +4 -0
  492. package/src/_packages/components.readme.md +1 -1
  493. package/src/_packages/types.index.ts +4 -0
  494. package/src/avatars/renderAvatarVisualTerminalText.ts +249 -0
  495. package/src/avatars/types/AvatarVisualDefinition.ts +60 -0
  496. package/src/avatars/visuals/asciiOctopusAvatarVisual.ts +144 -22
  497. package/src/book-2.0/agent-source/AgentBasicInformation.ts +3 -9
  498. package/src/book-2.0/agent-source/AgentSourceParseResult.ts +6 -0
  499. package/src/book-2.0/agent-source/ParsedUnknownCommitment.ts +29 -0
  500. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.ts +38 -1
  501. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/filterCommitmentsForAgentModelRequirements.ts +0 -23
  502. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.ts +0 -2
  503. package/src/book-2.0/agent-source/getBookCommitmentLineType.ts +36 -0
  504. package/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.ts +16 -31
  505. package/src/book-2.0/agent-source/parseAgentSource/createCapabilitiesFromCommitment.ts +0 -35
  506. package/src/book-2.0/agent-source/parseAgentSourceWithCommitments.ts +128 -61
  507. package/src/book-2.0/agent-source/string_book.ts +1 -1
  508. package/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.ts +0 -25
  509. package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +7 -14
  510. package/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.ts +13 -33
  511. package/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.ts +12 -32
  512. package/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.ts +1 -4
  513. package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +4 -17
  514. package/src/book-3.0/AgentMessageRunReport.ts +135 -0
  515. package/src/book-3.0/AgentPlannedMessagesSidecar.ts +284 -0
  516. package/src/book-3.0/AgentTeamConversationWorkspace.ts +170 -0
  517. package/src/book-3.0/cliAgentEnv.ts +3 -2
  518. package/src/book-3.0/createAgentMessageSidecarBaseName.ts +20 -0
  519. package/src/book-3.0/describeAgentPlannedMessageSchedule.ts +94 -0
  520. package/src/book-components/BookEditor/BookEditorMonaco.tsx +8 -1
  521. package/src/book-components/BookEditor/BookEditorMonacoTokenization.ts +3 -1
  522. package/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.ts +3 -11
  523. package/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.ts +71 -0
  524. package/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.ts +50 -0
  525. package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +1 -1
  526. package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +56 -55
  527. package/src/book-components/Chat/Chat/Chat.module.css +172 -27
  528. package/src/book-components/Chat/Chat/ChatMessageMap.tsx +7 -4
  529. package/src/book-components/Chat/Chat/ChatProps.tsx +3 -2
  530. package/src/book-components/Chat/Chat/renderAgentProjectDiff.tsx +85 -0
  531. package/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.tsx +206 -0
  532. package/src/book-components/Chat/Chat/renderToolCallDetails.tsx +9 -12
  533. package/src/book-components/Chat/MarkdownContent/MarkdownContent.module.css +85 -17
  534. package/src/book-components/Chat/MarkdownContent/MarkdownContent.tsx +115 -2
  535. package/src/book-components/Chat/save/react/exports/chat-preview-2025-10-13 (1).jsx +95 -5
  536. package/src/book-components/Chat/utils/agentProjectToolCall.ts +151 -0
  537. package/src/book-components/Chat/utils/externalSourceToolCall.ts +65 -0
  538. package/src/book-components/Chat/utils/getToolCallChipletInfo.ts +64 -0
  539. package/src/book-components/Chat/utils/renderMarkdown.ts +658 -96
  540. package/src/book-components/Chat/utils/timeoutToolCallPresentation.ts +34 -3
  541. package/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.ts +1 -1
  542. package/src/cli/cli-commands/coder/GitChangesMode.ts +35 -0
  543. package/src/cli/cli-commands/coder/add.ts +3 -3
  544. package/src/cli/cli-commands/coder/boilerplateCount.ts +139 -0
  545. package/src/cli/cli-commands/coder/boilerplateTemplates.ts +3 -15
  546. package/src/cli/cli-commands/coder/generate-boilerplates.ts +55 -47
  547. package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +7 -4
  548. package/src/cli/cli-commands/coder/init.ts +16 -6
  549. package/src/cli/cli-commands/coder/ping.ts +45 -9
  550. package/src/cli/cli-commands/coder/run.ts +23 -4
  551. package/src/cli/cli-commands/coder/server.ts +12 -3
  552. package/src/cli/cli-commands/coder/verify.ts +29 -5
  553. package/src/cli/cli-commands/coder/waitOptions.ts +33 -0
  554. package/src/cli/cli-commands/common/coderGitSyncCliOptions.ts +6 -2
  555. package/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.ts +66 -10
  556. package/src/cli/cli-commands/common/harness/$checkHarnessInstallation.ts +32 -9
  557. package/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.ts +6 -3
  558. package/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.ts +46 -0
  559. package/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.ts +36 -0
  560. package/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.ts +2 -2
  561. package/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.ts +100 -0
  562. package/src/cli/cli-commands/common/harness/HarnessDefinition.ts +40 -0
  563. package/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.ts +44 -0
  564. package/src/cli/cli-commands/common/harness/HarnessInstallationStatus.ts +9 -2
  565. package/src/cli/cli-commands/common/harness/HarnessUpdatePlan.ts +27 -0
  566. package/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.ts +6 -2
  567. package/src/cli/cli-commands/common/harness/formatHarnessInstallationWarning.ts +28 -6
  568. package/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.ts +41 -0
  569. package/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.ts +111 -0
  570. package/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.ts +47 -0
  571. package/src/cli/cli-commands/common/harnessUpdateCliOptions.ts +46 -0
  572. package/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.ts → npm/$askForNpmPackageInstallationApproval.ts} +3 -3
  573. package/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.ts +49 -0
  574. package/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.ts +51 -0
  575. package/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.ts +28 -0
  576. package/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.ts +25 -0
  577. package/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.ts +165 -0
  578. package/src/cli/cli-commands/common/projectInitialization.ts +10 -1
  579. package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +38 -12
  580. package/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.ts +69 -0
  581. package/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.ts +117 -0
  582. package/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.ts +259 -0
  583. package/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.ts +55 -0
  584. package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.ts +76 -0
  585. package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.ts +32 -0
  586. package/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.ts +13 -0
  587. package/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.ts +45 -0
  588. package/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.ts +47 -3
  589. package/src/commands/FORMAT/formatCommandParser.ts +4 -2
  590. package/src/commitments/ACTION/ACTION.ts +3 -3
  591. package/src/commitments/FROM/FROM.ts +13 -0
  592. package/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.ts +1 -1
  593. package/src/commitments/META_FULLNAME/META_FULLNAME.ts +70 -0
  594. package/src/commitments/META_ID/META_ID.ts +78 -0
  595. package/src/commitments/WRITING_RULES/WRITING_RULES.ts +16 -8
  596. package/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.ts +1 -49
  597. package/src/commitments/index.ts +8 -25
  598. package/src/executables/platforms/locateAppOnWindows.ts +12 -9
  599. package/src/llm-providers/agent/Agent.ts +1 -1
  600. package/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.ts +2 -2
  601. package/src/llm-providers/openai/utils/buildToolInvocationScript.ts +21 -18
  602. package/src/other/templates/getTemplatesPipelineCollection.ts +1022 -697
  603. package/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.ts +8 -9
  604. package/src/utils/agent-message-runtime/AgentMessageProjectChange.ts +183 -0
  605. package/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.ts +80 -0
  606. package/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.ts +108 -0
  607. package/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.ts +78 -75
  608. package/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.ts +341 -0
  609. package/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.ts +147 -0
  610. package/src/utils/agents/terminalAgentAvatarVisual.ts +31 -3
  611. package/src/utils/ascii-art/convertImageDataToAsciiArt.ts +9 -109
  612. package/src/utils/ascii-art/createAnsiColorCode.ts +132 -0
  613. package/src/utils/misc/debounce.ts +26 -5
  614. package/src/utils/misc/emojis.ts +3 -3
  615. package/src/utils/random/$generateBookBoilerplate.ts +1 -1
  616. package/src/version.ts +2 -2
  617. package/src/versions.txt +25 -0
  618. package/umd/apps/agents-server/src/constants/federatedAgentImport.d.ts +6 -0
  619. package/umd/index.umd.js +9413 -8275
  620. package/umd/index.umd.js.map +1 -1
  621. package/umd/scripts/run-agent-messages/git/commitAgentProjectChanges.d.ts +15 -0
  622. package/umd/scripts/run-agent-messages/git/commitAnsweredMessageProjectChanges.d.ts +24 -0
  623. package/umd/scripts/run-agent-messages/git/ensureAgentProjectGitRepository.d.ts +20 -0
  624. package/umd/scripts/run-agent-messages/git/readAgentProjectCommitChange.d.ts +11 -0
  625. package/umd/scripts/run-agent-messages/git/runAgentProjectGitCommand.d.ts +29 -0
  626. package/umd/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
  627. package/umd/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
  628. package/umd/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
  629. package/umd/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
  630. package/umd/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
  631. package/umd/scripts/run-agent-messages/messages/listAgentProjectDirectoryNames.d.ts +7 -0
  632. package/umd/scripts/run-agent-messages/messages/loadAgentPlannedMessagesSidecar.d.ts +10 -0
  633. package/umd/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
  634. package/umd/scripts/run-agent-messages/messages/resolveAnsweredMessageTouches.d.ts +29 -0
  635. package/umd/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +54 -0
  636. package/umd/scripts/run-codex-prompts/common/applyCoderRunControlKey.d.ts +14 -0
  637. package/umd/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +7 -0
  638. package/umd/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
  639. package/umd/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
  640. package/umd/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +17 -0
  641. package/umd/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
  642. package/umd/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +25 -0
  643. package/umd/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
  644. package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +4 -0
  645. package/umd/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
  646. package/umd/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +15 -0
  647. package/umd/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
  648. package/umd/scripts/run-codex-prompts/git/coderGitSync.d.ts +15 -2
  649. package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +9 -3
  650. package/umd/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
  651. package/umd/scripts/run-codex-prompts/ping/pingCoderHarnessPeriodically.d.ts +22 -0
  652. package/umd/scripts/run-codex-prompts/prompts/buildPromptLabel.d.ts +6 -0
  653. package/umd/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +51 -0
  654. package/umd/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
  655. package/umd/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
  656. package/umd/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
  657. package/umd/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
  658. package/umd/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +35 -1
  659. package/umd/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
  660. package/umd/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +30 -0
  661. package/umd/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
  662. package/umd/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
  663. package/umd/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
  664. package/umd/scripts/run-codex-prompts/runners/claude-code/ClaudeCodeRunner.d.ts +15 -0
  665. package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeOutputEvents.d.ts +3 -0
  666. package/umd/scripts/run-codex-prompts/runners/claude-code/parseClaudeCodeSubscriptionUsage.d.ts +11 -0
  667. package/umd/scripts/run-codex-prompts/runners/common/estimateUsageFromTextLength.d.ts +33 -0
  668. package/umd/scripts/run-codex-prompts/runners/common/modelPricing.d.ts +41 -0
  669. package/umd/scripts/run-codex-prompts/runners/gemini/gemini-pricing.d.ts +5 -18
  670. package/umd/scripts/run-codex-prompts/runners/openai-codex/OpenAiCodexRunner.d.ts +8 -0
  671. package/umd/scripts/run-codex-prompts/runners/openai-codex/buildCodexUsageFromOutput.d.ts +4 -1
  672. package/umd/scripts/run-codex-prompts/runners/openai-codex/getCodexSubscriptionUsage.d.ts +19 -0
  673. package/umd/scripts/run-codex-prompts/runners/qwen-code/QwenCodeRunner.d.ts +23 -0
  674. package/umd/scripts/run-codex-prompts/runners/qwen-code/buildQwenCodeScript.d.ts +8 -0
  675. package/umd/scripts/run-codex-prompts/runners/qwen-code/parseQwenCodeUsageFromOutput.d.ts +9 -0
  676. package/umd/scripts/run-codex-prompts/runners/qwen-code/qwen-code-pricing.d.ts +30 -0
  677. package/umd/scripts/run-codex-prompts/runners/types/HarnessSubscriptionUsage.d.ts +43 -0
  678. package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
  679. package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
  680. package/umd/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
  681. package/umd/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
  682. package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +21 -1
  683. package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
  684. package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +8 -1
  685. package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
  686. package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +11 -0
  687. package/umd/scripts/run-codex-prompts/ui/buildSubscriptionUsageSessionRows.d.ts +11 -0
  688. package/umd/scripts/run-codex-prompts/ui/refreshCoderRunUiSubscriptionUsage.d.ts +14 -0
  689. package/umd/scripts/utils/emojiTags/validSinglePictogramEmojis.d.ts +17 -0
  690. package/umd/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
  691. package/umd/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
  692. package/umd/scripts/verify-prompts/verify-prompts.d.ts +3 -2
  693. package/umd/src/_packages/components.index.d.ts +4 -0
  694. package/umd/src/_packages/types.index.d.ts +4 -0
  695. package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  696. package/umd/src/avatars/renderAvatarVisualTerminalText.test.d.ts +1 -0
  697. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  698. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
  699. package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
  700. package/umd/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  701. package/umd/src/book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts +1 -0
  702. package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts +1 -0
  703. package/umd/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  704. package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
  705. package/umd/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  706. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  707. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
  708. package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  709. package/umd/src/book-3.0/cliAgentEnv.d.ts +3 -3
  710. package/umd/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  711. package/umd/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  712. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  713. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  714. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
  715. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  716. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
  717. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  718. package/umd/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  719. package/umd/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  720. package/umd/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  721. package/umd/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
  722. package/umd/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  723. package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  724. package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  725. package/umd/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  726. package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
  727. package/umd/src/cli/cli-commands/coder/boilerplateCount.test.d.ts +1 -0
  728. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
  729. package/umd/src/cli/cli-commands/coder/generate-boilerplates.test.d.ts +1 -0
  730. package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
  731. package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  732. package/umd/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.d.ts +1 -1
  733. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  734. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
  735. package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -3
  736. package/umd/src/cli/cli-commands/common/harness/$resolveHarnessCommandPath.d.ts +14 -0
  737. package/umd/src/cli/cli-commands/common/harness/$resolveHarnessInstallationOrigin.d.ts +10 -0
  738. package/umd/src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.d.ts +43 -0
  739. package/umd/src/cli/cli-commands/common/harness/HarnessDefinition.d.ts +26 -0
  740. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationOrigin.d.ts +36 -0
  741. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +8 -2
  742. package/umd/src/cli/cli-commands/common/harness/HarnessUpdatePlan.d.ts +23 -0
  743. package/umd/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.d.ts +4 -1
  744. package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.d.ts +8 -0
  745. package/umd/src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts +1 -0
  746. package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.d.ts +31 -0
  747. package/umd/src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts +1 -0
  748. package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.d.ts +12 -0
  749. package/umd/src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts +1 -0
  750. package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +29 -0
  751. package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts +1 -0
  752. package/umd/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.d.ts → npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
  753. package/umd/src/cli/cli-commands/common/{harness/$resolveLatestHarnessVersion.d.ts → npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  754. package/umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
  755. package/umd/src/cli/cli-commands/common/npm/$resolveNpmGlobalPrefixPath.d.ts +9 -0
  756. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  757. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
  758. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  759. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
  760. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  761. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
  762. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +17 -4
  763. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  764. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
  765. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
  766. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
  767. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  768. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
  769. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  770. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
  771. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  772. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  773. package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  774. package/umd/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  775. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  776. package/umd/src/commitments/{COMPONENT/COMPONENT.d.ts → META_FULLNAME/META_FULLNAME.d.ts} +8 -5
  777. package/umd/src/commitments/META_ID/META_ID.d.ts +32 -0
  778. package/umd/src/commitments/WRITING_RULES/WRITING_RULES.d.ts +14 -7
  779. package/umd/src/commitments/index.d.ts +4 -12
  780. package/umd/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  781. package/umd/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
  782. package/umd/src/llm-providers/agent/Agent.d.ts +1 -1
  783. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +1 -1
  784. package/umd/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
  785. package/umd/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  786. package/umd/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  787. package/umd/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  788. package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  789. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  790. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
  791. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  792. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
  793. package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  794. package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  795. package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  796. package/umd/src/utils/misc/debounce.d.ts +4 -2
  797. package/umd/src/utils/misc/debounce.test.d.ts +1 -0
  798. package/umd/src/utils/misc/emojis.d.ts +3 -2
  799. package/umd/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
  800. package/umd/src/version.d.ts +1 -1
  801. package/apps/agents-server/scripts/ignore-kill-eperm.js +0 -31
  802. package/apps/agents-server/src/app/admin/task-manager/TaskManagerScopeTabs.tsx +0 -74
  803. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/actions/route.ts +0 -103
  804. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsClient.tsx +0 -43
  805. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsEditDialog.tsx +0 -98
  806. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsFiltersCard.tsx +0 -75
  807. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsHeader.tsx +0 -53
  808. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsSummaryMetrics.tsx +0 -70
  809. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableCard.tsx +0 -58
  810. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableRow.tsx +0 -242
  811. package/apps/agents-server/src/app/agents/[agentName]/timeouts/loading.tsx +0 -15
  812. package/apps/agents-server/src/app/agents/[agentName]/timeouts/page.tsx +0 -28
  813. package/apps/agents-server/src/app/agents/[agentName]/timeouts/useAgentTimeoutsClientState.ts +0 -769
  814. package/apps/agents-server/src/components/AgentProjectDnsInstructions/AgentProjectDnsInstructions.tsx +0 -182
  815. package/apps/agents-server/src/tools/configureTimeoutToolRuntimeAdapterForServer.ts +0 -381
  816. package/apps/agents-server/src/utils/emails/extractUseEmailConfigurationFromAgentSource.ts +0 -42
  817. package/apps/agents-server/src/utils/userChatClient/runAgentUserTimeoutBulkAction.ts +0 -24
  818. package/apps/agents-server/src/utils/userChatClient/updateAgentUserTimeout.ts +0 -25
  819. package/esm/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +0 -69
  820. package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +0 -7
  821. package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +0 -30
  822. package/esm/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +0 -76
  823. package/esm/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +0 -4
  824. package/esm/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +0 -28
  825. package/esm/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +0 -110
  826. package/esm/scripts/find-fresh-emoji-tags/utils/emojis.d.ts +0 -16
  827. package/esm/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
  828. package/esm/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
  829. package/esm/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
  830. package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  831. package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  832. package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -48
  833. package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
  834. package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
  835. package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
  836. package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
  837. package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
  838. package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
  839. package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  840. package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
  841. package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
  842. package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
  843. package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
  844. package/esm/src/commitments/META/META.d.ts +0 -65
  845. package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
  846. package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
  847. package/esm/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
  848. package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
  849. package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
  850. package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
  851. package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
  852. package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
  853. package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
  854. package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
  855. package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
  856. package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
  857. package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
  858. package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
  859. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
  860. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
  861. package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
  862. package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
  863. package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
  864. package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
  865. package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  866. package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
  867. package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
  868. package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
  869. package/esm/src/commitments/WALLET/WALLET.d.ts +0 -21
  870. package/esm/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
  871. package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
  872. package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
  873. package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
  874. package/esm/src/commitments/WALLET/createWalletTools.d.ts +0 -7
  875. package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
  876. package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
  877. package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
  878. package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
  879. package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
  880. package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
  881. package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
  882. package/src/cli/cli-commands/common/harness/$installHarness.ts +0 -56
  883. package/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.ts +0 -34
  884. package/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.ts +0 -28
  885. package/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.ts +0 -39
  886. package/src/commitments/COMPONENT/COMPONENT.ts +0 -70
  887. package/src/commitments/MEMORY/MEMORY.ts +0 -94
  888. package/src/commitments/MEMORY/MemoryToolNames.ts +0 -13
  889. package/src/commitments/MEMORY/MemoryToolRuntimeAdapter.ts +0 -180
  890. package/src/commitments/MEMORY/createMemorySystemMessage.ts +0 -27
  891. package/src/commitments/MEMORY/createMemoryToolFunctions.ts +0 -134
  892. package/src/commitments/MEMORY/createMemoryTools.ts +0 -115
  893. package/src/commitments/MEMORY/getMemoryCommitmentDocumentation.ts +0 -47
  894. package/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.ts +0 -104
  895. package/src/commitments/MEMORY/getMemoryToolTitles.ts +0 -16
  896. package/src/commitments/MEMORY/parseMemoryToolArgs.ts +0 -126
  897. package/src/commitments/MEMORY/resolveMemoryRuntimeContext.ts +0 -23
  898. package/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.ts +0 -26
  899. package/src/commitments/META/META.ts +0 -168
  900. package/src/commitments/USE/TODO.txt +0 -1
  901. package/src/commitments/USE/aggregateUseCommitmentSystemMessages.ts +0 -219
  902. package/src/commitments/USE_BROWSER/TODO.txt +0 -1
  903. package/src/commitments/USE_BROWSER/USE_BROWSER.ts +0 -257
  904. package/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.ts +0 -45
  905. package/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.ts +0 -83
  906. package/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.ts +0 -146
  907. package/src/commitments/USE_EMAIL/USE_EMAIL.ts +0 -201
  908. package/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.ts +0 -75
  909. package/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.ts +0 -44
  910. package/src/commitments/USE_EMAIL/sendEmailViaBrowser.ts +0 -47
  911. package/src/commitments/USE_SEARCH_ENGINE/TODO.txt +0 -1
  912. package/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.ts +0 -171
  913. package/src/commitments/USE_SPAWN/USE_SPAWN.ts +0 -150
  914. package/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.ts +0 -42
  915. package/src/commitments/USE_SPAWN/spawnAgentViaBrowser.ts +0 -50
  916. package/src/commitments/USE_TIME/USE_TIME.ts +0 -177
  917. package/src/commitments/USE_TIMEOUT/TimeoutToolNames.ts +0 -13
  918. package/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.ts +0 -255
  919. package/src/commitments/USE_TIMEOUT/USE_TIMEOUT.ts +0 -117
  920. package/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.ts +0 -22
  921. package/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.ts +0 -361
  922. package/src/commitments/USE_TIMEOUT/createTimeoutTools.ts +0 -127
  923. package/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.ts +0 -67
  924. package/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.ts +0 -460
  925. package/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.ts +0 -36
  926. package/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.ts +0 -26
  927. package/src/commitments/WALLET/WALLET.ts +0 -71
  928. package/src/commitments/WALLET/WalletToolNames.ts +0 -14
  929. package/src/commitments/WALLET/WalletToolRuntimeAdapter.ts +0 -180
  930. package/src/commitments/WALLET/createWalletSystemMessage.ts +0 -22
  931. package/src/commitments/WALLET/createWalletToolFunctions.ts +0 -145
  932. package/src/commitments/WALLET/createWalletTools.ts +0 -129
  933. package/src/commitments/WALLET/getWalletCommitmentDocumentation.ts +0 -14
  934. package/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.ts +0 -64
  935. package/src/commitments/WALLET/getWalletToolTitles.ts +0 -17
  936. package/src/commitments/WALLET/parseWalletToolArgs.ts +0 -231
  937. package/src/commitments/WALLET/resolveWalletRuntimeContext.ts +0 -23
  938. package/src/commitments/WALLET/setWalletToolRuntimeAdapter.ts +0 -26
  939. package/src/commitments/_common/createSerpSearchToolFunction.ts +0 -46
  940. package/umd/apps/agents-server/src/database/sqlite/$provideAgentsServerSqliteDatabase.d.ts +0 -69
  941. package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/ensureTable.d.ts +0 -7
  942. package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteSql.d.ts +0 -30
  943. package/umd/apps/agents-server/src/database/sqlite/localSqliteSupabase/localSqliteTableSchema.d.ts +0 -76
  944. package/umd/apps/agents-server/src/database/sqlite/resolveAgentsServerSqliteDatabasePath.d.ts +0 -4
  945. package/umd/apps/agents-server/src/database/sqlite/resolveServerSqliteDatabasePath.d.ts +0 -28
  946. package/umd/apps/agents-server/src/database/sqlite/standaloneServerRegistryStore.d.ts +0 -110
  947. package/umd/scripts/find-fresh-emoji-tags/utils/emojis.d.ts +0 -16
  948. package/umd/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
  949. package/umd/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
  950. package/umd/src/cli/cli-commands/common/harness/$installHarness.d.ts +0 -13
  951. package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  952. package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  953. package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -48
  954. package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
  955. package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
  956. package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
  957. package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
  958. package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
  959. package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
  960. package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  961. package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
  962. package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
  963. package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
  964. package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
  965. package/umd/src/commitments/META/META.d.ts +0 -65
  966. package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
  967. package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
  968. package/umd/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
  969. package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
  970. package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
  971. package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
  972. package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
  973. package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
  974. package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
  975. package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
  976. package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
  977. package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
  978. package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
  979. package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
  980. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
  981. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
  982. package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
  983. package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
  984. package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
  985. package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
  986. package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  987. package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
  988. package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
  989. package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
  990. package/umd/src/commitments/WALLET/WALLET.d.ts +0 -21
  991. package/umd/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
  992. package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
  993. package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
  994. package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
  995. package/umd/src/commitments/WALLET/createWalletTools.d.ts +0 -7
  996. package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
  997. package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
  998. package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
  999. package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
  1000. package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
  1001. package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
  1002. package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
  1003. /package/esm/src/{book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
  1004. /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
  1005. /package/esm/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts} +0 -0
  1006. /package/esm/src/{commitments/MEMORY/MEMORY.test.d.ts → book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts} +0 -0
  1007. /package/esm/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → book-3.0/AgentPlannedMessagesSidecar.test.d.ts} +0 -0
  1008. /package/esm/src/{commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts} +0 -0
  1009. /package/esm/src/{commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts} +0 -0
  1010. /package/esm/src/{commitments/USE_EMAIL/USE_EMAIL.test.d.ts → book-components/Chat/utils/agentProjectToolCall.test.d.ts} +0 -0
  1011. /package/esm/src/{commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
  1012. /package/esm/src/{commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
  1013. /package/esm/src/{commitments/USE_SPAWN/USE_SPAWN.test.d.ts → cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts} +0 -0
  1014. /package/esm/src/{commitments/USE_TIME/USE_TIME.test.d.ts → cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.test.d.ts} +0 -0
  1015. /package/esm/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.test.d.ts} +0 -0
  1016. /package/esm/src/{commitments/WALLET/WALLET.test.d.ts → cli/cli-commands/common/harness/resolveHarnessUpdatePlan.test.d.ts} +0 -0
  1017. /package/{umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → esm/src/cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts} +0 -0
  1018. /package/{umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → esm/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts} +0 -0
  1019. /package/{umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts} +0 -0
  1020. /package/{umd/src/commitments/MEMORY/MEMORY.test.d.ts → esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts} +0 -0
  1021. /package/{umd/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts → esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts} +0 -0
  1022. /package/{umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts} +0 -0
  1023. /package/{umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts} +0 -0
  1024. /package/{umd/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts} +0 -0
  1025. /package/{umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts} +0 -0
  1026. /package/esm/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
  1027. /package/{umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → esm/src/executables/platforms/locateAppOnWindows.test.d.ts} +0 -0
  1028. /package/{umd/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts → esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts} +0 -0
  1029. /package/{umd/src/commitments/USE_TIME/USE_TIME.test.d.ts → esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts} +0 -0
  1030. /package/{umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → esm/src/utils/misc/debounce.test.d.ts} +0 -0
  1031. /package/{umd/src/commitments/WALLET/WALLET.test.d.ts → esm/src/utils/random/$generateBookBoilerplate.test.d.ts} +0 -0
  1032. /package/umd/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  import { $execCommand } from '../../../../utils/execCommand/$execCommand';
2
- import { extractHarnessVersionFromOutput } from './extractHarnessVersionFromOutput';
2
+ import { extractNpmPackageVersionFromOutput } from '../npm/extractNpmPackageVersionFromOutput';
3
3
  import type { HarnessDefinition } from './HarnessDefinition';
4
4
 
5
5
  /**
@@ -23,7 +23,7 @@ export async function $resolveInstalledHarnessVersion(definition: HarnessDefinit
23
23
  isVerbose: false,
24
24
  }).catch(() => '');
25
25
 
26
- return extractHarnessVersionFromOutput(output);
26
+ return extractNpmPackageVersionFromOutput(output);
27
27
  }
28
28
 
29
29
  // Note: [🟡] Code for CLI harness version detection [$resolveInstalledHarnessVersion](src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.ts) should never be published outside of `@promptbook/cli`
@@ -0,0 +1,100 @@
1
+ import colors from 'colors';
2
+ import { spaceTrim } from 'spacetrim';
3
+ import { assertsError } from '../../../../errors/assertsError';
4
+ import { $execCommand } from '../../../../utils/execCommand/$execCommand';
5
+ import type { HarnessDefinition } from './HarnessDefinition';
6
+
7
+ /**
8
+ * What one harness installation command does with the harness.
9
+ *
10
+ * @private internal utility of `promptbookCli`
11
+ */
12
+ export type HarnessInstallationOperation = 'install' | 'update';
13
+
14
+ /**
15
+ * Words describing each operation in the terminal output.
16
+ */
17
+ const HARNESS_INSTALLATION_OPERATION_WORDS: Readonly<
18
+ Record<HarnessInstallationOperation, { readonly running: string; readonly finished: string }>
19
+ > = {
20
+ install: { running: 'Installing', finished: 'installed' },
21
+ update: { running: 'Updating', finished: 'updated' },
22
+ };
23
+
24
+ /**
25
+ * Options of one command which installs or updates a CLI coding harness.
26
+ *
27
+ * @private internal utility of `$runHarnessInstallationCommand`
28
+ */
29
+ type HarnessInstallationCommandOptions = {
30
+ /**
31
+ * Harness which is installed or updated.
32
+ */
33
+ readonly definition: HarnessDefinition;
34
+
35
+ /**
36
+ * What the command does with the harness.
37
+ */
38
+ readonly operation: HarnessInstallationOperation;
39
+
40
+ /**
41
+ * Shell command which does it.
42
+ */
43
+ readonly command: string;
44
+
45
+ /**
46
+ * Extra environment variables required by the command.
47
+ */
48
+ readonly environment?: Readonly<Record<string, string>>;
49
+ };
50
+
51
+ /**
52
+ * Runs one command which installs or updates a CLI coding harness.
53
+ *
54
+ * A failed installation is reported but never aborts the running command, because the harness check
55
+ * is only an assistant - the command itself may still work with a manually managed harness.
56
+ *
57
+ * Note: `$` is used to indicate that this function is not a pure function - it installs software
58
+ *
59
+ * @returns `true` when the command succeeded, `false` when it failed
60
+ * @private internal utility of `promptbookCli`
61
+ */
62
+ export async function $runHarnessInstallationCommand(options: HarnessInstallationCommandOptions): Promise<boolean> {
63
+ const { definition, operation, command, environment } = options;
64
+ const operationWords = HARNESS_INSTALLATION_OPERATION_WORDS[operation];
65
+
66
+ console.info(colors.cyan(`${operationWords.running} ${definition.label} with \`${command}\`...`));
67
+
68
+ try {
69
+ await $execCommand({
70
+ command,
71
+ crashOnError: true,
72
+ isVerbose: true,
73
+ env: environment ? { ...environment } : undefined,
74
+ });
75
+ } catch (error) {
76
+ assertsError(error);
77
+ const installErrorMessage = error.message;
78
+
79
+ console.error(
80
+ colors.red(
81
+ spaceTrim(
82
+ (block) => `
83
+ Could not ${operation} **${definition.label}**.
84
+
85
+ Run \`${command}\` manually and run the command again.
86
+
87
+ ${block(installErrorMessage)}
88
+ `,
89
+ ),
90
+ ),
91
+ );
92
+
93
+ return false;
94
+ }
95
+
96
+ console.info(colors.green(`${definition.label} has been ${operationWords.finished}.`));
97
+ return true;
98
+ }
99
+
100
+ // Note: [🟡] Code for CLI harness installation commands [$runHarnessInstallationCommand](src/cli/cli-commands/common/harness/$runHarnessInstallationCommand.ts) should never be published outside of `@promptbook/cli`
@@ -2,6 +2,28 @@ import { spaceTrim } from 'spacetrim';
2
2
  import { UnexpectedError } from '../../../../errors/UnexpectedError';
3
3
  import type { PromptRunnerHarnessName } from '../promptRunnerCliOptions';
4
4
 
5
+ /**
6
+ * Description of a standalone *(self-managed)* installation of one CLI coding harness.
7
+ *
8
+ * Some harnesses are also distributed by their own installer which puts the harness outside of npm and
9
+ * updates it in place. Such an installation must never be updated with `npm install -g`, because that
10
+ * installs a second copy of the harness instead of updating the one which is really used.
11
+ *
12
+ * @private internal utility of `promptbookCli`
13
+ */
14
+ export type HarnessStandaloneInstallation = {
15
+ /**
16
+ * Directory names which appear in the resolved path of a standalone installation of the harness,
17
+ * for example `.codex` in `~/.codex/packages/standalone/current/bin/codex`.
18
+ */
19
+ readonly directoryNames: ReadonlyArray<string>;
20
+
21
+ /**
22
+ * Command which updates the standalone installation in place.
23
+ */
24
+ readonly updateCommand: string;
25
+ };
26
+
5
27
  /**
6
28
  * Static description of one supported CLI coding harness.
7
29
  *
@@ -32,6 +54,13 @@ export type HarnessDefinition = {
32
54
  * Extra environment variables required by the global npm installation of this harness.
33
55
  */
34
56
  readonly npmInstallEnvironment?: Readonly<Record<string, string>>;
57
+
58
+ /**
59
+ * How a standalone installation of this harness is recognized and updated.
60
+ *
61
+ * Harnesses which are distributed only through npm leave this undefined.
62
+ */
63
+ readonly standaloneInstallation?: HarnessStandaloneInstallation;
35
64
  };
36
65
 
37
66
  /**
@@ -45,6 +74,11 @@ export const HARNESS_DEFINITIONS: Readonly<Record<PromptRunnerHarnessName, Harne
45
74
  label: 'OpenAI Codex',
46
75
  commandName: 'codex',
47
76
  npmPackageName: '@openai/codex',
77
+ // Note: The official standalone installer keeps its package in `~/.codex` and links it onto the `PATH`
78
+ standaloneInstallation: {
79
+ directoryNames: ['.codex'],
80
+ updateCommand: 'codex update',
81
+ },
48
82
  },
49
83
  'github-copilot': {
50
84
  harnessName: 'github-copilot',
@@ -78,6 +112,12 @@ export const HARNESS_DEFINITIONS: Readonly<Record<PromptRunnerHarnessName, Harne
78
112
  commandName: 'gemini',
79
113
  npmPackageName: '@google/gemini-cli',
80
114
  },
115
+ 'qwen-code': {
116
+ harnessName: 'qwen-code',
117
+ label: 'Qwen Code',
118
+ commandName: 'qwen',
119
+ npmPackageName: '@qwen-code/qwen-code',
120
+ },
81
121
  };
82
122
 
83
123
  /**
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Way in which the globally available harness command got onto the current machine.
3
+ *
4
+ * - `npm-global` the command comes from a global npm installation, so `npm install -g` really updates it
5
+ * - `standalone` the command was installed by the own installer of the harness and updates itself in place
6
+ * - `homebrew` the command is managed by Homebrew, so only `brew` may update it
7
+ * - `unknown` the command lives somewhere else or could not be located at all
8
+ *
9
+ * @private internal utility of `promptbookCli`
10
+ */
11
+ export type HarnessInstallationMethod = 'npm-global' | 'standalone' | 'homebrew' | 'unknown';
12
+
13
+ /**
14
+ * Place where the harness command really lives together with the way it was installed there.
15
+ *
16
+ * Knowing the origin is what keeps an update from installing a **second** copy of a harness which is
17
+ * managed outside of npm, for example the standalone installation of OpenAI Codex.
18
+ *
19
+ * @private internal utility of `promptbookCli`
20
+ */
21
+ export type HarnessInstallationOrigin = {
22
+ /**
23
+ * Resolved path of the harness command with every symbolic link followed
24
+ * or `null` when the command could not be located.
25
+ */
26
+ readonly commandPath: string | null;
27
+
28
+ /**
29
+ * Way in which the harness command was installed.
30
+ */
31
+ readonly installationMethod: HarnessInstallationMethod;
32
+ };
33
+
34
+ /**
35
+ * Origin used when the harness command was not looked up at all, for example when the update check is disabled.
36
+ *
37
+ * @private internal utility of `promptbookCli`
38
+ */
39
+ export const UNKNOWN_HARNESS_INSTALLATION_ORIGIN: HarnessInstallationOrigin = {
40
+ commandPath: null,
41
+ installationMethod: 'unknown',
42
+ };
43
+
44
+ // Note: [🟡] Code for CLI harness installation origin [HarnessInstallationOrigin](src/cli/cli-commands/common/harness/HarnessInstallationOrigin.ts) should never be published outside of `@promptbook/cli`
@@ -1,4 +1,5 @@
1
1
  import type { HarnessDefinition } from './HarnessDefinition';
2
+ import type { HarnessInstallationOrigin } from './HarnessInstallationOrigin';
2
3
 
3
4
  /**
4
5
  * Result of comparing the globally installed harness version with the newest published one.
@@ -6,11 +7,12 @@ import type { HarnessDefinition } from './HarnessDefinition';
6
7
  * - `up-to-date` the newest published version is installed
7
8
  * - `outdated` an older version is installed
8
9
  * - `not-installed` the harness command is not available globally
10
+ * - `installed` the harness is installed and automatic update checking was disabled
9
11
  * - `unknown` the harness is installed but the newest published version could not be resolved, for example when offline
10
12
  *
11
13
  * @private internal utility of `promptbookCli`
12
14
  */
13
- export type HarnessInstallationState = 'up-to-date' | 'outdated' | 'not-installed' | 'unknown';
15
+ export type HarnessInstallationState = 'up-to-date' | 'outdated' | 'not-installed' | 'installed' | 'unknown';
14
16
 
15
17
  /**
16
18
  * Installation state of one CLI coding harness on the current machine.
@@ -24,7 +26,7 @@ export type HarnessInstallationStatus = {
24
26
  readonly definition: HarnessDefinition;
25
27
 
26
28
  /**
27
- * Comparison of the installed version with the newest published one.
29
+ * Installation state, including whether the newest published version was checked.
28
30
  */
29
31
  readonly installationState: HarnessInstallationState;
30
32
 
@@ -37,6 +39,11 @@ export type HarnessInstallationStatus = {
37
39
  * Newest version published to npm or `null` when it could not be resolved.
38
40
  */
39
41
  readonly latestVersion: string | null;
42
+
43
+ /**
44
+ * Place where the harness command lives together with the way it was installed there.
45
+ */
46
+ readonly installationOrigin: HarnessInstallationOrigin;
40
47
  };
41
48
 
42
49
  // Note: [🟡] Code for CLI harness installation status [HarnessInstallationStatus](src/cli/cli-commands/common/harness/HarnessInstallationStatus.ts) should never be published outside of `@promptbook/cli`
@@ -0,0 +1,27 @@
1
+ /**
2
+ * How an outdated CLI coding harness can be brought up to date where it is really installed.
3
+ *
4
+ * @private internal utility of `promptbookCli`
5
+ */
6
+ export type HarnessUpdatePlan = {
7
+ /**
8
+ * Command which updates the harness in place
9
+ * or `null` when the installation is not understood well enough to name one.
10
+ */
11
+ readonly command: string | null;
12
+
13
+ /**
14
+ * Whether Promptbook may run the command itself instead of only printing it.
15
+ *
16
+ * Only installations which Promptbook can update without any side effect are updated automatically,
17
+ * everything else is left to the user together with the instructions.
18
+ */
19
+ readonly isRunnableByPromptbook: boolean;
20
+
21
+ /**
22
+ * Extra environment variables required by the update command.
23
+ */
24
+ readonly environment?: Readonly<Record<string, string>>;
25
+ };
26
+
27
+ // Note: [🟡] Code for CLI harness update plan [HarnessUpdatePlan](src/cli/cli-commands/common/harness/HarnessUpdatePlan.ts) should never be published outside of `@promptbook/cli`
@@ -1,15 +1,19 @@
1
+ import { buildNpmPackageInstallCommand } from '../npm/buildNpmPackageInstallCommand';
1
2
  import type { HarnessDefinition } from './HarnessDefinition';
2
3
 
3
4
  /**
4
5
  * Builds the shell command which installs or updates one CLI coding harness globally.
5
6
  *
6
- * The very same command is executed by `$installHarness` and printed as the manual fallback,
7
+ * The very same command is executed by `$runHarnessInstallationCommand` and printed as the manual fallback,
7
8
  * so the user always sees exactly what Promptbook would run.
8
9
  *
10
+ * Note: This command installs the harness through npm, so it may only update a harness which npm really owns,
11
+ * see `resolveHarnessUpdatePlan`.
12
+ *
9
13
  * @private internal utility of `promptbookCli`
10
14
  */
11
15
  export function buildHarnessInstallCommand(definition: HarnessDefinition): string {
12
- return `npm install -g ${definition.npmPackageName}@latest`;
16
+ return buildNpmPackageInstallCommand(definition.npmPackageName, 'global');
13
17
  }
14
18
 
15
19
  // Note: [🟡] Code for CLI harness install command [buildHarnessInstallCommand](src/cli/cli-commands/common/harness/buildHarnessInstallCommand.ts) should never be published outside of `@promptbook/cli`
@@ -1,13 +1,24 @@
1
1
  import { spaceTrim } from 'spacetrim';
2
+ import type { HarnessInstallationMethod } from './HarnessInstallationOrigin';
2
3
  import type { HarnessInstallationStatus } from './HarnessInstallationStatus';
3
4
 
5
+ /**
6
+ * Human-readable description of each way a harness can be installed.
7
+ */
8
+ const HARNESS_INSTALLATION_METHOD_DESCRIPTIONS: Readonly<Record<HarnessInstallationMethod, string>> = {
9
+ 'npm-global': 'global npm installation',
10
+ standalone: 'standalone installation',
11
+ homebrew: 'Homebrew installation',
12
+ unknown: 'unknown installation method',
13
+ };
14
+
4
15
  /**
5
16
  * Formats the warning shown when a harness is missing or outdated.
6
17
  *
7
18
  * @private internal utility of `promptbookCli`
8
19
  */
9
20
  export function formatHarnessInstallationWarning(status: HarnessInstallationStatus): string {
10
- const { definition, installedVersion, latestVersion } = status;
21
+ const { definition, installedVersion, latestVersion, installationOrigin } = status;
11
22
 
12
23
  if (status.installationState === 'not-installed') {
13
24
  return spaceTrim(`
@@ -17,12 +28,23 @@ export function formatHarnessInstallationWarning(status: HarnessInstallationStat
17
28
  `);
18
29
  }
19
30
 
20
- return spaceTrim(`
21
- **${definition.label}** is outdated.
31
+ const warningLines = [
32
+ `**${definition.label}** is outdated.`,
33
+ '',
34
+ `Installed version: \`${installedVersion}\``,
35
+ `Newest version: \`${latestVersion}\``,
36
+ ];
37
+
38
+ if (installationOrigin.commandPath !== null) {
39
+ const installationMethodDescription =
40
+ HARNESS_INSTALLATION_METHOD_DESCRIPTIONS[installationOrigin.installationMethod];
41
+
42
+ warningLines.push(
43
+ `Installed command: \`${installationOrigin.commandPath}\` *(${installationMethodDescription})*`,
44
+ );
45
+ }
22
46
 
23
- Installed version: \`${installedVersion}\`
24
- Newest version: \`${latestVersion}\`
25
- `);
47
+ return spaceTrim(warningLines.join('\n'));
26
48
  }
27
49
 
28
50
  // Note: [🟡] Code for CLI harness installation warning [formatHarnessInstallationWarning](src/cli/cli-commands/common/harness/formatHarnessInstallationWarning.ts) should never be published outside of `@promptbook/cli`
@@ -0,0 +1,41 @@
1
+ import { spaceTrim } from 'spacetrim';
2
+ import { buildHarnessInstallCommand } from './buildHarnessInstallCommand';
3
+ import type { HarnessInstallationStatus } from './HarnessInstallationStatus';
4
+ import type { HarnessUpdatePlan } from './HarnessUpdatePlan';
5
+
6
+ /**
7
+ * Formats the instruction shown when an outdated harness must be updated by the user.
8
+ *
9
+ * @private internal utility of `promptbookCli`
10
+ */
11
+ export function formatHarnessManualUpdateInstruction(
12
+ status: HarnessInstallationStatus,
13
+ updatePlan: HarnessUpdatePlan,
14
+ ): string {
15
+ const { definition, installationOrigin } = status;
16
+
17
+ const commandLocation =
18
+ installationOrigin.commandPath === null
19
+ ? `The \`${definition.commandName}\` command`
20
+ : `The \`${definition.commandName}\` command at \`${installationOrigin.commandPath}\``;
21
+
22
+ if (updatePlan.command !== null) {
23
+ return spaceTrim(`
24
+ ${commandLocation} is not managed by npm, so Promptbook leaves it alone.
25
+
26
+ Update it manually with \`${updatePlan.command}\`.
27
+ `);
28
+ }
29
+
30
+ const unknownInstallationReason =
31
+ installationOrigin.commandPath === null ? 'could not be located' : 'is not inside the global npm prefix';
32
+ const npmInstallCommand = buildHarnessInstallCommand(definition);
33
+
34
+ return spaceTrim(`
35
+ ${commandLocation} ${unknownInstallationReason}, so Promptbook cannot tell how it was installed.
36
+
37
+ Update it the same way it was installed - \`${npmInstallCommand}\` would install a **second** copy of ${definition.label} instead of updating the one which is really used.
38
+ `);
39
+ }
40
+
41
+ // Note: [🟡] Code for CLI harness manual update instruction [formatHarnessManualUpdateInstruction](src/cli/cli-commands/common/harness/formatHarnessManualUpdateInstruction.ts) should never be published outside of `@promptbook/cli`
@@ -0,0 +1,111 @@
1
+ import type { HarnessDefinition } from './HarnessDefinition';
2
+ import type { HarnessInstallationMethod } from './HarnessInstallationOrigin';
3
+
4
+ /**
5
+ * Directory which holds npm packages, so it appears in the resolved path of every globally installed npm binary
6
+ * on systems where the global binary is only a symbolic link into the package.
7
+ *
8
+ * Note: Written in lower case because it is compared against normalized paths.
9
+ */
10
+ const NODE_MODULES_DIRECTORY_NAME = 'node_modules';
11
+
12
+ /**
13
+ * Directory into which Homebrew unpacks every formula, so it appears in the resolved path of
14
+ * everything Homebrew manages and in nothing else.
15
+ *
16
+ * Note: Written in lower case because it is compared against normalized paths.
17
+ */
18
+ const HOMEBREW_DIRECTORY_NAME = 'cellar';
19
+
20
+ /**
21
+ * Options describing where the harness command was found.
22
+ *
23
+ * @private internal utility of `resolveHarnessInstallationMethodFromPaths`
24
+ */
25
+ type HarnessInstallationPaths = {
26
+ /**
27
+ * Harness whose command was located.
28
+ */
29
+ readonly definition: HarnessDefinition;
30
+
31
+ /**
32
+ * Resolved path of the harness command with every symbolic link followed.
33
+ */
34
+ readonly commandPath: string;
35
+
36
+ /**
37
+ * Root directory of global npm installations or `null` when npm could not be asked for it.
38
+ */
39
+ readonly npmGlobalPrefixPath: string | null;
40
+ };
41
+
42
+ /**
43
+ * Decides how a harness command was installed from the place where it really lives.
44
+ *
45
+ * Only a command which npm owns may be updated with `npm install -g`, every other command has to be
46
+ * updated where it is installed, otherwise the update silently adds a second copy of the harness.
47
+ *
48
+ * @private internal utility of `promptbookCli`
49
+ */
50
+ export function resolveHarnessInstallationMethodFromPaths(paths: HarnessInstallationPaths): HarnessInstallationMethod {
51
+ const { definition, commandPath, npmGlobalPrefixPath } = paths;
52
+
53
+ const normalizedCommandPath = normalizeInstallationPath(commandPath);
54
+ const commandPathDirectoryNames = normalizedCommandPath.split('/');
55
+
56
+ // Note: A Homebrew formula may bundle its own `node_modules` and may live under the npm prefix of a
57
+ // Homebrew-installed Node, so Homebrew has to be recognized before anything npm-shaped
58
+ if (commandPathDirectoryNames.includes(HOMEBREW_DIRECTORY_NAME)) {
59
+ return 'homebrew';
60
+ }
61
+
62
+ const standaloneDirectoryNames = definition.standaloneInstallation?.directoryNames ?? [];
63
+
64
+ if (
65
+ standaloneDirectoryNames.some((directoryName) =>
66
+ commandPathDirectoryNames.includes(normalizeInstallationPath(directoryName)),
67
+ )
68
+ ) {
69
+ return 'standalone';
70
+ }
71
+
72
+ // Note: npm is not always reachable, but its own package directory is a reliable fallback marker
73
+ if (
74
+ normalizedCommandPath.includes(
75
+ `/${NODE_MODULES_DIRECTORY_NAME}/${normalizeInstallationPath(definition.npmPackageName)}/`,
76
+ )
77
+ ) {
78
+ return 'npm-global';
79
+ }
80
+
81
+ if (isPathInsideDirectory(normalizedCommandPath, npmGlobalPrefixPath)) {
82
+ return 'npm-global';
83
+ }
84
+
85
+ return 'unknown';
86
+ }
87
+
88
+ /**
89
+ * Normalizes one path so that paths coming from different tools and platforms can be compared.
90
+ *
91
+ * Note: The comparison is case-insensitive because Windows paths are, and two harness paths which differ
92
+ * only in letter casing do not exist in practice.
93
+ */
94
+ function normalizeInstallationPath(path: string): string {
95
+ return path.trim().replace(/\\/gu, '/').replace(/\/+$/u, '').toLowerCase();
96
+ }
97
+
98
+ /**
99
+ * Checks whether one path lies inside a directory.
100
+ */
101
+ function isPathInsideDirectory(normalizedPath: string, directoryPath: string | null): boolean {
102
+ if (directoryPath === null) {
103
+ return false;
104
+ }
105
+
106
+ const normalizedDirectoryPath = normalizeInstallationPath(directoryPath);
107
+
108
+ return normalizedDirectoryPath !== '' && normalizedPath.startsWith(`${normalizedDirectoryPath}/`);
109
+ }
110
+
111
+ // Note: [🟡] Code for CLI harness installation method detection [resolveHarnessInstallationMethodFromPaths](src/cli/cli-commands/common/harness/resolveHarnessInstallationMethodFromPaths.ts) should never be published outside of `@promptbook/cli`
@@ -0,0 +1,47 @@
1
+ import { buildHarnessInstallCommand } from './buildHarnessInstallCommand';
2
+ import type { HarnessDefinition } from './HarnessDefinition';
3
+ import type { HarnessInstallationMethod } from './HarnessInstallationOrigin';
4
+ import type { HarnessUpdatePlan } from './HarnessUpdatePlan';
5
+
6
+ /**
7
+ * Decides how one outdated CLI coding harness should be updated.
8
+ *
9
+ * The plan follows the way the harness was installed, because `npm install -g` updates only a harness
10
+ * which npm owns and installs a **second** copy of every other one.
11
+ *
12
+ * @private internal utility of `promptbookCli`
13
+ */
14
+ export function resolveHarnessUpdatePlan(
15
+ definition: HarnessDefinition,
16
+ installationMethod: HarnessInstallationMethod,
17
+ ): HarnessUpdatePlan {
18
+ if (installationMethod === 'npm-global') {
19
+ return {
20
+ command: buildHarnessInstallCommand(definition),
21
+ isRunnableByPromptbook: true,
22
+ environment: definition.npmInstallEnvironment,
23
+ };
24
+ }
25
+
26
+ if (installationMethod === 'standalone' && definition.standaloneInstallation !== undefined) {
27
+ return {
28
+ command: definition.standaloneInstallation.updateCommand,
29
+ isRunnableByPromptbook: true,
30
+ };
31
+ }
32
+
33
+ if (installationMethod === 'homebrew') {
34
+ // Note: The formula may be named differently than the command, so the update is only suggested
35
+ return {
36
+ command: `brew upgrade ${definition.commandName}`,
37
+ isRunnableByPromptbook: false,
38
+ };
39
+ }
40
+
41
+ return {
42
+ command: null,
43
+ isRunnableByPromptbook: false,
44
+ };
45
+ }
46
+
47
+ // Note: [🟡] Code for CLI harness update planning [resolveHarnessUpdatePlan](src/cli/cli-commands/common/harness/resolveHarnessUpdatePlan.ts) should never be published outside of `@promptbook/cli`
@@ -0,0 +1,46 @@
1
+ import type {
2
+ Command as Program /* <- Note: [🔸] Using Program because Command is misleading name */,
3
+ } from 'commander';
4
+
5
+ /**
6
+ * Commander option bag for opting out of automatic coding-harness update checks.
7
+ *
8
+ * @private internal utility of `promptbookCli`
9
+ */
10
+ export type HarnessUpdateCliOptions = {
11
+ readonly harnessUpdate: boolean;
12
+ };
13
+
14
+ /**
15
+ * Normalized automatic coding-harness update-check option.
16
+ *
17
+ * @private internal utility of `promptbookCli`
18
+ */
19
+ export type NormalizedHarnessUpdateCliOptions = {
20
+ readonly isHarnessUpdateCheckEnabled: boolean;
21
+ };
22
+
23
+ /**
24
+ * Registers the shared `--no-harness-update` option on a `ptbk coder` command that uses a coding harness.
25
+ *
26
+ * @private internal utility of `promptbookCli`
27
+ */
28
+ export function addHarnessUpdateOption(command: Program): void {
29
+ command.option('--no-harness-update', 'Skip checking whether the installed coding harnesses are up to date');
30
+ }
31
+
32
+ /**
33
+ * Converts the Commander harness-update flag into the normalized harness-check option.
34
+ *
35
+ * @private internal utility of `promptbookCli`
36
+ */
37
+ export function normalizeHarnessUpdateCliOptions(
38
+ cliOptions: HarnessUpdateCliOptions,
39
+ ): NormalizedHarnessUpdateCliOptions {
40
+ return {
41
+ isHarnessUpdateCheckEnabled: cliOptions.harnessUpdate,
42
+ };
43
+ }
44
+
45
+ // Note: [🟡] Code for CLI harness update options [harnessUpdateCliOptions](src/cli/cli-commands/common/harnessUpdateCliOptions.ts) should never be published outside of `@promptbook/cli`
46
+ // Note: [💞] Ignore a discrepancy between file name and exported helper names
@@ -2,14 +2,14 @@ import colors from 'colors';
2
2
  import { createInterface } from 'readline';
3
3
 
4
4
  /**
5
- * Asks the user in the terminal whether the harness should be installed or updated right now.
5
+ * Asks the user in the terminal whether an npm package should be installed or updated now.
6
6
  *
7
7
  * Note: `$` is used to indicate that this function is not a pure function - it reads the answer from stdin
8
8
  *
9
9
  * @returns `true` when the user confirms, `false` when the user declines or the terminal is not interactive
10
10
  * @private internal utility of `promptbookCli`
11
11
  */
12
- export async function $askForHarnessInstallationApproval(question: string): Promise<boolean> {
12
+ export async function $askForNpmPackageInstallationApproval(question: string): Promise<boolean> {
13
13
  if (!process.stdin.isTTY) {
14
14
  // Note: In non-interactive environments like CI there is nobody who could confirm the installation
15
15
  return false;
@@ -28,4 +28,4 @@ export async function $askForHarnessInstallationApproval(question: string): Prom
28
28
  }
29
29
  }
30
30
 
31
- // Note: [🟡] Code for CLI harness installation approval [$askForHarnessInstallationApproval](src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.ts) should never be published outside of `@promptbook/cli`
31
+ // Note: [🟡] Code for CLI npm package installation approval [$askForNpmPackageInstallationApproval](src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.ts) should never be published outside of `@promptbook/cli`