@urateam/core 0.1.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 (620) hide show
  1. package/dist/__tests__/assembler.test.d.ts +2 -0
  2. package/dist/__tests__/assembler.test.d.ts.map +1 -0
  3. package/dist/__tests__/assembler.test.js +63 -0
  4. package/dist/__tests__/assembler.test.js.map +1 -0
  5. package/dist/__tests__/auth-check.test.d.ts +2 -0
  6. package/dist/__tests__/auth-check.test.d.ts.map +1 -0
  7. package/dist/__tests__/auth-check.test.js +88 -0
  8. package/dist/__tests__/auth-check.test.js.map +1 -0
  9. package/dist/__tests__/auto-merge.test.d.ts +15 -0
  10. package/dist/__tests__/auto-merge.test.d.ts.map +1 -0
  11. package/dist/__tests__/auto-merge.test.js +428 -0
  12. package/dist/__tests__/auto-merge.test.js.map +1 -0
  13. package/dist/__tests__/bec89-unified-schema.test.d.ts +2 -0
  14. package/dist/__tests__/bec89-unified-schema.test.d.ts.map +1 -0
  15. package/dist/__tests__/bec89-unified-schema.test.js +235 -0
  16. package/dist/__tests__/bec89-unified-schema.test.js.map +1 -0
  17. package/dist/__tests__/conflict-detector.test.d.ts +2 -0
  18. package/dist/__tests__/conflict-detector.test.d.ts.map +1 -0
  19. package/dist/__tests__/conflict-detector.test.js +206 -0
  20. package/dist/__tests__/conflict-detector.test.js.map +1 -0
  21. package/dist/__tests__/coordination.test.d.ts +2 -0
  22. package/dist/__tests__/coordination.test.d.ts.map +1 -0
  23. package/dist/__tests__/coordination.test.js +257 -0
  24. package/dist/__tests__/coordination.test.js.map +1 -0
  25. package/dist/__tests__/db-postgres.test.d.ts +14 -0
  26. package/dist/__tests__/db-postgres.test.d.ts.map +1 -0
  27. package/dist/__tests__/db-postgres.test.js +289 -0
  28. package/dist/__tests__/db-postgres.test.js.map +1 -0
  29. package/dist/__tests__/db.test.d.ts +2 -0
  30. package/dist/__tests__/db.test.d.ts.map +1 -0
  31. package/dist/__tests__/db.test.js +182 -0
  32. package/dist/__tests__/db.test.js.map +1 -0
  33. package/dist/__tests__/deep-review.test.d.ts +2 -0
  34. package/dist/__tests__/deep-review.test.d.ts.map +1 -0
  35. package/dist/__tests__/deep-review.test.js +322 -0
  36. package/dist/__tests__/deep-review.test.js.map +1 -0
  37. package/dist/__tests__/devcontainer.test.d.ts +2 -0
  38. package/dist/__tests__/devcontainer.test.d.ts.map +1 -0
  39. package/dist/__tests__/devcontainer.test.js +89 -0
  40. package/dist/__tests__/devcontainer.test.js.map +1 -0
  41. package/dist/__tests__/distributed-lock.test.d.ts +18 -0
  42. package/dist/__tests__/distributed-lock.test.d.ts.map +1 -0
  43. package/dist/__tests__/distributed-lock.test.js +237 -0
  44. package/dist/__tests__/distributed-lock.test.js.map +1 -0
  45. package/dist/__tests__/e2e-pipeline.test.d.ts +25 -0
  46. package/dist/__tests__/e2e-pipeline.test.d.ts.map +1 -0
  47. package/dist/__tests__/e2e-pipeline.test.js +517 -0
  48. package/dist/__tests__/e2e-pipeline.test.js.map +1 -0
  49. package/dist/__tests__/error-classifier.test.d.ts +2 -0
  50. package/dist/__tests__/error-classifier.test.d.ts.map +1 -0
  51. package/dist/__tests__/error-classifier.test.js +33 -0
  52. package/dist/__tests__/error-classifier.test.js.map +1 -0
  53. package/dist/__tests__/executor-integration.test.d.ts +11 -0
  54. package/dist/__tests__/executor-integration.test.d.ts.map +1 -0
  55. package/dist/__tests__/executor-integration.test.js +246 -0
  56. package/dist/__tests__/executor-integration.test.js.map +1 -0
  57. package/dist/__tests__/executor-issue-id.test.d.ts +13 -0
  58. package/dist/__tests__/executor-issue-id.test.d.ts.map +1 -0
  59. package/dist/__tests__/executor-issue-id.test.js +211 -0
  60. package/dist/__tests__/executor-issue-id.test.js.map +1 -0
  61. package/dist/__tests__/executor.test.d.ts +2 -0
  62. package/dist/__tests__/executor.test.d.ts.map +1 -0
  63. package/dist/__tests__/executor.test.js +164 -0
  64. package/dist/__tests__/executor.test.js.map +1 -0
  65. package/dist/__tests__/extract-handoff.test.d.ts +2 -0
  66. package/dist/__tests__/extract-handoff.test.d.ts.map +1 -0
  67. package/dist/__tests__/extract-handoff.test.js +131 -0
  68. package/dist/__tests__/extract-handoff.test.js.map +1 -0
  69. package/dist/__tests__/fail-on-auto-commit.test.d.ts +2 -0
  70. package/dist/__tests__/fail-on-auto-commit.test.d.ts.map +1 -0
  71. package/dist/__tests__/fail-on-auto-commit.test.js +156 -0
  72. package/dist/__tests__/fail-on-auto-commit.test.js.map +1 -0
  73. package/dist/__tests__/fixtures/webhook-comment.json +5 -0
  74. package/dist/__tests__/fixtures/webhook-state-change.json +15 -0
  75. package/dist/__tests__/force-push-agent-branches.test.d.ts +12 -0
  76. package/dist/__tests__/force-push-agent-branches.test.d.ts.map +1 -0
  77. package/dist/__tests__/force-push-agent-branches.test.js +348 -0
  78. package/dist/__tests__/force-push-agent-branches.test.js.map +1 -0
  79. package/dist/__tests__/github-webhook.test.d.ts +2 -0
  80. package/dist/__tests__/github-webhook.test.d.ts.map +1 -0
  81. package/dist/__tests__/github-webhook.test.js +370 -0
  82. package/dist/__tests__/github-webhook.test.js.map +1 -0
  83. package/dist/__tests__/gitlab.test.d.ts +28 -0
  84. package/dist/__tests__/gitlab.test.d.ts.map +1 -0
  85. package/dist/__tests__/gitlab.test.js +241 -0
  86. package/dist/__tests__/gitlab.test.js.map +1 -0
  87. package/dist/__tests__/integration/auto-commit.test.d.ts +2 -0
  88. package/dist/__tests__/integration/auto-commit.test.d.ts.map +1 -0
  89. package/dist/__tests__/integration/auto-commit.test.js +207 -0
  90. package/dist/__tests__/integration/auto-commit.test.js.map +1 -0
  91. package/dist/__tests__/integration/bec99-cross-worktree-guard.test.d.ts +10 -0
  92. package/dist/__tests__/integration/bec99-cross-worktree-guard.test.d.ts.map +1 -0
  93. package/dist/__tests__/integration/bec99-cross-worktree-guard.test.js +183 -0
  94. package/dist/__tests__/integration/bec99-cross-worktree-guard.test.js.map +1 -0
  95. package/dist/__tests__/integration/reproduce-bec99.test.d.ts +32 -0
  96. package/dist/__tests__/integration/reproduce-bec99.test.d.ts.map +1 -0
  97. package/dist/__tests__/integration/reproduce-bec99.test.js +243 -0
  98. package/dist/__tests__/integration/reproduce-bec99.test.js.map +1 -0
  99. package/dist/__tests__/integration/vitest-changed.test.d.ts +10 -0
  100. package/dist/__tests__/integration/vitest-changed.test.d.ts.map +1 -0
  101. package/dist/__tests__/integration/vitest-changed.test.js +128 -0
  102. package/dist/__tests__/integration/vitest-changed.test.js.map +1 -0
  103. package/dist/__tests__/license.test.d.ts +2 -0
  104. package/dist/__tests__/license.test.d.ts.map +1 -0
  105. package/dist/__tests__/license.test.js +53 -0
  106. package/dist/__tests__/license.test.js.map +1 -0
  107. package/dist/__tests__/mcp-resolver.test.d.ts +2 -0
  108. package/dist/__tests__/mcp-resolver.test.d.ts.map +1 -0
  109. package/dist/__tests__/mcp-resolver.test.js +65 -0
  110. package/dist/__tests__/mcp-resolver.test.js.map +1 -0
  111. package/dist/__tests__/migrator.test.d.ts +2 -0
  112. package/dist/__tests__/migrator.test.d.ts.map +1 -0
  113. package/dist/__tests__/migrator.test.js +300 -0
  114. package/dist/__tests__/migrator.test.js.map +1 -0
  115. package/dist/__tests__/notifier-discord.test.d.ts +2 -0
  116. package/dist/__tests__/notifier-discord.test.d.ts.map +1 -0
  117. package/dist/__tests__/notifier-discord.test.js +166 -0
  118. package/dist/__tests__/notifier-discord.test.js.map +1 -0
  119. package/dist/__tests__/notifier-slack.test.d.ts +2 -0
  120. package/dist/__tests__/notifier-slack.test.d.ts.map +1 -0
  121. package/dist/__tests__/notifier-slack.test.js +157 -0
  122. package/dist/__tests__/notifier-slack.test.js.map +1 -0
  123. package/dist/__tests__/notifier.test.d.ts +2 -0
  124. package/dist/__tests__/notifier.test.d.ts.map +1 -0
  125. package/dist/__tests__/notifier.test.js +207 -0
  126. package/dist/__tests__/notifier.test.js.map +1 -0
  127. package/dist/__tests__/pipeline-config.test.d.ts +2 -0
  128. package/dist/__tests__/pipeline-config.test.d.ts.map +1 -0
  129. package/dist/__tests__/pipeline-config.test.js +143 -0
  130. package/dist/__tests__/pipeline-config.test.js.map +1 -0
  131. package/dist/__tests__/pipeline-runner.test.d.ts +2 -0
  132. package/dist/__tests__/pipeline-runner.test.d.ts.map +1 -0
  133. package/dist/__tests__/pipeline-runner.test.js +359 -0
  134. package/dist/__tests__/pipeline-runner.test.js.map +1 -0
  135. package/dist/__tests__/pm-approvals-n1.repro.test.d.ts +9 -0
  136. package/dist/__tests__/pm-approvals-n1.repro.test.d.ts.map +1 -0
  137. package/dist/__tests__/pm-approvals-n1.repro.test.js +175 -0
  138. package/dist/__tests__/pm-approvals-n1.repro.test.js.map +1 -0
  139. package/dist/__tests__/pm-approvals.test.d.ts +2 -0
  140. package/dist/__tests__/pm-approvals.test.d.ts.map +1 -0
  141. package/dist/__tests__/pm-approvals.test.js +162 -0
  142. package/dist/__tests__/pm-approvals.test.js.map +1 -0
  143. package/dist/__tests__/pm-budget.test.d.ts +2 -0
  144. package/dist/__tests__/pm-budget.test.d.ts.map +1 -0
  145. package/dist/__tests__/pm-budget.test.js +65 -0
  146. package/dist/__tests__/pm-budget.test.js.map +1 -0
  147. package/dist/__tests__/pm-conflict.test.d.ts +2 -0
  148. package/dist/__tests__/pm-conflict.test.d.ts.map +1 -0
  149. package/dist/__tests__/pm-conflict.test.js +87 -0
  150. package/dist/__tests__/pm-conflict.test.js.map +1 -0
  151. package/dist/__tests__/pm-promote.test.d.ts +2 -0
  152. package/dist/__tests__/pm-promote.test.d.ts.map +1 -0
  153. package/dist/__tests__/pm-promote.test.js +82 -0
  154. package/dist/__tests__/pm-promote.test.js.map +1 -0
  155. package/dist/__tests__/pm-recover.test.d.ts +2 -0
  156. package/dist/__tests__/pm-recover.test.d.ts.map +1 -0
  157. package/dist/__tests__/pm-recover.test.js +100 -0
  158. package/dist/__tests__/pm-recover.test.js.map +1 -0
  159. package/dist/__tests__/pm-scheduler.test.d.ts +2 -0
  160. package/dist/__tests__/pm-scheduler.test.d.ts.map +1 -0
  161. package/dist/__tests__/pm-scheduler.test.js +112 -0
  162. package/dist/__tests__/pm-scheduler.test.js.map +1 -0
  163. package/dist/__tests__/pm-slack-interface.test.d.ts +2 -0
  164. package/dist/__tests__/pm-slack-interface.test.d.ts.map +1 -0
  165. package/dist/__tests__/pm-slack-interface.test.js +372 -0
  166. package/dist/__tests__/pm-slack-interface.test.js.map +1 -0
  167. package/dist/__tests__/pm-slack.test.d.ts +2 -0
  168. package/dist/__tests__/pm-slack.test.d.ts.map +1 -0
  169. package/dist/__tests__/pm-slack.test.js +83 -0
  170. package/dist/__tests__/pm-slack.test.js.map +1 -0
  171. package/dist/__tests__/pm-triage.test.d.ts +2 -0
  172. package/dist/__tests__/pm-triage.test.d.ts.map +1 -0
  173. package/dist/__tests__/pm-triage.test.js +198 -0
  174. package/dist/__tests__/pm-triage.test.js.map +1 -0
  175. package/dist/__tests__/pm-types.test.d.ts +2 -0
  176. package/dist/__tests__/pm-types.test.d.ts.map +1 -0
  177. package/dist/__tests__/pm-types.test.js +76 -0
  178. package/dist/__tests__/pm-types.test.js.map +1 -0
  179. package/dist/__tests__/pr-automerge.test.d.ts +18 -0
  180. package/dist/__tests__/pr-automerge.test.d.ts.map +1 -0
  181. package/dist/__tests__/pr-automerge.test.js +645 -0
  182. package/dist/__tests__/pr-automerge.test.js.map +1 -0
  183. package/dist/__tests__/pr-description.test.d.ts +2 -0
  184. package/dist/__tests__/pr-description.test.d.ts.map +1 -0
  185. package/dist/__tests__/pr-description.test.js +728 -0
  186. package/dist/__tests__/pr-description.test.js.map +1 -0
  187. package/dist/__tests__/prompt-injection.test.d.ts +2 -0
  188. package/dist/__tests__/prompt-injection.test.d.ts.map +1 -0
  189. package/dist/__tests__/prompt-injection.test.js +446 -0
  190. package/dist/__tests__/prompt-injection.test.js.map +1 -0
  191. package/dist/__tests__/ralph-gate.test.d.ts +19 -0
  192. package/dist/__tests__/ralph-gate.test.d.ts.map +1 -0
  193. package/dist/__tests__/ralph-gate.test.js +593 -0
  194. package/dist/__tests__/ralph-gate.test.js.map +1 -0
  195. package/dist/__tests__/ralph-review-fix-regression.test.d.ts +18 -0
  196. package/dist/__tests__/ralph-review-fix-regression.test.d.ts.map +1 -0
  197. package/dist/__tests__/ralph-review-fix-regression.test.js +306 -0
  198. package/dist/__tests__/ralph-review-fix-regression.test.js.map +1 -0
  199. package/dist/__tests__/ralph.test.d.ts +2 -0
  200. package/dist/__tests__/ralph.test.d.ts.map +1 -0
  201. package/dist/__tests__/ralph.test.js +96 -0
  202. package/dist/__tests__/ralph.test.js.map +1 -0
  203. package/dist/__tests__/recover-stuck.test.d.ts +8 -0
  204. package/dist/__tests__/recover-stuck.test.d.ts.map +1 -0
  205. package/dist/__tests__/recover-stuck.test.js +399 -0
  206. package/dist/__tests__/recover-stuck.test.js.map +1 -0
  207. package/dist/__tests__/repo.test.d.ts +2 -0
  208. package/dist/__tests__/repo.test.d.ts.map +1 -0
  209. package/dist/__tests__/repo.test.js +295 -0
  210. package/dist/__tests__/repo.test.js.map +1 -0
  211. package/dist/__tests__/repro-bec58-n-plus-one.test.d.ts +2 -0
  212. package/dist/__tests__/repro-bec58-n-plus-one.test.d.ts.map +1 -0
  213. package/dist/__tests__/repro-bec58-n-plus-one.test.js +187 -0
  214. package/dist/__tests__/repro-bec58-n-plus-one.test.js.map +1 -0
  215. package/dist/__tests__/reproduce-bec113-pagination-warning.test.d.ts +16 -0
  216. package/dist/__tests__/reproduce-bec113-pagination-warning.test.d.ts.map +1 -0
  217. package/dist/__tests__/reproduce-bec113-pagination-warning.test.js +226 -0
  218. package/dist/__tests__/reproduce-bec113-pagination-warning.test.js.map +1 -0
  219. package/dist/__tests__/reproduce-bec43-updatedat.test.d.ts +2 -0
  220. package/dist/__tests__/reproduce-bec43-updatedat.test.d.ts.map +1 -0
  221. package/dist/__tests__/reproduce-bec43-updatedat.test.js +76 -0
  222. package/dist/__tests__/reproduce-bec43-updatedat.test.js.map +1 -0
  223. package/dist/__tests__/reproduce-bec48-distributed-race.test.d.ts +18 -0
  224. package/dist/__tests__/reproduce-bec48-distributed-race.test.d.ts.map +1 -0
  225. package/dist/__tests__/reproduce-bec48-distributed-race.test.js +178 -0
  226. package/dist/__tests__/reproduce-bec48-distributed-race.test.js.map +1 -0
  227. package/dist/__tests__/reproduce-bec62.test.d.ts +2 -0
  228. package/dist/__tests__/reproduce-bec62.test.d.ts.map +1 -0
  229. package/dist/__tests__/reproduce-bec62.test.js +86 -0
  230. package/dist/__tests__/reproduce-bec62.test.js.map +1 -0
  231. package/dist/__tests__/reproduce-bec91-stuck-in-progress.test.d.ts +13 -0
  232. package/dist/__tests__/reproduce-bec91-stuck-in-progress.test.d.ts.map +1 -0
  233. package/dist/__tests__/reproduce-bec91-stuck-in-progress.test.js +220 -0
  234. package/dist/__tests__/reproduce-bec91-stuck-in-progress.test.js.map +1 -0
  235. package/dist/__tests__/review-feedback.test.d.ts +2 -0
  236. package/dist/__tests__/review-feedback.test.d.ts.map +1 -0
  237. package/dist/__tests__/review-feedback.test.js +383 -0
  238. package/dist/__tests__/review-feedback.test.js.map +1 -0
  239. package/dist/__tests__/sanitizer.test.d.ts +2 -0
  240. package/dist/__tests__/sanitizer.test.d.ts.map +1 -0
  241. package/dist/__tests__/sanitizer.test.js +162 -0
  242. package/dist/__tests__/sanitizer.test.js.map +1 -0
  243. package/dist/__tests__/security.test.d.ts +2 -0
  244. package/dist/__tests__/security.test.d.ts.map +1 -0
  245. package/dist/__tests__/security.test.js +52 -0
  246. package/dist/__tests__/security.test.js.map +1 -0
  247. package/dist/__tests__/server.test.d.ts +2 -0
  248. package/dist/__tests__/server.test.d.ts.map +1 -0
  249. package/dist/__tests__/server.test.js +61 -0
  250. package/dist/__tests__/server.test.js.map +1 -0
  251. package/dist/__tests__/slack-alerts.test.d.ts +2 -0
  252. package/dist/__tests__/slack-alerts.test.d.ts.map +1 -0
  253. package/dist/__tests__/slack-alerts.test.js +214 -0
  254. package/dist/__tests__/slack-alerts.test.js.map +1 -0
  255. package/dist/__tests__/stage-models.test.d.ts +14 -0
  256. package/dist/__tests__/stage-models.test.d.ts.map +1 -0
  257. package/dist/__tests__/stage-models.test.js +244 -0
  258. package/dist/__tests__/stage-models.test.js.map +1 -0
  259. package/dist/__tests__/start-todo.test.d.ts +2 -0
  260. package/dist/__tests__/start-todo.test.d.ts.map +1 -0
  261. package/dist/__tests__/start-todo.test.js +175 -0
  262. package/dist/__tests__/start-todo.test.js.map +1 -0
  263. package/dist/__tests__/tech-stack.test.d.ts +2 -0
  264. package/dist/__tests__/tech-stack.test.d.ts.map +1 -0
  265. package/dist/__tests__/tech-stack.test.js +75 -0
  266. package/dist/__tests__/tech-stack.test.js.map +1 -0
  267. package/dist/__tests__/templates.test.d.ts +2 -0
  268. package/dist/__tests__/templates.test.d.ts.map +1 -0
  269. package/dist/__tests__/templates.test.js +161 -0
  270. package/dist/__tests__/templates.test.js.map +1 -0
  271. package/dist/__tests__/test-quality.test.d.ts +2 -0
  272. package/dist/__tests__/test-quality.test.d.ts.map +1 -0
  273. package/dist/__tests__/test-quality.test.js +329 -0
  274. package/dist/__tests__/test-quality.test.js.map +1 -0
  275. package/dist/__tests__/token-budget.test.d.ts +2 -0
  276. package/dist/__tests__/token-budget.test.d.ts.map +1 -0
  277. package/dist/__tests__/token-budget.test.js +198 -0
  278. package/dist/__tests__/token-budget.test.js.map +1 -0
  279. package/dist/__tests__/types.test.d.ts +2 -0
  280. package/dist/__tests__/types.test.d.ts.map +1 -0
  281. package/dist/__tests__/types.test.js +156 -0
  282. package/dist/__tests__/types.test.js.map +1 -0
  283. package/dist/__tests__/validate.test.d.ts +2 -0
  284. package/dist/__tests__/validate.test.d.ts.map +1 -0
  285. package/dist/__tests__/validate.test.js +128 -0
  286. package/dist/__tests__/validate.test.js.map +1 -0
  287. package/dist/__tests__/webhook-handler.test.d.ts +2 -0
  288. package/dist/__tests__/webhook-handler.test.d.ts.map +1 -0
  289. package/dist/__tests__/webhook-handler.test.js +286 -0
  290. package/dist/__tests__/webhook-handler.test.js.map +1 -0
  291. package/dist/__tests__/webhook.test.d.ts +2 -0
  292. package/dist/__tests__/webhook.test.d.ts.map +1 -0
  293. package/dist/__tests__/webhook.test.js +58 -0
  294. package/dist/__tests__/webhook.test.js.map +1 -0
  295. package/dist/db/client.d.ts +56 -0
  296. package/dist/db/client.d.ts.map +1 -0
  297. package/dist/db/client.js +201 -0
  298. package/dist/db/client.js.map +1 -0
  299. package/dist/db/index.d.ts +4 -0
  300. package/dist/db/index.d.ts.map +1 -0
  301. package/dist/db/index.js +4 -0
  302. package/dist/db/index.js.map +1 -0
  303. package/dist/db/migrations/postgres/001_initial_schema.sql +78 -0
  304. package/dist/db/migrations/postgres/002_pg_timestamps.sql +78 -0
  305. package/dist/db/migrations/postgres/003_retry_count.sql +10 -0
  306. package/dist/db/migrations/postgres/004_review_feedback.sql +20 -0
  307. package/dist/db/migrations/postgres/005_auto_merge.sql +15 -0
  308. package/dist/db/migrations/sqlite/001_initial_schema.sql +78 -0
  309. package/dist/db/migrations/sqlite/002_retry_count.sql +5 -0
  310. package/dist/db/migrations/sqlite/003_review_feedback.sql +7 -0
  311. package/dist/db/migrations/sqlite/004_auto_merge.sql +6 -0
  312. package/dist/db/migrator.d.ts +51 -0
  313. package/dist/db/migrator.d.ts.map +1 -0
  314. package/dist/db/migrator.js +188 -0
  315. package/dist/db/migrator.js.map +1 -0
  316. package/dist/db/schema.d.ts +1114 -0
  317. package/dist/db/schema.d.ts.map +1 -0
  318. package/dist/db/schema.js +129 -0
  319. package/dist/db/schema.js.map +1 -0
  320. package/dist/entrypoint.d.ts +2 -0
  321. package/dist/entrypoint.d.ts.map +1 -0
  322. package/dist/entrypoint.js +113 -0
  323. package/dist/entrypoint.js.map +1 -0
  324. package/dist/executor/agent-config.d.ts +10 -0
  325. package/dist/executor/agent-config.d.ts.map +1 -0
  326. package/dist/executor/agent-config.js +81 -0
  327. package/dist/executor/agent-config.js.map +1 -0
  328. package/dist/executor/agent-stream.d.ts +65 -0
  329. package/dist/executor/agent-stream.d.ts.map +1 -0
  330. package/dist/executor/agent-stream.js +101 -0
  331. package/dist/executor/agent-stream.js.map +1 -0
  332. package/dist/executor/auth-check.d.ts +10 -0
  333. package/dist/executor/auth-check.d.ts.map +1 -0
  334. package/dist/executor/auth-check.js +52 -0
  335. package/dist/executor/auth-check.js.map +1 -0
  336. package/dist/executor/deep-review.d.ts +61 -0
  337. package/dist/executor/deep-review.d.ts.map +1 -0
  338. package/dist/executor/deep-review.js +308 -0
  339. package/dist/executor/deep-review.js.map +1 -0
  340. package/dist/executor/executor.d.ts +27 -0
  341. package/dist/executor/executor.d.ts.map +1 -0
  342. package/dist/executor/executor.js +168 -0
  343. package/dist/executor/executor.js.map +1 -0
  344. package/dist/executor/extract-handoff.d.ts +14 -0
  345. package/dist/executor/extract-handoff.d.ts.map +1 -0
  346. package/dist/executor/extract-handoff.js +80 -0
  347. package/dist/executor/extract-handoff.js.map +1 -0
  348. package/dist/executor/handoff.d.ts +24 -0
  349. package/dist/executor/handoff.d.ts.map +1 -0
  350. package/dist/executor/handoff.js +63 -0
  351. package/dist/executor/handoff.js.map +1 -0
  352. package/dist/executor/index.d.ts +8 -0
  353. package/dist/executor/index.d.ts.map +1 -0
  354. package/dist/executor/index.js +8 -0
  355. package/dist/executor/index.js.map +1 -0
  356. package/dist/executor/mcp-resolver.d.ts +29 -0
  357. package/dist/executor/mcp-resolver.d.ts.map +1 -0
  358. package/dist/executor/mcp-resolver.js +80 -0
  359. package/dist/executor/mcp-resolver.js.map +1 -0
  360. package/dist/executor/permissions.d.ts +11 -0
  361. package/dist/executor/permissions.d.ts.map +1 -0
  362. package/dist/executor/permissions.js +32 -0
  363. package/dist/executor/permissions.js.map +1 -0
  364. package/dist/executor/profiles.d.ts +5 -0
  365. package/dist/executor/profiles.d.ts.map +1 -0
  366. package/dist/executor/profiles.js +35 -0
  367. package/dist/executor/profiles.js.map +1 -0
  368. package/dist/executor/prompt/assembler.d.ts +10 -0
  369. package/dist/executor/prompt/assembler.d.ts.map +1 -0
  370. package/dist/executor/prompt/assembler.js +28 -0
  371. package/dist/executor/prompt/assembler.js.map +1 -0
  372. package/dist/executor/prompt/index.d.ts +5 -0
  373. package/dist/executor/prompt/index.d.ts.map +1 -0
  374. package/dist/executor/prompt/index.js +5 -0
  375. package/dist/executor/prompt/index.js.map +1 -0
  376. package/dist/executor/prompt/sanitizer.d.ts +25 -0
  377. package/dist/executor/prompt/sanitizer.d.ts.map +1 -0
  378. package/dist/executor/prompt/sanitizer.js +81 -0
  379. package/dist/executor/prompt/sanitizer.js.map +1 -0
  380. package/dist/executor/prompt/schema-mapper.d.ts +7 -0
  381. package/dist/executor/prompt/schema-mapper.d.ts.map +1 -0
  382. package/dist/executor/prompt/schema-mapper.js +59 -0
  383. package/dist/executor/prompt/schema-mapper.js.map +1 -0
  384. package/dist/executor/prompt/templates.d.ts +31 -0
  385. package/dist/executor/prompt/templates.d.ts.map +1 -0
  386. package/dist/executor/prompt/templates.js +283 -0
  387. package/dist/executor/prompt/templates.js.map +1 -0
  388. package/dist/executor/ralph.d.ts +19 -0
  389. package/dist/executor/ralph.d.ts.map +1 -0
  390. package/dist/executor/ralph.js +112 -0
  391. package/dist/executor/ralph.js.map +1 -0
  392. package/dist/executor/test-quality.d.ts +117 -0
  393. package/dist/executor/test-quality.d.ts.map +1 -0
  394. package/dist/executor/test-quality.js +261 -0
  395. package/dist/executor/test-quality.js.map +1 -0
  396. package/dist/executor/validate.d.ts +15 -0
  397. package/dist/executor/validate.d.ts.map +1 -0
  398. package/dist/executor/validate.js +124 -0
  399. package/dist/executor/validate.js.map +1 -0
  400. package/dist/index.d.ts +29 -0
  401. package/dist/index.d.ts.map +1 -0
  402. package/dist/index.js +26 -0
  403. package/dist/index.js.map +1 -0
  404. package/dist/license.d.ts +18 -0
  405. package/dist/license.d.ts.map +1 -0
  406. package/dist/license.js +44 -0
  407. package/dist/license.js.map +1 -0
  408. package/dist/logger.d.ts +43 -0
  409. package/dist/logger.d.ts.map +1 -0
  410. package/dist/logger.js +91 -0
  411. package/dist/logger.js.map +1 -0
  412. package/dist/notifier/composite.d.ts +13 -0
  413. package/dist/notifier/composite.d.ts.map +1 -0
  414. package/dist/notifier/composite.js +28 -0
  415. package/dist/notifier/composite.js.map +1 -0
  416. package/dist/notifier/discord.d.ts +14 -0
  417. package/dist/notifier/discord.d.ts.map +1 -0
  418. package/dist/notifier/discord.js +105 -0
  419. package/dist/notifier/discord.js.map +1 -0
  420. package/dist/notifier/index.d.ts +6 -0
  421. package/dist/notifier/index.d.ts.map +1 -0
  422. package/dist/notifier/index.js +6 -0
  423. package/dist/notifier/index.js.map +1 -0
  424. package/dist/notifier/linear.d.ts +28 -0
  425. package/dist/notifier/linear.d.ts.map +1 -0
  426. package/dist/notifier/linear.js +138 -0
  427. package/dist/notifier/linear.js.map +1 -0
  428. package/dist/notifier/slack-alerts.d.ts +62 -0
  429. package/dist/notifier/slack-alerts.d.ts.map +1 -0
  430. package/dist/notifier/slack-alerts.js +184 -0
  431. package/dist/notifier/slack-alerts.js.map +1 -0
  432. package/dist/notifier/slack.d.ts +14 -0
  433. package/dist/notifier/slack.d.ts.map +1 -0
  434. package/dist/notifier/slack.js +146 -0
  435. package/dist/notifier/slack.js.map +1 -0
  436. package/dist/pipeline/automerge.d.ts +44 -0
  437. package/dist/pipeline/automerge.d.ts.map +1 -0
  438. package/dist/pipeline/automerge.js +135 -0
  439. package/dist/pipeline/automerge.js.map +1 -0
  440. package/dist/pipeline/config.d.ts +5 -0
  441. package/dist/pipeline/config.d.ts.map +1 -0
  442. package/dist/pipeline/config.js +68 -0
  443. package/dist/pipeline/config.js.map +1 -0
  444. package/dist/pipeline/distributed-lock.d.ts +50 -0
  445. package/dist/pipeline/distributed-lock.d.ts.map +1 -0
  446. package/dist/pipeline/distributed-lock.js +114 -0
  447. package/dist/pipeline/distributed-lock.js.map +1 -0
  448. package/dist/pipeline/error-classifier.d.ts +9 -0
  449. package/dist/pipeline/error-classifier.d.ts.map +1 -0
  450. package/dist/pipeline/error-classifier.js +25 -0
  451. package/dist/pipeline/error-classifier.js.map +1 -0
  452. package/dist/pipeline/index.d.ts +9 -0
  453. package/dist/pipeline/index.d.ts.map +1 -0
  454. package/dist/pipeline/index.js +9 -0
  455. package/dist/pipeline/index.js.map +1 -0
  456. package/dist/pipeline/pr-description.d.ts +35 -0
  457. package/dist/pipeline/pr-description.d.ts.map +1 -0
  458. package/dist/pipeline/pr-description.js +52 -0
  459. package/dist/pipeline/pr-description.js.map +1 -0
  460. package/dist/pipeline/queue.d.ts +7 -0
  461. package/dist/pipeline/queue.d.ts.map +1 -0
  462. package/dist/pipeline/queue.js +39 -0
  463. package/dist/pipeline/queue.js.map +1 -0
  464. package/dist/pipeline/router.d.ts +6 -0
  465. package/dist/pipeline/router.d.ts.map +1 -0
  466. package/dist/pipeline/router.js +19 -0
  467. package/dist/pipeline/router.js.map +1 -0
  468. package/dist/pipeline/runner.d.ts +142 -0
  469. package/dist/pipeline/runner.d.ts.map +1 -0
  470. package/dist/pipeline/runner.js +1848 -0
  471. package/dist/pipeline/runner.js.map +1 -0
  472. package/dist/pm/actions/approval-helpers.d.ts +11 -0
  473. package/dist/pm/actions/approval-helpers.d.ts.map +1 -0
  474. package/dist/pm/actions/approval-helpers.js +34 -0
  475. package/dist/pm/actions/approval-helpers.js.map +1 -0
  476. package/dist/pm/actions/cancel.d.ts +11 -0
  477. package/dist/pm/actions/cancel.d.ts.map +1 -0
  478. package/dist/pm/actions/cancel.js +68 -0
  479. package/dist/pm/actions/cancel.js.map +1 -0
  480. package/dist/pm/actions/deprioritize.d.ts +12 -0
  481. package/dist/pm/actions/deprioritize.d.ts.map +1 -0
  482. package/dist/pm/actions/deprioritize.js +55 -0
  483. package/dist/pm/actions/deprioritize.js.map +1 -0
  484. package/dist/pm/actions/promote.d.ts +11 -0
  485. package/dist/pm/actions/promote.d.ts.map +1 -0
  486. package/dist/pm/actions/promote.js +78 -0
  487. package/dist/pm/actions/promote.js.map +1 -0
  488. package/dist/pm/actions/recover-stuck.d.ts +42 -0
  489. package/dist/pm/actions/recover-stuck.d.ts.map +1 -0
  490. package/dist/pm/actions/recover-stuck.js +143 -0
  491. package/dist/pm/actions/recover-stuck.js.map +1 -0
  492. package/dist/pm/actions/recover.d.ts +18 -0
  493. package/dist/pm/actions/recover.d.ts.map +1 -0
  494. package/dist/pm/actions/recover.js +56 -0
  495. package/dist/pm/actions/recover.js.map +1 -0
  496. package/dist/pm/actions/resolve-approvals.d.ts +17 -0
  497. package/dist/pm/actions/resolve-approvals.d.ts.map +1 -0
  498. package/dist/pm/actions/resolve-approvals.js +92 -0
  499. package/dist/pm/actions/resolve-approvals.js.map +1 -0
  500. package/dist/pm/actions/start-todo.d.ts +28 -0
  501. package/dist/pm/actions/start-todo.d.ts.map +1 -0
  502. package/dist/pm/actions/start-todo.js +117 -0
  503. package/dist/pm/actions/start-todo.js.map +1 -0
  504. package/dist/pm/actions/triage.d.ts +13 -0
  505. package/dist/pm/actions/triage.d.ts.map +1 -0
  506. package/dist/pm/actions/triage.js +109 -0
  507. package/dist/pm/actions/triage.js.map +1 -0
  508. package/dist/pm/budget.d.ts +9 -0
  509. package/dist/pm/budget.d.ts.map +1 -0
  510. package/dist/pm/budget.js +62 -0
  511. package/dist/pm/budget.js.map +1 -0
  512. package/dist/pm/call-claude.d.ts +3 -0
  513. package/dist/pm/call-claude.d.ts.map +1 -0
  514. package/dist/pm/call-claude.js +37 -0
  515. package/dist/pm/call-claude.js.map +1 -0
  516. package/dist/pm/conflict-detector.d.ts +42 -0
  517. package/dist/pm/conflict-detector.d.ts.map +1 -0
  518. package/dist/pm/conflict-detector.js +116 -0
  519. package/dist/pm/conflict-detector.js.map +1 -0
  520. package/dist/pm/conflict.d.ts +20 -0
  521. package/dist/pm/conflict.d.ts.map +1 -0
  522. package/dist/pm/conflict.js +63 -0
  523. package/dist/pm/conflict.js.map +1 -0
  524. package/dist/pm/coordination.d.ts +50 -0
  525. package/dist/pm/coordination.d.ts.map +1 -0
  526. package/dist/pm/coordination.js +163 -0
  527. package/dist/pm/coordination.js.map +1 -0
  528. package/dist/pm/linear-helpers.d.ts +2 -0
  529. package/dist/pm/linear-helpers.d.ts.map +1 -0
  530. package/dist/pm/linear-helpers.js +16 -0
  531. package/dist/pm/linear-helpers.js.map +1 -0
  532. package/dist/pm/scheduler.d.ts +47 -0
  533. package/dist/pm/scheduler.d.ts.map +1 -0
  534. package/dist/pm/scheduler.js +346 -0
  535. package/dist/pm/scheduler.js.map +1 -0
  536. package/dist/pm/slack-helpers.d.ts +2 -0
  537. package/dist/pm/slack-helpers.d.ts.map +1 -0
  538. package/dist/pm/slack-helpers.js +24 -0
  539. package/dist/pm/slack-helpers.js.map +1 -0
  540. package/dist/pm/slack-interface.d.ts +133 -0
  541. package/dist/pm/slack-interface.d.ts.map +1 -0
  542. package/dist/pm/slack-interface.js +641 -0
  543. package/dist/pm/slack-interface.js.map +1 -0
  544. package/dist/pm/slack.d.ts +18 -0
  545. package/dist/pm/slack.d.ts.map +1 -0
  546. package/dist/pm/slack.js +144 -0
  547. package/dist/pm/slack.js.map +1 -0
  548. package/dist/pm/types.d.ts +99 -0
  549. package/dist/pm/types.d.ts.map +1 -0
  550. package/dist/pm/types.js +17 -0
  551. package/dist/pm/types.js.map +1 -0
  552. package/dist/repo/config.d.ts +35 -0
  553. package/dist/repo/config.d.ts.map +1 -0
  554. package/dist/repo/config.js +72 -0
  555. package/dist/repo/config.js.map +1 -0
  556. package/dist/repo/devcontainer.d.ts +33 -0
  557. package/dist/repo/devcontainer.d.ts.map +1 -0
  558. package/dist/repo/devcontainer.js +90 -0
  559. package/dist/repo/devcontainer.js.map +1 -0
  560. package/dist/repo/git.d.ts +185 -0
  561. package/dist/repo/git.d.ts.map +1 -0
  562. package/dist/repo/git.js +586 -0
  563. package/dist/repo/git.js.map +1 -0
  564. package/dist/repo/github.d.ts +56 -0
  565. package/dist/repo/github.d.ts.map +1 -0
  566. package/dist/repo/github.js +164 -0
  567. package/dist/repo/github.js.map +1 -0
  568. package/dist/repo/gitlab.d.ts +47 -0
  569. package/dist/repo/gitlab.d.ts.map +1 -0
  570. package/dist/repo/gitlab.js +91 -0
  571. package/dist/repo/gitlab.js.map +1 -0
  572. package/dist/repo/index.d.ts +7 -0
  573. package/dist/repo/index.d.ts.map +1 -0
  574. package/dist/repo/index.js +5 -0
  575. package/dist/repo/index.js.map +1 -0
  576. package/dist/repo/tech-stack.d.ts +13 -0
  577. package/dist/repo/tech-stack.d.ts.map +1 -0
  578. package/dist/repo/tech-stack.js +112 -0
  579. package/dist/repo/tech-stack.js.map +1 -0
  580. package/dist/security/index.d.ts +3 -0
  581. package/dist/security/index.d.ts.map +1 -0
  582. package/dist/security/index.js +3 -0
  583. package/dist/security/index.js.map +1 -0
  584. package/dist/security/review-checklist.d.ts +9 -0
  585. package/dist/security/review-checklist.d.ts.map +1 -0
  586. package/dist/security/review-checklist.js +46 -0
  587. package/dist/security/review-checklist.js.map +1 -0
  588. package/dist/security/sandbox.d.ts +7 -0
  589. package/dist/security/sandbox.d.ts.map +1 -0
  590. package/dist/security/sandbox.js +31 -0
  591. package/dist/security/sandbox.js.map +1 -0
  592. package/dist/server.d.ts +48 -0
  593. package/dist/server.d.ts.map +1 -0
  594. package/dist/server.js +90 -0
  595. package/dist/server.js.map +1 -0
  596. package/dist/types.d.ts +1230 -0
  597. package/dist/types.d.ts.map +1 -0
  598. package/dist/types.js +225 -0
  599. package/dist/types.js.map +1 -0
  600. package/dist/webhook/github-handler.d.ts +39 -0
  601. package/dist/webhook/github-handler.d.ts.map +1 -0
  602. package/dist/webhook/github-handler.js +439 -0
  603. package/dist/webhook/github-handler.js.map +1 -0
  604. package/dist/webhook/handler.d.ts +16 -0
  605. package/dist/webhook/handler.d.ts.map +1 -0
  606. package/dist/webhook/handler.js +171 -0
  607. package/dist/webhook/handler.js.map +1 -0
  608. package/dist/webhook/index.d.ts +5 -0
  609. package/dist/webhook/index.d.ts.map +1 -0
  610. package/dist/webhook/index.js +5 -0
  611. package/dist/webhook/index.js.map +1 -0
  612. package/dist/webhook/parser.d.ts +18 -0
  613. package/dist/webhook/parser.d.ts.map +1 -0
  614. package/dist/webhook/parser.js +30 -0
  615. package/dist/webhook/parser.js.map +1 -0
  616. package/dist/webhook/signature.d.ts +2 -0
  617. package/dist/webhook/signature.d.ts.map +1 -0
  618. package/dist/webhook/signature.js +14 -0
  619. package/dist/webhook/signature.js.map +1 -0
  620. package/package.json +40 -0
@@ -0,0 +1,1230 @@
1
+ import { z } from "zod";
2
+ export declare const StageTypeSchema: z.ZodEnum<["triage", "await-approval", "reproduce", "implement", "test", "review"]>;
3
+ export type StageType = z.infer<typeof StageTypeSchema>;
4
+ export declare const AGENT_STAGES: StageType[];
5
+ export declare const RetryStrategySchema: z.ZodEnum<["fix-and-retry", "escalate", "fail-fast"]>;
6
+ export type RetryStrategy = z.infer<typeof RetryStrategySchema>;
7
+ export declare const RetryConfigSchema: z.ZodObject<{
8
+ maxAttempts: z.ZodNumber;
9
+ strategy: z.ZodEnum<["fix-and-retry", "escalate", "fail-fast"]>;
10
+ }, "strip", z.ZodTypeAny, {
11
+ maxAttempts: number;
12
+ strategy: "fix-and-retry" | "escalate" | "fail-fast";
13
+ }, {
14
+ maxAttempts: number;
15
+ strategy: "fix-and-retry" | "escalate" | "fail-fast";
16
+ }>;
17
+ export type RetryConfig = z.infer<typeof RetryConfigSchema>;
18
+ export declare const ReviewConfigSchema: z.ZodObject<{
19
+ requiredApprovals: z.ZodNumber;
20
+ }, "strip", z.ZodTypeAny, {
21
+ requiredApprovals: number;
22
+ }, {
23
+ requiredApprovals: number;
24
+ }>;
25
+ export type ReviewConfig = z.infer<typeof ReviewConfigSchema>;
26
+ export declare const PipelineConfigSchema: z.ZodObject<{
27
+ name: z.ZodString;
28
+ stages: z.ZodArray<z.ZodEnum<["triage", "await-approval", "reproduce", "implement", "test", "review"]>, "many">;
29
+ retry: z.ZodObject<{
30
+ maxAttempts: z.ZodNumber;
31
+ strategy: z.ZodEnum<["fix-and-retry", "escalate", "fail-fast"]>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ maxAttempts: number;
34
+ strategy: "fix-and-retry" | "escalate" | "fail-fast";
35
+ }, {
36
+ maxAttempts: number;
37
+ strategy: "fix-and-retry" | "escalate" | "fail-fast";
38
+ }>;
39
+ review: z.ZodObject<{
40
+ requiredApprovals: z.ZodNumber;
41
+ }, "strip", z.ZodTypeAny, {
42
+ requiredApprovals: number;
43
+ }, {
44
+ requiredApprovals: number;
45
+ }>;
46
+ prStrategy: z.ZodEnum<["draft", "ready"]>;
47
+ /** Run a lightweight validation agent after each stage to verify handoff accuracy.
48
+ * Default: false. Set to true to opt in (adds ~15-20K tokens per run). */
49
+ validateHandoffs: z.ZodOptional<z.ZodBoolean>;
50
+ /** RALPH loop iterations for the implement stage. 0 disables. Default: 1.
51
+ * Set to 2 for more thorough requirements checking (adds ~100-200K tokens per iteration). */
52
+ ralphIterations: z.ZodOptional<z.ZodNumber>;
53
+ /** Review-fix loop iterations. When review finds blocking issues, re-run implement→test→review.
54
+ * Default: 1, 0 disables. WARNING: compounds with ralphIterations — worst case is
55
+ * reviewFixIterations × (1 + ralphIterations) implement runs per fix cycle.
56
+ * Set to 2 for an extra fix pass (adds ~150-300K tokens per iteration). */
57
+ reviewFixIterations: z.ZodOptional<z.ZodNumber>;
58
+ /** Deep review passes using 3 parallel sub-agents (reuse, quality, efficiency).
59
+ * Runs after the review-fix loop resolves blocking findings. Default: 0 (disabled).
60
+ * Set to 1 to opt in for critical pipelines (adds ~45-100K tokens per pass). */
61
+ deepReviewPasses: z.ZodOptional<z.ZodNumber>;
62
+ /** Hard cap on deep review passes. Prevents infinite loops. Default: 3. */
63
+ maxDeepReviewPasses: z.ZodOptional<z.ZodNumber>;
64
+ /** Auto-merge PRs when changes are trivial. Default: false (opt-in). */
65
+ autoMerge: z.ZodOptional<z.ZodBoolean>;
66
+ /** Max diff lines for auto-merge eligibility. Default: 200. */
67
+ autoMergeMaxLines: z.ZodOptional<z.ZodNumber>;
68
+ /** File glob patterns that require manual review (skip auto-merge if any changed file matches).
69
+ * Example: ["**\/migrations\/**", "**\/*.env", "infra\/**"] */
70
+ autoMergeExcludePatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
71
+ /**
72
+ * Advanced automerge criteria evaluated when GitHub sends a PR event (check_suite.completed,
73
+ * status, pull_request.labeled, etc.). All criteria must pass for the PR to be merged.
74
+ * Requires GitHub App credentials (github config in ServerConfig).
75
+ */
76
+ autoMergeConfig: z.ZodOptional<z.ZodObject<{
77
+ /** Minimum number of unique approving reviews required. Default: 0. */
78
+ minimumApprovingReviews: z.ZodOptional<z.ZodNumber>;
79
+ /** Status check context names (or check run names) that must all report "success".
80
+ * Example: ["ci/tests", "security/snyk"] */
81
+ requiredStatusChecks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
82
+ /** Labels the PR must carry — all listed labels must be present. Default: [] */
83
+ requiredLabels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
84
+ /** Allowed base branches for auto-merge. If empty, any base branch is allowed. */
85
+ allowedBranches: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
86
+ /** Merge method to use when merging the PR. Default: "squash". */
87
+ mergeMethod: z.ZodOptional<z.ZodEnum<["merge", "squash", "rebase"]>>;
88
+ }, "strip", z.ZodTypeAny, {
89
+ minimumApprovingReviews?: number | undefined;
90
+ requiredStatusChecks?: string[] | undefined;
91
+ requiredLabels?: string[] | undefined;
92
+ allowedBranches?: string[] | undefined;
93
+ mergeMethod?: "merge" | "squash" | "rebase" | undefined;
94
+ }, {
95
+ minimumApprovingReviews?: number | undefined;
96
+ requiredStatusChecks?: string[] | undefined;
97
+ requiredLabels?: string[] | undefined;
98
+ allowedBranches?: string[] | undefined;
99
+ mergeMethod?: "merge" | "squash" | "rebase" | undefined;
100
+ }>>;
101
+ /** Maximum total tokens (input + output) allowed per pipeline run. Exceeding this aborts the run. */
102
+ maxTokens: z.ZodOptional<z.ZodNumber>;
103
+ /** Per-stage model overrides. Keys are stage names; values are model strings passed to the Agent SDK.
104
+ * Invalid model strings are passed through as-is (let the SDK error, no local validation).
105
+ * Example: { implement: "claude-opus-4-6", test: "claude-haiku-4-5" } */
106
+ stageModels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
107
+ /** Fail the pipeline run if the agent did not commit its work and auto-commit was triggered.
108
+ * When false (default), auto-commit is a silent safety net and the run continues normally.
109
+ * When true, triggering auto-commit is treated as a pipeline error so the issue surfaces immediately. */
110
+ failOnAutoCommit: z.ZodOptional<z.ZodBoolean>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ review: {
113
+ requiredApprovals: number;
114
+ };
115
+ name: string;
116
+ stages: ("triage" | "await-approval" | "reproduce" | "implement" | "test" | "review")[];
117
+ retry: {
118
+ maxAttempts: number;
119
+ strategy: "fix-and-retry" | "escalate" | "fail-fast";
120
+ };
121
+ prStrategy: "draft" | "ready";
122
+ validateHandoffs?: boolean | undefined;
123
+ ralphIterations?: number | undefined;
124
+ reviewFixIterations?: number | undefined;
125
+ deepReviewPasses?: number | undefined;
126
+ maxDeepReviewPasses?: number | undefined;
127
+ autoMerge?: boolean | undefined;
128
+ autoMergeMaxLines?: number | undefined;
129
+ autoMergeExcludePatterns?: string[] | undefined;
130
+ autoMergeConfig?: {
131
+ minimumApprovingReviews?: number | undefined;
132
+ requiredStatusChecks?: string[] | undefined;
133
+ requiredLabels?: string[] | undefined;
134
+ allowedBranches?: string[] | undefined;
135
+ mergeMethod?: "merge" | "squash" | "rebase" | undefined;
136
+ } | undefined;
137
+ maxTokens?: number | undefined;
138
+ stageModels?: Record<string, string> | undefined;
139
+ failOnAutoCommit?: boolean | undefined;
140
+ }, {
141
+ review: {
142
+ requiredApprovals: number;
143
+ };
144
+ name: string;
145
+ stages: ("triage" | "await-approval" | "reproduce" | "implement" | "test" | "review")[];
146
+ retry: {
147
+ maxAttempts: number;
148
+ strategy: "fix-and-retry" | "escalate" | "fail-fast";
149
+ };
150
+ prStrategy: "draft" | "ready";
151
+ validateHandoffs?: boolean | undefined;
152
+ ralphIterations?: number | undefined;
153
+ reviewFixIterations?: number | undefined;
154
+ deepReviewPasses?: number | undefined;
155
+ maxDeepReviewPasses?: number | undefined;
156
+ autoMerge?: boolean | undefined;
157
+ autoMergeMaxLines?: number | undefined;
158
+ autoMergeExcludePatterns?: string[] | undefined;
159
+ autoMergeConfig?: {
160
+ minimumApprovingReviews?: number | undefined;
161
+ requiredStatusChecks?: string[] | undefined;
162
+ requiredLabels?: string[] | undefined;
163
+ allowedBranches?: string[] | undefined;
164
+ mergeMethod?: "merge" | "squash" | "rebase" | undefined;
165
+ } | undefined;
166
+ maxTokens?: number | undefined;
167
+ stageModels?: Record<string, string> | undefined;
168
+ failOnAutoCommit?: boolean | undefined;
169
+ }>;
170
+ export type PipelineConfig = z.infer<typeof PipelineConfigSchema>;
171
+ export declare const TriggerMapSchema: z.ZodObject<{
172
+ start: z.ZodString;
173
+ resume: z.ZodString;
174
+ pause: z.ZodString;
175
+ abort: z.ZodString;
176
+ }, "strip", z.ZodTypeAny, {
177
+ start: string;
178
+ resume: string;
179
+ pause: string;
180
+ abort: string;
181
+ }, {
182
+ start: string;
183
+ resume: string;
184
+ pause: string;
185
+ abort: string;
186
+ }>;
187
+ export type TriggerMap = z.infer<typeof TriggerMapSchema>;
188
+ export declare const DEFAULT_TRIGGER_MAP: TriggerMap;
189
+ export declare const SetupCommandSchema: z.ZodArray<z.ZodString, "many">;
190
+ export type SetupCommand = z.infer<typeof SetupCommandSchema>;
191
+ export declare const McpServerEntrySchema: z.ZodObject<{
192
+ command: z.ZodString;
193
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
194
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
195
+ }, "strip", z.ZodTypeAny, {
196
+ command: string;
197
+ args?: string[] | undefined;
198
+ env?: Record<string, string> | undefined;
199
+ }, {
200
+ command: string;
201
+ args?: string[] | undefined;
202
+ env?: Record<string, string> | undefined;
203
+ }>;
204
+ export declare const PluginEntrySchema: z.ZodObject<{
205
+ type: z.ZodLiteral<"local">;
206
+ path: z.ZodString;
207
+ }, "strip", z.ZodTypeAny, {
208
+ path: string;
209
+ type: "local";
210
+ }, {
211
+ path: string;
212
+ type: "local";
213
+ }>;
214
+ export declare const PluginConfigSchema: z.ZodObject<{
215
+ /** Explicit MCP servers to always include */
216
+ mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
217
+ command: z.ZodString;
218
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
219
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
220
+ }, "strip", z.ZodTypeAny, {
221
+ command: string;
222
+ args?: string[] | undefined;
223
+ env?: Record<string, string> | undefined;
224
+ }, {
225
+ command: string;
226
+ args?: string[] | undefined;
227
+ env?: Record<string, string> | undefined;
228
+ }>>>;
229
+ /** MCP server names to never include */
230
+ excludeMcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
231
+ /** Explicit plugins to always include */
232
+ plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
233
+ type: z.ZodLiteral<"local">;
234
+ path: z.ZodString;
235
+ }, "strip", z.ZodTypeAny, {
236
+ path: string;
237
+ type: "local";
238
+ }, {
239
+ path: string;
240
+ type: "local";
241
+ }>, "many">>;
242
+ /** Plugin paths to never include */
243
+ excludePlugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
244
+ /** Set to false to disable auto-detection of plugins/MCP servers */
245
+ autoDetect: z.ZodOptional<z.ZodBoolean>;
246
+ }, "strip", z.ZodTypeAny, {
247
+ mcpServers?: Record<string, {
248
+ command: string;
249
+ args?: string[] | undefined;
250
+ env?: Record<string, string> | undefined;
251
+ }> | undefined;
252
+ excludeMcpServers?: string[] | undefined;
253
+ plugins?: {
254
+ path: string;
255
+ type: "local";
256
+ }[] | undefined;
257
+ excludePlugins?: string[] | undefined;
258
+ autoDetect?: boolean | undefined;
259
+ }, {
260
+ mcpServers?: Record<string, {
261
+ command: string;
262
+ args?: string[] | undefined;
263
+ env?: Record<string, string> | undefined;
264
+ }> | undefined;
265
+ excludeMcpServers?: string[] | undefined;
266
+ plugins?: {
267
+ path: string;
268
+ type: "local";
269
+ }[] | undefined;
270
+ excludePlugins?: string[] | undefined;
271
+ autoDetect?: boolean | undefined;
272
+ }>;
273
+ export type PluginConfig = z.infer<typeof PluginConfigSchema>;
274
+ export declare const DevcontainerConfigSchema: z.ZodObject<{
275
+ /** Enable devcontainer usage. Default: "auto" (use if .devcontainer exists) */
276
+ mode: z.ZodOptional<z.ZodEnum<["auto", "always", "never"]>>;
277
+ /** Override path to devcontainer config */
278
+ configPath: z.ZodOptional<z.ZodString>;
279
+ /** Extra environment variables for the container */
280
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ env?: Record<string, string> | undefined;
283
+ mode?: "never" | "auto" | "always" | undefined;
284
+ configPath?: string | undefined;
285
+ }, {
286
+ env?: Record<string, string> | undefined;
287
+ mode?: "never" | "auto" | "always" | undefined;
288
+ configPath?: string | undefined;
289
+ }>;
290
+ export type DevcontainerConfig = z.infer<typeof DevcontainerConfigSchema>;
291
+ export declare const GitHubFeedbackConfigSchema: z.ZodObject<{
292
+ /**
293
+ * GitHub logins allowed to trigger feedback runs.
294
+ * If empty/omitted, any reviewer can trigger.
295
+ */
296
+ allowedReviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
297
+ /**
298
+ * GitHub logins that should never trigger feedback runs (e.g. the bot itself).
299
+ */
300
+ botLogins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
301
+ /**
302
+ * If provided, only comments containing this keyword trigger a feedback run.
303
+ * When omitted and autoTrigger is true (the default), any qualifying comment triggers.
304
+ * Example: "@agent fix this"
305
+ */
306
+ triggerKeyword: z.ZodOptional<z.ZodString>;
307
+ /**
308
+ * If true (default), any qualifying review comment automatically triggers a feedback run.
309
+ * Set to false to require the triggerKeyword to be present.
310
+ */
311
+ autoTrigger: z.ZodOptional<z.ZodBoolean>;
312
+ /**
313
+ * If true, re-request review on the PR after the feedback run pushes changes.
314
+ * Requires GitHub App credentials in server config. Default: false.
315
+ */
316
+ rerequestReview: z.ZodOptional<z.ZodBoolean>;
317
+ }, "strip", z.ZodTypeAny, {
318
+ allowedReviewers?: string[] | undefined;
319
+ botLogins?: string[] | undefined;
320
+ triggerKeyword?: string | undefined;
321
+ autoTrigger?: boolean | undefined;
322
+ rerequestReview?: boolean | undefined;
323
+ }, {
324
+ allowedReviewers?: string[] | undefined;
325
+ botLogins?: string[] | undefined;
326
+ triggerKeyword?: string | undefined;
327
+ autoTrigger?: boolean | undefined;
328
+ rerequestReview?: boolean | undefined;
329
+ }>;
330
+ export type GitHubFeedbackConfig = z.infer<typeof GitHubFeedbackConfigSchema>;
331
+ export declare const RepoConfigSchema: z.ZodObject<{
332
+ url: z.ZodString;
333
+ defaultBranch: z.ZodString;
334
+ testCommand: z.ZodString;
335
+ buildCommand: z.ZodString;
336
+ setupCommands: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodString, "many">, "many">>;
337
+ workingDirectory: z.ZodOptional<z.ZodString>;
338
+ plugins: z.ZodOptional<z.ZodObject<{
339
+ /** Explicit MCP servers to always include */
340
+ mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
341
+ command: z.ZodString;
342
+ args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
343
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
344
+ }, "strip", z.ZodTypeAny, {
345
+ command: string;
346
+ args?: string[] | undefined;
347
+ env?: Record<string, string> | undefined;
348
+ }, {
349
+ command: string;
350
+ args?: string[] | undefined;
351
+ env?: Record<string, string> | undefined;
352
+ }>>>;
353
+ /** MCP server names to never include */
354
+ excludeMcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
355
+ /** Explicit plugins to always include */
356
+ plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
357
+ type: z.ZodLiteral<"local">;
358
+ path: z.ZodString;
359
+ }, "strip", z.ZodTypeAny, {
360
+ path: string;
361
+ type: "local";
362
+ }, {
363
+ path: string;
364
+ type: "local";
365
+ }>, "many">>;
366
+ /** Plugin paths to never include */
367
+ excludePlugins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
368
+ /** Set to false to disable auto-detection of plugins/MCP servers */
369
+ autoDetect: z.ZodOptional<z.ZodBoolean>;
370
+ }, "strip", z.ZodTypeAny, {
371
+ mcpServers?: Record<string, {
372
+ command: string;
373
+ args?: string[] | undefined;
374
+ env?: Record<string, string> | undefined;
375
+ }> | undefined;
376
+ excludeMcpServers?: string[] | undefined;
377
+ plugins?: {
378
+ path: string;
379
+ type: "local";
380
+ }[] | undefined;
381
+ excludePlugins?: string[] | undefined;
382
+ autoDetect?: boolean | undefined;
383
+ }, {
384
+ mcpServers?: Record<string, {
385
+ command: string;
386
+ args?: string[] | undefined;
387
+ env?: Record<string, string> | undefined;
388
+ }> | undefined;
389
+ excludeMcpServers?: string[] | undefined;
390
+ plugins?: {
391
+ path: string;
392
+ type: "local";
393
+ }[] | undefined;
394
+ excludePlugins?: string[] | undefined;
395
+ autoDetect?: boolean | undefined;
396
+ }>>;
397
+ devcontainer: z.ZodOptional<z.ZodObject<{
398
+ /** Enable devcontainer usage. Default: "auto" (use if .devcontainer exists) */
399
+ mode: z.ZodOptional<z.ZodEnum<["auto", "always", "never"]>>;
400
+ /** Override path to devcontainer config */
401
+ configPath: z.ZodOptional<z.ZodString>;
402
+ /** Extra environment variables for the container */
403
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
404
+ }, "strip", z.ZodTypeAny, {
405
+ env?: Record<string, string> | undefined;
406
+ mode?: "never" | "auto" | "always" | undefined;
407
+ configPath?: string | undefined;
408
+ }, {
409
+ env?: Record<string, string> | undefined;
410
+ mode?: "never" | "auto" | "always" | undefined;
411
+ configPath?: string | undefined;
412
+ }>>;
413
+ /** Per-team trigger map. Overrides the global triggerMap for this team's repo. Falls back to DEFAULT_TRIGGER_MAP. */
414
+ triggerMap: z.ZodOptional<z.ZodObject<{
415
+ start: z.ZodString;
416
+ resume: z.ZodString;
417
+ pause: z.ZodString;
418
+ abort: z.ZodString;
419
+ }, "strip", z.ZodTypeAny, {
420
+ start: string;
421
+ resume: string;
422
+ pause: string;
423
+ abort: string;
424
+ }, {
425
+ start: string;
426
+ resume: string;
427
+ pause: string;
428
+ abort: string;
429
+ }>>;
430
+ /** Hosting provider. Defaults to "github". Set to "gitlab" for GitLab repos. */
431
+ provider: z.ZodOptional<z.ZodEnum<["github", "gitlab"]>>;
432
+ /** Configuration for GitHub PR review comment → pipeline re-entry (feedback runs). */
433
+ githubFeedback: z.ZodOptional<z.ZodObject<{
434
+ /**
435
+ * GitHub logins allowed to trigger feedback runs.
436
+ * If empty/omitted, any reviewer can trigger.
437
+ */
438
+ allowedReviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
439
+ /**
440
+ * GitHub logins that should never trigger feedback runs (e.g. the bot itself).
441
+ */
442
+ botLogins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
443
+ /**
444
+ * If provided, only comments containing this keyword trigger a feedback run.
445
+ * When omitted and autoTrigger is true (the default), any qualifying comment triggers.
446
+ * Example: "@agent fix this"
447
+ */
448
+ triggerKeyword: z.ZodOptional<z.ZodString>;
449
+ /**
450
+ * If true (default), any qualifying review comment automatically triggers a feedback run.
451
+ * Set to false to require the triggerKeyword to be present.
452
+ */
453
+ autoTrigger: z.ZodOptional<z.ZodBoolean>;
454
+ /**
455
+ * If true, re-request review on the PR after the feedback run pushes changes.
456
+ * Requires GitHub App credentials in server config. Default: false.
457
+ */
458
+ rerequestReview: z.ZodOptional<z.ZodBoolean>;
459
+ }, "strip", z.ZodTypeAny, {
460
+ allowedReviewers?: string[] | undefined;
461
+ botLogins?: string[] | undefined;
462
+ triggerKeyword?: string | undefined;
463
+ autoTrigger?: boolean | undefined;
464
+ rerequestReview?: boolean | undefined;
465
+ }, {
466
+ allowedReviewers?: string[] | undefined;
467
+ botLogins?: string[] | undefined;
468
+ triggerKeyword?: string | undefined;
469
+ autoTrigger?: boolean | undefined;
470
+ rerequestReview?: boolean | undefined;
471
+ }>>;
472
+ }, "strip", z.ZodTypeAny, {
473
+ url: string;
474
+ defaultBranch: string;
475
+ testCommand: string;
476
+ buildCommand: string;
477
+ plugins?: {
478
+ mcpServers?: Record<string, {
479
+ command: string;
480
+ args?: string[] | undefined;
481
+ env?: Record<string, string> | undefined;
482
+ }> | undefined;
483
+ excludeMcpServers?: string[] | undefined;
484
+ plugins?: {
485
+ path: string;
486
+ type: "local";
487
+ }[] | undefined;
488
+ excludePlugins?: string[] | undefined;
489
+ autoDetect?: boolean | undefined;
490
+ } | undefined;
491
+ setupCommands?: string[][] | undefined;
492
+ workingDirectory?: string | undefined;
493
+ devcontainer?: {
494
+ env?: Record<string, string> | undefined;
495
+ mode?: "never" | "auto" | "always" | undefined;
496
+ configPath?: string | undefined;
497
+ } | undefined;
498
+ triggerMap?: {
499
+ start: string;
500
+ resume: string;
501
+ pause: string;
502
+ abort: string;
503
+ } | undefined;
504
+ provider?: "github" | "gitlab" | undefined;
505
+ githubFeedback?: {
506
+ allowedReviewers?: string[] | undefined;
507
+ botLogins?: string[] | undefined;
508
+ triggerKeyword?: string | undefined;
509
+ autoTrigger?: boolean | undefined;
510
+ rerequestReview?: boolean | undefined;
511
+ } | undefined;
512
+ }, {
513
+ url: string;
514
+ defaultBranch: string;
515
+ testCommand: string;
516
+ buildCommand: string;
517
+ plugins?: {
518
+ mcpServers?: Record<string, {
519
+ command: string;
520
+ args?: string[] | undefined;
521
+ env?: Record<string, string> | undefined;
522
+ }> | undefined;
523
+ excludeMcpServers?: string[] | undefined;
524
+ plugins?: {
525
+ path: string;
526
+ type: "local";
527
+ }[] | undefined;
528
+ excludePlugins?: string[] | undefined;
529
+ autoDetect?: boolean | undefined;
530
+ } | undefined;
531
+ setupCommands?: string[][] | undefined;
532
+ workingDirectory?: string | undefined;
533
+ devcontainer?: {
534
+ env?: Record<string, string> | undefined;
535
+ mode?: "never" | "auto" | "always" | undefined;
536
+ configPath?: string | undefined;
537
+ } | undefined;
538
+ triggerMap?: {
539
+ start: string;
540
+ resume: string;
541
+ pause: string;
542
+ abort: string;
543
+ } | undefined;
544
+ provider?: "github" | "gitlab" | undefined;
545
+ githubFeedback?: {
546
+ allowedReviewers?: string[] | undefined;
547
+ botLogins?: string[] | undefined;
548
+ triggerKeyword?: string | undefined;
549
+ autoTrigger?: boolean | undefined;
550
+ rerequestReview?: boolean | undefined;
551
+ } | undefined;
552
+ }>;
553
+ export type RepoConfig = z.infer<typeof RepoConfigSchema>;
554
+ export declare const TestResultSchema: z.ZodObject<{
555
+ passed: z.ZodNumber;
556
+ failed: z.ZodNumber;
557
+ firstFailure: z.ZodOptional<z.ZodObject<{
558
+ test: z.ZodString;
559
+ error: z.ZodString;
560
+ file: z.ZodString;
561
+ }, "strip", z.ZodTypeAny, {
562
+ test: string;
563
+ error: string;
564
+ file: string;
565
+ }, {
566
+ test: string;
567
+ error: string;
568
+ file: string;
569
+ }>>;
570
+ }, "strip", z.ZodTypeAny, {
571
+ passed: number;
572
+ failed: number;
573
+ firstFailure?: {
574
+ test: string;
575
+ error: string;
576
+ file: string;
577
+ } | undefined;
578
+ }, {
579
+ passed: number;
580
+ failed: number;
581
+ firstFailure?: {
582
+ test: string;
583
+ error: string;
584
+ file: string;
585
+ } | undefined;
586
+ }>;
587
+ export type TestResult = z.infer<typeof TestResultSchema>;
588
+ export declare const ReviewFindingSchema: z.ZodObject<{
589
+ severity: z.ZodEnum<["blocking", "warning", "suggestion"]>;
590
+ file: z.ZodString;
591
+ line: z.ZodNumber;
592
+ category: z.ZodString;
593
+ description: z.ZodString;
594
+ fix: z.ZodString;
595
+ }, "strip", z.ZodTypeAny, {
596
+ file: string;
597
+ severity: "blocking" | "warning" | "suggestion";
598
+ line: number;
599
+ category: string;
600
+ description: string;
601
+ fix: string;
602
+ }, {
603
+ file: string;
604
+ severity: "blocking" | "warning" | "suggestion";
605
+ line: number;
606
+ category: string;
607
+ description: string;
608
+ fix: string;
609
+ }>;
610
+ export type ReviewFinding = z.infer<typeof ReviewFindingSchema>;
611
+ export declare const HandoffArtifactSchema: z.ZodObject<{
612
+ runId: z.ZodString;
613
+ issueId: z.ZodString;
614
+ stage: z.ZodString;
615
+ timestamp: z.ZodString;
616
+ summary: z.ZodString;
617
+ filesChanged: z.ZodArray<z.ZodString, "many">;
618
+ approach: z.ZodString;
619
+ context: z.ZodObject<{
620
+ issueIntent: z.ZodString;
621
+ constraints: z.ZodArray<z.ZodString, "many">;
622
+ assumptions: z.ZodArray<z.ZodString, "many">;
623
+ testResults: z.ZodOptional<z.ZodObject<{
624
+ passed: z.ZodNumber;
625
+ failed: z.ZodNumber;
626
+ firstFailure: z.ZodOptional<z.ZodObject<{
627
+ test: z.ZodString;
628
+ error: z.ZodString;
629
+ file: z.ZodString;
630
+ }, "strip", z.ZodTypeAny, {
631
+ test: string;
632
+ error: string;
633
+ file: string;
634
+ }, {
635
+ test: string;
636
+ error: string;
637
+ file: string;
638
+ }>>;
639
+ }, "strip", z.ZodTypeAny, {
640
+ passed: number;
641
+ failed: number;
642
+ firstFailure?: {
643
+ test: string;
644
+ error: string;
645
+ file: string;
646
+ } | undefined;
647
+ }, {
648
+ passed: number;
649
+ failed: number;
650
+ firstFailure?: {
651
+ test: string;
652
+ error: string;
653
+ file: string;
654
+ } | undefined;
655
+ }>>;
656
+ reviewFindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
657
+ severity: z.ZodEnum<["blocking", "warning", "suggestion"]>;
658
+ file: z.ZodString;
659
+ line: z.ZodNumber;
660
+ category: z.ZodString;
661
+ description: z.ZodString;
662
+ fix: z.ZodString;
663
+ }, "strip", z.ZodTypeAny, {
664
+ file: string;
665
+ severity: "blocking" | "warning" | "suggestion";
666
+ line: number;
667
+ category: string;
668
+ description: string;
669
+ fix: string;
670
+ }, {
671
+ file: string;
672
+ severity: "blocking" | "warning" | "suggestion";
673
+ line: number;
674
+ category: string;
675
+ description: string;
676
+ fix: string;
677
+ }>, "many">>;
678
+ }, "strip", z.ZodTypeAny, {
679
+ issueIntent: string;
680
+ constraints: string[];
681
+ assumptions: string[];
682
+ testResults?: {
683
+ passed: number;
684
+ failed: number;
685
+ firstFailure?: {
686
+ test: string;
687
+ error: string;
688
+ file: string;
689
+ } | undefined;
690
+ } | undefined;
691
+ reviewFindings?: {
692
+ file: string;
693
+ severity: "blocking" | "warning" | "suggestion";
694
+ line: number;
695
+ category: string;
696
+ description: string;
697
+ fix: string;
698
+ }[] | undefined;
699
+ }, {
700
+ issueIntent: string;
701
+ constraints: string[];
702
+ assumptions: string[];
703
+ testResults?: {
704
+ passed: number;
705
+ failed: number;
706
+ firstFailure?: {
707
+ test: string;
708
+ error: string;
709
+ file: string;
710
+ } | undefined;
711
+ } | undefined;
712
+ reviewFindings?: {
713
+ file: string;
714
+ severity: "blocking" | "warning" | "suggestion";
715
+ line: number;
716
+ category: string;
717
+ description: string;
718
+ fix: string;
719
+ }[] | undefined;
720
+ }>;
721
+ tokenBudget: z.ZodObject<{
722
+ contextTokensUsed: z.ZodNumber;
723
+ recommendedMaxTurns: z.ZodNumber;
724
+ }, "strip", z.ZodTypeAny, {
725
+ contextTokensUsed: number;
726
+ recommendedMaxTurns: number;
727
+ }, {
728
+ contextTokensUsed: number;
729
+ recommendedMaxTurns: number;
730
+ }>;
731
+ }, "strip", z.ZodTypeAny, {
732
+ runId: string;
733
+ issueId: string;
734
+ stage: string;
735
+ timestamp: string;
736
+ summary: string;
737
+ filesChanged: string[];
738
+ approach: string;
739
+ context: {
740
+ issueIntent: string;
741
+ constraints: string[];
742
+ assumptions: string[];
743
+ testResults?: {
744
+ passed: number;
745
+ failed: number;
746
+ firstFailure?: {
747
+ test: string;
748
+ error: string;
749
+ file: string;
750
+ } | undefined;
751
+ } | undefined;
752
+ reviewFindings?: {
753
+ file: string;
754
+ severity: "blocking" | "warning" | "suggestion";
755
+ line: number;
756
+ category: string;
757
+ description: string;
758
+ fix: string;
759
+ }[] | undefined;
760
+ };
761
+ tokenBudget: {
762
+ contextTokensUsed: number;
763
+ recommendedMaxTurns: number;
764
+ };
765
+ }, {
766
+ runId: string;
767
+ issueId: string;
768
+ stage: string;
769
+ timestamp: string;
770
+ summary: string;
771
+ filesChanged: string[];
772
+ approach: string;
773
+ context: {
774
+ issueIntent: string;
775
+ constraints: string[];
776
+ assumptions: string[];
777
+ testResults?: {
778
+ passed: number;
779
+ failed: number;
780
+ firstFailure?: {
781
+ test: string;
782
+ error: string;
783
+ file: string;
784
+ } | undefined;
785
+ } | undefined;
786
+ reviewFindings?: {
787
+ file: string;
788
+ severity: "blocking" | "warning" | "suggestion";
789
+ line: number;
790
+ category: string;
791
+ description: string;
792
+ fix: string;
793
+ }[] | undefined;
794
+ };
795
+ tokenBudget: {
796
+ contextTokensUsed: number;
797
+ recommendedMaxTurns: number;
798
+ };
799
+ }>;
800
+ export type HandoffArtifact = z.infer<typeof HandoffArtifactSchema>;
801
+ export declare const ReviewCommentSchema: z.ZodObject<{
802
+ author: z.ZodString;
803
+ body: z.ZodString;
804
+ file: z.ZodOptional<z.ZodString>;
805
+ line: z.ZodOptional<z.ZodNumber>;
806
+ diffHunk: z.ZodOptional<z.ZodString>;
807
+ createdAt: z.ZodString;
808
+ }, "strip", z.ZodTypeAny, {
809
+ author: string;
810
+ body: string;
811
+ createdAt: string;
812
+ file?: string | undefined;
813
+ line?: number | undefined;
814
+ diffHunk?: string | undefined;
815
+ }, {
816
+ author: string;
817
+ body: string;
818
+ createdAt: string;
819
+ file?: string | undefined;
820
+ line?: number | undefined;
821
+ diffHunk?: string | undefined;
822
+ }>;
823
+ export type ReviewComment = z.infer<typeof ReviewCommentSchema>;
824
+ export declare const ReviewFeedbackContextSchema: z.ZodObject<{
825
+ /** The URL of the PR being reviewed. */
826
+ prUrl: z.ZodString;
827
+ /** The branch to push fixes to (the existing PR branch). */
828
+ prBranch: z.ZodString;
829
+ /** Inline review comments with file/line context. */
830
+ comments: z.ZodArray<z.ZodObject<{
831
+ author: z.ZodString;
832
+ body: z.ZodString;
833
+ file: z.ZodOptional<z.ZodString>;
834
+ line: z.ZodOptional<z.ZodNumber>;
835
+ diffHunk: z.ZodOptional<z.ZodString>;
836
+ createdAt: z.ZodString;
837
+ }, "strip", z.ZodTypeAny, {
838
+ author: string;
839
+ body: string;
840
+ createdAt: string;
841
+ file?: string | undefined;
842
+ line?: number | undefined;
843
+ diffHunk?: string | undefined;
844
+ }, {
845
+ author: string;
846
+ body: string;
847
+ createdAt: string;
848
+ file?: string | undefined;
849
+ line?: number | undefined;
850
+ diffHunk?: string | undefined;
851
+ }>, "many">;
852
+ /** Optional overall review summary body (for full reviews, not just inline comments). */
853
+ reviewBody: z.ZodOptional<z.ZodString>;
854
+ /** The original implement handoff, for context on what was done. */
855
+ previousHandoff: z.ZodOptional<z.ZodObject<{
856
+ runId: z.ZodString;
857
+ issueId: z.ZodString;
858
+ stage: z.ZodString;
859
+ timestamp: z.ZodString;
860
+ summary: z.ZodString;
861
+ filesChanged: z.ZodArray<z.ZodString, "many">;
862
+ approach: z.ZodString;
863
+ context: z.ZodObject<{
864
+ issueIntent: z.ZodString;
865
+ constraints: z.ZodArray<z.ZodString, "many">;
866
+ assumptions: z.ZodArray<z.ZodString, "many">;
867
+ testResults: z.ZodOptional<z.ZodObject<{
868
+ passed: z.ZodNumber;
869
+ failed: z.ZodNumber;
870
+ firstFailure: z.ZodOptional<z.ZodObject<{
871
+ test: z.ZodString;
872
+ error: z.ZodString;
873
+ file: z.ZodString;
874
+ }, "strip", z.ZodTypeAny, {
875
+ test: string;
876
+ error: string;
877
+ file: string;
878
+ }, {
879
+ test: string;
880
+ error: string;
881
+ file: string;
882
+ }>>;
883
+ }, "strip", z.ZodTypeAny, {
884
+ passed: number;
885
+ failed: number;
886
+ firstFailure?: {
887
+ test: string;
888
+ error: string;
889
+ file: string;
890
+ } | undefined;
891
+ }, {
892
+ passed: number;
893
+ failed: number;
894
+ firstFailure?: {
895
+ test: string;
896
+ error: string;
897
+ file: string;
898
+ } | undefined;
899
+ }>>;
900
+ reviewFindings: z.ZodOptional<z.ZodArray<z.ZodObject<{
901
+ severity: z.ZodEnum<["blocking", "warning", "suggestion"]>;
902
+ file: z.ZodString;
903
+ line: z.ZodNumber;
904
+ category: z.ZodString;
905
+ description: z.ZodString;
906
+ fix: z.ZodString;
907
+ }, "strip", z.ZodTypeAny, {
908
+ file: string;
909
+ severity: "blocking" | "warning" | "suggestion";
910
+ line: number;
911
+ category: string;
912
+ description: string;
913
+ fix: string;
914
+ }, {
915
+ file: string;
916
+ severity: "blocking" | "warning" | "suggestion";
917
+ line: number;
918
+ category: string;
919
+ description: string;
920
+ fix: string;
921
+ }>, "many">>;
922
+ }, "strip", z.ZodTypeAny, {
923
+ issueIntent: string;
924
+ constraints: string[];
925
+ assumptions: string[];
926
+ testResults?: {
927
+ passed: number;
928
+ failed: number;
929
+ firstFailure?: {
930
+ test: string;
931
+ error: string;
932
+ file: string;
933
+ } | undefined;
934
+ } | undefined;
935
+ reviewFindings?: {
936
+ file: string;
937
+ severity: "blocking" | "warning" | "suggestion";
938
+ line: number;
939
+ category: string;
940
+ description: string;
941
+ fix: string;
942
+ }[] | undefined;
943
+ }, {
944
+ issueIntent: string;
945
+ constraints: string[];
946
+ assumptions: string[];
947
+ testResults?: {
948
+ passed: number;
949
+ failed: number;
950
+ firstFailure?: {
951
+ test: string;
952
+ error: string;
953
+ file: string;
954
+ } | undefined;
955
+ } | undefined;
956
+ reviewFindings?: {
957
+ file: string;
958
+ severity: "blocking" | "warning" | "suggestion";
959
+ line: number;
960
+ category: string;
961
+ description: string;
962
+ fix: string;
963
+ }[] | undefined;
964
+ }>;
965
+ tokenBudget: z.ZodObject<{
966
+ contextTokensUsed: z.ZodNumber;
967
+ recommendedMaxTurns: z.ZodNumber;
968
+ }, "strip", z.ZodTypeAny, {
969
+ contextTokensUsed: number;
970
+ recommendedMaxTurns: number;
971
+ }, {
972
+ contextTokensUsed: number;
973
+ recommendedMaxTurns: number;
974
+ }>;
975
+ }, "strip", z.ZodTypeAny, {
976
+ runId: string;
977
+ issueId: string;
978
+ stage: string;
979
+ timestamp: string;
980
+ summary: string;
981
+ filesChanged: string[];
982
+ approach: string;
983
+ context: {
984
+ issueIntent: string;
985
+ constraints: string[];
986
+ assumptions: string[];
987
+ testResults?: {
988
+ passed: number;
989
+ failed: number;
990
+ firstFailure?: {
991
+ test: string;
992
+ error: string;
993
+ file: string;
994
+ } | undefined;
995
+ } | undefined;
996
+ reviewFindings?: {
997
+ file: string;
998
+ severity: "blocking" | "warning" | "suggestion";
999
+ line: number;
1000
+ category: string;
1001
+ description: string;
1002
+ fix: string;
1003
+ }[] | undefined;
1004
+ };
1005
+ tokenBudget: {
1006
+ contextTokensUsed: number;
1007
+ recommendedMaxTurns: number;
1008
+ };
1009
+ }, {
1010
+ runId: string;
1011
+ issueId: string;
1012
+ stage: string;
1013
+ timestamp: string;
1014
+ summary: string;
1015
+ filesChanged: string[];
1016
+ approach: string;
1017
+ context: {
1018
+ issueIntent: string;
1019
+ constraints: string[];
1020
+ assumptions: string[];
1021
+ testResults?: {
1022
+ passed: number;
1023
+ failed: number;
1024
+ firstFailure?: {
1025
+ test: string;
1026
+ error: string;
1027
+ file: string;
1028
+ } | undefined;
1029
+ } | undefined;
1030
+ reviewFindings?: {
1031
+ file: string;
1032
+ severity: "blocking" | "warning" | "suggestion";
1033
+ line: number;
1034
+ category: string;
1035
+ description: string;
1036
+ fix: string;
1037
+ }[] | undefined;
1038
+ };
1039
+ tokenBudget: {
1040
+ contextTokensUsed: number;
1041
+ recommendedMaxTurns: number;
1042
+ };
1043
+ }>>;
1044
+ }, "strip", z.ZodTypeAny, {
1045
+ prUrl: string;
1046
+ prBranch: string;
1047
+ comments: {
1048
+ author: string;
1049
+ body: string;
1050
+ createdAt: string;
1051
+ file?: string | undefined;
1052
+ line?: number | undefined;
1053
+ diffHunk?: string | undefined;
1054
+ }[];
1055
+ reviewBody?: string | undefined;
1056
+ previousHandoff?: {
1057
+ runId: string;
1058
+ issueId: string;
1059
+ stage: string;
1060
+ timestamp: string;
1061
+ summary: string;
1062
+ filesChanged: string[];
1063
+ approach: string;
1064
+ context: {
1065
+ issueIntent: string;
1066
+ constraints: string[];
1067
+ assumptions: string[];
1068
+ testResults?: {
1069
+ passed: number;
1070
+ failed: number;
1071
+ firstFailure?: {
1072
+ test: string;
1073
+ error: string;
1074
+ file: string;
1075
+ } | undefined;
1076
+ } | undefined;
1077
+ reviewFindings?: {
1078
+ file: string;
1079
+ severity: "blocking" | "warning" | "suggestion";
1080
+ line: number;
1081
+ category: string;
1082
+ description: string;
1083
+ fix: string;
1084
+ }[] | undefined;
1085
+ };
1086
+ tokenBudget: {
1087
+ contextTokensUsed: number;
1088
+ recommendedMaxTurns: number;
1089
+ };
1090
+ } | undefined;
1091
+ }, {
1092
+ prUrl: string;
1093
+ prBranch: string;
1094
+ comments: {
1095
+ author: string;
1096
+ body: string;
1097
+ createdAt: string;
1098
+ file?: string | undefined;
1099
+ line?: number | undefined;
1100
+ diffHunk?: string | undefined;
1101
+ }[];
1102
+ reviewBody?: string | undefined;
1103
+ previousHandoff?: {
1104
+ runId: string;
1105
+ issueId: string;
1106
+ stage: string;
1107
+ timestamp: string;
1108
+ summary: string;
1109
+ filesChanged: string[];
1110
+ approach: string;
1111
+ context: {
1112
+ issueIntent: string;
1113
+ constraints: string[];
1114
+ assumptions: string[];
1115
+ testResults?: {
1116
+ passed: number;
1117
+ failed: number;
1118
+ firstFailure?: {
1119
+ test: string;
1120
+ error: string;
1121
+ file: string;
1122
+ } | undefined;
1123
+ } | undefined;
1124
+ reviewFindings?: {
1125
+ file: string;
1126
+ severity: "blocking" | "warning" | "suggestion";
1127
+ line: number;
1128
+ category: string;
1129
+ description: string;
1130
+ fix: string;
1131
+ }[] | undefined;
1132
+ };
1133
+ tokenBudget: {
1134
+ contextTokensUsed: number;
1135
+ recommendedMaxTurns: number;
1136
+ };
1137
+ } | undefined;
1138
+ }>;
1139
+ export type ReviewFeedbackContext = z.infer<typeof ReviewFeedbackContextSchema>;
1140
+ export interface AgentProfile {
1141
+ tools: string[];
1142
+ maxInputTokens: number;
1143
+ maxTurns: number;
1144
+ model?: string;
1145
+ }
1146
+ export interface TokenBudget {
1147
+ maxInputTokens: number;
1148
+ maxTurns: number;
1149
+ }
1150
+ export type PipelineRunStatus = "queued" | "running" | "completed" | "failed" | "aborted" | "paused";
1151
+ export type StageRunStatus = "running" | "completed" | "failed" | "skipped";
1152
+ export type AgentLogType = "tool_call" | "tool_result" | "message" | "error";
1153
+ export interface SanitizedIssue {
1154
+ id: string;
1155
+ slug: string;
1156
+ title: string;
1157
+ description: string;
1158
+ acceptanceCriteria: string[];
1159
+ labels: string[];
1160
+ priority: number;
1161
+ }
1162
+ export interface StageResult {
1163
+ status: "completed" | "failed";
1164
+ handoffArtifact?: HandoffArtifact;
1165
+ /** True when the agent produced a valid structured handoff JSON block.
1166
+ * NOTE: not persisted to DB yet — runtime-only. Add a column if needed for dashboards/queries. */
1167
+ handoffIsStructured?: boolean;
1168
+ inputTokens: number;
1169
+ outputTokens: number;
1170
+ turns: number;
1171
+ errorMessage?: string;
1172
+ }
1173
+ export interface PipelineRun {
1174
+ id: string;
1175
+ issueId: string;
1176
+ issueTitle: string;
1177
+ pipelineKey: string;
1178
+ repoUrl: string;
1179
+ branch: string | null;
1180
+ status: PipelineRunStatus;
1181
+ startedAt: Date;
1182
+ completedAt?: Date;
1183
+ prUrl?: string;
1184
+ totalInputTokens: number;
1185
+ totalOutputTokens: number;
1186
+ /** True when the pipeline auto-merged the PR. Persisted to DB. */
1187
+ autoMerged?: boolean;
1188
+ /** Reason for the auto-merge decision (success reason or skip reason). Persisted to DB. */
1189
+ autoMergeReason?: string;
1190
+ /** True when auto-commit was triggered because the agent did not commit its work. Quality metric. */
1191
+ autoCommitted?: boolean;
1192
+ }
1193
+ export interface PipelineResult {
1194
+ prUrl: string;
1195
+ totalInputTokens: number;
1196
+ totalOutputTokens: number;
1197
+ stagesCompleted: number;
1198
+ autoMerged?: boolean;
1199
+ }
1200
+ export interface PipelineError {
1201
+ stage: string;
1202
+ message: string;
1203
+ retriesExhausted: boolean;
1204
+ }
1205
+ export interface DailyTokenSummary {
1206
+ date: string;
1207
+ totalInputTokens: number;
1208
+ totalOutputTokens: number;
1209
+ runsCompleted: number;
1210
+ runsFailed: number;
1211
+ }
1212
+ export interface Notifier {
1213
+ onPipelineStart(run: PipelineRun): Promise<void>;
1214
+ onStageComplete(run: PipelineRun, stage: string, result: StageResult): Promise<void>;
1215
+ onPipelineComplete(run: PipelineRun, result: PipelineResult): Promise<void>;
1216
+ onPipelineFailed(run: PipelineRun, error: PipelineError): Promise<void>;
1217
+ /** Called when a PR needs human review (not auto-merged). */
1218
+ onHumanReviewNeeded?(run: PipelineRun, prUrl: string, reason: string): Promise<void>;
1219
+ /** Called once when token usage reaches 80% of maxTokens. */
1220
+ onTokenBudgetAlert?(run: PipelineRun, usedTokens: number, maxTokens: number): Promise<void>;
1221
+ /** Called by sendDailyTokenSummary() with aggregated usage for a given date. */
1222
+ onDailyTokenSummary?(summary: DailyTokenSummary): Promise<void>;
1223
+ }
1224
+ export interface SandboxConfig {
1225
+ workdir: string;
1226
+ allowedDomains: string[];
1227
+ denyRead: string[];
1228
+ denyWrite: string[];
1229
+ }
1230
+ //# sourceMappingURL=types.d.ts.map