@promptbook/cli 0.114.0-2 → 0.114.0-21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (984) hide show
  1. package/README.md +8 -16
  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 +39 -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/email-server/page.tsx +17 -18
  17. package/apps/agents-server/src/app/admin/messages/MessageParticipants.tsx +84 -0
  18. package/apps/agents-server/src/app/admin/messages/MessageStatus.tsx +96 -0
  19. package/apps/agents-server/src/app/admin/messages/MessagesClient.tsx +29 -33
  20. package/apps/agents-server/src/app/admin/messages/messageAdminPresentation.ts +289 -0
  21. package/apps/agents-server/src/app/admin/messages/send-email/SendEmailClient.tsx +193 -63
  22. package/apps/agents-server/src/app/admin/messages/send-email/actions.ts +25 -28
  23. package/apps/agents-server/src/app/admin/messages/send-email/emailTesting.ts +153 -0
  24. package/apps/agents-server/src/app/admin/messages/send-email/emailTestingAccess.ts +30 -0
  25. package/apps/agents-server/src/app/admin/messages/send-email/page.tsx +18 -5
  26. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerClient.tsx +103 -0
  27. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerEditDialog.tsx +232 -0
  28. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerFiltersCard.tsx +195 -0
  29. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerRow.tsx +189 -0
  30. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerSummaryMetrics.tsx +60 -0
  31. package/apps/agents-server/src/app/admin/planned-messages/PlannedMessageManagerTableCard.tsx +147 -0
  32. package/apps/agents-server/src/app/admin/planned-messages/page.tsx +17 -0
  33. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageEditForm.ts +186 -0
  34. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageManagerDialogs.ts +46 -0
  35. package/apps/agents-server/src/app/admin/planned-messages/plannedMessageManagerPresentation.tsx +188 -0
  36. package/apps/agents-server/src/app/admin/planned-messages/resolvePlannedMessageSortValue.ts +115 -0
  37. package/apps/agents-server/src/app/admin/planned-messages/usePlannedMessageManagerData.ts +116 -0
  38. package/apps/agents-server/src/app/admin/planned-messages/usePlannedMessageManagerState.ts +289 -0
  39. package/apps/agents-server/src/app/admin/task-manager/TaskManagerClient.tsx +7 -2
  40. package/apps/agents-server/src/app/admin/task-manager/TaskManagerFiltersCard.tsx +7 -73
  41. package/apps/agents-server/src/app/admin/task-manager/TaskManagerSummaryMetrics.tsx +5 -30
  42. package/apps/agents-server/src/app/admin/task-manager/TaskManagerTaskRow.tsx +2 -0
  43. package/apps/agents-server/src/app/admin/task-manager/[taskId]/TaskManagerTaskDetailClient.tsx +3 -1
  44. package/apps/agents-server/src/app/admin/task-manager/taskManagerTaskPresentation.tsx +23 -0
  45. package/apps/agents-server/src/app/agents/[agentName]/AgentChatWrapper.tsx +8 -9
  46. package/apps/agents-server/src/app/agents/[agentName]/AgentProfileChat.tsx +5 -9
  47. package/apps/agents-server/src/app/agents/[agentName]/api/book/reference-diagnostics/route.ts +30 -7
  48. package/apps/agents-server/src/app/agents/[agentName]/api/book/route.ts +9 -0
  49. package/apps/agents-server/src/app/agents/[agentName]/api/book/test.http +3 -3
  50. package/apps/agents-server/src/app/agents/[agentName]/api/chat/resolveAgentChatRouteContext.ts +8 -16
  51. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/[timeoutId]/route.ts +10 -153
  52. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/route.ts +9 -4
  53. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/route.ts +3 -0
  54. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/[chatId]/stream/route.ts +2 -0
  55. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/resolveUserChatScope.ts +8 -1
  56. package/apps/agents-server/src/app/agents/[agentName]/api/user-chats/route.ts +15 -7
  57. package/apps/agents-server/src/app/agents/[agentName]/api/voice/route.ts +4 -9
  58. package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorMissingReferences.tsx +106 -12
  59. package/apps/agents-server/src/app/agents/[agentName]/book/BookEditorWrapper.tsx +3 -0
  60. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorDiagnostics.ts +12 -0
  61. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorSaving.ts +18 -28
  62. package/apps/agents-server/src/app/agents/[agentName]/book/useBookEditorWrapper.tsx +2 -0
  63. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatHistoryClient.tsx +19 -1
  64. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentChatSidebarDefault.tsx +17 -5
  65. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatNotice.tsx +23 -0
  66. package/apps/agents-server/src/app/agents/[agentName]/chat/AgentGoalChatPlannedMessages.tsx +226 -0
  67. package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatPanel.tsx +6 -0
  68. package/apps/agents-server/src/app/agents/[agentName]/chat/CanonicalAgentChatSurface.tsx +32 -12
  69. package/apps/agents-server/src/app/agents/[agentName]/chat/ExternalUserChatAdminActions.tsx +51 -3
  70. package/apps/agents-server/src/app/agents/[agentName]/chat/TeamMemberFrozenChatPrimaryAgentLink.tsx +31 -0
  71. package/apps/agents-server/src/app/agents/[agentName]/chat/page.tsx +2 -20
  72. package/apps/agents-server/src/app/agents/[agentName]/chat/useAgentChatSidebarState.ts +26 -2
  73. package/apps/agents-server/src/app/agents/[agentName]/goal/page.tsx +35 -0
  74. package/apps/agents-server/src/app/agents/[agentName]/page.tsx +2 -1
  75. package/apps/agents-server/src/app/agents/[agentName]/projectReferenceActions.ts +61 -0
  76. package/apps/agents-server/src/app/agents/[agentName]/projectRuntimeActions.ts +97 -0
  77. package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/actions.ts +5 -50
  78. package/apps/agents-server/src/app/agents/[agentName]/projects/[projectName]/page.tsx +2 -2
  79. package/apps/agents-server/src/app/api/admin/default-agents/reinstate/route.ts +5 -1
  80. package/apps/agents-server/src/app/api/admin/dns-records/cloudflare/route.ts +26 -16
  81. package/apps/agents-server/src/app/api/admin/planned-messages/[timeoutId]/route.ts +80 -0
  82. package/apps/agents-server/src/app/api/admin/planned-messages/route.ts +19 -0
  83. package/apps/agents-server/src/app/api/emails/incoming/stalwart/route.ts +9 -2
  84. package/apps/agents-server/src/app/api/internal/agent-goal-chat-planned-messages/route.ts +201 -0
  85. package/apps/agents-server/src/app/api/scrape/route.ts +1 -1
  86. package/apps/agents-server/src/app/layout.tsx +31 -0
  87. package/apps/agents-server/src/app/superadmin/servers/ServersRegistryTable.tsx +31 -39
  88. package/apps/agents-server/src/app/system/user-wallet/UserWalletDraft.ts +2 -2
  89. package/apps/agents-server/src/components/AgentNaming/legacyAgentTextTranslations.cs.yaml +7 -0
  90. package/apps/agents-server/src/components/AgentProfile/AgentCapabilityChips.tsx +1 -24
  91. package/apps/agents-server/src/components/AgentProfile/AgentProfile.tsx +10 -3
  92. package/apps/agents-server/src/components/AgentProjects/AgentProjectIcon.tsx +137 -0
  93. package/apps/agents-server/src/components/AgentProjects/AgentProjectItem.tsx +26 -10
  94. package/apps/agents-server/src/components/AgentProjects/resolveLatestCompletedAgentMessageKey.ts +32 -0
  95. package/apps/agents-server/src/components/AgentProjects/useAgentProjectMarkdownReferences.ts +306 -0
  96. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsApiTokenImportStep.tsx +5 -6
  97. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsCheckStep.tsx +6 -5
  98. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsManualStep.tsx +10 -14
  99. package/apps/agents-server/src/components/CloudflareDnsWizard/CloudflareDnsWizard.tsx +11 -20
  100. package/apps/agents-server/src/components/CloudflareDnsWizard/useCloudflareDnsRecordImport.ts +5 -6
  101. package/apps/agents-server/src/components/DefaultAgents/ReinstateBundledAgentsButton.tsx +7 -0
  102. package/apps/agents-server/src/components/DefaultAgents/coreAgentsAdminRoute.ts +6 -0
  103. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsInstructions.tsx +91 -57
  104. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionPanel.tsx +63 -0
  105. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsSectionVariantTabs.tsx +67 -0
  106. package/apps/agents-server/src/components/DnsRecordsInstructions/DnsRecordsTable.tsx +40 -0
  107. package/apps/agents-server/src/components/Header/Header.tsx +8 -0
  108. package/apps/agents-server/src/components/Header/HeaderTypes.ts +5 -0
  109. package/apps/agents-server/src/components/Header/buildActiveAgentViewItems.ts +5 -4
  110. package/apps/agents-server/src/components/Header/buildHeaderSystemMenuItems.ts +125 -30
  111. package/apps/agents-server/src/components/Header/createAgentViewLabel.tsx +4 -4
  112. package/apps/agents-server/src/components/Header/resolveActiveAgentNavigation.ts +2 -2
  113. package/apps/agents-server/src/components/Header/resolveHeaderSystemActivities.ts +86 -0
  114. package/apps/agents-server/src/components/Homepage/AgentCard.tsx +0 -3
  115. package/apps/agents-server/src/components/Homepage/DefaultAgentsStatusNotice.tsx +1 -7
  116. package/apps/agents-server/src/components/Homepage/useAgentsListImportExportState.ts +22 -10
  117. package/apps/agents-server/src/components/LayoutWrapper/LayoutWrapper.tsx +8 -0
  118. package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardState.ts +0 -12
  119. package/apps/agents-server/src/components/NewAgentDialog/NewAgentWizardUseSetupStep.tsx +0 -58
  120. package/apps/agents-server/src/components/NewAgentDialog/newAgentWizardPresets.ts +0 -56
  121. package/apps/agents-server/src/components/WalletRecordDialog/useWalletRecordDialogState.ts +1 -1
  122. package/apps/agents-server/src/components/_utils/generateMetaTxt.ts +1 -1
  123. package/apps/agents-server/src/database/migratePrefix.ts +13 -12
  124. package/apps/agents-server/src/database/migrations/2026-08-0100-agent-goal-chat-source.sql +10 -0
  125. package/apps/agents-server/src/database/migrations/2026-08-1800-user-chat-timeout-schedule.sql +11 -0
  126. package/apps/agents-server/src/generated/reservedPaths.ts +42 -42
  127. package/apps/agents-server/src/instrumentation-node.ts +18 -0
  128. package/apps/agents-server/src/languages/ServerTranslationKeys.ts +16 -11
  129. package/apps/agents-server/src/languages/translations/czech.yaml +16 -11
  130. package/apps/agents-server/src/languages/translations/english.yaml +16 -11
  131. package/apps/agents-server/src/message-providers/email/smtp/SmtpMessageProvider.ts +1 -1
  132. package/apps/agents-server/src/message-providers/email/stalwart/StalwartMessageProvider.ts +59 -19
  133. package/apps/agents-server/src/message-providers/email/stalwart/parseInboundStalwartEmail.ts +17 -2
  134. package/apps/agents-server/src/tools/$provideOpenAiAgentKitExecutionToolsForServer.ts +0 -191
  135. package/apps/agents-server/src/tools/$provideOpenAiAssistantExecutionToolsForServer.ts +0 -3
  136. package/apps/agents-server/src/tools/agentGoalChatTimeoutToolFunctions.ts +249 -0
  137. package/apps/agents-server/src/tools/agentGoalChatTimeoutTools.ts +147 -0
  138. package/apps/agents-server/src/tools/createServerChatRuntimeTools.ts +20 -0
  139. package/apps/agents-server/src/tools/getAllToolFunctionsForServer.ts +2 -0
  140. package/apps/agents-server/src/tools/run_browser.ts +1 -1
  141. package/apps/agents-server/src/tools/send_email.ts +3 -3
  142. package/apps/agents-server/src/utils/adminEntityLookups/loadAgentNamesByPermanentId.ts +45 -0
  143. package/apps/agents-server/src/utils/adminEntityLookups/loadUsernamesByUserId.ts +36 -0
  144. package/apps/agents-server/src/utils/adminEntityLookups.ts +2 -0
  145. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatConstants.ts +14 -0
  146. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatIdentity.ts +28 -0
  147. package/apps/agents-server/src/utils/agentGoalChat/agentGoalChatPlannedMessageActions.ts +583 -0
  148. package/apps/agents-server/src/utils/agentGoalChat/appendAgentGoalChatNote.ts +43 -0
  149. package/apps/agents-server/src/utils/agentGoalChat/canAccessAgentGoalChat.ts +14 -0
  150. package/apps/agents-server/src/utils/agentGoalChat/createAgentGoalChatNoteContent.ts +129 -0
  151. package/apps/agents-server/src/utils/agentGoalChat/enqueueAgentGoalChatTurn.ts +167 -0
  152. package/apps/agents-server/src/utils/agentGoalChat/ensureAgentGoalChat.ts +66 -0
  153. package/apps/agents-server/src/utils/agentGoalChat/prependAgentGoalChatSummarySeed.ts +40 -0
  154. package/apps/agents-server/src/utils/agentGoalChat/recordAgentGoalChatLifecycleNote.ts +53 -0
  155. package/apps/agents-server/src/utils/agentGoalChat/resolveAgentGoalChatOwnerUserId.ts +104 -0
  156. package/apps/agents-server/src/utils/agentGoalChat/resolveEffectiveAgentGoal.ts +29 -0
  157. package/apps/agents-server/src/utils/agentGoalChat/scheduleAgentGoalChatModifiedNote.ts +85 -0
  158. package/apps/agents-server/src/utils/agentGoalChat.ts +25 -0
  159. package/apps/agents-server/src/utils/agentProjects/AgentProjectInfo.ts +10 -1
  160. package/apps/agents-server/src/utils/agentProjects/AgentProjectReferenceInfo.ts +5 -2
  161. package/apps/agents-server/src/utils/agentProjects/AgentProjectRuntimeActionResult.ts +14 -0
  162. package/apps/agents-server/src/utils/agentProjects/agentProjectFileNames.ts +21 -0
  163. package/apps/agents-server/src/utils/agentProjects/agentProjectHrefs.ts +20 -11
  164. package/apps/agents-server/src/utils/agentProjects/agentProjectIdentity.ts +46 -0
  165. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeAutostartScheduler.ts +162 -0
  166. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDesiredState.ts +252 -0
  167. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDisplay.ts +6 -3
  168. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeDomains.ts +2 -44
  169. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePaths.ts +25 -0
  170. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimePm2.ts +4 -3
  171. package/apps/agents-server/src/utils/agentProjects/agentProjectRuntimeRegistry.ts +77 -24
  172. package/apps/agents-server/src/utils/agentProjects/agentProjectStateMutationQueue.ts +58 -0
  173. package/apps/agents-server/src/utils/agentProjects/agentProjectsPaths.ts +15 -5
  174. package/apps/agents-server/src/utils/agentProjects/createAgentProjectInitials.ts +36 -0
  175. package/apps/agents-server/src/utils/agentProjects/createAgentProjectMarkdownReferences.ts +124 -19
  176. package/apps/agents-server/src/utils/agentProjects/createAgentProjectsDnsRecordsSection.ts +113 -0
  177. package/apps/agents-server/src/utils/agentProjects/createStaticAgentProjectServer.ts +2 -6
  178. package/apps/agents-server/src/utils/agentProjects/humanizeAgentProjectName.ts +25 -0
  179. package/apps/agents-server/src/utils/agentProjects/listAgentProjectChatReferences.ts +10 -3
  180. package/apps/agents-server/src/utils/agentProjects/listAgentProjectNames.ts +35 -0
  181. package/apps/agents-server/src/utils/agentProjects/listAgentProjects.ts +6 -23
  182. package/apps/agents-server/src/utils/agentProjects/listAllLocalAgentProjectIdentities.ts +48 -0
  183. package/apps/agents-server/src/utils/agentProjects/parseAgentProjectIndexHtml.ts +167 -0
  184. package/apps/agents-server/src/utils/agentProjects/readAgentProjectIndexHtmlProfile.ts +24 -0
  185. package/apps/agents-server/src/utils/agentProjects/readAgentProjectReadme.ts +3 -53
  186. package/apps/agents-server/src/utils/agentProjects/readAgentProjectRootTextFile.ts +73 -0
  187. package/apps/agents-server/src/utils/agentProjects/resolveAgentChatProjectReferences.ts +25 -0
  188. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectFaviconRelativePath.ts +108 -0
  189. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectInfo.ts +12 -3
  190. package/apps/agents-server/src/utils/agentProjects/{resolveAgentProjectReadmeProfile.ts → resolveAgentProjectProfile.ts} +33 -33
  191. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectPublicUrls.ts +34 -0
  192. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectRuntimeEnvironmentFlag.ts +23 -0
  193. package/apps/agents-server/src/utils/agentProjects/resolveAgentProjectRuntimeStatus.ts +73 -0
  194. package/apps/agents-server/src/utils/agentProjects/startDefaultAgentProjectRuntimes.ts +110 -0
  195. package/apps/agents-server/src/utils/agentReferenceResolver/MissingCoreAgentRecovery.ts +19 -0
  196. package/apps/agents-server/src/utils/agentReferenceResolver/bookScopedAgentReferences.ts +7 -0
  197. package/apps/agents-server/src/utils/agentReferenceResolver/createAgentInheritanceDiagnostics.ts +457 -0
  198. package/apps/agents-server/src/utils/agentReferenceResolver/createUnresolvedAgentReferenceDiagnostics.ts +27 -0
  199. package/apps/agents-server/src/utils/agentReferenceResolver/resolveCoreAgentAwareMissingReferences.ts +156 -0
  200. package/apps/agents-server/src/utils/bookLanguageDocumentation/createBookLanguageDocumentationPdfResponse.ts +19 -17
  201. package/apps/agents-server/src/utils/chatMessageChips/createAnsweredMessageChipToolCalls.ts +49 -0
  202. package/apps/agents-server/src/utils/chatMessageChips/createPlannedMessageChipToolCalls.ts +44 -0
  203. package/apps/agents-server/src/utils/chatMessageChips/createTouchedExternalSourceChipToolCalls.ts +39 -0
  204. package/apps/agents-server/src/utils/chatMessageChips/createTouchedProjectChipResult.ts +45 -0
  205. package/apps/agents-server/src/utils/chatMessageChips/createTouchedProjectChipToolCalls.ts +109 -0
  206. package/apps/agents-server/src/utils/chatTasksAdmin.ts +9 -0
  207. package/apps/agents-server/src/utils/createAgentWithDefaultVisibility.ts +8 -0
  208. package/apps/agents-server/src/utils/cronExpression/CronExpression.ts +63 -0
  209. package/apps/agents-server/src/utils/cronExpression/normalizeCronExpression.ts +34 -0
  210. package/apps/agents-server/src/utils/cronExpression/normalizeCronExpressionWhitespace.ts +11 -0
  211. package/apps/agents-server/src/utils/cronExpression/parseCronExpression.ts +41 -0
  212. package/apps/agents-server/src/utils/cronExpression/parseCronExpressionField.ts +140 -0
  213. package/apps/agents-server/src/utils/cronExpression/resolveNextCronRun.ts +100 -0
  214. package/apps/agents-server/src/utils/cronExpression/throwInvalidCronExpressionField.ts +20 -0
  215. package/apps/agents-server/src/utils/cronExpression.ts +10 -0
  216. package/apps/agents-server/src/utils/dnsRecords/DnsRecordInstruction.ts +20 -0
  217. package/apps/agents-server/src/utils/dnsRecords/DnsRecordsSection.ts +77 -0
  218. package/apps/agents-server/src/utils/dnsRecords/createServerDnsRecordsSections.ts +58 -0
  219. package/apps/agents-server/src/utils/dnsRecords/createServerDomainDnsRecordsSection.ts +48 -0
  220. package/apps/agents-server/src/utils/dnsRecords/dnsRecordGroups.ts +52 -0
  221. package/apps/agents-server/src/utils/dnsRecords/resolveDnsRecordBatchPlan.ts +47 -1
  222. package/apps/agents-server/src/utils/email/agentEmailAddress.ts +14 -0
  223. package/apps/agents-server/src/utils/email/sendEmailThroughStalwart.ts +2 -1
  224. package/apps/agents-server/src/utils/explicitFromCommitment.ts +130 -0
  225. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/adminChatTaskSqlQuery.ts +41 -36
  226. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/loadAdminChatTaskFallbackData.ts +3 -77
  227. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskFallbackRows.ts +3 -0
  228. package/apps/agents-server/src/utils/getAdminChatTasksResponse/getAdminChatTasks/mapAdminChatTaskSqlRows.ts +2 -0
  229. package/apps/agents-server/src/utils/handleChatCompletion/createHandleChatCompletionPromptContext.ts +3 -2
  230. package/apps/agents-server/src/utils/handleChatCompletion/resolveHandleChatCompletionRuntime.ts +4 -12
  231. package/apps/agents-server/src/utils/localChatRunner/applyLocalAgentPlannedMessageCommands.ts +261 -0
  232. package/apps/agents-server/src/utils/localChatRunner/parseLocalTeamConversations.ts +281 -0
  233. package/apps/agents-server/src/utils/localChatRunner/persistLocalTeamConversations.ts +71 -0
  234. package/apps/agents-server/src/utils/localChatRunner/prepareLocalAgentPlannedMessagesSidecar.ts +74 -0
  235. package/apps/agents-server/src/utils/localChatRunner/prepareLocalTeamConversationWorkspace.ts +233 -0
  236. package/apps/agents-server/src/utils/localChatRunner/processLocalUserChatJob.ts +154 -27
  237. package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentBooks.ts +5 -12
  238. package/apps/agents-server/src/utils/manGoOnboarding/manGoOnboardingAgentRuntime.ts +2 -2
  239. package/apps/agents-server/src/utils/managementApi/managementApiSchemas.ts +2 -2
  240. package/apps/agents-server/src/utils/messages/parseUseEmailSmtpCredential.ts +1 -1
  241. package/apps/agents-server/src/utils/plannedMessageManager/cancelManagedPlannedMessage.ts +35 -0
  242. package/apps/agents-server/src/utils/plannedMessageManager/collectPlannedMessageAgentOptions.ts +56 -0
  243. package/apps/agents-server/src/utils/plannedMessageManager/createPlannedMessageManagerCounters.ts +104 -0
  244. package/apps/agents-server/src/utils/plannedMessageManager/filterPlannedMessages.ts +191 -0
  245. package/apps/agents-server/src/utils/plannedMessageManager/getPlannedMessageManagerResponse.ts +55 -0
  246. package/apps/agents-server/src/utils/plannedMessageManager/isPlannedMessageStillPlanned.ts +18 -0
  247. package/apps/agents-server/src/utils/plannedMessageManager/loadPlannedMessageManagerRecord.ts +32 -0
  248. package/apps/agents-server/src/utils/plannedMessageManager/mapPlannedMessageManagerRecord.ts +73 -0
  249. package/apps/agents-server/src/utils/plannedMessageManager/parsePlannedMessageManagerUpdateRequest.ts +76 -0
  250. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageEndReason.ts +59 -0
  251. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageLifecycle.ts +99 -0
  252. package/apps/agents-server/src/utils/plannedMessageManager/resolvePlannedMessageRecurrenceKind.ts +40 -0
  253. package/apps/agents-server/src/utils/plannedMessageManager/updateManagedPlannedMessage.ts +121 -0
  254. package/apps/agents-server/src/utils/plannedMessagesAdmin.ts +200 -0
  255. package/apps/agents-server/src/utils/resolveInheritedAgentSource.ts +114 -95
  256. package/apps/agents-server/src/utils/resolveUseEmailSmtpCredential.ts +1 -1
  257. package/apps/agents-server/src/utils/serverManagement/createManagedServer/insertManagedServerRegistryRow.ts +2 -2
  258. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerCoreAgents.ts +7 -6
  259. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerDefaultAgents.ts +5 -4
  260. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerMetadata.ts +3 -2
  261. package/apps/agents-server/src/utils/serverManagement/createManagedServer/seedServerUsers.ts +3 -2
  262. package/apps/agents-server/src/utils/serverManagement/deleteManagedServer.ts +2 -2
  263. package/apps/agents-server/src/utils/stalwart/createEmailDnsRecordsSection.ts +53 -0
  264. package/apps/agents-server/src/utils/useEmailSmtpWalletConstants.ts +5 -5
  265. package/apps/agents-server/src/utils/userChat/UserChatRecord.ts +13 -0
  266. package/apps/agents-server/src/utils/userChat/UserChatSource.ts +14 -0
  267. package/apps/agents-server/src/utils/userChat/appendQueuedUserChatTurn.ts +9 -2
  268. package/apps/agents-server/src/utils/userChat/createRunUserChatJobExecutionContext.ts +7 -17
  269. package/apps/agents-server/src/utils/userChat/createUserChatSummary.ts +10 -2
  270. package/apps/agents-server/src/utils/userChat/finalizeUserChatJob.ts +3 -2
  271. package/apps/agents-server/src/utils/userChat/getUserChat.ts +16 -1
  272. package/apps/agents-server/src/utils/userChat/getUserChatForJobRunner.ts +31 -0
  273. package/apps/agents-server/src/utils/userChat/listUserChats.ts +113 -110
  274. package/apps/agents-server/src/utils/userChat/persistFrozenUserChat.ts +21 -6
  275. package/apps/agents-server/src/utils/userChat/persistUserChatJobTerminalState.ts +5 -0
  276. package/apps/agents-server/src/utils/userChat/resolveUserChatWorkerInternalToken.ts +5 -4
  277. package/apps/agents-server/src/utils/userChat/runImmediateUserChatAnswer.ts +2 -6
  278. package/apps/agents-server/src/utils/userChat/runUserChatJob.ts +2 -6
  279. package/apps/agents-server/src/utils/userChat/teamMemberUserChatContext.ts +63 -0
  280. package/apps/agents-server/src/utils/userChat/userChatJobRunReport.ts +30 -0
  281. package/apps/agents-server/src/utils/userChat/userChatMessageLifecycle.ts +6 -1
  282. package/apps/agents-server/src/utils/userChat.ts +5 -1
  283. package/apps/agents-server/src/utils/userChatClient/cancelAgentUserTimeout.ts +2 -2
  284. package/apps/agents-server/src/utils/userChatClient/fetchAgentUserTimeouts.ts +2 -2
  285. package/apps/agents-server/src/utils/userChatClient.ts +13 -31
  286. package/apps/agents-server/src/utils/userChatTimeout/UserChatTimeoutRecord.ts +47 -3
  287. package/apps/agents-server/src/utils/userChatTimeout/agentScopedTimeoutBulkActions.ts +11 -17
  288. package/apps/agents-server/src/utils/userChatTimeout/createTimeoutWakeUpMessage.ts +38 -6
  289. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/PlannedMessageSchedule.ts +52 -0
  290. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/hasPlannedMessageRecurrence.ts +13 -0
  291. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/isPlannedMessageScheduleFinished.ts +30 -0
  292. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/normalizePlannedMessageScheduleValues.ts +62 -0
  293. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/parsePlannedMessageSchedule.ts +202 -0
  294. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule/resolvePlannedMessageDueAt.ts +121 -0
  295. package/apps/agents-server/src/utils/userChatTimeout/plannedMessageSchedule.ts +12 -0
  296. package/apps/agents-server/src/utils/userChatTimeout/setAgentScopedUserChatTimeoutPausedState.ts +66 -0
  297. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/claimNextDueUserChatTimeout.ts +28 -25
  298. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/createUserChatTimeout.ts +76 -5
  299. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/getAgentScopedUserChatTimeout.ts +8 -4
  300. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAgentUserChatTimeouts.ts +4 -1
  301. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/listAllUserChatTimeouts.ts +37 -0
  302. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/mapUserChatTimeoutRow.ts +9 -0
  303. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/recoverExpiredRunningUserChatTimeouts.ts +3 -2
  304. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/repeatFiredUserChatTimeout.ts +84 -0
  305. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore/updateAgentScopedUserChatTimeout.ts +39 -6
  306. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutStore.ts +2 -0
  307. package/apps/agents-server/src/utils/userChatTimeout/userChatTimeoutWorker.ts +220 -57
  308. package/apps/agents-server/src/utils/userChatTimeout.ts +16 -0
  309. package/apps/agents-server/src/utils/userWallet/UserWalletRecord.ts +1 -1
  310. package/apps/agents-server/src/utils/userWallet/resolveUseEmailSmtpCredentialFromWallet.ts +1 -1
  311. package/apps/agents-server/src/utils/vpsSelfUpdate/deleteVpsSelfUpdateInstalledVersion.ts +2 -1
  312. package/apps/agents-server/src/utils/vpsSelfUpdate/isVpsSelfUpdateJobRunning.ts +16 -0
  313. package/apps/agents-server/src/utils/vpsSelfUpdate/startVpsSelfUpdate.ts +2 -1
  314. package/apps/agents-server/src/utils/vpsSelfUpdate/vpsSelfUpdateCron.ts +23 -316
  315. package/apps/agents-server/src/utils/vpsSelfUpdate.ts +1 -0
  316. package/apps/agents-server/tests/e2e/support/AgentManagementApi.ts +3 -3
  317. package/esm/index.es.js +10579 -10176
  318. package/esm/index.es.js.map +1 -1
  319. package/esm/scripts/run-agent-messages/git/commitAgentProjectChanges.d.ts +15 -0
  320. package/esm/scripts/run-agent-messages/git/commitAnsweredMessageProjectChanges.d.ts +24 -0
  321. package/esm/scripts/run-agent-messages/git/ensureAgentProjectGitRepository.d.ts +20 -0
  322. package/esm/scripts/run-agent-messages/git/readAgentProjectCommitChange.d.ts +11 -0
  323. package/esm/scripts/run-agent-messages/git/runAgentProjectGitCommand.d.ts +29 -0
  324. package/esm/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
  325. package/esm/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
  326. package/esm/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
  327. package/esm/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
  328. package/esm/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
  329. package/esm/scripts/run-agent-messages/messages/listAgentProjectDirectoryNames.d.ts +7 -0
  330. package/esm/scripts/run-agent-messages/messages/loadAgentPlannedMessagesSidecar.d.ts +10 -0
  331. package/esm/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
  332. package/esm/scripts/run-agent-messages/messages/resolveAnsweredMessageTouches.d.ts +29 -0
  333. package/esm/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +54 -0
  334. package/esm/scripts/run-codex-prompts/common/applyCoderRunControlKey.d.ts +14 -0
  335. package/esm/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +7 -0
  336. package/esm/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
  337. package/esm/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
  338. package/esm/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +17 -0
  339. package/esm/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
  340. package/esm/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +25 -0
  341. package/esm/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
  342. package/esm/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +11 -0
  343. package/esm/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
  344. package/esm/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +15 -0
  345. package/esm/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
  346. package/esm/scripts/run-codex-prompts/git/coderGitSync.d.ts +56 -0
  347. package/esm/scripts/run-codex-prompts/git/commitChanges.d.ts +12 -3
  348. package/esm/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
  349. package/esm/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +8 -1
  350. package/esm/scripts/run-codex-prompts/ping/buildCoderPingPrompt.d.ts +20 -0
  351. package/esm/scripts/run-codex-prompts/ping/extractCoderPingAnswer.d.ts +9 -0
  352. package/esm/scripts/run-codex-prompts/ping/pingCoderHarness.d.ts +23 -0
  353. package/esm/scripts/run-codex-prompts/ping/pingCoderHarnessPeriodically.d.ts +22 -0
  354. package/esm/scripts/run-codex-prompts/ping/printCoderPingResult.d.ts +5 -0
  355. package/esm/scripts/run-codex-prompts/prompts/buildPromptLabel.d.ts +6 -0
  356. package/esm/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +50 -0
  357. package/esm/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
  358. package/esm/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
  359. package/esm/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
  360. package/esm/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
  361. package/esm/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +34 -1
  362. package/esm/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
  363. package/esm/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +24 -0
  364. package/esm/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
  365. package/esm/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
  366. package/esm/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
  367. package/esm/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
  368. package/esm/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
  369. package/esm/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
  370. package/esm/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
  371. package/esm/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +15 -1
  372. package/esm/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
  373. package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +6 -1
  374. package/esm/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
  375. package/esm/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +11 -0
  376. package/esm/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
  377. package/esm/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
  378. package/esm/scripts/verify-prompts/verify-prompts.d.ts +8 -2
  379. package/esm/src/_packages/components.index.d.ts +4 -0
  380. package/esm/src/_packages/types.index.d.ts +4 -0
  381. package/esm/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  382. package/esm/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  383. package/esm/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
  384. package/esm/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
  385. package/esm/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  386. package/esm/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  387. package/esm/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  388. package/esm/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  389. package/esm/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  390. package/esm/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  391. package/esm/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  392. package/esm/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  393. package/esm/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  394. package/esm/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  395. package/esm/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  396. package/esm/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  397. package/esm/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  398. package/esm/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
  399. package/esm/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  400. package/esm/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  401. package/esm/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  402. package/esm/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  403. package/esm/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
  404. package/esm/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  405. package/esm/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
  406. package/esm/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
  407. package/esm/src/cli/cli-commands/coder/ping.d.ts +2 -5
  408. package/esm/src/cli/cli-commands/coder/verify.d.ts +1 -1
  409. package/esm/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  410. package/esm/src/cli/cli-commands/coder.d.ts +1 -1
  411. package/esm/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
  412. package/esm/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  413. package/esm/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -3
  414. package/esm/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +3 -2
  415. package/esm/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +29 -0
  416. package/{umd/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts → esm/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
  417. package/esm/src/cli/cli-commands/common/{harness/$resolveLatestHarnessVersion.d.ts → npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  418. package/esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  419. package/esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  420. package/esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  421. package/esm/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -2
  422. package/esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  423. package/esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
  424. package/esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  425. package/esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  426. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  427. package/esm/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  428. package/esm/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  429. package/esm/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  430. package/esm/src/cli/common/loadPromptsModule.d.ts +16 -0
  431. package/esm/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  432. package/{umd/src/commitments/COMPONENT/COMPONENT.d.ts → esm/src/commitments/META_FULLNAME/META_FULLNAME.d.ts} +8 -5
  433. package/esm/src/commitments/META_ID/META_ID.d.ts +32 -0
  434. package/esm/src/commitments/index.d.ts +4 -12
  435. package/esm/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  436. package/esm/src/llm-providers/agent/Agent.d.ts +1 -1
  437. package/esm/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  438. package/esm/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
  439. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
  440. package/esm/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +2 -2
  441. package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
  442. package/esm/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
  443. package/esm/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
  444. package/esm/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
  445. package/esm/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
  446. package/esm/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
  447. package/esm/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
  448. package/esm/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
  449. package/esm/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  450. package/esm/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  451. package/esm/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  452. package/esm/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  453. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  454. package/esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  455. package/esm/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  456. package/esm/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  457. package/esm/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  458. package/esm/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
  459. package/esm/src/utils/misc/debounce.d.ts +4 -2
  460. package/esm/src/version.d.ts +1 -1
  461. package/package.json +1 -1
  462. package/src/_packages/components.index.ts +4 -0
  463. package/src/_packages/components.readme.md +1 -1
  464. package/src/_packages/types.index.ts +4 -0
  465. package/src/avatars/renderAvatarVisualTerminalText.ts +249 -0
  466. package/src/avatars/types/AvatarVisualDefinition.ts +60 -0
  467. package/src/avatars/visuals/asciiOctopusAvatarVisual.ts +144 -22
  468. package/src/book-2.0/agent-source/AgentBasicInformation.ts +3 -9
  469. package/src/book-2.0/agent-source/AgentSourceParseResult.ts +6 -0
  470. package/src/book-2.0/agent-source/ParsedUnknownCommitment.ts +29 -0
  471. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/augmentAgentModelRequirementsFromSource.ts +38 -1
  472. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments/filterCommitmentsForAgentModelRequirements.ts +0 -23
  473. package/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.ts +0 -2
  474. package/src/book-2.0/agent-source/getBookCommitmentLineType.ts +36 -0
  475. package/src/book-2.0/agent-source/parseAgentSource/applyMetaCommitment.ts +16 -31
  476. package/src/book-2.0/agent-source/parseAgentSource/createCapabilitiesFromCommitment.ts +0 -35
  477. package/src/book-2.0/agent-source/parseAgentSourceWithCommitments.ts +128 -61
  478. package/src/book-2.0/agent-source/string_book.ts +1 -1
  479. package/src/book-2.0/book-language-documentation/bookLanguageDocumentationExamples.ts +0 -25
  480. package/src/book-2.0/book-language-documentation/createStandaloneBookLanguageMarkdown.ts +6 -14
  481. package/src/book-2.0/book-language-documentation/czechBookLanguageManualDictionary.ts +13 -33
  482. package/src/book-2.0/book-language-documentation/englishBookLanguageManualDictionary.ts +12 -32
  483. package/src/book-2.0/book-language-documentation/renderCommitmentCatalogSection.ts +1 -4
  484. package/src/book-2.0/book-language-documentation/renderGroupedCommitmentDocumentationMarkdown.ts +4 -17
  485. package/src/book-3.0/AgentMessageRunReport.ts +135 -0
  486. package/src/book-3.0/AgentPlannedMessagesSidecar.ts +284 -0
  487. package/src/book-3.0/AgentTeamConversationWorkspace.ts +170 -0
  488. package/src/book-3.0/LiteAgent.ts +11 -9
  489. package/src/book-3.0/createAgentMessageSidecarBaseName.ts +20 -0
  490. package/src/book-3.0/describeAgentPlannedMessageSchedule.ts +94 -0
  491. package/src/book-components/BookEditor/BookEditorMonaco.tsx +8 -1
  492. package/src/book-components/BookEditor/BookEditorMonacoTokenization.ts +3 -1
  493. package/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.ts +3 -11
  494. package/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.ts +71 -0
  495. package/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.ts +50 -0
  496. package/src/book-components/BookEditor/useBookEditorMonacoLanguage.ts +1 -1
  497. package/src/book-components/BookEditor/useBookEditorMonacoStyles.ts +56 -55
  498. package/src/book-components/Chat/Chat/Chat.module.css +172 -27
  499. package/src/book-components/Chat/Chat/ChatMessageMap.tsx +7 -4
  500. package/src/book-components/Chat/Chat/ChatProps.tsx +3 -2
  501. package/src/book-components/Chat/Chat/renderAgentProjectDiff.tsx +85 -0
  502. package/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.tsx +206 -0
  503. package/src/book-components/Chat/Chat/renderToolCallDetails.tsx +9 -12
  504. package/src/book-components/Chat/MarkdownContent/MarkdownContent.module.css +85 -17
  505. package/src/book-components/Chat/MarkdownContent/MarkdownContent.tsx +115 -2
  506. package/src/book-components/Chat/save/react/exports/chat-preview-2025-10-13 (1).jsx +95 -5
  507. package/src/book-components/Chat/utils/$provideServerDomWindow.ts +77 -0
  508. package/src/book-components/Chat/utils/agentProjectToolCall.ts +151 -0
  509. package/src/book-components/Chat/utils/externalSourceToolCall.ts +65 -0
  510. package/src/book-components/Chat/utils/getToolCallChipletInfo.ts +64 -0
  511. package/src/book-components/Chat/utils/renderMarkdown.ts +660 -119
  512. package/src/book-components/Chat/utils/timeoutToolCallPresentation.ts +34 -3
  513. package/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.ts +14 -0
  514. package/src/cli/cli-commands/agents-server/buildAgentsServer/ensureAgentsServerBuild.ts +1 -0
  515. package/src/cli/cli-commands/agents-server/startAgentsServer/createLocalAgentRunOptions.ts +1 -1
  516. package/src/cli/cli-commands/coder/GitChangesMode.ts +35 -0
  517. package/src/cli/cli-commands/coder/add.ts +40 -12
  518. package/src/cli/cli-commands/coder/boilerplateCount.ts +139 -0
  519. package/src/cli/cli-commands/coder/boilerplateTemplates.ts +3 -15
  520. package/src/cli/cli-commands/coder/generate-boilerplates.ts +81 -47
  521. package/src/cli/cli-commands/coder/getDefaultCoderPackageJsonScripts.ts +7 -4
  522. package/src/cli/cli-commands/coder/init.ts +40 -4
  523. package/src/cli/cli-commands/coder/ping.ts +58 -44
  524. package/src/cli/cli-commands/coder/run.ts +23 -4
  525. package/src/cli/cli-commands/coder/server.ts +12 -3
  526. package/src/cli/cli-commands/coder/verify.ts +55 -16
  527. package/src/cli/cli-commands/coder/waitOptions.ts +33 -0
  528. package/src/cli/cli-commands/coder.ts +3 -3
  529. package/src/cli/cli-commands/common/coderGitSyncCliOptions.ts +82 -0
  530. package/src/cli/cli-commands/common/harness/$applyHarnessInstallationStatus.ts +9 -2
  531. package/src/cli/cli-commands/common/harness/$checkHarnessInstallation.ts +24 -8
  532. package/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.ts +6 -3
  533. package/src/cli/cli-commands/common/harness/$resolveInstalledHarnessVersion.ts +2 -2
  534. package/src/cli/cli-commands/common/harness/HarnessInstallationStatus.ts +3 -2
  535. package/src/cli/cli-commands/common/harness/buildHarnessInstallCommand.ts +2 -1
  536. package/src/cli/cli-commands/common/harnessUpdateCliOptions.ts +46 -0
  537. package/src/cli/cli-commands/common/{harness/$askForHarnessInstallationApproval.ts → npm/$askForNpmPackageInstallationApproval.ts} +3 -3
  538. package/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.ts +49 -0
  539. package/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.ts +28 -0
  540. package/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.ts +25 -0
  541. package/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.ts +165 -0
  542. package/src/cli/cli-commands/common/projectInitialization.ts +10 -1
  543. package/src/cli/cli-commands/common/promptRunnerCliOptions.ts +22 -4
  544. package/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.ts +69 -0
  545. package/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.ts +117 -0
  546. package/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.ts +259 -0
  547. package/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.ts +55 -0
  548. package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.ts +76 -0
  549. package/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.ts +32 -0
  550. package/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.ts +13 -0
  551. package/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.ts +45 -0
  552. package/src/cli/cli-commands/run/prepareRunCommandResources.ts +2 -1
  553. package/src/cli/cli-commands/run/resolveRunInputParameters.ts +2 -1
  554. package/src/cli/cli-commands/runInteractiveChatbot.ts +2 -1
  555. package/src/cli/common/$provideLlmToolsForCli.ts +2 -1
  556. package/src/cli/common/loadPromptsModule.ts +13 -0
  557. package/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.ts +47 -3
  558. package/src/commands/FORMAT/formatCommandParser.ts +4 -2
  559. package/src/commitments/ACTION/ACTION.ts +3 -3
  560. package/src/commitments/FROM/FROM.ts +13 -0
  561. package/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.ts +1 -1
  562. package/src/commitments/META_FULLNAME/META_FULLNAME.ts +70 -0
  563. package/src/commitments/META_ID/META_ID.ts +78 -0
  564. package/src/commitments/_common/getAllCommitmentsToolFunctionsForNode.ts +1 -49
  565. package/src/commitments/index.ts +6 -24
  566. package/src/conversion/archive/loadArchive.ts +2 -1
  567. package/src/conversion/archive/loadJsZipModule.ts +10 -0
  568. package/src/conversion/archive/saveArchive.ts +2 -1
  569. package/src/executables/platforms/locateAppOnWindows.ts +12 -9
  570. package/src/llm-providers/agent/Agent.ts +1 -1
  571. package/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.ts +13 -1
  572. package/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.ts +13 -1
  573. package/src/llm-providers/openai/OpenAiAgentKitExecutionTools.ts +6 -2
  574. package/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.ts +9 -7
  575. package/src/llm-providers/openai/OpenAiAssistantExecutionTools.ts +1 -1
  576. package/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.ts +1 -1
  577. package/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.ts +1 -1
  578. package/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.ts +1 -1
  579. package/src/llm-providers/openai/OpenAiCompatibleRequestManager.ts +12 -1
  580. package/src/llm-providers/openai/utils/buildToolInvocationScript.ts +21 -18
  581. package/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.ts +1 -1
  582. package/src/llm-providers/openai/utils/loadOpenAiAgentsModule.ts +11 -0
  583. package/src/llm-providers/openai/utils/uploadFilesToOpenAi.ts +1 -1
  584. package/src/other/templates/getTemplatesPipelineCollection.ts +843 -772
  585. package/src/remote-server/createRemoteClient.ts +12 -1
  586. package/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.ts +8 -9
  587. package/src/scrapers/website/WebsiteScraper.ts +22 -2
  588. package/src/utils/agent-message-runtime/AgentMessageProjectChange.ts +183 -0
  589. package/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.ts +80 -0
  590. package/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.ts +108 -0
  591. package/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.ts +78 -75
  592. package/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.ts +341 -0
  593. package/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.ts +147 -0
  594. package/src/utils/agents/terminalAgentAvatarVisual.ts +31 -3
  595. package/src/utils/ascii-art/convertImageDataToAsciiArt.ts +9 -109
  596. package/src/utils/ascii-art/createAnsiColorCode.ts +132 -0
  597. package/src/utils/misc/createLazyModuleLoader.ts +27 -0
  598. package/src/utils/misc/debounce.ts +26 -5
  599. package/src/utils/random/$generateBookBoilerplate.ts +1 -1
  600. package/src/version.ts +2 -2
  601. package/src/versions.txt +17 -0
  602. package/umd/index.umd.js +8545 -8136
  603. package/umd/index.umd.js.map +1 -1
  604. package/umd/scripts/run-agent-messages/git/commitAgentProjectChanges.d.ts +15 -0
  605. package/umd/scripts/run-agent-messages/git/commitAnsweredMessageProjectChanges.d.ts +24 -0
  606. package/umd/scripts/run-agent-messages/git/ensureAgentProjectGitRepository.d.ts +20 -0
  607. package/umd/scripts/run-agent-messages/git/readAgentProjectCommitChange.d.ts +11 -0
  608. package/umd/scripts/run-agent-messages/git/runAgentProjectGitCommand.d.ts +29 -0
  609. package/umd/scripts/run-agent-messages/messages/buildAgentGoalChatPromptSection.d.ts +26 -0
  610. package/umd/scripts/run-agent-messages/messages/buildAgentMessagePrompt.d.ts +12 -1
  611. package/umd/scripts/run-agent-messages/messages/buildAgentProjectsPromptSection.d.ts +2 -14
  612. package/umd/scripts/run-agent-messages/messages/buildAgentTeamPromptSection.d.ts +12 -0
  613. package/umd/scripts/run-agent-messages/messages/finalizeAgentTeamConversationWorkspace.d.ts +16 -0
  614. package/umd/scripts/run-agent-messages/messages/listAgentProjectDirectoryNames.d.ts +7 -0
  615. package/umd/scripts/run-agent-messages/messages/loadAgentPlannedMessagesSidecar.d.ts +10 -0
  616. package/umd/scripts/run-agent-messages/messages/loadAgentTeamConversationWorkspace.d.ts +6 -0
  617. package/umd/scripts/run-agent-messages/messages/resolveAnsweredMessageTouches.d.ts +29 -0
  618. package/umd/scripts/run-codex-prompts/common/CoderRunControlFeedback.d.ts +54 -0
  619. package/umd/scripts/run-codex-prompts/common/applyCoderRunControlKey.d.ts +14 -0
  620. package/umd/scripts/run-codex-prompts/common/buildCoderRunControlKeyBadge.d.ts +7 -0
  621. package/umd/scripts/run-codex-prompts/common/createCoderRunStepTracker.d.ts +48 -0
  622. package/umd/scripts/run-codex-prompts/common/formatCoderRunControlFeedback.d.ts +13 -0
  623. package/umd/scripts/run-codex-prompts/common/listenForCoderRunControls.d.ts +17 -0
  624. package/umd/scripts/run-codex-prompts/common/normalizeLineEndingsInChangedFiles.d.ts +2 -3
  625. package/umd/scripts/run-codex-prompts/common/runGoScript/$spawnLoggedBashScript.d.ts +25 -0
  626. package/umd/scripts/run-codex-prompts/common/runGoScript/$terminateLoggedBashProcessTree.d.ts +11 -0
  627. package/umd/scripts/run-codex-prompts/common/runGoScript/scriptExecutionLog.d.ts +11 -0
  628. package/umd/scripts/run-codex-prompts/common/waitForPause.d.ts +0 -8
  629. package/umd/scripts/run-codex-prompts/common/waitForSkippableWorldTimeDeadline.d.ts +15 -0
  630. package/umd/scripts/run-codex-prompts/git/coderCommitScope.d.ts +31 -0
  631. package/umd/scripts/run-codex-prompts/git/coderGitSync.d.ts +56 -0
  632. package/umd/scripts/run-codex-prompts/git/commitChanges.d.ts +12 -3
  633. package/umd/scripts/run-codex-prompts/git/workingTreeChanges.d.ts +40 -0
  634. package/umd/scripts/run-codex-prompts/main/resolvePromptRunner.d.ts +8 -1
  635. package/umd/scripts/run-codex-prompts/ping/buildCoderPingPrompt.d.ts +20 -0
  636. package/umd/scripts/run-codex-prompts/ping/extractCoderPingAnswer.d.ts +9 -0
  637. package/umd/scripts/run-codex-prompts/ping/pingCoderHarness.d.ts +23 -0
  638. package/umd/scripts/run-codex-prompts/ping/pingCoderHarnessPeriodically.d.ts +22 -0
  639. package/umd/scripts/run-codex-prompts/ping/printCoderPingResult.d.ts +5 -0
  640. package/umd/scripts/run-codex-prompts/prompts/buildPromptLabel.d.ts +6 -0
  641. package/umd/scripts/run-codex-prompts/prompts/buildPromptStatusDetails.d.ts +50 -0
  642. package/umd/scripts/run-codex-prompts/prompts/formatCoderRunSteps.d.ts +6 -3
  643. package/umd/scripts/run-codex-prompts/prompts/isPromptSectionUnfinished.d.ts +8 -0
  644. package/umd/scripts/run-codex-prompts/prompts/listPromptsByStatus.d.ts +7 -0
  645. package/umd/scripts/run-codex-prompts/prompts/markPromptDone.d.ts +15 -4
  646. package/umd/scripts/run-codex-prompts/prompts/markPromptFailed.d.ts +34 -1
  647. package/umd/scripts/run-codex-prompts/prompts/markPromptInProgress.d.ts +27 -0
  648. package/umd/scripts/run-codex-prompts/prompts/promptRunnerAttribution.d.ts +24 -0
  649. package/umd/scripts/run-codex-prompts/prompts/resolveInterruptedPrompt.d.ts +9 -0
  650. package/umd/scripts/run-codex-prompts/prompts/resolvePromptStatusLine.d.ts +19 -0
  651. package/umd/scripts/run-codex-prompts/prompts/writePromptStatusLine.d.ts +9 -0
  652. package/umd/scripts/run-codex-prompts/server/buildCoderServerPromptResponse.d.ts +1 -1
  653. package/umd/scripts/run-codex-prompts/server/coderServerHtml.d.ts +1 -1
  654. package/umd/scripts/run-codex-prompts/server/updatePromptSection.d.ts +1 -1
  655. package/umd/scripts/run-codex-prompts/testing/runPromptWithTestFeedback.d.ts +6 -0
  656. package/umd/scripts/run-codex-prompts/ui/CoderRunUiState.d.ts +15 -1
  657. package/umd/scripts/run-codex-prompts/ui/buildCoderRunAgentVisual.d.ts +5 -5
  658. package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiFrame.d.ts +6 -1
  659. package/umd/scripts/run-codex-prompts/ui/buildCoderRunUiTerminalFrameUpdate.d.ts +27 -0
  660. package/umd/scripts/run-codex-prompts/ui/buildRunUiFrameShared.d.ts +11 -0
  661. package/umd/scripts/verify-prompts/$orderPromptFiles.d.ts +9 -0
  662. package/umd/scripts/verify-prompts/VerifyPromptsOrder.d.ts +26 -0
  663. package/umd/scripts/verify-prompts/verify-prompts.d.ts +8 -2
  664. package/umd/src/_packages/components.index.d.ts +4 -0
  665. package/umd/src/_packages/types.index.d.ts +4 -0
  666. package/umd/src/avatars/renderAvatarVisualTerminalText.d.ts +80 -0
  667. package/umd/src/avatars/types/AvatarVisualDefinition.d.ts +54 -0
  668. package/umd/src/book-2.0/agent-source/AgentBasicInformation.d.ts +3 -3
  669. package/umd/src/book-2.0/agent-source/AgentSourceParseResult.d.ts +5 -0
  670. package/umd/src/book-2.0/agent-source/ParsedUnknownCommitment.d.ts +26 -0
  671. package/umd/src/book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts +1 -0
  672. package/umd/src/book-2.0/agent-source/getBookCommitmentLineType.d.ts +19 -0
  673. package/umd/src/book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts +1 -0
  674. package/umd/src/book-3.0/AgentMessageRunReport.d.ts +46 -0
  675. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.d.ts +127 -0
  676. package/umd/src/book-3.0/AgentPlannedMessagesSidecar.test.d.ts +1 -0
  677. package/umd/src/book-3.0/AgentTeamConversationWorkspace.d.ts +85 -0
  678. package/umd/src/book-3.0/createAgentMessageSidecarBaseName.d.ts +13 -0
  679. package/umd/src/book-3.0/describeAgentPlannedMessageSchedule.d.ts +31 -0
  680. package/umd/src/book-components/BookEditor/createDeprecatedCommitmentDiagnostics.browser.d.ts +1 -9
  681. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.d.ts +28 -0
  682. package/umd/src/book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts +1 -0
  683. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.d.ts +28 -0
  684. package/umd/src/book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts +1 -0
  685. package/umd/src/book-components/Chat/Chat/ChatProps.d.ts +3 -2
  686. package/umd/src/book-components/Chat/Chat/renderAgentProjectDiff.d.ts +13 -0
  687. package/umd/src/book-components/Chat/Chat/renderAgentProjectToolCallDetails.d.ts +16 -0
  688. package/umd/src/book-components/Chat/utils/$provideServerDomWindow.d.ts +11 -0
  689. package/umd/src/book-components/Chat/utils/agentProjectToolCall.d.ts +85 -0
  690. package/umd/src/book-components/Chat/utils/agentProjectToolCall.test.d.ts +1 -0
  691. package/umd/src/book-components/Chat/utils/externalSourceToolCall.d.ts +38 -0
  692. package/umd/src/book-components/Chat/utils/renderMarkdown.d.ts +68 -3
  693. package/umd/src/book-components/Chat/utils/timeoutToolCallPresentation.d.ts +30 -0
  694. package/umd/src/cli/cli-commands/agents-server/buildAgentsServer/createAgentsServerRuntimeEnvironment.d.ts +7 -0
  695. package/umd/src/cli/cli-commands/coder/GitChangesMode.d.ts +28 -0
  696. package/umd/src/cli/cli-commands/coder/boilerplateCount.d.ts +52 -0
  697. package/umd/src/cli/cli-commands/coder/boilerplateCount.test.d.ts +1 -0
  698. package/umd/src/cli/cli-commands/coder/generate-boilerplates.d.ts +4 -3
  699. package/umd/src/cli/cli-commands/coder/generate-boilerplates.test.d.ts +1 -0
  700. package/umd/src/cli/cli-commands/coder/ping.d.ts +2 -5
  701. package/umd/src/cli/cli-commands/coder/verify.d.ts +1 -1
  702. package/umd/src/cli/cli-commands/coder/waitOptions.d.ts +12 -0
  703. package/umd/src/cli/cli-commands/coder.d.ts +1 -1
  704. package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.d.ts +34 -0
  705. package/umd/src/cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts +1 -0
  706. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.d.ts +3 -3
  707. package/umd/src/cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts +1 -0
  708. package/umd/src/cli/cli-commands/common/harness/$ensureHarnessInstallations.d.ts +3 -3
  709. package/umd/src/cli/cli-commands/common/harness/HarnessInstallationStatus.d.ts +3 -2
  710. package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.d.ts +29 -0
  711. package/umd/src/cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts +1 -0
  712. package/{esm/src/cli/cli-commands/common/harness/$askForHarnessInstallationApproval.d.ts → umd/src/cli/cli-commands/common/npm/$askForNpmPackageInstallationApproval.d.ts} +2 -2
  713. package/umd/src/cli/cli-commands/common/{harness/$resolveLatestHarnessVersion.d.ts → npm/$resolveLatestNpmPackageVersion.d.ts} +2 -3
  714. package/umd/src/cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts +1 -0
  715. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.d.ts +12 -0
  716. package/umd/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts +1 -0
  717. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.d.ts +12 -0
  718. package/umd/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts +1 -0
  719. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.d.ts +12 -0
  720. package/umd/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts +1 -0
  721. package/umd/src/cli/cli-commands/common/promptRunnerCliOptions.d.ts +9 -2
  722. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.d.ts +9 -0
  723. package/umd/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts +1 -0
  724. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.d.ts +14 -0
  725. package/umd/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts +1 -0
  726. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.d.ts +12 -0
  727. package/umd/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts +1 -0
  728. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.d.ts +10 -0
  729. package/umd/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts +1 -0
  730. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallation.d.ts +66 -0
  731. package/umd/src/cli/cli-commands/common/promptbook-cli/PromptbookCliInstallationStatus.d.ts +26 -0
  732. package/umd/src/cli/cli-commands/common/promptbook-cli/buildPromptbookCliInstallCommand.d.ts +7 -0
  733. package/umd/src/cli/cli-commands/common/promptbook-cli/formatPromptbookCliInstallationWarning.d.ts +7 -0
  734. package/umd/src/cli/common/loadPromptsModule.d.ts +16 -0
  735. package/umd/src/collection/agent-collection/constructors/agent-collection-in-supabase/AgentCollectionInSupabase.d.ts +15 -0
  736. package/{esm/src/commitments/COMPONENT/COMPONENT.d.ts → umd/src/commitments/META_FULLNAME/META_FULLNAME.d.ts} +8 -5
  737. package/umd/src/commitments/META_ID/META_ID.d.ts +32 -0
  738. package/umd/src/commitments/index.d.ts +4 -12
  739. package/umd/src/executables/platforms/locateAppOnWindows.d.ts +1 -1
  740. package/umd/src/executables/platforms/locateAppOnWindows.test.d.ts +1 -0
  741. package/umd/src/llm-providers/agent/Agent.d.ts +1 -1
  742. package/umd/src/llm-providers/anthropic-claude/AnthropicClaudeExecutionTools.d.ts +1 -1
  743. package/umd/src/llm-providers/azure-openai/AzureOpenAiExecutionTools.d.ts +1 -1
  744. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionTools.d.ts +1 -1
  745. package/umd/src/llm-providers/openai/OpenAiAgentKitExecutionToolsToolBuilder.d.ts +2 -2
  746. package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsStreamRunner.d.ts +1 -1
  747. package/umd/src/llm-providers/openai/OpenAiAssistantExecutionToolsToolRunner.d.ts +1 -1
  748. package/umd/src/llm-providers/openai/OpenAiCompatibleNonChatPromptCaller.d.ts +1 -1
  749. package/umd/src/llm-providers/openai/OpenAiCompatibleRequestManager.d.ts +1 -1
  750. package/umd/src/llm-providers/openai/utils/callOpenAiCompatibleChatModel.d.ts +1 -1
  751. package/umd/src/llm-providers/openai/utils/loadOpenAiAgentsModule.d.ts +203 -0
  752. package/umd/src/llm-providers/openai/utils/uploadFilesToOpenAi.d.ts +1 -1
  753. package/umd/src/{commitments/USE_BROWSER → scrapers/_common/utils}/fetchUrlContent.d.ts +2 -3
  754. package/umd/src/utils/agent-message-runtime/AgentMessageProjectChange.d.ts +76 -0
  755. package/umd/src/utils/agent-message-runtime/AgentMessageTouchedExternalSource.d.ts +45 -0
  756. package/umd/src/utils/agent-message-runtime/parseAgentMessageRuntimeLogEvents.d.ts +62 -0
  757. package/umd/src/utils/agent-message-runtime/resolveAgentMessageRuntimeActivity.d.ts +3 -3
  758. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.d.ts +18 -0
  759. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts +1 -0
  760. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.d.ts +19 -0
  761. package/umd/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts +1 -0
  762. package/umd/src/utils/agents/terminalAgentAvatarVisual.d.ts +5 -2
  763. package/umd/src/utils/ascii-art/convertImageDataToAsciiArt.d.ts +6 -0
  764. package/umd/src/utils/ascii-art/createAnsiColorCode.d.ts +46 -0
  765. package/umd/src/utils/misc/createLazyModuleLoader.d.ts +14 -0
  766. package/umd/src/utils/misc/debounce.d.ts +4 -2
  767. package/umd/src/utils/misc/debounce.test.d.ts +1 -0
  768. package/umd/src/utils/random/$generateBookBoilerplate.test.d.ts +1 -0
  769. package/umd/src/version.d.ts +1 -1
  770. package/apps/agents-server/scripts/ignore-kill-eperm.js +0 -31
  771. package/apps/agents-server/src/app/admin/task-manager/TaskManagerScopeTabs.tsx +0 -74
  772. package/apps/agents-server/src/app/agents/[agentName]/api/timeouts/actions/route.ts +0 -103
  773. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsClient.tsx +0 -43
  774. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsEditDialog.tsx +0 -98
  775. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsFiltersCard.tsx +0 -75
  776. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsHeader.tsx +0 -53
  777. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsSummaryMetrics.tsx +0 -70
  778. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableCard.tsx +0 -58
  779. package/apps/agents-server/src/app/agents/[agentName]/timeouts/AgentTimeoutsTableRow.tsx +0 -242
  780. package/apps/agents-server/src/app/agents/[agentName]/timeouts/loading.tsx +0 -15
  781. package/apps/agents-server/src/app/agents/[agentName]/timeouts/page.tsx +0 -28
  782. package/apps/agents-server/src/app/agents/[agentName]/timeouts/useAgentTimeoutsClientState.ts +0 -769
  783. package/apps/agents-server/src/components/AgentProjectDnsInstructions/AgentProjectDnsInstructions.tsx +0 -182
  784. package/apps/agents-server/src/tools/configureTimeoutToolRuntimeAdapterForServer.ts +0 -381
  785. package/apps/agents-server/src/utils/emails/extractUseEmailConfigurationFromAgentSource.ts +0 -42
  786. package/apps/agents-server/src/utils/userChatClient/runAgentUserTimeoutBulkAction.ts +0 -24
  787. package/apps/agents-server/src/utils/userChatClient/updateAgentUserTimeout.ts +0 -25
  788. package/esm/scripts/run-agent-chat/runCoderPing.d.ts +0 -48
  789. package/esm/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
  790. package/esm/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
  791. package/esm/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  792. package/esm/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  793. package/esm/src/commitments/MEMORY/MEMORY.d.ts +0 -48
  794. package/esm/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
  795. package/esm/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
  796. package/esm/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
  797. package/esm/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
  798. package/esm/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
  799. package/esm/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
  800. package/esm/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  801. package/esm/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
  802. package/esm/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
  803. package/esm/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
  804. package/esm/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
  805. package/esm/src/commitments/META/META.d.ts +0 -65
  806. package/esm/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
  807. package/esm/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
  808. package/esm/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
  809. package/esm/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
  810. package/esm/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
  811. package/esm/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
  812. package/esm/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
  813. package/esm/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
  814. package/esm/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
  815. package/esm/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
  816. package/esm/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
  817. package/esm/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
  818. package/esm/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
  819. package/esm/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
  820. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
  821. package/esm/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
  822. package/esm/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
  823. package/esm/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
  824. package/esm/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
  825. package/esm/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
  826. package/esm/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  827. package/esm/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
  828. package/esm/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
  829. package/esm/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
  830. package/esm/src/commitments/WALLET/WALLET.d.ts +0 -21
  831. package/esm/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
  832. package/esm/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
  833. package/esm/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
  834. package/esm/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
  835. package/esm/src/commitments/WALLET/createWalletTools.d.ts +0 -7
  836. package/esm/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
  837. package/esm/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
  838. package/esm/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
  839. package/esm/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
  840. package/esm/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
  841. package/esm/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
  842. package/esm/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
  843. package/src/cli/cli-commands/common/harness/$resolveLatestHarnessVersion.ts +0 -34
  844. package/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.ts +0 -28
  845. package/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.ts +0 -39
  846. package/src/commitments/COMPONENT/COMPONENT.ts +0 -70
  847. package/src/commitments/MEMORY/MEMORY.ts +0 -94
  848. package/src/commitments/MEMORY/MemoryToolNames.ts +0 -13
  849. package/src/commitments/MEMORY/MemoryToolRuntimeAdapter.ts +0 -180
  850. package/src/commitments/MEMORY/createMemorySystemMessage.ts +0 -27
  851. package/src/commitments/MEMORY/createMemoryToolFunctions.ts +0 -134
  852. package/src/commitments/MEMORY/createMemoryTools.ts +0 -115
  853. package/src/commitments/MEMORY/getMemoryCommitmentDocumentation.ts +0 -47
  854. package/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.ts +0 -104
  855. package/src/commitments/MEMORY/getMemoryToolTitles.ts +0 -16
  856. package/src/commitments/MEMORY/parseMemoryToolArgs.ts +0 -126
  857. package/src/commitments/MEMORY/resolveMemoryRuntimeContext.ts +0 -23
  858. package/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.ts +0 -26
  859. package/src/commitments/META/META.ts +0 -168
  860. package/src/commitments/USE/TODO.txt +0 -1
  861. package/src/commitments/USE/aggregateUseCommitmentSystemMessages.ts +0 -219
  862. package/src/commitments/USE_BROWSER/TODO.txt +0 -1
  863. package/src/commitments/USE_BROWSER/USE_BROWSER.ts +0 -257
  864. package/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.ts +0 -45
  865. package/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.ts +0 -83
  866. package/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.ts +0 -146
  867. package/src/commitments/USE_EMAIL/USE_EMAIL.ts +0 -201
  868. package/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.ts +0 -75
  869. package/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.ts +0 -44
  870. package/src/commitments/USE_EMAIL/sendEmailViaBrowser.ts +0 -47
  871. package/src/commitments/USE_SEARCH_ENGINE/TODO.txt +0 -1
  872. package/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.ts +0 -171
  873. package/src/commitments/USE_SPAWN/USE_SPAWN.ts +0 -150
  874. package/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.ts +0 -42
  875. package/src/commitments/USE_SPAWN/spawnAgentViaBrowser.ts +0 -50
  876. package/src/commitments/USE_TIME/USE_TIME.ts +0 -177
  877. package/src/commitments/USE_TIMEOUT/TimeoutToolNames.ts +0 -13
  878. package/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.ts +0 -255
  879. package/src/commitments/USE_TIMEOUT/USE_TIMEOUT.ts +0 -117
  880. package/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.ts +0 -22
  881. package/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.ts +0 -361
  882. package/src/commitments/USE_TIMEOUT/createTimeoutTools.ts +0 -127
  883. package/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.ts +0 -67
  884. package/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.ts +0 -460
  885. package/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.ts +0 -36
  886. package/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.ts +0 -26
  887. package/src/commitments/WALLET/WALLET.ts +0 -71
  888. package/src/commitments/WALLET/WalletToolNames.ts +0 -14
  889. package/src/commitments/WALLET/WalletToolRuntimeAdapter.ts +0 -180
  890. package/src/commitments/WALLET/createWalletSystemMessage.ts +0 -22
  891. package/src/commitments/WALLET/createWalletToolFunctions.ts +0 -145
  892. package/src/commitments/WALLET/createWalletTools.ts +0 -129
  893. package/src/commitments/WALLET/getWalletCommitmentDocumentation.ts +0 -14
  894. package/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.ts +0 -64
  895. package/src/commitments/WALLET/getWalletToolTitles.ts +0 -17
  896. package/src/commitments/WALLET/parseWalletToolArgs.ts +0 -231
  897. package/src/commitments/WALLET/resolveWalletRuntimeContext.ts +0 -23
  898. package/src/commitments/WALLET/setWalletToolRuntimeAdapter.ts +0 -26
  899. package/src/commitments/_common/createSerpSearchToolFunction.ts +0 -46
  900. package/umd/scripts/run-agent-chat/runCoderPing.d.ts +0 -48
  901. package/umd/scripts/run-codex-prompts/prompts/replacePromptTodoStatusLine.d.ts +0 -7
  902. package/umd/scripts/run-codex-prompts/ui/buildCoderRunOctopusVisual.d.ts +0 -13
  903. package/umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.d.ts +0 -11
  904. package/umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.d.ts +0 -9
  905. package/umd/src/commitments/MEMORY/MEMORY.d.ts +0 -48
  906. package/umd/src/commitments/MEMORY/MemoryToolNames.d.ts +0 -11
  907. package/umd/src/commitments/MEMORY/MemoryToolRuntimeAdapter.d.ts +0 -149
  908. package/umd/src/commitments/MEMORY/createMemorySystemMessage.d.ts +0 -6
  909. package/umd/src/commitments/MEMORY/createMemoryToolFunctions.d.ts +0 -8
  910. package/umd/src/commitments/MEMORY/createMemoryTools.d.ts +0 -14
  911. package/umd/src/commitments/MEMORY/getMemoryCommitmentDocumentation.d.ts +0 -6
  912. package/umd/src/commitments/MEMORY/getMemoryToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  913. package/umd/src/commitments/MEMORY/getMemoryToolTitles.d.ts +0 -7
  914. package/umd/src/commitments/MEMORY/parseMemoryToolArgs.d.ts +0 -61
  915. package/umd/src/commitments/MEMORY/resolveMemoryRuntimeContext.d.ts +0 -8
  916. package/umd/src/commitments/MEMORY/setMemoryToolRuntimeAdapter.d.ts +0 -13
  917. package/umd/src/commitments/META/META.d.ts +0 -65
  918. package/umd/src/commitments/USE/aggregateUseCommitmentSystemMessages.d.ts +0 -32
  919. package/umd/src/commitments/USE_BROWSER/USE_BROWSER.d.ts +0 -58
  920. package/umd/src/commitments/USE_BROWSER/fetchUrlContentViaBrowser.d.ts +0 -13
  921. package/umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.d.ts +0 -10
  922. package/umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.d.ts +0 -47
  923. package/umd/src/commitments/USE_EMAIL/USE_EMAIL.d.ts +0 -38
  924. package/umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.d.ts +0 -21
  925. package/umd/src/commitments/USE_EMAIL/resolveSendEmailToolForNode.d.ts +0 -11
  926. package/umd/src/commitments/USE_EMAIL/sendEmailViaBrowser.d.ts +0 -13
  927. package/umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.d.ts +0 -46
  928. package/umd/src/commitments/USE_SPAWN/USE_SPAWN.d.ts +0 -38
  929. package/umd/src/commitments/USE_SPAWN/resolveSpawnAgentToolForNode.d.ts +0 -9
  930. package/umd/src/commitments/USE_SPAWN/spawnAgentViaBrowser.d.ts +0 -12
  931. package/umd/src/commitments/USE_TIME/USE_TIME.d.ts +0 -43
  932. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolNames.d.ts +0 -11
  933. package/umd/src/commitments/USE_TIMEOUT/TimeoutToolRuntimeAdapter.d.ts +0 -212
  934. package/umd/src/commitments/USE_TIMEOUT/USE_TIMEOUT.d.ts +0 -38
  935. package/umd/src/commitments/USE_TIMEOUT/createTimeoutSystemMessage.d.ts +0 -6
  936. package/umd/src/commitments/USE_TIMEOUT/createTimeoutToolFunctions.d.ts +0 -8
  937. package/umd/src/commitments/USE_TIMEOUT/createTimeoutTools.d.ts +0 -7
  938. package/umd/src/commitments/USE_TIMEOUT/getTimeoutToolRuntimeAdapterOrDisabledResult.d.ts +0 -17
  939. package/umd/src/commitments/USE_TIMEOUT/parseTimeoutToolArgs.d.ts +0 -78
  940. package/umd/src/commitments/USE_TIMEOUT/resolveTimeoutRuntimeContext.d.ts +0 -8
  941. package/umd/src/commitments/USE_TIMEOUT/setTimeoutToolRuntimeAdapter.d.ts +0 -13
  942. package/umd/src/commitments/WALLET/WALLET.d.ts +0 -21
  943. package/umd/src/commitments/WALLET/WalletToolNames.d.ts +0 -12
  944. package/umd/src/commitments/WALLET/WalletToolRuntimeAdapter.d.ts +0 -163
  945. package/umd/src/commitments/WALLET/createWalletSystemMessage.d.ts +0 -6
  946. package/umd/src/commitments/WALLET/createWalletToolFunctions.d.ts +0 -8
  947. package/umd/src/commitments/WALLET/createWalletTools.d.ts +0 -7
  948. package/umd/src/commitments/WALLET/getWalletCommitmentDocumentation.d.ts +0 -6
  949. package/umd/src/commitments/WALLET/getWalletToolRuntimeAdapterOrDisabledResult.d.ts +0 -16
  950. package/umd/src/commitments/WALLET/getWalletToolTitles.d.ts +0 -7
  951. package/umd/src/commitments/WALLET/parseWalletToolArgs.d.ts +0 -51
  952. package/umd/src/commitments/WALLET/resolveWalletRuntimeContext.d.ts +0 -8
  953. package/umd/src/commitments/WALLET/setWalletToolRuntimeAdapter.d.ts +0 -13
  954. package/umd/src/commitments/_common/createSerpSearchToolFunction.d.ts +0 -12
  955. /package/esm/src/{book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
  956. /package/esm/src/{cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
  957. /package/esm/src/{cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → book-2.0/agent-source/createAgentModelRequirementsWithCommitments.unknown.test.d.ts} +0 -0
  958. /package/esm/src/{commitments/MEMORY/MEMORY.test.d.ts → book-2.0/agent-source/parseAgentSourceWithCommitments.unknown.test.d.ts} +0 -0
  959. /package/esm/src/{commitments/USE_BROWSER/USE_BROWSER.test.d.ts → book-3.0/AgentPlannedMessagesSidecar.test.d.ts} +0 -0
  960. /package/esm/src/{commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → book-components/BookEditor/createDuplicateFromCommitmentDiagnostics.test.d.ts} +0 -0
  961. /package/esm/src/{commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → book-components/BookEditor/createUnknownCommitmentDiagnostics.test.d.ts} +0 -0
  962. /package/esm/src/{commitments/USE_EMAIL/USE_EMAIL.test.d.ts → book-components/Chat/utils/agentProjectToolCall.test.d.ts} +0 -0
  963. /package/esm/src/{commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → cli/cli-commands/coder/boilerplateCount.test.d.ts} +0 -0
  964. /package/esm/src/{commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → cli/cli-commands/coder/generate-boilerplates.test.d.ts} +0 -0
  965. /package/esm/src/{commitments/USE_SPAWN/USE_SPAWN.test.d.ts → cli/cli-commands/common/coderGitSyncCliOptions.test.d.ts} +0 -0
  966. /package/esm/src/{commitments/USE_TIME/USE_TIME.test.d.ts → cli/cli-commands/common/harness/$checkHarnessInstallation.test.d.ts} +0 -0
  967. /package/esm/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → cli/cli-commands/common/harnessUpdateCliOptions.test.d.ts} +0 -0
  968. /package/esm/src/{commitments/WALLET/WALLET.test.d.ts → cli/cli-commands/common/npm/$resolveLatestNpmPackageVersion.test.d.ts} +0 -0
  969. /package/{umd/src/book-2.0/agent-source/createAgentModelRequirements.useCommitmentAggregation.test.d.ts → esm/src/cli/cli-commands/common/npm/buildNpmPackageInstallCommand.test.d.ts} +0 -0
  970. /package/{umd/src/cli/cli-commands/common/harness/extractHarnessVersionFromOutput.test.d.ts → esm/src/cli/cli-commands/common/npm/extractNpmPackageVersionFromOutput.test.d.ts} +0 -0
  971. /package/{umd/src/cli/cli-commands/common/harness/isHarnessVersionOutdated.test.d.ts → esm/src/cli/cli-commands/common/npm/isNpmPackageVersionOutdated.test.d.ts} +0 -0
  972. /package/{umd/src/commitments/MEMORY/MEMORY.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$checkPromptbookCliInstallations.test.d.ts} +0 -0
  973. /package/{umd/src/commitments/USE_BROWSER/USE_BROWSER.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$ensurePromptbookCliInstallations.test.d.ts} +0 -0
  974. /package/{umd/src/commitments/USE_BROWSER/resolveRunBrowserToolForNode.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$resolvePromptbookCliInstallations.test.d.ts} +0 -0
  975. /package/{umd/src/commitments/USE_DEEPSEARCH/USE_DEEPSEARCH.test.d.ts → esm/src/cli/cli-commands/common/promptbook-cli/$updatePromptbookCliInstallation.test.d.ts} +0 -0
  976. /package/esm/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
  977. /package/{umd/src/commitments/USE_EMAIL/USE_EMAIL.test.d.ts → esm/src/executables/platforms/locateAppOnWindows.test.d.ts} +0 -0
  978. /package/{umd/src/commitments/USE_EMAIL/parseUseEmailCommitmentContent.test.d.ts → esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedExternalSources.test.d.ts} +0 -0
  979. /package/{umd/src/commitments/USE_SEARCH_ENGINE/USE_SEARCH_ENGINE.test.d.ts → esm/src/utils/agent-message-runtime/resolveAgentMessageTouchedProjectNames.test.d.ts} +0 -0
  980. /package/{umd/src/commitments/USE_SPAWN/USE_SPAWN.test.d.ts → esm/src/utils/misc/debounce.test.d.ts} +0 -0
  981. /package/{umd/src/commitments/USE_TIME/USE_TIME.test.d.ts → esm/src/utils/random/$generateBookBoilerplate.test.d.ts} +0 -0
  982. /package/umd/src/{commitments/USE_TIMEOUT/USE_TIMEOUT.test.d.ts → avatars/renderAvatarVisualTerminalText.test.d.ts} +0 -0
  983. /package/umd/src/{commitments/WALLET/WALLET.test.d.ts → book-2.0/agent-source/createAgentModelRequirements.commitmentAggregation.test.d.ts} +0 -0
  984. /package/umd/src/commitments/{META → META_DESCRIPTION}/META_DESCRIPTION.d.ts +0 -0
@@ -0,0 +1,147 @@
1
+ import { AGENT_PROJECTS_DIRECTORY_PATH } from '../../book-3.0/agentFolderPaths';
2
+ import type { AgentMessageRuntimeLogEvent } from './parseAgentMessageRuntimeLogEvents';
3
+ import { parseAgentMessageRuntimeLogEvents } from './parseAgentMessageRuntimeLogEvents';
4
+
5
+ /**
6
+ * Matches one project directory name following the agent `projects/` folder in a file path or command.
7
+ *
8
+ * Both path separators are accepted because the local runner answers messages on Unix and Windows,
9
+ * and JSON-encoded payloads escape backslashes.
10
+ *
11
+ * @private internal constant of agent-message touched projects
12
+ */
13
+ const TOUCHED_PROJECT_PATH_REGEX = new RegExp(`${AGENT_PROJECTS_DIRECTORY_PATH}[\\\\/]+([^\\\\/"'\\s,;:]+)`, 'giu');
14
+
15
+ /**
16
+ * Resolves which projects one coding harness touched while answering a single message.
17
+ *
18
+ * The runtime log streams what the harness really did, so a project counts as touched when the
19
+ * harness named it in a tool invocation — reading, searching, running, or editing files inside
20
+ * `projects/<project-name>/`. Only tool payloads are inspected: tool results and assistant
21
+ * narration are ignored so a project merely mentioned in the conversation is never reported.
22
+ *
23
+ * Every candidate is matched against the projects that really exist, which both filters prompt
24
+ * placeholders such as `projects/<project-name>/` and keeps the reported names canonical.
25
+ *
26
+ * @param options - Raw runtime log content and the project directory names of the agent.
27
+ * @returns Touched project names in the canonical spelling, ordered by first appearance.
28
+ * @private internal utility of the agent-message runtime
29
+ */
30
+ export function resolveAgentMessageTouchedProjectNames(options: {
31
+ readonly logText: string | null | undefined;
32
+ readonly knownProjectNames: ReadonlyArray<string>;
33
+ }): ReadonlyArray<string> {
34
+ const canonicalProjectNames = createCanonicalProjectNameLookup(options.knownProjectNames);
35
+ if (canonicalProjectNames.size === 0) {
36
+ return [];
37
+ }
38
+
39
+ const touchedProjectNames = new Set<string>();
40
+
41
+ for (const event of parseAgentMessageRuntimeLogEvents(options.logText)) {
42
+ for (const toolInvocationText of resolveRuntimeLogEventToolInvocationTexts(event)) {
43
+ for (const candidateProjectName of resolveCandidateProjectNames(toolInvocationText)) {
44
+ const canonicalProjectName = canonicalProjectNames.get(candidateProjectName.toLowerCase());
45
+
46
+ if (canonicalProjectName !== undefined) {
47
+ touchedProjectNames.add(canonicalProjectName);
48
+ }
49
+ }
50
+ }
51
+ }
52
+
53
+ return Array.from(touchedProjectNames);
54
+ }
55
+
56
+ /**
57
+ * Indexes the existing project directory names by their lower-cased form.
58
+ *
59
+ * @param knownProjectNames - Project directory names of the agent.
60
+ * @returns Lookup from the lower-cased name to its canonical spelling.
61
+ * @private internal helper of `resolveAgentMessageTouchedProjectNames`
62
+ */
63
+ function createCanonicalProjectNameLookup(knownProjectNames: ReadonlyArray<string>): Map<string, string> {
64
+ const canonicalProjectNames = new Map<string, string>();
65
+
66
+ for (const knownProjectName of knownProjectNames) {
67
+ const normalizedProjectName = knownProjectName.trim();
68
+
69
+ if (normalizedProjectName.length > 0) {
70
+ canonicalProjectNames.set(normalizedProjectName.toLowerCase(), normalizedProjectName);
71
+ }
72
+ }
73
+
74
+ return canonicalProjectNames;
75
+ }
76
+
77
+ /**
78
+ * Collects the texts of every tool invocation described by one runtime log event.
79
+ *
80
+ * Claude Code reports tool invocations as `tool_use` content blocks, while Codex reports executed
81
+ * commands and file changes as items — both carry the paths the harness worked with.
82
+ *
83
+ * @param event - One structured runtime log event.
84
+ * @returns Texts that may contain project paths.
85
+ * @private internal helper of `resolveAgentMessageTouchedProjectNames`
86
+ */
87
+ function resolveRuntimeLogEventToolInvocationTexts(event: AgentMessageRuntimeLogEvent): ReadonlyArray<string> {
88
+ const toolInvocationTexts: Array<string> = [];
89
+
90
+ for (const contentBlock of event.message?.content || []) {
91
+ if (contentBlock.type === 'tool_use' && contentBlock.input) {
92
+ toolInvocationTexts.push(serializeToolInput(contentBlock.input));
93
+ }
94
+ }
95
+
96
+ if (typeof event.item?.command === 'string') {
97
+ toolInvocationTexts.push(event.item.command);
98
+ }
99
+
100
+ for (const fileChange of event.item?.changes || []) {
101
+ if (typeof fileChange.path === 'string') {
102
+ toolInvocationTexts.push(fileChange.path);
103
+ }
104
+ }
105
+
106
+ return toolInvocationTexts;
107
+ }
108
+
109
+ /**
110
+ * Serializes one tool input payload into scannable text.
111
+ *
112
+ * @param toolInput - Tool arguments of one harness tool invocation.
113
+ * @returns Serialized payload, or an empty string when it cannot be serialized.
114
+ * @private internal helper of `resolveAgentMessageTouchedProjectNames`
115
+ */
116
+ function serializeToolInput(toolInput: Record<string, unknown>): string {
117
+ try {
118
+ return JSON.stringify(toolInput);
119
+ } catch {
120
+ return '';
121
+ }
122
+ }
123
+
124
+ /**
125
+ * Extracts every project directory name mentioned right after the agent `projects/` folder.
126
+ *
127
+ * @param toolInvocationText - One tool payload, command, or changed path.
128
+ * @returns Candidate project directory names.
129
+ * @private internal helper of `resolveAgentMessageTouchedProjectNames`
130
+ */
131
+ function resolveCandidateProjectNames(toolInvocationText: string): ReadonlyArray<string> {
132
+ const candidateProjectNames: Array<string> = [];
133
+ const projectPathRegex = new RegExp(TOUCHED_PROJECT_PATH_REGEX.source, TOUCHED_PROJECT_PATH_REGEX.flags);
134
+ let projectPathMatch = projectPathRegex.exec(toolInvocationText);
135
+
136
+ while (projectPathMatch !== null) {
137
+ const candidateProjectName = projectPathMatch[1];
138
+
139
+ if (candidateProjectName) {
140
+ candidateProjectNames.push(candidateProjectName);
141
+ }
142
+
143
+ projectPathMatch = projectPathRegex.exec(toolInvocationText);
144
+ }
145
+
146
+ return candidateProjectNames;
147
+ }
@@ -6,6 +6,7 @@ import type { ResolvedAvatarRenderDefinition } from '../../avatars/renderAvatarV
6
6
  import { resolveAvatarRenderDefinition } from '../../avatars/renderAvatarVisual';
7
7
  import type { CreateCanvasForAsciiArt } from '../../avatars/renderAvatarVisualAsciiArt';
8
8
  import { renderAvatarVisualAsciiArt } from '../../avatars/renderAvatarVisualAsciiArt';
9
+ import { renderAvatarVisualTerminalTextLines } from '../../avatars/renderAvatarVisualTerminalText';
9
10
  import type { AvatarDefinition } from '../../avatars/types/AvatarDefinition';
10
11
  import type { AvatarVisualId } from '../../avatars/types/AvatarVisualDefinition';
11
12
  import { resolveAvatarVisualId } from '../../avatars/visuals/avatarVisualRegistry';
@@ -127,9 +128,12 @@ export type CreateTerminalAgentAvatarVisualOptions = {
127
128
  readonly colorDepth?: AsciiArtColorDepth;
128
129
 
129
130
  /**
130
- * Platform-specific canvas factory used to rasterize the visual.
131
+ * Platform-specific canvas factory used to rasterize pixel-based visuals.
132
+ *
133
+ * Character-based visuals such as `AsciiOctopus` paint the terminal grid directly, so they
134
+ * render without any canvas; a pixel-based visual renders an empty frame when it is missing.
131
135
  */
132
- readonly createCanvas: CreateCanvasForAsciiArt;
136
+ readonly createCanvas?: CreateCanvasForAsciiArt;
133
137
  };
134
138
 
135
139
  /**
@@ -251,15 +255,39 @@ function resolveTerminalAgentAvatarVisualIdFromAgentBasicInformation(
251
255
  /**
252
256
  * Renders one terminal avatar frame through the shared avatar-to-ASCII pipeline.
253
257
  *
258
+ * Visuals which are made of characters themselves, for example `AsciiOctopus`, paint the terminal
259
+ * character grid directly, because rasterizing them into half-block ASCII art averages every glyph
260
+ * away and makes them indistinguishable from the other blob-shaped visuals.
261
+ *
254
262
  * @private shared helper for terminal avatar rendering
255
263
  */
256
264
  function renderTerminalAgentAvatarVisualFrame(
257
265
  options: TerminalAgentAvatarVisualRenderInputs & {
258
266
  readonly animationTimeMs: number;
259
267
  readonly colorDepth?: AsciiArtColorDepth;
260
- readonly createCanvas: CreateCanvasForAsciiArt;
268
+ readonly createCanvas?: CreateCanvasForAsciiArt;
261
269
  },
262
270
  ): ReadonlyArray<string> {
271
+ const terminalTextLines = renderAvatarVisualTerminalTextLines({
272
+ avatarDefinition: options.avatarDefinition,
273
+ visualId: options.avatarVisualId,
274
+ surface: 'transparent',
275
+ columns: TERMINAL_AGENT_AVATAR_VISUAL_COLUMNS,
276
+ rows: TERMINAL_AGENT_AVATAR_VISUAL_ROWS,
277
+ colorDepth: options.colorDepth,
278
+ timeMs: options.animationTimeMs,
279
+ resolvedAvatarRenderDefinition: options.resolvedAvatarRenderDefinition,
280
+ });
281
+
282
+ if (terminalTextLines !== null) {
283
+ return terminalTextLines;
284
+ }
285
+
286
+ if (options.createCanvas === undefined) {
287
+ // Note: A pixel-based visual cannot be rasterized without a canvas, so the caller renders no avatar
288
+ return [];
289
+ }
290
+
263
291
  return renderAvatarVisualAsciiArt({
264
292
  avatarDefinition: options.avatarDefinition,
265
293
  visualId: options.avatarVisualId,
@@ -1,5 +1,7 @@
1
1
  import { spaceTrim } from 'spacetrim';
2
2
  import { UnexpectedError } from '../../errors/UnexpectedError';
3
+ import type { AnsiRgbColor } from './createAnsiColorCode';
4
+ import { ANSI_RESET, createAnsiBackgroundColorCode, createAnsiForegroundColorCode } from './createAnsiColorCode';
3
5
 
4
6
  /**
5
7
  * Color depth of the ANSI escape codes emitted by the ASCII-art conversion.
@@ -75,11 +77,11 @@ export type ConvertImageDataToAsciiArtOptions = {
75
77
  };
76
78
 
77
79
  /**
78
- * Default alpha channel value below which a half-cell is rendered as terminal background.
80
+ * Default alpha channel value below which a cell is rendered as terminal background.
79
81
  *
80
82
  * @private within the repository
81
83
  */
82
- const DEFAULT_ALPHA_THRESHOLD = 32;
84
+ export const DEFAULT_ALPHA_THRESHOLD = 32;
83
85
 
84
86
  /**
85
87
  * Number of channels per pixel in an RGBA buffer.
@@ -102,57 +104,12 @@ const UPPER_HALF_BLOCK = '▀'; // <- ▀
102
104
  */
103
105
  const LOWER_HALF_BLOCK = '▄'; // <- ▄
104
106
 
105
- /**
106
- * ANSI escape sequence that resets all colors and attributes.
107
- *
108
- * @private within the repository
109
- */
110
- const ANSI_RESET = '\u001b[0m';
111
-
112
- /**
113
- * Maximum spread between RGB channels for a color to be treated as (nearly) achromatic gray.
114
- *
115
- * @private within the repository
116
- */
117
- const ANSI_256_ACHROMATIC_CHANNEL_SPREAD = 12;
118
-
119
- /**
120
- * Gray level above which an achromatic color maps to the pure white color-cube entry.
121
- *
122
- * @private within the repository
123
- */
124
- const ANSI_256_NEAR_WHITE_GRAY_LEVEL = 246;
125
-
126
- /**
127
- * Index of pure white inside the 6×6×6 ANSI color cube.
128
- *
129
- * @private within the repository
130
- */
131
- const ANSI_256_WHITE_INDEX = 231;
132
-
133
- /**
134
- * Brightness of the lightest entry of the ANSI 256 grayscale ramp.
135
- *
136
- * @private within the repository
137
- */
138
- const ANSI_256_GRAYSCALE_RAMP_MAX_LEVEL = 238;
139
-
140
- /**
141
- * Number of grayscale ramp steps above its first entry (ANSI indexes 232-255).
142
- *
143
- * @private within the repository
144
- */
145
- const ANSI_256_GRAYSCALE_RAMP_INDEX_SPAN = 23;
146
-
147
107
  /**
148
108
  * Area-averaged color of one half of a character cell.
149
109
  *
150
110
  * @private helper of `convertImageDataToAsciiArt`
151
111
  */
152
- type HalfCellColor = {
153
- readonly red: number;
154
- readonly green: number;
155
- readonly blue: number;
112
+ type HalfCellColor = AnsiRgbColor & {
156
113
  readonly isOpaque: boolean;
157
114
  };
158
115
 
@@ -231,15 +188,15 @@ export function convertImageDataToAsciiArt(options: ConvertImageDataToAsciiArtOp
231
188
 
232
189
  if (topHalfColor.isOpaque && bottomHalfColor.isOpaque) {
233
190
  character = UPPER_HALF_BLOCK;
234
- nextForegroundCode = createForegroundColorCode(topHalfColor, colorDepth);
235
- nextBackgroundCode = createBackgroundColorCode(bottomHalfColor, colorDepth);
191
+ nextForegroundCode = createAnsiForegroundColorCode(topHalfColor, colorDepth);
192
+ nextBackgroundCode = createAnsiBackgroundColorCode(bottomHalfColor, colorDepth);
236
193
  } else if (topHalfColor.isOpaque) {
237
194
  character = UPPER_HALF_BLOCK;
238
- nextForegroundCode = createForegroundColorCode(topHalfColor, colorDepth);
195
+ nextForegroundCode = createAnsiForegroundColorCode(topHalfColor, colorDepth);
239
196
  nextBackgroundCode = undefined;
240
197
  } else if (bottomHalfColor.isOpaque) {
241
198
  character = LOWER_HALF_BLOCK;
242
- nextForegroundCode = createForegroundColorCode(bottomHalfColor, colorDepth);
199
+ nextForegroundCode = createAnsiForegroundColorCode(bottomHalfColor, colorDepth);
243
200
  nextBackgroundCode = undefined;
244
201
  } else {
245
202
  character = ' ';
@@ -337,60 +294,3 @@ function computeHalfCellColor(
337
294
  isOpaque: true,
338
295
  };
339
296
  }
340
-
341
- /**
342
- * Creates the ANSI escape code that sets the foreground color of following characters.
343
- *
344
- * @private helper of `convertImageDataToAsciiArt`
345
- */
346
- function createForegroundColorCode(color: HalfCellColor, colorDepth: AsciiArtColorDepth): string {
347
- if (colorDepth === 'TRUE_COLOR') {
348
- return `\u001b[38;2;${color.red};${color.green};${color.blue}m`;
349
- }
350
-
351
- return `\u001b[38;5;${mapColorToAnsi256(color)}m`;
352
- }
353
-
354
- /**
355
- * Creates the ANSI escape code that sets the background color of following characters.
356
- *
357
- * @private helper of `convertImageDataToAsciiArt`
358
- */
359
- function createBackgroundColorCode(color: HalfCellColor, colorDepth: AsciiArtColorDepth): string {
360
- if (colorDepth === 'TRUE_COLOR') {
361
- return `\u001b[48;2;${color.red};${color.green};${color.blue}m`;
362
- }
363
-
364
- return `\u001b[48;5;${mapColorToAnsi256(color)}m`;
365
- }
366
-
367
- /**
368
- * Maps a 24-bit color onto the closest entry of the 256-color ANSI palette.
369
- *
370
- * Uses the 6×6×6 color cube (entries 16-231) and the grayscale ramp (entries 232-255).
371
- *
372
- * @private helper of `convertImageDataToAsciiArt`
373
- */
374
- function mapColorToAnsi256(color: HalfCellColor): number {
375
- const { red, green, blue } = color;
376
-
377
- // Note: Prefer the finer grayscale ramp when the color is (nearly) achromatic
378
- const maxChannel = Math.max(red, green, blue);
379
- const minChannel = Math.min(red, green, blue);
380
- if (maxChannel - minChannel < ANSI_256_ACHROMATIC_CHANNEL_SPREAD) {
381
- const gray = Math.round((red + green + blue) / 3);
382
- if (gray < 4) {
383
- return 16; // <- Note: Pure black lives in the color cube
384
- }
385
- if (gray > ANSI_256_NEAR_WHITE_GRAY_LEVEL) {
386
- return ANSI_256_WHITE_INDEX; // <- Note: Pure white lives in the color cube
387
- }
388
- return 232 + Math.round(((gray - 8) / ANSI_256_GRAYSCALE_RAMP_MAX_LEVEL) * ANSI_256_GRAYSCALE_RAMP_INDEX_SPAN);
389
- }
390
-
391
- const redIndex = Math.round((red / 255) * 5);
392
- const greenIndex = Math.round((green / 255) * 5);
393
- const blueIndex = Math.round((blue / 255) * 5);
394
-
395
- return 16 + 36 * redIndex + 6 * greenIndex + blueIndex;
396
- }
@@ -0,0 +1,132 @@
1
+ import type { AsciiArtColorDepth } from './convertImageDataToAsciiArt';
2
+
3
+ // Note: [💞] Ignore a discrepancy between file name and entity name
4
+
5
+ /**
6
+ * ANSI escape sequence that resets all colors and attributes.
7
+ *
8
+ * @private within the repository
9
+ */
10
+ export const ANSI_RESET = '\u001b[0m';
11
+
12
+ /**
13
+ * Maximum spread between RGB channels for a color to be treated as (nearly) achromatic gray.
14
+ *
15
+ * @private within the repository
16
+ */
17
+ const ANSI_256_ACHROMATIC_CHANNEL_SPREAD = 12;
18
+
19
+ /**
20
+ * Gray level above which an achromatic color maps to the pure white color-cube entry.
21
+ *
22
+ * @private within the repository
23
+ */
24
+ const ANSI_256_NEAR_WHITE_GRAY_LEVEL = 246;
25
+
26
+ /**
27
+ * Index of pure white inside the 6×6×6 ANSI color cube.
28
+ *
29
+ * @private within the repository
30
+ */
31
+ const ANSI_256_WHITE_INDEX = 231;
32
+
33
+ /**
34
+ * Brightness of the lightest entry of the ANSI 256 grayscale ramp.
35
+ *
36
+ * @private within the repository
37
+ */
38
+ const ANSI_256_GRAYSCALE_RAMP_MAX_LEVEL = 238;
39
+
40
+ /**
41
+ * Number of grayscale ramp steps above its first entry (ANSI indexes 232-255).
42
+ *
43
+ * @private within the repository
44
+ */
45
+ const ANSI_256_GRAYSCALE_RAMP_INDEX_SPAN = 23;
46
+
47
+ /**
48
+ * One opaque 24-bit color which should be written into an ANSI escape sequence.
49
+ *
50
+ * @private within the repository
51
+ */
52
+ export type AnsiRgbColor = {
53
+ /**
54
+ * Red channel in the range `[0, 255]`.
55
+ */
56
+ readonly red: number;
57
+
58
+ /**
59
+ * Green channel in the range `[0, 255]`.
60
+ */
61
+ readonly green: number;
62
+
63
+ /**
64
+ * Blue channel in the range `[0, 255]`.
65
+ */
66
+ readonly blue: number;
67
+ };
68
+
69
+ /**
70
+ * Creates the ANSI escape code that sets the foreground color of following characters.
71
+ *
72
+ * @param color Color painted onto the characters.
73
+ * @param colorDepth Color depth supported by the target terminal.
74
+ * @returns ANSI escape sequence.
75
+ *
76
+ * @private within the repository
77
+ */
78
+ export function createAnsiForegroundColorCode(color: AnsiRgbColor, colorDepth: AsciiArtColorDepth): string {
79
+ if (colorDepth === 'TRUE_COLOR') {
80
+ return `\u001b[38;2;${color.red};${color.green};${color.blue}m`;
81
+ }
82
+
83
+ return `\u001b[38;5;${mapColorToAnsi256(color)}m`;
84
+ }
85
+
86
+ /**
87
+ * Creates the ANSI escape code that sets the background color of following characters.
88
+ *
89
+ * @param color Color painted behind the characters.
90
+ * @param colorDepth Color depth supported by the target terminal.
91
+ * @returns ANSI escape sequence.
92
+ *
93
+ * @private within the repository
94
+ */
95
+ export function createAnsiBackgroundColorCode(color: AnsiRgbColor, colorDepth: AsciiArtColorDepth): string {
96
+ if (colorDepth === 'TRUE_COLOR') {
97
+ return `\u001b[48;2;${color.red};${color.green};${color.blue}m`;
98
+ }
99
+
100
+ return `\u001b[48;5;${mapColorToAnsi256(color)}m`;
101
+ }
102
+
103
+ /**
104
+ * Maps a 24-bit color onto the closest entry of the 256-color ANSI palette.
105
+ *
106
+ * Uses the 6×6×6 color cube (entries 16-231) and the grayscale ramp (entries 232-255).
107
+ *
108
+ * @private helper of `createAnsiForegroundColorCode` and `createAnsiBackgroundColorCode`
109
+ */
110
+ function mapColorToAnsi256(color: AnsiRgbColor): number {
111
+ const { red, green, blue } = color;
112
+
113
+ // Note: Prefer the finer grayscale ramp when the color is (nearly) achromatic
114
+ const maxChannel = Math.max(red, green, blue);
115
+ const minChannel = Math.min(red, green, blue);
116
+ if (maxChannel - minChannel < ANSI_256_ACHROMATIC_CHANNEL_SPREAD) {
117
+ const gray = Math.round((red + green + blue) / 3);
118
+ if (gray < 4) {
119
+ return 16; // <- Note: Pure black lives in the color cube
120
+ }
121
+ if (gray > ANSI_256_NEAR_WHITE_GRAY_LEVEL) {
122
+ return ANSI_256_WHITE_INDEX; // <- Note: Pure white lives in the color cube
123
+ }
124
+ return 232 + Math.round(((gray - 8) / ANSI_256_GRAYSCALE_RAMP_MAX_LEVEL) * ANSI_256_GRAYSCALE_RAMP_INDEX_SPAN);
125
+ }
126
+
127
+ const redIndex = Math.round((red / 255) * 5);
128
+ const greenIndex = Math.round((green / 255) * 5);
129
+ const blueIndex = Math.round((blue / 255) * 5);
130
+
131
+ return 16 + 36 * redIndex + 6 * greenIndex + blueIndex;
132
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Creates a loader which imports one module on the first call and reuses the very same module afterwards
3
+ *
4
+ * Note: [🐌] Heavy third-party dependencies are imported lazily to keep the startup of the Promptbook CLI fast.
5
+ * A statically imported dependency is loaded every single time the bundle is loaded, even when the running
6
+ * command never touches it. A lazily imported dependency is loaded only when the feature is really used.
7
+ *
8
+ * @example
9
+ * const loadJsdomModule = createLazyModuleLoader(() => import('jsdom'));
10
+ * const { JSDOM } = await loadJsdomModule();
11
+ *
12
+ * @private internal utility of Promptbook
13
+ */
14
+ export function createLazyModuleLoader<TModule>(importModule: () => Promise<TModule>): () => Promise<TModule> {
15
+ let importedModulePromise: Promise<TModule> | null = null;
16
+
17
+ return function loadModule(): Promise<TModule> {
18
+ if (importedModulePromise === null) {
19
+ importedModulePromise = importModule();
20
+ }
21
+
22
+ return importedModulePromise;
23
+ };
24
+ }
25
+
26
+ // Note: [🐌] Do not convert the lazy `import(...)` calls back to static `import` statements, it would bring back the
27
+ // slow startup of the `ptbk` CLI utility
@@ -1,14 +1,35 @@
1
1
  import type { TODO_any } from '../organization/TODO_any';
2
2
 
3
3
  /**
4
- * Handles debounce.
4
+ * Creates a debounced function that runs after calls have been quiet for the given delay.
5
5
  *
6
6
  * @public exported from `@promptbook/utils`
7
7
  */
8
- export function debounce<T extends (...args: TODO_any[]) => void>(fn: T, delay: number) {
8
+ export function debounce<T extends (...args: TODO_any[]) => void>(
9
+ fn: T,
10
+ delay: number,
11
+ ): ((...args: Parameters<T>) => void) & { cancel: () => void } {
9
12
  let timeout: ReturnType<typeof setTimeout> | null = null;
10
- return (...args: Parameters<T>) => {
11
- if (timeout) clearTimeout(timeout);
12
- timeout = setTimeout(() => fn(...args), delay);
13
+
14
+ const cancel = () => {
15
+ if (timeout === null) {
16
+ return;
17
+ }
18
+
19
+ clearTimeout(timeout);
20
+ timeout = null;
13
21
  };
22
+
23
+ const debounced = (...args: Parameters<T>) => {
24
+ cancel();
25
+
26
+ timeout = setTimeout(() => {
27
+ timeout = null;
28
+ fn(...args);
29
+ }, delay);
30
+ };
31
+
32
+ debounced.cancel = cancel;
33
+
34
+ return debounced;
14
35
  }
@@ -73,7 +73,7 @@ export function $generateBookBoilerplate(options?: GenerateBookBoilerplateOption
73
73
  ${agentName}
74
74
 
75
75
 
76
- PERSONA ${block(personaDescription!)}
76
+ GOAL ${block(personaDescription!)}
77
77
  ${block(initialRules.map((rule) => `RULE ${rule}`).join('\n'))}
78
78
  CLOSED
79
79
  `,
package/src/version.ts CHANGED
@@ -16,11 +16,11 @@ export const BOOK_LANGUAGE_VERSION: string_semantic_version = '2.0.0';
16
16
  * @generated
17
17
  * @see https://github.com/webgptorg/promptbook
18
18
  */
19
- export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.114.0-2';
19
+ export const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version = '0.114.0-21';
20
20
 
21
21
  /**
22
22
  * Represents the version string of the Promptbook engine.
23
- * It follows semantic versioning (e.g., `0.113.1-0`).
23
+ * It follows semantic versioning (e.g., `0.114.0-20`).
24
24
  *
25
25
  * @generated
26
26
  */
package/src/versions.txt CHANGED
@@ -1180,3 +1180,20 @@
1180
1180
  0.113.0
1181
1181
  0.113.1-0
1182
1182
  0.114.0-2
1183
+ 0.114.0-3
1184
+ 0.114.0-4
1185
+ 0.114.0-5
1186
+ 0.114.0-6
1187
+ 0.114.0-8
1188
+ 0.114.0-9
1189
+ 0.114.0-10
1190
+ 0.114.0-12
1191
+ 0.114.0-13
1192
+ 0.114.0-14
1193
+ 0.114.0-15
1194
+ 0.114.0-16
1195
+ 0.114.0-17
1196
+ 0.114.0-18
1197
+ 0.114.0-19
1198
+ 0.114.0-20
1199
+ 0.114.0-21