@makaio/framework 1.0.0-dev-1781022866275 → 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 (456) hide show
  1. package/dist/.makaio-build.json +5 -0
  2. package/dist/account-identity-DT5NOtFi.mjs +1 -0
  3. package/dist/adapter-C1eI-fGV.mjs +1 -0
  4. package/dist/adapters/acp-client/index.d.mts +6208 -0
  5. package/dist/adapters/acp-client/index.mjs +3 -0
  6. package/dist/adapters/config/index.d.mts +429 -0
  7. package/dist/adapters/config/index.mjs +1 -0
  8. package/dist/adapters/index.d.mts +4202 -0
  9. package/dist/adapters/index.mjs +18 -0
  10. package/dist/adapters/node.d.mts +263 -0
  11. package/dist/adapters/node.mjs +4 -0
  12. package/dist/adapters/stream-session/index.d.mts +1414 -0
  13. package/dist/adapters/stream-session/index.mjs +1 -0
  14. package/dist/adapters/stream-session/testing/index.d.mts +29 -0
  15. package/dist/adapters/stream-session/testing/index.mjs +1 -0
  16. package/dist/artifact-B3npq1cy.mjs +1 -0
  17. package/dist/base-orchestrator-wyumsn3b.d.mts +772 -0
  18. package/dist/bus/index.d.mts +3994 -0
  19. package/dist/bus/index.mjs +1 -0
  20. package/dist/bus-Caz3Jpbc.mjs +1 -0
  21. package/dist/bus-Hb-LGzgb.mjs +2 -0
  22. package/dist/capability-service-CJbmhfv9.mjs +1 -0
  23. package/dist/chunk-DTipWd-i.mjs +1 -0
  24. package/dist/chunk-cpUYaJdV.mjs +1 -0
  25. package/dist/cleanEnvForAdapter-KkYzQa1f.mjs +1 -0
  26. package/dist/client-bx74gm4R.mjs +1 -0
  27. package/dist/clients/index.d.mts +2639 -0
  28. package/dist/clients/index.mjs +2 -0
  29. package/dist/clients-namespace-GmSJpBUV.d.mts +332 -0
  30. package/dist/config-namespace-CPY9YsR8.d.mts +638 -0
  31. package/dist/config-namespace-ncYg2ct_.mjs +1 -0
  32. package/dist/contracts/adapter/index.d.mts +3 -0
  33. package/dist/contracts/adapter/index.mjs +1 -0
  34. package/dist/contracts/adapter/schemas/session-lineage.d.mts +2 -0
  35. package/dist/contracts/adapter/schemas/session-lineage.mjs +1 -0
  36. package/dist/contracts/artifact/index.d.mts +2 -0
  37. package/dist/contracts/artifact/index.mjs +1 -0
  38. package/dist/contracts/client/index.d.mts +3 -0
  39. package/dist/contracts/client/index.mjs +1 -0
  40. package/dist/contracts/common/index.d.mts +2 -0
  41. package/dist/contracts/common/index.mjs +1 -0
  42. package/dist/contracts/config/index.d.mts +455 -0
  43. package/dist/contracts/config/index.mjs +1 -0
  44. package/dist/contracts/extension/index.d.mts +4 -0
  45. package/dist/contracts/extension/index.mjs +1 -0
  46. package/dist/contracts/facet/index.d.mts +2 -0
  47. package/dist/contracts/facet/index.mjs +1 -0
  48. package/dist/contracts/harness/index.d.mts +2 -0
  49. package/dist/contracts/harness/index.mjs +1 -0
  50. package/dist/contracts/host/index.d.mts +2 -0
  51. package/dist/contracts/host/index.mjs +1 -0
  52. package/dist/contracts/index.d.mts +23046 -0
  53. package/dist/contracts/index.mjs +1 -0
  54. package/dist/contracts/materialization/index.d.mts +4 -0
  55. package/dist/contracts/materialization/index.mjs +1 -0
  56. package/dist/contracts/model-registry/index.d.mts +2 -0
  57. package/dist/contracts/model-registry/index.mjs +1 -0
  58. package/dist/contracts/native-session-supervisor/index.d.mts +2 -0
  59. package/dist/contracts/native-session-supervisor/index.mjs +1 -0
  60. package/dist/contracts/platform/index.d.mts +2 -0
  61. package/dist/contracts/platform/index.mjs +1 -0
  62. package/dist/contracts/provider/index.d.mts +3 -0
  63. package/dist/contracts/provider/index.mjs +1 -0
  64. package/dist/contracts/session/index.d.mts +3 -0
  65. package/dist/contracts/session/index.mjs +1 -0
  66. package/dist/contracts/shared/index.d.mts +2 -0
  67. package/dist/contracts/shared/index.mjs +1 -0
  68. package/dist/contracts/skill/index.d.mts +2 -0
  69. package/dist/contracts/skill/index.mjs +1 -0
  70. package/dist/contracts/telemetry/index.d.mts +2 -0
  71. package/dist/contracts/telemetry/index.mjs +1 -0
  72. package/dist/contracts/timeout/index.d.mts +2 -0
  73. package/dist/contracts/timeout/index.mjs +1 -0
  74. package/dist/contracts/toast/index.d.mts +198 -0
  75. package/dist/contracts/toast/index.mjs +1 -0
  76. package/dist/contracts/variant/index.d.mts +2 -0
  77. package/dist/contracts/variant/index.mjs +1 -0
  78. package/dist/core/index.d.mts +1263 -0
  79. package/dist/core/index.mjs +1 -0
  80. package/dist/credential-ref-YWQQENEo.mjs +1 -0
  81. package/dist/cursor-storage-CtVJ3JzB.mjs +1 -0
  82. package/dist/definition-BLCdXGzh.d.mts +383 -0
  83. package/dist/definition-CrgHIpTK.d.mts +60 -0
  84. package/dist/definition-DZMXOnjX.mjs +1 -0
  85. package/dist/definition-pkJ6szUl.d.mts +158 -0
  86. package/dist/drizzle-Eq8W1EbD.mjs +1 -0
  87. package/dist/event-Ca2yUf5i.mjs +1 -0
  88. package/dist/execution-target-CRPTfZlc.mjs +1 -0
  89. package/dist/extension-C-4BHMRI.mjs +1 -0
  90. package/dist/extension-CpIUgBKI.mjs +1 -0
  91. package/dist/extension-namespace-cMh_mMiL.mjs +1 -0
  92. package/dist/facet-BuwhrThl.mjs +1 -0
  93. package/dist/filesystem-service-B8rhBRgB.mjs +1 -0
  94. package/dist/filesystem-service-p_iJVHd4.d.mts +66 -0
  95. package/dist/git/index.d.mts +210 -0
  96. package/dist/git/index.mjs +18 -0
  97. package/dist/globby-rtWVaFHv.mjs +41 -0
  98. package/dist/handlers-CkTsQLra.mjs +41 -0
  99. package/dist/harness-BRCMcvQN.mjs +1 -0
  100. package/dist/hooks/index.d.mts +423 -0
  101. package/dist/hooks/index.mjs +1 -0
  102. package/dist/host-Br9VuOyr.mjs +1 -0
  103. package/dist/identity-Cz2IeEtm.mjs +1 -0
  104. package/dist/index-472sOmsW.d.mts +218 -0
  105. package/dist/index-8SZkg7s6.d.mts +353 -0
  106. package/dist/index-B3PK4FIn.d.mts +5116 -0
  107. package/dist/index-B80L4YqA.d.mts +180 -0
  108. package/dist/index-BFg9BUpx.d.mts +355 -0
  109. package/dist/index-BGfWS6GE.d.mts +483 -0
  110. package/dist/index-BVgfS-AJ.d.mts +109 -0
  111. package/dist/index-B_zQC98V.d.mts +995 -0
  112. package/dist/index-Bh_Ne7LF.d.mts +1008 -0
  113. package/dist/index-Bvb2mMH6.d.mts +1730 -0
  114. package/dist/index-CCGVh9BF2.d.mts +749 -0
  115. package/dist/index-CGmcS0Ma.d.mts +412 -0
  116. package/dist/index-CHQ1SqT0.d.mts +117 -0
  117. package/dist/index-CLpjm52M.d.mts +183 -0
  118. package/dist/index-Caig6TeF.d.mts +6746 -0
  119. package/dist/index-CelJCBjk.d.mts +2992 -0
  120. package/dist/index-ChunCFu4.d.mts +11 -0
  121. package/dist/index-Cm0dUkWL.d.mts +4651 -0
  122. package/dist/index-CokQYGVP.d.mts +184 -0
  123. package/dist/index-Cs0kZXIz2.d.mts +37 -0
  124. package/dist/index-D5d5HeWI2.d.mts +259 -0
  125. package/dist/index-D90OmGmV.d.mts +389 -0
  126. package/dist/index-D9MwJ2Q8.d.mts +67 -0
  127. package/dist/index-DANINzMu.d.mts +40 -0
  128. package/dist/index-DBw-89vC2.d.mts +3640 -0
  129. package/dist/index-DGBu6bHi2.d.mts +438 -0
  130. package/dist/index-DKC62dY5.d.mts +146 -0
  131. package/dist/index-DKia0MX1.d.mts +43 -0
  132. package/dist/index-DMKnON5s.d.mts +28 -0
  133. package/dist/index-DUaw0Dw8.d.mts +14747 -0
  134. package/dist/index-De3kPhlN.d.mts +72 -0
  135. package/dist/index-L4GjJDKb.d.mts +822 -0
  136. package/dist/index-U-A8eyGT.d.mts +1490 -0
  137. package/dist/index-eemAKwsB.d.mts +362 -0
  138. package/dist/index-mNec7V-9.d.mts +1075 -0
  139. package/dist/index-soFznFCy2.d.mts +89 -0
  140. package/dist/index-vtXJuwrz.d.mts +40 -0
  141. package/dist/index-x_lVDp_J.d.mts +134 -0
  142. package/dist/json-value-CmhSGMLv.mjs +1 -0
  143. package/dist/kernel/cli/index.d.mts +143 -0
  144. package/dist/kernel/cli/index.mjs +1 -0
  145. package/dist/kernel/cli/schemas.d.mts +64 -0
  146. package/dist/kernel/cli/schemas.mjs +1 -0
  147. package/dist/kernel/extension/index.d.mts +2 -0
  148. package/dist/kernel/extension/index.mjs +1 -0
  149. package/dist/kernel/index.d.mts +296 -0
  150. package/dist/kernel/index.mjs +1 -0
  151. package/dist/kernel/namespace/index.d.mts +2 -0
  152. package/dist/kernel/namespace/index.mjs +1 -0
  153. package/dist/kernel/observability/index.d.mts +2 -0
  154. package/dist/kernel/observability/index.mjs +1 -0
  155. package/dist/kernel/providers/index.d.mts +2 -0
  156. package/dist/kernel/providers/index.mjs +1 -0
  157. package/dist/kernel/window/index.d.mts +2 -0
  158. package/dist/kernel/window/index.mjs +1 -0
  159. package/dist/materialization-CuUBu4XI.mjs +1 -0
  160. package/dist/model-registry-CfXytvzx.mjs +1 -0
  161. package/dist/model-registry-Scn_MC2d.mjs +1 -0
  162. package/dist/namespace-5QQqbF-B.d.mts +3133 -0
  163. package/dist/namespace-BM7Djng9.d.mts +189 -0
  164. package/dist/namespace-BoD94mrN.mjs +1 -0
  165. package/dist/namespace-BwzZJqTV.mjs +1 -0
  166. package/dist/namespace-CFLAmQfh.mjs +1 -0
  167. package/dist/namespace-CTm3nEvh.d.mts +51 -0
  168. package/dist/namespace-CaaNnKcR.d.mts +921 -0
  169. package/dist/namespace-CaoZ3S78.d.mts +43 -0
  170. package/dist/namespace-CxhsoFUP.d.mts +607 -0
  171. package/dist/namespace-DD8Oiqo7.d.mts +580 -0
  172. package/dist/namespace-DLovh2Ws.d.mts +1313 -0
  173. package/dist/namespace-DgqkaOVu.d.mts +768 -0
  174. package/dist/namespace-DkRgbZYn.mjs +1 -0
  175. package/dist/namespace-Dr8K0MCp.d.mts +2047 -0
  176. package/dist/namespace-DuXK5AYN.mjs +1 -0
  177. package/dist/namespace-EQniz-Aw.d.mts +142 -0
  178. package/dist/namespace-IV1QK__V.d.mts +159 -0
  179. package/dist/namespace-LViZ-EQk.mjs +1 -0
  180. package/dist/namespace-TyiTsLFv.d.mts +3020 -0
  181. package/dist/namespace-Yna5-Pws.mjs +1 -0
  182. package/dist/namespace-xcmbQlxh.mjs +1 -0
  183. package/dist/native-session-supervisor-B1TnaPUF.mjs +1 -0
  184. package/dist/node/bus-server/index.d.mts +178 -0
  185. package/dist/node/bus-server/index.mjs +1 -0
  186. package/dist/node/bus-server/server-lifecycle.d.mts +2 -0
  187. package/dist/node/bus-server/server-lifecycle.mjs +1 -0
  188. package/dist/node/machine-identity/index.d.mts +85 -0
  189. package/dist/node/machine-identity/index.mjs +3 -0
  190. package/dist/node/transports/index.d.mts +1945 -0
  191. package/dist/node/transports/index.mjs +2 -0
  192. package/dist/orchestrator-shared-CIDiFJMD.mjs +1 -0
  193. package/dist/orchestrator-shared-Dfa7FMyw.d.mts +249 -0
  194. package/dist/package-DKVlsMP3.mjs +1 -0
  195. package/dist/platform-DZ7z-wXD.mjs +1 -0
  196. package/dist/profile-6ynCD5k3.mjs +1 -0
  197. package/dist/provider-context-CK6B4X_8.mjs +1 -0
  198. package/dist/providers/index.d.mts +135 -0
  199. package/dist/providers/index.mjs +1 -0
  200. package/dist/providers-namespace-DSEpli4A.d.mts +583 -0
  201. package/dist/providers-u8i15co9.mjs +1 -0
  202. package/dist/schema-CoyE6mPt.mjs +1 -0
  203. package/dist/schema-M5YTvSAG.d.mts +949 -0
  204. package/dist/schema-e0wU_lcV.mjs +1 -0
  205. package/dist/schema-introspection-Dn1jWQs1.mjs +1 -0
  206. package/dist/schemas-Bd0OjRQf.d.mts +46 -0
  207. package/dist/schemas-C46QfKzv.d.mts +459 -0
  208. package/dist/schemas-CDBSjg7o.d.mts +237 -0
  209. package/dist/schemas-CR1Rripy.mjs +1 -0
  210. package/dist/schemas-CVvwIfG4.mjs +1 -0
  211. package/dist/schemas-CaLhkkLn.mjs +1 -0
  212. package/dist/schemas-ClOOT1W6.d.mts +174 -0
  213. package/dist/schemas-DATniTHb.d.mts +182 -0
  214. package/dist/schemas-DE-GNmSD.mjs +1 -0
  215. package/dist/schemas-DVF1A4DF.d.mts +160 -0
  216. package/dist/schemas-DaRSfYLf.d.mts +73 -0
  217. package/dist/schemas-DiYVzG6e.d.mts +315 -0
  218. package/dist/schemas-hSrzflwZ.mjs +1 -0
  219. package/dist/schemas-j7ivZ2HI.d.mts +944 -0
  220. package/dist/schemas-jFe1AuI-.mjs +1 -0
  221. package/dist/schemas-wg_6PAdV.d.mts +153 -0
  222. package/dist/scoped-bus-04pwo1uM.mjs +1 -0
  223. package/dist/server-lifecycle-FXTPW39-.mjs +1 -0
  224. package/dist/server-lifecycle-YoSGFGnU.d.mts +160 -0
  225. package/dist/service-base/index.d.mts +98 -0
  226. package/dist/service-base/index.mjs +1 -0
  227. package/dist/services/adapter-runtime/index.d.mts +4 -0
  228. package/dist/services/adapter-runtime/index.mjs +1 -0
  229. package/dist/services/adapter-runtime/namespace.d.mts +2 -0
  230. package/dist/services/adapter-runtime/namespace.mjs +1 -0
  231. package/dist/services/adapter-runtime/schemas.d.mts +2 -0
  232. package/dist/services/adapter-runtime/schemas.mjs +1 -0
  233. package/dist/services/adapter-subsystem/index.d.mts +3 -0
  234. package/dist/services/adapter-subsystem/index.mjs +1 -0
  235. package/dist/services/adapter-subsystem/namespace.d.mts +2 -0
  236. package/dist/services/adapter-subsystem/namespace.mjs +1 -0
  237. package/dist/services/agent-runtime/index.d.mts +3 -0
  238. package/dist/services/agent-runtime/index.mjs +1 -0
  239. package/dist/services/agent-runtime/namespace.d.mts +2 -0
  240. package/dist/services/agent-runtime/namespace.mjs +1 -0
  241. package/dist/services/agent-runtime/schemas.d.mts +2 -0
  242. package/dist/services/agent-runtime/schemas.mjs +1 -0
  243. package/dist/services/capability/index.d.mts +2 -0
  244. package/dist/services/capability/index.mjs +1 -0
  245. package/dist/services/cli-detection/namespace.d.mts +56 -0
  246. package/dist/services/cli-detection/namespace.mjs +1 -0
  247. package/dist/services/codebase/index.d.mts +3 -0
  248. package/dist/services/codebase/index.mjs +1 -0
  249. package/dist/services/codebase/namespace.d.mts +2 -0
  250. package/dist/services/codebase/namespace.mjs +1 -0
  251. package/dist/services/codebase/schemas.d.mts +2 -0
  252. package/dist/services/codebase/schemas.mjs +1 -0
  253. package/dist/services/compression/index.d.mts +3 -0
  254. package/dist/services/compression/index.mjs +1 -0
  255. package/dist/services/compression/namespace.d.mts +2 -0
  256. package/dist/services/compression/namespace.mjs +1 -0
  257. package/dist/services/compression/schemas.d.mts +2 -0
  258. package/dist/services/compression/schemas.mjs +1 -0
  259. package/dist/services/context-rules/index.d.mts +412 -0
  260. package/dist/services/context-rules/index.mjs +1 -0
  261. package/dist/services/credential-change/index.d.mts +17 -0
  262. package/dist/services/credential-change/index.mjs +1 -0
  263. package/dist/services/definition/index.d.mts +2 -0
  264. package/dist/services/definition/index.mjs +1 -0
  265. package/dist/services/definition/namespace.d.mts +71 -0
  266. package/dist/services/definition/namespace.mjs +1 -0
  267. package/dist/services/definition/schemas.d.mts +38 -0
  268. package/dist/services/definition/schemas.mjs +1 -0
  269. package/dist/services/dialog/namespace.d.mts +105 -0
  270. package/dist/services/dialog/namespace.mjs +1 -0
  271. package/dist/services/dialog/schemas.d.mts +109 -0
  272. package/dist/services/dialog/schemas.mjs +1 -0
  273. package/dist/services/execution-target/index.d.mts +4 -0
  274. package/dist/services/execution-target/index.mjs +1 -0
  275. package/dist/services/execution-target/namespace.d.mts +2 -0
  276. package/dist/services/execution-target/namespace.mjs +1 -0
  277. package/dist/services/execution-target/schemas.d.mts +2 -0
  278. package/dist/services/execution-target/schemas.mjs +1 -0
  279. package/dist/services/filesystem/index.d.mts +3 -0
  280. package/dist/services/filesystem/index.mjs +1 -0
  281. package/dist/services/filesystem/namespace.d.mts +432 -0
  282. package/dist/services/filesystem/namespace.mjs +1 -0
  283. package/dist/services/filesystem/schemas.d.mts +240 -0
  284. package/dist/services/filesystem/schemas.mjs +1 -0
  285. package/dist/services/git/namespace.d.mts +1163 -0
  286. package/dist/services/git/namespace.mjs +1 -0
  287. package/dist/services/git/schemas.d.mts +932 -0
  288. package/dist/services/git/schemas.mjs +1 -0
  289. package/dist/services/harness/index.d.mts +861 -0
  290. package/dist/services/harness/index.mjs +1 -0
  291. package/dist/services/harness/storage/schema.d.mts +424 -0
  292. package/dist/services/harness/storage/schema.mjs +1 -0
  293. package/dist/services/index.d.mts +6185 -0
  294. package/dist/services/index.mjs +1 -0
  295. package/dist/services/local-notification/index.d.mts +25 -0
  296. package/dist/services/local-notification/index.mjs +1 -0
  297. package/dist/services/local-notification/namespace.d.mts +73 -0
  298. package/dist/services/local-notification/namespace.mjs +1 -0
  299. package/dist/services/local-notification/schemas.d.mts +88 -0
  300. package/dist/services/local-notification/schemas.mjs +1 -0
  301. package/dist/services/log-import/browser.d.mts +3 -0
  302. package/dist/services/log-import/browser.mjs +1 -0
  303. package/dist/services/log-import/index.d.mts +274 -0
  304. package/dist/services/log-import/index.mjs +2 -0
  305. package/dist/services/log-import/log-import.d.mts +3 -0
  306. package/dist/services/log-import/log-import.mjs +1 -0
  307. package/dist/services/log-import/namespace.d.mts +327 -0
  308. package/dist/services/log-import/namespace.mjs +1 -0
  309. package/dist/services/log-import/schemas.d.mts +217 -0
  310. package/dist/services/log-import/schemas.mjs +1 -0
  311. package/dist/services/model-registry/index.d.mts +2 -0
  312. package/dist/services/model-registry/index.mjs +1 -0
  313. package/dist/services/preferences/index.d.mts +3 -0
  314. package/dist/services/preferences/index.mjs +1 -0
  315. package/dist/services/preferences/schemas.d.mts +2 -0
  316. package/dist/services/preferences/schemas.mjs +1 -0
  317. package/dist/services/preferences/storage-namespace.d.mts +3 -0
  318. package/dist/services/preferences/storage-namespace.mjs +1 -0
  319. package/dist/services/provider-context/index.d.mts +2 -0
  320. package/dist/services/provider-context/index.mjs +1 -0
  321. package/dist/services/provider-runtime/index.d.mts +136 -0
  322. package/dist/services/provider-runtime/index.mjs +1 -0
  323. package/dist/services/session/handlers/index.d.mts +2 -0
  324. package/dist/services/session/handlers/index.mjs +1 -0
  325. package/dist/services/session/index.d.mts +10 -0
  326. package/dist/services/session/index.mjs +1 -0
  327. package/dist/services/session/messages/namespace.d.mts +2 -0
  328. package/dist/services/session/messages/namespace.mjs +1 -0
  329. package/dist/services/session/orchestrator-testing/index.d.mts +2 -0
  330. package/dist/services/session/orchestrator-testing/index.mjs +1 -0
  331. package/dist/services/session/session-events/namespace.d.mts +2 -0
  332. package/dist/services/session/session-events/namespace.mjs +1 -0
  333. package/dist/services/session/storage/namespace.d.mts +2 -0
  334. package/dist/services/session/storage/namespace.mjs +1 -0
  335. package/dist/services/session/storage/schema.d.mts +2 -0
  336. package/dist/services/session/storage/schema.mjs +1 -0
  337. package/dist/services/session/testing/index.d.mts +35 -0
  338. package/dist/services/session/testing/index.mjs +65 -0
  339. package/dist/services/session/testing/orchestrator-shared.d.mts +2 -0
  340. package/dist/services/session/testing/orchestrator-shared.mjs +1 -0
  341. package/dist/services/session/turns/namespace.d.mts +2 -0
  342. package/dist/services/session/turns/namespace.mjs +1 -0
  343. package/dist/services/session-editor/index.d.mts +119 -0
  344. package/dist/services/session-editor/index.mjs +1 -0
  345. package/dist/services/settings/index.d.mts +47 -0
  346. package/dist/services/settings/index.mjs +1 -0
  347. package/dist/services/settings/namespace.d.mts +663 -0
  348. package/dist/services/settings/namespace.mjs +1 -0
  349. package/dist/services/settings/storage/clients-namespace.d.mts +2 -0
  350. package/dist/services/settings/storage/clients-namespace.mjs +1 -0
  351. package/dist/services/settings/storage/extension-configs/namespace.d.mts +184 -0
  352. package/dist/services/settings/storage/extension-configs/namespace.mjs +1 -0
  353. package/dist/services/settings/storage/index.d.mts +4 -0
  354. package/dist/services/settings/storage/index.mjs +1 -0
  355. package/dist/services/settings/storage/providers-namespace.d.mts +2 -0
  356. package/dist/services/settings/storage/providers-namespace.mjs +1 -0
  357. package/dist/services/subagent/index.d.mts +2 -0
  358. package/dist/services/subagent/index.mjs +1 -0
  359. package/dist/services/subagent-template/index.d.mts +3 -0
  360. package/dist/services/subagent-template/index.mjs +1 -0
  361. package/dist/services/subagent-template/namespace.d.mts +2 -0
  362. package/dist/services/subagent-template/namespace.mjs +1 -0
  363. package/dist/services/subagent-template/schemas.d.mts +2 -0
  364. package/dist/services/subagent-template/schemas.mjs +1 -0
  365. package/dist/services/tool-approval/index.d.mts +2 -0
  366. package/dist/services/tool-approval/index.mjs +1 -0
  367. package/dist/services/tools/index.d.mts +2 -0
  368. package/dist/services/tools/index.mjs +1 -0
  369. package/dist/services/tray-menu/index.d.mts +4 -0
  370. package/dist/services/tray-menu/index.mjs +1 -0
  371. package/dist/services/tray-menu/namespace.d.mts +2 -0
  372. package/dist/services/tray-menu/namespace.mjs +1 -0
  373. package/dist/services/tray-menu/schemas.d.mts +2 -0
  374. package/dist/services/tray-menu/schemas.mjs +1 -0
  375. package/dist/services/turn/index.d.mts +2 -0
  376. package/dist/services/turn/index.mjs +1 -0
  377. package/dist/services/turn/namespace.d.mts +2 -0
  378. package/dist/services/turn/namespace.mjs +1 -0
  379. package/dist/services/turn/schemas.d.mts +335 -0
  380. package/dist/services/turn/schemas.mjs +1 -0
  381. package/dist/session-BoldSdNZ2.mjs +134 -0
  382. package/dist/session-DuVOYctZ.mjs +1 -0
  383. package/dist/session-lineage-CRsc9g1x.d.mts +65 -0
  384. package/dist/shared-DpOEfD8F.mjs +1 -0
  385. package/dist/shared-schemas-CPShiLNp.mjs +1 -0
  386. package/dist/skill-CQO4mDqK.mjs +1 -0
  387. package/dist/storage/drizzle/client.d.mts +78 -0
  388. package/dist/storage/drizzle/client.mjs +1 -0
  389. package/dist/storage/drizzle/index.d.mts +137 -0
  390. package/dist/storage/drizzle/index.mjs +1 -0
  391. package/dist/storage/handlers/drizzle/index.d.mts +2 -0
  392. package/dist/storage/handlers/drizzle/index.mjs +1 -0
  393. package/dist/storage/handlers/index.d.mts +33 -0
  394. package/dist/storage/handlers/index.mjs +1 -0
  395. package/dist/storage/index.d.mts +192 -0
  396. package/dist/storage/index.mjs +1 -0
  397. package/dist/storage-namespace-BXkoh5Sy.d.mts +221 -0
  398. package/dist/storage-namespace-DWsYLAXa.mjs +1 -0
  399. package/dist/storage-namespace-definition-Bkx5rSto.d.mts +17 -0
  400. package/dist/storage-namespace-definition-CqSdsuCC.mjs +1 -0
  401. package/dist/style.css +3782 -0
  402. package/dist/telemetry-CvdLBWuk.mjs +1 -0
  403. package/dist/testing/drizzle-harness.d.mts +130 -0
  404. package/dist/testing/drizzle-harness.mjs +1 -0
  405. package/dist/testing/index.d.mts +106 -0
  406. package/dist/testing/index.mjs +1 -0
  407. package/dist/timeout-XsYIOKrc.mjs +1 -0
  408. package/dist/tool-approval-service-BvZWhYZp.mjs +1 -0
  409. package/dist/tools/index.d.mts +835 -0
  410. package/dist/tools/index.mjs +1 -0
  411. package/dist/tools/testing/index.d.mts +53 -0
  412. package/dist/tools/testing/index.mjs +1 -0
  413. package/dist/tools-D-luYcDw.mjs +1431 -0
  414. package/dist/tray-menu-service-DuXq5k22.mjs +1 -0
  415. package/dist/types-BCMUtBj1.d.mts +1106 -0
  416. package/dist/types-C2Ob9zz_.d.mts +128 -0
  417. package/dist/types-CCdqjeuH.d.mts +262 -0
  418. package/dist/types-DZHvOc_Q.d.mts +305 -0
  419. package/dist/types-Dy3YTcTF.d.mts +6777 -0
  420. package/dist/types-MfJZ67e9.d.mts +315 -0
  421. package/dist/types-dyP-bXXE.d.mts +31 -0
  422. package/dist/ui-components/index.d.mts +2342 -0
  423. package/dist/ui-components/index.mjs +8 -0
  424. package/dist/ui-config-9bDRwFZr.mjs +1 -0
  425. package/dist/ui-hooks/index.d.mts +1915 -0
  426. package/dist/ui-hooks/index.mjs +1 -0
  427. package/dist/ui-kernel/index.d.mts +2793 -0
  428. package/dist/ui-kernel/index.mjs +1 -0
  429. package/dist/ui-kernel/pages/namespace.d.mts +88 -0
  430. package/dist/ui-kernel/pages/namespace.mjs +1 -0
  431. package/dist/ui-kernel/pages/schemas.d.mts +2 -0
  432. package/dist/ui-kernel/pages/schemas.mjs +1 -0
  433. package/dist/ui-views/index.d.mts +487 -0
  434. package/dist/ui-views/index.mjs +30 -0
  435. package/dist/utils/health-probe.d.mts +26 -0
  436. package/dist/utils/health-probe.mjs +1 -0
  437. package/dist/utils/index.d.mts +262 -0
  438. package/dist/utils/index.mjs +2 -0
  439. package/dist/utils/keychain.d.mts +31 -0
  440. package/dist/utils/keychain.mjs +1 -0
  441. package/dist/utils/project-manifest.d.mts +130 -0
  442. package/dist/utils/project-manifest.mjs +1 -0
  443. package/dist/utils/resolve-package-root.d.mts +12 -0
  444. package/dist/utils/resolve-package-root.mjs +1 -0
  445. package/dist/utils/scope-paths.d.mts +33 -0
  446. package/dist/utils/scope-paths.mjs +1 -0
  447. package/dist/utils/workspace-packages.d.mts +59 -0
  448. package/dist/utils/workspace-packages.mjs +1 -0
  449. package/dist/utils/workspace-root.d.mts +24 -0
  450. package/dist/utils/workspace-root.mjs +2 -0
  451. package/dist/variant-CT6XBP6T.mjs +1 -0
  452. package/dist/version-BeT3ASEe.mjs +1 -0
  453. package/dist/visibility-Cb62p9bv.mjs +1 -0
  454. package/dist/window-registry-CBcrGTv4.d.mts +130 -0
  455. package/dist/window-registry-DW-dKRjQ.mjs +1 -0
  456. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ import{z as e}from"zod";function t(e){if(typeof e!=`object`||!e)return!1;let t=e;return`$in`in t||`$ne`in t||`$exists`in t||`$startsWith`in t||`$endsWith`in t}const n=`*`;function r(t){return typeof t==`object`&&!!t&&`request`in t&&`response`in t&&t.request instanceof e.ZodType&&t.response instanceof e.ZodType}function i(e){return typeof e==`object`&&!!e&&`__channel`in e&&e.__channel===!0&&`schema`in e}function a(e){return{__channel:!0,schema:e}}function o(e){return typeof e==`object`&&!!e&&`__local`in e&&e.__local===!0&&`schema`in e}function s(e){return{__local:!0,schema:e}}function c(e){return typeof e==`object`&&!!e&&`__defaultTransports`in e&&(e.__defaultTransports===`all`||e.__defaultTransports===`local-only`)&&`schema`in e}function l(e,t){return{__defaultTransports:t,schema:e}}function u(e){return typeof e==`object`&&!!e&&`__collectorOnly`in e&&e.__collectorOnly===!0&&`schema`in e}function d(e){return{__collectorOnly:!0,schema:e}}function f(e){return o(e)||u(e)||i(e)||c(e)?e.schema:e}function p(e,t,n){let a={};for(let[s,l]of Object.entries(t)){let t=s.split(`.`),u=a;for(let e=0;e<t.length-1;e++)u[t[e]]??={},u=u[t[e]];let d=o(l),p=i(l),m=c(l)?l.__defaultTransports:n,h={subject:s,$meta:{namespace:e,isRequest:r(f(l)),local:d,channel:p,...m!==void 0&&{defaultTransports:m}}};u[t[t.length-1]]=h}return a.$all={subject:`*`,$meta:{namespace:e,isRequest:!1,local:!1,channel:!1}},a}function m(e){return`${e.$meta.namespace}.${e.subject}`}function h(e,t,n){let r=n?.defaultTransports,i;if(n!==void 0){let{defaultTransports:e,...t}=n;i=Object.keys(t).length>0?t:void 0}return{name:e,subjects:p(e,t,r),schemas:t,...i===void 0?{}:{options:i},...r===void 0?{}:{defaultTransports:r}}}e.object({cwd:e.string(),env:e.record(e.string(),e.string()),platform:e.enum([`posix`,`windows`]),signal:e.custom().optional(),constraints:e.record(e.string(),e.unknown()).optional(),sessionId:e.string().optional(),subagentId:e.string().optional(),subagentDepth:e.number().optional()});function g(){return typeof process>`u`?`posix`:process.platform===`win32`?`windows`:`posix`}const _=[`API_KEY`,`APIKEY`,`SECRET`,`TOKEN`,`PASSWORD`,`CREDENTIAL`,`PRIVATE_KEY`,`PRIVATEKEY`,`AUTH`,`BEARER`,`ACCESS_KEY`,`ACCESSKEY`];function v(e){let t=e.toUpperCase();return _.some(e=>t.includes(e))}function y(e){let t={};for(let[n,r]of Object.entries(e))r!==void 0&&!v(n)&&(t[n]=r);return t}function b(e){let t=typeof process<`u`?process.cwd():`/`,n=typeof process<`u`?y(process.env):{};return{cwd:e?.cwd??t,env:e?.env??n,platform:e?.platform??g(),signal:e?.signal,constraints:e?.constraints,sessionId:e?.sessionId,subagentId:e?.subagentId,subagentDepth:e?.subagentDepth}}var x=class extends Error{subject;constructor(e,t){super(e),this.subject=t,this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},S=class extends x{subject;constructor(e,t){super(`Invalid model specified: ${e}`),this.subject=t,this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},C=class extends x{subject;constructor(e,t){super(`Directory does not exist: ${e}`),this.subject=t,this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},w=class extends x{subject;constructor(e,t){super(e),this.subject=t,this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}},T=class extends x{code=`rate_limit`},E=class extends x{code=`auth`},D=class extends x{code=`model_unavailable`},O=class extends x{code=`quota_exceeded`};const k=`makaio.observability`;function A(e){let t=e.meta()?.[k];if(typeof t!=`object`||!t)return;let n=t;return n.kind===`schema`||n.kind===`field`?n:void 0}function j(e,t){return e.meta({...e.meta(),[k]:t})}function M(t){if(t instanceof e.ZodOptional||t instanceof e.ZodNullable||t instanceof e.ZodDefault||t instanceof e.ZodCatch||t instanceof e.ZodReadonly)return t.unwrap()}function N(e){let t=e;for(;t;){let e=A(t);if(e?.kind===`field`)return e;t=M(t)}}function P(e){let t=A(e);if(t?.kind===`schema`)return{traceAll:t.traceAll}}function F(e){let t=N(e);if(t)return{visibility:t.visibility,attributeName:t.attributeName}}const I={schema(e,t){return j(e,{kind:`schema`,traceAll:t.traceAll})},field(e,t){return j(e,{kind:`field`,visibility:t.visibility,attributeName:t.attributeName})},hidden(e){return j(e,{kind:`field`,visibility:`hidden`})},count(e,t){return j(e,{kind:`field`,visibility:`count`,attributeName:t})},attribute(e,t){return j(e,{kind:`field`,visibility:`attribute`,attributeName:t})}};export{E as AuthenticationError,w as ConfigError,C as DirectoryNotFoundError,S as InvalidModelError,x as MakaioError,D as ModelUnavailableError,k as OBSERVABILITY_META_KEY,O as QuotaExceededError,T as RateLimitError,n as WildcardSubjectKey,a as channelSubject,d as collectorOnlySubject,h as createBusNamespace,b as createMakaioContext,l as defaultTransports,m as getFullSubjectForSubjectDefinition,F as getObservabilityFieldPolicy,P as getObservabilitySchemaPolicy,i as isChannelSchema,u as isCollectorOnlySchema,c as isDefaultTransportsSchema,o as isLocalSchema,t as isOperatorObject,r as isRequestSchema,s as localSubject,p as nestSubjectDefinitions,I as observability,f as unwrapSchema};
@@ -0,0 +1 @@
1
+ import"./visibility-Cb62p9bv.mjs";import{z as e}from"zod";const t=`stored:providerConfig:`,n=`account-manager:`;function r(e){if(!e.startsWith(t))return null;let n=e.slice(22),r=n.lastIndexOf(`:`);if(r===-1)return null;let i=n.slice(0,r),a=n.slice(r+1);return!i||!a||a.includes(`:`)?null:{configId:i,key:a}}function i(e,t){if(!e.startsWith(t))return!1;let n=e.slice(t.length),r=n.indexOf(`:`);return!(r<=0||r>=n.length-1)}function a(e){if(!e.startsWith(n))return null;try{let t=JSON.parse(e.slice(16));return!Array.isArray(t)||t.length!==2||typeof t[0]!=`string`||typeof t[1]!=`string`||t[0].length===0||t[1].length===0?null:{clientId:t[0],accountId:t[1]}}catch{return null}}function o(e){if(r(e))return!0;if(e.startsWith(`env:`)){let t=e.slice(4);return/^[A-Za-z_][A-Za-z0-9_]*$/.test(t)}return e.startsWith(`file:`)?e.length>5:!!(i(e,`keychain:`)||a(e))}function s(e){return a(e)!==null}const c=e.string().refine(o,{message:`Invalid credential reference format.`}).brand();function l(e,n){if(n.includes(`:`))throw Error(`Credential key must not contain colons: "${n}"`);return c.parse(`${t}${e}:${n}`)}function u(e,t){return c.parse(`${n}${JSON.stringify([e,t])}`)}function d(e){return r(e)}function f(e){if(!e)return;let t={};for(let[n,r]of Object.entries(e))t[n]=c.parse(r);return t}function p(e){if(e)return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t]))}export{s as a,l as i,f as n,d as o,u as r,p as s,c as t};
@@ -0,0 +1 @@
1
+ import{z as e}from"zod";import{createStorageNamespaceDefinition as t}from"@makaio/framework/storage";const n=new WeakMap,r=new WeakMap,i=new WeakMap,a=Symbol(`anyProducer`),o=Promise.resolve(),s=Symbol(`listenerAdded`),c=Symbol(`listenerRemoved`);let l=!1,u=!1;const d=e=>typeof e==`string`||typeof e==`symbol`||typeof e==`number`;function f(e){if(!d(e))throw TypeError("`eventName` must be a string, symbol, or number")}function p(e){if(typeof e!=`function`)throw TypeError(`listener must be a function`)}function m(e,t){let n=r.get(e);if(n.has(t))return n.get(t)}function h(e,t){let n=d(t)?t:a,r=i.get(e);if(r.has(n))return r.get(n)}function g(e,t,n){let r=i.get(e);if(r.has(t))for(let e of r.get(t))e.enqueue(n);if(r.has(a)){let e=Promise.all([t,n]);for(let t of r.get(a))t.enqueue(e)}}function _(e,t){t=Array.isArray(t)?t:[t];let n=!1,r=()=>{},a=[],o={enqueue(e){a.push(e),r()},finish(){n=!0,r()}};for(let n of t){let t=h(e,n);t||(t=new Set,i.get(e).set(n,t)),t.add(o)}return{async next(){return a?a.length===0?n?(a=void 0,this.next()):(await new Promise(e=>{r=e}),this.next()):{done:!1,value:await a.shift()}:{done:!0}},async return(n){a=void 0;for(let n of t){let t=h(e,n);t&&(t.delete(o),t.size===0&&i.get(e).delete(n))}return r(),arguments.length>0?{done:!0,value:await n}:{done:!0}},[Symbol.asyncIterator](){return this}}}function v(e){if(e===void 0)return S;if(!Array.isArray(e))throw TypeError("`methodNames` must be an array of strings");for(let t of e)if(!S.includes(t))throw typeof t==`string`?Error(`${t} is not Emittery method`):TypeError("`methodNames` element must be a string");return e}const y=e=>e===s||e===c;function b(e,t,n){if(y(t))try{l=!0,e.emit(t,n)}finally{l=!1}}var x=class e{static mixin(t,n){return n=v(n),r=>{if(typeof r!=`function`)throw TypeError("`target` must be function");for(let e of n)if(r.prototype[e]!==void 0)throw Error(`The property \`${e}\` already exists on \`target\``);function i(){return Object.defineProperty(this,t,{enumerable:!1,value:new e}),this[t]}Object.defineProperty(r.prototype,t,{enumerable:!1,get:i});let a=e=>function(...n){return this[t][e](...n)};for(let e of n)Object.defineProperty(r.prototype,e,{enumerable:!1,value:a(e)});return r}}static get isDebugEnabled(){if(typeof globalThis.process?.env!=`object`)return u;let{env:e}=globalThis.process??{env:{}};return e.DEBUG===`emittery`||e.DEBUG===`*`||u}static set isDebugEnabled(e){u=e}constructor(e={}){n.set(this,new Set),r.set(this,new Map),i.set(this,new Map),i.get(this).set(a,new Set),this.debug=e.debug??{},this.debug.enabled===void 0&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(e,t,n,r)=>{try{r=JSON.stringify(r)}catch{r=`Object with the following keys failed to stringify: ${Object.keys(r).join(`,`)}`}(typeof n==`symbol`||typeof n==`number`)&&(n=n.toString());let i=new Date,a=`${i.getHours()}:${i.getMinutes()}:${i.getSeconds()}.${i.getMilliseconds()}`;console.log(`[${a}][emittery:${e}][${t}] Event Name: ${n}\n\tdata: ${r}`)})}logIfDebugEnabled(t,n,r){(e.isDebugEnabled||this.debug.enabled)&&this.debug.logger(t,this.debug.name,n,r)}on(e,t,{signal:n}={}){p(t),e=Array.isArray(e)?e:[e];for(let n of e){f(n);let e=m(this,n);e||(e=new Set,r.get(this).set(n,e)),e.add(t),this.logIfDebugEnabled(`subscribe`,n,void 0),y(n)||b(this,s,{eventName:n,listener:t})}let i=()=>{this.off(e,t),n?.removeEventListener(`abort`,i)};return n?.addEventListener(`abort`,i,{once:!0}),n?.aborted&&i(),i}off(e,t){p(t),e=Array.isArray(e)?e:[e];for(let n of e){f(n);let e=m(this,n);e&&(e.delete(t),e.size===0&&r.get(this).delete(n)),this.logIfDebugEnabled(`unsubscribe`,n,void 0),y(n)||b(this,c,{eventName:n,listener:t})}}once(e,t){if(t!==void 0&&typeof t!=`function`)throw TypeError(`predicate must be a function`);let n,r=new Promise(r=>{n=this.on(e,e=>{t&&!t(e)||(n(),r(e))})});return r.off=n,r}events(e){e=Array.isArray(e)?e:[e];for(let t of e)f(t);return _(this,e)}async emit(e,t){if(f(e),y(e)&&!l)throw TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled(`emit`,e,t),g(this,e,t);let r=m(this,e)??new Set,i=n.get(this),a=[...r],s=y(e)?[]:[...i];await o,await Promise.all([...a.map(async e=>{if(r.has(e))return e(t)}),...s.map(async n=>{if(i.has(n))return n(e,t)})])}async emitSerial(e,t){if(f(e),y(e)&&!l)throw TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled(`emitSerial`,e,t),g(this,e,t);let r=m(this,e)??new Set,i=n.get(this),a=[...r],s=y(e)?[]:[...i];await o;for(let e of a)r.has(e)&&await e(t);for(let n of s)i.has(n)&&await n(e,t)}onAny(e,{signal:t}={}){p(e),this.logIfDebugEnabled(`subscribeAny`,void 0,void 0),n.get(this).add(e),b(this,s,{listener:e});let r=()=>{this.offAny(e),t?.removeEventListener(`abort`,r)};return t?.addEventListener(`abort`,r,{once:!0}),t?.aborted&&r(),r}anyEvent(){return _(this)}offAny(e){p(e),this.logIfDebugEnabled(`unsubscribeAny`,void 0,void 0),b(this,c,{listener:e}),n.get(this).delete(e)}clearListeners(e){e=Array.isArray(e)?e:[e];for(let t of e)if(this.logIfDebugEnabled(`clear`,t,void 0),d(t)){let e=m(this,t);e&&e.clear();let n=h(this,t);if(n){for(let e of n)e.finish();n.clear()}}else{n.get(this).clear();for(let[e,t]of r.get(this).entries())t.clear(),r.get(this).delete(e);for(let[e,t]of i.get(this).entries()){for(let e of t)e.finish();t.clear(),i.get(this).delete(e)}}}listenerCount(e){e=Array.isArray(e)?e:[e];let t=0;for(let a of e){if(d(a)){t+=n.get(this).size+(m(this,a)?.size??0)+(h(this,a)?.size??0)+(h(this)?.size??0);continue}a!==void 0&&f(a),t+=n.get(this).size;for(let e of r.get(this).values())t+=e.size;for(let e of i.get(this).values())t+=e.size}return t}bindMethods(e,t){if(typeof e!=`object`||!e)throw TypeError("`target` must be an object");t=v(t);for(let n of t){if(e[n]!==void 0)throw Error(`The property \`${n}\` already exists on \`target\``);Object.defineProperty(e,n,{enumerable:!1,value:this[n].bind(this)})}}};const S=Object.getOwnPropertyNames(x.prototype).filter(e=>e!==`constructor`);Object.defineProperty(x,`listenerAdded`,{value:s,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(x,`listenerRemoved`,{value:c,writable:!1,enumerable:!0,configurable:!1});const C=e.custom(()=>!0),w=e.object({filePath:e.string(),bytesRead:e.number(),lastModified:e.string(),sessionContext:C.optional()}),T=t(`importCursor`,{schemas:{get:{request:e.object({filePath:e.string()}),response:e.object({cursor:w.nullable()})},set:{request:w,response:e.object({success:e.boolean()})},delete:{request:e.object({filePath:e.string()}),response:e.object({success:e.boolean()})}}}),E=T.subjects;export{x as i,T as n,E as r,w as t};
@@ -0,0 +1,383 @@
1
+ import { z } from "zod";
2
+
3
+ //#region core/contracts/src/version/primitives.d.ts
4
+ /**
5
+ * npm semver range syntax (e.g. `">=1.0.0 <2.0.0"`, `"^1.5.0"`).
6
+ *
7
+ * Used by all range-bearing compatibility fields in descriptors and manifests.
8
+ */
9
+ type VersionRange = string;
10
+ /**
11
+ * Exact semver version (e.g. `"1.0.72"`).
12
+ *
13
+ * Used for concrete version pins such as preferred binary versions.
14
+ */
15
+ type VersionLiteral = string;
16
+ /** Validates that the string is a valid npm semver range. */
17
+ declare const VersionRangeSchema: z.ZodString;
18
+ /**
19
+ * Check whether a concrete version satisfies a semver range.
20
+ *
21
+ * Centralizes the `{ includePrerelease: true }` policy so every compatibility
22
+ * check in the framework uses the same semantics.
23
+ * @param version - Concrete semver version string.
24
+ * @param range - npm semver range to test against.
25
+ * @returns `true` when the version falls within the range.
26
+ */
27
+ declare function versionSatisfies(version: string, range: VersionRange): boolean;
28
+ /**
29
+ * Check whether a semver range is a universal wildcard (`*`, `>=0.0.0`, etc.).
30
+ *
31
+ * Uses the `semver` library's normalization so all universal range syntaxes are
32
+ * recognized, not just the literal `'*'` string.
33
+ * @param range - Semver range to test.
34
+ * @returns `true` when the range matches any version.
35
+ */
36
+ declare function isUniversalRange(range: string): boolean;
37
+ /** Validates that the string is an exact semver version. */
38
+ declare const VersionLiteralSchema: z.ZodString;
39
+ //#endregion
40
+ //#region core/contracts/src/client/definition.d.ts
41
+ /**
42
+ * Schema for a capability annotation attached to a native client tool.
43
+ *
44
+ * Captures a capability tag (e.g. `'shell.execute'`) and an optional
45
+ * human-readable description so the Harness UI can explain what a tool does
46
+ * without coupling to the platform capability taxonomy.
47
+ */
48
+ declare const ClientToolCapabilityAnnotationSchema: z.ZodObject<{
49
+ tag: z.ZodString;
50
+ description: z.ZodOptional<z.ZodString>;
51
+ }, z.core.$strip>;
52
+ type ClientToolCapabilityAnnotation = z.infer<typeof ClientToolCapabilityAnnotationSchema>;
53
+ /**
54
+ * Schema for a single native tool provided by a client binary.
55
+ *
56
+ * Native tools are those the client binary exposes directly (e.g. `bash`,
57
+ * `file_edit`). They are declared by the client package and seeded into
58
+ * the harness at startup.
59
+ */
60
+ declare const ClientToolDefinitionSchema: z.ZodObject<{
61
+ name: z.ZodString;
62
+ friendlyName: z.ZodString;
63
+ description: z.ZodOptional<z.ZodString>;
64
+ category: z.ZodOptional<z.ZodString>;
65
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodObject<{
66
+ tag: z.ZodString;
67
+ description: z.ZodOptional<z.ZodString>;
68
+ }, z.core.$strip>>>;
69
+ }, z.core.$strip>;
70
+ type ClientToolDefinition = z.infer<typeof ClientToolDefinitionSchema>;
71
+ /**
72
+ * Schema for a log source definition contributed by a client package.
73
+ *
74
+ * Log sources describe where the client binary writes conversation logs so the
75
+ * Makaio log-import service can discover and ingest them.
76
+ */
77
+ declare const LogSourceDefinitionSchema: z.ZodObject<{
78
+ id: z.ZodString;
79
+ name: z.ZodString;
80
+ description: z.ZodOptional<z.ZodString>;
81
+ glob: z.ZodOptional<z.ZodString>;
82
+ }, z.core.$strip>;
83
+ type LogSourceDefinition = z.infer<typeof LogSourceDefinitionSchema>;
84
+ /**
85
+ * Schema for a hook event declaration on a client definition.
86
+ *
87
+ * Declares which native hook events the client binary fires. Used by the
88
+ * wiring layer to know what hooks to install, and by the UI to display
89
+ * available events.
90
+ */
91
+ declare const ClientHookEventDeclarationSchema: z.ZodObject<{
92
+ name: z.ZodString;
93
+ frameworkSubject: z.ZodOptional<z.ZodString>;
94
+ mode: z.ZodDefault<z.ZodEnum<{
95
+ request: "request";
96
+ event: "event";
97
+ }>>;
98
+ }, z.core.$strip>;
99
+ type ClientHookEventDeclaration = z.infer<typeof ClientHookEventDeclarationSchema>;
100
+ /**
101
+ * Schema for the config isolation descriptor on a client definition.
102
+ *
103
+ * Describes the environment variable and default path the client binary uses
104
+ * for config isolation. Most clients accept a directory path. Some clients only
105
+ * expose a file-level override, so `pathKind` records which value shape the env
106
+ * var expects.
107
+ */
108
+ declare const ConfigIsolationSchema: z.ZodObject<{
109
+ envVar: z.ZodString;
110
+ defaultPath: z.ZodString;
111
+ pathKind: z.ZodDefault<z.ZodEnum<{
112
+ file: "file";
113
+ directory: "directory";
114
+ }>>;
115
+ }, z.core.$strip>;
116
+ type ConfigIsolation = z.infer<typeof ConfigIsolationSchema>;
117
+ /**
118
+ * Install descriptor for the `npm` strategy.
119
+ *
120
+ * The manager runs a sandboxed `npm install --prefix <targetDir>` for the
121
+ * pinned package version so managed installs do not mutate global npm state.
122
+ * An exact version pin is required; floating ranges are not accepted so the
123
+ * framework can reproduce the same binary across machines and time.
124
+ */
125
+ declare const NpmInstallDescriptorSchema: z.ZodObject<{
126
+ type: z.ZodLiteral<"npm">;
127
+ package: z.ZodString;
128
+ version: z.ZodString;
129
+ }, z.core.$strip>;
130
+ type NpmInstallDescriptor = z.infer<typeof NpmInstallDescriptorSchema>;
131
+ /**
132
+ * Install descriptor for the `signed-binary-bucket` strategy.
133
+ *
134
+ * The manager fetches a GPG-signed manifest from a versioned bucket path,
135
+ * verifies the manifest signature against the declared public key, selects the
136
+ * per-platform binary, downloads it, and verifies its checksum before
137
+ * activating the install.
138
+ *
139
+ * All bucket paths are Go-style templates: `{version}` is replaced with the
140
+ * resolved version string and `{platform}` / `{binary}` are replaced with the
141
+ * per-platform values from the `platforms` map.
142
+ */
143
+ declare const SignedBinaryBucketInstallDescriptorSchema: z.ZodObject<{
144
+ type: z.ZodLiteral<"signed-binary-bucket">;
145
+ version: z.ZodString;
146
+ config: z.ZodObject<{
147
+ baseUrl: z.ZodString;
148
+ manifestPathTemplate: z.ZodString;
149
+ manifestSignaturePathTemplate: z.ZodString;
150
+ publicKeyUrl: z.ZodString;
151
+ publicKeyFingerprint: z.ZodString;
152
+ binaryPathTemplate: z.ZodString;
153
+ platforms: z.ZodRecord<z.ZodString, z.ZodString>;
154
+ }, z.core.$strip>;
155
+ }, z.core.$strip>;
156
+ type SignedBinaryBucketInstallDescriptor = z.infer<typeof SignedBinaryBucketInstallDescriptorSchema>;
157
+ /**
158
+ * Discriminated union of all supported managed install descriptors.
159
+ *
160
+ * Two strategies are supported:
161
+ * - `npm` — npm registry installation with an exact version pin.
162
+ * - `signed-binary-bucket` — signed static bucket download with an exact version pin.
163
+ *
164
+ * The descriptor is purely declarative; no runtime logic lives here.
165
+ */
166
+ declare const ManagedInstallDescriptorSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
167
+ type: z.ZodLiteral<"npm">;
168
+ package: z.ZodString;
169
+ version: z.ZodString;
170
+ }, z.core.$strip>, z.ZodObject<{
171
+ type: z.ZodLiteral<"signed-binary-bucket">;
172
+ version: z.ZodString;
173
+ config: z.ZodObject<{
174
+ baseUrl: z.ZodString;
175
+ manifestPathTemplate: z.ZodString;
176
+ manifestSignaturePathTemplate: z.ZodString;
177
+ publicKeyUrl: z.ZodString;
178
+ publicKeyFingerprint: z.ZodString;
179
+ binaryPathTemplate: z.ZodString;
180
+ platforms: z.ZodRecord<z.ZodString, z.ZodString>;
181
+ }, z.core.$strip>;
182
+ }, z.core.$strip>], "type">;
183
+ type ManagedInstallDescriptor = z.infer<typeof ManagedInstallDescriptorSchema>;
184
+ /**
185
+ * Platform-aware command descriptor for querying the installed binary version.
186
+ *
187
+ * The `executable` field may be a single relative path string (used on all
188
+ * platforms) or a platform-keyed object that overrides the `default` executable
189
+ * on specific operating systems.
190
+ *
191
+ * All executable values are resolved relative to the managed install directory
192
+ * — absolute paths and parent-directory traversals (`..`) are rejected by the
193
+ * `ClientDefinitionSchema` refinement.
194
+ */
195
+ declare const VersionCommandSchema: z.ZodObject<{
196
+ executable: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
197
+ default: z.ZodString;
198
+ darwin: z.ZodOptional<z.ZodString>;
199
+ linux: z.ZodOptional<z.ZodString>;
200
+ win32: z.ZodOptional<z.ZodString>;
201
+ }, z.core.$strict>]>;
202
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
203
+ }, z.core.$strict>;
204
+ type VersionCommand = z.infer<typeof VersionCommandSchema>;
205
+ /**
206
+ * Optional post-install action descriptor.
207
+ *
208
+ * Carries an open-ended `kind` string so the runtime can dispatch to a
209
+ * registered post-install handler without the contracts layer enumerating
210
+ * every possible action.
211
+ */
212
+ declare const PostInstallDescriptorSchema: z.ZodObject<{
213
+ kind: z.ZodString;
214
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
215
+ }, z.core.$strip>;
216
+ type PostInstallDescriptor = z.infer<typeof PostInstallDescriptorSchema>;
217
+ /**
218
+ * Declarative runtime capability flags for a client package.
219
+ *
220
+ * These flags are static declarations contributed by the client package.
221
+ * They inform Makaio which observation and launch mechanisms the client
222
+ * supports so the framework can activate the appropriate producers and
223
+ * adapt its behaviour without runtime probing.
224
+ *
225
+ * All flags default to `false` so packages only need to opt in to what they
226
+ * actually support.
227
+ */
228
+ declare const ClientRuntimeCapabilitiesSchema: z.ZodObject<{
229
+ supportsHooks: z.ZodDefault<z.ZodBoolean>;
230
+ supportsStatusline: z.ZodDefault<z.ZodBoolean>;
231
+ supportsSupervisorLaunch: z.ZodDefault<z.ZodBoolean>;
232
+ supportsManagedBinary: z.ZodDefault<z.ZodBoolean>;
233
+ hookEvents: z.ZodDefault<z.ZodArray<z.ZodObject<{
234
+ name: z.ZodString;
235
+ frameworkSubject: z.ZodOptional<z.ZodString>;
236
+ mode: z.ZodDefault<z.ZodEnum<{
237
+ request: "request";
238
+ event: "event";
239
+ }>>;
240
+ }, z.core.$strip>>>;
241
+ }, z.core.$strip>;
242
+ type ClientRuntimeCapabilities = z.infer<typeof ClientRuntimeCapabilitiesSchema>;
243
+ /**
244
+ * Binary compatibility descriptor for a client definition.
245
+ *
246
+ * Groups all binary-related compatibility information: the executable name
247
+ * used for PATH detection and the version range the framework supports.
248
+ */
249
+ interface ClientBinaryCompatibility {
250
+ /** Binary name used for CLI detection (e.g. `'claude'` for the `claude` binary on `PATH`). */
251
+ readonly name: string;
252
+ /**
253
+ * npm semver range of supported binary versions
254
+ * (e.g. `'>=1.0.0'`, `'^2.0.0'`).
255
+ */
256
+ readonly supportedVersions: VersionRange;
257
+ }
258
+ /** Zod schema for {@link ClientBinaryCompatibility}. */
259
+ declare const ClientBinaryCompatibilitySchema: z.ZodObject<{
260
+ name: z.ZodString;
261
+ supportedVersions: z.ZodString;
262
+ }, z.core.$strict>;
263
+ /**
264
+ * Static definition for a Makaio client package.
265
+ *
266
+ * Each client package (e.g. `@makaio/client-claude-code`) exports exactly one
267
+ * `ClientDefinition` object. The bootstrap service discovers and seeds these
268
+ * definitions into the `clients` storage table on startup.
269
+ *
270
+ * Key fields:
271
+ * - `runtimeCapabilities` — capability flags (hooks, managed binary, etc.)
272
+ * - `managedInstall` — install descriptor when Makaio manages the binary.
273
+ * - `configIsolation` — env var and default path for config isolation.
274
+ * Used by both managed and global binaries; see {@link ConfigIsolationSchema}.
275
+ */
276
+ declare const ClientDefinitionSchema: z.ZodObject<{
277
+ id: z.ZodString;
278
+ name: z.ZodString;
279
+ version: z.ZodString;
280
+ description: z.ZodOptional<z.ZodString>;
281
+ binary: z.ZodOptional<z.ZodObject<{
282
+ name: z.ZodString;
283
+ supportedVersions: z.ZodString;
284
+ }, z.core.$strict>>;
285
+ nativeTools: z.ZodDefault<z.ZodArray<z.ZodObject<{
286
+ name: z.ZodString;
287
+ friendlyName: z.ZodString;
288
+ description: z.ZodOptional<z.ZodString>;
289
+ category: z.ZodOptional<z.ZodString>;
290
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodObject<{
291
+ tag: z.ZodString;
292
+ description: z.ZodOptional<z.ZodString>;
293
+ }, z.core.$strip>>>;
294
+ }, z.core.$strip>>>;
295
+ defaultApprovalPolicy: z.ZodEnum<{
296
+ reject: "reject";
297
+ "always-ask": "always-ask";
298
+ "full-access": "full-access";
299
+ }>;
300
+ logSources: z.ZodOptional<z.ZodArray<z.ZodObject<{
301
+ id: z.ZodString;
302
+ name: z.ZodString;
303
+ description: z.ZodOptional<z.ZodString>;
304
+ glob: z.ZodOptional<z.ZodString>;
305
+ }, z.core.$strip>>>;
306
+ defaultProviderId: z.ZodOptional<z.ZodString>;
307
+ runtimeCapabilities: z.ZodPipe<z.ZodOptional<z.ZodObject<{
308
+ supportsHooks: z.ZodDefault<z.ZodBoolean>;
309
+ supportsStatusline: z.ZodDefault<z.ZodBoolean>;
310
+ supportsSupervisorLaunch: z.ZodDefault<z.ZodBoolean>;
311
+ supportsManagedBinary: z.ZodDefault<z.ZodBoolean>;
312
+ hookEvents: z.ZodDefault<z.ZodArray<z.ZodObject<{
313
+ name: z.ZodString;
314
+ frameworkSubject: z.ZodOptional<z.ZodString>;
315
+ mode: z.ZodDefault<z.ZodEnum<{
316
+ request: "request";
317
+ event: "event";
318
+ }>>;
319
+ }, z.core.$strip>>>;
320
+ }, z.core.$strip>>, z.ZodTransform<{
321
+ supportsHooks: boolean;
322
+ supportsStatusline: boolean;
323
+ supportsSupervisorLaunch: boolean;
324
+ supportsManagedBinary: boolean;
325
+ hookEvents: {
326
+ name: string;
327
+ mode: "request" | "event";
328
+ frameworkSubject?: string | undefined;
329
+ }[];
330
+ }, {
331
+ supportsHooks: boolean;
332
+ supportsStatusline: boolean;
333
+ supportsSupervisorLaunch: boolean;
334
+ supportsManagedBinary: boolean;
335
+ hookEvents: {
336
+ name: string;
337
+ mode: "request" | "event";
338
+ frameworkSubject?: string | undefined;
339
+ }[];
340
+ } | undefined>>;
341
+ managedInstall: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
342
+ type: z.ZodLiteral<"npm">;
343
+ package: z.ZodString;
344
+ version: z.ZodString;
345
+ }, z.core.$strip>, z.ZodObject<{
346
+ type: z.ZodLiteral<"signed-binary-bucket">;
347
+ version: z.ZodString;
348
+ config: z.ZodObject<{
349
+ baseUrl: z.ZodString;
350
+ manifestPathTemplate: z.ZodString;
351
+ manifestSignaturePathTemplate: z.ZodString;
352
+ publicKeyUrl: z.ZodString;
353
+ publicKeyFingerprint: z.ZodString;
354
+ binaryPathTemplate: z.ZodString;
355
+ platforms: z.ZodRecord<z.ZodString, z.ZodString>;
356
+ }, z.core.$strip>;
357
+ }, z.core.$strip>], "type">>;
358
+ versionCommand: z.ZodOptional<z.ZodObject<{
359
+ executable: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
360
+ default: z.ZodString;
361
+ darwin: z.ZodOptional<z.ZodString>;
362
+ linux: z.ZodOptional<z.ZodString>;
363
+ win32: z.ZodOptional<z.ZodString>;
364
+ }, z.core.$strict>]>;
365
+ args: z.ZodDefault<z.ZodArray<z.ZodString>>;
366
+ }, z.core.$strict>>;
367
+ postInstall: z.ZodOptional<z.ZodObject<{
368
+ kind: z.ZodString;
369
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
370
+ }, z.core.$strip>>;
371
+ configIsolation: z.ZodOptional<z.ZodObject<{
372
+ envVar: z.ZodString;
373
+ defaultPath: z.ZodString;
374
+ pathKind: z.ZodDefault<z.ZodEnum<{
375
+ file: "file";
376
+ directory: "directory";
377
+ }>>;
378
+ }, z.core.$strip>>;
379
+ }, z.core.$strict>;
380
+ type ClientDefinitionInput = z.input<typeof ClientDefinitionSchema>;
381
+ type ClientDefinition = z.infer<typeof ClientDefinitionSchema>;
382
+ //#endregion
383
+ export { VersionRange as A, PostInstallDescriptorSchema as C, VersionCommandSchema as D, VersionCommand as E, isUniversalRange as M, versionSatisfies as N, VersionLiteral as O, PostInstallDescriptor as S, SignedBinaryBucketInstallDescriptorSchema as T, LogSourceDefinitionSchema as _, ClientDefinitionSchema as a, NpmInstallDescriptor as b, ClientRuntimeCapabilities as c, ClientToolCapabilityAnnotationSchema as d, ClientToolDefinition as f, LogSourceDefinition as g, ConfigIsolationSchema as h, ClientDefinitionInput as i, VersionRangeSchema as j, VersionLiteralSchema as k, ClientRuntimeCapabilitiesSchema as l, ConfigIsolation as m, ClientBinaryCompatibilitySchema as n, ClientHookEventDeclaration as o, ClientToolDefinitionSchema as p, ClientDefinition as r, ClientHookEventDeclarationSchema as s, ClientBinaryCompatibility as t, ClientToolCapabilityAnnotation as u, ManagedInstallDescriptor as v, SignedBinaryBucketInstallDescriptor as w, NpmInstallDescriptorSchema as x, ManagedInstallDescriptorSchema as y };
@@ -0,0 +1,60 @@
1
+ import { l as SurfaceBindingRegistration } from "./schemas-wg_6PAdV.mjs";
2
+
3
+ //#region core/contracts/src/materialization/definition.d.ts
4
+ /**
5
+ * A surface binding definition with a serializable registration record.
6
+ *
7
+ * Created by {@link defineSurfaceBinding}. The definition retains the original
8
+ * options and produces a bus-transportable {@link SurfaceBindingRegistration}
9
+ * via `toRegistration()`.
10
+ *
11
+ * The interface is intentionally opaque: only `id` is exposed directly so
12
+ * that callers have a stable, lightweight handle. All other properties are
13
+ * accessible exclusively through `toRegistration()`, keeping the contract
14
+ * aligned with the bus registration shape.
15
+ */
16
+ interface SurfaceBindingDefinition {
17
+ /** Stable identifier for this surface binding (e.g. `'github.status.field'`). */
18
+ readonly id: string;
19
+ /**
20
+ * Produces a serializable registration record suitable for bus transport.
21
+ * @returns A {@link SurfaceBindingRegistration} snapshot with `target`
22
+ * deep-cloned and all array fields copied to prevent shared-reference
23
+ * mutation.
24
+ */
25
+ readonly toRegistration: () => SurfaceBindingRegistration;
26
+ }
27
+ /**
28
+ * Options for {@link defineSurfaceBinding}.
29
+ *
30
+ * Structurally identical to {@link SurfaceBindingRegistration} — every field
31
+ * is included in the serializable registration output.
32
+ */
33
+ type DefineSurfaceBindingOptions = SurfaceBindingRegistration;
34
+ /**
35
+ * Creates a surface binding definition with a serializable registration.
36
+ *
37
+ * The returned definition exposes the `id` identifier directly and produces
38
+ * a bus-transportable {@link SurfaceBindingRegistration} via `toRegistration()`.
39
+ * The `target` object is deep-cloned via `structuredClone` (consistent with
40
+ * how {@link SurfaceBindingRegistry} clones at storage boundaries), and array
41
+ * fields (`appliesTo`) are defensively copied so callers cannot mutate the
42
+ * registration snapshot.
43
+ * @param options - Surface binding registration options including provider,
44
+ * namespace, target, and entity classes the binding applies to.
45
+ * @returns A {@link SurfaceBindingDefinition} with a `toRegistration` method.
46
+ * @example
47
+ * ```ts
48
+ * export const githubStatusFieldBinding = defineSurfaceBinding({
49
+ * id: 'github.status.field',
50
+ * provider: 'github',
51
+ * namespace: 'status',
52
+ * target: { kind: 'field', name: 'Status' },
53
+ * appliesTo: ['workpiece'],
54
+ * valueMapping: { pending: 'In Progress', completed: 'Done' },
55
+ * });
56
+ * ```
57
+ */
58
+ declare function defineSurfaceBinding(options: DefineSurfaceBindingOptions): SurfaceBindingDefinition;
59
+ //#endregion
60
+ export { defineSurfaceBinding as n, SurfaceBindingDefinition as t };
@@ -0,0 +1 @@
1
+ import{i as e,t}from"./visibility-Cb62p9bv.mjs";import{z as n}from"zod";const r=n.enum([`anthropic`,`openai`]),i=n.object({anthropic:n.string().url(),openai:n.string().url()}).partial().refine(e=>Object.keys(e).length>0,{message:`At least one protocol endpoint must be specified`}),a=n.object({id:n.string().min(1),name:n.string().min(1),description:n.string().optional(),endpoints:i.optional(),defaultModel:n.string().optional(),fastModel:n.string().optional(),primaryTestModel:n.string().optional(),secondaryTestModel:n.string().optional(),availableModels:n.array(e).default([]),defaultModelFilterMode:t.optional(),credentialEnvVars:n.record(n.string(),n.string()).optional()});export{r as n,a as r,i as t};
@@ -0,0 +1,158 @@
1
+ import { z } from "zod";
2
+
3
+ //#region core/contracts/src/provider/definition.d.ts
4
+ /**
5
+ * Wire protocol identifiers supported by Makaio adapters.
6
+ *
7
+ * Each value corresponds to an inference wire protocol:
8
+ * - `'anthropic'` — Anthropic Messages API (streaming via SSE)
9
+ * - `'openai'` — OpenAI Chat Completions API (streaming via SSE)
10
+ */
11
+ declare const ProtocolIdSchema: z.ZodEnum<{
12
+ anthropic: "anthropic";
13
+ openai: "openai";
14
+ }>;
15
+ /**
16
+ * Inferred union type for supported wire protocols.
17
+ */
18
+ type ProtocolId = z.infer<typeof ProtocolIdSchema>;
19
+ /**
20
+ * Maps wire protocol identifiers to their base endpoint URLs.
21
+ *
22
+ * A provider may support multiple protocols simultaneously — for example,
23
+ * Z.AI exposes both an Anthropic-compatible and an OpenAI-compatible endpoint.
24
+ * Omit a protocol key when the provider does not support it.
25
+ * @example Z.AI dual-protocol provider
26
+ * ```ts
27
+ * {
28
+ * anthropic: 'https://api.z.ai/v1/anthropic',
29
+ * openai: 'https://api.z.ai/v1/openai',
30
+ * }
31
+ * ```
32
+ */
33
+ declare const ProtocolEndpointsSchema: z.ZodObject<{
34
+ anthropic: z.ZodOptional<z.ZodString>;
35
+ openai: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strip>;
37
+ /**
38
+ * Inferred type for a protocol-to-endpoint mapping.
39
+ */
40
+ type ProtocolEndpoints = z.infer<typeof ProtocolEndpointsSchema>;
41
+ /**
42
+ * Provider definition schema.
43
+ *
44
+ * The canonical parsed provider contract. Defines the stable identity,
45
+ * display metadata, protocol endpoints, runtime-populated model catalog, and
46
+ * credential environment variables for a single inference provider.
47
+ *
48
+ * Static provider packages should declare {@link ProviderDefinitionInput}:
49
+ * they describe what a provider *is*, not how it is configured at runtime.
50
+ * The runtime layer (storage, sync service, model registry) derives parsed
51
+ * provider definitions and per-user provider records from those declarations.
52
+ *
53
+ * Providers that do not communicate over a network (e.g., GitHub Copilot,
54
+ * which uses its own SDK transport) omit `endpoints`.
55
+ * @example Anthropic provider definition
56
+ * ```ts
57
+ * {
58
+ * id: 'anthropic',
59
+ * name: 'Anthropic',
60
+ * description: 'Official Anthropic Claude API',
61
+ * endpoints: { anthropic: 'https://api.anthropic.com' },
62
+ * defaultModel: 'claude-sonnet-4-5',
63
+ * fastModel: 'claude-haiku-4-5',
64
+ * credentialEnvVars: { apiKey: 'ANTHROPIC_API_KEY' },
65
+ * }
66
+ * ```
67
+ * `availableModels` is omitted — the registry service populates it from the
68
+ * YAML lab registry at boot time and defaults to `[]` when absent.
69
+ */
70
+ declare const ProviderDefinitionSchema: z.ZodObject<{
71
+ id: z.ZodString;
72
+ name: z.ZodString;
73
+ description: z.ZodOptional<z.ZodString>;
74
+ endpoints: z.ZodOptional<z.ZodObject<{
75
+ anthropic: z.ZodOptional<z.ZodString>;
76
+ openai: z.ZodOptional<z.ZodString>;
77
+ }, z.core.$strip>>;
78
+ defaultModel: z.ZodOptional<z.ZodString>;
79
+ fastModel: z.ZodOptional<z.ZodString>;
80
+ primaryTestModel: z.ZodOptional<z.ZodString>;
81
+ secondaryTestModel: z.ZodOptional<z.ZodString>;
82
+ availableModels: z.ZodDefault<z.ZodArray<z.ZodObject<{
83
+ name: z.ZodString;
84
+ friendlyName: z.ZodOptional<z.ZodString>;
85
+ family: z.ZodOptional<z.ZodString>;
86
+ contextWindowSize: z.ZodNumber;
87
+ labId: z.ZodString;
88
+ supportedReasoningLevels: z.ZodOptional<z.ZodObject<{
89
+ none: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
90
+ low: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
91
+ medium: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
92
+ high: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
93
+ 'extra-high': z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
94
+ }, z.core.$strip>>;
95
+ metadata: z.ZodOptional<z.ZodObject<{
96
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
97
+ capabilities: z.ZodOptional<z.ZodObject<{
98
+ vision: z.ZodOptional<z.ZodBoolean>;
99
+ toolCalling: z.ZodOptional<z.ZodBoolean>;
100
+ parallelToolCalls: z.ZodOptional<z.ZodBoolean>;
101
+ structuredOutput: z.ZodOptional<z.ZodBoolean>;
102
+ pdfUpload: z.ZodOptional<z.ZodBoolean>;
103
+ speechToText: z.ZodOptional<z.ZodObject<{
104
+ modes: z.ZodArray<z.ZodEnum<{
105
+ batch: "batch";
106
+ streaming: "streaming";
107
+ }>>;
108
+ vocabularyBiasing: z.ZodOptional<z.ZodBoolean>;
109
+ }, z.core.$strip>>;
110
+ textToSpeech: z.ZodOptional<z.ZodObject<{
111
+ modes: z.ZodArray<z.ZodEnum<{
112
+ streaming: "streaming";
113
+ buffered: "buffered";
114
+ }>>;
115
+ voiceSelection: z.ZodOptional<z.ZodBoolean>;
116
+ voiceInstructions: z.ZodOptional<z.ZodBoolean>;
117
+ outputFormats: z.ZodOptional<z.ZodArray<z.ZodString>>;
118
+ }, z.core.$strip>>;
119
+ }, z.core.$strip>>;
120
+ pricing: z.ZodOptional<z.ZodObject<{
121
+ token: z.ZodOptional<z.ZodObject<{
122
+ inputPerMillion: z.ZodNumber;
123
+ inputCachedPerMillion: z.ZodOptional<z.ZodNumber>;
124
+ cacheWritePerMillion: z.ZodOptional<z.ZodNumber>;
125
+ outputPerMillion: z.ZodNumber;
126
+ }, z.core.$strip>>;
127
+ request: z.ZodOptional<z.ZodObject<{
128
+ multiplier: z.ZodNumber;
129
+ }, z.core.$strip>>;
130
+ }, z.core.$strip>>;
131
+ includedInSubscription: z.ZodOptional<z.ZodBoolean>;
132
+ description: z.ZodOptional<z.ZodString>;
133
+ }, z.core.$strip>>;
134
+ }, z.core.$strip>>>;
135
+ defaultModelFilterMode: z.ZodOptional<z.ZodEnum<{
136
+ allowlist: "allowlist";
137
+ "show-all": "show-all";
138
+ }>>;
139
+ credentialEnvVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
140
+ }, z.core.$strip>;
141
+ /**
142
+ * Inferred output type for a fully-parsed provider definition.
143
+ *
144
+ * Fields with `.default()` (e.g., `availableModels`) are always present here.
145
+ * Use this type for runtime consumers that read provider definition values.
146
+ */
147
+ type ProviderDefinition = z.infer<typeof ProviderDefinitionSchema>;
148
+ /**
149
+ * Input type for provider definition declarations.
150
+ *
151
+ * Fields with `.default()` (e.g., `availableModels`) are optional here —
152
+ * the registry service populates them from YAML at boot time.
153
+ * Use this type when declaring a static `providerDefinition` constant in a
154
+ * provider package so that `availableModels` may be omitted.
155
+ */
156
+ type ProviderDefinitionInput = z.input<typeof ProviderDefinitionSchema>;
157
+ //#endregion
158
+ export { ProviderDefinition as a, ProtocolIdSchema as i, ProtocolEndpointsSchema as n, ProviderDefinitionInput as o, ProtocolId as r, ProviderDefinitionSchema as s, ProtocolEndpoints as t };
@@ -0,0 +1 @@
1
+ import{and as e,eq as t,getTableColumns as n,inArray as r,sql as i}from"drizzle-orm";import{didAffectRows as a}from"@makaio/framework/storage/drizzle";function o(e,t){return{[e]:t}}function s(e,t,r){let i=n(e);if(!r)return i[t];let a=r(e);if(a.length===0)throw Error(`createDrizzleCrudHandlers: conflictTarget returned an empty array. Provide at least one column for the conflict target.`);return a}function c(e,r,i){let{table:a,idField:s,singularKey:c,mapper:l,getSubject:u}=i;return e.on(u,async e=>{let{id:i}=e.payload,u=n(a)[s],[d]=await r.select().from(a).where(t(u,i)).limit(1);e.setResult(o(c,d?l(d):null))})}function l(e,r,a){let{table:o,idField:s,singularKey:c,mapper:l,toDbValues:u,setSubject:d,resolvedConflictTarget:f,lifecycle:p}=a;return e.on(d,async a=>{let d=a.payload[c],m=d[s],h=Date.now(),g=n(o),_=u(d),v={..._,[s]:m,createdAt:h,updatedAt:h};if(!p){await r.insert(o).values(v).onConflictDoUpdate({target:f,set:{..._,[s]:m,updatedAt:h,createdAt:i`COALESCE(${g.createdAt}, excluded.created_at)`}}),a.setResult({id:m});return}let y=await r.insert(o).values(v).onConflictDoNothing({target:f}).returning();if(y.length>0){await e.emit(p.created,l(y[0])),a.setResult({id:m});return}let[b]=await r.update(o).set({..._,updatedAt:h}).where(t(g[s],m)).returning();b&&await e.emit(p.updated,l(b)),a.setResult({id:m})})}function u(e,r,i){let{table:o,idField:s,deleteSubject:c}=i;return e.on(c,async e=>{let{id:i}=e.payload,c=n(o)[s],l=await r.delete(o).where(t(c,i));e.setResult({deleted:a(l)})})}function d(e,r,i){let{table:a,idField:o,singularKey:s,getSubject:c,deleteSubject:l,lifecycle:u}=i;return e.on(l,async i=>{let{id:l}=i.payload,d=n(a)[o],[f]=await r.select({id:d}).from(a).where(t(d,l)).limit(1);await i.next(),f&&((await e.request(c,{id:l}))[s]||await e.emit(u.deleted,{id:l}))})}function f(e){if(e.conflictTarget&&e.lifecycle)throw Error(`createDrizzleCrudHandlers: conflictTarget is not yet compatible with lifecycle events. The lifecycle path uses a PK-based UPDATE fallback that cannot resolve rows by natural key.`);let{table:t,subjects:n,idField:r,singularKey:i,mapper:a,toDbValues:o,conflictTarget:f,lifecycle:p}=e,m=s(t,r,f);return(e,s)=>{let f=[];return f.push(c(e,s,{table:t,idField:r,singularKey:i,mapper:a,getSubject:n.get})),f.push(l(e,s,{table:t,idField:r,singularKey:i,mapper:a,toDbValues:o,setSubject:n.set,resolvedConflictTarget:m,lifecycle:p})),p&&f.push(d(e,s,{table:t,idField:r,singularKey:i,getSubject:n.get,deleteSubject:n.delete,lifecycle:p})),f.push(u(e,s,{table:t,idField:r,deleteSubject:n.delete})),()=>f.forEach(e=>e())}}function p(t){let{table:n,subject:r,pluralKey:i,mapper:a,buildPredicates:o}=t;return(t,s)=>{let c=(e,t)=>({[e]:t});return t.on(r,async t=>{let r=o(t.payload,n),l=r.length>0?e(...r):void 0,u=l?await s.select().from(n).where(l):await s.select().from(n);t.setResult(c(i,u.map(a)))})}}function m(e,n){return n?[r(e.scope,[`default`,n])]:[t(e.scope,`default`)]}export{p as n,f as r,m as t};