@makaio/framework 1.0.0-dev-1781117225170 → 1.0.0-dev-1781354548379

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 (342) hide show
  1. package/README.md +29 -0
  2. package/dist/.makaio-build.json +2 -2
  3. package/dist/adapter-UpcpZDOv.mjs +1 -0
  4. package/dist/adapters/config/index.d.mts +1 -1
  5. package/dist/adapters/config/index.mjs +1 -1
  6. package/dist/adapters/index.d.mts +13 -5
  7. package/dist/adapters/index.mjs +2 -2
  8. package/dist/adapters/node.d.mts +1 -1
  9. package/dist/adapters/node.mjs +1 -1
  10. package/dist/bus/index.mjs +1 -1
  11. package/dist/client-BJVDImPV.d.mts +175 -0
  12. package/dist/clients/index.d.mts +101 -1
  13. package/dist/clients/index.mjs +2 -2
  14. package/dist/contracts/adapter/index.d.mts +2 -2
  15. package/dist/contracts/adapter/index.mjs +1 -1
  16. package/dist/contracts/adapter/schemas/session-lineage.d.mts +1 -1
  17. package/dist/contracts/artifact/index.d.mts +1 -1
  18. package/dist/contracts/client/index.d.mts +2 -2
  19. package/dist/contracts/common/index.d.mts +1 -1
  20. package/dist/contracts/config/index.d.mts +1 -1
  21. package/dist/contracts/extension/index.d.mts +4 -4
  22. package/dist/contracts/extension/index.mjs +1 -1
  23. package/dist/contracts/facet/index.d.mts +1 -1
  24. package/dist/contracts/harness/index.d.mts +1 -1
  25. package/dist/contracts/host/index.d.mts +1 -1
  26. package/dist/contracts/index.d.mts +786 -108
  27. package/dist/contracts/index.mjs +1 -1
  28. package/dist/contracts/materialization/index.d.mts +3 -3
  29. package/dist/contracts/model-registry/index.d.mts +1 -1
  30. package/dist/contracts/native-session-supervisor/index.d.mts +1 -1
  31. package/dist/contracts/platform/index.d.mts +1 -1
  32. package/dist/contracts/provider/index.d.mts +2 -2
  33. package/dist/contracts/session/index.d.mts +3 -3
  34. package/dist/contracts/session/index.mjs +1 -1
  35. package/dist/contracts/shared/index.d.mts +1 -1
  36. package/dist/contracts/skill/index.d.mts +1 -1
  37. package/dist/contracts/telemetry/index.d.mts +1 -1
  38. package/dist/contracts/timeout/index.d.mts +1 -1
  39. package/dist/contracts/variant/index.d.mts +1 -1
  40. package/dist/{definition-Cp-5xJp_.d.mts → definition-DqJOg6Lv.d.mts} +1 -1
  41. package/dist/{detached-extension-handle-oXbjv1tA.mjs → detached-extension-handle-Diiwgm13.mjs} +1 -1
  42. package/dist/drizzle/0001_messages_content_tsv.na.md +18 -0
  43. package/dist/drizzle/0012_legal_kate_bishop.sql +3 -0
  44. package/dist/drizzle/0013_eager_rhodey.sql +56 -0
  45. package/dist/drizzle/0014_fancy_ultimo.sql +1 -0
  46. package/dist/drizzle/0015_m_mqbh8q5b.sql +1 -0
  47. package/dist/drizzle/0016_m_mqbmq8h7.sql +1 -0
  48. package/dist/drizzle/0017_m_mqbnf924.sql +1 -0
  49. package/dist/drizzle/meta/0012_snapshot.json +2934 -0
  50. package/dist/drizzle/meta/0013_snapshot.json +2954 -0
  51. package/dist/drizzle/meta/0014_snapshot.json +2959 -0
  52. package/dist/drizzle/meta/0015_snapshot.json +2966 -0
  53. package/dist/drizzle/meta/0016_snapshot.json +2973 -0
  54. package/dist/drizzle/meta/0017_snapshot.json +2980 -0
  55. package/dist/drizzle/meta/_journal.json +42 -0
  56. package/dist/drizzle-wjquQK2m.mjs +1 -0
  57. package/dist/extension-DfNcE0zm.mjs +1 -0
  58. package/dist/extension-ZBN4BGre.mjs +1 -0
  59. package/dist/{filesystem-service-CBJT7A5w.mjs → filesystem-service-BjfrUmGS.mjs} +1 -1
  60. package/dist/{globby-C0lgTOUl.mjs → globby-BIH65cbN.mjs} +1 -1
  61. package/dist/handler-DqpiV9eA.mjs +1 -0
  62. package/dist/handlers-BAB4fQNH.mjs +41 -0
  63. package/dist/{index-uQl_1wQO.d.mts → index-BAhJKQLX.d.mts} +8 -8
  64. package/dist/{index-i7o6FtS0.d.mts → index-BDRKAxIV.d.mts} +129 -2
  65. package/dist/{index-CXfWW8cP.d.mts → index-BHAOu6Hs.d.mts} +20 -20
  66. package/dist/{index-t9Vt4Jbb.d.mts → index-BHzgDuRE.d.mts} +20 -3
  67. package/dist/{index-SFkbbDxs.d.mts → index-BYkOUd0x.d.mts} +1 -1
  68. package/dist/{index-CmGvjpUG.d.mts → index-BheaEhyI.d.mts} +6 -6
  69. package/dist/{index-Dsu1tPHm.d.mts → index-Bibt5jAX.d.mts} +8 -8
  70. package/dist/{index-Bw8SkcWG.d.mts → index-Bw_zL7Rs.d.mts} +1 -1
  71. package/dist/{index-ClgVA8Rz.d.mts → index-C3zfJg6s.d.mts} +6 -6
  72. package/dist/{index-v2kRZnfw2.d.mts → index-CH5U3zSA2.d.mts} +20 -10
  73. package/dist/{index-hWzUQtDn.d.mts → index-CTn_Xi-p.d.mts} +92 -19
  74. package/dist/{index-BY-fz0Jy.d.mts → index-DPIdX6kb.d.mts} +358 -110
  75. package/dist/{index-kLBWooVu.d.mts → index-Da4ABgRq.d.mts} +12 -12
  76. package/dist/{index-C1uZLARQ.d.mts → index-DrGLAuZc.d.mts} +1409 -72
  77. package/dist/{index-CT-zFurA.d.mts → index-Drz_a7kW.d.mts} +1 -1
  78. package/dist/{index-BELri1Hy.d.mts → index-IekAD8Gp.d.mts} +8 -8
  79. package/dist/{index-C_jIVT40.d.mts → index-fVgKVvta.d.mts} +1 -1
  80. package/dist/{index-BFaeVdsn2.d.mts → index-zgm2j9V92.d.mts} +44 -2
  81. package/dist/kernel/cli/index.d.mts +2 -2
  82. package/dist/kernel/cli/register.d.mts +1 -1
  83. package/dist/kernel/extension/index.d.mts +1 -1
  84. package/dist/kernel/extension/index.mjs +1 -1
  85. package/dist/kernel/index.d.mts +5 -5
  86. package/dist/kernel/index.mjs +1 -1
  87. package/dist/kernel/namespace/index.d.mts +1 -1
  88. package/dist/kernel/observability/index.d.mts +1 -1
  89. package/dist/kernel/providers/index.d.mts +1 -1
  90. package/dist/kernel/window/index.d.mts +1 -1
  91. package/dist/{lib-zuQKc8ym.mjs → lib-Cq5R6Tx9.mjs} +1 -1
  92. package/dist/{lib-IkUYa2Qs.mjs → lib-nlcl5kRW.mjs} +1 -1
  93. package/dist/{load-extensions-DE8qDIqi.d.mts → load-extensions-D9nbDIiW.d.mts} +1 -1
  94. package/dist/{load-extensions-CwxilDj1.mjs → load-extensions-wELQ4BBN.mjs} +1 -1
  95. package/dist/mcp-http-server/index.d.mts +132 -19
  96. package/dist/mcp-http-server/index.mjs +2 -2
  97. package/dist/{namespace-Dik_dNeE.d.mts → namespace--s0d86h-.d.mts} +144 -0
  98. package/dist/{namespace-ffepZB8Y.d.mts → namespace-B73Sxj5L.d.mts} +6 -6
  99. package/dist/{namespace-CZPu_jvy.d.mts → namespace-Boe6l5n9.d.mts} +82 -46
  100. package/dist/{namespace-Da_dHfdm.d.mts → namespace-BxxBhcV_.d.mts} +2 -2
  101. package/dist/namespace-Dfq6MDN9.mjs +1 -0
  102. package/dist/{namespace-DvHoeMUV.d.mts → namespace-aJJfBJU5.d.mts} +173 -3
  103. package/dist/node/bus-server/index.d.mts +1 -1
  104. package/dist/node/bus-server/index.mjs +1 -1
  105. package/dist/node/bus-server/server-lifecycle.d.mts +1 -1
  106. package/dist/node/bus-server/server-lifecycle.mjs +1 -1
  107. package/dist/{orchestrator-shared-FnWrPS09.mjs → orchestrator-shared-BKFXaKPL.mjs} +1 -1
  108. package/dist/{package-B2HkKyRz.d.mts → package--RZnpN2J.d.mts} +2 -3
  109. package/dist/package-BzJvtM5O.mjs +1 -0
  110. package/dist/package-DzN_jdqd.mjs +1 -0
  111. package/dist/package.json +1 -1
  112. package/dist/primitive-runtime-CNC_bSac.mjs +1 -0
  113. package/dist/registry-RG-bkw3c.mjs +146 -0
  114. package/dist/rules/index.d.mts +1 -1
  115. package/dist/rules/index.mjs +1 -1
  116. package/dist/rules/schemas.d.mts +1 -1
  117. package/dist/runtime-bun/index.mjs +1 -1
  118. package/dist/runtime-node/bus/runtime/namespace.d.mts +8 -8
  119. package/dist/runtime-node/bus/runtime/schemas.d.mts +11 -4
  120. package/dist/runtime-node/bus/runtime/schemas.mjs +1 -1
  121. package/dist/runtime-node/extension-discovery.d.mts +1 -1
  122. package/dist/runtime-node/extension-validation.d.mts +1 -1
  123. package/dist/runtime-node/extension-validation.mjs +1 -1
  124. package/dist/runtime-node/index.d.mts +77 -38
  125. package/dist/runtime-node/index.mjs +26 -53
  126. package/dist/runtime-node/makaio-config.d.mts +1 -1
  127. package/dist/runtime-node/makaio-config.mjs +1 -1
  128. package/dist/runtime-node/workflow-worker/index.d.mts +1 -1
  129. package/dist/runtime-node/workflow-worker/index.mjs +1 -1
  130. package/dist/runtime-node/workflow-worker/worker-entry.mjs +1 -1
  131. package/dist/schema-C3TgjrsV.mjs +1 -0
  132. package/dist/schema-CzhOc7TV.mjs +1 -0
  133. package/dist/{schema-CfuF2cXW.d.mts → schema-DGMLvVoQ.d.mts} +237 -11
  134. package/dist/schemas-CuKayWhA.mjs +1 -0
  135. package/dist/{schemas-SPI-Y87l2.d.mts → schemas-kVcJMjjn2.d.mts} +6 -6
  136. package/dist/{schemas-BiMxSTUx.d.mts → schemas-t1VR6_b_.d.mts} +3 -3
  137. package/dist/services/adapter-runtime/index.d.mts +3 -3
  138. package/dist/services/adapter-runtime/namespace.d.mts +1 -1
  139. package/dist/services/adapter-runtime/schemas.d.mts +1 -1
  140. package/dist/services/adapter-subsystem/index.d.mts +2 -2
  141. package/dist/services/adapter-subsystem/namespace.d.mts +1 -1
  142. package/dist/services/agent-runtime/index.d.mts +2 -2
  143. package/dist/services/agent-runtime/namespace.d.mts +1 -1
  144. package/dist/services/agent-runtime/schemas.d.mts +1 -1
  145. package/dist/services/capability/index.d.mts +1 -1
  146. package/dist/services/codebase/index.d.mts +2 -2
  147. package/dist/services/codebase/namespace.d.mts +1 -1
  148. package/dist/services/codebase/schemas.d.mts +1 -1
  149. package/dist/services/compression/index.d.mts +2 -2
  150. package/dist/services/compression/namespace.d.mts +1 -1
  151. package/dist/services/compression/schemas.d.mts +1 -1
  152. package/dist/services/context-rules/index.d.mts +4 -4
  153. package/dist/services/execution-target/index.d.mts +3 -3
  154. package/dist/services/execution-target/namespace.d.mts +1 -1
  155. package/dist/services/execution-target/schemas.d.mts +1 -1
  156. package/dist/services/filesystem/index.d.mts +1 -1
  157. package/dist/services/filesystem/index.mjs +1 -1
  158. package/dist/services/filesystem/namespace.d.mts +6 -6
  159. package/dist/services/filesystem/schemas.d.mts +3 -3
  160. package/dist/services/harness/index.d.mts +31 -20
  161. package/dist/services/harness/index.mjs +1 -1
  162. package/dist/services/harness/storage/schema.d.mts +60 -16
  163. package/dist/services/harness/storage/schema.mjs +1 -1
  164. package/dist/services/index.d.mts +166 -69
  165. package/dist/services/index.mjs +1 -1
  166. package/dist/services/log-import/browser.d.mts +2 -2
  167. package/dist/services/log-import/index.d.mts +9 -15
  168. package/dist/services/log-import/index.mjs +2 -2
  169. package/dist/services/log-import/log-import.d.mts +1 -1
  170. package/dist/services/model-registry/index.d.mts +1 -1
  171. package/dist/services/preferences/index.d.mts +2 -2
  172. package/dist/services/preferences/schemas.d.mts +1 -1
  173. package/dist/services/preferences/storage-namespace.d.mts +2 -2
  174. package/dist/services/provider-context/index.d.mts +1 -1
  175. package/dist/services/provider-context/index.mjs +1 -1
  176. package/dist/services/session/handlers/index.d.mts +1 -1
  177. package/dist/services/session/handlers/index.mjs +1 -1
  178. package/dist/services/session/index.d.mts +10 -10
  179. package/dist/services/session/index.mjs +1 -1
  180. package/dist/services/session/messages/namespace.d.mts +1 -1
  181. package/dist/services/session/messages/namespace.mjs +1 -1
  182. package/dist/services/session/orchestrator-testing/index.d.mts +1 -1
  183. package/dist/services/session/orchestrator-testing/index.mjs +1 -1
  184. package/dist/services/session/session-events/namespace.d.mts +1 -1
  185. package/dist/services/session/session-events/namespace.mjs +1 -1
  186. package/dist/services/session/storage/namespace.d.mts +1 -1
  187. package/dist/services/session/storage/schema.d.mts +2 -2
  188. package/dist/services/session/storage/schema.mjs +1 -1
  189. package/dist/services/session/testing/index.d.mts +18 -2
  190. package/dist/services/session/testing/index.mjs +54 -3
  191. package/dist/services/session/testing/orchestrator-shared.d.mts +1 -1
  192. package/dist/services/session/testing/orchestrator-shared.mjs +1 -1
  193. package/dist/services/session/turns/namespace.d.mts +1 -1
  194. package/dist/services/session/turns/namespace.mjs +1 -1
  195. package/dist/services/session-editor/index.d.mts +1 -1
  196. package/dist/services/settings/index.d.mts +3 -3
  197. package/dist/services/settings/index.mjs +1 -1
  198. package/dist/services/settings/namespace.d.mts +6 -6
  199. package/dist/services/settings/storage/clients-namespace.d.mts +1 -1
  200. package/dist/services/settings/storage/clients-namespace.mjs +1 -1
  201. package/dist/services/settings/storage/index.d.mts +3 -3
  202. package/dist/services/settings/storage/index.mjs +1 -1
  203. package/dist/services/settings/storage/providers-namespace.d.mts +1 -1
  204. package/dist/services/settings/storage/providers-namespace.mjs +1 -1
  205. package/dist/services/subagent/index.d.mts +1 -1
  206. package/dist/services/subagent/index.mjs +1 -1
  207. package/dist/services/subagent-template/index.d.mts +2 -2
  208. package/dist/services/subagent-template/namespace.d.mts +1 -1
  209. package/dist/services/subagent-template/schemas.d.mts +1 -1
  210. package/dist/services/tool-approval/index.d.mts +1 -1
  211. package/dist/services/tool-approval/index.mjs +1 -1
  212. package/dist/services/tools/index.d.mts +1 -1
  213. package/dist/services/tools/index.mjs +1 -1
  214. package/dist/services/tray-menu/index.d.mts +3 -3
  215. package/dist/services/tray-menu/namespace.d.mts +1 -1
  216. package/dist/services/tray-menu/schemas.d.mts +1 -1
  217. package/dist/services/turn/index.d.mts +1 -1
  218. package/dist/services/turn/namespace.d.mts +1 -1
  219. package/dist/services/turn/schemas.d.mts +72 -0
  220. package/dist/services/turn/schemas.mjs +1 -1
  221. package/dist/{session-C1Cami7U.mjs → session-BwX5_k47.mjs} +1 -1
  222. package/dist/session-P4nX60Xx.mjs +39 -0
  223. package/dist/{src-DI5TcYUW.mjs → src-CBG3IHUl.mjs} +1 -1
  224. package/dist/storage/drizzle/client.d.mts +2 -78
  225. package/dist/storage/drizzle/client.mjs +1 -1
  226. package/dist/storage/drizzle/columns/postgres.d.mts +88 -0
  227. package/dist/storage/drizzle/columns/postgres.mjs +1 -0
  228. package/dist/storage/drizzle/columns/sqlite.d.mts +81 -0
  229. package/dist/storage/drizzle/columns/sqlite.mjs +1 -0
  230. package/dist/storage/drizzle/index.d.mts +976 -23
  231. package/dist/storage/drizzle/index.mjs +1 -1
  232. package/dist/storage/handlers/drizzle/index.d.mts +1 -1
  233. package/dist/storage/handlers/drizzle/index.mjs +1 -1
  234. package/dist/storage/handlers/index.d.mts +1 -1
  235. package/dist/storage/handlers/index.mjs +1 -1
  236. package/dist/testing/drizzle-harness.d.mts +52 -6
  237. package/dist/testing/drizzle-harness.mjs +1 -1
  238. package/dist/testing/index.d.mts +34 -2
  239. package/dist/testing/index.mjs +1 -1
  240. package/dist/{tool-approval-service-BgNcJvKx.mjs → tool-approval-service-DNHV5x0M.mjs} +1 -1
  241. package/dist/tools-CQImrHAp.mjs +1 -0
  242. package/dist/{types-CZHV05Lu.d.mts → types-BpuLMR2m.d.mts} +616 -433
  243. package/dist/{types-C5Uy3WEy.d.mts → types-D0fPFh-D.d.mts} +1 -1
  244. package/dist/{types-0u6hpELc.d.mts → types-D6jnDjP2.d.mts} +18 -5
  245. package/dist/ui-components/index.d.mts +36 -37
  246. package/dist/ui-kernel/index.d.mts +1 -1
  247. package/dist/ui-kernel/pages/schemas.d.mts +1 -1
  248. package/dist/ui-views/index.d.mts +2 -2
  249. package/dist/workflow-engine/index.d.mts +539 -110
  250. package/dist/workflow-engine/index.mjs +1 -1
  251. package/dist/workflow-engine/package.d.mts +1 -1
  252. package/dist/workflow-engine/package.mjs +1 -1
  253. package/dist/workflow-engine/workflow-orchestrator.mjs +1 -1
  254. package/dist/{workflow-worker-hDaQzTBl.mjs → workflow-worker-CK9Sqj7D.mjs} +1 -1
  255. package/package.json +49 -1
  256. package/dist/adapter-Dt2FDMs4.mjs +0 -1
  257. package/dist/drizzle-DpjZFY_j.mjs +0 -1
  258. package/dist/extension--5Q190u_.mjs +0 -1
  259. package/dist/extension-DFIZ3FCJ.mjs +0 -1
  260. package/dist/handlers-Bev7-xjL.mjs +0 -41
  261. package/dist/namespace-CDiM5Bcr.mjs +0 -1
  262. package/dist/namespace-h0HIuqx0.mjs +0 -1
  263. package/dist/package-C9wOiMK9.mjs +0 -1
  264. package/dist/package-OE9dMQsq.mjs +0 -1
  265. package/dist/primitive-runtime-1Z3JbRUj.mjs +0 -1
  266. package/dist/schema-DCJyzRHe.mjs +0 -1
  267. package/dist/schema-DOnJmAPw.mjs +0 -1
  268. package/dist/schemas-CSUwpaNm.mjs +0 -1
  269. package/dist/session-BnfsJoZi.mjs +0 -134
  270. package/dist/tools-B8d8Iqqx.mjs +0 -1
  271. package/dist/types-yTKQTAok.d.mts +0 -31
  272. /package/dist/{ajv-0JG5NFEd.mjs → ajv-BA2z5ztb.mjs} +0 -0
  273. /package/dist/{await-trigger-CHuOd5co.mjs → await-trigger-DREnXCEJ.mjs} +0 -0
  274. /package/dist/{base-orchestrator-D-S9v5VY.d.mts → base-orchestrator-M5mAB5-w.d.mts} +0 -0
  275. /package/dist/{cleanEnvForAdapter-BlpmyXYk.mjs → cleanEnvForAdapter-vZfPGi0X.mjs} +0 -0
  276. /package/dist/{clients-namespace-E97p_GKF.d.mts → clients-namespace-SFk7OTop.d.mts} +0 -0
  277. /package/dist/{config-namespace-R_34Wfps.d.mts → config-namespace-BzAvE2nY.d.mts} +0 -0
  278. /package/dist/{create-static-mount-B9Szo_7y.mjs → create-static-mount-BB1MIQ9J.mjs} +0 -0
  279. /package/dist/{cross-spawn-CTptpCy4.mjs → cross-spawn-BL6EvJBv.mjs} +0 -0
  280. /package/dist/{cursor-storage-YikwAZR5.mjs → cursor-storage-CmKjSvKY.mjs} +0 -0
  281. /package/dist/{definition-CYzWS2eR.d.mts → definition-BSghHJpQ.d.mts} +0 -0
  282. /package/dist/{definition-CvOuzWNT.d.mts → definition-q6iLw11H.d.mts} +0 -0
  283. /package/dist/{descriptor-to-package-9nrAH_D5.mjs → descriptor-to-package-CY8oc2gl.mjs} +0 -0
  284. /package/dist/{esm-CglYG5aA.mjs → esm-CQVFKEW5.mjs} +0 -0
  285. /package/dist/{extension-discovery-BD1-oNU_.d.mts → extension-discovery-CkV_VRdJ.d.mts} +0 -0
  286. /package/dist/{filesystem-service-BcwRp4k1.d.mts → filesystem-service-Ddngll0j.d.mts} +0 -0
  287. /package/dist/{index-DJQew2k-.d.mts → index-9IDJUJ4X.d.mts} +0 -0
  288. /package/dist/{index-CNYPKkyH.d.mts → index-BBvcP-P0.d.mts} +0 -0
  289. /package/dist/{index-DfUBcVtG.d.mts → index-BCKRUuI2.d.mts} +0 -0
  290. /package/dist/{index-Dn9Uum3F.d.mts → index-BMpRB6iE.d.mts} +0 -0
  291. /package/dist/{index-CdNDnxXR.d.mts → index-BbCjtc3h.d.mts} +0 -0
  292. /package/dist/{index-B6RGNugn.d.mts → index-BnQSPC6c.d.mts} +0 -0
  293. /package/dist/{index-DUPZKsd3.d.mts → index-BpXX9WZJ.d.mts} +0 -0
  294. /package/dist/{index-DUhXk_q6.d.mts → index-BpniJgxu.d.mts} +0 -0
  295. /package/dist/{index-ChG8ZUNP.d.mts → index-Bsp0O_sI.d.mts} +0 -0
  296. /package/dist/{index-CF7dnqQj.d.mts → index-Buo9H8RK.d.mts} +0 -0
  297. /package/dist/{index-9KnLzPYu.d.mts → index-BxFA1XcP.d.mts} +0 -0
  298. /package/dist/{index-AZ4iLe7O2.d.mts → index-C33Tq1ei2.d.mts} +0 -0
  299. /package/dist/{index--0CnhN0g.d.mts → index-C6BhKRnH.d.mts} +0 -0
  300. /package/dist/{index-BV8rSmDZ.d.mts → index-CDU_s69P.d.mts} +0 -0
  301. /package/dist/{index-BDlpFEsp2.d.mts → index-CGJjA-hR2.d.mts} +0 -0
  302. /package/dist/{index-DNGUXQGC.d.mts → index-Cz9JMjZK.d.mts} +0 -0
  303. /package/dist/{index-C-YBGCCG.d.mts → index-D0SUjZmU.d.mts} +0 -0
  304. /package/dist/{index-yNb7G73-.d.mts → index-D6Iyvz9T.d.mts} +0 -0
  305. /package/dist/{index-ziQTLYUO.d.mts → index-DOfq0qqv.d.mts} +0 -0
  306. /package/dist/{index-BYxgW2i0.d.mts → index-DSV1aFgK.d.mts} +0 -0
  307. /package/dist/{index-Dbwm5Y-Q.d.mts → index-Dsq2zKvu.d.mts} +0 -0
  308. /package/dist/{jsonl-transport-DBHQgcIm.mjs → jsonl-transport-C21tpVfe.mjs} +0 -0
  309. /package/dist/{lib-CaOdTS9F.mjs → lib-CNOQJtgs.mjs} +0 -0
  310. /package/dist/{namespace-DnZ4rS6T2.d.mts → namespace-B60mn8J-2.d.mts} +0 -0
  311. /package/dist/{namespace-DfYutvMT.d.mts → namespace-BBVtD1gu.d.mts} +0 -0
  312. /package/dist/{namespace-BaJJxBsI.d.mts → namespace-CHMszppN.d.mts} +0 -0
  313. /package/dist/{namespace-uGw5nK6d.d.mts → namespace-CqUGzG53.d.mts} +0 -0
  314. /package/dist/{namespace-13uMtVGj.d.mts → namespace-DRFJN-_z.d.mts} +0 -0
  315. /package/dist/{namespace-TfZGCy7N.d.mts → namespace-DzVf1hVH.d.mts} +0 -0
  316. /package/dist/{namespace-QTFnJWHC.d.mts → namespace-XTGCaSXj.d.mts} +0 -0
  317. /package/dist/{namespace-CTrNKkxY.d.mts → namespace-nlsvvMtD.d.mts} +0 -0
  318. /package/dist/{namespace-DkDvQJhB.d.mts → namespace-uuR0Fg5r.d.mts} +0 -0
  319. /package/dist/{orchestrator-shared-BZVeoRfr.d.mts → orchestrator-shared-D91Wk7z-.d.mts} +0 -0
  320. /package/dist/{out-CiFds_ap.mjs → out-C1JFb2Bp.mjs} +0 -0
  321. /package/dist/{provider-context-lfG0BpqX.mjs → provider-context-wp4VSJFI.mjs} +0 -0
  322. /package/dist/{providers-namespace-Cc9FQ-Zt.d.mts → providers-namespace-BqWYkydw.d.mts} +0 -0
  323. /package/dist/{schemas-BD-1NGmS.d.mts → schemas-B5ToLwIs.d.mts} +0 -0
  324. /package/dist/{schemas-Hy-lsBpg.d.mts → schemas-B77Gi8Xr.d.mts} +0 -0
  325. /package/dist/{schemas-BzK1I1eX.d.mts → schemas-C792eVAZ.d.mts} +0 -0
  326. /package/dist/{schemas-CYS6bkht.d.mts → schemas-Chyj6HuZ.d.mts} +0 -0
  327. /package/dist/{schemas-DL_bGYyZ.d.mts → schemas-DZUaRcYl.d.mts} +0 -0
  328. /package/dist/{schemas-DdZwjeF0.d.mts → schemas-Dv5FxHDT.d.mts} +0 -0
  329. /package/dist/{schemas-CsjB6gel.d.mts → schemas-Dyk7JuVl.d.mts} +0 -0
  330. /package/dist/{schemas-DFWGb4uj.d.mts → schemas-Kq33MTPY.d.mts} +0 -0
  331. /package/dist/{schemas-BFeP62V4.d.mts → schemas-lqvZ6UpK.d.mts} +0 -0
  332. /package/dist/{server-lifecycle-DVAbXQzg.d.mts → server-lifecycle-47mygK3E.d.mts} +0 -0
  333. /package/dist/{server-lifecycle-JTFuSJhg.mjs → server-lifecycle-Cg47L59Q.mjs} +0 -0
  334. /package/dist/{session-lineage-CxHc3_bm.d.mts → session-lineage-CKg6mErA.d.mts} +0 -0
  335. /package/dist/{shared-schemas-CKe2uN4-.mjs → shared-schemas-DYL7a-No.mjs} +0 -0
  336. /package/dist/{src-4_2jBceX.mjs → src-DedDL9iv.mjs} +0 -0
  337. /package/dist/{storage-namespace-I30TaZP7.d.mts → storage-namespace-BXmMUd7a.d.mts} +0 -0
  338. /package/dist/{storage-namespace-definition-ZNBL3v2h.d.mts → storage-namespace-definition-C3XbpiP8.d.mts} +0 -0
  339. /package/dist/{types-11QnNmpW.d.mts → types-5Gw3iVpK.d.mts} +0 -0
  340. /package/dist/{types-BKNpS4Xw.d.mts → types-B0BtvVAq.d.mts} +0 -0
  341. /package/dist/{types-BtMNh2FS.d.mts → types-D-bP8RRE.d.mts} +0 -0
  342. /package/dist/{window-registry-QD1rTk_f.d.mts → window-registry-CfEi_Ji4.d.mts} +0 -0
@@ -201,6 +201,17 @@ interface McpServerOptions {
201
201
  agentContext?: McpAgentContext$1;
202
202
  /** Optional MCP tool discovery customization. */
203
203
  toolDiscovery?: McpToolDiscoveryOptions;
204
+ /**
205
+ * Optional callback invoked exactly once when the stdio transport closes.
206
+ *
207
+ * Fired on whichever of these happens first: the client detaches (stdin EOF),
208
+ * the SDK transport fires its own `onclose` hook, or an explicit
209
+ * {@link StdioMcpServerHandle.close} call completes. Subsequent triggers are
210
+ * suppressed so the callback is guaranteed to fire at most once.
211
+ *
212
+ * Only consulted for `transport: 'stdio'`; ignored for HTTP.
213
+ */
214
+ onclose?: () => void;
204
215
  }
205
216
  /**
206
217
  * Result returned by {@link startMcpServer} for the stdio transport.
@@ -245,24 +256,68 @@ interface CreateMcpServerOptions {
245
256
  resolveContextOverrides?: ResolveContextOverrides;
246
257
  }
247
258
  /**
248
- * Options accepted by {@link startHttpMcpServer}.
249
- *
250
- * Extends the transport-agnostic {@link McpServerOptions} fields (minus
251
- * `transport`, which is always `'http'` for this function) with an optional
252
- * callback for resolving session-stable context overrides at tool-call time.
259
+ * Transport-agnostic options shared by {@link createHttpMcpHandler} and
260
+ * {@link startHttpMcpServer}. These fields configure the MCP server and its
261
+ * attached transport without prescribing how the resulting handler is mounted
262
+ * onto an HTTP stack.
253
263
  */
254
- interface HttpMcpServerOptions extends Omit<McpServerOptions, 'transport'> {
255
- /** Optional callback for session-stable context override resolution. */
256
- resolveContextOverrides?: ResolveContextOverrides;
264
+ interface HttpMcpHandlerOptions {
265
+ /** Agent context for HTTP transport routing. */
266
+ agentContext?: McpAgentContext$1;
267
+ /** Optional MCP tool discovery customization. */
268
+ toolDiscovery?: McpToolDiscoveryOptions;
257
269
  /**
258
- * Optional callback invoked when the HTTP transport closes.
270
+ * Optional callback invoked when the underlying MCP transport closes.
259
271
  *
260
272
  * Called synchronously by the MCP SDK's transport `onclose` hook — that is,
261
- * when {@link HttpMcpServerHandle.close} has been called and the transport
262
- * has finished closing. Intended for best-effort resource cleanup (e.g.
263
- * flushing session registries) without blocking the close path.
273
+ * after {@link HttpMcpHandlerHandle.close} (or {@link HttpMcpServerHandle.close})
274
+ * has been called and the transport has finished tearing down. Intended for
275
+ * best-effort resource cleanup (e.g. flushing session registries) without
276
+ * blocking the close path.
277
+ *
278
+ * When used via {@link startHttpMcpServer}, the callback fires after the MCP
279
+ * transport closes, which occurs during the combined server-and-transport
280
+ * teardown initiated by {@link HttpMcpServerHandle.close}.
264
281
  */
265
282
  onclose?: () => void;
283
+ /** Optional callback for session-stable context override resolution. */
284
+ resolveContextOverrides?: ResolveContextOverrides;
285
+ }
286
+ /**
287
+ * Options accepted by {@link startHttpMcpServer}.
288
+ *
289
+ * Extends {@link HttpMcpHandlerOptions} with `port`, which controls which
290
+ * TCP port the internally-created `http.Server` listens on.
291
+ */
292
+ interface HttpMcpServerOptions extends HttpMcpHandlerOptions {
293
+ /** Port for HTTP transport. When omitted or 0, OS assigns an available port. */
294
+ port?: number;
295
+ }
296
+ /**
297
+ * Result returned by {@link createHttpMcpHandler}.
298
+ *
299
+ * Provides a Node.js-compatible request handler that can be mounted on any
300
+ * HTTP stack that exposes the raw `IncomingMessage` / `ServerResponse` pair,
301
+ * plus lifecycle handles for the underlying MCP server. See
302
+ * {@link createHttpMcpHandler} for usage and mounting examples.
303
+ */
304
+ interface HttpMcpHandlerHandle {
305
+ /**
306
+ * Mount this on any Node-compatible HTTP stack.
307
+ *
308
+ * The handler parses the raw request body internally; do not pre-read or
309
+ * pre-parse the body before passing the request to this function.
310
+ */
311
+ readonly handler: (req: IncomingMessage, res: ServerResponse) => void;
312
+ /** Context registry for registering and unregistering agent sessions. */
313
+ readonly contextRegistry: IMcpContextRegistry;
314
+ /**
315
+ * Gracefully close the MCP server and its transport.
316
+ *
317
+ * Idempotent: repeated calls await the same underlying close operation and
318
+ * do not trigger a second teardown.
319
+ */
320
+ close(): Promise<void>;
266
321
  }
267
322
  /**
268
323
  * Create and configure MCP server.
@@ -317,16 +372,72 @@ declare function createMcpServer(bus: IMakaioBus, sessionId: string, options?: C
317
372
  * Create a framework-agnostic HTTP request handler that delegates to
318
373
  * {@link StreamableHTTPServerTransport.handleRequest}.
319
374
  *
320
- * This is the seam for attaching MCP to a shared HTTP server in the future.
321
- * The transport handles body parsing internally and we do not pre-parse the body,
322
- * otherwise the request stream would be consumed before MCP can read it.
375
+ * **External consumers should prefer {@link createHttpMcpHandler}**, which
376
+ * constructs the transport internally so no MCP SDK type needs to appear in
377
+ * caller code. This lower-level function is exposed for internal composition
378
+ * and testing.
379
+ *
380
+ * The transport handles body parsing internally; do not pre-parse the body
381
+ * before calling this handler, as that would consume the request stream before
382
+ * MCP can read it.
323
383
  * @param transport - Streamable HTTP transport instance connected to the server.
324
384
  * @param onBeforeDispatch - Optional hook called synchronously before request dispatch.
325
385
  * @returns Node.js-compatible request handler.
326
386
  */
327
387
  declare function createMcpRequestHandler(transport: StreamableHTTPServerTransport, onBeforeDispatch?: (req: IncomingMessage, res: ServerResponse) => void): (req: IncomingMessage, res: ServerResponse) => void;
388
+ /**
389
+ * Create a mountable MCP handler without starting a dedicated HTTP server.
390
+ *
391
+ * Use this when you want to embed MCP into an existing HTTP application rather
392
+ * than running MCP on its own port. The returned {@link HttpMcpHandlerHandle.handler}
393
+ * is a plain Node.js `(req, res) => void` function that you can wire into any
394
+ * framework exposing the raw `IncomingMessage` / `ServerResponse` pair (e.g.
395
+ * Hono's Node adapter via `(c) => { handler(c.env.incoming, c.env.outgoing); }`).
396
+ *
397
+ * The MCP SDK transport is constructed and managed internally — no MCP SDK
398
+ * types appear in the public API.
399
+ *
400
+ * **Auth / middleware is the consumer's responsibility.** Run authentication,
401
+ * rate limiting, or logging in the surrounding HTTP stack *before* delegating
402
+ * to the returned handler.
403
+ *
404
+ * Closing the handle shuts down the MCP server and its transport; active
405
+ * HTTP connections are left to the caller's HTTP stack.
406
+ * @param bus - Bus instance for tool execution and approval RPC.
407
+ * @param options - Handler options; all fields are optional.
408
+ * @returns Handle with the request handler function, context registry, and
409
+ * an idempotent `close()` method.
410
+ * @example
411
+ * ```ts
412
+ * import * as http from 'node:http';
413
+ * import { createHttpMcpHandler } from '@makaio/framework/mcp-http-server';
414
+ *
415
+ * const { handler, close } = await createHttpMcpHandler(bus);
416
+ *
417
+ * const httpServer = http.createServer((req, res) => {
418
+ * if (req.url?.startsWith('/mcp')) {
419
+ * handler(req, res);
420
+ * } else {
421
+ * res.writeHead(404).end();
422
+ * }
423
+ * });
424
+ *
425
+ * httpServer.listen(3000);
426
+ *
427
+ * process.once('SIGTERM', async () => {
428
+ * httpServer.close();
429
+ * await close();
430
+ * });
431
+ * ```
432
+ */
433
+ declare function createHttpMcpHandler(bus: IMakaioBus, options?: HttpMcpHandlerOptions): Promise<HttpMcpHandlerHandle>;
328
434
  /**
329
435
  * Start a standalone HTTP MCP server on a new `http.Server`.
436
+ *
437
+ * This is a convenience wrapper around {@link createHttpMcpHandler} that also
438
+ * creates an `http.Server`, binds it to a TCP port, and manages connection
439
+ * draining on close. Use {@link createHttpMcpHandler} directly when you need
440
+ * to embed MCP into an existing HTTP application.
330
441
  * @param bus - Bus instance.
331
442
  * @param options - Server options; `port` defaults to 0 (OS-assigned).
332
443
  * Pass `resolveContextOverrides` to supply session-stable context overrides
@@ -338,9 +449,11 @@ declare function startHttpMcpServer(bus: IMakaioBus, options?: HttpMcpServerOpti
338
449
  * Start MCP server with the configured transport.
339
450
  *
340
451
  * For the stdio transport, returns a {@link StdioMcpServerHandle} whose
341
- * `close()` method gracefully tears down the MCP server. Signal handling
342
- * is intentionally left to the composition root library code must not
343
- * own process-global resources such as `process.on('SIGINT')`.
452
+ * `close()` method gracefully tears down the MCP server. Pass
453
+ * `options.onclose` to receive a single callback when the transport closes for
454
+ * any reason (client detach via stdin EOF, or explicit `handle.close()`).
455
+ * Signal handling is intentionally left to the composition root — library code
456
+ * must not own process-global resources such as `process.on('SIGINT')`.
344
457
  * @param bus - Bus instance.
345
458
  * @param sessionId - Session identifier (used for stdio transport).
346
459
  * @param options - Server options; defaults to stdio transport.
@@ -558,4 +671,4 @@ interface McpClientBridgeOptions {
558
671
  */
559
672
  declare function startMcpClientBridge(options: McpClientBridgeOptions): Promise<McpClientBridgeHandle>;
560
673
  //#endregion
561
- export { APPROVE_TOOL_NAME, type CreateMcpServerOptions, type HttpMcpServerHandle, type HttpMcpServerOptions, type IMcpContextRegistry, type McpAgentContext, type McpBridgedTool, type McpCallToolResult, type McpClientBridgeHandle, type McpClientBridgeOptions, McpContextRegistry, type McpResolvedTools, McpServerBridgeService, type McpServerOptions, type McpToolDiscoveryIdentity, type McpToolDiscoveryOptions, type McpToolEntry, type PluginToolsetMap, type RequestToolApproval, type ResolveContextOverrides, type StdioMcpServerHandle, type ToolApproveRequestPayload, type ToolApproveResponse, createMcpRequestHandler, createMcpServer, resolveMcpTools, startHttpMcpServer, startMcpClientBridge, startMcpServer, toolInfoToMcpTool };
674
+ export { APPROVE_TOOL_NAME, type CreateMcpServerOptions, type HttpMcpHandlerHandle, type HttpMcpHandlerOptions, type HttpMcpServerHandle, type HttpMcpServerOptions, type IMcpContextRegistry, type McpAgentContext, type McpBridgedTool, type McpCallToolResult, type McpClientBridgeHandle, type McpClientBridgeOptions, McpContextRegistry, type McpResolvedTools, McpServerBridgeService, type McpServerOptions, type McpToolDiscoveryIdentity, type McpToolDiscoveryOptions, type McpToolEntry, type PluginToolsetMap, type RequestToolApproval, type ResolveContextOverrides, type StdioMcpServerHandle, type ToolApproveRequestPayload, type ToolApproveResponse, createHttpMcpHandler, createMcpRequestHandler, createMcpServer, resolveMcpTools, startHttpMcpServer, startMcpClientBridge, startMcpServer, toolInfoToMcpTool };