@makaio/framework 1.0.0-dev-1783977266352 → 1.0.0-dev-1784154668798

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 (326) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/adapters/claude/index.d.mts +8192 -0
  3. package/dist/adapters/claude/index.mjs +3 -0
  4. package/dist/adapters/claude/testing.d.mts +17 -0
  5. package/dist/adapters/claude/testing.mjs +1 -0
  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 +2 -2
  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-CGjnoyCC.mjs → artifact-Dnpy5ei_.mjs} +1 -1
  13. package/dist/{authority-state-bootstrap-CEuKScnL.mjs → authority-state-bootstrap-BlbmQ9A5.mjs} +1 -1
  14. package/dist/bus/index.mjs +1 -1
  15. package/dist/clients/index.d.mts +1 -1
  16. package/dist/clients/index.mjs +1 -1
  17. package/dist/clients/managed-install.d.mts +1 -1
  18. package/dist/clients/managed-install.mjs +1 -1
  19. package/dist/context-resolution-D5jHK1w-.d.mts +1268 -0
  20. package/dist/contracts/adapter/index.d.mts +2 -2
  21. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  22. package/dist/contracts/artifact/index.d.mts +2 -1
  23. package/dist/contracts/artifact/index.mjs +1 -1
  24. package/dist/contracts/auth/index.d.mts +2 -2
  25. package/dist/contracts/canonical-model/index.d.mts +1 -1
  26. package/dist/contracts/client/index.d.mts +2 -2
  27. package/dist/contracts/common/index.d.mts +1 -1
  28. package/dist/contracts/config/index.d.mts +1 -1
  29. package/dist/contracts/extension/index.d.mts +3 -3
  30. package/dist/contracts/facet/index.d.mts +1 -1
  31. package/dist/contracts/harness/index.d.mts +1 -1
  32. package/dist/contracts/host/index.d.mts +1 -1
  33. package/dist/contracts/index.d.mts +68 -68
  34. package/dist/contracts/index.mjs +1 -1
  35. package/dist/contracts/materialization/index.d.mts +4 -4
  36. package/dist/contracts/materialization/index.mjs +1 -1
  37. package/dist/contracts/model-registry/index.d.mts +1 -1
  38. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  39. package/dist/contracts/platform/index.d.mts +1 -1
  40. package/dist/contracts/provider/index.d.mts +2 -2
  41. package/dist/contracts/session/index.d.mts +2 -2
  42. package/dist/contracts/shared/index.d.mts +2 -2
  43. package/dist/contracts/skill/index.d.mts +1 -1
  44. package/dist/contracts/telemetry/index.d.mts +1 -1
  45. package/dist/contracts/timeout/index.d.mts +1 -1
  46. package/dist/contracts/variant/index.d.mts +1 -1
  47. package/dist/contracts/workflow/index.d.mts +2 -2
  48. package/dist/contracts/workflow/index.mjs +1 -1
  49. package/dist/{detached-extension-handle-vDK194QV.mjs → detached-extension-handle-BVM-Ic-4.mjs} +1 -1
  50. package/dist/{filesystem-service-maY_P3yA.mjs → filesystem-service-qR9Zy5-r.mjs} +1 -1
  51. package/dist/git/index.mjs +1 -1
  52. package/dist/{globby-CisClzat.mjs → globby-DE358g5u.mjs} +1 -1
  53. package/dist/{index-C6LZOiDv.d.mts → index-B96HlWaM.d.mts} +1 -1
  54. package/dist/{index-BrAp9ntB.d.mts → index-BM7u_OTo.d.mts} +35 -35
  55. package/dist/{index-DMQlLz2W.d.mts → index-BPBSMsc8.d.mts} +15 -15
  56. package/dist/{index-j2YlW_Fc.d.mts → index-B_KmL_z8.d.mts} +1 -1
  57. package/dist/{index-CSxfU0tB.d.mts → index-BdsuBxEz.d.mts} +4 -4
  58. package/dist/{index-MTvmxwiu2.d.mts → index-CSyR9Fie2.d.mts} +3 -3
  59. package/dist/{index-CagRgpXI2.d.mts → index-ChB3K_a12.d.mts} +1 -1
  60. package/dist/{index-Cx8jGKOs.d.mts → index-CrbFA2kp.d.mts} +4 -4
  61. package/dist/{index-BxuiHVFi.d.mts → index-DA5S_dj8.d.mts} +1 -1
  62. package/dist/{index-2PsDAhPN.d.mts → index-DE29b4QM.d.mts} +8 -8
  63. package/dist/{index-BXWTilGs.d.mts → index-DHejCnq8.d.mts} +3 -3
  64. package/dist/{index-Cq6rXKae.d.mts → index-D_lLZ2dU.d.mts} +3 -3
  65. package/dist/{index-D3Eek6kd.d.mts → index-DoJRv-c3.d.mts} +230 -1116
  66. package/dist/{index-D75FnT0B.d.mts → index-TWs1TQ2-.d.mts} +1 -1
  67. package/dist/index-XzetMf0e.d.mts +817 -0
  68. package/dist/{index-CHjKP5G0.d.mts → index-ZGPSCZdC.d.mts} +23 -10
  69. package/dist/kernel/cli/index.d.mts +2 -2
  70. package/dist/kernel/cli/register.d.mts +1 -1
  71. package/dist/kernel/extension/index.d.mts +1 -1
  72. package/dist/kernel/index.d.mts +5 -5
  73. package/dist/kernel/namespace/index.d.mts +1 -1
  74. package/dist/kernel/observability/index.d.mts +1 -1
  75. package/dist/kernel/providers/index.d.mts +1 -1
  76. package/dist/kernel/window/index.d.mts +1 -1
  77. package/dist/{lib-DktBDEoY.mjs → lib-6P8_sBCe.mjs} +1 -1
  78. package/dist/{lib-DIVnpS8e.mjs → lib-DhbCgfYD.mjs} +1 -1
  79. package/dist/{load-extensions-nqL5WAKj.mjs → load-extensions-5VckHXuw.mjs} +1 -1
  80. package/dist/{load-extensions-_EnedkUp.d.mts → load-extensions-jGQgvw6Z.d.mts} +1 -1
  81. package/dist/materialization-BBxXhthv.mjs +1 -0
  82. package/dist/mcp-http-server/index.mjs +1 -1
  83. package/dist/node/bus-server/index.d.mts +1 -1
  84. package/dist/node/bus-server/index.mjs +1 -1
  85. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  86. package/dist/node/bus-server/server-lifecycle.mjs +1 -1
  87. package/dist/{package-CsFFT9iR.mjs → package-Brt4dhRC.mjs} +1 -1
  88. package/dist/package.json +1 -1
  89. package/dist/packages-BBJsifai.d.mts +532 -0
  90. package/dist/packages-I0D3JP9L.mjs +1 -0
  91. package/dist/rules/index.d.mts +1 -1
  92. package/dist/rules/index.mjs +1 -1
  93. package/dist/rules/schemas.d.mts +1 -1
  94. package/dist/runtime-bun/index.mjs +1 -1
  95. package/dist/runtime-node/extension-discovery.d.mts +1 -1
  96. package/dist/runtime-node/extension-validation.d.mts +1 -1
  97. package/dist/runtime-node/extension-validation.mjs +1 -1
  98. package/dist/runtime-node/index.d.mts +3 -3
  99. package/dist/runtime-node/index.mjs +23 -23
  100. package/dist/runtime-node/makaio-config.d.mts +1 -1
  101. package/dist/runtime-node/makaio-config.mjs +1 -1
  102. package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
  103. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  104. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  105. package/dist/schemas-6H-dlMrB.mjs +1 -0
  106. package/dist/services/adapter-runtime/index.d.mts +3 -3
  107. package/dist/services/adapter-runtime/index.mjs +1 -1
  108. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  109. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  110. package/dist/services/adapter-subsystem/index.d.mts +3 -3
  111. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  112. package/dist/services/agent-runtime/index.d.mts +2 -2
  113. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  114. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  115. package/dist/services/capability/index.d.mts +1 -1
  116. package/dist/services/capability/index.mjs +1 -1
  117. package/dist/services/codebase/index.d.mts +2 -2
  118. package/dist/services/codebase/namespace.d.mts +1 -1
  119. package/dist/services/codebase/schemas.d.mts +1 -1
  120. package/dist/services/compression/index.d.mts +2 -2
  121. package/dist/services/compression/namespace.d.mts +1 -1
  122. package/dist/services/compression/schemas.d.mts +1 -1
  123. package/dist/services/context-rules/index.d.mts +4 -4
  124. package/dist/services/context-rules/index.mjs +1 -1
  125. package/dist/services/execution-target/index.d.mts +3 -3
  126. package/dist/services/execution-target/index.mjs +1 -1
  127. package/dist/services/execution-target/namespace.d.mts +1 -1
  128. package/dist/services/execution-target/schemas.d.mts +1 -1
  129. package/dist/services/filesystem/index.d.mts +1 -1
  130. package/dist/services/filesystem/index.mjs +1 -1
  131. package/dist/services/git/namespace.d.mts +2 -2
  132. package/dist/services/git/namespace.mjs +1 -1
  133. package/dist/services/git/schemas.d.mts +1 -1
  134. package/dist/services/git/schemas.mjs +1 -1
  135. package/dist/services/harness/index.d.mts +3 -3
  136. package/dist/services/harness/index.mjs +1 -1
  137. package/dist/services/index.d.mts +46 -295
  138. package/dist/services/index.mjs +1 -1
  139. package/dist/services/log-import/browser.d.mts +2 -2
  140. package/dist/services/log-import/index.d.mts +2 -2
  141. package/dist/services/log-import/log-import.d.mts +1 -1
  142. package/dist/services/log-import/log-import.mjs +1 -1
  143. package/dist/services/log-import/namespace.mjs +1 -1
  144. package/dist/services/log-import/schemas.mjs +1 -1
  145. package/dist/services/materialization/index.d.mts +76 -0
  146. package/dist/services/materialization/index.mjs +1 -0
  147. package/dist/services/model-registry/index.d.mts +1 -1
  148. package/dist/services/model-registry/index.mjs +1 -1
  149. package/dist/services/preferences/index.d.mts +2 -2
  150. package/dist/services/preferences/schemas.d.mts +1 -1
  151. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  152. package/dist/services/provider-context/index.d.mts +1 -1
  153. package/dist/services/provider-runtime/index.mjs +1 -1
  154. package/dist/services/session/handlers/index.d.mts +1 -1
  155. package/dist/services/session/index.d.mts +9 -9
  156. package/dist/services/session/messages/namespace.d.mts +1 -1
  157. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  158. package/dist/services/session/orchestrator-testing/index.mjs +1 -1
  159. package/dist/services/session/session-events/namespace.d.mts +1 -1
  160. package/dist/services/session/storage/namespace.d.mts +1 -1
  161. package/dist/services/session/storage/schema.d.mts +1 -1
  162. package/dist/services/session/testing/index.mjs +1 -1
  163. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  164. package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
  165. package/dist/services/session/turns/namespace.d.mts +1 -1
  166. package/dist/services/session-editor/index.d.mts +1 -1
  167. package/dist/services/settings/index.d.mts +3 -3
  168. package/dist/services/settings/namespace.mjs +1 -1
  169. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  170. package/dist/services/settings/storage/index.d.mts +3 -3
  171. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  172. package/dist/services/subagent/index.d.mts +1 -1
  173. package/dist/services/subagent/index.mjs +1 -1
  174. package/dist/services/subagent-template/index.d.mts +2 -2
  175. package/dist/services/subagent-template/namespace.d.mts +1 -1
  176. package/dist/services/subagent-template/schemas.d.mts +1 -1
  177. package/dist/services/tool-approval/index.d.mts +1 -1
  178. package/dist/services/tool-approval/index.mjs +1 -1
  179. package/dist/services/tools/index.d.mts +1 -1
  180. package/dist/services/tools/index.mjs +1 -1
  181. package/dist/services/tray-menu/index.d.mts +3 -3
  182. package/dist/services/tray-menu/index.mjs +1 -1
  183. package/dist/services/tray-menu/namespace.d.mts +1 -1
  184. package/dist/services/tray-menu/schemas.d.mts +1 -1
  185. package/dist/services/turn/index.d.mts +1 -1
  186. package/dist/services/turn/namespace.d.mts +1 -1
  187. package/dist/{session-lineage-YShrn77v.d.mts → session-lineage-CWlcOKBZ.d.mts} +1 -1
  188. package/dist/{src-Bo2eA51B.mjs → src-T5DtFSyU.mjs} +1 -1
  189. package/dist/storage/drizzle/client.d.mts +1 -1
  190. package/dist/storage/drizzle/client.mjs +1 -1
  191. package/dist/storage/drizzle/index.d.mts +1 -1
  192. package/dist/storage/drizzle/index.mjs +1 -1
  193. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  194. package/dist/storage/handlers/drizzle/index.mjs +1 -1
  195. package/dist/storage/handlers/index.d.mts +1 -1
  196. package/dist/storage/handlers/index.mjs +1 -1
  197. package/dist/tools-CWSuNk-M.mjs +1 -0
  198. package/dist/{transition-DjipYcC3.d.mts → transition-CukPcOG5.d.mts} +2 -2
  199. package/dist/{types-B-xY9WW2.d.mts → types-Be7wY1De.d.mts} +1 -1
  200. package/dist/{types-DQsYUZwa.d.mts → types-DiZJnwN0.d.mts} +2 -2
  201. package/dist/ui-components/index.d.mts +4 -4
  202. package/dist/ui-kernel/index.d.mts +1 -1
  203. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  204. package/dist/utils/index.d.mts +20 -1
  205. package/dist/utils/index.mjs +2 -2
  206. package/dist/view-builder-DQiA4wDH.d.mts +618 -0
  207. package/dist/{workflow-DFJYGjq_.mjs → workflow-DPeE6-Ta.mjs} +1 -1
  208. package/dist/workflow-engine/index.d.mts +25 -25
  209. package/dist/workflow-engine/index.mjs +1 -1
  210. package/dist/workflow-engine/package.d.mts +1 -1
  211. package/dist/workflow-engine/package.mjs +1 -1
  212. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  213. package/dist/{workflow-worker-BEFjCccX.mjs → workflow-worker-CPCh68Qf.mjs} +1 -1
  214. package/package.json +10 -2
  215. package/dist/definition-D7qCBmtc.d.mts +0 -60
  216. package/dist/index-CidblQAY.d.mts +0 -355
  217. package/dist/materialization-BwTORtBr.mjs +0 -1
  218. package/dist/schemas-DlCdlCEF.d.mts +0 -153
  219. package/dist/schemas-DlrQ0227.mjs +0 -1
  220. package/dist/tools-PC_L6g2m.mjs +0 -1
  221. /package/dist/{adapter-auth-runtime-a4O7cSNP.mjs → adapter-auth-runtime-CotG_6M4.mjs} +0 -0
  222. /package/dist/{adapter-binding-DDUyv1JK.d.mts → adapter-binding-DQ1HrGcH.d.mts} +0 -0
  223. /package/dist/{ajv-DfHhgdS5.mjs → ajv-WvFKnw8d.mjs} +0 -0
  224. /package/dist/{await-trigger-DP-fTQc4.mjs → await-trigger-COHFNyNi.mjs} +0 -0
  225. /package/dist/{base-orchestrator-BiShpVKL.d.mts → base-orchestrator-p3zIcnaJ.d.mts} +0 -0
  226. /package/dist/{capability-service-Dg2bU8qc.mjs → capability-service-TCOwWrLi.mjs} +0 -0
  227. /package/dist/{client-DmJwprw1.d.mts → client-CGEyBWKl.d.mts} +0 -0
  228. /package/dist/{client-binary-version-verifier-BK_vIjIo.mjs → client-binary-version-verifier-CaFlNNjs.mjs} +0 -0
  229. /package/dist/{client-binary-version-verifier-BwrMTAh2.d.mts → client-binary-version-verifier-WsNRplFB.d.mts} +0 -0
  230. /package/dist/{clients-namespace-B96QIJOs.d.mts → clients-namespace-ClKm1GLT.d.mts} +0 -0
  231. /package/dist/{config-namespace-x0fuhEXe.d.mts → config-namespace-DOw8R5eb.d.mts} +0 -0
  232. /package/dist/{create-static-mount-CBTXRtbN.mjs → create-static-mount-DM9qO98Q.mjs} +0 -0
  233. /package/dist/{cross-spawn-D9WWFl2a.mjs → cross-spawn-CVfmnMVP.mjs} +0 -0
  234. /package/dist/{cursor-storage-Bw-7ROzx.mjs → cursor-storage-BoFVjVGq.mjs} +0 -0
  235. /package/dist/{definition-BsTlOz99.d.mts → definition-BZrouYAq.d.mts} +0 -0
  236. /package/dist/{definition-Cbl0k6Fc.d.mts → definition-ClKlXenJ.d.mts} +0 -0
  237. /package/dist/{descriptor-to-package-Rs-OjOQU.mjs → descriptor-to-package-DCwvJoUE.mjs} +0 -0
  238. /package/dist/{drizzle-DYfaDzlO.mjs → drizzle-BQDvlDL2.mjs} +0 -0
  239. /package/dist/{esm-C_WW4-pP.mjs → esm-1UzF2r1U.mjs} +0 -0
  240. /package/dist/{event-DTM0-qWP.mjs → event-Ddxe4yp9.mjs} +0 -0
  241. /package/dist/{execution-target-Bg2wpfML.mjs → execution-target-D6PoGaO8.mjs} +0 -0
  242. /package/dist/{extension-discovery-APMf1Tes.d.mts → extension-discovery-Cce4FmRu.d.mts} +0 -0
  243. /package/dist/{filesystem-service-Bx0bR2Lb.d.mts → filesystem-service-CWBzOEAA.d.mts} +0 -0
  244. /package/dist/{handler-4pKQi3eo.mjs → handler-Bxs0moLY.mjs} +0 -0
  245. /package/dist/{identity-2qUT1NME.mjs → identity-D481xSkS.mjs} +0 -0
  246. /package/dist/{index-FDyqQIt5.d.mts → index-4b-ig5Uf.d.mts} +0 -0
  247. /package/dist/{index-Bv9lm0Kf.d.mts → index-BOlzcjwS.d.mts} +0 -0
  248. /package/dist/{index-S-mAqWwq.d.mts → index-BRdPSBFH2.d.mts} +0 -0
  249. /package/dist/{index-BmsPH78f2.d.mts → index-BcqWLD6J.d.mts} +0 -0
  250. /package/dist/{index-DmuGKvE2.d.mts → index-BfNfKh4y.d.mts} +0 -0
  251. /package/dist/{index-DpZbaS7y.d.mts → index-BoCL9IHT.d.mts} +0 -0
  252. /package/dist/{index-CarbJsC92.d.mts → index-BrvsExEF.d.mts} +0 -0
  253. /package/dist/{index-D0eUQjTU2.d.mts → index-C2PHX5Em.d.mts} +0 -0
  254. /package/dist/{index-BZ_DSGnE.d.mts → index-CNS1jyBU.d.mts} +0 -0
  255. /package/dist/{index-DoLdETfR.d.mts → index-CQco6KNL.d.mts} +0 -0
  256. /package/dist/{index-C18Pn3zP.d.mts → index-ChsmMZmN.d.mts} +0 -0
  257. /package/dist/{index-DwDBa2mb.d.mts → index-D3cH5U0n.d.mts} +0 -0
  258. /package/dist/{index-T96ydgVk.d.mts → index-DAVLhzkq.d.mts} +0 -0
  259. /package/dist/{index-Bbr5LEUc.d.mts → index-DD9inq5h.d.mts} +0 -0
  260. /package/dist/{index-9dISOTLT.d.mts → index-DIAmg04s.d.mts} +0 -0
  261. /package/dist/{index-DlAfs3RD.d.mts → index-DKCFz7dL.d.mts} +0 -0
  262. /package/dist/{index-DvaPrL6C.d.mts → index-DbP0yaRw.d.mts} +0 -0
  263. /package/dist/{index-kqxUXYe7.d.mts → index-Du-AJm69.d.mts} +0 -0
  264. /package/dist/{index-DXBiCH2y.d.mts → index-Dx6P-ajY.d.mts} +0 -0
  265. /package/dist/{index-Rhcr4YNA.d.mts → index-Jec13bI-2.d.mts} +0 -0
  266. /package/dist/{index-BkAKfh4d.d.mts → index-M8rNEeH8.d.mts} +0 -0
  267. /package/dist/{index-DnWZdG6C.d.mts → index-NZ-gfUOw.d.mts} +0 -0
  268. /package/dist/{index-DfVSWBBp.d.mts → index-RtP5Mi4D.d.mts} +0 -0
  269. /package/dist/{index-_zsihEmk.d.mts → index-XLGBNeu0.d.mts} +0 -0
  270. /package/dist/{index-Bd52mmj9.d.mts → index-fFSPF7N0.d.mts} +0 -0
  271. /package/dist/{index-Ctw617Tj.d.mts → index-p1N3ZuqF.d.mts} +0 -0
  272. /package/dist/{json-value-C8duSh9X.d.mts → json-value-BsWNQQbr.d.mts} +0 -0
  273. /package/dist/{jsonl-transport-l5NPcQ_2.mjs → jsonl-transport-B70HQ9l1.mjs} +0 -0
  274. /package/dist/{lib-ClRTNIuz.mjs → lib-C_apP_9s.mjs} +0 -0
  275. /package/dist/{model-registry-C8MInDtX.mjs → model-registry-C3NX834K.mjs} +0 -0
  276. /package/dist/{namespace-HsI0Jbbr.mjs → namespace-B1_egU5J.mjs} +0 -0
  277. /package/dist/{namespace-Dar3O6iT.d.mts → namespace-BTp6-zD8.d.mts} +0 -0
  278. /package/dist/{namespace-BoA6u44C.d.mts → namespace-Bldr5X64.d.mts} +0 -0
  279. /package/dist/{namespace-TLkZRkcU.d.mts → namespace-Bogua97s.d.mts} +0 -0
  280. /package/dist/{namespace-Bl1UhLnK.d.mts → namespace-BqlDkdht2.d.mts} +0 -0
  281. /package/dist/{namespace-DoNigVgx.d.mts → namespace-BwAiuQ2_.d.mts} +0 -0
  282. /package/dist/{namespace-3YVLQ_bM.d.mts → namespace-CU1jSw6E.d.mts} +0 -0
  283. /package/dist/{namespace-CukqFYHf2.d.mts → namespace-C_phrzqu2.d.mts} +0 -0
  284. /package/dist/{namespace-BcDHt-ww.d.mts → namespace-CddQuUvG.d.mts} +0 -0
  285. /package/dist/{namespace-dgNmx9g3.d.mts → namespace-CpSZfHLv.d.mts} +0 -0
  286. /package/dist/{namespace-rO-C2Dgu2.d.mts → namespace-CzZmsumy.d.mts} +0 -0
  287. /package/dist/{namespace-BsEoWXV_.d.mts → namespace-DNgZ_rfi.d.mts} +0 -0
  288. /package/dist/{namespace-VmsT_tLJ.d.mts → namespace-Dzbt8LqQ.d.mts} +0 -0
  289. /package/dist/{namespace-Dvi66QS6.d.mts → namespace-SwgMs4rw.d.mts} +0 -0
  290. /package/dist/{namespace-BhVlHfoO.d.mts → namespace-UCwUrFRx.d.mts} +0 -0
  291. /package/dist/{namespace-Xp9-g_r-.mjs → namespace-kIjqar0Y.mjs} +0 -0
  292. /package/dist/{orchestrator-shared-pxtyNu3W.d.mts → orchestrator-shared-DrEFeZYw.d.mts} +0 -0
  293. /package/dist/{orchestrator-shared-DAkGOu9H.mjs → orchestrator-shared-jYk9mi5C.mjs} +0 -0
  294. /package/dist/{out-BB6Kb4Xu.mjs → out-B6fO6go6.mjs} +0 -0
  295. /package/dist/{package-BYpWkSuQ.mjs → package-3cW8oIkI.mjs} +0 -0
  296. /package/dist/{package-DG9GSY8M.d.mts → package-BVm1EakP.d.mts} +0 -0
  297. /package/dist/{providers-namespace-O4de1tgO.d.mts → providers-namespace-Bl3M8Ibo.d.mts} +0 -0
  298. /package/dist/{quick-lru-BLaSzINB.mjs → quick-lru-Coxb6GVa.mjs} +0 -0
  299. /package/dist/{registry-TJjQgTgp.mjs → registry-ElIHcMM2.mjs} +0 -0
  300. /package/dist/{schema-CxN7d_MU.d.mts → schema-DOPEco97.d.mts} +0 -0
  301. /package/dist/{schemas-9QJf1FtS.d.mts → schemas-B3K1ekm7.d.mts} +0 -0
  302. /package/dist/{schemas-jDRSOXJL.d.mts → schemas-BKgUDm_a2.d.mts} +0 -0
  303. /package/dist/{schemas-OaBqeEUT.d.mts → schemas-BLJ2k226.d.mts} +0 -0
  304. /package/dist/{schemas-XRhqOgVE.d.mts → schemas-CVbfHPw-.d.mts} +0 -0
  305. /package/dist/{schemas-CIO03KSD2.d.mts → schemas-Ca3BLPH5.d.mts} +0 -0
  306. /package/dist/{schemas-CLsbsX1W.d.mts → schemas-CzT0LApM.d.mts} +0 -0
  307. /package/dist/{schemas-D_9X_CRo.d.mts → schemas-DPosZWw-.d.mts} +0 -0
  308. /package/dist/{schemas-fRLDhefF.d.mts → schemas-D_H0ztxl.d.mts} +0 -0
  309. /package/dist/{schemas-qpo1Goit.d.mts → schemas-DfZ85CRF2.d.mts} +0 -0
  310. /package/dist/{schemas-K3Td_WdR.d.mts → schemas-Dq_g7Giu.d.mts} +0 -0
  311. /package/dist/{schemas-DwfTUQIa.mjs → schemas-FiDj_kLq.mjs} +0 -0
  312. /package/dist/{schemas-qt5QTjVc.d.mts → schemas-pl0mzEtO.d.mts} +0 -0
  313. /package/dist/{server-lifecycle-D-jxVr_0.mjs → server-lifecycle-DLdh0-4H.mjs} +0 -0
  314. /package/dist/{server-lifecycle-r5Tkk8bU.d.mts → server-lifecycle-DzO3rjKP.d.mts} +0 -0
  315. /package/dist/{src-Ci_WY9uw.mjs → src-Dqa1n_kI.mjs} +0 -0
  316. /package/dist/{storage-namespace-BzE2M4Hq.mjs → storage-namespace-B1_x8Ho2.mjs} +0 -0
  317. /package/dist/{storage-namespace-DWKFqEW-.d.mts → storage-namespace-D4yQ--Sp.d.mts} +0 -0
  318. /package/dist/{storage-namespace-definition-BZJGSaX3.d.mts → storage-namespace-definition-BzSaRLtZ.d.mts} +0 -0
  319. /package/dist/{supports-color-Dzp6WuF5.mjs → supports-color-CCdGjFUY.mjs} +0 -0
  320. /package/dist/{tool-approval-service-Dh0XI21f.mjs → tool-approval-service-BgSn_6NT.mjs} +0 -0
  321. /package/dist/{tray-menu-service-Bonl2KXf.mjs → tray-menu-service-BJ9r7IY3.mjs} +0 -0
  322. /package/dist/{types-BCW9kr4L.d.mts → types-B9QOZAZ5.d.mts} +0 -0
  323. /package/dist/{types-DWNoZ3Sd.d.mts → types-Bgb8eQkd.d.mts} +0 -0
  324. /package/dist/{types-DvKaEOOn.d.mts → types-C8_OhAFv.d.mts} +0 -0
  325. /package/dist/{types-CrJ7KEZ0.d.mts → types-Diu9uAnB.d.mts} +0 -0
  326. /package/dist/{window-registry-WsWu-rcK.d.mts → window-registry-CHv3cgSN.d.mts} +0 -0
@@ -0,0 +1,532 @@
1
+ import { IMakaioBus } from "@makaio/framework/bus";
2
+ import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
3
+ import { ArtifactKindRegistration, ArtifactProjectionPolicy, ArtifactViewAffordanceRequest, ArtifactViewLevel, ExtensionServiceLifecycle, MakaioNodeExtension, RelationTypeRegistration } from "@makaio/framework/contracts";
4
+ import { BaseService } from "@makaio/framework/service-base";
5
+ import { ArtifactViewBuilder, SurfaceBindingRegistration } from "@makaio/framework/contracts/materialization";
6
+
7
+ //#region services/core/src/artifact/artifact-schema-registry.d.ts
8
+ /**
9
+ * Identifies the provenance tier of a kind contributor.
10
+ *
11
+ * - `'extension'` — registered by a runtime extension; highest priority
12
+ * - `'factory-repo'` — declared in a factory-owned repository; medium priority
13
+ * - `'target-repo'` — declared in a target/application repository; lowest priority
14
+ */
15
+ type ArtifactKindRegistrationSource = 'extension' | 'factory-repo' | 'target-repo';
16
+ /**
17
+ * Identifies the entity that owns a batch of kind registrations.
18
+ *
19
+ * `ownerKey` is an opaque, owner-defined string that uniquely distinguishes
20
+ * one owner from all others at the same source tier (e.g. the extension
21
+ * name, or the repository slug).
22
+ */
23
+ interface ArtifactKindRegistrationOwner {
24
+ /** Provenance tier of the contributing entity. */
25
+ readonly source: ArtifactKindRegistrationSource;
26
+ /** Stable identifier for this specific owner within its source tier. */
27
+ readonly ownerKey: string;
28
+ }
29
+ /**
30
+ * In-process registry for artifact kind definitions and relation type vocabulary.
31
+ *
32
+ * Exposes bus RPCs for kind and relation-type registration and listing, and
33
+ * emits `artifact.kind.changed` events when a kind registration is stored,
34
+ * updated, or removed. Core relation vocabulary is seeded during `init()`.
35
+ *
36
+ * Extensions register artifact kinds through this service directly or via
37
+ * {@link ArtifactSubjects}; the registry rejects conflicting duplicate
38
+ * relation type definitions.
39
+ *
40
+ * ### Ownership and priority
41
+ *
42
+ * Each kind slot may have multiple contributing owners. The active registration
43
+ * is the one from the highest-priority owner. Priority order (highest → lowest):
44
+ * `extension` → `factory-repo` → `target-repo`.
45
+ *
46
+ * Within the `extension` tier, the most recently registered owner wins (LIFO).
47
+ * Within `factory-repo` and `target-repo`, the first registration wins (FIFO),
48
+ * and a same-tier duplicate from a different owner is rejected with a warning.
49
+ *
50
+ * When the winning owner deregisters, the next-highest owner automatically
51
+ * becomes active without requiring a re-registration.
52
+ */
53
+ declare class ArtifactSchemaRegistry extends BaseService {
54
+ /**
55
+ * Winner cache: the currently active registration for each kind key.
56
+ * Kept in sync with `kindContributions` via `recomputeKindWinner`.
57
+ */
58
+ private readonly kinds;
59
+ /**
60
+ * All contributions indexed by `kindKey → ownerId → contribution`.
61
+ * The winner cache is derived from this map.
62
+ */
63
+ private readonly kindContributions;
64
+ /** Monotone counter for contribution insertion order. */
65
+ private nextKindContributionOrder;
66
+ private readonly relationTypes;
67
+ /**
68
+ * @param bus - Bus instance used for handler registration and event emission.
69
+ */
70
+ constructor(bus: IMakaioBus);
71
+ /**
72
+ * Service initialisation hook.
73
+ *
74
+ * Seeds core relation vocabulary and registers bus handlers for the
75
+ * artifact kind and relation-type RPCs.
76
+ */
77
+ protected onInit(): Promise<void>;
78
+ /**
79
+ * Compares two contributions to determine their relative priority.
80
+ *
81
+ * Returns a negative number when `a` should rank above `b` (win), positive
82
+ * when `b` should rank above `a`, and zero when they are equivalent.
83
+ *
84
+ * Within the `extension` tier, the most recently registered contribution
85
+ * wins (descending order). For all other tiers, the earliest registration
86
+ * wins (ascending order).
87
+ * @param a - First contribution.
88
+ * @param b - Second contribution.
89
+ * @returns Sort comparator value.
90
+ */
91
+ private compareKindContributions;
92
+ /**
93
+ * Find an existing same-tier repo contribution that owns a kind slot.
94
+ *
95
+ * Repo-sourced kinds are first-wins within their tier; this helper keeps
96
+ * single registration and owner-batch replacement on the same collision rule.
97
+ * @param contributions - Current contributions for the kind slot.
98
+ * @param owner - Candidate owner being registered.
99
+ * @param candidateOrder - Ordering value the candidate would retain or receive.
100
+ * @returns Conflicting contribution, or `undefined` when the candidate can register.
101
+ */
102
+ private findSameTierRepoConflict;
103
+ /**
104
+ * Recomputes the winner for a kind slot from its current contributions and
105
+ * emits a `kind.changed` event when the active registration changes.
106
+ * @param key - Composite kind key produced by {@link kindKey}.
107
+ */
108
+ private recomputeKindWinner;
109
+ /**
110
+ * Emits a `kind.changed` event derived from a composite key, but only
111
+ * when there was a previous registration to signal the change against.
112
+ * @param key - Composite kind key produced by {@link kindKey}.
113
+ * @param previous - The registration that was previously active, if any.
114
+ */
115
+ private emitKindChangedFromKey;
116
+ /**
117
+ * Store a kind registration attributed to `owner`, applying source-priority
118
+ * resolution when multiple owners contribute the same kind slot.
119
+ *
120
+ * Bus RPC registrations (without an explicit owner) are attributed to
121
+ * {@link EXTENSION_BUS_OWNER} and treated as extension-tier contributions.
122
+ *
123
+ * Same-tier repo conflicts (two distinct factory-repo or target-repo owners
124
+ * for the same slot) are rejected with a console warning; the first owner
125
+ * registered at that tier retains ownership.
126
+ * @param registration - Kind registration payload.
127
+ * @param owner - Owner identity. Defaults to the extension bus owner.
128
+ */
129
+ registerKind(registration: ArtifactKindRegistration, owner?: ArtifactKindRegistrationOwner): void;
130
+ /**
131
+ * Remove a kind registration by `kind + schemaVersion` for the given owner.
132
+ *
133
+ * If the deregistered owner was the active winner, the next-highest owner
134
+ * automatically becomes active. Bus RPC callers without an explicit owner
135
+ * are attributed to {@link EXTENSION_BUS_OWNER}.
136
+ * @param kind - Kind discriminator string.
137
+ * @param schemaVersion - Schema version string.
138
+ * @param owner - Owner identity. Defaults to the extension bus owner.
139
+ */
140
+ deregisterKind(kind: string, schemaVersion: string, owner?: ArtifactKindRegistrationOwner): void;
141
+ /**
142
+ * Atomically replace all kind registrations for a single owner.
143
+ *
144
+ * All existing contributions from `owner` are removed across every kind
145
+ * slot before the new registrations are applied. Kind slots affected by
146
+ * the replacement recompute their winner after all changes are applied.
147
+ *
148
+ * Other owners' contributions are unaffected.
149
+ * @param owner - The owner whose registrations are being replaced.
150
+ * @param registrations - The new set of kind registrations for this owner.
151
+ */
152
+ replaceKindRegistrationsForOwner(owner: ArtifactKindRegistrationOwner, registrations: readonly ArtifactKindRegistration[]): void;
153
+ /**
154
+ * Store a relation type registration.
155
+ *
156
+ * An identical re-registration (same type and symmetry) is silently accepted.
157
+ * A registration that differs only in symmetry is rejected with an error.
158
+ * @param registration - Relation type registration payload received from the bus RPC.
159
+ * @throws If a conflicting registration for the same type already exists.
160
+ */
161
+ private storeRelationType;
162
+ /**
163
+ * Look up a kind registration by kind string and schema version.
164
+ * @param kind - Kind discriminator string.
165
+ * @param schemaVersion - Schema version string.
166
+ * @returns The registration record, or `undefined` if not found.
167
+ */
168
+ getKind(kind: string, schemaVersion: string): ArtifactKindRegistration | undefined;
169
+ /**
170
+ * Look up a relation type registration by type string.
171
+ * @param type - Relation type string.
172
+ * @returns The registration record, or `undefined` if not found.
173
+ */
174
+ getRelationType(type: string): RelationTypeRegistration | undefined;
175
+ /**
176
+ * Service teardown hook.
177
+ *
178
+ * Clears all in-memory registrations so the instance can be garbage-collected
179
+ * without retaining large schema maps.
180
+ */
181
+ protected onDestroy(): void;
182
+ }
183
+ //#endregion
184
+ //#region services/core/src/materialization/artifact-view-builder-registry.d.ts
185
+ /**
186
+ * Thrown when a builder replacement would introduce a key collision across
187
+ * owners, or when an owner's incoming builder set contains duplicate keys.
188
+ */
189
+ declare class ArtifactViewBuilderCollisionError extends Error {
190
+ readonly key: string;
191
+ readonly incomingOwner: string;
192
+ readonly existingOwner: string;
193
+ /**
194
+ * @param key - The colliding canonical key.
195
+ * @param incomingOwner - Owner attempting the registration.
196
+ * @param existingOwner - Owner that already holds the key (may equal
197
+ * `incomingOwner` for intra-owner duplicates).
198
+ */
199
+ constructor(key: string, incomingOwner: string, existingOwner: string);
200
+ }
201
+ /**
202
+ * In-process, owner-scoped registry for live artifact view builders.
203
+ *
204
+ * Maintains a per-owner builder list and a global index keyed by
205
+ * `kind + schemaVersion`. All mutations go through
206
+ * {@link replaceBuildersForOwner}, which atomically validates the
207
+ * incoming set, constructs a candidate global index, rejects cross-owner
208
+ * collisions, and swaps state only after the full candidate validates.
209
+ *
210
+ * The registry does not extend `BaseService` because it requires no bus
211
+ * handlers. It implements {@link ExtensionServiceLifecycle} directly so the
212
+ * extension coordinator can manage it: no `init` work is needed and
213
+ * `destroy` clears all registrations.
214
+ */
215
+ declare class ArtifactViewBuilderRegistry implements ExtensionServiceLifecycle {
216
+ /**
217
+ * Per-owner builder lists. Each entry is the authoritative set of
218
+ * builders contributed by that owner. Values are detached, frozen
219
+ * copies of the caller-supplied registrations.
220
+ */
221
+ private readonly owners;
222
+ /**
223
+ * Global index from canonical key to `{ owner, builder }`. Rebuilt
224
+ * atomically on every {@link replaceBuildersForOwner} or
225
+ * {@link removeBuildersForOwner} call.
226
+ */
227
+ private globalIndex;
228
+ /**
229
+ * Look up a builder by exact `kind + schemaVersion`.
230
+ * @param kind - Artifact kind discriminator.
231
+ * @param schemaVersion - Artifact schema version.
232
+ * @returns The matching builder, or `undefined` if none is registered.
233
+ */
234
+ getBuilder(kind: string, schemaVersion: string): ArtifactViewBuilder<string> | undefined;
235
+ /**
236
+ * Atomically replace all builders for a given owner.
237
+ *
238
+ * Validation steps:
239
+ * 1. Every builder must have a positive integer `version`.
240
+ * 2. The incoming set must not contain duplicate keys.
241
+ * 3. The candidate global index must not have cross-owner collisions.
242
+ *
243
+ * If any step fails, state is unchanged and the error is thrown.
244
+ *
245
+ * The registry stores detached, frozen copies of the contract fields, so
246
+ * mutating a caller's builder object after registration has no effect.
247
+ * Replacing with an empty set removes the owner entirely — equivalent to
248
+ * {@link removeBuildersForOwner}, so {@link getBuildersForOwner} returns
249
+ * `undefined` afterwards.
250
+ * @param ownerKey - Stable owner identifier (typically the extension name).
251
+ * @param builders - Builder registrations to install for this owner.
252
+ * @throws {@link ArtifactViewBuilderCollisionError} on duplicate or cross-owner collision.
253
+ * @throws Error on non-positive builder version.
254
+ */
255
+ replaceBuildersForOwner(ownerKey: string, builders: readonly ArtifactViewBuilder<string>[]): void;
256
+ /**
257
+ * Remove all builders registered by a given owner.
258
+ *
259
+ * After removal the global index is rebuilt from remaining owners.
260
+ * No-op if the owner has no registrations.
261
+ * @param ownerKey - Owner to remove.
262
+ */
263
+ removeBuildersForOwner(ownerKey: string): void;
264
+ /**
265
+ * Return a read-only snapshot of all builders for an owner.
266
+ *
267
+ * The returned array is detached from internal state; its entries are the
268
+ * frozen registered copies.
269
+ * @param ownerKey - Owner to query.
270
+ * @returns Builder list, or `undefined` if the owner has no registrations.
271
+ */
272
+ getBuildersForOwner(ownerKey: string): readonly ArtifactViewBuilder<string>[] | undefined;
273
+ /**
274
+ * Clear all registrations. Primarily for testing and shutdown.
275
+ */
276
+ clear(): void;
277
+ /**
278
+ * Service teardown hook.
279
+ *
280
+ * Clears all registrations so the instance can be garbage-collected
281
+ * without retaining builder maps.
282
+ */
283
+ destroy(): void;
284
+ /**
285
+ * Rebuild the global index from all current owner registrations.
286
+ *
287
+ * Called after owner removal. Cross-owner collisions are impossible at
288
+ * this point because the index was collision-free before removal.
289
+ */
290
+ private rebuildGlobalIndex;
291
+ }
292
+ //#endregion
293
+ //#region services/core/src/materialization/artifact-view-service.d.ts
294
+ /**
295
+ * Interpret the affordance truth table to determine whether a request should
296
+ * proceed to rendering.
297
+ *
298
+ * Truth table:
299
+ * - Present non-empty affordances: exact and authoritative. Only declared
300
+ * affordances match. Inline `as` (declaration policy) defaults to `full`
301
+ * when omitted, so omitted `as` matches only request level `full`.
302
+ * - Present empty affordances: render nowhere regardless of mode.
303
+ * - Absent affordances (legacy defaults based on mode):
304
+ * - `none`: no rendering.
305
+ * - `surface`: own-view at `full` level.
306
+ * - `comment`: caller-supplied inline at `summary` level (no host-relation
307
+ * validation).
308
+ * @param projection - The kind registration's projection policy, or undefined.
309
+ * @param requestAffordance - The structural affordance selector from the request.
310
+ * @param requestLevel - The top-level requested detail level.
311
+ * @returns `true` if the request should proceed to rendering.
312
+ */
313
+ declare function isAffordancePermitted(projection: ArtifactProjectionPolicy | undefined, requestAffordance: ArtifactViewAffordanceRequest, requestLevel: ArtifactViewLevel): boolean;
314
+ /**
315
+ * Framework service that resolves artifact views through the
316
+ * `materialization.artifact.view.resolve` bus RPC.
317
+ *
318
+ * Resolution flow:
319
+ * 1. Query the artifact by id via `ArtifactSubjects.query`.
320
+ * 2. Load the kind registration from the schema registry.
321
+ * 3. Interpret the affordance truth table.
322
+ * 4. Select an exact custom builder from the builder registry.
323
+ * 5. Build generic sections via `buildGenericArtifactView`.
324
+ * 6. Optionally resolve default context via `ArtifactSubjects.resolveContext`.
325
+ * 7. Dispatch the custom builder and apply its result.
326
+ * 8. Validate the final `ArtifactViewModel` via Zod parse.
327
+ * 9. Return the response with the appropriate builder version.
328
+ *
329
+ * No provider lookup, queueing, storage access, reference expansion,
330
+ * fingerprinting, or `find` operations.
331
+ */
332
+ declare class ArtifactViewService extends BaseService {
333
+ private readonly schemaRegistry;
334
+ private readonly builderRegistry;
335
+ /**
336
+ * @param bus - Bus instance for handler registration and RPC calls.
337
+ * @param schemaRegistry - Artifact schema registry for kind lookups.
338
+ * @param builderRegistry - Builder registry for custom builder dispatch.
339
+ */
340
+ constructor(bus: IMakaioBus, schemaRegistry: ArtifactSchemaRegistry, builderRegistry: ArtifactViewBuilderRegistry);
341
+ /** Register the resolve handler on the bus. */
342
+ protected onInit(): Promise<void>;
343
+ /**
344
+ * Resolve an artifact view through the affordance truth table and builder
345
+ * dispatch pipeline.
346
+ * @param ref - Stable framework artifact identity string.
347
+ * @param level - Requested detail level.
348
+ * @param affordance - Structural affordance selector.
349
+ * @param params - Optional JSON-safe runtime parameters.
350
+ * @returns Discriminated resolve response.
351
+ */
352
+ private resolve;
353
+ }
354
+ //#endregion
355
+ //#region services/core/src/materialization/surface-binding-registry.d.ts
356
+ /**
357
+ * In-process registry for surface binding definitions.
358
+ *
359
+ * Exposes bus RPCs for surface binding registration and listing, and emits
360
+ * `surfaceBinding.changed` events when a binding is stored or removed. Rejects
361
+ * conflicting duplicate registrations (same binding `id`, different
362
+ * definition). Identical re-registrations are silently accepted.
363
+ *
364
+ * Extensions register surface bindings through this service directly or via
365
+ * {@link MaterializationSubjects}; the registry rejects conflicting duplicate
366
+ * binding definitions.
367
+ */
368
+ declare class SurfaceBindingRegistry extends BaseService {
369
+ private readonly bindings;
370
+ /**
371
+ * @param bus - Bus instance used for handler registration and event emission.
372
+ */
373
+ constructor(bus: IMakaioBus);
374
+ /**
375
+ * Service initialisation hook.
376
+ *
377
+ * Registers bus handlers for the surface binding registration and listing
378
+ * RPCs.
379
+ */
380
+ protected onInit(): Promise<void>;
381
+ /**
382
+ * Store a surface binding registration, rejecting conflicting duplicates.
383
+ *
384
+ * An identical re-registration (same `id` and all fields) is silently
385
+ * accepted. A registration that differs in any field is rejected with an error.
386
+ *
387
+ * The bus RPC handler delegates here; the contribution processor also calls
388
+ * this directly.
389
+ * @param registration - Surface binding registration payload to store.
390
+ * @throws If a conflicting registration for the same binding `id` already exists.
391
+ */
392
+ registerBinding(registration: SurfaceBindingRegistration): void;
393
+ /**
394
+ * Remove a surface binding registration by stable identifier.
395
+ * @param id - Surface binding identifier to remove.
396
+ */
397
+ deregisterBinding(id: string): void;
398
+ /**
399
+ * Look up a surface binding registration by its stable identifier.
400
+ * @param id - Surface binding identifier to look up.
401
+ * @returns The registration record, or `undefined` if not found.
402
+ */
403
+ getBinding(id: string): SurfaceBindingRegistration | undefined;
404
+ /**
405
+ * Service teardown hook.
406
+ *
407
+ * Clears all in-memory registrations so the instance can be garbage-collected
408
+ * without retaining large registration maps.
409
+ */
410
+ protected onDestroy(): void;
411
+ }
412
+ //#endregion
413
+ //#region services/core/src/materialization/materialization-operation-coordinator.d.ts
414
+ /** Identifies one provider object participating in a materialization operation. */
415
+ interface MaterializationProviderObject {
416
+ readonly provider: string;
417
+ readonly externalId: string;
418
+ }
419
+ /** Provider-neutral resources protected by a materialization operation lease. */
420
+ interface MaterializationOperationScope {
421
+ readonly artifactId: string;
422
+ readonly providerObjects?: readonly MaterializationProviderObject[];
423
+ }
424
+ /** Explicit ownership handle for a materialization operation. */
425
+ interface MaterializationOperationLease {
426
+ readonly id: string;
427
+ readonly scope: MaterializationOperationScope;
428
+ }
429
+ /** Trusted origin metadata supplied by a bus request handler context. */
430
+ interface MaterializationOperationRequestOrigin {
431
+ readonly local: boolean;
432
+ }
433
+ /**
434
+ * Coordinates provider-neutral materialization operations across artifact and
435
+ * provider-object identities. Every operation takes its artifact key first,
436
+ * then deduplicated provider-object keys in lexical order.
437
+ */
438
+ declare class MaterializationOperationCoordinator {
439
+ private readonly queues;
440
+ private readonly activeLeases;
441
+ private readonly pendingAcquisitions;
442
+ private readonly authorizedRequests;
443
+ private readonly consumedAuthorizedRequestIds;
444
+ private acceptingAcquisitions;
445
+ private destroyPromise;
446
+ /**
447
+ * Extension lifecycle hook.
448
+ *
449
+ * Closes lease admission, then waits for every admitted acquisition and
450
+ * active lease to settle without interrupting operations already in flight.
451
+ * @returns Promise that resolves once all admitted leases are released.
452
+ */
453
+ destroy(): Promise<void>;
454
+ /**
455
+ * Acquire an explicit lease for a materialization scope.
456
+ * @param scope - Artifact and optional provider-object resources to lock.
457
+ * @returns Active lease handle.
458
+ */
459
+ acquire(scope: MaterializationOperationScope): Promise<MaterializationOperationLease>;
460
+ private acquireAdmitted;
461
+ /**
462
+ * Release a lease and all keys it owns.
463
+ * @param lease - Active lease to release.
464
+ */
465
+ release(lease: MaterializationOperationLease): void;
466
+ /**
467
+ * Extends a held artifact lease with provider-object keys.
468
+ *
469
+ * Provider keys must be appended in the global acquisition order; this keeps
470
+ * multi-key operations deadlock-free even when a hard delete discovers refs
471
+ * only after taking the artifact key.
472
+ * @param lease - Active artifact lease to extend.
473
+ * @param scope - Same-artifact provider-object scope to append.
474
+ */
475
+ extend(lease: MaterializationOperationLease, scope: MaterializationOperationScope): Promise<void>;
476
+ /**
477
+ * Run an operation while holding the scope lease, or consume matching local bus authorization.
478
+ * @param scope - Resources required by the operation.
479
+ * @param operation - Work to run with an active lease.
480
+ * @param messageId - Bus message ID that may carry one-shot authorization.
481
+ * @param origin - Trusted origin from the bus handler context.
482
+ * @returns Operation result.
483
+ */
484
+ runExclusive<T>(scope: MaterializationOperationScope, operation: (lease: MaterializationOperationLease) => Promise<T> | T, messageId?: string, origin?: MaterializationOperationRequestOrigin): Promise<T>;
485
+ /**
486
+ * Authorize exactly one bus request to re-enter a held lease without placing
487
+ * an internal lease identifier on the wire. The request callback must dispatch
488
+ * locally only (for example with `transports: []`).
489
+ * @param lease - Active lease that authorizes the request.
490
+ * @param scope - Scope the downstream handler must request exactly.
491
+ * @param request - Local-only request callback supplied with the generated message ID.
492
+ * @returns Downstream request result.
493
+ */
494
+ runAuthorizedRequest<T>(lease: MaterializationOperationLease, scope: MaterializationOperationScope, request: (messageId: string) => Promise<T>): Promise<T>;
495
+ private requireActiveLease;
496
+ private acquireKey;
497
+ private drain;
498
+ }
499
+ //#endregion
500
+ //#region services/core/src/materialization/packages.d.ts
501
+ /** Token for the surface binding registry service. */
502
+ declare const SurfaceBindingRegistryToken: _$_makaio_contracts0.ExtensionToken<SurfaceBindingRegistry>;
503
+ /** Token for the artifact view builder registry service. */
504
+ declare const ArtifactViewBuilderRegistryToken: _$_makaio_contracts0.ExtensionToken<ArtifactViewBuilderRegistry>;
505
+ /** Token for the artifact view resolver service. */
506
+ declare const ArtifactViewServiceToken: _$_makaio_contracts0.ExtensionToken<ArtifactViewService>;
507
+ /** Token for the materialization operation coordinator service. */
508
+ declare const MaterializationOperationCoordinatorToken: _$_makaio_contracts0.ExtensionToken<MaterializationOperationCoordinator>;
509
+ /** Package that coordinates artifact and provider-object materialization leases. */
510
+ declare const materializationOperationCoordinatorPackage: MakaioNodeExtension<IMakaioBus>;
511
+ /** Package that starts the framework surface binding registry. */
512
+ declare const surfaceBindingRegistryPackage: MakaioNodeExtension<IMakaioBus>;
513
+ /**
514
+ * Package that starts the framework artifact view builder registry.
515
+ *
516
+ * The registry is a pure in-process data structure with no bus handlers.
517
+ * It implements the extension service lifecycle directly: no `init` work is
518
+ * needed and `destroy()` clears all registrations.
519
+ */
520
+ declare const artifactViewBuilderRegistryPackage: MakaioNodeExtension<IMakaioBus>;
521
+ /**
522
+ * Package that starts the framework artifact view resolver service.
523
+ *
524
+ * Registers the `materialization.artifact.view.resolve` bus handler and
525
+ * orchestrates the affordance truth table, generic builder, custom builder
526
+ * dispatch, and Zod output validation. Depends on the artifact schema
527
+ * registry (for kind lookups) and the builder registry (for custom
528
+ * builder dispatch).
529
+ */
530
+ declare const artifactViewServicePackage: MakaioNodeExtension<IMakaioBus>;
531
+ //#endregion
532
+ export { ArtifactViewBuilderCollisionError as _, artifactViewBuilderRegistryPackage as a, surfaceBindingRegistryPackage as c, MaterializationOperationRequestOrigin as d, MaterializationOperationScope as f, isAffordancePermitted as g, ArtifactViewService as h, SurfaceBindingRegistryToken as i, MaterializationOperationCoordinator as l, SurfaceBindingRegistry as m, ArtifactViewServiceToken as n, artifactViewServicePackage as o, MaterializationProviderObject as p, MaterializationOperationCoordinatorToken as r, materializationOperationCoordinatorPackage as s, ArtifactViewBuilderRegistryToken as t, MaterializationOperationLease as u, ArtifactViewBuilderRegistry as v, ArtifactSchemaRegistry as y };
@@ -0,0 +1 @@
1
+ import{ArtifactSubjects as e,ArtifactViewModelSchema as t,MaterializationSubjects as n,dep as r,extensionToken as i}from"@makaio/framework/contracts";import{BaseService as a}from"@makaio/framework/service-base";import{canonicalStringify as o,isRecord as s}from"@makaio/framework/utils";import{MaterializationSubjects as c}from"@makaio/framework/contracts/materialization";const l=[{type:`supersedes`,symmetry:`asymmetric`},{type:`contradicts`,symmetry:`symmetric`},{type:`derives_from`,symmetry:`asymmetric`},{type:`responds_to`,symmetry:`asymmetric`},{type:`contains`,symmetry:`asymmetric`},{type:`refines`,symmetry:`asymmetric`},{type:`scopes`,symmetry:`asymmetric`},{type:`references`,symmetry:`asymmetric`},{type:`evidenced_by`,symmetry:`asymmetric`}],u={extension:0,"factory-repo":1,"target-repo":2},d={source:`extension`,ownerKey:`extension:bus`};function f(e){return`${e.source}:${e.ownerKey}`}function p(e,t){return e.source===t.source&&e.ownerKey===t.ownerKey}function m(e){return structuredClone(e)}function h(e,t){return`${e}@${t}`}var g=class extends a{kinds=new Map;kindContributions=new Map;nextKindContributionOrder=0;relationTypes=new Map;constructor(e){super(e)}async onInit(){for(let e of l)this.relationTypes.set(e.type,e);this.registerHandler(e.kind.register,e=>{this.registerKind(e.payload),e.setResult({registered:!0})}),this.registerHandler(e.kind.list,e=>{let{kind:t}=e.payload,n=[...this.kinds.values()].filter(e=>!t||e.kind===t).map(m);e.setResult({kinds:n})}),this.registerHandler(e[`relation-type`].register,e=>{this.storeRelationType(e.payload),e.setResult({registered:!0})}),this.registerHandler(e[`relation-type`].list,e=>{let{type:t}=e.payload,n=[...this.relationTypes.values()].filter(e=>!t||e.type===t).map(m);e.setResult({relationTypes:n})})}compareKindContributions(e,t){let n=u[e.owner.source]-u[t.owner.source];return n===0?e.owner.source===`extension`?t.order-e.order:e.order-t.order:n}findSameTierRepoConflict(e,t,n){return[...e.values()].find(e=>!p(e.owner,t)&&e.owner.source===t.source&&t.source!==`extension`&&e.order<=n)}recomputeKindWinner(t){let n=this.kindContributions.get(t),r=this.kinds.get(t);if(n===void 0||n.size===0){this.kindContributions.delete(t),this.kinds.delete(t),this.emitKindChangedFromKey(t,r);return}let i;for(let e of n.values())(i===void 0||this.compareKindContributions(e,i)<0)&&(i=e);let a=i;this.kinds.set(t,m(a.registration)),JSON.stringify(r)!==JSON.stringify(a.registration)&&this.bus.emit(e.kind.changed,{kind:a.registration.kind,schemaVersion:a.registration.schemaVersion})}emitKindChangedFromKey(t,n){n!==void 0&&this.bus.emit(e.kind.changed,{kind:n.kind,schemaVersion:n.schemaVersion})}registerKind(e,t=d){let n=h(e.kind,e.schemaVersion),r=this.kindContributions.get(n)??new Map,i=f(t),a=r.get(i),o=t.source===`extension`?this.nextKindContributionOrder:a?.order??this.nextKindContributionOrder,s=this.findSameTierRepoConflict(r,t,o);if(s!==void 0){console.warn(`[ArtifactSchemaRegistry] Artifact kind '${n}' is already registered by '${s.owner.ownerKey}' at the same priority; keeping the existing owner.`);return}r.set(i,{owner:t,registration:m(e),order:t.source===`extension`||a===void 0?this.nextKindContributionOrder++:a.order}),this.kindContributions.set(n,r),this.recomputeKindWinner(n)}deregisterKind(e,t,n=d){let r=h(e,t),i=this.kindContributions.get(r);i!==void 0&&(i.delete(f(n)),this.recomputeKindWinner(r))}replaceKindRegistrationsForOwner(e,t){let n=new Set,r=f(e),i=new Map;for(let[e,t]of this.kindContributions.entries()){let a=t.get(r);a!==void 0&&(i.set(e,a.order),t.delete(r),n.add(e))}for(let a of t){let t=h(a.kind,a.schemaVersion),o=this.kindContributions.get(t)??new Map,s=e.source===`extension`?void 0:i.get(t),c=s??this.nextKindContributionOrder,l=this.findSameTierRepoConflict(o,e,c);if(l!==void 0){console.warn(`[ArtifactSchemaRegistry] Artifact kind '${t}' is already registered by '${l.owner.ownerKey}' at the same priority; keeping the existing owner.`);continue}o.set(r,{owner:e,registration:m(a),order:s??this.nextKindContributionOrder++}),this.kindContributions.set(t,o),n.add(t)}for(let e of n)this.recomputeKindWinner(e)}storeRelationType(e){let t=this.relationTypes.get(e.type);if(t){if(t.symmetry!==e.symmetry)throw Error(`Relation type '${e.type}' is already registered with different symmetry (existing: '${t.symmetry}', new: '${e.symmetry}')`);return}this.relationTypes.set(e.type,m(e))}getKind(e,t){let n=this.kinds.get(h(e,t));return n?m(n):void 0}getRelationType(e){let t=this.relationTypes.get(e);return t?m(t):void 0}onDestroy(){this.kinds.clear(),this.kindContributions.clear(),this.relationTypes.clear(),this.nextKindContributionOrder=0}};const _=i(`artifact-schema-registry`),v={name:_.name,displayName:`Artifact Schema Registry`,version:`0.1.0`,critical:!0,create:e=>new g(e.bus)};function y(e,t){return JSON.stringify([e,t])}function ee(e){return Object.freeze({kind:e.kind,schemaVersion:e.schemaVersion,version:e.version,build:e.build})}var b=class extends Error{key;incomingOwner;existingOwner;constructor(e,t,n){let r=t===n?`Duplicate builder key '${e}' within owner '${t}'`:`Builder key '${e}' from owner '${t}' collides with owner '${n}'`;super(r),this.key=e,this.incomingOwner=t,this.existingOwner=n,this.name=`ArtifactViewBuilderCollisionError`}},x=class{owners=new Map;globalIndex=new Map;getBuilder(e,t){return this.globalIndex.get(y(e,t))?.builder}replaceBuildersForOwner(e,t){for(let n of t)if(!Number.isInteger(n.version)||n.version<1)throw Error(`Builder for '${y(n.kind,n.schemaVersion)}' from owner '${e}' has non-positive version ${String(n.version)}`);let n=new Map;for(let r of t){let t=y(r.kind,r.schemaVersion);if(n.has(t))throw new b(t,e,e);n.set(t,ee(r))}for(let t of n.keys()){let n=this.globalIndex.get(t);if(n&&n.owner!==e)throw new b(t,e,n.owner)}n.size===0?this.owners.delete(e):this.owners.set(e,[...n.values()]),this.rebuildGlobalIndex()}removeBuildersForOwner(e){this.owners.has(e)&&(this.owners.delete(e),this.rebuildGlobalIndex())}getBuildersForOwner(e){let t=this.owners.get(e);if(t)return[...t]}clear(){this.owners.clear(),this.globalIndex.clear()}destroy(){this.clear()}rebuildGlobalIndex(){let e=new Map;for(let[t,n]of this.owners)for(let r of n){let n=y(r.kind,r.schemaVersion);e.set(n,{owner:t,builder:r})}this.globalIndex=e}};const S=1,C={link:0,summary:1,full:2};function w(e,t){let n=e.fromLevel??`full`;return C[t]>=C[n]}const T=Symbol(`MISSING`);function E(e,t){let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r||!Object.prototype.hasOwnProperty.call(r,e))return T;r=r[e]}return r}function D(e){return e===null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`}function te(e){for(let t of Object.values(e))if(t!==void 0&&!D(t))return!1;return!0}function ne(e){if(e.length===0)return`scalar-array`;let t=!0,n=!0;for(let r of e)D(r)||(t=!1),(!s(r)||!te(r))&&(n=!1);return t?`scalar-array`:n?`record-array`:`heterogeneous`}function O(e){let t=e.split(`.`);return t[t.length-1].replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/[-_]/g,` `).split(/\s+/).filter(e=>e.length>0).map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `)}function k(e){return e===null?`null`:String(e)}function A(e){let t=new Set,n=[];for(let r of e)for(let e of Object.keys(r))t.has(e)||(t.add(e),n.push(e));return n}function j(e){let t,n;for(let r of e)if(r.viewRole===`title`&&t===void 0?t=r:r.viewRole===`summary`&&n===void 0&&(n=r),t!==void 0&&n!==void 0)break;return{titleField:t,summaryField:n}}function M(e){return typeof e==`string`?e.length>0:typeof e==`number`||typeof e==`boolean`}function N(e,t,n){if(t&&w(t,n)){let n=E(e.data,t.path);if(n!==T&&M(n))return String(n)}return`[${e.kind}] ${e.id}`}function P(e,t,n){if(t&&w(t,n)){let n=E(e.data,t.path);if(n!==T&&M(n))return String(n)}let r=e.representations?.summary;if(r&&r.length>0)return r}function F(e,t,n,r){let i=O(e.path);if(D(t)){n.push({label:i,value:k(t)});return}if(Array.isArray(t)){let e=ne(t);if(e===`scalar-array`){n.push({label:i,value:t.map(k).join(`, `)});return}if(e===`record-array`){let e=t,n=A(e),a={type:`table`,title:i,columns:n.map(O),rows:e.map(e=>({cells:n.map(t=>{let n=e[t];return n==null?``:k(n)})}))};r.push(a);return}let a={type:`raw`,title:i,json:structuredClone(t)};r.push(a);return}if(s(t)){let e={type:`raw`,title:i,json:structuredClone(t)};r.push(e);return}}function I(e){let t=new Map;for(let n of e){if(n.target.refClass!==`artifact`)continue;let e=n.target,r=t.get(n.type)??[];r.push({artifactId:e.id,label:`[${e.kind}] ${e.id}`}),t.set(n.type,r)}if(t.size!==0)return{type:`relations`,title:`Relations`,groups:[...t.entries()].map(([e,t])=>({type:e,items:t}))}}function L(e){if(!e.confidence?.basis)return;let t=[];for(let n of e.confidence.basis){let e=n.evidenceRef;e?.refClass===`evidence`&&t.push({kind:e.kind,id:e.id,...e.locator?{locator:e.locator}:{}})}if(t.length!==0)return{type:`evidence`,title:`Evidence`,items:t}}function R(e,t,n){let r=t.projection?.projectedFields??[],{titleField:i,summaryField:a}=j(r),o=N(e,i,n),s=P(e,a,n),c=new Set;i&&c.add(i.path),a&&c.add(a.path);let l=[],u=[];for(let t of r){if(c.has(t.path)||!w(t,n))continue;let r=E(e.data,t.path);r!==T&&F(t,r,l,u)}let d=[];if(l.length>0){let e={type:`properties`,title:`Properties`,rows:l};d.push(e)}if(d.push(...u),n===`full`){let t=I(e.relations);t&&d.push(t);let n=L(e);n&&d.push(n)}return{title:o,...s===void 0?{}:{summary:s},sections:d}}function z(e,t,n){let r=e?.affordances;if(r===void 0)switch(e?.mode??`none`){case`none`:return!1;case`surface`:return t.kind===`own-view`&&n===`full`;case`comment`:return t.kind===`inline`&&n===`summary`}return r.length===0?!1:r.some(e=>B(e,t,n))}function B(e,t,n){if(e.kind!==t.kind)return!1;switch(e.kind){case`own-view`:return n===`full`;case`inline`:{let r=t;return e.hostRelation===r.hostRelation?n===(e.as??`full`):!1}case`entry`:{let n=t;return e.via!==void 0&&n.via!==void 0?e.via===n.via:e.collection!==void 0&&n.collection!==void 0?e.collection===n.collection:!1}}}var V=class extends a{schemaRegistry;builderRegistry;constructor(e,t,n){super(e),this.schemaRegistry=t,this.builderRegistry=n}async onInit(){this.registerHandler(n.artifact.view.resolve,async e=>{let{ref:t,level:n,affordance:r,params:i}=e.payload,a=await this.resolve(t,n,r,i);e.setResult(a)})}async resolve(n,r,i,a){let o=await this.bus.requestOptional(e.query,{ids:[n],currentOnly:!0});if(!o.handled||o.data.artifacts.length===0)return{status:`artifact-not-found`,view:null};let s=o.data.artifacts[0],c=this.schemaRegistry.getKind(s.kind,s.schemaVersion);if(c===void 0||!z(c.projection,i,r))return{status:`not-rendered`,view:null};let l=this.builderRegistry.getBuilder(s.kind,s.schemaVersion),u=R(s,c,r),d;if(l!==void 0&&c.defaultContext!==void 0){let t=await this.bus.requestOptional(e.resolveContext,{ref:{kind:s.kind,id:s.id,revision:s.revision}});t.handled&&(d=t.data.context)}let f=u.sections,p=1;if(l!==void 0){p=l.version;let e=await l.build({artifact:s,level:r,affordance:i,params:a,genericSections:u.sections,relations:s.relations,defaultContext:d});if(e!==void 0){if(`render`in e&&e.render===!1)return{status:`not-rendered`,view:null};`sections`in e&&(f=e.sections)}}let m={title:u.title,...u.summary===void 0?{}:{summary:u.summary},sections:[...f]};return{status:`ok`,view:t.parse(m),builderVersion:p,sourceRevision:s.revision}}};function H(e){return structuredClone(e)}var U=class extends a{bindings=new Map;constructor(e){super(e)}async onInit(){this.registerHandler(c.surfaceBinding.register,e=>{this.registerBinding(e.payload),e.setResult({registered:!0})}),this.registerHandler(c.surfaceBinding.list,e=>{let{id:t,provider:n,namespace:r}=e.payload,i=[...this.bindings.values()].filter(e=>(!t||e.id===t)&&(!n||e.provider===n)&&(!r||e.namespace===r)).map(H);e.setResult({bindings:i})})}registerBinding(e){let t=this.bindings.get(e.id);if(t){if(o(t)!==o(e))throw Error(`Surface binding '${e.id}' is already registered with a different definition`);return}this.bindings.set(e.id,H(e)),this.bus.emit(c.surfaceBinding.changed,{id:e.id,provider:e.provider})}deregisterBinding(e){let t=this.bindings.get(e);t&&(this.bindings.delete(e),this.bus.emit(c.surfaceBinding.changed,{id:e,provider:t.provider}))}getBinding(e){let t=this.bindings.get(e);return t?H(t):void 0}onDestroy(){this.bindings.clear()}},W=class{queues=new Map;activeLeases=new Map;pendingAcquisitions=new Set;authorizedRequests=new Map;consumedAuthorizedRequestIds=new Set;acceptingAcquisitions=!0;destroyPromise;destroy(){return this.acceptingAcquisitions=!1,this.destroyPromise??=this.drain(),this.destroyPromise}acquire(e){if(!this.acceptingAcquisitions)return Promise.reject(Error(`Materialization operation coordinator is destroyed`));let t=this.acquireAdmitted(e);return this.pendingAcquisitions.add(t),t.then(()=>this.pendingAcquisitions.delete(t),()=>this.pendingAcquisitions.delete(t)),t}async acquireAdmitted(e){let t=G(e),n=new Set,r=[];for(let e of K(t))r.push(await this.acquireKey(e)),n.add(e);let i={id:crypto.randomUUID(),scope:t},a,o=new Promise(e=>{a=e});return this.activeLeases.set(i.id,{lease:i,heldKeys:n,releases:r,settled:o,settle:a,released:!1}),i}release(e){let t=this.requireActiveLease(e);t.released=!0,this.activeLeases.delete(e.id);for(let e of t.releases.reverse())e();t.settle()}async extend(e,t){let n=this.requireActiveLease(e),r=G(t);if(r.artifactId!==e.scope.artifactId)throw Error(`A materialization operation lease cannot be extended to another artifact`);let i=K(r).filter(e=>!n.heldKeys.has(e)),a=[...n.heldKeys].filter(e=>e.startsWith(`provider:`)).at(-1);if(a&&i.some(e=>J(e,a)<0))throw Error(`Materialization operation lease extension violates lock ordering`);for(let e of i)n.releases.push(await this.acquireKey(e)),n.heldKeys.add(e)}async runExclusive(e,t,n,r){let i=G(e);if(n){if(this.consumedAuthorizedRequestIds.has(n))throw Error(`Materialization operation authorization has already been consumed`);let e=this.authorizedRequests.get(n);if(e){this.authorizedRequests.delete(n),this.consumedAuthorizedRequestIds.add(n);let a=this.activeLeases.get(e.leaseId);if(!r?.local||!a||e.scopeKey!==Y(i))throw Error(`Materialization operation authorization does not match this scope`);return t(a.lease)}}let a=await this.acquire(i);try{return await t(a)}finally{this.release(a)}}async runAuthorizedRequest(e,t,n){let r=this.requireActiveLease(e),i=G(t);if(!K(i).every(e=>r.heldKeys.has(e)))throw Error(`Materialization operation authorization requires a lease for the full scope`);let a=crypto.randomUUID();this.authorizedRequests.set(a,{leaseId:e.id,scopeKey:Y(i)});try{return await n(a)}finally{this.authorizedRequests.delete(a),this.consumedAuthorizedRequestIds.delete(a)}}requireActiveLease(e){let t=this.activeLeases.get(e.id);if(!t||t.released||t.lease!==e)throw Error(`Materialization operation lease is no longer active`);return t}async acquireKey(e){let t=this.queues.get(e)??Promise.resolve(),n,r=new Promise(e=>{n=e}),i=t.then(()=>r);return this.queues.set(e,i),await t,()=>{n(),this.queues.get(e)===i&&this.queues.delete(e)}}async drain(){for(;this.pendingAcquisitions.size>0||this.activeLeases.size>0;)await Promise.allSettled([...this.pendingAcquisitions,...[...this.activeLeases.values()].map(e=>e.settled)])}};function G(e){if(!e.artifactId)throw Error(`Materialization operation scope requires an artifactId`);let t=[...new Map((e.providerObjects??[]).map(e=>[q(e),e])).values()].sort((e,t)=>J(q(e),q(t)));return t.length>0?{artifactId:e.artifactId,providerObjects:t}:{artifactId:e.artifactId}}function K(e){return[`artifact:${e.artifactId}`,...(e.providerObjects??[]).map(q)]}function q(e){if(!e.provider||!e.externalId)throw Error(`Materialization provider objects require provider and externalId`);return`provider:${JSON.stringify([e.provider,e.externalId])}`}function J(e,t){return e===t?0:e<t?-1:1}function Y(e){return JSON.stringify(K(e))}const X=i(`surface-binding-registry`),Z=i(`artifact-view-builder-registry`),Q=i(`artifact-view-service`),$=i(`materialization-operation-coordinator`),re={name:$.name,displayName:`Materialization Operation Coordinator`,version:`0.1.0`,critical:!0,create:()=>new W},ie={name:X.name,displayName:`Surface Binding Registry`,version:`0.1.0`,critical:!0,create:e=>new U(e.bus)},ae={name:Z.name,displayName:`Artifact View Builder Registry`,version:`0.1.0`,critical:!0,create:()=>new x},oe={name:Q.name,displayName:`Artifact View Service`,version:`0.1.0`,critical:!0,dependencies:[r(_.name),r(Z.name)],create:e=>{let t=e.getService(_),n=e.getService(Z);if(t===void 0)throw Error(`ArtifactSchemaRegistry is not available for ArtifactViewService`);if(n===void 0)throw Error(`ArtifactViewBuilderRegistry is not available for ArtifactViewService`);return new V(e.bus,t,n)}};export{_,ae as a,ie as c,V as d,z as f,x as g,b as h,X as i,W as l,R as m,Q as n,oe as o,S as p,$ as r,re as s,Z as t,U as u,v,g as y};
@@ -1,4 +1,4 @@
1
- import { C as RuleSetOptions, S as Rule, _ as JsonObjectShape, a as JsonObjectSchema, b as NotCondition, c as RuleSetOptionsSchema, d as CompoundCondition, f as Condition, g as JsonObject, h as FieldOperator, i as FieldOperatorSchema, l as ScalarValueSchema, m as FieldCondition, n as ExpressionConditionSchema, o as JsonValueSchema, p as ExpressionCondition, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema, u as AndCondition, v as JsonPrimitive, w as ScalarValue, x as OrCondition, y as JsonValue } from "../schemas-XRhqOgVE.mjs";
1
+ import { C as RuleSetOptions, S as Rule, _ as JsonObjectShape, a as JsonObjectSchema, b as NotCondition, c as RuleSetOptionsSchema, d as CompoundCondition, f as Condition, g as JsonObject, h as FieldOperator, i as FieldOperatorSchema, l as ScalarValueSchema, m as FieldCondition, n as ExpressionConditionSchema, o as JsonValueSchema, p as ExpressionCondition, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema, u as AndCondition, v as JsonPrimitive, w as ScalarValue, x as OrCondition, y as JsonValue } from "../schemas-CVbfHPw-.mjs";
2
2
 
3
3
  //#region packages/rules/src/evaluator.d.ts
4
4
  /**
@@ -1 +1 @@
1
- import{t as e}from"../esm-C_WW4-pP.mjs";import{ConditionSchema as t,ExpressionConditionSchema as n,FieldConditionSchema as r,FieldOperatorSchema as i,JsonObjectSchema as a,JsonValueSchema as o,RuleSchema as s,RuleSetOptionsSchema as c,ScalarValueSchema as l}from"./schemas.mjs";import{compile as u}from"@makaio/framework/expression";const d=new Map,f=new Map;function p(e,t){if(`$and`in e){for(let n of e.$and)if(!p(n,t))return!1;return!0}if(`$or`in e){for(let n of e.$or)if(p(n,t))return!0;return!1}return`$not`in e?!p(e.$not,t):`$expr`in e?!!_(e.$expr).evalSync(t):h(g(t,e.field),e.operator)}function m(e,t,n={}){let{includeDisabled:r=!1}=n,i=[];for(let n of e)!r&&!n.enabled||p(n.condition,t)&&i.push(n);return i}function h(e,t){if(typeof t!=`object`||!t)return e===t;if(`$eq`in t)return e===t.$eq;if(`$ne`in t)return e!==t.$ne;if(`$in`in t)return t.$in.includes(e);if(`$nin`in t)return!t.$nin.includes(e);if(`$exists`in t){let n=e!==void 0;return t.$exists?n:!n}return`$startsWith`in t?typeof e==`string`&&e.startsWith(t.$startsWith):`$endsWith`in t?typeof e==`string`&&e.endsWith(t.$endsWith):`$glob`in t?typeof e==`string`&&v(t.$glob).match(e):!1}function g(e,t){if(e==null)return;let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r}function _(e){return y(d,e,()=>u(e))}function v(t){return y(f,t,()=>new e(t))}function y(e,t,n){let r=e.get(t);if(r!==void 0)return e.delete(t),e.set(t,r),r;let i=n();if(e.set(t,i),e.size>256){let t=e.keys().next().value;t!==void 0&&e.delete(t)}return i}export{t as ConditionSchema,n as ExpressionConditionSchema,r as FieldConditionSchema,i as FieldOperatorSchema,a as JsonObjectSchema,o as JsonValueSchema,s as RuleSchema,c as RuleSetOptionsSchema,l as ScalarValueSchema,p as evaluate,m as evaluateRules};
1
+ import{t as e}from"../esm-1UzF2r1U.mjs";import{ConditionSchema as t,ExpressionConditionSchema as n,FieldConditionSchema as r,FieldOperatorSchema as i,JsonObjectSchema as a,JsonValueSchema as o,RuleSchema as s,RuleSetOptionsSchema as c,ScalarValueSchema as l}from"./schemas.mjs";import{compile as u}from"@makaio/framework/expression";const d=new Map,f=new Map;function p(e,t){if(`$and`in e){for(let n of e.$and)if(!p(n,t))return!1;return!0}if(`$or`in e){for(let n of e.$or)if(p(n,t))return!0;return!1}return`$not`in e?!p(e.$not,t):`$expr`in e?!!_(e.$expr).evalSync(t):h(g(t,e.field),e.operator)}function m(e,t,n={}){let{includeDisabled:r=!1}=n,i=[];for(let n of e)!r&&!n.enabled||p(n.condition,t)&&i.push(n);return i}function h(e,t){if(typeof t!=`object`||!t)return e===t;if(`$eq`in t)return e===t.$eq;if(`$ne`in t)return e!==t.$ne;if(`$in`in t)return t.$in.includes(e);if(`$nin`in t)return!t.$nin.includes(e);if(`$exists`in t){let n=e!==void 0;return t.$exists?n:!n}return`$startsWith`in t?typeof e==`string`&&e.startsWith(t.$startsWith):`$endsWith`in t?typeof e==`string`&&e.endsWith(t.$endsWith):`$glob`in t?typeof e==`string`&&v(t.$glob).match(e):!1}function g(e,t){if(e==null)return;let n=t.split(`.`),r=e;for(let e of n){if(typeof r!=`object`||!r)return;r=r[e]}return r}function _(e){return y(d,e,()=>u(e))}function v(t){return y(f,t,()=>new e(t))}function y(e,t,n){let r=e.get(t);if(r!==void 0)return e.delete(t),e.set(t,r),r;let i=n();if(e.set(t,i),e.size>256){let t=e.keys().next().value;t!==void 0&&e.delete(t)}return i}export{t as ConditionSchema,n as ExpressionConditionSchema,r as FieldConditionSchema,i as FieldOperatorSchema,a as JsonObjectSchema,o as JsonValueSchema,s as RuleSchema,c as RuleSetOptionsSchema,l as ScalarValueSchema,p as evaluate,m as evaluateRules};
@@ -1,2 +1,2 @@
1
- import { a as JsonObjectSchema, c as RuleSetOptionsSchema, i as FieldOperatorSchema, l as ScalarValueSchema, n as ExpressionConditionSchema, o as JsonValueSchema, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema } from "../schemas-XRhqOgVE.mjs";
1
+ import { a as JsonObjectSchema, c as RuleSetOptionsSchema, i as FieldOperatorSchema, l as ScalarValueSchema, n as ExpressionConditionSchema, o as JsonValueSchema, r as FieldConditionSchema, s as RuleSchema, t as ConditionSchema } from "../schemas-CVbfHPw-.mjs";
2
2
  export { ConditionSchema, ExpressionConditionSchema, FieldConditionSchema, FieldOperatorSchema, JsonObjectSchema, JsonValueSchema, RuleSchema, RuleSetOptionsSchema, ScalarValueSchema };
@@ -1 +1 @@
1
- import{DispatchingAuth as e,createWebSocketCloseEvent as t}from"@makaio/framework/node/transports";import{HonoWebSocketBridge as n,startBusServer as r}from"@makaio/framework/node/bus-server";import{ExplicitDescriptorDiscovery as i,FileConfigStorage as a,FileRegistryCache as o,FilesystemDescriptorDiscovery as s,MergedDescriptorDiscovery as c,NodeCredentialProvider as l,StoredCredentialProvider as u,bootMakaioRuntimeCore as d,bootMakaioRuntimeCore as f,bridgeExtensionBrowserEntries as ee,createHonoRouteGraph as p,createHttpRouteGraphBuilder as m,entrypointStem as h,isCliContributionLike as g,isMakaioExtensionLike as _,isMissingOptionalRuntimePackage as v,isWithinDirectory as y,loadExtensions as b,loadOrCreateMachineIdentity as x,machineKeysExist as S,registerAdapterNameResolver as C,resolveConventionEntrypoint as w,resolveStaticModelRegistryPath as T,runMigrations as E,tryImport as D,validateMachineKeys as O}from"@makaio/framework/runtime-node";import{isIP as k}from"node:net";var A=class{raw;eventListeners={message:new Set,close:new Set,error:new Set,open:new Set};constructor(e){this.raw=e}get readyState(){return this.raw.readyState}send(e){if(typeof e==`string`){this.raw.send(e);return}if(e instanceof Blob){e.arrayBuffer().then(e=>{this.raw.readyState===1&&this.raw.send(new Uint8Array(e))}).catch(()=>{this.dispatchError()});return}if(e instanceof ArrayBuffer){this.raw.send(new Uint8Array(e));return}ArrayBuffer.isView(e)&&this.raw.send(e)}close(e,t){this.raw.close(e,t)}addEventListener(e,t){this.eventListeners[e]?.add(t)}removeEventListener(e,t){this.eventListeners[e]?.delete(t)}dispatchMessage(e){let t=new MessageEvent(`message`,{data:e});for(let e of this.eventListeners.message)e(t)}dispatchClose(e,n){let r=t(e,n);for(let e of this.eventListeners.close)e(r)}dispatchError(){let e=new Event(`error`);for(let t of this.eventListeners.error)t(e)}},j=class{options;bridge;busServer=null;busReady=!1;connecting=!1;constructor(e){this.options=e,this.bridge=new n}get dispatchingAuth(){return this.options.auth instanceof e?this.options.auth:void 0}createWebSocketHandler(){let e=this.bridge,t=()=>this.busReady,n=new WeakMap;return{binaryType:`arraybuffer`,open(r){if(!t()){r.close(1013,`Bus server not ready`);return}let i=new A(r);n.set(r,i),e.accept(i)},message(e,t){n.get(e)?.dispatchMessage(t)},close(e,t,r){n.get(e)?.dispatchClose(t,r),n.delete(e)}}}async connect(e,t){if(this.connecting||this.busServer)throw Error(`[BunBusServerTransport] connect() called while transport is already connected or connecting`);this.connecting=!0;try{this.busServer=await r({websocket:this.bridge,bus:e,auth:this.options.auth,loopbackName:this.options.loopbackName??`bun`}),this.busReady=!0}catch(e){throw await this.stopBusServer(`startup error`),e}finally{this.connecting=!1}}async disconnect(){await this.stopBusServer(`shutdown`),this.bridge.close()}async stopBusServer(e){this.busReady=!1,this.busServer&&=(await this.busServer.stop().catch(t=>{console.error(`[BunBusServerTransport] Failed to stop bus server during ${e}:`,t)}),null)}};function M(e){if(e.headers.get(`upgrade`)?.toLowerCase()!==`websocket`)return!1;let{pathname:t}=new URL(e.url);return t===`/bus`?!0:t===`/`&&e.headers.get(`origin`)===null}function te(e){return(t,n)=>M(t)?n.upgrade(t)?void 0:new Response(`WebSocket upgrade failed`,{status:426,headers:{Upgrade:`websocket`}}):e.fetch(t)}function N(e){return e.port}async function P(e){let{port:t,hostname:n}=e.bunServer,r=e.createMount??(await import(`../create-static-mount-CBTXRtbN.mjs`)).defaultCreateMount;return f(e.transport,t,n,{...e,createMount:r})}function F(e,t){let n=e,r=t;return{fetch(e,t){return n(e,t)},websocket:{binaryType:t.binaryType,open(e){r.open(e)},message(e,t){r.message(e,t)},close(e,t,n){r.close(e,t,n)}},activate(i){n=R(e,i),r=z(t,i)}}}function I(e){let t=[];return e.forEachActiveExtension((e,n)=>{B(n)&&t.push(n)}),t}function L(e){return Array.isArray(e)?e.flatMap(e=>L(e)):B(e)?[e]:[]}function R(e,t){return t.reduce((e,t)=>t.bun.createFetch?.(e)??e,e)}function z(e,t){return t.reduce((e,t)=>t.bun.createWebSocketHandler?.(e)??e,e)}function B(e){if(!H(e))return!1;let t=e.bun;return typeof e.name==`string`&&typeof e.displayName==`string`&&V(t)}function V(e){if(!H(e))return!1;let t=e.createFetch,n=e.createWebSocketHandler;return(t===void 0||typeof t==`function`)&&(n===void 0||typeof n==`function`)}function H(e){return typeof e==`object`&&!!e}function U(e){let t=e.timeoutMs??1e4,n=e.exit??(e=>process.exit(e)),r=!1;return async i=>{if(r)return;r=!0,console.info(`[${e.label}] ${i} received, shutting down...`);let a=setTimeout(()=>{console.error(`[${e.label}] Graceful shutdown timed out, forcing exit`),n(1)},t);try{process.env.MAKAIO_DEBUG&&console.info(`[${e.label}] Shutting down runtime...`),await e.runtime.shutdown(),process.env.MAKAIO_DEBUG&&console.info(`[${e.label}] Stopping Bun server...`),W(e.bunServer,e.label),process.env.MAKAIO_DEBUG&&console.info(`[${e.label}] Shutdown complete`),clearTimeout(a),n(0)}catch(t){W(e.bunServer,e.label),clearTimeout(a),console.error(`[${e.label}] Shutdown error:`,t),n(1)}}}function W(e,t){let n=e.stop?.(!0);G(n)&&n.catch(e=>{console.warn(`[${t}] Bun server stop failed during shutdown:`,e)})}function G(e){return typeof e==`object`&&!!e&&typeof e.catch==`function`}const K=/^(?=.{1,253}$)(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/;function q(e){let t=e.env??process.env,n=e.defaultPort??3e3,r=e.defaultHost??`0.0.0.0`;return{port:J(t.PORT,n,e),host:Y(t.HOST,r,e)}}function J(e,t,n){let r=e?.trim(),i=r&&/^\d+$/.test(r)?Number.parseInt(r,10):NaN;return Number.isInteger(i)&&i>=1&&i<=65535?i:e===void 0?t:Z(`Invalid PORT: ${e}`,t,n)}function Y(e,t,n){let r=e?.trim();return r&&X(r)?r:e===void 0?t:Q(`Invalid HOST: ${e}`,t,n)}function X(e){return k(e)!==0||e===`localhost`||K.test(e)}function Z(e,t,n){return $(e,String(t),n),t}function Q(e,t,n){return $(e,t,n),t}function $(e,t,n){if((n.invalid??`throw`)===`throw`)throw Error(e);console.warn(`[${n.appName}] ${e}, falling back to ${t}`)}export{j as BunBusServerTransportProvider,i as ExplicitDescriptorDiscovery,a as FileConfigStorage,o as FileRegistryCache,s as FilesystemDescriptorDiscovery,c as MergedDescriptorDiscovery,l as NodeCredentialProvider,u as StoredCredentialProvider,P as bootMakaioRuntime,d as bootMakaioRuntimeCore,ee as bridgeExtensionBrowserEntries,I as collectActiveBunHostPackages,R as composeBunHostFetch,z as composeBunHostWebSocket,F as createBunHostRouter,te as createBunRouteGraphFetch,U as createGracefulShutdown,p as createHonoRouteGraph,m as createHttpRouteGraphBuilder,h as entrypointStem,g as isCliContributionLike,_ as isMakaioExtensionLike,v as isMissingOptionalRuntimePackage,y as isWithinDirectory,b as loadExtensions,x as loadOrCreateMachineIdentity,S as machineKeysExist,L as normalizeBunHostPackages,q as readBunServerEnv,C as registerAdapterNameResolver,w as resolveConventionEntrypoint,N as resolveListeningPort,T as resolveStaticModelRegistryPath,E as runMigrations,D as tryImport,O as validateMachineKeys};
1
+ import{DispatchingAuth as e,createWebSocketCloseEvent as t}from"@makaio/framework/node/transports";import{HonoWebSocketBridge as n,startBusServer as r}from"@makaio/framework/node/bus-server";import{ExplicitDescriptorDiscovery as i,FileConfigStorage as a,FileRegistryCache as o,FilesystemDescriptorDiscovery as s,MergedDescriptorDiscovery as c,NodeCredentialProvider as l,StoredCredentialProvider as u,bootMakaioRuntimeCore as d,bootMakaioRuntimeCore as f,bridgeExtensionBrowserEntries as ee,createHonoRouteGraph as p,createHttpRouteGraphBuilder as m,entrypointStem as h,isCliContributionLike as g,isMakaioExtensionLike as _,isMissingOptionalRuntimePackage as v,isWithinDirectory as y,loadExtensions as b,loadOrCreateMachineIdentity as x,machineKeysExist as S,registerAdapterNameResolver as C,resolveConventionEntrypoint as w,resolveStaticModelRegistryPath as T,runMigrations as E,tryImport as D,validateMachineKeys as O}from"@makaio/framework/runtime-node";import{isIP as k}from"node:net";var A=class{raw;eventListeners={message:new Set,close:new Set,error:new Set,open:new Set};constructor(e){this.raw=e}get readyState(){return this.raw.readyState}send(e){if(typeof e==`string`){this.raw.send(e);return}if(e instanceof Blob){e.arrayBuffer().then(e=>{this.raw.readyState===1&&this.raw.send(new Uint8Array(e))}).catch(()=>{this.dispatchError()});return}if(e instanceof ArrayBuffer){this.raw.send(new Uint8Array(e));return}ArrayBuffer.isView(e)&&this.raw.send(e)}close(e,t){this.raw.close(e,t)}addEventListener(e,t){this.eventListeners[e]?.add(t)}removeEventListener(e,t){this.eventListeners[e]?.delete(t)}dispatchMessage(e){let t=new MessageEvent(`message`,{data:e});for(let e of this.eventListeners.message)e(t)}dispatchClose(e,n){let r=t(e,n);for(let e of this.eventListeners.close)e(r)}dispatchError(){let e=new Event(`error`);for(let t of this.eventListeners.error)t(e)}},j=class{options;bridge;busServer=null;busReady=!1;connecting=!1;constructor(e){this.options=e,this.bridge=new n}get dispatchingAuth(){return this.options.auth instanceof e?this.options.auth:void 0}createWebSocketHandler(){let e=this.bridge,t=()=>this.busReady,n=new WeakMap;return{binaryType:`arraybuffer`,open(r){if(!t()){r.close(1013,`Bus server not ready`);return}let i=new A(r);n.set(r,i),e.accept(i)},message(e,t){n.get(e)?.dispatchMessage(t)},close(e,t,r){n.get(e)?.dispatchClose(t,r),n.delete(e)}}}async connect(e,t){if(this.connecting||this.busServer)throw Error(`[BunBusServerTransport] connect() called while transport is already connected or connecting`);this.connecting=!0;try{this.busServer=await r({websocket:this.bridge,bus:e,auth:this.options.auth,loopbackName:this.options.loopbackName??`bun`}),this.busReady=!0}catch(e){throw await this.stopBusServer(`startup error`),e}finally{this.connecting=!1}}async disconnect(){await this.stopBusServer(`shutdown`),this.bridge.close()}async stopBusServer(e){this.busReady=!1,this.busServer&&=(await this.busServer.stop().catch(t=>{console.error(`[BunBusServerTransport] Failed to stop bus server during ${e}:`,t)}),null)}};function M(e){if(e.headers.get(`upgrade`)?.toLowerCase()!==`websocket`)return!1;let{pathname:t}=new URL(e.url);return t===`/bus`?!0:t===`/`&&e.headers.get(`origin`)===null}function te(e){return(t,n)=>M(t)?n.upgrade(t)?void 0:new Response(`WebSocket upgrade failed`,{status:426,headers:{Upgrade:`websocket`}}):e.fetch(t)}function N(e){return e.port}async function P(e){let{port:t,hostname:n}=e.bunServer,r=e.createMount??(await import(`../create-static-mount-DM9qO98Q.mjs`)).defaultCreateMount;return f(e.transport,t,n,{...e,createMount:r})}function F(e,t){let n=e,r=t;return{fetch(e,t){return n(e,t)},websocket:{binaryType:t.binaryType,open(e){r.open(e)},message(e,t){r.message(e,t)},close(e,t,n){r.close(e,t,n)}},activate(i){n=R(e,i),r=z(t,i)}}}function I(e){let t=[];return e.forEachActiveExtension((e,n)=>{B(n)&&t.push(n)}),t}function L(e){return Array.isArray(e)?e.flatMap(e=>L(e)):B(e)?[e]:[]}function R(e,t){return t.reduce((e,t)=>t.bun.createFetch?.(e)??e,e)}function z(e,t){return t.reduce((e,t)=>t.bun.createWebSocketHandler?.(e)??e,e)}function B(e){if(!H(e))return!1;let t=e.bun;return typeof e.name==`string`&&typeof e.displayName==`string`&&V(t)}function V(e){if(!H(e))return!1;let t=e.createFetch,n=e.createWebSocketHandler;return(t===void 0||typeof t==`function`)&&(n===void 0||typeof n==`function`)}function H(e){return typeof e==`object`&&!!e}function U(e){let t=e.timeoutMs??1e4,n=e.exit??(e=>process.exit(e)),r=!1;return async i=>{if(r)return;r=!0,console.info(`[${e.label}] ${i} received, shutting down...`);let a=setTimeout(()=>{console.error(`[${e.label}] Graceful shutdown timed out, forcing exit`),n(1)},t);try{process.env.MAKAIO_DEBUG&&console.info(`[${e.label}] Shutting down runtime...`),await e.runtime.shutdown(),process.env.MAKAIO_DEBUG&&console.info(`[${e.label}] Stopping Bun server...`),W(e.bunServer,e.label),process.env.MAKAIO_DEBUG&&console.info(`[${e.label}] Shutdown complete`),clearTimeout(a),n(0)}catch(t){W(e.bunServer,e.label),clearTimeout(a),console.error(`[${e.label}] Shutdown error:`,t),n(1)}}}function W(e,t){let n=e.stop?.(!0);G(n)&&n.catch(e=>{console.warn(`[${t}] Bun server stop failed during shutdown:`,e)})}function G(e){return typeof e==`object`&&!!e&&typeof e.catch==`function`}const K=/^(?=.{1,253}$)(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)*[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$/;function q(e){let t=e.env??process.env,n=e.defaultPort??3e3,r=e.defaultHost??`0.0.0.0`;return{port:J(t.PORT,n,e),host:Y(t.HOST,r,e)}}function J(e,t,n){let r=e?.trim(),i=r&&/^\d+$/.test(r)?Number.parseInt(r,10):NaN;return Number.isInteger(i)&&i>=1&&i<=65535?i:e===void 0?t:Z(`Invalid PORT: ${e}`,t,n)}function Y(e,t,n){let r=e?.trim();return r&&X(r)?r:e===void 0?t:Q(`Invalid HOST: ${e}`,t,n)}function X(e){return k(e)!==0||e===`localhost`||K.test(e)}function Z(e,t,n){return $(e,String(t),n),t}function Q(e,t,n){return $(e,t,n),t}function $(e,t,n){if((n.invalid??`throw`)===`throw`)throw Error(e);console.warn(`[${n.appName}] ${e}, falling back to ${t}`)}export{j as BunBusServerTransportProvider,i as ExplicitDescriptorDiscovery,a as FileConfigStorage,o as FileRegistryCache,s as FilesystemDescriptorDiscovery,c as MergedDescriptorDiscovery,l as NodeCredentialProvider,u as StoredCredentialProvider,P as bootMakaioRuntime,d as bootMakaioRuntimeCore,ee as bridgeExtensionBrowserEntries,I as collectActiveBunHostPackages,R as composeBunHostFetch,z as composeBunHostWebSocket,F as createBunHostRouter,te as createBunRouteGraphFetch,U as createGracefulShutdown,p as createHonoRouteGraph,m as createHttpRouteGraphBuilder,h as entrypointStem,g as isCliContributionLike,_ as isMakaioExtensionLike,v as isMissingOptionalRuntimePackage,y as isWithinDirectory,b as loadExtensions,x as loadOrCreateMachineIdentity,S as machineKeysExist,L as normalizeBunHostPackages,q as readBunServerEnv,C as registerAdapterNameResolver,w as resolveConventionEntrypoint,N as resolveListeningPort,T as resolveStaticModelRegistryPath,E as runMigrations,D as tryImport,O as validateMachineKeys};
@@ -1,2 +1,2 @@
1
- import { a as FilesystemDescriptorDiscovery, i as ExtensionEntrypointModule, n as ExplicitDescriptorDiscovery, o as FilesystemDescriptorDiscoveryOptions, r as ExtensionDiscovery, s as MergedDescriptorDiscovery, t as DiscoveredExtension } from "../extension-discovery-APMf1Tes.mjs";
1
+ import { a as FilesystemDescriptorDiscovery, i as ExtensionEntrypointModule, n as ExplicitDescriptorDiscovery, o as FilesystemDescriptorDiscoveryOptions, r as ExtensionDiscovery, s as MergedDescriptorDiscovery, t as DiscoveredExtension } from "../extension-discovery-Cce4FmRu.mjs";
2
2
  export { DiscoveredExtension, ExplicitDescriptorDiscovery, ExtensionDiscovery, ExtensionEntrypointModule, FilesystemDescriptorDiscovery, FilesystemDescriptorDiscoveryOptions, MergedDescriptorDiscovery };
@@ -1,2 +1,2 @@
1
- import { a as isMakaioExtensionLike, c as resolveConventionEntrypoint, i as isCliContributionLike, o as isWithinDirectory, r as entrypointStem } from "../load-extensions-_EnedkUp.mjs";
1
+ import { a as isMakaioExtensionLike, c as resolveConventionEntrypoint, i as isCliContributionLike, o as isWithinDirectory, r as entrypointStem } from "../load-extensions-jGQgvw6Z.mjs";
2
2
  export { entrypointStem, isCliContributionLike, isMakaioExtensionLike, isWithinDirectory, resolveConventionEntrypoint };
@@ -1 +1 @@
1
- import{a as e,c as t,n,o as r,r as i}from"../load-extensions-nqL5WAKj.mjs";export{n as entrypointStem,i as isCliContributionLike,e as isMakaioExtensionLike,r as isWithinDirectory,t as resolveConventionEntrypoint};
1
+ import{a as e,c as t,n,o as r,r as i}from"../load-extensions-5VckHXuw.mjs";export{n as entrypointStem,i as isCliContributionLike,e as isMakaioExtensionLike,r as isWithinDirectory,t as resolveConventionEntrypoint};