@struktoai/mirage-node 0.0.2-alpha.0 → 0.0.3-alpha.0

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 (407) hide show
  1. package/README.md +61 -127
  2. package/dist/aliyun-TMZRUYCG.js +10 -0
  3. package/dist/backblaze-OHW57DLK.js +10 -0
  4. package/dist/box-UXTCAFOZ.js +8 -0
  5. package/dist/ceph-TNN4I2FT.js +10 -0
  6. package/dist/chunk-2CC5VW7K.js +52 -0
  7. package/dist/chunk-2CC5VW7K.js.map +1 -0
  8. package/dist/chunk-3IJSIVKT.js +57 -0
  9. package/dist/chunk-3IJSIVKT.js.map +1 -0
  10. package/dist/chunk-3T3RMDNX.js +57 -0
  11. package/dist/chunk-3T3RMDNX.js.map +1 -0
  12. package/dist/chunk-54NTYJEO.js +13 -0
  13. package/dist/chunk-54NTYJEO.js.map +1 -0
  14. package/dist/{chunk-DCJQ2PIX.js → chunk-5DLOHQJ2.js} +5 -8
  15. package/dist/chunk-5DLOHQJ2.js.map +1 -0
  16. package/dist/chunk-5HCVKTP3.js +2086 -0
  17. package/dist/chunk-5HCVKTP3.js.map +1 -0
  18. package/dist/{chunk-5E6BULAK.js → chunk-5YOCVEUB.js} +5 -8
  19. package/dist/chunk-5YOCVEUB.js.map +1 -0
  20. package/dist/{chunk-6M2NL363.js → chunk-A4Z6DZ22.js} +6 -8
  21. package/dist/chunk-A4Z6DZ22.js.map +1 -0
  22. package/dist/{chunk-NOZZFJEB.js → chunk-A7X4L4JM.js} +5 -8
  23. package/dist/chunk-A7X4L4JM.js.map +1 -0
  24. package/dist/{chunk-GCB4JUF7.js → chunk-ABTEGAFB.js} +5 -8
  25. package/dist/chunk-ABTEGAFB.js.map +1 -0
  26. package/dist/chunk-AJICZLHT.js +57 -0
  27. package/dist/chunk-AJICZLHT.js.map +1 -0
  28. package/dist/{chunk-H74QYTN7.js → chunk-B2ZOKNN4.js} +14 -3
  29. package/dist/chunk-B2ZOKNN4.js.map +1 -0
  30. package/dist/{chunk-ICSS5ETT.js → chunk-B6SXRCBO.js} +8 -18
  31. package/dist/chunk-B6SXRCBO.js.map +1 -0
  32. package/dist/{chunk-HEQL3LPK.js → chunk-BYTU2YC3.js} +8 -18
  33. package/dist/chunk-BYTU2YC3.js.map +1 -0
  34. package/dist/{chunk-V5OLWE7F.js → chunk-C6NHEDHY.js} +5 -8
  35. package/dist/chunk-C6NHEDHY.js.map +1 -0
  36. package/dist/chunk-C6NHFMIP.js +57 -0
  37. package/dist/chunk-C6NHFMIP.js.map +1 -0
  38. package/dist/chunk-CASCUFK2.js +87 -0
  39. package/dist/chunk-CASCUFK2.js.map +1 -0
  40. package/dist/chunk-DNBAMB5J.js +18 -0
  41. package/dist/chunk-DNBAMB5J.js.map +1 -0
  42. package/dist/chunk-DP2PP5V2.js +26 -0
  43. package/dist/chunk-DP2PP5V2.js.map +1 -0
  44. package/dist/{chunk-OYJXYJTE.js → chunk-DTAY7LPC.js} +303 -866
  45. package/dist/chunk-DTAY7LPC.js.map +1 -0
  46. package/dist/chunk-DYXEITK3.js +52 -0
  47. package/dist/chunk-DYXEITK3.js.map +1 -0
  48. package/dist/chunk-E2ISWXLB.js +7 -0
  49. package/dist/chunk-E2ISWXLB.js.map +1 -0
  50. package/dist/{chunk-XDEEOTVK.js → chunk-E7RW3SBV.js} +5 -8
  51. package/dist/chunk-E7RW3SBV.js.map +1 -0
  52. package/dist/chunk-EGB7V74Z.js +76 -0
  53. package/dist/chunk-EGB7V74Z.js.map +1 -0
  54. package/dist/{chunk-LBBM3LKK.js → chunk-ERELJ7BS.js} +5 -8
  55. package/dist/chunk-ERELJ7BS.js.map +1 -0
  56. package/dist/chunk-FXFDBF3P.js +57 -0
  57. package/dist/chunk-FXFDBF3P.js.map +1 -0
  58. package/dist/chunk-G5BZE7UA.js +50 -0
  59. package/dist/chunk-G5BZE7UA.js.map +1 -0
  60. package/dist/chunk-H3BST2LI.js +26 -0
  61. package/dist/chunk-H3BST2LI.js.map +1 -0
  62. package/dist/chunk-H3I2KZIY.js +25 -0
  63. package/dist/chunk-H3I2KZIY.js.map +1 -0
  64. package/dist/{chunk-UWMOTOXA.js → chunk-HEHERHQ5.js} +8 -15
  65. package/dist/chunk-HEHERHQ5.js.map +1 -0
  66. package/dist/chunk-HQ4KWN76.js +57 -0
  67. package/dist/chunk-HQ4KWN76.js.map +1 -0
  68. package/dist/{chunk-MY3NUJJD.js → chunk-IQVNVTOP.js} +8 -18
  69. package/dist/chunk-IQVNVTOP.js.map +1 -0
  70. package/dist/chunk-JALIYI6M.js +55 -0
  71. package/dist/chunk-JALIYI6M.js.map +1 -0
  72. package/dist/chunk-JZQHKDSY.js +216 -0
  73. package/dist/chunk-JZQHKDSY.js.map +1 -0
  74. package/dist/chunk-JZT4QGIP.js +24 -0
  75. package/dist/chunk-JZT4QGIP.js.map +1 -0
  76. package/dist/chunk-KTNDT45N.js +57 -0
  77. package/dist/chunk-KTNDT45N.js.map +1 -0
  78. package/dist/chunk-L6JPBJAS.js +57 -0
  79. package/dist/chunk-L6JPBJAS.js.map +1 -0
  80. package/dist/{chunk-6VKNSO6U.js → chunk-LAJJPLEV.js} +17 -11
  81. package/dist/chunk-LAJJPLEV.js.map +1 -0
  82. package/dist/chunk-LW25LMIH.js +26 -0
  83. package/dist/chunk-LW25LMIH.js.map +1 -0
  84. package/dist/{chunk-WSDQ2MRG.js → chunk-LYDMMNL2.js} +5 -8
  85. package/dist/chunk-LYDMMNL2.js.map +1 -0
  86. package/dist/{chunk-G7O6DAWU.js → chunk-MHCMHKM6.js} +15 -9
  87. package/dist/chunk-MHCMHKM6.js.map +1 -0
  88. package/dist/chunk-N72CAZEH.js +1990 -0
  89. package/dist/chunk-N72CAZEH.js.map +1 -0
  90. package/dist/{chunk-XQUQSNCA.js → chunk-NHS7WLEQ.js} +4 -5
  91. package/dist/chunk-NHS7WLEQ.js.map +1 -0
  92. package/dist/chunk-NJMGCT63.js +54 -0
  93. package/dist/chunk-NJMGCT63.js.map +1 -0
  94. package/dist/chunk-O7ODGJYL.js +57 -0
  95. package/dist/chunk-O7ODGJYL.js.map +1 -0
  96. package/dist/chunk-OHROA3FQ.js +54 -0
  97. package/dist/chunk-OHROA3FQ.js.map +1 -0
  98. package/dist/chunk-OPYQ5KIO.js +52 -0
  99. package/dist/chunk-OPYQ5KIO.js.map +1 -0
  100. package/dist/chunk-OYV2DN66.js +50 -0
  101. package/dist/chunk-OYV2DN66.js.map +1 -0
  102. package/dist/chunk-OZAEWZZ3.js +31 -0
  103. package/dist/chunk-OZAEWZZ3.js.map +1 -0
  104. package/dist/chunk-PBBG7VFT.js +1896 -0
  105. package/dist/chunk-PBBG7VFT.js.map +1 -0
  106. package/dist/{chunk-HXWGG4K7.js → chunk-PJBQKMCD.js} +10 -20
  107. package/dist/chunk-PJBQKMCD.js.map +1 -0
  108. package/dist/chunk-Q2IAILVC.js +26 -0
  109. package/dist/chunk-Q2IAILVC.js.map +1 -0
  110. package/dist/chunk-Q6CDMOM6.js +57 -0
  111. package/dist/chunk-Q6CDMOM6.js.map +1 -0
  112. package/dist/{chunk-ALAMUIGJ.js → chunk-QGRDPSAH.js} +17 -12
  113. package/dist/chunk-QGRDPSAH.js.map +1 -0
  114. package/dist/{chunk-7QXJ4KWQ.js → chunk-RLGWMJD3.js} +63 -9
  115. package/dist/chunk-RLGWMJD3.js.map +1 -0
  116. package/dist/chunk-RO5IQEDQ.js +30 -0
  117. package/dist/chunk-RO5IQEDQ.js.map +1 -0
  118. package/dist/{chunk-ZC4KNEOQ.js → chunk-RQK5UPMP.js} +16 -11
  119. package/dist/chunk-RQK5UPMP.js.map +1 -0
  120. package/dist/chunk-RQYEEA2O.js +50 -0
  121. package/dist/chunk-RQYEEA2O.js.map +1 -0
  122. package/dist/chunk-SFUCUARB.js +21 -0
  123. package/dist/chunk-SFUCUARB.js.map +1 -0
  124. package/dist/{chunk-MVE5VVMQ.js → chunk-TRTUHCS4.js} +5 -8
  125. package/dist/chunk-TRTUHCS4.js.map +1 -0
  126. package/dist/chunk-TWGVQLG2.js +24 -0
  127. package/dist/chunk-TWGVQLG2.js.map +1 -0
  128. package/dist/chunk-UGK4TAVK.js +32 -0
  129. package/dist/chunk-UGK4TAVK.js.map +1 -0
  130. package/dist/{chunk-LPMPTQYP.js → chunk-UT2OPSN4.js} +12 -10
  131. package/dist/chunk-UT2OPSN4.js.map +1 -0
  132. package/dist/chunk-VGLHY6BK.js +31 -0
  133. package/dist/chunk-VGLHY6BK.js.map +1 -0
  134. package/dist/chunk-W7FLHT65.js +26 -0
  135. package/dist/chunk-W7FLHT65.js.map +1 -0
  136. package/dist/chunk-WL7HS7EM.js +50 -0
  137. package/dist/chunk-WL7HS7EM.js.map +1 -0
  138. package/dist/chunk-WSGEIVY3.js +1766 -0
  139. package/dist/chunk-WSGEIVY3.js.map +1 -0
  140. package/dist/{chunk-H3JR7MN3.js → chunk-XGJ2QERC.js} +17 -10
  141. package/dist/chunk-XGJ2QERC.js.map +1 -0
  142. package/dist/chunk-XHCBHYN4.js +54 -0
  143. package/dist/chunk-XHCBHYN4.js.map +1 -0
  144. package/dist/chunk-XLQI4IT2.js +54 -0
  145. package/dist/chunk-XLQI4IT2.js.map +1 -0
  146. package/dist/{chunk-3PBSL7BS.js → chunk-XRU5WXZX.js} +5 -8
  147. package/dist/chunk-XRU5WXZX.js.map +1 -0
  148. package/dist/{chunk-UZZD4MRJ.js → chunk-YAVGCQUP.js} +5 -8
  149. package/dist/chunk-YAVGCQUP.js.map +1 -0
  150. package/dist/chunk-YGZMVNN5.js +54 -0
  151. package/dist/chunk-YGZMVNN5.js.map +1 -0
  152. package/dist/{chunk-PEZYBKZH.js → chunk-YPT4JBUY.js} +10 -24
  153. package/dist/chunk-YPT4JBUY.js.map +1 -0
  154. package/dist/chunk-YUK3X3B4.js +27 -0
  155. package/dist/chunk-YUK3X3B4.js.map +1 -0
  156. package/dist/chunk-ZNWVJ6UW.js +54 -0
  157. package/dist/chunk-ZNWVJ6UW.js.map +1 -0
  158. package/dist/config-34LHOGLM.js +13 -0
  159. package/dist/config-3BBWD5AB.js +11 -0
  160. package/dist/{config-FNR6LJ5H.js → config-3IVQJBNW.js} +4 -2
  161. package/dist/config-4UDVSUQJ.js +11 -0
  162. package/dist/config-CMDBAPDH.js +11 -0
  163. package/dist/config-CVZ2AGCO.js +21 -0
  164. package/dist/config-D3RLSPNF.js +11 -0
  165. package/dist/config-DG65OEG3.js +11 -0
  166. package/dist/{config-HNSDNQZH.js → config-EIHSP5DZ.js} +4 -2
  167. package/dist/config-EO23EY62.js +15 -0
  168. package/dist/config-GCQK6NJY.js +11 -0
  169. package/dist/{config-5ZPGISS6.js → config-GE4W4ZJC.js} +4 -2
  170. package/dist/config-GHRUKEQ6.js +13 -0
  171. package/dist/config-GVH27UPE.js +11 -0
  172. package/dist/config-HKRMKD76.js +15 -0
  173. package/dist/config-HXVYIXP5.js +11 -0
  174. package/dist/config-IDZMEW73.js +11 -0
  175. package/dist/config-IJJXGLBQ.js +11 -0
  176. package/dist/config-IVY5EQQ2.js +15 -0
  177. package/dist/config-KJOLGVB2.js +11 -0
  178. package/dist/{config-S47UDVRZ.js → config-KMVCVBYN.js} +4 -2
  179. package/dist/{config-UKZ72IDO.js → config-KYTRXAB2.js} +4 -2
  180. package/dist/{config-MOLWOSRG.js → config-LHFFXVYI.js} +4 -2
  181. package/dist/config-NV5WXP64.js +11 -0
  182. package/dist/config-OT2TQQCN.js +11 -0
  183. package/dist/config-Q45Y46YT.js +15 -0
  184. package/dist/config-QAA646XB.js +15 -0
  185. package/dist/config-QNMKWJ4M.js +15 -0
  186. package/dist/config-QWCY3LBQ.js +11 -0
  187. package/dist/{config-HIZHA5VD.js → config-VM526IKB.js} +4 -2
  188. package/dist/config-WDAZFXYD.js +15 -0
  189. package/dist/config-ZFJYQZCH.js +13 -0
  190. package/dist/config-ZV6G2ZEC.js +11 -0
  191. package/dist/databricks_volume-HNQ4DJVJ.js +7 -0
  192. package/dist/digitalocean-6SPR4S7V.js +10 -0
  193. package/dist/discord-SAV2RBJV.js +8 -0
  194. package/dist/{disk-C7TJNU2B.js → disk-POACMF4G.js} +2 -2
  195. package/dist/dropbox-CQ7MTYX2.js +8 -0
  196. package/dist/email-KBQ7CXS7.js +8 -0
  197. package/dist/gcs-SMIE4VMT.js +10 -0
  198. package/dist/gdocs-X5Y2SIQX.js +8 -0
  199. package/dist/gdrive-SIQPRIGI.js +8 -0
  200. package/dist/github-KBHWANKQ.js +8 -0
  201. package/dist/github-KBHWANKQ.js.map +1 -0
  202. package/dist/github_ci-HPITNK37.js +8 -0
  203. package/dist/github_ci-HPITNK37.js.map +1 -0
  204. package/dist/gmail-DKHAGJNX.js +8 -0
  205. package/dist/gmail-DKHAGJNX.js.map +1 -0
  206. package/dist/gsheets-ZSUDIWGK.js +8 -0
  207. package/dist/gsheets-ZSUDIWGK.js.map +1 -0
  208. package/dist/gslides-GYXM7IMJ.js +8 -0
  209. package/dist/gslides-GYXM7IMJ.js.map +1 -0
  210. package/dist/hf_buckets-RIOMV7WG.js +10 -0
  211. package/dist/hf_buckets-RIOMV7WG.js.map +1 -0
  212. package/dist/hf_datasets-QF4BQ3OK.js +10 -0
  213. package/dist/hf_datasets-QF4BQ3OK.js.map +1 -0
  214. package/dist/hf_models-62GC2HPZ.js +10 -0
  215. package/dist/hf_models-62GC2HPZ.js.map +1 -0
  216. package/dist/hf_spaces-NVSMUNRM.js +10 -0
  217. package/dist/hf_spaces-NVSMUNRM.js.map +1 -0
  218. package/dist/index.d.ts +722 -277
  219. package/dist/index.js +646 -2268
  220. package/dist/index.js.map +1 -1
  221. package/dist/langfuse-HUAYVPHF.js +8 -0
  222. package/dist/langfuse-HUAYVPHF.js.map +1 -0
  223. package/dist/linear-2MM55KBC.js +8 -0
  224. package/dist/linear-2MM55KBC.js.map +1 -0
  225. package/dist/minio-L3XE6PQS.js +10 -0
  226. package/dist/minio-L3XE6PQS.js.map +1 -0
  227. package/dist/mongodb-ZOX4FRHJ.js +7 -0
  228. package/dist/mongodb-ZOX4FRHJ.js.map +1 -0
  229. package/dist/notion-UK4GTMT4.js +8 -0
  230. package/dist/notion-UK4GTMT4.js.map +1 -0
  231. package/dist/oci-NURLWPL2.js +10 -0
  232. package/dist/oci-NURLWPL2.js.map +1 -0
  233. package/dist/postgres-JNFMPAO2.js +7 -0
  234. package/dist/postgres-JNFMPAO2.js.map +1 -0
  235. package/dist/qingstor-W55D5YFO.js +10 -0
  236. package/dist/qingstor-W55D5YFO.js.map +1 -0
  237. package/dist/r2-FSZK7IFI.js +10 -0
  238. package/dist/r2-FSZK7IFI.js.map +1 -0
  239. package/dist/redis-S6GIPA4Z.js +8 -0
  240. package/dist/redis-S6GIPA4Z.js.map +1 -0
  241. package/dist/s3-GMPUJ65D.js +8 -0
  242. package/dist/s3-GMPUJ65D.js.map +1 -0
  243. package/dist/scaleway-5VM55Y6D.js +10 -0
  244. package/dist/scaleway-5VM55Y6D.js.map +1 -0
  245. package/dist/seaweedfs-J3EPUEPE.js +10 -0
  246. package/dist/seaweedfs-J3EPUEPE.js.map +1 -0
  247. package/dist/slack-FVBXY7KD.js +8 -0
  248. package/dist/slack-FVBXY7KD.js.map +1 -0
  249. package/dist/ssh-GCXETJ3Z.js +9 -0
  250. package/dist/ssh-GCXETJ3Z.js.map +1 -0
  251. package/dist/supabase-HLWNHBBE.js +10 -0
  252. package/dist/supabase-HLWNHBBE.js.map +1 -0
  253. package/dist/tencent-YDO73XBD.js +10 -0
  254. package/dist/tencent-YDO73XBD.js.map +1 -0
  255. package/dist/trello-CQ53BQUL.js +8 -0
  256. package/dist/trello-CQ53BQUL.js.map +1 -0
  257. package/dist/wasabi-SOZKPMRQ.js +10 -0
  258. package/dist/wasabi-SOZKPMRQ.js.map +1 -0
  259. package/package.json +39 -13
  260. package/dist/box-4P7DCJH7.js +0 -8
  261. package/dist/chunk-35PVZRWU.js +0 -24
  262. package/dist/chunk-35PVZRWU.js.map +0 -1
  263. package/dist/chunk-3PBSL7BS.js.map +0 -1
  264. package/dist/chunk-3Y625AUP.js +0 -24
  265. package/dist/chunk-3Y625AUP.js.map +0 -1
  266. package/dist/chunk-5E6BULAK.js.map +0 -1
  267. package/dist/chunk-5ITBZN55.js +0 -24
  268. package/dist/chunk-5ITBZN55.js.map +0 -1
  269. package/dist/chunk-6M2NL363.js.map +0 -1
  270. package/dist/chunk-6M3QVVOH.js +0 -32
  271. package/dist/chunk-6M3QVVOH.js.map +0 -1
  272. package/dist/chunk-6VKNSO6U.js.map +0 -1
  273. package/dist/chunk-6Y6GWMFF.js +0 -24
  274. package/dist/chunk-6Y6GWMFF.js.map +0 -1
  275. package/dist/chunk-7QXJ4KWQ.js.map +0 -1
  276. package/dist/chunk-ALAMUIGJ.js.map +0 -1
  277. package/dist/chunk-DCJQ2PIX.js.map +0 -1
  278. package/dist/chunk-EKPH4MMD.js +0 -27
  279. package/dist/chunk-EKPH4MMD.js.map +0 -1
  280. package/dist/chunk-FZ2GJ4BJ.js +0 -29
  281. package/dist/chunk-FZ2GJ4BJ.js.map +0 -1
  282. package/dist/chunk-G7O6DAWU.js.map +0 -1
  283. package/dist/chunk-GCB4JUF7.js.map +0 -1
  284. package/dist/chunk-GKQNMLQU.js +0 -7757
  285. package/dist/chunk-GKQNMLQU.js.map +0 -1
  286. package/dist/chunk-GO67AOYK.js +0 -24
  287. package/dist/chunk-GO67AOYK.js.map +0 -1
  288. package/dist/chunk-GPF66TH2.js +0 -24
  289. package/dist/chunk-GPF66TH2.js.map +0 -1
  290. package/dist/chunk-H3JR7MN3.js.map +0 -1
  291. package/dist/chunk-H74QYTN7.js.map +0 -1
  292. package/dist/chunk-HEQL3LPK.js.map +0 -1
  293. package/dist/chunk-HXWGG4K7.js.map +0 -1
  294. package/dist/chunk-I4RRGZGB.js +0 -24
  295. package/dist/chunk-I4RRGZGB.js.map +0 -1
  296. package/dist/chunk-ICSS5ETT.js.map +0 -1
  297. package/dist/chunk-KINMBZHC.js +0 -18
  298. package/dist/chunk-KINMBZHC.js.map +0 -1
  299. package/dist/chunk-LBBM3LKK.js.map +0 -1
  300. package/dist/chunk-LPMPTQYP.js.map +0 -1
  301. package/dist/chunk-M42JTWPR.js +0 -2794
  302. package/dist/chunk-M42JTWPR.js.map +0 -1
  303. package/dist/chunk-MVE5VVMQ.js.map +0 -1
  304. package/dist/chunk-MY3NUJJD.js.map +0 -1
  305. package/dist/chunk-NOZZFJEB.js.map +0 -1
  306. package/dist/chunk-OYJXYJTE.js.map +0 -1
  307. package/dist/chunk-PEZYBKZH.js.map +0 -1
  308. package/dist/chunk-QWWOBAYU.js +0 -26
  309. package/dist/chunk-QWWOBAYU.js.map +0 -1
  310. package/dist/chunk-RQYYYBQG.js +0 -24
  311. package/dist/chunk-RQYYYBQG.js.map +0 -1
  312. package/dist/chunk-T2WWAEKH.js +0 -7591
  313. package/dist/chunk-T2WWAEKH.js.map +0 -1
  314. package/dist/chunk-UWMOTOXA.js.map +0 -1
  315. package/dist/chunk-UZZD4MRJ.js.map +0 -1
  316. package/dist/chunk-V5OLWE7F.js.map +0 -1
  317. package/dist/chunk-VCLMTMSO.js +0 -23
  318. package/dist/chunk-VCLMTMSO.js.map +0 -1
  319. package/dist/chunk-WSDQ2MRG.js.map +0 -1
  320. package/dist/chunk-XDEEOTVK.js.map +0 -1
  321. package/dist/chunk-XQUQSNCA.js.map +0 -1
  322. package/dist/chunk-XVYZO2FG.js +0 -14
  323. package/dist/chunk-XVYZO2FG.js.map +0 -1
  324. package/dist/chunk-ZC4KNEOQ.js.map +0 -1
  325. package/dist/config-6HWSKHEU.js +0 -9
  326. package/dist/config-6TNFPYZF.js +0 -9
  327. package/dist/config-BHLXQ3OL.js +0 -9
  328. package/dist/config-E7UOEWEP.js +0 -9
  329. package/dist/config-IXLFUSMQ.js +0 -9
  330. package/dist/config-J3TM7NIS.js +0 -9
  331. package/dist/config-JXLZ4XEW.js +0 -9
  332. package/dist/config-KQCEMLNZ.js +0 -9
  333. package/dist/config-R3XJ5OW4.js +0 -9
  334. package/dist/config-V7XI5UTG.js +0 -9
  335. package/dist/config-YLIX3ZBT.js +0 -9
  336. package/dist/config-Z5JGDOKE.js +0 -9
  337. package/dist/config-ZCZZAH5W.js +0 -9
  338. package/dist/config-ZZGIWDUC.js +0 -9
  339. package/dist/discord-2PWP2MGX.js +0 -8
  340. package/dist/dropbox-L5DPYGKR.js +0 -8
  341. package/dist/email-HASRFBKC.js +0 -8
  342. package/dist/gcs-P5QMKTPR.js +0 -10
  343. package/dist/gdocs-IF2I35HZ.js +0 -8
  344. package/dist/gdrive-TAETVCKP.js +0 -8
  345. package/dist/github-5E6GSCNZ.js +0 -8
  346. package/dist/github_ci-2DSZI3Y7.js +0 -8
  347. package/dist/gmail-F5VYGKOT.js +0 -8
  348. package/dist/gsheets-BAO54CQ7.js +0 -8
  349. package/dist/gslides-A62CEEMR.js +0 -8
  350. package/dist/langfuse-YKBYRQLU.js +0 -8
  351. package/dist/linear-WJDQ6JDE.js +0 -8
  352. package/dist/mongodb-MK4DVSIK.js +0 -7
  353. package/dist/oci-KZ7XFZ2X.js +0 -10
  354. package/dist/postgres-M2N2APFZ.js +0 -7
  355. package/dist/r2-X4DDNSAZ.js +0 -10
  356. package/dist/redis-NVCXUUIO.js +0 -7
  357. package/dist/s3-HVAL7ZX3.js +0 -8
  358. package/dist/slack-GUQMDGLP.js +0 -8
  359. package/dist/ssh-LY6WYVVD.js +0 -9
  360. package/dist/supabase-H3ZP4Y3W.js +0 -10
  361. package/dist/trello-WR6TEDYD.js +0 -8
  362. /package/dist/{box-4P7DCJH7.js.map → aliyun-TMZRUYCG.js.map} +0 -0
  363. /package/dist/{config-5ZPGISS6.js.map → backblaze-OHW57DLK.js.map} +0 -0
  364. /package/dist/{config-6HWSKHEU.js.map → box-UXTCAFOZ.js.map} +0 -0
  365. /package/dist/{config-6TNFPYZF.js.map → ceph-TNN4I2FT.js.map} +0 -0
  366. /package/dist/{config-BHLXQ3OL.js.map → config-34LHOGLM.js.map} +0 -0
  367. /package/dist/{config-E7UOEWEP.js.map → config-3BBWD5AB.js.map} +0 -0
  368. /package/dist/{config-FNR6LJ5H.js.map → config-3IVQJBNW.js.map} +0 -0
  369. /package/dist/{config-HIZHA5VD.js.map → config-4UDVSUQJ.js.map} +0 -0
  370. /package/dist/{config-HNSDNQZH.js.map → config-CMDBAPDH.js.map} +0 -0
  371. /package/dist/{config-IXLFUSMQ.js.map → config-CVZ2AGCO.js.map} +0 -0
  372. /package/dist/{config-J3TM7NIS.js.map → config-D3RLSPNF.js.map} +0 -0
  373. /package/dist/{config-JXLZ4XEW.js.map → config-DG65OEG3.js.map} +0 -0
  374. /package/dist/{config-KQCEMLNZ.js.map → config-EIHSP5DZ.js.map} +0 -0
  375. /package/dist/{config-MOLWOSRG.js.map → config-EO23EY62.js.map} +0 -0
  376. /package/dist/{config-R3XJ5OW4.js.map → config-GCQK6NJY.js.map} +0 -0
  377. /package/dist/{config-S47UDVRZ.js.map → config-GE4W4ZJC.js.map} +0 -0
  378. /package/dist/{config-UKZ72IDO.js.map → config-GHRUKEQ6.js.map} +0 -0
  379. /package/dist/{config-V7XI5UTG.js.map → config-GVH27UPE.js.map} +0 -0
  380. /package/dist/{config-YLIX3ZBT.js.map → config-HKRMKD76.js.map} +0 -0
  381. /package/dist/{config-Z5JGDOKE.js.map → config-HXVYIXP5.js.map} +0 -0
  382. /package/dist/{config-ZCZZAH5W.js.map → config-IDZMEW73.js.map} +0 -0
  383. /package/dist/{config-ZZGIWDUC.js.map → config-IJJXGLBQ.js.map} +0 -0
  384. /package/dist/{discord-2PWP2MGX.js.map → config-IVY5EQQ2.js.map} +0 -0
  385. /package/dist/{disk-C7TJNU2B.js.map → config-KJOLGVB2.js.map} +0 -0
  386. /package/dist/{dropbox-L5DPYGKR.js.map → config-KMVCVBYN.js.map} +0 -0
  387. /package/dist/{email-HASRFBKC.js.map → config-KYTRXAB2.js.map} +0 -0
  388. /package/dist/{gcs-P5QMKTPR.js.map → config-LHFFXVYI.js.map} +0 -0
  389. /package/dist/{gdocs-IF2I35HZ.js.map → config-NV5WXP64.js.map} +0 -0
  390. /package/dist/{gdrive-TAETVCKP.js.map → config-OT2TQQCN.js.map} +0 -0
  391. /package/dist/{github-5E6GSCNZ.js.map → config-Q45Y46YT.js.map} +0 -0
  392. /package/dist/{github_ci-2DSZI3Y7.js.map → config-QAA646XB.js.map} +0 -0
  393. /package/dist/{gmail-F5VYGKOT.js.map → config-QNMKWJ4M.js.map} +0 -0
  394. /package/dist/{gsheets-BAO54CQ7.js.map → config-QWCY3LBQ.js.map} +0 -0
  395. /package/dist/{gslides-A62CEEMR.js.map → config-VM526IKB.js.map} +0 -0
  396. /package/dist/{langfuse-YKBYRQLU.js.map → config-WDAZFXYD.js.map} +0 -0
  397. /package/dist/{linear-WJDQ6JDE.js.map → config-ZFJYQZCH.js.map} +0 -0
  398. /package/dist/{mongodb-MK4DVSIK.js.map → config-ZV6G2ZEC.js.map} +0 -0
  399. /package/dist/{oci-KZ7XFZ2X.js.map → databricks_volume-HNQ4DJVJ.js.map} +0 -0
  400. /package/dist/{postgres-M2N2APFZ.js.map → digitalocean-6SPR4S7V.js.map} +0 -0
  401. /package/dist/{r2-X4DDNSAZ.js.map → discord-SAV2RBJV.js.map} +0 -0
  402. /package/dist/{redis-NVCXUUIO.js.map → disk-POACMF4G.js.map} +0 -0
  403. /package/dist/{s3-HVAL7ZX3.js.map → dropbox-CQ7MTYX2.js.map} +0 -0
  404. /package/dist/{slack-GUQMDGLP.js.map → email-KBQ7CXS7.js.map} +0 -0
  405. /package/dist/{ssh-LY6WYVVD.js.map → gcs-SMIE4VMT.js.map} +0 -0
  406. /package/dist/{supabase-H3ZP4Y3W.js.map → gdocs-X5Y2SIQX.js.map} +0 -0
  407. /package/dist/{trello-WR6TEDYD.js.map → gdrive-SIQPRIGI.js.map} +0 -0
@@ -0,0 +1,216 @@
1
+ // src/resource/databricks_volume/databricks_volume.ts
2
+ import {
3
+ BaseResource,
4
+ DATABRICKS_VOLUME_COMMANDS,
5
+ DATABRICKS_VOLUME_OPS,
6
+ DATABRICKS_VOLUME_PROMPT,
7
+ DatabricksVolumeAccessor,
8
+ databricksVolumeCopy,
9
+ databricksVolumeCreate,
10
+ databricksVolumeExists,
11
+ databricksVolumeFind,
12
+ databricksVolumeMkdir,
13
+ databricksVolumeRangeRead,
14
+ databricksVolumeRead,
15
+ databricksVolumeReadStream,
16
+ databricksVolumeReaddir,
17
+ databricksVolumeRename,
18
+ databricksVolumeRmRecursive,
19
+ databricksVolumeRmdir,
20
+ databricksVolumeStat,
21
+ databricksVolumeUnlink,
22
+ databricksVolumeWrite,
23
+ PathSpec,
24
+ ResourceName,
25
+ resolveDatabricksVolumeGlob
26
+ } from "@struktoai/mirage-core";
27
+
28
+ // src/resource/databricks_volume/config.ts
29
+ import {
30
+ DatabricksVolumeConfigSchema,
31
+ normalizeDatabricksVolumeConfig,
32
+ redactDatabricksVolumeConfig
33
+ } from "@struktoai/mirage-core";
34
+
35
+ // src/resource/databricks_volume/profile.ts
36
+ import { readFile } from "fs/promises";
37
+ import { homedir } from "os";
38
+ import { join } from "path";
39
+ function parseDatabricksCfg(content, profile) {
40
+ const result = {};
41
+ let inSection = false;
42
+ for (const rawLine of content.split("\n")) {
43
+ const line = rawLine.trim();
44
+ if (line === "" || line.startsWith("#") || line.startsWith(";")) continue;
45
+ if (line.startsWith("[") && line.endsWith("]")) {
46
+ inSection = line.slice(1, -1).trim() === profile;
47
+ continue;
48
+ }
49
+ if (!inSection) continue;
50
+ const eq = line.indexOf("=");
51
+ if (eq === -1) continue;
52
+ const key = line.slice(0, eq).trim();
53
+ const value = line.slice(eq + 1).trim();
54
+ if (key === "host") result.host = value;
55
+ if (key === "token") result.token = value;
56
+ }
57
+ return result;
58
+ }
59
+ async function loadDatabricksProfile(profile) {
60
+ const cfgPath = process.env.DATABRICKS_CONFIG_FILE ?? join(homedir(), ".databrickscfg");
61
+ let content;
62
+ try {
63
+ content = await readFile(cfgPath, "utf-8");
64
+ } catch (err) {
65
+ if (err?.code === "ENOENT") return {};
66
+ throw err;
67
+ }
68
+ return parseDatabricksCfg(content, profile);
69
+ }
70
+
71
+ // src/resource/databricks_volume/databricks_volume.ts
72
+ async function resolveAuth(config) {
73
+ let host = config.host ?? process.env.DATABRICKS_HOST;
74
+ let token = config.token ?? process.env.DATABRICKS_TOKEN;
75
+ if (host === void 0 || host === "" || token === void 0 || token === "") {
76
+ const profileName = config.profile ?? process.env.DATABRICKS_CONFIG_PROFILE ?? "DEFAULT";
77
+ const profile = await loadDatabricksProfile(profileName);
78
+ host = host !== void 0 && host !== "" ? host : profile.host;
79
+ token = token !== void 0 && token !== "" ? token : profile.token;
80
+ }
81
+ if (host === void 0 || host === "" || token === void 0 || token === "") {
82
+ throw new Error(
83
+ "databricks_volume: missing credentials; set host/token in the config, DATABRICKS_HOST/DATABRICKS_TOKEN env vars, or a ~/.databrickscfg profile"
84
+ );
85
+ }
86
+ return [host, token];
87
+ }
88
+ var DatabricksVolumeResource = class _DatabricksVolumeResource extends BaseResource {
89
+ kind = ResourceName.DATABRICKS_VOLUME;
90
+ isRemote = true;
91
+ indexTtl = 600;
92
+ prompt = DATABRICKS_VOLUME_PROMPT;
93
+ config;
94
+ accessor;
95
+ opsMap = {
96
+ read_bytes: databricksVolumeRead,
97
+ write: databricksVolumeWrite,
98
+ readdir: databricksVolumeReaddir,
99
+ stat: databricksVolumeStat,
100
+ read_stream: databricksVolumeReadStream,
101
+ range_read: databricksVolumeRangeRead,
102
+ exists: databricksVolumeExists,
103
+ create: databricksVolumeCreate,
104
+ unlink: databricksVolumeUnlink,
105
+ mkdir: databricksVolumeMkdir,
106
+ rmdir: databricksVolumeRmdir,
107
+ copy: databricksVolumeCopy,
108
+ rename: databricksVolumeRename,
109
+ rm_recursive: databricksVolumeRmRecursive
110
+ };
111
+ constructor(config, accessor) {
112
+ super();
113
+ this.config = config;
114
+ this.accessor = accessor;
115
+ }
116
+ static async create(config) {
117
+ const [host, token] = await resolveAuth(config);
118
+ const accessor = new DatabricksVolumeAccessor(config, host, token);
119
+ return new _DatabricksVolumeResource(config, accessor);
120
+ }
121
+ open() {
122
+ return Promise.resolve();
123
+ }
124
+ close() {
125
+ return Promise.resolve();
126
+ }
127
+ commands() {
128
+ return DATABRICKS_VOLUME_COMMANDS;
129
+ }
130
+ ops() {
131
+ return DATABRICKS_VOLUME_OPS;
132
+ }
133
+ streamPath(p) {
134
+ return databricksVolumeReadStream(this.accessor, p);
135
+ }
136
+ readFile(p) {
137
+ return databricksVolumeRead(this.accessor, p);
138
+ }
139
+ writeFile(p, data) {
140
+ return databricksVolumeWrite(this.accessor, p, data);
141
+ }
142
+ async appendFile(p, data) {
143
+ let existing;
144
+ try {
145
+ existing = await databricksVolumeRead(this.accessor, p);
146
+ } catch (err) {
147
+ if (err?.code === "ENOENT") {
148
+ existing = new Uint8Array();
149
+ } else {
150
+ throw err;
151
+ }
152
+ }
153
+ const merged = new Uint8Array(existing.byteLength + data.byteLength);
154
+ merged.set(existing, 0);
155
+ merged.set(data, existing.byteLength);
156
+ await databricksVolumeWrite(this.accessor, p, merged);
157
+ }
158
+ readdir(p) {
159
+ return databricksVolumeReaddir(this.accessor, p, this.index);
160
+ }
161
+ stat(p) {
162
+ return databricksVolumeStat(this.accessor, p);
163
+ }
164
+ exists(p) {
165
+ return databricksVolumeExists(this.accessor, p);
166
+ }
167
+ mkdir(p) {
168
+ return databricksVolumeMkdir(this.accessor, p, void 0, true);
169
+ }
170
+ rmdir(p) {
171
+ return databricksVolumeRmdir(this.accessor, p);
172
+ }
173
+ unlink(p) {
174
+ return databricksVolumeUnlink(this.accessor, p);
175
+ }
176
+ rename(src, dst) {
177
+ return databricksVolumeRename(this.accessor, src, dst);
178
+ }
179
+ copy(src, dst) {
180
+ return databricksVolumeCopy(this.accessor, src, dst);
181
+ }
182
+ async rmR(p) {
183
+ await databricksVolumeRmRecursive(this.accessor, p);
184
+ }
185
+ find(p, options = {}) {
186
+ return databricksVolumeFind(this.accessor, p, options, this.index);
187
+ }
188
+ glob(paths, prefix = "") {
189
+ const effective = prefix ? paths.map(
190
+ (p) => p.prefix ? p : new PathSpec({
191
+ original: p.original,
192
+ directory: p.directory,
193
+ ...p.pattern !== null ? { pattern: p.pattern } : {},
194
+ resolved: p.resolved,
195
+ prefix
196
+ })
197
+ ) : paths;
198
+ return resolveDatabricksVolumeGlob(this.accessor, effective, this.index);
199
+ }
200
+ getState() {
201
+ return Promise.resolve({
202
+ type: this.kind,
203
+ config: redactDatabricksVolumeConfig(this.config)
204
+ });
205
+ }
206
+ loadState(_state) {
207
+ return Promise.resolve();
208
+ }
209
+ };
210
+
211
+ export {
212
+ parseDatabricksCfg,
213
+ loadDatabricksProfile,
214
+ DatabricksVolumeResource
215
+ };
216
+ //# sourceMappingURL=chunk-JZQHKDSY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/databricks_volume/databricks_volume.ts","../src/resource/databricks_volume/config.ts","../src/resource/databricks_volume/profile.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BaseResource,\n DATABRICKS_VOLUME_COMMANDS,\n DATABRICKS_VOLUME_OPS,\n DATABRICKS_VOLUME_PROMPT,\n DatabricksVolumeAccessor,\n databricksVolumeCopy,\n databricksVolumeCreate,\n databricksVolumeExists,\n databricksVolumeFind,\n databricksVolumeMkdir,\n databricksVolumeRangeRead,\n databricksVolumeRead,\n databricksVolumeReadStream,\n databricksVolumeReaddir,\n databricksVolumeRename,\n databricksVolumeRmRecursive,\n databricksVolumeRmdir,\n databricksVolumeStat,\n databricksVolumeUnlink,\n databricksVolumeWrite,\n type FileStat,\n type FindOptions,\n PathSpec,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n resolveDatabricksVolumeGlob,\n} from '@struktoai/mirage-core'\nimport {\n redactDatabricksVolumeConfig,\n type DatabricksVolumeConfig,\n type DatabricksVolumeConfigRedacted,\n} from './config.ts'\nimport { loadDatabricksProfile } from './profile.ts'\n\nexport interface DatabricksVolumeResourceState {\n type: string\n config: DatabricksVolumeConfigRedacted\n}\n\nasync function resolveAuth(config: DatabricksVolumeConfig): Promise<[string, string]> {\n let host = config.host ?? process.env.DATABRICKS_HOST\n let token = config.token ?? process.env.DATABRICKS_TOKEN\n if (host === undefined || host === '' || token === undefined || token === '') {\n const profileName = config.profile ?? process.env.DATABRICKS_CONFIG_PROFILE ?? 'DEFAULT'\n const profile = await loadDatabricksProfile(profileName)\n host = host !== undefined && host !== '' ? host : profile.host\n token = token !== undefined && token !== '' ? token : profile.token\n }\n if (host === undefined || host === '' || token === undefined || token === '') {\n throw new Error(\n 'databricks_volume: missing credentials; set host/token in the config, ' +\n 'DATABRICKS_HOST/DATABRICKS_TOKEN env vars, or a ~/.databrickscfg profile',\n )\n }\n return [host, token]\n}\n\nexport class DatabricksVolumeResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.DATABRICKS_VOLUME\n readonly isRemote: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = DATABRICKS_VOLUME_PROMPT\n readonly config: DatabricksVolumeConfig\n readonly accessor: DatabricksVolumeAccessor\n readonly opsMap: Record<string, unknown> = {\n read_bytes: databricksVolumeRead,\n write: databricksVolumeWrite,\n readdir: databricksVolumeReaddir,\n stat: databricksVolumeStat,\n read_stream: databricksVolumeReadStream,\n range_read: databricksVolumeRangeRead,\n exists: databricksVolumeExists,\n create: databricksVolumeCreate,\n unlink: databricksVolumeUnlink,\n mkdir: databricksVolumeMkdir,\n rmdir: databricksVolumeRmdir,\n copy: databricksVolumeCopy,\n rename: databricksVolumeRename,\n rm_recursive: databricksVolumeRmRecursive,\n }\n\n private constructor(config: DatabricksVolumeConfig, accessor: DatabricksVolumeAccessor) {\n super()\n this.config = config\n this.accessor = accessor\n }\n\n static async create(config: DatabricksVolumeConfig): Promise<DatabricksVolumeResource> {\n const [host, token] = await resolveAuth(config)\n const accessor = new DatabricksVolumeAccessor(config, host, token)\n return new DatabricksVolumeResource(config, accessor)\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return DATABRICKS_VOLUME_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return DATABRICKS_VOLUME_OPS\n }\n\n streamPath(p: PathSpec): AsyncIterable<Uint8Array> {\n return databricksVolumeReadStream(this.accessor, p)\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return databricksVolumeRead(this.accessor, p)\n }\n\n writeFile(p: PathSpec, data: Uint8Array): Promise<void> {\n return databricksVolumeWrite(this.accessor, p, data)\n }\n\n async appendFile(p: PathSpec, data: Uint8Array): Promise<void> {\n let existing: Uint8Array\n try {\n existing = await databricksVolumeRead(this.accessor, p)\n } catch (err) {\n if ((err as { code?: string } | null)?.code === 'ENOENT') {\n existing = new Uint8Array()\n } else {\n throw err\n }\n }\n const merged = new Uint8Array(existing.byteLength + data.byteLength)\n merged.set(existing, 0)\n merged.set(data, existing.byteLength)\n await databricksVolumeWrite(this.accessor, p, merged)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return databricksVolumeReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return databricksVolumeStat(this.accessor, p)\n }\n\n exists(p: PathSpec): Promise<boolean> {\n return databricksVolumeExists(this.accessor, p)\n }\n\n mkdir(p: PathSpec): Promise<void> {\n return databricksVolumeMkdir(this.accessor, p, undefined, true)\n }\n\n rmdir(p: PathSpec): Promise<void> {\n return databricksVolumeRmdir(this.accessor, p)\n }\n\n unlink(p: PathSpec): Promise<void> {\n return databricksVolumeUnlink(this.accessor, p)\n }\n\n rename(src: PathSpec, dst: PathSpec): Promise<void> {\n return databricksVolumeRename(this.accessor, src, dst)\n }\n\n copy(src: PathSpec, dst: PathSpec): Promise<void> {\n return databricksVolumeCopy(this.accessor, src, dst)\n }\n\n async rmR(p: PathSpec): Promise<void> {\n await databricksVolumeRmRecursive(this.accessor, p)\n }\n\n find(p: PathSpec, options: FindOptions = {}): Promise<string[]> {\n return databricksVolumeFind(this.accessor, p, options, this.index)\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective = prefix\n ? paths.map((p) =>\n p.prefix\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return resolveDatabricksVolumeGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<DatabricksVolumeResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactDatabricksVolumeConfig(this.config),\n })\n }\n\n loadState(_state: DatabricksVolumeResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport {\n DatabricksVolumeConfigSchema,\n normalizeDatabricksVolumeConfig,\n redactDatabricksVolumeConfig,\n type DatabricksVolumeConfig,\n type DatabricksVolumeConfigRedacted,\n} from '@struktoai/mirage-core'\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { readFile } from 'node:fs/promises'\nimport { homedir } from 'node:os'\nimport { join } from 'node:path'\n\nexport interface DatabricksProfile {\n host?: string\n token?: string\n}\n\nexport function parseDatabricksCfg(content: string, profile: string): DatabricksProfile {\n const result: DatabricksProfile = {}\n let inSection = false\n for (const rawLine of content.split('\\n')) {\n const line = rawLine.trim()\n if (line === '' || line.startsWith('#') || line.startsWith(';')) continue\n if (line.startsWith('[') && line.endsWith(']')) {\n inSection = line.slice(1, -1).trim() === profile\n continue\n }\n if (!inSection) continue\n const eq = line.indexOf('=')\n if (eq === -1) continue\n const key = line.slice(0, eq).trim()\n const value = line.slice(eq + 1).trim()\n if (key === 'host') result.host = value\n if (key === 'token') result.token = value\n }\n return result\n}\n\nexport async function loadDatabricksProfile(profile: string): Promise<DatabricksProfile> {\n const cfgPath = process.env.DATABRICKS_CONFIG_FILE ?? join(homedir(), '.databrickscfg')\n let content: string\n try {\n content = await readFile(cfgPath, 'utf-8')\n } catch (err) {\n if ((err as { code?: string } | null)?.code === 'ENOENT') return {}\n throw err\n }\n return parseDatabricksCfg(content, profile)\n}\n"],"mappings":"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","names":[]}
@@ -0,0 +1,24 @@
1
+ // src/resource/notion/config.ts
2
+ import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
3
+ var NotionConfigSchema = z.object({
4
+ apiKey: secretStr(),
5
+ baseUrl: z.string().optional()
6
+ });
7
+ function redactNotionConfig(config) {
8
+ return redactConfigWithSchema(NotionConfigSchema, config);
9
+ }
10
+ function normalizeNotionConfig(input) {
11
+ return normalizeFields(input, {
12
+ rename: {
13
+ api_key: "apiKey",
14
+ base_url: "baseUrl"
15
+ }
16
+ });
17
+ }
18
+
19
+ export {
20
+ NotionConfigSchema,
21
+ redactNotionConfig,
22
+ normalizeNotionConfig
23
+ };
24
+ //# sourceMappingURL=chunk-JZT4QGIP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/notion/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\n\nexport interface NotionConfig {\n apiKey: string\n baseUrl?: string\n}\n\nexport interface NotionConfigRedacted {\n apiKey: '<REDACTED>'\n baseUrl?: string\n}\n\nexport const NotionConfigSchema = z.object({\n apiKey: secretStr(),\n baseUrl: z.string().optional(),\n})\n\nexport function redactNotionConfig(config: NotionConfig): NotionConfigRedacted {\n return redactConfigWithSchema(NotionConfigSchema, config) as unknown as NotionConfigRedacted\n}\n\nexport function normalizeNotionConfig(input: Record<string, unknown>): NotionConfig {\n return normalizeFields(input, {\n rename: {\n api_key: 'apiKey',\n base_url: 'baseUrl',\n },\n }) as unknown as NotionConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAY/D,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,QAAQ,UAAU;AAAA,EAClB,SAAS,EAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AAEM,SAAS,mBAAmB,QAA4C;AAC7E,SAAO,uBAAuB,oBAAoB,MAAM;AAC1D;AAEO,SAAS,sBAAsB,OAA8C;AAClF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,UAAU;AAAA,IACZ;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -0,0 +1,57 @@
1
+ import {
2
+ aliyunToS3Config,
3
+ redactAliyunConfig
4
+ } from "./chunk-NJMGCT63.js";
5
+ import {
6
+ S3Resource
7
+ } from "./chunk-MHCMHKM6.js";
8
+
9
+ // src/resource/aliyun/aliyun.ts
10
+ import {
11
+ remapCommandsResource,
12
+ remapOpsResource,
13
+ ResourceName
14
+ } from "@struktoai/mirage-core";
15
+
16
+ // src/resource/aliyun/prompt.ts
17
+ var ALIYUN_PROMPT = `{prefix}
18
+ Remote Alibaba Cloud OSS bucket (S3-compatible).
19
+ IMPORTANT: This is a remote mount. Prefer targeted reads over full scans.
20
+ Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.
21
+ cat on .parquet/.orc/.feather returns a formatted table.`;
22
+
23
+ // src/resource/aliyun/aliyun.ts
24
+ var AliyunResource = class extends S3Resource {
25
+ kind = ResourceName.ALIYUN;
26
+ prompt = ALIYUN_PROMPT;
27
+ aliyunConfig;
28
+ aliyunOps;
29
+ aliyunCommands;
30
+ constructor(config) {
31
+ super(aliyunToS3Config(config));
32
+ this.aliyunConfig = config;
33
+ this.aliyunOps = remapOpsResource(super.ops(), ResourceName.ALIYUN);
34
+ this.aliyunCommands = remapCommandsResource(super.commands(), ResourceName.ALIYUN);
35
+ }
36
+ ops() {
37
+ return this.aliyunOps;
38
+ }
39
+ commands() {
40
+ return this.aliyunCommands;
41
+ }
42
+ getState() {
43
+ return Promise.resolve({
44
+ type: this.kind,
45
+ config: redactAliyunConfig(this.aliyunConfig)
46
+ });
47
+ }
48
+ loadState(_state) {
49
+ return Promise.resolve();
50
+ }
51
+ };
52
+
53
+ export {
54
+ ALIYUN_PROMPT,
55
+ AliyunResource
56
+ };
57
+ //# sourceMappingURL=chunk-KTNDT45N.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/aliyun/aliyun.ts","../src/resource/aliyun/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n remapCommandsResource,\n remapOpsResource,\n ResourceName,\n type RegisteredCommand,\n type RegisteredOp,\n} from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport {\n aliyunToS3Config,\n redactAliyunConfig,\n type AliyunConfig,\n type AliyunConfigRedacted,\n} from './config.ts'\nimport { ALIYUN_PROMPT } from './prompt.ts'\n\nexport interface AliyunResourceState {\n type: string\n config: AliyunConfigRedacted\n}\n\nexport class AliyunResource extends S3Resource {\n override readonly kind: string = ResourceName.ALIYUN\n override readonly prompt: string = ALIYUN_PROMPT\n readonly aliyunConfig: AliyunConfig\n private readonly aliyunOps: readonly RegisteredOp[]\n private readonly aliyunCommands: readonly RegisteredCommand[]\n\n constructor(config: AliyunConfig) {\n super(aliyunToS3Config(config))\n this.aliyunConfig = config\n this.aliyunOps = remapOpsResource(super.ops(), ResourceName.ALIYUN)\n this.aliyunCommands = remapCommandsResource(super.commands(), ResourceName.ALIYUN)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.aliyunOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.aliyunCommands\n }\n\n override getState(): Promise<AliyunResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactAliyunConfig(this.aliyunConfig),\n })\n }\n\n override loadState(_state: AliyunResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport const ALIYUN_PROMPT = `\\\n{prefix}\n Remote Alibaba Cloud OSS bucket (S3-compatible).\n IMPORTANT: This is a remote mount. Prefer targeted reads over full scans.\n Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.\n cat on .parquet/.orc/.feather returns a formatted table.`\n"],"mappings":";;;;;;;;;AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACNA,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;;;ADqBtB,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAC3B,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAsB;AAChC,UAAM,iBAAiB,MAAM,CAAC;AAC9B,SAAK,eAAe;AACpB,SAAK,YAAY,iBAAiB,MAAM,IAAI,GAAG,aAAa,MAAM;AAClE,SAAK,iBAAiB,sBAAsB,MAAM,SAAS,GAAG,aAAa,MAAM;AAAA,EACnF;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAmB,KAAK,YAAY;AAAA,IAC9C,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAA4C;AAC7D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -0,0 +1,57 @@
1
+ import {
2
+ redactTencentConfig,
3
+ tencentToS3Config
4
+ } from "./chunk-YGZMVNN5.js";
5
+ import {
6
+ S3Resource
7
+ } from "./chunk-MHCMHKM6.js";
8
+
9
+ // src/resource/tencent/tencent.ts
10
+ import {
11
+ remapCommandsResource,
12
+ remapOpsResource,
13
+ ResourceName
14
+ } from "@struktoai/mirage-core";
15
+
16
+ // src/resource/tencent/prompt.ts
17
+ var TENCENT_PROMPT = `{prefix}
18
+ Remote Tencent Cloud COS bucket (S3-compatible).
19
+ IMPORTANT: This is a remote mount. Prefer targeted reads over full scans.
20
+ Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.
21
+ cat on .parquet/.orc/.feather returns a formatted table.`;
22
+
23
+ // src/resource/tencent/tencent.ts
24
+ var TencentResource = class extends S3Resource {
25
+ kind = ResourceName.TENCENT;
26
+ prompt = TENCENT_PROMPT;
27
+ tencentConfig;
28
+ tencentOps;
29
+ tencentCommands;
30
+ constructor(config) {
31
+ super(tencentToS3Config(config));
32
+ this.tencentConfig = config;
33
+ this.tencentOps = remapOpsResource(super.ops(), ResourceName.TENCENT);
34
+ this.tencentCommands = remapCommandsResource(super.commands(), ResourceName.TENCENT);
35
+ }
36
+ ops() {
37
+ return this.tencentOps;
38
+ }
39
+ commands() {
40
+ return this.tencentCommands;
41
+ }
42
+ getState() {
43
+ return Promise.resolve({
44
+ type: this.kind,
45
+ config: redactTencentConfig(this.tencentConfig)
46
+ });
47
+ }
48
+ loadState(_state) {
49
+ return Promise.resolve();
50
+ }
51
+ };
52
+
53
+ export {
54
+ TENCENT_PROMPT,
55
+ TencentResource
56
+ };
57
+ //# sourceMappingURL=chunk-L6JPBJAS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/tencent/tencent.ts","../src/resource/tencent/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n remapCommandsResource,\n remapOpsResource,\n ResourceName,\n type RegisteredCommand,\n type RegisteredOp,\n} from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport {\n redactTencentConfig,\n tencentToS3Config,\n type TencentConfig,\n type TencentConfigRedacted,\n} from './config.ts'\nimport { TENCENT_PROMPT } from './prompt.ts'\n\nexport interface TencentResourceState {\n type: string\n config: TencentConfigRedacted\n}\n\nexport class TencentResource extends S3Resource {\n override readonly kind: string = ResourceName.TENCENT\n override readonly prompt: string = TENCENT_PROMPT\n readonly tencentConfig: TencentConfig\n private readonly tencentOps: readonly RegisteredOp[]\n private readonly tencentCommands: readonly RegisteredCommand[]\n\n constructor(config: TencentConfig) {\n super(tencentToS3Config(config))\n this.tencentConfig = config\n this.tencentOps = remapOpsResource(super.ops(), ResourceName.TENCENT)\n this.tencentCommands = remapCommandsResource(super.commands(), ResourceName.TENCENT)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.tencentOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.tencentCommands\n }\n\n override getState(): Promise<TencentResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactTencentConfig(this.tencentConfig),\n })\n }\n\n override loadState(_state: TencentResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport const TENCENT_PROMPT = `\\\n{prefix}\n Remote Tencent Cloud COS bucket (S3-compatible).\n IMPORTANT: This is a remote mount. Prefer targeted reads over full scans.\n Supports: ls, cat, head, tail, grep, rg, wc, find, tree, jq, stat.\n cat on .parquet/.orc/.feather returns a formatted table.`\n"],"mappings":";;;;;;;;;AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACNA,IAAM,iBAAiB;AAAA;AAAA;AAAA;AAAA;;;ADqBvB,IAAM,kBAAN,cAA8B,WAAW;AAAA,EAC5B,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAuB;AACjC,UAAM,kBAAkB,MAAM,CAAC;AAC/B,SAAK,gBAAgB;AACrB,SAAK,aAAa,iBAAiB,MAAM,IAAI,GAAG,aAAa,OAAO;AACpE,SAAK,kBAAkB,sBAAsB,MAAM,SAAS,GAAG,aAAa,OAAO;AAAA,EACrF;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAA0C;AACjD,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,oBAAoB,KAAK,aAAa;AAAA,IAChD,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAA6C;AAC9D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,5 +1,15 @@
1
1
  // src/resource/r2/config.ts
2
- import { normalizeFields } from "@struktoai/mirage-core";
2
+ import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
3
+ var R2ConfigSchema = z.object({
4
+ bucket: z.string(),
5
+ accessKeyId: secretStr(),
6
+ secretAccessKey: secretStr(),
7
+ accountId: z.string().optional(),
8
+ endpoint: z.string(),
9
+ region: z.string(),
10
+ profile: z.string().optional(),
11
+ timeoutMs: z.number().optional()
12
+ });
3
13
  function resolvedR2Endpoint(config) {
4
14
  if (config.endpoint !== void 0 && config.endpoint !== "") return config.endpoint;
5
15
  if (config.accountId !== void 0 && config.accountId !== "") {
@@ -19,16 +29,11 @@ function r2ToS3Config(config) {
19
29
  };
20
30
  }
21
31
  function redactR2Config(config) {
22
- return {
23
- bucket: config.bucket,
24
- accessKeyId: "<REDACTED>",
25
- secretAccessKey: "<REDACTED>",
26
- ...config.accountId !== void 0 ? { accountId: config.accountId } : {},
32
+ return redactConfigWithSchema(R2ConfigSchema, {
33
+ ...config,
27
34
  endpoint: resolvedR2Endpoint(config),
28
- region: config.region ?? "auto",
29
- ...config.profile !== void 0 ? { profile: config.profile } : {},
30
- ...config.timeoutMs !== void 0 ? { timeoutMs: config.timeoutMs } : {}
31
- };
35
+ region: config.region ?? "auto"
36
+ });
32
37
  }
33
38
  function normalizeR2Config(input) {
34
39
  return normalizeFields(input, {
@@ -48,9 +53,10 @@ function normalizeR2Config(input) {
48
53
  }
49
54
 
50
55
  export {
56
+ R2ConfigSchema,
51
57
  resolvedR2Endpoint,
52
58
  r2ToS3Config,
53
59
  redactR2Config,
54
60
  normalizeR2Config
55
61
  };
56
- //# sourceMappingURL=chunk-6VKNSO6U.js.map
62
+ //# sourceMappingURL=chunk-LAJJPLEV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/r2/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\nimport type { S3Config } from '../s3/config.ts'\n\nexport interface R2Config {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n accountId?: string\n endpoint?: string\n region?: string\n profile?: string\n timeoutMs?: number\n}\n\nexport interface R2ConfigRedacted {\n bucket: string\n accessKeyId: string\n secretAccessKey: string\n accountId?: string\n endpoint: string\n region: string\n profile?: string\n timeoutMs?: number\n}\n\nexport const R2ConfigSchema = z.object({\n bucket: z.string(),\n accessKeyId: secretStr(),\n secretAccessKey: secretStr(),\n accountId: z.string().optional(),\n endpoint: z.string(),\n region: z.string(),\n profile: z.string().optional(),\n timeoutMs: z.number().optional(),\n})\n\nexport function resolvedR2Endpoint(config: R2Config): string {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.accountId !== undefined && config.accountId !== '') {\n return `https://${config.accountId}.r2.cloudflarestorage.com`\n }\n throw new Error('R2Config requires accountId or endpoint')\n}\n\nexport function r2ToS3Config(config: R2Config): S3Config {\n return {\n bucket: config.bucket,\n region: config.region ?? 'auto',\n endpoint: resolvedR2Endpoint(config),\n accessKeyId: config.accessKeyId,\n secretAccessKey: config.secretAccessKey,\n ...(config.profile !== undefined ? { profile: config.profile } : {}),\n ...(config.timeoutMs !== undefined ? { timeoutMs: config.timeoutMs } : {}),\n }\n}\n\nexport function redactR2Config(config: R2Config): R2ConfigRedacted {\n return redactConfigWithSchema(R2ConfigSchema, {\n ...config,\n endpoint: resolvedR2Endpoint(config),\n region: config.region ?? 'auto',\n }) as unknown as R2ConfigRedacted\n}\n\nexport function normalizeR2Config(input: Record<string, unknown>): R2Config {\n return normalizeFields(input, {\n rename: {\n account_id: 'accountId',\n access_key_id: 'accessKeyId',\n secret_access_key: 'secretAccessKey',\n aws_profile: 'profile',\n endpoint_url: 'endpoint',\n timeout: 'timeoutMs',\n },\n transform: {\n timeout: (v: unknown) => (typeof v === 'number' ? v * 1000 : v),\n },\n drop: ['proxy'],\n }) as unknown as R2Config\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAyB/D,IAAM,iBAAiB,EAAE,OAAO;AAAA,EACrC,QAAQ,EAAE,OAAO;AAAA,EACjB,aAAa,UAAU;AAAA,EACvB,iBAAiB,UAAU;AAAA,EAC3B,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,UAAU,EAAE,OAAO;AAAA,EACnB,QAAQ,EAAE,OAAO;AAAA,EACjB,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAEM,SAAS,mBAAmB,QAA0B;AAC3D,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,MAAI,OAAO,cAAc,UAAa,OAAO,cAAc,IAAI;AAC7D,WAAO,WAAW,OAAO,SAAS;AAAA,EACpC;AACA,QAAM,IAAI,MAAM,yCAAyC;AAC3D;AAEO,SAAS,aAAa,QAA4B;AACvD,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,QAAQ,OAAO,UAAU;AAAA,IACzB,UAAU,mBAAmB,MAAM;AAAA,IACnC,aAAa,OAAO;AAAA,IACpB,iBAAiB,OAAO;AAAA,IACxB,GAAI,OAAO,YAAY,SAAY,EAAE,SAAS,OAAO,QAAQ,IAAI,CAAC;AAAA,IAClE,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;AACF;AAEO,SAAS,eAAe,QAAoC;AACjE,SAAO,uBAAuB,gBAAgB;AAAA,IAC5C,GAAG;AAAA,IACH,UAAU,mBAAmB,MAAM;AAAA,IACnC,QAAQ,OAAO,UAAU;AAAA,EAC3B,CAAC;AACH;AAEO,SAAS,kBAAkB,OAA0C;AAC1E,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,YAAY;AAAA,MACZ,eAAe;AAAA,MACf,mBAAmB;AAAA,MACnB,aAAa;AAAA,MACb,cAAc;AAAA,MACd,SAAS;AAAA,IACX;AAAA,IACA,WAAW;AAAA,MACT,SAAS,CAAC,MAAgB,OAAO,MAAM,WAAW,IAAI,MAAO;AAAA,IAC/D;AAAA,IACA,MAAM,CAAC,OAAO;AAAA,EAChB,CAAC;AACH;","names":[]}
@@ -0,0 +1,26 @@
1
+ // src/resource/gsheets/config.ts
2
+ import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
3
+ var GSheetsConfigSchema = z.object({
4
+ clientId: z.string(),
5
+ clientSecret: secretStr(),
6
+ refreshToken: secretStr()
7
+ });
8
+ function redactGSheetsConfig(config) {
9
+ return redactConfigWithSchema(GSheetsConfigSchema, config);
10
+ }
11
+ function normalizeGSheetsConfig(input) {
12
+ return normalizeFields(input, {
13
+ rename: {
14
+ client_id: "clientId",
15
+ client_secret: "clientSecret",
16
+ refresh_token: "refreshToken"
17
+ }
18
+ });
19
+ }
20
+
21
+ export {
22
+ GSheetsConfigSchema,
23
+ redactGSheetsConfig,
24
+ normalizeGSheetsConfig
25
+ };
26
+ //# sourceMappingURL=chunk-LW25LMIH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/gsheets/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\n\nexport interface GSheetsConfig {\n clientId: string\n clientSecret: string\n refreshToken: string\n refreshFn?: (refreshToken: string) => Promise<{ accessToken: string; expiresIn: number }>\n}\n\nexport interface GSheetsConfigRedacted {\n clientId: string\n clientSecret: '<REDACTED>'\n refreshToken: '<REDACTED>'\n}\n\nexport const GSheetsConfigSchema = z.object({\n clientId: z.string(),\n clientSecret: secretStr(),\n refreshToken: secretStr(),\n})\n\nexport function redactGSheetsConfig(config: GSheetsConfig): GSheetsConfigRedacted {\n return redactConfigWithSchema(GSheetsConfigSchema, config) as unknown as GSheetsConfigRedacted\n}\n\nexport function normalizeGSheetsConfig(input: Record<string, unknown>): GSheetsConfig {\n return normalizeFields(input, {\n rename: {\n client_id: 'clientId',\n client_secret: 'clientSecret',\n refresh_token: 'refreshToken',\n },\n }) as unknown as GSheetsConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAe/D,IAAM,sBAAsB,EAAE,OAAO;AAAA,EAC1C,UAAU,EAAE,OAAO;AAAA,EACnB,cAAc,UAAU;AAAA,EACxB,cAAc,UAAU;AAC1B,CAAC;AAEM,SAAS,oBAAoB,QAA8C;AAChF,SAAO,uBAAuB,qBAAqB,MAAM;AAC3D;AAEO,SAAS,uBAAuB,OAA+C;AACpF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,WAAW;AAAA,MACX,eAAe;AAAA,MACf,eAAe;AAAA,IACjB;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  redactDiscordConfig
3
- } from "./chunk-XVYZO2FG.js";
3
+ } from "./chunk-DNBAMB5J.js";
4
4
 
5
5
  // src/resource/discord/discord.ts
6
6
  import {
7
+ BaseResource,
7
8
  DISCORD_API,
8
9
  DISCORD_COMMANDS,
9
10
  DISCORD_PROMPT,
@@ -12,7 +13,6 @@ import {
12
13
  DiscordAccessor,
13
14
  HttpDiscordTransport,
14
15
  PathSpec,
15
- RAMIndexCacheStore,
16
16
  ResourceName,
17
17
  discordRead,
18
18
  discordReaddir,
@@ -32,7 +32,7 @@ var NodeDiscordTransport = class extends HttpDiscordTransport {
32
32
  return { Authorization: `Bot ${this.token}` };
33
33
  }
34
34
  };
35
- var DiscordResource = class {
35
+ var DiscordResource = class extends BaseResource {
36
36
  kind = ResourceName.DISCORD;
37
37
  isRemote = true;
38
38
  indexTtl = 600;
@@ -40,11 +40,10 @@ var DiscordResource = class {
40
40
  writePrompt = DISCORD_WRITE_PROMPT;
41
41
  config;
42
42
  accessor;
43
- index;
44
43
  constructor(config) {
44
+ super();
45
45
  this.config = config;
46
46
  this.accessor = new DiscordAccessor(new NodeDiscordTransport(config.token));
47
- this.index = new RAMIndexCacheStore({ ttl: this.indexTtl });
48
47
  }
49
48
  open() {
50
49
  return Promise.resolve();
@@ -86,8 +85,6 @@ var DiscordResource = class {
86
85
  getState() {
87
86
  return Promise.resolve({
88
87
  type: this.kind,
89
- needsOverride: true,
90
- redactedFields: ["token"],
91
88
  config: redactDiscordConfig(this.config)
92
89
  });
93
90
  }
@@ -99,4 +96,4 @@ var DiscordResource = class {
99
96
  export {
100
97
  DiscordResource
101
98
  };
102
- //# sourceMappingURL=chunk-WSDQ2MRG.js.map
99
+ //# sourceMappingURL=chunk-LYDMMNL2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/discord/discord.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BaseResource,\n DISCORD_API,\n DISCORD_COMMANDS,\n DISCORD_PROMPT,\n DISCORD_VFS_OPS,\n DISCORD_WRITE_PROMPT,\n DiscordAccessor,\n type FileStat,\n HttpDiscordTransport,\n PathSpec,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n discordRead,\n discordReaddir,\n discordStat,\n resolveDiscordGlob,\n} from '@struktoai/mirage-core'\nimport { redactDiscordConfig, type DiscordConfig, type DiscordConfigRedacted } from './config.ts'\n\nclass NodeDiscordTransport extends HttpDiscordTransport {\n constructor(private readonly token: string) {\n super()\n }\n protected baseUrl(): string {\n return DISCORD_API\n }\n protected authHeaders(): Record<string, string> {\n return { Authorization: `Bot ${this.token}` }\n }\n}\n\nexport interface DiscordResourceState {\n type: string\n config: DiscordConfigRedacted\n}\n\nexport class DiscordResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.DISCORD\n readonly isRemote: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = DISCORD_PROMPT\n readonly writePrompt: string = DISCORD_WRITE_PROMPT\n readonly config: DiscordConfig\n readonly accessor: DiscordAccessor\n\n constructor(config: DiscordConfig) {\n super()\n this.config = config\n this.accessor = new DiscordAccessor(new NodeDiscordTransport(config.token))\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return DISCORD_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return DISCORD_VFS_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return discordRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return discordReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return discordStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return resolveDiscordGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<DiscordResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactDiscordConfig(this.config),\n })\n }\n\n loadState(_state: DiscordResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,IAAM,uBAAN,cAAmC,qBAAqB;AAAA,EACtD,YAA6B,OAAe;AAC1C,UAAM;AADqB;AAAA,EAE7B;AAAA,EAF6B;AAAA,EAGnB,UAAkB;AAC1B,WAAO;AAAA,EACT;AAAA,EACU,cAAsC;AAC9C,WAAO,EAAE,eAAe,OAAO,KAAK,KAAK,GAAG;AAAA,EAC9C;AACF;AAOO,IAAM,kBAAN,cAA8B,aAAiC;AAAA,EAC3D,OAAe,aAAa;AAAA,EAC5B,WAAoB;AAAA,EACpB,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB,cAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EAET,YAAY,QAAuB;AACjC,UAAM;AACN,SAAK,SAAS;AACd,SAAK,WAAW,IAAI,gBAAgB,IAAI,qBAAqB,OAAO,KAAK,CAAC;AAAA,EAC5E;AAAA,EAEA,OAAsB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,QAAuB;AACrB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,WAAyC;AACvC,WAAO;AAAA,EACT;AAAA,EAEA,MAA+B;AAC7B,WAAO;AAAA,EACT;AAAA,EAEA,SAAS,GAAkC;AACzC,WAAO,YAAY,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACjD;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,eAAe,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACpD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,YAAY,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACjD;AAAA,EAEA,MAAM,YAAY,GAAqC;AACrD,UAAM,SAAS,MAAM,KAAK,MAAM,IAAI,EAAE,QAAQ;AAC9C,WAAO,OAAO,OAAO,cAAc;AAAA,EACrC;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,EAAE,WAAW,KACT,IACA,IAAI,SAAS;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACP,IACA;AACN,WAAO,mBAAmB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAChE;AAAA,EAEA,WAA0C;AACxC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,oBAAoB,KAAK,MAAM;AAAA,IACzC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA6C;AACrD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  redactConfig
3
- } from "./chunk-LPMPTQYP.js";
3
+ } from "./chunk-UT2OPSN4.js";
4
4
 
5
5
  // src/resource/s3/s3.ts
6
6
  import {
7
+ BaseResource,
7
8
  copy as copyCore,
8
9
  create as createCore,
9
10
  du as duCore,
@@ -11,8 +12,8 @@ import {
11
12
  exists as existsCore,
12
13
  find as findCore,
13
14
  mkdir as mkdirCore,
15
+ normalizeKeyPrefix,
14
16
  PathSpec,
15
- RAMIndexCacheStore,
16
17
  rangeRead as rangeReadCore,
17
18
  S3_COMMANDS,
18
19
  read as readCore,
@@ -31,14 +32,14 @@ import {
31
32
  unlink as unlinkCore,
32
33
  write as writeCore
33
34
  } from "@struktoai/mirage-core";
34
- var S3Resource = class {
35
+ var S3Resource = class extends BaseResource {
35
36
  kind = ResourceName.S3;
36
37
  isRemote = true;
38
+ supportsSnapshot = true;
37
39
  indexTtl = 600;
38
40
  prompt = S3_PROMPT;
39
41
  config;
40
42
  accessor;
41
- index;
42
43
  opsMap = {
43
44
  read_bytes: readCore,
44
45
  write: writeCore,
@@ -60,9 +61,16 @@ var S3Resource = class {
60
61
  find_flat: findCore
61
62
  };
62
63
  constructor(config) {
63
- this.config = config;
64
+ super();
65
+ const normalized = normalizeKeyPrefix(config.keyPrefix);
66
+ const cfg = { ...config };
67
+ if (normalized !== void 0) {
68
+ cfg.keyPrefix = normalized;
69
+ } else {
70
+ delete cfg.keyPrefix;
71
+ }
72
+ this.config = cfg;
64
73
  this.accessor = new S3Accessor(this.config);
65
- this.index = new RAMIndexCacheStore({ ttl: this.indexTtl });
66
74
  }
67
75
  open() {
68
76
  return Promise.resolve();
@@ -162,8 +170,6 @@ var S3Resource = class {
162
170
  getState() {
163
171
  return Promise.resolve({
164
172
  type: this.kind,
165
- needsOverride: true,
166
- redactedFields: ["accessKeyId", "secretAccessKey", "sessionToken"],
167
173
  config: redactConfig(this.config)
168
174
  });
169
175
  }
@@ -175,4 +181,4 @@ var S3Resource = class {
175
181
  export {
176
182
  S3Resource
177
183
  };
178
- //# sourceMappingURL=chunk-G7O6DAWU.js.map
184
+ //# sourceMappingURL=chunk-MHCMHKM6.js.map