@struktoai/mirage-browser 0.0.3 → 0.0.5-alpha.1
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.
- package/README.md +2 -1
- package/dist/aliyun-DR6KT3H6.js +8 -0
- package/dist/backblaze-XCLZXTES.js +8 -0
- package/dist/box-XBCSU3AA.js +8 -0
- package/dist/ceph-F5S2NMTO.js +8 -0
- package/dist/{chunk-HYUESAQS.js → chunk-2J35WXX5.js} +7 -3
- package/dist/chunk-2J35WXX5.js.map +1 -0
- package/dist/{chunk-CGZGX2GO.js → chunk-2WNXK742.js} +10 -12
- package/dist/chunk-2WNXK742.js.map +1 -0
- package/dist/{chunk-X2CCEHOR.js → chunk-2WSKXBSV.js} +22 -12
- package/dist/chunk-2WSKXBSV.js.map +1 -0
- package/dist/{chunk-SOF74I3T.js → chunk-37WKCB2E.js} +7 -5
- package/dist/chunk-37WKCB2E.js.map +1 -0
- package/dist/{chunk-ROHDW6KT.js → chunk-3IYCVC7W.js} +11 -5
- package/dist/chunk-3IYCVC7W.js.map +1 -0
- package/dist/{chunk-LSURHXZH.js → chunk-46HNNKFR.js} +11 -5
- package/dist/chunk-46HNNKFR.js.map +1 -0
- package/dist/chunk-4IF4TGAI.js +11 -0
- package/dist/chunk-4IF4TGAI.js.map +1 -0
- package/dist/{chunk-DA5EW34P.js → chunk-5OZJMTYW.js} +17 -13
- package/dist/chunk-5OZJMTYW.js.map +1 -0
- package/dist/{chunk-PV53AX35.js → chunk-5UM6EBVW.js} +18 -12
- package/dist/chunk-5UM6EBVW.js.map +1 -0
- package/dist/{chunk-NWZNQ3RC.js → chunk-6HRSCX2U.js} +11 -5
- package/dist/chunk-6HRSCX2U.js.map +1 -0
- package/dist/{chunk-F5QWZ7GM.js → chunk-7HWQAYXR.js} +11 -5
- package/dist/chunk-7HWQAYXR.js.map +1 -0
- package/dist/{chunk-OSMEXGRN.js → chunk-AUZNQ7EI.js} +13 -20
- package/dist/chunk-AUZNQ7EI.js.map +1 -0
- package/dist/{chunk-RQ273N5K.js → chunk-BGA2F226.js} +26 -21
- package/dist/chunk-BGA2F226.js.map +1 -0
- package/dist/{chunk-HXQ7HDA6.js → chunk-BV372CUO.js} +18 -20
- package/dist/chunk-BV372CUO.js.map +1 -0
- package/dist/{chunk-57QQAM7V.js → chunk-C4THTILY.js} +11 -5
- package/dist/chunk-C4THTILY.js.map +1 -0
- package/dist/{chunk-DVXOMWD4.js → chunk-D4MEOKNQ.js} +11 -5
- package/dist/chunk-D4MEOKNQ.js.map +1 -0
- package/dist/chunk-D4RAMWYH.js +88 -0
- package/dist/chunk-D4RAMWYH.js.map +1 -0
- package/dist/{chunk-NLBT6TBM.js → chunk-EHIT6WCY.js} +11 -5
- package/dist/chunk-EHIT6WCY.js.map +1 -0
- package/dist/{chunk-CNDGXKMU.js → chunk-EN6TZYT2.js} +11 -5
- package/dist/chunk-EN6TZYT2.js.map +1 -0
- package/dist/{chunk-QLLRQNOJ.js → chunk-FTDVV7EQ.js} +11 -5
- package/dist/chunk-FTDVV7EQ.js.map +1 -0
- package/dist/{chunk-G26SGOFR.js → chunk-G67Q2Z6I.js} +11 -5
- package/dist/chunk-G67Q2Z6I.js.map +1 -0
- package/dist/{chunk-XBOJZZRT.js → chunk-GM2QMJAY.js} +13 -20
- package/dist/chunk-GM2QMJAY.js.map +1 -0
- package/dist/{chunk-XYKNXGPR.js → chunk-HRWLHJX2.js} +14 -20
- package/dist/chunk-HRWLHJX2.js.map +1 -0
- package/dist/{chunk-DHZMC42C.js → chunk-INEXV2PN.js} +11 -5
- package/dist/chunk-INEXV2PN.js.map +1 -0
- package/dist/chunk-IZMKMD3O.js +11 -0
- package/dist/chunk-IZMKMD3O.js.map +1 -0
- package/dist/{chunk-4NLXLDMV.js → chunk-JUVMJ5GI.js} +13 -20
- package/dist/chunk-JUVMJ5GI.js.map +1 -0
- package/dist/{chunk-BIIG7ZAQ.js → chunk-KL2VFYUV.js} +7 -5
- package/dist/chunk-KL2VFYUV.js.map +1 -0
- package/dist/{chunk-J54OBIJA.js → chunk-L64GRKOD.js} +12 -3
- package/dist/chunk-L64GRKOD.js.map +1 -0
- package/dist/{chunk-54NTYJEO.js → chunk-LPDLPRPS.js} +1 -3
- package/dist/{chunk-54NTYJEO.js.map → chunk-LPDLPRPS.js.map} +1 -1
- package/dist/chunk-M2UF2JHJ.js +11 -0
- package/dist/chunk-M2UF2JHJ.js.map +1 -0
- package/dist/{chunk-KNJKYCTA.js → chunk-NVHPJ5CV.js} +19 -12
- package/dist/chunk-NVHPJ5CV.js.map +1 -0
- package/dist/{chunk-O5ONB7QT.js → chunk-OSTDTTWI.js} +14 -5
- package/dist/chunk-OSTDTTWI.js.map +1 -0
- package/dist/{chunk-J7PLA5S3.js → chunk-PQCRGTSA.js} +11 -5
- package/dist/chunk-PQCRGTSA.js.map +1 -0
- package/dist/{chunk-BJHHL4UT.js → chunk-QE7QNA45.js} +14 -11
- package/dist/chunk-QE7QNA45.js.map +1 -0
- package/dist/{chunk-K2S42IR4.js → chunk-QG2NUNCY.js} +11 -5
- package/dist/chunk-QG2NUNCY.js.map +1 -0
- package/dist/chunk-UFHBDBZD.js +1212 -0
- package/dist/chunk-UFHBDBZD.js.map +1 -0
- package/dist/{chunk-KTE5PB2D.js → chunk-UY22T4AC.js} +22 -14
- package/dist/chunk-UY22T4AC.js.map +1 -0
- package/dist/chunk-XJBC3OYX.js +11 -0
- package/dist/chunk-XJBC3OYX.js.map +1 -0
- package/dist/{chunk-6YP3B7UK.js → chunk-Y6DYUK6J.js} +11 -5
- package/dist/chunk-Y6DYUK6J.js.map +1 -0
- package/dist/{chunk-DFHFILVF.js → chunk-YOCTIHQZ.js} +14 -12
- package/dist/chunk-YOCTIHQZ.js.map +1 -0
- package/dist/{chunk-TQ6VRUEI.js → chunk-ZDJPUXYH.js} +14 -12
- package/dist/chunk-ZDJPUXYH.js.map +1 -0
- package/dist/{chunk-2AEAISO2.js → chunk-ZKCOSE3R.js} +18 -18
- package/dist/chunk-ZKCOSE3R.js.map +1 -0
- package/dist/chunk-ZTHVEXIV.js +11 -0
- package/dist/chunk-ZTHVEXIV.js.map +1 -0
- package/dist/{config-ET26F632.js → config-2Y6LZKLV.js} +2 -4
- package/dist/config-4GSOMUMF.js +9 -0
- package/dist/config-5YBUWFUP.js +9 -0
- package/dist/config-DE5OZ4I7.js +9 -0
- package/dist/config-ELDOFRJW.js +9 -0
- package/dist/config-FPM3LAW7.js +9 -0
- package/dist/config-JY557MA6.js +9 -0
- package/dist/{config-NV5WXP64.js → config-UU27ALAA.js} +2 -4
- package/dist/config-WRACCRPN.js +9 -0
- package/dist/digitalocean-QDHTRS2W.js +8 -0
- package/dist/discord-ERUI7OAQ.js +7 -0
- package/dist/dropbox-3U6D4HLE.js +8 -0
- package/dist/gcal-MTBSDG34.js +8 -0
- package/dist/gcs-KNGRBBET.js +8 -0
- package/dist/gdocs-RUIOIRKP.js +8 -0
- package/dist/gdrive-5JB7ZKEP.js +8 -0
- package/dist/github-CIXBFBVO.js +7 -0
- package/dist/github_ci-HR6YOYAO.js +8 -0
- package/dist/gmail-JHGWTQU5.js +8 -0
- package/dist/gsheets-N54JO2RS.js +8 -0
- package/dist/gslides-B4VMNLMB.js +8 -0
- package/dist/index.d.ts +292 -348
- package/dist/index.js +171 -110
- package/dist/index.js.map +1 -1
- package/dist/langfuse-HEUJGDOC.js +7 -0
- package/dist/linear-J4QQ3CA6.js +7 -0
- package/dist/minio-BXWHJ6K5.js +8 -0
- package/dist/mongodb-YZP643ZU.js +7 -0
- package/dist/notion-I5S5SRLO.js +7 -0
- package/dist/oci-XOPKH4AE.js +8 -0
- package/dist/opfs-36QO72Y5.js +7 -0
- package/dist/postgres-HPOMN2AR.js +7 -0
- package/dist/qingstor-JKAHLK62.js +8 -0
- package/dist/r2-L3QXQ76M.js +8 -0
- package/dist/{s3-GI7SDKGR.js → s3-LRZJPGHK.js} +2 -2
- package/dist/scaleway-CGNDYNKS.js +8 -0
- package/dist/seaweedfs-BSQWCBIR.js +8 -0
- package/dist/slack-62ECSENR.js +7 -0
- package/dist/supabase-J66NXWAF.js +8 -0
- package/dist/tencent-AC667LV3.js +8 -0
- package/dist/trello-SUPG6VDF.js +7 -0
- package/dist/trello-SUPG6VDF.js.map +1 -0
- package/dist/wasabi-5KKPW6LH.js +8 -0
- package/dist/wasabi-5KKPW6LH.js.map +1 -0
- package/package.json +2 -3
- package/dist/aliyun-GMNRT7BJ.js +0 -8
- package/dist/backblaze-O6CLR73B.js +0 -8
- package/dist/box-GXWDWZRN.js +0 -8
- package/dist/ceph-SM7MXDAY.js +0 -8
- package/dist/chunk-2AEAISO2.js.map +0 -1
- package/dist/chunk-2H4KUUFP.js +0 -26
- package/dist/chunk-2H4KUUFP.js.map +0 -1
- package/dist/chunk-4NLXLDMV.js.map +0 -1
- package/dist/chunk-57QQAM7V.js.map +0 -1
- package/dist/chunk-6YP3B7UK.js.map +0 -1
- package/dist/chunk-BIIG7ZAQ.js.map +0 -1
- package/dist/chunk-BJHHL4UT.js.map +0 -1
- package/dist/chunk-CGZGX2GO.js.map +0 -1
- package/dist/chunk-CNDGXKMU.js.map +0 -1
- package/dist/chunk-DA5EW34P.js.map +0 -1
- package/dist/chunk-DFHFILVF.js.map +0 -1
- package/dist/chunk-DHZMC42C.js.map +0 -1
- package/dist/chunk-DVXOMWD4.js.map +0 -1
- package/dist/chunk-F5QWZ7GM.js.map +0 -1
- package/dist/chunk-G26SGOFR.js.map +0 -1
- package/dist/chunk-HXQ7HDA6.js.map +0 -1
- package/dist/chunk-HYUESAQS.js.map +0 -1
- package/dist/chunk-J54OBIJA.js.map +0 -1
- package/dist/chunk-J7PLA5S3.js.map +0 -1
- package/dist/chunk-JSAQMYPK.js +0 -26
- package/dist/chunk-JSAQMYPK.js.map +0 -1
- package/dist/chunk-K2S42IR4.js.map +0 -1
- package/dist/chunk-KNJKYCTA.js.map +0 -1
- package/dist/chunk-KTE5PB2D.js.map +0 -1
- package/dist/chunk-KV2DM5H6.js +0 -2116
- package/dist/chunk-KV2DM5H6.js.map +0 -1
- package/dist/chunk-LSURHXZH.js.map +0 -1
- package/dist/chunk-NLBT6TBM.js.map +0 -1
- package/dist/chunk-NMZBJOFW.js +0 -26
- package/dist/chunk-NMZBJOFW.js.map +0 -1
- package/dist/chunk-NWZNQ3RC.js.map +0 -1
- package/dist/chunk-O5ONB7QT.js.map +0 -1
- package/dist/chunk-OSMEXGRN.js.map +0 -1
- package/dist/chunk-PV53AX35.js.map +0 -1
- package/dist/chunk-QLLRQNOJ.js.map +0 -1
- package/dist/chunk-ROHDW6KT.js.map +0 -1
- package/dist/chunk-RQ273N5K.js.map +0 -1
- package/dist/chunk-SOF74I3T.js.map +0 -1
- package/dist/chunk-TQ6VRUEI.js.map +0 -1
- package/dist/chunk-X2CCEHOR.js.map +0 -1
- package/dist/chunk-XBOJZZRT.js.map +0 -1
- package/dist/chunk-XYKNXGPR.js.map +0 -1
- package/dist/chunk-YGRKFONX.js +0 -26
- package/dist/chunk-YGRKFONX.js.map +0 -1
- package/dist/config-7IZCGWKX.js +0 -11
- package/dist/config-AT74FARJ.js +0 -11
- package/dist/config-C2AYHACT.js +0 -11
- package/dist/config-GHJOYNM6.js +0 -11
- package/dist/config-L55UXIF4.js +0 -11
- package/dist/config-V7BLK5WP.js +0 -11
- package/dist/digitalocean-XFH2V2A3.js +0 -8
- package/dist/discord-OQMSHM3L.js +0 -7
- package/dist/dropbox-IAOKM7G5.js +0 -8
- package/dist/gcs-JYZB6CVP.js +0 -8
- package/dist/gdocs-PHKQGLZL.js +0 -8
- package/dist/gdrive-4JQLGOOP.js +0 -8
- package/dist/github-DU7Z4RSU.js +0 -7
- package/dist/github_ci-XSAJDNXC.js +0 -8
- package/dist/gmail-DEQP2M7T.js +0 -8
- package/dist/gsheets-KCIHSMOK.js +0 -8
- package/dist/gslides-2KBUKKM5.js +0 -8
- package/dist/langfuse-FNCMKFSL.js +0 -7
- package/dist/linear-XTFO4WKD.js +0 -7
- package/dist/minio-NGPBAJY3.js +0 -8
- package/dist/mongodb-PGOX6QSY.js +0 -7
- package/dist/notion-HYYNQ7KI.js +0 -7
- package/dist/oci-EGDBSMLM.js +0 -8
- package/dist/opfs-5WGXB5OG.js +0 -7
- package/dist/postgres-5HYED4AC.js +0 -7
- package/dist/qingstor-2T4Y6MEG.js +0 -8
- package/dist/r2-3B45S2KV.js +0 -8
- package/dist/scaleway-ICCXVAY6.js +0 -8
- package/dist/seaweedfs-MF77EC33.js +0 -8
- package/dist/slack-6LGQERIU.js +0 -7
- package/dist/supabase-XTOVMHXU.js +0 -8
- package/dist/tencent-FXFKSOTN.js +0 -8
- package/dist/trello-DZK4NEVY.js +0 -7
- package/dist/wasabi-KVE2B6RB.js +0 -8
- /package/dist/{aliyun-GMNRT7BJ.js.map → aliyun-DR6KT3H6.js.map} +0 -0
- /package/dist/{backblaze-O6CLR73B.js.map → backblaze-XCLZXTES.js.map} +0 -0
- /package/dist/{box-GXWDWZRN.js.map → box-XBCSU3AA.js.map} +0 -0
- /package/dist/{ceph-SM7MXDAY.js.map → ceph-F5S2NMTO.js.map} +0 -0
- /package/dist/{config-7IZCGWKX.js.map → config-2Y6LZKLV.js.map} +0 -0
- /package/dist/{config-AT74FARJ.js.map → config-4GSOMUMF.js.map} +0 -0
- /package/dist/{config-C2AYHACT.js.map → config-5YBUWFUP.js.map} +0 -0
- /package/dist/{config-ET26F632.js.map → config-DE5OZ4I7.js.map} +0 -0
- /package/dist/{config-GHJOYNM6.js.map → config-ELDOFRJW.js.map} +0 -0
- /package/dist/{config-L55UXIF4.js.map → config-FPM3LAW7.js.map} +0 -0
- /package/dist/{config-NV5WXP64.js.map → config-JY557MA6.js.map} +0 -0
- /package/dist/{config-V7BLK5WP.js.map → config-UU27ALAA.js.map} +0 -0
- /package/dist/{digitalocean-XFH2V2A3.js.map → config-WRACCRPN.js.map} +0 -0
- /package/dist/{discord-OQMSHM3L.js.map → digitalocean-QDHTRS2W.js.map} +0 -0
- /package/dist/{dropbox-IAOKM7G5.js.map → discord-ERUI7OAQ.js.map} +0 -0
- /package/dist/{gcs-JYZB6CVP.js.map → dropbox-3U6D4HLE.js.map} +0 -0
- /package/dist/{gdocs-PHKQGLZL.js.map → gcal-MTBSDG34.js.map} +0 -0
- /package/dist/{gdrive-4JQLGOOP.js.map → gcs-KNGRBBET.js.map} +0 -0
- /package/dist/{github-DU7Z4RSU.js.map → gdocs-RUIOIRKP.js.map} +0 -0
- /package/dist/{github_ci-XSAJDNXC.js.map → gdrive-5JB7ZKEP.js.map} +0 -0
- /package/dist/{gmail-DEQP2M7T.js.map → github-CIXBFBVO.js.map} +0 -0
- /package/dist/{gsheets-KCIHSMOK.js.map → github_ci-HR6YOYAO.js.map} +0 -0
- /package/dist/{gslides-2KBUKKM5.js.map → gmail-JHGWTQU5.js.map} +0 -0
- /package/dist/{langfuse-FNCMKFSL.js.map → gsheets-N54JO2RS.js.map} +0 -0
- /package/dist/{linear-XTFO4WKD.js.map → gslides-B4VMNLMB.js.map} +0 -0
- /package/dist/{minio-NGPBAJY3.js.map → langfuse-HEUJGDOC.js.map} +0 -0
- /package/dist/{mongodb-PGOX6QSY.js.map → linear-J4QQ3CA6.js.map} +0 -0
- /package/dist/{notion-HYYNQ7KI.js.map → minio-BXWHJ6K5.js.map} +0 -0
- /package/dist/{oci-EGDBSMLM.js.map → mongodb-YZP643ZU.js.map} +0 -0
- /package/dist/{opfs-5WGXB5OG.js.map → notion-I5S5SRLO.js.map} +0 -0
- /package/dist/{postgres-5HYED4AC.js.map → oci-XOPKH4AE.js.map} +0 -0
- /package/dist/{qingstor-2T4Y6MEG.js.map → opfs-36QO72Y5.js.map} +0 -0
- /package/dist/{r2-3B45S2KV.js.map → postgres-HPOMN2AR.js.map} +0 -0
- /package/dist/{s3-GI7SDKGR.js.map → qingstor-JKAHLK62.js.map} +0 -0
- /package/dist/{scaleway-ICCXVAY6.js.map → r2-L3QXQ76M.js.map} +0 -0
- /package/dist/{seaweedfs-MF77EC33.js.map → s3-LRZJPGHK.js.map} +0 -0
- /package/dist/{slack-6LGQERIU.js.map → scaleway-CGNDYNKS.js.map} +0 -0
- /package/dist/{supabase-XTOVMHXU.js.map → seaweedfs-BSQWCBIR.js.map} +0 -0
- /package/dist/{tencent-FXFKSOTN.js.map → slack-62ECSENR.js.map} +0 -0
- /package/dist/{trello-DZK4NEVY.js.map → supabase-J66NXWAF.js.map} +0 -0
- /package/dist/{wasabi-KVE2B6RB.js.map → tencent-AC667LV3.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resource/ceph/ceph.ts","../src/resource/ceph/config.ts","../src/resource/ceph/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 cephToS3Config,\n redactCephConfig,\n type CephConfig,\n type CephConfigRedacted,\n} from './config.ts'\nimport { CEPH_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface CephResourceState {\n type: string\n config: CephConfigRedacted\n}\n\nexport class CephResource extends S3Resource {\n override readonly kind: string = ResourceName.CEPH\n override readonly prompt: string = CEPH_BROWSER_PROMPT\n readonly cephConfig: CephConfig\n private readonly cephOps: readonly RegisteredOp[]\n private readonly cephCommands: readonly RegisteredCommand[]\n\n constructor(config: CephConfig) {\n super(cephToS3Config(config))\n this.cephConfig = config\n this.cephOps = remapOpsResource(super.ops(), ResourceName.CEPH)\n this.cephCommands = remapCommandsResource(super.commands(), ResourceName.CEPH)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.cephOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.cephCommands\n }\n\n override getState(): Promise<CephResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactCephConfig(this.cephConfig),\n })\n }\n\n override loadState(_state: CephResourceState): 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 CephConfig {\n bucket: string\n presignedUrlProvider: S3BrowserPresignedUrlProvider\n endpoint?: string\n region?: string\n defaultContentType?: string\n}\n\nexport interface CephConfigRedacted extends Omit<CephConfig, 'presignedUrlProvider'> {\n presignedUrlProvider: '<REDACTED>'\n}\n\nexport const CephConfigSchema = 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})\n\nexport function cephToS3Config(config: CephConfig): 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 }\n}\n\nexport function redactCephConfig(config: CephConfig): CephConfigRedacted {\n return redactConfigWithSchema(CephConfigSchema, config) as unknown as CephConfigRedacted\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 CEPH_BROWSER_PROMPT = `{prefix}\n Remote Ceph Rados Gateway 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;AAejD,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,QAAQ,EAAE,OAAO;AAAA,EACjB,sBAAsB;AAAA,IACpB,EAAE,OAAsC,CAAC,UAAU,OAAO,UAAU,UAAU;AAAA,EAChF;AAAA,EACA,UAAU,EAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,QAAQ,EAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,oBAAoB,EAAE,OAAO,EAAE,SAAS;AAC1C,CAAC;AAEM,SAAS,eAAe,QAA8B;AAC3D,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,OAAO,aAAa,SAAY,EAAE,UAAU,OAAO,SAAS,IAAI,CAAC;AAAA,IACrE,GAAI,OAAO,uBAAuB,SAC9B,EAAE,oBAAoB,OAAO,mBAAmB,IAChD,CAAC;AAAA,EACP;AACF;AAEO,SAAS,iBAAiB,QAAwC;AACvE,SAAO,uBAAuB,kBAAkB,MAAM;AACxD;;;ACvCO,IAAM,sBAAsB;AAAA;AAAA;AAAA;AAAA;;;AFqB5B,IAAM,eAAN,cAA2B,WAAW;AAAA,EACzB,OAAe,aAAa;AAAA,EAC5B,SAAiB;AAAA,EAC1B;AAAA,EACQ;AAAA,EACA;AAAA,EAEjB,YAAY,QAAoB;AAC9B,UAAM,eAAe,MAAM,CAAC;AAC5B,SAAK,aAAa;AAClB,SAAK,UAAU,iBAAiB,MAAM,IAAI,GAAG,aAAa,IAAI;AAC9D,SAAK,eAAe,sBAAsB,MAAM,SAAS,GAAG,aAAa,IAAI;AAAA,EAC/E;AAAA,EAES,MAA+B;AACtC,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAyC;AAChD,WAAO,KAAK;AAAA,EACd;AAAA,EAES,WAAuC;AAC9C,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,iBAAiB,KAAK,UAAU;AAAA,IAC1C,CAAC;AAAA,EACH;AAAA,EAES,UAAU,QAA0C;AAC3D,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
|
package/dist/chunk-JSAQMYPK.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// src/resource/gslides/config.ts
|
|
2
|
-
import { normalizeFields, redactConfigWithSchema, secretStr, z } from "@struktoai/mirage-core";
|
|
3
|
-
var GSlidesConfigSchema = z.object({
|
|
4
|
-
clientId: z.string(),
|
|
5
|
-
clientSecret: secretStr().optional(),
|
|
6
|
-
refreshToken: secretStr()
|
|
7
|
-
});
|
|
8
|
-
function redactGSlidesConfig(config) {
|
|
9
|
-
return redactConfigWithSchema(GSlidesConfigSchema, config);
|
|
10
|
-
}
|
|
11
|
-
function normalizeGSlidesConfig(input) {
|
|
12
|
-
return normalizeFields(input, {
|
|
13
|
-
rename: {
|
|
14
|
-
client_id: "clientId",
|
|
15
|
-
client_secret: "clientSecret",
|
|
16
|
-
refresh_token: "refreshToken"
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
GSlidesConfigSchema,
|
|
23
|
-
redactGSlidesConfig,
|
|
24
|
-
normalizeGSlidesConfig
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=chunk-JSAQMYPK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resource/gslides/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { normalizeFields, redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\n\nexport interface GSlidesConfig {\n clientId: string\n clientSecret?: string\n refreshToken: string\n refreshFn?: (refreshToken: string) => Promise<{ accessToken: string; expiresIn: number }>\n}\n\nexport interface GSlidesConfigRedacted {\n clientId: string\n clientSecret?: '<REDACTED>'\n refreshToken: '<REDACTED>'\n}\n\nexport const GSlidesConfigSchema = z.object({\n clientId: z.string(),\n clientSecret: secretStr().optional(),\n refreshToken: secretStr(),\n})\n\nexport function redactGSlidesConfig(config: GSlidesConfig): GSlidesConfigRedacted {\n return redactConfigWithSchema(GSlidesConfigSchema, config) as unknown as GSlidesConfigRedacted\n}\n\nexport function normalizeGSlidesConfig(input: Record<string, unknown>): GSlidesConfig {\n return normalizeFields(input, {\n rename: {\n client_id: 'clientId',\n client_secret: 'clientSecret',\n refresh_token: 'refreshToken',\n },\n }) as unknown as GSlidesConfig\n}\n"],"mappings":";AAcA,SAAS,iBAAiB,wBAAwB,WAAW,SAAS;AAe/D,IAAM,sBAAsB,EAAE,OAAO;AAAA,EAC1C,UAAU,EAAE,OAAO;AAAA,EACnB,cAAc,UAAU,EAAE,SAAS;AAAA,EACnC,cAAc,UAAU;AAC1B,CAAC;AAEM,SAAS,oBAAoB,QAA8C;AAChF,SAAO,uBAAuB,qBAAqB,MAAM;AAC3D;AAEO,SAAS,uBAAuB,OAA+C;AACpF,SAAO,gBAAgB,OAAO;AAAA,IAC5B,QAAQ;AAAA,MACN,WAAW;AAAA,MACX,eAAe;AAAA,MACf,eAAe;AAAA,IACjB;AAAA,EACF,CAAC;AACH;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resource/qingstor/qingstor.ts","../src/resource/qingstor/config.ts","../src/resource/qingstor/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 qingStorToS3Config,\n redactQingStorConfig,\n type QingStorConfig,\n type QingStorConfigRedacted,\n} from './config.ts'\nimport { QINGSTOR_BROWSER_PROMPT } from './prompt.ts'\n\nexport interface QingStorResourceState {\n type: string\n config: QingStorConfigRedacted\n}\n\nexport class QingStorResource extends S3Resource {\n override readonly kind: string = ResourceName.QINGSTOR\n override readonly prompt: string = QINGSTOR_BROWSER_PROMPT\n readonly qingStorConfig: QingStorConfig\n private readonly qingStorOps: readonly RegisteredOp[]\n private readonly qingStorCommands: readonly RegisteredCommand[]\n\n constructor(config: QingStorConfig) {\n super(qingStorToS3Config(config))\n this.qingStorConfig = config\n this.qingStorOps = remapOpsResource(super.ops(), ResourceName.QINGSTOR)\n this.qingStorCommands = remapCommandsResource(super.commands(), ResourceName.QINGSTOR)\n }\n\n override ops(): readonly RegisteredOp[] {\n return this.qingStorOps\n }\n\n override commands(): readonly RegisteredCommand[] {\n return this.qingStorCommands\n }\n\n override getState(): Promise<QingStorResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactQingStorConfig(this.qingStorConfig),\n })\n }\n\n override loadState(_state: QingStorResourceState): 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 QingStorConfig {\n bucket: string\n presignedUrlProvider: S3BrowserPresignedUrlProvider\n region?: string\n endpoint?: string\n defaultContentType?: string\n}\n\nexport interface QingStorConfigRedacted extends Omit<QingStorConfig, 'presignedUrlProvider'> {\n presignedUrlProvider: '<REDACTED>'\n}\n\nexport const QingStorConfigSchema = 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})\n\nexport function resolvedQingStorEndpoint(config: QingStorConfig): 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}.qingstor.com`\n }\n return undefined\n}\n\nexport function qingStorToS3Config(config: QingStorConfig): S3Config {\n const endpoint = resolvedQingStorEndpoint(config)\n return {\n bucket: config.bucket,\n presignedUrlProvider: config.presignedUrlProvider,\n ...(config.region !== undefined ? { region: config.region } : {}),\n ...(endpoint !== undefined ? { endpoint } : {}),\n ...(config.defaultContentType !== undefined\n ? { defaultContentType: config.defaultContentType }\n : {}),\n }\n}\n\nexport function redactQingStorConfig(config: QingStorConfig): QingStorConfigRedacted {\n return redactConfigWithSchema(QingStorConfigSchema, config) as unknown as QingStorConfigRedacted\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 QINGSTOR_BROWSER_PROMPT = `{prefix}\n Remote QingStor 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;AAejD,IAAM,uBAAuB,EAAE,OAAO;AAAA,EAC3C,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;AAC1C,CAAC;AAEM,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,EACP;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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resource/slack/slack.ts","../src/resource/slack/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n BrowserSlackTransport,\n type FileStat,\n type IndexCacheStore,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n resolveSlackGlob,\n SLACK_COMMANDS,\n SLACK_PROMPT,\n SLACK_VFS_OPS,\n SLACK_WRITE_PROMPT,\n SlackAccessor,\n slackRead,\n slackReaddir,\n slackStat,\n} from '@struktoai/mirage-core'\nimport { redactSlackConfig, type SlackConfig, type SlackConfigRedacted } from './config.ts'\n\nexport interface SlackResourceState {\n type: string\n config: SlackConfigRedacted\n}\n\nexport class SlackResource implements Resource {\n readonly kind: string = ResourceName.SLACK\n readonly cachesReads: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = SLACK_PROMPT\n readonly writePrompt: string = SLACK_WRITE_PROMPT\n readonly config: SlackConfig\n readonly accessor: SlackAccessor\n readonly index: IndexCacheStore\n\n constructor(config: SlackConfig) {\n this.config = config\n this.accessor = new SlackAccessor(\n new BrowserSlackTransport({\n proxyUrl: config.proxyUrl,\n ...(config.getHeaders !== undefined ? { getHeaders: config.getHeaders } : {}),\n }),\n )\n this.index = new RAMIndexCacheStore({ ttl: this.indexTtl })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return SLACK_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return SLACK_VFS_OPS\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return slackRead(this.accessor, p, this.index)\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return slackReaddir(this.accessor, p, this.index)\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return slackStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return resolveSlackGlob(this.accessor, effective, this.index)\n }\n\n getState(): Promise<SlackResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactSlackConfig(this.config),\n })\n }\n\n loadState(_state: SlackResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { redactConfigWithSchema, secretSchema, z } from '@struktoai/mirage-core'\n\nexport interface SlackConfig {\n proxyUrl: string\n getHeaders?: () => Promise<Record<string, string>> | Record<string, string>\n}\n\nexport interface SlackConfigRedacted {\n proxyUrl: string\n getHeaders?: '<REDACTED>'\n}\n\nexport const SlackConfigSchema = z.object({\n proxyUrl: z.string(),\n getHeaders: secretSchema(\n z.custom<SlackConfig['getHeaders']>((value) => typeof value === 'function'),\n ).optional(),\n})\n\nexport function redactSlackConfig(config: SlackConfig): SlackConfigRedacted {\n return redactConfigWithSchema(SlackConfigSchema, config) as unknown as SlackConfigRedacted\n}\n"],"mappings":";AAcA;AAAA,EACE;AAAA,EAGA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACnBP,SAAS,wBAAwB,cAAc,SAAS;AAYjD,IAAM,oBAAoB,EAAE,OAAO;AAAA,EACxC,UAAU,EAAE,OAAO;AAAA,EACnB,YAAY;AAAA,IACV,EAAE,OAAkC,CAAC,UAAU,OAAO,UAAU,UAAU;AAAA,EAC5E,EAAE,SAAS;AACb,CAAC;AAEM,SAAS,kBAAkB,QAA0C;AAC1E,SAAO,uBAAuB,mBAAmB,MAAM;AACzD;;;ADMO,IAAM,gBAAN,MAAwC;AAAA,EACpC,OAAe,aAAa;AAAA,EAC5B,cAAuB;AAAA,EACvB,WAAmB;AAAA,EACnB,SAAiB;AAAA,EACjB,cAAsB;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,QAAqB;AAC/B,SAAK,SAAS;AACd,SAAK,WAAW,IAAI;AAAA,MAClB,IAAI,sBAAsB;AAAA,QACxB,UAAU,OAAO;AAAA,QACjB,GAAI,OAAO,eAAe,SAAY,EAAE,YAAY,OAAO,WAAW,IAAI,CAAC;AAAA,MAC7E,CAAC;AAAA,IACH;AACA,SAAK,QAAQ,IAAI,mBAAmB,EAAE,KAAK,KAAK,SAAS,CAAC;AAAA,EAC5D;AAAA,EAEA,OAAsB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,QAAuB;AACrB,WAAO,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,UAAU,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAC/C;AAAA,EAEA,QAAQ,GAAgC;AACtC,WAAO,aAAa,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAClD;AAAA,EAEA,KAAK,GAAgC;AACnC,WAAO,UAAU,KAAK,UAAU,GAAG,KAAK,KAAK;AAAA,EAC/C;AAAA,EAEA,MAAM,YAAY,GAAqC;AACrD,UAAM,SAAS,MAAM,KAAK,MAAM,IAAI,EAAE,QAAQ;AAC9C,WAAO,OAAO,OAAO,cAAc;AAAA,EACrC;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,EAAE,WAAW,KACT,IACA,IAAI,SAAS;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACP,IACA;AACN,WAAO,iBAAiB,KAAK,UAAU,WAAW,KAAK,KAAK;AAAA,EAC9D;AAAA,EAEA,WAAwC;AACtC,WAAO,QAAQ,QAAQ;AAAA,MACrB,MAAM,KAAK;AAAA,MACX,QAAQ,kBAAkB,KAAK,MAAM;AAAA,IACvC,CAAC;AAAA,EACH;AAAA,EAEA,UAAU,QAA2C;AACnD,WAAO,QAAQ,QAAQ;AAAA,EACzB;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/resource/linear/linear.ts","../src/resource/linear/config.ts"],"sourcesContent":["// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport {\n type FileStat,\n HttpLinearTransport,\n type IndexCacheStore,\n LINEAR_COMMANDS,\n LINEAR_PROMPT,\n LINEAR_VFS_OPS,\n LINEAR_WRITE_PROMPT,\n LinearAccessor,\n type LinearReaddirFilter,\n linearRead,\n linearReaddir,\n linearStat,\n PathSpec,\n RAMIndexCacheStore,\n type RegisteredCommand,\n type RegisteredOp,\n type Resource,\n ResourceName,\n resolveLinearGlob,\n} from '@struktoai/mirage-core'\nimport { redactLinearConfig, type LinearConfig, type LinearConfigRedacted } from './config.ts'\n\nexport interface LinearResourceState {\n type: string\n config: LinearConfigRedacted\n}\n\nexport class LinearResource implements Resource {\n readonly kind: string = ResourceName.LINEAR\n readonly cachesReads: boolean = true\n readonly indexTtl: number = 600\n readonly prompt: string = LINEAR_PROMPT\n readonly writePrompt: string = LINEAR_WRITE_PROMPT\n readonly config: LinearConfig\n readonly accessor: LinearAccessor\n readonly index: IndexCacheStore\n\n constructor(config: LinearConfig) {\n this.config = config\n const transportOpts: { apiKey: string; baseUrl?: string } = { apiKey: config.apiKey }\n if (config.baseUrl !== undefined) transportOpts.baseUrl = config.baseUrl\n this.accessor = new LinearAccessor(new HttpLinearTransport(transportOpts))\n this.index = new RAMIndexCacheStore({ ttl: this.indexTtl })\n }\n\n open(): Promise<void> {\n return Promise.resolve()\n }\n\n close(): Promise<void> {\n return Promise.resolve()\n }\n\n commands(): readonly RegisteredCommand[] {\n return LINEAR_COMMANDS\n }\n\n ops(): readonly RegisteredOp[] {\n return LINEAR_VFS_OPS\n }\n\n private filter(): LinearReaddirFilter {\n const out: LinearReaddirFilter = {}\n if (this.config.teamIds !== undefined) out.teamIds = this.config.teamIds\n return out\n }\n\n readFile(p: PathSpec): Promise<Uint8Array> {\n return linearRead(this.accessor, p, this.index, this.filter())\n }\n\n readdir(p: PathSpec): Promise<string[]> {\n return linearReaddir(this.accessor, p, this.index, this.filter())\n }\n\n stat(p: PathSpec): Promise<FileStat> {\n return linearStat(this.accessor, p, this.index)\n }\n\n async fingerprint(p: PathSpec): Promise<string | null> {\n const lookup = await this.index.get(p.original)\n return lookup.entry?.remoteTime ?? null\n }\n\n glob(paths: readonly PathSpec[], prefix = ''): Promise<PathSpec[]> {\n const effective =\n prefix !== ''\n ? paths.map((p) =>\n p.prefix !== ''\n ? p\n : new PathSpec({\n original: p.original,\n directory: p.directory,\n ...(p.pattern !== null ? { pattern: p.pattern } : {}),\n resolved: p.resolved,\n prefix,\n }),\n )\n : paths\n return resolveLinearGlob(this.accessor, effective, this.index, this.filter())\n }\n\n getState(): Promise<LinearResourceState> {\n return Promise.resolve({\n type: this.kind,\n config: redactLinearConfig(this.config),\n })\n }\n\n loadState(_state: LinearResourceState): Promise<void> {\n return Promise.resolve()\n }\n}\n","// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n// ========= Copyright 2026 @ Strukto.AI All Rights Reserved. =========\n\nimport { redactConfigWithSchema, secretStr, z } from '@struktoai/mirage-core'\n\nexport interface LinearConfig {\n apiKey: string\n workspace?: string\n teamIds?: readonly string[]\n baseUrl?: string\n}\n\nexport interface LinearConfigRedacted {\n apiKey: '<REDACTED>'\n workspace?: string\n teamIds?: readonly string[]\n baseUrl?: string\n}\n\nexport const LinearConfigSchema = z.object({\n apiKey: secretStr(),\n workspace: z.string().optional(),\n teamIds: z.array(z.string()).optional(),\n baseUrl: z.string().optional(),\n})\n\nexport function redactLinearConfig(config: LinearConfig): LinearConfigRedacted {\n return redactConfigWithSchema(LinearConfigSchema, config) as unknown as LinearConfigRedacted\n}\n"],"mappings":";AAcA;AAAA,EAEE;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAIA;AAAA,EACA;AAAA,OACK;;;ACpBP,SAAS,wBAAwB,WAAW,SAAS;AAgB9C,IAAM,qBAAqB,EAAE,OAAO;AAAA,EACzC,QAAQ,UAAU;AAAA,EAClB,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,SAAS;AAAA,EACtC,SAAS,EAAE,OAAO,EAAE,SAAS;AAC/B,CAAC;AAEM,SAAS,mBAAmB,QAA4C;AAC7E,SAAO,uBAAuB,oBAAoB,MAAM;AAC1D;;;ADGO,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,QAAsB;AAChC,SAAK,SAAS;AACd,UAAM,gBAAsD,EAAE,QAAQ,OAAO,OAAO;AACpF,QAAI,OAAO,YAAY,OAAW,eAAc,UAAU,OAAO;AACjE,SAAK,WAAW,IAAI,eAAe,IAAI,oBAAoB,aAAa,CAAC;AACzE,SAAK,QAAQ,IAAI,mBAAmB,EAAE,KAAK,KAAK,SAAS,CAAC;AAAA,EAC5D;AAAA,EAEA,OAAsB;AACpB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,QAAuB;AACrB,WAAO,QAAQ,QAAQ;AAAA,EACzB;AAAA,EAEA,WAAyC;AACvC,WAAO;AAAA,EACT;AAAA,EAEA,MAA+B;AAC7B,WAAO;AAAA,EACT;AAAA,EAEQ,SAA8B;AACpC,UAAM,MAA2B,CAAC;AAClC,QAAI,KAAK,OAAO,YAAY,OAAW,KAAI,UAAU,KAAK,OAAO;AACjE,WAAO;AAAA,EACT;AAAA,EAEA,SAAS,GAAkC;AACzC,WAAO,WAAW,KAAK,UAAU,GAAG,KAAK,OAAO,KAAK,OAAO,CAAC;AAAA,EAC/D;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,MAAM,YAAY,GAAqC;AACrD,UAAM,SAAS,MAAM,KAAK,MAAM,IAAI,EAAE,QAAQ;AAC9C,WAAO,OAAO,OAAO,cAAc;AAAA,EACrC;AAAA,EAEA,KAAK,OAA4B,SAAS,IAAyB;AACjE,UAAM,YACJ,WAAW,KACP,MAAM;AAAA,MAAI,CAAC,MACT,EAAE,WAAW,KACT,IACA,IAAI,SAAS;AAAA,QACX,UAAU,EAAE;AAAA,QACZ,WAAW,EAAE;AAAA,QACb,GAAI,EAAE,YAAY,OAAO,EAAE,SAAS,EAAE,QAAQ,IAAI,CAAC;AAAA,QACnD,UAAU,EAAE;AAAA,QACZ;AAAA,MACF,CAAC;AAAA,IACP,IACA;AACN,WAAO,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":[]}
|