@struktoai/mirage-browser 0.0.4 → 0.0.5

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 (235) hide show
  1. package/README.md +2 -1
  2. package/dist/aliyun-DR6KT3H6.js +8 -0
  3. package/dist/backblaze-XCLZXTES.js +8 -0
  4. package/dist/box-XBCSU3AA.js +8 -0
  5. package/dist/ceph-F5S2NMTO.js +8 -0
  6. package/dist/{chunk-DGP3N4WM.js → chunk-2J35WXX5.js} +7 -2
  7. package/dist/chunk-2J35WXX5.js.map +1 -0
  8. package/dist/{chunk-LW56WZDS.js → chunk-2WNXK742.js} +2 -2
  9. package/dist/{chunk-PSEXJ5S5.js → chunk-2WSKXBSV.js} +11 -2
  10. package/dist/chunk-2WSKXBSV.js.map +1 -0
  11. package/dist/{chunk-DKPDXQML.js → chunk-3IYCVC7W.js} +7 -3
  12. package/dist/chunk-3IYCVC7W.js.map +1 -0
  13. package/dist/{chunk-NVGB3B7J.js → chunk-46HNNKFR.js} +7 -3
  14. package/dist/chunk-46HNNKFR.js.map +1 -0
  15. package/dist/chunk-4IF4TGAI.js +11 -0
  16. package/dist/chunk-4IF4TGAI.js.map +1 -0
  17. package/dist/{chunk-AUXZEXCG.js → chunk-5OZJMTYW.js} +7 -3
  18. package/dist/{chunk-AUXZEXCG.js.map → chunk-5OZJMTYW.js.map} +1 -1
  19. package/dist/{chunk-6BXVYCIC.js → chunk-5UM6EBVW.js} +10 -2
  20. package/dist/chunk-5UM6EBVW.js.map +1 -0
  21. package/dist/{chunk-JV4T5HNB.js → chunk-6HRSCX2U.js} +7 -3
  22. package/dist/chunk-6HRSCX2U.js.map +1 -0
  23. package/dist/{chunk-EDS5Q5B7.js → chunk-7HWQAYXR.js} +7 -3
  24. package/dist/chunk-7HWQAYXR.js.map +1 -0
  25. package/dist/{chunk-2R7SPBTM.js → chunk-AUZNQ7EI.js} +5 -10
  26. package/dist/chunk-AUZNQ7EI.js.map +1 -0
  27. package/dist/{chunk-DC6VA36O.js → chunk-BGA2F226.js} +19 -7
  28. package/dist/chunk-BGA2F226.js.map +1 -0
  29. package/dist/{chunk-NYTRDAWX.js → chunk-BV372CUO.js} +6 -11
  30. package/dist/chunk-BV372CUO.js.map +1 -0
  31. package/dist/{chunk-HTQ4GBKM.js → chunk-C4THTILY.js} +7 -3
  32. package/dist/chunk-C4THTILY.js.map +1 -0
  33. package/dist/{chunk-GENFT46X.js → chunk-D4MEOKNQ.js} +7 -3
  34. package/dist/chunk-D4MEOKNQ.js.map +1 -0
  35. package/dist/chunk-D4RAMWYH.js +88 -0
  36. package/dist/chunk-D4RAMWYH.js.map +1 -0
  37. package/dist/{chunk-3FZ3GHZO.js → chunk-EHIT6WCY.js} +7 -3
  38. package/dist/chunk-EHIT6WCY.js.map +1 -0
  39. package/dist/{chunk-PCC6EZIE.js → chunk-EN6TZYT2.js} +7 -3
  40. package/dist/chunk-EN6TZYT2.js.map +1 -0
  41. package/dist/{chunk-MB4TUUJQ.js → chunk-FTDVV7EQ.js} +7 -3
  42. package/dist/chunk-FTDVV7EQ.js.map +1 -0
  43. package/dist/{chunk-VASFK7V6.js → chunk-G67Q2Z6I.js} +7 -3
  44. package/dist/{chunk-VASFK7V6.js.map → chunk-G67Q2Z6I.js.map} +1 -1
  45. package/dist/{chunk-AAJQ6AQT.js → chunk-GM2QMJAY.js} +5 -10
  46. package/dist/chunk-GM2QMJAY.js.map +1 -0
  47. package/dist/{chunk-POJ3IQMQ.js → chunk-HRWLHJX2.js} +5 -11
  48. package/dist/chunk-HRWLHJX2.js.map +1 -0
  49. package/dist/{chunk-AUKVYHNZ.js → chunk-INEXV2PN.js} +7 -3
  50. package/dist/chunk-INEXV2PN.js.map +1 -0
  51. package/dist/chunk-IZMKMD3O.js +11 -0
  52. package/dist/chunk-IZMKMD3O.js.map +1 -0
  53. package/dist/{chunk-N5VRBFRT.js → chunk-JUVMJ5GI.js} +5 -10
  54. package/dist/{chunk-HPID7BWJ.js.map → chunk-JUVMJ5GI.js.map} +1 -1
  55. package/dist/{chunk-GQVJTQXU.js → chunk-L64GRKOD.js} +7 -2
  56. package/dist/chunk-L64GRKOD.js.map +1 -0
  57. package/dist/chunk-M2UF2JHJ.js +11 -0
  58. package/dist/chunk-M2UF2JHJ.js.map +1 -0
  59. package/dist/{chunk-5ZNWDS5I.js → chunk-NVHPJ5CV.js} +11 -2
  60. package/dist/chunk-NVHPJ5CV.js.map +1 -0
  61. package/dist/{chunk-MQMUOJZ2.js → chunk-OSTDTTWI.js} +7 -2
  62. package/dist/chunk-OSTDTTWI.js.map +1 -0
  63. package/dist/{chunk-GZFNGV55.js → chunk-PQCRGTSA.js} +7 -3
  64. package/dist/chunk-PQCRGTSA.js.map +1 -0
  65. package/dist/{chunk-6ETIHSTA.js → chunk-QE7QNA45.js} +6 -2
  66. package/dist/{chunk-6ETIHSTA.js.map → chunk-QE7QNA45.js.map} +1 -1
  67. package/dist/{chunk-EHTYPBGX.js → chunk-QG2NUNCY.js} +7 -3
  68. package/dist/chunk-QG2NUNCY.js.map +1 -0
  69. package/dist/chunk-UFHBDBZD.js +1212 -0
  70. package/dist/chunk-UFHBDBZD.js.map +1 -0
  71. package/dist/{chunk-E77ESWWV.js → chunk-UY22T4AC.js} +11 -3
  72. package/dist/chunk-UY22T4AC.js.map +1 -0
  73. package/dist/chunk-XJBC3OYX.js +11 -0
  74. package/dist/chunk-XJBC3OYX.js.map +1 -0
  75. package/dist/{chunk-TCFD6YJ5.js → chunk-Y6DYUK6J.js} +7 -3
  76. package/dist/chunk-Y6DYUK6J.js.map +1 -0
  77. package/dist/{chunk-HPID7BWJ.js → chunk-YOCTIHQZ.js} +5 -1
  78. package/dist/chunk-YOCTIHQZ.js.map +1 -0
  79. package/dist/{chunk-PDZSZ5CB.js → chunk-ZDJPUXYH.js} +6 -2
  80. package/dist/{chunk-PDZSZ5CB.js.map → chunk-ZDJPUXYH.js.map} +1 -1
  81. package/dist/{chunk-CQERQTAZ.js → chunk-ZKCOSE3R.js} +6 -9
  82. package/dist/chunk-ZKCOSE3R.js.map +1 -0
  83. package/dist/chunk-ZTHVEXIV.js +11 -0
  84. package/dist/chunk-ZTHVEXIV.js.map +1 -0
  85. package/dist/{config-MHBKYS53.js → config-2Y6LZKLV.js} +2 -2
  86. package/dist/config-4GSOMUMF.js +9 -0
  87. package/dist/config-5YBUWFUP.js +9 -0
  88. package/dist/{config-PWZXYJOI.js → config-DE5OZ4I7.js} +2 -2
  89. package/dist/config-ELDOFRJW.js +9 -0
  90. package/dist/config-FPM3LAW7.js +9 -0
  91. package/dist/{config-22T7HJBJ.js → config-JY557MA6.js} +2 -2
  92. package/dist/config-WRACCRPN.js +9 -0
  93. package/dist/digitalocean-QDHTRS2W.js +8 -0
  94. package/dist/discord-ERUI7OAQ.js +7 -0
  95. package/dist/dropbox-3U6D4HLE.js +8 -0
  96. package/dist/gcal-MTBSDG34.js +8 -0
  97. package/dist/gcs-KNGRBBET.js +8 -0
  98. package/dist/gdocs-RUIOIRKP.js +8 -0
  99. package/dist/gdrive-5JB7ZKEP.js +8 -0
  100. package/dist/github-CIXBFBVO.js +7 -0
  101. package/dist/github_ci-HR6YOYAO.js +8 -0
  102. package/dist/{gmail-HLZIMKQU.js → gmail-JHGWTQU5.js} +2 -2
  103. package/dist/gsheets-N54JO2RS.js +8 -0
  104. package/dist/gslides-B4VMNLMB.js +8 -0
  105. package/dist/index.d.ts +284 -352
  106. package/dist/index.js +165 -104
  107. package/dist/index.js.map +1 -1
  108. package/dist/langfuse-HEUJGDOC.js +7 -0
  109. package/dist/linear-J4QQ3CA6.js +7 -0
  110. package/dist/minio-BXWHJ6K5.js +8 -0
  111. package/dist/notion-I5S5SRLO.js +7 -0
  112. package/dist/oci-XOPKH4AE.js +8 -0
  113. package/dist/opfs-36QO72Y5.js +7 -0
  114. package/dist/qingstor-JKAHLK62.js +8 -0
  115. package/dist/r2-L3QXQ76M.js +8 -0
  116. package/dist/{s3-CSFY3PLT.js → s3-LRZJPGHK.js} +2 -2
  117. package/dist/scaleway-CGNDYNKS.js +8 -0
  118. package/dist/seaweedfs-BSQWCBIR.js +8 -0
  119. package/dist/slack-62ECSENR.js +7 -0
  120. package/dist/supabase-J66NXWAF.js +8 -0
  121. package/dist/tencent-AC667LV3.js +8 -0
  122. package/dist/trello-SUPG6VDF.js +7 -0
  123. package/dist/trello-SUPG6VDF.js.map +1 -0
  124. package/dist/wasabi-5KKPW6LH.js +8 -0
  125. package/dist/wasabi-5KKPW6LH.js.map +1 -0
  126. package/package.json +2 -2
  127. package/dist/aliyun-YEWHEWCL.js +0 -8
  128. package/dist/backblaze-LWE2HEDK.js +0 -8
  129. package/dist/box-GTWWIB6F.js +0 -8
  130. package/dist/ceph-ATSCSVGU.js +0 -8
  131. package/dist/chunk-23NO22WD.js +0 -25
  132. package/dist/chunk-23NO22WD.js.map +0 -1
  133. package/dist/chunk-2R7SPBTM.js.map +0 -1
  134. package/dist/chunk-3FZ3GHZO.js.map +0 -1
  135. package/dist/chunk-4YUYQTRN.js +0 -2334
  136. package/dist/chunk-4YUYQTRN.js.map +0 -1
  137. package/dist/chunk-5ZNWDS5I.js.map +0 -1
  138. package/dist/chunk-6BXVYCIC.js.map +0 -1
  139. package/dist/chunk-AAJQ6AQT.js.map +0 -1
  140. package/dist/chunk-AUKVYHNZ.js.map +0 -1
  141. package/dist/chunk-CQERQTAZ.js.map +0 -1
  142. package/dist/chunk-DC6VA36O.js.map +0 -1
  143. package/dist/chunk-DGP3N4WM.js.map +0 -1
  144. package/dist/chunk-DKPDXQML.js.map +0 -1
  145. package/dist/chunk-DQK6H5LW.js +0 -25
  146. package/dist/chunk-DQK6H5LW.js.map +0 -1
  147. package/dist/chunk-E77ESWWV.js.map +0 -1
  148. package/dist/chunk-EDS5Q5B7.js.map +0 -1
  149. package/dist/chunk-EHTYPBGX.js.map +0 -1
  150. package/dist/chunk-GENFT46X.js.map +0 -1
  151. package/dist/chunk-GQVJTQXU.js.map +0 -1
  152. package/dist/chunk-GZFNGV55.js.map +0 -1
  153. package/dist/chunk-HTQ4GBKM.js.map +0 -1
  154. package/dist/chunk-JV4T5HNB.js.map +0 -1
  155. package/dist/chunk-MB4TUUJQ.js.map +0 -1
  156. package/dist/chunk-MQMUOJZ2.js.map +0 -1
  157. package/dist/chunk-N5VRBFRT.js.map +0 -1
  158. package/dist/chunk-NVGB3B7J.js.map +0 -1
  159. package/dist/chunk-NYTRDAWX.js.map +0 -1
  160. package/dist/chunk-PCC6EZIE.js.map +0 -1
  161. package/dist/chunk-POJ3IQMQ.js.map +0 -1
  162. package/dist/chunk-PSEXJ5S5.js.map +0 -1
  163. package/dist/chunk-QXJP6TWI.js +0 -27
  164. package/dist/chunk-QXJP6TWI.js.map +0 -1
  165. package/dist/chunk-TCFD6YJ5.js.map +0 -1
  166. package/dist/chunk-ZLHC2CZ6.js +0 -25
  167. package/dist/chunk-ZLHC2CZ6.js.map +0 -1
  168. package/dist/config-A56HUM6C.js +0 -9
  169. package/dist/config-DIWQZBOK.js +0 -9
  170. package/dist/config-HGJ2MGAC.js +0 -9
  171. package/dist/config-PAHALM2T.js +0 -9
  172. package/dist/digitalocean-SQA6MJJQ.js +0 -8
  173. package/dist/discord-ASNFJP6A.js +0 -7
  174. package/dist/dropbox-VV2WZE6I.js +0 -8
  175. package/dist/gcs-2W6DDWM7.js +0 -8
  176. package/dist/gdocs-QPM7VXXE.js +0 -8
  177. package/dist/gdrive-KT6R7EVB.js +0 -8
  178. package/dist/github-3IFZGW6I.js +0 -7
  179. package/dist/github_ci-CKKF2Y4S.js +0 -8
  180. package/dist/gsheets-HF4YPIEF.js +0 -8
  181. package/dist/gslides-EV2JJH7I.js +0 -8
  182. package/dist/langfuse-74ZCR6QL.js +0 -7
  183. package/dist/linear-XABGTU6E.js +0 -7
  184. package/dist/minio-JPNSX2NP.js +0 -8
  185. package/dist/notion-YJOTGH7J.js +0 -7
  186. package/dist/oci-R4VYQKGJ.js +0 -8
  187. package/dist/opfs-4RWMJBCI.js +0 -7
  188. package/dist/qingstor-ZWWK2ZGV.js +0 -8
  189. package/dist/r2-PZAN2YFG.js +0 -8
  190. package/dist/scaleway-BFROPDBB.js +0 -8
  191. package/dist/seaweedfs-X6THZT26.js +0 -8
  192. package/dist/slack-O7BTJ4YR.js +0 -7
  193. package/dist/supabase-PHN3MIXW.js +0 -8
  194. package/dist/tencent-JGCJEKHV.js +0 -8
  195. package/dist/trello-QUDOP3M2.js +0 -7
  196. package/dist/wasabi-5VMNAFOC.js +0 -8
  197. /package/dist/{aliyun-YEWHEWCL.js.map → aliyun-DR6KT3H6.js.map} +0 -0
  198. /package/dist/{backblaze-LWE2HEDK.js.map → backblaze-XCLZXTES.js.map} +0 -0
  199. /package/dist/{box-GTWWIB6F.js.map → box-XBCSU3AA.js.map} +0 -0
  200. /package/dist/{ceph-ATSCSVGU.js.map → ceph-F5S2NMTO.js.map} +0 -0
  201. /package/dist/{chunk-LW56WZDS.js.map → chunk-2WNXK742.js.map} +0 -0
  202. /package/dist/{config-22T7HJBJ.js.map → config-2Y6LZKLV.js.map} +0 -0
  203. /package/dist/{config-A56HUM6C.js.map → config-4GSOMUMF.js.map} +0 -0
  204. /package/dist/{config-DIWQZBOK.js.map → config-5YBUWFUP.js.map} +0 -0
  205. /package/dist/{config-HGJ2MGAC.js.map → config-DE5OZ4I7.js.map} +0 -0
  206. /package/dist/{config-MHBKYS53.js.map → config-ELDOFRJW.js.map} +0 -0
  207. /package/dist/{config-PAHALM2T.js.map → config-FPM3LAW7.js.map} +0 -0
  208. /package/dist/{config-PWZXYJOI.js.map → config-JY557MA6.js.map} +0 -0
  209. /package/dist/{digitalocean-SQA6MJJQ.js.map → config-WRACCRPN.js.map} +0 -0
  210. /package/dist/{discord-ASNFJP6A.js.map → digitalocean-QDHTRS2W.js.map} +0 -0
  211. /package/dist/{dropbox-VV2WZE6I.js.map → discord-ERUI7OAQ.js.map} +0 -0
  212. /package/dist/{gcs-2W6DDWM7.js.map → dropbox-3U6D4HLE.js.map} +0 -0
  213. /package/dist/{gdocs-QPM7VXXE.js.map → gcal-MTBSDG34.js.map} +0 -0
  214. /package/dist/{gdrive-KT6R7EVB.js.map → gcs-KNGRBBET.js.map} +0 -0
  215. /package/dist/{github-3IFZGW6I.js.map → gdocs-RUIOIRKP.js.map} +0 -0
  216. /package/dist/{github_ci-CKKF2Y4S.js.map → gdrive-5JB7ZKEP.js.map} +0 -0
  217. /package/dist/{gmail-HLZIMKQU.js.map → github-CIXBFBVO.js.map} +0 -0
  218. /package/dist/{gsheets-HF4YPIEF.js.map → github_ci-HR6YOYAO.js.map} +0 -0
  219. /package/dist/{gslides-EV2JJH7I.js.map → gmail-JHGWTQU5.js.map} +0 -0
  220. /package/dist/{langfuse-74ZCR6QL.js.map → gsheets-N54JO2RS.js.map} +0 -0
  221. /package/dist/{linear-XABGTU6E.js.map → gslides-B4VMNLMB.js.map} +0 -0
  222. /package/dist/{minio-JPNSX2NP.js.map → langfuse-HEUJGDOC.js.map} +0 -0
  223. /package/dist/{notion-YJOTGH7J.js.map → linear-J4QQ3CA6.js.map} +0 -0
  224. /package/dist/{oci-R4VYQKGJ.js.map → minio-BXWHJ6K5.js.map} +0 -0
  225. /package/dist/{opfs-4RWMJBCI.js.map → notion-I5S5SRLO.js.map} +0 -0
  226. /package/dist/{qingstor-ZWWK2ZGV.js.map → oci-XOPKH4AE.js.map} +0 -0
  227. /package/dist/{r2-PZAN2YFG.js.map → opfs-36QO72Y5.js.map} +0 -0
  228. /package/dist/{s3-CSFY3PLT.js.map → qingstor-JKAHLK62.js.map} +0 -0
  229. /package/dist/{scaleway-BFROPDBB.js.map → r2-L3QXQ76M.js.map} +0 -0
  230. /package/dist/{seaweedfs-X6THZT26.js.map → s3-LRZJPGHK.js.map} +0 -0
  231. /package/dist/{slack-O7BTJ4YR.js.map → scaleway-CGNDYNKS.js.map} +0 -0
  232. /package/dist/{supabase-PHN3MIXW.js.map → seaweedfs-BSQWCBIR.js.map} +0 -0
  233. /package/dist/{tencent-JGCJEKHV.js.map → slack-62ECSENR.js.map} +0 -0
  234. /package/dist/{trello-QUDOP3M2.js.map → supabase-J66NXWAF.js.map} +0 -0
  235. /package/dist/{wasabi-5VMNAFOC.js.map → tencent-AC667LV3.js.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/s3/s3.ts","../src/resource/s3/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 { mountKey, mountPrefixOf } from '@struktoai/mirage-core'\nimport {\n copy as copyCore,\n create as createCore,\n s3DuSize as duSizeCore,\n s3DuEntries as duEntriesCore,\n exists as existsCore,\n type FileStat,\n type FindOptions,\n find as findCore,\n type IndexCacheStore,\n makeResolveGlob,\n mkdir as mkdirCore,\n PathSpec,\n RAMIndexCacheStore,\n rangeRead as rangeReadCore,\n S3_COMMANDS,\n read as readCore,\n readdir as readdirCore,\n type RegisteredCommand,\n type RegisteredOp,\n rename as renameCore,\n type Resource,\n ResourceName,\n S3_SCOPE_ERROR,\n s3StorageId,\n rmR as rmRCore,\n rmdir as rmdirCore,\n S3_OPS,\n S3Accessor,\n stat as statCore,\n stream as streamCore,\n truncate as truncateCore,\n unlink as unlinkCore,\n write as writeCore,\n} from '@struktoai/mirage-core'\nimport { redactConfig, type S3Config, type S3ConfigRedacted } from './config.ts'\n\nconst globCore = makeResolveGlob(readdirCore, S3_SCOPE_ERROR)\n\nexport const S3_BROWSER_PROMPT = `{prefix}\n Remote S3 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\nexport interface S3ResourceState {\n type: string\n config: S3ConfigRedacted\n}\n\nexport class S3Resource implements Resource {\n readonly supportsSnapshot: boolean = true\n readonly kind: string = ResourceName.S3\n readonly cachesReads: boolean = true\n // A HEAD carries ContentLength, so a size is always knowable without\n // fetching. Every sibling browser resource says so; s3 was the one that\n // did not, and its node twin has always declared it.\n readonly sizesAlwaysKnown: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = S3_BROWSER_PROMPT\n readonly config: S3Config\n readonly accessor: S3Accessor\n readonly index: IndexCacheStore\n\n constructor(config: S3Config) {\n this.config = config\n this.accessor = new S3Accessor(this.config)\n this.index = new RAMIndexCacheStore({ ttl: this.indexTtl })\n }\n\n // Without this, two mounts of one bucket at different prefixes are two\n // storages, so `mv` between them copies an object over itself and then\n // unlinks the source. Node has always declared it; the shared helper keeps\n // the two runtimes from computing different identities for one bucket.\n storageId(): string {\n return s3StorageId(this.kind, this.config)\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 S3_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return S3_OPS\n }\n\n streamPath(p: PathSpec): AsyncIterable<Uint8Array> {\n return streamCore(this.accessor, p)\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return readCore(this.accessor, p)\n }\n\n writeFile(p: PathSpec, data: Uint8Array): Promise<void> {\n return writeCore(this.accessor, p, data)\n }\n\n async appendFile(p: PathSpec, data: Uint8Array): Promise<void> {\n let existing: Uint8Array\n try {\n existing = await readCore(this.accessor, p)\n } catch (err) {\n if ((err as { code?: string } | null)?.code === 'ENOENT') {\n existing = new Uint8Array()\n } else {\n throw err\n }\n }\n const merged = new Uint8Array(existing.byteLength + data.byteLength)\n merged.set(existing, 0)\n merged.set(data, existing.byteLength)\n await writeCore(this.accessor, p, merged)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return readdirCore(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return statCore(this.accessor, p, this.index)\n }\n\n exists(p: PathSpec): Promise<boolean> {\n return existsCore(this.accessor, p)\n }\n\n mkdir(p: PathSpec): Promise<void> {\n return mkdirCore(this.accessor, p)\n }\n\n rmdir(p: PathSpec): Promise<void> {\n return rmdirCore(this.accessor, p)\n }\n\n unlink(p: PathSpec): Promise<void> {\n return unlinkCore(this.accessor, p)\n }\n\n rename(src: PathSpec, dst: PathSpec): Promise<void> {\n return renameCore(this.accessor, src, dst)\n }\n\n truncate(p: PathSpec, length: number): Promise<void> {\n return truncateCore(this.accessor, p, length)\n }\n\n copy(src: PathSpec, dst: PathSpec): Promise<void> {\n return copyCore(this.accessor, src, dst)\n }\n\n rmR(p: PathSpec): Promise<void> {\n return rmRCore(this.accessor, p)\n }\n\n du(p: PathSpec): Promise<number> {\n return duSizeCore(this.accessor, p)\n }\n\n find(p: PathSpec, options: FindOptions = {}): Promise<string[]> {\n return findCore(this.accessor, p, options)\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective = prefix\n ? paths.map((p) =>\n mountPrefixOf(p.virtual, p.resourcePath)\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, prefix),\n }),\n )\n : paths\n return globCore(this.accessor, effective, this.index)\n }\n\n getState(): Promise<S3ResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactConfig(this.config),\n })\n }\n\n loadState(_state: S3ResourceState): Promise<void> {\n return Promise.resolve()\n }\n\n // Ignored — duEntries is not yet on the public Resource interface, but keeping\n // it around matches the node-side S3Resource.opsMap hook for completeness.\n _duEntries(p: PathSpec): Promise<[[string, number][], number]> {\n return duEntriesCore(this.accessor, p)\n }\n\n _rangeRead(p: PathSpec, offset: number, size: number): Promise<Uint8Array> {\n return rangeReadCore(this.accessor, p, offset, size)\n }\n\n _create(p: PathSpec): Promise<void> {\n return createCore(this.accessor, p)\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport {\n redactS3Config as redactConfig,\n type S3BrowserOperation,\n type S3BrowserPresignedUrlProvider,\n type S3BrowserSignOptions,\n type S3Config,\n type S3ConfigRedacted,\n} from '@struktoai/mirage-core'\n"],"mappings":";AAcA,SAAS,UAAU,qBAAqB;AACxC;AAAA,EACE,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,UAAU;AAAA,EAGV,QAAQ;AAAA,EAER;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,EACR,WAAW;AAAA,EAGX,UAAU;AAAA,EAEV;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,SAAS;AAAA,OACJ;;;ACnCP;AAAA,EACoB;AAAA,OAMb;;;AD+BP,IAAM,WAAW,gBAAgB,aAAa,cAAc;AAErD,IAAM,oBAAoB;AAAA;AAAA;AAAA;AA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,QACX,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ,cAAc,SAAS,EAAE,SAAS,MAAM;AAAA,MAC1C,CAAC;AAAA,IACP,IACA;AACJ,WAAO,SAAS,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EACtD;AAAA,EAEA,WAAqC;AACnC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,eAAa,KAAK,MAAM;AAAA,IAClC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAAwC;AAChD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA;AAAA;AAAA,EAIA,WAAW,GAAoD;AAC7D,WAAO,cAAc,KAAK,UAAU,CAAC;AAAA,EACvC;AAAA,EAEA,WAAW,GAAa,QAAgB,MAAmC;AACzE,WAAO,cAAc,KAAK,UAAU,GAAG,QAAQ,IAAI;AAAA,EACrD;AAAA,EAEA,QAAQ,GAA4B;AAClC,WAAO,WAAW,KAAK,UAAU,CAAC;AAAA,EACpC;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactBoxConfig
3
- } from "./chunk-GQVJTQXU.js";
3
+ } from "./chunk-L64GRKOD.js";
4
4
 
5
5
  // src/resource/box/box.ts
6
6
  import { mountKey, mountPrefixOf } from "@struktoai/mirage-core";
@@ -22,6 +22,9 @@ var boxResolveGlob = makeResolveGlob(boxReaddir);
22
22
  var BoxResource = class {
23
23
  kind = ResourceName.BOX;
24
24
  cachesReads = true;
25
+ // Box item listings carry an exact byte `size` for every file (0
26
+ // included); sizeless weblinks are filtered out of listings.
27
+ sizesAlwaysKnown = true;
25
28
  indexTtl = 86400;
26
29
  prompt = BOX_PROMPT;
27
30
  config;
@@ -29,15 +32,7 @@ var BoxResource = class {
29
32
  index;
30
33
  constructor(config) {
31
34
  this.config = config;
32
- const tm = new BoxTokenManager({
33
- ...config.endpoint !== void 0 ? { endpoint: config.endpoint } : {},
34
- ...config.clientId !== void 0 ? { clientId: config.clientId } : {},
35
- ...config.clientSecret !== void 0 ? { clientSecret: config.clientSecret } : {},
36
- ...config.refreshToken !== void 0 ? { refreshToken: config.refreshToken } : {},
37
- ...config.accessToken !== void 0 ? { accessToken: config.accessToken } : {},
38
- ...config.refreshFn !== void 0 ? { refreshFn: config.refreshFn } : {},
39
- ...config.onRefreshTokenRotated !== void 0 ? { onRefreshTokenRotated: config.onRefreshTokenRotated } : {}
40
- });
35
+ const tm = new BoxTokenManager(config);
41
36
  this.accessor = new BoxAccessor({
42
37
  tokenManager: tm,
43
38
  ...config.rootFolderId !== void 0 ? { rootFolderId: config.rootFolderId } : {},
@@ -92,4 +87,4 @@ var BoxResource = class {
92
87
  export {
93
88
  BoxResource
94
89
  };
95
- //# sourceMappingURL=chunk-NYTRDAWX.js.map
90
+ //# sourceMappingURL=chunk-BV372CUO.js.map
@@ -0,0 +1 @@
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 { mountKey, mountPrefixOf } from '@struktoai/mirage-core'\nimport {\n BOX_COMMANDS,\n BOX_PROMPT,\n BOX_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 makeResolveGlob,\n boxStat,\n} from '@struktoai/mirage-core'\nimport { redactBoxConfig, type BoxConfig, type BoxConfigRedacted } from './config.ts'\n\nconst boxResolveGlob = makeResolveGlob(boxReaddir)\n\nexport interface BoxResourceState {\n type: string\n config: BoxConfigRedacted\n}\n\nexport class BoxResource implements Resource {\n readonly kind: string = ResourceName.BOX\n readonly cachesReads: boolean = true\n // Box item listings carry an exact byte `size` for every file (0\n // included); sizeless weblinks are filtered out of listings.\n readonly sizesAlwaysKnown: 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 // The whole config goes to the token manager, never a hand-picked\n // subset: a field added to BoxConfig would silently stop reaching it\n // (that is how gdrive lost apiBase and kept refreshing at the real\n // Google endpoint against a fake server).\n const tm = new BoxTokenManager(config)\n this.accessor = new BoxAccessor({\n tokenManager: tm,\n ...(config.rootFolderId !== undefined ? { rootFolderId: config.rootFolderId } : {}),\n ...(config.contentSearch !== undefined ? { contentSearch: config.contentSearch } : {}),\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 BOX_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return BOX_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 glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n mountPrefixOf(p.virtual, p.resourcePath) !== ''\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, 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 config: redactBoxConfig(this.config),\n })\n }\n\n loadState(_state: BoxResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA,SAAS,UAAU,qBAAqB;AACxC;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;AAGP,IAAM,iBAAiB,gBAAgB,UAAU;AAO1C,IAAM,cAAN,MAAsC;AAAA,EAClC,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA;AAAA;AAAA,EAGvB,mBAA4B;AAAA,EAC5B,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,QAAmB;AAC7B,SAAK,SAAS;AAKd,UAAM,KAAK,IAAI,gBAAgB,MAAM;AACrC,SAAK,WAAW,IAAI,YAAY;AAAA,MAC9B,cAAc;AAAA,MACd,GAAI,OAAO,iBAAiB,SAAY,EAAE,cAAc,OAAO,aAAa,IAAI,CAAC;AAAA,MACjF,GAAI,OAAO,kBAAkB,SAAY,EAAE,eAAe,OAAO,cAAc,IAAI,CAAC;AAAA,IACtF,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,QAAQ,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAC7C;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,WAAW,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAChD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,QAAQ,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAC7C;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,cAAc,EAAE,SAAS,EAAE,YAAY,MAAM,KACzC,IACA,IAAI,SAAS;AAAA,QACX,SAAS,EAAE;AAAA,QACX,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ,cAAc,SAAS,EAAE,SAAS,MAAM;AAAA,MAC1C,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,QAAQ,gBAAgB,KAAK,MAAM;AAAA,IACrC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAAyC;AACjD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  S3Resource
3
- } from "./chunk-DC6VA36O.js";
3
+ } from "./chunk-BGA2F226.js";
4
4
 
5
5
  // src/resource/oci/oci.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/oci/config.ts
13
- import { redactConfigWithSchema, secretSchema, z } from "@struktoai/mirage-core";
13
+ import {
14
+ redactConfigWithSchema,
15
+ secretSchema,
16
+ z
17
+ } from "@struktoai/mirage-core";
14
18
  var OCIConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -88,4 +92,4 @@ export {
88
92
  OCI_BROWSER_PROMPT,
89
93
  OCIResource
90
94
  };
91
- //# sourceMappingURL=chunk-HTQ4GBKM.js.map
95
+ //# sourceMappingURL=chunk-C4THTILY.js.map
@@ -0,0 +1 @@
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 {\n remapCommandsResource,\n remapOpsResource,\n ResourceName,\n type RegisteredCommand,\n type RegisteredOp,\n} 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 config: OCIConfigRedacted\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 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 {\n redactConfigWithSchema,\n type ConfigOf,\n type RedactedConfig,\n secretSchema,\n z,\n} from '@struktoai/mirage-core'\nimport type { S3BrowserPresignedUrlProvider, S3Config } from '../s3/config.ts'\n\nconst OCIConfigSchema = z.object({\n bucket: z.string(),\n presignedUrlProvider: secretSchema(\n z.custom<S3BrowserPresignedUrlProvider>((value) => typeof value === 'function'),\n ),\n namespace: z.string().optional(),\n region: z.string().optional(),\n endpoint: z.string().optional(),\n defaultContentType: z.string().optional(),\n keyPrefix: z.string().optional(),\n})\n\nexport type OCIConfig = ConfigOf<typeof OCIConfigSchema>\n\nexport type OCIConfigRedacted = RedactedConfig<OCIConfig, 'presignedUrlProvider'>\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 ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n }\n}\n\nexport function redactOciConfig(config: OCIConfig): OCIConfigRedacted {\n return redactConfigWithSchema(OCIConfigSchema, config) as unknown as OCIConfigRedacted\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;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACNP;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAGP,IAAM,kBAAkB,EAAE,OAAO;AAAA,EAC/B,QAAQ,EAAE,OAAO;AAAA,EACjB,sBAAsB;AAAA,IACpB,EAAE,OAAsC,CAAC,UAAU,OAAO,UAAU,UAAU;AAAA,EAChF;AAAA,EACA,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA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G;AAAA,EAC7E;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAsC;AAC7C,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,gBAAgB,KAAK,SAAS;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAAyC;AAC1D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  S3Resource
3
- } from "./chunk-DC6VA36O.js";
3
+ } from "./chunk-BGA2F226.js";
4
4
 
5
5
  // src/resource/scaleway/scaleway.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/scaleway/config.ts
13
- import { redactConfigWithSchema, secretSchema, z } from "@struktoai/mirage-core";
13
+ import {
14
+ redactConfigWithSchema,
15
+ secretSchema,
16
+ z
17
+ } from "@struktoai/mirage-core";
14
18
  var ScalewayConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -88,4 +92,4 @@ export {
88
92
  SCALEWAY_BROWSER_PROMPT,
89
93
  ScalewayResource
90
94
  };
91
- //# sourceMappingURL=chunk-GENFT46X.js.map
95
+ //# sourceMappingURL=chunk-D4MEOKNQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/scaleway/scaleway.ts","../src/resource/scaleway/config.ts","../src/resource/scaleway/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n remapCommandsResource,\n remapOpsResource,\n ResourceName,\n type RegisteredCommand,\n type RegisteredOp,\n} from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport {\n redactScalewayConfig,\n scalewayToS3Config,\n type ScalewayConfig,\n type ScalewayConfigRedacted,\n} from './config.ts'\nimport { SCALEWAY_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface ScalewayResourceState {\n type: string\n config: ScalewayConfigRedacted\n}\n\nexport class ScalewayResource extends S3Resource {\n override readonly kind: string = ResourceName.SCALEWAY\n override readonly prompt: string = SCALEWAY_BROWSER_PROMPT\n readonly scalewayConfig: ScalewayConfig\n private readonly scalewayOps: readonly RegisteredOp[]\n private readonly scalewayCommands: readonly RegisteredCommand[]\n\n constructor(config: ScalewayConfig) {\n super(scalewayToS3Config(config))\n this.scalewayConfig = config\n this.scalewayOps = remapOpsResource(super.ops(), ResourceName.SCALEWAY)\n this.scalewayCommands = remapCommandsResource(super.commands(), ResourceName.SCALEWAY)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.scalewayOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.scalewayCommands\n }\n\n override getState(): Promise<ScalewayResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactScalewayConfig(this.scalewayConfig),\n })\n }\n\n override loadState(_state: ScalewayResourceState): 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 {\n redactConfigWithSchema,\n type ConfigOf,\n type RedactedConfig,\n secretSchema,\n z,\n} from '@struktoai/mirage-core'\nimport type { S3BrowserPresignedUrlProvider, S3Config } from '../s3/config.ts'\n\nconst ScalewayConfigSchema = z.object({\n bucket: z.string(),\n presignedUrlProvider: secretSchema(\n z.custom<S3BrowserPresignedUrlProvider>((value) => typeof value === 'function'),\n ),\n region: z.string().optional(),\n endpoint: z.string().optional(),\n defaultContentType: z.string().optional(),\n keyPrefix: z.string().optional(),\n})\n\nexport type ScalewayConfig = ConfigOf<typeof ScalewayConfigSchema>\n\nexport type ScalewayConfigRedacted = RedactedConfig<ScalewayConfig, 'presignedUrlProvider'>\n\nexport function resolvedScalewayEndpoint(config: ScalewayConfig): string | undefined {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.region !== undefined && config.region !== '') {\n const region = config.region\n return `https://s3.${region}.scw.cloud`\n }\n return undefined\n}\n\nexport function scalewayToS3Config(config: ScalewayConfig): S3Config {\n const endpoint = resolvedScalewayEndpoint(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 ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n }\n}\n\nexport function redactScalewayConfig(config: ScalewayConfig): ScalewayConfigRedacted {\n return redactConfigWithSchema(ScalewayConfigSchema, config) as unknown as ScalewayConfigRedacted\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 SCALEWAY_BROWSER_PROMPT = `{prefix}\n Remote Scaleway Object Storage bucket (S3-compatible) 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;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACNP;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAGP,IAAM,uBAAuB,EAAE,OAAO;AAAA,EACpC,QAAQ,EAAE,OAAO;AAAA,EACjB,sBAAsB;AAAA,IACpB,EAAE,OAAsC,CAAC,UAAU,OAAO,UAAU,UAAU;AAAA,EAChF;AAAA,EACA,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,oBAAoB,EAAE,OAAO,EAAE,SAAS;AAAA,EACxC,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAMM,SAAS,yBAAyB,QAA4C;AACnF,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,MAAI,OAAO,WAAW,UAAa,OAAO,WAAW,IAAI;AACvD,UAAM,SAAS,OAAO;AACtB,WAAO,cAAc,MAAM;AAAA,EAC7B;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,GAAI,OAAO,uBAAuB,SAC9B,EAAE,oBAAoB,OAAO,mBAAmB,IAChD,CAAC;AAAA,IACL,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;AACF;AAEO,SAAS,qBAAqB,QAAgD;AACnF,SAAO,uBAAuB,sBAAsB,MAAM;AAC5D;;;ACjDO,IAAM,0BAA0B;AAAA;AAAA;AAAA;AAAA;;;AFqBhC,IAAM,mBAAN,cAA+B,WAAW;AAAA,EAC7B,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAwB;AAClC,UAAM,mBAAmB,MAAM,CAAC;AAChC,SAAK,iBAAiB;AACtB,SAAK,cAAc,iBAAiB,MAAM,IAAI,GAAG,aAAa,QAAQ;AACtE,SAAK,mBAAmB,sBAAsB,MAAM,SAAS,GAAG,aAAa,QAAQ;AAAA,EACvF;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAA2C;AAClD,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,qBAAqB,KAAK,cAAc;AAAA,IAClD,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAA8C;AAC/D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -0,0 +1,88 @@
1
+ import {
2
+ redactGoogleConfig
3
+ } from "./chunk-ZTHVEXIV.js";
4
+
5
+ // src/resource/gcal/gcal.ts
6
+ import { mountKey, mountPrefixOf } from "@struktoai/mirage-core";
7
+ import {
8
+ GCAL_COMMANDS,
9
+ GCAL_PROMPT,
10
+ GCAL_WRITE_PROMPT,
11
+ GCAL_OPS,
12
+ GCalAccessor,
13
+ PathSpec,
14
+ RAMIndexCacheStore,
15
+ ResourceName,
16
+ TokenManager,
17
+ gcalRead,
18
+ gcalReaddir,
19
+ makeResolveGlob,
20
+ gcalStat
21
+ } from "@struktoai/mirage-core";
22
+ var gcalResolveGlob = makeResolveGlob(gcalReaddir);
23
+ var GCalResource = class {
24
+ kind = ResourceName.GCAL;
25
+ cachesReads = true;
26
+ // Shorter than the other Google mounts: a calendar is edited by other
27
+ // people and a day-long index would keep serving a schedule that has
28
+ // already moved.
29
+ indexTtl = 300;
30
+ prompt = GCAL_PROMPT;
31
+ writePrompt = GCAL_WRITE_PROMPT;
32
+ config;
33
+ accessor;
34
+ index;
35
+ constructor(config) {
36
+ this.config = config;
37
+ const tm = new TokenManager(config);
38
+ this.accessor = new GCalAccessor({ tokenManager: tm, config });
39
+ this.index = new RAMIndexCacheStore({ ttl: 300 });
40
+ }
41
+ open() {
42
+ return Promise.resolve();
43
+ }
44
+ close() {
45
+ return Promise.resolve();
46
+ }
47
+ commands() {
48
+ return GCAL_COMMANDS;
49
+ }
50
+ ops() {
51
+ return GCAL_OPS;
52
+ }
53
+ readFile(p) {
54
+ return gcalRead(this.accessor, p, this.index);
55
+ }
56
+ readdir(p) {
57
+ return gcalReaddir(this.accessor, p, this.index);
58
+ }
59
+ stat(p) {
60
+ return gcalStat(this.accessor, p, this.index);
61
+ }
62
+ glob(paths, prefix = "") {
63
+ const effective = prefix !== "" ? paths.map(
64
+ (p) => mountPrefixOf(p.virtual, p.resourcePath) !== "" ? p : new PathSpec({
65
+ virtual: p.virtual,
66
+ directory: p.directory,
67
+ ...p.pattern !== null ? { pattern: p.pattern } : {},
68
+ resolved: p.resolved,
69
+ resourcePath: mountKey(p.virtual, prefix)
70
+ })
71
+ ) : paths;
72
+ return gcalResolveGlob(this.accessor, effective, this.index);
73
+ }
74
+ getState() {
75
+ return Promise.resolve({
76
+ type: this.kind,
77
+ config: redactGoogleConfig(this.config)
78
+ });
79
+ }
80
+ loadState(_state) {
81
+ return Promise.resolve();
82
+ }
83
+ };
84
+
85
+ export {
86
+ GCalResource
87
+ };
88
+ //# sourceMappingURL=chunk-D4RAMWYH.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/gcal/gcal.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 { mountKey, mountPrefixOf } from '@struktoai/mirage-core'\nimport {\n type FileStat,\n GCAL_COMMANDS,\n GCAL_PROMPT,\n GCAL_WRITE_PROMPT,\n GCAL_OPS,\n GCalAccessor,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n TokenManager,\n gcalRead,\n gcalReaddir,\n makeResolveGlob,\n gcalStat,\n} from '@struktoai/mirage-core'\nimport { redactGCalConfig, type GCalConfig, type GCalConfigRedacted } from './config.ts'\n\nconst gcalResolveGlob = makeResolveGlob(gcalReaddir)\n\nexport interface GCalResourceState {\n type: string\n config: GCalConfigRedacted\n}\n\nexport class GCalResource implements Resource {\n readonly kind: string = ResourceName.GCAL\n readonly cachesReads: boolean = true\n // Shorter than the other Google mounts: a calendar is edited by other\n // people and a day-long index would keep serving a schedule that has\n // already moved.\n readonly indexTtl: number = 300\n readonly prompt: string = GCAL_PROMPT\n readonly writePrompt: string = GCAL_WRITE_PROMPT\n readonly config: GCalConfig\n readonly accessor: GCalAccessor\n readonly index: IndexCacheStore\n\n constructor(config: GCalConfig) {\n this.config = config\n const tm = new TokenManager(config)\n this.accessor = new GCalAccessor({ tokenManager: tm, config })\n this.index = new RAMIndexCacheStore({ ttl: 300 })\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 GCAL_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GCAL_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return gcalRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return gcalReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return gcalStat(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 mountPrefixOf(p.virtual, p.resourcePath) !== ''\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, prefix),\n }),\n )\n : paths\n return gcalResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GCalResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactGCalConfig(this.config),\n })\n }\n\n loadState(_state: GCalResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA,SAAS,UAAU,qBAAqB;AACxC;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;AAGP,IAAM,kBAAkB,gBAAgB,WAAW;AAO5C,IAAM,eAAN,MAAuC;AAAA,EACnC,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA;AAAA;AAAA;AAAA,EAIvB,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB,cAAsB;AAA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,KAAK,MAAM;AAAA,IACtC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA0C;AAClD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  S3Resource
3
- } from "./chunk-DC6VA36O.js";
3
+ } from "./chunk-BGA2F226.js";
4
4
 
5
5
  // src/resource/aliyun/aliyun.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/aliyun/config.ts
13
- import { redactConfigWithSchema, secretSchema, z } from "@struktoai/mirage-core";
13
+ import {
14
+ redactConfigWithSchema,
15
+ secretSchema,
16
+ z
17
+ } from "@struktoai/mirage-core";
14
18
  var AliyunConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -88,4 +92,4 @@ export {
88
92
  ALIYUN_BROWSER_PROMPT,
89
93
  AliyunResource
90
94
  };
91
- //# sourceMappingURL=chunk-3FZ3GHZO.js.map
95
+ //# sourceMappingURL=chunk-EHIT6WCY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/aliyun/aliyun.ts","../src/resource/aliyun/config.ts","../src/resource/aliyun/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n remapCommandsResource,\n remapOpsResource,\n ResourceName,\n type RegisteredCommand,\n type RegisteredOp,\n} from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport {\n aliyunToS3Config,\n redactAliyunConfig,\n type AliyunConfig,\n type AliyunConfigRedacted,\n} from './config.ts'\nimport { ALIYUN_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface AliyunResourceState {\n type: string\n config: AliyunConfigRedacted\n}\n\nexport class AliyunResource extends S3Resource {\n override readonly kind: string = ResourceName.ALIYUN\n override readonly prompt: string = ALIYUN_BROWSER_PROMPT\n readonly aliyunConfig: AliyunConfig\n private readonly aliyunOps: readonly RegisteredOp[]\n private readonly aliyunCommands: readonly RegisteredCommand[]\n\n constructor(config: AliyunConfig) {\n super(aliyunToS3Config(config))\n this.aliyunConfig = config\n this.aliyunOps = remapOpsResource(super.ops(), ResourceName.ALIYUN)\n this.aliyunCommands = remapCommandsResource(super.commands(), ResourceName.ALIYUN)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.aliyunOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.aliyunCommands\n }\n\n override getState(): Promise<AliyunResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactAliyunConfig(this.aliyunConfig),\n })\n }\n\n override loadState(_state: AliyunResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n redactConfigWithSchema,\n type ConfigOf,\n type RedactedConfig,\n secretSchema,\n z,\n} from '@struktoai/mirage-core'\nimport type { S3BrowserPresignedUrlProvider, S3Config } from '../s3/config.ts'\n\nconst AliyunConfigSchema = z.object({\n bucket: z.string(),\n presignedUrlProvider: secretSchema(\n z.custom<S3BrowserPresignedUrlProvider>((value) => typeof value === 'function'),\n ),\n region: z.string().optional(),\n endpoint: z.string().optional(),\n defaultContentType: z.string().optional(),\n keyPrefix: z.string().optional(),\n})\n\nexport type AliyunConfig = ConfigOf<typeof AliyunConfigSchema>\n\nexport type AliyunConfigRedacted = RedactedConfig<AliyunConfig, 'presignedUrlProvider'>\n\nexport function resolvedAliyunEndpoint(config: AliyunConfig): string | undefined {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.region !== undefined && config.region !== '') {\n const region = config.region\n return `https://s3.oss-${region}.aliyuncs.com`\n }\n return undefined\n}\n\nexport function aliyunToS3Config(config: AliyunConfig): S3Config {\n const endpoint = resolvedAliyunEndpoint(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 ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n }\n}\n\nexport function redactAliyunConfig(config: AliyunConfig): AliyunConfigRedacted {\n return redactConfigWithSchema(AliyunConfigSchema, config) as unknown as AliyunConfigRedacted\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport const ALIYUN_BROWSER_PROMPT = `{prefix}\n Remote Alibaba Cloud OSS bucket (S3-compatible) 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;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACNP;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAGP,IAAM,qBAAqB,EAAE,OAAO;AAAA,EAClC,QAAQ,EAAE,OAAO;AAAA,EACjB,sBAAsB;AAAA,IACpB,EAAE,OAAsC,CAAC,UAAU,OAAO,UAAU,UAAU;AAAA,EAChF;AAAA,EACA,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,oBAAoB,EAAE,OAAO,EAAE,SAAS;AAAA,EACxC,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAMM,SAAS,uBAAuB,QAA0C;AAC/E,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,MAAI,OAAO,WAAW,UAAa,OAAO,WAAW,IAAI;AACvD,UAAM,SAAS,OAAO;AACtB,WAAO,kBAAkB,MAAM;AAAA,EACjC;AACA,SAAO;AACT;AAEO,SAAS,iBAAiB,QAAgC;AAC/D,QAAM,WAAW,uBAAuB,MAAM;AAC9C,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,GAAI,OAAO,uBAAuB,SAC9B,EAAE,oBAAoB,OAAO,mBAAmB,IAChD,CAAC;AAAA,IACL,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;AACF;AAEO,SAAS,mBAAmB,QAA4C;AAC7E,SAAO,uBAAuB,oBAAoB,MAAM;AAC1D;;;ACjDO,IAAM,wBAAwB;AAAA;AAAA;AAAA;AAAA;;;AFqB9B,IAAM,iBAAN,cAA6B,WAAW;AAAA,EAC3B,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAsB;AAChC,UAAM,iBAAiB,MAAM,CAAC;AAC9B,SAAK,eAAe;AACpB,SAAK,YAAY,iBAAiB,MAAM,IAAI,GAAG,aAAa,MAAM;AAClE,SAAK,iBAAiB,sBAAsB,MAAM,SAAS,GAAG,aAAa,MAAM;AAAA,EACnF;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAmB,KAAK,YAAY;AAAA,IAC9C,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAA4C;AAC7D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  S3Resource
3
- } from "./chunk-DC6VA36O.js";
3
+ } from "./chunk-BGA2F226.js";
4
4
 
5
5
  // src/resource/r2/r2.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/r2/config.ts
13
- import { redactConfigWithSchema, secretSchema, z } from "@struktoai/mirage-core";
13
+ import {
14
+ redactConfigWithSchema,
15
+ secretSchema,
16
+ z
17
+ } from "@struktoai/mirage-core";
14
18
  var R2ConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -88,4 +92,4 @@ export {
88
92
  R2_BROWSER_PROMPT,
89
93
  R2Resource
90
94
  };
91
- //# sourceMappingURL=chunk-PCC6EZIE.js.map
95
+ //# sourceMappingURL=chunk-EN6TZYT2.js.map
@@ -0,0 +1 @@
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 {\n remapCommandsResource,\n remapOpsResource,\n ResourceName,\n type RegisteredCommand,\n type RegisteredOp,\n} 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 config: R2ConfigRedacted\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 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 {\n redactConfigWithSchema,\n type ConfigOf,\n type RedactedConfig,\n secretSchema,\n z,\n} from '@struktoai/mirage-core'\nimport type { S3BrowserPresignedUrlProvider, S3Config } from '../s3/config.ts'\n\nconst R2ConfigSchema = z.object({\n bucket: z.string(),\n presignedUrlProvider: secretSchema(\n z.custom<S3BrowserPresignedUrlProvider>((value) => typeof value === 'function'),\n ),\n accountId: z.string().optional(),\n region: z.string().optional(),\n endpoint: z.string().optional(),\n defaultContentType: z.string().optional(),\n keyPrefix: z.string().optional(),\n})\n\nexport type R2Config = ConfigOf<typeof R2ConfigSchema>\n\nexport type R2ConfigRedacted = RedactedConfig<R2Config, 'presignedUrlProvider'>\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 ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n }\n}\n\nexport function redactR2Config(config: R2Config): R2ConfigRedacted {\n return redactConfigWithSchema(R2ConfigSchema, config) as unknown as R2ConfigRedacted\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;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACNP;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAGP,IAAM,iBAAiB,EAAE,OAAO;AAAA,EAC9B,QAAQ,EAAE,OAAO;AAAA,EACjB,sBAAsB;AAAA,IACpB,EAAE,OAAsC,CAAC,UAAU,OAAO,UAAU,UAAU;AAAA,EAChF;AAAA,EACA,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,oBAAoB,EAAE,OAAO,EAAE,SAAS;AAAA,EACxC,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAMM,SAAS,mBAAmB,QAAsC;AACvE,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,MAAI,OAA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
1
  import {
2
2
  S3Resource
3
- } from "./chunk-DC6VA36O.js";
3
+ } from "./chunk-BGA2F226.js";
4
4
 
5
5
  // src/resource/seaweedfs/seaweedfs.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/seaweedfs/config.ts
13
- import { redactConfigWithSchema, secretSchema, z } from "@struktoai/mirage-core";
13
+ import {
14
+ redactConfigWithSchema,
15
+ secretSchema,
16
+ z
17
+ } from "@struktoai/mirage-core";
14
18
  var SeaweedFSConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -78,4 +82,4 @@ export {
78
82
  SEAWEEDFS_BROWSER_PROMPT,
79
83
  SeaweedFSResource
80
84
  };
81
- //# sourceMappingURL=chunk-MB4TUUJQ.js.map
85
+ //# sourceMappingURL=chunk-FTDVV7EQ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/seaweedfs/seaweedfs.ts","../src/resource/seaweedfs/config.ts","../src/resource/seaweedfs/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n remapCommandsResource,\n remapOpsResource,\n ResourceName,\n type RegisteredCommand,\n type RegisteredOp,\n} from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport {\n redactSeaweedFSConfig,\n seaweedfsToS3Config,\n type SeaweedFSConfig,\n type SeaweedFSConfigRedacted,\n} from './config.ts'\nimport { SEAWEEDFS_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface SeaweedFSResourceState {\n type: string\n config: SeaweedFSConfigRedacted\n}\n\nexport class SeaweedFSResource extends S3Resource {\n override readonly kind: string = ResourceName.SEAWEEDFS\n override readonly prompt: string = SEAWEEDFS_BROWSER_PROMPT\n readonly seaweedfsConfig: SeaweedFSConfig\n private readonly seaweedfsOps: readonly RegisteredOp[]\n private readonly seaweedfsCommands: readonly RegisteredCommand[]\n\n constructor(config: SeaweedFSConfig) {\n super(seaweedfsToS3Config(config))\n this.seaweedfsConfig = config\n this.seaweedfsOps = remapOpsResource(super.ops(), ResourceName.SEAWEEDFS)\n this.seaweedfsCommands = remapCommandsResource(super.commands(), ResourceName.SEAWEEDFS)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.seaweedfsOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.seaweedfsCommands\n }\n\n override getState(): Promise<SeaweedFSResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactSeaweedFSConfig(this.seaweedfsConfig),\n })\n }\n\n override loadState(_state: SeaweedFSResourceState): 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 {\n redactConfigWithSchema,\n type ConfigOf,\n type RedactedConfig,\n secretSchema,\n z,\n} from '@struktoai/mirage-core'\nimport type { S3BrowserPresignedUrlProvider, S3Config } from '../s3/config.ts'\n\nconst SeaweedFSConfigSchema = z.object({\n bucket: z.string(),\n presignedUrlProvider: secretSchema(\n z.custom<S3BrowserPresignedUrlProvider>((value) => typeof value === 'function'),\n ),\n endpoint: z.string().optional(),\n region: z.string().optional(),\n defaultContentType: z.string().optional(),\n keyPrefix: z.string().optional(),\n})\n\nexport type SeaweedFSConfig = ConfigOf<typeof SeaweedFSConfigSchema>\n\nexport type SeaweedFSConfigRedacted = RedactedConfig<SeaweedFSConfig, 'presignedUrlProvider'>\n\nexport function seaweedfsToS3Config(config: SeaweedFSConfig): S3Config {\n return {\n bucket: config.bucket,\n presignedUrlProvider: config.presignedUrlProvider,\n ...(config.region !== undefined ? { region: config.region } : {}),\n ...(config.endpoint !== undefined ? { endpoint: config.endpoint } : {}),\n ...(config.defaultContentType !== undefined\n ? { defaultContentType: config.defaultContentType }\n : {}),\n ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n }\n}\n\nexport function redactSeaweedFSConfig(config: SeaweedFSConfig): SeaweedFSConfigRedacted {\n return redactConfigWithSchema(SeaweedFSConfigSchema, config) as unknown as SeaweedFSConfigRedacted\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 SEAWEEDFS_BROWSER_PROMPT = `{prefix}\n Remote SeaweedFS bucket (S3-compatible gateway) 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":";;;;;AAc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AoB,sBAAsB,MAAM,SAAS,GAAG,aAAa,SAAS;AAAA,EACzF;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAA4C;AACnD,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,sBAAsB,KAAK,eAAe;AAAA,IACpD,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAA+C;AAChE,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  S3Resource
3
- } from "./chunk-DC6VA36O.js";
3
+ } from "./chunk-BGA2F226.js";
4
4
 
5
5
  // src/resource/tencent/tencent.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/tencent/config.ts
13
- import { redactConfigWithSchema, secretSchema, z } from "@struktoai/mirage-core";
13
+ import {
14
+ redactConfigWithSchema,
15
+ secretSchema,
16
+ z
17
+ } from "@struktoai/mirage-core";
14
18
  var TencentConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -88,4 +92,4 @@ export {
88
92
  TENCENT_BROWSER_PROMPT,
89
93
  TencentResource
90
94
  };
91
- //# sourceMappingURL=chunk-VASFK7V6.js.map
95
+ //# sourceMappingURL=chunk-G67Q2Z6I.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resource/tencent/tencent.ts","../src/resource/tencent/config.ts","../src/resource/tencent/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n remapCommandsResource,\n remapOpsResource,\n ResourceName,\n type RegisteredCommand,\n type RegisteredOp,\n} from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport {\n redactTencentConfig,\n tencentToS3Config,\n type TencentConfig,\n type TencentConfigRedacted,\n} from './config.ts'\nimport { TENCENT_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface TencentResourceState {\n type: string\n config: TencentConfigRedacted\n}\n\nexport class TencentResource extends S3Resource {\n override readonly kind: string = ResourceName.TENCENT\n override readonly prompt: string = TENCENT_BROWSER_PROMPT\n readonly tencentConfig: TencentConfig\n private readonly tencentOps: readonly RegisteredOp[]\n private readonly tencentCommands: readonly RegisteredCommand[]\n\n constructor(config: TencentConfig) {\n super(tencentToS3Config(config))\n this.tencentConfig = config\n this.tencentOps = remapOpsResource(super.ops(), ResourceName.TENCENT)\n this.tencentCommands = remapCommandsResource(super.commands(), ResourceName.TENCENT)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.tencentOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.tencentCommands\n }\n\n override getState(): Promise<TencentResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactTencentConfig(this.tencentConfig),\n })\n }\n\n override loadState(_state: TencentResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { redactConfigWithSchema, secretSchema, z } from '@struktoai/mirage-core'\nimport type { S3BrowserPresignedUrlProvider, S3Config } from '../s3/config.ts'\n\nexport interface TencentConfig {\n bucket: string\n presignedUrlProvider: S3BrowserPresignedUrlProvider\n region?: string\n endpoint?: string\n defaultContentType?: string\n keyPrefix?: string\n}\n\nexport interface TencentConfigRedacted extends Omit<TencentConfig, 'presignedUrlProvider'> {\n presignedUrlProvider: '<REDACTED>'\n}\n\nconst TencentConfigSchema = z.object({\n bucket: z.string(),\n presignedUrlProvider: secretSchema(\n z.custom<S3BrowserPresignedUrlProvider>((value) => typeof value === 'function'),\n ),\n region: z.string().optional(),\n endpoint: z.string().optional(),\n defaultContentType: z.string().optional(),\n keyPrefix: z.string().optional(),\n})\n\nexport function resolvedTencentEndpoint(config: TencentConfig): string | undefined {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.region !== undefined && config.region !== '') {\n const region = config.region\n return `https://cos.${region}.myqcloud.com`\n }\n return undefined\n}\n\nexport function tencentToS3Config(config: TencentConfig): S3Config {\n const endpoint = resolvedTencentEndpoint(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 ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n }\n}\n\nexport function redactTencentConfig(config: TencentConfig): TencentConfigRedacted {\n return redactConfigWithSchema(TencentConfigSchema, config) as unknown as TencentConfigRedacted\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport const TENCENT_BROWSER_PROMPT = `{prefix}\n Remote Tencent Cloud COS bucket (S3-compatible) 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;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACNP,SAAS,wBAAwB,cAAc,SAAS;AAgBxD,IAAM,sBAAsB,EAAE,OAAO;AAAA,EACnC,QAAQ,EAAE,OAAO;AAAA,EACjB,sBAAsB;AAAA,IACpB,EAAE,OAAsC,CAAC,UAAU,OAAO,UAAU,UAAU;AAAA,EAChF;AAAA,EACA,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,oBAAoB,EAAE,OAAO,EAAE,SAAS;AAAA,EACxC,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAEM,SAAS,wBAAwB,QAA2C;AACjF,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,MAAI,OAAO,WAAW,UAAa,OAAO,WAAW,IAAI;AACvD,UAAM,SAAS,OAAO;AACtB,WAAO,eAAe,MAAM;AAAA,EAC9B;AACA,SAAO;AACT;AAEO,SAAS,kBAAkB,QAAiC;AACjE,QAAM,WAAW,wBAAwB,MAAM;AAC/C,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,GAAI,OAAO,uBAAuB,SAC9B,EAAE,oBAAoB,OAAO,mBAAmB,IAChD,CAAC;AAAA,IACL,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;AACF;AAEO,SAAS,oBAAoB,QAA8C;AAChF,SAAO,uBAAuB,qBAAqB,MAAM;AAC3D;;;ACpDO,IAAM,yBAAyB;AAAA;AAAA;AAAA;AAAA;;;AFqB/B,IAAM,kBAAN,cAA8B,WAAW;AAAA,EAC5B,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAuB;AACjC,UAAM,kBAAkB,MAAM,CAAC;AAC/B,SAAK,gBAAgB;AACrB,SAAK,aAAa,iBAAiB,MAAM,IAAI,GAAG,aAAa,OAAO;AACpE,SAAK,kBAAkB,sBAAsB,MAAM,SAAS,GAAG,aAAa,OAAO;AAAA,EACrF;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAA0C;AACjD,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,oBAAoB,KAAK,aAAa;AAAA,IAChD,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAA6C;AAC9D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/resource/tencent/tencent.ts","../src/resource/tencent/config.ts","../src/resource/tencent/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n remapCommandsResource,\n remapOpsResource,\n ResourceName,\n type RegisteredCommand,\n type RegisteredOp,\n} from '@struktoai/mirage-core'\nimport { S3Resource } from '../s3/s3.ts'\nimport {\n redactTencentConfig,\n tencentToS3Config,\n type TencentConfig,\n type TencentConfigRedacted,\n} from './config.ts'\nimport { TENCENT_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface TencentResourceState {\n type: string\n config: TencentConfigRedacted\n}\n\nexport class TencentResource extends S3Resource {\n override readonly kind: string = ResourceName.TENCENT\n override readonly prompt: string = TENCENT_BROWSER_PROMPT\n readonly tencentConfig: TencentConfig\n private readonly tencentOps: readonly RegisteredOp[]\n private readonly tencentCommands: readonly RegisteredCommand[]\n\n constructor(config: TencentConfig) {\n super(tencentToS3Config(config))\n this.tencentConfig = config\n this.tencentOps = remapOpsResource(super.ops(), ResourceName.TENCENT)\n this.tencentCommands = remapCommandsResource(super.commands(), ResourceName.TENCENT)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.tencentOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.tencentCommands\n }\n\n override getState(): Promise<TencentResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactTencentConfig(this.tencentConfig),\n })\n }\n\n override loadState(_state: TencentResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n redactConfigWithSchema,\n type ConfigOf,\n type RedactedConfig,\n secretSchema,\n z,\n} from '@struktoai/mirage-core'\nimport type { S3BrowserPresignedUrlProvider, S3Config } from '../s3/config.ts'\n\nconst TencentConfigSchema = z.object({\n bucket: z.string(),\n presignedUrlProvider: secretSchema(\n z.custom<S3BrowserPresignedUrlProvider>((value) => typeof value === 'function'),\n ),\n region: z.string().optional(),\n endpoint: z.string().optional(),\n defaultContentType: z.string().optional(),\n keyPrefix: z.string().optional(),\n})\n\nexport type TencentConfig = ConfigOf<typeof TencentConfigSchema>\n\nexport type TencentConfigRedacted = RedactedConfig<TencentConfig, 'presignedUrlProvider'>\n\nexport function resolvedTencentEndpoint(config: TencentConfig): string | undefined {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.region !== undefined && config.region !== '') {\n const region = config.region\n return `https://cos.${region}.myqcloud.com`\n }\n return undefined\n}\n\nexport function tencentToS3Config(config: TencentConfig): S3Config {\n const endpoint = resolvedTencentEndpoint(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 ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n }\n}\n\nexport function redactTencentConfig(config: TencentConfig): TencentConfigRedacted {\n return redactConfigWithSchema(TencentConfigSchema, config) as unknown as TencentConfigRedacted\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport const TENCENT_BROWSER_PROMPT = `{prefix}\n Remote Tencent Cloud COS bucket (S3-compatible) 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;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACNP;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAGP,IAAM,sBAAsB,EAAE,OAAO;AAAA,EACnC,QAAQ,EAAE,OAAO;AAAA,EACjB,sBAAsB;AAAA,IACpB,EAAE,OAAsC,CAAC,UAAU,OAAO,UAAU,UAAU;AAAA,EAChF;AAAA,EACA,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,oBAAoB,EAAE,OAAO,EAAE,SAAS;AAAA,EACxC,WAAW,EAAE,OAAO,EAAE,SAAS;AACjC,CAAC;AAMM,SAAS,wBAAwB,QAA2C;AACjF,MAAI,OAAO,aAAa,UAAa,OAAO,aAAa,GAAI,QAAO,OAAO;AAC3E,MAAI,OAAO,WAAW,UAAa,OAAO,WAAW,IAAI;AACvD,UAAM,SAAS,OAAO;AACtB,WAAO,eAAe,MAAM;AAAA,EAC9B;AACA,SAAO;AACT;AAEO,SAAS,kBAAkB,QAAiC;AACjE,QAAM,WAAW,wBAAwB,MAAM;AAC/C,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,GAAI,OAAO,uBAAuB,SAC9B,EAAE,oBAAoB,OAAO,mBAAmB,IAChD,CAAC;AAAA,IACL,GAAI,OAAO,cAAc,SAAY,EAAE,WAAW,OAAO,UAAU,IAAI,CAAC;AAAA,EAC1E;AACF;AAEO,SAAS,oBAAoB,QAA8C;AAChF,SAAO,uBAAuB,qBAAqB,MAAM;AAC3D;;;ACjDO,IAAM,yBAAyB;AAAA;AAAA;AAAA;AAAA;;;AFqB/B,IAAM,kBAAN,cAA8B,WAAW;AAAA,EAC5B,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAuB;AACjC,UAAM,kBAAkB,MAAM,CAAC;AAC/B,SAAK,gBAAgB;AACrB,SAAK,aAAa,iBAAiB,MAAM,IAAI,GAAG,aAAa,OAAO;AACpE,SAAK,kBAAkB,sBAAsB,MAAM,SAAS,GAAG,aAAa,OAAO;AAAA,EACrF;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAA0C;AACjD,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,oBAAoB,KAAK,aAAa;AAAA,IAChD,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAA6C;AAC9D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
- redactGSheetsConfig
3
- } from "./chunk-23NO22WD.js";
2
+ redactGoogleConfig
3
+ } from "./chunk-M2UF2JHJ.js";
4
4
 
5
5
  // src/resource/gsheets/gsheets.ts
6
6
  import { mountKey, mountPrefixOf } from "@struktoai/mirage-core";
@@ -31,12 +31,7 @@ var GSheetsResource = class {
31
31
  index;
32
32
  constructor(config) {
33
33
  this.config = config;
34
- const tm = new TokenManager({
35
- clientId: config.clientId,
36
- ...config.clientSecret !== void 0 ? { clientSecret: config.clientSecret } : {},
37
- refreshToken: config.refreshToken,
38
- ...config.refreshFn !== void 0 ? { refreshFn: config.refreshFn } : {}
39
- });
34
+ const tm = new TokenManager(config);
40
35
  this.accessor = new GSheetsAccessor({ tokenManager: tm });
41
36
  this.index = new RAMIndexCacheStore({ ttl: 86400 });
42
37
  }
@@ -76,7 +71,7 @@ var GSheetsResource = class {
76
71
  getState() {
77
72
  return Promise.resolve({
78
73
  type: this.kind,
79
- config: redactGSheetsConfig(this.config)
74
+ config: redactGoogleConfig(this.config)
80
75
  });
81
76
  }
82
77
  loadState(_state) {
@@ -87,4 +82,4 @@ var GSheetsResource = class {
87
82
  export {
88
83
  GSheetsResource
89
84
  };
90
- //# sourceMappingURL=chunk-AAJQ6AQT.js.map
85
+ //# sourceMappingURL=chunk-GM2QMJAY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/gsheets/gsheets.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 { mountKey, mountPrefixOf } from '@struktoai/mirage-core'\nimport {\n type FileStat,\n GSHEETS_COMMANDS,\n GSHEETS_PROMPT,\n GSHEETS_OPS,\n GSHEETS_WRITE_PROMPT,\n GSheetsAccessor,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n TokenManager,\n gsheetsRead,\n gsheetsReaddir,\n makeResolveGlob,\n gsheetsStat,\n} from '@struktoai/mirage-core'\nimport { redactGSheetsConfig, type GSheetsConfig, type GSheetsConfigRedacted } from './config.ts'\n\nconst gsheetsResolveGlob = makeResolveGlob(gsheetsReaddir)\n\nexport interface GSheetsResourceState {\n type: string\n config: GSheetsConfigRedacted\n}\n\nexport class GSheetsResource implements Resource {\n readonly kind: string = ResourceName.GSHEETS\n readonly cachesReads: boolean = true\n readonly indexTtl: number = 86_400\n readonly prompt: string = GSHEETS_PROMPT\n readonly writePrompt: string = GSHEETS_WRITE_PROMPT\n readonly config: GSheetsConfig\n readonly accessor: GSheetsAccessor\n readonly index: IndexCacheStore\n\n constructor(config: GSheetsConfig) {\n this.config = config\n const tm = new TokenManager(config)\n this.accessor = new GSheetsAccessor({ 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 GSHEETS_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GSHEETS_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return gsheetsRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return gsheetsReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return gsheetsStat(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 mountPrefixOf(p.virtual, p.resourcePath) !== ''\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, prefix),\n }),\n )\n : paths\n return gsheetsResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GSheetsResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactGSheetsConfig(this.config),\n })\n }\n\n loadState(_state: GSheetsResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA,SAAS,UAAU,qBAAqB;AACxC;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;AAGP,IAAM,qBAAqB,gBAAgB,cAAc;AAOlD,IAAM,kBAAN,MAA0C;AAAA,EACtC,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA,EACvB,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,MAAM;AAClC,SAAK,WAAW,IAAI,gBAAgB,EAAE,cAAc,GAAG,CAAC;AACxD,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,YAAY,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACjD;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,eAAe,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACpD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,YAAY,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EACjD;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,cAAc,EAAE,SAAS,EAAE,YAAY,MAAM,KACzC,IACA,IAAI,SAAS;AAAA,QACX,SAAS,EAAE;AAAA,QACX,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ,cAAc,SAAS,EAAE,SAAS,MAAM;AAAA,MAC1C,CAAC;AAAA,IACP,IACA;AACN,WAAO,mBAAmB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAChE;AAAA,EAEA,WAA0C;AACxC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAoB,KAAK,MAAM;AAAA,IACzC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA6C;AACrD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
- redactGDriveConfig
3
- } from "./chunk-QXJP6TWI.js";
2
+ redactGoogleConfig
3
+ } from "./chunk-IZMKMD3O.js";
4
4
 
5
5
  // src/resource/gdrive/gdrive.ts
6
6
  import { mountKey, mountPrefixOf } from "@struktoai/mirage-core";
@@ -30,13 +30,7 @@ var GDriveResource = class {
30
30
  index;
31
31
  constructor(config) {
32
32
  this.config = config;
33
- const tm = new TokenManager({
34
- clientId: config.clientId,
35
- ...config.clientSecret !== void 0 ? { clientSecret: config.clientSecret } : {},
36
- refreshToken: config.refreshToken,
37
- ...config.refreshFn !== void 0 ? { refreshFn: config.refreshFn } : {},
38
- ...config.folderId !== void 0 ? { folderId: config.folderId } : {}
39
- });
33
+ const tm = new TokenManager(config);
40
34
  this.accessor = new GDriveAccessor({ tokenManager: tm });
41
35
  this.index = new RAMIndexCacheStore({ ttl: 86400 });
42
36
  }
@@ -76,7 +70,7 @@ var GDriveResource = class {
76
70
  getState() {
77
71
  return Promise.resolve({
78
72
  type: this.kind,
79
- config: redactGDriveConfig(this.config)
73
+ config: redactGoogleConfig(this.config)
80
74
  });
81
75
  }
82
76
  loadState(_state) {
@@ -87,4 +81,4 @@ var GDriveResource = class {
87
81
  export {
88
82
  GDriveResource
89
83
  };
90
- //# sourceMappingURL=chunk-POJ3IQMQ.js.map
84
+ //# sourceMappingURL=chunk-HRWLHJX2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/gdrive/gdrive.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 { mountKey, mountPrefixOf } from '@struktoai/mirage-core'\nimport {\n type FileStat,\n GDRIVE_COMMANDS,\n GDRIVE_PROMPT,\n GDRIVE_OPS,\n GDriveAccessor,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n TokenManager,\n gdriveRead,\n gdriveReaddir,\n makeResolveGlob,\n gdriveStat,\n} from '@struktoai/mirage-core'\nimport { redactGDriveConfig, type GDriveConfig, type GDriveConfigRedacted } from './config.ts'\n\nconst gdriveResolveGlob = makeResolveGlob(gdriveReaddir)\n\nexport interface GDriveResourceState {\n type: string\n config: GDriveConfigRedacted\n}\n\nexport class GDriveResource implements Resource {\n readonly kind: string = ResourceName.GDRIVE\n readonly cachesReads: boolean = true\n readonly supportsSnapshot: boolean = true\n readonly indexTtl: number = 86_400\n readonly prompt: string = GDRIVE_PROMPT\n readonly config: GDriveConfig\n readonly accessor: GDriveAccessor\n readonly index: IndexCacheStore\n\n constructor(config: GDriveConfig) {\n this.config = config\n const tm = new TokenManager(config)\n this.accessor = new GDriveAccessor({ 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 GDRIVE_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GDRIVE_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return gdriveRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return gdriveReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return gdriveStat(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 mountPrefixOf(p.virtual, p.resourcePath) !== ''\n ? p\n : new PathSpec({\n virtual: p.virtual,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n resourcePath: mountKey(p.virtual, prefix),\n }),\n )\n : paths\n return gdriveResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GDriveResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactGDriveConfig(this.config),\n })\n }\n\n loadState(_state: GDriveResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n"],"mappings":";;;;;AAcA,SAAS,UAAU,qBAAqB;AACxC;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAGP,IAAM,oBAAoB,gBAAgB,aAAa;AAOhD,IAAM,iBAAN,MAAyC;AAAA,EACrC,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA,EACvB,mBAA4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AM,KAAK;AAAA,MACX,QAAQ,mBAAmB,KAAK,MAAM;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA4C;AACpD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  S3Resource
3
- } from "./chunk-DC6VA36O.js";
3
+ } from "./chunk-BGA2F226.js";
4
4
 
5
5
  // src/resource/wasabi/wasabi.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/wasabi/config.ts
13
- import { redactConfigWithSchema, secretSchema, z } from "@struktoai/mirage-core";
13
+ import {
14
+ redactConfigWithSchema,
15
+ secretSchema,
16
+ z
17
+ } from "@struktoai/mirage-core";
14
18
  var WasabiConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -84,4 +88,4 @@ export {
84
88
  WASABI_BROWSER_PROMPT,
85
89
  WasabiResource
86
90
  };
87
- //# sourceMappingURL=chunk-AUKVYHNZ.js.map
91
+ //# sourceMappingURL=chunk-INEXV2PN.js.map