@makaio/framework 1.0.0-dev-1779046984397

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 (410) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +363 -0
  3. package/dist/account-identity-Ce1Bwrqi.mjs +1 -0
  4. package/dist/adapter-CbyjCE2d.mjs +1 -0
  5. package/dist/adapters/acp-client/index.d.mts +209 -0
  6. package/dist/adapters/acp-client/index.mjs +1 -0
  7. package/dist/adapters/config/index.d.mts +429 -0
  8. package/dist/adapters/config/index.mjs +1 -0
  9. package/dist/adapters/index.d.mts +4175 -0
  10. package/dist/adapters/index.mjs +11 -0
  11. package/dist/adapters/node.d.mts +263 -0
  12. package/dist/adapters/node.mjs +4 -0
  13. package/dist/adapters/stream-session/index.d.mts +1384 -0
  14. package/dist/adapters/stream-session/index.mjs +1 -0
  15. package/dist/adapters/stream-session/testing/index.d.mts +29 -0
  16. package/dist/adapters/stream-session/testing/index.mjs +1 -0
  17. package/dist/base-orchestrator-9z8TuA5a.d.mts +772 -0
  18. package/dist/bus/index.d.mts +3331 -0
  19. package/dist/bus/index.mjs +1 -0
  20. package/dist/bus-B1seC4M_.mjs +2 -0
  21. package/dist/capability-service-tnpR_TaB.mjs +1 -0
  22. package/dist/chunk-Dc06z0qk.mjs +1 -0
  23. package/dist/chunk-cpUYaJdV.mjs +1 -0
  24. package/dist/cleanEnvForAdapter-DvcIGXTG.mjs +1 -0
  25. package/dist/client-Dh4x4GQN.mjs +1 -0
  26. package/dist/clients/index.d.mts +2786 -0
  27. package/dist/clients/index.mjs +1 -0
  28. package/dist/clients-namespace-B0xAPZ6J.d.mts +332 -0
  29. package/dist/config-namespace-DLSs83zr.d.mts +638 -0
  30. package/dist/config-namespace-MJT8P0Ud.mjs +1 -0
  31. package/dist/contracts/adapter/index.d.mts +3 -0
  32. package/dist/contracts/adapter/index.mjs +1 -0
  33. package/dist/contracts/adapter/schemas/session-lineage.d.mts +2 -0
  34. package/dist/contracts/adapter/schemas/session-lineage.mjs +1 -0
  35. package/dist/contracts/client/index.d.mts +3 -0
  36. package/dist/contracts/client/index.mjs +1 -0
  37. package/dist/contracts/common/index.d.mts +2 -0
  38. package/dist/contracts/common/index.mjs +1 -0
  39. package/dist/contracts/config/index.d.mts +455 -0
  40. package/dist/contracts/config/index.mjs +1 -0
  41. package/dist/contracts/extension/index.d.mts +3 -0
  42. package/dist/contracts/extension/index.mjs +1 -0
  43. package/dist/contracts/harness/index.d.mts +2 -0
  44. package/dist/contracts/harness/index.mjs +1 -0
  45. package/dist/contracts/host/index.d.mts +2 -0
  46. package/dist/contracts/host/index.mjs +1 -0
  47. package/dist/contracts/index.d.mts +12665 -0
  48. package/dist/contracts/index.mjs +1 -0
  49. package/dist/contracts/model-registry/index.d.mts +2 -0
  50. package/dist/contracts/model-registry/index.mjs +1 -0
  51. package/dist/contracts/native-session-supervisor/index.d.mts +2 -0
  52. package/dist/contracts/native-session-supervisor/index.mjs +1 -0
  53. package/dist/contracts/platform/index.d.mts +2 -0
  54. package/dist/contracts/platform/index.mjs +1 -0
  55. package/dist/contracts/provider/index.d.mts +3 -0
  56. package/dist/contracts/provider/index.mjs +1 -0
  57. package/dist/contracts/session/index.d.mts +3 -0
  58. package/dist/contracts/session/index.mjs +1 -0
  59. package/dist/contracts/shared/index.d.mts +2 -0
  60. package/dist/contracts/shared/index.mjs +1 -0
  61. package/dist/contracts/skill/index.d.mts +2 -0
  62. package/dist/contracts/skill/index.mjs +1 -0
  63. package/dist/contracts/toast/index.d.mts +198 -0
  64. package/dist/contracts/toast/index.mjs +1 -0
  65. package/dist/contracts/variant/index.d.mts +2 -0
  66. package/dist/contracts/variant/index.mjs +1 -0
  67. package/dist/core/index.d.mts +1001 -0
  68. package/dist/core/index.mjs +1 -0
  69. package/dist/credential-ref-DLCsoKVZ.mjs +1 -0
  70. package/dist/cursor-storage-DOQdvo9j.mjs +1 -0
  71. package/dist/definition-DkYy1PZz.mjs +1 -0
  72. package/dist/definition-DtUNiGom.d.mts +158 -0
  73. package/dist/definition-DxvZ9e22.d.mts +376 -0
  74. package/dist/drizzle-CWVVw7Er.mjs +1 -0
  75. package/dist/execution-target-BW_uiBVe.mjs +1 -0
  76. package/dist/extension-COqwS-2Q.mjs +1 -0
  77. package/dist/extension-Cbrl4YGX.mjs +1 -0
  78. package/dist/extension-namespace-zaGKi6Qj.mjs +1 -0
  79. package/dist/handlers-iGKUJ380.mjs +41 -0
  80. package/dist/harness-CEq1Zkf9.mjs +1 -0
  81. package/dist/hooks/index.d.mts +423 -0
  82. package/dist/hooks/index.mjs +1 -0
  83. package/dist/host-CXAUGGN0.mjs +1 -0
  84. package/dist/identity-B_A0mE63.mjs +1 -0
  85. package/dist/index-6lyShOoU.d.mts +225 -0
  86. package/dist/index-7sXlairn2.d.mts +43 -0
  87. package/dist/index-BAKM2GMH2.d.mts +535 -0
  88. package/dist/index-BB419vv-.d.mts +3897 -0
  89. package/dist/index-BJOfdtbw.d.mts +729 -0
  90. package/dist/index-BXP9GK5q.d.mts +1075 -0
  91. package/dist/index-BdPwu6c0.d.mts +1730 -0
  92. package/dist/index-BePI0ckL.d.mts +40 -0
  93. package/dist/index-Bigx81Kr.d.mts +37 -0
  94. package/dist/index-BnNqbx2I.d.mts +134 -0
  95. package/dist/index-Bv15sNLn.d.mts +389 -0
  96. package/dist/index-C-myW_aK.d.mts +412 -0
  97. package/dist/index-C9F3Fc1A.d.mts +2938 -0
  98. package/dist/index-CNxS4Tlu.d.mts +1 -0
  99. package/dist/index-CVA0m1g9.d.mts +995 -0
  100. package/dist/index-C_kS2aqV2.d.mts +438 -0
  101. package/dist/index-Ch3ph52M2.d.mts +40 -0
  102. package/dist/index-CnZOKNjU.d.mts +89 -0
  103. package/dist/index-D1T-PPqF.d.mts +67 -0
  104. package/dist/index-D7T8XCku.d.mts +341 -0
  105. package/dist/index-DBQtpFLE.d.mts +4843 -0
  106. package/dist/index-DEw90pa2.d.mts +183 -0
  107. package/dist/index-DQRsGXb5.d.mts +109 -0
  108. package/dist/index-Dd5s4MSm.d.mts +72 -0
  109. package/dist/index-DubqLGH8.d.mts +1002 -0
  110. package/dist/index-ESSDWIB7.d.mts +11 -0
  111. package/dist/index-N5K1NOYs.d.mts +184 -0
  112. package/dist/index-PdUSmPT2.d.mts +180 -0
  113. package/dist/index-SzSiyG61.d.mts +117 -0
  114. package/dist/index-T0471kWA.d.mts +6760 -0
  115. package/dist/index-WKjrpcA_.d.mts +218 -0
  116. package/dist/index-hapw9_En.d.mts +13592 -0
  117. package/dist/index-iID2R9G1.d.mts +1490 -0
  118. package/dist/kernel/cli/index.d.mts +141 -0
  119. package/dist/kernel/cli/index.mjs +1 -0
  120. package/dist/kernel/cli/schemas.d.mts +63 -0
  121. package/dist/kernel/cli/schemas.mjs +1 -0
  122. package/dist/kernel/extension/index.d.mts +2 -0
  123. package/dist/kernel/extension/index.mjs +1 -0
  124. package/dist/kernel/index.d.mts +296 -0
  125. package/dist/kernel/index.mjs +1 -0
  126. package/dist/kernel/namespace/index.d.mts +2 -0
  127. package/dist/kernel/namespace/index.mjs +1 -0
  128. package/dist/kernel/observability/index.d.mts +2 -0
  129. package/dist/kernel/observability/index.mjs +1 -0
  130. package/dist/kernel/providers/index.d.mts +2 -0
  131. package/dist/kernel/providers/index.mjs +1 -0
  132. package/dist/kernel/window/index.d.mts +2 -0
  133. package/dist/kernel/window/index.mjs +1 -0
  134. package/dist/model-registry-BNzpR6TU.mjs +1 -0
  135. package/dist/model-registry-CIscwC52.mjs +1 -0
  136. package/dist/namespace-0yuzAKlr.mjs +1 -0
  137. package/dist/namespace-8cNguvIp.mjs +1 -0
  138. package/dist/namespace-BK2erxpV.d.mts +921 -0
  139. package/dist/namespace-Bmc7AW4J2.mjs +1 -0
  140. package/dist/namespace-C2ufjgaQ.d.mts +767 -0
  141. package/dist/namespace-C54Oj025.d.mts +159 -0
  142. package/dist/namespace-CCDEOwmW.d.mts +1313 -0
  143. package/dist/namespace-CfEWMXBx.mjs +1 -0
  144. package/dist/namespace-CkLUtc0g.d.mts +580 -0
  145. package/dist/namespace-D5Wrt7YU.mjs +1 -0
  146. package/dist/namespace-DZcuLwEA.d.mts +51 -0
  147. package/dist/namespace-Db-p67Rg.mjs +1 -0
  148. package/dist/namespace-FWx6HxaW.d.mts +611 -0
  149. package/dist/namespace-GLGGcWPH.d.mts +43 -0
  150. package/dist/namespace-N0dfwSg6.mjs +1 -0
  151. package/dist/namespace-O5SNY-LV.d.mts +2226 -0
  152. package/dist/namespace-ZbthBQVt.d.mts +142 -0
  153. package/dist/namespace-bq4Prtzn.d.mts +2046 -0
  154. package/dist/namespace-pNcSglBS.mjs +1 -0
  155. package/dist/namespace-ptv-pw_g.d.mts +3019 -0
  156. package/dist/namespace-xkvVw3hf2.d.mts +189 -0
  157. package/dist/native-session-supervisor-L-UIaEfd.mjs +1 -0
  158. package/dist/node/bus-server/index.d.mts +178 -0
  159. package/dist/node/bus-server/index.mjs +1 -0
  160. package/dist/node/bus-server/server-lifecycle.d.mts +2 -0
  161. package/dist/node/bus-server/server-lifecycle.mjs +1 -0
  162. package/dist/node/machine-identity/index.d.mts +85 -0
  163. package/dist/node/machine-identity/index.mjs +3 -0
  164. package/dist/node/transports/index.d.mts +1752 -0
  165. package/dist/node/transports/index.mjs +2 -0
  166. package/dist/orchestrator-shared-DrjtTXYh.d.mts +249 -0
  167. package/dist/orchestrator-shared-Wv1GI2mW.mjs +1 -0
  168. package/dist/platform-BbSLVg5b.mjs +1 -0
  169. package/dist/profile-4StaDQW0.mjs +1 -0
  170. package/dist/provider-context-CNRQ4d5m.mjs +1 -0
  171. package/dist/providers/index.d.mts +135 -0
  172. package/dist/providers/index.mjs +1 -0
  173. package/dist/providers-Cr4Za8a1.mjs +1 -0
  174. package/dist/providers-namespace-CDwxY_DV.d.mts +583 -0
  175. package/dist/schema-BwzXEtT2.d.mts +837 -0
  176. package/dist/schema-CAw_BqaG.mjs +1 -0
  177. package/dist/schema-introspection-D61TT_7b.mjs +1 -0
  178. package/dist/schema-uSGW-6oM.mjs +1 -0
  179. package/dist/schemas-BXstpWVp.mjs +1 -0
  180. package/dist/schemas-BdMU-gew.d.mts +160 -0
  181. package/dist/schemas-C40ZAJ33.mjs +1 -0
  182. package/dist/schemas-C5xtVqdb.d.mts +46 -0
  183. package/dist/schemas-CGZy_rU6.d.mts +13 -0
  184. package/dist/schemas-CLxtoKFy.mjs +1 -0
  185. package/dist/schemas-Co_sVhzz.mjs +1 -0
  186. package/dist/schemas-D9108Iv1.d.mts +182 -0
  187. package/dist/schemas-DENVYyds.d.mts +463 -0
  188. package/dist/schemas-DbWs_hj8.d.mts +174 -0
  189. package/dist/schemas-Di0XnnMX.d.mts +73 -0
  190. package/dist/schemas-KMA1efQg.d.mts +944 -0
  191. package/dist/schemas-qmn5SWPU.d.mts +312 -0
  192. package/dist/schemas-sshQEF3l.d.mts +237 -0
  193. package/dist/server-lifecycle-Cf_SZ27k.d.mts +160 -0
  194. package/dist/server-lifecycle-DbFwlrTW.mjs +1 -0
  195. package/dist/service-base/index.d.mts +98 -0
  196. package/dist/service-base/index.mjs +1 -0
  197. package/dist/services/adapter-runtime/index.d.mts +4 -0
  198. package/dist/services/adapter-runtime/index.mjs +1 -0
  199. package/dist/services/adapter-runtime/namespace.d.mts +2 -0
  200. package/dist/services/adapter-runtime/namespace.mjs +1 -0
  201. package/dist/services/adapter-runtime/schemas.d.mts +2 -0
  202. package/dist/services/adapter-runtime/schemas.mjs +1 -0
  203. package/dist/services/adapter-subsystem/index.d.mts +3 -0
  204. package/dist/services/adapter-subsystem/index.mjs +1 -0
  205. package/dist/services/adapter-subsystem/namespace.d.mts +2 -0
  206. package/dist/services/adapter-subsystem/namespace.mjs +1 -0
  207. package/dist/services/agent-runtime/index.d.mts +3 -0
  208. package/dist/services/agent-runtime/index.mjs +1 -0
  209. package/dist/services/agent-runtime/namespace.d.mts +2 -0
  210. package/dist/services/agent-runtime/namespace.mjs +1 -0
  211. package/dist/services/agent-runtime/schemas.d.mts +2 -0
  212. package/dist/services/agent-runtime/schemas.mjs +1 -0
  213. package/dist/services/capability/index.d.mts +2 -0
  214. package/dist/services/capability/index.mjs +1 -0
  215. package/dist/services/cli-detection/namespace.d.mts +56 -0
  216. package/dist/services/cli-detection/namespace.mjs +1 -0
  217. package/dist/services/codebase/index.d.mts +3 -0
  218. package/dist/services/codebase/index.mjs +1 -0
  219. package/dist/services/codebase/namespace.d.mts +2 -0
  220. package/dist/services/codebase/namespace.mjs +1 -0
  221. package/dist/services/codebase/schemas.d.mts +2 -0
  222. package/dist/services/codebase/schemas.mjs +1 -0
  223. package/dist/services/compression/index.d.mts +3 -0
  224. package/dist/services/compression/index.mjs +1 -0
  225. package/dist/services/compression/namespace.d.mts +2 -0
  226. package/dist/services/compression/namespace.mjs +1 -0
  227. package/dist/services/compression/schemas.d.mts +2 -0
  228. package/dist/services/compression/schemas.mjs +1 -0
  229. package/dist/services/context-rules/index.d.mts +412 -0
  230. package/dist/services/context-rules/index.mjs +1 -0
  231. package/dist/services/credential-change/index.d.mts +17 -0
  232. package/dist/services/credential-change/index.mjs +1 -0
  233. package/dist/services/definition/index.d.mts +2 -0
  234. package/dist/services/definition/index.mjs +1 -0
  235. package/dist/services/definition/namespace.d.mts +71 -0
  236. package/dist/services/definition/namespace.mjs +1 -0
  237. package/dist/services/definition/schemas.d.mts +38 -0
  238. package/dist/services/definition/schemas.mjs +1 -0
  239. package/dist/services/dialog/namespace.d.mts +105 -0
  240. package/dist/services/dialog/namespace.mjs +1 -0
  241. package/dist/services/dialog/schemas.d.mts +109 -0
  242. package/dist/services/dialog/schemas.mjs +1 -0
  243. package/dist/services/execution-target/index.d.mts +4 -0
  244. package/dist/services/execution-target/index.mjs +1 -0
  245. package/dist/services/execution-target/namespace.d.mts +2 -0
  246. package/dist/services/execution-target/namespace.mjs +1 -0
  247. package/dist/services/execution-target/schemas.d.mts +2 -0
  248. package/dist/services/execution-target/schemas.mjs +1 -0
  249. package/dist/services/filesystem/namespace.d.mts +432 -0
  250. package/dist/services/filesystem/namespace.mjs +1 -0
  251. package/dist/services/filesystem/schemas.d.mts +240 -0
  252. package/dist/services/filesystem/schemas.mjs +1 -0
  253. package/dist/services/harness/index.d.mts +861 -0
  254. package/dist/services/harness/index.mjs +1 -0
  255. package/dist/services/harness/storage/schema.d.mts +424 -0
  256. package/dist/services/harness/storage/schema.mjs +1 -0
  257. package/dist/services/index.d.mts +5703 -0
  258. package/dist/services/index.mjs +1 -0
  259. package/dist/services/local-notification/index.d.mts +25 -0
  260. package/dist/services/local-notification/index.mjs +1 -0
  261. package/dist/services/local-notification/namespace.d.mts +73 -0
  262. package/dist/services/local-notification/namespace.mjs +1 -0
  263. package/dist/services/local-notification/schemas.d.mts +88 -0
  264. package/dist/services/local-notification/schemas.mjs +1 -0
  265. package/dist/services/log-import/browser.d.mts +3 -0
  266. package/dist/services/log-import/browser.mjs +1 -0
  267. package/dist/services/log-import/index.d.mts +275 -0
  268. package/dist/services/log-import/index.mjs +2 -0
  269. package/dist/services/log-import/log-import.d.mts +3 -0
  270. package/dist/services/log-import/log-import.mjs +1 -0
  271. package/dist/services/log-import/namespace.d.mts +327 -0
  272. package/dist/services/log-import/namespace.mjs +1 -0
  273. package/dist/services/log-import/schemas.d.mts +217 -0
  274. package/dist/services/log-import/schemas.mjs +1 -0
  275. package/dist/services/model-registry/index.d.mts +2 -0
  276. package/dist/services/model-registry/index.mjs +1 -0
  277. package/dist/services/preferences/index.d.mts +3 -0
  278. package/dist/services/preferences/index.mjs +1 -0
  279. package/dist/services/preferences/schemas.d.mts +2 -0
  280. package/dist/services/preferences/schemas.mjs +1 -0
  281. package/dist/services/preferences/storage-namespace.d.mts +3 -0
  282. package/dist/services/preferences/storage-namespace.mjs +1 -0
  283. package/dist/services/provider-context/index.d.mts +2 -0
  284. package/dist/services/provider-context/index.mjs +1 -0
  285. package/dist/services/provider-runtime/index.d.mts +136 -0
  286. package/dist/services/provider-runtime/index.mjs +1 -0
  287. package/dist/services/session/handlers/index.d.mts +2 -0
  288. package/dist/services/session/handlers/index.mjs +1 -0
  289. package/dist/services/session/index.d.mts +10 -0
  290. package/dist/services/session/index.mjs +1 -0
  291. package/dist/services/session/messages/namespace.d.mts +2 -0
  292. package/dist/services/session/messages/namespace.mjs +1 -0
  293. package/dist/services/session/orchestrator-testing/index.d.mts +2 -0
  294. package/dist/services/session/orchestrator-testing/index.mjs +1 -0
  295. package/dist/services/session/session-events/namespace.d.mts +2 -0
  296. package/dist/services/session/session-events/namespace.mjs +1 -0
  297. package/dist/services/session/storage/namespace.d.mts +2 -0
  298. package/dist/services/session/storage/namespace.mjs +1 -0
  299. package/dist/services/session/storage/schema.d.mts +2 -0
  300. package/dist/services/session/storage/schema.mjs +1 -0
  301. package/dist/services/session/testing/index.d.mts +35 -0
  302. package/dist/services/session/testing/index.mjs +52 -0
  303. package/dist/services/session/testing/orchestrator-shared.d.mts +2 -0
  304. package/dist/services/session/testing/orchestrator-shared.mjs +1 -0
  305. package/dist/services/session/turns/namespace.d.mts +2 -0
  306. package/dist/services/session/turns/namespace.mjs +1 -0
  307. package/dist/services/session-editor/index.d.mts +119 -0
  308. package/dist/services/session-editor/index.mjs +1 -0
  309. package/dist/services/settings/index.d.mts +47 -0
  310. package/dist/services/settings/index.mjs +1 -0
  311. package/dist/services/settings/namespace.d.mts +662 -0
  312. package/dist/services/settings/namespace.mjs +1 -0
  313. package/dist/services/settings/storage/clients-namespace.d.mts +2 -0
  314. package/dist/services/settings/storage/clients-namespace.mjs +1 -0
  315. package/dist/services/settings/storage/extension-configs/namespace.d.mts +184 -0
  316. package/dist/services/settings/storage/extension-configs/namespace.mjs +1 -0
  317. package/dist/services/settings/storage/index.d.mts +4 -0
  318. package/dist/services/settings/storage/index.mjs +1 -0
  319. package/dist/services/settings/storage/providers-namespace.d.mts +2 -0
  320. package/dist/services/settings/storage/providers-namespace.mjs +1 -0
  321. package/dist/services/tool-approval/index.d.mts +2 -0
  322. package/dist/services/tool-approval/index.mjs +1 -0
  323. package/dist/services/tools/index.d.mts +2 -0
  324. package/dist/services/tools/index.mjs +1 -0
  325. package/dist/services/tray-menu/index.d.mts +4 -0
  326. package/dist/services/tray-menu/index.mjs +1 -0
  327. package/dist/services/tray-menu/namespace.d.mts +2 -0
  328. package/dist/services/tray-menu/namespace.mjs +1 -0
  329. package/dist/services/tray-menu/schemas.d.mts +2 -0
  330. package/dist/services/tray-menu/schemas.mjs +1 -0
  331. package/dist/services/turn/index.d.mts +2 -0
  332. package/dist/services/turn/index.mjs +1 -0
  333. package/dist/services/turn/namespace.d.mts +2 -0
  334. package/dist/services/turn/namespace.mjs +1 -0
  335. package/dist/services/turn/schemas.d.mts +335 -0
  336. package/dist/services/turn/schemas.mjs +1 -0
  337. package/dist/services/worker/index.d.mts +3 -0
  338. package/dist/services/worker/index.mjs +1 -0
  339. package/dist/services/worker/namespace.d.mts +2 -0
  340. package/dist/services/worker/namespace.mjs +1 -0
  341. package/dist/services/worker/schemas.d.mts +2 -0
  342. package/dist/services/worker/schemas.mjs +1 -0
  343. package/dist/session-Do6lDZM4.mjs +123 -0
  344. package/dist/session-lineage-Eev4uo4I.d.mts +65 -0
  345. package/dist/session-piI1R5rP.mjs +1 -0
  346. package/dist/shared-DxHLl9UP.mjs +1 -0
  347. package/dist/shared-schemas-BgQv_tnu.mjs +1 -0
  348. package/dist/skill-CB5h-ZFQ.mjs +1 -0
  349. package/dist/storage/drizzle/client.d.mts +78 -0
  350. package/dist/storage/drizzle/client.mjs +1 -0
  351. package/dist/storage/drizzle/index.d.mts +98 -0
  352. package/dist/storage/drizzle/index.mjs +1 -0
  353. package/dist/storage/handlers/drizzle/index.d.mts +2 -0
  354. package/dist/storage/handlers/drizzle/index.mjs +1 -0
  355. package/dist/storage/handlers/index.d.mts +33 -0
  356. package/dist/storage/handlers/index.mjs +1 -0
  357. package/dist/storage/index.d.mts +192 -0
  358. package/dist/storage/index.mjs +1 -0
  359. package/dist/storage-namespace-ADwyijoe.mjs +1 -0
  360. package/dist/storage-namespace-DAm8iWEj.d.mts +221 -0
  361. package/dist/storage-namespace-definition-CHu2k14q.mjs +1 -0
  362. package/dist/storage-namespace-definition-CJgqyXH1.d.mts +17 -0
  363. package/dist/style.css +3782 -0
  364. package/dist/testing/drizzle-harness.d.mts +130 -0
  365. package/dist/testing/drizzle-harness.mjs +1 -0
  366. package/dist/testing/index.d.mts +106 -0
  367. package/dist/testing/index.mjs +1 -0
  368. package/dist/tool-approval-service-BcBSUZCO.mjs +1 -0
  369. package/dist/tools/index.d.mts +825 -0
  370. package/dist/tools/index.mjs +1 -0
  371. package/dist/tools/testing/index.d.mts +53 -0
  372. package/dist/tools/testing/index.mjs +1 -0
  373. package/dist/tools-CDSgj0ee.mjs +1 -0
  374. package/dist/tray-menu-service-CTXC1Elg.mjs +1 -0
  375. package/dist/types-6WxLfoM3.d.mts +31 -0
  376. package/dist/types-BjToUrHp.d.mts +6619 -0
  377. package/dist/types-CD1LJwPc.d.mts +1009 -0
  378. package/dist/types-Cvrj2ogm.d.mts +305 -0
  379. package/dist/types-DYF5LxZY.d.mts +233 -0
  380. package/dist/types-t295YC6T.d.mts +262 -0
  381. package/dist/types-vNpkAe4Y.d.mts +128 -0
  382. package/dist/ui-components/index.d.mts +2342 -0
  383. package/dist/ui-components/index.mjs +8 -0
  384. package/dist/ui-config-CXmbsqZV.mjs +1 -0
  385. package/dist/ui-hooks/index.d.mts +1805 -0
  386. package/dist/ui-hooks/index.mjs +1 -0
  387. package/dist/ui-kernel/index.d.mts +2793 -0
  388. package/dist/ui-kernel/index.mjs +1 -0
  389. package/dist/ui-kernel/pages/namespace.d.mts +88 -0
  390. package/dist/ui-kernel/pages/namespace.mjs +1 -0
  391. package/dist/ui-kernel/pages/schemas.d.mts +2 -0
  392. package/dist/ui-kernel/pages/schemas.mjs +1 -0
  393. package/dist/ui-views/index.d.mts +487 -0
  394. package/dist/ui-views/index.mjs +30 -0
  395. package/dist/utils/health-probe.d.mts +26 -0
  396. package/dist/utils/health-probe.mjs +1 -0
  397. package/dist/utils/index.d.mts +227 -0
  398. package/dist/utils/index.mjs +2 -0
  399. package/dist/utils/keychain.d.mts +31 -0
  400. package/dist/utils/keychain.mjs +1 -0
  401. package/dist/utils/resolve-package-root.d.mts +12 -0
  402. package/dist/utils/resolve-package-root.mjs +1 -0
  403. package/dist/utils/workspace-root.d.mts +27 -0
  404. package/dist/utils/workspace-root.mjs +2 -0
  405. package/dist/variant-D5kSrL3m.mjs +1 -0
  406. package/dist/version-CjS20oXi.mjs +1 -0
  407. package/dist/visibility-CZu8ooOA.mjs +1 -0
  408. package/dist/window-registry-CUftmDr3.mjs +1 -0
  409. package/dist/window-registry-C_IJmY8_.d.mts +130 -0
  410. package/package.json +346 -0
@@ -0,0 +1,227 @@
1
+ //#region packages/utils/src/deferred-promise.d.ts
2
+ declare class DeferredPromise<T> {
3
+ private deferred;
4
+ private isTracked;
5
+ getPromise(): Promise<T>;
6
+ resolve(value: T): void;
7
+ reject(error: Error): void;
8
+ }
9
+ //#endregion
10
+ //#region packages/utils/src/is-record.d.ts
11
+ /**
12
+ * Check whether a value is a non-array object (a "record").
13
+ * @param value - Value to check.
14
+ * @returns True when the value is a plain record.
15
+ */
16
+ declare function isRecord(value: unknown): value is Record<string, unknown>;
17
+ //#endregion
18
+ //#region packages/utils/src/extract-json.d.ts
19
+ /**
20
+ * Extract a JSON object from text that may contain surrounding content.
21
+ *
22
+ * LLM responses often wrap JSON in markdown fences or prose. This function
23
+ * finds the first `{` and last `}` in the text and returns the substring
24
+ * between them (inclusive).
25
+ *
26
+ * Returns the original text unchanged when no valid brace pair is found.
27
+ * @param text - Raw text potentially containing a JSON object
28
+ * @returns Extracted JSON substring, or the original text if no braces found
29
+ */
30
+ declare function extractJson(text: string): string;
31
+ //#endregion
32
+ //#region packages/utils/src/getErrorString.d.ts
33
+ /**
34
+ * Extracts error message string from various error types
35
+ * @param error - Error value to extract message from
36
+ * @returns Error message string or 'Unknown error'
37
+ */
38
+ declare function getErrorString(error: string | Error | undefined): string;
39
+ //#endregion
40
+ //#region packages/utils/src/normalize-bus-secret.d.ts
41
+ /**
42
+ * Shared normalization for the `MAKAIO_BUS_SECRET` environment variable.
43
+ *
44
+ * Applies consistent trim-and-reject logic so every entry-point (CLI serve,
45
+ * config provider, …) behaves identically when reading the secret.
46
+ */
47
+ /**
48
+ * Normalize a raw `MAKAIO_BUS_SECRET` value.
49
+ *
50
+ * - `undefined` (variable unset) → returns `undefined`
51
+ * - Non-empty string after trimming → returns the trimmed value
52
+ * - Empty string or whitespace-only → throws, because a secret that collapses
53
+ * to the empty string is almost certainly a misconfiguration and must not
54
+ * silently fall back to unauthenticated mode.
55
+ * @param raw - The raw environment variable value, or `undefined` when unset.
56
+ * @returns The trimmed secret string, or `undefined` when the variable is unset.
57
+ * @throws When the variable is set but evaluates to an empty string after trimming.
58
+ */
59
+ declare function normalizeBusSecret(raw: string | undefined): string | undefined;
60
+ //#endregion
61
+ //#region packages/utils/src/runtime.d.ts
62
+ /**
63
+ * Runtime detection utilities.
64
+ *
65
+ * Provides a single, canonical implementation of runtime checks used across
66
+ * framework packages and host extensions.
67
+ * @packageDocumentation
68
+ */
69
+ /**
70
+ * Returns `true` when the current process is running under the Bun runtime.
71
+ *
72
+ * Detection is based on the presence of the `Bun` property on `globalThis`,
73
+ * which Bun always exposes. Uses a bracket-access check to avoid a TypeScript
74
+ * error on environments where the `Bun` global is not declared.
75
+ * @returns Whether the current runtime is Bun.
76
+ */
77
+ declare function isBunRuntime(): boolean;
78
+ //#endregion
79
+ //#region packages/utils/src/safe-stringify.d.ts
80
+ /**
81
+ * JSON-stringify a value, handling BigInt and circular references gracefully.
82
+ * @param value - Value to serialize.
83
+ * @returns JSON string, never throws.
84
+ */
85
+ declare function safeStringify(value: unknown): string;
86
+ //#endregion
87
+ //#region packages/utils/src/timeout/types.d.ts
88
+ /**
89
+ * Timeout configuration types for AI adapter operations.
90
+ *
91
+ * Each category represents a distinct phase with different performance
92
+ * characteristics and failure modes.
93
+ */
94
+ /**
95
+ * Categories of timeouts in the adapter lifecycle.
96
+ */
97
+ type TimeoutCategory = 'initialization' | 'acknowledgement' | 'completion' | 'toolApproval' | 'eventWait';
98
+ /**
99
+ * Complete timeout configuration where all categories are required.
100
+ * Used by adapters to declare their mandatory defaults.
101
+ */
102
+ type RequiredTimeoutConfig = Record<TimeoutCategory, number>;
103
+ /**
104
+ * Layer that provided a timeout value (for provenance tracking).
105
+ */
106
+ type TimeoutLayer = 'global' | 'adapter' | 'runtime' | 'call';
107
+ /**
108
+ * Provenance tracking: which layer set each timeout value.
109
+ */
110
+ type TimeoutSources = Record<TimeoutCategory, {
111
+ layer: TimeoutLayer;
112
+ source: string;
113
+ }>;
114
+ /**
115
+ * Resolved timeout configuration with provenance tracking.
116
+ * Enables debugging "why is this timeout X?"
117
+ */
118
+ interface TrackedTimeoutConfig {
119
+ /** Resolved timeout values in milliseconds */
120
+ values: RequiredTimeoutConfig;
121
+ /** Source information for each timeout value */
122
+ sources: TimeoutSources;
123
+ }
124
+ /**
125
+ * Global default timeout values (milliseconds).
126
+ *
127
+ * Philosophy:
128
+ * - initialization: Allow time for cold starts and auth
129
+ * - acknowledgement: Fast feedback that message was received
130
+ * - completion: Account for complex reasoning
131
+ * - toolApproval: Short for responsiveness (user is waiting)
132
+ * - eventWait: Default for once() calls waiting for events
133
+ */
134
+ declare const DEFAULT_TIMEOUTS: RequiredTimeoutConfig;
135
+ /**
136
+ * All timeout categories as array (for iteration).
137
+ */
138
+ declare const TIMEOUT_CATEGORIES: readonly TimeoutCategory[];
139
+ /**
140
+ * Partial timeout configuration for user overrides.
141
+ * All fields are optional - missing values inherit from lower layers.
142
+ */
143
+ type TimeoutConfig = Partial<RequiredTimeoutConfig>;
144
+ //#endregion
145
+ //#region packages/utils/src/timeout/resolve.d.ts
146
+ /**
147
+ * Input for a single layer in the timeout resolution chain.
148
+ */
149
+ interface TimeoutLayerInput {
150
+ /** Which layer this config comes from */
151
+ layer: TimeoutLayer;
152
+ /** Human-readable source identifier (e.g., 'openai-node', 'config.ts') */
153
+ source: string;
154
+ /** Partial timeout config - undefined values are skipped */
155
+ config: TimeoutConfig | undefined;
156
+ }
157
+ /**
158
+ * Resolve timeout configuration by merging layers in order.
159
+ *
160
+ * Resolution order (later overrides earlier):
161
+ * 1. Global defaults (DEFAULT_TIMEOUTS)
162
+ * 2. Adapter defaults (from adapterDefinition.defaultTimeouts)
163
+ * 3. Runtime config (from adapter config.ts / environment)
164
+ * 4. Per-call overrides (passed to individual operations)
165
+ * @param layers - Array of layer inputs to merge
166
+ * @returns TrackedTimeoutConfig with resolved values and provenance
167
+ * @example
168
+ * ```typescript
169
+ * const timeouts = resolveTimeouts([
170
+ * { layer: 'adapter', source: 'openai-node', config: adapterDefinition.defaultTimeouts },
171
+ * { layer: 'runtime', source: 'config.ts', config: runtimeOverrides },
172
+ * ]);
173
+ * // timeouts.values.completion -> resolved value
174
+ * // timeouts.sources.completion -> { layer: 'adapter', source: 'openai-node' }
175
+ * ```
176
+ */
177
+ declare function resolveTimeouts(layers: TimeoutLayerInput[]): TrackedTimeoutConfig;
178
+ /**
179
+ * Debug helper: explain why a timeout has its current value.
180
+ * @param tracked - Resolved timeout config with provenance
181
+ * @param category - Which timeout category to explain
182
+ * @returns Human-readable explanation string
183
+ * @example
184
+ * ```typescript
185
+ * console.debug(explainTimeout(timeouts, 'completion'));
186
+ * // "completion=120000ms (from adapter: openai-node)"
187
+ * ```
188
+ */
189
+ declare function explainTimeout(tracked: TrackedTimeoutConfig, category: TimeoutCategory): string;
190
+ /**
191
+ * Debug helper: explain all timeout values and their sources.
192
+ * @param tracked - Resolved timeout config with provenance
193
+ * @returns Multi-line string with all timeouts explained
194
+ */
195
+ declare function explainAllTimeouts(tracked: TrackedTimeoutConfig): string;
196
+ //#endregion
197
+ //#region packages/utils/src/timeout/signal.d.ts
198
+ /**
199
+ * An AbortSignal paired with a cleanup handle for its backing timer.
200
+ */
201
+ interface TimeoutSignal {
202
+ /** AbortSignal that aborts when the timeout elapses. */
203
+ signal: AbortSignal;
204
+ /** Cancel the backing timer before it fires, preventing the abort. */
205
+ clear: () => void;
206
+ }
207
+ /**
208
+ * Create an `AbortSignal` that aborts after `timeoutMs` milliseconds.
209
+ *
210
+ * Always call {@link TimeoutSignal.clear} in a `finally` block to prevent
211
+ * the timer from leaking when the guarded operation completes before the
212
+ * timeout elapses.
213
+ * @param timeoutMs - Timeout duration in milliseconds.
214
+ * @returns A {@link TimeoutSignal} containing the signal and a `clear` callback.
215
+ * @example
216
+ * ```typescript
217
+ * const timeout = createTimeoutSignal(5_000);
218
+ * try {
219
+ * const response = await fetch(url, { signal: timeout.signal });
220
+ * } finally {
221
+ * timeout.clear();
222
+ * }
223
+ * ```
224
+ */
225
+ declare function createTimeoutSignal(timeoutMs: number): TimeoutSignal;
226
+ //#endregion
227
+ export { DEFAULT_TIMEOUTS, DeferredPromise, type RequiredTimeoutConfig, TIMEOUT_CATEGORIES, type TimeoutCategory, type TimeoutConfig, type TimeoutLayer, type TimeoutLayerInput, type TimeoutSignal, type TimeoutSources, type TrackedTimeoutConfig, createTimeoutSignal, explainAllTimeouts, explainTimeout, extractJson, getErrorString, isBunRuntime, isRecord, normalizeBusSecret, resolveTimeouts, safeStringify };
@@ -0,0 +1,2 @@
1
+ import e from"p-defer";var t=class{deferred=e();isTracked=!1;getPromise(){return this.isTracked=!0,this.deferred.promise}resolve(e){this.deferred.resolve(e)}reject(e){this.isTracked&&this.deferred.reject(e)}};function n(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function r(e){let t=e.indexOf(`{`),n=e.lastIndexOf(`}`);return t===-1||n===-1||n<=t?e:e.slice(t,n+1)}function i(e){return e?typeof e==`string`?e:e.message||`Unknown error`:`Unknown error`}function a(e){if(e===void 0)return;let t=e.trim();if(t===``)throw Error(`MAKAIO_BUS_SECRET is set but empty after trimming; refusing to use an empty secret`);return t}function o(){return globalThis.Bun!==void 0}function s(e){if(e===void 0)return`null`;let t=[];try{return JSON.stringify(e,function(e,n){if(typeof n==`bigint`)return n.toString();for(;t.length>0&&t[t.length-1]!==this;)t.pop();if(typeof n==`object`&&n){if(t.includes(n))return`[Circular]`;t.push(n)}return n})??JSON.stringify(String(e))??`"[Unserializable]"`}catch{try{return JSON.stringify(String(e))??`"[Unserializable]"`}catch{return`"[Unserializable]"`}}}const c={initialization:3e4,acknowledgement:3e4,completion:6e4,toolApproval:5e3,eventWait:1e4},l=[`initialization`,`acknowledgement`,`completion`,`toolApproval`,`eventWait`];function u(e){let t={...c},n={};for(let e of l)n[e]={layer:`global`,source:`DEFAULT_TIMEOUTS`};for(let{layer:r,source:i,config:a}of e)if(a)for(let e of l){let o=a[e];o!==void 0&&(t[e]=o,n[e]={layer:r,source:i})}return{values:t,sources:n}}function d(e,t){let{layer:n,source:r}=e.sources[t];return`${t}=${e.values[t]}ms (from ${n}: ${r})`}function f(e){return l.map(t=>d(e,t)).join(`
2
+ `)}function p(e){let t=new AbortController,n=setTimeout(()=>t.abort(),e);return{signal:t.signal,clear:()=>clearTimeout(n)}}export{c as DEFAULT_TIMEOUTS,t as DeferredPromise,l as TIMEOUT_CATEGORIES,p as createTimeoutSignal,f as explainAllTimeouts,d as explainTimeout,r as extractJson,i as getErrorString,o as isBunRuntime,n as isRecord,a as normalizeBusSecret,u as resolveTimeouts,s as safeStringify};
@@ -0,0 +1,31 @@
1
+ //#region packages/utils/src/keychain.d.ts
2
+ /**
3
+ * Reads a generic password from the macOS keychain.
4
+ *
5
+ * Uses `/usr/bin/security` directly with argv arrays so shell expansion is not
6
+ * involved. Returns `null` when the entry does not exist.
7
+ * @param service - Keychain service name.
8
+ * @param account - Optional keychain account name.
9
+ * @returns Stored password value, or `null` when absent.
10
+ */
11
+ declare function keychainRead(service: string, account?: string): Promise<string | null>;
12
+ /**
13
+ * Writes a generic password to the macOS keychain.
14
+ *
15
+ * Uses `-U` to update existing entries and `-X` so arbitrary UTF-8 JSON values
16
+ * round-trip without shell quoting or locale assumptions.
17
+ * @param service - Keychain service name.
18
+ * @param account - Keychain account name.
19
+ * @param value - Password value to store.
20
+ */
21
+ declare function keychainWrite(service: string, account: string, value: string): Promise<void>;
22
+ /**
23
+ * Deletes a generic password from the macOS keychain.
24
+ *
25
+ * Missing entries are treated as already deleted.
26
+ * @param service - Keychain service name.
27
+ * @param account - Optional keychain account name.
28
+ */
29
+ declare function keychainDelete(service: string, account?: string): Promise<void>;
30
+ //#endregion
31
+ export { keychainDelete, keychainRead, keychainWrite };
@@ -0,0 +1 @@
1
+ import{execFile as e}from"node:child_process";import{promisify as t}from"node:util";const n=t(e);function r(e){let t=/^password: 0x([0-9A-Fa-f]+)/m.exec(e);if(t)return Buffer.from(t[1],`hex`).toString(`utf-8`);let n=/^password: "(.*)"/m.exec(e);if(n)return n[1];let r=e.replace(/^password:.*$/gm,`password: [REDACTED]`);throw Error(`Unexpected security output format: ${r}`)}async function i(e,t){let i=[`find-generic-password`,`-s`,e,`-g`];t&&i.push(`-a`,t);try{let{stderr:e}=await n(`/usr/bin/security`,i);return r(e)}catch(e){if(e instanceof Error){let t=e.code;if(t===`ENOENT`)throw e;if(t===44)return null}throw e}}async function a(e,t,r){await n(`/usr/bin/security`,[`add-generic-password`,`-U`,`-s`,e,`-a`,t,`-X`,Buffer.from(r,`utf-8`).toString(`hex`)])}async function o(e,t){let r=[`delete-generic-password`,`-s`,e];t&&r.push(`-a`,t);try{await n(`/usr/bin/security`,r)}catch(e){if(e instanceof Error){let t=e.code;if(t===`ENOENT`)throw e;if(t===44)return}throw e}}export{o as keychainDelete,i as keychainRead,a as keychainWrite};
@@ -0,0 +1,12 @@
1
+ //#region packages/utils/src/resolve-package-root.d.ts
2
+ /**
3
+ * Resolve a server-side package root from an ESM import meta object.
4
+ *
5
+ * Browser imports intentionally return `undefined` so package declarations can
6
+ * be evaluated by UI bundles without resolving filesystem paths.
7
+ * @param importMeta - Module import metadata from the package entrypoint.
8
+ * @returns Parent directory of the package entrypoint, or `undefined` in browser/non-file contexts.
9
+ */
10
+ declare function resolvePackageRoot(importMeta: Pick<ImportMeta, 'url'>): string | undefined;
11
+ //#endregion
12
+ export { resolvePackageRoot };
@@ -0,0 +1 @@
1
+ import{fileURLToPath as e}from"node:url";function t(t){return globalThis.window===void 0&&t.url.startsWith(`file:`)?e(new URL(`..`,t.url)):void 0}export{t as resolvePackageRoot};
@@ -0,0 +1,27 @@
1
+ //#region packages/utils/src/workspace-root.d.ts
2
+ /**
3
+ * Resolve the workspace root from a package directory 2–4 levels below the root.
4
+ *
5
+ * Supports two source layouts:
6
+ * - **Prefixed source layout**: workspace root contains `framework/package.json`;
7
+ * the workspace root is the nearest ancestor (up to 4 levels) that contains
8
+ * `framework/package.json`.
9
+ * - **Package-root layout**: workspace root contains `package.json` directly;
10
+ * the workspace root is the nearest ancestor that contains `package.json`.
11
+ *
12
+ * Resolution uses two passes over bounded candidate depths (2–4 levels up):
13
+ * 1. **Prefixed-layout pass** — prefer the shallowest candidate containing
14
+ * `framework/package.json` (avoids overshooting into an enclosing workspace).
15
+ * 2. **Package-root fallback** — if no prefixed-layout marker is found, accept the
16
+ * shallowest candidate containing `package.json`.
17
+ *
18
+ * The two-pass approach prevents a bare `package.json` above the repo root
19
+ * from being mistakenly selected when the prefixed-layout marker is present deeper.
20
+ * @param packageDir - Absolute path to a package directory inside the repo
21
+ * (e.g. the value of `path.dirname(fileURLToPath(import.meta.url))`).
22
+ * @returns Absolute path to the workspace root.
23
+ * @throws If neither supported source layout is detected at any candidate depth.
24
+ */
25
+ declare function resolveWorkspaceRoot(packageDir: string): string;
26
+ //#endregion
27
+ export { resolveWorkspaceRoot };
@@ -0,0 +1,2 @@
1
+ import{existsSync as e}from"node:fs";import t from"node:path";function n(n){if(!t.isAbsolute(n))throw Error(`[workspace-root] packageDir must be absolute. Received: "${n}"`);let r=[t.resolve(n,`../..`),t.resolve(n,`../../..`),t.resolve(n,`../../../..`)];for(let n of r)if(e(t.join(n,`framework`,`package.json`)))return n;for(let n of r)if(e(t.join(n,`package.json`)))return n;throw Error(`[workspace-root] Could not resolve workspace root from "${n}". Checked:\n${r.map(e=>`- ${e}`).join(`
2
+ `)}`)}export{n as resolveWorkspaceRoot};
@@ -0,0 +1 @@
1
+ import{z as e}from"zod";import{createBusNamespace as t}from"@makaio/framework/core";const n=e.enum([`base`,`cef`]),r=e.enum([`downloading`,`progress`,`applying`,`complete`,`error`]),i={getInfo:{request:e.object({}),response:e.object({variant:n,bundleCEF:e.boolean(),defaultRenderer:e.enum([`native`,`cef`])})},requestUpgrade:{request:e.object({targetVariant:n}),response:e.union([e.object({accepted:e.literal(!0),downloadSizeBytes:e.number().int().nonnegative().optional(),message:e.string().optional()}),e.object({accepted:e.literal(!1),message:e.string().min(1)})])},upgradeProgress:e.object({status:r,percent:e.number().min(0).max(100).optional(),message:e.string().optional()})},a=t(`host:variant`,i),o=a.subjects;export{r as a,i,o as n,n as r,a as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./chunk-Dc06z0qk.mjs";import{z as t}from"zod";var n=e(((e,t)=>{t.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:`2.0.0`,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),r=e(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),i=e(((e,t)=>{let{MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=n(),s=r();e=t.exports={};let c=e.re=[],l=e.safeRe=[],u=e.src=[],d=e.safeSrc=[],f=e.t={},p=0,m=`[a-zA-Z0-9-]`,h=[[`\\s`,1],[`\\d`,o],[m,a]],g=e=>{for(let[t,n]of h)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},_=(e,t,n)=>{let r=g(t),i=p++;s(e,i,t),f[e]=i,u[i]=t,d[i]=r,c[i]=new RegExp(t,n?`g`:void 0),l[i]=new RegExp(r,n?`g`:void 0)};_(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),_(`NUMERICIDENTIFIERLOOSE`,`\\d+`),_(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${m}*`),_(`MAINVERSION`,`(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})\\.(${u[f.NUMERICIDENTIFIER]})`),_(`MAINVERSIONLOOSE`,`(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})\\.(${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASEIDENTIFIER`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIER]})`),_(`PRERELEASEIDENTIFIERLOOSE`,`(?:${u[f.NONNUMERICIDENTIFIER]}|${u[f.NUMERICIDENTIFIERLOOSE]})`),_(`PRERELEASE`,`(?:-(${u[f.PRERELEASEIDENTIFIER]}(?:\\.${u[f.PRERELEASEIDENTIFIER]})*))`),_(`PRERELEASELOOSE`,`(?:-?(${u[f.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[f.PRERELEASEIDENTIFIERLOOSE]})*))`),_(`BUILDIDENTIFIER`,`${m}+`),_(`BUILD`,`(?:\\+(${u[f.BUILDIDENTIFIER]}(?:\\.${u[f.BUILDIDENTIFIER]})*))`),_(`FULLPLAIN`,`v?${u[f.MAINVERSION]}${u[f.PRERELEASE]}?${u[f.BUILD]}?`),_(`FULL`,`^${u[f.FULLPLAIN]}$`),_(`LOOSEPLAIN`,`[v=\\s]*${u[f.MAINVERSIONLOOSE]}${u[f.PRERELEASELOOSE]}?${u[f.BUILD]}?`),_(`LOOSE`,`^${u[f.LOOSEPLAIN]}$`),_(`GTLT`,`((?:<|>)?=?)`),_(`XRANGEIDENTIFIERLOOSE`,`${u[f.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),_(`XRANGEIDENTIFIER`,`${u[f.NUMERICIDENTIFIER]}|x|X|\\*`),_(`XRANGEPLAIN`,`[v=\\s]*(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:\\.(${u[f.XRANGEIDENTIFIER]})(?:${u[f.PRERELEASE]})?${u[f.BUILD]}?)?)?`),_(`XRANGEPLAINLOOSE`,`[v=\\s]*(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[f.XRANGEIDENTIFIERLOOSE]})(?:${u[f.PRERELEASELOOSE]})?${u[f.BUILD]}?)?)?`),_(`XRANGE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAIN]}$`),_(`XRANGELOOSE`,`^${u[f.GTLT]}\\s*${u[f.XRANGEPLAINLOOSE]}$`),_(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`),_(`COERCE`,`${u[f.COERCEPLAIN]}(?:$|[^\\d])`),_(`COERCEFULL`,u[f.COERCEPLAIN]+`(?:${u[f.PRERELEASE]})?(?:${u[f.BUILD]})?(?:$|[^\\d])`),_(`COERCERTL`,u[f.COERCE],!0),_(`COERCERTLFULL`,u[f.COERCEFULL],!0),_(`LONETILDE`,`(?:~>?)`),_(`TILDETRIM`,`(\\s*)${u[f.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,_(`TILDE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAIN]}$`),_(`TILDELOOSE`,`^${u[f.LONETILDE]}${u[f.XRANGEPLAINLOOSE]}$`),_(`LONECARET`,`(?:\\^)`),_(`CARETTRIM`,`(\\s*)${u[f.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,_(`CARET`,`^${u[f.LONECARET]}${u[f.XRANGEPLAIN]}$`),_(`CARETLOOSE`,`^${u[f.LONECARET]}${u[f.XRANGEPLAINLOOSE]}$`),_(`COMPARATORLOOSE`,`^${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]})$|^$`),_(`COMPARATOR`,`^${u[f.GTLT]}\\s*(${u[f.FULLPLAIN]})$|^$`),_(`COMPARATORTRIM`,`(\\s*)${u[f.GTLT]}\\s*(${u[f.LOOSEPLAIN]}|${u[f.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,_(`HYPHENRANGE`,`^\\s*(${u[f.XRANGEPLAIN]})\\s+-\\s+(${u[f.XRANGEPLAIN]})\\s*$`),_(`HYPHENRANGELOOSE`,`^\\s*(${u[f.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[f.XRANGEPLAINLOOSE]})\\s*$`),_(`STAR`,`(<|>)?=?\\s*\\*`),_(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),_(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),a=e(((e,t)=>{let n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),o=e(((e,t)=>{let n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),s=e(((e,t)=>{let s=r(),{MAX_LENGTH:c,MAX_SAFE_INTEGER:l}=n(),{safeRe:u,t:d}=i(),f=a(),{compareIdentifiers:p}=o();t.exports=class e{constructor(t,n){if(n=f(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>c)throw TypeError(`version is longer than ${c} characters`);s(`SemVer`,t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=t.trim().match(n.loose?u[d.LOOSE]:u[d.FULL]);if(!r)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>l||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>l||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>l||this.patch<0)throw TypeError(`Invalid patch version`);r[4]?this.prerelease=r[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<l)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(s(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:+(this.patch>t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let e=this.prerelease[n],r=t.prerelease[n];if(s(`prerelease compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e===r)continue;return p(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{let e=this.build[n],r=t.build[n];if(s(`build compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e===r)continue;return p(e,r)}while(++n)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?u[d.PRERELEASELOOSE]:u[d.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),p(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),c=e(((e,t)=>{let n=s();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),l=e(((e,t)=>{let n=c();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),u=e(((e,t)=>{let n=c();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),d=e(((e,t)=>{let n=s();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),f=e(((e,t)=>{let n=c();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),p=e(((e,t)=>{let n=s();t.exports=(e,t)=>new n(e,t).major})),m=e(((e,t)=>{let n=s();t.exports=(e,t)=>new n(e,t).minor})),h=e(((e,t)=>{let n=s();t.exports=(e,t)=>new n(e,t).patch})),g=e(((e,t)=>{let n=c();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),_=e(((e,t)=>{let n=s();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),v=e(((e,t)=>{let n=_();t.exports=(e,t,r)=>n(t,e,r)})),y=e(((e,t)=>{let n=_();t.exports=(e,t)=>n(e,t,!0)})),b=e(((e,t)=>{let n=s();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),x=e(((e,t)=>{let n=b();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),S=e(((e,t)=>{let n=b();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),C=e(((e,t)=>{let n=_();t.exports=(e,t,r)=>n(e,t,r)>0})),w=e(((e,t)=>{let n=_();t.exports=(e,t,r)=>n(e,t,r)<0})),T=e(((e,t)=>{let n=_();t.exports=(e,t,r)=>n(e,t,r)===0})),E=e(((e,t)=>{let n=_();t.exports=(e,t,r)=>n(e,t,r)!==0})),D=e(((e,t)=>{let n=_();t.exports=(e,t,r)=>n(e,t,r)>=0})),O=e(((e,t)=>{let n=_();t.exports=(e,t,r)=>n(e,t,r)<=0})),k=e(((e,t)=>{let n=T(),r=E(),i=C(),a=D(),o=w(),s=O();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),A=e(((e,t)=>{let n=s(),r=c(),{safeRe:a,t:o}=i();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let i=null;if(!t.rtl)i=e.match(t.includePrerelease?a[o.COERCEFULL]:a[o.COERCE]);else{let n=t.includePrerelease?a[o.COERCERTLFULL]:a[o.COERCERTL],r;for(;(r=n.exec(e))&&(!i||i.index+i[0].length!==e.length);)(!i||r.index+r[0].length!==i.index+i[0].length)&&(i=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(i===null)return null;let s=i[2];return r(`${s}.${i[3]||`0`}.${i[4]||`0`}${t.includePrerelease&&i[5]?`-${i[5]}`:``}${t.includePrerelease&&i[6]?`+${i[6]}`:``}`,t)}})),j=e(((e,t)=>{let r=c(),i=n(),a=s(),o=(e,t,n)=>{if(!i.RELEASE_TYPES.includes(t))return null;let r=l(e,n);return r&&u(r,t)},l=(e,t)=>r(e instanceof a?e.version:e,t),u=(e,t)=>{if(d(t))return e.version;switch(e.prerelease=[],t){case`major`:e.minor=0,e.patch=0;break;case`minor`:e.patch=0;break}return e.format()},d=e=>e.startsWith(`pre`);t.exports=o})),M=e(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),N=e(((e,t)=>{let o=/\s+/g;t.exports=class e{constructor(t,n){if(n=l(n),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof u)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().replace(o,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!b(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&x(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&v)|(this.options.loose&&y))+`:`+e,n=c.get(t);if(n)return n;let r=this.options.loose,i=r?p[m.HYPHENRANGELOOSE]:p[m.HYPHENRANGE];e=e.replace(i,F(this.options.includePrerelease)),d(`hyphen replace`,e),e=e.replace(p[m.COMPARATORTRIM],h),d(`comparator trim`,e),e=e.replace(p[m.TILDETRIM],g),d(`tilde trim`,e),e=e.replace(p[m.CARETTRIM],_),d(`caret trim`,e);let a=e.split(` `).map(e=>C(e,this.options)).join(` `).split(/\s+/).map(e=>N(e,this.options));r&&(a=a.filter(e=>(d(`loose invalid filter`,e,this.options),!!e.match(p[m.COMPARATORLOOSE])))),d(`range list`,a);let o=new Map,s=a.map(e=>new u(e,this.options));for(let e of s){if(b(e))return[e];o.set(e.value,e)}o.size>1&&o.has(``)&&o.delete(``);let l=[...o.values()];return c.set(t,l),l}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>S(e,n)&&t.set.some(t=>S(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(I(this.set[t],e,this.options))return!0;return!1}};let c=new(M()),l=a(),u=P(),d=r(),f=s(),{safeRe:p,t:m,comparatorTrimReplace:h,tildeTrimReplace:g,caretTrimReplace:_}=i(),{FLAG_INCLUDE_PRERELEASE:v,FLAG_LOOSE:y}=n(),b=e=>e.value===`<0.0.0-0`,x=e=>e.value===``,S=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},C=(e,t)=>(e=e.replace(p[m.BUILD],``),d(`comp`,e,t),e=D(e,t),d(`caret`,e),e=T(e,t),d(`tildes`,e),e=k(e,t),d(`xrange`,e),e=j(e,t),d(`stars`,e),e),w=e=>!e||e.toLowerCase()===`x`||e===`*`,T=(e,t)=>e.trim().split(/\s+/).map(e=>E(e,t)).join(` `),E=(e,t)=>{let n=t.loose?p[m.TILDELOOSE]:p[m.TILDE];return e.replace(n,(t,n,r,i,a)=>{d(`tilde`,e,t,n,r,i,a);let o;return w(n)?o=``:w(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:w(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(d(`replaceTilde pr`,a),o=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,d(`tilde return`,o),o})},D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(` `),O=(e,t)=>{d(`caret`,e,t);let n=t.loose?p[m.CARETLOOSE]:p[m.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{d(`caret`,e,t,n,i,a,o);let s;return w(n)?s=``:w(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:w(a)?s=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(d(`replaceCaret pr`,o),s=n===`0`?i===`0`?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(d(`no pr`),s=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),d(`caret return`,s),s})},k=(e,t)=>(d(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>A(e,t)).join(` `)),A=(e,t)=>{e=e.trim();let n=t.loose?p[m.XRANGELOOSE]:p[m.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{d(`xRange`,e,n,r,i,a,o,s);let c=w(i),l=c||w(a),u=l||w(o),f=u;return r===`=`&&f&&(r=``),s=t.includePrerelease?`-0`:``,c?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(l&&(a=0),o=0,r===`>`?(r=`>=`,l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,l?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):l?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:u&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),d(`xRange return`,n),n})},j=(e,t)=>(d(`replaceStars`,e,t),e.trim().replace(p[m.STAR],``)),N=(e,t)=>(d(`replaceGTE0`,e,t),e.trim().replace(p[t.includePrerelease?m.GTE0PRE:m.GTE0],``)),F=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=w(r)?``:w(i)?`>=${r}.0.0${e?`-0`:``}`:w(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=w(l)?``:w(u)?`<${+l+1}.0.0-0`:w(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),I=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(d(e[n].semver),e[n].semver!==u.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),P=e(((e,t)=>{let n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,r){if(r=o(r),t instanceof e){if(t.loose===!!r.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),d(`comparator`,t,r),this.options=r,this.loose=!!r.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,d(`comp`,this)}parse(e){let t=this.options.loose?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new f(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(d(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}return u(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new p(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new p(this.value,n).test(t.semver):(n=o(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||u(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||u(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};let o=a(),{safeRe:c,t:l}=i(),u=k(),d=r(),f=s(),p=N()})),F=e(((e,t)=>{let n=N();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),I=e(((e,t)=>{let n=N();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),L=e(((e,t)=>{let n=s(),r=N();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),R=e(((e,t)=>{let n=s(),r=N();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),z=e(((e,t)=>{let n=s(),r=N(),i=C();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),B=e(((e,t)=>{let n=N();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),V=e(((e,t)=>{let n=s(),r=P(),{ANY:i}=r,a=N(),o=F(),c=C(),l=w(),u=O(),d=D();t.exports=(e,t,s,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(s){case`>`:p=c,m=u,h=l,g=`>`,_=`>=`;break;case`<`:p=l,m=d,h=c,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),H=e(((e,t)=>{let n=V();t.exports=(e,t,r)=>n(e,t,`>`,r)})),U=e(((e,t)=>{let n=V();t.exports=(e,t,r)=>n(e,t,`<`,r)})),W=e(((e,t)=>{let n=N();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),G=e(((e,t)=>{let n=F(),r=_();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),K=e(((e,t)=>{let n=N(),r=P(),{ANY:i}=r,a=F(),o=_(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),q=e(((e,t)=>{let r=i(),a=n(),M=s(),q=o();t.exports={parse:c(),valid:l(),clean:u(),inc:d(),diff:f(),major:p(),minor:m(),patch:h(),prerelease:g(),compare:_(),rcompare:v(),compareLoose:y(),compareBuild:b(),sort:x(),rsort:S(),gt:C(),lt:w(),eq:T(),neq:E(),gte:D(),lte:O(),cmp:k(),coerce:A(),truncate:j(),Comparator:P(),Range:N(),satisfies:F(),toComparators:I(),maxSatisfying:L(),minSatisfying:R(),minVersion:z(),validRange:B(),outside:V(),gtr:H(),ltr:U(),intersects:W(),simplifyRange:G(),subset:K(),SemVer:M,re:r.re,src:r.src,tokens:r.t,SEMVER_SPEC_VERSION:a.SEMVER_SPEC_VERSION,RELEASE_TYPES:a.RELEASE_TYPES,compareIdentifiers:q.compareIdentifiers,rcompareIdentifiers:q.rcompareIdentifiers}}))();const J=t.string().min(1).refine(e=>e.trim().length>0&&(0,q.validRange)(e)!==null,{message:`Must be a valid semver range (e.g. ">=1.0.0 <2.0.0", "^1.5.0")`});function Y(e,t){return(0,q.satisfies)(e,t,{includePrerelease:!0})}function X(e){let t=(0,q.validRange)(e);return t===`*`||t===`>=0.0.0`||t===`>=0.0.0-0`}const Z=t.string().min(1).refine(e=>(0,q.valid)(e)!==null&&!e.startsWith(`v`),{message:`Must be a valid semver version (e.g. "1.0.0")`});export{Y as i,J as n,X as r,Z as t};
@@ -0,0 +1 @@
1
+ import{z as e}from"zod";const t=[`batch`,`streaming`],n=[`buffered`,`streaming`],r=e.enum([`none`,`low`,`medium`,`high`,`extra-high`]),i=e.union([e.number(),e.string()]),a=e.object({none:i,low:i,medium:i,high:i,"extra-high":i}).partial(),o=e.object({modes:e.array(e.enum(t)).nonempty(),vocabularyBiasing:e.boolean().optional()}),s=e.object({modes:e.array(e.enum(n)).nonempty(),voiceSelection:e.boolean().optional(),voiceInstructions:e.boolean().optional(),outputFormats:e.array(e.string()).optional()}),c=e.object({vision:e.boolean().optional(),toolCalling:e.boolean().optional(),parallelToolCalls:e.boolean().optional(),structuredOutput:e.boolean().optional(),pdfUpload:e.boolean().optional(),speechToText:o.optional(),textToSpeech:s.optional()}),l=e.object({inputPerMillion:e.number(),inputCachedPerMillion:e.number().optional(),cacheWritePerMillion:e.number().optional(),outputPerMillion:e.number()}),u=e.object({multiplier:e.number()}),d=e.object({token:l.optional(),request:u.optional()}),f=e.object({maxOutputTokens:e.number().optional(),capabilities:c.optional(),pricing:d.optional(),includedInSubscription:e.boolean().optional(),description:e.string().optional()}),p=e.object({name:e.string(),friendlyName:e.string().optional(),family:e.string().optional(),contextWindowSize:e.number(),labId:e.string(),supportedReasoningLevels:a.optional(),metadata:f.optional()}),m=p,h=e.enum([`disabled`,`enabled`,`visible`]),g=e.enum([`allowlist`,`show-all`]);function _(e,t,n){return n?.[e]??(t===`allowlist`?`disabled`:`visible`)}export{r as a,t as c,p as i,n as l,h as n,m as o,_ as r,a as s,g as t};
@@ -0,0 +1 @@
1
+ const e={"tray-popover":{width:400,height:500,showInDock:!1,dismissOnBlur:!0,frame:!1,singleton:!0},utility:{width:900,height:700,showInDock:!0,dismissOnBlur:!1,frame:!0,singleton:!1},panel:{width:400,height:800,showInDock:!0,dismissOnBlur:!1,frame:!0,singleton:!1}};var t=class{entries=new Map;register(t,n,r){let i=`${t}:${r.id}`;if(this.entries.has(i))throw Error(`WindowRegistry: duplicate window ID "${i}"`);let a=e[r.style],o={qualifiedId:i,packageName:t,windowId:r.id,displayName:n,style:r.style,width:r.width??a.width,height:r.height??a.height,showInDock:a.showInDock,dismissOnBlur:a.dismissOnBlur,frame:a.frame,singleton:r.singleton??a.singleton,...r.params&&{params:r.params}};return this.entries.set(i,o),o}get(e){return this.entries.get(e)}getByPackageWindow(e,t){return this.entries.get(`${e}:${t}`)}unregisterPackage(e){let t=[];for(let[n,r]of this.entries)r.packageName===e&&t.push(n);for(let e of t)this.entries.delete(e)}list(){return[...this.entries.values()]}get size(){return this.entries.size}};export{t as n,e as t};
@@ -0,0 +1,130 @@
1
+ import * as _$_makaio_contracts0 from "@makaio/framework/contracts";
2
+
3
+ //#region packages/kernel/src/window/window-registry.d.ts
4
+ /**
5
+ * Style presets for window types.
6
+ *
7
+ * Each style provides sensible defaults for window dimensions and behavior.
8
+ * Package manifests declare a style, then optionally override individual fields.
9
+ */
10
+ type WindowStyle = 'tray-popover' | 'utility' | 'panel';
11
+ /**
12
+ * A registered window entry with resolved configuration.
13
+ *
14
+ * Combines manifest-declared values with style preset defaults.
15
+ * Used by Electron's WindowManager to create and configure windows.
16
+ */
17
+ interface WindowRegistration {
18
+ /** Qualified window ID: `{packageName}:{windowId}`. */
19
+ readonly qualifiedId: string;
20
+ /** Package that owns this window. */
21
+ readonly packageName: string;
22
+ /** Window ID within the package. */
23
+ readonly windowId: string;
24
+ /** Display name (from package manifest). */
25
+ readonly displayName: string;
26
+ /** Window style preset. */
27
+ readonly style: WindowStyle;
28
+ /** Window width in pixels. */
29
+ readonly width: number;
30
+ /** Window height in pixels. */
31
+ readonly height: number;
32
+ /** Whether the window appears in the dock/taskbar. */
33
+ readonly showInDock: boolean;
34
+ /** Whether the window dismisses when losing focus. */
35
+ readonly dismissOnBlur: boolean;
36
+ /** Whether the window has a native frame. */
37
+ readonly frame: boolean;
38
+ /** Whether only one instance of this window can exist. */
39
+ readonly singleton: boolean;
40
+ /** Named route parameters declared by the manifest. */
41
+ readonly params?: readonly _$_makaio_contracts0.WindowParamSpec[];
42
+ }
43
+ /**
44
+ * Default values for each window style.
45
+ *
46
+ * These are applied as base values; manifest-declared fields override them.
47
+ */
48
+ declare const STYLE_DEFAULTS: Record<WindowStyle, Omit<WindowRegistration, 'qualifiedId' | 'packageName' | 'windowId' | 'displayName' | 'style'>>;
49
+ /**
50
+ * Input shape matching WindowManifest from contracts.
51
+ *
52
+ * This local interface mirrors the `WindowManifest` interface that will be
53
+ * introduced in `@makaio/contracts` during Track 5. Using a local type avoids
54
+ * a cross-track dependency during early development; the import will be
55
+ * swapped in once contracts are stable.
56
+ */
57
+ interface WindowManifestInput {
58
+ /** Window ID within the package. */
59
+ readonly id: string;
60
+ /** Window style preset. */
61
+ readonly style: WindowStyle;
62
+ /** Window width in pixels (overrides style default). */
63
+ readonly width?: number;
64
+ /** Window height in pixels (overrides style default). */
65
+ readonly height?: number;
66
+ /** Whether only one instance can exist (overrides style default). */
67
+ readonly singleton?: boolean;
68
+ /** Named route parameters this window accepts. */
69
+ readonly params?: readonly {
70
+ readonly name: string;
71
+ readonly required?: boolean;
72
+ }[];
73
+ }
74
+ /**
75
+ * Dynamic registry of window configurations populated from package manifests.
76
+ *
77
+ * Replaces the static `WindowType` enum and `WINDOW_TYPE_CONFIG` table.
78
+ * Packages register windows during boot via the ExtensionCoordinator.
79
+ * Electron's WindowManager queries this registry to create windows.
80
+ */
81
+ declare class WindowRegistry {
82
+ private readonly entries;
83
+ /**
84
+ * Register a window from a package manifest.
85
+ *
86
+ * Style defaults are applied first; manifest-declared fields override them.
87
+ * @param packageName - Owning package name.
88
+ * @param displayName - Package display name.
89
+ * @param window - Window manifest from the package.
90
+ * @returns The created {@link WindowRegistration}.
91
+ * @throws If the qualified ID is already registered.
92
+ */
93
+ register(packageName: string, displayName: string, window: WindowManifestInput): WindowRegistration;
94
+ /**
95
+ * Look up a window registration by qualified ID.
96
+ * @param qualifiedId - The `{packageName}:{windowId}` identifier.
97
+ * @returns The registration, or `undefined` if not found.
98
+ */
99
+ get(qualifiedId: string): WindowRegistration | undefined;
100
+ /**
101
+ * Find a window registration by package name and window ID.
102
+ *
103
+ * Useful for tray entries that reference `opensWindow` by window ID
104
+ * within the same package.
105
+ * @param packageName - Package name to search.
106
+ * @param windowId - Window ID within the package.
107
+ * @returns The registration, or `undefined` if not found.
108
+ */
109
+ getByPackageWindow(packageName: string, windowId: string): WindowRegistration | undefined;
110
+ /**
111
+ * Remove all windows registered by a package.
112
+ *
113
+ * Used during extension cleanup when a package fails, is disabled, or
114
+ * shuts down.
115
+ * @param packageName - Package name whose windows to remove.
116
+ */
117
+ unregisterPackage(packageName: string): void;
118
+ /**
119
+ * List all registered windows.
120
+ * @returns Array of all window registrations.
121
+ */
122
+ list(): ReadonlyArray<WindowRegistration>;
123
+ /**
124
+ * Number of registered windows.
125
+ * @returns The count of registered window entries.
126
+ */
127
+ get size(): number;
128
+ }
129
+ //#endregion
130
+ export { WindowStyle as i, WindowRegistration as n, WindowRegistry as r, STYLE_DEFAULTS as t };