@cat-factory/worker 0.6.0

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 (586) hide show
  1. package/LICENSE +21 -0
  2. package/dist/app.d.ts +22 -0
  3. package/dist/app.d.ts.map +1 -0
  4. package/dist/app.js +49 -0
  5. package/dist/app.js.map +1 -0
  6. package/dist/index.d.ts +17 -0
  7. package/dist/index.d.ts.map +1 -0
  8. package/dist/index.js +234 -0
  9. package/dist/index.js.map +1 -0
  10. package/dist/infrastructure/ai/CloudflareModelProvider.d.ts +23 -0
  11. package/dist/infrastructure/ai/CloudflareModelProvider.d.ts.map +1 -0
  12. package/dist/infrastructure/ai/CloudflareModelProvider.js +62 -0
  13. package/dist/infrastructure/ai/CloudflareModelProvider.js.map +1 -0
  14. package/dist/infrastructure/ai/CompositeAgentExecutor.d.ts +2 -0
  15. package/dist/infrastructure/ai/CompositeAgentExecutor.d.ts.map +1 -0
  16. package/dist/infrastructure/ai/CompositeAgentExecutor.js +5 -0
  17. package/dist/infrastructure/ai/CompositeAgentExecutor.js.map +1 -0
  18. package/dist/infrastructure/ai/ContainerAgentExecutor.d.ts +2 -0
  19. package/dist/infrastructure/ai/ContainerAgentExecutor.d.ts.map +1 -0
  20. package/dist/infrastructure/ai/ContainerAgentExecutor.js +5 -0
  21. package/dist/infrastructure/ai/ContainerAgentExecutor.js.map +1 -0
  22. package/dist/infrastructure/ai/ContainerRepoBootstrapper.d.ts +2 -0
  23. package/dist/infrastructure/ai/ContainerRepoBootstrapper.d.ts.map +1 -0
  24. package/dist/infrastructure/ai/ContainerRepoBootstrapper.js +5 -0
  25. package/dist/infrastructure/ai/ContainerRepoBootstrapper.js.map +1 -0
  26. package/dist/infrastructure/ai/ContainerRepoScanner.d.ts +39 -0
  27. package/dist/infrastructure/ai/ContainerRepoScanner.d.ts.map +1 -0
  28. package/dist/infrastructure/ai/ContainerRepoScanner.js +115 -0
  29. package/dist/infrastructure/ai/ContainerRepoScanner.js.map +1 -0
  30. package/dist/infrastructure/ai/LlmFragmentSelector.d.ts +2 -0
  31. package/dist/infrastructure/ai/LlmFragmentSelector.d.ts.map +1 -0
  32. package/dist/infrastructure/ai/LlmFragmentSelector.js +4 -0
  33. package/dist/infrastructure/ai/LlmFragmentSelector.js.map +1 -0
  34. package/dist/infrastructure/ai/RunnerJobClient.d.ts +2 -0
  35. package/dist/infrastructure/ai/RunnerJobClient.d.ts.map +1 -0
  36. package/dist/infrastructure/ai/RunnerJobClient.js +5 -0
  37. package/dist/infrastructure/ai/RunnerJobClient.js.map +1 -0
  38. package/dist/infrastructure/ai/WorkersAiLlmUpstream.d.ts +28 -0
  39. package/dist/infrastructure/ai/WorkersAiLlmUpstream.d.ts.map +1 -0
  40. package/dist/infrastructure/ai/WorkersAiLlmUpstream.js +486 -0
  41. package/dist/infrastructure/ai/WorkersAiLlmUpstream.js.map +1 -0
  42. package/dist/infrastructure/ai/providerEndpoints.d.ts +17 -0
  43. package/dist/infrastructure/ai/providerEndpoints.d.ts.map +1 -0
  44. package/dist/infrastructure/ai/providerEndpoints.js +42 -0
  45. package/dist/infrastructure/ai/providerEndpoints.js.map +1 -0
  46. package/dist/infrastructure/ai/registries.d.ts +11 -0
  47. package/dist/infrastructure/ai/registries.d.ts.map +1 -0
  48. package/dist/infrastructure/ai/registries.js +14 -0
  49. package/dist/infrastructure/ai/registries.js.map +1 -0
  50. package/dist/infrastructure/auth/GitHubOAuth.d.ts +2 -0
  51. package/dist/infrastructure/auth/GitHubOAuth.d.ts.map +1 -0
  52. package/dist/infrastructure/auth/GitHubOAuth.js +3 -0
  53. package/dist/infrastructure/auth/GitHubOAuth.js.map +1 -0
  54. package/dist/infrastructure/auth/middleware.d.ts +2 -0
  55. package/dist/infrastructure/auth/middleware.d.ts.map +1 -0
  56. package/dist/infrastructure/auth/middleware.js +3 -0
  57. package/dist/infrastructure/auth/middleware.js.map +1 -0
  58. package/dist/infrastructure/auth/signing.d.ts +3 -0
  59. package/dist/infrastructure/auth/signing.d.ts.map +1 -0
  60. package/dist/infrastructure/auth/signing.js +3 -0
  61. package/dist/infrastructure/auth/signing.js.map +1 -0
  62. package/dist/infrastructure/config/agents.d.ts +6 -0
  63. package/dist/infrastructure/config/agents.d.ts.map +1 -0
  64. package/dist/infrastructure/config/agents.js +100 -0
  65. package/dist/infrastructure/config/agents.js.map +1 -0
  66. package/dist/infrastructure/config/auth.d.ts +13 -0
  67. package/dist/infrastructure/config/auth.d.ts.map +1 -0
  68. package/dist/infrastructure/config/auth.js +80 -0
  69. package/dist/infrastructure/config/auth.js.map +1 -0
  70. package/dist/infrastructure/config/cors.d.ts +2 -0
  71. package/dist/infrastructure/config/cors.d.ts.map +1 -0
  72. package/dist/infrastructure/config/cors.js +3 -0
  73. package/dist/infrastructure/config/cors.js.map +1 -0
  74. package/dist/infrastructure/config/datadog.d.ts +6 -0
  75. package/dist/infrastructure/config/datadog.d.ts.map +1 -0
  76. package/dist/infrastructure/config/datadog.js +22 -0
  77. package/dist/infrastructure/config/datadog.js.map +1 -0
  78. package/dist/infrastructure/config/documents.d.ts +5 -0
  79. package/dist/infrastructure/config/documents.d.ts.map +1 -0
  80. package/dist/infrastructure/config/documents.js +36 -0
  81. package/dist/infrastructure/config/documents.js.map +1 -0
  82. package/dist/infrastructure/config/email.d.ts +5 -0
  83. package/dist/infrastructure/config/email.d.ts.map +1 -0
  84. package/dist/infrastructure/config/email.js +12 -0
  85. package/dist/infrastructure/config/email.js.map +1 -0
  86. package/dist/infrastructure/config/environments.d.ts +5 -0
  87. package/dist/infrastructure/config/environments.d.ts.map +1 -0
  88. package/dist/infrastructure/config/environments.js +15 -0
  89. package/dist/infrastructure/config/environments.js.map +1 -0
  90. package/dist/infrastructure/config/execution.d.ts +5 -0
  91. package/dist/infrastructure/config/execution.d.ts.map +1 -0
  92. package/dist/infrastructure/config/execution.js +21 -0
  93. package/dist/infrastructure/config/execution.js.map +1 -0
  94. package/dist/infrastructure/config/fragmentLibrary.d.ts +5 -0
  95. package/dist/infrastructure/config/fragmentLibrary.d.ts.map +1 -0
  96. package/dist/infrastructure/config/fragmentLibrary.js +7 -0
  97. package/dist/infrastructure/config/fragmentLibrary.js.map +1 -0
  98. package/dist/infrastructure/config/github.d.ts +5 -0
  99. package/dist/infrastructure/config/github.d.ts.map +1 -0
  100. package/dist/infrastructure/config/github.js +25 -0
  101. package/dist/infrastructure/config/github.js.map +1 -0
  102. package/dist/infrastructure/config/index.d.ts +20 -0
  103. package/dist/infrastructure/config/index.d.ts.map +1 -0
  104. package/dist/infrastructure/config/index.js +52 -0
  105. package/dist/infrastructure/config/index.js.map +1 -0
  106. package/dist/infrastructure/config/langfuse.d.ts +10 -0
  107. package/dist/infrastructure/config/langfuse.d.ts.map +1 -0
  108. package/dist/infrastructure/config/langfuse.js +17 -0
  109. package/dist/infrastructure/config/langfuse.js.map +1 -0
  110. package/dist/infrastructure/config/observability.d.ts +10 -0
  111. package/dist/infrastructure/config/observability.d.ts.map +1 -0
  112. package/dist/infrastructure/config/observability.js +11 -0
  113. package/dist/infrastructure/config/observability.js.map +1 -0
  114. package/dist/infrastructure/config/retention.d.ts +5 -0
  115. package/dist/infrastructure/config/retention.d.ts.map +1 -0
  116. package/dist/infrastructure/config/retention.js +15 -0
  117. package/dist/infrastructure/config/retention.js.map +1 -0
  118. package/dist/infrastructure/config/runners.d.ts +5 -0
  119. package/dist/infrastructure/config/runners.d.ts.map +1 -0
  120. package/dist/infrastructure/config/runners.js +13 -0
  121. package/dist/infrastructure/config/runners.js.map +1 -0
  122. package/dist/infrastructure/config/slack.d.ts +5 -0
  123. package/dist/infrastructure/config/slack.d.ts.map +1 -0
  124. package/dist/infrastructure/config/slack.js +17 -0
  125. package/dist/infrastructure/config/slack.js.map +1 -0
  126. package/dist/infrastructure/config/spending.d.ts +4 -0
  127. package/dist/infrastructure/config/spending.d.ts.map +1 -0
  128. package/dist/infrastructure/config/spending.js +36 -0
  129. package/dist/infrastructure/config/spending.js.map +1 -0
  130. package/dist/infrastructure/config/tasks.d.ts +5 -0
  131. package/dist/infrastructure/config/tasks.d.ts.map +1 -0
  132. package/dist/infrastructure/config/tasks.js +31 -0
  133. package/dist/infrastructure/config/tasks.js.map +1 -0
  134. package/dist/infrastructure/config/utils.d.ts +6 -0
  135. package/dist/infrastructure/config/utils.d.ts.map +1 -0
  136. package/dist/infrastructure/config/utils.js +24 -0
  137. package/dist/infrastructure/config/utils.js.map +1 -0
  138. package/dist/infrastructure/container.d.ts +8 -0
  139. package/dist/infrastructure/container.d.ts.map +1 -0
  140. package/dist/infrastructure/container.js +1157 -0
  141. package/dist/infrastructure/container.js.map +1 -0
  142. package/dist/infrastructure/containers/CloudflareContainerTransport.d.ts +22 -0
  143. package/dist/infrastructure/containers/CloudflareContainerTransport.d.ts.map +1 -0
  144. package/dist/infrastructure/containers/CloudflareContainerTransport.js +129 -0
  145. package/dist/infrastructure/containers/CloudflareContainerTransport.js.map +1 -0
  146. package/dist/infrastructure/containers/ContainerInstanceRegistry.d.ts +62 -0
  147. package/dist/infrastructure/containers/ContainerInstanceRegistry.d.ts.map +1 -0
  148. package/dist/infrastructure/containers/ContainerInstanceRegistry.js +74 -0
  149. package/dist/infrastructure/containers/ContainerInstanceRegistry.js.map +1 -0
  150. package/dist/infrastructure/containers/ContainerSessionService.d.ts +2 -0
  151. package/dist/infrastructure/containers/ContainerSessionService.d.ts.map +1 -0
  152. package/dist/infrastructure/containers/ContainerSessionService.js +3 -0
  153. package/dist/infrastructure/containers/ContainerSessionService.js.map +1 -0
  154. package/dist/infrastructure/containers/ExecutionContainer.d.ts +48 -0
  155. package/dist/infrastructure/containers/ExecutionContainer.d.ts.map +1 -0
  156. package/dist/infrastructure/containers/ExecutionContainer.js +88 -0
  157. package/dist/infrastructure/containers/ExecutionContainer.js.map +1 -0
  158. package/dist/infrastructure/documents/ConfluenceProvider.d.ts +29 -0
  159. package/dist/infrastructure/documents/ConfluenceProvider.d.ts.map +1 -0
  160. package/dist/infrastructure/documents/ConfluenceProvider.js +179 -0
  161. package/dist/infrastructure/documents/ConfluenceProvider.js.map +1 -0
  162. package/dist/infrastructure/documents/GitHubDocsProvider.d.ts +42 -0
  163. package/dist/infrastructure/documents/GitHubDocsProvider.d.ts.map +1 -0
  164. package/dist/infrastructure/documents/GitHubDocsProvider.js +85 -0
  165. package/dist/infrastructure/documents/GitHubDocsProvider.js.map +1 -0
  166. package/dist/infrastructure/documents/NotionProvider.d.ts +32 -0
  167. package/dist/infrastructure/documents/NotionProvider.d.ts.map +1 -0
  168. package/dist/infrastructure/documents/NotionProvider.js +220 -0
  169. package/dist/infrastructure/documents/NotionProvider.js.map +1 -0
  170. package/dist/infrastructure/durable-objects/WorkspaceEventsHub.d.ts +20 -0
  171. package/dist/infrastructure/durable-objects/WorkspaceEventsHub.d.ts.map +1 -0
  172. package/dist/infrastructure/durable-objects/WorkspaceEventsHub.js +62 -0
  173. package/dist/infrastructure/durable-objects/WorkspaceEventsHub.js.map +1 -0
  174. package/dist/infrastructure/env.d.ts +370 -0
  175. package/dist/infrastructure/env.d.ts.map +1 -0
  176. package/dist/infrastructure/env.js +2 -0
  177. package/dist/infrastructure/env.js.map +1 -0
  178. package/dist/infrastructure/environments/HttpEnvironmentProvider.d.ts +27 -0
  179. package/dist/infrastructure/environments/HttpEnvironmentProvider.d.ts.map +1 -0
  180. package/dist/infrastructure/environments/HttpEnvironmentProvider.js +314 -0
  181. package/dist/infrastructure/environments/HttpEnvironmentProvider.js.map +1 -0
  182. package/dist/infrastructure/environments/WebCryptoSecretCipher.d.ts +2 -0
  183. package/dist/infrastructure/environments/WebCryptoSecretCipher.d.ts.map +1 -0
  184. package/dist/infrastructure/environments/WebCryptoSecretCipher.js +5 -0
  185. package/dist/infrastructure/environments/WebCryptoSecretCipher.js.map +1 -0
  186. package/dist/infrastructure/environments/sweep.d.ts +5 -0
  187. package/dist/infrastructure/environments/sweep.d.ts.map +1 -0
  188. package/dist/infrastructure/environments/sweep.js +16 -0
  189. package/dist/infrastructure/environments/sweep.js.map +1 -0
  190. package/dist/infrastructure/events/DurableObjectEventPublisher.d.ts +25 -0
  191. package/dist/infrastructure/events/DurableObjectEventPublisher.d.ts.map +1 -0
  192. package/dist/infrastructure/events/DurableObjectEventPublisher.js +64 -0
  193. package/dist/infrastructure/events/DurableObjectEventPublisher.js.map +1 -0
  194. package/dist/infrastructure/events/InAppNotificationChannel.d.ts +19 -0
  195. package/dist/infrastructure/events/InAppNotificationChannel.d.ts.map +1 -0
  196. package/dist/infrastructure/events/InAppNotificationChannel.js +22 -0
  197. package/dist/infrastructure/events/InAppNotificationChannel.js.map +1 -0
  198. package/dist/infrastructure/gateways/DoRealtimeGateway.d.ts +15 -0
  199. package/dist/infrastructure/gateways/DoRealtimeGateway.d.ts.map +1 -0
  200. package/dist/infrastructure/gateways/DoRealtimeGateway.js +20 -0
  201. package/dist/infrastructure/gateways/DoRealtimeGateway.js.map +1 -0
  202. package/dist/infrastructure/gateways/GitHubGateways.d.ts +27 -0
  203. package/dist/infrastructure/gateways/GitHubGateways.d.ts.map +1 -0
  204. package/dist/infrastructure/gateways/GitHubGateways.js +48 -0
  205. package/dist/infrastructure/gateways/GitHubGateways.js.map +1 -0
  206. package/dist/infrastructure/github/FetchGitHubClient.d.ts +2 -0
  207. package/dist/infrastructure/github/FetchGitHubClient.d.ts.map +1 -0
  208. package/dist/infrastructure/github/FetchGitHubClient.js +4 -0
  209. package/dist/infrastructure/github/FetchGitHubClient.js.map +1 -0
  210. package/dist/infrastructure/github/FetchGitHubProvisioningClient.d.ts +2 -0
  211. package/dist/infrastructure/github/FetchGitHubProvisioningClient.d.ts.map +1 -0
  212. package/dist/infrastructure/github/FetchGitHubProvisioningClient.js +5 -0
  213. package/dist/infrastructure/github/FetchGitHubProvisioningClient.js.map +1 -0
  214. package/dist/infrastructure/github/GitHubAppAuth.d.ts +2 -0
  215. package/dist/infrastructure/github/GitHubAppAuth.d.ts.map +1 -0
  216. package/dist/infrastructure/github/GitHubAppAuth.js +5 -0
  217. package/dist/infrastructure/github/GitHubAppAuth.js.map +1 -0
  218. package/dist/infrastructure/github/GitHubAppRegistry.d.ts +2 -0
  219. package/dist/infrastructure/github/GitHubAppRegistry.d.ts.map +1 -0
  220. package/dist/infrastructure/github/GitHubAppRegistry.js +4 -0
  221. package/dist/infrastructure/github/GitHubAppRegistry.js.map +1 -0
  222. package/dist/infrastructure/github/GitHubCiStatusProvider.d.ts +2 -0
  223. package/dist/infrastructure/github/GitHubCiStatusProvider.d.ts.map +1 -0
  224. package/dist/infrastructure/github/GitHubCiStatusProvider.js +4 -0
  225. package/dist/infrastructure/github/GitHubCiStatusProvider.js.map +1 -0
  226. package/dist/infrastructure/github/GitHubMergeabilityProvider.d.ts +2 -0
  227. package/dist/infrastructure/github/GitHubMergeabilityProvider.d.ts.map +1 -0
  228. package/dist/infrastructure/github/GitHubMergeabilityProvider.js +4 -0
  229. package/dist/infrastructure/github/GitHubMergeabilityProvider.js.map +1 -0
  230. package/dist/infrastructure/github/GitHubPullRequestMerger.d.ts +2 -0
  231. package/dist/infrastructure/github/GitHubPullRequestMerger.d.ts.map +1 -0
  232. package/dist/infrastructure/github/GitHubPullRequestMerger.js +4 -0
  233. package/dist/infrastructure/github/GitHubPullRequestMerger.js.map +1 -0
  234. package/dist/infrastructure/github/WebCryptoWebhookVerifier.d.ts +2 -0
  235. package/dist/infrastructure/github/WebCryptoWebhookVerifier.d.ts.map +1 -0
  236. package/dist/infrastructure/github/WebCryptoWebhookVerifier.js +5 -0
  237. package/dist/infrastructure/github/WebCryptoWebhookVerifier.js.map +1 -0
  238. package/dist/infrastructure/github/encoding.d.ts +2 -0
  239. package/dist/infrastructure/github/encoding.d.ts.map +1 -0
  240. package/dist/infrastructure/github/encoding.js +3 -0
  241. package/dist/infrastructure/github/encoding.js.map +1 -0
  242. package/dist/infrastructure/github/state.d.ts +2 -0
  243. package/dist/infrastructure/github/state.d.ts.map +1 -0
  244. package/dist/infrastructure/github/state.js +3 -0
  245. package/dist/infrastructure/github/state.js.map +1 -0
  246. package/dist/infrastructure/github/sync-consumer.d.ts +16 -0
  247. package/dist/infrastructure/github/sync-consumer.d.ts.map +1 -0
  248. package/dist/infrastructure/github/sync-consumer.js +130 -0
  249. package/dist/infrastructure/github/sync-consumer.js.map +1 -0
  250. package/dist/infrastructure/http/errorHandler.d.ts +2 -0
  251. package/dist/infrastructure/http/errorHandler.d.ts.map +1 -0
  252. package/dist/infrastructure/http/errorHandler.js +3 -0
  253. package/dist/infrastructure/http/errorHandler.js.map +1 -0
  254. package/dist/infrastructure/http/params.d.ts +2 -0
  255. package/dist/infrastructure/http/params.d.ts.map +1 -0
  256. package/dist/infrastructure/http/params.js +3 -0
  257. package/dist/infrastructure/http/params.js.map +1 -0
  258. package/dist/infrastructure/http/types.d.ts +12 -0
  259. package/dist/infrastructure/http/types.d.ts.map +1 -0
  260. package/dist/infrastructure/http/types.js +2 -0
  261. package/dist/infrastructure/http/types.js.map +1 -0
  262. package/dist/infrastructure/http/validation.d.ts +2 -0
  263. package/dist/infrastructure/http/validation.d.ts.map +1 -0
  264. package/dist/infrastructure/http/validation.js +3 -0
  265. package/dist/infrastructure/http/validation.js.map +1 -0
  266. package/dist/infrastructure/observability/logger.d.ts +3 -0
  267. package/dist/infrastructure/observability/logger.d.ts.map +1 -0
  268. package/dist/infrastructure/observability/logger.js +4 -0
  269. package/dist/infrastructure/observability/logger.js.map +1 -0
  270. package/dist/infrastructure/repositories/D1AccountInvitationRepository.d.ts +15 -0
  271. package/dist/infrastructure/repositories/D1AccountInvitationRepository.d.ts.map +1 -0
  272. package/dist/infrastructure/repositories/D1AccountInvitationRepository.js +63 -0
  273. package/dist/infrastructure/repositories/D1AccountInvitationRepository.js.map +1 -0
  274. package/dist/infrastructure/repositories/D1AccountRepository.d.ts +15 -0
  275. package/dist/infrastructure/repositories/D1AccountRepository.d.ts.map +1 -0
  276. package/dist/infrastructure/repositories/D1AccountRepository.js +52 -0
  277. package/dist/infrastructure/repositories/D1AccountRepository.js.map +1 -0
  278. package/dist/infrastructure/repositories/D1AgentRunRepository.d.ts +18 -0
  279. package/dist/infrastructure/repositories/D1AgentRunRepository.d.ts.map +1 -0
  280. package/dist/infrastructure/repositories/D1AgentRunRepository.js +34 -0
  281. package/dist/infrastructure/repositories/D1AgentRunRepository.js.map +1 -0
  282. package/dist/infrastructure/repositories/D1BlockRepository.d.ts +23 -0
  283. package/dist/infrastructure/repositories/D1BlockRepository.d.ts.map +1 -0
  284. package/dist/infrastructure/repositories/D1BlockRepository.js +101 -0
  285. package/dist/infrastructure/repositories/D1BlockRepository.js.map +1 -0
  286. package/dist/infrastructure/repositories/D1BootstrapJobRepository.d.ts +16 -0
  287. package/dist/infrastructure/repositories/D1BootstrapJobRepository.d.ts.map +1 -0
  288. package/dist/infrastructure/repositories/D1BootstrapJobRepository.js +209 -0
  289. package/dist/infrastructure/repositories/D1BootstrapJobRepository.js.map +1 -0
  290. package/dist/infrastructure/repositories/D1BranchProjectionRepository.d.ts +12 -0
  291. package/dist/infrastructure/repositories/D1BranchProjectionRepository.d.ts.map +1 -0
  292. package/dist/infrastructure/repositories/D1BranchProjectionRepository.js +29 -0
  293. package/dist/infrastructure/repositories/D1BranchProjectionRepository.js.map +1 -0
  294. package/dist/infrastructure/repositories/D1CheckRunProjectionRepository.d.ts +12 -0
  295. package/dist/infrastructure/repositories/D1CheckRunProjectionRepository.d.ts.map +1 -0
  296. package/dist/infrastructure/repositories/D1CheckRunProjectionRepository.js +29 -0
  297. package/dist/infrastructure/repositories/D1CheckRunProjectionRepository.js.map +1 -0
  298. package/dist/infrastructure/repositories/D1ClarityReviewRepository.d.ts +19 -0
  299. package/dist/infrastructure/repositories/D1ClarityReviewRepository.d.ts.map +1 -0
  300. package/dist/infrastructure/repositories/D1ClarityReviewRepository.js +75 -0
  301. package/dist/infrastructure/repositories/D1ClarityReviewRepository.js.map +1 -0
  302. package/dist/infrastructure/repositories/D1CommitProjectionRepository.d.ts +13 -0
  303. package/dist/infrastructure/repositories/D1CommitProjectionRepository.d.ts.map +1 -0
  304. package/dist/infrastructure/repositories/D1CommitProjectionRepository.js +48 -0
  305. package/dist/infrastructure/repositories/D1CommitProjectionRepository.js.map +1 -0
  306. package/dist/infrastructure/repositories/D1ConsensusSessionRepository.d.ts +19 -0
  307. package/dist/infrastructure/repositories/D1ConsensusSessionRepository.d.ts.map +1 -0
  308. package/dist/infrastructure/repositories/D1ConsensusSessionRepository.js +88 -0
  309. package/dist/infrastructure/repositories/D1ConsensusSessionRepository.js.map +1 -0
  310. package/dist/infrastructure/repositories/D1DatadogConnectionRepository.d.ts +17 -0
  311. package/dist/infrastructure/repositories/D1DatadogConnectionRepository.d.ts.map +1 -0
  312. package/dist/infrastructure/repositories/D1DatadogConnectionRepository.js +47 -0
  313. package/dist/infrastructure/repositories/D1DatadogConnectionRepository.js.map +1 -0
  314. package/dist/infrastructure/repositories/D1DocumentConnectionRepository.d.ts +27 -0
  315. package/dist/infrastructure/repositories/D1DocumentConnectionRepository.d.ts.map +1 -0
  316. package/dist/infrastructure/repositories/D1DocumentConnectionRepository.js +89 -0
  317. package/dist/infrastructure/repositories/D1DocumentConnectionRepository.js.map +1 -0
  318. package/dist/infrastructure/repositories/D1DocumentRepository.d.ts +15 -0
  319. package/dist/infrastructure/repositories/D1DocumentRepository.d.ts.map +1 -0
  320. package/dist/infrastructure/repositories/D1DocumentRepository.js +66 -0
  321. package/dist/infrastructure/repositories/D1DocumentRepository.js.map +1 -0
  322. package/dist/infrastructure/repositories/D1EmailConnectionRepository.d.ts +13 -0
  323. package/dist/infrastructure/repositories/D1EmailConnectionRepository.d.ts.map +1 -0
  324. package/dist/infrastructure/repositories/D1EmailConnectionRepository.js +46 -0
  325. package/dist/infrastructure/repositories/D1EmailConnectionRepository.js.map +1 -0
  326. package/dist/infrastructure/repositories/D1EnvironmentConnectionRepository.d.ts +13 -0
  327. package/dist/infrastructure/repositories/D1EnvironmentConnectionRepository.d.ts.map +1 -0
  328. package/dist/infrastructure/repositories/D1EnvironmentConnectionRepository.js +48 -0
  329. package/dist/infrastructure/repositories/D1EnvironmentConnectionRepository.js.map +1 -0
  330. package/dist/infrastructure/repositories/D1EnvironmentRegistryRepository.d.ts +17 -0
  331. package/dist/infrastructure/repositories/D1EnvironmentRegistryRepository.d.ts.map +1 -0
  332. package/dist/infrastructure/repositories/D1EnvironmentRegistryRepository.js +95 -0
  333. package/dist/infrastructure/repositories/D1EnvironmentRegistryRepository.js.map +1 -0
  334. package/dist/infrastructure/repositories/D1ExecutionRepository.d.ts +28 -0
  335. package/dist/infrastructure/repositories/D1ExecutionRepository.d.ts.map +1 -0
  336. package/dist/infrastructure/repositories/D1ExecutionRepository.js +113 -0
  337. package/dist/infrastructure/repositories/D1ExecutionRepository.js.map +1 -0
  338. package/dist/infrastructure/repositories/D1FragmentSourceRepository.d.ts +15 -0
  339. package/dist/infrastructure/repositories/D1FragmentSourceRepository.d.ts.map +1 -0
  340. package/dist/infrastructure/repositories/D1FragmentSourceRepository.js +66 -0
  341. package/dist/infrastructure/repositories/D1FragmentSourceRepository.js.map +1 -0
  342. package/dist/infrastructure/repositories/D1GitHubInstallationRepository.d.ts +17 -0
  343. package/dist/infrastructure/repositories/D1GitHubInstallationRepository.d.ts.map +1 -0
  344. package/dist/infrastructure/repositories/D1GitHubInstallationRepository.js +79 -0
  345. package/dist/infrastructure/repositories/D1GitHubInstallationRepository.js.map +1 -0
  346. package/dist/infrastructure/repositories/D1IssueProjectionRepository.d.ts +13 -0
  347. package/dist/infrastructure/repositories/D1IssueProjectionRepository.d.ts.map +1 -0
  348. package/dist/infrastructure/repositories/D1IssueProjectionRepository.js +36 -0
  349. package/dist/infrastructure/repositories/D1IssueProjectionRepository.js.map +1 -0
  350. package/dist/infrastructure/repositories/D1LiveContainerRepository.d.ts +17 -0
  351. package/dist/infrastructure/repositories/D1LiveContainerRepository.d.ts.map +1 -0
  352. package/dist/infrastructure/repositories/D1LiveContainerRepository.js +40 -0
  353. package/dist/infrastructure/repositories/D1LiveContainerRepository.js.map +1 -0
  354. package/dist/infrastructure/repositories/D1LlmCallMetricRepository.d.ts +15 -0
  355. package/dist/infrastructure/repositories/D1LlmCallMetricRepository.d.ts.map +1 -0
  356. package/dist/infrastructure/repositories/D1LlmCallMetricRepository.js +123 -0
  357. package/dist/infrastructure/repositories/D1LlmCallMetricRepository.js.map +1 -0
  358. package/dist/infrastructure/repositories/D1LocalModelEndpointRepository.d.ts +15 -0
  359. package/dist/infrastructure/repositories/D1LocalModelEndpointRepository.d.ts.map +1 -0
  360. package/dist/infrastructure/repositories/D1LocalModelEndpointRepository.js +63 -0
  361. package/dist/infrastructure/repositories/D1LocalModelEndpointRepository.js.map +1 -0
  362. package/dist/infrastructure/repositories/D1MembershipRepository.d.ts +15 -0
  363. package/dist/infrastructure/repositories/D1MembershipRepository.d.ts.map +1 -0
  364. package/dist/infrastructure/repositories/D1MembershipRepository.js +58 -0
  365. package/dist/infrastructure/repositories/D1MembershipRepository.js.map +1 -0
  366. package/dist/infrastructure/repositories/D1MergePresetRepository.d.ts +21 -0
  367. package/dist/infrastructure/repositories/D1MergePresetRepository.d.ts.map +1 -0
  368. package/dist/infrastructure/repositories/D1MergePresetRepository.js +88 -0
  369. package/dist/infrastructure/repositories/D1MergePresetRepository.js.map +1 -0
  370. package/dist/infrastructure/repositories/D1ModelDefaultsRepository.d.ts +18 -0
  371. package/dist/infrastructure/repositories/D1ModelDefaultsRepository.d.ts.map +1 -0
  372. package/dist/infrastructure/repositories/D1ModelDefaultsRepository.js +47 -0
  373. package/dist/infrastructure/repositories/D1ModelDefaultsRepository.js.map +1 -0
  374. package/dist/infrastructure/repositories/D1NotificationRepository.d.ts +20 -0
  375. package/dist/infrastructure/repositories/D1NotificationRepository.d.ts.map +1 -0
  376. package/dist/infrastructure/repositories/D1NotificationRepository.js +81 -0
  377. package/dist/infrastructure/repositories/D1NotificationRepository.js.map +1 -0
  378. package/dist/infrastructure/repositories/D1PersonalSubscriptionRepository.d.ts +28 -0
  379. package/dist/infrastructure/repositories/D1PersonalSubscriptionRepository.d.ts.map +1 -0
  380. package/dist/infrastructure/repositories/D1PersonalSubscriptionRepository.js +142 -0
  381. package/dist/infrastructure/repositories/D1PersonalSubscriptionRepository.js.map +1 -0
  382. package/dist/infrastructure/repositories/D1PipelineRepository.d.ts +15 -0
  383. package/dist/infrastructure/repositories/D1PipelineRepository.d.ts.map +1 -0
  384. package/dist/infrastructure/repositories/D1PipelineRepository.js +46 -0
  385. package/dist/infrastructure/repositories/D1PipelineRepository.js.map +1 -0
  386. package/dist/infrastructure/repositories/D1PipelineScheduleRepository.d.ts +26 -0
  387. package/dist/infrastructure/repositories/D1PipelineScheduleRepository.d.ts.map +1 -0
  388. package/dist/infrastructure/repositories/D1PipelineScheduleRepository.js +192 -0
  389. package/dist/infrastructure/repositories/D1PipelineScheduleRepository.js.map +1 -0
  390. package/dist/infrastructure/repositories/D1PromptFragmentRepository.d.ts +15 -0
  391. package/dist/infrastructure/repositories/D1PromptFragmentRepository.d.ts.map +1 -0
  392. package/dist/infrastructure/repositories/D1PromptFragmentRepository.js +90 -0
  393. package/dist/infrastructure/repositories/D1PromptFragmentRepository.js.map +1 -0
  394. package/dist/infrastructure/repositories/D1ProviderApiKeyRepository.d.ts +21 -0
  395. package/dist/infrastructure/repositories/D1ProviderApiKeyRepository.d.ts.map +1 -0
  396. package/dist/infrastructure/repositories/D1ProviderApiKeyRepository.js +108 -0
  397. package/dist/infrastructure/repositories/D1ProviderApiKeyRepository.js.map +1 -0
  398. package/dist/infrastructure/repositories/D1ProviderSubscriptionTokenRepository.d.ts +19 -0
  399. package/dist/infrastructure/repositories/D1ProviderSubscriptionTokenRepository.d.ts.map +1 -0
  400. package/dist/infrastructure/repositories/D1ProviderSubscriptionTokenRepository.js +78 -0
  401. package/dist/infrastructure/repositories/D1ProviderSubscriptionTokenRepository.js.map +1 -0
  402. package/dist/infrastructure/repositories/D1PullRequestProjectionRepository.d.ts +13 -0
  403. package/dist/infrastructure/repositories/D1PullRequestProjectionRepository.d.ts.map +1 -0
  404. package/dist/infrastructure/repositories/D1PullRequestProjectionRepository.js +32 -0
  405. package/dist/infrastructure/repositories/D1PullRequestProjectionRepository.js.map +1 -0
  406. package/dist/infrastructure/repositories/D1RateLimitRepository.d.ts +18 -0
  407. package/dist/infrastructure/repositories/D1RateLimitRepository.d.ts.map +1 -0
  408. package/dist/infrastructure/repositories/D1RateLimitRepository.js +30 -0
  409. package/dist/infrastructure/repositories/D1RateLimitRepository.js.map +1 -0
  410. package/dist/infrastructure/repositories/D1ReferenceArchitectureRepository.d.ts +15 -0
  411. package/dist/infrastructure/repositories/D1ReferenceArchitectureRepository.d.ts.map +1 -0
  412. package/dist/infrastructure/repositories/D1ReferenceArchitectureRepository.js +77 -0
  413. package/dist/infrastructure/repositories/D1ReferenceArchitectureRepository.js.map +1 -0
  414. package/dist/infrastructure/repositories/D1ReleaseHealthConfigRepository.d.ts +17 -0
  415. package/dist/infrastructure/repositories/D1ReleaseHealthConfigRepository.d.ts.map +1 -0
  416. package/dist/infrastructure/repositories/D1ReleaseHealthConfigRepository.js +64 -0
  417. package/dist/infrastructure/repositories/D1ReleaseHealthConfigRepository.js.map +1 -0
  418. package/dist/infrastructure/repositories/D1RepoBlueprintRepository.d.ts +20 -0
  419. package/dist/infrastructure/repositories/D1RepoBlueprintRepository.d.ts.map +1 -0
  420. package/dist/infrastructure/repositories/D1RepoBlueprintRepository.js +64 -0
  421. package/dist/infrastructure/repositories/D1RepoBlueprintRepository.js.map +1 -0
  422. package/dist/infrastructure/repositories/D1RepoProjectionRepository.d.ts +20 -0
  423. package/dist/infrastructure/repositories/D1RepoProjectionRepository.d.ts.map +1 -0
  424. package/dist/infrastructure/repositories/D1RepoProjectionRepository.js +121 -0
  425. package/dist/infrastructure/repositories/D1RepoProjectionRepository.js.map +1 -0
  426. package/dist/infrastructure/repositories/D1RequirementReviewRepository.d.ts +20 -0
  427. package/dist/infrastructure/repositories/D1RequirementReviewRepository.d.ts.map +1 -0
  428. package/dist/infrastructure/repositories/D1RequirementReviewRepository.js +76 -0
  429. package/dist/infrastructure/repositories/D1RequirementReviewRepository.js.map +1 -0
  430. package/dist/infrastructure/repositories/D1RunnerPoolConnectionRepository.d.ts +13 -0
  431. package/dist/infrastructure/repositories/D1RunnerPoolConnectionRepository.d.ts.map +1 -0
  432. package/dist/infrastructure/repositories/D1RunnerPoolConnectionRepository.js +48 -0
  433. package/dist/infrastructure/repositories/D1RunnerPoolConnectionRepository.js.map +1 -0
  434. package/dist/infrastructure/repositories/D1ServiceFragmentDefaultsRepository.d.ts +16 -0
  435. package/dist/infrastructure/repositories/D1ServiceFragmentDefaultsRepository.d.ts.map +1 -0
  436. package/dist/infrastructure/repositories/D1ServiceFragmentDefaultsRepository.js +27 -0
  437. package/dist/infrastructure/repositories/D1ServiceFragmentDefaultsRepository.js.map +1 -0
  438. package/dist/infrastructure/repositories/D1ServiceRepository.d.ts +19 -0
  439. package/dist/infrastructure/repositories/D1ServiceRepository.d.ts.map +1 -0
  440. package/dist/infrastructure/repositories/D1ServiceRepository.js +114 -0
  441. package/dist/infrastructure/repositories/D1ServiceRepository.js.map +1 -0
  442. package/dist/infrastructure/repositories/D1SlackRepositories.d.ts +29 -0
  443. package/dist/infrastructure/repositories/D1SlackRepositories.d.ts.map +1 -0
  444. package/dist/infrastructure/repositories/D1SlackRepositories.js +119 -0
  445. package/dist/infrastructure/repositories/D1SlackRepositories.js.map +1 -0
  446. package/dist/infrastructure/repositories/D1TaskConnectionRepository.d.ts +27 -0
  447. package/dist/infrastructure/repositories/D1TaskConnectionRepository.d.ts.map +1 -0
  448. package/dist/infrastructure/repositories/D1TaskConnectionRepository.js +89 -0
  449. package/dist/infrastructure/repositories/D1TaskConnectionRepository.js.map +1 -0
  450. package/dist/infrastructure/repositories/D1TaskRepository.d.ts +15 -0
  451. package/dist/infrastructure/repositories/D1TaskRepository.d.ts.map +1 -0
  452. package/dist/infrastructure/repositories/D1TaskRepository.js +90 -0
  453. package/dist/infrastructure/repositories/D1TaskRepository.js.map +1 -0
  454. package/dist/infrastructure/repositories/D1TokenUsageRepository.d.ts +13 -0
  455. package/dist/infrastructure/repositories/D1TokenUsageRepository.d.ts.map +1 -0
  456. package/dist/infrastructure/repositories/D1TokenUsageRepository.js +41 -0
  457. package/dist/infrastructure/repositories/D1TokenUsageRepository.js.map +1 -0
  458. package/dist/infrastructure/repositories/D1TrackerSettingsRepository.d.ts +12 -0
  459. package/dist/infrastructure/repositories/D1TrackerSettingsRepository.d.ts.map +1 -0
  460. package/dist/infrastructure/repositories/D1TrackerSettingsRepository.js +32 -0
  461. package/dist/infrastructure/repositories/D1TrackerSettingsRepository.js.map +1 -0
  462. package/dist/infrastructure/repositories/D1UserRepository.d.ts +19 -0
  463. package/dist/infrastructure/repositories/D1UserRepository.d.ts.map +1 -0
  464. package/dist/infrastructure/repositories/D1UserRepository.js +108 -0
  465. package/dist/infrastructure/repositories/D1UserRepository.js.map +1 -0
  466. package/dist/infrastructure/repositories/D1WorkspaceMountRepository.d.ts +19 -0
  467. package/dist/infrastructure/repositories/D1WorkspaceMountRepository.d.ts.map +1 -0
  468. package/dist/infrastructure/repositories/D1WorkspaceMountRepository.js +115 -0
  469. package/dist/infrastructure/repositories/D1WorkspaceMountRepository.js.map +1 -0
  470. package/dist/infrastructure/repositories/D1WorkspaceRepository.d.ts +18 -0
  471. package/dist/infrastructure/repositories/D1WorkspaceRepository.d.ts.map +1 -0
  472. package/dist/infrastructure/repositories/D1WorkspaceRepository.js +77 -0
  473. package/dist/infrastructure/repositories/D1WorkspaceRepository.js.map +1 -0
  474. package/dist/infrastructure/repositories/D1WorkspaceSettingsRepository.d.ts +17 -0
  475. package/dist/infrastructure/repositories/D1WorkspaceSettingsRepository.d.ts.map +1 -0
  476. package/dist/infrastructure/repositories/D1WorkspaceSettingsRepository.js +50 -0
  477. package/dist/infrastructure/repositories/D1WorkspaceSettingsRepository.js.map +1 -0
  478. package/dist/infrastructure/repositories/chunk.d.ts +11 -0
  479. package/dist/infrastructure/repositories/chunk.d.ts.map +1 -0
  480. package/dist/infrastructure/repositories/chunk.js +17 -0
  481. package/dist/infrastructure/repositories/chunk.js.map +1 -0
  482. package/dist/infrastructure/repositories/github-mappers/branch.d.ts +11 -0
  483. package/dist/infrastructure/repositories/github-mappers/branch.d.ts.map +1 -0
  484. package/dist/infrastructure/repositories/github-mappers/branch.js +22 -0
  485. package/dist/infrastructure/repositories/github-mappers/branch.js.map +1 -0
  486. package/dist/infrastructure/repositories/github-mappers/check-run.d.ts +13 -0
  487. package/dist/infrastructure/repositories/github-mappers/check-run.d.ts.map +1 -0
  488. package/dist/infrastructure/repositories/github-mappers/check-run.js +24 -0
  489. package/dist/infrastructure/repositories/github-mappers/check-run.js.map +1 -0
  490. package/dist/infrastructure/repositories/github-mappers/commit.d.ts +12 -0
  491. package/dist/infrastructure/repositories/github-mappers/commit.d.ts.map +1 -0
  492. package/dist/infrastructure/repositories/github-mappers/commit.js +22 -0
  493. package/dist/infrastructure/repositories/github-mappers/commit.js.map +1 -0
  494. package/dist/infrastructure/repositories/github-mappers/index.d.ts +11 -0
  495. package/dist/infrastructure/repositories/github-mappers/index.d.ts.map +1 -0
  496. package/dist/infrastructure/repositories/github-mappers/index.js +14 -0
  497. package/dist/infrastructure/repositories/github-mappers/index.js.map +1 -0
  498. package/dist/infrastructure/repositories/github-mappers/installation.d.ts +16 -0
  499. package/dist/infrastructure/repositories/github-mappers/installation.d.ts.map +1 -0
  500. package/dist/infrastructure/repositories/github-mappers/installation.js +29 -0
  501. package/dist/infrastructure/repositories/github-mappers/installation.js.map +1 -0
  502. package/dist/infrastructure/repositories/github-mappers/issue.d.ts +15 -0
  503. package/dist/infrastructure/repositories/github-mappers/issue.d.ts.map +1 -0
  504. package/dist/infrastructure/repositories/github-mappers/issue.js +29 -0
  505. package/dist/infrastructure/repositories/github-mappers/issue.js.map +1 -0
  506. package/dist/infrastructure/repositories/github-mappers/pull-request.d.ts +18 -0
  507. package/dist/infrastructure/repositories/github-mappers/pull-request.d.ts.map +1 -0
  508. package/dist/infrastructure/repositories/github-mappers/pull-request.js +36 -0
  509. package/dist/infrastructure/repositories/github-mappers/pull-request.js.map +1 -0
  510. package/dist/infrastructure/repositories/github-mappers/repo.d.ts +15 -0
  511. package/dist/infrastructure/repositories/github-mappers/repo.d.ts.map +1 -0
  512. package/dist/infrastructure/repositories/github-mappers/repo.js +31 -0
  513. package/dist/infrastructure/repositories/github-mappers/repo.js.map +1 -0
  514. package/dist/infrastructure/repositories/github-mappers/serialize.d.ts +3 -0
  515. package/dist/infrastructure/repositories/github-mappers/serialize.d.ts.map +1 -0
  516. package/dist/infrastructure/repositories/github-mappers/serialize.js +4 -0
  517. package/dist/infrastructure/repositories/github-mappers/serialize.js.map +1 -0
  518. package/dist/infrastructure/repositories/github-mappers/sync-cursor.d.ts +8 -0
  519. package/dist/infrastructure/repositories/github-mappers/sync-cursor.d.ts.map +1 -0
  520. package/dist/infrastructure/repositories/github-mappers/sync-cursor.js +4 -0
  521. package/dist/infrastructure/repositories/github-mappers/sync-cursor.js.map +1 -0
  522. package/dist/infrastructure/repositories/github-mappers/upsert.d.ts +11 -0
  523. package/dist/infrastructure/repositories/github-mappers/upsert.d.ts.map +1 -0
  524. package/dist/infrastructure/repositories/github-mappers/upsert.js +18 -0
  525. package/dist/infrastructure/repositories/github-mappers/upsert.js.map +1 -0
  526. package/dist/infrastructure/repositories/mappers.d.ts +2 -0
  527. package/dist/infrastructure/repositories/mappers.d.ts.map +1 -0
  528. package/dist/infrastructure/repositories/mappers.js +4 -0
  529. package/dist/infrastructure/repositories/mappers.js.map +1 -0
  530. package/dist/infrastructure/runners/HttpRunnerPoolProvider.d.ts +2 -0
  531. package/dist/infrastructure/runners/HttpRunnerPoolProvider.d.ts.map +1 -0
  532. package/dist/infrastructure/runners/HttpRunnerPoolProvider.js +5 -0
  533. package/dist/infrastructure/runners/HttpRunnerPoolProvider.js.map +1 -0
  534. package/dist/infrastructure/runners/RunnerPoolTransport.d.ts +2 -0
  535. package/dist/infrastructure/runners/RunnerPoolTransport.d.ts.map +1 -0
  536. package/dist/infrastructure/runners/RunnerPoolTransport.js +5 -0
  537. package/dist/infrastructure/runners/RunnerPoolTransport.js.map +1 -0
  538. package/dist/infrastructure/runtime.d.ts +8 -0
  539. package/dist/infrastructure/runtime.d.ts.map +1 -0
  540. package/dist/infrastructure/runtime.js +13 -0
  541. package/dist/infrastructure/runtime.js.map +1 -0
  542. package/dist/infrastructure/tasks/GitHubIssuesProvider.d.ts +50 -0
  543. package/dist/infrastructure/tasks/GitHubIssuesProvider.d.ts.map +1 -0
  544. package/dist/infrastructure/tasks/GitHubIssuesProvider.js +91 -0
  545. package/dist/infrastructure/tasks/GitHubIssuesProvider.js.map +1 -0
  546. package/dist/infrastructure/tasks/JiraProvider.d.ts +29 -0
  547. package/dist/infrastructure/tasks/JiraProvider.d.ts.map +1 -0
  548. package/dist/infrastructure/tasks/JiraProvider.js +109 -0
  549. package/dist/infrastructure/tasks/JiraProvider.js.map +1 -0
  550. package/dist/infrastructure/workflows/BootstrapWorkflow.d.ts +21 -0
  551. package/dist/infrastructure/workflows/BootstrapWorkflow.d.ts.map +1 -0
  552. package/dist/infrastructure/workflows/BootstrapWorkflow.js +72 -0
  553. package/dist/infrastructure/workflows/BootstrapWorkflow.js.map +1 -0
  554. package/dist/infrastructure/workflows/ExecutionWorkflow.d.ts +15 -0
  555. package/dist/infrastructure/workflows/ExecutionWorkflow.d.ts.map +1 -0
  556. package/dist/infrastructure/workflows/ExecutionWorkflow.js +169 -0
  557. package/dist/infrastructure/workflows/ExecutionWorkflow.js.map +1 -0
  558. package/dist/infrastructure/workflows/GitHubBackfillWorkflow.d.ts +17 -0
  559. package/dist/infrastructure/workflows/GitHubBackfillWorkflow.d.ts.map +1 -0
  560. package/dist/infrastructure/workflows/GitHubBackfillWorkflow.js +24 -0
  561. package/dist/infrastructure/workflows/GitHubBackfillWorkflow.js.map +1 -0
  562. package/dist/infrastructure/workflows/WorkflowsBootstrapRunner.d.ts +15 -0
  563. package/dist/infrastructure/workflows/WorkflowsBootstrapRunner.d.ts.map +1 -0
  564. package/dist/infrastructure/workflows/WorkflowsBootstrapRunner.js +34 -0
  565. package/dist/infrastructure/workflows/WorkflowsBootstrapRunner.js.map +1 -0
  566. package/dist/infrastructure/workflows/WorkflowsWorkRunner.d.ts +31 -0
  567. package/dist/infrastructure/workflows/WorkflowsWorkRunner.d.ts.map +1 -0
  568. package/dist/infrastructure/workflows/WorkflowsWorkRunner.js +55 -0
  569. package/dist/infrastructure/workflows/WorkflowsWorkRunner.js.map +1 -0
  570. package/dist/infrastructure/workflows/retention.d.ts +35 -0
  571. package/dist/infrastructure/workflows/retention.d.ts.map +1 -0
  572. package/dist/infrastructure/workflows/retention.js +26 -0
  573. package/dist/infrastructure/workflows/retention.js.map +1 -0
  574. package/dist/infrastructure/workflows/sweeper.d.ts +57 -0
  575. package/dist/infrastructure/workflows/sweeper.d.ts.map +1 -0
  576. package/dist/infrastructure/workflows/sweeper.js +62 -0
  577. package/dist/infrastructure/workflows/sweeper.js.map +1 -0
  578. package/migrations/0001_init.sql +677 -0
  579. package/migrations/0002_clarity_reviews.sql +19 -0
  580. package/migrations/0002_consensus.sql +38 -0
  581. package/migrations/0002_llm_reasoning_text.sql +6 -0
  582. package/migrations/0002_local_model_endpoints.sql +16 -0
  583. package/migrations/0003_pipeline_labels_archive.sql +13 -0
  584. package/migrations/0003_release_health.sql +34 -0
  585. package/migrations/0004_run_timing_task_types.sql +24 -0
  586. package/package.json +65 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubIssuesProvider.js","sourceRoot":"","sources":["../../../src/infrastructure/tasks/GitHubIssuesProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,eAAe,GAQhB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAgBvF,MAAM,OAAO,oBAAoB;IAIF,IAAI;IAHxB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;QACzD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;QACtF,IAAI,CAAC,KAAK,EAAE,CAAC;YACX,MAAM,IAAI,aAAa,CACrB,yCAAyC,KAAK,+DAA+D,CAC9G,CAAA;QACH,CAAC;QACD,OAAO,KAAK,CAAC,cAAc,CAAA;IAC7B,CAAC;CACF"}
@@ -0,0 +1,29 @@
1
+ import { type TaskContent, type TaskCredentials, type TaskSearchResult, type TaskSourceProvider, type NormalizedTaskConnection } from '@cat-factory/kernel';
2
+ /** Carries the HTTP status so callers can surface a meaningful error. */
3
+ export declare class JiraApiError extends Error {
4
+ readonly status: number;
5
+ constructor(status: number, message: string);
6
+ }
7
+ export declare class JiraProvider implements TaskSourceProvider {
8
+ readonly kind: 'jira';
9
+ readonly descriptor: {
10
+ source: "github" | "jira";
11
+ label: string;
12
+ icon: string;
13
+ credentialFields: {
14
+ key: string;
15
+ label: string;
16
+ help?: string | undefined;
17
+ placeholder?: string | undefined;
18
+ secret?: boolean | undefined;
19
+ }[];
20
+ refLabel: string;
21
+ refPlaceholder: string;
22
+ searchable?: boolean | undefined;
23
+ };
24
+ normalizeConnection(input: TaskCredentials): NormalizedTaskConnection;
25
+ parseRef(input: string): string | null;
26
+ fetchTask(credentials: TaskCredentials, externalId: string): Promise<TaskContent>;
27
+ search(credentials: TaskCredentials, query: string): Promise<TaskSearchResult[]>;
28
+ }
29
+ //# sourceMappingURL=JiraProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JiraProvider.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/tasks/JiraProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC9B,MAAM,qBAAqB,CAAA;AAa5B,yEAAyE;AACzE,qBAAa,YAAa,SAAQ,KAAK;IAEnC,QAAQ,CAAC,MAAM,EAAE,MAAM;IADzB,YACW,MAAM,EAAE,MAAM,EACvB,OAAO,EAAE,MAAM,EAIhB;CACF;AAsBD,qBAAa,YAAa,YAAW,kBAAkB;IACrD,QAAQ,CAAC,IAAI,EAAG,MAAM,CAAS;IAC/B,QAAQ,CAAC,UAAU;;;;;;;;;;;;;;MAAkB;IAErC,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG,wBAAwB,CAepE;IAED,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAErC;IAEK,SAAS,CAAC,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA4CtF;IAEK,MAAM,CAAC,WAAW,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA6BrF;CACF"}
@@ -0,0 +1,109 @@
1
+ import { ValidationError, atlassianLogic, } from '@cat-factory/kernel';
2
+ import { JIRA_DESCRIPTOR, jiraLogic } from '@cat-factory/integrations';
3
+ // JiraProvider: the task-source provider for Jira Cloud. It authenticates with
4
+ // HTTP Basic (account email + API token, the same scheme as Confluence), fetches
5
+ // an issue via the REST v3 API, and maps it onto the structured TaskContent —
6
+ // converting the ADF description and comment bodies to the Markdown the generic
7
+ // excerpt/prompt logic consumes. All Jira-specific *pure* logic (ref parsing, ADF
8
+ // conversion) lives in `@cat-factory/integrations` so it is unit-testable; this class is
9
+ // the thin `fetch` shell around it. No SDK — fetch + `btoa` suffice.
10
+ const USER_AGENT = 'cat-factory';
11
+ /** Carries the HTTP status so callers can surface a meaningful error. */
12
+ export class JiraApiError extends Error {
13
+ status;
14
+ constructor(status, message) {
15
+ super(message);
16
+ this.status = status;
17
+ this.name = 'JiraApiError';
18
+ }
19
+ }
20
+ export class JiraProvider {
21
+ kind = 'jira';
22
+ descriptor = JIRA_DESCRIPTOR;
23
+ normalizeConnection(input) {
24
+ const baseUrlRaw = input.baseUrl?.trim();
25
+ const accountEmail = input.accountEmail?.trim();
26
+ const apiToken = input.apiToken?.trim();
27
+ if (!baseUrlRaw || !accountEmail || !apiToken) {
28
+ throw new ValidationError('Jira requires a site URL, account email and API token');
29
+ }
30
+ const baseUrl = atlassianLogic.normalizeAtlassianBaseUrl(baseUrlRaw);
31
+ // Guard against SSRF: the stored base URL is later fetched with the
32
+ // workspace's credentials, so it must be a public https host.
33
+ atlassianLogic.assertSafeAtlassianBaseUrl(baseUrl);
34
+ return {
35
+ credentials: { baseUrl, accountEmail, apiToken },
36
+ label: baseUrl,
37
+ };
38
+ }
39
+ parseRef(input) {
40
+ return jiraLogic.parseJiraRef(input);
41
+ }
42
+ async fetchTask(credentials, externalId) {
43
+ const base = credentials.baseUrl.replace(/\/+$/, '');
44
+ const fields = 'summary,description,status,issuetype,assignee,priority,labels,comment';
45
+ const url = `${base}/rest/api/3/issue/${encodeURIComponent(externalId)}?fields=${fields}`;
46
+ const auth = btoa(`${credentials.accountEmail}:${credentials.apiToken}`);
47
+ const res = await fetch(url, {
48
+ method: 'GET',
49
+ headers: {
50
+ authorization: `Basic ${auth}`,
51
+ accept: 'application/json',
52
+ 'user-agent': USER_AGENT,
53
+ },
54
+ });
55
+ if (!res.ok) {
56
+ const text = await res.text().catch(() => '');
57
+ throw new JiraApiError(res.status, `Jira GET ${url} → ${res.status}: ${text.slice(0, 300)}`);
58
+ }
59
+ const json = (await res.json().catch(() => null));
60
+ if (!json || !json.key || !json.fields) {
61
+ throw new JiraApiError(502, `Jira returned an unexpected body for issue ${externalId}`);
62
+ }
63
+ const f = json.fields;
64
+ const comments = (f.comment?.comments ?? []).map((c) => ({
65
+ author: c.author?.displayName ?? '',
66
+ createdAt: c.created ?? '',
67
+ body: jiraLogic.adfToMarkdown(c.body),
68
+ }));
69
+ return {
70
+ externalId: json.key,
71
+ url: `${base}/browse/${json.key}`,
72
+ title: f.summary ?? '(untitled)',
73
+ status: f.status?.name ?? '',
74
+ type: f.issuetype?.name ?? '',
75
+ assignee: f.assignee?.displayName ?? null,
76
+ priority: f.priority?.name ?? null,
77
+ labels: Array.isArray(f.labels) ? f.labels : [],
78
+ description: jiraLogic.adfToMarkdown(f.description),
79
+ comments,
80
+ };
81
+ }
82
+ async search(credentials, query) {
83
+ const base = credentials.baseUrl.replace(/\/+$/, '');
84
+ // Re-validate the stored base before fetching with the workspace's credentials
85
+ // (defense-in-depth against a base that became unsafe since connect time).
86
+ atlassianLogic.assertSafeAtlassianBaseUrl(base);
87
+ const jql = encodeURIComponent(jiraLogic.buildJiraSearchJql(query));
88
+ // `/rest/api/3/search/jql` is the current enhanced-search endpoint; the legacy
89
+ // GET `/rest/api/3/search` was removed by Atlassian (May 2025). The `issues[]`
90
+ // response shape is unchanged, so `parseJiraSearchResults` still applies.
91
+ const url = `${base}/rest/api/3/search/jql?jql=${jql}&fields=summary,status&maxResults=20`;
92
+ const auth = btoa(`${credentials.accountEmail}:${credentials.apiToken}`);
93
+ const res = await fetch(url, {
94
+ method: 'GET',
95
+ headers: {
96
+ authorization: `Basic ${auth}`,
97
+ accept: 'application/json',
98
+ 'user-agent': USER_AGENT,
99
+ },
100
+ });
101
+ if (!res.ok) {
102
+ const text = await res.text().catch(() => '');
103
+ throw new JiraApiError(res.status, `Jira search ${url} → ${res.status}: ${text.slice(0, 300)}`);
104
+ }
105
+ const json = await res.json().catch(() => null);
106
+ return jiraLogic.parseJiraSearchResults(json, base);
107
+ }
108
+ }
109
+ //# sourceMappingURL=JiraProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JiraProvider.js","sourceRoot":"","sources":["../../../src/infrastructure/tasks/JiraProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,cAAc,GAOf,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,2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AK,CAAC,CAAC,CAAA;QACnE,+EAA+E;QAC/E,+EAA+E;QAC/E,0EAA0E;QAC1E,MAAM,GAAG,GAAG,GAAG,IAAI,8BAA8B,GAAG,sCAAsC,CAAA;QAC1F,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,WAAW,CAAC,YAAY,IAAI,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAA;QAExE,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;YAC3B,MAAM,EAAE,KAAK;YACb,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,IAAI,EAAE;gBAC9B,MAAM,EAAE,kBAAkB;gBAC1B,YAAY,EAAE,UAAU;aACzB;SACF,CAAC,CAAA;QACF,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC;YACZ,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;YAC7C,MAAM,IAAI,YAAY,CACpB,GAAG,CAAC,MAAM,EACV,eAAe,GAAG,MAAM,GAAG,CAAC,MAAM,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAC5D,CAAA;QACH,CAAC;QACD,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAA;QAC/C,OAAO,SAAS,CAAC,sBAAsB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;IACrD,CAAC;CACF"}
@@ -0,0 +1,21 @@
1
+ import { WorkflowEntrypoint, type WorkflowEvent, type WorkflowStep } from 'cloudflare:workers';
2
+ import type { Env } from '../env';
3
+ /** Params passed to a BootstrapWorkflow instance (its id is the bootstrap job id). */
4
+ export interface BootstrapWorkflowParams {
5
+ workspaceId: string;
6
+ jobId: string;
7
+ }
8
+ /**
9
+ * Durable driver for one "bootstrap repo" run, mirroring ExecutionWorkflow. It
10
+ * holds NO business logic — every decision lives in core's BootstrapService. Each
11
+ * iteration polls the bootstrap container once inside a retriable, checkpointed
12
+ * `step.do` and sleeps durably between polls, so the long container run survives
13
+ * eviction while the driver stays cheap. The poll itself persists subtask progress
14
+ * and finalises the board frame on a terminal outcome; this loop only decides when
15
+ * to stop. The container's own inactivity + max-duration watchdogs bound the work;
16
+ * `jobMaxPolls` is a backstop in case it never reports terminal.
17
+ */
18
+ export declare class BootstrapWorkflow extends WorkflowEntrypoint<Env, BootstrapWorkflowParams> {
19
+ run(event: WorkflowEvent<BootstrapWorkflowParams>, step: WorkflowStep): Promise<void>;
20
+ }
21
+ //# sourceMappingURL=BootstrapWorkflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BootstrapWorkflow.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/workflows/BootstrapWorkflow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,aAAa,EAElB,KAAK,YAAY,EAElB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAKjC,sFAAsF;AACtF,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;CACd;AAQD;;;;;;;;;GASG;AACH,qBAAa,iBAAkB,SAAQ,kBAAkB,CAAC,GAAG,EAAE,uBAAuB,CAAC;IACtE,GAAG,CAChB,KAAK,EAAE,aAAa,CAAC,uBAAuB,CAAC,EAC7C,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CAoDf;CACF"}
@@ -0,0 +1,72 @@
1
+ import { WorkflowEntrypoint, } from 'cloudflare:workers';
2
+ import { buildContainer } from '../container';
3
+ import { loadConfig } from '../config';
4
+ import { logger } from '../observability/logger';
5
+ /** Per-step retry policy: a transient poll failure retries before the run fails. */
6
+ const STEP_CONFIG = {
7
+ retries: { limit: 3, delay: '5 seconds', backoff: 'exponential' },
8
+ timeout: '2 minutes',
9
+ };
10
+ /**
11
+ * Durable driver for one "bootstrap repo" run, mirroring ExecutionWorkflow. It
12
+ * holds NO business logic — every decision lives in core's BootstrapService. Each
13
+ * iteration polls the bootstrap container once inside a retriable, checkpointed
14
+ * `step.do` and sleeps durably between polls, so the long container run survives
15
+ * eviction while the driver stays cheap. The poll itself persists subtask progress
16
+ * and finalises the board frame on a terminal outcome; this loop only decides when
17
+ * to stop. The container's own inactivity + max-duration watchdogs bound the work;
18
+ * `jobMaxPolls` is a backstop in case it never reports terminal.
19
+ */
20
+ export class BootstrapWorkflow extends WorkflowEntrypoint {
21
+ async run(event, step) {
22
+ const { workspaceId, jobId } = event.payload;
23
+ const execConfig = loadConfig(this.env).execution;
24
+ const pollInterval = execConfig.jobPollInterval;
25
+ const log = logger.child({ workspaceId, jobId, workflow: 'bootstrap' });
26
+ // Consecutive failures to READ status — not the bootstrap failing. The agent
27
+ // can briefly make the container unresponsive while busy (cloning, installing,
28
+ // building); the job's real liveness is bounded container-side (inactivity +
29
+ // max-duration watchdogs), and a vanished container surfaces as a 404→failed
30
+ // value, so a *thrown* poll error is always transient. Tolerate a bounded run
31
+ // of them (reset on any good poll) rather than abandoning a healthy run on the
32
+ // first blip.
33
+ let pollReadFailures = 0;
34
+ for (let p = 0; p < execConfig.jobMaxPolls; p++) {
35
+ await step.sleep(`poll-wait-${p}`, pollInterval);
36
+ let result;
37
+ try {
38
+ result = (await step.do(`poll-${p}`, STEP_CONFIG, async () => {
39
+ const container = buildContainer(this.env);
40
+ if (!container.bootstrap) {
41
+ throw new Error('Bootstrap module is not configured');
42
+ }
43
+ return container.bootstrap.service.pollBootstrapJob(workspaceId, jobId);
44
+ }));
45
+ }
46
+ catch (error) {
47
+ pollReadFailures += 1;
48
+ log.warn({ err: error instanceof Error ? error.message : String(error), pollReadFailures }, 'bootstrap poll could not read job status; treating as still running and retrying');
49
+ // Sustained unreachability: leave the job `running` so the cron sweep can
50
+ // re-drive it later (the container may recover, or report terminal, by then).
51
+ // Stop this instance to avoid burning the whole poll budget while wedged.
52
+ if (pollReadFailures >= execConfig.jobPollFailureTolerance) {
53
+ log.error('bootstrap poll unreadable past tolerance; leaving for sweeper');
54
+ return;
55
+ }
56
+ continue;
57
+ }
58
+ pollReadFailures = 0;
59
+ if (result.state === 'done') {
60
+ log.info('bootstrap run succeeded');
61
+ return;
62
+ }
63
+ if (result.state === 'failed') {
64
+ log.warn({ error: result.error }, 'bootstrap run failed');
65
+ return;
66
+ }
67
+ // still running — loop and poll again after the next durable sleep.
68
+ }
69
+ log.warn('bootstrap run did not finish within its polling budget');
70
+ }
71
+ }
72
+ //# sourceMappingURL=BootstrapWorkflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BootstrapWorkflow.js","sourceRoot":"","sources":["../../../src/infrastructure/workflows/BootstrapWorkflow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,GAKnB,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAQhD,oFAAoF;AACpF,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE;IACjE,OAAO,EAAE,WAAW;CACQ,CAAA;AAE9B;;;;;;;;;GASG;AACH,MAAM,OAAO,iBAAkB,SAAQ,kBAAgD;IAC5E,KAAK,CAAC,GAAG,CAChB,KAA6C,EAC7C,IAAkB;QAElB,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC,OAAO,CAAA;QAC5C,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAA;QACjD,MAAM,YAAY,GAAG,UAAU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EAA0E;gBAC1E,IAAI,gBAAgB,IAAI,UAAU,CAAC,uBAAuB,EAAE,CAAC;oBAC3D,GAAG,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAA;oBAC1E,OAAM;gBACR,CAAC;gBACD,SAAQ;YACV,CAAC;YACD,gBAAgB,GAAG,CAAC,CAAA;YACpB,IAAI,MAAM,CAAC,KAAK,KAAK,MAAM,EAAE,CAAC;gBAC5B,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAA;gBACnC,OAAM;YACR,CAAC;YACD,IAAI,MAAM,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;gBAC9B,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,sBAAsB,CAAC,CAAA;gBACzD,OAAM;YACR,CAAC;YACD,oEAAoE;QACtE,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAA;IACpE,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ import { WorkflowEntrypoint, type WorkflowEvent, type WorkflowStep } from 'cloudflare:workers';
2
+ import type { Env } from '../env';
3
+ import type { ExecutionWorkflowParams } from './WorkflowsWorkRunner';
4
+ /**
5
+ * Durable driver for one pipeline run. It contains NO business logic — every
6
+ * decision lives in core's ExecutionService. Each loop iteration advances the
7
+ * run by exactly one agent step inside a retriable, checkpointed `step.do`, then
8
+ * either loops, parks on a human decision via `waitForEvent`, or stops. Because
9
+ * each committed step is memoised, a crash and replay never re-issues an
10
+ * already-completed LLM call.
11
+ */
12
+ export declare class ExecutionWorkflow extends WorkflowEntrypoint<Env, ExecutionWorkflowParams> {
13
+ run(event: WorkflowEvent<ExecutionWorkflowParams>, step: WorkflowStep): Promise<void>;
14
+ }
15
+ //# sourceMappingURL=ExecutionWorkflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutionWorkflow.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/workflows/ExecutionWorkflow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,aAAa,EAElB,KAAK,YAAY,EAElB,MAAM,oBAAoB,CAAA;AAG3B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAIjC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAQpE;;;;;;;GAOG;AACH,qBAAa,iBAAkB,SAAQ,kBAAkB,CAAC,GAAG,EAAE,uBAAuB,CAAC;IACtE,GAAG,CAChB,KAAK,EAAE,aAAa,CAAC,uBAAuB,CAAC,EAC7C,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CA6Lf;CACF"}
@@ -0,0 +1,169 @@
1
+ import { WorkflowEntrypoint, } from 'cloudflare:workers';
2
+ import { buildContainer } from '../container';
3
+ import { loadConfig } from '../config';
4
+ import { logger } from '../observability/logger';
5
+ /** Per-step retry policy: failures retry a few times before the run is failed. */
6
+ const STEP_CONFIG = {
7
+ retries: { limit: 3, delay: '5 seconds', backoff: 'exponential' },
8
+ timeout: '5 minutes',
9
+ };
10
+ /**
11
+ * Durable driver for one pipeline run. It contains NO business logic — every
12
+ * decision lives in core's ExecutionService. Each loop iteration advances the
13
+ * run by exactly one agent step inside a retriable, checkpointed `step.do`, then
14
+ * either loops, parks on a human decision via `waitForEvent`, or stops. Because
15
+ * each committed step is memoised, a crash and replay never re-issues an
16
+ * already-completed LLM call.
17
+ */
18
+ export class ExecutionWorkflow extends WorkflowEntrypoint {
19
+ async run(event, step) {
20
+ const { workspaceId, executionId } = event.payload;
21
+ const execConfig = loadConfig(this.env).execution;
22
+ const decisionTimeout = execConfig.decisionTimeout;
23
+ const jobPollInterval = execConfig.jobPollInterval;
24
+ const ciPollInterval = execConfig.ciPollInterval;
25
+ const failRun = async (i, message, kind = 'agent', detail = null) => {
26
+ logger.warn({ workspaceId, executionId, step: i }, `failing run: ${message}`);
27
+ await step.do(`fail-${i}`, () => buildContainer(this.env).executionService.failRun(workspaceId, executionId, message, kind, detail));
28
+ };
29
+ for (let i = 0;; i++) {
30
+ let result;
31
+ try {
32
+ result = (await step.do(`advance-${i}`, STEP_CONFIG, () => buildContainer(this.env).executionService.advanceInstance(workspaceId, executionId, {
33
+ rethrowAgentErrors: true,
34
+ })));
35
+ }
36
+ catch (error) {
37
+ // Retries exhausted: persist the failure and open the block for review.
38
+ await failRun(i, error instanceof Error ? error.message : String(error));
39
+ return;
40
+ }
41
+ // An async step (a container coding job) dispatched and parked. Poll it
42
+ // between durable sleeps until it finishes — each poll is its own short,
43
+ // retriable step, so the job can run far longer than one step's timeout
44
+ // while the driver stays cheap and survives eviction. The job's bound is
45
+ // enforced container-side (inactivity + max-duration watchdogs); `jobMaxPolls`
46
+ // is only a backstop in case it never reports a terminal state.
47
+ if (result.kind === 'awaiting_job') {
48
+ let polled = false;
49
+ // Consecutive failures to READ status — not the job failing. A coding step
50
+ // legitimately runs long shell commands (installing deps, build/test/e2e
51
+ // suites) that can briefly make the container unresponsive to a poll. The
52
+ // job's real liveness is bounded container-side (inactivity + max-duration
53
+ // watchdogs); eviction surfaces as a 404→failed value and a genuine job
54
+ // error as job_failed — both returned, not thrown. So a *thrown* poll error
55
+ // is always transient: tolerate a bounded run of them (reset on any good
56
+ // poll) rather than failing a healthy long-running job on the first blip.
57
+ let pollReadFailures = 0;
58
+ for (let p = 0; p < execConfig.jobMaxPolls; p++) {
59
+ await step.sleep(`poll-wait-${i}-${p}`, jobPollInterval);
60
+ try {
61
+ result = (await step.do(`poll-${i}-${p}`, STEP_CONFIG, () => buildContainer(this.env).executionService.pollAgentJob(workspaceId, executionId)));
62
+ }
63
+ catch (error) {
64
+ pollReadFailures += 1;
65
+ const message = error instanceof Error ? error.message : String(error);
66
+ logger.warn({ workspaceId, executionId, step: i, poll: p, pollReadFailures, err: message }, 'poll could not read job status; treating as still running and retrying');
67
+ if (pollReadFailures >= execConfig.jobPollFailureTolerance) {
68
+ await failRun(i, `Job status was unreadable for ${pollReadFailures} consecutive polls; ` +
69
+ `the container appears unreachable (last error: ${message})`, 'timeout');
70
+ return;
71
+ }
72
+ continue;
73
+ }
74
+ pollReadFailures = 0;
75
+ if (result.kind !== 'awaiting_job') {
76
+ polled = true;
77
+ break;
78
+ }
79
+ }
80
+ if (!polled && result.kind === 'awaiting_job') {
81
+ await failRun(i, 'Implementation job did not finish within its polling budget', 'timeout');
82
+ return;
83
+ }
84
+ }
85
+ // A polling gate step (`ci` / `conflicts`) is gating the PR on its precheck.
86
+ // Re-run the precheck between durable sleeps — mirroring the job-poll loop above
87
+ // — until the gate yields something terminal: a passing precheck returns
88
+ // `continue`, a dispatched helper agent returns `awaiting_job` (handled on the
89
+ // next outer-loop iteration), and a spent budget returns `job_failed`. Which gate
90
+ // is resolved inside `pollGate` from the current step, so one loop drives both.
91
+ // Each poll is its own short, retriable step so the gate can wait far longer than
92
+ // one step's timeout while the driver stays cheap and survives eviction.
93
+ if (result.kind === 'awaiting_gate') {
94
+ let settled = false;
95
+ let pollReadFailures = 0;
96
+ for (let p = 0; p < execConfig.ciMaxPolls; p++) {
97
+ await step.sleep(`gate-wait-${i}-${p}`, ciPollInterval);
98
+ try {
99
+ result = (await step.do(`gate-poll-${i}-${p}`, STEP_CONFIG, () => buildContainer(this.env).executionService.pollGate(workspaceId, executionId)));
100
+ }
101
+ catch (error) {
102
+ pollReadFailures += 1;
103
+ const message = error instanceof Error ? error.message : String(error);
104
+ logger.warn({ workspaceId, executionId, step: i, poll: p, pollReadFailures, err: message }, 'gate poll could not read its precheck; treating as still pending and retrying');
105
+ if (pollReadFailures >= execConfig.jobPollFailureTolerance) {
106
+ await failRun(i, `Gate precheck was unreadable for ${pollReadFailures} consecutive polls (last error: ${message})`, 'timeout');
107
+ return;
108
+ }
109
+ continue;
110
+ }
111
+ pollReadFailures = 0;
112
+ if (result.kind !== 'awaiting_gate') {
113
+ settled = true;
114
+ break;
115
+ }
116
+ }
117
+ if (!settled && result.kind === 'awaiting_gate') {
118
+ // Poll budget spent. Let the gate decide: a time-windowed watch gate
119
+ // (post-release-health) PASSES (the window outlasted the budget with no
120
+ // regression), while CI/conflicts resolve to a `job_failed` timeout the
121
+ // checks below funnel through `failRun`. One policy, both runtimes.
122
+ result = (await step.do(`gate-exhausted-${i}`, STEP_CONFIG, () => buildContainer(this.env).executionService.resolveGatePollExhaustion(workspaceId, executionId)));
123
+ }
124
+ // Fall through: the now-updated `result` (continue / done / awaiting_job /
125
+ // job_failed) is handled by the checks below and the next outer-loop iteration.
126
+ }
127
+ if (result.kind === 'job_failed') {
128
+ // An inline gate may carry the precise classification + diagnostic (e.g. an
129
+ // unparseable companion verdict → `companion_rejected` with its raw reply as
130
+ // detail); record those instead of the generic container-failure framing.
131
+ await failRun(i, result.error, result.failureKind ?? 'job_failed', result.detail ?? null);
132
+ return;
133
+ }
134
+ // The container kept getting evicted/crashing even after the engine's single
135
+ // automatic fresh-container restart, so the eviction is deterministic: fail
136
+ // the run as `evicted` (its hint points at the container logs / instance size).
137
+ if (result.kind === 'job_evicted') {
138
+ await failRun(i, result.error, 'evicted');
139
+ return;
140
+ }
141
+ // 'paused' means the spend budget is exhausted: stop driving this run.
142
+ // The /spend/resume endpoint re-creates the workflow once it frees up.
143
+ if (result.kind === 'done' || result.kind === 'noop' || result.kind === 'paused')
144
+ return;
145
+ if (result.kind === 'awaiting_decision') {
146
+ const decisionId = result.decisionId;
147
+ // A parked run waits for a human INDEFINITELY — the old hard "decision timeout"
148
+ // that failed the run is gone (a run can legitimately sit waiting for input for
149
+ // as long as it takes; urgency is surfaced by the notification escalating
150
+ // yellow → red, not by killing the run). Cloudflare's `waitForEvent` still needs
151
+ // a finite timeout, so we wait in chunks: on expiry we simply re-loop, which
152
+ // re-advances the run from storage — resuming if the decision was resolved while
153
+ // we weren't listening (self-healing a missed signal), or re-arming the wait
154
+ // otherwise. The per-iteration `-${i}` keeps each re-armed wait a distinct step.
155
+ try {
156
+ await step.waitForEvent(`await-${decisionId}-${i}`, {
157
+ type: `decision-${decisionId}`,
158
+ timeout: decisionTimeout,
159
+ });
160
+ }
161
+ catch {
162
+ // Timed out without a signal — fall through and re-loop (do NOT fail the run).
163
+ }
164
+ }
165
+ // 'continue', a resolved decision, or a re-armed wait: loop and advance again.
166
+ }
167
+ }
168
+ }
169
+ //# sourceMappingURL=ExecutionWorkflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutionWorkflow.js","sourceRoot":"","sources":["../../../src/infrastructure/workflows/ExecutionWorkflow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,GAKnB,MAAM,oBAAoB,CAAA;AAI3B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAGhD,kFAAkF;AAClF,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,aAAa,EAAE;IACjE,OAAO,EAAE,WAAW;CACQ,CAAA;AAE9B;;;;;;;GAOG;AACH,MAAM,OAAO,iBAAkB,SAAQ,kBAAgD;IAC5E,KAAK,CAAC,GAAG,CAChB,KAA6C,EAC7C,IAAkB;QAElB,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,GAAG,KAAK,CAAC,OAAO,CAAA;QAClD,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,CAAA;QACjD,MAAM,eAAe,GAAG,UAAU,CAAC,eAAwC,CAAA;QAC3E,MAAM,eAAe,GAAG,UAAU,CAAC,eAAwC,CAAA;QAC3E,MAAM,cAAc,GAAG,UAAU,CAAC,cAAuC,CAAA;QAEzE,MAAM,OAAO,GAAG,KAAK,EACnB,CAAS,EACT,OAAe,EACf,IAAI,GAAqB,OAAO,EAChC,MAAM,GAAkB,IAAI,EACb,E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,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,CAAC,CAAA;gBACzC,OAAM;YACR,CAAC;YAED,uEAAuE;YACvE,uEAAuE;YACvE,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,QAAQ;gBAAE,OAAM;YAExF,IAAI,MAAM,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;gBACxC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAA;gBACpC,gFAAgF;gBAChF,gFAAgF;gBAChF,0EAA0E;gBAC1E,iFAAiF;gBACjF,6EAA6E;gBAC7E,iFAAiF;gBACjF,6EAA6E;gBAC7E,iFAAiF;gBACjF,IAAI,CAAC;oBACH,MAAM,IAAI,CAAC,YAAY,CAAC,SAAS,UAAU,IAAI,CAAC,EAAE,EAAE;wBAClD,IAAI,EAAE,YAAY,UAAU,EAAE;wBAC9B,OAAO,EAAE,eAAe;qBACzB,CAAC,CAAA;gBACJ,CAAC;gBAAC,MAAM,CAAC;oBACP,+EAA+E;gBACjF,CAAC;YACH,CAAC;YACD,+EAA+E;QACjF,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,17 @@
1
+ import { WorkflowEntrypoint, type WorkflowEvent, type WorkflowStep } from 'cloudflare:workers';
2
+ import type { Env } from '../env';
3
+ /** Params for a full-repo backfill of one installation. */
4
+ export interface GitHubBackfillParams {
5
+ installationId: number;
6
+ }
7
+ /**
8
+ * Durable full backfill for a GitHub App installation: rediscover its repos and
9
+ * deep-sync each one. Used for the initial connect and explicit `full` resyncs,
10
+ * where doing the work inline could exceed request limits. All business logic
11
+ * lives in core's GitHubSyncService; this just drives it inside a retriable,
12
+ * checkpointed step.
13
+ */
14
+ export declare class GitHubBackfillWorkflow extends WorkflowEntrypoint<Env, GitHubBackfillParams> {
15
+ run(event: WorkflowEvent<GitHubBackfillParams>, step: WorkflowStep): Promise<void>;
16
+ }
17
+ //# sourceMappingURL=GitHubBackfillWorkflow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubBackfillWorkflow.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/workflows/GitHubBackfillWorkflow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,KAAK,aAAa,EAClB,KAAK,YAAY,EAElB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAGjC,2DAA2D;AAC3D,MAAM,WAAW,oBAAoB;IACnC,cAAc,EAAE,MAAM,CAAA;CACvB;AAOD;;;;;;GAMG;AACH,qBAAa,sBAAuB,SAAQ,kBAAkB,CAAC,GAAG,EAAE,oBAAoB,CAAC;IACxE,GAAG,CAChB,KAAK,EAAE,aAAa,CAAC,oBAAoB,CAAC,EAC1C,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,IAAI,CAAC,CAMf;CACF"}
@@ -0,0 +1,24 @@
1
+ import { WorkflowEntrypoint, } from 'cloudflare:workers';
2
+ import { buildContainer } from '../container';
3
+ const STEP_CONFIG = {
4
+ retries: { limit: 3, delay: '10 seconds', backoff: 'exponential' },
5
+ timeout: '10 minutes',
6
+ };
7
+ /**
8
+ * Durable full backfill for a GitHub App installation: rediscover its repos and
9
+ * deep-sync each one. Used for the initial connect and explicit `full` resyncs,
10
+ * where doing the work inline could exceed request limits. All business logic
11
+ * lives in core's GitHubSyncService; this just drives it inside a retriable,
12
+ * checkpointed step.
13
+ */
14
+ export class GitHubBackfillWorkflow extends WorkflowEntrypoint {
15
+ async run(event, step) {
16
+ const { installationId } = event.payload;
17
+ await step.do(`backfill-${installationId}`, STEP_CONFIG, async () => {
18
+ const github = buildContainer(this.env).github;
19
+ if (github)
20
+ await github.syncService.backfillInstallation(installationId);
21
+ });
22
+ }
23
+ }
24
+ //# sourceMappingURL=GitHubBackfillWorkflow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubBackfillWorkflow.js","sourceRoot":"","sources":["../../../src/infrastructure/workflows/GitHubBackfillWorkflow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,GAInB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAO7C,MAAM,WAAW,GAAG;IAClB,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE;IAClE,OAAO,EAAE,YAAY;CACO,CAAA;AAE9B;;;;;;GAMG;AACH,MAAM,OAAO,sBAAuB,SAAQ,kBAA6C;IAC9E,KAAK,CAAC,GAAG,CAChB,KAA0C,EAC1C,IAAkB;QAElB,MAAM,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC,OAAO,CAAA;QACxC,MAAM,IAAI,CAAC,EAAE,CAAC,YAAY,cAAc,EAAE,EAAE,WAAW,EAAE,KAAK,IAAI,EAAE;YAClE,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,CAAA;YAC9C,IAAI,MAAM;gBAAE,MAAM,MAAM,CAAC,WAAW,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAA;QAC3E,CAAC,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ import type { BootstrapRunner } from '@cat-factory/kernel';
2
+ import type { Workflow } from '@cloudflare/workers-types';
3
+ /**
4
+ * Drives "bootstrap repo" runs durably via Cloudflare Workflows, mirroring
5
+ * WorkflowsWorkRunner for pipeline runs. Each run maps to one Workflows instance
6
+ * whose id is the bootstrap job id, which makes `startRun` idempotent (a duplicate
7
+ * start, or a sweeper re-drive racing a live instance, is tolerated).
8
+ */
9
+ export declare class WorkflowsBootstrapRunner implements BootstrapRunner {
10
+ private readonly workflow;
11
+ constructor(workflow: Workflow);
12
+ startRun(workspaceId: string, jobId: string): Promise<void>;
13
+ cancelRun(_workspaceId: string, jobId: string): Promise<void>;
14
+ }
15
+ //# sourceMappingURL=WorkflowsBootstrapRunner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkflowsBootstrapRunner.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/workflows/WorkflowsBootstrapRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAGzD;;;;;GAKG;AACH,qBAAa,wBAAyB,YAAW,eAAe;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAArC,YAA6B,QAAQ,EAAE,QAAQ,EAAI;IAE7C,QAAQ,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAUhE;IAEK,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAOlE;CACF"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Drives "bootstrap repo" runs durably via Cloudflare Workflows, mirroring
3
+ * WorkflowsWorkRunner for pipeline runs. Each run maps to one Workflows instance
4
+ * whose id is the bootstrap job id, which makes `startRun` idempotent (a duplicate
5
+ * start, or a sweeper re-drive racing a live instance, is tolerated).
6
+ */
7
+ export class WorkflowsBootstrapRunner {
8
+ workflow;
9
+ constructor(workflow) {
10
+ this.workflow = workflow;
11
+ }
12
+ async startRun(workspaceId, jobId) {
13
+ try {
14
+ await this.workflow.create({
15
+ id: jobId,
16
+ params: { workspaceId, jobId },
17
+ });
18
+ }
19
+ catch {
20
+ // An instance with this id already exists (a duplicate start or a sweeper
21
+ // re-drive racing a live instance). The existing instance is authoritative.
22
+ }
23
+ }
24
+ async cancelRun(_workspaceId, jobId) {
25
+ try {
26
+ const instance = await this.workflow.get(jobId);
27
+ await instance.terminate();
28
+ }
29
+ catch {
30
+ // No live instance to terminate (already finished/terminated). Nothing to do.
31
+ }
32
+ }
33
+ }
34
+ //# sourceMappingURL=WorkflowsBootstrapRunner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkflowsBootstrapRunner.js","sourceRoot":"","sources":["../../../src/infrastructure/workflows/WorkflowsBootstrapRunner.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,OAAO,wBAAwB;IACN,QAAQ;IAArC,YAA6B,QAAkB;wBAAlB,QAAQ;IAAa,CAAC;IAEnD,KAAK,CAAC,QAAQ,CAAC,WAAmB,EAAE,KAAa;QAC/C,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;gBACzB,EAAE,EAAE,KAAK;gBACT,MAAM,EAAE,EAAE,WAAW,EAAE,KAAK,EAAoC;aACjE,CAAC,CAAA;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,0EAA0E;YAC1E,4EAA4E;QAC9E,CAAC;IACH,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,YAAoB,EAAE,KAAa;QACjD,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAC/C,MAAM,QAAQ,CAAC,SAAS,EAAE,CAAA;QAC5B,CAAC;QAAC,MAAM,CAAC;YACP,8EAA8E;QAChF,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,31 @@
1
+ import type { WorkRunner } from '@cat-factory/kernel';
2
+ import type { Queue, Workflow } from '@cloudflare/workers-types';
3
+ import type { ExecutionStartMessage } from '../env';
4
+ /** Params passed to a Workflows instance; also the queue message shape. */
5
+ export interface ExecutionWorkflowParams {
6
+ workspaceId: string;
7
+ executionId: string;
8
+ }
9
+ export interface WorkflowsWorkRunnerDeps {
10
+ workflow: Workflow;
11
+ /** When present, runs are started via the queue (admission rate limiting). */
12
+ queue?: Queue<ExecutionStartMessage>;
13
+ }
14
+ /**
15
+ * Drives runs durably via Cloudflare Workflows. Each run maps to one Workflows
16
+ * instance whose id is the execution id, which makes start idempotent and lets
17
+ * decisions/cancels address the instance directly. When a queue is configured,
18
+ * `startRun` enqueues instead of creating directly so the consumer's
19
+ * `max_concurrency` bounds how fast runs are kicked off.
20
+ */
21
+ export declare class WorkflowsWorkRunner implements WorkRunner {
22
+ private readonly workflow;
23
+ private readonly queue?;
24
+ constructor({ workflow, queue }: WorkflowsWorkRunnerDeps);
25
+ startRun(workspaceId: string, executionId: string): Promise<void>;
26
+ /** Create the Workflows instance, tolerating an existing one (idempotent). */
27
+ create(workspaceId: string, executionId: string): Promise<void>;
28
+ signalDecision(_workspaceId: string, executionId: string, decisionId: string, choice: string): Promise<void>;
29
+ cancelRun(_workspaceId: string, executionId: string): Promise<void>;
30
+ }
31
+ //# sourceMappingURL=WorkflowsWorkRunner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkflowsWorkRunner.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/workflows/WorkflowsWorkRunner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAA;AAEnD,2EAA2E;AAC3E,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,QAAQ,CAAA;IAClB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAA;CACrC;AAED;;;;;;GAMG;AACH,qBAAa,mBAAoB,YAAW,UAAU;IACpD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAU;IACnC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAA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