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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (409) hide show
  1. package/LICENSE +1 -1
  2. package/package.json +59 -2
  3. package/dist/account-identity-Ce1Bwrqi.mjs +0 -1
  4. package/dist/adapter-CbyjCE2d.mjs +0 -1
  5. package/dist/adapters/acp-client/index.d.mts +0 -209
  6. package/dist/adapters/acp-client/index.mjs +0 -1
  7. package/dist/adapters/config/index.d.mts +0 -429
  8. package/dist/adapters/config/index.mjs +0 -1
  9. package/dist/adapters/index.d.mts +0 -4175
  10. package/dist/adapters/index.mjs +0 -11
  11. package/dist/adapters/node.d.mts +0 -263
  12. package/dist/adapters/node.mjs +0 -4
  13. package/dist/adapters/stream-session/index.d.mts +0 -1384
  14. package/dist/adapters/stream-session/index.mjs +0 -1
  15. package/dist/adapters/stream-session/testing/index.d.mts +0 -29
  16. package/dist/adapters/stream-session/testing/index.mjs +0 -1
  17. package/dist/base-orchestrator-9z8TuA5a.d.mts +0 -772
  18. package/dist/bus/index.d.mts +0 -3331
  19. package/dist/bus/index.mjs +0 -1
  20. package/dist/bus-B1seC4M_.mjs +0 -2
  21. package/dist/capability-service-tnpR_TaB.mjs +0 -1
  22. package/dist/chunk-Dc06z0qk.mjs +0 -1
  23. package/dist/chunk-cpUYaJdV.mjs +0 -1
  24. package/dist/cleanEnvForAdapter-DvcIGXTG.mjs +0 -1
  25. package/dist/client-Dh4x4GQN.mjs +0 -1
  26. package/dist/clients/index.d.mts +0 -2786
  27. package/dist/clients/index.mjs +0 -1
  28. package/dist/clients-namespace-B0xAPZ6J.d.mts +0 -332
  29. package/dist/config-namespace-DLSs83zr.d.mts +0 -638
  30. package/dist/config-namespace-MJT8P0Ud.mjs +0 -1
  31. package/dist/contracts/adapter/index.d.mts +0 -3
  32. package/dist/contracts/adapter/index.mjs +0 -1
  33. package/dist/contracts/adapter/schemas/session-lineage.d.mts +0 -2
  34. package/dist/contracts/adapter/schemas/session-lineage.mjs +0 -1
  35. package/dist/contracts/client/index.d.mts +0 -3
  36. package/dist/contracts/client/index.mjs +0 -1
  37. package/dist/contracts/common/index.d.mts +0 -2
  38. package/dist/contracts/common/index.mjs +0 -1
  39. package/dist/contracts/config/index.d.mts +0 -455
  40. package/dist/contracts/config/index.mjs +0 -1
  41. package/dist/contracts/extension/index.d.mts +0 -3
  42. package/dist/contracts/extension/index.mjs +0 -1
  43. package/dist/contracts/harness/index.d.mts +0 -2
  44. package/dist/contracts/harness/index.mjs +0 -1
  45. package/dist/contracts/host/index.d.mts +0 -2
  46. package/dist/contracts/host/index.mjs +0 -1
  47. package/dist/contracts/index.d.mts +0 -12665
  48. package/dist/contracts/index.mjs +0 -1
  49. package/dist/contracts/model-registry/index.d.mts +0 -2
  50. package/dist/contracts/model-registry/index.mjs +0 -1
  51. package/dist/contracts/native-session-supervisor/index.d.mts +0 -2
  52. package/dist/contracts/native-session-supervisor/index.mjs +0 -1
  53. package/dist/contracts/platform/index.d.mts +0 -2
  54. package/dist/contracts/platform/index.mjs +0 -1
  55. package/dist/contracts/provider/index.d.mts +0 -3
  56. package/dist/contracts/provider/index.mjs +0 -1
  57. package/dist/contracts/session/index.d.mts +0 -3
  58. package/dist/contracts/session/index.mjs +0 -1
  59. package/dist/contracts/shared/index.d.mts +0 -2
  60. package/dist/contracts/shared/index.mjs +0 -1
  61. package/dist/contracts/skill/index.d.mts +0 -2
  62. package/dist/contracts/skill/index.mjs +0 -1
  63. package/dist/contracts/toast/index.d.mts +0 -198
  64. package/dist/contracts/toast/index.mjs +0 -1
  65. package/dist/contracts/variant/index.d.mts +0 -2
  66. package/dist/contracts/variant/index.mjs +0 -1
  67. package/dist/core/index.d.mts +0 -1001
  68. package/dist/core/index.mjs +0 -1
  69. package/dist/credential-ref-DLCsoKVZ.mjs +0 -1
  70. package/dist/cursor-storage-DOQdvo9j.mjs +0 -1
  71. package/dist/definition-DkYy1PZz.mjs +0 -1
  72. package/dist/definition-DtUNiGom.d.mts +0 -158
  73. package/dist/definition-DxvZ9e22.d.mts +0 -376
  74. package/dist/drizzle-CWVVw7Er.mjs +0 -1
  75. package/dist/execution-target-BW_uiBVe.mjs +0 -1
  76. package/dist/extension-COqwS-2Q.mjs +0 -1
  77. package/dist/extension-Cbrl4YGX.mjs +0 -1
  78. package/dist/extension-namespace-zaGKi6Qj.mjs +0 -1
  79. package/dist/handlers-iGKUJ380.mjs +0 -41
  80. package/dist/harness-CEq1Zkf9.mjs +0 -1
  81. package/dist/hooks/index.d.mts +0 -423
  82. package/dist/hooks/index.mjs +0 -1
  83. package/dist/host-CXAUGGN0.mjs +0 -1
  84. package/dist/identity-B_A0mE63.mjs +0 -1
  85. package/dist/index-6lyShOoU.d.mts +0 -225
  86. package/dist/index-7sXlairn2.d.mts +0 -43
  87. package/dist/index-BAKM2GMH2.d.mts +0 -535
  88. package/dist/index-BB419vv-.d.mts +0 -3897
  89. package/dist/index-BJOfdtbw.d.mts +0 -729
  90. package/dist/index-BXP9GK5q.d.mts +0 -1075
  91. package/dist/index-BdPwu6c0.d.mts +0 -1730
  92. package/dist/index-BePI0ckL.d.mts +0 -40
  93. package/dist/index-Bigx81Kr.d.mts +0 -37
  94. package/dist/index-BnNqbx2I.d.mts +0 -134
  95. package/dist/index-Bv15sNLn.d.mts +0 -389
  96. package/dist/index-C-myW_aK.d.mts +0 -412
  97. package/dist/index-C9F3Fc1A.d.mts +0 -2938
  98. package/dist/index-CNxS4Tlu.d.mts +0 -1
  99. package/dist/index-CVA0m1g9.d.mts +0 -995
  100. package/dist/index-C_kS2aqV2.d.mts +0 -438
  101. package/dist/index-Ch3ph52M2.d.mts +0 -40
  102. package/dist/index-CnZOKNjU.d.mts +0 -89
  103. package/dist/index-D1T-PPqF.d.mts +0 -67
  104. package/dist/index-D7T8XCku.d.mts +0 -341
  105. package/dist/index-DBQtpFLE.d.mts +0 -4843
  106. package/dist/index-DEw90pa2.d.mts +0 -183
  107. package/dist/index-DQRsGXb5.d.mts +0 -109
  108. package/dist/index-Dd5s4MSm.d.mts +0 -72
  109. package/dist/index-DubqLGH8.d.mts +0 -1002
  110. package/dist/index-ESSDWIB7.d.mts +0 -11
  111. package/dist/index-N5K1NOYs.d.mts +0 -184
  112. package/dist/index-PdUSmPT2.d.mts +0 -180
  113. package/dist/index-SzSiyG61.d.mts +0 -117
  114. package/dist/index-T0471kWA.d.mts +0 -6760
  115. package/dist/index-WKjrpcA_.d.mts +0 -218
  116. package/dist/index-hapw9_En.d.mts +0 -13592
  117. package/dist/index-iID2R9G1.d.mts +0 -1490
  118. package/dist/kernel/cli/index.d.mts +0 -141
  119. package/dist/kernel/cli/index.mjs +0 -1
  120. package/dist/kernel/cli/schemas.d.mts +0 -63
  121. package/dist/kernel/cli/schemas.mjs +0 -1
  122. package/dist/kernel/extension/index.d.mts +0 -2
  123. package/dist/kernel/extension/index.mjs +0 -1
  124. package/dist/kernel/index.d.mts +0 -296
  125. package/dist/kernel/index.mjs +0 -1
  126. package/dist/kernel/namespace/index.d.mts +0 -2
  127. package/dist/kernel/namespace/index.mjs +0 -1
  128. package/dist/kernel/observability/index.d.mts +0 -2
  129. package/dist/kernel/observability/index.mjs +0 -1
  130. package/dist/kernel/providers/index.d.mts +0 -2
  131. package/dist/kernel/providers/index.mjs +0 -1
  132. package/dist/kernel/window/index.d.mts +0 -2
  133. package/dist/kernel/window/index.mjs +0 -1
  134. package/dist/model-registry-BNzpR6TU.mjs +0 -1
  135. package/dist/model-registry-CIscwC52.mjs +0 -1
  136. package/dist/namespace-0yuzAKlr.mjs +0 -1
  137. package/dist/namespace-8cNguvIp.mjs +0 -1
  138. package/dist/namespace-BK2erxpV.d.mts +0 -921
  139. package/dist/namespace-Bmc7AW4J2.mjs +0 -1
  140. package/dist/namespace-C2ufjgaQ.d.mts +0 -767
  141. package/dist/namespace-C54Oj025.d.mts +0 -159
  142. package/dist/namespace-CCDEOwmW.d.mts +0 -1313
  143. package/dist/namespace-CfEWMXBx.mjs +0 -1
  144. package/dist/namespace-CkLUtc0g.d.mts +0 -580
  145. package/dist/namespace-D5Wrt7YU.mjs +0 -1
  146. package/dist/namespace-DZcuLwEA.d.mts +0 -51
  147. package/dist/namespace-Db-p67Rg.mjs +0 -1
  148. package/dist/namespace-FWx6HxaW.d.mts +0 -611
  149. package/dist/namespace-GLGGcWPH.d.mts +0 -43
  150. package/dist/namespace-N0dfwSg6.mjs +0 -1
  151. package/dist/namespace-O5SNY-LV.d.mts +0 -2226
  152. package/dist/namespace-ZbthBQVt.d.mts +0 -142
  153. package/dist/namespace-bq4Prtzn.d.mts +0 -2046
  154. package/dist/namespace-pNcSglBS.mjs +0 -1
  155. package/dist/namespace-ptv-pw_g.d.mts +0 -3019
  156. package/dist/namespace-xkvVw3hf2.d.mts +0 -189
  157. package/dist/native-session-supervisor-L-UIaEfd.mjs +0 -1
  158. package/dist/node/bus-server/index.d.mts +0 -178
  159. package/dist/node/bus-server/index.mjs +0 -1
  160. package/dist/node/bus-server/server-lifecycle.d.mts +0 -2
  161. package/dist/node/bus-server/server-lifecycle.mjs +0 -1
  162. package/dist/node/machine-identity/index.d.mts +0 -85
  163. package/dist/node/machine-identity/index.mjs +0 -3
  164. package/dist/node/transports/index.d.mts +0 -1752
  165. package/dist/node/transports/index.mjs +0 -2
  166. package/dist/orchestrator-shared-DrjtTXYh.d.mts +0 -249
  167. package/dist/orchestrator-shared-Wv1GI2mW.mjs +0 -1
  168. package/dist/platform-BbSLVg5b.mjs +0 -1
  169. package/dist/profile-4StaDQW0.mjs +0 -1
  170. package/dist/provider-context-CNRQ4d5m.mjs +0 -1
  171. package/dist/providers/index.d.mts +0 -135
  172. package/dist/providers/index.mjs +0 -1
  173. package/dist/providers-Cr4Za8a1.mjs +0 -1
  174. package/dist/providers-namespace-CDwxY_DV.d.mts +0 -583
  175. package/dist/schema-BwzXEtT2.d.mts +0 -837
  176. package/dist/schema-CAw_BqaG.mjs +0 -1
  177. package/dist/schema-introspection-D61TT_7b.mjs +0 -1
  178. package/dist/schema-uSGW-6oM.mjs +0 -1
  179. package/dist/schemas-BXstpWVp.mjs +0 -1
  180. package/dist/schemas-BdMU-gew.d.mts +0 -160
  181. package/dist/schemas-C40ZAJ33.mjs +0 -1
  182. package/dist/schemas-C5xtVqdb.d.mts +0 -46
  183. package/dist/schemas-CGZy_rU6.d.mts +0 -13
  184. package/dist/schemas-CLxtoKFy.mjs +0 -1
  185. package/dist/schemas-Co_sVhzz.mjs +0 -1
  186. package/dist/schemas-D9108Iv1.d.mts +0 -182
  187. package/dist/schemas-DENVYyds.d.mts +0 -463
  188. package/dist/schemas-DbWs_hj8.d.mts +0 -174
  189. package/dist/schemas-Di0XnnMX.d.mts +0 -73
  190. package/dist/schemas-KMA1efQg.d.mts +0 -944
  191. package/dist/schemas-qmn5SWPU.d.mts +0 -312
  192. package/dist/schemas-sshQEF3l.d.mts +0 -237
  193. package/dist/server-lifecycle-Cf_SZ27k.d.mts +0 -160
  194. package/dist/server-lifecycle-DbFwlrTW.mjs +0 -1
  195. package/dist/service-base/index.d.mts +0 -98
  196. package/dist/service-base/index.mjs +0 -1
  197. package/dist/services/adapter-runtime/index.d.mts +0 -4
  198. package/dist/services/adapter-runtime/index.mjs +0 -1
  199. package/dist/services/adapter-runtime/namespace.d.mts +0 -2
  200. package/dist/services/adapter-runtime/namespace.mjs +0 -1
  201. package/dist/services/adapter-runtime/schemas.d.mts +0 -2
  202. package/dist/services/adapter-runtime/schemas.mjs +0 -1
  203. package/dist/services/adapter-subsystem/index.d.mts +0 -3
  204. package/dist/services/adapter-subsystem/index.mjs +0 -1
  205. package/dist/services/adapter-subsystem/namespace.d.mts +0 -2
  206. package/dist/services/adapter-subsystem/namespace.mjs +0 -1
  207. package/dist/services/agent-runtime/index.d.mts +0 -3
  208. package/dist/services/agent-runtime/index.mjs +0 -1
  209. package/dist/services/agent-runtime/namespace.d.mts +0 -2
  210. package/dist/services/agent-runtime/namespace.mjs +0 -1
  211. package/dist/services/agent-runtime/schemas.d.mts +0 -2
  212. package/dist/services/agent-runtime/schemas.mjs +0 -1
  213. package/dist/services/capability/index.d.mts +0 -2
  214. package/dist/services/capability/index.mjs +0 -1
  215. package/dist/services/cli-detection/namespace.d.mts +0 -56
  216. package/dist/services/cli-detection/namespace.mjs +0 -1
  217. package/dist/services/codebase/index.d.mts +0 -3
  218. package/dist/services/codebase/index.mjs +0 -1
  219. package/dist/services/codebase/namespace.d.mts +0 -2
  220. package/dist/services/codebase/namespace.mjs +0 -1
  221. package/dist/services/codebase/schemas.d.mts +0 -2
  222. package/dist/services/codebase/schemas.mjs +0 -1
  223. package/dist/services/compression/index.d.mts +0 -3
  224. package/dist/services/compression/index.mjs +0 -1
  225. package/dist/services/compression/namespace.d.mts +0 -2
  226. package/dist/services/compression/namespace.mjs +0 -1
  227. package/dist/services/compression/schemas.d.mts +0 -2
  228. package/dist/services/compression/schemas.mjs +0 -1
  229. package/dist/services/context-rules/index.d.mts +0 -412
  230. package/dist/services/context-rules/index.mjs +0 -1
  231. package/dist/services/credential-change/index.d.mts +0 -17
  232. package/dist/services/credential-change/index.mjs +0 -1
  233. package/dist/services/definition/index.d.mts +0 -2
  234. package/dist/services/definition/index.mjs +0 -1
  235. package/dist/services/definition/namespace.d.mts +0 -71
  236. package/dist/services/definition/namespace.mjs +0 -1
  237. package/dist/services/definition/schemas.d.mts +0 -38
  238. package/dist/services/definition/schemas.mjs +0 -1
  239. package/dist/services/dialog/namespace.d.mts +0 -105
  240. package/dist/services/dialog/namespace.mjs +0 -1
  241. package/dist/services/dialog/schemas.d.mts +0 -109
  242. package/dist/services/dialog/schemas.mjs +0 -1
  243. package/dist/services/execution-target/index.d.mts +0 -4
  244. package/dist/services/execution-target/index.mjs +0 -1
  245. package/dist/services/execution-target/namespace.d.mts +0 -2
  246. package/dist/services/execution-target/namespace.mjs +0 -1
  247. package/dist/services/execution-target/schemas.d.mts +0 -2
  248. package/dist/services/execution-target/schemas.mjs +0 -1
  249. package/dist/services/filesystem/namespace.d.mts +0 -432
  250. package/dist/services/filesystem/namespace.mjs +0 -1
  251. package/dist/services/filesystem/schemas.d.mts +0 -240
  252. package/dist/services/filesystem/schemas.mjs +0 -1
  253. package/dist/services/harness/index.d.mts +0 -861
  254. package/dist/services/harness/index.mjs +0 -1
  255. package/dist/services/harness/storage/schema.d.mts +0 -424
  256. package/dist/services/harness/storage/schema.mjs +0 -1
  257. package/dist/services/index.d.mts +0 -5703
  258. package/dist/services/index.mjs +0 -1
  259. package/dist/services/local-notification/index.d.mts +0 -25
  260. package/dist/services/local-notification/index.mjs +0 -1
  261. package/dist/services/local-notification/namespace.d.mts +0 -73
  262. package/dist/services/local-notification/namespace.mjs +0 -1
  263. package/dist/services/local-notification/schemas.d.mts +0 -88
  264. package/dist/services/local-notification/schemas.mjs +0 -1
  265. package/dist/services/log-import/browser.d.mts +0 -3
  266. package/dist/services/log-import/browser.mjs +0 -1
  267. package/dist/services/log-import/index.d.mts +0 -275
  268. package/dist/services/log-import/index.mjs +0 -2
  269. package/dist/services/log-import/log-import.d.mts +0 -3
  270. package/dist/services/log-import/log-import.mjs +0 -1
  271. package/dist/services/log-import/namespace.d.mts +0 -327
  272. package/dist/services/log-import/namespace.mjs +0 -1
  273. package/dist/services/log-import/schemas.d.mts +0 -217
  274. package/dist/services/log-import/schemas.mjs +0 -1
  275. package/dist/services/model-registry/index.d.mts +0 -2
  276. package/dist/services/model-registry/index.mjs +0 -1
  277. package/dist/services/preferences/index.d.mts +0 -3
  278. package/dist/services/preferences/index.mjs +0 -1
  279. package/dist/services/preferences/schemas.d.mts +0 -2
  280. package/dist/services/preferences/schemas.mjs +0 -1
  281. package/dist/services/preferences/storage-namespace.d.mts +0 -3
  282. package/dist/services/preferences/storage-namespace.mjs +0 -1
  283. package/dist/services/provider-context/index.d.mts +0 -2
  284. package/dist/services/provider-context/index.mjs +0 -1
  285. package/dist/services/provider-runtime/index.d.mts +0 -136
  286. package/dist/services/provider-runtime/index.mjs +0 -1
  287. package/dist/services/session/handlers/index.d.mts +0 -2
  288. package/dist/services/session/handlers/index.mjs +0 -1
  289. package/dist/services/session/index.d.mts +0 -10
  290. package/dist/services/session/index.mjs +0 -1
  291. package/dist/services/session/messages/namespace.d.mts +0 -2
  292. package/dist/services/session/messages/namespace.mjs +0 -1
  293. package/dist/services/session/orchestrator-testing/index.d.mts +0 -2
  294. package/dist/services/session/orchestrator-testing/index.mjs +0 -1
  295. package/dist/services/session/session-events/namespace.d.mts +0 -2
  296. package/dist/services/session/session-events/namespace.mjs +0 -1
  297. package/dist/services/session/storage/namespace.d.mts +0 -2
  298. package/dist/services/session/storage/namespace.mjs +0 -1
  299. package/dist/services/session/storage/schema.d.mts +0 -2
  300. package/dist/services/session/storage/schema.mjs +0 -1
  301. package/dist/services/session/testing/index.d.mts +0 -35
  302. package/dist/services/session/testing/index.mjs +0 -52
  303. package/dist/services/session/testing/orchestrator-shared.d.mts +0 -2
  304. package/dist/services/session/testing/orchestrator-shared.mjs +0 -1
  305. package/dist/services/session/turns/namespace.d.mts +0 -2
  306. package/dist/services/session/turns/namespace.mjs +0 -1
  307. package/dist/services/session-editor/index.d.mts +0 -119
  308. package/dist/services/session-editor/index.mjs +0 -1
  309. package/dist/services/settings/index.d.mts +0 -47
  310. package/dist/services/settings/index.mjs +0 -1
  311. package/dist/services/settings/namespace.d.mts +0 -662
  312. package/dist/services/settings/namespace.mjs +0 -1
  313. package/dist/services/settings/storage/clients-namespace.d.mts +0 -2
  314. package/dist/services/settings/storage/clients-namespace.mjs +0 -1
  315. package/dist/services/settings/storage/extension-configs/namespace.d.mts +0 -184
  316. package/dist/services/settings/storage/extension-configs/namespace.mjs +0 -1
  317. package/dist/services/settings/storage/index.d.mts +0 -4
  318. package/dist/services/settings/storage/index.mjs +0 -1
  319. package/dist/services/settings/storage/providers-namespace.d.mts +0 -2
  320. package/dist/services/settings/storage/providers-namespace.mjs +0 -1
  321. package/dist/services/tool-approval/index.d.mts +0 -2
  322. package/dist/services/tool-approval/index.mjs +0 -1
  323. package/dist/services/tools/index.d.mts +0 -2
  324. package/dist/services/tools/index.mjs +0 -1
  325. package/dist/services/tray-menu/index.d.mts +0 -4
  326. package/dist/services/tray-menu/index.mjs +0 -1
  327. package/dist/services/tray-menu/namespace.d.mts +0 -2
  328. package/dist/services/tray-menu/namespace.mjs +0 -1
  329. package/dist/services/tray-menu/schemas.d.mts +0 -2
  330. package/dist/services/tray-menu/schemas.mjs +0 -1
  331. package/dist/services/turn/index.d.mts +0 -2
  332. package/dist/services/turn/index.mjs +0 -1
  333. package/dist/services/turn/namespace.d.mts +0 -2
  334. package/dist/services/turn/namespace.mjs +0 -1
  335. package/dist/services/turn/schemas.d.mts +0 -335
  336. package/dist/services/turn/schemas.mjs +0 -1
  337. package/dist/services/worker/index.d.mts +0 -3
  338. package/dist/services/worker/index.mjs +0 -1
  339. package/dist/services/worker/namespace.d.mts +0 -2
  340. package/dist/services/worker/namespace.mjs +0 -1
  341. package/dist/services/worker/schemas.d.mts +0 -2
  342. package/dist/services/worker/schemas.mjs +0 -1
  343. package/dist/session-Do6lDZM4.mjs +0 -123
  344. package/dist/session-lineage-Eev4uo4I.d.mts +0 -65
  345. package/dist/session-piI1R5rP.mjs +0 -1
  346. package/dist/shared-DxHLl9UP.mjs +0 -1
  347. package/dist/shared-schemas-BgQv_tnu.mjs +0 -1
  348. package/dist/skill-CB5h-ZFQ.mjs +0 -1
  349. package/dist/storage/drizzle/client.d.mts +0 -78
  350. package/dist/storage/drizzle/client.mjs +0 -1
  351. package/dist/storage/drizzle/index.d.mts +0 -98
  352. package/dist/storage/drizzle/index.mjs +0 -1
  353. package/dist/storage/handlers/drizzle/index.d.mts +0 -2
  354. package/dist/storage/handlers/drizzle/index.mjs +0 -1
  355. package/dist/storage/handlers/index.d.mts +0 -33
  356. package/dist/storage/handlers/index.mjs +0 -1
  357. package/dist/storage/index.d.mts +0 -192
  358. package/dist/storage/index.mjs +0 -1
  359. package/dist/storage-namespace-ADwyijoe.mjs +0 -1
  360. package/dist/storage-namespace-DAm8iWEj.d.mts +0 -221
  361. package/dist/storage-namespace-definition-CHu2k14q.mjs +0 -1
  362. package/dist/storage-namespace-definition-CJgqyXH1.d.mts +0 -17
  363. package/dist/style.css +0 -3782
  364. package/dist/testing/drizzle-harness.d.mts +0 -130
  365. package/dist/testing/drizzle-harness.mjs +0 -1
  366. package/dist/testing/index.d.mts +0 -106
  367. package/dist/testing/index.mjs +0 -1
  368. package/dist/tool-approval-service-BcBSUZCO.mjs +0 -1
  369. package/dist/tools/index.d.mts +0 -825
  370. package/dist/tools/index.mjs +0 -1
  371. package/dist/tools/testing/index.d.mts +0 -53
  372. package/dist/tools/testing/index.mjs +0 -1
  373. package/dist/tools-CDSgj0ee.mjs +0 -1
  374. package/dist/tray-menu-service-CTXC1Elg.mjs +0 -1
  375. package/dist/types-6WxLfoM3.d.mts +0 -31
  376. package/dist/types-BjToUrHp.d.mts +0 -6619
  377. package/dist/types-CD1LJwPc.d.mts +0 -1009
  378. package/dist/types-Cvrj2ogm.d.mts +0 -305
  379. package/dist/types-DYF5LxZY.d.mts +0 -233
  380. package/dist/types-t295YC6T.d.mts +0 -262
  381. package/dist/types-vNpkAe4Y.d.mts +0 -128
  382. package/dist/ui-components/index.d.mts +0 -2342
  383. package/dist/ui-components/index.mjs +0 -8
  384. package/dist/ui-config-CXmbsqZV.mjs +0 -1
  385. package/dist/ui-hooks/index.d.mts +0 -1805
  386. package/dist/ui-hooks/index.mjs +0 -1
  387. package/dist/ui-kernel/index.d.mts +0 -2793
  388. package/dist/ui-kernel/index.mjs +0 -1
  389. package/dist/ui-kernel/pages/namespace.d.mts +0 -88
  390. package/dist/ui-kernel/pages/namespace.mjs +0 -1
  391. package/dist/ui-kernel/pages/schemas.d.mts +0 -2
  392. package/dist/ui-kernel/pages/schemas.mjs +0 -1
  393. package/dist/ui-views/index.d.mts +0 -487
  394. package/dist/ui-views/index.mjs +0 -30
  395. package/dist/utils/health-probe.d.mts +0 -26
  396. package/dist/utils/health-probe.mjs +0 -1
  397. package/dist/utils/index.d.mts +0 -227
  398. package/dist/utils/index.mjs +0 -2
  399. package/dist/utils/keychain.d.mts +0 -31
  400. package/dist/utils/keychain.mjs +0 -1
  401. package/dist/utils/resolve-package-root.d.mts +0 -12
  402. package/dist/utils/resolve-package-root.mjs +0 -1
  403. package/dist/utils/workspace-root.d.mts +0 -27
  404. package/dist/utils/workspace-root.mjs +0 -2
  405. package/dist/variant-D5kSrL3m.mjs +0 -1
  406. package/dist/version-CjS20oXi.mjs +0 -1
  407. package/dist/visibility-CZu8ooOA.mjs +0 -1
  408. package/dist/window-registry-CUftmDr3.mjs +0 -1
  409. package/dist/window-registry-C_IJmY8_.d.mts +0 -130
@@ -1,429 +0,0 @@
1
- import { g as BaseAgentConnectorConfig } from "../../types-CD1LJwPc.mjs";
2
- import { z } from "zod";
3
- import { IMakaioBus, MakaioBusContext } from "@makaio/framework/bus";
4
- import { AIModelSchema, ProtocolId, ProviderContext } from "@makaio/framework/contracts";
5
- import { BaseAdapterConfigSchema, CredentialRef, ProviderConfigSchema, ProviderDefaultsSchema } from "@makaio/framework/contracts/config";
6
- import { ClientExecutionContext } from "@makaio/framework/contracts/client";
7
- import { ProviderRecord } from "@makaio/framework/services/settings/storage";
8
- import { TimeoutConfig, TrackedTimeoutConfig } from "@makaio/framework/utils";
9
- import { ProviderConfigFileRecord } from "@makaio/framework/services/adapter-subsystem";
10
- import { Simplify } from "type-fest";
11
-
12
- //#region adapters/core/src/config/resolve-credential-ref.d.ts
13
- /**
14
- * Dependency overrides for credential resolution.
15
- */
16
- interface ResolveCredentialRefDeps {
17
- /** Read a file path for file: refs. */
18
- readFile?: (path: string) => Promise<string>;
19
- /** Read an environment variable for env: refs. */
20
- readEnv?: (name: string) => string | undefined;
21
- /** Resolve keychain credentials for keychain: refs. */
22
- resolveKeychain?: (service: string, account: string) => Promise<string | null>;
23
- }
24
- /**
25
- * Resolve a credential reference to its runtime value.
26
- *
27
- * Supported formats:
28
- * - env:VAR_NAME
29
- * - file:/path/to/secret
30
- * - keychain:service:account (requires resolveKeychain)
31
- * @param ref - Credential reference string
32
- * @param deps - Optional dependency overrides for resolution
33
- * @returns Resolved credential value or null if not found
34
- */
35
- declare function resolveCredentialRef(ref: CredentialRef, deps?: ResolveCredentialRefDeps): Promise<string | null>;
36
- //#endregion
37
- //#region adapters/core/src/config/preset.d.ts
38
- /**
39
- * Resolve a provider definition by ID and require a concrete `defaultModel`.
40
- * @param definitions - Available provider definitions for an adapter.
41
- * @param definitionId - Provider definition identifier to resolve.
42
- * @returns The matching definition with a guaranteed `defaultModel`.
43
- * @throws Error when the definition does not exist or does not define `defaultModel`.
44
- */
45
- declare function getDefinitionOrThrow<TDefinition extends {
46
- id: string;
47
- defaultModel?: string;
48
- }>(definitions: TDefinition[], definitionId: string): TDefinition & {
49
- defaultModel: string;
50
- };
51
- //#endregion
52
- //#region adapters/core/src/config/schemas.d.ts
53
- /**
54
- * Base schema for adapter provider configuration.
55
- *
56
- * Adapters extend this schema to add provider-specific fields.
57
- * All fields use `.describe()` to provide UI hints for form generation.
58
- *
59
- * This schema is intentionally empty - it serves as a type marker.
60
- * Adapters define their own providerSettings fields.
61
- * @example
62
- * ```typescript
63
- * // In adapter definition:
64
- * const MyProviderSettingsSchema = BaseProviderSettingsSchema.extend({
65
- * apiKey: z.string().describe('API key for authentication'),
66
- * baseUrl: z.string().url().optional().describe('Custom API endpoint'),
67
- * });
68
- * ```
69
- */
70
- declare const BaseProviderConfigSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
71
- //#endregion
72
- //#region adapters/core/src/config/types.d.ts
73
- /**
74
- * Base provider configuration type.
75
- * Adapters extend this for their provider-specific fields.
76
- */
77
- type BaseProviderConfig = z.infer<typeof BaseProviderConfigSchema>;
78
- /**
79
- * AI model information type.
80
- */
81
- type AIModel = z.infer<typeof AIModelSchema>;
82
- /**
83
- * Provider defaults configuration type.
84
- */
85
- type ProviderDefaults = z.infer<typeof ProviderDefaultsSchema>;
86
- /**
87
- * Configuration for a single adapter provider.
88
- */
89
- type ProviderConfig = z.infer<typeof ProviderConfigSchema>;
90
- /**
91
- * Adapter configuration file structure.
92
- * Stored at `~/.makaio/adapters/<adapterName>/config.json`.
93
- */
94
- type BaseAdapterConfig = z.infer<typeof BaseAdapterConfigSchema>;
95
- //#endregion
96
- //#region adapters/core/src/config/factory.d.ts
97
- /**
98
- * Adapter-level defaults that can be set by the factory.
99
- * Generic over TConfig to get type-safe providerConfig.
100
- * Excludes runtime fields (agentId, sessionId, adapterName).
101
- * All fields optional — model comes from provider config at runtime.
102
- */
103
- type AdapterDefaults<TConfig extends BaseAgentConnectorConfig = BaseAgentConnectorConfig> = Partial<Omit<TConfig, 'agentId' | 'sessionId' | 'adapterName' | 'bus'>>;
104
- /**
105
- * Options for creating an adapter config factory.
106
- * Captures the adapter-specific constants needed to resolve config.
107
- * @typeParam TConfig - The adapter's full config type for type-safe defaults
108
- */
109
- interface CreateAdapterConfigFactoryOptions<TConfig extends BaseAgentConnectorConfig> {
110
- /** Adapter type name (e.g., 'claude-code', 'gemini-sdk') */
111
- adapterName: string;
112
- /** Adapter-level defaults (model required, others optional including providerConfig) */
113
- adapterDefaults: AdapterDefaults<TConfig>;
114
- /**
115
- * Optional Zod schema for provider config validation.
116
- * Currently unused — pass `null`. Retained as an extension point for
117
- * future runtime validation of merged provider config shapes.
118
- */
119
- schema: z.ZodObject<z.ZodRawShape> | null;
120
- /** Adapter definition containing defaultTimeouts */
121
- adapterDefinition: {
122
- defaultTimeouts?: TimeoutConfig;
123
- };
124
- /** Wire protocol used to select the correct provider endpoint URL from endpointOverrides. */
125
- protocol: ProtocolId;
126
- }
127
- /**
128
- * Minimal input shape required by the factory.
129
- * Adapters pass their full ConfigFactoryInput which extends this.
130
- */
131
- interface AdapterConfigFactoryInput<TConfig extends BaseAgentConnectorConfig> {
132
- bus: TConfig extends BaseAgentConnectorConfig<infer TBus> ? TBus : never;
133
- agentId: string;
134
- adapterName: string;
135
- adapterId: string;
136
- /**
137
- * Unresolved provider context (credential refs, not plaintext).
138
- * Connectors resolve credentials locally via `resolveConnectorCredentials()`.
139
- */
140
- providerContext: ProviderContext;
141
- model?: string;
142
- cwd?: string;
143
- env?: Record<string, string>;
144
- providerConfig?: Partial<TConfig['providerConfig']>;
145
- runtimeTimeouts?: TimeoutConfig;
146
- }
147
- /**
148
- * Fields guaranteed by the factory (overrides any optional versions from input).
149
- */
150
- interface FactoryGuaranteedFields<TProviderConfig> {
151
- adapterName: string;
152
- model: string;
153
- cwd: string;
154
- timeouts: TrackedTimeoutConfig;
155
- providerConfig: TProviderConfig;
156
- }
157
- /**
158
- * Result type: input + adapter defaults + guaranteed fields.
159
- * Simplify flattens the intersection for better type display.
160
- */
161
- type ConfigFactoryResult<TInput extends AdapterConfigFactoryInput<TConfig>, TConfig extends BaseAgentConnectorConfig, TProviderConfig = TConfig['providerConfig']> = Simplify<AdapterDefaults<TConfig> & Omit<TInput, 'providerConfig'> & FactoryGuaranteedFields<TProviderConfig>>;
162
- type AdapterConfigFactory<TConfig extends BaseAgentConnectorConfig, TProviderConfig> = {
163
- getConfig: <TInput extends AdapterConfigFactoryInput<TConfig>>(input: TInput) => Promise<ConfigFactoryResult<TInput, TConfig, TProviderConfig>>; /** Lazily evaluate the thunk and return adapter defaults (model, fastModel, etc.) */
164
- getDefaults: () => AdapterDefaults<TConfig>;
165
- };
166
- /**
167
- * Create a standardized adapter config factory.
168
- *
169
- * Eliminates ceremony by encapsulating the common pattern:
170
- * 1. Read unresolved providerContext (credential refs only — no plaintext on the bus)
171
- * 2. resolveTimeouts with adapter + runtime layers
172
- * 3. Merge providerConfigDefaults with runtime providerConfig (credentials resolved by connector)
173
- *
174
- * The factory is pure: it does not dispatch any bus requests and does not
175
- * resolve credentials. Connectors call `resolveConnectorCredentials()` locally.
176
- *
177
- * Options are provided via thunk to enable lazy evaluation, avoiding circular
178
- * dependency issues when config.ts imports from index.ts (for adapterDefinition)
179
- * and adapter.ts (for adapterName).
180
- * @param optionsThunk - Thunk returning factory configuration options
181
- * @returns Factory with getConfig method
182
- * @example
183
- * ```typescript
184
- * export const GeminiSdkConfig = createAdapterConfigFactory<GeminiConnectorConfig>(() => ({
185
- * adapterName: GeminiSdkAdapterName,
186
- * adapterDefaults: { model: 'gemini-2.5-pro' },
187
- * schema: null,
188
- * adapterDefinition: { defaultTimeouts: DEFAULT_TIMEOUTS },
189
- * protocol: 'openai',
190
- * }));
191
- * ```
192
- */
193
- declare function createAdapterConfigFactory<TConfig extends BaseAgentConnectorConfig, TProviderConfig = TConfig['providerConfig']>(optionsThunk: () => CreateAdapterConfigFactoryOptions<TConfig>): AdapterConfigFactory<TConfig, TProviderConfig>;
194
- //#endregion
195
- //#region adapters/core/src/config/resolve-provider-endpoint.d.ts
196
- /**
197
- * Resolved HTTP endpoint credentials for a provider.
198
- * Returned by {@link resolveProviderEndpoint} for use by infrastructure-layer
199
- * consumers (bridges, cloud STT/TTS clients, etc.) that need to make direct
200
- * HTTP calls to a provider API without an agent context.
201
- */
202
- interface ProviderEndpoint {
203
- /** Base URL for the provider's HTTP API. */
204
- baseUrl: string;
205
- /**
206
- * API key for authenticating requests to the provider.
207
- * This helper is intentionally scoped to apiKey-authenticated HTTP providers.
208
- */
209
- apiKey: string;
210
- }
211
- /**
212
- * Resolve `{ baseUrl, apiKey }` for a given provider config and wire protocol
213
- * without requiring an agent context.
214
- *
215
- * Intended for infrastructure-layer consumers (e.g., adapter-voice-bridge, cloud
216
- * STT/TTS providers) that need to make HTTP calls to cloud providers but are not
217
- * part of an agent turn.
218
- *
219
- * Delegates the common lookup chain (config → definition → endpoint → credentials)
220
- * to {@link resolveProviderResolution} and applies strict validation on the result:
221
- * both `baseUrl` and `apiKey` must be present or an error is thrown.
222
- *
223
- * Resolution order for the endpoint URL:
224
- * 1. `ProviderConfig.endpointOverrides[protocol]` (user-customised URL)
225
- * 2. `ProviderDefinition.endpoints[protocol]` (default from provider package)
226
- *
227
- * Credentials are resolved from the config's stored credential refs via the bus.
228
- * @param bus - Makaio bus instance used to query storage and resolve credential refs
229
- * @param providerConfigId - UUID of the ProviderConfig entity to resolve
230
- * @param protocol - Wire protocol to select the correct endpoint URL
231
- * @returns Resolved `{ baseUrl, apiKey }` for the provider
232
- * @throws Error when the ProviderConfig or its ProviderDefinition is not found, or
233
- * when `baseUrl` or `apiKey` cannot be resolved from any source
234
- */
235
- declare function resolveProviderEndpoint(bus: IMakaioBus, providerConfigId: string, protocol: ProtocolId): Promise<ProviderEndpoint>;
236
- //#endregion
237
- //#region adapters/core/src/config/resolve-provider-resolution.d.ts
238
- /**
239
- * Fully resolved provider data returned by {@link resolveProviderResolution}.
240
- *
241
- * Callers use this to build protocol-specific outputs (e.g. adapter config,
242
- * HTTP endpoint) without duplicating the lookup chain.
243
- */
244
- interface ProviderResolution {
245
- /** Bus-safe provider config read model from the adapter subsystem. */
246
- config: ProviderConfigFileRecord;
247
- /** The ProviderDefinition record referenced by the config. */
248
- definition: ProviderRecord;
249
- /**
250
- * Resolved base URL for the requested protocol.
251
- * `null` when neither the config override nor the definition declares an
252
- * endpoint for the requested protocol.
253
- */
254
- baseUrl: string | null;
255
- /**
256
- * Plaintext credentials resolved from the config's credential refs.
257
- * Empty object when no credentials are configured or none resolve.
258
- */
259
- credentials: Record<string, string>;
260
- }
261
- /**
262
- * Resolve a ProviderConfig to its full runtime data: config record,
263
- * definition record, endpoint URL, and plaintext credentials.
264
- *
265
- * Encapsulates the common lookup chain shared by the adapter config factory
266
- * and the provider endpoint resolver:
267
- * 1. `AdapterSubsystemSubjects.getProviderConfig` for the canonical read model
268
- * 2. `AdapterSubsystemSubjects.buildProviderContext` for runtime credential refs and endpoint overrides
269
- * 3. `ProviderStorageSubjects.get` for provider-definition metadata
270
- * 4. `context.endpointOverrides?.[protocol] ?? definition.endpoints?.[protocol]`
271
- * 5. Opens a DirectChannel via `CredentialSubjects.getChannelToken` and
272
- * resolves each credential ref; the channel is closed after use.
273
- *
274
- * Callers keep only their differing post-resolution logic (e.g., strict
275
- * `baseUrl` / `apiKey` validation for HTTP bridges vs. nullable `baseUrl`
276
- * for adapter factories that allow env-var fallbacks).
277
- * @param bus - Bus instance for storage and credential requests
278
- * @param providerConfigId - UUID of the ProviderConfig to resolve
279
- * @param protocol - Wire protocol used to select the correct endpoint URL
280
- * @returns Fully resolved provider data
281
- * @throws Error when the ProviderConfig or its ProviderDefinition is not found
282
- */
283
- declare function resolveProviderResolution(bus: IMakaioBus, providerConfigId: string, protocol: ProtocolId): Promise<ProviderResolution>;
284
- //#endregion
285
- //#region adapters/core/src/config/resolve-connector-credentials.d.ts
286
- /** Minimal bus surface needed to resolve credentials against the shared runtime context. */
287
- interface CredentialBusContextProvider {
288
- getContext(): MakaioBusContext;
289
- }
290
- /**
291
- * Resolve credential references to plaintext values at the connector layer.
292
- *
293
- * Opens an encrypted DirectChannel, resolves all refs in parallel, and
294
- * closes the channel after use. Connectors call this during initialization
295
- * or credential rotation — plaintext never leaves the connector.
296
- *
297
- * Returns an empty object immediately when `credentialRefs` is empty,
298
- * avoiding an unnecessary channel round-trip. Partial failures are
299
- * tolerated: refs that fail to resolve are omitted and logged. Callers
300
- * must still validate any required credential fields before using the
301
- * returned record to build env or client config.
302
- * @param bus - Bus instance with context access for channel token retrieval
303
- * @param credentialRefs - Credential refs keyed by field name
304
- * @returns Plaintext credential values keyed by field name
305
- */
306
- declare function resolveConnectorCredentials(bus: CredentialBusContextProvider, credentialRefs: Record<string, CredentialRef>): Promise<Record<string, string>>;
307
- //#endregion
308
- //#region adapters/core/src/config/build-credential-env.d.ts
309
- /**
310
- * Build environment variables from resolved credentials.
311
- *
312
- * Maps plaintext credential values to their environment variable names
313
- * using the provider definition's `credentialEnvVars` mapping. Subprocess
314
- * adapters use this to set the correct env vars before spawning.
315
- * @example
316
- * ```typescript
317
- * // { apiKey: 'sk-...' } + { apiKey: 'ANTHROPIC_API_KEY' }
318
- * // → { ANTHROPIC_API_KEY: 'sk-...' }
319
- * ```
320
- * @param credentials - Resolved plaintext credentials keyed by field name
321
- * @param credentialEnvVars - Mapping from credential field names to env var names
322
- * @returns Environment variables ready for process.env / subprocess spawn
323
- */
324
- declare function buildCredentialEnv(credentials: Record<string, string>, credentialEnvVars: Record<string, string> | undefined): Record<string, string>;
325
- //#endregion
326
- //#region adapters/core/src/config/resolve-session-environment.d.ts
327
- /** Minimal bus surface needed for session environment resolution. */
328
- interface SessionEnvironmentBus {
329
- getContext(): MakaioBusContext;
330
- }
331
- /**
332
- * Unresolved provider context fields needed for session environment resolution.
333
- *
334
- * Mirrors the relevant subset of {@link ProviderContext} from `@makaio/contracts`
335
- * so callers can pass the full provider context object without importing it here.
336
- */
337
- interface ProviderContextShape {
338
- /** Provider config UUID carried by full provider contexts. */
339
- providerConfigId?: string;
340
- /** Provider definition ID carried by full provider contexts. */
341
- definitionId?: string;
342
- /** Credential references keyed by field name. */
343
- credentialRefs: Record<string, CredentialRef>;
344
- /** Maps credential field names to env var names for subprocess adapters. */
345
- credentialEnvVars?: Record<string, string>;
346
- /** Ambient provider credential env vars to strip before explicit credential injection. */
347
- ambientCredentialEnvVars?: readonly string[];
348
- }
349
- /**
350
- * Input options for {@link resolveSessionEnvironment}.
351
- */
352
- interface SessionEnvironmentOptions {
353
- /** Bus instance used to resolve credential references. */
354
- bus: SessionEnvironmentBus;
355
- /**
356
- * Unresolved provider context carrying credential refs and env-var mapping.
357
- * When `undefined`, the credential steps are skipped and `credentials` / `credEnv`
358
- * are returned as empty objects.
359
- */
360
- providerContext: ProviderContextShape | undefined;
361
- /**
362
- * Stable client identifier passed to `resolveClientBinary`
363
- * (e.g. `'claude-code'`, `'qwen'`, `'github-copilot'`).
364
- */
365
- clientId: string;
366
- /**
367
- * Base environment variables that are merged into `spawnEnv` before credential
368
- * env and binary env are applied. Typically the connector's own `this.env`.
369
- */
370
- baseEnv?: Record<string, string>;
371
- }
372
- /**
373
- * Fully resolved session environment returned by {@link resolveSessionEnvironment}.
374
- *
375
- * All three resolution steps are returned individually so callers that need
376
- * non-standard composition (e.g. optional binary env) can do so without
377
- * repeating the resolution calls.
378
- */
379
- interface SessionEnvironmentResult {
380
- /**
381
- * Plaintext credentials keyed by field name.
382
- * Empty when `providerContext` is `undefined` or carries no credential refs.
383
- */
384
- credentials: Record<string, string>;
385
- /**
386
- * Environment variables derived from `credentials` via the provider's
387
- * `credentialEnvVars` mapping.
388
- * Empty when `providerContext` is `undefined` or carries no `credentialEnvVars`.
389
- */
390
- credEnv: Record<string, string>;
391
- /**
392
- * Execution context for the resolved client binary, or `undefined` when
393
- * no `client.resolveBinary` handler is registered (framework-only boot).
394
- */
395
- resolvedBinary: ClientExecutionContext | undefined;
396
- /**
397
- * Merged spawn environment for the common case:
398
- * `{ ...cleanBaseEnv, ...credEnv, ...(resolvedBinary?.env ?? {}) }`.
399
- *
400
- * Ambient provider credential env vars are stripped from base env first.
401
- * Credential env then takes precedence so that explicitly resolved secrets are
402
- * restored. Binary env finally wins over credential env to enforce config
403
- * isolation.
404
- */
405
- spawnEnv: Record<string, string>;
406
- }
407
- /**
408
- * Resolve credentials, build credential environment variables, and locate the
409
- * client binary — the three-step pattern shared by subprocess connectors.
410
- *
411
- * Encapsulates:
412
- * 1. `resolveConnectorCredentials(bus, credentialRefs)` — opens an encrypted
413
- * DirectChannel, resolves each ref, and closes the channel.
414
- * 2. `buildCredentialEnv(credentials, credentialEnvVars)` — maps credential
415
- * values to subprocess env var names.
416
- * 3. `resolveClientBinary(clientId)` — dispatches `client.resolveBinary` on the
417
- * static bus; returns `undefined` in framework-only boot.
418
- *
419
- * The returned {@link SessionEnvironmentResult} includes every intermediate
420
- * value so callers with non-standard composition strategies (e.g. connectors
421
- * that treat binary env as optional or pass credentials through a different
422
- * channel) can compose the final env themselves.
423
- * @param options - Session environment resolution options
424
- * @returns Resolved credentials, credential env, binary execution context, and
425
- * merged spawn environment
426
- */
427
- declare function resolveSessionEnvironment(options: SessionEnvironmentOptions): Promise<SessionEnvironmentResult>;
428
- //#endregion
429
- export { type AIModel, AIModelSchema, type AdapterConfigFactoryInput, type AdapterDefaults, type BaseAdapterConfig, BaseAdapterConfigSchema, type BaseProviderConfig, BaseProviderConfigSchema, type ConfigFactoryResult, type CreateAdapterConfigFactoryOptions, type FactoryGuaranteedFields, type ProviderConfig, ProviderConfigSchema, type ProviderDefaults, ProviderDefaultsSchema, type ProviderEndpoint, type ProviderResolution, type ResolveCredentialRefDeps, type SessionEnvironmentOptions, type SessionEnvironmentResult, buildCredentialEnv, createAdapterConfigFactory, getDefinitionOrThrow, resolveConnectorCredentials, resolveCredentialRef, resolveProviderEndpoint, resolveProviderResolution, resolveSessionEnvironment };
@@ -1 +0,0 @@
1
- import{t as e}from"../../cleanEnvForAdapter-DvcIGXTG.mjs";import{z as t}from"zod";import{createBusInstance as n,openChannel as r}from"@makaio/framework/bus";import{AIModelSchema as i,CredentialSubjects as a}from"@makaio/framework/contracts";import{BaseAdapterConfigSchema as o,ProviderConfigSchema as s,ProviderDefaultsSchema as c}from"@makaio/framework/contracts/config";import l from"node:fs/promises";import{ProviderStorageSubjects as u}from"@makaio/framework/services/settings/storage";import{resolveTimeouts as d}from"@makaio/framework/utils";import{AdapterSubsystemSubjects as f}from"@makaio/framework/services/adapter-subsystem";import{resolveClientBinary as p}from"@makaio/framework/clients";async function m(e,t={}){if(e.startsWith(`env:`)){let n=e.slice(4);if(!n)throw Error(`Credential reference is missing environment variable name`);return(t.readEnv??(e=>process.env[e]))(n)||null}if(e.startsWith(`file:`)){let n=e.slice(5);if(!n)throw Error(`Credential reference is missing file path`);return(await(t.readFile??(async e=>await l.readFile(e,`utf-8`)))(n)).trim()||null}if(e.startsWith(`keychain:`)){let[n,...r]=e.slice(9).split(`:`);if(!n||r.length===0)throw Error(`Credential reference is missing keychain service or account`);if(!t.resolveKeychain)throw Error(`Keychain credential resolution is not configured`);return t.resolveKeychain(n,r.join(`:`))}return e||null}function h(e,t){let n=e.find(e=>e.id===t);if(!n)throw Error(`Provider definition not found: '${t}'`);if(!g(n))throw Error(`Provider definition '${t}' is missing a defaultModel`);return n}function g(e){return typeof e.defaultModel==`string`&&e.defaultModel.length>0}const _=t.record(t.string(),t.unknown());function v(e){return{getDefaults:()=>e().adapterDefaults,getConfig:async t=>{let{adapterName:n,adapterDefaults:r,adapterDefinition:i,protocol:a}=e(),{providerContext:o}=t,s=o.endpointOverrides?.[a]??null,c=d([{layer:`adapter`,source:n,config:i.defaultTimeouts},{layer:`runtime`,source:`config.ts`,config:t.runtimeTimeouts}]),l={...r.providerConfig,...t.providerConfig,baseUrl:s??t.providerConfig?.baseUrl??r.providerConfig?.baseUrl},u=t.model??r.model;if(!u)throw Error(`No model resolved for adapter "${n}" (agentId: ${t.agentId}). Provide a model explicitly or configure adapterDefaults.model.`);return{...r,...t,adapterName:t.adapterName,model:u,cwd:t.cwd??r.cwd??process.cwd(),timeouts:c,providerConfig:l}}}}async function y(e,t){let i=Object.entries(t);if(i.length===0)return{};let o={},s=e.getContext(),{token:c}=await n({context:s}).request(a.getChannelToken,{}),l=await r(s,`credentials`,{token:c,transports:[]});try{let e=await Promise.allSettled(i.map(([,e])=>l.request(a.resolve,{ref:e})));for(let t=0;t<i.length;t++){let[n,r]=i[t],a=e[t];if(a.status===`fulfilled`)if(a.value.value!==null)o[n]=a.value.value;else if(a.value.error){let e=JSON.stringify(r);console.warn(`[resolveConnectorCredentials] Failed to resolve field '${n}' (ref ${e}):`,a.value.error)}else{let e=JSON.stringify(r);console.info(`[resolveConnectorCredentials] Credential unavailable for field '${n}' (ref ${e}); omitting it from the resolved connector credentials.`)}else{let e=JSON.stringify(r);console.warn(`[resolveConnectorCredentials] Failed to resolve field '${n}' (ref ${e}):`,a.reason)}}}finally{l.close()}return o}async function b(e,t,n){let{config:r}=await e.request(f.getProviderConfig,{id:t});if(!r)throw Error(`ProviderConfig '${t}' not found`);let{context:i}=await e.request(f.buildProviderContext,{providerConfigId:t});if(!i)throw Error(`ProviderConfig '${t}' not found`);if(i.definitionId!==r.definitionId)throw Error(`ProviderConfig '${t}' changed during resolution; retry`);let{provider:a}=await e.request(u.get,{id:i.definitionId});if(!a)throw Error(`ProviderDefinition '${r.definitionId}' not found for config '${t}'`);return{config:r,definition:a,baseUrl:i.endpointOverrides?.[n]??a.endpoints?.[n]??null,credentials:await y(e,i.credentialRefs)}}async function x(e,t,n){let{baseUrl:r,credentials:i}=await b(e,t,n);if(!r)throw Error(`Could not resolve baseUrl for ProviderConfig '${t}' with protocol '${n}'. Ensure the provider definition or config override declares an endpoint for this protocol.`);let a=i.apiKey;if(!a)throw Error(`Could not resolve apiKey for ProviderConfig '${t}'. Store credentials via settings before using this provider.`);return{baseUrl:r,apiKey:a}}function S(e,t){if(!t)return{};let n={};for(let[r,i]of Object.entries(t)){let t=e[r];t!==void 0&&(n[i]=t)}return n}async function C(t){let{bus:n,providerContext:r,clientId:i,baseEnv:a={}}=t,o=await y(n,r?.credentialRefs??{}),s=S(o,r?.credentialEnvVars),c=await p(i);return{credentials:o,credEnv:s,resolvedBinary:c,spawnEnv:{...e(a,{omitEnvVars:r?.ambientCredentialEnvVars}),...s,...c?.env??{}}}}export{i as AIModelSchema,o as BaseAdapterConfigSchema,_ as BaseProviderConfigSchema,s as ProviderConfigSchema,c as ProviderDefaultsSchema,S as buildCredentialEnv,v as createAdapterConfigFactory,h as getDefinitionOrThrow,y as resolveConnectorCredentials,m as resolveCredentialRef,x as resolveProviderEndpoint,b as resolveProviderResolution,C as resolveSessionEnvironment};