@struktoai/mirage-browser 0.0.2-alpha.0 → 0.0.2

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 (232) hide show
  1. package/README.md +61 -127
  2. package/dist/aliyun-F2ORS3KZ.js +8 -0
  3. package/dist/backblaze-HOVWPSV7.js +8 -0
  4. package/dist/box-VJSE5N7P.js +8 -0
  5. package/dist/ceph-CQKQ4NWW.js +8 -0
  6. package/dist/chunk-2H4KUUFP.js +26 -0
  7. package/dist/chunk-2H4KUUFP.js.map +1 -0
  8. package/dist/chunk-32VC36P4.js +89 -0
  9. package/dist/chunk-32VC36P4.js.map +1 -0
  10. package/dist/{chunk-MSNVGH6T.js → chunk-4YJMDF2S.js} +2 -4
  11. package/dist/chunk-4YJMDF2S.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-63GZEZW4.js +79 -0
  15. package/dist/chunk-63GZEZW4.js.map +1 -0
  16. package/dist/{chunk-UW3D2AF6.js → chunk-6K57U6CM.js} +2 -4
  17. package/dist/chunk-6K57U6CM.js.map +1 -0
  18. package/dist/chunk-72GY5B23.js +89 -0
  19. package/dist/chunk-72GY5B23.js.map +1 -0
  20. package/dist/{chunk-QYFCHCGX.js → chunk-ATLYBQSC.js} +14 -29
  21. package/dist/chunk-ATLYBQSC.js.map +1 -0
  22. package/dist/{chunk-ONQ5JGPR.js → chunk-BUXWUKN7.js} +9 -6
  23. package/dist/chunk-BUXWUKN7.js.map +1 -0
  24. package/dist/chunk-CAKSQ2LV.js +85 -0
  25. package/dist/chunk-CAKSQ2LV.js.map +1 -0
  26. package/dist/chunk-CO4FMKOF.js +89 -0
  27. package/dist/chunk-CO4FMKOF.js.map +1 -0
  28. package/dist/{chunk-5Q5GJUAF.js → chunk-D3JDGGKO.js} +19 -18
  29. package/dist/chunk-D3JDGGKO.js.map +1 -0
  30. package/dist/{chunk-DDM2Z7YA.js → chunk-D6HF462C.js} +2 -4
  31. package/dist/chunk-D6HF462C.js.map +1 -0
  32. package/dist/{chunk-27UVUTJH.js → chunk-EH2BN4JC.js} +34 -3
  33. package/dist/chunk-EH2BN4JC.js.map +1 -0
  34. package/dist/chunk-EUKHGXCE.js +89 -0
  35. package/dist/chunk-EUKHGXCE.js.map +1 -0
  36. package/dist/chunk-GHKX2BA3.js +89 -0
  37. package/dist/chunk-GHKX2BA3.js.map +1 -0
  38. package/dist/{chunk-FL7YLP7D.js → chunk-HGSTRD7H.js} +10 -8
  39. package/dist/chunk-HGSTRD7H.js.map +1 -0
  40. package/dist/chunk-HYUESAQS.js +24 -0
  41. package/dist/chunk-HYUESAQS.js.map +1 -0
  42. package/dist/{chunk-ZJ6ROCTP.js → chunk-INLL7LRM.js} +11 -14
  43. package/dist/chunk-INLL7LRM.js.map +1 -0
  44. package/dist/chunk-J54OBIJA.js +29 -0
  45. package/dist/chunk-J54OBIJA.js.map +1 -0
  46. package/dist/{chunk-DPC7QRYO.js → chunk-JCS5EG5A.js} +9 -6
  47. package/dist/chunk-JCS5EG5A.js.map +1 -0
  48. package/dist/chunk-JSAQMYPK.js +26 -0
  49. package/dist/chunk-JSAQMYPK.js.map +1 -0
  50. package/dist/{chunk-CZOTICOC.js → chunk-JVTKE6DB.js} +2 -4
  51. package/dist/chunk-JVTKE6DB.js.map +1 -0
  52. package/dist/{chunk-3PWPFOPS.js → chunk-MO5DGX42.js} +19 -18
  53. package/dist/chunk-MO5DGX42.js.map +1 -0
  54. package/dist/{chunk-LZRPA2P7.js → chunk-N43C6XFP.js} +9 -6
  55. package/dist/chunk-N43C6XFP.js.map +1 -0
  56. package/dist/chunk-NMZBJOFW.js +26 -0
  57. package/dist/chunk-NMZBJOFW.js.map +1 -0
  58. package/dist/chunk-O5ONB7QT.js +26 -0
  59. package/dist/chunk-O5ONB7QT.js.map +1 -0
  60. package/dist/{chunk-LSSB3AEW.js → chunk-RD7ED27I.js} +5 -12
  61. package/dist/chunk-RD7ED27I.js.map +1 -0
  62. package/dist/chunk-RJ4RR3BR.js +92 -0
  63. package/dist/chunk-RJ4RR3BR.js.map +1 -0
  64. package/dist/chunk-RJ5FBBL6.js +79 -0
  65. package/dist/chunk-RJ5FBBL6.js.map +1 -0
  66. package/dist/{chunk-SQQI4A6Y.js → chunk-RZRXEXHM.js} +2 -4
  67. package/dist/chunk-RZRXEXHM.js.map +1 -0
  68. package/dist/{chunk-CQJTW45B.js → chunk-SBAUYZJB.js} +2 -4
  69. package/dist/chunk-SBAUYZJB.js.map +1 -0
  70. package/dist/chunk-SJB2KXDM.js +2109 -0
  71. package/dist/chunk-SJB2KXDM.js.map +1 -0
  72. package/dist/{chunk-33SBWNB4.js → chunk-T43CZ3IZ.js} +9 -8
  73. package/dist/chunk-T43CZ3IZ.js.map +1 -0
  74. package/dist/{chunk-LG6GVNOL.js → chunk-TPFH5V4D.js} +2 -4
  75. package/dist/chunk-TPFH5V4D.js.map +1 -0
  76. package/dist/{chunk-LUDXUYIA.js → chunk-WEJGUCCL.js} +19 -18
  77. package/dist/chunk-WEJGUCCL.js.map +1 -0
  78. package/dist/{chunk-UFXEZ56G.js → chunk-WZ53HLH6.js} +18 -18
  79. package/dist/chunk-WZ53HLH6.js.map +1 -0
  80. package/dist/{chunk-VLFE4FGD.js → chunk-XFREXNA2.js} +2 -3
  81. package/dist/chunk-XFREXNA2.js.map +1 -0
  82. package/dist/chunk-YEDSFMWK.js +79 -0
  83. package/dist/chunk-YEDSFMWK.js.map +1 -0
  84. package/dist/chunk-YGRKFONX.js +26 -0
  85. package/dist/chunk-YGRKFONX.js.map +1 -0
  86. package/dist/config-7IZCGWKX.js +11 -0
  87. package/dist/config-AT74FARJ.js +11 -0
  88. package/dist/config-C2AYHACT.js +11 -0
  89. package/dist/{config-U4UI4OKA.js → config-ET26F632.js} +4 -2
  90. package/dist/config-GHJOYNM6.js +11 -0
  91. package/dist/config-L55UXIF4.js +11 -0
  92. package/dist/config-NV5WXP64.js +11 -0
  93. package/dist/config-V7BLK5WP.js +11 -0
  94. package/dist/digitalocean-KC7VIWZK.js +8 -0
  95. package/dist/discord-W3DSEXKN.js +7 -0
  96. package/dist/dropbox-GI273OVA.js +8 -0
  97. package/dist/gcs-WRQTU27E.js +8 -0
  98. package/dist/gdocs-EI2EFVKG.js +8 -0
  99. package/dist/gdrive-62HD67IP.js +8 -0
  100. package/dist/github-SWLYD3LS.js +7 -0
  101. package/dist/github_ci-7P7VGBKM.js +8 -0
  102. package/dist/gmail-B7HXHZ7D.js +8 -0
  103. package/dist/gsheets-OTBW2JWG.js +8 -0
  104. package/dist/gslides-MXSR4HRY.js +8 -0
  105. package/dist/index.d.ts +342 -166
  106. package/dist/index.js +264 -373
  107. package/dist/index.js.map +1 -1
  108. package/dist/langfuse-FWKU6E3F.js +7 -0
  109. package/dist/linear-SHVG3XVT.js +7 -0
  110. package/dist/minio-246KOHBJ.js +8 -0
  111. package/dist/mongodb-2ITJUDCF.js +7 -0
  112. package/dist/notion-BOBBSJSG.js +7 -0
  113. package/dist/oci-T7VREPQW.js +8 -0
  114. package/dist/opfs-3XNAXR5B.js +7 -0
  115. package/dist/qingstor-WIC27LS3.js +8 -0
  116. package/dist/qingstor-WIC27LS3.js.map +1 -0
  117. package/dist/r2-EAX6KHEI.js +8 -0
  118. package/dist/r2-EAX6KHEI.js.map +1 -0
  119. package/dist/{s3-A4XFE6QV.js → s3-GD2WKLWR.js} +2 -2
  120. package/dist/s3-GD2WKLWR.js.map +1 -0
  121. package/dist/scaleway-OVFRZBKW.js +8 -0
  122. package/dist/scaleway-OVFRZBKW.js.map +1 -0
  123. package/dist/seaweedfs-EOJVO432.js +8 -0
  124. package/dist/seaweedfs-EOJVO432.js.map +1 -0
  125. package/dist/slack-RNXMU5OC.js +7 -0
  126. package/dist/slack-RNXMU5OC.js.map +1 -0
  127. package/dist/supabase-VSUNLIJ6.js +8 -0
  128. package/dist/supabase-VSUNLIJ6.js.map +1 -0
  129. package/dist/tencent-YYM5WUVU.js +8 -0
  130. package/dist/tencent-YYM5WUVU.js.map +1 -0
  131. package/dist/trello-MNR3VPTT.js +7 -0
  132. package/dist/trello-MNR3VPTT.js.map +1 -0
  133. package/dist/wasabi-K5ANTZ2C.js +8 -0
  134. package/dist/wasabi-K5ANTZ2C.js.map +1 -0
  135. package/package.json +3 -3
  136. package/dist/box-Y2SJWAAO.js +0 -8
  137. package/dist/chunk-27UVUTJH.js.map +0 -1
  138. package/dist/chunk-33SBWNB4.js.map +0 -1
  139. package/dist/chunk-3PWPFOPS.js.map +0 -1
  140. package/dist/chunk-5Q5GJUAF.js.map +0 -1
  141. package/dist/chunk-7GZXXXAS.js +0 -24
  142. package/dist/chunk-7GZXXXAS.js.map +0 -1
  143. package/dist/chunk-B4SYG2FD.js +0 -24
  144. package/dist/chunk-B4SYG2FD.js.map +0 -1
  145. package/dist/chunk-BIZONEJC.js +0 -24
  146. package/dist/chunk-BIZONEJC.js.map +0 -1
  147. package/dist/chunk-CQJTW45B.js.map +0 -1
  148. package/dist/chunk-CZOTICOC.js.map +0 -1
  149. package/dist/chunk-DDM2Z7YA.js.map +0 -1
  150. package/dist/chunk-DPC7QRYO.js.map +0 -1
  151. package/dist/chunk-FL7YLP7D.js.map +0 -1
  152. package/dist/chunk-GFWWDQUZ.js +0 -24
  153. package/dist/chunk-GFWWDQUZ.js.map +0 -1
  154. package/dist/chunk-LG6GVNOL.js.map +0 -1
  155. package/dist/chunk-LSSB3AEW.js.map +0 -1
  156. package/dist/chunk-LUDXUYIA.js.map +0 -1
  157. package/dist/chunk-LZRPA2P7.js.map +0 -1
  158. package/dist/chunk-ML57VOCK.js +0 -7590
  159. package/dist/chunk-ML57VOCK.js.map +0 -1
  160. package/dist/chunk-MSNVGH6T.js.map +0 -1
  161. package/dist/chunk-NBWTZXH2.js +0 -27
  162. package/dist/chunk-NBWTZXH2.js.map +0 -1
  163. package/dist/chunk-ONQ5JGPR.js.map +0 -1
  164. package/dist/chunk-OPROOV6J.js +0 -24
  165. package/dist/chunk-OPROOV6J.js.map +0 -1
  166. package/dist/chunk-QARIHW3I.js +0 -23
  167. package/dist/chunk-QARIHW3I.js.map +0 -1
  168. package/dist/chunk-QYFCHCGX.js.map +0 -1
  169. package/dist/chunk-SQQI4A6Y.js.map +0 -1
  170. package/dist/chunk-UFXEZ56G.js.map +0 -1
  171. package/dist/chunk-UW3D2AF6.js.map +0 -1
  172. package/dist/chunk-VLFE4FGD.js.map +0 -1
  173. package/dist/chunk-XIURBEVZ.js +0 -24
  174. package/dist/chunk-XIURBEVZ.js.map +0 -1
  175. package/dist/chunk-ZJ6ROCTP.js.map +0 -1
  176. package/dist/config-4FABMWVK.js +0 -9
  177. package/dist/config-DGIUMGBB.js +0 -9
  178. package/dist/config-G3TTNXLY.js +0 -9
  179. package/dist/config-GPCEEKCB.js +0 -9
  180. package/dist/config-KQ5VR2KZ.js +0 -9
  181. package/dist/config-LPMMVXLS.js +0 -9
  182. package/dist/config-VZGK63Z5.js +0 -9
  183. package/dist/discord-RG6URXXS.js +0 -7
  184. package/dist/dropbox-P7SOL7GN.js +0 -8
  185. package/dist/gcs-2QHB4CBT.js +0 -8
  186. package/dist/gdocs-JNZTOZ33.js +0 -8
  187. package/dist/gdrive-6MEIVN2F.js +0 -8
  188. package/dist/github-M7WODJR2.js +0 -7
  189. package/dist/github_ci-4XELEFSZ.js +0 -8
  190. package/dist/gmail-AO6A3URH.js +0 -8
  191. package/dist/gsheets-RFOKXMOJ.js +0 -8
  192. package/dist/gslides-GTVZPLLB.js +0 -8
  193. package/dist/langfuse-CDOLELMB.js +0 -7
  194. package/dist/linear-SXOQGG6B.js +0 -7
  195. package/dist/mongodb-HA7FAKDJ.js +0 -7
  196. package/dist/notion-ANZNMM3L.js +0 -7
  197. package/dist/oci-ML5ZRVZ2.js +0 -8
  198. package/dist/opfs-57XFMWWE.js +0 -7
  199. package/dist/r2-56O4Q2J4.js +0 -8
  200. package/dist/slack-QA7H7WLM.js +0 -7
  201. package/dist/supabase-NNK2RWG3.js +0 -8
  202. package/dist/trello-H6PZT2IT.js +0 -7
  203. /package/dist/{box-Y2SJWAAO.js.map → aliyun-F2ORS3KZ.js.map} +0 -0
  204. /package/dist/{config-4FABMWVK.js.map → backblaze-HOVWPSV7.js.map} +0 -0
  205. /package/dist/{config-DGIUMGBB.js.map → box-VJSE5N7P.js.map} +0 -0
  206. /package/dist/{config-G3TTNXLY.js.map → ceph-CQKQ4NWW.js.map} +0 -0
  207. /package/dist/{config-GPCEEKCB.js.map → config-7IZCGWKX.js.map} +0 -0
  208. /package/dist/{config-KQ5VR2KZ.js.map → config-AT74FARJ.js.map} +0 -0
  209. /package/dist/{config-LPMMVXLS.js.map → config-C2AYHACT.js.map} +0 -0
  210. /package/dist/{config-U4UI4OKA.js.map → config-ET26F632.js.map} +0 -0
  211. /package/dist/{config-VZGK63Z5.js.map → config-GHJOYNM6.js.map} +0 -0
  212. /package/dist/{discord-RG6URXXS.js.map → config-L55UXIF4.js.map} +0 -0
  213. /package/dist/{dropbox-P7SOL7GN.js.map → config-NV5WXP64.js.map} +0 -0
  214. /package/dist/{gcs-2QHB4CBT.js.map → config-V7BLK5WP.js.map} +0 -0
  215. /package/dist/{gdocs-JNZTOZ33.js.map → digitalocean-KC7VIWZK.js.map} +0 -0
  216. /package/dist/{gdrive-6MEIVN2F.js.map → discord-W3DSEXKN.js.map} +0 -0
  217. /package/dist/{github-M7WODJR2.js.map → dropbox-GI273OVA.js.map} +0 -0
  218. /package/dist/{github_ci-4XELEFSZ.js.map → gcs-WRQTU27E.js.map} +0 -0
  219. /package/dist/{gmail-AO6A3URH.js.map → gdocs-EI2EFVKG.js.map} +0 -0
  220. /package/dist/{gsheets-RFOKXMOJ.js.map → gdrive-62HD67IP.js.map} +0 -0
  221. /package/dist/{gslides-GTVZPLLB.js.map → github-SWLYD3LS.js.map} +0 -0
  222. /package/dist/{langfuse-CDOLELMB.js.map → github_ci-7P7VGBKM.js.map} +0 -0
  223. /package/dist/{linear-SXOQGG6B.js.map → gmail-B7HXHZ7D.js.map} +0 -0
  224. /package/dist/{mongodb-HA7FAKDJ.js.map → gsheets-OTBW2JWG.js.map} +0 -0
  225. /package/dist/{notion-ANZNMM3L.js.map → gslides-MXSR4HRY.js.map} +0 -0
  226. /package/dist/{oci-ML5ZRVZ2.js.map → langfuse-FWKU6E3F.js.map} +0 -0
  227. /package/dist/{opfs-57XFMWWE.js.map → linear-SHVG3XVT.js.map} +0 -0
  228. /package/dist/{r2-56O4Q2J4.js.map → minio-246KOHBJ.js.map} +0 -0
  229. /package/dist/{s3-A4XFE6QV.js.map → mongodb-2ITJUDCF.js.map} +0 -0
  230. /package/dist/{slack-QA7H7WLM.js.map → notion-BOBBSJSG.js.map} +0 -0
  231. /package/dist/{supabase-NNK2RWG3.js.map → oci-T7VREPQW.js.map} +0 -0
  232. /package/dist/{trello-H6PZT2IT.js.map → opfs-3XNAXR5B.js.map} +0 -0
@@ -0,0 +1,7 @@
1
+ import {
2
+ LangfuseResource
3
+ } from "./chunk-INLL7LRM.js";
4
+ export {
5
+ LangfuseResource
6
+ };
7
+ //# sourceMappingURL=langfuse-FWKU6E3F.js.map
@@ -0,0 +1,7 @@
1
+ import {
2
+ LinearResource
3
+ } from "./chunk-T43CZ3IZ.js";
4
+ export {
5
+ LinearResource
6
+ };
7
+ //# sourceMappingURL=linear-SHVG3XVT.js.map
@@ -0,0 +1,8 @@
1
+ import {
2
+ MinIOResource
3
+ } from "./chunk-YEDSFMWK.js";
4
+ import "./chunk-XFREXNA2.js";
5
+ export {
6
+ MinIOResource
7
+ };
8
+ //# sourceMappingURL=minio-246KOHBJ.js.map
@@ -0,0 +1,7 @@
1
+ import {
2
+ MongoDBResource
3
+ } from "./chunk-EH2BN4JC.js";
4
+ export {
5
+ MongoDBResource
6
+ };
7
+ //# sourceMappingURL=mongodb-2ITJUDCF.js.map
@@ -0,0 +1,7 @@
1
+ import {
2
+ NotionResource
3
+ } from "./chunk-BUXWUKN7.js";
4
+ export {
5
+ NotionResource
6
+ };
7
+ //# sourceMappingURL=notion-BOBBSJSG.js.map
@@ -0,0 +1,8 @@
1
+ import {
2
+ OCIResource
3
+ } from "./chunk-D3JDGGKO.js";
4
+ import "./chunk-XFREXNA2.js";
5
+ export {
6
+ OCIResource
7
+ };
8
+ //# sourceMappingURL=oci-T7VREPQW.js.map
@@ -0,0 +1,7 @@
1
+ import {
2
+ OPFSResource
3
+ } from "./chunk-SJB2KXDM.js";
4
+ export {
5
+ OPFSResource
6
+ };
7
+ //# sourceMappingURL=opfs-3XNAXR5B.js.map
@@ -0,0 +1,8 @@
1
+ import {
2
+ QingStorResource
3
+ } from "./chunk-32VC36P4.js";
4
+ import "./chunk-XFREXNA2.js";
5
+ export {
6
+ QingStorResource
7
+ };
8
+ //# sourceMappingURL=qingstor-WIC27LS3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,8 @@
1
+ import {
2
+ R2Resource
3
+ } from "./chunk-MO5DGX42.js";
4
+ import "./chunk-XFREXNA2.js";
5
+ export {
6
+ R2Resource
7
+ };
8
+ //# sourceMappingURL=r2-EAX6KHEI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  S3Resource,
3
3
  S3_BROWSER_PROMPT
4
- } from "./chunk-VLFE4FGD.js";
4
+ } from "./chunk-XFREXNA2.js";
5
5
  export {
6
6
  S3Resource,
7
7
  S3_BROWSER_PROMPT
8
8
  };
9
- //# sourceMappingURL=s3-A4XFE6QV.js.map
9
+ //# sourceMappingURL=s3-GD2WKLWR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,8 @@
1
+ import {
2
+ ScalewayResource
3
+ } from "./chunk-72GY5B23.js";
4
+ import "./chunk-XFREXNA2.js";
5
+ export {
6
+ ScalewayResource
7
+ };
8
+ //# sourceMappingURL=scaleway-OVFRZBKW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,8 @@
1
+ import {
2
+ SeaweedFSResource
3
+ } from "./chunk-63GZEZW4.js";
4
+ import "./chunk-XFREXNA2.js";
5
+ export {
6
+ SeaweedFSResource
7
+ };
8
+ //# sourceMappingURL=seaweedfs-EOJVO432.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ SlackResource
3
+ } from "./chunk-JCS5EG5A.js";
4
+ export {
5
+ SlackResource
6
+ };
7
+ //# sourceMappingURL=slack-RNXMU5OC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,8 @@
1
+ import {
2
+ SupabaseResource
3
+ } from "./chunk-WEJGUCCL.js";
4
+ import "./chunk-XFREXNA2.js";
5
+ export {
6
+ SupabaseResource
7
+ };
8
+ //# sourceMappingURL=supabase-VSUNLIJ6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,8 @@
1
+ import {
2
+ TencentResource
3
+ } from "./chunk-CO4FMKOF.js";
4
+ import "./chunk-XFREXNA2.js";
5
+ export {
6
+ TencentResource
7
+ };
8
+ //# sourceMappingURL=tencent-YYM5WUVU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ import {
2
+ TrelloResource
3
+ } from "./chunk-HGSTRD7H.js";
4
+ export {
5
+ TrelloResource
6
+ };
7
+ //# sourceMappingURL=trello-MNR3VPTT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,8 @@
1
+ import {
2
+ WasabiResource
3
+ } from "./chunk-CAKSQ2LV.js";
4
+ import "./chunk-XFREXNA2.js";
5
+ export {
6
+ WasabiResource
7
+ };
8
+ //# sourceMappingURL=wasabi-K5ANTZ2C.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@struktoai/mirage-browser",
3
- "version": "0.0.2-alpha.0",
3
+ "version": "0.0.2",
4
4
  "description": "A Unified Virtual Filesystem For AI Agents",
5
5
  "keywords": [
6
6
  "bash",
@@ -44,7 +44,7 @@
44
44
  ],
45
45
  "dependencies": {
46
46
  "@neondatabase/serverless": "^1.0.0",
47
- "@struktoai/mirage-core": "0.0.2-alpha.0"
47
+ "@struktoai/mirage-core": "0.0.2"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@modelcontextprotocol/sdk": "^1.0.0",
@@ -52,7 +52,7 @@
52
52
  "tree-sitter-bash": "^0.25.1",
53
53
  "tsup": "^8.5.0",
54
54
  "typescript": "^6.0.0",
55
- "vitest": "^3.0.0",
55
+ "vitest": "^3.2.6",
56
56
  "web-tree-sitter": "^0.26.8"
57
57
  },
58
58
  "scripts": {
@@ -1,8 +0,0 @@
1
- import {
2
- BoxResource
3
- } from "./chunk-DDM2Z7YA.js";
4
- import "./chunk-NBWTZXH2.js";
5
- export {
6
- BoxResource
7
- };
8
- //# sourceMappingURL=box-Y2SJWAAO.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/mongodb/mongodb.ts","../src/resource/mongodb/http_driver.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 type FileStat,\n type IndexCacheStore,\n MONGODB_COMMANDS,\n MONGODB_OPS,\n MONGODB_PROMPT,\n MongoDBAccessor,\n type MongoDBConfig,\n type MongoDBConfigResolved,\n type MongoDriver,\n mongoRead,\n mongoReaddir,\n mongoStat,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n resolveMongoDBConfig,\n resolveMongoGlob,\n ResourceName,\n} from '@struktoai/mirage-core'\nimport { HttpMongoDriver } from './http_driver.ts'\n\nexport interface MongoDBResourceOptions {\n config: MongoDBConfig\n prefix?: string\n driver?: MongoDriver\n endpoint?: string\n}\n\nexport class MongoDBResource implements Resource {\n readonly kind: string = ResourceName.MONGODB\n readonly isRemote: boolean = true\n readonly indexTtl: number = 0\n readonly prompt: string\n readonly config: MongoDBConfigResolved\n readonly driver: MongoDriver\n readonly accessor: MongoDBAccessor\n readonly index: IndexCacheStore\n\n constructor(options: MongoDBResourceOptions | MongoDBConfig) {\n const { config, prefix, driver, endpoint } =\n 'config' in options\n ? options\n : { config: options, prefix: undefined, driver: undefined, endpoint: undefined }\n this.config = resolveMongoDBConfig(config)\n this.driver = driver ?? new HttpMongoDriver({ endpoint: endpoint ?? this.config.uri })\n this.accessor = new MongoDBAccessor(this.driver, this.config)\n this.index = new RAMIndexCacheStore({ ttl: this.indexTtl })\n this.prompt = MONGODB_PROMPT.replace('{prefix}', prefix ?? '')\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n async close(): Promise<void> {\n await this.driver.close()\n }\n\n ops(): readonly RegisteredOp[] {\n return MONGODB_OPS\n }\n\n commands(): readonly RegisteredCommand[] {\n return MONGODB_COMMANDS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return mongoRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return mongoReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return mongoStat(this.accessor, p, this.index)\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return resolveMongoGlob(this.accessor, effective, this.index)\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 { MongoDriver, MongoFindOptions } from '@struktoai/mirage-core'\n\nexport interface HttpMongoDriverOptions {\n endpoint: string\n fetchImpl?: typeof fetch\n headers?: Record<string, string>\n}\n\ninterface MongoProxyRequest {\n op: 'listDatabases' | 'listCollections' | 'findDocuments' | 'countDocuments' | 'listIndexes'\n database?: string\n collection?: string\n filter?: Record<string, unknown>\n options?: MongoFindOptions\n}\n\nexport class HttpMongoDriver implements MongoDriver {\n readonly endpoint: string\n private readonly fetchImpl: typeof fetch\n private readonly headers: Record<string, string>\n\n constructor(options: HttpMongoDriverOptions) {\n this.endpoint = options.endpoint\n this.fetchImpl = options.fetchImpl ?? fetch.bind(globalThis)\n this.headers = options.headers ?? {}\n }\n\n private async post<T>(req: MongoProxyRequest): Promise<T> {\n const r = await this.fetchImpl(this.endpoint, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json', ...this.headers },\n body: JSON.stringify(req),\n })\n if (!r.ok) {\n const body = await r.text().catch(() => '')\n throw new Error(`mongo proxy ${req.op} → ${String(r.status)} ${body}`)\n }\n return (await r.json()) as T\n }\n\n listDatabases(): Promise<string[]> {\n return this.post<string[]>({ op: 'listDatabases' })\n }\n\n listCollections(database: string): Promise<string[]> {\n return this.post<string[]>({ op: 'listCollections', database })\n }\n\n async findDocuments<T = Record<string, unknown>>(\n database: string,\n collection: string,\n filter: Record<string, unknown> = {},\n options: MongoFindOptions = {},\n ): Promise<T[]> {\n return this.post<T[]>({\n op: 'findDocuments',\n database,\n collection,\n filter,\n options,\n })\n }\n\n countDocuments(\n database: string,\n collection: string,\n filter: Record<string, unknown> = {},\n ): Promise<number> {\n return this.post<number>({ op: 'countDocuments', database, collection, filter })\n }\n\n listIndexes(database: string, collection: string): Promise<Record<string, unknown>[]> {\n return this.post<Record<string, unknown>[]>({\n op: 'listIndexes',\n database,\n collection,\n })\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";AAcA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACLA,IAAM,kBAAN,MAA6C;AAAA,EACzC;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,SAAiC;AAC3C,SAAK,WAAW,QAAQ;AACxB,SAAK,YAAY,QAAQ,aAAa,MAAM,KAAK,UAAU;AAC3D,SAAK,UAAU,QAAQ,WAAW,CAAC;AAAA,EACrC;AAAA,EAEA,MAAc,KAAQ,KAAoC;AACxD,UAAM,IAAI,MAAM,KAAK,UAAU,KAAK,UAAU;AAAA,MAC5C,QAAQ;AAAA,MACR,SAAS,EAAE,gBAAgB,oBAAoB,GAAG,KAAK,QAAQ;AAAA,MAC/D,MAAM,KAAK,UAAU,GAAG;AAAA,IAC1B,CAA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========= 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 FileStat,\n HttpLinearTransport,\n type IndexCacheStore,\n LINEAR_COMMANDS,\n LINEAR_PROMPT,\n LINEAR_VFS_OPS,\n LINEAR_WRITE_PROMPT,\n LinearAccessor,\n type LinearReaddirFilter,\n linearRead,\n linearReaddir,\n linearStat,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n resolveLinearGlob,\n} from '@struktoai/mirage-core'\nimport { redactLinearConfig, type LinearConfig, type LinearConfigRedacted } from './config.ts'\n\nexport interface LinearResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: LinearConfigRedacted\n}\n\nexport class LinearResource implements Resource {\n readonly kind: string = ResourceName.LINEAR\n readonly isRemote: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = LINEAR_PROMPT\n readonly writePrompt: string = LINEAR_WRITE_PROMPT\n readonly config: LinearConfig\n readonly accessor: LinearAccessor\n readonly index: IndexCacheStore\n\n constructor(config: LinearConfig) {\n this.config = config\n const transportOpts: { apiKey: string; baseUrl?: string } = { apiKey: config.apiKey }\n if (config.baseUrl !== undefined) transportOpts.baseUrl = config.baseUrl\n this.accessor = new LinearAccessor(new HttpLinearTransport(transportOpts))\n this.index = new RAMIndexCacheStore({ ttl: this.indexTtl })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return LINEAR_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return LINEAR_VFS_OPS\n }\n\n private filter(): LinearReaddirFilter {\n const out: LinearReaddirFilter = {}\n if (this.config.teamIds !== undefined) out.teamIds = this.config.teamIds\n return out\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return linearRead(this.accessor, p, this.index, this.filter())\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return linearReaddir(this.accessor, p, this.index, this.filter())\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return linearStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return resolveLinearGlob(this.accessor, effective, this.index, this.filter())\n }\n\n getState(): Promise<LinearResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['apiKey'],\n config: redactLinearConfig(this.config),\n })\n }\n\n loadState(_state: LinearResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport interface LinearConfig {\n apiKey: string\n workspace?: string\n teamIds?: readonly string[]\n baseUrl?: string\n}\n\nexport interface LinearConfigRedacted {\n apiKey: '<REDACTED>'\n workspace?: string\n teamIds?: readonly string[]\n baseUrl?: string\n}\n\nexport function redactLinearConfig(config: LinearConfig): LinearConfigRedacted {\n const out: LinearConfigRedacted = { apiKey: '<REDACTED>' }\n if (config.workspace !== undefined) out.workspace = config.workspace\n if (config.teamIds !== undefined) out.teamIds = config.teamIds\n if (config.baseUrl !== undefined) out.baseUrl = config.baseUrl\n return out\n}\n"],"mappings":";AAcA;AAAA,EAEE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,OACK;;;ACNA,SAAS,mBAAmB,QAA4C;AAC7E,QAAM,MAA4B,EAAE,QAAQ,aAAa;AACzD,MAAI,OAAO,cAAc,OAAW,KAAI,YAAY,OAAO;AAC3D,MAAI,OAAO,YAAY,OAAW,KAAI,UAAU,OAAO;AACvD,MAAI,OAAO,YAAY,OAAW,KAAI,UAAU,OAAO;AACvD,SAAO;AACT;;;ADUO,IAAM,iBAAN,MAAyC;AAAA,EACrC,OAAe,aAAa;AAAA,EAC5B,WAAoB;AAAA,EACpB,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB,cAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,QAAsB;AAChC,SAAK,SAAS;AACd,UAAM,gBAAsD,EAAE,QAAQ,OAAO,OAAO;AACpF,QAAI,OAAO,YAAY,OAAW,eAAc,UAAU,OAAO;AACjE,SAAK,WAAW,IAAI,eAAe,IAAI,oBAAoB,aAAa,CAAC;AACzE,SAAK,QAAQ,IAAI,mBAAmB,EAAE,KAAK,KAAK,SAAS,CAAC;AAAA,EAC5D;AAAA,EAEA,OAAsB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,QAAuB;AACrB,WAAO,Q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,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA4C;AACpD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/r2/r2.ts","../src/resource/r2/config.ts","../src/resource/r2/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, type RegisteredCommand, type RegisteredOp } from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport { r2ToS3Config, redactR2Config, type R2Config, type R2ConfigRedacted } from './config.ts'\nimport { R2_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface R2ResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: R2ConfigRedacted\n}\n\nfunction remapOpsResource(ops: readonly RegisteredOp[], to: string): RegisteredOp[] {\n return ops.map((op) => (op.resource === ResourceName.S3 ? { ...op, resource: to } : op))\n}\n\nfunction remapCommandsResource(\n commands: readonly RegisteredCommand[],\n to: string,\n): RegisteredCommand[] {\n return commands.map((cmd) => {\n if (cmd.resource !== ResourceName.S3) return cmd\n const proto = Object.getPrototypeOf(cmd) as object\n const copy = Object.assign(Object.create(proto) as RegisteredCommand, cmd)\n Object.assign(copy, { resource: to })\n return copy\n })\n}\n\nexport class R2Resource extends S3Resource {\n override readonly kind: string = ResourceName.R2\n override readonly prompt: string = R2_BROWSER_PROMPT\n readonly r2Config: R2Config\n private readonly r2Ops: readonly RegisteredOp[]\n private readonly r2Commands: readonly RegisteredCommand[]\n\n constructor(config: R2Config) {\n super(r2ToS3Config(config))\n this.r2Config = config\n this.r2Ops = remapOpsResource(super.ops(), ResourceName.R2)\n this.r2Commands = remapCommandsResource(super.commands(), ResourceName.R2)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.r2Ops\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.r2Commands\n }\n\n override getState(): Promise<R2ResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['presignedUrlProvider'],\n config: redactR2Config(this.r2Config),\n })\n }\n\n override loadState(_state: R2ResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { S3BrowserPresignedUrlProvider, S3Config } from '../s3/config.ts'\n\nexport interface R2Config {\n bucket: string\n presignedUrlProvider: S3BrowserPresignedUrlProvider\n accountId?: string\n region?: string\n endpoint?: string\n defaultContentType?: string\n}\n\nexport interface R2ConfigRedacted extends Omit<R2Config, 'presignedUrlProvider'> {\n presignedUrlProvider: '<REDACTED>'\n}\n\nexport function resolvedR2Endpoint(config: R2Config): string | undefined {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.accountId !== undefined && config.accountId !== '') {\n return `https://${config.accountId}.r2.cloudflarestorage.com`\n }\n return undefined\n}\n\nexport function r2ToS3Config(config: R2Config): S3Config {\n const endpoint = resolvedR2Endpoint(config)\n return {\n bucket: config.bucket,\n presignedUrlProvider: config.presignedUrlProvider,\n region: config.region ?? 'auto',\n ...(endpoint !== undefined ? { endpoint } : {}),\n ...(config.defaultContentType !== undefined\n ? { defaultContentType: config.defaultContentType }\n : {}),\n }\n}\n\nexport function redactR2Config(config: R2Config): R2ConfigRedacted {\n return { ...config, presignedUrlProvider: '<REDACTED>' }\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 R2_BROWSER_PROMPT = `{prefix}\n Remote Cloudflare R2 bucket accessed via presigned URLs (browser runtime).\n Supports the full filesystem command set: ls/tree/cat/grep/find/du/cp/mv/rm/etc.\n Listing operations require the presigner to sign LIST/COPY operations in\n addition to GET/PUT/HEAD/DELETE — see S3BrowserPresignedUrlProvider docs.`\n"],"mappings":";;;;;AAcA,SAAS,oBAA+D;;;ACejE,SAAS,mBAAmB,QAAsC;AACvE,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,MAAI,OAAO,cAAc,UAAa,OAAO,cAAc,IAAI;AAC7D,WAAO,WAAW,OAAO,SAAS;AAAA,EACpC;AACA,SAAO;AACT;AAEO,SAAS,aAAa,QAA4B;AACvD,QAAM,WAAW,mBAAmB,MAAM;AAC1C,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,sBAAsB,OAAO;AAAA,IAC7B,QAAQ,OAAO,UAAU;AAAA,IACzB,GAAI,aAAa,SAAY,EAAE,SAAS,IAAI,CAAC;AAAA,IAC7C,GAAI,OAAO,uBAAuB,SAC9B,EAAE,oBAAoB,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zD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/oci/oci.ts","../src/resource/oci/config.ts","../src/resource/oci/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, type RegisteredCommand, type RegisteredOp } from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport { ociToS3Config, redactOciConfig, type OCIConfig, type OCIConfigRedacted } from './config.ts'\nimport { OCI_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface OCIResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: OCIConfigRedacted\n}\n\nfunction remapOpsResource(ops: readonly RegisteredOp[], to: string): RegisteredOp[] {\n return ops.map((op) => (op.resource === ResourceName.S3 ? { ...op, resource: to } : op))\n}\n\nfunction remapCommandsResource(\n commands: readonly RegisteredCommand[],\n to: string,\n): RegisteredCommand[] {\n return commands.map((cmd) => {\n if (cmd.resource !== ResourceName.S3) return cmd\n const proto = Object.getPrototypeOf(cmd) as object\n const copy = Object.assign(Object.create(proto) as RegisteredCommand, cmd)\n Object.assign(copy, { resource: to })\n return copy\n })\n}\n\nexport class OCIResource extends S3Resource {\n override readonly kind: string = ResourceName.OCI\n override readonly prompt: string = OCI_BROWSER_PROMPT\n readonly ociConfig: OCIConfig\n private readonly ociOps: readonly RegisteredOp[]\n private readonly ociCommands: readonly RegisteredCommand[]\n\n constructor(config: OCIConfig) {\n super(ociToS3Config(config))\n this.ociConfig = config\n this.ociOps = remapOpsResource(super.ops(), ResourceName.OCI)\n this.ociCommands = remapCommandsResource(super.commands(), ResourceName.OCI)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.ociOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.ociCommands\n }\n\n override getState(): Promise<OCIResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['presignedUrlProvider'],\n config: redactOciConfig(this.ociConfig),\n })\n }\n\n override loadState(_state: OCIResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { S3BrowserPresignedUrlProvider, S3Config } from '../s3/config.ts'\n\nexport interface OCIConfig {\n bucket: string\n presignedUrlProvider: S3BrowserPresignedUrlProvider\n namespace?: string\n region?: string\n endpoint?: string\n defaultContentType?: string\n}\n\nexport interface OCIConfigRedacted extends Omit<OCIConfig, 'presignedUrlProvider'> {\n presignedUrlProvider: '<REDACTED>'\n}\n\nexport function resolvedOciEndpoint(config: OCIConfig): string | undefined {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (\n config.namespace !== undefined &&\n config.namespace !== '' &&\n config.region !== undefined &&\n config.region !== ''\n ) {\n return `https://${config.namespace}.compat.objectstorage.${config.region}.oci.customer-oci.com`\n }\n return undefined\n}\n\nexport function ociToS3Config(config: OCIConfig): S3Config {\n const endpoint = resolvedOciEndpoint(config)\n return {\n bucket: config.bucket,\n presignedUrlProvider: config.presignedUrlProvider,\n ...(config.region !== undefined ? { region: config.region } : {}),\n ...(endpoint !== undefined ? { endpoint } : {}),\n ...(config.defaultContentType !== undefined\n ? { defaultContentType: config.defaultContentType }\n : {}),\n }\n}\n\nexport function redactOciConfig(config: OCIConfig): OCIConfigRedacted {\n return { ...config, presignedUrlProvider: '<REDACTED>' }\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 OCI_BROWSER_PROMPT = `{prefix}\n Remote Oracle Cloud Object Storage accessed via presigned URLs (browser runtime).\n Supports the full filesystem command set: ls/tree/cat/grep/find/du/cp/mv/rm/etc.\n Listing operations require the presigner to sign LIST/COPY operations in\n addition to GET/PUT/HEAD/DELETE — see S3BrowserPresignedUrlProvider docs.`\n"],"mappings":";;;;;AAcA,SAAS,oBAA+D;;;ACejE,SAAS,oBAAoB,QAAuC;AACzE,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,MACE,OAAO,cAAc,UACrB,OAAO,cAAc,MACrB,OAAO,WAAW,UAClB,OAAO,WAAW,IAClB;AACA,WAAO,WAAW,OAAO,SAAS,yBAAyB,OAAO,MAAM;AAAA,EAC1E;AACA,SAAO;AACT;AAEO,SAAS,cAAc,QAA6B;AACzD,QAAM,WAAW,oBAAoB,MAAM;AAC3C,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,sBAAsB,OAAO;AAAA,IAC7B,GAAI,OAAO,WAAW,SAAY,EA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K;AAAA,MACX,eAAe;AAAA,MACf,gBAAgB,CAAC,sBAAsB;AAAA,MACvC,QAAQ,gBAAgB,KAAK,SAAS;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAAyC;AAC1D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,24 +0,0 @@
1
- // src/resource/dropbox/config.ts
2
- import { normalizeFields } from "@struktoai/mirage-core";
3
- function redactDropboxConfig(config) {
4
- return {
5
- clientId: config.clientId,
6
- ...config.clientSecret !== void 0 ? { clientSecret: "<REDACTED>" } : {},
7
- refreshToken: "<REDACTED>"
8
- };
9
- }
10
- function normalizeDropboxConfig(input) {
11
- return normalizeFields(input, {
12
- rename: {
13
- client_id: "clientId",
14
- client_secret: "clientSecret",
15
- refresh_token: "refreshToken"
16
- }
17
- });
18
- }
19
-
20
- export {
21
- redactDropboxConfig,
22
- normalizeDropboxConfig
23
- };
24
- //# sourceMappingURL=chunk-7GZXXXAS.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/dropbox/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields } from '@struktoai/mirage-core'\n\nexport interface DropboxConfig {\n clientId: string\n clientSecret?: string\n refreshToken: string\n refreshFn?: (refreshToken: string) => Promise<{ accessToken: string; expiresIn: number }>\n}\n\nexport interface DropboxConfigRedacted {\n clientId: string\n clientSecret?: '<REDACTED>'\n refreshToken: '<REDACTED>'\n}\n\nexport function redactDropboxConfig(config: DropboxConfig): DropboxConfigRedacted {\n return {\n clientId: config.clientId,\n ...(config.clientSecret !== undefined ? { clientSecret: '<REDACTED>' as const } : {}),\n refreshToken: '<REDACTED>',\n }\n}\n\nexport function normalizeDropboxConfig(input: Record<string, unknown>): DropboxConfig {\n return normalizeFields(input, {\n rename: {\n client_id: 'clientId',\n client_secret: 'clientSecret',\n refresh_token: 'refreshToken',\n },\n }) as unknown as DropboxConfig\n}\n"],"mappings":";AAcA,SAAS,uBAAuB;AAezB,SAAS,oBAAoB,QAA8C;AAChF,SAAO;AAAA,IACL,UAAU,OAAO;AAAA,IACjB,GAAI,OAAO,iBAAiB,SAAY,EAAE,cAAc,aAAsB,IAAI,CAAC;AAAA,IACnF,cAAc;AAAA,EAChB;AACF;AAEO,SAAS,uBAAuB,OAA+C;AACpF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,WAAW;AAAA,MACX,eAAe;AAAA,MACf,eAAe;AAAA,IACjB;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1,24 +0,0 @@
1
- // src/resource/gslides/config.ts
2
- import { normalizeFields } from "@struktoai/mirage-core";
3
- function redactGSlidesConfig(config) {
4
- return {
5
- clientId: config.clientId,
6
- ...config.clientSecret !== void 0 ? { clientSecret: "<REDACTED>" } : {},
7
- refreshToken: "<REDACTED>"
8
- };
9
- }
10
- function normalizeGSlidesConfig(input) {
11
- return normalizeFields(input, {
12
- rename: {
13
- client_id: "clientId",
14
- client_secret: "clientSecret",
15
- refresh_token: "refreshToken"
16
- }
17
- });
18
- }
19
-
20
- export {
21
- redactGSlidesConfig,
22
- normalizeGSlidesConfig
23
- };
24
- //# sourceMappingURL=chunk-B4SYG2FD.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/gslides/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields } from '@struktoai/mirage-core'\n\nexport interface GSlidesConfig {\n clientId: string\n clientSecret?: string\n refreshToken: string\n refreshFn?: (refreshToken: string) => Promise<{ accessToken: string; expiresIn: number }>\n}\n\nexport interface GSlidesConfigRedacted {\n clientId: string\n clientSecret?: '<REDACTED>'\n refreshToken: '<REDACTED>'\n}\n\nexport function redactGSlidesConfig(config: GSlidesConfig): GSlidesConfigRedacted {\n return {\n clientId: config.clientId,\n ...(config.clientSecret !== undefined ? { clientSecret: '<REDACTED>' as const } : {}),\n refreshToken: '<REDACTED>',\n }\n}\n\nexport function normalizeGSlidesConfig(input: Record<string, unknown>): GSlidesConfig {\n return normalizeFields(input, {\n rename: {\n client_id: 'clientId',\n client_secret: 'clientSecret',\n refresh_token: 'refreshToken',\n },\n }) as unknown as GSlidesConfig\n}\n"],"mappings":";AAcA,SAAS,uBAAuB;AAezB,SAAS,oBAAoB,QAA8C;AAChF,SAAO;AAAA,IACL,UAAU,OAAO;AAAA,IACjB,GAAI,OAAO,iBAAiB,SAAY,EAAE,cAAc,aAAsB,IAAI,CAAC;AAAA,IACnF,cAAc;AAAA,EAChB;AACF;AAEO,SAAS,uBAAuB,OAA+C;AACpF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,WAAW;AAAA,MACX,eAAe;AAAA,MACf,eAAe;AAAA,IACjB;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1,24 +0,0 @@
1
- // src/resource/gsheets/config.ts
2
- import { normalizeFields } from "@struktoai/mirage-core";
3
- function redactGSheetsConfig(config) {
4
- return {
5
- clientId: config.clientId,
6
- ...config.clientSecret !== void 0 ? { clientSecret: "<REDACTED>" } : {},
7
- refreshToken: "<REDACTED>"
8
- };
9
- }
10
- function normalizeGSheetsConfig(input) {
11
- return normalizeFields(input, {
12
- rename: {
13
- client_id: "clientId",
14
- client_secret: "clientSecret",
15
- refresh_token: "refreshToken"
16
- }
17
- });
18
- }
19
-
20
- export {
21
- redactGSheetsConfig,
22
- normalizeGSheetsConfig
23
- };
24
- //# sourceMappingURL=chunk-BIZONEJC.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/gsheets/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields } from '@struktoai/mirage-core'\n\nexport interface GSheetsConfig {\n clientId: string\n clientSecret?: string\n refreshToken: string\n refreshFn?: (refreshToken: string) => Promise<{ accessToken: string; expiresIn: number }>\n}\n\nexport interface GSheetsConfigRedacted {\n clientId: string\n clientSecret?: '<REDACTED>'\n refreshToken: '<REDACTED>'\n}\n\nexport function redactGSheetsConfig(config: GSheetsConfig): GSheetsConfigRedacted {\n return {\n clientId: config.clientId,\n ...(config.clientSecret !== undefined ? { clientSecret: '<REDACTED>' as const } : {}),\n refreshToken: '<REDACTED>',\n }\n}\n\nexport function normalizeGSheetsConfig(input: Record<string, unknown>): GSheetsConfig {\n return normalizeFields(input, {\n rename: {\n client_id: 'clientId',\n client_secret: 'clientSecret',\n refresh_token: 'refreshToken',\n },\n }) as unknown as GSheetsConfig\n}\n"],"mappings":";AAcA,SAAS,uBAAuB;AAezB,SAAS,oBAAoB,QAA8C;AAChF,SAAO;AAAA,IACL,UAAU,OAAO;AAAA,IACjB,GAAI,OAAO,iBAAiB,SAAY,EAAE,cAAc,aAAsB,IAAI,CAAC;AAAA,IACnF,cAAc;AAAA,EAChB;AACF;AAEO,SAAS,uBAAuB,OAA+C;AACpF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,WAAW;AAAA,MACX,eAAe;AAAA,MACf,eAAe;AAAA,IACjB;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/dropbox/dropbox.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 type FileStat,\n DROPBOX_COMMANDS,\n DROPBOX_PROMPT,\n DROPBOX_VFS_OPS,\n DropboxAccessor,\n DropboxTokenManager,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n dropboxRead,\n dropboxReaddir,\n dropboxResolveGlob,\n dropboxStat,\n} from '@struktoai/mirage-core'\nimport { redactDropboxConfig, type DropboxConfig, type DropboxConfigRedacted } from './config.ts'\n\nexport interface DropboxResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: DropboxConfigRedacted\n}\n\nexport class DropboxResource implements Resource {\n readonly kind: string = ResourceName.DROPBOX\n readonly isRemote: boolean = true\n readonly indexTtl: number = 86_400\n readonly prompt: string = DROPBOX_PROMPT\n readonly config: DropboxConfig\n readonly accessor: DropboxAccessor\n readonly index: IndexCacheStore\n\n constructor(config: DropboxConfig) {\n this.config = config\n const tm = new DropboxTokenManager({\n clientId: config.clientId,\n ...(config.clientSecret !== undefined ? { clientSecret: config.clientSecret } : {}),\n refreshToken: config.refreshToken,\n ...(config.refreshFn !== undefined ? { refreshFn: config.refreshFn } : {}),\n })\n this.accessor = new DropboxAccessor({ tokenManager: tm })\n this.index = new RAMIndexCacheStore({ ttl: 86_400 })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return DROPBOX_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return DROPBOX_VFS_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return dropboxRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return dropboxReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return dropboxStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return dropboxResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<DropboxResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['clientSecret', 'refreshToken'],\n config: redactDropboxConfig(this.config),\n })\n }\n\n loadState(_state: DropboxResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA;AAAA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,QAAQ;AAC9C,WAAO,OAAO,OAAO,cAAc;AAAA,EACrC;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,EAAE,WAAW,KACT,IACA,IAAI,SAAS;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACP,IACA;AACN,WAAO,mBAAmB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAChE;AAAA,EAEA,WAA0C;AACxC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,eAAe;AAAA,MACf,gBAAgB,CAAC,gBAAgB,cAAc;AAAA,MAC/C,QAAQ,oBAAoB,KAAK,MAAM;AAAA,IACzC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA6C;AACrD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/github_ci/github_ci.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 type FileStat,\n GITHUB_CI_COMMANDS,\n GITHUB_CI_PROMPT,\n GITHUB_CI_VFS_OPS,\n GitHubCIAccessor,\n HttpCITransport,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n githubCiRead,\n githubCiReaddir,\n githubCiResolveGlob,\n githubCiStat,\n} from '@struktoai/mirage-core'\nimport { redactGitHubCIConfig, type GitHubCIConfig, type GitHubCIConfigRedacted } from './config.ts'\n\nexport interface GitHubCIResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: GitHubCIConfigRedacted\n}\n\nexport class GitHubCIResource implements Resource {\n readonly kind: string = ResourceName.GITHUB_CI\n readonly isRemote: boolean = true\n readonly indexTtl: number = 86_400\n readonly prompt: string = GITHUB_CI_PROMPT\n readonly config: GitHubCIConfig\n readonly accessor: GitHubCIAccessor\n readonly index: IndexCacheStore\n\n constructor(config: GitHubCIConfig) {\n this.config = config\n const transportOpts: { token: string; baseUrl?: string } = { token: config.token }\n if (config.baseUrl !== undefined) transportOpts.baseUrl = config.baseUrl\n this.accessor = new GitHubCIAccessor({\n transport: new HttpCITransport(transportOpts),\n owner: config.owner,\n repo: config.repo,\n days: config.days ?? 30,\n })\n this.index = new RAMIndexCacheStore({ ttl: 86_400 })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return GITHUB_CI_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GITHUB_CI_VFS_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return githubCiRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return githubCiReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return githubCiStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return githubCiResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GitHubCIResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['token'],\n config: redactGitHubCIConfig(this.config),\n })\n }\n\n loadState(_state: GitHubCIResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUA,IAAM,mBAAN,MAA2C;AAAA,EACvC,OAAe,aAAa;AAAA,EAC5B,WAAoB;AAAA,EACpB,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,QAAwB;AAClC,SAAK,SAAS;AACd,UAAM,gBAAqD,EAAE,OAAO,OAAO,MAAM;AACjF,QAAI,OAAO,YAAY,OAAW,eAAc,UAAU,OAAO;AACjE,SAAK,WAAW,IAAI,iBAAiB;AAAA,MACnC,WAAW,IAAI,gBAAgB,aAAa;AAAA,MAC5C,OAAO,OAAO;AAAA,MACd,MAAM,OAAO;AAAA,MACb,MAAM,OAAO,QAAQ;AAAA,IACvB,CAAC;AACD,SAAK,QAAQ,IAAI,mBAAmB,EAAE,KAAK,MAAO,CAAC;AAAA,EACrD;AAAA,EAEA,OAAsB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,QAAuB;AACrB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,WAAyC;AACvC,WAAO;AAAA,EACT;AAAA,EAEA,MAA+B;AAC7B,WAAO;AAAA,EACT;AAAA,EAEA,SAAS,GAAkC;AACzC,WAAO,aAAa,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAClD;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,gBAAgB,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACrD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,aAAa,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAClD;AAAA,EAEA,MAAM,YAAY,GAAqC;AACrD,UAAM,SAAS,MAAM,KAAK,MAAM,IAAI,EAAE,QAAQ;AAC9C,WAAO,OAAO,OAAO,cAAc;AAAA,EACrC;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,EAAE,WAAW,KACT,IACA,IAAI,SAAS;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACP,IACA;AACN,WAAO,oBAAoB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EACjE;AAAA,EAEA,WAA2C;AACzC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,eAAe;AAAA,MACf,gBAAgB,CAAC,OAAO;AAAA,MACxB,QAAQ,qBAAqB,KAAK,MAAM;AAAA,IAC1C,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA8C;AACtD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/box/box.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 BOX_COMMANDS,\n BOX_PROMPT,\n BOX_VFS_OPS,\n BoxAccessor,\n BoxTokenManager,\n type FileStat,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n boxRead,\n boxReaddir,\n boxResolveGlob,\n boxStat,\n} from '@struktoai/mirage-core'\nimport { redactBoxConfig, type BoxConfig, type BoxConfigRedacted } from './config.ts'\n\nexport interface BoxResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: BoxConfigRedacted\n}\n\nexport class BoxResource implements Resource {\n readonly kind: string = ResourceName.BOX\n readonly isRemote: boolean = true\n readonly indexTtl: number = 86_400\n readonly prompt: string = BOX_PROMPT\n readonly config: BoxConfig\n readonly accessor: BoxAccessor\n readonly index: IndexCacheStore\n\n constructor(config: BoxConfig) {\n this.config = config\n const tm = new BoxTokenManager({\n ...(config.clientId !== undefined ? { clientId: config.clientId } : {}),\n ...(config.clientSecret !== undefined ? { clientSecret: config.clientSecret } : {}),\n ...(config.refreshToken !== undefined ? { refreshToken: config.refreshToken } : {}),\n ...(config.accessToken !== undefined ? { accessToken: config.accessToken } : {}),\n ...(config.refreshFn !== undefined ? { refreshFn: config.refreshFn } : {}),\n ...(config.onRefreshTokenRotated !== undefined\n ? { onRefreshTokenRotated: config.onRefreshTokenRotated }\n : {}),\n })\n this.accessor = new BoxAccessor({ tokenManager: tm })\n this.index = new RAMIndexCacheStore({ ttl: 86_400 })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return BOX_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return BOX_VFS_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return boxRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return boxReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return boxStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return boxResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<BoxResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['clientSecret', 'refreshToken', 'accessToken'],\n config: redactBoxConfig(this.config),\n })\n }\n\n loadState(_state: BoxResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUA,IAAM,cAAN,MAAsC;AAAA,EAClC,OAAe,aAAa;AAAA,EAC5B,WAAoB;AAAA,EACpB,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,QAAmB;AAC7B,SAAK,SAAS;AACd,UAAM,KAAK,IAAI,gBAAgB;AAAA,MAC7B,GAAI,OAAO,aAAa,SAAY,EAAE,UAAU,OAAO,SAAS,IAAI,CAAC;AAAA,MACrE,GAAI,OAAO,iBAAiB,SAAY,EAAE,cAAc,OAAO,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AA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACP,IACA;AACN,WAAO,eAAe,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAC5D;AAAA,EAEA,WAAsC;AACpC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,eAAe;AAAA,MACf,gBAAgB,CAAC,gBAAgB,gBAAgB,aAAa;AAAA,MAC9D,QAAQ,gBAAgB,KAAK,MAAM;AAAA,IACrC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAAyC;AACjD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/slack/slack.ts","../src/resource/slack/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BrowserSlackTransport,\n type FileStat,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n resolveSlackGlob,\n SLACK_COMMANDS,\n SLACK_PROMPT,\n SLACK_VFS_OPS,\n SLACK_WRITE_PROMPT,\n SlackAccessor,\n slackRead,\n slackReaddir,\n slackStat,\n} from '@struktoai/mirage-core'\nimport { redactSlackConfig, type SlackConfig, type SlackConfigRedacted } from './config.ts'\n\nexport interface SlackResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: SlackConfigRedacted\n}\n\nexport class SlackResource implements Resource {\n readonly kind: string = ResourceName.SLACK\n readonly isRemote: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = SLACK_PROMPT\n readonly writePrompt: string = SLACK_WRITE_PROMPT\n readonly config: SlackConfig\n readonly accessor: SlackAccessor\n readonly index: IndexCacheStore\n\n constructor(config: SlackConfig) {\n this.config = config\n this.accessor = new SlackAccessor(\n new BrowserSlackTransport({\n proxyUrl: config.proxyUrl,\n ...(config.getHeaders !== undefined ? { getHeaders: config.getHeaders } : {}),\n }),\n )\n this.index = new RAMIndexCacheStore({ ttl: this.indexTtl })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return SLACK_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return SLACK_VFS_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return slackRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return slackReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return slackStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return resolveSlackGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<SlackResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['getHeaders'],\n config: redactSlackConfig(this.config),\n })\n }\n\n loadState(_state: SlackResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport interface SlackConfig {\n proxyUrl: string\n getHeaders?: () => Promise<Record<string, string>> | Record<string, string>\n}\n\nexport interface SlackConfigRedacted {\n proxyUrl: string\n getHeaders?: '<REDACTED>'\n}\n\nexport function redactSlackConfig(config: SlackConfig): SlackConfigRedacted {\n const out: SlackConfigRedacted = { proxyUrl: config.proxyUrl }\n if (config.getHeaders !== undefined) out.getHeaders = '<REDACTED>'\n return out\n}\n"],"mappings":";AAcA;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACTA,SAAS,kBAAkB,QAA0C;AAC1E,QAAM,MAA2B,EAAE,UAAU,OAAO,SAAS;AAC7D,MAAI,OAAO,eAAe,OAAW,KAAI,aAAa;AACtD,SAAO;AACT;;;ADeO,IAAM,gBAAN,MAAwC;AAAA,EACpC,OAAe,aAAa;AAAA,EAC5B,WAAoB;AAAA,EACpB,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB,cAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,QAAqB;AAC/B,SAAK,SAAS;AACd,SAAK,WAAW,IAAI;AAAA,MAClB,IAAI,sBAAsB;AAAA,QACxB,UAAU,OAAO;AAAA,QACjB,GAAI,OA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B,CAAC,YAAY;AAAA,MAC7B,QAAQ,kBAAkB,KAAK,MAAM;AAAA,IACvC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA2C;AACnD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/trello/trello.ts","../src/resource/trello/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n type FileStat,\n HttpTrelloTransport,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n resolveTrelloGlob,\n TRELLO_COMMANDS,\n TRELLO_PROMPT,\n TRELLO_VFS_OPS,\n TRELLO_WRITE_PROMPT,\n TrelloAccessor,\n type TrelloReaddirFilter,\n trelloRead,\n trelloReaddir,\n trelloStat,\n} from '@struktoai/mirage-core'\nimport { redactTrelloConfig, type TrelloConfig, type TrelloConfigRedacted } from './config.ts'\n\nexport interface TrelloResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: TrelloConfigRedacted\n}\n\nexport class TrelloResource implements Resource {\n readonly kind: string = ResourceName.TRELLO\n readonly isRemote: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = TRELLO_PROMPT\n readonly writePrompt: string = TRELLO_WRITE_PROMPT\n readonly config: TrelloConfig\n readonly accessor: TrelloAccessor\n readonly index: IndexCacheStore\n\n constructor(config: TrelloConfig) {\n this.config = config\n const transportOpts: { apiKey: string; apiToken: string; baseUrl?: string } = {\n apiKey: config.apiKey,\n apiToken: config.apiToken,\n }\n if (config.baseUrl !== undefined) transportOpts.baseUrl = config.baseUrl\n this.accessor = new TrelloAccessor(new HttpTrelloTransport(transportOpts))\n this.index = new RAMIndexCacheStore({ ttl: this.indexTtl })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return TRELLO_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return TRELLO_VFS_OPS\n }\n\n private filter(): TrelloReaddirFilter {\n const out: TrelloReaddirFilter = {}\n if (this.config.workspaceId !== undefined) out.workspaceId = this.config.workspaceId\n if (this.config.boardIds !== undefined) out.boardIds = this.config.boardIds\n return out\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return trelloRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return trelloReaddir(this.accessor, p, this.index, this.filter())\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return trelloStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return resolveTrelloGlob(this.accessor, effective, this.index, this.filter())\n }\n\n getState(): Promise<TrelloResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['apiKey', 'apiToken'],\n config: redactTrelloConfig(this.config),\n })\n }\n\n loadState(_state: TrelloResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport interface TrelloConfig {\n apiKey: string\n apiToken: string\n workspaceId?: string\n boardIds?: readonly string[]\n baseUrl?: string\n}\n\nexport interface TrelloConfigRedacted {\n apiKey: '<REDACTED>'\n apiToken: '<REDACTED>'\n workspaceId?: string\n boardIds?: readonly string[]\n baseUrl?: string\n}\n\nexport function redactTrelloConfig(config: TrelloConfig): TrelloConfigRedacted {\n const out: TrelloConfigRedacted = { apiKey: '<REDACTED>', apiToken: '<REDACTED>' }\n if (config.workspaceId !== undefined) out.workspaceId = config.workspaceId\n if (config.boardIds !== undefined) out.boardIds = config.boardIds\n if (config.baseUrl !== undefined) out.baseUrl = config.baseUrl\n return out\n}\n"],"mappings":";AAcA;AAAA,EAEE;AAAA,EAEA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACJA,SAAS,mBAAmB,QAA4C;AAC7E,QAAM,MAA4B,EAAE,QAAQ,cAAc,UAAU,aAAa;AACjF,MAAI,OAAO,gBAAgB,OAAW,KAAI,cAAc,OAAO;AAC/D,MAAI,OAAO,aAAa,OAAW,KAAI,WAAW,OAAO;AACzD,MAAI,OAAO,YAAY,OAAW,KAAI,UAAU,OAAO;AACvD,SAAO;AACT;;;ADQO,IAAM,iBAAN,MAAyC;AAAA,EACrC,OAAe,aAAa;AAAA,EAC5B,WAAoB;AAAA,EACpB,WAAm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WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,EAAE,WAAW,KACT,IACA,IAAI,SAAS;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACP,IACA;AACN,WAAO,kBAAkB,KAAK,UAAU,WAAW,KAAK,OAAO,KAAK,OAAO,CAAC;AAAA,EAC9E;AAAA,EAEA,WAAyC;AACvC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,eAAe;AAAA,MACf,gBAAgB,CAAC,UAAU,UAAU;AAAA,MACrC,QAAQ,mBAAmB,KAAK,MAAM;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA4C;AACpD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,24 +0,0 @@
1
- // src/resource/gdocs/config.ts
2
- import { normalizeFields } from "@struktoai/mirage-core";
3
- function redactGDocsConfig(config) {
4
- return {
5
- clientId: config.clientId,
6
- ...config.clientSecret !== void 0 ? { clientSecret: "<REDACTED>" } : {},
7
- refreshToken: "<REDACTED>"
8
- };
9
- }
10
- function normalizeGDocsConfig(input) {
11
- return normalizeFields(input, {
12
- rename: {
13
- client_id: "clientId",
14
- client_secret: "clientSecret",
15
- refresh_token: "refreshToken"
16
- }
17
- });
18
- }
19
-
20
- export {
21
- redactGDocsConfig,
22
- normalizeGDocsConfig
23
- };
24
- //# sourceMappingURL=chunk-GFWWDQUZ.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/gdocs/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields } from '@struktoai/mirage-core'\n\nexport interface GDocsConfig {\n clientId: string\n clientSecret?: string\n refreshToken: string\n refreshFn?: (refreshToken: string) => Promise<{ accessToken: string; expiresIn: number }>\n}\n\nexport interface GDocsConfigRedacted {\n clientId: string\n clientSecret?: '<REDACTED>'\n refreshToken: '<REDACTED>'\n}\n\nexport function redactGDocsConfig(config: GDocsConfig): GDocsConfigRedacted {\n return {\n clientId: config.clientId,\n ...(config.clientSecret !== undefined ? { clientSecret: '<REDACTED>' as const } : {}),\n refreshToken: '<REDACTED>',\n }\n}\n\nexport function normalizeGDocsConfig(input: Record<string, unknown>): GDocsConfig {\n return normalizeFields(input, {\n rename: {\n client_id: 'clientId',\n client_secret: 'clientSecret',\n refresh_token: 'refreshToken',\n },\n }) as unknown as GDocsConfig\n}\n"],"mappings":";AAcA,SAAS,uBAAuB;AAezB,SAAS,kBAAkB,QAA0C;AAC1E,SAAO;AAAA,IACL,UAAU,OAAO;AAAA,IACjB,GAAI,OAAO,iBAAiB,SAAY,EAAE,cAAc,aAAsB,IAAI,CAAC;AAAA,IACnF,cAAc;AAAA,EAChB;AACF;AAEO,SAAS,qBAAqB,OAA6C;AAChF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,WAAW;AAAA,MACX,eAAe;AAAA,MACf,eAAe;AAAA,IACjB;AAAA,EACF,CAAC;AACH;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/gslides/gslides.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 type FileStat,\n GSLIDES_COMMANDS,\n GSLIDES_PROMPT,\n GSLIDES_VFS_OPS,\n GSLIDES_WRITE_PROMPT,\n GSlidesAccessor,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n TokenManager,\n gslidesRead,\n gslidesReaddir,\n gslidesResolveGlob,\n gslidesStat,\n} from '@struktoai/mirage-core'\nimport { redactGSlidesConfig, type GSlidesConfig, type GSlidesConfigRedacted } from './config.ts'\n\nexport interface GSlidesResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: GSlidesConfigRedacted\n}\n\nexport class GSlidesResource implements Resource {\n readonly kind: string = ResourceName.GSLIDES\n readonly isRemote: boolean = true\n readonly indexTtl: number = 86_400\n readonly prompt: string = GSLIDES_PROMPT\n readonly writePrompt: string = GSLIDES_WRITE_PROMPT\n readonly config: GSlidesConfig\n readonly accessor: GSlidesAccessor\n readonly index: IndexCacheStore\n\n constructor(config: GSlidesConfig) {\n this.config = config\n const tm = new TokenManager({\n clientId: config.clientId,\n ...(config.clientSecret !== undefined ? { clientSecret: config.clientSecret } : {}),\n refreshToken: config.refreshToken,\n ...(config.refreshFn !== undefined ? { refreshFn: config.refreshFn } : {}),\n })\n this.accessor = new GSlidesAccessor({ tokenManager: tm })\n this.index = new RAMIndexCacheStore({ ttl: 86_400 })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return GSLIDES_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GSLIDES_VFS_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return gslidesRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return gslidesReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return gslidesStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return gslidesResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GSlidesResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['clientSecret', 'refreshToken'],\n config: redactGSlidesConfig(this.config),\n })\n }\n\n loadState(_state: GSlidesResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAUA,IAAM,kBAAN,MAA0C;AAAA,EACtC,OAAe,aAAa;AAAA,EAC5B,WAAoB;AAAA,EACpB,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB,cAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,QAAuB;AACjC,SAAK,SAAS;AACd,UAAM,KAAK,IAAI,aAAa;AAAA,MAC1B,UAAU,OAAO;AAAA,MACjB,GAAI,OAAO,iBAAiB,SAAY,EAAE,cAAc,OA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AA,EAEA,WAA0C;AACxC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,eAAe;AAAA,MACf,gBAAgB,CAAC,gBAAgB,cAAc;AAAA,MAC/C,QAAQ,oBAAoB,KAAK,MAAM;AAAA,IACzC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA6C;AACrD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/gmail/gmail.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 type FileStat,\n GMAIL_COMMANDS,\n GMAIL_PROMPT,\n GMAIL_WRITE_PROMPT,\n GMAIL_VFS_OPS,\n GmailAccessor,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n TokenManager,\n gmailRead,\n gmailReaddir,\n gmailResolveGlob,\n gmailStat,\n} from '@struktoai/mirage-core'\nimport { redactGmailConfig, type GmailConfig, type GmailConfigRedacted } from './config.ts'\n\nexport interface GmailResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: GmailConfigRedacted\n}\n\nexport class GmailResource implements Resource {\n readonly kind: string = ResourceName.GMAIL\n readonly isRemote: boolean = true\n readonly indexTtl: number = 86_400\n readonly prompt: string = GMAIL_PROMPT\n readonly writePrompt: string = GMAIL_WRITE_PROMPT\n readonly config: GmailConfig\n readonly accessor: GmailAccessor\n readonly index: IndexCacheStore\n\n constructor(config: GmailConfig) {\n this.config = config\n const tm = new TokenManager({\n clientId: config.clientId,\n ...(config.clientSecret !== undefined ? { clientSecret: config.clientSecret } : {}),\n refreshToken: config.refreshToken,\n ...(config.refreshFn !== undefined ? { refreshFn: config.refreshFn } : {}),\n })\n this.accessor = new GmailAccessor({ tokenManager: tm })\n this.index = new RAMIndexCacheStore({ ttl: 86_400 })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return GMAIL_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GMAIL_VFS_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return gmailRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return gmailReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return gmailStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return gmailResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GmailResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['clientSecret', 'refreshToken'],\n config: redactGmailConfig(this.config),\n })\n }\n\n loadState(_state: GmailResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAIA;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A,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,EAAE,WAAW,KACT,IACA,IAAI,SAAS;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACP,IACA;AACN,WAAO,iBAAiB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAC9D;AAAA,EAEA,WAAwC;AACtC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,eAAe;AAAA,MACf,gBAAgB,CAAC,gBAAgB,cAAc;AAAA,MAC/C,QAAQ,kBAAkB,KAAK,MAAM;AAAA,IACvC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA2C;AACnD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/resource/supabase/supabase.ts","../src/resource/supabase/config.ts","../src/resource/supabase/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { ResourceName, type RegisteredCommand, type RegisteredOp } from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport {\n redactSupabaseConfig,\n supabaseToS3Config,\n type SupabaseConfig,\n type SupabaseConfigRedacted,\n} from './config.ts'\nimport { SUPABASE_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface SupabaseResourceState {\n type: string\n needsOverride: boolean\n redactedFields: readonly string[]\n config: SupabaseConfigRedacted\n}\n\nfunction remapOpsResource(ops: readonly RegisteredOp[], to: string): RegisteredOp[] {\n return ops.map((op) => (op.resource === ResourceName.S3 ? { ...op, resource: to } : op))\n}\n\nfunction remapCommandsResource(\n commands: readonly RegisteredCommand[],\n to: string,\n): RegisteredCommand[] {\n return commands.map((cmd) => {\n if (cmd.resource !== ResourceName.S3) return cmd\n const proto = Object.getPrototypeOf(cmd) as object\n const copy = Object.assign(Object.create(proto) as RegisteredCommand, cmd)\n Object.assign(copy, { resource: to })\n return copy\n })\n}\n\nexport class SupabaseResource extends S3Resource {\n override readonly kind: string = ResourceName.SUPABASE\n override readonly prompt: string = SUPABASE_BROWSER_PROMPT\n readonly supabaseConfig: SupabaseConfig\n private readonly supabaseOps: readonly RegisteredOp[]\n private readonly supabaseCommands: readonly RegisteredCommand[]\n\n constructor(config: SupabaseConfig) {\n super(supabaseToS3Config(config))\n this.supabaseConfig = config\n this.supabaseOps = remapOpsResource(super.ops(), ResourceName.SUPABASE)\n this.supabaseCommands = remapCommandsResource(super.commands(), ResourceName.SUPABASE)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.supabaseOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.supabaseCommands\n }\n\n override getState(): Promise<SupabaseResourceState> {\n return Promise.resolve({\n type: this.kind,\n needsOverride: true,\n redactedFields: ['presignedUrlProvider'],\n config: redactSupabaseConfig(this.supabaseConfig),\n })\n }\n\n override loadState(_state: SupabaseResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport type { S3BrowserPresignedUrlProvider, S3Config } from '../s3/config.ts'\n\nexport interface SupabaseConfig {\n bucket: string\n presignedUrlProvider: S3BrowserPresignedUrlProvider\n projectRef?: string\n region?: string\n endpoint?: string\n defaultContentType?: string\n}\n\nexport interface SupabaseConfigRedacted extends Omit<SupabaseConfig, 'presignedUrlProvider'> {\n presignedUrlProvider: '<REDACTED>'\n}\n\nexport function resolvedSupabaseEndpoint(config: SupabaseConfig): string | undefined {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.projectRef !== undefined && config.projectRef !== '') {\n return `https://${config.projectRef}.storage.supabase.co/storage/v1/s3`\n }\n return undefined\n}\n\nexport function supabaseToS3Config(config: SupabaseConfig): S3Config {\n const endpoint = resolvedSupabaseEndpoint(config)\n return {\n bucket: config.bucket,\n presignedUrlProvider: config.presignedUrlProvider,\n ...(config.region !== undefined ? { region: config.region } : {}),\n ...(endpoint !== undefined ? { endpoint } : {}),\n forcePathStyle: true,\n ...(config.defaultContentType !== undefined\n ? { defaultContentType: config.defaultContentType }\n : {}),\n }\n}\n\nexport function redactSupabaseConfig(config: SupabaseConfig): SupabaseConfigRedacted {\n return { ...config, presignedUrlProvider: '<REDACTED>' }\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 SUPABASE_BROWSER_PROMPT = `{prefix}\n Remote Supabase Storage bucket accessed via presigned URLs (browser runtime).\n Supports the full filesystem command set: ls/tree/cat/grep/find/du/cp/mv/rm/etc.\n Listing operations require the presigner to sign LIST/COPY operations in\n addition to GET/PUT/HEAD/DELETE — see S3BrowserPresignedUrlProvider docs.`\n"],"mappings":";;;;;AAcA,SAAS,oBAA+D;;;ACejE,SAAS,yBAAyB,QAA4C;AACnF,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,MAAI,OAAO,eAAe,UAAa,OAAO,eAAe,IAAI;AAC/D,WAAO,WAAW,OAAO,UAAU;AAAA,EACrC;AACA,SAAO;AACT;AAEO,SAAS,mBAAmB,QAAkC;AACnE,QAAM,WAAW,yBAAyB,MAAM;AAChD,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,sBAAsB,OAAO;AAAA,IAC7B,GAAI,OAAO,WAAW,SAAY,EAAE,QAAQ,OAAO,OAAO,IAAI,CAAC;AAAA,IAC/D,GAAI,aAAa,SAAY,EAAE,SAAS,IAAI,CAAC;AAAA,IAC7C,gBAAgB;AAAA,IAChB,GAAI,OAAO,uBAAuB,SAC9B,EAAE,oBAAoB,OAAO,mBAAmB,IAChD,CAAC;AAAA,EACP;AACF;AAEO,SAAS,qBAAqB,QAAgD;AACnF,SAAO,EAAE,GAAG,QAAQ,sBAAsB,aAAa;AACzD;;;ACvCO,IAAM,0BAA0B;AAAA;AAAA;AAAA;AAAA;;;AFiBvC,SAAS,iBAAiB,KAA8B,IAA4B;AAClF,SAAO,IAAI,IAAI,CAAC,OAAQ,GAAG,aAAa,aAAa,KAAK,EAAE,GAAG,IAAI,UAAU,GAAG,IAAI,EAAG;AACzF;AAEA,SAAS,sBACP,UACA,IACqB;AACrB,SAAO,SAAS,IAAI,CAAC,QAAQ;AAC3B,QAAI,IAAI,aAAa,aAAa,GAAI,QAA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