@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,48 @@
1
+ /**
2
+ * Worker implementation of the GitHub backfill scheduler: creates a Cloudflare
3
+ * Workflows instance to durably drive a full-installation backfill. When no
4
+ * `GITHUB_BACKFILL_WORKFLOW` binding is present, returns false so the caller runs
5
+ * the backfill inline.
6
+ */
7
+ export class WorkflowsBackfillScheduler {
8
+ workflow;
9
+ constructor(workflow) {
10
+ this.workflow = workflow;
11
+ }
12
+ async scheduleBackfill(installationId) {
13
+ if (!this.workflow)
14
+ return false;
15
+ await this.workflow
16
+ .create({
17
+ id: `backfill-${installationId}-${Date.now()}`,
18
+ params: { installationId },
19
+ })
20
+ .catch(() => { });
21
+ return true;
22
+ }
23
+ }
24
+ /**
25
+ * Worker implementation of GitHub webhook ingest: enqueues verified deliveries and
26
+ * incremental repo resyncs onto the `GITHUB_SYNC_QUEUE` so the request acks fast and
27
+ * the consumer applies projections asynchronously. Returns false when no queue is
28
+ * bound, so the caller handles the work inline (local/dev).
29
+ */
30
+ export class CfGitHubWebhookIngest {
31
+ queue;
32
+ constructor(queue) {
33
+ this.queue = queue;
34
+ }
35
+ async enqueueWebhook(eventName, payload) {
36
+ if (!this.queue)
37
+ return false;
38
+ await this.queue.send({ kind: 'webhook', eventName, payload });
39
+ return true;
40
+ }
41
+ async queueRepoResync(workspaceId, repoGithubId) {
42
+ if (!this.queue)
43
+ return false;
44
+ await this.queue.send({ kind: 'resync-repo', workspaceId, repoGithubId });
45
+ return true;
46
+ }
47
+ }
48
+ //# sourceMappingURL=GitHubGateways.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubGateways.js","sourceRoot":"","sources":["../../../src/infrastructure/gateways/GitHubGateways.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,OAAO,0BAA0B;IACR,QAAQ;IAArC,YAA6B,QAAmB;wBAAnB,QAAQ;IAAc,CAAC;IAEpD,KAAK,CAAC,gBAAgB,CAAC,cAAsB;QAC3C,IAAI,CAAC,IAAI,CAAC,QAAQ;YAAE,OAAO,KAAK,CAAA;QAChC,MAAM,IAAI,CAAC,QAAQ;aAChB,MAAM,CAAC;YACN,EAAE,EAAE,YAAY,cAAc,IAAI,IAAI,CAAC,GAAG,EAAE,EAAE;YAC9C,MAAM,EAAE,EAAE,cAAc,EAAE;SAC3B,CAAC;aACD,KAAK,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAA;QAClB,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,OAAO,qBAAqB;IACH,KAAK;IAAlC,YAA6B,KAAgC;qBAAhC,KAAK;IAA8B,CAAC;IAEjE,KAAK,CAAC,cAAc,CAAC,SAAiB,EAAE,OAAgB;QACtD,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAA;QAC7B,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,CAAA;QAC9D,OAAO,IAAI,CAAA;IACb,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,WAAmB,EAAE,YAAoB;QAC7D,IAAI,CAAC,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAA;QAC7B,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAA;QACzE,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export { FetchGitHubClient, GitHubApiError, type FetchGitHubClientDependencies, } from '@cat-factory/server';
2
+ //# sourceMappingURL=FetchGitHubClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchGitHubClient.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/FetchGitHubClient.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,KAAK,6BAA6B,GACnC,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,4 @@
1
+ // Moved to the runtime-neutral @cat-factory/server package (so the Node + local
2
+ // facades run the same GitHub client); re-exported here for existing Worker imports.
3
+ export { FetchGitHubClient, GitHubApiError, } from '@cat-factory/server';
4
+ //# sourceMappingURL=FetchGitHubClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchGitHubClient.js","sourceRoot":"","sources":["../../../src/infrastructure/github/FetchGitHubClient.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,qFAAqF;AACrF,OAAO,EACL,iBAAiB,EACjB,cAAc,GAEf,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { FetchGitHubProvisioningClient, type FetchGitHubProvisioningClientDependencies, } from '@cat-factory/server';
2
+ //# sourceMappingURL=FetchGitHubProvisioningClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchGitHubProvisioningClient.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/FetchGitHubProvisioningClient.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,6BAA6B,EAC7B,KAAK,yCAAyC,GAC/C,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,5 @@
1
+ // Moved to the runtime-neutral @cat-factory/server package (so the Node + local
2
+ // facades can also provision repos when a privileged App is configured);
3
+ // re-exported here for existing Worker imports.
4
+ export { FetchGitHubProvisioningClient, } from '@cat-factory/server';
5
+ //# sourceMappingURL=FetchGitHubProvisioningClient.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FetchGitHubProvisioningClient.js","sourceRoot":"","sources":["../../../src/infrastructure/github/FetchGitHubProvisioningClient.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yEAAyE;AACzE,gDAAgD;AAChD,OAAO,EACL,6BAA6B,GAE9B,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { GitHubAppAuth, type GitHubAppAuthDependencies } from '@cat-factory/server';
2
+ //# sourceMappingURL=GitHubAppAuth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubAppAuth.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/GitHubAppAuth.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,KAAK,yBAAyB,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 mints installation tokens the same way);
3
+ // re-exported here for existing Worker imports.
4
+ export { GitHubAppAuth } from '@cat-factory/server';
5
+ //# sourceMappingURL=GitHubAppAuth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubAppAuth.js","sourceRoot":"","sources":["../../../src/infrastructure/github/GitHubAppAuth.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,yEAAyE;AACzE,gDAAgD;AAChD,OAAO,EAAE,aAAa,EAAkC,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { GitHubAppRegistry, type GitHubAppRegistryDependencies, type RegisteredApp, } from '@cat-factory/server';
2
+ //# sourceMappingURL=GitHubAppRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubAppRegistry.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/GitHubAppRegistry.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EACjB,KAAK,6BAA6B,EAClC,KAAK,aAAa,GACnB,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,4 @@
1
+ // Moved to the runtime-neutral @cat-factory/server package; re-exported here for
2
+ // existing Worker imports.
3
+ export { GitHubAppRegistry, } from '@cat-factory/server';
4
+ //# sourceMappingURL=GitHubAppRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubAppRegistry.js","sourceRoot":"","sources":["../../../src/infrastructure/github/GitHubAppRegistry.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,2BAA2B;AAC3B,OAAO,EACL,iBAAiB,GAGlB,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { GitHubCiStatusProvider, type GitHubCiStatusProviderDependencies, } from '@cat-factory/server';
2
+ //# sourceMappingURL=GitHubCiStatusProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubCiStatusProvider.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/GitHubCiStatusProvider.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,KAAK,kCAAkC,GACxC,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,4 @@
1
+ // Moved to the runtime-neutral @cat-factory/server package (so every facade can wire
2
+ // the CI gate); re-exported here for existing Worker imports.
3
+ export { GitHubCiStatusProvider, } from '@cat-factory/server';
4
+ //# sourceMappingURL=GitHubCiStatusProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubCiStatusProvider.js","sourceRoot":"","sources":["../../../src/infrastructure/github/GitHubCiStatusProvider.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,8DAA8D;AAC9D,OAAO,EACL,sBAAsB,GAEvB,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { GitHubMergeabilityProvider, classifyMergeability, type GitHubMergeabilityProviderDependencies, } from '@cat-factory/server';
2
+ //# sourceMappingURL=GitHubMergeabilityProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubMergeabilityProvider.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/GitHubMergeabilityProvider.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,KAAK,sCAAsC,GAC5C,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,4 @@
1
+ // Moved to the runtime-neutral @cat-factory/server package (so every facade can wire
2
+ // the conflicts gate); re-exported here for existing Worker imports.
3
+ export { GitHubMergeabilityProvider, classifyMergeability, } from '@cat-factory/server';
4
+ //# sourceMappingURL=GitHubMergeabilityProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubMergeabilityProvider.js","sourceRoot":"","sources":["../../../src/infrastructure/github/GitHubMergeabilityProvider.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,qEAAqE;AACrE,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,GAErB,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { GitHubPullRequestMerger, type GitHubPullRequestMergerDependencies, } from '@cat-factory/server';
2
+ //# sourceMappingURL=GitHubPullRequestMerger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubPullRequestMerger.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/GitHubPullRequestMerger.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,uBAAuB,EACvB,KAAK,mCAAmC,GACzC,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,4 @@
1
+ // Moved to the runtime-neutral @cat-factory/server package (so every facade can merge
2
+ // for real); re-exported here for existing Worker imports.
3
+ export { GitHubPullRequestMerger, } from '@cat-factory/server';
4
+ //# sourceMappingURL=GitHubPullRequestMerger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitHubPullRequestMerger.js","sourceRoot":"","sources":["../../../src/infrastructure/github/GitHubPullRequestMerger.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,2DAA2D;AAC3D,OAAO,EACL,uBAAuB,GAExB,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { WebCryptoWebhookVerifier } from '@cat-factory/server';
2
+ //# sourceMappingURL=WebCryptoWebhookVerifier.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebCryptoWebhookVerifier.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/WebCryptoWebhookVerifier.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,5 @@
1
+ // The webhook verifier is runtime-neutral and now lives in @cat-factory/server so
2
+ // every facade verifies GitHub deliveries identically. Re-exported here to keep this
3
+ // module's existing import path stable for the Worker infra.
4
+ export { WebCryptoWebhookVerifier } from '@cat-factory/server';
5
+ //# sourceMappingURL=WebCryptoWebhookVerifier.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebCryptoWebhookVerifier.js","sourceRoot":"","sources":["../../../src/infrastructure/github/WebCryptoWebhookVerifier.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,qFAAqF;AACrF,6DAA6D;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { base64url, base64urlToBytes, pkcs8PemToDer, timingSafeEqual } from '@cat-factory/server';
2
+ //# sourceMappingURL=encoding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/encoding.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,3 @@
1
+ // Moved to the shared @cat-factory/server package; re-exported for existing imports.
2
+ export { base64url, base64urlToBytes, pkcs8PemToDer, timingSafeEqual } from '@cat-factory/server';
3
+ //# sourceMappingURL=encoding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encoding.js","sourceRoot":"","sources":["../../../src/infrastructure/github/encoding.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { StateSigner, type InstallState } from '@cat-factory/server';
2
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/state.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,3 @@
1
+ // Moved to the shared @cat-factory/server package; re-exported for existing imports.
2
+ export { StateSigner } from '@cat-factory/server';
3
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/infrastructure/github/state.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,EAAE,WAAW,EAAqB,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,16 @@
1
+ import type { Clock } from '@cat-factory/kernel';
2
+ import type { MessageBatch } from '@cloudflare/workers-types';
3
+ import type { GitHubModule } from '@cat-factory/orchestration';
4
+ import type { Env, GitHubSyncMessage } from '../env';
5
+ /** Apply one queued message to the projections via the GitHub module. */
6
+ export declare function applyGitHubSyncMessage(github: GitHubModule, message: GitHubSyncMessage): Promise<void>;
7
+ /** Queue consumer for `cat-factory-github-sync`: ack on success, retry on error. */
8
+ export declare function handleGitHubSyncBatch(batch: MessageBatch<GitHubSyncMessage>, env: Env): Promise<void>;
9
+ /**
10
+ * Reconciliation pass for the cron sweeper: enqueue an incremental resync for
11
+ * every tracked repo whose projection has gone stale (webhooks can be missed).
12
+ * Returns the number of repos scheduled. Falls back to a direct sync when no
13
+ * queue is bound.
14
+ */
15
+ export declare function reconcileStaleRepos(env: Env, clock: Clock, staleMs: number): Promise<number>;
16
+ //# sourceMappingURL=sync-consumer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-consumer.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/github/sync-consumer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,EAAE,GAAG,EAAE,iBAAiB,EAAE,MAAM,QAAQ,CAAA;AAYpD,yEAAyE;AACzE,wBAAsB,sBAAsB,CAC1C,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,oFAAoF;AACpF,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,YAAY,CAAC,iBAAiB,CAAC,EACtC,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,IAAI,CAAC,CAcf;AAED;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAyDjB"}
@@ -0,0 +1,130 @@
1
+ import { buildContainer } from '../container';
2
+ import { loadConfig } from '../config';
3
+ import { D1RepoProjectionRepository } from '../repositories/D1RepoProjectionRepository';
4
+ import { D1GitHubInstallationRepository } from '../repositories/D1GitHubInstallationRepository';
5
+ import { logger } from '../observability/logger';
6
+ // The async side of the GitHub integration: applying queued webhook deliveries /
7
+ // resync jobs to the projections, and the periodic reconciliation pass. Pure
8
+ // orchestration over the GitHub module + its ports, so it is unit-testable with
9
+ // fakes (mirroring the execution sweeper's style).
10
+ /** Apply one queued message to the projections via the GitHub module. */
11
+ export async function applyGitHubSyncMessage(github, message) {
12
+ if (message.kind === 'webhook') {
13
+ await github.webhookService.handle(message.eventName, message.payload);
14
+ }
15
+ else {
16
+ await github.syncService.syncRepoById(message.workspaceId, message.repoGithubId);
17
+ }
18
+ }
19
+ /** Queue consumer for `cat-factory-github-sync`: ack on success, retry on error. */
20
+ export async function handleGitHubSyncBatch(batch, env) {
21
+ const github = buildContainer(env).github;
22
+ for (const message of batch.messages) {
23
+ if (!github) {
24
+ message.ack(); // GitHub not configured here; drop rather than retry forever.
25
+ continue;
26
+ }
27
+ try {
28
+ await applyGitHubSyncMessage(github, message.body);
29
+ message.ack();
30
+ }
31
+ catch {
32
+ message.retry();
33
+ }
34
+ }
35
+ }
36
+ /**
37
+ * Reconciliation pass for the cron sweeper: enqueue an incremental resync for
38
+ * every tracked repo whose projection has gone stale (webhooks can be missed).
39
+ * Returns the number of repos scheduled. Falls back to a direct sync when no
40
+ * queue is bound.
41
+ */
42
+ export async function reconcileStaleRepos(env, clock, staleMs) {
43
+ if (!loadConfig(env).github.enabled)
44
+ return 0;
45
+ const repoRepo = new D1RepoProjectionRepository({ db: env.DB });
46
+ const installationRepo = new D1GitHubInstallationRepository({ db: env.DB });
47
+ // `listStale` already excludes repos whose installation is tombstoned, so a dead
48
+ // installation stops being swept once it is known-gone; the handling below tombstones
49
+ // one the webhook never told us about (a missed uninstall), so it stops next pass.
50
+ const stale = await repoRepo.listStale(clock.now() - staleMs);
51
+ let scheduled = 0;
52
+ for (const repo of stale) {
53
+ try {
54
+ if (env.GITHUB_SYNC_QUEUE) {
55
+ await env.GITHUB_SYNC_QUEUE.send({
56
+ kind: 'resync-repo',
57
+ workspaceId: repo.workspaceId,
58
+ repoGithubId: repo.githubId,
59
+ });
60
+ }
61
+ else {
62
+ const github = buildContainer(env).github;
63
+ if (github)
64
+ await github.syncService.syncRepoById(repo.workspaceId, repo.githubId);
65
+ }
66
+ scheduled += 1;
67
+ }
68
+ catch (error) {
69
+ // Best-effort pass (webhooks are the primary path): one repo failing must not
70
+ // abort the rest or spam the error log every cron tick. A gone/forbidden GitHub
71
+ // App installation (uninstalled or revoked → 401/404 when minting its token) is
72
+ // an expected operational state for a stale projection, so log it at warn; any
73
+ // other fault is a real error. Either way, continue with the next repo.
74
+ const gone = isInstallationGoneError(error);
75
+ // A token-mint 404/410 means the installation itself is gone — uninstalled or
76
+ // revoked without us receiving the webhook (the cron's most common stuck state).
77
+ // Tombstone it so this and every future pass skip ALL its repos until it is
78
+ // reinstalled (the `unsuspend`/reinstall webhook clears the tombstone). Scoped to
79
+ // the mint error (not a repo-level 404, which means a single deleted repo) and to
80
+ // 404/410 (never 401, which can be a transient app-JWT fault hitting everything).
81
+ if (isInstallationTokenGoneError(error)) {
82
+ try {
83
+ await installationRepo.softDelete(repo.installationId, clock.now());
84
+ }
85
+ catch {
86
+ // Best-effort: a failed tombstone just means we retry (and warn) next pass.
87
+ }
88
+ }
89
+ logger[gone ? 'warn' : 'error']({
90
+ cron: 'github-reconcile',
91
+ workspaceId: repo.workspaceId,
92
+ repoGithubId: repo.githubId,
93
+ installationId: repo.installationId,
94
+ err: errInfo(error),
95
+ }, gone
96
+ ? 'skipping stale repo whose GitHub App installation is gone (uninstalled/revoked); reinstall the app to re-enable it'
97
+ : 'repo resync failed');
98
+ }
99
+ }
100
+ return scheduled;
101
+ }
102
+ /** Minimal error → log payload (mirrors the worker entry's `errInfo`). */
103
+ function errInfo(error) {
104
+ if (error instanceof Error) {
105
+ return { message: error.message, ...(error.stack ? { stack: error.stack } : {}) };
106
+ }
107
+ return { message: String(error) };
108
+ }
109
+ /**
110
+ * Whether a sync error is a *gone/forbidden GitHub App installation* rather than a
111
+ * transient fault: minting an installation token for an uninstalled or revoked
112
+ * installation returns 401/404 (and a deleted repo 404/410). These are not worth
113
+ * an error-level log or a retry storm — the connection needs human action.
114
+ */
115
+ function isInstallationGoneError(error) {
116
+ const message = error instanceof Error ? error.message : String(error);
117
+ return /\(HTTP (401|404|410)\)/.test(message);
118
+ }
119
+ /**
120
+ * Whether the error is specifically a *token mint* returning 404/410 — i.e. the
121
+ * installation itself is gone (uninstalled/revoked), not merely a single repo
122
+ * being inaccessible. Matches {@link GitHubAppAuth.mintInstallationToken}'s
123
+ * message. Excludes 401 (a transient app-JWT/clock fault would mint-fail for every
124
+ * installation, and must not tombstone a healthy connection).
125
+ */
126
+ function isInstallationTokenGoneError(error) {
127
+ const message = error instanceof Error ? error.message : String(error);
128
+ return /Failed to mint installation token .*\(HTTP (404|410)\)/i.test(message);
129
+ }
130
+ //# sourceMappingURL=sync-consumer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-consumer.js","sourceRoot":"","sources":["../../../src/infrastructure/github/sync-consumer.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export { handleError } from '@cat-factory/server';
2
+ //# sourceMappingURL=errorHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/http/errorHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,3 @@
1
+ // Moved to the shared @cat-factory/server package; re-exported for existing imports.
2
+ export { handleError } from '@cat-factory/server';
3
+ //# sourceMappingURL=errorHandler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorHandler.js","sourceRoot":"","sources":["../../../src/infrastructure/http/errorHandler.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { param } from '@cat-factory/server';
2
+ //# sourceMappingURL=params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"params.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/http/params.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,3 @@
1
+ // Moved to the shared @cat-factory/server package; re-exported for existing imports.
2
+ export { param } from '@cat-factory/server';
3
+ //# sourceMappingURL=params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"params.js","sourceRoot":"","sources":["../../../src/infrastructure/http/params.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { AppEnv as ServerAppEnv } from '@cat-factory/server';
2
+ import type { Env } from '../env';
3
+ /**
4
+ * Hono generics for the Worker: the shared request Variables (`container`, `user`)
5
+ * from @cat-factory/server, plus the Cloudflare `Env` bindings that the Worker's own
6
+ * runtime controllers (events/webhooks/llm-proxy) read off `c.env`.
7
+ */
8
+ export type AppEnv = {
9
+ Bindings: Env;
10
+ Variables: ServerAppEnv['Variables'];
11
+ };
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/http/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAA;AAEjC;;;;GAIG;AACH,MAAM,MAAM,MAAM,GAAG;IACnB,QAAQ,EAAE,GAAG,CAAA;IACb,SAAS,EAAE,YAAY,CAAC,WAAW,CAAC,CAAA;CACrC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/infrastructure/http/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export { jsonBody } from '@cat-factory/server';
2
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/http/validation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,3 @@
1
+ // Moved to the shared @cat-factory/server package; re-exported for existing imports.
2
+ export { jsonBody } from '@cat-factory/server';
3
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/infrastructure/http/validation.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { logger } from '@cat-factory/server';
2
+ export type { Logger } from '@cat-factory/server';
3
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/observability/logger.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,YAAY,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,4 @@
1
+ // Moved to the shared, runtime-neutral @cat-factory/server package. Re-exported
2
+ // here so existing `../observability/logger` imports keep resolving.
3
+ export { logger } from '@cat-factory/server';
4
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/infrastructure/observability/logger.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,qEAAqE;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA"}
@@ -0,0 +1,15 @@
1
+ import type { AccountInvitationRecord, AccountInvitationRepository, InvitationStatus } from '@cat-factory/kernel';
2
+ import type { D1Database } from '@cloudflare/workers-types';
3
+ /** D1-backed store of account invitations (email-based org onboarding). */
4
+ export declare class D1AccountInvitationRepository implements AccountInvitationRepository {
5
+ private readonly db;
6
+ constructor({ db }: {
7
+ db: D1Database;
8
+ });
9
+ create(record: AccountInvitationRecord): Promise<void>;
10
+ get(id: string): Promise<AccountInvitationRecord | null>;
11
+ findByTokenHash(tokenHash: string): Promise<AccountInvitationRecord | null>;
12
+ listByAccount(accountId: string): Promise<AccountInvitationRecord[]>;
13
+ setStatus(id: string, status: InvitationStatus): Promise<void>;
14
+ }
15
+ //# sourceMappingURL=D1AccountInvitationRepository.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"D1AccountInvitationRepository.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1AccountInvitationRepository.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAE3B,gBAAgB,EACjB,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAoC3D,2EAA2E;AAC3E,qBAAa,6BAA8B,YAAW,2BAA2B;IAC/E,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAY;IAE/B,YAAY,EAAE,EAAE,EAAE,EAAE;QAAE,EAAE,EAAE,UAAU,CAAA;KAAE,EAErC;IAEK,MAAM,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmB3D;IAEK,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAM7D;IAEK,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAMhF;IAEK,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC,CAMzE;IAEK,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKnE;CACF"}
@@ -0,0 +1,63 @@
1
+ function parseRoles(csv) {
2
+ const roles = (csv ?? '')
3
+ .split(',')
4
+ .map((r) => r.trim())
5
+ .filter((r) => r === 'admin' || r === 'developer' || r === 'product');
6
+ return roles.length > 0 ? [...new Set(roles)] : ['developer'];
7
+ }
8
+ function rowToInvitation(row) {
9
+ return {
10
+ id: row.id,
11
+ accountId: row.account_id,
12
+ email: row.email,
13
+ roles: parseRoles(row.roles),
14
+ tokenHash: row.token_hash,
15
+ invitedBy: row.invited_by,
16
+ status: row.status,
17
+ expiresAt: row.expires_at,
18
+ createdAt: row.created_at,
19
+ };
20
+ }
21
+ /** D1-backed store of account invitations (email-based org onboarding). */
22
+ export class D1AccountInvitationRepository {
23
+ db;
24
+ constructor({ db }) {
25
+ this.db = db;
26
+ }
27
+ async create(record) {
28
+ await this.db
29
+ .prepare(`INSERT INTO account_invitations
30
+ (id, account_id, email, roles, token_hash, invited_by, status, expires_at, created_at)
31
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`)
32
+ .bind(record.id, record.accountId, record.email, record.roles.join(','), record.tokenHash, record.invitedBy, record.status, record.expiresAt, record.createdAt)
33
+ .run();
34
+ }
35
+ async get(id) {
36
+ const row = await this.db
37
+ .prepare('SELECT * FROM account_invitations WHERE id = ?')
38
+ .bind(id)
39
+ .first();
40
+ return row ? rowToInvitation(row) : null;
41
+ }
42
+ async findByTokenHash(tokenHash) {
43
+ const row = await this.db
44
+ .prepare('SELECT * FROM account_invitations WHERE token_hash = ?')
45
+ .bind(tokenHash)
46
+ .first();
47
+ return row ? rowToInvitation(row) : null;
48
+ }
49
+ async listByAccount(accountId) {
50
+ const { results } = await this.db
51
+ .prepare('SELECT * FROM account_invitations WHERE account_id = ? ORDER BY created_at DESC')
52
+ .bind(accountId)
53
+ .all();
54
+ return results.map(rowToInvitation);
55
+ }
56
+ async setStatus(id, status) {
57
+ await this.db
58
+ .prepare('UPDATE account_invitations SET status = ? WHERE id = ?')
59
+ .bind(status, id)
60
+ .run();
61
+ }
62
+ }
63
+ //# sourceMappingURL=D1AccountInvitationRepository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"D1AccountInvitationRepository.js","sourceRoot":"","sources":["../../../src/infrastructure/repositories/D1AccountInvitationRepository.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,15 @@
1
+ import type { AccountRecord, AccountRepository, AccountSettingsPatch } from '@cat-factory/kernel';
2
+ import type { D1Database } from '@cloudflare/workers-types';
3
+ /** D1-backed store of accounts (the tenants that own workspaces; migration 0017). */
4
+ export declare class D1AccountRepository implements AccountRepository {
5
+ private readonly db;
6
+ constructor({ db }: {
7
+ db: D1Database;
8
+ });
9
+ get(id: string): Promise<AccountRecord | null>;
10
+ create(account: AccountRecord): Promise<void>;
11
+ rename(id: string, name: string): Promise<void>;
12
+ updateSettings(id: string, patch: AccountSettingsPatch): Promise<void>;
13
+ findPersonalByUser(userId: string): Promise<AccountRecord | null>;
14
+ }
15
+ //# sourceMappingURL=D1AccountRepository.d.ts.map