@shipfox/api-workflows 2.0.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 (661) hide show
  1. package/.turbo/turbo-build.log +2 -0
  2. package/.turbo/turbo-type$colon$emit.log +1 -0
  3. package/.turbo/turbo-type.log +1 -0
  4. package/CHANGELOG.md +311 -0
  5. package/LICENSE +21 -0
  6. package/dist/core/agent-tool-capability-warning.d.ts +7 -0
  7. package/dist/core/agent-tool-capability-warning.d.ts.map +1 -0
  8. package/dist/core/agent-tool-capability-warning.js +149 -0
  9. package/dist/core/agent-tool-capability-warning.js.map +1 -0
  10. package/dist/core/agent-tools.d.ts +51 -0
  11. package/dist/core/agent-tools.d.ts.map +1 -0
  12. package/dist/core/agent-tools.js +296 -0
  13. package/dist/core/agent-tools.js.map +1 -0
  14. package/dist/core/checkout.d.ts +29 -0
  15. package/dist/core/checkout.d.ts.map +1 -0
  16. package/dist/core/checkout.js +42 -0
  17. package/dist/core/checkout.js.map +1 -0
  18. package/dist/core/condition-trace.d.ts +13 -0
  19. package/dist/core/condition-trace.d.ts.map +1 -0
  20. package/dist/core/condition-trace.js +51 -0
  21. package/dist/core/condition-trace.js.map +1 -0
  22. package/dist/core/entities/index.d.ts +5 -0
  23. package/dist/core/entities/index.d.ts.map +1 -0
  24. package/dist/core/entities/index.js +3 -0
  25. package/dist/core/entities/index.js.map +1 -0
  26. package/dist/core/entities/job-execution.d.ts +30 -0
  27. package/dist/core/entities/job-execution.d.ts.map +1 -0
  28. package/dist/core/entities/job-execution.js +3 -0
  29. package/dist/core/entities/job-execution.js.map +1 -0
  30. package/dist/core/entities/job-listener-event.d.ts +15 -0
  31. package/dist/core/entities/job-listener-event.d.ts.map +1 -0
  32. package/dist/core/entities/job-listener-event.js +3 -0
  33. package/dist/core/entities/job-listener-event.js.map +1 -0
  34. package/dist/core/entities/job.d.ts +54 -0
  35. package/dist/core/entities/job.d.ts.map +1 -0
  36. package/dist/core/entities/job.js +29 -0
  37. package/dist/core/entities/job.js.map +1 -0
  38. package/dist/core/entities/step.d.ts +86 -0
  39. package/dist/core/entities/step.d.ts.map +1 -0
  40. package/dist/core/entities/step.js +12 -0
  41. package/dist/core/entities/step.js.map +1 -0
  42. package/dist/core/entities/workflow-run-attempt.d.ts +20 -0
  43. package/dist/core/entities/workflow-run-attempt.d.ts.map +1 -0
  44. package/dist/core/entities/workflow-run-attempt.js +3 -0
  45. package/dist/core/entities/workflow-run-attempt.js.map +1 -0
  46. package/dist/core/entities/workflow-run.d.ts +66 -0
  47. package/dist/core/entities/workflow-run.d.ts.map +1 -0
  48. package/dist/core/entities/workflow-run.js +10 -0
  49. package/dist/core/entities/workflow-run.js.map +1 -0
  50. package/dist/core/errors.d.ts +85 -0
  51. package/dist/core/errors.d.ts.map +1 -0
  52. package/dist/core/errors.js +134 -0
  53. package/dist/core/errors.js.map +1 -0
  54. package/dist/core/index.d.ts +14 -0
  55. package/dist/core/index.d.ts.map +1 -0
  56. package/dist/core/index.js +9 -0
  57. package/dist/core/index.js.map +1 -0
  58. package/dist/core/job-execution-outcome.d.ts +29 -0
  59. package/dist/core/job-execution-outcome.d.ts.map +1 -0
  60. package/dist/core/job-execution-outcome.js +31 -0
  61. package/dist/core/job-execution-outcome.js.map +1 -0
  62. package/dist/core/job-execution.d.ts +37 -0
  63. package/dist/core/job-execution.d.ts.map +1 -0
  64. package/dist/core/job-execution.js +425 -0
  65. package/dist/core/job-execution.js.map +1 -0
  66. package/dist/core/job-transition/decide-job-activation.d.ts +29 -0
  67. package/dist/core/job-transition/decide-job-activation.d.ts.map +1 -0
  68. package/dist/core/job-transition/decide-job-activation.js +51 -0
  69. package/dist/core/job-transition/decide-job-activation.js.map +1 -0
  70. package/dist/core/job-transition/derive-job-execution-outputs.d.ts +18 -0
  71. package/dist/core/job-transition/derive-job-execution-outputs.d.ts.map +1 -0
  72. package/dist/core/job-transition/derive-job-execution-outputs.js +23 -0
  73. package/dist/core/job-transition/derive-job-execution-outputs.js.map +1 -0
  74. package/dist/core/job-transition/derive-job-success.d.ts +16 -0
  75. package/dist/core/job-transition/derive-job-success.d.ts.map +1 -0
  76. package/dist/core/job-transition/derive-job-success.js +47 -0
  77. package/dist/core/job-transition/derive-job-success.js.map +1 -0
  78. package/dist/core/job-transition/index.d.ts +5 -0
  79. package/dist/core/job-transition/index.d.ts.map +1 -0
  80. package/dist/core/job-transition/index.js +6 -0
  81. package/dist/core/job-transition/index.js.map +1 -0
  82. package/dist/core/job-transition/runtime-completion-status-for-job.d.ts +4 -0
  83. package/dist/core/job-transition/runtime-completion-status-for-job.d.ts.map +1 -0
  84. package/dist/core/job-transition/runtime-completion-status-for-job.js +8 -0
  85. package/dist/core/job-transition/runtime-completion-status-for-job.js.map +1 -0
  86. package/dist/core/listener-execution-materialization.d.ts +30 -0
  87. package/dist/core/listener-execution-materialization.d.ts.map +1 -0
  88. package/dist/core/listener-execution-materialization.js +87 -0
  89. package/dist/core/listener-execution-materialization.js.map +1 -0
  90. package/dist/core/run-workflow.d.ts +11 -0
  91. package/dist/core/run-workflow.d.ts.map +1 -0
  92. package/dist/core/run-workflow.js +28 -0
  93. package/dist/core/run-workflow.js.map +1 -0
  94. package/dist/core/source-control.d.ts +5 -0
  95. package/dist/core/source-control.d.ts.map +1 -0
  96. package/dist/core/source-control.js +19 -0
  97. package/dist/core/source-control.js.map +1 -0
  98. package/dist/core/step-config/agent.d.ts +49 -0
  99. package/dist/core/step-config/agent.d.ts.map +1 -0
  100. package/dist/core/step-config/agent.js +337 -0
  101. package/dist/core/step-config/agent.js.map +1 -0
  102. package/dist/core/step-config/assemble-run-context.d.ts +94 -0
  103. package/dist/core/step-config/assemble-run-context.d.ts.map +1 -0
  104. package/dist/core/step-config/assemble-run-context.js +393 -0
  105. package/dist/core/step-config/assemble-run-context.js.map +1 -0
  106. package/dist/core/step-config/complete-step-dispatch-config.d.ts +13 -0
  107. package/dist/core/step-config/complete-step-dispatch-config.d.ts.map +1 -0
  108. package/dist/core/step-config/complete-step-dispatch-config.js +38 -0
  109. package/dist/core/step-config/complete-step-dispatch-config.js.map +1 -0
  110. package/dist/core/step-config/fields.d.ts +38 -0
  111. package/dist/core/step-config/fields.d.ts.map +1 -0
  112. package/dist/core/step-config/fields.js +72 -0
  113. package/dist/core/step-config/fields.js.map +1 -0
  114. package/dist/core/step-config/index.d.ts +8 -0
  115. package/dist/core/step-config/index.d.ts.map +1 -0
  116. package/dist/core/step-config/index.js +7 -0
  117. package/dist/core/step-config/index.js.map +1 -0
  118. package/dist/core/step-config/materialize-job-execution-steps.d.ts +35 -0
  119. package/dist/core/step-config/materialize-job-execution-steps.d.ts.map +1 -0
  120. package/dist/core/step-config/materialize-job-execution-steps.js +92 -0
  121. package/dist/core/step-config/materialize-job-execution-steps.js.map +1 -0
  122. package/dist/core/step-config/materialize-workflow-model.d.ts +42 -0
  123. package/dist/core/step-config/materialize-workflow-model.d.ts.map +1 -0
  124. package/dist/core/step-config/materialize-workflow-model.js +96 -0
  125. package/dist/core/step-config/materialize-workflow-model.js.map +1 -0
  126. package/dist/core/step-config/resolve-job-execution-name.d.ts +18 -0
  127. package/dist/core/step-config/resolve-job-execution-name.d.ts.map +1 -0
  128. package/dist/core/step-config/resolve-job-execution-name.js +36 -0
  129. package/dist/core/step-config/resolve-job-execution-name.js.map +1 -0
  130. package/dist/core/step-config/resolve-step-config.d.ts +33 -0
  131. package/dist/core/step-config/resolve-step-config.d.ts.map +1 -0
  132. package/dist/core/step-config/resolve-step-config.js +164 -0
  133. package/dist/core/step-config/resolve-step-config.js.map +1 -0
  134. package/dist/core/step-config/run.d.ts +39 -0
  135. package/dist/core/step-config/run.d.ts.map +1 -0
  136. package/dist/core/step-config/run.js +360 -0
  137. package/dist/core/step-config/run.js.map +1 -0
  138. package/dist/core/step-config/workflow-evaluation-context.d.ts +6 -0
  139. package/dist/core/step-config/workflow-evaluation-context.d.ts.map +1 -0
  140. package/dist/core/step-config/workflow-evaluation-context.js +3 -0
  141. package/dist/core/step-config/workflow-evaluation-context.js.map +1 -0
  142. package/dist/core/step-transition/apply-step-transition.d.ts +26 -0
  143. package/dist/core/step-transition/apply-step-transition.d.ts.map +1 -0
  144. package/dist/core/step-transition/apply-step-transition.js +141 -0
  145. package/dist/core/step-transition/apply-step-transition.js.map +1 -0
  146. package/dist/core/step-transition/decide-step-transition.d.ts +71 -0
  147. package/dist/core/step-transition/decide-step-transition.d.ts.map +1 -0
  148. package/dist/core/step-transition/decide-step-transition.js +110 -0
  149. package/dist/core/step-transition/decide-step-transition.js.map +1 -0
  150. package/dist/core/step-transition/evaluate-gate.d.ts +28 -0
  151. package/dist/core/step-transition/evaluate-gate.d.ts.map +1 -0
  152. package/dist/core/step-transition/evaluate-gate.js +159 -0
  153. package/dist/core/step-transition/evaluate-gate.js.map +1 -0
  154. package/dist/core/step-transition/read-step-outputs.d.ts +3 -0
  155. package/dist/core/step-transition/read-step-outputs.d.ts.map +1 -0
  156. package/dist/core/step-transition/read-step-outputs.js +24 -0
  157. package/dist/core/step-transition/read-step-outputs.js.map +1 -0
  158. package/dist/core/workflow-run-creation.d.ts +43 -0
  159. package/dist/core/workflow-run-creation.d.ts.map +1 -0
  160. package/dist/core/workflow-run-creation.js +80 -0
  161. package/dist/core/workflow-run-creation.js.map +1 -0
  162. package/dist/core/workflow-scheduling/index.d.ts +5 -0
  163. package/dist/core/workflow-scheduling/index.d.ts.map +1 -0
  164. package/dist/core/workflow-scheduling/index.js +4 -0
  165. package/dist/core/workflow-scheduling/index.js.map +1 -0
  166. package/dist/core/workflow-scheduling/run-progress.d.ts +20 -0
  167. package/dist/core/workflow-scheduling/run-progress.d.ts.map +1 -0
  168. package/dist/core/workflow-scheduling/run-progress.js +40 -0
  169. package/dist/core/workflow-scheduling/run-progress.js.map +1 -0
  170. package/dist/core/workflow-scheduling/runtime-dag.d.ts +10 -0
  171. package/dist/core/workflow-scheduling/runtime-dag.d.ts.map +1 -0
  172. package/dist/core/workflow-scheduling/runtime-dag.js +3 -0
  173. package/dist/core/workflow-scheduling/runtime-dag.js.map +1 -0
  174. package/dist/core/workflow-scheduling/runtime-scheduling-command.d.ts +16 -0
  175. package/dist/core/workflow-scheduling/runtime-scheduling-command.d.ts.map +1 -0
  176. package/dist/core/workflow-scheduling/runtime-scheduling-command.js +3 -0
  177. package/dist/core/workflow-scheduling/runtime-scheduling-command.js.map +1 -0
  178. package/dist/core/workflow-scheduling/schedule-runtime-dag.d.ts +9 -0
  179. package/dist/core/workflow-scheduling/schedule-runtime-dag.d.ts.map +1 -0
  180. package/dist/core/workflow-scheduling/schedule-runtime-dag.js +72 -0
  181. package/dist/core/workflow-scheduling/schedule-runtime-dag.js.map +1 -0
  182. package/dist/db/db.d.ts +4959 -0
  183. package/dist/db/db.d.ts.map +1 -0
  184. package/dist/db/db.js +37 -0
  185. package/dist/db/db.js.map +1 -0
  186. package/dist/db/index.d.ts +9 -0
  187. package/dist/db/index.d.ts.map +1 -0
  188. package/dist/db/index.js +10 -0
  189. package/dist/db/index.js.map +1 -0
  190. package/dist/db/job-listener-events.d.ts +18 -0
  191. package/dist/db/job-listener-events.d.ts.map +1 -0
  192. package/dist/db/job-listener-events.js +59 -0
  193. package/dist/db/job-listener-events.js.map +1 -0
  194. package/dist/db/job-listeners.d.ts +55 -0
  195. package/dist/db/job-listeners.d.ts.map +1 -0
  196. package/dist/db/job-listeners.js +358 -0
  197. package/dist/db/job-listeners.js.map +1 -0
  198. package/dist/db/outbox-writes.d.ts +12 -0
  199. package/dist/db/outbox-writes.d.ts.map +1 -0
  200. package/dist/db/outbox-writes.js +20 -0
  201. package/dist/db/outbox-writes.js.map +1 -0
  202. package/dist/db/runner-lease-table.d.ts +469 -0
  203. package/dist/db/runner-lease-table.d.ts.map +1 -0
  204. package/dist/db/runner-lease-table.js +42 -0
  205. package/dist/db/runner-lease-table.js.map +1 -0
  206. package/dist/db/schema/common.d.ts +2 -0
  207. package/dist/db/schema/common.d.ts.map +1 -0
  208. package/dist/db/schema/common.js +4 -0
  209. package/dist/db/schema/common.js.map +1 -0
  210. package/dist/db/schema/job-executions.d.ts +311 -0
  211. package/dist/db/schema/job-executions.d.ts.map +1 -0
  212. package/dist/db/schema/job-executions.js +76 -0
  213. package/dist/db/schema/job-executions.js.map +1 -0
  214. package/dist/db/schema/job-listener-events.d.ts +200 -0
  215. package/dist/db/schema/job-listener-events.d.ts.map +1 -0
  216. package/dist/db/schema/job-listener-events.js +50 -0
  217. package/dist/db/schema/job-listener-events.js.map +1 -0
  218. package/dist/db/schema/jobs.d.ts +542 -0
  219. package/dist/db/schema/jobs.d.ts.map +1 -0
  220. package/dist/db/schema/jobs.js +121 -0
  221. package/dist/db/schema/jobs.js.map +1 -0
  222. package/dist/db/schema/outbox.d.ts +195 -0
  223. package/dist/db/schema/outbox.d.ts.map +1 -0
  224. package/dist/db/schema/outbox.js +5 -0
  225. package/dist/db/schema/outbox.js.map +1 -0
  226. package/dist/db/schema/step-attempts.d.ts +330 -0
  227. package/dist/db/schema/step-attempts.d.ts.map +1 -0
  228. package/dist/db/schema/step-attempts.js +80 -0
  229. package/dist/db/schema/step-attempts.js.map +1 -0
  230. package/dist/db/schema/steps.d.ts +352 -0
  231. package/dist/db/schema/steps.d.ts.map +1 -0
  232. package/dist/db/schema/steps.js +80 -0
  233. package/dist/db/schema/steps.js.map +1 -0
  234. package/dist/db/schema/workflow-run-attempts.d.ts +239 -0
  235. package/dist/db/schema/workflow-run-attempts.d.ts.map +1 -0
  236. package/dist/db/schema/workflow-run-attempts.js +53 -0
  237. package/dist/db/schema/workflow-run-attempts.js.map +1 -0
  238. package/dist/db/schema/workflow-runs.d.ts +360 -0
  239. package/dist/db/schema/workflow-runs.d.ts.map +1 -0
  240. package/dist/db/schema/workflow-runs.js +85 -0
  241. package/dist/db/schema/workflow-runs.js.map +1 -0
  242. package/dist/db/workflow-runs/job-executions.d.ts +49 -0
  243. package/dist/db/workflow-runs/job-executions.d.ts.map +1 -0
  244. package/dist/db/workflow-runs/job-executions.js +271 -0
  245. package/dist/db/workflow-runs/job-executions.js.map +1 -0
  246. package/dist/db/workflow-runs/jobs.d.ts +60 -0
  247. package/dist/db/workflow-runs/jobs.d.ts.map +1 -0
  248. package/dist/db/workflow-runs/jobs.js +288 -0
  249. package/dist/db/workflow-runs/jobs.js.map +1 -0
  250. package/dist/db/workflow-runs/outbox.d.ts +20 -0
  251. package/dist/db/workflow-runs/outbox.d.ts.map +1 -0
  252. package/dist/db/workflow-runs/outbox.js +68 -0
  253. package/dist/db/workflow-runs/outbox.js.map +1 -0
  254. package/dist/db/workflow-runs/queries.d.ts +71 -0
  255. package/dist/db/workflow-runs/queries.d.ts.map +1 -0
  256. package/dist/db/workflow-runs/queries.js +253 -0
  257. package/dist/db/workflow-runs/queries.js.map +1 -0
  258. package/dist/db/workflow-runs/run-create.d.ts +32 -0
  259. package/dist/db/workflow-runs/run-create.d.ts.map +1 -0
  260. package/dist/db/workflow-runs/run-create.js +288 -0
  261. package/dist/db/workflow-runs/run-create.js.map +1 -0
  262. package/dist/db/workflow-runs/run-graph.d.ts +27 -0
  263. package/dist/db/workflow-runs/run-graph.d.ts.map +1 -0
  264. package/dist/db/workflow-runs/run-graph.js +63 -0
  265. package/dist/db/workflow-runs/run-graph.js.map +1 -0
  266. package/dist/db/workflow-runs/run-rerun.d.ts +8 -0
  267. package/dist/db/workflow-runs/run-rerun.d.ts.map +1 -0
  268. package/dist/db/workflow-runs/run-rerun.js +207 -0
  269. package/dist/db/workflow-runs/run-rerun.js.map +1 -0
  270. package/dist/db/workflow-runs/run-status.d.ts +24 -0
  271. package/dist/db/workflow-runs/run-status.d.ts.map +1 -0
  272. package/dist/db/workflow-runs/run-status.js +249 -0
  273. package/dist/db/workflow-runs/run-status.js.map +1 -0
  274. package/dist/db/workflow-runs/runs.d.ts +7 -0
  275. package/dist/db/workflow-runs/runs.d.ts.map +1 -0
  276. package/dist/db/workflow-runs/runs.js +5 -0
  277. package/dist/db/workflow-runs/runs.js.map +1 -0
  278. package/dist/db/workflow-runs/shared.d.ts +24 -0
  279. package/dist/db/workflow-runs/shared.d.ts.map +1 -0
  280. package/dist/db/workflow-runs/shared.js +50 -0
  281. package/dist/db/workflow-runs/shared.js.map +1 -0
  282. package/dist/db/workflow-runs/steps.d.ts +83 -0
  283. package/dist/db/workflow-runs/steps.d.ts.map +1 -0
  284. package/dist/db/workflow-runs/steps.js +246 -0
  285. package/dist/db/workflow-runs/steps.js.map +1 -0
  286. package/dist/db/workflow-runs.d.ts +12 -0
  287. package/dist/db/workflow-runs.d.ts.map +1 -0
  288. package/dist/db/workflow-runs.js +8 -0
  289. package/dist/db/workflow-runs.js.map +1 -0
  290. package/dist/index.d.ts +10 -0
  291. package/dist/index.d.ts.map +1 -0
  292. package/dist/index.js +54 -0
  293. package/dist/index.js.map +1 -0
  294. package/dist/metrics/index.d.ts +2 -0
  295. package/dist/metrics/index.d.ts.map +1 -0
  296. package/dist/metrics/index.js +3 -0
  297. package/dist/metrics/index.js.map +1 -0
  298. package/dist/metrics/instance.d.ts +20 -0
  299. package/dist/metrics/instance.d.ts.map +1 -0
  300. package/dist/metrics/instance.js +127 -0
  301. package/dist/metrics/instance.js.map +1 -0
  302. package/dist/metrics/service.d.ts +2 -0
  303. package/dist/metrics/service.d.ts.map +1 -0
  304. package/dist/metrics/service.js +30 -0
  305. package/dist/metrics/service.js.map +1 -0
  306. package/dist/presentation/dto/checkout-token.d.ts +6 -0
  307. package/dist/presentation/dto/checkout-token.d.ts.map +1 -0
  308. package/dist/presentation/dto/checkout-token.js +74 -0
  309. package/dist/presentation/dto/checkout-token.js.map +1 -0
  310. package/dist/presentation/dto/index.d.ts +4 -0
  311. package/dist/presentation/dto/index.d.ts.map +1 -0
  312. package/dist/presentation/dto/index.js +5 -0
  313. package/dist/presentation/dto/index.js.map +1 -0
  314. package/dist/presentation/dto/job.d.ts +6 -0
  315. package/dist/presentation/dto/job.d.ts.map +1 -0
  316. package/dist/presentation/dto/job.js +59 -0
  317. package/dist/presentation/dto/job.js.map +1 -0
  318. package/dist/presentation/dto/step.d.ts +6 -0
  319. package/dist/presentation/dto/step.d.ts.map +1 -0
  320. package/dist/presentation/dto/step.js +162 -0
  321. package/dist/presentation/dto/step.js.map +1 -0
  322. package/dist/presentation/dto/workflow-run.d.ts +6 -0
  323. package/dist/presentation/dto/workflow-run.d.ts.map +1 -0
  324. package/dist/presentation/dto/workflow-run.js +35 -0
  325. package/dist/presentation/dto/workflow-run.js.map +1 -0
  326. package/dist/presentation/index.d.ts +3 -0
  327. package/dist/presentation/index.d.ts.map +1 -0
  328. package/dist/presentation/index.js +4 -0
  329. package/dist/presentation/index.js.map +1 -0
  330. package/dist/presentation/routes/agent-runtime-config.d.ts +2 -0
  331. package/dist/presentation/routes/agent-runtime-config.d.ts.map +1 -0
  332. package/dist/presentation/routes/agent-runtime-config.js +71 -0
  333. package/dist/presentation/routes/agent-runtime-config.js.map +1 -0
  334. package/dist/presentation/routes/cancel-run.d.ts +2 -0
  335. package/dist/presentation/routes/cancel-run.d.ts.map +1 -0
  336. package/dist/presentation/routes/cancel-run.js +46 -0
  337. package/dist/presentation/routes/cancel-run.js.map +1 -0
  338. package/dist/presentation/routes/checkout-token.d.ts +2 -0
  339. package/dist/presentation/routes/checkout-token.d.ts.map +1 -0
  340. package/dist/presentation/routes/checkout-token.js +64 -0
  341. package/dist/presentation/routes/checkout-token.js.map +1 -0
  342. package/dist/presentation/routes/get-run-aggregates.d.ts +2 -0
  343. package/dist/presentation/routes/get-run-aggregates.d.ts.map +1 -0
  344. package/dist/presentation/routes/get-run-aggregates.js +60 -0
  345. package/dist/presentation/routes/get-run-aggregates.js.map +1 -0
  346. package/dist/presentation/routes/get-run.d.ts +2 -0
  347. package/dist/presentation/routes/get-run.d.ts.map +1 -0
  348. package/dist/presentation/routes/get-run.js +60 -0
  349. package/dist/presentation/routes/get-run.js.map +1 -0
  350. package/dist/presentation/routes/get-step-secrets.d.ts +2 -0
  351. package/dist/presentation/routes/get-step-secrets.d.ts.map +1 -0
  352. package/dist/presentation/routes/get-step-secrets.js +115 -0
  353. package/dist/presentation/routes/get-step-secrets.js.map +1 -0
  354. package/dist/presentation/routes/index.d.ts +4 -0
  355. package/dist/presentation/routes/index.d.ts.map +1 -0
  356. package/dist/presentation/routes/index.js +41 -0
  357. package/dist/presentation/routes/index.js.map +1 -0
  358. package/dist/presentation/routes/leased-step.d.ts +14 -0
  359. package/dist/presentation/routes/leased-step.d.ts.map +1 -0
  360. package/dist/presentation/routes/leased-step.js +50 -0
  361. package/dist/presentation/routes/leased-step.js.map +1 -0
  362. package/dist/presentation/routes/list-run-attempts.d.ts +2 -0
  363. package/dist/presentation/routes/list-run-attempts.d.ts.map +1 -0
  364. package/dist/presentation/routes/list-run-attempts.js +35 -0
  365. package/dist/presentation/routes/list-run-attempts.js.map +1 -0
  366. package/dist/presentation/routes/list-runs.d.ts +2 -0
  367. package/dist/presentation/routes/list-runs.d.ts.map +1 -0
  368. package/dist/presentation/routes/list-runs.js +70 -0
  369. package/dist/presentation/routes/list-runs.js.map +1 -0
  370. package/dist/presentation/routes/next-step.d.ts +2 -0
  371. package/dist/presentation/routes/next-step.d.ts.map +1 -0
  372. package/dist/presentation/routes/next-step.js +65 -0
  373. package/dist/presentation/routes/next-step.js.map +1 -0
  374. package/dist/presentation/routes/report-step.d.ts +2 -0
  375. package/dist/presentation/routes/report-step.d.ts.map +1 -0
  376. package/dist/presentation/routes/report-step.js +73 -0
  377. package/dist/presentation/routes/report-step.js.map +1 -0
  378. package/dist/presentation/routes/require-accessible-run.d.ts +7 -0
  379. package/dist/presentation/routes/require-accessible-run.d.ts.map +1 -0
  380. package/dist/presentation/routes/require-accessible-run.js +25 -0
  381. package/dist/presentation/routes/require-accessible-run.js.map +1 -0
  382. package/dist/presentation/routes/rerun-run.d.ts +2 -0
  383. package/dist/presentation/routes/rerun-run.d.ts.map +1 -0
  384. package/dist/presentation/routes/rerun-run.js +56 -0
  385. package/dist/presentation/routes/rerun-run.js.map +1 -0
  386. package/dist/presentation/subscribers/index.d.ts +8 -0
  387. package/dist/presentation/subscribers/index.d.ts.map +1 -0
  388. package/dist/presentation/subscribers/index.js +9 -0
  389. package/dist/presentation/subscribers/index.js.map +1 -0
  390. package/dist/presentation/subscribers/on-job-event-delivered.d.ts +3 -0
  391. package/dist/presentation/subscribers/on-job-event-delivered.d.ts.map +1 -0
  392. package/dist/presentation/subscribers/on-job-event-delivered.js +24 -0
  393. package/dist/presentation/subscribers/on-job-event-delivered.js.map +1 -0
  394. package/dist/presentation/subscribers/on-job-steps-settled.d.ts +3 -0
  395. package/dist/presentation/subscribers/on-job-steps-settled.d.ts.map +1 -0
  396. package/dist/presentation/subscribers/on-job-steps-settled.js +36 -0
  397. package/dist/presentation/subscribers/on-job-steps-settled.js.map +1 -0
  398. package/dist/presentation/subscribers/on-runner-job-claimed.d.ts +3 -0
  399. package/dist/presentation/subscribers/on-runner-job-claimed.d.ts.map +1 -0
  400. package/dist/presentation/subscribers/on-runner-job-claimed.js +20 -0
  401. package/dist/presentation/subscribers/on-runner-job-claimed.js.map +1 -0
  402. package/dist/presentation/subscribers/on-runner-job-lease-expired.d.ts +3 -0
  403. package/dist/presentation/subscribers/on-runner-job-lease-expired.d.ts.map +1 -0
  404. package/dist/presentation/subscribers/on-runner-job-lease-expired.js +35 -0
  405. package/dist/presentation/subscribers/on-runner-job-lease-expired.js.map +1 -0
  406. package/dist/presentation/subscribers/on-runner-job-queued.d.ts +3 -0
  407. package/dist/presentation/subscribers/on-runner-job-queued.d.ts.map +1 -0
  408. package/dist/presentation/subscribers/on-runner-job-queued.js +20 -0
  409. package/dist/presentation/subscribers/on-runner-job-queued.js.map +1 -0
  410. package/dist/presentation/subscribers/on-workflow-run-attempt-created.d.ts +3 -0
  411. package/dist/presentation/subscribers/on-workflow-run-attempt-created.d.ts.map +1 -0
  412. package/dist/presentation/subscribers/on-workflow-run-attempt-created.js +35 -0
  413. package/dist/presentation/subscribers/on-workflow-run-attempt-created.js.map +1 -0
  414. package/dist/presentation/subscribers/on-workflow-run-cancelled.d.ts +3 -0
  415. package/dist/presentation/subscribers/on-workflow-run-cancelled.d.ts.map +1 -0
  416. package/dist/presentation/subscribers/on-workflow-run-cancelled.js +25 -0
  417. package/dist/presentation/subscribers/on-workflow-run-cancelled.js.map +1 -0
  418. package/dist/temporal/activities/index.d.ts +23 -0
  419. package/dist/temporal/activities/index.d.ts.map +1 -0
  420. package/dist/temporal/activities/index.js +26 -0
  421. package/dist/temporal/activities/index.js.map +1 -0
  422. package/dist/temporal/activities/orchestration-activities.d.ts +130 -0
  423. package/dist/temporal/activities/orchestration-activities.d.ts.map +1 -0
  424. package/dist/temporal/activities/orchestration-activities.js +188 -0
  425. package/dist/temporal/activities/orchestration-activities.js.map +1 -0
  426. package/dist/temporal/constants.d.ts +7 -0
  427. package/dist/temporal/constants.d.ts.map +1 -0
  428. package/dist/temporal/constants.js +8 -0
  429. package/dist/temporal/constants.js.map +1 -0
  430. package/dist/temporal/index.d.ts +3 -0
  431. package/dist/temporal/index.d.ts.map +1 -0
  432. package/dist/temporal/index.js +4 -0
  433. package/dist/temporal/index.js.map +1 -0
  434. package/dist/temporal/workflow-not-found.d.ts +2 -0
  435. package/dist/temporal/workflow-not-found.d.ts.map +1 -0
  436. package/dist/temporal/workflow-not-found.js +10 -0
  437. package/dist/temporal/workflow-not-found.js.map +1 -0
  438. package/dist/temporal/workflows/deadline.d.ts +3 -0
  439. package/dist/temporal/workflows/deadline.d.ts.map +1 -0
  440. package/dist/temporal/workflows/deadline.js +8 -0
  441. package/dist/temporal/workflows/deadline.js.map +1 -0
  442. package/dist/temporal/workflows/index.d.ts +4 -0
  443. package/dist/temporal/workflows/index.d.ts.map +1 -0
  444. package/dist/temporal/workflows/index.js +5 -0
  445. package/dist/temporal/workflows/index.js.map +1 -0
  446. package/dist/temporal/workflows/job-execution-orchestration.d.ts +27 -0
  447. package/dist/temporal/workflows/job-execution-orchestration.d.ts.map +1 -0
  448. package/dist/temporal/workflows/job-execution-orchestration.js +265 -0
  449. package/dist/temporal/workflows/job-execution-orchestration.js.map +1 -0
  450. package/dist/temporal/workflows/job-listener-orchestration.d.ts +40 -0
  451. package/dist/temporal/workflows/job-listener-orchestration.d.ts.map +1 -0
  452. package/dist/temporal/workflows/job-listener-orchestration.js +332 -0
  453. package/dist/temporal/workflows/job-listener-orchestration.js.map +1 -0
  454. package/dist/temporal/workflows/run-orchestration.d.ts +8 -0
  455. package/dist/temporal/workflows/run-orchestration.d.ts.map +1 -0
  456. package/dist/temporal/workflows/run-orchestration.js +243 -0
  457. package/dist/temporal/workflows/run-orchestration.js.map +1 -0
  458. package/dist/temporal/workflows/test-env.d.ts +114 -0
  459. package/dist/temporal/workflows/test-env.d.ts.map +1 -0
  460. package/dist/temporal/workflows/test-env.js +323 -0
  461. package/dist/temporal/workflows/test-env.js.map +1 -0
  462. package/dist/tsconfig.test.tsbuildinfo +1 -0
  463. package/drizzle/0000_initial.sql +211 -0
  464. package/drizzle/0001_agent_tool_materialization.sql +1 -0
  465. package/drizzle/meta/0000_snapshot.json +1613 -0
  466. package/drizzle/meta/_journal.json +20 -0
  467. package/drizzle.config.ts +7 -0
  468. package/package.json +91 -0
  469. package/src/core/README.md +79 -0
  470. package/src/core/agent-tool-capability-warning.test.ts +280 -0
  471. package/src/core/agent-tool-capability-warning.ts +200 -0
  472. package/src/core/agent-tools.ts +422 -0
  473. package/src/core/checkout.test.ts +112 -0
  474. package/src/core/checkout.ts +63 -0
  475. package/src/core/condition-trace.ts +64 -0
  476. package/src/core/entities/index.ts +9 -0
  477. package/src/core/entities/job-execution.ts +32 -0
  478. package/src/core/entities/job-listener-event.ts +15 -0
  479. package/src/core/entities/job.ts +91 -0
  480. package/src/core/entities/step.ts +126 -0
  481. package/src/core/entities/workflow-run-attempt.ts +21 -0
  482. package/src/core/entities/workflow-run.ts +94 -0
  483. package/src/core/errors.test.ts +45 -0
  484. package/src/core/errors.ts +209 -0
  485. package/src/core/index.ts +54 -0
  486. package/src/core/job-execution-outcome.ts +64 -0
  487. package/src/core/job-execution.test.ts +1560 -0
  488. package/src/core/job-execution.ts +581 -0
  489. package/src/core/job-transition/decide-job-activation.test.ts +196 -0
  490. package/src/core/job-transition/decide-job-activation.ts +79 -0
  491. package/src/core/job-transition/derive-job-execution-outputs.ts +41 -0
  492. package/src/core/job-transition/derive-job-success.test.ts +133 -0
  493. package/src/core/job-transition/derive-job-success.ts +67 -0
  494. package/src/core/job-transition/index.ts +11 -0
  495. package/src/core/job-transition/runtime-completion-status-for-job.ts +14 -0
  496. package/src/core/listener-execution-materialization.test.ts +49 -0
  497. package/src/core/listener-execution-materialization.ts +162 -0
  498. package/src/core/run-workflow.test.ts +229 -0
  499. package/src/core/run-workflow.ts +41 -0
  500. package/src/core/source-control.test.ts +17 -0
  501. package/src/core/source-control.ts +22 -0
  502. package/src/core/step-config/agent.ts +459 -0
  503. package/src/core/step-config/assemble-run-context.test.ts +1021 -0
  504. package/src/core/step-config/assemble-run-context.ts +535 -0
  505. package/src/core/step-config/complete-step-dispatch-config.test.ts +354 -0
  506. package/src/core/step-config/complete-step-dispatch-config.ts +40 -0
  507. package/src/core/step-config/fields.ts +111 -0
  508. package/src/core/step-config/index.ts +41 -0
  509. package/src/core/step-config/materialize-job-execution-steps.test.ts +494 -0
  510. package/src/core/step-config/materialize-job-execution-steps.ts +136 -0
  511. package/src/core/step-config/materialize-workflow-model.test.ts +1214 -0
  512. package/src/core/step-config/materialize-workflow-model.ts +140 -0
  513. package/src/core/step-config/resolve-job-execution-name.test.ts +94 -0
  514. package/src/core/step-config/resolve-job-execution-name.ts +51 -0
  515. package/src/core/step-config/resolve-step-config.ts +199 -0
  516. package/src/core/step-config/run.ts +467 -0
  517. package/src/core/step-config/workflow-evaluation-context.ts +6 -0
  518. package/src/core/step-transition/apply-step-transition.ts +163 -0
  519. package/src/core/step-transition/decide-step-transition.test.ts +307 -0
  520. package/src/core/step-transition/decide-step-transition.ts +200 -0
  521. package/src/core/step-transition/evaluate-gate.test.ts +317 -0
  522. package/src/core/step-transition/evaluate-gate.ts +168 -0
  523. package/src/core/step-transition/read-step-outputs.ts +27 -0
  524. package/src/core/workflow-run-creation.test.ts +155 -0
  525. package/src/core/workflow-run-creation.ts +131 -0
  526. package/src/core/workflow-scheduling/index.ts +15 -0
  527. package/src/core/workflow-scheduling/run-progress.test.ts +46 -0
  528. package/src/core/workflow-scheduling/run-progress.ts +68 -0
  529. package/src/core/workflow-scheduling/runtime-dag.ts +10 -0
  530. package/src/core/workflow-scheduling/runtime-scheduling-command.ts +20 -0
  531. package/src/core/workflow-scheduling/schedule-runtime-dag.test.ts +197 -0
  532. package/src/core/workflow-scheduling/schedule-runtime-dag.ts +115 -0
  533. package/src/db/db.ts +40 -0
  534. package/src/db/index.ts +86 -0
  535. package/src/db/job-listener-events.test.ts +113 -0
  536. package/src/db/job-listener-events.ts +73 -0
  537. package/src/db/job-listeners.test.ts +865 -0
  538. package/src/db/job-listeners.ts +564 -0
  539. package/src/db/outbox-writes.ts +40 -0
  540. package/src/db/rerun-listener.test.ts +64 -0
  541. package/src/db/run-timeout.test.ts +102 -0
  542. package/src/db/runner-lease-table.ts +39 -0
  543. package/src/db/schema/common.ts +3 -0
  544. package/src/db/schema/job-executions.ts +85 -0
  545. package/src/db/schema/job-listener-events.ts +58 -0
  546. package/src/db/schema/jobs.ts +136 -0
  547. package/src/db/schema/outbox.ts +4 -0
  548. package/src/db/schema/step-attempts.ts +99 -0
  549. package/src/db/schema/steps.ts +99 -0
  550. package/src/db/schema/workflow-run-attempts.ts +59 -0
  551. package/src/db/schema/workflow-runs.ts +112 -0
  552. package/src/db/workflow-runs/job-executions.test.ts +99 -0
  553. package/src/db/workflow-runs/job-executions.ts +421 -0
  554. package/src/db/workflow-runs/job-status.test.ts +532 -0
  555. package/src/db/workflow-runs/jobs.test.ts +194 -0
  556. package/src/db/workflow-runs/jobs.ts +418 -0
  557. package/src/db/workflow-runs/outbox.ts +109 -0
  558. package/src/db/workflow-runs/queries.test.ts +256 -0
  559. package/src/db/workflow-runs/queries.ts +437 -0
  560. package/src/db/workflow-runs/run-create.test.ts +1281 -0
  561. package/src/db/workflow-runs/run-create.ts +373 -0
  562. package/src/db/workflow-runs/run-graph.ts +95 -0
  563. package/src/db/workflow-runs/run-rerun.test.ts +625 -0
  564. package/src/db/workflow-runs/run-rerun.ts +266 -0
  565. package/src/db/workflow-runs/run-status.test.ts +425 -0
  566. package/src/db/workflow-runs/run-status.ts +391 -0
  567. package/src/db/workflow-runs/runs.ts +17 -0
  568. package/src/db/workflow-runs/shared.ts +84 -0
  569. package/src/db/workflow-runs/steps.test.ts +191 -0
  570. package/src/db/workflow-runs/steps.ts +476 -0
  571. package/src/db/workflow-runs.ts +111 -0
  572. package/src/index.ts +99 -0
  573. package/src/metrics/index.ts +1 -0
  574. package/src/metrics/instance.ts +160 -0
  575. package/src/metrics/service.ts +30 -0
  576. package/src/presentation/dto/checkout-token.test.ts +107 -0
  577. package/src/presentation/dto/checkout-token.ts +85 -0
  578. package/src/presentation/dto/index.ts +3 -0
  579. package/src/presentation/dto/job.test.ts +108 -0
  580. package/src/presentation/dto/job.ts +64 -0
  581. package/src/presentation/dto/step.test.ts +307 -0
  582. package/src/presentation/dto/step.ts +145 -0
  583. package/src/presentation/dto/workflow-run.ts +38 -0
  584. package/src/presentation/index.ts +10 -0
  585. package/src/presentation/routes/agent-runtime-config.test.ts +478 -0
  586. package/src/presentation/routes/agent-runtime-config.ts +81 -0
  587. package/src/presentation/routes/cancel-run.test.ts +156 -0
  588. package/src/presentation/routes/cancel-run.ts +37 -0
  589. package/src/presentation/routes/checkout-token.test.ts +366 -0
  590. package/src/presentation/routes/checkout-token.ts +61 -0
  591. package/src/presentation/routes/get-run-aggregates.test.ts +114 -0
  592. package/src/presentation/routes/get-run-aggregates.ts +69 -0
  593. package/src/presentation/routes/get-run.test.ts +604 -0
  594. package/src/presentation/routes/get-run.ts +66 -0
  595. package/src/presentation/routes/get-step-secrets.test.ts +260 -0
  596. package/src/presentation/routes/get-step-secrets.ts +117 -0
  597. package/src/presentation/routes/index.test.ts +71 -0
  598. package/src/presentation/routes/index.ts +42 -0
  599. package/src/presentation/routes/leased-step.ts +54 -0
  600. package/src/presentation/routes/list-run-attempts.test.ts +163 -0
  601. package/src/presentation/routes/list-run-attempts.ts +27 -0
  602. package/src/presentation/routes/list-runs.test.ts +244 -0
  603. package/src/presentation/routes/list-runs.ts +83 -0
  604. package/src/presentation/routes/next-step.test.ts +366 -0
  605. package/src/presentation/routes/next-step.ts +62 -0
  606. package/src/presentation/routes/report-step.test.ts +374 -0
  607. package/src/presentation/routes/report-step.ts +61 -0
  608. package/src/presentation/routes/require-accessible-run.ts +27 -0
  609. package/src/presentation/routes/rerun-run.test.ts +202 -0
  610. package/src/presentation/routes/rerun-run.ts +48 -0
  611. package/src/presentation/subscribers/index.ts +7 -0
  612. package/src/presentation/subscribers/on-job-event-delivered.test.ts +71 -0
  613. package/src/presentation/subscribers/on-job-event-delivered.ts +30 -0
  614. package/src/presentation/subscribers/on-job-steps-settled.test.ts +75 -0
  615. package/src/presentation/subscribers/on-job-steps-settled.ts +42 -0
  616. package/src/presentation/subscribers/on-runner-job-claimed.test.ts +57 -0
  617. package/src/presentation/subscribers/on-runner-job-claimed.ts +23 -0
  618. package/src/presentation/subscribers/on-runner-job-lease-expired.test.ts +73 -0
  619. package/src/presentation/subscribers/on-runner-job-lease-expired.ts +36 -0
  620. package/src/presentation/subscribers/on-runner-job-queued.test.ts +57 -0
  621. package/src/presentation/subscribers/on-runner-job-queued.ts +23 -0
  622. package/src/presentation/subscribers/on-workflow-run-attempt-created.test.ts +69 -0
  623. package/src/presentation/subscribers/on-workflow-run-attempt-created.ts +40 -0
  624. package/src/presentation/subscribers/on-workflow-run-cancelled.test.ts +59 -0
  625. package/src/presentation/subscribers/on-workflow-run-cancelled.ts +29 -0
  626. package/src/temporal/activities/index.ts +45 -0
  627. package/src/temporal/activities/orchestration-activities.test.ts +115 -0
  628. package/src/temporal/activities/orchestration-activities.ts +305 -0
  629. package/src/temporal/constants.ts +6 -0
  630. package/src/temporal/index.ts +6 -0
  631. package/src/temporal/workflow-not-found.ts +9 -0
  632. package/src/temporal/workflows/deadline.ts +7 -0
  633. package/src/temporal/workflows/index.ts +11 -0
  634. package/src/temporal/workflows/job-execution-orchestration-timeout.test.ts +165 -0
  635. package/src/temporal/workflows/job-execution-orchestration.test.ts +311 -0
  636. package/src/temporal/workflows/job-execution-orchestration.ts +314 -0
  637. package/src/temporal/workflows/job-listener-orchestration-continuation.test.ts +93 -0
  638. package/src/temporal/workflows/job-listener-orchestration.test.ts +406 -0
  639. package/src/temporal/workflows/job-listener-orchestration.ts +490 -0
  640. package/src/temporal/workflows/run-orchestration.test.ts +409 -0
  641. package/src/temporal/workflows/run-orchestration.ts +283 -0
  642. package/src/temporal/workflows/test-env.ts +409 -0
  643. package/test/env.ts +11 -0
  644. package/test/factories/job.ts +83 -0
  645. package/test/factories/project.ts +16 -0
  646. package/test/factories/workflow-model.test.ts +26 -0
  647. package/test/factories/workflow-model.ts +268 -0
  648. package/test/factories/workflow-run.ts +58 -0
  649. package/test/fixtures/active-lease-token.ts +85 -0
  650. package/test/fixtures/job-with-steps.ts +42 -0
  651. package/test/fixtures/lease-token.ts +44 -0
  652. package/test/fixtures/strip-setup-step.ts +23 -0
  653. package/test/globalSetup.ts +54 -0
  654. package/test/helpers/workflow-runs.ts +210 -0
  655. package/test/index.ts +3 -0
  656. package/test/setup.ts +17 -0
  657. package/tsconfig.build.json +9 -0
  658. package/tsconfig.build.tsbuildinfo +1 -0
  659. package/tsconfig.json +3 -0
  660. package/tsconfig.test.json +8 -0
  661. package/vitest.config.ts +12 -0
@@ -0,0 +1,2 @@
1
+ $ shipfox-swc
2
+ Successfully compiled: 114 files with swc (161.1ms)
@@ -0,0 +1 @@
1
+ $ shipfox-tsc-emit
@@ -0,0 +1 @@
1
+ $ shipfox-tsc-check
package/CHANGELOG.md ADDED
@@ -0,0 +1,311 @@
1
+ # @shipfox/api-workflows
2
+
3
+ ## 2.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 1b0d344: Publishes the complete API runtime closure with packed-consumer-safe internal imports and records its exact package set in application releases.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [0cd6dd4]
12
+ - Updated dependencies [a68458a]
13
+ - Updated dependencies [6eba800]
14
+ - Updated dependencies [c31a7e0]
15
+ - Updated dependencies [1b0d344]
16
+ - Updated dependencies [521e006]
17
+ - @shipfox/node-module@0.2.0
18
+ - @shipfox/api-integration-core@2.0.0
19
+ - @shipfox/node-temporal@0.2.0
20
+ - @shipfox/api-auth@2.0.0
21
+ - @shipfox/annotations@2.0.0
22
+ - @shipfox/api-agent@2.0.0
23
+ - @shipfox/api-agent-dto@2.0.0
24
+ - @shipfox/api-auth-context@2.0.0
25
+ - @shipfox/api-definitions@2.0.0
26
+ - @shipfox/api-projects@2.0.0
27
+ - @shipfox/api-runners@2.0.0
28
+ - @shipfox/api-runners-dto@2.0.0
29
+ - @shipfox/api-secrets@2.0.0
30
+ - @shipfox/api-secrets-dto@2.0.0
31
+ - @shipfox/api-workflows-dto@2.0.0
32
+ - @shipfox/runner-labels@0.1.0
33
+ - @shipfox/expression@1.1.1
34
+ - @shipfox/node-drizzle@0.2.1
35
+ - @shipfox/node-error-monitoring@0.1.2
36
+ - @shipfox/node-fastify@0.2.1
37
+ - @shipfox/node-opentelemetry@0.5.0
38
+ - @shipfox/node-outbox@0.2.1
39
+ - @shipfox/node-postgres@0.4.1
40
+
41
+ ## 0.1.2
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [705dd43]
46
+ - @shipfox/node-outbox@0.2.0
47
+ - @shipfox/api-auth@0.1.2
48
+ - @shipfox/api-definitions@0.1.2
49
+ - @shipfox/api-integration-core@0.1.2
50
+ - @shipfox/api-projects@0.1.2
51
+ - @shipfox/api-runners@0.1.2
52
+ - @shipfox/api-secrets@0.1.2
53
+ - @shipfox/node-module@0.1.2
54
+ - @shipfox/annotations@0.0.3
55
+ - @shipfox/api-agent@0.1.2
56
+
57
+ ## 0.1.1
58
+
59
+ ### Patch Changes
60
+
61
+ - Updated dependencies [ec75cd5]
62
+ - Updated dependencies [6a1fb54]
63
+ - @shipfox/node-drizzle@0.2.0
64
+ - @shipfox/node-postgres@0.4.0
65
+ - @shipfox/api-agent@0.1.1
66
+ - @shipfox/annotations@0.0.2
67
+ - @shipfox/api-auth@0.1.1
68
+ - @shipfox/api-definitions@0.1.1
69
+ - @shipfox/api-integration-core@0.1.1
70
+ - @shipfox/api-projects@0.1.1
71
+ - @shipfox/api-runners@0.1.1
72
+ - @shipfox/api-secrets@0.1.1
73
+ - @shipfox/node-module@0.1.1
74
+ - @shipfox/node-outbox@0.1.1
75
+
76
+ ## 0.1.0
77
+
78
+ ### Minor Changes
79
+
80
+ - 5c18360: Durable gate restart: a failing gate's `on_failure.restart_from` now records the failed attempt, rewinds the job's step projection from the named earlier step back to pending (opening fresh attempts), and leaves the job running so it re-executes from there — all in one transaction with the report. A per-step attempt cap (default 3) bounds restart loops, exhausting to a `restart_exhausted` failure. Adds the `workflows.step.restart_enqueued` event.
81
+ - a56748d: Adds ingestion-time agent session parsing with a stored canonical SessionView read endpoint and workflow harness lookup.
82
+ - 7a9943d: Adds the backend contract for per-step execution: job claims mint a lease token for the step API, step reports carry attempts and exit codes, and workflow completion can be signalled through the workflows outbox. The runner-side step loop is intentionally owned by the follow-up runner protocol work.
83
+ - 736249b: Expose step attempts in the read API: the run-detail endpoint now returns `current_attempt` on each step plus its per-attempt history (`attempts[]`, with status, exit code, gate result and restart reason), so a restarted step's attempts are visible.
84
+ - 2bc5595: Adds workflow-run cancellation across the API, orchestration queue cleanup, event contract, and run-page cancel action.
85
+ - f9f059e: Cut the runner protocol over to per-step pull/report and remove the job-atomic path.
86
+
87
+ The job workflow now terminates on two signals: `job-finished` (raised by
88
+ `recordStepResult` on step exhaustion) and `job-lease-expired` (raised by the new
89
+ `runners.job.lease_expired` subscriber). A precedence ladder keeps a genuinely
90
+ finished job from being failed by a late lease expiry, and the lease-expiry branch
91
+ re-derives the outcome from the authoritative step projection in a single
92
+ transaction (server state is the final gate). On finish the workflow releases the
93
+ lease via `releaseJob` (deleting both the running and any orphaned pending row);
94
+ release is best-effort so a Scheduling outage never blocks the run DAG.
95
+
96
+ Removed the atomic path end to end: the runner `POST /runners/jobs/:jobId/complete`
97
+ route, the `RUNNER_JOB_COMPLETED` event, `finalizeRunningJob`/`completeJob`, the
98
+ `applyStepResults*` apply path and its workflow subscriber, and the dead
99
+ `jobPayload*`/`complete-job` DTO schemas. The runner now parses the step-less claim
100
+ response, and `claimPendingJob` drops an orphan pending row instead of poison-looping.
101
+
102
+ Internal breaking change (deleted exported DTOs/events and a runner route, plus a
103
+ Temporal signal rename) consumed only within this monorepo; backend and agent ship
104
+ together.
105
+
106
+ - f98c2be: [api/workflows] Add the lease-authed `POST /runs/jobs/current/checkout-token` endpoint. The runner exchanges its job lease for short-lived, read-only repository checkout credentials. The job's checkout intent is resolved server-side from the authoritative `jobId` claim (`job -> run -> project` source metadata) and minted on demand via the integration service's `createCheckoutSpec()`; no credential material is ever stored on the job/run or queued. `checkoutTokenResponseSchema.auth` stays optional so credential-free providers can return a public clone URL with no token, and `integrationRouteErrorHandler` is exported from `@shipfox/api-integration-core` so the route reuses the shared provider-error mapping.
107
+ - e9396c9: Give every runner-dispatched job a synthetic "Set up job" step at position 0 (à la GitHub Actions), so failures that happen around the user steps — workspace preparation today, the repository checkout next — are reported through the existing per-step protocol instead of hanging the job until the lease/timeout fires. The runner prepares the per-job workspace inside this step and reports the outcome; a failed setup flows through the existing fail-job cascade, finalizing the job `failed` in seconds with no user step run.
108
+
109
+ Extends `stepErrorDtoSchema` with an optional machine-readable `reason` (`workspace_prep_failed`, `git_unavailable`, `checkout_*`, `setup_aborted`) and a `category` (`setup` | `user`). The runner reports `reason`; the server derives `category` from the step type on read (the runner is an untrusted boundary). The restart resolver now skips the synthetic step so a user step named "Set up job" can never rewind setup mid-job.
110
+
111
+ - 139e3be: Execute step gates at runtime: evaluate `gate.success_if` (CEL) against the step's exit code to decide pass/fail — overriding the raw command status — and record the gate result on the attempt. A failing gate fails the job; a missing exit code or an evaluation error fails closed as a plain command failure; a failing gate with `on_failure.restart_from` fails closed with a structured `restart_unsupported` error until durable restart lands.
112
+ - c652a68: Add a single reliable job-terminal event: `workflows.job.terminated` is now written in the same transaction as every terminal job-status flip (normal completion, DAG cancellation, lease-expiry resolution, and timeout), and the run-level `workflows.workflow_run.terminated` is emitted the same way. All workflows event names are aligned on one `WORKFLOWS_<entity>_<verb>` scheme, so the run and job terminal events read as the same event at two scopes.
113
+
114
+ Internal breaking change (`WORKFLOWS_JOB_COMPLETED` → `WORKFLOWS_JOB_STEPS_SETTLED`, `WORKFLOW_RUN_*` → `WORKFLOWS_WORKFLOW_RUN_*`, with matching DTO type renames) consumed only within this monorepo.
115
+
116
+ - 121b42e: Track per-step execution attempts: add a `step_attempts` history table and a `steps.current_attempt` column, open a running attempt at dispatch and finalize it at report, and make step-result reporting attempt-aware (idempotent duplicate reports, rejected future attempts, no-op stale attempts).
117
+ - c0a883c: Adds the runner-facing per-step endpoints (`POST /runs/jobs/current/steps/next` and `/steps/:stepId/report`) authed by a locally-verified job lease token, with the matching request/response schemas.
118
+ - d69b164: Adds workflow run attempt lineage APIs and a run summary switcher for navigating rerun attempts.
119
+ - b74f635: Adds workflow run interpolation context resolution while preserving authored step configuration for reruns and diagnostics.
120
+ - e699508: Adds first-class skipped workflow jobs with persisted status reasons across API DTOs, orchestration, events, and client run views.
121
+
122
+ ### Patch Changes
123
+
124
+ - eb40964: Add an inline `agent` workflow step that the runner runs with the pi harness. A step is an agent step when it carries `model` + `prompt` and no `run`; it takes a free-text `model`, a single `prompt`, and an optional `thinking` level (default `high`). The step runs to process-success (the agent ran to completion) and reports through the existing step protocol with no runner/backend protocol change, so change quality is judged by a downstream `run` + `gate` step. v1 does not persist the agent's work (no diff, commit, or PR).
125
+ - 2c156d2: Extracts pure workflow runtime scheduling decisions behind the existing workflows orchestration host.
126
+ - f788565: Unifies workflow step config field resolution and agent default completion across creation and dispatch fill sites.
127
+ - b1f57d1: Moves agent model provider credentials onto the shared secrets store while keeping provider config metadata and runtime resolution behavior intact.
128
+ - 97162dd: Resolves model provider, model, and thinking defaults at workflow run creation using workspace and instance configuration.
129
+ - b694b09: Add the per-step progression domain service (`nextStepForJob`, `recordStepResult`) and its guarded DB primitives over the existing `steps` table. Dormant until the per-step runner protocol is wired into the HTTP and orchestration layers; no runtime behavior changes yet.
130
+ - c47be09: Reshape Scheduling around runner job leases. Jobs are now enqueued with `workflowRunId`, `workflowRunAttemptId`, `jobId`, and `jobExecutionId`; the claim route mints a job lease token and returns the same workflow/job identity tuple. The stuck-job detector emits `runners.job.lease_expired` with that tuple when a lease expires.
131
+ - ae7a63c: Adds daily dispatched outbox row retention with bounded cleanup batches and retention indexes on module outbox tables.
132
+ - e250c4c: Propagates `projectId` end-to-end into the job lease token. Workflows sources the `{workspaceId, projectId, workflowRunId, workflowRunAttemptId, jobId, jobExecutionId}` identity tuple and threads it through the runner pending/running job tables and lease claims. This is lease-shape groundwork for per-project log-ingest authorization; the stream-stamping consumer lands separately.
133
+ - b525dcd: Let an agent workflow step pick its pi provider with an optional free-text `provider` field (default `anthropic`), threaded to the runner's pi model lookup, and split agent-step failures into a user-fixable `agent_config_invalid` reason (unknown provider, missing runner credentials, wrong provider/model pair) versus `agent_invocation_failed` for genuine provider/API errors.
134
+ - a982f20: Stop a permanently-broken trigger subscription from starving its siblings or wedging the outbox. Integration dispatch now attempts every matched subscription and classifies each `runWorkflow` failure: a permanent error (deleted definition or project mismatch) is recorded and skipped, while a transient one re-throws so the outbox replays the event and converges. The event reaches a terminal outcome once no transient error remains (`routed` when any run was created, otherwise the new `errored` outcome), with a guarded write that never records `errored` over an event that already produced a run. The manual-fire path records the same terminal outcome, and `@shipfox/api-workflows` exports an `isPermanentRunWorkflowError` classifier. The trigger-events read API (`triggerEventOutcomeSchema`) accepts the new `errored` outcome for serialization and filtering.
135
+ - 998eba3: Adds phase-aware workflow context metadata, availability predicates, and creation-phase workflow context assembly for runtime materialization.
136
+ - 5327934: Materialize listening job steps per execution instead of during workflow run creation.
137
+ - 314e84e: Adds server-side step condition skipping so rejected or errored step predicates finish as skipped without dispatching runner attempts.
138
+ - 247cbd6: Adds label-aware runner job claiming with shared runner-label validation and required-label orchestration.
139
+ - 795f440: Adds the listener orchestration loop for long-lived listening jobs: durable event draining, one execution per buffered event, resolution on until, listening deadline, or max executions, and a run-timeout backstop that resolves active listeners.
140
+ - 3dcd751: Adds listener filter snapshots to job activation events and persists them on listener subscriptions.
141
+ - 362b3eb: Scope runner log append authorization to the dispatched step attempt carried by the job lease token.
142
+ - 6077301: Adds shared timestamp/id keyset pagination helpers and migrates workflow run and trigger event lists onto them.
143
+ - 9c1c947: Colocates workflow phase context assembly and threads phase-tagged evaluation contexts through runtime fill sites.
144
+ - d635979: Routes workflow materialization and predicate evaluation through persisted planner segments, replacing resolver exports with planned freeze APIs.
145
+ - 3bea87f: Adds a typed `subscriberFactory` that binds each outbox event name to its payload type at construction, so subscriber handlers receive a typed `(payload, event)` and the per-handler `event.payload as X` casts are gone; a private brand makes the factory the only way to build a module subscriber.
146
+ - ef1e917: Adds listening-job authoring fields and trusted execution context validation for listening jobs.
147
+ Separates workflow identifiers so internal rows use UUID `id`, authored workflow/job/step
148
+ references use `key`, and UI labels use `name`.
149
+ - c6eb2ee: Adds debounced listener-event batching with DB-backed coalescing, max-size chunking, and batch-size metrics.
150
+ - f9153e8: Persists parsed workflow models on run attempts so later workflow phases can materialize from the frozen template.
151
+ - a8905ed: Splits workflow runtime internals into scheduling and step-config modules without changing behavior.
152
+ - 282e66a: Exposes frozen agent integration tool selections as non-secret MCP server descriptors in materialized step config.
153
+ - 0dd23a7: Warns on agent tool capability mismatches during dispatch without blocking label-matched runners.
154
+ - e1d4972: Evaluate the step gate `success_if` over the `step` self-root (`step.exit_code`, `step.status`) and job `success` over the full typed executions context, both validated against the shared context registry; authored gate expressions move from `exit_code` to `step.exit_code` and job-success now fails closed on a runtime evaluation error.
155
+ - f9bf446: Extract the step-report decision into a pure `decideStepTransition` plus a durable `applyStepTransition`, creating the seam where gate evaluation and durable restart will plug in. No behavior change.
156
+ - 8ecc121: Track queue/run/finish timing for workflow runs and jobs. Adds nullable `started_at`/`finished_at` to workflow runs and `queued_at`/`started_at`/`finished_at` to jobs, exposed on the run and job DTOs. The runners module emits two new authoritative-timestamp events (`runners.job.queued`, `runners.job.started`) in the same transaction as the enqueue/claim; workflows projects them onto the job row with a first-write-wins `coalesce`, so the at-least-once outbox can redeliver out of order safely. Run `started_at`/`finished_at` and job `finished_at` are stamped in-module at the status transitions. All columns are nullable and eventually consistent, so consumers must treat a missing endpoint as "not yet known" and clamp any duration math.
157
+ - d7b9596: Refold the workflows migration baseline and tune its indexes. Drops the redundant `step_attempts(job_execution_id)` index, which was fully covered by the `(job_execution_id, execution_order)` unique index. Adds partial `WHERE status = 'running'` indexes on `workflow_runs` and `job_executions` so the running-depth service gauge counts only active rows instead of sequentially scanning the full history on every scrape. No behavior or API change.
158
+ - Updated dependencies [eb40964]
159
+ - Updated dependencies [0a6318f]
160
+ - Updated dependencies [7bc7498]
161
+ - Updated dependencies [5c18360]
162
+ - Updated dependencies [067a260]
163
+ - Updated dependencies [26fea4b]
164
+ - Updated dependencies [0cf66c4]
165
+ - Updated dependencies [0948b67]
166
+ - Updated dependencies [34ba284]
167
+ - Updated dependencies [8100b48]
168
+ - Updated dependencies [8f51daf]
169
+ - Updated dependencies [3b45d86]
170
+ - Updated dependencies [5707d6d]
171
+ - Updated dependencies [e689abf]
172
+ - Updated dependencies [59ba68b]
173
+ - Updated dependencies [7a9943d]
174
+ - Updated dependencies [ce3e5ca]
175
+ - Updated dependencies [b9c3f32]
176
+ - Updated dependencies [2325d76]
177
+ - Updated dependencies [89026d5]
178
+ - Updated dependencies [d02c5fd]
179
+ - Updated dependencies [c17dd6e]
180
+ - Updated dependencies [a81b68c]
181
+ - Updated dependencies [115655e]
182
+ - Updated dependencies [c0a883c]
183
+ - Updated dependencies [72ce351]
184
+ - Updated dependencies [cdf8989]
185
+ - Updated dependencies [5cdfc69]
186
+ - Updated dependencies [e47f8da]
187
+ - Updated dependencies [736249b]
188
+ - Updated dependencies [a68ed61]
189
+ - Updated dependencies [2bc5595]
190
+ - Updated dependencies [b1f57d1]
191
+ - Updated dependencies [1127ba2]
192
+ - Updated dependencies [36f871d]
193
+ - Updated dependencies [e7b01dd]
194
+ - Updated dependencies [de54da2]
195
+ - Updated dependencies [d546b88]
196
+ - Updated dependencies [58c05ed]
197
+ - Updated dependencies [ce062a9]
198
+ - Updated dependencies [7b175f5]
199
+ - Updated dependencies [7ca4c65]
200
+ - Updated dependencies [5bcdbf4]
201
+ - Updated dependencies [97162dd]
202
+ - Updated dependencies [857879a]
203
+ - Updated dependencies [c47be09]
204
+ - Updated dependencies [f9f059e]
205
+ - Updated dependencies [940696a]
206
+ - Updated dependencies [f3614ae]
207
+ - Updated dependencies [f98c2be]
208
+ - Updated dependencies [e9396c9]
209
+ - Updated dependencies [ae7a63c]
210
+ - Updated dependencies [5729548]
211
+ - Updated dependencies [d245be8]
212
+ - Updated dependencies [f92122b]
213
+ - Updated dependencies [e250c4c]
214
+ - Updated dependencies [b525dcd]
215
+ - Updated dependencies [f8f339a]
216
+ - Updated dependencies [b0a0e1a]
217
+ - Updated dependencies [58f51bd]
218
+ - Updated dependencies [570ac69]
219
+ - Updated dependencies [857fd73]
220
+ - Updated dependencies [aca162b]
221
+ - Updated dependencies [1c1fb3e]
222
+ - Updated dependencies [7fa8f0b]
223
+ - Updated dependencies [998eba3]
224
+ - Updated dependencies [3afb7e3]
225
+ - Updated dependencies [2617db9]
226
+ - Updated dependencies [444ac89]
227
+ - Updated dependencies [1daf39a]
228
+ - Updated dependencies [247cbd6]
229
+ - Updated dependencies [1d98b19]
230
+ - Updated dependencies [5823bac]
231
+ - Updated dependencies [5d53ed4]
232
+ - Updated dependencies [c652a68]
233
+ - Updated dependencies [fb64f13]
234
+ - Updated dependencies [75520ff]
235
+ - Updated dependencies [f47cff8]
236
+ - Updated dependencies [62720ea]
237
+ - Updated dependencies [b855d6f]
238
+ - Updated dependencies [795f440]
239
+ - Updated dependencies [3dcd751]
240
+ - Updated dependencies [f66f606]
241
+ - Updated dependencies [c0a883c]
242
+ - Updated dependencies [362b3eb]
243
+ - Updated dependencies [e51d464]
244
+ - Updated dependencies [b8e49ff]
245
+ - Updated dependencies [5b8ed32]
246
+ - Updated dependencies [417f128]
247
+ - Updated dependencies [d6d4862]
248
+ - Updated dependencies [c0a883c]
249
+ - Updated dependencies [6077301]
250
+ - Updated dependencies [f0afdf8]
251
+ - Updated dependencies [9d3b43a]
252
+ - Updated dependencies [d635979]
253
+ - Updated dependencies [3bea87f]
254
+ - Updated dependencies [82d22e4]
255
+ - Updated dependencies [d69b164]
256
+ - Updated dependencies [69d02e5]
257
+ - Updated dependencies [2fb3e87]
258
+ - Updated dependencies [e0fee57]
259
+ - Updated dependencies [b74f635]
260
+ - Updated dependencies [fa67aa3]
261
+ - Updated dependencies [9a5aac4]
262
+ - Updated dependencies [ef1e917]
263
+ - Updated dependencies [51eb38a]
264
+ - Updated dependencies [61de795]
265
+ - Updated dependencies [88b9793]
266
+ - Updated dependencies [e2fbef8]
267
+ - Updated dependencies [8ecba0f]
268
+ - Updated dependencies [27770eb]
269
+ - Updated dependencies [2933c33]
270
+ - Updated dependencies [2ad300c]
271
+ - Updated dependencies [a314b05]
272
+ - Updated dependencies [43fd0c1]
273
+ - Updated dependencies [950ebef]
274
+ - Updated dependencies [03d9eae]
275
+ - Updated dependencies [a5c7562]
276
+ - Updated dependencies [6181819]
277
+ - Updated dependencies [3ddde91]
278
+ - Updated dependencies [1ea2f6a]
279
+ - Updated dependencies [e699508]
280
+ - Updated dependencies [ad6056b]
281
+ - Updated dependencies [8b9c3e0]
282
+ - Updated dependencies [282e66a]
283
+ - Updated dependencies [0dd23a7]
284
+ - Updated dependencies [9c149d1]
285
+ - Updated dependencies [e1d4972]
286
+ - Updated dependencies [fb64f13]
287
+ - Updated dependencies [a856155]
288
+ - Updated dependencies [8ecc121]
289
+ - @shipfox/api-definitions@0.1.0
290
+ - @shipfox/api-workflows-dto@0.1.0
291
+ - @shipfox/api-agent@0.1.0
292
+ - @shipfox/expression@1.1.0
293
+ - @shipfox/api-agent-dto@0.1.0
294
+ - @shipfox/api-integration-core@0.1.0
295
+ - @shipfox/node-fastify@0.2.0
296
+ - @shipfox/api-runners@0.1.0
297
+ - @shipfox/api-runners-dto@0.1.0
298
+ - @shipfox/api-secrets@0.1.0
299
+ - @shipfox/api-secrets-dto@0.1.0
300
+ - @shipfox/annotations@0.0.1
301
+ - @shipfox/node-drizzle@0.1.0
302
+ - @shipfox/api-auth@0.1.0
303
+ - @shipfox/api-auth-context@0.1.0
304
+ - @shipfox/api-projects@0.1.0
305
+ - @shipfox/node-error-monitoring@0.1.1
306
+ - @shipfox/node-opentelemetry@0.4.2
307
+ - @shipfox/node-postgres@0.3.2
308
+ - @shipfox/node-temporal@0.1.1
309
+ - @shipfox/node-module@0.1.0
310
+ - @shipfox/node-outbox@0.1.0
311
+ - @shipfox/runner-labels@0.0.1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Shipfox
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,7 @@
1
+ import type { LeasedJobContext } from '@shipfox/api-auth-context';
2
+ import type { Step } from './entities/step.js';
3
+ export declare function warnAgentToolCapabilityMismatchOnDispatch(params: {
4
+ leaseIdentity: LeasedJobContext;
5
+ step: Step;
6
+ }): Promise<void>;
7
+ //# sourceMappingURL=agent-tool-capability-warning.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tool-capability-warning.d.ts","sourceRoot":"","sources":["../../src/core/agent-tool-capability-warning.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AAIhE,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,oBAAoB,CAAC;AAO7C,wBAAsB,yCAAyC,CAAC,MAAM,EAAE;IACtE,aAAa,EAAE,gBAAgB,CAAC;IAChC,IAAI,EAAE,IAAI,CAAC;CACZ,GAAG,OAAO,CAAC,IAAI,CAAC,CAqFhB"}
@@ -0,0 +1,149 @@
1
+ import { AnnotationBodyTooLargeError, AnnotationCountLimitExceededError, AnnotationTotalBytesLimitExceededError, writeAnnotations } from '@shipfox/annotations';
2
+ import { harnessSchema, materializedAgentStepConfigSchema } from '@shipfox/api-agent-dto';
3
+ import { getEffectiveRunnerToolCapabilities, unadvertisedRunnerTools } from '@shipfox/api-runners';
4
+ import { logger } from '@shipfox/node-opentelemetry';
5
+ import { recordWorkflowAgentToolWarningFailed } from '#metrics/instance.js';
6
+ const TOOL_LIST_LIMIT = 10;
7
+ export async function warnAgentToolCapabilityMismatchOnDispatch(params) {
8
+ const config = parseAgentConfig(params.step);
9
+ if (!config) return;
10
+ const requestedTools = config.tools ?? [];
11
+ if (requestedTools.length === 0) return;
12
+ const harness = harnessSchema.safeParse(config.harness);
13
+ if (!harness.success) return;
14
+ let effective;
15
+ try {
16
+ effective = await getEffectiveRunnerToolCapabilities({
17
+ runnerSessionId: params.leaseIdentity.runnerSessionId
18
+ });
19
+ } catch (error) {
20
+ recordWarningWriteFailure('lookup');
21
+ logger().warn({
22
+ error,
23
+ jobExecutionId: params.leaseIdentity.jobExecutionId,
24
+ stepId: params.step.id
25
+ }, 'Failed to read runner tool capabilities for agent tool warning');
26
+ return;
27
+ }
28
+ const missing = unadvertisedRunnerTools({
29
+ harness: harness.data,
30
+ requestedTools,
31
+ capabilities: effective.capabilities
32
+ });
33
+ const context = `agent-tool-capability:${params.step.id}`;
34
+ const operation = missing.length === 0 ? {
35
+ context,
36
+ style: 'warning',
37
+ op: 'remove'
38
+ } : {
39
+ context,
40
+ style: 'warning',
41
+ op: 'replace',
42
+ body: warningBody({
43
+ harness: harness.data,
44
+ missing,
45
+ reason: warningReason({
46
+ reportFresh: effective.reportFresh,
47
+ harnessKnown: effective.harnessKnown(harness.data)
48
+ })
49
+ })
50
+ };
51
+ try {
52
+ await writeAnnotations({
53
+ ...writeParamsFromLease(params.leaseIdentity),
54
+ originStepId: params.step.id,
55
+ originStepAttempt: params.step.currentAttempt,
56
+ operations: [
57
+ operation
58
+ ]
59
+ });
60
+ } catch (error) {
61
+ const reason = isAnnotationBudgetError(error) ? 'budget' : 'write';
62
+ recordWarningWriteFailure(reason);
63
+ logger().warn({
64
+ error,
65
+ reason,
66
+ jobExecutionId: params.leaseIdentity.jobExecutionId,
67
+ stepId: params.step.id
68
+ }, 'Failed to write agent tool capability warning annotation');
69
+ return;
70
+ }
71
+ if (missing.length > 0) {
72
+ logger().warn({
73
+ jobExecutionId: params.leaseIdentity.jobExecutionId,
74
+ stepId: params.step.id,
75
+ harness: harness.data,
76
+ missing,
77
+ reason: warningReason({
78
+ reportFresh: effective.reportFresh,
79
+ harnessKnown: effective.harnessKnown(harness.data)
80
+ })
81
+ }, 'Runner missing requested agent tools; dispatch is continuing');
82
+ }
83
+ }
84
+ function parseAgentConfig(step) {
85
+ if (step.type !== 'agent') return null;
86
+ const parsed = materializedAgentStepConfigSchema.safeParse(step.config);
87
+ return parsed.success ? parsed.data : null;
88
+ }
89
+ function warningBody(params) {
90
+ const tools = formatToolList(params.missing);
91
+ const harness = markdownInlineCode(params.harness);
92
+ if (params.reason === 'known-absence') {
93
+ return [
94
+ '**Runner missing requested agent tools**',
95
+ '',
96
+ `The matched runner advertised a ${harness} tool set without: ${tools}.`,
97
+ 'Execution is continuing on this runner because labels matched; the step may fail if the harness cannot provide these tools.'
98
+ ].join('\n');
99
+ }
100
+ if (params.reason === 'harness-not-advertised') {
101
+ return [
102
+ '**Runner missing requested agent harness tools**',
103
+ '',
104
+ `The matched runner advertised fresh tool capabilities, but did not advertise a ${harness} tool set. Support for ${tools} could not be confirmed.`,
105
+ 'Execution is continuing on this runner because labels matched; the step may fail if the harness cannot provide these tools.'
106
+ ].join('\n');
107
+ }
108
+ return [
109
+ '**Could not confirm runner agent tools**',
110
+ '',
111
+ `The matched runner reported no or stale tool capabilities, so support for ${tools} could not be confirmed.`,
112
+ 'Execution is continuing on this runner because labels matched.'
113
+ ].join('\n');
114
+ }
115
+ function formatToolList(tools) {
116
+ const visible = tools.slice(0, TOOL_LIST_LIMIT).map(markdownInlineCode);
117
+ const remaining = tools.length - visible.length;
118
+ return remaining > 0 ? `${visible.join(', ')} ...and ${remaining} more` : visible.join(', ');
119
+ }
120
+ function markdownInlineCode(value) {
121
+ const maxBacktickRun = Math.max(0, ...Array.from(value.matchAll(/`+/g), (match)=>match[0].length));
122
+ const delimiter = '`'.repeat(maxBacktickRun + 1);
123
+ const needsPadding = value.startsWith('`') || value.endsWith('`');
124
+ const content = needsPadding ? ` ${value} ` : value;
125
+ return `${delimiter}${content}${delimiter}`;
126
+ }
127
+ function warningReason(params) {
128
+ if (params.harnessKnown) return 'known-absence';
129
+ return params.reportFresh ? 'harness-not-advertised' : 'unknown-or-stale';
130
+ }
131
+ function writeParamsFromLease(lease) {
132
+ return {
133
+ workspaceId: lease.workspaceId,
134
+ projectId: lease.projectId,
135
+ workflowRunId: lease.workflowRunId,
136
+ workflowRunAttempt: lease.workflowRunAttempt ?? 1,
137
+ workflowRunAttemptId: lease.workflowRunAttemptId,
138
+ jobId: lease.jobId,
139
+ jobExecutionId: lease.jobExecutionId
140
+ };
141
+ }
142
+ function isAnnotationBudgetError(error) {
143
+ return error instanceof AnnotationBodyTooLargeError || error instanceof AnnotationCountLimitExceededError || error instanceof AnnotationTotalBytesLimitExceededError;
144
+ }
145
+ function recordWarningWriteFailure(reason) {
146
+ recordWorkflowAgentToolWarningFailed(reason);
147
+ }
148
+
149
+ //# sourceMappingURL=agent-tool-capability-warning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/agent-tool-capability-warning.ts"],"sourcesContent":["import {\n AnnotationBodyTooLargeError,\n AnnotationCountLimitExceededError,\n AnnotationTotalBytesLimitExceededError,\n type WriteAnnotationsParams,\n writeAnnotations,\n} from '@shipfox/annotations';\nimport {\n harnessSchema,\n type MaterializedAgentStepConfigDto,\n materializedAgentStepConfigSchema,\n} from '@shipfox/api-agent-dto';\nimport type {LeasedJobContext} from '@shipfox/api-auth-context';\nimport {getEffectiveRunnerToolCapabilities, unadvertisedRunnerTools} from '@shipfox/api-runners';\nimport {logger} from '@shipfox/node-opentelemetry';\nimport {recordWorkflowAgentToolWarningFailed} from '#metrics/instance.js';\nimport type {Step} from './entities/step.js';\n\nconst TOOL_LIST_LIMIT = 10;\n\ntype WarningFailureReason = 'budget' | 'lookup' | 'write';\ntype WarningReason = 'known-absence' | 'harness-not-advertised' | 'unknown-or-stale';\n\nexport async function warnAgentToolCapabilityMismatchOnDispatch(params: {\n leaseIdentity: LeasedJobContext;\n step: Step;\n}): Promise<void> {\n const config = parseAgentConfig(params.step);\n if (!config) return;\n\n const requestedTools = config.tools ?? [];\n if (requestedTools.length === 0) return;\n\n const harness = harnessSchema.safeParse(config.harness);\n if (!harness.success) return;\n\n let effective: Awaited<ReturnType<typeof getEffectiveRunnerToolCapabilities>>;\n try {\n effective = await getEffectiveRunnerToolCapabilities({\n runnerSessionId: params.leaseIdentity.runnerSessionId,\n });\n } catch (error) {\n recordWarningWriteFailure('lookup');\n logger().warn(\n {error, jobExecutionId: params.leaseIdentity.jobExecutionId, stepId: params.step.id},\n 'Failed to read runner tool capabilities for agent tool warning',\n );\n return;\n }\n\n const missing = unadvertisedRunnerTools({\n harness: harness.data,\n requestedTools,\n capabilities: effective.capabilities,\n });\n const context = `agent-tool-capability:${params.step.id}`;\n\n const operation =\n missing.length === 0\n ? {context, style: 'warning' as const, op: 'remove' as const}\n : {\n context,\n style: 'warning' as const,\n op: 'replace' as const,\n body: warningBody({\n harness: harness.data,\n missing,\n reason: warningReason({\n reportFresh: effective.reportFresh,\n harnessKnown: effective.harnessKnown(harness.data),\n }),\n }),\n };\n\n try {\n await writeAnnotations({\n ...writeParamsFromLease(params.leaseIdentity),\n originStepId: params.step.id,\n originStepAttempt: params.step.currentAttempt,\n operations: [operation],\n });\n } catch (error) {\n const reason = isAnnotationBudgetError(error) ? 'budget' : 'write';\n recordWarningWriteFailure(reason);\n logger().warn(\n {\n error,\n reason,\n jobExecutionId: params.leaseIdentity.jobExecutionId,\n stepId: params.step.id,\n },\n 'Failed to write agent tool capability warning annotation',\n );\n return;\n }\n\n if (missing.length > 0) {\n logger().warn(\n {\n jobExecutionId: params.leaseIdentity.jobExecutionId,\n stepId: params.step.id,\n harness: harness.data,\n missing,\n reason: warningReason({\n reportFresh: effective.reportFresh,\n harnessKnown: effective.harnessKnown(harness.data),\n }),\n },\n 'Runner missing requested agent tools; dispatch is continuing',\n );\n }\n}\n\nfunction parseAgentConfig(step: Step): MaterializedAgentStepConfigDto | null {\n if (step.type !== 'agent') return null;\n\n const parsed = materializedAgentStepConfigSchema.safeParse(step.config);\n return parsed.success ? parsed.data : null;\n}\n\nfunction warningBody(params: {\n harness: string;\n missing: readonly string[];\n reason: WarningReason;\n}): string {\n const tools = formatToolList(params.missing);\n const harness = markdownInlineCode(params.harness);\n if (params.reason === 'known-absence') {\n return [\n '**Runner missing requested agent tools**',\n '',\n `The matched runner advertised a ${harness} tool set without: ${tools}.`,\n 'Execution is continuing on this runner because labels matched; the step may fail if the harness cannot provide these tools.',\n ].join('\\n');\n }\n\n if (params.reason === 'harness-not-advertised') {\n return [\n '**Runner missing requested agent harness tools**',\n '',\n `The matched runner advertised fresh tool capabilities, but did not advertise a ${harness} tool set. Support for ${tools} could not be confirmed.`,\n 'Execution is continuing on this runner because labels matched; the step may fail if the harness cannot provide these tools.',\n ].join('\\n');\n }\n\n return [\n '**Could not confirm runner agent tools**',\n '',\n `The matched runner reported no or stale tool capabilities, so support for ${tools} could not be confirmed.`,\n 'Execution is continuing on this runner because labels matched.',\n ].join('\\n');\n}\n\nfunction formatToolList(tools: readonly string[]): string {\n const visible = tools.slice(0, TOOL_LIST_LIMIT).map(markdownInlineCode);\n const remaining = tools.length - visible.length;\n return remaining > 0 ? `${visible.join(', ')} ...and ${remaining} more` : visible.join(', ');\n}\n\nfunction markdownInlineCode(value: string): string {\n const maxBacktickRun = Math.max(\n 0,\n ...Array.from(value.matchAll(/`+/g), (match) => match[0].length),\n );\n const delimiter = '`'.repeat(maxBacktickRun + 1);\n const needsPadding = value.startsWith('`') || value.endsWith('`');\n const content = needsPadding ? ` ${value} ` : value;\n return `${delimiter}${content}${delimiter}`;\n}\n\nfunction warningReason(params: {reportFresh: boolean; harnessKnown: boolean}): WarningReason {\n if (params.harnessKnown) return 'known-absence';\n return params.reportFresh ? 'harness-not-advertised' : 'unknown-or-stale';\n}\n\nfunction writeParamsFromLease(\n lease: LeasedJobContext,\n): Omit<WriteAnnotationsParams, 'originStepId' | 'originStepAttempt' | 'operations'> {\n return {\n workspaceId: lease.workspaceId,\n projectId: lease.projectId,\n workflowRunId: lease.workflowRunId,\n workflowRunAttempt: lease.workflowRunAttempt ?? 1,\n workflowRunAttemptId: lease.workflowRunAttemptId,\n jobId: lease.jobId,\n jobExecutionId: lease.jobExecutionId,\n };\n}\n\nfunction isAnnotationBudgetError(error: unknown): boolean {\n return (\n error instanceof AnnotationBodyTooLargeError ||\n error instanceof AnnotationCountLimitExceededError ||\n error instanceof AnnotationTotalBytesLimitExceededError\n );\n}\n\nfunction recordWarningWriteFailure(reason: WarningFailureReason): void {\n recordWorkflowAgentToolWarningFailed(reason);\n}\n"],"names":["AnnotationBodyTooLargeError","AnnotationCountLimitExceededError","AnnotationTotalBytesLimitExceededError","writeAnnotations","harnessSchema","materializedAgentStepConfigSchema","getEffectiveRunnerToolCapabilities","unadvertisedRunnerTools","logger","recordWorkflowAgentToolWarningFailed","TOOL_LIST_LIMIT","warnAgentToolCapabilityMismatchOnDispatch","params","config","parseAgentConfig","step","requestedTools","tools","length","harness","safeParse","success","effective","runnerSessionId","leaseIdentity","error","recordWarningWriteFailure","warn","jobExecutionId","stepId","id","missing","data","capabilities","context","operation","style","op","body","warningBody","reason","warningReason","reportFresh","harnessKnown","writeParamsFromLease","originStepId","originStepAttempt","currentAttempt","operations","isAnnotationBudgetError","type","parsed","formatToolList","markdownInlineCode","join","visible","slice","map","remaining","value","maxBacktickRun","Math","max","Array","from","matchAll","match","delimiter","repeat","needsPadding","startsWith","endsWith","content","lease","workspaceId","projectId","workflowRunId","workflowRunAttempt","workflowRunAttemptId","jobId"],"mappings":"AAAA,SACEA,2BAA2B,EAC3BC,iCAAiC,EACjCC,sCAAsC,EAEtCC,gBAAgB,QACX,uBAAuB;AAC9B,SACEC,aAAa,EAEbC,iCAAiC,QAC5B,yBAAyB;AAEhC,SAAQC,kCAAkC,EAAEC,uBAAuB,QAAO,uBAAuB;AACjG,SAAQC,MAAM,QAAO,8BAA8B;AACnD,SAAQC,oCAAoC,QAAO,uBAAuB;AAG1E,M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B,qCACjBwB,iBAAiBvB;AAErB;AAEA,SAASwB,0BAA0Bc,MAA4B;IAC7D/B,qCAAqC+B;AACvC"}
@@ -0,0 +1,51 @@
1
+ import type { MaterializedAgentIntegrationConfigDto } from '@shipfox/api-agent-dto';
2
+ import type { WorkflowModel } from '@shipfox/api-definitions';
3
+ import type { AgentToolCatalogs, GetIntegrationConnectionByIdFn, IntegrationProviderKind, LoadWorkspaceConnectionSnapshot, WorkspaceConnectionSnapshot } from '@shipfox/api-integration-core';
4
+ type WorkflowModelJob = WorkflowModel['jobs'][number];
5
+ type WorkflowModelAgentStep = Extract<WorkflowModelJob['steps'][number], {
6
+ kind: 'agent';
7
+ }>;
8
+ type WorkflowModelStepIntegration = NonNullable<WorkflowModelAgentStep['integrations']>[number];
9
+ interface AgentToolMaterializationServices {
10
+ readonly catalogs: AgentToolCatalogs;
11
+ readonly loadWorkspaceConnectionSnapshot: LoadWorkspaceConnectionSnapshot;
12
+ readonly getIntegrationConnectionById: GetIntegrationConnectionByIdFn;
13
+ }
14
+ export interface AgentToolMaterializationContext {
15
+ readonly catalogs: AgentToolCatalogs;
16
+ readonly workspaceConnectionSnapshot: WorkspaceConnectionSnapshot;
17
+ readonly defaultConnection: {
18
+ readonly id: string;
19
+ readonly slug: string;
20
+ readonly provider: IntegrationProviderKind;
21
+ };
22
+ }
23
+ export interface AgentToolMaterializationSnapshot {
24
+ readonly steps: readonly AgentToolMaterializationSnapshotStep[];
25
+ }
26
+ export interface AgentToolMaterializationSnapshotStep {
27
+ readonly jobKey: string;
28
+ readonly stepId: string;
29
+ readonly integrations: readonly MaterializedAgentIntegrationConfigDto[];
30
+ }
31
+ export declare function setAgentToolMaterializationServices(nextServices: AgentToolMaterializationServices): void;
32
+ export declare function clearAgentToolMaterializationServices(): void;
33
+ export declare function loadAgentToolMaterializationContext(params: {
34
+ readonly model: WorkflowModel | null;
35
+ readonly workspaceId: string;
36
+ readonly projectId: string;
37
+ readonly jobs?: readonly WorkflowModelJob[] | undefined;
38
+ }): Promise<AgentToolMaterializationContext | undefined>;
39
+ export declare function materializeAgentIntegrations(params: {
40
+ readonly jobKey: string;
41
+ readonly stepId: string;
42
+ readonly integrations: readonly WorkflowModelStepIntegration[] | undefined;
43
+ readonly context: AgentToolMaterializationContext | undefined;
44
+ readonly snapshot?: AgentToolMaterializationSnapshot | null | undefined;
45
+ }): MaterializedAgentIntegrationConfigDto[] | undefined;
46
+ export declare function createAgentToolMaterializationSnapshot(params: {
47
+ readonly model: WorkflowModel;
48
+ readonly context: AgentToolMaterializationContext | undefined;
49
+ }): AgentToolMaterializationSnapshot | null;
50
+ export {};
51
+ //# sourceMappingURL=agent-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/core/agent-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qCAAqC,EAEtC,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAK,EAGV,iBAAiB,EACjB,8BAA8B,EAC9B,uBAAuB,EACvB,+BAA+B,EAC/B,2BAA2B,EAC5B,MAAM,+BAA+B,CAAC;AAIvC,KAAK,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AACtD,KAAK,sBAAsB,GAAG,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,EAAE;IAAC,IAAI,EAAE,OAAO,CAAA;CAAC,CAAC,CAAC;AAC1F,KAAK,4BAA4B,GAAG,WAAW,CAAC,sBAAsB,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhG,UAAU,gCAAgC;IACxC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,QAAQ,CAAC,+BAA+B,EAAE,+BAA+B,CAAC;IAC1E,QAAQ,CAAC,4BAA4B,EAAE,8BAA8B,CAAC;CACv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