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

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 (419) hide show
  1. package/LICENSE +1 -1
  2. package/dist/.makaio-build.json +5 -0
  3. package/dist/account-identity-DT5NOtFi.mjs +1 -0
  4. package/dist/adapter-C1eI-fGV.mjs +1 -0
  5. package/dist/adapters/acp-client/index.d.mts +6013 -14
  6. package/dist/adapters/acp-client/index.mjs +3 -1
  7. package/dist/adapters/config/index.d.mts +1 -1
  8. package/dist/adapters/config/index.mjs +1 -1
  9. package/dist/adapters/index.d.mts +47 -20
  10. package/dist/adapters/index.mjs +13 -6
  11. package/dist/adapters/node.d.mts +4 -4
  12. package/dist/adapters/node.mjs +4 -4
  13. package/dist/adapters/stream-session/index.d.mts +30 -0
  14. package/dist/adapters/stream-session/index.mjs +1 -1
  15. package/dist/artifact-B3npq1cy.mjs +1 -0
  16. package/dist/bus/index.d.mts +866 -203
  17. package/dist/bus/index.mjs +1 -1
  18. package/dist/bus-Caz3Jpbc.mjs +1 -0
  19. package/dist/bus-Hb-LGzgb.mjs +2 -0
  20. package/dist/chunk-DTipWd-i.mjs +1 -0
  21. package/dist/client-bx74gm4R.mjs +1 -0
  22. package/dist/clients/index.d.mts +113 -35
  23. package/dist/clients/index.mjs +2 -2
  24. package/dist/{clients-namespace-UHj5wt-l.d.mts → clients-namespace-GmSJpBUV.d.mts} +8 -8
  25. package/dist/{config-namespace-ChZOpi1W.d.mts → config-namespace-CPY9YsR8.d.mts} +4 -4
  26. package/dist/contracts/adapter/index.d.mts +3 -3
  27. package/dist/contracts/adapter/index.mjs +1 -1
  28. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  29. package/dist/contracts/artifact/index.d.mts +2 -0
  30. package/dist/contracts/artifact/index.mjs +1 -0
  31. package/dist/contracts/client/index.d.mts +2 -2
  32. package/dist/contracts/client/index.mjs +1 -1
  33. package/dist/contracts/common/index.d.mts +1 -1
  34. package/dist/contracts/config/index.d.mts +8 -8
  35. package/dist/contracts/config/index.mjs +1 -1
  36. package/dist/contracts/extension/index.d.mts +4 -3
  37. package/dist/contracts/extension/index.mjs +1 -1
  38. package/dist/contracts/facet/index.d.mts +2 -0
  39. package/dist/contracts/facet/index.mjs +1 -0
  40. package/dist/contracts/harness/index.d.mts +1 -1
  41. package/dist/contracts/harness/index.mjs +1 -1
  42. package/dist/contracts/host/index.d.mts +1 -1
  43. package/dist/contracts/host/index.mjs +1 -1
  44. package/dist/contracts/index.d.mts +12370 -1990
  45. package/dist/contracts/index.mjs +1 -1
  46. package/dist/contracts/materialization/index.d.mts +4 -0
  47. package/dist/contracts/materialization/index.mjs +1 -0
  48. package/dist/contracts/model-registry/index.d.mts +1 -1
  49. package/dist/contracts/model-registry/index.mjs +1 -1
  50. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  51. package/dist/contracts/native-session-supervisor/index.mjs +1 -1
  52. package/dist/contracts/platform/index.d.mts +1 -1
  53. package/dist/contracts/platform/index.mjs +1 -1
  54. package/dist/contracts/provider/index.d.mts +2 -2
  55. package/dist/contracts/provider/index.mjs +1 -1
  56. package/dist/contracts/session/index.d.mts +3 -3
  57. package/dist/contracts/session/index.mjs +1 -1
  58. package/dist/contracts/shared/index.d.mts +2 -2
  59. package/dist/contracts/shared/index.mjs +1 -1
  60. package/dist/contracts/skill/index.d.mts +1 -1
  61. package/dist/contracts/skill/index.mjs +1 -1
  62. package/dist/contracts/telemetry/index.d.mts +2 -0
  63. package/dist/contracts/telemetry/index.mjs +1 -0
  64. package/dist/contracts/timeout/index.d.mts +1 -1
  65. package/dist/contracts/timeout/index.mjs +1 -1
  66. package/dist/contracts/toast/index.d.mts +2 -2
  67. package/dist/contracts/toast/index.mjs +1 -1
  68. package/dist/contracts/variant/index.d.mts +1 -1
  69. package/dist/contracts/variant/index.mjs +1 -1
  70. package/dist/core/index.d.mts +296 -34
  71. package/dist/core/index.mjs +1 -1
  72. package/dist/{credential-ref-DLCsoKVZ.mjs → credential-ref-YWQQENEo.mjs} +1 -1
  73. package/dist/cursor-storage-CtVJ3JzB.mjs +1 -0
  74. package/dist/{definition-DB7bbFSa.d.mts → definition-BLCdXGzh.d.mts} +17 -3
  75. package/dist/definition-CrgHIpTK.d.mts +60 -0
  76. package/dist/{definition-DkYy1PZz.mjs → definition-DZMXOnjX.mjs} +1 -1
  77. package/dist/{definition-DtUNiGom.d.mts → definition-pkJ6szUl.d.mts} +1 -1
  78. package/dist/drizzle-Eq8W1EbD.mjs +1 -0
  79. package/dist/event-Ca2yUf5i.mjs +1 -0
  80. package/dist/execution-target-CRPTfZlc.mjs +1 -0
  81. package/dist/extension-C-4BHMRI.mjs +1 -0
  82. package/dist/extension-CpIUgBKI.mjs +1 -0
  83. package/dist/facet-BuwhrThl.mjs +1 -0
  84. package/dist/filesystem-service-B8rhBRgB.mjs +1 -0
  85. package/dist/filesystem-service-p_iJVHd4.d.mts +66 -0
  86. package/dist/git/index.d.mts +210 -0
  87. package/dist/git/index.mjs +18 -0
  88. package/dist/globby-rtWVaFHv.mjs +41 -0
  89. package/dist/{handlers-DR_4_rAT.mjs → handlers-CkTsQLra.mjs} +3 -3
  90. package/dist/{harness-B6lGP9rm.mjs → harness-BRCMcvQN.mjs} +1 -1
  91. package/dist/{host-CvEht5RT.mjs → host-Br9VuOyr.mjs} +1 -1
  92. package/dist/{index-WKjrpcA_.d.mts → index-472sOmsW.d.mts} +6 -6
  93. package/dist/index-8SZkg7s6.d.mts +353 -0
  94. package/dist/index-B3PK4FIn.d.mts +5116 -0
  95. package/dist/{index-D2jejYlV.d.mts → index-B80L4YqA.d.mts} +3 -3
  96. package/dist/index-BFg9BUpx.d.mts +355 -0
  97. package/dist/index-BGfWS6GE.d.mts +483 -0
  98. package/dist/{index-DQRsGXb5.d.mts → index-BVgfS-AJ.d.mts} +2 -2
  99. package/dist/{index-CnmPtjnA.d.mts → index-B_zQC98V.d.mts} +16 -16
  100. package/dist/{index-DaEp4UWW.d.mts → index-Bh_Ne7LF.d.mts} +54 -42
  101. package/dist/{index-yvN8UcEH.d.mts → index-Bvb2mMH6.d.mts} +109 -109
  102. package/dist/{index-tKvu34DJ2.d.mts → index-CCGVh9BF2.d.mts} +242 -28
  103. package/dist/{index-C-myW_aK.d.mts → index-CGmcS0Ma.d.mts} +2 -2
  104. package/dist/{index-DEw90pa2.d.mts → index-CLpjm52M.d.mts} +3 -3
  105. package/dist/{index-DQWMu5fS.d.mts → index-Caig6TeF.d.mts} +85 -99
  106. package/dist/{index-DwCA1HWa.d.mts → index-CelJCBjk.d.mts} +15 -15
  107. package/dist/{index-ESSDWIB7.d.mts → index-ChunCFu4.d.mts} +1 -1
  108. package/dist/{index-e5C62_M3.d.mts → index-Cm0dUkWL.d.mts} +819 -85
  109. package/dist/{index-N5K1NOYs.d.mts → index-CokQYGVP.d.mts} +4 -4
  110. package/dist/{index-Bigx81Kr.d.mts → index-Cs0kZXIz2.d.mts} +1 -1
  111. package/dist/{index-6lyShOoU.d.mts → index-D5d5HeWI2.d.mts} +34 -0
  112. package/dist/{index-sBob9D25.d.mts → index-D90OmGmV.d.mts} +3 -3
  113. package/dist/{index-D1T-PPqF.d.mts → index-D9MwJ2Q8.d.mts} +3 -3
  114. package/dist/{index-BePI0ckL.d.mts → index-DANINzMu.d.mts} +1 -1
  115. package/dist/{index-BnSQE7z7.d.mts → index-DBw-89vC2.d.mts} +129 -1332
  116. package/dist/{index-C_kS2aqV2.d.mts → index-DGBu6bHi2.d.mts} +14 -14
  117. package/dist/index-DKC62dY5.d.mts +146 -0
  118. package/dist/{index-7sXlairn2.d.mts → index-DKia0MX1.d.mts} +1 -1
  119. package/dist/{index-E8d_RwaF.d.mts → index-DMKnON5s.d.mts} +1 -1
  120. package/dist/{index-Cq8B7cwK.d.mts → index-DUaw0Dw8.d.mts} +1524 -369
  121. package/dist/{index-Dd5s4MSm.d.mts → index-De3kPhlN.d.mts} +2 -2
  122. package/dist/{index-DGTFJB_8.d.mts → index-L4GjJDKb.d.mts} +116 -23
  123. package/dist/{index-iID2R9G1.d.mts → index-U-A8eyGT.d.mts} +7 -7
  124. package/dist/{index-D7T8XCku.d.mts → index-eemAKwsB.d.mts} +23 -2
  125. package/dist/{index-BXP9GK5q.d.mts → index-mNec7V-9.d.mts} +27 -27
  126. package/dist/{index-CnZOKNjU.d.mts → index-soFznFCy2.d.mts} +2 -2
  127. package/dist/{index-Ch3ph52M2.d.mts → index-vtXJuwrz.d.mts} +2 -2
  128. package/dist/{index-BnNqbx2I.d.mts → index-x_lVDp_J.d.mts} +2 -2
  129. package/dist/json-value-CmhSGMLv.mjs +1 -0
  130. package/dist/kernel/cli/index.d.mts +4 -2
  131. package/dist/kernel/cli/index.mjs +1 -1
  132. package/dist/kernel/cli/schemas.d.mts +1 -0
  133. package/dist/kernel/cli/schemas.mjs +1 -1
  134. package/dist/kernel/extension/index.d.mts +1 -1
  135. package/dist/kernel/extension/index.mjs +1 -1
  136. package/dist/kernel/index.d.mts +5 -5
  137. package/dist/kernel/index.mjs +1 -1
  138. package/dist/kernel/namespace/index.d.mts +1 -1
  139. package/dist/kernel/namespace/index.mjs +1 -1
  140. package/dist/kernel/observability/index.d.mts +1 -1
  141. package/dist/kernel/observability/index.mjs +1 -1
  142. package/dist/kernel/providers/index.d.mts +1 -1
  143. package/dist/kernel/providers/index.mjs +1 -1
  144. package/dist/kernel/window/index.d.mts +1 -1
  145. package/dist/kernel/window/index.mjs +1 -1
  146. package/dist/materialization-CuUBu4XI.mjs +1 -0
  147. package/dist/{namespace-BpIE-jQW.d.mts → namespace-5QQqbF-B.d.mts} +1018 -111
  148. package/dist/{namespace-DwCyOaZn2.d.mts → namespace-BM7Djng9.d.mts} +3 -3
  149. package/dist/namespace-BwzZJqTV.mjs +1 -0
  150. package/dist/{namespace-DZcuLwEA.d.mts → namespace-CTm3nEvh.d.mts} +1 -1
  151. package/dist/{namespace-BK2erxpV.d.mts → namespace-CaaNnKcR.d.mts} +3 -3
  152. package/dist/{namespace-GLGGcWPH.d.mts → namespace-CaoZ3S78.d.mts} +1 -1
  153. package/dist/{namespace-DXnMk3U8.d.mts → namespace-CxhsoFUP.d.mts} +27 -31
  154. package/dist/{namespace-B1E57soL.d.mts → namespace-DD8Oiqo7.d.mts} +23 -23
  155. package/dist/{namespace-BCRNwPnw.d.mts → namespace-DLovh2Ws.d.mts} +21 -21
  156. package/dist/{namespace-Ysg1N6rR.d.mts → namespace-DgqkaOVu.d.mts} +26 -25
  157. package/dist/{namespace-B5ZCshBw.d.mts → namespace-Dr8K0MCp.d.mts} +82 -81
  158. package/dist/{namespace-DGMO2E8f.mjs → namespace-DuXK5AYN.mjs} +1 -1
  159. package/dist/{namespace-ZbthBQVt.d.mts → namespace-EQniz-Aw.d.mts} +14 -14
  160. package/dist/{namespace-C54Oj025.d.mts → namespace-IV1QK__V.d.mts} +1 -1
  161. package/dist/{namespace-BKrV_2gZ.d.mts → namespace-TyiTsLFv.d.mts} +46 -45
  162. package/dist/{namespace-OwAf1Brw.mjs → namespace-xcmbQlxh.mjs} +1 -1
  163. package/dist/{native-session-supervisor-zPt624Tp.mjs → native-session-supervisor-B1TnaPUF.mjs} +1 -1
  164. package/dist/node/bus-server/index.d.mts +1 -1
  165. package/dist/node/bus-server/index.mjs +1 -1
  166. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  167. package/dist/node/bus-server/server-lifecycle.mjs +1 -1
  168. package/dist/node/machine-identity/index.mjs +2 -2
  169. package/dist/node/transports/index.d.mts +200 -7
  170. package/dist/node/transports/index.mjs +2 -2
  171. package/dist/{orchestrator-shared-D2txLAUs.mjs → orchestrator-shared-CIDiFJMD.mjs} +1 -1
  172. package/dist/{orchestrator-shared-DrjtTXYh.d.mts → orchestrator-shared-Dfa7FMyw.d.mts} +5 -5
  173. package/dist/package-DKVlsMP3.mjs +1 -0
  174. package/dist/{profile-Cq4A7kQa.mjs → profile-6ynCD5k3.mjs} +1 -1
  175. package/dist/{provider-context-BB4eD8ON.mjs → provider-context-CK6B4X_8.mjs} +1 -1
  176. package/dist/providers/index.mjs +1 -1
  177. package/dist/{providers-namespace-CDwxY_DV.d.mts → providers-namespace-DSEpli4A.d.mts} +1 -1
  178. package/dist/{schema-B295yplx.d.mts → schema-M5YTvSAG.d.mts} +114 -2
  179. package/dist/{schema-C4iznV0q.mjs → schema-e0wU_lcV.mjs} +1 -1
  180. package/dist/{schema-introspection-DCYC47_d.mjs → schema-introspection-Dn1jWQs1.mjs} +1 -1
  181. package/dist/{schemas-C5xtVqdb.d.mts → schemas-Bd0OjRQf.d.mts} +1 -1
  182. package/dist/{schemas-Ra8pz5M-.d.mts → schemas-C46QfKzv.d.mts} +24 -28
  183. package/dist/{schemas-sshQEF3l.d.mts → schemas-CDBSjg7o.d.mts} +1 -1
  184. package/dist/schemas-CR1Rripy.mjs +1 -0
  185. package/dist/schemas-CVvwIfG4.mjs +1 -0
  186. package/dist/schemas-CaLhkkLn.mjs +1 -0
  187. package/dist/{schemas-DYqKRNju.d.mts → schemas-ClOOT1W6.d.mts} +4 -4
  188. package/dist/{schemas-BfMZAwff.d.mts → schemas-DATniTHb.d.mts} +8 -8
  189. package/dist/{schemas-BWvuaL0w.d.mts → schemas-DVF1A4DF.d.mts} +4 -4
  190. package/dist/{schemas-Di0XnnMX.d.mts → schemas-DaRSfYLf.d.mts} +1 -1
  191. package/dist/{schemas-C31qbb0s.d.mts → schemas-DiYVzG6e.d.mts} +51 -48
  192. package/dist/{schemas-KMA1efQg.d.mts → schemas-j7ivZ2HI.d.mts} +3 -3
  193. package/dist/schemas-wg_6PAdV.d.mts +153 -0
  194. package/dist/scoped-bus-04pwo1uM.mjs +1 -0
  195. package/dist/service-base/index.d.mts +1 -1
  196. package/dist/services/adapter-runtime/index.d.mts +3 -3
  197. package/dist/services/adapter-runtime/index.mjs +1 -1
  198. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  199. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  200. package/dist/services/adapter-subsystem/index.d.mts +2 -2
  201. package/dist/services/adapter-subsystem/index.mjs +1 -1
  202. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  203. package/dist/services/adapter-subsystem/namespace.mjs +1 -1
  204. package/dist/services/agent-runtime/index.d.mts +2 -2
  205. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  206. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  207. package/dist/services/capability/index.d.mts +1 -1
  208. package/dist/services/capability/index.mjs +1 -1
  209. package/dist/services/cli-detection/namespace.d.mts +1 -1
  210. package/dist/services/codebase/index.d.mts +2 -2
  211. package/dist/services/codebase/namespace.d.mts +1 -1
  212. package/dist/services/codebase/schemas.d.mts +1 -1
  213. package/dist/services/compression/index.d.mts +2 -2
  214. package/dist/services/compression/namespace.d.mts +1 -1
  215. package/dist/services/compression/schemas.d.mts +1 -1
  216. package/dist/services/context-rules/index.d.mts +4 -4
  217. package/dist/services/context-rules/index.mjs +1 -1
  218. package/dist/services/credential-change/index.d.mts +1 -1
  219. package/dist/services/definition/namespace.d.mts +1 -1
  220. package/dist/services/definition/schemas.d.mts +1 -1
  221. package/dist/services/dialog/namespace.d.mts +1 -1
  222. package/dist/services/dialog/schemas.d.mts +1 -1
  223. package/dist/services/execution-target/index.d.mts +4 -4
  224. package/dist/services/execution-target/index.mjs +1 -1
  225. package/dist/services/execution-target/namespace.d.mts +1 -1
  226. package/dist/services/execution-target/schemas.d.mts +1 -1
  227. package/dist/services/execution-target/schemas.mjs +1 -1
  228. package/dist/services/filesystem/index.d.mts +3 -0
  229. package/dist/services/filesystem/index.mjs +1 -0
  230. package/dist/services/filesystem/namespace.d.mts +7 -7
  231. package/dist/services/filesystem/schemas.d.mts +4 -4
  232. package/dist/services/git/namespace.d.mts +1163 -0
  233. package/dist/services/git/namespace.mjs +1 -0
  234. package/dist/services/git/schemas.d.mts +932 -0
  235. package/dist/services/git/schemas.mjs +1 -0
  236. package/dist/services/harness/index.d.mts +35 -35
  237. package/dist/services/harness/index.mjs +1 -1
  238. package/dist/services/harness/storage/schema.d.mts +5 -5
  239. package/dist/services/index.d.mts +1411 -928
  240. package/dist/services/index.mjs +1 -1
  241. package/dist/services/local-notification/index.d.mts +1 -1
  242. package/dist/services/local-notification/namespace.d.mts +1 -1
  243. package/dist/services/local-notification/schemas.d.mts +1 -1
  244. package/dist/services/log-import/browser.d.mts +2 -2
  245. package/dist/services/log-import/index.d.mts +23 -24
  246. package/dist/services/log-import/index.mjs +2 -2
  247. package/dist/services/log-import/log-import.d.mts +1 -1
  248. package/dist/services/log-import/log-import.mjs +1 -1
  249. package/dist/services/log-import/namespace.d.mts +1 -1
  250. package/dist/services/log-import/namespace.mjs +1 -1
  251. package/dist/services/log-import/schemas.d.mts +1 -1
  252. package/dist/services/log-import/schemas.mjs +1 -1
  253. package/dist/services/model-registry/index.d.mts +1 -1
  254. package/dist/services/model-registry/index.mjs +1 -1
  255. package/dist/services/preferences/index.d.mts +2 -2
  256. package/dist/services/preferences/schemas.d.mts +1 -1
  257. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  258. package/dist/services/provider-context/index.d.mts +1 -1
  259. package/dist/services/provider-context/index.mjs +1 -1
  260. package/dist/services/provider-runtime/index.d.mts +1 -1
  261. package/dist/services/provider-runtime/index.mjs +1 -1
  262. package/dist/services/session/handlers/index.d.mts +1 -1
  263. package/dist/services/session/handlers/index.mjs +1 -1
  264. package/dist/services/session/index.d.mts +10 -10
  265. package/dist/services/session/index.mjs +1 -1
  266. package/dist/services/session/messages/namespace.d.mts +1 -1
  267. package/dist/services/session/messages/namespace.mjs +1 -1
  268. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  269. package/dist/services/session/orchestrator-testing/index.mjs +1 -1
  270. package/dist/services/session/session-events/namespace.d.mts +1 -1
  271. package/dist/services/session/session-events/namespace.mjs +1 -1
  272. package/dist/services/session/storage/namespace.d.mts +1 -1
  273. package/dist/services/session/storage/schema.d.mts +1 -1
  274. package/dist/services/session/storage/schema.mjs +1 -1
  275. package/dist/services/session/testing/index.d.mts +2 -2
  276. package/dist/services/session/testing/index.mjs +16 -3
  277. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  278. package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
  279. package/dist/services/session/turns/namespace.d.mts +1 -1
  280. package/dist/services/session/turns/namespace.mjs +1 -1
  281. package/dist/services/session-editor/index.d.mts +3 -3
  282. package/dist/services/session-editor/index.mjs +1 -1
  283. package/dist/services/settings/index.d.mts +4 -4
  284. package/dist/services/settings/index.mjs +1 -1
  285. package/dist/services/settings/namespace.d.mts +19 -18
  286. package/dist/services/settings/namespace.mjs +1 -1
  287. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  288. package/dist/services/settings/storage/clients-namespace.mjs +1 -1
  289. package/dist/services/settings/storage/extension-configs/namespace.d.mts +4 -4
  290. package/dist/services/settings/storage/index.d.mts +3 -3
  291. package/dist/services/settings/storage/index.mjs +1 -1
  292. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  293. package/dist/services/settings/storage/providers-namespace.mjs +1 -1
  294. package/dist/services/subagent/index.d.mts +2 -0
  295. package/dist/services/subagent/index.mjs +1 -0
  296. package/dist/services/subagent-template/index.d.mts +3 -0
  297. package/dist/services/subagent-template/index.mjs +1 -0
  298. package/dist/services/subagent-template/namespace.d.mts +2 -0
  299. package/dist/services/subagent-template/namespace.mjs +1 -0
  300. package/dist/services/subagent-template/schemas.d.mts +2 -0
  301. package/dist/services/subagent-template/schemas.mjs +1 -0
  302. package/dist/services/tool-approval/index.d.mts +1 -1
  303. package/dist/services/tool-approval/index.mjs +1 -1
  304. package/dist/services/tools/index.d.mts +1 -1
  305. package/dist/services/tools/index.mjs +1 -1
  306. package/dist/services/tray-menu/index.d.mts +3 -3
  307. package/dist/services/tray-menu/index.mjs +1 -1
  308. package/dist/services/tray-menu/namespace.d.mts +1 -1
  309. package/dist/services/tray-menu/schemas.d.mts +1 -1
  310. package/dist/services/turn/index.d.mts +1 -1
  311. package/dist/services/turn/namespace.d.mts +1 -1
  312. package/dist/services/turn/schemas.d.mts +12 -12
  313. package/dist/session-BoldSdNZ2.mjs +134 -0
  314. package/dist/session-DuVOYctZ.mjs +1 -0
  315. package/dist/{session-lineage-B0cpHfuc.d.mts → session-lineage-CRsc9g1x.d.mts} +1 -1
  316. package/dist/shared-DpOEfD8F.mjs +1 -0
  317. package/dist/{skill-20_SBXaI.mjs → skill-CQO4mDqK.mjs} +1 -1
  318. package/dist/storage/drizzle/client.d.mts +2 -2
  319. package/dist/storage/drizzle/client.mjs +1 -1
  320. package/dist/storage/drizzle/index.d.mts +49 -10
  321. package/dist/storage/drizzle/index.mjs +1 -1
  322. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  323. package/dist/storage/handlers/drizzle/index.mjs +1 -1
  324. package/dist/storage/handlers/index.d.mts +2 -2
  325. package/dist/storage/handlers/index.mjs +1 -1
  326. package/dist/storage/index.d.mts +4 -4
  327. package/dist/{storage-namespace-DoH-Wkjp.d.mts → storage-namespace-BXkoh5Sy.d.mts} +11 -11
  328. package/dist/storage-namespace-DWsYLAXa.mjs +1 -0
  329. package/dist/{storage-namespace-definition-CJgqyXH1.d.mts → storage-namespace-definition-Bkx5rSto.d.mts} +1 -1
  330. package/dist/style.css +540 -540
  331. package/dist/telemetry-CvdLBWuk.mjs +1 -0
  332. package/dist/testing/drizzle-harness.mjs +1 -1
  333. package/dist/testing/index.mjs +1 -1
  334. package/dist/tool-approval-service-BvZWhYZp.mjs +1 -0
  335. package/dist/tools/index.d.mts +20 -10
  336. package/dist/tools/index.mjs +1 -1
  337. package/dist/tools/testing/index.d.mts +1 -1
  338. package/dist/tools-D-luYcDw.mjs +1431 -0
  339. package/dist/{types-C11LvekX.d.mts → types-BCMUtBj1.d.mts} +117 -20
  340. package/dist/{types-vNpkAe4Y.d.mts → types-C2Ob9zz_.d.mts} +1 -1
  341. package/dist/{types-t295YC6T.d.mts → types-CCdqjeuH.d.mts} +2 -2
  342. package/dist/{types-Cvrj2ogm.d.mts → types-DZHvOc_Q.d.mts} +4 -4
  343. package/dist/{types--nrtGZ1V.d.mts → types-Dy3YTcTF.d.mts} +255 -97
  344. package/dist/{types-DYF5LxZY.d.mts → types-MfJZ67e9.d.mts} +91 -9
  345. package/dist/{types-6WxLfoM3.d.mts → types-dyP-bXXE.d.mts} +1 -1
  346. package/dist/ui-components/index.mjs +2 -2
  347. package/dist/ui-hooks/index.d.mts +111 -1
  348. package/dist/ui-hooks/index.mjs +1 -1
  349. package/dist/ui-kernel/index.d.mts +4 -4
  350. package/dist/ui-kernel/pages/namespace.d.mts +4 -4
  351. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  352. package/dist/ui-views/index.mjs +2 -2
  353. package/dist/utils/index.d.mts +36 -1
  354. package/dist/utils/index.mjs +2 -2
  355. package/dist/utils/project-manifest.d.mts +130 -0
  356. package/dist/utils/project-manifest.mjs +1 -0
  357. package/dist/utils/scope-paths.d.mts +33 -0
  358. package/dist/utils/scope-paths.mjs +1 -0
  359. package/dist/utils/workspace-packages.d.mts +59 -0
  360. package/dist/utils/workspace-packages.mjs +1 -0
  361. package/dist/utils/workspace-root.d.mts +6 -9
  362. package/dist/utils/workspace-root.mjs +1 -1
  363. package/dist/{version-D8S4O22A.mjs → version-BeT3ASEe.mjs} +1 -1
  364. package/package.json +55 -2
  365. package/dist/account-identity-Bg_vKkcs.mjs +0 -1
  366. package/dist/adapter-CpF2aK_-.mjs +0 -1
  367. package/dist/bus-B1seC4M_.mjs +0 -2
  368. package/dist/chunk-Dc06z0qk.mjs +0 -1
  369. package/dist/client-DMWXCWhM.mjs +0 -1
  370. package/dist/cursor-storage-BoNI7OAR.mjs +0 -1
  371. package/dist/drizzle-Bn2GtW8c.mjs +0 -1
  372. package/dist/execution-target-D6MgthYs.mjs +0 -1
  373. package/dist/extension-53GerdGg.mjs +0 -1
  374. package/dist/extension-fJmv8Yri.mjs +0 -1
  375. package/dist/namespace-C_h7scWx2.mjs +0 -1
  376. package/dist/schemas-Bn8aqDIE.mjs +0 -1
  377. package/dist/services/worker/index.d.mts +0 -3
  378. package/dist/services/worker/index.mjs +0 -1
  379. package/dist/services/worker/namespace.d.mts +0 -2
  380. package/dist/services/worker/namespace.mjs +0 -1
  381. package/dist/services/worker/schemas.d.mts +0 -2
  382. package/dist/services/worker/schemas.mjs +0 -1
  383. package/dist/session-BCSf-Fgj.mjs +0 -1
  384. package/dist/session-BNo_cIiz.mjs +0 -123
  385. package/dist/shared-BhuSHZXH.mjs +0 -1
  386. package/dist/storage-namespace-BIDs9LPb.mjs +0 -1
  387. package/dist/tool-approval-service-CZCPfvVy.mjs +0 -1
  388. package/dist/tools-Cid9D99F.mjs +0 -1
  389. /package/dist/{base-orchestrator-BOAPgqF7.d.mts → base-orchestrator-wyumsn3b.d.mts} +0 -0
  390. /package/dist/{capability-service-DV32ecwR.mjs → capability-service-CJbmhfv9.mjs} +0 -0
  391. /package/dist/{cleanEnvForAdapter-hTPNvPU5.mjs → cleanEnvForAdapter-KkYzQa1f.mjs} +0 -0
  392. /package/dist/{config-namespace-wJ2CakDB.mjs → config-namespace-ncYg2ct_.mjs} +0 -0
  393. /package/dist/{extension-namespace-CTd9kOtt.mjs → extension-namespace-cMh_mMiL.mjs} +0 -0
  394. /package/dist/{identity-DBST3-XO.mjs → identity-Cz2IeEtm.mjs} +0 -0
  395. /package/dist/{index-SzSiyG61.d.mts → index-CHQ1SqT0.d.mts} +0 -0
  396. /package/dist/{model-registry-xINyxQUT.mjs → model-registry-CfXytvzx.mjs} +0 -0
  397. /package/dist/{model-registry-Dzpssh9j.mjs → model-registry-Scn_MC2d.mjs} +0 -0
  398. /package/dist/{namespace-DBw9BYr8.mjs → namespace-BoD94mrN.mjs} +0 -0
  399. /package/dist/{namespace-DUVgMfTR.mjs → namespace-CFLAmQfh.mjs} +0 -0
  400. /package/dist/{namespace-aALq9tnE.mjs → namespace-DkRgbZYn.mjs} +0 -0
  401. /package/dist/{namespace-yxIxUsjo.mjs → namespace-LViZ-EQk.mjs} +0 -0
  402. /package/dist/{namespace-Zb8HAbyF.mjs → namespace-Yna5-Pws.mjs} +0 -0
  403. /package/dist/{platform-BMFUpmTA.mjs → platform-DZ7z-wXD.mjs} +0 -0
  404. /package/dist/{providers-DhiW_fx4.mjs → providers-u8i15co9.mjs} +0 -0
  405. /package/dist/{schema-D3ZG13h9.mjs → schema-CoyE6mPt.mjs} +0 -0
  406. /package/dist/{schemas-CEBe89yE.mjs → schemas-DE-GNmSD.mjs} +0 -0
  407. /package/dist/{schemas-COnLJnt_.mjs → schemas-hSrzflwZ.mjs} +0 -0
  408. /package/dist/{schemas-CrnlCRep.mjs → schemas-jFe1AuI-.mjs} +0 -0
  409. /package/dist/{server-lifecycle-Dx5WgfoS.mjs → server-lifecycle-FXTPW39-.mjs} +0 -0
  410. /package/dist/{server-lifecycle-BC6FRn86.d.mts → server-lifecycle-YoSGFGnU.d.mts} +0 -0
  411. /package/dist/{shared-schemas-Byah36lG.mjs → shared-schemas-CPShiLNp.mjs} +0 -0
  412. /package/dist/{storage-namespace-definition-BjK9nZAN.mjs → storage-namespace-definition-CqSdsuCC.mjs} +0 -0
  413. /package/dist/{timeout-D33CUZ0M.mjs → timeout-XsYIOKrc.mjs} +0 -0
  414. /package/dist/{tray-menu-service-BAYtLdAg.mjs → tray-menu-service-DuXq5k22.mjs} +0 -0
  415. /package/dist/{ui-config-zawaoEfB.mjs → ui-config-9bDRwFZr.mjs} +0 -0
  416. /package/dist/{variant-BZWfmS0q.mjs → variant-CT6XBP6T.mjs} +0 -0
  417. /package/dist/{visibility-CZu8ooOA.mjs → visibility-Cb62p9bv.mjs} +0 -0
  418. /package/dist/{window-registry-C_IJmY8_.d.mts → window-registry-CBcrGTv4.d.mts} +0 -0
  419. /package/dist/{window-registry-B_-hBEcV.mjs → window-registry-DW-dKRjQ.mjs} +0 -0
@@ -2,18 +2,18 @@ import * as _$zod from "zod";
2
2
  import * as _$_makaio_core0 from "@makaio/framework/core";
3
3
  import * as _$zod_v4_core0 from "zod/v4/core";
4
4
 
5
- //#region packages/services/core/src/worker/namespace.d.ts
5
+ //#region services/core/src/subagent-template/namespace.d.ts
6
6
  /**
7
- * Worker namespace schemas.
7
+ * SubagentTemplate namespace schemas.
8
8
  *
9
9
  * Split into two concerns:
10
- * - settings:worker.* - Definition CRUD (handled by SettingsService)
11
- * - worker.* - Runtime lifecycle (handled by WorkerService)
10
+ * - settings:subagentTemplate.* - Definition CRUD (handled by SettingsService)
11
+ * - subagentTemplate.* - Runtime lifecycle (handled by SubagentTemplateService)
12
12
  */
13
- declare const WorkerKernelNamespace: _$_makaio_core0.BusNamespaceDefinition<"worker", {
13
+ declare const SubagentTemplateKernelNamespace: _$_makaio_core0.BusNamespaceDefinition<"subagentTemplate", {
14
14
  spawn: {
15
15
  request: _$zod.ZodObject<{
16
- workerName: _$zod.ZodString;
16
+ subagentTemplateName: _$zod.ZodString;
17
17
  prompt: _$zod.ZodString;
18
18
  sessionId: _$zod.ZodString;
19
19
  overrides: _$zod.ZodOptional<_$zod.ZodObject<{
@@ -36,10 +36,10 @@ declare const WorkerKernelNamespace: _$_makaio_core0.BusNamespaceDefinition<"wor
36
36
  subagentId: _$zod.ZodString;
37
37
  status: _$zod.ZodEnum<{
38
38
  completed: "completed";
39
- cancelled: "cancelled";
40
39
  running: "running";
41
40
  waiting_input: "waiting_input";
42
41
  failed: "failed";
42
+ cancelled: "cancelled";
43
43
  }>;
44
44
  result: _$zod.ZodOptional<_$zod.ZodString>;
45
45
  error: _$zod.ZodOptional<_$zod.ZodString>;
@@ -65,7 +65,7 @@ declare const WorkerKernelNamespace: _$_makaio_core0.BusNamespaceDefinition<"wor
65
65
  };
66
66
  spawned: _$zod.ZodObject<{
67
67
  instanceId: _$zod.ZodString;
68
- workerName: _$zod.ZodString;
68
+ subagentTemplateName: _$zod.ZodString;
69
69
  }, _$zod_v4_core0.$strip>;
70
70
  completed: _$zod.ZodObject<{
71
71
  instanceId: _$zod.ZodString;
@@ -74,10 +74,10 @@ declare const WorkerKernelNamespace: _$_makaio_core0.BusNamespaceDefinition<"wor
74
74
  error: _$zod.ZodOptional<_$zod.ZodString>;
75
75
  }, _$zod_v4_core0.$strip>;
76
76
  }>;
77
- declare const WorkerSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSubjectDefinitions<"worker", {
77
+ declare const SubagentTemplateSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSubjectDefinitions<"subagentTemplate", {
78
78
  spawn: {
79
79
  request: _$zod.ZodObject<{
80
- workerName: _$zod.ZodString;
80
+ subagentTemplateName: _$zod.ZodString;
81
81
  prompt: _$zod.ZodString;
82
82
  sessionId: _$zod.ZodString;
83
83
  overrides: _$zod.ZodOptional<_$zod.ZodObject<{
@@ -100,10 +100,10 @@ declare const WorkerSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
100
100
  subagentId: _$zod.ZodString;
101
101
  status: _$zod.ZodEnum<{
102
102
  completed: "completed";
103
- cancelled: "cancelled";
104
103
  running: "running";
105
104
  waiting_input: "waiting_input";
106
105
  failed: "failed";
106
+ cancelled: "cancelled";
107
107
  }>;
108
108
  result: _$zod.ZodOptional<_$zod.ZodString>;
109
109
  error: _$zod.ZodOptional<_$zod.ZodString>;
@@ -129,7 +129,7 @@ declare const WorkerSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
129
129
  };
130
130
  spawned: _$zod.ZodObject<{
131
131
  instanceId: _$zod.ZodString;
132
- workerName: _$zod.ZodString;
132
+ subagentTemplateName: _$zod.ZodString;
133
133
  }, _$zod_v4_core0.$strip>;
134
134
  completed: _$zod.ZodObject<{
135
135
  instanceId: _$zod.ZodString;
@@ -137,6 +137,6 @@ declare const WorkerSubjects: _$_makaio_core0.BusSubjects<_$_makaio_core0.FlatSu
137
137
  result: _$zod.ZodOptional<_$zod.ZodString>;
138
138
  error: _$zod.ZodOptional<_$zod.ZodString>;
139
139
  }, _$zod_v4_core0.$strip>;
140
- }>, "worker">;
140
+ }>, "subagentTemplate">;
141
141
  //#endregion
142
- export { WorkerSubjects as n, WorkerKernelNamespace as t };
142
+ export { SubagentTemplateSubjects as n, SubagentTemplateKernelNamespace as t };
@@ -2,7 +2,7 @@ import * as _$zod from "zod";
2
2
  import * as _$_makaio_core0 from "@makaio/framework/core";
3
3
  import * as _$zod_v4_core0 from "zod/v4/core";
4
4
 
5
- //#region packages/services/core/src/compression/namespace.d.ts
5
+ //#region services/core/src/compression/namespace.d.ts
6
6
  declare const CompressionNamespace: _$_makaio_core0.BusNamespaceDefinition<"compression", {
7
7
  compress: {
8
8
  request: _$zod.ZodObject<{
@@ -4,7 +4,7 @@ import { SessionEventStorageSubjects } from "@makaio/framework/contracts";
4
4
  import * as _$drizzle_orm_sqlite_core0 from "drizzle-orm/sqlite-core";
5
5
  import * as _$zod_v4_core0 from "zod/v4/core";
6
6
 
7
- //#region packages/services/core/src/session/session-events/namespace.d.ts
7
+ //#region services/core/src/session/session-events/namespace.d.ts
8
8
  /**
9
9
  * Session event storage namespace with Drizzle extension.
10
10
  *
@@ -417,9 +417,9 @@ declare const SessionEventStorageNamespace$1: {
417
417
  }, _$zod_v4_core0.$strip>]>;
418
418
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
419
419
  source: _$zod.ZodOptional<_$zod.ZodEnum<{
420
+ extension: "extension";
420
421
  user: "user";
421
422
  system: "system";
422
- extension: "extension";
423
423
  }>>;
424
424
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
425
425
  text: "text";
@@ -451,11 +451,11 @@ declare const SessionEventStorageNamespace$1: {
451
451
  messageId: _$zod.ZodString;
452
452
  agentId: _$zod.ZodString;
453
453
  outcome: _$zod.ZodEnum<{
454
+ error: "error";
454
455
  completed: "completed";
456
+ cancelled: "cancelled";
455
457
  superseded: "superseded";
456
458
  merged: "merged";
457
- cancelled: "cancelled";
458
- error: "error";
459
459
  rejected: "rejected";
460
460
  }>;
461
461
  supersededBy: _$zod.ZodOptional<_$zod.ZodString>;
@@ -475,9 +475,9 @@ declare const SessionEventStorageNamespace$1: {
475
475
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
476
476
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
477
477
  source: _$zod.ZodEnum<{
478
+ extension: "extension";
478
479
  user: "user";
479
480
  system: "system";
480
- extension: "extension";
481
481
  }>;
482
482
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
483
483
  }, _$zod_v4_core0.$strip>>;
@@ -495,9 +495,9 @@ declare const SessionEventStorageNamespace$1: {
495
495
  error: _$zod.ZodOptional<_$zod.ZodString>;
496
496
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
497
497
  source: _$zod.ZodEnum<{
498
+ extension: "extension";
498
499
  user: "user";
499
500
  system: "system";
500
- extension: "extension";
501
501
  }>;
502
502
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
503
503
  }, _$zod_v4_core0.$strip>>;
@@ -735,9 +735,9 @@ declare const SessionEventStorageNamespace$1: {
735
735
  }, _$zod_v4_core0.$strip>]>;
736
736
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
737
737
  source: _$zod.ZodOptional<_$zod.ZodEnum<{
738
+ extension: "extension";
738
739
  user: "user";
739
740
  system: "system";
740
- extension: "extension";
741
741
  }>>;
742
742
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
743
743
  text: "text";
@@ -769,11 +769,11 @@ declare const SessionEventStorageNamespace$1: {
769
769
  messageId: _$zod.ZodString;
770
770
  agentId: _$zod.ZodString;
771
771
  outcome: _$zod.ZodEnum<{
772
+ error: "error";
772
773
  completed: "completed";
774
+ cancelled: "cancelled";
773
775
  superseded: "superseded";
774
776
  merged: "merged";
775
- cancelled: "cancelled";
776
- error: "error";
777
777
  rejected: "rejected";
778
778
  }>;
779
779
  supersededBy: _$zod.ZodOptional<_$zod.ZodString>;
@@ -793,9 +793,9 @@ declare const SessionEventStorageNamespace$1: {
793
793
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
794
794
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
795
795
  source: _$zod.ZodEnum<{
796
+ extension: "extension";
796
797
  user: "user";
797
798
  system: "system";
798
- extension: "extension";
799
799
  }>;
800
800
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
801
801
  }, _$zod_v4_core0.$strip>>;
@@ -813,9 +813,9 @@ declare const SessionEventStorageNamespace$1: {
813
813
  error: _$zod.ZodOptional<_$zod.ZodString>;
814
814
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
815
815
  source: _$zod.ZodEnum<{
816
+ extension: "extension";
816
817
  user: "user";
817
818
  system: "system";
818
- extension: "extension";
819
819
  }>;
820
820
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
821
821
  }, _$zod_v4_core0.$strip>>;
@@ -1043,9 +1043,9 @@ declare const SessionEventStorageNamespace$1: {
1043
1043
  }, _$zod_v4_core0.$strip>]>;
1044
1044
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
1045
1045
  source: _$zod.ZodOptional<_$zod.ZodEnum<{
1046
+ extension: "extension";
1046
1047
  user: "user";
1047
1048
  system: "system";
1048
- extension: "extension";
1049
1049
  }>>;
1050
1050
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
1051
1051
  text: "text";
@@ -1077,11 +1077,11 @@ declare const SessionEventStorageNamespace$1: {
1077
1077
  messageId: _$zod.ZodString;
1078
1078
  agentId: _$zod.ZodString;
1079
1079
  outcome: _$zod.ZodEnum<{
1080
+ error: "error";
1080
1081
  completed: "completed";
1082
+ cancelled: "cancelled";
1081
1083
  superseded: "superseded";
1082
1084
  merged: "merged";
1083
- cancelled: "cancelled";
1084
- error: "error";
1085
1085
  rejected: "rejected";
1086
1086
  }>;
1087
1087
  supersededBy: _$zod.ZodOptional<_$zod.ZodString>;
@@ -1101,9 +1101,9 @@ declare const SessionEventStorageNamespace$1: {
1101
1101
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
1102
1102
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
1103
1103
  source: _$zod.ZodEnum<{
1104
+ extension: "extension";
1104
1105
  user: "user";
1105
1106
  system: "system";
1106
- extension: "extension";
1107
1107
  }>;
1108
1108
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
1109
1109
  }, _$zod_v4_core0.$strip>>;
@@ -1121,9 +1121,9 @@ declare const SessionEventStorageNamespace$1: {
1121
1121
  error: _$zod.ZodOptional<_$zod.ZodString>;
1122
1122
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
1123
1123
  source: _$zod.ZodEnum<{
1124
+ extension: "extension";
1124
1125
  user: "user";
1125
1126
  system: "system";
1126
- extension: "extension";
1127
1127
  }>;
1128
1128
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
1129
1129
  }, _$zod_v4_core0.$strip>>;
@@ -1359,9 +1359,9 @@ declare const SessionEventStorageNamespace$1: {
1359
1359
  }, _$zod_v4_core0.$strip>]>;
1360
1360
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
1361
1361
  source: _$zod.ZodOptional<_$zod.ZodEnum<{
1362
+ extension: "extension";
1362
1363
  user: "user";
1363
1364
  system: "system";
1364
- extension: "extension";
1365
1365
  }>>;
1366
1366
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
1367
1367
  text: "text";
@@ -1393,11 +1393,11 @@ declare const SessionEventStorageNamespace$1: {
1393
1393
  messageId: _$zod.ZodString;
1394
1394
  agentId: _$zod.ZodString;
1395
1395
  outcome: _$zod.ZodEnum<{
1396
+ error: "error";
1396
1397
  completed: "completed";
1398
+ cancelled: "cancelled";
1397
1399
  superseded: "superseded";
1398
1400
  merged: "merged";
1399
- cancelled: "cancelled";
1400
- error: "error";
1401
1401
  rejected: "rejected";
1402
1402
  }>;
1403
1403
  supersededBy: _$zod.ZodOptional<_$zod.ZodString>;
@@ -1417,9 +1417,9 @@ declare const SessionEventStorageNamespace$1: {
1417
1417
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
1418
1418
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
1419
1419
  source: _$zod.ZodEnum<{
1420
+ extension: "extension";
1420
1421
  user: "user";
1421
1422
  system: "system";
1422
- extension: "extension";
1423
1423
  }>;
1424
1424
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
1425
1425
  }, _$zod_v4_core0.$strip>>;
@@ -1437,9 +1437,9 @@ declare const SessionEventStorageNamespace$1: {
1437
1437
  error: _$zod.ZodOptional<_$zod.ZodString>;
1438
1438
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
1439
1439
  source: _$zod.ZodEnum<{
1440
+ extension: "extension";
1440
1441
  user: "user";
1441
1442
  system: "system";
1442
- extension: "extension";
1443
1443
  }>;
1444
1444
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
1445
1445
  }, _$zod_v4_core0.$strip>>;
@@ -1663,9 +1663,9 @@ declare const SessionEventStorageNamespace$1: {
1663
1663
  }, _$zod_v4_core0.$strip>]>;
1664
1664
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
1665
1665
  source: _$zod.ZodOptional<_$zod.ZodEnum<{
1666
+ extension: "extension";
1666
1667
  user: "user";
1667
1668
  system: "system";
1668
- extension: "extension";
1669
1669
  }>>;
1670
1670
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
1671
1671
  text: "text";
@@ -1697,11 +1697,11 @@ declare const SessionEventStorageNamespace$1: {
1697
1697
  messageId: _$zod.ZodString;
1698
1698
  agentId: _$zod.ZodString;
1699
1699
  outcome: _$zod.ZodEnum<{
1700
+ error: "error";
1700
1701
  completed: "completed";
1702
+ cancelled: "cancelled";
1701
1703
  superseded: "superseded";
1702
1704
  merged: "merged";
1703
- cancelled: "cancelled";
1704
- error: "error";
1705
1705
  rejected: "rejected";
1706
1706
  }>;
1707
1707
  supersededBy: _$zod.ZodOptional<_$zod.ZodString>;
@@ -1721,9 +1721,9 @@ declare const SessionEventStorageNamespace$1: {
1721
1721
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
1722
1722
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
1723
1723
  source: _$zod.ZodEnum<{
1724
+ extension: "extension";
1724
1725
  user: "user";
1725
1726
  system: "system";
1726
- extension: "extension";
1727
1727
  }>;
1728
1728
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
1729
1729
  }, _$zod_v4_core0.$strip>>;
@@ -1741,9 +1741,9 @@ declare const SessionEventStorageNamespace$1: {
1741
1741
  error: _$zod.ZodOptional<_$zod.ZodString>;
1742
1742
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
1743
1743
  source: _$zod.ZodEnum<{
1744
+ extension: "extension";
1744
1745
  user: "user";
1745
1746
  system: "system";
1746
- extension: "extension";
1747
1747
  }>;
1748
1748
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
1749
1749
  }, _$zod_v4_core0.$strip>>;
@@ -1981,9 +1981,9 @@ declare const SessionEventStorageNamespace$1: {
1981
1981
  }, _$zod_v4_core0.$strip>]>;
1982
1982
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
1983
1983
  source: _$zod.ZodOptional<_$zod.ZodEnum<{
1984
+ extension: "extension";
1984
1985
  user: "user";
1985
1986
  system: "system";
1986
- extension: "extension";
1987
1987
  }>>;
1988
1988
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
1989
1989
  text: "text";
@@ -2015,11 +2015,11 @@ declare const SessionEventStorageNamespace$1: {
2015
2015
  messageId: _$zod.ZodString;
2016
2016
  agentId: _$zod.ZodString;
2017
2017
  outcome: _$zod.ZodEnum<{
2018
+ error: "error";
2018
2019
  completed: "completed";
2020
+ cancelled: "cancelled";
2019
2021
  superseded: "superseded";
2020
2022
  merged: "merged";
2021
- cancelled: "cancelled";
2022
- error: "error";
2023
2023
  rejected: "rejected";
2024
2024
  }>;
2025
2025
  supersededBy: _$zod.ZodOptional<_$zod.ZodString>;
@@ -2039,9 +2039,9 @@ declare const SessionEventStorageNamespace$1: {
2039
2039
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
2040
2040
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
2041
2041
  source: _$zod.ZodEnum<{
2042
+ extension: "extension";
2042
2043
  user: "user";
2043
2044
  system: "system";
2044
- extension: "extension";
2045
2045
  }>;
2046
2046
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
2047
2047
  }, _$zod_v4_core0.$strip>>;
@@ -2059,9 +2059,9 @@ declare const SessionEventStorageNamespace$1: {
2059
2059
  error: _$zod.ZodOptional<_$zod.ZodString>;
2060
2060
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
2061
2061
  source: _$zod.ZodEnum<{
2062
+ extension: "extension";
2062
2063
  user: "user";
2063
2064
  system: "system";
2064
- extension: "extension";
2065
2065
  }>;
2066
2066
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
2067
2067
  }, _$zod_v4_core0.$strip>>;
@@ -2289,9 +2289,9 @@ declare const SessionEventStorageNamespace$1: {
2289
2289
  }, _$zod_v4_core0.$strip>]>;
2290
2290
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
2291
2291
  source: _$zod.ZodOptional<_$zod.ZodEnum<{
2292
+ extension: "extension";
2292
2293
  user: "user";
2293
2294
  system: "system";
2294
- extension: "extension";
2295
2295
  }>>;
2296
2296
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
2297
2297
  text: "text";
@@ -2323,11 +2323,11 @@ declare const SessionEventStorageNamespace$1: {
2323
2323
  messageId: _$zod.ZodString;
2324
2324
  agentId: _$zod.ZodString;
2325
2325
  outcome: _$zod.ZodEnum<{
2326
+ error: "error";
2326
2327
  completed: "completed";
2328
+ cancelled: "cancelled";
2327
2329
  superseded: "superseded";
2328
2330
  merged: "merged";
2329
- cancelled: "cancelled";
2330
- error: "error";
2331
2331
  rejected: "rejected";
2332
2332
  }>;
2333
2333
  supersededBy: _$zod.ZodOptional<_$zod.ZodString>;
@@ -2347,9 +2347,9 @@ declare const SessionEventStorageNamespace$1: {
2347
2347
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
2348
2348
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
2349
2349
  source: _$zod.ZodEnum<{
2350
+ extension: "extension";
2350
2351
  user: "user";
2351
2352
  system: "system";
2352
- extension: "extension";
2353
2353
  }>;
2354
2354
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
2355
2355
  }, _$zod_v4_core0.$strip>>;
@@ -2367,9 +2367,9 @@ declare const SessionEventStorageNamespace$1: {
2367
2367
  error: _$zod.ZodOptional<_$zod.ZodString>;
2368
2368
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
2369
2369
  source: _$zod.ZodEnum<{
2370
+ extension: "extension";
2370
2371
  user: "user";
2371
2372
  system: "system";
2372
- extension: "extension";
2373
2373
  }>;
2374
2374
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
2375
2375
  }, _$zod_v4_core0.$strip>>;
@@ -2605,9 +2605,9 @@ declare const SessionEventStorageNamespace$1: {
2605
2605
  }, _$zod_v4_core0.$strip>]>;
2606
2606
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
2607
2607
  source: _$zod.ZodOptional<_$zod.ZodEnum<{
2608
+ extension: "extension";
2608
2609
  user: "user";
2609
2610
  system: "system";
2610
- extension: "extension";
2611
2611
  }>>;
2612
2612
  origin: _$zod.ZodOptional<_$zod.ZodEnum<{
2613
2613
  text: "text";
@@ -2639,11 +2639,11 @@ declare const SessionEventStorageNamespace$1: {
2639
2639
  messageId: _$zod.ZodString;
2640
2640
  agentId: _$zod.ZodString;
2641
2641
  outcome: _$zod.ZodEnum<{
2642
+ error: "error";
2642
2643
  completed: "completed";
2644
+ cancelled: "cancelled";
2643
2645
  superseded: "superseded";
2644
2646
  merged: "merged";
2645
- cancelled: "cancelled";
2646
- error: "error";
2647
2647
  rejected: "rejected";
2648
2648
  }>;
2649
2649
  supersededBy: _$zod.ZodOptional<_$zod.ZodString>;
@@ -2663,9 +2663,9 @@ declare const SessionEventStorageNamespace$1: {
2663
2663
  agentIds: _$zod.ZodArray<_$zod.ZodString>;
2664
2664
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
2665
2665
  source: _$zod.ZodEnum<{
2666
+ extension: "extension";
2666
2667
  user: "user";
2667
2668
  system: "system";
2668
- extension: "extension";
2669
2669
  }>;
2670
2670
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
2671
2671
  }, _$zod_v4_core0.$strip>>;
@@ -2683,9 +2683,9 @@ declare const SessionEventStorageNamespace$1: {
2683
2683
  error: _$zod.ZodOptional<_$zod.ZodString>;
2684
2684
  initiator: _$zod.ZodOptional<_$zod.ZodObject<{
2685
2685
  source: _$zod.ZodEnum<{
2686
+ extension: "extension";
2686
2687
  user: "user";
2687
2688
  system: "system";
2688
- extension: "extension";
2689
2689
  }>;
2690
2690
  sourceId: _$zod.ZodOptional<_$zod.ZodString>;
2691
2691
  }, _$zod_v4_core0.$strip>>;
@@ -2755,6 +2755,7 @@ declare const SessionEventStorageNamespace$1: {
2755
2755
  };
2756
2756
  };
2757
2757
  options?: _$_makaio_core0.NamespaceRegistrationOptions;
2758
+ defaultTransports?: _$_makaio_core0.TransportRoutingDefault;
2758
2759
  __filterPayload?: {
2759
2760
  options: never;
2760
2761
  sessionId: string;
@@ -2896,7 +2897,7 @@ declare const SessionEventStorageNamespace$1: {
2896
2897
  role?: "user" | "assistant" | "system" | undefined;
2897
2898
  };
2898
2899
  agentIds: string[];
2899
- source?: "user" | "system" | "extension" | undefined;
2900
+ source?: "extension" | "user" | "system" | undefined;
2900
2901
  origin?: "text" | "voice" | "compact" | undefined;
2901
2902
  };
2902
2903
  } | {
@@ -2922,7 +2923,7 @@ declare const SessionEventStorageNamespace$1: {
2922
2923
  turnNumber: number;
2923
2924
  messageId: string;
2924
2925
  agentId: string;
2925
- outcome: "completed" | "superseded" | "merged" | "cancelled" | "error" | "rejected";
2926
+ outcome: "error" | "completed" | "cancelled" | "superseded" | "merged" | "rejected";
2926
2927
  supersededBy?: string | undefined;
2927
2928
  mergedInto?: string | undefined;
2928
2929
  error?: string | undefined;
@@ -2939,7 +2940,7 @@ declare const SessionEventStorageNamespace$1: {
2939
2940
  messageId: string;
2940
2941
  agentIds: string[];
2941
2942
  initiator?: {
2942
- source: "user" | "system" | "extension";
2943
+ source: "extension" | "user" | "system";
2943
2944
  sourceId?: string | undefined;
2944
2945
  } | undefined;
2945
2946
  };
@@ -2955,7 +2956,7 @@ declare const SessionEventStorageNamespace$1: {
2955
2956
  success: boolean;
2956
2957
  error?: string | undefined;
2957
2958
  initiator?: {
2958
- source: "user" | "system" | "extension";
2959
+ source: "extension" | "user" | "system";
2959
2960
  sourceId?: string | undefined;
2960
2961
  } | undefined;
2961
2962
  };
@@ -1 +1 @@
1
- import{z as e}from"zod";import{createBusNamespace as t}from"@makaio/framework/core";import{localSubject as n}from"@makaio/framework/bus";const r=e.object({machineId:e.string()}),i={isReady:{request:e.object({}),response:e.object({ready:e.boolean(),machineId:e.string()})},"phase.busCreated":r,"phase.coreReady":r,"phase.servicesReady":r,"phase.coordinatorReady":n({request:r,response:e.object({})}),ready:r,"lifecycle.start":{request:e.object({machineId:e.string()}),response:e.object({})},"lifecycle.shutdown":{request:e.object({}),response:e.object({})}},a=t(`kernel`,i),o=a.subjects;let s;function c(e){if(e!==void 0&&s!==void 0&&s!==e)throw Error(`Workflow trigger type registry is already set. Clear it with setWorkflowTriggerTypeRegistry(undefined) before replacing it.`);s=e}function l(){return s}export{i as a,c as i,o as n,l as r,a as t};
1
+ import{z as e}from"zod";import{createBusNamespace as t}from"@makaio/framework/core";import{localSubject as n}from"@makaio/framework/bus";const r=e.object({machineId:e.string()}),i={isReady:{request:e.object({}),response:e.object({ready:e.boolean(),machineId:e.string()})},"phase.busCreated":r,"phase.coreReady":r,"phase.servicesReady":r,"phase.coordinatorReady":n({request:r,response:e.object({})}),ready:r,"lifecycle.start":{request:e.object({machineId:e.string()}),response:e.object({})},"lifecycle.shutdown":{request:e.object({}),response:e.object({})},restart:{request:e.object({reason:e.string().optional()}),response:e.object({accepted:e.boolean()})}},a=t(`kernel`,i),o=a.subjects;let s;function c(e){if(e!==void 0&&s!==void 0&&s!==e)throw Error(`Workflow trigger type registry is already set. Clear it with setWorkflowTriggerTypeRegistry(undefined) before replacing it.`);s=e}function l(){return s}export{i as a,c as i,o as n,l as r,a as t};
@@ -1 +1 @@
1
- import{r as e}from"./profile-Cq4A7kQa.mjs";import{z as t}from"zod";import{createBusNamespace as n}from"@makaio/framework/core";const r=t.enum([`running`,`stopped`,`exited`,`unknown`]),i={request:t.object({clientId:t.string(),cwd:t.string(),command:t.string(),args:t.array(t.string()),env:t.record(t.string(),t.string()).optional(),sessionId:t.string().optional(),clientProfileName:e.optional(),adapterSessionId:t.string().optional(),metadata:t.record(t.string(),t.unknown()).optional()}),response:t.object({supervisorSessionId:t.string(),pid:t.number().int().positive()})},a={request:t.union([t.object({supervisorSessionId:t.string()}).strict(),t.object({sessionId:t.string()}).strict(),t.object({adapterSessionId:t.string()}).strict()]),response:t.object({success:t.boolean(),supervisorSessionId:t.string().optional(),pid:t.number().int().positive().optional(),terminalAttachment:t.object({canAttach:t.boolean()}).optional()})},o={request:t.object({supervisorSessionId:t.string(),signal:t.string().optional()}),response:t.object({success:t.boolean()})},s=t.object({supervisorSessionId:t.string(),clientId:t.string(),pid:t.number().int().positive().nullable(),status:r,cwd:t.string(),sessionId:t.string().optional(),adapterSessionId:t.string().optional(),startedAt:t.number().int().nonnegative(),stoppedAt:t.number().int().nonnegative().optional()}),c={request:t.union([t.object({}).strict(),t.object({supervisorSessionId:t.string()}).strict(),t.object({sessionId:t.string()}).strict(),t.object({adapterSessionId:t.string()}).strict()]),response:t.object({runtimes:t.array(s)})},l={launch:i,attach:a,stop:o,status:c},u=n(`native-session-supervisor`,l),d=u.subjects;export{i as a,s as c,a as i,r as l,d as n,c as o,l as r,o as s,u as t};
1
+ import{r as e}from"./profile-6ynCD5k3.mjs";import{z as t}from"zod";import{createBusNamespace as n}from"@makaio/framework/core";const r=t.enum([`running`,`stopped`,`exited`,`unknown`]),i={request:t.object({clientId:t.string(),cwd:t.string(),command:t.string(),args:t.array(t.string()),env:t.record(t.string(),t.string()).optional(),sessionId:t.string().optional(),clientProfileName:e.optional(),adapterSessionId:t.string().optional(),metadata:t.record(t.string(),t.unknown()).optional()}),response:t.object({supervisorSessionId:t.string(),pid:t.number().int().positive()})},a={request:t.union([t.object({supervisorSessionId:t.string()}).strict(),t.object({sessionId:t.string()}).strict(),t.object({adapterSessionId:t.string()}).strict()]),response:t.object({success:t.boolean(),supervisorSessionId:t.string().optional(),pid:t.number().int().positive().optional(),terminalAttachment:t.object({canAttach:t.boolean()}).optional()})},o={request:t.object({supervisorSessionId:t.string(),signal:t.string().optional()}),response:t.object({success:t.boolean()})},s=t.object({supervisorSessionId:t.string(),clientId:t.string(),pid:t.number().int().positive().nullable(),status:r,cwd:t.string(),sessionId:t.string().optional(),adapterSessionId:t.string().optional(),startedAt:t.number().int().nonnegative(),stoppedAt:t.number().int().nonnegative().optional()}),c={request:t.union([t.object({}).strict(),t.object({supervisorSessionId:t.string()}).strict(),t.object({sessionId:t.string()}).strict(),t.object({adapterSessionId:t.string()}).strict()]),response:t.object({runtimes:t.array(s)})},l={launch:i,attach:a,stop:o,status:c},u=n(`native-session-supervisor`,l),d=u.subjects;export{i as a,s as c,a as i,r as l,d as n,c as o,l as r,o as s,u as t};
@@ -1,4 +1,4 @@
1
- import { i as BusServerConfig, n as startBusServer, r as BusServer, t as StartBusServerOptions } from "../../server-lifecycle-BC6FRn86.mjs";
1
+ import { i as BusServerConfig, n as startBusServer, r as BusServer, t as StartBusServerOptions } from "../../server-lifecycle-YoSGFGnU.mjs";
2
2
  import { BusBroadcastMessage, BusMessage, BusRequestMessage, BusTransport, BusTransportError } from "@makaio/framework/bus";
3
3
  import { TransportAuth, WebSocketLike, WebSocketServerLike, WebSocketServerLike as WebSocketServerLike$1 } from "@makaio/framework/node/transports";
4
4
 
@@ -1 +1 @@
1
- import{n as e,r as t,t as n}from"../../server-lifecycle-Dx5WgfoS.mjs";var r=class{connectionListeners=new Set;on(e,t){e===`connection`&&this.connectionListeners.add(t)}off(e,t){e===`connection`&&this.connectionListeners.delete(t)}close(e){this.connectionListeners.clear(),e?.()}accept(e){for(let t of this.connectionListeners)t(e)}};export{r as HonoWebSocketBridge,t as LoopbackTransport,e as createBusServer,n as startBusServer};
1
+ import{n as e,r as t,t as n}from"../../server-lifecycle-FXTPW39-.mjs";var r=class{connectionListeners=new Set;on(e,t){e===`connection`&&this.connectionListeners.add(t)}off(e,t){e===`connection`&&this.connectionListeners.delete(t)}close(e){this.connectionListeners.clear(),e?.()}accept(e){for(let t of this.connectionListeners)t(e)}};export{r as HonoWebSocketBridge,t as LoopbackTransport,e as createBusServer,n as startBusServer};
@@ -1,2 +1,2 @@
1
- import { n as startBusServer, t as StartBusServerOptions } from "../../server-lifecycle-BC6FRn86.mjs";
1
+ import { n as startBusServer, t as StartBusServerOptions } from "../../server-lifecycle-YoSGFGnU.mjs";
2
2
  export { StartBusServerOptions, startBusServer };
@@ -1 +1 @@
1
- import{t as e}from"../../server-lifecycle-Dx5WgfoS.mjs";export{e as startBusServer};
1
+ import{t as e}from"../../server-lifecycle-FXTPW39-.mjs";export{e as startBusServer};
@@ -1,3 +1,3 @@
1
- import{execFileSync as e}from"node:child_process";import*as t from"node:fs";import*as n from"node:path";import*as r from"node:fs/promises";const i=5e3;function a(e){if(!e)return;let t=e.trim().toLowerCase();if(/^[0-9a-f]{32}$/.test(t))return t;if(/^\{?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}?$/.test(t))return t.replace(/[{}]/g,``)}function o(){try{switch(process.platform){case`darwin`:return s();case`linux`:return c();case`win32`:return l();default:return}}catch{return}}function s(){let t=e(`/usr/sbin/ioreg`,[`-rd1`,`-c`,`IOPlatformExpertDevice`],{encoding:`utf-8`,timeout:i});return a(/"IOPlatformUUID"\s*=\s*"([^"]+)"/.exec(t)?.[1])}function c(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{let n=a(t.readFileSync(e,`utf-8`));if(n)return n}catch{}}function l(){let t=e(`${process.env.SystemRoot??`C:\\Windows`}\\System32\\reg.exe`,[`query`,`HKLM\\SOFTWARE\\Microsoft\\Cryptography`,`/v`,`MachineGuid`],{encoding:`utf-8`,timeout:i});return a(/MachineGuid\s+REG_SZ\s+([^\r\n]+)/.exec(t)?.[1])}const u=new Map;async function d(e){try{let t=a(await r.readFile(e,`utf-8`));return t||console.warn(`[machine-keys] Ignoring malformed cached machine.id at ${e}.`),t}catch(e){if(e.code===`ENOENT`)return;throw e}}async function f(e){return e===void 0?o()||(console.warn(`[machine-keys] Falling back to generated machine ID; OS-native machine ID was unavailable.`),globalThis.crypto.randomUUID()):e}async function p(e,t){try{await r.chmod(e,t)}catch(e){let t=e;if(process.platform===`win32`||t.code===`ENOSYS`||t.code===`EINVAL`)return;throw e}}function m(e){let t=e;return{dir:t,ecdhPrivPath:n.join(t,`machine.key`),ecdhPubPath:n.join(t,`machine.pub`),signingPrivPath:n.join(t,`machine-signing.key`),signingPubPath:n.join(t,`machine-signing.pub`),idPath:n.join(t,`machine.id`)}}async function h(e){await new Promise(t=>setTimeout(t,e))}async function g(e){let t=n.join(e,`.machine-keys.lock`),i=Date.now()+5e3;for(;;)try{return{file:await r.open(t,`wx`,384),path:t}}catch(t){if(t.code!==`EEXIST`)throw t;if(Date.now()>=i)throw Error(`[machine-keys] Timed out waiting for initialization lock in ${e}`,{cause:t});await h(50)}}async function _(e){await e.file.close(),await r.unlink(e.path).catch(()=>void 0)}async function v(e,t,n){let i=`${e}.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`;try{await r.writeFile(i,t,{mode:n}),await r.rename(i,e)}catch(e){throw await r.unlink(i).catch(()=>void 0),e}}async function y(e,t){let n=await r.readFile(e.ecdhPrivPath,`utf-8`),i=await r.readFile(e.ecdhPubPath,`utf-8`),a=await r.readFile(e.signingPrivPath,`utf-8`),o=await r.readFile(e.signingPubPath,`utf-8`);await w(e.ecdhPrivPath),await w(e.signingPrivPath);let s={privateKey:await A(n,`ECDH`),publicKey:await j(i,`ECDH`)},c={privateKey:await A(a,`ECDSA`),publicKey:await j(o,`ECDSA`)};return{machineId:t,ecdhKeyPair:s,signingKeyPair:c,publicKey:await k(s.publicKey),signingPublicKey:await k(c.publicKey)}}async function b(e,t,n){n!==void 0&&n!==t&&console.warn(`[machine-keys] Hardware ID changed. Regenerating keypairs.`);let r=await globalThis.crypto.subtle.generateKey({name:`ECDH`,namedCurve:`P-256`},!0,[`deriveKey`,`deriveBits`]),i=await globalThis.crypto.subtle.generateKey({name:`ECDSA`,namedCurve:`P-256`},!0,[`sign`,`verify`]),a=await D(r.privateKey),o=await O(r.publicKey),s=await D(i.privateKey),c=await O(i.publicKey);return await v(e.ecdhPrivPath,a,384),await v(e.ecdhPubPath,o,420),await v(e.signingPrivPath,s,384),await v(e.signingPubPath,c,420),await v(e.idPath,t,420),await p(e.ecdhPrivPath,384),await p(e.signingPrivPath,384),r={privateKey:await A(a,`ECDH`),publicKey:r.publicKey},i={privateKey:await A(s,`ECDSA`),publicKey:i.publicKey},{machineId:t,ecdhKeyPair:r,signingKeyPair:i,publicKey:await k(r.publicKey),signingPublicKey:await k(i.publicKey)}}async function x(e){let t=m(e),{dir:i,idPath:a}=t,o=u.get(i);if(o)return o;let s=(async()=>{await r.mkdir(i,{recursive:!0,mode:448});let o=await g(i);try{let r=await d(a),o=await S(e);if(o.status===`complete`&&r===void 0)throw Error(`[machine-keys] Missing or malformed machine.id in ${i} with complete key material present. Refusing to regenerate keys automatically to avoid identity rotation.`);let s=await f(r);if(o.status===`partial`){let e=o.missing.map(e=>n.basename(e)).join(`, `);throw Error(`[machine-keys] Incomplete machine key set in ${i}. Missing files: ${e}. Refusing to regenerate keys automatically because that would replace existing machine identity.`)}return o.status===`complete`&&r===s?await y(t,s):await b(t,s,r)}finally{await _(o)}})();u.set(i,s);try{return await s}finally{u.get(i)===s&&u.delete(i)}}async function S(e){let{idPath:t,ecdhPrivPath:n,ecdhPubPath:i,signingPrivPath:a,signingPubPath:o}=m(e),s=[t,n,i,a,o],c=await Promise.allSettled(s.map(e=>r.access(e).then(()=>e))),l=[],u=[];for(let[e,t]of c.entries())if(t.status===`fulfilled`)l.push(s[e]);else{let n=t.reason;if(n?.code===`ENOENT`)u.push(s[e]);else throw n}return{status:l.length===s.length?`complete`:l.length===0?`missing`:`partial`,existing:l,missing:u}}async function C(e){let t=await S(e);return t.status===`partial`&&console.warn(`Warning: Machine keys in partial state. Missing files:\n${t.missing.map(e=>` - ${n.basename(e)}`).join(`
2
- `)}`),t.status===`complete`}async function w(e){let t=(await r.stat(e)).mode&511;(t&63||t&64)&&console.warn(`Warning: ${e} has permissive file mode ${t.toString(8)}. Should be 0o600.`)}function T(e,t){return`-----BEGIN ${e}-----\n${Buffer.from(t).toString(`base64`).match(/.{1,64}/g).join(`
1
+ import{execFileSync as e}from"node:child_process";import*as t from"node:fs/promises";import*as n from"node:path";import*as r from"node:fs";const i=5e3;function a(e){if(!e)return;let t=e.trim().toLowerCase();if(/^[0-9a-f]{32}$/.test(t))return t;if(/^\{?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\}?$/.test(t))return t.replace(/[{}]/g,``)}function o(){try{switch(process.platform){case`darwin`:return s();case`linux`:return c();case`win32`:return l();default:return}}catch{return}}function s(){let t=e(`/usr/sbin/ioreg`,[`-rd1`,`-c`,`IOPlatformExpertDevice`],{encoding:`utf-8`,timeout:i});return a(/"IOPlatformUUID"\s*=\s*"([^"]+)"/.exec(t)?.[1])}function c(){for(let e of[`/etc/machine-id`,`/var/lib/dbus/machine-id`])try{let t=a(r.readFileSync(e,`utf-8`));if(t)return t}catch{}}function l(){let t=e(`${process.env.SystemRoot??`C:\\Windows`}\\System32\\reg.exe`,[`query`,`HKLM\\SOFTWARE\\Microsoft\\Cryptography`,`/v`,`MachineGuid`],{encoding:`utf-8`,timeout:i});return a(/MachineGuid\s+REG_SZ\s+([^\r\n]+)/.exec(t)?.[1])}const u=new Map;async function d(e){try{let n=a(await t.readFile(e,`utf-8`));return n||console.warn(`[machine-keys] Ignoring malformed cached machine.id at ${e}.`),n}catch(e){if(e.code===`ENOENT`)return;throw e}}async function f(e){return e===void 0?o()||(console.warn(`[machine-keys] Falling back to generated machine ID; OS-native machine ID was unavailable.`),globalThis.crypto.randomUUID()):e}async function p(e,n){try{await t.chmod(e,n)}catch(e){let t=e;if(process.platform===`win32`||t.code===`ENOSYS`||t.code===`EINVAL`)return;throw e}}function m(e){let t=e;return{dir:t,ecdhPrivPath:n.join(t,`machine.key`),ecdhPubPath:n.join(t,`machine.pub`),signingPrivPath:n.join(t,`machine-signing.key`),signingPubPath:n.join(t,`machine-signing.pub`),idPath:n.join(t,`machine.id`)}}async function h(e){await new Promise(t=>setTimeout(t,e))}async function g(e){let r=n.join(e,`.machine-keys.lock`),i=Date.now()+5e3;for(;;)try{return{file:await t.open(r,`wx`,384),path:r}}catch(t){if(t.code!==`EEXIST`)throw t;if(Date.now()>=i)throw Error(`[machine-keys] Timed out waiting for initialization lock in ${e}`,{cause:t});await h(50)}}async function _(e){await e.file.close(),await t.unlink(e.path).catch(()=>void 0)}async function v(e,n,r){let i=`${e}.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`;try{await t.writeFile(i,n,{mode:r}),await t.rename(i,e)}catch(e){throw await t.unlink(i).catch(()=>void 0),e}}async function y(e,n){let r=await t.readFile(e.ecdhPrivPath,`utf-8`),i=await t.readFile(e.ecdhPubPath,`utf-8`),a=await t.readFile(e.signingPrivPath,`utf-8`),o=await t.readFile(e.signingPubPath,`utf-8`);await w(e.ecdhPrivPath),await w(e.signingPrivPath);let s={privateKey:await A(r,`ECDH`),publicKey:await j(i,`ECDH`)},c={privateKey:await A(a,`ECDSA`),publicKey:await j(o,`ECDSA`)};return{machineId:n,ecdhKeyPair:s,signingKeyPair:c,publicKey:await k(s.publicKey),signingPublicKey:await k(c.publicKey)}}async function b(e,t,n){n!==void 0&&n!==t&&console.warn(`[machine-keys] Hardware ID changed. Regenerating keypairs.`);let r=await globalThis.crypto.subtle.generateKey({name:`ECDH`,namedCurve:`P-256`},!0,[`deriveKey`,`deriveBits`]),i=await globalThis.crypto.subtle.generateKey({name:`ECDSA`,namedCurve:`P-256`},!0,[`sign`,`verify`]),a=await D(r.privateKey),o=await O(r.publicKey),s=await D(i.privateKey),c=await O(i.publicKey);return await v(e.ecdhPrivPath,a,384),await v(e.ecdhPubPath,o,420),await v(e.signingPrivPath,s,384),await v(e.signingPubPath,c,420),await v(e.idPath,t,420),await p(e.ecdhPrivPath,384),await p(e.signingPrivPath,384),r={privateKey:await A(a,`ECDH`),publicKey:r.publicKey},i={privateKey:await A(s,`ECDSA`),publicKey:i.publicKey},{machineId:t,ecdhKeyPair:r,signingKeyPair:i,publicKey:await k(r.publicKey),signingPublicKey:await k(i.publicKey)}}async function x(e){let r=m(e),{dir:i,idPath:a}=r,o=u.get(i);if(o)return o;let s=(async()=>{await t.mkdir(i,{recursive:!0,mode:448});let o=await g(i);try{let t=await d(a),o=await S(e);if(o.status===`complete`&&t===void 0)throw Error(`[machine-keys] Missing or malformed machine.id in ${i} with complete key material present. Refusing to regenerate keys automatically to avoid identity rotation.`);let s=await f(t);if(o.status===`partial`){let e=o.missing.map(e=>n.basename(e)).join(`, `);throw Error(`[machine-keys] Incomplete machine key set in ${i}. Missing files: ${e}. Refusing to regenerate keys automatically because that would replace existing machine identity.`)}return o.status===`complete`&&t===s?await y(r,s):await b(r,s,t)}finally{await _(o)}})();u.set(i,s);try{return await s}finally{u.get(i)===s&&u.delete(i)}}async function S(e){let{idPath:n,ecdhPrivPath:r,ecdhPubPath:i,signingPrivPath:a,signingPubPath:o}=m(e),s=[n,r,i,a,o],c=await Promise.allSettled(s.map(e=>t.access(e).then(()=>e))),l=[],u=[];for(let[e,t]of c.entries())if(t.status===`fulfilled`)l.push(s[e]);else{let n=t.reason;if(n?.code===`ENOENT`)u.push(s[e]);else throw n}return{status:l.length===s.length?`complete`:l.length===0?`missing`:`partial`,existing:l,missing:u}}async function C(e){let t=await S(e);return t.status===`partial`&&console.warn(`Warning: Machine keys in partial state. Missing files:\n${t.missing.map(e=>` - ${n.basename(e)}`).join(`
2
+ `)}`),t.status===`complete`}async function w(e){let n=(await t.stat(e)).mode&511;(n&63||n&64)&&console.warn(`Warning: ${e} has permissive file mode ${n.toString(8)}. Should be 0o600.`)}function T(e,t){return`-----BEGIN ${e}-----\n${Buffer.from(t).toString(`base64`).match(/.{1,64}/g).join(`
3
3
  `)}\n-----END ${e}-----\n`}function E(e,t){let n=e.replace(`-----BEGIN ${t}-----`,``).replace(`-----END ${t}-----`,``).replace(/\s/g,``),r=Buffer.from(n,`base64`);return new Uint8Array(r)}async function D(e){return T(`PRIVATE KEY`,await globalThis.crypto.subtle.exportKey(`pkcs8`,e))}async function O(e){return T(`PUBLIC KEY`,await globalThis.crypto.subtle.exportKey(`spki`,e))}async function k(e){let t=await globalThis.crypto.subtle.exportKey(`raw`,e);return Buffer.from(t).toString(`base64url`)}async function A(e,t){return globalThis.crypto.subtle.importKey(`pkcs8`,E(e,`PRIVATE KEY`),{name:t,namedCurve:`P-256`},!1,t===`ECDH`?[`deriveKey`,`deriveBits`]:[`sign`])}async function j(e,t){return globalThis.crypto.subtle.importKey(`spki`,E(e,`PUBLIC KEY`),{name:t,namedCurve:`P-256`},!0,t===`ECDH`?[]:[`verify`])}export{x as loadOrCreateMachineIdentity,C as machineKeysExist,S as validateMachineKeys};