@vercel/factory 0.0.13 → 0.0.15

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 (458) hide show
  1. package/README.md +307 -1
  2. package/dist/agent-routes.d.mts +69 -0
  3. package/dist/agent-routes.mjs +64 -0
  4. package/dist/agent-routes.mjs.map +1 -0
  5. package/dist/api-contracts.d.mts +1749 -0
  6. package/dist/api-contracts.mjs +118 -0
  7. package/dist/api-contracts.mjs.map +1 -0
  8. package/dist/api-images.d.mts +30 -0
  9. package/dist/api-images.mjs +28 -0
  10. package/dist/api-images.mjs.map +1 -0
  11. package/dist/api-task-graph.mjs +57 -0
  12. package/dist/api-task-graph.mjs.map +1 -0
  13. package/dist/api.d.mts +77 -0
  14. package/dist/api.mjs +1087 -0
  15. package/dist/api.mjs.map +1 -0
  16. package/dist/approval-access.d.mts +39 -0
  17. package/dist/approval-access.mjs +62 -0
  18. package/dist/approval-access.mjs.map +1 -0
  19. package/dist/approval-contracts.d.mts +692 -0
  20. package/dist/approval-contracts.mjs +27 -0
  21. package/dist/approval-contracts.mjs.map +1 -0
  22. package/dist/approval.d.mts +49 -0
  23. package/dist/approval.mjs +39 -0
  24. package/dist/approval.mjs.map +1 -0
  25. package/dist/blob/artifacts.d.mts +37 -0
  26. package/dist/blob/artifacts.mjs +45 -0
  27. package/dist/blob/artifacts.mjs.map +1 -0
  28. package/dist/blob/index.d.mts +44 -8
  29. package/dist/blob/index.mjs +159 -35
  30. package/dist/blob/index.mjs.map +1 -1
  31. package/dist/budget.d.mts +108 -0
  32. package/dist/budget.mjs +141 -0
  33. package/dist/budget.mjs.map +1 -0
  34. package/dist/budgets.d.mts +4 -0
  35. package/dist/budgets.mjs +4 -0
  36. package/dist/build-factory.d.mts +6 -4
  37. package/dist/build-factory.mjs +2 -1
  38. package/dist/build-factory.mjs.map +1 -1
  39. package/dist/change-verification/brief.d.mts +9 -0
  40. package/dist/change-verification/brief.mjs +13 -0
  41. package/dist/change-verification/brief.mjs.map +1 -0
  42. package/dist/change-verification/dispatch.d.mts +24 -0
  43. package/dist/change-verification/dispatch.mjs +45 -0
  44. package/dist/change-verification/dispatch.mjs.map +1 -0
  45. package/dist/change-verification/eve-tool.d.mts +60 -0
  46. package/dist/change-verification/eve-tool.mjs +101 -0
  47. package/dist/change-verification/eve-tool.mjs.map +1 -0
  48. package/dist/changes/eve-record-change.d.mts +56 -0
  49. package/dist/changes/eve-record-change.mjs +97 -0
  50. package/dist/changes/eve-record-change.mjs.map +1 -0
  51. package/dist/changes/presentation.d.mts +14 -0
  52. package/dist/changes.d.mts +23 -0
  53. package/dist/changes.mjs +29 -0
  54. package/dist/changes.mjs.map +1 -0
  55. package/dist/client-events.d.mts +18 -0
  56. package/dist/client-events.mjs +41 -0
  57. package/dist/client-events.mjs.map +1 -0
  58. package/dist/client-stream.d.mts +28 -0
  59. package/dist/client-stream.mjs +204 -0
  60. package/dist/client-stream.mjs.map +1 -0
  61. package/dist/client-transcript.d.mts +41 -0
  62. package/dist/client-transcript.mjs +229 -0
  63. package/dist/client-transcript.mjs.map +1 -0
  64. package/dist/client.d.mts +234 -0
  65. package/dist/client.mjs +258 -0
  66. package/dist/client.mjs.map +1 -0
  67. package/dist/code-review/contracts.d.mts +26 -0
  68. package/dist/code-review/eve-post-review.d.mts +70 -0
  69. package/dist/code-review/eve-post-review.mjs +183 -0
  70. package/dist/code-review/eve-post-review.mjs.map +1 -0
  71. package/dist/code-review/eve-review-comments.d.mts +64 -0
  72. package/dist/code-review/eve-review-comments.mjs +159 -0
  73. package/dist/code-review/eve-review-comments.mjs.map +1 -0
  74. package/dist/code-review/github-contracts.d.mts +10 -0
  75. package/dist/code-review/github-reporter.d.mts +44 -0
  76. package/dist/code-review/github-reporter.mjs +260 -0
  77. package/dist/code-review/github-reporter.mjs.map +1 -0
  78. package/dist/code-review/preparation.d.mts +34 -0
  79. package/dist/code-review/preparation.mjs +23 -0
  80. package/dist/code-review/preparation.mjs.map +1 -0
  81. package/dist/code-review/stall.d.mts +17 -0
  82. package/dist/code-review/stall.mjs +30 -0
  83. package/dist/code-review/stall.mjs.map +1 -0
  84. package/dist/code-review.d.mts +6 -0
  85. package/dist/code-review.mjs +5 -0
  86. package/dist/communication.d.mts +9 -0
  87. package/dist/communication.mjs +9 -0
  88. package/dist/connectors/github.d.mts +26 -0
  89. package/dist/connectors/github.mjs +55 -0
  90. package/dist/connectors/github.mjs.map +1 -0
  91. package/dist/connectors/index.d.mts +35 -2
  92. package/dist/connectors/index.mjs +4 -26
  93. package/dist/connectors/index.mjs.map +1 -1
  94. package/dist/connectors/outbox.d.mts +34 -0
  95. package/dist/connectors/outbox.mjs +50 -0
  96. package/dist/connectors/outbox.mjs.map +1 -0
  97. package/dist/connectors/slack-approval-blocks.mjs +136 -0
  98. package/dist/connectors/slack-approval-blocks.mjs.map +1 -0
  99. package/dist/connectors/slack-approvals.d.mts +29 -0
  100. package/dist/connectors/slack-approvals.mjs +346 -0
  101. package/dist/connectors/slack-approvals.mjs.map +1 -0
  102. package/dist/connectors/slack.d.mts +35 -41
  103. package/dist/connectors/slack.mjs +13 -69
  104. package/dist/connectors/slack.mjs.map +1 -1
  105. package/dist/deepsec/eve-tool.d.mts +110 -0
  106. package/dist/deepsec/eve-tool.mjs +164 -0
  107. package/dist/deepsec/eve-tool.mjs.map +1 -0
  108. package/dist/deepsec/finding.d.mts +84 -0
  109. package/dist/deepsec/finding.mjs +56 -0
  110. package/dist/deepsec/finding.mjs.map +1 -0
  111. package/dist/deepsec.d.mts +3 -0
  112. package/dist/delivery-metrics/metrics.d.mts +93 -0
  113. package/dist/delivery-metrics/metrics.mjs +200 -0
  114. package/dist/delivery-metrics/metrics.mjs.map +1 -0
  115. package/dist/delivery-metrics.d.mts +2 -0
  116. package/dist/delivery-metrics.mjs +2 -0
  117. package/dist/dispatch.d.mts +81 -0
  118. package/dist/dispatch.mjs +140 -0
  119. package/dist/dispatch.mjs.map +1 -0
  120. package/dist/errors.d.mts +15 -0
  121. package/dist/errors.mjs +38 -0
  122. package/dist/errors.mjs.map +1 -0
  123. package/dist/eve/index.d.mts +143 -1561
  124. package/dist/eve/index.mjs +244 -1063
  125. package/dist/eve/index.mjs.map +1 -1
  126. package/dist/eve/invoke.d.mts +144 -0
  127. package/dist/eve/invoke.mjs +241 -0
  128. package/dist/eve/invoke.mjs.map +1 -0
  129. package/dist/eve/session-client.d.mts +68 -0
  130. package/dist/eve/session-client.mjs +131 -0
  131. package/dist/eve/session-client.mjs.map +1 -0
  132. package/dist/eve/task-execution.mjs +18 -0
  133. package/dist/eve/task-execution.mjs.map +1 -0
  134. package/dist/eve/task-session.d.mts +87 -0
  135. package/dist/eve/task-session.mjs +203 -0
  136. package/dist/eve/task-session.mjs.map +1 -0
  137. package/dist/eve/transcript.d.mts +37 -0
  138. package/dist/eve/transcript.mjs +65 -0
  139. package/dist/eve/transcript.mjs.map +1 -0
  140. package/dist/execution-public.d.mts +8 -0
  141. package/dist/execution-public.mjs +7 -0
  142. package/dist/execution.d.mts +75 -0
  143. package/dist/execution.mjs +153 -0
  144. package/dist/execution.mjs.map +1 -0
  145. package/dist/finding-remediation/admission.d.mts +51 -0
  146. package/dist/finding-remediation/admission.mjs +87 -0
  147. package/dist/finding-remediation/admission.mjs.map +1 -0
  148. package/dist/finding-remediation/brief.d.mts +14 -0
  149. package/dist/finding-remediation/brief.mjs +25 -0
  150. package/dist/finding-remediation/brief.mjs.map +1 -0
  151. package/dist/finding-remediation/eve-tool.d.mts +29 -0
  152. package/dist/finding-remediation/eve-tool.mjs +34 -0
  153. package/dist/finding-remediation/eve-tool.mjs.map +1 -0
  154. package/dist/findings/fingerprint.d.mts +14 -0
  155. package/dist/findings/fingerprint.mjs +28 -0
  156. package/dist/findings/fingerprint.mjs.map +1 -0
  157. package/dist/findings.d.mts +6 -0
  158. package/dist/findings.mjs +6 -0
  159. package/dist/github-app.d.mts +54 -0
  160. package/dist/github-app.mjs +121 -0
  161. package/dist/github-app.mjs.map +1 -0
  162. package/dist/github-publication.d.mts +198 -0
  163. package/dist/github-publication.mjs +429 -0
  164. package/dist/github-publication.mjs.map +1 -0
  165. package/dist/github-transfer.d.mts +72 -0
  166. package/dist/github-transfer.mjs +125 -0
  167. package/dist/github-transfer.mjs.map +1 -0
  168. package/dist/github.d.mts +406 -2
  169. package/dist/github.mjs +250 -37
  170. package/dist/github.mjs.map +1 -1
  171. package/dist/image-input.d.mts +51 -0
  172. package/dist/image-input.mjs +63 -0
  173. package/dist/image-input.mjs.map +1 -0
  174. package/dist/index.d.mts +14 -314
  175. package/dist/index.mjs +14 -1124
  176. package/dist/intake-contracts.d.mts +56 -0
  177. package/dist/intake-contracts.mjs +33 -0
  178. package/dist/intake-contracts.mjs.map +1 -0
  179. package/dist/integrations/deepsec.d.mts +4 -0
  180. package/dist/integrations/deepsec.mjs +3 -0
  181. package/dist/integrations/github.d.mts +11 -0
  182. package/dist/integrations/github.mjs +9 -0
  183. package/dist/integrations/slack.d.mts +3 -0
  184. package/dist/integrations/slack.mjs +3 -0
  185. package/dist/integrations/vercel.d.mts +3 -0
  186. package/dist/integrations/vercel.mjs +3 -0
  187. package/dist/merge-resolution/contracts.d.mts +17 -0
  188. package/dist/merge-resolution/contracts.mjs +19 -0
  189. package/dist/merge-resolution/contracts.mjs.map +1 -0
  190. package/dist/merge-resolution/eve-tools.d.mts +46 -0
  191. package/dist/merge-resolution/eve-tools.mjs +117 -0
  192. package/dist/merge-resolution/eve-tools.mjs.map +1 -0
  193. package/dist/multi-repository-changes/coordination.d.mts +49 -0
  194. package/dist/multi-repository-changes/coordination.mjs +115 -0
  195. package/dist/multi-repository-changes/coordination.mjs.map +1 -0
  196. package/dist/planning/cancellation.mjs +82 -0
  197. package/dist/planning/cancellation.mjs.map +1 -0
  198. package/dist/planning/configuration.d.mts +23 -0
  199. package/dist/planning/configuration.mjs +56 -0
  200. package/dist/planning/configuration.mjs.map +1 -0
  201. package/dist/planning/contracts.d.mts +136 -0
  202. package/dist/planning/contracts.mjs +42 -0
  203. package/dist/planning/contracts.mjs.map +1 -0
  204. package/dist/planning/dependencies.mjs +44 -0
  205. package/dist/planning/dependencies.mjs.map +1 -0
  206. package/dist/planning/effects.mjs +122 -0
  207. package/dist/planning/effects.mjs.map +1 -0
  208. package/dist/planning/reconcile.mjs +273 -0
  209. package/dist/planning/reconcile.mjs.map +1 -0
  210. package/dist/planning/runtime.d.mts +27 -0
  211. package/dist/planning/runtime.mjs +25 -0
  212. package/dist/planning/runtime.mjs.map +1 -0
  213. package/dist/planning/state.mjs +92 -0
  214. package/dist/planning/state.mjs.map +1 -0
  215. package/dist/planning/turns.mjs +262 -0
  216. package/dist/planning/turns.mjs.map +1 -0
  217. package/dist/planning/validation.mjs +106 -0
  218. package/dist/planning/validation.mjs.map +1 -0
  219. package/dist/postgres/index.d.mts +7 -1
  220. package/dist/postgres/index.mjs +7 -3
  221. package/dist/postgres/index.mjs.map +1 -1
  222. package/dist/presets/software-development/approval.d.mts +14 -0
  223. package/dist/presets/software-development/approval.mjs +21 -0
  224. package/dist/presets/software-development/approval.mjs.map +1 -0
  225. package/dist/presets/software-development/deepsec-brief.d.mts +8 -0
  226. package/dist/presets/software-development/deepsec-brief.mjs +14 -0
  227. package/dist/presets/software-development/deepsec-brief.mjs.map +1 -0
  228. package/dist/presets/software-development/dispatch.d.mts +53 -0
  229. package/dist/presets/software-development/dispatch.mjs +66 -0
  230. package/dist/presets/software-development/dispatch.mjs.map +1 -0
  231. package/dist/presets/software-development/eve-delegation-policy.d.mts +7 -0
  232. package/dist/presets/software-development/eve-delegation-policy.mjs +34 -0
  233. package/dist/presets/software-development/eve-delegation-policy.mjs.map +1 -0
  234. package/dist/presets/software-development/eve.d.mts +18 -0
  235. package/dist/presets/software-development/eve.mjs +19 -0
  236. package/dist/presets/software-development/eve.mjs.map +1 -0
  237. package/dist/presets/software-development/finish-task-policy.d.mts +7 -0
  238. package/dist/presets/software-development/finish-task-policy.mjs +9 -0
  239. package/dist/presets/software-development/finish-task-policy.mjs.map +1 -0
  240. package/dist/presets/software-development/recovery.d.mts +32 -0
  241. package/dist/presets/software-development/recovery.mjs +120 -0
  242. package/dist/presets/software-development/recovery.mjs.map +1 -0
  243. package/dist/presets/software-development/task-communication.d.mts +23 -0
  244. package/dist/presets/software-development/task-communication.mjs +120 -0
  245. package/dist/presets/software-development/task-communication.mjs.map +1 -0
  246. package/dist/presets/software-development.d.mts +9 -0
  247. package/dist/presets/software-development.mjs +9 -0
  248. package/dist/pull-requests/contracts.d.mts +72 -0
  249. package/dist/pull-requests/eve-fetch.d.mts +57 -0
  250. package/dist/pull-requests/eve-fetch.mjs +151 -0
  251. package/dist/pull-requests/eve-fetch.mjs.map +1 -0
  252. package/dist/pull-requests/github-label-manager.d.mts +27 -0
  253. package/dist/pull-requests/github-label-manager.mjs +40 -0
  254. package/dist/pull-requests/github-label-manager.mjs.map +1 -0
  255. package/dist/pull-requests/github-publisher.d.mts +53 -0
  256. package/dist/pull-requests/github-publisher.mjs +345 -0
  257. package/dist/pull-requests/github-publisher.mjs.map +1 -0
  258. package/dist/pull-requests.d.mts +5 -0
  259. package/dist/pull-requests.mjs +4 -0
  260. package/dist/receipts.d.mts +4 -0
  261. package/dist/receipts.mjs +3 -0
  262. package/dist/repositories.d.mts +18 -0
  263. package/dist/repositories.mjs +33 -0
  264. package/dist/repositories.mjs.map +1 -0
  265. package/dist/sandbox/command.d.mts +18 -0
  266. package/dist/sandbox/execution-abort.d.mts +16 -0
  267. package/dist/sandbox/execution-abort.mjs +49 -0
  268. package/dist/sandbox/execution-abort.mjs.map +1 -0
  269. package/dist/sandbox/execution-environment.d.mts +25 -0
  270. package/dist/sandbox/execution-run-ledger.d.mts +115 -0
  271. package/dist/sandbox/execution-run-ledger.mjs +209 -0
  272. package/dist/sandbox/execution-run-ledger.mjs.map +1 -0
  273. package/dist/sandbox/execution.d.mts +54 -0
  274. package/dist/sandbox/execution.mjs +228 -0
  275. package/dist/sandbox/execution.mjs.map +1 -0
  276. package/dist/sandbox/harness-runner.d.mts +79 -0
  277. package/dist/sandbox/harness-runner.mjs +162 -0
  278. package/dist/sandbox/harness-runner.mjs.map +1 -0
  279. package/dist/sandbox/index.d.mts +9 -0
  280. package/dist/sandbox/index.mjs +7 -0
  281. package/dist/sandbox/task-environment.d.mts +50 -0
  282. package/dist/sandbox/task-environment.mjs +140 -0
  283. package/dist/sandbox/task-environment.mjs.map +1 -0
  284. package/dist/sandbox/workspace.d.mts +29 -0
  285. package/dist/sandbox/workspace.mjs +28 -0
  286. package/dist/sandbox/workspace.mjs.map +1 -0
  287. package/dist/schema/agent-route.d.mts +22 -0
  288. package/dist/schema/agent-route.mjs +15 -0
  289. package/dist/schema/agent-route.mjs.map +1 -0
  290. package/dist/schema/answer.d.mts +23 -0
  291. package/dist/schema/answer.mjs +21 -0
  292. package/dist/schema/answer.mjs.map +1 -0
  293. package/dist/schema/budget.d.mts +38 -0
  294. package/dist/schema/budget.mjs +30 -0
  295. package/dist/schema/budget.mjs.map +1 -0
  296. package/dist/schema/catalog.mjs +72 -0
  297. package/dist/schema/catalog.mjs.map +1 -0
  298. package/dist/schema/change.d.mts +117 -0
  299. package/dist/schema/change.mjs +68 -0
  300. package/dist/schema/change.mjs.map +1 -0
  301. package/dist/schema/common.d.mts +33 -0
  302. package/dist/{id-DwCihQr4.mjs → schema/common.mjs} +7 -14
  303. package/dist/schema/common.mjs.map +1 -0
  304. package/dist/schema/communication.d.mts +52 -0
  305. package/dist/schema/communication.mjs +35 -0
  306. package/dist/schema/communication.mjs.map +1 -0
  307. package/dist/schema/execution.d.mts +101 -0
  308. package/dist/schema/execution.mjs +86 -0
  309. package/dist/schema/execution.mjs.map +1 -0
  310. package/dist/schema/factory-config.d.mts +95 -0
  311. package/dist/schema/factory-config.mjs +60 -0
  312. package/dist/schema/factory-config.mjs.map +1 -0
  313. package/dist/schema/finding.d.mts +125 -0
  314. package/dist/schema/finding.mjs +67 -0
  315. package/dist/schema/finding.mjs.map +1 -0
  316. package/dist/schema/id.d.mts +43 -0
  317. package/dist/schema/id.mjs +32 -0
  318. package/dist/schema/id.mjs.map +1 -0
  319. package/dist/schema/outbox.d.mts +240 -0
  320. package/dist/schema/outbox.mjs +53 -0
  321. package/dist/schema/outbox.mjs.map +1 -0
  322. package/dist/schema/question-route.mjs +16 -0
  323. package/dist/schema/question-route.mjs.map +1 -0
  324. package/dist/schema/receipt.d.mts +81 -0
  325. package/dist/schema/receipt.mjs +94 -0
  326. package/dist/schema/receipt.mjs.map +1 -0
  327. package/dist/schema/repository.d.mts +26 -0
  328. package/dist/schema/repository.mjs +25 -0
  329. package/dist/schema/repository.mjs.map +1 -0
  330. package/dist/schema/session.d.mts +135 -0
  331. package/dist/schema/session.mjs +53 -0
  332. package/dist/schema/session.mjs.map +1 -0
  333. package/dist/schema/signal.d.mts +105 -0
  334. package/dist/schema/signal.mjs +81 -0
  335. package/dist/schema/signal.mjs.map +1 -0
  336. package/dist/schema/stored-session.mjs +10 -0
  337. package/dist/schema/stored-session.mjs.map +1 -0
  338. package/dist/schema/stored-task.mjs +20 -0
  339. package/dist/schema/stored-task.mjs.map +1 -0
  340. package/dist/schema/task-effect.d.mts +39 -0
  341. package/dist/schema/task-effect.mjs +29 -0
  342. package/dist/schema/task-effect.mjs.map +1 -0
  343. package/dist/schema/task-graph.d.mts +3134 -0
  344. package/dist/schema/task-graph.mjs +97 -0
  345. package/dist/schema/task-graph.mjs.map +1 -0
  346. package/dist/schema/task-message.d.mts +254 -0
  347. package/dist/schema/task-message.mjs +189 -0
  348. package/dist/schema/task-message.mjs.map +1 -0
  349. package/dist/schema/task.d.mts +272 -0
  350. package/dist/schema/task.mjs +199 -0
  351. package/dist/schema/task.mjs.map +1 -0
  352. package/dist/schema/transcript.d.mts +170 -0
  353. package/dist/schema/transcript.mjs +86 -0
  354. package/dist/schema/transcript.mjs.map +1 -0
  355. package/dist/schema/transitions.d.mts +50 -0
  356. package/dist/schema/transitions.mjs +303 -0
  357. package/dist/schema/transitions.mjs.map +1 -0
  358. package/dist/schema/work.d.mts +101 -0
  359. package/dist/schema/work.mjs +102 -0
  360. package/dist/schema/work.mjs.map +1 -0
  361. package/dist/signal-triage.d.mts +20 -0
  362. package/dist/signal-triage.mjs +85 -0
  363. package/dist/signal-triage.mjs.map +1 -0
  364. package/dist/signals.d.mts +19 -0
  365. package/dist/signals.mjs +19 -0
  366. package/dist/signals.mjs.map +1 -0
  367. package/dist/stall.d.mts +38 -0
  368. package/dist/stall.mjs +79 -0
  369. package/dist/stall.mjs.map +1 -0
  370. package/dist/storage.d.mts +4 -0
  371. package/dist/storage.mjs +4 -0
  372. package/dist/store/driver.d.mts +65 -0
  373. package/dist/store/driver.mjs +42 -0
  374. package/dist/store/driver.mjs.map +1 -0
  375. package/dist/store/engine.d.mts +485 -0
  376. package/dist/store/engine.mjs +2175 -0
  377. package/dist/store/engine.mjs.map +1 -0
  378. package/dist/store/memory.d.mts +7 -0
  379. package/dist/store/memory.mjs +52 -0
  380. package/dist/store/memory.mjs.map +1 -0
  381. package/dist/store/task-effects.d.mts +38 -0
  382. package/dist/store/task-effects.mjs +118 -0
  383. package/dist/store/task-effects.mjs.map +1 -0
  384. package/dist/store/task-graphs.d.mts +60 -0
  385. package/dist/store/task-graphs.mjs +212 -0
  386. package/dist/store/task-graphs.mjs.map +1 -0
  387. package/dist/store/task-messages.d.mts +136 -0
  388. package/dist/store/task-messages.mjs +475 -0
  389. package/dist/store/task-messages.mjs.map +1 -0
  390. package/dist/store/task-work.d.mts +65 -0
  391. package/dist/store/task-work.mjs +134 -0
  392. package/dist/store/task-work.mjs.map +1 -0
  393. package/dist/store/work-notifications.d.mts +19 -0
  394. package/dist/store/work-notifications.mjs +48 -0
  395. package/dist/store/work-notifications.mjs.map +1 -0
  396. package/dist/sweep.d.mts +57 -0
  397. package/dist/sweep.mjs +143 -0
  398. package/dist/sweep.mjs.map +1 -0
  399. package/dist/task-communication.d.mts +35 -0
  400. package/dist/task-communication.mjs +47 -0
  401. package/dist/task-communication.mjs.map +1 -0
  402. package/dist/task-graph-view.d.mts +264 -0
  403. package/dist/task-graph-view.mjs +17 -0
  404. package/dist/task-graph-view.mjs.map +1 -0
  405. package/dist/task-message-processing.d.mts +60 -0
  406. package/dist/task-message-processing.mjs +200 -0
  407. package/dist/task-message-processing.mjs.map +1 -0
  408. package/dist/task-protocols.d.mts +80 -0
  409. package/dist/task-protocols.mjs +47 -0
  410. package/dist/task-protocols.mjs.map +1 -0
  411. package/dist/tasks.d.mts +17 -0
  412. package/dist/tasks.mjs +17 -0
  413. package/dist/vercel-git.d.mts +21 -0
  414. package/dist/vercel-git.mjs +112 -0
  415. package/dist/vercel-git.mjs.map +1 -0
  416. package/dist/vercel.d.mts +33 -2
  417. package/dist/vercel.mjs +48 -3
  418. package/dist/vercel.mjs.map +1 -1
  419. package/dist/work-triage/eve-tool.d.mts +29 -0
  420. package/dist/work-triage/eve-tool.mjs +32 -0
  421. package/dist/work-triage/eve-tool.mjs.map +1 -0
  422. package/dist/work-triage/find-existing-work.d.mts +32 -0
  423. package/dist/work-triage/find-existing-work.mjs +31 -0
  424. package/dist/work-triage/find-existing-work.mjs.map +1 -0
  425. package/dist/work-triage/github.d.mts +15 -0
  426. package/dist/work-triage/github.mjs +14 -0
  427. package/dist/work-triage/github.mjs.map +1 -0
  428. package/dist/work-triage.d.mts +3 -0
  429. package/dist/work-triage.mjs +3 -0
  430. package/dist/workflows.d.mts +48 -0
  431. package/dist/workflows.mjs +86 -0
  432. package/dist/workflows.mjs.map +1 -0
  433. package/dist/workspace-diff-assembly.d.mts +33 -0
  434. package/dist/workspace-diff-assembly.mjs +95 -0
  435. package/dist/workspace-diff-assembly.mjs.map +1 -0
  436. package/dist/workspace-diff.d.mts +90 -0
  437. package/dist/workspace-diff.mjs +61 -0
  438. package/dist/workspace-diff.mjs.map +1 -0
  439. package/dist/workspace-snapshot.d.mts +26 -0
  440. package/dist/workspace-snapshot.mjs +80 -0
  441. package/dist/workspace-snapshot.mjs.map +1 -0
  442. package/package.json +129 -40
  443. package/dist/approval-CwhTP1XB.mjs +0 -269
  444. package/dist/approval-CwhTP1XB.mjs.map +0 -1
  445. package/dist/change-CzEAoFVE.mjs +0 -620
  446. package/dist/change-CzEAoFVE.mjs.map +0 -1
  447. package/dist/dispatch-B77cuPxh.d.mts +0 -713
  448. package/dist/driver-BJutB0PE.d.mts +0 -34
  449. package/dist/driver-Bbd25rNM.mjs +0 -23
  450. package/dist/driver-Bbd25rNM.mjs.map +0 -1
  451. package/dist/factory-config-BJcjsPKl.mjs +0 -86
  452. package/dist/factory-config-BJcjsPKl.mjs.map +0 -1
  453. package/dist/factory-config-D2yU3G0c.d.mts +0 -58
  454. package/dist/github-DXsxboUL.d.mts +0 -271
  455. package/dist/id-DwCihQr4.mjs.map +0 -1
  456. package/dist/index-Cy4jfXh5.d.mts +0 -67
  457. package/dist/index.mjs.map +0 -1
  458. package/dist/signal-CHVEmzvI.d.mts +0 -59
@@ -1,713 +0,0 @@
1
- import { i as StoreDriver } from "./driver-BJutB0PE.mjs";
2
- import { c as ReplyTo, n as SignalOutcome, r as SignalSource, t as Signal } from "./signal-CHVEmzvI.mjs";
3
- import { z } from "zod";
4
- //#region src/schema/task.d.ts
5
- /**
6
- * Kinds the standard loop understands. Any vocabulary value is valid; the
7
- * kind-scoped rules below apply only to these standard kinds.
8
- */
9
- declare const standardTaskKinds: readonly ["coordination", "code_change", "verification", "investigation", "question"];
10
- declare const taskKindSchema: z.ZodString;
11
- declare const taskStateSchema: z.ZodEnum<{
12
- queued: "queued";
13
- running: "running";
14
- stalled: "stalled";
15
- verifying: "verifying";
16
- succeeded: "succeeded";
17
- failed: "failed";
18
- needs_human: "needs_human";
19
- cancelled: "cancelled";
20
- }>;
21
- declare const taskApprovalSchema: z.ZodEnum<{
22
- required: "required";
23
- granted: "granted";
24
- denied: "denied";
25
- }>;
26
- declare const taskExecutionRepositoryIdsSchema: z.ZodTuple<[z.ZodString], null>;
27
- declare const coordinationRepositoryIdsSchema: z.ZodTuple<[z.ZodString, z.ZodString], z.ZodString>;
28
- declare const taskOriginSchema: z.ZodObject<{
29
- signalId: z.ZodOptional<z.ZodString>;
30
- parentTaskId: z.ZodOptional<z.ZodString>;
31
- operator: z.ZodOptional<z.ZodString>;
32
- }, z.core.$strict>;
33
- declare const harnessSchema: z.ZodString;
34
- /**
35
- * The provider's handle on the current attempt's execution. Opaque to the
36
- * lifecycle: Factory records it so the execution can be inspected or
37
- * cancelled, never to mirror the provider's own state machine.
38
- */
39
- declare const executionReferenceSchema: z.ZodObject<{
40
- provider: z.ZodString;
41
- sessionId: z.ZodString;
42
- environmentId: z.ZodOptional<z.ZodString>;
43
- harness: z.ZodOptional<z.ZodString>;
44
- traceId: z.ZodOptional<z.ZodString>;
45
- }, z.core.$strict>;
46
- declare const taskUsageSchema: z.ZodObject<{
47
- costUsd: z.ZodNumber;
48
- inputTokens: z.ZodNumber;
49
- outputTokens: z.ZodNumber;
50
- cacheReadTokens: z.ZodNumber;
51
- cacheWriteTokens: z.ZodNumber;
52
- steps: z.ZodRecord<z.ZodString, z.ZodNumber>;
53
- }, z.core.$strict>;
54
- declare const taskQuestionSchema: z.ZodObject<{
55
- text: z.ZodString;
56
- options: z.ZodArray<z.ZodString>;
57
- answer: z.ZodOptional<z.ZodString>;
58
- answeredBy: z.ZodOptional<z.ZodString>;
59
- }, z.core.$strict>;
60
- declare const taskSchema: z.ZodObject<{
61
- schemaVersion: z.ZodLiteral<1>;
62
- id: z.ZodString;
63
- repositoryIds: z.ZodArray<z.ZodString>;
64
- kind: z.ZodString;
65
- area: z.ZodOptional<z.ZodString>;
66
- state: z.ZodEnum<{
67
- queued: "queued";
68
- running: "running";
69
- stalled: "stalled";
70
- verifying: "verifying";
71
- succeeded: "succeeded";
72
- failed: "failed";
73
- needs_human: "needs_human";
74
- cancelled: "cancelled";
75
- }>;
76
- approval: z.ZodOptional<z.ZodEnum<{
77
- required: "required";
78
- granted: "granted";
79
- denied: "denied";
80
- }>>;
81
- origin: z.ZodObject<{
82
- signalId: z.ZodOptional<z.ZodString>;
83
- parentTaskId: z.ZodOptional<z.ZodString>;
84
- operator: z.ZodOptional<z.ZodString>;
85
- }, z.core.$strict>;
86
- dependsOn: z.ZodOptional<z.ZodArray<z.ZodString>>;
87
- replyTo: z.ZodObject<{
88
- channel: z.ZodString;
89
- address: z.ZodString;
90
- }, z.core.$strict>;
91
- attempt: z.ZodNumber;
92
- execution: z.ZodOptional<z.ZodObject<{
93
- provider: z.ZodString;
94
- sessionId: z.ZodString;
95
- environmentId: z.ZodOptional<z.ZodString>;
96
- harness: z.ZodOptional<z.ZodString>;
97
- traceId: z.ZodOptional<z.ZodString>;
98
- }, z.core.$strict>>;
99
- lastProgressAt: z.ZodOptional<z.ZodISODateTime>;
100
- stalledAt: z.ZodOptional<z.ZodISODateTime>;
101
- stalledReason: z.ZodOptional<z.ZodString>;
102
- reservedUsd: z.ZodOptional<z.ZodNumber>;
103
- reservedAt: z.ZodOptional<z.ZodISODateTime>;
104
- usage: z.ZodOptional<z.ZodObject<{
105
- costUsd: z.ZodNumber;
106
- inputTokens: z.ZodNumber;
107
- outputTokens: z.ZodNumber;
108
- cacheReadTokens: z.ZodNumber;
109
- cacheWriteTokens: z.ZodNumber;
110
- steps: z.ZodRecord<z.ZodString, z.ZodNumber>;
111
- }, z.core.$strict>>;
112
- settledUsd: z.ZodOptional<z.ZodNumber>;
113
- question: z.ZodOptional<z.ZodObject<{
114
- text: z.ZodString;
115
- options: z.ZodArray<z.ZodString>;
116
- answer: z.ZodOptional<z.ZodString>;
117
- answeredBy: z.ZodOptional<z.ZodString>;
118
- }, z.core.$strict>>;
119
- changeId: z.ZodOptional<z.ZodString>;
120
- reportRef: z.ZodOptional<z.ZodString>;
121
- createdAt: z.ZodISODateTime;
122
- updatedAt: z.ZodISODateTime;
123
- }, z.core.$strict>;
124
- type TaskApproval = z.infer<typeof taskApprovalSchema>;
125
- type TaskKind = z.infer<typeof taskKindSchema>;
126
- type TaskState = z.infer<typeof taskStateSchema>;
127
- type TaskUsage = z.infer<typeof taskUsageSchema>;
128
- type ExecutionReference = z.infer<typeof executionReferenceSchema>;
129
- type Task = z.infer<typeof taskSchema>;
130
- //#endregion
131
- //#region src/schema/id.d.ts
132
- declare const factoryIdSchema: z.ZodString;
133
- declare const repositoryIdSchema: z.ZodString;
134
- declare const signalIdSchema: z.ZodString;
135
- declare const taskIdSchema: z.ZodString;
136
- declare const changeIdSchema: z.ZodString;
137
- declare const receiptIdSchema: z.ZodString;
138
- declare const repositoryIdsSchema: z.ZodArray<z.ZodString>;
139
- type FactoryId = z.infer<typeof factoryIdSchema>;
140
- type RepositoryId = z.infer<typeof repositoryIdSchema>;
141
- type SignalId = z.infer<typeof signalIdSchema>;
142
- type TaskId = z.infer<typeof taskIdSchema>;
143
- type ChangeId = z.infer<typeof changeIdSchema>;
144
- type ReceiptId = z.infer<typeof receiptIdSchema>;
145
- //#endregion
146
- //#region src/schema/budget.d.ts
147
- declare const budgetMonthSchema: z.ZodString;
148
- declare const budgetLimitsSchema: z.ZodObject<{
149
- totalUsd: z.ZodNumber;
150
- investigationUsd: z.ZodNumber;
151
- perTaskReservationUsd: z.ZodNumber;
152
- warningPercent: z.ZodNumber;
153
- perRepositoryUsd: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
154
- }, z.core.$strict>;
155
- declare const budgetSchema: z.ZodObject<{
156
- schemaVersion: z.ZodLiteral<1>;
157
- factoryId: z.ZodString;
158
- month: z.ZodString;
159
- limits: z.ZodObject<{
160
- totalUsd: z.ZodNumber;
161
- investigationUsd: z.ZodNumber;
162
- perTaskReservationUsd: z.ZodNumber;
163
- warningPercent: z.ZodNumber;
164
- perRepositoryUsd: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
165
- }, z.core.$strict>;
166
- notices: z.ZodObject<{
167
- warningAt: z.ZodOptional<z.ZodISODateTime>;
168
- exhaustedAt: z.ZodOptional<z.ZodISODateTime>;
169
- }, z.core.$strict>;
170
- }, z.core.$strict>;
171
- type BudgetLimits = z.infer<typeof budgetLimitsSchema>;
172
- type Budget = z.infer<typeof budgetSchema>;
173
- //#endregion
174
- //#region src/schema/change.d.ts
175
- declare const levelSchema: z.ZodEnum<{
176
- low: "low";
177
- medium: "medium";
178
- high: "high";
179
- }>;
180
- declare const changeStateSchema: z.ZodEnum<{
181
- verifying: "verifying";
182
- ready: "ready";
183
- merged: "merged";
184
- deployed: "deployed";
185
- rolled_out: "rolled_out";
186
- rolled_back: "rolled_back";
187
- closed: "closed";
188
- }>;
189
- declare const changeEvidenceSchema: z.ZodObject<{
190
- reproVerified: z.ZodBoolean;
191
- testsAdded: z.ZodNumber;
192
- checksGreen: z.ZodBoolean;
193
- attackPassed: z.ZodBoolean;
194
- scopeMatches: z.ZodBoolean;
195
- previewUrl: z.ZodOptional<z.ZodURL>;
196
- }, z.core.$strict>;
197
- declare const changeSchema: z.ZodObject<{
198
- schemaVersion: z.ZodLiteral<1>;
199
- id: z.ZodString;
200
- repositoryId: z.ZodString;
201
- taskId: z.ZodOptional<z.ZodString>;
202
- groupId: z.ZodOptional<z.ZodString>;
203
- prNumber: z.ZodNumber;
204
- prUrl: z.ZodURL;
205
- author: z.ZodString;
206
- risk: z.ZodEnum<{
207
- low: "low";
208
- medium: "medium";
209
- high: "high";
210
- }>;
211
- confidence: z.ZodEnum<{
212
- low: "low";
213
- medium: "medium";
214
- high: "high";
215
- }>;
216
- evidence: z.ZodObject<{
217
- reproVerified: z.ZodBoolean;
218
- testsAdded: z.ZodNumber;
219
- checksGreen: z.ZodBoolean;
220
- attackPassed: z.ZodBoolean;
221
- scopeMatches: z.ZodBoolean;
222
- previewUrl: z.ZodOptional<z.ZodURL>;
223
- }, z.core.$strict>;
224
- state: z.ZodEnum<{
225
- verifying: "verifying";
226
- ready: "ready";
227
- merged: "merged";
228
- deployed: "deployed";
229
- rolled_out: "rolled_out";
230
- rolled_back: "rolled_back";
231
- closed: "closed";
232
- }>;
233
- mergeSha: z.ZodOptional<z.ZodString>;
234
- decidedBy: z.ZodOptional<z.ZodString>;
235
- createdAt: z.ZodISODateTime;
236
- updatedAt: z.ZodISODateTime;
237
- }, z.core.$strict>;
238
- type Level = z.infer<typeof levelSchema>;
239
- type ChangeState = z.infer<typeof changeStateSchema>;
240
- type ChangeEvidence = z.infer<typeof changeEvidenceSchema>;
241
- type Change = z.infer<typeof changeSchema>;
242
- //#endregion
243
- //#region src/schema/receipt.d.ts
244
- /** States the engine writes on transitions. Any vocabulary value is valid. */
245
- declare const standardReceiptStates: readonly ["approved", "rejected", "dispatched", "stalled", "succeeded", "failed", "needs_human", "cancelled", "settled", "ready", "merged", "deployed", "rolled_out", "rolled_back"];
246
- /** Phases the standard loop uses. Any vocabulary value is valid. */
247
- declare const standardReceiptPhases: readonly ["approval", "budget", "dispatch", "implementation", "verification", "pull_request", "cleanup"];
248
- /** Kinds the standard loop writes: the standard task kinds plus "change". */
249
- declare const standardReceiptKinds: readonly ["coordination", "code_change", "verification", "investigation", "question", "change"];
250
- declare const receiptStateSchema: z.ZodString;
251
- declare const receiptPhaseSchema: z.ZodString;
252
- declare const receiptKindSchema: z.ZodString;
253
- declare const costSchema: z.ZodObject<{
254
- totalUsd: z.ZodNumber;
255
- }, z.core.$strict>;
256
- declare const receiptSchema: z.ZodObject<{
257
- schemaVersion: z.ZodLiteral<1>;
258
- receiptId: z.ZodString;
259
- repositoryIds: z.ZodArray<z.ZodString>;
260
- taskId: z.ZodOptional<z.ZodString>;
261
- changeId: z.ZodOptional<z.ZodString>;
262
- kind: z.ZodString;
263
- state: z.ZodString;
264
- phase: z.ZodOptional<z.ZodString>;
265
- reason: z.ZodOptional<z.ZodString>;
266
- attempt: z.ZodNumber;
267
- cost: z.ZodOptional<z.ZodObject<{
268
- totalUsd: z.ZodNumber;
269
- }, z.core.$strict>>;
270
- decidedBy: z.ZodOptional<z.ZodString>;
271
- recordedAt: z.ZodISODateTime;
272
- }, z.core.$strict>;
273
- type ReceiptState = z.infer<typeof receiptStateSchema>;
274
- type ReceiptPhase = z.infer<typeof receiptPhaseSchema>;
275
- type ReceiptKind = z.infer<typeof receiptKindSchema>;
276
- type Cost = z.infer<typeof costSchema>;
277
- type Receipt = z.infer<typeof receiptSchema>;
278
- //#endregion
279
- //#region src/schema/repository.d.ts
280
- declare const repositorySlugSchema: z.ZodString;
281
- declare const repositorySchema: z.ZodObject<{
282
- schemaVersion: z.ZodLiteral<1>;
283
- id: z.ZodString;
284
- slug: z.ZodString;
285
- defaultBranch: z.ZodString;
286
- enabled: z.ZodBoolean;
287
- dependsOn: z.ZodArray<z.ZodString>;
288
- devbox: z.ZodOptional<z.ZodObject<{
289
- projectId: z.ZodString;
290
- teamId: z.ZodString;
291
- snapshot: z.ZodOptional<z.ZodString>;
292
- }, z.core.$strict>>;
293
- connectedAt: z.ZodISODateTime;
294
- }, z.core.$strict>;
295
- type RepositorySlug = z.infer<typeof repositorySlugSchema>;
296
- type Repository = z.infer<typeof repositorySchema>;
297
- //#endregion
298
- //#region src/store/engine.d.ts
299
- /** An approval decision that does not apply to the task's current approval or state. */
300
- declare class ApprovalError extends Error {
301
- readonly taskId: TaskId;
302
- readonly reason: string;
303
- constructor(taskId: TaskId, reason: string);
304
- }
305
- /** A settlement that does not apply to the task's current state. */
306
- declare class SettlementError extends Error {
307
- readonly taskId: TaskId;
308
- readonly reason: string;
309
- constructor(taskId: TaskId, reason: string);
310
- }
311
- declare class ChangeAssociationError extends Error {
312
- readonly taskId: TaskId;
313
- readonly repositoryId: RepositoryId;
314
- readonly reason: string;
315
- constructor(taskId: TaskId, repositoryId: RepositoryId, reason: string);
316
- }
317
- interface CreateSignalInput {
318
- repositoryId: RepositoryId;
319
- source: SignalSource;
320
- deliveryId: string;
321
- replyTo: ReplyTo;
322
- payload: unknown;
323
- }
324
- interface DecideSignalOptions {
325
- detail?: string;
326
- reason?: string;
327
- }
328
- interface CreateTaskInput {
329
- repositoryIds: RepositoryId[];
330
- kind: Task["kind"];
331
- origin: Task["origin"];
332
- replyTo: ReplyTo;
333
- /** Same key creates one task and returns it on workflow retries. */
334
- dedupeKey?: string;
335
- area?: string;
336
- changeId?: ChangeId;
337
- dependsOn?: TaskId[];
338
- question?: Task["question"];
339
- /** Stamp the task as needing a human decision before dispatch. */
340
- approval?: "required";
341
- }
342
- interface ApprovalDecision {
343
- /** Authenticated operator making the decision. */
344
- by: string;
345
- reason?: string;
346
- }
347
- type TaskPatch = Partial<Pick<Task, "changeId" | "reportRef" | "reservedUsd" | "reservedAt" | "question">>;
348
- /** One completed model step's usage, as eve's step.completed event carries it. */
349
- interface StepUsage {
350
- turnId: string;
351
- stepIndex: number;
352
- costUsd?: number;
353
- inputTokens?: number;
354
- outputTokens?: number;
355
- cacheReadTokens?: number;
356
- cacheWriteTokens?: number;
357
- }
358
- interface TaskTransitionOptions {
359
- patch?: TaskPatch;
360
- reason?: string;
361
- /**
362
- * Refuse unless the task is in this state at write time. Closes
363
- * check-then-act races where the transition would also be legal from the
364
- * state a concurrent writer moved the task into.
365
- */
366
- expectFrom?: TaskState;
367
- }
368
- interface CreateChangeInput {
369
- repositoryId: RepositoryId;
370
- taskId?: TaskId;
371
- groupId?: TaskId;
372
- prNumber: number;
373
- prUrl: string;
374
- author: string;
375
- risk: Level;
376
- confidence: Level;
377
- evidence: Change["evidence"];
378
- }
379
- type ChangePatch = Partial<Pick<Change, "confidence" | "evidence" | "decidedBy" | "mergeSha">>;
380
- interface ChangeTransitionOptions {
381
- patch?: ChangePatch;
382
- reason?: string;
383
- }
384
- interface EnsureBudgetInput {
385
- factoryId: FactoryId;
386
- month: string;
387
- limits: Budget["limits"];
388
- }
389
- interface SettleTaskOptions {
390
- reason?: string;
391
- }
392
- interface AppendReceiptInput {
393
- repositoryIds: RepositoryId[];
394
- taskId?: TaskId;
395
- changeId?: ChangeId;
396
- kind: string;
397
- state: string;
398
- phase?: string;
399
- reason?: string;
400
- attempt?: number;
401
- cost?: Cost;
402
- decidedBy?: string;
403
- /** Same key twice appends one receipt and returns the existing one. */
404
- dedupeKey?: string;
405
- }
406
- interface FactoryStores {
407
- driverName: string;
408
- repositories: {
409
- put(repository: Repository): Promise<Repository>;
410
- get(id: RepositoryId): Promise<Repository | null>;
411
- list(): Promise<Repository[]>;
412
- };
413
- signals: {
414
- create(input: CreateSignalInput): Promise<Signal>;
415
- get(id: SignalId): Promise<Signal | null>;
416
- decide(id: SignalId, outcome: SignalOutcome, options?: DecideSignalOptions): Promise<Signal>;
417
- list(): Promise<Signal[]>;
418
- };
419
- tasks: {
420
- create(input: CreateTaskInput): Promise<Task>;
421
- get(id: TaskId): Promise<Task | null>;
422
- transition(id: TaskId, to: TaskState, options?: TaskTransitionOptions): Promise<Task>;
423
- /** Grant a required approval. The task stays queued; dispatch may now take it. */
424
- approve(id: TaskId, decision: ApprovalDecision): Promise<Task>;
425
- /** Deny a required approval. The task is cancelled with the reason. */
426
- reject(id: TaskId, decision: ApprovalDecision): Promise<Task>;
427
- /**
428
- * Record the provider's handle on the running attempt's execution, so the
429
- * reconciler can inspect or cancel it. Refused unless the task is running.
430
- */
431
- recordExecution(id: TaskId, execution: ExecutionReference): Promise<Task>;
432
- /** Add one model step's usage to the task. Idempotent per (turnId, stepIndex). Never settles. */
433
- recordUsage(id: TaskId, step: StepUsage): Promise<Task>;
434
- /**
435
- * Record measured cost on a terminal task. Idempotent: an already settled
436
- * task returns unchanged and writes no second receipt.
437
- */
438
- settle(id: TaskId, cost: Cost, options?: SettleTaskOptions): Promise<Task>;
439
- list(): Promise<Task[]>;
440
- };
441
- changes: {
442
- create(input: CreateChangeInput): Promise<Change>;
443
- get(id: ChangeId): Promise<Change | null>;
444
- transition(id: ChangeId, to: ChangeState, options?: ChangeTransitionOptions): Promise<Change>;
445
- list(): Promise<Change[]>;
446
- };
447
- receipts: {
448
- append(input: AppendReceiptInput): Promise<Receipt>;
449
- get(id: string): Promise<Receipt | null>;
450
- list(): Promise<Receipt[]>;
451
- };
452
- budgets: {
453
- /**
454
- * Insert-once per month; refreshes limits when configuration changed and
455
- * preserves notices. Safe under concurrent sweeps.
456
- */
457
- ensure(input: EnsureBudgetInput): Promise<Budget>;
458
- get(month: string): Promise<Budget | null>;
459
- /**
460
- * Write-once notice stamp. `stamped` is false when the notice was already
461
- * set or a concurrent stamp won, so callers notify at most once.
462
- */
463
- stampNotice(month: string, notice: "warning" | "exhausted"): Promise<{
464
- budget: Budget;
465
- stamped: boolean;
466
- }>;
467
- };
468
- }
469
- interface CreateStoresOptions {
470
- driver: StoreDriver;
471
- now?: () => string;
472
- }
473
- declare function createStores(options: CreateStoresOptions): FactoryStores;
474
- //#endregion
475
- //#region src/schema/finding.d.ts
476
- declare const findingPrioritySchema: z.ZodEnum<{
477
- P0: "P0";
478
- P1: "P1";
479
- P2: "P2";
480
- P3: "P3";
481
- }>;
482
- declare const findingCategorySchema: z.ZodEnum<{
483
- security: "security";
484
- correctness: "correctness";
485
- reliability: "reliability";
486
- performance: "performance";
487
- compatibility: "compatibility";
488
- accessibility: "accessibility";
489
- documentation: "documentation";
490
- maintainability: "maintainability";
491
- testing: "testing";
492
- usability: "usability";
493
- }>;
494
- declare const findingVerificationLevelSchema: z.ZodEnum<{
495
- unverified: "unverified";
496
- supported: "supported";
497
- confirmed: "confirmed";
498
- }>;
499
- declare const findingVerificationMethodSchema: z.ZodEnum<{
500
- documentation: "documentation";
501
- code_inspection: "code_inspection";
502
- static_analysis: "static_analysis";
503
- manual_reproduction: "manual_reproduction";
504
- unit_test: "unit_test";
505
- integration_test: "integration_test";
506
- e2e_test: "e2e_test";
507
- runtime_observation: "runtime_observation";
508
- }>;
509
- /**
510
- * What was done to check the finding. Forces a reporter to distinguish "I
511
- * think this is a problem" from "I demonstrated it", which is the axis a human
512
- * approving fixes cares about most.
513
- */
514
- declare const findingVerificationSchema: z.ZodObject<{
515
- level: z.ZodEnum<{
516
- unverified: "unverified";
517
- supported: "supported";
518
- confirmed: "confirmed";
519
- }>;
520
- method: z.ZodEnum<{
521
- documentation: "documentation";
522
- code_inspection: "code_inspection";
523
- static_analysis: "static_analysis";
524
- manual_reproduction: "manual_reproduction";
525
- unit_test: "unit_test";
526
- integration_test: "integration_test";
527
- e2e_test: "e2e_test";
528
- runtime_observation: "runtime_observation";
529
- }>;
530
- summary: z.ZodString;
531
- limitations: z.ZodOptional<z.ZodString>;
532
- }, z.core.$strict>;
533
- /** A single problem found in a repository, as a scanner or agent reports it. */
534
- declare const findingSchema: z.ZodObject<{
535
- title: z.ZodString;
536
- body: z.ZodString;
537
- path: z.ZodOptional<z.ZodString>;
538
- line: z.ZodOptional<z.ZodNumber>;
539
- endLine: z.ZodOptional<z.ZodNumber>;
540
- priority: z.ZodEnum<{
541
- P0: "P0";
542
- P1: "P1";
543
- P2: "P2";
544
- P3: "P3";
545
- }>;
546
- category: z.ZodEnum<{
547
- security: "security";
548
- correctness: "correctness";
549
- reliability: "reliability";
550
- performance: "performance";
551
- compatibility: "compatibility";
552
- accessibility: "accessibility";
553
- documentation: "documentation";
554
- maintainability: "maintainability";
555
- testing: "testing";
556
- usability: "usability";
557
- }>;
558
- verification: z.ZodObject<{
559
- level: z.ZodEnum<{
560
- unverified: "unverified";
561
- supported: "supported";
562
- confirmed: "confirmed";
563
- }>;
564
- method: z.ZodEnum<{
565
- documentation: "documentation";
566
- code_inspection: "code_inspection";
567
- static_analysis: "static_analysis";
568
- manual_reproduction: "manual_reproduction";
569
- unit_test: "unit_test";
570
- integration_test: "integration_test";
571
- e2e_test: "e2e_test";
572
- runtime_observation: "runtime_observation";
573
- }>;
574
- summary: z.ZodString;
575
- limitations: z.ZodOptional<z.ZodString>;
576
- }, z.core.$strict>;
577
- tool: z.ZodOptional<z.ZodString>;
578
- ruleId: z.ZodOptional<z.ZodString>;
579
- }, z.core.$strict>;
580
- type FindingPriority = z.infer<typeof findingPrioritySchema>;
581
- type FindingCategory = z.infer<typeof findingCategorySchema>;
582
- type FindingVerification = z.infer<typeof findingVerificationSchema>;
583
- type Finding = z.infer<typeof findingSchema>;
584
- /**
585
- * Stable identity of a finding across scans, used as the signal's delivery id
586
- * so re-reporting is a no-op instead of a second task. A scanner finding is
587
- * the same problem when the same tool reports the same rule on the same file;
588
- * its title is model-written prose and changes between runs, so it is left
589
- * out. Without a rule id the title is all there is, normalised.
590
- */
591
- declare function findingFingerprint(repositoryId: string, finding: Finding): string;
592
- //#endregion
593
- //#region src/approval.d.ts
594
- /**
595
- * One approval rule. Every listed field must match for the rule to apply;
596
- * absent fields match anything. Rules are evaluated first-match.
597
- */
598
- declare const approvalRuleSchema: z.ZodObject<{
599
- source: z.ZodOptional<z.ZodString>;
600
- kind: z.ZodOptional<z.ZodString>;
601
- priority: z.ZodOptional<z.ZodArray<z.ZodEnum<{
602
- P0: "P0";
603
- P1: "P1";
604
- P2: "P2";
605
- P3: "P3";
606
- }>>>;
607
- require: z.ZodBoolean;
608
- }, z.core.$strict>;
609
- declare const approvalPolicySchema: z.ZodArray<z.ZodObject<{
610
- source: z.ZodOptional<z.ZodString>;
611
- kind: z.ZodOptional<z.ZodString>;
612
- priority: z.ZodOptional<z.ZodArray<z.ZodEnum<{
613
- P0: "P0";
614
- P1: "P1";
615
- P2: "P2";
616
- P3: "P3";
617
- }>>>;
618
- require: z.ZodBoolean;
619
- }, z.core.$strict>>;
620
- type ApprovalRule = z.infer<typeof approvalRuleSchema>;
621
- type ApprovalPolicy = z.infer<typeof approvalPolicySchema>;
622
- /**
623
- * The default: fixes for security findings wait for a human; everything else
624
- * runs as it always has. Handoffs between agents (verification) never wait,
625
- * because a human already approved the work they continue.
626
- */
627
- declare const defaultApprovalPolicy: ApprovalPolicy;
628
- interface ApprovalSubject {
629
- source?: string;
630
- kind: string;
631
- priority?: FindingPriority;
632
- }
633
- /**
634
- * Decide at task-creation time whether a task needs approval. Pure: the answer
635
- * is stamped on the task and never re-evaluated, so a later policy change
636
- * cannot silently release work a human was expecting to see.
637
- */
638
- declare function requiresApproval(policy: ApprovalPolicy, subject: ApprovalSubject): boolean;
639
- //#endregion
640
- //#region src/agent-routes.d.ts
641
- declare const agentRouteSchema: z.ZodObject<{
642
- id: z.ZodString;
643
- agent: z.ZodString;
644
- taskKind: z.ZodString;
645
- description: z.ZodString;
646
- permissions: z.ZodDefault<z.ZodArray<z.ZodString>>;
647
- }, z.core.$strict>;
648
- type AgentRoute = z.infer<typeof agentRouteSchema>;
649
- type AgentRouteInput = z.input<typeof agentRouteSchema>;
650
- interface AgentRouteRegistry {
651
- readonly routes: readonly AgentRoute[];
652
- get(id: string): AgentRoute | undefined;
653
- forTaskKind(kind: string): AgentRoute | undefined;
654
- }
655
- /**
656
- * Define the application-owned routes an agent or workflow may select. Route
657
- * descriptions inform judgment; this validated registry remains the authority.
658
- */
659
- declare function defineAgentRoutes(inputs: readonly AgentRouteInput[]): AgentRouteRegistry;
660
- //#endregion
661
- //#region src/dispatch.d.ts
662
- declare class DispatchRefusedError extends Error {
663
- readonly taskId: TaskId;
664
- readonly reason: string;
665
- constructor(taskId: TaskId, reason: string);
666
- }
667
- /**
668
- * An exhausted budget is definitive, not a retryable refusal: the task has
669
- * already been failed and receipted when this throws, so it never re-enters
670
- * the sweep. Operator retry recovers it once budget frees up.
671
- */
672
- declare class BudgetExhaustedError extends Error {
673
- readonly taskId: TaskId;
674
- readonly month: string;
675
- readonly spendUsd: number;
676
- constructor(taskId: TaskId, month: string, spendUsd: number);
677
- }
678
- interface DispatchBudget {
679
- limits: Pick<BudgetLimits, "totalUsd" | "perTaskReservationUsd">;
680
- /** Defaults to the current UTC month. */
681
- month?: string;
682
- now?: () => Date;
683
- }
684
- interface DispatchOptions {
685
- /**
686
- * Starts the durable execution for the task (an Eve agent run). Runs after
687
- * the task has won the queued -> running transition. Returning the
688
- * provider's execution reference records it on the task so the reconciler
689
- * can find the run; returning nothing leaves the task reachable only by the
690
- * stall window.
691
- */
692
- launch: (task: Task) => Promise<ExecutionReference | void>;
693
- /** How many launches to try before the task fails for good; a failure re-queues for the next sweep. */
694
- maxLaunchAttempts?: number;
695
- /**
696
- * Reserve-before-execution. When set, dispatch refuses definitively once
697
- * the month's derived spend cannot fit another reservation, and otherwise
698
- * stamps the reservation in the same write that wins queued -> running.
699
- */
700
- budget?: DispatchBudget;
701
- }
702
- declare const DEFAULT_MAX_LAUNCH_ATTEMPTS = 45;
703
- /**
704
- * The handshake between recorded work and execution: win the store-gated
705
- * transition (at most one dispatcher can succeed), then start the run. A
706
- * launch failure re-queues the task (bumping its attempt) until the attempt
707
- * limit, then fails it; a crash between the transition and the launch leaves
708
- * a running task with no execution, which the sweep reaps.
709
- */
710
- declare function dispatchTask(stores: FactoryStores, taskId: TaskId, options: DispatchOptions): Promise<Task>;
711
- //#endregion
712
- export { Cost as $, taskSchema as $t, AppendReceiptInput as A, TaskId as At, DecideSignalOptions as B, TaskApproval as Bt, findingCategorySchema as C, budgetMonthSchema as Ct, findingVerificationLevelSchema as D, ReceiptId as Dt, findingSchema as E, FactoryId as Et, ChangeTransitionOptions as F, repositoryIdsSchema as Ft, StepUsage as G, executionReferenceSchema as Gt, FactoryStores as H, TaskState as Ht, CreateChangeInput as I, signalIdSchema as It, createStores as J, taskApprovalSchema as Jt, TaskPatch as K, harnessSchema as Kt, CreateSignalInput as L, taskIdSchema as Lt, ApprovalError as M, factoryIdSchema as Mt, ChangeAssociationError as N, receiptIdSchema as Nt, findingVerificationMethodSchema as O, RepositoryId as Ot, ChangePatch as P, repositoryIdSchema as Pt, repositorySlugSchema as Q, taskQuestionSchema as Qt, CreateStoresOptions as R, ExecutionReference as Rt, FindingVerification as S, budgetLimitsSchema as St, findingPrioritySchema as T, ChangeId as Tt, SettleTaskOptions as U, TaskUsage as Ut, EnsureBudgetInput as V, TaskKind as Vt, SettlementError as W, coordinationRepositoryIdsSchema as Wt, RepositorySlug as X, taskKindSchema as Xt, Repository as Y, taskExecutionRepositoryIdsSchema as Yt, repositorySchema as Z, taskOriginSchema as Zt, defaultApprovalPolicy as _, changeSchema as _t, DispatchRefusedError as a, receiptKindSchema as at, FindingCategory as b, Budget as bt, AgentRouteInput as c, receiptStateSchema as ct, defineAgentRoutes as d, standardReceiptStates as dt, taskStateSchema as en, Receipt as et, ApprovalPolicy as f, Change as ft, approvalRuleSchema as g, changeEvidenceSchema as gt, approvalPolicySchema as h, Level as ht, DispatchOptions as i, costSchema as it, ApprovalDecision as j, changeIdSchema as jt, findingVerificationSchema as k, SignalId as kt, AgentRouteRegistry as l, standardReceiptKinds as lt, ApprovalSubject as m, ChangeState as mt, DEFAULT_MAX_LAUNCH_ATTEMPTS as n, ReceiptPhase as nt, dispatchTask as o, receiptPhaseSchema as ot, ApprovalRule as p, ChangeEvidence as pt, TaskTransitionOptions as q, standardTaskKinds as qt, DispatchBudget as r, ReceiptState as rt, AgentRoute as s, receiptSchema as st, BudgetExhaustedError as t, taskUsageSchema as tn, ReceiptKind as tt, agentRouteSchema as u, standardReceiptPhases as ut, requiresApproval as v, changeStateSchema as vt, findingFingerprint as w, budgetSchema as wt, FindingPriority as x, BudgetLimits as xt, Finding as y, levelSchema as yt, CreateTaskInput as z, Task as zt };
713
- //# sourceMappingURL=dispatch-B77cuPxh.d.mts.map