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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/LICENSE +1 -1
  2. package/dist/.makaio-build.json +5 -0
  3. package/dist/account-identity-DT5NOtFi.mjs +1 -0
  4. package/dist/adapter-C1eI-fGV.mjs +1 -0
  5. package/dist/adapters/acp-client/index.d.mts +6013 -14
  6. package/dist/adapters/acp-client/index.mjs +3 -1
  7. package/dist/adapters/config/index.d.mts +1 -1
  8. package/dist/adapters/config/index.mjs +1 -1
  9. package/dist/adapters/index.d.mts +47 -20
  10. package/dist/adapters/index.mjs +13 -6
  11. package/dist/adapters/node.d.mts +4 -4
  12. package/dist/adapters/node.mjs +4 -4
  13. package/dist/adapters/stream-session/index.d.mts +30 -0
  14. package/dist/adapters/stream-session/index.mjs +1 -1
  15. package/dist/artifact-B3npq1cy.mjs +1 -0
  16. package/dist/bus/index.d.mts +866 -203
  17. package/dist/bus/index.mjs +1 -1
  18. package/dist/bus-Caz3Jpbc.mjs +1 -0
  19. package/dist/bus-Hb-LGzgb.mjs +2 -0
  20. package/dist/chunk-DTipWd-i.mjs +1 -0
  21. package/dist/client-bx74gm4R.mjs +1 -0
  22. package/dist/clients/index.d.mts +113 -35
  23. package/dist/clients/index.mjs +2 -2
  24. package/dist/{clients-namespace-UHj5wt-l.d.mts → clients-namespace-GmSJpBUV.d.mts} +8 -8
  25. package/dist/{config-namespace-ChZOpi1W.d.mts → config-namespace-CPY9YsR8.d.mts} +4 -4
  26. package/dist/contracts/adapter/index.d.mts +3 -3
  27. package/dist/contracts/adapter/index.mjs +1 -1
  28. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  29. package/dist/contracts/artifact/index.d.mts +2 -0
  30. package/dist/contracts/artifact/index.mjs +1 -0
  31. package/dist/contracts/client/index.d.mts +2 -2
  32. package/dist/contracts/client/index.mjs +1 -1
  33. package/dist/contracts/common/index.d.mts +1 -1
  34. package/dist/contracts/config/index.d.mts +8 -8
  35. package/dist/contracts/config/index.mjs +1 -1
  36. package/dist/contracts/extension/index.d.mts +4 -3
  37. package/dist/contracts/extension/index.mjs +1 -1
  38. package/dist/contracts/facet/index.d.mts +2 -0
  39. package/dist/contracts/facet/index.mjs +1 -0
  40. package/dist/contracts/harness/index.d.mts +1 -1
  41. package/dist/contracts/harness/index.mjs +1 -1
  42. package/dist/contracts/host/index.d.mts +1 -1
  43. package/dist/contracts/host/index.mjs +1 -1
  44. package/dist/contracts/index.d.mts +12370 -1990
  45. package/dist/contracts/index.mjs +1 -1
  46. package/dist/contracts/materialization/index.d.mts +4 -0
  47. package/dist/contracts/materialization/index.mjs +1 -0
  48. package/dist/contracts/model-registry/index.d.mts +1 -1
  49. package/dist/contracts/model-registry/index.mjs +1 -1
  50. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  51. package/dist/contracts/native-session-supervisor/index.mjs +1 -1
  52. package/dist/contracts/platform/index.d.mts +1 -1
  53. package/dist/contracts/platform/index.mjs +1 -1
  54. package/dist/contracts/provider/index.d.mts +2 -2
  55. package/dist/contracts/provider/index.mjs +1 -1
  56. package/dist/contracts/session/index.d.mts +3 -3
  57. package/dist/contracts/session/index.mjs +1 -1
  58. package/dist/contracts/shared/index.d.mts +2 -2
  59. package/dist/contracts/shared/index.mjs +1 -1
  60. package/dist/contracts/skill/index.d.mts +1 -1
  61. package/dist/contracts/skill/index.mjs +1 -1
  62. package/dist/contracts/telemetry/index.d.mts +2 -0
  63. package/dist/contracts/telemetry/index.mjs +1 -0
  64. package/dist/contracts/timeout/index.d.mts +1 -1
  65. package/dist/contracts/timeout/index.mjs +1 -1
  66. package/dist/contracts/toast/index.d.mts +2 -2
  67. package/dist/contracts/toast/index.mjs +1 -1
  68. package/dist/contracts/variant/index.d.mts +1 -1
  69. package/dist/contracts/variant/index.mjs +1 -1
  70. package/dist/core/index.d.mts +296 -34
  71. package/dist/core/index.mjs +1 -1
  72. package/dist/{credential-ref-DLCsoKVZ.mjs → credential-ref-YWQQENEo.mjs} +1 -1
  73. package/dist/cursor-storage-CtVJ3JzB.mjs +1 -0
  74. package/dist/{definition-DB7bbFSa.d.mts → definition-BLCdXGzh.d.mts} +17 -3
  75. package/dist/definition-CrgHIpTK.d.mts +60 -0
  76. package/dist/{definition-DkYy1PZz.mjs → definition-DZMXOnjX.mjs} +1 -1
  77. package/dist/{definition-DtUNiGom.d.mts → definition-pkJ6szUl.d.mts} +1 -1
  78. package/dist/drizzle-Eq8W1EbD.mjs +1 -0
  79. package/dist/event-Ca2yUf5i.mjs +1 -0
  80. package/dist/execution-target-CRPTfZlc.mjs +1 -0
  81. package/dist/extension-C-4BHMRI.mjs +1 -0
  82. package/dist/extension-CpIUgBKI.mjs +1 -0
  83. package/dist/facet-BuwhrThl.mjs +1 -0
  84. package/dist/filesystem-service-B8rhBRgB.mjs +1 -0
  85. package/dist/filesystem-service-p_iJVHd4.d.mts +66 -0
  86. package/dist/git/index.d.mts +210 -0
  87. package/dist/git/index.mjs +18 -0
  88. package/dist/globby-rtWVaFHv.mjs +41 -0
  89. package/dist/{handlers-DR_4_rAT.mjs → handlers-CkTsQLra.mjs} +3 -3
  90. package/dist/{harness-B6lGP9rm.mjs → harness-BRCMcvQN.mjs} +1 -1
  91. package/dist/{host-CvEht5RT.mjs → host-Br9VuOyr.mjs} +1 -1
  92. package/dist/{index-WKjrpcA_.d.mts → index-472sOmsW.d.mts} +6 -6
  93. package/dist/index-8SZkg7s6.d.mts +353 -0
  94. package/dist/index-B3PK4FIn.d.mts +5116 -0
  95. package/dist/{index-D2jejYlV.d.mts → index-B80L4YqA.d.mts} +3 -3
  96. package/dist/index-BFg9BUpx.d.mts +355 -0
  97. package/dist/index-BGfWS6GE.d.mts +483 -0
  98. package/dist/{index-DQRsGXb5.d.mts → index-BVgfS-AJ.d.mts} +2 -2
  99. package/dist/{index-CnmPtjnA.d.mts → index-B_zQC98V.d.mts} +16 -16
  100. package/dist/{index-DaEp4UWW.d.mts → index-Bh_Ne7LF.d.mts} +54 -42
  101. package/dist/{index-yvN8UcEH.d.mts → index-Bvb2mMH6.d.mts} +109 -109
  102. package/dist/{index-tKvu34DJ2.d.mts → index-CCGVh9BF2.d.mts} +242 -28
  103. package/dist/{index-C-myW_aK.d.mts → index-CGmcS0Ma.d.mts} +2 -2
  104. package/dist/{index-DEw90pa2.d.mts → index-CLpjm52M.d.mts} +3 -3
  105. package/dist/{index-DQWMu5fS.d.mts → index-Caig6TeF.d.mts} +85 -99
  106. package/dist/{index-DwCA1HWa.d.mts → index-CelJCBjk.d.mts} +15 -15
  107. package/dist/{index-ESSDWIB7.d.mts → index-ChunCFu4.d.mts} +1 -1
  108. package/dist/{index-e5C62_M3.d.mts → index-Cm0dUkWL.d.mts} +819 -85
  109. package/dist/{index-N5K1NOYs.d.mts → index-CokQYGVP.d.mts} +4 -4
  110. package/dist/{index-Bigx81Kr.d.mts → index-Cs0kZXIz2.d.mts} +1 -1
  111. package/dist/{index-6lyShOoU.d.mts → index-D5d5HeWI2.d.mts} +34 -0
  112. package/dist/{index-sBob9D25.d.mts → index-D90OmGmV.d.mts} +3 -3
  113. package/dist/{index-D1T-PPqF.d.mts → index-D9MwJ2Q8.d.mts} +3 -3
  114. package/dist/{index-BePI0ckL.d.mts → index-DANINzMu.d.mts} +1 -1
  115. package/dist/{index-BnSQE7z7.d.mts → index-DBw-89vC2.d.mts} +129 -1332
  116. package/dist/{index-C_kS2aqV2.d.mts → index-DGBu6bHi2.d.mts} +14 -14
  117. package/dist/index-DKC62dY5.d.mts +146 -0
  118. package/dist/{index-7sXlairn2.d.mts → index-DKia0MX1.d.mts} +1 -1
  119. package/dist/{index-E8d_RwaF.d.mts → index-DMKnON5s.d.mts} +1 -1
  120. package/dist/{index-Cq8B7cwK.d.mts → index-DUaw0Dw8.d.mts} +1524 -369
  121. package/dist/{index-Dd5s4MSm.d.mts → index-De3kPhlN.d.mts} +2 -2
  122. package/dist/{index-DGTFJB_8.d.mts → index-L4GjJDKb.d.mts} +116 -23
  123. package/dist/{index-iID2R9G1.d.mts → index-U-A8eyGT.d.mts} +7 -7
  124. package/dist/{index-D7T8XCku.d.mts → index-eemAKwsB.d.mts} +23 -2
  125. package/dist/{index-BXP9GK5q.d.mts → index-mNec7V-9.d.mts} +27 -27
  126. package/dist/{index-CnZOKNjU.d.mts → index-soFznFCy2.d.mts} +2 -2
  127. package/dist/{index-Ch3ph52M2.d.mts → index-vtXJuwrz.d.mts} +2 -2
  128. package/dist/{index-BnNqbx2I.d.mts → index-x_lVDp_J.d.mts} +2 -2
  129. package/dist/json-value-CmhSGMLv.mjs +1 -0
  130. package/dist/kernel/cli/index.d.mts +4 -2
  131. package/dist/kernel/cli/index.mjs +1 -1
  132. package/dist/kernel/cli/schemas.d.mts +1 -0
  133. package/dist/kernel/cli/schemas.mjs +1 -1
  134. package/dist/kernel/extension/index.d.mts +1 -1
  135. package/dist/kernel/extension/index.mjs +1 -1
  136. package/dist/kernel/index.d.mts +5 -5
  137. package/dist/kernel/index.mjs +1 -1
  138. package/dist/kernel/namespace/index.d.mts +1 -1
  139. package/dist/kernel/namespace/index.mjs +1 -1
  140. package/dist/kernel/observability/index.d.mts +1 -1
  141. package/dist/kernel/observability/index.mjs +1 -1
  142. package/dist/kernel/providers/index.d.mts +1 -1
  143. package/dist/kernel/providers/index.mjs +1 -1
  144. package/dist/kernel/window/index.d.mts +1 -1
  145. package/dist/kernel/window/index.mjs +1 -1
  146. package/dist/materialization-CuUBu4XI.mjs +1 -0
  147. package/dist/{namespace-BpIE-jQW.d.mts → namespace-5QQqbF-B.d.mts} +1018 -111
  148. package/dist/{namespace-DwCyOaZn2.d.mts → namespace-BM7Djng9.d.mts} +3 -3
  149. package/dist/namespace-BwzZJqTV.mjs +1 -0
  150. package/dist/{namespace-DZcuLwEA.d.mts → namespace-CTm3nEvh.d.mts} +1 -1
  151. package/dist/{namespace-BK2erxpV.d.mts → namespace-CaaNnKcR.d.mts} +3 -3
  152. package/dist/{namespace-GLGGcWPH.d.mts → namespace-CaoZ3S78.d.mts} +1 -1
  153. package/dist/{namespace-DXnMk3U8.d.mts → namespace-CxhsoFUP.d.mts} +27 -31
  154. package/dist/{namespace-B1E57soL.d.mts → namespace-DD8Oiqo7.d.mts} +23 -23
  155. package/dist/{namespace-BCRNwPnw.d.mts → namespace-DLovh2Ws.d.mts} +21 -21
  156. package/dist/{namespace-Ysg1N6rR.d.mts → namespace-DgqkaOVu.d.mts} +26 -25
  157. package/dist/{namespace-B5ZCshBw.d.mts → namespace-Dr8K0MCp.d.mts} +82 -81
  158. package/dist/{namespace-DGMO2E8f.mjs → namespace-DuXK5AYN.mjs} +1 -1
  159. package/dist/{namespace-ZbthBQVt.d.mts → namespace-EQniz-Aw.d.mts} +14 -14
  160. package/dist/{namespace-C54Oj025.d.mts → namespace-IV1QK__V.d.mts} +1 -1
  161. package/dist/{namespace-BKrV_2gZ.d.mts → namespace-TyiTsLFv.d.mts} +46 -45
  162. package/dist/{namespace-OwAf1Brw.mjs → namespace-xcmbQlxh.mjs} +1 -1
  163. package/dist/{native-session-supervisor-zPt624Tp.mjs → native-session-supervisor-B1TnaPUF.mjs} +1 -1
  164. package/dist/node/bus-server/index.d.mts +1 -1
  165. package/dist/node/bus-server/index.mjs +1 -1
  166. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  167. package/dist/node/bus-server/server-lifecycle.mjs +1 -1
  168. package/dist/node/machine-identity/index.mjs +2 -2
  169. package/dist/node/transports/index.d.mts +200 -7
  170. package/dist/node/transports/index.mjs +2 -2
  171. package/dist/{orchestrator-shared-D2txLAUs.mjs → orchestrator-shared-CIDiFJMD.mjs} +1 -1
  172. package/dist/{orchestrator-shared-DrjtTXYh.d.mts → orchestrator-shared-Dfa7FMyw.d.mts} +5 -5
  173. package/dist/package-DKVlsMP3.mjs +1 -0
  174. package/dist/{profile-Cq4A7kQa.mjs → profile-6ynCD5k3.mjs} +1 -1
  175. package/dist/{provider-context-BB4eD8ON.mjs → provider-context-CK6B4X_8.mjs} +1 -1
  176. package/dist/providers/index.mjs +1 -1
  177. package/dist/{providers-namespace-CDwxY_DV.d.mts → providers-namespace-DSEpli4A.d.mts} +1 -1
  178. package/dist/{schema-B295yplx.d.mts → schema-M5YTvSAG.d.mts} +114 -2
  179. package/dist/{schema-C4iznV0q.mjs → schema-e0wU_lcV.mjs} +1 -1
  180. package/dist/{schema-introspection-DCYC47_d.mjs → schema-introspection-Dn1jWQs1.mjs} +1 -1
  181. package/dist/{schemas-C5xtVqdb.d.mts → schemas-Bd0OjRQf.d.mts} +1 -1
  182. package/dist/{schemas-Ra8pz5M-.d.mts → schemas-C46QfKzv.d.mts} +24 -28
  183. package/dist/{schemas-sshQEF3l.d.mts → schemas-CDBSjg7o.d.mts} +1 -1
  184. package/dist/schemas-CR1Rripy.mjs +1 -0
  185. package/dist/schemas-CVvwIfG4.mjs +1 -0
  186. package/dist/schemas-CaLhkkLn.mjs +1 -0
  187. package/dist/{schemas-DYqKRNju.d.mts → schemas-ClOOT1W6.d.mts} +4 -4
  188. package/dist/{schemas-BfMZAwff.d.mts → schemas-DATniTHb.d.mts} +8 -8
  189. package/dist/{schemas-BWvuaL0w.d.mts → schemas-DVF1A4DF.d.mts} +4 -4
  190. package/dist/{schemas-Di0XnnMX.d.mts → schemas-DaRSfYLf.d.mts} +1 -1
  191. package/dist/{schemas-C31qbb0s.d.mts → schemas-DiYVzG6e.d.mts} +51 -48
  192. package/dist/{schemas-KMA1efQg.d.mts → schemas-j7ivZ2HI.d.mts} +3 -3
  193. package/dist/schemas-wg_6PAdV.d.mts +153 -0
  194. package/dist/scoped-bus-04pwo1uM.mjs +1 -0
  195. package/dist/service-base/index.d.mts +1 -1
  196. package/dist/services/adapter-runtime/index.d.mts +3 -3
  197. package/dist/services/adapter-runtime/index.mjs +1 -1
  198. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  199. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  200. package/dist/services/adapter-subsystem/index.d.mts +2 -2
  201. package/dist/services/adapter-subsystem/index.mjs +1 -1
  202. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  203. package/dist/services/adapter-subsystem/namespace.mjs +1 -1
  204. package/dist/services/agent-runtime/index.d.mts +2 -2
  205. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  206. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  207. package/dist/services/capability/index.d.mts +1 -1
  208. package/dist/services/capability/index.mjs +1 -1
  209. package/dist/services/cli-detection/namespace.d.mts +1 -1
  210. package/dist/services/codebase/index.d.mts +2 -2
  211. package/dist/services/codebase/namespace.d.mts +1 -1
  212. package/dist/services/codebase/schemas.d.mts +1 -1
  213. package/dist/services/compression/index.d.mts +2 -2
  214. package/dist/services/compression/namespace.d.mts +1 -1
  215. package/dist/services/compression/schemas.d.mts +1 -1
  216. package/dist/services/context-rules/index.d.mts +4 -4
  217. package/dist/services/context-rules/index.mjs +1 -1
  218. package/dist/services/credential-change/index.d.mts +1 -1
  219. package/dist/services/definition/namespace.d.mts +1 -1
  220. package/dist/services/definition/schemas.d.mts +1 -1
  221. package/dist/services/dialog/namespace.d.mts +1 -1
  222. package/dist/services/dialog/schemas.d.mts +1 -1
  223. package/dist/services/execution-target/index.d.mts +4 -4
  224. package/dist/services/execution-target/index.mjs +1 -1
  225. package/dist/services/execution-target/namespace.d.mts +1 -1
  226. package/dist/services/execution-target/schemas.d.mts +1 -1
  227. package/dist/services/execution-target/schemas.mjs +1 -1
  228. package/dist/services/filesystem/index.d.mts +3 -0
  229. package/dist/services/filesystem/index.mjs +1 -0
  230. package/dist/services/filesystem/namespace.d.mts +7 -7
  231. package/dist/services/filesystem/schemas.d.mts +4 -4
  232. package/dist/services/git/namespace.d.mts +1163 -0
  233. package/dist/services/git/namespace.mjs +1 -0
  234. package/dist/services/git/schemas.d.mts +932 -0
  235. package/dist/services/git/schemas.mjs +1 -0
  236. package/dist/services/harness/index.d.mts +35 -35
  237. package/dist/services/harness/index.mjs +1 -1
  238. package/dist/services/harness/storage/schema.d.mts +5 -5
  239. package/dist/services/index.d.mts +1411 -928
  240. package/dist/services/index.mjs +1 -1
  241. package/dist/services/local-notification/index.d.mts +1 -1
  242. package/dist/services/local-notification/namespace.d.mts +1 -1
  243. package/dist/services/local-notification/schemas.d.mts +1 -1
  244. package/dist/services/log-import/browser.d.mts +2 -2
  245. package/dist/services/log-import/index.d.mts +23 -24
  246. package/dist/services/log-import/index.mjs +2 -2
  247. package/dist/services/log-import/log-import.d.mts +1 -1
  248. package/dist/services/log-import/log-import.mjs +1 -1
  249. package/dist/services/log-import/namespace.d.mts +1 -1
  250. package/dist/services/log-import/namespace.mjs +1 -1
  251. package/dist/services/log-import/schemas.d.mts +1 -1
  252. package/dist/services/log-import/schemas.mjs +1 -1
  253. package/dist/services/model-registry/index.d.mts +1 -1
  254. package/dist/services/model-registry/index.mjs +1 -1
  255. package/dist/services/preferences/index.d.mts +2 -2
  256. package/dist/services/preferences/schemas.d.mts +1 -1
  257. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  258. package/dist/services/provider-context/index.d.mts +1 -1
  259. package/dist/services/provider-context/index.mjs +1 -1
  260. package/dist/services/provider-runtime/index.d.mts +1 -1
  261. package/dist/services/provider-runtime/index.mjs +1 -1
  262. package/dist/services/session/handlers/index.d.mts +1 -1
  263. package/dist/services/session/handlers/index.mjs +1 -1
  264. package/dist/services/session/index.d.mts +10 -10
  265. package/dist/services/session/index.mjs +1 -1
  266. package/dist/services/session/messages/namespace.d.mts +1 -1
  267. package/dist/services/session/messages/namespace.mjs +1 -1
  268. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  269. package/dist/services/session/orchestrator-testing/index.mjs +1 -1
  270. package/dist/services/session/session-events/namespace.d.mts +1 -1
  271. package/dist/services/session/session-events/namespace.mjs +1 -1
  272. package/dist/services/session/storage/namespace.d.mts +1 -1
  273. package/dist/services/session/storage/schema.d.mts +1 -1
  274. package/dist/services/session/storage/schema.mjs +1 -1
  275. package/dist/services/session/testing/index.d.mts +2 -2
  276. package/dist/services/session/testing/index.mjs +16 -3
  277. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  278. package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
  279. package/dist/services/session/turns/namespace.d.mts +1 -1
  280. package/dist/services/session/turns/namespace.mjs +1 -1
  281. package/dist/services/session-editor/index.d.mts +3 -3
  282. package/dist/services/session-editor/index.mjs +1 -1
  283. package/dist/services/settings/index.d.mts +4 -4
  284. package/dist/services/settings/index.mjs +1 -1
  285. package/dist/services/settings/namespace.d.mts +19 -18
  286. package/dist/services/settings/namespace.mjs +1 -1
  287. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  288. package/dist/services/settings/storage/clients-namespace.mjs +1 -1
  289. package/dist/services/settings/storage/extension-configs/namespace.d.mts +4 -4
  290. package/dist/services/settings/storage/index.d.mts +3 -3
  291. package/dist/services/settings/storage/index.mjs +1 -1
  292. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  293. package/dist/services/settings/storage/providers-namespace.mjs +1 -1
  294. package/dist/services/subagent/index.d.mts +2 -0
  295. package/dist/services/subagent/index.mjs +1 -0
  296. package/dist/services/subagent-template/index.d.mts +3 -0
  297. package/dist/services/subagent-template/index.mjs +1 -0
  298. package/dist/services/subagent-template/namespace.d.mts +2 -0
  299. package/dist/services/subagent-template/namespace.mjs +1 -0
  300. package/dist/services/subagent-template/schemas.d.mts +2 -0
  301. package/dist/services/subagent-template/schemas.mjs +1 -0
  302. package/dist/services/tool-approval/index.d.mts +1 -1
  303. package/dist/services/tool-approval/index.mjs +1 -1
  304. package/dist/services/tools/index.d.mts +1 -1
  305. package/dist/services/tools/index.mjs +1 -1
  306. package/dist/services/tray-menu/index.d.mts +3 -3
  307. package/dist/services/tray-menu/index.mjs +1 -1
  308. package/dist/services/tray-menu/namespace.d.mts +1 -1
  309. package/dist/services/tray-menu/schemas.d.mts +1 -1
  310. package/dist/services/turn/index.d.mts +1 -1
  311. package/dist/services/turn/namespace.d.mts +1 -1
  312. package/dist/services/turn/schemas.d.mts +12 -12
  313. package/dist/session-BoldSdNZ2.mjs +134 -0
  314. package/dist/session-DuVOYctZ.mjs +1 -0
  315. package/dist/{session-lineage-B0cpHfuc.d.mts → session-lineage-CRsc9g1x.d.mts} +1 -1
  316. package/dist/shared-DpOEfD8F.mjs +1 -0
  317. package/dist/{skill-20_SBXaI.mjs → skill-CQO4mDqK.mjs} +1 -1
  318. package/dist/storage/drizzle/client.d.mts +2 -2
  319. package/dist/storage/drizzle/client.mjs +1 -1
  320. package/dist/storage/drizzle/index.d.mts +49 -10
  321. package/dist/storage/drizzle/index.mjs +1 -1
  322. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  323. package/dist/storage/handlers/drizzle/index.mjs +1 -1
  324. package/dist/storage/handlers/index.d.mts +2 -2
  325. package/dist/storage/handlers/index.mjs +1 -1
  326. package/dist/storage/index.d.mts +4 -4
  327. package/dist/{storage-namespace-DoH-Wkjp.d.mts → storage-namespace-BXkoh5Sy.d.mts} +11 -11
  328. package/dist/storage-namespace-DWsYLAXa.mjs +1 -0
  329. package/dist/{storage-namespace-definition-CJgqyXH1.d.mts → storage-namespace-definition-Bkx5rSto.d.mts} +1 -1
  330. package/dist/style.css +540 -540
  331. package/dist/telemetry-CvdLBWuk.mjs +1 -0
  332. package/dist/testing/drizzle-harness.mjs +1 -1
  333. package/dist/testing/index.mjs +1 -1
  334. package/dist/tool-approval-service-BvZWhYZp.mjs +1 -0
  335. package/dist/tools/index.d.mts +20 -10
  336. package/dist/tools/index.mjs +1 -1
  337. package/dist/tools/testing/index.d.mts +1 -1
  338. package/dist/tools-D-luYcDw.mjs +1431 -0
  339. package/dist/{types-C11LvekX.d.mts → types-BCMUtBj1.d.mts} +117 -20
  340. package/dist/{types-vNpkAe4Y.d.mts → types-C2Ob9zz_.d.mts} +1 -1
  341. package/dist/{types-t295YC6T.d.mts → types-CCdqjeuH.d.mts} +2 -2
  342. package/dist/{types-Cvrj2ogm.d.mts → types-DZHvOc_Q.d.mts} +4 -4
  343. package/dist/{types--nrtGZ1V.d.mts → types-Dy3YTcTF.d.mts} +255 -97
  344. package/dist/{types-DYF5LxZY.d.mts → types-MfJZ67e9.d.mts} +91 -9
  345. package/dist/{types-6WxLfoM3.d.mts → types-dyP-bXXE.d.mts} +1 -1
  346. package/dist/ui-components/index.mjs +2 -2
  347. package/dist/ui-hooks/index.d.mts +111 -1
  348. package/dist/ui-hooks/index.mjs +1 -1
  349. package/dist/ui-kernel/index.d.mts +4 -4
  350. package/dist/ui-kernel/pages/namespace.d.mts +4 -4
  351. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  352. package/dist/ui-views/index.mjs +2 -2
  353. package/dist/utils/index.d.mts +36 -1
  354. package/dist/utils/index.mjs +2 -2
  355. package/dist/utils/project-manifest.d.mts +130 -0
  356. package/dist/utils/project-manifest.mjs +1 -0
  357. package/dist/utils/scope-paths.d.mts +33 -0
  358. package/dist/utils/scope-paths.mjs +1 -0
  359. package/dist/utils/workspace-packages.d.mts +59 -0
  360. package/dist/utils/workspace-packages.mjs +1 -0
  361. package/dist/utils/workspace-root.d.mts +6 -9
  362. package/dist/utils/workspace-root.mjs +1 -1
  363. package/dist/{version-D8S4O22A.mjs → version-BeT3ASEe.mjs} +1 -1
  364. package/package.json +55 -2
  365. package/dist/account-identity-Bg_vKkcs.mjs +0 -1
  366. package/dist/adapter-CpF2aK_-.mjs +0 -1
  367. package/dist/bus-B1seC4M_.mjs +0 -2
  368. package/dist/chunk-Dc06z0qk.mjs +0 -1
  369. package/dist/client-DMWXCWhM.mjs +0 -1
  370. package/dist/cursor-storage-BoNI7OAR.mjs +0 -1
  371. package/dist/drizzle-Bn2GtW8c.mjs +0 -1
  372. package/dist/execution-target-D6MgthYs.mjs +0 -1
  373. package/dist/extension-53GerdGg.mjs +0 -1
  374. package/dist/extension-fJmv8Yri.mjs +0 -1
  375. package/dist/namespace-C_h7scWx2.mjs +0 -1
  376. package/dist/schemas-Bn8aqDIE.mjs +0 -1
  377. package/dist/services/worker/index.d.mts +0 -3
  378. package/dist/services/worker/index.mjs +0 -1
  379. package/dist/services/worker/namespace.d.mts +0 -2
  380. package/dist/services/worker/namespace.mjs +0 -1
  381. package/dist/services/worker/schemas.d.mts +0 -2
  382. package/dist/services/worker/schemas.mjs +0 -1
  383. package/dist/session-BCSf-Fgj.mjs +0 -1
  384. package/dist/session-BNo_cIiz.mjs +0 -123
  385. package/dist/shared-BhuSHZXH.mjs +0 -1
  386. package/dist/storage-namespace-BIDs9LPb.mjs +0 -1
  387. package/dist/tool-approval-service-CZCPfvVy.mjs +0 -1
  388. package/dist/tools-Cid9D99F.mjs +0 -1
  389. /package/dist/{base-orchestrator-BOAPgqF7.d.mts → base-orchestrator-wyumsn3b.d.mts} +0 -0
  390. /package/dist/{capability-service-DV32ecwR.mjs → capability-service-CJbmhfv9.mjs} +0 -0
  391. /package/dist/{cleanEnvForAdapter-hTPNvPU5.mjs → cleanEnvForAdapter-KkYzQa1f.mjs} +0 -0
  392. /package/dist/{config-namespace-wJ2CakDB.mjs → config-namespace-ncYg2ct_.mjs} +0 -0
  393. /package/dist/{extension-namespace-CTd9kOtt.mjs → extension-namespace-cMh_mMiL.mjs} +0 -0
  394. /package/dist/{identity-DBST3-XO.mjs → identity-Cz2IeEtm.mjs} +0 -0
  395. /package/dist/{index-SzSiyG61.d.mts → index-CHQ1SqT0.d.mts} +0 -0
  396. /package/dist/{model-registry-xINyxQUT.mjs → model-registry-CfXytvzx.mjs} +0 -0
  397. /package/dist/{model-registry-Dzpssh9j.mjs → model-registry-Scn_MC2d.mjs} +0 -0
  398. /package/dist/{namespace-DBw9BYr8.mjs → namespace-BoD94mrN.mjs} +0 -0
  399. /package/dist/{namespace-DUVgMfTR.mjs → namespace-CFLAmQfh.mjs} +0 -0
  400. /package/dist/{namespace-aALq9tnE.mjs → namespace-DkRgbZYn.mjs} +0 -0
  401. /package/dist/{namespace-yxIxUsjo.mjs → namespace-LViZ-EQk.mjs} +0 -0
  402. /package/dist/{namespace-Zb8HAbyF.mjs → namespace-Yna5-Pws.mjs} +0 -0
  403. /package/dist/{platform-BMFUpmTA.mjs → platform-DZ7z-wXD.mjs} +0 -0
  404. /package/dist/{providers-DhiW_fx4.mjs → providers-u8i15co9.mjs} +0 -0
  405. /package/dist/{schema-D3ZG13h9.mjs → schema-CoyE6mPt.mjs} +0 -0
  406. /package/dist/{schemas-CEBe89yE.mjs → schemas-DE-GNmSD.mjs} +0 -0
  407. /package/dist/{schemas-COnLJnt_.mjs → schemas-hSrzflwZ.mjs} +0 -0
  408. /package/dist/{schemas-CrnlCRep.mjs → schemas-jFe1AuI-.mjs} +0 -0
  409. /package/dist/{server-lifecycle-Dx5WgfoS.mjs → server-lifecycle-FXTPW39-.mjs} +0 -0
  410. /package/dist/{server-lifecycle-BC6FRn86.d.mts → server-lifecycle-YoSGFGnU.d.mts} +0 -0
  411. /package/dist/{shared-schemas-Byah36lG.mjs → shared-schemas-CPShiLNp.mjs} +0 -0
  412. /package/dist/{storage-namespace-definition-BjK9nZAN.mjs → storage-namespace-definition-CqSdsuCC.mjs} +0 -0
  413. /package/dist/{timeout-D33CUZ0M.mjs → timeout-XsYIOKrc.mjs} +0 -0
  414. /package/dist/{tray-menu-service-BAYtLdAg.mjs → tray-menu-service-DuXq5k22.mjs} +0 -0
  415. /package/dist/{ui-config-zawaoEfB.mjs → ui-config-9bDRwFZr.mjs} +0 -0
  416. /package/dist/{variant-BZWfmS0q.mjs → variant-CT6XBP6T.mjs} +0 -0
  417. /package/dist/{visibility-CZu8ooOA.mjs → visibility-Cb62p9bv.mjs} +0 -0
  418. /package/dist/{window-registry-C_IJmY8_.d.mts → window-registry-CBcrGTv4.d.mts} +0 -0
  419. /package/dist/{window-registry-B_-hBEcV.mjs → window-registry-DW-dKRjQ.mjs} +0 -0
@@ -0,0 +1 @@
1
+ import{z as e}from"zod";import{collectorOnlySubject as t,createBusNamespace as n}from"@makaio/framework/core";const r=e.union([e.string(),e.number(),e.boolean(),e.null(),e.array(e.string()),e.array(e.number()),e.array(e.boolean()),e.array(e.null())]),i=e.enum([`event`,`request`,`broadcast`]),a=e.enum([`local`,`outbound`,`inbound`]),o=e.object({factId:e.string().min(1),observedAt:e.number().int().nonnegative(),machineId:e.string().min(1).optional(),namespace:e.string().min(1),subject:e.string().min(1),messageType:i,direction:a,messageId:e.string().min(1),correlationId:e.string().min(1).optional(),attributes:e.record(e.string(),r)}).strict(),s={fact:t(o)},c=n(`subject-telemetry`,s),l=c.subjects;export{o as a,a as i,l as n,i as o,r,s,c as t};
@@ -1 +1 @@
1
- import*as e from"node:fs";import*as t from"node:path";import{sql as n}from"drizzle-orm";import*as r from"node:os";import{afterAll as i,afterEach as a,beforeAll as o,beforeEach as s}from"vitest";import{createDatabaseClient as c}from"@makaio/framework/storage/drizzle/client";async function l(i){let a=t.join(r.tmpdir(),`makaio-${i}-test-${crypto.randomUUID()}.db`),{db:o,close:s}=await c({url:`file:${a}`});try{await o.run(n`SELECT 1`)}catch(t){s();try{e.unlinkSync(a)}catch{}throw t}return{db:o,dbPath:a,close:s,cleanup:d(()=>{},s,a)}}async function u(i){let a=t.join(r.tmpdir(),`makaio-${i.name}-test-${crypto.randomUUID()}.db`),{db:o,close:s}=await c({url:`file:${a}`});try{for(let e of i.schemas)await o.run(e)}catch(t){s();try{e.unlinkSync(a)}catch{}throw t}return{db:o,dbPath:a,clearData:async()=>{for(let e of i.tables)await o.run(n.raw(`DELETE FROM ${e}`))},registerHandlers:()=>i.registerHandlers(o),close:async()=>{s(),await Promise.resolve();try{e.unlinkSync(a)}catch{}}}}function d(t,n,r){return()=>{t(),n();try{e.unlinkSync(r)}catch{}}}function f(e){let t,n;return o(async()=>{t=await e()}),s(async()=>{if(!t)throw Error(`usePluginStorageTestLifecycle: createTestDbFn did not initialize db context`);await t.clearData(),n=t.registerHandlers()}),a(()=>{n?.(),n=void 0}),i(async()=>{t&&await t.close()}),{get dbContext(){return t}}}export{d as createDbCleanup,u as createPluginTestDb,l as createTempDb,f as usePluginStorageTestLifecycle};
1
+ import*as e from"node:path";import*as t from"node:fs";import{sql as n}from"drizzle-orm";import*as r from"node:os";import{afterAll as i,afterEach as a,beforeAll as o,beforeEach as s}from"vitest";import{createDatabaseClient as c}from"@makaio/framework/storage/drizzle/client";async function l(i){let a=e.join(r.tmpdir(),`makaio-${i}-test-${crypto.randomUUID()}.db`),{db:o,close:s}=await c({url:`file:${a}`});try{await o.run(n`SELECT 1`)}catch(e){s();try{t.unlinkSync(a)}catch{}throw e}return{db:o,dbPath:a,close:s,cleanup:d(()=>{},s,a)}}async function u(i){let a=e.join(r.tmpdir(),`makaio-${i.name}-test-${crypto.randomUUID()}.db`),{db:o,close:s}=await c({url:`file:${a}`});try{for(let e of i.schemas)await o.run(e)}catch(e){s();try{t.unlinkSync(a)}catch{}throw e}return{db:o,dbPath:a,clearData:async()=>{for(let e of i.tables)await o.run(n.raw(`DELETE FROM ${e}`))},registerHandlers:()=>i.registerHandlers(o),close:async()=>{s(),await Promise.resolve();try{t.unlinkSync(a)}catch{}}}}function d(e,n,r){return()=>{e(),n();try{t.unlinkSync(r)}catch{}}}function f(e){let t,n;return o(async()=>{t=await e()}),s(async()=>{if(!t)throw Error(`usePluginStorageTestLifecycle: createTestDbFn did not initialize db context`);await t.clearData(),n=t.registerHandlers()}),a(()=>{n?.(),n=void 0}),i(async()=>{t&&await t.close()}),{get dbContext(){return t}}}export{d as createDbCleanup,u as createPluginTestDb,l as createTempDb,f as usePluginStorageTestLifecycle};
@@ -1 +1 @@
1
- import{createBusInstance as e}from"@makaio/framework/bus";import{vi as t}from"vitest";function n(){let e=!1,t;return{promise:new Promise(n=>{t=()=>{e||(e=!0,n())}}),resolve:t}}function r(){return{unregister:t.fn(),ready:Promise.resolve()}}function i(){let e=n();return{connect:t.fn().mockImplementation(async()=>e.promise),disconnect:t.fn().mockImplementation(()=>{e.resolve(),e=n()}),get currentReady(){return e.promise},resolveReady:()=>{e.resolve()},replaceReady:t=>{e.resolve(),e={promise:t,resolve:()=>void 0}}}}function a(e){return t=>{if(t!==void 0){e.replaceReady(t);return}e.resolveReady()}}function o(){let e=t.fn(),n=t.fn().mockResolvedValue(void 0),o=t.fn().mockReturnValue(()=>{}),s=t.fn(),c=t.fn().mockReturnThis(),l=i(),u=a(l);return{bus:{namespace:`mock`,request:e,emit:n,on:o,once:t.fn(),intercept:t.fn(),requestOptional:s,withFilter:c,broadcast:t.fn(),scoped:t.fn(),__onAny:t.fn(),getContext:t.fn(),registerNamespace:t.fn(),registerNamespaces:t.fn(),getSchema:t.fn(),extendSubject:t.fn().mockImplementation(e=>e),registerTransport:t.fn().mockImplementation(()=>r()),unregisterTransport:t.fn(),disconnect:l.disconnect,reconnect:t.fn().mockResolvedValue(void 0),connect:l.connect,get ready(){return l.currentReady}},request:e,emit:n,on:o,requestOptional:s,withFilter:c,setReady:u}}function s(e=`global`){let n=t.fn().mockResolvedValue({}),o=t.fn().mockResolvedValue(void 0),s=t.fn().mockReturnValue(()=>{}),c=t.fn().mockResolvedValue({ok:!0,value:{}}),l=t.fn().mockReturnThis(),u=t.fn().mockResolvedValue({}),d=t.fn(),f=t.fn().mockReturnValue(()=>{}),p=t.fn(),m=t.fn(),h=t.fn(),g=t.fn(),_=i(),v=a(_);return{bus:{namespace:e,request:n,emit:o,on:s,once:u,intercept:t.fn(),requestOptional:c,withFilter:l,broadcast:t.fn(),scoped:d,__onAny:f,getContext:p,registerNamespace:m,registerNamespaces:h,getSchema:g,extendSubject:t.fn().mockImplementation(e=>e),registerTransport:t.fn().mockImplementation(()=>r()),unregisterTransport:t.fn(),disconnect:_.disconnect,reconnect:t.fn().mockResolvedValue(void 0),connect:_.connect,get ready(){return _.currentReady}},request:n,emit:o,on:s,requestOptional:c,withFilter:l,setReady:v,once:u,scoped:d,__onAny:f,getContext:p,registerNamespace:m,registerNamespaces:h,getSchema:g}}function c(e=`test`){let n=t.fn().mockResolvedValue({}),r=t.fn().mockResolvedValue(void 0),i=t.fn().mockReturnValue(()=>{}),a=t.fn().mockResolvedValue({}),o=t.fn().mockReturnThis();return{bus:{namespace:e,request:n,emit:r,on:i,once:a,intercept:t.fn(),requestOptional:t.fn(),withFilter:o,getContext:t.fn()},request:n,emit:r,on:i,once:a,withFilter:o}}function l(){return e()}function u(){let e=typeof process>`u`?void 0:process,t=globalThis.crypto?.randomUUID?.()??`fallback-${Date.now()}-${Math.random().toString(36).slice(2)}`;return e?.platform===`win32`?`${(e.env?.TEMP??e.env?.TMP??`.`).replace(/[\\/]+$/,``)}\\makaio-test-${t}`:`${(e?.env?.TMPDIR??`/tmp`).replace(/\/+$/,``)}/makaio-test-${t}`}function d(e){return{bus:e,machineId:`test-machine-id`,dataDir:u(),identity:{extensionName:`test.stub`},getService:()=>void 0,tryImport:async()=>null,signal:new AbortController().signal,hasExtension:()=>!1}}export{o as createMockBus,s as createMockGlobalBus,c as createMockScopedBus,l as createTestBusInstance,d as makeStubExtensionContext};
1
+ import{createBusInstance as e}from"@makaio/framework/bus";import{vi as t}from"vitest";function n(){let e=!1,t;return{promise:new Promise(n=>{t=()=>{e||(e=!0,n())}}),resolve:t}}function r(){return{unregister:t.fn(),ready:Promise.resolve()}}function i(){let e=n();return{connect:t.fn().mockImplementation(async()=>e.promise),disconnect:t.fn().mockImplementation(()=>{e.resolve(),e=n()}),get currentReady(){return e.promise},resolveReady:()=>{e.resolve()},replaceReady:t=>{e.resolve(),e={promise:t,resolve:()=>void 0}}}}function a(e){return t=>{if(t!==void 0){e.replaceReady(t);return}e.resolveReady()}}function o(){let e=t.fn(),n=t.fn().mockResolvedValue(void 0),o=t.fn().mockReturnValue(()=>{}),s=t.fn(),c=t.fn().mockReturnThis(),l=i(),u=a(l);return{bus:{namespace:`mock`,request:e,emit:n,on:o,once:t.fn(),intercept:t.fn(),requestOptional:s,withFilter:c,broadcast:t.fn(),scoped:t.fn(),__onAny:t.fn(),getContext:t.fn(),registerNamespace:t.fn(),registerNamespaces:t.fn(),getSchema:t.fn(),extendSubject:t.fn().mockImplementation(e=>e),registerTransport:t.fn().mockImplementation(()=>r()),unregisterTransport:t.fn(),disconnect:l.disconnect,reconnect:t.fn().mockResolvedValue(void 0),connect:l.connect,observeMessages:t.fn().mockReturnValue(()=>void 0),get ready(){return l.currentReady}},request:e,emit:n,on:o,requestOptional:s,withFilter:c,setReady:u}}function s(e=`global`){let n=t.fn().mockResolvedValue({}),o=t.fn().mockResolvedValue(void 0),s=t.fn().mockReturnValue(()=>{}),c=t.fn().mockResolvedValue({ok:!0,value:{}}),l=t.fn().mockReturnThis(),u=t.fn().mockResolvedValue({}),d=t.fn(),f=t.fn().mockReturnValue(()=>{}),p=t.fn(),m=t.fn(),h=t.fn(),g=t.fn(),_=i(),v=a(_);return{bus:{namespace:e,request:n,emit:o,on:s,once:u,intercept:t.fn(),requestOptional:c,withFilter:l,broadcast:t.fn(),scoped:d,__onAny:f,getContext:p,registerNamespace:m,registerNamespaces:h,getSchema:g,extendSubject:t.fn().mockImplementation(e=>e),registerTransport:t.fn().mockImplementation(()=>r()),unregisterTransport:t.fn(),disconnect:_.disconnect,reconnect:t.fn().mockResolvedValue(void 0),connect:_.connect,observeMessages:t.fn().mockReturnValue(()=>void 0),get ready(){return _.currentReady}},request:n,emit:o,on:s,requestOptional:c,withFilter:l,setReady:v,once:u,scoped:d,__onAny:f,getContext:p,registerNamespace:m,registerNamespaces:h,getSchema:g}}function c(e=`test`){let n=t.fn().mockResolvedValue({}),r=t.fn().mockResolvedValue(void 0),i=t.fn().mockReturnValue(()=>{}),a=t.fn().mockResolvedValue({}),o=t.fn().mockReturnThis();return{bus:{namespace:e,request:n,emit:r,on:i,once:a,intercept:t.fn(),requestOptional:t.fn(),withFilter:o,getContext:t.fn()},request:n,emit:r,on:i,once:a,withFilter:o}}function l(){return e()}function u(){let e=typeof process>`u`?void 0:process,t=globalThis.crypto?.randomUUID?.()??`fallback-${Date.now()}-${Math.random().toString(36).slice(2)}`;return e?.platform===`win32`?`${(e.env?.TEMP??e.env?.TMP??`.`).replace(/[\\/]+$/,``)}\\makaio-test-${t}`:`${(e?.env?.TMPDIR??`/tmp`).replace(/\/+$/,``)}/makaio-test-${t}`}function d(e){return{bus:e,machineId:`test-machine-id`,dataDir:u(),identity:{extensionName:`test.stub`},getService:()=>void 0,tryImport:async()=>null,signal:new AbortController().signal,hasExtension:()=>!1}}export{o as createMockBus,s as createMockGlobalBus,c as createMockScopedBus,l as createTestBusInstance,d as makeStubExtensionContext};
@@ -0,0 +1 @@
1
+ import{SessionStorageSubjects as e}from"./services/session/storage/namespace.mjs";import{F as t}from"./handlers-CkTsQLra.mjs";import"./session-BoldSdNZ2.mjs";import{AgentSubjects as n,ApprovalSubjects as r,HarnessSubjects as i,computeMetaTags as a}from"@makaio/framework/contracts";import{BaseService as o}from"@makaio/framework/service-base";import{extractToolFilePath as s}from"@makaio/framework/tools";const c={"full-access":0,"always-ask":1,reject:2};function l(){return`apr_${crypto.randomUUID()}`}function u(e){switch(e){case`allow`:return`full-access`;case`deny`:return`reject`;case`ask`:return`always-ask`}}function d(e){if(!e?.length)return`neutral`;let t=a(e);return t.includes(`destructive`)?`destructive`:t.includes(`read-only`)?`safe`:`neutral`}function f(e,t){if(e)return t&&e.toolApprovalOverrides?.[t]!==void 0?e.toolApprovalOverrides[t]:e.approvalPolicy}function p(e,t,n,r){let i=r[t];if(!i?.length)return e;let a=e;for(let e of i){let t=n[e];t&&c[t]>c[a]&&(a=t)}return a}function m(e,t,n){return n.handled?n.data.allowedDirectories??void 0:t?[]:void 0}function h(e,t,n){if(!n||!e?.cwd)return{};let r;return(e.personaId||e.profileId)&&t&&(r=m(e.personaId,e.profileId,t)),{cwd:e.cwd,...r&&{allowedDirectories:r}}}function g(e,t,n){if(!(!e&&!t))return!n||!n.handled?{policy:`always-ask`}:{policy:u(n.data.action),...n.data.personaName&&{personaName:n.data.personaName},...n.data.profileName&&{profileName:n.data.profileName}}}function _(e,t){let n=t.harness?.toolCapabilityMap&&e.toolName?t.harness.toolCapabilityMap[e.toolName]:void 0;return{requestId:l(),toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,agentId:e.agentId,sessionId:e.sessionId,adapterName:t.resolvedAdapterName,...t.personaName&&{personaName:t.personaName},...t.profileName&&{profileName:t.profileName},capabilities:n,riskLevel:d(n),reasoning:e.reasoning,createdAt:Date.now()}}var v=class extends o{logger=console;options;constructor(e,t={}){super(e),this.options=t}async onInit(){this.registerHandler(n.toolApprove,async e=>{let t=await this.getAgentMetadata(e.payload.agentId,e.payload.sessionId),n=(t?.personaId||t?.profileId)&&e.payload.toolName?await this.fetchRawEnrichedPolicy(t?.personaId,t?.profileId,e.payload.toolName):void 0,r=h(t,n,this.options.fileAccessRuleProvider),i=await this.checkFileAccessDenyReason(e.payload,r);if(i){e.setResult({action:`deny`,message:i,shouldAbort:!1});return}let a=await this.resolveSessionOverride(e.payload.sessionId);if(a===`full-access`){e.setResult({action:`allow`});return}if(a===`reject`){e.setResult({action:`deny`,message:`Tool use rejected by session approval policy override`,shouldAbort:!1});return}let o=await this.resolvePolicyWithContext({adapterName:e.payload.adapterName,toolName:e.payload.toolName},t,n);switch(a===`always-ask`?`always-ask`:o.policy){case`full-access`:e.setResult({action:`allow`});return;case`reject`:e.setResult({action:`deny`,message:`Tool use rejected by approval policy`,shouldAbort:!1});return;case`always-ask`:await this.dispatchAlwaysAskApproval(e.payload,e.setResult.bind(e),o);return}})}async dispatchAlwaysAskApproval(e,t,i){let a=_(e,i),o=new AbortController,s=this.bus.on(n.session.closed,()=>{o.abort()},{filter:{agentId:a.agentId,adapterSessionId:e.adapterSessionId}});try{let e=await this.bus.requestOptional(r.request,a,{timeout:0,signal:o.signal});e.handled&&e.data.action===`allow`?t({action:`allow`,...e.data.updatedInput&&{updatedInput:e.data.updatedInput}}):t({action:`deny`,message:e.handled&&e.data.action===`deny`?e.data.message??`User denied tool execution`:`No approval handler available`,shouldAbort:!1})}catch{t({action:`deny`,message:o.signal.aborted?`Approval cancelled — agent session closed`:`Tool approval request failed`,shouldAbort:!1})}finally{s()}}async checkFileAccessDenyReason(e,t){if(!this.options.fileAccessRuleProvider||!t.cwd)return;let n=s(e.toolName,e.args,t.cwd);if(n)try{return(await this.options.fileAccessRuleProvider(t.cwd,t.allowedDirectories)).isDenied(n)?`Access denied: '${n}' is restricted by .makaioignore rules`:void 0}catch{return`Access denied: file access rules could not be evaluated`}}async fetchRawEnrichedPolicy(e,t,n){try{return await this.bus.requestOptional(r.resolveEnrichedPolicy,{toolName:n,personaId:e,profileId:t})}catch(r){return this.logger.error(`[ToolApprovalService] approval.resolveEnrichedPolicy failed; falling back to fail-closed`,{toolName:n,personaId:e,profileId:t,error:r}),{handled:!1}}}async resolvePolicyWithContext(e,t,n){let r=t?.adapterName??e.adapterName,i=g(t?.personaId,t?.profileId,n),a=await this.resolveHarnessPolicy(r,t?.harnessId,t?.clientId),o=f(a,e.toolName),s=i?.policy??o??`always-ask`,c=s;return a?.capabilityOverrides&&a.toolCapabilityMap&&e.toolName&&(c=p(s,e.toolName,a.capabilityOverrides,a.toolCapabilityMap)),{policy:c,harness:a,agent:t,resolvedAdapterName:r,...i?.personaName&&{personaName:i.personaName},...i?.profileName&&{profileName:i.profileName}}}async getAgentMetadata(e,n){try{if(n){let{agents:r}=await this.bus.request(t.listBySession,{sessionId:n});return r.find(t=>t.agentId===e)??null}let r=await this.bus.requestOptional(t.get,{agentId:e});return r.handled?r.data.agent:null}catch{return null}}async resolveSessionOverride(t){if(t)try{let n=await this.bus.requestOptional(e.get,{sessionId:t});return n.handled?n.data.session?.approvalPolicyOverride??void 0:void 0}catch{return}}async resolveHarnessPolicy(e,t,n){try{let r=await this.bus.request(i.resolve,{adapterName:e,...t&&{profileHarnessId:t},...n&&{clientId:n}});return{approvalPolicy:r.approvalPolicy,capabilityOverrides:r.capabilityOverrides,toolCapabilityMap:r.toolCapabilityMap,toolApprovalOverrides:r.toolApprovalOverrides}}catch{return}}};export{v as t};
@@ -4,7 +4,7 @@ import { IMakaioBus } from "@makaio/framework/bus";
4
4
  import { ToolAnnotations, ToolAnnotations as ToolAnnotations$1 } from "@makaio/framework/contracts";
5
5
  import * as zCore from "zod/v4/core";
6
6
 
7
- //#region packages/tools-core/src/types.d.ts
7
+ //#region core/tools-core/src/types.d.ts
8
8
  /**
9
9
  * Type alias for the bus interface used in tool execution contexts.
10
10
  *
@@ -252,7 +252,7 @@ interface ToolInfo {
252
252
  inputSchema?: Record<string, unknown>;
253
253
  }
254
254
  //#endregion
255
- //#region packages/tools-core/src/errors.d.ts
255
+ //#region core/tools-core/src/errors.d.ts
256
256
  /**
257
257
  * Standard error codes for tool execution failures.
258
258
  * Use these codes for consistent error handling across tools.
@@ -336,7 +336,7 @@ declare function toolSuccess<T>(data: T): ToolSuccess<T>;
336
336
  */
337
337
  declare function errorToToolResult(error: unknown, defaultCode?: string): ToolFailure;
338
338
  //#endregion
339
- //#region packages/tools-core/src/define-tool.d.ts
339
+ //#region core/tools-core/src/define-tool.d.ts
340
340
  /**
341
341
  * Configuration object for defining a tool.
342
342
  * Provides ergonomic API for creating ToolDefinition instances.
@@ -411,7 +411,7 @@ interface DefineToolConfig<TInput extends z.ZodTypeAny, TOutput extends z.ZodTyp
411
411
  */
412
412
  declare function defineTool<TInput extends z.ZodTypeAny, TOutput extends z.ZodTypeAny>(config: DefineToolConfig<TInput, TOutput>): ToolDefinition<TInput, TOutput>;
413
413
  //#endregion
414
- //#region packages/tools-core/src/define-toolset.d.ts
414
+ //#region core/tools-core/src/define-toolset.d.ts
415
415
  /**
416
416
  * Input type for tools parameter in defineToolset.
417
417
  * Accepts a record, single tool, or array of tools for flexibility.
@@ -487,7 +487,7 @@ type ExtractToolsRecord<T extends ToolsInput> = T extends Record<string, AnyTool
487
487
  */
488
488
  declare function defineToolset<TTools extends ToolsInput>(config: DefineToolsetConfig<TTools>): Toolset<ExtractToolsRecord<TTools>>;
489
489
  //#endregion
490
- //#region packages/tools-core/src/export.d.ts
490
+ //#region core/tools-core/src/export.d.ts
491
491
  type JSONSchema = zCore.JSONSchema.JSONSchema;
492
492
  /**
493
493
  * MCP (Model Context Protocol) tool definition.
@@ -560,6 +560,16 @@ interface ExportOptions {
560
560
  * ```
561
561
  */
562
562
  declare function toMcpTool(tool: AnyToolDefinition): McpToolDefinition;
563
+ /**
564
+ * Normalizes a JSON Schema for MCP compatibility.
565
+ *
566
+ * Handles two cases:
567
+ * 1. Schemas with top-level `oneOf`/`anyOf` (from discriminated unions) are flattened
568
+ * 2. Missing or non-object schemas get a minimal `{ type: "object" }` fallback
569
+ * @param schema - Raw JSON Schema from Zod conversion
570
+ * @returns MCP-compatible schema with `type: "object"` at root
571
+ */
572
+ declare function ensureMcpObjectSchema(schema: JSONSchema | undefined): JSONSchema;
563
573
  /**
564
574
  * Converts a ToolDefinition to OpenAI function format.
565
575
  * @param tool - Makaio tool definition
@@ -599,7 +609,7 @@ declare function toolsetToMcpTools(toolset: Toolset): McpToolDefinition[];
599
609
  */
600
610
  declare function toolsetToOpenAIFunctions(toolset: Toolset): OpenAIFunctionDefinition[];
601
611
  //#endregion
602
- //#region packages/tools-core/src/memory-store.d.ts
612
+ //#region core/tools-core/src/memory-store.d.ts
603
613
  /**
604
614
  * Generic memory store for managing working memory instances across sessions.
605
615
  *
@@ -667,7 +677,7 @@ declare class MemoryStore<T, TArgs extends unknown[]> {
667
677
  get size(): number;
668
678
  }
669
679
  //#endregion
670
- //#region packages/tools-core/src/tool-utils.d.ts
680
+ //#region core/tools-core/src/tool-utils.d.ts
671
681
  /**
672
682
  * Validates that sessionId is present in the context.
673
683
  * @param context - Tool execution context
@@ -772,7 +782,7 @@ declare function executeCrudOperation<TInput extends {
772
782
  op: string;
773
783
  }, TOutput>(input: TInput, context: ToolExecutionContext, entityName: string, handlers: OperationHandlers<TInput, TOutput>): Promise<ToolResult<TOutput>>;
774
784
  //#endregion
775
- //#region packages/tools-core/src/widen-tool.d.ts
785
+ //#region core/tools-core/src/widen-tool.d.ts
776
786
  /**
777
787
  * Widens a strongly-typed tool definition for use in heterogeneous collections.
778
788
  *
@@ -784,7 +794,7 @@ declare function executeCrudOperation<TInput extends {
784
794
  */
785
795
  declare function widenTool<TInput extends z.ZodTypeAny, TOutput extends z.ZodTypeAny>(tool: ToolDefinition<TInput, TOutput>): AnyToolDefinition;
786
796
  //#endregion
787
- //#region packages/tools-core/src/file-access.d.ts
797
+ //#region core/tools-core/src/file-access.d.ts
788
798
  /**
789
799
  * Compiled file access rules injected into tool execution context constraints.
790
800
  */
@@ -822,4 +832,4 @@ declare const FILE_ACCESS_RULES_KEY: "fileAccessRules";
822
832
  */
823
833
  declare function extractToolFilePath(toolName: string | undefined, args: Record<string, unknown> | undefined, cwd: string): string | null;
824
834
  //#endregion
825
- export { type AnyToolDefinition, type BusLike, type DefineToolConfig, type DefineToolsetConfig, type ExportOptions, FILE_ACCESS_RULES_KEY, type FileAccessRuleProvider, type FileAccessRules, type McpToolDefinition, MemoryStore, type OpenAIFunctionDefinition, type ToolAnnotations, type ToolDefinition, type ToolError, type ToolErrorCode, ToolErrorCodes, type ToolExecutionContext, ToolExecutionError, type ToolFailure, type ToolInfo, type ToolMetadata, type ToolResult, type ToolSuccess, type Toolset, type ToolsetMetadata, defineTool, defineToolset, emitEvent, errorToToolResult, executeCrudOperation, extractToolFilePath, toMcpTool, toOpenAIFunction, toolError, toolSuccess, toolsetToMcpTools, toolsetToOpenAIFunctions, validateSessionId, widenTool };
835
+ export { type AnyToolDefinition, type BusLike, type DefineToolConfig, type DefineToolsetConfig, type ExportOptions, FILE_ACCESS_RULES_KEY, type FileAccessRuleProvider, type FileAccessRules, type McpToolDefinition, MemoryStore, type OpenAIFunctionDefinition, type ToolAnnotations, type ToolDefinition, type ToolError, type ToolErrorCode, ToolErrorCodes, type ToolExecutionContext, ToolExecutionError, type ToolFailure, type ToolInfo, type ToolMetadata, type ToolResult, type ToolSuccess, type Toolset, type ToolsetMetadata, defineTool, defineToolset, emitEvent, ensureMcpObjectSchema, errorToToolResult, executeCrudOperation, extractToolFilePath, toMcpTool, toOpenAIFunction, toolError, toolSuccess, toolsetToMcpTools, toolsetToOpenAIFunctions, validateSessionId, widenTool };
@@ -1 +1 @@
1
- import{z as e}from"zod";import t from"node:path";const n={TOOL_NOT_FOUND:`TOOL_NOT_FOUND`,VALIDATION_FAILED:`VALIDATION_FAILED`,PERMISSION_DENIED:`PERMISSION_DENIED`,TIMEOUT:`TIMEOUT`,ABORTED:`ABORTED`,EXECUTION_ERROR:`EXECUTION_ERROR`,INVALID_OUTPUT:`INVALID_OUTPUT`,RESOURCE_NOT_FOUND:`RESOURCE_NOT_FOUND`,RESOURCE_EXHAUSTED:`RESOURCE_EXHAUSTED`,INTERNAL_ERROR:`INTERNAL_ERROR`};var r=class extends Error{code;details;constructor(e,t,n){super(t),this.code=e,this.details=n,this.name=`ToolExecutionError`}toToolError(){return{code:this.code,message:this.message,details:this.details}}};function i(e,t,n){return{success:!1,error:{code:e,message:t,details:n}}}function a(e){return{success:!0,data:e}}function o(e,t=n.EXECUTION_ERROR){return e instanceof r?{success:!1,error:e.toToolError()}:e instanceof Error?i(t,e.message,{name:e.name,stack:e.stack}):i(t,String(e))}function s(e){return{metadata:{name:e.name,description:e.description,annotations:e.annotations},inputSchema:e.inputSchema,outputSchema:e.outputSchema,execute:e.execute}}function c(e){if(!Array.isArray(e)&&!(`metadata`in e))return e;if(!Array.isArray(e)&&`metadata`in e){let t=e;return{[t.metadata.name]:t}}let t=e,n={};for(let e of t)n[e.metadata.name]=e;return n}function l(e){return{metadata:{name:e.name,description:e.description,version:e.version},tools:c(e.tools),configSchema:e.configSchema}}function u(e){if(e)return{readOnly:e.readOnly,destructive:e.destructive,idempotent:e.idempotent,openWorldHint:e.requiresApproval}}function d(t){return{name:t.metadata.name,description:t.metadata.description,inputSchema:e.toJSONSchema(t.inputSchema),annotations:u(t.metadata.annotations)}}function f(t){return{name:t.metadata.name,description:t.metadata.description,parameters:e.toJSONSchema(t.inputSchema)}}function p(e){return Object.values(e.tools).map(e=>d(e))}function m(e){return Object.values(e.tools).map(e=>f(e))}var h=class{factory;sessions=new Map;constructor(e){this.factory=e}get(e,...t){let n=this.sessions.get(e);return n||(n=this.factory(e,...t),this.sessions.set(e,n)),n}has(e){return this.sessions.has(e)}delete(e){return this.sessions.delete(e)}entries(){return this.sessions.entries()}sessionIds(){return Array.from(this.sessions.keys())}get size(){return this.sessions.size}};function g(e,t=`entity`){return e.sessionId?{valid:!0,sessionId:e.sessionId}:{valid:!1,error:i(n.VALIDATION_FAILED,`sessionId is required in context for ${t} operations`)}}async function _(e,t,n){e.bus&&await e.bus.emit(t,n)}async function v(e,t,n,r){let i=g(t,n);if(!i.valid)return i.error;let{sessionId:a}=i,o=r[e.op];return o(e,a,t)}function y(e){return e}const b=`fileAccessRules`,x=new Map([[`read_file`,[`path`,`file_path`]],[`write_file`,[`path`,`file_path`]],[`delete_file`,[`path`]],[`list_directory`,[`path`]],[`Read`,[`path`,`file_path`]],[`Write`,[`path`,`file_path`]],[`Edit`,[`path`,`file_path`]],[`MultiEdit`,[`path`,`file_path`]],[`create_file`,[`path`,`file_path`]]]);function S(e,n,r){if(!e||!n)return null;let i=x.get(e);if(!i)return null;let a=i.map(e=>n[e]).find(e=>typeof e==`string`&&e.length>0);return a?t.resolve(r,a):null}export{b as FILE_ACCESS_RULES_KEY,h as MemoryStore,n as ToolErrorCodes,r as ToolExecutionError,s as defineTool,l as defineToolset,_ as emitEvent,o as errorToToolResult,v as executeCrudOperation,S as extractToolFilePath,d as toMcpTool,f as toOpenAIFunction,i as toolError,a as toolSuccess,p as toolsetToMcpTools,m as toolsetToOpenAIFunctions,g as validateSessionId,y as widenTool};
1
+ import{z as e}from"zod";import t from"node:path";const n={TOOL_NOT_FOUND:`TOOL_NOT_FOUND`,VALIDATION_FAILED:`VALIDATION_FAILED`,PERMISSION_DENIED:`PERMISSION_DENIED`,TIMEOUT:`TIMEOUT`,ABORTED:`ABORTED`,EXECUTION_ERROR:`EXECUTION_ERROR`,INVALID_OUTPUT:`INVALID_OUTPUT`,RESOURCE_NOT_FOUND:`RESOURCE_NOT_FOUND`,RESOURCE_EXHAUSTED:`RESOURCE_EXHAUSTED`,INTERNAL_ERROR:`INTERNAL_ERROR`};var r=class extends Error{code;details;constructor(e,t,n){super(t),this.code=e,this.details=n,this.name=`ToolExecutionError`}toToolError(){return{code:this.code,message:this.message,details:this.details}}};function i(e,t,n){return{success:!1,error:{code:e,message:t,details:n}}}function a(e){return{success:!0,data:e}}function o(e,t=n.EXECUTION_ERROR){return e instanceof r?{success:!1,error:e.toToolError()}:e instanceof Error?i(t,e.message,{name:e.name,stack:e.stack}):i(t,String(e))}function s(e){return{metadata:{name:e.name,description:e.description,annotations:e.annotations},inputSchema:e.inputSchema,outputSchema:e.outputSchema,execute:e.execute}}function c(e){if(!Array.isArray(e)&&!(`metadata`in e))return e;if(!Array.isArray(e)&&`metadata`in e){let t=e;return{[t.metadata.name]:t}}let t=e,n={};for(let e of t)n[e.metadata.name]=e;return n}function l(e){return{metadata:{name:e.name,description:e.description,version:e.version},tools:c(e.tools),configSchema:e.configSchema}}function u(e){if(e)return{readOnly:e.readOnly,destructive:e.destructive,idempotent:e.idempotent,openWorldHint:e.requiresApproval}}function d(t){let n=e.toJSONSchema(t.inputSchema);return{name:t.metadata.name,description:t.metadata.description,inputSchema:g(n),annotations:u(t.metadata.annotations)}}function f(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function p(e,t,n){let r=e[0].properties,i=f(r)&&f(r[t])?r[t]:void 0,a=typeof i?.description==`string`?i.description:void 0;return{...i?.type===void 0?{}:{type:i.type},enum:n,...a===void 0?{}:{description:a}}}function m(e){let t=new Map;for(let n of e){let e=n.properties;if(f(e)){for(let[n,r]of Object.entries(e))if(f(r)&&r.const!==void 0){let e=t.get(n)??[];e.push(r.const),t.set(n,e)}}}for(let[n,r]of t){let t=new Set(r.map(e=>JSON.stringify(e)));if(r.length===e.length&&t.size===e.length)return{field:n,values:r}}}function h(e){let t=e.oneOf??e.anyOf;if(!Array.isArray(t)||t.length===0||!t.every(e=>f(e)&&e.type===`object`))return e;let n={},r=m(t);for(let e of t){let t=e.properties;if(f(t))for(let[e,i]of Object.entries(t))f(i)&&e!==r?.field&&(n[e]||(n[e]={...i}))}return r&&(n[r.field]=p(t,r.field,r.values)),{type:`object`,properties:n,required:r?[r.field]:[]}}function g(e){if(!f(e))return{type:`object`};let t=h(e);return`type`in t&&t.type===`object`?t:`oneOf`in e||`anyOf`in e?{...e,type:`object`}:{type:`object`}}function _(t){return{name:t.metadata.name,description:t.metadata.description,parameters:e.toJSONSchema(t.inputSchema)}}function v(e){return Object.values(e.tools).map(e=>d(e))}function y(e){return Object.values(e.tools).map(e=>_(e))}var b=class{factory;sessions=new Map;constructor(e){this.factory=e}get(e,...t){let n=this.sessions.get(e);return n||(n=this.factory(e,...t),this.sessions.set(e,n)),n}has(e){return this.sessions.has(e)}delete(e){return this.sessions.delete(e)}entries(){return this.sessions.entries()}sessionIds(){return Array.from(this.sessions.keys())}get size(){return this.sessions.size}};function x(e,t=`entity`){return e.sessionId?{valid:!0,sessionId:e.sessionId}:{valid:!1,error:i(n.VALIDATION_FAILED,`sessionId is required in context for ${t} operations`)}}async function S(e,t,n){e.bus&&await e.bus.emit(t,n)}async function C(e,t,n,r){let i=x(t,n);if(!i.valid)return i.error;let{sessionId:a}=i,o=r[e.op];return o(e,a,t)}function w(e){return e}const T=`fileAccessRules`,E=new Map([[`read_file`,[`path`,`file_path`]],[`write_file`,[`path`,`file_path`]],[`delete_file`,[`path`]],[`list_directory`,[`path`]],[`Read`,[`path`,`file_path`]],[`Write`,[`path`,`file_path`]],[`Edit`,[`path`,`file_path`]],[`MultiEdit`,[`path`,`file_path`]],[`create_file`,[`path`,`file_path`]]]);function D(e,n,r){if(!e||!n)return null;let i=E.get(e);if(!i)return null;let a=i.map(e=>n[e]).find(e=>typeof e==`string`&&e.length>0);return a?t.resolve(r,a):null}export{T as FILE_ACCESS_RULES_KEY,b as MemoryStore,n as ToolErrorCodes,r as ToolExecutionError,s as defineTool,l as defineToolset,S as emitEvent,g as ensureMcpObjectSchema,o as errorToToolResult,C as executeCrudOperation,D as extractToolFilePath,d as toMcpTool,_ as toOpenAIFunction,i as toolError,a as toolSuccess,v as toolsetToMcpTools,y as toolsetToOpenAIFunctions,x as validateSessionId,w as widenTool};
@@ -1,4 +1,4 @@
1
- //#region packages/tools-core/src/testing/index.d.ts
1
+ //#region core/tools-core/src/testing/index.d.ts
2
2
  /**
3
3
  * Domain-specific operations for a working memory type.
4
4
  *