@makaio/framework 1.0.0-dev-1779048017991 → 1.0.0-dev-1781022866275

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 (409) hide show
  1. package/LICENSE +1 -1
  2. package/package.json +59 -2
  3. package/dist/account-identity-Ce1Bwrqi.mjs +0 -1
  4. package/dist/adapter-CbyjCE2d.mjs +0 -1
  5. package/dist/adapters/acp-client/index.d.mts +0 -209
  6. package/dist/adapters/acp-client/index.mjs +0 -1
  7. package/dist/adapters/config/index.d.mts +0 -429
  8. package/dist/adapters/config/index.mjs +0 -1
  9. package/dist/adapters/index.d.mts +0 -4175
  10. package/dist/adapters/index.mjs +0 -11
  11. package/dist/adapters/node.d.mts +0 -263
  12. package/dist/adapters/node.mjs +0 -4
  13. package/dist/adapters/stream-session/index.d.mts +0 -1384
  14. package/dist/adapters/stream-session/index.mjs +0 -1
  15. package/dist/adapters/stream-session/testing/index.d.mts +0 -29
  16. package/dist/adapters/stream-session/testing/index.mjs +0 -1
  17. package/dist/base-orchestrator-9z8TuA5a.d.mts +0 -772
  18. package/dist/bus/index.d.mts +0 -3331
  19. package/dist/bus/index.mjs +0 -1
  20. package/dist/bus-B1seC4M_.mjs +0 -2
  21. package/dist/capability-service-tnpR_TaB.mjs +0 -1
  22. package/dist/chunk-Dc06z0qk.mjs +0 -1
  23. package/dist/chunk-cpUYaJdV.mjs +0 -1
  24. package/dist/cleanEnvForAdapter-DvcIGXTG.mjs +0 -1
  25. package/dist/client-Dh4x4GQN.mjs +0 -1
  26. package/dist/clients/index.d.mts +0 -2786
  27. package/dist/clients/index.mjs +0 -1
  28. package/dist/clients-namespace-B0xAPZ6J.d.mts +0 -332
  29. package/dist/config-namespace-DLSs83zr.d.mts +0 -638
  30. package/dist/config-namespace-MJT8P0Ud.mjs +0 -1
  31. package/dist/contracts/adapter/index.d.mts +0 -3
  32. package/dist/contracts/adapter/index.mjs +0 -1
  33. package/dist/contracts/adapter/schemas/session-lineage.d.mts +0 -2
  34. package/dist/contracts/adapter/schemas/session-lineage.mjs +0 -1
  35. package/dist/contracts/client/index.d.mts +0 -3
  36. package/dist/contracts/client/index.mjs +0 -1
  37. package/dist/contracts/common/index.d.mts +0 -2
  38. package/dist/contracts/common/index.mjs +0 -1
  39. package/dist/contracts/config/index.d.mts +0 -455
  40. package/dist/contracts/config/index.mjs +0 -1
  41. package/dist/contracts/extension/index.d.mts +0 -3
  42. package/dist/contracts/extension/index.mjs +0 -1
  43. package/dist/contracts/harness/index.d.mts +0 -2
  44. package/dist/contracts/harness/index.mjs +0 -1
  45. package/dist/contracts/host/index.d.mts +0 -2
  46. package/dist/contracts/host/index.mjs +0 -1
  47. package/dist/contracts/index.d.mts +0 -12665
  48. package/dist/contracts/index.mjs +0 -1
  49. package/dist/contracts/model-registry/index.d.mts +0 -2
  50. package/dist/contracts/model-registry/index.mjs +0 -1
  51. package/dist/contracts/native-session-supervisor/index.d.mts +0 -2
  52. package/dist/contracts/native-session-supervisor/index.mjs +0 -1
  53. package/dist/contracts/platform/index.d.mts +0 -2
  54. package/dist/contracts/platform/index.mjs +0 -1
  55. package/dist/contracts/provider/index.d.mts +0 -3
  56. package/dist/contracts/provider/index.mjs +0 -1
  57. package/dist/contracts/session/index.d.mts +0 -3
  58. package/dist/contracts/session/index.mjs +0 -1
  59. package/dist/contracts/shared/index.d.mts +0 -2
  60. package/dist/contracts/shared/index.mjs +0 -1
  61. package/dist/contracts/skill/index.d.mts +0 -2
  62. package/dist/contracts/skill/index.mjs +0 -1
  63. package/dist/contracts/toast/index.d.mts +0 -198
  64. package/dist/contracts/toast/index.mjs +0 -1
  65. package/dist/contracts/variant/index.d.mts +0 -2
  66. package/dist/contracts/variant/index.mjs +0 -1
  67. package/dist/core/index.d.mts +0 -1001
  68. package/dist/core/index.mjs +0 -1
  69. package/dist/credential-ref-DLCsoKVZ.mjs +0 -1
  70. package/dist/cursor-storage-DOQdvo9j.mjs +0 -1
  71. package/dist/definition-DkYy1PZz.mjs +0 -1
  72. package/dist/definition-DtUNiGom.d.mts +0 -158
  73. package/dist/definition-DxvZ9e22.d.mts +0 -376
  74. package/dist/drizzle-CWVVw7Er.mjs +0 -1
  75. package/dist/execution-target-BW_uiBVe.mjs +0 -1
  76. package/dist/extension-COqwS-2Q.mjs +0 -1
  77. package/dist/extension-Cbrl4YGX.mjs +0 -1
  78. package/dist/extension-namespace-zaGKi6Qj.mjs +0 -1
  79. package/dist/handlers-iGKUJ380.mjs +0 -41
  80. package/dist/harness-CEq1Zkf9.mjs +0 -1
  81. package/dist/hooks/index.d.mts +0 -423
  82. package/dist/hooks/index.mjs +0 -1
  83. package/dist/host-CXAUGGN0.mjs +0 -1
  84. package/dist/identity-B_A0mE63.mjs +0 -1
  85. package/dist/index-6lyShOoU.d.mts +0 -225
  86. package/dist/index-7sXlairn2.d.mts +0 -43
  87. package/dist/index-BAKM2GMH2.d.mts +0 -535
  88. package/dist/index-BB419vv-.d.mts +0 -3897
  89. package/dist/index-BJOfdtbw.d.mts +0 -729
  90. package/dist/index-BXP9GK5q.d.mts +0 -1075
  91. package/dist/index-BdPwu6c0.d.mts +0 -1730
  92. package/dist/index-BePI0ckL.d.mts +0 -40
  93. package/dist/index-Bigx81Kr.d.mts +0 -37
  94. package/dist/index-BnNqbx2I.d.mts +0 -134
  95. package/dist/index-Bv15sNLn.d.mts +0 -389
  96. package/dist/index-C-myW_aK.d.mts +0 -412
  97. package/dist/index-C9F3Fc1A.d.mts +0 -2938
  98. package/dist/index-CNxS4Tlu.d.mts +0 -1
  99. package/dist/index-CVA0m1g9.d.mts +0 -995
  100. package/dist/index-C_kS2aqV2.d.mts +0 -438
  101. package/dist/index-Ch3ph52M2.d.mts +0 -40
  102. package/dist/index-CnZOKNjU.d.mts +0 -89
  103. package/dist/index-D1T-PPqF.d.mts +0 -67
  104. package/dist/index-D7T8XCku.d.mts +0 -341
  105. package/dist/index-DBQtpFLE.d.mts +0 -4843
  106. package/dist/index-DEw90pa2.d.mts +0 -183
  107. package/dist/index-DQRsGXb5.d.mts +0 -109
  108. package/dist/index-Dd5s4MSm.d.mts +0 -72
  109. package/dist/index-DubqLGH8.d.mts +0 -1002
  110. package/dist/index-ESSDWIB7.d.mts +0 -11
  111. package/dist/index-N5K1NOYs.d.mts +0 -184
  112. package/dist/index-PdUSmPT2.d.mts +0 -180
  113. package/dist/index-SzSiyG61.d.mts +0 -117
  114. package/dist/index-T0471kWA.d.mts +0 -6760
  115. package/dist/index-WKjrpcA_.d.mts +0 -218
  116. package/dist/index-hapw9_En.d.mts +0 -13592
  117. package/dist/index-iID2R9G1.d.mts +0 -1490
  118. package/dist/kernel/cli/index.d.mts +0 -141
  119. package/dist/kernel/cli/index.mjs +0 -1
  120. package/dist/kernel/cli/schemas.d.mts +0 -63
  121. package/dist/kernel/cli/schemas.mjs +0 -1
  122. package/dist/kernel/extension/index.d.mts +0 -2
  123. package/dist/kernel/extension/index.mjs +0 -1
  124. package/dist/kernel/index.d.mts +0 -296
  125. package/dist/kernel/index.mjs +0 -1
  126. package/dist/kernel/namespace/index.d.mts +0 -2
  127. package/dist/kernel/namespace/index.mjs +0 -1
  128. package/dist/kernel/observability/index.d.mts +0 -2
  129. package/dist/kernel/observability/index.mjs +0 -1
  130. package/dist/kernel/providers/index.d.mts +0 -2
  131. package/dist/kernel/providers/index.mjs +0 -1
  132. package/dist/kernel/window/index.d.mts +0 -2
  133. package/dist/kernel/window/index.mjs +0 -1
  134. package/dist/model-registry-BNzpR6TU.mjs +0 -1
  135. package/dist/model-registry-CIscwC52.mjs +0 -1
  136. package/dist/namespace-0yuzAKlr.mjs +0 -1
  137. package/dist/namespace-8cNguvIp.mjs +0 -1
  138. package/dist/namespace-BK2erxpV.d.mts +0 -921
  139. package/dist/namespace-Bmc7AW4J2.mjs +0 -1
  140. package/dist/namespace-C2ufjgaQ.d.mts +0 -767
  141. package/dist/namespace-C54Oj025.d.mts +0 -159
  142. package/dist/namespace-CCDEOwmW.d.mts +0 -1313
  143. package/dist/namespace-CfEWMXBx.mjs +0 -1
  144. package/dist/namespace-CkLUtc0g.d.mts +0 -580
  145. package/dist/namespace-D5Wrt7YU.mjs +0 -1
  146. package/dist/namespace-DZcuLwEA.d.mts +0 -51
  147. package/dist/namespace-Db-p67Rg.mjs +0 -1
  148. package/dist/namespace-FWx6HxaW.d.mts +0 -611
  149. package/dist/namespace-GLGGcWPH.d.mts +0 -43
  150. package/dist/namespace-N0dfwSg6.mjs +0 -1
  151. package/dist/namespace-O5SNY-LV.d.mts +0 -2226
  152. package/dist/namespace-ZbthBQVt.d.mts +0 -142
  153. package/dist/namespace-bq4Prtzn.d.mts +0 -2046
  154. package/dist/namespace-pNcSglBS.mjs +0 -1
  155. package/dist/namespace-ptv-pw_g.d.mts +0 -3019
  156. package/dist/namespace-xkvVw3hf2.d.mts +0 -189
  157. package/dist/native-session-supervisor-L-UIaEfd.mjs +0 -1
  158. package/dist/node/bus-server/index.d.mts +0 -178
  159. package/dist/node/bus-server/index.mjs +0 -1
  160. package/dist/node/bus-server/server-lifecycle.d.mts +0 -2
  161. package/dist/node/bus-server/server-lifecycle.mjs +0 -1
  162. package/dist/node/machine-identity/index.d.mts +0 -85
  163. package/dist/node/machine-identity/index.mjs +0 -3
  164. package/dist/node/transports/index.d.mts +0 -1752
  165. package/dist/node/transports/index.mjs +0 -2
  166. package/dist/orchestrator-shared-DrjtTXYh.d.mts +0 -249
  167. package/dist/orchestrator-shared-Wv1GI2mW.mjs +0 -1
  168. package/dist/platform-BbSLVg5b.mjs +0 -1
  169. package/dist/profile-4StaDQW0.mjs +0 -1
  170. package/dist/provider-context-CNRQ4d5m.mjs +0 -1
  171. package/dist/providers/index.d.mts +0 -135
  172. package/dist/providers/index.mjs +0 -1
  173. package/dist/providers-Cr4Za8a1.mjs +0 -1
  174. package/dist/providers-namespace-CDwxY_DV.d.mts +0 -583
  175. package/dist/schema-BwzXEtT2.d.mts +0 -837
  176. package/dist/schema-CAw_BqaG.mjs +0 -1
  177. package/dist/schema-introspection-D61TT_7b.mjs +0 -1
  178. package/dist/schema-uSGW-6oM.mjs +0 -1
  179. package/dist/schemas-BXstpWVp.mjs +0 -1
  180. package/dist/schemas-BdMU-gew.d.mts +0 -160
  181. package/dist/schemas-C40ZAJ33.mjs +0 -1
  182. package/dist/schemas-C5xtVqdb.d.mts +0 -46
  183. package/dist/schemas-CGZy_rU6.d.mts +0 -13
  184. package/dist/schemas-CLxtoKFy.mjs +0 -1
  185. package/dist/schemas-Co_sVhzz.mjs +0 -1
  186. package/dist/schemas-D9108Iv1.d.mts +0 -182
  187. package/dist/schemas-DENVYyds.d.mts +0 -463
  188. package/dist/schemas-DbWs_hj8.d.mts +0 -174
  189. package/dist/schemas-Di0XnnMX.d.mts +0 -73
  190. package/dist/schemas-KMA1efQg.d.mts +0 -944
  191. package/dist/schemas-qmn5SWPU.d.mts +0 -312
  192. package/dist/schemas-sshQEF3l.d.mts +0 -237
  193. package/dist/server-lifecycle-Cf_SZ27k.d.mts +0 -160
  194. package/dist/server-lifecycle-DbFwlrTW.mjs +0 -1
  195. package/dist/service-base/index.d.mts +0 -98
  196. package/dist/service-base/index.mjs +0 -1
  197. package/dist/services/adapter-runtime/index.d.mts +0 -4
  198. package/dist/services/adapter-runtime/index.mjs +0 -1
  199. package/dist/services/adapter-runtime/namespace.d.mts +0 -2
  200. package/dist/services/adapter-runtime/namespace.mjs +0 -1
  201. package/dist/services/adapter-runtime/schemas.d.mts +0 -2
  202. package/dist/services/adapter-runtime/schemas.mjs +0 -1
  203. package/dist/services/adapter-subsystem/index.d.mts +0 -3
  204. package/dist/services/adapter-subsystem/index.mjs +0 -1
  205. package/dist/services/adapter-subsystem/namespace.d.mts +0 -2
  206. package/dist/services/adapter-subsystem/namespace.mjs +0 -1
  207. package/dist/services/agent-runtime/index.d.mts +0 -3
  208. package/dist/services/agent-runtime/index.mjs +0 -1
  209. package/dist/services/agent-runtime/namespace.d.mts +0 -2
  210. package/dist/services/agent-runtime/namespace.mjs +0 -1
  211. package/dist/services/agent-runtime/schemas.d.mts +0 -2
  212. package/dist/services/agent-runtime/schemas.mjs +0 -1
  213. package/dist/services/capability/index.d.mts +0 -2
  214. package/dist/services/capability/index.mjs +0 -1
  215. package/dist/services/cli-detection/namespace.d.mts +0 -56
  216. package/dist/services/cli-detection/namespace.mjs +0 -1
  217. package/dist/services/codebase/index.d.mts +0 -3
  218. package/dist/services/codebase/index.mjs +0 -1
  219. package/dist/services/codebase/namespace.d.mts +0 -2
  220. package/dist/services/codebase/namespace.mjs +0 -1
  221. package/dist/services/codebase/schemas.d.mts +0 -2
  222. package/dist/services/codebase/schemas.mjs +0 -1
  223. package/dist/services/compression/index.d.mts +0 -3
  224. package/dist/services/compression/index.mjs +0 -1
  225. package/dist/services/compression/namespace.d.mts +0 -2
  226. package/dist/services/compression/namespace.mjs +0 -1
  227. package/dist/services/compression/schemas.d.mts +0 -2
  228. package/dist/services/compression/schemas.mjs +0 -1
  229. package/dist/services/context-rules/index.d.mts +0 -412
  230. package/dist/services/context-rules/index.mjs +0 -1
  231. package/dist/services/credential-change/index.d.mts +0 -17
  232. package/dist/services/credential-change/index.mjs +0 -1
  233. package/dist/services/definition/index.d.mts +0 -2
  234. package/dist/services/definition/index.mjs +0 -1
  235. package/dist/services/definition/namespace.d.mts +0 -71
  236. package/dist/services/definition/namespace.mjs +0 -1
  237. package/dist/services/definition/schemas.d.mts +0 -38
  238. package/dist/services/definition/schemas.mjs +0 -1
  239. package/dist/services/dialog/namespace.d.mts +0 -105
  240. package/dist/services/dialog/namespace.mjs +0 -1
  241. package/dist/services/dialog/schemas.d.mts +0 -109
  242. package/dist/services/dialog/schemas.mjs +0 -1
  243. package/dist/services/execution-target/index.d.mts +0 -4
  244. package/dist/services/execution-target/index.mjs +0 -1
  245. package/dist/services/execution-target/namespace.d.mts +0 -2
  246. package/dist/services/execution-target/namespace.mjs +0 -1
  247. package/dist/services/execution-target/schemas.d.mts +0 -2
  248. package/dist/services/execution-target/schemas.mjs +0 -1
  249. package/dist/services/filesystem/namespace.d.mts +0 -432
  250. package/dist/services/filesystem/namespace.mjs +0 -1
  251. package/dist/services/filesystem/schemas.d.mts +0 -240
  252. package/dist/services/filesystem/schemas.mjs +0 -1
  253. package/dist/services/harness/index.d.mts +0 -861
  254. package/dist/services/harness/index.mjs +0 -1
  255. package/dist/services/harness/storage/schema.d.mts +0 -424
  256. package/dist/services/harness/storage/schema.mjs +0 -1
  257. package/dist/services/index.d.mts +0 -5703
  258. package/dist/services/index.mjs +0 -1
  259. package/dist/services/local-notification/index.d.mts +0 -25
  260. package/dist/services/local-notification/index.mjs +0 -1
  261. package/dist/services/local-notification/namespace.d.mts +0 -73
  262. package/dist/services/local-notification/namespace.mjs +0 -1
  263. package/dist/services/local-notification/schemas.d.mts +0 -88
  264. package/dist/services/local-notification/schemas.mjs +0 -1
  265. package/dist/services/log-import/browser.d.mts +0 -3
  266. package/dist/services/log-import/browser.mjs +0 -1
  267. package/dist/services/log-import/index.d.mts +0 -275
  268. package/dist/services/log-import/index.mjs +0 -2
  269. package/dist/services/log-import/log-import.d.mts +0 -3
  270. package/dist/services/log-import/log-import.mjs +0 -1
  271. package/dist/services/log-import/namespace.d.mts +0 -327
  272. package/dist/services/log-import/namespace.mjs +0 -1
  273. package/dist/services/log-import/schemas.d.mts +0 -217
  274. package/dist/services/log-import/schemas.mjs +0 -1
  275. package/dist/services/model-registry/index.d.mts +0 -2
  276. package/dist/services/model-registry/index.mjs +0 -1
  277. package/dist/services/preferences/index.d.mts +0 -3
  278. package/dist/services/preferences/index.mjs +0 -1
  279. package/dist/services/preferences/schemas.d.mts +0 -2
  280. package/dist/services/preferences/schemas.mjs +0 -1
  281. package/dist/services/preferences/storage-namespace.d.mts +0 -3
  282. package/dist/services/preferences/storage-namespace.mjs +0 -1
  283. package/dist/services/provider-context/index.d.mts +0 -2
  284. package/dist/services/provider-context/index.mjs +0 -1
  285. package/dist/services/provider-runtime/index.d.mts +0 -136
  286. package/dist/services/provider-runtime/index.mjs +0 -1
  287. package/dist/services/session/handlers/index.d.mts +0 -2
  288. package/dist/services/session/handlers/index.mjs +0 -1
  289. package/dist/services/session/index.d.mts +0 -10
  290. package/dist/services/session/index.mjs +0 -1
  291. package/dist/services/session/messages/namespace.d.mts +0 -2
  292. package/dist/services/session/messages/namespace.mjs +0 -1
  293. package/dist/services/session/orchestrator-testing/index.d.mts +0 -2
  294. package/dist/services/session/orchestrator-testing/index.mjs +0 -1
  295. package/dist/services/session/session-events/namespace.d.mts +0 -2
  296. package/dist/services/session/session-events/namespace.mjs +0 -1
  297. package/dist/services/session/storage/namespace.d.mts +0 -2
  298. package/dist/services/session/storage/namespace.mjs +0 -1
  299. package/dist/services/session/storage/schema.d.mts +0 -2
  300. package/dist/services/session/storage/schema.mjs +0 -1
  301. package/dist/services/session/testing/index.d.mts +0 -35
  302. package/dist/services/session/testing/index.mjs +0 -52
  303. package/dist/services/session/testing/orchestrator-shared.d.mts +0 -2
  304. package/dist/services/session/testing/orchestrator-shared.mjs +0 -1
  305. package/dist/services/session/turns/namespace.d.mts +0 -2
  306. package/dist/services/session/turns/namespace.mjs +0 -1
  307. package/dist/services/session-editor/index.d.mts +0 -119
  308. package/dist/services/session-editor/index.mjs +0 -1
  309. package/dist/services/settings/index.d.mts +0 -47
  310. package/dist/services/settings/index.mjs +0 -1
  311. package/dist/services/settings/namespace.d.mts +0 -662
  312. package/dist/services/settings/namespace.mjs +0 -1
  313. package/dist/services/settings/storage/clients-namespace.d.mts +0 -2
  314. package/dist/services/settings/storage/clients-namespace.mjs +0 -1
  315. package/dist/services/settings/storage/extension-configs/namespace.d.mts +0 -184
  316. package/dist/services/settings/storage/extension-configs/namespace.mjs +0 -1
  317. package/dist/services/settings/storage/index.d.mts +0 -4
  318. package/dist/services/settings/storage/index.mjs +0 -1
  319. package/dist/services/settings/storage/providers-namespace.d.mts +0 -2
  320. package/dist/services/settings/storage/providers-namespace.mjs +0 -1
  321. package/dist/services/tool-approval/index.d.mts +0 -2
  322. package/dist/services/tool-approval/index.mjs +0 -1
  323. package/dist/services/tools/index.d.mts +0 -2
  324. package/dist/services/tools/index.mjs +0 -1
  325. package/dist/services/tray-menu/index.d.mts +0 -4
  326. package/dist/services/tray-menu/index.mjs +0 -1
  327. package/dist/services/tray-menu/namespace.d.mts +0 -2
  328. package/dist/services/tray-menu/namespace.mjs +0 -1
  329. package/dist/services/tray-menu/schemas.d.mts +0 -2
  330. package/dist/services/tray-menu/schemas.mjs +0 -1
  331. package/dist/services/turn/index.d.mts +0 -2
  332. package/dist/services/turn/index.mjs +0 -1
  333. package/dist/services/turn/namespace.d.mts +0 -2
  334. package/dist/services/turn/namespace.mjs +0 -1
  335. package/dist/services/turn/schemas.d.mts +0 -335
  336. package/dist/services/turn/schemas.mjs +0 -1
  337. package/dist/services/worker/index.d.mts +0 -3
  338. package/dist/services/worker/index.mjs +0 -1
  339. package/dist/services/worker/namespace.d.mts +0 -2
  340. package/dist/services/worker/namespace.mjs +0 -1
  341. package/dist/services/worker/schemas.d.mts +0 -2
  342. package/dist/services/worker/schemas.mjs +0 -1
  343. package/dist/session-Do6lDZM4.mjs +0 -123
  344. package/dist/session-lineage-Eev4uo4I.d.mts +0 -65
  345. package/dist/session-piI1R5rP.mjs +0 -1
  346. package/dist/shared-DxHLl9UP.mjs +0 -1
  347. package/dist/shared-schemas-BgQv_tnu.mjs +0 -1
  348. package/dist/skill-CB5h-ZFQ.mjs +0 -1
  349. package/dist/storage/drizzle/client.d.mts +0 -78
  350. package/dist/storage/drizzle/client.mjs +0 -1
  351. package/dist/storage/drizzle/index.d.mts +0 -98
  352. package/dist/storage/drizzle/index.mjs +0 -1
  353. package/dist/storage/handlers/drizzle/index.d.mts +0 -2
  354. package/dist/storage/handlers/drizzle/index.mjs +0 -1
  355. package/dist/storage/handlers/index.d.mts +0 -33
  356. package/dist/storage/handlers/index.mjs +0 -1
  357. package/dist/storage/index.d.mts +0 -192
  358. package/dist/storage/index.mjs +0 -1
  359. package/dist/storage-namespace-ADwyijoe.mjs +0 -1
  360. package/dist/storage-namespace-DAm8iWEj.d.mts +0 -221
  361. package/dist/storage-namespace-definition-CHu2k14q.mjs +0 -1
  362. package/dist/storage-namespace-definition-CJgqyXH1.d.mts +0 -17
  363. package/dist/style.css +0 -3782
  364. package/dist/testing/drizzle-harness.d.mts +0 -130
  365. package/dist/testing/drizzle-harness.mjs +0 -1
  366. package/dist/testing/index.d.mts +0 -106
  367. package/dist/testing/index.mjs +0 -1
  368. package/dist/tool-approval-service-BcBSUZCO.mjs +0 -1
  369. package/dist/tools/index.d.mts +0 -825
  370. package/dist/tools/index.mjs +0 -1
  371. package/dist/tools/testing/index.d.mts +0 -53
  372. package/dist/tools/testing/index.mjs +0 -1
  373. package/dist/tools-CDSgj0ee.mjs +0 -1
  374. package/dist/tray-menu-service-CTXC1Elg.mjs +0 -1
  375. package/dist/types-6WxLfoM3.d.mts +0 -31
  376. package/dist/types-BjToUrHp.d.mts +0 -6619
  377. package/dist/types-CD1LJwPc.d.mts +0 -1009
  378. package/dist/types-Cvrj2ogm.d.mts +0 -305
  379. package/dist/types-DYF5LxZY.d.mts +0 -233
  380. package/dist/types-t295YC6T.d.mts +0 -262
  381. package/dist/types-vNpkAe4Y.d.mts +0 -128
  382. package/dist/ui-components/index.d.mts +0 -2342
  383. package/dist/ui-components/index.mjs +0 -8
  384. package/dist/ui-config-CXmbsqZV.mjs +0 -1
  385. package/dist/ui-hooks/index.d.mts +0 -1805
  386. package/dist/ui-hooks/index.mjs +0 -1
  387. package/dist/ui-kernel/index.d.mts +0 -2793
  388. package/dist/ui-kernel/index.mjs +0 -1
  389. package/dist/ui-kernel/pages/namespace.d.mts +0 -88
  390. package/dist/ui-kernel/pages/namespace.mjs +0 -1
  391. package/dist/ui-kernel/pages/schemas.d.mts +0 -2
  392. package/dist/ui-kernel/pages/schemas.mjs +0 -1
  393. package/dist/ui-views/index.d.mts +0 -487
  394. package/dist/ui-views/index.mjs +0 -30
  395. package/dist/utils/health-probe.d.mts +0 -26
  396. package/dist/utils/health-probe.mjs +0 -1
  397. package/dist/utils/index.d.mts +0 -227
  398. package/dist/utils/index.mjs +0 -2
  399. package/dist/utils/keychain.d.mts +0 -31
  400. package/dist/utils/keychain.mjs +0 -1
  401. package/dist/utils/resolve-package-root.d.mts +0 -12
  402. package/dist/utils/resolve-package-root.mjs +0 -1
  403. package/dist/utils/workspace-root.d.mts +0 -27
  404. package/dist/utils/workspace-root.mjs +0 -2
  405. package/dist/variant-D5kSrL3m.mjs +0 -1
  406. package/dist/version-CjS20oXi.mjs +0 -1
  407. package/dist/visibility-CZu8ooOA.mjs +0 -1
  408. package/dist/window-registry-CUftmDr3.mjs +0 -1
  409. package/dist/window-registry-C_IJmY8_.d.mts +0 -130
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026-present Makaio GmbH
3
+ Copyright (c) Makaio GmbH
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,11 @@
1
1
  {
2
2
  "name": "@makaio/framework",
3
- "version": "1.0.0-dev-1779048017991",
3
+ "version": "1.0.0-dev-1781022866275",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://github.com/makaio-ai/makaio-framework.git",
7
+ "directory": "packages/framework"
8
+ },
4
9
  "description": "Typed, bus-centric framework for building and orchestrating AI agents with tools, sessions, and events",
5
10
  "license": "MIT",
6
11
  "type": "module",
@@ -46,6 +51,10 @@
46
51
  "types": "./dist/contracts/adapter/index.d.mts",
47
52
  "default": "./dist/contracts/adapter/index.mjs"
48
53
  },
54
+ "./contracts/artifact": {
55
+ "types": "./dist/contracts/artifact/index.d.mts",
56
+ "default": "./dist/contracts/artifact/index.mjs"
57
+ },
49
58
  "./contracts/adapter/schemas/session-lineage": {
50
59
  "types": "./dist/contracts/adapter/schemas/session-lineage.d.mts",
51
60
  "default": "./dist/contracts/adapter/schemas/session-lineage.mjs"
@@ -66,6 +75,14 @@
66
75
  "types": "./dist/contracts/extension/index.d.mts",
67
76
  "default": "./dist/contracts/extension/index.mjs"
68
77
  },
78
+ "./contracts/facet": {
79
+ "types": "./dist/contracts/facet/index.d.mts",
80
+ "default": "./dist/contracts/facet/index.mjs"
81
+ },
82
+ "./contracts/materialization": {
83
+ "types": "./dist/contracts/materialization/index.d.mts",
84
+ "default": "./dist/contracts/materialization/index.mjs"
85
+ },
69
86
  "./contracts/model-registry": {
70
87
  "types": "./dist/contracts/model-registry/index.d.mts",
71
88
  "default": "./dist/contracts/model-registry/index.mjs"
@@ -90,6 +107,10 @@
90
107
  "types": "./dist/contracts/toast/index.d.mts",
91
108
  "default": "./dist/contracts/toast/index.mjs"
92
109
  },
110
+ "./contracts/timeout": {
111
+ "types": "./dist/contracts/timeout/index.d.mts",
112
+ "default": "./dist/contracts/timeout/index.mjs"
113
+ },
93
114
  "./contracts/variant": {
94
115
  "types": "./dist/contracts/variant/index.d.mts",
95
116
  "default": "./dist/contracts/variant/index.mjs"
@@ -130,6 +151,10 @@
130
151
  "types": "./dist/clients/index.d.mts",
131
152
  "default": "./dist/clients/index.mjs"
132
153
  },
154
+ "./git": {
155
+ "types": "./dist/git/index.d.mts",
156
+ "default": "./dist/git/index.mjs"
157
+ },
133
158
  "./services": {
134
159
  "types": "./dist/services/index.d.mts",
135
160
  "default": "./dist/services/index.mjs"
@@ -178,6 +203,10 @@
178
203
  "types": "./dist/services/session/storage/namespace.d.mts",
179
204
  "default": "./dist/services/session/storage/namespace.mjs"
180
205
  },
206
+ "./services/subagent": {
207
+ "types": "./dist/services/subagent/index.d.mts",
208
+ "default": "./dist/services/subagent/index.mjs"
209
+ },
181
210
  "./services/tool-approval": {
182
211
  "types": "./dist/services/tool-approval/index.d.mts",
183
212
  "default": "./dist/services/tool-approval/index.mjs"
@@ -186,6 +215,26 @@
186
215
  "types": "./dist/services/cli-detection/namespace.d.mts",
187
216
  "default": "./dist/services/cli-detection/namespace.mjs"
188
217
  },
218
+ "./services/filesystem": {
219
+ "types": "./dist/services/filesystem/index.d.mts",
220
+ "default": "./dist/services/filesystem/index.mjs"
221
+ },
222
+ "./services/filesystem/namespace": {
223
+ "types": "./dist/services/filesystem/namespace.d.mts",
224
+ "default": "./dist/services/filesystem/namespace.mjs"
225
+ },
226
+ "./services/filesystem/schemas": {
227
+ "types": "./dist/services/filesystem/schemas.d.mts",
228
+ "default": "./dist/services/filesystem/schemas.mjs"
229
+ },
230
+ "./services/git/namespace": {
231
+ "types": "./dist/services/git/namespace.d.mts",
232
+ "default": "./dist/services/git/namespace.mjs"
233
+ },
234
+ "./services/git/schemas": {
235
+ "types": "./dist/services/git/schemas.d.mts",
236
+ "default": "./dist/services/git/schemas.mjs"
237
+ },
189
238
  "./services/log-import": {
190
239
  "types": "./dist/services/log-import/index.d.mts",
191
240
  "default": "./dist/services/log-import/index.mjs"
@@ -338,9 +387,17 @@
338
387
  "types": "./dist/utils/health-probe.d.mts",
339
388
  "default": "./dist/utils/health-probe.mjs"
340
389
  },
390
+ "./utils/project-manifest": {
391
+ "types": "./dist/utils/project-manifest.d.mts",
392
+ "default": "./dist/utils/project-manifest.mjs"
393
+ },
394
+ "./utils/workspace-packages": {
395
+ "types": "./dist/utils/workspace-packages.d.mts",
396
+ "default": "./dist/utils/workspace-packages.mjs"
397
+ },
341
398
  "./utils/workspace-root": {
342
399
  "types": "./dist/utils/workspace-root.d.mts",
343
400
  "default": "./dist/utils/workspace-root.mjs"
344
401
  }
345
402
  }
346
- }
403
+ }
@@ -1 +0,0 @@
1
- import{m as e}from"./shared-DxHLl9UP.mjs";import{m as t,p as n}from"./profile-4StaDQW0.mjs";import{n as r}from"./version-CjS20oXi.mjs";import{z as i}from"zod";const a=i.enum([`strong`,`alias`]),o=i.object({scheme:t,value:t,strength:a}),s=i.object({key:t,label:i.string(),usedPercentage:i.number().finite().min(0).max(100),resetsAt:n.optional()}),c=i.object({windows:i.array(s)}),l=i.record(i.string(),i.unknown()).optional(),u=i.object({clientId:t,found:i.boolean(),version:i.string().optional(),warningMessage:i.string().optional()}),d=i.object({clientId:t,binaryName:t,supportedVersions:r.optional()}),f=i.object({clientAccountId:t,clientId:t,observedAt:n,source:t,displayLabel:i.string().optional(),usage:c,metadata:l}),p=i.discriminatedUnion(`kind`,[i.object({kind:i.literal(`session`),sessionId:t}),i.object({kind:i.literal(`adapter-session`),adapterSessionId:t}),i.object({kind:i.literal(`both`),sessionId:t,adapterSessionId:t})]),m=i.object({clientId:i.string(),source:i.string(),kind:i.string(),observedAt:n,payload:e}),h={request:i.object({clientId:t,observedAt:n.optional(),displayLabel:i.string().optional(),identifiers:i.array(o).min(1),metadata:l}),response:i.object({clientAccountId:t,displayLabel:i.string().optional()})},g={request:m.extend({locator:p}),response:i.object({handled:i.boolean(),sessionId:t.nullable(),clientAccountId:t.nullable(),changed:i.boolean()})},_={request:i.object({clientId:t,observedAt:n,source:t,account:i.object({displayLabel:i.string().optional(),identifiers:i.array(o).min(1)}),usage:c,metadata:l}),response:i.object({clientAccountId:t,snapshot:f})};export{l as a,g as c,f as d,s as f,m as i,p as l,h as n,u as o,c as p,a as r,d as s,o as t,_ as u};
@@ -1 +0,0 @@
1
- import{_ as e,b as t,c as n,d as r,f as i,g as a,h as o,i as s,l as c,m as l,ot as u,p as d,r as f,s as p,t as m,u as h,v as g,x as _,y as v}from"./schemas-BXstpWVp.mjs";import"./contracts/adapter/schemas/session-lineage.mjs";import{createBusNamespace as y}from"@makaio/framework/core";const b={getCapabilities:u,startAgent:_,infer:t,listAgents:v,getAgent:g,stopAgent:e,rehydrateAgent:a,getConfigSchema:o,"agent.created":l,"session.created":d,"session.discovered":s,"session.linked":f,"session.statusChanged":m,"session.usage":i,"session.closed":r,log:h,error:c,initialized:n,quota:p},x=y(`adapter`,b),S=x.subjects;export{S as n,b as r,x as t};
@@ -1,209 +0,0 @@
1
- import * as acp from "@agentclientprotocol/sdk";
2
- import { Client, CreateTerminalRequest, CreateTerminalResponse, KillTerminalRequest, KillTerminalResponse, ReadTextFileRequest, ReadTextFileResponse, ReleaseTerminalRequest, ReleaseTerminalResponse, RequestPermissionRequest, RequestPermissionResponse, SessionNotification, TerminalOutputRequest, TerminalOutputResponse, WaitForTerminalExitRequest, WaitForTerminalExitResponse, WriteTextFileRequest, WriteTextFileResponse } from "@agentclientprotocol/sdk";
3
-
4
- //#region adapters/shared/acp-client/src/terminal-manager.d.ts
5
- /**
6
- * Manages stateful terminal lifecycles for ACP agents.
7
- *
8
- * ACP's terminal protocol is stateful (create → output → wait_for_exit → kill → release),
9
- * which does not map cleanly to a single request/response. This manager handles direct
10
- * child_process lifecycle with bounded output buffering.
11
- */
12
- declare class TerminalManager {
13
- private readonly terminals;
14
- private nextId;
15
- /**
16
- * Creates a new terminal subprocess.
17
- * @param params - ACP create terminal request
18
- * @returns Terminal ID for subsequent operations
19
- */
20
- createTerminal(params: acp.CreateTerminalRequest): Promise<acp.CreateTerminalResponse>;
21
- /**
22
- * Gets the current output of a terminal without waiting for it to exit.
23
- * @param params - ACP terminal output request
24
- * @returns Current buffered output and truncation status
25
- */
26
- getOutput(params: acp.TerminalOutputRequest): Promise<acp.TerminalOutputResponse>;
27
- /**
28
- * Waits for a terminal process to exit.
29
- * @param params - ACP wait for exit request
30
- * @returns Exit code and terminating signal
31
- */
32
- waitForExit(params: acp.WaitForTerminalExitRequest): Promise<acp.WaitForTerminalExitResponse>;
33
- /**
34
- * Kills a terminal process without releasing it.
35
- *
36
- * The terminal remains valid after this call, allowing callers to retrieve
37
- * final output before releasing.
38
- * @param params - ACP kill terminal request
39
- * @returns Empty response object
40
- */
41
- killTerminal(params: acp.KillTerminalRequest): Promise<acp.KillTerminalResponse>;
42
- /**
43
- * Releases a terminal, killing the process and freeing all associated resources.
44
- *
45
- * After this call the terminal ID is no longer valid.
46
- * @param params - ACP release terminal request
47
- * @returns Empty response object
48
- */
49
- releaseTerminal(params: acp.ReleaseTerminalRequest): Promise<acp.ReleaseTerminalResponse>;
50
- /**
51
- * Kills and removes all managed terminals.
52
- *
53
- * Should be called during connector shutdown to prevent resource leaks.
54
- */
55
- releaseAll(): void;
56
- /**
57
- * Returns a managed terminal by ID, throwing if not found.
58
- * @param terminalId - Terminal identifier assigned at creation time
59
- * @returns The managed terminal state
60
- */
61
- private requireTerminal;
62
- }
63
- //#endregion
64
- //#region adapters/shared/acp-client/src/types.d.ts
65
- /**
66
- * Configuration for spawning an ACP agent subprocess.
67
- */
68
- interface AcpConnectionOptions {
69
- /** Subprocess command (e.g., 'qwen') */
70
- command: string;
71
- /** CLI arguments (e.g., ['--acp', '--model', 'qwen3-coder']) */
72
- args: string[];
73
- /** Working directory for the subprocess */
74
- cwd: string;
75
- /** Environment variables passed to the subprocess */
76
- env: Record<string, string>;
77
- /** Callback for stderr output */
78
- onStderr?: (data: string) => void;
79
- /** Callback for subprocess spawn/runtime errors */
80
- onError?: (error: Error) => void;
81
- /** Callback for subprocess exit */
82
- onExit?: (code: number | null) => void;
83
- }
84
- /**
85
- * Handle to a running ACP connection (subprocess + protocol layer).
86
- */
87
- interface AcpConnectionHandle {
88
- /** The ACP client-side connection for sending requests to the agent */
89
- connection: acp.ClientSideConnection;
90
- /** Kill the subprocess with SIGTERM */
91
- kill(): void;
92
- /** Promise that resolves with the exit code when the subprocess exits */
93
- exited: Promise<number | null>;
94
- }
95
- /**
96
- * Callbacks for routing ACP server requests to Makaio infrastructure.
97
- */
98
- interface MakaioAcpClientConfig {
99
- /**
100
- * Handle session update notifications (message chunks, tool calls, usage, etc.).
101
- * @param notification - The session notification from the agent
102
- */
103
- onSessionUpdate: (notification: acp.SessionNotification) => Promise<void>;
104
- /**
105
- * Handle permission requests (tool approval).
106
- * @param params - The permission request from the agent
107
- */
108
- onRequestPermission: (params: acp.RequestPermissionRequest) => Promise<acp.RequestPermissionResponse>;
109
- /**
110
- * Handle file read requests. Only required if fs.readTextFile capability is advertised.
111
- * @param params - The read file request from the agent
112
- */
113
- onReadTextFile?: (params: acp.ReadTextFileRequest) => Promise<acp.ReadTextFileResponse>;
114
- /**
115
- * Handle file write requests. Only required if fs.writeTextFile capability is advertised.
116
- * @param params - The write file request from the agent
117
- */
118
- onWriteTextFile?: (params: acp.WriteTextFileRequest) => Promise<acp.WriteTextFileResponse>;
119
- /** Terminal lifecycle manager for stateful terminal operations */
120
- terminalManager?: TerminalManager;
121
- }
122
- //#endregion
123
- //#region adapters/shared/acp-client/src/connection.d.ts
124
- /**
125
- * Spawns an ACP agent subprocess and establishes a protocol connection over stdio.
126
- *
127
- * The subprocess stdin/stdout are bridged to the ACP SDK via Web Streams using
128
- * `Readable.toWeb()` / `Writable.toWeb()` (Node.js 16+). The returned handle
129
- * exposes the {@link acp.ClientSideConnection} for issuing ACP requests along with
130
- * lifecycle controls.
131
- * @param clientFactory - Factory called with the negotiated {@link acp.Agent} proxy;
132
- * must return the {@link acp.Client} implementation that handles incoming agent requests
133
- * @param options - Subprocess spawn configuration
134
- * @returns Handle containing the live connection, a kill function, and an exit promise
135
- */
136
- declare function createAcpConnection(clientFactory: (agent: acp.Agent) => acp.Client, options: AcpConnectionOptions): Promise<AcpConnectionHandle>;
137
- //#endregion
138
- //#region adapters/shared/acp-client/src/client.d.ts
139
- /**
140
- * ACP {@link Client} implementation that bridges agent requests to Makaio infrastructure.
141
- *
142
- * Routes session updates, permission requests, filesystem operations, and terminal
143
- * lifecycle events to the connector-provided callbacks and optional terminal manager.
144
- * All optional Client methods throw a descriptive error when the corresponding
145
- * capability has not been configured.
146
- */
147
- declare class MakaioAcpClient implements Client {
148
- private readonly config;
149
- /**
150
- * @param config - Callbacks and optional managers for each ACP client capability
151
- */
152
- constructor(config: MakaioAcpClientConfig);
153
- /**
154
- * Forwards session update notifications to the connector.
155
- * @param params - Session notification from the agent
156
- * @returns Void promise resolving after the notification is processed
157
- */
158
- sessionUpdate(params: SessionNotification): Promise<void>;
159
- /**
160
- * Forwards permission requests to the connector approval handler.
161
- * @param params - Permission request from the agent
162
- * @returns The user's permission decision
163
- */
164
- requestPermission(params: RequestPermissionRequest): Promise<RequestPermissionResponse>;
165
- /**
166
- * Forwards file read requests to the optional handler.
167
- * @param params - Read file request from the agent
168
- * @returns File contents
169
- */
170
- readTextFile(params: ReadTextFileRequest): Promise<ReadTextFileResponse>;
171
- /**
172
- * Forwards file write requests to the optional handler.
173
- * @param params - Write file request from the agent
174
- * @returns Write confirmation
175
- */
176
- writeTextFile(params: WriteTextFileRequest): Promise<WriteTextFileResponse>;
177
- /**
178
- * Creates a new terminal process via the terminal manager.
179
- * @param params - Terminal creation parameters from the agent
180
- * @returns Terminal ID for subsequent operations
181
- */
182
- createTerminal(params: CreateTerminalRequest): Promise<CreateTerminalResponse>;
183
- /**
184
- * Retrieves the current output of a managed terminal.
185
- * @param params - Terminal output request from the agent
186
- * @returns Current buffered output and truncation status
187
- */
188
- terminalOutput(params: TerminalOutputRequest): Promise<TerminalOutputResponse>;
189
- /**
190
- * Waits for a managed terminal to exit.
191
- * @param params - Wait for exit request from the agent
192
- * @returns Exit code and terminating signal
193
- */
194
- waitForTerminalExit(params: WaitForTerminalExitRequest): Promise<WaitForTerminalExitResponse>;
195
- /**
196
- * Kills a managed terminal process without releasing it.
197
- * @param params - Kill terminal request from the agent
198
- * @returns Empty kill response
199
- */
200
- killTerminal(params: KillTerminalRequest): Promise<KillTerminalResponse>;
201
- /**
202
- * Releases a managed terminal and frees all associated resources.
203
- * @param params - Release terminal request from the agent
204
- * @returns Empty release response
205
- */
206
- releaseTerminal(params: ReleaseTerminalRequest): Promise<ReleaseTerminalResponse>;
207
- }
208
- //#endregion
209
- export { type AcpConnectionHandle, type AcpConnectionOptions, MakaioAcpClient, type MakaioAcpClientConfig, TerminalManager, createAcpConnection };
@@ -1 +0,0 @@
1
- import{spawn as e}from"node:child_process";import{Readable as t,Writable as n}from"node:stream";import*as r from"@agentclientprotocol/sdk";function i(e){return new Promise((t,n)=>{let r=()=>{e.off(`error`,i),t()},i=t=>{e.off(`spawn`,r),n(t)};e.once(`spawn`,r),e.once(`error`,i)})}async function a(e){e.stdin?.destroy(),e.stdout?.destroy(),e.stderr?.destroy(),e.kill(`SIGTERM`),await new Promise(t=>{e.once(`exit`,()=>t()),e.once(`close`,()=>t()),setTimeout(t,100)})}function o(e){return e}function s(e){return e}async function c(c,l){let u=e(l.command,l.args,{cwd:l.cwd,env:l.env,stdio:[`pipe`,`pipe`,`pipe`]});try{await i(u)}catch(e){throw l.onError?.(e),e}l.onStderr&&u.stderr&&u.stderr.on(`data`,e=>{l.onStderr(e.toString(`utf-8`))});let d=new Promise(e=>{u.once(`exit`,t=>{l.onExit?.(t),e(t)})});u.on(`error`,e=>{l.onError?.(e)});let f;try{let e=t.toWeb(u.stdout),i=n.toWeb(u.stdin),a=r.ndJsonStream(s(i),o(e));f=new r.ClientSideConnection(c,a)}catch(e){throw await a(u),e}return{connection:f,kill:()=>u.kill(`SIGTERM`),exited:d}}var l=class{config;constructor(e){this.config=e}async sessionUpdate(e){await this.config.onSessionUpdate(e)}async requestPermission(e){return this.config.onRequestPermission(e)}async readTextFile(e){if(!this.config.onReadTextFile)throw Error(`readTextFile not supported: no handler configured`);return this.config.onReadTextFile(e)}async writeTextFile(e){if(!this.config.onWriteTextFile)throw Error(`writeTextFile not supported: no handler configured`);return this.config.onWriteTextFile(e)}async createTerminal(e){if(!this.config.terminalManager)throw Error(`createTerminal not supported: no terminal manager configured`);return this.config.terminalManager.createTerminal(e)}async terminalOutput(e){if(!this.config.terminalManager)throw Error(`terminalOutput not supported: no terminal manager configured`);return this.config.terminalManager.getOutput(e)}async waitForTerminalExit(e){if(!this.config.terminalManager)throw Error(`waitForTerminalExit not supported: no terminal manager configured`);return this.config.terminalManager.waitForExit(e)}async killTerminal(e){if(!this.config.terminalManager)throw Error(`killTerminal not supported: no terminal manager configured`);return this.config.terminalManager.killTerminal(e)}async releaseTerminal(e){if(!this.config.terminalManager)throw Error(`releaseTerminal not supported: no terminal manager configured`);return this.config.terminalManager.releaseTerminal(e)}},u=class{terminals=new Map;nextId=0;async createTerminal(t){let n=`terminal-${(++this.nextId).toString()}`,r=t.outputByteLimit??1024*1024,o={...process.env};if(t.env)for(let e of t.env)o[e.name]=e.value;let s=e(t.command,t.args??[],{cwd:t.cwd??void 0,env:o,stdio:[`pipe`,`pipe`,`pipe`]});try{await i(s)}catch(e){throw await a(s),e}let c={process:s,output:``,outputByteLimit:r,truncated:!1,exitCode:void 0,signal:void 0,hasExited:!1,exitPromise:new Promise(e=>{s.on(`exit`,(e,t)=>{c.exitCode=e,c.signal=t??null}),s.on(`close`,()=>{c.hasExited=!0,e({exitCode:c.exitCode??null,signal:c.signal??null})})})},l=e=>{if(c.output+=e.toString(`utf-8`),Buffer.byteLength(c.output,`utf-8`)>c.outputByteLimit){let e=Buffer.from(c.output,`utf-8`),t=e.length-c.outputByteLimit;for(;t<e.length&&(e[t]&192)==128;)t+=1;c.output=e.subarray(t).toString(`utf-8`),c.truncated=!0}};return s.stdout?.on(`data`,l),s.stderr?.on(`data`,l),this.terminals.set(n,c),{terminalId:n}}async getOutput(e){let t=this.requireTerminal(e.terminalId);return{output:t.output,truncated:t.truncated,...t.hasExited&&{exitStatus:{exitCode:t.exitCode??null,signal:t.signal??null}}}}async waitForExit(e){let{exitCode:t,signal:n}=await this.requireTerminal(e.terminalId).exitPromise;return{exitCode:t??void 0,signal:n??void 0}}async killTerminal(e){return this.requireTerminal(e.terminalId).process.kill(`SIGTERM`),{}}async releaseTerminal(e){let t=this.terminals.get(e.terminalId);return t&&(t.process.kill(`SIGKILL`),this.terminals.delete(e.terminalId)),{}}releaseAll(){for(let[e,t]of this.terminals)t.process.kill(`SIGKILL`),this.terminals.delete(e)}requireTerminal(e){let t=this.terminals.get(e);if(!t)throw Error(`Terminal not found: ${e}`);return t}};export{l as MakaioAcpClient,u as TerminalManager,c as createAcpConnection};