@makaio/framework 1.0.0-dev-1781023871421 → 1.0.0-dev-1781081952714

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 (420) hide show
  1. package/dist/.makaio-build.json +2 -2
  2. package/dist/{account-identity-DT5NOtFi.mjs → account-identity-CgzOqnVm.mjs} +1 -1
  3. package/dist/{adapter-C1eI-fGV.mjs → adapter-Dt2FDMs4.mjs} +1 -1
  4. package/dist/adapters/acp-client/index.d.mts +4 -4
  5. package/dist/adapters/config/index.d.mts +1 -1
  6. package/dist/adapters/config/index.mjs +1 -1
  7. package/dist/adapters/index.d.mts +24 -23
  8. package/dist/adapters/index.mjs +6 -13
  9. package/dist/adapters/node.d.mts +1 -1
  10. package/dist/adapters/node.mjs +1 -1
  11. package/dist/ajv-BJsabpMb.mjs +8 -0
  12. package/dist/await-trigger-DREnXCEJ.mjs +1 -0
  13. package/dist/bus/index.d.mts +19 -19
  14. package/dist/{client-bx74gm4R.mjs → client-BBJf1mVA.mjs} +1 -1
  15. package/dist/contracts/adapter/index.d.mts +2 -2
  16. package/dist/contracts/adapter/index.mjs +1 -1
  17. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  18. package/dist/contracts/artifact/index.d.mts +1 -1
  19. package/dist/contracts/client/index.d.mts +2 -2
  20. package/dist/contracts/client/index.mjs +1 -1
  21. package/dist/contracts/common/index.d.mts +1 -1
  22. package/dist/contracts/config/index.d.mts +1 -1
  23. package/dist/contracts/config/index.mjs +1 -1
  24. package/dist/contracts/extension/index.d.mts +3 -3
  25. package/dist/contracts/extension/index.mjs +1 -1
  26. package/dist/contracts/facet/index.d.mts +1 -1
  27. package/dist/contracts/facet/index.mjs +1 -1
  28. package/dist/contracts/harness/index.d.mts +1 -1
  29. package/dist/contracts/harness/index.mjs +1 -1
  30. package/dist/contracts/host/index.d.mts +1 -1
  31. package/dist/contracts/host/index.mjs +1 -1
  32. package/dist/contracts/index.d.mts +425 -425
  33. package/dist/contracts/index.mjs +1 -1
  34. package/dist/contracts/materialization/index.d.mts +3 -3
  35. package/dist/contracts/materialization/index.mjs +1 -1
  36. package/dist/contracts/model-registry/index.d.mts +1 -1
  37. package/dist/contracts/model-registry/index.mjs +1 -1
  38. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  39. package/dist/contracts/native-session-supervisor/index.mjs +1 -1
  40. package/dist/contracts/platform/index.d.mts +1 -1
  41. package/dist/contracts/platform/index.mjs +1 -1
  42. package/dist/contracts/provider/index.d.mts +2 -2
  43. package/dist/contracts/session/index.d.mts +2 -2
  44. package/dist/contracts/session/index.mjs +1 -1
  45. package/dist/contracts/shared/index.d.mts +1 -1
  46. package/dist/contracts/skill/index.d.mts +1 -1
  47. package/dist/contracts/skill/index.mjs +1 -1
  48. package/dist/contracts/telemetry/index.d.mts +1 -1
  49. package/dist/contracts/telemetry/index.mjs +1 -1
  50. package/dist/contracts/timeout/index.d.mts +1 -1
  51. package/dist/contracts/toast/index.mjs +1 -1
  52. package/dist/contracts/variant/index.d.mts +1 -1
  53. package/dist/contracts/variant/index.mjs +1 -1
  54. package/dist/create-static-mount-CFGo91CI.mjs +1 -0
  55. package/dist/cross-spawn-BL6EvJBv.mjs +1 -0
  56. package/dist/{cursor-storage-CtVJ3JzB.mjs → cursor-storage-C_WTAESV.mjs} +1 -1
  57. package/dist/{definition-CrgHIpTK.d.mts → definition-DqJOg6Lv.d.mts} +1 -1
  58. package/dist/descriptor-to-package-CY8oc2gl.mjs +1 -0
  59. package/dist/detached-extension-handle-CxEBQnSa.mjs +1 -0
  60. package/dist/drizzle/0000_charming_prowler.sql +443 -0
  61. package/dist/drizzle/0001_known_stephen_strange.sql +25 -0
  62. package/dist/drizzle/0002_woozy_gladiator.sql +1 -0
  63. package/dist/drizzle/0003_overjoyed_adam_destine.sql +1 -0
  64. package/dist/drizzle/0004_solid_goliath.sql +1 -0
  65. package/dist/drizzle/0005_round_calypso.sql +51 -0
  66. package/dist/drizzle/0006_free_tiger_shark.sql +4 -0
  67. package/dist/drizzle/0007_sparkling_terror.sql +2 -0
  68. package/dist/drizzle/0008_petite_deathstrike.sql +1 -0
  69. package/dist/drizzle/0009_lethal_malcolm_colcord.sql +6 -0
  70. package/dist/drizzle/0010_grey_chronomancer.sql +1 -0
  71. package/dist/drizzle/0011_solid_nomad.sql +1 -0
  72. package/dist/drizzle/meta/0000_snapshot.json +2813 -0
  73. package/dist/drizzle/meta/0001_snapshot.json +2820 -0
  74. package/dist/drizzle/meta/0002_snapshot.json +2827 -0
  75. package/dist/drizzle/meta/0003_snapshot.json +2834 -0
  76. package/dist/drizzle/meta/0004_snapshot.json +2842 -0
  77. package/dist/drizzle/meta/0005_snapshot.json +2849 -0
  78. package/dist/drizzle/meta/0006_snapshot.json +2865 -0
  79. package/dist/drizzle/meta/0007_snapshot.json +2879 -0
  80. package/dist/drizzle/meta/0008_snapshot.json +2886 -0
  81. package/dist/drizzle/meta/0009_snapshot.json +2901 -0
  82. package/dist/drizzle/meta/0010_snapshot.json +2908 -0
  83. package/dist/drizzle/meta/0011_snapshot.json +2915 -0
  84. package/dist/drizzle/meta/_journal.json +90 -0
  85. package/dist/esm-BdLRFEUy.mjs +3 -0
  86. package/dist/expression/index.d.mts +120 -0
  87. package/dist/expression/index.mjs +1431 -0
  88. package/dist/extension--5Q190u_.mjs +1 -0
  89. package/dist/{extension-CpIUgBKI.mjs → extension-DFIZ3FCJ.mjs} +1 -1
  90. package/dist/extension-discovery-CkV_VRdJ.d.mts +163 -0
  91. package/dist/fast-uri-BF2Xuiop.mjs +1 -0
  92. package/dist/{filesystem-service-B8rhBRgB.mjs → filesystem-service-DH9zlxyd.mjs} +1 -1
  93. package/dist/git/index.mjs +17 -17
  94. package/dist/globby-4SrlyIlj.mjs +1 -0
  95. package/dist/{handlers-CkTsQLra.mjs → handlers-Bev7-xjL.mjs} +1 -1
  96. package/dist/{index-472sOmsW.d.mts → index-BAhJKQLX.d.mts} +7 -7
  97. package/dist/{index-D9MwJ2Q8.d.mts → index-BCKRUuI2.d.mts} +2 -2
  98. package/dist/{index-mNec7V-9.d.mts → index-BYkOUd0x.d.mts} +12 -12
  99. package/dist/{index-8SZkg7s6.d.mts → index-Bibt5jAX.d.mts} +8 -8
  100. package/dist/{index-DBw-89vC2.d.mts → index-BmV60tMf.d.mts} +18 -18
  101. package/dist/{index-B_zQC98V.d.mts → index-BpniJgxu.d.mts} +4 -4
  102. package/dist/{index-soFznFCy2.d.mts → index-Bw_zL7Rs.d.mts} +1 -1
  103. package/dist/{index-CelJCBjk.d.mts → index-C3zfJg6s.d.mts} +13 -13
  104. package/dist/{index-Caig6TeF.d.mts → index-CNOTkyGw.d.mts} +379 -303
  105. package/dist/{index-Bh_Ne7LF.d.mts → index-CwKzQuIX.d.mts} +28 -28
  106. package/dist/{index-B3PK4FIn.d.mts → index-D6bw4qJp.d.mts} +112 -112
  107. package/dist/{index-Cm0dUkWL.d.mts → index-DETxgKS2.d.mts} +24 -24
  108. package/dist/{index-D90OmGmV.d.mts → index-Db0uJ_Cg2.d.mts} +3 -3
  109. package/dist/{index-Bvb2mMH6.d.mts → index-IekAD8Gp.d.mts} +44 -44
  110. package/dist/index-YDfOv0GT.d.mts +1133 -0
  111. package/dist/{index-L4GjJDKb.d.mts → index-fVgKVvta.d.mts} +3 -3
  112. package/dist/{index-DUaw0Dw8.d.mts → index-jlQ4IhR5.d.mts} +497 -497
  113. package/dist/jsonl-transport-BxNXizIm.mjs +3 -0
  114. package/dist/kernel/cli/index.d.mts +2 -95
  115. package/dist/kernel/cli/index.mjs +1 -1
  116. package/dist/kernel/cli/register.d.mts +2 -0
  117. package/dist/kernel/cli/register.mjs +1 -0
  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 +5 -5
  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-B9kVK_1_.mjs +4 -0
  132. package/dist/lib-DPruLs5D.mjs +155 -0
  133. package/dist/lib-aRogYLqg.mjs +5 -0
  134. package/dist/load-extensions-C-TqCwzL.mjs +1 -0
  135. package/dist/load-extensions-D9nbDIiW.d.mts +117 -0
  136. package/dist/mcp-http-server/index.d.mts +561 -0
  137. package/dist/mcp-http-server/index.mjs +4 -0
  138. package/dist/{namespace-EQniz-Aw.d.mts → namespace-B60mn8J-2.d.mts} +4 -4
  139. package/dist/{namespace-CxhsoFUP.d.mts → namespace-BBVtD1gu.d.mts} +14 -14
  140. package/dist/namespace-BXqetkc3.mjs +1 -0
  141. package/dist/{namespace-Dr8K0MCp.d.mts → namespace-BlS_i9KT.d.mts} +17 -17
  142. package/dist/{namespace-5QQqbF-B.d.mts → namespace-ByyuIFpL.d.mts} +91 -91
  143. package/dist/{namespace-DLovh2Ws.d.mts → namespace-CHMszppN.d.mts} +6 -6
  144. package/dist/{namespace-BM7Djng9.d.mts → namespace-CqUGzG53.d.mts} +2 -2
  145. package/dist/{namespace-DD8Oiqo7.d.mts → namespace-D1Iw_d1P.d.mts} +20 -20
  146. package/dist/{namespace-DgqkaOVu.d.mts → namespace-DBKWNrk7.d.mts} +22 -22
  147. package/dist/{namespace-CaaNnKcR.d.mts → namespace-Ds6HkJEU.d.mts} +138 -138
  148. package/dist/namespace-DzVf1hVH.d.mts +96 -0
  149. package/dist/{namespace-TyiTsLFv.d.mts → namespace-aBIAWxY3.d.mts} +46 -46
  150. package/dist/{namespace-DuXK5AYN.mjs → namespace-h0HIuqx0.mjs} +1 -1
  151. package/dist/{native-session-supervisor-B1TnaPUF.mjs → native-session-supervisor-DeKpxhWO.mjs} +1 -1
  152. package/dist/node/bus-server/index.d.mts +1 -1
  153. package/dist/node/bus-server/index.mjs +1 -1
  154. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  155. package/dist/node/bus-server/server-lifecycle.mjs +1 -1
  156. package/dist/{orchestrator-shared-CIDiFJMD.mjs → orchestrator-shared-FnWrPS09.mjs} +1 -1
  157. package/dist/out-CvZYgczi.mjs +41 -0
  158. package/dist/package-1DS4bXg5.mjs +1 -0
  159. package/dist/package-BSnp1zOR.d.mts +372 -0
  160. package/dist/package.json +5 -0
  161. package/dist/primitive-runtime-DcYYWy_6.mjs +8 -0
  162. package/dist/{profile-6ynCD5k3.mjs → profile-D39-Zy_W.mjs} +1 -1
  163. package/dist/{provider-context-CK6B4X_8.mjs → provider-context-lfG0BpqX.mjs} +1 -1
  164. package/dist/quick-lru-B9nWXbXI.mjs +1 -0
  165. package/dist/rules/index.d.mts +27 -0
  166. package/dist/rules/index.mjs +1 -0
  167. package/dist/rules/schemas.d.mts +2 -0
  168. package/dist/rules/schemas.mjs +1 -0
  169. package/dist/runtime-bun/index.d.mts +385 -0
  170. package/dist/runtime-bun/index.mjs +1 -0
  171. package/dist/runtime-node/bus/runtime/namespace.d.mts +61 -0
  172. package/dist/runtime-node/bus/runtime/namespace.mjs +1 -0
  173. package/dist/runtime-node/bus/runtime/schemas.d.mts +54 -0
  174. package/dist/runtime-node/bus/runtime/schemas.mjs +1 -0
  175. package/dist/runtime-node/extension-discovery.d.mts +2 -0
  176. package/dist/runtime-node/extension-discovery.mjs +1 -0
  177. package/dist/runtime-node/extension-validation.d.mts +2 -0
  178. package/dist/runtime-node/extension-validation.mjs +1 -0
  179. package/dist/runtime-node/index.d.mts +745 -0
  180. package/dist/runtime-node/index.mjs +148 -0
  181. package/dist/runtime-node/makaio-config.d.mts +153 -0
  182. package/dist/runtime-node/makaio-config.mjs +1 -0
  183. package/dist/runtime-node/workflow-worker/index.d.mts +2 -0
  184. package/dist/runtime-node/workflow-worker/index.mjs +1 -0
  185. package/dist/runtime-node/workflow-worker/worker-entry.d.mts +39 -0
  186. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -0
  187. package/dist/{schema-M5YTvSAG.d.mts → schema-CDL_pyyM.d.mts} +4 -4
  188. package/dist/{schema-e0wU_lcV.mjs → schema-DCJyzRHe.mjs} +1 -1
  189. package/dist/schema-introspection-CuRZPYEc.mjs +1 -0
  190. package/dist/{schemas-C46QfKzv.d.mts → schemas-B5ToLwIs.d.mts} +14 -14
  191. package/dist/schemas-C792eVAZ.d.mts +171 -0
  192. package/dist/{schemas-CaLhkkLn.mjs → schemas-CSUwpaNm.mjs} +1 -1
  193. package/dist/{schemas-DVF1A4DF.d.mts → schemas-Chyj6HuZ.d.mts} +9 -9
  194. package/dist/{schemas-DATniTHb.d.mts → schemas-DZUaRcYl.d.mts} +14 -14
  195. package/dist/{schemas-DiYVzG6e.d.mts → schemas-Exixg77V2.d.mts} +16 -16
  196. package/dist/{schemas-ClOOT1W6.d.mts → schemas-lqvZ6UpK.d.mts} +3 -3
  197. package/dist/{schemas-j7ivZ2HI.d.mts → schemas-on3_N5HP.d.mts} +138 -138
  198. package/dist/{schemas-wg_6PAdV.d.mts → schemas-t1VR6_b_.d.mts} +4 -4
  199. package/dist/semver-DhHJv6Dt.mjs +1 -0
  200. package/dist/services/adapter-runtime/index.d.mts +3 -3
  201. package/dist/services/adapter-runtime/index.mjs +1 -1
  202. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  203. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  204. package/dist/services/adapter-subsystem/index.d.mts +2 -2
  205. package/dist/services/adapter-subsystem/index.mjs +1 -1
  206. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  207. package/dist/services/adapter-subsystem/namespace.mjs +1 -1
  208. package/dist/services/agent-runtime/index.d.mts +2 -2
  209. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  210. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  211. package/dist/services/capability/index.d.mts +1 -1
  212. package/dist/services/capability/index.mjs +1 -1
  213. package/dist/services/codebase/index.d.mts +2 -2
  214. package/dist/services/codebase/namespace.d.mts +1 -1
  215. package/dist/services/codebase/schemas.d.mts +1 -1
  216. package/dist/services/compression/index.d.mts +2 -2
  217. package/dist/services/compression/namespace.d.mts +1 -1
  218. package/dist/services/compression/schemas.d.mts +1 -1
  219. package/dist/services/context-rules/index.d.mts +7 -7
  220. package/dist/services/context-rules/index.mjs +1 -1
  221. package/dist/services/execution-target/index.d.mts +3 -3
  222. package/dist/services/execution-target/index.mjs +1 -1
  223. package/dist/services/execution-target/namespace.d.mts +1 -1
  224. package/dist/services/execution-target/schemas.d.mts +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/filesystem/namespace.d.mts +6 -6
  228. package/dist/services/filesystem/schemas.d.mts +3 -3
  229. package/dist/services/git/namespace.d.mts +6 -6
  230. package/dist/services/git/namespace.mjs +1 -1
  231. package/dist/services/git/schemas.d.mts +6 -6
  232. package/dist/services/git/schemas.mjs +1 -1
  233. package/dist/services/harness/index.d.mts +12 -12
  234. package/dist/services/harness/index.mjs +1 -1
  235. package/dist/services/index.d.mts +159 -158
  236. package/dist/services/index.mjs +1 -1
  237. package/dist/services/log-import/browser.d.mts +2 -2
  238. package/dist/services/log-import/index.d.mts +3 -3
  239. package/dist/services/log-import/log-import.d.mts +1 -1
  240. package/dist/services/log-import/log-import.mjs +1 -1
  241. package/dist/services/log-import/namespace.d.mts +6 -6
  242. package/dist/services/log-import/namespace.mjs +1 -1
  243. package/dist/services/log-import/schemas.d.mts +3 -3
  244. package/dist/services/log-import/schemas.mjs +1 -1
  245. package/dist/services/model-registry/index.d.mts +1 -1
  246. package/dist/services/model-registry/index.mjs +1 -1
  247. package/dist/services/preferences/index.d.mts +2 -2
  248. package/dist/services/preferences/schemas.d.mts +1 -1
  249. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  250. package/dist/services/provider-context/index.d.mts +1 -1
  251. package/dist/services/provider-context/index.mjs +1 -1
  252. package/dist/services/provider-runtime/index.mjs +1 -1
  253. package/dist/services/session/handlers/index.d.mts +1 -1
  254. package/dist/services/session/handlers/index.mjs +1 -1
  255. package/dist/services/session/index.d.mts +9 -9
  256. package/dist/services/session/index.mjs +1 -1
  257. package/dist/services/session/messages/namespace.d.mts +1 -1
  258. package/dist/services/session/messages/namespace.mjs +1 -1
  259. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  260. package/dist/services/session/orchestrator-testing/index.mjs +1 -1
  261. package/dist/services/session/session-events/namespace.d.mts +1 -1
  262. package/dist/services/session/session-events/namespace.mjs +1 -1
  263. package/dist/services/session/storage/namespace.d.mts +1 -1
  264. package/dist/services/session/storage/schema.d.mts +1 -1
  265. package/dist/services/session/testing/index.mjs +1 -1
  266. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  267. package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
  268. package/dist/services/session/turns/namespace.d.mts +1 -1
  269. package/dist/services/session/turns/namespace.mjs +1 -1
  270. package/dist/services/session-editor/index.d.mts +1 -1
  271. package/dist/services/session-editor/index.mjs +1 -1
  272. package/dist/services/settings/index.d.mts +3 -3
  273. package/dist/services/settings/index.mjs +1 -1
  274. package/dist/services/settings/namespace.d.mts +10 -10
  275. package/dist/services/settings/namespace.mjs +1 -1
  276. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  277. package/dist/services/settings/storage/clients-namespace.mjs +1 -1
  278. package/dist/services/settings/storage/extension-configs/namespace.d.mts +3 -3
  279. package/dist/services/settings/storage/index.d.mts +3 -3
  280. package/dist/services/settings/storage/index.mjs +1 -1
  281. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  282. package/dist/services/settings/storage/providers-namespace.mjs +1 -1
  283. package/dist/services/subagent/index.d.mts +1 -1
  284. package/dist/services/subagent/index.mjs +1 -1
  285. package/dist/services/subagent-template/index.d.mts +2 -2
  286. package/dist/services/subagent-template/namespace.d.mts +1 -1
  287. package/dist/services/subagent-template/schemas.d.mts +1 -1
  288. package/dist/services/tool-approval/index.d.mts +1 -1
  289. package/dist/services/tool-approval/index.mjs +1 -1
  290. package/dist/services/tools/index.d.mts +1 -1
  291. package/dist/services/tools/index.mjs +1 -1
  292. package/dist/services/tray-menu/index.d.mts +3 -3
  293. package/dist/services/tray-menu/index.mjs +1 -1
  294. package/dist/services/tray-menu/namespace.d.mts +1 -1
  295. package/dist/services/tray-menu/schemas.d.mts +1 -1
  296. package/dist/services/turn/index.d.mts +1 -1
  297. package/dist/services/turn/namespace.d.mts +1 -1
  298. package/dist/services/turn/schemas.d.mts +10 -10
  299. package/dist/{session-BoldSdNZ2.mjs → session-BnfsJoZi.mjs} +1 -1
  300. package/dist/{session-DuVOYctZ.mjs → session-C1Cami7U.mjs} +1 -1
  301. package/dist/{session-lineage-CRsc9g1x.d.mts → session-lineage-CKg6mErA.d.mts} +1 -1
  302. package/dist/{skill-CQO4mDqK.mjs → skill-BNQnWVIG.mjs} +1 -1
  303. package/dist/src-Dvp41Cg2.mjs +1 -0
  304. package/dist/src-Z3vAZJfw.mjs +21 -0
  305. package/dist/storage/drizzle/client.d.mts +1 -1
  306. package/dist/storage/drizzle/index.d.mts +1 -1
  307. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  308. package/dist/storage/handlers/drizzle/index.mjs +1 -1
  309. package/dist/storage/handlers/index.d.mts +1 -1
  310. package/dist/storage/handlers/index.mjs +1 -1
  311. package/dist/storage-namespace-BXO3lDVy.mjs +1 -0
  312. package/dist/{storage-namespace-BXkoh5Sy.d.mts → storage-namespace-BXmMUd7a.d.mts} +20 -20
  313. package/dist/style.css +540 -540
  314. package/dist/supports-color-fVsgozsi.mjs +1 -0
  315. package/dist/tool-approval-service-BgNcJvKx.mjs +1 -0
  316. package/dist/tools-DC4KrqI1.mjs +1 -0
  317. package/dist/{types-CCdqjeuH.d.mts → types-B0BtvVAq.d.mts} +2 -81
  318. package/dist/{types-BCMUtBj1.d.mts → types-CmMesAgR.d.mts} +1 -1
  319. package/dist/{types-DZHvOc_Q.d.mts → types-D0fPFh-D.d.mts} +1 -1
  320. package/dist/{types-Dy3YTcTF.d.mts → types-DiGqpZOD.d.mts} +288 -288
  321. package/dist/ui-components/index.d.mts +1 -1
  322. package/dist/ui-components/index.mjs +2 -2
  323. package/dist/ui-hooks/index.d.mts +6 -6
  324. package/dist/ui-kernel/index.d.mts +7 -7
  325. package/dist/ui-kernel/pages/namespace.d.mts +8 -8
  326. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  327. package/dist/ui-views/index.mjs +2 -2
  328. package/dist/version-B4NO_fID.mjs +1 -0
  329. package/dist/workflow-engine/index.d.mts +6568 -0
  330. package/dist/workflow-engine/index.mjs +1 -0
  331. package/dist/workflow-engine/package.d.mts +2 -0
  332. package/dist/workflow-engine/package.mjs +1 -0
  333. package/dist/workflow-engine/workflow-orchestrator.d.mts +61 -0
  334. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -0
  335. package/dist/workflow-worker-DvP753UN.mjs +1 -0
  336. package/package.json +65 -1
  337. package/dist/extension-C-4BHMRI.mjs +0 -1
  338. package/dist/globby-rtWVaFHv.mjs +0 -41
  339. package/dist/schema-introspection-Dn1jWQs1.mjs +0 -1
  340. package/dist/schemas-CVvwIfG4.mjs +0 -1
  341. package/dist/storage-namespace-DWsYLAXa.mjs +0 -1
  342. package/dist/tool-approval-service-BvZWhYZp.mjs +0 -1
  343. package/dist/tools-D-luYcDw.mjs +0 -1431
  344. package/dist/version-BeT3ASEe.mjs +0 -1
  345. /package/dist/{base-orchestrator-wyumsn3b.d.mts → base-orchestrator-M5mAB5-w.d.mts} +0 -0
  346. /package/dist/{capability-service-CJbmhfv9.mjs → capability-service-jjrFLM6r.mjs} +0 -0
  347. /package/dist/{cleanEnvForAdapter-KkYzQa1f.mjs → cleanEnvForAdapter-BlpmyXYk.mjs} +0 -0
  348. /package/dist/{clients-namespace-GmSJpBUV.d.mts → clients-namespace-SFk7OTop.d.mts} +0 -0
  349. /package/dist/{config-namespace-CPY9YsR8.d.mts → config-namespace-BzAvE2nY.d.mts} +0 -0
  350. /package/dist/{config-namespace-ncYg2ct_.mjs → config-namespace-DydHz9so.mjs} +0 -0
  351. /package/dist/{definition-BLCdXGzh.d.mts → definition-BSghHJpQ.d.mts} +0 -0
  352. /package/dist/{definition-pkJ6szUl.d.mts → definition-q6iLw11H.d.mts} +0 -0
  353. /package/dist/{drizzle-Eq8W1EbD.mjs → drizzle-DpjZFY_j.mjs} +0 -0
  354. /package/dist/{event-Ca2yUf5i.mjs → event-BEllCn16.mjs} +0 -0
  355. /package/dist/{execution-target-CRPTfZlc.mjs → execution-target-CQGYaaM2.mjs} +0 -0
  356. /package/dist/{extension-namespace-cMh_mMiL.mjs → extension-namespace-BBgYOttA.mjs} +0 -0
  357. /package/dist/{facet-BuwhrThl.mjs → facet-DMrryX_0.mjs} +0 -0
  358. /package/dist/{filesystem-service-p_iJVHd4.d.mts → filesystem-service-Ddngll0j.d.mts} +0 -0
  359. /package/dist/{harness-BRCMcvQN.mjs → harness-B8E_wRwa.mjs} +0 -0
  360. /package/dist/{host-Br9VuOyr.mjs → host-DbMiI5wQ.mjs} +0 -0
  361. /package/dist/{identity-Cz2IeEtm.mjs → identity-Bmx-8fPa.mjs} +0 -0
  362. /package/dist/{index-U-A8eyGT.d.mts → index-9IDJUJ4X.d.mts} +0 -0
  363. /package/dist/{index-CGmcS0Ma.d.mts → index-BBvcP-P0.d.mts} +0 -0
  364. /package/dist/{index-BGfWS6GE.d.mts → index-BKKNWqkP2.d.mts} +0 -0
  365. /package/dist/{index-DKia0MX1.d.mts → index-BMpRB6iE.d.mts} +0 -0
  366. /package/dist/{index-CHQ1SqT0.d.mts → index-BbCjtc3h.d.mts} +0 -0
  367. /package/dist/{index-BFg9BUpx.d.mts → index-BheaEhyI.d.mts} +0 -0
  368. /package/dist/{index-Cs0kZXIz2.d.mts → index-BnQSPC6c.d.mts} +0 -0
  369. /package/dist/{index-CCGVh9BF2.d.mts → index-BpXX9WZJ.d.mts} +0 -0
  370. /package/dist/{index-DMKnON5s.d.mts → index-Bsp0O_sI.d.mts} +0 -0
  371. /package/dist/{index-DANINzMu.d.mts → index-Buo9H8RK.d.mts} +0 -0
  372. /package/dist/{index-CLpjm52M.d.mts → index-BxFA1XcP.d.mts} +0 -0
  373. /package/dist/{index-ChunCFu4.d.mts → index-C33Tq1ei2.d.mts} +0 -0
  374. /package/dist/{index-DGBu6bHi2.d.mts → index-C6BhKRnH.d.mts} +0 -0
  375. /package/dist/{index-eemAKwsB.d.mts → index-CDU_s69P.d.mts} +0 -0
  376. /package/dist/{index-DKC62dY5.d.mts → index-CGJjA-hR2.d.mts} +0 -0
  377. /package/dist/{index-CokQYGVP.d.mts → index-Clut1ljB.d.mts} +0 -0
  378. /package/dist/{index-BVgfS-AJ.d.mts → index-Cz9JMjZK.d.mts} +0 -0
  379. /package/dist/{index-vtXJuwrz.d.mts → index-D0SUjZmU.d.mts} +0 -0
  380. /package/dist/{index-x_lVDp_J.d.mts → index-D6Iyvz9T.d.mts} +0 -0
  381. /package/dist/{index-D5d5HeWI2.d.mts → index-DOfq0qqv.d.mts} +0 -0
  382. /package/dist/{index-De3kPhlN.d.mts → index-DSV1aFgK.d.mts} +0 -0
  383. /package/dist/{index-B80L4YqA.d.mts → index-Dsq2zKvu.d.mts} +0 -0
  384. /package/dist/{materialization-CuUBu4XI.mjs → materialization-3QUnQLbC.mjs} +0 -0
  385. /package/dist/{model-registry-Scn_MC2d.mjs → model-registry-B0AIdj7O.mjs} +0 -0
  386. /package/dist/{model-registry-CfXytvzx.mjs → model-registry-j-rCKcik.mjs} +0 -0
  387. /package/dist/{namespace-CFLAmQfh.mjs → namespace-BbjCyZC9.mjs} +0 -0
  388. /package/dist/{namespace-BwzZJqTV.mjs → namespace-BgPoC46Q.mjs} +0 -0
  389. /package/dist/{namespace-Yna5-Pws.mjs → namespace-CDiM5Bcr.mjs} +0 -0
  390. /package/dist/{namespace-BoD94mrN.mjs → namespace-CUOGcGPG.mjs} +0 -0
  391. /package/dist/{namespace-LViZ-EQk.mjs → namespace-D6X67cUk.mjs} +0 -0
  392. /package/dist/{namespace-DkRgbZYn.mjs → namespace-ENv7H7Na.mjs} +0 -0
  393. /package/dist/{namespace-xcmbQlxh.mjs → namespace-FT8igkn4.mjs} +0 -0
  394. /package/dist/{namespace-CaoZ3S78.d.mts → namespace-XTGCaSXj.d.mts} +0 -0
  395. /package/dist/{namespace-CTm3nEvh.d.mts → namespace-nlsvvMtD.d.mts} +0 -0
  396. /package/dist/{namespace-IV1QK__V.d.mts → namespace-uuR0Fg5r.d.mts} +0 -0
  397. /package/dist/{orchestrator-shared-Dfa7FMyw.d.mts → orchestrator-shared-D91Wk7z-.d.mts} +0 -0
  398. /package/dist/{package-DKVlsMP3.mjs → package-OE9dMQsq.mjs} +0 -0
  399. /package/dist/{platform-DZ7z-wXD.mjs → platform-Dhv22LiX.mjs} +0 -0
  400. /package/dist/{providers-u8i15co9.mjs → providers-B1p0P-vB.mjs} +0 -0
  401. /package/dist/{providers-namespace-DSEpli4A.d.mts → providers-namespace-BqWYkydw.d.mts} +0 -0
  402. /package/dist/{schema-CoyE6mPt.mjs → schema-DOnJmAPw.mjs} +0 -0
  403. /package/dist/{schemas-Bd0OjRQf.d.mts → schemas-B77Gi8Xr.d.mts} +0 -0
  404. /package/dist/{schemas-jFe1AuI-.mjs → schemas-BCIuTWRl2.mjs} +0 -0
  405. /package/dist/{schemas-DE-GNmSD.mjs → schemas-BdAf5u58.mjs} +0 -0
  406. /package/dist/{schemas-CDBSjg7o.d.mts → schemas-Dyk7JuVl.d.mts} +0 -0
  407. /package/dist/{schemas-DaRSfYLf.d.mts → schemas-Kq33MTPY.d.mts} +0 -0
  408. /package/dist/{server-lifecycle-YoSGFGnU.d.mts → server-lifecycle-47mygK3E.d.mts} +0 -0
  409. /package/dist/{server-lifecycle-FXTPW39-.mjs → server-lifecycle-Cg47L59Q.mjs} +0 -0
  410. /package/dist/{shared-schemas-CPShiLNp.mjs → shared-schemas-CKe2uN4-.mjs} +0 -0
  411. /package/dist/{storage-namespace-definition-Bkx5rSto.d.mts → storage-namespace-definition-C3XbpiP8.d.mts} +0 -0
  412. /package/dist/{storage-namespace-definition-CqSdsuCC.mjs → storage-namespace-definition-RvjfFysN.mjs} +0 -0
  413. /package/dist/{telemetry-CvdLBWuk.mjs → telemetry-O0394b7p.mjs} +0 -0
  414. /package/dist/{tray-menu-service-DuXq5k22.mjs → tray-menu-service-B5YPK_YF.mjs} +0 -0
  415. /package/dist/{types-C2Ob9zz_.d.mts → types-5Gw3iVpK.d.mts} +0 -0
  416. /package/dist/{types-dyP-bXXE.d.mts → types-BhXRffJ_.d.mts} +0 -0
  417. /package/dist/{types-MfJZ67e9.d.mts → types-D-bP8RRE.d.mts} +0 -0
  418. /package/dist/{variant-CT6XBP6T.mjs → variant-COVbYmMs.mjs} +0 -0
  419. /package/dist/{window-registry-CBcrGTv4.d.mts → window-registry-CfEi_Ji4.d.mts} +0 -0
  420. /package/dist/{window-registry-DW-dKRjQ.mjs → window-registry-XjOExitT.mjs} +0 -0
@@ -0,0 +1,385 @@
1
+ import { IMakaioBus } from "@makaio/framework/bus";
2
+ import { DispatchingAuth, TransportAuth } from "@makaio/framework/node/transports";
3
+ import { BridgeBrowserOptions, CoreBootOptions, CoreBootOptions as CoreBootOptions$1, CredentialProvider, DescriptorSourcePackageGroup, DiscoveredExtension, ExplicitDescriptorDiscovery, ExtensionDiscovery, FileConfigStorage, FileRegistryCache, FilesystemDescriptorDiscovery, FilesystemDescriptorDiscoveryOptions, FrameworkModuleResolver, HonoRouteGraph, HonoRouteGraph as HonoRouteGraph$1, HonoRouteGraphOptions, HttpContributionPhase, HttpRouteContribution, HttpRouteGraphBuilder, LoadExtensionsOptions, MachineKeyStatus, MachineKeyValidation, MakaioRuntime, MakaioRuntime as MakaioRuntime$1, NodeCredentialProvider, PersistedMachineIdentity, ServerTransportProvider, ServerTransportProvider as ServerTransportProvider$1, StoredCredentialProvider, TransportReadyInfo, bootMakaioRuntimeCore, bridgeExtensionBrowserEntries, createHonoRouteGraph, createHttpRouteGraphBuilder, entrypointStem, isCliContributionLike, isMakaioExtensionLike, isMissingOptionalRuntimePackage, isWithinDirectory, loadExtensions, loadOrCreateMachineIdentity, machineKeysExist, registerAdapterNameResolver, resolveConventionEntrypoint, resolveStaticModelRegistryPath, runMigrations, tryImport, validateMachineKeys } from "@makaio/framework/runtime-node";
4
+
5
+ //#region runtimes/bun/src/bus-server-transport.d.ts
6
+ /**
7
+ * Configuration options for {@link BunBusServerTransportProvider}.
8
+ */
9
+ interface BunBusServerTransportOptions {
10
+ /**
11
+ * Auth strategy.
12
+ *
13
+ * When `undefined` the server runs with no authentication. Pass a
14
+ * {@link DispatchingAuth} to support hot-swapping E2E auth after machine
15
+ * identity is loaded.
16
+ */
17
+ auth?: TransportAuth;
18
+ /**
19
+ * Loopback transport registry name for in-process cross-client relay.
20
+ *
21
+ * Defaults to `'bun'`.
22
+ */
23
+ loopbackName?: string;
24
+ }
25
+ /**
26
+ * Minimal contract for the raw Bun `ServerWebSocket` fields used by the adapter.
27
+ *
28
+ * Avoids importing Bun-specific types so this module compiles with standard
29
+ * TypeScript (tests, CI).
30
+ */
31
+ interface RawServerWebSocket {
32
+ send(data: string | ArrayBufferView | ArrayBufferLike, compress?: boolean): number;
33
+ close(code?: number, reason?: string): void;
34
+ readonly readyState: number;
35
+ }
36
+ /**
37
+ * Native Bun WebSocket handler shape for use with `Bun.serve({ websocket })`.
38
+ *
39
+ * The composition root passes an instance of this (obtained from
40
+ * {@link BunBusServerTransportProvider.createWebSocketHandler}) directly to
41
+ * `Bun.serve` so the bus transport operates independently of the Hono app.
42
+ *
43
+ * Setting `binaryType: 'arraybuffer'` ensures binary frames are delivered as
44
+ * `ArrayBuffer`, which matches the {@link BunServerWebSocketAdapter.dispatchMessage}
45
+ * signature and avoids a Node `Buffer` conversion step.
46
+ */
47
+ interface BunWebSocketHandler {
48
+ /**
49
+ * Instructs Bun to deliver binary frames as `ArrayBuffer` objects.
50
+ *
51
+ * Without this, Bun's default `binaryType` is `'nodebuffer'` which delivers
52
+ * binary frames as Node `Buffer` instances. Setting `'arraybuffer'` keeps the
53
+ * message type consistent with `dispatchMessage`'s `string | ArrayBuffer`
54
+ * signature.
55
+ */
56
+ binaryType: 'arraybuffer';
57
+ /**
58
+ * Called when a new WebSocket connection is opened.
59
+ * @param ws - The raw Bun server-side WebSocket.
60
+ */
61
+ open(ws: RawServerWebSocket): void;
62
+ /**
63
+ * Called when a message is received from the client.
64
+ * @param ws - The raw Bun server-side WebSocket.
65
+ * @param message - The message payload (string or ArrayBuffer when binaryType is arraybuffer).
66
+ */
67
+ message(ws: RawServerWebSocket, message: string | ArrayBuffer): void;
68
+ /**
69
+ * Called when the WebSocket connection is closed.
70
+ * @param ws - The raw Bun server-side WebSocket.
71
+ * @param code - WebSocket close code.
72
+ * @param reason - WebSocket close reason string.
73
+ */
74
+ close(ws: RawServerWebSocket, code: number, reason: string): void;
75
+ }
76
+ /**
77
+ * Platform-specific bus server transport provider for Bun.
78
+ *
79
+ * Uses a native Bun WebSocket handler (obtained from
80
+ * {@link createWebSocketHandler}) and {@link HonoWebSocketBridge} to accept
81
+ * WebSocket connections and feed them into the framework bus server. The
82
+ * handler is wired directly to `Bun.serve({ websocket })`, making the bus
83
+ * transport independent of the Hono app lifecycle — route graph rebuilds
84
+ * (which create a fresh `new Hono()`) do not affect the bus.
85
+ */
86
+ declare class BunBusServerTransportProvider implements ServerTransportProvider$1 {
87
+ private readonly options;
88
+ /** WebSocket bridge between the native handler and ServerTransport. */
89
+ private readonly bridge;
90
+ /** Active bus server instance. Set during connect, cleared on disconnect. */
91
+ private busServer;
92
+ /**
93
+ * Whether the bus server has completed startup and is accepting connections.
94
+ * Guards against WebSocket upgrade requests racing with bus startup.
95
+ */
96
+ private busReady;
97
+ /**
98
+ * Set synchronously at the top of {@link connect} to close the TOCTOU window
99
+ * between the guard check and the first `await`.
100
+ */
101
+ private connecting;
102
+ /**
103
+ * @param options - Transport configuration.
104
+ */
105
+ constructor(options: BunBusServerTransportOptions);
106
+ /**
107
+ * The {@link DispatchingAuth} instance if the caller passed one.
108
+ *
109
+ * Exposed so composition roots that need to hot-swap E2E auth after machine
110
+ * identity becomes available can call `dispatchingAuth.setE2EAuth(e2eAuth)`.
111
+ * @returns The {@link DispatchingAuth} instance, or `undefined` when auth was
112
+ * not provided or is not a `DispatchingAuth`.
113
+ */
114
+ get dispatchingAuth(): DispatchingAuth | undefined;
115
+ /**
116
+ * Create a native Bun WebSocket handler for `Bun.serve({ websocket })`.
117
+ *
118
+ * The returned handler replaces the former Hono `upgradeWebSocket` route.
119
+ * The composition root passes this to `Bun.serve()` directly, making the
120
+ * bus transport independent of Hono app lifecycle (and route graph rebuilds).
121
+ *
122
+ * A `WeakMap` keyed on the raw `ServerWebSocket` object stores the
123
+ * per-connection {@link BunServerWebSocketAdapter} so there is no mutation
124
+ * of the Bun socket and no memory leak when connections close.
125
+ * @returns Bun-native WebSocket handler with `open`, `message`, and `close`
126
+ * callbacks, plus `binaryType: 'arraybuffer'` to ensure binary frames
127
+ * arrive as `ArrayBuffer` rather than Node `Buffer`.
128
+ */
129
+ createWebSocketHandler(): BunWebSocketHandler;
130
+ /**
131
+ * Start the bus server and mark the transport as ready to accept connections.
132
+ * @param bus - Bus instance to attach the transport to.
133
+ * @param _machineId - Machine identifier (unused; callers provide auth externally).
134
+ */
135
+ connect(bus: IMakaioBus, _machineId: string): Promise<void>;
136
+ /**
137
+ * Stop the bus server and close the bridge.
138
+ *
139
+ * The Bun server is owned by the composition root and is not closed here.
140
+ */
141
+ disconnect(): Promise<void>;
142
+ /**
143
+ * Stop the bus server and mark the transport as not ready.
144
+ * @param reason - Context string used in error log messages.
145
+ */
146
+ private stopBusServer;
147
+ }
148
+ //#endregion
149
+ //#region runtimes/bun/src/bun-route-graph-fetch.d.ts
150
+ /**
151
+ * Minimal Bun server capability needed to upgrade an HTTP request to a
152
+ * WebSocket connection.
153
+ */
154
+ interface BunRouteGraphUpgradeServer {
155
+ /**
156
+ * Upgrade a request to the native Bun WebSocket handler.
157
+ * @param request - Incoming HTTP request.
158
+ * @returns `true` when Bun accepted the upgrade.
159
+ */
160
+ upgrade(request: Request): boolean;
161
+ }
162
+ /**
163
+ * Fetch handler shape accepted by `Bun.serve` for a route-graph backed server.
164
+ */
165
+ type BunRouteGraphFetch = (request: Request, server: BunRouteGraphUpgradeServer) => Response | Promise<Response> | undefined | Promise<undefined>;
166
+ /**
167
+ * Create the Bun fetch facade for a route graph plus native WebSocket server.
168
+ *
169
+ * Bun's `websocket` handlers are invoked only after the fetch handler calls
170
+ * `server.upgrade(request)`. This wrapper keeps that infrastructure concern at
171
+ * the Bun platform boundary while all non-WebSocket HTTP requests continue to
172
+ * flow through the stable {@link HonoRouteGraph.fetch} facade.
173
+ * @param routeGraph - Stable route graph facade for HTTP requests.
174
+ * @returns Bun-compatible fetch function that upgrades bus WebSocket requests.
175
+ */
176
+ declare function createBunRouteGraphFetch(routeGraph: HonoRouteGraph$1): BunRouteGraphFetch;
177
+ //#endregion
178
+ //#region runtimes/bun/src/http-server-utils.d.ts
179
+ /**
180
+ * Minimal Bun server interface for port resolution.
181
+ *
182
+ * Duck-typed against `ReturnType<typeof Bun.serve>` — covers the address
183
+ * properties used by this module without importing `bun-types`.
184
+ */
185
+ interface BunServer {
186
+ /** The TCP port the server is listening on. */
187
+ readonly port: number;
188
+ /** The hostname the server is bound to (e.g. `'localhost'` or `'0.0.0.0'`). */
189
+ readonly hostname: string;
190
+ /**
191
+ * Stop the server when the runtime owns the HTTP listener.
192
+ * @param closeActiveConnections - Whether active connections should be closed.
193
+ */
194
+ stop?: (closeActiveConnections?: boolean) => void | Promise<void>;
195
+ }
196
+ /**
197
+ * Resolve the bound TCP port from a Bun server.
198
+ *
199
+ * Unlike Node's `http.Server`, Bun's server exposes the port synchronously as
200
+ * a plain property — no need to call `server.address()`.
201
+ * @param server - Bun server instance returned by `Bun.serve()`.
202
+ * @returns Numeric TCP port.
203
+ */
204
+ declare function resolveListeningPort(server: BunServer): number;
205
+ /**
206
+ * Bound address resolved from a Bun server instance.
207
+ */
208
+ interface BunServerAddress {
209
+ /** Bound TCP port. */
210
+ port: number;
211
+ /** Bound host address (e.g. `'localhost'` or `'0.0.0.0'`). */
212
+ host: string;
213
+ }
214
+ //#endregion
215
+ //#region runtimes/bun/src/boot.d.ts
216
+ /**
217
+ * Options for {@link bootMakaioRuntime} (Bun platform).
218
+ *
219
+ * Extends the platform-agnostic {@link CoreBootOptions} with the Bun server
220
+ * instance and the pre-constructed transport. The composition root creates the
221
+ * transport and extracts the WebSocket handler before starting the Bun server,
222
+ * then passes both here.
223
+ */
224
+ interface BunBootMakaioRuntimeOptions extends CoreBootOptions$1 {
225
+ /**
226
+ * Bun server instance, already listening.
227
+ *
228
+ * Must be started with the WebSocket handler obtained from
229
+ * {@link BunBusServerTransportProvider.createWebSocketHandler} so that the
230
+ * bus transport can accept connections.
231
+ */
232
+ bunServer: BunServer;
233
+ /**
234
+ * Pre-constructed bus server transport provider.
235
+ *
236
+ * The composition root creates the transport, calls
237
+ * {@link BunBusServerTransportProvider.createWebSocketHandler} to get the
238
+ * native handler for `Bun.serve`, then passes the transport here.
239
+ * This ensures the WebSocket handler is registered before boot begins.
240
+ */
241
+ transport: BunBusServerTransportProvider;
242
+ }
243
+ /**
244
+ * Boot the full Makaio runtime against a pre-existing Bun server.
245
+ *
246
+ * Delegates all startup logic to the platform-agnostic
247
+ * {@link bootMakaioRuntimeCore}. The caller owns the Bun server and transport
248
+ * lifecycle. This function owns everything from step 1 (Config) through
249
+ * step 12 (Ready) and returns a {@link MakaioRuntime} handle that the caller
250
+ * uses to shut down.
251
+ * @param options - Boot configuration including the pre-bound Bun server and
252
+ * pre-constructed transport provider.
253
+ * @returns Runtime handle with `port`, `machineId`, and `shutdown()`.
254
+ */
255
+ declare function bootMakaioRuntime(options: BunBootMakaioRuntimeOptions): Promise<MakaioRuntime$1>;
256
+ //#endregion
257
+ //#region runtimes/bun/src/bun-host-contributions.d.ts
258
+ /** Bun-native host hooks exposed by extensions that need HTTP/WebSocket routing. */
259
+ interface BunHostContribution {
260
+ /** Wrap the host fetch handler with extension-owned routing. */
261
+ readonly createFetch?: (next: BunRouteGraphFetch) => BunRouteGraphFetch;
262
+ /** Wrap the host WebSocket handler with extension-owned routing. */
263
+ readonly createWebSocketHandler?: (next: BunWebSocketHandler) => BunWebSocketHandler;
264
+ }
265
+ /** Extension package shape that carries Bun host hooks. */
266
+ interface BunHostExtensionPackage {
267
+ /** Extension package name. */
268
+ readonly name: string;
269
+ /** Human-readable extension package name. */
270
+ readonly displayName: string;
271
+ /** Extension package version. */
272
+ readonly version?: string;
273
+ /** Bun-native host hooks consumed by Bun composition roots. */
274
+ readonly bun: BunHostContribution;
275
+ }
276
+ /** Minimal active-extension iterator exposed by ExtensionCoordinator. */
277
+ interface ActiveBunHostExtensionIterator {
278
+ /**
279
+ * Iterate active extension packages after coordinator startup.
280
+ * @param callback - Receives active package metadata.
281
+ */
282
+ forEachActiveExtension(callback: (name: string, pkg: Pick<BunHostExtensionPackage, 'name' | 'displayName'>) => void): void;
283
+ }
284
+ /** Mutable router passed to `Bun.serve` before runtime boot finishes. */
285
+ interface BunHostRouter {
286
+ /** Stable fetch delegate for `Bun.serve`. */
287
+ readonly fetch: BunRouteGraphFetch;
288
+ /** Stable WebSocket delegate for `Bun.serve`. */
289
+ readonly websocket: BunWebSocketHandler;
290
+ /**
291
+ * Activate Bun host hooks from packages that survived extension lifecycle gates.
292
+ * @param packages - Active extension packages with optional Bun hooks.
293
+ */
294
+ activate(packages: readonly BunHostExtensionPackage[]): void;
295
+ }
296
+ /**
297
+ * Create a stable Bun router whose delegates can be activated after extension boot.
298
+ *
299
+ * The force point is lifecycle order: `Bun.serve` needs stable callbacks before
300
+ * the runtime starts, while extension host hooks must only affect routing after
301
+ * the coordinator has accepted the package as active.
302
+ * @param baseFetch - Base route-graph fetch handler.
303
+ * @param baseWebSocket - Base bus WebSocket handler.
304
+ * @returns Mutable router with stable `Bun.serve` delegates.
305
+ */
306
+ declare function createBunHostRouter(baseFetch: BunRouteGraphFetch, baseWebSocket: BunWebSocketHandler): BunHostRouter;
307
+ /**
308
+ * Collect Bun host packages from the coordinator's active extension snapshot.
309
+ * @param coordinator - Active extension iterator captured during boot.
310
+ * @returns Active packages with valid Bun host hooks.
311
+ */
312
+ declare function collectActiveBunHostPackages(coordinator: ActiveBunHostExtensionIterator): readonly BunHostExtensionPackage[];
313
+ /**
314
+ * Normalize a static extension module default into Bun host packages.
315
+ * @param value - Extension package or package array.
316
+ * @returns Packages with valid Bun host hooks.
317
+ */
318
+ declare function normalizeBunHostPackages(value: unknown): readonly BunHostExtensionPackage[];
319
+ /**
320
+ * Compose Bun fetch host hooks in package order.
321
+ * @param baseFetch - Base fetch handler.
322
+ * @param packages - Packages with optional Bun hooks.
323
+ * @returns Wrapped fetch handler.
324
+ */
325
+ declare function composeBunHostFetch(baseFetch: BunRouteGraphFetch, packages: readonly BunHostExtensionPackage[]): BunRouteGraphFetch;
326
+ /**
327
+ * Compose Bun WebSocket host hooks in package order.
328
+ * @param baseHandler - Base WebSocket handler.
329
+ * @param packages - Packages with optional Bun hooks.
330
+ * @returns Wrapped WebSocket handler.
331
+ */
332
+ declare function composeBunHostWebSocket(baseHandler: BunWebSocketHandler, packages: readonly BunHostExtensionPackage[]): BunWebSocketHandler;
333
+ //#endregion
334
+ //#region runtimes/bun/src/graceful-shutdown.d.ts
335
+ /** Options for a Bun composition root shutdown handler. */
336
+ interface BunGracefulShutdownOptions {
337
+ /** Log prefix without brackets, e.g. `server` or `relay`. */
338
+ readonly label: string;
339
+ /** Runtime handle returned by `bootMakaioRuntime`. */
340
+ readonly runtime: Pick<MakaioRuntime$1, 'shutdown'>;
341
+ /** Bun server owned by the composition root. */
342
+ readonly bunServer: BunServer;
343
+ /** Force-exit timeout in milliseconds. Defaults to 10 seconds. */
344
+ readonly timeoutMs?: number;
345
+ /** Process exit hook, primarily for tests. Defaults to `process.exit`. */
346
+ readonly exit?: (code: number) => never;
347
+ }
348
+ /**
349
+ * Create an idempotent signal shutdown handler for Bun composition roots.
350
+ * @param options - Runtime, server, and logging configuration.
351
+ * @returns Signal handler suitable for `process.once`.
352
+ */
353
+ declare function createGracefulShutdown(options: BunGracefulShutdownOptions): (signal: string) => Promise<void>;
354
+ //#endregion
355
+ //#region runtimes/bun/src/server-env.d.ts
356
+ /** Resolved Bun HTTP server bind configuration. */
357
+ interface BunServerEnvConfig {
358
+ /** HTTP server port. */
359
+ readonly port: number;
360
+ /** Bind host. */
361
+ readonly host: string;
362
+ }
363
+ /** Policy for invalid environment values. */
364
+ type InvalidBunServerEnvPolicy = 'throw' | 'warn';
365
+ /** Options for reading Bun server bind configuration from an env object. */
366
+ interface ReadBunServerEnvOptions {
367
+ /** Application label used in warnings. */
368
+ readonly appName: string;
369
+ /** Environment object. Defaults to `process.env`. */
370
+ readonly env?: NodeJS.ProcessEnv;
371
+ /** Default HTTP port. Defaults to 3000. */
372
+ readonly defaultPort?: number;
373
+ /** Default bind host. Defaults to `0.0.0.0`. */
374
+ readonly defaultHost?: string;
375
+ /** Invalid-value policy. Defaults to `throw`. */
376
+ readonly invalid?: InvalidBunServerEnvPolicy;
377
+ }
378
+ /**
379
+ * Read and validate Bun server bind configuration from environment variables.
380
+ * @param options - Env source, defaults, and invalid-value policy.
381
+ * @returns Resolved Bun server bind configuration.
382
+ */
383
+ declare function readBunServerEnv(options: ReadBunServerEnvOptions): BunServerEnvConfig;
384
+ //#endregion
385
+ export { type ActiveBunHostExtensionIterator, type BridgeBrowserOptions, type BunBootMakaioRuntimeOptions, type BunBusServerTransportOptions, BunBusServerTransportProvider, type BunGracefulShutdownOptions, type BunHostContribution, type BunHostExtensionPackage, type BunHostRouter, type BunRouteGraphFetch, type BunRouteGraphUpgradeServer, type BunServer, type BunServerAddress, type BunServerEnvConfig, type BunWebSocketHandler, type CoreBootOptions, type CredentialProvider, type DescriptorSourcePackageGroup, type DiscoveredExtension, ExplicitDescriptorDiscovery, type ExtensionDiscovery, FileConfigStorage, FileRegistryCache, FilesystemDescriptorDiscovery, type FilesystemDescriptorDiscoveryOptions, type FrameworkModuleResolver, type HonoRouteGraph, type HonoRouteGraphOptions, type HttpContributionPhase, type HttpRouteContribution, type HttpRouteGraphBuilder, type InvalidBunServerEnvPolicy, type LoadExtensionsOptions, type MachineKeyStatus, type MachineKeyValidation, type MakaioRuntime, NodeCredentialProvider, type PersistedMachineIdentity, type ReadBunServerEnvOptions, type ServerTransportProvider, StoredCredentialProvider, type TransportReadyInfo, bootMakaioRuntime, bootMakaioRuntimeCore, bridgeExtensionBrowserEntries, collectActiveBunHostPackages, composeBunHostFetch, composeBunHostWebSocket, createBunHostRouter, createBunRouteGraphFetch, createGracefulShutdown, createHonoRouteGraph, createHttpRouteGraphBuilder, entrypointStem, isCliContributionLike, isMakaioExtensionLike, isMissingOptionalRuntimePackage, isWithinDirectory, loadExtensions, loadOrCreateMachineIdentity, machineKeysExist, normalizeBunHostPackages, readBunServerEnv, registerAdapterNameResolver, resolveConventionEntrypoint, resolveListeningPort, resolveStaticModelRegistryPath, runMigrations, tryImport, validateMachineKeys };
@@ -0,0 +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,NodeCredentialProvider as c,StoredCredentialProvider as l,bootMakaioRuntimeCore as u,bootMakaioRuntimeCore as d,bridgeExtensionBrowserEntries as f,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 N(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 ee(e){return e.port}async function P(e){let{port:t,hostname:n}=e.bunServer,r=e.createMount??(await import(`../create-static-mount-CFGo91CI.mjs`)).defaultCreateMount;return d(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 NodeCredentialProvider,l as StoredCredentialProvider,P as bootMakaioRuntime,u as bootMakaioRuntimeCore,f as bridgeExtensionBrowserEntries,I as collectActiveBunHostPackages,R as composeBunHostFetch,z as composeBunHostWebSocket,F as createBunHostRouter,N 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,ee as resolveListeningPort,T as resolveStaticModelRegistryPath,E as runMigrations,D as tryImport,O as validateMachineKeys};
@@ -0,0 +1,61 @@
1
+ import * as _$zod from "zod";
2
+ import * as _$_makaio_core0 from "@makaio/framework/core";
3
+ import * as _$zod_v4_core0 from "zod/v4/core";
4
+
5
+ //#region runtimes/node/src/bus/runtime/namespace.d.ts
6
+ /**
7
+ * Runtime namespace for bus operations.
8
+ *
9
+ * Provides typed subjects for querying runtime-specific resources.
10
+ * Registered globally so lifecycle files can import subjects.
11
+ */
12
+ declare const RuntimeNamespace: _$_makaio_core0.BusNamespaceDefinition<"runtime", {
13
+ database: {
14
+ request: _$zod.ZodObject<{}, _$zod_v4_core0.$strip>;
15
+ response: _$zod.ZodObject<{
16
+ db: _$zod.ZodUnknown;
17
+ }, _$zod_v4_core0.$strip>;
18
+ };
19
+ machineIdentity: {
20
+ request: _$zod.ZodObject<{}, _$zod_v4_core0.$strip>;
21
+ response: _$zod.ZodObject<{
22
+ identity: _$zod.ZodUnknown;
23
+ }, _$zod_v4_core0.$strip>;
24
+ };
25
+ busPort: {
26
+ request: _$zod.ZodObject<{}, _$zod_v4_core0.$strip>;
27
+ response: _$zod.ZodObject<{
28
+ port: _$zod.ZodNumber;
29
+ }, _$zod_v4_core0.$strip>;
30
+ };
31
+ }>;
32
+ /**
33
+ * Runtime subjects for type-safe bus operations.
34
+ *
35
+ * Subjects:
36
+ * - database: Query for Drizzle database handle
37
+ * - machineIdentity: Query for machine identity
38
+ * - busPort: Query for the bus server WebSocket port
39
+ */
40
+ declare const RuntimeSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSubjectDefinitions<"runtime", {
41
+ database: {
42
+ request: _$zod.ZodObject<{}, _$zod_v4_core0.$strip>;
43
+ response: _$zod.ZodObject<{
44
+ db: _$zod.ZodUnknown;
45
+ }, _$zod_v4_core0.$strip>;
46
+ };
47
+ machineIdentity: {
48
+ request: _$zod.ZodObject<{}, _$zod_v4_core0.$strip>;
49
+ response: _$zod.ZodObject<{
50
+ identity: _$zod.ZodUnknown;
51
+ }, _$zod_v4_core0.$strip>;
52
+ };
53
+ busPort: {
54
+ request: _$zod.ZodObject<{}, _$zod_v4_core0.$strip>;
55
+ response: _$zod.ZodObject<{
56
+ port: _$zod.ZodNumber;
57
+ }, _$zod_v4_core0.$strip>;
58
+ };
59
+ }>, "runtime">;
60
+ //#endregion
61
+ export { RuntimeNamespace, RuntimeSubjects };
@@ -0,0 +1 @@
1
+ import{RuntimeSchemas as e}from"./schemas.mjs";import{createBusNamespace as t}from"@makaio/framework/core";const n=t(`runtime`,e),r=n.subjects;export{n as RuntimeNamespace,r as RuntimeSubjects};
@@ -0,0 +1,54 @@
1
+ import { z } from "zod";
2
+
3
+ //#region runtimes/node/src/bus/runtime/schemas.d.ts
4
+ /**
5
+ * Runtime resource schemas.
6
+ *
7
+ * Provides bus subjects for querying runtime-specific resources
8
+ * (database, machine identity) that vary by runtime environment.
9
+ * NodeRuntime registers providers; memory-only runtimes leave them unregistered.
10
+ */
11
+ declare const RuntimeSchemas: {
12
+ /**
13
+ * Query for database handle.
14
+ * Registered by NodeRuntime. Absent in memory-only runtimes.
15
+ *
16
+ * Subject: `runtime.database`
17
+ * Type: Request (RPC)
18
+ */
19
+ database: {
20
+ request: z.ZodObject<{}, z.core.$strip>;
21
+ response: z.ZodObject<{
22
+ db: z.ZodUnknown;
23
+ }, z.core.$strip>;
24
+ };
25
+ /**
26
+ * Query for machine identity (E2E encryption keys).
27
+ * Registered by NodeRuntime. Absent in memory-only runtimes.
28
+ *
29
+ * Subject: `runtime.machineIdentity`
30
+ * Type: Request (RPC)
31
+ */
32
+ machineIdentity: {
33
+ request: z.ZodObject<{}, z.core.$strip>;
34
+ response: z.ZodObject<{
35
+ identity: z.ZodUnknown;
36
+ }, z.core.$strip>;
37
+ };
38
+ /**
39
+ * Query for the bus server WebSocket port.
40
+ * Registered at the app entry point (Electron main, CLI) where the bus
41
+ * server is created. Absent in memory-only runtimes.
42
+ *
43
+ * Subject: `runtime.busPort`
44
+ * Type: Request (RPC)
45
+ */
46
+ busPort: {
47
+ request: z.ZodObject<{}, z.core.$strip>;
48
+ response: z.ZodObject<{
49
+ port: z.ZodNumber;
50
+ }, z.core.$strip>;
51
+ };
52
+ };
53
+ //#endregion
54
+ export { RuntimeSchemas };
@@ -0,0 +1 @@
1
+ import{z as e}from"zod";const t={database:{request:e.object({}),response:e.object({db:e.unknown()})},machineIdentity:{request:e.object({}),response:e.object({identity:e.unknown()})},busPort:{request:e.object({}),response:e.object({port:e.number()})}};export{t as RuntimeSchemas};
@@ -0,0 +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-CkV_VRdJ.mjs";
2
+ export { DiscoveredExtension, ExplicitDescriptorDiscovery, ExtensionDiscovery, ExtensionEntrypointModule, FilesystemDescriptorDiscovery, FilesystemDescriptorDiscoveryOptions, MergedDescriptorDiscovery };
@@ -0,0 +1 @@
1
+ import*as e from"node:fs/promises";import*as t from"node:path";import{glob as n}from"glob";import{parseExtensionDescriptor as r}from"@makaio/framework/contracts";var i=class{localNodeModulesDir;extensionsDir;nodeModulesDir;constructor(e,n){this.localNodeModulesDir=n?.localNodeModulesDir??t.join(e??process.cwd(),`node_modules`),this.extensionsDir=n?.extensionsDir??!1,this.nodeModulesDir=n?.nodeModulesDir??!1}async discover(){let[e,t,n]=await Promise.all([this.scanLocal(),this.scanInstalled(),this.scanGlobalNpm()]);return this.deduplicate(e,t,n)}async scanLocal(){if(this.localNodeModulesDir===!1)return[];let e=[t.join(this.localNodeModulesDir,`*/descriptor.json`),t.join(this.localNodeModulesDir,`@*/*/descriptor.json`)];return this.scanPatterns(e,`local`)}async scanInstalled(){if(this.extensionsDir===!1)return[];let e=[t.join(this.extensionsDir,`*/descriptor.json`),t.join(this.extensionsDir,`@*/*/descriptor.json`)];return this.scanPatterns(e,`installed`)}async scanGlobalNpm(){if(this.nodeModulesDir===!1)return[];let e=[t.join(this.nodeModulesDir,`*/descriptor.json`),t.join(this.nodeModulesDir,`@*/*/descriptor.json`)];return this.scanPatterns(e,`global-npm`)}async scanPatterns(i,a){let o=[];for(let s of i){let i=s.split(t.sep).join(`/`),c;try{c=await n(i,{windowsPathsNoEscape:!0})}catch(e){console.warn(`[extensions] Skipping scan for pattern ${i}:`,e instanceof Error?e.message:e);continue}for(let n of c)try{let i=await e.readFile(n,`utf-8`),s=r(JSON.parse(i)),c=t.dirname(n);o.push({descriptor:s,extensionPath:c,source:a})}catch(e){console.warn(`[extensions] Skipping invalid descriptor at ${n}:`,e instanceof Error?e.message:e)}}return o}deduplicate(...e){return s(e)}},a=class{extensions;constructor(e){this.extensions=e}async discover(){return this.extensions}},o=class{discoveries;constructor(e){this.discoveries=e}async discover(){return s(await Promise.all(this.discoveries.map(e=>e.discover())))}};function s(e){let t=new Map;for(let n of e)for(let e of n)t.has(e.descriptor.name)||t.set(e.descriptor.name,e);return[...t.values()]}export{a as ExplicitDescriptorDiscovery,i as FilesystemDescriptorDiscovery,o as MergedDescriptorDiscovery};
@@ -0,0 +1,2 @@
1
+ import { a as isMakaioExtensionLike, c as resolveConventionEntrypoint, i as isCliContributionLike, o as isWithinDirectory, r as entrypointStem } from "../load-extensions-D9nbDIiW.mjs";
2
+ export { entrypointStem, isCliContributionLike, isMakaioExtensionLike, isWithinDirectory, resolveConventionEntrypoint };
@@ -0,0 +1 @@
1
+ import{a as e,c as t,n,o as r,r as i}from"../load-extensions-C-TqCwzL.mjs";export{n as entrypointStem,i as isCliContributionLike,e as isMakaioExtensionLike,r as isWithinDirectory,t as resolveConventionEntrypoint};