@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 @@
1
+ {"version":3,"sources":["../src/resource/redis/redis.ts","../src/commands/builtin/redis/index.ts","../src/core/redis/read.ts","../src/core/redis/utils.ts","../src/core/redis/stat.ts","../src/commands/builtin/redis/awk.ts","../src/core/redis/stream.ts","../src/commands/builtin/redis/base64_cmd.ts","../src/commands/builtin/redis/basename.ts","../src/commands/builtin/redis/cat/cat.ts","../src/commands/builtin/redis/cmp.ts","../src/commands/builtin/redis/column.ts","../src/commands/builtin/redis/comm.ts","../src/commands/builtin/redis/cp.ts","../src/core/redis/copy.ts","../src/core/redis/find.ts","../src/commands/builtin/redis/csplit.ts","../src/core/redis/write.ts","../src/commands/builtin/redis/cut/cut.ts","../src/commands/builtin/redis/diff.ts","../src/commands/builtin/redis/dirname.ts","../src/commands/builtin/redis/du.ts","../src/core/redis/du.ts","../src/commands/builtin/redis/expand.ts","../src/commands/builtin/redis/file/file.ts","../src/commands/builtin/redis/find.ts","../src/commands/builtin/redis/fmt.ts","../src/commands/builtin/redis/fold.ts","../src/commands/builtin/redis/grep/grep.ts","../src/core/redis/readdir.ts","../src/core/redis/entry.ts","../src/commands/builtin/redis/gunzip.ts","../src/core/redis/unlink.ts","../src/commands/builtin/redis/gzip.ts","../src/commands/builtin/redis/head/head.ts","../src/commands/builtin/redis/iconv.ts","../src/commands/builtin/redis/join.ts","../src/commands/builtin/redis/jq.ts","../src/commands/builtin/redis/ln.ts","../src/core/redis/exists.ts","../src/commands/builtin/redis/look.ts","../src/commands/builtin/redis/ls/ls.ts","../src/commands/builtin/redis/md5.ts","../src/commands/builtin/redis/mkdir.ts","../src/core/redis/mkdir.ts","../src/commands/builtin/redis/mktemp.ts","../src/commands/builtin/redis/mv.ts","../src/core/redis/rename.ts","../src/commands/builtin/redis/nl.ts","../src/commands/builtin/redis/paste.ts","../src/commands/builtin/redis/patch.ts","../src/commands/builtin/redis/readlink.ts","../src/commands/builtin/redis/realpath.ts","../src/commands/builtin/redis/rev.ts","../src/commands/builtin/redis/rg.ts","../src/commands/builtin/redis/rm.ts","../src/core/redis/rmdir.ts","../src/core/redis/rm.ts","../src/commands/builtin/redis/sed.ts","../src/commands/builtin/redis/sha256sum.ts","../src/commands/builtin/redis/shuf.ts","../src/commands/builtin/redis/sort.ts","../src/commands/builtin/redis/split.ts","../src/commands/builtin/redis/stat/stat.ts","../src/commands/builtin/redis/strings.ts","../src/commands/builtin/redis/tac.ts","../src/commands/builtin/redis/tail/tail.ts","../src/commands/builtin/redis/tar.ts","../src/commands/builtin/redis/tee.ts","../src/commands/builtin/redis/touch.ts","../src/commands/builtin/redis/tr.ts","../src/commands/builtin/redis/tree.ts","../src/commands/builtin/redis/tsort.ts","../src/commands/builtin/redis/unexpand.ts","../src/commands/builtin/redis/uniq.ts","../src/commands/builtin/redis/unzip.ts","../src/commands/builtin/redis/wc/wc.ts","../src/commands/builtin/redis/xxd.ts","../src/commands/builtin/redis/zcat.ts","../src/commands/builtin/redis/zgrep.ts","../src/commands/builtin/redis/zip_cmd.ts","../src/accessor/redis.ts","../src/core/redis/append.ts","../src/core/redis/create.ts","../src/core/redis/glob.ts","../src/core/redis/constants.ts","../src/core/redis/truncate.ts","../src/ops/redis/append.ts","../src/ops/redis/create.ts","../src/ops/redis/mkdir.ts","../src/ops/redis/read.ts","../src/ops/redis/read_feather.ts","../src/ops/redis/read_hdf5.ts","../src/ops/redis/read_parquet.ts","../src/ops/redis/readdir.ts","../src/ops/redis/rename.ts","../src/ops/redis/rmdir.ts","../src/ops/redis/stat.ts","../src/ops/redis/truncate.ts","../src/ops/redis/unlink.ts","../src/ops/redis/write.ts","../src/ops/redis/index.ts","../src/resource/redis/prompt.ts","../src/resource/redis/store.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 type FileStat,\n type FindOptions,\n PathSpec,\n type RegisteredCommand,\n type RegisteredOp,\n REDACTED_SECRET,\n type Resource,\n ResourceName,\n} from '@struktoai/mirage-core'\nimport { REDIS_COMMANDS } from '../../commands/builtin/redis/index.ts'\nimport type { RedisClientType } from 'redis'\nimport { RedisAccessor } from '../../accessor/redis.ts'\nimport { appendBytes } from '../../core/redis/append.ts'\nimport { copy as copyCore } from '../../core/redis/copy.ts'\nimport { create as createCore } from '../../core/redis/create.ts'\nimport { du as duCore, duAll as duAllCore } from '../../core/redis/du.ts'\nimport { exists as existsCore } from '../../core/redis/exists.ts'\nimport { find as findCore, type FindOptions as RedisFindOptions } from '../../core/redis/find.ts'\nimport { resolveGlob as globCore } from '../../core/redis/glob.ts'\nimport { mkdir as mkdirCore } from '../../core/redis/mkdir.ts'\nimport { read as readCore } from '../../core/redis/read.ts'\nimport { readdir as readdirCore } from '../../core/redis/readdir.ts'\nimport { rename as renameCore } from '../../core/redis/rename.ts'\nimport { rmR as rmRCore } from '../../core/redis/rm.ts'\nimport { rmdir as rmdirCore } from '../../core/redis/rmdir.ts'\nimport { stat as statCore } from '../../core/redis/stat.ts'\nimport { stream as streamCore } from '../../core/redis/stream.ts'\nimport { truncate as truncateCore } from '../../core/redis/truncate.ts'\nimport { unlink as unlinkCore } from '../../core/redis/unlink.ts'\nimport { writeBytes as writeCore } from '../../core/redis/write.ts'\nimport { REDIS_OPS } from '../../ops/redis/index.ts'\nimport { REDIS_PROMPT } from './prompt.ts'\nimport { RedisStore } from './store.ts'\n\nexport interface RedisResourceOptions {\n url?: string\n keyPrefix?: string\n}\n\nexport interface RedisModule {\n createClient: (options: { url: string }) => RedisClientType\n RESP_TYPES: { readonly BLOB_STRING: number }\n}\n\nexport interface RedisResourceState {\n type: string\n config: {\n url: typeof REDACTED_SECRET\n keyPrefix: string\n }\n keyPrefix: string\n files: Record<string, Uint8Array>\n dirs: string[]\n}\n\nexport class RedisResource extends BaseResource implements Resource {\n readonly kind: string = ResourceName.REDIS\n readonly isRemote: boolean = false\n readonly indexTtl: number = 0\n readonly prompt: string = REDIS_PROMPT\n readonly url: string\n readonly keyPrefix: string\n readonly store: RedisStore\n readonly accessor: RedisAccessor\n\n readonly opsMap: Record<string, unknown> = {\n read_bytes: readCore,\n write: writeCore,\n readdir: readdirCore,\n stat: statCore,\n unlink: unlinkCore,\n rmdir: rmdirCore,\n copy: copyCore,\n rename: renameCore,\n mkdir: mkdirCore,\n read_stream: streamCore,\n rm_recursive: rmRCore,\n du_total: duCore,\n du_all: duAllCore,\n create: createCore,\n truncate: truncateCore,\n exists: existsCore,\n find_flat: findCore,\n append: appendBytes,\n }\n\n constructor(options: RedisResourceOptions = {}) {\n super()\n this.url = options.url ?? 'redis://localhost:6379/0'\n this.keyPrefix = options.keyPrefix ?? 'mirage:fs:'\n this.store = new RedisStore({ url: this.url, keyPrefix: this.keyPrefix })\n this.accessor = new RedisAccessor(this.store)\n }\n\n async open(): Promise<void> {\n await this.store.client()\n }\n\n close(): Promise<void> {\n return this.store.close()\n }\n\n client(): Promise<RedisClientType> {\n return this.store.client()\n }\n\n protected module(): Promise<RedisModule> {\n return import('redis') as unknown as Promise<RedisModule>\n }\n\n ops(): readonly RegisteredOp[] {\n return REDIS_OPS\n }\n\n commands(): readonly RegisteredCommand[] {\n return REDIS_COMMANDS\n }\n\n streamPath(p: PathSpec): AsyncIterable<Uint8Array> {\n return streamCore(this.accessor, p)\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return readCore(this.accessor, p)\n }\n\n writeFile(p: PathSpec, data: Uint8Array): Promise<void> {\n return writeCore(this.accessor, p, data)\n }\n\n appendFile(p: PathSpec, data: Uint8Array): Promise<void> {\n return appendBytes(this.accessor, p, data)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return readdirCore(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return statCore(this.accessor, p)\n }\n\n exists(p: PathSpec): Promise<boolean> {\n return existsCore(this.accessor, p)\n }\n\n mkdir(p: PathSpec, options?: { recursive?: boolean }): Promise<void> {\n return mkdirCore(this.accessor, p, options?.recursive === true)\n }\n\n rmdir(p: PathSpec): Promise<void> {\n return rmdirCore(this.accessor, p)\n }\n\n unlink(p: PathSpec): Promise<void> {\n return unlinkCore(this.accessor, p)\n }\n\n rename(src: PathSpec, dst: PathSpec): Promise<void> {\n return renameCore(this.accessor, src, dst)\n }\n\n truncate(p: PathSpec, length: number): Promise<void> {\n return truncateCore(this.accessor, p, length)\n }\n\n copy(src: PathSpec, dst: PathSpec): Promise<void> {\n return copyCore(this.accessor, src, dst)\n }\n\n rmR(p: PathSpec): Promise<void> {\n return rmRCore(this.accessor, p)\n }\n\n du(p: PathSpec): Promise<number> {\n return duCore(this.accessor, p)\n }\n\n find(p: PathSpec, options: FindOptions = {}): Promise<string[]> {\n return findCore(this.accessor, p, options as RedisFindOptions)\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 globCore(this.accessor, effective, this.index)\n }\n\n async getState(): Promise<RedisResourceState> {\n const files: Record<string, Uint8Array> = {}\n for (const key of await this.store.listFiles()) {\n const data = await this.store.getFile(key)\n if (data !== null) files[key] = data\n }\n const dirs = [...(await this.store.listDirs())].sort()\n return {\n type: this.kind,\n config: {\n url: REDACTED_SECRET,\n keyPrefix: this.keyPrefix,\n },\n keyPrefix: this.keyPrefix,\n files,\n dirs,\n }\n }\n\n async loadState(state: RedisResourceState): Promise<void> {\n const c = await this.store.client()\n const pipe = c.multi()\n const dirKey = `${this.keyPrefix}dir`\n for (const [path, data] of Object.entries(state.files)) {\n pipe.set(\n `${this.keyPrefix}file:${path}`,\n Buffer.from(data.buffer, data.byteOffset, data.byteLength),\n )\n }\n for (const dir of state.dirs) {\n pipe.sAdd(dirKey, dir)\n }\n await pipe.exec()\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\nimport { makeFiletypeCommands, ResourceName, type RegisteredCommand } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { read as redisRead } from '../../../core/redis/read.ts'\nimport { stat as redisStat } from '../../../core/redis/stat.ts'\nimport { REDIS_AWK } from './awk.ts'\nimport { REDIS_BASE64 } from './base64_cmd.ts'\nimport { REDIS_BASENAME } from './basename.ts'\nimport { REDIS_CAT } from './cat/cat.ts'\nimport { REDIS_CMP } from './cmp.ts'\nimport { REDIS_COLUMN } from './column.ts'\nimport { REDIS_COMM } from './comm.ts'\nimport { REDIS_CP } from './cp.ts'\nimport { REDIS_CSPLIT } from './csplit.ts'\nimport { REDIS_CUT } from './cut/cut.ts'\nimport { REDIS_DIFF } from './diff.ts'\nimport { REDIS_DIRNAME } from './dirname.ts'\nimport { REDIS_DU } from './du.ts'\nimport { REDIS_EXPAND } from './expand.ts'\nimport { REDIS_FILE } from './file/file.ts'\nimport { REDIS_FIND } from './find.ts'\nimport { REDIS_FMT } from './fmt.ts'\nimport { REDIS_FOLD } from './fold.ts'\nimport { REDIS_GREP } from './grep/grep.ts'\nimport { REDIS_GUNZIP } from './gunzip.ts'\nimport { REDIS_GZIP } from './gzip.ts'\nimport { REDIS_HEAD } from './head/head.ts'\nimport { REDIS_ICONV } from './iconv.ts'\nimport { REDIS_JOIN } from './join.ts'\nimport { REDIS_JQ } from './jq.ts'\nimport { REDIS_LN } from './ln.ts'\nimport { REDIS_LOOK } from './look.ts'\nimport { REDIS_LS } from './ls/ls.ts'\nimport { REDIS_MD5 } from './md5.ts'\nimport { REDIS_MKDIR } from './mkdir.ts'\nimport { REDIS_MKTEMP } from './mktemp.ts'\nimport { REDIS_MV } from './mv.ts'\nimport { REDIS_NL } from './nl.ts'\nimport { REDIS_PASTE } from './paste.ts'\nimport { REDIS_PATCH } from './patch.ts'\nimport { REDIS_READLINK } from './readlink.ts'\nimport { REDIS_REALPATH } from './realpath.ts'\nimport { REDIS_REV } from './rev.ts'\nimport { REDIS_RG } from './rg.ts'\nimport { REDIS_RM } from './rm.ts'\nimport { REDIS_SED } from './sed.ts'\nimport { REDIS_SHA256SUM } from './sha256sum.ts'\nimport { REDIS_SHUF } from './shuf.ts'\nimport { REDIS_SORT } from './sort.ts'\nimport { REDIS_SPLIT } from './split.ts'\nimport { REDIS_STAT } from './stat/stat.ts'\nimport { REDIS_STRINGS } from './strings.ts'\nimport { REDIS_TAC } from './tac.ts'\nimport { REDIS_TAIL } from './tail/tail.ts'\nimport { REDIS_TAR } from './tar.ts'\nimport { REDIS_TEE } from './tee.ts'\nimport { REDIS_TOUCH } from './touch.ts'\nimport { REDIS_TR } from './tr.ts'\nimport { REDIS_TREE } from './tree.ts'\nimport { REDIS_TSORT } from './tsort.ts'\nimport { REDIS_UNEXPAND } from './unexpand.ts'\nimport { REDIS_UNIQ } from './uniq.ts'\nimport { REDIS_UNZIP } from './unzip.ts'\nimport { REDIS_WC } from './wc/wc.ts'\nimport { REDIS_XXD } from './xxd.ts'\nimport { REDIS_ZCAT } from './zcat.ts'\nimport { REDIS_ZGREP } from './zgrep.ts'\nimport { REDIS_ZIP } from './zip_cmd.ts'\n\nexport const REDIS_COMMANDS: readonly RegisteredCommand[] = [\n ...makeFiletypeCommands<RedisAccessor>({\n resource: ResourceName.REDIS,\n readBytes: redisRead,\n statEntry: redisStat,\n }),\n ...REDIS_AWK,\n ...REDIS_BASE64,\n ...REDIS_BASENAME,\n ...REDIS_CAT,\n ...REDIS_CMP,\n ...REDIS_COLUMN,\n ...REDIS_COMM,\n ...REDIS_CP,\n ...REDIS_CSPLIT,\n ...REDIS_CUT,\n ...REDIS_DIFF,\n ...REDIS_DIRNAME,\n ...REDIS_DU,\n ...REDIS_EXPAND,\n ...REDIS_FILE,\n ...REDIS_FIND,\n ...REDIS_FMT,\n ...REDIS_FOLD,\n ...REDIS_GREP,\n ...REDIS_GUNZIP,\n ...REDIS_GZIP,\n ...REDIS_HEAD,\n ...REDIS_ICONV,\n ...REDIS_JOIN,\n ...REDIS_JQ,\n ...REDIS_LN,\n ...REDIS_LOOK,\n ...REDIS_LS,\n ...REDIS_MD5,\n ...REDIS_MKDIR,\n ...REDIS_MKTEMP,\n ...REDIS_MV,\n ...REDIS_NL,\n ...REDIS_PASTE,\n ...REDIS_PATCH,\n ...REDIS_READLINK,\n ...REDIS_REALPATH,\n ...REDIS_REV,\n ...REDIS_RG,\n ...REDIS_RM,\n ...REDIS_SED,\n ...REDIS_SHA256SUM,\n ...REDIS_SHUF,\n ...REDIS_SORT,\n ...REDIS_SPLIT,\n ...REDIS_STAT,\n ...REDIS_STRINGS,\n ...REDIS_TAC,\n ...REDIS_TAIL,\n ...REDIS_TAR,\n ...REDIS_TEE,\n ...REDIS_TOUCH,\n ...REDIS_TR,\n ...REDIS_TREE,\n ...REDIS_TSORT,\n ...REDIS_UNEXPAND,\n ...REDIS_UNIQ,\n ...REDIS_UNZIP,\n ...REDIS_WC,\n ...REDIS_XXD,\n ...REDIS_ZCAT,\n ...REDIS_ZGREP,\n ...REDIS_ZIP,\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\nimport { type IndexCacheStore, record, ResourceName, type PathSpec } from '@struktoai/mirage-core'\nimport { enoent } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm } from './utils.ts'\n\nexport async function read(\n accessor: RedisAccessor,\n path: PathSpec,\n _index?: IndexCacheStore,\n): Promise<Uint8Array> {\n const start = performance.now()\n const p = norm(path.stripPrefix)\n const data = await accessor.store.getFile(p)\n if (data === null) {\n throw enoent(path)\n }\n record('read', p, ResourceName.REDIS, data.byteLength, start)\n return data\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 { norm, parent, gnuBasename as basename } from '@struktoai/mirage-core'\n\nexport function nowIso(): string {\n return new Date().toISOString()\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\nimport {\n FileStat,\n FileType,\n guessType,\n type IndexCacheStore,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { enoent } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { basename, norm } from './utils.ts'\n\nexport async function stat(\n accessor: RedisAccessor,\n path: PathSpec,\n _index?: IndexCacheStore,\n): Promise<FileStat> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n if (await store.hasDir(p)) {\n return new FileStat({\n name: basename(p),\n modified: await store.getModified(p),\n type: FileType.DIRECTORY,\n })\n }\n if (await store.hasFile(p)) {\n const size = await store.fileLen(p)\n return new FileStat({\n name: basename(p),\n size,\n modified: await store.getModified(p),\n type: guessType(p),\n })\n }\n throw enoent(path)\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\nimport { ResourceName, awkGeneric, command, specOf } from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nexport const REDIS_AWK = command({\n name: 'awk',\n resource: ResourceName.REDIS,\n spec: specOf('awk'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n awkGeneric(paths, texts, opts, (p) => redisStream(accessor, p)),\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\nimport {\n type IndexCacheStore,\n recordStream,\n ResourceName,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { enoent } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm } from './utils.ts'\n\nexport async function* stream(\n accessor: RedisAccessor,\n path: PathSpec,\n _index?: IndexCacheStore,\n): AsyncIterable<Uint8Array> {\n const p = norm(path.stripPrefix)\n const data = await accessor.store.getFile(p)\n if (data === null) throw enoent(path)\n const rec = recordStream('read', p, ResourceName.REDIS)\n if (rec !== null) rec.bytes = data.byteLength\n yield data\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\nimport { ResourceName, command, specOf, base64Generic } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_BASE64 = command({\n name: 'base64',\n resource: ResourceName.REDIS,\n spec: specOf('base64'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n base64Generic(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, basenameFn } from '@struktoai/mirage-core'\n\nexport const REDIS_BASENAME = command({\n name: 'basename',\n resource: ResourceName.REDIS,\n spec: specOf('basename'),\n fn: basenameFn,\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\nimport {\n ResourceName,\n catGeneric,\n catProvisionGeneric,\n command,\n concatAggregate,\n specOf,\n} from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../../core/redis/stream.ts'\nimport { stat as redisStat } from '../../../../core/redis/stat.ts'\nimport type { RedisAccessor } from '../../../../accessor/redis.ts'\n\nexport const REDIS_CAT = command({\n name: 'cat',\n resource: ResourceName.REDIS,\n spec: specOf('cat'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n catGeneric(\n paths,\n texts,\n opts,\n (p) => redisStat(accessor, p),\n (p) => redisStream(accessor, p),\n ),\n provision: (accessor: RedisAccessor, paths, _texts, _opts) =>\n catProvisionGeneric(paths, (p) => redisStat(accessor, p)),\n aggregate: concatAggregate,\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\nimport { ResourceName, command, specOf, cmpGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_CMP = command({\n name: 'cmp',\n resource: ResourceName.REDIS,\n spec: specOf('cmp'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n cmpGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, columnGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_COLUMN = command({\n name: 'column',\n resource: ResourceName.REDIS,\n spec: specOf('column'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n columnGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, commGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_COMM = command({\n name: 'comm',\n resource: ResourceName.REDIS,\n spec: specOf('comm'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n commGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport {\n IOResult,\n ResourceName,\n command,\n cpGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type FindOptions,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { copy as coreCopy } from '../../../core/redis/copy.ts'\nimport { find as coreFind } from '../../../core/redis/find.ts'\nimport { stat as coreStat } from '../../../core/redis/stat.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nfunction cpCommand(\n accessor: RedisAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n if (paths.length < 2) {\n return Promise.resolve([\n null,\n new IOResult({ exitCode: 1, stderr: new TextEncoder().encode('cp: missing operand\\n') }),\n ])\n }\n const recursive = opts.flags.r === true || opts.flags.R === true || opts.flags.a === true\n return cpGeneric(\n paths,\n (src: PathSpec, target: PathSpec) => coreCopy(accessor, src, target),\n (src: PathSpec, options: FindOptions) => coreFind(accessor, src, options),\n (p: PathSpec) => coreStat(accessor, p),\n recursive,\n opts.flags.n === true,\n opts.flags.v === true,\n opts.index ?? undefined,\n )\n}\n\nexport const REDIS_CP = command({\n name: 'cp',\n resource: ResourceName.REDIS,\n spec: specOf('cp'),\n fn: cpCommand,\n write: true,\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\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm, nowIso } from './utils.ts'\n\nexport async function copy(accessor: RedisAccessor, src: PathSpec, dst: PathSpec): Promise<void> {\n const s = norm(src.stripPrefix)\n const d = norm(dst.stripPrefix)\n const store = accessor.store\n const data = await store.getFile(s)\n if (data === null) {\n throw new Error(`file not found: ${s}`)\n }\n await store.setFile(d, data)\n await store.setModified(d, nowIso())\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\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm } from './utils.ts'\nimport { rstripSlash } from '@struktoai/mirage-core'\nimport { buildTree, computeNonemptyDirs, keep, type PredNode } from '@struktoai/mirage-core'\n\nexport interface FindOptions {\n name?: string | null\n type?: 'f' | 'd' | null\n minSize?: number | null\n maxSize?: number | null\n maxDepth?: number | null\n minDepth?: number | null\n nameExclude?: string | null\n orNames?: string[] | null\n iname?: string | null\n pathPattern?: string | null\n empty?: boolean | null\n tree?: PredNode | null\n}\n\nexport async function find(\n accessor: RedisAccessor,\n path: PathSpec,\n options: FindOptions = {},\n): Promise<string[]> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n const prefix = rstripSlash(p) + '/'\n const baseDepth = p === '/' ? 0 : (p.match(/\\//g) ?? []).length\n const results: string[] = []\n const tree =\n options.tree ??\n buildTree({\n name: options.name,\n iname: options.iname,\n pathPattern: options.pathPattern,\n type: options.type,\n nameExclude: options.nameExclude,\n orNames: options.orNames,\n empty: options.empty,\n })\n const empty = options.empty === true\n const allFiles = await store.listFiles()\n const allDirs = await store.listDirs()\n const nonempty = empty\n ? computeNonemptyDirs([...allFiles, ...[...allDirs].filter((k) => k !== '/')])\n : new Set<string>()\n const candidates: [string, 'f' | 'd'][] = []\n if (options.type !== 'd') {\n for (const key of allFiles) candidates.push([key, 'f'])\n }\n if (options.type !== 'f') {\n for (const key of allDirs) {\n if (key !== '/') candidates.push([key, 'd'])\n }\n }\n for (const [key, kind] of candidates) {\n if (key !== p && !key.startsWith(prefix)) continue\n const depth = (key.match(/\\//g) ?? []).length - baseDepth\n if (options.maxDepth !== null && options.maxDepth !== undefined && depth > options.maxDepth)\n continue\n const basename = key.slice(key.lastIndexOf('/') + 1)\n let isEmpty: boolean | null = null\n if (empty) {\n isEmpty = kind === 'f' ? (await store.fileLen(key)) === 0 : !nonempty.has(key)\n }\n if (!keep({ key, name: basename, kind, depth, isEmpty }, tree, options.minDepth)) continue\n if (\n kind === 'f' &&\n ((options.minSize !== null && options.minSize !== undefined) ||\n (options.maxSize !== null && options.maxSize !== undefined))\n ) {\n const size = await store.fileLen(key)\n if (options.minSize !== null && options.minSize !== undefined && size < options.minSize)\n continue\n if (options.maxSize !== null && options.maxSize !== undefined && size > options.maxSize)\n continue\n }\n results.push(key)\n }\n results.sort()\n return results\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\nimport { ResourceName, command, specOf, csplitGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\n\nexport const REDIS_CSPLIT = command({\n name: 'csplit',\n resource: ResourceName.REDIS,\n spec: specOf('csplit'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n csplitGeneric(\n paths,\n texts,\n opts,\n (p) => redisStream(accessor, p),\n (p, d) => redisWrite(accessor, p, d),\n ),\n write: true,\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\nimport { record, ResourceName, type PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm, nowIso, parent } from './utils.ts'\n\nexport async function writeBytes(\n accessor: RedisAccessor,\n path: PathSpec,\n data: Uint8Array,\n): Promise<void> {\n const start = performance.now()\n const p = norm(path.stripPrefix)\n const par = parent(p)\n const store = accessor.store\n if (par !== '/' && !(await store.hasDir(par))) {\n throw new Error(`parent directory does not exist: ${par}`)\n }\n await store.setFile(p, data)\n await store.setModified(p, nowIso())\n record('write', p, ResourceName.REDIS, data.byteLength, start)\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\nimport { ResourceName, command, cutGeneric, specOf } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../../core/redis/stream.ts'\n\nexport const REDIS_CUT = command({\n name: 'cut',\n resource: ResourceName.REDIS,\n spec: specOf('cut'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n cutGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, diffGeneric, specOf } from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nexport const REDIS_DIFF = command({\n name: 'diff',\n resource: ResourceName.REDIS,\n spec: specOf('diff'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n diffGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, dirnameFn } from '@struktoai/mirage-core'\n\nexport const REDIS_DIRNAME = command({\n name: 'dirname',\n resource: ResourceName.REDIS,\n spec: specOf('dirname'),\n fn: dirnameFn,\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\nimport { ResourceName, command, duGeneric, specOf } from '@struktoai/mirage-core'\nimport { du as redisDu, duAll as redisDuAll } from '../../../core/redis/du.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nexport const REDIS_DU = command({\n name: 'du',\n resource: ResourceName.REDIS,\n spec: specOf('du'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n duGeneric(\n paths,\n opts,\n (p) => redisDu(accessor, p),\n async (p) => {\n const { entries, total } = await redisDuAll(accessor, p)\n return [entries, total]\n },\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\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm } from './utils.ts'\nimport { rstripSlash } from '@struktoai/mirage-core'\n\nexport async function du(accessor: RedisAccessor, path: PathSpec): Promise<number> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n const prefix = rstripSlash(p) + '/'\n let total = 0\n for (const key of await store.listFiles()) {\n if (key === p || key.startsWith(prefix)) {\n total += await store.fileLen(key)\n }\n }\n return total\n}\n\nexport async function duAll(\n accessor: RedisAccessor,\n path: PathSpec,\n): Promise<{ entries: [string, number][]; total: number }> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n const prefix = rstripSlash(p) + '/'\n const entries: [string, number][] = []\n let total = 0\n for (const key of await store.listFiles()) {\n if (key === p || key.startsWith(prefix)) {\n const size = await store.fileLen(key)\n entries.push([key, size])\n total += size\n }\n }\n return { entries, total }\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\nimport { ResourceName, command, specOf, expandGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_EXPAND = command({\n name: 'expand',\n resource: ResourceName.REDIS,\n spec: specOf('expand'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n expandGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, fileGeneric, specOf } from '@struktoai/mirage-core'\nimport { stat as redisStat } from '../../../../core/redis/stat.ts'\nimport { read as redisRead } from '../../../../core/redis/read.ts'\nimport type { RedisAccessor } from '../../../../accessor/redis.ts'\n\nexport const REDIS_FILE = command({\n name: 'file',\n resource: ResourceName.REDIS,\n spec: specOf('file'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n fileGeneric(\n paths,\n opts,\n (p) => redisStat(accessor, p),\n (p) => redisRead(accessor, p),\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\nimport { ResourceName, command, findGeneric, specOf } from '@struktoai/mirage-core'\nimport { find as redisFind } from '../../../core/redis/find.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nexport const REDIS_FIND = command({\n name: 'find',\n resource: ResourceName.REDIS,\n spec: specOf('find'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n findGeneric(paths, texts, opts, (root, options) => redisFind(accessor, root, options)),\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\nimport {\n ResourceName,\n command,\n fmtGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nasync function fmtCommand(\n accessor: RedisAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n return fmtGeneric(paths, opts, (p) => redisStream(accessor, p))\n}\n\nexport const REDIS_FMT = command({\n name: 'fmt',\n resource: ResourceName.REDIS,\n spec: specOf('fmt'),\n fn: fmtCommand,\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\nimport { ResourceName, command, specOf, foldGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_FOLD = command({\n name: 'fold',\n resource: ResourceName.REDIS,\n spec: specOf('fold'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n foldGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, grepGeneric, prefixAggregate, specOf } from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../../core/redis/stream.ts'\nimport { stat as redisStat } from '../../../../core/redis/stat.ts'\nimport { readdir as redisReaddir } from '../../../../core/redis/readdir.ts'\nimport type { RedisAccessor } from '../../../../accessor/redis.ts'\n\nexport const REDIS_GREP = command({\n name: 'grep',\n resource: ResourceName.REDIS,\n spec: specOf('grep'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n grepGeneric(\n 'grep',\n paths,\n texts,\n opts,\n (p) => redisStat(accessor, p),\n (p) => redisReaddir(accessor, p),\n (p) => redisStream(accessor, p),\n ),\n aggregate: prefixAggregate,\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\nimport { type IndexCacheStore, type PathSpec } from '@struktoai/mirage-core'\nimport { enotdir } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { RedisIndexEntry } from './entry.ts'\nimport { norm } from './utils.ts'\n\nexport async function readdir(\n accessor: RedisAccessor,\n path: PathSpec,\n index?: IndexCacheStore,\n): Promise<string[]> {\n const virtual = path.pattern !== null ? path.directory : path.stripPrefix\n const mountPrefix = path.prefix\n const virtualKey = mountPrefix + virtual\n if (index !== undefined) {\n const cached = await index.listDir(virtualKey)\n if (cached.entries !== undefined && cached.entries !== null) {\n return cached.entries\n }\n }\n const store = accessor.store\n const p = norm(virtual)\n if (!(await store.hasDir(p))) {\n throw enotdir(path)\n }\n const dirPrefix = p === '/' ? '/' : `${p}/`\n const seen = new Set<string>()\n const files = await store.listFiles()\n const dirs = await store.listDirs()\n for (const key of [...files, ...dirs]) {\n if (key === p) continue\n if (!key.startsWith(dirPrefix)) continue\n const remainder = key.slice(dirPrefix.length)\n const first = remainder.split('/')[0]\n if (first !== undefined && first.length > 0) seen.add(dirPrefix + first)\n }\n const sorted = [...seen].sort()\n const virtualEntries = sorted.map((entry) => `${mountPrefix}${entry}`)\n if (index !== undefined) {\n const fileSet = new Set(files)\n const entries: [string, RedisIndexEntry][] = sorted.map((e) => {\n const name = e.slice(e.lastIndexOf('/') + 1)\n return [name, fileSet.has(e) ? RedisIndexEntry.file(e) : RedisIndexEntry.folder(e)]\n })\n await index.setDir(virtualKey, entries)\n }\n return virtualEntries\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\nimport { IndexEntry } from '@struktoai/mirage-core'\n\nexport const RedisResourceType = Object.freeze({\n FILE: 'file',\n FOLDER: 'folder',\n} as const)\n\nexport type RedisResourceType = (typeof RedisResourceType)[keyof typeof RedisResourceType]\n\nexport class RedisIndexEntry extends IndexEntry {\n static file(path: string, size = 0): RedisIndexEntry {\n const name = path.slice(path.lastIndexOf('/') + 1)\n return new RedisIndexEntry({\n id: path,\n name,\n resourceType: RedisResourceType.FILE,\n vfsName: name,\n size,\n })\n }\n\n static folder(path: string): RedisIndexEntry {\n const name = path.slice(path.lastIndexOf('/') + 1)\n return new RedisIndexEntry({\n id: path,\n name,\n resourceType: RedisResourceType.FOLDER,\n vfsName: name,\n })\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\nimport { ResourceName, command, specOf, gunzipGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\nimport { unlink as redisUnlink } from '../../../core/redis/unlink.ts'\n\nexport const REDIS_GUNZIP = command({\n name: 'gunzip',\n resource: ResourceName.REDIS,\n spec: specOf('gunzip'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n gunzipGeneric(\n paths,\n opts,\n (p) => redisStream(accessor, p),\n (p, d) => redisWrite(accessor, p, d),\n (p) => redisUnlink(accessor, p),\n ),\n write: true,\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\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm } from './utils.ts'\n\nexport async function unlink(accessor: RedisAccessor, path: PathSpec): Promise<void> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n if (!(await store.hasFile(p))) {\n throw new Error(`file not found: ${p}`)\n }\n await store.delFile(p)\n await store.delModified(p)\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\nimport { ResourceName, command, specOf, gzipGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\nimport { unlink as redisUnlink } from '../../../core/redis/unlink.ts'\n\nexport const REDIS_GZIP = command({\n name: 'gzip',\n resource: ResourceName.REDIS,\n spec: specOf('gzip'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n gzipGeneric(\n paths,\n opts,\n (p) => redisStream(accessor, p),\n (p, d) => redisWrite(accessor, p, d),\n (p) => redisUnlink(accessor, p),\n ),\n write: true,\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\nimport {\n ResourceName,\n command,\n headGeneric,\n headProvisionGeneric,\n headerAggregate,\n specOf,\n} from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../../core/redis/stream.ts'\nimport { stat as redisStat } from '../../../../core/redis/stat.ts'\nimport type { RedisAccessor } from '../../../../accessor/redis.ts'\n\nexport const REDIS_HEAD = command({\n name: 'head',\n resource: ResourceName.REDIS,\n spec: specOf('head'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n headGeneric(\n paths,\n texts,\n opts,\n (p) => redisStat(accessor, p),\n (p) => redisStream(accessor, p),\n ),\n provision: (accessor: RedisAccessor, paths, texts, opts) =>\n headProvisionGeneric(paths, texts, opts, (p) => redisStat(accessor, p)),\n aggregate: headerAggregate,\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\nimport { ResourceName, command, specOf, iconvGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\n\nexport const REDIS_ICONV = command({\n name: 'iconv',\n resource: ResourceName.REDIS,\n spec: specOf('iconv'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n iconvGeneric(\n paths,\n opts,\n (p) => redisStream(accessor, p),\n (p, d) => redisWrite(accessor, p, d),\n ),\n write: true,\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\nimport { ResourceName, command, specOf, joinGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_JOIN = command({\n name: 'join',\n resource: ResourceName.REDIS,\n spec: specOf('join'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n joinGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport {\n ResourceName,\n command,\n jqGeneric,\n jqProvisionGeneric,\n specOf,\n} from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { stat as redisStat } from '../../../core/redis/stat.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nexport const REDIS_JQ = command({\n name: 'jq',\n resource: ResourceName.REDIS,\n spec: specOf('jq'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n jqGeneric(paths, texts, opts, (p) => redisStream(accessor, p)),\n provision: (accessor: RedisAccessor, paths, texts, _opts) =>\n jqProvisionGeneric(paths, texts, (p) => redisStat(accessor, p)),\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\nimport {\n IOResult,\n ResourceName,\n command,\n materialize,\n specOf,\n type ByteSource,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\nimport { exists as redisExists } from '../../../core/redis/exists.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nconst ENC = new TextEncoder()\n\nasync function lnCommand(\n accessor: RedisAccessor,\n paths: PathSpec[],\n texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n if (paths.length < 2) {\n return [\n null,\n new IOResult({ exitCode: 1, stderr: ENC.encode('ln: usage: ln [-s] [-f] source dest\\n') }),\n ]\n }\n const source = paths[0]\n const dest = paths[1]\n if (source === undefined || dest === undefined) return [null, new IOResult()]\n if (opts.flags.n === true && (await redisExists(accessor, dest))) {\n return [null, new IOResult()]\n }\n const data = await materialize(redisStream(accessor, source))\n await redisWrite(accessor, dest, data)\n const out: ByteSource | null =\n opts.flags.v === true ? ENC.encode(`'${source.original}' -> '${dest.original}'\\n`) : null\n return [out, new IOResult({ writes: { [dest.stripPrefix]: data } })]\n}\n\nexport const REDIS_LN = command({\n name: 'ln',\n resource: ResourceName.REDIS,\n spec: specOf('ln'),\n fn: lnCommand,\n write: true,\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\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm } from './utils.ts'\n\nexport async function exists(accessor: RedisAccessor, path: PathSpec): Promise<boolean> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n return (await store.hasFile(p)) || (await store.hasDir(p))\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\nimport { ResourceName, command, specOf, lookGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_LOOK = command({\n name: 'look',\n resource: ResourceName.REDIS,\n spec: specOf('look'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n lookGeneric(paths, texts, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, lsGeneric, specOf } from '@struktoai/mirage-core'\nimport { stat as redisStat } from '../../../../core/redis/stat.ts'\nimport { readdir as redisReaddir } from '../../../../core/redis/readdir.ts'\nimport type { RedisAccessor } from '../../../../accessor/redis.ts'\n\nexport const REDIS_LS = command({\n name: 'ls',\n resource: ResourceName.REDIS,\n spec: specOf('ls'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n lsGeneric(\n paths,\n opts,\n (p) => redisReaddir(accessor, p),\n (p) => redisStat(accessor, p),\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\nimport { ResourceName, command, specOf, md5Generic } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_MD5 = command({\n name: 'md5',\n resource: ResourceName.REDIS,\n spec: specOf('md5'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n md5Generic(paths, opts, (p) => redisStream(accessor, p)),\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\nimport {\n IOResult,\n ResourceName,\n command,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { mkdir as redisMkdir } from '../../../core/redis/mkdir.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nasync function mkdirCommand(\n accessor: RedisAccessor,\n paths: PathSpec[],\n texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n const parents = opts.flags.p === true\n if (paths.length === 0) {\n return [\n null,\n new IOResult({\n exitCode: 1,\n stderr: new TextEncoder().encode('mkdir: missing operand\\n'),\n }),\n ]\n }\n for (const p of paths) {\n await redisMkdir(accessor, p, parents)\n }\n return [null, new IOResult()]\n}\n\nexport const REDIS_MKDIR = command({\n name: 'mkdir',\n resource: ResourceName.REDIS,\n spec: specOf('mkdir'),\n fn: mkdirCommand,\n write: true,\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\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm, nowIso, parent } from './utils.ts'\nimport { stripSlash } from '@struktoai/mirage-core'\n\nexport async function mkdir(\n accessor: RedisAccessor,\n path: PathSpec,\n parents = false,\n): Promise<void> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n if (parents) {\n const parts = stripSlash(p).split('/')\n let current = ''\n const now = nowIso()\n for (const part of parts) {\n current += `/${part}`\n await store.addDir(current)\n const mod = await store.getModified(current)\n if (mod === null) {\n await store.setModified(current, now)\n }\n }\n return\n }\n const par = parent(p)\n if (par !== '/' && !(await store.hasDir(par))) {\n throw new Error(`parent directory does not exist: ${par}`)\n }\n await store.addDir(p)\n await store.setModified(p, nowIso())\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\nimport { ResourceName, command, mktempGeneric, specOf } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { mkdir as redisMkdir } from '../../../core/redis/mkdir.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\n\nexport const REDIS_MKTEMP = command({\n name: 'mktemp',\n resource: ResourceName.REDIS,\n spec: specOf('mktemp'),\n fn: (accessor: RedisAccessor, _paths, texts, opts) =>\n mktempGeneric(\n texts,\n opts,\n (p, parents) => redisMkdir(accessor, p, parents),\n (p, d) => redisWrite(accessor, p, d),\n ),\n write: true,\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\nimport {\n IOResult,\n ResourceName,\n command,\n mvGeneric,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { rename as coreRename } from '../../../core/redis/rename.ts'\nimport { stat as coreStat } from '../../../core/redis/stat.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nfunction mvCommand(\n accessor: RedisAccessor,\n paths: PathSpec[],\n _texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n if (paths.length < 2) {\n return Promise.resolve([\n null,\n new IOResult({ exitCode: 1, stderr: new TextEncoder().encode('mv: missing operand\\n') }),\n ])\n }\n return mvGeneric(\n paths,\n (src: PathSpec, target: PathSpec) => coreRename(accessor, src, target),\n (p: PathSpec) => coreStat(accessor, p),\n opts.flags.n === true,\n opts.flags.v === true,\n opts.index ?? undefined,\n )\n}\n\nexport const REDIS_MV = command({\n name: 'mv',\n resource: ResourceName.REDIS,\n spec: specOf('mv'),\n fn: mvCommand,\n write: true,\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\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm, nowIso } from './utils.ts'\nimport { rstripSlash } from '@struktoai/mirage-core'\n\nexport async function rename(accessor: RedisAccessor, src: PathSpec, dst: PathSpec): Promise<void> {\n const s = norm(src.stripPrefix)\n const d = norm(dst.stripPrefix)\n const now = nowIso()\n const store = accessor.store\n if (await store.hasFile(s)) {\n const data = await store.getFile(s)\n const mod = await store.getModified(s)\n if (data === null) throw new Error(`file not found: ${s}`)\n await store.delFile(s)\n await store.delModified(s)\n await store.setFile(d, data)\n await store.setModified(d, mod ?? now)\n return\n }\n if (await store.hasDir(s)) {\n const mod = await store.getModified(s)\n await store.removeDir(s)\n await store.delModified(s)\n await store.addDir(d)\n await store.setModified(d, mod ?? now)\n const prefix = rstripSlash(s) + '/'\n const dPrefix = rstripSlash(d) + '/'\n const files = await store.listFiles()\n for (const key of files) {\n if (key.startsWith(prefix)) {\n const newKey = dPrefix + key.slice(prefix.length)\n const data = await store.getFile(key)\n if (data === null) continue\n await store.delFile(key)\n await store.setFile(newKey, data)\n }\n }\n return\n }\n throw new Error(`file not found: ${s}`)\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\nimport { ResourceName, command, specOf, nlGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_NL = command({\n name: 'nl',\n resource: ResourceName.REDIS,\n spec: specOf('nl'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n nlGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, pasteGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_PASTE = command({\n name: 'paste',\n resource: ResourceName.REDIS,\n spec: specOf('paste'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n pasteGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, patchGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\n\nexport const REDIS_PATCH = command({\n name: 'patch',\n resource: ResourceName.REDIS,\n spec: specOf('patch'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n patchGeneric(\n paths,\n opts,\n (p) => redisStream(accessor, p),\n (p, d) => redisWrite(accessor, p, d),\n ),\n write: true,\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\nimport {\n ResourceName,\n command,\n readlinkGeneric,\n specOf,\n type Accessor,\n} from '@struktoai/mirage-core'\n\nexport const REDIS_READLINK = command({\n name: 'readlink',\n resource: ResourceName.REDIS,\n spec: specOf('readlink'),\n fn: (_accessor: Accessor, paths, texts, opts) => readlinkGeneric(paths, texts, opts),\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\nimport { ResourceName, command, realpathGeneric, specOf } from '@struktoai/mirage-core'\nimport { stat as redisStat } from '../../../core/redis/stat.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nexport const REDIS_REALPATH = command({\n name: 'realpath',\n resource: ResourceName.REDIS,\n spec: specOf('realpath'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n realpathGeneric(paths, texts, opts, (p) => redisStat(accessor, p)),\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\nimport { ResourceName, command, specOf, revGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_REV = command({\n name: 'rev',\n resource: ResourceName.REDIS,\n spec: specOf('rev'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n revGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, rgGeneric, specOf } from '@struktoai/mirage-core'\nimport { readdir as redisReaddir } from '../../../core/redis/readdir.ts'\nimport { stat as redisStat } from '../../../core/redis/stat.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nexport const REDIS_RG = command({\n name: 'rg',\n resource: ResourceName.REDIS,\n spec: specOf('rg'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n rgGeneric(\n paths,\n texts,\n opts,\n (p) => redisStat(accessor, p),\n (p) => redisReaddir(accessor, p),\n (p) => redisStream(accessor, p),\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\nimport {\n FileType,\n IOResult,\n ResourceName,\n command,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { rmdir as redisRmdir } from '../../../core/redis/rmdir.ts'\nimport { stat as redisStat } from '../../../core/redis/stat.ts'\nimport { unlink as redisUnlink } from '../../../core/redis/unlink.ts'\nimport { rmR as redisRmR } from '../../../core/redis/rm.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nasync function rmCommand(\n accessor: RedisAccessor,\n paths: PathSpec[],\n texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n if (paths.length === 0) {\n return [\n null,\n new IOResult({\n exitCode: 1,\n stderr: new TextEncoder().encode('rm: missing operand\\n'),\n }),\n ]\n }\n const recursive = opts.flags.r === true || opts.flags.R === true\n for (const p of paths) {\n let isDir = false\n try {\n const st = await redisStat(accessor, p)\n isDir = st.type === FileType.DIRECTORY\n } catch {\n isDir = false\n }\n if (isDir) {\n if (recursive) {\n await redisRmR(accessor, p)\n } else {\n await redisRmdir(accessor, p)\n }\n } else {\n await redisUnlink(accessor, p)\n }\n }\n return [null, new IOResult()]\n}\n\nexport const REDIS_RM = command({\n name: 'rm',\n resource: ResourceName.REDIS,\n spec: specOf('rm'),\n fn: rmCommand,\n write: true,\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\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm } from './utils.ts'\nimport { rstripSlash } from '@struktoai/mirage-core'\n\nexport async function rmdir(accessor: RedisAccessor, path: PathSpec): Promise<void> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n if (!(await store.hasDir(p))) {\n throw new Error(`not a directory: ${p}`)\n }\n const prefix = rstripSlash(p) + '/'\n const files = await store.listFiles()\n const dirs = await store.listDirs()\n const candidates = [...files, ...dirs]\n for (const k of candidates) {\n if (k !== p && k.startsWith(prefix)) {\n throw new Error(`directory not empty: ${p}`)\n }\n }\n await store.removeDir(p)\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\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm } from './utils.ts'\nimport { rstripSlash } from '@struktoai/mirage-core'\n\nexport async function rmR(accessor: RedisAccessor, path: PathSpec): Promise<void> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n const prefix = rstripSlash(p) + '/'\n const files = await store.listFiles()\n for (const key of files) {\n if (key === p || key.startsWith(prefix)) {\n await store.delFile(key)\n await store.delModified(key)\n }\n }\n const dirs = await store.listDirs()\n for (const key of dirs) {\n if (key === p || key.startsWith(prefix)) {\n await store.removeDir(key)\n await store.delModified(key)\n }\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\nimport { ResourceName, command, specOf, sedGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\n\nexport const REDIS_SED = command({\n name: 'sed',\n resource: ResourceName.REDIS,\n spec: specOf('sed'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n sedGeneric(\n paths,\n texts,\n opts,\n (p) => redisStream(accessor, p),\n (p, d) => redisWrite(accessor, p, d),\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\nimport { ResourceName, command, sha256sumGeneric, specOf } from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nexport const REDIS_SHA256SUM = command({\n name: 'sha256sum',\n resource: ResourceName.REDIS,\n spec: specOf('sha256sum'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n sha256sumGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, shufGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_SHUF = command({\n name: 'shuf',\n resource: ResourceName.REDIS,\n spec: specOf('shuf'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n shufGeneric(paths, texts, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, sortGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_SORT = command({\n name: 'sort',\n resource: ResourceName.REDIS,\n spec: specOf('sort'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n sortGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, splitGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\n\nexport const REDIS_SPLIT = command({\n name: 'split',\n resource: ResourceName.REDIS,\n spec: specOf('split'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n splitGeneric(\n paths,\n opts,\n (p) => redisStream(accessor, p),\n (p, d) => redisWrite(accessor, p, d),\n ),\n write: true,\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\nimport {\n ResourceName,\n command,\n specOf,\n statGeneric,\n statProvisionGeneric,\n} from '@struktoai/mirage-core'\nimport { stat as redisStat } from '../../../../core/redis/stat.ts'\nimport type { RedisAccessor } from '../../../../accessor/redis.ts'\n\nexport const REDIS_STAT = command({\n name: 'stat',\n resource: ResourceName.REDIS,\n spec: specOf('stat'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n statGeneric(paths, opts, (p) => redisStat(accessor, p)),\n provision: statProvisionGeneric,\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\nimport { ResourceName, command, specOf, stringsGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_STRINGS = command({\n name: 'strings',\n resource: ResourceName.REDIS,\n spec: specOf('strings'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n stringsGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, tacGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_TAC = command({\n name: 'tac',\n resource: ResourceName.REDIS,\n spec: specOf('tac'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n tacGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, headerAggregate, specOf, tailGeneric } from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../../core/redis/stream.ts'\nimport type { RedisAccessor } from '../../../../accessor/redis.ts'\n\nexport const REDIS_TAIL = command({\n name: 'tail',\n resource: ResourceName.REDIS,\n spec: specOf('tail'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n tailGeneric(paths, texts, opts, (p) => redisStream(accessor, p)),\n aggregate: headerAggregate,\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\nimport { ResourceName, command, specOf, tarGeneric } from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\nimport { mkdir as redisMkdir } from '../../../core/redis/mkdir.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nexport const REDIS_TAR = command({\n name: 'tar',\n resource: ResourceName.REDIS,\n spec: specOf('tar'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n tarGeneric(\n paths,\n opts,\n (p) => redisStream(accessor, p),\n (p, data) => redisWrite(accessor, p, data),\n (p) => redisMkdir(accessor, p),\n ),\n write: true,\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\nimport { ResourceName, command, specOf, teeGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\n\nexport const REDIS_TEE = command({\n name: 'tee',\n resource: ResourceName.REDIS,\n spec: specOf('tee'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n teeGeneric(\n paths,\n texts,\n opts,\n (p) => redisStream(accessor, p),\n (p, d) => redisWrite(accessor, p, d),\n ),\n write: true,\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\nimport {\n IOResult,\n ResourceName,\n command,\n specOf,\n type CommandFnResult,\n type CommandOpts,\n type PathSpec,\n} from '@struktoai/mirage-core'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\nimport { exists as redisExists } from '../../../core/redis/exists.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nconst ENC = new TextEncoder()\n\nasync function touchCommand(\n accessor: RedisAccessor,\n paths: PathSpec[],\n texts: string[],\n opts: CommandOpts,\n): Promise<CommandFnResult> {\n if (paths.length === 0) {\n return [null, new IOResult({ exitCode: 1, stderr: ENC.encode('touch: missing operand\\n') })]\n }\n const createOnly = opts.flags.c === true\n for (const p of paths) {\n if (createOnly) continue\n if (!(await redisExists(accessor, p))) {\n await redisWrite(accessor, p, new Uint8Array(0))\n }\n }\n return [null, new IOResult()]\n}\n\nexport const REDIS_TOUCH = command({\n name: 'touch',\n resource: ResourceName.REDIS,\n spec: specOf('touch'),\n fn: touchCommand,\n write: true,\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\nimport { ResourceName, command, specOf, trGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_TR = command({\n name: 'tr',\n resource: ResourceName.REDIS,\n spec: specOf('tr'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n trGeneric(paths, texts, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, treeGeneric } from '@struktoai/mirage-core'\nimport { readdir as redisReaddir } from '../../../core/redis/readdir.ts'\nimport { stat as redisStat } from '../../../core/redis/stat.ts'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\n\nexport const REDIS_TREE = command({\n name: 'tree',\n resource: ResourceName.REDIS,\n spec: specOf('tree'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n treeGeneric(\n paths,\n opts,\n (p) => redisReaddir(accessor, p),\n (p) => redisStat(accessor, p),\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\nimport { ResourceName, command, specOf, tsortGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_TSORT = command({\n name: 'tsort',\n resource: ResourceName.REDIS,\n spec: specOf('tsort'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n tsortGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, unexpandGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_UNEXPAND = command({\n name: 'unexpand',\n resource: ResourceName.REDIS,\n spec: specOf('unexpand'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n unexpandGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, uniqGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_UNIQ = command({\n name: 'uniq',\n resource: ResourceName.REDIS,\n spec: specOf('uniq'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n uniqGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, unzipGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\nimport { mkdir as redisMkdir } from '../../../core/redis/mkdir.ts'\n\nexport const REDIS_UNZIP = command({\n name: 'unzip',\n resource: ResourceName.REDIS,\n spec: specOf('unzip'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n unzipGeneric(\n paths,\n opts,\n (p) => redisStream(accessor, p),\n (p, d) => redisWrite(accessor, p, d),\n (p, parents) => redisMkdir(accessor, p, parents),\n ),\n write: true,\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\nimport { ResourceName, command, specOf, wcAggregate, wcGeneric } from '@struktoai/mirage-core'\nimport { stream as redisStream } from '../../../../core/redis/stream.ts'\nimport type { RedisAccessor } from '../../../../accessor/redis.ts'\n\nexport const REDIS_WC = command({\n name: 'wc',\n resource: ResourceName.REDIS,\n spec: specOf('wc'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n wcGeneric(paths, texts, opts, (p) => redisStream(accessor, p)),\n aggregate: wcAggregate,\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\nimport { ResourceName, command, specOf, xxdGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_XXD = command({\n name: 'xxd',\n resource: ResourceName.REDIS,\n spec: specOf('xxd'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n xxdGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, zcatGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_ZCAT = command({\n name: 'zcat',\n resource: ResourceName.REDIS,\n spec: specOf('zcat'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n zcatGeneric(paths, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, zgrepGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\n\nexport const REDIS_ZGREP = command({\n name: 'zgrep',\n resource: ResourceName.REDIS,\n spec: specOf('zgrep'),\n fn: (accessor: RedisAccessor, paths, texts, opts) =>\n zgrepGeneric(paths, texts, opts, (p) => redisStream(accessor, p)),\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\nimport { ResourceName, command, specOf, zipGeneric } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../../accessor/redis.ts'\nimport { stream as redisStream } from '../../../core/redis/stream.ts'\nimport { writeBytes as redisWrite } from '../../../core/redis/write.ts'\n\nexport const REDIS_ZIP = command({\n name: 'zip',\n resource: ResourceName.REDIS,\n spec: specOf('zip'),\n fn: (accessor: RedisAccessor, paths, _texts, opts) =>\n zipGeneric(\n paths,\n opts,\n (p) => redisStream(accessor, p),\n (p, d) => redisWrite(accessor, p, d),\n ),\n write: true,\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\nimport { Accessor } from '@struktoai/mirage-core'\nimport type { RedisStore } from '../resource/redis/store.ts'\n\nexport class RedisAccessor extends Accessor {\n readonly store: RedisStore\n\n constructor(store: RedisStore) {\n super()\n this.store = store\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\nimport { record, ResourceName, type PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm, nowIso } from './utils.ts'\n\nexport async function appendBytes(\n accessor: RedisAccessor,\n path: PathSpec,\n data: Uint8Array,\n): Promise<void> {\n const start = performance.now()\n const p = norm(path.stripPrefix)\n const store = accessor.store\n const existing = await store.getFile(p)\n if (existing !== null) {\n const merged = new Uint8Array(existing.byteLength + data.byteLength)\n merged.set(existing, 0)\n merged.set(data, existing.byteLength)\n await store.setFile(p, merged)\n } else {\n await store.setFile(p, data)\n }\n await store.setModified(p, nowIso())\n record('append', p, ResourceName.REDIS, data.byteLength, start)\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\nimport type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm, nowIso } from './utils.ts'\n\nexport async function create(accessor: RedisAccessor, path: PathSpec): Promise<void> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n await store.setFile(p, new Uint8Array(0))\n await store.setModified(p, nowIso())\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\nimport { type IndexCacheStore, PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { SCOPE_ERROR } from './constants.ts'\nimport { readdir } from './readdir.ts'\nimport { fnmatch } from '@struktoai/mirage-core'\nimport { gnuBasename } from '@struktoai/mirage-core'\n\nexport async function resolveGlob(\n accessor: RedisAccessor,\n paths: readonly PathSpec[],\n index?: IndexCacheStore,\n): Promise<PathSpec[]> {\n const result: PathSpec[] = []\n for (const p of paths) {\n if (p.resolved) {\n result.push(p)\n } else if (p.pattern !== null) {\n const dirSpec = new PathSpec({\n original: p.directory,\n directory: p.directory,\n resolved: true,\n prefix: p.prefix,\n })\n const entries = await readdir(accessor, dirSpec, index)\n const matched: PathSpec[] = []\n for (const e of entries) {\n if (fnmatch(gnuBasename(e), p.pattern)) {\n matched.push(\n new PathSpec({\n original: e,\n directory: p.directory,\n resolved: true,\n prefix: p.prefix,\n }),\n )\n }\n }\n if (matched.length > SCOPE_ERROR) matched.length = SCOPE_ERROR\n result.push(...matched)\n } else {\n result.push(p)\n }\n }\n return result\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 SCOPE_WARN = 5000\nexport const SCOPE_ERROR = 50000\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 type { PathSpec } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { norm, nowIso } from './utils.ts'\n\nexport async function truncate(\n accessor: RedisAccessor,\n path: PathSpec,\n length: number,\n): Promise<void> {\n const p = norm(path.stripPrefix)\n const store = accessor.store\n const existing = await store.getFile(p)\n const data = existing ?? new Uint8Array(0)\n const out = new Uint8Array(length)\n const copyLen = Math.min(data.byteLength, length)\n out.set(data.subarray(0, copyLen), 0)\n await store.setFile(p, out)\n await store.setModified(p, nowIso())\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\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { appendBytes } from '../../core/redis/append.ts'\n\nexport const appendOp: RegisteredOp = {\n name: 'append',\n resource: ResourceName.REDIS,\n filetype: null,\n write: true,\n fn: (accessor: RedisAccessor, path: PathSpec, args: readonly unknown[]) => {\n const data = args[0]\n if (!(data instanceof Uint8Array)) {\n throw new TypeError('append op requires a Uint8Array as the first arg')\n }\n return appendBytes(accessor, path, data)\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\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { create } from '../../core/redis/create.ts'\n\nexport const createOp: RegisteredOp = {\n name: 'create',\n resource: ResourceName.REDIS,\n filetype: null,\n write: true,\n fn: (accessor: RedisAccessor, path: PathSpec) => {\n return create(accessor, path)\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\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { mkdir } from '../../core/redis/mkdir.ts'\n\nexport const mkdirOp: RegisteredOp = {\n name: 'mkdir',\n resource: ResourceName.REDIS,\n filetype: null,\n write: true,\n fn: (accessor: RedisAccessor, path: PathSpec, args: readonly unknown[]) => {\n const parents = args[0]\n return mkdir(accessor, path, parents === true)\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\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { read as coreRead } from '../../core/redis/read.ts'\n\nexport const readOp: RegisteredOp = {\n name: 'read',\n resource: ResourceName.REDIS,\n filetype: null,\n write: false,\n fn: (accessor: RedisAccessor, path: PathSpec) => {\n return coreRead(accessor, path)\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\nimport {\n featherCat,\n type OpKwargs,\n type PathSpec,\n type RegisteredOp,\n ResourceName,\n} from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { read as coreRead } from '../../core/redis/read.ts'\n\nexport const readFeatherOp: RegisteredOp = {\n name: 'read',\n resource: ResourceName.REDIS,\n filetype: '.feather',\n write: false,\n fn: async (\n accessor: RedisAccessor,\n path: PathSpec,\n _args: readonly unknown[],\n kwargs: OpKwargs,\n ) => {\n const raw = await coreRead(accessor, path, kwargs.index)\n return featherCat(raw)\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\nimport {\n hdf5Cat,\n type OpKwargs,\n type PathSpec,\n type RegisteredOp,\n ResourceName,\n} from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { read as coreRead } from '../../core/redis/read.ts'\n\nexport const readHdf5Op: RegisteredOp = {\n name: 'read',\n resource: ResourceName.REDIS,\n filetype: '.hdf5',\n write: false,\n fn: async (\n accessor: RedisAccessor,\n path: PathSpec,\n _args: readonly unknown[],\n kwargs: OpKwargs,\n ) => {\n const raw = await coreRead(accessor, path, kwargs.index)\n return hdf5Cat(raw)\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\nimport {\n type OpKwargs,\n parquetCat,\n type PathSpec,\n type RegisteredOp,\n ResourceName,\n} from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { read as coreRead } from '../../core/redis/read.ts'\n\nexport const readParquetOp: RegisteredOp = {\n name: 'read',\n resource: ResourceName.REDIS,\n filetype: '.parquet',\n write: false,\n fn: async (\n accessor: RedisAccessor,\n path: PathSpec,\n _args: readonly unknown[],\n kwargs: OpKwargs,\n ) => {\n const raw = await coreRead(accessor, path, kwargs.index)\n return parquetCat(raw)\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\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { readdir } from '../../core/redis/readdir.ts'\n\nexport const readdirOp: RegisteredOp = {\n name: 'readdir',\n resource: ResourceName.REDIS,\n filetype: null,\n write: false,\n fn: (accessor: RedisAccessor, path: PathSpec) => {\n return readdir(accessor, path)\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\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { rename } from '../../core/redis/rename.ts'\n\nexport const renameOp: RegisteredOp = {\n name: 'rename',\n resource: ResourceName.REDIS,\n filetype: null,\n write: true,\n fn: (accessor: RedisAccessor, path: PathSpec, args: readonly unknown[]) => {\n const dst = args[0]\n if (dst === undefined || dst === null || typeof dst !== 'object' || !('original' in dst)) {\n throw new TypeError('rename op requires a PathSpec destination as the first arg')\n }\n return rename(accessor, path, dst as PathSpec)\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\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { rmdir } from '../../core/redis/rmdir.ts'\n\nexport const rmdirOp: RegisteredOp = {\n name: 'rmdir',\n resource: ResourceName.REDIS,\n filetype: null,\n write: true,\n fn: (accessor: RedisAccessor, path: PathSpec) => {\n return rmdir(accessor, path)\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\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { stat as coreStat } from '../../core/redis/stat.ts'\n\nexport const statOp: RegisteredOp = {\n name: 'stat',\n resource: ResourceName.REDIS,\n filetype: null,\n write: false,\n fn: (accessor: RedisAccessor, path: PathSpec) => {\n return coreStat(accessor, path)\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\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { truncate } from '../../core/redis/truncate.ts'\n\nexport const truncateOp: RegisteredOp = {\n name: 'truncate',\n resource: ResourceName.REDIS,\n filetype: null,\n write: true,\n fn: (accessor: RedisAccessor, path: PathSpec, args: readonly unknown[]) => {\n const length = args[0]\n if (typeof length !== 'number') {\n throw new TypeError('truncate op requires a number length as the first arg')\n }\n return truncate(accessor, path, length)\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\nimport type { PathSpec, RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { unlink } from '../../core/redis/unlink.ts'\n\nexport const unlinkOp: RegisteredOp = {\n name: 'unlink',\n resource: ResourceName.REDIS,\n filetype: null,\n write: true,\n fn: (accessor: RedisAccessor, path: PathSpec) => {\n return unlink(accessor, path)\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\nimport { extractWriteData, type PathSpec, type RegisteredOp } from '@struktoai/mirage-core'\nimport { ResourceName } from '@struktoai/mirage-core'\nimport type { RedisAccessor } from '../../accessor/redis.ts'\nimport { writeBytes } from '../../core/redis/write.ts'\n\nexport const writeOp: RegisteredOp = {\n name: 'write',\n resource: ResourceName.REDIS,\n filetype: null,\n write: true,\n fn: (accessor: RedisAccessor, path: PathSpec, args: readonly unknown[]) => {\n const data = extractWriteData(args)\n return writeBytes(accessor, path, data)\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\nimport type { RegisteredOp } from '@struktoai/mirage-core'\nimport { appendOp } from './append.ts'\nimport { createOp } from './create.ts'\nimport { mkdirOp } from './mkdir.ts'\nimport { readOp } from './read.ts'\nimport { readFeatherOp } from './read_feather.ts'\nimport { readHdf5Op } from './read_hdf5.ts'\nimport { readParquetOp } from './read_parquet.ts'\nimport { readdirOp } from './readdir.ts'\nimport { renameOp } from './rename.ts'\nimport { rmdirOp } from './rmdir.ts'\nimport { statOp } from './stat.ts'\nimport { truncateOp } from './truncate.ts'\nimport { unlinkOp } from './unlink.ts'\nimport { writeOp } from './write.ts'\n\nexport const REDIS_OPS: readonly RegisteredOp[] = [\n appendOp,\n createOp,\n mkdirOp,\n readOp,\n readFeatherOp,\n readHdf5Op,\n readParquetOp,\n readdirOp,\n renameOp,\n rmdirOp,\n statOp,\n truncateOp,\n unlinkOp,\n writeOp,\n]\n\nexport {\n appendOp,\n createOp,\n mkdirOp,\n readOp,\n readFeatherOp,\n readHdf5Op,\n readParquetOp,\n readdirOp,\n renameOp,\n rmdirOp,\n statOp,\n truncateOp,\n unlinkOp,\n writeOp,\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 REDIS_PROMPT = `Redis-backed persistent filesystem. Behaves like a standard filesystem.\nStandard commands: ls, cat, head, tail, grep, wc, find, tree, mkdir, touch, cp, mv, rm, tee.`\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 type { RedisClientType } from 'redis'\nimport { loadOptionalPeer } from '../../optional_peer.ts'\n\nexport interface RedisStoreOptions {\n url?: string\n client?: RedisClientType\n keyPrefix?: string\n}\n\nexport class RedisStore {\n readonly url: string\n readonly keyPrefix: string\n private readonly providedClient: RedisClientType | null\n private clientPromise: Promise<RedisClientType> | null = null\n\n constructor(options: RedisStoreOptions = {}) {\n this.url = options.url ?? 'redis://localhost:6379/0'\n this.keyPrefix = options.keyPrefix ?? 'mirage:fs:'\n this.providedClient = options.client ?? null\n }\n\n fk(path: string): string {\n return `${this.keyPrefix}file:${path}`\n }\n\n dk(): string {\n return `${this.keyPrefix}dir`\n }\n\n mk(path: string): string {\n return `${this.keyPrefix}modified:${path}`\n }\n\n async client(): Promise<RedisClientType> {\n if (this.providedClient !== null) return this.providedClient\n this.clientPromise ??= (async () => {\n const mod = await loadOptionalPeer(\n () =>\n import('redis') as unknown as Promise<{\n createClient: (o: { url: string }) => RedisClientType\n }>,\n { feature: 'RedisResource / RedisFileCacheStore', packageName: 'redis' },\n )\n const c = mod.createClient({\n url: this.url,\n socket: { reconnectStrategy: false },\n } as Parameters<typeof mod.createClient>[0])\n await c.connect()\n await c.sAdd(this.dk(), '/')\n return c\n })()\n return this.clientPromise\n }\n\n async getFile(path: string): Promise<Uint8Array | null> {\n const c = await this.client()\n const typed = c as unknown as {\n withTypeMapping: (m: Record<number, unknown>) => {\n get: (k: string) => Promise<Buffer | null>\n }\n }\n const mod = (await import('redis')) as unknown as {\n RESP_TYPES: { readonly BLOB_STRING: number }\n }\n const blob = mod.RESP_TYPES.BLOB_STRING\n const mapping: Record<number, unknown> = { [blob]: Buffer }\n const raw = await typed.withTypeMapping(mapping).get(this.fk(path))\n if (raw === null) return null\n return new Uint8Array(raw.buffer, raw.byteOffset, raw.byteLength)\n }\n\n async setFile(path: string, data: Uint8Array): Promise<void> {\n const c = await this.client()\n await c.set(this.fk(path), Buffer.from(data.buffer, data.byteOffset, data.byteLength))\n }\n\n async delFile(path: string): Promise<void> {\n const c = await this.client()\n await c.del(this.fk(path))\n }\n\n async hasFile(path: string): Promise<boolean> {\n const c = await this.client()\n return (await c.exists(this.fk(path))) > 0\n }\n\n async listFiles(prefix = ''): Promise<string[]> {\n const c = await this.client()\n const pattern = `${this.keyPrefix}file:${prefix}*`\n const strip = `${this.keyPrefix}file:`.length\n const result: string[] = []\n for await (const k of c.scanIterator({ MATCH: pattern })) {\n const keys = Array.isArray(k) ? k : [k]\n for (const key of keys) result.push(key.slice(strip))\n }\n return result.sort()\n }\n\n async fileLen(path: string): Promise<number> {\n const c = await this.client()\n return c.strLen(this.fk(path))\n }\n\n async getRange(path: string, start: number, end: number): Promise<Uint8Array> {\n const c = await this.client()\n const typed = c as unknown as {\n withTypeMapping: (m: Record<number, unknown>) => {\n getRange: (k: string, s: number, e: number) => Promise<Buffer>\n }\n }\n const mod = (await import('redis')) as unknown as {\n RESP_TYPES: { readonly BLOB_STRING: number }\n }\n const blob = mod.RESP_TYPES.BLOB_STRING\n const mapping: Record<number, unknown> = { [blob]: Buffer }\n const raw = await typed.withTypeMapping(mapping).getRange(this.fk(path), start, end)\n return new Uint8Array(raw.buffer, raw.byteOffset, raw.byteLength)\n }\n\n async hasDir(path: string): Promise<boolean> {\n const c = await this.client()\n return (await c.sIsMember(this.dk(), path)) === 1\n }\n\n async addDir(path: string): Promise<void> {\n const c = await this.client()\n await c.sAdd(this.dk(), path)\n }\n\n async removeDir(path: string): Promise<void> {\n const c = await this.client()\n await c.sRem(this.dk(), path)\n }\n\n async listDirs(): Promise<Set<string>> {\n const c = await this.client()\n const members = await c.sMembers(this.dk())\n return new Set(members)\n }\n\n async getModified(path: string): Promise<string | null> {\n const c = await this.client()\n return c.get(this.mk(path))\n }\n\n async setModified(path: string, ts: string): Promise<void> {\n const c = await this.client()\n await c.set(this.mk(path), ts)\n }\n\n async delModified(path: string): Promise<void> {\n const c = await this.client()\n await c.del(this.mk(path))\n }\n\n async clear(): Promise<void> {\n const c = await this.client()\n for (const pattern of [`${this.keyPrefix}file:*`, `${this.keyPrefix}modified:*`]) {\n const keys: string[] = []\n for await (const k of c.scanIterator({ MATCH: pattern })) {\n if (Array.isArray(k)) keys.push(...k)\n else keys.push(k)\n }\n if (keys.length > 0) await c.del(keys)\n }\n await c.del(this.dk())\n }\n\n async close(): Promise<void> {\n if (this.providedClient !== null) return\n if (this.clientPromise === null) return\n const c = await this.clientPromise\n const typed = c as unknown as { destroy?: () => void }\n if (typeof typed.destroy === 'function') typed.destroy()\n else if (c.isOpen) await c.quit()\n this.clientPromise = null\n }\n}\n"],"mappings":";;;;;AAcA;AAAA,EACE;AAAA,EAGA,YAAAA;AAAA,EAGA;AAAA,EAEA,gBAAAC;AAAA,OACK;;;ACVP,SAAS,sBAAsB,gBAAAC,sBAA4C;;;ACA3E,SAA+B,QAAQ,oBAAmC;AAC1E,SAAS,cAAc;;;ACDvB,SAAS,MAAM,QAAuB,mBAAgB;AAE/C,SAAS,SAAiB;AAC/B,UAAO,oBAAI,KAAK,GAAE,YAAY;AAChC;;;ADCA,eAAsB,KACpB,UACA,MACA,QACqB;AACrB,QAAM,QAAQ,YAAY,IAAI;AAC9B,QAAM,IAAI,KAAK,KAAK,WAAW;AAC/B,QAAM,OAAO,MAAM,SAAS,MAAM,QAAQ,CAAC;AAC3C,MAAI,SAAS,MAAM;AACjB,UAAM,OAAO,IAAI;AAAA,EACnB;AACA,SAAO,QAAQ,GAAG,aAAa,OAAO,KAAK,YAAY,KAAK;AAC5D,SAAO;AACT;;;AElBA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP,SA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AA,QACZ;AAAA,MACF,CAAC;AAAA,IACP,IACA;AACJ,WAAO,YAAS,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EACtD;AAAA,EAEA,MAAM,WAAwC;AAC5C,UAAM,QAAoC,CAAC;AAC3C,eAAW,OAAO,MAAM,KAAK,MAAM,UAAU,GAAG;AAC9C,YAAM,OAAO,MAAM,KAAK,MAAM,QAAQ,GAAG;AACzC,UAAI,SAAS,KAAM,OAAM,GAAG,IAAI;AAAA,IAClC;AACA,UAAM,OAAO,CAAC,GAAI,MAAM,KAAK,MAAM,SAAS,CAAE,EAAE,KAAK;AACrD,WAAO;AAAA,MACL,MAAM,KAAK;AAAA,MACX,QAAQ;AAAA,QACN,KAAK;AAAA,QACL,WAAW,KAAK;AAAA,MAClB;AAAA,MACA,WAAW,KAAK;AAAA,MAChB;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EAEA,MAAM,UAAU,OAA0C;AACxD,UAAM,IAAI,MAAM,KAAK,MAAM,OAAO;AAClC,UAAM,OAAO,EAAE,MAAM;AACrB,UAAM,SAAS,GAAG,KAAK,SAAS;AAChC,eAAW,CAAC,MAAM,IAAI,KAAK,OAAO,QAAQ,MAAM,KAAK,GAAG;AACtD,WAAK;AAAA,QACH,GAAG,KAAK,SAAS,QAAQ,IAAI;AAAA,QAC7B,OAAO,KAAK,KAAK,QAAQ,KAAK,YAAY,KAAK,UAAU;AAAA,MAC3D;AAAA,IACF;AACA,eAAW,OAAO,MAAM,MAAM;AAC5B,WAAK,KAAK,QAAQ,GAAG;AAAA,IACvB;AACA,UAAM,KAAK,KAAK;AAAA,EAClB;AACF;","names":["PathSpec","ResourceName","ResourceName","enoent","enoent","ResourceName","ResourceName","enoent","enoent","ResourceName","ResourceName","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","record","ResourceName","record","ResourceName","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","ResourceName","command","specOf","rstripSlash","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","IOResult","ResourceName","command","specOf","IOResult","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","IOResult","ResourceName","command","specOf","IOResult","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","IOResult","ResourceName","command","specOf","rstripSlash","IOResult","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","FileType","IOResult","ResourceName","command","specOf","rstripSlash","rstripSlash","IOResult","FileType","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","headerAggregate","specOf","command","ResourceName","specOf","headerAggregate","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","IOResult","ResourceName","command","specOf","ENC","IOResult","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","command","specOf","command","ResourceName","specOf","ResourceName","record","ResourceName","record","ResourceName","gnuBasename","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","ResourceName","PathSpec"]}