@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
package/README.md CHANGED
@@ -46,7 +46,8 @@ await ws.execute('cp /s3/report.csv /data/local.csv')
46
46
  await ws.execute('wc -l $(find /s3/data -name "*.jsonl")')
47
47
 
48
48
  // Commands are extensible: register new commands, or override one per
49
- // resource + filetype, e.g. `cat` on S3 Parquet renders rows as JSON.
49
+ // resource + filetype. Mirage ships no filetype renderers, so a format
50
+ // like Parquet renders however you register it.
50
51
  ws.command('summarize', ...)
51
52
  ws.command('cat', { resource: 's3', filetype: 'parquet' }, ...)
52
53
 
@@ -0,0 +1,8 @@
1
+ import {
2
+ AliyunResource
3
+ } from "./chunk-EHIT6WCY.js";
4
+ import "./chunk-BGA2F226.js";
5
+ export {
6
+ AliyunResource
7
+ };
8
+ //# sourceMappingURL=aliyun-DR6KT3H6.js.map
@@ -0,0 +1,8 @@
1
+ import {
2
+ BackblazeResource
3
+ } from "./chunk-46HNNKFR.js";
4
+ import "./chunk-BGA2F226.js";
5
+ export {
6
+ BackblazeResource
7
+ };
8
+ //# sourceMappingURL=backblaze-XCLZXTES.js.map
@@ -0,0 +1,8 @@
1
+ import {
2
+ BoxResource
3
+ } from "./chunk-BV372CUO.js";
4
+ import "./chunk-L64GRKOD.js";
5
+ export {
6
+ BoxResource
7
+ };
8
+ //# sourceMappingURL=box-XBCSU3AA.js.map
@@ -0,0 +1,8 @@
1
+ import {
2
+ CephResource
3
+ } from "./chunk-PQCRGTSA.js";
4
+ import "./chunk-BGA2F226.js";
5
+ export {
6
+ CephResource
7
+ };
8
+ //# sourceMappingURL=ceph-F5S2NMTO.js.map
@@ -1,5 +1,10 @@
1
1
  // src/resource/github_ci/config.ts
2
- import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
2
+ import {
3
+ normalizeFields,
4
+ redactConfigWithSchema,
5
+ secretStr,
6
+ z
7
+ } from "@struktoai/mirage-core";
3
8
  var GitHubCIConfigSchema = z.object({
4
9
  token: secretStr(),
5
10
  owner: z.string(),
@@ -20,4 +25,4 @@ export {
20
25
  redactGitHubCIConfig,
21
26
  normalizeGitHubCIConfig
22
27
  };
23
- //# sourceMappingURL=chunk-DGP3N4WM.js.map
28
+ //# sourceMappingURL=chunk-2J35WXX5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/github_ci/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n normalizeFields,\n redactConfigWithSchema,\n type ConfigOf,\n type RedactedConfig,\n secretStr,\n z,\n} from '@struktoai/mirage-core'\n\nconst GitHubCIConfigSchema = z.object({\n token: secretStr(),\n owner: z.string(),\n repo: z.string(),\n days: z.number().optional(),\n baseUrl: z.string().optional(),\n})\n\nexport type GitHubCIConfig = ConfigOf<typeof GitHubCIConfigSchema>\n\nexport type GitHubCIConfigRedacted = RedactedConfig<GitHubCIConfig, 'token'>\n\nexport function redactGitHubCIConfig(config: GitHubCIConfig): GitHubCIConfigRedacted {\n return redactConfigWithSchema(GitHubCIConfigSchema, config) as unknown as GitHubCIConfigRedacted\n}\n\nexport function normalizeGitHubCIConfig(input: Record<string, unknown>): GitHubCIConfig {\n return normalizeFields(input, {\n rename: { base_url: 'baseUrl' },\n }) as unknown as GitHubCIConfig\n}\n"],"mappings":";AAcA;AAAA,EACE;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAEP,IAAM,uBAAuB,EAAE,OAAO;AAAA,EACpC,OAAO,UAAU;AAAA,EACjB,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO;AAAA,EACf,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,SAAS,EAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AAMM,SAAS,qBAAqB,QAAgD;AACnF,SAAO,uBAAuB,sBAAsB,MAAM;AAC5D;AAEO,SAAS,wBAAwB,OAAgD;AACtF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ,EAAE,UAAU,UAAU;AAAA,EAChC,CAAC;AACH;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  redactGitHubCIConfig
3
- } from "./chunk-DGP3N4WM.js";
3
+ } from "./chunk-2J35WXX5.js";
4
4
 
5
5
  // src/resource/github_ci/github_ci.ts
6
6
  import { mountKey, mountPrefixOf } from "@struktoai/mirage-core";
@@ -86,4 +86,4 @@ var GitHubCIResource = class {
86
86
  export {
87
87
  GitHubCIResource
88
88
  };
89
- //# sourceMappingURL=chunk-LW56WZDS.js.map
89
+ //# sourceMappingURL=chunk-2WNXK742.js.map
@@ -20,7 +20,12 @@ import {
20
20
  } from "@struktoai/mirage-core";
21
21
 
22
22
  // src/resource/github/config.ts
23
- import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
23
+ import {
24
+ normalizeFields,
25
+ redactConfigWithSchema,
26
+ secretStr,
27
+ z
28
+ } from "@struktoai/mirage-core";
24
29
  var GitHubConfigSchema = z.object({
25
30
  token: secretStr(),
26
31
  owner: z.string(),
@@ -42,6 +47,10 @@ var githubResolveGlob = makeResolveGlob(githubReaddir);
42
47
  var GitHubResource = class _GitHubResource {
43
48
  kind = ResourceName.GITHUB;
44
49
  cachesReads = true;
50
+ // The git tree API reports the exact blob size for every file; the
51
+ // blob read returns those same bytes, and submodule gitlinks (which
52
+ // have no size and no blob) are excluded from the tree.
53
+ sizesAlwaysKnown = true;
45
54
  // Blob shas are stable per-path markers, so cached reads can be
46
55
  // probe-verified under ALWAYS and snapshots carry drift fingerprints.
47
56
  supportsSnapshot = true;
@@ -127,4 +136,4 @@ export {
127
136
  normalizeGitHubConfig,
128
137
  GitHubResource
129
138
  };
130
- //# sourceMappingURL=chunk-PSEXJ5S5.js.map
139
+ //# sourceMappingURL=chunk-2WSKXBSV.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/github/github.ts","../src/resource/github/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 fetchGitHubRepoInfo,\n fetchGitHubTree,\n type FileStat,\n GITHUB_COMMANDS,\n GITHUB_PROMPT,\n GITHUB_OPS,\n GitHubAccessor,\n HttpGitHubTransport,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n githubBuildTreeMap,\n githubPopulateIndex,\n githubRead,\n githubReaddir,\n makeResolveGlob,\n githubStat,\n} from '@struktoai/mirage-core'\nimport { redactGitHubConfig, type GitHubConfig, type GitHubConfigRedacted } from './config.ts'\n\nconst githubResolveGlob = makeResolveGlob(githubReaddir)\n\nexport interface GitHubResourceState {\n type: string\n config: GitHubConfigRedacted\n defaultBranch: string\n truncated: boolean\n}\n\nexport class GitHubResource implements Resource {\n readonly kind: string = ResourceName.GITHUB\n readonly cachesReads: boolean = true\n // The git tree API reports the exact blob size for every file; the\n // blob read returns those same bytes, and submodule gitlinks (which\n // have no size and no blob) are excluded from the tree.\n readonly sizesAlwaysKnown: boolean = true\n // Blob shas are stable per-path markers, so cached reads can be\n // probe-verified under ALWAYS and snapshots carry drift fingerprints.\n readonly supportsSnapshot: boolean = true\n readonly indexTtl: number = 86_400\n readonly prompt: string = GITHUB_PROMPT\n readonly config: GitHubConfig\n readonly accessor: GitHubAccessor\n readonly index: IndexCacheStore\n\n private constructor(config: GitHubConfig, accessor: GitHubAccessor, index: IndexCacheStore) {\n this.config = config\n this.accessor = accessor\n this.index = index\n }\n\n static async create(config: GitHubConfig): Promise<GitHubResource> {\n const transportOpts: { token: string; baseUrl?: string } = { token: config.token }\n if (config.baseUrl !== undefined) transportOpts.baseUrl = config.baseUrl\n const transport = new HttpGitHubTransport(transportOpts)\n const repoInfo = await fetchGitHubRepoInfo(transport, config.owner, config.repo)\n const ref = config.ref ?? repoInfo.default_branch\n const { tree, truncated } = await fetchGitHubTree(transport, config.owner, config.repo, ref)\n const treeMap = githubBuildTreeMap(tree)\n const accessor = new GitHubAccessor({\n transport,\n owner: config.owner,\n repo: config.repo,\n ref,\n defaultBranch: repoInfo.default_branch,\n truncated,\n tree: treeMap,\n })\n const index = new RAMIndexCacheStore({ ttl: 86_400 })\n await githubPopulateIndex(index, tree)\n return new GitHubResource(config, accessor, index)\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return GITHUB_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GITHUB_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return githubRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return githubReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return githubStat(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 githubResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GitHubResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactGitHubConfig(this.config),\n defaultBranch: this.accessor.defaultBranch,\n truncated: this.accessor.truncated,\n })\n }\n\n loadState(_state: GitHubResourceState): 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 normalizeFields,\n redactConfigWithSchema,\n type ConfigOf,\n type RedactedConfig,\n secretStr,\n z,\n} from '@struktoai/mirage-core'\n\nconst GitHubConfigSchema = z.object({\n token: secretStr(),\n owner: z.string(),\n repo: z.string(),\n ref: z.string().optional(),\n baseUrl: z.string().optional(),\n})\n\nexport type GitHubConfig = ConfigOf<typeof GitHubConfigSchema>\n\nexport type GitHubConfigRedacted = RedactedConfig<GitHubConfig, 'token'>\n\nexport function redactGitHubConfig(config: GitHubConfig): GitHubConfigRedacted {\n return redactConfigWithSchema(GitHubConfigSchema, config) as unknown as GitHubConfigRedacted\n}\n\nexport function normalizeGitHubConfig(input: Record<string, unknown>): GitHubConfig {\n return normalizeFields(input, {\n rename: { base_url: 'baseUrl' },\n }) as unknown as GitHubConfig\n}\n"],"mappings":";AAcA,SAAS,UAAU,qBAAqB;AACxC;AAAA,EACE;AAAA,EACA;AAAA,EAEA;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,EACA;AAAA,OACK;;;ACvBP;AAAA,EACE;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,OACK;AAEP,IAAM,qBAAqB,EAAE,OAAO;AAAA,EAClC,OAAO,UAAU;AAAA,EACjB,OAAO,EAAE,OAAO;AAAA,EAChB,MAAM,EAAE,OAAO;AAAA,EACf,KAAK,EAAE,OAAO,EAAE,SAAS;AAAA,EACzB,SAAS,EAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AAMM,SAAS,mBAAmB,QAA4C;AAC7E,SAAO,uBAAuB,oBAAoB,MAAM;AAC1D;AAEO,SAAS,sBAAsB,OAA8C;AAClF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ,EAAE,UAAU,UAAU;AAAA,EAChC,CAAC;AACH;;;ADHA,IAAM,oBAAoB,gBAAgB,aAAa;AAShD,IAAM,iBAAN,MAAM,gBAAmC;AAAA,EACrC,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA;AAAA;AAAA;AAAA,EAIvB,mBAA4B;AAAA;AAAA;AAAA,EAG5B,mBAA4B;AAAA,EAC5B,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EAED,YAAY,QAAsB,UAA0B,OAAwB;AAC1F,SAAK,SAAS;AACd,SAAK,WAAW;AAChB,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA,aAAa,OAAO,QAA+C;AACjE,UAAM,gBAAqD,EAAE,OAAO,OAAO,MAAM;AACjF,QAAI,OAA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S,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,kBAAkB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAC/D;AAAA,EAEA,WAAyC;AACvC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAmB,KAAK,MAAM;AAAA,MACtC,eAAe,KAAK,SAAS;AAAA,MAC7B,WAAW,KAAK,SAAS;AAAA,IAC3B,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/supabase/supabase.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/supabase/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 SupabaseConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -89,4 +93,4 @@ export {
89
93
  SUPABASE_BROWSER_PROMPT,
90
94
  SupabaseResource
91
95
  };
92
- //# sourceMappingURL=chunk-DKPDXQML.js.map
96
+ //# sourceMappingURL=chunk-3IYCVC7W.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/supabase/supabase.ts","../src/resource/supabase/config.ts","../src/resource/supabase/prompt.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\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 redactSupabaseConfig,\n supabaseToS3Config,\n type SupabaseConfig,\n type SupabaseConfigRedacted,\n} from './config.ts'\nimport { SUPABASE_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface SupabaseResourceState {\n type: string\n config: SupabaseConfigRedacted\n}\n\nexport class SupabaseResource extends S3Resource {\n override readonly kind: string = ResourceName.SUPABASE\n override readonly prompt: string = SUPABASE_BROWSER_PROMPT\n readonly supabaseConfig: SupabaseConfig\n private readonly supabaseOps: readonly RegisteredOp[]\n private readonly supabaseCommands: readonly RegisteredCommand[]\n\n constructor(config: SupabaseConfig) {\n super(supabaseToS3Config(config))\n this.supabaseConfig = config\n this.supabaseOps = remapOpsResource(super.ops(), ResourceName.SUPABASE)\n this.supabaseCommands = remapCommandsResource(super.commands(), ResourceName.SUPABASE)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.supabaseOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.supabaseCommands\n }\n\n override getState(): Promise<SupabaseResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactSupabaseConfig(this.supabaseConfig),\n })\n }\n\n override loadState(_state: SupabaseResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\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 SupabaseConfigSchema = z.object({\n bucket: z.string(),\n presignedUrlProvider: secretSchema(\n z.custom<S3BrowserPresignedUrlProvider>((value) => typeof value === 'function'),\n ),\n projectRef: 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 SupabaseConfig = ConfigOf<typeof SupabaseConfigSchema>\n\nexport type SupabaseConfigRedacted = RedactedConfig<SupabaseConfig, 'presignedUrlProvider'>\n\nexport function resolvedSupabaseEndpoint(config: SupabaseConfig): string | undefined {\n if (config.endpoint !== undefined && config.endpoint !== '') return config.endpoint\n if (config.projectRef !== undefined && config.projectRef !== '') {\n return `https://${config.projectRef}.storage.supabase.co/storage/v1/s3`\n }\n return undefined\n}\n\nexport function supabaseToS3Config(config: SupabaseConfig): S3Config {\n const endpoint = resolvedSupabaseEndpoint(config)\n return {\n bucket: config.bucket,\n presignedUrlProvider: config.presignedUrlProvider,\n ...(config.region !== undefined ? { region: config.region } : {}),\n ...(endpoint !== undefined ? { endpoint } : {}),\n forcePathStyle: true,\n ...(config.defaultContentType !== undefined\n ? { defaultContentType: config.defaultContentType }\n : {}),\n ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n }\n}\n\nexport function redactSupabaseConfig(config: SupabaseConfig): SupabaseConfigRedacted {\n return redactConfigWithSchema(SupabaseConfigSchema, config) as unknown as SupabaseConfigRedacted\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport const SUPABASE_BROWSER_PROMPT = `{prefix}\n Remote Supabase Storage bucket accessed via presigned URLs (browser runtime).\n Supports the full filesystem command set: ls/tree/cat/grep/find/du/cp/mv/rm/etc.\n Listing operations require the presigner to sign LIST/COPY operations in\n addition to GET/PUT/HEAD/DELETE — see S3BrowserPresignedUrlProvider docs.`\n"],"mappings":";;;;;AAcA;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,YAAY,EAAE,OAAO,EAAE,SAAS;AAAA,EAChC,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,eAAe,UAAa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,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/backblaze/backblaze.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/backblaze/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 BackblazeConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -88,4 +92,4 @@ export {
88
92
  BACKBLAZE_BROWSER_PROMPT,
89
93
  BackblazeResource
90
94
  };
91
- //# sourceMappingURL=chunk-NVGB3B7J.js.map
95
+ //# sourceMappingURL=chunk-46HNNKFR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/backblaze/backblaze.ts","../src/resource/backblaze/config.ts","../src/resource/backblaze/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 backblazeToS3Config,\n redactBackblazeConfig,\n type BackblazeConfig,\n type BackblazeConfigRedacted,\n} from './config.ts'\nimport { BACKBLAZE_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface BackblazeResourceState {\n type: string\n config: BackblazeConfigRedacted\n}\n\nexport class BackblazeResource extends S3Resource {\n override readonly kind: string = ResourceName.BACKBLAZE\n override readonly prompt: string = BACKBLAZE_BROWSER_PROMPT\n readonly backblazeConfig: BackblazeConfig\n private readonly backblazeOps: readonly RegisteredOp[]\n private readonly backblazeCommands: readonly RegisteredCommand[]\n\n constructor(config: BackblazeConfig) {\n super(backblazeToS3Config(config))\n this.backblazeConfig = config\n this.backblazeOps = remapOpsResource(super.ops(), ResourceName.BACKBLAZE)\n this.backblazeCommands = remapCommandsResource(super.commands(), ResourceName.BACKBLAZE)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.backblazeOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.backblazeCommands\n }\n\n override getState(): Promise<BackblazeResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactBackblazeConfig(this.backblazeConfig),\n })\n }\n\n override loadState(_state: BackblazeResourceState): 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 BackblazeConfigSchema = 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 BackblazeConfig = ConfigOf<typeof BackblazeConfigSchema>\n\nexport type BackblazeConfigRedacted = RedactedConfig<BackblazeConfig, 'presignedUrlProvider'>\n\nexport function resolvedBackblazeEndpoint(config: BackblazeConfig): 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}.backblazeb2.com`\n }\n return undefined\n}\n\nexport function backblazeToS3Config(config: BackblazeConfig): S3Config {\n const endpoint = resolvedBackblazeEndpoint(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 redactBackblazeConfig(config: BackblazeConfig): BackblazeConfigRedacted {\n return redactConfigWithSchema(BackblazeConfigSchema, config) as unknown as BackblazeConfigRedacted\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 BACKBLAZE_BROWSER_PROMPT = `{prefix}\n Remote Backblaze B2 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,wBAAwB,EAAE,OAAO;AAAA,EACrC,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,0BAA0B,QAA6C;AACrF,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,oBAAoB,QAAmC;AACrE,QAAM,WAAW,0BAA0B,MAAM;AACjD,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,sBAAsB,QAAkD;AACtF,SAAO,uBAAuB,uBAAuB,MAAM;AAC7D;;;ACjDO,IAAM,2BAA2B;AAAA;AAAA;AAAA;AAAA;;;AFqBjC,IAAM,oBAAN,cAAgC,WAAW;AAAA,EAC9B,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAyB;AACnC,UAAM,oBAAoB,MAAM,CAAC;AACjC,SAAK,kBAAkB;AACvB,SAAK,eAAe,iBAAiB,MAAM,IAAI,GAAG,aAAa,SAAS;AACxE,SAAK,oBAAoB,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":[]}
@@ -0,0 +1,11 @@
1
+ // src/resource/gslides/config.ts
2
+ import {
3
+ normalizeGoogleConfig,
4
+ redactGoogleConfig
5
+ } from "@struktoai/mirage-core";
6
+
7
+ export {
8
+ normalizeGoogleConfig,
9
+ redactGoogleConfig
10
+ };
11
+ //# sourceMappingURL=chunk-4IF4TGAI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/gslides/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nexport {\n normalizeGoogleConfig as normalizeGSlidesConfig,\n redactGoogleConfig as redactGSlidesConfig,\n type GoogleConfig as GSlidesConfig,\n type GoogleConfigRedacted as GSlidesConfigRedacted,\n} from '@struktoai/mirage-core'\n"],"mappings":";AAcA;AAAA,EAC2B;AAAA,EACH;AAAA,OAGjB;","names":[]}
@@ -17,12 +17,16 @@ import {
17
17
  } from "@struktoai/mirage-core";
18
18
 
19
19
  // src/resource/trello/config.ts
20
- import { redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
20
+ import {
21
+ redactConfigWithSchema,
22
+ secretStr,
23
+ z
24
+ } from "@struktoai/mirage-core";
21
25
  var TrelloConfigSchema = z.object({
22
26
  apiKey: secretStr(),
23
27
  apiToken: secretStr(),
24
28
  workspaceId: z.string().optional(),
25
- boardIds: z.array(z.string()).optional(),
29
+ boardIds: z.array(z.string()).readonly().optional(),
26
30
  baseUrl: z.string().optional()
27
31
  });
28
32
  function redactTrelloConfig(config) {
@@ -106,4 +110,4 @@ export {
106
110
  redactTrelloConfig,
107
111
  TrelloResource
108
112
  };
109
- //# sourceMappingURL=chunk-AUXZEXCG.js.map
113
+ //# sourceMappingURL=chunk-5OZJMTYW.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/resource/trello/trello.ts","../src/resource/trello/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { mountKey, mountPrefixOf } from '@struktoai/mirage-core'\nimport {\n type FileStat,\n HttpTrelloTransport,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n makeResolveGlob,\n TRELLO_COMMANDS,\n TRELLO_PROMPT,\n TRELLO_OPS,\n TRELLO_WRITE_PROMPT,\n TrelloAccessor,\n type TrelloReaddirFilter,\n trelloRead,\n trelloReaddir,\n trelloStat,\n} from '@struktoai/mirage-core'\nimport { redactTrelloConfig, type TrelloConfig, type TrelloConfigRedacted } from './config.ts'\n\nconst resolveTrelloGlob = (\n accessor: TrelloAccessor,\n paths: readonly PathSpec[],\n index: IndexCacheStore | undefined,\n filter: TrelloReaddirFilter,\n): Promise<PathSpec[]> =>\n makeResolveGlob((a: TrelloAccessor, p: PathSpec, i?: IndexCacheStore) =>\n trelloReaddir(a, p, i, filter),\n )(accessor, paths, index)\n\nexport interface TrelloResourceState {\n type: string\n config: TrelloConfigRedacted\n}\n\nexport class TrelloResource implements Resource {\n readonly kind: string = ResourceName.TRELLO\n readonly cachesReads: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = TRELLO_PROMPT\n readonly writePrompt: string = TRELLO_WRITE_PROMPT\n readonly config: TrelloConfig\n readonly accessor: TrelloAccessor\n readonly index: IndexCacheStore\n\n constructor(config: TrelloConfig) {\n this.config = config\n const transportOpts: { apiKey: string; apiToken: string; baseUrl?: string } = {\n apiKey: config.apiKey,\n apiToken: config.apiToken,\n }\n if (config.baseUrl !== undefined) transportOpts.baseUrl = config.baseUrl\n this.accessor = new TrelloAccessor(new HttpTrelloTransport(transportOpts))\n this.index = new RAMIndexCacheStore({ ttl: this.indexTtl })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return TRELLO_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return TRELLO_OPS\n }\n\n private filter(): TrelloReaddirFilter {\n const out: TrelloReaddirFilter = {}\n if (this.config.workspaceId !== undefined) out.workspaceId = this.config.workspaceId\n if (this.config.boardIds !== undefined) out.boardIds = this.config.boardIds\n return out\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return trelloRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return trelloReaddir(this.accessor, p, this.index, this.filter())\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return trelloStat(this.accessor, p, this.index)\n }\n\n 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 resolveTrelloGlob(this.accessor, effective, this.index, this.filter())\n }\n\n getState(): Promise<TrelloResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactTrelloConfig(this.config),\n })\n }\n\n loadState(_state: TrelloResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\n\nexport interface TrelloConfig {\n apiKey: string\n apiToken: string\n workspaceId?: string\n boardIds?: readonly string[]\n baseUrl?: string\n}\n\nexport interface TrelloConfigRedacted {\n apiKey: '<REDACTED>'\n apiToken: '<REDACTED>'\n workspaceId?: string\n boardIds?: readonly string[]\n baseUrl?: string\n}\n\nconst TrelloConfigSchema = z.object({\n apiKey: secretStr(),\n apiToken: secretStr(),\n workspaceId: z.string().optional(),\n boardIds: z.array(z.string()).optional(),\n baseUrl: z.string().optional(),\n})\n\nexport function redactTrelloConfig(config: TrelloConfig): TrelloConfigRedacted {\n return redactConfigWithSchema(TrelloConfigSchema, config) as unknown as TrelloConfigRedacted\n}\n"],"mappings":";AAcA,SAAS,UAAU,qBAAqB;AACxC;AAAA,EAEE;AAAA,EAEA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACrBP,SAAS,wBAAwB,WAAW,SAAS;AAkBrD,IAAM,qBAAqB,EAAE,OAAO;AAAA,EAClC,QAAQ,UAAU;AAAA,EAClB,UAAU,UAAU;AAAA,EACpB,aAAa,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EACvC,SAAS,EAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AAEM,SAAS,mBAAmB,QAA4C;AAC7E,SAAO,uBAAuB,oBAAoB,MAAM;AAC1D;;;ADJA,IAAM,oBAAoB,CACxB,UACA,OACA,OACA,WAEA;AAAA,EAAgB,CAAC,GAAmB,GAAa,MAC/C,cAAc,GAAG,GAAG,GAAG,MAAM;AAC/B,EAAE,UAAU,OAAO,KAAK;AAOnB,IAAM,iBAAN,MAAyC;AAAA,EACrC,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA,EACvB,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB,cAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,QAAs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D,UAAU,EAAE;AAAA,QACZ,cAAc,SAAS,EAAE,SAAS,MAAM;AAAA,MAC1C,CAAC;AAAA,IACP,IACA;AACN,WAAO,kBAAkB,KAAK,UAAU,WAAW,KAAK,OAAO,KAAK,OAAO,CAAC;AAAA,EAC9E;AAAA,EAEA,WAAyC;AACvC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAmB,KAAK,MAAM;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA4C;AACpD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
1
+ {"version":3,"sources":["../src/resource/trello/trello.ts","../src/resource/trello/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { mountKey, mountPrefixOf } from '@struktoai/mirage-core'\nimport {\n type FileStat,\n HttpTrelloTransport,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n makeResolveGlob,\n TRELLO_COMMANDS,\n TRELLO_PROMPT,\n TRELLO_OPS,\n TRELLO_WRITE_PROMPT,\n TrelloAccessor,\n type TrelloReaddirFilter,\n trelloRead,\n trelloReaddir,\n trelloStat,\n} from '@struktoai/mirage-core'\nimport { redactTrelloConfig, type TrelloConfig, type TrelloConfigRedacted } from './config.ts'\n\nconst resolveTrelloGlob = (\n accessor: TrelloAccessor,\n paths: readonly PathSpec[],\n index: IndexCacheStore | undefined,\n filter: TrelloReaddirFilter,\n): Promise<PathSpec[]> =>\n makeResolveGlob((a: TrelloAccessor, p: PathSpec, i?: IndexCacheStore) =>\n trelloReaddir(a, p, i, filter),\n )(accessor, paths, index)\n\nexport interface TrelloResourceState {\n type: string\n config: TrelloConfigRedacted\n}\n\nexport class TrelloResource implements Resource {\n readonly kind: string = ResourceName.TRELLO\n readonly cachesReads: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = TRELLO_PROMPT\n readonly writePrompt: string = TRELLO_WRITE_PROMPT\n readonly config: TrelloConfig\n readonly accessor: TrelloAccessor\n readonly index: IndexCacheStore\n\n constructor(config: TrelloConfig) {\n this.config = config\n const transportOpts: { apiKey: string; apiToken: string; baseUrl?: string } = {\n apiKey: config.apiKey,\n apiToken: config.apiToken,\n }\n if (config.baseUrl !== undefined) transportOpts.baseUrl = config.baseUrl\n this.accessor = new TrelloAccessor(new HttpTrelloTransport(transportOpts))\n this.index = new RAMIndexCacheStore({ ttl: this.indexTtl })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return TRELLO_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return TRELLO_OPS\n }\n\n private filter(): TrelloReaddirFilter {\n const out: TrelloReaddirFilter = {}\n if (this.config.workspaceId !== undefined) out.workspaceId = this.config.workspaceId\n if (this.config.boardIds !== undefined) out.boardIds = this.config.boardIds\n return out\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return trelloRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return trelloReaddir(this.accessor, p, this.index, this.filter())\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return trelloStat(this.accessor, p, this.index)\n }\n\n 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 resolveTrelloGlob(this.accessor, effective, this.index, this.filter())\n }\n\n getState(): Promise<TrelloResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactTrelloConfig(this.config),\n })\n }\n\n loadState(_state: TrelloResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n redactConfigWithSchema,\n type ConfigOf,\n type RedactedConfig,\n secretStr,\n z,\n} from '@struktoai/mirage-core'\n\nconst TrelloConfigSchema = z.object({\n apiKey: secretStr(),\n apiToken: secretStr(),\n workspaceId: z.string().optional(),\n boardIds: z.array(z.string()).readonly().optional(),\n baseUrl: z.string().optional(),\n})\n\nexport type TrelloConfig = ConfigOf<typeof TrelloConfigSchema>\n\nexport type TrelloConfigRedacted = RedactedConfig<TrelloConfig, 'apiKey' | 'apiToken'>\n\nexport function redactTrelloConfig(config: TrelloConfig): TrelloConfigRedacted {\n return redactConfigWithSchema(TrelloConfigSchema, config) as unknown as TrelloConfigRedacted\n}\n"],"mappings":";AAcA,SAAS,UAAU,qBAAqB;AACxC;AAAA,EAEE;AAAA,EAEA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EA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AAA,EAEQ,SAA8B;AACpC,UAAM,MAA2B,CAAC;AAClC,QAAI,KAAK,OAAO,gBAAgB,OAAW,KAAI,cAAc,KAAK,OAAO;AACzE,QAAI,KAAK,OAAO,aAAa,OAAW,KAAI,WAAW,KAAK,OAAO;AACnE,WAAO;AAAA,EACT;AAAA,EAEA,SAAS,GAAkC;AACzC,WAAO,WAAW,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAChD;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,cAAc,KAAK,UAAU,GAAG,KAAK,OAAO,KAAK,OAAO,CAAC;AAAA,EAClE;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,WAAW,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAChD;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,kBAAkB,KAAK,UAAU,WAAW,KAAK,OAAO,KAAK,OAAO,CAAC;AAAA,EAC9E;AAAA,EAEA,WAAyC;AACvC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,mBAAmB,KAAK,MAAM;AAAA,IACxC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA4C;AACpD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -17,7 +17,11 @@ import {
17
17
  } from "@struktoai/mirage-core";
18
18
 
19
19
  // src/resource/discord/config.ts
20
- import { redactConfigWithSchema, secretSchema, z } from "@struktoai/mirage-core";
20
+ import {
21
+ redactConfigWithSchema,
22
+ secretSchema,
23
+ z
24
+ } from "@struktoai/mirage-core";
21
25
  var DiscordConfigSchema = z.object({
22
26
  proxyUrl: z.string(),
23
27
  getHeaders: secretSchema(
@@ -33,6 +37,10 @@ var resolveDiscordGlob = makeResolveGlob(discordReaddir);
33
37
  var DiscordResource = class {
34
38
  kind = ResourceName.DISCORD;
35
39
  cachesReads = true;
40
+ // Every listed file carries an exact size: chat.jsonl and members/*.json
41
+ // are rendered at readdir from payloads the listing already fetched, and
42
+ // attachments carry Discord's CDN byte count.
43
+ sizesAlwaysKnown = true;
36
44
  indexTtl = 600;
37
45
  prompt = DISCORD_PROMPT;
38
46
  writePrompt = DISCORD_WRITE_PROMPT;
@@ -97,4 +105,4 @@ export {
97
105
  redactDiscordConfig,
98
106
  DiscordResource
99
107
  };
100
- //# sourceMappingURL=chunk-6BXVYCIC.js.map
108
+ //# sourceMappingURL=chunk-5UM6EBVW.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/discord/discord.ts","../src/resource/discord/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 BrowserDiscordTransport,\n DISCORD_COMMANDS,\n DISCORD_PROMPT,\n DISCORD_OPS,\n DISCORD_WRITE_PROMPT,\n DiscordAccessor,\n type FileStat,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n discordRead,\n discordReaddir,\n discordStat,\n makeResolveGlob,\n} from '@struktoai/mirage-core'\nimport { redactDiscordConfig, type DiscordConfig, type DiscordConfigRedacted } from './config.ts'\n\nconst resolveDiscordGlob = makeResolveGlob(discordReaddir)\n\nexport interface DiscordResourceState {\n type: string\n config: DiscordConfigRedacted\n}\n\nexport class DiscordResource implements Resource {\n readonly kind: string = ResourceName.DISCORD\n readonly cachesReads: boolean = true\n // Every listed file carries an exact size: chat.jsonl and members/*.json\n // are rendered at readdir from payloads the listing already fetched, and\n // attachments carry Discord's CDN byte count.\n readonly sizesAlwaysKnown: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = DISCORD_PROMPT\n readonly writePrompt: string = DISCORD_WRITE_PROMPT\n readonly config: DiscordConfig\n readonly accessor: DiscordAccessor\n readonly index: IndexCacheStore\n\n constructor(config: DiscordConfig) {\n this.config = config\n this.accessor = new DiscordAccessor(\n new BrowserDiscordTransport({\n proxyUrl: config.proxyUrl,\n ...(config.getHeaders !== undefined ? { getHeaders: config.getHeaders } : {}),\n }),\n )\n this.index = new RAMIndexCacheStore({ ttl: this.indexTtl })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return DISCORD_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return DISCORD_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return discordRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return discordReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return discordStat(this.accessor, p, this.index)\n }\n\n 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 resolveDiscordGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<DiscordResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactDiscordConfig(this.config),\n })\n }\n\n loadState(_state: DiscordResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= 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'\n\ntype HeaderProvider = () => Promise<Record<string, string>> | Record<string, string>\n\nconst DiscordConfigSchema = z.object({\n proxyUrl: z.string(),\n getHeaders: secretSchema(\n z.custom<HeaderProvider>((value) => typeof value === 'function'),\n ).optional(),\n})\n\nexport type DiscordConfig = ConfigOf<typeof DiscordConfigSchema>\n\nexport type DiscordConfigRedacted = RedactedConfig<DiscordConfig, 'getHeaders'>\n\nexport function redactDiscordConfig(config: DiscordConfig): DiscordConfigRedacted {\n return redactConfigWithSchema(DiscordConfigSchema, config) as unknown as DiscordConfigRedacted\n}\n"],"mappings":";AAcA,SAAS,UAAU,qBAAqB;AACxC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AA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A,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,oBAAoB,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
2
  S3Resource
3
- } from "./chunk-DC6VA36O.js";
3
+ } from "./chunk-BGA2F226.js";
4
4
 
5
5
  // src/resource/digitalocean/digitalocean.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/digitalocean/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 DigitalOceanConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -91,4 +95,4 @@ export {
91
95
  DIGITALOCEAN_BROWSER_PROMPT,
92
96
  DigitalOceanResource
93
97
  };
94
- //# sourceMappingURL=chunk-JV4T5HNB.js.map
98
+ //# sourceMappingURL=chunk-6HRSCX2U.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/digitalocean/digitalocean.ts","../src/resource/digitalocean/config.ts","../src/resource/digitalocean/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 digitalOceanToS3Config,\n redactDigitalOceanConfig,\n type DigitalOceanConfig,\n type DigitalOceanConfigRedacted,\n} from './config.ts'\nimport { DIGITALOCEAN_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface DigitalOceanResourceState {\n type: string\n config: DigitalOceanConfigRedacted\n}\n\nexport class DigitalOceanResource extends S3Resource {\n override readonly kind: string = ResourceName.DIGITALOCEAN\n override readonly prompt: string = DIGITALOCEAN_BROWSER_PROMPT\n readonly digitalOceanConfig: DigitalOceanConfig\n private readonly digitalOceanOps: readonly RegisteredOp[]\n private readonly digitalOceanCommands: readonly RegisteredCommand[]\n\n constructor(config: DigitalOceanConfig) {\n super(digitalOceanToS3Config(config))\n this.digitalOceanConfig = config\n this.digitalOceanOps = remapOpsResource(super.ops(), ResourceName.DIGITALOCEAN)\n this.digitalOceanCommands = remapCommandsResource(super.commands(), ResourceName.DIGITALOCEAN)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.digitalOceanOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.digitalOceanCommands\n }\n\n override getState(): Promise<DigitalOceanResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactDigitalOceanConfig(this.digitalOceanConfig),\n })\n }\n\n override loadState(_state: DigitalOceanResourceState): 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 DigitalOceanConfigSchema = 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 DigitalOceanConfig = ConfigOf<typeof DigitalOceanConfigSchema>\n\nexport type DigitalOceanConfigRedacted = RedactedConfig<DigitalOceanConfig, 'presignedUrlProvider'>\n\nexport function resolvedDigitalOceanEndpoint(config: DigitalOceanConfig): 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://${region}.digitaloceanspaces.com`\n }\n return undefined\n}\n\nexport function digitalOceanToS3Config(config: DigitalOceanConfig): S3Config {\n const endpoint = resolvedDigitalOceanEndpoint(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 redactDigitalOceanConfig(config: DigitalOceanConfig): DigitalOceanConfigRedacted {\n return redactConfigWithSchema(\n DigitalOceanConfigSchema,\n config,\n ) as unknown as DigitalOceanConfigRedacted\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 DIGITALOCEAN_BROWSER_PROMPT = `{prefix}\n Remote DigitalOcean Spaces 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,2BAA2B,EAAE,OAAO;AAAA,EACxC,QAAQ,EAAE,OAAO;AAAA,EACjB,sBAAsB;AAAA,IACpB,EAAE,OAAsC,CAAC,UAAU,OAAO,UAAU,UAAU;AAAA,EAChF;AAAA,EACA,QAAQ,EAAE,OAAO,EAAE,S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AAA,EAC/F;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAA+C;AACtD,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,yBAAyB,KAAK,kBAAkB;AAAA,IAC1D,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAAkD;AACnE,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/gcs/gcs.ts
6
6
  import {
@@ -10,7 +10,11 @@ import {
10
10
  } from "@struktoai/mirage-core";
11
11
 
12
12
  // src/resource/gcs/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 GCSConfigSchema = z.object({
15
19
  bucket: z.string(),
16
20
  presignedUrlProvider: secretSchema(
@@ -78,4 +82,4 @@ export {
78
82
  GCS_BROWSER_PROMPT,
79
83
  GCSResource
80
84
  };
81
- //# sourceMappingURL=chunk-EDS5Q5B7.js.map
85
+ //# sourceMappingURL=chunk-7HWQAYXR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/gcs/gcs.ts","../src/resource/gcs/config.ts","../src/resource/gcs/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 { gcsToS3Config, redactGcsConfig, type GCSConfig, type GCSConfigRedacted } from './config.ts'\nimport { GCS_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface GCSResourceState {\n type: string\n config: GCSConfigRedacted\n}\n\nexport class GCSResource extends S3Resource {\n override readonly kind: string = ResourceName.GCS\n override readonly prompt: string = GCS_BROWSER_PROMPT\n readonly gcsConfig: GCSConfig\n private readonly gcsOps: readonly RegisteredOp[]\n private readonly gcsCommands: readonly RegisteredCommand[]\n\n constructor(config: GCSConfig) {\n super(gcsToS3Config(config))\n this.gcsConfig = config\n this.gcsOps = remapOpsResource(super.ops(), ResourceName.GCS)\n this.gcsCommands = remapCommandsResource(super.commands(), ResourceName.GCS)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.gcsOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.gcsCommands\n }\n\n override getState(): Promise<GCSResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactGcsConfig(this.gcsConfig),\n })\n }\n\n override loadState(_state: GCSResourceState): 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 GCSConfigSchema = 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 GCSConfig = ConfigOf<typeof GCSConfigSchema>\n\nexport type GCSConfigRedacted = RedactedConfig<GCSConfig, 'presignedUrlProvider'>\n\nexport function gcsToS3Config(config: GCSConfig): S3Config {\n return {\n bucket: config.bucket,\n presignedUrlProvider: config.presignedUrlProvider,\n ...(config.region !== undefined ? { region: config.region } : { region: 'auto' }),\n ...(config.endpoint !== undefined\n ? { endpoint: config.endpoint }\n : { endpoint: 'https://storage.googleapis.com' }),\n ...(config.defaultContentType !== undefined\n ? { defaultContentType: config.defaultContentType }\n : {}),\n ...(config.keyPrefix !== undefined ? { keyPrefix: config.keyPrefix } : {}),\n }\n}\n\nexport function redactGcsConfig(config: GCSConfig): GCSConfigRedacted {\n return redactConfigWithSchema(GCSConfigSchema, config) as unknown as GCSConfigRedacted\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 GCS_BROWSER_PROMPT = `{prefix}\n Remote Google Cloud Storage bucket accessed via presigned URLs (browser runtime).\n Supports the full filesystem command set: ls/tree/cat/grep/find/du/cp/mv/rm/etc.\n Listing operations require the presigner to sign LIST/COPY operations in\n addition to GET/PUT/HEAD/DELETE — see S3BrowserPresignedUrlProvider docs.`\n"],"mappings":";;;;;AAcA;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,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,cAAc,QAA6B;AACzD,SAAO;AAAA,IACL,QAAQ,OAAO;AAAA,IACf,sBAAsB,OAAO;AAAA,IAC7B,GAAI,OAAO,WAAW,SAAY,EAAE,QAAQ,OAAO,OAAO,IAAI,EAAE,QAAQ,OAAO;AAAA,IAC/E,GAAI,OAAO,aAAa,SACpB,EAAE,UAAU,OAAO,SAAS,IAC5B,EAAE,UAAU,iCAAiC;AAAA,IACjD,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,gBAAgB,QAAsC;AACpE,SAAO,uBAAuB,iBAAiB,MAAM;AACvD;;;ACzCO,IAAM,qBAAqB;AAAA;AAAA;AAAA;AAAA;;;AFgB3B,IAAM,cAAN,cAA0B,WAAW;AAAA,EACxB,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAmB;AAC7B,UAAM,cAAc,MAAM,CAAC;AAC3B,SAAK,YAAY;AACjB,SAAK,SAAS,iBAAiB,MAAM,IAAI,GAAG,aAAa,GAAG;AAC5D,SAAK,cAAc,sBAAsB,MAAM,SAAS,GAAG,aAAa,GAAG;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
- redactGSlidesConfig
3
- } from "./chunk-ZLHC2CZ6.js";
2
+ redactGoogleConfig
3
+ } from "./chunk-4IF4TGAI.js";
4
4
 
5
5
  // src/resource/gslides/gslides.ts
6
6
  import { mountKey, mountPrefixOf } from "@struktoai/mirage-core";
@@ -31,12 +31,7 @@ var GSlidesResource = 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 GSlidesAccessor({ tokenManager: tm });
41
36
  this.index = new RAMIndexCacheStore({ ttl: 86400 });
42
37
  }
@@ -76,7 +71,7 @@ var GSlidesResource = class {
76
71
  getState() {
77
72
  return Promise.resolve({
78
73
  type: this.kind,
79
- config: redactGSlidesConfig(this.config)
74
+ config: redactGoogleConfig(this.config)
80
75
  });
81
76
  }
82
77
  loadState(_state) {
@@ -87,4 +82,4 @@ var GSlidesResource = class {
87
82
  export {
88
83
  GSlidesResource
89
84
  };
90
- //# sourceMappingURL=chunk-2R7SPBTM.js.map
85
+ //# sourceMappingURL=chunk-AUZNQ7EI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resource/gslides/gslides.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { mountKey, mountPrefixOf } from '@struktoai/mirage-core'\nimport {\n type FileStat,\n GSLIDES_COMMANDS,\n GSLIDES_PROMPT,\n GSLIDES_OPS,\n GSLIDES_WRITE_PROMPT,\n GSlidesAccessor,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n TokenManager,\n gslidesRead,\n gslidesReaddir,\n makeResolveGlob,\n gslidesStat,\n} from '@struktoai/mirage-core'\nimport { redactGSlidesConfig, type GSlidesConfig, type GSlidesConfigRedacted } from './config.ts'\n\nconst gslidesResolveGlob = makeResolveGlob(gslidesReaddir)\n\nexport interface GSlidesResourceState {\n type: string\n config: GSlidesConfigRedacted\n}\n\nexport class GSlidesResource implements Resource {\n readonly kind: string = ResourceName.GSLIDES\n readonly cachesReads: boolean = true\n readonly indexTtl: number = 86_400\n readonly prompt: string = GSLIDES_PROMPT\n readonly writePrompt: string = GSLIDES_WRITE_PROMPT\n readonly config: GSlidesConfig\n readonly accessor: GSlidesAccessor\n readonly index: IndexCacheStore\n\n constructor(config: GSlidesConfig) {\n this.config = config\n const tm = new TokenManager(config)\n this.accessor = new GSlidesAccessor({ tokenManager: tm })\n this.index = new RAMIndexCacheStore({ ttl: 86_400 })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return GSLIDES_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return GSLIDES_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return gslidesRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return gslidesReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return gslidesStat(this.accessor, p, this.index)\n }\n\n 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 gslidesResolveGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<GSlidesResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactGSlidesConfig(this.config),\n })\n }\n\n loadState(_state: GSlidesResourceState): 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,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;AAAA,IACzC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA6C;AACrD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
@@ -3,8 +3,8 @@ import { mountKey, mountPrefixOf } from "@struktoai/mirage-core";
3
3
  import {
4
4
  copy as copyCore,
5
5
  create as createCore,
6
- du as duCore,
7
- duAll as duAllCore,
6
+ s3DuSize as duSizeCore,
7
+ s3DuEntries as duEntriesCore,
8
8
  exists as existsCore,
9
9
  find as findCore,
10
10
  makeResolveGlob,
@@ -18,6 +18,7 @@ import {
18
18
  rename as renameCore,
19
19
  ResourceName,
20
20
  S3_SCOPE_ERROR,
21
+ s3StorageId,
21
22
  rmR as rmRCore,
22
23
  rmdir as rmdirCore,
23
24
  S3_OPS,
@@ -45,6 +46,10 @@ var S3Resource = class {
45
46
  supportsSnapshot = true;
46
47
  kind = ResourceName.S3;
47
48
  cachesReads = true;
49
+ // A HEAD carries ContentLength, so a size is always knowable without
50
+ // fetching. Every sibling browser resource says so; s3 was the one that
51
+ // did not, and its node twin has always declared it.
52
+ sizesAlwaysKnown = true;
48
53
  indexTtl = 600;
49
54
  prompt = S3_BROWSER_PROMPT;
50
55
  config;
@@ -55,6 +60,13 @@ var S3Resource = class {
55
60
  this.accessor = new S3Accessor(this.config);
56
61
  this.index = new RAMIndexCacheStore({ ttl: this.indexTtl });
57
62
  }
63
+ // Without this, two mounts of one bucket at different prefixes are two
64
+ // storages, so `mv` between them copies an object over itself and then
65
+ // unlinks the source. Node has always declared it; the shared helper keeps
66
+ // the two runtimes from computing different identities for one bucket.
67
+ storageId() {
68
+ return s3StorageId(this.kind, this.config);
69
+ }
58
70
  open() {
59
71
  return Promise.resolve();
60
72
  }
@@ -123,7 +135,7 @@ var S3Resource = class {
123
135
  return rmRCore(this.accessor, p);
124
136
  }
125
137
  du(p) {
126
- return duCore(this.accessor, p);
138
+ return duSizeCore(this.accessor, p);
127
139
  }
128
140
  find(p, options = {}) {
129
141
  return findCore(this.accessor, p, options);
@@ -149,10 +161,10 @@ var S3Resource = class {
149
161
  loadState(_state) {
150
162
  return Promise.resolve();
151
163
  }
152
- // Ignored — duAll is not yet on the public Resource interface, but keeping
164
+ // Ignored — duEntries is not yet on the public Resource interface, but keeping
153
165
  // it around matches the node-side S3Resource.opsMap hook for completeness.
154
- _duAll(p) {
155
- return duAllCore(this.accessor, p);
166
+ _duEntries(p) {
167
+ return duEntriesCore(this.accessor, p);
156
168
  }
157
169
  _rangeRead(p, offset, size) {
158
170
  return rangeReadCore(this.accessor, p, offset, size);
@@ -167,4 +179,4 @@ export {
167
179
  S3_BROWSER_PROMPT,
168
180
  S3Resource
169
181
  };
170
- //# sourceMappingURL=chunk-DC6VA36O.js.map
182
+ //# sourceMappingURL=chunk-BGA2F226.js.map