@makaio/framework 1.0.0-dev-1784806252593 → 1.0.0-dev-1785344643235

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 (470) hide show
  1. package/dist/.makaio-build.json +3 -2
  2. package/dist/{account-identity-CP4DC0DL.mjs → account-identity-DFx8pwKL.mjs} +1 -1
  3. package/dist/{adapter-CYobxqN_.mjs → adapter-D5c5LrPN.mjs} +1 -1
  4. package/dist/adapters/claude/index.d.mts +204 -27
  5. package/dist/adapters/claude/index.mjs +3 -3
  6. package/dist/adapters/config/index.d.mts +2 -2
  7. package/dist/adapters/config/index.mjs +1 -1
  8. package/dist/adapters/index.d.mts +49 -4
  9. package/dist/adapters/index.mjs +3 -3
  10. package/dist/adapters/node.d.mts +1 -1
  11. package/dist/adapters/node.mjs +1 -1
  12. package/dist/{artifact-DCkizHkS.mjs → artifact-DGiXqb11.mjs} +1 -1
  13. package/dist/attempt-record-codec-CqO1_XnE.mjs +1 -0
  14. package/dist/{auth-C3NOWqTU.mjs → auth-DGEdiHF6.mjs} +1 -1
  15. package/dist/authority-state-bootstrap-GPL_tqaT.mjs +1 -0
  16. package/dist/bus/index.mjs +1 -1
  17. package/dist/{canonical-model-EMRYCVjX.mjs → canonical-model-BAytQ4NV.mjs} +1 -1
  18. package/dist/capabilities-BQEp34ir.mjs +1 -0
  19. package/dist/{client-OYk0Ttck.mjs → client-DbS847wW.mjs} +1 -1
  20. package/dist/clients/index.d.mts +10 -8
  21. package/dist/clients/index.mjs +1 -1
  22. package/dist/clients/managed-install.d.mts +1 -1
  23. package/dist/clients/managed-install.mjs +1 -1
  24. package/dist/{compression-CZ_6fYq8.mjs → compression-74fFeBha.mjs} +1 -1
  25. package/dist/{config-namespace-DTA6EQL8.mjs → config-namespace-TVX-hG4I.mjs} +1 -1
  26. package/dist/{context-resolution-B5IH2Z9v.d.mts → context-resolution-BQBk4Ish.d.mts} +8 -6
  27. package/dist/contracts/adapter/index.d.mts +2 -2
  28. package/dist/contracts/adapter/index.mjs +1 -1
  29. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  30. package/dist/contracts/artifact/index.d.mts +2 -2
  31. package/dist/contracts/artifact/index.mjs +1 -1
  32. package/dist/contracts/auth/index.d.mts +2 -2
  33. package/dist/contracts/auth/index.mjs +1 -1
  34. package/dist/contracts/canonical-model/index.d.mts +1 -1
  35. package/dist/contracts/canonical-model/index.mjs +1 -1
  36. package/dist/contracts/capabilities/index.d.mts +2 -0
  37. package/dist/contracts/capabilities/index.mjs +1 -0
  38. package/dist/contracts/client/index.d.mts +2 -2
  39. package/dist/contracts/client/index.mjs +1 -1
  40. package/dist/contracts/common/index.d.mts +1 -1
  41. package/dist/contracts/config/index.d.mts +24 -2
  42. package/dist/contracts/config/index.mjs +1 -1
  43. package/dist/contracts/extension/index.d.mts +4 -4
  44. package/dist/contracts/extension/index.mjs +1 -1
  45. package/dist/contracts/facet/index.d.mts +1 -1
  46. package/dist/contracts/facet/index.mjs +1 -1
  47. package/dist/contracts/harness/index.d.mts +1 -1
  48. package/dist/contracts/harness/index.mjs +1 -1
  49. package/dist/contracts/host/index.d.mts +1 -1
  50. package/dist/contracts/host/index.mjs +1 -1
  51. package/dist/contracts/index.d.mts +1678 -9427
  52. package/dist/contracts/index.mjs +1 -1
  53. package/dist/contracts/materialization/index.d.mts +3 -3
  54. package/dist/contracts/materialization/index.mjs +1 -1
  55. package/dist/contracts/model-registry/index.d.mts +1 -1
  56. package/dist/contracts/model-registry/index.mjs +1 -1
  57. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  58. package/dist/contracts/native-session-supervisor/index.mjs +1 -1
  59. package/dist/contracts/platform/index.d.mts +1 -1
  60. package/dist/contracts/platform/index.mjs +1 -1
  61. package/dist/contracts/provider/index.d.mts +2 -2
  62. package/dist/contracts/provider/index.mjs +1 -1
  63. package/dist/contracts/session/index.d.mts +2 -2
  64. package/dist/contracts/session/index.mjs +1 -1
  65. package/dist/contracts/shared/index.d.mts +2 -2
  66. package/dist/contracts/shared/index.mjs +1 -1
  67. package/dist/contracts/skill/index.d.mts +1 -1
  68. package/dist/contracts/skill/index.mjs +1 -1
  69. package/dist/contracts/telemetry/index.d.mts +1 -1
  70. package/dist/contracts/telemetry/index.mjs +1 -1
  71. package/dist/contracts/timeout/index.d.mts +1 -1
  72. package/dist/contracts/timeout/index.mjs +1 -1
  73. package/dist/contracts/toast/index.mjs +1 -1
  74. package/dist/contracts/variant/index.d.mts +1 -1
  75. package/dist/contracts/variant/index.mjs +1 -1
  76. package/dist/contracts/worker-node/index.d.mts +2 -0
  77. package/dist/contracts/worker-node/index.mjs +1 -0
  78. package/dist/contracts/workflow/index.d.mts +3 -3
  79. package/dist/contracts/workflow/index.mjs +1 -1
  80. package/dist/{definition-K3m51lgO.mjs → definition-CJfiv8xm.mjs} +1 -1
  81. package/dist/{detached-extension-handle-BsywhHfk.mjs → detached-extension-handle-Ddfquy5_.mjs} +1 -1
  82. package/dist/drizzle/0030_remote-worker-execution.sql +6 -0
  83. package/dist/drizzle/meta/_journal.json +7 -0
  84. package/dist/execution-attempt-repository-DWXKY41_.d.mts +1056 -0
  85. package/dist/execution-target-Cf645pDj.mjs +1 -0
  86. package/dist/{extension-Cgg45Xk1.mjs → extension-DCA4pYrY.mjs} +1 -1
  87. package/dist/extension-hjOPs10e.mjs +1 -0
  88. package/dist/{filesystem-service-Cupz_Z7S.mjs → filesystem-service-DlP2HfDg.mjs} +1 -1
  89. package/dist/framework-packages-C3RWfJDk.mjs +1 -0
  90. package/dist/git/index.mjs +1 -1
  91. package/dist/{globby-DWp7V-P2.mjs → globby-1yCVCk8s.mjs} +1 -1
  92. package/dist/{handlers-cMBmexF4.mjs → handlers-CfnLyLfE.mjs} +1 -1
  93. package/dist/{harness-DflvHAGV.mjs → harness-DpwsFsE7.mjs} +1 -1
  94. package/dist/{index-BhXCCgJV2.d.mts → index-4fE_hUP02.d.mts} +1 -1
  95. package/dist/{index-DeoKITib.d.mts → index-8gKx-OVP.d.mts} +85 -79
  96. package/dist/index-B0Kf_OWi.d.mts +267 -0
  97. package/dist/{index-DRiTICBU.d.mts → index-BAXkicoQ.d.mts} +1 -1
  98. package/dist/{index-D9Tk7hyM.d.mts → index-BC79QrGC.d.mts} +29 -29
  99. package/dist/{index-y5-qCuUL.d.mts → index-BQLUVXIB.d.mts} +1023 -887
  100. package/dist/{index-BF-ZfYo4.d.mts → index-BXD3kEs_.d.mts} +28 -10
  101. package/dist/{index-CYfiCzb-.d.mts → index-CL-0NeQW.d.mts} +8 -5
  102. package/dist/{index-Cw7_69gV.d.mts → index-CRvpVIqA.d.mts} +1 -1
  103. package/dist/{index-BXgsQUhf.d.mts → index-CVaRZoiu.d.mts} +8 -8
  104. package/dist/{index-DaMfTvfz.d.mts → index-DA9g2A5P.d.mts} +1 -1
  105. package/dist/{index-DSyyWwR2.d.mts → index-DJAmSnuh.d.mts} +24 -24
  106. package/dist/{index-pjATMrvJ.d.mts → index-DkiTJM5p.d.mts} +693 -31
  107. package/dist/{index-jbgHR5J2.d.mts → index-GHASUiem.d.mts} +1 -1
  108. package/dist/{index-D73PTKXG2.d.mts → index-I5YG-qrb2.d.mts} +6 -6
  109. package/dist/{index-g36yJDge.d.mts → index-SsBHjUqA.d.mts} +198 -159
  110. package/dist/index-XZyMxxnU.d.mts +1602 -0
  111. package/dist/{index-z9bcglqL.d.mts → index-brqfk9JQ.d.mts} +4 -4
  112. package/dist/{index-Dfl1vniO.d.mts → index-q0Tiqems.d.mts} +101 -101
  113. package/dist/index-w_FmghjT.d.mts +7295 -0
  114. package/dist/kernel/cli/index.d.mts +2 -2
  115. package/dist/kernel/cli/index.mjs +1 -1
  116. package/dist/kernel/cli/register.d.mts +1 -1
  117. package/dist/kernel/cli/register.mjs +1 -1
  118. package/dist/kernel/cli/schemas.mjs +1 -1
  119. package/dist/kernel/extension/index.d.mts +1 -1
  120. package/dist/kernel/extension/index.mjs +1 -1
  121. package/dist/kernel/index.d.mts +14 -8
  122. package/dist/kernel/index.mjs +1 -1
  123. package/dist/kernel/namespace/index.d.mts +1 -1
  124. package/dist/kernel/namespace/index.mjs +1 -1
  125. package/dist/kernel/observability/index.d.mts +1 -1
  126. package/dist/kernel/observability/index.mjs +1 -1
  127. package/dist/kernel/providers/index.d.mts +1 -1
  128. package/dist/kernel/providers/index.mjs +1 -1
  129. package/dist/kernel/window/index.d.mts +1 -1
  130. package/dist/kernel/window/index.mjs +1 -1
  131. package/dist/{lib-BeMM738r.mjs → lib-C7-s68uf.mjs} +1 -1
  132. package/dist/{lib-B7TpTzkG.mjs → lib-DErgth_E.mjs} +2 -2
  133. package/dist/{load-extensions-BLdG90Zi.d.mts → load-extensions-BxsDB87B.d.mts} +1 -1
  134. package/dist/{load-extensions-CUmFCcYi.mjs → load-extensions-D0DfjYLC.mjs} +1 -1
  135. package/dist/{materialization-s8eR1eQ4.mjs → materialization-Jd198K3y.mjs} +1 -1
  136. package/dist/mcp-http-server/index.d.mts +305 -79
  137. package/dist/mcp-http-server/index.mjs +4 -4
  138. package/dist/model-BGgVmRnN.mjs +1 -0
  139. package/dist/modes-BheyN7SS.mjs +1 -0
  140. package/dist/{namespace-DwQtzlY-.mjs → namespace-BqxtpNAn.mjs} +1 -1
  141. package/dist/{namespace-BHliaabz.d.mts → namespace-DBm9K23m.d.mts} +6 -6
  142. package/dist/{namespace-Db_PFX3v.d.mts → namespace-DI4Yx_xu.d.mts} +9 -9
  143. package/dist/namespace-DJfUADSV.mjs +1 -0
  144. package/dist/{namespace-DRHnU5Yi2.d.mts → namespace-DPgxPa8m2.d.mts} +7 -7
  145. package/dist/{namespace-Bd49QmzS.d.mts → namespace-DWCEo-9M.d.mts} +0 -60
  146. package/dist/{namespace-Dvo_7BQw.d.mts → namespace-Dkod-w11.d.mts} +2 -2
  147. package/dist/{namespace-BeV7LST-.d.mts → namespace-YytVKIgI.d.mts} +2 -2
  148. package/dist/{namespace-8-GrdcbF.d.mts → namespace-jPUGV-b2.d.mts} +42 -42
  149. package/dist/{native-session-supervisor-Bgz-Q1WH.mjs → native-session-supervisor-DRx0MX-d.mjs} +1 -1
  150. package/dist/node/bus-server/index.d.mts +1 -1
  151. package/dist/node/bus-server/index.mjs +1 -1
  152. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  153. package/dist/node/bus-server/server-lifecycle.mjs +1 -1
  154. package/dist/node/transports/index.d.mts +81 -9
  155. package/dist/node/transports/index.mjs +2 -2
  156. package/dist/{orchestrator-shared-CY7Tu7kZ.mjs → orchestrator-shared-BxmHCPvx.mjs} +1 -1
  157. package/dist/package-CNUPPcU1.mjs +7 -0
  158. package/dist/package-DWMxGfzK.d.mts +827 -0
  159. package/dist/{package-DKnzOvoR.mjs → package-Dft_RItb.mjs} +1 -1
  160. package/dist/package.json +1 -1
  161. package/dist/{packages-zDnokBpl.mjs → packages-DtEEP0Vt.mjs} +1 -1
  162. package/dist/{profile-BRi6K6am.mjs → profile-BTAI31Nt.mjs} +1 -1
  163. package/dist/{provider-context-DOsjOjiR.mjs → provider-context-Dq53Cgzz.mjs} +1 -1
  164. package/dist/{provider-context-BYkMl--1.mjs → provider-context-PZIQWcqQ.mjs} +1 -1
  165. package/dist/provider-operation-Cxoe2SUr.d.mts +207 -0
  166. package/dist/providers/index.mjs +1 -1
  167. package/dist/{registry-Dw6l7k3e.mjs → registry-wfF2uTty.mjs} +29 -29
  168. package/dist/{resolved-O2XXjTeu.mjs → resolved-DZgqql2Z.mjs} +1 -1
  169. package/dist/rules/index.d.mts +1 -1
  170. package/dist/rules/index.mjs +1 -1
  171. package/dist/rules/schemas.d.mts +1 -1
  172. package/dist/runtime-bun/index.mjs +1 -1
  173. package/dist/runtime-node/extension-discovery.d.mts +1 -1
  174. package/dist/runtime-node/extension-validation.d.mts +1 -1
  175. package/dist/runtime-node/extension-validation.mjs +1 -1
  176. package/dist/runtime-node/index.d.mts +4 -4
  177. package/dist/runtime-node/index.mjs +24 -24
  178. package/dist/runtime-node/makaio-config.d.mts +1 -1
  179. package/dist/runtime-node/makaio-config.mjs +1 -1
  180. package/dist/runtime-node/static/model-registry.yaml +348 -0
  181. package/dist/runtime-node/workflow-worker/index.d.mts +2 -2
  182. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  183. package/dist/runtime-node/workflow-worker/worker-entry.d.mts +7 -4
  184. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  185. package/dist/{schema-CfMsufSb.d.mts → schema-Bwr_NrOS.d.mts} +2 -2
  186. package/dist/{schema-BI0aCHvV.mjs → schema-Dd-e89MO.mjs} +1 -1
  187. package/dist/{schemas-B5tMYfhC.d.mts → schemas-C4yUXs4G.d.mts} +4 -4
  188. package/dist/schemas-CRB2O5zo.mjs +1 -0
  189. package/dist/{schemas-Dgj3WaOI.mjs → schemas-Cm09dXL4.mjs} +1 -1
  190. package/dist/{schemas-BJ8VMXhO.mjs → schemas-DaHQzpgm.mjs} +1 -1
  191. package/dist/{schemas-SsGbBOZ-.d.mts → schemas-DuIlOWR3.d.mts} +2 -2
  192. package/dist/{schemas-1ahuxM83.d.mts → schemas-ENwK6jmV.d.mts} +3 -3
  193. package/dist/{schemas-ChF2z4RB.d.mts → schemas-N6x2z7Lf.d.mts} +0 -45
  194. package/dist/schemas-tDf_WiC8.mjs +1 -0
  195. package/dist/selection-BNwTKEVT.mjs +1 -0
  196. package/dist/service-base/index.d.mts +47 -2
  197. package/dist/service-base/index.mjs +1 -1
  198. package/dist/services/adapter-runtime/index.d.mts +3 -3
  199. package/dist/services/adapter-runtime/index.mjs +1 -1
  200. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  201. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  202. package/dist/services/adapter-subsystem/index.d.mts +3 -3
  203. package/dist/services/adapter-subsystem/index.mjs +1 -1
  204. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  205. package/dist/services/adapter-subsystem/namespace.mjs +1 -1
  206. package/dist/services/agent-runtime/index.d.mts +2 -2
  207. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  208. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  209. package/dist/services/capability/index.d.mts +1 -1
  210. package/dist/services/capability/index.mjs +1 -1
  211. package/dist/services/codebase/index.d.mts +2 -2
  212. package/dist/services/codebase/namespace.d.mts +1 -1
  213. package/dist/services/codebase/schemas.d.mts +1 -1
  214. package/dist/services/compression/index.d.mts +2 -2
  215. package/dist/services/compression/namespace.d.mts +1 -1
  216. package/dist/services/compression/schemas.d.mts +1 -1
  217. package/dist/services/context-rules/index.d.mts +1 -1
  218. package/dist/services/context-rules/index.mjs +1 -1
  219. package/dist/services/execution-target/index.d.mts +4 -4
  220. package/dist/services/execution-target/index.mjs +1 -1
  221. package/dist/services/execution-target/namespace.d.mts +1 -1
  222. package/dist/services/execution-target/namespace.mjs +1 -1
  223. package/dist/services/execution-target/schemas.d.mts +1 -1
  224. package/dist/services/execution-target/schemas.mjs +1 -1
  225. package/dist/services/filesystem/index.d.mts +1 -1
  226. package/dist/services/filesystem/index.mjs +1 -1
  227. package/dist/services/git/namespace.d.mts +2 -2
  228. package/dist/services/git/namespace.mjs +1 -1
  229. package/dist/services/git/schemas.d.mts +1 -1
  230. package/dist/services/git/schemas.mjs +1 -1
  231. package/dist/services/harness/index.mjs +1 -1
  232. package/dist/services/index.d.mts +76 -361
  233. package/dist/services/index.mjs +1 -1
  234. package/dist/services/log-import/browser.d.mts +2 -2
  235. package/dist/services/log-import/index.d.mts +2 -2
  236. package/dist/services/log-import/log-import.d.mts +1 -1
  237. package/dist/services/log-import/log-import.mjs +1 -1
  238. package/dist/services/log-import/namespace.d.mts +2 -2
  239. package/dist/services/log-import/namespace.mjs +1 -1
  240. package/dist/services/log-import/schemas.d.mts +1 -1
  241. package/dist/services/log-import/schemas.mjs +1 -1
  242. package/dist/services/materialization/index.d.mts +1 -1
  243. package/dist/services/materialization/index.mjs +1 -1
  244. package/dist/services/model-registry/index.d.mts +1 -1
  245. package/dist/services/model-registry/index.mjs +1 -1
  246. package/dist/services/preferences/index.d.mts +2 -2
  247. package/dist/services/preferences/schemas.d.mts +1 -1
  248. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  249. package/dist/services/provider-context/index.d.mts +1 -1
  250. package/dist/services/provider-context/index.mjs +1 -1
  251. package/dist/services/provider-runtime/index.mjs +1 -1
  252. package/dist/services/session/handlers/index.d.mts +1 -1
  253. package/dist/services/session/handlers/index.mjs +1 -1
  254. package/dist/services/session/index.d.mts +9 -9
  255. package/dist/services/session/index.mjs +1 -1
  256. package/dist/services/session/messages/namespace.d.mts +1 -1
  257. package/dist/services/session/messages/namespace.mjs +1 -1
  258. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  259. package/dist/services/session/orchestrator-testing/index.mjs +1 -1
  260. package/dist/services/session/session-events/namespace.d.mts +1 -1
  261. package/dist/services/session/session-events/namespace.mjs +1 -1
  262. package/dist/services/session/storage/namespace.d.mts +1 -1
  263. package/dist/services/session/storage/schema.d.mts +1 -1
  264. package/dist/services/session/testing/index.mjs +1 -1
  265. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  266. package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
  267. package/dist/services/session/turns/namespace.d.mts +1 -1
  268. package/dist/services/session/turns/namespace.mjs +1 -1
  269. package/dist/services/session-editor/index.d.mts +1 -1
  270. package/dist/services/session-editor/index.mjs +1 -1
  271. package/dist/services/settings/index.d.mts +3 -3
  272. package/dist/services/settings/index.mjs +1 -1
  273. package/dist/services/settings/namespace.mjs +1 -1
  274. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  275. package/dist/services/settings/storage/clients-namespace.mjs +1 -1
  276. package/dist/services/settings/storage/index.d.mts +3 -3
  277. package/dist/services/settings/storage/index.mjs +1 -1
  278. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  279. package/dist/services/settings/storage/providers-namespace.mjs +1 -1
  280. package/dist/services/subagent/index.d.mts +1 -1
  281. package/dist/services/subagent/index.mjs +1 -1
  282. package/dist/services/subagent-template/index.d.mts +2 -2
  283. package/dist/services/subagent-template/namespace.d.mts +1 -1
  284. package/dist/services/subagent-template/schemas.d.mts +1 -1
  285. package/dist/services/tool-approval/index.d.mts +1 -1
  286. package/dist/services/tool-approval/index.mjs +1 -1
  287. package/dist/services/tools/index.d.mts +1 -1
  288. package/dist/services/tools/index.mjs +1 -1
  289. package/dist/services/tray-menu/index.d.mts +3 -3
  290. package/dist/services/tray-menu/index.mjs +1 -1
  291. package/dist/services/tray-menu/namespace.d.mts +1 -1
  292. package/dist/services/tray-menu/schemas.d.mts +1 -1
  293. package/dist/services/turn/index.d.mts +1 -1
  294. package/dist/services/turn/namespace.d.mts +1 -1
  295. package/dist/services/workflow-transitions/index.d.mts +2 -0
  296. package/dist/services/workflow-transitions/index.mjs +1 -0
  297. package/dist/{session-Carng3Yk.mjs → session-BOGCd18q.mjs} +1 -1
  298. package/dist/{session-idI1jk5X.mjs → session-BTFiDoGz.mjs} +1 -1
  299. package/dist/{shared-RP_KARKF.mjs → shared-BQ0CHIVy.mjs} +1 -1
  300. package/dist/{skill-CpNjWFuE.mjs → skill-BR6rkfLe.mjs} +1 -1
  301. package/dist/{src-XihJcAQS.mjs → src-DD0v-nIj.mjs} +1 -1
  302. package/dist/storage/drizzle/client.d.mts +1 -1
  303. package/dist/storage/drizzle/client.mjs +1 -1
  304. package/dist/storage/drizzle/index.d.mts +50 -2
  305. package/dist/storage/drizzle/index.mjs +1 -1
  306. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  307. package/dist/storage/handlers/drizzle/index.mjs +1 -1
  308. package/dist/storage/handlers/index.d.mts +1 -1
  309. package/dist/storage/handlers/index.mjs +1 -1
  310. package/dist/testing/drizzle-harness.d.mts +44 -3
  311. package/dist/testing/drizzle-harness.mjs +1 -1
  312. package/dist/{tool-approval-service-fIZ9x0kL.mjs → tool-approval-service-kBA0fRzm.mjs} +1 -1
  313. package/dist/tools-PdG9fO1M.mjs +1 -0
  314. package/dist/{transition-BuUKc2J1.d.mts → transition-DuVzKt8-.d.mts} +3 -42
  315. package/dist/{types-LspCUW09.d.mts → types-B1MNcwgH.d.mts} +1 -1
  316. package/dist/{types-D2KG8ewJ.d.mts → types-BqVAOzJP.d.mts} +35 -35
  317. package/dist/{types-DBb5jY4Z.d.mts → types-CJ_QZ1yW.d.mts} +47 -3
  318. package/dist/ui-kernel/index.d.mts +1 -1
  319. package/dist/ui-kernel/index.mjs +1 -1
  320. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  321. package/dist/utils/index.d.mts +18 -4
  322. package/dist/utils/index.mjs +1 -1
  323. package/dist/{version-BbWrAPld.mjs → version-CoCeMxDT.mjs} +1 -1
  324. package/dist/{view-builder-BktOepKR.d.mts → view-builder-CvoSL2oL.d.mts} +5 -4
  325. package/dist/visibility-qhGWmpSJ.mjs +1 -0
  326. package/dist/worker-node-Bl9_vqYi.mjs +1 -0
  327. package/dist/worker-node-DZTuT1DS.mjs +1 -0
  328. package/dist/workflow-BfDbgtIQ.mjs +1 -0
  329. package/dist/workflow-engine/execution-attempt-repository.d.mts +2 -0
  330. package/dist/workflow-engine/execution-attempt-repository.mjs +1 -0
  331. package/dist/workflow-engine/index.d.mts +635 -701
  332. package/dist/workflow-engine/index.mjs +1 -1
  333. package/dist/workflow-engine/package.d.mts +1 -1
  334. package/dist/workflow-engine/package.mjs +1 -1
  335. package/dist/workflow-engine/provider-operation.d.mts +2 -0
  336. package/dist/workflow-engine/provider-operation.mjs +1 -0
  337. package/dist/workflow-engine/testing/index.d.mts +146 -0
  338. package/dist/workflow-engine/testing/index.mjs +1 -0
  339. package/dist/workflow-engine/testing/sqlite.d.mts +22 -0
  340. package/dist/workflow-engine/testing/sqlite.mjs +130 -0
  341. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  342. package/dist/workflow-transitions-DSc45ixc.mjs +1 -0
  343. package/dist/workflow-worker-BN9XPxQO.mjs +1 -0
  344. package/package.json +20 -3
  345. package/dist/authority-state-bootstrap-C_-F_dtq.mjs +0 -1
  346. package/dist/execution-target-CsZXIvli.mjs +0 -1
  347. package/dist/extension-CjTu6mzW.mjs +0 -1
  348. package/dist/model-uE5IyUFJ.mjs +0 -1
  349. package/dist/namespace-C05pkLbN.mjs +0 -1
  350. package/dist/package-BSG1681x.d.mts +0 -427
  351. package/dist/package-DW1Upu8E.mjs +0 -7
  352. package/dist/schemas-BRxU_oqL.mjs +0 -1
  353. package/dist/schemas-C-J4W1ID.mjs +0 -1
  354. package/dist/selection-YRuVSdck.mjs +0 -1
  355. package/dist/tools-Cs2DwjCC.mjs +0 -1
  356. package/dist/visibility-Cb62p9bv.mjs +0 -1
  357. package/dist/workflow-BX-FxDb0.mjs +0 -1
  358. package/dist/workflow-worker-DR9qYOFc.mjs +0 -1
  359. /package/dist/{adapter-auth-runtime-DFBLXD5K.mjs → adapter-auth-runtime-DO-FVTXg.mjs} +0 -0
  360. /package/dist/{adapter-binding-Dfk_g-lP.d.mts → adapter-binding-DQchUtrK.d.mts} +0 -0
  361. /package/dist/{ajv-C8r45sFs.mjs → ajv-DD3SIL2i.mjs} +0 -0
  362. /package/dist/{attach-error-DCnzW-Yz.mjs → attach-error-C3tngg6J.mjs} +0 -0
  363. /package/dist/{await-trigger-UceeyCyi.mjs → await-trigger-I3lrepb8.mjs} +0 -0
  364. /package/dist/{base-orchestrator-5yH3l39s.d.mts → base-orchestrator-BilsQNW1.d.mts} +0 -0
  365. /package/dist/{capability-service-BzKBK0n2.mjs → capability-service-BqiLlRGA.mjs} +0 -0
  366. /package/dist/{client-DYEHDiJN.d.mts → client-B--e2qcU.d.mts} +0 -0
  367. /package/dist/{client-binary-version-verifier-C12PvQmz.d.mts → client-binary-version-verifier-CgjM_vGF.d.mts} +0 -0
  368. /package/dist/{client-binary-version-verifier-Dv7TGFxh.mjs → client-binary-version-verifier-taewmKTY.mjs} +0 -0
  369. /package/dist/{clients-namespace-DcFmhtLv.d.mts → clients-namespace-DfxjG2ZP.d.mts} +0 -0
  370. /package/dist/{config-namespace-DmP7NVju.d.mts → config-namespace-BCqvufbD.d.mts} +0 -0
  371. /package/dist/{create-static-mount-BLbqGmva.mjs → create-static-mount-bbQhTt6W.mjs} +0 -0
  372. /package/dist/{cross-spawn-BXxQUsPS.mjs → cross-spawn-B57KZuns.mjs} +0 -0
  373. /package/dist/{cursor-storage-DCj4uUxr.mjs → cursor-storage-DIFK_9hg.mjs} +0 -0
  374. /package/dist/{definition-BEvV7tbD.d.mts → definition-gnKgXU91.d.mts} +0 -0
  375. /package/dist/{definitions-C1pgx0Nq.mjs → definitions-xrrY0wgz.mjs} +0 -0
  376. /package/dist/{descriptor-to-package-VfB8lK5w.mjs → descriptor-to-package-DvF08krT.mjs} +0 -0
  377. /package/dist/{drizzle-oCH9H53q.mjs → drizzle-z_0SiGY8.mjs} +0 -0
  378. /package/dist/{esm-ClQELElL.mjs → esm-CltRnX8_.mjs} +0 -0
  379. /package/dist/{event-BOLVCfhH.mjs → event-CmVjR6Ib.mjs} +0 -0
  380. /package/dist/{extension-discovery-B6p3iZaV.d.mts → extension-discovery-CQRdbVQ6.d.mts} +0 -0
  381. /package/dist/{extension-namespace-vrh4ERXR.mjs → extension-namespace-Yu41YepM.mjs} +0 -0
  382. /package/dist/{facet-DqPBpqkl.mjs → facet-BCI00njh.mjs} +0 -0
  383. /package/dist/{filesystem-service-CGdboor3.d.mts → filesystem-service-CQ9yVkSz.d.mts} +0 -0
  384. /package/dist/{handler-GGOD_ofd.mjs → handler-Cbv9FqDO.mjs} +0 -0
  385. /package/dist/{hook-responses-Dg8wDvRo.d.mts → hook-responses-Dh1PWXqJ.d.mts} +0 -0
  386. /package/dist/{host-BfgdjlII.mjs → host-Caq6ZfSJ.mjs} +0 -0
  387. /package/dist/{identity-BmEHHoBw.mjs → identity-D6guMtmi.mjs} +0 -0
  388. /package/dist/{index-DEchpaya.d.mts → index-BIdsFcQs2.d.mts} +0 -0
  389. /package/dist/{index-DquI_1X5.d.mts → index-BVRQEpAg.d.mts} +0 -0
  390. /package/dist/{index-Brdc35b-.d.mts → index-BaZeoZoS.d.mts} +0 -0
  391. /package/dist/{index-CzKLLQLw.d.mts → index-BskPjMet.d.mts} +0 -0
  392. /package/dist/{index-BSmwpgkR.d.mts → index-ByKi34v5.d.mts} +0 -0
  393. /package/dist/{index-oYGf2zIe.d.mts → index-CGZQVTid.d.mts} +0 -0
  394. /package/dist/{index-Chy9aknK.d.mts → index-CMJZ2Z8m.d.mts} +0 -0
  395. /package/dist/{index-4NQLoI7R.d.mts → index-CUvNKYkV.d.mts} +0 -0
  396. /package/dist/{index-Bd1GC1kU2.d.mts → index-CjdRdsd0.d.mts} +0 -0
  397. /package/dist/{index-BHQXXd-O.d.mts → index-CnMu8BQl.d.mts} +0 -0
  398. /package/dist/{index-DYUxNOIX.d.mts → index-Cv-o5Krs.d.mts} +0 -0
  399. /package/dist/{index-DC0yVsYL.d.mts → index-DN4NOCqN2.d.mts} +0 -0
  400. /package/dist/{index-CcsJnJOD.d.mts → index-DR40QWlw.d.mts} +0 -0
  401. /package/dist/{index-BG9-vQHD.d.mts → index-DZunhZec.d.mts} +0 -0
  402. /package/dist/{index-BsBvs0aK.d.mts → index-DjgLchuQ.d.mts} +0 -0
  403. /package/dist/{index-pgYFJ5h6.d.mts → index-Dm1nUxCF.d.mts} +0 -0
  404. /package/dist/{index-C96LlS5m.d.mts → index-Ds5_rDEJ.d.mts} +0 -0
  405. /package/dist/{index-B6SBIKyk.d.mts → index-HsTxm-R3.d.mts} +0 -0
  406. /package/dist/{index-GYZs75UP.d.mts → index-dtsLKOID.d.mts} +0 -0
  407. /package/dist/{index-8fJ6dkzR.d.mts → index-gUhidukN.d.mts} +0 -0
  408. /package/dist/{index-BgpYhR2z.d.mts → index-jTaAHsul.d.mts} +0 -0
  409. /package/dist/{index-Ci3_i-WC2.d.mts → index-sS6KUlrx.d.mts} +0 -0
  410. /package/dist/{index-CFeY8lfU.d.mts → index-vA--0lOM.d.mts} +0 -0
  411. /package/dist/{index-BUYyZm5I.d.mts → index-vcSj12YQ.d.mts} +0 -0
  412. /package/dist/{index-CdEhEXlY.d.mts → index-ye0oklfU.d.mts} +0 -0
  413. /package/dist/{json-value-BwVdTylT.d.mts → json-value-Brslhqbm.d.mts} +0 -0
  414. /package/dist/{jsonl-transport-D8RBF0dK.mjs → jsonl-transport-bQl3JwIu.mjs} +0 -0
  415. /package/dist/{lib-3_xcE8J-.mjs → lib-DOBXZmYX.mjs} +0 -0
  416. /package/dist/{model-registry-CoegIvks.mjs → model-registry-CmgcPDH3.mjs} +0 -0
  417. /package/dist/{model-registry-BneK5SGo.mjs → model-registry-xyBKSye-.mjs} +0 -0
  418. /package/dist/{namespace-CDO4rY11.mjs → namespace-B8uKAzWJ.mjs} +0 -0
  419. /package/dist/{namespace-BsF9IxJ9.d.mts → namespace-BOkKoq34.d.mts} +0 -0
  420. /package/dist/{namespace-SQAGytmu.d.mts → namespace-Blp4c8GK.d.mts} +0 -0
  421. /package/dist/{namespace-BeED_Ojz.mjs → namespace-C-9si-fV.mjs} +0 -0
  422. /package/dist/{namespace-De9Mg3zv.d.mts → namespace-CErHuXtb.d.mts} +0 -0
  423. /package/dist/{namespace-BHj13hbA.mjs → namespace-CWGKCNZm.mjs} +0 -0
  424. /package/dist/{namespace-D7pE2QWv.mjs → namespace-CWUDFGOy.mjs} +0 -0
  425. /package/dist/{namespace-D9HNjIdc.d.mts → namespace-Cv1RFP7n.d.mts} +0 -0
  426. /package/dist/{namespace-lWlqWTKu.d.mts → namespace-GPA7zots.d.mts} +0 -0
  427. /package/dist/{namespace-DWwWnLBu.mjs → namespace-HO2J9sO8.mjs} +0 -0
  428. /package/dist/{namespace-C238RqwB.mjs → namespace-YxU1xf-K.mjs} +0 -0
  429. /package/dist/{namespace-B9CYb9Gh.d.mts → namespace-jDhZjw-i.d.mts} +0 -0
  430. /package/dist/{namespace-BSXHdCVh2.d.mts → namespace-tGRAod3o.d.mts} +0 -0
  431. /package/dist/{orchestrator-shared-BB6j8ezL.d.mts → orchestrator-shared-BHCv-l2O.d.mts} +0 -0
  432. /package/dist/{out-CFkI17mk.mjs → out-CvjtANXN.mjs} +0 -0
  433. /package/dist/{packages-DeIgn0Hn.d.mts → packages-BZ6pzFIq.d.mts} +0 -0
  434. /package/dist/{platform-CWhGFQFX.mjs → platform-Bv8llU9c.mjs} +0 -0
  435. /package/dist/{providers-CUnrif24.mjs → providers-Co5UszRH.mjs} +0 -0
  436. /package/dist/{providers-namespace-sPbGcZ6I.d.mts → providers-namespace-DjFkmvBR.d.mts} +0 -0
  437. /package/dist/{quick-lru-CTBjxfgD.mjs → quick-lru-CrOpWwrf.mjs} +0 -0
  438. /package/dist/{schema-cus0dJ81.mjs → schema-Db-y-09L.mjs} +0 -0
  439. /package/dist/{schema-introspection-BsWLmoFp.mjs → schema-introspection-DgWQCpwx.mjs} +0 -0
  440. /package/dist/{schemas-DYvvMd3c.d.mts → schemas-B1NWNASS.d.mts} +0 -0
  441. /package/dist/{schemas-CMyv7l7-.mjs → schemas-BGExwp3j.mjs} +0 -0
  442. /package/dist/{schemas-Dmij0PIc.d.mts → schemas-BO7uOum6.d.mts} +0 -0
  443. /package/dist/{schemas-BGS9RfqV.mjs → schemas-Bfxskx_2.mjs} +0 -0
  444. /package/dist/{schemas-BKKpQC4X2.d.mts → schemas-BtZqovRH.d.mts} +0 -0
  445. /package/dist/{schemas-BAvt2HDy.d.mts → schemas-CQyRBqD6.d.mts} +0 -0
  446. /package/dist/{schemas-D55eXBgl.d.mts → schemas-CR8hSqTy.d.mts} +0 -0
  447. /package/dist/{schemas-CWxf_Yut.mjs → schemas-CqRm0i9a.mjs} +0 -0
  448. /package/dist/{schemas-CiWCNQ9a2.d.mts → schemas-CwbYk_kZ.d.mts} +0 -0
  449. /package/dist/{schemas-B4FyOOJj.d.mts → schemas-miYxK_Z1.d.mts} +0 -0
  450. /package/dist/{semver-D3Y7uMEb.mjs → semver-DlM8znk4.mjs} +0 -0
  451. /package/dist/{server-lifecycle-C-3OgoKi.d.mts → server-lifecycle-Dsq56aqC.d.mts} +0 -0
  452. /package/dist/{server-lifecycle-DV6NMsgH.mjs → server-lifecycle-kmQ5PUDv.mjs} +0 -0
  453. /package/dist/{session-lineage-D4z26OtM.d.mts → session-lineage-B_JW5LpF.d.mts} +0 -0
  454. /package/dist/{shared-schemas-BNCPgGYP.mjs → shared-schemas-DXwyMCwZ.mjs} +0 -0
  455. /package/dist/{src-ftBp6GpR.mjs → src-CCu8TwL6.mjs} +0 -0
  456. /package/dist/{storage-namespace-B1GI4elv.mjs → storage-namespace-BSrv0vXR.mjs} +0 -0
  457. /package/dist/{storage-namespace-definition-V8sc3drq.d.mts → storage-namespace-definition-BvlX0QV_.d.mts} +0 -0
  458. /package/dist/{storage-namespace-definition-4UYuij1r.mjs → storage-namespace-definition-CkMKt7-I.mjs} +0 -0
  459. /package/dist/{storage-namespace-9N9R61pI.d.mts → storage-namespace-dfywhXR3.d.mts} +0 -0
  460. /package/dist/{supports-color-DwW9N6YC.mjs → supports-color-DUugCQsK.mjs} +0 -0
  461. /package/dist/{telemetry-B42EMbZt.mjs → telemetry-Pr3oP2rk.mjs} +0 -0
  462. /package/dist/{timeout-CvONPl0l.mjs → timeout-DWDhddRJ.mjs} +0 -0
  463. /package/dist/{tray-menu-service-Dgedanv-.mjs → tray-menu-service-BBLa-Rcv.mjs} +0 -0
  464. /package/dist/{types-DkFvBdIY.d.mts → types-BrcjaNPZ.d.mts} +0 -0
  465. /package/dist/{types-DVLq657Y.d.mts → types-DHmPneIO.d.mts} +0 -0
  466. /package/dist/{types-Bju4dmAg.d.mts → types-b54n1o57.d.mts} +0 -0
  467. /package/dist/{ui-config-B2L3Xgqo.mjs → ui-config-CyCdlns_.mjs} +0 -0
  468. /package/dist/{variant-ByI-RZua.mjs → variant-krjlTdJt.mjs} +0 -0
  469. /package/dist/{window-registry-Qcnvlhp7.d.mts → window-registry-BDnZLPVx.d.mts} +0 -0
  470. /package/dist/{window-registry-DsWnCc8z.mjs → window-registry-I-imZHV_.mjs} +0 -0
@@ -1,2 +1,2 @@
1
- import { a as DrizzleCrudConfig, i as CrudLifecycleConfig, n as createDrizzleListHandler, o as DrizzleListConfig, r as createDrizzleCrudHandlers, t as buildScopePredicates } from "../../../index-BG9-vQHD.mjs";
1
+ import { a as DrizzleCrudConfig, i as CrudLifecycleConfig, n as createDrizzleListHandler, o as DrizzleListConfig, r as createDrizzleCrudHandlers, t as buildScopePredicates } from "../../../index-DZunhZec.mjs";
2
2
  export { CrudLifecycleConfig, DrizzleCrudConfig, DrizzleListConfig, buildScopePredicates, createDrizzleCrudHandlers, createDrizzleListHandler };
@@ -1 +1 @@
1
- import{n as e,r as t,t as n}from"../../../drizzle-oCH9H53q.mjs";export{n as buildScopePredicates,t as createDrizzleCrudHandlers,e as createDrizzleListHandler};
1
+ import{n as e,r as t,t as n}from"../../../drizzle-z_0SiGY8.mjs";export{n as buildScopePredicates,t as createDrizzleCrudHandlers,e as createDrizzleListHandler};
@@ -1,4 +1,4 @@
1
- import { a as DrizzleCrudConfig, i as CrudLifecycleConfig, n as createDrizzleListHandler, o as DrizzleListConfig, r as createDrizzleCrudHandlers, t as buildScopePredicates } from "../../index-BG9-vQHD.mjs";
1
+ import { a as DrizzleCrudConfig, i as CrudLifecycleConfig, n as createDrizzleListHandler, o as DrizzleListConfig, r as createDrizzleCrudHandlers, t as buildScopePredicates } from "../../index-DZunhZec.mjs";
2
2
 
3
3
  //#region storage/handlers/src/utils.d.ts
4
4
  /**
@@ -1 +1 @@
1
- import{n as e,r as t,t as n}from"../../drizzle-oCH9H53q.mjs";function r(e,t){let n={...e};for(let e of t)n[e]===null&&(n[e]=void 0);return n}function i(e,t){let n={...e};for(let e of t)n[e]===void 0&&(n[e]=null);return n}export{n as buildScopePredicates,t as createDrizzleCrudHandlers,e as createDrizzleListHandler,r as nullToUndefined,i as undefinedToNull};
1
+ import{n as e,r as t,t as n}from"../../drizzle-z_0SiGY8.mjs";function r(e,t){let n={...e};for(let e of t)n[e]===null&&(n[e]=void 0);return n}function i(e,t){let n={...e};for(let e of t)n[e]===void 0&&(n[e]=null);return n}export{n as buildScopePredicates,t as createDrizzleCrudHandlers,e as createDrizzleListHandler,r as nullToUndefined,i as undefinedToNull};
@@ -97,6 +97,47 @@ interface PluginTestDbConfig {
97
97
  * @returns Object with db, dbPath, close, and cleanup
98
98
  */
99
99
  declare function createTempDb(name: string): Promise<TestDbContext>;
100
+ /**
101
+ * One temporary database file that independent connections can be opened on.
102
+ *
103
+ * It exists for suites about restart: a component that is torn down and rebuilt
104
+ * against the same durable state must be rebuilt against a *new connection*, or
105
+ * the suite proves only that one JavaScript object still agrees with itself.
106
+ * Handing out connections rather than a single handle is what makes that the
107
+ * default rather than something each suite has to remember.
108
+ */
109
+ interface RestartableTestDb {
110
+ /** Absolute path of the single file every connection is opened on. */
111
+ readonly dbPath: string;
112
+ /**
113
+ * Open one more independent connection to that file.
114
+ *
115
+ * Each call returns a separate connection with its own transaction state, so
116
+ * two handles see each other's writes only once they are committed.
117
+ * @returns A newly opened handle to the shared database file.
118
+ */
119
+ connect(): Promise<MakaioDatabase>;
120
+ /**
121
+ * Close every connection handed out and remove the database files.
122
+ * @returns Promise that settles once all connections are closed.
123
+ */
124
+ close(): Promise<void>;
125
+ }
126
+ /**
127
+ * Create a temporary SQLite database that survives its connections.
128
+ *
129
+ * Unlike {@link createTempDb} this hands out no initial handle: a caller states
130
+ * how many independent connections it wants by calling
131
+ * {@link RestartableTestDb.connect}, which is the whole point when the suite is
132
+ * about what survives a restart.
133
+ *
134
+ * Nothing is opened here: the file is created by the first
135
+ * {@link RestartableTestDb.connect}, which is also where a driver problem
136
+ * surfaces.
137
+ * @param name - Service name used in the temporary file name.
138
+ * @returns The shared store, its path, and its teardown.
139
+ */
140
+ declare function createRestartableTempDb(name: string): RestartableTestDb;
100
141
  /**
101
142
  * Creates a suite-level test database for plugin storage tests.
102
143
  *
@@ -136,11 +177,11 @@ declare function createPgBrandedTestDb(): Promise<PgBrandedTestDbContext>;
136
177
  * Creates cleanup function for test database.
137
178
  * @param handlerCleanup - Storage handler cleanup function
138
179
  * @param close - Function to close the database connection. Must close synchronously
139
- * (true for all SQLite drivers) — the temp file is unlinked immediately after the
180
+ * (true for all SQLite drivers) — the temp files are unlinked immediately after the
140
181
  * call, so clients whose close resolves asynchronously must use an awaited teardown
141
182
  * such as {@link PluginTestDbContext.close} instead.
142
183
  * @param dbPath - Path to temp database file
143
- * @returns Cleanup function that closes connection and deletes temp file
184
+ * @returns Cleanup function that closes the connection and deletes the temp files
144
185
  */
145
186
  declare function createDbCleanup(handlerCleanup: () => void, close: () => void, dbPath: string): () => void;
146
187
  /**
@@ -173,4 +214,4 @@ interface PluginStorageTestContext {
173
214
  */
174
215
  declare function usePluginStorageTestLifecycle(createTestDbFn: () => Promise<PluginTestDbContext>): PluginStorageTestContext;
175
216
  //#endregion
176
- export { PgBrandedTestDbContext, PluginStorageTestContext, PluginTestDbConfig, PluginTestDbContext, TestDbContext, TestDbContextWithCleanup, createDbCleanup, createPgBrandedTestDb, createPluginTestDb, createTempDb, usePluginStorageTestLifecycle };
217
+ export { PgBrandedTestDbContext, PluginStorageTestContext, PluginTestDbConfig, PluginTestDbContext, RestartableTestDb, TestDbContext, TestDbContextWithCleanup, createDbCleanup, createPgBrandedTestDb, createPluginTestDb, createRestartableTempDb, createTempDb, usePluginStorageTestLifecycle };
@@ -1 +1 @@
1
- import{createRequire as e}from"node:module";import{pathToFileURL as t}from"node:url";import*as n from"node:path";import*as r from"node:fs";import{brandDatabase as i,findStorageEngine as a,getRawSqlExecutor as o,registerStorageEngine as s}from"@makaio/framework/storage/drizzle";import{sql as c}from"drizzle-orm";import*as l from"node:os";import{afterAll as u,afterEach as d,beforeAll as f,beforeEach as p}from"vitest";import{drizzle as m}from"drizzle-orm/libsql";import{createDatabaseClient as h}from"@makaio/framework/storage/drizzle/client";const g=e(import.meta.url);async function _(e){let t=n.join(l.tmpdir(),`makaio-${e}-test-${crypto.randomUUID()}.db`),{db:i,close:a}=await h({url:`file:${t}`}),s=o(i);try{await s.run(c`SELECT 1`)}catch(e){await a();try{r.unlinkSync(t)}catch{}throw e}return{db:i,dbPath:t,exec:e=>s.run(e),close:a,cleanup:x(()=>{},a,t)}}async function v(e){let t=n.join(l.tmpdir(),`makaio-${e.name}-test-${crypto.randomUUID()}.db`),{db:i,close:a}=await h({url:`file:${t}`}),s=o(i);try{for(let t of e.schemas)await s.run(t)}catch(e){await a();try{r.unlinkSync(t)}catch{}throw e}return{db:i,dbPath:t,exec:e=>s.run(e),clearData:async()=>{for(let t of e.tables)await s.run(c.raw(`DELETE FROM ${t}`))},registerHandlers:()=>e.registerHandlers(i),close:async()=>{await a();try{r.unlinkSync(t)}catch{}}}}async function y(){let{storageEngine:e}=await import(t(g.resolve(`@makaio/storage-pg`)).href);return e}async function b(){if(!a(`postgres`)){let e;try{e=await y()}catch(e){throw Error(`createPgBrandedTestDb requires @makaio/storage-pg to be resolvable from @makaio/test-utils.`,{cause:e})}s(e)}let e=[],t={async run(t){return e.push(JSON.stringify(t.queryChunks)),{rowsAffected:0}},async all(){return[]}},n={dialect:`postgres`,run:t.run,all:t.all,withSession:e=>e(t)};return{db:i(m({connection:{url:`:memory:`}}),`postgres`,n),statements:e}}function x(e,t,n){return()=>{e(),t();try{r.unlinkSync(n)}catch{}}}function S(e){let t,n;return f(async()=>{t=await e()}),p(async()=>{if(!t)throw Error(`usePluginStorageTestLifecycle: createTestDbFn did not initialize db context`);await t.clearData(),n=t.registerHandlers()}),d(()=>{n?.(),n=void 0}),u(async()=>{t&&await t.close()}),{get dbContext(){return t}}}export{x as createDbCleanup,b as createPgBrandedTestDb,v as createPluginTestDb,_ as createTempDb,S as usePluginStorageTestLifecycle};
1
+ import{createRequire as e}from"node:module";import{pathToFileURL as t}from"node:url";import*as n from"node:path";import*as r from"node:fs";import{brandDatabase as i,findStorageEngine as a,getRawSqlExecutor as o,registerStorageEngine as s}from"@makaio/framework/storage/drizzle";import{sql as c}from"drizzle-orm";import*as l from"node:os";import{afterAll as u,afterEach as d,beforeAll as f,beforeEach as p}from"vitest";import{drizzle as m}from"drizzle-orm/libsql";import{createDatabaseClient as h}from"@makaio/framework/storage/drizzle/client";const g=e(import.meta.url);async function _(e,t,n){let r=[e];try{await t()}catch(e){r.push(e)}finally{n?.()}throw r.length===1?e:AggregateError(r,`Database setup and cleanup both failed`)}async function v(e){let t=n.join(l.tmpdir(),`makaio-${e}-test-${crypto.randomUUID()}.db`),{db:r,close:i}=await h({url:`file:${t}`}),a=o(r);try{await a.run(c`SELECT 1`)}catch(e){await _(e,i,()=>C(t))}return{db:r,dbPath:t,exec:e=>a.run(e),close:i,cleanup:w(()=>{},i,t)}}function y(e){let t=n.join(l.tmpdir(),`makaio-${e}-test-${crypto.randomUUID()}.db`),r=[],i;return{dbPath:t,connect:async()=>{let e=await h({url:`file:${t}`});try{await o(e.db).run(c`SELECT 1`)}catch(t){await _(t,e.close)}return r.push(e.close),e.db},close:()=>i??=(async()=>{let e=await Promise.allSettled(r.splice(0).map(e=>e()));C(t);let n=e.filter(e=>e.status===`rejected`);if(n.length>0)throw AggregateError(n.map(e=>e.reason),`Failed to close ${n.length} restartable test database connections`)})()}}async function b(e){let t=n.join(l.tmpdir(),`makaio-${e.name}-test-${crypto.randomUUID()}.db`),{db:r,close:i}=await h({url:`file:${t}`}),a=o(r);try{for(let t of e.schemas)await a.run(t)}catch(e){await _(e,i,()=>C(t))}return{db:r,dbPath:t,exec:e=>a.run(e),clearData:async()=>{for(let t of e.tables)await a.run(c.raw(`DELETE FROM ${t}`))},registerHandlers:()=>e.registerHandlers(r),close:async()=>{try{await i()}finally{C(t)}}}}async function x(){let{storageEngine:e}=await import(t(g.resolve(`@makaio/storage-pg`)).href);return e}async function S(){if(!a(`postgres`)){let e;try{e=await x()}catch(e){throw Error(`createPgBrandedTestDb requires @makaio/storage-pg to be resolvable from @makaio/test-utils.`,{cause:e})}s(e)}let e=[],t={async run(t){return e.push(JSON.stringify(t.queryChunks)),{rowsAffected:0}},async all(){return[]}},n={dialect:`postgres`,run:t.run,all:t.all,withSession:e=>e(t)};return{db:i(m({connection:{url:`:memory:`}}),`postgres`,n),statements:e}}function C(e){for(let t of[``,`-wal`,`-shm`])try{r.unlinkSync(`${e}${t}`)}catch{}}function w(e,t,n){return()=>{let r=[];try{e()}catch(e){r.push(e)}try{t()}catch(e){r.push(e)}finally{C(n)}if(r.length>0)throw AggregateError(r,`Test database cleanup failed with ${r.length} error(s)`)}}function T(e){let t,n;return f(async()=>{t=await e()}),p(async()=>{if(!t)throw Error(`usePluginStorageTestLifecycle: createTestDbFn did not initialize db context`);await t.clearData(),n=t.registerHandlers()}),d(()=>{try{n?.()}finally{n=void 0}}),u(async()=>{t&&await t.close()}),{get dbContext(){return t}}}export{w as createDbCleanup,S as createPgBrandedTestDb,b as createPluginTestDb,y as createRestartableTempDb,v as createTempDb,T as usePluginStorageTestLifecycle};
@@ -1 +1 @@
1
- import{F as e}from"./handlers-cMBmexF4.mjs";import{SessionStorageSubjects as t}from"./services/session/storage/namespace.mjs";import"./session-idI1jk5X.mjs";import{AgentSubjects as n,ApprovalSubjects as r,HarnessSubjects as i,computeMetaTags as a}from"@makaio/framework/contracts";import{BaseService as o}from"@makaio/framework/service-base";import{extractToolFilePath as s}from"@makaio/framework/tools";const c={"full-access":0,"always-ask":1,reject:2};function l(){return`apr_${crypto.randomUUID()}`}function u(e){switch(e){case`allow`:return`full-access`;case`deny`:return`reject`;case`ask`:return`always-ask`}}function d(e){if(!e?.length)return`neutral`;let t=a(e);return t.includes(`destructive`)?`destructive`:t.includes(`read-only`)?`safe`:`neutral`}function f(e,t){if(e)return t&&e.toolApprovalOverrides?.[t]!==void 0?e.toolApprovalOverrides[t]:e.approvalPolicy}function p(e,t,n,r){let i=r[t];if(!i?.length)return e;let a=e;for(let e of i){let t=n[e];t&&c[t]>c[a]&&(a=t)}return a}function m(e,t,n){return n.handled?n.data.allowedDirectories??void 0:t?[]:void 0}function h(e,t,n){if(!n||!e?.cwd)return{};let r;return(e.personaId||e.profileId)&&t&&(r=m(e.personaId,e.profileId,t)),{cwd:e.cwd,...r&&{allowedDirectories:r}}}function g(e,t,n){if(!(!e&&!t))return!n||!n.handled?{policy:`always-ask`}:{policy:u(n.data.action),...n.data.personaName&&{personaName:n.data.personaName},...n.data.profileName&&{profileName:n.data.profileName}}}function _(e,t){let n=t.harness?.toolCapabilityMap&&e.toolName?t.harness.toolCapabilityMap[e.toolName]:void 0;return{requestId:l(),toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,agentId:e.agentId,sessionId:e.sessionId,adapterName:t.resolvedAdapterName,...t.personaName&&{personaName:t.personaName},...t.profileName&&{profileName:t.profileName},capabilities:n,riskLevel:d(n),reasoning:e.reasoning,createdAt:Date.now()}}var v=class extends o{logger=console;options;constructor(e,t={}){super(e),this.options=t}async onInit(){this.registerHandler(n.toolApprove,async e=>{let t=await this.getAgentMetadata(e.payload.agentId,e.payload.sessionId),n=(t?.personaId||t?.profileId)&&e.payload.toolName?await this.fetchRawEnrichedPolicy(t?.personaId,t?.profileId,e.payload.toolName):void 0,r=h(t,n,this.options.fileAccessRuleProvider),i=await this.checkFileAccessDenyReason(e.payload,r);if(i){e.setResult({action:`deny`,message:i,shouldAbort:!1});return}let a=await this.resolveSessionOverride(e.payload.sessionId);if(a===`full-access`){e.setResult({action:`allow`});return}if(a===`reject`){e.setResult({action:`deny`,message:`Tool use rejected by session approval policy override`,shouldAbort:!1});return}let o=await this.resolvePolicyWithContext({adapterName:e.payload.adapterName,toolName:e.payload.toolName},t,n);switch(a===`always-ask`?`always-ask`:o.policy){case`full-access`:e.setResult({action:`allow`});return;case`reject`:e.setResult({action:`deny`,message:`Tool use rejected by approval policy`,shouldAbort:!1});return;case`always-ask`:await this.dispatchAlwaysAskApproval(e.payload,e.setResult.bind(e),o);return}})}async dispatchAlwaysAskApproval(e,t,i){let a=_(e,i),o=new AbortController,s=this.bus.on(n.session.closed,()=>{o.abort()},{filter:{agentId:a.agentId,...e.adapterSessionId!==void 0&&{adapterSessionId:e.adapterSessionId}}});try{let e=await this.bus.requestOptional(r.request,a,{timeout:0,signal:o.signal});e.handled&&e.data.action===`allow`?t({action:`allow`,...e.data.updatedInput&&{updatedInput:e.data.updatedInput}}):t({action:`deny`,message:e.handled&&e.data.action===`deny`?e.data.message??`User denied tool execution`:`No approval handler available`,shouldAbort:!1})}catch{t({action:`deny`,message:o.signal.aborted?`Approval cancelled — agent session closed`:`Tool approval request failed`,shouldAbort:!1})}finally{s()}}async checkFileAccessDenyReason(e,t){if(!this.options.fileAccessRuleProvider||!t.cwd)return;let n=s(e.toolName,e.args,t.cwd);if(n)try{return(await this.options.fileAccessRuleProvider(t.cwd,t.allowedDirectories)).isDenied(n)?`Access denied: '${n}' is restricted by .makaioignore rules`:void 0}catch{return`Access denied: file access rules could not be evaluated`}}async fetchRawEnrichedPolicy(e,t,n){try{return await this.bus.requestOptional(r.resolveEnrichedPolicy,{toolName:n,personaId:e,profileId:t})}catch(r){return this.logger.error(`[ToolApprovalService] approval.resolveEnrichedPolicy failed; falling back to fail-closed`,{toolName:n,personaId:e,profileId:t,error:r}),{handled:!1}}}async resolvePolicyWithContext(e,t,n){let r=t?.adapterName??e.adapterName,i=g(t?.personaId,t?.profileId,n),a=await this.resolveHarnessPolicy(r,t?.harnessId,t?.clientId),o=f(a,e.toolName),s=i?.policy??o??`always-ask`,c=s;return a?.capabilityOverrides&&a.toolCapabilityMap&&e.toolName&&(c=p(s,e.toolName,a.capabilityOverrides,a.toolCapabilityMap)),{policy:c,harness:a,agent:t,resolvedAdapterName:r,...i?.personaName&&{personaName:i.personaName},...i?.profileName&&{profileName:i.profileName}}}async getAgentMetadata(t,n){try{if(n){let{agents:r}=await this.bus.request(e.listBySession,{sessionId:n});return r.find(e=>e.agentId===t)??null}let r=await this.bus.requestOptional(e.get,{agentId:t});return r.handled?r.data.agent:null}catch{return null}}async resolveSessionOverride(e){if(e)try{let n=await this.bus.requestOptional(t.get,{sessionId:e});return n.handled?n.data.session?.approvalPolicyOverride??void 0:void 0}catch{return}}async resolveHarnessPolicy(e,t,n){try{let r=await this.bus.request(i.resolve,{adapterName:e,...t&&{profileHarnessId:t},...n&&{clientId:n}});return{approvalPolicy:r.approvalPolicy,capabilityOverrides:r.capabilityOverrides,toolCapabilityMap:r.toolCapabilityMap,toolApprovalOverrides:r.toolApprovalOverrides}}catch{return}}};export{v as t};
1
+ import{F as e}from"./handlers-CfnLyLfE.mjs";import{SessionStorageSubjects as t}from"./services/session/storage/namespace.mjs";import"./session-BTFiDoGz.mjs";import{AgentSubjects as n,ApprovalSubjects as r,HarnessSubjects as i,computeMetaTags as a}from"@makaio/framework/contracts";import{BaseService as o}from"@makaio/framework/service-base";import{extractToolFilePath as s}from"@makaio/framework/tools";const c={"full-access":0,"always-ask":1,reject:2};function l(){return`apr_${crypto.randomUUID()}`}function u(e){switch(e){case`allow`:return`full-access`;case`deny`:return`reject`;case`ask`:return`always-ask`}}function d(e){if(!e?.length)return`neutral`;let t=a(e);return t.includes(`destructive`)?`destructive`:t.includes(`read-only`)?`safe`:`neutral`}function f(e,t){if(e)return t&&e.toolApprovalOverrides?.[t]!==void 0?e.toolApprovalOverrides[t]:e.approvalPolicy}function p(e,t,n,r){let i=r[t];if(!i?.length)return e;let a=e;for(let e of i){let t=n[e];t&&c[t]>c[a]&&(a=t)}return a}function m(e,t,n){return n.handled?n.data.allowedDirectories??void 0:t?[]:void 0}function h(e,t,n){if(!n||!e?.cwd)return{};let r;return(e.personaId||e.profileId)&&t&&(r=m(e.personaId,e.profileId,t)),{cwd:e.cwd,...r&&{allowedDirectories:r}}}function g(e,t,n){if(!(!e&&!t))return!n||!n.handled?{policy:`always-ask`}:{policy:u(n.data.action),...n.data.personaName&&{personaName:n.data.personaName},...n.data.profileName&&{profileName:n.data.profileName}}}function _(e,t){let n=t.harness?.toolCapabilityMap&&e.toolName?t.harness.toolCapabilityMap[e.toolName]:void 0;return{requestId:l(),toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,agentId:e.agentId,sessionId:e.sessionId,adapterName:t.resolvedAdapterName,...t.personaName&&{personaName:t.personaName},...t.profileName&&{profileName:t.profileName},capabilities:n,riskLevel:d(n),reasoning:e.reasoning,createdAt:Date.now()}}var v=class extends o{logger=console;options;constructor(e,t={}){super(e),this.options=t}async onInit(){this.registerHandler(n.toolApprove,async e=>{let t=await this.getAgentMetadata(e.payload.agentId,e.payload.sessionId),n=(t?.personaId||t?.profileId)&&e.payload.toolName?await this.fetchRawEnrichedPolicy(t?.personaId,t?.profileId,e.payload.toolName):void 0,r=h(t,n,this.options.fileAccessRuleProvider),i=await this.checkFileAccessDenyReason(e.payload,r);if(i){e.setResult({action:`deny`,message:i,shouldAbort:!1});return}let a=await this.resolveSessionOverride(e.payload.sessionId);if(a===`full-access`){e.setResult({action:`allow`});return}if(a===`reject`){e.setResult({action:`deny`,message:`Tool use rejected by session approval policy override`,shouldAbort:!1});return}let o=await this.resolvePolicyWithContext({adapterName:e.payload.adapterName,toolName:e.payload.toolName},t,n);switch(a===`always-ask`?`always-ask`:o.policy){case`full-access`:e.setResult({action:`allow`});return;case`reject`:e.setResult({action:`deny`,message:`Tool use rejected by approval policy`,shouldAbort:!1});return;case`always-ask`:await this.dispatchAlwaysAskApproval(e.payload,e.setResult.bind(e),o);return}})}async dispatchAlwaysAskApproval(e,t,i){let a=_(e,i),o=new AbortController,s=this.bus.on(n.session.closed,()=>{o.abort()},{filter:{agentId:a.agentId,...e.adapterSessionId!==void 0&&{adapterSessionId:e.adapterSessionId}}});try{let e=await this.bus.requestOptional(r.request,a,{timeout:0,signal:o.signal});e.handled&&e.data.action===`allow`?t({action:`allow`,...e.data.updatedInput&&{updatedInput:e.data.updatedInput}}):t({action:`deny`,message:e.handled&&e.data.action===`deny`?e.data.message??`User denied tool execution`:`No approval handler available`,shouldAbort:!1})}catch{t({action:`deny`,message:o.signal.aborted?`Approval cancelled — agent session closed`:`Tool approval request failed`,shouldAbort:!1})}finally{s()}}async checkFileAccessDenyReason(e,t){if(!this.options.fileAccessRuleProvider||!t.cwd)return;let n=s(e.toolName,e.args,t.cwd);if(n)try{return(await this.options.fileAccessRuleProvider(t.cwd,t.allowedDirectories)).isDenied(n)?`Access denied: '${n}' is restricted by .makaioignore rules`:void 0}catch{return`Access denied: file access rules could not be evaluated`}}async fetchRawEnrichedPolicy(e,t,n){try{return await this.bus.requestOptional(r.resolveEnrichedPolicy,{toolName:n,personaId:e,profileId:t})}catch(r){return this.logger.error(`[ToolApprovalService] approval.resolveEnrichedPolicy failed; falling back to fail-closed`,{toolName:n,personaId:e,profileId:t,error:r}),{handled:!1}}}async resolvePolicyWithContext(e,t,n){let r=t?.adapterName??e.adapterName,i=g(t?.personaId,t?.profileId,n),a=await this.resolveHarnessPolicy(r,t?.harnessId,t?.clientId),o=f(a,e.toolName),s=i?.policy??o??`always-ask`,c=s;return a?.capabilityOverrides&&a.toolCapabilityMap&&e.toolName&&(c=p(s,e.toolName,a.capabilityOverrides,a.toolCapabilityMap)),{policy:c,harness:a,agent:t,resolvedAdapterName:r,...i?.personaName&&{personaName:i.personaName},...i?.profileName&&{profileName:i.profileName}}}async getAgentMetadata(t,n){try{if(n){let{agents:r}=await this.bus.request(e.listBySession,{sessionId:n});return r.find(e=>e.agentId===t)??null}let r=await this.bus.requestOptional(e.get,{agentId:t});return r.handled?r.data.agent:null}catch{return null}}async resolveSessionOverride(e){if(e)try{let n=await this.bus.requestOptional(t.get,{sessionId:e});return n.handled?n.data.session?.approvalPolicyOverride??void 0:void 0}catch{return}}async resolveHarnessPolicy(e,t,n){try{let r=await this.bus.request(i.resolve,{adapterName:e,...t&&{profileHarnessId:t},...n&&{clientId:n}});return{approvalPolicy:r.approvalPolicy,capabilityOverrides:r.capabilityOverrides,toolCapabilityMap:r.toolCapabilityMap,toolApprovalOverrides:r.toolApprovalOverrides}}catch{return}}};export{v as t};
@@ -0,0 +1 @@
1
+ import{u as e}from"./framework-packages-C3RWfJDk.mjs";import{FILE_ACCESS_RULES_KEY as t,extractToolFilePath as n}from"@makaio/framework/tools";function r(){let t=new Map;return{filter:e=>!!e.tools?.createToolsets,async processActivated(n,r,i){let a=i.getService(e);if(!a)throw Error(`ToolRegistry is not available. Ensure toolRegistryPackage is included in the composition root.`);let o=r.tools.createToolsets(i),s=[];try{for(let e of o)await a.register(e),s.push(()=>a.deregister(e.metadata.name))}catch(e){for(let e=s.length-1;e>=0;--e)try{await s[e]()}catch(e){console.error(`[ToolContributionProcessor] Rollback error for "${n}":`,e)}throw e}t.set(n,s)},async processStopped(e){let n=t.get(e);if(n){for(let t=n.length-1;t>=0;--t)try{await n[t]()}catch(t){console.error(`[ToolContributionProcessor] Deregister error for "${e}":`,t)}t.delete(e)}}}}export{n,r,t};
@@ -1,5 +1,5 @@
1
- import { q as ArtifactRevision$1 } from "./context-resolution-B5IH2Z9v.mjs";
2
- import { i as JsonValue$1 } from "./json-value-BwVdTylT.mjs";
1
+ import { q as ArtifactRevision$1 } from "./context-resolution-BQBk4Ish.mjs";
2
+ import { i as JsonValue$1 } from "./json-value-Brslhqbm.mjs";
3
3
  import { z } from "zod";
4
4
  import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
5
5
 
@@ -258,8 +258,7 @@ type TransitionCondition = z.infer<typeof TransitionConditionSchema>;
258
258
  * Invocation descriptor for the action to execute when a transition rule fires.
259
259
  *
260
260
  * `type` selects the registered action handler; `input` supplies the
261
- * action-specific payload; `executionHints` threads optional infrastructure
262
- * hints to the execution host.
261
+ * action-specific payload.
263
262
  *
264
263
  * Built-in action type:
265
264
  * - `'workflow.start'` — start a workflow execution via the bus
@@ -267,25 +266,6 @@ type TransitionCondition = z.infer<typeof TransitionConditionSchema>;
267
266
  declare const TransitionActionInvocationSchema: z.ZodObject<{
268
267
  type: z.ZodString;
269
268
  input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
270
- executionHints: z.ZodOptional<z.ZodObject<{
271
- source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
272
- kind: z.ZodLiteral<"path">;
273
- path: z.ZodString;
274
- }, z.core.$strict>, z.ZodObject<{
275
- kind: z.ZodLiteral<"source">;
276
- filename: z.ZodString;
277
- source: z.ZodString;
278
- }, z.core.$strict>], "kind">>;
279
- requirements: z.ZodOptional<z.ZodObject<{
280
- isolation: z.ZodOptional<z.ZodEnum<{
281
- local: "local";
282
- remote: "remote";
283
- container: "container";
284
- }>>;
285
- capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
286
- }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
287
- providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
288
- }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
289
269
  }, z.core.$strip>;
290
270
  type TransitionActionInvocation$1 = z.infer<typeof TransitionActionInvocationSchema>;
291
271
  /**
@@ -314,25 +294,6 @@ declare const TransitionRuleDefinitionSchema$1: z.ZodObject<{
314
294
  action: z.ZodObject<{
315
295
  type: z.ZodString;
316
296
  input: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
317
- executionHints: z.ZodOptional<z.ZodObject<{
318
- source: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
319
- kind: z.ZodLiteral<"path">;
320
- path: z.ZodString;
321
- }, z.core.$strict>, z.ZodObject<{
322
- kind: z.ZodLiteral<"source">;
323
- filename: z.ZodString;
324
- source: z.ZodString;
325
- }, z.core.$strict>], "kind">>;
326
- requirements: z.ZodOptional<z.ZodObject<{
327
- isolation: z.ZodOptional<z.ZodEnum<{
328
- local: "local";
329
- remote: "remote";
330
- container: "container";
331
- }>>;
332
- capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
333
- }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
334
- providers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>;
335
- }, z.core.$catchall<z.ZodType<_$_makaio_contracts0.JsonValue, unknown, z.core.$ZodTypeInternals<_$_makaio_contracts0.JsonValue, unknown>>>>>;
336
297
  }, z.core.$strip>;
337
298
  enabled: z.ZodDefault<z.ZodBoolean>;
338
299
  }, z.core.$strip>;
@@ -1,4 +1,4 @@
1
- import { r as LogImportMode, t as LogImporterInfo } from "./index-DaMfTvfz.mjs";
1
+ import { r as LogImportMode, t as LogImporterInfo } from "./index-DA9g2A5P.mjs";
2
2
  import * as _$_makaio_bus_core0 from "@makaio/framework/bus";
3
3
  import { IMakaioBus } from "@makaio/framework/bus";
4
4
  import { LogImportOrchestrator, LogImporter } from "@makaio/framework/adapters";
@@ -1,5 +1,5 @@
1
- import { i as JsonValue$1 } from "./json-value-BwVdTylT.mjs";
2
- import { s as MessageBlock$1 } from "./index-4NQLoI7R.mjs";
1
+ import { i as JsonValue$1 } from "./json-value-Brslhqbm.mjs";
2
+ import { s as MessageBlock$1 } from "./index-CUvNKYkV.mjs";
3
3
  import * as _$zod from "zod";
4
4
  import { z } from "zod";
5
5
  import * as _$_makaio_core0 from "@makaio/framework/core";
@@ -24,9 +24,9 @@ declare const SessionCreateBaseSchema: z.ZodObject<{
24
24
  forkPointMessageId: z.ZodOptional<z.ZodString>;
25
25
  branchKind: z.ZodOptional<z.ZodEnum<{
26
26
  fork: "fork";
27
+ branch: "branch";
27
28
  subagent: "subagent";
28
29
  compress: "compress";
29
- branch: "branch";
30
30
  rewrite: "rewrite";
31
31
  coordinator: "coordinator";
32
32
  aside: "aside";
@@ -163,8 +163,8 @@ declare const MakaioSessionSchema: z.ZodObject<{
163
163
  lastActivityAt: z.ZodNumber;
164
164
  }, z.core.$strip>>;
165
165
  status: z.ZodEnum<{
166
- closed: "closed";
167
166
  discovered: "discovered";
167
+ closed: "closed";
168
168
  active: "active";
169
169
  archived: "archived";
170
170
  }>;
@@ -178,9 +178,9 @@ declare const MakaioSessionSchema: z.ZodObject<{
178
178
  forkPointMessageId: z.ZodOptional<z.ZodString>;
179
179
  branchKind: z.ZodOptional<z.ZodEnum<{
180
180
  fork: "fork";
181
+ branch: "branch";
181
182
  subagent: "subagent";
182
183
  compress: "compress";
183
- branch: "branch";
184
184
  rewrite: "rewrite";
185
185
  coordinator: "coordinator";
186
186
  aside: "aside";
@@ -291,8 +291,8 @@ declare const SessionWithPreviewSchema: z.ZodObject<{
291
291
  lastActivityAt: z.ZodNumber;
292
292
  }, z.core.$strip>>;
293
293
  status: z.ZodEnum<{
294
- closed: "closed";
295
294
  discovered: "discovered";
295
+ closed: "closed";
296
296
  active: "active";
297
297
  archived: "archived";
298
298
  }>;
@@ -306,9 +306,9 @@ declare const SessionWithPreviewSchema: z.ZodObject<{
306
306
  forkPointMessageId: z.ZodOptional<z.ZodString>;
307
307
  branchKind: z.ZodOptional<z.ZodEnum<{
308
308
  fork: "fork";
309
+ branch: "branch";
309
310
  subagent: "subagent";
310
311
  compress: "compress";
311
- branch: "branch";
312
312
  rewrite: "rewrite";
313
313
  coordinator: "coordinator";
314
314
  aside: "aside";
@@ -493,8 +493,8 @@ declare const SessionSnapshotSchema: z.ZodObject<{
493
493
  lastActivityAt: z.ZodNumber;
494
494
  }, z.core.$strip>>;
495
495
  status: z.ZodEnum<{
496
- closed: "closed";
497
496
  discovered: "discovered";
497
+ closed: "closed";
498
498
  active: "active";
499
499
  archived: "archived";
500
500
  }>;
@@ -508,9 +508,9 @@ declare const SessionSnapshotSchema: z.ZodObject<{
508
508
  forkPointMessageId: z.ZodOptional<z.ZodString>;
509
509
  branchKind: z.ZodOptional<z.ZodEnum<{
510
510
  fork: "fork";
511
+ branch: "branch";
511
512
  subagent: "subagent";
512
513
  compress: "compress";
513
- branch: "branch";
514
514
  rewrite: "rewrite";
515
515
  coordinator: "coordinator";
516
516
  aside: "aside";
@@ -1000,9 +1000,9 @@ declare const SessionSnapshotSchema: z.ZodObject<{
1000
1000
  parentSessionId: z.ZodString;
1001
1001
  kind: z.ZodEnum<{
1002
1002
  fork: "fork";
1003
+ branch: "branch";
1003
1004
  subagent: "subagent";
1004
1005
  compress: "compress";
1005
- branch: "branch";
1006
1006
  rewrite: "rewrite";
1007
1007
  coordinator: "coordinator";
1008
1008
  aside: "aside";
@@ -1125,9 +1125,9 @@ type AgentRole = z.infer<typeof AgentRoleSchema>;
1125
1125
  */
1126
1126
  declare const BranchKindSchema: z.ZodEnum<{
1127
1127
  fork: "fork";
1128
+ branch: "branch";
1128
1129
  subagent: "subagent";
1129
1130
  compress: "compress";
1130
- branch: "branch";
1131
1131
  rewrite: "rewrite";
1132
1132
  coordinator: "coordinator";
1133
1133
  aside: "aside";
@@ -3879,9 +3879,9 @@ declare const MakaioSessionEventSchema: z.ZodUnion<readonly [z.ZodDiscriminatedU
3879
3879
  parentSessionId: z.ZodString;
3880
3880
  kind: z.ZodEnum<{
3881
3881
  fork: "fork";
3882
+ branch: "branch";
3882
3883
  subagent: "subagent";
3883
3884
  compress: "compress";
3884
- branch: "branch";
3885
3885
  rewrite: "rewrite";
3886
3886
  coordinator: "coordinator";
3887
3887
  aside: "aside";
@@ -4136,9 +4136,9 @@ declare const ForkChildInfoSchema: z.ZodObject<{
4136
4136
  forkPointMessageId: z.ZodNullable<z.ZodString>;
4137
4137
  branchKind: z.ZodNullable<z.ZodEnum<{
4138
4138
  fork: "fork";
4139
+ branch: "branch";
4139
4140
  subagent: "subagent";
4140
4141
  compress: "compress";
4141
- branch: "branch";
4142
4142
  rewrite: "rewrite";
4143
4143
  coordinator: "coordinator";
4144
4144
  aside: "aside";
@@ -4210,9 +4210,9 @@ declare const SessionCreatedEventSchema: z.ZodObject<{
4210
4210
  parentSessionId: z.ZodNullable<z.ZodString>;
4211
4211
  branchKind: z.ZodNullable<z.ZodEnum<{
4212
4212
  fork: "fork";
4213
+ branch: "branch";
4213
4214
  subagent: "subagent";
4214
4215
  compress: "compress";
4215
- branch: "branch";
4216
4216
  rewrite: "rewrite";
4217
4217
  coordinator: "coordinator";
4218
4218
  aside: "aside";
@@ -5972,9 +5972,9 @@ declare const SessionSchemas: {
5972
5972
  forkPointMessageId: _$zod.ZodNullable<_$zod.ZodString>;
5973
5973
  branchKind: _$zod.ZodNullable<_$zod.ZodEnum<{
5974
5974
  fork: "fork";
5975
+ branch: "branch";
5975
5976
  subagent: "subagent";
5976
5977
  compress: "compress";
5977
- branch: "branch";
5978
5978
  rewrite: "rewrite";
5979
5979
  coordinator: "coordinator";
5980
5980
  aside: "aside";
@@ -6029,9 +6029,9 @@ declare const SessionSchemas: {
6029
6029
  parentSessionId: _$zod.ZodString;
6030
6030
  kind: _$zod.ZodEnum<{
6031
6031
  fork: "fork";
6032
+ branch: "branch";
6032
6033
  subagent: "subagent";
6033
6034
  compress: "compress";
6034
- branch: "branch";
6035
6035
  rewrite: "rewrite";
6036
6036
  coordinator: "coordinator";
6037
6037
  aside: "aside";
@@ -6077,9 +6077,9 @@ declare const SessionSchemas: {
6077
6077
  parentSessionId: _$zod.ZodNullable<_$zod.ZodString>;
6078
6078
  branchKind: _$zod.ZodNullable<_$zod.ZodEnum<{
6079
6079
  fork: "fork";
6080
+ branch: "branch";
6080
6081
  subagent: "subagent";
6081
6082
  compress: "compress";
6082
- branch: "branch";
6083
6083
  rewrite: "rewrite";
6084
6084
  coordinator: "coordinator";
6085
6085
  aside: "aside";
@@ -6163,8 +6163,8 @@ declare const SessionSchemas: {
6163
6163
  lastActivityAt: _$zod.ZodNumber;
6164
6164
  }, _$zod_v4_core0.$strip>>;
6165
6165
  status: _$zod.ZodEnum<{
6166
- closed: "closed";
6167
6166
  discovered: "discovered";
6167
+ closed: "closed";
6168
6168
  active: "active";
6169
6169
  archived: "archived";
6170
6170
  }>;
@@ -6178,9 +6178,9 @@ declare const SessionSchemas: {
6178
6178
  forkPointMessageId: _$zod.ZodOptional<_$zod.ZodString>;
6179
6179
  branchKind: _$zod.ZodOptional<_$zod.ZodEnum<{
6180
6180
  fork: "fork";
6181
+ branch: "branch";
6181
6182
  subagent: "subagent";
6182
6183
  compress: "compress";
6183
- branch: "branch";
6184
6184
  rewrite: "rewrite";
6185
6185
  coordinator: "coordinator";
6186
6186
  aside: "aside";
@@ -6670,9 +6670,9 @@ declare const SessionSchemas: {
6670
6670
  parentSessionId: _$zod.ZodString;
6671
6671
  kind: _$zod.ZodEnum<{
6672
6672
  fork: "fork";
6673
+ branch: "branch";
6673
6674
  subagent: "subagent";
6674
6675
  compress: "compress";
6675
- branch: "branch";
6676
6676
  rewrite: "rewrite";
6677
6677
  coordinator: "coordinator";
6678
6678
  aside: "aside";
@@ -6800,8 +6800,8 @@ declare const SessionSchemas: {
6800
6800
  lastActivityAt: _$zod.ZodNumber;
6801
6801
  }, _$zod_v4_core0.$strip>>;
6802
6802
  status: _$zod.ZodEnum<{
6803
- closed: "closed";
6804
6803
  discovered: "discovered";
6804
+ closed: "closed";
6805
6805
  active: "active";
6806
6806
  archived: "archived";
6807
6807
  }>;
@@ -6815,9 +6815,9 @@ declare const SessionSchemas: {
6815
6815
  forkPointMessageId: _$zod.ZodOptional<_$zod.ZodString>;
6816
6816
  branchKind: _$zod.ZodOptional<_$zod.ZodEnum<{
6817
6817
  fork: "fork";
6818
+ branch: "branch";
6818
6819
  subagent: "subagent";
6819
6820
  compress: "compress";
6820
- branch: "branch";
6821
6821
  rewrite: "rewrite";
6822
6822
  coordinator: "coordinator";
6823
6823
  aside: "aside";
@@ -7307,9 +7307,9 @@ declare const SessionSchemas: {
7307
7307
  parentSessionId: _$zod.ZodString;
7308
7308
  kind: _$zod.ZodEnum<{
7309
7309
  fork: "fork";
7310
+ branch: "branch";
7310
7311
  subagent: "subagent";
7311
7312
  compress: "compress";
7312
- branch: "branch";
7313
7313
  rewrite: "rewrite";
7314
7314
  coordinator: "coordinator";
7315
7315
  aside: "aside";
@@ -7821,9 +7821,9 @@ declare const SessionSchemas: {
7821
7821
  parentSessionId: _$zod.ZodString;
7822
7822
  kind: _$zod.ZodEnum<{
7823
7823
  fork: "fork";
7824
+ branch: "branch";
7824
7825
  subagent: "subagent";
7825
7826
  compress: "compress";
7826
- branch: "branch";
7827
7827
  rewrite: "rewrite";
7828
7828
  coordinator: "coordinator";
7829
7829
  aside: "aside";
@@ -7904,8 +7904,8 @@ declare const SessionSchemas: {
7904
7904
  request: _$zod.ZodObject<{
7905
7905
  status: _$zod.ZodOptional<_$zod.ZodEnum<{
7906
7906
  all: "all";
7907
- closed: "closed";
7908
7907
  discovered: "discovered";
7908
+ closed: "closed";
7909
7909
  active: "active";
7910
7910
  archived: "archived";
7911
7911
  }>>;
@@ -7952,8 +7952,8 @@ declare const SessionSchemas: {
7952
7952
  lastActivityAt: _$zod.ZodNumber;
7953
7953
  }, _$zod_v4_core0.$strip>>;
7954
7954
  status: _$zod.ZodEnum<{
7955
- closed: "closed";
7956
7955
  discovered: "discovered";
7956
+ closed: "closed";
7957
7957
  active: "active";
7958
7958
  archived: "archived";
7959
7959
  }>;
@@ -7967,9 +7967,9 @@ declare const SessionSchemas: {
7967
7967
  forkPointMessageId: _$zod.ZodOptional<_$zod.ZodString>;
7968
7968
  branchKind: _$zod.ZodOptional<_$zod.ZodEnum<{
7969
7969
  fork: "fork";
7970
+ branch: "branch";
7970
7971
  subagent: "subagent";
7971
7972
  compress: "compress";
7972
- branch: "branch";
7973
7973
  rewrite: "rewrite";
7974
7974
  coordinator: "coordinator";
7975
7975
  aside: "aside";
@@ -8045,8 +8045,8 @@ declare const SessionSchemas: {
8045
8045
  limit: _$zod.ZodOptional<_$zod.ZodNumber>;
8046
8046
  status: _$zod.ZodOptional<_$zod.ZodEnum<{
8047
8047
  all: "all";
8048
- closed: "closed";
8049
8048
  discovered: "discovered";
8049
+ closed: "closed";
8050
8050
  active: "active";
8051
8051
  archived: "archived";
8052
8052
  }>>;
@@ -8090,8 +8090,8 @@ declare const SessionSchemas: {
8090
8090
  lastActivityAt: _$zod.ZodNumber;
8091
8091
  }, _$zod_v4_core0.$strip>>;
8092
8092
  status: _$zod.ZodEnum<{
8093
- closed: "closed";
8094
8093
  discovered: "discovered";
8094
+ closed: "closed";
8095
8095
  active: "active";
8096
8096
  archived: "archived";
8097
8097
  }>;
@@ -8105,9 +8105,9 @@ declare const SessionSchemas: {
8105
8105
  forkPointMessageId: _$zod.ZodOptional<_$zod.ZodString>;
8106
8106
  branchKind: _$zod.ZodOptional<_$zod.ZodEnum<{
8107
8107
  fork: "fork";
8108
+ branch: "branch";
8108
8109
  subagent: "subagent";
8109
8110
  compress: "compress";
8110
- branch: "branch";
8111
8111
  rewrite: "rewrite";
8112
8112
  coordinator: "coordinator";
8113
8113
  aside: "aside";
@@ -8219,8 +8219,8 @@ declare const SessionSchemas: {
8219
8219
  lastActivityAt: _$zod.ZodNumber;
8220
8220
  }, _$zod_v4_core0.$strip>>;
8221
8221
  status: _$zod.ZodEnum<{
8222
- closed: "closed";
8223
8222
  discovered: "discovered";
8223
+ closed: "closed";
8224
8224
  active: "active";
8225
8225
  archived: "archived";
8226
8226
  }>;
@@ -8234,9 +8234,9 @@ declare const SessionSchemas: {
8234
8234
  forkPointMessageId: _$zod.ZodOptional<_$zod.ZodString>;
8235
8235
  branchKind: _$zod.ZodOptional<_$zod.ZodEnum<{
8236
8236
  fork: "fork";
8237
+ branch: "branch";
8237
8238
  subagent: "subagent";
8238
8239
  compress: "compress";
8239
- branch: "branch";
8240
8240
  rewrite: "rewrite";
8241
8241
  coordinator: "coordinator";
8242
8242
  aside: "aside";
@@ -8312,9 +8312,9 @@ declare const SessionSchemas: {
8312
8312
  forkPointMessageId: _$zod.ZodOptional<_$zod.ZodString>;
8313
8313
  branchKind: _$zod.ZodOptional<_$zod.ZodEnum<{
8314
8314
  fork: "fork";
8315
+ branch: "branch";
8315
8316
  subagent: "subagent";
8316
8317
  compress: "compress";
8317
- branch: "branch";
8318
8318
  rewrite: "rewrite";
8319
8319
  coordinator: "coordinator";
8320
8320
  aside: "aside";
@@ -8462,8 +8462,8 @@ declare const SessionSchemas: {
8462
8462
  lastActivityAt: _$zod.ZodNumber;
8463
8463
  }, _$zod_v4_core0.$strip>>;
8464
8464
  status: _$zod.ZodEnum<{
8465
- closed: "closed";
8466
8465
  discovered: "discovered";
8466
+ closed: "closed";
8467
8467
  active: "active";
8468
8468
  archived: "archived";
8469
8469
  }>;
@@ -8477,9 +8477,9 @@ declare const SessionSchemas: {
8477
8477
  forkPointMessageId: _$zod.ZodOptional<_$zod.ZodString>;
8478
8478
  branchKind: _$zod.ZodOptional<_$zod.ZodEnum<{
8479
8479
  fork: "fork";
8480
+ branch: "branch";
8480
8481
  subagent: "subagent";
8481
8482
  compress: "compress";
8482
- branch: "branch";
8483
8483
  rewrite: "rewrite";
8484
8484
  coordinator: "coordinator";
8485
8485
  aside: "aside";
@@ -1,9 +1,9 @@
1
1
  import { z } from "zod";
2
+ import { DeferredPromise, TimeoutConfig, TrackedTimeoutConfig } from "@makaio/framework/utils";
2
3
  import { AuthenticationError, ExtractSubjectPayload, ExtractSubjectResponse, HandlerForSubjectDefinition, ScopedSubjectDefinition, SubjectRecord } from "@makaio/framework/core";
3
4
  import { IFilteredBus, IMakaioBus, OnOptions, ScopedBus } from "@makaio/framework/bus";
4
5
  import { AIModel, AIReasoningLevel, AIReasoningLevel as AIReasoningLevel$1, AdapterAuthBinding, AdapterAuthConstant, AdapterProviderAuth, AdapterProviderDefinitionContract, AgentSchemas, AgentSubjects, AuthCredentialRef, CacheStrategy, JsonValue, McpRuntimeSessionContext, McpSessionContext, McpToolState, Message, MessageBlock, MessageDeliveryMode, MessageDeliveryMode as MessageDeliveryMode$1, MessageInput, MessageOutcome, NativeForkDirective, ProtocolId, ProviderContext, ReasoningLevelMap as ReasoningLevelMap$1, RequestCorrelationContext, ResolvedProviderAuth, ResponseSchemaDescriptor, SendMessageResultInnerResult, SessionContext, StructuredOutputValidation, SystemPrompt, ToolListItem } from "@makaio/framework/contracts";
5
6
  import { ClientExecutionContext } from "@makaio/framework/contracts/client";
6
- import { DeferredPromise, TimeoutConfig, TrackedTimeoutConfig } from "@makaio/framework/utils";
7
7
  import { SetRequired } from "type-fest";
8
8
 
9
9
  //#region adapters/core/src/agent/session-tool-ledger.d.ts
@@ -248,6 +248,13 @@ interface MessageHandleOptions {
248
248
  * handle pair by this value.
249
249
  */
250
250
  turnId?: string;
251
+ /**
252
+ * Caller decision on provider-native session resume for this dispatch.
253
+ * When `false`, the session layer must not arm its pending start-time
254
+ * resume target for the turn this handle drives (see
255
+ * `ConnectorSendMessageOptions.useNativeResume` for the full contract).
256
+ */
257
+ useNativeResume?: boolean;
251
258
  }
252
259
  /**
253
260
  * Processing state for agent orchestration.
@@ -295,6 +302,13 @@ declare class MessageHandle {
295
302
  * this value.
296
303
  */
297
304
  readonly turnId?: string | undefined;
305
+ /**
306
+ * Caller decision on provider-native session resume for this dispatch.
307
+ * When `false`, the session layer must not arm its pending start-time
308
+ * resume target for the turn this handle drives (see
309
+ * `ConnectorSendMessageOptions.useNativeResume` for the full contract).
310
+ */
311
+ readonly useNativeResume?: boolean | undefined;
298
312
  protected readonly deferredCompletion: DeferredPromise<MessageResult>;
299
313
  protected readonly deferredAcknowledgement: DeferredPromise<boolean>;
300
314
  state: MessageState;
@@ -348,7 +362,15 @@ declare class MessageHandle {
348
362
  * this value.
349
363
  */
350
364
 
351
- turnId?: string | undefined);
365
+ turnId?: string | undefined,
366
+ /**
367
+ * Caller decision on provider-native session resume for this dispatch.
368
+ * When `false`, the session layer must not arm its pending start-time
369
+ * resume target for the turn this handle drives (see
370
+ * `ConnectorSendMessageOptions.useNativeResume` for the full contract).
371
+ */
372
+
373
+ useNativeResume?: boolean | undefined);
352
374
  /**
353
375
  * Curated message history from sessionContext
354
376
  * @returns The message history array or undefined if not set
@@ -1360,6 +1382,22 @@ interface ConnectorSendMessageOptions extends AgentSendMessageOptions {
1360
1382
  * is not surfaced as a new user message.
1361
1383
  */
1362
1384
  internalRetry?: boolean;
1385
+ /**
1386
+ * Caller decision on provider-native session resume for this dispatch.
1387
+ *
1388
+ * The turn pipeline sets this from the agent's native-resume decision. When
1389
+ * `false`, the connector MUST NOT arm its pending start-time resume target
1390
+ * (`resumeAdapterSessionId`) for this dispatch: the caller has replaced the
1391
+ * provider thread with injected `messageHistory`, so natively resuming would
1392
+ * double the conversation context. Honoring connectors discard the
1393
+ * unconsumed resume target and mint a fresh provider session instead.
1394
+ *
1395
+ * When `true` or absent, the connector applies its default resume behavior.
1396
+ * The flag never affects a connector's continuity of its own
1397
+ * provider-confirmed session (intra-generation multi-turn), and it does not
1398
+ * cancel an approved `nativeFork` directive — fork is a separate contract.
1399
+ */
1400
+ useNativeResume?: boolean;
1363
1401
  }
1364
1402
  /**
1365
1403
  * Options for connector-level start operations.
@@ -1428,7 +1466,13 @@ type AgentConnectorConfigOverrides = Partial<{
1428
1466
  model: string;
1429
1467
  providerContext: ProviderContext;
1430
1468
  adapterSessionId: string;
1431
- resumeAdapterSessionId: string;
1469
+ /**
1470
+ * Provider session the replacement generation should native-resume. Key
1471
+ * presence (not value) selects this over the agent config's start-time
1472
+ * resume target, so an explicit `undefined` builds a fresh connector
1473
+ * instead of silently re-resuming a stale start directive.
1474
+ */
1475
+ resumeAdapterSessionId: string | undefined;
1432
1476
  mcpSessionContext: McpRuntimeSessionContext | McpSessionContext | LedgerSessionContext;
1433
1477
  /**
1434
1478
  * Target reasoning effort for the replacement generation. Key presence (not