@makaio/framework 1.0.0-dev-1788897280508 → 1.0.0-dev-1788914730846

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 (391) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/2020-Bl3Yx3In.mjs +1 -0
  3. package/dist/adapters/config/index.d.mts +1 -1
  4. package/dist/adapters/config/index.mjs +1 -1
  5. package/dist/adapters/index.d.mts +2 -2
  6. package/dist/adapters/index.mjs +6 -6
  7. package/dist/adapters/node.d.mts +1 -1
  8. package/dist/adapters/node.mjs +1 -1
  9. package/dist/artifact-DtmJR46g.mjs +1 -0
  10. package/dist/{attempt-record-codec-CqKq0NIB.mjs → attempt-record-codec-6jpayBMY.mjs} +1 -1
  11. package/dist/authority-state-bootstrap-DnwkMieA.mjs +1 -0
  12. package/dist/bus/index.mjs +1 -1
  13. package/dist/{capabilities-DGqMG9M3.mjs → capabilities-BhJ3wzI8.mjs} +1 -1
  14. package/dist/clients/index.d.mts +1 -1
  15. package/dist/clients/index.mjs +1 -1
  16. package/dist/clients/managed-install.d.mts +1 -1
  17. package/dist/clients/managed-install.mjs +1 -1
  18. package/dist/code-execution/worker-entry.d.mts +1 -1
  19. package/dist/code-execution/worker-entry.mjs +1 -1
  20. package/dist/code-execution-B9wr0b972.mjs +1 -0
  21. package/dist/{code-execution-Mo1jztUH.mjs → code-execution-DRCzkGzO.mjs} +1 -1
  22. package/dist/contracts/adapter/index.d.mts +2 -2
  23. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  24. package/dist/contracts/artifact/index.d.mts +3 -3
  25. package/dist/contracts/artifact/index.mjs +1 -1
  26. package/dist/contracts/auth/index.d.mts +2 -2
  27. package/dist/contracts/automation-trigger/index.d.mts +3 -3
  28. package/dist/contracts/canonical-model/index.d.mts +1 -1
  29. package/dist/contracts/capabilities/index.d.mts +1 -1
  30. package/dist/contracts/capabilities/index.mjs +1 -1
  31. package/dist/contracts/client/index.d.mts +2 -2
  32. package/dist/contracts/code-execution/index.d.mts +1 -1
  33. package/dist/contracts/common/index.d.mts +1 -1
  34. package/dist/contracts/config/index.d.mts +1 -1
  35. package/dist/contracts/extension/index.d.mts +5 -5
  36. package/dist/contracts/extension/index.mjs +1 -1
  37. package/dist/contracts/facet/index.d.mts +1 -1
  38. package/dist/contracts/harness/index.d.mts +1 -1
  39. package/dist/contracts/host/index.d.mts +1 -1
  40. package/dist/contracts/index.d.mts +104 -104
  41. package/dist/contracts/index.mjs +1 -1
  42. package/dist/contracts/materialization/index.d.mts +2 -2
  43. package/dist/contracts/materialization/index.mjs +1 -1
  44. package/dist/contracts/model-registry/index.d.mts +1 -1
  45. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  46. package/dist/contracts/platform/index.d.mts +1 -1
  47. package/dist/contracts/provider/index.d.mts +2 -2
  48. package/dist/contracts/reaction/index.d.mts +1 -1
  49. package/dist/contracts/session/index.d.mts +2 -2
  50. package/dist/contracts/shared/index.d.mts +2 -2
  51. package/dist/contracts/skill/index.d.mts +1 -1
  52. package/dist/contracts/telemetry/index.d.mts +1 -1
  53. package/dist/contracts/timeout/index.d.mts +1 -1
  54. package/dist/contracts/variant/index.d.mts +1 -1
  55. package/dist/contracts/worker/index.d.mts +1 -1
  56. package/dist/contracts/worker/index.mjs +1 -1
  57. package/dist/contracts/workflow/index.d.mts +2 -2
  58. package/dist/contracts/workflow/index.mjs +1 -1
  59. package/dist/{contribution-BoTMoHVB.d.mts → contribution-B4t0OXKs.d.mts} +2 -2
  60. package/dist/{definition-BgY763Q4.d.mts → definition-Bs5hzhsT.d.mts} +1 -1
  61. package/dist/{detached-extension-handle-B9c_6Pcb.mjs → detached-extension-handle-CgJiXaqv.mjs} +1 -1
  62. package/dist/dist-CfANkKSb.mjs +1 -0
  63. package/dist/{execution-attempt-owner-recovery-BNERIDH0.mjs → execution-attempt-owner-recovery-CdH04iwP.mjs} +1 -1
  64. package/dist/{execution-attempt-repository-CtFZfBfp.d.mts → execution-attempt-repository-dE889kHj.d.mts} +553 -155
  65. package/dist/{extension-C4lFc8-j.mjs → extension-C1CwxkCN.mjs} +1 -1
  66. package/dist/{filesystem-service-DGqU-6x-.mjs → filesystem-service-yB8KhUGz.mjs} +1 -1
  67. package/dist/framework-packages-B3SQPHD7.mjs +1 -0
  68. package/dist/git/index.mjs +1 -1
  69. package/dist/{globby-BT0rrriG.mjs → globby-z2SR0jRo.mjs} +1 -1
  70. package/dist/{hook-responses-BSCAdJ3i.d.mts → hook-responses-Cs8A07ZP.d.mts} +1 -1
  71. package/dist/{index-LwOw7ZLk2.d.mts → index-Aomg_qFA2.d.mts} +164 -32
  72. package/dist/{index-RpG4EP3u.d.mts → index-B6aoVzdA.d.mts} +1 -1
  73. package/dist/{index-BVRQOZbm.d.mts → index-BHZlMm_I.d.mts} +1 -1
  74. package/dist/{index-BkY6zO7p.d.mts → index-BQv9mUzn.d.mts} +2 -1
  75. package/dist/{index-oucWFlFP2.d.mts → index-B_rFtKIO2.d.mts} +12 -12
  76. package/dist/{index-D0DfEO45.d.mts → index-BfXf_CcM.d.mts} +14 -16
  77. package/dist/{index-DIYgFhTZ2.d.mts → index-BgY_UzH82.d.mts} +4 -4
  78. package/dist/{index-BZtasAZP.d.mts → index-BjcJH3I-.d.mts} +1 -1
  79. package/dist/{index-nPpqnP7P.d.mts → index-BtC1JP5D.d.mts} +1 -1
  80. package/dist/{index-PTp68NH1.d.mts → index-C50sVXO7.d.mts} +780 -66
  81. package/dist/{index-CYwbfa0_.d.mts → index-CKvOECeR.d.mts} +2 -2
  82. package/dist/{index-DJ0Muy2s.d.mts → index-CRQ2U0jE.d.mts} +9 -9
  83. package/dist/{index-BZlmWCcW.d.mts → index-CmAJx-cX.d.mts} +3 -3
  84. package/dist/{index-F6hV4tWI.d.mts → index-CtlurrJF.d.mts} +98 -44
  85. package/dist/{index-Cau0jTTM.d.mts → index-D3-21gUP.d.mts} +1 -1
  86. package/dist/{index-CQtttPGm.d.mts → index-D7j6v0-L.d.mts} +1 -1
  87. package/dist/{index-mylsCg6V2.d.mts → index-DI-1HK7v2.d.mts} +1 -1
  88. package/dist/{index-BdbYIlDL.d.mts → index-DRryNq7D.d.mts} +13 -13
  89. package/dist/{index-R2BZejEz.d.mts → index-DfYMmJDZ.d.mts} +1963 -408
  90. package/dist/{index-CoGo6HFE.d.mts → index-DzeUtJtE.d.mts} +8 -8
  91. package/dist/{index-CYmQt2lF.d.mts → index-KZ4YllPp.d.mts} +81 -81
  92. package/dist/{index-C_OLvAr_.d.mts → index-ZEQDAT9K.d.mts} +1 -1
  93. package/dist/{index-dL0Oet1j.d.mts → index-fzrPfhS0.d.mts} +1 -1
  94. package/dist/{index-CDLHgV7v.d.mts → index-jXU4dntl.d.mts} +16 -16
  95. package/dist/{index-BcTwLu9C2.d.mts → index-ksNVQHeY2.d.mts} +8 -8
  96. package/dist/kernel/cli/index.d.mts +2 -2
  97. package/dist/kernel/cli/register.d.mts +1 -1
  98. package/dist/kernel/extension/index.d.mts +1 -1
  99. package/dist/kernel/index.d.mts +5 -5
  100. package/dist/kernel/namespace/index.d.mts +1 -1
  101. package/dist/kernel/observability/index.d.mts +1 -1
  102. package/dist/kernel/providers/index.d.mts +1 -1
  103. package/dist/kernel/window/index.d.mts +1 -1
  104. package/dist/kind-registration-DggkrLkv.mjs +1 -0
  105. package/dist/{lib-hwdGyO-m.mjs → lib-0MqNtDuH.mjs} +5 -5
  106. package/dist/{lib-B8Yv4IY-.mjs → lib-dlyJT26K.mjs} +1 -1
  107. package/dist/{load-extensions-CNT2Nd9h.mjs → load-extensions-BHTj3d_P.mjs} +1 -1
  108. package/dist/{load-extensions-D0yT_Kta.d.mts → load-extensions-un9Md47Z.d.mts} +1 -1
  109. package/dist/{materialization-Dx1z_MDj.mjs → materialization-CDemi12q.mjs} +1 -1
  110. package/dist/mcp-http-server/index.mjs +4 -4
  111. package/dist/{namespace-D1qK-Ed3.d.mts → namespace-CePc0U4N.d.mts} +2 -2
  112. package/dist/{namespace-C7wggVcn.d.mts → namespace-Ciyw6FxO.d.mts} +18 -18
  113. package/dist/{namespace-BY5-nA4j.d.mts → namespace-CizM5GXh.d.mts} +6 -6
  114. package/dist/{namespace-WeSQXdAL.d.mts → namespace-D9ToNQPp.d.mts} +25 -25
  115. package/dist/{namespace-CPC1vbOu.d.mts → namespace-DF9m7PLi.d.mts} +5 -5
  116. package/dist/{namespace-Dh5fTXYt.d.mts → namespace-thsiHTFH.d.mts} +2 -2
  117. package/dist/node/bus-server/index.d.mts +1 -1
  118. package/dist/node/bus-server/index.mjs +1 -1
  119. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  120. package/dist/node/bus-server/server-lifecycle.mjs +1 -1
  121. package/dist/node/transports/index.d.mts +12 -1
  122. package/dist/node/transports/index.mjs +2 -2
  123. package/dist/{orchestrator-shared-BKMtjTE9.mjs → orchestrator-shared-5vhs4wvU.mjs} +1 -1
  124. package/dist/{package-C9XYuN9J.d.mts → package-BR0pO5BI.d.mts} +101 -17
  125. package/dist/package-DKfzsJVl.mjs +7 -0
  126. package/dist/package.json +1 -1
  127. package/dist/packages-7CsXP86g.mjs +1 -0
  128. package/dist/rules/index.d.mts +1 -1
  129. package/dist/rules/index.mjs +1 -1
  130. package/dist/rules/schemas.d.mts +1 -1
  131. package/dist/runtime-bun/index.mjs +1 -1
  132. package/dist/runtime-node/code-execution/index.d.mts +2 -2
  133. package/dist/runtime-node/code-execution/index.mjs +1 -1
  134. package/dist/runtime-node/extension-discovery.d.mts +1 -1
  135. package/dist/runtime-node/extension-validation.d.mts +1 -1
  136. package/dist/runtime-node/extension-validation.mjs +1 -1
  137. package/dist/runtime-node/index.d.mts +7 -6
  138. package/dist/runtime-node/index.mjs +24 -24
  139. package/dist/runtime-node/makaio-config.d.mts +1 -1
  140. package/dist/runtime-node/makaio-config.mjs +1 -1
  141. package/dist/runtime-node/workflow-execution-bus-access.d.mts +16 -1
  142. package/dist/runtime-node/workflow-execution-bus-access.mjs +1 -1
  143. package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
  144. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  145. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  146. package/dist/{schema-wArHaxA9.d.mts → schema-7GukLoee.d.mts} +1 -1
  147. package/dist/{schemas-C5FreSE0.d.mts → schemas-6FlRULSc.d.mts} +211 -79
  148. package/dist/schemas-BahXrOYa.mjs +1 -0
  149. package/dist/{schemas-gfrOgGau.d.mts → schemas-CKGHlsMd.d.mts} +1 -1
  150. package/dist/{schemas-DmE-a0kN.d.mts → schemas-CkOVC3ip.d.mts} +4 -4
  151. package/dist/{schemas-BjNlwTDl.d.mts → schemas-DQ5iRisA.d.mts} +2 -2
  152. package/dist/{schemas-BSBb1KFq.d.mts → schemas-Df52igU4.d.mts} +8 -8
  153. package/dist/services/adapter-runtime/index.d.mts +3 -3
  154. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  155. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  156. package/dist/services/adapter-subsystem/index.d.mts +3 -3
  157. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  158. package/dist/services/agent-runtime/index.d.mts +2 -2
  159. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  160. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  161. package/dist/services/automation-trigger/index.mjs +1 -1
  162. package/dist/services/capability/index.d.mts +2 -2
  163. package/dist/services/capability/index.mjs +1 -1
  164. package/dist/services/code-execution/index.d.mts +1 -1
  165. package/dist/services/code-execution/index.mjs +1 -1
  166. package/dist/services/codebase/index.d.mts +2 -2
  167. package/dist/services/codebase/namespace.d.mts +1 -1
  168. package/dist/services/codebase/schemas.d.mts +1 -1
  169. package/dist/services/compression/index.d.mts +2 -2
  170. package/dist/services/compression/namespace.d.mts +1 -1
  171. package/dist/services/compression/schemas.d.mts +1 -1
  172. package/dist/services/context-rules/index.d.mts +4 -4
  173. package/dist/services/context-rules/index.mjs +1 -1
  174. package/dist/services/execution-target/index.d.mts +3 -3
  175. package/dist/services/execution-target/index.mjs +1 -1
  176. package/dist/services/execution-target/namespace.d.mts +1 -1
  177. package/dist/services/execution-target/schemas.d.mts +1 -1
  178. package/dist/services/filesystem/index.d.mts +1 -1
  179. package/dist/services/filesystem/index.mjs +1 -1
  180. package/dist/services/filesystem/namespace.d.mts +6 -6
  181. package/dist/services/filesystem/schemas.d.mts +3 -3
  182. package/dist/services/git/namespace.d.mts +2 -2
  183. package/dist/services/git/namespace.mjs +1 -1
  184. package/dist/services/git/schemas.d.mts +2 -2
  185. package/dist/services/git/schemas.mjs +1 -1
  186. package/dist/services/harness/index.mjs +1 -1
  187. package/dist/services/index.d.mts +55 -55
  188. package/dist/services/index.mjs +1 -1
  189. package/dist/services/log-import/browser.d.mts +2 -2
  190. package/dist/services/log-import/index.d.mts +2 -2
  191. package/dist/services/log-import/log-import.d.mts +1 -1
  192. package/dist/services/log-import/log-import.mjs +1 -1
  193. package/dist/services/log-import/namespace.mjs +1 -1
  194. package/dist/services/log-import/schemas.mjs +1 -1
  195. package/dist/services/materialization/index.d.mts +1 -1
  196. package/dist/services/materialization/index.mjs +1 -1
  197. package/dist/services/model-registry/index.d.mts +1 -1
  198. package/dist/services/model-registry/index.mjs +1 -1
  199. package/dist/services/preferences/index.d.mts +2 -2
  200. package/dist/services/preferences/schemas.d.mts +1 -1
  201. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  202. package/dist/services/provider-context/index.d.mts +1 -1
  203. package/dist/services/provider-runtime/index.mjs +1 -1
  204. package/dist/services/session/handlers/index.d.mts +1 -1
  205. package/dist/services/session/index.d.mts +9 -9
  206. package/dist/services/session/messages/namespace.d.mts +1 -1
  207. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  208. package/dist/services/session/orchestrator-testing/index.mjs +1 -1
  209. package/dist/services/session/session-events/namespace.d.mts +1 -1
  210. package/dist/services/session/storage/namespace.d.mts +1 -1
  211. package/dist/services/session/storage/schema.d.mts +1 -1
  212. package/dist/services/session/testing/index.mjs +1 -1
  213. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  214. package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
  215. package/dist/services/session/turns/namespace.d.mts +1 -1
  216. package/dist/services/session-editor/index.d.mts +1 -1
  217. package/dist/services/settings/index.d.mts +3 -3
  218. package/dist/services/settings/namespace.d.mts +8 -8
  219. package/dist/services/settings/namespace.mjs +1 -1
  220. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  221. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  222. package/dist/services/settings/storage/index.d.mts +3 -3
  223. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  224. package/dist/services/subagent/index.d.mts +1 -1
  225. package/dist/services/subagent/index.mjs +1 -1
  226. package/dist/services/subagent-template/index.d.mts +2 -2
  227. package/dist/services/subagent-template/namespace.d.mts +1 -1
  228. package/dist/services/subagent-template/schemas.d.mts +1 -1
  229. package/dist/services/tool-approval/index.d.mts +1 -1
  230. package/dist/services/tool-approval/index.mjs +1 -1
  231. package/dist/services/tools/index.d.mts +1 -1
  232. package/dist/services/tools/index.mjs +1 -1
  233. package/dist/services/tray-menu/index.d.mts +3 -3
  234. package/dist/services/tray-menu/index.mjs +1 -1
  235. package/dist/services/tray-menu/namespace.d.mts +1 -1
  236. package/dist/services/tray-menu/schemas.d.mts +1 -1
  237. package/dist/services/turn/index.d.mts +1 -1
  238. package/dist/services/turn/namespace.d.mts +1 -1
  239. package/dist/services/workflow-transitions/index.d.mts +1 -1
  240. package/dist/services/workflow-transitions/index.mjs +1 -1
  241. package/dist/{src-D4Gx0QHf.mjs → src-Dlpw-Gh5.mjs} +1 -1
  242. package/dist/storage/drizzle/client.d.mts +1 -1
  243. package/dist/storage/drizzle/client.mjs +1 -1
  244. package/dist/storage/drizzle/index.d.mts +1 -1
  245. package/dist/storage/drizzle/index.mjs +1 -1
  246. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  247. package/dist/storage/handlers/drizzle/index.mjs +1 -1
  248. package/dist/storage/handlers/index.d.mts +1 -1
  249. package/dist/storage/handlers/index.mjs +1 -1
  250. package/dist/{tools-Cyo6BuGM.mjs → tools-2INrWlnS.mjs} +1 -1
  251. package/dist/{transition-CwMPKBjz.d.mts → transition-C1rMI1ue.d.mts} +2 -2
  252. package/dist/{types-BOF825V52.d.mts → types-CR415CdC2.d.mts} +1 -1
  253. package/dist/{types-Dg_acP9p.d.mts → types-DIHb_m2K.d.mts} +29 -29
  254. package/dist/ui-kernel/index.d.mts +1 -1
  255. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  256. package/dist/{view-builder-D76L0Db8.d.mts → view-builder-Dt9UEsPc.d.mts} +1 -1
  257. package/dist/{worker-9X0QNB1k.mjs → worker-Bn0x5MSH.mjs} +1 -1
  258. package/dist/worker-qgJToDTN.mjs +1 -0
  259. package/dist/workflow-B6C3Pf66.mjs +1 -0
  260. package/dist/workflow-engine/execution-attempt-repository.d.mts +2 -2
  261. package/dist/workflow-engine/execution-attempt-repository.mjs +1 -1
  262. package/dist/workflow-engine/index.d.mts +21 -20
  263. package/dist/workflow-engine/index.mjs +1 -1
  264. package/dist/workflow-engine/package.d.mts +1 -1
  265. package/dist/workflow-engine/package.mjs +1 -1
  266. package/dist/workflow-engine/provider-operation.d.mts +2 -2
  267. package/dist/workflow-engine/provider-operation.mjs +1 -1
  268. package/dist/workflow-engine/testing/conformance.d.mts +1 -1
  269. package/dist/workflow-engine/testing/conformance.mjs +2 -2
  270. package/dist/workflow-engine/testing/index.d.mts +3 -2
  271. package/dist/workflow-engine/testing/index.mjs +1 -1
  272. package/dist/workflow-engine/testing/sqlite.d.mts +1 -1
  273. package/dist/workflow-engine/testing/sqlite.mjs +86 -48
  274. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  275. package/dist/{workflow-transitions-B7HtjuAn.mjs → workflow-transitions-BbhM_zPm.mjs} +1 -1
  276. package/dist/workflow-worker-BSJ6F4P0.mjs +2 -0
  277. package/package.json +1 -1
  278. package/dist/artifact-OnwP6uaD.mjs +0 -1
  279. package/dist/authority-state-bootstrap-rnsTk0u7.mjs +0 -1
  280. package/dist/code-execution-C2PgBdmE.mjs +0 -1
  281. package/dist/framework-packages-CZJDukan.mjs +0 -1
  282. package/dist/kind-registration-BNhVCSaT.mjs +0 -1
  283. package/dist/package-D7c2HC-S.mjs +0 -7
  284. package/dist/packages-BhhBcPgz.mjs +0 -1
  285. package/dist/provider-operation-BwrIrOeY.d.mts +0 -207
  286. package/dist/schemas-hzbKeyyt.mjs +0 -1
  287. package/dist/worker-BwUhRg7i.mjs +0 -1
  288. package/dist/workflow-B3MWrYhG.mjs +0 -1
  289. package/dist/workflow-worker-zYb2UguP.mjs +0 -2
  290. /package/dist/{adapter-auth-runtime-DGY1CDxj.mjs → adapter-auth-runtime-BnPqQChk.mjs} +0 -0
  291. /package/dist/{adapter-binding-fGIz-ss3.d.mts → adapter-binding-BU7STlfd.d.mts} +0 -0
  292. /package/dist/{ajv-DWgn_plp.mjs → ajv-Dtk5hCZS.mjs} +0 -0
  293. /package/dist/{attempt-fixtures-Dpfgqll0.mjs → attempt-fixtures-C-jQE_7B.mjs} +0 -0
  294. /package/dist/{base-orchestrator-BeLqYKJG.d.mts → base-orchestrator-DXiejwQ3.d.mts} +0 -0
  295. /package/dist/{bootstrap-start-client-BYoxrgMk.mjs → bootstrap-start-client-Bdv-_2Q9.mjs} +0 -0
  296. /package/dist/{caller-owned-adapter-stub-egWCuKcE.mjs → caller-owned-adapter-stub-B-Sq7ZvF.mjs} +0 -0
  297. /package/dist/{capability-service-BlYnun2M.d.mts → capability-service-CsWaOwvH.d.mts} +0 -0
  298. /package/dist/{client-CtOWHpFB.d.mts → client-DP4ksY9q.d.mts} +0 -0
  299. /package/dist/{client-binary-version-verifier-BwmToeS1.d.mts → client-binary-version-verifier-BoXRTyae.d.mts} +0 -0
  300. /package/dist/{client-binary-version-verifier-sv-Uv0lB.mjs → client-binary-version-verifier-DHBAzg3-.mjs} +0 -0
  301. /package/dist/{clients-namespace-Bf73bcZh.d.mts → clients-namespace-BVDmj8uV.d.mts} +0 -0
  302. /package/dist/{config-namespace-BbLLd4V0.d.mts → config-namespace-BMOKEuyf.d.mts} +0 -0
  303. /package/dist/{create-static-mount-BQnyEUH1.mjs → create-static-mount-GSdckRQx.mjs} +0 -0
  304. /package/dist/{cross-spawn-DPrJR9Nq.mjs → cross-spawn-Bx_VEdpd.mjs} +0 -0
  305. /package/dist/{cursor-storage-iJ6vBOWd.mjs → cursor-storage-Co4itf44.mjs} +0 -0
  306. /package/dist/{definition-aS9AM2ht.d.mts → definition-ByVJ3n6o.d.mts} +0 -0
  307. /package/dist/{descriptor-to-package-FBkLjHZo.mjs → descriptor-to-package-CZLujoiv.mjs} +0 -0
  308. /package/dist/{drizzle-CIf_jdYI.mjs → drizzle-me-95ICP.mjs} +0 -0
  309. /package/dist/{esm-BH4Kmq3r.mjs → esm-DILYVXmW.mjs} +0 -0
  310. /package/dist/{event-m7_IdhOS.mjs → event-DmQPb5MB.mjs} +0 -0
  311. /package/dist/{execution-attempt-repository-D_qR7NyG.mjs → execution-attempt-repository-DXyh1hgz.mjs} +0 -0
  312. /package/dist/{execution-target-CqaBmnvX.mjs → execution-target-B9jZgDQz.mjs} +0 -0
  313. /package/dist/{extension-context-41A1ZUus.d.mts → extension-context-Cx8CetW3.d.mts} +0 -0
  314. /package/dist/{extension-discovery-DNB1VVsV.d.mts → extension-discovery-C0Nj5EVZ.d.mts} +0 -0
  315. /package/dist/{extension-package-provenance-CTYdo0yF.mjs → extension-package-provenance-BzvG6rDO.mjs} +0 -0
  316. /package/dist/{filesystem-service-DOrm4Llq.d.mts → filesystem-service-C6D7oABi.d.mts} +0 -0
  317. /package/dist/{handler-COkV00I9.mjs → handler-BYQPNm8O.mjs} +0 -0
  318. /package/dist/{index-Cb3NfGSV2.d.mts → index-B04VAxlm2.d.mts} +0 -0
  319. /package/dist/{index-jW7MJ2_q.d.mts → index-B7g7e7_f.d.mts} +0 -0
  320. /package/dist/{index-BKvzOrbF.d.mts → index-B9-1l1oh.d.mts} +0 -0
  321. /package/dist/{index-ClJjlOox.d.mts → index-BGWkmG9i.d.mts} +0 -0
  322. /package/dist/{index-BbAqoQmv.d.mts → index-BR7IiCib.d.mts} +0 -0
  323. /package/dist/{index-BiXqOfhl.d.mts → index-B_VcKELo.d.mts} +0 -0
  324. /package/dist/{index-BBq5I7SB2.d.mts → index-BbjxBrcp2.d.mts} +0 -0
  325. /package/dist/{index-Bq4PHWe9.d.mts → index-BnLp-7qH.d.mts} +0 -0
  326. /package/dist/{index-Bg5iXHk5.d.mts → index-BpWoCe22.d.mts} +0 -0
  327. /package/dist/{index-BO8n7zAS.d.mts → index-Bpv8EpBa.d.mts} +0 -0
  328. /package/dist/{index-Ce_l029J.d.mts → index-BrRCVo9r.d.mts} +0 -0
  329. /package/dist/{index-z-YJG2cw.d.mts → index-CHuB40EK.d.mts} +0 -0
  330. /package/dist/{index-CavvxFdG2.d.mts → index-CIV2G6uX2.d.mts} +0 -0
  331. /package/dist/{index-CgVdz5IV.d.mts → index-CNOqYviR.d.mts} +0 -0
  332. /package/dist/{index-Bk865qJX.d.mts → index-CSEhxhIc.d.mts} +0 -0
  333. /package/dist/{index-gK54T8Am.d.mts → index-C_R6ifn9.d.mts} +0 -0
  334. /package/dist/{index-CUHWylh4.d.mts → index-D3_QOfke.d.mts} +0 -0
  335. /package/dist/{index-BB4EWIf3.d.mts → index-D6qlh6Td.d.mts} +0 -0
  336. /package/dist/{index-BjaQsfAr.d.mts → index-DLlTuugR.d.mts} +0 -0
  337. /package/dist/{index-VVJqONaI.d.mts → index-DOKPbF-y2.d.mts} +0 -0
  338. /package/dist/{index-BJjdUzfw2.d.mts → index-DZv9yNKF2.d.mts} +0 -0
  339. /package/dist/{index-DR9-fFwc.d.mts → index-DxaQ-ceV.d.mts} +0 -0
  340. /package/dist/{index-zvgQ8ErF.d.mts → index-HRn0Kun0.d.mts} +0 -0
  341. /package/dist/{index-Ck5amD5_.d.mts → index-IkeLI7uY.d.mts} +0 -0
  342. /package/dist/{index-Q29tcu5N.d.mts → index-_Ngf4KAa.d.mts} +0 -0
  343. /package/dist/{index-l5HeyxKn.d.mts → index-l9WK9El6.d.mts} +0 -0
  344. /package/dist/{json-value-C57MkQrB.d.mts → json-value-DyMQrwGz.d.mts} +0 -0
  345. /package/dist/{jsonl-transport-QQuABrN7.mjs → jsonl-transport-Dfv3RLzi.mjs} +0 -0
  346. /package/dist/{lib-Sx8gBJvV.mjs → lib-BdfAJKDj.mjs} +0 -0
  347. /package/dist/{model-registry-DNHDnyvs.mjs → model-registry-DlUErRRt.mjs} +0 -0
  348. /package/dist/{namespace-BGgY903U.mjs → namespace-B8kUQpwo.mjs} +0 -0
  349. /package/dist/{namespace-By3nEmBH.d.mts → namespace-B_Gw6BMX.d.mts} +0 -0
  350. /package/dist/{namespace-DInMixc8.d.mts → namespace-CQaL10rI.d.mts} +0 -0
  351. /package/dist/{namespace-DE3oGhaN.d.mts → namespace-CcHA54E1.d.mts} +0 -0
  352. /package/dist/{namespace-DHrItZyM.mjs → namespace-ChjzkJIl.mjs} +0 -0
  353. /package/dist/{namespace-DkAlBY9o.d.mts → namespace-Ct2DKREI.d.mts} +0 -0
  354. /package/dist/{namespace-DENdNdK0.d.mts → namespace-DdcRYk7b.d.mts} +0 -0
  355. /package/dist/{namespace-Ca4sQ8X-.d.mts → namespace-DtXYm32M.d.mts} +0 -0
  356. /package/dist/{namespace-Bn-ryJn5.d.mts → namespace-nE7vRctI.d.mts} +0 -0
  357. /package/dist/{namespace-DP0WWpTO.d.mts → namespace-sTMm1voF.d.mts} +0 -0
  358. /package/dist/{orchestrator-shared-2vuCvljs.d.mts → orchestrator-shared-CYnIz5Zd.d.mts} +0 -0
  359. /package/dist/{out-Rz-t3WeC.mjs → out-Cn6vBxlH.mjs} +0 -0
  360. /package/dist/{package-Tt2uoAFf.mjs → package-BUSXHPOT.mjs} +0 -0
  361. /package/dist/{package-buHQFmTH.mjs → package-BiZ6ehWk.mjs} +0 -0
  362. /package/dist/{package-DfjGt5oK.mjs → package-D4eLGGv4.mjs} +0 -0
  363. /package/dist/{packages-DAqep89i.d.mts → packages-DtsjAYuf.d.mts} +0 -0
  364. /package/dist/{providers-namespace-C56pGeTO.d.mts → providers-namespace-BxknJ03z.d.mts} +0 -0
  365. /package/dist/{quick-lru-uXa2PNb5.mjs → quick-lru-CVryNCTx.mjs} +0 -0
  366. /package/dist/{registry-CZf8VGBh.mjs → registry-Q9gCZtxz.mjs} +0 -0
  367. /package/dist/{schemas-BsZJHdvY.d.mts → schemas-0VbIjfrW.d.mts} +0 -0
  368. /package/dist/{schemas-DDCAGKRi.mjs → schemas-BFgsIiSb.mjs} +0 -0
  369. /package/dist/{schemas-B2Q284-G.d.mts → schemas-Cg2gAars.d.mts} +0 -0
  370. /package/dist/{schemas-CITR9cWN.d.mts → schemas-CmUWeOkr.d.mts} +0 -0
  371. /package/dist/{schemas-BMGJLkdK2.d.mts → schemas-CsRcSlvA2.d.mts} +0 -0
  372. /package/dist/{schemas-wPB7RnHB.d.mts → schemas-DzDVjYjt.d.mts} +0 -0
  373. /package/dist/{schemas-B0zhTfet.d.mts → schemas-KDl7p-wr.d.mts} +0 -0
  374. /package/dist/{schemas-BJKx29Sp.d.mts → schemas-Yp3PvwsM.d.mts} +0 -0
  375. /package/dist/{server-lifecycle-CREtXADx.d.mts → server-lifecycle-Ck6_8o8v.d.mts} +0 -0
  376. /package/dist/{server-lifecycle-AvBVeCFR.mjs → server-lifecycle-hNz8U-QJ.mjs} +0 -0
  377. /package/dist/{session-lineage-CRLvurB-.d.mts → session-lineage-BtvnGkoC.d.mts} +0 -0
  378. /package/dist/{src-DnLncoLg.mjs → src-Du_285FN.mjs} +0 -0
  379. /package/dist/{storage-namespace-JBh9nkKw.d.mts → storage-namespace-CRdQoXZ9.d.mts} +0 -0
  380. /package/dist/{storage-namespace-CH4j0_Zs.mjs → storage-namespace-Dtz2G1if.mjs} +0 -0
  381. /package/dist/{storage-namespace-definition-C0mnpnC_.d.mts → storage-namespace-definition-NBw1Y8Pa.d.mts} +0 -0
  382. /package/dist/{supports-color-BBMFnbC4.mjs → supports-color-BNmyqLq0.mjs} +0 -0
  383. /package/dist/{tool-approval-service-7mzJVMo_.mjs → tool-approval-service-rpV94znP.mjs} +0 -0
  384. /package/dist/{tray-menu-service-thAhpcPA.mjs → tray-menu-service-TWrmvXSo.mjs} +0 -0
  385. /package/dist/{types-9ldZyQTb.d.mts → types-BFv-EK2G.d.mts} +0 -0
  386. /package/dist/{types-DJuxNrac.d.mts → types-BcGXdeva.d.mts} +0 -0
  387. /package/dist/{types-eCGV_g6P.d.mts → types-CUCFeisO.d.mts} +0 -0
  388. /package/dist/{types-xXv0lUeU.d.mts → types-CXrp5ldz.d.mts} +0 -0
  389. /package/dist/{types-BMkn9jOe.d.mts → types-D4N56a4O.d.mts} +0 -0
  390. /package/dist/{types-CjjNAiHa.mjs → types-D9GJ7FyQ.mjs} +0 -0
  391. /package/dist/{window-registry-CGaYVD7l.d.mts → window-registry-Chi2qJ5k.d.mts} +0 -0
@@ -1,4 +1,3 @@
1
- import { a as ProviderOperationClaim, i as ProcessBoundProvisionerLossProof, l as ProviderOperationOwnershipRecord, o as ProviderOperationClaimDecision, s as ProviderOperationMutationDecision } from "./provider-operation-BwrIrOeY.mjs";
2
1
  import { BoundedRecoveryEvidence, ExecutionAttemptInstruction, ExecutionAttemptOperationKind, ExecutionAttemptOperationReportRequest, ExecutionAttemptOperationReportResponse, ExecutionAttemptPreparationResult, ExecutionAttemptWorkspaceBinding, ProviderAllocationRef, WorkerAllocationLifetime } from "@makaio/framework/contracts";
3
2
 
4
3
  //#region subsystems/workflow-engine/src/execution-attempt-owner-recovery.d.ts
@@ -109,6 +108,453 @@ declare function replayEnsuredAttempt(input: EnsureExecutionAttemptInput, boundA
109
108
  */
110
109
  declare function readAttemptSettlementSnapshot<TOutcome>(input: ReadAttemptSettlementInput, snapshot: AttemptSettlementSnapshot, codec: OutcomeCodec<TOutcome>): AttemptSettlementRead<TOutcome>;
111
110
  //#endregion
111
+ //#region subsystems/workflow-engine/src/provider-operation.d.ts
112
+ /**
113
+ * Provider-operation ownership protocol.
114
+ *
115
+ * An execution attempt owns canonical workflow state. A *provider operation*
116
+ * is the separate, fenced record of who is currently allowed to act on that
117
+ * attempt's provider-side infrastructure, and what remediation debt is still
118
+ * outstanding for it. Completion is a separate, positive fact: an attempt
119
+ * settlement cannot prove that the provider has released its allocation.
120
+ *
121
+ * The two records are deliberately distinct:
122
+ * - the attempt answers "what is the canonical workflow answer?";
123
+ * - the operation answers "who may talk to the provider right now, and what
124
+ * does that provider still owe us?".
125
+ *
126
+ * Worker outcome commitment is therefore independent of operation ownership:
127
+ * a worker that produces a result never needs a claim.
128
+ * @packageDocumentation
129
+ */
130
+ /**
131
+ * Outstanding provider-side debt for one execution attempt.
132
+ *
133
+ * - `provisioning-resolution`: a provider call was authorized but no
134
+ * allocation is known yet. Either an allocation exists and must be found,
135
+ * or its absence must be positively proven.
136
+ * - `allocation-control`: an allocation reference is known and the operation
137
+ * owns its infrastructure lifecycle.
138
+ * - `terminal-convergence`: a known allocation has been confirmed terminated,
139
+ * and the attempt still needs a canonical workflow answer.
140
+ */
141
+ type ProviderOperationObligation = 'provisioning-resolution' | 'allocation-control' | 'terminal-convergence';
142
+ /**
143
+ * Ordered constant array of every provider-operation obligation.
144
+ *
145
+ * The order is the monotonic progression an operation may follow. A stored
146
+ * obligation never moves backwards, and callers never supply it: the durable
147
+ * repository derives it from the transition being applied.
148
+ */
149
+ declare const PROVIDER_OPERATION_OBLIGATIONS: readonly ["provisioning-resolution", "allocation-control", "terminal-convergence"];
150
+ /**
151
+ * Proof that the holder currently owns an attempt's provider operation.
152
+ *
153
+ * A claim is the only authorization for a provider-side evidence mutation.
154
+ * It is fenced on two axes: `generation` advances on every takeover, and
155
+ * `token` is reissued with it, so a claim from a superseded owner is rejected
156
+ * even if that owner's lease has not visibly expired yet.
157
+ *
158
+ * `ownerId` identifies a controller *process incarnation*. It is not a
159
+ * machine identifier, a workflow node identifier, an execution identifier,
160
+ * or a security principal.
161
+ */
162
+ interface ProviderOperationClaim {
163
+ /** Attempt whose provider operation this claim authorizes. */
164
+ readonly executionAttemptId: string;
165
+ /** Ownership generation this claim was issued for. */
166
+ readonly generation: number;
167
+ /** Controller process incarnation that holds the claim. */
168
+ readonly ownerId: string;
169
+ /** Opaque fencing token issued by the durable repository. */
170
+ readonly token: string;
171
+ /**
172
+ * Instant after which the lease may be taken over.
173
+ *
174
+ * Canonical UTC ISO-8601 with millisecond precision, as issued by the
175
+ * durable repository, and ordered as an instant rather than as text.
176
+ */
177
+ readonly leaseExpiresAt: string;
178
+ }
179
+ /**
180
+ * Durable ownership and remediation state for one attempt's provider operation.
181
+ *
182
+ * Until {@link isProviderOperationResolved} returns `true`, `ownerId`,
183
+ * `token`, and `leaseExpiresAt` describe the current claim and are all `null`
184
+ * when the operation is unowned. Positive completion evidence may be recorded
185
+ * before the attempt settles; that evidence is immutable, but it does not
186
+ * freeze the live claim or make the operation ineligible for recovery. Once
187
+ * the operation is resolved, the fields retain the final control snapshot,
188
+ * which may be unowned after a handoff and is not proof-writing provenance.
189
+ * `generation` and `obligation` survive both handoff and completion.
190
+ *
191
+ * All fields are JSON-safe and non-secret. `lastFailure` holds bounded
192
+ * evidence only; plaintext credentials, stack traces, and raw provider
193
+ * responses never reach this record.
194
+ */
195
+ interface ProviderOperationOwnershipRecord {
196
+ /** Attempt this operation belongs to. */
197
+ readonly executionAttemptId: string;
198
+ /** Monotonic ownership generation, incremented by every takeover. */
199
+ readonly generation: number;
200
+ /**
201
+ * Current controller process incarnation while unresolved, retained as the
202
+ * final control snapshot once {@link isProviderOperationResolved} returns
203
+ * `true`, or `null` when the operation is unowned.
204
+ */
205
+ readonly ownerId: string | null;
206
+ /**
207
+ * Current fencing token while unresolved, retained as the final control
208
+ * snapshot once {@link isProviderOperationResolved} returns `true`, or
209
+ * `null` when the operation is unowned.
210
+ */
211
+ readonly token: string | null;
212
+ /**
213
+ * Current lease deadline while unresolved, retained with the final control
214
+ * snapshot once {@link isProviderOperationResolved} returns `true`, or
215
+ * `null` when the operation is unowned.
216
+ */
217
+ readonly leaseExpiresAt: string | null;
218
+ /** Outstanding provider-side debt, owned by the durable repository. */
219
+ readonly obligation: ProviderOperationObligation;
220
+ /** Number of recorded uncertainty observations for this operation. */
221
+ readonly failureCount: number;
222
+ /** Most recent bounded evidence recorded against this operation. */
223
+ readonly lastFailure: BoundedRecoveryEvidence | null;
224
+ /**
225
+ * Positive, immutable proof that every provider-side responsibility for this
226
+ * operation is complete, or `null` while the proof has not been observed.
227
+ *
228
+ * This is deliberately independent of the attempt's settlement and of
229
+ * {@link obligation}: a settled attempt can still need provider cleanup, and
230
+ * an unsettled attempt with this proof stays recoverable until it has a
231
+ * canonical settlement.
232
+ */
233
+ readonly completionEvidence: BoundedRecoveryEvidence | null;
234
+ }
235
+ /**
236
+ * Whether an operation has both of the independent facts needed to resolve it.
237
+ *
238
+ * Provider evidence can arrive before an outcome. That fact must be retained,
239
+ * but it does not close control ownership: recovery may still need to hold or
240
+ * hand off the operation until the attempt settles. Conversely, settlement
241
+ * alone never proves provider work is complete.
242
+ * @param attempt - Minimal durable settlement fact from the attempt record.
243
+ * @param operation - Minimal positive provider-completion fact from the operation record.
244
+ * @returns Whether no provider-operation ownership or recovery work remains.
245
+ */
246
+ declare function isProviderOperationResolved(attempt: Pick<ExecutionAttemptRecord, 'settlementKind'>, operation: Pick<ProviderOperationOwnershipRecord, 'completionEvidence'>): boolean;
247
+ /**
248
+ * Durable decision for acquiring or extending provider-operation ownership.
249
+ *
250
+ * - `claimed`: the caller now holds the operation; the returned claim is the
251
+ * only value that authorizes subsequent provider-side mutations.
252
+ * - `stale`: the request does not match durable ownership — a superseded
253
+ * generation or token on renewal, or a lease that has not expired yet on
254
+ * takeover. The caller must re-read before retrying.
255
+ * - `resolved`: positive completion evidence and attempt settlement were both
256
+ * recorded, so there is nothing left to own. Neither fact alone produces
257
+ * this decision.
258
+ * - `not-found`: no provider operation exists for the attempt.
259
+ */
260
+ type ProviderOperationClaimDecision = {
261
+ readonly kind: 'claimed';
262
+ readonly claim: ProviderOperationClaim;
263
+ } | {
264
+ readonly kind: 'stale';
265
+ } | {
266
+ readonly kind: 'resolved';
267
+ } | {
268
+ readonly kind: 'not-found';
269
+ };
270
+ /**
271
+ * Durable decision for a claim-fenced mutation of provider-operation state.
272
+ *
273
+ * - `recorded`: the mutation was applied.
274
+ * - `stale`: the caller's view of durable state is out of date — either the
275
+ * claim no longer matches the stored generation/token, or the stored
276
+ * obligation cannot make the requested transition. In both cases the
277
+ * caller must re-read; it may not pick a different write path instead.
278
+ * - `resolved`: positive completion evidence and attempt settlement were both
279
+ * recorded, so the operation is closed.
280
+ * - `not-found`: no provider operation exists for the attempt.
281
+ */
282
+ type ProviderOperationMutationDecision = {
283
+ readonly kind: 'recorded';
284
+ } | {
285
+ readonly kind: 'stale';
286
+ } | {
287
+ readonly kind: 'resolved';
288
+ } | {
289
+ readonly kind: 'not-found';
290
+ };
291
+ /**
292
+ * Durable decision for recording positive completion of a provider operation.
293
+ *
294
+ * Completion evidence is immutable once written. The repository validates the
295
+ * current claim before recording it, and no later call can replace the first
296
+ * proof. `evidence-recorded` means the evidence is durable but the attempt
297
+ * remains unsettled, so the operation stays recoverable. `completed` means
298
+ * the same write also resolves the operation because the attempt was already
299
+ * settled. Replaying after evidence exists but before settlement returns
300
+ * `evidence-recorded`; replaying after resolution returns `already-completed`.
301
+ */
302
+ type ProviderOperationCompletionDecision = {
303
+ readonly kind: 'evidence-recorded';
304
+ } | {
305
+ readonly kind: 'completed';
306
+ } | {
307
+ readonly kind: 'already-completed';
308
+ } | {
309
+ readonly kind: 'stale';
310
+ } | {
311
+ readonly kind: 'not-found';
312
+ };
313
+ /**
314
+ * Durable decision for recording positively proven pre-allocation absence.
315
+ *
316
+ * - `recorded`: absence evidence was stored and the same positive proof
317
+ * completed the operation while newly settling the attempt as `abandoned`.
318
+ * - `completed`: absence evidence was stored and completed the operation, but
319
+ * an existing canonical settlement was preserved — all in one transaction.
320
+ * - `allocated`: an allocation won the race. Absence must never terminalize
321
+ * an attempt that owns live infrastructure.
322
+ * - `resolved`: positive provider completion evidence and attempt settlement
323
+ * were already recorded.
324
+ * - `stale`: the claim no longer matches durable ownership.
325
+ * - `not-found`: no provider operation exists for the attempt.
326
+ */
327
+ type ProvisioningAbsenceDecision = {
328
+ readonly kind: 'recorded';
329
+ } | {
330
+ readonly kind: 'completed';
331
+ } | {
332
+ readonly kind: 'allocated';
333
+ readonly allocationRef: ProviderAllocationRef;
334
+ } | {
335
+ readonly kind: 'resolved';
336
+ } | {
337
+ readonly kind: 'stale';
338
+ } | {
339
+ readonly kind: 'not-found';
340
+ };
341
+ /**
342
+ * Durable decision for closing pre-allocation debt on proven loss of the
343
+ * provisioner process incarnation.
344
+ *
345
+ * The counterpart of {@link ProvisioningAbsenceDecision} for the one lifetime
346
+ * where nothing needs to be observed to conclude: a
347
+ * `provisioner-process-bound` allocation cannot outlive the process that
348
+ * created it, so proof that the exact recorded incarnation is gone is proof
349
+ * that no allocation survives. Every refusal below is a statement about why the
350
+ * proof does not apply, and each is reported distinctly because they oblige the
351
+ * caller to do different things.
352
+ *
353
+ * - `recorded`: the proof was stored and the same positive proof completed the
354
+ * operation while newly settling the attempt as `abandoned`.
355
+ * - `completed`: the proof was stored and completed the operation, but an
356
+ * existing canonical settlement was preserved — all in one transaction.
357
+ * - `not-process-bound`: the attempt's recorded lifetime is not
358
+ * `provisioner-process-bound`, so losing a process says nothing about its
359
+ * allocation. The reported lifetime is the stored one, `null` before
360
+ * provisioning began.
361
+ * - `incarnation-mismatch`: the proof names a different provisioner
362
+ * incarnation, or the attempt has none recorded, so the proof says nothing
363
+ * about this attempt. The reported identifier is the stored one.
364
+ * - `allocated`: an allocation is already recorded, so the attempt owes
365
+ * allocation control rather than pre-allocation closure. Terminate the known
366
+ * allocation instead of closing the attempt from a proof.
367
+ * - `resolved`: positive provider completion evidence and attempt settlement
368
+ * were already recorded.
369
+ * - `stale`: the claim no longer matches durable ownership.
370
+ * - `not-found`: no provider operation exists for the attempt, or it does not
371
+ * belong to the named execution.
372
+ */
373
+ type ProvisionerIncarnationLossDecision = {
374
+ readonly kind: 'recorded';
375
+ } | {
376
+ readonly kind: 'completed';
377
+ } | {
378
+ readonly kind: 'not-process-bound';
379
+ readonly allocationLifetime: WorkerAllocationLifetime | null;
380
+ } | {
381
+ readonly kind: 'incarnation-mismatch';
382
+ readonly provisionerIncarnationId: string | null;
383
+ } | {
384
+ readonly kind: 'allocated';
385
+ readonly allocationRef: ProviderAllocationRef;
386
+ } | {
387
+ readonly kind: 'resolved';
388
+ } | {
389
+ readonly kind: 'stale';
390
+ } | {
391
+ readonly kind: 'not-found';
392
+ };
393
+ /** Input for extending the lease of a currently held provider operation. */
394
+ interface RenewProviderOperationClaimInput {
395
+ /** Claim the caller currently believes it holds. */
396
+ readonly claim: ProviderOperationClaim;
397
+ /** New ISO-8601 lease deadline. */
398
+ readonly leaseExpiresAt: string;
399
+ }
400
+ /**
401
+ * Input for taking ownership of an unowned or expired provider operation.
402
+ *
403
+ * Takeover needs no prior claim — that is the point. It succeeds only when
404
+ * the operation is unowned or its lease has expired relative to `observedAt`,
405
+ * and it always increments the generation so every claim issued before it is
406
+ * fenced immediately.
407
+ */
408
+ interface TakeOverProviderOperationInput {
409
+ /** Attempt whose provider operation is being taken over. */
410
+ readonly executionAttemptId: string;
411
+ /** Controller process incarnation requesting ownership. */
412
+ readonly ownerId: string;
413
+ /** ISO-8601 observation time used to evaluate lease expiry. */
414
+ readonly observedAt: string;
415
+ /** ISO-8601 deadline for the new lease. */
416
+ readonly leaseExpiresAt: string;
417
+ }
418
+ /**
419
+ * Input for releasing a held provider operation without resolving it.
420
+ *
421
+ * Handoff is a graceful release, not a failure: optional evidence explains
422
+ * why control was released but does not count towards the failure total.
423
+ */
424
+ interface HandoffProviderOperationInput {
425
+ /** Claim being released. */
426
+ readonly claim: ProviderOperationClaim;
427
+ /** Optional bounded evidence explaining the release. */
428
+ readonly evidence?: BoundedRecoveryEvidence;
429
+ }
430
+ /**
431
+ * Input for recording that a provider observation stayed inconclusive.
432
+ *
433
+ * Uncertainty is the only honest record for an ambiguous provider result. It
434
+ * retains the current obligation and never terminalizes the attempt.
435
+ */
436
+ interface RecordProviderOperationUncertaintyInput {
437
+ /** Claim authorizing the record. */
438
+ readonly claim: ProviderOperationClaim;
439
+ /** Bounded evidence describing what blocked a conclusion. */
440
+ readonly evidence: BoundedRecoveryEvidence;
441
+ }
442
+ /** Input for recording positive completion evidence of a provider operation. */
443
+ interface CompleteProviderOperationInput {
444
+ /** Claim that currently owns the provider operation. */
445
+ readonly claim: ProviderOperationClaim;
446
+ /** Bounded, durable, non-secret proof that provider work is complete. */
447
+ readonly evidence: BoundedRecoveryEvidence;
448
+ }
449
+ /** Bounded, caller-timed selector for provider operations eligible for takeover. */
450
+ interface ListOpenProviderOperationsInput {
451
+ /** ISO-8601 instant at which the caller observed lease eligibility. */
452
+ readonly observedAt: string;
453
+ /** Positive safe-integer maximum number of records to return; no implicit default exists. */
454
+ readonly limit: number;
455
+ }
456
+ /**
457
+ * One provider operation that still needs infrastructure work.
458
+ *
459
+ * The joined shape returns the existing durable attempt and operation records
460
+ * rather than introducing another lifecycle ledger. The operation is open
461
+ * when {@link isProviderOperationResolved} returns `false`; its completion
462
+ * evidence and settlement may each be present independently.
463
+ */
464
+ interface OpenProviderOperationRecord {
465
+ /** Attempt whose provider-side infrastructure remains open. */
466
+ readonly attempt: ExecutionAttemptRecord;
467
+ /** Open provider operation, including current or expired claim facts. */
468
+ readonly operation: ProviderOperationOwnershipRecord;
469
+ }
470
+ /**
471
+ * Controller identity and lease policy for an attempt's first claim.
472
+ *
473
+ * Supplied by the host, never invented by the code that dispatches work.
474
+ * A dispatcher knows which attempt it is starting; it does not know which
475
+ * process incarnation it belongs to or how long a lease should last.
476
+ */
477
+ interface InitialProviderOperationClaimContext {
478
+ /** Controller process incarnation that will hold the initial claim. */
479
+ readonly ownerId: string;
480
+ /**
481
+ * Provisioner process incarnation that performs the provider call.
482
+ *
483
+ * Stable for the lifetime of the provisioning process. It is never
484
+ * regenerated per attempt: process-loss proof is only meaningful when the
485
+ * recorded incarnation identifies the process that actually provisioned.
486
+ */
487
+ readonly provisionerIncarnationId: string;
488
+ /** ISO-8601 deadline for the initial lease, per host lease policy. */
489
+ readonly leaseExpiresAt: string;
490
+ }
491
+ /**
492
+ * Host policy for renewing one live provider-operation claim.
493
+ *
494
+ * The policy supplies time only. The Authority remains the sole writer of the
495
+ * durable claim, so a host cannot turn a local timer into a second ownership
496
+ * protocol.
497
+ */
498
+ interface ProviderOperationLeasePolicy {
499
+ /**
500
+ * State the next requested lease deadline and when local custody must renew.
501
+ * @param claim - Current durable claim whose lease is still held locally.
502
+ * @returns Next durable deadline and the host-chosen delay before renewal.
503
+ */
504
+ nextRenewal(claim: ProviderOperationClaim): ProviderOperationLeaseRenewal;
505
+ }
506
+ /** Host-selected schedule for one claim renewal. */
507
+ interface ProviderOperationLeaseRenewal {
508
+ /** ISO-8601 deadline requested from the durable Authority on renewal. */
509
+ readonly leaseExpiresAt: string;
510
+ /** Positive delay in milliseconds after which local custody must renew. */
511
+ readonly renewAfterMs: number;
512
+ }
513
+ /**
514
+ * Host seam that produces the initial claim context for an attempt.
515
+ *
516
+ * Hosts implement this to inject controller identity and lease policy.
517
+ * There is deliberately no default implementation and no default lease
518
+ * duration: a hidden default would silently attach remediation authority to
519
+ * an anonymous owner.
520
+ */
521
+ interface InitialProviderOperationClaimContextSource extends ProviderOperationLeasePolicy {
522
+ /**
523
+ * Produce the initial claim context for one attempt about to be provisioned.
524
+ * @param input - Execution, attempt, and provider the claim is being created for.
525
+ * @param signal - AbortSignal for cooperative cancellation.
526
+ * @returns Controller identity, provisioner incarnation, and lease deadline.
527
+ */
528
+ create(input: {
529
+ /** Workflow execution identifier. */readonly executionId: string; /** Attempt identifier the claim is created for. */
530
+ readonly executionAttemptId: string; /** Provider identifier that will be bound to the attempt. */
531
+ readonly providerId: string;
532
+ }, signal: AbortSignal): Promise<InitialProviderOperationClaimContext>;
533
+ }
534
+ /**
535
+ * Positive proof that a specific provisioner process incarnation is gone.
536
+ *
537
+ * Only meaningful for attempts whose allocation lifetime is
538
+ * `provisioner-process-bound`: such an allocation cannot outlive the process
539
+ * that created it, so proving that process is gone proves the allocation is
540
+ * gone too.
541
+ *
542
+ * A remediator may act on this proof only when `provisionerIncarnationId`
543
+ * exactly equals the attempt's immutable `provisionerIncarnationId`. Proof
544
+ * naming a different incarnation says nothing about this attempt.
545
+ *
546
+ * An expired lease is never such proof: leases expire for slow controllers
547
+ * as readily as for dead ones.
548
+ */
549
+ interface ProcessBoundProvisionerLossProof {
550
+ /** Discriminant for provisioner incarnation loss. */
551
+ readonly kind: 'provisioner-incarnation-lost';
552
+ /** Provisioner process incarnation this proof is about. */
553
+ readonly provisionerIncarnationId: string;
554
+ /** Bounded, durable, non-secret evidence supporting the loss claim. */
555
+ readonly evidence: BoundedRecoveryEvidence;
556
+ }
557
+ //#endregion
112
558
  //#region subsystems/workflow-engine/src/execution-attempt-decisions.d.ts
113
559
  /** Facts read coherently by a realization before decoding runtime control state. */
114
560
  interface AttemptReachability {
@@ -252,7 +698,8 @@ declare const ATTEMPT_OPERATION_START_GATES: readonly ["open", "closed"];
252
698
  * guard.
253
699
  * - `closed`: the attempt will never admit another operation. Closing is
254
700
  * one-way and happens exactly where the attempt stops being a place work may
255
- * begin — when a newer attempt supersedes it, and when it settles.
701
+ * begin — when a newer attempt supersedes it, when cancellation is requested,
702
+ * and when it settles.
256
703
  */
257
704
  type AttemptOperationStartGate = (typeof ATTEMPT_OPERATION_START_GATES)[number];
258
705
  /** Coherent durable facts required before an attempt may enter runtime registration. */
@@ -300,6 +747,20 @@ declare function sameAllocationRef(stored: ProviderAllocationRef, candidate: Pro
300
747
  * workflow-storage lookup keys keep plain `string`.
301
748
  */
302
749
  type ExecutionOwnerId = string;
750
+ /** A durable request to stop an attempt, never evidence that it stopped. */
751
+ interface ExecutionAttemptCancellationIntent {
752
+ /** First accepted request time, preserved across duplicate requests and controller handoff. */
753
+ readonly requestedAt: string;
754
+ /** Optional owner-supplied explanation. */
755
+ readonly reason?: string;
756
+ }
757
+ /** Owner-scoped cancellation of attempts that exist when the request commits. */
758
+ interface RequestExecutionCancellationInput {
759
+ /** Owner authorizing the cancellation of its existing attempts. */
760
+ readonly executionId: ExecutionOwnerId;
761
+ /** Explanation retained only when this is the first request for an attempt. */
762
+ readonly reason?: string;
763
+ }
303
764
  /**
304
765
  * Compare two durable outcome texts as values.
305
766
  *
@@ -549,8 +1010,8 @@ interface AttemptControlState {
549
1010
  * Whether the attempt still admits operations.
550
1011
  *
551
1012
  * `open` from creation. Closed by {@link ExecutionAttemptRepository.createAttempt}
552
- * on the attempt it supersedes, and by every terminal settlement on the
553
- * attempt it settles. Closing is one-way.
1013
+ * on the attempt it supersedes, by an owner cancellation request, and by every
1014
+ * terminal settlement on the attempt it settles. Closing is one-way.
554
1015
  */
555
1016
  readonly operationStartGate: AttemptOperationStartGate;
556
1017
  /**
@@ -848,55 +1309,6 @@ declare class RuntimeOutcomeFenceMismatchError extends Error {
848
1309
  * @throws RuntimeOutcomeFenceMismatchError when the originating runtime slot changed.
849
1310
  */
850
1311
  declare function assertRuntimeOutcomeFence(control: AttemptControlState, fence: RuntimeOutcomeFence | undefined): void;
851
- /** Input for extending the lease of a currently held provider operation. */
852
- interface RenewProviderOperationClaimInput {
853
- /** Claim the caller currently believes it holds. */
854
- readonly claim: ProviderOperationClaim;
855
- /** New ISO-8601 lease deadline. */
856
- readonly leaseExpiresAt: string;
857
- }
858
- /**
859
- * Input for taking ownership of an unowned or expired provider operation.
860
- *
861
- * Takeover needs no prior claim — that is the point. It succeeds only when
862
- * the operation is unowned or its lease has expired relative to `observedAt`,
863
- * and it always increments the generation so every claim issued before it is
864
- * fenced immediately.
865
- */
866
- interface TakeOverProviderOperationInput {
867
- /** Attempt whose provider operation is being taken over. */
868
- readonly executionAttemptId: string;
869
- /** Controller process incarnation requesting ownership. */
870
- readonly ownerId: string;
871
- /** ISO-8601 observation time used to evaluate lease expiry. */
872
- readonly observedAt: string;
873
- /** ISO-8601 deadline for the new lease. */
874
- readonly leaseExpiresAt: string;
875
- }
876
- /**
877
- * Input for releasing a held provider operation without resolving it.
878
- *
879
- * Handoff is a graceful release, not a failure: optional evidence explains
880
- * why control was released but does not count towards the failure total.
881
- */
882
- interface HandoffProviderOperationInput {
883
- /** Claim being released. */
884
- readonly claim: ProviderOperationClaim;
885
- /** Optional bounded evidence explaining the release. */
886
- readonly evidence?: BoundedRecoveryEvidence;
887
- }
888
- /**
889
- * Input for recording that a provider observation stayed inconclusive.
890
- *
891
- * Uncertainty is the only honest record for an ambiguous provider result. It
892
- * retains the current obligation and never terminalizes the attempt.
893
- */
894
- interface RecordProviderOperationUncertaintyInput {
895
- /** Claim authorizing the record. */
896
- readonly claim: ProviderOperationClaim;
897
- /** Bounded evidence describing what blocked a conclusion. */
898
- readonly evidence: BoundedRecoveryEvidence;
899
- }
900
1312
  /** Input for recording an allocation reference against a held operation. */
901
1313
  interface RecordAllocationInput {
902
1314
  /** Claim authorizing the record. */
@@ -1076,9 +1488,10 @@ interface MarkRuntimeReadyInput {
1076
1488
  * - `already-provisioning`: a begin already succeeded for this attempt. The
1077
1489
  * caller must converge the existing operation instead of calling again.
1078
1490
  * - `allocated`: an allocation is already recorded for this attempt.
1079
- * - `resolved`: the attempt has settled; the operation is closed.
1491
+ * - `resolved`: the attempt has settled, so it cannot begin provisioning.
1080
1492
  * - `fenced`: the attempt exists but is no longer the active attempt for its
1081
- * execution, so it may not bootstrap a new provider call.
1493
+ * execution, or its operation start gate is closed by cancellation, so it
1494
+ * may not bootstrap a new provider call.
1082
1495
  * - `not-found`: no such attempt for the given execution.
1083
1496
  */
1084
1497
  type ProvisioningClaimDecision = {
@@ -1109,7 +1522,8 @@ type ProvisioningClaimDecision = {
1109
1522
  * - `duplicate`: a reference {@link sameAllocationRef} judges identical was
1110
1523
  * already stored; this is a replay.
1111
1524
  * - `conflict`: a different reference is already stored for this attempt.
1112
- * - `resolved`: the attempt has settled; the operation is closed.
1525
+ * - `resolved`: positive provider completion evidence and attempt settlement
1526
+ * were already recorded.
1113
1527
  * - `stale`: the claim no longer matches durable ownership.
1114
1528
  * - `not-found`: no provider operation exists for the attempt.
1115
1529
  */
@@ -1137,76 +1551,6 @@ type AllocationRecordingDecision = {
1137
1551
  * discovered allocation never makes its attempt bootstrap-claimable.
1138
1552
  */
1139
1553
  type DiscoveredAllocationDecision = AllocationRecordingDecision;
1140
- /**
1141
- * Durable decision for recording positively proven pre-allocation absence.
1142
- *
1143
- * - `recorded`: absence evidence was stored, the attempt settled as
1144
- * `abandoned`, and the operation closed — all in one transaction.
1145
- * - `allocated`: an allocation won the race. Absence must never terminalize
1146
- * an attempt that owns live infrastructure.
1147
- * - `resolved`: the attempt has already settled; the operation is closed.
1148
- * - `stale`: the claim no longer matches durable ownership.
1149
- * - `not-found`: no provider operation exists for the attempt.
1150
- */
1151
- type ProvisioningAbsenceDecision = {
1152
- readonly kind: 'recorded';
1153
- } | {
1154
- readonly kind: 'allocated';
1155
- readonly allocationRef: ProviderAllocationRef;
1156
- } | {
1157
- readonly kind: 'resolved';
1158
- } | {
1159
- readonly kind: 'stale';
1160
- } | {
1161
- readonly kind: 'not-found';
1162
- };
1163
- /**
1164
- * Durable decision for closing pre-allocation debt on proven loss of the
1165
- * provisioner process incarnation.
1166
- *
1167
- * The counterpart of {@link ProvisioningAbsenceDecision} for the one lifetime
1168
- * where nothing needs to be observed to conclude: a
1169
- * `provisioner-process-bound` allocation cannot outlive the process that
1170
- * created it, so proof that the exact recorded incarnation is gone is proof
1171
- * that no allocation survives. Every refusal below is a statement about why the
1172
- * proof does not apply, and each is reported distinctly because they oblige the
1173
- * caller to do different things.
1174
- *
1175
- * - `recorded`: the proof was stored, the attempt settled as `abandoned`, and
1176
- * the operation closed — all in one transaction.
1177
- * - `not-process-bound`: the attempt's recorded lifetime is not
1178
- * `provisioner-process-bound`, so losing a process says nothing about its
1179
- * allocation. The reported lifetime is the stored one, `null` before
1180
- * provisioning began.
1181
- * - `incarnation-mismatch`: the proof names a different provisioner
1182
- * incarnation, or the attempt has none recorded, so the proof says nothing
1183
- * about this attempt. The reported identifier is the stored one.
1184
- * - `allocated`: an allocation is already recorded, so the attempt owes
1185
- * allocation control rather than pre-allocation closure. Terminate the known
1186
- * allocation instead of closing the attempt from a proof.
1187
- * - `resolved`: the attempt has already settled; the operation is closed.
1188
- * - `stale`: the claim no longer matches durable ownership.
1189
- * - `not-found`: no provider operation exists for the attempt, or it does not
1190
- * belong to the named execution.
1191
- */
1192
- type ProvisionerIncarnationLossDecision = {
1193
- readonly kind: 'recorded';
1194
- } | {
1195
- readonly kind: 'not-process-bound';
1196
- readonly allocationLifetime: WorkerAllocationLifetime | null;
1197
- } | {
1198
- readonly kind: 'incarnation-mismatch';
1199
- readonly provisionerIncarnationId: string | null;
1200
- } | {
1201
- readonly kind: 'allocated';
1202
- readonly allocationRef: ProviderAllocationRef;
1203
- } | {
1204
- readonly kind: 'resolved';
1205
- } | {
1206
- readonly kind: 'stale';
1207
- } | {
1208
- readonly kind: 'not-found';
1209
- };
1210
1554
  /**
1211
1555
  * Durable decision for settling an allocated attempt as an infrastructure
1212
1556
  * failure.
@@ -1214,8 +1558,8 @@ type ProvisionerIncarnationLossDecision = {
1214
1558
  * This terminal CAS competes with outcome submission; the first durable
1215
1559
  * transition wins and the loser observes `resolved`.
1216
1560
  *
1217
- * - `recorded`: the failure was persisted, the attempt settled, and the
1218
- * operation closed.
1561
+ * - `recorded`: the failure was persisted and the attempt settled. The
1562
+ * provider operation remains open until positive completion is recorded.
1219
1563
  * - `resolved`: the attempt already has a terminal settlement.
1220
1564
  * - `not-allocated`: the attempt owns no allocation, so it cannot have
1221
1565
  * suffered an infrastructure failure. Prove absence instead.
@@ -1256,7 +1600,8 @@ type InfrastructureFailureDecision = {
1256
1600
  * - `not-allocated`: the claim is current, but no allocation is known for the
1257
1601
  * attempt. Prove absence instead of claiming termination.
1258
1602
  * - `stale`: the claim no longer matches durable ownership.
1259
- * - `resolved`: the attempt has settled, so the operation is closed.
1603
+ * - `resolved`: positive provider completion evidence and attempt settlement
1604
+ * were already recorded.
1260
1605
  * - `not-found`: no provider operation exists for the attempt.
1261
1606
  */
1262
1607
  type AllocationTerminationDecision = ProviderOperationMutationDecision | {
@@ -1269,7 +1614,8 @@ type AllocationTerminationDecision = ProviderOperationMutationDecision | {
1269
1614
  * - `stale`: the caller's view is out of date — either `currentRef` does not
1270
1615
  * match the stored reference, or the claim no longer matches durable
1271
1616
  * ownership. `storedRef` carries the current reference when one exists.
1272
- * - `resolved`: the attempt has settled; the operation is closed.
1617
+ * - `resolved`: positive provider completion evidence and attempt settlement
1618
+ * were already recorded.
1273
1619
  * - `not-allocated`: the attempt has no allocation to evolve.
1274
1620
  * - `not-found`: no provider operation exists for the attempt.
1275
1621
  */
@@ -1554,10 +1900,11 @@ type RuntimeReadinessDecision = {
1554
1900
  * ```text
1555
1901
  * begin => provisioning-resolution
1556
1902
  * record allocation/discovery => allocation-control
1557
- * record confirmed absence => settled(abandoned) + operation closed
1558
- * prove provisioner loss => settled(abandoned) + operation closed
1903
+ * record confirmed absence => provider completion + settle(abandoned) if unsettled
1904
+ * prove provisioner loss => provider completion + settle(abandoned) if unsettled
1559
1905
  * record termination => terminal-convergence
1560
- * infrastructure failure CAS => settled(infrastructure-failure) + closed
1906
+ * infrastructure failure CAS => settled(infrastructure-failure)
1907
+ * complete provider operation => durable positive evidence; resolves with settlement
1561
1908
  * uncertainty => retain current obligation
1562
1909
  * ```
1563
1910
  *
@@ -1611,7 +1958,7 @@ type RuntimeReadinessDecision = {
1611
1958
  *
1612
1959
  * An operation stays remediable after its attempt stops being the active
1613
1960
  * attempt for its execution. Claim-fenced discovery, absence, cleanup, and
1614
- * terminal convergence may update such an attempt and close its operation,
1961
+ * terminal convergence may update such an attempt and complete its operation,
1615
1962
  * but must never change which attempt is active, reactivate it, or make it
1616
1963
  * bootstrap-claimable.
1617
1964
  *
@@ -1687,6 +2034,22 @@ type RuntimeReadinessDecision = {
1687
2034
  * @typeParam TOutcome - Owner-specific outcome type committed per attempt.
1688
2035
  */
1689
2036
  interface ExecutionAttemptRepository<TOutcome> extends OwnerRequestRecoveryRepository<TOutcome> {
2037
+ /**
2038
+ * Persist first-wins cancellation intent and close operation start gates atomically
2039
+ * for every existing attempt of this owner, including historical allocations.
2040
+ * This does not settle an attempt or confirm provider termination. The owner must
2041
+ * prevent later attempts after cancellation; this port does not install a permanent
2042
+ * owner-wide creation fence. Repeated requests preserve the first time and reason.
2043
+ * @param input - Owner identity and optional explanation, snapshotted before awaiting.
2044
+ */
2045
+ requestCancellation(input: RequestExecutionCancellationInput): Promise<void>;
2046
+ /**
2047
+ * Read replayable cancellation intent independently of controller ownership.
2048
+ * Intent is never cleared merely because a controller delivered a cancel call.
2049
+ * @param executionAttemptId - Attempt whose provider control is being adopted.
2050
+ * @returns First accepted intent, or null when absent (including an unknown attempt).
2051
+ */
2052
+ readCancellation(executionAttemptId: string): Promise<ExecutionAttemptCancellationIntent | null>;
1690
2053
  /**
1691
2054
  * Persist a new execution attempt record.
1692
2055
  *
@@ -1787,10 +2150,10 @@ interface ExecutionAttemptRepository<TOutcome> extends OwnerRequestRecoveryRepos
1787
2150
  /**
1788
2151
  * Take ownership of an unowned or lease-expired provider operation.
1789
2152
  *
1790
- * Succeeds only when the operation is unowned or its lease has expired at
1791
- * `observedAt`. On success the generation increments and a fresh token is
1792
- * issued, which fences every previously issued claim immediately. The
1793
- * obligation and accumulated evidence are preserved.
2153
+ * Succeeds only when the unresolved operation is unowned or its lease has
2154
+ * expired at `observedAt`. On success the generation increments and a fresh
2155
+ * token is issued, which fences every previously issued claim immediately.
2156
+ * The obligation and accumulated evidence are preserved.
1794
2157
  * @param input - Attempt identity, requesting owner, observation time, and lease deadline.
1795
2158
  * @returns The durable claim decision.
1796
2159
  */
@@ -1817,6 +2180,19 @@ interface ExecutionAttemptRepository<TOutcome> extends OwnerRequestRecoveryRepos
1817
2180
  * @returns The durable mutation decision.
1818
2181
  */
1819
2182
  recordProviderOperationUncertainty(input: RecordProviderOperationUncertaintyInput): Promise<ProviderOperationMutationDecision>;
2183
+ /**
2184
+ * Record positive completion evidence of a provider operation.
2185
+ *
2186
+ * The repository validates the current claim before it records the first
2187
+ * immutable evidence. A current claim may persist that evidence before
2188
+ * settlement; it does not discard a pending `terminal-convergence` duty or
2189
+ * create a canonical attempt answer. The operation becomes resolved only
2190
+ * when durable settlement and completion evidence are both present; until
2191
+ * then its claim remains live and it stays eligible for recovery.
2192
+ * @param input - Current provider-operation claim and bounded completion proof.
2193
+ * @returns The durable completion or a fenced/idempotent refusal.
2194
+ */
2195
+ completeProviderOperation(input: CompleteProviderOperationInput): Promise<ProviderOperationCompletionDecision>;
1820
2196
  /**
1821
2197
  * Record the provider allocation reference for a claimed operation.
1822
2198
  *
@@ -1839,10 +2215,14 @@ interface ExecutionAttemptRepository<TOutcome> extends OwnerRequestRecoveryRepos
1839
2215
  /**
1840
2216
  * Record positively proven absence of any allocation for the attempt.
1841
2217
  *
1842
- * The atomic terminal CAS for the pre-allocation case: it stores bounded
1843
- * absence evidence, settles the attempt as `abandoned`, and closes the
1844
- * operation in one transaction. It never produces `terminal-convergence` —
1845
- * that obligation is reserved for a known allocation whose termination was
2218
+ * The atomic positive-proof transition for the pre-allocation case: it stores
2219
+ * bounded absence evidence and completes the operation in one transaction.
2220
+ * It settles an unsettled attempt as `abandoned`, but never replaces an
2221
+ * existing canonical settlement. Its decision distinguishes a newly written
2222
+ * abandonment (`recorded`) from preserving an existing settlement
2223
+ * (`completed`), so an Authority can preserve an outcome waiter that still
2224
+ * needs owner convergence. It never produces `terminal-convergence` — that
2225
+ * obligation is reserved for a known allocation whose termination was
1846
2226
  * already confirmed.
1847
2227
  * @param input - Claim, owning execution, and bounded absence evidence.
1848
2228
  * @returns The durable absence decision.
@@ -1851,9 +2231,9 @@ interface ExecutionAttemptRepository<TOutcome> extends OwnerRequestRecoveryRepos
1851
2231
  /**
1852
2232
  * Close pre-allocation debt on proof that a provisioner incarnation is gone.
1853
2233
  *
1854
- * The atomic terminal CAS for an attempt whose allocation could not have
1855
- * outlived its provisioner. It exists because such an attempt has no other
1856
- * reachable terminal state: its provider need not advertise recovery, so
2234
+ * The atomic positive-proof transition for an attempt whose allocation could
2235
+ * not have outlived its provisioner. It exists because such an attempt has
2236
+ * no other reachable provider conclusion: its provider need not advertise recovery, so
1857
2237
  * there may be nothing to discover, inspect, or terminate, and
1858
2238
  * {@link abandonPendingAttempt} refuses an attempt that already began
1859
2239
  * provisioning.
@@ -1866,9 +2246,11 @@ interface ExecutionAttemptRepository<TOutcome> extends OwnerRequestRecoveryRepos
1866
2246
  * statement about the attempt rather than about the caller's view of it. An
1867
2247
  * expired lease can never satisfy either check.
1868
2248
  *
1869
- * On success it stores the proof's bounded evidence, settles the attempt as
1870
- * `abandoned`, and closes the operation in one transaction. `abandoned` is
1871
- * the honest kind: no allocation was ever recorded for the attempt, so it
2249
+ * On success it stores the proof's bounded evidence and completes the
2250
+ * operation in one transaction. If the attempt is still unsettled it also
2251
+ * settles it as `abandoned`; otherwise it preserves the existing canonical
2252
+ * settlement and returns `completed`, not `recorded`. `abandoned` is the
2253
+ * honest new kind: no allocation was ever recorded for the attempt, so it
1872
2254
  * cannot have suffered an infrastructure failure in the sense
1873
2255
  * {@link recordInfrastructureFailure} defines.
1874
2256
  * @param input - Claim, owning execution, and the provisioner loss proof.
@@ -2052,7 +2434,8 @@ interface ExecutionAttemptRepository<TOutcome> extends OwnerRequestRecoveryRepos
2052
2434
  *
2053
2435
  * Deliberately claim-independent: a worker's canonical answer never depends
2054
2436
  * on who currently owns the attempt's provider operation. A successful
2055
- * commit settles the attempt and closes its operation.
2437
+ * commit settles the attempt but leaves provider responsibilities open until
2438
+ * positive completion evidence is recorded separately.
2056
2439
  *
2057
2440
  * The repository makes the durable decision in exactly this precedence
2058
2441
  * order. An implementation that reorders it is non-conforming, because each
@@ -2079,8 +2462,9 @@ interface ExecutionAttemptRepository<TOutcome> extends OwnerRequestRecoveryRepos
2079
2462
  * {@link RuntimeOutcomeFenceMismatchError} without changing the attempt.
2080
2463
  * Checking this in the same write prevents owner decoding/validation awaits
2081
2464
  * from committing a startup failure against a replacement runtime.
2082
- * 5. `accepted` — the outcome becomes canonical, the attempt settles as
2083
- * `outcome`, and its operation closes.
2465
+ * 5. `accepted` — the outcome becomes canonical and the attempt settles as
2466
+ * `outcome`. Its provider operation remains open until positive completion
2467
+ * evidence is recorded separately.
2084
2468
  *
2085
2469
  * The submission arrives already rendered, as the {@link DurableOutcome} the
2086
2470
  * caller obtained from {@link canonicalizeOutcome}. An implementation
@@ -2123,12 +2507,12 @@ interface ExecutionAttemptRepository<TOutcome> extends OwnerRequestRecoveryRepos
2123
2507
  /**
2124
2508
  * Coherent recovery capability of the execution attempt port.
2125
2509
  *
2126
- * Recovery is one indivisible capability: a repository implements all four
2127
- * operations or none. Partial implementation is a type error because all four
2510
+ * Recovery is one indivisible capability: a repository implements all five
2511
+ * operations or none. Partial implementation is a type error because all five
2128
2512
  * are required members of this interface, exactly as they are on the provider
2129
2513
  * side of the same capability.
2130
2514
  *
2131
- * The four exist together because a recovery pass needs all of them: it reads
2515
+ * The five exist together because a recovery pass needs all of them: it reads
2132
2516
  * a superseded attempt, records what discovery found for it, refines the
2133
2517
  * reference as correlation narrows it, and lists what is still outstanding. A
2134
2518
  * repository that answered three of them would strand the pass at whichever
@@ -2203,6 +2587,20 @@ interface ExecutionAttemptRecoveryOperations {
2203
2587
  * @returns Allocated, non-settled attempts eligible for recovery, oldest first.
2204
2588
  */
2205
2589
  getRecoverableAttempts(executionId: ExecutionOwnerId): Promise<readonly RecoverableAttemptRecord[]>;
2590
+ /**
2591
+ * List open provider operations eligible for takeover, including ones whose
2592
+ * attempts already settled.
2593
+ *
2594
+ * The query excludes only operations with both positive completion evidence
2595
+ * and a settled attempt, plus those held by a lease that has not expired at
2596
+ * the caller-supplied observation time. That filter happens before the
2597
+ * bound, so active leases cannot hide eligible work behind a first page.
2598
+ * Results are oldest first by the joined attempt's `createdAt` instant, ties
2599
+ * broken by `executionAttemptId`.
2600
+ * @param input - Explicit observation time and positive bounded result limit.
2601
+ * @returns Joined open operations eligible for provider takeover, oldest first.
2602
+ */
2603
+ listOpenProviderOperations(input: ListOpenProviderOperationsInput): Promise<readonly OpenProviderOperationRecord[]>;
2206
2604
  }
2207
2605
  //#endregion
2208
- export { RuntimeReadinessDecision as $, MarkRuntimeReadyInput as A, ReadBootstrapStartStateInput as B, ExecutionAttemptRepository as C, replayEnsuredAttempt as Ct, GetInstructionInput as D, ExecutionOwnerId as E, snapshotReadAttemptSettlementInput as Et, PendingAttemptAbandonmentDecision as F, RecordProvisionerIncarnationLostInput as G, RecordAllocationTerminatedInput as H, PreparationReceipt as I, RegisterRuntimeInput as J, RecordProvisioningAbsentInput as K, ProvisionerIncarnationLossDecision as L, OperationCompletionDecision as M, OperationReportDecision as N, HandoffProviderOperationInput as O, OutcomeCodec as P, RuntimeOutcomeFenceMismatchError as Q, ProvisioningAbsenceDecision as R, ExecutionAttemptRecoveryOperations as S, readAttemptSettlementSnapshot as St, ExecutionAttemptStatus as T, snapshotEnsureExecutionAttemptPersistenceInput as Tt, RecordInfrastructureFailureInput as U, RecordAllocationInput as V, RecordProviderOperationUncertaintyInput as W, ReportOperationInput as X, RenewProviderOperationClaimInput as Y, RuntimeOutcomeFence as Z, EXECUTION_ATTEMPT_STATUSES as _, AttemptSettlementSnapshot as _t, AllocationRefEvolutionDecision as a, sameAllocationRef as at, ExecutionAttemptOutcomeDecision as b, EnsureExecutionAttemptPersistenceInput as bt, AttemptExecutionState as c, AttemptReachabilityDecision as ct, BootstrapStartState as d, evaluateOperationCompletion as dt, RuntimeRegistrationDecision as et, CompleteOperationInput as f, evaluatePreparationReport as ft, EXECUTION_ATTEMPT_SETTLEMENT_KINDS as g, AttemptSettlementRead as gt, DurableOutcome as h, evaluateRuntimeRegistration as ht, AllocationRefEvolution as i, durableOutcome as it, OperationAdmissionDecision as j, InfrastructureFailureDecision as k, AttemptOperationStartGate as l, evaluateAttemptReachability as lt, DuplicateExecutionAttemptError as m, evaluateRuntimeReadiness as mt, AdmitOperationInput as n, assertRuntimeOutcomeFence as nt, AllocationTerminationDecision as o, sameDurableOutcome as ot, DiscoveredAllocationDecision as p, evaluateProvisionerIncarnationLoss as pt, RecoverableAttemptRecord as q, AllocationRecordingDecision as r, decodeDurableOutcome as rt, AttemptControlState as s, AttemptReachability as st, ATTEMPT_OPERATION_START_GATES as t, TakeOverProviderOperationInput as tt, BeginProvisioningInput as u, evaluateOperationAdmission as ut, ExecutionAttemptCreate as v, EnsureExecutionAttemptDecision as vt, ExecutionAttemptSettlementKind as w, snapshotEnsureExecutionAttemptInput as wt, ExecutionAttemptRecord as x, ReadAttemptSettlementInput as xt, ExecutionAttemptOutcomeCommit as y, EnsureExecutionAttemptInput as yt, ProvisioningClaimDecision as z };
2606
+ export { decodeDurableOutcome as $, MarkRuntimeReadyInput as A, RecordProviderOperationUncertaintyInput as At, RecordAllocationTerminatedInput as B, readAttemptSettlementSnapshot as Bt, ExecutionAttemptRecoveryOperations as C, ProviderOperationLeasePolicy as Ct, ExecutionOwnerId as D, ProviderOperationOwnershipRecord as Dt, ExecutionAttemptStatus as E, ProviderOperationObligation as Et, PendingAttemptAbandonmentDecision as F, AttemptSettlementSnapshot as Ft, RegisterRuntimeInput as G, RecordProvisionerIncarnationLostInput as H, snapshotEnsureExecutionAttemptInput as Ht, PreparationReceipt as I, EnsureExecutionAttemptDecision as It, RuntimeOutcomeFence as J, ReportOperationInput as K, ProvisioningClaimDecision as L, EnsureExecutionAttemptInput as Lt, OperationCompletionDecision as M, TakeOverProviderOperationInput as Mt, OperationReportDecision as N, isProviderOperationResolved as Nt, GetInstructionInput as O, ProvisionerIncarnationLossDecision as Ot, OutcomeCodec as P, AttemptSettlementRead as Pt, assertRuntimeOutcomeFence as Q, ReadBootstrapStartStateInput as R, EnsureExecutionAttemptPersistenceInput as Rt, ExecutionAttemptRecord as S, ProviderOperationCompletionDecision as St, ExecutionAttemptSettlementKind as T, ProviderOperationMutationDecision as Tt, RecordProvisioningAbsentInput as U, snapshotEnsureExecutionAttemptPersistenceInput as Ut, RecordInfrastructureFailureInput as V, replayEnsuredAttempt as Vt, RecoverableAttemptRecord as W, snapshotReadAttemptSettlementInput as Wt, RuntimeReadinessDecision as X, RuntimeOutcomeFenceMismatchError as Y, RuntimeRegistrationDecision as Z, EXECUTION_ATTEMPT_STATUSES as _, OpenProviderOperationRecord as _t, AllocationRefEvolutionDecision as a, evaluateAttemptReachability as at, ExecutionAttemptOutcomeCommit as b, ProviderOperationClaim as bt, AttemptExecutionState as c, evaluatePreparationReport as ct, BootstrapStartState as d, evaluateRuntimeRegistration as dt, durableOutcome as et, CompleteOperationInput as f, CompleteProviderOperationInput as ft, EXECUTION_ATTEMPT_SETTLEMENT_KINDS as g, ListOpenProviderOperationsInput as gt, DurableOutcome as h, InitialProviderOperationClaimContextSource as ht, AllocationRefEvolution as i, AttemptReachabilityDecision as it, OperationAdmissionDecision as j, RenewProviderOperationClaimInput as jt, InfrastructureFailureDecision as k, ProvisioningAbsenceDecision as kt, AttemptOperationStartGate as l, evaluateProvisionerIncarnationLoss as lt, DuplicateExecutionAttemptError as m, InitialProviderOperationClaimContext as mt, AdmitOperationInput as n, sameDurableOutcome as nt, AllocationTerminationDecision as o, evaluateOperationAdmission as ot, DiscoveredAllocationDecision as p, HandoffProviderOperationInput as pt, RequestExecutionCancellationInput as q, AllocationRecordingDecision as r, AttemptReachability as rt, AttemptControlState as s, evaluateOperationCompletion as st, ATTEMPT_OPERATION_START_GATES as t, sameAllocationRef as tt, BeginProvisioningInput as u, evaluateRuntimeReadiness as ut, ExecutionAttemptCancellationIntent as v, PROVIDER_OPERATION_OBLIGATIONS as vt, ExecutionAttemptRepository as w, ProviderOperationLeaseRenewal as wt, ExecutionAttemptOutcomeDecision as x, ProviderOperationClaimDecision as xt, ExecutionAttemptCreate as y, ProcessBoundProvisionerLossProof as yt, RecordAllocationInput as z, ReadAttemptSettlementInput as zt };