@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,314 @@
1
+ import {} from '@cat-factory/kernel';
2
+ import { environmentsLogic } from '@cat-factory/integrations';
3
+ // The single generic adapter that interprets ANY environment manifest. There are
4
+ // no per-provider presets: an org's self-rolled management API is described as
5
+ // HTTP request templates with `{{var}}` interpolation, an auth scheme, and a
6
+ // dot-path mapping from its (arbitrary) response onto the canonical handle.
7
+ //
8
+ // Security: every URL is SSRF-guarded before it is fetched; the per-tenant
9
+ // secrets are resolved in-memory via the injected resolver and only ever placed
10
+ // in request headers — never logged or echoed in errors (error bodies are
11
+ // length-capped and carry no request headers).
12
+ const DEFAULT_TIMEOUT_MS = 15_000;
13
+ const MAX_RESPONSE_CHARS = 200_000;
14
+ /** Hard cap on the bytes read off any response body (mirrors MAX_RESPONSE_CHARS). */
15
+ const MAX_RESPONSE_BYTES = MAX_RESPONSE_CHARS;
16
+ /** Bound the redirect chain so a permitted first hop can't walk us anywhere. */
17
+ const MAX_REDIRECTS = 5;
18
+ const USER_AGENT = 'cat-factory';
19
+ /** Carries the HTTP status so the API can surface a meaningful (redacted) error. */
20
+ export class EnvironmentApiError extends Error {
21
+ status;
22
+ constructor(status, message) {
23
+ super(message);
24
+ this.status = status;
25
+ this.name = 'EnvironmentApiError';
26
+ }
27
+ }
28
+ /**
29
+ * `fetch` with redirects followed by hand so the SSRF guard runs against EVERY
30
+ * hop, not just the first URL. With the default `redirect: 'follow'` a permitted
31
+ * host can 302 to an internal target (e.g. 169.254.169.254) — or downgrade
32
+ * https→http — and the runtime would follow it unchecked. We force
33
+ * `redirect: 'manual'`, re-resolve the `Location` against the current URL, and
34
+ * re-run the same `assertSafe` guard (which also enforces https-only) before
35
+ * following. A redirect target that fails the guard throws exactly as an invalid
36
+ * initial URL would.
37
+ */
38
+ async function safeFetch(url, init, assertSafe) {
39
+ let current = url;
40
+ for (let hop = 0;; hop++) {
41
+ assertSafe(current);
42
+ const res = await fetch(current, { ...init, redirect: 'manual' });
43
+ if (res.status >= 300 && res.status < 400) {
44
+ const location = res.headers.get('location');
45
+ if (!location)
46
+ return res;
47
+ if (hop >= MAX_REDIRECTS) {
48
+ throw new EnvironmentApiError(502, 'Environment provider returned too many redirects');
49
+ }
50
+ // Resolve relative redirects against the current URL, then re-validate.
51
+ current = new URL(location, current).toString();
52
+ continue;
53
+ }
54
+ return res;
55
+ }
56
+ }
57
+ /**
58
+ * Read a response body with a running byte cap so a hostile/huge response can't
59
+ * OOM the isolate. Checks the declared Content-Length first, then enforces the
60
+ * cap while streaming. When `throwOnOverflow` is false (error snippets) the body
61
+ * is truncated instead of throwing.
62
+ */
63
+ async function readCappedText(res, maxBytes, throwOnOverflow = true) {
64
+ const declared = res.headers.get('content-length');
65
+ if (declared && Number(declared) > maxBytes) {
66
+ if (throwOnOverflow) {
67
+ throw new EnvironmentApiError(502, 'Environment provider response too large');
68
+ }
69
+ }
70
+ const body = res.body;
71
+ if (!body)
72
+ return '';
73
+ const reader = body.getReader();
74
+ const chunks = [];
75
+ let total = 0;
76
+ try {
77
+ for (;;) {
78
+ const { done, value } = await reader.read();
79
+ if (done)
80
+ break;
81
+ if (!value)
82
+ continue;
83
+ total += value.byteLength;
84
+ if (total > maxBytes) {
85
+ await reader.cancel();
86
+ if (throwOnOverflow) {
87
+ throw new EnvironmentApiError(502, 'Environment provider response too large');
88
+ }
89
+ chunks.push(value);
90
+ break;
91
+ }
92
+ chunks.push(value);
93
+ }
94
+ }
95
+ finally {
96
+ reader.releaseLock();
97
+ }
98
+ const merged = new Uint8Array(chunks.reduce((n, c) => n + c.byteLength, 0));
99
+ let offset = 0;
100
+ for (const c of chunks) {
101
+ merged.set(c, offset);
102
+ offset += c.byteLength;
103
+ }
104
+ return new TextDecoder().decode(merged).slice(0, maxBytes);
105
+ }
106
+ export class HttpEnvironmentProvider {
107
+ defaultTimeoutMs;
108
+ /** Per-isolate OAuth token cache, keyed by token URL + client id. */
109
+ oauthCache = new Map();
110
+ constructor(options = {}) {
111
+ this.defaultTimeoutMs = options.defaultTimeoutMs ?? DEFAULT_TIMEOUT_MS;
112
+ }
113
+ async provision(req) {
114
+ const json = await this.execute(req.manifest, req.manifest.provision, {
115
+ input: req.inputs,
116
+ provision: {},
117
+ }, req.resolveSecret);
118
+ // A successful provision call defaults to 'ready' unless the manifest maps a
119
+ // status string (e.g. an async provisioner returning 'pending').
120
+ return this.mapResponse(req.manifest, json, 'ready');
121
+ }
122
+ async status(req) {
123
+ if (!req.manifest.status) {
124
+ // No status endpoint declared: treat the environment as ready and echo what
125
+ // we captured at provision time.
126
+ return {
127
+ externalId: req.externalId,
128
+ url: req.provisionFields.url ?? null,
129
+ status: 'ready',
130
+ expiresAt: null,
131
+ access: null,
132
+ fields: req.provisionFields,
133
+ };
134
+ }
135
+ const json = await this.execute(req.manifest, req.manifest.status, {
136
+ input: {},
137
+ provision: req.provisionFields,
138
+ }, req.resolveSecret);
139
+ const mapped = this.mapResponse(req.manifest, json, 'ready');
140
+ return { ...mapped, externalId: mapped.externalId ?? req.externalId };
141
+ }
142
+ async teardown(req) {
143
+ if (req.manifest.teardown) {
144
+ await this.execute(req.manifest, req.manifest.teardown, {
145
+ input: {},
146
+ provision: req.provisionFields,
147
+ }, req.resolveSecret);
148
+ }
149
+ return { status: 'torn_down' };
150
+ }
151
+ // --- internals ----------------------------------------------------------
152
+ async execute(manifest, template, scope, resolveSecret) {
153
+ const url = this.buildUrl(manifest.baseUrl, template, scope);
154
+ const headers = {
155
+ accept: 'application/json',
156
+ 'user-agent': USER_AGENT,
157
+ ...(await this.authHeaders(manifest.auth, resolveSecret)),
158
+ };
159
+ for (const h of template.headers ?? []) {
160
+ headers[h.name] = environmentsLogic.interpolateTemplate(h.value, scope);
161
+ }
162
+ let body;
163
+ if (template.bodyTemplate !== undefined && template.method !== 'GET') {
164
+ body = environmentsLogic.interpolateTemplate(template.bodyTemplate, scope);
165
+ if (!headers['content-type'])
166
+ headers['content-type'] = 'application/json';
167
+ }
168
+ const res = await safeFetch(url, {
169
+ method: template.method,
170
+ headers,
171
+ body,
172
+ signal: AbortSignal.timeout(template.timeoutMs ?? this.defaultTimeoutMs),
173
+ }, (u) => environmentsLogic.assertSafeEnvironmentUrl(u, 'request URL'));
174
+ if (!res.ok) {
175
+ const errText = await readCappedText(res, MAX_RESPONSE_BYTES, false).catch(() => '');
176
+ throw new EnvironmentApiError(res.status, `Environment provider ${template.method} → ${res.status}: ${errText.slice(0, 300)}`);
177
+ }
178
+ const text = await readCappedText(res, MAX_RESPONSE_BYTES);
179
+ if (!text)
180
+ return {};
181
+ try {
182
+ return JSON.parse(text);
183
+ }
184
+ catch {
185
+ // Non-JSON responses leave the mapping to resolve to nulls.
186
+ return {};
187
+ }
188
+ }
189
+ buildUrl(baseUrl, template, scope) {
190
+ const base = baseUrl.replace(/\/+$/, '');
191
+ const path = environmentsLogic.interpolateTemplate(template.pathTemplate, scope);
192
+ let url = path ? `${base}${path.startsWith('/') ? '' : '/'}${path}` : base;
193
+ const query = (template.query ?? [])
194
+ .map((q) => `${encodeURIComponent(q.key)}=${encodeURIComponent(environmentsLogic.interpolateTemplate(q.value, scope))}`)
195
+ .join('&');
196
+ if (query)
197
+ url += `${url.includes('?') ? '&' : '?'}${query}`;
198
+ return url;
199
+ }
200
+ async authHeaders(auth, resolveSecret) {
201
+ const secret = (key) => {
202
+ const value = resolveSecret(key);
203
+ if (value === undefined)
204
+ throw new EnvironmentApiError(500, `Missing secret '${key}'`);
205
+ return value;
206
+ };
207
+ switch (auth.type) {
208
+ case 'none':
209
+ return {};
210
+ case 'api_key':
211
+ return { [auth.headerName]: `${auth.valuePrefix ?? ''}${secret(auth.secretRef.key)}` };
212
+ case 'bearer':
213
+ return { authorization: `Bearer ${secret(auth.secretRef.key)}` };
214
+ case 'basic':
215
+ return {
216
+ authorization: `Basic ${btoa(`${secret(auth.usernameSecretRef.key)}:${secret(auth.passwordSecretRef.key)}`)}`,
217
+ };
218
+ case 'oauth2_client_credentials':
219
+ return { authorization: `Bearer ${await this.oauthToken(auth, secret)}` };
220
+ case 'custom_headers': {
221
+ const headers = {};
222
+ for (const h of auth.headers)
223
+ headers[h.name] = secret(h.secretRef.key);
224
+ return headers;
225
+ }
226
+ }
227
+ }
228
+ async oauthToken(auth, secret) {
229
+ const clientId = secret(auth.clientIdSecretRef.key);
230
+ const cacheKey = `${auth.tokenUrl}::${clientId}`;
231
+ const cached = this.oauthCache.get(cacheKey);
232
+ if (cached && cached.expiresAt > Date.now() + 5_000)
233
+ return cached.token;
234
+ const form = new URLSearchParams({
235
+ grant_type: 'client_credentials',
236
+ client_id: clientId,
237
+ client_secret: secret(auth.clientSecretSecretRef.key),
238
+ });
239
+ if (auth.scope)
240
+ form.set('scope', auth.scope);
241
+ if (auth.audience)
242
+ form.set('audience', auth.audience);
243
+ const res = await safeFetch(auth.tokenUrl, {
244
+ method: 'POST',
245
+ headers: {
246
+ 'content-type': 'application/x-www-form-urlencoded',
247
+ accept: 'application/json',
248
+ 'user-agent': USER_AGENT,
249
+ },
250
+ body: form.toString(),
251
+ signal: AbortSignal.timeout(this.defaultTimeoutMs),
252
+ }, (u) => environmentsLogic.assertSafeEnvironmentUrl(u, 'OAuth token URL'));
253
+ if (!res.ok) {
254
+ const text = await readCappedText(res, MAX_RESPONSE_BYTES, false).catch(() => '');
255
+ throw new EnvironmentApiError(res.status, `OAuth token request → ${res.status}: ${text.slice(0, 200)}`);
256
+ }
257
+ const tokenText = await readCappedText(res, MAX_RESPONSE_BYTES);
258
+ const json = (() => {
259
+ try {
260
+ return JSON.parse(tokenText);
261
+ }
262
+ catch {
263
+ return null;
264
+ }
265
+ })();
266
+ if (!json?.access_token) {
267
+ throw new EnvironmentApiError(502, 'OAuth token response missing access_token');
268
+ }
269
+ const ttlMs = (typeof json.expires_in === 'number' ? json.expires_in : 300) * 1000;
270
+ this.oauthCache.set(cacheKey, { token: json.access_token, expiresAt: Date.now() + ttlMs });
271
+ return json.access_token;
272
+ }
273
+ mapResponse(manifest, json, fallbackStatus) {
274
+ const r = manifest.response;
275
+ const externalId = environmentsLogic.extractString(json, r.externalIdPath) ?? null;
276
+ const url = environmentsLogic.extractString(json, r.urlPath) ?? null;
277
+ const rawStatus = environmentsLogic.extractString(json, r.statusPath);
278
+ const status = environmentsLogic.mapStatus(rawStatus, r.statusMap, fallbackStatus);
279
+ const expiresAt = r.expiresAtPath
280
+ ? environmentsLogic.coerceExpiresAt(environmentsLogic.extractByPath(json, r.expiresAtPath))
281
+ : null;
282
+ const fields = {};
283
+ if (externalId)
284
+ fields.externalId = externalId;
285
+ if (url)
286
+ fields.url = url;
287
+ return {
288
+ externalId,
289
+ url,
290
+ status,
291
+ expiresAt,
292
+ access: this.mapAccess(r.access, json),
293
+ fields,
294
+ };
295
+ }
296
+ mapAccess(mapping, json) {
297
+ if (!mapping)
298
+ return null;
299
+ const access = { scheme: mapping.scheme };
300
+ if (mapping.scheme === 'bearer') {
301
+ access.token = environmentsLogic.extractString(json, mapping.tokenPath);
302
+ }
303
+ else if (mapping.scheme === 'basic') {
304
+ access.username = environmentsLogic.extractString(json, mapping.usernamePath);
305
+ access.password = environmentsLogic.extractString(json, mapping.passwordPath);
306
+ }
307
+ else if (mapping.scheme === 'custom_header') {
308
+ access.headerName = mapping.headerName;
309
+ access.headerValue = environmentsLogic.extractString(json, mapping.headerValuePath);
310
+ }
311
+ return access;
312
+ }
313
+ }
314
+ //# sourceMappingURL=HttpEnvironmentProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HttpEnvironmentProvider.js","sourceRoot":"","sources":["../../../src/infrastructure/environments/HttpEnvironmentProvider.ts"],"names":[],"mappings":"AAAA,OAAO,EAcN,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAE7D,iFAAiF;AACjF,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,EAAE;AACF,2EAA2E;AAC3E,gFAAgF;AAChF,0EAA0E;AAC1E,+CAA+C;AAE/C,MAAM,kBAAkB,GAAG,MAAM,CAAA;AACjC,MAAM,kBAAkB,GAAG,OAAO,CAAA;AAClC,qFAAqF;AACrF,MAAM,kBAAkB,GAAG,kBAAkB,CAAA;AAC7C,gFAAgF;AAChF,MAAM,aAAa,GAAG,CAAC,CAAA;AACvB,MAAM,UAAU,GAAG,aAAa,CAAA;AAEhC,oFAAoF;AACpF,MAAM,OAAO,mBAAoB,SAAQ,KAAK;IAEjC,MAAM;IADjB,YACW,MAAc,EACvB,OAAe;QAEf,KAAK,CA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aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;YAC7E,MAAM,CAAC,QAAQ,GAAG,iBAAiB,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;QAC/E,CAAC;aAAM,IAAI,OAAO,CAAC,MAAM,KAAK,eAAe,EAAE,CAAC;YAC9C,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAA;YACtC,MAAM,CAAC,WAAW,GAAG,iBAAiB,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,eAAe,CAAC,CAAA;QACrF,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { WebCryptoSecretCipher, type WebCryptoSecretCipherOptions } from '@cat-factory/server';
2
+ //# sourceMappingURL=WebCryptoSecretCipher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebCryptoSecretCipher.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/environments/WebCryptoSecretCipher.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,KAAK,4BAA4B,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,5 @@
1
+ // Moved to the runtime-neutral @cat-factory/server package (Web Crypto runs under
2
+ // Node too, so the Node service encrypts its runner-pool secrets the same way);
3
+ // re-exported here for existing Worker imports.
4
+ export { WebCryptoSecretCipher } from '@cat-factory/server';
5
+ //# sourceMappingURL=WebCryptoSecretCipher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebCryptoSecretCipher.js","sourceRoot":"","sources":["../../../src/infrastructure/environments/WebCryptoSecretCipher.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,gFAAgF;AAChF,gDAAgD;AAChD,OAAO,EAAE,qBAAqB,EAAqC,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { Clock } from '@cat-factory/kernel';
2
+ import type { CoreDependencies } from '@cat-factory/orchestration';
3
+ import type { Env } from '../env';
4
+ export declare function sweepExpiredEnvironments(env: Env, clock: Clock, overrides?: Partial<CoreDependencies>): Promise<number>;
5
+ //# sourceMappingURL=sweep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/environments/sweep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAWjC,wBAAsB,wBAAwB,CAC5C,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,SAAS,GAAE,OAAO,CAAC,gBAAgB,CAAM,GACxC,OAAO,CAAC,MAAM,CAAC,CAIjB"}
@@ -0,0 +1,16 @@
1
+ import { buildContainer } from '../container';
2
+ // Cron-driven TTL teardown: destroy environments whose expiry has elapsed. A
3
+ // no-op unless the integration is configured (the assembled container then has
4
+ // no `environments` module), mirroring `reconcileStaleRepos`. Runs on the
5
+ // frequent (2-min) pass so TTLs are honoured promptly.
6
+ //
7
+ // `overrides` exists only so tests can inject a fake agent executor: building
8
+ // the container otherwise trips the sandbox-prerequisite guard (the test bindings
9
+ // opt into a sandbox but supply no GitHub App). Production calls this with none.
10
+ export async function sweepExpiredEnvironments(env, clock, overrides = {}) {
11
+ const container = buildContainer(env, overrides);
12
+ if (!container.environments)
13
+ return 0;
14
+ return container.environments.teardownService.sweepExpired(clock.now());
15
+ }
16
+ //# sourceMappingURL=sweep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sweep.js","sourceRoot":"","sources":["../../../src/infrastructure/environments/sweep.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAE7C,6EAA6E;AAC7E,+EAA+E;AAC/E,0EAA0E;AAC1E,uDAAuD;AACvD,EAAE;AACF,8EAA8E;AAC9E,kFAAkF;AAClF,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,GAAQ,EACR,KAAY,EACZ,SAAS,GAA8B,EAAE;IAEzC,MAAM,SAAS,GAAG,cAAc,CAAC,GAAG,EAAE,SAAS,CAAC,CAAA;IAChD,IAAI,CAAC,SAAS,CAAC,YAAY;QAAE,OAAO,CAAC,CAAA;IACrC,OAAO,SAAS,CAAC,YAAY,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAA;AACzE,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { Block, BootstrapJob, ConsensusSession, ClarityReview, ExecutionInstance, LlmCallActivity, Notification, RequirementReview } from '@cat-factory/contracts';
2
+ import type { ExecutionEventPublisher } from '@cat-factory/kernel';
3
+ import type { DurableObjectNamespace } from '@cloudflare/workers-types';
4
+ import type { WorkspaceEventsHub } from '../durable-objects/WorkspaceEventsHub';
5
+ /**
6
+ * Publishes execution/board events to the per-workspace {@link WorkspaceEventsHub}
7
+ * Durable Object, which fans them out to subscribed browsers. Best-effort: a
8
+ * failure here (no live hub, transient DO error) must never break a state
9
+ * transition, so every publish swallows its own errors — the persisted run remains
10
+ * the source of truth, and a client reconciles missed events on reconnect.
11
+ */
12
+ export declare class DurableObjectEventPublisher implements ExecutionEventPublisher {
13
+ private readonly namespace;
14
+ constructor(namespace: DurableObjectNamespace<WorkspaceEventsHub>);
15
+ executionChanged(workspaceId: string, instance: ExecutionInstance, block?: Block | null): Promise<void>;
16
+ boardChanged(workspaceId: string, reason: string, _blockId?: string | null): Promise<void>;
17
+ bootstrapChanged(workspaceId: string, job: BootstrapJob, block?: Block | null): Promise<void>;
18
+ notificationChanged(workspaceId: string, notification: Notification): Promise<void>;
19
+ llmCallObserved(workspaceId: string, activity: LlmCallActivity): Promise<void>;
20
+ requirementReviewChanged(workspaceId: string, review: RequirementReview): Promise<void>;
21
+ consensusSessionChanged(workspaceId: string, session: ConsensusSession): Promise<void>;
22
+ clarityReviewChanged(workspaceId: string, review: ClarityReview): Promise<void>;
23
+ private publish;
24
+ }
25
+ //# sourceMappingURL=DurableObjectEventPublisher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DurableObjectEventPublisher.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/events/DurableObjectEventPublisher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,iBAAiB,EAElB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAClE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAE/E;;;;;;GAMG;AACH,qBAAa,2BAA4B,YAAW,uBAAuB;IAC7D,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,EAAI;IAEhF,gBAAgB,CACpB,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,GACnB,OAAO,CAAC,IAAI,CAAC,CAOf;IAEK,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/F;IAEK,gBAAgB,CACpB,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,YAAY,EACjB,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,GACnB,OAAO,CAAC,IAAI,CAAC,CAOf;IAEK,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAExF;IAEK,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAEnF;IAEK,wBAAwB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5F;IAEK,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE3F;IAEK,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpF;YAEa,OAAO;CAatB"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Publishes execution/board events to the per-workspace {@link WorkspaceEventsHub}
3
+ * Durable Object, which fans them out to subscribed browsers. Best-effort: a
4
+ * failure here (no live hub, transient DO error) must never break a state
5
+ * transition, so every publish swallows its own errors — the persisted run remains
6
+ * the source of truth, and a client reconciles missed events on reconnect.
7
+ */
8
+ export class DurableObjectEventPublisher {
9
+ namespace;
10
+ constructor(namespace) {
11
+ this.namespace = namespace;
12
+ }
13
+ async executionChanged(workspaceId, instance, block) {
14
+ await this.publish(workspaceId, {
15
+ type: 'execution',
16
+ instance,
17
+ block: block ?? null,
18
+ at: Date.now(),
19
+ });
20
+ }
21
+ async boardChanged(workspaceId, reason, _blockId) {
22
+ // `_blockId` is used by the FanOutEventPublisher decorator to resolve which workspaces a
23
+ // shared service's change reaches; the per-workspace publish itself is block-agnostic.
24
+ await this.publish(workspaceId, { type: 'board', reason, at: Date.now() });
25
+ }
26
+ async bootstrapChanged(workspaceId, job, block) {
27
+ await this.publish(workspaceId, {
28
+ type: 'bootstrap',
29
+ job,
30
+ block: block ?? null,
31
+ at: Date.now(),
32
+ });
33
+ }
34
+ async notificationChanged(workspaceId, notification) {
35
+ await this.publish(workspaceId, { type: 'notification', notification, at: Date.now() });
36
+ }
37
+ async llmCallObserved(workspaceId, activity) {
38
+ await this.publish(workspaceId, { type: 'llmCall', call: activity, at: Date.now() });
39
+ }
40
+ async requirementReviewChanged(workspaceId, review) {
41
+ await this.publish(workspaceId, { type: 'requirements', review, at: Date.now() });
42
+ }
43
+ async consensusSessionChanged(workspaceId, session) {
44
+ await this.publish(workspaceId, { type: 'consensus', session, at: Date.now() });
45
+ }
46
+ async clarityReviewChanged(workspaceId, review) {
47
+ await this.publish(workspaceId, { type: 'clarity', review, at: Date.now() });
48
+ }
49
+ async publish(workspaceId, event) {
50
+ try {
51
+ const stub = this.namespace.get(this.namespace.idFromName(workspaceId));
52
+ await stub.fetch('http://hub/publish', {
53
+ method: 'POST',
54
+ headers: { 'Content-Type': 'application/json' },
55
+ body: JSON.stringify(event),
56
+ });
57
+ }
58
+ catch {
59
+ // No subscribers / transient DO error — the DB write is authoritative and
60
+ // the client's reconnect-resync covers any missed event.
61
+ }
62
+ }
63
+ }
64
+ //# sourceMappingURL=DurableObjectEventPublisher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DurableObjectEventPublisher.js","sourceRoot":"","sources":["../../../src/infrastructure/events/DurableObjectEventPublisher.ts"],"names":[],"mappings":"AAeA;;;;;;GAMG;AACH,MAAM,OAAO,2BAA2B;IACT,SAAS;IAAtC,YAA6B,SAAqD;yBAArD,SAAS;IAA+C,CAAC;IAEtF,KAAK,CAAC,gBAAgB,CACpB,WAAmB,EACnB,QAA2B,EAC3B,KAAoB;QAEpB,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE;YAC9B,IAAI,EAAE,WAAW;YACjB,QAAQ;YACR,KAAK,EAAE,KAAK,IAAI,IAAI;YACpB,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE;SACf,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,WAAmB,EAAE,MAAc,EAAE,QAAwB;QAC9E,yFAAyF;QACzF,uFAAuF;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AAE,CAAC,CAAA;IACjF,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,WAAmB,EAAE,MAAqB;QACnE,MAAM,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;IAC9E,CAAC;IAEO,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,KAAqB;QAC9D,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAA;YACvE,MAAM,IAAI,CAAC,KAAK,CAAC,oBAAoB,EAAE;gBACrC,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;gBAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;aAC5B,CAAC,CAAA;QACJ,CAAC;QAAC,MAAM,CAAC;YACP,0EAA0E;YAC1E,yDAAyD;QAC3D,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import type { ExecutionEventPublisher, Notification, NotificationChannel } from '@cat-factory/kernel';
2
+ /**
3
+ * The in-app notification channel: pushes the `notification` WorkspaceEvent to the
4
+ * board (via the same event publisher that carries execution/board events) so the
5
+ * inbox + per-block badge update live. The canonical row is already persisted by
6
+ * the NotificationService, so this is purely the live push — best-effort, errors
7
+ * swallowed by the publisher.
8
+ *
9
+ * This is the only channel today; future EmailNotificationChannel /
10
+ * SlackNotificationChannel implement the same {@link NotificationChannel} port and
11
+ * are composed alongside it via CompositeNotificationChannel, with no change to the
12
+ * code that raises notifications.
13
+ */
14
+ export declare class InAppNotificationChannel implements NotificationChannel {
15
+ private readonly publisher;
16
+ constructor(publisher: ExecutionEventPublisher);
17
+ deliver(workspaceId: string, notification: Notification): Promise<void>;
18
+ }
19
+ //# sourceMappingURL=InAppNotificationChannel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InAppNotificationChannel.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/events/InAppNotificationChannel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,YAAY,EACZ,mBAAmB,EACpB,MAAM,qBAAqB,CAAA;AAE5B;;;;;;;;;;;GAWG;AACH,qBAAa,wBAAyB,YAAW,mBAAmB;IACtD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAAtC,YAA6B,SAAS,EAAE,uBAAuB,EAAI;IAE7D,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5E;CACF"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * The in-app notification channel: pushes the `notification` WorkspaceEvent to the
3
+ * board (via the same event publisher that carries execution/board events) so the
4
+ * inbox + per-block badge update live. The canonical row is already persisted by
5
+ * the NotificationService, so this is purely the live push — best-effort, errors
6
+ * swallowed by the publisher.
7
+ *
8
+ * This is the only channel today; future EmailNotificationChannel /
9
+ * SlackNotificationChannel implement the same {@link NotificationChannel} port and
10
+ * are composed alongside it via CompositeNotificationChannel, with no change to the
11
+ * code that raises notifications.
12
+ */
13
+ export class InAppNotificationChannel {
14
+ publisher;
15
+ constructor(publisher) {
16
+ this.publisher = publisher;
17
+ }
18
+ async deliver(workspaceId, notification) {
19
+ await this.publisher.notificationChanged?.(workspaceId, notification);
20
+ }
21
+ }
22
+ //# sourceMappingURL=InAppNotificationChannel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InAppNotificationChannel.js","sourceRoot":"","sources":["../../../src/infrastructure/events/InAppNotificationChannel.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,wBAAwB;IACN,SAAS;IAAtC,YAA6B,SAAkC;yBAAlC,SAAS;IAA4B,CAAC;IAEnE,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,YAA0B;QAC3D,MAAM,IAAI,CAAC,SAAS,CAAC,mBAAmB,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC,CAAA;IACvE,CAAC;CACF"}
@@ -0,0 +1,15 @@
1
+ import type { RealtimeGateway } from '@cat-factory/server';
2
+ import type { DurableObjectNamespace } from '@cloudflare/workers-types';
3
+ import type { WorkspaceEventsHub } from '../durable-objects/WorkspaceEventsHub';
4
+ /**
5
+ * Worker implementation of the realtime gateway: forwards a WebSocket upgrade to the
6
+ * per-workspace {@link WorkspaceEventsHub} Durable Object, which holds the socket
7
+ * (hibernatable) and broadcasts the events the engine publishes. Returns null when
8
+ * no `WORKSPACE_EVENTS` namespace is bound, so the controller replies 501.
9
+ */
10
+ export declare class DoRealtimeGateway implements RealtimeGateway {
11
+ private readonly namespace?;
12
+ constructor(namespace?: DurableObjectNamespace<WorkspaceEventsHub> | undefined);
13
+ upgrade(workspaceId: string, request: Request): Promise<Response | null>;
14
+ }
15
+ //# sourceMappingURL=DoRealtimeGateway.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DoRealtimeGateway.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/gateways/DoRealtimeGateway.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAA;AACvE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAA;AAE/E;;;;;GAKG;AACH,qBAAa,iBAAkB,YAAW,eAAe;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC;IAAvC,YAA6B,SAAS,CAAC,EAAE,sBAAsB,CAAC,kBAAkB,CAAC,YAAA,EAAI;IAEjF,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAK7E;CACF"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Worker implementation of the realtime gateway: forwards a WebSocket upgrade to the
3
+ * per-workspace {@link WorkspaceEventsHub} Durable Object, which holds the socket
4
+ * (hibernatable) and broadcasts the events the engine publishes. Returns null when
5
+ * no `WORKSPACE_EVENTS` namespace is bound, so the controller replies 501.
6
+ */
7
+ export class DoRealtimeGateway {
8
+ namespace;
9
+ constructor(namespace) {
10
+ this.namespace = namespace;
11
+ }
12
+ async upgrade(workspaceId, request) {
13
+ if (!this.namespace)
14
+ return null;
15
+ const stub = this.namespace.get(this.namespace.idFromName(workspaceId));
16
+ // Forward the original request so the 101 + live `webSocket` flows back out.
17
+ return stub.fetch(request);
18
+ }
19
+ }
20
+ //# sourceMappingURL=DoRealtimeGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DoRealtimeGateway.js","sourceRoot":"","sources":["../../../src/infrastructure/gateways/DoRealtimeGateway.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,OAAO,iBAAiB;IACC,SAAS;IAAtC,YAA6B,SAAsD;yBAAtD,SAAS;IAAgD,CAAC;IAEvF,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,OAAgB;QACjD,IAAI,CAAC,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAA;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAA;QACvE,6EAA6E;QAC7E,OAAO,IAAI,CAAC,KAAK,CAAC,OAAsD,CAAwB,CAAA;IAClG,CAAC;CACF"}
@@ -0,0 +1,27 @@
1
+ import type { GitHubBackfillScheduler, GitHubWebhookIngest } from '@cat-factory/server';
2
+ import type { Queue, Workflow } from '@cloudflare/workers-types';
3
+ import type { GitHubSyncMessage } from '../env';
4
+ /**
5
+ * Worker implementation of the GitHub backfill scheduler: creates a Cloudflare
6
+ * Workflows instance to durably drive a full-installation backfill. When no
7
+ * `GITHUB_BACKFILL_WORKFLOW` binding is present, returns false so the caller runs
8
+ * the backfill inline.
9
+ */
10
+ export declare class WorkflowsBackfillScheduler implements GitHubBackfillScheduler {
11
+ private readonly workflow?;
12
+ constructor(workflow?: Workflow | undefined);
13
+ scheduleBackfill(installationId: number): Promise<boolean>;
14
+ }
15
+ /**
16
+ * Worker implementation of GitHub webhook ingest: enqueues verified deliveries and
17
+ * incremental repo resyncs onto the `GITHUB_SYNC_QUEUE` so the request acks fast and
18
+ * the consumer applies projections asynchronously. Returns false when no queue is
19
+ * bound, so the caller handles the work inline (local/dev).
20
+ */
21
+ export declare class CfGitHubWebhookIngest implements GitHubWebhookIngest {
22
+ private readonly queue?;
23
+ constructor(queue?: Queue<GitHubSyncMessage> | undefined);
24
+ enqueueWebhook(eventName: string, payload: unknown): Promise<boolean>;
25
+ queueRepoResync(workspaceId: string, repoGithubId: number): Promise<boolean>;
26
+ }
27
+ //# sourceMappingURL=GitHubGateways.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubGateways.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/gateways/GitHubGateways.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACvF,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAE/C;;;;;GAKG;AACH,qBAAa,0BAA2B,YAAW,uBAAuB;IAC5D,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAAtC,YAA6B,QAAQ,CAAC,EAAE,QAAQ,YAAA,EAAI;IAE9C,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAS/D;CACF;AAED;;;;;GAKG;AACH,qBAAa,qBAAsB,YAAW,mBAAmB;IACnD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC;IAAnC,YAA6B,KAAK,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,YAAA,EAAI;IAE3D,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAI1E;IAEK,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAIjF;CACF"}